From 385cb383abc610dbcf60c092d3dd109aea37037d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20K=C3=BChn?= Date: Fri, 18 Nov 2011 10:03:08 +0100 Subject: [PATCH 001/352] remove phrozn structure --- .gitmodules | 3 - archive/README | 3 - config.yml | 6 - entries/404.twig | 17 --- entries/group.twig | 21 --- entries/impressum.markdown | 20 --- entries/index.markdown | 58 ------- entries/rueckblick.markdown | 65 -------- layouts/default.twig | 79 ---------- layouts/error.twig | 24 --- media/README | 3 - media/img/README | 1 - phr | 1 - plugins/README | 1 - scripts/application.js | 0 scripts/lib/jquery-1.6.2.min.js | 18 --- scripts/lib/modernizr-2.0.6.min.js | 4 - store/2011_CWE/README.mkd | 5 - store/2011_CWE/models/Timestamp_Model.mkd | 133 ---------------- store/README | 2 - styles/style.css | 176 ---------------------- vendor/phrozn | 1 - 22 files changed, 641 deletions(-) delete mode 100644 .gitmodules delete mode 100644 archive/README delete mode 100644 config.yml delete mode 100644 entries/404.twig delete mode 100644 entries/group.twig delete mode 100644 entries/impressum.markdown delete mode 100644 entries/index.markdown delete mode 100644 entries/rueckblick.markdown delete mode 100644 layouts/default.twig delete mode 100644 layouts/error.twig delete mode 100644 media/README delete mode 100644 media/img/README delete mode 120000 phr delete mode 100644 plugins/README delete mode 100644 scripts/application.js delete mode 100644 scripts/lib/jquery-1.6.2.min.js delete mode 100644 scripts/lib/modernizr-2.0.6.min.js delete mode 100644 store/2011_CWE/README.mkd delete mode 100644 store/2011_CWE/models/Timestamp_Model.mkd delete mode 100644 store/README delete mode 100644 styles/style.css delete mode 160000 vendor/phrozn diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 38c8b91..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "vendor/phrozn"] - path = vendor/phrozn - url = git://github.com/farazdagi/phrozn.git diff --git a/archive/README b/archive/README deleted file mode 100644 index 164e26a..0000000 --- a/archive/README +++ /dev/null @@ -1,3 +0,0 @@ -Phrozn treats "archive" and "entries" folders the same way. -The purpose of separate folder is to have less items in entries, thus keeping -it manageable even for sites having many entries. diff --git a/config.yml b/config.yml deleted file mode 100644 index 0c11a85..0000000 --- a/config.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- # Site configuration -entries: - layout: default.twig - -# Files to skip - list of preg expressions is expected -skip: [/\.swp$/, /\.bak$/, /.DS_Store/] diff --git a/entries/404.twig b/entries/404.twig deleted file mode 100644 index 5fbbdae..0000000 --- a/entries/404.twig +++ /dev/null @@ -1,17 +0,0 @@ -layout: error.twig ---- -

Not found :(

-
-

Sorry, but the page you were trying to view does not exist.

-

It looks like this was the result of either:

- -
- - - diff --git a/entries/group.twig b/entries/group.twig deleted file mode 100644 index 7582b33..0000000 --- a/entries/group.twig +++ /dev/null @@ -1,21 +0,0 @@ -layout: default.twig ---- -

PHPUGL

- - -

LSDUG

- - -

Hinweis! Falls ihr nur ein leere Seite seht müsst Ihr euch vorher bei Google einloggen.

diff --git a/entries/impressum.markdown b/entries/impressum.markdown deleted file mode 100644 index 5601812..0000000 --- a/entries/impressum.markdown +++ /dev/null @@ -1,20 +0,0 @@ -layout: default.twig ---- -# Impressum - -PHP User Group Leipzig - -info@phpugl.de - -##Haftungsausschluss: - -###Haftung für Inhalte -Die Inhalte unserer Seiten wurden mit größter Sorgfalt erstellt. Für die Richtigkeit, Vollständigkeit und Aktualität der Inhalte können wir jedoch keine Gewähr übernehmen. Als Diensteanbieter sind wir gemäß § 7 Abs.1 TMG für eigene Inhalte auf diesen Seiten nach den allgemeinen Gesetzen verantwortlich. Nach §§ 8 bis 10 TMG sind wir als Diensteanbieter jedoch nicht verpflichtet, übermittelte oder gespeicherte fremde Informationen zu überwachen oder nach Umständen zu forschen, die auf eine rechtswidrige Tätigkeit hinweisen. Verpflichtungen zur Entfernung oder Sperrung der Nutzung von Informationen nach den allgemeinen Gesetzen bleiben hiervon unberührt. Eine diesbezügliche Haftung ist jedoch erst ab dem Zeitpunkt der Kenntnis einer konkreten Rechtsverletzung möglich. Bei Bekanntwerden von entsprechenden Rechtsverletzungen werden wir diese Inhalte umgehend entfernen. -###Haftung für Links -Unser Angebot enthält Links zu externen Webseiten Dritter, auf deren Inhalte wir keinen Einfluss haben. Deshalb können wir für diese fremden Inhalte auch keine Gewähr übernehmen. Für die Inhalte der verlinkten Seiten ist stets der jeweilige Anbieter oder Betreiber der Seiten verantwortlich. Die verlinkten Seiten wurden zum Zeitpunkt der Verlinkung auf mögliche Rechtsverstöße überprüft. Rechtswidrige Inhalte waren zum Zeitpunkt der Verlinkung nicht erkennbar. Eine permanente inhaltliche Kontrolle der verlinkten Seiten ist jedoch ohne konkrete Anhaltspunkte einer Rechtsverletzung nicht zumutbar. Bei Bekanntwerden von Rechtsverletzungen werden wir derartige Links umgehend entfernen. -###Datenschutz -Die Nutzung unserer Webseite ist in der Regel ohne Angabe personenbezogener Daten möglich. Soweit auf unseren Seiten personenbezogene Daten (beispielsweise Name, Anschrift oder eMail-Adressen) erhoben werden, erfolgt dies, soweit möglich, stets auf freiwilliger Basis. Diese Daten werden ohne Ihre ausdrückliche Zustimmung nicht an Dritte weitergegeben. -Wir weisen darauf hin, dass die Datenübertragung im Internet (z.B. bei der Kommunikation per E-Mail) Sicherheitslücken aufweisen kann. Ein lückenloser Schutz der Daten vor dem Zugriff durch Dritte ist nicht möglich. -Der Nutzung von im Rahmen der Impressumspflicht veröffentlichten Kontaktdaten durch Dritte zur Übersendung von nicht ausdrücklich angeforderter Werbung und Informationsmaterialien wird hiermit ausdrücklich widersprochen. Die Betreiber der Seiten behalten sich ausdrücklich rechtliche Schritte im Falle der unverlangten Zusendung von Werbeinformationen, etwa durch Spam-Mails, vor. - -Quellen: Disclaimer von eRecht24, dem Portal zum Internetrecht von Rechtsanwalt Sören Siebert diff --git a/entries/index.markdown b/entries/index.markdown deleted file mode 100644 index e9f5719..0000000 --- a/entries/index.markdown +++ /dev/null @@ -1,58 +0,0 @@ -layout: default.twig ---- - -# Willkommen - -Die PHP Usergroup Leipzig grüßt alle PHP-Interessierten in und um Leipzig. Wir treffen uns jeden letzten Donnerstag im Monat. -Dadurch soll ein reger Austausch über Neuigkeiten, Fakten und Best Practices in der Entwicklung von und mit PHP geschaffen werden. - -## CWE2011: Symfony2, 12. und 13. November 2011 - -*[Update] von Danilo Kühn – Datum: 10.11.2011* - -Hier die Adressen wo das CWE2011 stattfinden soll. Das Kick-Off Meeting findet um 10 Uhr findet. Dannach werden wir uns in Gruppen aufteilen und die einzelnen Arbeitspakete angehen. - -### 12. November 2011: - - 10:00 Kick-Off Meeting (Vorbereitung der Arbeitspakete) - 11:00 Aufteilung in die Gruppen und Arkeitspakete - .. - open end - -### 13. November 2011 - - Beginn wird am 12. festgelegt - -### Adresse - - Bürogemeinschaft 12345, 3. Stock - Brandvorwerkstr. 52 – 54 - 04275 Leipzig - Deutschland - -*von Danilo Kühn – Datum: 04.11.2011* - -Am 12. und 13. Novemebr finden das Coding-Wochenende (CWE) der PHPUGL statt. Thema der Veranstaltung wird Symfony2 sein. Wir wollen das Framework auf Tauglichkeit prüfen und dessen Funktionsumfang kennenlernen. Dafür wird ein OpenSource-Projekt in Leben gerufen, um das Framework auch praktisch testen zu können. - -Details des Projektes werden beim Kick-Off Meeting am 12. November um 10 Uhr bekannt gegeben. Dabei wollen wir Arbeitspakete erzeugen die dann in kleineren Gruppen abgearbeitet werden sollen. - -Momentan gibt es leider noch ein paar kleiner Probleme mit den Räumlichkeiten aber dieser werden noch rechtzeitig gelöst. Details dazu folgen in den nächsten Tagen. - -Wer jemand Fragen haben sollte, dann lautet die E-Mail [info] - -[info]: mailto:info@phpugl.de - -## Nächstes Treffen: 24. November 2011, 20:30 Uhr - -*von Danilo Kühn – Datum: 04.11.2011* - -Themen: - - Werde noch vorbereitet - -Ort: - - Bürogemeinschaft 12345, 3. Stock - Brandvorwerkstr. 52 – 54 - 04275 Leipzig - Deutschland diff --git a/entries/rueckblick.markdown b/entries/rueckblick.markdown deleted file mode 100644 index 791e6dc..0000000 --- a/entries/rueckblick.markdown +++ /dev/null @@ -1,65 +0,0 @@ -layout: default.twig ---- - -# Rückblick - -## Oktober 2011 - -*von Danilo Kühn – Datum: 24.10.2011* - -Achtung! Das nächste Treffen findet am 27.10.2011 um 20:30 statt. Die Themen werden durch Frank, Tim und mich gestaltet. Frank wird einen kleinen Einblick in Wordpress geben. Weiterhin war Tim auf dem Symfony-Day in Köln und hat dort einen Workshop besucht. Ich selbst werde eine kleines Symfony2-Projekt vorstellen und über das eine oder andere Hinternis reden. Neben den Themen geht es weiter um die Planung zur Codingwochenende, sowie der PHPUGL Gestaltung. - -Themen: - -* Wordpress Einblick (Frank) -* Symfony-Day in Köln (Tim) -* Vorstellung: Symfony2 Projekt (Danilo) -* Vorbereitung des Codingwochenende am 12. und 13. November 2011 - -## September 2011 - -*von Danilo Kühn – Datum: 26.09.2011* - -Bei diesem Treffen werde ich das Framework [Silex] vorstellen und eine kleine Anwendung damit erzeugen um die Fähigkeiten zu präsentieren. Weiterhin werden wir die Planungen zum Coding-Wochenende vorantreiben und uns über das Model gedanken machen. Wer mehr zum Coding Wochenende mit Symfony2 erfahren will, sollte einfach vorbei schauen. - -Themen: - -* Twittern mit Silex -* Vorbereitung CWE (Coding-Wochenende) -* Was wird der Symfony Day in Köln bringen? - -[Silex]: http://silex.sensiolabs.org/ - -## August 2011 - -*von Danilo Kühn / Tim Heil – Datum: 23.08.11* - -Die PHP Usergroup Leipzig lädt herzlich alle PHP Interessierten zum Treffen am 25.08.2011 ein. Das Treffen soll einen regen Austausch über Neuigkeiten, Fakten und Best Practices in der Programmierung mit PHP schaffen. - -Wenn das Wetter mitspielt, wollen wir das Ganze ins Freie verlegen. Dazu wird am Mittwoch vorher noch mal eine Info (Twitter: [@phpugl]) kommen, wo wir uns dann treffen werden. Im Regenfall bleibt die angegebene Adresse. - -Einige Themen: - -* Symfony2 / Vorbereitung Weekend-Hacking Event -* API Leipzig -* Logging in PHP - -[@phpugl]: http://www.twitter.com/phpugl - -**[Update]** *von Danilo Kühn – Datum: 25.08.11* - -Aufgrund des schönen Wetters heute werden wir uns im [Acapulco], Karl-Liebknecht-Straße 42, 04107 Leipzig treffen. Tisch ist reserviert. Also dann bis heute abend. - -[Acapulco]: http://g.co/maps/58vm - -## Juli 2011 - -*von Tim Heil – Datum: 28.07.11* - -Das zur Zeit vielleicht schönste Projekt nebenher: [Phrozn]. Auch als Webentwickler sind viele von uns ja wenig davon angetan, längere Texte im Browser zu schreiben. Phrozn generiert aus einfachen Textdateien fertige Webseiten. Im eigenen Editor schreiben, den Generator (der auch Komponenten aus dem Zend Framework sowie von Symfony2 verwendet) anpassen – ganz nach unserem Geschmack. Also gibt es demnächst wohl auch einen Feed zum Abonnieren unserer Seite, oder die eine oder andere Navigationshilfe für die nun langsam ins Rollen kommende Seite. - -A propos Symfony2: auch hier endet der Juli ereignisreich. Das [Release] von Symfony2 schlägt große [Wellen] in der Community. Auch in der PHP Usergroup in Leipzig, die 2009 als Symfony und Doctrine User Group startete, ist Symfony2 präsent. So wird es wohl im Oktober ein gemeinsames Coding-Wochenende mit Symfony2 geben. Ideen dazu können wir beim nächsten Treffen besprechen: am Donnerstag, *25. August*, 19:30 Uhr in der Bürogemeinschaft 12345, Brandvorwerkstr. 52 – 54 in 04275 Leipzig. - -[Phrozn]: http://www.phrozn.info/ -[Release]: http://symfony.com/blog/symfony-2-0 -[Wellen]: http://symfony.com/blog/symfony2-launch-parties diff --git a/layouts/default.twig b/layouts/default.twig deleted file mode 100644 index 8afb2bd..0000000 --- a/layouts/default.twig +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - PHPUGL - PHP UserGroup Leipzig - - - - - - - - - - - - - - - - - - - - - - - -
-
- - -
-
- {{ content }} -
-
- [PHPUGL] PHP UserGroup Leipzig -
-
- - - - - - - - - - - - diff --git a/layouts/error.twig b/layouts/error.twig deleted file mode 100644 index 38000d1..0000000 --- a/layouts/error.twig +++ /dev/null @@ -1,24 +0,0 @@ - - - - - PHPUGL - Page not found - - - -
- {{content}} -
- - diff --git a/media/README b/media/README deleted file mode 100644 index 0c0bc4e..0000000 --- a/media/README +++ /dev/null @@ -1,3 +0,0 @@ -Any binary data such as images, flash, and videos. -You can create subfolders for distinct media types - see "img" folder for images. - diff --git a/media/img/README b/media/img/README deleted file mode 100644 index 3433468..0000000 --- a/media/img/README +++ /dev/null @@ -1 +0,0 @@ -image data diff --git a/phr b/phr deleted file mode 120000 index 04a6bfb..0000000 --- a/phr +++ /dev/null @@ -1 +0,0 @@ -vendor/phrozn/bin/phrozn.php \ No newline at end of file diff --git a/plugins/README b/plugins/README deleted file mode 100644 index 27d247f..0000000 --- a/plugins/README +++ /dev/null @@ -1 +0,0 @@ -Phrozn plugins diff --git a/scripts/application.js b/scripts/application.js deleted file mode 100644 index e69de29..0000000 diff --git a/scripts/lib/jquery-1.6.2.min.js b/scripts/lib/jquery-1.6.2.min.js deleted file mode 100644 index 48590ec..0000000 --- a/scripts/lib/jquery-1.6.2.min.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! - * jQuery JavaScript Library v1.6.2 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Thu Jun 30 14:16:56 2011 -0400 - */ -(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"":"")+""),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]||i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=w:v&&c!=="className"&&(f.nodeName(a,"form")||u.test(c))&&(i=v)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}},value:{get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return f.prop(a,c)?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.attrHooks.title=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i. -shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function(c){var d=c.target,e,g;if(!!y.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=I(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};bf.optgroup=bf.option,bf.tbody=bf.tfoot=bf.colgroup=bf.caption=bf.thead,bf.th=bf.td,f.support.htmlSerialize||(bf._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!bf[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j -)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!ba.test(k))k=b.createTextNode(k);else{k=k.replace(Z,"<$1>");var l=($.exec(k)||["",""])[1].toLowerCase(),m=bf[l]||bf._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=_.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Y.test(k)&&o.insertBefore(b.createTextNode(Y.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bo.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bn.test(g)?g.replace(bn,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bB=/%20/g,bC=/\[\]$/,bD=/\r?\n/g,bE=/#.*$/,bF=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bG=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bH=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bI=/^(?:GET|HEAD)$/,bJ=/^\/\//,bK=/\?/,bL=/)<[^<]*)*<\/script>/gi,bM=/^(?:select|textarea)/i,bN=/\s+/,bO=/([?&])_=[^&]*/,bP=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bQ=f.fn.load,bR={},bS={},bT,bU;try{bT=e.href}catch(bV){bT=c.createElement("a"),bT.href="",bT=bT.href}bU=bP.exec(bT.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bQ)return bQ.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bL,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bM.test(this.nodeName)||bG.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bD,"\r\n")}}):{name:b.name,value:c.replace(bD,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bT,isLocal:bH.test(bU[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bW(bR),ajaxTransport:bW(bS),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?bZ(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b$(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bF.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bE,"").replace(bJ,bU[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bN),d.crossDomain==null&&(r=bP.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bU[1]&&r[2]==bU[2]&&(r[3]||(r[1]==="http:"?80:443))==(bU[3]||(bU[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bX(bR,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bI.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bK.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bO,"$1_="+x);d.url=y+(y===d.url?(bK.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bX(bS,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bB,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn,co=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cr("show",3),a,b,c);for(var g=0,h=this.length;g=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b
";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cu.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cu.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cv(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cv(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file diff --git a/scripts/lib/modernizr-2.0.6.min.js b/scripts/lib/modernizr-2.0.6.min.js deleted file mode 100644 index 4f00b71..0000000 --- a/scripts/lib/modernizr-2.0.6.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/* Modernizr 2.0.6 | MIT & BSD - * Contains: All core tests, html5shiv, yepnope, respond.js. Get your own custom build at www.modernizr.com/download/ - */ -;window.Modernizr=function(a,b,c){function I(){e.input=function(a){for(var b=0,c=a.length;b",a,""].join(""),k.id=i,k.innerHTML+=f,g.appendChild(k),h=c(k,a),k.parentNode.removeChild(k);return!!h},w=function(b){if(a.matchMedia)return matchMedia(b).matches;var c;v("@media "+b+" { #"+i+" { position: absolute; } }",function(b){c=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).position=="absolute"});return c},x=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=D(e[d],"function"),D(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),y,z={}.hasOwnProperty,A;!D(z,c)&&!D(z.call,c)?A=function(a,b){return z.call(a,b)}:A=function(a,b){return b in a&&D(a.constructor.prototype[b],c)};var H=function(c,d){var f=c.join(""),g=d.length;v(f,function(c,d){var f=b.styleSheets[b.styleSheets.length-1],h=f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"",i=c.childNodes,j={};while(g--)j[i[g].id]=i[g];e.touch="ontouchstart"in a||j.touch.offsetTop===9,e.csstransforms3d=j.csstransforms3d.offsetLeft===9,e.generatedcontent=j.generatedcontent.offsetHeight>=1,e.fontface=/src/i.test(h)&&h.indexOf(d.split(" ")[0])===0},g,d)}(['@font-face {font-family:"font";src:url("https://")}',["@media (",o.join("touch-enabled),("),i,")","{#touch{top:9px;position:absolute}}"].join(""),["@media (",o.join("transform-3d),("),i,")","{#csstransforms3d{left:9px;position:absolute}}"].join(""),['#generatedcontent:after{content:"',m,'";visibility:hidden}'].join("")],["fontface","touch","csstransforms3d","generatedcontent"]);r.flexbox=function(){function c(a,b,c,d){a.style.cssText=o.join(b+":"+c+";")+(d||"")}function a(a,b,c,d){b+=":",a.style.cssText=(b+o.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");a(d,"display","box","width:42px;padding:0;"),c(e,"box-flex","1","width:10px;"),d.appendChild(e),g.appendChild(d);var f=e.offsetWidth===42;d.removeChild(e),g.removeChild(d);return f},r.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},r.canvastext=function(){return!!e.canvas&&!!D(b.createElement("canvas").getContext("2d").fillText,"function")},r.webgl=function(){return!!a.WebGLRenderingContext},r.touch=function(){return e.touch},r.geolocation=function(){return!!navigator.geolocation},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){var b=!!a.openDatabase;return b},r.indexedDB=function(){for(var b=-1,c=p.length;++b7)},r.history=function(){return!!a.history&&!!history.pushState},r.draganddrop=function(){return x("dragstart")&&x("drop")},r.websockets=function(){for(var b=-1,c=p.length;++b";return(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"clipPath")))};for(var J in r)A(r,J)&&(y=J.toLowerCase(),e[y]=r[J](),u.push((e[y]?"":"no-")+y));e.input||I(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)A(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return;b=typeof b=="boolean"?b:!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b}return e},B(""),j=l=null,a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="";return a.childNodes.length!==1}()&&function(a,b){function s(a){var b=-1;while(++b=u.minw)&&(!u.maxw||u.maxw&&l<=u.maxw))m[u.media]||(m[u.media]=[]),m[u.media].push(f[u.rules])}for(var t in g)g[t]&&g[t].parentNode===j&&j.removeChild(g[t]);for(var t in m){var v=c.createElement("style"),w=m[t].join("\n");v.type="text/css",v.media=t,v.styleSheet?v.styleSheet.cssText=w:v.appendChild(c.createTextNode(w)),n.appendChild(v),g.push(v)}j.insertBefore(n,o.nextSibling)}},s=function(a,b){var c=t();if(!!c){c.open("GET",a,!0),c.onreadystatechange=function(){c.readyState==4&&(c.status==200||c.status==304)&&b(c.responseText)};if(c.readyState==4)return;c.send()}},t=function(){var a=!1,b=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new XMLHttpRequest}],c=b.length;while(c--){try{a=b[c]()}catch(d){continue}break}return function(){return a}}();m(),respond.update=m,a.addEventListener?a.addEventListener("resize",u,!1):a.attachEvent&&a.attachEvent("onresize",u)}}(this,Modernizr.mq("only all")),function(a,b,c){function k(a){return!a||a=="loaded"||a=="complete"}function j(){var a=1,b=-1;while(p.length- ++b)if(p[b].s&&!(a=p[b].r))break;a&&g()}function i(a){var c=b.createElement("script"),d;c.src=a.s,c.onreadystatechange=c.onload=function(){!d&&k(c.readyState)&&(d=1,j(),c.onload=c.onreadystatechange=null)},m(function(){d||(d=1,j())},H.errorTimeout),a.e?c.onload():n.parentNode.insertBefore(c,n)}function h(a){var c=b.createElement("link"),d;c.href=a.s,c.rel="stylesheet",c.type="text/css";if(!a.e&&(w||r)){var e=function(a){m(function(){if(!d)try{a.sheet.cssRules.length?(d=1,j()):e(a)}catch(b){b.code==1e3||b.message=="security"||b.message=="denied"?(d=1,m(function(){j()},0)):e(a)}},0)};e(c)}else c.onload=function(){d||(d=1,m(function(){j()},0))},a.e&&c.onload();m(function(){d||(d=1,j())},H.errorTimeout),!a.e&&n.parentNode.insertBefore(c,n)}function g(){var a=p.shift();q=1,a?a.t?m(function(){a.t=="c"?h(a):i(a)},0):(a(),j()):q=0}function f(a,c,d,e,f,h){function i(){!o&&k(l.readyState)&&(r.r=o=1,!q&&j(),l.onload=l.onreadystatechange=null,m(function(){u.removeChild(l)},0))}var l=b.createElement(a),o=0,r={t:d,s:c,e:h};l.src=l.data=c,!s&&(l.style.display="none"),l.width=l.height="0",a!="object"&&(l.type=d),l.onload=l.onreadystatechange=i,a=="img"?l.onerror=i:a=="script"&&(l.onerror=function(){r.e=r.r=1,g()}),p.splice(e,0,r),u.insertBefore(l,s?null:n),m(function(){o||(u.removeChild(l),r.r=r.e=o=1,j())},H.errorTimeout)}function e(a,b,c){var d=b=="c"?z:y;q=0,b=b||"j",C(a)?f(d,a,b,this.i++,l,c):(p.splice(this.i++,0,a),p.length==1&&g());return this}function d(){var a=H;a.loader={load:e,i:0};return a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=r&&!s,u=s?l:n.parentNode,v=a.opera&&o.call(a.opera)=="[object Opera]",w="webkitAppearance"in l.style,x=w&&"async"in b.createElement("script"),y=r?"object":v||x?"img":"script",z=w?"img":y,A=Array.isArray||function(a){return o.call(a)=="[object Array]"},B=function(a){return Object(a)===a},C=function(a){return typeof a=="string"},D=function(a){return o.call(a)=="[object Function]"},E=[],F={},G,H;H=function(a){function f(a){var b=a.split("!"),c=E.length,d=b.pop(),e=b.length,f={url:d,origUrl:d,prefixes:b},g,h;for(h=0;h Date: Fri, 18 Nov 2011 10:05:04 +0100 Subject: [PATCH 002/352] add piecrust will be changed later into a gitmodule --- _piecrust/chef | 16 + _piecrust/chef.cmd | 23 + _piecrust/chef.php | 6 + _piecrust/libs/Console/CommandLine.php | 1244 +++++ _piecrust/libs/Console/CommandLine/Action.php | 142 + .../Console/CommandLine/Action/Callback.php | 80 + .../Console/CommandLine/Action/Counter.php | 86 + .../libs/Console/CommandLine/Action/Help.php | 60 + .../libs/Console/CommandLine/Action/List.php | 73 + .../Console/CommandLine/Action/Password.php | 90 + .../Console/CommandLine/Action/StoreArray.php | 78 + .../Console/CommandLine/Action/StoreFalse.php | 64 + .../Console/CommandLine/Action/StoreFloat.php | 76 + .../Console/CommandLine/Action/StoreInt.php | 76 + .../CommandLine/Action/StoreString.php | 62 + .../Console/CommandLine/Action/StoreTrue.php | 63 + .../Console/CommandLine/Action/Version.php | 60 + .../libs/Console/CommandLine/Argument.php | 89 + .../libs/Console/CommandLine/Command.php | 76 + .../CommandLine/CustomMessageProvider.php | 66 + .../libs/Console/CommandLine/Element.php | 144 + .../libs/Console/CommandLine/Exception.php | 97 + .../Console/CommandLine/MessageProvider.php | 56 + .../CommandLine/MessageProvider/Default.php | 151 + _piecrust/libs/Console/CommandLine/Option.php | 373 ++ .../libs/Console/CommandLine/Outputter.php | 63 + .../Console/CommandLine/Outputter/Default.php | 82 + .../libs/Console/CommandLine/Renderer.php | 71 + .../Console/CommandLine/Renderer/Default.php | 417 ++ _piecrust/libs/Console/CommandLine/Result.php | 71 + .../libs/Console/CommandLine/XmlParser.php | 305 ++ _piecrust/libs/Dwoo/CHANGELOG | 508 ++ _piecrust/libs/Dwoo/Dwoo.compiled.php | 1 + _piecrust/libs/Dwoo/Dwoo.php | 1533 ++++++ .../Dwoo/Dwoo/Adapters/Agavi/DwooRenderer.php | 196 + .../libs/Dwoo/Dwoo/Adapters/Agavi/README | 27 + .../Dwoo/Adapters/Agavi/dwoo_plugins/t.php | 32 + .../Dwoo/Adapters/Agavi/dwoo_plugins/url.php | 54 + .../libs/Dwoo/Dwoo/Adapters/CakePHP/README | 33 + .../libs/Dwoo/Dwoo/Adapters/CakePHP/dwoo.php | 143 + .../Dwoo/Dwoo/Adapters/CodeIgniter/README | 36 + .../CodeIgniter/config/dwootemplate.php | 12 + .../CodeIgniter/controllers/dwoowelcome.php | 16 + .../CodeIgniter/libraries/Dwootemplate.php | 172 + .../CodeIgniter/views/dwoowelcome.tpl | 31 + .../Dwoo/Adapters/CodeIgniter/views/page.tpl | 57 + .../Adapters/ZendFramework/PluginProxy.php | 96 + .../Dwoo/Dwoo/Adapters/ZendFramework/README | 32 + .../Dwoo/Dwoo/Adapters/ZendFramework/View.php | 512 ++ _piecrust/libs/Dwoo/Dwoo/Block/Plugin.php | 103 + .../libs/Dwoo/Dwoo/Compilation/Exception.php | 38 + _piecrust/libs/Dwoo/Dwoo/Compiler.php | 3086 +++++++++++ _piecrust/libs/Dwoo/Dwoo/Data.php | 250 + _piecrust/libs/Dwoo/Dwoo/Exception.php | 19 + _piecrust/libs/Dwoo/Dwoo/Filter.php | 44 + _piecrust/libs/Dwoo/Dwoo/ICompilable.php | 26 + .../libs/Dwoo/Dwoo/ICompilable/Block.php | 21 + _piecrust/libs/Dwoo/Dwoo/ICompiler.php | 49 + _piecrust/libs/Dwoo/Dwoo/IDataProvider.php | 25 + _piecrust/libs/Dwoo/Dwoo/IElseable.php | 24 + _piecrust/libs/Dwoo/Dwoo/ILoader.php | 30 + _piecrust/libs/Dwoo/Dwoo/IPluginProxy.php | 65 + _piecrust/libs/Dwoo/Dwoo/ITemplate.php | 150 + _piecrust/libs/Dwoo/Dwoo/Loader.php | 147 + _piecrust/libs/Dwoo/Dwoo/Plugin.php | 85 + _piecrust/libs/Dwoo/Dwoo/Processor.php | 44 + .../libs/Dwoo/Dwoo/Security/Exception.php | 19 + _piecrust/libs/Dwoo/Dwoo/Security/Policy.php | 199 + _piecrust/libs/Dwoo/Dwoo/Smarty/Adapter.php | 518 ++ _piecrust/libs/Dwoo/Dwoo/Template/File.php | 270 + _piecrust/libs/Dwoo/Dwoo/Template/String.php | 497 ++ _piecrust/libs/Dwoo/LICENSE | 25 + _piecrust/libs/Dwoo/README | 79 + _piecrust/libs/Dwoo/UPGRADE_NOTES | 65 + _piecrust/libs/Dwoo/dwooAutoload.php | 12 + .../libs/Dwoo/plugins/builtin/blocks/a.php | 67 + .../plugins/builtin/blocks/auto_escape.php | 61 + .../Dwoo/plugins/builtin/blocks/block.php | 34 + .../Dwoo/plugins/builtin/blocks/capture.php | 61 + .../Dwoo/plugins/builtin/blocks/dynamic.php | 65 + .../libs/Dwoo/plugins/builtin/blocks/else.php | 63 + .../Dwoo/plugins/builtin/blocks/elseif.php | 60 + .../libs/Dwoo/plugins/builtin/blocks/for.php | 147 + .../Dwoo/plugins/builtin/blocks/foreach.php | 152 + .../plugins/builtin/blocks/foreachelse.php | 43 + .../Dwoo/plugins/builtin/blocks/forelse.php | 43 + .../libs/Dwoo/plugins/builtin/blocks/if.php | 180 + .../libs/Dwoo/plugins/builtin/blocks/loop.php | 128 + .../Dwoo/plugins/builtin/blocks/section.php | 131 + .../builtin/blocks/smartyinterface.php | 59 + .../Dwoo/plugins/builtin/blocks/strip.php | 50 + .../Dwoo/plugins/builtin/blocks/template.php | 88 + .../plugins/builtin/blocks/textformat.php | 94 + .../plugins/builtin/blocks/topLevelBlock.php | 32 + .../libs/Dwoo/plugins/builtin/blocks/with.php | 76 + .../Dwoo/plugins/builtin/blocks/withelse.php | 43 + .../plugins/builtin/filters/html_format.php | 175 + .../Dwoo/plugins/builtin/functions/assign.php | 23 + .../plugins/builtin/functions/capitalize.php | 38 + .../Dwoo/plugins/builtin/functions/cat.php | 22 + .../builtin/functions/count_characters.php | 27 + .../builtin/functions/count_paragraphs.php | 22 + .../builtin/functions/count_sentences.php | 22 + .../plugins/builtin/functions/count_words.php | 22 + .../plugins/builtin/functions/counter.php | 76 + .../Dwoo/plugins/builtin/functions/cycle.php | 68 + .../plugins/builtin/functions/date_format.php | 54 + .../plugins/builtin/functions/default.php | 23 + .../Dwoo/plugins/builtin/functions/dump.php | 173 + .../Dwoo/plugins/builtin/functions/eol.php | 20 + .../Dwoo/plugins/builtin/functions/escape.php | 61 + .../Dwoo/plugins/builtin/functions/eval.php | 41 + .../plugins/builtin/functions/extends.php | 134 + .../builtin/functions/extendsCheck.php | 52 + .../Dwoo/plugins/builtin/functions/fetch.php | 50 + .../plugins/builtin/functions/include.php | 77 + .../Dwoo/plugins/builtin/functions/indent.php | 24 + .../Dwoo/plugins/builtin/functions/isset.php | 22 + .../builtin/functions/load_templates.php | 74 + .../Dwoo/plugins/builtin/functions/lower.php | 22 + .../Dwoo/plugins/builtin/functions/mailto.php | 117 + .../Dwoo/plugins/builtin/functions/math.php | 130 + .../Dwoo/plugins/builtin/functions/nl2br.php | 22 + .../plugins/builtin/functions/optional.php | 23 + .../builtin/functions/regex_replace.php | 38 + .../plugins/builtin/functions/replace.php | 28 + .../plugins/builtin/functions/reverse.php | 34 + .../Dwoo/plugins/builtin/functions/safe.php | 22 + .../plugins/builtin/functions/spacify.php | 23 + .../builtin/functions/string_format.php | 23 + .../plugins/builtin/functions/strip_tags.php | 27 + .../Dwoo/plugins/builtin/functions/tif.php | 74 + .../plugins/builtin/functions/truncate.php | 45 + .../Dwoo/plugins/builtin/functions/upper.php | 22 + .../plugins/builtin/functions/whitespace.php | 33 + .../plugins/builtin/functions/wordwrap.php | 25 + .../Dwoo/plugins/builtin/helper.array.php | 38 + .../builtin/processors/pre.smarty_compat.php | 73 + _piecrust/libs/Geshi/contrib/aliased.php | 124 + _piecrust/libs/Geshi/contrib/cssgen.php | 456 ++ _piecrust/libs/Geshi/contrib/cssgen2.php | 59 + _piecrust/libs/Geshi/contrib/example.php | 217 + _piecrust/libs/Geshi/contrib/langcheck.php | 766 +++ _piecrust/libs/Geshi/geshi.php | 4755 +++++++++++++++++ _piecrust/libs/Geshi/geshi/4cs.php | 139 + _piecrust/libs/Geshi/geshi/6502acme.php | 230 + _piecrust/libs/Geshi/geshi/6502kickass.php | 241 + _piecrust/libs/Geshi/geshi/6502tasm.php | 189 + _piecrust/libs/Geshi/geshi/68000devpac.php | 168 + _piecrust/libs/Geshi/geshi/abap.php | 1409 +++++ _piecrust/libs/Geshi/geshi/actionscript.php | 197 + _piecrust/libs/Geshi/geshi/actionscript3.php | 473 ++ _piecrust/libs/Geshi/geshi/ada.php | 135 + _piecrust/libs/Geshi/geshi/algol68.php | 226 + _piecrust/libs/Geshi/geshi/apache.php | 480 ++ _piecrust/libs/Geshi/geshi/applescript.php | 157 + _piecrust/libs/Geshi/geshi/apt_sources.php | 144 + _piecrust/libs/Geshi/geshi/asm.php | 225 + _piecrust/libs/Geshi/geshi/asp.php | 164 + _piecrust/libs/Geshi/geshi/autoconf.php | 512 ++ _piecrust/libs/Geshi/geshi/autohotkey.php | 373 ++ _piecrust/libs/Geshi/geshi/autoit.php | 1175 ++++ _piecrust/libs/Geshi/geshi/avisynth.php | 194 + _piecrust/libs/Geshi/geshi/awk.php | 158 + _piecrust/libs/Geshi/geshi/bash.php | 327 ++ _piecrust/libs/Geshi/geshi/basic4gl.php | 341 ++ _piecrust/libs/Geshi/geshi/bf.php | 114 + _piecrust/libs/Geshi/geshi/bibtex.php | 183 + _piecrust/libs/Geshi/geshi/blitzbasic.php | 185 + _piecrust/libs/Geshi/geshi/bnf.php | 119 + _piecrust/libs/Geshi/geshi/boo.php | 217 + _piecrust/libs/Geshi/geshi/c.php | 202 + _piecrust/libs/Geshi/geshi/c_mac.php | 227 + _piecrust/libs/Geshi/geshi/caddcl.php | 126 + _piecrust/libs/Geshi/geshi/cadlisp.php | 186 + _piecrust/libs/Geshi/geshi/cfdg.php | 124 + _piecrust/libs/Geshi/geshi/cfm.php | 299 ++ _piecrust/libs/Geshi/geshi/chaiscript.php | 140 + _piecrust/libs/Geshi/geshi/cil.php | 196 + _piecrust/libs/Geshi/geshi/clojure.php | 134 + _piecrust/libs/Geshi/geshi/cmake.php | 181 + _piecrust/libs/Geshi/geshi/cobol.php | 244 + _piecrust/libs/Geshi/geshi/cpp-qt.php | 564 ++ _piecrust/libs/Geshi/geshi/cpp.php | 240 + _piecrust/libs/Geshi/geshi/csharp.php | 253 + _piecrust/libs/Geshi/geshi/css.php | 212 + _piecrust/libs/Geshi/geshi/cuesheet.php | 138 + _piecrust/libs/Geshi/geshi/d.php | 272 + _piecrust/libs/Geshi/geshi/dcs.php | 182 + _piecrust/libs/Geshi/geshi/delphi.php | 289 + _piecrust/libs/Geshi/geshi/diff.php | 196 + _piecrust/libs/Geshi/geshi/div.php | 126 + _piecrust/libs/Geshi/geshi/dos.php | 227 + _piecrust/libs/Geshi/geshi/dot.php | 164 + _piecrust/libs/Geshi/geshi/e.php | 208 + _piecrust/libs/Geshi/geshi/ecmascript.php | 210 + _piecrust/libs/Geshi/geshi/eiffel.php | 395 ++ _piecrust/libs/Geshi/geshi/email.php | 210 + _piecrust/libs/Geshi/geshi/erlang.php | 441 ++ _piecrust/libs/Geshi/geshi/f1.php | 151 + _piecrust/libs/Geshi/geshi/fo.php | 327 ++ _piecrust/libs/Geshi/geshi/fortran.php | 160 + _piecrust/libs/Geshi/geshi/freebasic.php | 141 + _piecrust/libs/Geshi/geshi/fsharp.php | 211 + _piecrust/libs/Geshi/geshi/gambas.php | 214 + _piecrust/libs/Geshi/geshi/gdb.php | 175 + _piecrust/libs/Geshi/geshi/genero.php | 463 ++ _piecrust/libs/Geshi/geshi/genie.php | 157 + _piecrust/libs/Geshi/geshi/gettext.php | 97 + _piecrust/libs/Geshi/geshi/glsl.php | 205 + _piecrust/libs/Geshi/geshi/gml.php | 506 ++ _piecrust/libs/Geshi/geshi/gnuplot.php | 296 + _piecrust/libs/Geshi/geshi/go.php | 396 ++ _piecrust/libs/Geshi/geshi/groovy.php | 1011 ++++ _piecrust/libs/Geshi/geshi/gwbasic.php | 153 + _piecrust/libs/Geshi/geshi/haskell.php | 202 + _piecrust/libs/Geshi/geshi/hicest.php | 108 + _piecrust/libs/Geshi/geshi/hq9plus.php | 104 + _piecrust/libs/Geshi/geshi/html4strict.php | 203 + _piecrust/libs/Geshi/geshi/icon.php | 212 + _piecrust/libs/Geshi/geshi/idl.php | 123 + _piecrust/libs/Geshi/geshi/ini.php | 128 + _piecrust/libs/Geshi/geshi/inno.php | 212 + _piecrust/libs/Geshi/geshi/intercal.php | 122 + _piecrust/libs/Geshi/geshi/io.php | 138 + _piecrust/libs/Geshi/geshi/j.php | 227 + _piecrust/libs/Geshi/geshi/java.php | 983 ++++ _piecrust/libs/Geshi/geshi/java5.php | 1037 ++++ _piecrust/libs/Geshi/geshi/javascript.php | 150 + _piecrust/libs/Geshi/geshi/jquery.php | 238 + _piecrust/libs/Geshi/geshi/kixtart.php | 329 ++ _piecrust/libs/Geshi/geshi/klonec.php | 282 + _piecrust/libs/Geshi/geshi/klonecpp.php | 310 ++ _piecrust/libs/Geshi/geshi/latex.php | 223 + _piecrust/libs/Geshi/geshi/lb.php | 158 + _piecrust/libs/Geshi/geshi/lisp.php | 144 + _piecrust/libs/Geshi/geshi/locobasic.php | 130 + _piecrust/libs/Geshi/geshi/logtalk.php | 330 ++ _piecrust/libs/Geshi/geshi/lolcode.php | 152 + _piecrust/libs/Geshi/geshi/lotusformulas.php | 318 ++ _piecrust/libs/Geshi/geshi/lotusscript.php | 191 + _piecrust/libs/Geshi/geshi/lscript.php | 387 ++ _piecrust/libs/Geshi/geshi/lsl2.php | 898 ++++ _piecrust/libs/Geshi/geshi/lua.php | 137 + _piecrust/libs/Geshi/geshi/m68k.php | 143 + _piecrust/libs/Geshi/geshi/magiksf.php | 193 + _piecrust/libs/Geshi/geshi/make.php | 151 + _piecrust/libs/Geshi/geshi/mapbasic.php | 908 ++++ _piecrust/libs/Geshi/geshi/matlab.php | 227 + _piecrust/libs/Geshi/geshi/mirc.php | 171 + _piecrust/libs/Geshi/geshi/mmix.php | 173 + _piecrust/libs/Geshi/geshi/modula2.php | 136 + _piecrust/libs/Geshi/geshi/modula3.php | 135 + _piecrust/libs/Geshi/geshi/mpasm.php | 164 + _piecrust/libs/Geshi/geshi/mxml.php | 145 + _piecrust/libs/Geshi/geshi/mysql.php | 475 ++ _piecrust/libs/Geshi/geshi/newlisp.php | 191 + _piecrust/libs/Geshi/geshi/nsis.php | 351 ++ _piecrust/libs/Geshi/geshi/oberon2.php | 135 + _piecrust/libs/Geshi/geshi/objc.php | 358 ++ _piecrust/libs/Geshi/geshi/objeck.php | 114 + _piecrust/libs/Geshi/geshi/ocaml-brief.php | 112 + _piecrust/libs/Geshi/geshi/ocaml.php | 187 + _piecrust/libs/Geshi/geshi/oobas.php | 135 + _piecrust/libs/Geshi/geshi/oracle11.php | 614 +++ _piecrust/libs/Geshi/geshi/oracle8.php | 496 ++ _piecrust/libs/Geshi/geshi/oxygene.php | 152 + _piecrust/libs/Geshi/geshi/oz.php | 144 + _piecrust/libs/Geshi/geshi/pascal.php | 152 + _piecrust/libs/Geshi/geshi/pcre.php | 188 + _piecrust/libs/Geshi/geshi/per.php | 302 ++ _piecrust/libs/Geshi/geshi/perl.php | 213 + _piecrust/libs/Geshi/geshi/perl6.php | 197 + _piecrust/libs/Geshi/geshi/pf.php | 178 + _piecrust/libs/Geshi/geshi/php-brief.php | 222 + _piecrust/libs/Geshi/geshi/php.php | 1114 ++++ _piecrust/libs/Geshi/geshi/pic16.php | 141 + _piecrust/libs/Geshi/geshi/pike.php | 103 + _piecrust/libs/Geshi/geshi/pixelbender.php | 176 + _piecrust/libs/Geshi/geshi/plsql.php | 256 + _piecrust/libs/Geshi/geshi/postgresql.php | 288 + _piecrust/libs/Geshi/geshi/povray.php | 199 + _piecrust/libs/Geshi/geshi/powerbuilder.php | 418 ++ _piecrust/libs/Geshi/geshi/powershell.php | 277 + _piecrust/libs/Geshi/geshi/progress.php | 485 ++ _piecrust/libs/Geshi/geshi/prolog.php | 143 + _piecrust/libs/Geshi/geshi/properties.php | 127 + _piecrust/libs/Geshi/geshi/providex.php | 299 ++ _piecrust/libs/Geshi/geshi/purebasic.php | 303 ++ _piecrust/libs/Geshi/geshi/python.php | 237 + _piecrust/libs/Geshi/geshi/q.php | 149 + _piecrust/libs/Geshi/geshi/qbasic.php | 158 + _piecrust/libs/Geshi/geshi/rails.php | 406 ++ _piecrust/libs/Geshi/geshi/rebol.php | 196 + _piecrust/libs/Geshi/geshi/reg.php | 233 + _piecrust/libs/Geshi/geshi/robots.php | 100 + _piecrust/libs/Geshi/geshi/rpmspec.php | 133 + _piecrust/libs/Geshi/geshi/rsplus.php | 483 ++ _piecrust/libs/Geshi/geshi/ruby.php | 231 + _piecrust/libs/Geshi/geshi/sas.php | 290 + _piecrust/libs/Geshi/geshi/scala.php | 122 + _piecrust/libs/Geshi/geshi/scheme.php | 170 + _piecrust/libs/Geshi/geshi/scilab.php | 295 + _piecrust/libs/Geshi/geshi/sdlbasic.php | 165 + _piecrust/libs/Geshi/geshi/smalltalk.php | 154 + _piecrust/libs/Geshi/geshi/smarty.php | 192 + _piecrust/libs/Geshi/geshi/sql.php | 165 + _piecrust/libs/Geshi/geshi/systemverilog.php | 317 ++ _piecrust/libs/Geshi/geshi/tcl.php | 194 + _piecrust/libs/Geshi/geshi/teraterm.php | 317 ++ _piecrust/libs/Geshi/geshi/text.php | 84 + _piecrust/libs/Geshi/geshi/thinbasic.php | 868 +++ _piecrust/libs/Geshi/geshi/tsql.php | 375 ++ _piecrust/libs/Geshi/geshi/typoscript.php | 300 ++ _piecrust/libs/Geshi/geshi/unicon.php | 210 + _piecrust/libs/Geshi/geshi/vala.php | 151 + _piecrust/libs/Geshi/geshi/vb.php | 157 + _piecrust/libs/Geshi/geshi/vbnet.php | 201 + _piecrust/libs/Geshi/geshi/verilog.php | 173 + _piecrust/libs/Geshi/geshi/vhdl.php | 144 + _piecrust/libs/Geshi/geshi/vim.php | 420 ++ _piecrust/libs/Geshi/geshi/visualfoxpro.php | 456 ++ _piecrust/libs/Geshi/geshi/visualprolog.php | 129 + _piecrust/libs/Geshi/geshi/whitespace.php | 121 + _piecrust/libs/Geshi/geshi/whois.php | 181 + _piecrust/libs/Geshi/geshi/winbatch.php | 369 ++ _piecrust/libs/Geshi/geshi/xbasic.php | 144 + _piecrust/libs/Geshi/geshi/xml.php | 157 + _piecrust/libs/Geshi/geshi/xorg_conf.php | 124 + _piecrust/libs/Geshi/geshi/xpp.php | 436 ++ _piecrust/libs/Geshi/geshi/z80.php | 144 + _piecrust/libs/Geshi/geshi/zxbasic.php | 150 + _piecrust/libs/LessPhp/LICENSE | 660 +++ _piecrust/libs/LessPhp/README.md | 59 + _piecrust/libs/LessPhp/lessc.inc.php | 1900 +++++++ _piecrust/libs/LessPhp/lessify | 23 + _piecrust/libs/LessPhp/lessify.inc.php | 443 ++ _piecrust/libs/LessPhp/plessc | 191 + _piecrust/libs/Log/Log.php | 842 +++ _piecrust/libs/Log/Log/composite.php | 274 + _piecrust/libs/Log/Log/console.php | 208 + _piecrust/libs/Log/Log/daemon.php | 235 + _piecrust/libs/Log/Log/display.php | 181 + _piecrust/libs/Log/Log/error_log.php | 160 + _piecrust/libs/Log/Log/file.php | 316 ++ _piecrust/libs/Log/Log/firebug.php | 207 + _piecrust/libs/Log/Log/mail.php | 294 + _piecrust/libs/Log/Log/mcal.php | 170 + _piecrust/libs/Log/Log/mdb2.php | 358 ++ _piecrust/libs/Log/Log/null.php | 91 + _piecrust/libs/Log/Log/observer.php | 129 + _piecrust/libs/Log/Log/sql.php | 294 + _piecrust/libs/Log/Log/sqlite.php | 225 + _piecrust/libs/Log/Log/syslog.php | 228 + _piecrust/libs/Log/Log/win.php | 286 + _piecrust/libs/Markdown/License.text | 36 + .../libs/Markdown/PHP Markdown Readme.text | 770 +++ _piecrust/libs/Markdown/markdown.php | 1732 ++++++ _piecrust/libs/MarkdownExtra/License.text | 36 + .../PHP Markdown Extra Readme.text | 786 +++ _piecrust/libs/MarkdownExtra/markdown.php | 2932 ++++++++++ _piecrust/libs/Mustache/LICENSE | 22 + _piecrust/libs/Mustache/Mustache.php | 795 +++ _piecrust/libs/Mustache/README.markdown | 92 + _piecrust/libs/PEAR/Autoloader.php | 218 + _piecrust/libs/PEAR/Builder.php | 489 ++ _piecrust/libs/PEAR/ChannelFile.php | 1559 ++++++ _piecrust/libs/PEAR/ChannelFile/Parser.php | 68 + _piecrust/libs/PEAR/Command.php | 414 ++ _piecrust/libs/PEAR/Command/Auth.php | 81 + _piecrust/libs/PEAR/Command/Auth.xml | 30 + _piecrust/libs/PEAR/Command/Build.php | 85 + _piecrust/libs/PEAR/Command/Build.xml | 10 + _piecrust/libs/PEAR/Command/Channels.php | 883 +++ _piecrust/libs/PEAR/Command/Channels.xml | 123 + _piecrust/libs/PEAR/Command/Common.php | 273 + _piecrust/libs/PEAR/Command/Config.php | 414 ++ _piecrust/libs/PEAR/Command/Config.xml | 92 + _piecrust/libs/PEAR/Command/Install.php | 1268 +++++ _piecrust/libs/PEAR/Command/Install.xml | 276 + _piecrust/libs/PEAR/Command/Mirror.php | 139 + _piecrust/libs/PEAR/Command/Mirror.xml | 18 + _piecrust/libs/PEAR/Command/Package.php | 1124 ++++ _piecrust/libs/PEAR/Command/Package.xml | 237 + _piecrust/libs/PEAR/Command/Pickle.php | 421 ++ _piecrust/libs/PEAR/Command/Pickle.xml | 36 + _piecrust/libs/PEAR/Command/Registry.php | 1145 ++++ _piecrust/libs/PEAR/Command/Registry.xml | 58 + _piecrust/libs/PEAR/Command/Remote.php | 810 +++ _piecrust/libs/PEAR/Command/Remote.xml | 109 + _piecrust/libs/PEAR/Command/Test.php | 337 ++ _piecrust/libs/PEAR/Command/Test.xml | 54 + _piecrust/libs/PEAR/Common.php | 837 +++ _piecrust/libs/PEAR/Config.php | 2097 ++++++++ _piecrust/libs/PEAR/Dependency2.php | 1358 +++++ _piecrust/libs/PEAR/DependencyDB.php | 769 +++ _piecrust/libs/PEAR/Downloader.php | 1766 ++++++ _piecrust/libs/PEAR/Downloader/Package.php | 1988 +++++++ _piecrust/libs/PEAR/ErrorStack.php | 985 ++++ _piecrust/libs/PEAR/Exception.php | 389 ++ _piecrust/libs/PEAR/FixPHP5PEARWarnings.php | 7 + _piecrust/libs/PEAR/Frontend.php | 228 + _piecrust/libs/PEAR/Frontend/CLI.php | 751 +++ _piecrust/libs/PEAR/Installer.php | 1823 +++++++ _piecrust/libs/PEAR/Installer/Role.php | 276 + _piecrust/libs/PEAR/Installer/Role/Cfg.php | 106 + _piecrust/libs/PEAR/Installer/Role/Cfg.xml | 15 + _piecrust/libs/PEAR/Installer/Role/Common.php | 174 + _piecrust/libs/PEAR/Installer/Role/Data.php | 28 + _piecrust/libs/PEAR/Installer/Role/Data.xml | 15 + _piecrust/libs/PEAR/Installer/Role/Doc.php | 28 + _piecrust/libs/PEAR/Installer/Role/Doc.xml | 15 + _piecrust/libs/PEAR/Installer/Role/Ext.php | 28 + _piecrust/libs/PEAR/Installer/Role/Ext.xml | 12 + _piecrust/libs/PEAR/Installer/Role/Php.php | 28 + _piecrust/libs/PEAR/Installer/Role/Php.xml | 15 + _piecrust/libs/PEAR/Installer/Role/Script.php | 28 + _piecrust/libs/PEAR/Installer/Role/Script.xml | 15 + _piecrust/libs/PEAR/Installer/Role/Src.php | 34 + _piecrust/libs/PEAR/Installer/Role/Src.xml | 12 + _piecrust/libs/PEAR/Installer/Role/Test.php | 28 + _piecrust/libs/PEAR/Installer/Role/Test.xml | 15 + _piecrust/libs/PEAR/Installer/Role/Www.php | 28 + _piecrust/libs/PEAR/Installer/Role/Www.xml | 15 + _piecrust/libs/PEAR/PackageFile.php | 492 ++ .../libs/PEAR/PackageFile/Generator/v1.php | 1284 +++++ .../libs/PEAR/PackageFile/Generator/v2.php | 893 ++++ _piecrust/libs/PEAR/PackageFile/Parser/v1.php | 459 ++ _piecrust/libs/PEAR/PackageFile/Parser/v2.php | 113 + _piecrust/libs/PEAR/PackageFile/v1.php | 1612 ++++++ _piecrust/libs/PEAR/PackageFile/v2.php | 2049 +++++++ .../libs/PEAR/PackageFile/v2/Validator.php | 2154 ++++++++ _piecrust/libs/PEAR/PackageFile/v2/rw.php | 1604 ++++++ _piecrust/libs/PEAR/Packager.php | 201 + _piecrust/libs/PEAR/REST.php | 483 ++ _piecrust/libs/PEAR/REST/10.php | 871 +++ _piecrust/libs/PEAR/REST/11.php | 341 ++ _piecrust/libs/PEAR/REST/13.php | 299 ++ _piecrust/libs/PEAR/Registry.php | 2395 +++++++++ _piecrust/libs/PEAR/RunTest.php | 968 ++++ _piecrust/libs/PEAR/Task/Common.php | 202 + .../libs/PEAR/Task/Postinstallscript.php | 323 ++ .../libs/PEAR/Task/Postinstallscript/rw.php | 169 + _piecrust/libs/PEAR/Task/Replace.php | 176 + _piecrust/libs/PEAR/Task/Replace/rw.php | 61 + _piecrust/libs/PEAR/Task/Unixeol.php | 77 + _piecrust/libs/PEAR/Task/Unixeol/rw.php | 56 + _piecrust/libs/PEAR/Task/Windowseol.php | 77 + _piecrust/libs/PEAR/Task/Windowseol/rw.php | 56 + _piecrust/libs/PEAR/Validate.php | 629 +++ _piecrust/libs/PEAR/Validator/PECL.php | 63 + _piecrust/libs/PEAR/XMLParser.php | 253 + _piecrust/libs/PhamlP/Phamlp.php | 72 + _piecrust/libs/PhamlP/PhamlpException.php | 31 + _piecrust/libs/PhamlP/haml/HamlException.php | 29 + _piecrust/libs/PhamlP/haml/HamlHelpers.php | 199 + _piecrust/libs/PhamlP/haml/HamlParser.php | 1263 +++++ .../PhamlP/haml/filters/HamlBaseFilter.php | 30 + .../PhamlP/haml/filters/HamlCdataFilter.php | 29 + .../PhamlP/haml/filters/HamlCssFilter.php | 30 + .../PhamlP/haml/filters/HamlEscapedFilter.php | 32 + .../haml/filters/HamlJavascriptFilter.php | 31 + .../PhamlP/haml/filters/HamlPhpFilter.php | 27 + .../PhamlP/haml/filters/HamlPlainFilter.php | 28 + .../haml/filters/HamlPreserveFilter.php | 29 + .../PhamlP/haml/filters/HamlSassFilter.php | 37 + .../PhamlP/haml/filters/HamlScssFilter.php | 37 + .../haml/filters/_HamlMarkdownFilter.php | 50 + .../haml/filters/_HamlTextileFilter.php | 50 + _piecrust/libs/PhamlP/haml/messages/_i18n.php | 32 + _piecrust/libs/PhamlP/haml/messages/de.php | 32 + _piecrust/libs/PhamlP/haml/messages/fr.php | 32 + .../haml/renderers/HamlCompactRenderer.php | 32 + .../haml/renderers/HamlCompressedRenderer.php | 48 + .../haml/renderers/HamlExpandedRenderer.php | 58 + .../haml/renderers/HamlNestedRenderer.php | 77 + .../PhamlP/haml/renderers/HamlRenderer.php | 152 + .../PhamlP/haml/tree/HamlCodeBlockNode.php | 58 + .../libs/PhamlP/haml/tree/HamlCommentNode.php | 41 + .../libs/PhamlP/haml/tree/HamlDoctypeNode.php | 27 + .../libs/PhamlP/haml/tree/HamlElementNode.php | 52 + .../libs/PhamlP/haml/tree/HamlFilterNode.php | 50 + .../libs/PhamlP/haml/tree/HamlHelperNode.php | 73 + _piecrust/libs/PhamlP/haml/tree/HamlNode.php | 253 + .../PhamlP/haml/tree/HamlNodeExceptions.php | 19 + .../libs/PhamlP/haml/tree/HamlRootNode.php | 58 + _piecrust/libs/PhamlP/readme.txt | 4 + _piecrust/libs/PhamlP/sass/SassException.php | 29 + _piecrust/libs/PhamlP/sass/SassFile.php | 167 + _piecrust/libs/PhamlP/sass/SassParser.php | 849 +++ .../PhamlP/sass/extensions/compass/config.php | 65 + .../blueprint/stylesheets/_blueprint.scss | 47 + .../stylesheets/blueprint/_buttons.scss | 101 + .../stylesheets/blueprint/_colors.scss | 32 + .../stylesheets/blueprint/_debug.scss | 11 + .../stylesheets/blueprint/_fancy-type.scss | 86 + .../stylesheets/blueprint/_form.scss | 68 + .../stylesheets/blueprint/_grid.scss | 249 + .../blueprint/stylesheets/blueprint/_ie.scss | 109 + .../stylesheets/blueprint/_interaction.scss | 57 + .../stylesheets/blueprint/_link-icons.scss | 37 + .../stylesheets/blueprint/_liquid.scss | 147 + .../stylesheets/blueprint/_print.scss | 93 + .../stylesheets/blueprint/_reset.scss | 3 + .../blueprint/stylesheets/blueprint/_rtl.scss | 133 + .../stylesheets/blueprint/_scaffolding.scss | 54 + .../stylesheets/blueprint/_typography.scss | 104 + .../stylesheets/blueprint/_utilities.scss | 37 + .../blueprint/reset/_utilities.scss | 58 + .../blueprint/templates/basic/grid.png | Bin 0 -> 206 bytes .../blueprint/templates/basic/ie.sass | 4 + .../blueprint/templates/basic/manifest.rb | 30 + .../templates/basic/partials/_base.sass | 10 + .../blueprint/templates/basic/print.sass | 4 + .../blueprint/templates/basic/screen.sass | 12 + .../blueprint/templates/buttons/buttons.sass | 49 + .../templates/buttons/buttons/cross.png | Bin 0 -> 655 bytes .../templates/buttons/buttons/key.png | Bin 0 -> 455 bytes .../templates/buttons/buttons/tick.png | Bin 0 -> 537 bytes .../blueprint/templates/buttons/manifest.rb | 17 + .../templates/link_icons/link_icons.sass | 13 + .../templates/link_icons/link_icons/doc.png | Bin 0 -> 777 bytes .../templates/link_icons/link_icons/email.png | Bin 0 -> 641 bytes .../link_icons/link_icons/external.png | Bin 0 -> 46848 bytes .../templates/link_icons/link_icons/feed.png | Bin 0 -> 691 bytes .../templates/link_icons/link_icons/im.png | Bin 0 -> 741 bytes .../templates/link_icons/link_icons/pdf.png | Bin 0 -> 591 bytes .../link_icons/link_icons/visited.png | Bin 0 -> 46990 bytes .../templates/link_icons/link_icons/xls.png | Bin 0 -> 663 bytes .../templates/link_icons/manifest.rb | 23 + .../blueprint/templates/project/grid.png | Bin 0 -> 206 bytes .../blueprint/templates/project/ie.sass | 16 + .../blueprint/templates/project/manifest.rb | 30 + .../templates/project/partials/_base.sass | 11 + .../blueprint/templates/project/print.sass | 8 + .../blueprint/templates/project/screen.sass | 45 + .../blueprint/templates/semantic/grid.png | Bin 0 -> 206 bytes .../blueprint/templates/semantic/ie.sass | 16 + .../blueprint/templates/semantic/manifest.rb | 33 + .../templates/semantic/partials/_base.sass | 10 + .../templates/semantic/partials/_form.sass | 6 + .../templates/semantic/partials/_page.sass | 18 + .../templates/semantic/partials/_two_col.sass | 38 + .../blueprint/templates/semantic/print.sass | 5 + .../blueprint/templates/semantic/screen.sass | 14 + .../compass/stylesheets/_compass.scss | 2 + .../compass/stylesheets/compass/_css3.scss | 15 + .../compass/stylesheets/compass/_layout.scss | 1 + .../compass/stylesheets/compass/_reset.scss | 3 + .../stylesheets/compass/_utilities.scss | 6 + .../compass/css3/_background-clip.scss | 43 + .../compass/css3/_background-origin.scss | 42 + .../compass/css3/_background-size.scss | 14 + .../compass/css3/_border-radius.scss | 135 + .../stylesheets/compass/css3/_box-shadow.scss | 50 + .../stylesheets/compass/css3/_box-sizing.scss | 13 + .../stylesheets/compass/css3/_box.scss | 112 + .../stylesheets/compass/css3/_columns.scss | 55 + .../stylesheets/compass/css3/_font-face.scss | 33 + .../stylesheets/compass/css3/_gradient.scss | 82 + .../compass/css3/_inline-block.scss | 12 + .../stylesheets/compass/css3/_opacity.scss | 27 + .../stylesheets/compass/css3/_shared.scss | 47 + .../compass/css3/_text-shadow.scss | 25 + .../stylesheets/compass/css3/_transform.scss | 85 + .../stylesheets/compass/css3/_transition.scss | 85 + .../compass/layout/_sticky-footer.scss | 23 + .../stylesheets/compass/reset/_utilities.scss | 133 + .../compass/utilities/_general.scss | 6 + .../stylesheets/compass/utilities/_links.scss | 3 + .../stylesheets/compass/utilities/_lists.scss | 4 + .../stylesheets/compass/utilities/_print.scss | 17 + .../compass/utilities/_sprites.scss | 1 + .../compass/utilities/_tables.scss | 3 + .../stylesheets/compass/utilities/_text.scss | 3 + .../compass/utilities/general/_clearfix.scss | 31 + .../compass/utilities/general/_float.scss | 15 + .../compass/utilities/general/_hacks.scss | 35 + .../compass/utilities/general/_min.scss | 16 + .../compass/utilities/general/_reset.scss | 2 + .../compass/utilities/general/_tabs.scss | 1 + .../compass/utilities/general/_tag-cloud.scss | 18 + .../compass/utilities/links/_hover-link.scss | 5 + .../compass/utilities/links/_link-colors.scss | 28 + .../utilities/links/_unstyled-link.scss | 7 + .../compass/utilities/lists/_bullets.scss | 34 + .../utilities/lists/_horizontal-list.scss | 52 + .../utilities/lists/_inline-block-list.scss | 47 + .../compass/utilities/lists/_inline-list.scss | 29 + .../utilities/sprites/_sprite-img.scss | 56 + .../tables/_alternating-rows-and-columns.scss | 20 + .../compass/utilities/tables/_borders.scss | 27 + .../utilities/tables/_scaffolding.scss | 9 + .../compass/utilities/text/_ellipsis.scss | 25 + .../compass/utilities/text/_nowrap.scss | 2 + .../compass/utilities/text/_replacement.scss | 34 + .../compass/templates/ellipsis/ellipsis.sass | 9 + .../compass/templates/ellipsis/manifest.rb | 27 + .../templates/ellipsis/xml/ellipsis.xml | 14 + .../compass/templates/extension/manifest.rb | 20 + .../templates/extension/stylesheets/main.sass | 1 + .../extension/templates/project/manifest.rb | 2 + .../extension/templates/project/screen.sass | 2 + .../compass/templates/project/USAGE.markdown | 32 + .../compass/templates/project/ie.sass | 6 + .../compass/templates/project/manifest.rb | 4 + .../compass/templates/project/print.sass | 6 + .../compass/templates/project/screen.sass | 7 + .../compass/functions/colourStops.php | 269 + .../compass/functions/constants.php | 44 + .../compass/functions/fontFiles.php | 30 + .../compass/functions/imageSize.php | 39 + .../compass/functions/inlineData.php | 84 + .../extensions/compass/functions/lists.php | 47 + .../compass/functions/selectors.php | 128 + .../extensions/compass/functions/urls.php | 143 + .../compass/stylesheets/_compass.scss | 2 + .../compass/stylesheets/compass/_css3.scss | 15 + .../compass/stylesheets/compass/_layout.scss | 1 + .../compass/stylesheets/compass/_reset.scss | 3 + .../stylesheets/compass/_utilities.scss | 6 + .../compass/css3/_background-clip.scss | 43 + .../compass/css3/_background-origin.scss | 42 + .../compass/css3/_background-size.scss | 14 + .../compass/css3/_border-radius.scss | 135 + .../stylesheets/compass/css3/_box-shadow.scss | 50 + .../stylesheets/compass/css3/_box-sizing.scss | 13 + .../stylesheets/compass/css3/_box.scss | 112 + .../stylesheets/compass/css3/_columns.scss | 55 + .../stylesheets/compass/css3/_font-face.scss | 33 + .../stylesheets/compass/css3/_gradient.scss | 96 + .../compass/css3/_inline-block.scss | 12 + .../stylesheets/compass/css3/_opacity.scss | 27 + .../stylesheets/compass/css3/_shared.scss | 47 + .../compass/css3/_text-shadow.scss | 25 + .../stylesheets/compass/css3/_transform.scss | 85 + .../stylesheets/compass/css3/_transition.scss | 85 + .../compass/layout/_sticky-footer.scss | 23 + .../stylesheets/compass/reset/_utilities.scss | 133 + .../compass/utilities/_general.scss | 6 + .../stylesheets/compass/utilities/_links.scss | 3 + .../stylesheets/compass/utilities/_lists.scss | 4 + .../stylesheets/compass/utilities/_print.scss | 17 + .../compass/utilities/_sprites.scss | 1 + .../compass/utilities/_tables.scss | 3 + .../stylesheets/compass/utilities/_text.scss | 3 + .../compass/utilities/general/_clearfix.scss | 31 + .../compass/utilities/general/_float.scss | 15 + .../compass/utilities/general/_hacks.scss | 35 + .../compass/utilities/general/_min.scss | 16 + .../compass/utilities/general/_reset.scss | 2 + .../compass/utilities/general/_tabs.scss | 1 + .../compass/utilities/general/_tag-cloud.scss | 18 + .../compass/utilities/links/_hover-link.scss | 5 + .../compass/utilities/links/_link-colors.scss | 28 + .../utilities/links/_unstyled-link.scss | 7 + .../compass/utilities/lists/_bullets.scss | 34 + .../utilities/lists/_horizontal-list.scss | 52 + .../utilities/lists/_inline-block-list.scss | 47 + .../compass/utilities/lists/_inline-list.scss | 29 + .../utilities/sprites/_sprite-img.scss | 56 + .../tables/_alternating-rows-and-columns.scss | 20 + .../compass/utilities/tables/_borders.scss | 27 + .../utilities/tables/_scaffolding.scss | 9 + .../compass/utilities/text/_ellipsis.scss | 25 + .../compass/utilities/text/_nowrap.scss | 2 + .../compass/utilities/text/_replacement.scss | 34 + _piecrust/libs/PhamlP/sass/messages/_i18n.php | 122 + _piecrust/libs/PhamlP/sass/messages/de.php | 70 + _piecrust/libs/PhamlP/sass/messages/fr.php | 70 + .../sass/renderers/SassCompactRenderer.php | 130 + .../sass/renderers/SassCompressedRenderer.php | 102 + .../sass/renderers/SassExpandedRenderer.php | 62 + .../sass/renderers/SassNestedRenderer.php | 61 + .../PhamlP/sass/renderers/SassRenderer.php | 51 + .../PhamlP/sass/script/SassScriptFunction.php | 169 + .../sass/script/SassScriptFunctions.php | 751 +++ .../PhamlP/sass/script/SassScriptLexer.php | 114 + .../sass/script/SassScriptOperation.php | 151 + .../PhamlP/sass/script/SassScriptParser.php | 205 + .../script/SassScriptParserExceptions.php | 40 + .../PhamlP/sass/script/SassScriptVariable.php | 57 + .../sass/script/literals/SassBoolean.php | 67 + .../sass/script/literals/SassColour.php | 883 +++ .../sass/script/literals/SassLiteral.php | 364 ++ .../script/literals/SassLiteralExceptions.php | 47 + .../sass/script/literals/SassNumber.php | 515 ++ .../sass/script/literals/SassString.php | 106 + .../libs/PhamlP/sass/tree/SassCommentNode.php | 64 + .../libs/PhamlP/sass/tree/SassContext.php | 120 + .../libs/PhamlP/sass/tree/SassDebugNode.php | 84 + .../PhamlP/sass/tree/SassDirectiveNode.php | 76 + .../libs/PhamlP/sass/tree/SassElseNode.php | 28 + .../libs/PhamlP/sass/tree/SassExtendNode.php | 47 + .../libs/PhamlP/sass/tree/SassForNode.php | 99 + .../libs/PhamlP/sass/tree/SassIfNode.php | 95 + .../libs/PhamlP/sass/tree/SassImportNode.php | 69 + .../sass/tree/SassMixinDefinitionNode.php | 88 + .../libs/PhamlP/sass/tree/SassMixinNode.php | 91 + _piecrust/libs/PhamlP/sass/tree/SassNode.php | 342 ++ .../PhamlP/sass/tree/SassNodeExceptions.php | 117 + .../PhamlP/sass/tree/SassPropertyNode.php | 250 + .../libs/PhamlP/sass/tree/SassRootNode.php | 100 + .../libs/PhamlP/sass/tree/SassRuleNode.php | 337 ++ .../PhamlP/sass/tree/SassVariableNode.php | 90 + .../libs/PhamlP/sass/tree/SassWhileNode.php | 64 + .../Smartypants/PHP SmartyPants Readme.txt | 394 ++ _piecrust/libs/Smartypants/smartypants.php | 860 +++ .../libs/SmartypantsTypographer/License.text | 36 + .../PHP SmartyPants Readme.txt | 261 + .../SmartypantsTypographer/smartypants.php | 1184 ++++ .../libs/StupidHttp/StupidHttp_ConsoleLog.php | 63 + .../StupidHttp/StupidHttp_HandlerContext.php | 44 + _piecrust/libs/StupidHttp/StupidHttp_Log.php | 90 + .../libs/StupidHttp/StupidHttp_MultiLog.php | 52 + .../libs/StupidHttp/StupidHttp_PearLog.php | 56 + .../StupidHttp/StupidHttp_WebException.php | 15 + .../libs/StupidHttp/StupidHttp_WebRequest.php | 146 + .../StupidHttp_WebRequestHandler.php | 63 + .../StupidHttp/StupidHttp_WebResponse.php | 94 + .../libs/StupidHttp/StupidHttp_WebServer.php | 791 +++ .../libs/StupidHttp/directory-listing.html | 11 + _piecrust/libs/StupidHttp/mime.types | 616 +++ _piecrust/libs/Textile/README.textile | 47 + _piecrust/libs/Textile/classTextile.php | 1764 ++++++ _piecrust/libs/Twig/AUTHORS | 9 + _piecrust/libs/Twig/CHANGELOG | 290 + _piecrust/libs/Twig/LICENSE | 31 + _piecrust/libs/Twig/README.markdown | 8 + _piecrust/libs/Twig/lib/Twig/Autoloader.php | 46 + _piecrust/libs/Twig/lib/Twig/Compiler.php | 220 + .../libs/Twig/lib/Twig/CompilerInterface.php | 35 + _piecrust/libs/Twig/lib/Twig/Environment.php | 893 ++++ _piecrust/libs/Twig/lib/Twig/Error.php | 122 + _piecrust/libs/Twig/lib/Twig/Error/Loader.php | 20 + .../libs/Twig/lib/Twig/Error/Runtime.php | 21 + _piecrust/libs/Twig/lib/Twig/Error/Syntax.php | 21 + .../libs/Twig/lib/Twig/ExpressionParser.php | 374 ++ _piecrust/libs/Twig/lib/Twig/Extension.php | 93 + .../libs/Twig/lib/Twig/Extension/Core.php | 497 ++ .../libs/Twig/lib/Twig/Extension/Escaper.php | 73 + .../Twig/lib/Twig/Extension/Optimizer.php | 35 + .../libs/Twig/lib/Twig/Extension/Sandbox.php | 103 + .../libs/Twig/lib/Twig/ExtensionInterface.php | 84 + _piecrust/libs/Twig/lib/Twig/Filter.php | 58 + .../libs/Twig/lib/Twig/Filter/Function.php | 33 + .../libs/Twig/lib/Twig/Filter/Method.php | 34 + .../libs/Twig/lib/Twig/FilterInterface.php | 34 + _piecrust/libs/Twig/lib/Twig/Function.php | 52 + .../libs/Twig/lib/Twig/Function/Function.php | 34 + .../libs/Twig/lib/Twig/Function/Method.php | 35 + .../libs/Twig/lib/Twig/FunctionInterface.php | 33 + _piecrust/libs/Twig/lib/Twig/Lexer.php | 305 ++ .../libs/Twig/lib/Twig/LexerInterface.php | 29 + _piecrust/libs/Twig/lib/Twig/Loader/Array.php | 84 + .../libs/Twig/lib/Twig/Loader/Filesystem.php | 138 + .../libs/Twig/lib/Twig/Loader/String.php | 59 + .../libs/Twig/lib/Twig/LoaderInterface.php | 45 + _piecrust/libs/Twig/lib/Twig/Markup.php | 31 + _piecrust/libs/Twig/lib/Twig/Node.php | 227 + .../libs/Twig/lib/Twig/Node/AutoEscape.php | 40 + _piecrust/libs/Twig/lib/Twig/Node/Block.php | 45 + .../Twig/lib/Twig/Node/BlockReference.php | 38 + .../libs/Twig/lib/Twig/Node/Expression.php | 21 + .../Twig/lib/Twig/Node/Expression/Array.php | 41 + .../lib/Twig/Node/Expression/AssignName.php | 24 + .../Twig/lib/Twig/Node/Expression/Binary.php | 40 + .../lib/Twig/Node/Expression/Binary/Add.php | 18 + .../lib/Twig/Node/Expression/Binary/And.php | 18 + .../Twig/Node/Expression/Binary/Concat.php | 18 + .../lib/Twig/Node/Expression/Binary/Div.php | 18 + .../lib/Twig/Node/Expression/Binary/Equal.php | 17 + .../Twig/Node/Expression/Binary/FloorDiv.php | 29 + .../Twig/Node/Expression/Binary/Greater.php | 17 + .../Node/Expression/Binary/GreaterEqual.php | 17 + .../lib/Twig/Node/Expression/Binary/In.php | 33 + .../lib/Twig/Node/Expression/Binary/Less.php | 17 + .../Twig/Node/Expression/Binary/LessEqual.php | 17 + .../lib/Twig/Node/Expression/Binary/Mod.php | 18 + .../lib/Twig/Node/Expression/Binary/Mul.php | 18 + .../Twig/Node/Expression/Binary/NotEqual.php | 17 + .../lib/Twig/Node/Expression/Binary/NotIn.php | 33 + .../lib/Twig/Node/Expression/Binary/Or.php | 18 + .../lib/Twig/Node/Expression/Binary/Power.php | 33 + .../lib/Twig/Node/Expression/Binary/Range.php | 33 + .../lib/Twig/Node/Expression/Binary/Sub.php | 18 + .../Twig/Node/Expression/BlockReference.php | 43 + .../lib/Twig/Node/Expression/Conditional.php | 31 + .../lib/Twig/Node/Expression/Constant.php | 23 + .../Node/Expression/ExtensionReference.php | 34 + .../Twig/lib/Twig/Node/Expression/Filter.php | 72 + .../lib/Twig/Node/Expression/Function.php | 49 + .../Twig/lib/Twig/Node/Expression/GetAttr.php | 43 + .../Twig/lib/Twig/Node/Expression/Name.php | 33 + .../Twig/lib/Twig/Node/Expression/Parent.php | 39 + .../Twig/lib/Twig/Node/Expression/Test.php | 62 + .../Twig/lib/Twig/Node/Expression/Unary.php | 30 + .../lib/Twig/Node/Expression/Unary/Neg.php | 18 + .../lib/Twig/Node/Expression/Unary/Not.php | 18 + .../lib/Twig/Node/Expression/Unary/Pos.php | 18 + _piecrust/libs/Twig/lib/Twig/Node/For.php | 119 + _piecrust/libs/Twig/lib/Twig/Node/If.php | 67 + _piecrust/libs/Twig/lib/Twig/Node/Import.php | 51 + _piecrust/libs/Twig/lib/Twig/Node/Include.php | 76 + _piecrust/libs/Twig/lib/Twig/Node/Macro.php | 65 + _piecrust/libs/Twig/lib/Twig/Node/Module.php | 205 + _piecrust/libs/Twig/lib/Twig/Node/Print.php | 40 + _piecrust/libs/Twig/lib/Twig/Node/Sandbox.php | 48 + .../Twig/lib/Twig/Node/SandboxedModule.php | 71 + .../Twig/lib/Twig/Node/SandboxedPrint.php | 68 + _piecrust/libs/Twig/lib/Twig/Node/Set.php | 79 + .../libs/Twig/lib/Twig/Node/Spaceless.php | 41 + _piecrust/libs/Twig/lib/Twig/Node/Text.php | 40 + .../libs/Twig/lib/Twig/NodeInterface.php | 30 + .../Twig/lib/Twig/NodeOutputInterface.php | 20 + .../libs/Twig/lib/Twig/NodeTraverser.php | 89 + .../Twig/lib/Twig/NodeVisitor/Escaper.php | 161 + .../Twig/lib/Twig/NodeVisitor/Optimizer.php | 171 + .../lib/Twig/NodeVisitor/SafeAnalysis.php | 101 + .../Twig/lib/Twig/NodeVisitor/Sandbox.php | 93 + .../Twig/lib/Twig/NodeVisitorInterface.php | 48 + _piecrust/libs/Twig/lib/Twig/Parser.php | 302 ++ .../libs/Twig/lib/Twig/ParserInterface.php | 28 + .../Twig/lib/Twig/Sandbox/SecurityError.php | 20 + .../Twig/lib/Twig/Sandbox/SecurityPolicy.php | 116 + .../Twig/Sandbox/SecurityPolicyInterface.php | 25 + _piecrust/libs/Twig/lib/Twig/Template.php | 300 ++ .../libs/Twig/lib/Twig/TemplateInterface.php | 46 + .../libs/Twig/lib/Twig/Test/Function.php | 31 + _piecrust/libs/Twig/lib/Twig/Test/Method.php | 32 + .../libs/Twig/lib/Twig/TestInterface.php | 26 + _piecrust/libs/Twig/lib/Twig/Token.php | 206 + _piecrust/libs/Twig/lib/Twig/TokenParser.php | 31 + .../Twig/lib/Twig/TokenParser/AutoEscape.php | 58 + .../libs/Twig/lib/Twig/TokenParser/Block.php | 72 + .../Twig/lib/Twig/TokenParser/Extends.php | 42 + .../libs/Twig/lib/Twig/TokenParser/Filter.php | 51 + .../libs/Twig/lib/Twig/TokenParser/For.php | 68 + .../libs/Twig/lib/Twig/TokenParser/From.php | 66 + .../libs/Twig/lib/Twig/TokenParser/If.php | 79 + .../libs/Twig/lib/Twig/TokenParser/Import.php | 39 + .../Twig/lib/Twig/TokenParser/Include.php | 53 + .../libs/Twig/lib/Twig/TokenParser/Macro.php | 59 + .../Twig/lib/Twig/TokenParser/Sandbox.php | 43 + .../libs/Twig/lib/Twig/TokenParser/Set.php | 66 + .../Twig/lib/Twig/TokenParser/Spaceless.php | 45 + .../libs/Twig/lib/Twig/TokenParserBroker.php | 107 + .../lib/Twig/TokenParserBrokerInterface.php | 45 + .../Twig/lib/Twig/TokenParserInterface.php | 42 + _piecrust/libs/Twig/lib/Twig/TokenStream.php | 139 + _piecrust/libs/Twig/package.xml.tpl | 63 + _piecrust/libs/sfYaml/LICENSE | 19 + _piecrust/libs/sfYaml/README.markdown | 15 + _piecrust/libs/sfYaml/lib/sfYaml.php | 135 + _piecrust/libs/sfYaml/lib/sfYamlDumper.php | 60 + _piecrust/libs/sfYaml/lib/sfYamlInline.php | 442 ++ _piecrust/libs/sfYaml/lib/sfYamlParser.php | 622 +++ _piecrust/libs/sfYaml/package.xml | 141 + _piecrust/piecrust.php | 124 + _piecrust/resources/messages/404.html | 65 + _piecrust/resources/messages/critical.html | 70 + _piecrust/resources/messages/error.html | 68 + .../resources/messages/requirements.html | 71 + _piecrust/resources/messages/welcome.html | 85 + .../resources/webinit/default_index.html | 10 + .../resources/webinit/default_template.html | 23 + _piecrust/resources/webinit/htaccess | 19 + _piecrust/resources/webinit/web.config | 25 + _piecrust/src/PieCrust/Baker/BakeRecord.php | 261 + .../src/PieCrust/Baker/DirectoryBaker.php | 174 + _piecrust/src/PieCrust/Baker/PageBaker.php | 185 + .../src/PieCrust/Baker/PieCrustBaker.php | 568 ++ .../Baker/Processors/CopyFileProcessor.php | 45 + .../PieCrust/Baker/Processors/IProcessor.php | 53 + .../Baker/Processors/LessProcessor.php | 20 + .../Baker/Processors/SassProcessor.php | 23 + .../Baker/Processors/SimpleFileProcessor.php | 102 + .../Baker/Processors/SitemapProcessor.php | 87 + _piecrust/src/PieCrust/Chef/Chef.php | 91 + .../PieCrust/Chef/Commands/BakeCommand.php | 126 + .../PieCrust/Chef/Commands/IChefCommand.php | 35 + .../PieCrust/Chef/Commands/ImportCommand.php | 69 + .../PieCrust/Chef/Commands/InitCommand.php | 119 + .../PieCrust/Chef/Commands/ServeCommand.php | 106 + .../PieCrust/Chef/Commands/UploadCommand.php | 268 + .../src/PieCrust/Formatters/HamlFormatter.php | 70 + .../src/PieCrust/Formatters/IFormatter.php | 49 + .../PieCrust/Formatters/MarkdownFormatter.php | 37 + .../Formatters/PassThroughFormatter.php | 28 + .../Formatters/SmartyPantsFormatter.php | 49 + .../PieCrust/Formatters/TextileFormatter.php | 31 + _piecrust/src/PieCrust/IO/Cache.php | 75 + _piecrust/src/PieCrust/IO/FileSystem.php | 188 + _piecrust/src/PieCrust/IO/FlatFileSystem.php | 52 + .../PieCrust/IO/HierarchicalFileSystem.php | 85 + .../src/PieCrust/IO/ShallowFileSystem.php | 68 + .../Interop/Importers/IImporter.class.php | 36 + .../Importers/WordpressImporter.class.php | 94 + .../src/PieCrust/Interop/PieCrustImporter.php | 65 + _piecrust/src/PieCrust/Page/Assetor.php | 176 + .../Page/Filtering/AndBooleanClause.php | 27 + .../PieCrust/Page/Filtering/BooleanClause.php | 23 + .../PieCrust/Page/Filtering/FilterClause.php | 24 + .../Page/Filtering/HasFilterClause.php | 23 + .../src/PieCrust/Page/Filtering/IClause.php | 15 + .../Page/Filtering/IsFilterClause.php | 23 + .../src/PieCrust/Page/Filtering/NotClause.php | 33 + .../Page/Filtering/OrBooleanClause.php | 27 + .../Page/Filtering/PaginationFilter.php | 135 + _piecrust/src/PieCrust/Page/Linker.php | 142 + _piecrust/src/PieCrust/Page/Page.php | 729 +++ _piecrust/src/PieCrust/Page/PageRenderer.php | 166 + .../src/PieCrust/Page/PageRepository.php | 67 + _piecrust/src/PieCrust/Page/PageWrapper.php | 51 + .../src/PieCrust/Page/PaginationIterator.php | 298 ++ _piecrust/src/PieCrust/Page/Paginator.php | 177 + _piecrust/src/PieCrust/PieCrust.php | 583 ++ _piecrust/src/PieCrust/PieCrustCacheInfo.php | 67 + .../src/PieCrust/PieCrustConfiguration.php | 356 ++ .../src/PieCrust/PieCrustErrorHandler.php | 131 + _piecrust/src/PieCrust/PieCrustException.php | 11 + _piecrust/src/PieCrust/PieCrustSiteData.php | 59 + _piecrust/src/PieCrust/Plugins/Dwoo/pca.php | 44 + .../src/PieCrust/Plugins/Dwoo/pccaturl.php | 13 + .../src/PieCrust/Plugins/Dwoo/pcposturl.php | 19 + .../src/PieCrust/Plugins/Dwoo/pctagurl.php | 15 + _piecrust/src/PieCrust/Plugins/Dwoo/pcurl.php | 11 + .../Plugins/Haml/HamlMarkdownFilter.php | 47 + .../Plugins/Haml/HamlTextileFilter.php | 22 + .../Plugins/Twig/ExtendedFilesystem.php | 51 + .../PieCrust/Plugins/Twig/GeshiExtension.php | 34 + .../src/PieCrust/Plugins/Twig/GeshiNode.php | 30 + .../Plugins/Twig/GeshiTokenParser.php | 42 + .../Plugins/Twig/PieCrustExtension.php | 80 + .../Plugins/Twig/PieCrustFormatterNode.php | 25 + .../Twig/PieCrustFormatterTokenParser.php | 34 + .../src/PieCrust/Server/PieCrustServer.php | 248 + .../TemplateEngines/DwooTemplateEngine.php | 85 + .../TemplateEngines/HamlTemplateEngine.php | 124 + .../TemplateEngines/ITemplateEngine.php | 54 + .../MustacheTemplateEngine.php | 49 + .../TemplateEngines/TwigTemplateEngine.php | 106 + .../src/PieCrust/Util/HttpHeaderHelper.php | 70 + _piecrust/src/PieCrust/Util/LinkCollector.php | 93 + _piecrust/src/PieCrust/Util/PluginLoader.php | 111 + _piecrust/src/PieCrust/Util/ServerHelper.php | 82 + _piecrust/src/PieCrust/Util/UriBuilder.php | 80 + _piecrust/src/PieCrust/Util/UriParser.php | 179 + _piecrust/version_check.php | 10 + 949 files changed, 174346 insertions(+) create mode 100755 _piecrust/chef create mode 100644 _piecrust/chef.cmd create mode 100755 _piecrust/chef.php create mode 100644 _piecrust/libs/Console/CommandLine.php create mode 100644 _piecrust/libs/Console/CommandLine/Action.php create mode 100644 _piecrust/libs/Console/CommandLine/Action/Callback.php create mode 100644 _piecrust/libs/Console/CommandLine/Action/Counter.php create mode 100644 _piecrust/libs/Console/CommandLine/Action/Help.php create mode 100644 _piecrust/libs/Console/CommandLine/Action/List.php create mode 100644 _piecrust/libs/Console/CommandLine/Action/Password.php create mode 100644 _piecrust/libs/Console/CommandLine/Action/StoreArray.php create mode 100644 _piecrust/libs/Console/CommandLine/Action/StoreFalse.php create mode 100644 _piecrust/libs/Console/CommandLine/Action/StoreFloat.php create mode 100644 _piecrust/libs/Console/CommandLine/Action/StoreInt.php create mode 100644 _piecrust/libs/Console/CommandLine/Action/StoreString.php create mode 100644 _piecrust/libs/Console/CommandLine/Action/StoreTrue.php create mode 100644 _piecrust/libs/Console/CommandLine/Action/Version.php create mode 100644 _piecrust/libs/Console/CommandLine/Argument.php create mode 100644 _piecrust/libs/Console/CommandLine/Command.php create mode 100644 _piecrust/libs/Console/CommandLine/CustomMessageProvider.php create mode 100644 _piecrust/libs/Console/CommandLine/Element.php create mode 100644 _piecrust/libs/Console/CommandLine/Exception.php create mode 100644 _piecrust/libs/Console/CommandLine/MessageProvider.php create mode 100644 _piecrust/libs/Console/CommandLine/MessageProvider/Default.php create mode 100644 _piecrust/libs/Console/CommandLine/Option.php create mode 100644 _piecrust/libs/Console/CommandLine/Outputter.php create mode 100644 _piecrust/libs/Console/CommandLine/Outputter/Default.php create mode 100644 _piecrust/libs/Console/CommandLine/Renderer.php create mode 100644 _piecrust/libs/Console/CommandLine/Renderer/Default.php create mode 100644 _piecrust/libs/Console/CommandLine/Result.php create mode 100644 _piecrust/libs/Console/CommandLine/XmlParser.php create mode 100644 _piecrust/libs/Dwoo/CHANGELOG create mode 100644 _piecrust/libs/Dwoo/Dwoo.compiled.php create mode 100644 _piecrust/libs/Dwoo/Dwoo.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/DwooRenderer.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/README create mode 100644 _piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/t.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/url.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Adapters/CakePHP/README create mode 100644 _piecrust/libs/Dwoo/Dwoo/Adapters/CakePHP/dwoo.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/README create mode 100644 _piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/config/dwootemplate.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/controllers/dwoowelcome.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/libraries/Dwootemplate.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/views/dwoowelcome.tpl create mode 100644 _piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/views/page.tpl create mode 100644 _piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/PluginProxy.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/README create mode 100644 _piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/View.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Block/Plugin.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Compilation/Exception.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Compiler.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Data.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Exception.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Filter.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/ICompilable.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/ICompilable/Block.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/ICompiler.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/IDataProvider.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/IElseable.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/ILoader.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/IPluginProxy.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/ITemplate.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Loader.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Plugin.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Processor.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Security/Exception.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Security/Policy.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Smarty/Adapter.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Template/File.php create mode 100644 _piecrust/libs/Dwoo/Dwoo/Template/String.php create mode 100644 _piecrust/libs/Dwoo/LICENSE create mode 100644 _piecrust/libs/Dwoo/README create mode 100644 _piecrust/libs/Dwoo/UPGRADE_NOTES create mode 100644 _piecrust/libs/Dwoo/dwooAutoload.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/a.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/auto_escape.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/block.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/capture.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/dynamic.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/else.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/elseif.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/for.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/foreach.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/foreachelse.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/forelse.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/if.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/loop.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/section.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/smartyinterface.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/strip.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/template.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/textformat.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/topLevelBlock.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/with.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/blocks/withelse.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/filters/html_format.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/assign.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/capitalize.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/cat.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/count_characters.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/count_paragraphs.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/count_sentences.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/count_words.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/counter.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/cycle.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/date_format.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/default.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/dump.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/eol.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/escape.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/eval.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/extends.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/extendsCheck.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/fetch.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/include.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/indent.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/isset.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/load_templates.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/lower.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/mailto.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/math.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/nl2br.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/optional.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/regex_replace.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/replace.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/reverse.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/safe.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/spacify.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/string_format.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/strip_tags.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/tif.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/truncate.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/upper.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/whitespace.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/functions/wordwrap.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/helper.array.php create mode 100644 _piecrust/libs/Dwoo/plugins/builtin/processors/pre.smarty_compat.php create mode 100644 _piecrust/libs/Geshi/contrib/aliased.php create mode 100644 _piecrust/libs/Geshi/contrib/cssgen.php create mode 100644 _piecrust/libs/Geshi/contrib/cssgen2.php create mode 100644 _piecrust/libs/Geshi/contrib/example.php create mode 100644 _piecrust/libs/Geshi/contrib/langcheck.php create mode 100644 _piecrust/libs/Geshi/geshi.php create mode 100644 _piecrust/libs/Geshi/geshi/4cs.php create mode 100644 _piecrust/libs/Geshi/geshi/6502acme.php create mode 100644 _piecrust/libs/Geshi/geshi/6502kickass.php create mode 100644 _piecrust/libs/Geshi/geshi/6502tasm.php create mode 100644 _piecrust/libs/Geshi/geshi/68000devpac.php create mode 100644 _piecrust/libs/Geshi/geshi/abap.php create mode 100644 _piecrust/libs/Geshi/geshi/actionscript.php create mode 100644 _piecrust/libs/Geshi/geshi/actionscript3.php create mode 100644 _piecrust/libs/Geshi/geshi/ada.php create mode 100644 _piecrust/libs/Geshi/geshi/algol68.php create mode 100644 _piecrust/libs/Geshi/geshi/apache.php create mode 100644 _piecrust/libs/Geshi/geshi/applescript.php create mode 100644 _piecrust/libs/Geshi/geshi/apt_sources.php create mode 100644 _piecrust/libs/Geshi/geshi/asm.php create mode 100644 _piecrust/libs/Geshi/geshi/asp.php create mode 100644 _piecrust/libs/Geshi/geshi/autoconf.php create mode 100644 _piecrust/libs/Geshi/geshi/autohotkey.php create mode 100644 _piecrust/libs/Geshi/geshi/autoit.php create mode 100644 _piecrust/libs/Geshi/geshi/avisynth.php create mode 100644 _piecrust/libs/Geshi/geshi/awk.php create mode 100644 _piecrust/libs/Geshi/geshi/bash.php create mode 100644 _piecrust/libs/Geshi/geshi/basic4gl.php create mode 100644 _piecrust/libs/Geshi/geshi/bf.php create mode 100644 _piecrust/libs/Geshi/geshi/bibtex.php create mode 100644 _piecrust/libs/Geshi/geshi/blitzbasic.php create mode 100644 _piecrust/libs/Geshi/geshi/bnf.php create mode 100644 _piecrust/libs/Geshi/geshi/boo.php create mode 100644 _piecrust/libs/Geshi/geshi/c.php create mode 100644 _piecrust/libs/Geshi/geshi/c_mac.php create mode 100644 _piecrust/libs/Geshi/geshi/caddcl.php create mode 100644 _piecrust/libs/Geshi/geshi/cadlisp.php create mode 100644 _piecrust/libs/Geshi/geshi/cfdg.php create mode 100644 _piecrust/libs/Geshi/geshi/cfm.php create mode 100644 _piecrust/libs/Geshi/geshi/chaiscript.php create mode 100644 _piecrust/libs/Geshi/geshi/cil.php create mode 100644 _piecrust/libs/Geshi/geshi/clojure.php create mode 100644 _piecrust/libs/Geshi/geshi/cmake.php create mode 100644 _piecrust/libs/Geshi/geshi/cobol.php create mode 100644 _piecrust/libs/Geshi/geshi/cpp-qt.php create mode 100644 _piecrust/libs/Geshi/geshi/cpp.php create mode 100644 _piecrust/libs/Geshi/geshi/csharp.php create mode 100644 _piecrust/libs/Geshi/geshi/css.php create mode 100644 _piecrust/libs/Geshi/geshi/cuesheet.php create mode 100644 _piecrust/libs/Geshi/geshi/d.php create mode 100644 _piecrust/libs/Geshi/geshi/dcs.php create mode 100644 _piecrust/libs/Geshi/geshi/delphi.php create mode 100644 _piecrust/libs/Geshi/geshi/diff.php create mode 100644 _piecrust/libs/Geshi/geshi/div.php create mode 100644 _piecrust/libs/Geshi/geshi/dos.php create mode 100644 _piecrust/libs/Geshi/geshi/dot.php create mode 100644 _piecrust/libs/Geshi/geshi/e.php create mode 100644 _piecrust/libs/Geshi/geshi/ecmascript.php create mode 100644 _piecrust/libs/Geshi/geshi/eiffel.php create mode 100644 _piecrust/libs/Geshi/geshi/email.php create mode 100644 _piecrust/libs/Geshi/geshi/erlang.php create mode 100644 _piecrust/libs/Geshi/geshi/f1.php create mode 100644 _piecrust/libs/Geshi/geshi/fo.php create mode 100644 _piecrust/libs/Geshi/geshi/fortran.php create mode 100644 _piecrust/libs/Geshi/geshi/freebasic.php create mode 100644 _piecrust/libs/Geshi/geshi/fsharp.php create mode 100644 _piecrust/libs/Geshi/geshi/gambas.php create mode 100644 _piecrust/libs/Geshi/geshi/gdb.php create mode 100644 _piecrust/libs/Geshi/geshi/genero.php create mode 100644 _piecrust/libs/Geshi/geshi/genie.php create mode 100644 _piecrust/libs/Geshi/geshi/gettext.php create mode 100644 _piecrust/libs/Geshi/geshi/glsl.php create mode 100644 _piecrust/libs/Geshi/geshi/gml.php create mode 100644 _piecrust/libs/Geshi/geshi/gnuplot.php create mode 100644 _piecrust/libs/Geshi/geshi/go.php create mode 100644 _piecrust/libs/Geshi/geshi/groovy.php create mode 100644 _piecrust/libs/Geshi/geshi/gwbasic.php create mode 100644 _piecrust/libs/Geshi/geshi/haskell.php create mode 100644 _piecrust/libs/Geshi/geshi/hicest.php create mode 100644 _piecrust/libs/Geshi/geshi/hq9plus.php create mode 100644 _piecrust/libs/Geshi/geshi/html4strict.php create mode 100644 _piecrust/libs/Geshi/geshi/icon.php create mode 100644 _piecrust/libs/Geshi/geshi/idl.php create mode 100644 _piecrust/libs/Geshi/geshi/ini.php create mode 100644 _piecrust/libs/Geshi/geshi/inno.php create mode 100644 _piecrust/libs/Geshi/geshi/intercal.php create mode 100644 _piecrust/libs/Geshi/geshi/io.php create mode 100644 _piecrust/libs/Geshi/geshi/j.php create mode 100644 _piecrust/libs/Geshi/geshi/java.php create mode 100644 _piecrust/libs/Geshi/geshi/java5.php create mode 100644 _piecrust/libs/Geshi/geshi/javascript.php create mode 100644 _piecrust/libs/Geshi/geshi/jquery.php create mode 100644 _piecrust/libs/Geshi/geshi/kixtart.php create mode 100644 _piecrust/libs/Geshi/geshi/klonec.php create mode 100644 _piecrust/libs/Geshi/geshi/klonecpp.php create mode 100644 _piecrust/libs/Geshi/geshi/latex.php create mode 100644 _piecrust/libs/Geshi/geshi/lb.php create mode 100644 _piecrust/libs/Geshi/geshi/lisp.php create mode 100644 _piecrust/libs/Geshi/geshi/locobasic.php create mode 100644 _piecrust/libs/Geshi/geshi/logtalk.php create mode 100644 _piecrust/libs/Geshi/geshi/lolcode.php create mode 100644 _piecrust/libs/Geshi/geshi/lotusformulas.php create mode 100644 _piecrust/libs/Geshi/geshi/lotusscript.php create mode 100644 _piecrust/libs/Geshi/geshi/lscript.php create mode 100644 _piecrust/libs/Geshi/geshi/lsl2.php create mode 100644 _piecrust/libs/Geshi/geshi/lua.php create mode 100644 _piecrust/libs/Geshi/geshi/m68k.php create mode 100644 _piecrust/libs/Geshi/geshi/magiksf.php create mode 100644 _piecrust/libs/Geshi/geshi/make.php create mode 100644 _piecrust/libs/Geshi/geshi/mapbasic.php create mode 100644 _piecrust/libs/Geshi/geshi/matlab.php create mode 100644 _piecrust/libs/Geshi/geshi/mirc.php create mode 100644 _piecrust/libs/Geshi/geshi/mmix.php create mode 100644 _piecrust/libs/Geshi/geshi/modula2.php create mode 100644 _piecrust/libs/Geshi/geshi/modula3.php create mode 100644 _piecrust/libs/Geshi/geshi/mpasm.php create mode 100644 _piecrust/libs/Geshi/geshi/mxml.php create mode 100644 _piecrust/libs/Geshi/geshi/mysql.php create mode 100644 _piecrust/libs/Geshi/geshi/newlisp.php create mode 100644 _piecrust/libs/Geshi/geshi/nsis.php create mode 100644 _piecrust/libs/Geshi/geshi/oberon2.php create mode 100644 _piecrust/libs/Geshi/geshi/objc.php create mode 100644 _piecrust/libs/Geshi/geshi/objeck.php create mode 100644 _piecrust/libs/Geshi/geshi/ocaml-brief.php create mode 100644 _piecrust/libs/Geshi/geshi/ocaml.php create mode 100644 _piecrust/libs/Geshi/geshi/oobas.php create mode 100644 _piecrust/libs/Geshi/geshi/oracle11.php create mode 100644 _piecrust/libs/Geshi/geshi/oracle8.php create mode 100644 _piecrust/libs/Geshi/geshi/oxygene.php create mode 100644 _piecrust/libs/Geshi/geshi/oz.php create mode 100644 _piecrust/libs/Geshi/geshi/pascal.php create mode 100644 _piecrust/libs/Geshi/geshi/pcre.php create mode 100644 _piecrust/libs/Geshi/geshi/per.php create mode 100644 _piecrust/libs/Geshi/geshi/perl.php create mode 100644 _piecrust/libs/Geshi/geshi/perl6.php create mode 100644 _piecrust/libs/Geshi/geshi/pf.php create mode 100644 _piecrust/libs/Geshi/geshi/php-brief.php create mode 100644 _piecrust/libs/Geshi/geshi/php.php create mode 100644 _piecrust/libs/Geshi/geshi/pic16.php create mode 100644 _piecrust/libs/Geshi/geshi/pike.php create mode 100644 _piecrust/libs/Geshi/geshi/pixelbender.php create mode 100644 _piecrust/libs/Geshi/geshi/plsql.php create mode 100644 _piecrust/libs/Geshi/geshi/postgresql.php create mode 100644 _piecrust/libs/Geshi/geshi/povray.php create mode 100644 _piecrust/libs/Geshi/geshi/powerbuilder.php create mode 100644 _piecrust/libs/Geshi/geshi/powershell.php create mode 100644 _piecrust/libs/Geshi/geshi/progress.php create mode 100644 _piecrust/libs/Geshi/geshi/prolog.php create mode 100644 _piecrust/libs/Geshi/geshi/properties.php create mode 100644 _piecrust/libs/Geshi/geshi/providex.php create mode 100644 _piecrust/libs/Geshi/geshi/purebasic.php create mode 100644 _piecrust/libs/Geshi/geshi/python.php create mode 100644 _piecrust/libs/Geshi/geshi/q.php create mode 100644 _piecrust/libs/Geshi/geshi/qbasic.php create mode 100644 _piecrust/libs/Geshi/geshi/rails.php create mode 100644 _piecrust/libs/Geshi/geshi/rebol.php create mode 100644 _piecrust/libs/Geshi/geshi/reg.php create mode 100644 _piecrust/libs/Geshi/geshi/robots.php create mode 100644 _piecrust/libs/Geshi/geshi/rpmspec.php create mode 100644 _piecrust/libs/Geshi/geshi/rsplus.php create mode 100644 _piecrust/libs/Geshi/geshi/ruby.php create mode 100644 _piecrust/libs/Geshi/geshi/sas.php create mode 100644 _piecrust/libs/Geshi/geshi/scala.php create mode 100644 _piecrust/libs/Geshi/geshi/scheme.php create mode 100644 _piecrust/libs/Geshi/geshi/scilab.php create mode 100644 _piecrust/libs/Geshi/geshi/sdlbasic.php create mode 100644 _piecrust/libs/Geshi/geshi/smalltalk.php create mode 100644 _piecrust/libs/Geshi/geshi/smarty.php create mode 100644 _piecrust/libs/Geshi/geshi/sql.php create mode 100644 _piecrust/libs/Geshi/geshi/systemverilog.php create mode 100644 _piecrust/libs/Geshi/geshi/tcl.php create mode 100644 _piecrust/libs/Geshi/geshi/teraterm.php create mode 100644 _piecrust/libs/Geshi/geshi/text.php create mode 100644 _piecrust/libs/Geshi/geshi/thinbasic.php create mode 100644 _piecrust/libs/Geshi/geshi/tsql.php create mode 100644 _piecrust/libs/Geshi/geshi/typoscript.php create mode 100644 _piecrust/libs/Geshi/geshi/unicon.php create mode 100644 _piecrust/libs/Geshi/geshi/vala.php create mode 100644 _piecrust/libs/Geshi/geshi/vb.php create mode 100644 _piecrust/libs/Geshi/geshi/vbnet.php create mode 100644 _piecrust/libs/Geshi/geshi/verilog.php create mode 100644 _piecrust/libs/Geshi/geshi/vhdl.php create mode 100644 _piecrust/libs/Geshi/geshi/vim.php create mode 100644 _piecrust/libs/Geshi/geshi/visualfoxpro.php create mode 100644 _piecrust/libs/Geshi/geshi/visualprolog.php create mode 100644 _piecrust/libs/Geshi/geshi/whitespace.php create mode 100644 _piecrust/libs/Geshi/geshi/whois.php create mode 100644 _piecrust/libs/Geshi/geshi/winbatch.php create mode 100644 _piecrust/libs/Geshi/geshi/xbasic.php create mode 100644 _piecrust/libs/Geshi/geshi/xml.php create mode 100644 _piecrust/libs/Geshi/geshi/xorg_conf.php create mode 100644 _piecrust/libs/Geshi/geshi/xpp.php create mode 100644 _piecrust/libs/Geshi/geshi/z80.php create mode 100644 _piecrust/libs/Geshi/geshi/zxbasic.php create mode 100755 _piecrust/libs/LessPhp/LICENSE create mode 100755 _piecrust/libs/LessPhp/README.md create mode 100755 _piecrust/libs/LessPhp/lessc.inc.php create mode 100755 _piecrust/libs/LessPhp/lessify create mode 100755 _piecrust/libs/LessPhp/lessify.inc.php create mode 100755 _piecrust/libs/LessPhp/plessc create mode 100644 _piecrust/libs/Log/Log.php create mode 100644 _piecrust/libs/Log/Log/composite.php create mode 100644 _piecrust/libs/Log/Log/console.php create mode 100644 _piecrust/libs/Log/Log/daemon.php create mode 100644 _piecrust/libs/Log/Log/display.php create mode 100644 _piecrust/libs/Log/Log/error_log.php create mode 100644 _piecrust/libs/Log/Log/file.php create mode 100644 _piecrust/libs/Log/Log/firebug.php create mode 100644 _piecrust/libs/Log/Log/mail.php create mode 100644 _piecrust/libs/Log/Log/mcal.php create mode 100644 _piecrust/libs/Log/Log/mdb2.php create mode 100644 _piecrust/libs/Log/Log/null.php create mode 100644 _piecrust/libs/Log/Log/observer.php create mode 100644 _piecrust/libs/Log/Log/sql.php create mode 100644 _piecrust/libs/Log/Log/sqlite.php create mode 100644 _piecrust/libs/Log/Log/syslog.php create mode 100644 _piecrust/libs/Log/Log/win.php create mode 100644 _piecrust/libs/Markdown/License.text create mode 100644 _piecrust/libs/Markdown/PHP Markdown Readme.text create mode 100644 _piecrust/libs/Markdown/markdown.php create mode 100644 _piecrust/libs/MarkdownExtra/License.text create mode 100644 _piecrust/libs/MarkdownExtra/PHP Markdown Extra Readme.text create mode 100644 _piecrust/libs/MarkdownExtra/markdown.php create mode 100644 _piecrust/libs/Mustache/LICENSE create mode 100644 _piecrust/libs/Mustache/Mustache.php create mode 100644 _piecrust/libs/Mustache/README.markdown create mode 100644 _piecrust/libs/PEAR/Autoloader.php create mode 100644 _piecrust/libs/PEAR/Builder.php create mode 100644 _piecrust/libs/PEAR/ChannelFile.php create mode 100644 _piecrust/libs/PEAR/ChannelFile/Parser.php create mode 100644 _piecrust/libs/PEAR/Command.php create mode 100644 _piecrust/libs/PEAR/Command/Auth.php create mode 100644 _piecrust/libs/PEAR/Command/Auth.xml create mode 100644 _piecrust/libs/PEAR/Command/Build.php create mode 100644 _piecrust/libs/PEAR/Command/Build.xml create mode 100644 _piecrust/libs/PEAR/Command/Channels.php create mode 100644 _piecrust/libs/PEAR/Command/Channels.xml create mode 100644 _piecrust/libs/PEAR/Command/Common.php create mode 100644 _piecrust/libs/PEAR/Command/Config.php create mode 100644 _piecrust/libs/PEAR/Command/Config.xml create mode 100644 _piecrust/libs/PEAR/Command/Install.php create mode 100644 _piecrust/libs/PEAR/Command/Install.xml create mode 100644 _piecrust/libs/PEAR/Command/Mirror.php create mode 100644 _piecrust/libs/PEAR/Command/Mirror.xml create mode 100644 _piecrust/libs/PEAR/Command/Package.php create mode 100644 _piecrust/libs/PEAR/Command/Package.xml create mode 100644 _piecrust/libs/PEAR/Command/Pickle.php create mode 100644 _piecrust/libs/PEAR/Command/Pickle.xml create mode 100644 _piecrust/libs/PEAR/Command/Registry.php create mode 100644 _piecrust/libs/PEAR/Command/Registry.xml create mode 100644 _piecrust/libs/PEAR/Command/Remote.php create mode 100644 _piecrust/libs/PEAR/Command/Remote.xml create mode 100644 _piecrust/libs/PEAR/Command/Test.php create mode 100644 _piecrust/libs/PEAR/Command/Test.xml create mode 100644 _piecrust/libs/PEAR/Common.php create mode 100644 _piecrust/libs/PEAR/Config.php create mode 100644 _piecrust/libs/PEAR/Dependency2.php create mode 100644 _piecrust/libs/PEAR/DependencyDB.php create mode 100644 _piecrust/libs/PEAR/Downloader.php create mode 100644 _piecrust/libs/PEAR/Downloader/Package.php create mode 100644 _piecrust/libs/PEAR/ErrorStack.php create mode 100644 _piecrust/libs/PEAR/Exception.php create mode 100644 _piecrust/libs/PEAR/FixPHP5PEARWarnings.php create mode 100644 _piecrust/libs/PEAR/Frontend.php create mode 100644 _piecrust/libs/PEAR/Frontend/CLI.php create mode 100644 _piecrust/libs/PEAR/Installer.php create mode 100644 _piecrust/libs/PEAR/Installer/Role.php create mode 100644 _piecrust/libs/PEAR/Installer/Role/Cfg.php create mode 100644 _piecrust/libs/PEAR/Installer/Role/Cfg.xml create mode 100644 _piecrust/libs/PEAR/Installer/Role/Common.php create mode 100644 _piecrust/libs/PEAR/Installer/Role/Data.php create mode 100644 _piecrust/libs/PEAR/Installer/Role/Data.xml create mode 100644 _piecrust/libs/PEAR/Installer/Role/Doc.php create mode 100644 _piecrust/libs/PEAR/Installer/Role/Doc.xml create mode 100644 _piecrust/libs/PEAR/Installer/Role/Ext.php create mode 100644 _piecrust/libs/PEAR/Installer/Role/Ext.xml create mode 100644 _piecrust/libs/PEAR/Installer/Role/Php.php create mode 100644 _piecrust/libs/PEAR/Installer/Role/Php.xml create mode 100644 _piecrust/libs/PEAR/Installer/Role/Script.php create mode 100644 _piecrust/libs/PEAR/Installer/Role/Script.xml create mode 100644 _piecrust/libs/PEAR/Installer/Role/Src.php create mode 100644 _piecrust/libs/PEAR/Installer/Role/Src.xml create mode 100644 _piecrust/libs/PEAR/Installer/Role/Test.php create mode 100644 _piecrust/libs/PEAR/Installer/Role/Test.xml create mode 100644 _piecrust/libs/PEAR/Installer/Role/Www.php create mode 100644 _piecrust/libs/PEAR/Installer/Role/Www.xml create mode 100644 _piecrust/libs/PEAR/PackageFile.php create mode 100644 _piecrust/libs/PEAR/PackageFile/Generator/v1.php create mode 100644 _piecrust/libs/PEAR/PackageFile/Generator/v2.php create mode 100644 _piecrust/libs/PEAR/PackageFile/Parser/v1.php create mode 100644 _piecrust/libs/PEAR/PackageFile/Parser/v2.php create mode 100644 _piecrust/libs/PEAR/PackageFile/v1.php create mode 100644 _piecrust/libs/PEAR/PackageFile/v2.php create mode 100644 _piecrust/libs/PEAR/PackageFile/v2/Validator.php create mode 100644 _piecrust/libs/PEAR/PackageFile/v2/rw.php create mode 100644 _piecrust/libs/PEAR/Packager.php create mode 100644 _piecrust/libs/PEAR/REST.php create mode 100644 _piecrust/libs/PEAR/REST/10.php create mode 100644 _piecrust/libs/PEAR/REST/11.php create mode 100644 _piecrust/libs/PEAR/REST/13.php create mode 100644 _piecrust/libs/PEAR/Registry.php create mode 100644 _piecrust/libs/PEAR/RunTest.php create mode 100644 _piecrust/libs/PEAR/Task/Common.php create mode 100644 _piecrust/libs/PEAR/Task/Postinstallscript.php create mode 100644 _piecrust/libs/PEAR/Task/Postinstallscript/rw.php create mode 100644 _piecrust/libs/PEAR/Task/Replace.php create mode 100644 _piecrust/libs/PEAR/Task/Replace/rw.php create mode 100644 _piecrust/libs/PEAR/Task/Unixeol.php create mode 100644 _piecrust/libs/PEAR/Task/Unixeol/rw.php create mode 100644 _piecrust/libs/PEAR/Task/Windowseol.php create mode 100644 _piecrust/libs/PEAR/Task/Windowseol/rw.php create mode 100644 _piecrust/libs/PEAR/Validate.php create mode 100644 _piecrust/libs/PEAR/Validator/PECL.php create mode 100644 _piecrust/libs/PEAR/XMLParser.php create mode 100755 _piecrust/libs/PhamlP/Phamlp.php create mode 100755 _piecrust/libs/PhamlP/PhamlpException.php create mode 100755 _piecrust/libs/PhamlP/haml/HamlException.php create mode 100755 _piecrust/libs/PhamlP/haml/HamlHelpers.php create mode 100755 _piecrust/libs/PhamlP/haml/HamlParser.php create mode 100755 _piecrust/libs/PhamlP/haml/filters/HamlBaseFilter.php create mode 100755 _piecrust/libs/PhamlP/haml/filters/HamlCdataFilter.php create mode 100755 _piecrust/libs/PhamlP/haml/filters/HamlCssFilter.php create mode 100755 _piecrust/libs/PhamlP/haml/filters/HamlEscapedFilter.php create mode 100755 _piecrust/libs/PhamlP/haml/filters/HamlJavascriptFilter.php create mode 100755 _piecrust/libs/PhamlP/haml/filters/HamlPhpFilter.php create mode 100755 _piecrust/libs/PhamlP/haml/filters/HamlPlainFilter.php create mode 100755 _piecrust/libs/PhamlP/haml/filters/HamlPreserveFilter.php create mode 100755 _piecrust/libs/PhamlP/haml/filters/HamlSassFilter.php create mode 100755 _piecrust/libs/PhamlP/haml/filters/HamlScssFilter.php create mode 100755 _piecrust/libs/PhamlP/haml/filters/_HamlMarkdownFilter.php create mode 100755 _piecrust/libs/PhamlP/haml/filters/_HamlTextileFilter.php create mode 100755 _piecrust/libs/PhamlP/haml/messages/_i18n.php create mode 100755 _piecrust/libs/PhamlP/haml/messages/de.php create mode 100755 _piecrust/libs/PhamlP/haml/messages/fr.php create mode 100755 _piecrust/libs/PhamlP/haml/renderers/HamlCompactRenderer.php create mode 100755 _piecrust/libs/PhamlP/haml/renderers/HamlCompressedRenderer.php create mode 100755 _piecrust/libs/PhamlP/haml/renderers/HamlExpandedRenderer.php create mode 100755 _piecrust/libs/PhamlP/haml/renderers/HamlNestedRenderer.php create mode 100755 _piecrust/libs/PhamlP/haml/renderers/HamlRenderer.php create mode 100755 _piecrust/libs/PhamlP/haml/tree/HamlCodeBlockNode.php create mode 100755 _piecrust/libs/PhamlP/haml/tree/HamlCommentNode.php create mode 100755 _piecrust/libs/PhamlP/haml/tree/HamlDoctypeNode.php create mode 100755 _piecrust/libs/PhamlP/haml/tree/HamlElementNode.php create mode 100755 _piecrust/libs/PhamlP/haml/tree/HamlFilterNode.php create mode 100755 _piecrust/libs/PhamlP/haml/tree/HamlHelperNode.php create mode 100755 _piecrust/libs/PhamlP/haml/tree/HamlNode.php create mode 100755 _piecrust/libs/PhamlP/haml/tree/HamlNodeExceptions.php create mode 100755 _piecrust/libs/PhamlP/haml/tree/HamlRootNode.php create mode 100644 _piecrust/libs/PhamlP/readme.txt create mode 100755 _piecrust/libs/PhamlP/sass/SassException.php create mode 100755 _piecrust/libs/PhamlP/sass/SassFile.php create mode 100755 _piecrust/libs/PhamlP/sass/SassParser.php create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/config.php create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/_blueprint.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_buttons.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_colors.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_debug.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_fancy-type.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_form.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_grid.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_ie.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_interaction.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_link-icons.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_liquid.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_print.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_reset.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_rtl.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_scaffolding.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_typography.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_utilities.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/grid.png create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/ie.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/manifest.rb create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/partials/_base.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/print.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/screen.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/buttons/buttons.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/buttons/buttons/cross.png create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/buttons/buttons/key.png create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/buttons/buttons/tick.png create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/buttons/manifest.rb create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/doc.png create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/email.png create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/external.png create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/feed.png create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/im.png create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/pdf.png create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/visited.png create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/link_icons/link_icons/xls.png create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/link_icons/manifest.rb create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/project/grid.png create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/project/ie.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/project/manifest.rb create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/project/partials/_base.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/project/print.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/project/screen.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/semantic/grid.png create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/semantic/ie.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/semantic/manifest.rb create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/semantic/partials/_base.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/semantic/partials/_form.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/semantic/partials/_page.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/semantic/partials/_two_col.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/semantic/print.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/semantic/screen.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/_compass.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/_css3.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/_layout.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/_reset.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/_utilities.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_background-clip.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_background-origin.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_background-size.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_border-radius.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_box-shadow.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_box-sizing.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_box.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_columns.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_font-face.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_gradient.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_inline-block.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_opacity.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_shared.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_text-shadow.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_transform.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/css3/_transition.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/layout/_sticky-footer.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/reset/_utilities.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/_general.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/_links.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/_lists.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/_print.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/_sprites.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/_tables.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/_text.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/general/_float.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/general/_hacks.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/general/_min.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/general/_reset.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/general/_tabs.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/general/_tag-cloud.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/links/_hover-link.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/links/_link-colors.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/links/_unstyled-link.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/lists/_bullets.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal-list.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/lists/_inline-block-list.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/lists/_inline-list.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/sprites/_sprite-img.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/tables/_alternating-rows-and-columns.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/tables/_borders.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/tables/_scaffolding.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/text/_ellipsis.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/text/_nowrap.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/stylesheets/compass/utilities/text/_replacement.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/templates/ellipsis/ellipsis.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/templates/ellipsis/manifest.rb create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/templates/ellipsis/xml/ellipsis.xml create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/templates/extension/manifest.rb create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/templates/extension/stylesheets/main.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/templates/extension/templates/project/manifest.rb create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/templates/extension/templates/project/screen.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/templates/project/USAGE.markdown create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/templates/project/ie.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/templates/project/manifest.rb create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/templates/project/print.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/frameworks/compass/templates/project/screen.sass create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/functions/colourStops.php create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/functions/constants.php create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/functions/fontFiles.php create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/functions/imageSize.php create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/functions/inlineData.php create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/functions/lists.php create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/functions/selectors.php create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/functions/urls.php create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/_compass.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/_css3.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/_layout.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/_reset.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/_utilities.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/css3/_background-clip.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/css3/_background-origin.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/css3/_background-size.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/css3/_border-radius.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/css3/_box-shadow.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/css3/_box-sizing.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/css3/_box.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/css3/_columns.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/css3/_font-face.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/css3/_gradient.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/css3/_inline-block.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/css3/_opacity.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/css3/_shared.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/css3/_text-shadow.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/css3/_transform.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/css3/_transition.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/layout/_sticky-footer.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/reset/_utilities.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/_general.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/_links.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/_lists.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/_print.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/_sprites.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/_tables.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/_text.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/general/_clearfix.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/general/_float.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/general/_hacks.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/general/_min.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/general/_reset.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/general/_tabs.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/general/_tag-cloud.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/links/_hover-link.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/links/_link-colors.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/links/_unstyled-link.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/lists/_bullets.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/lists/_horizontal-list.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/lists/_inline-block-list.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/lists/_inline-list.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/sprites/_sprite-img.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/tables/_alternating-rows-and-columns.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/tables/_borders.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/tables/_scaffolding.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/text/_ellipsis.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/text/_nowrap.scss create mode 100755 _piecrust/libs/PhamlP/sass/extensions/compass/stylesheets/compass/utilities/text/_replacement.scss create mode 100755 _piecrust/libs/PhamlP/sass/messages/_i18n.php create mode 100755 _piecrust/libs/PhamlP/sass/messages/de.php create mode 100755 _piecrust/libs/PhamlP/sass/messages/fr.php create mode 100755 _piecrust/libs/PhamlP/sass/renderers/SassCompactRenderer.php create mode 100755 _piecrust/libs/PhamlP/sass/renderers/SassCompressedRenderer.php create mode 100755 _piecrust/libs/PhamlP/sass/renderers/SassExpandedRenderer.php create mode 100755 _piecrust/libs/PhamlP/sass/renderers/SassNestedRenderer.php create mode 100755 _piecrust/libs/PhamlP/sass/renderers/SassRenderer.php create mode 100755 _piecrust/libs/PhamlP/sass/script/SassScriptFunction.php create mode 100755 _piecrust/libs/PhamlP/sass/script/SassScriptFunctions.php create mode 100755 _piecrust/libs/PhamlP/sass/script/SassScriptLexer.php create mode 100755 _piecrust/libs/PhamlP/sass/script/SassScriptOperation.php create mode 100755 _piecrust/libs/PhamlP/sass/script/SassScriptParser.php create mode 100755 _piecrust/libs/PhamlP/sass/script/SassScriptParserExceptions.php create mode 100755 _piecrust/libs/PhamlP/sass/script/SassScriptVariable.php create mode 100755 _piecrust/libs/PhamlP/sass/script/literals/SassBoolean.php create mode 100755 _piecrust/libs/PhamlP/sass/script/literals/SassColour.php create mode 100755 _piecrust/libs/PhamlP/sass/script/literals/SassLiteral.php create mode 100755 _piecrust/libs/PhamlP/sass/script/literals/SassLiteralExceptions.php create mode 100755 _piecrust/libs/PhamlP/sass/script/literals/SassNumber.php create mode 100755 _piecrust/libs/PhamlP/sass/script/literals/SassString.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassCommentNode.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassContext.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassDebugNode.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassDirectiveNode.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassElseNode.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassExtendNode.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassForNode.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassIfNode.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassImportNode.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassMixinDefinitionNode.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassMixinNode.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassNode.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassNodeExceptions.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassPropertyNode.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassRootNode.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassRuleNode.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassVariableNode.php create mode 100755 _piecrust/libs/PhamlP/sass/tree/SassWhileNode.php create mode 100644 _piecrust/libs/Smartypants/PHP SmartyPants Readme.txt create mode 100644 _piecrust/libs/Smartypants/smartypants.php create mode 100644 _piecrust/libs/SmartypantsTypographer/License.text create mode 100644 _piecrust/libs/SmartypantsTypographer/PHP SmartyPants Readme.txt create mode 100644 _piecrust/libs/SmartypantsTypographer/smartypants.php create mode 100644 _piecrust/libs/StupidHttp/StupidHttp_ConsoleLog.php create mode 100644 _piecrust/libs/StupidHttp/StupidHttp_HandlerContext.php create mode 100644 _piecrust/libs/StupidHttp/StupidHttp_Log.php create mode 100644 _piecrust/libs/StupidHttp/StupidHttp_MultiLog.php create mode 100644 _piecrust/libs/StupidHttp/StupidHttp_PearLog.php create mode 100644 _piecrust/libs/StupidHttp/StupidHttp_WebException.php create mode 100644 _piecrust/libs/StupidHttp/StupidHttp_WebRequest.php create mode 100644 _piecrust/libs/StupidHttp/StupidHttp_WebRequestHandler.php create mode 100644 _piecrust/libs/StupidHttp/StupidHttp_WebResponse.php create mode 100644 _piecrust/libs/StupidHttp/StupidHttp_WebServer.php create mode 100644 _piecrust/libs/StupidHttp/directory-listing.html create mode 100644 _piecrust/libs/StupidHttp/mime.types create mode 100644 _piecrust/libs/Textile/README.textile create mode 100644 _piecrust/libs/Textile/classTextile.php create mode 100755 _piecrust/libs/Twig/AUTHORS create mode 100755 _piecrust/libs/Twig/CHANGELOG create mode 100755 _piecrust/libs/Twig/LICENSE create mode 100755 _piecrust/libs/Twig/README.markdown create mode 100755 _piecrust/libs/Twig/lib/Twig/Autoloader.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Compiler.php create mode 100755 _piecrust/libs/Twig/lib/Twig/CompilerInterface.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Environment.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Error.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Error/Loader.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Error/Runtime.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Error/Syntax.php create mode 100755 _piecrust/libs/Twig/lib/Twig/ExpressionParser.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Extension.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Extension/Core.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Extension/Escaper.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Extension/Optimizer.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Extension/Sandbox.php create mode 100755 _piecrust/libs/Twig/lib/Twig/ExtensionInterface.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Filter.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Filter/Function.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Filter/Method.php create mode 100755 _piecrust/libs/Twig/lib/Twig/FilterInterface.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Function.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Function/Function.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Function/Method.php create mode 100755 _piecrust/libs/Twig/lib/Twig/FunctionInterface.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Lexer.php create mode 100755 _piecrust/libs/Twig/lib/Twig/LexerInterface.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Loader/Array.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Loader/Filesystem.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Loader/String.php create mode 100755 _piecrust/libs/Twig/lib/Twig/LoaderInterface.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Markup.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/AutoEscape.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Block.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/BlockReference.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Array.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/AssignName.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/Add.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/And.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/Concat.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/Div.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/Equal.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/FloorDiv.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/Greater.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/GreaterEqual.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/In.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/Less.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/LessEqual.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/Mod.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/Mul.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/NotEqual.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/NotIn.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/Or.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/Power.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/Range.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Binary/Sub.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/BlockReference.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Conditional.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Constant.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/ExtensionReference.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Filter.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Function.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/GetAttr.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Name.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Parent.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Test.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Unary.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Unary/Neg.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Unary/Not.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Expression/Unary/Pos.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/For.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/If.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Import.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Include.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Macro.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Module.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Print.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Sandbox.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/SandboxedModule.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/SandboxedPrint.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Set.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Spaceless.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Node/Text.php create mode 100755 _piecrust/libs/Twig/lib/Twig/NodeInterface.php create mode 100755 _piecrust/libs/Twig/lib/Twig/NodeOutputInterface.php create mode 100755 _piecrust/libs/Twig/lib/Twig/NodeTraverser.php create mode 100755 _piecrust/libs/Twig/lib/Twig/NodeVisitor/Escaper.php create mode 100755 _piecrust/libs/Twig/lib/Twig/NodeVisitor/Optimizer.php create mode 100755 _piecrust/libs/Twig/lib/Twig/NodeVisitor/SafeAnalysis.php create mode 100755 _piecrust/libs/Twig/lib/Twig/NodeVisitor/Sandbox.php create mode 100755 _piecrust/libs/Twig/lib/Twig/NodeVisitorInterface.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Parser.php create mode 100755 _piecrust/libs/Twig/lib/Twig/ParserInterface.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Sandbox/SecurityError.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Sandbox/SecurityPolicy.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Sandbox/SecurityPolicyInterface.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Template.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TemplateInterface.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Test/Function.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Test/Method.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TestInterface.php create mode 100755 _piecrust/libs/Twig/lib/Twig/Token.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenParser.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenParser/AutoEscape.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenParser/Block.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenParser/Extends.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenParser/Filter.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenParser/For.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenParser/From.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenParser/If.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenParser/Import.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenParser/Include.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenParser/Macro.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenParser/Sandbox.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenParser/Set.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenParser/Spaceless.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenParserBroker.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenParserBrokerInterface.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenParserInterface.php create mode 100755 _piecrust/libs/Twig/lib/Twig/TokenStream.php create mode 100755 _piecrust/libs/Twig/package.xml.tpl create mode 100644 _piecrust/libs/sfYaml/LICENSE create mode 100644 _piecrust/libs/sfYaml/README.markdown create mode 100644 _piecrust/libs/sfYaml/lib/sfYaml.php create mode 100644 _piecrust/libs/sfYaml/lib/sfYamlDumper.php create mode 100644 _piecrust/libs/sfYaml/lib/sfYamlInline.php create mode 100644 _piecrust/libs/sfYaml/lib/sfYamlParser.php create mode 100644 _piecrust/libs/sfYaml/package.xml create mode 100644 _piecrust/piecrust.php create mode 100644 _piecrust/resources/messages/404.html create mode 100644 _piecrust/resources/messages/critical.html create mode 100644 _piecrust/resources/messages/error.html create mode 100644 _piecrust/resources/messages/requirements.html create mode 100644 _piecrust/resources/messages/welcome.html create mode 100644 _piecrust/resources/webinit/default_index.html create mode 100644 _piecrust/resources/webinit/default_template.html create mode 100644 _piecrust/resources/webinit/htaccess create mode 100644 _piecrust/resources/webinit/web.config create mode 100644 _piecrust/src/PieCrust/Baker/BakeRecord.php create mode 100644 _piecrust/src/PieCrust/Baker/DirectoryBaker.php create mode 100644 _piecrust/src/PieCrust/Baker/PageBaker.php create mode 100644 _piecrust/src/PieCrust/Baker/PieCrustBaker.php create mode 100644 _piecrust/src/PieCrust/Baker/Processors/CopyFileProcessor.php create mode 100644 _piecrust/src/PieCrust/Baker/Processors/IProcessor.php create mode 100644 _piecrust/src/PieCrust/Baker/Processors/LessProcessor.php create mode 100644 _piecrust/src/PieCrust/Baker/Processors/SassProcessor.php create mode 100644 _piecrust/src/PieCrust/Baker/Processors/SimpleFileProcessor.php create mode 100644 _piecrust/src/PieCrust/Baker/Processors/SitemapProcessor.php create mode 100644 _piecrust/src/PieCrust/Chef/Chef.php create mode 100644 _piecrust/src/PieCrust/Chef/Commands/BakeCommand.php create mode 100644 _piecrust/src/PieCrust/Chef/Commands/IChefCommand.php create mode 100644 _piecrust/src/PieCrust/Chef/Commands/ImportCommand.php create mode 100644 _piecrust/src/PieCrust/Chef/Commands/InitCommand.php create mode 100644 _piecrust/src/PieCrust/Chef/Commands/ServeCommand.php create mode 100644 _piecrust/src/PieCrust/Chef/Commands/UploadCommand.php create mode 100644 _piecrust/src/PieCrust/Formatters/HamlFormatter.php create mode 100644 _piecrust/src/PieCrust/Formatters/IFormatter.php create mode 100644 _piecrust/src/PieCrust/Formatters/MarkdownFormatter.php create mode 100644 _piecrust/src/PieCrust/Formatters/PassThroughFormatter.php create mode 100644 _piecrust/src/PieCrust/Formatters/SmartyPantsFormatter.php create mode 100644 _piecrust/src/PieCrust/Formatters/TextileFormatter.php create mode 100644 _piecrust/src/PieCrust/IO/Cache.php create mode 100644 _piecrust/src/PieCrust/IO/FileSystem.php create mode 100644 _piecrust/src/PieCrust/IO/FlatFileSystem.php create mode 100644 _piecrust/src/PieCrust/IO/HierarchicalFileSystem.php create mode 100644 _piecrust/src/PieCrust/IO/ShallowFileSystem.php create mode 100644 _piecrust/src/PieCrust/Interop/Importers/IImporter.class.php create mode 100644 _piecrust/src/PieCrust/Interop/Importers/WordpressImporter.class.php create mode 100644 _piecrust/src/PieCrust/Interop/PieCrustImporter.php create mode 100644 _piecrust/src/PieCrust/Page/Assetor.php create mode 100644 _piecrust/src/PieCrust/Page/Filtering/AndBooleanClause.php create mode 100644 _piecrust/src/PieCrust/Page/Filtering/BooleanClause.php create mode 100644 _piecrust/src/PieCrust/Page/Filtering/FilterClause.php create mode 100644 _piecrust/src/PieCrust/Page/Filtering/HasFilterClause.php create mode 100644 _piecrust/src/PieCrust/Page/Filtering/IClause.php create mode 100644 _piecrust/src/PieCrust/Page/Filtering/IsFilterClause.php create mode 100644 _piecrust/src/PieCrust/Page/Filtering/NotClause.php create mode 100644 _piecrust/src/PieCrust/Page/Filtering/OrBooleanClause.php create mode 100644 _piecrust/src/PieCrust/Page/Filtering/PaginationFilter.php create mode 100644 _piecrust/src/PieCrust/Page/Linker.php create mode 100644 _piecrust/src/PieCrust/Page/Page.php create mode 100644 _piecrust/src/PieCrust/Page/PageRenderer.php create mode 100644 _piecrust/src/PieCrust/Page/PageRepository.php create mode 100644 _piecrust/src/PieCrust/Page/PageWrapper.php create mode 100644 _piecrust/src/PieCrust/Page/PaginationIterator.php create mode 100644 _piecrust/src/PieCrust/Page/Paginator.php create mode 100644 _piecrust/src/PieCrust/PieCrust.php create mode 100644 _piecrust/src/PieCrust/PieCrustCacheInfo.php create mode 100644 _piecrust/src/PieCrust/PieCrustConfiguration.php create mode 100644 _piecrust/src/PieCrust/PieCrustErrorHandler.php create mode 100644 _piecrust/src/PieCrust/PieCrustException.php create mode 100644 _piecrust/src/PieCrust/PieCrustSiteData.php create mode 100644 _piecrust/src/PieCrust/Plugins/Dwoo/pca.php create mode 100644 _piecrust/src/PieCrust/Plugins/Dwoo/pccaturl.php create mode 100644 _piecrust/src/PieCrust/Plugins/Dwoo/pcposturl.php create mode 100644 _piecrust/src/PieCrust/Plugins/Dwoo/pctagurl.php create mode 100644 _piecrust/src/PieCrust/Plugins/Dwoo/pcurl.php create mode 100644 _piecrust/src/PieCrust/Plugins/Haml/HamlMarkdownFilter.php create mode 100644 _piecrust/src/PieCrust/Plugins/Haml/HamlTextileFilter.php create mode 100644 _piecrust/src/PieCrust/Plugins/Twig/ExtendedFilesystem.php create mode 100644 _piecrust/src/PieCrust/Plugins/Twig/GeshiExtension.php create mode 100644 _piecrust/src/PieCrust/Plugins/Twig/GeshiNode.php create mode 100644 _piecrust/src/PieCrust/Plugins/Twig/GeshiTokenParser.php create mode 100644 _piecrust/src/PieCrust/Plugins/Twig/PieCrustExtension.php create mode 100644 _piecrust/src/PieCrust/Plugins/Twig/PieCrustFormatterNode.php create mode 100644 _piecrust/src/PieCrust/Plugins/Twig/PieCrustFormatterTokenParser.php create mode 100644 _piecrust/src/PieCrust/Server/PieCrustServer.php create mode 100644 _piecrust/src/PieCrust/TemplateEngines/DwooTemplateEngine.php create mode 100644 _piecrust/src/PieCrust/TemplateEngines/HamlTemplateEngine.php create mode 100644 _piecrust/src/PieCrust/TemplateEngines/ITemplateEngine.php create mode 100644 _piecrust/src/PieCrust/TemplateEngines/MustacheTemplateEngine.php create mode 100644 _piecrust/src/PieCrust/TemplateEngines/TwigTemplateEngine.php create mode 100644 _piecrust/src/PieCrust/Util/HttpHeaderHelper.php create mode 100644 _piecrust/src/PieCrust/Util/LinkCollector.php create mode 100644 _piecrust/src/PieCrust/Util/PluginLoader.php create mode 100644 _piecrust/src/PieCrust/Util/ServerHelper.php create mode 100644 _piecrust/src/PieCrust/Util/UriBuilder.php create mode 100644 _piecrust/src/PieCrust/Util/UriParser.php create mode 100644 _piecrust/version_check.php diff --git a/_piecrust/chef b/_piecrust/chef new file mode 100755 index 0000000..afbcff6 --- /dev/null +++ b/_piecrust/chef @@ -0,0 +1,16 @@ +#!/bin/sh + +POSSIBLES=('/usr/bin/php-5.3' '/usr/local/bin/php-5.3' '/usr/bin/php' '/usr/local/bin/php') +for CUR in ${POSSIBLES[@]}; do + if [ -x $CUR ]; then + PHP=$CUR + break + fi +done +if [ -z "$PHP" ]; then + echo "Couldn't find PHP in any of the known locations." + exit 1 +fi + +CHEF_DIR=`dirname $0` +$PHP $CHEF_DIR/chef.php $@ diff --git a/_piecrust/chef.cmd b/_piecrust/chef.cmd new file mode 100644 index 0000000..c18b892 --- /dev/null +++ b/_piecrust/chef.cmd @@ -0,0 +1,23 @@ +@echo off +setlocal + +if defined PHPEXE goto RunChef + +if defined PHPRC ( + set PHPEXE="%PHPRC%php.exe" + goto RunChef +) + +if defined PHP_PEAR_BIN_DIR ( + set PHPEXE="%PHP_PEAR_BIN_DIR%\php.exe" + goto RunChef +) + +echo Can't find the PHP executable. Is it installed somewhere? +echo (if you're using a portable version, please define a PHPEXE environment +echo variable pointing to it) +exit /b 1 +goto :eof + +:RunChef +%PHPEXE% %~dp0chef.php %* diff --git a/_piecrust/chef.php b/_piecrust/chef.php new file mode 100755 index 0000000..27bfa0f --- /dev/null +++ b/_piecrust/chef.php @@ -0,0 +1,6 @@ +#!/usr/bin/php + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: CommandLine.php 297057 2010-03-29 09:42:19Z rquadling $ + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + * @filesource + */ + +/** + * Required unconditionally + */ +require_once 'Console/CommandLine/Exception.php'; +require_once 'Console/CommandLine/Outputter/Default.php'; +require_once 'Console/CommandLine/Renderer/Default.php'; +require_once 'Console/CommandLine/MessageProvider/Default.php'; + +/** + * Main class for parsing command line options and arguments. + * + * There are three ways to create parsers with this class: + * + * // direct usage + * $parser = new Console_CommandLine(); + * + * // with an xml definition file + * $parser = Console_CommandLine::fromXmlFile('path/to/file.xml'); + * + * // with an xml definition string + * $validXmlString = '..your xml string...'; + * $parser = Console_CommandLine::fromXmlString($validXmlString); + * + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @example docs/examples/ex1.php + * @example docs/examples/ex2.php + */ +class Console_CommandLine +{ + // Public properties {{{ + + /** + * Error messages. + * + * @var array $errors Error messages + * @todo move this to Console_CommandLine_MessageProvider + */ + public static $errors = array( + 'option_bad_name' => 'option name must be a valid php variable name (got: {$name})', + 'argument_bad_name' => 'argument name must be a valid php variable name (got: {$name})', + 'option_long_and_short_name_missing' => 'you must provide at least an option short name or long name for option "{$name}"', + 'option_bad_short_name' => 'option "{$name}" short name must be a dash followed by a letter (got: "{$short_name}")', + 'option_bad_long_name' => 'option "{$name}" long name must be 2 dashes followed by a word (got: "{$long_name}")', + 'option_unregistered_action' => 'unregistered action "{$action}" for option "{$name}".', + 'option_bad_action' => 'invalid action for option "{$name}".', + 'option_invalid_callback' => 'you must provide a valid callback for option "{$name}"', + 'action_class_does_not_exists' => 'action "{$name}" class "{$class}" not found, make sure that your class is available before calling Console_CommandLine::registerAction()', + 'invalid_xml_file' => 'XML definition file "{$file}" does not exists or is not readable', + 'invalid_rng_file' => 'RNG file "{$file}" does not exists or is not readable' + ); + + /** + * The name of the program, if not given it defaults to argv[0]. + * + * @var string $name Name of your program + */ + public $name; + + /** + * A description text that will be displayed in the help message. + * + * @var string $description Description of your program + */ + public $description = ''; + + /** + * A string that represents the version of the program, if this property is + * not empty and property add_version_option is not set to false, the + * command line parser will add a --version option, that will display the + * property content. + * + * @var string $version + * @access public + */ + public $version = ''; + + /** + * Boolean that determine if the command line parser should add the help + * (-h, --help) option automatically. + * + * @var bool $add_help_option Whether to add a help option or not + */ + public $add_help_option = true; + + /** + * Boolean that determine if the command line parser should add the version + * (-v, --version) option automatically. + * Note that the version option is also generated only if the version + * property is not empty, it's up to you to provide a version string of + * course. + * + * @var bool $add_version_option Whether to add a version option or not + */ + public $add_version_option = true; + + /** + * The command line parser renderer instance. + * + * @var object that implements Console_CommandLine_Renderer interface + * @access protected + */ + public $renderer = false; + + /** + * The command line parser outputter instance. + * + * @var Console_CommandLine_Outputter An outputter + */ + public $outputter = false; + + /** + * The command line message provider instance. + * + * @var Console_CommandLine_MessageProvider A message provider instance + */ + public $message_provider = false; + + /** + * Boolean that tells the parser to be POSIX compliant, POSIX demands the + * following behavior: the first non-option stops option processing. + * + * @var bool $force_posix Whether to force posix compliance or not + */ + public $force_posix = false; + + /** + * Boolean that tells the parser to set relevant options default values, + * according to the option action. + * + * @see Console_CommandLine_Option::setDefaults() + * @var bool $force_options_defaults Whether to force option default values + */ + public $force_options_defaults = false; + + /** + * An array of Console_CommandLine_Option objects. + * + * @var array $options The options array + */ + public $options = array(); + + /** + * An array of Console_CommandLine_Argument objects. + * + * @var array $args The arguments array + */ + public $args = array(); + + /** + * An array of Console_CommandLine_Command objects (sub commands). + * + * @var array $commands The commands array + */ + public $commands = array(); + + /** + * Parent, only relevant in Command objects but left here for interface + * convenience. + * + * @var Console_CommandLine The parent instance + * @todo move Console_CommandLine::parent to Console_CommandLine_Command + */ + public $parent = false; + + /** + * Array of valid actions for an option, this array will also store user + * registered actions. + * + * The array format is: + *
+     * array(
+     *      => array(, )
+     * )
+     * 
+ * + * @var array $actions List of valid actions + */ + public static $actions = array( + 'StoreTrue' => array('Console_CommandLine_Action_StoreTrue', true), + 'StoreFalse' => array('Console_CommandLine_Action_StoreFalse', true), + 'StoreString' => array('Console_CommandLine_Action_StoreString', true), + 'StoreInt' => array('Console_CommandLine_Action_StoreInt', true), + 'StoreFloat' => array('Console_CommandLine_Action_StoreFloat', true), + 'StoreArray' => array('Console_CommandLine_Action_StoreArray', true), + 'Callback' => array('Console_CommandLine_Action_Callback', true), + 'Counter' => array('Console_CommandLine_Action_Counter', true), + 'Help' => array('Console_CommandLine_Action_Help', true), + 'Version' => array('Console_CommandLine_Action_Version', true), + 'Password' => array('Console_CommandLine_Action_Password', true), + 'List' => array('Console_CommandLine_Action_List', true), + ); + + /** + * Custom errors messages for this command + * + * This array is of the form: + * + * $messageText, + * $messageName => $messageText, + * ... + * ); + * ?> + * + * + * If specified, these messages override the messages provided by the + * default message provider. For example: + * + * 'The argument foo is required.', + * ); + * ?> + * + * + * @var array + * @see Console_CommandLine_MessageProvider_Default + */ + public $messages = array(); + + // }}} + // {{{ Private properties + + /** + * Array of options that must be dispatched at the end. + * + * @var array $_dispatchLater Options to be dispatched + */ + private $_dispatchLater = array(); + + // }}} + // __construct() {{{ + + /** + * Constructor. + * Example: + * + * + * $parser = new Console_CommandLine(array( + * 'name' => 'yourprogram', // defaults to argv[0] + * 'description' => 'Description of your program', + * 'version' => '0.0.1', // your program version + * 'add_help_option' => true, // or false to disable --help option + * 'add_version_option' => true, // or false to disable --version option + * 'force_posix' => false // or true to force posix compliance + * )); + * + * + * @param array $params An optional array of parameters + * + * @return void + */ + public function __construct(array $params = array()) + { + if (isset($params['name'])) { + $this->name = $params['name']; + } else if (isset($argv) && count($argv) > 0) { + $this->name = $argv[0]; + } else if (isset($_SERVER['argv']) && count($_SERVER['argv']) > 0) { + $this->name = $_SERVER['argv'][0]; + } else if (isset($_SERVER['SCRIPT_NAME'])) { + $this->name = basename($_SERVER['SCRIPT_NAME']); + } + if (isset($params['description'])) { + $this->description = $params['description']; + } + if (isset($params['version'])) { + $this->version = $params['version']; + } + if (isset($params['add_version_option'])) { + $this->add_version_option = $params['add_version_option']; + } + if (isset($params['add_help_option'])) { + $this->add_help_option = $params['add_help_option']; + } + if (isset($params['force_posix'])) { + $this->force_posix = $params['force_posix']; + } else if (getenv('POSIXLY_CORRECT')) { + $this->force_posix = true; + } + if (isset($params['messages']) && is_array($params['messages'])) { + $this->messages = $params['messages']; + } + // set default instances + $this->renderer = new Console_CommandLine_Renderer_Default($this); + $this->outputter = new Console_CommandLine_Outputter_Default(); + $this->message_provider = new Console_CommandLine_MessageProvider_Default(); + } + + // }}} + // accept() {{{ + + /** + * Method to allow Console_CommandLine to accept either: + * + a custom renderer, + * + a custom outputter, + * + or a custom message provider + * + * @param mixed $instance The custom instance + * + * @return void + * @throws Console_CommandLine_Exception if wrong argument passed + */ + public function accept($instance) + { + if ($instance instanceof Console_CommandLine_Renderer) { + if (property_exists($instance, 'parser') && !$instance->parser) { + $instance->parser = $this; + } + $this->renderer = $instance; + } else if ($instance instanceof Console_CommandLine_Outputter) { + $this->outputter = $instance; + } else if ($instance instanceof Console_CommandLine_MessageProvider) { + $this->message_provider = $instance; + } else { + throw Console_CommandLine_Exception::factory( + 'INVALID_CUSTOM_INSTANCE', + array(), + $this, + $this->messages + ); + } + } + + // }}} + // fromXmlFile() {{{ + + /** + * Returns a command line parser instance built from an xml file. + * + * Example: + * + * require_once 'Console/CommandLine.php'; + * $parser = Console_CommandLine::fromXmlFile('path/to/file.xml'); + * $result = $parser->parse(); + * + * + * @param string $file Path to the xml file + * + * @return Console_CommandLine The parser instance + */ + public static function fromXmlFile($file) + { + include_once 'Console/CommandLine/XmlParser.php'; + return Console_CommandLine_XmlParser::parse($file); + } + + // }}} + // fromXmlString() {{{ + + /** + * Returns a command line parser instance built from an xml string. + * + * Example: + * + * require_once 'Console/CommandLine.php'; + * $xmldata = ' + * + * Compress files + * + * + * a list of files + * true + * + * '; + * $parser = Console_CommandLine::fromXmlString($xmldata); + * $result = $parser->parse(); + * + * + * @param string $string The xml data + * + * @return Console_CommandLine The parser instance + */ + public static function fromXmlString($string) + { + include_once 'Console/CommandLine/XmlParser.php'; + return Console_CommandLine_XmlParser::parseString($string); + } + + // }}} + // addArgument() {{{ + + /** + * Adds an argument to the command line parser and returns it. + * + * Adds an argument with the name $name and set its attributes with the + * array $params, then return the Console_CommandLine_Argument instance + * created. + * The method accepts another form: you can directly pass a + * Console_CommandLine_Argument object as the sole argument, this allows + * you to contruct the argument separately, in order to reuse it in + * different command line parsers or commands for example. + * + * Example: + * + * $parser = new Console_CommandLine(); + * // add an array argument + * $parser->addArgument('input_files', array('multiple'=>true)); + * // add a simple argument + * $parser->addArgument('output_file'); + * $result = $parser->parse(); + * print_r($result->args['input_files']); + * print_r($result->args['output_file']); + * // will print: + * // array('file1', 'file2') + * // 'file3' + * // if the command line was: + * // myscript.php file1 file2 file3 + * + * + * In a terminal, the help will be displayed like this: + * + * $ myscript.php install -h + * Usage: myscript.php + * + * + * @param mixed $name A string containing the argument name or an + * instance of Console_CommandLine_Argument + * @param array $params An array containing the argument attributes + * + * @return Console_CommandLine_Argument the added argument + * @see Console_CommandLine_Argument + */ + public function addArgument($name, $params = array()) + { + if ($name instanceof Console_CommandLine_Argument) { + $argument = $name; + } else { + include_once 'Console/CommandLine/Argument.php'; + $argument = new Console_CommandLine_Argument($name, $params); + } + $argument->validate(); + $this->args[$argument->name] = $argument; + return $argument; + } + + // }}} + // addCommand() {{{ + + /** + * Adds a sub-command to the command line parser. + * + * Adds a command with the given $name to the parser and returns the + * Console_CommandLine_Command instance, you can then populate the command + * with options, configure it, etc... like you would do for the main parser + * because the class Console_CommandLine_Command inherits from + * Console_CommandLine. + * + * An example: + * + * $parser = new Console_CommandLine(); + * $install_cmd = $parser->addCommand('install'); + * $install_cmd->addOption( + * 'verbose', + * array( + * 'short_name' => '-v', + * 'long_name' => '--verbose', + * 'description' => 'be noisy when installing stuff', + * 'action' => 'StoreTrue' + * ) + * ); + * $parser->parse(); + * + * Then in a terminal: + * + * $ myscript.php install -h + * Usage: myscript.php install [options] + * + * Options: + * -h, --help display this help message and exit + * -v, --verbose be noisy when installing stuff + * + * $ myscript.php install --verbose + * Installing whatever... + * $ + * + * + * @param mixed $name A string containing the command name or an + * instance of Console_CommandLine_Command + * @param array $params An array containing the command attributes + * + * @return Console_CommandLine_Command the added subcommand + * @see Console_CommandLine_Command + */ + public function addCommand($name, $params = array()) + { + if ($name instanceof Console_CommandLine_Command) { + $command = $name; + } else { + include_once 'Console/CommandLine/Command.php'; + $params['name'] = $name; + $command = new Console_CommandLine_Command($params); + // some properties must cascade to the child command if not + // passed explicitely. This is done only in this case, because if + // we have a Command object we have no way to determine if theses + // properties have already been set + $cascade = array( + 'add_help_option', + 'add_version_option', + 'outputter', + 'message_provider', + 'force_posix', + 'force_options_defaults' + ); + foreach ($cascade as $property) { + if (!isset($params[$property])) { + $command->$property = $this->$property; + } + } + if (!isset($params['renderer'])) { + $renderer = clone $this->renderer; + $renderer->parser = $command; + $command->renderer = $renderer; + } + } + $command->parent = $this; + $this->commands[$command->name] = $command; + return $command; + } + + // }}} + // addOption() {{{ + + /** + * Adds an option to the command line parser and returns it. + * + * Adds an option with the name $name and set its attributes with the + * array $params, then return the Console_CommandLine_Option instance + * created. + * The method accepts another form: you can directly pass a + * Console_CommandLine_Option object as the sole argument, this allows + * you to contruct the option separately, in order to reuse it in different + * command line parsers or commands for example. + * + * Example: + * + * $parser = new Console_CommandLine(); + * $parser->addOption('path', array( + * 'short_name' => '-p', // a short name + * 'long_name' => '--path', // a long name + * 'description' => 'path to the dir', // a description msg + * 'action' => 'StoreString', + * 'default' => '/tmp' // a default value + * )); + * $parser->parse(); + * + * + * In a terminal, the help will be displayed like this: + * + * $ myscript.php --help + * Usage: myscript.php [options] + * + * Options: + * -h, --help display this help message and exit + * -p, --path path to the dir + * + * + * + * Various methods to specify an option, these 3 commands are equivalent: + * + * $ myscript.php --path=some/path + * $ myscript.php -p some/path + * $ myscript.php -psome/path + * + * + * @param mixed $name A string containing the option name or an + * instance of Console_CommandLine_Option + * @param array $params An array containing the option attributes + * + * @return Console_CommandLine_Option The added option + * @see Console_CommandLine_Option + */ + public function addOption($name, $params = array()) + { + include_once 'Console/CommandLine/Option.php'; + if ($name instanceof Console_CommandLine_Option) { + $opt = $name; + } else { + $opt = new Console_CommandLine_Option($name, $params); + } + $opt->validate(); + if ($this->force_options_defaults) { + $opt->setDefaults(); + } + $this->options[$opt->name] = $opt; + if (!empty($opt->choices) && $opt->add_list_option) { + $this->addOption('list_' . $opt->name, array( + 'long_name' => '--list-' . $opt->name, + 'description' => $this->message_provider->get( + 'LIST_OPTION_MESSAGE', + array('name' => $opt->name) + ), + 'action' => 'List', + 'action_params' => array('list' => $opt->choices), + )); + } + return $opt; + } + + // }}} + // displayError() {{{ + + /** + * Displays an error to the user via stderr and exit with $exitCode if its + * value is not equals to false. + * + * @param string $error The error message + * @param int $exitCode The exit code number (default: 1). If set to + * false, the exit() function will not be called + * + * @return void + */ + public function displayError($error, $exitCode = 1) + { + $this->outputter->stderr($this->renderer->error($error)); + if ($exitCode !== false) { + exit($exitCode); + } + } + + // }}} + // displayUsage() {{{ + + /** + * Displays the usage help message to the user via stdout and exit with + * $exitCode if its value is not equals to false. + * + * @param int $exitCode The exit code number (default: 0). If set to + * false, the exit() function will not be called + * + * @return void + */ + public function displayUsage($exitCode = 0) + { + $this->outputter->stdout($this->renderer->usage()); + if ($exitCode !== false) { + exit($exitCode); + } + } + + // }}} + // displayVersion() {{{ + + /** + * Displays the program version to the user via stdout and exit with + * $exitCode if its value is not equals to false. + * + * + * @param int $exitCode The exit code number (default: 0). If set to + * false, the exit() function will not be called + * + * @return void + */ + public function displayVersion($exitCode = 0) + { + $this->outputter->stdout($this->renderer->version()); + if ($exitCode !== false) { + exit($exitCode); + } + } + + // }}} + // findOption() {{{ + + /** + * Finds the option that matches the given short_name (ex: -v), long_name + * (ex: --verbose) or name (ex: verbose). + * + * @param string $str The option identifier + * + * @return mixed A Console_CommandLine_Option instance or false + */ + public function findOption($str) + { + $str = trim($str); + if ($str === '') { + return false; + } + $matches = array(); + foreach ($this->options as $opt) { + if ($opt->short_name == $str || $opt->long_name == $str || + $opt->name == $str) { + // exact match + return $opt; + } + if (substr($opt->long_name, 0, strlen($str)) === $str) { + // abbreviated long option + $matches[] = $opt; + } + } + if ($count = count($matches)) { + if ($count > 1) { + $matches_str = ''; + $padding = ''; + foreach ($matches as $opt) { + $matches_str .= $padding . $opt->long_name; + $padding = ', '; + } + throw Console_CommandLine_Exception::factory( + 'OPTION_AMBIGUOUS', + array('name' => $str, 'matches' => $matches_str), + $this, + $this->messages + ); + } + return $matches[0]; + } + return false; + } + // }}} + // registerAction() {{{ + + /** + * Registers a custom action for the parser, an example: + * + * + * + * // in this example we create a "range" action: + * // the user will be able to enter something like: + * // $ -r 1,5 + * // and in the result we will have: + * // $result->options['range']: array(1, 5) + * + * require_once 'Console/CommandLine.php'; + * require_once 'Console/CommandLine/Action.php'; + * + * class ActionRange extends Console_CommandLine_Action + * { + * public function execute($value=false, $params=array()) + * { + * $range = explode(',', str_replace(' ', '', $value)); + * if (count($range) != 2) { + * throw new Exception(sprintf( + * 'Option "%s" must be 2 integers separated by a comma', + * $this->option->name + * )); + * } + * $this->setResult($range); + * } + * } + * // then we can register our action + * Console_CommandLine::registerAction('Range', 'ActionRange'); + * // and now our action is available ! + * $parser = new Console_CommandLine(); + * $parser->addOption('range', array( + * 'short_name' => '-r', + * 'long_name' => '--range', + * 'action' => 'Range', // note our custom action + * 'description' => 'A range of two integers separated by a comma' + * )); + * // etc... + * + * + * + * @param string $name The name of the custom action + * @param string $class The class name of the custom action + * + * @return void + */ + public static function registerAction($name, $class) + { + if (!isset(self::$actions[$name])) { + if (!class_exists($class)) { + self::triggerError('action_class_does_not_exists', + E_USER_ERROR, + array('{$name}' => $name, '{$class}' => $class)); + } + self::$actions[$name] = array($class, false); + } + } + + // }}} + // triggerError() {{{ + + /** + * A wrapper for programming errors triggering. + * + * @param string $msgId Identifier of the message + * @param int $level The php error level + * @param array $params An array of search=>replaces entries + * + * @return void + * @todo remove Console::triggerError() and use exceptions only + */ + public static function triggerError($msgId, $level, $params=array()) + { + if (isset(self::$errors[$msgId])) { + $msg = str_replace(array_keys($params), + array_values($params), self::$errors[$msgId]); + trigger_error($msg, $level); + } else { + trigger_error('unknown error', $level); + } + } + + // }}} + // parse() {{{ + + /** + * Parses the command line arguments and returns a + * Console_CommandLine_Result instance. + * + * @param integer $userArgc Number of arguments (optional) + * @param array $userArgv Array containing arguments (optional) + * + * @return Console_CommandLine_Result The result instance + * @throws Exception on user errors + */ + public function parse($userArgc=null, $userArgv=null) + { + $this->addBuiltinOptions(); + if ($userArgc !== null && $userArgv !== null) { + $argc = $userArgc; + $argv = $userArgv; + } else { + list($argc, $argv) = $this->getArgcArgv(); + } + // build an empty result + include_once 'Console/CommandLine/Result.php'; + $result = new Console_CommandLine_Result(); + if (!($this instanceof Console_CommandLine_Command)) { + // remove script name if we're not in a subcommand + array_shift($argv); + $argc--; + } + // will contain arguments + $args = array(); + foreach ($this->options as $name=>$option) { + $result->options[$name] = $option->default; + } + // parse command line tokens + while ($argc--) { + $token = array_shift($argv); + try { + if ($cmd = $this->_getSubCommand($token)) { + $result->command_name = $cmd->name; + $result->command = $cmd->parse($argc, $argv); + break; + } else { + $this->parseToken($token, $result, $args, $argc); + } + } catch (Exception $exc) { + throw $exc; + } + } + // Parse a null token to allow any undespatched actions to be despatched. + $this->parseToken(null, $result, $args, 0); + // Check if an invalid subcommand was specified. If there are + // subcommands and no arguments, but an argument was provided, it is + // an invalid subcommand. + if ( count($this->commands) > 0 + && count($this->args) === 0 + && count($args) > 0 + ) { + throw Console_CommandLine_Exception::factory( + 'INVALID_SUBCOMMAND', + array('command' => $args[0]), + $this, + $this->messages + ); + } + // minimum argument number check + $argnum = 0; + foreach ($this->args as $name=>$arg) { + if (!$arg->optional) { + $argnum++; + } + } + if (count($args) < $argnum) { + throw Console_CommandLine_Exception::factory( + 'ARGUMENT_REQUIRED', + array('argnum' => $argnum, 'plural' => $argnum>1 ? 's': ''), + $this, + $this->messages + ); + } + // handle arguments + $c = count($this->args); + foreach ($this->args as $name=>$arg) { + $c--; + if ($arg->multiple) { + $result->args[$name] = $c ? array_splice($args, 0, -$c) : $args; + } else { + $result->args[$name] = array_shift($args); + } + } + // dispatch deferred options + foreach ($this->_dispatchLater as $optArray) { + $optArray[0]->dispatchAction($optArray[1], $optArray[2], $this); + } + return $result; + } + + // }}} + // parseToken() {{{ + + /** + * Parses the command line token and modifies *by reference* the $options + * and $args arrays. + * + * @param string $token The command line token to parse + * @param object $result The Console_CommandLine_Result instance + * @param array &$args The argv array + * @param int $argc Number of lasting args + * + * @return void + * @access protected + * @throws Exception on user errors + */ + protected function parseToken($token, $result, &$args, $argc) + { + static $lastopt = false; + static $stopflag = false; + $last = $argc === 0; + if (!$stopflag && $lastopt) { + if (substr($token, 0, 1) == '-') { + if ($lastopt->argument_optional) { + $this->_dispatchAction($lastopt, '', $result); + if ($lastopt->action != 'StoreArray') { + $lastopt = false; + } + } else if (isset($result->options[$lastopt->name])) { + // case of an option that expect a list of args + $lastopt = false; + } else { + throw Console_CommandLine_Exception::factory( + 'OPTION_VALUE_REQUIRED', + array('name' => $lastopt->name), + $this, + $this->messages + ); + } + } else { + // when a StoreArray option is positioned last, the behavior + // is to consider that if there's already an element in the + // array, and the commandline expects one or more args, we + // leave last tokens to arguments + if ($lastopt->action == 'StoreArray' && + !empty($result->options[$lastopt->name]) && + count($this->args) > ($argc + count($args))) { + if (!is_null($token)) { + $args[] = $token; + } + return; + } + if (!is_null($token) || $lastopt->action == 'Password') { + $this->_dispatchAction($lastopt, $token, $result); + } + if ($lastopt->action != 'StoreArray') { + $lastopt = false; + } + return; + } + } + if (!$stopflag && substr($token, 0, 2) == '--') { + // a long option + $optkv = explode('=', $token, 2); + if (trim($optkv[0]) == '--') { + // the special argument "--" forces in all cases the end of + // option scanning. + $stopflag = true; + return; + } + $opt = $this->findOption($optkv[0]); + if (!$opt) { + throw Console_CommandLine_Exception::factory( + 'OPTION_UNKNOWN', + array('name' => $optkv[0]), + $this, + $this->messages + ); + } + $value = isset($optkv[1]) ? $optkv[1] : false; + if (!$opt->expectsArgument() && $value !== false) { + throw Console_CommandLine_Exception::factory( + 'OPTION_VALUE_UNEXPECTED', + array('name' => $opt->name, 'value' => $value), + $this, + $this->messages + ); + } + if ($opt->expectsArgument() && $value === false) { + // maybe the long option argument is separated by a space, if + // this is the case it will be the next arg + if ($last && !$opt->argument_optional) { + throw Console_CommandLine_Exception::factory( + 'OPTION_VALUE_REQUIRED', + array('name' => $opt->name), + $this, + $this->messages + ); + } + // we will have a value next time + $lastopt = $opt; + return; + } + if ($opt->action == 'StoreArray') { + $lastopt = $opt; + } + $this->_dispatchAction($opt, $value, $result); + } else if (!$stopflag && substr($token, 0, 1) == '-') { + // a short option + $optname = substr($token, 0, 2); + if ($optname == '-') { + // special case of "-": try to read stdin + $args[] = file_get_contents('php://stdin'); + return; + } + $opt = $this->findOption($optname); + if (!$opt) { + throw Console_CommandLine_Exception::factory( + 'OPTION_UNKNOWN', + array('name' => $optname), + $this, + $this->messages + ); + } + // parse other options or set the value + // in short: handle -f and -f + $next = substr($token, 2, 1); + // check if we must wait for a value + if ($next === false) { + if ($opt->expectsArgument()) { + if ($last && !$opt->argument_optional) { + throw Console_CommandLine_Exception::factory( + 'OPTION_VALUE_REQUIRED', + array('name' => $opt->name), + $this, + $this->messages + ); + } + // we will have a value next time + $lastopt = $opt; + return; + } + $value = false; + } else { + if (!$opt->expectsArgument()) { + if ($nextopt = $this->findOption('-' . $next)) { + $this->_dispatchAction($opt, false, $result); + $this->parseToken('-' . substr($token, 2), $result, + $args, $last); + return; + } else { + throw Console_CommandLine_Exception::factory( + 'OPTION_UNKNOWN', + array('name' => $next), + $this, + $this->messages + ); + } + } + if ($opt->action == 'StoreArray') { + $lastopt = $opt; + } + $value = substr($token, 2); + } + $this->_dispatchAction($opt, $value, $result); + } else { + // We have an argument. + // if we are in POSIX compliant mode, we must set the stop flag to + // true in order to stop option parsing. + if (!$stopflag && $this->force_posix) { + $stopflag = true; + } + if (!is_null($token)) { + $args[] = $token; + } + } + } + + // }}} + // addBuiltinOptions() {{{ + + /** + * Adds the builtin "Help" and "Version" options if needed. + * + * @return void + */ + public function addBuiltinOptions() + { + if ($this->add_help_option) { + $helpOptionParams = array( + 'long_name' => '--help', + 'description' => 'show this help message and exit', + 'action' => 'Help' + ); + if (!($option = $this->findOption('-h')) || $option->action == 'Help') { + // short name is available, take it + $helpOptionParams['short_name'] = '-h'; + } + $this->addOption('help', $helpOptionParams); + } + if ($this->add_version_option && !empty($this->version)) { + $versionOptionParams = array( + 'long_name' => '--version', + 'description' => 'show the program version and exit', + 'action' => 'Version' + ); + if (!$this->findOption('-v')) { + // short name is available, take it + $versionOptionParams['short_name'] = '-v'; + } + $this->addOption('version', $versionOptionParams); + } + } + + // }}} + // getArgcArgv() {{{ + + /** + * Tries to return an array containing argc and argv, or trigger an error + * if it fails to get them. + * + * @return array The argc/argv array + * @throws Console_CommandLine_Exception + */ + protected function getArgcArgv() + { + if (php_sapi_name() != 'cli') { + // we have a web request + $argv = array($this->name); + if (isset($_REQUEST)) { + foreach ($_REQUEST as $key => $value) { + if (!is_array($value)) { + $value = array($value); + } + $opt = $this->findOption($key); + if ($opt instanceof Console_CommandLine_Option) { + // match a configured option + $argv[] = $opt->short_name ? + $opt->short_name : $opt->long_name; + foreach ($value as $v) { + if ($opt->expectsArgument()) { + $argv[] = isset($_REQUEST[$key]) ? urldecode($v) : $v; + } else if ($v == '0' || $v == 'false') { + array_pop($argv); + } + } + } else if (isset($this->args[$key])) { + // match a configured argument + foreach ($value as $v) { + $argv[] = isset($_REQUEST[$key]) ? urldecode($v) : $v; + } + } + } + } + return array(count($argv), $argv); + } + if (isset($argc) && isset($argv)) { + // case of register_argv_argc = 1 + return array($argc, $argv); + } + if (isset($_SERVER['argc']) && isset($_SERVER['argv'])) { + return array($_SERVER['argc'], $_SERVER['argv']); + } + return array(0, array()); + } + + // }}} + // _dispatchAction() {{{ + + /** + * Dispatches the given option or store the option to dispatch it later. + * + * @param Console_CommandLine_Option $option The option instance + * @param string $token Command line token to parse + * @param Console_CommandLine_Result $result The result instance + * + * @return void + */ + private function _dispatchAction($option, $token, $result) + { + if ($option->action == 'Password') { + $this->_dispatchLater[] = array($option, $token, $result); + } else { + $option->dispatchAction($token, $result, $this); + } + } + // }}} + // _getSubCommand() {{{ + + /** + * Tries to return the subcommand that matches the given token or returns + * false if no subcommand was found. + * + * @param string $token Current command line token + * + * @return mixed An instance of Console_CommandLine_Command or false + */ + private function _getSubCommand($token) + { + foreach ($this->commands as $cmd) { + if ($cmd->name == $token || in_array($token, $cmd->aliases)) { + return $cmd; + } + } + return false; + } + + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Action.php b/_piecrust/libs/Console/CommandLine/Action.php new file mode 100644 index 0000000..6f4fc05 --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Action.php @@ -0,0 +1,142 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: Action.php 290510 2009-11-11 16:55:29Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Class that represent an option action. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +abstract class Console_CommandLine_Action +{ + // Properties {{{ + + /** + * A reference to the result instance. + * + * @var Console_CommandLine_Result $result The result instance + */ + protected $result; + + /** + * A reference to the option instance. + * + * @var Console_CommandLine_Option $option The action option + */ + protected $option; + + /** + * A reference to the parser instance. + * + * @var Console_CommandLine $parser The parser + */ + protected $parser; + + // }}} + // __construct() {{{ + + /** + * Constructor + * + * @param Console_CommandLine_Result $result The result instance + * @param Console_CommandLine_Option $option The action option + * @param Console_CommandLine $parser The current parser + * + * @return void + */ + public function __construct($result, $option, $parser) + { + $this->result = $result; + $this->option = $option; + $this->parser = $parser; + } + + // }}} + // getResult() {{{ + + /** + * Convenience method to retrieve the value of result->options[name]. + * + * @return mixed The result value or null + */ + public function getResult() + { + if (isset($this->result->options[$this->option->name])) { + return $this->result->options[$this->option->name]; + } + return null; + } + + // }}} + // format() {{{ + + /** + * Allow a value to be pre-formatted prior to being used in a choices test. + * Setting $value to the new format will keep the formatting. + * + * @param mixed &$value The value to format + * + * @return mixed The formatted value + */ + public function format(&$value) + { + return $value; + } + + // }}} + // setResult() {{{ + + /** + * Convenience method to assign the result->options[name] value. + * + * @param mixed $result The result value + * + * @return void + */ + public function setResult($result) + { + $this->result->options[$this->option->name] = $result; + } + + // }}} + // execute() {{{ + + /** + * Executes the action with the value entered by the user. + * All children actions must implement this method. + * + * @param mixed $value The option value + * @param array $params An optional array of parameters + * + * @return string + */ + abstract public function execute($value = false, $params = array()); + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Action/Callback.php b/_piecrust/libs/Console/CommandLine/Action/Callback.php new file mode 100644 index 0000000..43236ed --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Action/Callback.php @@ -0,0 +1,80 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: Callback.php 271998 2008-12-27 10:52:28Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Required by this class. + */ +require_once 'Console/CommandLine/Action.php'; + +/** + * Class that represent the Callback action. + * + * The result option array entry value is set to the return value of the + * callback defined in the option. + * + * There are two steps to defining a callback option: + * - define the option itself using the callback action + * - write the callback; this is a function (or method) that takes five + * arguments, as described below. + * + * All callbacks are called as follows: + * + * callable_func( + * $value, // the value of the option + * $option_instance, // the option instance + * $result_instance, // the result instance + * $parser_instance, // the parser instance + * $params // an array of params as specified in the option + * ); + * + * and *must* return the option value. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Action_Callback extends Console_CommandLine_Action +{ + // execute() {{{ + + /** + * Executes the action with the value entered by the user. + * + * @param mixed $value The value of the option + * @param array $params An optional array of parameters + * + * @return string + */ + public function execute($value = false, $params = array()) + { + $this->setResult(call_user_func($this->option->callback, $value, + $this->option, $this->result, $this->parser, $params)); + } + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Action/Counter.php b/_piecrust/libs/Console/CommandLine/Action/Counter.php new file mode 100644 index 0000000..670556c --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Action/Counter.php @@ -0,0 +1,86 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: Counter.php 271998 2008-12-27 10:52:28Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Required by this class. + */ +require_once 'Console/CommandLine/Action.php'; + +/** + * Class that represent the Version action. + * + * The execute methode add 1 to the value of the result option array entry. + * The value is incremented each time the option is found, for example + * with an option defined like that: + * + * + * $parser->addOption( + * 'verbose', + * array( + * 'short_name' => '-v', + * 'action' => 'Counter' + * ) + * ); + * + * If the user type: + * + * $ script.php -v -v -v + * + * or: + * + * $ script.php -vvv + * + * the verbose variable will be set to to 3. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Action_Counter extends Console_CommandLine_Action +{ + // execute() {{{ + + /** + * Executes the action with the value entered by the user. + * + * @param mixed $value The option value + * @param array $params An optional array of parameters + * + * @return string + */ + public function execute($value = false, $params = array()) + { + $result = $this->getResult(); + if ($result === null) { + $result = 0; + } + $this->setResult(++$result); + } + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Action/Help.php b/_piecrust/libs/Console/CommandLine/Action/Help.php new file mode 100644 index 0000000..02ac4fa --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Action/Help.php @@ -0,0 +1,60 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: Help.php 271998 2008-12-27 10:52:28Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Required by this class. + */ +require_once 'Console/CommandLine/Action.php'; + +/** + * Class that represent the Help action, a special action that displays the + * help message, telling the user how to use the program. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Action_Help extends Console_CommandLine_Action +{ + // execute() {{{ + + /** + * Executes the action with the value entered by the user. + * + * @param mixed $value The option value + * @param array $params An optional array of parameters + * + * @return string + */ + public function execute($value = false, $params = array()) + { + return $this->parser->displayUsage(); + } + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Action/List.php b/_piecrust/libs/Console/CommandLine/Action/List.php new file mode 100644 index 0000000..64eed8c --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Action/List.php @@ -0,0 +1,73 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: List.php 276559 2009-02-27 08:03:17Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Required by this class. + */ +require_once 'Console/CommandLine/Action.php'; + +/** + * Class that represent the List action, a special action that simply output an + * array as a list. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Action_List extends Console_CommandLine_Action +{ + // execute() {{{ + + /** + * Executes the action with the value entered by the user. + * Possible parameters are: + * - message: an alternative message to display instead of the default + * message, + * - delimiter: an alternative delimiter instead of the comma, + * - post: a string to append after the message (default is the new line + * char). + * + * @param mixed $value The option value + * @param array $params An optional array of parameters + * + * @return string + */ + public function execute($value = false, $params = array()) + { + $list = isset($params['list']) ? $params['list'] : array(); + $msg = isset($params['message']) + ? $params['message'] + : $this->parser->message_provider->get('LIST_DISPLAYED_MESSAGE'); + $del = isset($params['delimiter']) ? $params['delimiter'] : ', '; + $post = isset($params['post']) ? $params['post'] : "\n"; + $this->parser->outputter->stdout($msg . implode($del, $list) . $post); + exit(0); + } + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Action/Password.php b/_piecrust/libs/Console/CommandLine/Action/Password.php new file mode 100644 index 0000000..d98e35b --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Action/Password.php @@ -0,0 +1,90 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: Password.php 271998 2008-12-27 10:52:28Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Required by this class. + */ +require_once 'Console/CommandLine/Action.php'; + +/** + * Class that represent the Password action, a special action that allow the + * user to specify the password on the commandline or to be prompted for + * entering it. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Action_Password extends Console_CommandLine_Action +{ + // execute() {{{ + + /** + * Executes the action with the value entered by the user. + * + * @param mixed $value The option value + * @param array $params An array of optional parameters + * + * @return string + */ + public function execute($value = false, $params = array()) + { + $this->setResult(empty($value) ? $this->_promptPassword() : $value); + } + // }}} + // _promptPassword() {{{ + + /** + * Prompts the password to the user without echoing it. + * + * @return string + * @todo not echo-ing the password does not work on windows is there a way + * to make this work ? + */ + private function _promptPassword() + { + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + fwrite(STDOUT, + $this->parser->message_provider->get('PASSWORD_PROMPT_ECHO')); + @flock(STDIN, LOCK_EX); + $passwd = fgets(STDIN); + @flock(STDIN, LOCK_UN); + } else { + fwrite(STDOUT, $this->parser->message_provider->get('PASSWORD_PROMPT')); + // disable echoing + system('stty -echo'); + @flock(STDIN, LOCK_EX); + $passwd = fgets(STDIN); + @flock(STDIN, LOCK_UN); + system('stty echo'); + } + return trim($passwd); + } + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Action/StoreArray.php b/_piecrust/libs/Console/CommandLine/Action/StoreArray.php new file mode 100644 index 0000000..f6888ec --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Action/StoreArray.php @@ -0,0 +1,78 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: StoreArray.php 282041 2009-06-12 16:34:30Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Required by this class. + */ +require_once 'Console/CommandLine/Action.php'; + +/** + * Class that represent the StoreArray action. + * + * The execute method appends the value of the option entered by the user to + * the result option array entry. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Action_StoreArray extends Console_CommandLine_Action +{ + // Protected properties {{{ + + /** + * Force a clean result when first called, overriding any defaults assigned. + * + * @var object $firstPass First time this action has been called. + */ + protected $firstPass = true; + + // }}} + // execute() {{{ + + /** + * Executes the action with the value entered by the user. + * + * @param mixed $value The option value + * @param array $params An optional array of parameters + * + * @return string + */ + public function execute($value = false, $params = array()) + { + $result = $this->getResult(); + if (null === $result || $this->firstPass) { + $result = array(); + $this->firstPass = false; + } + $result[] = $value; + $this->setResult($result); + } + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Action/StoreFalse.php b/_piecrust/libs/Console/CommandLine/Action/StoreFalse.php new file mode 100644 index 0000000..9458207 --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Action/StoreFalse.php @@ -0,0 +1,64 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: StoreFalse.php 271998 2008-12-27 10:52:28Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Required by this class. + */ +require_once 'Console/CommandLine/Action.php'; + +/** + * Class that represent the StoreFalse action. + * + * The execute method store the boolean 'false' in the corrsponding result + * option array entry (the value is true if the option is not present in the + * command line entered by the user). + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Action_StoreFalse extends Console_CommandLine_Action +{ + // execute() {{{ + + /** + * Executes the action with the value entered by the user. + * + * @param mixed $value The option value + * @param array $params An array of optional parameters + * + * @return string + */ + public function execute($value = false, $params = array()) + { + $this->setResult(false); + } + + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Action/StoreFloat.php b/_piecrust/libs/Console/CommandLine/Action/StoreFloat.php new file mode 100644 index 0000000..478e541 --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Action/StoreFloat.php @@ -0,0 +1,76 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: StoreFloat.php 271998 2008-12-27 10:52:28Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Required by this class. + */ +require_once 'Console/CommandLine/Action.php'; + +/** + * Class that represent the StoreFloat action. + * + * The execute method store the value of the option entered by the user as a + * float in the result option array entry, if the value passed is not a float + * an Exception is raised. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Action_StoreFloat extends Console_CommandLine_Action +{ + // execute() {{{ + + /** + * Executes the action with the value entered by the user. + * + * @param mixed $value The option value + * @param array $params An array of optional parameters + * + * @return string + * @throws Console_CommandLine_Exception + */ + public function execute($value = false, $params = array()) + { + if (!is_numeric($value)) { + include_once 'Console/CommandLine/Exception.php'; + throw Console_CommandLine_Exception::factory( + 'OPTION_VALUE_TYPE_ERROR', + array( + 'name' => $this->option->name, + 'type' => 'float', + 'value' => $value + ), + $this->parser + ); + } + $this->setResult((float)$value); + } + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Action/StoreInt.php b/_piecrust/libs/Console/CommandLine/Action/StoreInt.php new file mode 100644 index 0000000..c4b5313 --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Action/StoreInt.php @@ -0,0 +1,76 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: StoreInt.php 271998 2008-12-27 10:52:28Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Required by this class. + */ +require_once 'Console/CommandLine/Action.php'; + +/** + * Class that represent the StoreInt action. + * + * The execute method store the value of the option entered by the user as an + * integer in the result option array entry, if the value passed is not an + * integer an Exception is raised. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Action_StoreInt extends Console_CommandLine_Action +{ + // execute() {{{ + + /** + * Executes the action with the value entered by the user. + * + * @param mixed $value The option value + * @param array $params An array of optional parameters + * + * @return string + * @throws Console_CommandLine_Exception + */ + public function execute($value = false, $params = array()) + { + if (!is_numeric($value)) { + include_once 'Console/CommandLine/Exception.php'; + throw Console_CommandLine_Exception::factory( + 'OPTION_VALUE_TYPE_ERROR', + array( + 'name' => $this->option->name, + 'type' => 'int', + 'value' => $value + ), + $this->parser + ); + } + $this->setResult((int)$value); + } + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Action/StoreString.php b/_piecrust/libs/Console/CommandLine/Action/StoreString.php new file mode 100644 index 0000000..935cb2a --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Action/StoreString.php @@ -0,0 +1,62 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: StoreString.php 271998 2008-12-27 10:52:28Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Required by this class. + */ +require_once 'Console/CommandLine/Action.php'; + +/** + * Class that represent the StoreString action. + * + * The execute method store the value of the option entered by the user as a + * string in the result option array entry. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Action_StoreString extends Console_CommandLine_Action +{ + // execute() {{{ + + /** + * Executes the action with the value entered by the user. + * + * @param mixed $value The option value + * @param array $params An array of optional parameters + * + * @return string + */ + public function execute($value = false, $params = array()) + { + $this->setResult((string)$value); + } + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Action/StoreTrue.php b/_piecrust/libs/Console/CommandLine/Action/StoreTrue.php new file mode 100644 index 0000000..d741baf --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Action/StoreTrue.php @@ -0,0 +1,63 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: StoreTrue.php 271998 2008-12-27 10:52:28Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Required by this class. + */ +require_once 'Console/CommandLine/Action.php'; + +/** + * Class that represent the StoreTrue action. + * + * The execute method store the boolean 'true' in the corrsponding result + * option array entry (the value is false if the option is not present in the + * command line entered by the user). + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Action_StoreTrue extends Console_CommandLine_Action +{ + // execute() {{{ + + /** + * Executes the action with the value entered by the user. + * + * @param mixed $value The option value + * @param array $params An array of optional parameters + * + * @return string + */ + public function execute($value = false, $params = array()) + { + $this->setResult(true); + } + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Action/Version.php b/_piecrust/libs/Console/CommandLine/Action/Version.php new file mode 100644 index 0000000..5dfc2ca --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Action/Version.php @@ -0,0 +1,60 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: Version.php 271998 2008-12-27 10:52:28Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Required by this class. + */ +require_once 'Console/CommandLine/Action.php'; + +/** + * Class that represent the Version action, a special action that displays the + * version string of the program. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Action_Version extends Console_CommandLine_Action +{ + // execute() {{{ + + /** + * Executes the action with the value entered by the user. + * + * @param mixed $value The option value + * @param array $params An array of optional parameters + * + * @return string + */ + public function execute($value = false, $params = array()) + { + return $this->parser->displayVersion(); + } + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Argument.php b/_piecrust/libs/Console/CommandLine/Argument.php new file mode 100644 index 0000000..831d804 --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Argument.php @@ -0,0 +1,89 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: Argument.php 271998 2008-12-27 10:52:28Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Include base element class. + */ +require_once 'Console/CommandLine/Element.php'; + +/** + * Class that represent a command line argument. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Argument extends Console_CommandLine_Element +{ + // Public properties {{{ + + /** + * Setting this to true will tell the parser that the argument expects more + * than one argument and that argument values should be stored in an array. + * + * @var boolean $multiple Whether the argument expects multiple values + */ + public $multiple = false; + + /** + * Setting this to true will tell the parser that the argument is optional + * and can be ommited. + * Note that it is not a good practice to make arguments optional, it is + * the role of the options to be optional, by essence. + * + * @var boolean $optional Whether the argument is optional or not. + */ + public $optional = false; + + // }}} + // validate() {{{ + + /** + * Validates the argument instance. + * + * @return void + * @throws Console_CommandLine_Exception + * @todo use exceptions + */ + public function validate() + { + // check if the argument name is valid + if (!preg_match('/^[a-zA-Z_\x7f-\xff]+[a-zA-Z0-9_\x7f-\xff]*$/', + $this->name)) { + Console_CommandLine::triggerError( + 'argument_bad_name', + E_USER_ERROR, + array('{$name}' => $this->name) + ); + } + parent::validate(); + } + + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Command.php b/_piecrust/libs/Console/CommandLine/Command.php new file mode 100644 index 0000000..eb1801d --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Command.php @@ -0,0 +1,76 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: Command.php 281818 2009-06-08 12:58:39Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * File containing the parent class. + */ +require_once 'Console/CommandLine.php'; + +/** + * Class that represent a command with option and arguments. + * + * This class exist just to clarify the interface but at the moment it is + * strictly identical to Console_CommandLine class, it could change in the + * future though. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Command extends Console_CommandLine +{ + // Public properties {{{ + + /** + * An array of aliases for the subcommand. + * + * @var array $aliases Aliases for the subcommand. + */ + public $aliases = array(); + + // }}} + // __construct() {{{ + + /** + * Constructor. + * + * @param array $params An optional array of parameters + * + * @return void + */ + public function __construct($params = array()) + { + if (isset($params['aliases'])) { + $this->aliases = $params['aliases']; + } + parent::__construct($params); + } + + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/CustomMessageProvider.php b/_piecrust/libs/Console/CommandLine/CustomMessageProvider.php new file mode 100644 index 0000000..2ceae2b --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/CustomMessageProvider.php @@ -0,0 +1,66 @@ + + * @author Michael Gauthier + * @copyright 2007 David JEAN LOUIS, 2009 silverorange + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: CustomMessageProvider.php 282427 2009-06-19 10:22:48Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 1.1.0 + * @filesource + */ + +/** + * Common interfacefor message providers that allow overriding with custom + * messages + * + * Message providers may optionally implement this interface. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @author Michael Gauthier + * @copyright 2007 David JEAN LOUIS, 2009 silverorange + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Interface available since release 1.1.0 + */ +interface Console_CommandLine_CustomMessageProvider +{ + // getWithCustomMesssages() {{{ + + /** + * Retrieves the given string identifier corresponding message. + * + * For a list of identifiers please see the provided default message + * provider. + * + * @param string $code The string identifier of the message + * @param array $vars An array of template variables + * @param array $messages An optional array of messages to use. Array + * indexes are message codes. + * + * @return string + * @see Console_CommandLine_MessageProvider + * @see Console_CommandLine_MessageProvider_Default + */ + public function getWithCustomMessages( + $code, $vars = array(), $messages = array() + ); + + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Element.php b/_piecrust/libs/Console/CommandLine/Element.php new file mode 100644 index 0000000..58b9788 --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Element.php @@ -0,0 +1,144 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: Element.php 282427 2009-06-19 10:22:48Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Class that represent a command line element (an option, or an argument). + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +abstract class Console_CommandLine_Element +{ + // Public properties {{{ + + /** + * The element name. + * + * @var string $name Element name + */ + public $name; + + /** + * The name of variable displayed in the usage message, if no set it + * defaults to the "name" property. + * + * @var string $help_name Element "help" variable name + */ + public $help_name; + + /** + * The element description. + * + * @var string $description Element description + */ + public $description; + + /** + * Custom errors messages for this element + * + * This array is of the form: + * + * $messageText, + * $messageName => $messageText, + * ... + * ); + * ?> + * + * + * If specified, these messages override the messages provided by the + * default message provider. For example: + * + * 'The argument foo is required.', + * ); + * ?> + * + * + * @var array + * @see Console_CommandLine_MessageProvider_Default + */ + public $messages = array(); + + // }}} + // __construct() {{{ + + /** + * Constructor. + * + * @param string $name The name of the element + * @param array $params An optional array of parameters + * + * @return void + */ + public function __construct($name = null, $params = array()) + { + $this->name = $name; + foreach ($params as $attr => $value) { + if (property_exists($this, $attr)) { + $this->$attr = $value; + } + } + } + + // }}} + // toString() {{{ + + /** + * Returns the string representation of the element. + * + * @return string The string representation of the element + * @todo use __toString() instead + */ + public function toString() + { + return $this->help_name; + } + // }}} + // validate() {{{ + + /** + * Validates the element instance and set it's default values. + * + * @return void + * @throws Console_CommandLine_Exception + */ + public function validate() + { + // if no help_name passed, default to name + if ($this->help_name == null) { + $this->help_name = $this->name; + } + } + + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Exception.php b/_piecrust/libs/Console/CommandLine/Exception.php new file mode 100644 index 0000000..9f0006d --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Exception.php @@ -0,0 +1,97 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: Exception.php 282427 2009-06-19 10:22:48Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Include the PEAR_Exception class + */ +require_once 'PEAR/Exception.php'; + +/** + * Interface for custom message provider. + */ +require_once 'Console/CommandLine/CustomMessageProvider.php'; + +/** + * Class for exceptions raised by the Console_CommandLine package. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Exception extends PEAR_Exception +{ + // Codes constants {{{ + + /**#@+ + * Exception code constants. + */ + const OPTION_VALUE_REQUIRED = 1; + const OPTION_VALUE_UNEXPECTED = 2; + const OPTION_VALUE_TYPE_ERROR = 3; + const OPTION_UNKNOWN = 4; + const ARGUMENT_REQUIRED = 5; + const INVALID_SUBCOMMAND = 6; + /**#@-*/ + + // }}} + // factory() {{{ + + /** + * Convenience method that builds the exception with the array of params by + * calling the message provider class. + * + * @param string $code The string identifier of the + * exception. + * @param array $params Array of template vars/values + * @param Console_CommandLine $parser An instance of the parser + * @param array $messages An optional array of messages + * passed to the message provider. + * + * @return object an instance of Console_CommandLine_Exception + */ + public static function factory( + $code, $params, $parser, array $messages = array() + ) { + $provider = $parser->message_provider; + if ($provider instanceof Console_CommandLine_CustomMessageProvider) { + $msg = $provider->getWithCustomMessages( + $code, + $params, + $messages + ); + } else { + $msg = $provider->get($code, $params); + } + $const = 'Console_CommandLine_Exception::' . $code; + $code = defined($const) ? constant($const) : 0; + return new Console_CommandLine_Exception($msg, $code); + } + + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/MessageProvider.php b/_piecrust/libs/Console/CommandLine/MessageProvider.php new file mode 100644 index 0000000..b1b06b9 --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/MessageProvider.php @@ -0,0 +1,56 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: MessageProvider.php 271998 2008-12-27 10:52:28Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Message providers common interface, all message providers must implement + * this interface. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +interface Console_CommandLine_MessageProvider +{ + // get() {{{ + + /** + * Retrieves the given string identifier corresponding message. + * For a list of identifiers please see the provided default message + * provider. + * + * @param string $code The string identifier of the message + * @param array $vars An array of template variables + * + * @return string + * @see Console_CommandLine_MessageProvider_Default + */ + public function get($code, $vars=array()); + + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/MessageProvider/Default.php b/_piecrust/libs/Console/CommandLine/MessageProvider/Default.php new file mode 100644 index 0000000..ce5d371 --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/MessageProvider/Default.php @@ -0,0 +1,151 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: Default.php 282427 2009-06-19 10:22:48Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * The message provider interface. + */ +require_once 'Console/CommandLine/MessageProvider.php'; + +/** + * The custom message provider interface. + */ +require_once 'Console/CommandLine/CustomMessageProvider.php'; + +/** + * Lightweight class that manages messages used by Console_CommandLine package, + * allowing the developper to customize these messages, for example to + * internationalize a command line frontend. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_MessageProvider_Default + implements Console_CommandLine_MessageProvider, + Console_CommandLine_CustomMessageProvider +{ + // Properties {{{ + + /** + * Associative array of messages + * + * @var array $messages + */ + protected $messages = array( + 'OPTION_VALUE_REQUIRED' => 'Option "{$name}" requires a value.', + 'OPTION_VALUE_UNEXPECTED' => 'Option "{$name}" does not expect a value (got "{$value}").', + 'OPTION_VALUE_NOT_VALID' => 'Option "{$name}" must be one of the following: "{$choices}" (got "{$value}").', + 'OPTION_VALUE_TYPE_ERROR' => 'Option "{$name}" requires a value of type {$type} (got "{$value}").', + 'OPTION_AMBIGUOUS' => 'Ambiguous option "{$name}", can be one of the following: {$matches}.', + 'OPTION_UNKNOWN' => 'Unknown option "{$name}".', + 'ARGUMENT_REQUIRED' => 'You must provide at least {$argnum} argument{$plural}.', + 'PROG_HELP_LINE' => 'Type "{$progname} --help" to get help.', + 'PROG_VERSION_LINE' => '{$progname} version {$version}.', + 'COMMAND_HELP_LINE' => 'Type "{$progname} --help" to get help on specific command.', + 'USAGE_WORD' => 'Usage', + 'OPTION_WORD' => 'Options', + 'ARGUMENT_WORD' => 'Arguments', + 'COMMAND_WORD' => 'Commands', + 'PASSWORD_PROMPT' => 'Password: ', + 'PASSWORD_PROMPT_ECHO' => 'Password (warning: will echo): ', + 'INVALID_CUSTOM_INSTANCE' => 'Instance does not implement the required interface', + 'LIST_OPTION_MESSAGE' => 'lists valid choices for option {$name}', + 'LIST_DISPLAYED_MESSAGE' => 'Valid choices are: ', + 'INVALID_SUBCOMMAND' => 'Command "{$command}" is not valid.', + ); + + // }}} + // get() {{{ + + /** + * Retrieve the given string identifier corresponding message. + * + * @param string $code The string identifier of the message + * @param array $vars An array of template variables + * + * @return string + */ + public function get($code, $vars = array()) + { + if (!isset($this->messages[$code])) { + return 'UNKNOWN'; + } + return $this->replaceTemplateVars($this->messages[$code], $vars); + } + + // }}} + // getWithCustomMessages() {{{ + + /** + * Retrieve the given string identifier corresponding message. + * + * @param string $code The string identifier of the message + * @param array $vars An array of template variables + * @param array $messages An optional array of messages to use. Array + * indexes are message codes. + * + * @return string + */ + public function getWithCustomMessages( + $code, $vars = array(), $messages = array() + ) { + // get message + if (isset($messages[$code])) { + $message = $messages[$code]; + } elseif (isset($this->messages[$code])) { + $message = $this->messages[$code]; + } else { + $message = 'UNKNOWN'; + } + return $this->replaceTemplateVars($message, $vars); + } + + // }}} + // replaceTemplateVars() {{{ + + /** + * Replaces template vars in a message + * + * @param string $message The message + * @param array $vars An array of template variables + * + * @return string + */ + protected function replaceTemplateVars($message, $vars = array()) + { + $tmpkeys = array_keys($vars); + $keys = array(); + foreach ($tmpkeys as $key) { + $keys[] = '{$' . $key . '}'; + } + return str_replace($keys, array_values($vars), $message); + } + + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Option.php b/_piecrust/libs/Console/CommandLine/Option.php new file mode 100644 index 0000000..64f645e --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Option.php @@ -0,0 +1,373 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: Option.php 292158 2009-12-15 12:14:28Z rquadling $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Required by this class. + */ +require_once 'Console/CommandLine.php'; +require_once 'Console/CommandLine/Element.php'; + +/** + * Class that represent a commandline option. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Option extends Console_CommandLine_Element +{ + // Public properties {{{ + + /** + * The option short name (ex: -v). + * + * @var string $short_name Short name of the option + */ + public $short_name; + + /** + * The option long name (ex: --verbose). + * + * @var string $long_name Long name of the option + */ + public $long_name; + + /** + * The option action, defaults to "StoreString". + * + * @var string $action Option action + */ + public $action = 'StoreString'; + + /** + * The default value of the option if not provided on the command line. + * + * @var mixed $default Default value of the option. + */ + public $default; + + /** + * An array of possible values for the option. If this array is not empty + * and the value passed is not in the array an exception is raised. + * This only make sense for actions that accept values of course. + * + * @var array $choices Valid choices for the option + */ + public $choices = array(); + + /** + * The callback function (or method) to call for an action of type + * Callback, this can be any callable supported by the php function + * call_user_func. + * + * Example: + * + * + * $parser->addOption('myoption', array( + * 'short_name' => '-m', + * 'long_name' => '--myoption', + * 'action' => 'Callback', + * 'callback' => 'myCallbackFunction' + * )); + * + * + * @var callable $callback The option callback + */ + public $callback; + + /** + * An associative array of additional params to pass to the class + * corresponding to the action, this array will also be passed to the + * callback defined for an action of type Callback, Example: + * + * + * // for a custom action + * $parser->addOption('myoption', array( + * 'short_name' => '-m', + * 'long_name' => '--myoption', + * 'action' => 'MyCustomAction', + * 'action_params' => array('foo'=>true, 'bar'=>false) + * )); + * + * // if the user type: + * // $ -m spam + * // in your MyCustomAction class the execute() method will be called + * // with the value 'spam' as first parameter and + * // array('foo'=>true, 'bar'=>false) as second parameter + * + * + * @var array $action_params Additional parameters to pass to the action + */ + public $action_params = array(); + + /** + * For options that expect an argument, this property tells the parser if + * the option argument is optional and can be ommited. + * + * @var bool $argumentOptional Whether the option arg is optional or not + */ + public $argument_optional = false; + + /** + * For options that uses the "choice" property only. + * Adds a --list- option to the parser that displays the list of + * choices for the option. + * + * @var bool $add_list_option Whether to add a list option or not + */ + public $add_list_option = false; + + // }}} + // Private properties {{{ + + /** + * When an action is called remember it to allow for multiple calls. + * + * @var object $action_instance Placeholder for action + */ + private $_action_instance = null; + + // }}} + // __construct() {{{ + + /** + * Constructor. + * + * @param string $name The name of the option + * @param array $params An optional array of parameters + * + * @return void + */ + public function __construct($name = null, $params = array()) + { + parent::__construct($name, $params); + if ($this->action == 'Password') { + // special case for Password action, password can be passed to the + // commandline or prompted by the parser + $this->argument_optional = true; + } + } + + // }}} + // toString() {{{ + + /** + * Returns the string representation of the option. + * + * @param string $delim Delimiter to use between short and long option + * + * @return string The string representation of the option + * @todo use __toString() instead + */ + public function toString($delim = ", ") + { + $ret = ''; + $padding = ''; + if ($this->short_name != null) { + $ret .= $this->short_name; + if ($this->expectsArgument()) { + $ret .= ' ' . $this->help_name; + } + $padding = $delim; + } + if ($this->long_name != null) { + $ret .= $padding . $this->long_name; + if ($this->expectsArgument()) { + $ret .= '=' . $this->help_name; + } + } + return $ret; + } + + // }}} + // expectsArgument() {{{ + + /** + * Returns true if the option requires one or more argument and false + * otherwise. + * + * @return bool Whether the option expects an argument or not + */ + public function expectsArgument() + { + if ($this->action == 'StoreTrue' || $this->action == 'StoreFalse' || + $this->action == 'Help' || $this->action == 'Version' || + $this->action == 'Counter' || $this->action == 'List') { + return false; + } + return true; + } + + // }}} + // dispatchAction() {{{ + + /** + * Formats the value $value according to the action of the option and + * updates the passed Console_CommandLine_Result object. + * + * @param mixed $value The value to format + * @param Console_CommandLine_Result $result The result instance + * @param Console_CommandLine $parser The parser instance + * + * @return void + * @throws Console_CommandLine_Exception + */ + public function dispatchAction($value, $result, $parser) + { + $actionInfo = Console_CommandLine::$actions[$this->action]; + if (true === $actionInfo[1]) { + // we have a "builtin" action + $tokens = explode('_', $actionInfo[0]); + include_once implode('/', $tokens) . '.php'; + } + $clsname = $actionInfo[0]; + if ($this->_action_instance === null) { + $this->_action_instance = new $clsname($result, $this, $parser); + } + + // check value is in option choices + if (!empty($this->choices) && !in_array($this->_action_instance->format($value), $this->choices)) { + throw Console_CommandLine_Exception::factory( + 'OPTION_VALUE_NOT_VALID', + array( + 'name' => $this->name, + 'choices' => implode('", "', $this->choices), + 'value' => $value, + ), + $parser, + $this->messages + ); + } + $this->_action_instance->execute($value, $this->action_params); + } + + // }}} + // validate() {{{ + + /** + * Validates the option instance. + * + * @return void + * @throws Console_CommandLine_Exception + * @todo use exceptions instead + */ + public function validate() + { + // check if the option name is valid + if (!preg_match('/^[a-zA-Z_\x7f-\xff]+[a-zA-Z0-9_\x7f-\xff]*$/', + $this->name)) { + Console_CommandLine::triggerError('option_bad_name', + E_USER_ERROR, array('{$name}' => $this->name)); + } + // call the parent validate method + parent::validate(); + // a short_name or a long_name must be provided + if ($this->short_name == null && $this->long_name == null) { + Console_CommandLine::triggerError('option_long_and_short_name_missing', + E_USER_ERROR, array('{$name}' => $this->name)); + } + // check if the option short_name is valid + if ($this->short_name != null && + !(preg_match('/^\-[a-zA-Z]{1}$/', $this->short_name))) { + Console_CommandLine::triggerError('option_bad_short_name', + E_USER_ERROR, array( + '{$name}' => $this->name, + '{$short_name}' => $this->short_name + )); + } + // check if the option long_name is valid + if ($this->long_name != null && + !preg_match('/^\-\-[a-zA-Z]+[a-zA-Z0-9_\-]*$/', $this->long_name)) { + Console_CommandLine::triggerError('option_bad_long_name', + E_USER_ERROR, array( + '{$name}' => $this->name, + '{$long_name}' => $this->long_name + )); + } + // check if we have a valid action + if (!is_string($this->action)) { + Console_CommandLine::triggerError('option_bad_action', + E_USER_ERROR, array('{$name}' => $this->name)); + } + if (!isset(Console_CommandLine::$actions[$this->action])) { + Console_CommandLine::triggerError('option_unregistered_action', + E_USER_ERROR, array( + '{$action}' => $this->action, + '{$name}' => $this->name + )); + } + // if the action is a callback, check that we have a valid callback + if ($this->action == 'Callback' && !is_callable($this->callback)) { + Console_CommandLine::triggerError('option_invalid_callback', + E_USER_ERROR, array('{$name}' => $this->name)); + } + } + + // }}} + // setDefaults() {{{ + + /** + * Set the default value according to the configured action. + * + * Note that for backward compatibility issues this method is only called + * when the 'force_options_defaults' is set to true, it will become the + * default behaviour in the next major release of Console_CommandLine. + * + * @return void + */ + public function setDefaults() + { + if ($this->default !== null) { + // already set + return; + } + switch ($this->action) { + case 'Counter': + case 'StoreInt': + $this->default = 0; + break; + case 'StoreFloat': + $this->default = 0.0; + break; + case 'StoreArray': + $this->default = array(); + break; + case 'StoreTrue': + $this->default = false; + break; + case 'StoreFalse': + $this->default = true; + break; + default: + return; + } + } + + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Outputter.php b/_piecrust/libs/Console/CommandLine/Outputter.php new file mode 100644 index 0000000..ff47288 --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Outputter.php @@ -0,0 +1,63 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: Outputter.php 271998 2008-12-27 10:52:28Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Outputters common interface, all outputters must implement this interface. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +interface Console_CommandLine_Outputter +{ + // stdout() {{{ + + /** + * Processes the output for a message that should be displayed on STDOUT. + * + * @param string $msg The message to output + * + * @return void + */ + public function stdout($msg); + + // }}} + // stderr() {{{ + + /** + * Processes the output for a message that should be displayed on STDERR. + * + * @param string $msg The message to output + * + * @return void + */ + public function stderr($msg); + + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Outputter/Default.php b/_piecrust/libs/Console/CommandLine/Outputter/Default.php new file mode 100644 index 0000000..77547cc --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Outputter/Default.php @@ -0,0 +1,82 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: Default.php 271998 2008-12-27 10:52:28Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * The Outputter interface. + */ +require_once 'Console/CommandLine/Outputter.php'; + +/** + * Console_CommandLine default Outputter. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Outputter_Default implements Console_CommandLine_Outputter +{ + // stdout() {{{ + + /** + * Writes the message $msg to STDOUT. + * + * @param string $msg The message to output + * + * @return void + */ + public function stdout($msg) + { + if (defined('STDOUT')) { + fwrite(STDOUT, $msg); + } else { + echo $msg; + } + } + + // }}} + // stderr() {{{ + + /** + * Writes the message $msg to STDERR. + * + * @param string $msg The message to output + * + * @return void + */ + public function stderr($msg) + { + if (defined('STDERR')) { + fwrite(STDERR, $msg); + } else { + echo $msg; + } + } + + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Renderer.php b/_piecrust/libs/Console/CommandLine/Renderer.php new file mode 100644 index 0000000..6ca289c --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Renderer.php @@ -0,0 +1,71 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: Renderer.php 271998 2008-12-27 10:52:28Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Renderers common interface, all renderers must implement this interface. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +interface Console_CommandLine_Renderer +{ + // usage() {{{ + + /** + * Returns the full usage message. + * + * @return string The usage message + */ + public function usage(); + + // }}} + // error() {{{ + + /** + * Returns a formatted error message. + * + * @param string $error The error message to format + * + * @return string The error string + */ + public function error($error); + + // }}} + // version() {{{ + + /** + * Returns the program version string. + * + * @return string The version string + */ + public function version(); + + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Renderer/Default.php b/_piecrust/libs/Console/CommandLine/Renderer/Default.php new file mode 100644 index 0000000..cbad876 --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Renderer/Default.php @@ -0,0 +1,417 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: Default.php 282213 2009-06-16 08:15:06Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * The renderer interface. + */ +require_once 'Console/CommandLine/Renderer.php'; + +/** + * Console_CommandLine default renderer. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Renderer_Default implements Console_CommandLine_Renderer +{ + // Properties {{{ + + /** + * Integer that define the max width of the help text. + * + * @var integer $line_width Line width + */ + public $line_width = 75; + + /** + * Integer that define the max width of the help text. + * + * @var integer $line_width Line width + */ + public $options_on_different_lines = false; + + /** + * An instance of Console_CommandLine. + * + * @var Console_CommandLine $parser The parser + */ + public $parser = false; + + // }}} + // __construct() {{{ + + /** + * Constructor. + * + * @param object $parser A Console_CommandLine instance + * + * @return void + */ + public function __construct($parser = false) + { + $this->parser = $parser; + } + + // }}} + // usage() {{{ + + /** + * Returns the full usage message. + * + * @return string The usage message + */ + public function usage() + { + $ret = ''; + if (!empty($this->parser->description)) { + $ret .= $this->description() . "\n\n"; + } + $ret .= $this->usageLine() . "\n"; + if (count($this->parser->commands) > 0) { + $ret .= $this->commandUsageLine() . "\n"; + } + if (count($this->parser->options) > 0) { + $ret .= "\n" . $this->optionList() . "\n"; + } + if (count($this->parser->args) > 0) { + $ret .= "\n" . $this->argumentList() . "\n"; + } + if (count($this->parser->commands) > 0) { + $ret .= "\n" . $this->commandList() . "\n"; + } + $ret .= "\n"; + return $ret; + } + // }}} + // error() {{{ + + /** + * Returns a formatted error message. + * + * @param string $error The error message to format + * + * @return string The error string + */ + public function error($error) + { + $ret = 'Error: ' . $error . "\n"; + if ($this->parser->add_help_option) { + $name = $this->name(); + $ret .= $this->wrap($this->parser->message_provider->get('PROG_HELP_LINE', + array('progname' => $name))) . "\n"; + if (count($this->parser->commands) > 0) { + $ret .= $this->wrap($this->parser->message_provider->get('COMMAND_HELP_LINE', + array('progname' => $name))) . "\n"; + } + } + return $ret; + } + + // }}} + // version() {{{ + + /** + * Returns the program version string. + * + * @return string The version string + */ + public function version() + { + return $this->parser->message_provider->get('PROG_VERSION_LINE', array( + 'progname' => $this->name(), + 'version' => $this->parser->version + )) . "\n"; + } + + // }}} + // name() {{{ + + /** + * Returns the full name of the program or the sub command + * + * @return string The name of the program + */ + protected function name() + { + $name = $this->parser->name; + $parent = $this->parser->parent; + while ($parent) { + if (count($parent->options) > 0) { + $name = '[' + . strtolower($this->parser->message_provider->get('OPTION_WORD', + array('plural' => 's'))) + . '] ' . $name; + } + $name = $parent->name . ' ' . $name; + $parent = $parent->parent; + } + return $this->wrap($name); + } + + // }}} + // description() {{{ + + /** + * Returns the command line description message. + * + * @return string The description message + */ + protected function description() + { + return $this->wrap($this->parser->description); + } + + // }}} + // usageLine() {{{ + + /** + * Returns the command line usage message + * + * @return string the usage message + */ + protected function usageLine() + { + $usage = $this->parser->message_provider->get('USAGE_WORD') . ":\n"; + $ret = $usage . ' ' . $this->name(); + if (count($this->parser->options) > 0) { + $ret .= ' [' + . strtolower($this->parser->message_provider->get('OPTION_WORD')) + . ']'; + } + if (count($this->parser->args) > 0) { + foreach ($this->parser->args as $name=>$arg) { + $ret .= ' <' . $arg->help_name . ($arg->multiple?'...':'') . '>'; + } + } + return $this->columnWrap($ret, 2); + } + + // }}} + // commandUsageLine() {{{ + + /** + * Returns the command line usage message for subcommands. + * + * @return string The usage line + */ + protected function commandUsageLine() + { + if (count($this->parser->commands) == 0) { + return ''; + } + $ret = ' ' . $this->name(); + if (count($this->parser->options) > 0) { + $ret .= ' [' + . strtolower($this->parser->message_provider->get('OPTION_WORD')) + . ']'; + } + $ret .= " "; + $hasArgs = false; + $hasOptions = false; + foreach ($this->parser->commands as $command) { + if (!$hasArgs && count($command->args) > 0) { + $hasArgs = true; + } + if (!$hasOptions && ($command->add_help_option || + $command->add_version_option || count($command->options) > 0)) { + $hasOptions = true; + } + } + if ($hasOptions) { + $ret .= ' [options]'; + } + if ($hasArgs) { + $ret .= ' [args]'; + } + return $this->columnWrap($ret, 2); + } + + // }}} + // argumentList() {{{ + + /** + * Render the arguments list that will be displayed to the user, you can + * override this method if you want to change the look of the list. + * + * @return string The formatted argument list + */ + protected function argumentList() + { + $col = 0; + $args = array(); + foreach ($this->parser->args as $arg) { + $argstr = ' ' . $arg->toString(); + $args[] = array($argstr, $arg->description); + $ln = strlen($argstr); + if ($col < $ln) { + $col = $ln; + } + } + $ret = $this->parser->message_provider->get('ARGUMENT_WORD') . ":"; + foreach ($args as $arg) { + $text = str_pad($arg[0], $col) . ' ' . $arg[1]; + $ret .= "\n" . $this->columnWrap($text, $col+2); + } + return $ret; + } + + // }}} + // optionList() {{{ + + /** + * Render the options list that will be displayed to the user, you can + * override this method if you want to change the look of the list. + * + * @return string The formatted option list + */ + protected function optionList() + { + $col = 0; + $options = array(); + foreach ($this->parser->options as $option) { + $delim = $this->options_on_different_lines ? "\n" : ', '; + $optstr = $option->toString($delim); + $lines = explode("\n", $optstr); + $lines[0] = ' ' . $lines[0]; + if (count($lines) > 1) { + $lines[1] = ' ' . $lines[1]; + $ln = strlen($lines[1]); + } else { + $ln = strlen($lines[0]); + } + $options[] = array($lines, $option->description); + if ($col < $ln) { + $col = $ln; + } + } + $ret = $this->parser->message_provider->get('OPTION_WORD') . ":"; + foreach ($options as $option) { + if (count($option[0]) > 1) { + $text = str_pad($option[0][1], $col) . ' ' . $option[1]; + $pre = $option[0][0] . "\n"; + } else { + $text = str_pad($option[0][0], $col) . ' ' . $option[1]; + $pre = ''; + } + $ret .= "\n" . $pre . $this->columnWrap($text, $col+2); + } + return $ret; + } + + // }}} + // commandList() {{{ + + /** + * Render the command list that will be displayed to the user, you can + * override this method if you want to change the look of the list. + * + * @return string The formatted subcommand list + */ + protected function commandList() + { + + $commands = array(); + $col = 0; + foreach ($this->parser->commands as $cmdname=>$command) { + $cmdname = ' ' . $cmdname; + $commands[] = array($cmdname, $command->description, $command->aliases); + $ln = strlen($cmdname); + if ($col < $ln) { + $col = $ln; + } + } + $ret = $this->parser->message_provider->get('COMMAND_WORD') . ":"; + foreach ($commands as $command) { + $text = str_pad($command[0], $col) . ' ' . $command[1]; + if ($aliasesCount = count($command[2])) { + $pad = ''; + $text .= ' ('; + $text .= $aliasesCount > 1 ? 'aliases: ' : 'alias: '; + foreach ($command[2] as $alias) { + $text .= $pad . $alias; + $pad = ', '; + } + $text .= ')'; + } + $ret .= "\n" . $this->columnWrap($text, $col+2); + } + return $ret; + } + + // }}} + // wrap() {{{ + + /** + * Wraps the text passed to the method. + * + * @param string $text The text to wrap + * @param int $lw The column width (defaults to line_width property) + * + * @return string The wrapped text + */ + protected function wrap($text, $lw=null) + { + if ($this->line_width > 0) { + if ($lw === null) { + $lw = $this->line_width; + } + return wordwrap($text, $lw, "\n", false); + } + return $text; + } + + // }}} + // columnWrap() {{{ + + /** + * Wraps the text passed to the method at the specified width. + * + * @param string $text The text to wrap + * @param int $cw The wrap width + * + * @return string The wrapped text + */ + protected function columnWrap($text, $cw) + { + $tokens = explode("\n", $this->wrap($text)); + $ret = $tokens[0]; + $chunks = $this->wrap(trim(substr($text, strlen($ret))), + $this->line_width - $cw); + $tokens = explode("\n", $chunks); + foreach ($tokens as $token) { + if (!empty($token)) { + $ret .= "\n" . str_repeat(' ', $cw) . $token; + } + } + return $ret; + } + + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/Result.php b/_piecrust/libs/Console/CommandLine/Result.php new file mode 100644 index 0000000..d1e3dab --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/Result.php @@ -0,0 +1,71 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: Result.php 271998 2008-12-27 10:52:28Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * A lightweight class to store the result of the command line parsing. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_Result +{ + // Public properties {{{ + + /** + * The result options associative array. + * Key is the name of the option and value its value. + * + * @var array $options Result options array + */ + public $options = array(); + + /** + * The result arguments array. + * + * @var array $args Result arguments array + */ + public $args = array(); + + /** + * Name of the command invoked by the user, false if no command invoked. + * + * @var string $command_name Result command name + */ + public $command_name = false; + + /** + * A result instance for the subcommand. + * + * @var Console_CommandLine_Result Result instance for the subcommand + */ + public $command = false; + + // }}} +} diff --git a/_piecrust/libs/Console/CommandLine/XmlParser.php b/_piecrust/libs/Console/CommandLine/XmlParser.php new file mode 100644 index 0000000..997e2d8 --- /dev/null +++ b/_piecrust/libs/Console/CommandLine/XmlParser.php @@ -0,0 +1,305 @@ + + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version CVS: $Id: XmlParser.php 282427 2009-06-19 10:22:48Z izi $ + * @link http://pear.php.net/package/Console_CommandLine + * @since File available since release 0.1.0 + * @filesource + */ + +/** + * Required file + */ +require_once 'Console/CommandLine.php'; + +/** + * Parser for command line xml definitions. + * + * @category Console + * @package Console_CommandLine + * @author David JEAN LOUIS + * @copyright 2007 David JEAN LOUIS + * @license http://opensource.org/licenses/mit-license.php MIT License + * @version Release: 1.1.3 + * @link http://pear.php.net/package/Console_CommandLine + * @since Class available since release 0.1.0 + */ +class Console_CommandLine_XmlParser +{ + // parse() {{{ + + /** + * Parses the given xml definition file and returns a + * Console_CommandLine instance constructed with the xml data. + * + * @param string $xmlfile The xml file to parse + * + * @return Console_CommandLine A parser instance + */ + public static function parse($xmlfile) + { + if (!is_readable($xmlfile)) { + Console_CommandLine::triggerError('invalid_xml_file', + E_USER_ERROR, array('{$file}' => $xmlfile)); + } + $doc = new DomDocument(); + $doc->load($xmlfile); + self::validate($doc); + $nodes = $doc->getElementsByTagName('command'); + $root = $nodes->item(0); + return self::_parseCommandNode($root, true); + } + + // }}} + // parseString() {{{ + + /** + * Parses the given xml definition string and returns a + * Console_CommandLine instance constructed with the xml data. + * + * @param string $xmlstr The xml string to parse + * + * @return Console_CommandLine A parser instance + */ + public static function parseString($xmlstr) + { + $doc = new DomDocument(); + $doc->loadXml($xmlstr); + self::validate($doc); + $nodes = $doc->getElementsByTagName('command'); + $root = $nodes->item(0); + return self::_parseCommandNode($root, true); + } + + // }}} + // validate() {{{ + + /** + * Validates the xml definition using Relax NG. + * + * @param DomDocument $doc The document to validate + * + * @return boolean Whether the xml data is valid or not. + * @throws Console_CommandLine_Exception + * @todo use exceptions + */ + public static function validate($doc) + { + if (is_dir('c:\Program Files (x86)\PHP\v5.3\data' . DIRECTORY_SEPARATOR . 'Console_CommandLine')) { + $rngfile = 'c:\Program Files (x86)\PHP\v5.3\data' . DIRECTORY_SEPARATOR + . 'Console_CommandLine' . DIRECTORY_SEPARATOR . 'data' + . DIRECTORY_SEPARATOR . 'xmlschema.rng'; + } else { + $rngfile = dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' + . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'data' + . DIRECTORY_SEPARATOR . 'xmlschema.rng'; + } + if (!is_readable($rngfile)) { + Console_CommandLine::triggerError('invalid_xml_file', + E_USER_ERROR, array('{$file}' => $rngfile)); + } + return $doc->relaxNGValidate($rngfile); + } + + // }}} + // _parseCommandNode() {{{ + + /** + * Parses the root command node or a command node and returns the + * constructed Console_CommandLine or Console_CommandLine_Command instance. + * + * @param DomDocumentNode $node The node to parse + * @param bool $isRootNode Whether it is a root node or not + * + * @return mixed Console_CommandLine or Console_CommandLine_Command + */ + private static function _parseCommandNode($node, $isRootNode = false) + { + if ($isRootNode) { + $obj = new Console_CommandLine(); + } else { + include_once 'Console/CommandLine/Command.php'; + $obj = new Console_CommandLine_Command(); + } + foreach ($node->childNodes as $cNode) { + $cNodeName = $cNode->nodeName; + switch ($cNodeName) { + case 'name': + case 'description': + case 'version': + $obj->$cNodeName = trim($cNode->nodeValue); + break; + case 'add_help_option': + case 'add_version_option': + case 'force_posix': + $obj->$cNodeName = self::_bool(trim($cNode->nodeValue)); + break; + case 'option': + $obj->addOption(self::_parseOptionNode($cNode)); + break; + case 'argument': + $obj->addArgument(self::_parseArgumentNode($cNode)); + break; + case 'command': + $obj->addCommand(self::_parseCommandNode($cNode)); + break; + case 'aliases': + if (!$isRootNode) { + foreach ($cNode->childNodes as $subChildNode) { + if ($subChildNode->nodeName == 'alias') { + $obj->aliases[] = trim($subChildNode->nodeValue); + } + } + } + break; + case 'messages': + $obj->messages = self::_messages($cNode); + break; + default: + break; + } + } + return $obj; + } + + // }}} + // _parseOptionNode() {{{ + + /** + * Parses an option node and returns the constructed + * Console_CommandLine_Option instance. + * + * @param DomDocumentNode $node The node to parse + * + * @return Console_CommandLine_Option The built option + */ + private static function _parseOptionNode($node) + { + include_once 'Console/CommandLine/Option.php'; + $obj = new Console_CommandLine_Option($node->getAttribute('name')); + foreach ($node->childNodes as $cNode) { + $cNodeName = $cNode->nodeName; + switch ($cNodeName) { + case 'choices': + foreach ($cNode->childNodes as $subChildNode) { + if ($subChildNode->nodeName == 'choice') { + $obj->choices[] = trim($subChildNode->nodeValue); + } + } + break; + case 'messages': + $obj->messages = self::_messages($cNode); + break; + default: + if (property_exists($obj, $cNodeName)) { + $obj->$cNodeName = trim($cNode->nodeValue); + } + break; + } + } + if ($obj->action == 'Password') { + $obj->argument_optional = true; + } + return $obj; + } + + // }}} + // _parseArgumentNode() {{{ + + /** + * Parses an argument node and returns the constructed + * Console_CommandLine_Argument instance. + * + * @param DomDocumentNode $node The node to parse + * + * @return Console_CommandLine_Argument The built argument + */ + private static function _parseArgumentNode($node) + { + include_once 'Console/CommandLine/Argument.php'; + $obj = new Console_CommandLine_Argument($node->getAttribute('name')); + foreach ($node->childNodes as $cNode) { + $cNodeName = $cNode->nodeName; + switch ($cNodeName) { + case 'description': + case 'help_name': + case 'default': + $obj->$cNodeName = trim($cNode->nodeValue); + break; + case 'multiple': + $obj->multiple = self::_bool(trim($cNode->nodeValue)); + break; + case 'optional': + $obj->optional = self::_bool(trim($cNode->nodeValue)); + break; + case 'messages': + $obj->messages = self::_messages($cNode); + break; + default: + break; + } + } + return $obj; + } + + // }}} + // _bool() {{{ + + /** + * Returns a boolean according to true/false possible strings. + * + * @param string $str The string to process + * + * @return boolean + */ + private static function _bool($str) + { + return in_array((string)$str, array('true', '1', 'on', 'yes')); + } + + // }}} + // _messages() {{{ + + /** + * Returns an array of custom messages for the element + * + * @param DOMNode $node The messages node to process + * + * @return array an array of messages + * + * @see Console_CommandLine::$messages + * @see Console_CommandLine_Element::$messages + */ + private static function _messages(DOMNode $node) + { + $messages = array(); + + foreach ($node->childNodes as $cNode) { + if ($cNode->nodeType == XML_ELEMENT_NODE) { + $name = $cNode->getAttribute('name'); + $value = trim($cNode->nodeValue); + + $messages[$name] = $value; + } + } + + return $messages; + } + + // }}} +} diff --git a/_piecrust/libs/Dwoo/CHANGELOG b/_piecrust/libs/Dwoo/CHANGELOG new file mode 100644 index 0000000..b7f2ff8 --- /dev/null +++ b/_piecrust/libs/Dwoo/CHANGELOG @@ -0,0 +1,508 @@ +[2010-02-07] 1.1.1 ++ Added {optional} plugin that just prints an optional var without any + notice if it doesn't exist ++ Added Dwoo::setTemplate() for testing purposes mostly +* Fixed an {extends} parsing bug that prevented the use of single-quotes + around the parent template's filename +* Fixed a security issue, if you didn't use a custom compiler factory but + passed the compiler directly to the get method with autoEscape enabled, + the autoEscape was disabled in included templates - Thanks to Fabien + Potencier for notifying me. +* Fixed a bug in {safe} when using variable-variables it would sometimes + corrupt the var name resulting in blank output +* Fixed a bug when accessing array indices that contain a minus sign, it + is now possible to access those using {$var[index-foo]}, + {$var['index-foo']} or {$index="index-foo"} {$var[$index]} +* Fixed a bug in {tif} that didn't work when 0 was given as the true or + false value +* Fixed a bug when using the autoEscape feature with sub-templates (the + compiled sub-template couldn't access the dwoo charset property, + resulting in a fatal error) +* Fixed a property reading bug on objects that implemented __get but not + __isset, implementing __isset is however very much recommended +* Fixed a Dwoo_Data bug in the append method when the index didn't exist + yet it threw a notice +* Fixed a bug when accessing global vars from a sub-template +* Fixed a couple bugs in the {dynamic} plugin with regard to using plugins + within a dynamic block +* Fixed a compilation bug when using a PluginProxy with highly nested calls +* Fixed a {load_templates} bug, plugins used in external templates were not + loaded correctly, same for custom user plugins +* Cached templates now check the source template for modification before + outputting the cached version +* Removed a couple of @-operator calls to file_get_contents + +[2009-07-18] 1.1.0 +! BC Break: Dwoo::initGlobals() is only called once during the Dwoo object + construction. If you had overriden it and need to update global data + before each template is executed you should instead override + Dwoo::initRuntimeVars() and push stuff in the globals array there. Also + be aware that this means captured data, foreach values and so-on will + persist from a parent template to an included one (but the include's + changes will not be reflected on the parent), and from a template + to the next if you render several in series. ++ Added {template} plugin that allows you to define sub-templates and then + call them (works recursively too, good for menus and lists) ++ Added {load_templates} to load external sub-templates into your file ++ Allowed string concatenation assignments with {$foo.="bar"} ++ Allowed access of static properties as {Foo::$bar} ++ Plugins/Helpers that use a dynamic number of arguments through + func_get_args are now working since the compiler lets any arguments in + excess pass through ++ Adapters: CodeIgniter: the adapter by Stefan Verstege has been added to + core and he will be its maintainer from now on ++ Adapters: CakePHP: this adapter is now added to core and is designed to + work with CakePHP 1.2 +* Adapters: Zend: Denis Arh is now appointed maintainer of that part and + fixed a few things since 1.0.1 +* The include_path isn't altered anymore, hopefully saving some stat calls +* User classes extending Dwoo_Template_File are now supported better with + regard to includes - Thanks to the Kayako.com team for the patch +* Objects now act like arrays when you access non-existing properties on + them (i.e. it outputs a notice only if it's output straight, and none + when passed to a function) +* For can now iterate backwards if you input numbers, it won't work with + variables though +* Slight performance improvement with big inheritance trees +* No more double-slashes in template paths since this seemed to cause + slight performance issues +* Fixed a bug with parsing AND/OR keywords in conditionals when they were + followed by round brackets +* Fixed assignments not handling multi-line values correctly +* Fixed parameter parsing issue when a plugin name was all uppercased +* Fixed assignments failing with autoEscape enabled +* Fixed parsing of vars with string keys that was too greedy +* Fixed an optimization causing foreach/for/loop variables not being + accessible when the foreach/.. name was set dynamically +* Fixed parsing of comments that were on top of the file when there are + spaces at the end of it +* Dwoo_Template::$chmod is now enforced for directories as well (#18) +* Many new unit tests to improve code coverage and a bunch of bug fixes + that resulted, but I didn't really keep track of them + +[2008-12-24] 1.0.1 +* Direct assignments like {$foo = 5} now allow spaces around the operator +* Fixed a {foreach} bug with the implode argument +* Fixed modulo operator in if statements +* Fixed date_format handling of negative and small unix timestamps +* Fixed a weird reference bug with ZF and includes.. whatever but thanks + to Denis Arh for the patch + +[2008-10-23] 1.0.0 +! BC Break: Small one that probably won't affect anyone, but it makes the + PluginProxy feature much stronger. Basically if you used a custom one you + will get a fatal error and need to update it to conform to the new + IPluginProxy interface, that's it ++ Compiler: the modifier syntax (|foo) can now be applied on functions and on + complex variables i.e. {$obj->getStuff()|upper} or {lower('foo')|upper} ++ SmartyCompat: Added a {section} plugin but I strongly discourage using it, + it was really made to support legacy templates, since {for} doesn't have to + handle {section}-BC anymore, it has been cleaned up a lot and the last + $skip parameter has been dropped +* The core Dwoo class doesn't need writable compile/cache dirs in the + constructor anymore so you can provide custom ones later through + ->setCompile(/Cache)Dir - thanks to Denis Arh for the patch +* Adapters: Zend: major overhaul thanks to Denis Arh, templates files should + probably be moved in the scripts subfolder after this update though, and + the settings array has changed a bit, you will get warnings if you don't + update the code anyway +* Plugins: improved the dump plugin, it now displays object's properties + and optionally public methods (if the new show_methods arg is set to true) + - thanks to Stephan Wentz for the patch +* Adapters: Zend: Added parameters to provide a custom engine (extends Dwoo) + or a custom data class (extends Dwoo_Data) - thanks to Maxime Merian for + the patch +* Compiler: added Dwoo_Compiler->setNestedCommentsHandling(true) to enable + parsing of nested comments (i.e. {* {* *} *} becomes a valid comment, useful + to comment out big chunks of code containing comments) +* Lines containing only comments and whitespace are now entirely removed +* Removed comments do not mess up the line count anymore (for error messages) +* Fixed parsing bug in {func()->propertyOfReturnedObject} +* Fixed file template class reading from the string compiler factory - thanks + to MrOxiMoron for the patch +* Fixed handling of variable variables that contained non standard characters +* Fixed a 1.0.0beta regression that messed with custom plugin directories + on Windows +* SmartyCompat: Fixed a few bugs in the adapter and processor - thanks to + Stefan Moonen for the patches + +[2008-09-08] 1.0.0beta +! Important note : Dwoo.php should not be included directly anymore, please + read the UPGRADE_NOTES file for more infos on the matter, if you don't + your Dwoo install will most likely break after the update anyway +! BC Break: {include} and {extends} now support the include path properly, + which means that if you include "foo/bar.html" from _any_ template and you + have an include path set on your template object, it will look in all those + paths for foo/bar.html. If you use relative paths, for example + if you include "../foo/bar.html" AND have an include path set, you will now + have a problem, because you can't mix both approaches, otherwise you should + be fine, so to fix this you should convert your relative includes/extends ++ Adapters: Added the Agavi interface for Dwoo + (see /Dwoo/Adapters/Agavi/README) ++ API: Added Dwoo_Compilation_Exception methods getCompiler() and + getTemplate() so you can catch the exception and use those to build a nicer + error view with all the details you want ++ Plugins: Added a mode parameter to {strip} to allow stripping of javascript + code blocks that use "// comments", because without this special mode the + comments result in syntax errors +* The Compiler now ensures that a template starting with get() is now stricter as to what it accepts as a "template", only + Dwoo_ITemplate objects or valid filenames are accepted +* Foreach and other similar plugins that support "else" now only count() + their input before processing when an else block follows +* Various optimizations +* Fixed compiler bug that created a parse error when you had comments in an + extended template +* Fixed extends bug when extending files in other directories using relative + paths +* Fixed parsing bug with "|modifier:param|modifier2} with:colon after it" +* Bug fixed with smarty functions called with no parameters (in compat mode) +* Fixed Dwoo::isArray() check, objects implementing ArrayAccess are now + valid (thanks to Daniel Cousineau for the patch) +* Fixed compiler warning when doing {func()->method()} or {func()->property} +* Fixed compiled/cached files being written in the wrong place when the path + to the template contains "../"s +* Fixed {if} failing with conditions using upper case operators (i.e. AND) + +[2008-08-03] 0.9.3 ++ Adapters: Added the ZendFramework interface for Dwoo + (see /Dwoo/Adapters/ZendFramework/README) ++ Plugins: Added the {a} block plugin to generate tags ++ Syntax: Added the ";" token that allows to group multiple instructions in one + single template tag, example: {if $foo; "> $foo";$bar;/} is equal to: + {if $foo}> {$foo}{$bar}{/} - This also allow block operations such as: + {a http://url.com; "Text" /} which equals to {a http://url.com}Text{/} ++ Syntax: Block plugins that you want to call without content can be + self-closed just like XML tags (e.g. {a "http://url.com" /} ). Be careful not + to close a non-block plugin like that however, since it will close it's + parent block ++ Syntax: Static methods can be called using {Class::method()} ++ Syntax: It is now possible to use a plugin's result as an object and call + a method or read a property from it, i.e. {fetchObject()->doStuff()} ++ API: Added Dwoo_Plugin::paramsToAttributes() utility function to help + with the creation of compilable xml/html-related plugins ++ API: Added Dwoo->setPluginProxy() and Dwoo_IPluginProxy that allow you to + hook into the compiler's plugin subsystem to provide your own plugin calls. + Thanks to Denis Arh for the patch + => http://forum.dwoo.org/viewtopic.php?id=70 ++ API: Dwoo->addPlugin() has a third parameter to mark a plugin as compilable ++ Compiler supports method calls into a method call's parameters +* Dwoo_Compiler::implode_r is now public/static so it can be used in other + places such as plugin proxies +* Syntax: Math expressions in strings are now only allowed when the entire + expression is delimited, e.g. {"/$foo/$bar"} evaluates as just that while + {"/`$foo/$bar`"} will result in "/".($foo/$bar), therefore processing the / + as a division, this is better since URLs using / are far more common than + math in strings + => http://forum.dwoo.org/viewtopic.php?id=50 +* Compiler now allows the use of the right delimiter inside strings (e.g. {"}"}) +* Fixed a bug preventing if blocks containing a {elseif} followed by {else} +* Fixed the Dwoo_ILoader interface and implemented it in Dwoo_Loader now + => http://forum.dwoo.org/viewtopic.php?id=70 +* Fixed a compileId auto-generation creating conflicts +* Include allows paths going in upper levels now such as : "../foo.html" +* Some compiler fixes regarding custom plugins + +[2008-06-28] 0.9.2 +! BC Break: Renamed the {strip} modifier/function to {whitespace}, this does + not affect the strip block, that has been moved off the compiler into a + plugin. Which is why the name conflict had to be resolved. Please report + any issue you might encounter when using the strip block +! BC Break: Changed the function signature of Dwoo_Block_Plugin::postProcessing + it only affects you if you had any custom block plugins, see UPGRADE_NOTES + for more details +! BC Break: Dwoo_ITemplate::cache() must now return the cached file name or + false if caching failed, only affects you if you had a custom template class + and implemented cache() yourself +! BC Break: Dwoo_Loader is not static anymore so anything you did on it directly + will break. Use $dwoo->getLoader()->addDirectory() instead of + Dwoo_Loader::addDirectory() for example +! BC Break: DWOO_COMPILE_DIRECTORY and DWOO_CACHE_DIRECTORY are gone, set those + paths in Dwoo's constructor (i.e. new Dwoo('compiledir', 'cachedir')) if you + need to override the default ones ++ Plugins: Added {dynamic} that allows cached templates to have dynamic + (non-cached) parts, when rendering a cached page, the dynamic parts can still + use the variables you provides ++ Plugins: Added {tif} that acts as a ternary if / allows you to use a ternary + operator inside it ++ API: Added a Dwoo_ILoader interface if you want to provide a custom plugin + loading solution (use $dwoo->setLoader($myLoader)) ++ Added line numbers in compilation errors and improved several error messages ++ Added magic object-access methods to Dwoo_Data, so you can assign values by + doing $data->var = $val; instead of $data->assign('var', $val); ++ Added get()/unassign()/isAssigned() methods to read, remove and check for the + presence of a var inside a Dwoo_Data object +* Plugins: added a fifth 'string $implode' parameter to {foreach}, it prints + whatever you provide it between each item of the foreach, just like implode() +* Plugins: added a fourth 'bool $case_sensitive' parameter to {replace} +* Plugins: added a fourth 'bool $trim' parameter to {capture} that trims + the captured text +* Made the dependency on the hash extension optional +* Fixed compiler bug that prevented method calls combined with named parameters +* Fixed compiler bug that prevented the % shortcut for constants to work within + function calls (basically it only worked as {%CONST}) +* Fixed compiler bug that prevented empty() to be called +* Fixed several modifier parsing bugs + => http://forum.dwoo.org/viewtopic.php?id=27 +* Fixed empty string parsing in modifier applied to variables +* Fixed compiler handling of {template_tag} where there was + no ';' at the end of the php tag +* Allowed method calls to work with named parameters +* Removed checks for methods/properties being present on objects before calling + them since these can be handled by __get() and __call() + => http://forum.dwoo.org/viewtopic.php?id=22 +* Calling {func (params)} (with the space between function and params) is now + allowed + => http://forum.dwoo.org/viewtopic.php?id=21 +* The compiler now allows \r, \n and \t to be parameter splitters as well as + "," and " ". You can therefore split complex function calls on multiple lines +* Converted most of the code to follow PEAR Coding Standards, hopefully this + didn't break anything that the tests missed +* A few other minor or internal changes + +[2008-05-30] 0.9.1 ++ API: Added Dwoo_Compiler->setAutoEscape() and getAutoEscape() to modify the + automatic html entity escaping setting. This is disabled by default, and when + enabled can be overriden with the {safe $var} plugin or the + {auto_escape disable} block plugin. The block plugin can also be used to + enable this mode from within a template ++ Syntax: Mixing named and unnamed parameters is now allowed, as long as the + unnamed ones appear first ++ Syntax: Added {/} shortcut that closes the last opened block +* Optimized scope-handling functions, {loop} and {with} are now slightly faster +* Fixed a bug in {date_format} that prevented anything but unix timestamps to + work +* {literal} and {strip} now follow the LooseOpeningsHandling setting +* Fixed complex variables (i.e. {$_root[$c[$x.0]].0}) parsing bugs +* Fixed $dwoo->addResource() breaking if the resource class was not loaded yet, + autoload should now be called (thanks mike) +* Fixed a block stack bug that messed up {textformat} and possibly usermade + block plugins + +[2008-05-10] 0.9.0 +! BC Break: changed all class names to be PEAR compliant (aka use underscores + to separate words/paths), sorry about that but I better do it now than in + six months +! BC Break: $dwoo->output() and get() have been swapped internally, but it + doesn't change anything for you unless you called output(*, *, *, true) + directly to emulate get(). This was done to reduce some overhead +! BC Break: $dwoo->getTemplate() changed to $dwoo->templateFactory() and + $dwoo->getCurrentTemplate() changed to $dwoo->getTemplate() for consistency + among all classes and factory functions ++ Added a compiled version of Dwoo that loads faster (especially with opcode + caches such as APC), include Dwoo.compiled.php instead of Dwoo.php on + production but if you want to file a bug use Dwoo.php please as it allows + you to get the proper file/line number where an error occurs. Do not remove + all other files however since they are not all included in the compiled + package ++ Plugins: Added {extends} and {block} to handle template inheritance, read + more about it at http://wiki.dwoo.org/index.php/TemplateInheritance ++ Plugins: Added {loop} that combines {foreach} and {with}, see + http://wiki.dwoo.org/index.php/Block:loop for details ++ Plugins: Added {do} that executes whatever you feed it whitout echoing the + result, used internally for extends but you can use it if required ++ Plugins: Added {eol} that prints an end of line character (OS-specific) ++ Syntax: Added shortcut for {$dwoo.const.*} using '%', for example you can use + {%FOO} instead of {$dwoo.const.FOO} ++ Syntax: When using named parameters, typing a parameter name without any + value is the same as typing param=true, for example {foo name="test" bar} and + {foo name="test" bar=true} are equals, can be useful for very complex plugins + with huge amounts of parameters. ++ Syntax: Added support for {$foo+=5}, {$foo="a"}, {$foo++} and {$foo--} ++ Syntax: Added shortcut for $dwoo.*, you can now use {$.foreach.foo} instead + of {$dwoo.foreach.foo} for example, applies to all $dwoo.* vars ++ Syntax: Added $ as a shortcut for current scope, $_ for $_parent and $__ for + $_root ++ API: Added getSource(), getUid() and getResourceIdentifier() to Dwoo_ITemplate ++ API: Added setSecurityPolicy() too Dwoo_ICompiler and modified the arguments + of its compile() method ++ API: Added a bunch of utility functions to Dwoo_Compiler, allowing compiled + plugins to access more of the compiler internals ++ Both cache and compile IDs can now have slashes in them to create subfolders + in the cache/compile dirs ++ Added a DWOO_CHMOD constant that, if set before you include Dwoo, allows you + to define the file mode of all the file/directories Dwoo will write, defaults + to 0777 ++ Added a 'data' argument to {include} to be able to feed data directly into it +* The compiler now throws Dwoo_Compilation_Exception exceptions upon failure + and security problems lead to a Dwoo_Security_Exception being thrown. Runtime + plugin errors and such trigger simple php errors to allow the template + execution to complete +* Fixed a potential concurrency issue (thanks to Rasmus Schultz for the patch) +* Moved all files to Dwoo/Class.php excepted for the core Dwoo.php file +* Various performance improvements, including the removal of a lot of isset() + calls. Doing {$foo} if foo is undefined will now display a PHP warning, but + doing {foreach $foo}..{/foreach} will not however, that way you don't have + to do {if isset($foo)} before the foreach, but automated isset() calls don't + impact performance as much as they did before. +* API: Dwoo_ITemplate->clearCache now requires a Dwoo instance as its first arg, + should not affect you unless you built a custom template class from scratch +* Reworked Dwoo template rendering to avoid variable conflicts with plugins +* {include} now uses the current resource if none is provided instead of using + file as it did before +* Dwoo uses include path instead of absolute includes +* Changed all line endings to Unix (line feed only) and all spaces left have + been converted to tabs (tabspace 4) +* TestFest happened early for Dwoo, lots of new tests and more code covered +* Fixed a regression in the handling of custom class plugins +* Fixed various bugs in the Adapter class and related smarty compatibility + features +* Fixed a classpath rebuilding bug that occured on some UNIX platforms due to + glob() returning false sometimes for empty folders +* Fixed a bug in Dwoo_Security_Policy->getAllowedDirectories(), no security + issue though +* Fixed a bug in Dwoo::setScope affecting {loop} and {with} +* Fixed a parsing bug when doing {"string"|modifier:$var} + +[2008-04-09] 0.3.4 +! BC Break: DWOO_PATH constant changed to DWOO_DIRECTORY +! BC Break: Smarty's @ operator for modifiers is now reversed, for example + $array|reverse will reverse the items of that array while $array|@reverse + will reverse each item of the given array (as if you used array_map) ++ Syntax: Added support for method calls on objects i.e. {$foo->bar()} ++ Added support for smarty security features, see the DwooSecurityPolicy class + and $dwoo->setSecurityPolicy() ++ API: Added a DwooCompiler->setLooseOpeningHandling() method that, if set to + true, allows tags to contain spaces between the opening bracket and the + content. Turned off by default as it allows to compile files containing + css and javascript without the need to escape it through {literal} or \{ ++ Added DWOO_CACHE_DIRECTORY and DWOO_COMPILE_DIRECTORY constants that you can + set before including Dwoo.php to override the defaults (although + Dwoo->setCacheDir/setCompileDir() still work to change that if required) ++ Added the DwooException class ++ Smarty: Added partial support for register_object(), unregister_object() and + get_registered_object(). All features can not be supported by the adapter + though so you might get compatibility warnings +* Fixed {elseif} bug that appeared when multiple elseif tags were used in a row +* Syntax: Improved simple math support to work within variable variables + (i.e. you can do {$array[$index+1]}) and within strings as well. To prevent + this enclose the variables in backticks (i.e. {"$foo/$bar"} will do the math + while {"`$foo`/$bar"} won't as $foo is properly delimited) +* Changed DwooLoader::addDirectory() so that it writes the class paths cache + into DWOO_COMPILE_DIRECTORY, that way you don't have to make your plugin + directory writable +* Made all the error triggering more consistent +* Changed automatic cacheId generation in DwooTemplateFile/String to be faster + +[2008-03-19] 0.3.3 ++ Syntax: Added support for $dwoo.const.CONSTANT and + $dwoo.const.Class::CONSTANT to read PHP constants from the template ++ Syntax: Added support for on/off/yes/no, that work as aliases for true/false ++ Syntax: Added the $dwoo.charset global variable ++ Plugins: Added {withelse} and made {with} compatible with {else} also ++ API: Added left/right delimiters customization, see DwooCompiler->setDelimiters() ++ API: Added DwooCompiler->triggerError() ++ API: Added Dwoo->clearCache() and DwooITemplate->clearCache() methods ++ Smarty: The smartyCompat prefilter converts {section} tags into {for} tags on the + fly, however it's not guaranteed to work with *all* section tags, let me know if + it breaks for you +* {with} now skips the entire block if it's variable doesn't exist, so by + itself it acts as if you would do {if $var}{with $var}{/with}{/if} +* Each resource has a compiler factory function assigned to it, allowing you to + easily provide a custom compiler without loading it on every page +* OutputFilters are now simply called Filters (they still use DwooFilter) +* Pre/PostFilters have become Pre/PostProcessors (they now use DwooProcessor) +* Compiler: Fixed parsing bug that prevented function names of 1character +* Compiler: Changed internal handling of variables to fix some errors being + thrown with specific cases +* Reorganized Dwoo/DwooCompiler and fully commented all the core classes + and interfaces + +[2008-03-09] 0.3.2 ++ Added access to superglobals through $dwoo.get.value, $dwoo.post.value, + etc. ++ Added outputFilters to Dwoo (use Dwoo->addOutputFilter and + Dwoo->removeOutputFilter) ++ Added preFilters and postFilters to DwooCompiler (use + DwooCompiler->addPreFilter, etc) ++ Added a html_format output filter that intends properly the html code, + use it only on full page templates ++ Plugins: Added {for} and {forelse} which allow to loop over an array or to + loop over a range of numbers ++ Plugins: Added {mailto}, {counter}, {eval}, {fetch} and {include} ++ Syntax : Enhanced support for implicit math operations, + {$var+$var2*var3+5} now works. Operations are executed from left to right + though, there is no operator priority. (i.e. 1+1*2 = (1+1)*2 = 4, not 3) ++ API: Added resources support through DwooITemplate implementations and + Dwoo->addResource() ++ API: Added Dwoo->getTemplate() to get the currently running template object ++ API: Added DwooCompiler::getInstance() to use only one compiler object when + rendering from the default compiler and to provide you with a singleton if + it's easier, however the class is not a singleton in the sense that it can + be instantiated separately ++ API: Added a factory method on DwooITemplate to support resources creation ++ Added a release tag so that all compiled templates are forced to recompile + after an update, however it is recommended to cleanup your "compiled" + directory now and then as each release uses new filenames ++ Added an abstract DwooFilter class that you can extend to build filters +* PHP function calls are now case insensitive +* Syntax: The compiler now parses expressions before modifiers, allowing for + {$var/2|number_format} for example +* DwooTemplateFile now extends DwooTemplateString instead of the other way + around as it was before +* {else} is now a general purpose plugin that can act as 'else' for foreach, + for and if/elseif, foreachelse is still available though + +[2008-03-05] 0.3.1 ++ Added {cycle} function ++ Syntax : Enabled support for associative arrays using + array(key="value", key2=5) for example, which you can assign or use in a + foreach directly ++ Syntax : Added support for {$var +-/*% X} (i.e. {$var + 4}), useful for + simple math operations without the math plugin ++ API : Added append/appendByRef to DwooData ++ Completely rebuilt DwooSmartyAdapter, it should "work" and fail silently if + you use a non supported function now, however you can set + $smarty->show_compat_errors=true; on it to receive notices about unsupported + features that you use +* Bug fixed in {literal} parsing +* Bug fixed in smarty functions handling +* API : Moved Plugin types constants to Dwoo so the compiler doesn't have to + be loaded unles really required +* API : Moved globals and var reinitialization in Dwoo into their own methods + so that child classes can easily add globals +* Some improvements in the compiler output +* Some changes in the cache handling of DwooTemplateFile +- Special thanks to Andrew Collins that found many of the bugs fixed in this + release + +[2008-03-02] 0.3.0 ++ Full template cache support ++ DwooTemplateString class to load templates from a string ++ Dwoo::VERSION constant ++ {dump} plugin to print out variables ++ Unit tests (with PHPUnit) covering 73% of the codebase right now, which + should help reducing regression bugs in the next versions. ++ Started commenting (with phpdocs) properly all the classes, should be + complete for 0.4.0 +* {capture} is now compilable and has a new boolean flag to append output into + the target variable instead of overwriting +* {foreach} supports direct input (instead of only variables), allowing + constructs like {foreach array(a,b,c) val}{$val}{/foreach} for example that + would output abc. +* pre/postProcessing functions in block plugins now receive an array of named + parameters instead of numbered +* Major refactoring of DwooTemplateFile and DwooCompiler +* Cleaned up members visibility in Dwoo/DwooCompiler +* Fixes in the compiler parsing and general variables handling +* Multiple bugfixes here and there thanks to the unit tests +* Optimized {foreach} a lot + +[2008-02-19] 0.2.1 +* Compiler fixes for argument parsing and handling of Smarty plugins + +[2008-02-14] 0.2.0 ++ Added support for plugins made for Smarty (that includes modifiers, + functions and blocks). Not thoroughly tested. ++ Major API changes in the way Dwoo must be run, it's now much more + flexible and should not change too much in the future. ++ Added support for custom plugins, filters should come in the next version + although the API to register them is already in. + +[2008-02-08] 0.1.0 +Initial release \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo.compiled.php b/_piecrust/libs/Dwoo/Dwoo.compiled.php new file mode 100644 index 0000000..ed8b469 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo.compiled.php @@ -0,0 +1 @@ + array ( 'class' => 'Dwoo_Template_File', 'compiler' => null ), 'string' => array ( 'class' => 'Dwoo_Template_String', 'compiler' => null ) ); protected $loader = null; protected $template = null; protected $runtimePlugins; public $data; public $scope; protected $scopeTree; protected $stack; protected $curBlock; protected $buffer; protected $pluginProxy; public function __construct($compileDir = null, $cacheDir = null) { if ($compileDir !== null) { $this->setCompileDir($compileDir); } if ($cacheDir !== null) { $this->setCacheDir($cacheDir); } $this->initGlobals(); } public function __clone() { $this->template = null; unset($this->data); } public function output($tpl, $data = array(), Dwoo_ICompiler $compiler = null) { return $this->get($tpl, $data, $compiler, true); } public function get($_tpl, $data = array(), $_compiler = null, $_output = false) { if ($this->template instanceof Dwoo_ITemplate) { $proxy = clone $this; return $proxy->get($_tpl, $data, $_compiler, $_output); } if ($_tpl instanceof Dwoo_ITemplate) { } elseif (is_string($_tpl) && file_exists($_tpl)) { $_tpl = new Dwoo_Template_File($_tpl); } else { throw new Dwoo_Exception('Dwoo->get/Dwoo->output\'s first argument must be a Dwoo_ITemplate (i.e. Dwoo_Template_File) or a valid path to a template file', E_USER_NOTICE); } $this->template = $_tpl; if ($data instanceof Dwoo_IDataProvider) { $this->data = $data->getData(); } elseif (is_array($data)) { $this->data = $data; } else { throw new Dwoo_Exception('Dwoo->get/Dwoo->output\'s data argument must be a Dwoo_IDataProvider object (i.e. Dwoo_Data) or an associative array', E_USER_NOTICE); } $this->globals['template'] = $_tpl->getName(); $this->initRuntimeVars($_tpl); $file = $_tpl->getCachedTemplate($this); $doCache = $file === true; $cacheLoaded = is_string($file); if ($cacheLoaded === true) { if ($_output === true) { include $file; $this->template = null; } else { ob_start(); include $file; $this->template = null; return ob_get_clean(); } } else { if ($doCache === true) { $dynamicId = uniqid(); } $compiledTemplate = $_tpl->getCompiledTemplate($this, $_compiler); $out = include $compiledTemplate; if ($out === false) { $_tpl->forceCompilation(); $compiledTemplate = $_tpl->getCompiledTemplate($this, $_compiler); $out = include $compiledTemplate; } if ($doCache === true) { $out = preg_replace('/(<%|%>|<\?php|<\?|\?>)/', '', $out); if (!class_exists('Dwoo_plugin_dynamic', false)) { $this->getLoader()->loadPlugin('dynamic'); } $out = Dwoo_Plugin_dynamic::unescape($out, $dynamicId, $compiledTemplate); } foreach ($this->filters as $filter) { if (is_array($filter) && $filter[0] instanceof Dwoo_Filter) { $out = call_user_func($filter, $out); } else { $out = call_user_func($filter, $this, $out); } } if ($doCache === true) { $file = $_tpl->cache($this, $out); if ($_output === true) { include $file; $this->template = null; } else { ob_start(); include $file; $this->template = null; return ob_get_clean(); } } else { $this->template = null; if ($_output === true) { echo $out; } return $out; } } } protected function initGlobals() { $this->globals = array ( 'version' => self::VERSION, 'ad' => 'Powered by Dwoo', 'now' => $_SERVER['REQUEST_TIME'], 'charset' => $this->charset, ); } protected function initRuntimeVars(Dwoo_ITemplate $tpl) { $this->runtimePlugins = array(); $this->scope =& $this->data; $this->scopeTree = array(); $this->stack = array(); $this->curBlock = null; $this->buffer = ''; } public function addPlugin($name, $callback, $compilable = false) { $compilable = $compilable ? self::COMPILABLE_PLUGIN : 0; if (is_array($callback)) { if (is_subclass_of(is_object($callback[0]) ? get_class($callback[0]) : $callback[0], 'Dwoo_Block_Plugin')) { $this->plugins[$name] = array('type'=>self::BLOCK_PLUGIN | $compilable, 'callback'=>$callback, 'class'=>(is_object($callback[0]) ? get_class($callback[0]) : $callback[0])); } else { $this->plugins[$name] = array('type'=>self::CLASS_PLUGIN | $compilable, 'callback'=>$callback, 'class'=>(is_object($callback[0]) ? get_class($callback[0]) : $callback[0]), 'function'=>$callback[1]); } } elseif (class_exists($callback, false)) { if (is_subclass_of($callback, 'Dwoo_Block_Plugin')) { $this->plugins[$name] = array('type'=>self::BLOCK_PLUGIN | $compilable, 'callback'=>$callback, 'class'=>$callback); } else { $this->plugins[$name] = array('type'=>self::CLASS_PLUGIN | $compilable, 'callback'=>$callback, 'class'=>$callback, 'function'=>'process'); } } elseif (function_exists($callback)) { $this->plugins[$name] = array('type'=>self::FUNC_PLUGIN | $compilable, 'callback'=>$callback); } else { throw new Dwoo_Exception('Callback could not be processed correctly, please check that the function/class you used exists'); } } public function removePlugin($name) { if (isset($this->plugins[$name])) { unset($this->plugins[$name]); } } public function addFilter($callback, $autoload = false) { if ($autoload) { $class = 'Dwoo_Filter_'.$callback; if (!class_exists($class, false) && !function_exists($class)) { try { $this->getLoader()->loadPlugin($callback); } catch (Dwoo_Exception $e) { if (strstr($callback, 'Dwoo_Filter_')) { throw new Dwoo_Exception('Wrong filter name : '.$callback.', the "Dwoo_Filter_" prefix should not be used, please only use "'.str_replace('Dwoo_Filter_', '', $callback).'"'); } else { throw new Dwoo_Exception('Wrong filter name : '.$callback.', when using autoload the filter must be in one of your plugin dir as "name.php" containg a class or function named "Dwoo_Filter_name"'); } } } if (class_exists($class, false)) { $callback = array(new $class($this), 'process'); } elseif (function_exists($class)) { $callback = $class; } else { throw new Dwoo_Exception('Wrong filter name : '.$callback.', when using autoload the filter must be in one of your plugin dir as "name.php" containg a class or function named "Dwoo_Filter_name"'); } $this->filters[] = $callback; } else { $this->filters[] = $callback; } } public function removeFilter($callback) { if (($index = array_search('Dwoo_Filter_'.$callback, $this->filters, true)) !== false) { unset($this->filters[$index]); } elseif (($index = array_search($callback, $this->filters, true)) !== false) { unset($this->filters[$index]); } else { $class = 'Dwoo_Filter_' . $callback; foreach ($this->filters as $index=>$filter) { if (is_array($filter) && $filter[0] instanceof $class) { unset($this->filters[$index]); break; } } } } public function addResource($name, $class, $compilerFactory = null) { if (strlen($name) < 2) { throw new Dwoo_Exception('Resource names must be at least two-character long to avoid conflicts with Windows paths'); } if (!class_exists($class)) { throw new Dwoo_Exception('Resource class does not exist'); } $interfaces = class_implements($class); if (in_array('Dwoo_ITemplate', $interfaces) === false) { throw new Dwoo_Exception('Resource class must implement Dwoo_ITemplate'); } $this->resources[$name] = array('class'=>$class, 'compiler'=>$compilerFactory); } public function removeResource($name) { unset($this->resources[$name]); if ($name==='file') { $this->resources['file'] = array('class'=>'Dwoo_Template_File', 'compiler'=>null); } } public function setLoader(Dwoo_ILoader $loader) { $this->loader = $loader; } public function getLoader() { if ($this->loader === null) { $this->loader = new Dwoo_Loader($this->getCompileDir()); } return $this->loader; } public function getCustomPlugins() { return $this->plugins; } public function getCacheDir() { if ($this->cacheDir === null) { $this->setCacheDir(dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR); } return $this->cacheDir; } public function setCacheDir($dir) { $this->cacheDir = rtrim($dir, '/\\').DIRECTORY_SEPARATOR; if (is_writable($this->cacheDir) === false) { throw new Dwoo_Exception('The cache directory must be writable, chmod "'.$this->cacheDir.'" to make it writable'); } } public function getCompileDir() { if ($this->compileDir === null) { $this->setCompileDir(dirname(__FILE__).DIRECTORY_SEPARATOR.'compiled'.DIRECTORY_SEPARATOR); } return $this->compileDir; } public function setCompileDir($dir) { $this->compileDir = rtrim($dir, '/\\').DIRECTORY_SEPARATOR; if (is_writable($this->compileDir) === false) { throw new Dwoo_Exception('The compile directory must be writable, chmod "'.$this->compileDir.'" to make it writable'); } } public function getCacheTime() { return $this->cacheTime; } public function setCacheTime($seconds) { $this->cacheTime = (int) $seconds; } public function getCharset() { return $this->charset; } public function setCharset($charset) { $this->charset = strtolower((string) $charset); } public function getTemplate() { return $this->template; } public function setTemplate(Dwoo_ITemplate $tpl) { $this->template = $tpl; } public function setDefaultCompilerFactory($resourceName, $compilerFactory) { $this->resources[$resourceName]['compiler'] = $compilerFactory; } public function getDefaultCompilerFactory($resourceName) { return $this->resources[$resourceName]['compiler']; } public function setSecurityPolicy(Dwoo_Security_Policy $policy = null) { $this->securityPolicy = $policy; } public function getSecurityPolicy() { return $this->securityPolicy; } public function setPluginProxy(Dwoo_IPluginProxy $pluginProxy) { $this->pluginProxy = $pluginProxy; } public function getPluginProxy() { return $this->pluginProxy; } public function isCached(Dwoo_ITemplate $tpl) { return is_string($tpl->getCachedTemplate($this)); } public function clearCache($olderThan=-1) { $cacheDirs = new RecursiveDirectoryIterator($this->getCacheDir()); $cache = new RecursiveIteratorIterator($cacheDirs); $expired = time() - $olderThan; $count = 0; foreach ($cache as $file) { if ($cache->isDot() || $cache->isDir() || substr($file, -5) !== '.html') { continue; } if ($cache->getCTime() < $expired) { $count += unlink((string) $file) ? 1 : 0; } } return $count; } public function templateFactory($resourceName, $resourceId, $cacheTime = null, $cacheId = null, $compileId = null, Dwoo_ITemplate $parentTemplate = null) { if (isset($this->resources[$resourceName])) { return call_user_func(array($this->resources[$resourceName]['class'], 'templateFactory'), $this, $resourceId, $cacheTime, $cacheId, $compileId, $parentTemplate); } else { throw new Dwoo_Exception('Unknown resource type : '.$resourceName); } } public function isArray($value, $checkIsEmpty=false) { if (is_array($value) === true) { if ($checkIsEmpty === false) { return true; } else { return count($value) > 0; } } elseif ($value instanceof Iterator) { if ($checkIsEmpty === false) { return true; } elseif ($value instanceof Countable) { return count($value) > 0; } else { $value->rewind(); return $value->valid(); } } elseif ($value instanceof ArrayAccess) { if ($checkIsEmpty === false) { return true; } elseif ($value instanceof Countable) { return count($value) > 0; } else { return $value->offsetExists(0); } } return false; } public function triggerError($message, $level=E_USER_NOTICE) { if (!($tplIdentifier = $this->template->getResourceIdentifier())) { $tplIdentifier = $this->template->getResourceName(); } trigger_error('Dwoo error (in '.$tplIdentifier.') : '.$message, $level); } public function addStack($blockName, array $args=array()) { if (isset($this->plugins[$blockName])) { $class = $this->plugins[$blockName]['class']; } else { $class = 'Dwoo_Plugin_'.$blockName; } if ($this->curBlock !== null) { $this->curBlock->buffer(ob_get_contents()); ob_clean(); } else { $this->buffer .= ob_get_contents(); ob_clean(); } $block = new $class($this); $cnt = count($args); if ($cnt===0) { $block->init(); } elseif ($cnt===1) { $block->init($args[0]); } elseif ($cnt===2) { $block->init($args[0], $args[1]); } elseif ($cnt===3) { $block->init($args[0], $args[1], $args[2]); } elseif ($cnt===4) { $block->init($args[0], $args[1], $args[2], $args[3]); } else { call_user_func_array(array($block,'init'), $args); } $this->stack[] = $this->curBlock = $block; return $block; } public function delStack() { $args = func_get_args(); $this->curBlock->buffer(ob_get_contents()); ob_clean(); $cnt = count($args); if ($cnt===0) { $this->curBlock->end(); } elseif ($cnt===1) { $this->curBlock->end($args[0]); } elseif ($cnt===2) { $this->curBlock->end($args[0], $args[1]); } elseif ($cnt===3) { $this->curBlock->end($args[0], $args[1], $args[2]); } elseif ($cnt===4) { $this->curBlock->end($args[0], $args[1], $args[2], $args[3]); } else { call_user_func_array(array($this->curBlock, 'end'), $args); } $tmp = array_pop($this->stack); if (count($this->stack) > 0) { $this->curBlock = end($this->stack); $this->curBlock->buffer($tmp->process()); } else { $this->curBlock = null; echo $tmp->process(); } unset($tmp); } public function getParentBlock(Dwoo_Block_Plugin $block) { $index = array_search($block, $this->stack, true); if ($index !== false && $index > 0) { return $this->stack[$index-1]; } return false; } public function findBlock($type) { if (isset($this->plugins[$type])) { $type = $this->plugins[$type]['class']; } else { $type = 'Dwoo_Plugin_'.str_replace('Dwoo_Plugin_', '', $type); } $keys = array_keys($this->stack); while (($key = array_pop($keys)) !== false) { if ($this->stack[$key] instanceof $type) { return $this->stack[$key]; } } return false; } public function getObjectPlugin($class) { if (isset($this->runtimePlugins[$class])) { return $this->runtimePlugins[$class]; } return $this->runtimePlugins[$class] = new $class($this); } public function classCall($plugName, array $params = array()) { $class = 'Dwoo_Plugin_'.$plugName; $plugin = $this->getObjectPlugin($class); $cnt = count($params); if ($cnt===0) { return $plugin->process(); } elseif ($cnt===1) { return $plugin->process($params[0]); } elseif ($cnt===2) { return $plugin->process($params[0], $params[1]); } elseif ($cnt===3) { return $plugin->process($params[0], $params[1], $params[2]); } elseif ($cnt===4) { return $plugin->process($params[0], $params[1], $params[2], $params[3]); } else { return call_user_func_array(array($plugin, 'process'), $params); } } public function arrayMap($callback, array $params) { if ($params[0] === $this) { $addThis = true; array_shift($params); } if ((is_array($params[0]) || ($params[0] instanceof Iterator && $params[0] instanceof ArrayAccess))) { if (empty($params[0])) { return $params[0]; } $out = array(); $cnt = count($params); if (isset($addThis)) { array_unshift($params, $this); $items = $params[1]; $keys = array_keys($items); if (is_string($callback) === false) { while (($i = array_shift($keys)) !== null) { $out[] = call_user_func_array($callback, array(1=>$items[$i]) + $params); } } elseif ($cnt===1) { while (($i = array_shift($keys)) !== null) { $out[] = $callback($this, $items[$i]); } } elseif ($cnt===2) { while (($i = array_shift($keys)) !== null) { $out[] = $callback($this, $items[$i], $params[2]); } } elseif ($cnt===3) { while (($i = array_shift($keys)) !== null) { $out[] = $callback($this, $items[$i], $params[2], $params[3]); } } else { while (($i = array_shift($keys)) !== null) { $out[] = call_user_func_array($callback, array(1=>$items[$i]) + $params); } } } else { $items = $params[0]; $keys = array_keys($items); if (is_string($callback) === false) { while (($i = array_shift($keys)) !== null) { $out[] = call_user_func_array($callback, array($items[$i]) + $params); } } elseif ($cnt===1) { while (($i = array_shift($keys)) !== null) { $out[] = $callback($items[$i]); } } elseif ($cnt===2) { while (($i = array_shift($keys)) !== null) { $out[] = $callback($items[$i], $params[1]); } } elseif ($cnt===3) { while (($i = array_shift($keys)) !== null) { $out[] = $callback($items[$i], $params[1], $params[2]); } } elseif ($cnt===4) { while (($i = array_shift($keys)) !== null) { $out[] = $callback($items[$i], $params[1], $params[2], $params[3]); } } else { while (($i = array_shift($keys)) !== null) { $out[] = call_user_func_array($callback, array($items[$i]) + $params); } } } return $out; } else { return $params[0]; } } public function readVarInto($varstr, $data, $safeRead = false) { if ($data === null) { return null; } if (is_array($varstr) === false) { preg_match_all('#(\[|->|\.)?((?:[^.[\]-]|-(?!>))+)\]?#i', $varstr, $m); } else { $m = $varstr; } unset($varstr); while (list($k, $sep) = each($m[1])) { if ($sep === '.' || $sep === '[' || $sep === '') { if ((is_array($data) || $data instanceof ArrayAccess) && ($safeRead === false || isset($data[$m[2][$k]]))) { $data = $data[$m[2][$k]]; } else { return null; } } else { if (is_object($data) && ($safeRead === false || isset($data->$m[2][$k]) || is_callable(array($data, '__get')))) { $data = $data->$m[2][$k]; } else { return null; } } } return $data; } public function readParentVar($parentLevels, $varstr = null) { $tree = $this->scopeTree; $cur = $this->data; while ($parentLevels--!==0) { array_pop($tree); } while (($i = array_shift($tree)) !== null) { if (is_object($cur)) { $cur = $cur->$i; } else { $cur = $cur[$i]; } } if ($varstr!==null) { return $this->readVarInto($varstr, $cur); } else { return $cur; } } public function readVar($varstr) { if (is_array($varstr)===true) { $m = $varstr; unset($varstr); } else { if (strstr($varstr, '.') === false && strstr($varstr, '[') === false && strstr($varstr, '->') === false) { if ($varstr === 'dwoo') { return $this->globals; } elseif ($varstr === '__' || $varstr === '_root' ) { return $this->data; $varstr = substr($varstr, 6); } elseif ($varstr === '_' || $varstr === '_parent') { $varstr = '.'.$varstr; $tree = $this->scopeTree; $cur = $this->data; array_pop($tree); while (($i = array_shift($tree)) !== null) { if (is_object($cur)) { $cur = $cur->$i; } else { $cur = $cur[$i]; } } return $cur; } $cur = $this->scope; if (isset($cur[$varstr])) { return $cur[$varstr]; } else { return null; } } if (substr($varstr, 0, 1) === '.') { $varstr = 'dwoo'.$varstr; } preg_match_all('#(\[|->|\.)?((?:[^.[\]-]|-(?!>))+)\]?#i', $varstr, $m); } $i = $m[2][0]; if ($i === 'dwoo') { $cur = $this->globals; array_shift($m[2]); array_shift($m[1]); switch ($m[2][0]) { case 'get': $cur = $_GET; break; case 'post': $cur = $_POST; break; case 'session': $cur = $_SESSION; break; case 'cookies': case 'cookie': $cur = $_COOKIE; break; case 'server': $cur = $_SERVER; break; case 'env': $cur = $_ENV; break; case 'request': $cur = $_REQUEST; break; case 'const': array_shift($m[2]); if (defined($m[2][0])) { return constant($m[2][0]); } else { return null; } } if ($cur !== $this->globals) { array_shift($m[2]); array_shift($m[1]); } } elseif ($i === '__' || $i === '_root') { $cur = $this->data; array_shift($m[2]); array_shift($m[1]); } elseif ($i === '_' || $i === '_parent') { $tree = $this->scopeTree; $cur = $this->data; while (true) { array_pop($tree); array_shift($m[2]); array_shift($m[1]); if (current($m[2]) === '_' || current($m[2]) === '_parent') { continue; } while (($i = array_shift($tree)) !== null) { if (is_object($cur)) { $cur = $cur->$i; } else { $cur = $cur[$i]; } } break; } } else { $cur = $this->scope; } while (list($k, $sep) = each($m[1])) { if ($sep === '.' || $sep === '[' || $sep === '') { if ((is_array($cur) || $cur instanceof ArrayAccess) && isset($cur[$m[2][$k]])) { $cur = $cur[$m[2][$k]]; } else { return null; } } elseif ($sep === '->') { if (is_object($cur)) { $cur = $cur->$m[2][$k]; } else { return null; } } else { return null; } } return $cur; } public function assignInScope($value, $scope) { $tree =& $this->scopeTree; $data =& $this->data; if (!is_string($scope)) { return $this->triggerError('Assignments must be done into strings, ('.gettype($scope).') '.var_export($scope, true).' given', E_USER_ERROR); } if (strstr($scope, '.') === false && strstr($scope, '->') === false) { $this->scope[$scope] = $value; } else { preg_match_all('#(\[|->|\.)?([^.[\]-]+)\]?#i', $scope, $m); $cur =& $this->scope; $last = array(array_pop($m[1]), array_pop($m[2])); while (list($k, $sep) = each($m[1])) { if ($sep === '.' || $sep === '[' || $sep === '') { if (is_array($cur) === false) { $cur = array(); } $cur =& $cur[$m[2][$k]]; } elseif ($sep === '->') { if (is_object($cur) === false) { $cur = new stdClass; } $cur =& $cur->$m[2][$k]; } else { return false; } } if ($last[0] === '.' || $last[0] === '[' || $last[0] === '') { if (is_array($cur) === false) { $cur = array(); } $cur[$last[1]] = $value; } elseif ($last[0] === '->') { if (is_object($cur) === false) { $cur = new stdClass; } $cur->$last[1] = $value; } else { return false; } } } public function setScope($scope, $absolute = false) { $old = $this->scopeTree; if (is_string($scope)===true) { $scope = explode('.', $scope); } if ($absolute===true) { $this->scope =& $this->data; $this->scopeTree = array(); } while (($bit = array_shift($scope)) !== null) { if ($bit === '_' || $bit === '_parent') { array_pop($this->scopeTree); $this->scope =& $this->data; $cnt = count($this->scopeTree); for ($i=0;$i<$cnt;$i++) $this->scope =& $this->scope[$this->scopeTree[$i]]; } elseif ($bit === '__' || $bit === '_root') { $this->scope =& $this->data; $this->scopeTree = array(); } elseif (isset($this->scope[$bit])) { $this->scope =& $this->scope[$bit]; $this->scopeTree[] = $bit; } else { unset($this->scope); $this->scope = null; } } return $old; } public function getData() { return $this->data; } public function &getScope() { return $this->scope; } public function __call($method, $args) { $proxy = $this->getPluginProxy(); if (!$proxy) { throw new Dwoo_Exception('Call to undefined method '.__CLASS__.'::'.$method.'()'); } return call_user_func_array($proxy->getCallback($method), $args); } } interface Dwoo_IPluginProxy { public function handles($name); public function getCode($name, $params); public function getCallback($name); public function getLoader($name); } interface Dwoo_IElseable { } interface Dwoo_ILoader { public function loadPlugin($class, $forceRehash = true); } class Dwoo_Loader implements Dwoo_ILoader { protected $paths = array(); protected $classPath = array(); protected $cacheDir; protected $corePluginDir; public function __construct($cacheDir) { $this->corePluginDir = DWOO_DIRECTORY . 'plugins'; $this->cacheDir = rtrim($cacheDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; $cacheFile = $this->cacheDir.'classpath.cache.d'.Dwoo::RELEASE_TAG.'.php'; if (file_exists($cacheFile)) { $classpath = file_get_contents($cacheFile); $this->classPath = unserialize($classpath) + $this->classPath; } else { $this->rebuildClassPathCache($this->corePluginDir, $cacheFile); } } protected function rebuildClassPathCache($path, $cacheFile) { if ($cacheFile!==false) { $tmp = $this->classPath; $this->classPath = array(); } $list = glob(rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . '*'); if (is_array($list)) { foreach ($list as $f) { if (is_dir($f)) { $this->rebuildClassPathCache($f, false); } else { $this->classPath[str_replace(array('function.','block.','modifier.','outputfilter.','filter.','prefilter.','postfilter.','pre.','post.','output.','shared.','helper.'), '', basename($f, '.php'))] = $f; } } } if ($cacheFile!==false) { if (!file_put_contents($cacheFile, serialize($this->classPath))) { throw new Dwoo_Exception('Could not write into '.$cacheFile.', either because the folder is not there (create it) or because of the chmod configuration (please ensure this directory is writable by php), alternatively you can change the directory used with $dwoo->setCompileDir() or provide a custom loader object with $dwoo->setLoader()'); } $this->classPath += $tmp; } } public function loadPlugin($class, $forceRehash = true) { if (!isset($this->classPath[$class]) || !(include $this->classPath[$class])) { if ($forceRehash) { $this->rebuildClassPathCache($this->corePluginDir, $this->cacheDir . 'classpath.cache.d'.Dwoo::RELEASE_TAG.'.php'); foreach ($this->paths as $path=>$file) { $this->rebuildClassPathCache($path, $file); } if (isset($this->classPath[$class])) { include $this->classPath[$class]; } else { throw new Dwoo_Exception('Plugin '.$class.' can not be found, maybe you forgot to bind it if it\'s a custom plugin ?', E_USER_NOTICE); } } else { throw new Dwoo_Exception('Plugin '.$class.' can not be found, maybe you forgot to bind it if it\'s a custom plugin ?', E_USER_NOTICE); } } } public function addDirectory($pluginDirectory) { $pluginDir = realpath($pluginDirectory); if (!$pluginDir) { throw new Dwoo_Exception('Plugin directory does not exist or can not be read : '.$pluginDirectory); } $cacheFile = $this->cacheDir . 'classpath-'.substr(strtr($pluginDir, '/\\:'.PATH_SEPARATOR, '----'), strlen($pluginDir) > 80 ? -80 : 0).'.d'.Dwoo::RELEASE_TAG.'.php'; $this->paths[$pluginDir] = $cacheFile; if (file_exists($cacheFile)) { $classpath = file_get_contents($cacheFile); $this->classPath = unserialize($classpath) + $this->classPath; } else { $this->rebuildClassPathCache($pluginDir, $cacheFile); } } } class Dwoo_Exception extends Exception { } class Dwoo_Security_Policy { const PHP_ENCODE = 1; const PHP_REMOVE = 2; const PHP_ALLOW = 3; const CONST_DISALLOW = false; const CONST_ALLOW = true; protected $allowedPhpFunctions = array ( 'str_repeat', 'number_format', 'htmlentities', 'htmlspecialchars', 'long2ip', 'strlen', 'list', 'empty', 'count', 'sizeof', 'in_array', 'is_array', ); protected $allowedDirectories = array(); protected $phpHandling = self::PHP_REMOVE; protected $constHandling = self::CONST_DISALLOW; public function allowPhpFunction($func) { if (is_array($func)) foreach ($func as $fname) $this->allowedPhpFunctions[strtolower($fname)] = true; else $this->allowedPhpFunctions[strtolower($func)] = true; } public function disallowPhpFunction($func) { if (is_array($func)) foreach ($func as $fname) unset($this->allowedPhpFunctions[strtolower($fname)]); else unset($this->allowedPhpFunctions[strtolower($func)]); } public function getAllowedPhpFunctions() { return $this->allowedPhpFunctions; } public function allowDirectory($path) { if (is_array($path)) foreach ($path as $dir) $this->allowedDirectories[realpath($dir)] = true; else $this->allowedDirectories[realpath($path)] = true; } public function disallowDirectory($path) { if (is_array($path)) foreach ($path as $dir) unset($this->allowedDirectories[realpath($dir)]); else unset($this->allowedDirectories[realpath($path)]); } public function getAllowedDirectories() { return $this->allowedDirectories; } public function setPhpHandling($level = self::PHP_REMOVE) { $this->phpHandling = $level; } public function getPhpHandling() { return $this->phpHandling; } public function setConstantHandling($level = self::CONST_DISALLOW) { $this->constHandling = $level; } public function getConstantHandling() { return $this->constHandling; } } class Dwoo_Security_Exception extends Dwoo_Exception { } interface Dwoo_ICompilable { } interface Dwoo_ICompiler { public function compile(Dwoo $dwoo, Dwoo_ITemplate $template); public function setCustomPlugins(array $customPlugins); public function setSecurityPolicy(Dwoo_Security_Policy $policy = null); } interface Dwoo_IDataProvider { public function getData(); } interface Dwoo_ITemplate { public function getCacheTime(); public function setCacheTime($seconds = null); public function getCachedTemplate(Dwoo $dwoo); public function cache(Dwoo $dwoo, $output); public function clearCache(Dwoo $dwoo, $olderThan = -1); public function getCompiledTemplate(Dwoo $dwoo, Dwoo_ICompiler $compiler = null); public function getName(); public function getResourceName(); public function getResourceIdentifier(); public function getSource(); public function getUid(); public function getCompiler(); public function getIsModifiedCode(); public static function templateFactory(Dwoo $dwoo, $resourceId, $cacheTime = null, $cacheId = null, $compileId = null, Dwoo_ITemplate $parentTemplate = null); } interface Dwoo_ICompilable_Block { } abstract class Dwoo_Plugin { protected $dwoo; public function __construct(Dwoo $dwoo) { $this->dwoo = $dwoo; } public static function paramsToAttributes(array $params, $delim = '\'') { if (isset($params['*'])) { $params = array_merge($params, $params['*']); unset($params['*']); } $out = ''; foreach ($params as $attr=>$val) { $out .= ' '.$attr.'='; if (trim($val, '"\'')=='' || $val=='null') { $out .= str_replace($delim, '\\'.$delim, '""'); } elseif (substr($val, 0, 1) === $delim && substr($val, -1) === $delim) { $out .= str_replace($delim, '\\'.$delim, '"'.substr($val, 1, -1).'"'); } else { $out .= str_replace($delim, '\\'.$delim, '"') . $delim . '.'.$val.'.' . $delim . str_replace($delim, '\\'.$delim, '"'); } } return ltrim($out); } } abstract class Dwoo_Block_Plugin extends Dwoo_Plugin { protected $buffer = ''; public function buffer($input) { $this->buffer .= $input; } public function end() { } public function process() { return $this->buffer; } public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) { return Dwoo_Compiler::PHP_OPEN.$prepend.'$this->addStack("'.$type.'", array('.Dwoo_Compiler::implode_r($compiler->getCompiledParams($params)).'));'.$append.Dwoo_Compiler::PHP_CLOSE; } public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) { return $content . Dwoo_Compiler::PHP_OPEN.$prepend.'$this->delStack();'.$append.Dwoo_Compiler::PHP_CLOSE; } } abstract class Dwoo_Filter { protected $dwoo; public function __construct(Dwoo $dwoo) { $this->dwoo = $dwoo; } abstract public function process($input); } abstract class Dwoo_Processor { protected $compiler; public function __construct(Dwoo_Compiler $compiler) { $this->compiler = $compiler; } abstract public function process($input); } class Dwoo_Template_String implements Dwoo_ITemplate { protected $name; protected $compileId; protected $cacheId; protected $cacheTime; protected $compilationEnforced; protected static $cache = array('cached'=>array(), 'compiled'=>array()); protected $compiler; protected $chmod = 0777; public function __construct($templateString, $cacheTime = null, $cacheId = null, $compileId = null) { $this->template = $templateString; if (function_exists('hash')) { $this->name = hash('md4', $templateString); } else { $this->name = md5($templateString); } $this->cacheTime = $cacheTime; if ($compileId !== null) { $this->compileId = str_replace('../', '__', strtr($compileId, '\\%?=!:;'.PATH_SEPARATOR, '/-------')); } if ($cacheId !== null) { $this->cacheId = str_replace('../', '__', strtr($cacheId, '\\%?=!:;'.PATH_SEPARATOR, '/-------')); } } public function getCacheTime() { return $this->cacheTime; } public function setCacheTime($seconds = null) { $this->cacheTime = $seconds; } public function getChmod() { return $this->chmod; } public function setChmod($mask = null) { $this->chmod = $mask; } public function getName() { return $this->name; } public function getResourceName() { return 'string'; } public function getResourceIdentifier() { return false; } public function getSource() { return $this->template; } public function getUid() { return $this->name; } public function getCompiler() { return $this->compiler; } public function forceCompilation() { $this->compilationEnforced = true; } public function getCachedTemplate(Dwoo $dwoo) { if ($this->cacheTime !== null) { $cacheLength = $this->cacheTime; } else { $cacheLength = $dwoo->getCacheTime(); } if ($cacheLength === 0) { return false; } $cachedFile = $this->getCacheFilename($dwoo); if (isset(self::$cache['cached'][$this->cacheId]) === true && file_exists($cachedFile)) { return $cachedFile; } elseif ($this->compilationEnforced !== true && file_exists($cachedFile) && ($cacheLength === -1 || filemtime($cachedFile) > ($_SERVER['REQUEST_TIME'] - $cacheLength)) && $this->isValidCompiledFile($this->getCompiledFilename($dwoo))) { self::$cache['cached'][$this->cacheId] = true; return $cachedFile; } else { return true; } } public function cache(Dwoo $dwoo, $output) { $cacheDir = $dwoo->getCacheDir(); $cachedFile = $this->getCacheFilename($dwoo); $temp = tempnam($cacheDir, 'temp'); if (!($file = @fopen($temp, 'wb'))) { $temp = $cacheDir . uniqid('temp'); if (!($file = @fopen($temp, 'wb'))) { trigger_error('Error writing temporary file \''.$temp.'\'', E_USER_WARNING); return false; } } fwrite($file, $output); fclose($file); $this->makeDirectory(dirname($cachedFile), $cacheDir); if (!@rename($temp, $cachedFile)) { @unlink($cachedFile); @rename($temp, $cachedFile); } if ($this->chmod !== null) { chmod($cachedFile, $this->chmod); } self::$cache['cached'][$this->cacheId] = true; return $cachedFile; } public function clearCache(Dwoo $dwoo, $olderThan = -1) { $cachedFile = $this->getCacheFilename($dwoo); return !file_exists($cachedFile) || (filectime($cachedFile) < (time() - $olderThan) && unlink($cachedFile)); } public function getCompiledTemplate(Dwoo $dwoo, Dwoo_ICompiler $compiler = null) { $compiledFile = $this->getCompiledFilename($dwoo); if ($this->compilationEnforced !== true && isset(self::$cache['compiled'][$this->compileId]) === true) { } elseif ($this->compilationEnforced !== true && $this->isValidCompiledFile($compiledFile)) { self::$cache['compiled'][$this->compileId] = true; } else { $this->compilationEnforced = false; if ($compiler === null) { $compiler = $dwoo->getDefaultCompilerFactory($this->getResourceName()); if ($compiler === null || $compiler === array('Dwoo_Compiler', 'compilerFactory')) { if (class_exists('Dwoo_Compiler', false) === false) { include DWOO_DIRECTORY . 'Dwoo/Compiler.php'; } $compiler = Dwoo_Compiler::compilerFactory(); } else { $compiler = call_user_func($compiler); } } $this->compiler = $compiler; $compiler->setCustomPlugins($dwoo->getCustomPlugins()); $compiler->setSecurityPolicy($dwoo->getSecurityPolicy()); $this->makeDirectory(dirname($compiledFile), $dwoo->getCompileDir()); file_put_contents($compiledFile, $compiler->compile($dwoo, $this)); if ($this->chmod !== null) { chmod($compiledFile, $this->chmod); } self::$cache['compiled'][$this->compileId] = true; } return $compiledFile; } protected function isValidCompiledFile($file) { return file_exists($file); } public static function templateFactory(Dwoo $dwoo, $resourceId, $cacheTime = null, $cacheId = null, $compileId = null, Dwoo_ITemplate $parentTemplate = null) { return new self($resourceId, $cacheTime, $cacheId, $compileId); } protected function getCompiledFilename(Dwoo $dwoo) { if ($this->compileId===null) { $this->compileId = $this->name; } return $dwoo->getCompileDir() . $this->compileId.'.d'.Dwoo::RELEASE_TAG.'.php'; } protected function getCacheFilename(Dwoo $dwoo) { if ($this->cacheId === null) { if (isset($_SERVER['REQUEST_URI']) === true) { $cacheId = $_SERVER['REQUEST_URI']; } elseif (isset($_SERVER['SCRIPT_FILENAME']) && isset($_SERVER['argv'])) { $cacheId = $_SERVER['SCRIPT_FILENAME'].'-'.implode('-', $_SERVER['argv']); } else { $cacheId = ''; } $this->getCompiledFilename($dwoo); $this->cacheId = str_replace('../', '__', $this->compileId . strtr($cacheId, '\\%?=!:;'.PATH_SEPARATOR, '/-------')); } return $dwoo->getCacheDir() . $this->cacheId.'.html'; } public function getIsModifiedCode() { return null; } protected function makeDirectory($path, $baseDir = null) { if (is_dir($path) === true) { return; } if ($this->chmod === null) { $chmod = 0777; } else { $chmod = $this->chmod; } mkdir($path, $chmod, true); if (strpos(PHP_OS, 'WIN') !== 0 && $baseDir !== null) { $path = strtr(str_replace($baseDir, '', $path), '\\', '/'); $folders = explode('/', trim($path, '/')); foreach ($folders as $folder) { $baseDir .= $folder . DIRECTORY_SEPARATOR; chmod($baseDir, $chmod); } } } } class Dwoo_Template_File extends Dwoo_Template_String { protected $file; protected $includePath = null; protected $resolvedPath = null; public function __construct($file, $cacheTime = null, $cacheId = null, $compileId = null, $includePath = null) { $this->file = $file; $this->name = basename($file); $this->cacheTime = $cacheTime; if ($compileId !== null) { $this->compileId = str_replace('../', '__', strtr($compileId, '\\%?=!:;'.PATH_SEPARATOR, '/-------')); } if ($cacheId !== null) { $this->cacheId = str_replace('../', '__', strtr($cacheId, '\\%?=!:;'.PATH_SEPARATOR, '/-------')); } if (is_string($includePath)) { $this->includePath = array($includePath); } elseif (is_array($includePath)) { $this->includePath = $includePath; } } public function setIncludePath($paths) { if (is_array($paths) === false) { $paths = array($paths); } $this->includePath = $paths; $this->resolvedPath = null; } public function getIncludePath() { return $this->includePath; } protected function isValidCompiledFile($file) { return parent::isValidCompiledFile($file) && (int)$this->getUid() <= filemtime($file); } public function getSource() { return file_get_contents($this->getResourceIdentifier()); } public function getResourceName() { return 'file'; } public function getResourceIdentifier() { if ($this->resolvedPath !== null) { return $this->resolvedPath; } elseif ($this->includePath === null) { return $this->file; } else { foreach ($this->includePath as $path) { $path = rtrim($path, DIRECTORY_SEPARATOR); if (file_exists($path.DIRECTORY_SEPARATOR.$this->file) === true) { $this->resolvedPath = $path . DIRECTORY_SEPARATOR . $this->file; return $this->resolvedPath; } } throw new Dwoo_Exception('Template "'.$this->file.'" could not be found in any of your include path(s)'); } } public function getUid() { return (string) filemtime($this->getResourceIdentifier()); } public static function templateFactory(Dwoo $dwoo, $resourceId, $cacheTime = null, $cacheId = null, $compileId = null, Dwoo_ITemplate $parentTemplate = null) { if (DIRECTORY_SEPARATOR === '\\') { $resourceId = str_replace(array("\t", "\n", "\r", "\f", "\v"), array('\\t', '\\n', '\\r', '\\f', '\\v'), $resourceId); } $resourceId = strtr($resourceId, '\\', '/'); $includePath = null; if (file_exists($resourceId) === false) { if ($parentTemplate === null) { $parentTemplate = $dwoo->getTemplate(); } if ($parentTemplate instanceof Dwoo_Template_File) { if ($includePath = $parentTemplate->getIncludePath()) { if (strstr($resourceId, '../')) { throw new Dwoo_Exception('When using an include path you can not reference a template into a parent directory (using ../)'); } } else { $resourceId = dirname($parentTemplate->getResourceIdentifier()).DIRECTORY_SEPARATOR.$resourceId; if (file_exists($resourceId) === false) { return null; } } } else { return null; } } if ($policy = $dwoo->getSecurityPolicy()) { while (true) { if (preg_match('{^([a-z]+?)://}i', $resourceId)) { throw new Dwoo_Security_Exception('The security policy prevents you to read files from external sources : '.$resourceId.'.'); } if ($includePath) { break; } $resourceId = realpath($resourceId); $dirs = $policy->getAllowedDirectories(); foreach ($dirs as $dir=>$dummy) { if (strpos($resourceId, $dir) === 0) { break 2; } } throw new Dwoo_Security_Exception('The security policy prevents you to read '.$resourceId.''); } } $class = 'Dwoo_Template_File'; if ($parentTemplate) { $class = get_class($parentTemplate); } return new $class($resourceId, $cacheTime, $cacheId, $compileId, $includePath); } protected function getCompiledFilename(Dwoo $dwoo) { if ($this->compileId===null) { $this->compileId = str_replace('../', '__', strtr($this->getResourceIdentifier(), '\\:', '/-')); } return $dwoo->getCompileDir() . $this->compileId.'.d'.Dwoo::RELEASE_TAG.'.php'; } public function getIsModifiedCode() { return '"'.$this->getUid().'" == filemtime('.var_export($this->getResourceIdentifier(), true).')'; } } class Dwoo_Data implements Dwoo_IDataProvider { protected $data = array(); public function getData() { return $this->data; } public function clear($name = null) { if ($name === null) { $this->data = array(); } elseif (is_array($name)) { foreach ($name as $index) unset($this->data[$index]); } else { unset($this->data[$name]); } } public function setData(array $data) { $this->data = $data; } public function mergeData(array $data) { $args = func_get_args(); while (list(,$v) = each($args)) { if (is_array($v)) { $this->data = array_merge($this->data, $v); } } } public function assign($name, $val = null) { if (is_array($name)) { reset($name); while (list($k,$v) = each($name)) $this->data[$k] = $v; } else { $this->data[$name] = $val; } } public function __set($name, $value) { $this->assign($name, $value); } public function assignByRef($name, &$val) { $this->data[$name] =& $val; } public function append($name, $val = null, $merge = false) { if (is_array($name)) { foreach ($name as $key=>$val) { if (isset($this->data[$key]) && !is_array($this->data[$key])) { settype($this->data[$key], 'array'); } if ($merge === true && is_array($val)) { $this->data[$key] = $val + $this->data[$key]; } else { $this->data[$key][] = $val; } } } elseif ($val !== null) { if (isset($this->data[$name]) && !is_array($this->data[$name])) { settype($this->data[$name], 'array'); } elseif (!isset($this->data[$name])) { $this->data[$name] = array(); } if ($merge === true && is_array($val)) { $this->data[$name] = $val + $this->data[$name]; } else { $this->data[$name][] = $val; } } } public function appendByRef($name, &$val, $merge = false) { if (isset($this->data[$name]) && !is_array($this->data[$name])) { settype($this->data[$name], 'array'); } if ($merge === true && is_array($val)) { foreach ($val as $key => &$val) { $this->data[$name][$key] =& $val; } } else { $this->data[$name][] =& $val; } } public function isAssigned($name) { return isset($this->data[$name]); } public function __isset($name) { return isset($this->data[$name]); } public function unassign($name) { unset($this->data[$name]); } public function __unset($name) { unset($this->data[$name]); } public function get($name) { return $this->__get($name); } public function __get($name) { if (isset($this->data[$name])) { return $this->data[$name]; } else { throw new Dwoo_Exception('Tried to read a value that was not assigned yet : "'.$name.'"'); } } } \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo.php b/_piecrust/libs/Dwoo/Dwoo.php new file mode 100644 index 0000000..00d6899 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo.php @@ -0,0 +1,1533 @@ + + * requirements : + * php 5.2.0 or above (might work below, it's a rough estimate) + * SPL and PCRE extensions (for php versions prior to 5.3.0) + * mbstring extension for some string manipulation plugins (especially if you intend to use UTF-8) + * recommended : + * hash extension (for Dwoo_Template_String - minor performance boost) + * + * project created : + * 2008-01-05 + * + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.1.0 + * @date 2009-07-18 + * @package Dwoo + */ +class Dwoo +{ + /** + * current version number + * + * @var string + */ + const VERSION = '1.1.1'; + + /** + * unique number of this dwoo release + * + * this can be used by templates classes to check whether the compiled template + * has been compiled before this release or not, so that old templates are + * recompiled automatically when Dwoo is updated + */ + const RELEASE_TAG = 17; + + /**#@+ + * constants that represents all plugin types + * + * these are bitwise-operation-safe values to allow multiple types + * on a single plugin + * + * @var int + */ + const CLASS_PLUGIN = 1; + const FUNC_PLUGIN = 2; + const NATIVE_PLUGIN = 4; + const BLOCK_PLUGIN = 8; + const COMPILABLE_PLUGIN = 16; + const CUSTOM_PLUGIN = 32; + const SMARTY_MODIFIER = 64; + const SMARTY_BLOCK = 128; + const SMARTY_FUNCTION = 256; + const PROXY_PLUGIN = 512; + const TEMPLATE_PLUGIN = 1024; + /**#@-*/ + + /** + * character set of the template, used by string manipulation plugins + * + * it must be lowercase, but setCharset() will take care of that + * + * @see setCharset + * @see getCharset + * @var string + */ + protected $charset = 'utf-8'; + + /** + * global variables that are accessible through $dwoo.* in the templates + * + * default values include: + * + * $dwoo.version - current version number + * $dwoo.ad - a Powered by Dwoo link pointing to dwoo.org + * $dwoo.now - the current time + * $dwoo.template - the current template filename + * $dwoo.charset - the character set used by the template + * + * on top of that, foreach and other plugins can store special values in there, + * see their documentation for more details. + * + * @private + * @var array + */ + public $globals; + + /** + * directory where the compiled templates are stored + * + * defaults to DWOO_COMPILEDIR (= dwoo_dir/compiled by default) + * + * @var string + */ + protected $compileDir; + + /** + * directory where the cached templates are stored + * + * defaults to DWOO_CACHEDIR (= dwoo_dir/cache by default) + * + * @var string + */ + protected $cacheDir; + + /** + * defines how long (in seconds) the cached files must remain valid + * + * can be overriden on a per-template basis + * + * -1 = never delete + * 0 = disabled + * >0 = duration in seconds + * + * @var int + */ + protected $cacheTime = 0; + + /** + * security policy object + * + * @var Dwoo_Security_Policy + */ + protected $securityPolicy = null; + + /** + * stores the custom plugins callbacks + * + * @see addPlugin + * @see removePlugin + * @var array + */ + protected $plugins = array(); + + /** + * stores the filter callbacks + * + * @see addFilter + * @see removeFilter + * @var array + */ + protected $filters = array(); + + /** + * stores the resource types and associated + * classes / compiler classes + * + * @var array + */ + protected $resources = array + ( + 'file' => array + ( + 'class' => 'Dwoo_Template_File', + 'compiler' => null + ), + 'string' => array + ( + 'class' => 'Dwoo_Template_String', + 'compiler' => null + ) + ); + + /** + * the dwoo loader object used to load plugins by this dwoo instance + * + * @var Dwoo_ILoader + */ + protected $loader = null; + + /** + * currently rendered template, set to null when not-rendering + * + * @var Dwoo_ITemplate + */ + protected $template = null; + + /** + * stores the instances of the class plugins during template runtime + * + * @var array + */ + protected $runtimePlugins; + + /** + * stores the data during template runtime + * + * @var array + * @private + */ + public $data; + + /** + * stores the current scope during template runtime + * + * this should ideally not be accessed directly from outside template code + * + * @var mixed + * @private + */ + public $scope; + + /** + * stores the scope tree during template runtime + * + * @var array + */ + protected $scopeTree; + + /** + * stores the block plugins stack during template runtime + * + * @var array + */ + protected $stack; + + /** + * stores the current block plugin at the top of the stack during template runtime + * + * @var Dwoo_Block_Plugin + */ + protected $curBlock; + + /** + * stores the output buffer during template runtime + * + * @var string + */ + protected $buffer; + + /** + * stores plugin proxy + * + * @var Dwoo_IPluginProxy + */ + protected $pluginProxy; + + /** + * constructor, sets the cache and compile dir to the default values if not provided + * + * @param string $compileDir path to the compiled directory, defaults to lib/compiled + * @param string $cacheDir path to the cache directory, defaults to lib/cache + */ + public function __construct($compileDir = null, $cacheDir = null) + { + if ($compileDir !== null) { + $this->setCompileDir($compileDir); + } + if ($cacheDir !== null) { + $this->setCacheDir($cacheDir); + } + $this->initGlobals(); + } + + /** + * resets some runtime variables to allow a cloned object to be used to render sub-templates + */ + public function __clone() + { + $this->template = null; + unset($this->data); + } + + /** + * outputs the template instead of returning it, this is basically a shortcut for get(*, *, *, true) + * + * @see get + * @param mixed $tpl template, can either be a Dwoo_ITemplate object (i.e. Dwoo_Template_File), a valid path to a template, or + * a template as a string it is recommended to provide a Dwoo_ITemplate as it will probably make things faster, + * especially if you render a template multiple times + * @param mixed $data the data to use, can either be a Dwoo_IDataProvider object (i.e. Dwoo_Data) or an associative array. if you're + * rendering the template from cache, it can be left null + * @param Dwoo_ICompiler $compiler the compiler that must be used to compile the template, if left empty a default + * Dwoo_Compiler will be used. + * @return string nothing or the template output if $output is true + */ + public function output($tpl, $data = array(), Dwoo_ICompiler $compiler = null) + { + return $this->get($tpl, $data, $compiler, true); + } + + /** + * returns the given template rendered using the provided data and optional compiler + * + * @param mixed $tpl template, can either be a Dwoo_ITemplate object (i.e. Dwoo_Template_File), a valid path to a template, or + * a template as a string it is recommended to provide a Dwoo_ITemplate as it will probably make things faster, + * especially if you render a template multiple times + * @param mixed $data the data to use, can either be a Dwoo_IDataProvider object (i.e. Dwoo_Data) or an associative array. if you're + * rendering the template from cache, it can be left null + * @param Dwoo_ICompiler $compiler the compiler that must be used to compile the template, if left empty a default + * Dwoo_Compiler will be used. + * @param bool $output flag that defines whether the function returns the output of the template (false, default) or echoes it directly (true) + * @return string nothing or the template output if $output is true + */ + public function get($_tpl, $data = array(), $_compiler = null, $_output = false) + { + // a render call came from within a template, so we need a new dwoo instance in order to avoid breaking this one + if ($this->template instanceof Dwoo_ITemplate) { + $proxy = clone $this; + return $proxy->get($_tpl, $data, $_compiler, $_output); + } + + // auto-create template if required + if ($_tpl instanceof Dwoo_ITemplate) { + // valid, skip + } elseif (is_string($_tpl) && file_exists($_tpl)) { + $_tpl = new Dwoo_Template_File($_tpl); + } else { + throw new Dwoo_Exception('Dwoo->get/Dwoo->output\'s first argument must be a Dwoo_ITemplate (i.e. Dwoo_Template_File) or a valid path to a template file', E_USER_NOTICE); + } + + // save the current template, enters render mode at the same time + // if another rendering is requested it will be proxied to a new Dwoo instance + $this->template = $_tpl; + + // load data + if ($data instanceof Dwoo_IDataProvider) { + $this->data = $data->getData(); + } elseif (is_array($data)) { + $this->data = $data; + } else { + throw new Dwoo_Exception('Dwoo->get/Dwoo->output\'s data argument must be a Dwoo_IDataProvider object (i.e. Dwoo_Data) or an associative array', E_USER_NOTICE); + } + + $this->globals['template'] = $_tpl->getName(); + $this->initRuntimeVars($_tpl); + + // try to get cached template + $file = $_tpl->getCachedTemplate($this); + $doCache = $file === true; + $cacheLoaded = is_string($file); + + if ($cacheLoaded === true) { + // cache is present, run it + if ($_output === true) { + include $file; + $this->template = null; + } else { + ob_start(); + include $file; + $this->template = null; + return ob_get_clean(); + } + } else { + // no cache present + if ($doCache === true) { + $dynamicId = uniqid(); + } + + // render template + $compiledTemplate = $_tpl->getCompiledTemplate($this, $_compiler); + $out = include $compiledTemplate; + + // template returned false so it needs to be recompiled + if ($out === false) { + $_tpl->forceCompilation(); + $compiledTemplate = $_tpl->getCompiledTemplate($this, $_compiler); + $out = include $compiledTemplate; + } + + if ($doCache === true) { + $out = preg_replace('/(<%|%>|<\?php|<\?|\?>)/', '', $out); + if (!class_exists('Dwoo_plugin_dynamic', false)) { + $this->getLoader()->loadPlugin('dynamic'); + } + $out = Dwoo_Plugin_dynamic::unescape($out, $dynamicId, $compiledTemplate); + } + + // process filters + foreach ($this->filters as $filter) { + if (is_array($filter) && $filter[0] instanceof Dwoo_Filter) { + $out = call_user_func($filter, $out); + } else { + $out = call_user_func($filter, $this, $out); + } + } + + if ($doCache === true) { + // building cache + $file = $_tpl->cache($this, $out); + + // run it from the cache to be sure dynamics are rendered + if ($_output === true) { + include $file; + // exit render mode + $this->template = null; + } else { + ob_start(); + include $file; + // exit render mode + $this->template = null; + return ob_get_clean(); + } + } else { + // no need to build cache + // exit render mode + $this->template = null; + // output + if ($_output === true) { + echo $out; + } + return $out; + } + } + } + + /** + * re-initializes the globals array before each template run + * + * this method is only callede once when the Dwoo object is created + */ + protected function initGlobals() + { + $this->globals = array + ( + 'version' => self::VERSION, + 'ad' => 'Powered by Dwoo', + 'now' => $_SERVER['REQUEST_TIME'], + 'charset' => $this->charset, + ); + } + + /** + * re-initializes the runtime variables before each template run + * + * override this method to inject data in the globals array if needed, this + * method is called before each template execution + * + * @param Dwoo_ITemplate $tpl the template that is going to be rendered + */ + protected function initRuntimeVars(Dwoo_ITemplate $tpl) + { + $this->runtimePlugins = array(); + $this->scope =& $this->data; + $this->scopeTree = array(); + $this->stack = array(); + $this->curBlock = null; + $this->buffer = ''; + } + + /* + * --------- settings functions --------- + */ + + /** + * adds a custom plugin that is not in one of the plugin directories + * + * @param string $name the plugin name to be used in the templates + * @param callback $callback the plugin callback, either a function name, + * a class name or an array containing an object + * or class name and a method name + * @param bool $compilable if set to true, the plugin is assumed to be compilable + */ + public function addPlugin($name, $callback, $compilable = false) + { + $compilable = $compilable ? self::COMPILABLE_PLUGIN : 0; + if (is_array($callback)) { + if (is_subclass_of(is_object($callback[0]) ? get_class($callback[0]) : $callback[0], 'Dwoo_Block_Plugin')) { + $this->plugins[$name] = array('type'=>self::BLOCK_PLUGIN | $compilable, 'callback'=>$callback, 'class'=>(is_object($callback[0]) ? get_class($callback[0]) : $callback[0])); + } else { + $this->plugins[$name] = array('type'=>self::CLASS_PLUGIN | $compilable, 'callback'=>$callback, 'class'=>(is_object($callback[0]) ? get_class($callback[0]) : $callback[0]), 'function'=>$callback[1]); + } + } elseif (class_exists($callback, false)) { + if (is_subclass_of($callback, 'Dwoo_Block_Plugin')) { + $this->plugins[$name] = array('type'=>self::BLOCK_PLUGIN | $compilable, 'callback'=>$callback, 'class'=>$callback); + } else { + $this->plugins[$name] = array('type'=>self::CLASS_PLUGIN | $compilable, 'callback'=>$callback, 'class'=>$callback, 'function'=>'process'); + } + } elseif (function_exists($callback)) { + $this->plugins[$name] = array('type'=>self::FUNC_PLUGIN | $compilable, 'callback'=>$callback); + } else { + throw new Dwoo_Exception('Callback could not be processed correctly, please check that the function/class you used exists'); + } + } + + /** + * removes a custom plugin + * + * @param string $name the plugin name + */ + public function removePlugin($name) + { + if (isset($this->plugins[$name])) { + unset($this->plugins[$name]); + } + } + + /** + * adds a filter to this Dwoo instance, it will be used to filter the output of all the templates rendered by this instance + * + * @param mixed $callback a callback or a filter name if it is autoloaded from a plugin directory + * @param bool $autoload if true, the first parameter must be a filter name from one of the plugin directories + */ + public function addFilter($callback, $autoload = false) + { + if ($autoload) { + $class = 'Dwoo_Filter_'.$callback; + + if (!class_exists($class, false) && !function_exists($class)) { + try { + $this->getLoader()->loadPlugin($callback); + } catch (Dwoo_Exception $e) { + if (strstr($callback, 'Dwoo_Filter_')) { + throw new Dwoo_Exception('Wrong filter name : '.$callback.', the "Dwoo_Filter_" prefix should not be used, please only use "'.str_replace('Dwoo_Filter_', '', $callback).'"'); + } else { + throw new Dwoo_Exception('Wrong filter name : '.$callback.', when using autoload the filter must be in one of your plugin dir as "name.php" containg a class or function named "Dwoo_Filter_name"'); + } + } + } + + if (class_exists($class, false)) { + $callback = array(new $class($this), 'process'); + } elseif (function_exists($class)) { + $callback = $class; + } else { + throw new Dwoo_Exception('Wrong filter name : '.$callback.', when using autoload the filter must be in one of your plugin dir as "name.php" containg a class or function named "Dwoo_Filter_name"'); + } + + $this->filters[] = $callback; + } else { + $this->filters[] = $callback; + } + } + + /** + * removes a filter + * + * @param mixed $callback callback or filter name if it was autoloaded + */ + public function removeFilter($callback) + { + if (($index = array_search('Dwoo_Filter_'.$callback, $this->filters, true)) !== false) { + unset($this->filters[$index]); + } elseif (($index = array_search($callback, $this->filters, true)) !== false) { + unset($this->filters[$index]); + } else { + $class = 'Dwoo_Filter_' . $callback; + foreach ($this->filters as $index=>$filter) { + if (is_array($filter) && $filter[0] instanceof $class) { + unset($this->filters[$index]); + break; + } + } + } + } + + /** + * adds a resource or overrides a default one + * + * @param string $name the resource name + * @param string $class the resource class (which must implement Dwoo_ITemplate) + * @param callback $compilerFactory the compiler factory callback, a function that must return a compiler instance used to compile this resource, if none is provided. by default it will produce a Dwoo_Compiler object + */ + public function addResource($name, $class, $compilerFactory = null) + { + if (strlen($name) < 2) { + throw new Dwoo_Exception('Resource names must be at least two-character long to avoid conflicts with Windows paths'); + } + + if (!class_exists($class)) { + throw new Dwoo_Exception('Resource class does not exist'); + } + + $interfaces = class_implements($class); + if (in_array('Dwoo_ITemplate', $interfaces) === false) { + throw new Dwoo_Exception('Resource class must implement Dwoo_ITemplate'); + } + + $this->resources[$name] = array('class'=>$class, 'compiler'=>$compilerFactory); + } + + /** + * removes a custom resource + * + * @param string $name the resource name + */ + public function removeResource($name) + { + unset($this->resources[$name]); + if ($name==='file') { + $this->resources['file'] = array('class'=>'Dwoo_Template_File', 'compiler'=>null); + } + } + + /* + * --------- getters and setters --------- + */ + + /** + * sets the loader object to use to load plugins + * + * @param Dwoo_ILoader $loader loader object + */ + public function setLoader(Dwoo_ILoader $loader) + { + $this->loader = $loader; + } + + /** + * returns the current loader object or a default one if none is currently found + * + * @param Dwoo_ILoader + */ + public function getLoader() + { + if ($this->loader === null) { + $this->loader = new Dwoo_Loader($this->getCompileDir()); + } + + return $this->loader; + } + + /** + * returns the custom plugins loaded + * + * used by the Dwoo_ITemplate classes to pass the custom plugins to their Dwoo_ICompiler instance + * + * @return array + */ + public function getCustomPlugins() + { + return $this->plugins; + } + + /** + * returns the cache directory with a trailing DIRECTORY_SEPARATOR + * + * @return string + */ + public function getCacheDir() + { + if ($this->cacheDir === null) { + $this->setCacheDir(dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR); + } + + return $this->cacheDir; + } + + /** + * sets the cache directory and automatically appends a DIRECTORY_SEPARATOR + * + * @param string $dir the cache directory + */ + public function setCacheDir($dir) + { + $this->cacheDir = rtrim($dir, '/\\').DIRECTORY_SEPARATOR; + if (is_writable($this->cacheDir) === false) { + throw new Dwoo_Exception('The cache directory must be writable, chmod "'.$this->cacheDir.'" to make it writable'); + } + } + + /** + * returns the compile directory with a trailing DIRECTORY_SEPARATOR + * + * @return string + */ + public function getCompileDir() + { + if ($this->compileDir === null) { + $this->setCompileDir(dirname(__FILE__).DIRECTORY_SEPARATOR.'compiled'.DIRECTORY_SEPARATOR); + } + + return $this->compileDir; + } + + /** + * sets the compile directory and automatically appends a DIRECTORY_SEPARATOR + * + * @param string $dir the compile directory + */ + public function setCompileDir($dir) + { + $this->compileDir = rtrim($dir, '/\\').DIRECTORY_SEPARATOR; + if (is_writable($this->compileDir) === false) { + throw new Dwoo_Exception('The compile directory must be writable, chmod "'.$this->compileDir.'" to make it writable'); + } + } + + /** + * returns the default cache time that is used with templates that do not have a cache time set + * + * @return int the duration in seconds + */ + public function getCacheTime() + { + return $this->cacheTime; + } + + /** + * sets the default cache time to use with templates that do not have a cache time set + * + * @param int $seconds the duration in seconds + */ + public function setCacheTime($seconds) + { + $this->cacheTime = (int) $seconds; + } + + /** + * returns the character set used by the string manipulation plugins + * + * the charset is automatically lowercased + * + * @return string + */ + public function getCharset() + { + return $this->charset; + } + + /** + * sets the character set used by the string manipulation plugins + * + * the charset will be automatically lowercased + * + * @param string $charset the character set + */ + public function setCharset($charset) + { + $this->charset = strtolower((string) $charset); + } + + /** + * returns the current template being rendered, when applicable, or null + * + * @return Dwoo_ITemplate|null + */ + public function getTemplate() + { + return $this->template; + } + + /** + * sets the current template being rendered + * + * @param Dwoo_ITemplate $tpl template object + */ + public function setTemplate(Dwoo_ITemplate $tpl) + { + $this->template = $tpl; + } + + /** + * sets the default compiler factory function for the given resource name + * + * a compiler factory must return a Dwoo_ICompiler object pre-configured to fit your needs + * + * @param string $resourceName the resource name (i.e. file, string) + * @param callback $compilerFactory the compiler factory callback + */ + public function setDefaultCompilerFactory($resourceName, $compilerFactory) + { + $this->resources[$resourceName]['compiler'] = $compilerFactory; + } + + /** + * returns the default compiler factory function for the given resource name + * + * @param string $resourceName the resource name + * @return callback the compiler factory callback + */ + public function getDefaultCompilerFactory($resourceName) + { + return $this->resources[$resourceName]['compiler']; + } + + /** + * sets the security policy object to enforce some php security settings + * + * use this if untrusted persons can modify templates + * + * @param Dwoo_Security_Policy $policy the security policy object + */ + public function setSecurityPolicy(Dwoo_Security_Policy $policy = null) + { + $this->securityPolicy = $policy; + } + + /** + * returns the current security policy object or null by default + * + * @return Dwoo_Security_Policy|null the security policy object if any + */ + public function getSecurityPolicy() + { + return $this->securityPolicy; + } + + /** + * sets the object that must be used as a plugin proxy when plugin can't be found + * by dwoo's loader + * + * @param Dwoo_IPluginProxy $pluginProxy the proxy object + */ + public function setPluginProxy(Dwoo_IPluginProxy $pluginProxy) { + $this->pluginProxy = $pluginProxy; + } + + /** + * returns the current plugin proxy object or null by default + * + * @param Dwoo_IPluginProxy|null the proxy object if any + */ + public function getPluginProxy() { + return $this->pluginProxy; + } + + /* + * --------- util functions --------- + */ + + /** + * [util function] checks whether the given template is cached or not + * + * @param Dwoo_ITemplate $tpl the template object + * @return bool + */ + public function isCached(Dwoo_ITemplate $tpl) + { + return is_string($tpl->getCachedTemplate($this)); + } + + /** + * [util function] clears the cached templates if they are older than the given time + * + * @param int $olderThan minimum time (in seconds) required for a cached template to be cleared + * @return int the amount of templates cleared + */ + public function clearCache($olderThan=-1) + { + $cacheDirs = new RecursiveDirectoryIterator($this->getCacheDir()); + $cache = new RecursiveIteratorIterator($cacheDirs); + $expired = time() - $olderThan; + $count = 0; + foreach ($cache as $file) { + if ($cache->isDot() || $cache->isDir() || substr($file, -5) !== '.html') { + continue; + } + if ($cache->getCTime() < $expired) { + $count += unlink((string) $file) ? 1 : 0; + } + } + return $count; + } + + /** + * [util function] fetches a template object of the given resource + * + * @param string $resourceName the resource name (i.e. file, string) + * @param string $resourceId the resource identifier (i.e. file path) + * @param int $cacheTime the cache time setting for this resource + * @param string $cacheId the unique cache identifier + * @param string $compileId the unique compiler identifier + * @return Dwoo_ITemplate + */ + public function templateFactory($resourceName, $resourceId, $cacheTime = null, $cacheId = null, $compileId = null, Dwoo_ITemplate $parentTemplate = null) + { + if (isset($this->resources[$resourceName])) { + // TODO could be changed to $this->resources[$resourceName]['class']::templateFactory(..) in 5.3 maybe + return call_user_func(array($this->resources[$resourceName]['class'], 'templateFactory'), $this, $resourceId, $cacheTime, $cacheId, $compileId, $parentTemplate); + } else { + throw new Dwoo_Exception('Unknown resource type : '.$resourceName); + } + } + + /** + * [util function] checks if the input is an array or an iterator object, optionally it can also check if it's empty + * + * @param mixed $value the variable to check + * @param bool $checkIsEmpty if true, the function will also check if the array is empty, + * and return true only if it's not empty + * @return bool true if it's an array (and not empty) or false if it's not an array (or if it's empty) + */ + public function isArray($value, $checkIsEmpty=false) + { + if (is_array($value) === true) { + if ($checkIsEmpty === false) { + return true; + } else { + return count($value) > 0; + } + } elseif ($value instanceof Iterator) { + if ($checkIsEmpty === false) { + return true; + } elseif ($value instanceof Countable) { + return count($value) > 0; + } else { + $value->rewind(); + return $value->valid(); + } + } elseif ($value instanceof ArrayAccess) { + if ($checkIsEmpty === false) { + return true; + } elseif ($value instanceof Countable) { + return count($value) > 0; + } else { + return $value->offsetExists(0); + } + } + return false; + } + + /** + * [util function] triggers a dwoo error + * + * @param string $message the error message + * @param int $level the error level, one of the PHP's E_* constants + */ + public function triggerError($message, $level=E_USER_NOTICE) + { + if (!($tplIdentifier = $this->template->getResourceIdentifier())) { + $tplIdentifier = $this->template->getResourceName(); + } + trigger_error('Dwoo error (in '.$tplIdentifier.') : '.$message, $level); + } + + /* + * --------- runtime functions --------- + */ + + /** + * [runtime function] adds a block to the block stack + * + * @param string $blockName the block name (without Dwoo_Plugin_ prefix) + * @param array $args the arguments to be passed to the block's init() function + * @return Dwoo_Block_Plugin the newly created block + */ + public function addStack($blockName, array $args=array()) + { + if (isset($this->plugins[$blockName])) { + $class = $this->plugins[$blockName]['class']; + } else { + $class = 'Dwoo_Plugin_'.$blockName; + } + + if ($this->curBlock !== null) { + $this->curBlock->buffer(ob_get_contents()); + ob_clean(); + } else { + $this->buffer .= ob_get_contents(); + ob_clean(); + } + + $block = new $class($this); + + $cnt = count($args); + if ($cnt===0) { + $block->init(); + } elseif ($cnt===1) { + $block->init($args[0]); + } elseif ($cnt===2) { + $block->init($args[0], $args[1]); + } elseif ($cnt===3) { + $block->init($args[0], $args[1], $args[2]); + } elseif ($cnt===4) { + $block->init($args[0], $args[1], $args[2], $args[3]); + } else { + call_user_func_array(array($block,'init'), $args); + } + + $this->stack[] = $this->curBlock = $block; + return $block; + } + + /** + * [runtime function] removes the plugin at the top of the block stack + * + * calls the block buffer() function, followed by a call to end() + * and finally a call to process() + */ + public function delStack() + { + $args = func_get_args(); + + $this->curBlock->buffer(ob_get_contents()); + ob_clean(); + + $cnt = count($args); + if ($cnt===0) { + $this->curBlock->end(); + } elseif ($cnt===1) { + $this->curBlock->end($args[0]); + } elseif ($cnt===2) { + $this->curBlock->end($args[0], $args[1]); + } elseif ($cnt===3) { + $this->curBlock->end($args[0], $args[1], $args[2]); + } elseif ($cnt===4) { + $this->curBlock->end($args[0], $args[1], $args[2], $args[3]); + } else { + call_user_func_array(array($this->curBlock, 'end'), $args); + } + + $tmp = array_pop($this->stack); + + if (count($this->stack) > 0) { + $this->curBlock = end($this->stack); + $this->curBlock->buffer($tmp->process()); + } else { + $this->curBlock = null; + echo $tmp->process(); + } + + unset($tmp); + } + + /** + * [runtime function] returns the parent block of the given block + * + * @param Dwoo_Block_Plugin $block + * @return Dwoo_Block_Plugin or false if the given block isn't in the stack + */ + public function getParentBlock(Dwoo_Block_Plugin $block) + { + $index = array_search($block, $this->stack, true); + if ($index !== false && $index > 0) { + return $this->stack[$index-1]; + } + return false; + } + + /** + * [runtime function] finds the closest block of the given type, starting at the top of the stack + * + * @param string $type the type of plugin you want to find + * @return Dwoo_Block_Plugin or false if no plugin of such type is in the stack + */ + public function findBlock($type) + { + if (isset($this->plugins[$type])) { + $type = $this->plugins[$type]['class']; + } else { + $type = 'Dwoo_Plugin_'.str_replace('Dwoo_Plugin_', '', $type); + } + + $keys = array_keys($this->stack); + while (($key = array_pop($keys)) !== false) { + if ($this->stack[$key] instanceof $type) { + return $this->stack[$key]; + } + } + return false; + } + + /** + * [runtime function] returns a Dwoo_Plugin of the given class + * + * this is so a single instance of every class plugin is created at each template run, + * allowing class plugins to have "per-template-run" static variables + * + * @private + * @param string $class the class name + * @return mixed an object of the given class + */ + public function getObjectPlugin($class) + { + if (isset($this->runtimePlugins[$class])) { + return $this->runtimePlugins[$class]; + } + return $this->runtimePlugins[$class] = new $class($this); + } + + /** + * [runtime function] calls the process() method of the given class-plugin name + * + * @param string $plugName the class plugin name (without Dwoo_Plugin_ prefix) + * @param array $params an array of parameters to send to the process() method + * @return string the process() return value + */ + public function classCall($plugName, array $params = array()) + { + $class = 'Dwoo_Plugin_'.$plugName; + + $plugin = $this->getObjectPlugin($class); + + $cnt = count($params); + if ($cnt===0) { + return $plugin->process(); + } elseif ($cnt===1) { + return $plugin->process($params[0]); + } elseif ($cnt===2) { + return $plugin->process($params[0], $params[1]); + } elseif ($cnt===3) { + return $plugin->process($params[0], $params[1], $params[2]); + } elseif ($cnt===4) { + return $plugin->process($params[0], $params[1], $params[2], $params[3]); + } else { + return call_user_func_array(array($plugin, 'process'), $params); + } + } + + /** + * [runtime function] calls a php function + * + * @param string $callback the function to call + * @param array $params an array of parameters to send to the function + * @return mixed the return value of the called function + */ + public function arrayMap($callback, array $params) + { + if ($params[0] === $this) { + $addThis = true; + array_shift($params); + } + if ((is_array($params[0]) || ($params[0] instanceof Iterator && $params[0] instanceof ArrayAccess))) { + if (empty($params[0])) { + return $params[0]; + } + + // array map + $out = array(); + $cnt = count($params); + + if (isset($addThis)) { + array_unshift($params, $this); + $items = $params[1]; + $keys = array_keys($items); + + if (is_string($callback) === false) { + while (($i = array_shift($keys)) !== null) { + $out[] = call_user_func_array($callback, array(1=>$items[$i]) + $params); + } + } elseif ($cnt===1) { + while (($i = array_shift($keys)) !== null) { + $out[] = $callback($this, $items[$i]); + } + } elseif ($cnt===2) { + while (($i = array_shift($keys)) !== null) { + $out[] = $callback($this, $items[$i], $params[2]); + } + } elseif ($cnt===3) { + while (($i = array_shift($keys)) !== null) { + $out[] = $callback($this, $items[$i], $params[2], $params[3]); + } + } else { + while (($i = array_shift($keys)) !== null) { + $out[] = call_user_func_array($callback, array(1=>$items[$i]) + $params); + } + } + } else { + $items = $params[0]; + $keys = array_keys($items); + + if (is_string($callback) === false) { + while (($i = array_shift($keys)) !== null) { + $out[] = call_user_func_array($callback, array($items[$i]) + $params); + } + } elseif ($cnt===1) { + while (($i = array_shift($keys)) !== null) { + $out[] = $callback($items[$i]); + } + } elseif ($cnt===2) { + while (($i = array_shift($keys)) !== null) { + $out[] = $callback($items[$i], $params[1]); + } + } elseif ($cnt===3) { + while (($i = array_shift($keys)) !== null) { + $out[] = $callback($items[$i], $params[1], $params[2]); + } + } elseif ($cnt===4) { + while (($i = array_shift($keys)) !== null) { + $out[] = $callback($items[$i], $params[1], $params[2], $params[3]); + } + } else { + while (($i = array_shift($keys)) !== null) { + $out[] = call_user_func_array($callback, array($items[$i]) + $params); + } + } + } + return $out; + } else { + return $params[0]; + } + } + + /** + * [runtime function] reads a variable into the given data array + * + * @param string $varstr the variable string, using dwoo variable syntax (i.e. "var.subvar[subsubvar]->property") + * @param mixed $data the data array or object to read from + * @param bool $safeRead if true, the function will check whether the index exists to prevent any notices from being output + * @return mixed + */ + public function readVarInto($varstr, $data, $safeRead = false) + { + if ($data === null) { + return null; + } + + if (is_array($varstr) === false) { + preg_match_all('#(\[|->|\.)?((?:[^.[\]-]|-(?!>))+)\]?#i', $varstr, $m); + } else { + $m = $varstr; + } + unset($varstr); + + while (list($k, $sep) = each($m[1])) { + if ($sep === '.' || $sep === '[' || $sep === '') { + if ((is_array($data) || $data instanceof ArrayAccess) && ($safeRead === false || isset($data[$m[2][$k]]))) { + $data = $data[$m[2][$k]]; + } else { + return null; + } + } else { + if (is_object($data) && ($safeRead === false || isset($data->$m[2][$k]) || is_callable(array($data, '__get')))) { + $data = $data->$m[2][$k]; + } else { + return null; + } + } + } + + return $data; + } + + /** + * [runtime function] reads a variable into the parent scope + * + * @param int $parentLevels the amount of parent levels to go from the current scope + * @param string $varstr the variable string, using dwoo variable syntax (i.e. "var.subvar[subsubvar]->property") + * @return mixed + */ + public function readParentVar($parentLevels, $varstr = null) + { + $tree = $this->scopeTree; + $cur = $this->data; + + while ($parentLevels--!==0) { + array_pop($tree); + } + + while (($i = array_shift($tree)) !== null) { + if (is_object($cur)) { + $cur = $cur->$i; + } else { + $cur = $cur[$i]; + } + } + + if ($varstr!==null) { + return $this->readVarInto($varstr, $cur); + } else { + return $cur; + } + } + + /** + * [runtime function] reads a variable into the current scope + * + * @param string $varstr the variable string, using dwoo variable syntax (i.e. "var.subvar[subsubvar]->property") + * @return mixed + */ + public function readVar($varstr) + { + if (is_array($varstr)===true) { + $m = $varstr; + unset($varstr); + } else { + if (strstr($varstr, '.') === false && strstr($varstr, '[') === false && strstr($varstr, '->') === false) { + if ($varstr === 'dwoo') { + return $this->globals; + } elseif ($varstr === '__' || $varstr === '_root' ) { + return $this->data; + $varstr = substr($varstr, 6); + } elseif ($varstr === '_' || $varstr === '_parent') { + $varstr = '.'.$varstr; + $tree = $this->scopeTree; + $cur = $this->data; + array_pop($tree); + + while (($i = array_shift($tree)) !== null) { + if (is_object($cur)) { + $cur = $cur->$i; + } else { + $cur = $cur[$i]; + } + } + + return $cur; + } + + $cur = $this->scope; + + if (isset($cur[$varstr])) { + return $cur[$varstr]; + } else { + return null; + } + } + + if (substr($varstr, 0, 1) === '.') { + $varstr = 'dwoo'.$varstr; + } + + preg_match_all('#(\[|->|\.)?((?:[^.[\]-]|-(?!>))+)\]?#i', $varstr, $m); + } + + $i = $m[2][0]; + if ($i === 'dwoo') { + $cur = $this->globals; + array_shift($m[2]); + array_shift($m[1]); + switch ($m[2][0]) { + + case 'get': + $cur = $_GET; + break; + case 'post': + $cur = $_POST; + break; + case 'session': + $cur = $_SESSION; + break; + case 'cookies': + case 'cookie': + $cur = $_COOKIE; + break; + case 'server': + $cur = $_SERVER; + break; + case 'env': + $cur = $_ENV; + break; + case 'request': + $cur = $_REQUEST; + break; + case 'const': + array_shift($m[2]); + if (defined($m[2][0])) { + return constant($m[2][0]); + } else { + return null; + } + + } + if ($cur !== $this->globals) { + array_shift($m[2]); + array_shift($m[1]); + } + } elseif ($i === '__' || $i === '_root') { + $cur = $this->data; + array_shift($m[2]); + array_shift($m[1]); + } elseif ($i === '_' || $i === '_parent') { + $tree = $this->scopeTree; + $cur = $this->data; + + while (true) { + array_pop($tree); + array_shift($m[2]); + array_shift($m[1]); + if (current($m[2]) === '_' || current($m[2]) === '_parent') { + continue; + } + + while (($i = array_shift($tree)) !== null) { + if (is_object($cur)) { + $cur = $cur->$i; + } else { + $cur = $cur[$i]; + } + } + break; + } + } else { + $cur = $this->scope; + } + + while (list($k, $sep) = each($m[1])) { + if ($sep === '.' || $sep === '[' || $sep === '') { + if ((is_array($cur) || $cur instanceof ArrayAccess) && isset($cur[$m[2][$k]])) { + $cur = $cur[$m[2][$k]]; + } else { + return null; + } + } elseif ($sep === '->') { + if (is_object($cur)) { + $cur = $cur->$m[2][$k]; + } else { + return null; + } + } else { + return null; + } + } + + return $cur; + } + + /** + * [runtime function] assign the value to the given variable + * + * @param mixed $value the value to assign + * @param string $scope the variable string, using dwoo variable syntax (i.e. "var.subvar[subsubvar]->property") + * @return bool true if assigned correctly or false if a problem occured while parsing the var string + */ + public function assignInScope($value, $scope) + { + $tree =& $this->scopeTree; + $data =& $this->data; + + if (!is_string($scope)) { + return $this->triggerError('Assignments must be done into strings, ('.gettype($scope).') '.var_export($scope, true).' given', E_USER_ERROR); + } + if (strstr($scope, '.') === false && strstr($scope, '->') === false) { + $this->scope[$scope] = $value; + } else { + // TODO handle _root/_parent scopes ? + preg_match_all('#(\[|->|\.)?([^.[\]-]+)\]?#i', $scope, $m); + + $cur =& $this->scope; + $last = array(array_pop($m[1]), array_pop($m[2])); + + while (list($k, $sep) = each($m[1])) { + if ($sep === '.' || $sep === '[' || $sep === '') { + if (is_array($cur) === false) { + $cur = array(); + } + $cur =& $cur[$m[2][$k]]; + } elseif ($sep === '->') { + if (is_object($cur) === false) { + $cur = new stdClass; + } + $cur =& $cur->$m[2][$k]; + } else { + return false; + } + } + + if ($last[0] === '.' || $last[0] === '[' || $last[0] === '') { + if (is_array($cur) === false) { + $cur = array(); + } + $cur[$last[1]] = $value; + } elseif ($last[0] === '->') { + if (is_object($cur) === false) { + $cur = new stdClass; + } + $cur->$last[1] = $value; + } else { + return false; + } + } + } + + /** + * [runtime function] sets the scope to the given scope string or array + * + * @param mixed $scope a string i.e. "level1.level2" or an array i.e. array("level1", "level2") + * @param bool $absolute if true, the scope is set from the top level scope and not from the current scope + * @return array the current scope tree + */ + public function setScope($scope, $absolute = false) + { + $old = $this->scopeTree; + + if (is_string($scope)===true) { + $scope = explode('.', $scope); + } + + if ($absolute===true) { + $this->scope =& $this->data; + $this->scopeTree = array(); + } + + while (($bit = array_shift($scope)) !== null) { + if ($bit === '_' || $bit === '_parent') { + array_pop($this->scopeTree); + $this->scope =& $this->data; + $cnt = count($this->scopeTree); + for ($i=0;$i<$cnt;$i++) + $this->scope =& $this->scope[$this->scopeTree[$i]]; + } elseif ($bit === '__' || $bit === '_root') { + $this->scope =& $this->data; + $this->scopeTree = array(); + } elseif (isset($this->scope[$bit])) { + $this->scope =& $this->scope[$bit]; + $this->scopeTree[] = $bit; + } else { + unset($this->scope); + $this->scope = null; + } + } + + return $old; + } + + /** + * [runtime function] returns the entire data array + * + * @return array + */ + public function getData() + { + return $this->data; + } + + /** + * [runtime function] returns a reference to the current scope + * + * @return &mixed + */ + public function &getScope() + { + return $this->scope; + } + + /** + * Redirects all calls to unexisting to plugin proxy. + * + * @param string Method name + * @param array List of arguments + * @return mixed + */ + public function __call($method, $args) { + $proxy = $this->getPluginProxy(); + if (!$proxy) { + throw new Dwoo_Exception('Call to undefined method '.__CLASS__.'::'.$method.'()'); + } + return call_user_func_array($proxy->getCallback($method), $args); + } +} diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/DwooRenderer.php b/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/DwooRenderer.php new file mode 100644 index 0000000..e46a01d --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/DwooRenderer.php @@ -0,0 +1,196 @@ + + * + * ro + * rq + * ct + * us + * tm + * rd + * + * true + * %core.lib_dir%/dwoo_plugins + * + * + * - add dwoo's directory to your include path or include dwooAutoload.php yourself + * either through agavi's autoload.xml (with name="Dwoo") or through your index.php + * + * Notes: + * - you can copy the /Dwoo/Adapters/Agavi/dwoo_plugins directory to your agavi app's + * lib directory, or change the plugin_dir parameter in the output_types.xml file. + * these plugins are agavi-specific helpers that shortens the syntax to call common + * agavi helpers (i18n, routing, ..) + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the + * use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.1.0 + * @date 2009-07-18 + * @package Dwoo + */ +class DwooRenderer extends AgaviRenderer implements AgaviIReusableRenderer +{ + /** + * @constant string The directory inside the cache dir where templates will + * be stored in compiled form. + */ + const COMPILE_DIR = 'templates'; + + /** + * @constant string The subdirectory inside the compile dir where templates + * will be stored in compiled form. + */ + const COMPILE_SUBDIR = 'dwoo'; + + /** + * @constant string The directory inside the cache dir where cached content + * will be stored. + */ + const CACHE_DIR = 'dwoo'; + + /** + * @var Dwoo Dwoo template engine. + */ + protected $dwoo = null; + + /** + * @var string A string with the default template file extension, + * including the dot. + */ + protected $defaultExtension = '.html'; + + /** + * stores the (optional) plugin directory to add to the Dwoo_Loader + */ + protected $plugin_dir = null; + + /** + * Pre-serialization callback. + * + * Excludes the Dwoo instance to prevent excessive serialization load. + */ + public function __sleep() + { + $keys = parent::__sleep(); + unset($keys[array_search('dwoo', $keys)]); + return $keys; + } + + /** + * Initialize this Renderer. + * + * @param AgaviContext The current application context. + * @param array An associative array of initialization parameters. + */ + public function initialize(AgaviContext $context, array $parameters = array()) + { + parent::initialize($context, $parameters); + + $this->plugin_dir = $this->getParameter('plugin_dir', $this->plugin_dir); + } + + /** + * provides a custom compiler to the dwoo renderer with optional settings + * you can set in the agavi output_types.xml config file + * + * @return Dwoo_Compiler + */ + public function compilerFactory() + { + if (class_exists('Dwoo_Compiler', false) === false) { + include DWOO_DIRECTORY . 'Dwoo/Compiler.php'; + } + $compiler = Dwoo_Compiler::compilerFactory(); + $compiler->setAutoEscape((bool) $this->getParameter('auto_escape', false)); + return $compiler; + } + + /** + * Grab a cleaned up dwoo instance. + * + * @return Dwoo A Dwoo instance. + */ + protected function getEngine() + { + if($this->dwoo) { + return $this->dwoo; + } + + if(!class_exists('Dwoo')) { + if (file_exists(dirname(__FILE__).'/../../../dwooAutoload.php')) { + // file was dropped with the entire dwoo package + require dirname(__FILE__).'/../../../dwooAutoload.php'; + } else { + // assume the dwoo package is in the include path + require 'dwooAutoload.php'; + } + } + + $parentMode = fileperms(AgaviConfig::get('core.cache_dir')); + + $compileDir = AgaviConfig::get('core.cache_dir') . DIRECTORY_SEPARATOR . self::COMPILE_DIR . DIRECTORY_SEPARATOR . self::COMPILE_SUBDIR; + AgaviToolkit::mkdir($compileDir, $parentMode, true); + + $cacheDir = AgaviConfig::get('core.cache_dir') . DIRECTORY_SEPARATOR . self::CACHE_DIR; + AgaviToolkit::mkdir($cacheDir, $parentMode, true); + + $this->dwoo = new Dwoo($compileDir, $cacheDir); + + if (!empty($this->plugin_dir)) { + $this->dwoo->getLoader()->addDirectory($this->plugin_dir); + } + + $this->dwoo->setDefaultCompilerFactory('file', array($this, 'compilerFactory')); + + return $this->dwoo; + } + + /** + * Render the presentation and return the result. + * + * @param AgaviTemplateLayer The template layer to render. + * @param array The template variables. + * @param array The slots. + * @param array Associative array of additional assigns. + * + * @return string A rendered result. + */ + public function render(AgaviTemplateLayer $layer, array &$attributes = array(), array &$slots = array(), array &$moreAssigns = array()) + { + $engine = $this->getEngine(); + + $data = array(); + if($this->extractVars) { + $data = $attributes; + } else { + $data[$this->varName] = &$attributes; + } + + $data[$this->slotsVarName] =& $slots; + + foreach($this->assigns as $key => $getter) { + $data[$key] = $this->context->$getter(); + } + + foreach($moreAssigns as $key => &$value) { + if(isset($this->moreAssignNames[$key])) { + $key = $this->moreAssignNames[$key]; + } + $data[$key] =& $value; + } + + return $engine->get($layer->getResourceStreamIdentifier(), $data); + } +} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/README b/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/README new file mode 100644 index 0000000..a82547c --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/README @@ -0,0 +1,27 @@ +// ------------------------ +// Install notes : +// ------------------------ + + - drop dwoo's directory in app/lib/renderer (create if needed) + + - add a renderer to app/config/output_types.xml as such : + + + ro + rq + ct + us + tm + rd + + true + %core.lib_dir%/dwoo_plugins + + + - add the renderer to app/config/autoload.xml as such : + %core.lib_dir%/renderer/dwoo/Dwoo/Adapter/Agavi/DwooRenderer.php + + - you can copy the /Dwoo/Adapters/Agavi/dwoo_plugins directory to your agavi app's + lib directory, or change the plugin_dir parameter in the output_types.xml file. + these plugins are agavi-specific helpers that shortens the syntax to call common + agavi helpers (i18n, routing, ..) diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/t.php b/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/t.php new file mode 100644 index 0000000..45b9eb6 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/t.php @@ -0,0 +1,32 @@ +Agavi specific plugin + * + * uses AgaviTranslationManager to localize a string + * + *
+ *  * string : the string to localize
+ * 
+ * + * Examples: + * + * {t "Hello"} + * {t $header} + * + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +function Dwoo_Plugin_t_compile(Dwoo_Compiler $compiler, $string) +{ + return '$this->data[\'tm\']->_('.$string.')'; +} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/url.php b/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/url.php new file mode 100644 index 0000000..f9bd9b0 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/url.php @@ -0,0 +1,54 @@ +Agavi specific plugin + * + * uses AgaviRouting to create an url + * + *
+ *  * route : the route name, optional (by default the current url is returned)
+ *  * params : an array with variables to build the route, optional
+ *  * options : an array of options to pass to the routing object, optional
+ *  * rest : for convenience, you can just pass named parameters that will be used as
+ *           the params array, but you must not provide the params array in this case
+ * 
+ * + * Examples: + * + * {a url("route.name" array(param="Value", param2=$otherVal))}Here is a link{/a} + *
{* without any parameter it just returns the current url *} + * + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +function Dwoo_Plugin_url_compile(Dwoo_Compiler $compiler, $route = null, $params = null, $options = null, array $rest = array()) +{ + if ($params == 'null') { + if (count($rest)) { + $params = array(); + foreach ($rest as $k=>$v) { + if (is_numeric($k)) { + $params[] = $k.'=>'.$v; + } else { + $params[] = '"'.$k.'"=>'.$v; + } + } + $params = 'array('.implode(', ', $params).')'; + } else { + $params = 'array()'; + } + } + if ($options == 'null') { + $options = 'array()'; + } + return '$this->data[\'ro\']->gen('.$route.', '.$params.', '.$options.')'; +} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/CakePHP/README b/_piecrust/libs/Dwoo/Dwoo/Adapters/CakePHP/README new file mode 100644 index 0000000..a689b30 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Adapters/CakePHP/README @@ -0,0 +1,33 @@ +// CakePHP Dwoo bridge - v0.2 +// ------------------------ +// Installation : +// ------------------------ +// 1. Download and install the dwoo library, preferably on the +// 'vendors' directory of CakePHP. However you can place it +// anywhere you want; if you do, make sure to change the App::import +// line in dwoo.php to include the dwoo library properly. +// +// 2. Place this file in the app/views directory, or on cake/libs/view. +// +// 3. Create the app/tmp/dwoo/cache and app/tmp/dwoo/compile directories +// and make sure they are writable. +// ------------------------ +// Usage example : +// ------------------------ + +// In your controller class you need to change the view property to +// use Dwoo at some point in the execution using : + +$this->view = 'Dwoo'; + +// Or you can also override the view property in your AppController class as such : + +class AppController extends Controller { + public $view = 'Dwoo'; +} + +// If you want another template extension (default is .tpl) you must +// edit the dwoo.php file at line 44 and change it to : +$this->ext = ".html"; + +//{include $templatedir."index.tpl"} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/CakePHP/dwoo.php b/_piecrust/libs/Dwoo/Dwoo/Adapters/CakePHP/dwoo.php new file mode 100644 index 0000000..b986fec --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Adapters/CakePHP/dwoo.php @@ -0,0 +1,143 @@ + 'dwoo/dwooAutoload.php')); + +/** + * Dwoo adapter for CakePHP + * + * Based on SmartyView by Mark John S. Buenconsejo + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * This file is released under the LGPL + * "GNU Lesser General Public License" + * More information can be found here: + * {@link http://www.gnu.org/copyleft/lesser.html} + * + * @author Mark John S. Buenconsejo + * @author Giangi + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @link http://dwoo.org/ + * @version 1.1.0 + * @date 2009-07-18 + * @package Dwoo + */ +class DwooView extends View +{ + protected $_sv_template_dir; + protected $_sv_layout_dir; + protected $_sv_compile_dir; + protected $_sv_cache_dir; + protected $_sv_compile_id; + + protected $_dwoo; + + public $sv_processedTpl; + + public function __construct(&$controller) + { + parent::__construct($controller); + + $this->ext = '.tpl'; + + $this->_sv_template_dir = array + ( + VIEWS . $this->viewPath . DS . $this->subDir, + VIEWS . $this->viewPath, + VIEWS + ); + + $this->_sv_layout_dir = array + ( + LAYOUTS . $this->subDir, + VIEWS + ); + + $this->_sv_compile_dir = TMP . 'dwoo' . DS . 'compile'; + $this->_sv_cache_dir = TMP . 'dwoo' . DS . 'cache'; + + $this->_dwoo = new Dwoo($this->_sv_compile_dir, $this->_sv_cache_dir); + + $this->_sv_compile_id = $controller->name; + + $this->_dwoo->sv_this = $this; + $this->_dwoo->setSecurityPolicy(); + + return; + } + + /** + * changes the template directory + */ + public function setTemplateDir($path = VIEW) { + $old = $this->_sv_template_dir; + $this->_sv_template_dir = $path; + + return $old; + } + + public function getTemplateDir() { + return $this->_sv_template_dir ; + } + + public function _render($___viewFn, $___data_for_view, $___play_safe = true, $loadHelpers = true) + { + // let's determine if this is a layout call or a template call + // and change the template dir accordingly + $layout = false; + if(isset($___data_for_view['content_for_layout'])) { + $this->_sv_template_dir = $this->_sv_layout_dir; + $layout = true; + } + + $tpl = new Dwoo_Template_File($___viewFn); + $data = $___data_for_view; + + $data['view'] = $this; + + if ($this->helpers != false && $loadHelpers === true) { + $loadedHelpers = array(); + $loadedHelpers = $this->_loadHelpers($loadedHelpers, $this->helpers); + + foreach (array_keys($loadedHelpers) as $helper) { + $camelBackedHelper = strtolower(substr($helper, 0, 1)) . substr($helper, 1); + + ${$camelBackedHelper} = $loadedHelpers[$helper]; + + if (is_array(${$camelBackedHelper}->helpers) && !empty(${$camelBackedHelper}->helpers)) { + $subHelpers = ${$camelBackedHelper}->helpers; + foreach ($subHelpers as $subHelper) { + ${$camelBackedHelper}->{$subHelper} = $loadedHelpers[$subHelper]; + } + } + + if(isset($this->passedArgs)) { + ${$camelBackedHelper}->passedArgs = $this->passedArgs; + } + + $this->loaded[$camelBackedHelper] = ${$camelBackedHelper}; + + $data[$camelBackedHelper] = ${$camelBackedHelper}; + } + } + + if ($this->helpers != false && $loadHelpers === true) { + foreach ($loadedHelpers as $helper) { + if (is_object($helper)) { + if (is_subclass_of($helper, 'Helper') || is_subclass_of($helper, 'helper')) { + $helper->beforeRender(); + } + } + } + } + + return $this->_dwoo->get($tpl, $data); + } + + public function get(){ + return $this->_dwoo; + } +} diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/README b/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/README new file mode 100644 index 0000000..8207568 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/README @@ -0,0 +1,36 @@ +CodeIgniter/Dwoo adapater +------------------------- +Integration of Dwoo into Codeigniter (1.7.0 >) + +Links: +Dwoo - http://dwoo.org +CodeIgniter - http://codeigniter.com + +Installation: +1) Extract package into your application directory (i.e. $webroot/application or + $webroot/system/application) +2) Change the parameters in config/dwootemplate.php +3) Create the compile and cache directory you set in your config file in step 2 + and give it the correct rights (chmod 777 when on *nix) +4) Extract/copy the Dwoo package into application/libraries/dwoo +5) Browse to : http://[yoururl]/dwoowelcome + + +Version info +1.0.2 [11-03-2009] Fixed a problem with $data attribute (which Dwoo also used) +1.0.1 [12-11-2008] Removed some & in the dwootemplate + Changed licencse + Changed 'output' in 'get' in the dwootemplate (line 122) +1.0.0 [11-11-2008] Initial release + + +Questions/Remarks? +mail to: stefan.verstege@newmedia.nl +IM me on GTALK: verstege@gmail.com +Contact me on the Dwoo forums: stefanv + +---------[ copyright notice ]----------------------------------------------------------------------- +This software is provided 'as-is', without any express or implied warranty. +In no event will the authors be held liable for any damages arising from the use of this software. + +License http://dwoo.org/LICENSE Modified BSD License \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/config/dwootemplate.php b/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/config/dwootemplate.php new file mode 100644 index 0000000..d7257e0 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/config/dwootemplate.php @@ -0,0 +1,12 @@ +load->library('Dwootemplate'); + $this->dwootemplate->assign('itshowlate', date('H:i:s')); + $this->dwootemplate->display('dwoowelcome.tpl'); + } +} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/libraries/Dwootemplate.php b/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/libraries/Dwootemplate.php new file mode 100644 index 0000000..875e6cf --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/libraries/Dwootemplate.php @@ -0,0 +1,172 @@ + + * @copyright Copyright (c) 2008, Stefan Verstege + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://www.newmedia.nl/ + * @version 1.1.0 + * @date 2009-07-18 + * @package Dwoo + * + * @uses the dwoo package from http://dwoo.org + */ +class Dwootemplate extends Dwoo { + protected $dwoo_data = array(); + + /** + * Constructor for the DwooTemplate engine + * + */ + public function __construct() { + // Call parents constructor + parent::__construct(); + + // Set the config settings + $this->initialize(); + + // Assign some defaults to dwoo + $CI = get_instance(); + $this->dwoo_data = new Dwoo_Data(); + $this->dwoo_data->js_files = array(); + $this->dwoo_data->css_files = array(); + $this->dwoo_data->CI = $CI; + $this->dwoo_data->site_url = $CI->config->site_url(); // so we can get the full path to CI easily + $this->dwoo_data->uniqid = uniqid(); + $this->dwoo_data->timestamp = mktime(); + + log_message('debug', "Dwoo Template Class Initialized"); + } + + + /** + * Assign data to dwoo data object + * + * @param string $key + * @param mixed $value + */ + public function assign($key, $value) { + $this->dwoo_data->$key = $value; + } + + + /** + * Add Javascript files to template + * + * @param string $js + */ + public function add_js($js) { + $current = $this->dwoo_data->js_files; + $current[] = $js; + $this->dwoo_data->js_files = $current; + } + + + /** + * Add Css stylesheets to template + * + * @param string $css + */ + public function add_css($css) { + $current = $this->dwoo_data->css_files; + $current[] = $css; + $this->dwoo_data->css_files = $current; + } + + + /** + * Display or return the compiled template + * Since we assign the results to the standard CI output module + * you can also use the helper from CI in your templates!! + * + * @param string $sTemplate + * @param boolean $return + * @return mixed + */ + public function display($sTemplate, $return = FALSE) { + // Start benchmark + $CI = get_instance(); + $CI->benchmark->mark('dwoo_parse_start'); + + // Check if file exists + if ( !file_exists($this->template_dir . $sTemplate ) ) { + $message = sprintf('Template file \'%s\' not found.', $sTemplate); + show_error($message); + log_message('error', $message); + } + + // Create new template + $tpl = new Dwoo_Template_File($this->template_dir . $sTemplate); + + // render the template + $template = $this->get($tpl, $this->dwoo_data); + + // Finish benchmark + $CI->benchmark->mark('dwoo_parse_end'); + + // Return results or not ? + if ($return == FALSE) { + $CI->output->final_output = $template; + } else { + return $template; + } + } + + + /** + * Toggle Codeigniter profiler on/off + * + */ + public function enable_profiler($toggle = TRUE) { + $CI = get_instance(); + $CI->output->enable_profiler($toggle); + } + + + /** + * Set http header + * + * @example $this->output->set_header("HTTP/1.1 200 OK"); + * @example $this->output->set_header('Last-Modified: '.gmdate('D, d M Y H:i:s', $last_update).' GMT'); + * @param string $header + */ + public function set_header($header) { + $CI = get_instance(); + $CI->output->set_header($header); + } + + + /** + * Set status header + * + * @example $this->output->set_status_header('401'); + * @example // Sets the header as: Unauthorized + * @param string $header + */ + public function set_status_header($header) { + $CI = get_instance(); + $CI->output->set_status_header($header); + } + + + /** + * Assign the dwootemplate config items to the instance + * + */ + private function initialize() { + $CI = get_instance(); + $CI->config->load('dwootemplate', TRUE); + $config = $CI->config->item('dwootemplate'); + foreach ($config as $key => $val) { + $this->$key = $val; + } + } +} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/views/dwoowelcome.tpl b/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/views/dwoowelcome.tpl new file mode 100644 index 0000000..53da956 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/views/dwoowelcome.tpl @@ -0,0 +1,31 @@ +{extends "page.tpl"} + +{block "title"} +Welcome to Dwoo-ed CodeIgniter +{/block} + +{block "content"} +

Welcome to Dwoo-ed CodeIgniter!

+ +

The page you are looking at is being generated dynamically by CodeIgniter in combination with the 'Smarty-killer' Dwoo template engine. +The page is rendered at {$itshowlate} by the Dwoo_compiler.

+ +

If you would like to edit this page you'll find it located at:

+application/views/dwoowelcome.tpl + +

The corresponding controller for this page is found at:

+application/controllers/dwoowelcome.php + +

The library for Dwoo integration can be found at:

+application/libraries/Dwootemplate.php + +

If you are exploring Dwoo for the very first time, you should start by reading the {anchor uri='http://dwoo.org/' title='Dwoo website'}.

+

If you are exploring CodeIgniter for the very first time, you should start by reading the {anchor uri='http://codeigniter.com/user_guide/' title='User Guide'}.

+ +
+Usage:
+$this->load->library('Dwootemplate');
+$this->dwootemplate->assign('test', 'test');
+$this->dwootemplate->display('dwoowelcome.tpl');
+
+{/block} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/views/page.tpl b/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/views/page.tpl new file mode 100644 index 0000000..ffbae8a --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/views/page.tpl @@ -0,0 +1,57 @@ + + +{block "title"}Here come the title{/block} + + + + +{block "content"}Here comes the content{/block} + + \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/PluginProxy.php b/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/PluginProxy.php new file mode 100644 index 0000000..261fe3c --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/PluginProxy.php @@ -0,0 +1,96 @@ + + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Denis Arh, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Adapters_ZendFramework_PluginProxy implements Dwoo_IPluginProxy +{ + /** + * reference to the zend view owning this proxy + * + * @var Zend_View_Interface + */ + public $view; + + /** + * Dwoo_Adapters_ZendFramework_PluginProxy's constructor. + * + * @param Zend_View_Interface $view + */ + public function __construct(Zend_View_Interface $view) { + $this->view = $view; + } + + /** + * Called from Dwoo_Compiler to check if the requested plugin is available + * + * @param string $name + * @return bool + */ + public function handles($name) { + try { + $this->view->getHelper($name); + } catch (Zend_Loader_PluginLoader_Exception $e) { + return false; + } + + return true; + } + + /** + * returns the code (as a string) to call the plugin + * (this will be executed at runtime inside the Dwoo class) + * + * @param string $name the plugin name + * @param array $params a parameter array, array key "*" is the rest array + * @return string + */ + public function getCode($name, $params) { + return '$this->getPluginProxy()->view->'. $name .'('.Dwoo_Compiler::implode_r($params).')'; + } + + /** + * returns a callback to the plugin, this is used with the reflection API to + * find out about the plugin's parameter names etc. + * + * should you need a rest array (i.e. for ZendFramework helpers) without the + * possibility to edit the plugin's code, you can provide a callback to some + * other function with the correct parameter signature, i.e. : + * + * return array($this, "callbackHelper"); + * // and callbackHelper would be as such: + * public function callbackHelper(array $rest=array()){} + * + * + * @param string $name the plugin name + * @return callback + */ + public function getCallback($name) { + return array($this->view->getHelper($name), $name); + } + + /** + * returns some code that will check if the plugin is loaded and if not load it + * this is optional, if your plugins are autoloaded or whatever, just return an + * empty string + * + * @param string $name the plugin name + * @return string + */ + public function getLoader($name) { + return ''; + } +} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/README b/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/README new file mode 100644 index 0000000..3d7e8d2 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/README @@ -0,0 +1,32 @@ +// ------------------------ +// Usage example : +// ------------------------ +// Note that you might need to manually include 'lib/Dwoo.php', +// 'lib/Dwoo/Adapters/ZendFramework/View.php' and +// 'lib/Dwoo/Adapters/ZendFramework/PluginProxy.php' for this to +// work as expected, depending on your ZF setup +// +// If anyone writes a more advanced how-to please let me know +// ------------------------ + +$view = new Dwoo_Adapters_ZendFramework_View(array( + 'compileDir' => 'path/to/compile_dir' // set to null or remove this line to use defaults + 'cacheDir' => 'path/to/cache_dir' // set to null or remove this line to use defaults +)); + +// This allows you to use ZF's helpers as if they were Dwoo plugins (i.e. {doctype} will call the doctype helper) + +$view->setPluginProxy(new Dwoo_Adapters_ZendFramework_PluginProxy(new Zend_View())); + + +// 1. example - used with the Zend Controller + +$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer($view); + +Zend_Controller_Action_HelperBroker::addHelper($viewRenderer); + + +// 2. example - used manually + +$view->assign('foo', 'bar'); +$view->display('foobar.phtml'); \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/View.php b/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/View.php new file mode 100644 index 0000000..098a143 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/View.php @@ -0,0 +1,512 @@ + + * @author Stephan Wentz + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.1.0 + * @date 2009-07-18 + * @package Dwoo + */ +class Dwoo_Adapters_ZendFramework_View extends Zend_View_Abstract +{ + /** + * @var Dwoo + */ + protected $_engine = null; + + /** + * @var Dwoo_Data + */ + protected $_dataProvider = null; + + /** + * @var Dwoo_Compiler + */ + protected $_compiler = null; + + /** + * Changing Filter's scope to play nicely + * + * @var array + */ + protected $_filter = array(); + + + /** + * @var string + */ + protected $_templateFileClass = 'Dwoo_Template_File'; + + /** + * @var array + */ + protected $_templateFileSettings = array(); + + /** + * @var Dwoo_IPluginProxy + */ + protected $_pluginProxy = null; + + /** + * Constructor method. + * See setOptions for $opt details + * + * @see setOptions + * @param array|Zend_Config List of options or Zend_Config instance + */ + public function __construct($opt = array()) + { + + if (is_array($opt)) { + $this->setOptions($opt); + } elseif ($opt instanceof Zend_Config) { + $this->setConfig($opt); + } + + $this->init(); + } + + /** + * Set object state from options array + * - engine = engine class name|engine object|array of options for engine + * - dataProvider = data provider class name|data provider object|array of options for data provider + * - compiler = compiler class name|compiler object|array of options for compiler + * - templateFile = + * + * Array of options: + * - type class name or object for engine, dataProvider or compiler + * - any set* method (compileDir for setCompileDir ...) + * + * @param array $options + * @return Dwoo_Adapters_ZendFramework_View + */ + public function setOptions(array $opt = array()) + { + // BC checks + // TODO remove in 1.1 + if (isset($opt['compileDir']) || isset($opt['compile_dir'])) { + trigger_error('Dwoo ZF Adapter: the compile dir should be set in the $options[\'engine\'][\'compileDir\'] value the adapter settings', E_USER_WARNING); + } + + if (isset($opt['cacheDir']) || isset($opt['cache_dir'])) { + trigger_error('Dwoo ZF Adapter: the cache dir should be set in the $options[\'engine\'][\'cacheDir\'] value the adapter settings', E_USER_WARNING); + } + // end BC + + // Making sure that everything is loaded. + $classes = array('engine', 'dataProvider', 'compiler'); + + // Setting options to Dwoo objects... + foreach ($opt as $type => $settings) { + if (!method_exists($this, 'set' . $type)) { + throw new Dwoo_Exception("Unknown type $type"); + } + + if (is_string($settings) || is_object($settings)) { + call_user_func(array($this, 'set' . $type), $settings); + } elseif (is_array($settings)) { + // Set requested class + if (array_key_exists('type', $settings)) { + call_user_func(array($this, 'set' . $type), $settings['type']); + } + + if (in_array($type, $classes)) { + // Call get so that the class is initialized + $rel = call_user_func(array($this, 'get' . $type)); + + // Call set*() methods so that all the settings are set. + foreach ($settings as $method => $value) { + if (method_exists($rel, 'set' . $method)) { + call_user_func(array($rel, 'set' . $method), $value); + } + } + } elseif ('templateFile' == $type) { + // Remember the settings for the templateFile + $this->_templateFileSettings = $settings; + } + } + } + } + + /** + * Set object state from Zend_Config object + * + * @param Zend_Config $config + * @return Dwoo_Adapters_ZendFramework_View + */ + public function setConfig(Zend_Config $config) + { + return $this->setOptions($config->toArray()); + } + + /** + * Called before template rendering + * + * Binds plugin proxy to the Dwoo. + * + * @see Dwoo_Adapters_ZendFramework_View::getPluginProxy(); + * @see Dwoo::setPluginProxy(); + */ + protected function preRender() + { + $this->getEngine()->setPluginProxy($this->getPluginProxy()); + } + + /** + * Wraper for Dwoo_Data::__set() + * allows to assign variables using the object syntax + * + * @see Dwoo_Data::__set() + * @param string $name the variable name + * @param string $value the value to assign to it + */ + public function __set($name, $value) + { + $this->getDataProvider()->__set($name, $value); + } + + /** + * Sraper for Dwoo_Data::__get() allows to read variables using the object + * syntax + * + * @see Dwoo_Data::__get() + * @param string $name the variable name + * @return mixed + */ + public function __get($name) + { + return $this->getDataProvider()->__get($name); + } + + /** + * Wraper for Dwoo_Data::__isset() + * supports calls to isset($dwooData->var) + * + * @see Dwoo_Data::__isset() + * @param string $name the variable name + */ + public function __isset($name) + { + return $this->getDataProvider()->__isset($name); + } + + /** + * Wraper for Dwoo_Data::_unset() + * supports unsetting variables using the object syntax + * + * @see Dwoo_Data::__unset() + * @param string $name the variable name + */ + public function __unset($name) + { + $this->getDataProvider()->__unset($name); + } + + /** + * Catches clone request and clones data provider + */ + public function __clone() { + $this->setDataProvider(clone $this->getDataProvider()); + } + + /** + * Returns plugin proxy interface + * + * @return Dwoo_IPluginProxy + */ + public function getPluginProxy() + { + if (!$this->_pluginProxy) { + $this->_pluginProxy = new Dwoo_Adapters_ZendFramework_PluginProxy($this); + } + + return $this->_pluginProxy; + } + + /** + * Sets plugin proxy + * + * @param Dwoo_IPluginProxy + * @return Dwoo_Adapters_ZendFramework_View + */ + public function setPluginProxy(Dwoo_IPluginProxy $pluginProxy) + { + $this->_pluginProxy = $pluginProxy; + return $this; + } + + /** + * Sets template engine + * + * @param string|Dwoo Object or name of the class + */ + public function setEngine($engine) + { + // if param given as an object + if ($engine instanceof Dwoo) { + $this->_engine = $engine; + } + // + elseif (is_subclass_of($engine, 'Dwoo') || 'Dwoo' === $engine) { + $this->_engine = new $engine(); + } + else { + throw new Dwoo_Exception("Custom engine must be a subclass of Dwoo"); + } + } + + /** + * Return the Dwoo template engine object + * + * @return Dwoo + */ + public function getEngine() + { + if (null === $this->_engine) { + $this->_engine = new Dwoo(); + } + + return $this->_engine; + } + + /** + * Sets Dwoo data object + * + * @param string|Dwoo_Data Object or name of the class + */ + public function setDataProvider($data) + { + if ($data instanceof Dwoo_IDataProvider) { + $this->_dataProvider = $data; + } + elseif (is_subclass_of($data, 'Dwoo_Data') || 'Dwoo_Data' == $data) { + $this->_dataProvider = new $data(); + } + else { + throw new Dwoo_Exception("Custom data provider must be a subclass of Dwoo_Data or instance of Dwoo_IDataProvider"); + } + } + + /** + * Return the Dwoo data object + * + * @return Dwoo_Data + */ + public function getDataProvider() + { + if (null === $this->_dataProvider) { + $this->_dataProvider = new Dwoo_Data; + } + + return $this->_dataProvider; + } + + + /** + * Sets Dwoo compiler + * + * @param string|Dwoo_Compiler Object or name of the class + */ + public function setCompiler($compiler) + { + + // if param given as an object + if ($compiler instanceof Dwoo_ICompiler) { + $this->_compiler = $compiler; + } + // if param given as a string + elseif (is_subclass_of($compiler, 'Dwoo_Compiler') || 'Dwoo_Compiler' == $compiler) { + $this->_compiler = new $compiler; + } + else { + throw new Dwoo_Exception("Custom compiler must be a subclass of Dwoo_Compiler or instance of Dwoo_ICompiler"); + } + } + + /** + * Return the Dwoo compiler object + * + * @return Dwoo_Data + */ + public function getCompiler() + { + if (null === $this->_compiler) { + $this->_compiler = Dwoo_Compiler::compilerFactory(); + } + + return $this->_compiler; + } + + /** + * Initializes Dwoo_ITemplate type of class and sets properties from _templateFileSettings + * + * @param string Template location + * @return Dwoo_ITemplate + */ + public function getTemplateFile($template) { + $templateFileClass = $this->_templateFileClass; + + $dwooTemplateFile = new $templateFileClass($template); + + if (!($dwooTemplateFile instanceof Dwoo_ITemplate)) { + throw new Dwoo_Exception("Custom templateFile class must be a subclass of Dwoo_ITemplate"); + } + + foreach ($this->_templateFileSettings as $method => $value) { + if (method_exists($dwooTemplateFile, 'set' . $method)) { + call_user_func(array($dwooTemplateFile, 'set' . $method), $value); + } + } + + return $dwooTemplateFile; + } + + /** + * Dwoo_ITemplate type of class + * + * @param string Name of the class + * @return void + */ + public function setTemplateFile($tempateFileClass) { + $this->_templateFileClass = $tempateFileClass; + } + + /** + * Passes data to Dwoo_Data object + * + * @see Dwoo_Data::assign() + * @param array|string $name + * @param mixed $val + * @return Dwoo_Adapters_ZendFramework_View + */ + public function assign($name, $val = null) + { + $this->getDataProvider()->assign($name, $val); + return $this; + } + + /** + * Return list of all assigned variables + * + * @return array + */ + public function getVars() + { + return $this->_dataProvider->getData(); + } + + /** + * Clear all assigned variables + * + * Clears all variables assigned to Zend_View either via {@link assign()} or + * property overloading ({@link __get()}/{@link __set()}). + * + * @return void + * @return Dwoo_Adapters_ZendFramework_View + */ + public function clearVars() + { + $this->getDataProvider()->clear(); + return $this; + } + + /** + * Wraper for parent's render method so preRender method + * can be called (that will bind the plugin proxy to the + * engine. + * + * @see Zend_View_Abstract::render + * @return string The script output. + */ + public function render($name) + { + $this->preRender(); + return parent::render($name); + } + + /** + * Processes a view script and outputs it. Output is then + * passed through filters. + * + * @param string $name The script script name to process. + * @return string The script output. + */ + public function _run() + { + echo $this->_engine->get( + $this->getTemplateFile(func_get_arg(0)), + $this->getDataProvider(), + $this->getCompiler() + ); + } + + /** + * Add plugin path + * + * @param string $dir Directory + * @return Dwoo_Adapters_ZendFramework_View + */ + public function addPluginDir($dir) + { + $this->getEngine()->getLoader()->addDirectory($dir); + return $this; + } + + /** + * Set compile path + * + * @param string $dir Directory + * @return Dwoo_Adapters_ZendFramework_View + */ + public function setCompileDir($dir) + { + $this->getEngine()->setCompileDir($dir); + return $this; + } + + /** + * Set cache path + * + * @param string $dir Directory + * @return Dwoo_Adapters_ZendFramework_View + */ + public function setCacheDir($dir) + { + $this->getEngine()->setCacheDir($dir); + return $this; + } + + /** + * Set cache lifetime + * + * @param string $seconds Lifetime in seconds + * @return Dwoo_Adapters_ZendFramework_View + */ + public function setCacheLifetime($seconds) + { + $this->getEngine()->setCacheTime($seconds); + return $this; + } + + /** + * Set charset + * + * @param string $charset + * @return Dwoo_Adapters_ZendFramework_View + */ + public function setCharset($charset) + { + $this->_engine->setCharset($charset); + return $this; + } +} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Block/Plugin.php b/_piecrust/libs/Dwoo/Dwoo/Block/Plugin.php new file mode 100644 index 0000000..fe98ef9 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Block/Plugin.php @@ -0,0 +1,103 @@ +init() method, it will receive the parameters that + * are in the template code and is called when the block starts + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +abstract class Dwoo_Block_Plugin extends Dwoo_Plugin +{ + /** + * stores the contents of the block while it runs + * + * @var string + */ + protected $buffer = ''; + + /** + * buffers input, override only if necessary + * + * @var string $input the content that must be buffered + */ + public function buffer($input) + { + $this->buffer .= $input; + } + + // initialization code, receives the parameters from {block param1 param2} + // public function init($arg, $arg, ...); + + /** + * called when the block ends, this is most of the time followed right away by a call + * of process() but not always, so this should be used to do any shutdown operations on the + * block object, if required. + */ + public function end() + { + } + + /** + * called when the block output is required by a parent block + * + * this must read $this->buffer and return it processed + * + * @return string + */ + public function process() + { + return $this->buffer; + } + + /** + * called at compile time to define what the block should output in the compiled template code, happens when the block is declared + * + * basically this will replace the {block arg arg arg} tag in the template + * + * @param Dwoo_Compiler $compiler the compiler instance that calls this function + * @param array $params an array containing original and compiled parameters + * @param string $prepend that is just meant to allow a child class to call + * parent::postProcessing($compiler, $params, "foo();") to add a command before the + * default commands are executed + * @param string $append that is just meant to allow a child class to call + * parent::postProcessing($compiler, $params, null, "foo();") to add a command after the + * default commands are executed + * @param string $type the type is the plugin class name used + */ + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + return Dwoo_Compiler::PHP_OPEN.$prepend.'$this->addStack("'.$type.'", array('.Dwoo_Compiler::implode_r($compiler->getCompiledParams($params)).'));'.$append.Dwoo_Compiler::PHP_CLOSE; + } + + /** + * called at compile time to define what the block should output in the compiled template code, happens when the block is ended + * + * basically this will replace the {/block} tag in the template + * + * @see preProcessing + * @param Dwoo_Compiler $compiler the compiler instance that calls this function + * @param array $params an array containing original and compiled parameters, see preProcessing() for more details + * @param string $prepend that is just meant to allow a child class to call + * parent::postProcessing($compiler, $params, "foo();") to add a command before the + * default commands are executed + * @param string $append that is just meant to allow a child class to call + * parent::postProcessing($compiler, $params, null, "foo();") to add a command after the + * default commands are executed + * @param string $content the entire content of the block being closed + */ + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + return $content . Dwoo_Compiler::PHP_OPEN.$prepend.'$this->delStack();'.$append.Dwoo_Compiler::PHP_CLOSE; + } +} diff --git a/_piecrust/libs/Dwoo/Dwoo/Compilation/Exception.php b/_piecrust/libs/Dwoo/Dwoo/Compilation/Exception.php new file mode 100644 index 0000000..dd4e29e --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Compilation/Exception.php @@ -0,0 +1,38 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Compilation_Exception extends Dwoo_Exception +{ + protected $compiler; + protected $template; + + public function __construct(Dwoo_Compiler $compiler, $message) + { + $this->compiler = $compiler; + $this->template = $compiler->getDwoo()->getTemplate(); + parent::__construct('Compilation error at line '.$compiler->getLine().' in "'.$this->template->getResourceName().':'.$this->template->getResourceIdentifier().'" : '.$message); + } + + public function getCompiler() + { + return $this->compiler; + } + + public function getTemplate() + { + return $this->template; + } +} diff --git a/_piecrust/libs/Dwoo/Dwoo/Compiler.php b/_piecrust/libs/Dwoo/Dwoo/Compiler.php new file mode 100644 index 0000000..adff9d4 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Compiler.php @@ -0,0 +1,3086 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.1.0 + * @date 2009-07-18 + * @package Dwoo + */ +class Dwoo_Compiler implements Dwoo_ICompiler +{ + /** + * constant that represents a php opening tag + * + * use it in case it needs to be adjusted + * + * @var string + */ + const PHP_OPEN = ""; + + /** + * boolean flag to enable or disable debugging output + * + * @var bool + */ + public $debug = false; + + /** + * left script delimiter + * + * @var string + */ + protected $ld = '{'; + + /** + * left script delimiter with escaped regex meta characters + * + * @var string + */ + protected $ldr = '\\{'; + + /** + * right script delimiter + * + * @var string + */ + protected $rd = '}'; + + /** + * right script delimiter with escaped regex meta characters + * + * @var string + */ + protected $rdr = '\\}'; + + /** + * defines whether the nested comments should be parsed as nested or not + * + * defaults to false (classic block comment parsing as in all languages) + * + * @var bool + */ + protected $allowNestedComments = false; + + /** + * defines whether opening and closing tags can contain spaces before valid data or not + * + * turn to true if you want to be sloppy with the syntax, but when set to false it allows + * to skip javascript and css tags as long as they are in the form "{ something", which is + * nice. default is false. + * + * @var bool + */ + protected $allowLooseOpenings = false; + + /** + * defines whether the compiler will automatically html-escape variables or not + * + * default is false + * + * @var bool + */ + protected $autoEscape = false; + + /** + * security policy object + * + * @var Dwoo_Security_Policy + */ + protected $securityPolicy; + + /** + * stores the custom plugins registered with this compiler + * + * @var array + */ + protected $customPlugins = array(); + + /** + * stores the template plugins registered with this compiler + * + * @var array + */ + protected $templatePlugins = array(); + + /** + * stores the pre- and post-processors callbacks + * + * @var array + */ + protected $processors = array('pre'=>array(), 'post'=>array()); + + /** + * stores a list of plugins that are used in the currently compiled + * template, and that are not compilable. these plugins will be loaded + * during the template's runtime if required. + * + * it is a 1D array formatted as key:pluginName value:pluginType + * + * @var array + */ + protected $usedPlugins; + + /** + * stores the template undergoing compilation + * + * @var string + */ + protected $template; + + /** + * stores the current pointer position inside the template + * + * @var int + */ + protected $pointer; + + /** + * stores the current line count inside the template for debugging purposes + * + * @var int + */ + protected $line; + + /** + * stores the current template source while compiling it + * + * @var string + */ + protected $templateSource; + + /** + * stores the data within which the scope moves + * + * @var array + */ + protected $data; + + /** + * variable scope of the compiler, set to null if + * it can not be resolved to a static string (i.e. if some + * plugin defines a new scope based on a variable array key) + * + * @var mixed + */ + protected $scope; + + /** + * variable scope tree, that allows to rebuild the current + * scope if required, i.e. when going to a parent level + * + * @var array + */ + protected $scopeTree; + + /** + * block plugins stack, accessible through some methods + * + * @see findBlock + * @see getCurrentBlock + * @see addBlock + * @see addCustomBlock + * @see injectBlock + * @see removeBlock + * @see removeTopBlock + * + * @var array + */ + protected $stack = array(); + + /** + * current block at the top of the block plugins stack, + * accessible through getCurrentBlock + * + * @see getCurrentBlock + * + * @var Dwoo_Block_Plugin + */ + protected $curBlock; + + /** + * current dwoo object that uses this compiler, or null + * + * @var Dwoo + */ + protected $dwoo; + + /** + * holds an instance of this class, used by getInstance when you don't + * provide a custom compiler in order to save resources + * + * @var Dwoo_Compiler + */ + protected static $instance; + + /** + * constructor + * + * saves the created instance so that child templates get the same one + */ + public function __construct() + { + self::$instance = $this; + } + + /** + * sets the delimiters to use in the templates + * + * delimiters can be multi-character strings but should not be one of those as they will + * make it very hard to work with templates or might even break the compiler entirely : "\", "$", "|", ":" and finally "#" only if you intend to use config-vars with the #var# syntax. + * + * @param string $left left delimiter + * @param string $right right delimiter + */ + public function setDelimiters($left, $right) + { + $this->ld = $left; + $this->rd = $right; + $this->ldr = preg_quote($left, '/'); + $this->rdr = preg_quote($right, '/'); + } + + /** + * returns the left and right template delimiters + * + * @return array containing the left and the right delimiters + */ + public function getDelimiters() + { + return array($this->ld, $this->rd); + } + + /** + * sets the way to handle nested comments, if set to true + * {* foo {* some other *} comment *} will be stripped correctly. + * + * if false it will remove {* foo {* some other *} and leave "comment *}" alone, + * this is the default behavior + * + * @param bool $allow allow nested comments or not, defaults to true (but the default internal value is false) + */ + public function setNestedCommentsHandling($allow = true) { + $this->allowNestedComments = (bool) $allow; + } + + /** + * returns the nested comments handling setting + * + * @see setNestedCommentsHandling + * @return bool true if nested comments are allowed + */ + public function getNestedCommentsHandling() { + return $this->allowNestedComments; + } + + /** + * sets the tag openings handling strictness, if set to true, template tags can + * contain spaces before the first function/string/variable such as { $foo} is valid. + * + * if set to false (default setting), { $foo} is invalid but that is however a good thing + * as it allows css (i.e. #foo { color:red; }) to be parsed silently without triggering + * an error, same goes for javascript. + * + * @param bool $allow true to allow loose handling, false to restore default setting + */ + public function setLooseOpeningHandling($allow = false) + { + $this->allowLooseOpenings = (bool) $allow; + } + + /** + * returns the tag openings handling strictness setting + * + * @see setLooseOpeningHandling + * @return bool true if loose tags are allowed + */ + public function getLooseOpeningHandling() + { + return $this->allowLooseOpenings; + } + + /** + * changes the auto escape setting + * + * if enabled, the compiler will automatically html-escape variables, + * unless they are passed through the safe function such as {$var|safe} + * or {safe $var} + * + * default setting is disabled/false + * + * @param bool $enabled set to true to enable, false to disable + */ + public function setAutoEscape($enabled) + { + $this->autoEscape = (bool) $enabled; + } + + /** + * returns the auto escape setting + * + * default setting is disabled/false + * + * @return bool + */ + public function getAutoEscape() + { + return $this->autoEscape; + } + + /** + * adds a preprocessor to the compiler, it will be called + * before the template is compiled + * + * @param mixed $callback either a valid callback to the preprocessor or a simple name if the autoload is set to true + * @param bool $autoload if set to true, the preprocessor is auto-loaded from one of the plugin directories, else you must provide a valid callback + */ + public function addPreProcessor($callback, $autoload = false) + { + if ($autoload) { + $name = str_replace('Dwoo_Processor_', '', $callback); + $class = 'Dwoo_Processor_'.$name; + + if (class_exists($class, false)) { + $callback = array(new $class($this), 'process'); + } elseif (function_exists($class)) { + $callback = $class; + } else { + $callback = array('autoload'=>true, 'class'=>$class, 'name'=>$name); + } + + $this->processors['pre'][] = $callback; + } else { + $this->processors['pre'][] = $callback; + } + } + + /** + * removes a preprocessor from the compiler + * + * @param mixed $callback either a valid callback to the preprocessor or a simple name if it was autoloaded + */ + public function removePreProcessor($callback) + { + if (($index = array_search($callback, $this->processors['pre'], true)) !== false) { + unset($this->processors['pre'][$index]); + } elseif (($index = array_search('Dwoo_Processor_'.str_replace('Dwoo_Processor_', '', $callback), $this->processors['pre'], true)) !== false) { + unset($this->processors['pre'][$index]); + } else { + $class = 'Dwoo_Processor_' . str_replace('Dwoo_Processor_', '', $callback); + foreach ($this->processors['pre'] as $index=>$proc) { + if (is_array($proc) && ($proc[0] instanceof $class) || (isset($proc['class']) && $proc['class'] == $class)) { + unset($this->processors['pre'][$index]); + break; + } + } + } + } + + /** + * adds a postprocessor to the compiler, it will be called + * before the template is compiled + * + * @param mixed $callback either a valid callback to the postprocessor or a simple name if the autoload is set to true + * @param bool $autoload if set to true, the postprocessor is auto-loaded from one of the plugin directories, else you must provide a valid callback + */ + public function addPostProcessor($callback, $autoload = false) + { + if ($autoload) { + $name = str_replace('Dwoo_Processor_', '', $callback); + $class = 'Dwoo_Processor_'.$name; + + if (class_exists($class, false)) { + $callback = array(new $class($this), 'process'); + } elseif (function_exists($class)) { + $callback = $class; + } else { + $callback = array('autoload'=>true, 'class'=>$class, 'name'=>$name); + } + + $this->processors['post'][] = $callback; + } else { + $this->processors['post'][] = $callback; + } + } + + /** + * removes a postprocessor from the compiler + * + * @param mixed $callback either a valid callback to the postprocessor or a simple name if it was autoloaded + */ + public function removePostProcessor($callback) + { + if (($index = array_search($callback, $this->processors['post'], true)) !== false) { + unset($this->processors['post'][$index]); + } elseif (($index = array_search('Dwoo_Processor_'.str_replace('Dwoo_Processor_', '', $callback), $this->processors['post'], true)) !== false) { + unset($this->processors['post'][$index]); + } else { + $class = 'Dwoo_Processor_' . str_replace('Dwoo_Processor_', '', $callback); + foreach ($this->processors['post'] as $index=>$proc) { + if (is_array($proc) && ($proc[0] instanceof $class) || (isset($proc['class']) && $proc['class'] == $class)) { + unset($this->processors['post'][$index]); + break; + } + } + } + } + + /** + * internal function to autoload processors at runtime if required + * + * @param string $class the class/function name + * @param string $name the plugin name (without Dwoo_Plugin_ prefix) + */ + protected function loadProcessor($class, $name) + { + if (!class_exists($class, false) && !function_exists($class)) { + try { + $this->dwoo->getLoader()->loadPlugin($name); + } catch (Dwoo_Exception $e) { + throw new Dwoo_Exception('Processor '.$name.' could not be found in your plugin directories, please ensure it is in a file named '.$name.'.php in the plugin directory'); + } + } + + if (class_exists($class, false)) { + return array(new $class($this), 'process'); + } + + if (function_exists($class)) { + return $class; + } + + throw new Dwoo_Exception('Wrong processor name, when using autoload the processor must be in one of your plugin dir as "name.php" containg a class or function named "Dwoo_Processor_name"'); + } + + /** + * adds an used plugin, this is reserved for use by the {template} plugin + * + * this is required so that plugin loading bubbles up from loaded + * template files to the current one + * + * @private + * @param string $name function name + * @param int $type plugin type (Dwoo::*_PLUGIN) + */ + public function addUsedPlugin($name, $type) + { + $this->usedPlugins[$name] = $type; + } + + /** + * returns all the plugins this template uses + * + * @private + * @return array the list of used plugins in the parsed template + */ + public function getUsedPlugins() + { + return $this->usedPlugins; + } + + /** + * adds a template plugin, this is reserved for use by the {template} plugin + * + * this is required because the template functions are not declared yet + * during compilation, so we must have a way of validating their argument + * signature without using the reflection api + * + * @private + * @param string $name function name + * @param array $params parameter array to help validate the function call + * @param string $uuid unique id of the function + * @param string $body function php code + */ + public function addTemplatePlugin($name, array $params, $uuid, $body = null) + { + $this->templatePlugins[$name] = array('params'=> $params, 'body' => $body, 'uuid' => $uuid); + } + + /** + * returns all the parsed sub-templates + * + * @private + * @return array the parsed sub-templates + */ + public function getTemplatePlugins() + { + return $this->templatePlugins; + } + + /** + * marks a template plugin as being called, which means its source must be included in the compiled template + * + * @param string $name function name + */ + public function useTemplatePlugin($name) + { + $this->templatePlugins[$name]['called'] = true; + } + + /** + * adds the custom plugins loaded into Dwoo to the compiler so it can load them + * + * @see Dwoo::addPlugin + * @param array $customPlugins an array of custom plugins + */ + public function setCustomPlugins(array $customPlugins) + { + $this->customPlugins = $customPlugins; + } + + /** + * sets the security policy object to enforce some php security settings + * + * use this if untrusted persons can modify templates, + * set it on the Dwoo object as it will be passed onto the compiler automatically + * + * @param Dwoo_Security_Policy $policy the security policy object + */ + public function setSecurityPolicy(Dwoo_Security_Policy $policy = null) + { + $this->securityPolicy = $policy; + } + + /** + * returns the current security policy object or null by default + * + * @return Dwoo_Security_Policy|null the security policy object if any + */ + public function getSecurityPolicy() + { + return $this->securityPolicy; + } + + /** + * sets the pointer position + * + * @param int $position the new pointer position + * @param bool $isOffset if set to true, the position acts as an offset and not an absolute position + */ + public function setPointer($position, $isOffset = false) + { + if ($isOffset) { + $this->pointer += $position; + } else { + $this->pointer = $position; + } + } + + /** + * returns the current pointer position, only available during compilation of a template + * + * @return int + */ + public function getPointer() + { + return $this->pointer; + } + + /** + * sets the line number + * + * @param int $number the new line number + * @param bool $isOffset if set to true, the position acts as an offset and not an absolute position + */ + public function setLine($number, $isOffset = false) + { + if ($isOffset) { + $this->line += $number; + } else { + $this->line = $number; + } + } + + /** + * returns the current line number, only available during compilation of a template + * + * @return int + */ + public function getLine() + { + return $this->line; + } + + /** + * returns the dwoo object that initiated this template compilation, only available during compilation of a template + * + * @return Dwoo + */ + public function getDwoo() + { + return $this->dwoo; + } + + /** + * overwrites the template that is being compiled + * + * @param string $newSource the template source that must replace the current one + * @param bool $fromPointer if set to true, only the source from the current pointer position is replaced + * @return string the template or partial template + */ + public function setTemplateSource($newSource, $fromPointer = false) + { + if ($fromPointer === true) { + $this->templateSource = substr($this->templateSource, 0, $this->pointer) . $newSource; + } else { + $this->templateSource = $newSource; + } + } + + /** + * returns the template that is being compiled + * + * @param mixed $fromPointer if set to true, only the source from the current pointer + * position is returned, if a number is given it overrides the current pointer + * @return string the template or partial template + */ + public function getTemplateSource($fromPointer = false) + { + if ($fromPointer === true) { + return substr($this->templateSource, $this->pointer); + } elseif (is_numeric($fromPointer)) { + return substr($this->templateSource, $fromPointer); + } else { + return $this->templateSource; + } + } + + /** + * resets the compilation pointer, effectively restarting the compilation process + * + * this is useful if a plugin modifies the template source since it might need to be recompiled + */ + public function recompile() + { + $this->setPointer(0); + } + + /** + * compiles the provided string down to php code + * + * @param string $tpl the template to compile + * @return string a compiled php string + */ + public function compile(Dwoo $dwoo, Dwoo_ITemplate $template) + { + // init vars + $tpl = $template->getSource(); + $ptr = 0; + $this->dwoo = $dwoo; + $this->template = $template; + $this->templateSource =& $tpl; + $this->pointer =& $ptr; + + while (true) { + // if pointer is at the beginning, reset everything, that allows a plugin to externally reset the compiler if everything must be reparsed + if ($ptr===0) { + // resets variables + $this->usedPlugins = array(); + $this->data = array(); + $this->scope =& $this->data; + $this->scopeTree = array(); + $this->stack = array(); + $this->line = 1; + $this->templatePlugins = array(); + // add top level block + $compiled = $this->addBlock('topLevelBlock', array(), 0); + $this->stack[0]['buffer'] = ''; + + if ($this->debug) echo 'COMPILER INIT
'; + + if ($this->debug) echo 'PROCESSING PREPROCESSORS ('.count($this->processors['pre']).')
'; + + // runs preprocessors + foreach ($this->processors['pre'] as $preProc) { + if (is_array($preProc) && isset($preProc['autoload'])) { + $preProc = $this->loadProcessor($preProc['class'], $preProc['name']); + } + if (is_array($preProc) && $preProc[0] instanceof Dwoo_Processor) { + $tpl = call_user_func($preProc, $tpl); + } else { + $tpl = call_user_func($preProc, $this, $tpl); + } + } + unset($preProc); + + // show template source if debug + if ($this->debug) echo '
'.print_r(htmlentities($tpl), true).'

'; + + // strips php tags if required by the security policy + if ($this->securityPolicy !== null) { + $search = array('{<\?php.*?\?>}'); + if (ini_get('short_open_tags')) { + $search = array('{<\?.*?\?>}', '{<%.*?%>}'); + } + switch($this->securityPolicy->getPhpHandling()) { + + case Dwoo_Security_Policy::PHP_ALLOW: + break; + case Dwoo_Security_Policy::PHP_ENCODE: + $tpl = preg_replace_callback($search, array($this, 'phpTagEncodingHelper'), $tpl); + break; + case Dwoo_Security_Policy::PHP_REMOVE: + $tpl = preg_replace($search, '', $tpl); + + } + } + } + + $pos = strpos($tpl, $this->ld, $ptr); + + if ($pos === false) { + $this->push(substr($tpl, $ptr), 0); + break; + } elseif (substr($tpl, $pos-1, 1) === '\\' && substr($tpl, $pos-2, 1) !== '\\') { + $this->push(substr($tpl, $ptr, $pos-$ptr-1) . $this->ld); + $ptr = $pos+strlen($this->ld); + } elseif (preg_match('/^'.$this->ldr . ($this->allowLooseOpenings ? '\s*' : '') . 'literal' . ($this->allowLooseOpenings ? '\s*' : '') . $this->rdr.'/s', substr($tpl, $pos), $litOpen)) { + if (!preg_match('/'.$this->ldr . ($this->allowLooseOpenings ? '\s*' : '') . '\/literal' . ($this->allowLooseOpenings ? '\s*' : '') . $this->rdr.'/s', $tpl, $litClose, PREG_OFFSET_CAPTURE, $pos)) { + throw new Dwoo_Compilation_Exception($this, 'The {literal} blocks must be closed explicitly with {/literal}'); + } + $endpos = $litClose[0][1]; + $this->push(substr($tpl, $ptr, $pos-$ptr) . substr($tpl, $pos + strlen($litOpen[0]), $endpos-$pos-strlen($litOpen[0]))); + $ptr = $endpos+strlen($litClose[0][0]); + } else { + if (substr($tpl, $pos-2, 1) === '\\' && substr($tpl, $pos-1, 1) === '\\') { + $this->push(substr($tpl, $ptr, $pos-$ptr-1)); + $ptr = $pos; + } + + $this->push(substr($tpl, $ptr, $pos-$ptr)); + $ptr = $pos; + + $pos += strlen($this->ld); + if ($this->allowLooseOpenings) { + while (substr($tpl, $pos, 1) === ' ') { + $pos+=1; + } + } else { + if (substr($tpl, $pos, 1) === ' ' || substr($tpl, $pos, 1) === "\r" || substr($tpl, $pos, 1) === "\n" || substr($tpl, $pos, 1) === "\t") { + $ptr = $pos; + $this->push($this->ld); + continue; + } + } + + // check that there is an end tag present + if (strpos($tpl, $this->rd, $pos) === false) { + throw new Dwoo_Compilation_Exception($this, 'A template tag was not closed, started with "'.substr($tpl, $ptr, 30).'"'); + } + + + $ptr += strlen($this->ld); + $subptr = $ptr; + + while (true) { + $parsed = $this->parse($tpl, $subptr, null, false, 'root', $subptr); + + // reload loop if the compiler was reset + if ($ptr === 0) { + continue 2; + } + + $len = $subptr - $ptr; + $this->push($parsed, substr_count(substr($tpl, $ptr, $len), "\n")); + $ptr += $len; + + if ($parsed === false) { + break; + } + } + + // adds additional line breaks between php closing and opening tags because the php parser removes those if there is just a single line break + if (substr($this->curBlock['buffer'], -2) === '?>' && preg_match('{^(([\r\n])([\r\n]?))}', substr($tpl, $ptr, 3), $m)) { + if ($m[3] === '') { + $ptr+=1; + $this->push($m[1].$m[1], 1); + } else { + $ptr+=2; + $this->push($m[1]."\n", 2); + } + } + } + } + + $compiled .= $this->removeBlock('topLevelBlock'); + + if ($this->debug) echo 'PROCESSING POSTPROCESSORS
'; + + foreach ($this->processors['post'] as $postProc) { + if (is_array($postProc) && isset($postProc['autoload'])) { + $postProc = $this->loadProcessor($postProc['class'], $postProc['name']); + } + if (is_array($postProc) && $postProc[0] instanceof Dwoo_Processor) { + $compiled = call_user_func($postProc, $compiled); + } else { + $compiled = call_user_func($postProc, $this, $compiled); + } + } + unset($postProc); + + if ($this->debug) echo 'COMPILATION COMPLETE : MEM USAGE : '.memory_get_usage().'
'; + + $output = "usedPlugins as $plugin=>$type) { + if ($type & Dwoo::CUSTOM_PLUGIN) { + continue; + } + + switch($type) { + + case Dwoo::BLOCK_PLUGIN: + case Dwoo::CLASS_PLUGIN: + $output .= "if (class_exists('Dwoo_Plugin_$plugin', false)===false)\n\t\$this->getLoader()->loadPlugin('$plugin');\n"; + break; + case Dwoo::FUNC_PLUGIN: + $output .= "if (function_exists('Dwoo_Plugin_$plugin')===false)\n\t\$this->getLoader()->loadPlugin('$plugin');\n"; + break; + case Dwoo::SMARTY_MODIFIER: + $output .= "if (function_exists('smarty_modifier_$plugin')===false)\n\t\$this->getLoader()->loadPlugin('$plugin');\n"; + break; + case Dwoo::SMARTY_FUNCTION: + $output .= "if (function_exists('smarty_function_$plugin')===false)\n\t\$this->getLoader()->loadPlugin('$plugin');\n"; + break; + case Dwoo::SMARTY_BLOCK: + $output .= "if (function_exists('smarty_block_$plugin')===false)\n\t\$this->getLoader()->loadPlugin('$plugin');\n"; + break; + case Dwoo::PROXY_PLUGIN: + $output .= $this->getDwoo()->getPluginProxy()->getPreloader($plugin); + break; + default: + throw new Dwoo_Compilation_Exception($this, 'Type error for '.$plugin.' with type'.$type); + + } + } + + foreach ($this->templatePlugins as $function => $attr) { + if (isset($attr['called']) && $attr['called'] === true && !isset($attr['checked'])) { + $this->resolveSubTemplateDependencies($function); + } + } + foreach ($this->templatePlugins as $function) { + if (isset($function['called']) && $function['called'] === true) { + $output .= $function['body'].PHP_EOL; + } + } + + $output .= $compiled."\n?>"; + + $output = preg_replace('/(?\s*)<\?xml#is', '$1', $output); + + if ($this->debug) { + echo '
';
+			$lines = preg_split('{\r\n|\n|
}', highlight_string(($output), true)); + array_shift($lines); + foreach ($lines as $i=>$line) { + echo ($i+1).'. '.$line."\r\n"; + } + } + if ($this->debug) echo '
'; + + $this->template = $this->dwoo = null; + $tpl = null; + + return $output; + } + + /** + * checks what sub-templates are used in every sub-template so that we're sure they are all compiled + * + * @param string $function the sub-template name + */ + protected function resolveSubTemplateDependencies($function) + { + $body = $this->templatePlugins[$function]['body']; + foreach ($this->templatePlugins as $func => $attr) { + if ($func !== $function && !isset($attr['called']) && strpos($body, 'Dwoo_Plugin_'.$func) !== false) { + $this->templatePlugins[$func]['called'] = true; + $this->resolveSubTemplateDependencies($func); + } + } + $this->templatePlugins[$function]['checked'] = true; + } + + /** + * adds compiled content to the current block + * + * @param string $content the content to push + * @param int $lineCount newlines count in content, optional + */ + public function push($content, $lineCount = null) + { + if ($lineCount === null) { + $lineCount = substr_count($content, "\n"); + } + + if ($this->curBlock['buffer'] === null && count($this->stack) > 1) { + // buffer is not initialized yet (the block has just been created) + $this->stack[count($this->stack)-2]['buffer'] .= (string) $content; + $this->curBlock['buffer'] = ''; + } else { + if (!isset($this->curBlock['buffer'])) { + throw new Dwoo_Compilation_Exception($this, 'The template has been closed too early, you probably have an extra block-closing tag somewhere'); + } + // append current content to current block's buffer + $this->curBlock['buffer'] .= (string) $content; + } + $this->line += $lineCount; + } + + /** + * sets the scope + * + * set to null if the scope becomes "unstable" (i.e. too variable or unknown) so that + * variables are compiled in a more evaluative way than just $this->scope['key'] + * + * @param mixed $scope a string i.e. "level1.level2" or an array i.e. array("level1", "level2") + * @param bool $absolute if true, the scope is set from the top level scope and not from the current scope + * @return array the current scope tree + */ + public function setScope($scope, $absolute = false) + { + $old = $this->scopeTree; + + if ($scope===null) { + unset($this->scope); + $this->scope = null; + } + + if (is_array($scope)===false) { + $scope = explode('.', $scope); + } + + if ($absolute===true) { + $this->scope =& $this->data; + $this->scopeTree = array(); + } + + while (($bit = array_shift($scope)) !== null) { + if ($bit === '_parent' || $bit === '_') { + array_pop($this->scopeTree); + reset($this->scopeTree); + $this->scope =& $this->data; + $cnt = count($this->scopeTree); + for ($i=0;$i<$cnt;$i++) + $this->scope =& $this->scope[$this->scopeTree[$i]]; + } elseif ($bit === '_root' || $bit === '__') { + $this->scope =& $this->data; + $this->scopeTree = array(); + } elseif (isset($this->scope[$bit])) { + $this->scope =& $this->scope[$bit]; + $this->scopeTree[] = $bit; + } else { + $this->scope[$bit] = array(); + $this->scope =& $this->scope[$bit]; + $this->scopeTree[] = $bit; + } + } + + return $old; + } + + /** + * adds a block to the top of the block stack + * + * @param string $type block type (name) + * @param array $params the parameters array + * @param int $paramtype the parameters type (see mapParams), 0, 1 or 2 + * @return string the preProcessing() method's output + */ + public function addBlock($type, array $params, $paramtype) + { + $class = 'Dwoo_Plugin_'.$type; + if (class_exists($class, false) === false) { + $this->dwoo->getLoader()->loadPlugin($type); + } + + $params = $this->mapParams($params, array($class, 'init'), $paramtype); + + $this->stack[] = array('type' => $type, 'params' => $params, 'custom' => false, 'class' => $class, 'buffer' => null); + $this->curBlock =& $this->stack[count($this->stack)-1]; + return call_user_func(array($class,'preProcessing'), $this, $params, '', '', $type); + } + + /** + * adds a custom block to the top of the block stack + * + * @param string $type block type (name) + * @param array $params the parameters array + * @param int $paramtype the parameters type (see mapParams), 0, 1 or 2 + * @return string the preProcessing() method's output + */ + public function addCustomBlock($type, array $params, $paramtype) + { + $callback = $this->customPlugins[$type]['callback']; + if (is_array($callback)) { + $class = is_object($callback[0]) ? get_class($callback[0]) : $callback[0]; + } else { + $class = $callback; + } + + $params = $this->mapParams($params, array($class, 'init'), $paramtype); + + $this->stack[] = array('type' => $type, 'params' => $params, 'custom' => true, 'class' => $class, 'buffer' => null); + $this->curBlock =& $this->stack[count($this->stack)-1]; + return call_user_func(array($class,'preProcessing'), $this, $params, '', '', $type); + } + + /** + * injects a block at the top of the plugin stack without calling its preProcessing method + * + * used by {else} blocks to re-add themselves after having closed everything up to their parent + * + * @param string $type block type (name) + * @param array $params parameters array + */ + public function injectBlock($type, array $params) + { + $class = 'Dwoo_Plugin_'.$type; + if (class_exists($class, false) === false) { + $this->dwoo->getLoader()->loadPlugin($type); + } + $this->stack[] = array('type' => $type, 'params' => $params, 'custom' => false, 'class' => $class, 'buffer' => null); + $this->curBlock =& $this->stack[count($this->stack)-1]; + } + + /** + * removes the closest-to-top block of the given type and all other + * blocks encountered while going down the block stack + * + * @param string $type block type (name) + * @return string the output of all postProcessing() method's return values of the closed blocks + */ + public function removeBlock($type) + { + $output = ''; + + $pluginType = $this->getPluginType($type); + if ($pluginType & Dwoo::SMARTY_BLOCK) { + $type = 'smartyinterface'; + } + while (true) { + while ($top = array_pop($this->stack)) { + if ($top['custom']) { + $class = $top['class']; + } else { + $class = 'Dwoo_Plugin_'.$top['type']; + } + if (count($this->stack)) { + $this->curBlock =& $this->stack[count($this->stack)-1]; + $this->push(call_user_func(array($class, 'postProcessing'), $this, $top['params'], '', '', $top['buffer']), 0); + } else { + $null = null; + $this->curBlock =& $null; + $output = call_user_func(array($class, 'postProcessing'), $this, $top['params'], '', '', $top['buffer']); + } + + if ($top['type'] === $type) { + break 2; + } + } + + throw new Dwoo_Compilation_Exception($this, 'Syntax malformation, a block of type "'.$type.'" was closed but was not opened'); + break; + } + + return $output; + } + + /** + * returns a reference to the first block of the given type encountered and + * optionally closes all blocks until it finds it + * + * this is mainly used by {else} plugins to close everything that was opened + * between their parent and themselves + * + * @param string $type the block type (name) + * @param bool $closeAlong whether to close all blocks encountered while going down the block stack or not + * @return &array the array is as such: array('type'=>pluginName, 'params'=>parameter array, + * 'custom'=>bool defining whether it's a custom plugin or not, for internal use) + */ + public function &findBlock($type, $closeAlong = false) + { + if ($closeAlong===true) { + while ($b = end($this->stack)) { + if ($b['type']===$type) { + return $this->stack[key($this->stack)]; + } + $this->push($this->removeTopBlock(), 0); + } + } else { + end($this->stack); + while ($b = current($this->stack)) { + if ($b['type']===$type) { + return $this->stack[key($this->stack)]; + } + prev($this->stack); + } + } + + throw new Dwoo_Compilation_Exception($this, 'A parent block of type "'.$type.'" is required and can not be found'); + } + + /** + * returns a reference to the current block array + * + * @return &array the array is as such: array('type'=>pluginName, 'params'=>parameter array, + * 'custom'=>bool defining whether it's a custom plugin or not, for internal use) + */ + public function &getCurrentBlock() + { + return $this->curBlock; + } + + /** + * removes the block at the top of the stack and calls its postProcessing() method + * + * @return string the postProcessing() method's output + */ + public function removeTopBlock() + { + $o = array_pop($this->stack); + if ($o === null) { + throw new Dwoo_Compilation_Exception($this, 'Syntax malformation, a block of unknown type was closed but was not opened.'); + } + if ($o['custom']) { + $class = $o['class']; + } else { + $class = 'Dwoo_Plugin_'.$o['type']; + } + + $this->curBlock =& $this->stack[count($this->stack)-1]; + + return call_user_func(array($class, 'postProcessing'), $this, $o['params'], '', '', $o['buffer']); + } + + /** + * returns the compiled parameters (for example a variable's compiled parameter will be "$this->scope['key']") out of the given parameter array + * + * @param array $params parameter array + * @return array filtered parameters + */ + public function getCompiledParams(array $params) + { + foreach ($params as $k=>$p) { + if (is_array($p)) { + $params[$k] = $p[0]; + } + } + return $params; + } + + /** + * returns the real parameters (for example a variable's real parameter will be its key, etc) out of the given parameter array + * + * @param array $params parameter array + * @return array filtered parameters + */ + public function getRealParams(array $params) + { + foreach ($params as $k=>$p) { + if (is_array($p)) { + $params[$k] = $p[1]; + } + } + return $params; + } + + /** + * entry point of the parser, it redirects calls to other parse* functions + * + * @param string $in the string within which we must parse something + * @param int $from the starting offset of the parsed area + * @param int $to the ending offset of the parsed area + * @param mixed $parsingParams must be an array if we are parsing a function or modifier's parameters, or false by default + * @param string $curBlock the current parser-block being processed + * @param mixed $pointer a reference to a pointer that will be increased by the amount of characters parsed, or null by default + * @return string parsed values + */ + protected function parse($in, $from, $to, $parsingParams = false, $curBlock='', &$pointer = null) + { + if ($to === null) { + $to = strlen($in); + } + $first = substr($in, $from, 1); + + if ($first === false) { + throw new Dwoo_Compilation_Exception($this, 'Unexpected EOF, a template tag was not closed'); + } + + while ($first===" " || $first==="\n" || $first==="\t" || $first==="\r") { + if ($curBlock === 'root' && substr($in, $from, strlen($this->rd)) === $this->rd) { + // end template tag + $pointer += strlen($this->rd); + if ($this->debug) echo 'TEMPLATE PARSING ENDED
'; + return false; + } + $from++; + if ($pointer !== null) { + $pointer++; + } + if ($from >= $to) { + if (is_array($parsingParams)) { + return $parsingParams; + } else { + return ''; + } + } + $first = $in[$from]; + } + + $substr = substr($in, $from, $to-$from); + + if ($this->debug) echo '
PARSE CALL : PARSING "'.htmlentities(substr($in, $from, min($to-$from, 50))).(($to-$from) > 50 ? '...':'').'" @ '.$from.':'.$to.' in '.$curBlock.' : pointer='.$pointer.'
'; + $parsed = ""; + + if ($curBlock === 'root' && $first === '*') { + $src = $this->getTemplateSource(); + $startpos = $this->getPointer() - strlen($this->ld); + if (substr($src, $startpos, strlen($this->ld)) === $this->ld) { + if ($startpos > 0) { + do { + $char = substr($src, --$startpos, 1); + if ($char == "\n") { + $startpos++; + $whitespaceStart = true; + break; + } + } while ($startpos > 0 && ($char == ' ' || $char == "\t")); + } + + if (!isset($whitespaceStart)) { + $startpos = $this->getPointer(); + } else { + $pointer -= $this->getPointer() - $startpos; + } + + if ($this->allowNestedComments && strpos($src, $this->ld.'*', $this->getPointer()) !== false) { + $comOpen = $this->ld.'*'; + $comClose = '*'.$this->rd; + $level = 1; + $start = $startpos; + $ptr = $this->getPointer() + '*'; + + while ($level > 0 && $ptr < strlen($src)) { + $open = strpos($src, $comOpen, $ptr); + $close = strpos($src, $comClose, $ptr); + + if ($open !== false && $close !== false) { + if ($open < $close) { + $ptr = $open + strlen($comOpen); + $level++; + } else { + $ptr = $close + strlen($comClose); + $level--; + } + } elseif ($open !== false) { + $ptr = $open + strlen($comOpen); + $level++; + } elseif ($close !== false) { + $ptr = $close + strlen($comClose); + $level--; + } else { + $ptr = strlen($src); + } + } + $endpos = $ptr - strlen('*'.$this->rd); + } else { + $endpos = strpos($src, '*'.$this->rd, $startpos); + if ($endpos == false) { + throw new Dwoo_Compilation_Exception($this, 'Un-ended comment'); + } + } + $pointer += $endpos - $startpos + strlen('*'.$this->rd); + if (isset($whitespaceStart) && preg_match('#^[\t ]*\r?\n#', substr($src, $endpos+strlen('*'.$this->rd)), $m)) { + $pointer += strlen($m[0]); + $this->curBlock['buffer'] = substr($this->curBlock['buffer'], 0, strlen($this->curBlock['buffer']) - ($this->getPointer() - $startpos - strlen($this->ld))); + } + return false; + } + } + + if ($first==='$') { + // var + $out = $this->parseVar($in, $from, $to, $parsingParams, $curBlock, $pointer); + $parsed = 'var'; + } elseif ($first==='%' && preg_match('#^%[a-z]#i', $substr)) { + // const + $out = $this->parseConst($in, $from, $to, $parsingParams, $curBlock, $pointer); + } elseif ($first==='"' || $first==="'") { + // string + $out = $this->parseString($in, $from, $to, $parsingParams, $curBlock, $pointer); + } elseif (preg_match('/^[a-z][a-z0-9_]*(?:::[a-z][a-z0-9_]*)?('.(is_array($parsingParams)||$curBlock!='root'?'':'\s+[^(]|').'\s*\(|\s*'.$this->rdr.'|\s*;)/i', $substr)) { + // func + $out = $this->parseFunction($in, $from, $to, $parsingParams, $curBlock, $pointer); + $parsed = 'func'; + } elseif ($first === ';') { + // instruction end + if ($this->debug) echo 'END OF INSTRUCTION
'; + if ($pointer !== null) { + $pointer++; + } + return $this->parse($in, $from+1, $to, false, 'root', $pointer); + } elseif ($curBlock === 'root' && preg_match('#^/([a-z][a-z0-9_]*)?#i', $substr, $match)) { + // close block + if (!empty($match[1]) && $match[1] == 'else') { + throw new Dwoo_Compilation_Exception($this, 'Else blocks must not be closed explicitly, they are automatically closed when their parent block is closed'); + } + if (!empty($match[1]) && $match[1] == 'elseif') { + throw new Dwoo_Compilation_Exception($this, 'Elseif blocks must not be closed explicitly, they are automatically closed when their parent block is closed or a new else/elseif block is declared after them'); + } + if ($pointer !== null) { + $pointer += strlen($match[0]); + } + if (empty($match[1])) { + if ($this->curBlock['type'] == 'else' || $this->curBlock['type'] == 'elseif') { + $pointer -= strlen($match[0]); + } + if ($this->debug) echo 'TOP BLOCK CLOSED
'; + return $this->removeTopBlock(); + } else { + if ($this->debug) echo 'BLOCK OF TYPE '.$match[1].' CLOSED
'; + return $this->removeBlock($match[1]); + } + } elseif ($curBlock === 'root' && substr($substr, 0, strlen($this->rd)) === $this->rd) { + // end template tag + if ($this->debug) echo 'TAG PARSING ENDED
'; + $pointer += strlen($this->rd); + return false; + } elseif (is_array($parsingParams) && preg_match('#^([a-z0-9_]+\s*=)(?:\s+|[^=]).*#i', $substr, $match)) { + // named parameter + if ($this->debug) echo 'NAMED PARAM FOUND
'; + $len = strlen($match[1]); + while (substr($in, $from+$len, 1)===' ') { + $len++; + } + if ($pointer !== null) { + $pointer += $len; + } + + $output = array(trim(substr(trim($match[1]), 0, -1)), $this->parse($in, $from+$len, $to, false, 'namedparam', $pointer)); + + $parsingParams[] = $output; + return $parsingParams; + } elseif (preg_match('#^([a-z0-9_]+::\$[a-z0-9_]+)#i', $substr, $match)) { + // static member access + $parsed = 'var'; + if (is_array($parsingParams)) { + $parsingParams[] = array($match[1], $match[1]); + $out = $parsingParams; + } else { + $out = $match[1]; + } + $pointer += strlen($match[1]); + } elseif ($substr!=='' && (is_array($parsingParams) || $curBlock === 'namedparam' || $curBlock === 'condition' || $curBlock === 'expression')) { + // unquoted string, bool or number + $out = $this->parseOthers($in, $from, $to, $parsingParams, $curBlock, $pointer); + } else { + // parse error + throw new Dwoo_Compilation_Exception($this, 'Parse error in "'.substr($in, $from, $to-$from).'"'); + } + + if (empty($out)) { + return ''; + } + + $substr = substr($in, $pointer, $to-$pointer); + + // var parsed, check if any var-extension applies + if ($parsed==='var') { + if (preg_match('#^\s*([/%+*-])\s*([a-z0-9]|\$)#i', $substr, $match)) { + if($this->debug) echo 'PARSING POST-VAR EXPRESSION '.$substr.'
'; + // parse expressions + $pointer += strlen($match[0]) - 1; + if (is_array($parsingParams)) { + if ($match[2] == '$') { + $expr = $this->parseVar($in, $pointer, $to, array(), $curBlock, $pointer); + } else { + $expr = $this->parse($in, $pointer, $to, array(), 'expression', $pointer); + } + $out[count($out)-1][0] .= $match[1] . $expr[0][0]; + $out[count($out)-1][1] .= $match[1] . $expr[0][1]; + } else { + if ($match[2] == '$') { + $expr = $this->parseVar($in, $pointer, $to, false, $curBlock, $pointer); + } else { + $expr = $this->parse($in, $pointer, $to, false, 'expression', $pointer); + } + if (is_array($out) && is_array($expr)) { + $out[0] .= $match[1] . $expr[0]; + $out[1] .= $match[1] . $expr[1]; + } elseif (is_array($out)) { + $out[0] .= $match[1] . $expr; + $out[1] .= $match[1] . $expr; + } elseif (is_array($expr)) { + $out .= $match[1] . $expr[0]; + } else { + $out .= $match[1] . $expr; + } + } + } else if ($curBlock === 'root' && preg_match('#^(\s*(?:[+/*%-.]=|=|\+\+|--)\s*)(.*)#s', $substr, $match)) { + if($this->debug) echo 'PARSING POST-VAR ASSIGNMENT '.$substr.'
'; + // parse assignment + $value = $match[2]; + $operator = trim($match[1]); + if (substr($value, 0, 1) == '=') { + throw new Dwoo_Compilation_Exception($this, 'Unexpected "=" in '.$substr.''); + } + + if ($pointer !== null) { + $pointer += strlen($match[1]); + } + + if ($operator !== '++' && $operator !== '--') { + $parts = array(); + $ptr = 0; + $parts = $this->parse($value, 0, strlen($value), $parts, 'condition', $ptr); + $pointer += $ptr; + + // load if plugin + try { + $this->getPluginType('if'); + } catch (Dwoo_Exception $e) { + throw new Dwoo_Compilation_Exception($this, 'Assignments require the "if" plugin to be accessible'); + } + + $parts = $this->mapParams($parts, array('Dwoo_Plugin_if', 'init'), 1); + $parts = $this->getCompiledParams($parts); + + $value = Dwoo_Plugin_if::replaceKeywords($parts['*'], $this); + $echo = ''; + } else { + $value = array(); + $echo = 'echo '; + } + + if ($this->autoEscape) { + $out = preg_replace('#\(is_string\(\$tmp=(.+?)\) \? htmlspecialchars\(\$tmp, ENT_QUOTES, \$this->charset\) : \$tmp\)#', '$1', $out); + } + $out = Dwoo_Compiler::PHP_OPEN. $echo . $out . $operator . implode(' ', $value) . Dwoo_Compiler::PHP_CLOSE; + } + } + + if ($curBlock !== 'modifier' && ($parsed === 'func' || $parsed === 'var') && preg_match('#^\|@?[a-z0-9_]+(:.*)?#i', $substr, $match)) { + // parse modifier on funcs or vars + $srcPointer = $pointer; + if (is_array($parsingParams)) { + $tmp = $this->replaceModifiers(array(null, null, $out[count($out)-1][0], $match[0]), 'var', $pointer); + $out[count($out)-1][0] = $tmp; + $out[count($out)-1][1] .= substr($substr, $srcPointer, $srcPointer - $pointer); + } else { + $out = $this->replaceModifiers(array(null, null, $out, $match[0]), 'var', $pointer); + } + } + + // func parsed, check if any func-extension applies + if ($parsed==='func' && preg_match('#^->[a-z0-9_]+(\s*\(.+|->[a-z].*)?#is', $substr, $match)) { + // parse method call or property read + $ptr = 0; + + if (is_array($parsingParams)) { + $output = $this->parseMethodCall($out[count($out)-1][1], $match[0], $curBlock, $ptr); + + $out[count($out)-1][0] = $output; + $out[count($out)-1][1] .= substr($match[0], 0, $ptr); + } else { + $out = $this->parseMethodCall($out, $match[0], $curBlock, $ptr); + } + + $pointer += $ptr; + } + + if ($curBlock === 'root' && substr($out, 0, strlen(self::PHP_OPEN)) !== self::PHP_OPEN) { + return self::PHP_OPEN .'echo '.$out.';'. self::PHP_CLOSE; + } else { + return $out; + } + } + + /** + * parses a function call + * + * @param string $in the string within which we must parse something + * @param int $from the starting offset of the parsed area + * @param int $to the ending offset of the parsed area + * @param mixed $parsingParams must be an array if we are parsing a function or modifier's parameters, or false by default + * @param string $curBlock the current parser-block being processed + * @param mixed $pointer a reference to a pointer that will be increased by the amount of characters parsed, or null by default + * @return string parsed values + */ + protected function parseFunction($in, $from, $to, $parsingParams = false, $curBlock='', &$pointer = null) + { + $cmdstr = substr($in, $from, $to-$from); + preg_match('/^([a-z][a-z0-9_]*(?:::[a-z][a-z0-9_]*)?)(\s*'.$this->rdr.'|\s*;)?/i', $cmdstr, $match); + + if (empty($match[1])) { + throw new Dwoo_Compilation_Exception($this, 'Parse error, invalid function name : '.substr($cmdstr, 0, 15)); + } + + $func = $match[1]; + + if (!empty($match[2])) { + $cmdstr = $match[1]; + } + + if ($this->debug) echo 'FUNC FOUND ('.$func.')
'; + + $paramsep = ''; + + if (is_array($parsingParams) || $curBlock != 'root') { + $paramspos = strpos($cmdstr, '('); + $paramsep = ')'; + } elseif(preg_match_all('#[a-z0-9_]+(\s*\(|\s+[^(])#i', $cmdstr, $match, PREG_OFFSET_CAPTURE)) { + $paramspos = $match[1][0][1]; + $paramsep = substr($match[1][0][0], -1) === '(' ? ')':''; + if($paramsep === ')') { + $paramspos += strlen($match[1][0][0]) - 1; + if(substr($cmdstr, 0, 2) === 'if' || substr($cmdstr, 0, 6) === 'elseif') { + $paramsep = ''; + if(strlen($match[1][0][0]) > 1) { + $paramspos--; + } + } + } + } else { + $paramspos = false; + } + + $state = 0; + + if ($paramspos === false) { + $params = array(); + + if ($curBlock !== 'root') { + return $this->parseOthers($in, $from, $to, $parsingParams, $curBlock, $pointer); + } + } else { + if ($curBlock === 'condition') { + // load if plugin + $this->getPluginType('if'); + if (Dwoo_Plugin_if::replaceKeywords(array($func), $this) !== array($func)) { + return $this->parseOthers($in, $from, $to, $parsingParams, $curBlock, $pointer); + } + } + $whitespace = strlen(substr($cmdstr, strlen($func), $paramspos-strlen($func))); + $paramstr = substr($cmdstr, $paramspos+1); + if (substr($paramstr, -1, 1) === $paramsep) { + $paramstr = substr($paramstr, 0, -1); + } + + if (strlen($paramstr)===0) { + $params = array(); + $paramstr = ''; + } else { + $ptr = 0; + $params = array(); + if ($func === 'empty') { + $params = $this->parseVar($paramstr, $ptr, strlen($paramstr), $params, 'root', $ptr); + } else { + while ($ptr < strlen($paramstr)) { + while (true) { + if ($ptr >= strlen($paramstr)) { + break 2; + } + + if ($func !== 'if' && $func !== 'elseif' && $paramstr[$ptr] === ')') { + if ($this->debug) echo 'PARAM PARSING ENDED, ")" FOUND, POINTER AT '.$ptr.'
'; + break 2; + } elseif ($paramstr[$ptr] === ';') { + $ptr++; + if ($this->debug) echo 'PARAM PARSING ENDED, ";" FOUND, POINTER AT '.$ptr.'
'; + break 2; + } elseif ($func !== 'if' && $func !== 'elseif' && $paramstr[$ptr] === '/') { + if ($this->debug) echo 'PARAM PARSING ENDED, "/" FOUND, POINTER AT '.$ptr.'
'; + break 2; + } elseif (substr($paramstr, $ptr, strlen($this->rd)) === $this->rd) { + if ($this->debug) echo 'PARAM PARSING ENDED, RIGHT DELIMITER FOUND, POINTER AT '.$ptr.'
'; + break 2; + } + + if ($paramstr[$ptr] === ' ' || $paramstr[$ptr] === ',' || $paramstr[$ptr] === "\r" || $paramstr[$ptr] === "\n" || $paramstr[$ptr] === "\t") { + $ptr++; + } else { + break; + } + } + + if ($this->debug) echo 'FUNC START PARAM PARSING WITH POINTER AT '.$ptr.'
'; + + if ($func === 'if' || $func === 'elseif' || $func === 'tif') { + $params = $this->parse($paramstr, $ptr, strlen($paramstr), $params, 'condition', $ptr); + } else { + $params = $this->parse($paramstr, $ptr, strlen($paramstr), $params, 'function', $ptr); + } + + if ($this->debug) echo 'PARAM PARSED, POINTER AT '.$ptr.' ('.substr($paramstr, $ptr-1, 3).')
'; + } + } + $paramstr = substr($paramstr, 0, $ptr); + $state = 0; + foreach ($params as $k=>$p) { + if (is_array($p) && is_array($p[1])) { + $state |= 2; + } else { + if (($state & 2) && preg_match('#^(["\'])(.+?)\1$#', $p[0], $m)) { + $params[$k] = array($m[2], array('true', 'true')); + } else { + if ($state & 2) { + throw new Dwoo_Compilation_Exception($this, 'You can not use an unnamed parameter after a named one'); + } + $state |= 1; + } + } + } + } + } + + if ($pointer !== null) { + $pointer += (isset($paramstr) ? strlen($paramstr) : 0) + (')' === $paramsep ? 2 : ($paramspos === false ? 0 : 1)) + strlen($func) + (isset($whitespace) ? $whitespace : 0); + if ($this->debug) echo 'FUNC ADDS '.((isset($paramstr) ? strlen($paramstr) : 0) + (')' === $paramsep ? 2 : ($paramspos === false ? 0 : 1)) + strlen($func)).' TO POINTER
'; + } + + if ($curBlock === 'method' || $func === 'do' || strstr($func, '::') !== false) { + $pluginType = Dwoo::NATIVE_PLUGIN; + } else { + $pluginType = $this->getPluginType($func); + } + + // blocks + if ($pluginType & Dwoo::BLOCK_PLUGIN) { + if ($curBlock !== 'root' || is_array($parsingParams)) { + throw new Dwoo_Compilation_Exception($this, 'Block plugins can not be used as other plugin\'s arguments'); + } + if ($pluginType & Dwoo::CUSTOM_PLUGIN) { + return $this->addCustomBlock($func, $params, $state); + } else { + return $this->addBlock($func, $params, $state); + } + } elseif ($pluginType & Dwoo::SMARTY_BLOCK) { + if ($curBlock !== 'root' || is_array($parsingParams)) { + throw new Dwoo_Compilation_Exception($this, 'Block plugins can not be used as other plugin\'s arguments'); + } + + if ($state & 2) { + array_unshift($params, array('__functype', array($pluginType, $pluginType))); + array_unshift($params, array('__funcname', array($func, $func))); + } else { + array_unshift($params, array($pluginType, $pluginType)); + array_unshift($params, array($func, $func)); + } + + return $this->addBlock('smartyinterface', $params, $state); + } + + // funcs + if ($pluginType & Dwoo::NATIVE_PLUGIN || $pluginType & Dwoo::SMARTY_FUNCTION || $pluginType & Dwoo::SMARTY_BLOCK) { + $params = $this->mapParams($params, null, $state); + } elseif ($pluginType & Dwoo::CLASS_PLUGIN) { + if ($pluginType & Dwoo::CUSTOM_PLUGIN) { + $params = $this->mapParams($params, array($this->customPlugins[$func]['class'], $this->customPlugins[$func]['function']), $state); + } else { + $params = $this->mapParams($params, array('Dwoo_Plugin_'.$func, ($pluginType & Dwoo::COMPILABLE_PLUGIN) ? 'compile' : 'process'), $state); + } + } elseif ($pluginType & Dwoo::FUNC_PLUGIN) { + if ($pluginType & Dwoo::CUSTOM_PLUGIN) { + $params = $this->mapParams($params, $this->customPlugins[$func]['callback'], $state); + } else { + $params = $this->mapParams($params, 'Dwoo_Plugin_'.$func.(($pluginType & Dwoo::COMPILABLE_PLUGIN) ? '_compile' : ''), $state); + } + } elseif ($pluginType & Dwoo::SMARTY_MODIFIER) { + $output = 'smarty_modifier_'.$func.'('.implode(', ', $params).')'; + } elseif ($pluginType & Dwoo::PROXY_PLUGIN) { + $params = $this->mapParams($params, $this->getDwoo()->getPluginProxy()->getCallback($func), $state); + } elseif ($pluginType & Dwoo::TEMPLATE_PLUGIN) { + // transforms the parameter array from (x=>array('paramname'=>array(values))) to (paramname=>array(values)) + $map = array(); + foreach ($this->templatePlugins[$func]['params'] as $param=>$defValue) { + if ($param == 'rest') { + $param = '*'; + } + $hasDefault = $defValue !== null; + if ($defValue === 'null') { + $defValue = null; + } elseif ($defValue === 'false') { + $defValue = false; + } elseif ($defValue === 'true') { + $defValue = true; + } elseif (preg_match('#^([\'"]).*?\1$#', $defValue)) { + $defValue = substr($defValue, 1, -1); + } + $map[] = array($param, $hasDefault, $defValue); + } + + $params = $this->mapParams($params, null, $state, $map); + } + + // only keep php-syntax-safe values for non-block plugins + foreach ($params as &$p) { + $p = $p[0]; + } + if ($pluginType & Dwoo::NATIVE_PLUGIN) { + if ($func === 'do') { + if (isset($params['*'])) { + $output = implode(';', $params['*']).';'; + } else { + $output = ''; + } + + if (is_array($parsingParams) || $curBlock !== 'root') { + throw new Dwoo_Compilation_Exception($this, 'Do can not be used inside another function or block'); + } else { + return self::PHP_OPEN.$output.self::PHP_CLOSE; + } + } else { + if (isset($params['*'])) { + $output = $func.'('.implode(', ', $params['*']).')'; + } else { + $output = $func.'()'; + } + } + } elseif ($pluginType & Dwoo::FUNC_PLUGIN) { + if ($pluginType & Dwoo::COMPILABLE_PLUGIN) { + if ($pluginType & Dwoo::CUSTOM_PLUGIN) { + $funcCompiler = $this->customPlugins[$func]['callback']; + } else { + $funcCompiler = 'Dwoo_Plugin_'.$func.'_compile'; + } + array_unshift($params, $this); + $output = call_user_func_array($funcCompiler, $params); + } else { + array_unshift($params, '$this'); + $params = self::implode_r($params); + + if ($pluginType & Dwoo::CUSTOM_PLUGIN) { + $callback = $this->customPlugins[$func]['callback']; + $output = 'call_user_func(\''.$callback.'\', '.$params.')'; + } else { + $output = 'Dwoo_Plugin_'.$func.'('.$params.')'; + } + } + } elseif ($pluginType & Dwoo::CLASS_PLUGIN) { + if ($pluginType & Dwoo::COMPILABLE_PLUGIN) { + if ($pluginType & Dwoo::CUSTOM_PLUGIN) { + $callback = $this->customPlugins[$func]['callback']; + if (!is_array($callback)) { + if (!method_exists($callback, 'compile')) { + throw new Dwoo_Exception('Custom plugin '.$func.' must implement the "compile" method to be compilable, or you should provide a full callback to the method to use'); + } + if (($ref = new ReflectionMethod($callback, 'compile')) && $ref->isStatic()) { + $funcCompiler = array($callback, 'compile'); + } else { + $funcCompiler = array(new $callback, 'compile'); + } + } else { + $funcCompiler = $callback; + } + } else { + $funcCompiler = array('Dwoo_Plugin_'.$func, 'compile'); + array_unshift($params, $this); + } + $output = call_user_func_array($funcCompiler, $params); + } else { + $params = self::implode_r($params); + if ($pluginType & Dwoo::CUSTOM_PLUGIN) { + $callback = $this->customPlugins[$func]['callback']; + if (!is_array($callback)) { + if (!method_exists($callback, 'process')) { + throw new Dwoo_Exception('Custom plugin '.$func.' must implement the "process" method to be usable, or you should provide a full callback to the method to use'); + } + if (($ref = new ReflectionMethod($callback, 'process')) && $ref->isStatic()) { + $output = 'call_user_func(array(\''.$callback.'\', \'process\'), '.$params.')'; + } else { + $output = 'call_user_func(array($this->getObjectPlugin(\''.$callback.'\'), \'process\'), '.$params.')'; + } + } elseif (is_object($callback[0])) { + $output = 'call_user_func(array($this->plugins[\''.$func.'\'][\'callback\'][0], \''.$callback[1].'\'), '.$params.')'; + } elseif (($ref = new ReflectionMethod($callback[0], $callback[1])) && $ref->isStatic()) { + $output = 'call_user_func(array(\''.$callback[0].'\', \''.$callback[1].'\'), '.$params.')'; + } else { + $output = 'call_user_func(array($this->getObjectPlugin(\''.$callback[0].'\'), \''.$callback[1].'\'), '.$params.')'; + } + if (empty($params)) { + $output = substr($output, 0, -3).')'; + } + } else { + $output = '$this->classCall(\''.$func.'\', array('.$params.'))'; + } + } + } elseif ($pluginType & Dwoo::PROXY_PLUGIN) { + $output = call_user_func(array($this->dwoo->getPluginProxy(), 'getCode'), $func, $params); + } elseif ($pluginType & Dwoo::SMARTY_FUNCTION) { + if (isset($params['*'])) { + $params = self::implode_r($params['*'], true); + } else { + $params = ''; + } + + if ($pluginType & Dwoo::CUSTOM_PLUGIN) { + $callback = $this->customPlugins[$func]['callback']; + if (is_array($callback)) { + if (is_object($callback[0])) { + $output = 'call_user_func_array(array($this->plugins[\''.$func.'\'][\'callback\'][0], \''.$callback[1].'\'), array(array('.$params.'), $this))'; + } else { + $output = 'call_user_func_array(array(\''.$callback[0].'\', \''.$callback[1].'\'), array(array('.$params.'), $this))'; + } + } else { + $output = $callback.'(array('.$params.'), $this)'; + } + } else { + $output = 'smarty_function_'.$func.'(array('.$params.'), $this)'; + } + } elseif ($pluginType & Dwoo::TEMPLATE_PLUGIN) { + array_unshift($params, '$this'); + $params = self::implode_r($params); + $output = 'Dwoo_Plugin_'.$func.'_'.$this->templatePlugins[$func]['uuid'].'('.$params.')'; + $this->templatePlugins[$func]['called'] = true; + } + + if (is_array($parsingParams)) { + $parsingParams[] = array($output, $output); + return $parsingParams; + } elseif ($curBlock === 'namedparam') { + return array($output, $output); + } else { + return $output; + } + } + + /** + * parses a string + * + * @param string $in the string within which we must parse something + * @param int $from the starting offset of the parsed area + * @param int $to the ending offset of the parsed area + * @param mixed $parsingParams must be an array if we are parsing a function or modifier's parameters, or false by default + * @param string $curBlock the current parser-block being processed + * @param mixed $pointer a reference to a pointer that will be increased by the amount of characters parsed, or null by default + * @return string parsed values + */ + protected function parseString($in, $from, $to, $parsingParams = false, $curBlock='', &$pointer = null) + { + $substr = substr($in, $from, $to-$from); + $first = $substr[0]; + + if ($this->debug) echo 'STRING FOUND (in '.htmlentities(substr($in, $from, min($to-$from, 50))).(($to-$from) > 50 ? '...':'').')
'; + $strend = false; + $o = $from+1; + while ($strend === false) { + $strend = strpos($in, $first, $o); + if ($strend === false) { + throw new Dwoo_Compilation_Exception($this, 'Unfinished string, started with '.substr($in, $from, $to-$from)); + } + if (substr($in, $strend-1, 1) === '\\') { + $o = $strend+1; + $strend = false; + } + } + if ($this->debug) echo 'STRING DELIMITED: '.substr($in, $from, $strend+1-$from).'
'; + + $srcOutput = substr($in, $from, $strend+1-$from); + + if ($pointer !== null) { + $pointer += strlen($srcOutput); + } + + $output = $this->replaceStringVars($srcOutput, $first); + + // handle modifiers + if ($curBlock !== 'modifier' && preg_match('#^((?:\|(?:@?[a-z0-9_]+(?::.*)*))+)#i', substr($substr, $strend+1-$from), $match)) { + $modstr = $match[1]; + + if ($curBlock === 'root' && substr($modstr, -1) === '}') { + $modstr = substr($modstr, 0, -1); + } + $modstr = str_replace('\\'.$first, $first, $modstr); + $ptr = 0; + $output = $this->replaceModifiers(array(null, null, $output, $modstr), 'string', $ptr); + + $strend += $ptr; + if ($pointer !== null) { + $pointer += $ptr; + } + $srcOutput .= substr($substr, $strend+1-$from, $ptr); + } + + if (is_array($parsingParams)) { + $parsingParams[] = array($output, substr($srcOutput, 1, -1)); + return $parsingParams; + } elseif ($curBlock === 'namedparam') { + return array($output, substr($srcOutput, 1, -1)); + } else { + return $output; + } + } + + /** + * parses a constant + * + * @param string $in the string within which we must parse something + * @param int $from the starting offset of the parsed area + * @param int $to the ending offset of the parsed area + * @param mixed $parsingParams must be an array if we are parsing a function or modifier's parameters, or false by default + * @param string $curBlock the current parser-block being processed + * @param mixed $pointer a reference to a pointer that will be increased by the amount of characters parsed, or null by default + * @return string parsed values + */ + protected function parseConst($in, $from, $to, $parsingParams = false, $curBlock='', &$pointer = null) + { + $substr = substr($in, $from, $to-$from); + + if ($this->debug) { + echo 'CONST FOUND : '.$substr.'
'; + } + + if (!preg_match('#^%([a-z0-9_:]+)#i', $substr, $m)) { + throw new Dwoo_Compilation_Exception($this, 'Invalid constant'); + } + + if ($pointer !== null) { + $pointer += strlen($m[0]); + } + + $output = $this->parseConstKey($m[1], $curBlock); + + if (is_array($parsingParams)) { + $parsingParams[] = array($output, $m[1]); + return $parsingParams; + } elseif ($curBlock === 'namedparam') { + return array($output, $m[1]); + } else { + return $output; + } + } + + /** + * parses a constant + * + * @param string $key the constant to parse + * @param string $curBlock the current parser-block being processed + * @return string parsed constant + */ + protected function parseConstKey($key, $curBlock) + { + if ($this->securityPolicy !== null && $this->securityPolicy->getConstantHandling() === Dwoo_Security_Policy::CONST_DISALLOW) { + return 'null'; + } + + if ($curBlock !== 'root') { + $output = '(defined("'.$key.'") ? '.$key.' : null)'; + } else { + $output = $key; + } + + return $output; + } + + /** + * parses a variable + * + * @param string $in the string within which we must parse something + * @param int $from the starting offset of the parsed area + * @param int $to the ending offset of the parsed area + * @param mixed $parsingParams must be an array if we are parsing a function or modifier's parameters, or false by default + * @param string $curBlock the current parser-block being processed + * @param mixed $pointer a reference to a pointer that will be increased by the amount of characters parsed, or null by default + * @return string parsed values + */ + protected function parseVar($in, $from, $to, $parsingParams = false, $curBlock='', &$pointer = null) + { + $substr = substr($in, $from, $to-$from); + + if (preg_match('#(\$?\.?[a-z0-9_:]*(?:(?:(?:\.|->)(?:[a-z0-9_:]+|(?R))|\[(?:[a-z0-9_:]+|(?R)|(["\'])[^\2]*?\2)\]))*)' . // var key + ($curBlock==='root' || $curBlock==='function' || $curBlock==='namedparam' || $curBlock==='condition' || $curBlock==='variable' || $curBlock==='expression' ? '(\(.*)?' : '()') . // method call + ($curBlock==='root' || $curBlock==='function' || $curBlock==='namedparam' || $curBlock==='condition' || $curBlock==='variable' || $curBlock==='delimited_string' ? '((?:(?:[+/*%=-])(?:(?_:-]+(?:\([^)]*\))?|(?'))); + $key = substr($match[1], 1, strrpos($match[1], '->')-1); + $methodCall = substr($match[1], strrpos($match[1], '->')) . $match[3]; + } + + if ($hasModifiers) { + $matchedLength -= strlen($match[5]); + } + + if ($pointer !== null) { + $pointer += $matchedLength; + } + + // replace useless brackets by dot accessed vars + $key = preg_replace('#\[([^$%\[.>-]+)\]#', '.$1', $key); + + // prevent $foo->$bar calls because it doesn't seem worth the trouble + if (strpos($key, '->$') !== false) { + throw new Dwoo_Compilation_Exception($this, 'You can not access an object\'s property using a variable name.'); + } + + if ($this->debug) { + if ($hasMethodCall) { + echo 'METHOD CALL FOUND : $'.$key.substr($methodCall, 0, 30).'
'; + } else { + echo 'VAR FOUND : $'.$key.'
'; + } + } + + $key = str_replace('"', '\\"', $key); + + $cnt=substr_count($key, '$'); + if ($cnt > 0) { + $uid = 0; + $parsed = array($uid => ''); + $current =& $parsed; + $curTxt =& $parsed[$uid++]; + $tree = array(); + $chars = str_split($key, 1); + $inSplittedVar = false; + $bracketCount = 0; + + while (($char = array_shift($chars)) !== null) { + if ($char === '[') { + if (count($tree) > 0) { + $bracketCount++; + } else { + $tree[] =& $current; + $current[$uid] = array($uid+1 => ''); + $current =& $current[$uid++]; + $curTxt =& $current[$uid++]; + continue; + } + } elseif ($char === ']') { + if ($bracketCount > 0) { + $bracketCount--; + } else { + $current =& $tree[count($tree)-1]; + array_pop($tree); + if (current($chars) !== '[' && current($chars) !== false && current($chars) !== ']') { + $current[$uid] = ''; + $curTxt =& $current[$uid++]; + } + continue; + } + } elseif ($char === '$') { + if (count($tree) == 0) { + $curTxt =& $current[$uid++]; + $inSplittedVar = true; + } + } elseif (($char === '.' || $char === '-') && count($tree) == 0 && $inSplittedVar) { + $curTxt =& $current[$uid++]; + $inSplittedVar = false; + } + + $curTxt .= $char; + } + unset($uid, $current, $curTxt, $tree, $chars); + + if ($this->debug) echo 'RECURSIVE VAR REPLACEMENT : '.$key.'
'; + + $key = $this->flattenVarTree($parsed); + + if ($this->debug) echo 'RECURSIVE VAR REPLACEMENT DONE : '.$key.'
'; + + $output = preg_replace('#(^""\.|""\.|\.""$|(\()""\.|\.""(\)))#', '$2$3', '$this->readVar("'.$key.'")'); + } else { + $output = $this->parseVarKey($key, $hasModifiers ? 'modifier' : $curBlock); + } + + // methods + if ($hasMethodCall) { + $ptr = 0; + + $output = $this->parseMethodCall($output, $methodCall, $curBlock, $ptr); + + if ($pointer !== null) { + $pointer += $ptr; + } + $matchedLength += $ptr; + } + + if ($hasExpression) { + // expressions + preg_match_all('#(?:([+/*%=-])(=?-?[%$][a-z0-9.[\]>_:-]+(?:\([^)]*\))?|=?-?[0-9.,]+|\1))#i', $match[4], $expMatch); + + foreach ($expMatch[1] as $k=>$operator) { + if (substr($expMatch[2][$k], 0, 1)==='=') { + $assign = true; + if ($operator === '=') { + throw new Dwoo_Compilation_Exception($this, 'Invalid expression '.$substr.', can not use "==" in expressions'); + } + if ($curBlock !== 'root') { + throw new Dwoo_Compilation_Exception($this, 'Invalid expression '.$substr.', assignments can only be used in top level expressions like {$foo+=3} or {$foo="bar"}'); + } + $operator .= '='; + $expMatch[2][$k] = substr($expMatch[2][$k], 1); + } + + if (substr($expMatch[2][$k], 0, 1)==='-' && strlen($expMatch[2][$k]) > 1) { + $operator .= '-'; + $expMatch[2][$k] = substr($expMatch[2][$k], 1); + } + if (($operator==='+'||$operator==='-') && $expMatch[2][$k]===$operator) { + $output = '('.$output.$operator.$operator.')'; + break; + } elseif (substr($expMatch[2][$k], 0, 1) === '$') { + $output = '('.$output.' '.$operator.' '.$this->parseVar($expMatch[2][$k], 0, strlen($expMatch[2][$k]), false, 'expression').')'; + } elseif (substr($expMatch[2][$k], 0, 1) === '%') { + $output = '('.$output.' '.$operator.' '.$this->parseConst($expMatch[2][$k], 0, strlen($expMatch[2][$k]), false, 'expression').')'; + } elseif (!empty($expMatch[2][$k])) { + $output = '('.$output.' '.$operator.' '.str_replace(',', '.', $expMatch[2][$k]).')'; + } else { + throw new Dwoo_Compilation_Exception($this, 'Unfinished expression '.$substr.', missing var or number after math operator'); + } + } + } + + if ($this->autoEscape === true) { + $output = '(is_string($tmp='.$output.') ? htmlspecialchars($tmp, ENT_QUOTES, $this->charset) : $tmp)'; + } + + // handle modifiers + if ($curBlock !== 'modifier' && $hasModifiers) { + $ptr = 0; + $output = $this->replaceModifiers(array(null, null, $output, $match[5]), 'var', $ptr); + if ($pointer !== null) { + $pointer += $ptr; + } + $matchedLength += $ptr; + } + + if (is_array($parsingParams)) { + $parsingParams[] = array($output, $key); + return $parsingParams; + } elseif ($curBlock === 'namedparam') { + return array($output, $key); + } elseif ($curBlock === 'string' || $curBlock === 'delimited_string') { + return array($matchedLength, $output); + } elseif ($curBlock === 'expression' || $curBlock === 'variable') { + return $output; + } elseif (isset($assign)) { + return self::PHP_OPEN.$output.';'.self::PHP_CLOSE; + } else { + return $output; + } + } else { + if ($curBlock === 'string' || $curBlock === 'delimited_string') { + return array(0, ''); + } else { + throw new Dwoo_Compilation_Exception($this, 'Invalid variable name '.$substr.''); + } + } + } + + /** + * parses any number of chained method calls/property reads + * + * @param string $output the variable or whatever upon which the method are called + * @param string $methodCall method call source, starting at "->" + * @param string $curBlock the current parser-block being processed + * @param int $pointer a reference to a pointer that will be increased by the amount of characters parsed + * @return string parsed call(s)/read(s) + */ + protected function parseMethodCall($output, $methodCall, $curBlock, &$pointer) + { + $ptr = 0; + $len = strlen($methodCall); + + while ($ptr < $len) { + if (strpos($methodCall, '->', $ptr) === $ptr) { + $ptr += 2; + } + + if (in_array($methodCall[$ptr], array(';', '/', ' ', "\t", "\r", "\n", ')', '+', '*', '%', '=', '-', '|')) || substr($methodCall, $ptr, strlen($this->rd)) === $this->rd) { + // break char found + break; + } + + if(!preg_match('/^([a-z0-9_]+)(\(.*?\))?/i', substr($methodCall, $ptr), $methMatch)) { + throw new Dwoo_Compilation_Exception($this, 'Invalid method name : '.substr($methodCall, $ptr, 20)); + } + + if (empty($methMatch[2])) { + // property + if ($curBlock === 'root') { + $output .= '->'.$methMatch[1]; + } else { + $output = '(($tmp = '.$output.') ? $tmp->'.$methMatch[1].' : null)'; + } + $ptr += strlen($methMatch[1]); + } else { + // method + if (substr($methMatch[2], 0, 2) === '()') { + $parsedCall = '->'.$methMatch[1].'()'; + $ptr += strlen($methMatch[1]) + 2; + } else { + $parsedCall = '->'.$this->parseFunction($methodCall, $ptr, strlen($methodCall), false, 'method', $ptr); + } + if ($curBlock === 'root') { + $output .= $parsedCall; + } else { + $output = '(($tmp = '.$output.') ? $tmp'.$parsedCall.' : null)'; + } + } + } + + $pointer += $ptr; + return $output; + } + + /** + * parses a constant variable (a variable that doesn't contain another variable) and preprocesses it to save runtime processing time + * + * @param string $key the variable to parse + * @param string $curBlock the current parser-block being processed + * @return string parsed variable + */ + protected function parseVarKey($key, $curBlock) + { + if ($key === '') { + return '$this->scope'; + } + if (substr($key, 0, 1) === '.') { + $key = 'dwoo'.$key; + } + if (preg_match('#dwoo\.(get|post|server|cookies|session|env|request)((?:\.[a-z0-9_-]+)+)#i', $key, $m)) { + $global = strtoupper($m[1]); + if ($global === 'COOKIES') { + $global = 'COOKIE'; + } + $key = '$_'.$global; + foreach (explode('.', ltrim($m[2], '.')) as $part) + $key .= '['.var_export($part, true).']'; + if ($curBlock === 'root') { + $output = $key; + } else { + $output = '(isset('.$key.')?'.$key.':null)'; + } + } elseif (preg_match('#dwoo\.const\.([a-z0-9_:]+)#i', $key, $m)) { + return $this->parseConstKey($m[1], $curBlock); + } elseif ($this->scope !== null) { + if (strstr($key, '.') === false && strstr($key, '[') === false && strstr($key, '->') === false) { + if ($key === 'dwoo') { + $output = '$this->globals'; + } elseif ($key === '_root' || $key === '__') { + $output = '$this->data'; + } elseif ($key === '_parent' || $key === '_') { + $output = '$this->readParentVar(1)'; + } elseif ($key === '_key') { + $output = '$tmp_key'; + } else { + if ($curBlock === 'root') { + $output = '$this->scope["'.$key.'"]'; + } else { + $output = '(isset($this->scope["'.$key.'"]) ? $this->scope["'.$key.'"] : null)'; + } + } + } else { + preg_match_all('#(\[|->|\.)?((?:[a-z0-9_]|-(?!>))+|(\\\?[\'"])[^\3]*?\3)\]?#i', $key, $m); + + $i = $m[2][0]; + if ($i === '_parent' || $i === '_') { + $parentCnt = 0; + + while (true) { + $parentCnt++; + array_shift($m[2]); + array_shift($m[1]); + if (current($m[2]) === '_parent') { + continue; + } + break; + } + + $output = '$this->readParentVar('.$parentCnt.')'; + } else { + if ($i === 'dwoo') { + $output = '$this->globals'; + array_shift($m[2]); + array_shift($m[1]); + } elseif ($i === '_root' || $i === '__') { + $output = '$this->data'; + array_shift($m[2]); + array_shift($m[1]); + } elseif ($i === '_key') { + $output = '$tmp_key'; + } else { + $output = '$this->scope'; + } + + while (count($m[1]) && $m[1][0] !== '->') { + $m[2][0] = preg_replace('/(^\\\([\'"])|\\\([\'"])$)/x', '$2$3', $m[2][0]); + if(substr($m[2][0], 0, 1) == '"' || substr($m[2][0], 0, 1) == "'") { + $output .= '['.$m[2][0].']'; + } else { + $output .= '["'.$m[2][0].'"]'; + } + array_shift($m[2]); + array_shift($m[1]); + } + + if ($curBlock !== 'root') { + $output = '(isset('.$output.') ? '.$output.':null)'; + } + } + + if (count($m[2])) { + unset($m[0]); + $output = '$this->readVarInto('.str_replace("\n", '', var_export($m, true)).', '.$output.', '.($curBlock == 'root' ? 'false': 'true').')'; + } + } + } else { + preg_match_all('#(\[|->|\.)?((?:[a-z0-9_]|-(?!>))+)\]?#i', $key, $m); + unset($m[0]); + $output = '$this->readVar('.str_replace("\n", '', var_export($m, true)).')'; + } + + return $output; + } + + /** + * flattens a variable tree, this helps in parsing very complex variables such as $var.foo[$foo.bar->baz].baz, + * it computes the contents of the brackets first and works out from there + * + * @param array $tree the variable tree parsed by he parseVar() method that must be flattened + * @param bool $recursed leave that to false by default, it is only for internal use + * @return string flattened tree + */ + protected function flattenVarTree(array $tree, $recursed=false) + { + $out = $recursed ? '".$this->readVarInto(' : ''; + foreach ($tree as $bit) { + if (is_array($bit)) { + $out.='.'.$this->flattenVarTree($bit, false); + } else { + $key = str_replace('"', '\\"', $bit); + + if (substr($key, 0, 1)==='$') { + $out .= '".'.$this->parseVar($key, 0, strlen($key), false, 'variable').'."'; + } else { + $cnt = substr_count($key, '$'); + + if ($this->debug) echo 'PARSING SUBVARS IN : '.$key.'
'; + if ($cnt > 0) { + while (--$cnt >= 0) { + if (isset($last)) { + $last = strrpos($key, '$', - (strlen($key) - $last + 1)); + } else { + $last = strrpos($key, '$'); + } + preg_match('#\$[a-z0-9_]+((?:(?:\.|->)(?:[a-z0-9_]+|(?R))|\[(?:[a-z0-9_]+|(?R))\]))*'. + '((?:(?:[+/*%-])(?:\$[a-z0-9.[\]>_:-]+(?:\([^)]*\))?|[0-9.,]*))*)#i', substr($key, $last), $submatch); + + $len = strlen($submatch[0]); + $key = substr_replace( + $key, + preg_replace_callback( + '#(\$[a-z0-9_]+((?:(?:\.|->)(?:[a-z0-9_]+|(?R))|\[(?:[a-z0-9_]+|(?R))\]))*)'. + '((?:(?:[+/*%-])(?:\$[a-z0-9.[\]>_:-]+(?:\([^)]*\))?|[0-9.,]*))*)#i', + array($this, 'replaceVarKeyHelper'), substr($key, $last, $len) + ), + $last, + $len + ); + if ($this->debug) echo 'RECURSIVE VAR REPLACEMENT DONE : '.$key.'
'; + } + unset($last); + + $out .= $key; + } else { + $out .= $key; + } + } + } + } + $out .= $recursed ? ', true)."' : ''; + return $out; + } + + /** + * helper function that parses a variable + * + * @param array $match the matched variable, array(1=>"string match") + * @return string parsed variable + */ + protected function replaceVarKeyHelper($match) + { + return '".'.$this->parseVar($match[0], 0, strlen($match[0]), false, 'variable').'."'; + } + + /** + * parses various constants, operators or non-quoted strings + * + * @param string $in the string within which we must parse something + * @param int $from the starting offset of the parsed area + * @param int $to the ending offset of the parsed area + * @param mixed $parsingParams must be an array if we are parsing a function or modifier's parameters, or false by default + * @param string $curBlock the current parser-block being processed + * @param mixed $pointer a reference to a pointer that will be increased by the amount of characters parsed, or null by default + * @return string parsed values + */ + protected function parseOthers($in, $from, $to, $parsingParams = false, $curBlock='', &$pointer = null) + { + $first = $in[$from]; + $substr = substr($in, $from, $to-$from); + + $end = strlen($substr); + + if ($curBlock === 'condition') { + $breakChars = array('(', ')', ' ', '||', '&&', '|', '&', '>=', '<=', '===', '==', '=', '!==', '!=', '<<', '<', '>>', '>', '^', '~', ',', '+', '-', '*', '/', '%', '!', '?', ':', $this->rd, ';'); + } elseif ($curBlock === 'modifier') { + $breakChars = array(' ', ',', ')', ':', '|', "\r", "\n", "\t", ";", $this->rd); + } elseif ($curBlock === 'expression') { + $breakChars = array('/', '%', '+', '-', '*', ' ', ',', ')', "\r", "\n", "\t", ";", $this->rd); + } else { + $breakChars = array(' ', ',', ')', "\r", "\n", "\t", ";", $this->rd); + } + + $breaker = false; + while (list($k,$char) = each($breakChars)) { + $test = strpos($substr, $char); + if ($test !== false && $test < $end) { + $end = $test; + $breaker = $k; + } + } + + if ($curBlock === 'condition') { + if ($end === 0 && $breaker !== false) { + $end = strlen($breakChars[$breaker]); + } + } + + if ($end !== false) { + $substr = substr($substr, 0, $end); + } + + if ($pointer !== null) { + $pointer += strlen($substr); + } + + $src = $substr; + $substr = trim($substr); + + if (strtolower($substr) === 'false' || strtolower($substr) === 'no' || strtolower($substr) === 'off') { + if ($this->debug) echo 'BOOLEAN(FALSE) PARSED
'; + $substr = 'false'; + } elseif (strtolower($substr) === 'true' || strtolower($substr) === 'yes' || strtolower($substr) === 'on') { + if ($this->debug) echo 'BOOLEAN(TRUE) PARSED
'; + $substr = 'true'; + } elseif ($substr === 'null' || $substr === 'NULL') { + if ($this->debug) echo 'NULL PARSED
'; + $substr = 'null'; + } elseif (is_numeric($substr)) { + $substr = (float) $substr; + if ((int) $substr == $substr) { + $substr = (int) $substr; + } + if ($this->debug) echo 'NUMBER ('.$substr.') PARSED
'; + } elseif (preg_match('{^-?(\d+|\d*(\.\d+))\s*([/*%+-]\s*-?(\d+|\d*(\.\d+)))+$}', $substr)) { + if ($this->debug) echo 'SIMPLE MATH PARSED
'; + $substr = '('.$substr.')'; + } elseif ($curBlock === 'condition' && array_search($substr, $breakChars, true) !== false) { + if ($this->debug) echo 'BREAKCHAR ('.$substr.') PARSED
'; + //$substr = '"'.$substr.'"'; + } else { + $substr = $this->replaceStringVars('\''.str_replace('\'', '\\\'', $substr).'\'', '\'', $curBlock); + + if ($this->debug) echo 'BLABBER ('.$substr.') CASTED AS STRING
'; + } + + if (is_array($parsingParams)) { + $parsingParams[] = array($substr, $src); + return $parsingParams; + } elseif ($curBlock === 'namedparam') { + return array($substr, $src); + } elseif ($curBlock === 'expression') { + return $substr; + } else { + throw new Exception('Something went wrong'); + } + } + + /** + * replaces variables within a parsed string + * + * @param string $string the parsed string + * @param string $first the first character parsed in the string, which is the string delimiter (' or ") + * @param string $curBlock the current parser-block being processed + * @return string the original string with variables replaced + */ + protected function replaceStringVars($string, $first, $curBlock='') + { + $pos = 0; + if ($this->debug) echo 'STRING VAR REPLACEMENT : '.$string.'
'; + // replace vars + while (($pos = strpos($string, '$', $pos)) !== false) { + $prev = substr($string, $pos-1, 1); + if ($prev === '\\') { + $pos++; + continue; + } + + $var = $this->parse($string, $pos, null, false, ($curBlock === 'modifier' ? 'modifier' : ($prev === '`' ? 'delimited_string':'string'))); + $len = $var[0]; + $var = $this->parse(str_replace('\\'.$first, $first, $string), $pos, null, false, ($curBlock === 'modifier' ? 'modifier' : ($prev === '`' ? 'delimited_string':'string'))); + + if ($prev === '`' && substr($string, $pos+$len, 1) === '`') { + $string = substr_replace($string, $first.'.'.$var[1].'.'.$first, $pos-1, $len+2); + } else { + $string = substr_replace($string, $first.'.'.$var[1].'.'.$first, $pos, $len); + } + $pos += strlen($var[1]) + 2; + if ($this->debug) echo 'STRING VAR REPLACEMENT DONE : '.$string.'
'; + } + + // handle modifiers + // TODO Obsolete? + $string = preg_replace_callback('#("|\')\.(.+?)\.\1((?:\|(?:@?[a-z0-9_]+(?:(?::("|\').+?\4|:[^`]*))*))+)#i', array($this, 'replaceModifiers'), $string); + + // replace escaped dollar operators by unescaped ones if required + if ($first==="'") { + $string = str_replace('\\$', '$', $string); + } + + return $string; + } + + /** + * replaces the modifiers applied to a string or a variable + * + * @param array $m the regex matches that must be array(1=>"double or single quotes enclosing a string, when applicable", 2=>"the string or var", 3=>"the modifiers matched") + * @param string $curBlock the current parser-block being processed + * @return string the input enclosed with various function calls according to the modifiers found + */ + protected function replaceModifiers(array $m, $curBlock = null, &$pointer = null) + { + if ($this->debug) echo 'PARSING MODIFIERS : '.$m[3].'
'; + + if ($pointer !== null) { + $pointer += strlen($m[3]); + } + // remove first pipe + $cmdstrsrc = substr($m[3], 1); + // remove last quote if present + if (substr($cmdstrsrc, -1, 1) === $m[1]) { + $cmdstrsrc = substr($cmdstrsrc, 0, -1); + $add = $m[1]; + } + + $output = $m[2]; + + $continue = true; + while (strlen($cmdstrsrc) > 0 && $continue) { + if ($cmdstrsrc[0] === '|') { + $cmdstrsrc = substr($cmdstrsrc, 1); + continue; + } + if ($cmdstrsrc[0] === ' ' || $cmdstrsrc[0] === ';' || substr($cmdstrsrc, 0, strlen($this->rd)) === $this->rd) { + if ($this->debug) echo 'MODIFIER PARSING ENDED, RIGHT DELIMITER or ";" FOUND
'; + $continue = false; + if ($pointer !== null) { + $pointer -= strlen($cmdstrsrc); + } + break; + } + $cmdstr = $cmdstrsrc; + $paramsep = ':'; + if (!preg_match('/^(@{0,2}[a-z][a-z0-9_]*)(:)?/i', $cmdstr, $match)) { + throw new Dwoo_Compilation_Exception($this, 'Invalid modifier name, started with : '.substr($cmdstr, 0, 10)); + } + $paramspos = !empty($match[2]) ? strlen($match[1]) : false; + $func = $match[1]; + + $state = 0; + if ($paramspos === false) { + $cmdstrsrc = substr($cmdstrsrc, strlen($func)); + $params = array(); + if ($this->debug) echo 'MODIFIER ('.$func.') CALLED WITH NO PARAMS
'; + } else { + $paramstr = substr($cmdstr, $paramspos+1); + if (substr($paramstr, -1, 1) === $paramsep) { + $paramstr = substr($paramstr, 0, -1); + } + + $ptr = 0; + $params = array(); + while ($ptr < strlen($paramstr)) { + if ($this->debug) echo 'MODIFIER ('.$func.') START PARAM PARSING WITH POINTER AT '.$ptr.'
'; + if ($this->debug) echo $paramstr.'--'.$ptr.'--'.strlen($paramstr).'--modifier
'; + $params = $this->parse($paramstr, $ptr, strlen($paramstr), $params, 'modifier', $ptr); + if ($this->debug) echo 'PARAM PARSED, POINTER AT '.$ptr.'
'; + + if ($ptr >= strlen($paramstr)) { + if ($this->debug) echo 'PARAM PARSING ENDED, PARAM STRING CONSUMED
'; + break; + } + + if ($paramstr[$ptr] === ' ' || $paramstr[$ptr] === '|' || $paramstr[$ptr] === ';' || substr($paramstr, $ptr, strlen($this->rd)) === $this->rd) { + if ($this->debug) echo 'PARAM PARSING ENDED, " ", "|", RIGHT DELIMITER or ";" FOUND, POINTER AT '.$ptr.'
'; + if ($paramstr[$ptr] !== '|') { + $continue = false; + if ($pointer !== null) { + $pointer -= strlen($paramstr) - $ptr; + } + } + $ptr++; + break; + } + if ($ptr < strlen($paramstr) && $paramstr[$ptr] === ':') { + $ptr++; + } + } + $cmdstrsrc = substr($cmdstrsrc, strlen($func)+1+$ptr); + $paramstr = substr($paramstr, 0, $ptr); + foreach ($params as $k=>$p) { + if (is_array($p) && is_array($p[1])) { + $state |= 2; + } else { + if (($state & 2) && preg_match('#^(["\'])(.+?)\1$#', $p[0], $m)) { + $params[$k] = array($m[2], array('true', 'true')); + } else { + if ($state & 2) { + throw new Dwoo_Compilation_Exception($this, 'You can not use an unnamed parameter after a named one'); + } + $state |= 1; + } + } + } + } + + // check if we must use array_map with this plugin or not + $mapped = false; + if (substr($func, 0, 1) === '@') { + $func = substr($func, 1); + $mapped = true; + } + + $pluginType = $this->getPluginType($func); + + if ($state & 2) { + array_unshift($params, array('value', array($output, $output))); + } else { + array_unshift($params, array($output, $output)); + } + + if ($pluginType & Dwoo::NATIVE_PLUGIN) { + $params = $this->mapParams($params, null, $state); + + $params = $params['*'][0]; + + $params = self::implode_r($params); + + if ($mapped) { + $output = '$this->arrayMap(\''.$func.'\', array('.$params.'))'; + } else { + $output = $func.'('.$params.')'; + } + } elseif ($pluginType & Dwoo::PROXY_PLUGIN) { + $params = $this->mapParams($params, $this->getDwoo()->getPluginProxy()->getCallback($func), $state); + foreach ($params as &$p) + $p = $p[0]; + $output = call_user_func(array($this->dwoo->getPluginProxy(), 'getCode'), $func, $params); + } elseif ($pluginType & Dwoo::SMARTY_MODIFIER) { + $params = $this->mapParams($params, null, $state); + $params = $params['*'][0]; + + $params = self::implode_r($params); + + if ($pluginType & Dwoo::CUSTOM_PLUGIN) { + $callback = $this->customPlugins[$func]['callback']; + if (is_array($callback)) { + if (is_object($callback[0])) { + $output = ($mapped ? '$this->arrayMap' : 'call_user_func_array').'(array($this->plugins[\''.$func.'\'][\'callback\'][0], \''.$callback[1].'\'), array('.$params.'))'; + } else { + $output = ($mapped ? '$this->arrayMap' : 'call_user_func_array').'(array(\''.$callback[0].'\', \''.$callback[1].'\'), array('.$params.'))'; + } + } elseif ($mapped) { + $output = '$this->arrayMap(\''.$callback.'\', array('.$params.'))'; + } else { + $output = $callback.'('.$params.')'; + } + } elseif ($mapped) { + $output = '$this->arrayMap(\'smarty_modifier_'.$func.'\', array('.$params.'))'; + } else { + $output = 'smarty_modifier_'.$func.'('.$params.')'; + } + } else { + if ($pluginType & Dwoo::CUSTOM_PLUGIN) { + $callback = $this->customPlugins[$func]['callback']; + $pluginName = $callback; + } else { + $pluginName = 'Dwoo_Plugin_'.$func; + + if ($pluginType & Dwoo::CLASS_PLUGIN) { + $callback = array($pluginName, ($pluginType & Dwoo::COMPILABLE_PLUGIN) ? 'compile' : 'process'); + } else { + $callback = $pluginName . (($pluginType & Dwoo::COMPILABLE_PLUGIN) ? '_compile' : ''); + } + } + + $params = $this->mapParams($params, $callback, $state); + + foreach ($params as &$p) + $p = $p[0]; + + if ($pluginType & Dwoo::FUNC_PLUGIN) { + if ($pluginType & Dwoo::COMPILABLE_PLUGIN) { + if ($mapped) { + throw new Dwoo_Compilation_Exception($this, 'The @ operator can not be used on compiled plugins.'); + } + if ($pluginType & Dwoo::CUSTOM_PLUGIN) { + $funcCompiler = $this->customPlugins[$func]['callback']; + } else { + $funcCompiler = 'Dwoo_Plugin_'.$func.'_compile'; + } + array_unshift($params, $this); + $output = call_user_func_array($funcCompiler, $params); + } else { + array_unshift($params, '$this'); + + $params = self::implode_r($params); + if ($mapped) { + $output = '$this->arrayMap(\''.$pluginName.'\', array('.$params.'))'; + } else { + $output = $pluginName.'('.$params.')'; + } + } + } else { + if ($pluginType & Dwoo::COMPILABLE_PLUGIN) { + if ($mapped) { + throw new Dwoo_Compilation_Exception($this, 'The @ operator can not be used on compiled plugins.'); + } + if ($pluginType & Dwoo::CUSTOM_PLUGIN) { + $callback = $this->customPlugins[$func]['callback']; + if (!is_array($callback)) { + if (!method_exists($callback, 'compile')) { + throw new Dwoo_Exception('Custom plugin '.$func.' must implement the "compile" method to be compilable, or you should provide a full callback to the method to use'); + } + if (($ref = new ReflectionMethod($callback, 'compile')) && $ref->isStatic()) { + $funcCompiler = array($callback, 'compile'); + } else { + $funcCompiler = array(new $callback, 'compile'); + } + } else { + $funcCompiler = $callback; + } + } else { + $funcCompiler = array('Dwoo_Plugin_'.$func, 'compile'); + array_unshift($params, $this); + } + $output = call_user_func_array($funcCompiler, $params); + } else { + $params = self::implode_r($params); + + if ($pluginType & Dwoo::CUSTOM_PLUGIN) { + if (is_object($callback[0])) { + $output = ($mapped ? '$this->arrayMap' : 'call_user_func_array').'(array($this->plugins[\''.$func.'\'][\'callback\'][0], \''.$callback[1].'\'), array('.$params.'))'; + } else { + $output = ($mapped ? '$this->arrayMap' : 'call_user_func_array').'(array(\''.$callback[0].'\', \''.$callback[1].'\'), array('.$params.'))'; + } + } elseif ($mapped) { + $output = '$this->arrayMap(array($this->getObjectPlugin(\'Dwoo_Plugin_'.$func.'\'), \'process\'), array('.$params.'))'; + } else { + $output = '$this->classCall(\''.$func.'\', array('.$params.'))'; + } + } + } + } + } + + if ($curBlock === 'var' || $m[1] === null) { + return $output; + } elseif ($curBlock === 'string' || $curBlock === 'root') { + return $m[1].'.'.$output.'.'.$m[1].(isset($add)?$add:null); + } + } + + /** + * recursively implodes an array in a similar manner as var_export() does but with some tweaks + * to handle pre-compiled values and the fact that we do not need to enclose everything with + * "array" and do not require top-level keys to be displayed + * + * @param array $params the array to implode + * @param bool $recursiveCall if set to true, the function outputs key names for the top level + * @return string the imploded array + */ + public static function implode_r(array $params, $recursiveCall = false) + { + $out = ''; + foreach ($params as $k=>$p) { + if (is_array($p)) { + $out2 = 'array('; + foreach ($p as $k2=>$v) + $out2 .= var_export($k2, true).' => '.(is_array($v) ? 'array('.self::implode_r($v, true).')' : $v).', '; + $p = rtrim($out2, ', ').')'; + } + if ($recursiveCall) { + $out .= var_export($k, true).' => '.$p.', '; + } else { + $out .= $p.', '; + } + } + return rtrim($out, ', '); + } + + /** + * returns the plugin type of a plugin and adds it to the used plugins array if required + * + * @param string $name plugin name, as found in the template + * @return int type as a multi bit flag composed of the Dwoo plugin types constants + */ + protected function getPluginType($name) + { + $pluginType = -1; + + if (($this->securityPolicy === null && (function_exists($name) || strtolower($name) === 'isset' || strtolower($name) === 'empty')) || + ($this->securityPolicy !== null && in_array(strtolower($name), $this->securityPolicy->getAllowedPhpFunctions()) !== false)) { + $phpFunc = true; + } + + while ($pluginType <= 0) { + if (isset($this->templatePlugins[$name])) { + $pluginType = Dwoo::TEMPLATE_PLUGIN | Dwoo::COMPILABLE_PLUGIN; + } elseif (isset($this->customPlugins[$name])) { + $pluginType = $this->customPlugins[$name]['type'] | Dwoo::CUSTOM_PLUGIN; + } elseif (class_exists('Dwoo_Plugin_'.$name, false) !== false) { + if (is_subclass_of('Dwoo_Plugin_'.$name, 'Dwoo_Block_Plugin')) { + $pluginType = Dwoo::BLOCK_PLUGIN; + } else { + $pluginType = Dwoo::CLASS_PLUGIN; + } + $interfaces = class_implements('Dwoo_Plugin_'.$name, false); + if (in_array('Dwoo_ICompilable', $interfaces) !== false || in_array('Dwoo_ICompilable_Block', $interfaces) !== false) { + $pluginType |= Dwoo::COMPILABLE_PLUGIN; + } + } elseif (function_exists('Dwoo_Plugin_'.$name) !== false) { + $pluginType = Dwoo::FUNC_PLUGIN; + } elseif (function_exists('Dwoo_Plugin_'.$name.'_compile')) { + $pluginType = Dwoo::FUNC_PLUGIN | Dwoo::COMPILABLE_PLUGIN; + } elseif (function_exists('smarty_modifier_'.$name) !== false) { + $pluginType = Dwoo::SMARTY_MODIFIER; + } elseif (function_exists('smarty_function_'.$name) !== false) { + $pluginType = Dwoo::SMARTY_FUNCTION; + } elseif (function_exists('smarty_block_'.$name) !== false) { + $pluginType = Dwoo::SMARTY_BLOCK; + } else { + if ($pluginType===-1) { + try { + $this->dwoo->getLoader()->loadPlugin($name, isset($phpFunc)===false); + } catch (Exception $e) { + if (isset($phpFunc)) { + $pluginType = Dwoo::NATIVE_PLUGIN; + } elseif (is_object($this->dwoo->getPluginProxy()) && $this->dwoo->getPluginProxy()->handles($name)) { + $pluginType = Dwoo::PROXY_PLUGIN; + break; + } else { + throw $e; + } + } + } else { + throw new Dwoo_Exception('Plugin "'.$name.'" could not be found'); + } + $pluginType++; + } + } + + if (($pluginType & Dwoo::COMPILABLE_PLUGIN) === 0 && ($pluginType & Dwoo::NATIVE_PLUGIN) === 0 && ($pluginType & Dwoo::PROXY_PLUGIN) === 0) { + $this->addUsedPlugin($name, $pluginType); + } + + return $pluginType; + } + + /** + * allows a plugin to load another one at compile time, this will also mark + * it as used by this template so it will be loaded at runtime (which can be + * useful for compiled plugins that rely on another plugin when their compiled + * code runs) + * + * @param string $name the plugin name + */ + public function loadPlugin($name) { + $this->getPluginType($name); + } + + /** + * runs htmlentities over the matched blocks when the security policy enforces that + * + * @param array $match matched php block + * @return string the htmlentities-converted string + */ + protected function phpTagEncodingHelper($match) + { + return htmlspecialchars($match[0]); + } + + /** + * maps the parameters received from the template onto the parameters required by the given callback + * + * @param array $params the array of parameters + * @param callback $callback the function or method to reflect on to find out the required parameters + * @param int $callType the type of call in the template, 0 = no params, 1 = php-style call, 2 = named parameters call + * @param array $map the parameter map to use, if not provided it will be built from the callback + * @return array parameters sorted in the correct order with missing optional parameters filled + */ + protected function mapParams(array $params, $callback, $callType=2, $map = null) + { + if (!$map) { + $map = $this->getParamMap($callback); + } + + $paramlist = array(); + + // transforms the parameter array from (x=>array('paramname'=>array(values))) to (paramname=>array(values)) + $ps = array(); + foreach ($params as $p) { + if (is_array($p[1])) { + $ps[$p[0]] = $p[1]; + } else { + $ps[] = $p; + } + } + + // loops over the param map and assigns values from the template or default value for unset optional params + while (list($k,$v) = each($map)) { + if ($v[0] === '*') { + // "rest" array parameter, fill every remaining params in it and then break + if (count($ps) === 0) { + if ($v[1]===false) { + throw new Dwoo_Compilation_Exception($this, 'Rest argument missing for '.str_replace(array('Dwoo_Plugin_', '_compile'), '', (is_array($callback) ? $callback[0] : $callback))); + } else { + break; + } + } + $tmp = array(); + $tmp2 = array(); + foreach ($ps as $i=>$p) { + $tmp[$i] = $p[0]; + $tmp2[$i] = $p[1]; + unset($ps[$i]); + } + $paramlist[$v[0]] = array($tmp, $tmp2); + unset($tmp, $tmp2, $i, $p); + break; + } elseif (isset($ps[$v[0]])) { + // parameter is defined as named param + $paramlist[$v[0]] = $ps[$v[0]]; + unset($ps[$v[0]]); + } elseif (isset($ps[$k])) { + // parameter is defined as ordered param + $paramlist[$v[0]] = $ps[$k]; + unset($ps[$k]); + } elseif ($v[1]===false) { + // parameter is not defined and not optional, throw error + if (is_array($callback)) { + if (is_object($callback[0])) { + $name = get_class($callback[0]) . '::' . $callback[1]; + } else { + $name = $callback[0]; + } + } else { + $name = $callback; + } + + throw new Dwoo_Compilation_Exception($this, 'Argument '.$k.'/'.$v[0].' missing for '.str_replace(array('Dwoo_Plugin_', '_compile'), '', $name)); + } elseif ($v[2]===null) { + // enforce lowercased null if default value is null (php outputs NULL with var export) + $paramlist[$v[0]] = array('null', null); + } else { + // outputs default value with var_export + $paramlist[$v[0]] = array(var_export($v[2], true), $v[2]); + } + } + + if (count($ps)) { + foreach ($ps as $i=>$p) { + array_push($paramlist, $p); + } + } + + return $paramlist; + } + + /** + * returns the parameter map of the given callback, it filters out entries typed as Dwoo and Dwoo_Compiler and turns the rest parameter into a "*" + * + * @param callback $callback the function/method to reflect on + * @return array processed parameter map + */ + protected function getParamMap($callback) + { + if (is_null($callback)) { + return array(array('*', true)); + } + if (is_array($callback)) { + $ref = new ReflectionMethod($callback[0], $callback[1]); + } else { + $ref = new ReflectionFunction($callback); + } + + $out = array(); + foreach ($ref->getParameters() as $param) { + if (($class = $param->getClass()) !== null && $class->name === 'Dwoo') { + continue; + } + if (($class = $param->getClass()) !== null && $class->name === 'Dwoo_Compiler') { + continue; + } + if ($param->getName() === 'rest' && $param->isArray() === true) { + $out[] = array('*', $param->isOptional(), null); + } + $out[] = array($param->getName(), $param->isOptional(), $param->isOptional() ? $param->getDefaultValue() : null); + } + + return $out; + } + + /** + * returns a default instance of this compiler, used by default by all Dwoo templates that do not have a + * specific compiler assigned and when you do not override the default compiler factory function + * + * @see Dwoo::setDefaultCompilerFactory() + * @return Dwoo_Compiler + */ + public static function compilerFactory() + { + if (self::$instance === null) { + new self; + } + return self::$instance; + } +} diff --git a/_piecrust/libs/Dwoo/Dwoo/Data.php b/_piecrust/libs/Dwoo/Dwoo/Data.php new file mode 100644 index 0000000..d6c8789 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Data.php @@ -0,0 +1,250 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Data implements Dwoo_IDataProvider +{ + /** + * data array + * + * @var array + */ + protected $data = array(); + + /** + * returns the data array + * + * @return array + */ + public function getData() + { + return $this->data; + } + + /** + * clears a the entire data or only the given key + * + * @param array|string $name clears only one value if you give a name, multiple values if + * you give an array of names, or the entire data if left null + */ + public function clear($name = null) + { + if ($name === null) { + $this->data = array(); + } elseif (is_array($name)) { + foreach ($name as $index) + unset($this->data[$index]); + } else { + unset($this->data[$name]); + } + } + + /** + * overwrites the entire data with the given array + * + * @param array $data the new data array to use + */ + public function setData(array $data) + { + $this->data = $data; + } + + /** + * merges the given array(s) with the current data with array_merge + * + * @param array $data the array to merge + * @param array $data2 $data3 ... other arrays to merge, optional, etc. + */ + public function mergeData(array $data) + { + $args = func_get_args(); + while (list(,$v) = each($args)) { + if (is_array($v)) { + $this->data = array_merge($this->data, $v); + } + } + } + + /** + * assigns a value or an array of values to the data object + * + * @param array|string $name an associative array of multiple (index=>value) or a string + * that is the index to use, i.e. a value assigned to "foo" will be + * accessible in the template through {$foo} + * @param mixed $val the value to assign, or null if $name was an array + */ + public function assign($name, $val = null) + { + if (is_array($name)) { + reset($name); + while (list($k,$v) = each($name)) + $this->data[$k] = $v; + } else { + $this->data[$name] = $val; + } + } + + /** + * allows to assign variables using the object syntax + * + * @param string $name the variable name + * @param string $value the value to assign to it + */ + public function __set($name, $value) + { + $this->assign($name, $value); + } + + /** + * assigns a value by reference to the data object + * + * @param string $name the index to use, i.e. a value assigned to "foo" will be + * accessible in the template through {$foo} + * @param mixed $val the value to assign by reference + */ + public function assignByRef($name, &$val) + { + $this->data[$name] =& $val; + } + + /** + * appends values or an array of values to the data object + * + * @param array|string $name an associative array of multiple (index=>value) or a string + * that is the index to use, i.e. a value assigned to "foo" will be + * accessible in the template through {$foo} + * @param mixed $val the value to assign, or null if $name was an array + * @param bool $merge true to merge data or false to append, defaults to false + */ + public function append($name, $val = null, $merge = false) + { + if (is_array($name)) { + foreach ($name as $key=>$val) { + if (isset($this->data[$key]) && !is_array($this->data[$key])) { + settype($this->data[$key], 'array'); + } + + if ($merge === true && is_array($val)) { + $this->data[$key] = $val + $this->data[$key]; + } else { + $this->data[$key][] = $val; + } + } + } elseif ($val !== null) { + if (isset($this->data[$name]) && !is_array($this->data[$name])) { + settype($this->data[$name], 'array'); + } elseif (!isset($this->data[$name])) { + $this->data[$name] = array(); + } + + if ($merge === true && is_array($val)) { + $this->data[$name] = $val + $this->data[$name]; + } else { + $this->data[$name][] = $val; + } + } + } + + /** + * appends a value by reference to the data object + * + * @param string $name the index to use, i.e. a value assigned to "foo" will be + * accessible in the template through {$foo} + * @param mixed $val the value to append by reference + * @param bool $merge true to merge data or false to append, defaults to false + */ + public function appendByRef($name, &$val, $merge = false) + { + if (isset($this->data[$name]) && !is_array($this->data[$name])) { + settype($this->data[$name], 'array'); + } + + if ($merge === true && is_array($val)) { + foreach ($val as $key => &$val) { + $this->data[$name][$key] =& $val; + } + } else { + $this->data[$name][] =& $val; + } + } + + /** + * returns true if the variable has been assigned already, false otherwise + * + * @param string $name the variable name + * @return bool + */ + public function isAssigned($name) + { + return isset($this->data[$name]); + } + + /** + * supports calls to isset($dwooData->var) + * + * @param string $name the variable name + */ + public function __isset($name) + { + return isset($this->data[$name]); + } + + /** + * unassigns/removes a variable + * + * @param string $name the variable name + */ + public function unassign($name) + { + unset($this->data[$name]); + } + + /** + * supports unsetting variables using the object syntax + * + * @param string $name the variable name + */ + public function __unset($name) + { + unset($this->data[$name]); + } + + /** + * returns a variable if it was assigned + * + * @param string $name the variable name + * @return mixed + */ + public function get($name) + { + return $this->__get($name); + } + + /** + * allows to read variables using the object syntax + * + * @param string $name the variable name + * @return mixed + */ + public function __get($name) + { + if (isset($this->data[$name])) { + return $this->data[$name]; + } else { + throw new Dwoo_Exception('Tried to read a value that was not assigned yet : "'.$name.'"'); + } + } +} diff --git a/_piecrust/libs/Dwoo/Dwoo/Exception.php b/_piecrust/libs/Dwoo/Dwoo/Exception.php new file mode 100644 index 0000000..c2bd797 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Exception.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Exception extends Exception +{ +} diff --git a/_piecrust/libs/Dwoo/Dwoo/Filter.php b/_piecrust/libs/Dwoo/Dwoo/Filter.php new file mode 100644 index 0000000..937c945 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Filter.php @@ -0,0 +1,44 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +abstract class Dwoo_Filter +{ + /** + * the dwoo instance that runs this filter + * + * @var Dwoo + */ + protected $dwoo; + + /** + * constructor, if you override it, call parent::__construct($dwoo); or assign + * the dwoo instance yourself if you need it + * + * @param Dwoo $dwoo the dwoo instance that runs this plugin + */ + public function __construct(Dwoo $dwoo) + { + $this->dwoo = $dwoo; + } + + /** + * processes the input and returns it filtered + * + * @param string $input the template to process + * @return string + */ + abstract public function process($input); +} diff --git a/_piecrust/libs/Dwoo/Dwoo/ICompilable.php b/_piecrust/libs/Dwoo/Dwoo/ICompilable.php new file mode 100644 index 0000000..f196ef3 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/ICompilable.php @@ -0,0 +1,26 @@ +public static function compile(Dwoo_Compiler $compiler, $arg, $arg, ...), + * which replaces the process() method (that means compile() should have all arguments it requires). + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +interface Dwoo_ICompilable +{ + // this replaces the process function + //public static function compile(Dwoo_Compiler $compiler, $arg, $arg, ...); +} diff --git a/_piecrust/libs/Dwoo/Dwoo/ICompilable/Block.php b/_piecrust/libs/Dwoo/Dwoo/ICompilable/Block.php new file mode 100644 index 0000000..25ca631 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/ICompilable/Block.php @@ -0,0 +1,21 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +interface Dwoo_ICompilable_Block +{ +} diff --git a/_piecrust/libs/Dwoo/Dwoo/ICompiler.php b/_piecrust/libs/Dwoo/Dwoo/ICompiler.php new file mode 100644 index 0000000..74e599e --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/ICompiler.php @@ -0,0 +1,49 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +interface Dwoo_ICompiler +{ + /** + * compiles the provided string down to php code + * + * @param string $templateStr the template to compile + * @return string a compiled php code string + */ + public function compile(Dwoo $dwoo, Dwoo_ITemplate $template); + + /** + * adds the custom plugins loaded into Dwoo to the compiler so it can load them + * + * @see Dwoo::addPlugin + * @param array $customPlugins an array of custom plugins + */ + public function setCustomPlugins(array $customPlugins); + + /** + * sets the security policy object to enforce some php security settings + * + * use this if untrusted persons can modify templates, + * set it on the Dwoo object as it will be passed onto the compiler automatically + * + * @param Dwoo_Security_Policy $policy the security policy object + */ + public function setSecurityPolicy(Dwoo_Security_Policy $policy = null); +} diff --git a/_piecrust/libs/Dwoo/Dwoo/IDataProvider.php b/_piecrust/libs/Dwoo/Dwoo/IDataProvider.php new file mode 100644 index 0000000..90fe450 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/IDataProvider.php @@ -0,0 +1,25 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +interface Dwoo_IDataProvider +{ + /** + * returns the data as an associative array that will be used in the template + * + * @return array + */ + public function getData(); +} diff --git a/_piecrust/libs/Dwoo/Dwoo/IElseable.php b/_piecrust/libs/Dwoo/Dwoo/IElseable.php new file mode 100644 index 0000000..6f5afb5 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/IElseable.php @@ -0,0 +1,24 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +interface Dwoo_IElseable +{ +} diff --git a/_piecrust/libs/Dwoo/Dwoo/ILoader.php b/_piecrust/libs/Dwoo/Dwoo/ILoader.php new file mode 100644 index 0000000..a0a8a4f --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/ILoader.php @@ -0,0 +1,30 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +interface Dwoo_ILoader +{ + /** + * loads a plugin file + * + * the second parameter is used to avoid permanent rehashing when using php functions, + * however this means that if you have add a plugin that overrides a php function you have + * to delete the classpath.cache file(s) by hand to force a rehash of the plugins + * + * @param string $class the plugin name, without the Dwoo_Plugin_ prefix + * @param bool $forceRehash if true, the class path caches will be rebuilt if the plugin is not found, in case it has just been added, defaults to true + */ + public function loadPlugin($class, $forceRehash = true); +} diff --git a/_piecrust/libs/Dwoo/Dwoo/IPluginProxy.php b/_piecrust/libs/Dwoo/Dwoo/IPluginProxy.php new file mode 100644 index 0000000..21a79fd --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/IPluginProxy.php @@ -0,0 +1,65 @@ + + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Denis Arh, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +interface Dwoo_IPluginProxy +{ + /** + * returns true or false to say whether the given plugin is handled by this proxy or not + * + * @param string $name the plugin name + * @return bool true if the plugin is known and usable, otherwise false + */ + public function handles($name); + + /** + * returns the code (as a string) to call the plugin + * (this will be executed at runtime inside the Dwoo class) + * + * @param string $name the plugin name + * @param array $params a parameter array, array key "*" is the rest array + * @return string + */ + public function getCode($name, $params); + + /** + * returns a callback to the plugin, this is used with the reflection API to + * find out about the plugin's parameter names etc. + * + * should you need a rest array without the possibility to edit the + * plugin's code, you can provide a callback to some + * other function with the correct parameter signature, i.e. : + * + * return array($this, "callbackHelper"); + * // and callbackHelper would be as such: + * public function callbackHelper(array $rest=array()){} + * + * + * @param string $name the plugin name + * @return callback + */ + public function getCallback($name); + + /** + * returns some code that will check if the plugin is loaded and if not load it + * this is optional, if your plugins are autoloaded or whatever, just return an + * empty string + * + * @param string $name the plugin name + * @return string + */ + public function getLoader($name); +} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/ITemplate.php b/_piecrust/libs/Dwoo/Dwoo/ITemplate.php new file mode 100644 index 0000000..7a855a4 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/ITemplate.php @@ -0,0 +1,150 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.1.0 + * @date 2009-07-18 + * @package Dwoo + */ +interface Dwoo_ITemplate +{ + /** + * returns the cache duration for this template + * + * defaults to null if it was not provided + * + * @return int|null + */ + public function getCacheTime(); + + /** + * sets the cache duration for this template + * + * can be used to set it after the object is created if you did not provide + * it in the constructor + * + * @param int $seconds duration of the cache validity for this template, if + * null it defaults to the Dwoo instance's cache time. 0 = disable and + * -1 = infinite cache + */ + public function setCacheTime($seconds = null); + + /** + * returns the cached template output file name, true if it's cache-able but not cached + * or false if it's not cached + * + * @param Dwoo $dwoo the dwoo instance that requests it + * @return string|bool + */ + public function getCachedTemplate(Dwoo $dwoo); + + /** + * caches the provided output into the cache file + * + * @param Dwoo $dwoo the dwoo instance that requests it + * @param string $output the template output + * @return mixed full path of the cached file or false upon failure + */ + public function cache(Dwoo $dwoo, $output); + + /** + * clears the cached template if it's older than the given time + * + * @param Dwoo $dwoo the dwoo instance that was used to cache that template + * @param int $olderThan minimum time (in seconds) required for the cache to be cleared + * @return bool true if the cache was not present or if it was deleted, false if it remains there + */ + public function clearCache(Dwoo $dwoo, $olderThan = -1); + + /** + * returns the compiled template file name + * + * @param Dwoo $dwoo the dwoo instance that requests it + * @param Dwoo_ICompiler $compiler the compiler that must be used + * @return string + */ + public function getCompiledTemplate(Dwoo $dwoo, Dwoo_ICompiler $compiler = null); + + /** + * returns the template name + * + * @return string + */ + public function getName(); + + /** + * returns the resource name for this template class + * + * @return string + */ + public function getResourceName(); + + /** + * returns the resource identifier for this template or false if it has no identifier + * + * @return string|false + */ + public function getResourceIdentifier(); + + /** + * returns the template source of this template + * + * @return string + */ + public function getSource(); + + /** + * returns an unique string identifying the current version of this template, + * for example a timestamp of the last modified date or a hash of the template source + * + * @return string + */ + public function getUid(); + + /** + * returns the compiler used by this template, if it was just compiled, or null + * + * @return Dwoo_ICompiler + */ + public function getCompiler(); + + /** + * returns some php code that will check if this template has been modified or not + * + * if the function returns null, the template will be instanciated and then the Uid checked + * + * @return string + */ + public function getIsModifiedCode(); + + /** + * returns a new template object from the given resource identifier, null if no include is + * possible (resource not found), or false if include is not permitted by this resource type + * + * this method should also check if $dwoo->getSecurityPolicy() is null or not and do the + * necessary permission checks if required, if the security policy prevents the template + * generation it should throw a new Dwoo_Security_Exception with a relevant message + * + * @param mixed $resourceId the resource identifier + * @param int $cacheTime duration of the cache validity for this template, + * if null it defaults to the Dwoo instance that will + * render this template + * @param string $cacheId the unique cache identifier of this page or anything else that + * makes this template's content unique, if null it defaults + * to the current url + * @param string $compileId the unique compiled identifier, which is used to distinguish this + * template from others, if null it defaults to the filename+bits of the path + * @param Dwoo_ITemplate $parentTemplate the template that is requesting a new template object (through + * an include, extends or any other plugin) + * @return Dwoo_ITemplate|null|false + */ + public static function templateFactory(Dwoo $dwoo, $resourceId, $cacheTime = null, $cacheId = null, $compileId = null, Dwoo_ITemplate $parentTemplate = null); +} diff --git a/_piecrust/libs/Dwoo/Dwoo/Loader.php b/_piecrust/libs/Dwoo/Dwoo/Loader.php new file mode 100644 index 0000000..807693b --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Loader.php @@ -0,0 +1,147 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.1.0 + * @date 2009-07-18 + * @package Dwoo + */ +class Dwoo_Loader implements Dwoo_ILoader +{ + /** + * stores the plugin directories + * + * @see addDirectory + * @var array + */ + protected $paths = array(); + + /** + * stores the plugins names/paths relationships + * don't edit this on your own, use addDirectory + * + * @see addDirectory + * @var array + */ + protected $classPath = array(); + + /** + * path where class paths cache files are written + * + * @var string + */ + protected $cacheDir; + + protected $corePluginDir; + + public function __construct($cacheDir) + { + $this->corePluginDir = DWOO_DIRECTORY . 'plugins'; + $this->cacheDir = rtrim($cacheDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; + + // include class paths or rebuild paths if the cache file isn't there + $cacheFile = $this->cacheDir.'classpath.cache.d'.Dwoo::RELEASE_TAG.'.php'; + if (file_exists($cacheFile)) { + $classpath = file_get_contents($cacheFile); + $this->classPath = unserialize($classpath) + $this->classPath; + } else { + $this->rebuildClassPathCache($this->corePluginDir, $cacheFile); + } + } + + /** + * rebuilds class paths, scans the given directory recursively and saves all paths in the given file + * + * @param string $path the plugin path to scan + * @param string $cacheFile the file where to store the plugin paths cache, it will be overwritten + */ + protected function rebuildClassPathCache($path, $cacheFile) + { + if ($cacheFile!==false) { + $tmp = $this->classPath; + $this->classPath = array(); + } + + // iterates over all files/folders + $list = glob(rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . '*'); + if (is_array($list)) { + foreach ($list as $f) { + if (is_dir($f)) { + $this->rebuildClassPathCache($f, false); + } else { + $this->classPath[str_replace(array('function.','block.','modifier.','outputfilter.','filter.','prefilter.','postfilter.','pre.','post.','output.','shared.','helper.'), '', basename($f, '.php'))] = $f; + } + } + } + + // save in file if it's the first call (not recursed) + if ($cacheFile!==false) { + if (!file_put_contents($cacheFile, serialize($this->classPath))) { + throw new Dwoo_Exception('Could not write into '.$cacheFile.', either because the folder is not there (create it) or because of the chmod configuration (please ensure this directory is writable by php), alternatively you can change the directory used with $dwoo->setCompileDir() or provide a custom loader object with $dwoo->setLoader()'); + } + $this->classPath += $tmp; + } + } + + /** + * loads a plugin file + * + * @param string $class the plugin name, without the Dwoo_Plugin_ prefix + * @param bool $forceRehash if true, the class path caches will be rebuilt if the plugin is not found, in case it has just been added, defaults to true + */ + public function loadPlugin($class, $forceRehash = true) + { + // a new class was added or the include failed so we rebuild the cache + if (!isset($this->classPath[$class]) || !(include $this->classPath[$class])) { + if ($forceRehash) { + $this->rebuildClassPathCache($this->corePluginDir, $this->cacheDir . 'classpath.cache.d'.Dwoo::RELEASE_TAG.'.php'); + foreach ($this->paths as $path=>$file) { + $this->rebuildClassPathCache($path, $file); + } + if (isset($this->classPath[$class])) { + include $this->classPath[$class]; + } else { + throw new Dwoo_Exception('Plugin '.$class.' can not be found, maybe you forgot to bind it if it\'s a custom plugin ?', E_USER_NOTICE); + } + } else { + throw new Dwoo_Exception('Plugin '.$class.' can not be found, maybe you forgot to bind it if it\'s a custom plugin ?', E_USER_NOTICE); + } + } + } + + /** + * adds a plugin directory, the plugins found in the new plugin directory + * will take precedence over the other directories (including the default + * dwoo plugin directory), you can use this for example to override plugins + * in a specific directory for a specific application while keeping all your + * usual plugins in the same place for all applications. + * + * TOCOM don't forget that php functions overrides are not rehashed so you + * need to clear the classpath caches by hand when adding those + * + * @param string $pluginDirectory the plugin path to scan + */ + public function addDirectory($pluginDirectory) + { + $pluginDir = realpath($pluginDirectory); + if (!$pluginDir) { + throw new Dwoo_Exception('Plugin directory does not exist or can not be read : '.$pluginDirectory); + } + $cacheFile = $this->cacheDir . 'classpath-'.substr(strtr($pluginDir, '/\\:'.PATH_SEPARATOR, '----'), strlen($pluginDir) > 80 ? -80 : 0).'.d'.Dwoo::RELEASE_TAG.'.php'; + $this->paths[$pluginDir] = $cacheFile; + if (file_exists($cacheFile)) { + $classpath = file_get_contents($cacheFile); + $this->classPath = unserialize($classpath) + $this->classPath; + } else { + $this->rebuildClassPathCache($pluginDir, $cacheFile); + } + } +} diff --git a/_piecrust/libs/Dwoo/Dwoo/Plugin.php b/_piecrust/libs/Dwoo/Dwoo/Plugin.php new file mode 100644 index 0000000..68dc56a --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Plugin.php @@ -0,0 +1,85 @@ +process() method, it will receive the parameters that + * are in the template code + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +abstract class Dwoo_Plugin +{ + /** + * the dwoo instance that runs this plugin + * + * @var Dwoo + */ + protected $dwoo; + + /** + * constructor, if you override it, call parent::__construct($dwoo); or assign + * the dwoo instance yourself if you need it + * + * @param Dwoo $dwoo the dwoo instance that runs this plugin + */ + public function __construct(Dwoo $dwoo) + { + $this->dwoo = $dwoo; + } + + // plugins should always implement : + // public function process($arg, $arg, ...) + // or for block plugins : + // public function init($arg, $arg, ...) + + // this could be enforced with : + // abstract public function process(...); + // if my feature request gets enough interest one day + // see => http://bugs.php.net/bug.php?id=44043 + + /** + * utility function that converts an array of compiled parameters (or rest array) to a string of xml/html tag attributes + * + * this is to be used in preProcessing or postProcessing functions, example : + * $p = $compiler->getCompiledParams($params); + * // get only the rest array as attributes + * $attributes = Dwoo_Plugin::paramsToAttributes($p['*']); + * // get all the parameters as attributes (if there is a rest array, it will be included) + * $attributes = Dwoo_Plugin::paramsToAttributes($p); + * + * @param array $params an array of attributeName=>value items that will be compiled to be ready for inclusion in a php string + * @param string $delim the string delimiter you want to use (defaults to ') + * @return string + */ + public static function paramsToAttributes(array $params, $delim = '\'') + { + if (isset($params['*'])) { + $params = array_merge($params, $params['*']); + unset($params['*']); + } + + $out = ''; + foreach ($params as $attr=>$val) { + $out .= ' '.$attr.'='; + if (trim($val, '"\'')=='' || $val=='null') { + $out .= str_replace($delim, '\\'.$delim, '""'); + } elseif (substr($val, 0, 1) === $delim && substr($val, -1) === $delim) { + $out .= str_replace($delim, '\\'.$delim, '"'.substr($val, 1, -1).'"'); + } else { + $out .= str_replace($delim, '\\'.$delim, '"') . $delim . '.'.$val.'.' . $delim . str_replace($delim, '\\'.$delim, '"'); + } + } + + return ltrim($out); + } +} diff --git a/_piecrust/libs/Dwoo/Dwoo/Processor.php b/_piecrust/libs/Dwoo/Dwoo/Processor.php new file mode 100644 index 0000000..b220bd8 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Processor.php @@ -0,0 +1,44 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +abstract class Dwoo_Processor +{ + /** + * the compiler instance that runs this processor + * + * @var Dwoo + */ + protected $compiler; + + /** + * constructor, if you override it, call parent::__construct($dwoo); or assign + * the dwoo instance yourself if you need it + * + * @param Dwoo $dwoo the dwoo instance that runs this plugin + */ + public function __construct(Dwoo_Compiler $compiler) + { + $this->compiler = $compiler; + } + + /** + * processes the input and returns it filtered + * + * @param string $input the template to process + * @return string + */ + abstract public function process($input); +} diff --git a/_piecrust/libs/Dwoo/Dwoo/Security/Exception.php b/_piecrust/libs/Dwoo/Dwoo/Security/Exception.php new file mode 100644 index 0000000..5d70ab2 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Security/Exception.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Security_Exception extends Dwoo_Exception +{ +} diff --git a/_piecrust/libs/Dwoo/Dwoo/Security/Policy.php b/_piecrust/libs/Dwoo/Dwoo/Security/Policy.php new file mode 100644 index 0000000..6fecf51 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Security/Policy.php @@ -0,0 +1,199 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Security_Policy +{ + /**#@+ + * php handling constants, defaults to PHP_REMOVE + * + * PHP_REMOVE : remove all (+ short tags if your short tags option is on) from the input template + * PHP_ALLOW : leave them as they are + * PHP_ENCODE : run htmlentities over them + * + * @var int + */ + const PHP_ENCODE = 1; + const PHP_REMOVE = 2; + const PHP_ALLOW = 3; + /**#@-*/ + + /**#@+ + * constant handling constants, defaults to CONST_DISALLOW + * + * CONST_DISALLOW : throw an error if {$dwoo.const.*} is used in the template + * CONST_ALLOW : allow {$dwoo.const.*} calls + */ + const CONST_DISALLOW = false; + const CONST_ALLOW = true; + /**#@-*/ + + /** + * php functions that are allowed to be used within the template + * + * @var array + */ + protected $allowedPhpFunctions = array + ( + 'str_repeat', 'number_format', 'htmlentities', 'htmlspecialchars', + 'long2ip', 'strlen', 'list', 'empty', 'count', 'sizeof', 'in_array', 'is_array', + ); + + /** + * paths that are safe to use with include or other file-access plugins + * + * @var array + */ + protected $allowedDirectories = array(); + + /** + * stores the php handling level + * + * defaults to Dwoo_Security_Policy::PHP_REMOVE + * + * @var int + */ + protected $phpHandling = self::PHP_REMOVE; + + /** + * stores the constant handling level + * + * defaults to Dwoo_Security_Policy::CONST_DISALLOW + * + * @var bool + */ + protected $constHandling = self::CONST_DISALLOW; + + /** + * adds a php function to the allowed list + * + * @param mixed $func function name or array of function names + */ + public function allowPhpFunction($func) + { + if (is_array($func)) + foreach ($func as $fname) + $this->allowedPhpFunctions[strtolower($fname)] = true; + else + $this->allowedPhpFunctions[strtolower($func)] = true; + } + + /** + * removes a php function from the allowed list + * + * @param mixed $func function name or array of function names + */ + public function disallowPhpFunction($func) + { + if (is_array($func)) + foreach ($func as $fname) + unset($this->allowedPhpFunctions[strtolower($fname)]); + else + unset($this->allowedPhpFunctions[strtolower($func)]); + } + + /** + * returns the list of php functions allowed to run, note that the function names + * are stored in the array keys and not values + * + * @return array + */ + public function getAllowedPhpFunctions() + { + return $this->allowedPhpFunctions; + } + + /** + * adds a directory to the safelist for includes and other file-access plugins + * + * note that all the includePath directories you provide to the Dwoo_Template_File class + * are automatically marked as safe + * + * @param mixed $path a path name or an array of paths + */ + public function allowDirectory($path) + { + if (is_array($path)) + foreach ($path as $dir) + $this->allowedDirectories[realpath($dir)] = true; + else + $this->allowedDirectories[realpath($path)] = true; + } + + /** + * removes a directory from the safelist + * + * @param mixed $path a path name or an array of paths + */ + public function disallowDirectory($path) + { + if (is_array($path)) + foreach ($path as $dir) + unset($this->allowedDirectories[realpath($dir)]); + else + unset($this->allowedDirectories[realpath($path)]); + } + + /** + * returns the list of safe paths, note that the paths are stored in the array + * keys and not values + * + * @return array + */ + public function getAllowedDirectories() + { + return $this->allowedDirectories; + } + + /** + * sets the php handling level, defaults to REMOVE + * + * @param int $level one of the Dwoo_Security_Policy::PHP_* constants + */ + public function setPhpHandling($level = self::PHP_REMOVE) + { + $this->phpHandling = $level; + } + + /** + * returns the php handling level + * + * @return int the current level, one of the Dwoo_Security_Policy::PHP_* constants + */ + public function getPhpHandling() + { + return $this->phpHandling; + } + + /** + * sets the constant handling level, defaults to CONST_DISALLOW + * + * @param bool $level one of the Dwoo_Security_Policy::CONST_* constants + */ + public function setConstantHandling($level = self::CONST_DISALLOW) + { + $this->constHandling = $level; + } + + /** + * returns the constant handling level + * + * @return bool the current level, one of the Dwoo_Security_Policy::CONST_* constants + */ + public function getConstantHandling() + { + return $this->constHandling; + } +} diff --git a/_piecrust/libs/Dwoo/Dwoo/Smarty/Adapter.php b/_piecrust/libs/Dwoo/Dwoo/Smarty/Adapter.php new file mode 100644 index 0000000..9f64c74 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Smarty/Adapter.php @@ -0,0 +1,518 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.1.0 + * @date 2009-07-18 + * @package Dwoo + */ +class Dwoo_Smarty__Adapter extends Dwoo +{ + // magic get/set/call functions that handle unsupported features + public function __set($p, $v) + { + if ($p==='scope') { + $this->scope = $v; + return; + } + if ($p==='data') { + $this->data = $v; + return; + } + if (array_key_exists($p, $this->compat['properties']) !== false) { + if ($this->show_compat_errors) { + $this->triggerError('Property '.$p.' is not available in the Dwoo_Smarty_Adapter, however it might be implemented in the future, check out http://wiki.dwoo.org/index.php/SmartySupport for more details.', E_USER_NOTICE); + } + $this->compat['properties'][$p] = $v; + } else { + if ($this->show_compat_errors) { + $this->triggerError('Property '.$p.' is not available in the Dwoo_Smarty_Adapter, but it is not listed as such, so you might want to tell me about it at j.boggiano@seld.be', E_USER_NOTICE); + } + } + } + + public function __get($p) + { + if (array_key_exists($p, $this->compat['properties']) !== false) { + if ($this->show_compat_errors) { + $this->triggerError('Property '.$p.' is not available in the Dwoo_Smarty_Adapter, however it might be implemented in the future, check out http://wiki.dwoo.org/index.php/SmartySupport for more details.', E_USER_NOTICE); + } + return $this->compat['properties'][$p]; + } else { + if ($this->show_compat_errors) { + $this->triggerError('Property '.$p.' is not available in the Dwoo_Smarty_Adapter, but it is not listed as such, so you might want to tell me about it at j.boggiano@seld.be', E_USER_NOTICE); + } + } + } + + public function __call($m, $a) + { + if (method_exists($this->dataProvider, $m)) { + call_user_func_array(array($this->dataProvider, $m), $a); + } elseif ($this->show_compat_errors) { + if (array_search($m, $this->compat['methods']) !== false) { + $this->triggerError('Method '.$m.' is not available in the Dwoo_Smarty_Adapter, however it might be implemented in the future, check out http://wiki.dwoo.org/index.php/SmartySupport for more details.', E_USER_NOTICE); + } else { + $this->triggerError('Method '.$m.' is not available in the Dwoo_Smarty_Adapter, but it is not listed as such, so you might want to tell me about it at j.boggiano@seld.be', E_USER_NOTICE); + } + } + } + + // list of unsupported properties and methods + protected $compat = array + ( + 'methods' => array + ( + 'register_resource', 'unregister_resource', 'load_filter', 'clear_compiled_tpl', + 'clear_config', 'get_config_vars', 'config_load' + ), + 'properties' => array + ( + 'cache_handler_func' => null, + 'debugging' => false, + 'error_reporting' => null, + 'debugging_ctrl' => 'NONE', + 'request_vars_order' => 'EGPCS', + 'request_use_auto_globals' => true, + 'use_sub_dirs' => false, + 'autoload_filters' => array(), + 'default_template_handler_func' => '', + 'debug_tpl' => '', + 'cache_modified_check' => false, + 'default_modifiers' => array(), + 'default_resource_type' => 'file', + 'config_overwrite' => true, + 'config_booleanize' => true, + 'config_read_hidden' => false, + 'config_fix_newlines' => true, + 'config_class' => 'Config_File', + ), + ); + + // security vars + public $security = false; + public $trusted_dir = array(); + public $secure_dir = array(); + public $php_handling = SMARTY_PHP_PASSTHRU; + public $security_settings = array + ( + 'PHP_HANDLING' => false, + 'IF_FUNCS' => array + ( + 'list', 'empty', 'count', 'sizeof', + 'in_array', 'is_array', + ), + 'INCLUDE_ANY' => false, + 'PHP_TAGS' => false, + 'MODIFIER_FUNCS' => array(), + 'ALLOW_CONSTANTS' => false + ); + + // paths + public $template_dir = 'templates'; + public $compile_dir = 'templates_c'; + public $config_dir = 'configs'; + public $cache_dir = 'cache'; + public $plugins_dir = array(); + + // misc options + public $left_delimiter = '{'; + public $right_delimiter = '}'; + public $compile_check = true; + public $force_compile = false; + public $caching = 0; + public $cache_lifetime = 3600; + public $compile_id = null; + public $compiler_file = null; + public $compiler_class = null; + + // dwoo/smarty compat layer + public $show_compat_errors = false; + protected $dataProvider; + protected $_filters = array('pre'=>array(), 'post'=>array(), 'output'=>array()); + protected static $tplCache = array(); + protected $compiler = null; + + public function __construct() + { + parent::__construct(); + $this->charset = 'iso-8859-1'; + $this->dataProvider = new Dwoo_Data(); + $this->compiler = new Dwoo_Compiler(); + } + + public function display($filename, $cacheId=null, $compileId=null) + { + $this->fetch($filename, $cacheId, $compileId, true); + } + + public function fetch($filename, $cacheId=null, $compileId=null, $display=false) + { + $this->setCacheDir($this->cache_dir); + $this->setCompileDir($this->compile_dir); + + if ($this->security) { + $policy = new Dwoo_Security_Policy(); + $policy->addPhpFunction(array_merge($this->security_settings['IF_FUNCS'], $this->security_settings['MODIFIER_FUNCS'])); + + $phpTags = $this->security_settings['PHP_HANDLING'] ? SMARTY_PHP_ALLOW : $this->php_handling; + if ($this->security_settings['PHP_TAGS']) { + $phpTags = SMARTY_PHP_ALLOW; + } + switch($phpTags) { + case SMARTY_PHP_ALLOW: + case SMARTY_PHP_PASSTHRU: + $phpTags = Dwoo_Security_Policy::PHP_ALLOW; + break; + case SMARTY_PHP_QUOTE: + $phpTags = Dwoo_Security_Policy::PHP_ENCODE; + break; + case SMARTY_PHP_REMOVE: + default: + $phpTags = Dwoo_Security_Policy::PHP_REMOVE; + break; + } + $policy->setPhpHandling($phpTags); + + $policy->setConstantHandling($this->security_settings['ALLOW_CONSTANTS']); + + if ($this->security_settings['INCLUDE_ANY']) { + $policy->allowDirectory(preg_replace('{^((?:[a-z]:)?[\\\\/]).*}i', '$1', __FILE__)); + } else { + $policy->allowDirectory($this->secure_dir); + } + + $this->setSecurityPolicy($policy); + } + + if (!empty($this->plugins_dir)) { + foreach ($this->plugins_dir as $dir) { + $this->getLoader()->addDirectory(rtrim($dir, '\\/')); + } + } + + $tpl = $this->makeTemplate($filename, $cacheId, $compileId); + if ($this->force_compile) { + $tpl->forceCompilation(); + } + + if ($this->caching > 0) { + $this->cacheTime = $this->cache_lifetime; + } else { + $this->cacheTime = 0; + } + + if ($this->compiler_class !== null) { + if ($this->compiler_file !== null && !class_exists($this->compiler_class, false)) { + include $this->compiler_file; + } + $this->compiler = new $this->compiler_class; + } else { + $this->compiler->addPreProcessor('smarty_compat', true); + $this->compiler->setLooseOpeningHandling(true); + } + + $this->compiler->setDelimiters($this->left_delimiter, $this->right_delimiter); + + return $this->get($tpl, $this->dataProvider, $this->compiler, $display===true); + } + + public function get($_tpl, $data = array(), $_compiler = null, $_output = false) + { + if ($_compiler === null) { + $_compiler = $this->compiler; + } + return parent::get($_tpl, $data, $_compiler, $_output); + } + + public function register_function($name, $callback, $cacheable=true, $cache_attrs=null) + { + if (isset($this->plugins[$name]) && $this->plugins[$name][0] !== self::SMARTY_FUNCTION) { + throw new Dwoo_Exception('Multiple plugins of different types can not share the same name'); + } + $this->plugins[$name] = array('type'=>self::SMARTY_FUNCTION, 'callback'=>$callback); + } + + public function unregister_function($name) + { + unset($this->plugins[$name]); + } + + public function register_block($name, $callback, $cacheable=true, $cache_attrs=null) + { + if (isset($this->plugins[$name]) && $this->plugins[$name][0] !== self::SMARTY_BLOCK) { + throw new Dwoo_Exception('Multiple plugins of different types can not share the same name'); + } + $this->plugins[$name] = array('type'=>self::SMARTY_BLOCK, 'callback'=>$callback); + } + + public function unregister_block($name) + { + unset($this->plugins[$name]); + } + + public function register_modifier($name, $callback) + { + if (isset($this->plugins[$name]) && $this->plugins[$name][0] !== self::SMARTY_MODIFIER) { + throw new Dwoo_Exception('Multiple plugins of different types can not share the same name'); + } + $this->plugins[$name] = array('type'=>self::SMARTY_MODIFIER, 'callback'=>$callback); + } + + public function unregister_modifier($name) + { + unset($this->plugins[$name]); + } + + public function register_prefilter($callback) + { + $processor = new Dwoo_SmartyProcessorAdapter($this->compiler); + $processor->registerCallback($callback); + $this->_filters['pre'][] = $processor; + $this->compiler->addPreProcessor($processor); + } + + public function unregister_prefilter($callback) + { + foreach ($this->_filters['pre'] as $index => $processor) + if ($processor->callback === $callback) { + $this->compiler->removePostProcessor($processor); + unset($this->_filters['pre'][$index]); + } + } + + public function register_postfilter($callback) + { + $processor = new Dwoo_SmartyProcessorAdapter($this->compiler); + $processor->registerCallback($callback); + $this->_filters['post'][] = $processor; + $this->compiler->addPostProcessor($processor); + } + + public function unregister_postfilter($callback) + { + foreach ($this->_filters['post'] as $index => $processor) + if ($processor->callback === $callback) { + $this->compiler->removePostProcessor($processor); + unset($this->_filters['post'][$index]); + } + } + + public function register_outputfilter($callback) + { + $filter = new Dwoo_SmartyFilterAdapter($this); + $filter->registerCallback($callback); + $this->_filters['output'][] = $filter; + $this->addFilter($filter); + } + + public function unregister_outputfilter($callback) + { + foreach ($this->_filters['output'] as $index => $filter) + if ($filter->callback === $callback) { + $this->removeOutputFilter($filter); + unset($this->_filters['output'][$index]); + } + } + + function register_object($object, $object_impl, $allowed = array(), $smarty_args = false, $block_methods = array()) + { + settype($allowed, 'array'); + settype($block_methods, 'array'); + settype($smarty_args, 'boolean'); + + if (!empty($allowed) && $this->show_compat_errors) { + $this->triggerError('You can register objects but can not restrict the method/properties used, this is PHP5, you have proper OOP access restrictions so use them.', E_USER_NOTICE); + } + + if ($smarty_args) { + $this->triggerError('You can register objects but methods will be called using method($arg1, $arg2, $arg3), not as an argument array like smarty did.', E_USER_NOTICE); + } + + if (!empty($block_methods)) { + $this->triggerError('You can register objects but can not use methods as being block methods, you have to build a plugin for that.', E_USER_NOTICE); + } + + $this->dataProvider->assign($object, $object_impl); + } + + function unregister_object($object) + { + $this->dataProvider->clear($object); + } + + function get_registered_object($name) { + $data = $this->dataProvider->getData(); + if (isset($data[$name]) && is_object($data[$name])) { + return $data[$name]; + } else { + trigger_error('Dwoo_Compiler: object "'.$name.'" was not registered or is not an object', E_USER_ERROR); + } + } + + public function template_exists($filename) + { + if (!is_array($this->template_dir)) { + return file_exists($this->template_dir.DIRECTORY_SEPARATOR.$filename); + } else { + foreach ($this->template_dir as $tpl_dir) { + if (file_exists($tpl_dir.DIRECTORY_SEPARATOR.$filename)) { + return true; + } + } + return false; + } + } + + public function is_cached($tpl, $cacheId = null, $compileId = null) + { + return $this->isCached($this->makeTemplate($tpl, $cacheId, $compileId)); + } + + public function append_by_ref($var, &$value, $merge=false) + { + $this->dataProvider->appendByRef($var, $value, $merge); + } + + public function assign_by_ref($name, &$val) + { + $this->dataProvider->assignByRef($name, $val); + } + + public function clear_assign($var) + { + $this->dataProvider->clear($var); + } + + public function clear_all_assign() + { + $this->dataProvider->clear(); + } + + public function get_template_vars($name=null) + { + if ($this->show_compat_errors) { + trigger_error('get_template_vars does not return values by reference, if you try to modify the data that way you should modify your code.', E_USER_NOTICE); + } + + $data = $this->dataProvider->getData(); + if ($name === null) + return $data; + elseif (isset($data[$name])) + return $data[$name]; + return null; + } + + public function clear_all_cache($olderThan = 0) + { + $this->clearCache($olderThan); + } + + public function clear_cache($template, $cacheId = null, $compileId = null, $olderThan = 0) + { + $this->makeTemplate($template, $cacheId, $compileId)->clearCache($olderThan); + } + + public function trigger_error($error_msg, $error_type = E_USER_WARNING) + { + $this->triggerError($error_msg, $error_type); + } + + protected function initGlobals() + { + parent::initGlobals(); + $this->globals['ldelim'] = '{'; + $this->globals['rdelim'] = '}'; + } + + protected function makeTemplate($file, $cacheId, $compileId) + { + if ($compileId === null) + $compileId = $this->compile_id; + + $hash = bin2hex(md5($file.$cacheId.$compileId, true)); + if (!isset(self::$tplCache[$hash])) { + // abs path + if (substr($file, 0, 1) === '/' || substr($file, 1, 1) === ':') { + self::$tplCache[$hash] = new Dwoo_Template_File($file, null, $cacheId, $compileId); + } elseif (is_string($this->template_dir) || is_array($this->template_dir)) { + self::$tplCache[$hash] = new Dwoo_Template_File($file, null, $cacheId, $compileId, $this->template_dir); + } else { + throw new Exception('Unable to load "'.$file.'", check the template_dir'); + } + } + return self::$tplCache[$hash]; + } + + public function triggerError($message, $level=E_USER_NOTICE) + { + if (is_object($this->template)) { + return parent::triggerError($message, $level); + } + trigger_error('Dwoo error : '.$message, $level); + } +} + +class Dwoo_Smarty_Filter_Adapter extends Dwoo_Filter +{ + public $callback; + + public function process($input) + { + return call_user_func($this->callback, $input); + } + + public function registerCallback($callback) + { + $this->callback = $callback; + } +} + +class Dwoo_Smarty_Processor_Adapter extends Dwoo_Processor +{ + public $callback; + + public function process($input) + { + return call_user_func($this->callback, $input); + } + + public function registerCallback($callback) + { + $this->callback = $callback; + } +} + +// cloaks the adapter if possible with the smarty name to fool type-hinted plugins +if (class_exists('Smarty', false) === false) +{ + interface Smarty {} + class Dwoo_Smarty_Adapter extends Dwoo_Smarty__Adapter implements Smarty {} +} +else +{ + class Dwoo_Smarty_Adapter extends Dwoo_Smarty__Adapter {} +} diff --git a/_piecrust/libs/Dwoo/Dwoo/Template/File.php b/_piecrust/libs/Dwoo/Dwoo/Template/File.php new file mode 100644 index 0000000..a71dae6 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Template/File.php @@ -0,0 +1,270 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.1.0 + * @date 2009-07-18 + * @package Dwoo + */ +class Dwoo_Template_File extends Dwoo_Template_String +{ + /** + * template filename + * + * @var string + */ + protected $file; + + /** + * include path(s) to look into to find this template + * + * @var array + */ + protected $includePath = null; + + /** + * resolved path cache when looking for a file in multiple include paths + * + * this is reset when the include path is changed + * + * @var string + */ + protected $resolvedPath = null; + + /** + * creates a template from a file + * + * @param string $file the path to the template file, make sure it exists + * @param int $cacheTime duration of the cache validity for this template, + * if null it defaults to the Dwoo instance that will + * render this template + * @param string $cacheId the unique cache identifier of this page or anything else that + * makes this template's content unique, if null it defaults + * to the current url + * @param string $compileId the unique compiled identifier, which is used to distinguish this + * template from others, if null it defaults to the filename+bits of the path + * @param mixed $includePath a string for a single path to look into for the given file, or an array of paths + */ + public function __construct($file, $cacheTime = null, $cacheId = null, $compileId = null, $includePath = null) + { + $this->file = $file; + $this->name = basename($file); + $this->cacheTime = $cacheTime; + + if ($compileId !== null) { + $this->compileId = str_replace('../', '__', strtr($compileId, '\\%?=!:;'.PATH_SEPARATOR, '/-------')); + } + + if ($cacheId !== null) { + $this->cacheId = str_replace('../', '__', strtr($cacheId, '\\%?=!:;'.PATH_SEPARATOR, '/-------')); + } + + if (is_string($includePath)) { + $this->includePath = array($includePath); + } elseif (is_array($includePath)) { + $this->includePath = $includePath; + } + } + + /** + * sets the include path(s) to where the given template filename must be looked up + * + * @param mixed $paths the path to look into, can be string for a single path or an array of paths + */ + public function setIncludePath($paths) + { + if (is_array($paths) === false) { + $paths = array($paths); + } + + $this->includePath = $paths; + $this->resolvedPath = null; + } + + /** + * return the current include path(s) + * + * @return array + */ + public function getIncludePath() + { + return $this->includePath; + } + + /** + * Checks if compiled file is valid (exists and it's the modification is greater or + * equal to the modification time of the template file) + * + * @param string file + * @return boolean True cache file existance and it's modification time + */ + protected function isValidCompiledFile($file) { + return parent::isValidCompiledFile($file) && (int)$this->getUid() <= filemtime($file); + } + + /** + * returns the template source of this template + * + * @return string + */ + public function getSource() + { + return file_get_contents($this->getResourceIdentifier()); + } + + /** + * returns the resource name for this template class + * + * @return string + */ + public function getResourceName() + { + return 'file'; + } + + /** + * returns this template's source filename + * + * @return string + */ + public function getResourceIdentifier() + { + if ($this->resolvedPath !== null) { + return $this->resolvedPath; + } elseif ($this->includePath === null) { + return $this->file; + } else { + foreach ($this->includePath as $path) { + $path = rtrim($path, DIRECTORY_SEPARATOR); + if (file_exists($path.DIRECTORY_SEPARATOR.$this->file) === true) { + $this->resolvedPath = $path . DIRECTORY_SEPARATOR . $this->file; + return $this->resolvedPath; + } + } + + throw new Dwoo_Exception('Template "'.$this->file.'" could not be found in any of your include path(s)'); + } + } + + /** + * returns an unique value identifying the current version of this template, + * in this case it's the unix timestamp of the last modification + * + * @return string + */ + public function getUid() + { + return (string) filemtime($this->getResourceIdentifier()); + } + + /** + * returns a new template object from the given include name, null if no include is + * possible (resource not found), or false if include is not permitted by this resource type + * + * @param Dwoo $dwoo the dwoo instance requiring it + * @param mixed $resourceId the filename (relative to this template's dir) of the template to include + * @param int $cacheTime duration of the cache validity for this template, + * if null it defaults to the Dwoo instance that will + * render this template + * @param string $cacheId the unique cache identifier of this page or anything else that + * makes this template's content unique, if null it defaults + * to the current url + * @param string $compileId the unique compiled identifier, which is used to distinguish this + * template from others, if null it defaults to the filename+bits of the path + * @param Dwoo_ITemplate $parentTemplate the template that is requesting a new template object (through + * an include, extends or any other plugin) + * @return Dwoo_Template_File|null + */ + public static function templateFactory(Dwoo $dwoo, $resourceId, $cacheTime = null, $cacheId = null, $compileId = null, Dwoo_ITemplate $parentTemplate = null) + { + if (DIRECTORY_SEPARATOR === '\\') { + $resourceId = str_replace(array("\t", "\n", "\r", "\f", "\v"), array('\\t', '\\n', '\\r', '\\f', '\\v'), $resourceId); + } + $resourceId = strtr($resourceId, '\\', '/'); + + $includePath = null; + + if (file_exists($resourceId) === false) { + if ($parentTemplate === null) { + $parentTemplate = $dwoo->getTemplate(); + } + if ($parentTemplate instanceof Dwoo_Template_File) { + if ($includePath = $parentTemplate->getIncludePath()) { + if (strstr($resourceId, '../')) { + throw new Dwoo_Exception('When using an include path you can not reference a template into a parent directory (using ../)'); + } + } else { + $resourceId = dirname($parentTemplate->getResourceIdentifier()).DIRECTORY_SEPARATOR.$resourceId; + if (file_exists($resourceId) === false) { + return null; + } + } + } else { + return null; + } + } + + if ($policy = $dwoo->getSecurityPolicy()) { + while (true) { + if (preg_match('{^([a-z]+?)://}i', $resourceId)) { + throw new Dwoo_Security_Exception('The security policy prevents you to read files from external sources : '.$resourceId.'.'); + } + + if ($includePath) { + break; + } + + $resourceId = realpath($resourceId); + $dirs = $policy->getAllowedDirectories(); + foreach ($dirs as $dir=>$dummy) { + if (strpos($resourceId, $dir) === 0) { + break 2; + } + } + throw new Dwoo_Security_Exception('The security policy prevents you to read '.$resourceId.''); + } + } + + $class = 'Dwoo_Template_File'; + if ($parentTemplate) { + $class = get_class($parentTemplate); + } + return new $class($resourceId, $cacheTime, $cacheId, $compileId, $includePath); + } + + /** + * returns the full compiled file name and assigns a default value to it if + * required + * + * @param Dwoo $dwoo the dwoo instance that requests the file name + * @return string the full path to the compiled file + */ + protected function getCompiledFilename(Dwoo $dwoo) + { + // no compile id was provided, set default + if ($this->compileId===null) { + $this->compileId = str_replace('../', '__', strtr($this->getResourceIdentifier(), '\\:', '/-')); + } + return $dwoo->getCompileDir() . $this->compileId.'.d'.Dwoo::RELEASE_TAG.'.php'; + } + + /** + * returns some php code that will check if this template has been modified or not + * + * if the function returns null, the template will be instanciated and then the Uid checked + * + * @return string + */ + public function getIsModifiedCode() + { + return '"'.$this->getUid().'" == filemtime('.var_export($this->getResourceIdentifier(), true).')'; + } +} diff --git a/_piecrust/libs/Dwoo/Dwoo/Template/String.php b/_piecrust/libs/Dwoo/Dwoo/Template/String.php new file mode 100644 index 0000000..1274027 --- /dev/null +++ b/_piecrust/libs/Dwoo/Dwoo/Template/String.php @@ -0,0 +1,497 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.1.0 + * @date 2009-07-18 + * @package Dwoo + */ +class Dwoo_Template_String implements Dwoo_ITemplate +{ + /** + * template name + * + * @var string + */ + protected $name; + + /** + * template compilation id + * + * @var string + */ + protected $compileId; + + /** + * template cache id, if not provided in the constructor, it is set to + * the md4 hash of the request_uri. it is however highly recommended to + * provide one that will fit your needs. + * + * in all cases, the compilation id is prepended to the cache id to separate + * templates with similar cache ids from one another + * + * @var string + */ + protected $cacheId; + + /** + * validity duration of the generated cache file (in seconds) + * + * set to -1 for infinite cache, 0 to disable and null to inherit the Dwoo instance's cache time + * + * @var int + */ + protected $cacheTime; + + /** + * boolean flag that defines whether the compilation should be enforced (once) or + * not use this if you have issues with the compiled templates not being updated + * but if you do need this it's most likely that you should file a bug report + * + * @var bool + */ + protected $compilationEnforced; + + /** + * caches the results of the file checks to save some time when the same + * templates is rendered several times + * + * @var array + */ + protected static $cache = array('cached'=>array(), 'compiled'=>array()); + + /** + * holds the compiler that built this template + * + * @var Dwoo_ICompiler + */ + protected $compiler; + + /** + * chmod value for all files written (cached or compiled ones) + * + * set to null if you don't want any chmod operation to happen + * + * @var int + */ + protected $chmod = 0777; + + /** + * creates a template from a string + * + * @param string $templateString the template to use + * @param int $cacheTime duration of the cache validity for this template, + * if null it defaults to the Dwoo instance that will + * render this template, set to -1 for infinite cache or 0 to disable + * @param string $cacheId the unique cache identifier of this page or anything else that + * makes this template's content unique, if null it defaults + * to the current url + * @param string $compileId the unique compiled identifier, which is used to distinguish this + * template from others, if null it defaults to the md4 hash of the template + */ + public function __construct($templateString, $cacheTime = null, $cacheId = null, $compileId = null) + { + $this->template = $templateString; + if (function_exists('hash')) { + $this->name = hash('md4', $templateString); + } else { + $this->name = md5($templateString); + } + $this->cacheTime = $cacheTime; + + if ($compileId !== null) { + $this->compileId = str_replace('../', '__', strtr($compileId, '\\%?=!:;'.PATH_SEPARATOR, '/-------')); + } + + if ($cacheId !== null) { + $this->cacheId = str_replace('../', '__', strtr($cacheId, '\\%?=!:;'.PATH_SEPARATOR, '/-------')); + } + } + + /** + * returns the cache duration for this template + * + * defaults to null if it was not provided + * + * @return int|null + */ + public function getCacheTime() + { + return $this->cacheTime; + } + + /** + * sets the cache duration for this template + * + * can be used to set it after the object is created if you did not provide + * it in the constructor + * + * @param int $seconds duration of the cache validity for this template, if + * null it defaults to the Dwoo instance's cache time. 0 = disable and + * -1 = infinite cache + */ + public function setCacheTime($seconds = null) + { + $this->cacheTime = $seconds; + } + + /** + * returns the chmod value for all files written (cached or compiled ones) + * + * defaults to 0777 + * + * @return int|null + */ + public function getChmod() + { + return $this->chmod; + } + + /** + * set the chmod value for all files written (cached or compiled ones) + * + * set to null if you don't want to do any chmod() operation + * + * @param int $mask new bitmask to use for all files + */ + public function setChmod($mask = null) + { + $this->chmod = $mask; + } + + /** + * returns the template name + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * returns the resource name for this template class + * + * @return string + */ + public function getResourceName() + { + return 'string'; + } + + /** + * returns the resource identifier for this template, false here as strings don't have identifiers + * + * @return false + */ + public function getResourceIdentifier() + { + return false; + } + + /** + * returns the template source of this template + * + * @return string + */ + public function getSource() + { + return $this->template; + } + + /** + * returns an unique value identifying the current version of this template, + * in this case it's the md4 hash of the content + * + * @return string + */ + public function getUid() + { + return $this->name; + } + + /** + * returns the compiler used by this template, if it was just compiled, or null + * + * @return Dwoo_ICompiler + */ + public function getCompiler() + { + return $this->compiler; + } + + /** + * marks this template as compile-forced, which means it will be recompiled even if it + * was already saved and wasn't modified since the last compilation. do not use this in production, + * it's only meant to be used in development (and the development of dwoo particularly) + */ + public function forceCompilation() + { + $this->compilationEnforced = true; + } + + /** + * returns the cached template output file name, true if it's cache-able but not cached + * or false if it's not cached + * + * @param Dwoo $dwoo the dwoo instance that requests it + * @return string|bool + */ + public function getCachedTemplate(Dwoo $dwoo) + { + if ($this->cacheTime !== null) { + $cacheLength = $this->cacheTime; + } else { + $cacheLength = $dwoo->getCacheTime(); + } + + // file is not cacheable + if ($cacheLength === 0) { + return false; + } + + $cachedFile = $this->getCacheFilename($dwoo); + + if (isset(self::$cache['cached'][$this->cacheId]) === true && file_exists($cachedFile)) { + // already checked, return cache file + return $cachedFile; + } elseif ($this->compilationEnforced !== true && file_exists($cachedFile) && ($cacheLength === -1 || filemtime($cachedFile) > ($_SERVER['REQUEST_TIME'] - $cacheLength)) && $this->isValidCompiledFile($this->getCompiledFilename($dwoo))) { + // cache is still valid and can be loaded + self::$cache['cached'][$this->cacheId] = true; + return $cachedFile; + } else { + // file is cacheable + return true; + } + } + + /** + * caches the provided output into the cache file + * + * @param Dwoo $dwoo the dwoo instance that requests it + * @param string $output the template output + * @return mixed full path of the cached file or false upon failure + */ + public function cache(Dwoo $dwoo, $output) + { + $cacheDir = $dwoo->getCacheDir(); + $cachedFile = $this->getCacheFilename($dwoo); + + // the code below is courtesy of Rasmus Schultz, + // thanks for his help on avoiding concurency issues + $temp = tempnam($cacheDir, 'temp'); + if (!($file = @fopen($temp, 'wb'))) { + $temp = $cacheDir . uniqid('temp'); + if (!($file = @fopen($temp, 'wb'))) { + trigger_error('Error writing temporary file \''.$temp.'\'', E_USER_WARNING); + return false; + } + } + + fwrite($file, $output); + fclose($file); + + $this->makeDirectory(dirname($cachedFile), $cacheDir); + if (!@rename($temp, $cachedFile)) { + @unlink($cachedFile); + @rename($temp, $cachedFile); + } + + if ($this->chmod !== null) { + chmod($cachedFile, $this->chmod); + } + + self::$cache['cached'][$this->cacheId] = true; + + return $cachedFile; + } + + /** + * clears the cached template if it's older than the given time + * + * @param Dwoo $dwoo the dwoo instance that was used to cache that template + * @param int $olderThan minimum time (in seconds) required for the cache to be cleared + * @return bool true if the cache was not present or if it was deleted, false if it remains there + */ + public function clearCache(Dwoo $dwoo, $olderThan = -1) + { + $cachedFile = $this->getCacheFilename($dwoo); + + return !file_exists($cachedFile) || (filectime($cachedFile) < (time() - $olderThan) && unlink($cachedFile)); + } + + /** + * returns the compiled template file name + * + * @param Dwoo $dwoo the dwoo instance that requests it + * @param Dwoo_ICompiler $compiler the compiler that must be used + * @return string + */ + public function getCompiledTemplate(Dwoo $dwoo, Dwoo_ICompiler $compiler = null) + { + $compiledFile = $this->getCompiledFilename($dwoo); + + if ($this->compilationEnforced !== true && isset(self::$cache['compiled'][$this->compileId]) === true) { + // already checked, return compiled file + } elseif ($this->compilationEnforced !== true && $this->isValidCompiledFile($compiledFile)) { + // template is compiled + self::$cache['compiled'][$this->compileId] = true; + } else { + // compiles the template + $this->compilationEnforced = false; + + if ($compiler === null) { + $compiler = $dwoo->getDefaultCompilerFactory($this->getResourceName()); + + if ($compiler === null || $compiler === array('Dwoo_Compiler', 'compilerFactory')) { + if (class_exists('Dwoo_Compiler', false) === false) { + include DWOO_DIRECTORY . 'Dwoo/Compiler.php'; + } + $compiler = Dwoo_Compiler::compilerFactory(); + } else { + $compiler = call_user_func($compiler); + } + } + + $this->compiler = $compiler; + + $compiler->setCustomPlugins($dwoo->getCustomPlugins()); + $compiler->setSecurityPolicy($dwoo->getSecurityPolicy()); + $this->makeDirectory(dirname($compiledFile), $dwoo->getCompileDir()); + file_put_contents($compiledFile, $compiler->compile($dwoo, $this)); + if ($this->chmod !== null) { + chmod($compiledFile, $this->chmod); + } + + self::$cache['compiled'][$this->compileId] = true; + } + + return $compiledFile; + } + + /** + * Checks if compiled file is valid (it exists) + * + * @param string file + * @return boolean True cache file existance + */ + protected function isValidCompiledFile($file) { + return file_exists($file); + } + + /** + * returns a new template string object with the resource id being the template source code + * + * @param Dwoo $dwoo the dwoo instance requiring it + * @param mixed $resourceId the filename (relative to this template's dir) of the template to include + * @param int $cacheTime duration of the cache validity for this template, + * if null it defaults to the Dwoo instance that will + * render this template + * @param string $cacheId the unique cache identifier of this page or anything else that + * makes this template's content unique, if null it defaults + * to the current url + * @param string $compileId the unique compiled identifier, which is used to distinguish this + * template from others, if null it defaults to the filename+bits of the path + * @param Dwoo_ITemplate $parentTemplate the template that is requesting a new template object (through + * an include, extends or any other plugin) + * @return Dwoo_Template_String + */ + public static function templateFactory(Dwoo $dwoo, $resourceId, $cacheTime = null, $cacheId = null, $compileId = null, Dwoo_ITemplate $parentTemplate = null) + { + return new self($resourceId, $cacheTime, $cacheId, $compileId); + } + + /** + * returns the full compiled file name and assigns a default value to it if + * required + * + * @param Dwoo $dwoo the dwoo instance that requests the file name + * @return string the full path to the compiled file + */ + protected function getCompiledFilename(Dwoo $dwoo) + { + // no compile id was provided, set default + if ($this->compileId===null) { + $this->compileId = $this->name; + } + return $dwoo->getCompileDir() . $this->compileId.'.d'.Dwoo::RELEASE_TAG.'.php'; + } + + /** + * returns the full cached file name and assigns a default value to it if + * required + * + * @param Dwoo $dwoo the dwoo instance that requests the file name + * @return string the full path to the cached file + */ + protected function getCacheFilename(Dwoo $dwoo) + { + // no cache id provided, use request_uri as default + if ($this->cacheId === null) { + if (isset($_SERVER['REQUEST_URI']) === true) { + $cacheId = $_SERVER['REQUEST_URI']; + } elseif (isset($_SERVER['SCRIPT_FILENAME']) && isset($_SERVER['argv'])) { + $cacheId = $_SERVER['SCRIPT_FILENAME'].'-'.implode('-', $_SERVER['argv']); + } else { + $cacheId = ''; + } + // force compiled id generation + $this->getCompiledFilename($dwoo); + + $this->cacheId = str_replace('../', '__', $this->compileId . strtr($cacheId, '\\%?=!:;'.PATH_SEPARATOR, '/-------')); + } + return $dwoo->getCacheDir() . $this->cacheId.'.html'; + } + + /** + * returns some php code that will check if this template has been modified or not + * + * if the function returns null, the template will be instanciated and then the Uid checked + * + * @return string + */ + public function getIsModifiedCode() + { + return null; + } + + /** + * ensures the given path exists + * + * @param string $path any path + * @param string $baseDir the base directory where the directory is created + * ($path must still contain the full path, $baseDir + * is only used for unix permissions) + */ + protected function makeDirectory($path, $baseDir = null) + { + if (is_dir($path) === true) { + return; + } + + if ($this->chmod === null) { + $chmod = 0777; + } else { + $chmod = $this->chmod; + } + mkdir($path, $chmod, true); + + // enforce the correct mode for all directories created + if (strpos(PHP_OS, 'WIN') !== 0 && $baseDir !== null) { + $path = strtr(str_replace($baseDir, '', $path), '\\', '/'); + $folders = explode('/', trim($path, '/')); + foreach ($folders as $folder) { + $baseDir .= $folder . DIRECTORY_SEPARATOR; + chmod($baseDir, $chmod); + } + } + } +} diff --git a/_piecrust/libs/Dwoo/LICENSE b/_piecrust/libs/Dwoo/LICENSE new file mode 100644 index 0000000..55dd4a4 --- /dev/null +++ b/_piecrust/libs/Dwoo/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2008, Dwoo / Jordi Boggiano +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Dwoo nor the names of its contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY JORDI BOGGIANO ''AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL JORDI BOGGIANO BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/README b/_piecrust/libs/Dwoo/README new file mode 100644 index 0000000..317179a --- /dev/null +++ b/_piecrust/libs/Dwoo/README @@ -0,0 +1,79 @@ +----------------------------------------------------------------------------- +-- WHAT IS DWOO? readme - version 1.0.0 +----------------------------------------------------------------------------- +Dwoo is a PHP5 Template Engine that was started in early 2008. The idea came +from the fact that Smarty, a well known template engine, is getting older and +older. It carries the weight of it's age, having old features that are +inconsistent compared to newer ones, being written for PHP4 its Object +Oriented aspect doesn't take advantage of PHP5's more advanced features in +the area, etc. Hence Dwoo was born, hoping to provide a more up to date and +stronger engine. + +So far it has proven to be faster than Smarty in many areas, and it provides +a compatibility layer to allow developers that have been using Smarty for +years to switch their application over to Dwoo progressively. + +----------------------------------------------------------------------------- +-- DOCUMENTATION +----------------------------------------------------------------------------- +Dwoo's website to get the latest version is at http://dwoo.org/ + +The wiki/documentation pages are available at http://wiki.dwoo.org/ + +----------------------------------------------------------------------------- +-- LICENSE +----------------------------------------------------------------------------- +Dwoo is released under the Modified BSD license. +See the LICENSE file included in the archive or go to the URL below to obtain +a copy. + +http://dwoo.org/LICENSE + +----------------------------------------------------------------------------- +-- QUICK START - RUNNING DWOO +----------------------------------------------------------------------------- +/***************************** Basic Example *******************************/ +// Include the main class (it should handle the rest on its own) +include 'path/to/dwooAutoload.php'; + +// Create the controller, this is reusable +$dwoo = new Dwoo(); + +// Load a template file (name it as you please), this is reusable +// if you want to render multiple times the same template with different data +$tpl = new Dwoo_Template_File('path/to/index.tpl'); + +// Create a data set, if you don't like this you can directly input an +// associative array in $dwoo->output() +$data = new Dwoo_Data(); +// Fill it with some data +$data->assign('foo', 'BAR'); +$data->assign('bar', 'BAZ'); + +// Outputs the result ... +$dwoo->output($tpl, $data); +// ... or get it to use it somewhere else +$dwoo->get($tpl, $data); + +/***************************** Loop Example *******************************/ +// To loop over multiple articles of a blog for instance, if you have a +// template file representing an article, you could do the following : + +include 'path/to/dwooAutoload.php'; + +$dwoo = new Dwoo(); +$tpl = new Dwoo_Template_File('path/to/article.tpl'); + +$pageContent = ''; + +// Loop over articles that have been retrieved from the DB +foreach($articles as $article) { + // Either associate variables one by one + $data = new Dwoo_Data(); + $data->assign('title', $article['title']; + $data->assign('content', $article['content']); + $pageContent .= $dwoo->get($tpl, $data); + + // Or use the article directly (which is a lot easier in this case) + $pageContent .= $dwoo->get($tpl, $article); +} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/UPGRADE_NOTES b/_piecrust/libs/Dwoo/UPGRADE_NOTES new file mode 100644 index 0000000..5f01896 --- /dev/null +++ b/_piecrust/libs/Dwoo/UPGRADE_NOTES @@ -0,0 +1,65 @@ +----------------------------------------------------------------------------- +-- Upgrading to Dwoo v1.0.0beta +----------------------------------------------------------------------------- + +1. Dwoo classes loading +----------------------- + +While everything was previously included by Dwoo.php, this version introduces +an autoload function (dwooAutoload) that handles this automatically. This +means your choices are now : + +a) change your : include 'path/to/Dwoo.php'; + into : include 'path/to/dwooAutoload.php'; + this is the recommended setting, especially during development, so that if you + are seeing a Dwoo error and want to report a bug, you get proper line numbers + with the error and not just "error in Dwoo.compiled.php at line 2" + +b) use the compiled version of Dwoo, this is "experimental" and seems to provide better + performances mostly under windows, with a linux server it might imrpove performances + slightly if you have an opcode cache (APC, xcache, ..) : + include 'path/to/Dwoo.compiled.php'; + +c) load Dwoo classes yourself somehow, as part of your autoload function or + whatever suits you best + +----------------------------------------------------------------------------- +-- Upgrading to Dwoo v0.9.2 +----------------------------------------------------------------------------- + +1. Block plugins +---------------- + +This version introduced a backward compatibility break with block plugins, this +was needed to allow compile-time access to the block's (parsed) content, be +very careful if you manipulate this content since it is php code and should remain +so if you don't want syntax errors (which are fatal) during template run. + +Error message : + + Strict Standards: Declaration of Dwoo_Plugin_*::postProcessing() should be compatible with that of Dwoo_Block_Plugin::postProcessing() + +Solution : + + * Change your block plugins postProcessing method declaration to the following : + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + + * Then add "$content" to the beginning of your return value, or modify it if required + +2. Strip modifier +----------------- + +The strip modifier had the same name as the strip block, this worked when the block +was hard coded within the compiler, but with the API change (see above) I was able +to move it to a plugin. Since both plugins don't have the same purpose, there was +a real problem and I had to rename it. The renaming will be handled by the smarty compatibility +layer, but if you used it without smarty compatibility, you should edit your templates. + +3. DWOO_COMPILE_DIRECTORY and DWOO_CACHE_DIRECTORY constants +------------------------------------------------------------ + +If you used those before, you will now get an exception when loading Dwoo. This is done +on purpose to help people to make the transition to the new method of doing it : + + $dwoo = new Dwoo('myCompileDir', 'myCacheDir'); \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/dwooAutoload.php b/_piecrust/libs/Dwoo/dwooAutoload.php new file mode 100644 index 0000000..da93f91 --- /dev/null +++ b/_piecrust/libs/Dwoo/dwooAutoload.php @@ -0,0 +1,12 @@ + + * * href : the target URI where the link must point + * * rest : any other attributes you want to add to the tag can be added as named parameters + * + * + * Example : + * + * + * {* Create a simple link out of an url variable and add a special class attribute: *} + * + * {a $url class="external" /} + * + * {* Mark a link as active depending on some other variable : *} + * + * {a $link.url class=tif($link.active "active"); $link.title /} + * + * {* This is similar to: {$link.title} *} + * + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Plugin_a extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block +{ + public function init($href, array $rest=array()) + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + $p = $compiler->getCompiledParams($params); + + $out = Dwoo_Compiler::PHP_OPEN . 'echo \'\';' . Dwoo_Compiler::PHP_CLOSE; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + $p = $compiler->getCompiledParams($params); + + // no content was provided so use the url as display text + if ($content == "") { + // merge into the href if href is a string + if (substr($p['href'], -1) === '"' || substr($p['href'], -1) === '\'') { + return Dwoo_Compiler::PHP_OPEN . 'echo '.substr($p['href'], 0, -1).''.substr($p['href'], -1).';'.Dwoo_Compiler::PHP_CLOSE; + } + // otherwise append + return Dwoo_Compiler::PHP_OPEN . 'echo '.$p['href'].'.\'\';'.Dwoo_Compiler::PHP_CLOSE; + } + + // return content + return $content . ''; + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/auto_escape.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/auto_escape.php new file mode 100644 index 0000000..2a3d67c --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/auto_escape.php @@ -0,0 +1,61 @@ + + * * enabled : if set to "on", "enable", true or 1 then the compiler autoescaping is enabled inside this block. set to "off", "disable", false or 0 to disable it + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Plugin_auto_escape extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block +{ + protected static $stack = array(); + + public function init($enabled) + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + $params = $compiler->getCompiledParams($params); + switch(strtolower(trim((string) $params['enabled'], '"\''))) { + + case 'on': + case 'true': + case 'enabled': + case 'enable': + case '1': + $enable = true; + break; + case 'off': + case 'false': + case 'disabled': + case 'disable': + case '0': + $enable = false; + break; + default: + throw new Dwoo_Compilation_Exception($compiler, 'Auto_Escape : Invalid parameter ('.$params['enabled'].'), valid parameters are "enable"/true or "disable"/false'); + + } + + self::$stack[] = $compiler->getAutoEscape(); + $compiler->setAutoEscape($enable); + return ''; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + $compiler->setAutoEscape(array_pop(self::$stack)); + return $content; + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/block.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/block.php new file mode 100644 index 0000000..1cf981a --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/block.php @@ -0,0 +1,34 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Plugin_block extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block +{ + public function init($name='') + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + return ''; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + return $content; + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/capture.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/capture.php new file mode 100644 index 0000000..7e15f44 --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/capture.php @@ -0,0 +1,61 @@ + + * * name : capture name, used to read the value afterwards + * * assign : if set, the value is also saved in the given variable + * * cat : if true, the value is appended to the previous one (if any) instead of overwriting it + * + * If the cat parameter is true, the content + * will be appended to the existing content + * + * Example : + * + * + * {capture "foo"} + * Anything in here won't show, it will be saved for later use.. + * {/capture} + * Output was : {$.capture.foo} + * + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Plugin_capture extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block +{ + public function init($name = 'default', $assign = null, $cat = false, $trim = false) + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + return Dwoo_Compiler::PHP_OPEN.$prepend.'ob_start();'.$append.Dwoo_Compiler::PHP_CLOSE; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + $params = $compiler->getCompiledParams($params); + + $out = $content . Dwoo_Compiler::PHP_OPEN.$prepend."\n".'$tmp = ob_get_clean();'; + if ($params['trim'] !== 'false' && $params['trim'] !== 0) { + $out .= "\n".'$tmp = trim($tmp);'; + } + if ($params['cat'] === 'true' || $params['cat'] === 1) { + $out .= "\n".'$tmp = $this->readVar(\'dwoo.capture.\'.'.$params['name'].') . $tmp;'; + } + if ($params['assign'] !== 'null') { + $out .= "\n".'$this->scope['.$params['assign'].'] = $tmp;'; + } + return $out . "\n".'$this->globals[\'capture\']['.$params['name'].'] = $tmp;'.$append.Dwoo_Compiler::PHP_CLOSE; + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/dynamic.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/dynamic.php new file mode 100644 index 0000000..e8251bc --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/dynamic.php @@ -0,0 +1,65 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Plugin_dynamic extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block +{ + public function init() + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + return ''; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + $output = Dwoo_Compiler::PHP_OPEN . + 'if($doCache) {'."\n\t". + 'echo \''. + str_replace('\'', '\\\'', $content) . + '\';'. + "\n} else {\n\t"; + if(substr($content, 0, strlen(Dwoo_Compiler::PHP_OPEN)) == Dwoo_Compiler::PHP_OPEN) { + $output .= substr($content, strlen(Dwoo_Compiler::PHP_OPEN)); + } else { + $output .= Dwoo_Compiler::PHP_CLOSE . $content; + } + if(substr($output, -strlen(Dwoo_Compiler::PHP_CLOSE)) == Dwoo_Compiler::PHP_CLOSE) { + $output = substr($output, 0, -strlen(Dwoo_Compiler::PHP_CLOSE)); + } else { + $output .= Dwoo_Compiler::PHP_OPEN; + } + $output .= "\n}". Dwoo_Compiler::PHP_CLOSE; + + return $output; + } + + public static function unescape($output, $dynamicId, $compiledFile) + { + $output = preg_replace_callback('/(.+?)<\/dwoo:dynamic_'.$dynamicId.'>/s', array('self', 'unescapePhp'), $output, -1, $count); + // re-add the includes on top of the file + if ($count && preg_match('#/\* template head \*/(.+?)/\* end template head \*/#s', file_get_contents($compiledFile), $m)) { + $output = ''.$output; + } + return $output; + } + + public static function unescapePhp($match) + { + return preg_replace('{<\?php /\*'.$match[1].'\*/ echo \'(.+?)\'; \?>}s', '$1', $match[2]); + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/else.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/else.php new file mode 100644 index 0000000..2dd493c --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/else.php @@ -0,0 +1,63 @@ + + * {foreach $array val} + * $array is not empty so we display it's values : {$val} + * {else} + * if this shows, it means that $array is empty or doesn't exist. + * {/foreach} + * + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Plugin_else extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block +{ + public function init() + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + $preContent = ''; + while (true) { + $preContent .= $compiler->removeTopBlock(); + $block =& $compiler->getCurrentBlock(); + $interfaces = class_implements($block['class'], false); + if (in_array('Dwoo_IElseable', $interfaces) !== false) { + break; + } + } + + $params['initialized'] = true; + $compiler->injectBlock($type, $params); + return $preContent; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + if (!isset($params['initialized'])) { + return ''; + } + + $block =& $compiler->getCurrentBlock(); + $block['params']['hasElse'] = Dwoo_Compiler::PHP_OPEN."else {\n".Dwoo_Compiler::PHP_CLOSE . $content . Dwoo_Compiler::PHP_OPEN."\n}".Dwoo_Compiler::PHP_CLOSE; + return ''; + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/elseif.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/elseif.php new file mode 100644 index 0000000..b7d0585 --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/elseif.php @@ -0,0 +1,60 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Plugin_elseif extends Dwoo_Plugin_if implements Dwoo_ICompilable_Block, Dwoo_IElseable +{ + public function init(array $rest) + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + $preContent = ''; + while (true) { + $preContent .= $compiler->removeTopBlock(); + $block =& $compiler->getCurrentBlock(); + $interfaces = class_implements($block['class'], false); + if (in_array('Dwoo_IElseable', $interfaces) !== false) { + break; + } + } + + $params['initialized'] = true; + $compiler->injectBlock($type, $params); + return $preContent; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + if (!isset($params['initialized'])) { + return ''; + } + + $params = $compiler->getCompiledParams($params); + + $pre = Dwoo_Compiler::PHP_OPEN."elseif (".implode(' ', self::replaceKeywords($params['*'], $compiler)).") {\n" . Dwoo_Compiler::PHP_CLOSE; + $post = Dwoo_Compiler::PHP_OPEN."\n}".Dwoo_Compiler::PHP_CLOSE; + + if (isset($params['hasElse'])) { + $post .= $params['hasElse']; + } + + $block =& $compiler->getCurrentBlock(); + $block['params']['hasElse'] = $pre . $content . $post; + return ''; + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/for.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/for.php new file mode 100644 index 0000000..01a75e8 --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/for.php @@ -0,0 +1,147 @@ + + * * name : for name to access it's iterator variables through {$.for.name.var} see {@link http://wiki.dwoo.org/index.php/IteratorVariables} for details + * * from : array to iterate from (which equals 0) or a number as a start value + * * to : value to stop iterating at (equals count($array) by default if you set an array in from) + * * step : defines the incrementation of the pointer at each iteration + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.1.0 + * @date 2009-07-18 + * @package Dwoo + */ +class Dwoo_Plugin_for extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block, Dwoo_IElseable +{ + public static $cnt=0; + + public function init($name, $from, $to=null, $step=1, $skip=0) + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + // get block params and save the current template pointer to use it in the postProcessing method + $currentBlock =& $compiler->getCurrentBlock(); + $currentBlock['params']['tplPointer'] = $compiler->getPointer(); + + return ''; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + $params = $compiler->getCompiledParams($params); + $tpl = $compiler->getTemplateSource($params['tplPointer']); + + // assigns params + $from = $params['from']; + $name = $params['name']; + $step = $params['step']; + $to = $params['to']; + + // evaluates which global variables have to be computed + $varName = '$dwoo.for.'.trim($name, '"\'').'.'; + $shortVarName = '$.for.'.trim($name, '"\'').'.'; + $usesAny = strpos($tpl, $varName) !== false || strpos($tpl, $shortVarName) !== false; + $usesFirst = strpos($tpl, $varName.'first') !== false || strpos($tpl, $shortVarName.'first') !== false; + $usesLast = strpos($tpl, $varName.'last') !== false || strpos($tpl, $shortVarName.'last') !== false; + $usesIndex = strpos($tpl, $varName.'index') !== false || strpos($tpl, $shortVarName.'index') !== false; + $usesIteration = $usesFirst || $usesLast || strpos($tpl, $varName.'iteration') !== false || strpos($tpl, $shortVarName.'iteration') !== false; + $usesShow = strpos($tpl, $varName.'show') !== false || strpos($tpl, $shortVarName.'show') !== false; + $usesTotal = $usesLast || strpos($tpl, $varName.'total') !== false || strpos($tpl, $shortVarName.'total') !== false; + + if (strpos($name, '$this->scope[') !== false) { + $usesAny = $usesFirst = $usesLast = $usesIndex = $usesIteration = $usesShow = $usesTotal = true; + } + + // gets foreach id + $cnt = self::$cnt++; + + // builds pre processing output for + $out = Dwoo_Compiler::PHP_OPEN . "\n".'$_for'.$cnt.'_from = '.$from.';'. + "\n".'$_for'.$cnt.'_to = '.$to.';'. + "\n".'$_for'.$cnt.'_step = abs('.$step.');'. + "\n".'if (is_numeric($_for'.$cnt.'_from) && !is_numeric($_for'.$cnt.'_to)) { $this->triggerError(\'For requires the to parameter when using a numerical from\'); }'. + "\n".'$tmp_shows = $this->isArray($_for'.$cnt.'_from, true) || (is_numeric($_for'.$cnt.'_from) && (abs(($_for'.$cnt.'_from - $_for'.$cnt.'_to)/$_for'.$cnt.'_step) !== 0 || $_for'.$cnt.'_from == $_for'.$cnt.'_to));'; + // adds foreach properties + if ($usesAny) { + $out .= "\n".'$this->globals["for"]['.$name.'] = array'."\n("; + if ($usesIndex) $out .="\n\t".'"index" => 0,'; + if ($usesIteration) $out .="\n\t".'"iteration" => 1,'; + if ($usesFirst) $out .="\n\t".'"first" => null,'; + if ($usesLast) $out .="\n\t".'"last" => null,'; + if ($usesShow) $out .="\n\t".'"show" => $tmp_shows,'; + if ($usesTotal) $out .="\n\t".'"total" => $this->isArray($_for'.$cnt.'_from) ? floor(count($_for'.$cnt.'_from) / $_for'.$cnt.'_step) : (is_numeric($_for'.$cnt.'_from) ? abs(($_for'.$cnt.'_to + 1 - $_for'.$cnt.'_from)/$_for'.$cnt.'_step) : 0),'; + $out.="\n);\n".'$_for'.$cnt.'_glob =& $this->globals["for"]['.$name.'];'; + } + // checks if for must be looped + $out .= "\n".'if ($tmp_shows)'."\n{"; + // set from/to to correct values if an array was given + $out .= "\n\t".'if ($this->isArray($_for'.$cnt.'_from, true)) { + $_for'.$cnt.'_to = is_numeric($_for'.$cnt.'_to) ? $_for'.$cnt.'_to - $_for'.$cnt.'_step : count($_for'.$cnt.'_from) - 1; + $_for'.$cnt.'_from = 0; + }'; + + // if input are pure numbers it shouldn't reorder them, if it's variables it gets too messy though so in that case a counter should be used + $reverse = false; + $condition = '<='; + $incrementer = '+'; + + if (preg_match('{^(["\']?)([0-9]+)\1$}', $from, $mN1) && preg_match('{^(["\']?)([0-9]+)\1$}', $to, $mN2)) { + $from = (int) $mN1[2]; + $to = (int) $mN2[2]; + if ($from > $to) { + $reverse = true; + $condition = '>='; + $incrementer = '-'; + } + } + + // reverse from and to if needed + if (!$reverse) { + $out .= "\n\t".'if ($_for'.$cnt.'_from > $_for'.$cnt.'_to) { + $tmp = $_for'.$cnt.'_from; + $_for'.$cnt.'_from = $_for'.$cnt.'_to; + $_for'.$cnt.'_to = $tmp; + }'; + } + + $out .= ' + for ($this->scope['.$name.'] = $_for'.$cnt.'_from; $this->scope['.$name.'] '.$condition.' $_for'.$cnt.'_to; $this->scope['.$name.'] '.$incrementer.'= $_for'.$cnt.'_step)'."\n\t{"; + // updates properties + if ($usesIndex) { + $out .="\n\t\t".'$_for'.$cnt.'_glob["index"] = $this->scope['.$name.'];'; + } + if ($usesFirst) { + $out .= "\n\t\t".'$_for'.$cnt.'_glob["first"] = (string) ($_for'.$cnt.'_glob["iteration"] === 1);'; + } + if ($usesLast) { + $out .= "\n\t\t".'$_for'.$cnt.'_glob["last"] = (string) ($_for'.$cnt.'_glob["iteration"] === $_for'.$cnt.'_glob["total"]);'; + } + $out .= "\n/* -- for start output */\n".Dwoo_Compiler::PHP_CLOSE; + + + // build post processing output and cache it + $postOut = Dwoo_Compiler::PHP_OPEN . '/* -- for end output */'; + // update properties + if ($usesIteration) { + $postOut .= "\n\t\t".'$_for'.$cnt.'_glob["iteration"]+=1;'; + } + // end loop + $postOut .= "\n\t}\n}\n".Dwoo_Compiler::PHP_CLOSE; + + if (isset($params['hasElse'])) { + $postOut .= $params['hasElse']; + } + + return $out . $content . $postOut; + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/foreach.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/foreach.php new file mode 100644 index 0000000..75f45d6 --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/foreach.php @@ -0,0 +1,152 @@ + + * * from : the array that you want to iterate over + * * key : variable name for the key (or for the item if item is not defined) + * * item : variable name for each item + * * name : foreach name to access it's iterator variables through {$.foreach.name.var} see {@link http://wiki.dwoo.org/index.php/IteratorVariables} for details + * + * Example : + * + * + * {foreach $array val} + * {$val.something} + * {/foreach} + * + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.1.0 + * @date 2009-07-18 + * @package Dwoo + */ +class Dwoo_Plugin_foreach extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block, Dwoo_IElseable +{ + public static $cnt=0; + + public function init($from, $key=null, $item=null, $name='default', $implode=null) + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + // get block params and save the current template pointer to use it in the postProcessing method + $currentBlock =& $compiler->getCurrentBlock(); + $currentBlock['params']['tplPointer'] = $compiler->getPointer(); + + return ''; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + $params = $compiler->getCompiledParams($params); + $tpl = $compiler->getTemplateSource($params['tplPointer']); + + // assigns params + $src = $params['from']; + + if ($params['item'] !== 'null') { + if ($params['key'] !== 'null') { + $key = $params['key']; + } + $val = $params['item']; + } elseif ($params['key'] !== 'null') { + $val = $params['key']; + } else { + throw new Dwoo_Compilation_Exception($compiler, 'Foreach item parameter missing'); + } + $name = $params['name']; + + if (substr($val, 0, 1) !== '"' && substr($val, 0, 1) !== '\'') { + throw new Dwoo_Compilation_Exception($compiler, 'Foreach item parameter must be of type string'); + } + if (isset($key) && substr($val, 0, 1) !== '"' && substr($val, 0, 1) !== '\'') { + throw new Dwoo_Compilation_Exception($compiler, 'Foreach key parameter must be of type string'); + } + + // evaluates which global variables have to be computed + $varName = '$dwoo.foreach.'.trim($name, '"\'').'.'; + $shortVarName = '$.foreach.'.trim($name, '"\'').'.'; + $usesAny = strpos($tpl, $varName) !== false || strpos($tpl, $shortVarName) !== false; + $usesFirst = strpos($tpl, $varName.'first') !== false || strpos($tpl, $shortVarName.'first') !== false; + $usesLast = strpos($tpl, $varName.'last') !== false || strpos($tpl, $shortVarName.'last') !== false; + $usesIndex = $usesFirst || strpos($tpl, $varName.'index') !== false || strpos($tpl, $shortVarName.'index') !== false; + $usesIteration = $usesLast || strpos($tpl, $varName.'iteration') !== false || strpos($tpl, $shortVarName.'iteration') !== false; + $usesShow = strpos($tpl, $varName.'show') !== false || strpos($tpl, $shortVarName.'show') !== false; + $usesTotal = $usesLast || strpos($tpl, $varName.'total') !== false || strpos($tpl, $shortVarName.'total') !== false; + + if (strpos($name, '$this->scope[') !== false) { + $usesAny = $usesFirst = $usesLast = $usesIndex = $usesIteration = $usesShow = $usesTotal = true; + } + + // override globals vars if implode is used + if ($params['implode'] !== 'null') { + $implode = $params['implode']; + $usesAny = true; + $usesLast = true; + $usesIteration = true; + $usesTotal = true; + } + + // gets foreach id + $cnt = self::$cnt++; + + // build pre content output + $pre = Dwoo_Compiler::PHP_OPEN . "\n".'$_fh'.$cnt.'_data = '.$src.';'; + // adds foreach properties + if ($usesAny) { + $pre .= "\n".'$this->globals["foreach"]['.$name.'] = array'."\n("; + if ($usesIndex) $pre .="\n\t".'"index" => 0,'; + if ($usesIteration) $pre .="\n\t".'"iteration" => 1,'; + if ($usesFirst) $pre .="\n\t".'"first" => null,'; + if ($usesLast) $pre .="\n\t".'"last" => null,'; + if ($usesShow) $pre .="\n\t".'"show" => $this->isArray($_fh'.$cnt.'_data, true),'; + if ($usesTotal) $pre .="\n\t".'"total" => $this->isArray($_fh'.$cnt.'_data) ? count($_fh'.$cnt.'_data) : 0,'; + $pre.="\n);\n".'$_fh'.$cnt.'_glob =& $this->globals["foreach"]['.$name.'];'; + } + // checks if foreach must be looped + $pre .= "\n".'if ($this->isArray($_fh'.$cnt.'_data'.(isset($params['hasElse']) ? ', true' : '').') === true)'."\n{"; + // iterates over keys + $pre .= "\n\t".'foreach ($_fh'.$cnt.'_data as '.(isset($key)?'$this->scope['.$key.']=>':'').'$this->scope['.$val.'])'."\n\t{"; + // updates properties + if ($usesFirst) { + $pre .= "\n\t\t".'$_fh'.$cnt.'_glob["first"] = (string) ($_fh'.$cnt.'_glob["index"] === 0);'; + } + if ($usesLast) { + $pre .= "\n\t\t".'$_fh'.$cnt.'_glob["last"] = (string) ($_fh'.$cnt.'_glob["iteration"] === $_fh'.$cnt.'_glob["total"]);'; + } + $pre .= "\n/* -- foreach start output */\n".Dwoo_Compiler::PHP_CLOSE; + + // build post content output + $post = Dwoo_Compiler::PHP_OPEN . "\n"; + + if (isset($implode)) { + $post .= '/* -- implode */'."\n".'if (!$_fh'.$cnt.'_glob["last"]) {'. + "\n\t".'echo '.$implode.";\n}\n"; + } + $post .= '/* -- foreach end output */'; + // update properties + if ($usesIndex) { + $post.="\n\t\t".'$_fh'.$cnt.'_glob["index"]+=1;'; + } + if ($usesIteration) { + $post.="\n\t\t".'$_fh'.$cnt.'_glob["iteration"]+=1;'; + } + // end loop + $post .= "\n\t}\n}".Dwoo_Compiler::PHP_CLOSE; + if (isset($params['hasElse'])) { + $post .= $params['hasElse']; + } + + return $pre . $content . $post; + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/foreachelse.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/foreachelse.php new file mode 100644 index 0000000..b8792e9 --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/foreachelse.php @@ -0,0 +1,43 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Plugin_foreachelse extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block +{ + public function init() + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + $with =& $compiler->findBlock('foreach', true); + + $params['initialized'] = true; + $compiler->injectBlock($type, $params); + + return ''; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + if (!isset($params['initialized'])) { + return ''; + } + + $block =& $compiler->getCurrentBlock(); + $block['params']['hasElse'] = Dwoo_Compiler::PHP_OPEN."else {\n".Dwoo_Compiler::PHP_CLOSE . $content . Dwoo_Compiler::PHP_OPEN."\n}".Dwoo_Compiler::PHP_CLOSE; + return ''; + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/forelse.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/forelse.php new file mode 100644 index 0000000..96db9c7 --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/forelse.php @@ -0,0 +1,43 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Plugin_forelse extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block +{ + public function init() + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + $with =& $compiler->findBlock('for', true); + + $params['initialized'] = true; + $compiler->injectBlock($type, $params); + + return ''; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + if (!isset($params['initialized'])) { + return ''; + } + + $block =& $compiler->getCurrentBlock(); + $block['params']['hasElse'] = Dwoo_Compiler::PHP_OPEN."else {\n".Dwoo_Compiler::PHP_CLOSE . $content . Dwoo_Compiler::PHP_OPEN."\n}".Dwoo_Compiler::PHP_CLOSE; + return ''; + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/if.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/if.php new file mode 100644 index 0000000..7587c3a --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/if.php @@ -0,0 +1,180 @@ + == + * neq or ne -> != + * gte or ge -> >= + * lte or le -> <= + * gt -> > + * lt -> < + * mod -> % + * not -> ! + * X is [not] div by Y -> (X % Y) == 0 + * X is [not] even [by Y] -> (X % 2) == 0 or ((X/Y) % 2) == 0 + * X is [not] odd [by Y] -> (X % 2) != 0 or ((X/Y) % 2) != 0 + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Plugin_if extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block, Dwoo_IElseable +{ + public function init(array $rest) + { + } + + public static function replaceKeywords(array $params, Dwoo_Compiler $compiler) + { + $p = array(); + + reset($params); + while (list($k,$v) = each($params)) { + $v = (string) $v; + if(substr($v, 0, 1) === '"' || substr($v, 0, 1) === '\'') { + $vmod = strtolower(substr($v, 1, -1)); + } else { + $vmod = strtolower($v); + } + switch($vmod) { + + case 'and': + $p[] = '&&'; + break; + case 'or': + $p[] = '||'; + break; + case '==': + case 'eq': + $p[] = '=='; + break; + case '<>': + case '!=': + case 'ne': + case 'neq': + $p[] = '!='; + break; + case '>=': + case 'gte': + case 'ge': + $p[] = '>='; + break; + case '<=': + case 'lte': + case 'le': + $p[] = '<='; + break; + case '>': + case 'gt': + $p[] = '>'; + break; + case '<': + case 'lt': + $p[] = '<'; + break; + case '===': + $p[] = '==='; + break; + case '!==': + $p[] = '!=='; + break; + case 'is': + if (isset($params[$k+1]) && strtolower(trim($params[$k+1], '"\'')) === 'not') { + $negate = true; + next($params); + } else { + $negate = false; + } + $ptr = 1+(int)$negate; + if (!isset($params[$k+$ptr])) { + $params[$k+$ptr] = ''; + } else { + $params[$k+$ptr] = trim($params[$k+$ptr], '"\''); + } + switch($params[$k+$ptr]) { + + case 'div': + if (isset($params[$k+$ptr+1]) && strtolower(trim($params[$k+$ptr+1], '"\'')) === 'by') { + $p[] = ' % '.$params[$k+$ptr+2].' '.($negate?'!':'=').'== 0'; + next($params); + next($params); + next($params); + } else { + throw new Dwoo_Compilation_Exception($compiler, 'If : Syntax error : syntax should be "if $a is [not] div by $b", found '.$params[$k-1].' is '.($negate?'not ':'').'div '.$params[$k+$ptr+1].' '.$params[$k+$ptr+2]); + } + break; + case 'even': + $a = array_pop($p); + if (isset($params[$k+$ptr+1]) && strtolower(trim($params[$k+$ptr+1], '"\'')) === 'by') { + $b = $params[$k+$ptr+2]; + $p[] = '('.$a .' / '.$b.') % 2 '.($negate?'!':'=').'== 0'; + next($params); + next($params); + } else { + $p[] = $a.' % 2 '.($negate?'!':'=').'== 0'; + } + next($params); + break; + case 'odd': + $a = array_pop($p); + if (isset($params[$k+$ptr+1]) && strtolower(trim($params[$k+$ptr+1], '"\'')) === 'by') { + $b = $params[$k+$ptr+2]; + $p[] = '('.$a .' / '.$b.') % 2 '.($negate?'=':'!').'== 0'; + next($params); + next($params); + } else { + $p[] = $a.' % 2 '.($negate?'=':'!').'== 0'; + } + next($params); + break; + default: + throw new Dwoo_Compilation_Exception($compiler, 'If : Syntax error : syntax should be "if $a is [not] (div|even|odd) [by $b]", found '.$params[$k-1].' is '.$params[$k+$ptr+1]); + + } + break; + case '%': + case 'mod': + $p[] = '%'; + break; + case '!': + case 'not': + $p[] = '!'; + break; + default: + $p[] = $v; + + } + } + + return $p; + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + return ''; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + $params = $compiler->getCompiledParams($params); + + $pre = Dwoo_Compiler::PHP_OPEN.'if ('.implode(' ', self::replaceKeywords($params['*'], $compiler)).") {\n".Dwoo_Compiler::PHP_CLOSE; + + $post = Dwoo_Compiler::PHP_OPEN."\n}".Dwoo_Compiler::PHP_CLOSE; + + if (isset($params['hasElse'])) { + $post .= $params['hasElse']; + } + + return $pre . $content . $post; + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/loop.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/loop.php new file mode 100644 index 0000000..651f722 --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/loop.php @@ -0,0 +1,128 @@ + + * * from : the array that you want to iterate over + * * name : loop name to access it's iterator variables through {$.loop.name.var} see {@link http://wiki.dwoo.org/index.php/IteratorVariables} for details + * + * Example : + * + * instead of a foreach block such as : + * + * + * {foreach $variable value} + * {$value.foo} {$value.bar} + * {/foreach} + * + * + * you can do : + * + * + * {loop $variable} + * {$foo} {$bar} + * {/loop} + * + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.1.0 + * @date 2009-07-18 + * @package Dwoo + */ +class Dwoo_Plugin_loop extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block, Dwoo_IElseable +{ + public static $cnt=0; + + public function init($from, $name='default') + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + // get block params and save the current template pointer to use it in the postProcessing method + $currentBlock =& $compiler->getCurrentBlock(); + $currentBlock['params']['tplPointer'] = $compiler->getPointer(); + + return ''; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + $params = $compiler->getCompiledParams($params); + $tpl = $compiler->getTemplateSource($params['tplPointer']); + + // assigns params + $src = $params['from']; + $name = $params['name']; + + // evaluates which global variables have to be computed + $varName = '$dwoo.loop.'.trim($name, '"\'').'.'; + $shortVarName = '$.loop.'.trim($name, '"\'').'.'; + $usesAny = strpos($tpl, $varName) !== false || strpos($tpl, $shortVarName) !== false; + $usesFirst = strpos($tpl, $varName.'first') !== false || strpos($tpl, $shortVarName.'first') !== false; + $usesLast = strpos($tpl, $varName.'last') !== false || strpos($tpl, $shortVarName.'last') !== false; + $usesIndex = $usesFirst || strpos($tpl, $varName.'index') !== false || strpos($tpl, $shortVarName.'index') !== false; + $usesIteration = $usesLast || strpos($tpl, $varName.'iteration') !== false || strpos($tpl, $shortVarName.'iteration') !== false; + $usesShow = strpos($tpl, $varName.'show') !== false || strpos($tpl, $shortVarName.'show') !== false; + $usesTotal = $usesLast || strpos($tpl, $varName.'total') !== false || strpos($tpl, $shortVarName.'total') !== false; + + if (strpos($name, '$this->scope[') !== false) { + $usesAny = $usesFirst = $usesLast = $usesIndex = $usesIteration = $usesShow = $usesTotal = true; + } + + // gets foreach id + $cnt = self::$cnt++; + + // builds pre processing output + $pre = Dwoo_Compiler::PHP_OPEN . "\n".'$_loop'.$cnt.'_data = '.$src.';'; + // adds foreach properties + if ($usesAny) { + $pre .= "\n".'$this->globals["loop"]['.$name.'] = array'."\n("; + if ($usesIndex) $pre .="\n\t".'"index" => 0,'; + if ($usesIteration) $pre .="\n\t".'"iteration" => 1,'; + if ($usesFirst) $pre .="\n\t".'"first" => null,'; + if ($usesLast) $pre .="\n\t".'"last" => null,'; + if ($usesShow) $pre .="\n\t".'"show" => $this->isArray($_loop'.$cnt.'_data, true),'; + if ($usesTotal) $pre .="\n\t".'"total" => $this->isArray($_loop'.$cnt.'_data) ? count($_loop'.$cnt.'_data) : 0,'; + $pre.="\n);\n".'$_loop'.$cnt.'_glob =& $this->globals["loop"]['.$name.'];'; + } + // checks if the loop must be looped + $pre .= "\n".'if ($this->isArray($_loop'.$cnt.'_data'.(isset($params['hasElse']) ? ', true' : '').') === true)'."\n{"; + // iterates over keys + $pre .= "\n\t".'foreach ($_loop'.$cnt.'_data as $tmp_key => $this->scope["-loop-"])'."\n\t{"; + // updates properties + if ($usesFirst) { + $pre .= "\n\t\t".'$_loop'.$cnt.'_glob["first"] = (string) ($_loop'.$cnt.'_glob["index"] === 0);'; + } + if ($usesLast) { + $pre .= "\n\t\t".'$_loop'.$cnt.'_glob["last"] = (string) ($_loop'.$cnt.'_glob["iteration"] === $_loop'.$cnt.'_glob["total"]);'; + } + $pre .= "\n\t\t".'$_loop'.$cnt.'_scope = $this->setScope(array("-loop-"));' . "\n/* -- loop start output */\n".Dwoo_Compiler::PHP_CLOSE; + + // build post processing output and cache it + $post = Dwoo_Compiler::PHP_OPEN . "\n".'/* -- loop end output */'."\n\t\t".'$this->setScope($_loop'.$cnt.'_scope, true);'; + // update properties + if ($usesIndex) { + $post.="\n\t\t".'$_loop'.$cnt.'_glob["index"]+=1;'; + } + if ($usesIteration) { + $post.="\n\t\t".'$_loop'.$cnt.'_glob["iteration"]+=1;'; + } + // end loop + $post .= "\n\t}\n}\n" . Dwoo_Compiler::PHP_CLOSE; + if (isset($params['hasElse'])) { + $post .= $params['hasElse']; + } + + return $pre . $content . $post; + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/section.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/section.php new file mode 100644 index 0000000..a1cda0d --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/section.php @@ -0,0 +1,131 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Plugin_section extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block, Dwoo_IElseable +{ + public static $cnt=0; + + public function init($name, $loop, $start = null, $step = null, $max = null, $show = true) + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + return ''; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + $output = Dwoo_Compiler::PHP_OPEN; + $params = $compiler->getCompiledParams($params); + + // assigns params + $loop = $params['loop']; + $start = $params['start']; + $max = $params['max']; + $name = $params['name']; + $step = $params['step']; + $show = $params['show']; + + // gets unique id + $cnt = self::$cnt++; + + $output .= '$this->globals[\'section\']['.$name.'] = array();'."\n". + '$_section'.$cnt.' =& $this->globals[\'section\']['.$name.'];'."\n"; + + if ($loop !== 'null') { + $output .= '$_section'.$cnt.'[\'loop\'] = is_array($tmp = '.$loop.') ? count($tmp) : max(0, (int) $tmp);'."\n"; + } else { + $output .= '$_section'.$cnt.'[\'loop\'] = 1;'."\n"; + } + + if ($show !== 'null') { + $output .= '$_section'.$cnt.'[\'show\'] = '.$show.";\n"; + } else { + $output .= '$_section'.$cnt.'[\'show\'] = true;'."\n"; + } + + if ($name !== 'null') { + $output .= '$_section'.$cnt.'[\'name\'] = '.$name.";\n"; + } else { + $output .= '$_section'.$cnt.'[\'name\'] = true;'."\n"; + } + + if ($max !== 'null') { + $output .= '$_section'.$cnt.'[\'max\'] = (int)'.$max.";\n". + 'if($_section'.$cnt.'[\'max\'] < 0) { $_section'.$cnt.'[\'max\'] = $_section'.$cnt.'[\'loop\']; }'."\n"; + } else { + $output .= '$_section'.$cnt.'[\'max\'] = $_section'.$cnt.'[\'loop\'];'."\n"; + } + + if ($step !== 'null') { + $output .= '$_section'.$cnt.'[\'step\'] = (int)'.$step.' == 0 ? 1 : (int) '.$step.";\n"; + } else { + $output .= '$_section'.$cnt.'[\'step\'] = 1;'."\n"; + } + + if ($start !== 'null') { + $output .= '$_section'.$cnt.'[\'start\'] = (int)'.$start.";\n"; + } else { + $output .= '$_section'.$cnt.'[\'start\'] = $_section'.$cnt.'[\'step\'] > 0 ? 0 : $_section'.$cnt.'[\'loop\'] - 1;'."\n". + 'if ($_section'.$cnt.'[\'start\'] < 0) { $_section'.$cnt.'[\'start\'] = max($_section'.$cnt.'[\'step\'] > 0 ? 0 : -1, $_section'.$cnt.'[\'loop\'] + $_section'.$cnt.'[\'start\']); } '."\n". + 'else { $_section'.$cnt.'[\'start\'] = min($_section'.$cnt.'[\'start\'], $_section'.$cnt.'[\'step\'] > 0 ? $_section'.$cnt.'[\'loop\'] : $_section'.$cnt.'[\'loop\'] -1); }'."\n"; + } + +/* if ($usesAny) { + $output .= "\n".'$this->globals["section"]['.$name.'] = array'."\n("; + if ($usesIndex) $output .="\n\t".'"index" => 0,'; + if ($usesIteration) $output .="\n\t".'"iteration" => 1,'; + if ($usesFirst) $output .="\n\t".'"first" => null,'; + if ($usesLast) $output .="\n\t".'"last" => null,'; + if ($usesShow) $output .="\n\t".'"show" => ($this->isArray($_for'.$cnt.'_from, true)) || (is_numeric($_for'.$cnt.'_from) && $_for'.$cnt.'_from != $_for'.$cnt.'_to),'; + if ($usesTotal) $output .="\n\t".'"total" => $this->isArray($_for'.$cnt.'_from) ? count($_for'.$cnt.'_from) - $_for'.$cnt.'_skip : (is_numeric($_for'.$cnt.'_from) ? abs(($_for'.$cnt.'_to + 1 - $_for'.$cnt.'_from)/$_for'.$cnt.'_step) : 0),'; + $out.="\n);\n".'$_section'.$cnt.'[\'glob\'] =& $this->globals["section"]['.$name.'];'."\n\n"; + } +*/ + + $output .= 'if ($_section'.$cnt.'[\'show\']) {'."\n"; + if ($start === 'null' && $step === 'null' && $max === 'null') { + $output .= ' $_section'.$cnt.'[\'total\'] = $_section'.$cnt.'[\'loop\'];'."\n"; + } else { + $output .= ' $_section'.$cnt.'[\'total\'] = min(ceil(($_section'.$cnt.'[\'step\'] > 0 ? $_section'.$cnt.'[\'loop\'] - $_section'.$cnt.'[\'start\'] : $_section'.$cnt.'[\'start\'] + 1) / abs($_section'.$cnt.'[\'step\'])), $_section'.$cnt.'[\'max\']);'."\n"; + } + $output .= ' if ($_section'.$cnt.'[\'total\'] == 0) {'."\n". + ' $_section'.$cnt.'[\'show\'] = false;'."\n". + ' }'."\n". + '} else {'."\n". + ' $_section'.$cnt.'[\'total\'] = 0;'."\n}\n"; + $output .= 'if ($_section'.$cnt.'[\'show\']) {'."\n"; + $output .= "\t".'for ($this->scope['.$name.'] = $_section'.$cnt.'[\'start\'], $_section'.$cnt.'[\'iteration\'] = 1; '. + '$_section'.$cnt.'[\'iteration\'] <= $_section'.$cnt.'[\'total\']; '. + '$this->scope['.$name.'] += $_section'.$cnt.'[\'step\'], $_section'.$cnt.'[\'iteration\']++) {'."\n"; + $output .= "\t\t".'$_section'.$cnt.'[\'rownum\'] = $_section'.$cnt.'[\'iteration\'];'."\n"; + $output .= "\t\t".'$_section'.$cnt.'[\'index_prev\'] = $this->scope['.$name.'] - $_section'.$cnt.'[\'step\'];'."\n"; + $output .= "\t\t".'$_section'.$cnt.'[\'index_next\'] = $this->scope['.$name.'] + $_section'.$cnt.'[\'step\'];'."\n"; + $output .= "\t\t".'$_section'.$cnt.'[\'first\'] = ($_section'.$cnt.'[\'iteration\'] == 1);'."\n"; + $output .= "\t\t".'$_section'.$cnt.'[\'last\'] = ($_section'.$cnt.'[\'iteration\'] == $_section'.$cnt.'[\'total\']);'."\n"; + + $output .= Dwoo_Compiler::PHP_CLOSE . $content . Dwoo_Compiler::PHP_OPEN; + + $output .= "\n\t}\n} " . Dwoo_Compiler::PHP_CLOSE; + + if (isset($params['hasElse'])) { + $output .= $params['hasElse']; + } + + return $output; + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/smartyinterface.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/smartyinterface.php new file mode 100644 index 0000000..dffe6a9 --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/smartyinterface.php @@ -0,0 +1,59 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Plugin_smartyinterface extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block +{ + public function init($__funcname, $__functype, array $rest=array()) {} + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + $params = $compiler->getCompiledParams($params); + $func = $params['__funcname']; + $pluginType = $params['__functype']; + $params = $params['*']; + + if ($pluginType & Dwoo::CUSTOM_PLUGIN) { + $customPlugins = $compiler->getDwoo()->getCustomPlugins(); + $callback = $customPlugins[$func]['callback']; + if (is_array($callback)) { + if (is_object($callback[0])) { + $callback = '$this->customPlugins[\''.$func.'\'][0]->'.$callback[1].'('; + } else { + $callback = ''.$callback[0].'::'.$callback[1].'('; + } + } else { + $callback = $callback.'('; + } + } else { + $callback = 'smarty_block_'.$func.'('; + } + + $paramsOut = ''; + foreach ($params as $i=>$p) { + $paramsOut .= var_export($i, true).' => '.$p.','; + } + + $curBlock =& $compiler->getCurrentBlock(); + $curBlock['params']['postOut'] = Dwoo_Compiler::PHP_OPEN.' $_block_content = ob_get_clean(); $_block_repeat=false; echo '.$callback.'$_tag_stack[count($_tag_stack)-1], $_block_content, $this, $_block_repeat); } array_pop($_tag_stack);'.Dwoo_Compiler::PHP_CLOSE; + + return Dwoo_Compiler::PHP_OPEN.$prepend.' if (!isset($_tag_stack)){ $_tag_stack = array(); } $_tag_stack[] = array('.$paramsOut.'); $_block_repeat=true; '.$callback.'$_tag_stack[count($_tag_stack)-1], null, $this, $_block_repeat); while ($_block_repeat) { ob_start();'.Dwoo_Compiler::PHP_CLOSE; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + return $content . $params['postOut']; + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/strip.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/strip.php new file mode 100644 index 0000000..2c983db --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/strip.php @@ -0,0 +1,50 @@ + + * * mode : sets the content being stripped, available mode are 'default' or 'js' + * for javascript, which strips the comments to prevent syntax errors + * + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.1.0 + * @date 2009-07-18 + * @package Dwoo + */ +class Dwoo_Plugin_strip extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block +{ + public function init($mode = "default") + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + return ''; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + $params = $compiler->getCompiledParams($params); + + $mode = trim($params['mode'], '"\''); + switch ($mode) { + case 'js': + case 'javascript': + $content = preg_replace('#(? + * * name : template name + * * rest : list of arguments and optional default values + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.1.0 + * @date 2009-07-18 + * @package Dwoo + */ +class Dwoo_Plugin_template extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block +{ + public function init($name, array $rest = array()) + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + $params = $compiler->getCompiledParams($params); + $parsedParams = array(); + if (!isset($params['*'])) + $params['*'] = array(); + foreach ($params['*'] as $param=>$defValue) { + if (is_numeric($param)) { + $param = $defValue; + $defValue = null; + } + $param = trim($param, '\'"'); + if (!preg_match('#^[a-z0-9_]+$#i', $param)) { + throw new Dwoo_Compilation_Exception($compiler, 'Function : parameter names must contain only A-Z, 0-9 or _'); + } + $parsedParams[$param] = $defValue; + } + $params['name'] = substr($params['name'], 1, -1); + $params['*'] = $parsedParams; + $params['uuid'] = uniqid(); + $compiler->addTemplatePlugin($params['name'], $parsedParams, $params['uuid']); + $currentBlock =& $compiler->getCurrentBlock(); + $currentBlock['params'] = $params; + return ''; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + $paramstr = 'Dwoo $dwoo'; + $init = 'static $_callCnt = 0;'."\n". + '$dwoo->scope[\' '.$params['uuid'].'\'.$_callCnt] = array();'."\n". + '$_scope = $dwoo->setScope(array(\' '.$params['uuid'].'\'.($_callCnt++)));'."\n"; + $cleanup = '/* -- template end output */ $dwoo->setScope($_scope, true);'; + foreach ($params['*'] as $param=>$defValue) { + if ($defValue === null) { + $paramstr.=', $'.$param; + } else { + $paramstr.=', $'.$param.' = '.$defValue; + } + $init .= '$dwoo->scope[\''.$param.'\'] = $'.$param.";\n"; + } + $init .= '/* -- template start output */'; + + $funcName = 'Dwoo_Plugin_'.$params['name'].'_'.$params['uuid']; + + $search = array( + '$this->charset', + '$this->', + '$this,', + ); + $replacement = array( + '$dwoo->getCharset()', + '$dwoo->', + '$dwoo,', + ); + $content = str_replace($search, $replacement, $content); + + $body = 'if (!function_exists(\''.$funcName."')) {\nfunction ".$funcName.'('.$paramstr.') {'."\n$init".Dwoo_Compiler::PHP_CLOSE. + $prepend.$content.$append. + Dwoo_Compiler::PHP_OPEN.$cleanup."\n}\n}"; + $compiler->addTemplatePlugin($params['name'], $params['*'], $params['uuid'], $body); + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/textformat.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/textformat.php new file mode 100644 index 0000000..da18033 --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/textformat.php @@ -0,0 +1,94 @@ + + * * wrap : maximum line length + * * wrap_char : the character(s) to use to break the line + * * wrap_cut : if true, the words that are longer than $wrap are cut instead of overflowing + * * indent : amount of $indent_char to insert before every line + * * indent_char : character(s) to insert before every line + * * indent_first : amount of additional $indent_char to insert before the first line of each paragraphs + * * style : some predefined formatting styles that set up every required variables, can be "email" or "html" + * * assign : if set, the formatted text is assigned to that variable instead of being output + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Plugin_textformat extends Dwoo_Block_Plugin +{ + protected $wrap; + protected $wrapChar; + protected $wrapCut; + protected $indent; + protected $indChar; + protected $indFirst; + protected $assign; + + public function init($wrap=80, $wrap_char="\r\n", $wrap_cut=false, $indent=0, $indent_char=" ", $indent_first=0, $style="", $assign="") + { + if ($indent_char === 'tab') { + $indent_char = "\t"; + } + + switch($style) { + + case 'email': + $wrap = 72; + $indent_first = 0; + break; + case 'html': + $wrap_char = '
'; + $indent_char = $indent_char == "\t" ? '    ':' '; + break; + + } + + $this->wrap = (int) $wrap; + $this->wrapChar = (string) $wrap_char; + $this->wrapCut = (bool) $wrap_cut; + $this->indent = (int) $indent; + $this->indChar = (string) $indent_char; + $this->indFirst = (int) $indent_first + $this->indent; + $this->assign = (string) $assign; + } + + public function process() + { + // gets paragraphs + $pgs = explode("\n", str_replace(array("\r\n", "\r"), "\n", $this->buffer)); + + while (list($i,) = each($pgs)) { + if (empty($pgs[$i])) { + continue; + } + + // removes line breaks and extensive white space + $pgs[$i] = preg_replace(array('#\s+#', '#^\s*(.+?)\s*$#m'), array(' ', '$1'), str_replace("\n", '', $pgs[$i])); + + // wordwraps + indents lines + $pgs[$i] = str_repeat($this->indChar, $this->indFirst) . + wordwrap( + $pgs[$i], + max($this->wrap - $this->indent, 1), + $this->wrapChar . str_repeat($this->indChar, $this->indent), + $this->wrapCut + ); + } + + if ($this->assign !== '') { + $this->dwoo->assignInScope(implode($this->wrapChar . $this->wrapChar, $pgs), $this->assign); + } else { + return implode($this->wrapChar . $this->wrapChar, $pgs); + } + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/topLevelBlock.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/topLevelBlock.php new file mode 100644 index 0000000..3d923ee --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/topLevelBlock.php @@ -0,0 +1,32 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +final class Dwoo_Plugin_topLevelBlock extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block +{ + public function init() + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + return '/* end template head */ ob_start(); /* template body */ '.Dwoo_Compiler::PHP_CLOSE; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + return $content . Dwoo_Compiler::PHP_OPEN.' /* end template body */'."\n".'return $this->buffer . ob_get_clean();'; + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/with.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/with.php new file mode 100644 index 0000000..e210089 --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/with.php @@ -0,0 +1,76 @@ + + * * var : the variable name to move into + * + * Example : + * + * instead of the following : + * + * + * {if $long.boring.prefix} + * {$long.boring.prefix.val} - {$long.boring.prefix.secondVal} - {$long.boring.prefix.thirdVal} + * {/if} + * + * + * you can use : + * + * + * {with $long.boring.prefix} + * {$val} - {$secondVal} - {$thirdVal} + * {/with} + * + * + * This software is provided 'as-is', without any express or implied warranty. + * In no event will the authors be held liable for any damages arising from the use of this software. + * + * @author Jordi Boggiano + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Plugin_with extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block, Dwoo_IElseable +{ + protected static $cnt=0; + + public function init($var) + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + return ''; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + $rparams = $compiler->getRealParams($params); + $cparams = $compiler->getCompiledParams($params); + + $compiler->setScope($rparams['var']); + + + $pre = Dwoo_Compiler::PHP_OPEN. 'if ('.$cparams['var'].')'."\n{\n". + '$_with'.(self::$cnt).' = $this->setScope("'.$rparams['var'].'");'. + "\n/* -- start with output */\n".Dwoo_Compiler::PHP_CLOSE; + + $post = Dwoo_Compiler::PHP_OPEN. "\n/* -- end with output */\n". + '$this->setScope($_with'.(self::$cnt++).', true);'. + "\n}\n".Dwoo_Compiler::PHP_CLOSE; + + if (isset($params['hasElse'])) { + $post .= $params['hasElse']; + } + + return $pre . $content . $post; + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/withelse.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/withelse.php new file mode 100644 index 0000000..8d4684d --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/blocks/withelse.php @@ -0,0 +1,43 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Plugin_withelse extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block +{ + public function init() + { + } + + public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) + { + $with =& $compiler->findBlock('with', true); + + $params['initialized'] = true; + $compiler->injectBlock($type, $params); + + return ''; + } + + public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) + { + if (!isset($params['initialized'])) { + return ''; + } + + $block =& $compiler->getCurrentBlock(); + $block['params']['hasElse'] = Dwoo_Compiler::PHP_OPEN."else {\n".Dwoo_Compiler::PHP_CLOSE . $content . Dwoo_Compiler::PHP_OPEN."\n}".Dwoo_Compiler::PHP_CLOSE; + return ''; + } +} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/filters/html_format.php b/_piecrust/libs/Dwoo/plugins/builtin/filters/html_format.php new file mode 100644 index 0000000..59530c5 --- /dev/null +++ b/_piecrust/libs/Dwoo/plugins/builtin/filters/html_format.php @@ -0,0 +1,175 @@ + + * @copyright Copyright (c) 2008, Jordi Boggiano + * @license http://dwoo.org/LICENSE Modified BSD License + * @link http://dwoo.org/ + * @version 1.0.0 + * @date 2008-10-23 + * @package Dwoo + */ +class Dwoo_Filter_html_format extends Dwoo_Filter +{ + /** + * tab count to auto-indent the source + * + * @var int + */ + protected static $tabCount = -1; + + /** + * stores the additional data (following a tag) of the last call to open/close/singleTag + * + * @var string + */ + protected static $lastCallAdd = ''; + + /** + * formats the input using the singleTag/closeTag/openTag functions + * + * It is auto indenting the whole code, excluding
+'; + + echo '
Styles: + + + + + + + + + + + + + + +
Style for the overall code block:
Default Styles
Keywords I (if, do, while etc)
Keywords II (null, true, false etc)
Inbuilt Functions (echo, print etc)
Data Types (int, boolean etc)
Comments (//, etc)
Escaped Characters (\n, \t etc)
Brackets ( ([{}]) etc)
Strings ("foo" etc)
Numbers (1, -54, 2.5 etc)
Methods (Foo.bar() etc)
'; + + echo ' +'; + + make_footer(); +} +// Step 3 +elseif ( $step == 3 ) +{ + make_header('Step 3'); + echo '

Here is your completed stylesheet. Note that it may not be perfect - no regular expression styles are included for one thing, +you\'ll have to add those yourself (php and xml are just two languages that use them), and line numbers are not included, however +it includes most of the basic information.

'; + + // Make the stylesheet + $part_selector_1 = ''; + $part_selector_2 = ''; + $part_selector_3 = ''; + + $langs = get_var('langs'); + $extra_langs = trim(get_var('extra-langs')); + if ( $extra_langs != '' ) + { + $l = explode("\r\n", $extra_langs); + foreach ( $l as $lng ) + { + $langs[$lng] = true; + } + } + + + foreach ( $langs as $lang => $dummy ) + { + $part_selector_1 .= ".$lang {PART}, "; + $part_selector_2 .= ".$lang {PART1}, .$lang {PART2}, "; + $part_selector_3 .= ".$lang {PART1}, .$lang {PART2}, .$lang {PART3}, "; + } + $part_selector_1 = substr($part_selector_1, 0, -2); + $part_selector_2 = substr($part_selector_2, 0, -2); + $part_selector_3 = substr($part_selector_3, 0, -2); + + + $default_styles = get_var('default-styles'); + $ol_selector = str_replace('{PART}', 'ol', $part_selector_1); + $overall_styles = get_var('overall'); + $overall_selector = str_replace('{PART}', '', $part_selector_1); + + $stylesheet = "/* GeSHi (c) Nigel McNie 2004 (http://qbnz.com/highlighter) */"; + + if ( $overall != '' ) + { + $stylesheet .= "\n$overall_selector {{$overall_styles}}"; + } + if ( $default_styles != '' ) + { + $default_selector = str_replace(array('{PART1}', '{PART2}'), array('.de1', '.de2'), $part_selector_2); + $stylesheet .= "\n$default_selector {{$default_styles}}"; + } + + // Do keywords + $keywords_1 = get_var('keywords-1'); + $keyword_selector_1 = str_replace('{PART}', '.kw1', $part_selector_1); + if ( $keywords_1 != '' ) + { + $stylesheet .= "\n$keyword_selector_1 {{$keywords_1}}"; + } + + $keywords_2 = get_var('keywords-2'); + $keyword_selector_2 = str_replace('{PART}', '.kw2', $part_selector_1); + if ( $keywords_2 != '' ) + { + $stylesheet .= "\n$keyword_selector_2 {{$keywords_2}}"; + } + + $keywords_3 = get_var('keywords-3'); + $keyword_selector_3 = str_replace('{PART}', '.kw3', $part_selector_1); + if ( $keywords_3 != '' ) + { + $stylesheet .= "\n$keyword_selector_3 {{$keywords_3}}"; + } + + $keywords_4 = get_var('keywords-4'); + $keyword_selector_4 = str_replace('{PART}', '.kw4', $part_selector_1); + if ( $keywords_4 != '' ) + { + $stylesheet .= "\n$keyword_selector_4 {{$keywords_4}}"; + } + + // Do other lexics + $comments = get_var('comments'); + $comment_selector = str_replace(array('{PART1}', '{PART2}', '{PART3}'), array('.co1', '.co2', '.coMULTI'), $part_selector_3); + if ( $comments != '' ) + { + $stylesheet .= "\n$comment_selector {{$comments}}"; + } + + $esc = get_var('escaped-chars'); + $esc_selector = str_replace('{PART}', '.es0', $part_selector_1); + if ( $esc != '' ) + { + $stylesheet .= "\n$esc_selector {{$esc}}"; + } + + $brackets = get_var('brackets'); + $brk_selector = str_replace('{PART}', '.br0', $part_selector_1); + if ( $brackets != '' ) + { + $stylesheet .= "\n$brk_selector {{$brackets}}"; + } + + $strings = get_var('strings'); + $string_selector = str_replace('{PART}', '.st0', $part_selector_1); + if ( $strings != '' ) + { + $stylesheet .= "\n$string_selector {{$strings}}"; + } + + $numbers = get_var('numbers'); + $num_selector = str_replace('{PART}', '.nu0', $part_selector_1); + if ( $numbers != '' ) + { + $stylesheet .= "\n$num_selector {{$numbers}}"; + } + + $methods = get_var('methods'); + $method_selector = str_replace('{PART}', '.me0', $part_selector_1); + if ( $methods != '' ) + { + $stylesheet .= "\n$method_selector {{$methods}}"; + } + + echo "
$stylesheet
"; + + make_footer(); +} + +?> diff --git a/_piecrust/libs/Geshi/contrib/cssgen2.php b/_piecrust/libs/Geshi/contrib/cssgen2.php new file mode 100644 index 0000000..cc3c39c --- /dev/null +++ b/_piecrust/libs/Geshi/contrib/cssgen2.php @@ -0,0 +1,59 @@ + geshi.css`. + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * @package geshi + * @subpackage contrib + * @author revulo + * @copyright 2008 revulo + * @license http://gnu.org/copyleft/gpl.html GNU GPL + * + */ + +require dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'geshi.php'; +$geshi = new GeSHi; + +$languages = array(); +if ($handle = opendir($geshi->language_path)) { + while (($file = readdir($handle)) !== false) { + $pos = strpos($file, '.'); + if ($pos > 0 && substr($file, $pos) == '.php') { + $languages[] = substr($file, 0, $pos); + } + } + closedir($handle); +} +sort($languages); + +header('Content-Type: application/octet-stream'); +header('Content-Disposition: attachment; filename="geshi.css"'); + +echo "/**\n". + " * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann\n" . + " * (http://qbnz.com/highlighter/ and http://geshi.org/)\n". + " */\n"; + +foreach ($languages as $language) { + $geshi->set_language($language); + // note: the false argument is required for stylesheet generators, see API documentation + $css = $geshi->get_stylesheet(false); + echo preg_replace('/^\/\*\*.*?\*\//s', '', $css); +} diff --git a/_piecrust/libs/Geshi/contrib/example.php b/_piecrust/libs/Geshi/contrib/example.php new file mode 100644 index 0000000..32e6f0c --- /dev/null +++ b/_piecrust/libs/Geshi/contrib/example.php @@ -0,0 +1,217 @@ + tag inside the list items (
  • ) thus producing valid HTML markup. + // HEADER_PRE puts the
     tag around the list (
      ) which is invalid in HTML 4 and XHTML 1 + // HEADER_DIV puts a
      tag arount the list (valid!) but needs to replace whitespaces with   + // thus producing much larger overhead. You can set the tab width though. + $geshi->set_header_type(GESHI_HEADER_PRE_VALID); + + // Enable CSS classes. You can use get_stylesheet() to output a stylesheet for your code. Using + // CSS classes results in much less output source. + $geshi->enable_classes(); + + // Enable line numbers. We want fancy line numbers, and we want every 5th line number to be fancy + $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 5); + + // Set the style for the PRE around the code. The line numbers are contained within this box (not + // XHTML compliant btw, but if you are liberally minded about these things then you'll appreciate + // the reduced source output). + $geshi->set_overall_style('font: normal normal 90% monospace; color: #000066; border: 1px solid #d0d0d0; background-color: #f0f0f0;', false); + + // Set the style for line numbers. In order to get style for line numbers working, the
    1. element + // is being styled. This means that the code on the line will also be styled, and most of the time + // you don't want this. So the set_code_style reverts styles for the line (by using a
      on the line). + // So the source output looks like this: + // + //
        + //
      1. + + + GeSHi examples + + + +

        GeSHi Example Script

        +

        To use this script, make sure that geshi.php is in the parent directory or in your +include_path, and that the language files are in a subdirectory of GeSHi's directory called geshi/.

        +

        Enter your source and a language to highlight the source in and submit, or just choose a language to +have that language file highlighted in PHP.

        +parse_code(); + echo '
        '; +} +?> +
        +

        Source to highlight

        +

        + +

        +

        Choose a language

        +

        + +

        +

        + + +

        +
        + + + diff --git a/_piecrust/libs/Geshi/contrib/langcheck.php b/_piecrust/libs/Geshi/contrib/langcheck.php new file mode 100644 index 0000000..a4ee4f6 --- /dev/null +++ b/_piecrust/libs/Geshi/contrib/langcheck.php @@ -0,0 +1,766 @@ +'; + $colors = array( + TYPE_NOTICE => '', + TYPE_WARNING => '', + TYPE_ERROR => '', + TYPE_OK => '' + ); + } else { + $end = chr(27).'[0m'; + $colors = array( + TYPE_NOTICE => chr(27).'[1m', + TYPE_WARNING => chr(27).'[1;33m', + TYPE_ERROR => chr(27).'[1;31m', + TYPE_OK => chr(27).'[1;32m' + ); + } + } + + if ( !isset($colors[$level]) ) { + trigger_error("no colors for level $level", E_USER_ERROR); + } + + return $colors[$level].$string.$end; +} + +define ('TYPE_NOTICE', 0); +define ('TYPE_WARNING', 1); +define ('TYPE_ERROR', 2); +define ('TYPE_OK', 3); + +$error_abort = false; +$error_cache = array(); +function output_error_cache(){ + global $error_cache, $error_abort; + + if(count($error_cache)) { + echo colorize(TYPE_ERROR, "Failed"); + if ( PHP_SAPI == 'cli' ) { + echo "\n\n"; + } else { + echo "
          \n"; + } + foreach($error_cache as $error_msg) { + if ( PHP_SAPI == 'cli' ) { + echo "\n"; + } else { + echo "
        1. "; + } + switch($error_msg['t']) { + case TYPE_NOTICE: + $msg = 'NOTICE'; + break; + case TYPE_WARNING: + $msg = 'WARNING'; + break; + case TYPE_ERROR: + $msg = 'ERROR'; + break; + } + echo colorize($error_msg['t'], $msg); + if ( PHP_SAPI == 'cli' ) { + echo "\t" . $error_msg['m']; + } else { + echo " " . $error_msg['m'] . "
        2. "; + } + } + if ( PHP_SAPI == 'cli' ) { + echo "\n"; + } else { + echo "
        \n"; + } + } else { + echo colorize(TYPE_OK, "OK"); + if ( PHP_SAPI == 'cli' ) { + echo "\n"; + } else { + echo "\n
        "; + } + } + echo "\n"; + + $error_cache = array(); +} + +function report_error($type, $message) { + global $error_cache, $error_abort; + + $error_cache[] = array('t' => $type, 'm' => $message); + if(TYPE_ERROR == $type) { + $error_abort = true; + } +} + +function dupfind_strtolower(&$value){ + $value = strtolower($value); +} + +if ( PHP_SAPI != 'cli' ) { ?> + + + + GeSHi Language File Validation Script + + + +

        GeSHi Language File Validation Script

        +

        To use this script, make sure that geshi.php is in the +parent directory or in your include_path, and that the language files are in a +subdirectory of GeSHi's directory called geshi/.

        +

        Everything else will be done by this script automatically. After the script +finished you should see messages of what could cause trouble with GeSHi or where +your language files can be improved. Please be patient, as this might take some time.

        + +
          +
        1. Checking where to find GeSHi installation ... + + + +To use this script, make sure that is in the +parent directory or in your include_path, and that the language files are in a +subdirectory of GeSHi's directory called . + +Everything else will be done by this script automatically. After the script +finished you should see messages of what could cause trouble with GeSHi or where +your language files can be improved. Please be patient, as this might take some time. + + +Checking where to find GeSHi installation ...\n
        2. Listing available language files ... "; + } + + if (!($dir = @opendir(GESHI_LANG_ROOT))) { + report_error(TYPE_ERROR, 'Error requesting listing for available language files!'); + } + + $languages = array(); + + if(!$error_abort) { + while ($file = readdir($dir)) { + if (!$file || $file[0] == '.' || strpos($file, '.') === false) { + continue; + } + $lang = substr($file, 0, strpos($file, '.')); + $languages[] = $lang; + } + closedir($dir); + } + + $languages = array_unique($languages); + sort($languages); + + if(!count($languages)) { + report_error(TYPE_WARNING, 'Unable to locate any usable language files in "'.GESHI_LANG_ROOT.'"!'); + } + + output_error_cache(); +} + +if ( PHP_SAPI == 'cli' ) { + if (isset($_SERVER['argv'][1]) && in_array($_SERVER['argv'][1], $languages)) { + $languages = array($_SERVER['argv'][1]); + } +} else { + if (isset($_REQUEST['show']) && in_array($_REQUEST['show'], $languages)) { + $languages = array($_REQUEST['show']); + } +} + +if(!$error_abort) { + foreach ($languages as $lang) { + + if ( PHP_SAPI == 'cli' ) { + echo "Validating language file for '$lang' ...\t\t"; + } else { + echo "
        3. \n
        4. Validating language file for '$lang' ... "; + } + + $langfile = GESHI_LANG_ROOT . $lang . '.php'; + + $language_data = array(); + + if(!is_file($langfile)) { + report_error(TYPE_ERROR, 'The path "' .$langfile. '" does not ressemble a regular file!'); + } else if(!is_readable($langfile)) { + report_error(TYPE_ERROR, 'Cannot read file "' .$langfile. '"!'); + } else { + $langfile_content = file_get_contents($langfile); + if(preg_match("/\?>(?:\r?\n|\r(?!\n)){2,}\Z/", $langfile_content)) { + report_error(TYPE_ERROR, 'Language file contains trailing empty lines at EOF!'); + } + if(!preg_match("/\?>(?:\r?\n|\r(?!\n))?\Z/", $langfile_content)) { + report_error(TYPE_ERROR, 'Language file contains no PHP end marker at EOF!'); + } + if(preg_match("/\t/", $langfile_content)) { + report_error(TYPE_NOTICE, 'Language file contains unescaped tabulator chars (probably for indentation)!'); + } + if(preg_match('/^(?: )*(?! )(?! \*) /m', $langfile_content)) { + report_error(TYPE_NOTICE, 'Language file contains irregular indentation (other than 4 spaces per indentation level)!'); + } + + if(!preg_match("/\/\*\*((?!\*\/).)*?Author:((?!\*\/).)*?\*\//s", $langfile_content)) { + report_error(TYPE_WARNING, 'Language file does not contain a specification of an author!'); + } + if(!preg_match("/\/\*\*((?!\*\/).)*?Copyright:((?!\*\/).)*?\*\//s", $langfile_content)) { + report_error(TYPE_WARNING, 'Language file does not contain a specification of the copyright!'); + } + if(!preg_match("/\/\*\*((?!\*\/).)*?Release Version:((?!\*\/).)*?\*\//s", $langfile_content)) { + report_error(TYPE_WARNING, 'Language file does not contain a specification of the release version!'); + } + if(!preg_match("/\/\*\*((?!\*\/).)*?Date Started:((?!\*\/).)*?\*\//s", $langfile_content)) { + report_error(TYPE_WARNING, 'Language file does not contain a specification of the date it was started!'); + } + if(!preg_match("/\/\*\*((?!\*\/).)*?This file is part of GeSHi\.((?!\*\/).)*?\*\//s", $langfile_content)) { + report_error(TYPE_WARNING, 'Language file does not state that it belongs to GeSHi!'); + } + if(!preg_match("/\/\*\*((?!\*\/).)*?language file for GeSHi\.((?!\*\/).)*?\*\//s", $langfile_content)) { + report_error(TYPE_WARNING, 'Language file does not state that it is a language file for GeSHi!'); + } + if(!preg_match("/\/\*\*((?!\*\/).)*?GNU General Public License((?!\*\/).)*?\*\//s", $langfile_content)) { + report_error(TYPE_WARNING, 'Language file does not state that it is provided under the terms of the GNU GPL!'); + } + + unset($langfile_content); + + include $langfile; + + if(!isset($language_data)) { + report_error(TYPE_ERROR, 'Language file does not contain a $language_data structure to check!'); + } else if (!is_array($language_data)) { + report_error(TYPE_ERROR, 'Language file contains a $language_data structure which is not an array!'); + } + } + + if(!$error_abort) { + if(!isset($language_data['LANG_NAME'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'LANG_NAME\'] specification!'); + } else if (!is_string($language_data['LANG_NAME'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'LANG_NAME\'] specification which is not a string!'); + } + + if(!isset($language_data['COMMENT_SINGLE'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'COMMENT_SIGNLE\'] structure to check!'); + } else if (!is_array($language_data['COMMENT_SINGLE'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'COMMENT_SINGLE\'] structure which is not an array!'); + } + + if(!isset($language_data['COMMENT_MULTI'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'COMMENT_MULTI\'] structure to check!'); + } else if (!is_array($language_data['COMMENT_MULTI'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'COMMENT_MULTI\'] structure which is not an array!'); + } + + if(isset($language_data['COMMENT_REGEXP'])) { + if (!is_array($language_data['COMMENT_REGEXP'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'COMMENT_REGEXP\'] structure which is not an array!'); + } + } + + if(!isset($language_data['QUOTEMARKS'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'QUOTEMARKS\'] structure to check!'); + } else if (!is_array($language_data['QUOTEMARKS'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'QUOTEMARKS\'] structure which is not an array!'); + } + + if(isset($language_data['HARDQUOTE'])) { + if (!is_array($language_data['HARDQUOTE'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'HARDQUOTE\'] structure which is not an array!'); + } + } + + if(!isset($language_data['ESCAPE_CHAR'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'ESCAPE_CHAR\'] specification to check!'); + } else if (!is_string($language_data['ESCAPE_CHAR'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'ESCAPE_CHAR\'] specification which is not a string!'); + } else if (1 < strlen($language_data['ESCAPE_CHAR'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'ESCAPE_CHAR\'] specification is not empty or exactly one char!'); + } + + if(!isset($language_data['CASE_KEYWORDS'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'CASE_KEYWORDS\'] specification!'); + } else if (!is_int($language_data['CASE_KEYWORDS'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'CASE_KEYWORDS\'] specification which is not an integer!'); + } else if (GESHI_CAPS_NO_CHANGE != $language_data['CASE_KEYWORDS'] && + GESHI_CAPS_LOWER != $language_data['CASE_KEYWORDS'] && + GESHI_CAPS_UPPER != $language_data['CASE_KEYWORDS']) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'CASE_KEYWORDS\'] specification which is neither of GESHI_CAPS_NO_CHANGE, GESHI_CAPS_LOWER nor GESHI_CAPS_UPPER!'); + } + + if(!isset($language_data['KEYWORDS'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'KEYWORDS\'] structure to check!'); + } else if (!is_array($language_data['KEYWORDS'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'KEYWORDS\'] structure which is not an array!'); + } else { + foreach($language_data['KEYWORDS'] as $kw_key => $kw_value) { + if(!is_integer($kw_key)) { + report_error(TYPE_WARNING, "Language file contains an key '$kw_key' in \$language_data['KEYWORDS'] that is not integer!"); + } else if (!is_array($kw_value)) { + report_error(TYPE_ERROR, "Language file contains a \$language_data['CASE_SENSITIVE']['$kw_value'] structure which is not an array!"); + } + } + } + + if(!isset($language_data['SYMBOLS'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'SYMBOLS\'] structure to check!'); + } else if (!is_array($language_data['SYMBOLS'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'SYMBOLS\'] structure which is not an array!'); + } + + if(!isset($language_data['CASE_SENSITIVE'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'CASE_SENSITIVE\'] structure to check!'); + } else if (!is_array($language_data['CASE_SENSITIVE'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'CASE_SENSITIVE\'] structure which is not an array!'); + } else { + foreach($language_data['CASE_SENSITIVE'] as $cs_key => $cs_value) { + if(!is_integer($cs_key)) { + report_error(TYPE_WARNING, "Language file contains an key '$cs_key' in \$language_data['CASE_SENSITIVE'] that is not integer!"); + } else if (!is_bool($cs_value)) { + report_error(TYPE_ERROR, "Language file contains a Case Sensitivity specification for \$language_data['CASE_SENSITIVE']['$cs_value'] which is not a boolean!"); + } + } + } + + if(!isset($language_data['URLS'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'URLS\'] structure to check!'); + } else if (!is_array($language_data['URLS'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'URLS\'] structure which is not an array!'); + } else { + foreach($language_data['URLS'] as $url_key => $url_value) { + if(!is_integer($url_key)) { + report_error(TYPE_WARNING, "Language file contains an key '$url_key' in \$language_data['URLS'] that is not integer!"); + } else if (!is_string($url_value)) { + report_error(TYPE_ERROR, "Language file contains a Documentation URL specification for \$language_data['URLS']['$url_value'] which is not a string!"); + } else if (preg_match('#&([^;]*(=|$))#U', $url_value)) { + report_error(TYPE_ERROR, "Language file contains unescaped ampersands (&) in \$language_data['URLS']!"); + } + } + } + + if(!isset($language_data['OOLANG'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'OOLANG\'] specification!'); + } else if (!is_int($language_data['OOLANG']) && !is_bool($language_data['OOLANG'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'OOLANG\'] specification which is neither boolean nor integer!'); + } else if (false !== $language_data['OOLANG'] && + true !== $language_data['OOLANG'] && + 2 !== $language_data['OOLANG']) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'OOLANG\'] specification which is neither of false, true or 2!'); + } + + if(!isset($language_data['OBJECT_SPLITTERS'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'OBJECT_SPLITTERS\'] structure to check!'); + } else if (!is_array($language_data['OBJECT_SPLITTERS'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'OBJECT_SPLITTERS\'] structure which is not an array!'); + } + + if(!isset($language_data['REGEXPS'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'REGEXPS\'] structure to check!'); + } else if (!is_array($language_data['REGEXPS'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'REGEXPS\'] structure which is not an array!'); + } + + if(!isset($language_data['STRICT_MODE_APPLIES'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'STRICT_MODE_APPLIES\'] specification!'); + } else if (!is_int($language_data['STRICT_MODE_APPLIES'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'STRICT_MODE_APPLIES\'] specification which is not an integer!'); + } else if (GESHI_MAYBE != $language_data['STRICT_MODE_APPLIES'] && + GESHI_ALWAYS != $language_data['STRICT_MODE_APPLIES'] && + GESHI_NEVER != $language_data['STRICT_MODE_APPLIES']) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'STRICT_MODE_APPLIES\'] specification which is neither of GESHI_MAYBE, GESHI_ALWAYS nor GESHI_NEVER!'); + } + + if(!isset($language_data['SCRIPT_DELIMITERS'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'SCRIPT_DELIMITERS\'] structure to check!'); + } else if (!is_array($language_data['SCRIPT_DELIMITERS'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'SCRIPT_DELIMITERS\'] structure which is not an array!'); + } + + if(!isset($language_data['HIGHLIGHT_STRICT_BLOCK'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'HIGHLIGHT_STRICT_BLOCK\'] structure to check!'); + } else if (!is_array($language_data['HIGHLIGHT_STRICT_BLOCK'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'HIGHLIGHT_STRICT_BLOCK\'] structure which is not an array!'); + } + + if(isset($language_data['TAB_WIDTH'])) { + if (!is_int($language_data['TAB_WIDTH'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'TAB_WIDTH\'] specification which is not an integer!'); + } else if (1 > $language_data['TAB_WIDTH']) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'TAB_WIDTH\'] specification which is less than 1!'); + } + } + + if(isset($language_data['PARSER_CONTROL'])) { + if (!is_array($language_data['PARSER_CONTROL'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'PARSER_CONTROL\'] structure which is not an array!'); + } + } + + if(!isset($language_data['STYLES'])) { + report_error(TYPE_ERROR, 'Language file contains no $language_data[\'STYLES\'] structure to check!'); + } else if (!is_array($language_data['STYLES'])) { + report_error(TYPE_ERROR, 'Language file contains a $language_data[\'STYLES\'] structure which is not an array!'); + } else { + $style_arrays = array('KEYWORDS', 'COMMENTS', 'ESCAPE_CHAR', + 'BRACKETS', 'STRINGS', 'NUMBERS', 'METHODS', 'SYMBOLS', + 'REGEXPS', 'SCRIPT'); + foreach($style_arrays as $style_kind) { + if(!isset($language_data['STYLES'][$style_kind])) { + report_error(TYPE_ERROR, "Language file contains no \$language_data['STYLES']['$style_kind'] structure to check!"); + } else if (!is_array($language_data['STYLES'][$style_kind])) { + report_error(TYPE_ERROR, "Language file contains a \$language_data['STYLES\']['$style_kind'] structure which is not an array!"); + } else { + foreach($language_data['STYLES'][$style_kind] as $sk_key => $sk_value) { + if(!is_int($sk_key) && ('COMMENTS' != $style_kind && 'MULTI' != $sk_key) + && !(('STRINGS' == $style_kind || 'ESCAPE_CHAR' == $style_kind) && 'HARD' == $sk_key)) { + report_error(TYPE_WARNING, "Language file contains an key '$sk_key' in \$language_data['STYLES']['$style_kind'] that is not integer!"); + } else if (!is_string($sk_value)) { + report_error(TYPE_WARNING, "Language file contains a CSS specification for \$language_data['STYLES']['$style_kind'][$key] which is not a string!"); + } + } + } + } + + unset($style_arrays); + } + } + + if(!$error_abort) { + //Initial sanity checks survived? --> Let's dig deeper! + foreach($language_data['KEYWORDS'] as $key => $keywords) { + if(!isset($language_data['CASE_SENSITIVE'][$key])) { + report_error(TYPE_ERROR, "Language file contains no \$language_data['CASE_SENSITIVE'] specification for keyword group $key!"); + } + if(!isset($language_data['URLS'][$key])) { + report_error(TYPE_ERROR, "Language file contains no \$language_data['URLS'] specification for keyword group $key!"); + } + if(empty($keywords)) { + report_error(TYPE_WARNING, "Language file contains an empty keyword list in \$language_data['KEYWORDS'] for group $key!"); + } + foreach($keywords as $id => $kw) { + if(!is_string($kw)) { + report_error(TYPE_WARNING, "Language file contains an non-string entry at \$language_data['KEYWORDS'][$key][$id]!"); + } else if (!strlen($kw)) { + report_error(TYPE_ERROR, "Language file contains an empty string entry at \$language_data['KEYWORDS'][$key][$id]!"); + } else if (preg_match('/^([\(\)\{\}\[\]\^=.,:;\-+\*\/%\$\"\'\?]|&[\w#]\w*;)+$/i', $kw)) { + report_error(TYPE_NOTICE, "Language file contains an keyword ('$kw') at \$language_data['KEYWORDS'][$key][$id] which seems to be better suited for the symbols section!"); + } + } + if(isset($language_data['CASE_SENSITIVE'][$key]) && !$language_data['CASE_SENSITIVE'][$key]) { + array_walk($keywords, 'dupfind_strtolower'); + } + if(count($keywords) != count(array_unique($keywords))) { + $kw_diffs = array_count_values($keywords); + foreach($kw_diffs as $kw => $kw_count) { + if($kw_count > 1) { + report_error(TYPE_WARNING, "Language file contains per-group duplicate keyword '$kw' in \$language_data['KEYWORDS'][$key]!"); + } + } + } + } + + $disallowed_before = "(?|^&"; + $disallowed_after = "(?![a-zA-Z0-9_\|%\\-&;"; + + foreach($language_data['KEYWORDS'] as $key => $keywords) { + foreach($language_data['KEYWORDS'] as $key2 => $keywords2) { + if($key2 <= $key) { + continue; + } + $kw_diffs = array_intersect($keywords, $keywords2); + foreach($kw_diffs as $kw) { + if(isset($language_data['PARSER_CONTROL']['KEYWORDS'])) { + //Check the precondition\post-cindition for the involved keyword groups + $g1_pre = $disallowed_before; + $g2_pre = $disallowed_before; + $g1_post = $disallowed_after; + $g2_post = $disallowed_after; + if(isset($language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE'])) { + $g1_pre = $language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE']; + $g2_pre = $language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE']; + } + if(isset($language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER'])) { + $g1_post = $language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER']; + $g2_post = $language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER']; + } + + if(isset($language_data['PARSER_CONTROL']['KEYWORDS'][$key]['DISALLOWED_BEFORE'])) { + $g1_pre = $language_data['PARSER_CONTROL']['KEYWORDS'][$key]['DISALLOWED_BEFORE']; + } + if(isset($language_data['PARSER_CONTROL']['KEYWORDS'][$key]['DISALLOWED_AFTER'])) { + $g1_post = $language_data['PARSER_CONTROL']['KEYWORDS'][$key]['DISALLOWED_AFTER']; + } + + if(isset($language_data['PARSER_CONTROL']['KEYWORDS'][$key2]['DISALLOWED_BEFORE'])) { + $g2_pre = $language_data['PARSER_CONTROL']['KEYWORDS'][$key2]['DISALLOWED_BEFORE']; + } + if(isset($language_data['PARSER_CONTROL']['KEYWORDS'][$key2]['DISALLOWED_AFTER'])) { + $g2_post = $language_data['PARSER_CONTROL']['KEYWORDS'][$key2]['DISALLOWED_AFTER']; + } + + if($g1_pre != $g2_pre || $g1_post != $g2_post) { + continue; + } + } + report_error(TYPE_WARNING, "Language file contains cross-group duplicate keyword '$kw' in \$language_data['KEYWORDS'][$key] and \$language_data['KEYWORDS'][$key2]!"); + } + } + } + foreach($language_data['CASE_SENSITIVE'] as $key => $keywords) { + if(!isset($language_data['KEYWORDS'][$key]) && $key != GESHI_COMMENTS) { + report_error(TYPE_WARNING, "Language file contains an superfluous \$language_data['CASE_SENSITIVE'] specification for non-existing keyword group $key!"); + } + } + foreach($language_data['URLS'] as $key => $keywords) { + if(!isset($language_data['KEYWORDS'][$key])) { + report_error(TYPE_WARNING, "Language file contains an superfluous \$language_data['URLS'] specification for non-existing keyword group $key!"); + } + } + foreach($language_data['STYLES']['KEYWORDS'] as $key => $keywords) { + if(!isset($language_data['KEYWORDS'][$key])) { + report_error(TYPE_WARNING, "Language file contains an superfluous \$language_data['STYLES']['KEYWORDS'] specification for non-existing keyword group $key!"); + } + } + + foreach($language_data['COMMENT_SINGLE'] as $ck => $cv) { + if(!is_int($ck)) { + report_error(TYPE_WARNING, "Language file contains an key '$ck' in \$language_data['COMMENT_SINGLE'] that is not integer!"); + } + if(!is_string($cv)) { + report_error(TYPE_WARNING, "Language file contains an non-string entry at \$language_data['COMMENT_SINGLE'][$ck]!"); + } + if(!isset($language_data['STYLES']['COMMENTS'][$ck])) { + report_error(TYPE_WARNING, "Language file contains no \$language_data['STYLES']['COMMENTS'] specification for comment group $ck!"); + } + } + if(isset($language_data['COMMENT_REGEXP'])) { + foreach($language_data['COMMENT_REGEXP'] as $ck => $cv) { + if(!is_int($ck)) { + report_error(TYPE_WARNING, "Language file contains an key '$ck' in \$language_data['COMMENT_REGEXP'] that is not integer!"); + } + if(!is_string($cv)) { + report_error(TYPE_WARNING, "Language file contains an non-string entry at \$language_data['COMMENT_REGEXP'][$ck]!"); + } + if(!isset($language_data['STYLES']['COMMENTS'][$ck])) { + report_error(TYPE_WARNING, "Language file contains no \$language_data['STYLES']['COMMENTS'] specification for comment group $ck!"); + } + } + } + foreach($language_data['STYLES']['COMMENTS'] as $ck => $cv) { + if($ck != 'MULTI' && !isset($language_data['COMMENT_SINGLE'][$ck]) && + !isset($language_data['COMMENT_REGEXP'][$ck])) { + report_error(TYPE_NOTICE, "Language file contains an superfluous \$language_data['STYLES']['COMMENTS'] specification for Single Line or Regular-Expression Comment key $ck!"); + } + } + if (isset($language_data['STYLES']['STRINGS']['HARD'])) { + if (empty($language_data['HARDQUOTE'])) { + report_error(TYPE_NOTICE, "Language file contains superfluous \$language_data['STYLES']['STRINGS'] specification for key 'HARD', but no 'HARDQUOTE's are defined!"); + } + unset($language_data['STYLES']['STRINGS']['HARD']); + } + foreach($language_data['STYLES']['STRINGS'] as $sk => $sv) { + if($sk && !isset($language_data['QUOTEMARKS'][$sk])) { + report_error(TYPE_NOTICE, "Language file contains an superfluous \$language_data['STYLES']['STRINGS'] specification for non-existing quotemark key $sk!"); + } + } + + foreach($language_data['REGEXPS'] as $rk => $rv) { + if(!is_int($rk)) { + report_error(TYPE_WARNING, "Language file contains an key '$rk' in \$language_data['REGEXPS'] that is not integer!"); + } + if(is_string($rv)) { + //Check for unmasked / in regular expressions ... + if(empty($rv)) { + report_error(TYPE_WARNING, "Language file contains an empty regular expression at \$language_data['REGEXPS'][$rk]!"); + } else { + if(preg_match("/(?)/s", $rv)) { + report_error(TYPE_WARNING, "Language file contains a regular expression with an unescaped match for a pipe character '|' which needs escaping as '<PIPE>' instead at \$language_data['REGEXPS'][$rk]!"); + } + } + } elseif(is_array($rv)) { + if(!isset($rv[GESHI_SEARCH])) { + report_error(TYPE_ERROR, "Language file contains no GESHI_SEARCH entry in extended regular expression at \$language_data['REGEXPS'][$rk]!"); + } elseif(!is_string($rv[GESHI_SEARCH])) { + report_error(TYPE_ERROR, "Language file contains a GESHI_SEARCH entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!"); + } else { + if(preg_match("/(?)/s", $rv[GESHI_SEARCH])) { + report_error(TYPE_WARNING, "Language file contains a regular expression with an unescaped match for a pipe character '|' which needs escaping as '<PIPE>' instead at \$language_data['REGEXPS'][$rk]!"); + } + } + if(!isset($rv[GESHI_REPLACE])) { + report_error(TYPE_WARNING, "Language file contains no GESHI_REPLACE entry in extended regular expression at \$language_data['REGEXPS'][$rk]!"); + } elseif(!is_string($rv[GESHI_REPLACE])) { + report_error(TYPE_ERROR, "Language file contains a GESHI_REPLACE entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!"); + } + if(!isset($rv[GESHI_MODIFIERS])) { + report_error(TYPE_WARNING, "Language file contains no GESHI_MODIFIERS entry in extended regular expression at \$language_data['REGEXPS'][$rk]!"); + } elseif(!is_string($rv[GESHI_MODIFIERS])) { + report_error(TYPE_ERROR, "Language file contains a GESHI_MODIFIERS entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!"); + } + if(!isset($rv[GESHI_BEFORE])) { + report_error(TYPE_WARNING, "Language file contains no GESHI_BEFORE entry in extended regular expression at \$language_data['REGEXPS'][$rk]!"); + } elseif(!is_string($rv[GESHI_BEFORE])) { + report_error(TYPE_ERROR, "Language file contains a GESHI_BEFORE entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!"); + } + if(!isset($rv[GESHI_AFTER])) { + report_error(TYPE_WARNING, "Language file contains no GESHI_AFTER entry in extended regular expression at \$language_data['REGEXPS'][$rk]!"); + } elseif(!is_string($rv[GESHI_AFTER])) { + report_error(TYPE_ERROR, "Language file contains a GESHI_AFTER entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!"); + } + } else { + report_error(TYPE_WARNING, "Language file contains an non-string and non-array entry at \$language_data['REGEXPS'][$rk]!"); + } + if(!isset($language_data['STYLES']['REGEXPS'][$rk])) { + report_error(TYPE_WARNING, "Language file contains no \$language_data['STYLES']['REGEXPS'] specification for regexp group $rk!"); + } + } + foreach($language_data['STYLES']['REGEXPS'] as $rk => $rv) { + if(!isset($language_data['REGEXPS'][$rk])) { + report_error(TYPE_NOTICE, "Language file contains an superfluous \$language_data['STYLES']['REGEXPS'] specification for regexp key $rk!"); + } + } + + + } + + output_error_cache(); + + flush(); + + if($error_abort) { + break; + } + } +} + +$time_end = explode(' ', microtime()); +$time_diff = $time_end[0] + $time_end[1] - $time_start[0] - $time_start[1]; + +if ( PHP_SAPI != 'cli' ) { +?>
        5. +
        + +

        Validation process completed in seconds.

        + + + + + + + +Validation process completed in seconds. + +GeSHi © 2004-2007 Nigel McNie, 2007-2008 Benny Baumann, released under the GNU GPL + + \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi.php b/_piecrust/libs/Geshi/geshi.php new file mode 100644 index 0000000..8a6e653 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi.php @@ -0,0 +1,4755 @@ +, Benny Baumann + * @copyright (C) 2004 - 2007 Nigel McNie, (C) 2007 - 2008 Benny Baumann + * @license http://gnu.org/copyleft/gpl.html GNU GPL + * + */ + +// +// GeSHi Constants +// You should use these constant names in your programs instead of +// their values - you never know when a value may change in a future +// version +// + +/** The version of this GeSHi file */ +define('GESHI_VERSION', '1.0.8.9'); + +// Define the root directory for the GeSHi code tree +if (!defined('GESHI_ROOT')) { + /** The root directory for GeSHi */ + define('GESHI_ROOT', dirname(__FILE__) . DIRECTORY_SEPARATOR); +} +/** The language file directory for GeSHi + @access private */ +define('GESHI_LANG_ROOT', GESHI_ROOT . 'geshi' . DIRECTORY_SEPARATOR); + +// Define if GeSHi should be paranoid about security +if (!defined('GESHI_SECURITY_PARANOID')) { + /** Tells GeSHi to be paranoid about security settings */ + define('GESHI_SECURITY_PARANOID', false); +} + +// Line numbers - use with enable_line_numbers() +/** Use no line numbers when building the result */ +define('GESHI_NO_LINE_NUMBERS', 0); +/** Use normal line numbers when building the result */ +define('GESHI_NORMAL_LINE_NUMBERS', 1); +/** Use fancy line numbers when building the result */ +define('GESHI_FANCY_LINE_NUMBERS', 2); + +// Container HTML type +/** Use nothing to surround the source */ +define('GESHI_HEADER_NONE', 0); +/** Use a "div" to surround the source */ +define('GESHI_HEADER_DIV', 1); +/** Use a "pre" to surround the source */ +define('GESHI_HEADER_PRE', 2); +/** Use a pre to wrap lines when line numbers are enabled or to wrap the whole code. */ +define('GESHI_HEADER_PRE_VALID', 3); +/** + * Use a "table" to surround the source: + * + * + * + * + * + *
        $header
        $linenumbers
        $code>
        $footer
        + * + * this is essentially only a workaround for Firefox, see sf#1651996 or take a look at + * https://bugzilla.mozilla.org/show_bug.cgi?id=365805 + * @note when linenumbers are disabled this is essentially the same as GESHI_HEADER_PRE + */ +define('GESHI_HEADER_PRE_TABLE', 4); + +// Capatalisation constants +/** Lowercase keywords found */ +define('GESHI_CAPS_NO_CHANGE', 0); +/** Uppercase keywords found */ +define('GESHI_CAPS_UPPER', 1); +/** Leave keywords found as the case that they are */ +define('GESHI_CAPS_LOWER', 2); + +// Link style constants +/** Links in the source in the :link state */ +define('GESHI_LINK', 0); +/** Links in the source in the :hover state */ +define('GESHI_HOVER', 1); +/** Links in the source in the :active state */ +define('GESHI_ACTIVE', 2); +/** Links in the source in the :visited state */ +define('GESHI_VISITED', 3); + +// Important string starter/finisher +// Note that if you change these, they should be as-is: i.e., don't +// write them as if they had been run through htmlentities() +/** The starter for important parts of the source */ +define('GESHI_START_IMPORTANT', ''); +/** The ender for important parts of the source */ +define('GESHI_END_IMPORTANT', ''); + +/**#@+ + * @access private + */ +// When strict mode applies for a language +/** Strict mode never applies (this is the most common) */ +define('GESHI_NEVER', 0); +/** Strict mode *might* apply, and can be enabled or + disabled by {@link GeSHi->enable_strict_mode()} */ +define('GESHI_MAYBE', 1); +/** Strict mode always applies */ +define('GESHI_ALWAYS', 2); + +// Advanced regexp handling constants, used in language files +/** The key of the regex array defining what to search for */ +define('GESHI_SEARCH', 0); +/** The key of the regex array defining what bracket group in a + matched search to use as a replacement */ +define('GESHI_REPLACE', 1); +/** The key of the regex array defining any modifiers to the regular expression */ +define('GESHI_MODIFIERS', 2); +/** The key of the regex array defining what bracket group in a + matched search to put before the replacement */ +define('GESHI_BEFORE', 3); +/** The key of the regex array defining what bracket group in a + matched search to put after the replacement */ +define('GESHI_AFTER', 4); +/** The key of the regex array defining a custom keyword to use + for this regexp's html tag class */ +define('GESHI_CLASS', 5); + +/** Used in language files to mark comments */ +define('GESHI_COMMENTS', 0); + +/** Used to work around missing PHP features **/ +define('GESHI_PHP_PRE_433', !(version_compare(PHP_VERSION, '4.3.3') === 1)); + +/** make sure we can call stripos **/ +if (!function_exists('stripos')) { + // the offset param of preg_match is not supported below PHP 4.3.3 + if (GESHI_PHP_PRE_433) { + /** + * @ignore + */ + function stripos($haystack, $needle, $offset = null) { + if (!is_null($offset)) { + $haystack = substr($haystack, $offset); + } + if (preg_match('/'. preg_quote($needle, '/') . '/', $haystack, $match, PREG_OFFSET_CAPTURE)) { + return $match[0][1]; + } + return false; + } + } + else { + /** + * @ignore + */ + function stripos($haystack, $needle, $offset = null) { + if (preg_match('/'. preg_quote($needle, '/') . '/', $haystack, $match, PREG_OFFSET_CAPTURE, $offset)) { + return $match[0][1]; + } + return false; + } + } +} + +/** some old PHP / PCRE subpatterns only support up to xxx subpatterns in + regular expressions. Set this to false if your PCRE lib is up to date + @see GeSHi->optimize_regexp_list() + **/ +define('GESHI_MAX_PCRE_SUBPATTERNS', 500); +/** it's also important not to generate too long regular expressions + be generous here... but keep in mind, that when reaching this limit we + still have to close open patterns. 12k should do just fine on a 16k limit. + @see GeSHi->optimize_regexp_list() + **/ +define('GESHI_MAX_PCRE_LENGTH', 12288); + +//Number format specification +/** Basic number format for integers */ +define('GESHI_NUMBER_INT_BASIC', 1); //Default integers \d+ +/** Enhanced number format for integers like seen in C */ +define('GESHI_NUMBER_INT_CSTYLE', 2); //Default C-Style \d+[lL]? +/** Number format to highlight binary numbers with a suffix "b" */ +define('GESHI_NUMBER_BIN_SUFFIX', 16); //[01]+[bB] +/** Number format to highlight binary numbers with a prefix % */ +define('GESHI_NUMBER_BIN_PREFIX_PERCENT', 32); //%[01]+ +/** Number format to highlight binary numbers with a prefix 0b (C) */ +define('GESHI_NUMBER_BIN_PREFIX_0B', 64); //0b[01]+ +/** Number format to highlight octal numbers with a leading zero */ +define('GESHI_NUMBER_OCT_PREFIX', 256); //0[0-7]+ +/** Number format to highlight octal numbers with a prefix 0o (logtalk) */ +define('GESHI_NUMBER_OCT_PREFIX_0O', 512); //0[0-7]+ +/** Number format to highlight octal numbers with a leading @ (Used in HiSofts Devpac series). */ +define('GESHI_NUMBER_OCT_PREFIX_AT', 1024); //@[0-7]+ +/** Number format to highlight octal numbers with a suffix of o */ +define('GESHI_NUMBER_OCT_SUFFIX', 2048); //[0-7]+[oO] +/** Number format to highlight hex numbers with a prefix 0x */ +define('GESHI_NUMBER_HEX_PREFIX', 4096); //0x[0-9a-fA-F]+ +/** Number format to highlight hex numbers with a prefix $ */ +define('GESHI_NUMBER_HEX_PREFIX_DOLLAR', 8192); //$[0-9a-fA-F]+ +/** Number format to highlight hex numbers with a suffix of h */ +define('GESHI_NUMBER_HEX_SUFFIX', 16384); //[0-9][0-9a-fA-F]*h +/** Number format to highlight floating-point numbers without support for scientific notation */ +define('GESHI_NUMBER_FLT_NONSCI', 65536); //\d+\.\d+ +/** Number format to highlight floating-point numbers without support for scientific notation */ +define('GESHI_NUMBER_FLT_NONSCI_F', 131072); //\d+(\.\d+)?f +/** Number format to highlight floating-point numbers with support for scientific notation (E) and optional leading zero */ +define('GESHI_NUMBER_FLT_SCI_SHORT', 262144); //\.\d+e\d+ +/** Number format to highlight floating-point numbers with support for scientific notation (E) and required leading digit */ +define('GESHI_NUMBER_FLT_SCI_ZERO', 524288); //\d+(\.\d+)?e\d+ +//Custom formats are passed by RX array + +// Error detection - use these to analyse faults +/** No sourcecode to highlight was specified + * @deprecated + */ +define('GESHI_ERROR_NO_INPUT', 1); +/** The language specified does not exist */ +define('GESHI_ERROR_NO_SUCH_LANG', 2); +/** GeSHi could not open a file for reading (generally a language file) */ +define('GESHI_ERROR_FILE_NOT_READABLE', 3); +/** The header type passed to {@link GeSHi->set_header_type()} was invalid */ +define('GESHI_ERROR_INVALID_HEADER_TYPE', 4); +/** The line number type passed to {@link GeSHi->enable_line_numbers()} was invalid */ +define('GESHI_ERROR_INVALID_LINE_NUMBER_TYPE', 5); +/**#@-*/ + + +/** + * The GeSHi Class. + * + * Please refer to the documentation for GeSHi 1.0.X that is available + * at http://qbnz.com/highlighter/documentation.php for more information + * about how to use this class. + * + * @package geshi + * @author Nigel McNie , Benny Baumann + * @copyright (C) 2004 - 2007 Nigel McNie, (C) 2007 - 2008 Benny Baumann + */ +class GeSHi { + /**#@+ + * @access private + */ + /** + * The source code to highlight + * @var string + */ + var $source = ''; + + /** + * The language to use when highlighting + * @var string + */ + var $language = ''; + + /** + * The data for the language used + * @var array + */ + var $language_data = array(); + + /** + * The path to the language files + * @var string + */ + var $language_path = GESHI_LANG_ROOT; + + /** + * The error message associated with an error + * @var string + * @todo check err reporting works + */ + var $error = false; + + /** + * Possible error messages + * @var array + */ + var $error_messages = array( + GESHI_ERROR_NO_SUCH_LANG => 'GeSHi could not find the language {LANGUAGE} (using path {PATH})', + GESHI_ERROR_FILE_NOT_READABLE => 'The file specified for load_from_file was not readable', + GESHI_ERROR_INVALID_HEADER_TYPE => 'The header type specified is invalid', + GESHI_ERROR_INVALID_LINE_NUMBER_TYPE => 'The line number type specified is invalid' + ); + + /** + * Whether highlighting is strict or not + * @var boolean + */ + var $strict_mode = false; + + /** + * Whether to use CSS classes in output + * @var boolean + */ + var $use_classes = false; + + /** + * The type of header to use. Can be one of the following + * values: + * + * - GESHI_HEADER_PRE: Source is outputted in a "pre" HTML element. + * - GESHI_HEADER_DIV: Source is outputted in a "div" HTML element. + * - GESHI_HEADER_NONE: No header is outputted. + * + * @var int + */ + var $header_type = GESHI_HEADER_PRE; + + /** + * Array of permissions for which lexics should be highlighted + * @var array + */ + var $lexic_permissions = array( + 'KEYWORDS' => array(), + 'COMMENTS' => array('MULTI' => true), + 'REGEXPS' => array(), + 'ESCAPE_CHAR' => true, + 'BRACKETS' => true, + 'SYMBOLS' => false, + 'STRINGS' => true, + 'NUMBERS' => true, + 'METHODS' => true, + 'SCRIPT' => true + ); + + /** + * The time it took to parse the code + * @var double + */ + var $time = 0; + + /** + * The content of the header block + * @var string + */ + var $header_content = ''; + + /** + * The content of the footer block + * @var string + */ + var $footer_content = ''; + + /** + * The style of the header block + * @var string + */ + var $header_content_style = ''; + + /** + * The style of the footer block + * @var string + */ + var $footer_content_style = ''; + + /** + * Tells if a block around the highlighted source should be forced + * if not using line numbering + * @var boolean + */ + var $force_code_block = false; + + /** + * The styles for hyperlinks in the code + * @var array + */ + var $link_styles = array(); + + /** + * Whether important blocks should be recognised or not + * @var boolean + * @deprecated + * @todo REMOVE THIS FUNCTIONALITY! + */ + var $enable_important_blocks = false; + + /** + * Styles for important parts of the code + * @var string + * @deprecated + * @todo As above - rethink the whole idea of important blocks as it is buggy and + * will be hard to implement in 1.2 + */ + var $important_styles = 'font-weight: bold; color: red;'; // Styles for important parts of the code + + /** + * Whether CSS IDs should be added to the code + * @var boolean + */ + var $add_ids = false; + + /** + * Lines that should be highlighted extra + * @var array + */ + var $highlight_extra_lines = array(); + + /** + * Styles of lines that should be highlighted extra + * @var array + */ + var $highlight_extra_lines_styles = array(); + + /** + * Styles of extra-highlighted lines + * @var string + */ + var $highlight_extra_lines_style = 'background-color: #ffc;'; + + /** + * The line ending + * If null, nl2br() will be used on the result string. + * Otherwise, all instances of \n will be replaced with $line_ending + * @var string + */ + var $line_ending = null; + + /** + * Number at which line numbers should start at + * @var int + */ + var $line_numbers_start = 1; + + /** + * The overall style for this code block + * @var string + */ + var $overall_style = 'font-family:monospace;'; + + /** + * The style for the actual code + * @var string + */ + var $code_style = 'font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;'; + + /** + * The overall class for this code block + * @var string + */ + var $overall_class = ''; + + /** + * The overall ID for this code block + * @var string + */ + var $overall_id = ''; + + /** + * Line number styles + * @var string + */ + var $line_style1 = 'font-weight: normal; vertical-align:top;'; + + /** + * Line number styles for fancy lines + * @var string + */ + var $line_style2 = 'font-weight: bold; vertical-align:top;'; + + /** + * Style for line numbers when GESHI_HEADER_PRE_TABLE is chosen + * @var string + */ + var $table_linenumber_style = 'width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;'; + + /** + * Flag for how line numbers are displayed + * @var boolean + */ + var $line_numbers = GESHI_NO_LINE_NUMBERS; + + /** + * Flag to decide if multi line spans are allowed. Set it to false to make sure + * each tag is closed before and reopened after each linefeed. + * @var boolean + */ + var $allow_multiline_span = true; + + /** + * The "nth" value for fancy line highlighting + * @var int + */ + var $line_nth_row = 0; + + /** + * The size of tab stops + * @var int + */ + var $tab_width = 8; + + /** + * Should we use language-defined tab stop widths? + * @var int + */ + var $use_language_tab_width = false; + + /** + * Default target for keyword links + * @var string + */ + var $link_target = ''; + + /** + * The encoding to use for entity encoding + * NOTE: Used with Escape Char Sequences to fix UTF-8 handling (cf. SF#2037598) + * @var string + */ + var $encoding = 'utf-8'; + + /** + * Should keywords be linked? + * @var boolean + */ + var $keyword_links = true; + + /** + * Currently loaded language file + * @var string + * @since 1.0.7.22 + */ + var $loaded_language = ''; + + /** + * Wether the caches needed for parsing are built or not + * + * @var bool + * @since 1.0.8 + */ + var $parse_cache_built = false; + + /** + * Work around for Suhosin Patch with disabled /e modifier + * + * Note from suhosins author in config file: + *
        + * The /e modifier inside preg_replace() allows code execution. + * Often it is the cause for remote code execution exploits. It is wise to + * deactivate this feature and test where in the application it is used. + * The developer using the /e modifier should be made aware that he should + * use preg_replace_callback() instead + *
        + * + * @var array + * @since 1.0.8 + */ + var $_kw_replace_group = 0; + var $_rx_key = 0; + + /** + * some "callback parameters" for handle_multiline_regexps + * + * @since 1.0.8 + * @access private + * @var string + */ + var $_hmr_before = ''; + var $_hmr_replace = ''; + var $_hmr_after = ''; + var $_hmr_key = 0; + + /**#@-*/ + + /** + * Creates a new GeSHi object, with source and language + * + * @param string The source code to highlight + * @param string The language to highlight the source with + * @param string The path to the language file directory. This + * is deprecated! I've backported the auto path + * detection from the 1.1.X dev branch, so now it + * should be automatically set correctly. If you have + * renamed the language directory however, you will + * still need to set the path using this parameter or + * {@link GeSHi->set_language_path()} + * @since 1.0.0 + */ + function GeSHi($source = '', $language = '', $path = '') { + if (!empty($source)) { + $this->set_source($source); + } + if (!empty($language)) { + $this->set_language($language); + } + $this->set_language_path($path); + } + + /** + * Returns an error message associated with the last GeSHi operation, + * or false if no error has occured + * + * @return string|false An error message if there has been an error, else false + * @since 1.0.0 + */ + function error() { + if ($this->error) { + //Put some template variables for debugging here ... + $debug_tpl_vars = array( + '{LANGUAGE}' => $this->language, + '{PATH}' => $this->language_path + ); + $msg = str_replace( + array_keys($debug_tpl_vars), + array_values($debug_tpl_vars), + $this->error_messages[$this->error]); + + return "
        GeSHi Error: $msg (code {$this->error})
        "; + } + return false; + } + + /** + * Gets a human-readable language name (thanks to Simon Patterson + * for the idea :)) + * + * @return string The name for the current language + * @since 1.0.2 + */ + function get_language_name() { + if (GESHI_ERROR_NO_SUCH_LANG == $this->error) { + return $this->language_data['LANG_NAME'] . ' (Unknown Language)'; + } + return $this->language_data['LANG_NAME']; + } + + /** + * Sets the source code for this object + * + * @param string The source code to highlight + * @since 1.0.0 + */ + function set_source($source) { + $this->source = $source; + $this->highlight_extra_lines = array(); + } + + /** + * Sets the language for this object + * + * @note since 1.0.8 this function won't reset language-settings by default anymore! + * if you need this set $force_reset = true + * + * @param string The name of the language to use + * @since 1.0.0 + */ + function set_language($language, $force_reset = false) { + if ($force_reset) { + $this->loaded_language = false; + } + + //Clean up the language name to prevent malicious code injection + $language = preg_replace('#[^a-zA-Z0-9\-_]#', '', $language); + + $language = strtolower($language); + + //Retreive the full filename + $file_name = $this->language_path . $language . '.php'; + if ($file_name == $this->loaded_language) { + // this language is already loaded! + return; + } + + $this->language = $language; + + $this->error = false; + $this->strict_mode = GESHI_NEVER; + + //Check if we can read the desired file + if (!is_readable($file_name)) { + $this->error = GESHI_ERROR_NO_SUCH_LANG; + return; + } + + // Load the language for parsing + $this->load_language($file_name); + } + + /** + * Sets the path to the directory containing the language files. Note + * that this path is relative to the directory of the script that included + * geshi.php, NOT geshi.php itself. + * + * @param string The path to the language directory + * @since 1.0.0 + * @deprecated The path to the language files should now be automatically + * detected, so this method should no longer be needed. The + * 1.1.X branch handles manual setting of the path differently + * so this method will disappear in 1.2.0. + */ + function set_language_path($path) { + if(strpos($path,':')) { + //Security Fix to prevent external directories using fopen wrappers. + if(DIRECTORY_SEPARATOR == "\\") { + if(!preg_match('#^[a-zA-Z]:#', $path) || false !== strpos($path, ':', 2)) { + return; + } + } else { + return; + } + } + if(preg_match('#[^/a-zA-Z0-9_\.\-\\\s:]#', $path)) { + //Security Fix to prevent external directories using fopen wrappers. + return; + } + if(GESHI_SECURITY_PARANOID && false !== strpos($path, '/.')) { + //Security Fix to prevent external directories using fopen wrappers. + return; + } + if(GESHI_SECURITY_PARANOID && false !== strpos($path, '..')) { + //Security Fix to prevent external directories using fopen wrappers. + return; + } + if ($path) { + $this->language_path = ('/' == $path[strlen($path) - 1]) ? $path : $path . '/'; + $this->set_language($this->language); // otherwise set_language_path has no effect + } + } + + /** + * Get supported langs or an associative array lang=>full_name. + * @param boolean $longnames + * @return array + */ + function get_supported_languages($full_names=false) + { + // return array + $back = array(); + + // we walk the lang root + $dir = dir($this->language_path); + + // foreach entry + while (false !== ($entry = $dir->read())) + { + $full_path = $this->language_path.$entry; + + // Skip all dirs + if (is_dir($full_path)) { + continue; + } + + // we only want lang.php files + if (!preg_match('/^([^.]+)\.php$/', $entry, $matches)) { + continue; + } + + // Raw lang name is here + $langname = $matches[1]; + + // We want the fullname too? + if ($full_names === true) + { + if (false !== ($fullname = $this->get_language_fullname($langname))) + { + $back[$langname] = $fullname; // we go associative + } + } + else + { + // just store raw langname + $back[] = $langname; + } + } + + $dir->close(); + + return $back; + } + + /** + * Get full_name for a lang or false. + * @param string $language short langname (html4strict for example) + * @return mixed + */ + function get_language_fullname($language) + { + //Clean up the language name to prevent malicious code injection + $language = preg_replace('#[^a-zA-Z0-9\-_]#', '', $language); + + $language = strtolower($language); + + // get fullpath-filename for a langname + $fullpath = $this->language_path.$language.'.php'; + + // we need to get contents :S + if (false === ($data = file_get_contents($fullpath))) { + $this->error = sprintf('Geshi::get_lang_fullname() Unknown Language: %s', $language); + return false; + } + + // match the langname + if (!preg_match('/\'LANG_NAME\'\s*=>\s*\'((?:[^\']|\\\')+)\'/', $data, $matches)) { + $this->error = sprintf('Geshi::get_lang_fullname(%s): Regex can not detect language', $language); + return false; + } + + // return fullname for langname + return stripcslashes($matches[1]); + } + + /** + * Sets the type of header to be used. + * + * If GESHI_HEADER_DIV is used, the code is surrounded in a "div".This + * means more source code but more control over tab width and line-wrapping. + * GESHI_HEADER_PRE means that a "pre" is used - less source, but less + * control. Default is GESHI_HEADER_PRE. + * + * From 1.0.7.2, you can use GESHI_HEADER_NONE to specify that no header code + * should be outputted. + * + * @param int The type of header to be used + * @since 1.0.0 + */ + function set_header_type($type) { + //Check if we got a valid header type + if (!in_array($type, array(GESHI_HEADER_NONE, GESHI_HEADER_DIV, + GESHI_HEADER_PRE, GESHI_HEADER_PRE_VALID, GESHI_HEADER_PRE_TABLE))) { + $this->error = GESHI_ERROR_INVALID_HEADER_TYPE; + return; + } + + //Set that new header type + $this->header_type = $type; + } + + /** + * Sets the styles for the code that will be outputted + * when this object is parsed. The style should be a + * string of valid stylesheet declarations + * + * @param string The overall style for the outputted code block + * @param boolean Whether to merge the styles with the current styles or not + * @since 1.0.0 + */ + function set_overall_style($style, $preserve_defaults = false) { + if (!$preserve_defaults) { + $this->overall_style = $style; + } else { + $this->overall_style .= $style; + } + } + + /** + * Sets the overall classname for this block of code. This + * class can then be used in a stylesheet to style this object's + * output + * + * @param string The class name to use for this block of code + * @since 1.0.0 + */ + function set_overall_class($class) { + $this->overall_class = $class; + } + + /** + * Sets the overall id for this block of code. This id can then + * be used in a stylesheet to style this object's output + * + * @param string The ID to use for this block of code + * @since 1.0.0 + */ + function set_overall_id($id) { + $this->overall_id = $id; + } + + /** + * Sets whether CSS classes should be used to highlight the source. Default + * is off, calling this method with no arguments will turn it on + * + * @param boolean Whether to turn classes on or not + * @since 1.0.0 + */ + function enable_classes($flag = true) { + $this->use_classes = ($flag) ? true : false; + } + + /** + * Sets the style for the actual code. This should be a string + * containing valid stylesheet declarations. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * Note: Use this method to override any style changes you made to + * the line numbers if you are using line numbers, else the line of + * code will have the same style as the line number! Consult the + * GeSHi documentation for more information about this. + * + * @param string The style to use for actual code + * @param boolean Whether to merge the current styles with the new styles + * @since 1.0.2 + */ + function set_code_style($style, $preserve_defaults = false) { + if (!$preserve_defaults) { + $this->code_style = $style; + } else { + $this->code_style .= $style; + } + } + + /** + * Sets the styles for the line numbers. + * + * @param string The style for the line numbers that are "normal" + * @param string|boolean If a string, this is the style of the line + * numbers that are "fancy", otherwise if boolean then this + * defines whether the normal styles should be merged with the + * new normal styles or not + * @param boolean If set, is the flag for whether to merge the "fancy" + * styles with the current styles or not + * @since 1.0.2 + */ + function set_line_style($style1, $style2 = '', $preserve_defaults = false) { + //Check if we got 2 or three parameters + if (is_bool($style2)) { + $preserve_defaults = $style2; + $style2 = ''; + } + + //Actually set the new styles + if (!$preserve_defaults) { + $this->line_style1 = $style1; + $this->line_style2 = $style2; + } else { + $this->line_style1 .= $style1; + $this->line_style2 .= $style2; + } + } + + /** + * Sets whether line numbers should be displayed. + * + * Valid values for the first parameter are: + * + * - GESHI_NO_LINE_NUMBERS: Line numbers will not be displayed + * - GESHI_NORMAL_LINE_NUMBERS: Line numbers will be displayed + * - GESHI_FANCY_LINE_NUMBERS: Fancy line numbers will be displayed + * + * For fancy line numbers, the second parameter is used to signal which lines + * are to be fancy. For example, if the value of this parameter is 5 then every + * 5th line will be fancy. + * + * @param int How line numbers should be displayed + * @param int Defines which lines are fancy + * @since 1.0.0 + */ + function enable_line_numbers($flag, $nth_row = 5) { + if (GESHI_NO_LINE_NUMBERS != $flag && GESHI_NORMAL_LINE_NUMBERS != $flag + && GESHI_FANCY_LINE_NUMBERS != $flag) { + $this->error = GESHI_ERROR_INVALID_LINE_NUMBER_TYPE; + } + $this->line_numbers = $flag; + $this->line_nth_row = $nth_row; + } + + /** + * Sets wether spans and other HTML markup generated by GeSHi can + * span over multiple lines or not. Defaults to true to reduce overhead. + * Set it to false if you want to manipulate the output or manually display + * the code in an ordered list. + * + * @param boolean Wether multiline spans are allowed or not + * @since 1.0.7.22 + */ + function enable_multiline_span($flag) { + $this->allow_multiline_span = (bool) $flag; + } + + /** + * Get current setting for multiline spans, see GeSHi->enable_multiline_span(). + * + * @see enable_multiline_span + * @return bool + */ + function get_multiline_span() { + return $this->allow_multiline_span; + } + + /** + * Sets the style for a keyword group. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * @param int The key of the keyword group to change the styles of + * @param string The style to make the keywords + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @since 1.0.0 + */ + function set_keyword_group_style($key, $style, $preserve_defaults = false) { + //Set the style for this keyword group + if (!$preserve_defaults) { + $this->language_data['STYLES']['KEYWORDS'][$key] = $style; + } else { + $this->language_data['STYLES']['KEYWORDS'][$key] .= $style; + } + + //Update the lexic permissions + if (!isset($this->lexic_permissions['KEYWORDS'][$key])) { + $this->lexic_permissions['KEYWORDS'][$key] = true; + } + } + + /** + * Turns highlighting on/off for a keyword group + * + * @param int The key of the keyword group to turn on or off + * @param boolean Whether to turn highlighting for that group on or off + * @since 1.0.0 + */ + function set_keyword_group_highlighting($key, $flag = true) { + $this->lexic_permissions['KEYWORDS'][$key] = ($flag) ? true : false; + } + + /** + * Sets the styles for comment groups. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * @param int The key of the comment group to change the styles of + * @param string The style to make the comments + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @since 1.0.0 + */ + function set_comments_style($key, $style, $preserve_defaults = false) { + if (!$preserve_defaults) { + $this->language_data['STYLES']['COMMENTS'][$key] = $style; + } else { + $this->language_data['STYLES']['COMMENTS'][$key] .= $style; + } + } + + /** + * Turns highlighting on/off for comment groups + * + * @param int The key of the comment group to turn on or off + * @param boolean Whether to turn highlighting for that group on or off + * @since 1.0.0 + */ + function set_comments_highlighting($key, $flag = true) { + $this->lexic_permissions['COMMENTS'][$key] = ($flag) ? true : false; + } + + /** + * Sets the styles for escaped characters. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * @param string The style to make the escape characters + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @since 1.0.0 + */ + function set_escape_characters_style($style, $preserve_defaults = false, $group = 0) { + if (!$preserve_defaults) { + $this->language_data['STYLES']['ESCAPE_CHAR'][$group] = $style; + } else { + $this->language_data['STYLES']['ESCAPE_CHAR'][$group] .= $style; + } + } + + /** + * Turns highlighting on/off for escaped characters + * + * @param boolean Whether to turn highlighting for escape characters on or off + * @since 1.0.0 + */ + function set_escape_characters_highlighting($flag = true) { + $this->lexic_permissions['ESCAPE_CHAR'] = ($flag) ? true : false; + } + + /** + * Sets the styles for brackets. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * This method is DEPRECATED: use set_symbols_style instead. + * This method will be removed in 1.2.X + * + * @param string The style to make the brackets + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @since 1.0.0 + * @deprecated In favour of set_symbols_style + */ + function set_brackets_style($style, $preserve_defaults = false) { + if (!$preserve_defaults) { + $this->language_data['STYLES']['BRACKETS'][0] = $style; + } else { + $this->language_data['STYLES']['BRACKETS'][0] .= $style; + } + } + + /** + * Turns highlighting on/off for brackets + * + * This method is DEPRECATED: use set_symbols_highlighting instead. + * This method will be remove in 1.2.X + * + * @param boolean Whether to turn highlighting for brackets on or off + * @since 1.0.0 + * @deprecated In favour of set_symbols_highlighting + */ + function set_brackets_highlighting($flag) { + $this->lexic_permissions['BRACKETS'] = ($flag) ? true : false; + } + + /** + * Sets the styles for symbols. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * @param string The style to make the symbols + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @param int Tells the group of symbols for which style should be set. + * @since 1.0.1 + */ + function set_symbols_style($style, $preserve_defaults = false, $group = 0) { + // Update the style of symbols + if (!$preserve_defaults) { + $this->language_data['STYLES']['SYMBOLS'][$group] = $style; + } else { + $this->language_data['STYLES']['SYMBOLS'][$group] .= $style; + } + + // For backward compatibility + if (0 == $group) { + $this->set_brackets_style ($style, $preserve_defaults); + } + } + + /** + * Turns highlighting on/off for symbols + * + * @param boolean Whether to turn highlighting for symbols on or off + * @since 1.0.0 + */ + function set_symbols_highlighting($flag) { + // Update lexic permissions for this symbol group + $this->lexic_permissions['SYMBOLS'] = ($flag) ? true : false; + + // For backward compatibility + $this->set_brackets_highlighting ($flag); + } + + /** + * Sets the styles for strings. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * @param string The style to make the escape characters + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @param int Tells the group of strings for which style should be set. + * @since 1.0.0 + */ + function set_strings_style($style, $preserve_defaults = false, $group = 0) { + if (!$preserve_defaults) { + $this->language_data['STYLES']['STRINGS'][$group] = $style; + } else { + $this->language_data['STYLES']['STRINGS'][$group] .= $style; + } + } + + /** + * Turns highlighting on/off for strings + * + * @param boolean Whether to turn highlighting for strings on or off + * @since 1.0.0 + */ + function set_strings_highlighting($flag) { + $this->lexic_permissions['STRINGS'] = ($flag) ? true : false; + } + + /** + * Sets the styles for strict code blocks. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * @param string The style to make the script blocks + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @param int Tells the group of script blocks for which style should be set. + * @since 1.0.8.4 + */ + function set_script_style($style, $preserve_defaults = false, $group = 0) { + // Update the style of symbols + if (!$preserve_defaults) { + $this->language_data['STYLES']['SCRIPT'][$group] = $style; + } else { + $this->language_data['STYLES']['SCRIPT'][$group] .= $style; + } + } + + /** + * Sets the styles for numbers. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * @param string The style to make the numbers + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @param int Tells the group of numbers for which style should be set. + * @since 1.0.0 + */ + function set_numbers_style($style, $preserve_defaults = false, $group = 0) { + if (!$preserve_defaults) { + $this->language_data['STYLES']['NUMBERS'][$group] = $style; + } else { + $this->language_data['STYLES']['NUMBERS'][$group] .= $style; + } + } + + /** + * Turns highlighting on/off for numbers + * + * @param boolean Whether to turn highlighting for numbers on or off + * @since 1.0.0 + */ + function set_numbers_highlighting($flag) { + $this->lexic_permissions['NUMBERS'] = ($flag) ? true : false; + } + + /** + * Sets the styles for methods. $key is a number that references the + * appropriate "object splitter" - see the language file for the language + * you are highlighting to get this number. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * @param int The key of the object splitter to change the styles of + * @param string The style to make the methods + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @since 1.0.0 + */ + function set_methods_style($key, $style, $preserve_defaults = false) { + if (!$preserve_defaults) { + $this->language_data['STYLES']['METHODS'][$key] = $style; + } else { + $this->language_data['STYLES']['METHODS'][$key] .= $style; + } + } + + /** + * Turns highlighting on/off for methods + * + * @param boolean Whether to turn highlighting for methods on or off + * @since 1.0.0 + */ + function set_methods_highlighting($flag) { + $this->lexic_permissions['METHODS'] = ($flag) ? true : false; + } + + /** + * Sets the styles for regexps. If $preserve_defaults is + * true, then styles are merged with the default styles, with the + * user defined styles having priority + * + * @param string The style to make the regular expression matches + * @param boolean Whether to merge the new styles with the old or just + * to overwrite them + * @since 1.0.0 + */ + function set_regexps_style($key, $style, $preserve_defaults = false) { + if (!$preserve_defaults) { + $this->language_data['STYLES']['REGEXPS'][$key] = $style; + } else { + $this->language_data['STYLES']['REGEXPS'][$key] .= $style; + } + } + + /** + * Turns highlighting on/off for regexps + * + * @param int The key of the regular expression group to turn on or off + * @param boolean Whether to turn highlighting for the regular expression group on or off + * @since 1.0.0 + */ + function set_regexps_highlighting($key, $flag) { + $this->lexic_permissions['REGEXPS'][$key] = ($flag) ? true : false; + } + + /** + * Sets whether a set of keywords are checked for in a case sensitive manner + * + * @param int The key of the keyword group to change the case sensitivity of + * @param boolean Whether to check in a case sensitive manner or not + * @since 1.0.0 + */ + function set_case_sensitivity($key, $case) { + $this->language_data['CASE_SENSITIVE'][$key] = ($case) ? true : false; + } + + /** + * Sets the case that keywords should use when found. Use the constants: + * + * - GESHI_CAPS_NO_CHANGE: leave keywords as-is + * - GESHI_CAPS_UPPER: convert all keywords to uppercase where found + * - GESHI_CAPS_LOWER: convert all keywords to lowercase where found + * + * @param int A constant specifying what to do with matched keywords + * @since 1.0.1 + */ + function set_case_keywords($case) { + if (in_array($case, array( + GESHI_CAPS_NO_CHANGE, GESHI_CAPS_UPPER, GESHI_CAPS_LOWER))) { + $this->language_data['CASE_KEYWORDS'] = $case; + } + } + + /** + * Sets how many spaces a tab is substituted for + * + * Widths below zero are ignored + * + * @param int The tab width + * @since 1.0.0 + */ + function set_tab_width($width) { + $this->tab_width = intval($width); + + //Check if it fit's the constraints: + if ($this->tab_width < 1) { + //Return it to the default + $this->tab_width = 8; + } + } + + /** + * Sets whether or not to use tab-stop width specifed by language + * + * @param boolean Whether to use language-specific tab-stop widths + * @since 1.0.7.20 + */ + function set_use_language_tab_width($use) { + $this->use_language_tab_width = (bool) $use; + } + + /** + * Returns the tab width to use, based on the current language and user + * preference + * + * @return int Tab width + * @since 1.0.7.20 + */ + function get_real_tab_width() { + if (!$this->use_language_tab_width || + !isset($this->language_data['TAB_WIDTH'])) { + return $this->tab_width; + } else { + return $this->language_data['TAB_WIDTH']; + } + } + + /** + * Enables/disables strict highlighting. Default is off, calling this + * method without parameters will turn it on. See documentation + * for more details on strict mode and where to use it. + * + * @param boolean Whether to enable strict mode or not + * @since 1.0.0 + */ + function enable_strict_mode($mode = true) { + if (GESHI_MAYBE == $this->language_data['STRICT_MODE_APPLIES']) { + $this->strict_mode = ($mode) ? GESHI_ALWAYS : GESHI_NEVER; + } + } + + /** + * Disables all highlighting + * + * @since 1.0.0 + * @todo Rewrite with array traversal + * @deprecated In favour of enable_highlighting + */ + function disable_highlighting() { + $this->enable_highlighting(false); + } + + /** + * Enables all highlighting + * + * The optional flag parameter was added in version 1.0.7.21 and can be used + * to enable (true) or disable (false) all highlighting. + * + * @since 1.0.0 + * @param boolean A flag specifying whether to enable or disable all highlighting + * @todo Rewrite with array traversal + */ + function enable_highlighting($flag = true) { + $flag = $flag ? true : false; + foreach ($this->lexic_permissions as $key => $value) { + if (is_array($value)) { + foreach ($value as $k => $v) { + $this->lexic_permissions[$key][$k] = $flag; + } + } else { + $this->lexic_permissions[$key] = $flag; + } + } + + // Context blocks + $this->enable_important_blocks = $flag; + } + + /** + * Given a file extension, this method returns either a valid geshi language + * name, or the empty string if it couldn't be found + * + * @param string The extension to get a language name for + * @param array A lookup array to use instead of the default one + * @since 1.0.5 + * @todo Re-think about how this method works (maybe make it private and/or make it + * a extension->lang lookup?) + * @todo static? + */ + function get_language_name_from_extension( $extension, $lookup = array() ) { + if ( !is_array($lookup) || empty($lookup)) { + $lookup = array( + '6502acme' => array( 'a', 's', 'asm', 'inc' ), + '6502tasm' => array( 'a', 's', 'asm', 'inc' ), + '6502kickass' => array( 'a', 's', 'asm', 'inc' ), + '68000devpac' => array( 'a', 's', 'asm', 'inc' ), + 'abap' => array('abap'), + 'actionscript' => array('as'), + 'ada' => array('a', 'ada', 'adb', 'ads'), + 'apache' => array('conf'), + 'asm' => array('ash', 'asm', 'inc'), + 'asp' => array('asp'), + 'bash' => array('sh'), + 'bf' => array('bf'), + 'c' => array('c', 'h'), + 'c_mac' => array('c', 'h'), + 'caddcl' => array(), + 'cadlisp' => array(), + 'cdfg' => array('cdfg'), + 'cobol' => array('cbl'), + 'cpp' => array('cpp', 'hpp', 'C', 'H', 'CPP', 'HPP'), + 'csharp' => array('cs'), + 'css' => array('css'), + 'd' => array('d'), + 'delphi' => array('dpk', 'dpr', 'pp', 'pas'), + 'diff' => array('diff', 'patch'), + 'dos' => array('bat', 'cmd'), + 'gdb' => array('kcrash', 'crash', 'bt'), + 'gettext' => array('po', 'pot'), + 'gml' => array('gml'), + 'gnuplot' => array('plt'), + 'groovy' => array('groovy'), + 'haskell' => array('hs'), + 'html4strict' => array('html', 'htm'), + 'ini' => array('ini', 'desktop'), + 'java' => array('java'), + 'javascript' => array('js'), + 'klonec' => array('kl1'), + 'klonecpp' => array('klx'), + 'latex' => array('tex'), + 'lisp' => array('lisp'), + 'lua' => array('lua'), + 'matlab' => array('m'), + 'mpasm' => array(), + 'mysql' => array('sql'), + 'nsis' => array(), + 'objc' => array(), + 'oobas' => array(), + 'oracle8' => array(), + 'oracle10' => array(), + 'pascal' => array('pas'), + 'perl' => array('pl', 'pm'), + 'php' => array('php', 'php5', 'phtml', 'phps'), + 'povray' => array('pov'), + 'providex' => array('pvc', 'pvx'), + 'prolog' => array('pl'), + 'python' => array('py'), + 'qbasic' => array('bi'), + 'reg' => array('reg'), + 'ruby' => array('rb'), + 'sas' => array('sas'), + 'scala' => array('scala'), + 'scheme' => array('scm'), + 'scilab' => array('sci'), + 'smalltalk' => array('st'), + 'smarty' => array(), + 'tcl' => array('tcl'), + 'vb' => array('bas'), + 'vbnet' => array(), + 'visualfoxpro' => array(), + 'whitespace' => array('ws'), + 'xml' => array('xml', 'svg', 'xrc'), + 'z80' => array('z80', 'asm', 'inc') + ); + } + + foreach ($lookup as $lang => $extensions) { + if (in_array($extension, $extensions)) { + return $lang; + } + } + return ''; + } + + /** + * Given a file name, this method loads its contents in, and attempts + * to set the language automatically. An optional lookup table can be + * passed for looking up the language name. If not specified a default + * table is used + * + * The language table is in the form + *
        array(
        +     *   'lang_name' => array('extension', 'extension', ...),
        +     *   'lang_name' ...
        +     * );
        + * + * @param string The filename to load the source from + * @param array A lookup array to use instead of the default one + * @todo Complete rethink of this and above method + * @since 1.0.5 + */ + function load_from_file($file_name, $lookup = array()) { + if (is_readable($file_name)) { + $this->set_source(file_get_contents($file_name)); + $this->set_language($this->get_language_name_from_extension(substr(strrchr($file_name, '.'), 1), $lookup)); + } else { + $this->error = GESHI_ERROR_FILE_NOT_READABLE; + } + } + + /** + * Adds a keyword to a keyword group for highlighting + * + * @param int The key of the keyword group to add the keyword to + * @param string The word to add to the keyword group + * @since 1.0.0 + */ + function add_keyword($key, $word) { + if (!in_array($word, $this->language_data['KEYWORDS'][$key])) { + $this->language_data['KEYWORDS'][$key][] = $word; + + //NEW in 1.0.8 don't recompile the whole optimized regexp, simply append it + if ($this->parse_cache_built) { + $subkey = count($this->language_data['CACHED_KEYWORD_LISTS'][$key]) - 1; + $this->language_data['CACHED_KEYWORD_LISTS'][$key][$subkey] .= '|' . preg_quote($word, '/'); + } + } + } + + /** + * Removes a keyword from a keyword group + * + * @param int The key of the keyword group to remove the keyword from + * @param string The word to remove from the keyword group + * @param bool Wether to automatically recompile the optimized regexp list or not. + * Note: if you set this to false and @see GeSHi->parse_code() was already called once, + * for the current language, you have to manually call @see GeSHi->optimize_keyword_group() + * or the removed keyword will stay in cache and still be highlighted! On the other hand + * it might be too expensive to recompile the regexp list for every removal if you want to + * remove a lot of keywords. + * @since 1.0.0 + */ + function remove_keyword($key, $word, $recompile = true) { + $key_to_remove = array_search($word, $this->language_data['KEYWORDS'][$key]); + if ($key_to_remove !== false) { + unset($this->language_data['KEYWORDS'][$key][$key_to_remove]); + + //NEW in 1.0.8, optionally recompile keyword group + if ($recompile && $this->parse_cache_built) { + $this->optimize_keyword_group($key); + } + } + } + + /** + * Creates a new keyword group + * + * @param int The key of the keyword group to create + * @param string The styles for the keyword group + * @param boolean Whether the keyword group is case sensitive ornot + * @param array The words to use for the keyword group + * @since 1.0.0 + */ + function add_keyword_group($key, $styles, $case_sensitive = true, $words = array()) { + $words = (array) $words; + if (empty($words)) { + // empty word lists mess up highlighting + return false; + } + + //Add the new keyword group internally + $this->language_data['KEYWORDS'][$key] = $words; + $this->lexic_permissions['KEYWORDS'][$key] = true; + $this->language_data['CASE_SENSITIVE'][$key] = $case_sensitive; + $this->language_data['STYLES']['KEYWORDS'][$key] = $styles; + + //NEW in 1.0.8, cache keyword regexp + if ($this->parse_cache_built) { + $this->optimize_keyword_group($key); + } + } + + /** + * Removes a keyword group + * + * @param int The key of the keyword group to remove + * @since 1.0.0 + */ + function remove_keyword_group ($key) { + //Remove the keyword group internally + unset($this->language_data['KEYWORDS'][$key]); + unset($this->lexic_permissions['KEYWORDS'][$key]); + unset($this->language_data['CASE_SENSITIVE'][$key]); + unset($this->language_data['STYLES']['KEYWORDS'][$key]); + + //NEW in 1.0.8 + unset($this->language_data['CACHED_KEYWORD_LISTS'][$key]); + } + + /** + * compile optimized regexp list for keyword group + * + * @param int The key of the keyword group to compile & optimize + * @since 1.0.8 + */ + function optimize_keyword_group($key) { + $this->language_data['CACHED_KEYWORD_LISTS'][$key] = + $this->optimize_regexp_list($this->language_data['KEYWORDS'][$key]); + $space_as_whitespace = false; + if(isset($this->language_data['PARSER_CONTROL'])) { + if(isset($this->language_data['PARSER_CONTROL']['KEYWORDS'])) { + if(isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['SPACE_AS_WHITESPACE'])) { + $space_as_whitespace = $this->language_data['PARSER_CONTROL']['KEYWORDS']['SPACE_AS_WHITESPACE']; + } + if(isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$key]['SPACE_AS_WHITESPACE'])) { + if(isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$key]['SPACE_AS_WHITESPACE'])) { + $space_as_whitespace = $this->language_data['PARSER_CONTROL']['KEYWORDS'][$key]['SPACE_AS_WHITESPACE']; + } + } + } + } + if($space_as_whitespace) { + foreach($this->language_data['CACHED_KEYWORD_LISTS'][$key] as $rxk => $rxv) { + $this->language_data['CACHED_KEYWORD_LISTS'][$key][$rxk] = + str_replace(" ", "\\s+", $rxv); + } + } + } + + /** + * Sets the content of the header block + * + * @param string The content of the header block + * @since 1.0.2 + */ + function set_header_content($content) { + $this->header_content = $content; + } + + /** + * Sets the content of the footer block + * + * @param string The content of the footer block + * @since 1.0.2 + */ + function set_footer_content($content) { + $this->footer_content = $content; + } + + /** + * Sets the style for the header content + * + * @param string The style for the header content + * @since 1.0.2 + */ + function set_header_content_style($style) { + $this->header_content_style = $style; + } + + /** + * Sets the style for the footer content + * + * @param string The style for the footer content + * @since 1.0.2 + */ + function set_footer_content_style($style) { + $this->footer_content_style = $style; + } + + /** + * Sets whether to force a surrounding block around + * the highlighted code or not + * + * @param boolean Tells whether to enable or disable this feature + * @since 1.0.7.20 + */ + function enable_inner_code_block($flag) { + $this->force_code_block = (bool)$flag; + } + + /** + * Sets the base URL to be used for keywords + * + * @param int The key of the keyword group to set the URL for + * @param string The URL to set for the group. If {FNAME} is in + * the url somewhere, it is replaced by the keyword + * that the URL is being made for + * @since 1.0.2 + */ + function set_url_for_keyword_group($group, $url) { + $this->language_data['URLS'][$group] = $url; + } + + /** + * Sets styles for links in code + * + * @param int A constant that specifies what state the style is being + * set for - e.g. :hover or :visited + * @param string The styles to use for that state + * @since 1.0.2 + */ + function set_link_styles($type, $styles) { + $this->link_styles[$type] = $styles; + } + + /** + * Sets the target for links in code + * + * @param string The target for links in the code, e.g. _blank + * @since 1.0.3 + */ + function set_link_target($target) { + if (!$target) { + $this->link_target = ''; + } else { + $this->link_target = ' target="' . $target . '"'; + } + } + + /** + * Sets styles for important parts of the code + * + * @param string The styles to use on important parts of the code + * @since 1.0.2 + */ + function set_important_styles($styles) { + $this->important_styles = $styles; + } + + /** + * Sets whether context-important blocks are highlighted + * + * @param boolean Tells whether to enable or disable highlighting of important blocks + * @todo REMOVE THIS SHIZ FROM GESHI! + * @deprecated + * @since 1.0.2 + */ + function enable_important_blocks($flag) { + $this->enable_important_blocks = ( $flag ) ? true : false; + } + + /** + * Whether CSS IDs should be added to each line + * + * @param boolean If true, IDs will be added to each line. + * @since 1.0.2 + */ + function enable_ids($flag = true) { + $this->add_ids = ($flag) ? true : false; + } + + /** + * Specifies which lines to highlight extra + * + * The extra style parameter was added in 1.0.7.21. + * + * @param mixed An array of line numbers to highlight, or just a line + * number on its own. + * @param string A string specifying the style to use for this line. + * If null is specified, the default style is used. + * If false is specified, the line will be removed from + * special highlighting + * @since 1.0.2 + * @todo Some data replication here that could be cut down on + */ + function highlight_lines_extra($lines, $style = null) { + if (is_array($lines)) { + //Split up the job using single lines at a time + foreach ($lines as $line) { + $this->highlight_lines_extra($line, $style); + } + } else { + //Mark the line as being highlighted specially + $lines = intval($lines); + $this->highlight_extra_lines[$lines] = $lines; + + //Decide on which style to use + if ($style === null) { //Check if we should use default style + unset($this->highlight_extra_lines_styles[$lines]); + } else if ($style === false) { //Check if to remove this line + unset($this->highlight_extra_lines[$lines]); + unset($this->highlight_extra_lines_styles[$lines]); + } else { + $this->highlight_extra_lines_styles[$lines] = $style; + } + } + } + + /** + * Sets the style for extra-highlighted lines + * + * @param string The style for extra-highlighted lines + * @since 1.0.2 + */ + function set_highlight_lines_extra_style($styles) { + $this->highlight_extra_lines_style = $styles; + } + + /** + * Sets the line-ending + * + * @param string The new line-ending + * @since 1.0.2 + */ + function set_line_ending($line_ending) { + $this->line_ending = (string)$line_ending; + } + + /** + * Sets what number line numbers should start at. Should + * be a positive integer, and will be converted to one. + * + * Warning: Using this method will add the "start" + * attribute to the <ol> that is used for line numbering. + * This is not valid XHTML strict, so if that's what you + * care about then don't use this method. Firefox is getting + * support for the CSS method of doing this in 1.1 and Opera + * has support for the CSS method, but (of course) IE doesn't + * so it's not worth doing it the CSS way yet. + * + * @param int The number to start line numbers at + * @since 1.0.2 + */ + function start_line_numbers_at($number) { + $this->line_numbers_start = abs(intval($number)); + } + + /** + * Sets the encoding used for htmlspecialchars(), for international + * support. + * + * NOTE: This is not needed for now because htmlspecialchars() is not + * being used (it has a security hole in PHP4 that has not been patched). + * Maybe in a future version it may make a return for speed reasons, but + * I doubt it. + * + * @param string The encoding to use for the source + * @since 1.0.3 + */ + function set_encoding($encoding) { + if ($encoding) { + $this->encoding = strtolower($encoding); + } + } + + /** + * Turns linking of keywords on or off. + * + * @param boolean If true, links will be added to keywords + * @since 1.0.2 + */ + function enable_keyword_links($enable = true) { + $this->keyword_links = (bool) $enable; + } + + /** + * Setup caches needed for styling. This is automatically called in + * parse_code() and get_stylesheet() when appropriate. This function helps + * stylesheet generators as they rely on some style information being + * preprocessed + * + * @since 1.0.8 + * @access private + */ + function build_style_cache() { + //Build the style cache needed to highlight numbers appropriate + if($this->lexic_permissions['NUMBERS']) { + //First check what way highlighting information for numbers are given + if(!isset($this->language_data['NUMBERS'])) { + $this->language_data['NUMBERS'] = 0; + } + + if(is_array($this->language_data['NUMBERS'])) { + $this->language_data['NUMBERS_CACHE'] = $this->language_data['NUMBERS']; + } else { + $this->language_data['NUMBERS_CACHE'] = array(); + if(!$this->language_data['NUMBERS']) { + $this->language_data['NUMBERS'] = + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_FLT_NONSCI; + } + + for($i = 0, $j = $this->language_data['NUMBERS']; $j > 0; ++$i, $j>>=1) { + //Rearrange style indices if required ... + if(isset($this->language_data['STYLES']['NUMBERS'][1<<$i])) { + $this->language_data['STYLES']['NUMBERS'][$i] = + $this->language_data['STYLES']['NUMBERS'][1<<$i]; + unset($this->language_data['STYLES']['NUMBERS'][1<<$i]); + } + + //Check if this bit is set for highlighting + if($j&1) { + //So this bit is set ... + //Check if it belongs to group 0 or the actual stylegroup + if(isset($this->language_data['STYLES']['NUMBERS'][$i])) { + $this->language_data['NUMBERS_CACHE'][$i] = 1 << $i; + } else { + if(!isset($this->language_data['NUMBERS_CACHE'][0])) { + $this->language_data['NUMBERS_CACHE'][0] = 0; + } + $this->language_data['NUMBERS_CACHE'][0] |= 1 << $i; + } + } + } + } + } + } + + /** + * Setup caches needed for parsing. This is automatically called in parse_code() when appropriate. + * This function makes stylesheet generators much faster as they do not need these caches. + * + * @since 1.0.8 + * @access private + */ + function build_parse_cache() { + // cache symbol regexp + //As this is a costy operation, we avoid doing it for multiple groups ... + //Instead we perform it for all symbols at once. + // + //For this to work, we need to reorganize the data arrays. + if ($this->lexic_permissions['SYMBOLS'] && !empty($this->language_data['SYMBOLS'])) { + $this->language_data['MULTIPLE_SYMBOL_GROUPS'] = count($this->language_data['STYLES']['SYMBOLS']) > 1; + + $this->language_data['SYMBOL_DATA'] = array(); + $symbol_preg_multi = array(); // multi char symbols + $symbol_preg_single = array(); // single char symbols + foreach ($this->language_data['SYMBOLS'] as $key => $symbols) { + if (is_array($symbols)) { + foreach ($symbols as $sym) { + $sym = $this->hsc($sym); + if (!isset($this->language_data['SYMBOL_DATA'][$sym])) { + $this->language_data['SYMBOL_DATA'][$sym] = $key; + if (isset($sym[1])) { // multiple chars + $symbol_preg_multi[] = preg_quote($sym, '/'); + } else { // single char + if ($sym == '-') { + // don't trigger range out of order error + $symbol_preg_single[] = '\-'; + } else { + $symbol_preg_single[] = preg_quote($sym, '/'); + } + } + } + } + } else { + $symbols = $this->hsc($symbols); + if (!isset($this->language_data['SYMBOL_DATA'][$symbols])) { + $this->language_data['SYMBOL_DATA'][$symbols] = 0; + if (isset($symbols[1])) { // multiple chars + $symbol_preg_multi[] = preg_quote($symbols, '/'); + } else if ($symbols == '-') { + // don't trigger range out of order error + $symbol_preg_single[] = '\-'; + } else { // single char + $symbol_preg_single[] = preg_quote($symbols, '/'); + } + } + } + } + + //Now we have an array with each possible symbol as the key and the style as the actual data. + //This way we can set the correct style just the moment we highlight ... + // + //Now we need to rewrite our array to get a search string that + $symbol_preg = array(); + if (!empty($symbol_preg_multi)) { + rsort($symbol_preg_multi); + $symbol_preg[] = implode('|', $symbol_preg_multi); + } + if (!empty($symbol_preg_single)) { + rsort($symbol_preg_single); + $symbol_preg[] = '[' . implode('', $symbol_preg_single) . ']'; + } + $this->language_data['SYMBOL_SEARCH'] = implode("|", $symbol_preg); + } + + // cache optimized regexp for keyword matching + // remove old cache + $this->language_data['CACHED_KEYWORD_LISTS'] = array(); + foreach (array_keys($this->language_data['KEYWORDS']) as $key) { + if (!isset($this->lexic_permissions['KEYWORDS'][$key]) || + $this->lexic_permissions['KEYWORDS'][$key]) { + $this->optimize_keyword_group($key); + } + } + + // brackets + if ($this->lexic_permissions['BRACKETS']) { + $this->language_data['CACHE_BRACKET_MATCH'] = array('[', ']', '(', ')', '{', '}'); + if (!$this->use_classes && isset($this->language_data['STYLES']['BRACKETS'][0])) { + $this->language_data['CACHE_BRACKET_REPLACE'] = array( + '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">[|>', + '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">]|>', + '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">(|>', + '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">)|>', + '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">{|>', + '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">}|>', + ); + } + else { + $this->language_data['CACHE_BRACKET_REPLACE'] = array( + '<| class="br0">[|>', + '<| class="br0">]|>', + '<| class="br0">(|>', + '<| class="br0">)|>', + '<| class="br0">{|>', + '<| class="br0">}|>', + ); + } + } + + //Build the parse cache needed to highlight numbers appropriate + if($this->lexic_permissions['NUMBERS']) { + //Check if the style rearrangements have been processed ... + //This also does some preprocessing to check which style groups are useable ... + if(!isset($this->language_data['NUMBERS_CACHE'])) { + $this->build_style_cache(); + } + + //Number format specification + //All this formats are matched case-insensitively! + static $numbers_format = array( + GESHI_NUMBER_INT_BASIC => + '(?:(? + '(? + '(? + '(? + '(? + '(? + '(? + '(? + '(? + '(? + '(? + '(? + '(? + '(? + '(? + '(?language_data['NUMBERS_RXCACHE'] = array(); + foreach($this->language_data['NUMBERS_CACHE'] as $key => $rxdata) { + if(is_string($rxdata)) { + $regexp = $rxdata; + } else { + //This is a bitfield of number flags to highlight: + //Build an array, implode them together and make this the actual RX + $rxuse = array(); + for($i = 1; $i <= $rxdata; $i<<=1) { + if($rxdata & $i) { + $rxuse[] = $numbers_format[$i]; + } + } + $regexp = implode("|", $rxuse); + } + + $this->language_data['NUMBERS_RXCACHE'][$key] = + "/(?)($regexp)(?!(?:|(?>[^\<]))+>)(?![^<]*>)(?!\|>)(?!\/>)/i"; // + } + + if(!isset($this->language_data['PARSER_CONTROL']['NUMBERS']['PRECHECK_RX'])) { + $this->language_data['PARSER_CONTROL']['NUMBERS']['PRECHECK_RX'] = '#\d#'; + } + } + + $this->parse_cache_built = true; + } + + /** + * Returns the code in $this->source, highlighted and surrounded by the + * nessecary HTML. + * + * This should only be called ONCE, cos it's SLOW! If you want to highlight + * the same source multiple times, you're better off doing a whole lot of + * str_replaces to replace the <span>s + * + * @since 1.0.0 + */ + function parse_code () { + // Start the timer + $start_time = microtime(); + + // Replace all newlines to a common form. + $code = str_replace("\r\n", "\n", $this->source); + $code = str_replace("\r", "\n", $code); + + // Firstly, if there is an error, we won't highlight + if ($this->error) { + //Escape the source for output + $result = $this->hsc($this->source); + + //This fix is related to SF#1923020, but has to be applied regardless of + //actually highlighting symbols. + $result = str_replace(array('', ''), array(';', '|'), $result); + + // Timing is irrelevant + $this->set_time($start_time, $start_time); + $this->finalise($result); + return $result; + } + + // make sure the parse cache is up2date + if (!$this->parse_cache_built) { + $this->build_parse_cache(); + } + + // Initialise various stuff + $length = strlen($code); + $COMMENT_MATCHED = false; + $stuff_to_parse = ''; + $endresult = ''; + + // "Important" selections are handled like multiline comments + // @todo GET RID OF THIS SHIZ + if ($this->enable_important_blocks) { + $this->language_data['COMMENT_MULTI'][GESHI_START_IMPORTANT] = GESHI_END_IMPORTANT; + } + + if ($this->strict_mode) { + // Break the source into bits. Each bit will be a portion of the code + // within script delimiters - for example, HTML between < and > + $k = 0; + $parts = array(); + $matches = array(); + $next_match_pointer = null; + // we use a copy to unset delimiters on demand (when they are not found) + $delim_copy = $this->language_data['SCRIPT_DELIMITERS']; + $i = 0; + while ($i < $length) { + $next_match_pos = $length + 1; // never true + foreach ($delim_copy as $dk => $delimiters) { + if(is_array($delimiters)) { + foreach ($delimiters as $open => $close) { + // make sure the cache is setup properly + if (!isset($matches[$dk][$open])) { + $matches[$dk][$open] = array( + 'next_match' => -1, + 'dk' => $dk, + + 'open' => $open, // needed for grouping of adjacent code blocks (see below) + 'open_strlen' => strlen($open), + + 'close' => $close, + 'close_strlen' => strlen($close), + ); + } + // Get the next little bit for this opening string + if ($matches[$dk][$open]['next_match'] < $i) { + // only find the next pos if it was not already cached + $open_pos = strpos($code, $open, $i); + if ($open_pos === false) { + // no match for this delimiter ever + unset($delim_copy[$dk][$open]); + continue; + } + $matches[$dk][$open]['next_match'] = $open_pos; + } + if ($matches[$dk][$open]['next_match'] < $next_match_pos) { + //So we got a new match, update the close_pos + $matches[$dk][$open]['close_pos'] = + strpos($code, $close, $matches[$dk][$open]['next_match']+1); + + $next_match_pointer =& $matches[$dk][$open]; + $next_match_pos = $matches[$dk][$open]['next_match']; + } + } + } else { + //So we should match an RegExp as Strict Block ... + /** + * The value in $delimiters is expected to be an RegExp + * containing exactly 2 matching groups: + * - Group 1 is the opener + * - Group 2 is the closer + */ + if(!GESHI_PHP_PRE_433 && //Needs proper rewrite to work with PHP >=4.3.0; 4.3.3 is guaranteed to work. + preg_match($delimiters, $code, $matches_rx, PREG_OFFSET_CAPTURE, $i)) { + //We got a match ... + if(isset($matches_rx['start']) && isset($matches_rx['end'])) + { + $matches[$dk] = array( + 'next_match' => $matches_rx['start'][1], + 'dk' => $dk, + + 'close_strlen' => strlen($matches_rx['end'][0]), + 'close_pos' => $matches_rx['end'][1], + ); + } else { + $matches[$dk] = array( + 'next_match' => $matches_rx[1][1], + 'dk' => $dk, + + 'close_strlen' => strlen($matches_rx[2][0]), + 'close_pos' => $matches_rx[2][1], + ); + } + } else { + // no match for this delimiter ever + unset($delim_copy[$dk]); + continue; + } + + if ($matches[$dk]['next_match'] <= $next_match_pos) { + $next_match_pointer =& $matches[$dk]; + $next_match_pos = $matches[$dk]['next_match']; + } + } + } + + // non-highlightable text + $parts[$k] = array( + 1 => substr($code, $i, $next_match_pos - $i) + ); + ++$k; + + if ($next_match_pos > $length) { + // out of bounds means no next match was found + break; + } + + // highlightable code + $parts[$k][0] = $next_match_pointer['dk']; + + //Only combine for non-rx script blocks + if(is_array($delim_copy[$next_match_pointer['dk']])) { + // group adjacent script blocks, e.g. should be one block, not three! + $i = $next_match_pos + $next_match_pointer['open_strlen']; + while (true) { + $close_pos = strpos($code, $next_match_pointer['close'], $i); + if ($close_pos == false) { + break; + } + $i = $close_pos + $next_match_pointer['close_strlen']; + if ($i == $length) { + break; + } + if ($code[$i] == $next_match_pointer['open'][0] && ($next_match_pointer['open_strlen'] == 1 || + substr($code, $i, $next_match_pointer['open_strlen']) == $next_match_pointer['open'])) { + // merge adjacent but make sure we don't merge things like + foreach ($matches as $submatches) { + foreach ($submatches as $match) { + if ($match['next_match'] == $i) { + // a different block already matches here! + break 3; + } + } + } + } else { + break; + } + } + } else { + $close_pos = $next_match_pointer['close_pos'] + $next_match_pointer['close_strlen']; + $i = $close_pos; + } + + if ($close_pos === false) { + // no closing delimiter found! + $parts[$k][1] = substr($code, $next_match_pos); + ++$k; + break; + } else { + $parts[$k][1] = substr($code, $next_match_pos, $i - $next_match_pos); + ++$k; + } + } + unset($delim_copy, $next_match_pointer, $next_match_pos, $matches); + $num_parts = $k; + + if ($num_parts == 1 && $this->strict_mode == GESHI_MAYBE) { + // when we have only one part, we don't have anything to highlight at all. + // if we have a "maybe" strict language, this should be handled as highlightable code + $parts = array( + 0 => array( + 0 => '', + 1 => '' + ), + 1 => array( + 0 => null, + 1 => $parts[0][1] + ) + ); + $num_parts = 2; + } + + } else { + // Not strict mode - simply dump the source into + // the array at index 1 (the first highlightable block) + $parts = array( + 0 => array( + 0 => '', + 1 => '' + ), + 1 => array( + 0 => null, + 1 => $code + ) + ); + $num_parts = 2; + } + + //Unset variables we won't need any longer + unset($code); + + //Preload some repeatedly used values regarding hardquotes ... + $hq = isset($this->language_data['HARDQUOTE']) ? $this->language_data['HARDQUOTE'][0] : false; + $hq_strlen = strlen($hq); + + //Preload if line numbers are to be generated afterwards + //Added a check if line breaks should be forced even without line numbers, fixes SF#1727398 + $check_linenumbers = $this->line_numbers != GESHI_NO_LINE_NUMBERS || + !empty($this->highlight_extra_lines) || !$this->allow_multiline_span; + + //preload the escape char for faster checking ... + $escaped_escape_char = $this->hsc($this->language_data['ESCAPE_CHAR']); + + // this is used for single-line comments + $sc_disallowed_before = ""; + $sc_disallowed_after = ""; + + if (isset($this->language_data['PARSER_CONTROL'])) { + if (isset($this->language_data['PARSER_CONTROL']['COMMENTS'])) { + if (isset($this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_BEFORE'])) { + $sc_disallowed_before = $this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_BEFORE']; + } + if (isset($this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_AFTER'])) { + $sc_disallowed_after = $this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_AFTER']; + } + } + } + + //Fix for SF#1932083: Multichar Quotemarks unsupported + $is_string_starter = array(); + if ($this->lexic_permissions['STRINGS']) { + foreach ($this->language_data['QUOTEMARKS'] as $quotemark) { + if (!isset($is_string_starter[$quotemark[0]])) { + $is_string_starter[$quotemark[0]] = (string)$quotemark; + } else if (is_string($is_string_starter[$quotemark[0]])) { + $is_string_starter[$quotemark[0]] = array( + $is_string_starter[$quotemark[0]], + $quotemark); + } else { + $is_string_starter[$quotemark[0]][] = $quotemark; + } + } + } + + // Now we go through each part. We know that even-indexed parts are + // code that shouldn't be highlighted, and odd-indexed parts should + // be highlighted + for ($key = 0; $key < $num_parts; ++$key) { + $STRICTATTRS = ''; + + // If this block should be highlighted... + if (!($key & 1)) { + // Else not a block to highlight + $endresult .= $this->hsc($parts[$key][1]); + unset($parts[$key]); + continue; + } + + $result = ''; + $part = $parts[$key][1]; + + $highlight_part = true; + if ($this->strict_mode && !is_null($parts[$key][0])) { + // get the class key for this block of code + $script_key = $parts[$key][0]; + $highlight_part = $this->language_data['HIGHLIGHT_STRICT_BLOCK'][$script_key]; + if ($this->language_data['STYLES']['SCRIPT'][$script_key] != '' && + $this->lexic_permissions['SCRIPT']) { + // Add a span element around the source to + // highlight the overall source block + if (!$this->use_classes && + $this->language_data['STYLES']['SCRIPT'][$script_key] != '') { + $attributes = ' style="' . $this->language_data['STYLES']['SCRIPT'][$script_key] . '"'; + } else { + $attributes = ' class="sc' . $script_key . '"'; + } + $result .= ""; + $STRICTATTRS = $attributes; + } + } + + if ($highlight_part) { + // Now, highlight the code in this block. This code + // is really the engine of GeSHi (along with the method + // parse_non_string_part). + + // cache comment regexps incrementally + $next_comment_regexp_key = ''; + $next_comment_regexp_pos = -1; + $next_comment_multi_pos = -1; + $next_comment_single_pos = -1; + $comment_regexp_cache_per_key = array(); + $comment_multi_cache_per_key = array(); + $comment_single_cache_per_key = array(); + $next_open_comment_multi = ''; + $next_comment_single_key = ''; + $escape_regexp_cache_per_key = array(); + $next_escape_regexp_key = ''; + $next_escape_regexp_pos = -1; + + $length = strlen($part); + for ($i = 0; $i < $length; ++$i) { + // Get the next char + $char = $part[$i]; + $char_len = 1; + + // update regexp comment cache if needed + if (isset($this->language_data['COMMENT_REGEXP']) && $next_comment_regexp_pos < $i) { + $next_comment_regexp_pos = $length; + foreach ($this->language_data['COMMENT_REGEXP'] as $comment_key => $regexp) { + $match_i = false; + if (isset($comment_regexp_cache_per_key[$comment_key]) && + ($comment_regexp_cache_per_key[$comment_key]['pos'] >= $i || + $comment_regexp_cache_per_key[$comment_key]['pos'] === false)) { + // we have already matched something + if ($comment_regexp_cache_per_key[$comment_key]['pos'] === false) { + // this comment is never matched + continue; + } + $match_i = $comment_regexp_cache_per_key[$comment_key]['pos']; + } else if ( + //This is to allow use of the offset parameter in preg_match and stay as compatible with older PHP versions as possible + (GESHI_PHP_PRE_433 && preg_match($regexp, substr($part, $i), $match, PREG_OFFSET_CAPTURE)) || + (!GESHI_PHP_PRE_433 && preg_match($regexp, $part, $match, PREG_OFFSET_CAPTURE, $i)) + ) { + $match_i = $match[0][1]; + if (GESHI_PHP_PRE_433) { + $match_i += $i; + } + + $comment_regexp_cache_per_key[$comment_key] = array( + 'key' => $comment_key, + 'length' => strlen($match[0][0]), + 'pos' => $match_i + ); + } else { + $comment_regexp_cache_per_key[$comment_key]['pos'] = false; + continue; + } + + if ($match_i !== false && $match_i < $next_comment_regexp_pos) { + $next_comment_regexp_pos = $match_i; + $next_comment_regexp_key = $comment_key; + if ($match_i === $i) { + break; + } + } + } + } + + $string_started = false; + + if (isset($is_string_starter[$char])) { + // Possibly the start of a new string ... + + //Check which starter it was ... + //Fix for SF#1932083: Multichar Quotemarks unsupported + if (is_array($is_string_starter[$char])) { + $char_new = ''; + foreach ($is_string_starter[$char] as $testchar) { + if ($testchar === substr($part, $i, strlen($testchar)) && + strlen($testchar) > strlen($char_new)) { + $char_new = $testchar; + $string_started = true; + } + } + if ($string_started) { + $char = $char_new; + } + } else { + $testchar = $is_string_starter[$char]; + if ($testchar === substr($part, $i, strlen($testchar))) { + $char = $testchar; + $string_started = true; + } + } + $char_len = strlen($char); + } + + if ($string_started && ($i != $next_comment_regexp_pos)) { + // Hand out the correct style information for this string + $string_key = array_search($char, $this->language_data['QUOTEMARKS']); + if (!isset($this->language_data['STYLES']['STRINGS'][$string_key]) || + !isset($this->language_data['STYLES']['ESCAPE_CHAR'][$string_key])) { + $string_key = 0; + } + + // parse the stuff before this + $result .= $this->parse_non_string_part($stuff_to_parse); + $stuff_to_parse = ''; + + if (!$this->use_classes) { + $string_attributes = ' style="' . $this->language_data['STYLES']['STRINGS'][$string_key] . '"'; + } else { + $string_attributes = ' class="st'.$string_key.'"'; + } + + // now handle the string + $string = "" . GeSHi::hsc($char); + $start = $i + $char_len; + $string_open = true; + + if(empty($this->language_data['ESCAPE_REGEXP'])) { + $next_escape_regexp_pos = $length; + } + + do { + //Get the regular ending pos ... + $close_pos = strpos($part, $char, $start); + if(false === $close_pos) { + $close_pos = $length; + } + + if($this->lexic_permissions['ESCAPE_CHAR']) { + // update escape regexp cache if needed + if (isset($this->language_data['ESCAPE_REGEXP']) && $next_escape_regexp_pos < $start) { + $next_escape_regexp_pos = $length; + foreach ($this->language_data['ESCAPE_REGEXP'] as $escape_key => $regexp) { + $match_i = false; + if (isset($escape_regexp_cache_per_key[$escape_key]) && + ($escape_regexp_cache_per_key[$escape_key]['pos'] >= $start || + $escape_regexp_cache_per_key[$escape_key]['pos'] === false)) { + // we have already matched something + if ($escape_regexp_cache_per_key[$escape_key]['pos'] === false) { + // this comment is never matched + continue; + } + $match_i = $escape_regexp_cache_per_key[$escape_key]['pos']; + } else if ( + //This is to allow use of the offset parameter in preg_match and stay as compatible with older PHP versions as possible + (GESHI_PHP_PRE_433 && preg_match($regexp, substr($part, $start), $match, PREG_OFFSET_CAPTURE)) || + (!GESHI_PHP_PRE_433 && preg_match($regexp, $part, $match, PREG_OFFSET_CAPTURE, $start)) + ) { + $match_i = $match[0][1]; + if (GESHI_PHP_PRE_433) { + $match_i += $start; + } + + $escape_regexp_cache_per_key[$escape_key] = array( + 'key' => $escape_key, + 'length' => strlen($match[0][0]), + 'pos' => $match_i + ); + } else { + $escape_regexp_cache_per_key[$escape_key]['pos'] = false; + continue; + } + + if ($match_i !== false && $match_i < $next_escape_regexp_pos) { + $next_escape_regexp_pos = $match_i; + $next_escape_regexp_key = $escape_key; + if ($match_i === $start) { + break; + } + } + } + } + + //Find the next simple escape position + if('' != $this->language_data['ESCAPE_CHAR']) { + $simple_escape = strpos($part, $this->language_data['ESCAPE_CHAR'], $start); + if(false === $simple_escape) { + $simple_escape = $length; + } + } else { + $simple_escape = $length; + } + } else { + $next_escape_regexp_pos = $length; + $simple_escape = $length; + } + + if($simple_escape < $next_escape_regexp_pos && + $simple_escape < $length && + $simple_escape < $close_pos) { + //The nexxt escape sequence is a simple one ... + $es_pos = $simple_escape; + + //Add the stuff not in the string yet ... + $string .= $this->hsc(substr($part, $start, $es_pos - $start)); + + //Get the style for this escaped char ... + if (!$this->use_classes) { + $escape_char_attributes = ' style="' . $this->language_data['STYLES']['ESCAPE_CHAR'][0] . '"'; + } else { + $escape_char_attributes = ' class="es0"'; + } + + //Add the style for the escape char ... + $string .= "" . + GeSHi::hsc($this->language_data['ESCAPE_CHAR']); + + //Get the byte AFTER the ESCAPE_CHAR we just found + $es_char = $part[$es_pos + 1]; + if ($es_char == "\n") { + // don't put a newline around newlines + $string .= "
        \n"; + $start = $es_pos + 2; + } else if (ord($es_char) >= 128) { + //This is an non-ASCII char (UTF8 or single byte) + //This code tries to work around SF#2037598 ... + if(function_exists('mb_substr')) { + $es_char_m = mb_substr(substr($part, $es_pos+1, 16), 0, 1, $this->encoding); + $string .= $es_char_m . '
        '; + } else if (!GESHI_PHP_PRE_433 && 'utf-8' == $this->encoding) { + if(preg_match("/[\xC2-\xDF][\x80-\xBF]". + "|\xE0[\xA0-\xBF][\x80-\xBF]". + "|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}". + "|\xED[\x80-\x9F][\x80-\xBF]". + "|\xF0[\x90-\xBF][\x80-\xBF]{2}". + "|[\xF1-\xF3][\x80-\xBF]{3}". + "|\xF4[\x80-\x8F][\x80-\xBF]{2}/s", + $part, $es_char_m, null, $es_pos + 1)) { + $es_char_m = $es_char_m[0]; + } else { + $es_char_m = $es_char; + } + $string .= $this->hsc($es_char_m) . '
        '; + } else { + $es_char_m = $this->hsc($es_char); + } + $start = $es_pos + strlen($es_char_m) + 1; + } else { + $string .= $this->hsc($es_char) . '
        '; + $start = $es_pos + 2; + } + } else if ($next_escape_regexp_pos < $length && + $next_escape_regexp_pos < $close_pos) { + $es_pos = $next_escape_regexp_pos; + //Add the stuff not in the string yet ... + $string .= $this->hsc(substr($part, $start, $es_pos - $start)); + + //Get the key and length of this match ... + $escape = $escape_regexp_cache_per_key[$next_escape_regexp_key]; + $escape_str = substr($part, $es_pos, $escape['length']); + $escape_key = $escape['key']; + + //Get the style for this escaped char ... + if (!$this->use_classes) { + $escape_char_attributes = ' style="' . $this->language_data['STYLES']['ESCAPE_CHAR'][$escape_key] . '"'; + } else { + $escape_char_attributes = ' class="es' . $escape_key . '"'; + } + + //Add the style for the escape char ... + $string .= "" . + $this->hsc($escape_str) . ''; + + $start = $es_pos + $escape['length']; + } else { + //Copy the remainder of the string ... + $string .= $this->hsc(substr($part, $start, $close_pos - $start + $char_len)) . ''; + $start = $close_pos + $char_len; + $string_open = false; + } + } while($string_open); + + if ($check_linenumbers) { + // Are line numbers used? If, we should end the string before + // the newline and begin it again (so when
      2. s are put in the source + // remains XHTML compliant) + // note to self: This opens up possibility of config files specifying + // that languages can/cannot have multiline strings??? + $string = str_replace("\n", "\n", $string); + } + + $result .= $string; + $string = ''; + $i = $start - 1; + continue; + } else if ($this->lexic_permissions['STRINGS'] && $hq && $hq[0] == $char && + substr($part, $i, $hq_strlen) == $hq && ($i != $next_comment_regexp_pos)) { + // The start of a hard quoted string + if (!$this->use_classes) { + $string_attributes = ' style="' . $this->language_data['STYLES']['STRINGS']['HARD'] . '"'; + $escape_char_attributes = ' style="' . $this->language_data['STYLES']['ESCAPE_CHAR']['HARD'] . '"'; + } else { + $string_attributes = ' class="st_h"'; + $escape_char_attributes = ' class="es_h"'; + } + // parse the stuff before this + $result .= $this->parse_non_string_part($stuff_to_parse); + $stuff_to_parse = ''; + + // now handle the string + $string = ''; + + // look for closing quote + $start = $i + $hq_strlen; + while ($close_pos = strpos($part, $this->language_data['HARDQUOTE'][1], $start)) { + $start = $close_pos + 1; + if ($this->lexic_permissions['ESCAPE_CHAR'] && $part[$close_pos - 1] == $this->language_data['HARDCHAR'] && + (($i + $hq_strlen) != ($close_pos))) { //Support empty string for HQ escapes if Starter = Escape + // make sure this quote is not escaped + foreach ($this->language_data['HARDESCAPE'] as $hardescape) { + if (substr($part, $close_pos - 1, strlen($hardescape)) == $hardescape) { + // check wether this quote is escaped or if it is something like '\\' + $escape_char_pos = $close_pos - 1; + while ($escape_char_pos > 0 + && $part[$escape_char_pos - 1] == $this->language_data['HARDCHAR']) { + --$escape_char_pos; + } + if (($close_pos - $escape_char_pos) & 1) { + // uneven number of escape chars => this quote is escaped + continue 2; + } + } + } + } + + // found closing quote + break; + } + + //Found the closing delimiter? + if (!$close_pos) { + // span till the end of this $part when no closing delimiter is found + $close_pos = $length; + } + + //Get the actual string + $string = substr($part, $i, $close_pos - $i + 1); + $i = $close_pos; + + // handle escape chars and encode html chars + // (special because when we have escape chars within our string they may not be escaped) + if ($this->lexic_permissions['ESCAPE_CHAR'] && $this->language_data['ESCAPE_CHAR']) { + $start = 0; + $new_string = ''; + while ($es_pos = strpos($string, $this->language_data['ESCAPE_CHAR'], $start)) { + // hmtl escape stuff before + $new_string .= $this->hsc(substr($string, $start, $es_pos - $start)); + // check if this is a hard escape + foreach ($this->language_data['HARDESCAPE'] as $hardescape) { + if (substr($string, $es_pos, strlen($hardescape)) == $hardescape) { + // indeed, this is a hardescape + $new_string .= "" . + $this->hsc($hardescape) . ''; + $start = $es_pos + strlen($hardescape); + continue 2; + } + } + // not a hard escape, but a normal escape + // they come in pairs of two + $c = 0; + while (isset($string[$es_pos + $c]) && isset($string[$es_pos + $c + 1]) + && $string[$es_pos + $c] == $this->language_data['ESCAPE_CHAR'] + && $string[$es_pos + $c + 1] == $this->language_data['ESCAPE_CHAR']) { + $c += 2; + } + if ($c) { + $new_string .= "" . + str_repeat($escaped_escape_char, $c) . + ''; + $start = $es_pos + $c; + } else { + // this is just a single lonely escape char... + $new_string .= $escaped_escape_char; + $start = $es_pos + 1; + } + } + $string = $new_string . $this->hsc(substr($string, $start)); + } else { + $string = $this->hsc($string); + } + + if ($check_linenumbers) { + // Are line numbers used? If, we should end the string before + // the newline and begin it again (so when
      3. s are put in the source + // remains XHTML compliant) + // note to self: This opens up possibility of config files specifying + // that languages can/cannot have multiline strings??? + $string = str_replace("\n", "\n", $string); + } + + $result .= "" . $string . ''; + $string = ''; + continue; + } else { + //Have a look for regexp comments + if ($i == $next_comment_regexp_pos) { + $COMMENT_MATCHED = true; + $comment = $comment_regexp_cache_per_key[$next_comment_regexp_key]; + $test_str = $this->hsc(substr($part, $i, $comment['length'])); + + //@todo If remove important do remove here + if ($this->lexic_permissions['COMMENTS']['MULTI']) { + if (!$this->use_classes) { + $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS'][$comment['key']] . '"'; + } else { + $attributes = ' class="co' . $comment['key'] . '"'; + } + + $test_str = "" . $test_str . ""; + + // Short-cut through all the multiline code + if ($check_linenumbers) { + // strreplace to put close span and open span around multiline newlines + $test_str = str_replace( + "\n", "\n", + str_replace("\n ", "\n ", $test_str) + ); + } + } + + $i += $comment['length'] - 1; + + // parse the rest + $result .= $this->parse_non_string_part($stuff_to_parse); + $stuff_to_parse = ''; + } + + // If we haven't matched a regexp comment, try multi-line comments + if (!$COMMENT_MATCHED) { + // Is this a multiline comment? + if (!empty($this->language_data['COMMENT_MULTI']) && $next_comment_multi_pos < $i) { + $next_comment_multi_pos = $length; + foreach ($this->language_data['COMMENT_MULTI'] as $open => $close) { + $match_i = false; + if (isset($comment_multi_cache_per_key[$open]) && + ($comment_multi_cache_per_key[$open] >= $i || + $comment_multi_cache_per_key[$open] === false)) { + // we have already matched something + if ($comment_multi_cache_per_key[$open] === false) { + // this comment is never matched + continue; + } + $match_i = $comment_multi_cache_per_key[$open]; + } else if (($match_i = stripos($part, $open, $i)) !== false) { + $comment_multi_cache_per_key[$open] = $match_i; + } else { + $comment_multi_cache_per_key[$open] = false; + continue; + } + if ($match_i !== false && $match_i < $next_comment_multi_pos) { + $next_comment_multi_pos = $match_i; + $next_open_comment_multi = $open; + if ($match_i === $i) { + break; + } + } + } + } + if ($i == $next_comment_multi_pos) { + $open = $next_open_comment_multi; + $close = $this->language_data['COMMENT_MULTI'][$open]; + $open_strlen = strlen($open); + $close_strlen = strlen($close); + $COMMENT_MATCHED = true; + $test_str_match = $open; + //@todo If remove important do remove here + if ($this->lexic_permissions['COMMENTS']['MULTI'] || + $open == GESHI_START_IMPORTANT) { + if ($open != GESHI_START_IMPORTANT) { + if (!$this->use_classes) { + $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS']['MULTI'] . '"'; + } else { + $attributes = ' class="coMULTI"'; + } + $test_str = "" . $this->hsc($open); + } else { + if (!$this->use_classes) { + $attributes = ' style="' . $this->important_styles . '"'; + } else { + $attributes = ' class="imp"'; + } + + // We don't include the start of the comment if it's an + // "important" part + $test_str = ""; + } + } else { + $test_str = $this->hsc($open); + } + + $close_pos = strpos( $part, $close, $i + $open_strlen ); + + if ($close_pos === false) { + $close_pos = $length; + } + + // Short-cut through all the multiline code + $rest_of_comment = $this->hsc(substr($part, $i + $open_strlen, $close_pos - $i - $open_strlen + $close_strlen)); + if (($this->lexic_permissions['COMMENTS']['MULTI'] || + $test_str_match == GESHI_START_IMPORTANT) && + $check_linenumbers) { + + // strreplace to put close span and open span around multiline newlines + $test_str .= str_replace( + "\n", "\n", + str_replace("\n ", "\n ", $rest_of_comment) + ); + } else { + $test_str .= $rest_of_comment; + } + + if ($this->lexic_permissions['COMMENTS']['MULTI'] || + $test_str_match == GESHI_START_IMPORTANT) { + $test_str .= ''; + } + + $i = $close_pos + $close_strlen - 1; + + // parse the rest + $result .= $this->parse_non_string_part($stuff_to_parse); + $stuff_to_parse = ''; + } + } + + // If we haven't matched a multiline comment, try single-line comments + if (!$COMMENT_MATCHED) { + // cache potential single line comment occurances + if (!empty($this->language_data['COMMENT_SINGLE']) && $next_comment_single_pos < $i) { + $next_comment_single_pos = $length; + foreach ($this->language_data['COMMENT_SINGLE'] as $comment_key => $comment_mark) { + $match_i = false; + if (isset($comment_single_cache_per_key[$comment_key]) && + ($comment_single_cache_per_key[$comment_key] >= $i || + $comment_single_cache_per_key[$comment_key] === false)) { + // we have already matched something + if ($comment_single_cache_per_key[$comment_key] === false) { + // this comment is never matched + continue; + } + $match_i = $comment_single_cache_per_key[$comment_key]; + } else if ( + // case sensitive comments + ($this->language_data['CASE_SENSITIVE'][GESHI_COMMENTS] && + ($match_i = stripos($part, $comment_mark, $i)) !== false) || + // non case sensitive + (!$this->language_data['CASE_SENSITIVE'][GESHI_COMMENTS] && + (($match_i = strpos($part, $comment_mark, $i)) !== false))) { + $comment_single_cache_per_key[$comment_key] = $match_i; + } else { + $comment_single_cache_per_key[$comment_key] = false; + continue; + } + if ($match_i !== false && $match_i < $next_comment_single_pos) { + $next_comment_single_pos = $match_i; + $next_comment_single_key = $comment_key; + if ($match_i === $i) { + break; + } + } + } + } + if ($next_comment_single_pos == $i) { + $comment_key = $next_comment_single_key; + $comment_mark = $this->language_data['COMMENT_SINGLE'][$comment_key]; + $com_len = strlen($comment_mark); + + // This check will find special variables like $# in bash + // or compiler directives of Delphi beginning {$ + if ((empty($sc_disallowed_before) || ($i == 0) || + (false === strpos($sc_disallowed_before, $part[$i-1]))) && + (empty($sc_disallowed_after) || ($length <= $i + $com_len) || + (false === strpos($sc_disallowed_after, $part[$i + $com_len])))) + { + // this is a valid comment + $COMMENT_MATCHED = true; + if ($this->lexic_permissions['COMMENTS'][$comment_key]) { + if (!$this->use_classes) { + $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS'][$comment_key] . '"'; + } else { + $attributes = ' class="co' . $comment_key . '"'; + } + $test_str = "" . $this->hsc($this->change_case($comment_mark)); + } else { + $test_str = $this->hsc($comment_mark); + } + + //Check if this comment is the last in the source + $close_pos = strpos($part, "\n", $i); + $oops = false; + if ($close_pos === false) { + $close_pos = $length; + $oops = true; + } + $test_str .= $this->hsc(substr($part, $i + $com_len, $close_pos - $i - $com_len)); + if ($this->lexic_permissions['COMMENTS'][$comment_key]) { + $test_str .= ""; + } + + // Take into account that the comment might be the last in the source + if (!$oops) { + $test_str .= "\n"; + } + + $i = $close_pos; + + // parse the rest + $result .= $this->parse_non_string_part($stuff_to_parse); + $stuff_to_parse = ''; + } + } + } + } + + // Where are we adding this char? + if (!$COMMENT_MATCHED) { + $stuff_to_parse .= $char; + } else { + $result .= $test_str; + unset($test_str); + $COMMENT_MATCHED = false; + } + } + // Parse the last bit + $result .= $this->parse_non_string_part($stuff_to_parse); + $stuff_to_parse = ''; + } else { + $result .= $this->hsc($part); + } + // Close the that surrounds the block + if ($STRICTATTRS != '') { + $result = str_replace("\n", "\n", $result); + $result .= ''; + } + + $endresult .= $result; + unset($part, $parts[$key], $result); + } + + //This fix is related to SF#1923020, but has to be applied regardless of + //actually highlighting symbols. + /** NOTE: memorypeak #3 */ + $endresult = str_replace(array('', ''), array(';', '|'), $endresult); + +// // Parse the last stuff (redundant?) +// $result .= $this->parse_non_string_part($stuff_to_parse); + + // Lop off the very first and last spaces +// $result = substr($result, 1, -1); + + // We're finished: stop timing + $this->set_time($start_time, microtime()); + + $this->finalise($endresult); + return $endresult; + } + + /** + * Swaps out spaces and tabs for HTML indentation. Not needed if + * the code is in a pre block... + * + * @param string The source to indent (reference!) + * @since 1.0.0 + * @access private + */ + function indent(&$result) { + /// Replace tabs with the correct number of spaces + if (false !== strpos($result, "\t")) { + $lines = explode("\n", $result); + $result = null;//Save memory while we process the lines individually + $tab_width = $this->get_real_tab_width(); + $tab_string = ' ' . str_repeat(' ', $tab_width); + + for ($key = 0, $n = count($lines); $key < $n; $key++) { + $line = $lines[$key]; + if (false === strpos($line, "\t")) { + continue; + } + + $pos = 0; + $length = strlen($line); + $lines[$key] = ''; // reduce memory + + $IN_TAG = false; + for ($i = 0; $i < $length; ++$i) { + $char = $line[$i]; + // Simple engine to work out whether we're in a tag. + // If we are we modify $pos. This is so we ignore HTML + // in the line and only workout the tab replacement + // via the actual content of the string + // This test could be improved to include strings in the + // html so that < or > would be allowed in user's styles + // (e.g. quotes: '<' '>'; or similar) + if ($IN_TAG) { + if ('>' == $char) { + $IN_TAG = false; + } + $lines[$key] .= $char; + } else if ('<' == $char) { + $IN_TAG = true; + $lines[$key] .= '<'; + } else if ('&' == $char) { + $substr = substr($line, $i + 3, 5); + $posi = strpos($substr, ';'); + if (false === $posi) { + ++$pos; + } else { + $pos -= $posi+2; + } + $lines[$key] .= $char; + } else if ("\t" == $char) { + $str = ''; + // OPTIMISE - move $strs out. Make an array: + // $tabs = array( + // 1 => ' ', + // 2 => '  ', + // 3 => '   ' etc etc + // to use instead of building a string every time + $tab_end_width = $tab_width - ($pos % $tab_width); //Moved out of the look as it doesn't change within the loop + if (($pos & 1) || 1 == $tab_end_width) { + $str .= substr($tab_string, 6, $tab_end_width); + } else { + $str .= substr($tab_string, 0, $tab_end_width+5); + } + $lines[$key] .= $str; + $pos += $tab_end_width; + + if (false === strpos($line, "\t", $i + 1)) { + $lines[$key] .= substr($line, $i + 1); + break; + } + } else if (0 == $pos && ' ' == $char) { + $lines[$key] .= ' '; + ++$pos; + } else { + $lines[$key] .= $char; + ++$pos; + } + } + } + $result = implode("\n", $lines); + unset($lines);//We don't need the lines separated beyond this --- free them! + } + // Other whitespace + // BenBE: Fix to reduce the number of replacements to be done + $result = preg_replace('/^ /m', ' ', $result); + $result = str_replace(' ', '  ', $result); + + if ($this->line_numbers == GESHI_NO_LINE_NUMBERS && $this->header_type != GESHI_HEADER_PRE_TABLE) { + if ($this->line_ending === null) { + $result = nl2br($result); + } else { + $result = str_replace("\n", $this->line_ending, $result); + } + } + } + + /** + * Changes the case of a keyword for those languages where a change is asked for + * + * @param string The keyword to change the case of + * @return string The keyword with its case changed + * @since 1.0.0 + * @access private + */ + function change_case($instr) { + switch ($this->language_data['CASE_KEYWORDS']) { + case GESHI_CAPS_UPPER: + return strtoupper($instr); + case GESHI_CAPS_LOWER: + return strtolower($instr); + default: + return $instr; + } + } + + /** + * Handles replacements of keywords to include markup and links if requested + * + * @param string The keyword to add the Markup to + * @return The HTML for the match found + * @since 1.0.8 + * @access private + * + * @todo Get rid of ender in keyword links + */ + function handle_keyword_replace($match) { + $k = $this->_kw_replace_group; + $keyword = $match[0]; + + $before = ''; + $after = ''; + + if ($this->keyword_links) { + // Keyword links have been ebabled + + if (isset($this->language_data['URLS'][$k]) && + $this->language_data['URLS'][$k] != '') { + // There is a base group for this keyword + + // Old system: strtolower + //$keyword = ( $this->language_data['CASE_SENSITIVE'][$group] ) ? $keyword : strtolower($keyword); + // New system: get keyword from language file to get correct case + if (!$this->language_data['CASE_SENSITIVE'][$k] && + strpos($this->language_data['URLS'][$k], '{FNAME}') !== false) { + foreach ($this->language_data['KEYWORDS'][$k] as $word) { + if (strcasecmp($word, $keyword) == 0) { + break; + } + } + } else { + $word = $keyword; + } + + $before = '<|UR1|"' . + str_replace( + array( + '{FNAME}', + '{FNAMEL}', + '{FNAMEU}', + '.'), + array( + str_replace('+', '%20', urlencode($this->hsc($word))), + str_replace('+', '%20', urlencode($this->hsc(strtolower($word)))), + str_replace('+', '%20', urlencode($this->hsc(strtoupper($word)))), + ''), + $this->language_data['URLS'][$k] + ) . '">'; + $after = ''; + } + } + + return $before . '<|/'. $k .'/>' . $this->change_case($keyword) . '|>' . $after; + } + + /** + * handles regular expressions highlighting-definitions with callback functions + * + * @note this is a callback, don't use it directly + * + * @param array the matches array + * @return The highlighted string + * @since 1.0.8 + * @access private + */ + function handle_regexps_callback($matches) { + // before: "' style=\"' . call_user_func(\"$func\", '\\1') . '\"\\1|>'", + return ' style="' . call_user_func($this->language_data['STYLES']['REGEXPS'][$this->_rx_key], $matches[1]) . '"'. $matches[1] . '|>'; + } + + /** + * handles newlines in REGEXPS matches. Set the _hmr_* vars before calling this + * + * @note this is a callback, don't use it directly + * + * @param array the matches array + * @return string + * @since 1.0.8 + * @access private + */ + function handle_multiline_regexps($matches) { + $before = $this->_hmr_before; + $after = $this->_hmr_after; + if ($this->_hmr_replace) { + $replace = $this->_hmr_replace; + $search = array(); + + foreach (array_keys($matches) as $k) { + $search[] = '\\' . $k; + } + + $before = str_replace($search, $matches, $before); + $after = str_replace($search, $matches, $after); + $replace = str_replace($search, $matches, $replace); + } else { + $replace = $matches[0]; + } + return $before + . '<|!REG3XP' . $this->_hmr_key .'!>' + . str_replace("\n", "|>\n<|!REG3XP" . $this->_hmr_key . '!>', $replace) + . '|>' + . $after; + } + + /** + * Takes a string that has no strings or comments in it, and highlights + * stuff like keywords, numbers and methods. + * + * @param string The string to parse for keyword, numbers etc. + * @since 1.0.0 + * @access private + * @todo BUGGY! Why? Why not build string and return? + */ + function parse_non_string_part($stuff_to_parse) { + $stuff_to_parse = ' ' . $this->hsc($stuff_to_parse); + + // Highlight keywords + $disallowed_before = "(?|^&"; + $disallowed_after = "(?![a-zA-Z0-9_\|%\\-&;"; + if ($this->lexic_permissions['STRINGS']) { + $quotemarks = preg_quote(implode($this->language_data['QUOTEMARKS']), '/'); + $disallowed_before .= $quotemarks; + $disallowed_after .= $quotemarks; + } + $disallowed_before .= "])"; + $disallowed_after .= "])"; + + $parser_control_pergroup = false; + if (isset($this->language_data['PARSER_CONTROL'])) { + if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'])) { + $x = 0; // check wether per-keyword-group parser_control is enabled + if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE'])) { + $disallowed_before = $this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE']; + ++$x; + } + if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER'])) { + $disallowed_after = $this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER']; + ++$x; + } + $parser_control_pergroup = (count($this->language_data['PARSER_CONTROL']['KEYWORDS']) - $x) > 0; + } + } + + foreach (array_keys($this->language_data['KEYWORDS']) as $k) { + if (!isset($this->lexic_permissions['KEYWORDS'][$k]) || + $this->lexic_permissions['KEYWORDS'][$k]) { + + $case_sensitive = $this->language_data['CASE_SENSITIVE'][$k]; + $modifiers = $case_sensitive ? '' : 'i'; + + // NEW in 1.0.8 - per-keyword-group parser control + $disallowed_before_local = $disallowed_before; + $disallowed_after_local = $disallowed_after; + if ($parser_control_pergroup && isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$k])) { + if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$k]['DISALLOWED_BEFORE'])) { + $disallowed_before_local = + $this->language_data['PARSER_CONTROL']['KEYWORDS'][$k]['DISALLOWED_BEFORE']; + } + + if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$k]['DISALLOWED_AFTER'])) { + $disallowed_after_local = + $this->language_data['PARSER_CONTROL']['KEYWORDS'][$k]['DISALLOWED_AFTER']; + } + } + + $this->_kw_replace_group = $k; + + //NEW in 1.0.8, the cached regexp list + // since we don't want PHP / PCRE to crash due to too large patterns we split them into smaller chunks + for ($set = 0, $set_length = count($this->language_data['CACHED_KEYWORD_LISTS'][$k]); $set < $set_length; ++$set) { + $keywordset =& $this->language_data['CACHED_KEYWORD_LISTS'][$k][$set]; + // Might make a more unique string for putting the number in soon + // Basically, we don't put the styles in yet because then the styles themselves will + // get highlighted if the language has a CSS keyword in it (like CSS, for example ;)) + $stuff_to_parse = preg_replace_callback( + "/$disallowed_before_local({$keywordset})(?!\(?:htm|php))$disallowed_after_local/$modifiers", + array($this, 'handle_keyword_replace'), + $stuff_to_parse + ); + } + } + } + + // Regular expressions + foreach ($this->language_data['REGEXPS'] as $key => $regexp) { + if ($this->lexic_permissions['REGEXPS'][$key]) { + if (is_array($regexp)) { + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + // produce valid HTML when we match multiple lines + $this->_hmr_replace = $regexp[GESHI_REPLACE]; + $this->_hmr_before = $regexp[GESHI_BEFORE]; + $this->_hmr_key = $key; + $this->_hmr_after = $regexp[GESHI_AFTER]; + $stuff_to_parse = preg_replace_callback( + "/" . $regexp[GESHI_SEARCH] . "/{$regexp[GESHI_MODIFIERS]}", + array($this, 'handle_multiline_regexps'), + $stuff_to_parse); + $this->_hmr_replace = false; + $this->_hmr_before = ''; + $this->_hmr_after = ''; + } else { + $stuff_to_parse = preg_replace( + '/' . $regexp[GESHI_SEARCH] . '/' . $regexp[GESHI_MODIFIERS], + $regexp[GESHI_BEFORE] . '<|!REG3XP'. $key .'!>' . $regexp[GESHI_REPLACE] . '|>' . $regexp[GESHI_AFTER], + $stuff_to_parse); + } + } else { + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + // produce valid HTML when we match multiple lines + $this->_hmr_key = $key; + $stuff_to_parse = preg_replace_callback( "/(" . $regexp . ")/", + array($this, 'handle_multiline_regexps'), $stuff_to_parse); + $this->_hmr_key = ''; + } else { + $stuff_to_parse = preg_replace( "/(" . $regexp . ")/", "<|!REG3XP$key!>\\1|>", $stuff_to_parse); + } + } + } + } + + // Highlight numbers. As of 1.0.8 we support different types of numbers + $numbers_found = false; + + if ($this->lexic_permissions['NUMBERS'] && preg_match($this->language_data['PARSER_CONTROL']['NUMBERS']['PRECHECK_RX'], $stuff_to_parse )) { + $numbers_found = true; + + //For each of the formats ... + foreach($this->language_data['NUMBERS_RXCACHE'] as $id => $regexp) { + //Check if it should be highlighted ... + $stuff_to_parse = preg_replace($regexp, "<|/NUM!$id/>\\1|>", $stuff_to_parse); + } + } + + // + // Now that's all done, replace /[number]/ with the correct styles + // + foreach (array_keys($this->language_data['KEYWORDS']) as $k) { + if (!$this->use_classes) { + $attributes = ' style="' . + (isset($this->language_data['STYLES']['KEYWORDS'][$k]) ? + $this->language_data['STYLES']['KEYWORDS'][$k] : "") . '"'; + } else { + $attributes = ' class="kw' . $k . '"'; + } + $stuff_to_parse = str_replace("<|/$k/>", "<|$attributes>", $stuff_to_parse); + } + + if ($numbers_found) { + // Put number styles in + foreach($this->language_data['NUMBERS_RXCACHE'] as $id => $regexp) { + //Commented out for now, as this needs some review ... + // if ($numbers_permissions & $id) { + //Get the appropriate style ... + //Checking for unset styles is done by the style cache builder ... + if (!$this->use_classes) { + $attributes = ' style="' . $this->language_data['STYLES']['NUMBERS'][$id] . '"'; + } else { + $attributes = ' class="nu'.$id.'"'; + } + + //Set in the correct styles ... + $stuff_to_parse = str_replace("/NUM!$id/", $attributes, $stuff_to_parse); + // } + } + } + + // Highlight methods and fields in objects + if ($this->lexic_permissions['METHODS'] && $this->language_data['OOLANG']) { + $oolang_spaces = "[\s]*"; + $oolang_before = ""; + $oolang_after = "[a-zA-Z][a-zA-Z0-9_]*"; + if (isset($this->language_data['PARSER_CONTROL'])) { + if (isset($this->language_data['PARSER_CONTROL']['OOLANG'])) { + if (isset($this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_BEFORE'])) { + $oolang_before = $this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_BEFORE']; + } + if (isset($this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_AFTER'])) { + $oolang_after = $this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_AFTER']; + } + if (isset($this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_SPACES'])) { + $oolang_spaces = $this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_SPACES']; + } + } + } + + foreach ($this->language_data['OBJECT_SPLITTERS'] as $key => $splitter) { + if (false !== strpos($stuff_to_parse, $splitter)) { + if (!$this->use_classes) { + $attributes = ' style="' . $this->language_data['STYLES']['METHODS'][$key] . '"'; + } else { + $attributes = ' class="me' . $key . '"'; + } + $stuff_to_parse = preg_replace("/($oolang_before)(" . preg_quote($this->language_data['OBJECT_SPLITTERS'][$key], '/') . ")($oolang_spaces)($oolang_after)/", "\\1\\2\\3<|$attributes>\\4|>", $stuff_to_parse); + } + } + } + + // + // Highlight brackets. Yes, I've tried adding a semi-colon to this list. + // You try it, and see what happens ;) + // TODO: Fix lexic permissions not converting entities if shouldn't + // be highlighting regardless + // + if ($this->lexic_permissions['BRACKETS']) { + $stuff_to_parse = str_replace( $this->language_data['CACHE_BRACKET_MATCH'], + $this->language_data['CACHE_BRACKET_REPLACE'], $stuff_to_parse ); + } + + + //FIX for symbol highlighting ... + if ($this->lexic_permissions['SYMBOLS'] && !empty($this->language_data['SYMBOLS'])) { + //Get all matches and throw away those witin a block that is already highlighted... (i.e. matched by a regexp) + $n_symbols = preg_match_all("/<\|(?:|[^>])+>(?:(?!\|>).*?)\|>|<\/a>|(?:" . $this->language_data['SYMBOL_SEARCH'] . ")+(?![^<]+?>)/", $stuff_to_parse, $pot_symbols, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); + $global_offset = 0; + for ($s_id = 0; $s_id < $n_symbols; ++$s_id) { + $symbol_match = $pot_symbols[$s_id][0][0]; + if (strpos($symbol_match, '<') !== false || strpos($symbol_match, '>') !== false) { + // already highlighted blocks _must_ include either < or > + // so if this conditional applies, we have to skip this match + // BenBE: UNLESS the block contains or + if(strpos($symbol_match, '') === false && + strpos($symbol_match, '') === false) { + continue; + } + } + + // if we reach this point, we have a valid match which needs to be highlighted + + $symbol_length = strlen($symbol_match); + $symbol_offset = $pot_symbols[$s_id][0][1]; + unset($pot_symbols[$s_id]); + $symbol_end = $symbol_length + $symbol_offset; + $symbol_hl = ""; + + // if we have multiple styles, we have to handle them properly + if ($this->language_data['MULTIPLE_SYMBOL_GROUPS']) { + $old_sym = -1; + // Split the current stuff to replace into its atomic symbols ... + preg_match_all("/" . $this->language_data['SYMBOL_SEARCH'] . "/", $symbol_match, $sym_match_syms, PREG_PATTERN_ORDER); + foreach ($sym_match_syms[0] as $sym_ms) { + //Check if consequtive symbols belong to the same group to save output ... + if (isset($this->language_data['SYMBOL_DATA'][$sym_ms]) + && ($this->language_data['SYMBOL_DATA'][$sym_ms] != $old_sym)) { + if (-1 != $old_sym) { + $symbol_hl .= "|>"; + } + $old_sym = $this->language_data['SYMBOL_DATA'][$sym_ms]; + if (!$this->use_classes) { + $symbol_hl .= '<| style="' . $this->language_data['STYLES']['SYMBOLS'][$old_sym] . '">'; + } else { + $symbol_hl .= '<| class="sy' . $old_sym . '">'; + } + } + $symbol_hl .= $sym_ms; + } + unset($sym_match_syms); + + //Close remaining tags and insert the replacement at the right position ... + //Take caution if symbol_hl is empty to avoid doubled closing spans. + if (-1 != $old_sym) { + $symbol_hl .= "|>"; + } + } else { + if (!$this->use_classes) { + $symbol_hl = '<| style="' . $this->language_data['STYLES']['SYMBOLS'][0] . '">'; + } else { + $symbol_hl = '<| class="sy0">'; + } + $symbol_hl .= $symbol_match . '|>'; + } + + $stuff_to_parse = substr_replace($stuff_to_parse, $symbol_hl, $symbol_offset + $global_offset, $symbol_length); + + // since we replace old text with something of different size, + // we'll have to keep track of the differences + $global_offset += strlen($symbol_hl) - $symbol_length; + } + } + //FIX for symbol highlighting ... + + // Add class/style for regexps + foreach (array_keys($this->language_data['REGEXPS']) as $key) { + if ($this->lexic_permissions['REGEXPS'][$key]) { + if (is_callable($this->language_data['STYLES']['REGEXPS'][$key])) { + $this->_rx_key = $key; + $stuff_to_parse = preg_replace_callback("/!REG3XP$key!(.*)\|>/U", + array($this, 'handle_regexps_callback'), + $stuff_to_parse); + } else { + if (!$this->use_classes) { + $attributes = ' style="' . $this->language_data['STYLES']['REGEXPS'][$key] . '"'; + } else { + if (is_array($this->language_data['REGEXPS'][$key]) && + array_key_exists(GESHI_CLASS, $this->language_data['REGEXPS'][$key])) { + $attributes = ' class="' . + $this->language_data['REGEXPS'][$key][GESHI_CLASS] . '"'; + } else { + $attributes = ' class="re' . $key . '"'; + } + } + $stuff_to_parse = str_replace("!REG3XP$key!", "$attributes", $stuff_to_parse); + } + } + } + + // Replace with . for urls + $stuff_to_parse = str_replace('', '.', $stuff_to_parse); + // Replace <|UR1| with link_styles[GESHI_LINK])) { + if ($this->use_classes) { + $stuff_to_parse = str_replace('<|UR1|', 'link_target . ' href=', $stuff_to_parse); + } else { + $stuff_to_parse = str_replace('<|UR1|', 'link_target . ' style="' . $this->link_styles[GESHI_LINK] . '" href=', $stuff_to_parse); + } + } else { + $stuff_to_parse = str_replace('<|UR1|', 'link_target . ' href=', $stuff_to_parse); + } + + // + // NOW we add the span thingy ;) + // + + $stuff_to_parse = str_replace('<|', '', '', $stuff_to_parse ); + return substr($stuff_to_parse, 1); + } + + /** + * Sets the time taken to parse the code + * + * @param microtime The time when parsing started + * @param microtime The time when parsing ended + * @since 1.0.2 + * @access private + */ + function set_time($start_time, $end_time) { + $start = explode(' ', $start_time); + $end = explode(' ', $end_time); + $this->time = $end[0] + $end[1] - $start[0] - $start[1]; + } + + /** + * Gets the time taken to parse the code + * + * @return double The time taken to parse the code + * @since 1.0.2 + */ + function get_time() { + return $this->time; + } + + /** + * Merges arrays recursively, overwriting values of the first array with values of later arrays + * + * @since 1.0.8 + * @access private + */ + function merge_arrays() { + $arrays = func_get_args(); + $narrays = count($arrays); + + // check arguments + // comment out if more performance is necessary (in this case the foreach loop will trigger a warning if the argument is not an array) + for ($i = 0; $i < $narrays; $i ++) { + if (!is_array($arrays[$i])) { + // also array_merge_recursive returns nothing in this case + trigger_error('Argument #' . ($i+1) . ' is not an array - trying to merge array with scalar! Returning false!', E_USER_WARNING); + return false; + } + } + + // the first array is in the output set in every case + $ret = $arrays[0]; + + // merege $ret with the remaining arrays + for ($i = 1; $i < $narrays; $i ++) { + foreach ($arrays[$i] as $key => $value) { + if (is_array($value) && isset($ret[$key])) { + // if $ret[$key] is not an array you try to merge an scalar value with an array - the result is not defined (incompatible arrays) + // in this case the call will trigger an E_USER_WARNING and the $ret[$key] will be false. + $ret[$key] = $this->merge_arrays($ret[$key], $value); + } else { + $ret[$key] = $value; + } + } + } + + return $ret; + } + + /** + * Gets language information and stores it for later use + * + * @param string The filename of the language file you want to load + * @since 1.0.0 + * @access private + * @todo Needs to load keys for lexic permissions for keywords, regexps etc + */ + function load_language($file_name) { + if ($file_name == $this->loaded_language) { + // this file is already loaded! + return; + } + + //Prepare some stuff before actually loading the language file + $this->loaded_language = $file_name; + $this->parse_cache_built = false; + $this->enable_highlighting(); + $language_data = array(); + + //Load the language file + require $file_name; + + // Perhaps some checking might be added here later to check that + // $language data is a valid thing but maybe not + $this->language_data = $language_data; + + // Set strict mode if should be set + $this->strict_mode = $this->language_data['STRICT_MODE_APPLIES']; + + // Set permissions for all lexics to true + // so they'll be highlighted by default + foreach (array_keys($this->language_data['KEYWORDS']) as $key) { + if (!empty($this->language_data['KEYWORDS'][$key])) { + $this->lexic_permissions['KEYWORDS'][$key] = true; + } else { + $this->lexic_permissions['KEYWORDS'][$key] = false; + } + } + + foreach (array_keys($this->language_data['COMMENT_SINGLE']) as $key) { + $this->lexic_permissions['COMMENTS'][$key] = true; + } + foreach (array_keys($this->language_data['REGEXPS']) as $key) { + $this->lexic_permissions['REGEXPS'][$key] = true; + } + + // for BenBE and future code reviews: + // we can use empty here since we only check for existance and emptiness of an array + // if it is not an array at all but rather false or null this will work as intended as well + // even if $this->language_data['PARSER_CONTROL'] is undefined this won't trigger a notice + if (!empty($this->language_data['PARSER_CONTROL']['ENABLE_FLAGS'])) { + foreach ($this->language_data['PARSER_CONTROL']['ENABLE_FLAGS'] as $flag => $value) { + // it's either true or false and maybe is true as well + $perm = $value !== GESHI_NEVER; + if ($flag == 'ALL') { + $this->enable_highlighting($perm); + continue; + } + if (!isset($this->lexic_permissions[$flag])) { + // unknown lexic permission + continue; + } + if (is_array($this->lexic_permissions[$flag])) { + foreach ($this->lexic_permissions[$flag] as $key => $val) { + $this->lexic_permissions[$flag][$key] = $perm; + } + } else { + $this->lexic_permissions[$flag] = $perm; + } + } + unset($this->language_data['PARSER_CONTROL']['ENABLE_FLAGS']); + } + + //Fix: Problem where hardescapes weren't handled if no ESCAPE_CHAR was given + //You need to set one for HARDESCAPES only in this case. + if(!isset($this->language_data['HARDCHAR'])) { + $this->language_data['HARDCHAR'] = $this->language_data['ESCAPE_CHAR']; + } + + //NEW in 1.0.8: Allow styles to be loaded from a separate file to override defaults + $style_filename = substr($file_name, 0, -4) . '.style.php'; + if (is_readable($style_filename)) { + //Clear any style_data that could have been set before ... + if (isset($style_data)) { + unset($style_data); + } + + //Read the Style Information from the style file + include $style_filename; + + //Apply the new styles to our current language styles + if (isset($style_data) && is_array($style_data)) { + $this->language_data['STYLES'] = + $this->merge_arrays($this->language_data['STYLES'], $style_data); + } + } + } + + /** + * Takes the parsed code and various options, and creates the HTML + * surrounding it to make it look nice. + * + * @param string The code already parsed (reference!) + * @since 1.0.0 + * @access private + */ + function finalise(&$parsed_code) { + // Remove end parts of important declarations + // This is BUGGY!! My fault for bad code: fix coming in 1.2 + // @todo Remove this crap + if ($this->enable_important_blocks && + (strpos($parsed_code, $this->hsc(GESHI_START_IMPORTANT)) === false)) { + $parsed_code = str_replace($this->hsc(GESHI_END_IMPORTANT), '', $parsed_code); + } + + // Add HTML whitespace stuff if we're using the
        header + if ($this->header_type != GESHI_HEADER_PRE && $this->header_type != GESHI_HEADER_PRE_VALID) { + $this->indent($parsed_code); + } + + // purge some unnecessary stuff + /** NOTE: memorypeak #1 */ + $parsed_code = preg_replace('#]+>(\s*)#', '\\1', $parsed_code); + + // If we are using IDs for line numbers, there needs to be an overall + // ID set to prevent collisions. + if ($this->add_ids && !$this->overall_id) { + $this->overall_id = 'geshi-' . substr(md5(microtime()), 0, 4); + } + + // Get code into lines + /** NOTE: memorypeak #2 */ + $code = explode("\n", $parsed_code); + $parsed_code = $this->header(); + + // If we're using line numbers, we insert
      4. s and appropriate + // markup to style them (otherwise we don't need to do anything) + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS && $this->header_type != GESHI_HEADER_PRE_TABLE) { + // If we're using the
         header, we shouldn't add newlines because
        +            // the 
         will line-break them (and the 
      5. s already do this for us) + $ls = ($this->header_type != GESHI_HEADER_PRE && $this->header_type != GESHI_HEADER_PRE_VALID) ? "\n" : ''; + + // Set vars to defaults for following loop + $i = 0; + + // Foreach line... + for ($i = 0, $n = count($code); $i < $n;) { + //Reset the attributes for a new line ... + $attrs = array(); + + // Make lines have at least one space in them if they're empty + // BenBE: Checking emptiness using trim instead of relying on blanks + if ('' == trim($code[$i])) { + $code[$i] = ' '; + } + + // If this is a "special line"... + if ($this->line_numbers == GESHI_FANCY_LINE_NUMBERS && + $i % $this->line_nth_row == ($this->line_nth_row - 1)) { + // Set the attributes to style the line + if ($this->use_classes) { + //$attr = ' class="li2"'; + $attrs['class'][] = 'li2'; + $def_attr = ' class="de2"'; + } else { + //$attr = ' style="' . $this->line_style2 . '"'; + $attrs['style'][] = $this->line_style2; + // This style "covers up" the special styles set for special lines + // so that styles applied to special lines don't apply to the actual + // code on that line + $def_attr = ' style="' . $this->code_style . '"'; + } + } else { + if ($this->use_classes) { + //$attr = ' class="li1"'; + $attrs['class'][] = 'li1'; + $def_attr = ' class="de1"'; + } else { + //$attr = ' style="' . $this->line_style1 . '"'; + $attrs['style'][] = $this->line_style1; + $def_attr = ' style="' . $this->code_style . '"'; + } + } + + //Check which type of tag to insert for this line + if ($this->header_type == GESHI_HEADER_PRE_VALID) { + $start = ""; + $end = '
      6. '; + } else { + // Span or div? + $start = ""; + $end = '
      '; + } + + ++$i; + + // Are we supposed to use ids? If so, add them + if ($this->add_ids) { + $attrs['id'][] = "$this->overall_id-$i"; + } + + //Is this some line with extra styles??? + if (in_array($i, $this->highlight_extra_lines)) { + if ($this->use_classes) { + if (isset($this->highlight_extra_lines_styles[$i])) { + $attrs['class'][] = "lx$i"; + } else { + $attrs['class'][] = "ln-xtra"; + } + } else { + array_push($attrs['style'], $this->get_line_style($i)); + } + } + + // Add in the line surrounded by appropriate list HTML + $attr_string = ''; + foreach ($attrs as $key => $attr) { + $attr_string .= ' ' . $key . '="' . implode(' ', $attr) . '"'; + } + + $parsed_code .= "$start{$code[$i-1]}$end
    2. $ls"; + unset($code[$i - 1]); + } + } else { + $n = count($code); + if ($this->use_classes) { + $attributes = ' class="de1"'; + } else { + $attributes = ' style="'. $this->code_style .'"'; + } + if ($this->header_type == GESHI_HEADER_PRE_VALID) { + $parsed_code .= ''; + } elseif ($this->header_type == GESHI_HEADER_PRE_TABLE) { + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + if ($this->use_classes) { + $attrs = ' class="ln"'; + } else { + $attrs = ' style="'. $this->table_linenumber_style .'"'; + } + $parsed_code .= ''; + // get linenumbers + // we don't merge it with the for below, since it should be better for + // memory consumption this way + // @todo: but... actually it would still be somewhat nice to merge the two loops + // the mem peaks are at different positions + for ($i = 0; $i < $n; ++$i) { + $close = 0; + // fancy lines + if ($this->line_numbers == GESHI_FANCY_LINE_NUMBERS && + $i % $this->line_nth_row == ($this->line_nth_row - 1)) { + // Set the attributes to style the line + if ($this->use_classes) { + $parsed_code .= ''; + } else { + // This style "covers up" the special styles set for special lines + // so that styles applied to special lines don't apply to the actual + // code on that line + $parsed_code .= '' + .''; + } + $close += 2; + } + //Is this some line with extra styles??? + if (in_array($i + 1, $this->highlight_extra_lines)) { + if ($this->use_classes) { + if (isset($this->highlight_extra_lines_styles[$i])) { + $parsed_code .= ""; + } else { + $parsed_code .= ""; + } + } else { + $parsed_code .= "get_line_style($i) . "\">"; + } + ++$close; + } + $parsed_code .= $this->line_numbers_start + $i; + if ($close) { + $parsed_code .= str_repeat('', $close); + } else if ($i != $n) { + $parsed_code .= "\n"; + } + } + $parsed_code .= '
    '; + } + $parsed_code .= ''; + } + // No line numbers, but still need to handle highlighting lines extra. + // Have to use divs so the full width of the code is highlighted + $close = 0; + for ($i = 0; $i < $n; ++$i) { + // Make lines have at least one space in them if they're empty + // BenBE: Checking emptiness using trim instead of relying on blanks + if ('' == trim($code[$i])) { + $code[$i] = ' '; + } + // fancy lines + if ($this->line_numbers == GESHI_FANCY_LINE_NUMBERS && + $i % $this->line_nth_row == ($this->line_nth_row - 1)) { + // Set the attributes to style the line + if ($this->use_classes) { + $parsed_code .= ''; + } else { + // This style "covers up" the special styles set for special lines + // so that styles applied to special lines don't apply to the actual + // code on that line + $parsed_code .= '' + .''; + } + $close += 2; + } + //Is this some line with extra styles??? + if (in_array($i + 1, $this->highlight_extra_lines)) { + if ($this->use_classes) { + if (isset($this->highlight_extra_lines_styles[$i])) { + $parsed_code .= ""; + } else { + $parsed_code .= ""; + } + } else { + $parsed_code .= "get_line_style($i) . "\">"; + } + ++$close; + } + + $parsed_code .= $code[$i]; + + if ($close) { + $parsed_code .= str_repeat('', $close); + $close = 0; + } + elseif ($i + 1 < $n) { + $parsed_code .= "\n"; + } + unset($code[$i]); + } + + if ($this->header_type == GESHI_HEADER_PRE_VALID || $this->header_type == GESHI_HEADER_PRE_TABLE) { + $parsed_code .= ''; + } + if ($this->header_type == GESHI_HEADER_PRE_TABLE && $this->line_numbers != GESHI_NO_LINE_NUMBERS) { + $parsed_code .= ''; + } + } + + $parsed_code .= $this->footer(); + } + + /** + * Creates the header for the code block (with correct attributes) + * + * @return string The header for the code block + * @since 1.0.0 + * @access private + */ + function header() { + // Get attributes needed + /** + * @todo Document behaviour change - class is outputted regardless of whether + * we're using classes or not. Same with style + */ + $attributes = ' class="' . $this->_genCSSName($this->language); + if ($this->overall_class != '') { + $attributes .= " ".$this->_genCSSName($this->overall_class); + } + $attributes .= '"'; + + if ($this->overall_id != '') { + $attributes .= " id=\"{$this->overall_id}\""; + } + if ($this->overall_style != '' && !$this->use_classes) { + $attributes .= ' style="' . $this->overall_style . '"'; + } + + $ol_attributes = ''; + + if ($this->line_numbers_start != 1) { + $ol_attributes .= ' start="' . $this->line_numbers_start . '"'; + } + + // Get the header HTML + $header = $this->header_content; + if ($header) { + if ($this->header_type == GESHI_HEADER_PRE || $this->header_type == GESHI_HEADER_PRE_VALID) { + $header = str_replace("\n", '', $header); + } + $header = $this->replace_keywords($header); + + if ($this->use_classes) { + $attr = ' class="head"'; + } else { + $attr = " style=\"{$this->header_content_style}\""; + } + if ($this->header_type == GESHI_HEADER_PRE_TABLE && $this->line_numbers != GESHI_NO_LINE_NUMBERS) { + $header = "$header"; + } else { + $header = "$header"; + } + } + + if (GESHI_HEADER_NONE == $this->header_type) { + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + return "$header"; + } + return $header . ($this->force_code_block ? '
    ' : ''); + } + + // Work out what to return and do it + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + if ($this->header_type == GESHI_HEADER_PRE) { + return "$header"; + } else if ($this->header_type == GESHI_HEADER_DIV || + $this->header_type == GESHI_HEADER_PRE_VALID) { + return "$header"; + } else if ($this->header_type == GESHI_HEADER_PRE_TABLE) { + return "$header"; + } + } else { + if ($this->header_type == GESHI_HEADER_PRE) { + return "$header" . + ($this->force_code_block ? '
    ' : ''); + } else { + return "$header" . + ($this->force_code_block ? '
    ' : ''); + } + } + } + + /** + * Returns the footer for the code block. + * + * @return string The footer for the code block + * @since 1.0.0 + * @access private + */ + function footer() { + $footer = $this->footer_content; + if ($footer) { + if ($this->header_type == GESHI_HEADER_PRE) { + $footer = str_replace("\n", '', $footer);; + } + $footer = $this->replace_keywords($footer); + + if ($this->use_classes) { + $attr = ' class="foot"'; + } else { + $attr = " style=\"{$this->footer_content_style}\""; + } + if ($this->header_type == GESHI_HEADER_PRE_TABLE && $this->line_numbers != GESHI_NO_LINE_NUMBERS) { + $footer = "$footer"; + } else { + $footer = "$footer
    "; + } + } + + if (GESHI_HEADER_NONE == $this->header_type) { + return ($this->line_numbers != GESHI_NO_LINE_NUMBERS) ? '' . $footer : $footer; + } + + if ($this->header_type == GESHI_HEADER_DIV || $this->header_type == GESHI_HEADER_PRE_VALID) { + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + return "$footer
    "; + } + return ($this->force_code_block ? '
    ' : '') . + "$footer"; + } + elseif ($this->header_type == GESHI_HEADER_PRE_TABLE) { + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + return "$footer"; + } + return ($this->force_code_block ? '' : '') . + "$footer"; + } + else { + if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { + return "$footer"; + } + return ($this->force_code_block ? '' : '') . + "$footer"; + } + } + + /** + * Replaces certain keywords in the header and footer with + * certain configuration values + * + * @param string The header or footer content to do replacement on + * @return string The header or footer with replaced keywords + * @since 1.0.2 + * @access private + */ + function replace_keywords($instr) { + $keywords = $replacements = array(); + + $keywords[] = '
      to have no effect at all if there are line numbers + // (
        s have margins that should be destroyed so all layout is + // controlled by the set_overall_style method, which works on the + //
         or 
        container). Additionally, set default styles for lines + if (!$economy_mode || $this->line_numbers != GESHI_NO_LINE_NUMBERS) { + //$stylesheet .= "$selector, {$selector}ol, {$selector}ol li {margin: 0;}\n"; + $stylesheet .= "$selector.de1, $selector.de2 {{$this->code_style}}\n"; + } + + // Add overall styles + // note: neglect economy_mode, empty styles are meaningless + if ($this->overall_style != '') { + $stylesheet .= "$selector {{$this->overall_style}}\n"; + } + + // Add styles for links + // note: economy mode does not make _any_ sense here + // either the style is empty and thus no selector is needed + // or the appropriate key is given. + foreach ($this->link_styles as $key => $style) { + if ($style != '') { + switch ($key) { + case GESHI_LINK: + $stylesheet .= "{$selector}a:link {{$style}}\n"; + break; + case GESHI_HOVER: + $stylesheet .= "{$selector}a:hover {{$style}}\n"; + break; + case GESHI_ACTIVE: + $stylesheet .= "{$selector}a:active {{$style}}\n"; + break; + case GESHI_VISITED: + $stylesheet .= "{$selector}a:visited {{$style}}\n"; + break; + } + } + } + + // Header and footer + // note: neglect economy_mode, empty styles are meaningless + if ($this->header_content_style != '') { + $stylesheet .= "$selector.head {{$this->header_content_style}}\n"; + } + if ($this->footer_content_style != '') { + $stylesheet .= "$selector.foot {{$this->footer_content_style}}\n"; + } + + // Styles for important stuff + // note: neglect economy_mode, empty styles are meaningless + if ($this->important_styles != '') { + $stylesheet .= "$selector.imp {{$this->important_styles}}\n"; + } + + // Simple line number styles + if ((!$economy_mode || $this->line_numbers != GESHI_NO_LINE_NUMBERS) && $this->line_style1 != '') { + $stylesheet .= "{$selector}li, {$selector}.li1 {{$this->line_style1}}\n"; + } + if ((!$economy_mode || $this->line_numbers != GESHI_NO_LINE_NUMBERS) && $this->table_linenumber_style != '') { + $stylesheet .= "{$selector}.ln {{$this->table_linenumber_style}}\n"; + } + // If there is a style set for fancy line numbers, echo it out + if ((!$economy_mode || $this->line_numbers == GESHI_FANCY_LINE_NUMBERS) && $this->line_style2 != '') { + $stylesheet .= "{$selector}.li2 {{$this->line_style2}}\n"; + } + + // note: empty styles are meaningless + foreach ($this->language_data['STYLES']['KEYWORDS'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || + (isset($this->lexic_permissions['KEYWORDS'][$group]) && + $this->lexic_permissions['KEYWORDS'][$group]))) { + $stylesheet .= "$selector.kw$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['COMMENTS'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || + (isset($this->lexic_permissions['COMMENTS'][$group]) && + $this->lexic_permissions['COMMENTS'][$group]) || + (!empty($this->language_data['COMMENT_REGEXP']) && + !empty($this->language_data['COMMENT_REGEXP'][$group])))) { + $stylesheet .= "$selector.co$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['ESCAPE_CHAR'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || $this->lexic_permissions['ESCAPE_CHAR'])) { + // NEW: since 1.0.8 we have to handle hardescapes + if ($group === 'HARD') { + $group = '_h'; + } + $stylesheet .= "$selector.es$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['BRACKETS'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || $this->lexic_permissions['BRACKETS'])) { + $stylesheet .= "$selector.br$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['SYMBOLS'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || $this->lexic_permissions['SYMBOLS'])) { + $stylesheet .= "$selector.sy$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['STRINGS'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || $this->lexic_permissions['STRINGS'])) { + // NEW: since 1.0.8 we have to handle hardquotes + if ($group === 'HARD') { + $group = '_h'; + } + $stylesheet .= "$selector.st$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['NUMBERS'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || $this->lexic_permissions['NUMBERS'])) { + $stylesheet .= "$selector.nu$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['METHODS'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || $this->lexic_permissions['METHODS'])) { + $stylesheet .= "$selector.me$group {{$styles}}\n"; + } + } + // note: neglect economy_mode, empty styles are meaningless + foreach ($this->language_data['STYLES']['SCRIPT'] as $group => $styles) { + if ($styles != '') { + $stylesheet .= "$selector.sc$group {{$styles}}\n"; + } + } + foreach ($this->language_data['STYLES']['REGEXPS'] as $group => $styles) { + if ($styles != '' && (!$economy_mode || + (isset($this->lexic_permissions['REGEXPS'][$group]) && + $this->lexic_permissions['REGEXPS'][$group]))) { + if (is_array($this->language_data['REGEXPS'][$group]) && + array_key_exists(GESHI_CLASS, $this->language_data['REGEXPS'][$group])) { + $stylesheet .= "$selector."; + $stylesheet .= $this->language_data['REGEXPS'][$group][GESHI_CLASS]; + $stylesheet .= " {{$styles}}\n"; + } else { + $stylesheet .= "$selector.re$group {{$styles}}\n"; + } + } + } + // Styles for lines being highlighted extra + if (!$economy_mode || (count($this->highlight_extra_lines)!=count($this->highlight_extra_lines_styles))) { + $stylesheet .= "{$selector}.ln-xtra, {$selector}li.ln-xtra, {$selector}div.ln-xtra {{$this->highlight_extra_lines_style}}\n"; + } + $stylesheet .= "{$selector}span.xtra { display:block; }\n"; + foreach ($this->highlight_extra_lines_styles as $lineid => $linestyle) { + $stylesheet .= "{$selector}.lx$lineid, {$selector}li.lx$lineid, {$selector}div.lx$lineid {{$linestyle}}\n"; + } + + return $stylesheet; + } + + /** + * Get's the style that is used for the specified line + * + * @param int The line number information is requested for + * @access private + * @since 1.0.7.21 + */ + function get_line_style($line) { + //$style = null; + $style = null; + if (isset($this->highlight_extra_lines_styles[$line])) { + $style = $this->highlight_extra_lines_styles[$line]; + } else { // if no "extra" style assigned + $style = $this->highlight_extra_lines_style; + } + + return $style; + } + + /** + * this functions creates an optimized regular expression list + * of an array of strings. + * + * Example: + * $list = array('faa', 'foo', 'foobar'); + * => string 'f(aa|oo(bar)?)' + * + * @param $list array of (unquoted) strings + * @param $regexp_delimiter your regular expression delimiter, @see preg_quote() + * @return string for regular expression + * @author Milian Wolff + * @since 1.0.8 + * @access private + */ + function optimize_regexp_list($list, $regexp_delimiter = '/') { + $regex_chars = array('.', '\\', '+', '*', '?', '[', '^', ']', '$', + '(', ')', '{', '}', '=', '!', '<', '>', '|', ':', $regexp_delimiter); + sort($list); + $regexp_list = array(''); + $num_subpatterns = 0; + $list_key = 0; + + // the tokens which we will use to generate the regexp list + $tokens = array(); + $prev_keys = array(); + // go through all entries of the list and generate the token list + $cur_len = 0; + for ($i = 0, $i_max = count($list); $i < $i_max; ++$i) { + if ($cur_len > GESHI_MAX_PCRE_LENGTH) { + // seems like the length of this pcre is growing exorbitantly + $regexp_list[++$list_key] = $this->_optimize_regexp_list_tokens_to_string($tokens); + $num_subpatterns = substr_count($regexp_list[$list_key], '(?:'); + $tokens = array(); + $cur_len = 0; + } + $level = 0; + $entry = preg_quote((string) $list[$i], $regexp_delimiter); + $pointer = &$tokens; + // properly assign the new entry to the correct position in the token array + // possibly generate smaller common denominator keys + while (true) { + // get the common denominator + if (isset($prev_keys[$level])) { + if ($prev_keys[$level] == $entry) { + // this is a duplicate entry, skip it + continue 2; + } + $char = 0; + while (isset($entry[$char]) && isset($prev_keys[$level][$char]) + && $entry[$char] == $prev_keys[$level][$char]) { + ++$char; + } + if ($char > 0) { + // this entry has at least some chars in common with the current key + if ($char == strlen($prev_keys[$level])) { + // current key is totally matched, i.e. this entry has just some bits appended + $pointer = &$pointer[$prev_keys[$level]]; + } else { + // only part of the keys match + $new_key_part1 = substr($prev_keys[$level], 0, $char); + $new_key_part2 = substr($prev_keys[$level], $char); + + if (in_array($new_key_part1[0], $regex_chars) + || in_array($new_key_part2[0], $regex_chars)) { + // this is bad, a regex char as first character + $pointer[$entry] = array('' => true); + array_splice($prev_keys, $level, count($prev_keys), $entry); + $cur_len += strlen($entry); + continue; + } else { + // relocate previous tokens + $pointer[$new_key_part1] = array($new_key_part2 => $pointer[$prev_keys[$level]]); + unset($pointer[$prev_keys[$level]]); + $pointer = &$pointer[$new_key_part1]; + // recreate key index + array_splice($prev_keys, $level, count($prev_keys), array($new_key_part1, $new_key_part2)); + $cur_len += strlen($new_key_part2); + } + } + ++$level; + $entry = substr($entry, $char); + continue; + } + // else: fall trough, i.e. no common denominator was found + } + if ($level == 0 && !empty($tokens)) { + // we can dump current tokens into the string and throw them away afterwards + $new_entry = $this->_optimize_regexp_list_tokens_to_string($tokens); + $new_subpatterns = substr_count($new_entry, '(?:'); + if (GESHI_MAX_PCRE_SUBPATTERNS && $num_subpatterns + $new_subpatterns > GESHI_MAX_PCRE_SUBPATTERNS) { + $regexp_list[++$list_key] = $new_entry; + $num_subpatterns = $new_subpatterns; + } else { + if (!empty($regexp_list[$list_key])) { + $new_entry = '|' . $new_entry; + } + $regexp_list[$list_key] .= $new_entry; + $num_subpatterns += $new_subpatterns; + } + $tokens = array(); + $cur_len = 0; + } + // no further common denominator found + $pointer[$entry] = array('' => true); + array_splice($prev_keys, $level, count($prev_keys), $entry); + + $cur_len += strlen($entry); + break; + } + unset($list[$i]); + } + // make sure the last tokens get converted as well + $new_entry = $this->_optimize_regexp_list_tokens_to_string($tokens); + if (GESHI_MAX_PCRE_SUBPATTERNS && $num_subpatterns + substr_count($new_entry, '(?:') > GESHI_MAX_PCRE_SUBPATTERNS) { + if ( !empty($regexp_list[$list_key]) ) { + ++$list_key; + } + $regexp_list[$list_key] = $new_entry; + } else { + if (!empty($regexp_list[$list_key])) { + $new_entry = '|' . $new_entry; + } + $regexp_list[$list_key] .= $new_entry; + } + return $regexp_list; + } + /** + * this function creates the appropriate regexp string of an token array + * you should not call this function directly, @see $this->optimize_regexp_list(). + * + * @param &$tokens array of tokens + * @param $recursed bool to know wether we recursed or not + * @return string + * @author Milian Wolff + * @since 1.0.8 + * @access private + */ + function _optimize_regexp_list_tokens_to_string(&$tokens, $recursed = false) { + $list = ''; + foreach ($tokens as $token => $sub_tokens) { + $list .= $token; + $close_entry = isset($sub_tokens['']); + unset($sub_tokens['']); + if (!empty($sub_tokens)) { + $list .= '(?:' . $this->_optimize_regexp_list_tokens_to_string($sub_tokens, true) . ')'; + if ($close_entry) { + // make sub_tokens optional + $list .= '?'; + } + } + $list .= '|'; + } + if (!$recursed) { + // do some optimizations + // common trailing strings + // BUGGY! + //$list = preg_replace_callback('#(?<=^|\:|\|)\w+?(\w+)(?:\|.+\1)+(?=\|)#', create_function( + // '$matches', 'return "(?:" . preg_replace("#" . preg_quote($matches[1], "#") . "(?=\||$)#", "", $matches[0]) . ")" . $matches[1];'), $list); + // (?:p)? => p? + $list = preg_replace('#\(\?\:(.)\)\?#', '\1?', $list); + // (?:a|b|c|d|...)? => [abcd...]? + // TODO: a|bb|c => [ac]|bb + static $callback_2; + if (!isset($callback_2)) { + $callback_2 = create_function('$matches', 'return "[" . str_replace("|", "", $matches[1]) . "]";'); + } + $list = preg_replace_callback('#\(\?\:((?:.\|)+.)\)#', $callback_2, $list); + } + // return $list without trailing pipe + return substr($list, 0, -1); + } +} // End Class GeSHi + + +if (!function_exists('geshi_highlight')) { + /** + * Easy way to highlight stuff. Behaves just like highlight_string + * + * @param string The code to highlight + * @param string The language to highlight the code in + * @param string The path to the language files. You can leave this blank if you need + * as from version 1.0.7 the path should be automatically detected + * @param boolean Whether to return the result or to echo + * @return string The code highlighted (if $return is true) + * @since 1.0.2 + */ + function geshi_highlight($string, $language, $path = null, $return = false) { + $geshi = new GeSHi($string, $language, $path); + $geshi->set_header_type(GESHI_HEADER_NONE); + + if ($return) { + return '' . $geshi->parse_code() . ''; + } + + echo '' . $geshi->parse_code() . ''; + + if ($geshi->error()) { + return false; + } + return true; + } +} + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/4cs.php b/_piecrust/libs/Geshi/geshi/4cs.php new file mode 100644 index 0000000..c00792e --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/4cs.php @@ -0,0 +1,139 @@ + 'GADV 4CS', + 'COMMENT_SINGLE' => array(1 => "//"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'All', 'AllMatches', 'And', 'And_Filters', 'As', 'Asc', 'BasedOn', + 'BestMatch', 'Block', 'Buffer', 'ByRef', 'ByVal', 'Call', 'Channel', + 'Chr', 'Clear', 'Close', 'Confirm', 'Const', 'Continue', 'Cos', + 'Critical', 'Declare', 'Default', 'DefaultChannel', 'DefaultDelayTime', + 'DefaultReceiveMode', 'DefaultResponseTime', '#Define', 'DelayTime', + 'Delete', 'Div', 'Else', '#Else', 'ElseIf', '#ElseIf', 'End', 'EndCritical', + 'EndInlineC', 'EndFunction', 'EndIf', '#EndIf', 'EndInputList', + 'EndLocalChannel', 'EndScenario', 'EndSub', 'EndWhile', 'Error', + 'ErrorLevelOff', 'ErrorLevelOn', 'ErrorLevelSet', 'ErrorLevelSetRaw', + 'Event', 'EventMode', 'EventOff', 'EventOn', 'EventSet', 'EventSetRaw', + 'Execute', 'Exit', 'Exp', 'FileClose', 'FilterClear', 'FileEOF', 'FileOpen', + 'FileRead', 'FileSize', 'FileWrite', 'FilterAdd', 'FilterMode', + 'FilterOff', 'FilterOn', 'For', 'Format', 'Function', 'GoOnline', 'GoTo', + 'Handle', 'Hide', 'If', '#If', '#IfDef', '#IfNDef', 'Ignore', '#Include', + 'InlineC', 'Input', 'InputItem', 'InputList', 'Kill', 'LBound', 'LocalChannel', + 'Local', 'Log', 'Log10', 'LogOff', 'LogOn', 'Loop', 'Message', 'Mod', + 'MonitorChannel', 'MostFormat', 'MostMessage', 'Named', 'Never', 'Next', + 'NoOrder', 'Not', 'Nothing', 'NoWait', 'Numeric', 'OnError', 'OnEvent', + 'Or', 'Or_Filters', 'Order', 'Pass', 'Pow', 'Prototype', 'Quit', 'Raise', + 'Random', 'Receive', 'ReceiveMode', 'ReceiveRaw', 'Redim', 'Remote', 'Repeat', + 'Repeated', 'ResponseTime', 'Resume', 'ResumeCritical', 'RT_Common', + 'RT_Dll_Call', 'RT_FILEIO', 'RT_General', 'RT_HardwareAccess', + 'RT_MessageVariableAccess', 'RT_Scenario', 'RT_VariableAccess', 'Runtime', + 'Scenario', 'ScenarioEnd', 'ScenarioStart', 'ScenarioStatus', 'ScenarioTerminate', + 'Send', 'SendRaw', 'Set', 'SetError', 'Sin', 'Single', 'Show', 'Start', + 'StartCritical', 'Starts', 'Static', 'Step', 'Stop', 'String', 'Sub', + 'System_Error', 'TerminateAllChilds', 'Terminates', 'Then', 'Throw', 'TimeOut', + 'To', 'TooLate', 'Trunc', 'UBound', 'Unexpected', 'Until', 'User_Error', + 'View', 'Wait', 'Warning', 'While', 'XOr' + ), + 2 => array( + 'alias', 'winapi', 'long', 'char', 'double', 'float', 'int', 'short', 'lib' + ) + ), + 'SYMBOLS' => array( + '=', ':=', '<', '>', '<>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000C0; font-weight: bold;', + 2 => 'color: #808080;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000;' + ), + 'BRACKETS' => array( + 0 => 'color: #000080;' + ), + 'STRINGS' => array( + 0 => 'color: #800080;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #66cc66;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000080;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/6502acme.php b/_piecrust/libs/Geshi/geshi/6502acme.php new file mode 100644 index 0000000..07f9eaf --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/6502acme.php @@ -0,0 +1,230 @@ + 'MOS 6502 (6510) ACME Cross Assembler format', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* 6502/6510 Opcodes. */ + 1 => array( + 'adc', 'and', 'asl', 'bcc', 'bcs', 'beq', 'bit', 'bmi', + 'bne', 'bpl', 'brk', 'bvc', 'bvs', 'clc', 'cld', 'cli', + 'clv', 'cmp', 'cpx', 'cpy', 'dec', 'dex', 'dey', 'eor', + 'inc', 'inx', 'iny', 'jmp', 'jsr', 'lda', 'ldx', 'ldy', + 'lsr', 'nop', 'ora', 'pha', 'php', 'pla', 'plp', 'rol', + 'ror', 'rti', 'rts', 'sbc', 'sec', 'sed', 'sei', 'sta', + 'stx', 'sty', 'tax', 'tay', 'tsx', 'txa', 'txs', 'tya', + ), + /* Index Registers, yes the 6502 has other registers by they are only + * accessable by specific opcodes. The 65816 also has access to the stack pointer S. */ + 2 => array( + 'x', 'y', 's' + ), + /* Directives or "pseudo opcodes" as defined by ACME 0.93 file AllPOs.txt. */ + 3 => array( + '!8', '!08', '!by', '!byte', + '!16', '!wo', '!word', + '!24', '!32', + '!fi', '!fill', + '!align', + '!ct', '!convtab', + '!tx', '!text', + '!pet', + '!raw', + '!scrxor', + '!to', + '!source', + '!bin', '!binary', + '!zn', '!zone', + '!sl', + '!svl', + '!sal', + '!if', '!ifdef', + '!for', + '!set', + '!do', 'while', 'until', + '!eof', '!endoffile', + '!warn', '!error', '!serious', + '!macro', +// , '*=' // Not a valid keyword (uses both * and = signs) moved to symbols instead. + '!initmem', + '!pseudopc', + '!cpu', + '!al', '!as', '!rl', '!rs', + ), + + /* 6502/6510 undocumented opcodes (often referred to as illegal instructions). + * These are present in the 6502/6510 but NOT in the newer CMOS revisions of the 65C02 or 65816. + * As they are undocumented instructions there are no "official" names for them, there are also + * several more that mainly perform various forms of crash and are not supported by ACME 0.93. + */ + 4 => array( + 'anc', 'arr', 'asr', 'dcp', 'dop', 'isc', 'jam', 'lax', + 'rla', 'rra', 'sax', 'sbx', 'slo', 'sre', 'top', + ), + /* 65c02 instructions, MOS added a few (much needed) instructions in the CMOS version of the 6502, but stupidly removed the undocumented/illegal opcodes. + * ACME 0.93 does not support the rmb0-7 and smb0-7 instructions (they are currently rem'ed out). */ + 5 => array( + 'bra', 'phx', 'phy', 'plx', 'ply', 'stz', 'trb', 'tsb' + ), + /* 65816 instructions. */ + 6 => array( + 'brl', 'cop', 'jml', 'jsl', 'mvn', 'mvp', 'pea', 'pei', + 'per', 'phb', 'phd', 'phk', 'plb', 'pld', 'rep', 'rtl', + 'sep', 'tcd', 'tcs', 'tdc', 'tsc', 'txy', 'tyx', 'wdm', + 'xba', 'xce', + ), + /* Deprecated directives or "pseudo opcodes" as defined by ACME 0.93 file AllPOs.txt. */ + 7 => array( + '!cbm', + '!sz', '!subzone', + '!realpc', + ), + /* Math functions, some are aliases for the symbols. */ + 8 => array( + 'not', 'div', 'mod', 'xor', 'or', 'sin', 'cos', 'tan', + 'arcsin', 'arccos', 'arctan', 'int', 'float', + + ), + + ), + 'SYMBOLS' => array( +// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. + '*=', '#', '!', '^', '-', '*', '/', + '%', '+', '-', '<<', '>>', '>>>', + '<', '>', '^', '<=', '<', '>=', '>', '!=', + '=', '&', '|', '<>', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00f; font-weight:bold;', + 2 => 'color: #00f; font-weight:bold;', + 3 => 'color: #080; font-weight:bold;', + 4 => 'color: #f00; font-weight:bold;', + 5 => 'color: #80f; font-weight:bold;', + 6 => 'color: #f08; font-weight:bold;', + 7 => 'color: #a04; font-weight:bold; font-style: italic;', + 8 => 'color: #000;', + ), + 'COMMENTS' => array( + 1 => 'color: #999; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000;' + ), + 'STRINGS' => array( + 0 => 'color: #080;' + ), + 'NUMBERS' => array( + GESHI_NUMBER_INT_BASIC => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX => 'color: #f00;', + GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', + GESHI_NUMBER_FLT_NONSCI => 'color: #f00;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + 0 => 'color: #f00;' + , 1 => 'color: #933;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_HEX_PREFIX_DOLLAR | + GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_BIN_PREFIX_PERCENT, + // AMCE Octal format not support and gets picked up as Decimal unfortunately. + 'REGEXPS' => array( + //ACME .# Binary number format. e.g. %..##..##..## + 0 => '\%[\.\#]{1,64}', + //ACME Local Labels + 1 => '\.[_a-zA-Z][_a-zA-Z0-9]*', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'NUMBERS' => array( + 'PRECHECK_RX' => '/[\da-fA-F\.\$\%]/' + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/6502kickass.php b/_piecrust/libs/Geshi/geshi/6502kickass.php new file mode 100644 index 0000000..f4a4bd8 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/6502kickass.php @@ -0,0 +1,241 @@ + 'MOS 6502 (6510) Kick Assembler format', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* 6502/6510 Opcodes including undocumented opcodes as Kick Assembler 3.13 does not make a distinction - they are ALL valid. */ + 1 => array( + 'adc', 'ahx', 'alr', 'anc', 'anc2', 'and', 'arr', 'asl', + 'axs', 'bcc', 'bcs', 'beq', 'bit', 'bmi', 'bne', 'bpl', + 'brk', 'bvc', 'bvs', 'clc', 'cld', 'cli', 'clv', 'cmp', + 'cpx', 'cpy', 'dcp', 'dec', 'dex', 'dey', 'eor', 'inc', + 'inx', 'iny', 'isc', 'jmp', 'jsr', 'las', 'lax', 'lda', + 'ldx', 'ldy', 'lsr', 'nop', 'ora', 'pha', 'php', 'pla', + 'plp', 'rla', 'rol', 'ror', 'rra', 'rti', 'rts', 'sax', + 'sbc', 'sbc2', 'sec', 'sed', 'sei', 'shx', 'shy', 'slo', + 'sre', 'sta', 'stx', 'sty', 'tas', 'tax', 'tay', 'tsx', + 'txa', 'txs', 'tya', 'xaa', + ), + /* DTV additional Opcodes. */ + 2 => array( + 'bra', 'sac', 'sir' + ), + /* Index Registers, yes the 6502 has other registers by they are only + * accessable by specific opcodes. */ + 3 => array( + 'x', 'y' + ), + /* Directives. */ + 4 => array( + '.pc', '.pseudopc', 'virtual', '.align', '.byte', '.word', '.text', '.fill', + '.import source', '.import binary', '.import c64', '.import text', '.import', '.print', '.printnow', + '.error', '.var', '.eval', '.const', '.eval const', '.enum', '.label', '.define', '.struct', + 'if', '.for', '.macro', '.function', '.return', '.pseudocommand', '.namespace', '.filenamespace', + '.assert', '.asserterror', + ), + /* Kick Assembler 3.13 Functions/Operators. */ + 5 => array( + 'size', 'charAt', 'substring', 'asNumber', 'asBoolean', 'toIntString', 'toBinaryString', 'toOctalString', + 'toHexString', 'lock', // String functions/operators. + 'get', 'set', 'add', 'remove', 'shuffle', // List functions. + 'put', 'keys', // Hashtable functions. + 'getType', 'getValue', 'CmdArgument', // Pseudo Commands functions. + 'asmCommandSize', // Opcode Constants functions. + 'LoadBinary', 'getSize', + 'LoadSid', 'getData', + 'LoadPicture', 'width', 'height', 'getPixel', 'getSinglecolorByte', 'getMulticolorByte', + 'createFile', 'writeln', + 'cmdLineVars', + 'getX', 'getY', 'getZ', // Vector functions. + 'RotationMatrix', 'ScaleMatrix', 'MoveMatrix', 'PerspectiveMatrix', // Matrix functions. + + ), + + /* Kick Assembler 3.13 Math Functions. */ + 6 => array( + 'abs', 'acos', 'asin', 'atan', 'atan2', 'cbrt', 'ceil', 'cos', 'cosh', + 'exp', 'expm1', 'floor', 'hypot', 'IEEEremainder', 'log', 'log10', + 'log1p', 'max', 'min', 'pow', 'mod', 'random', 'round', 'signum', + 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'toDegrees', 'toRadians', + ), + + /* Kick Assembler 3.13 Objects/Data Types. */ + 7 => array( + 'List', // List() Object. + 'Hashtable', // Hashtable() Object. + 'Vector', // Vector() Object. + 'Matrix', // Matrix() Object. + ), + + /* Kick Assembler 3.13 Constants. */ + 8 => array( + 'PI', 'E', // Math Constants. + 'AT_ABSOLUTE' , 'AT_ABSOLUTEX' , 'AT_ABSOLUTEY' , 'AT_IMMEDIATE', // Pseudo Commands Constants. + 'AT_INDIRECT' , 'AT_IZEROPAGEX' , 'AT_IZEROPAGEY' , 'AT_NONE', + 'BLACK', 'WHITE', 'RED', 'CYAN', 'PURPLE', 'GREEN', 'BLUE', // Colour Constants. + 'YELLOW', 'ORANGE', 'BROWN', 'LIGHT_RED', 'DARK_GRAY', 'GRAY', + 'LIGHT_GREEN', 'LIGHT_BLUE', 'LIGHT_GRAY', + 'C64FILE', // Template Tag names. + 'BF_C64FILE', 'BF_BITMAP_SINGLECOLOR', 'BF_KOALA' , 'BF_FLI', // Binary format constant + ), + + ), + 'SYMBOLS' => array( +// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. + '-', '+', '-', '*', '/', '>', '<', '<<', '>>', '&', '|', '^', '=', '==', + '!=', '>=', '<=', '!', '&&', '||', '#', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00f; font-weight:bold;', + 2 => 'color: #00f; font-weight:bold;', + 3 => 'color: #00f; font-weight:bold;', + 4 => 'color: #080; font-weight:bold;', + 5 => 'color: #80f; font-weight:bold;', + 6 => 'color: #f08; font-weight:bold;', + 7 => 'color: #a04; font-weight:bold; font-style: italic;', + 8 => 'color: #f08; font-weight:bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #999; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000;' + ), + 'STRINGS' => array( + 0 => 'color: #080;' + ), + 'NUMBERS' => array( + GESHI_NUMBER_INT_BASIC => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', + GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', + GESHI_NUMBER_FLT_NONSCI => 'color: #f00;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + 0 => 'color: #933;', + 1 => 'color: #933;', + 2 => 'color: #933;', + 3 => 'color: #00f; font-weight:bold;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_HEX_PREFIX_DOLLAR | + GESHI_NUMBER_BIN_PREFIX_PERCENT, + // AMCE Octal format not support and gets picked up as Decimal unfortunately. + 'REGEXPS' => array( + //Labels end with a collon. + 0 => '[!]{0,1}[_a-zA-Z][_a-zA-Z0-9]*\:', + //Multi Labels (local labels) references start with ! and end with + or - for forward/backward reference. + 1 => '![_a-zA-Z][_a-zA-Z0-9]*[+-]', + //Macros start with a colon :Macro. + 2 => ':[_a-zA-Z][_a-zA-Z0-9]*', + // Opcode Constants, such as LDA_IMM, STA_IZPY are basically all 6502 opcodes + // in UPPER case followed by _underscore_ and the ADDRESS MODE. + // As you might imagine that is rather a lot ( 78 supported Opcodes * 12 Addressing modes = 936 variations) + // So I thought it better and easier to maintain as a regular expression. + // NOTE: The order of the Address Modes must be maintained or it wont work properly (eg. place ZP first and find out!) + 3 => '[A-Z]{3}[2]?_(?:IMM|IND|IZPX|IZPY|ZPX|ZPY|ABSX|ABSY|REL|ABS|ZP)', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'NUMBERS' => array( + 'PRECHECK_RX' => '/[\da-fA-F\.\$\%]/' + ), + 'KEYWORDS' => array( + 5 => array ( + 'DISALLOWED_BEFORE' => "(?|^&'\"])" + ), + 6 => array ( + 'DISALLOWED_BEFORE' => "(?|^&'\"])" + ), + 8 => array ( + 'DISALLOWED_BEFORE' => "(?|^&'\"])" + ) + ) + ), +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/6502tasm.php b/_piecrust/libs/Geshi/geshi/6502tasm.php new file mode 100644 index 0000000..391e017 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/6502tasm.php @@ -0,0 +1,189 @@ + 'MOS 6502 (6510) TASM/64TASS 1.46 Assembler format', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* 6502/6510 Opcodes. */ + 1 => array( + 'adc', 'and', 'asl', 'bcc', 'bcs', 'beq', 'bit', 'bmi', + 'bne', 'bpl', 'brk', 'bvc', 'bvs', 'clc', 'cld', 'cli', + 'clv', 'cmp', 'cpx', 'cpy', 'dec', 'dex', 'dey', 'eor', + 'inc', 'inx', 'iny', 'jmp', 'jsr', 'lda', 'ldx', 'ldy', + 'lsr', 'nop', 'ora', 'pha', 'php', 'pla', 'plp', 'rol', + 'ror', 'rti', 'rts', 'sbc', 'sec', 'sed', 'sei', 'sta', + 'stx', 'sty', 'tax', 'tay', 'tsx', 'txa', 'txs', 'tya', + ), + /* Index Registers, yes the 6502 has other registers by they are only + * accessable by specific opcodes. The 65816 also has access to the stack pointer S. */ + 2 => array( + 'x', 'y', 's' + ), + /* Directives. */ + 3 => array( + '.al', '.align', '.as', '.assert', '.binary', '.byte', '.cerror', '.char', + '.comment', '.cpu', '.cwarn', '.databank', '.dpage', '.else', '.elsif', + '.enc', '.endc', '.endif', '.endm', '.endp', '.error', '.fi', '.fill', + '.for', '.here', '.if', '.ifeq', '.ifmi', '.ifne', '.ifpl', + '.include', '.int', '.logical', '.long', '.macro', '.next', '.null', '.offs', + '.page', '.pend', '.proc', '.rept', '.rta', '.shift', '.text', '.warn', '.word', + '.xl', '.xs', +// , '*=' // Not a valid keyword (uses both * and = signs) moved to symbols instead. + ), + + /* 6502/6510 undocumented opcodes (often referred to as illegal instructions). + * These are present in the 6502/6510 but NOT in the newer CMOS revisions of the 65C02 or 65816. + * As they are undocumented instructions there are no "official" names for them, these are the names + * used by 64TASS V1.46. + */ + 4 => array( + 'ahx', 'alr', 'anc', 'ane', 'arr', 'asr', 'axs', 'dcm', + 'dcp', 'ins', 'isb', 'isc', 'jam', 'lae', 'las', 'lax', + 'lds', 'lxa', 'rla', 'rra', 'sax', 'sbx', 'sha', 'shs', + 'shx', 'shy', 'slo', 'sre', 'tas', 'xaa', + ), + /* 65c02 instructions, MOS added a few (much needed) instructions in the + * CMOS version of the 6502, but stupidly removed the undocumented/illegal opcodes. */ + 5 => array( + 'bra', 'dea', 'gra', 'ina', 'phx', 'phy', 'plx', 'ply', + 'stz', 'trb', 'tsb', + ), + /* 65816 instructions. */ + 6 => array( + 'brl', 'cop', 'jml', 'jsl', 'mvn', 'mvp', 'pea', 'pei', + 'per', 'phb', 'phd', 'phk', 'plb', 'pld', 'rep', 'rtl', + 'sep', 'stp', 'swa', 'tad', 'tcd', 'tcs', 'tda', + 'tdc', 'tsa', 'tsc', 'txy', 'tyx', 'wai', 'xba', 'xce', + ), + /* Deprecated directives (or yet to be implemented). */ + 7 => array( + '.global', '.check' + ), + ), + 'SYMBOLS' => array( +// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. + '*=', '#', '<', '>', '`', '=', '<', '>', + '!=', '>=', '<=', '+', '-', '*', '/', '//', '|', + '^', '&', '<<', '>>', '-', '~', '!', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00f; font-weight:bold;', + 2 => 'color: #00f; font-weight:bold;', + 3 => 'color: #080; font-weight:bold;', + 4 => 'color: #f00; font-weight:bold;', + 5 => 'color: #80f; font-weight:bold;', + 6 => 'color: #f08; font-weight:bold;', + 7 => 'color: #a04; font-weight:bold; font-style: italic;', + ), + 'COMMENTS' => array( + 1 => 'color: #999; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000;' + ), + 'STRINGS' => array( + 0 => 'color: #080;' + ), + 'NUMBERS' => array( + GESHI_NUMBER_INT_BASIC => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', + GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_HEX_PREFIX_DOLLAR | + GESHI_NUMBER_BIN_PREFIX_PERCENT, + // AMCE Octal format not support and gets picked up as Decimal unfortunately. + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'NUMBERS' => array( + 'PRECHECK_RX' => '/[\da-fA-F\.\$\%]/' + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/68000devpac.php b/_piecrust/libs/Geshi/geshi/68000devpac.php new file mode 100644 index 0000000..d0f3a50 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/68000devpac.php @@ -0,0 +1,168 @@ + 'Motorola 68000 - HiSoft Devpac ST 2 Assembler format', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* Directives. */ + 1 => array( + 'end', 'include', 'incbin', 'opt', 'even', 'cnop', 'dc.b', 'dc.w', + 'dc.l', 'ds.b', 'ds.w', 'ds.l', 'dcb.b', 'dcb.w', 'dcb.l', + 'fail', 'output', '__g2', 'rept', 'endr', 'list', 'nolist', 'plen', + 'llen', 'ttl', 'subttl', 'spc', 'page', 'listchar', 'format', + 'equ', 'equr', 'set', 'reg', 'rs.b', 'rs.w', 'rs.l', 'rsreset', + 'rsset', '__rs', 'ifeq', 'ifne', 'ifgt', 'ifge', 'iflt', 'ifle', 'endc', + 'ifd', 'ifnd', 'ifc', 'ifnc', 'elseif', 'iif', 'macro', 'endm', 'mexit', + 'narg', '\@', 'section', 'text', 'data', 'bss', 'xdef', 'xref', 'org', + 'offset', '__lk', 'comment', + ), + /* 68000 Opcodes. */ + 2 => array( + 'abcd', 'add', 'adda', 'addi', 'addq', 'addx', 'and', 'andi', + 'asl', 'asr', 'bcc', 'bchg', 'bclr', 'bcs', 'beq', 'bge', + 'bgt', 'bhi', 'ble', 'bls', 'blt', 'bmi', 'bne', 'bpl', + 'bra', 'bset', 'bsr', 'btst', 'bvc', 'bvs', 'chk', 'clr', + 'cmp', 'cmpa', 'cmpi', 'cmpm', 'dbcc', 'dbcs', 'dbeq', 'dbf', + 'dbge', 'dbgt', 'dbhi', 'dble', 'dbls', 'dblt', 'dbmi', 'dbne', + 'dbpl', 'dbra', 'dbt', 'dbvc', 'dbvs', 'divs', 'divu', 'eor', + 'eori', 'exg', 'ext','illegal','jmp', 'jsr', 'lea', 'link', + 'lsl', 'lsr', 'move','movea','movem','movep','moveq', 'muls', + 'mulu', 'nbcd', 'neg', 'negx', 'nop', 'not', 'or', 'ori', + 'pea', 'reset', 'rol', 'ror', 'roxl', 'roxr', 'rte', 'rtr', + 'rts', 'sbcd', 'scc', 'scs', 'seq', 'sf', 'sge', 'sgt', + 'shi', 'sle', 'sls', 'slt', 'smi', 'sne', 'spl', 'st', + 'stop', 'sub', 'suba', 'subi', 'subq', 'subx', 'svc', 'svs', + 'swap', 'tas', 'trap','trapv', 'tst', 'unlk', + ), + /* oprand sizes. */ + 3 => array( + 'b', 'w', 'l' , 's' + ), + /* 68000 Registers. */ + 4 => array( + 'd0', 'd1', 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', + 'a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'sp', 'usp', 'ssp', + 'pc', 'ccr', 'sr', + ), + ), + 'SYMBOLS' => array( +// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. + '+', '-', '~', '<<', '>>', '&', + '!', '^', '*', '/', '=', '<', '>', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #f08; font-weight:bold;', + 2 => 'color: #00f; font-weight:bold;', + 3 => 'color: #00f; font-weight:bold;', + 4 => 'color: #080; font-weight:bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #999; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000;' + ), + 'STRINGS' => array( + 0 => 'color: #080;' + ), + 'NUMBERS' => array( + GESHI_NUMBER_INT_BASIC => 'color: #f00;', + GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', + GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', + GESHI_NUMBER_OCT_PREFIX_AT => 'color: #f00;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + 0 => 'color: #933;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_HEX_PREFIX_DOLLAR | + GESHI_NUMBER_OCT_PREFIX_AT | + GESHI_NUMBER_BIN_PREFIX_PERCENT, + 'REGEXPS' => array( + //Labels may end in a colon. + 0 => '(?<=\A\x20|\r|\n|^)[\._a-zA-Z][\._a-zA-Z0-9]*[\:]?[\s]' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'NUMBERS' => array( + 'PRECHECK_RX' => '/[\da-fA-F\.\$\%\@]/' + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/abap.php b/_piecrust/libs/Geshi/geshi/abap.php new file mode 100644 index 0000000..8b510df --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/abap.php @@ -0,0 +1,1409 @@ +.htm + * + * CHANGES + * ------- + * 2009/02/25 (1.0.8.3) + * - Some more rework of the language file + * 2009/01/04 (1.0.8.2) + * - Major Release, more than 1000 statements and keywords added = whole abap 7.1 (Sandra Rossi) + * 2007/06/27 (1.0.0) + * - First Release + * + * TODO + * ---- + * - in DATA data TYPE type, 2nd "data" and 2nd "type" are highlighted with data + * style, but should be ignored. Same problem for all words!!! This is quite impossible to + * solve it as we should define syntaxes of all statements (huge effort!) and use a lex + * or something like that instead of regexp I guess. + * - Some words are considered as being statement names (report, tables, etc.) though they + * are used as keyword in some statements. For example: FORM xxxx TABLES itab. It was + * arbitrary decided to define them as statement instead of keyword, because it may be + * useful to have the URL to SAP help for some of them. + * - if a comment is between 2 words of a keyword (for example SEPARATED "comment \n BY), + * it is not considered as a keyword, but it should! + * - for statements like "READ DATASET", GeSHi does not allow to set URLs because these + * statements are determined by REGEXPS. For "READ DATASET", the URL should be + * ABAPREAD_DATASET.htm. If a technical solution is found, be careful : URLs + * are sometimes not valid because the URL does not exist. For example, for "AT NEW" + * statement, the URL should be ABAPAT_ITAB.htm (not ABAPAT_NEW.htm). + * There are many other exceptions. + * Note: for adding this functionality within your php program, you can execute this code: + * function add_urls_to_multi_tokens( $matches ) { + * $url = preg_replace( "/[ \n]+/" , "_" , $matches[3] ); + * if( $url == $matches[3] ) return $matches[0] ; + * else return $matches[1]."".$matches[3]."".$matches[4]; + * } + * $html = $geshi->parse_code(); + * $html = preg_replace_callback( "£(zzz:(control|statement|data);\">)(.+?)()£s", "add_urls_to_multi_tokens", $html ); + * echo $html; + * - Numbers followed by a dot terminating the statement are not properly recognized + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array( + 'LANG_NAME' => 'ABAP', + 'COMMENT_SINGLE' => array( + 1 => '"' + ), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + // lines beginning with star at 1st position are comments + // (star anywhere else is not a comment, especially be careful with + // "assign dref->* to " statement) + 2 => '/^\*.*?$/m' + ), + 'CASE_KEYWORDS' => 0, + 'QUOTEMARKS' => array( + 1 => "'", + 2 => "`" + ), + 'ESCAPE_CHAR' => '', + + 'KEYWORDS' => array( + //*********************************************** + // Section 2 : process sequences of several tokens + //*********************************************** + + 7 => array( + 'at new', + 'at end of', + 'at first', + 'at last', + 'loop at', + 'loop at screen', + ), + + 8 => array( + 'private section', + 'protected section', + 'public section', + 'at line-selection', + 'at selection-screen', + 'at user-command', + 'assign component', + 'assign table field', + 'call badi', + 'call customer-function', + 'call customer subscreen', + 'call dialog', + 'call function', + 'call method', + 'call screen', + 'call selection-screen', + 'call transaction', + 'call transformation', + 'close cursor', + 'close dataset', + 'commit work', + 'convert date', + 'convert text', + 'convert time stamp', + 'create data', + 'create object', + 'delete dataset', + 'delete from', + 'describe distance', + 'describe field', + 'describe list', + 'describe table', + 'exec sql', + 'exit from sql', + 'exit from step-loop', + 'export dynpro', + 'export nametab', + 'free memory', + 'generate subroutine-pool', + 'get badi', + 'get bit', + 'get cursor', + 'get dataset', + 'get locale', + 'get parameter', + 'get pf-status', + 'get property', + 'get reference', + 'get run time', + 'get time', + 'get time stamp', + 'import directory', + 'insert report', + 'insert text-pool', + 'leave list-processing', + 'leave program', + 'leave screen', + 'leave to list-processing', + 'leave to transaction', + 'modify line', + 'modify screen', + 'move percentage', + 'open cursor', + 'open dataset', + 'raise event', + 'raise exception', + 'read dataset', + 'read line', + 'read report', + 'read table', + 'read textpool', + 'receive results from function', + 'refresh control', + 'rollback work', + 'set bit', + 'set blank lines', + 'set country', + 'set cursor', + 'set dataset', + 'set extended check', + 'set handler', + 'set hold data', + 'set language', + 'set left scroll-boundary', + 'set locale', + 'set margin', + 'set parameter', + 'set pf-status', + 'set property', + 'set run time analyzer', + 'set run time clock', + 'set screen', + 'set titlebar', + 'set update task', + 'set user-command', + 'suppress dialog', + 'truncate dataset', + 'wait until', + 'wait up to', + ), + + 9 => array( + 'accepting duplicate keys', + 'accepting padding', + 'accepting truncation', + 'according to', + 'actual length', + 'adjacent duplicates', + 'after input', + 'all blob columns', + 'all clob columns', + 'all fields', + 'all methods', + 'all other columns', + 'and mark', + 'and return to screen', + 'and return', + 'and skip first screen', + 'and wait', + 'any table', + 'appendage type', + 'archive mode', + 'archiving parameters', + 'area handle', + 'as checkbox', + 'as icon', + 'as line', + 'as listbox', + 'as person table', + 'as search patterns', + 'as separate unit', + 'as subscreen', + 'as symbol', + 'as text', + 'as window', + 'at cursor-selection', + 'at exit-command', + 'at next application statement', + 'at position', + + 'backup into', + 'before output', + 'before unwind', + 'begin of block', + 'begin of common part', + 'begin of line', + 'begin of screen', + 'begin of tabbed block', + 'begin of version', + 'begin of', + 'big endian', + 'binary mode', + 'binary search', + 'by kernel module', + 'bypassing buffer', + + 'client specified', + 'code page', + 'code page hint', + 'code page into', + 'color black', + 'color blue', + 'color green', + 'color pink', + 'color red', + 'color yellow', + 'compression off', + 'compression on', + 'connect to', + 'corresponding fields of table', + 'corresponding fields of', + 'cover page', + 'cover text', + 'create package', + 'create private', + 'create protected', + 'create public', + 'current position', + + 'data buffer', + 'data values', + 'dataset expiration', + 'daylight saving time', + 'default key', + 'default program', + 'default screen', + 'defining database', + 'deleting leading', + 'deleting trailing', + 'directory entry', + 'display like', + 'display offset', + 'during line-selection', + 'dynamic selections', + + 'edit mask', + 'end of block', + 'end of common part', + 'end of file', + 'end of line', + 'end of screen', + 'end of tabbed block', + 'end of version', + 'end of', + 'endian into', + 'ending at', + 'enhancement options into', + 'enhancement into', + 'environment time format', + 'execute procedure', + 'exporting list to memory', + 'extension type', + + 'field format', + 'field selection', + 'field value into', + 'final methods', + 'first occurrence of', + 'fixed-point arithmetic', + 'for all entries', + 'for all instances', + 'for appending', + 'for columns', + 'for event of', + 'for field', + 'for high', + 'for input', + 'for lines', + 'for low', + 'for node', + 'for output', + 'for select', + 'for table', + 'for testing', + 'for update', + 'for user', + 'frame entry', + 'frame program from', + 'from code page', + 'from context', + 'from database', + 'from logfile id', + 'from number format', + 'from screen', + 'from table', + 'function key', + + 'get connection', + 'global friends', + 'group by', + + 'hashed table of', + 'hashed table', + + 'if found', + 'ignoring case', + 'ignoring conversion errors', + 'ignoring structure boundaries', + 'implementations from', + 'in background', + 'in background task', + 'in background unit', + 'in binary mode', + 'in byte mode', + 'in char-to-hex mode', + 'in character mode', + 'in group', + 'in legacy binary mode', + 'in legacy text mode', + 'in program', + 'in remote task', + 'in text mode', + 'in table', + 'in update task', + 'include bound', + 'include into', + 'include program from', + 'include structure', + 'include type', + 'including gaps', + 'index table', + 'inheriting from', + 'init destination', + 'initial line of', + 'initial line', + 'initial size', + 'internal table', + 'into sortable code', + + 'keep in spool', + 'keeping directory entry', + 'keeping logical unit of work', + 'keeping task', + 'keywords from', + + 'left margin', + 'left outer', + 'levels into', + 'line format', + 'line into', + 'line of', + 'line page', + 'line value from', + 'line value into', + 'lines of', + 'list authority', + 'list dataset', + 'list name', + 'little endian', + 'lob handle for', + 'local friends', + 'locator for', + 'lower case', + + 'main table field', + 'match count', + 'match length', + 'match line', + 'match offset', + 'matchcode object', + 'maximum length', + 'maximum width into', + 'memory id', + 'message into', + 'messages into', + 'modif id', + + 'nesting level', + 'new list identification', + 'next cursor', + 'no database selection', + 'no dialog', + 'no end of line', + 'no fields', + 'no flush', + 'no intervals', + 'no intervals off', + 'no standard page heading', + 'no-extension off', + 'non-unique key', + 'non-unique sorted key', + 'not at end of mode', + 'number of lines', + 'number of pages', + + 'object key', + 'obligatory off', + 'of current page', + 'of page', + 'of program', + 'offset into', + 'on block', + 'on commit', + 'on end of task', + 'on end of', + 'on exit-command', + 'on help-request for', + 'on radiobutton group', + 'on rollback', + 'on value-request for', + 'open for package', + 'option class-coding', + 'option class', + 'option coding', + 'option expand', + 'option syncpoints', + 'options from', + 'order by', + 'overflow into', + + 'package section', + 'package size', + 'preferred parameter', + 'preserving identifier escaping', + 'primary key', + 'print off', + 'print on', + 'program from', + 'program type', + + 'radiobutton groups', + 'radiobutton group', + 'range of', + 'reader for', + 'receive buffer', + 'reduced functionality', + 'ref to data', + 'ref to object', + 'ref to', + + 'reference into', + 'renaming with suffix', + 'replacement character', + 'replacement count', + 'replacement length', + 'replacement line', + 'replacement offset', + 'respecting blanks', + 'respecting case', + 'result into', + 'risk level', + + 'sap cover page', + 'search fkeq', + 'search fkge', + 'search gkeq', + 'search gkge', + 'section of', + 'send buffer', + 'separated by', + 'shared buffer', + 'shared memory', + 'shared memory enabled', + 'skipping byte-order mark', + 'sorted by', + 'sorted table of', + 'sorted table', + 'spool parameters', + 'standard table of', + 'standard table', + 'starting at', + 'starting new task', + 'statements into', + 'structure default', + 'structures into', + + 'table field', + 'table of', + 'text mode', + 'time stamp', + 'time zone', + 'to code page', + 'to column', + 'to context', + 'to first page', + 'to last page', + 'to last line', + 'to line', + 'to lower case', + 'to number format', + 'to page', + 'to sap spool', + 'to upper case', + 'tokens into', + 'transporting no fields', + 'type tableview', + 'type tabstrip', + + 'unicode enabling', + 'up to', + 'upper case', + 'using edit mask', + 'using key', + 'using no edit mask', + 'using screen', + 'using selection-screen', + 'using selection-set', + 'using selection-sets of program', + + 'valid between', + 'valid from', + 'value check', + 'via job', + 'via selection-screen', + 'visible length', + + 'whenever found', + 'with analysis', + 'with byte-order mark', + 'with comments', + 'with current switchstates', + 'with explicit enhancements', + 'with frame', + 'with free selections', + 'with further secondary keys', + 'with header line', + 'with hold', + 'with implicit enhancements', + 'with inactive enhancements', + 'with includes', + 'with key', + 'with linefeed', + 'with list tokenization', + 'with native linefeed', + 'with non-unique key', + 'with null', + 'with pragmas', + 'with precompiled headers', + 'with selection-table', + 'with smart linefeed', + 'with table key', + 'with test code', + 'with type-pools', + 'with unique key', + 'with unix linefeed', + 'with windows linefeed', + 'without further secondary keys', + 'without selection-screen', + 'without spool dynpro', + 'without trmac', + 'word into', + 'writer for' + ), + + //********************************************************** + // Other abap statements + //********************************************************** + 3 => array( + 'add', + 'add-corresponding', + 'aliases', + 'append', + 'assign', + 'at', + 'authority-check', + + 'break-point', + + 'clear', + 'collect', + 'compute', + 'concatenate', + 'condense', + 'class', + 'class-events', + 'class-methods', + 'class-pool', + + 'define', + 'delete', + 'demand', + 'detail', + 'divide', + 'divide-corresponding', + + 'editor-call', + 'end-of-file', + 'end-enhancement-section', + 'end-of-definition', + 'end-of-page', + 'end-of-selection', + 'endclass', + 'endenhancement', + 'endexec', + 'endform', + 'endfunction', + 'endinterface', + 'endmethod', + 'endmodule', + 'endon', + 'endprovide', + 'endselect', + 'enhancement', + 'enhancement-point', + 'enhancement-section', + 'export', + 'extract', + 'events', + + 'fetch', + 'field-groups', + 'find', + 'format', + 'form', + 'free', + 'function-pool', + 'function', + + 'get', + + 'hide', + + 'import', + 'infotypes', + 'input', + 'insert', + 'include', + 'initialization', + 'interface', + 'interface-pool', + 'interfaces', + + 'leave', + 'load-of-program', + 'log-point', + + 'maximum', + 'message', + 'methods', + 'method', + 'minimum', + 'modify', + 'move', + 'move-corresponding', + 'multiply', + 'multiply-corresponding', + + 'new-line', + 'new-page', + 'new-section', + + 'overlay', + + 'pack', + 'perform', + 'position', + 'print-control', + 'program', + 'provide', + 'put', + + 'raise', + 'refresh', + 'reject', + 'replace', + 'report', + 'reserve', + + 'scroll', + 'search', + 'select', + 'selection-screen', + 'shift', + 'skip', + 'sort', + 'split', + 'start-of-selection', + 'submit', + 'subtract', + 'subtract-corresponding', + 'sum', + 'summary', + 'summing', + 'supply', + 'syntax-check', + + 'top-of-page', + 'transfer', + 'translate', + 'type-pool', + + 'uline', + 'unpack', + 'update', + + 'window', + 'write' + + ), + + //********************************************************** + // keywords + //********************************************************** + + 4 => array( + 'abbreviated', + 'abstract', + 'accept', + 'acos', + 'activation', + 'alias', + 'align', + 'all', + 'allocate', + 'and', + 'assigned', + 'any', + 'appending', + 'area', + 'as', + 'ascending', + 'asin', + 'assigning', + 'atan', + 'attributes', + 'avg', + + 'backward', + 'between', + 'bit-and', + 'bit-not', + 'bit-or', + 'bit-set', + 'bit-xor', + 'boolc', + 'boolx', + 'bound', + 'bt', + 'blocks', + 'bounds', + 'boxed', + 'by', + 'byte-ca', + 'byte-cn', + 'byte-co', + 'byte-cs', + 'byte-na', + 'byte-ns', + + 'ca', + 'calling', + 'casting', + 'ceil', + 'center', + 'centered', + 'changing', + 'char_off', + 'charlen', + 'circular', + 'class_constructor', + 'client', + 'clike', + 'close', + 'cmax', + 'cmin', + 'cn', + 'cnt', + 'co', + 'col_background', + 'col_group', + 'col_heading', + 'col_key', + 'col_negative', + 'col_normal', + 'col_positive', + 'col_total', + 'color', + 'column', + 'comment', + 'comparing', + 'components', + 'condition', + 'context', + 'copies', + 'count', + 'country', + 'cpi', + 'creating', + 'critical', + 'concat_lines_of', + 'cos', + 'cosh', + 'count_any_not_of', + 'count_any_of', + 'cp', + 'cs', + 'csequence', + 'currency', + 'current', + 'cx_static_check', + 'cx_root', + 'cx_dynamic_check', + + 'dangerous', + 'database', + 'datainfo', + 'date', + 'dbmaxlen', + 'dd/mm/yy', + 'dd/mm/yyyy', + 'ddmmyy', + 'deallocate', + 'decfloat', + 'decfloat16', + 'decfloat34', + 'decimals', + 'default', + 'deferred', + 'definition', + 'department', + 'descending', + 'destination', + 'disconnect', + 'display-mode', + 'distance', + 'distinct', + 'div', + 'dummy', + + 'encoding', + 'end-lines', + 'engineering', + 'environment', + 'eq', + 'equiv', + 'error_message', + 'errormessage', + 'escape', + 'exact', + 'exception-table', + 'exceptions', + 'exclude', + 'excluding', + 'exists', + 'exp', + 'exponent', + 'exporting', + 'extended_monetary', + + 'field', + 'filter-table', + 'filters', + 'filter', + 'final', + 'find_any_not_of', + 'find_any_of', + 'find_end', + 'floor', + 'first-line', + 'font', + 'forward', + 'for', + 'frac', + 'from_mixed', + 'friends', + 'from', + + 'giving', + 'ge', + 'gt', + + 'handle', + 'harmless', + 'having', + 'head-lines', + 'help-id', + 'help-request', + 'high', + 'hold', + 'hotspot', + + 'id', + 'ids', + 'immediately', + 'implementation', + 'importing', + 'in', + 'initial', + 'incl', + 'including', + 'increment', + 'index', + 'index-line', + 'inner', + 'inout', + 'intensified', + 'into', + 'inverse', + 'is', + 'iso', + + 'join', + + 'key', + 'kind', + + 'log10', + 'language', + 'late', + 'layout', + 'le', + 'lt', + 'left-justified', + 'leftplus', + 'leftspace', + 'left', + 'length', + 'level', + 'like', + 'line-count', + 'line-size', + 'lines', + 'line', + 'load', + 'long', + 'lower', + 'low', + 'lpi', + + 'matches', + 'match', + 'mail', + 'major-id', + 'max', + 'medium', + 'memory', + 'message-id', + 'module', + 'minor-id', + 'min', + 'mm/dd/yyyy', + 'mm/dd/yy', + 'mmddyy', + 'mode', + 'modifier', + 'mod', + 'monetary', + + 'name', + 'nb', + 'ne', + 'next', + 'no-display', + 'no-extension', + 'no-gap', + 'no-gaps', + 'no-grouping', + 'no-heading', + 'no-scrolling', + 'no-sign', + 'no-title', + 'no-topofpage', + 'no-zero', + 'nodes', + 'non-unicode', + 'no', + 'number', + 'nmax', + 'nmin', + 'not', + 'null', + 'numeric', + 'numofchar', + + 'o', + 'objects', + 'obligatory', + 'occurs', + 'offset', + 'off', + 'of', + 'only', + 'open', + 'option', + 'optional', + 'options', + 'output-length', + 'output', + 'out', + 'on change of', + 'or', + 'others', + + 'pad', + 'page', + 'pages', + 'parameter-table', + 'part', + 'performing', + 'pos_high', + 'pos_low', + 'priority', + 'public', + 'pushbutton', + + 'queue-only', + 'quickinfo', + + 'raising', + 'range', + 'read-only', + 'received', + 'receiver', + 'receiving', + 'redefinition', + 'reference', + 'regex', + 'replacing', + 'reset', + 'responsible', + 'result', + 'results', + 'resumable', + 'returncode', + 'returning', + 'right', + 'right-specified', + 'rightplus', + 'rightspace', + 'round', + 'rows', + 'repeat', + 'requested', + 'rescale', + 'reverse', + + 'scale_preserving', + 'scale_preserving_scientific', + 'scientific', + 'scientific_with_leading_zero', + 'screen', + 'scrolling', + 'seconds', + 'segment', + 'shift_left', + 'shift_right', + 'sign', + 'simple', + 'sin', + 'sinh', + 'short', + 'shortdump-id', + 'sign_as_postfix', + 'single', + 'size', + 'some', + 'source', + 'space', + 'spots', + 'stable', + 'state', + 'static', + 'statusinfo', + 'sqrt', + 'string', + 'strlen', + 'structure', + 'style', + 'subkey', + 'submatches', + 'substring', + 'substring_after', + 'substring_before', + 'substring_from', + 'substring_to', + 'super', + 'supplied', + 'switch', + + 'tan', + 'tanh', + 'table_line', + 'table', + 'tab', + 'then', + 'timestamp', + 'times', + 'time', + 'timezone', + 'title-lines', + 'title', + 'top-lines', + 'to', + 'to_lower', + 'to_mixed', + 'to_upper', + 'trace-file', + 'trace-table', + 'transporting', + 'trunc', + 'type', + + 'under', + 'unique', + 'unit', + 'user-command', + 'using', + 'utf-8', + + 'valid', + 'value', + 'value-request', + 'values', + 'vary', + 'varying', + 'version', + + 'warning', + 'where', + 'width', + 'with', + 'word', + 'with-heading', + 'with-title', + + 'xsequence', + 'xstring', + 'xstrlen', + + 'yes', + 'yymmdd', + + 'z', + 'zero' + + ), + + //********************************************************** + // screen statements + //********************************************************** + + 5 => array( + 'call subscreen', + 'chain', + 'endchain', + 'on chain-input', + 'on chain-request', + 'on help-request', + 'on input', + 'on request', + 'on value-request', + 'process' + ), + + //********************************************************** + // internal statements + //********************************************************** + + 6 => array( + 'generate dynpro', + 'generate report', + 'import dynpro', + 'import nametab', + 'include methods', + 'load report', + 'scan abap-source', + 'scan and check abap-source', + 'syntax-check for dynpro', + 'syntax-check for program', + 'syntax-trace', + 'system-call', + 'system-exit', + 'verification-message' + ), + + //********************************************************** + // Control statements + //********************************************************** + + 1 => array( + 'assert', + 'case', + 'catch', + 'check', + 'cleanup', + 'continue', + 'do', + 'else', + 'elseif', + 'endat', + 'endcase', + 'endcatch', + 'endif', + 'enddo', + 'endloop', + 'endtry', + 'endwhile', + 'exit', + 'if', + 'loop', + 'resume', + 'retry', + 'return', + 'stop', + 'try', + 'when', + 'while' + + ), + + //********************************************************** + // variable declaration statements + //********************************************************** + + 2 => array( + 'class-data', + 'controls', + 'constants', + 'data', + 'field-symbols', + 'fields', + 'local', + 'parameters', + 'ranges', + 'select-options', + 'statics', + 'tables', + 'type-pools', + 'types' + ) + ), + 'SYMBOLS' => array( + 0 => array( + '->*', '->', '=>', + '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '!', '%', '^', '&', ':', ',', '.' + ), + 1 => array( + '>=', '<=', '<', '>', '=' + ), + 2 => array( + '?=' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false, + 9 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000066; text-transform: uppercase; font-weight: bold; zzz:control;', //control statements + 2 => 'color: #cc4050; text-transform: uppercase; font-weight: bold; zzz:data;', //data statements + 3 => 'color: #005066; text-transform: uppercase; font-weight: bold; zzz:statement;', //first token of other statements + 4 => 'color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;', // next tokens of other statements ("keywords") + 5 => 'color: #005066; text-transform: uppercase; font-weight: bold; zzz:statement;', + 6 => 'color: #000066; text-transform: uppercase; font-weight: bold; zzz:control;', + 7 => 'color: #000066; text-transform: uppercase; font-weight: bold; zzz:control;', + 8 => 'color: #005066; text-transform: uppercase; font-weight: bold; zzz:statement;', + 9 => 'color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #339933;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #808080;' + ), + 'STRINGS' => array( + 0 => 'color: #4da619;' + ), + 'NUMBERS' => array( + 0 => 'color: #3399ff;' + ), + 'METHODS' => array( + 1 => 'color: #202020;', + 2 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #808080;', + 1 => 'color: #800080;', + 2 => 'color: #0000ff;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => 'http://help.sap.com/abapdocu/en/ABAP{FNAMEU}.htm', + 2 => 'http://help.sap.com/abapdocu/en/ABAP{FNAMEU}.htm', + 3 => 'http://help.sap.com/abapdocu/en/ABAP{FNAMEU}.htm', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + 9 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '->', + 2 => '=>' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 7 => array( + 'SPACE_AS_WHITESPACE' => true + ), + 8 => array( + 'SPACE_AS_WHITESPACE' => true + ), + 9 => array( + 'SPACE_AS_WHITESPACE' => true + ) + ) + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/actionscript.php b/_piecrust/libs/Geshi/geshi/actionscript.php new file mode 100644 index 0000000..276cf4f --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/actionscript.php @@ -0,0 +1,197 @@ + 'ActionScript', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + '#include', 'for', 'foreach', 'each', 'if', 'elseif', 'else', 'while', 'do', 'dowhile', + 'endwhile', 'endif', 'switch', 'case', 'endswitch', 'return', 'break', 'continue', 'in' + ), + 2 => array( + 'null', 'false', 'true', 'var', + 'default', 'function', 'class', + 'new', '_global' + ), + 3 => array( + '#endinitclip', '#initclip', '__proto__', '_accProps', '_alpha', '_currentframe', + '_droptarget', '_focusrect', '_framesloaded', '_height', '_highquality', '_lockroot', + '_name', '_parent', '_quality', '_root', '_rotation', '_soundbuftime', '_target', '_totalframes', + '_url', '_visible', '_width', '_x', '_xmouse', '_xscale', '_y', '_ymouse', '_yscale', 'abs', + 'Accessibility', 'acos', 'activityLevel', 'add', 'addListener', 'addPage', 'addProperty', + 'addRequestHeader', 'align', 'allowDomain', 'allowInsecureDomain', 'and', 'appendChild', + 'apply', 'Arguments', 'Array', 'asfunction', 'asin', 'atan', 'atan2', 'attachAudio', 'attachMovie', + 'attachSound', 'attachVideo', 'attributes', 'autosize', 'avHardwareDisable', 'background', + 'backgroundColor', 'BACKSPACE', 'bandwidth', 'beginFill', 'beginGradientFill', 'blockIndent', + 'bold', 'Boolean', 'border', 'borderColor', 'bottomScroll', 'bufferLength', 'bufferTime', + 'builtInItems', 'bullet', 'Button', 'bytesLoaded', 'bytesTotal', 'call', 'callee', 'caller', + 'Camera', 'capabilities', 'CAPSLOCK', 'caption', 'catch', 'ceil', 'charAt', 'charCodeAt', + 'childNodes', 'chr', 'clear', 'clearInterval', 'cloneNode', 'close', 'Color', 'concat', + 'connect', 'condenseWhite', 'constructor', 'contentType', 'ContextMenu', 'ContextMenuItem', + 'CONTROL', 'copy', 'cos', 'createElement', 'createEmptyMovieClip', 'createTextField', + 'createTextNode', 'currentFps', 'curveTo', 'CustomActions', 'customItems', 'data', 'Date', + 'deblocking', 'delete', 'DELETEKEY', 'docTypeDecl', 'domain', 'DOWN', + 'duplicateMovieClip', 'duration', 'dynamic', 'E', 'embedFonts', 'enabled', + 'END', 'endFill', 'ENTER', 'eq', 'Error', 'ESCAPE(Konstante)', 'escape(Funktion)', 'eval', + 'exactSettings', 'exp', 'extends', 'finally', 'findText', 'firstChild', 'floor', + 'flush', 'focusEnabled', 'font', 'fps', 'fromCharCode', 'fscommand', + 'gain', 'ge', 'get', 'getAscii', 'getBeginIndex', 'getBounds', 'getBytesLoaded', 'getBytesTotal', + 'getCaretIndex', 'getCode', 'getCount', 'getDate', 'getDay', 'getDepth', 'getEndIndex', 'getFocus', + 'getFontList', 'getFullYear', 'getHours', 'getInstanceAtDepth', 'getLocal', 'getMilliseconds', + 'getMinutes', 'getMonth', 'getNewTextFormat', 'getNextHighestDepth', 'getPan', 'getProgress', + 'getProperty', 'getRGB', 'getSeconds', 'getSelected', 'getSelectedText', 'getSize', 'getStyle', + 'getStyleNames', 'getSWFVersion', 'getText', 'getTextExtent', 'getTextFormat', 'getTextSnapshot', + 'getTime', 'getTimer', 'getTimezoneOffset', 'getTransform', 'getURL', 'getUTCDate', 'getUTCDay', + 'getUTCFullYear', 'getUTCHours', 'getUTCMilliseconds', 'getUTCMinutes', 'getUTCMonth', 'getUTCSeconds', + 'getVersion', 'getVolume', 'getYear', 'globalToLocal', 'goto', 'gotoAndPlay', 'gotoAndStop', + 'hasAccessibility', 'hasAudio', 'hasAudioEncoder', 'hasChildNodes', 'hasEmbeddedVideo', 'hasMP3', + 'hasPrinting', 'hasScreenBroadcast', 'hasScreenPlayback', 'hasStreamingAudio', 'hasStreamingVideo', + 'hasVideoEncoder', 'height', 'hide', 'hideBuiltInItems', 'hitArea', 'hitTest', 'hitTestTextNearPos', + 'HOME', 'hscroll', 'html', 'htmlText', 'ID3', 'ifFrameLoaded', 'ignoreWhite', 'implements', + 'import', 'indent', 'index', 'indexOf', 'Infinity', '-Infinity', 'INSERT', 'insertBefore', 'install', + 'instanceof', 'int', 'interface', 'isActive', 'isDebugger', 'isDown', 'isFinite', 'isNaN', 'isToggled', + 'italic', 'join', 'Key', 'language', 'lastChild', 'lastIndexOf', 'le', 'leading', 'LEFT', 'leftMargin', + 'length', 'level', 'lineStyle', 'lineTo', 'list', 'LN10', 'LN2', 'load', 'loadClip', 'loaded', 'loadMovie', + 'loadMovieNum', 'loadSound', 'loadVariables', 'loadVariablesNum', 'LoadVars', 'LocalConnection', + 'localFileReadDisable', 'localToGlobal', 'log', 'LOG10E', 'LOG2E', 'manufacturer', 'Math', 'max', + 'MAX_VALUE', 'maxChars', 'maxhscroll', 'maxscroll', 'mbchr', 'mblength', 'mbord', 'mbsubstring', 'menu', + 'message', 'Microphone', 'min', 'MIN_VALUE', 'MMExecute', 'motionLevel', 'motionTimeOut', 'Mouse', + 'mouseWheelEnabled', 'moveTo', 'Movieclip', 'MovieClipLoader', 'multiline', 'muted', 'name', 'names', 'NaN', + 'ne', 'NEGATIVE_INFINITY', 'NetConnection', 'NetStream', 'newline', 'nextFrame', + 'nextScene', 'nextSibling', 'nodeName', 'nodeType', 'nodeValue', 'not', 'Number', 'Object', + 'on', 'onActivity', 'onChanged', 'onClipEvent', 'onClose', 'onConnect', 'onData', 'onDragOut', + 'onDragOver', 'onEnterFrame', 'onID3', 'onKeyDown', 'onKeyUp', 'onKillFocus', 'onLoad', 'onLoadComplete', + 'onLoadError', 'onLoadInit', 'onLoadProgress', 'onLoadStart', 'onMouseDown', 'onMouseMove', 'onMouseUp', + 'onMouseWheel', 'onPress', 'onRelease', 'onReleaseOutside', 'onResize', 'onRollOut', 'onRollOver', + 'onScroller', 'onSelect', 'onSetFocus', 'onSoundComplete', 'onStatus', 'onUnload', 'onUpdate', 'onXML', + 'or(logischesOR)', 'ord', 'os', 'parentNode', 'parseCSS', 'parseFloat', 'parseInt', 'parseXML', 'password', + 'pause', 'PGDN', 'PGUP', 'PI', 'pixelAspectRatio', 'play', 'playerType', 'pop', 'position', + 'POSITIVE_INFINITY', 'pow', 'prevFrame', 'previousSibling', 'prevScene', 'print', 'printAsBitmap', + 'printAsBitmapNum', 'PrintJob', 'printNum', 'private', 'prototype', 'public', 'push', 'quality', + 'random', 'rate', 'registerClass', 'removeListener', 'removeMovieClip', 'removeNode', 'removeTextField', + 'replaceSel', 'replaceText', 'resolutionX', 'resolutionY', 'restrict', 'reverse', 'RIGHT', + 'rightMargin', 'round', 'scaleMode', 'screenColor', 'screenDPI', 'screenResolutionX', 'screenResolutionY', + 'scroll', 'seek', 'selectable', 'Selection', 'send', 'sendAndLoad', 'separatorBefore', 'serverString', + 'set', 'setvariable', 'setBufferTime', 'setClipboard', 'setDate', 'setFocus', 'setFullYear', 'setGain', + 'setHours', 'setInterval', 'setMask', 'setMilliseconds', 'setMinutes', 'setMode', 'setMonth', + 'setMotionLevel', 'setNewTextFormat', 'setPan', 'setProperty', 'setQuality', 'setRate', 'setRGB', + 'setSeconds', 'setSelectColor', 'setSelected', 'setSelection', 'setSilenceLevel', 'setStyle', + 'setTextFormat', 'setTime', 'setTransform', 'setUseEchoSuppression', 'setUTCDate', 'setUTCFullYear', + 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', 'setVolume', + 'setYear', 'SharedObject', 'SHIFT(Konstante)', 'shift(Methode)', 'show', 'showMenu', 'showSettings', + 'silenceLevel', 'silenceTimeout', 'sin', 'size', 'slice', 'smoothing', 'sort', 'sortOn', 'Sound', 'SPACE', + 'splice', 'split', 'sqrt', 'SQRT1_2', 'SQRT2', 'Stage', 'start', 'startDrag', 'static', 'status', 'stop', + 'stopAllSounds', 'stopDrag', 'String', 'StyleSheet(Klasse)', 'styleSheet(Eigenschaft)', 'substr', + 'substring', 'super', 'swapDepths', 'System', 'TAB', 'tabChildren', 'tabEnabled', 'tabIndex', + 'tabStops', 'tan', 'target', 'targetPath', 'tellTarget', 'text', 'textColor', 'TextField', 'TextFormat', + 'textHeight', 'TextSnapshot', 'textWidth', 'this', 'throw', 'time', 'toggleHighQuality', 'toLowerCase', + 'toString', 'toUpperCase', 'trace', 'trackAsMenu', 'try', 'type', 'typeof', 'undefined', + 'underline', 'unescape', 'uninstall', 'unloadClip', 'unloadMovie', 'unLoadMovieNum', 'unshift', 'unwatch', + 'UP', 'updateAfterEvent', 'updateProperties', 'url', 'useCodePage', 'useEchoSuppression', 'useHandCursor', + 'UTC', 'valueOf', 'variable', 'version', 'Video', 'visible', 'void', 'watch', 'width', + 'with', 'wordwrap', 'XML', 'xmlDecl', 'XMLNode', 'XMLSocket' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #0066CC;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/actionscript3.php b/_piecrust/libs/Geshi/geshi/actionscript3.php new file mode 100644 index 0000000..ceaa61d --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/actionscript3.php @@ -0,0 +1,473 @@ + 'ActionScript 3', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Regular expressions + 2 => "/(?<=[\\s^])(s|tr|y)\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])*\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU", + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'with', 'while', 'void', 'undefined', 'typeof', 'try', 'true', + 'throw', 'this', 'switch', 'super', 'set', 'return', 'public', 'protected', + 'private', 'null', 'new', 'is', 'internal', 'instanceof', 'in', + 'import', 'if', 'get', 'for', 'false', 'else', 'each', 'do', + 'delete', 'default', 'continue', 'catch', 'case', 'break', 'as', + 'extends' + ), + 2 => array( + 'var' + ), + 3 => array( + 'function' + ), + 4 => array( + 'class', 'package' + ), + 6 => array( + 'flash.xml', 'flash.utils', 'flash.ui', 'flash.text', + 'flash.system', 'flash.profiler', 'flash.printing', 'flash.net', + 'flash.media', 'flash.geom', 'flash.filters', 'flash.external', + 'flash.events', 'flash.errors', 'flash.display', + 'flash.accessibility' + ), + 7 => array( + 'zoom', 'year', 'y', 'xmlDecl', 'x', 'writeUnsignedInt', + 'writeUTFBytes', 'writeUTF', 'writeShort', 'writeObject', + 'writeMultiByte', 'writeInt', 'writeFloat', 'writeExternal', + 'writeDynamicProperty', 'writeDynamicProperties', 'writeDouble', + 'writeBytes', 'writeByte', 'writeBoolean', 'wordWrap', + 'willTrigger', 'width', 'volume', 'visible', 'videoWidth', + 'videoHeight', 'version', 'valueOf', 'value', 'usingTLS', + 'useRichTextClipboard', 'useHandCursor', 'useEchoSuppression', + 'useCodePage', 'url', 'uri', 'uploadCompleteData', 'upload', + 'updateProperties', 'updateAfterEvent', 'upState', 'unshift', + 'unlock', 'unload', 'union', 'unescapeMultiByte', 'unescape', + 'underline', 'uncompress', 'type', 'ty', 'tx', 'transparent', + 'translate', 'transformPoint', 'transform', 'trackAsMenu', 'track', + 'trace', 'totalMemory', 'totalFrames', 'topLeft', 'top', + 'togglePause', 'toXMLString', 'toUpperCase', 'toUTCString', + 'toTimeString', 'toString', 'toPrecision', 'toLowerCase', + 'toLocaleUpperCase', 'toLocaleTimeString', 'toLocaleString', + 'toLocaleLowerCase', 'toLocaleDateString', 'toFixed', + 'toExponential', 'toDateString', 'timezoneOffset', 'timerComplete', + 'timer', 'time', 'threshold', 'thickness', 'textWidth', + 'textSnapshot', 'textInput', 'textHeight', 'textColor', 'text', + 'test', 'target', 'tan', 'tabStops', 'tabIndexChange', 'tabIndex', + 'tabEnabledChange', 'tabEnabled', 'tabChildrenChange', + 'tabChildren', 'sync', 'swfVersion', 'swapChildrenAt', + 'swapChildren', 'subtract', 'substring', 'substr', 'styleSheet', + 'styleNames', 'strength', 'stopPropagation', + 'stopImmediatePropagation', 'stopDrag', 'stopAll', 'stop', 'status', + 'startDrag', 'start', 'stageY', 'stageX', 'stageWidth', + 'stageHeight', 'stageFocusRect', 'stage', 'sqrt', 'split', 'splice', + 'source', 'soundTransform', 'soundComplete', 'sortOn', 'sort', + 'songName', 'some', 'socketData', 'smoothing', 'slice', 'size', + 'sin', 'silent', 'silenceTimeout', 'silenceLevel', 'showSettings', + 'showRedrawRegions', 'showDefaultContextMenu', 'show', 'shortcut', + 'shiftKey', 'shift', 'sharpness', 'sharedEvents', 'shadowColor', + 'shadowAlpha', 'settings', 'setUseEchoSuppression', 'setUTCSeconds', + 'setUTCMonth', 'setUTCMinutes', 'setUTCMilliseconds', 'setUTCHours', + 'setUTCFullYear', 'setUTCDate', 'setTimeout', 'setTime', + 'setTextFormat', 'setStyle', 'setSilenceLevel', 'setSettings', + 'setSelection', 'setSelected', 'setSelectColor', 'setSeconds', + 'setQuality', 'setPropertyIsEnumerable', 'setProperty', 'setPixels', + 'setPixel32', 'setPixel', 'setNamespace', 'setName', + 'setMotionLevel', 'setMonth', 'setMode', 'setMinutes', + 'setMilliseconds', 'setLoopback', 'setLoopBack', 'setLocalName', + 'setKeyFrameInterval', 'setInterval', 'setHours', 'setFullYear', + 'setEmpty', 'setDirty', 'setDate', 'setCompositionString', + 'setClipboard', 'setChildren', 'setChildIndex', + 'setAdvancedAntiAliasingTable', 'serverString', 'separatorBefore', + 'sendToURL', 'send', 'selectionEndIndex', 'selectionBeginIndex', + 'selectable', 'select', 'seek', 'securityError', 'securityDomain', + 'secondsUTC', 'seconds', 'search', 'scrollV', 'scrollRect', + 'scrollH', 'scroll', 'screenResolutionY', 'screenResolutionX', + 'screenDPI', 'screenColor', 'scenes', 'scaleY', 'scaleX', + 'scaleMode', 'scale9Grid', 'scale', 'save', 'sandboxType', + 'sameDomain', 'running', 'round', 'rotation', 'rotate', 'root', + 'rollOver', 'rollOut', 'rightToRight', 'rightToLeft', 'rightPeak', + 'rightMargin', 'right', 'rewind', 'reverse', 'resume', 'restrict', + 'resize', 'reset', 'requestHeaders', 'replaceText', + 'replaceSelectedText', 'replace', 'repeatCount', 'render', + 'removedFromStage', 'removed', 'removeNode', 'removeNamespace', + 'removeEventListener', 'removeChildAt', 'removeChild', + 'relatedObject', 'registerFont', 'registerClassAlias', 'redOffset', + 'redMultiplier', 'rect', 'receiveVideo', 'receiveAudio', + 'readUnsignedShort', 'readUnsignedInt', 'readUnsignedByte', + 'readUTFBytes', 'readUTF', 'readShort', 'readObject', + 'readMultiByte', 'readInt', 'readFloat', 'readExternal', + 'readDouble', 'readBytes', 'readByte', 'readBoolean', 'ratios', + 'rate', 'random', 'quality', 'push', 'publish', 'proxyType', + 'prototype', 'propertyIsEnumerable', 'progress', + 'processingInstructions', 'printAsBitmap', 'print', + 'previousSibling', 'preventDefault', 'prevScene', 'prevFrame', + 'prettyPrinting', 'prettyIndent', 'preserveAlpha', 'prependChild', + 'prefix', 'pow', 'position', 'pop', 'polar', 'playerType', 'play', + 'pixelSnapping', 'pixelDissolve', 'pixelBounds', 'pixelAspectRatio', + 'perlinNoise', 'pause', 'parseXML', 'parseInt', 'parseFloat', + 'parseCSS', 'parse', 'parentNode', 'parentDomain', + 'parentAllowsChild', 'parent', 'parameters', 'paperWidth', + 'paperHeight', 'pan', 'paletteMap', 'pageWidth', 'pageHeight', + 'overState', 'outsideCutoff', 'os', 'orientation', 'open', + 'opaqueBackground', 'onPlayStatus', 'onMetaData', 'onCuePoint', + 'offsetPoint', 'offset', 'objectID', 'objectEncoding', 'numLock', + 'numLines', 'numFrames', 'numChildren', 'normalize', 'noise', + 'nodeValue', 'nodeType', 'nodeName', 'nodeKind', 'noAutoLabeling', + 'nextValue', 'nextSibling', 'nextScene', 'nextNameIndex', + 'nextName', 'nextFrame', 'netStatus', 'navigateToURL', + 'namespaceURI', 'namespaceDeclarations', 'namespace', 'names', + 'name', 'muted', 'multiline', 'moveTo', 'mouseY', 'mouseX', + 'mouseWheelEnabled', 'mouseWheel', 'mouseUp', 'mouseTarget', + 'mouseOver', 'mouseOut', 'mouseMove', 'mouseLeave', + 'mouseFocusChange', 'mouseEnabled', 'mouseDown', 'mouseChildren', + 'motionTimeout', 'motionLevel', 'monthUTC', 'month', + 'modificationDate', 'mode', 'minutesUTC', 'minutes', 'min', + 'millisecondsUTC', 'milliseconds', 'method', 'message', 'merge', + 'menuSelect', 'menuItemSelect', 'maxScrollV', 'maxScrollH', + 'maxLevel', 'maxChars', 'max', 'matrixY', 'matrixX', 'matrix', + 'match', 'mask', 'mapPoint', 'mapBitmap', 'map', 'manufacturer', + 'macType', 'loopback', 'loop', 'log', 'lock', 'localeCompare', + 'localY', 'localX', 'localToGlobal', 'localName', + 'localFileReadDisable', 'loaderURL', 'loaderInfo', 'loader', + 'loadPolicyFile', 'loadBytes', 'load', 'liveDelay', 'link', + 'lineTo', 'lineStyle', 'lineGradientStyle', 'level', + 'letterSpacing', 'length', 'leftToRight', 'leftToLeft', 'leftPeak', + 'leftMargin', 'left', 'leading', 'lastIndexOf', 'lastIndex', + 'lastChild', 'language', 'labels', 'knockout', 'keyUp', + 'keyLocation', 'keyFrameInterval', 'keyFocusChange', 'keyDown', + 'keyCode', 'kerning', 'join', 'italic', 'isXMLName', + 'isPrototypeOf', 'isNaN', 'isFocusInaccessible', 'isFinite', + 'isEmpty', 'isDefaultPrevented', 'isDebugger', 'isBuffering', + 'isAttribute', 'isAccessible', 'ioError', 'invert', 'invalidate', + 'intersects', 'intersection', 'interpolate', 'insideCutoff', + 'insertChildBefore', 'insertChildAfter', 'insertBefore', 'inner', + 'init', 'info', 'inflatePoint', 'inflate', 'indexOf', 'index', + 'indent', 'inScopeNamespaces', 'imeComposition', 'ime', + 'ignoreWhitespace', 'ignoreWhite', 'ignoreProcessingInstructions', + 'ignoreComments', 'ignoreCase', 'identity', 'idMap', 'id3', + 'httpStatus', 'htmlText', 'hoursUTC', 'hours', 'hitTestTextNearPos', + 'hitTestState', 'hitTestPoint', 'hitTestObject', 'hitTest', + 'hitArea', 'highlightColor', 'highlightAlpha', 'hideObject', + 'hideBuiltInItems', 'hide', 'height', 'hasVideoEncoder', 'hasTLS', + 'hasStreamingVideo', 'hasStreamingAudio', 'hasSimpleContent', + 'hasScreenPlayback', 'hasScreenBroadcast', 'hasProperty', + 'hasPrinting', 'hasOwnProperty', 'hasMP3', 'hasIME', 'hasGlyphs', + 'hasEventListener', 'hasEmbeddedVideo', 'hasDefinition', + 'hasComplexContent', 'hasChildNodes', 'hasAudioEncoder', 'hasAudio', + 'hasAccessibility', 'gridFitType', 'greenOffset', 'greenMultiplier', + 'graphics', 'gotoAndStop', 'gotoAndPlay', 'globalToLocal', 'global', + 'getUTCSeconds', 'getUTCMonth', 'getUTCMinutes', + 'getUTCMilliseconds', 'getUTCHours', 'getUTCFullYear', 'getUTCDay', + 'getUTCDate', 'getTimezoneOffset', 'getTimer', 'getTime', + 'getTextRunInfo', 'getTextFormat', 'getText', 'getStyle', + 'getStackTrace', 'getSelectedText', 'getSelected', 'getSeconds', + 'getRemote', 'getRect', 'getQualifiedSuperclassName', + 'getQualifiedClassName', 'getProperty', 'getPrefixForNamespace', + 'getPixels', 'getPixel32', 'getPixel', 'getParagraphLength', + 'getObjectsUnderPoint', 'getNamespaceForPrefix', 'getMonth', + 'getMinutes', 'getMilliseconds', 'getMicrophone', 'getLocal', + 'getLineText', 'getLineOffset', 'getLineMetrics', 'getLineLength', + 'getLineIndexOfChar', 'getLineIndexAtPoint', 'getImageReference', + 'getHours', 'getFullYear', 'getFirstCharInParagraph', + 'getDescendants', 'getDefinitionByName', 'getDefinition', 'getDay', + 'getDate', 'getColorBoundsRect', 'getClassByAlias', 'getChildIndex', + 'getChildByName', 'getChildAt', 'getCharIndexAtPoint', + 'getCharBoundaries', 'getCamera', 'getBounds', 'genre', + 'generateFilterRect', 'gain', 'fullYearUTC', 'fullYear', + 'fullScreen', 'fscommand', 'fromCharCode', 'framesLoaded', + 'frameRate', 'frame', 'fps', 'forwardAndBack', 'formatToString', + 'forceSimple', 'forEach', 'fontType', 'fontStyle', 'fontSize', + 'fontName', 'font', 'focusRect', 'focusOut', 'focusIn', 'focus', + 'flush', 'floor', 'floodFill', 'firstChild', 'findText', 'filters', + 'filter', 'fillRect', 'fileList', 'extension', 'extended', 'exp', + 'exec', 'exactSettings', 'every', 'eventPhase', 'escapeMultiByte', + 'escape', 'errorID', 'error', 'equals', 'enumerateFonts', + 'enterFrame', 'endian', 'endFill', 'encodeURIComponent', + 'encodeURI', 'enabled', 'embedFonts', 'elements', + 'dynamicPropertyWriter', 'dropTarget', 'drawRoundRect', 'drawRect', + 'drawEllipse', 'drawCircle', 'draw', 'download', 'downState', + 'doubleClickEnabled', 'doubleClick', 'dotall', 'domain', + 'docTypeDecl', 'doConversion', 'divisor', 'distance', 'dispose', + 'displayState', 'displayMode', 'displayAsPassword', 'dispatchEvent', + 'description', 'describeType', 'descent', 'descendants', + 'deltaTransformPoint', 'delta', 'deleteProperty', 'delay', + 'defaultTextFormat', 'defaultSettings', 'defaultObjectEncoding', + 'decodeURIComponent', 'decodeURI', 'decode', 'deblocking', + 'deactivate', 'dayUTC', 'day', 'dateUTC', 'date', 'dataFormat', + 'data', 'd', 'customItems', 'curveTo', 'currentTarget', + 'currentScene', 'currentLabels', 'currentLabel', 'currentFrame', + 'currentFPS', 'currentDomain', 'currentCount', 'ctrlKey', 'creator', + 'creationDate', 'createTextNode', 'createGradientBox', + 'createElement', 'createBox', 'cos', 'copyPixels', 'copyChannel', + 'copy', 'conversionMode', 'contextMenuOwner', 'contextMenu', + 'contentType', 'contentLoaderInfo', 'content', 'containsRect', + 'containsPoint', 'contains', 'constructor', 'connectedProxyType', + 'connected', 'connect', 'condenseWhite', 'concatenatedMatrix', + 'concatenatedColorTransform', 'concat', 'computeSpectrum', + 'compress', 'componentY', 'componentX', 'complete', 'compare', + 'comments', 'comment', 'colors', 'colorTransform', 'color', 'code', + 'close', 'cloneNode', 'clone', 'client', 'click', 'clearTimeout', + 'clearInterval', 'clear', 'clamp', 'children', 'childNodes', + 'childIndex', 'childAllowsParent', 'child', 'checkPolicyFile', + 'charCount', 'charCodeAt', 'charCode', 'charAt', 'changeList', + 'change', 'ceil', 'caretIndex', 'caption', 'capsLock', 'cancelable', + 'cancel', 'callee', 'callProperty', 'call', 'cacheAsBitmap', 'c', + 'bytesTotal', 'bytesLoaded', 'bytesAvailable', 'buttonMode', + 'buttonDown', 'bullet', 'builtInItems', 'bufferTime', + 'bufferLength', 'bubbles', 'browse', 'bottomScrollV', 'bottomRight', + 'bottom', 'borderColor', 'border', 'bold', 'blurY', 'blurX', + 'blueOffset', 'blueMultiplier', 'blockIndent', 'blendMode', + 'bitmapData', 'bias', 'beginGradientFill', 'beginFill', + 'beginBitmapFill', 'bandwidth', 'backgroundColor', 'background', + 'b', 'available', 'avHardwareDisable', 'autoSize', 'attributes', + 'attribute', 'attachNetStream', 'attachCamera', 'attachAudio', + 'atan2', 'atan', 'asyncError', 'asin', 'ascent', 'artist', + 'areSoundsInaccessible', 'areInaccessibleObjectsUnderPoint', + 'applyFilter', 'apply', 'applicationDomain', 'appendText', + 'appendChild', 'antiAliasType', 'angle', 'alwaysShowSelection', + 'altKey', 'alphas', 'alphaOffset', 'alphaMultiplier', 'alpha', + 'allowInsecureDomain', 'allowDomain', 'align', 'album', + 'addedToStage', 'added', 'addPage', 'addNamespace', 'addHeader', + 'addEventListener', 'addChildAt', 'addChild', 'addCallback', 'add', + 'activityLevel', 'activity', 'active', 'activating', 'activate', + 'actionScriptVersion', 'acos', 'accessibilityProperties', 'abs' + ), + 8 => array( + 'WRAP', 'VERTICAL', 'VARIABLES', + 'UTC', 'UPLOAD_COMPLETE_DATA', 'UP', 'UNLOAD', 'UNKNOWN', + 'UNIQUESORT', 'TOP_RIGHT', 'TOP_LEFT', 'TOP', 'TIMER_COMPLETE', + 'TIMER', 'TEXT_NODE', 'TEXT_INPUT', 'TEXT', 'TAB_INDEX_CHANGE', + 'TAB_ENABLED_CHANGE', 'TAB_CHILDREN_CHANGE', 'TAB', 'SYNC', + 'SUBTRACT', 'SUBPIXEL', 'STATUS', 'STANDARD', 'SQUARE', 'SQRT2', + 'SQRT1_2', 'SPACE', 'SOUND_COMPLETE', 'SOCKET_DATA', 'SHOW_ALL', + 'SHIFT', 'SETTINGS_MANAGER', 'SELECT', 'SECURITY_ERROR', 'SCROLL', + 'SCREEN', 'ROUND', 'ROLL_OVER', 'ROLL_OUT', 'RIGHT', 'RGB', + 'RETURNINDEXEDARRAY', 'RESIZE', 'REPEAT', 'RENDER', + 'REMOVED_FROM_STAGE', 'REMOVED', 'REMOTE', 'REGULAR', 'REFLECT', + 'RED', 'RADIAL', 'PROGRESS', 'PRIVACY', 'POST', 'POSITIVE_INFINITY', + 'PORTRAIT', 'PIXEL', 'PI', 'PENDING', 'PAGE_UP', 'PAGE_DOWN', 'PAD', + 'OVERLAY', 'OUTER', 'OPEN', 'NaN', 'NUM_PAD', 'NUMPAD_SUBTRACT', + 'NUMPAD_MULTIPLY', 'NUMPAD_ENTER', 'NUMPAD_DIVIDE', + 'NUMPAD_DECIMAL', 'NUMPAD_ADD', 'NUMPAD_9', 'NUMPAD_8', 'NUMPAD_7', + 'NUMPAD_6', 'NUMPAD_5', 'NUMPAD_4', 'NUMPAD_3', 'NUMPAD_2', + 'NUMPAD_1', 'NUMPAD_0', 'NUMERIC', 'NO_SCALE', 'NO_BORDER', + 'NORMAL', 'NONE', 'NEVER', 'NET_STATUS', 'NEGATIVE_INFINITY', + 'MULTIPLY', 'MOUSE_WHEEL', 'MOUSE_UP', 'MOUSE_OVER', 'MOUSE_OUT', + 'MOUSE_MOVE', 'MOUSE_LEAVE', 'MOUSE_FOCUS_CHANGE', 'MOUSE_DOWN', + 'MITER', 'MIN_VALUE', 'MICROPHONE', 'MENU_SELECT', + 'MENU_ITEM_SELECT', 'MEDIUM', 'MAX_VALUE', 'LOW', 'LOG2E', 'LOG10E', + 'LOCAL_WITH_NETWORK', 'LOCAL_WITH_FILE', 'LOCAL_TRUSTED', + 'LOCAL_STORAGE', 'LN2', 'LN10', 'LITTLE_ENDIAN', 'LINK', + 'LINEAR_RGB', 'LINEAR', 'LIGHT_COLOR', 'LIGHTEN', 'LEFT', 'LCD', + 'LAYER', 'LANDSCAPE', 'KOREAN', 'KEY_UP', 'KEY_FOCUS_CHANGE', + 'KEY_DOWN', 'JUSTIFY', 'JAPANESE_KATAKANA_HALF', + 'JAPANESE_KATAKANA_FULL', 'JAPANESE_HIRAGANA', 'Infinity', 'ITALIC', + 'IO_ERROR', 'INVERT', 'INSERT', 'INPUT', 'INNER', 'INIT', + 'IME_COMPOSITION', 'IGNORE', 'ID3', 'HTTP_STATUS', 'HORIZONTAL', + 'HOME', 'HIGH', 'HARDLIGHT', 'GREEN', 'GET', 'FULLSCREEN', 'FULL', + 'FOCUS_OUT', 'FOCUS_IN', 'FLUSHED', 'FLASH9', 'FLASH8', 'FLASH7', + 'FLASH6', 'FLASH5', 'FLASH4', 'FLASH3', 'FLASH2', 'FLASH1', 'F9', + 'F8', 'F7', 'F6', 'F5', 'F4', 'F3', 'F2', 'F15', 'F14', 'F13', + 'F12', 'F11', 'F10', 'F1', 'EXACT_FIT', 'ESCAPE', 'ERROR', 'ERASE', + 'ENTER_FRAME', 'ENTER', 'END', 'EMBEDDED', 'ELEMENT_NODE', 'E', + 'DYNAMIC', 'DOWN', 'DOUBLE_CLICK', 'DIFFERENCE', 'DEVICE', + 'DESCENDING', 'DELETE', 'DEFAULT', 'DEACTIVATE', 'DATA', + 'DARK_COLOR', 'DARKEN', 'CRT', 'CONTROL', 'CONNECT', 'COMPLETE', + 'COLOR', 'CLOSE', 'CLICK', 'CLAMP', 'CHINESE', 'CHANGE', 'CENTER', + 'CASEINSENSITIVE', 'CAPTURING_PHASE', 'CAPS_LOCK', 'CANCEL', + 'CAMERA', 'BUBBLING_PHASE', 'BOTTOM_RIGHT', 'BOTTOM_LEFT', 'BOTTOM', + 'BOLD_ITALIC', 'BOLD', 'BLUE', 'BINARY', 'BIG_ENDIAN', 'BEVEL', + 'BEST', 'BACKSPACE', 'AUTO', 'AT_TARGET', 'ASYNC_ERROR', 'AMF3', + 'AMF0', 'ALWAYS', 'ALPHANUMERIC_HALF', 'ALPHANUMERIC_FULL', 'ALPHA', + 'ADVANCED', 'ADDED_TO_STAGE', 'ADDED', 'ADD', 'ACTIVITY', + 'ACTIONSCRIPT3', 'ACTIONSCRIPT2' + ), + //FIX: Must be last in order to avoid conflicts with keywords present + //in other keyword groups, that might get highlighted as part of the URL. + //I know this is not a proper work-around, but should do just fine. + 5 => array( + 'uint', 'int', 'arguments', 'XMLSocket', 'XMLNodeType', 'XMLNode', + 'XMLList', 'XMLDocument', 'XML', 'Video', 'VerifyError', + 'URLVariables', 'URLStream', 'URLRequestMethod', 'URLRequestHeader', + 'URLRequest', 'URLLoaderDataFormat', 'URLLoader', 'URIError', + 'TypeError', 'Transform', 'TimerEvent', 'Timer', 'TextSnapshot', + 'TextRenderer', 'TextLineMetrics', 'TextFormatAlign', 'TextFormat', + 'TextFieldType', 'TextFieldAutoSize', 'TextField', 'TextEvent', + 'TextDisplayMode', 'TextColorType', 'System', 'SyntaxError', + 'SyncEvent', 'StyleSheet', 'String', 'StatusEvent', 'StaticText', + 'StageScaleMode', 'StageQuality', 'StageAlign', 'Stage', + 'StackOverflowError', 'Sprite', 'SpreadMethod', 'SoundTransform', + 'SoundMixer', 'SoundLoaderContext', 'SoundChannel', 'Sound', + 'Socket', 'SimpleButton', 'SharedObjectFlushStatus', 'SharedObject', + 'Shape', 'SecurityPanel', 'SecurityErrorEvent', 'SecurityError', + 'SecurityDomain', 'Security', 'ScriptTimeoutError', 'Scene', + 'SWFVersion', 'Responder', 'RegExp', 'ReferenceError', 'Rectangle', + 'RangeError', 'QName', 'Proxy', 'ProgressEvent', + 'PrintJobOrientation', 'PrintJobOptions', 'PrintJob', 'Point', + 'PixelSnapping', 'ObjectEncoding', 'Object', 'Number', 'NetStream', + 'NetStatusEvent', 'NetConnection', 'Namespace', 'MovieClip', + 'MouseEvent', 'Mouse', 'MorphShape', 'Microphone', 'MemoryError', + 'Matrix', 'Math', 'LocalConnection', 'LoaderInfo', 'LoaderContext', + 'Loader', 'LineScaleMode', 'KeyboardEvent', 'Keyboard', + 'KeyLocation', 'JointStyle', 'InvalidSWFError', + 'InterpolationMethod', 'InteractiveObject', 'IllegalOperationError', + 'IOErrorEvent', 'IOError', 'IMEEvent', 'IMEConversionMode', 'IME', + 'IExternalizable', 'IEventDispatcher', 'IDynamicPropertyWriter', + 'IDynamicPropertyOutput', 'IDataOutput', 'IDataInput', 'ID3Info', + 'IBitmapDrawable', 'HTTPStatusEvent', 'GridFitType', 'Graphics', + 'GradientType', 'GradientGlowFilter', 'GradientBevelFilter', + 'GlowFilter', 'Function', 'FrameLabel', 'FontType', 'FontStyle', + 'Font', 'FocusEvent', 'FileReferenceList', 'FileReference', + 'FileFilter', 'ExternalInterface', 'EventPhase', 'EventDispatcher', + 'Event', 'EvalError', 'ErrorEvent', 'Error', 'Endian', 'EOFError', + 'DropShadowFilter', 'DisplayObjectContainer', 'DisplayObject', + 'DisplacementMapFilterMode', 'DisplacementMapFilter', 'Dictionary', + 'DefinitionError', 'Date', 'DataEvent', 'ConvolutionFilter', + 'ContextMenuItem', 'ContextMenuEvent', 'ContextMenuBuiltInItems', + 'ContextMenu', 'ColorTransform', 'ColorMatrixFilter', 'Class', + 'CapsStyle', 'Capabilities', 'Camera', 'CSMSettings', 'ByteArray', + 'Boolean', 'BlurFilter', 'BlendMode', 'BitmapFilterType', + 'BitmapFilterQuality', 'BitmapFilter', 'BitmapDataChannel', + 'BitmapData', 'Bitmap', 'BevelFilter', 'AsyncErrorEvent', 'Array', + 'ArgumentError', 'ApplicationDomain', 'AntiAliasType', + 'ActivityEvent', 'ActionScriptVersion', 'AccessibilityProperties', + 'Accessibility', 'AVM1Movie' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', '%', '&', '*', '|', '/', '<', '>', '^', '-', '+', '~', '?', ':', ';', '.', ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0033ff; font-weight: bold;', + 2 => 'color: #6699cc; font-weight: bold;', + 3 => 'color: #339966; font-weight: bold;', + 4 => 'color: #9900cc; font-weight: bold;', + 5 => 'color: #004993;', + 6 => 'color: #004993;', + 7 => 'color: #004993;', + 8 => 'color: #004993;' + ), + 'COMMENTS' => array( + 1 => 'color: #009900; font-style: italic;', + 2 => 'color: #009966; font-style: italic;', + 'MULTI' => 'color: #3f5fbf;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #990000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000000; font-weight:bold;' + ), + 'METHODS' => array( + 0 => 'color: #000000;', + ), + 'SYMBOLS' => array( + 0 => 'color: #000066; font-weight: bold;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => 'http://www.google.com/search?q={FNAMEL}%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:{FNAMEL}.html', + 6 => '', + 7 => '', + 8 => '' + ), + 'OOLANG' => false,//Save some time as OO identifiers aren't used + 'OBJECT_SPLITTERS' => array( + // commented out because it's not very relevant for AS, as all properties, methods and constants are dot-accessed. + // I believe it's preferable to have package highlighting for example, which is not possible with this enabled. + // 0 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/ada.php b/_piecrust/libs/Geshi/geshi/ada.php new file mode 100644 index 0000000..eb98c97 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/ada.php @@ -0,0 +1,135 @@ + 'Ada', + 'COMMENT_SINGLE' => array(1 => '--'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'begin', 'declare', 'do', 'else', 'elsif', 'exception', 'for', 'if', + 'is', 'loop', 'while', 'then', 'end', 'select', 'case', 'until', + 'goto', 'return' + ), + 2 => array( + 'abs', 'and', 'at', 'mod', 'not', 'or', 'rem', 'xor' + ), + 3 => array( + 'abort', 'abstract', 'accept', 'access', 'aliased', 'all', 'array', + 'body', 'constant', 'delay', 'delta', 'digits', 'entry', 'exit', + 'function', 'generic', 'in', 'interface', 'limited', 'new', 'null', + 'of', 'others', 'out', 'overriding', 'package', 'pragma', 'private', + 'procedure', 'protected', 'raise', 'range', 'record', 'renames', + 'requeue', 'reverse', 'separate', 'subtype', 'synchronized', + 'tagged', 'task', 'terminate', 'type', 'use', 'when', 'with' + ) + ), + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00007f;', + 2 => 'color: #0000ff;', + 3 => 'color: #46aa03; font-weight:bold;', + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0000;' + ), + 'METHODS' => array( + 1 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/algol68.php b/_piecrust/libs/Geshi/geshi/algol68.php new file mode 100644 index 0000000..e9f19da --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/algol68.php @@ -0,0 +1,226 @@ + 'ALGOL 68', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array( + '#' => '#', + '¢' => '¢', + '£' => '£', + ), + 'COMMENT_REGEXP' => array( + 1 => '/\bCO((?:MMENT)?)\b.*?\bCO\\1\b/i', + 2 => '/\bPR((?:AGMAT)?)\b.*?\bPR\\1\b/i', + 3 => '/\bQUOTE\b.*?\bQUOTE\b/i' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '"', + 'KEYWORDS' => array( + 1 => array('KEEP', 'FINISH', 'USE', 'SYSPROCS', 'IOSTATE', 'USING', 'ENVIRON'), + 2 => array('CASE', 'IN', 'OUSE', 'IN', 'OUT', 'ESAC', '(', '|', '|:', ')', 'FOR', 'FROM', 'TO', 'BY', 'WHILE', 'DO', 'OD', 'IF', 'THEN', 'ELIF', 'THEN', 'ELSE', 'FI', 'PAR', 'BEGIN', 'EXIT', 'END', 'GO', 'GOTO', 'FORALL', 'UPTO', 'DOWNTO', 'FOREACH', 'ASSERT'), + 3 => array('BITS', 'BOOL', 'BYTES', 'CHAR', 'COMPL', 'INT', 'REAL', 'SEMA', 'STRING', 'VOID', 'COMPLEX', 'VECTOR'), + 4 => array('MODE', 'OP', 'PRIO', 'PROC'), + 5 => array('FLEX', 'HEAP', 'LOC', 'LONG', 'REF', 'SHORT', 'EITHER'), + 6 => array('CHANNEL', 'FILE', 'FORMAT', 'STRUCT', 'UNION'), + 7 => array('OF', 'AT', '@', 'IS', ':=:', 'ISNT', ':/=:', ':≠:', 'CTB', 'CT', '::', 'CTAB', '::=', 'TRUE', 'FALSE', 'EMPTY', 'NIL', '○', 'SKIP', '~'), + 8 => array('NOT', 'UP', 'DOWN', 'LWB', 'UPB', '-', 'ABS', 'ARG', 'BIN', 'ENTIER', 'LENG', 'LEVEL', 'ODD', 'REPR', 'ROUND', 'SHORTEN', 'CONJ', 'SIGN'), + 9 => array('¬', '↑', '↓', '⌊', '⌈', '~', '⎩', '⎧'), + 10 => array('+*', 'I', '+×', '⊥', '!', '⏨'), + 11 => array('SHL', 'SHR', '**', 'UP', 'DOWN', 'LWB', 'UPB', '↑', '↓', '⌊', '⌈', '⎩', '⎧'), + 12 => array('*', '/', '%', 'OVER', '%*', 'MOD', 'ELEM', '×', '÷', '÷×', '÷*', '%×', '□', '÷:'), + 13 => array('-', '+'), + 14 => array('<', 'LT', '<=', 'LE', '>=', 'GE', '>', 'GT', '≤', '≥'), + 15 => array('=', 'EQ', '/=', 'NE', '≠', '~='), + 16 => array('&', 'AND', '∧', 'OR', '∨'), + 17 => array('MINUSAB', 'PLUSAB', 'TIMESAB', 'DIVAB', 'OVERAB', 'MODAB', 'PLUSTO'), + 18 => array('-:=', '+:=', '*:=', '/:=', '%:=', '%*:=', '+=:', '×:=', '÷:=', '÷×:=', '÷*:=', '%×:=', '÷::=', 'MINUS', 'PLUS', 'DIV', 'MOD', 'PRUS'), + 19 => array('THEF', 'ANDF', 'ORF', 'ANDTH', 'OREL', 'ANDTHEN', 'ORELSE'), + 20 => array('int_lengths', 'intlengths', 'int_shorths', 'intshorths', 'max_int', 'maxint', 'real_lengths', 'reallengths', 'real_shorths', 'realshorths', 'bits_lengths', 'bitslengths', 'bits_shorths', 'bitsshorths', 'bytes_lengths', 'byteslengths', 'bytes_shorths', 'bytesshorths', 'max_abs_char', 'maxabschar', 'int_width', 'intwidth', 'long_int_width', 'longintwidth', 'long_long_int_width', 'longlongintwidth', 'real_width', 'realwidth', 'long_real_width', 'longrealwidth', 'long_long_real_width', 'longlongrealwidth', 'exp_width', 'expwidth', 'long_exp_width', 'longexpwidth', 'long_long_exp_width', 'longlongexpwidth', 'bits_width', 'bitswidth', 'long_bits_width', 'longbitswidth', 'long_long_bits_width', 'longlongbitswidth', 'bytes_width', 'byteswidth', 'long_bytes_width', 'longbyteswidth', 'max_real', 'maxreal', 'small_real', 'smallreal', 'long_max_int', 'longmaxint', 'long_long_max_int', 'longlongmaxint', 'long_max_real', 'longmaxreal', 'long_small_real', 'longsmallreal', 'long_long_max_real', 'longlongmaxreal', 'long_long_small_real', 'longlongsmallreal', 'long_max_bits', 'longmaxbits', 'long_long_max_bits', 'longlongmaxbits', 'null_character', 'nullcharacter', 'blank', 'flip', 'flop', 'error_char', 'errorchar', 'exp_char', 'expchar', 'newline_char', 'newlinechar', 'formfeed_char', 'formfeedchar', 'tab_char', 'tabchar'), + 21 => array('stand_in_channel', 'standinchannel', 'stand_out_channel', 'standoutchannel', 'stand_back_channel', 'standbackchannel', 'stand_draw_channel', 'standdrawchannel', 'stand_error_channel', 'standerrorchannel'), + 22 => array('put_possible', 'putpossible', 'get_possible', 'getpossible', 'bin_possible', 'binpossible', 'set_possible', 'setpossible', 'reset_possible', 'resetpossible', 'reidf_possible', 'reidfpossible', 'draw_possible', 'drawpossible', 'compressible', 'on_logical_file_end', 'onlogicalfileend', 'on_physical_file_end', 'onphysicalfileend', 'on_line_end', 'onlineend', 'on_page_end', 'onpageend', 'on_format_end', 'onformatend', 'on_value_error', 'onvalueerror', 'on_open_error', 'onopenerror', 'on_transput_error', 'ontransputerror', 'on_format_error', 'onformaterror', 'open', 'establish', 'create', 'associate', 'close', 'lock', 'scratch', 'space', 'new_line', 'newline', 'print', 'write_f', 'writef', 'print_f', 'printf', 'write_bin', 'writebin', 'print_bin', 'printbin', 'read_f', 'readf', 'read_bin', 'readbin', 'put_f', 'putf', 'get_f', 'getf', 'make_term', 'maketerm', 'make_device', 'makedevice', 'idf', 'term', 'read_int', 'readint', 'read_long_int', 'readlongint', 'read_long_long_int', 'readlonglongint', 'read_real', 'readreal', 'read_long_real', 'readlongreal', 'read_long_long_real', 'readlonglongreal', 'read_complex', 'readcomplex', 'read_long_complex', 'readlongcomplex', 'read_long_long_complex', 'readlonglongcomplex', 'read_bool', 'readbool', 'read_bits', 'readbits', 'read_long_bits', 'readlongbits', 'read_long_long_bits', 'readlonglongbits', 'read_char', 'readchar', 'read_string', 'readstring', 'print_int', 'printint', 'print_long_int', 'printlongint', 'print_long_long_int', 'printlonglongint', 'print_real', 'printreal', 'print_long_real', 'printlongreal', 'print_long_long_real', 'printlonglongreal', 'print_complex', 'printcomplex', 'print_long_complex', 'printlongcomplex', 'print_long_long_complex', 'printlonglongcomplex', 'print_bool', 'printbool', 'print_bits', 'printbits', 'print_long_bits', 'printlongbits', 'print_long_long_bits', 'printlonglongbits', 'print_char', 'printchar', 'print_string', 'printstring', 'whole', 'fixed', 'float'), + 23 => array('pi', 'long_pi', 'longpi', 'long_long_pi', 'longlongpi'), + 24 => array('sqrt', 'curt', 'cbrt', 'exp', 'ln', 'log', 'sin', 'arc_sin', 'arcsin', 'cos', 'arc_cos', 'arccos', 'tan', 'arc_tan', 'arctan', 'long_sqrt', 'longsqrt', 'long_curt', 'longcurt', 'long_cbrt', 'longcbrt', 'long_exp', 'longexp', 'long_ln', 'longln', 'long_log', 'longlog', 'long_sin', 'longsin', 'long_arc_sin', 'longarcsin', 'long_cos', 'longcos', 'long_arc_cos', 'longarccos', 'long_tan', 'longtan', 'long_arc_tan', 'longarctan', 'long_long_sqrt', 'longlongsqrt', 'long_long_curt', 'longlongcurt', 'long_long_cbrt', 'longlongcbrt', 'long_long_exp', 'longlongexp', 'long_long_ln', 'longlongln', 'long_long_log', 'longlonglog', 'long_long_sin', 'longlongsin', 'long_long_arc_sin', 'longlongarcsin', 'long_long_cos', 'longlongcos', 'long_long_arc_cos', 'longlongarccos', 'long_long_tan', 'longlongtan', 'long_long_arc_tan', 'longlongarctan'), + 25 => array('first_random', 'firstrandom', 'next_random', 'nextrandom', 'long_next_random', 'longnextrandom', 'long_long_next_random', 'longlongnextrandom'), + 26 => array('real', 'bits_pack', 'bitspack', 'long_bits_pack', 'longbitspack', 'long_long_bits_pack', 'longlongbitspack', 'bytes_pack', 'bytespack', 'long_bytes_pack', 'longbytespack', 'char_in_string', 'charinstring', 'last_char_in_string', 'lastcharinstring', 'string_in_string', 'stringinstring'), + 27 => array('utc_time', 'utctime', 'local_time', 'localtime', 'argc', 'argv', 'get_env', 'getenv', 'reset_errno', 'reseterrno', 'errno', 'strerror'), + 28 => array('sinh', 'long_sinh', 'longsinh', 'long_long_sinh', 'longlongsinh', 'arc_sinh', 'arcsinh', 'long_arc_sinh', 'longarcsinh', 'long_long_arc_sinh', 'longlongarcsinh', 'cosh', 'long_cosh', 'longcosh', 'long_long_cosh', 'longlongcosh', 'arc_cosh', 'arccosh', 'long_arc_cosh', 'longarccosh', 'long_long_arc_cosh', 'longlongarccosh', 'tanh', 'long_tanh', 'longtanh', 'long_long_tanh', 'longlongtanh', 'arc_tanh', 'arctanh', 'long_arc_tanh', 'longarctanh', 'long_long_arc_tanh', 'longlongarctanh', 'arc_tan2', 'arctan2', 'long_arc_tan2', 'longarctan2', 'long_long_arc_tan2', 'longlongarctan2'), + 29 => array('complex_sqrt', 'complexsqrt', 'long_complex_sqrt', 'longcomplexsqrt', 'long_long_complex_sqrt', 'longlongcomplexsqrt', 'complex_exp', 'complexexp', 'long_complex_exp', 'longcomplexexp', 'long_long_complex_exp', 'longlongcomplexexp', 'complex_ln', 'complexln', 'long_complex_ln', 'longcomplexln', 'long_long_complex_ln', 'longlongcomplexln', 'complex_sin', 'complexsin', 'long_complex_sin', 'longcomplexsin', 'long_long_complex_sin', 'longlongcomplexsin', 'complex_arc_sin', 'complexarcsin', 'long_complex_arc_sin', 'longcomplexarcsin', 'long_long_complex_arc_sin', 'longlongcomplexarcsin', 'complex_cos', 'complexcos', 'long_complex_cos', 'longcomplexcos', 'long_long_complex_cos', 'longlongcomplexcos', 'complex_arc_cos', 'complexarccos', 'long_complex_arc_cos', 'longcomplexarccos', 'long_long_complex_arc_cos', 'longlongcomplexarccos', 'complex_tan', 'complextan', 'long_complex_tan', 'longcomplextan', 'long_long_complex_tan', 'longlongcomplextan', 'complex_arc_tan', 'complexarctan', 'long_complex_arc_tan', 'longcomplexarctan', 'long_long_complex_arc_tan', 'longlongcomplexarctan', 'complex_sinh', 'complexsinh', 'complex_arc_sinh', 'complexarcsinh', 'complex_cosh', 'complexcosh', 'complex_arc_cosh', 'complexarccosh', 'complex_tanh', 'complextanh', 'complex_arc_tanh', 'complexarctanh') + ), + 'SYMBOLS' => array( + 1 => array( + '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', '!', '^', '&', '|', '?', ':', ';', ',' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + 9 => true, + 10 => true, + 11 => true, + 12 => true, + 13 => true, + 14 => true, + 15 => true, + 16 => true, + 17 => true, + 18 => true, + 19 => true, + 20 => true, + 21 => true, + 22 => true, + 23 => true, + 24 => true, + 25 => true, + 26 => true, + 27 => true, + 28 => true, + 29 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100; font-weight: bold;', + 2 => 'color: #b1b100; font-weight: bold;', + 3 => 'color: #b1b100; font-weight: bold;', + 4 => 'color: #b1b100; font-weight: bold;', + 5 => 'color: #b1b100; font-weight: bold;', + 6 => 'color: #b1b100; font-weight: bold;', + 7 => 'color: #b1b100; font-weight: bold;', + 8 => 'color: #b1b100; font-weight: bold;', + 9 => 'color: #b1b100; font-weight: bold;', + 10 => 'color: #b1b100; font-weight: bold;', + 11 => 'color: #b1b100; font-weight: bold;', + 12 => 'color: #b1b100; font-weight: bold;', + 13 => 'color: #b1b100; font-weight: bold;', + 14 => 'color: #b1b100; font-weight: bold;', + 15 => 'color: #b1b100; font-weight: bold;', + 16 => 'color: #b1b100; font-weight: bold;', + 17 => 'color: #b1b100; font-weight: bold;', + 18 => 'color: #b1b100; font-weight: bold;', + 19 => 'color: #b1b100; font-weight: bold;', + 20 => 'color: #b1b100;', + 21 => 'color: #b1b100;', + 22 => 'color: #b1b100;', + 23 => 'color: #b1b100;', + 24 => 'color: #b1b100;', + 25 => 'color: #b1b100;', + 26 => 'color: #b1b100;', + 27 => 'color: #b1b100;', + 28 => 'color: #b1b100;', + 29 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #666666; font-style: italic;', + 3 => 'color: #666666; font-style: italic;', + 4 => 'color: #666666; font-style: italic;', + 5 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + ), + 'METHODS' => array( + 0 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 1 => 'color: #339933;' + ), + 'REGEXPS' => array(), + 'SCRIPT' => array() + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + 9 => '', + 10 => '', + 11 => '', + 12 => '', + 13 => '', + 14 => '', + 15 => '', + 16 => '', + 17 => '', + 18 => '', + 19 => '', + 20 => '', + 21 => '', + 22 => '', + 23 => '', + 24 => '', + 25 => '', + 26 => '', + 27 => '', + 28 => '', + 29 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => 'OF' + ), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/apache.php b/_piecrust/libs/Geshi/geshi/apache.php new file mode 100644 index 0000000..ddd4d6a --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/apache.php @@ -0,0 +1,480 @@ + 'Apache configuration', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + /*keywords*/ + 1 => array( + //core.c + 'AcceptFilter','AcceptPathInfo','AccessConfig','AccessFileName', + 'AddDefaultCharset','AddOutputFilterByType','AllowEncodedSlashes', + 'AllowOverride','AuthName','AuthType','ContentDigest', + 'CoreDumpDirectory','DefaultType','DocumentRoot','EnableMMAP', + 'EnableSendfile','ErrorDocument','ErrorLog','FileETag','ForceType', + 'HostnameLookups','Include','LimitInternalRecursion', + 'LimitRequestBody','LimitRequestFields','LimitRequestFieldsize', + 'LimitRequestLine','LimitXMLRequestBody','LogLevel','MaxMemFree', + 'MaxRequestsPerChild','NameVirtualHost','Options','PidFile','Port', + 'Protocol','Require','RLimitCPU','RLimitMEM','RLimitNPROC', + 'Satisfy','ScoreBoardFile','ServerAdmin','ServerAlias','ServerName', + 'ServerPath','ServerRoot','ServerSignature','ServerTokens', + 'SetHandler','SetInputFilter','SetOutputFilter','ThreadStackSize', + 'Timeout','TraceEnable','UseCanonicalName', + 'UseCanonicalPhysicalPort', + + //http_core.c + 'KeepAlive','KeepAliveTimeout','MaxKeepAliveRequests', + + //mod_actions.c + 'Action','Script', + + //mod_alias.c + 'Alias','AliasMatch','Redirect','RedirectMatch','RedirectPermanent', + 'RedirectTemp','ScriptAlias','ScriptAliasMatch', + + //mod_asis.c + + //mod_auth_basic.c + 'AuthBasicAuthoritative','AuthBasicProvider', + + //mod_auth_digest.c + 'AuthDigestAlgorithm','AuthDigestDomain','AuthDigestNcCheck', + 'AuthDigestNonceFormat','AuthDigestNonceLifetime', + 'AuthDigestProvider','AuthDigestQop','AuthDigestShmemSize', + + //mod_authn_alias.c + + //mod_authn_anon.c + 'Anonymous','Anonymous_LogEmail','Anonymous_MustGiveEmail', + 'Anonymous_NoUserId','Anonymous_VerifyEmail', + + //mod_authn_dbd.c + 'AuthDBDUserPWQuery','AuthDBDUserRealmQuery', + + //mod_authn_dbm.c + 'AuthDBMType','AuthDBMUserFile', + + //mod_authn_default.c + 'AuthDefaultAuthoritative', + + //mod_authn_file.c + 'AuthUserFile', + + //mod_authnz_ldap.c + 'AuthLDAPBindDN','AuthLDAPBindPassword','AuthLDAPCharsetConfig', + 'AuthLDAPCompareDNOnServer','AuthLDAPDereferenceAliases', + 'AuthLDAPGroupAttribute','AuthLDAPGroupAttributeIsDN', + 'AuthLDAPRemoteUserAttribute','AuthLDAPRemoteUserIsDN', + 'AuthLDAPURL','AuthzLDAPAuthoritative', + + //mod_authz_dbm.c + 'AuthDBMGroupFile','AuthzDBMAuthoritative','AuthzDBMType', + + //mod_authz_default.c + 'AuthzDefaultAuthoritative', + + //mod_authz_groupfile.c + 'AuthGroupFile','AuthzGroupFileAuthoritative', + + //mod_authz_host.c + 'Allow','Deny','Order', + + //mod_authz_owner.c + 'AuthzOwnerAuthoritative', + + //mod_authz_svn.c + 'AuthzForceUsernameCase','AuthzSVNAccessFile','AuthzSVNAnonymous', + 'AuthzSVNAuthoritative','AuthzSVNNoAuthWhenAnonymousAllowed', + + //mod_authz_user.c + 'AuthzUserAuthoritative', + + //mod_autoindex.c + 'AddAlt','AddAltByEncoding','AddAltByType','AddDescription', + 'AddIcon','AddIconByEncoding','AddIconByType','DefaultIcon', + 'FancyIndexing','HeaderName','IndexHeadInsert','IndexIgnore', + 'IndexOptions','IndexOrderDefault','IndexStyleSheet','ReadmeName', + + //mod_bt.c + 'Tracker','TrackerDetailURL','TrackerFlags','TrackerHashMaxAge', + 'TrackerHashMinAge','TrackerHashWatermark','TrackerHome', + 'TrackerReturnInterval','TrackerReturnMax', + 'TrackerReturnPeerFactor','TrackerReturnPeers','TrackerRootInclude', + 'TrackerStyleSheet', + + //mod_bw.c + 'BandWidth','BandWidthError','BandWidthModule','BandWidthPacket', + 'ForceBandWidthModule','LargeFileLimit','MaxConnection', + 'MinBandWidth', + + //mod_cache.c + 'CacheDefaultExpire','CacheDisable','CacheEnable', + 'CacheIgnoreCacheControl','CacheIgnoreHeaders', + 'CacheIgnoreNoLastMod','CacheIgnoreQueryString', + 'CacheLastModifiedFactor','CacheMaxExpire','CacheStoreNoStore', + 'CacheStorePrivate', + + //mod_cern_meta.c + 'MetaDir','MetaFiles','MetaSuffix', + + //mod_cgi.c + 'ScriptLog','ScriptLogBuffer','ScriptLogLength', + + //mod_charset_lite.c + 'CharsetDefault','CharsetOptions','CharsetSourceEnc', + + //mod_dav.c + 'DAV','DAVDepthInfinity','DAVMinTimeout', + + //mod_dav_fs.c + 'DAVLockDB', + + //mod_dav_lock.c + 'DAVGenericLockDB', + + //mod_dav_svn.c + 'SVNActivitiesDB','SVNAllowBulkUpdates','SVNAutoversioning', + 'SVNIndexXSLT','SVNListParentPath','SVNMasterURI','SVNParentPath', + 'SVNPath','SVNPathAuthz','SVNReposName','SVNSpecialURI', + + //mod_dbd.c + 'DBDExptime','DBDKeep','DBDMax','DBDMin','DBDParams','DBDPersist', + 'DBDPrepareSQL','DBDriver', + + //mod_deflate.c + 'DeflateBufferSize','DeflateCompressionLevel','DeflateFilterNote', + 'DeflateMemLevel','DeflateWindowSize', + + //mod_dir.c + 'DirectoryIndex','DirectorySlash', + + //mod_disk_cache.c + 'CacheDirLength','CacheDirLevels','CacheMaxFileSize', + 'CacheMinFileSize','CacheRoot', + + //mod_dumpio.c + 'DumpIOInput','DumpIOLogLevel','DumpIOOutput', + + //mod_env.c + 'PassEnv','SetEnv','UnsetEnv', + + //mod_expires.c + 'ExpiresActive','ExpiresByType','ExpiresDefault', + + //mod_ext_filter.c + 'ExtFilterDefine','ExtFilterOptions', + + //mod_file_cache.c + 'cachefile','mmapfile', + + //mod_filter.c + 'FilterChain','FilterDeclare','FilterProtocol','FilterProvider', + 'FilterTrace', + + //mod_gnutls.c + 'GnuTLSCache','GnuTLSCacheTimeout','GnuTLSCertificateFile', + 'GnuTLSKeyFile','GnuTLSPGPCertificateFile','GnuTLSPGPKeyFile', + 'GnuTLSClientVerify','GnuTLSClientCAFile','GnuTLSPGPKeyringFile', + 'GnuTLSEnable','GnuTLSDHFile','GnuTLSRSAFile','GnuTLSSRPPasswdFile', + 'GnuTLSSRPPasswdConfFile','GnuTLSPriorities', + 'GnuTLSExportCertificates', + + //mod_headers.c + 'Header','RequestHeader', + + //mod_imagemap.c + 'ImapBase','ImapDefault','ImapMenu', + + //mod_include.c + 'SSIAccessEnable','SSIEndTag','SSIErrorMsg','SSIStartTag', + 'SSITimeFormat','SSIUndefinedEcho','XBitHack', + + //mod_ident.c + 'IdentityCheck','IdentityCheckTimeout', + + //mod_info.c + 'AddModuleInfo', + + //mod_isapi.c + 'ISAPIAppendLogToErrors','ISAPIAppendLogToQuery','ISAPICacheFile', + 'ISAPIFakeAsync','ISAPILogNotSupported','ISAPIReadAheadBuffer', + + //mod_log_config.c + 'BufferedLogs','CookieLog','CustomLog','LogFormat','TransferLog', + + //mod_log_forensic.c + 'ForensicLog', + + //mod_log_rotate.c + 'RotateInterval','RotateLogs','RotateLogsLocalTime', + + //mod_logio.c + + //mod_mem_cache.c + 'MCacheMaxObjectCount','MCacheMaxObjectSize', + 'MCacheMaxStreamingBuffer','MCacheMinObjectSize', + 'MCacheRemovalAlgorithm','MCacheSize', + + //mod_mime.c + 'AddCharset','AddEncoding','AddHandler','AddInputFilter', + 'AddLanguage','AddOutputFilter','AddType','DefaultLanguage', + 'ModMimeUsePathInfo','MultiviewsMatch','RemoveCharset', + 'RemoveEncoding','RemoveHandler','RemoveInputFilter', + 'RemoveLanguage','RemoveOutputFilter','RemoveType','TypesConfig', + + //mod_mime_magic.c + 'MimeMagicFile', + + //mod_negotiation.c + 'CacheNegotiatedDocs','ForceLanguagePriority','LanguagePriority', + + //mod_php5.c + 'php_admin_flag','php_admin_value','php_flag','php_value', + 'PHPINIDir', + + //mod_proxy.c + 'AllowCONNECT','BalancerMember','NoProxy','ProxyBadHeader', + 'ProxyBlock','ProxyDomain','ProxyErrorOverride', + 'ProxyFtpDirCharset','ProxyIOBufferSize','ProxyMaxForwards', + 'ProxyPass','ProxyPassInterpolateEnv','ProxyPassMatch', + 'ProxyPassReverse','ProxyPassReverseCookieDomain', + 'ProxyPassReverseCookiePath','ProxyPreserveHost', + 'ProxyReceiveBufferSize','ProxyRemote','ProxyRemoteMatch', + 'ProxyRequests','ProxySet','ProxyStatus','ProxyTimeout','ProxyVia', + + //mod_proxy_ajp.c + + //mod_proxy_balancer.c + + //mod_proxy_connect.c + + //mod_proxy_ftp.c + + //mod_proxy_http.c + + //mod_rewrite.c + 'RewriteBase','RewriteCond','RewriteEngine','RewriteLock', + 'RewriteLog','RewriteLogLevel','RewriteMap','RewriteOptions', + 'RewriteRule', + + //mod_setenvif.c + 'BrowserMatch','BrowserMatchNoCase','SetEnvIf','SetEnvIfNoCase', + + //mod_so.c + 'LoadFile','LoadModule', + + //mod_speling.c + 'CheckCaseOnly','CheckSpelling', + + //mod_ssl.c + 'SSLCACertificateFile','SSLCACertificatePath','SSLCADNRequestFile', + 'SSLCADNRequestPath','SSLCARevocationFile','SSLCARevocationPath', + 'SSLCertificateChainFile','SSLCertificateFile', + 'SSLCertificateKeyFile','SSLCipherSuite','SSLCryptoDevice', + 'SSLEngine','SSLHonorCipherOrder','SSLMutex','SSLOptions', + 'SSLPassPhraseDialog','SSLProtocol','SSLProxyCACertificateFile', + 'SSLProxyCACertificatePath','SSLProxyCARevocationFile', + 'SSLProxyCARevocationPath','SSLProxyCipherSuite','SSLProxyEngine', + 'SSLProxyMachineCertificateFile','SSLProxyMachineCertificatePath', + 'SSLProxyProtocol','SSLProxyVerify','SSLProxyVerifyDepth', + 'SSLRandomSeed','SSLRenegBufferSize','SSLRequire','SSLRequireSSL', + 'SSLSessionCache','SSLSessionCacheTimeout','SSLUserName', + 'SSLVerifyClient','SSLVerifyDepth', + + //mod_status.c + 'ExtendedStatus','SeeRequestTail', + + //mod_substitute.c + 'Substitute', + + //mod_suexec.c + 'SuexecUserGroup', + + //mod_unique_id.c + + //mod_userdir.c + 'UserDir', + + //mod_usertrack.c + 'CookieDomain','CookieExpires','CookieName','CookieStyle', + 'CookieTracking', + + //mod_version.c + + //mod_vhost_alias.c + 'VirtualDocumentRoot','VirtualDocumentRootIP', + 'VirtualScriptAlias','VirtualScriptAliasIP', + + //mod_view.c + 'ViewEnable', + + //mod_win32.c + 'ScriptInterpreterSource', + + //mpm_winnt.c + 'Listen','ListenBacklog','ReceiveBufferSize','SendBufferSize', + 'ThreadLimit','ThreadsPerChild','Win32DisableAcceptEx', + + //mpm_common.c + 'AcceptMutex','AddModule','ClearModuleList','EnableExceptionHook', + 'Group','LockFile','MaxClients','MaxSpareServers','MaxSpareThreads', + 'MinSpareServers','MinSpareThreads','ServerLimit','StartServers', + 'StartThreads','User', + + //util_ldap.c + 'LDAPCacheEntries','LDAPCacheTTL','LDAPConnectionTimeout', + 'LDAPOpCacheEntries','LDAPOpCacheTTL','LDAPSharedCacheFile', + 'LDAPSharedCacheSize','LDAPTrustedClientCert', + 'LDAPTrustedGlobalCert','LDAPTrustedMode','LDAPVerifyServerCert', + + //Unknown Mods ... + 'AgentLog','BindAddress','bs2000account','CacheForceCompletion', + 'CacheGCInterval','CacheSize','NoCache','qsc','RefererIgnore', + 'RefererLog','Resourceconfig','ServerType','SingleListen' + ), + /*keywords 2*/ + 2 => array( + 'all','on','off','standalone','inetd','indexes', + 'force-response-1.0','downgrade-1.0','nokeepalive', + 'includes','followsymlinks','none', + 'x-compress','x-gzip' + ), + /*keywords 3*/ + 3 => array( + //core.c + 'Directory','DirectoryMatch','Files','FilesMatch','IfDefine', + 'IfModule','Limit','LimitExcept','Location','LocationMatch', + 'VirtualHost', + + //mod_authn_alias.c + 'AuthnProviderAlias', + + //mod_proxy.c + 'Proxy','ProxyMatch', + + //mod_version.c + 'IfVersion' + ) + ), + 'SYMBOLS' => array( + '+', '-' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00007f;', + 2 => 'color: #0000ff;', + 3 => 'color: #000000; font-weight:bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #339933;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'BRACKETS' => GESHI_NEVER, + 'SYMBOLS' => GESHI_NEVER + ), + 'KEYWORDS' => array( + 3 => array( + 'DISALLOWED_BEFORE' => '(?<=<|<\/)', + 'DISALLOWED_AFTER' => '(?=\s|\/|>)', + ) + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/applescript.php b/_piecrust/libs/Geshi/geshi/applescript.php new file mode 100644 index 0000000..870ac0f --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/applescript.php @@ -0,0 +1,157 @@ + 'AppleScript', + 'COMMENT_SINGLE' => array(1 => '--'), + 'COMMENT_MULTI' => array( '(*' => '*)'), + 'COMMENT_REGEXP' => array( + 2 => '/(?<=[a-z])\'/i', + 3 => '/(? GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'application','close','count','delete','duplicate','exists','launch','make','move','open', + 'print','quit','reopen','run','save','saving', 'idle', 'path to', 'number', 'alias', 'list', 'text', 'string', + 'integer', 'it','me','version','pi','result','space','tab','anything','case','diacriticals','expansion', + 'hyphens','punctuation','bold','condensed','expanded','hidden','italic','outline','plain', + 'shadow','strikethrough','subscript','superscript','underline','ask','no','yes','false', 'id', + 'true','weekday','monday','mon','tuesday','tue','wednesday','wed','thursday','thu','friday', + 'fri','saturday','sat','sunday','sun','month','january','jan','february','feb','march', + 'mar','april','apr','may','june','jun','july','jul','august','aug','september', 'quote', 'do JavaScript', + 'sep','october','oct','november','nov','december','dec','minutes','hours', 'name', 'default answer', + 'days','weeks', 'folder', 'folders', 'file', 'files', 'window', 'eject', 'disk', 'reveal', 'sleep', + 'shut down', 'restart', 'display dialog', 'buttons', 'invisibles', 'item', 'items', 'delimiters', 'offset of', + 'AppleScript\'s', 'choose file', 'choose folder', 'choose from list', 'beep', 'contents', 'do shell script', + 'paragraph', 'paragraphs', 'missing value', 'quoted form', 'desktop', 'POSIX path', 'POSIX file', + 'activate', 'document', 'adding', 'receiving', 'content', 'new', 'properties', 'info for', 'bounds', + 'selection', 'extension', 'into', 'onto', 'by', 'between', 'against', 'set the clipboard to', 'the clipboard' + ), + 2 => array( + 'each','some','every','whose','where','index','first','second','third','fourth', + 'fifth','sixth','seventh','eighth','ninth','tenth','last','front','back','st','nd', + 'rd','th','middle','named','through','thru','before','after','beginning','the', 'as', + 'div','mod','and','not','or','contains','equal','equals','isnt', 'less', 'greater' + ), + 3 => array( + 'script','property','prop','end','to','set','global','local','on','of', + 'in','given','with','without','return','continue','tell','if','then','else','repeat', + 'times','while','until','from','exit','try','error','considering','ignoring','timeout', + 'transaction','my','get','put','is', 'copy' + ) + ), + 'SYMBOLS' => array( + ')','+','-','^','*','/','&','<','>=','<','<=','=','�' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0066ff;', + 2 => 'color: #ff0033;', + 3 => 'color: #ff0033; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => '', + 3 => 'color: #ff0000;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000000; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #009900;' + ), + 'NUMBERS' => array( + 0 => 'color: #000000;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;' + ), + 'REGEXPS' => array( + 0 => 'color: #339933;', + 4 => 'color: #0066ff;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => ',+-=<>/?^&*' + ), + 'REGEXPS' => array( + //Variables + 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*', + //File descriptors + 4 => '<[a-zA-Z_][a-zA-Z0-9_]*>', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'SPACE_AS_WHITESPACE' => true + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/apt_sources.php b/_piecrust/libs/Geshi/geshi/apt_sources.php new file mode 100644 index 0000000..0512380 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/apt_sources.php @@ -0,0 +1,144 @@ + 'Apt sources', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + /*keywords*/ + 1 => array( + 'deb-src', 'deb' + ), + 2 => array( + //Generic + 'stable', 'old-stable', 'testing', 'testing-proposed-updates', + 'unstable', 'unstable-proposed-updates', 'experimental', + 'non-US', 'security', 'volatile', 'volatile-sloppy', + 'apt-build', + 'stable/updates', + //Debian + 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', 'woody', 'sarge', + 'etch', 'lenny', 'sid', + //Ubuntu + 'warty', 'warty-updates', 'warty-security', 'warty-proposed', 'warty-backports', + 'hoary', 'hoary-updates', 'hoary-security', 'hoary-proposed', 'hoary-backports', + 'breezy', 'breezy-updates', 'breezy-security', 'breezy-proposed', 'breezy-backports', + 'dapper', 'dapper-updates', 'dapper-security', 'dapper-proposed', 'dapper-backports', + 'edgy', 'edgy-updates', 'edgy-security', 'edgy-proposed', 'edgy-backports', + 'feisty', 'feisty-updates', 'feisty-security', 'feisty-proposed', 'feisty-backports', + 'gutsy', 'gutsy-updates', 'gutsy-security', 'gutsy-proposed', 'gutsy-backports', + 'hardy', 'hardy-updates', 'hardy-security', 'hardy-proposed', 'hardy-backports', + 'intrepid', 'intrepid-updates', 'intrepid-security', 'intrepid-proposed', 'intrepid-backports' + ), + 3 => array( + 'main', 'restricted', 'preview', 'contrib', 'non-free', + 'commercial', 'universe', 'multiverse' + ) + ), + 'REGEXPS' => array( + 0 => "(((http|ftp):\/\/|file:\/)[^\s]+)|(cdrom:\[[^\]]*\][^\s]*)", + ), + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => true, + 3 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00007f;', + 2 => 'color: #b1b100;', + 3 => 'color: #b16000;' + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + ), + 'STRINGS' => array( + ), + 'NUMBERS' => array( + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + ), + 'REGEXPS' => array( + 0 => 'color: #009900;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'NUMBERS' => GESHI_NEVER, + 'METHODS' => GESHI_NEVER, + 'SCRIPT' => GESHI_NEVER, + 'SYMBOLS' => GESHI_NEVER, + 'ESCAPE_CHAR' => GESHI_NEVER, + 'BRACKETS' => GESHI_NEVER, + 'STRINGS' => GESHI_NEVER, + ), + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => '(?|^\/])', + 'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-&\.])' + ) + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/asm.php b/_piecrust/libs/Geshi/geshi/asm.php new file mode 100644 index 0000000..aebfa35 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/asm.php @@ -0,0 +1,225 @@ + 'ASM', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + //Line address prefix suppression + 'COMMENT_REGEXP' => array(2 => "/^(?:[0-9a-f]{0,4}:)?[0-9a-f]{4}(?:[0-9a-f]{4})?/mi"), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /*CPU*/ + 1 => array( + 'aaa','aad','aam','aas','adc','add','and','call','cbw','clc','cld','cli','cmc','cmp', + 'cmps','cmpsb','cmpsw','cwd','daa','das','dec','div','esc','hlt','idiv','imul','in','inc', + 'int','into','iret','ja','jae','jb','jbe','jc','jcxz','je','jg','jge','jl','jle','jmp', + 'jna','jnae','jnb','jnbe','jnc','jne','jng','jnge','jnl','jnle','jno','jnp','jns','jnz', + 'jo','jp','jpe','jpo','js','jz','lahf','lds','lea','les','lods','lodsb','lodsw','loop', + 'loope','loopew','loopne','loopnew','loopnz','loopnzw','loopw','loopz','loopzw','mov', + 'movs','movsb','movsw','mul','neg','nop','not','or','out','pop','popf','push','pushf', + 'rcl','rcr','ret','retf','retn','rol','ror','sahf','sal','sar','sbb','scas','scasb','scasw', + 'shl','shr','stc','std','sti','stos','stosb','stosw','sub','test','wait','xchg','xlat', + 'xlatb','xor','bound','enter','ins','insb','insw','leave','outs','outsb','outsw','popa','pusha','pushw', + 'arpl','lar','lsl','sgdt','sidt','sldt','smsw','str','verr','verw','clts','lgdt','lidt','lldt','lmsw','ltr', + 'bsf','bsr','bt','btc','btr','bts','cdq','cmpsd','cwde','insd','iretd','iretdf','iretf', + 'jecxz','lfs','lgs','lodsd','loopd','looped','loopned','loopnzd','loopzd','lss','movsd', + 'movsx','movzx','outsd','popad','popfd','pushad','pushd','pushfd','scasd','seta','setae', + 'setb','setbe','setc','sete','setg','setge','setl','setle','setna','setnae','setnb','setnbe', + 'setnc','setne','setng','setnge','setnl','setnle','setno','setnp','setns','setnz','seto','setp', + 'setpe','setpo','sets','setz','shld','shrd','stosd','bswap','cmpxchg','invd','invlpg','wbinvd','xadd','lock', + 'rep','repe','repne','repnz','repz' + ), + /*FPU*/ + 2 => array( + 'f2xm1','fabs','fadd','faddp','fbld','fbstp','fchs','fclex','fcom','fcomp','fcompp','fdecstp', + 'fdisi','fdiv','fdivp','fdivr','fdivrp','feni','ffree','fiadd','ficom','ficomp','fidiv', + 'fidivr','fild','fimul','fincstp','finit','fist','fistp','fisub','fisubr','fld','fld1', + 'fldcw','fldenv','fldenvw','fldl2e','fldl2t','fldlg2','fldln2','fldpi','fldz','fmul', + 'fmulp','fnclex','fndisi','fneni','fninit','fnop','fnsave','fnsavew','fnstcw','fnstenv', + 'fnstenvw','fnstsw','fpatan','fprem','fptan','frndint','frstor','frstorw','fsave', + 'fsavew','fscale','fsqrt','fst','fstcw','fstenv','fstenvw','fstp','fstsw','fsub','fsubp', + 'fsubr','fsubrp','ftst','fwait','fxam','fxch','fxtract','fyl2x','fyl2xp1', + 'fsetpm','fcos','fldenvd','fnsaved','fnstenvd','fprem1','frstord','fsaved','fsin','fsincos', + 'fstenvd','fucom','fucomp','fucompp' + ), + /*registers*/ + 3 => array( + 'ah','al','ax','bh','bl','bp','bx','ch','cl','cr0','cr2','cr3','cs','cx','dh','di','dl', + 'dr0','dr1','dr2','dr3','dr6','dr7','ds','dx','eax','ebp','ebx','ecx','edi','edx', + 'es','esi','esp','fs','gs','si','sp','ss','st','tr3','tr4','tr5','tr6','tr7' + ), + /*Directive*/ + 4 => array( + '186','286','286c','286p','287','386','386c','386p','387','486','486p', + '8086','8087','alpha','break','code','const','continue','cref','data','data?', + 'dosseg','else','elseif','endif','endw','err','err1','err2','errb', + 'errdef','errdif','errdifi','erre','erridn','erridni','errnb','errndef', + 'errnz','exit','fardata','fardata?','if','lall','lfcond','list','listall', + 'listif','listmacro','listmacroall',' model','no87','nocref','nolist', + 'nolistif','nolistmacro','radix','repeat','sall','seq','sfcond','stack', + 'startup','tfcond','type','until','untilcxz','while','xall','xcref', + 'xlist','alias','align','assume','catstr','comm','comment','db','dd','df','dq', + 'dt','dup','dw','echo','elseif1','elseif2','elseifb','elseifdef','elseifdif', + 'elseifdifi','elseife','elseifidn','elseifidni','elseifnb','elseifndef','end', + 'endm','endp','ends','eq',' equ','even','exitm','extern','externdef','extrn','for', + 'forc','ge','goto','group','high','highword','if1','if2','ifb','ifdef','ifdif', + 'ifdifi','ife',' ifidn','ifidni','ifnb','ifndef','include','includelib','instr','invoke', + 'irp','irpc','label','le','length','lengthof','local','low','lowword','lroffset', + 'macro','mask','mod','msfloat','name','ne','offset','opattr','option','org','%out', + 'page','popcontext','private','proc','proto','ptr','public','purge','pushcontext','record', + 'rept','seg','segment','short','size','sizeof','sizestr','struc','struct', + 'substr','subtitle','subttl','textequ','this','title','typedef','union','width', + '.model', '.stack', '.code', '.data' + ), + /*Operands*/ + 5 => array( + '@b','@f','addr','basic','byte','c','carry?','dword', + 'far','far16','fortran','fword','near','near16','overflow?','parity?','pascal','qword', + 'real4',' real8','real10','sbyte','sdword','sign?','stdcall','sword','syscall','tbyte', + 'vararg','word','zero?','flat','near32','far32', + 'abs','all','assumes','at','casemap','common','compact', + 'cpu','dotname','emulator','epilogue','error','export','expr16','expr32','farstack', + 'forceframe','huge','language','large','listing','ljmp','loadds','m510','medium','memory', + 'nearstack','nodotname','noemulator','nokeyword','noljmp','nom510','none','nonunique', + 'nooldmacros','nooldstructs','noreadonly','noscoped','nosignextend','nothing', + 'notpublic','oldmacros','oldstructs','os_dos','para','prologue', + 'readonly','req','scoped','setif2','smallstack','tiny','use16','use32','uses' + ) + ), + 'SYMBOLS' => array( + '[', ']', '(', ')', + '+', '-', '*', '/', '%', + '.', ',', ';', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00007f; font-weight: bold;', + 2 => 'color: #0000ff; font-weight: bold;', + 3 => 'color: #00007f;', + 4 => 'color: #000000; font-weight: bold;', + 5 => 'color: #000000; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #adadad; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000ff;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( +// 0 => 'color: #0000ff;', +// 1 => 'color: #0000ff;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '' + ), + 'NUMBERS' => + GESHI_NUMBER_BIN_PREFIX_PERCENT | + GESHI_NUMBER_BIN_SUFFIX | + GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_HEX_SUFFIX | + GESHI_NUMBER_OCT_SUFFIX | + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_NONSCI_F | + GESHI_NUMBER_FLT_SCI_ZERO, + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + //Hex numbers +// 0 => /* */ "(?<=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))(?:[0-9][0-9a-fA-F]{0,31}[hH]|0x[0-9a-fA-F]{1,32})(?=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))", + //Binary numbers +// 1 => "(?<=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))[01]{1,64}[bB](?=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))" + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(?|^])", + 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%])" + ) + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/asp.php b/_piecrust/libs/Geshi/geshi/asp.php new file mode 100644 index 0000000..5f48f11 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/asp.php @@ -0,0 +1,164 @@ + 'ASP', + 'COMMENT_SINGLE' => array(1 => "'", 2 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'include', 'file', 'Const', 'Dim', 'Option', 'Explicit', 'Implicit', 'Set', 'Select', 'ReDim', 'Preserve', + 'ByVal', 'ByRef', 'End', 'Private', 'Public', 'If', 'Then', 'Else', 'ElseIf', 'Case', 'With', 'NOT', + 'While', 'Wend', 'For', 'Loop', 'Do', 'Request', 'Response', 'Server', 'ADODB', 'Session', 'Application', + 'Each', 'In', 'Get', 'Next', 'INT', 'CINT', 'CBOOL', 'CDATE', 'CBYTE', 'CCUR', 'CDBL', 'CLNG', 'CSNG', + 'CSTR', 'Fix', 'Is', 'Sgn', 'String', 'Boolean', 'Currency', 'Me', 'Single', 'Long', 'Integer', 'Byte', + 'Variant', 'Double', 'To', 'Let', 'Xor', 'Resume', 'On', 'Error', 'Imp', 'GoTo', 'Call', 'Global' + ), + 2 => array( + 'Null', 'Nothing', 'And', + 'False', + 'True', 'var', 'Or', 'BOF', 'EOF', 'xor', + 'Function', 'Class', 'New', 'Sub' + ), + 3 => array( + 'CreateObject', 'Write', 'Redirect', 'Cookies', 'BinaryRead', 'ClientCertificate', 'Form', 'QueryString', + 'ServerVariables', 'TotalBytes', 'AddHeader', 'AppendToLog', 'BinaryWrite', 'Buffer', 'CacheControl', + 'Charset', 'Clear', 'ContentType', 'End()', 'Expires', 'ExpiresAbsolute', 'Flush()', 'IsClientConnected', + 'PICS', 'Status', 'Connection', 'Recordset', 'Execute', 'Abandon', 'Lock', 'UnLock', 'Command', 'Fields', + 'Properties', 'Property', 'Send', 'Replace', 'InStr', 'TRIM', 'NOW', 'Day', 'Month', 'Hour', 'Minute', 'Second', + 'Year', 'MonthName', 'LCase', 'UCase', 'Abs', 'Array', 'As', 'LEN', 'MoveFirst', 'MoveLast', 'MovePrevious', + 'MoveNext', 'LBound', 'UBound', 'Transfer', 'Open', 'Close', 'MapPath', 'FileExists', 'OpenTextFile', 'ReadAll' + ) + ), + 'SYMBOLS' => array( + 1 => array( + '<%', '%>' + ), + 0 => array( + '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', + ';', ':', '?', '='), + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #990099; font-weight: bold;', + 2 => 'color: #0000ff; font-weight: bold;', + 3 => 'color: #330066;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000;', + 2 => 'color: #ff6600;', + 'MULTI' => 'color: #008000;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #006600; font-weight:bold;' + ), + 'STRINGS' => array( + 0 => 'color: #cc0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #800000;' + ), + 'METHODS' => array( + 1 => 'color: #9900cc;' + ), + 'SYMBOLS' => array( + 0 => 'color: #006600; font-weight: bold;', + 1 => 'color: #000000; font-weight: bold;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '<%' => '%>' + ), + 1 => array( + '' + ), + 2 => array( + '' + ), + 3 => "/(?P<%=?)(?:\"[^\"]*?\"|\/\*(?!\*\/).*?\*\/|.)*?(?P%>|\Z)/sm" + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/autoconf.php b/_piecrust/libs/Geshi/geshi/autoconf.php new file mode 100644 index 0000000..3f35e8a --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/autoconf.php @@ -0,0 +1,512 @@ + 'Autoconf', + 'COMMENT_SINGLE' => array(2 => '#'), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + //Multiline-continued single-line comments + 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', + //Multiline-continued preprocessor define + 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m', + //Single Line comment started by dnl + 3 => '/(? GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array(), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | + GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( + 'AC_ACT_IFELSE', + 'AC_AIX', + 'AC_ALLOCA', + 'AC_ARG_ARRAY', + 'AC_ARG_ENABLE', + 'AC_ARG_PROGRAM', + 'AC_ARG_VAR', + 'AC_ARG_WITH', + 'AC_AUTOCONF_VERSION', + 'AC_BEFORE', + 'AC_C_BACKSLASH_A', + 'AC_C_BIGENDIAN', + 'AC_C_CHAR_UNSIGNED', + 'AC_C_CONST', + 'AC_C_CROSS', + 'AC_C_FLEXIBLE_ARRAY_MEMBER', + 'AC_C_INLINE', + 'AC_C_LONG_DOUBLE', + 'AC_C_PROTOTYPES', + 'AC_C_RESTRICT', + 'AC_C_STRINGIZE', + 'AC_C_TYPEOF', + 'AC_C_VARARRAYS', + 'AC_C_VOLATILE', + 'AC_CACHE_CHECK', + 'AC_CACHE_LOAD', + 'AC_CACHE_SAVE', + 'AC_CACHE_VAL', + 'AC_CANONICAL_BUILD', + 'AC_CANONICAL_HOST', + 'AC_CANONICAL_SYSTEM', + 'AC_CANONICAL_TARGET', + 'AC_CHAR_UNSIGNED', + 'AC_CHECK_ALIGNOF', + 'AC_CHECK_DECL', + 'AC_CHECK_DECLS', + 'AC_CHECK_DECLS_ONCE', + 'AC_CHECK_FILE', + 'AC_CHECK_FILES', + 'AC_CHECK_FUNC', + 'AC_CHECK_FUNCS', + 'AC_CHECK_FUNCS_ONCE', + 'AC_CHECK_HEADER', + 'AC_CHECK_HEADERS', + 'AC_CHECK_HEADERS_ONCE', + 'AC_CHECK_LIB', + 'AC_CHECK_MEMBER', + 'AC_CHECK_MEMBERS', + 'AC_CHECK_PROG', + 'AC_CHECK_PROGS', + 'AC_CHECK_SIZEOF', + 'AC_CHECK_TARGET_TOOL', + 'AC_CHECK_TARGET_TOOLS', + 'AC_CHECK_TOOL', + 'AC_CHECK_TOOLS', + 'AC_CHECK_TYPE', + 'AC_CHECK_TYPES', + 'AC_CHECKING', + 'AC_COMPILE_CHECK', + 'AC_COMPILE_IFELSE', + 'AC_COMPUTE_INT', + 'AC_CONFIG_AUX_DIR', + 'AC_CONFIG_COMMANDS', + 'AC_CONFIG_COMMANDS_POST', + 'AC_CONFIG_COMMANDS_PRE', + 'AC_CONFIG_FILES', + 'AC_CONFIG_HEADERS', + 'AC_CONFIG_ITEMS', + 'AC_CONFIG_LIBOBJ_DIR', + 'AC_CONFIG_LINKS', + 'AC_CONFIG_MACRO_DIR', + 'AC_CONFIG_SRCDIR', + 'AC_CONFIG_SUBDIRS', + 'AC_CONFIG_TESTDIR', + 'AC_CONST', + 'AC_COPYRIGHT', + 'AC_CROSS_CHECK', + 'AC_CYGWIN', + 'AC_DATAROOTDIR_CHECKED', + 'AC_DECL_SYS_SIGLIST', + 'AC_DECL_YYTEXT', + 'AC_DEFINE', + 'AC_DEFINE_UNQUOTED', + 'AC_DEFUN', + 'AC_DEFUN_ONCE', + 'AC_DIAGNOSE', + 'AC_DIR_HEADER', + 'AC_DISABLE_OPTION_CHECKING', + 'AC_DYNIX_SEQ', + 'AC_EGREP_CPP', + 'AC_EGREP_HEADER', + 'AC_EMXOS2', + 'AC_ENABLE', + 'AC_ERLANG_CHECK_LIB', + 'AC_ERLANG_NEED_ERL', + 'AC_ERLANG_NEED_ERLC', + 'AC_ERLANG_PATH_ERL', + 'AC_ERLANG_PATH_ERLC', + 'AC_ERLANG_SUBST_ERTS_VER', + 'AC_ERLANG_SUBST_INSTALL_LIB_DIR', + 'AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR', + 'AC_ERLANG_SUBST_LIB_DIR', + 'AC_ERLANG_SUBST_ROOT_DIR', + 'AC_ERROR', + 'AC_EXEEXT', + 'AC_F77_DUMMY_MAIN', + 'AC_F77_FUNC', + 'AC_F77_LIBRARY_LDFLAGS', + 'AC_F77_MAIN', + 'AC_F77_WRAPPERS', + 'AC_FATAL', + 'AC_FC_FREEFORM', + 'AC_FC_FUNC', + 'AC_FC_LIBRARY_LDFLAGS', + 'AC_FC_MAIN', + 'AC_FC_SRCEXT', + 'AC_FC_WRAPPERS', + 'AC_FIND_X', + 'AC_FIND_XTRA', + 'AC_FOREACH', + 'AC_FUNC_ALLOCA', + 'AC_FUNC_CHECK', + 'AC_FUNC_CHOWN', + 'AC_FUNC_CLOSEDIR_VOID', + 'AC_FUNC_ERROR_AT_LINE', + 'AC_FUNC_FNMATCH', + 'AC_FUNC_FNMATCH_GNU', + 'AC_FUNC_FORK', + 'AC_FUNC_FSEEKO', + 'AC_FUNC_GETGROUPS', + 'AC_FUNC_GETLOADAVG', + 'AC_FUNC_GETMNTENT', + 'AC_FUNC_GETPGRP', + 'AC_FUNC_LSTAT', + 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK', + 'AC_FUNC_MALLOC', + 'AC_FUNC_MBRTOWC', + 'AC_FUNC_MEMCMP', + 'AC_FUNC_MKTIME', + 'AC_FUNC_MMAP', + 'AC_FUNC_OBSTACK', + 'AC_FUNC_REALLOC', + 'AC_FUNC_SELECT_ARGTYPES', + 'AC_FUNC_SETPGRP', + 'AC_FUNC_SETVBUF_REVERSED', + 'AC_FUNC_STAT', + 'AC_FUNC_STRCOLL', + 'AC_FUNC_STRERROR_R', + 'AC_FUNC_STRFTIME', + 'AC_FUNC_STRNLEN', + 'AC_FUNC_STRTOD', + 'AC_FUNC_STRTOLD', + 'AC_FUNC_UTIME_NULL', + 'AC_FUNC_VPRINTF', + 'AC_FUNC_WAIT3', + 'AC_GCC_TRADITIONAL', + 'AC_GETGROUPS_T', + 'AC_GETLOADAVG', + 'AC_GNU_SOURCE', + 'AC_HAVE_FUNCS', + 'AC_HAVE_HEADERS', + 'AC_HAVE_LIBRARY', + 'AC_HAVE_POUNDBANG', + 'AC_HEADER_ASSERT', + 'AC_HEADER_CHECK', + 'AC_HEADER_DIRENT', + 'AC_HEADER_EGREP', + 'AC_HEADER_MAJOR', + 'AC_HEADER_RESOLV', + 'AC_HEADER_STAT', + 'AC_HEADER_STDBOOL', + 'AC_HEADER_STDC', + 'AC_HEADER_SYS_WAIT', + 'AC_HEADER_TIME', + 'AC_HEADER_TIOCGWINSZ', + 'AC_HELP_STRING', + 'AC_INCLUDES_DEFAULT', + 'AC_INIT', + 'AC_INLINE', + 'AC_INT_16_BITS', + 'AC_IRIX_SUN', + 'AC_ISC_POSIX', + 'AC_LANG_ASSERT', + 'AC_LANG_C', + 'AC_LANG_CALL', + 'AC_LANG_CONFTEST', + 'AC_LANG_CPLUSPLUS', + 'AC_LANG_FORTRAN77', + 'AC_LANG_FUNC_LINK_TRY', + 'AC_LANG_POP', + 'AC_LANG_PROGRAM', + 'AC_LANG_PUSH', + 'AC_LANG_RESTORE', + 'AC_LANG_SAVE', + 'AC_LANG_SOURCE', + 'AC_LANG_WERROR', + 'AC_LIBOBJ', + 'AC_LIBSOURCE', + 'AC_LIBSOURCES', + 'AC_LINK_FILES', + 'AC_LINK_IFELSE', + 'AC_LN_S', + 'AC_LONG_64_BITS', + 'AC_LONG_DOUBLE', + 'AC_LONG_FILE_NAMES', + 'AC_MAJOR_HEADER', + 'AC_MEMORY_H', + 'AC_MINGW32', + 'AC_MINIX', + 'AC_MINUS_C_MINUS_O', + 'AC_MMAP', + 'AC_MODE_T', + 'AC_MSG_CHECKING', + 'AC_MSG_ERROR', + 'AC_MSG_FAILURE', + 'AC_MSG_NOTICE', + 'AC_MSG_RESULT', + 'AC_MSG_WARN', + 'AC_OBJEXT', + 'AC_OBSOLETE', + 'AC_OFF_T', + 'AC_OPENMP', + 'AC_OUTPUT', + 'AC_OUTPUT_COMMANDS', + 'AC_PACKAGE_BUGREPORT', + 'AC_PACKAGE_NAME', + 'AC_PACKAGE_STRING', + 'AC_PACKAGE_TARNAME', + 'AC_PACKAGE_URL', + 'AC_PACKAGE_VERSION', + 'AC_PATH_PROG', + 'AC_PATH_PROGS', + 'AC_PATH_PROGS_FEATURE_CHECK', + 'AC_PATH_TARGET_TOOL', + 'AC_PATH_TOOL', + 'AC_PATH_X', + 'AC_PATH_XTRA', + 'AC_PID_T', + 'AC_PREFIX', + 'AC_PREFIX_DEFAULT', + 'AC_PREFIX_PROGRAM', + 'AC_PREPROC_IFELSE', + 'AC_PREREQ', + 'AC_PRESERVE_HELP_ORDER', + 'AC_PROG_AWK', + 'AC_PROG_CC', + 'AC_PROG_CC_C89', + 'AC_PROG_CC_C99', + 'AC_PROG_CC_C_O', + 'AC_PROG_CC_STDC', + 'AC_PROG_CPP', + 'AC_PROG_CPP_WERROR', + 'AC_PROG_CXX', + 'AC_PROG_CXX_C_O', + 'AC_PROG_CXXCPP', + 'AC_PROG_EGREP', + 'AC_PROG_F77', + 'AC_PROG_F77_C_O', + 'AC_PROG_FC', + 'AC_PROG_FC_C_O', + 'AC_PROG_FGREP', + 'AC_PROG_GCC_TRADITIONAL', + 'AC_PROG_GREP', + 'AC_PROG_INSTALL', + 'AC_PROG_LEX', + 'AC_PROG_LN_S', + 'AC_PROG_MAKE_SET', + 'AC_PROG_MKDIR_P', + 'AC_PROG_OBJC', + 'AC_PROG_OBJCPP', + 'AC_PROG_OBJCXX', + 'AC_PROG_OBJCXXCPP', + 'AC_PROG_RANLIB', + 'AC_PROG_SED', + 'AC_PROG_YACC', + 'AC_PROGRAM_CHECK', + 'AC_PROGRAM_EGREP', + 'AC_PROGRAM_PATH', + 'AC_PROGRAMS_CHECK', + 'AC_PROGRAMS_PATH', + 'AC_REMOTE_TAPE', + 'AC_REPLACE_FNMATCH', + 'AC_REPLACE_FUNCS', + 'AC_REQUIRE', + 'AC_REQUIRE_AUX_FILE', + 'AC_REQUIRE_CPP', + 'AC_RESTARTABLE_SYSCALLS', + 'AC_RETSIGTYPE', + 'AC_REVISION', + 'AC_RSH', + 'AC_RUN_IFELSE', + 'AC_SCO_INTL', + 'AC_SEARCH_LIBS', + 'AC_SET_MAKE', + 'AC_SETVBUF_REVERSED', + 'AC_SIZE_T', + 'AC_SIZEOF_TYPE', + 'AC_ST_BLKSIZE', + 'AC_ST_BLOCKS', + 'AC_ST_RDEV', + 'AC_STAT_MACROS_BROKEN', + 'AC_STDC_HEADERS', + 'AC_STRCOLL', + 'AC_STRUCT_DIRENT_D_INO', + 'AC_STRUCT_DIRENT_D_TYPE', + 'AC_STRUCT_ST_BLKSIZE', + 'AC_STRUCT_ST_BLOCKS', + 'AC_STRUCT_ST_RDEV', + 'AC_STRUCT_TIMEZONE', + 'AC_STRUCT_TM', + 'AC_SUBST', + 'AC_SUBST_FILE', + 'AC_SYS_INTERPRETER', + 'AC_SYS_LARGEFILE', + 'AC_SYS_LONG_FILE_NAMES', + 'AC_SYS_POSIX_TERMIOS', + 'AC_SYS_RESTARTABLE_SYSCALLS', + 'AC_SYS_SIGLIST_DECLARED', + 'AC_TEST_CPP', + 'AC_TEST_PROGRAM', + 'AC_TIME_WITH_SYS_TIME', + 'AC_TIMEZONE', + 'AC_TRY_ACT', + 'AC_TRY_COMPILE', + 'AC_TRY_CPP', + 'AC_TRY_LINK', + 'AC_TRY_LINK_FUNC', + 'AC_TRY_RUN', + 'AC_TYPE_GETGROUPS', + 'AC_TYPE_INT16_T', + 'AC_TYPE_INT32_T', + 'AC_TYPE_INT64_T', + 'AC_TYPE_INT8_T', + 'AC_TYPE_INTMAX_T', + 'AC_TYPE_INTPTR_T', + 'AC_TYPE_LONG_DOUBLE', + 'AC_TYPE_LONG_DOUBLE_WIDER', + 'AC_TYPE_LONG_LONG_INT', + 'AC_TYPE_MBSTATE_T', + 'AC_TYPE_MODE_T', + 'AC_TYPE_OFF_T', + 'AC_TYPE_PID_T', + 'AC_TYPE_SIGNAL', + 'AC_TYPE_SIZE_T', + 'AC_TYPE_SSIZE_T', + 'AC_TYPE_UID_T', + 'AC_TYPE_UINT16_T', + 'AC_TYPE_UINT32_T', + 'AC_TYPE_UINT64_T', + 'AC_TYPE_UINT8_T', + 'AC_TYPE_UINTMAX_T', + 'AC_TYPE_UINTPTR_T', + 'AC_TYPE_UNSIGNED_LONG_LONG_INT', + 'AC_UID_T', + 'AC_UNISTD_H', + 'AC_USE_SYSTEM_EXTENSIONS', + 'AC_USG', + 'AC_UTIME_NULL', + 'AC_VALIDATE_CACHED_SYSTEM_TUPLE', + 'AC_VERBOSE', + 'AC_VFORK', + 'AC_VPRINTF', + 'AC_WAIT3', + 'AC_WARN', + 'AC_WARNING', + 'AC_WITH', + 'AC_WORDS_BIGENDIAN', + 'AC_XENIX_DIR', + 'AC_YYTEXT_POINTER', + 'AH_BOTTOM', + 'AH_HEADER', + 'AH_TEMPLATE', + 'AH_TOP', + 'AH_VERBATIM', + 'AU_ALIAS', + 'AU_DEFUN'), + ), + 'SYMBOLS' => array('(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', ';;', '`'), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00ffff;', + ), + 'COMMENTS' => array( + 1 => 'color: #666666;', + 2 => 'color: #339900;', + 3 => 'color: #666666;', + 'MULTI' => 'color: #ff0000; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;', + 1 => 'color: #000099;', + 2 => 'color: #660099;', + 3 => 'color: #660099;', + 4 => 'color: #660099;', + 5 => 'color: #006699;', + 'HARD' => '', + ), + 'BRACKETS' => array( + 0 => 'color: #008000;' + ), + 'STRINGS' => array( + 0 => 'color: #996600;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000dd;', + GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;', + GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', + GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', + GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI => 'color:#800080;' + ), + 'METHODS' => array( + 1 => 'color: #202020;', + 2 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;', + 1 => 'color: #000080;', + 2 => 'color: #000040;', + 3 => 'color: #000040;', + 4 => 'color: #008080;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'COMMENTS' => array( + 'DISALLOWED_BEFORE' => '$' + ), + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(? "(?![\.\-a-zA-Z0-9_%\\/])" + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/autohotkey.php b/_piecrust/libs/Geshi/geshi/autohotkey.php new file mode 100644 index 0000000..de2ad79 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/autohotkey.php @@ -0,0 +1,373 @@ + 'Autohotkey', + 'COMMENT_SINGLE' => array( + 1 => ';' + ), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'while','if','and','or','else','return' + ), + 2 => array( + // built in variables + 'A_AhkPath','A_AhkVersion','A_AppData','A_AppDataCommon', + 'A_AutoTrim','A_BatchLines','A_CaretX','A_CaretY', + 'A_ComputerName','A_ControlDelay','A_Cursor','A_DD', + 'A_DDD','A_DDDD','A_DefaultMouseSpeed','A_Desktop', + 'A_DesktopCommon','A_DetectHiddenText','A_DetectHiddenWindows','A_EndChar', + 'A_EventInfo','A_ExitReason','A_FormatFloat','A_FormatInteger', + 'A_Gui','A_GuiEvent','A_GuiControl','A_GuiControlEvent', + 'A_GuiHeight','A_GuiWidth','A_GuiX','A_GuiY', + 'A_Hour','A_IconFile','A_IconHidden','A_IconNumber', + 'A_IconTip','A_Index','A_IPAddress1','A_IPAddress2', + 'A_IPAddress3','A_IPAddress4','A_ISAdmin','A_IsCompiled', + 'A_IsCritical','A_IsPaused','A_IsSuspended','A_KeyDelay', + 'A_Language','A_LastError','A_LineFile','A_LineNumber', + 'A_LoopField','A_LoopFileAttrib','A_LoopFileDir','A_LoopFileExt', + 'A_LoopFileFullPath','A_LoopFileLongPath','A_LoopFileName','A_LoopFileShortName', + 'A_LoopFileShortPath','A_LoopFileSize','A_LoopFileSizeKB','A_LoopFileSizeMB', + 'A_LoopFileTimeAccessed','A_LoopFileTimeCreated','A_LoopFileTimeModified','A_LoopReadLine', + 'A_LoopRegKey','A_LoopRegName','A_LoopRegSubkey','A_LoopRegTimeModified', + 'A_LoopRegType','A_MDAY','A_Min','A_MM', + 'A_MMM','A_MMMM','A_Mon','A_MouseDelay', + 'A_MSec','A_MyDocuments','A_Now','A_NowUTC', + 'A_NumBatchLines','A_OSType','A_OSVersion','A_PriorHotkey', + 'A_ProgramFiles','A_Programs','A_ProgramsCommon','A_ScreenHeight', + 'A_ScreenWidth','A_ScriptDir','A_ScriptFullPath','A_ScriptName', + 'A_Sec','A_Space','A_StartMenu','A_StartMenuCommon', + 'A_Startup','A_StartupCommon','A_StringCaseSense','A_Tab', + 'A_Temp','A_ThisFunc','A_ThisHotkey','A_ThisLabel', + 'A_ThisMenu','A_ThisMenuItem','A_ThisMenuItemPos','A_TickCount', + 'A_TimeIdle','A_TimeIdlePhysical','A_TimeSincePriorHotkey','A_TimeSinceThisHotkey', + 'A_TitleMatchMode','A_TitleMatchModeSpeed','A_UserName','A_WDay', + 'A_WinDelay','A_WinDir','A_WorkingDir','A_YDay', + 'A_YEAR','A_YWeek','A_YYYY','Clipboard', + 'ClipboardAll','ComSpec','ErrorLevel','ProgramFiles', + ), + 3 => array( + 'AutoTrim', + 'BlockInput','Break','Click', + 'ClipWait','Continue','Control', + 'ControlClick','ControlFocus','ControlGet', + 'ControlGetFocus','ControlGetPos','ControlGetText', + 'ControlMove','ControlSend','ControlSendRaw', + 'ControlSetText','CoordMode','Critical', + 'DetectHiddenText','DetectHiddenWindows','DllCall','Drive', + 'DriveGet','DriveSpaceFree', + 'Else','EnvAdd','EnvDiv', + 'EnvGet','EnvMult','EnvSet', + 'EnvSub','EnvUpdate','Exit', + 'ExitApp','FileAppend','FileCopy', + 'FileCopyDir','FileCreateDir','FileCreateShortcut', + 'FileDelete','FileGetAttrib','FileGetShortcut', + 'FileGetSize','FileGetTime','FileGetVersion', + 'FileInstall','FileMove','FileMoveDir', + 'FileRead','FileReadLine','FileRecycle', + 'FileRecycleEmpty','FileRemoveDir','FileSelectFile', + 'FileSelectFolder','FileSetAttrib','FileSetTime', + 'FormatTime','Gosub', + 'Goto','GroupActivate','GroupAdd', + 'GroupClose','GroupDeactivate','Gui', + 'GuiControl','GuiControlGet','Hotkey', + 'IfExist','IfGreater','IfGreaterOrEqual', + 'IfInString','IfLess','IfLessOrEqual', + 'IfMsgBox','IfNotEqual','IfNotExist', + 'IfNotInString','IfWinActive','IfWinExist', + 'IfWinNotActive','IfWinNotExist','ImageSearch', + 'IniDelete','IniRead','IniWrite', + 'Input','InputBox','KeyHistory', + 'KeyWait','ListHotkeys','ListLines', + 'ListVars','Loop', + 'Menu','MouseClick','MouseClickDrag', + 'MouseGetPos','MouseMove','MsgBox', + 'OnMessage','OnExit','OutputDebug', + 'PixelGetColor','PixelSearch','PostMessage', + 'Process','Progress','Random', + 'RegExMatch','RegExReplace','RegisterCallback', + 'RegDelete','RegRead','RegWrite', + 'Reload','Repeat','Return', + 'Run','RunAs','RunWait', + 'Send','SendEvent','SendInput', + 'SendMessage','SendMode','SendPlay', + 'SendRaw','SetBatchLines','SetCapslockState', + 'SetControlDelay','SetDefaultMouseSpeed','SetEnv', + 'SetFormat','SetKeyDelay','SetMouseDelay', + 'SetNumlockState','SetScrollLockState','SetStoreCapslockMode', + 'SetTimer','SetTitleMatchMode','SetWinDelay', + 'SetWorkingDir','Shutdown','Sleep', + 'Sort','SoundBeep','SoundGet', + 'SoundGetWaveVolume','SoundPlay','SoundSet', + 'SoundSetWaveVolume','SplashImage','SplashTextOff', + 'SplashTextOn','SplitPath','StatusBarGetText', + 'StatusBarWait','StringCaseSense','StringGetPos', + 'StringLeft','StringLen','StringLower', + 'StringMid','StringReplace','StringRight', + 'StringSplit','StringTrimLeft','StringTrimRight', + 'StringUpper','Suspend','SysGet', + 'Thread','ToolTip','Transform', + 'TrayTip','URLDownloadToFile','While', + 'VarSetCapacity', + 'WinActivate','WinActivateBottom','WinClose', + 'WinGet','WinGetActiveStats','WinGetActiveTitle', + 'WinGetClass','WinGetPos','WinGetText', + 'WinGetTitle','WinHide','WinKill', + 'WinMaximize','WinMenuSelectItem','WinMinimize', + 'WinMinimizeAll','WinMinimizeAllUndo','WinMove', + 'WinRestore','WinSet','WinSetTitle', + 'WinShow','WinWait','WinWaitActive', + 'WinWaitClose','WinWaitNotActive' + ), + 4 => array( + 'Abs','ACos','Asc','ASin', + 'ATan','Ceil','Chr','Cos', + 'Exp','FileExist','Floor', + 'GetKeyState','IL_Add','IL_Create','IL_Destroy', + 'InStr','IsFunc','IsLabel','Ln', + 'Log','LV_Add','LV_Delete','LV_DeleteCol', + 'LV_GetCount','LV_GetNext','LV_GetText','LV_Insert', + 'LV_InsertCol','LV_Modify','LV_ModifyCol','LV_SetImageList', + 'Mod','NumGet','NumPut', + 'Round', + 'SB_SetIcon','SB_SetParts','SB_SetText','Sin', + 'Sqrt','StrLen','SubStr','Tan', + 'TV_Add','TV_Delete','TV_GetChild','TV_GetCount', + 'TV_GetNext','TV_Get','TV_GetParent','TV_GetPrev', + 'TV_GetSelection','TV_GetText','TV_Modify', + 'WinActive','WinExist' + ), + 5 => array( + // #Directives + 'AllowSameLineComments','ClipboardTimeout','CommentFlag', + 'ErrorStdOut','EscapeChar','HotkeyInterval', + 'HotkeyModifierTimeout','Hotstring','IfWinActive', + 'IfWinExist','IfWinNotActive','IfWinNotExist', + 'Include','IncludeAgain','InstallKeybdHook', + 'InstallMouseHook','KeyHistory','LTrim', + 'MaxHotkeysPerInterval','MaxMem','MaxThreads', + 'MaxThreadsBuffer','MaxThreadsPerHotkey','NoEnv', + 'NoTrayIcon','Persistent','SingleInstance', + 'UseHook','WinActivateForce' + ), + 6 => array( + 'Shift','LShift','RShift', + 'Alt','LAlt','RAlt', + 'LControl','RControl', + 'Ctrl','LCtrl','RCtrl', + 'LWin','RWin','AppsKey', + 'AltDown','AltUp','ShiftDown', + 'ShiftUp','CtrlDown','CtrlUp', + 'LWinDown','LWinUp','RWinDown', + 'RWinUp','LButton','RButton', + 'MButton','WheelUp','WheelDown', + 'WheelLeft','WheelRight','XButton1', + 'XButton2','Joy1','Joy2', + 'Joy3','Joy4','Joy5', + 'Joy6','Joy7','Joy8', + 'Joy9','Joy10','Joy11', + 'Joy12','Joy13','Joy14', + 'Joy15','Joy16','Joy17', + 'Joy18','Joy19','Joy20', + 'Joy21','Joy22','Joy23', + 'Joy24','Joy25','Joy26', + 'Joy27','Joy28','Joy29', + 'Joy30','Joy31','Joy32', + 'JoyX','JoyY','JoyZ', + 'JoyR','JoyU','JoyV', + 'JoyPOV','JoyName','JoyButtons', + 'JoyAxes','JoyInfo','Space', + 'Tab','Enter', + 'Escape','Esc','BackSpace', + 'BS','Delete','Del', + 'Insert','Ins','PGUP', + 'PGDN','Home','End', + 'Up','Down','Left', + 'Right','PrintScreen','CtrlBreak', + 'Pause','ScrollLock','CapsLock', + 'NumLock','Numpad0','Numpad1', + 'Numpad2','Numpad3','Numpad4', + 'Numpad5','Numpad6','Numpad7', + 'Numpad8','Numpad9','NumpadMult', + 'NumpadAdd','NumpadSub','NumpadDiv', + 'NumpadDot','NumpadDel','NumpadIns', + 'NumpadClear','NumpadUp','NumpadDown', + 'NumpadLeft','NumpadRight','NumpadHome', + 'NumpadEnd','NumpadPgup','NumpadPgdn', + 'NumpadEnter','F1','F2', + 'F3','F4','F5', + 'F6','F7','F8', + 'F9','F10','F11', + 'F12','F13','F14', + 'F15','F16','F17', + 'F18','F19','F20', + 'F21','F22','F23', + 'F24','Browser_Back','Browser_Forward', + 'Browser_Refresh','Browser_Stop','Browser_Search', + 'Browser_Favorites','Browser_Home','Volume_Mute', + 'Volume_Down','Volume_Up','Media_Next', + 'Media_Prev','Media_Stop','Media_Play_Pause', + 'Launch_Mail','Launch_Media','Launch_App1', + 'Launch_App2' + ), + 7 => array( + // Gui commands + 'Add', + 'Show', 'Submit', 'Cancel', 'Destroy', + 'Font', 'Color', 'Margin', 'Flash', 'Default', + 'GuiEscape','GuiClose','GuiSize','GuiContextMenu','GuiDropFilesTabStop', + ), + 8 => array( + // Gui Controls + 'Button', + 'Checkbox','Radio','DropDownList','DDL', + 'ComboBox','ListBox','ListView', + 'Text', 'Edit', 'UpDown', 'Picture', + 'TreeView','DateTime', 'MonthCal', + 'Slider' + ) + ), + 'SYMBOLS' => array( + '(',')','[',']', + '+','-','*','/','&','^', + '=','+=','-=','*=','/=','&=', + '==','<','<=','>','>=',':=', + ',','.' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #AAAAFF; font-weight: bold;', // reserved #blue + 2 => 'color: #88FF88;', // BIV yellow + 3 => 'color: #FF00FF; font-style: italic;', // commands purple + 4 => 'color: #888844; font-weight: bold;', // functions #0080FF + 5 => 'color: #000000; font-style: italic;', // directives #black + 6 => 'color: #FF0000; font-style: italic;', // hotkeys #red + 7 => 'color: #000000; font-style: italic;', // gui commands #black + 8 => 'color: #000000; font-style: italic;' // gui controls + ), + 'COMMENTS' => array( + 'MULTI' => 'font-style: italic; color: #669900;', + 1 => 'font-style: italic; color: #009933;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => 'color: #00FF00; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'font-weight: bold; color: #008080;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000dd;' + ), + 'METHODS' => array( + 1 => 'color: #0000FF; font-style: italic; font-weight: italic;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000000; font-weight: italic;' + ), + 'REGEXPS' => array( + 0 => 'font-weight: italic; color: #A00A0;', + 1 => 'color: #CC0000; font-style: italic;', + 2 => 'color: #DD0000; font-style: italic;', + 3 => 'color: #88FF88;' + ), + 'SCRIPT' => array( + ) + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + 1 => '_' + ), + 'REGEXPS' => array( + //Variables + 0 => '%[a-zA-Z_][a-zA-Z0-9_]*%', + //hotstrings + 1 => '::[\w\d]+::', + //labels + 2 => '\w[\w\d]+:\s', + //Built-in Variables + 3 => '\bA_\w+\b(?![^<]*>)' + ), + 'URLS' => array( + 1 => '', + 2 => 'http://www.autohotkey.com/docs/Variables.htm#{FNAME}', + 3 => 'http://www.autohotkey.com/docs/commands/{FNAME}.htm', + 4 => 'http://www.autohotkey.com/docs/Functions.htm#BuiltIn', + 5 => 'http://www.autohotkey.com/docs/commands/_{FNAME}.htm', + 6 => '', + 7 => 'http://www.autohotkey.com/docs/commands/Gui.htm#{FNAME}', + 8 => 'http://www.autohotkey.com/docs/commands/GuiControls.htm#{FNAME}' + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 5 => array( + 'DISALLOWED_BEFORE' => '(? \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/autoit.php b/_piecrust/libs/Geshi/geshi/autoit.php new file mode 100644 index 0000000..b51bd27 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/autoit.php @@ -0,0 +1,1175 @@ + 'AutoIt', + 'COMMENT_SINGLE' => array(';'), + 'COMMENT_MULTI' => array( + '#comments-start' => '#comments-end', + '#cs' => '#ce'), + 'COMMENT_REGEXP' => array( + 0 => '/(? '/(?<=include)\s+<.*?>/' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'And','ByRef','Case','Const','ContinueCase','ContinueLoop', + 'Default','Dim','Do','Else','ElseIf','EndFunc','EndIf','EndSelect', + 'EndSwitch','EndWith','Enum','Exit','ExitLoop','False','For','Func', + 'Global','If','In','Local','Next','Not','Or','ReDim','Return', + 'Select','Step','Switch','Then','To','True','Until','WEnd','While', + 'With' + ), + 2 => array( + '@AppDataCommonDir','@AppDataDir','@AutoItExe','@AutoItPID', + '@AutoItUnicode','@AutoItVersion','@AutoItX64','@COM_EventObj', + '@CommonFilesDir','@Compiled','@ComputerName','@ComSpec','@CR', + '@CRLF','@DesktopCommonDir','@DesktopDepth','@DesktopDir', + '@DesktopHeight','@DesktopRefresh','@DesktopWidth', + '@DocumentsCommonDir','@error','@exitCode','@exitMethod', + '@extended','@FavoritesCommonDir','@FavoritesDir','@GUI_CtrlHandle', + '@GUI_CtrlId','@GUI_DragFile','@GUI_DragId','@GUI_DropId', + '@GUI_WinHandle','@HomeDrive','@HomePath','@HomeShare', + '@HotKeyPressed','@HOUR','@InetGetActive','@InetGetBytesRead', + '@IPAddress1','@IPAddress2','@IPAddress3','@IPAddress4','@KBLayout', + '@LF','@LogonDNSDomain','@LogonDomain','@LogonServer','@MDAY', + '@MIN','@MON','@MyDocumentsDir','@NumParams','@OSBuild','@OSLang', + '@OSServicePack','@OSTYPE','@OSVersion','@ProcessorArch', + '@ProgramFilesDir','@ProgramsCommonDir','@ProgramsDir','@ScriptDir', + '@ScriptFullPath','@ScriptLineNumber','@ScriptName','@SEC', + '@StartMenuCommonDir','@StartMenuDir','@StartupCommonDir', + '@StartupDir','@SW_DISABLE','@SW_ENABLE','@SW_HIDE','@SW_LOCK', + '@SW_MAXIMIZE','@SW_MINIMIZE','@SW_RESTORE','@SW_SHOW', + '@SW_SHOWDEFAULT','@SW_SHOWMAXIMIZED','@SW_SHOWMINIMIZED', + '@SW_SHOWMINNOACTIVE','@SW_SHOWNA','@SW_SHOWNOACTIVATE', + '@SW_SHOWNORMAL','@SW_UNLOCK','@SystemDir','@TAB','@TempDir', + '@TRAY_ID','@TrayIconFlashing','@TrayIconVisible','@UserName', + '@UserProfileDir','@WDAY','@WindowsDir','@WorkingDir','@YDAY', + '@YEAR' + ), + 3 => array( + 'Abs','ACos','AdlibDisable','AdlibEnable','Asc','AscW','ASin', + 'Assign','ATan','AutoItSetOption','AutoItWinGetTitle', + 'AutoItWinSetTitle','Beep','Binary','BinaryLen','BinaryMid', + 'BinaryToString','BitAND','BitNOT','BitOR','BitRotate','BitShift', + 'BitXOR','BlockInput','Break','Call','CDTray','Ceiling','Chr', + 'ChrW','ClipGet','ClipPut','ConsoleRead','ConsoleWrite', + 'ConsoleWriteError','ControlClick','ControlCommand', + 'ControlDisable','ControlEnable','ControlFocus','ControlGetFocus', + 'ControlGetHandle','ControlGetPos','ControlGetText','ControlHide', + 'ControlListView','ControlMove','ControlSend','ControlSetText', + 'ControlShow','ControlTreeView','Cos','Dec','DirCopy','DirCreate', + 'DirGetSize','DirMove','DirRemove','DllCall','DllCallbackFree', + 'DllCallbackGetPtr','DllCallbackRegister','DllClose','DllOpen', + 'DllStructCreate','DllStructGetData','DllStructGetPtr', + 'DllStructGetSize','DllStructSetData','DriveGetDrive', + 'DriveGetFileSystem','DriveGetLabel','DriveGetSerial', + 'DriveGetType','DriveMapAdd','DriveMapDel','DriveMapGet', + 'DriveSetLabel','DriveSpaceFree','DriveSpaceTotal','DriveStatus', + 'EnvGet','EnvSet','EnvUpdate','Eval','Execute','Exp', + 'FileChangeDir','FileClose','FileCopy','FileCreateNTFSLink', + 'FileCreateShortcut','FileDelete','FileExists','FileFindFirstFile', + 'FileFindNextFile','FileGetAttrib','FileGetLongName', + 'FileGetShortcut','FileGetShortName','FileGetSize','FileGetTime', + 'FileGetVersion','FileInstall','FileMove','FileOpen', + 'FileOpenDialog','FileRead','FileReadLine','FileRecycle', + 'FileRecycleEmpty','FileSaveDialog','FileSelectFolder', + 'FileSetAttrib','FileSetTime','FileWrite','FileWriteLine','Floor', + 'FtpSetProxy','GUICreate','GUICtrlCreateAvi','GUICtrlCreateButton', + 'GUICtrlCreateCheckbox','GUICtrlCreateCombo', + 'GUICtrlCreateContextMenu','GUICtrlCreateDate','GUICtrlCreateDummy', + 'GUICtrlCreateEdit','GUICtrlCreateGraphic','GUICtrlCreateGroup', + 'GUICtrlCreateIcon','GUICtrlCreateInput','GUICtrlCreateLabel', + 'GUICtrlCreateList','GUICtrlCreateListView', + 'GUICtrlCreateListViewItem','GUICtrlCreateMenu', + 'GUICtrlCreateMenuItem','GUICtrlCreateMonthCal','GUICtrlCreateObj', + 'GUICtrlCreatePic','GUICtrlCreateProgress','GUICtrlCreateRadio', + 'GUICtrlCreateSlider','GUICtrlCreateTab','GUICtrlCreateTabItem', + 'GUICtrlCreateTreeView','GUICtrlCreateTreeViewItem', + 'GUICtrlCreateUpdown','GUICtrlDelete','GUICtrlGetHandle', + 'GUICtrlGetState','GUICtrlRead','GUICtrlRecvMsg', + 'GUICtrlRegisterListViewSort','GUICtrlSendMsg','GUICtrlSendToDummy', + 'GUICtrlSetBkColor','GUICtrlSetColor','GUICtrlSetCursor', + 'GUICtrlSetData','GUICtrlSetFont','GUICtrlSetDefColor', + 'GUICtrlSetDefBkColor','GUICtrlSetGraphic','GUICtrlSetImage', + 'GUICtrlSetLimit','GUICtrlSetOnEvent','GUICtrlSetPos', + 'GUICtrlSetResizing','GUICtrlSetState','GUICtrlSetStyle', + 'GUICtrlSetTip','GUIDelete','GUIGetCursorInfo','GUIGetMsg', + 'GUIGetStyle','GUIRegisterMsg','GUISetAccelerators()', + 'GUISetBkColor','GUISetCoord','GUISetCursor','GUISetFont', + 'GUISetHelp','GUISetIcon','GUISetOnEvent','GUISetState', + 'GUISetStyle','GUIStartGroup','GUISwitch','Hex','HotKeySet', + 'HttpSetProxy','HWnd','InetGet','InetGetSize','IniDelete','IniRead', + 'IniReadSection','IniReadSectionNames','IniRenameSection', + 'IniWrite','IniWriteSection','InputBox','Int','IsAdmin','IsArray', + 'IsBinary','IsBool','IsDeclared','IsDllStruct','IsFloat','IsHWnd', + 'IsInt','IsKeyword','IsNumber','IsObj','IsPtr','IsString','Log', + 'MemGetStats','Mod','MouseClick','MouseClickDrag','MouseDown', + 'MouseGetCursor','MouseGetPos','MouseMove','MouseUp','MouseWheel', + 'MsgBox','Number','ObjCreate','ObjEvent','ObjGet','ObjName','Opt', + 'Ping','PixelChecksum','PixelGetColor','PixelSearch','PluginClose', + 'PluginOpen','ProcessClose','ProcessExists','ProcessGetStats', + 'ProcessList','ProcessSetPriority','ProcessWait','ProcessWaitClose', + 'ProgressOff','ProgressOn','ProgressSet','Ptr','Random','RegDelete', + 'RegEnumKey','RegEnumVal','RegRead','RegWrite','Round','Run', + 'RunAs','RunAsWait','RunWait','Send','SendKeepActive','SetError', + 'SetExtended','ShellExecute','ShellExecuteWait','Shutdown','Sin', + 'Sleep','SoundPlay','SoundSetWaveVolume','SplashImageOn', + 'SplashOff','SplashTextOn','Sqrt','SRandom','StatusbarGetText', + 'StderrRead','StdinWrite','StdioClose','StdoutRead','String', + 'StringAddCR','StringCompare','StringFormat','StringInStr', + 'StringIsAlNum','StringIsAlpha','StringIsASCII','StringIsDigit', + 'StringIsFloat','StringIsInt','StringIsLower','StringIsSpace', + 'StringIsUpper','StringIsXDigit','StringLeft','StringLen', + 'StringLower','StringMid','StringRegExp','StringRegExpReplace', + 'StringReplace','StringRight','StringSplit','StringStripCR', + 'StringStripWS','StringToBinary','StringTrimLeft','StringTrimRight', + 'StringUpper','Tan','TCPAccept','TCPCloseSocket','TCPConnect', + 'TCPListen','TCPNameToIP','TCPRecv','TCPSend','TCPShutdown', + 'TCPStartup','TimerDiff','TimerInit','ToolTip','TrayCreateItem', + 'TrayCreateMenu','TrayGetMsg','TrayItemDelete','TrayItemGetHandle', + 'TrayItemGetState','TrayItemGetText','TrayItemSetOnEvent', + 'TrayItemSetState','TrayItemSetText','TraySetClick','TraySetIcon', + 'TraySetOnEvent','TraySetPauseIcon','TraySetState','TraySetToolTip', + 'TrayTip','UBound','UDPBind','UDPCloseSocket','UDPOpen','UDPRecv', + 'UDPSend','UDPShutdown','UDPStartup','VarGetType','WinActivate', + 'WinActive','WinClose','WinExists','WinFlash','WinGetCaretPos', + 'WinGetClassList','WinGetClientSize','WinGetHandle','WinGetPos', + 'WinGetProcess','WinGetState','WinGetText','WinGetTitle','WinKill', + 'WinList','WinMenuSelectItem','WinMinimizeAll','WinMinimizeAllUndo', + 'WinMove','WinSetOnTop','WinSetState','WinSetTitle','WinSetTrans', + 'WinWait','WinWaitActive','WinWaitClose','WinWaitNotActive' + ), + 4 => array( + 'ArrayAdd','ArrayBinarySearch','ArrayConcatenate','ArrayDelete', + 'ArrayDisplay','ArrayFindAll','ArrayInsert','ArrayMax', + 'ArrayMaxIndex','ArrayMin','ArrayMinIndex','ArrayPop','ArrayPush', + 'ArrayReverse','ArraySearch','ArraySort','ArraySwap','ArrayToClip', + 'ArrayToString','ArrayTrim','ChooseColor','ChooseFont', + 'ClipBoard_ChangeChain','ClipBoard_Close','ClipBoard_CountFormats', + 'ClipBoard_Empty','ClipBoard_EnumFormats','ClipBoard_FormatStr', + 'ClipBoard_GetData','ClipBoard_GetDataEx','ClipBoard_GetFormatName', + 'ClipBoard_GetOpenWindow','ClipBoard_GetOwner', + 'ClipBoard_GetPriorityFormat','ClipBoard_GetSequenceNumber', + 'ClipBoard_GetViewer','ClipBoard_IsFormatAvailable', + 'ClipBoard_Open','ClipBoard_RegisterFormat','ClipBoard_SetData', + 'ClipBoard_SetDataEx','ClipBoard_SetViewer','ClipPutFile', + 'ColorConvertHSLtoRGB','ColorConvertRGBtoHSL','ColorGetBlue', + 'ColorGetGreen','ColorGetRed','Date_Time_CompareFileTime', + 'Date_Time_DOSDateTimeToArray','Date_Time_DOSDateTimeToFileTime', + 'Date_Time_DOSDateTimeToStr','Date_Time_DOSDateToArray', + 'Date_Time_DOSDateToStr','Date_Time_DOSTimeToArray', + 'Date_Time_DOSTimeToStr','Date_Time_EncodeFileTime', + 'Date_Time_EncodeSystemTime','Date_Time_FileTimeToArray', + 'Date_Time_FileTimeToDOSDateTime', + 'Date_Time_FileTimeToLocalFileTime','Date_Time_FileTimeToStr', + 'Date_Time_FileTimeToSystemTime','Date_Time_GetFileTime', + 'Date_Time_GetLocalTime','Date_Time_GetSystemTime', + 'Date_Time_GetSystemTimeAdjustment', + 'Date_Time_GetSystemTimeAsFileTime', + 'Date_Time_GetSystemTimes','Date_Time_GetTickCount', + 'Date_Time_GetTimeZoneInformation', + 'Date_Time_LocalFileTimeToFileTime','Date_Time_SetFileTime', + 'Date_Time_SetLocalTime','Date_Time_SetSystemTime', + 'Date_Time_SetSystemTimeAdjustment', + 'Date_Time_SetTimeZoneInformation','Date_Time_SystemTimeToArray', + 'Date_Time_SystemTimeToDateStr','Date_Time_SystemTimeToDateTimeStr', + 'Date_Time_SystemTimeToFileTime','Date_Time_SystemTimeToTimeStr', + 'Date_Time_SystemTimeToTzSpecificLocalTime', + 'Date_Time_TzSpecificLocalTimeToSystemTime','DateAdd', + 'DateDayOfWeek','DateDaysInMonth','DateDiff','DateIsLeapYear', + 'DateIsValid','DateTimeFormat','DateTimeSplit','DateToDayOfWeek', + 'DateToDayOfWeekISO','DateToDayValue','DateToMonth', + 'DayValueToDate','DebugBugReportEnv','DebugOut','DebugSetup', + 'Degree','EventLog__Backup','EventLog__Clear','EventLog__Close', + 'EventLog__Count','EventLog__DeregisterSource','EventLog__Full', + 'EventLog__Notify','EventLog__Oldest','EventLog__Open', + 'EventLog__OpenBackup','EventLog__Read','EventLog__RegisterSource', + 'EventLog__Report','FileCountLines','FileCreate','FileListToArray', + 'FilePrint','FileReadToArray','FileWriteFromArray', + 'FileWriteLog','FileWriteToLine','GDIPlus_ArrowCapCreate', + 'GDIPlus_ArrowCapDispose','GDIPlus_ArrowCapGetFillState', + 'GDIPlus_ArrowCapGetHeight','GDIPlus_ArrowCapGetMiddleInset', + 'GDIPlus_ArrowCapGetWidth','GDIPlus_ArrowCapSetFillState', + 'GDIPlus_ArrowCapSetHeight','GDIPlus_ArrowCapSetMiddleInset', + 'GDIPlus_ArrowCapSetWidth','GDIPlus_BitmapCloneArea', + 'GDIPlus_BitmapCreateFromFile','GDIPlus_BitmapCreateFromGraphics', + 'GDIPlus_BitmapCreateFromHBITMAP', + 'GDIPlus_BitmapCreateHBITMAPFromBitmap','GDIPlus_BitmapDispose', + 'GDIPlus_BitmapLockBits','GDIPlus_BitmapUnlockBits', + 'GDIPlus_BrushClone','GDIPlus_BrushCreateSolid', + 'GDIPlus_BrushDispose','GDIPlus_BrushGetType', + 'GDIPlus_CustomLineCapDispose','GDIPlus_Decoders', + 'GDIPlus_DecodersGetCount','GDIPlus_DecodersGetSize', + 'GDIPlus_Encoders','GDIPlus_EncodersGetCLSID', + 'GDIPlus_EncodersGetCount','GDIPlus_EncodersGetParamList', + 'GDIPlus_EncodersGetParamListSize','GDIPlus_EncodersGetSize', + 'GDIPlus_FontCreate','GDIPlus_FontDispose', + 'GDIPlus_FontFamilyCreate','GDIPlus_FontFamilyDispose', + 'GDIPlus_GraphicsClear','GDIPlus_GraphicsCreateFromHDC', + 'GDIPlus_GraphicsCreateFromHWND','GDIPlus_GraphicsDispose', + 'GDIPlus_GraphicsDrawArc','GDIPlus_GraphicsDrawBezier', + 'GDIPlus_GraphicsDrawClosedCurve','GDIPlus_GraphicsDrawCurve', + 'GDIPlus_GraphicsDrawEllipse','GDIPlus_GraphicsDrawImage', + 'GDIPlus_GraphicsDrawImageRect','GDIPlus_GraphicsDrawImageRectRect', + 'GDIPlus_GraphicsDrawLine','GDIPlus_GraphicsDrawPie', + 'GDIPlus_GraphicsDrawPolygon','GDIPlus_GraphicsDrawRect', + 'GDIPlus_GraphicsDrawString','GDIPlus_GraphicsDrawStringEx', + 'GDIPlus_GraphicsFillClosedCurve','GDIPlus_GraphicsFillEllipse', + 'GDIPlus_GraphicsFillPie','GDIPlus_GraphicsFillRect', + 'GDIPlus_GraphicsGetDC','GDIPlus_GraphicsGetSmoothingMode', + 'GDIPlus_GraphicsMeasureString','GDIPlus_GraphicsReleaseDC', + 'GDIPlus_GraphicsSetSmoothingMode','GDIPlus_GraphicsSetTransform', + 'GDIPlus_ImageDispose','GDIPlus_ImageGetGraphicsContext', + 'GDIPlus_ImageGetHeight','GDIPlus_ImageGetWidth', + 'GDIPlus_ImageLoadFromFile','GDIPlus_ImageSaveToFile', + 'GDIPlus_ImageSaveToFileEx','GDIPlus_MatrixCreate', + 'GDIPlus_MatrixDispose','GDIPlus_MatrixRotate','GDIPlus_ParamAdd', + 'GDIPlus_ParamInit','GDIPlus_PenCreate','GDIPlus_PenDispose', + 'GDIPlus_PenGetAlignment','GDIPlus_PenGetColor', + 'GDIPlus_PenGetCustomEndCap','GDIPlus_PenGetDashCap', + 'GDIPlus_PenGetDashStyle','GDIPlus_PenGetEndCap', + 'GDIPlus_PenGetWidth','GDIPlus_PenSetAlignment', + 'GDIPlus_PenSetColor','GDIPlus_PenSetCustomEndCap', + 'GDIPlus_PenSetDashCap','GDIPlus_PenSetDashStyle', + 'GDIPlus_PenSetEndCap','GDIPlus_PenSetWidth','GDIPlus_RectFCreate', + 'GDIPlus_Shutdown','GDIPlus_Startup','GDIPlus_StringFormatCreate', + 'GDIPlus_StringFormatDispose','GetIP','GUICtrlAVI_Close', + 'GUICtrlAVI_Create','GUICtrlAVI_Destroy','GUICtrlAVI_Open', + 'GUICtrlAVI_OpenEx','GUICtrlAVI_Play','GUICtrlAVI_Seek', + 'GUICtrlAVI_Show','GUICtrlAVI_Stop','GUICtrlButton_Click', + 'GUICtrlButton_Create','GUICtrlButton_Destroy', + 'GUICtrlButton_Enable','GUICtrlButton_GetCheck', + 'GUICtrlButton_GetFocus','GUICtrlButton_GetIdealSize', + 'GUICtrlButton_GetImage','GUICtrlButton_GetImageList', + 'GUICtrlButton_GetState','GUICtrlButton_GetText', + 'GUICtrlButton_GetTextMargin','GUICtrlButton_SetCheck', + 'GUICtrlButton_SetFocus','GUICtrlButton_SetImage', + 'GUICtrlButton_SetImageList','GUICtrlButton_SetSize', + 'GUICtrlButton_SetState','GUICtrlButton_SetStyle', + 'GUICtrlButton_SetText','GUICtrlButton_SetTextMargin', + 'GUICtrlButton_Show','GUICtrlComboBox_AddDir', + 'GUICtrlComboBox_AddString','GUICtrlComboBox_AutoComplete', + 'GUICtrlComboBox_BeginUpdate','GUICtrlComboBox_Create', + 'GUICtrlComboBox_DeleteString','GUICtrlComboBox_Destroy', + 'GUICtrlComboBox_EndUpdate','GUICtrlComboBox_FindString', + 'GUICtrlComboBox_FindStringExact','GUICtrlComboBox_GetComboBoxInfo', + 'GUICtrlComboBox_GetCount','GUICtrlComboBox_GetCurSel', + 'GUICtrlComboBox_GetDroppedControlRect', + 'GUICtrlComboBox_GetDroppedControlRectEx', + 'GUICtrlComboBox_GetDroppedState','GUICtrlComboBox_GetDroppedWidth', + 'GUICtrlComboBox_GetEditSel','GUICtrlComboBox_GetEditText', + 'GUICtrlComboBox_GetExtendedUI', + 'GUICtrlComboBox_GetHorizontalExtent', + 'GUICtrlComboBox_GetItemHeight','GUICtrlComboBox_GetLBText', + 'GUICtrlComboBox_GetLBTextLen','GUICtrlComboBox_GetList', + 'GUICtrlComboBox_GetListArray','GUICtrlComboBox_GetLocale', + 'GUICtrlComboBox_GetLocaleCountry','GUICtrlComboBox_GetLocaleLang', + 'GUICtrlComboBox_GetLocalePrimLang', + 'GUICtrlComboBox_GetLocaleSubLang','GUICtrlComboBox_GetMinVisible', + 'GUICtrlComboBox_GetTopIndex','GUICtrlComboBox_InitStorage', + 'GUICtrlComboBox_InsertString','GUICtrlComboBox_LimitText', + 'GUICtrlComboBox_ReplaceEditSel','GUICtrlComboBox_ResetContent', + 'GUICtrlComboBox_SelectString','GUICtrlComboBox_SetCurSel', + 'GUICtrlComboBox_SetDroppedWidth','GUICtrlComboBox_SetEditSel', + 'GUICtrlComboBox_SetEditText','GUICtrlComboBox_SetExtendedUI', + 'GUICtrlComboBox_SetHorizontalExtent', + 'GUICtrlComboBox_SetItemHeight','GUICtrlComboBox_SetMinVisible', + 'GUICtrlComboBox_SetTopIndex','GUICtrlComboBox_ShowDropDown', + 'GUICtrlComboBoxEx_AddDir','GUICtrlComboBoxEx_AddString', + 'GUICtrlComboBoxEx_BeginUpdate','GUICtrlComboBoxEx_Create', + 'GUICtrlComboBoxEx_CreateSolidBitMap', + 'GUICtrlComboBoxEx_DeleteString','GUICtrlComboBoxEx_Destroy', + 'GUICtrlComboBoxEx_EndUpdate','GUICtrlComboBoxEx_FindStringExact', + 'GUICtrlComboBoxEx_GetComboBoxInfo', + 'GUICtrlComboBoxEx_GetComboControl','GUICtrlComboBoxEx_GetCount', + 'GUICtrlComboBoxEx_GetCurSel', + 'GUICtrlComboBoxEx_GetDroppedControlRect', + 'GUICtrlComboBoxEx_GetDroppedControlRectEx', + 'GUICtrlComboBoxEx_GetDroppedState', + 'GUICtrlComboBoxEx_GetDroppedWidth', + 'GUICtrlComboBoxEx_GetEditControl','GUICtrlComboBoxEx_GetEditSel', + 'GUICtrlComboBoxEx_GetEditText', + 'GUICtrlComboBoxEx_GetExtendedStyle', + 'GUICtrlComboBoxEx_GetExtendedUI','GUICtrlComboBoxEx_GetImageList', + 'GUICtrlComboBoxEx_GetItem','GUICtrlComboBoxEx_GetItemEx', + 'GUICtrlComboBoxEx_GetItemHeight','GUICtrlComboBoxEx_GetItemImage', + 'GUICtrlComboBoxEx_GetItemIndent', + 'GUICtrlComboBoxEx_GetItemOverlayImage', + 'GUICtrlComboBoxEx_GetItemParam', + 'GUICtrlComboBoxEx_GetItemSelectedImage', + 'GUICtrlComboBoxEx_GetItemText','GUICtrlComboBoxEx_GetItemTextLen', + 'GUICtrlComboBoxEx_GetList','GUICtrlComboBoxEx_GetListArray', + 'GUICtrlComboBoxEx_GetLocale','GUICtrlComboBoxEx_GetLocaleCountry', + 'GUICtrlComboBoxEx_GetLocaleLang', + 'GUICtrlComboBoxEx_GetLocalePrimLang', + 'GUICtrlComboBoxEx_GetLocaleSubLang', + 'GUICtrlComboBoxEx_GetMinVisible','GUICtrlComboBoxEx_GetTopIndex', + 'GUICtrlComboBoxEx_InitStorage','GUICtrlComboBoxEx_InsertString', + 'GUICtrlComboBoxEx_LimitText','GUICtrlComboBoxEx_ReplaceEditSel', + 'GUICtrlComboBoxEx_ResetContent','GUICtrlComboBoxEx_SetCurSel', + 'GUICtrlComboBoxEx_SetDroppedWidth','GUICtrlComboBoxEx_SetEditSel', + 'GUICtrlComboBoxEx_SetEditText', + 'GUICtrlComboBoxEx_SetExtendedStyle', + 'GUICtrlComboBoxEx_SetExtendedUI','GUICtrlComboBoxEx_SetImageList', + 'GUICtrlComboBoxEx_SetItem','GUICtrlComboBoxEx_SetItemEx', + 'GUICtrlComboBoxEx_SetItemHeight','GUICtrlComboBoxEx_SetItemImage', + 'GUICtrlComboBoxEx_SetItemIndent', + 'GUICtrlComboBoxEx_SetItemOverlayImage', + 'GUICtrlComboBoxEx_SetItemParam', + 'GUICtrlComboBoxEx_SetItemSelectedImage', + 'GUICtrlComboBoxEx_SetMinVisible','GUICtrlComboBoxEx_SetTopIndex', + 'GUICtrlComboBoxEx_ShowDropDown','GUICtrlDTP_Create', + 'GUICtrlDTP_Destroy','GUICtrlDTP_GetMCColor','GUICtrlDTP_GetMCFont', + 'GUICtrlDTP_GetMonthCal','GUICtrlDTP_GetRange', + 'GUICtrlDTP_GetRangeEx','GUICtrlDTP_GetSystemTime', + 'GUICtrlDTP_GetSystemTimeEx','GUICtrlDTP_SetFormat', + 'GUICtrlDTP_SetMCColor','GUICtrlDTP_SetMCFont', + 'GUICtrlDTP_SetRange','GUICtrlDTP_SetRangeEx', + 'GUICtrlDTP_SetSystemTime','GUICtrlDTP_SetSystemTimeEx', + 'GUICtrlEdit_AppendText','GUICtrlEdit_BeginUpdate', + 'GUICtrlEdit_CanUndo','GUICtrlEdit_CharFromPos', + 'GUICtrlEdit_Create','GUICtrlEdit_Destroy', + 'GUICtrlEdit_EmptyUndoBuffer','GUICtrlEdit_EndUpdate', + 'GUICtrlEdit_Find','GUICtrlEdit_FmtLines', + 'GUICtrlEdit_GetFirstVisibleLine','GUICtrlEdit_GetLimitText', + 'GUICtrlEdit_GetLine','GUICtrlEdit_GetLineCount', + 'GUICtrlEdit_GetMargins','GUICtrlEdit_GetModify', + 'GUICtrlEdit_GetPasswordChar','GUICtrlEdit_GetRECT', + 'GUICtrlEdit_GetRECTEx','GUICtrlEdit_GetSel','GUICtrlEdit_GetText', + 'GUICtrlEdit_GetTextLen','GUICtrlEdit_HideBalloonTip', + 'GUICtrlEdit_InsertText','GUICtrlEdit_LineFromChar', + 'GUICtrlEdit_LineIndex','GUICtrlEdit_LineLength', + 'GUICtrlEdit_LineScroll','GUICtrlEdit_PosFromChar', + 'GUICtrlEdit_ReplaceSel','GUICtrlEdit_Scroll', + 'GUICtrlEdit_SetLimitText','GUICtrlEdit_SetMargins', + 'GUICtrlEdit_SetModify','GUICtrlEdit_SetPasswordChar', + 'GUICtrlEdit_SetReadOnly','GUICtrlEdit_SetRECT', + 'GUICtrlEdit_SetRECTEx','GUICtrlEdit_SetRECTNP', + 'GUICtrlEdit_SetRectNPEx','GUICtrlEdit_SetSel', + 'GUICtrlEdit_SetTabStops','GUICtrlEdit_SetText', + 'GUICtrlEdit_ShowBalloonTip','GUICtrlEdit_Undo', + 'GUICtrlHeader_AddItem','GUICtrlHeader_ClearFilter', + 'GUICtrlHeader_ClearFilterAll','GUICtrlHeader_Create', + 'GUICtrlHeader_CreateDragImage','GUICtrlHeader_DeleteItem', + 'GUICtrlHeader_Destroy','GUICtrlHeader_EditFilter', + 'GUICtrlHeader_GetBitmapMargin','GUICtrlHeader_GetImageList', + 'GUICtrlHeader_GetItem','GUICtrlHeader_GetItemAlign', + 'GUICtrlHeader_GetItemBitmap','GUICtrlHeader_GetItemCount', + 'GUICtrlHeader_GetItemDisplay','GUICtrlHeader_GetItemFlags', + 'GUICtrlHeader_GetItemFormat','GUICtrlHeader_GetItemImage', + 'GUICtrlHeader_GetItemOrder','GUICtrlHeader_GetItemParam', + 'GUICtrlHeader_GetItemRect','GUICtrlHeader_GetItemRectEx', + 'GUICtrlHeader_GetItemText','GUICtrlHeader_GetItemWidth', + 'GUICtrlHeader_GetOrderArray','GUICtrlHeader_GetUnicodeFormat', + 'GUICtrlHeader_HitTest','GUICtrlHeader_InsertItem', + 'GUICtrlHeader_Layout','GUICtrlHeader_OrderToIndex', + 'GUICtrlHeader_SetBitmapMargin', + 'GUICtrlHeader_SetFilterChangeTimeout', + 'GUICtrlHeader_SetHotDivider','GUICtrlHeader_SetImageList', + 'GUICtrlHeader_SetItem','GUICtrlHeader_SetItemAlign', + 'GUICtrlHeader_SetItemBitmap','GUICtrlHeader_SetItemDisplay', + 'GUICtrlHeader_SetItemFlags','GUICtrlHeader_SetItemFormat', + 'GUICtrlHeader_SetItemImage','GUICtrlHeader_SetItemOrder', + 'GUICtrlHeader_SetItemParam','GUICtrlHeader_SetItemText', + 'GUICtrlHeader_SetItemWidth','GUICtrlHeader_SetOrderArray', + 'GUICtrlHeader_SetUnicodeFormat','GUICtrlIpAddress_ClearAddress', + 'GUICtrlIpAddress_Create','GUICtrlIpAddress_Destroy', + 'GUICtrlIpAddress_Get','GUICtrlIpAddress_GetArray', + 'GUICtrlIpAddress_GetEx','GUICtrlIpAddress_IsBlank', + 'GUICtrlIpAddress_Set','GUICtrlIpAddress_SetArray', + 'GUICtrlIpAddress_SetEx','GUICtrlIpAddress_SetFocus', + 'GUICtrlIpAddress_SetFont','GUICtrlIpAddress_SetRange', + 'GUICtrlIpAddress_ShowHide','GUICtrlListBox_AddFile', + 'GUICtrlListBox_AddString','GUICtrlListBox_BeginUpdate', + 'GUICtrlListBox_Create','GUICtrlListBox_DeleteString', + 'GUICtrlListBox_Destroy','GUICtrlListBox_Dir', + 'GUICtrlListBox_EndUpdate','GUICtrlListBox_FindInText', + 'GUICtrlListBox_FindString','GUICtrlListBox_GetAnchorIndex', + 'GUICtrlListBox_GetCaretIndex','GUICtrlListBox_GetCount', + 'GUICtrlListBox_GetCurSel','GUICtrlListBox_GetHorizontalExtent', + 'GUICtrlListBox_GetItemData','GUICtrlListBox_GetItemHeight', + 'GUICtrlListBox_GetItemRect','GUICtrlListBox_GetItemRectEx', + 'GUICtrlListBox_GetListBoxInfo','GUICtrlListBox_GetLocale', + 'GUICtrlListBox_GetLocaleCountry','GUICtrlListBox_GetLocaleLang', + 'GUICtrlListBox_GetLocalePrimLang', + 'GUICtrlListBox_GetLocaleSubLang','GUICtrlListBox_GetSel', + 'GUICtrlListBox_GetSelCount','GUICtrlListBox_GetSelItems', + 'GUICtrlListBox_GetSelItemsText','GUICtrlListBox_GetText', + 'GUICtrlListBox_GetTextLen','GUICtrlListBox_GetTopIndex', + 'GUICtrlListBox_InitStorage','GUICtrlListBox_InsertString', + 'GUICtrlListBox_ItemFromPoint','GUICtrlListBox_ReplaceString', + 'GUICtrlListBox_ResetContent','GUICtrlListBox_SelectString', + 'GUICtrlListBox_SelItemRange','GUICtrlListBox_SelItemRangeEx', + 'GUICtrlListBox_SetAnchorIndex','GUICtrlListBox_SetCaretIndex', + 'GUICtrlListBox_SetColumnWidth','GUICtrlListBox_SetCurSel', + 'GUICtrlListBox_SetHorizontalExtent','GUICtrlListBox_SetItemData', + 'GUICtrlListBox_SetItemHeight','GUICtrlListBox_SetLocale', + 'GUICtrlListBox_SetSel','GUICtrlListBox_SetTabStops', + 'GUICtrlListBox_SetTopIndex','GUICtrlListBox_Sort', + 'GUICtrlListBox_SwapString','GUICtrlListBox_UpdateHScroll', + 'GUICtrlListView_AddArray','GUICtrlListView_AddColumn', + 'GUICtrlListView_AddItem','GUICtrlListView_AddSubItem', + 'GUICtrlListView_ApproximateViewHeight', + 'GUICtrlListView_ApproximateViewRect', + 'GUICtrlListView_ApproximateViewWidth','GUICtrlListView_Arrange', + 'GUICtrlListView_BeginUpdate','GUICtrlListView_CancelEditLabel', + 'GUICtrlListView_ClickItem','GUICtrlListView_CopyItems', + 'GUICtrlListView_Create','GUICtrlListView_CreateDragImage', + 'GUICtrlListView_CreateSolidBitMap', + 'GUICtrlListView_DeleteAllItems','GUICtrlListView_DeleteColumn', + 'GUICtrlListView_DeleteItem','GUICtrlListView_DeleteItemsSelected', + 'GUICtrlListView_Destroy','GUICtrlListView_DrawDragImage', + 'GUICtrlListView_EditLabel','GUICtrlListView_EnableGroupView', + 'GUICtrlListView_EndUpdate','GUICtrlListView_EnsureVisible', + 'GUICtrlListView_FindInText','GUICtrlListView_FindItem', + 'GUICtrlListView_FindNearest','GUICtrlListView_FindParam', + 'GUICtrlListView_FindText','GUICtrlListView_GetBkColor', + 'GUICtrlListView_GetBkImage','GUICtrlListView_GetCallbackMask', + 'GUICtrlListView_GetColumn','GUICtrlListView_GetColumnCount', + 'GUICtrlListView_GetColumnOrder', + 'GUICtrlListView_GetColumnOrderArray', + 'GUICtrlListView_GetColumnWidth','GUICtrlListView_GetCounterPage', + 'GUICtrlListView_GetEditControl', + 'GUICtrlListView_GetExtendedListViewStyle', + 'GUICtrlListView_GetGroupInfo', + 'GUICtrlListView_GetGroupViewEnabled','GUICtrlListView_GetHeader', + 'GUICtrlListView_GetHotCursor','GUICtrlListView_GetHotItem', + 'GUICtrlListView_GetHoverTime','GUICtrlListView_GetImageList', + 'GUICtrlListView_GetISearchString','GUICtrlListView_GetItem', + 'GUICtrlListView_GetItemChecked','GUICtrlListView_GetItemCount', + 'GUICtrlListView_GetItemCut','GUICtrlListView_GetItemDropHilited', + 'GUICtrlListView_GetItemEx','GUICtrlListView_GetItemFocused', + 'GUICtrlListView_GetItemGroupID','GUICtrlListView_GetItemImage', + 'GUICtrlListView_GetItemIndent','GUICtrlListView_GetItemParam', + 'GUICtrlListView_GetItemPosition', + 'GUICtrlListView_GetItemPositionX', + 'GUICtrlListView_GetItemPositionY','GUICtrlListView_GetItemRect', + 'GUICtrlListView_GetItemRectEx','GUICtrlListView_GetItemSelected', + 'GUICtrlListView_GetItemSpacing','GUICtrlListView_GetItemSpacingX', + 'GUICtrlListView_GetItemSpacingY','GUICtrlListView_GetItemState', + 'GUICtrlListView_GetItemStateImage','GUICtrlListView_GetItemText', + 'GUICtrlListView_GetItemTextArray', + 'GUICtrlListView_GetItemTextString','GUICtrlListView_GetNextItem', + 'GUICtrlListView_GetNumberOfWorkAreas','GUICtrlListView_GetOrigin', + 'GUICtrlListView_GetOriginX','GUICtrlListView_GetOriginY', + 'GUICtrlListView_GetOutlineColor', + 'GUICtrlListView_GetSelectedColumn', + 'GUICtrlListView_GetSelectedCount', + 'GUICtrlListView_GetSelectedIndices', + 'GUICtrlListView_GetSelectionMark','GUICtrlListView_GetStringWidth', + 'GUICtrlListView_GetSubItemRect','GUICtrlListView_GetTextBkColor', + 'GUICtrlListView_GetTextColor','GUICtrlListView_GetToolTips', + 'GUICtrlListView_GetTopIndex','GUICtrlListView_GetUnicodeFormat', + 'GUICtrlListView_GetView','GUICtrlListView_GetViewDetails', + 'GUICtrlListView_GetViewLarge','GUICtrlListView_GetViewList', + 'GUICtrlListView_GetViewRect','GUICtrlListView_GetViewSmall', + 'GUICtrlListView_GetViewTile','GUICtrlListView_HideColumn', + 'GUICtrlListView_HitTest','GUICtrlListView_InsertColumn', + 'GUICtrlListView_InsertGroup','GUICtrlListView_InsertItem', + 'GUICtrlListView_JustifyColumn','GUICtrlListView_MapIDToIndex', + 'GUICtrlListView_MapIndexToID','GUICtrlListView_RedrawItems', + 'GUICtrlListView_RegisterSortCallBack', + 'GUICtrlListView_RemoveAllGroups','GUICtrlListView_RemoveGroup', + 'GUICtrlListView_Scroll','GUICtrlListView_SetBkColor', + 'GUICtrlListView_SetBkImage','GUICtrlListView_SetCallBackMask', + 'GUICtrlListView_SetColumn','GUICtrlListView_SetColumnOrder', + 'GUICtrlListView_SetColumnOrderArray', + 'GUICtrlListView_SetColumnWidth', + 'GUICtrlListView_SetExtendedListViewStyle', + 'GUICtrlListView_SetGroupInfo','GUICtrlListView_SetHotItem', + 'GUICtrlListView_SetHoverTime','GUICtrlListView_SetIconSpacing', + 'GUICtrlListView_SetImageList','GUICtrlListView_SetItem', + 'GUICtrlListView_SetItemChecked','GUICtrlListView_SetItemCount', + 'GUICtrlListView_SetItemCut','GUICtrlListView_SetItemDropHilited', + 'GUICtrlListView_SetItemEx','GUICtrlListView_SetItemFocused', + 'GUICtrlListView_SetItemGroupID','GUICtrlListView_SetItemImage', + 'GUICtrlListView_SetItemIndent','GUICtrlListView_SetItemParam', + 'GUICtrlListView_SetItemPosition', + 'GUICtrlListView_SetItemPosition32', + 'GUICtrlListView_SetItemSelected','GUICtrlListView_SetItemState', + 'GUICtrlListView_SetItemStateImage','GUICtrlListView_SetItemText', + 'GUICtrlListView_SetOutlineColor', + 'GUICtrlListView_SetSelectedColumn', + 'GUICtrlListView_SetSelectionMark','GUICtrlListView_SetTextBkColor', + 'GUICtrlListView_SetTextColor','GUICtrlListView_SetToolTips', + 'GUICtrlListView_SetUnicodeFormat','GUICtrlListView_SetView', + 'GUICtrlListView_SetWorkAreas','GUICtrlListView_SimpleSort', + 'GUICtrlListView_SortItems','GUICtrlListView_SubItemHitTest', + 'GUICtrlListView_UnRegisterSortCallBack', + 'GUICtrlMenu_AddMenuItem','GUICtrlMenu_AppendMenu', + 'GUICtrlMenu_CheckMenuItem','GUICtrlMenu_CheckRadioItem', + 'GUICtrlMenu_CreateMenu','GUICtrlMenu_CreatePopup', + 'GUICtrlMenu_DeleteMenu','GUICtrlMenu_DestroyMenu', + 'GUICtrlMenu_DrawMenuBar','GUICtrlMenu_EnableMenuItem', + 'GUICtrlMenu_FindItem','GUICtrlMenu_FindParent', + 'GUICtrlMenu_GetItemBmp','GUICtrlMenu_GetItemBmpChecked', + 'GUICtrlMenu_GetItemBmpUnchecked','GUICtrlMenu_GetItemChecked', + 'GUICtrlMenu_GetItemCount','GUICtrlMenu_GetItemData', + 'GUICtrlMenu_GetItemDefault','GUICtrlMenu_GetItemDisabled', + 'GUICtrlMenu_GetItemEnabled','GUICtrlMenu_GetItemGrayed', + 'GUICtrlMenu_GetItemHighlighted','GUICtrlMenu_GetItemID', + 'GUICtrlMenu_GetItemInfo','GUICtrlMenu_GetItemRect', + 'GUICtrlMenu_GetItemRectEx','GUICtrlMenu_GetItemState', + 'GUICtrlMenu_GetItemStateEx','GUICtrlMenu_GetItemSubMenu', + 'GUICtrlMenu_GetItemText','GUICtrlMenu_GetItemType', + 'GUICtrlMenu_GetMenu','GUICtrlMenu_GetMenuBackground', + 'GUICtrlMenu_GetMenuBarInfo','GUICtrlMenu_GetMenuContextHelpID', + 'GUICtrlMenu_GetMenuData','GUICtrlMenu_GetMenuDefaultItem', + 'GUICtrlMenu_GetMenuHeight','GUICtrlMenu_GetMenuInfo', + 'GUICtrlMenu_GetMenuStyle','GUICtrlMenu_GetSystemMenu', + 'GUICtrlMenu_InsertMenuItem','GUICtrlMenu_InsertMenuItemEx', + 'GUICtrlMenu_IsMenu','GUICtrlMenu_LoadMenu', + 'GUICtrlMenu_MapAccelerator','GUICtrlMenu_MenuItemFromPoint', + 'GUICtrlMenu_RemoveMenu','GUICtrlMenu_SetItemBitmaps', + 'GUICtrlMenu_SetItemBmp','GUICtrlMenu_SetItemBmpChecked', + 'GUICtrlMenu_SetItemBmpUnchecked','GUICtrlMenu_SetItemChecked', + 'GUICtrlMenu_SetItemData','GUICtrlMenu_SetItemDefault', + 'GUICtrlMenu_SetItemDisabled','GUICtrlMenu_SetItemEnabled', + 'GUICtrlMenu_SetItemGrayed','GUICtrlMenu_SetItemHighlighted', + 'GUICtrlMenu_SetItemID','GUICtrlMenu_SetItemInfo', + 'GUICtrlMenu_SetItemState','GUICtrlMenu_SetItemSubMenu', + 'GUICtrlMenu_SetItemText','GUICtrlMenu_SetItemType', + 'GUICtrlMenu_SetMenu','GUICtrlMenu_SetMenuBackground', + 'GUICtrlMenu_SetMenuContextHelpID','GUICtrlMenu_SetMenuData', + 'GUICtrlMenu_SetMenuDefaultItem','GUICtrlMenu_SetMenuHeight', + 'GUICtrlMenu_SetMenuInfo','GUICtrlMenu_SetMenuStyle', + 'GUICtrlMenu_TrackPopupMenu','GUICtrlMonthCal_Create', + 'GUICtrlMonthCal_Destroy','GUICtrlMonthCal_GetColor', + 'GUICtrlMonthCal_GetColorArray','GUICtrlMonthCal_GetCurSel', + 'GUICtrlMonthCal_GetCurSelStr','GUICtrlMonthCal_GetFirstDOW', + 'GUICtrlMonthCal_GetFirstDOWStr','GUICtrlMonthCal_GetMaxSelCount', + 'GUICtrlMonthCal_GetMaxTodayWidth', + 'GUICtrlMonthCal_GetMinReqHeight','GUICtrlMonthCal_GetMinReqRect', + 'GUICtrlMonthCal_GetMinReqRectArray', + 'GUICtrlMonthCal_GetMinReqWidth','GUICtrlMonthCal_GetMonthDelta', + 'GUICtrlMonthCal_GetMonthRange','GUICtrlMonthCal_GetMonthRangeMax', + 'GUICtrlMonthCal_GetMonthRangeMaxStr', + 'GUICtrlMonthCal_GetMonthRangeMin', + 'GUICtrlMonthCal_GetMonthRangeMinStr', + 'GUICtrlMonthCal_GetMonthRangeSpan','GUICtrlMonthCal_GetRange', + 'GUICtrlMonthCal_GetRangeMax','GUICtrlMonthCal_GetRangeMaxStr', + 'GUICtrlMonthCal_GetRangeMin','GUICtrlMonthCal_GetRangeMinStr', + 'GUICtrlMonthCal_GetSelRange','GUICtrlMonthCal_GetSelRangeMax', + 'GUICtrlMonthCal_GetSelRangeMaxStr', + 'GUICtrlMonthCal_GetSelRangeMin', + 'GUICtrlMonthCal_GetSelRangeMinStr','GUICtrlMonthCal_GetToday', + 'GUICtrlMonthCal_GetTodayStr','GUICtrlMonthCal_GetUnicodeFormat', + 'GUICtrlMonthCal_HitTest','GUICtrlMonthCal_SetColor', + 'GUICtrlMonthCal_SetCurSel','GUICtrlMonthCal_SetDayState', + 'GUICtrlMonthCal_SetFirstDOW','GUICtrlMonthCal_SetMaxSelCount', + 'GUICtrlMonthCal_SetMonthDelta','GUICtrlMonthCal_SetRange', + 'GUICtrlMonthCal_SetSelRange','GUICtrlMonthCal_SetToday', + 'GUICtrlMonthCal_SetUnicodeFormat','GUICtrlRebar_AddBand', + 'GUICtrlRebar_AddToolBarBand','GUICtrlRebar_BeginDrag', + 'GUICtrlRebar_Create','GUICtrlRebar_DeleteBand', + 'GUICtrlRebar_Destroy','GUICtrlRebar_DragMove', + 'GUICtrlRebar_EndDrag','GUICtrlRebar_GetBandBackColor', + 'GUICtrlRebar_GetBandBorders','GUICtrlRebar_GetBandBordersEx', + 'GUICtrlRebar_GetBandChildHandle','GUICtrlRebar_GetBandChildSize', + 'GUICtrlRebar_GetBandCount','GUICtrlRebar_GetBandForeColor', + 'GUICtrlRebar_GetBandHeaderSize','GUICtrlRebar_GetBandID', + 'GUICtrlRebar_GetBandIdealSize','GUICtrlRebar_GetBandLength', + 'GUICtrlRebar_GetBandLParam','GUICtrlRebar_GetBandMargins', + 'GUICtrlRebar_GetBandMarginsEx','GUICtrlRebar_GetBandRect', + 'GUICtrlRebar_GetBandRectEx','GUICtrlRebar_GetBandStyle', + 'GUICtrlRebar_GetBandStyleBreak', + 'GUICtrlRebar_GetBandStyleChildEdge', + 'GUICtrlRebar_GetBandStyleFixedBMP', + 'GUICtrlRebar_GetBandStyleFixedSize', + 'GUICtrlRebar_GetBandStyleGripperAlways', + 'GUICtrlRebar_GetBandStyleHidden', + 'GUICtrlRebar_GetBandStyleHideTitle', + 'GUICtrlRebar_GetBandStyleNoGripper', + 'GUICtrlRebar_GetBandStyleTopAlign', + 'GUICtrlRebar_GetBandStyleUseChevron', + 'GUICtrlRebar_GetBandStyleVariableHeight', + 'GUICtrlRebar_GetBandText','GUICtrlRebar_GetBarHeight', + 'GUICtrlRebar_GetBKColor','GUICtrlRebar_GetColorScheme', + 'GUICtrlRebar_GetRowCount','GUICtrlRebar_GetRowHeight', + 'GUICtrlRebar_GetTextColor','GUICtrlRebar_GetToolTips', + 'GUICtrlRebar_GetUnicodeFormat','GUICtrlRebar_HitTest', + 'GUICtrlRebar_IDToIndex','GUICtrlRebar_MaximizeBand', + 'GUICtrlRebar_MinimizeBand','GUICtrlRebar_MoveBand', + 'GUICtrlRebar_SetBandBackColor','GUICtrlRebar_SetBandForeColor', + 'GUICtrlRebar_SetBandHeaderSize','GUICtrlRebar_SetBandID', + 'GUICtrlRebar_SetBandIdealSize','GUICtrlRebar_SetBandLength', + 'GUICtrlRebar_SetBandLParam','GUICtrlRebar_SetBandStyle', + 'GUICtrlRebar_SetBandStyleBreak', + 'GUICtrlRebar_SetBandStyleChildEdge', + 'GUICtrlRebar_SetBandStyleFixedBMP', + 'GUICtrlRebar_SetBandStyleFixedSize', + 'GUICtrlRebar_SetBandStyleGripperAlways', + 'GUICtrlRebar_SetBandStyleHidden', + 'GUICtrlRebar_SetBandStyleHideTitle', + 'GUICtrlRebar_SetBandStyleNoGripper', + 'GUICtrlRebar_SetBandStyleTopAlign', + 'GUICtrlRebar_SetBandStyleUseChevron', + 'GUICtrlRebar_SetBandStyleVariableHeight', + 'GUICtrlRebar_SetBandText','GUICtrlRebar_SetBKColor', + 'GUICtrlRebar_SetColorScheme','GUICtrlRebar_SetTextColor', + 'GUICtrlRebar_SetToolTips','GUICtrlRebar_SetUnicodeFormat', + 'GUICtrlRebar_ShowBand','GUICtrlSlider_ClearSel', + 'GUICtrlSlider_ClearTics','GUICtrlSlider_Create', + 'GUICtrlSlider_Destroy','GUICtrlSlider_GetBuddy', + 'GUICtrlSlider_GetChannelRect','GUICtrlSlider_GetLineSize', + 'GUICtrlSlider_GetNumTics','GUICtrlSlider_GetPageSize', + 'GUICtrlSlider_GetPos','GUICtrlSlider_GetPTics', + 'GUICtrlSlider_GetRange','GUICtrlSlider_GetRangeMax', + 'GUICtrlSlider_GetRangeMin','GUICtrlSlider_GetSel', + 'GUICtrlSlider_GetSelEnd','GUICtrlSlider_GetSelStart', + 'GUICtrlSlider_GetThumbLength','GUICtrlSlider_GetThumbRect', + 'GUICtrlSlider_GetThumbRectEx','GUICtrlSlider_GetTic', + 'GUICtrlSlider_GetTicPos','GUICtrlSlider_GetToolTips', + 'GUICtrlSlider_GetUnicodeFormat','GUICtrlSlider_SetBuddy', + 'GUICtrlSlider_SetLineSize','GUICtrlSlider_SetPageSize', + 'GUICtrlSlider_SetPos','GUICtrlSlider_SetRange', + 'GUICtrlSlider_SetRangeMax','GUICtrlSlider_SetRangeMin', + 'GUICtrlSlider_SetSel','GUICtrlSlider_SetSelEnd', + 'GUICtrlSlider_SetSelStart','GUICtrlSlider_SetThumbLength', + 'GUICtrlSlider_SetTic','GUICtrlSlider_SetTicFreq', + 'GUICtrlSlider_SetTipSide','GUICtrlSlider_SetToolTips', + 'GUICtrlSlider_SetUnicodeFormat','GUICtrlStatusBar_Create', + 'GUICtrlStatusBar_Destroy','GUICtrlStatusBar_EmbedControl', + 'GUICtrlStatusBar_GetBorders','GUICtrlStatusBar_GetBordersHorz', + 'GUICtrlStatusBar_GetBordersRect','GUICtrlStatusBar_GetBordersVert', + 'GUICtrlStatusBar_GetCount','GUICtrlStatusBar_GetHeight', + 'GUICtrlStatusBar_GetIcon','GUICtrlStatusBar_GetParts', + 'GUICtrlStatusBar_GetRect','GUICtrlStatusBar_GetRectEx', + 'GUICtrlStatusBar_GetText','GUICtrlStatusBar_GetTextFlags', + 'GUICtrlStatusBar_GetTextLength','GUICtrlStatusBar_GetTextLengthEx', + 'GUICtrlStatusBar_GetTipText','GUICtrlStatusBar_GetUnicodeFormat', + 'GUICtrlStatusBar_GetWidth','GUICtrlStatusBar_IsSimple', + 'GUICtrlStatusBar_Resize','GUICtrlStatusBar_SetBkColor', + 'GUICtrlStatusBar_SetIcon','GUICtrlStatusBar_SetMinHeight', + 'GUICtrlStatusBar_SetParts','GUICtrlStatusBar_SetSimple', + 'GUICtrlStatusBar_SetText','GUICtrlStatusBar_SetTipText', + 'GUICtrlStatusBar_SetUnicodeFormat','GUICtrlStatusBar_ShowHide', + 'GUICtrlTab_Create','GUICtrlTab_DeleteAllItems', + 'GUICtrlTab_DeleteItem','GUICtrlTab_DeselectAll', + 'GUICtrlTab_Destroy','GUICtrlTab_FindTab','GUICtrlTab_GetCurFocus', + 'GUICtrlTab_GetCurSel','GUICtrlTab_GetDisplayRect', + 'GUICtrlTab_GetDisplayRectEx','GUICtrlTab_GetExtendedStyle', + 'GUICtrlTab_GetImageList','GUICtrlTab_GetItem', + 'GUICtrlTab_GetItemCount','GUICtrlTab_GetItemImage', + 'GUICtrlTab_GetItemParam','GUICtrlTab_GetItemRect', + 'GUICtrlTab_GetItemRectEx','GUICtrlTab_GetItemState', + 'GUICtrlTab_GetItemText','GUICtrlTab_GetRowCount', + 'GUICtrlTab_GetToolTips','GUICtrlTab_GetUnicodeFormat', + 'GUICtrlTab_HighlightItem','GUICtrlTab_HitTest', + 'GUICtrlTab_InsertItem','GUICtrlTab_RemoveImage', + 'GUICtrlTab_SetCurFocus','GUICtrlTab_SetCurSel', + 'GUICtrlTab_SetExtendedStyle','GUICtrlTab_SetImageList', + 'GUICtrlTab_SetItem','GUICtrlTab_SetItemImage', + 'GUICtrlTab_SetItemParam','GUICtrlTab_SetItemSize', + 'GUICtrlTab_SetItemState','GUICtrlTab_SetItemText', + 'GUICtrlTab_SetMinTabWidth','GUICtrlTab_SetPadding', + 'GUICtrlTab_SetToolTips','GUICtrlTab_SetUnicodeFormat', + 'GUICtrlToolbar_AddBitmap','GUICtrlToolbar_AddButton', + 'GUICtrlToolbar_AddButtonSep','GUICtrlToolbar_AddString', + 'GUICtrlToolbar_ButtonCount','GUICtrlToolbar_CheckButton', + 'GUICtrlToolbar_ClickAccel','GUICtrlToolbar_ClickButton', + 'GUICtrlToolbar_ClickIndex','GUICtrlToolbar_CommandToIndex', + 'GUICtrlToolbar_Create','GUICtrlToolbar_Customize', + 'GUICtrlToolbar_DeleteButton','GUICtrlToolbar_Destroy', + 'GUICtrlToolbar_EnableButton','GUICtrlToolbar_FindToolbar', + 'GUICtrlToolbar_GetAnchorHighlight','GUICtrlToolbar_GetBitmapFlags', + 'GUICtrlToolbar_GetButtonBitmap','GUICtrlToolbar_GetButtonInfo', + 'GUICtrlToolbar_GetButtonInfoEx','GUICtrlToolbar_GetButtonParam', + 'GUICtrlToolbar_GetButtonRect','GUICtrlToolbar_GetButtonRectEx', + 'GUICtrlToolbar_GetButtonSize','GUICtrlToolbar_GetButtonState', + 'GUICtrlToolbar_GetButtonStyle','GUICtrlToolbar_GetButtonText', + 'GUICtrlToolbar_GetColorScheme', + 'GUICtrlToolbar_GetDisabledImageList', + 'GUICtrlToolbar_GetExtendedStyle','GUICtrlToolbar_GetHotImageList', + 'GUICtrlToolbar_GetHotItem','GUICtrlToolbar_GetImageList', + 'GUICtrlToolbar_GetInsertMark','GUICtrlToolbar_GetInsertMarkColor', + 'GUICtrlToolbar_GetMaxSize','GUICtrlToolbar_GetMetrics', + 'GUICtrlToolbar_GetPadding','GUICtrlToolbar_GetRows', + 'GUICtrlToolbar_GetString','GUICtrlToolbar_GetStyle', + 'GUICtrlToolbar_GetStyleAltDrag', + 'GUICtrlToolbar_GetStyleCustomErase','GUICtrlToolbar_GetStyleFlat', + 'GUICtrlToolbar_GetStyleList','GUICtrlToolbar_GetStyleRegisterDrop', + 'GUICtrlToolbar_GetStyleToolTips', + 'GUICtrlToolbar_GetStyleTransparent', + 'GUICtrlToolbar_GetStyleWrapable','GUICtrlToolbar_GetTextRows', + 'GUICtrlToolbar_GetToolTips','GUICtrlToolbar_GetUnicodeFormat', + 'GUICtrlToolbar_HideButton','GUICtrlToolbar_HighlightButton', + 'GUICtrlToolbar_HitTest','GUICtrlToolbar_IndexToCommand', + 'GUICtrlToolbar_InsertButton','GUICtrlToolbar_InsertMarkHitTest', + 'GUICtrlToolbar_IsButtonChecked','GUICtrlToolbar_IsButtonEnabled', + 'GUICtrlToolbar_IsButtonHidden', + 'GUICtrlToolbar_IsButtonHighlighted', + 'GUICtrlToolbar_IsButtonIndeterminate', + 'GUICtrlToolbar_IsButtonPressed','GUICtrlToolbar_LoadBitmap', + 'GUICtrlToolbar_LoadImages','GUICtrlToolbar_MapAccelerator', + 'GUICtrlToolbar_MoveButton','GUICtrlToolbar_PressButton', + 'GUICtrlToolbar_SetAnchorHighlight','GUICtrlToolbar_SetBitmapSize', + 'GUICtrlToolbar_SetButtonBitMap','GUICtrlToolbar_SetButtonInfo', + 'GUICtrlToolbar_SetButtonInfoEx','GUICtrlToolbar_SetButtonParam', + 'GUICtrlToolbar_SetButtonSize','GUICtrlToolbar_SetButtonState', + 'GUICtrlToolbar_SetButtonStyle','GUICtrlToolbar_SetButtonText', + 'GUICtrlToolbar_SetButtonWidth','GUICtrlToolbar_SetCmdID', + 'GUICtrlToolbar_SetColorScheme', + 'GUICtrlToolbar_SetDisabledImageList', + 'GUICtrlToolbar_SetDrawTextFlags','GUICtrlToolbar_SetExtendedStyle', + 'GUICtrlToolbar_SetHotImageList','GUICtrlToolbar_SetHotItem', + 'GUICtrlToolbar_SetImageList','GUICtrlToolbar_SetIndent', + 'GUICtrlToolbar_SetIndeterminate','GUICtrlToolbar_SetInsertMark', + 'GUICtrlToolbar_SetInsertMarkColor','GUICtrlToolbar_SetMaxTextRows', + 'GUICtrlToolbar_SetMetrics','GUICtrlToolbar_SetPadding', + 'GUICtrlToolbar_SetParent','GUICtrlToolbar_SetRows', + 'GUICtrlToolbar_SetStyle','GUICtrlToolbar_SetStyleAltDrag', + 'GUICtrlToolbar_SetStyleCustomErase','GUICtrlToolbar_SetStyleFlat', + 'GUICtrlToolbar_SetStyleList','GUICtrlToolbar_SetStyleRegisterDrop', + 'GUICtrlToolbar_SetStyleToolTips', + 'GUICtrlToolbar_SetStyleTransparent', + 'GUICtrlToolbar_SetStyleWrapable','GUICtrlToolbar_SetToolTips', + 'GUICtrlToolbar_SetUnicodeFormat','GUICtrlToolbar_SetWindowTheme', + 'GUICtrlTreeView_Add','GUICtrlTreeView_AddChild', + 'GUICtrlTreeView_AddChildFirst','GUICtrlTreeView_AddFirst', + 'GUICtrlTreeView_BeginUpdate','GUICtrlTreeView_ClickItem', + 'GUICtrlTreeView_Create','GUICtrlTreeView_CreateDragImage', + 'GUICtrlTreeView_CreateSolidBitMap','GUICtrlTreeView_Delete', + 'GUICtrlTreeView_DeleteAll','GUICtrlTreeView_DeleteChildren', + 'GUICtrlTreeView_Destroy','GUICtrlTreeView_DisplayRect', + 'GUICtrlTreeView_DisplayRectEx','GUICtrlTreeView_EditText', + 'GUICtrlTreeView_EndEdit','GUICtrlTreeView_EndUpdate', + 'GUICtrlTreeView_EnsureVisible','GUICtrlTreeView_Expand', + 'GUICtrlTreeView_ExpandedOnce','GUICtrlTreeView_FindItem', + 'GUICtrlTreeView_FindItemEx','GUICtrlTreeView_GetBkColor', + 'GUICtrlTreeView_GetBold','GUICtrlTreeView_GetChecked', + 'GUICtrlTreeView_GetChildCount','GUICtrlTreeView_GetChildren', + 'GUICtrlTreeView_GetCount','GUICtrlTreeView_GetCut', + 'GUICtrlTreeView_GetDropTarget','GUICtrlTreeView_GetEditControl', + 'GUICtrlTreeView_GetExpanded','GUICtrlTreeView_GetFirstChild', + 'GUICtrlTreeView_GetFirstItem','GUICtrlTreeView_GetFirstVisible', + 'GUICtrlTreeView_GetFocused','GUICtrlTreeView_GetHeight', + 'GUICtrlTreeView_GetImageIndex', + 'GUICtrlTreeView_GetImageListIconHandle', + 'GUICtrlTreeView_GetIndent','GUICtrlTreeView_GetInsertMarkColor', + 'GUICtrlTreeView_GetISearchString','GUICtrlTreeView_GetItemByIndex', + 'GUICtrlTreeView_GetItemHandle','GUICtrlTreeView_GetItemParam', + 'GUICtrlTreeView_GetLastChild','GUICtrlTreeView_GetLineColor', + 'GUICtrlTreeView_GetNext','GUICtrlTreeView_GetNextChild', + 'GUICtrlTreeView_GetNextSibling','GUICtrlTreeView_GetNextVisible', + 'GUICtrlTreeView_GetNormalImageList', + 'GUICtrlTreeView_GetParentHandle','GUICtrlTreeView_GetParentParam', + 'GUICtrlTreeView_GetPrev','GUICtrlTreeView_GetPrevChild', + 'GUICtrlTreeView_GetPrevSibling','GUICtrlTreeView_GetPrevVisible', + 'GUICtrlTreeView_GetScrollTime','GUICtrlTreeView_GetSelected', + 'GUICtrlTreeView_GetSelectedImageIndex', + 'GUICtrlTreeView_GetSelection','GUICtrlTreeView_GetSiblingCount', + 'GUICtrlTreeView_GetState','GUICtrlTreeView_GetStateImageIndex', + 'GUICtrlTreeView_GetStateImageList','GUICtrlTreeView_GetText', + 'GUICtrlTreeView_GetTextColor','GUICtrlTreeView_GetToolTips', + 'GUICtrlTreeView_GetTree','GUICtrlTreeView_GetUnicodeFormat', + 'GUICtrlTreeView_GetVisible','GUICtrlTreeView_GetVisibleCount', + 'GUICtrlTreeView_HitTest','GUICtrlTreeView_HitTestEx', + 'GUICtrlTreeView_HitTestItem','GUICtrlTreeView_Index', + 'GUICtrlTreeView_InsertItem','GUICtrlTreeView_IsFirstItem', + 'GUICtrlTreeView_IsParent','GUICtrlTreeView_Level', + 'GUICtrlTreeView_SelectItem','GUICtrlTreeView_SelectItemByIndex', + 'GUICtrlTreeView_SetBkColor','GUICtrlTreeView_SetBold', + 'GUICtrlTreeView_SetChecked','GUICtrlTreeView_SetCheckedByIndex', + 'GUICtrlTreeView_SetChildren','GUICtrlTreeView_SetCut', + 'GUICtrlTreeView_SetDropTarget','GUICtrlTreeView_SetFocused', + 'GUICtrlTreeView_SetHeight','GUICtrlTreeView_SetIcon', + 'GUICtrlTreeView_SetImageIndex','GUICtrlTreeView_SetIndent', + 'GUICtrlTreeView_SetInsertMark', + 'GUICtrlTreeView_SetInsertMarkColor', + 'GUICtrlTreeView_SetItemHeight','GUICtrlTreeView_SetItemParam', + 'GUICtrlTreeView_SetLineColor','GUICtrlTreeView_SetNormalImageList', + 'GUICtrlTreeView_SetScrollTime','GUICtrlTreeView_SetSelected', + 'GUICtrlTreeView_SetSelectedImageIndex','GUICtrlTreeView_SetState', + 'GUICtrlTreeView_SetStateImageIndex', + 'GUICtrlTreeView_SetStateImageList','GUICtrlTreeView_SetText', + 'GUICtrlTreeView_SetTextColor','GUICtrlTreeView_SetToolTips', + 'GUICtrlTreeView_SetUnicodeFormat','GUICtrlTreeView_Sort', + 'GUIImageList_Add','GUIImageList_AddBitmap','GUIImageList_AddIcon', + 'GUIImageList_AddMasked','GUIImageList_BeginDrag', + 'GUIImageList_Copy','GUIImageList_Create','GUIImageList_Destroy', + 'GUIImageList_DestroyIcon','GUIImageList_DragEnter', + 'GUIImageList_DragLeave','GUIImageList_DragMove', + 'GUIImageList_Draw','GUIImageList_DrawEx','GUIImageList_Duplicate', + 'GUIImageList_EndDrag','GUIImageList_GetBkColor', + 'GUIImageList_GetIcon','GUIImageList_GetIconHeight', + 'GUIImageList_GetIconSize','GUIImageList_GetIconSizeEx', + 'GUIImageList_GetIconWidth','GUIImageList_GetImageCount', + 'GUIImageList_GetImageInfoEx','GUIImageList_Remove', + 'GUIImageList_ReplaceIcon','GUIImageList_SetBkColor', + 'GUIImageList_SetIconSize','GUIImageList_SetImageCount', + 'GUIImageList_Swap','GUIScrollBars_EnableScrollBar', + 'GUIScrollBars_GetScrollBarInfoEx','GUIScrollBars_GetScrollBarRect', + 'GUIScrollBars_GetScrollBarRGState', + 'GUIScrollBars_GetScrollBarXYLineButton', + 'GUIScrollBars_GetScrollBarXYThumbBottom', + 'GUIScrollBars_GetScrollBarXYThumbTop', + 'GUIScrollBars_GetScrollInfo','GUIScrollBars_GetScrollInfoEx', + 'GUIScrollBars_GetScrollInfoMax','GUIScrollBars_GetScrollInfoMin', + 'GUIScrollBars_GetScrollInfoPage','GUIScrollBars_GetScrollInfoPos', + 'GUIScrollBars_GetScrollInfoTrackPos','GUIScrollBars_GetScrollPos', + 'GUIScrollBars_GetScrollRange','GUIScrollBars_Init', + 'GUIScrollBars_ScrollWindow','GUIScrollBars_SetScrollInfo', + 'GUIScrollBars_SetScrollInfoMax','GUIScrollBars_SetScrollInfoMin', + 'GUIScrollBars_SetScrollInfoPage','GUIScrollBars_SetScrollInfoPos', + 'GUIScrollBars_SetScrollRange','GUIScrollBars_ShowScrollBar', + 'GUIToolTip_Activate','GUIToolTip_AddTool','GUIToolTip_AdjustRect', + 'GUIToolTip_BitsToTTF','GUIToolTip_Create','GUIToolTip_DelTool', + 'GUIToolTip_Destroy','GUIToolTip_EnumTools', + 'GUIToolTip_GetBubbleHeight','GUIToolTip_GetBubbleSize', + 'GUIToolTip_GetBubbleWidth','GUIToolTip_GetCurrentTool', + 'GUIToolTip_GetDelayTime','GUIToolTip_GetMargin', + 'GUIToolTip_GetMarginEx','GUIToolTip_GetMaxTipWidth', + 'GUIToolTip_GetText','GUIToolTip_GetTipBkColor', + 'GUIToolTip_GetTipTextColor','GUIToolTip_GetTitleBitMap', + 'GUIToolTip_GetTitleText','GUIToolTip_GetToolCount', + 'GUIToolTip_GetToolInfo','GUIToolTip_HitTest', + 'GUIToolTip_NewToolRect','GUIToolTip_Pop','GUIToolTip_PopUp', + 'GUIToolTip_SetDelayTime','GUIToolTip_SetMargin', + 'GUIToolTip_SetMaxTipWidth','GUIToolTip_SetTipBkColor', + 'GUIToolTip_SetTipTextColor','GUIToolTip_SetTitle', + 'GUIToolTip_SetToolInfo','GUIToolTip_SetWindowTheme', + 'GUIToolTip_ToolExists','GUIToolTip_ToolToArray', + 'GUIToolTip_TrackActivate','GUIToolTip_TrackPosition', + 'GUIToolTip_TTFToBits','GUIToolTip_Update', + 'GUIToolTip_UpdateTipText','HexToString','IE_Example', + 'IE_Introduction','IE_VersionInfo','IEAction','IEAttach', + 'IEBodyReadHTML','IEBodyReadText','IEBodyWriteHTML','IECreate', + 'IECreateEmbedded','IEDocGetObj','IEDocInsertHTML', + 'IEDocInsertText','IEDocReadHTML','IEDocWriteHTML', + 'IEErrorHandlerDeRegister','IEErrorHandlerRegister','IEErrorNotify', + 'IEFormElementCheckBoxSelect','IEFormElementGetCollection', + 'IEFormElementGetObjByName','IEFormElementGetValue', + 'IEFormElementOptionSelect','IEFormElementRadioSelect', + 'IEFormElementSetValue','IEFormGetCollection','IEFormGetObjByName', + 'IEFormImageClick','IEFormReset','IEFormSubmit', + 'IEFrameGetCollection','IEFrameGetObjByName','IEGetObjById', + 'IEGetObjByName','IEHeadInsertEventScript','IEImgClick', + 'IEImgGetCollection','IEIsFrameSet','IELinkClickByIndex', + 'IELinkClickByText','IELinkGetCollection','IELoadWait', + 'IELoadWaitTimeout','IENavigate','IEPropertyGet','IEPropertySet', + 'IEQuit','IETableGetCollection','IETableWriteToArray', + 'IETagNameAllGetCollection','IETagNameGetCollection','Iif', + 'INetExplorerCapable','INetGetSource','INetMail','INetSmtpMail', + 'IsPressed','MathCheckDiv','Max','MemGlobalAlloc','MemGlobalFree', + 'MemGlobalLock','MemGlobalSize','MemGlobalUnlock','MemMoveMemory', + 'MemMsgBox','MemShowError','MemVirtualAlloc','MemVirtualAllocEx', + 'MemVirtualFree','MemVirtualFreeEx','Min','MouseTrap', + 'NamedPipes_CallNamedPipe','NamedPipes_ConnectNamedPipe', + 'NamedPipes_CreateNamedPipe','NamedPipes_CreatePipe', + 'NamedPipes_DisconnectNamedPipe', + 'NamedPipes_GetNamedPipeHandleState','NamedPipes_GetNamedPipeInfo', + 'NamedPipes_PeekNamedPipe','NamedPipes_SetNamedPipeHandleState', + 'NamedPipes_TransactNamedPipe','NamedPipes_WaitNamedPipe', + 'Net_Share_ConnectionEnum','Net_Share_FileClose', + 'Net_Share_FileEnum','Net_Share_FileGetInfo','Net_Share_PermStr', + 'Net_Share_ResourceStr','Net_Share_SessionDel', + 'Net_Share_SessionEnum','Net_Share_SessionGetInfo', + 'Net_Share_ShareAdd','Net_Share_ShareCheck','Net_Share_ShareDel', + 'Net_Share_ShareEnum','Net_Share_ShareGetInfo', + 'Net_Share_ShareSetInfo','Net_Share_StatisticsGetSvr', + 'Net_Share_StatisticsGetWrk','Now','NowCalc','NowCalcDate', + 'NowDate','NowTime','PathFull','PathMake','PathSplit', + 'ProcessGetName','ProcessGetPriority','Radian', + 'ReplaceStringInFile','RunDOS','ScreenCapture_Capture', + 'ScreenCapture_CaptureWnd','ScreenCapture_SaveImage', + 'ScreenCapture_SetBMPFormat','ScreenCapture_SetJPGQuality', + 'ScreenCapture_SetTIFColorDepth','ScreenCapture_SetTIFCompression', + 'Security__AdjustTokenPrivileges','Security__GetAccountSid', + 'Security__GetLengthSid','Security__GetTokenInformation', + 'Security__ImpersonateSelf','Security__IsValidSid', + 'Security__LookupAccountName','Security__LookupAccountSid', + 'Security__LookupPrivilegeValue','Security__OpenProcessToken', + 'Security__OpenThreadToken','Security__OpenThreadTokenEx', + 'Security__SetPrivilege','Security__SidToStringSid', + 'Security__SidTypeStr','Security__StringSidToSid','SendMessage', + 'SendMessageA','SetDate','SetTime','Singleton','SoundClose', + 'SoundLength','SoundOpen','SoundPause','SoundPlay','SoundPos', + 'SoundResume','SoundSeek','SoundStatus','SoundStop', + 'SQLite_Changes','SQLite_Close','SQLite_Display2DResult', + 'SQLite_Encode','SQLite_ErrCode','SQLite_ErrMsg','SQLite_Escape', + 'SQLite_Exec','SQLite_FetchData','SQLite_FetchNames', + 'SQLite_GetTable','SQLite_GetTable2d','SQLite_LastInsertRowID', + 'SQLite_LibVersion','SQLite_Open','SQLite_Query', + 'SQLite_QueryFinalize','SQLite_QueryReset','SQLite_QuerySingleRow', + 'SQLite_SaveMode','SQLite_SetTimeout','SQLite_Shutdown', + 'SQLite_SQLiteExe','SQLite_Startup','SQLite_TotalChanges', + 'StringAddComma','StringBetween','StringEncrypt','StringInsert', + 'StringProper','StringRepeat','StringReverse','StringSplit', + 'StringToHex','TCPIpToName','TempFile','TicksToTime','Timer_Diff', + 'Timer_GetTimerID','Timer_Init','Timer_KillAllTimers', + 'Timer_KillTimer','Timer_SetTimer','TimeToTicks','VersionCompare', + 'viClose','viExecCommand','viFindGpib','viGpibBusReset','viGTL', + 'viOpen','viSetAttribute','viSetTimeout','WeekNumberISO', + 'WinAPI_AttachConsole','WinAPI_AttachThreadInput','WinAPI_Beep', + 'WinAPI_BitBlt','WinAPI_CallNextHookEx','WinAPI_Check', + 'WinAPI_ClientToScreen','WinAPI_CloseHandle', + 'WinAPI_CommDlgExtendedError','WinAPI_CopyIcon', + 'WinAPI_CreateBitmap','WinAPI_CreateCompatibleBitmap', + 'WinAPI_CreateCompatibleDC','WinAPI_CreateEvent', + 'WinAPI_CreateFile','WinAPI_CreateFont','WinAPI_CreateFontIndirect', + 'WinAPI_CreateProcess','WinAPI_CreateSolidBitmap', + 'WinAPI_CreateSolidBrush','WinAPI_CreateWindowEx', + 'WinAPI_DefWindowProc','WinAPI_DeleteDC','WinAPI_DeleteObject', + 'WinAPI_DestroyIcon','WinAPI_DestroyWindow','WinAPI_DrawEdge', + 'WinAPI_DrawFrameControl','WinAPI_DrawIcon','WinAPI_DrawIconEx', + 'WinAPI_DrawText','WinAPI_EnableWindow','WinAPI_EnumDisplayDevices', + 'WinAPI_EnumWindows','WinAPI_EnumWindowsPopup', + 'WinAPI_EnumWindowsTop','WinAPI_ExpandEnvironmentStrings', + 'WinAPI_ExtractIconEx','WinAPI_FatalAppExit','WinAPI_FillRect', + 'WinAPI_FindExecutable','WinAPI_FindWindow','WinAPI_FlashWindow', + 'WinAPI_FlashWindowEx','WinAPI_FloatToInt', + 'WinAPI_FlushFileBuffers','WinAPI_FormatMessage','WinAPI_FrameRect', + 'WinAPI_FreeLibrary','WinAPI_GetAncestor','WinAPI_GetAsyncKeyState', + 'WinAPI_GetClassName','WinAPI_GetClientHeight', + 'WinAPI_GetClientRect','WinAPI_GetClientWidth', + 'WinAPI_GetCurrentProcess','WinAPI_GetCurrentProcessID', + 'WinAPI_GetCurrentThread','WinAPI_GetCurrentThreadId', + 'WinAPI_GetCursorInfo','WinAPI_GetDC','WinAPI_GetDesktopWindow', + 'WinAPI_GetDeviceCaps','WinAPI_GetDIBits','WinAPI_GetDlgCtrlID', + 'WinAPI_GetDlgItem','WinAPI_GetFileSizeEx','WinAPI_GetFocus', + 'WinAPI_GetForegroundWindow','WinAPI_GetIconInfo', + 'WinAPI_GetLastError','WinAPI_GetLastErrorMessage', + 'WinAPI_GetModuleHandle','WinAPI_GetMousePos','WinAPI_GetMousePosX', + 'WinAPI_GetMousePosY','WinAPI_GetObject','WinAPI_GetOpenFileName', + 'WinAPI_GetOverlappedResult','WinAPI_GetParent', + 'WinAPI_GetProcessAffinityMask','WinAPI_GetSaveFileName', + 'WinAPI_GetStdHandle','WinAPI_GetStockObject','WinAPI_GetSysColor', + 'WinAPI_GetSysColorBrush','WinAPI_GetSystemMetrics', + 'WinAPI_GetTextExtentPoint32','WinAPI_GetWindow', + 'WinAPI_GetWindowDC','WinAPI_GetWindowHeight', + 'WinAPI_GetWindowLong','WinAPI_GetWindowRect', + 'WinAPI_GetWindowText','WinAPI_GetWindowThreadProcessId', + 'WinAPI_GetWindowWidth','WinAPI_GetXYFromPoint', + 'WinAPI_GlobalMemStatus','WinAPI_GUIDFromString', + 'WinAPI_GUIDFromStringEx','WinAPI_HiWord','WinAPI_InProcess', + 'WinAPI_IntToFloat','WinAPI_InvalidateRect','WinAPI_IsClassName', + 'WinAPI_IsWindow','WinAPI_IsWindowVisible','WinAPI_LoadBitmap', + 'WinAPI_LoadImage','WinAPI_LoadLibrary','WinAPI_LoadLibraryEx', + 'WinAPI_LoadShell32Icon','WinAPI_LoadString','WinAPI_LocalFree', + 'WinAPI_LoWord','WinAPI_MakeDWord','WinAPI_MAKELANGID', + 'WinAPI_MAKELCID','WinAPI_MakeLong','WinAPI_MessageBeep', + 'WinAPI_Mouse_Event','WinAPI_MoveWindow','WinAPI_MsgBox', + 'WinAPI_MulDiv','WinAPI_MultiByteToWideChar', + 'WinAPI_MultiByteToWideCharEx','WinAPI_OpenProcess', + 'WinAPI_PointFromRect','WinAPI_PostMessage','WinAPI_PrimaryLangId', + 'WinAPI_PtInRect','WinAPI_ReadFile','WinAPI_ReadProcessMemory', + 'WinAPI_RectIsEmpty','WinAPI_RedrawWindow', + 'WinAPI_RegisterWindowMessage','WinAPI_ReleaseCapture', + 'WinAPI_ReleaseDC','WinAPI_ScreenToClient','WinAPI_SelectObject', + 'WinAPI_SetBkColor','WinAPI_SetCapture','WinAPI_SetCursor', + 'WinAPI_SetDefaultPrinter','WinAPI_SetDIBits','WinAPI_SetEvent', + 'WinAPI_SetFocus','WinAPI_SetFont','WinAPI_SetHandleInformation', + 'WinAPI_SetLastError','WinAPI_SetParent', + 'WinAPI_SetProcessAffinityMask','WinAPI_SetSysColors', + 'WinAPI_SetTextColor','WinAPI_SetWindowLong','WinAPI_SetWindowPos', + 'WinAPI_SetWindowsHookEx','WinAPI_SetWindowText', + 'WinAPI_ShowCursor','WinAPI_ShowError','WinAPI_ShowMsg', + 'WinAPI_ShowWindow','WinAPI_StringFromGUID','WinAPI_SubLangId', + 'WinAPI_SystemParametersInfo','WinAPI_TwipsPerPixelX', + 'WinAPI_TwipsPerPixelY','WinAPI_UnhookWindowsHookEx', + 'WinAPI_UpdateLayeredWindow','WinAPI_UpdateWindow', + 'WinAPI_ValidateClassName','WinAPI_WaitForInputIdle', + 'WinAPI_WaitForMultipleObjects','WinAPI_WaitForSingleObject', + 'WinAPI_WideCharToMultiByte','WinAPI_WindowFromPoint', + 'WinAPI_WriteConsole','WinAPI_WriteFile', + 'WinAPI_WriteProcessMemory','WinNet_AddConnection', + 'WinNet_AddConnection2','WinNet_AddConnection3', + 'WinNet_CancelConnection','WinNet_CancelConnection2', + 'WinNet_CloseEnum','WinNet_ConnectionDialog', + 'WinNet_ConnectionDialog1','WinNet_DisconnectDialog', + 'WinNet_DisconnectDialog1','WinNet_EnumResource', + 'WinNet_GetConnection','WinNet_GetConnectionPerformance', + 'WinNet_GetLastError','WinNet_GetNetworkInformation', + 'WinNet_GetProviderName','WinNet_GetResourceInformation', + 'WinNet_GetResourceParent','WinNet_GetUniversalName', + 'WinNet_GetUser','WinNet_OpenEnum','WinNet_RestoreConnection', + 'WinNet_UseConnection','Word_VersionInfo','WordAttach','WordCreate', + 'WordDocAdd','WordDocAddLink','WordDocAddPicture','WordDocClose', + 'WordDocFindReplace','WordDocGetCollection', + 'WordDocLinkGetCollection','WordDocOpen','WordDocPrint', + 'WordDocPropertyGet','WordDocPropertySet','WordDocSave', + 'WordDocSaveAs','WordErrorHandlerDeRegister', + 'WordErrorHandlerRegister','WordErrorNotify','WordMacroRun', + 'WordPropertyGet','WordPropertySet','WordQuit' + ), + 5 => array( + 'ce','comments-end','comments-start','cs','include','include-once', + 'NoTrayIcon','RequireAdmin' + ), + 6 => array( + 'AutoIt3Wrapper_Au3Check_Parameters', + 'AutoIt3Wrapper_Au3Check_Stop_OnWarning', + 'AutoIt3Wrapper_Change2CUI','AutoIt3Wrapper_Compression', + 'AutoIt3Wrapper_cvsWrapper_Parameters','AutoIt3Wrapper_Icon', + 'AutoIt3Wrapper_Outfile','AutoIt3Wrapper_Outfile_Type', + 'AutoIt3Wrapper_Plugin_Funcs','AutoIt3Wrapper_Res_Comment', + 'AutoIt3Wrapper_Res_Description','AutoIt3Wrapper_Res_Field', + 'AutoIt3Wrapper_Res_File_Add','AutoIt3Wrapper_Res_Fileversion', + 'AutoIt3Wrapper_Res_FileVersion_AutoIncrement', + 'AutoIt3Wrapper_Res_Icon_Add','AutoIt3Wrapper_Res_Language', + 'AutoIt3Wrapper_Res_LegalCopyright', + 'AutoIt3Wrapper_res_requestedExecutionLevel', + 'AutoIt3Wrapper_Res_SaveSource','AutoIt3Wrapper_Run_After', + 'AutoIt3Wrapper_Run_Au3check','AutoIt3Wrapper_Run_Before', + 'AutoIt3Wrapper_Run_cvsWrapper','AutoIt3Wrapper_Run_Debug_Mode', + 'AutoIt3Wrapper_Run_Obfuscator','AutoIt3Wrapper_Run_Tidy', + 'AutoIt3Wrapper_Tidy_Stop_OnError','AutoIt3Wrapper_UseAnsi', + 'AutoIt3Wrapper_UseUpx','AutoIt3Wrapper_UseX64', + 'AutoIt3Wrapper_Version','EndRegion','forceref', + 'Obfuscator_Ignore_Funcs','Obfuscator_Ignore_Variables', + 'Obfuscator_Parameters','Region','Tidy_Parameters' + ) + ), + 'SYMBOLS' => array( + '(',')','[',']', + '+','-','*','/','&','^', + '=','+=','-=','*=','/=','&=', + '==','<','<=','>','>=', + ',','.' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF; font-weight: bold;', + 2 => 'color: #800000; font-weight: bold;', + 3 => 'color: #000080; font-style: italic; font-weight: bold;', + 4 => 'color: #0080FF; font-style: italic; font-weight: bold;', + 5 => 'color: #F000FF; font-style: italic;', + 6 => 'color: #A00FF0; font-style: italic;' + ), + 'COMMENTS' => array( + 'MULTI' => 'font-style: italic; color: #669900;', + 0 => 'font-style: italic; color: #009933;', + 1 => 'font-style: italic; color: #9977BB;', + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => 'color: #FF0000; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'font-weight: bold; color: #9977BB;' + ), + 'NUMBERS' => array( + 0 => 'color: #AC00A9; font-style: italic; font-weight: bold;' + ), + 'METHODS' => array( + 1 => 'color: #0000FF; font-style: italic; font-weight: bold;' + ), + 'SYMBOLS' => array( + 0 => 'color: #FF0000; font-weight: bold;' + ), + 'REGEXPS' => array( + 0 => 'font-weight: bold; color: #AA0000;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => 'http://www.autoitscript.com/autoit3/docs/keywords.htm', + 2 => 'http://www.autoitscript.com/autoit3/docs/macros.htm', + 3 => 'http://www.autoitscript.com/autoit3/docs/functions/{FNAME}.htm', + 4 => '', + 5 => '', + 6 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + //Variables + 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*' + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 4 => array( + 'DISALLOWED_BEFORE' => '(? array( + 'DISALLOWED_BEFORE' => '(? array( + 'DISALLOWED_BEFORE' => '(? \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/avisynth.php b/_piecrust/libs/Geshi/geshi/avisynth.php new file mode 100644 index 0000000..af11e98 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/avisynth.php @@ -0,0 +1,194 @@ + 'AviSynth', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/', '[*' => '*]'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + // Reserved words. + 1 => array( + 'try', 'cache', 'function', 'global', 'return' + ), + // Constants / special variables. + 2 => array( + 'true', 'yes', 'false', 'no', '__END__' + ), + // Internal Filters. + 3 => array( + 'AviSource', 'AviFileSource', 'AddBorders', 'AlignedSplice', 'AssumeFPS', 'AssumeScaledFPS', + 'AssumeFrameBased', 'AssumeFieldBased', 'AssumeBFF', 'AssumeTFF', 'Amplify', 'AmplifydB', + 'AssumeSampleRate', 'AudioDub', 'AudioDubEx', 'Animate', 'ApplyRange', + 'BicubicResize', 'BilinearResize', 'BlackmanResize', 'Blur', 'Bob', 'BlankClip', 'Blackness', + 'ColorYUV', 'ConvertBackToYUY2', 'ConvertToRGB', 'ConvertToRGB24', 'ConvertToRGB32', + 'ConvertToYUY2', 'ConvertToY8', 'ConvertToYV411', 'ConvertToYV12', 'ConvertToYV16', 'ConvertToYV24', + 'ColorKeyMask', 'Crop', 'CropBottom', 'ChangeFPS', 'ConvertFPS', 'ComplementParity', 'ConvertAudioTo8bit', + 'ConvertAudioTo16bit', 'ConvertAudioTo24bit', 'ConvertAudioTo32bit', 'ConvertAudioToFloat', 'ConvertToMono', + 'ConditionalFilter', 'ConditionalReader', 'ColorBars', 'Compare', + 'DirectShowSource', 'DeleteFrame', 'Dissolve', 'DuplicateFrame', 'DoubleWeave', 'DelayAudio', + 'EnsureVBRMP3Sync', + 'FixLuminance', 'FlipHorizontal', 'FlipVertical', 'FixBrokenChromaUpsampling', 'FadeIn0', 'FadeIn', + 'FadeIn2', 'FadeOut0', 'FadeOut', 'FadeOut2', 'FadeIO0', 'FadeIO', 'FadeIO2', 'FreezeFrame', 'FrameEvaluate', + 'GreyScale', 'GaussResize', 'GeneralConvolution', 'GetChannel', 'GetLeftChannel', 'GetRightChannel', + 'HorizontalReduceBy2', 'Histogram', + 'ImageReader', 'ImageSource', 'ImageWriter', 'Invert', 'Interleave', 'Info', + 'KillAudio', 'KillVideo', + 'Levels', 'Limiter', 'Layer', 'Letterbox', 'LanczosResize', 'Lanczos4Resize', 'Loop', + 'MergeARGB', 'MergeRGB', 'MergeChroma', 'MergeLuma', 'Merge', 'Mask', 'MaskHS', 'MergeChannels', 'MixAudio', + 'MonoToStereo', 'MessageClip', + 'Normalize', + 'OpenDMLSource', 'Overlay', + 'PointResize', 'PeculiarBlend', 'Pulldown', + 'RGBAdjust', 'ResetMask', 'Reverse', 'ResampleAudio', 'ReduceBy2', + 'SegmentedAviSource', 'SegmentedDirectShowSource', 'SoundOut', 'ShowAlpha', 'ShowRed', 'ShowGreen', + 'ShowBlue', 'SwapUV', 'Subtract', 'SincResize', 'Spline16Resize', 'Spline36Resize', 'Spline64Resize', + 'SelectEven', 'SelectOdd', 'SelectEvery', 'SelectRangeEvery', 'Sharpen', 'SpatialSoften', 'SeparateFields', + 'ShowFiveVersions', 'ShowFrameNumber', 'ShowSMPTE', 'ShowTime', 'StackHorizontal', 'StackVertical', 'Subtitle', + 'SwapFields', 'SuperEQ', 'SSRC', 'ScriptClip', + 'Tweak', 'TurnLeft', 'TurnRight', 'Turn180', 'TemporalSoften', 'TimeStretch', 'TCPServer', 'TCPSource', 'Trim', + 'Tone', + 'UToY', 'UToY8', 'UnalignedSplice', + 'VToY', 'VToY8', 'VerticalReduceBy2', 'Version', + 'WavSource', 'Weave', 'WriteFile', 'WriteFileIf', 'WriteFileStart', 'WriteFileEnd', + 'YToUV' + ), + // Internal functions. + 4 => array( + 'Abs', 'Apply', 'Assert', 'AverageLuma', 'AverageChromaU', 'AverageChromaV', + 'Ceil', 'Cos', 'Chr', 'ChromaUDifference', 'ChromaVDifference', + 'Defined', 'Default', + 'Exp', 'Exist', 'Eval', + 'Floor', 'Frac', 'Float', 'Findstr', 'GetMTMode', + 'HexValue', + 'Int', 'IsBool', 'IsClip', 'IsFloat', 'IsInt', 'IsString', 'Import', + 'LoadPlugin', 'Log', 'LCase', 'LeftStr', 'LumaDifference', 'LoadVirtualDubPlugin', 'LoadVFAPIPlugin', + 'LoadCPlugin', 'Load_Stdcall_Plugin', + 'Max', 'MulDiv', 'MidStr', + 'NOP', + 'OPT_AllowFloatAudio', 'OPT_UseWaveExtensible', + 'Pi', 'Pow', + 'Round', 'Rand', 'RevStr', 'RightStr', 'RGBDifference', 'RGBDifferenceFromPrevious', 'RGBDifferenceToNext', + 'Sin', 'Sqrt', 'Sign', 'Spline', 'StrLen', 'String', 'Select', 'SetMemoryMax', 'SetWorkingDir', 'SetMTMode', + 'SetPlanarLegacyAlignment', + 'Time', + 'UCase', 'UDifferenceFromPrevious', 'UDifferenceToNext', 'UPlaneMax', 'UPlaneMin', 'UPlaneMedian', + 'UPlaneMinMaxDifference', + 'Value', 'VersionNumber', 'VersionString', 'VDifferenceFromPrevious', 'VDifferenceToNext', 'VPlaneMax', + 'VPlaneMin', 'VPlaneMedian', 'VPlaneMinMaxDifference', + 'YDifferenceFromPrevious', 'YDifferenceToNext', 'YPlaneMax', 'YPlaneMin', 'YPlaneMedian', + 'YPlaneMinMaxDifference' + ) + ), + 'SYMBOLS' => array( + '+', '++', '-', '--', '/', '*', '%', + '=', '==', '<', '<=', '>', '>=', '<>', '!=', + '!', '?', ':', + '|', '||', '&&', + '\\', + '(', ')', '{', '}', + '.', ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color:#9966CC; font-weight:bold;', + 2 => 'color:#0000FF; font-weight:bold;', + 3 => 'color:#CC3300; font-weight:bold;', + 4 => 'color:#660000; font-weight:bold;' + ), + 'COMMENTS' => array( + 1 => 'color:#008000; font-style:italic;', + 'MULTI' => 'color:#000080; font-style:italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color:#000099;' + ), + 'BRACKETS' => array( + 0 => 'color:#006600; font-weight:bold;' + ), + 'STRINGS' => array( + 0 => 'color:#996600;' + ), + 'NUMBERS' => array( + 0 => 'color:#006666;' + ), + 'METHODS' => array( + 1 => 'color:#9900CC;' + ), + 'SYMBOLS' => array( + 0 => 'color:#006600; font-weight:bold;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://avisynth.org/mediawiki/{FNAME}', + 4 => '' + ), + 'REGEXPS' => array( + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); +?> diff --git a/_piecrust/libs/Geshi/geshi/awk.php b/_piecrust/libs/Geshi/geshi/awk.php new file mode 100644 index 0000000..38d7de1 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/awk.php @@ -0,0 +1,158 @@ + 'awk', + 'COMMENT_SINGLE' => array( + 1 => '#' + ), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array ( + 1 => array( + 'for', 'in', 'if', 'else', 'while', 'do', 'continue', 'break' + ), + 2 => array( + 'BEGIN', 'END' + ), + 3 => array( + 'ARGC', 'ARGV', 'CONVFMT', 'ENVIRON', + 'FILENAME', 'FNR', 'FS', 'NF', 'NR', 'OFMT', + 'OFS','ORS','RLENGTH','RS','RSTART','SUBSEP' + ), + 4 => array( + 'gsub','index','length','match','split', + 'sprintf','sub','substr','tolower','toupper', + 'atan2','cos','exp','int','log','rand', + 'sin','sqrt','srand' + ), + 5 => array( + 'print','printf','getline','close','fflush','system' + ), + 6 => array( + 'function', 'return' + ) + ), + 'SYMBOLS' => array ( + 0 => array( + '(',')','[',']','{','}' + ), + 1 => array( + '!','||','&&' + ), + 2 => array( + '<','>','<=','>=','==','!=' + ), + 3 => array( + '+','-','*','/','%','^','++','--' + ), + 4 => array( + '~','!~' + ), + 5 => array( + '?',':' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #C20CB9; font-weight: bold;', + 3 => 'color: #4107D5; font-weight: bold;', + 4 => 'color: #07D589; font-weight: bold;', + 5 => 'color: #0BD507; font-weight: bold;', + 6 => 'color: #078CD5; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color:#808080;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'SYMBOLS' => array( + 0 => 'color:black;', + 1 => 'color:black;', + 2 => 'color:black;', + 3 => 'color:black;', + 4 => 'color:#C4C364;', + 5 => 'color:black;font-weight:bold;'), + 'SCRIPT' => array(), + 'REGEXPS' => array( + 0 => 'color:#000088;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000000;' + ), + 'BRACKETS' => array( + 0 => 'color: #7a0874; font-weight: bold;' + ), + 'METHODS' => array() + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array (), + 'REGEXPS' => array( + 0 => "\\$[a-zA-Z0-9_]+" + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array (), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/bash.php b/_piecrust/libs/Geshi/geshi/bash.php new file mode 100644 index 0000000..658111a --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/bash.php @@ -0,0 +1,327 @@ + 'Bash', + // Bash DOES have single line comments with # markers. But bash also has + // the $# variable, so comments need special handling (see sf.net + // 1564839) + 'COMMENT_SINGLE' => array('#'), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + //Variables + 1 => "/\\$\\{[^\\n\\}]*?\\}/i", + //BASH-style Heredoc + 2 => '/<<-?\s*?(\'?)([a-zA-Z0-9]+)\1\\n.*\\n\\2(?![a-zA-Z0-9])/siU', + //Escaped String Starters + 3 => "/\\\\['\"]/siU" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'HARDQUOTE' => array("'", "'"), + 'HARDESCAPE' => array("\'"), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + 1 => "#\\\\[nfrtv\\$\\\"\n]#i", + // $var + 2 => "#\\$[a-z_][a-z0-9_]*#i", + // ${...} + 3 => "/\\$\\{[^\\n\\}]*?\\}/i", + // $(...) + 4 => "/\\$\\([^\\n\\)]*?\\)/i", + // `...` + 5 => "/`[^`]*`/" + ), + 'KEYWORDS' => array( + 1 => array( + 'case', 'do', 'done', 'elif', 'else', 'esac', 'fi', 'for', 'function', + 'if', 'in', 'select', 'set', 'then', 'until', 'while', 'time' + ), + 2 => array( + 'aclocal', 'aconnect', 'aplay', 'apm', 'apmsleep', 'apropos', + 'apt-cache', 'apt-file', 'apt-get', 'apt-key', 'apt-src', 'aptitude', + 'ar', 'arch', 'arecord', 'as', 'as86', 'ash', 'autoconf', + 'autoheader', 'automake', 'awk', + + 'basename', 'bash', 'bc', 'bison', 'bunzip2', 'bzcat', + 'bzcmp', 'bzdiff', 'bzegrep', 'bzfgrep', 'bzgrep', + 'bzip2', 'bzip2recover', 'bzless', 'bzmore', + + 'c++', 'cal', 'cat', 'chattr', 'cc', 'cdda2wav', 'cdparanoia', + 'cdrdao', 'cd-read', 'cdrecord', 'chfn', 'chgrp', 'chmod', + 'chown', 'chroot', 'chsh', 'chvt', 'clear', 'cmp', 'comm', 'co', + 'col', 'cp', 'cpio', 'cpp', 'csh', 'cut', 'cvs', 'cvs-pserver', + + 'dash', 'date', 'dc', 'dch', 'dcop', 'dd', 'ddate', 'ddd', + 'deallocvt', 'debconf', 'defoma', 'depmod', 'df', 'dh', + 'dialog', 'diff', 'diff3', 'dig', 'dir', 'dircolors', 'directomatic', + 'dirname', 'dmesg', 'dnsdomainname', 'domainname', 'dpkg', + 'dselect', 'du', 'dumpkeys', + + 'ed', 'egrep', 'env', 'expr', + + 'false', 'fbset', 'ffmpeg', 'fgconsole','fgrep', 'file', 'find', + 'flex', 'flex++', 'fmt', 'free', 'ftp', 'funzip', 'fuser', + + 'g++', 'gawk', 'gc','gcc', 'gdb', 'getent', 'getkeycodes', + 'getopt', 'gettext', 'gettextize', 'gimp', 'gimp-remote', + 'gimptool', 'gmake', 'gocr', 'grep', 'groups', 'gs', 'gunzip', + 'gzexe', 'gzip', + + 'git', 'gitaction', 'git-add', 'git-add--interactive', 'git-am', + 'git-annotate', 'git-apply', 'git-archive', 'git-bisect', + 'git-bisect--helper', 'git-blame', 'git-branch', 'git-bundle', + 'git-cat-file', 'git-check-attr', 'git-checkout', + 'git-checkout-index', 'git-check-ref-format', 'git-cherry', + 'git-cherry-pick', 'git-clean', 'git-clone', 'git-commit', + 'git-commit-tree', 'git-config', 'git-count-objects', 'git-daemon', + 'git-describe', 'git-diff', 'git-diff-files', 'git-diff-index', + 'git-difftool', 'git-difftool--helper', 'git-diff-tree', + 'gitdpkgname', 'git-fast-export', 'git-fast-import', 'git-fetch', + 'git-fetch-pack', 'git-fetch--tool', 'git-filter-branch', 'gitfm', + 'git-fmt-merge-msg', 'git-for-each-ref', 'git-format-patch', + 'git-fsck', 'git-fsck-objects', 'git-gc', 'git-get-tar-commit-id', + 'git-grep', 'git-hash-object', 'git-help', 'git-http-fetch', + 'git-http-push', 'git-imap-send', 'git-index-pack', 'git-init', + 'git-init-db', 'git-instaweb', 'gitkeys', 'git-log', + 'git-lost-found', 'git-ls-files', 'git-ls-remote', 'git-ls-tree', + 'git-mailinfo', 'git-mailsplit', 'git-merge', 'git-merge-base', + 'git-merge-file', 'git-merge-index', 'git-merge-octopus', + 'git-merge-one-file', 'git-merge-ours', 'git-merge-recursive', + 'git-merge-resolve', 'git-merge-subtree', 'git-mergetool', + 'git-mergetool--lib', 'git-merge-tree', 'gitmkdirs', 'git-mktag', + 'git-mktree', 'gitmount', 'git-mv', 'git-name-rev', + 'git-pack-objects', 'git-pack-redundant', 'git-pack-refs', + 'git-parse-remote', 'git-patch-id', 'git-peek-remote', 'git-prune', + 'git-prune-packed', 'gitps', 'git-pull', 'git-push', + 'git-quiltimport', 'git-read-tree', 'git-rebase', + 'git-rebase--interactive', 'git-receive-pack', 'git-reflog', + 'gitregrep', 'git-relink', 'git-remote', 'git-repack', + 'git-repo-config', 'git-request-pull', 'git-rerere', 'git-reset', + 'git-revert', 'git-rev-list', 'git-rev-parse', 'gitrfgrep', + 'gitrgrep', 'git-rm', 'git-send-pack', 'git-shell', 'git-shortlog', + 'git-show', 'git-show-branch', 'git-show-index', 'git-show-ref', + 'git-sh-setup', 'git-stage', 'git-stash', 'git-status', + 'git-stripspace', 'git-submodule', 'git-svn', 'git-symbolic-ref', + 'git-tag', 'git-tar-tree', 'gitunpack', 'git-unpack-file', + 'git-unpack-objects', 'git-update-index', 'git-update-ref', + 'git-update-server-info', 'git-upload-archive', 'git-upload-pack', + 'git-var', 'git-verify-pack', 'git-verify-tag', 'gitview', + 'git-web--browse', 'git-whatchanged', 'gitwhich', 'gitwipe', + 'git-write-tree', 'gitxgrep', + + 'head', 'hexdump', 'hostname', + + 'id', 'ifconfig', 'ifdown', 'ifup', 'igawk', 'install', + + 'join', + + 'kbd_mode','kbdrate', 'kdialog', 'kfile', 'kill', 'killall', + + 'lame', 'last', 'lastb', 'ld', 'ld86', 'ldd', 'less', 'lex', 'link', + 'ln', 'loadkeys', 'loadunimap', 'locate', 'lockfile', 'login', + 'logname', 'lp', 'lpr', 'ls', 'lsattr', 'lsmod', 'lsmod.old', + 'lspci', 'ltrace', 'lynx', + + 'm4', 'make', 'man', 'mapscrn', 'mesg', 'mkdir', 'mkfifo', + 'mknod', 'mktemp', 'more', 'mount', 'mplayer', 'msgfmt', 'mv', + + 'namei', 'nano', 'nasm', 'nawk', 'netstat', 'nice', + 'nisdomainname', 'nl', 'nm', 'nm86', 'nmap', 'nohup', 'nop', + + 'od', 'openvt', + + 'passwd', 'patch', 'pcregrep', 'pcretest', 'perl', 'perror', + 'pgawk', 'pidof', 'ping', 'pr', 'procmail', 'prune', 'ps', 'pstree', + 'ps2ascii', 'ps2epsi', 'ps2frag', 'ps2pdf', 'ps2ps', 'psbook', + 'psmerge', 'psnup', 'psresize', 'psselect', 'pstops', + + 'rbash', 'rcs', 'rcs2log', 'read', 'readlink', 'red', 'resizecons', + 'rev', 'rm', 'rmdir', 'rsh', 'run-parts', + + 'sash', 'scp', 'screen', 'sed', 'seq', 'sendmail', 'setfont', + 'setkeycodes', 'setleds', 'setmetamode', 'setserial', 'setterm', + 'sh', 'showkey', 'shred', 'size', 'size86', 'skill', 'sleep', + 'slogin', 'snice', 'sort', 'sox', 'split', 'ssed', 'ssh', 'ssh-add', + 'ssh-agent', 'ssh-keygen', 'ssh-keyscan', 'stat', 'strace', + 'strings', 'strip', 'stty', 'su', 'sudo', 'suidperl', 'sum', 'svn', + 'svnadmin', 'svndumpfilter', 'svnlook', 'svnmerge', 'svnmucc', + 'svnserve', 'svnshell', 'svnsync', 'svnversion', 'svnwrap', 'sync', + + 'tac', 'tail', 'tar', 'tee', 'tempfile', 'touch', 'tr', 'tree', + 'true', + + 'umount', 'uname', 'unicode_start', 'unicode_stop', 'uniq', + 'unlink', 'unzip', 'updatedb', 'updmap', 'uptime', 'users', + 'utmpdump', 'uuidgen', + + 'valgrind', 'vdir', 'vi', 'vim', 'vmstat', + + 'w', 'wall', 'watch', 'wc', 'wget', 'whatis', 'whereis', + 'which', 'whiptail', 'who', 'whoami', 'whois', 'wine', 'wineboot', + 'winebuild', 'winecfg', 'wineconsole', 'winedbg', 'winedump', + 'winefile', 'wodim', 'write', + + 'xargs', 'xhost', 'xmodmap', 'xset', + + 'yacc', 'yes', 'ypdomainname', + + 'zcat', 'zcmp', 'zdiff', 'zdump', 'zegrep', 'zfgrep', 'zforce', + 'zgrep', 'zip', 'zipgrep', 'zipinfo', 'zless', 'zmore', 'znew', + 'zsh', 'zsoelim' + ), + 3 => array( + 'alias', 'bg', 'bind', 'break', 'builtin', 'cd', 'command', + 'compgen', 'complete', 'continue', 'declare', 'dirs', 'disown', + 'echo', 'enable', 'eval', 'exec', 'exit', 'export', 'fc', + 'fg', 'getopts', 'hash', 'help', 'history', 'jobs', 'let', + 'local', 'logout', 'popd', 'printf', 'pushd', 'pwd', 'readonly', + 'return', 'shift', 'shopt', 'source', 'suspend', 'test', 'times', + 'trap', 'type', 'typeset', 'ulimit', 'umask', 'unalias', 'unset', + 'wait' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', ';;', '`' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #c20cb9; font-weight: bold;', + 3 => 'color: #7a0874; font-weight: bold;' + ), + 'COMMENTS' => array( + 0 => 'color: #666666; font-style: italic;', + 1 => 'color: #800000;', + 2 => 'color: #cc0000; font-style: italic;', + 3 => 'color: #000000; font-weight: bold;' + ), + 'ESCAPE_CHAR' => array( + 1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #007800;', + 3 => 'color: #007800;', + 4 => 'color: #007800;', + 5 => 'color: #780078;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #7a0874; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;', + 'HARD' => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #000000; font-weight: bold;' + ), + 'REGEXPS' => array( + 0 => 'color: #007800;', + 1 => 'color: #007800;', + 2 => 'color: #007800;', + 4 => 'color: #007800;', + 5 => 'color: #660033;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + //Variables (will be handled by comment_regexps) + 0 => "\\$\\{[a-zA-Z_][a-zA-Z0-9_]*?\\}", + //Variables without braces + 1 => "\\$[a-zA-Z_][a-zA-Z0-9_]*", + //Variable assignment + 2 => "(? "\\$[*#\$\\-\\?!\d]", + //Parameters of commands + 5 => "(?<=\s)--?[0-9a-zA-Z\-]+(?=[\s=]|<(?:SEMI|PIPE)>|$)" + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'COMMENTS' => array( + 'DISALLOWED_BEFORE' => '$' + ), + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(? "(?![\.\-a-zA-Z0-9_%=\\/])" + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/basic4gl.php b/_piecrust/libs/Geshi/geshi/basic4gl.php new file mode 100644 index 0000000..ee25ca7 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/basic4gl.php @@ -0,0 +1,341 @@ + 'Basic4GL', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + + // Navy Blue Bold Keywords + + 'true','rnd_max','m_pi','m_e','false','VK_ZOOM','VK_UP','VK_TAB','VK_SUBTRACT','VK_SPACE','VK_SNAPSHOT', + 'VK_SHIFT','VK_SEPARATOR','VK_SELECT','VK_SCROLL','VK_RWIN','VK_RSHIFT','VK_RMENU','VK_RIGHT','VK_RETURN', + 'VK_RCONTROL','VK_RBUTTON','VK_PROCESSKEY','VK_PRIOR','VK_PRINT','VK_PLAY','VK_PAUSE','VK_NUMPAD9','VK_NUMPAD8', + 'VK_NUMPAD7','VK_NUMPAD6','VK_NUMPAD5','VK_NUMPAD4','VK_NUMPAD3','VK_NUMPAD2','VK_NUMPAD1','VK_NUMPAD0', + 'VK_NUMLOCK','VK_NONCONVERT','VK_NEXT','VK_MULTIPLY','VK_MODECHANGE','VK_MENU','VK_MBUTTON','VK_LWIN', + 'VK_LSHIFT','VK_LMENU','VK_LEFT','VK_LCONTROL','VK_LBUTTON','VK_KANJI','VK_KANA','VK_JUNJA','VK_INSERT', + 'VK_HOME','VK_HELP','VK_HANJA','VK_HANGUL','VK_HANGEUL','VK_FINAL','VK_F9','VK_F8','VK_F7','VK_F6','VK_F5', + 'VK_F4','VK_F3','VK_F24','VK_F23','VK_F22','VK_F21','VK_F20','VK_F2','VK_F19','VK_F18','VK_F17','VK_F16', + 'VK_F15','VK_F14','VK_F13','VK_F12','VK_F11','VK_F10','VK_F1','VK_EXSEL','VK_EXECUTE','VK_ESCAPE','VK_EREOF', + 'VK_END','VK_DOWN','VK_DIVIDE','VK_DELETE','VK_DECIMAL','VK_CRSEL','VK_CONVERT','VK_CONTROL','VK_CLEAR', + 'VK_CAPITAL','VK_CANCEL','VK_BACK','VK_ATTN','VK_APPS','VK_ADD','VK_ACCEPT','TEXT_SIMPLE','TEXT_OVERLAID', + 'TEXT_BUFFERED','SPR_TILEMAP','SPR_SPRITE','SPR_INVALID','MOUSE_RBUTTON','MOUSE_MBUTTON','MOUSE_LBUTTON', + 'GL_ZOOM_Y','GL_ZOOM_X','GL_ZERO','GL_XOR','GL_WIN_swap_hint','GL_WIN_draw_range_elements','GL_VIEWPORT_BIT', + 'GL_VIEWPORT','GL_VERTEX_ARRAY_TYPE_EXT','GL_VERTEX_ARRAY_TYPE','GL_VERTEX_ARRAY_STRIDE_EXT','GL_VERTEX_ARRAY_STRIDE', + 'GL_VERTEX_ARRAY_SIZE_EXT','GL_VERTEX_ARRAY_SIZE','GL_VERTEX_ARRAY_POINTER_EXT','GL_VERTEX_ARRAY_POINTER', + 'GL_VERTEX_ARRAY_EXT','GL_VERTEX_ARRAY_COUNT_EXT','GL_VERTEX_ARRAY','GL_VERSION_1_1','GL_VERSION','GL_VENDOR', + 'GL_V3F','GL_V2F','GL_UNSIGNED_SHORT','GL_UNSIGNED_INT','GL_UNSIGNED_BYTE','GL_UNPACK_SWAP_BYTES','GL_UNPACK_SKIP_ROWS', + 'GL_UNPACK_SKIP_PIXELS','GL_UNPACK_ROW_LENGTH','GL_UNPACK_LSB_FIRST','GL_UNPACK_ALIGNMENT','GL_TRUE','GL_TRIANGLE_STRIP', + 'GL_TRIANGLE_FAN','GL_TRIANGLES','GL_TRANSFORM_BIT','GL_TEXTURE_WRAP_T','GL_TEXTURE_WRAP_S','GL_TEXTURE_WIDTH', + 'GL_TEXTURE_STACK_DEPTH','GL_TEXTURE_RESIDENT','GL_TEXTURE_RED_SIZE','GL_TEXTURE_PRIORITY','GL_TEXTURE_MIN_FILTER', + 'GL_TEXTURE_MATRIX','GL_TEXTURE_MAG_FILTER','GL_TEXTURE_LUMINANCE_SIZE','GL_TEXTURE_INTERNAL_FORMAT','GL_TEXTURE_INTENSITY_SIZE', + 'GL_TEXTURE_HEIGHT','GL_TEXTURE_GREEN_SIZE','GL_TEXTURE_GEN_T','GL_TEXTURE_GEN_S','GL_TEXTURE_GEN_R','GL_TEXTURE_GEN_Q', + 'GL_TEXTURE_GEN_MODE','GL_TEXTURE_ENV_MODE','GL_TEXTURE_ENV_COLOR','GL_TEXTURE_ENV','GL_TEXTURE_COORD_ARRAY_TYPE_EXT', + 'GL_TEXTURE_COORD_ARRAY_TYPE','GL_TEXTURE_COORD_ARRAY_STRIDE_EXT','GL_TEXTURE_COORD_ARRAY_STRIDE','GL_TEXTURE_COORD_ARRAY_SIZE_EXT', + 'GL_TEXTURE_COORD_ARRAY_SIZE','GL_TEXTURE_COORD_ARRAY_POINTER_EXT','GL_TEXTURE_COORD_ARRAY_POINTER','GL_TEXTURE_COORD_ARRAY_EXT', + 'GL_TEXTURE_COORD_ARRAY_COUNT_EXT','GL_TEXTURE_COORD_ARRAY','GL_TEXTURE_COMPONENTS','GL_TEXTURE_BORDER_COLOR','GL_TEXTURE_BORDER', + 'GL_TEXTURE_BLUE_SIZE','GL_TEXTURE_BIT','GL_TEXTURE_BINDING_2D','GL_TEXTURE_BINDING_1D','GL_TEXTURE_ALPHA_SIZE', + 'GL_TEXTURE_2D','GL_TEXTURE_1D','GL_TEXTURE9_ARB','GL_TEXTURE9','GL_TEXTURE8_ARB','GL_TEXTURE8','GL_TEXTURE7_ARB', + 'GL_TEXTURE7','GL_TEXTURE6_ARB','GL_TEXTURE6','GL_TEXTURE5_ARB','GL_TEXTURE5','GL_TEXTURE4_ARB','GL_TEXTURE4', + 'GL_TEXTURE3_ARB','GL_TEXTURE31_ARB','GL_TEXTURE31','GL_TEXTURE30_ARB','GL_TEXTURE30','GL_TEXTURE3','GL_TEXTURE2_ARB', + 'GL_TEXTURE29_ARB','GL_TEXTURE29','GL_TEXTURE28_ARB','GL_TEXTURE28','GL_TEXTURE27_ARB','GL_TEXTURE27','GL_TEXTURE26_ARB', + 'GL_TEXTURE26','GL_TEXTURE25_ARB','GL_TEXTURE25','GL_TEXTURE24_ARB','GL_TEXTURE24','GL_TEXTURE23_ARB','GL_TEXTURE23', + 'GL_TEXTURE22_ARB','GL_TEXTURE22','GL_TEXTURE21_ARB','GL_TEXTURE21','GL_TEXTURE20_ARB','GL_TEXTURE20','GL_TEXTURE2', + 'GL_TEXTURE1_ARB','GL_TEXTURE19_ARB','GL_TEXTURE19','GL_TEXTURE18_ARB','GL_TEXTURE18','GL_TEXTURE17_ARB', + 'GL_TEXTURE17','GL_TEXTURE16_ARB','GL_TEXTURE16','GL_TEXTURE15_ARB','GL_TEXTURE15','GL_TEXTURE14_ARB','GL_TEXTURE14', + 'GL_TEXTURE13_ARB','GL_TEXTURE13','GL_TEXTURE12_ARB','GL_TEXTURE12','GL_TEXTURE11_ARB','GL_TEXTURE11','GL_TEXTURE10_ARB', + 'GL_TEXTURE10','GL_TEXTURE1','GL_TEXTURE0_ARB','GL_TEXTURE0','GL_TEXTURE','GL_T4F_V4F','GL_T4F_C4F_N3F_V4F','GL_T2F_V3F', + 'GL_T2F_N3F_V3F','GL_T2F_C4UB_V3F','GL_T2F_C4F_N3F_V3F','GL_T2F_C3F_V3F','GL_T','GL_SUBPIXEL_BITS','GL_STEREO', + 'GL_STENCIL_WRITEMASK','GL_STENCIL_VALUE_MASK','GL_STENCIL_TEST','GL_STENCIL_REF','GL_STENCIL_PASS_DEPTH_PASS', + 'GL_STENCIL_PASS_DEPTH_FAIL','GL_STENCIL_INDEX','GL_STENCIL_FUNC','GL_STENCIL_FAIL','GL_STENCIL_CLEAR_VALUE', + 'GL_STENCIL_BUFFER_BIT','GL_STENCIL_BITS','GL_STENCIL','GL_STACK_UNDERFLOW','GL_STACK_OVERFLOW','GL_SRC_COLOR', + 'GL_SRC_ALPHA_SATURATE','GL_SRC_ALPHA','GL_SPOT_EXPONENT','GL_SPOT_DIRECTION','GL_SPOT_CUTOFF','GL_SPHERE_MAP', + 'GL_SPECULAR','GL_SOURCE2_RGB_EXT','GL_SOURCE2_RGB','GL_SOURCE2_ALPHA_EXT','GL_SOURCE2_ALPHA','GL_SOURCE1_RGB_EXT', + 'GL_SOURCE1_RGB','GL_SOURCE1_ALPHA_EXT','GL_SOURCE1_ALPHA','GL_SOURCE0_RGB_EXT','GL_SOURCE0_RGB','GL_SOURCE0_ALPHA_EXT', + 'GL_SOURCE0_ALPHA','GL_SMOOTH','GL_SHORT','GL_SHININESS','GL_SHADE_MODEL','GL_SET','GL_SELECTION_BUFFER_SIZE', + 'GL_SELECTION_BUFFER_POINTER','GL_SELECT','GL_SCISSOR_TEST','GL_SCISSOR_BOX','GL_SCISSOR_BIT','GL_S','GL_RIGHT', + 'GL_RGB_SCALE_EXT','GL_RGB_SCALE','GL_RGBA_MODE','GL_RGBA8','GL_RGBA4','GL_RGBA2','GL_RGBA16','GL_RGBA12','GL_RGBA', + 'GL_RGB8','GL_RGB5_A1','GL_RGB5','GL_RGB4','GL_RGB16','GL_RGB12','GL_RGB10_A2','GL_RGB10','GL_RGB','GL_RETURN', + 'GL_REPLACE','GL_REPEAT','GL_RENDER_MODE','GL_RENDERER','GL_RENDER','GL_RED_SCALE','GL_RED_BITS','GL_RED_BIAS', + 'GL_RED','GL_READ_BUFFER','GL_R3_G3_B2','GL_R','GL_QUAD_STRIP','GL_QUADS','GL_QUADRATIC_ATTENUATION','GL_Q', + 'GL_PROXY_TEXTURE_2D','GL_PROXY_TEXTURE_1D','GL_PROJECTION_STACK_DEPTH','GL_PROJECTION_MATRIX','GL_PROJECTION', + 'GL_PRIMARY_COLOR_EXT','GL_PRIMARY_COLOR','GL_PREVIOUS_EXT','GL_PREVIOUS','GL_POSITION','GL_POLYGON_TOKEN', + 'GL_POLYGON_STIPPLE_BIT','GL_POLYGON_STIPPLE','GL_POLYGON_SMOOTH_HINT','GL_POLYGON_SMOOTH','GL_POLYGON_OFFSET_UNITS', + 'GL_POLYGON_OFFSET_POINT','GL_POLYGON_OFFSET_LINE','GL_POLYGON_OFFSET_FILL','GL_POLYGON_OFFSET_FACTOR','GL_POLYGON_MODE', + 'GL_POLYGON_BIT','GL_POLYGON','GL_POINT_TOKEN','GL_POINT_SMOOTH_HINT','GL_POINT_SMOOTH','GL_POINT_SIZE_RANGE', + 'GL_POINT_SIZE_GRANULARITY','GL_POINT_SIZE','GL_POINT_BIT','GL_POINTS','GL_POINT','GL_PIXEL_MODE_BIT', + 'GL_PIXEL_MAP_S_TO_S_SIZE','GL_PIXEL_MAP_S_TO_S','GL_PIXEL_MAP_R_TO_R_SIZE','GL_PIXEL_MAP_R_TO_R','GL_PIXEL_MAP_I_TO_R_SIZE', + 'GL_PIXEL_MAP_I_TO_R','GL_PIXEL_MAP_I_TO_I_SIZE','GL_PIXEL_MAP_I_TO_I','GL_PIXEL_MAP_I_TO_G_SIZE','GL_PIXEL_MAP_I_TO_G', + 'GL_PIXEL_MAP_I_TO_B_SIZE','GL_PIXEL_MAP_I_TO_B','GL_PIXEL_MAP_I_TO_A_SIZE','GL_PIXEL_MAP_I_TO_A','GL_PIXEL_MAP_G_TO_G_SIZE', + 'GL_PIXEL_MAP_G_TO_G','GL_PIXEL_MAP_B_TO_B_SIZE','GL_PIXEL_MAP_B_TO_B','GL_PIXEL_MAP_A_TO_A_SIZE','GL_PIXEL_MAP_A_TO_A', + 'GL_PHONG_WIN','GL_PHONG_HINT_WIN','GL_PERSPECTIVE_CORRECTION_HINT','GL_PASS_THROUGH_TOKEN','GL_PACK_SWAP_BYTES', + 'GL_PACK_SKIP_ROWS','GL_PACK_SKIP_PIXELS','GL_PACK_ROW_LENGTH','GL_PACK_LSB_FIRST','GL_PACK_ALIGNMENT','GL_OUT_OF_MEMORY', + 'GL_OR_REVERSE','GL_OR_INVERTED','GL_ORDER','GL_OR','GL_OPERAND2_RGB_EXT','GL_OPERAND2_RGB','GL_OPERAND2_ALPHA_EXT', + 'GL_OPERAND2_ALPHA','GL_OPERAND1_RGB_EXT','GL_OPERAND1_RGB','GL_OPERAND1_ALPHA_EXT','GL_OPERAND1_ALPHA','GL_OPERAND0_RGB_EXT', + 'GL_OPERAND0_RGB','GL_OPERAND0_ALPHA_EXT','GL_OPERAND0_ALPHA','GL_ONE_MINUS_SRC_COLOR','GL_ONE_MINUS_SRC_ALPHA', + 'GL_ONE_MINUS_DST_COLOR','GL_ONE_MINUS_DST_ALPHA','GL_ONE','GL_OBJECT_PLANE','GL_OBJECT_LINEAR','GL_NO_ERROR', + 'GL_NOTEQUAL','GL_NORMAL_ARRAY_TYPE_EXT','GL_NORMAL_ARRAY_TYPE','GL_NORMAL_ARRAY_STRIDE_EXT','GL_NORMAL_ARRAY_STRIDE', + 'GL_NORMAL_ARRAY_POINTER_EXT','GL_NORMAL_ARRAY_POINTER','GL_NORMAL_ARRAY_EXT','GL_NORMAL_ARRAY_COUNT_EXT', + 'GL_NORMAL_ARRAY','GL_NORMALIZE','GL_NOR','GL_NOOP','GL_NONE','GL_NICEST','GL_NEVER','GL_NEAREST_MIPMAP_NEAREST','GL_NEAREST_MIPMAP_LINEAR', + 'GL_NEAREST','GL_NAND','GL_NAME_STACK_DEPTH','GL_N3F_V3F','GL_MULT','GL_MODULATE','GL_MODELVIEW_STACK_DEPTH','GL_MODELVIEW_MATRIX', + 'GL_MODELVIEW','GL_MAX_VIEWPORT_DIMS','GL_MAX_TEXTURE_UNITS_ARB','GL_MAX_TEXTURE_UNITS','GL_MAX_TEXTURE_STACK_DEPTH', + 'GL_MAX_TEXTURE_SIZE','GL_MAX_PROJECTION_STACK_DEPTH','GL_MAX_PIXEL_MAP_TABLE','GL_MAX_NAME_STACK_DEPTH','GL_MAX_MODELVIEW_STACK_DEPTH', + 'GL_MAX_LIST_NESTING','GL_MAX_LIGHTS','GL_MAX_EVAL_ORDER','GL_MAX_ELEMENTS_VERTICES_WIN','GL_MAX_ELEMENTS_INDICES_WIN', + 'GL_MAX_CLIP_PLANES','GL_MAX_CLIENT_ATTRIB_STACK_DEPTH','GL_MAX_ATTRIB_STACK_DEPTH','GL_MATRIX_MODE','GL_MAP_STENCIL', + 'GL_MAP_COLOR','GL_MAP2_VERTEX_4','GL_MAP2_VERTEX_3','GL_MAP2_TEXTURE_COORD_4','GL_MAP2_TEXTURE_COORD_3','GL_MAP2_TEXTURE_COORD_2', + 'GL_MAP2_TEXTURE_COORD_1','GL_MAP2_NORMAL','GL_MAP2_INDEX','GL_MAP2_GRID_SEGMENTS','GL_MAP2_GRID_DOMAIN','GL_MAP2_COLOR_4', + 'GL_MAP1_VERTEX_4','GL_MAP1_VERTEX_3','GL_MAP1_TEXTURE_COORD_4','GL_MAP1_TEXTURE_COORD_3','GL_MAP1_TEXTURE_COORD_2', + 'GL_MAP1_TEXTURE_COORD_1','GL_MAP1_NORMAL','GL_MAP1_INDEX','GL_MAP1_GRID_SEGMENTS','GL_MAP1_GRID_DOMAIN', + 'GL_MAP1_COLOR_4','GL_LUMINANCE_ALPHA','GL_LUMINANCE8_ALPHA8','GL_LUMINANCE8','GL_LUMINANCE6_ALPHA2','GL_LUMINANCE4_ALPHA4', + 'GL_LUMINANCE4','GL_LUMINANCE16_ALPHA16','GL_LUMINANCE16','GL_LUMINANCE12_ALPHA4','GL_LUMINANCE12_ALPHA12','GL_LUMINANCE12', + 'GL_LUMINANCE','GL_LOGIC_OP_MODE','GL_LOGIC_OP','GL_LOAD','GL_LIST_MODE','GL_LIST_INDEX','GL_LIST_BIT', + 'GL_LIST_BASE','GL_LINE_WIDTH_RANGE','GL_LINE_WIDTH_GRANULARITY','GL_LINE_WIDTH','GL_LINE_TOKEN','GL_LINE_STRIP','GL_LINE_STIPPLE_REPEAT', + 'GL_LINE_STIPPLE_PATTERN','GL_LINE_STIPPLE','GL_LINE_SMOOTH_HINT','GL_LINE_SMOOTH','GL_LINE_RESET_TOKEN','GL_LINE_LOOP', + 'GL_LINE_BIT','GL_LINES','GL_LINEAR_MIPMAP_NEAREST','GL_LINEAR_MIPMAP_LINEAR','GL_LINEAR_ATTENUATION','GL_LINEAR', + 'GL_LINE','GL_LIGHT_MODEL_TWO_SIDE','GL_LIGHT_MODEL_LOCAL_VIEWER','GL_LIGHT_MODEL_AMBIENT','GL_LIGHTING_BIT', + 'GL_LIGHTING','GL_LIGHT7','GL_LIGHT6','GL_LIGHT5','GL_LIGHT4','GL_LIGHT3','GL_LIGHT2','GL_LIGHT1','GL_LIGHT0', + 'GL_LESS','GL_LEQUAL','GL_LEFT','GL_KEEP','GL_INVERT','GL_INVALID_VALUE','GL_INVALID_OPERATION','GL_INVALID_ENUM','GL_INTERPOLATE_EXT', + 'GL_INTERPOLATE','GL_INTENSITY8','GL_INTENSITY4','GL_INTENSITY16','GL_INTENSITY12','GL_INTENSITY','GL_INT', + 'GL_INDEX_WRITEMASK','GL_INDEX_SHIFT','GL_INDEX_OFFSET','GL_INDEX_MODE','GL_INDEX_LOGIC_OP','GL_INDEX_CLEAR_VALUE','GL_INDEX_BITS', + 'GL_INDEX_ARRAY_TYPE_EXT','GL_INDEX_ARRAY_TYPE','GL_INDEX_ARRAY_STRIDE_EXT','GL_INDEX_ARRAY_STRIDE','GL_INDEX_ARRAY_POINTER_EXT', + 'GL_INDEX_ARRAY_POINTER','GL_INDEX_ARRAY_EXT','GL_INDEX_ARRAY_COUNT_EXT','GL_INDEX_ARRAY','GL_INCR','GL_HINT_BIT', + 'GL_GREEN_SCALE','GL_GREEN_BITS','GL_GREEN_BIAS','GL_GREEN','GL_GREATER','GL_GEQUAL','GL_FRONT_RIGHT','GL_FRONT_LEFT', + 'GL_FRONT_FACE','GL_FRONT_AND_BACK','GL_FRONT','GL_FOG_START','GL_FOG_SPECULAR_TEXTURE_WIN','GL_FOG_MODE','GL_FOG_INDEX', + 'GL_FOG_HINT','GL_FOG_END','GL_FOG_DENSITY','GL_FOG_COLOR','GL_FOG_BIT','GL_FOG','GL_FLOAT','GL_FLAT','GL_FILL', + 'GL_FEEDBACK_BUFFER_TYPE','GL_FEEDBACK_BUFFER_SIZE','GL_FEEDBACK_BUFFER_POINTER','GL_FEEDBACK','GL_FASTEST','GL_FALSE', + 'GL_EYE_PLANE','GL_EYE_LINEAR','GL_EXT_vertex_array','GL_EXT_paletted_texture','GL_EXT_bgra','GL_EXTENSIONS','GL_EXP2', + 'GL_EXP','GL_EVAL_BIT','GL_EQUIV','GL_EQUAL','GL_ENABLE_BIT','GL_EMISSION','GL_EDGE_FLAG_ARRAY_STRIDE_EXT','GL_EDGE_FLAG_ARRAY_STRIDE', + 'GL_EDGE_FLAG_ARRAY_POINTER_EXT','GL_EDGE_FLAG_ARRAY_POINTER','GL_EDGE_FLAG_ARRAY_EXT','GL_EDGE_FLAG_ARRAY_COUNT_EXT','GL_EDGE_FLAG_ARRAY', + 'GL_EDGE_FLAG','GL_DST_COLOR','GL_DST_ALPHA','GL_DRAW_PIXEL_TOKEN','GL_DRAW_BUFFER','GL_DOUBLE_EXT','GL_DOUBLEBUFFER', + 'GL_DOUBLE','GL_DONT_CARE','GL_DOMAIN','GL_DITHER','GL_DIFFUSE','GL_DEPTH_WRITEMASK','GL_DEPTH_TEST','GL_DEPTH_SCALE', + 'GL_DEPTH_RANGE','GL_DEPTH_FUNC','GL_DEPTH_COMPONENT','GL_DEPTH_CLEAR_VALUE','GL_DEPTH_BUFFER_BIT','GL_DEPTH_BITS', + 'GL_DEPTH_BIAS','GL_DEPTH','GL_DECR','GL_DECAL','GL_CW','GL_CURRENT_TEXTURE_COORDS','GL_CURRENT_RASTER_TEXTURE_COORDS','GL_CURRENT_RASTER_POSITION_VALID', + 'GL_CURRENT_RASTER_POSITION','GL_CURRENT_RASTER_INDEX','GL_CURRENT_RASTER_DISTANCE','GL_CURRENT_RASTER_COLOR','GL_CURRENT_NORMAL', + 'GL_CURRENT_INDEX','GL_CURRENT_COLOR','GL_CURRENT_BIT','GL_CULL_FACE_MODE','GL_CULL_FACE','GL_COPY_PIXEL_TOKEN', + 'GL_COPY_INVERTED','GL_COPY','GL_CONSTANT_EXT','GL_CONSTANT_ATTENUATION','GL_CONSTANT','GL_COMPILE_AND_EXECUTE','GL_COMPILE','GL_COMBINE_RGB_EXT', + 'GL_COMBINE_RGB','GL_COMBINE_EXT','GL_COMBINE_ALPHA_EXT','GL_COMBINE_ALPHA','GL_COMBINE','GL_COLOR_WRITEMASK', + 'GL_COLOR_TABLE_WIDTH_EXT','GL_COLOR_TABLE_RED_SIZE_EXT','GL_COLOR_TABLE_LUMINANCE_SIZE_EXT','GL_COLOR_TABLE_INTENSITY_SIZE_EXT', + 'GL_COLOR_TABLE_GREEN_SIZE_EXT','GL_COLOR_TABLE_FORMAT_EXT','GL_COLOR_TABLE_BLUE_SIZE_EXT','GL_COLOR_TABLE_ALPHA_SIZE_EXT', + 'GL_COLOR_MATERIAL_PARAMETER','GL_COLOR_MATERIAL_FACE','GL_COLOR_MATERIAL','GL_COLOR_LOGIC_OP','GL_COLOR_INDEXES', + 'GL_COLOR_INDEX8_EXT','GL_COLOR_INDEX4_EXT','GL_COLOR_INDEX2_EXT','GL_COLOR_INDEX1_EXT','GL_COLOR_INDEX16_EXT', + 'GL_COLOR_INDEX12_EXT','GL_COLOR_INDEX','GL_COLOR_CLEAR_VALUE','GL_COLOR_BUFFER_BIT','GL_COLOR_ARRAY_TYPE_EXT', + 'GL_COLOR_ARRAY_TYPE','GL_COLOR_ARRAY_STRIDE_EXT','GL_COLOR_ARRAY_STRIDE','GL_COLOR_ARRAY_SIZE_EXT','GL_COLOR_ARRAY_SIZE', + 'GL_COLOR_ARRAY_POINTER_EXT','GL_COLOR_ARRAY_POINTER','GL_COLOR_ARRAY_EXT','GL_COLOR_ARRAY_COUNT_EXT','GL_COLOR_ARRAY', + 'GL_COLOR','GL_COEFF','GL_CLIP_PLANE5','GL_CLIP_PLANE4','GL_CLIP_PLANE3','GL_CLIP_PLANE2','GL_CLIP_PLANE1','GL_CLIP_PLANE0', + 'GL_CLIENT_VERTEX_ARRAY_BIT','GL_CLIENT_PIXEL_STORE_BIT','GL_CLIENT_ATTRIB_STACK_DEPTH','GL_CLIENT_ALL_ATTRIB_BITS', + 'GL_CLIENT_ACTIVE_TEXTURE_ARB','GL_CLIENT_ACTIVE_TEXTURE','GL_CLEAR','GL_CLAMP','GL_CCW','GL_C4UB_V3F','GL_C4UB_V2F', + 'GL_C4F_N3F_V3F','GL_C3F_V3F','GL_BYTE','GL_BLUE_SCALE','GL_BLUE_BITS','GL_BLUE_BIAS','GL_BLUE','GL_BLEND_SRC','GL_BLEND_DST', + 'GL_BLEND','GL_BITMAP_TOKEN','GL_BITMAP','GL_BGR_EXT','GL_BGRA_EXT','GL_BACK_RIGHT','GL_BACK_LEFT','GL_BACK', + 'GL_AUX_BUFFERS','GL_AUX3','GL_AUX2','GL_AUX1','GL_AUX0','GL_AUTO_NORMAL','GL_ATTRIB_STACK_DEPTH','GL_AND_REVERSE', + 'GL_AND_INVERTED','GL_AND','GL_AMBIENT_AND_DIFFUSE','GL_AMBIENT','GL_ALWAYS','GL_ALPHA_TEST_REF','GL_ALPHA_TEST_FUNC', + 'GL_ALPHA_TEST','GL_ALPHA_SCALE','GL_ALPHA_BITS','GL_ALPHA_BIAS','GL_ALPHA8','GL_ALPHA4','GL_ALPHA16','GL_ALPHA12', + 'GL_ALPHA','GL_ALL_ATTRIB_BITS','GL_ADD_SIGNED_EXT','GL_ADD_SIGNED','GL_ADD','GL_ACTIVE_TEXTURE_ARB','GL_ACTIVE_TEXTURE', + 'GL_ACCUM_RED_BITS','GL_ACCUM_GREEN_BITS','GL_ACCUM_CLEAR_VALUE','GL_ACCUM_BUFFER_BIT','GL_ACCUM_BLUE_BITS','GL_ACCUM_ALPHA_BITS', + 'GL_ACCUM','GL_4_BYTES','GL_4D_COLOR_TEXTURE','GL_3_BYTES','GL_3D_COLOR_TEXTURE','GL_3D_COLOR','GL_3D','GL_2_BYTES', + 'GL_2D','GLU_V_STEP','GLU_VERTEX','GLU_VERSION_1_2','GLU_VERSION_1_1','GLU_VERSION','GLU_U_STEP','GLU_UNKNOWN','GLU_TRUE', + 'GLU_TESS_WINDING_RULE','GLU_TESS_WINDING_POSITIVE','GLU_TESS_WINDING_ODD','GLU_TESS_WINDING_NONZERO','GLU_TESS_WINDING_NEGATIVE', + 'GLU_TESS_WINDING_ABS_GEQ_TWO','GLU_TESS_VERTEX_DATA','GLU_TESS_VERTEX','GLU_TESS_TOLERANCE','GLU_TESS_NEED_COMBINE_CALLBACK','GLU_TESS_MISSING_END_POLYGON', + 'GLU_TESS_MISSING_END_CONTOUR','GLU_TESS_MISSING_BEGIN_POLYGON','GLU_TESS_MISSING_BEGIN_CONTOUR','GLU_TESS_ERROR_DATA', + 'GLU_TESS_ERROR8','GLU_TESS_ERROR7','GLU_TESS_ERROR6','GLU_TESS_ERROR5','GLU_TESS_ERROR4','GLU_TESS_ERROR3','GLU_TESS_ERROR2', + 'GLU_TESS_ERROR1','GLU_TESS_ERROR','GLU_TESS_END_DATA','GLU_TESS_END','GLU_TESS_EDGE_FLAG_DATA','GLU_TESS_EDGE_FLAG', + 'GLU_TESS_COORD_TOO_LARGE','GLU_TESS_COMBINE_DATA','GLU_TESS_COMBINE','GLU_TESS_BOUNDARY_ONLY','GLU_TESS_BEGIN_DATA', + 'GLU_TESS_BEGIN','GLU_SMOOTH','GLU_SILHOUETTE','GLU_SAMPLING_TOLERANCE','GLU_SAMPLING_METHOD','GLU_POINT','GLU_PATH_LENGTH', + 'GLU_PARAMETRIC_TOLERANCE','GLU_PARAMETRIC_ERROR','GLU_OUT_OF_MEMORY','GLU_OUTSIDE','GLU_OUTLINE_POLYGON','GLU_OUTLINE_PATCH', + 'GLU_NURBS_ERROR9','GLU_NURBS_ERROR8','GLU_NURBS_ERROR7','GLU_NURBS_ERROR6','GLU_NURBS_ERROR5','GLU_NURBS_ERROR4', + 'GLU_NURBS_ERROR37','GLU_NURBS_ERROR36','GLU_NURBS_ERROR35','GLU_NURBS_ERROR34','GLU_NURBS_ERROR33','GLU_NURBS_ERROR32', + 'GLU_NURBS_ERROR31','GLU_NURBS_ERROR30','GLU_NURBS_ERROR3','GLU_NURBS_ERROR29','GLU_NURBS_ERROR28','GLU_NURBS_ERROR27','GLU_NURBS_ERROR26', + 'GLU_NURBS_ERROR25','GLU_NURBS_ERROR24','GLU_NURBS_ERROR23','GLU_NURBS_ERROR22','GLU_NURBS_ERROR21','GLU_NURBS_ERROR20', + 'GLU_NURBS_ERROR2','GLU_NURBS_ERROR19','GLU_NURBS_ERROR18','GLU_NURBS_ERROR17','GLU_NURBS_ERROR16','GLU_NURBS_ERROR15','GLU_NURBS_ERROR14', + 'GLU_NURBS_ERROR13','GLU_NURBS_ERROR12','GLU_NURBS_ERROR11','GLU_NURBS_ERROR10','GLU_NURBS_ERROR1','GLU_NONE', + 'GLU_MAP1_TRIM_3','GLU_MAP1_TRIM_2','GLU_LINE','GLU_INVALID_VALUE','GLU_INVALID_ENUM','GLU_INTERIOR','GLU_INSIDE','GLU_INCOMPATIBLE_GL_VERSION', + 'GLU_FLAT','GLU_FILL','GLU_FALSE','GLU_EXTERIOR','GLU_EXTENSIONS','GLU_ERROR','GLU_END','GLU_EDGE_FLAG','GLU_DOMAIN_DISTANCE', + 'GLU_DISPLAY_MODE','GLU_CW','GLU_CULLING','GLU_CCW','GLU_BEGIN','GLU_AUTO_LOAD_MATRIX','CHANNEL_UNORDERED','CHANNEL_ORDERED', + 'CHANNEL_MAX' + ), + 2 => array( + + // Red Lowercase Keywords + + 'WriteWord','WriteString','WriteReal','WriteLine','WriteInt','WriteFloat','WriteDouble','WriteChar','WriteByte', + 'windowwidth','windowheight','waittimer','Vec4','Vec3','Vec2','val','UpdateJoystick','ucase$','Transpose','tickcount', + 'textscroll','textrows','textmode','textcols','tanh','tand','tan','synctimercatchup','synctimer','swapbuffers', + 'str$','stopsoundvoice','stopsounds','stopmusic','sqrt','sqr','sprzorder','spryvel','sprytiles','sprysize','spryrepeat', + 'spryflip','sprycentre','spry','sprxvel','sprxtiles','sprxsize','sprxrepeat','sprxflip','sprxcentre','sprx', + 'sprvisible','sprvel','sprtype','sprtop','sprspin','sprsolid','sprsetzorder','sprsetyvel','sprsetysize','sprsetyrepeat', + 'sprsetyflip','sprsetycentre','sprsety','sprsetxvel','sprsetxsize','sprsetxrepeat','sprsetxflip','sprsetxcentre', + 'sprsetx','sprsetvisible','sprsetvel','sprsettiles','sprsettextures','sprsettexture','sprsetspin','sprsetsolid', + 'sprsetsize','sprsetscale','sprsetpos','sprsetparallax','sprsetframe','sprsetcolor','sprsetanimspeed','sprsetanimloop', + 'sprsetangle','sprsetalpha','sprscale','sprright','sprpos','sprparallax','sprleft','spriteareawidth','spriteareaheight', + 'sprframe','sprcolor','sprcameraz','sprcameray','sprcamerax','sprcamerasetz','sprcamerasety','sprcamerasetx', + 'sprcamerasetpos','sprcamerasetfov','sprcamerasetangle','sprcamerapos','sprcamerafov','sprcameraangle', + 'sprbottom','spranimspeed','spranimloop','spranimdone','sprangle','spralpha','spraddtextures','spraddtexture', + 'sounderror','sleep','sind','sin','showcursor','sgn','settextscroll','setmusicvolume','SendMessage','Seek', + 'scankeydown','RTInvert','rnd','right$','resizetext','resizespritearea','RejectConnection','ReceiveMessage','ReadWord', + 'ReadText','ReadReal','ReadLine','ReadInt','ReadFloat','ReadDouble','ReadChar','ReadByte','randomize','printr', + 'print','pow','playsound','playmusic','performancecounter','Orthonormalize','OpenFileWrite','OpenFileRead','Normalize', + 'newtilemap','newsprite','NewServer','NewConnection','musicplaying','mouse_yd','mouse_y','mouse_xd','mouse_x', + 'mouse_wheel','mouse_button','mid$','MessageSmoothed','MessageReliable','MessagePending','MessageChannel','maxtextureunits', + 'MatrixZero','MatrixTranslate','MatrixScale','MatrixRotateZ','MatrixRotateY','MatrixRotateX','MatrixRotate','MatrixIdentity', + 'MatrixCrossProduct','MatrixBasis','log','locate','loadtexture','loadsound','loadmipmaptexture','loadmipmapimagestrip', + 'loadimagestrip','loadimage','Length','len','left$','lcase$','keydown','Joy_Y','Joy_X','Joy_Up','Joy_Right','Joy_Left', + 'Joy_Keys','Joy_Down','Joy_Button','Joy_3','Joy_2','Joy_1','Joy_0','int','inscankey','input$','inkey$','inittimer', + 'imagewidth','imagestripframes','imageheight','imageformat','imagedatatype','hidecursor','glViewport','glVertex4sv', + 'glVertex4s','glVertex4iv','glVertex4i','glVertex4fv','glVertex4f','glVertex4dv','glVertex4d','glVertex3sv','glVertex3s', + 'glVertex3iv','glVertex3i','glVertex3fv','glVertex3f','glVertex3dv','glVertex3d','glVertex2sv','glVertex2s','glVertex2iv', + 'glVertex2i','glVertex2fv','glVertex2f','glVertex2dv','glVertex2d','gluPerspective','gluOrtho2D','gluLookAt', + 'glubuild2dmipmaps','glTranslatef','glTranslated','gltexsubimage2d','glTexParameteriv','glTexParameteri', + 'glTexParameterfv','glTexParameterf','glteximage2d','glTexGeniv','glTexGeni','glTexGenfv','glTexGenf','glTexGendv', + 'glTexGend','glTexEnviv','glTexEnvi','glTexEnvfv','glTexEnvf','glTexCoord4sv','glTexCoord4s','glTexCoord4iv','glTexCoord4i', + 'glTexCoord4fv','glTexCoord4f','glTexCoord4dv','glTexCoord4d','glTexCoord3sv','glTexCoord3s','glTexCoord3iv','glTexCoord3i', + 'glTexCoord3fv','glTexCoord3f','glTexCoord3dv','glTexCoord3d','glTexCoord2sv','glTexCoord2s','glTexCoord2iv','glTexCoord2i', + 'glTexCoord2fv','glTexCoord2f','glTexCoord2dv','glTexCoord2d','glTexCoord1sv','glTexCoord1s','glTexCoord1iv','glTexCoord1i','glTexCoord1fv', + 'glTexCoord1f','glTexCoord1dv','glTexCoord1d','glStencilOp','glStencilMask','glStencilFunc','glShadeModel','glSelectBuffer', + 'glScissor','glScalef','glScaled','glRotatef','glRotated','glRenderMode','glRectsv','glRects','glRectiv','glRecti', + 'glRectfv','glRectf','glRectdv','glRectd','glReadBuffer','glRasterPos4sv','glRasterPos4s','glRasterPos4iv', + 'glRasterPos4i','glRasterPos4fv','glRasterPos4f','glRasterPos4dv','glRasterPos4d','glRasterPos3sv','glRasterPos3s', + 'glRasterPos3iv','glRasterPos3i','glRasterPos3fv','glRasterPos3f','glRasterPos3dv','glRasterPos3d','glRasterPos2sv', + 'glRasterPos2s','glRasterPos2iv','glRasterPos2i','glRasterPos2fv','glRasterPos2f','glRasterPos2dv','glRasterPos2d', + 'glPushName','glPushMatrix','glPushClientAttrib','glPushAttrib','glPrioritizeTextures','glPopName','glPopMatrix', + 'glPopClientAttrib','glPopAttrib','glpolygonstipple','glPolygonOffset','glPolygonMode','glPointSize','glPixelZoom', + 'glPixelTransferi','glPixelTransferf','glPixelStorei','glPixelStoref','glPassThrough','glOrtho','glNormal3sv','glNormal3s', + 'glNormal3iv','glNormal3i','glNormal3fv','glNormal3f','glNormal3dv','glNormal3d','glNormal3bv','glNormal3b','glNewList', + 'glMultMatrixf','glMultMatrixd','glmultitexcoord2f','glmultitexcoord2d','glMatrixMode','glMaterialiv','glMateriali', + 'glMaterialfv','glMaterialf','glMapGrid2f','glMapGrid2d','glMapGrid1f','glMapGrid1d','glLogicOp','glLoadName','glLoadMatrixf', + 'glLoadMatrixd','glLoadIdentity','glListBase','glLineWidth','glLineStipple','glLightModeliv','glLightModeli','glLightModelfv', + 'glLightModelf','glLightiv','glLighti','glLightfv','glLightf','glIsTexture','glIsList','glIsEnabled','glInitNames', + 'glIndexubv','glIndexub','glIndexsv','glIndexs','glIndexMask','glIndexiv','glIndexi','glIndexfv','glIndexf','glIndexdv', + 'glIndexd','glHint','glGetTexParameteriv','glGetTexParameterfv','glGetTexLevelParameteriv','glGetTexLevelParameterfv', + 'glGetTexGeniv','glGetTexGenfv','glGetTexGendv','glGetTexEnviv','glGetTexEnvfv','glgetstring','glgetpolygonstipple','glGetPixelMapuiv', + 'glGetMaterialiv','glGetMaterialfv','glGetLightiv','glGetLightfv','glGetIntegerv','glGetFloatv', + 'glGetError','glGetDoublev','glGetClipPlane','glGetBooleanv','glgentextures','glgentexture', + 'glgenlists','glFrustum','glFrontFace','glFogiv','glFogi','glFogfv','glFogf','glFlush','glFinish','glFeedbackBuffer', + 'glEvalPoint2','glEvalPoint1','glEvalMesh2','glEvalMesh1','glEvalCoord2fv','glEvalCoord2f','glEvalCoord2dv','glEvalCoord2d', + 'glEvalCoord1fv','glEvalCoord1f','glEvalCoord1dv','glEvalCoord1d','glEndList','glEnd','glEnableClientState','glEnable', + 'glEdgeFlagv','glEdgeFlag','glDrawBuffer','glDrawArrays','glDisableClientState','glDisable','glDepthRange','glDepthMask', + 'glDepthFunc','gldeletetextures','gldeletetexture','gldeletelists','glCullFace','glCopyTexSubImage2D','glCopyTexSubImage1D', + 'glCopyTexImage2D','glCopyTexImage1D','glColorMaterial','glColorMask','glColor4usv','glColor4us','glColor4uiv','glColor4ui', + 'glColor4ubv','glColor4ub','glColor4sv','glColor4s','glColor4iv','glColor4i','glColor4fv','glColor4f','glColor4dv', + 'glColor4d','glColor4bv','glColor4b','glColor3usv','glColor3us','glColor3uiv','glColor3ui','glColor3ubv','glColor3ub', + 'glColor3sv','glColor3s','glColor3iv','glColor3i','glColor3fv','glColor3f','glColor3dv','glColor3d','glColor3bv', + 'glColor3b','glClipPlane','glClearStencil','glClearIndex','glClearDepth','glClearColor','glClearAccum','glClear', + 'glcalllists','glCallList','glBlendFunc','glBindTexture','glBegin','glArrayElement','glAreTexturesResident', + 'glAlphaFunc','glactivetexture','glAccum','font','FindNextFile','FindFirstFile','FindClose','FileError', + 'extensionsupported','exp','execute','EndOfFile','drawtext','divbyzero','Determinant','deletesprite','deletesound', + 'DeleteServer','deleteimage','DeleteConnection','defaultfont','CrossProduct','cosd','cos','copysprite','ConnectionPending', + 'ConnectionHandShaking','ConnectionConnected','ConnectionAddress','compilererrorline','compilererrorcol','compilererror', + 'compilefile','compile','color','cls','CloseFile','clearregion','clearline','clearkeys','chr$','charat$','bindsprite', + 'beep','atnd','atn2d','atn2','atn','atand','asc','argcount','arg','animatesprites','AcceptConnection','abs' + ), + 3 => array( + + // Blue Lowercase Keywords + + 'xor','while','wend','until','type','traditional_print','traditional','to','then','struc','string','step','single', + 'run','return','reset','read','or','null','not','next','lor','loop','language','land','integer','input','if', + 'goto','gosub','for','endstruc','endif','end','elseif','else','double','do','dim','data','const','basic4gl','as', + 'and','alloc' + ) + + ), + 'SYMBOLS' => array( + '=', '<', '>', '>=', '<=', '+', '-', '*', '/', '%', '(', ')', '{', '}', '[', ']', '&', ';', ':', '$' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000080; font-weight: bold;', + 2 => 'color: #FF0000;', + 3 => 'color: #0000FF;' + ), + 'COMMENTS' => array( + 1 => 'color: #657CC4; font-style: italic;' + ), + 'BRACKETS' => array( + 0 => 'color: #000080;' + ), + 'STRINGS' => array( + 0 => 'color: #008000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000080; font-weight: bold;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #0000FF;' + ), + 'ESCAPE_CHAR' => array( + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/bf.php b/_piecrust/libs/Geshi/geshi/bf.php new file mode 100644 index 0000000..dd83121 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/bf.php @@ -0,0 +1,114 @@ + 'Brainfuck', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array(1 => '/[^\n+\-<>\[\]\.\,Y]+/s'), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + ), + 'SYMBOLS' => array( + 0 => array('+', '-'), + 1 => array('[', ']'), + 2 => array('<', '>'), + 3 => array('.', ','), + 4 => array('Y') //Brainfork Extension ;-) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #006600;', + 1 => 'color: #660000;', + 2 => 'color: #000066;', + 3 => 'color: #660066;', + 4 => 'color: #666600;' + ), + 'ESCAPE_CHAR' => array( + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'STRINGS' => GESHI_NEVER, + 'NUMBERS' => GESHI_NEVER + ), + 'KEYWORDS' => array( + 'DISALLOW_BEFORE' => '', + 'DISALLOW_AFTER' => '' + ) + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/bibtex.php b/_piecrust/libs/Geshi/geshi/bibtex.php new file mode 100644 index 0000000..9a6af63 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/bibtex.php @@ -0,0 +1,183 @@ + 'BibTeX', + 'OOLANG' => false, + 'COMMENT_SINGLE' => array( + 1 => '%%' + ), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 0 => array( + '@comment','@preamble','@string' + ), + // Standard entry types + 1 => array( + '@article','@book','@booklet','@conference','@inbook', + '@incollection','@inproceedings','@manual','@mastersthesis', + '@misc','@phdthesis','@proceedings','@techreport','@unpublished' + ), + // Custom entry types + 2 => array( + '@collection','@patent','@webpage' + ), + // Standard entry field names + 3 => array( + 'address','annote','author','booktitle','chapter','crossref', + 'edition','editor','howpublished','institution','journal','key', + 'month','note','number','organization','pages','publisher','school', + 'series','title','type','volume','year' + ), + // Custom entry field names + 4 => array( + 'abstract','affiliation','chaptername','cited-by','cites', + 'contents','copyright','date-added','date-modified','doi','eprint', + 'isbn','issn','keywords','language','lccn','lib-congress', + 'location','price','rating','read','size','source','url' + ) + ), + 'URLS' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'SYMBOLS' => array( + '{', '}', '#', '=', ',' + ), + 'CASE_SENSITIVE' => array( + 1 => false, + 2 => false, + 3 => false, + 4 => false, + GESHI_COMMENTS => false, + ), + // Define the colors for the groups listed above + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #C02020;', // Standard entry types + 2 => 'color: #C02020;', // Custom entry types + 3 => 'color: #C08020;', // Standard entry field names + 4 => 'color: #C08020;' // Custom entry field names + ), + 'COMMENTS' => array( + 1 => 'color: #2C922C; font-style: italic;' + ), + 'STRINGS' => array( + 0 => 'color: #2020C0;' + ), + 'SYMBOLS' => array( + 0 => 'color: #E02020;' + ), + 'REGEXPS' => array( + 1 => 'color: #2020C0;', // {...} + 2 => 'color: #C08020;', // BibDesk fields + 3 => 'color: #800000;' // LaTeX commands + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000000; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #E02020;' + ), + 'NUMBERS' => array( + ), + 'METHODS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'REGEXPS' => array( + // {parameters} + 1 => array( + GESHI_SEARCH => "(?<=\\{)(?:\\{(?R)\\}|[^\\{\\}])*(?=\\})", + GESHI_REPLACE => '\0', + GESHI_MODIFIERS => 's', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 2 => array( + GESHI_SEARCH => "\bBdsk-(File|Url)-\d+", + GESHI_REPLACE => '\0', + GESHI_MODIFIERS => 'Us', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 3 => array( + GESHI_SEARCH => "\\\\[A-Za-z0-9]*+", + GESHI_REPLACE => '\0', + GESHI_MODIFIERS => 'Us', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'OBJECT_SPLITTERS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'NUMBERS' => GESHI_NEVER + ), + 'KEYWORDS' => array( + 3 => array( + 'DISALLOWED_AFTER' => '(?=\s*=)' + ), + 4 => array( + 'DISALLOWED_AFTER' => '(?=\s*=)' + ), + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/blitzbasic.php b/_piecrust/libs/Geshi/geshi/blitzbasic.php new file mode 100644 index 0000000..e431d3a --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/blitzbasic.php @@ -0,0 +1,185 @@ + 'BlitzBasic', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'If','EndIf','ElseIf','Else If','Else','While','Wend','Return','Next','Include','End Type','End Select','End If','End Function','End','Select', + 'Type','Forever','For','Or','And','AppTitle','Case','Goto','Gosub','Step','Stop','Int','Last','False','Then','To','True','Until','Float', + 'String','Before','Not' + ), + 2 => array( + // All Functions - 2D BB and 3D BB + 'Xor','WriteString','WriteShort','WritePixelFast','WritePixel','WriteLine','WriteInt','WriteFloat','WriteFile','WriteBytes', + 'WriteByte','Write','WaitTimer','WaitMouse','WaitKey','WaitJoy','VWait','Viewport', + 'Upper','UpdateGamma','UnlockBuffer','UDPTimeouts','UDPStreamPort','UDPStreamIP','UDPMsgPort','UDPMsgIP', + 'Trim','TotalVidMem','TileImage','TileBlock','TFormImage','TFormFilter','Text', + 'TCPTimeouts','TCPStreamPort','TCPStreamIP','Tan','SystemProperty','StringWidth','StringHeight','Str','StopNetGame', + 'StopChannel','StartNetGame','Sqr','SoundVolume','SoundPitch','SoundPan','Sin','Shr', + 'ShowPointer','Shl','Sgn','SetGfxDriver','SetGamma','SetFont','SetEnv','SetBuffer','SendUDPMsg','SendNetMsg', + 'SeekFile','SeedRnd','ScanLine','ScaleImage','SaveImage','SaveBuffer','Sar','RuntimeError','RSet', + 'RotateImage','RndSeed','Rnd','Right','ResumeChannel','Restore','ResizeImage','ResizeBank','Replace', + 'Repeat','RecvUDPMsg','RecvNetMsg','RectsOverlap','Rect','ReadString','ReadShort','ReadPixelFast','ReadPixel','ReadLine', + 'ReadInt','ReadFloat','ReadFile','ReadDir','ReadBytes','ReadByte','ReadAvail','Read','Rand','Print', + 'PokeShort','PokeInt','PokeFloat','PokeByte','Plot','PlaySound','PlayMusic','PlayCDTrack','Pi','PeekShort', + 'PeekInt','PeekFloat','PeekByte','PauseChannel','Oval','Origin','OpenTCPStream','OpenMovie','OpenFile', + 'Null','NextFile','New','NetPlayerName','NetPlayerLocal','NetMsgType','NetMsgTo','NetMsgFrom', + 'NetMsgData','MovieWidth','MoviePlaying','MovieHeight','MoveMouse','MouseZSpeed','MouseZ','MouseYSpeed','MouseY','MouseXSpeed', + 'MouseX','MouseHit','MouseDown','Mod','Millisecs','MidHandle','Mid','MaskImage','LSet','Lower', + 'LoopSound','Log10','Log','LockBuffer','Locate','Local','LoadSound','LoadImage','LoadFont','LoadBuffer', + 'LoadAnimImage','Line','Len','Left','KeyHit','KeyDown','JoyZDir','JoyZ','JoyYDir', + 'JoyYaw','JoyY','JoyXDir','JoyX','JoyVDir','JoyV','JoyUDir','JoyU','JoyType','JoyRoll', + 'JoyPitch','JoyHit','JoyHat','JoyDown','JoinNetGame','Instr','Insert','Input', + 'ImageYHandle','ImageXHandle','ImageWidth','ImagesOverlap','ImagesCollide','ImageRectOverlap','ImageRectCollide','ImageHeight','ImageBuffer', + 'HostNetGame','HostIP','HidePointer','Hex','HandleImage','GraphicsWidth','GraphicsHeight','GraphicsDepth','GraphicsBuffer','Graphics', + 'GrabImage','Global','GFXModeWidth','GFXModeHeight','GfxModeExists','GFXModeDepth','GfxDriverName','GetMouse', + 'GetKey','GetJoy','GetEnv','GetColor','GammaRed','GammaGreen','GammaBlue','Function','FrontBuffer','FreeTimer', + 'FreeSound','FreeImage','FreeFont','FreeBank','FontWidth','FontHeight','FlushMouse','FlushKeys', + 'FlushJoy','Floor','Flip','First','FileType','FileSize','FilePos','Field', + 'Exp','Exit','ExecFile','Eof','EndGraphics','Each','DrawMovie','DrawImageRect','DrawImage','DrawBlockRect','DrawBlock', + 'DottedIP','Dim','DeleteNetPlayer','DeleteFile','DeleteDir','Delete','Delay','Default','DebugLog','Data', + 'CurrentTime','CurrentDir','CurrentDate','CreateUDPStream','CreateTimer','CreateTCPServer','CreateNetPlayer','CreateImage','CreateDir','CreateBank', + 'CountHostIPs','CountGFXModes','CountGfxDrivers','Cos','CopyStream','CopyRect','CopyPixelFast','CopyPixel','CopyImage','CopyFile', + 'CopyBank','Const','CommandLine','ColorRed','ColorGreen','ColorBlue','Color','ClsColor','Cls','CloseUDPStream', + 'CloseTCPStream','CloseTCPServer','CloseMovie','CloseFile','CloseDir','Chr','ChannelVolume','ChannelPlaying','ChannelPitch','ChannelPan', + 'ChangeDir','Ceil','CallDLL','Bin','BankSize','BackBuffer','AvailVidMem','AutoMidHandle', + 'ATan2','ATan','ASin','Asc','After','ACos','AcceptTCPStream','Abs', + // 3D Commands + 'Wireframe','Windowed3D','WBuffer','VertexZ','VertexY', + 'VertexX','VertexW','VertexV','VertexU','VertexTexCoords','VertexRed','VertexNZ','VertexNY','VertexNX','VertexNormal', + 'VertexGreen','VertexCoords','VertexColor','VertexBlue','VertexAlpha','VectorYaw','VectorPitch','UpdateWorld','UpdateNormals','TurnEntity', + 'TrisRendered','TriangleVertex','TranslateEntity','TFormVector','TFormPoint','TFormNormal','TFormedZ','TFormedY','TFormedX','TextureWidth', + 'TextureName','TextureHeight','TextureFilter','TextureCoords','TextureBuffer','TextureBlend','TerrainZ','TerrainY','TerrainX','TerrainSize', + 'TerrainShading','TerrainHeight','TerrainDetail','SpriteViewMode','ShowEntity','SetCubeFace','SetAnimTime','SetAnimKey','ScaleTexture','ScaleSprite', + 'ScaleMesh','ScaleEntity','RotateTexture','RotateSprite','RotateMesh','RotateEntity','ResetEntity','RenderWorld','ProjectedZ','ProjectedY', + 'ProjectedX','PositionTexture','PositionMesh','PositionEntity','PointEntity','PickedZ','PickedY','PickedX','PickedTriangle','PickedTime', + 'PickedSurface','PickedNZ','PickedNY','PickedNX','PickedEntity','PaintSurface','PaintMesh','PaintEntity','NameEntity','MoveEntity', + 'ModifyTerrain','MeshWidth','MeshHeight','MeshesIntersect','MeshDepth','MD2AnimTime','MD2AnimLength','MD2Animating','LoadTexture','LoadTerrain', + 'LoadSprite','LoadMesh','LoadMD2','LoaderMatrix','LoadBSP','LoadBrush','LoadAnimTexture','LoadAnimSeq','LoadAnimMesh','Load3DSound', + 'LinePick','LightRange','LightMesh','LightConeAngles','LightColor','HWMultiTex','HideEntity','HandleSprite','Graphics3D','GfxMode3DExists', + 'GfxMode3D','GfxDriverCaps3D','GfxDriver3D','GetSurfaceBrush','GetSurface','GetParent','GetMatElement','GetEntityType','GetEntityBrush','GetChild', + 'GetBrushTexture','FreeTexture','FreeEntity','FreeBrush','FlipMesh','FitMesh','FindSurface','FindChild','ExtractAnimSeq','EntityZ', + 'EntityYaw','EntityY','EntityX','EntityVisible','EntityType','EntityTexture','EntityShininess','EntityRoll','EntityRadius','EntityPitch', + 'EntityPickMode','EntityPick','EntityParent','EntityOrder','EntityName','EntityInView','EntityFX','EntityDistance','EntityColor','EntityCollided', + 'EntityBox','EntityBlend','EntityAutoFade','EntityAlpha','EmitSound','Dither','DeltaYaw','DeltaPitch','CreateTexture','CreateTerrain', + 'CreateSurface','CreateSprite','CreateSphere','CreatePlane','CreatePivot','CreateMirror','CreateMesh','CreateListener','CreateLight','CreateCylinder', + 'CreateCube','CreateCone','CreateCamera','CreateBrush','CountVertices','CountTriangles','CountSurfaces','CountGfxModes3D','CountCollisions','CountChildren', + 'CopyMesh','CopyEntity','CollisionZ','CollisionY','CollisionX','CollisionTriangle','CollisionTime','CollisionSurface','Collisions','CollisionNZ', + 'CollisionNY','CollisionNX','CollisionEntity','ClearWorld','ClearTextureFilters','ClearSurface','ClearCollisions','CaptureWorld','CameraZoom','CameraViewport', + 'CameraRange','CameraProjMode','CameraProject','CameraPick','CameraFogRange','CameraFogMode','CameraFogColor','CameraClsMode','CameraClsColor','BSPLighting', + 'BSPAmbientLight','BrushTexture','BrushShininess','BrushFX','BrushColor','BrushBlend','BrushAlpha','AntiAlias','AnimTime','AnimSeq', + 'AnimLength','Animating','AnimateMD2','Animate','AmbientLight','AlignToVector','AddVertex','AddTriangle','AddMesh','AddAnimSeq', + ) + ), + 'SYMBOLS' => array( + '(',')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000066; font-weight: bold;', + 2 => 'color: #0000ff;' + ), + 'COMMENTS' => array( + 1 => 'color: #D9D100; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000066;' + ), + 'STRINGS' => array( + 0 => 'color: #009900;' + ), + 'NUMBERS' => array( + 0 => 'color: #CC0000;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000066;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + 1 => '\\' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => false, + 1 => false + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/bnf.php b/_piecrust/libs/Geshi/geshi/bnf.php new file mode 100644 index 0000000..13341f7 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/bnf.php @@ -0,0 +1,119 @@ + 'bnf', + 'COMMENT_SINGLE' => array(';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', "'"), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array(), + 'SYMBOLS' => array( + 0 => array('(', ')'), + 1 => array('<', '>'), + 2 => array('[', ']'), + 3 => array('{', '}'), + 4 => array('=', '*', '/', '|', ':'), + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false + ), + 'STYLES' => array( + 'KEYWORDS' => array(), + 'COMMENTS' => array( + 0 => 'color: #666666; font-style: italic;', // Single Line comments + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => '' + ), + 'STRINGS' => array( + 0 => 'color: #a00;', + 1 => 'color: #a00;' + ), + 'NUMBERS' => array( + 0 => '' + ), + 'METHODS' => array( + 0 => '' + ), + 'SYMBOLS' => array( + 0 => 'color: #000066; font-weight: bold;', // Round brackets + 1 => 'color: #000066; font-weight: bold;', // Angel Brackets + 2 => 'color: #000066; font-weight: bold;', // Square Brackets + 3 => 'color: #000066; font-weight: bold;', // BRaces + 4 => 'color: #006600; font-weight: bold;', // Other operator symbols + ), + 'REGEXPS' => array( + 0 => 'color: #007;', + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array(), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array( + //terminal symbols + 0 => array( + GESHI_SEARCH => '(<)([^&]+?)(>)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/boo.php b/_piecrust/libs/Geshi/geshi/boo.php new file mode 100644 index 0000000..37c6304 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/boo.php @@ -0,0 +1,217 @@ + 'Boo', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'''", "'", '"""', '"'), + 'HARDQUOTE' => array('"""', '"""'), + 'HARDESCAPE' => array('\"""'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array(//Namespace + 'namespace', 'import', 'from' + ), + 2 => array(//Jump + 'yield', 'return', 'goto', 'continue', 'break' + ), + 3 => array(//Conditional + 'while', 'unless', 'then', 'in', 'if', 'for', 'else', 'elif' + ), + 4 => array(//Property + 'set', 'get' + ), + 5 => array(//Exception + 'try', 'raise', 'failure', 'except', 'ensure' + ), + 6 => array(//Visibility + 'public', 'private', 'protected', 'internal' + ), + 7 => array(//Define + 'struct', 'ref', 'of', 'interface', 'event', 'enum', 'do', 'destructor', 'def', 'constructor', 'class' + ), + 8 => array(//Cast + 'typeof', 'cast', 'as' + ), + 9 => array(//BiMacro + 'yieldAll', 'using', 'unchecked', 'rawArayIndexing', 'print', 'normalArrayIndexing', 'lock', + 'debug', 'checked', 'assert' + ), + 10 => array(//BiAttr + 'required', 'property', 'meta', 'getter', 'default' + ), + 11 => array(//BiFunc + 'zip', 'shellp', 'shellm', 'shell', 'reversed', 'range', 'prompt', + 'matrix', 'map', 'len', 'join', 'iterator', 'gets', 'enumerate', 'cat', 'array' + ), + 12 => array(//HiFunc + '__switch__', '__initobj__', '__eval__', '__addressof__', 'quack' + ), + 13 => array(//Primitive + 'void', 'ushort', 'ulong', 'uint', 'true', 'timespan', 'string', 'single', + 'short', 'sbyte', 'regex', 'object', 'null', 'long', 'int', 'false', 'duck', + 'double', 'decimal', 'date', 'char', 'callable', 'byte', 'bool' + ), + 14 => array(//Operator + 'not', 'or', 'and', 'is', 'isa', + ), + 15 => array(//Modifier + 'virtual', 'transient', 'static', 'partial', 'override', 'final', 'abstract' + ), + 16 => array(//Access + 'super', 'self' + ), + 17 => array(//Pass + 'pass' + ) + ), + 'SYMBOLS' => array( + '[|', '|]', '${', '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>', '+', '-', ';' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + 9 => true, + 10 => true, + 11 => true, + 12 => true, + 13 => true, + 14 => true, + 15 => true, + 16 => true, + 17 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color:green;font-weight:bold;', + 2 => 'color:navy;', + 3 => 'color:blue;font-weight:bold;', + 4 => 'color:#8B4513;', + 5 => 'color:teal;font-weight:bold;', + 6 => 'color:blue;font-weight:bold;', + 7 => 'color:blue;font-weight:bold;', + 8 => 'color:blue;font-weight:bold;', + 9 => 'color:maroon;', + 10 => 'color:maroon;', + 11 => 'color:purple;', + 12 => 'color:#4B0082;', + 13 => 'color:purple;font-weight:bold;', + 14 => 'color:#008B8B;font-weight:bold;', + 15 => 'color:brown;', + 16 => 'color:black;font-weight:bold;', + 17 => 'color:gray;' + ), + 'COMMENTS' => array( + 1 => 'color: #999999; font-style: italic;', + 2 => 'color: #999999; font-style: italic;', + 'MULTI' => 'color: #008000; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #0000FF; font-weight: bold;', + 'HARD' => 'color: #0000FF; font-weight: bold;', + ), + 'BRACKETS' => array( + 0 => 'color: #006400;' + ), + 'STRINGS' => array( + 0 => 'color: #008000;', + 'HARD' => 'color: #008000;' + ), + 'NUMBERS' => array( + 0 => 'color: #00008B;' + ), + 'METHODS' => array( + 0 => 'color: 000000;', + 1 => 'color: 000000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #006400;' + ), + 'REGEXPS' => array( + #0 => 'color: #0066ff;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + 9 => '', + 10 => '', + 11 => '', + 12 => '', + 13 => '', + 14 => '', + 15 => '', + 16 => '', + 17 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 0 => '.', + 1 => '::' + ), + 'REGEXPS' => array( + #0 => '%(@)?\/(?:(?(1)[^\/\\\\\r\n]+|[^\/\\\\\r\n \t]+)|\\\\[\/\\\\\w+()|.*?$^[\]{}\d])+\/%' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/c.php b/_piecrust/libs/Geshi/geshi/c.php new file mode 100644 index 0000000..1cdc24f --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/c.php @@ -0,0 +1,202 @@ + 'C', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Multiline-continued single-line comments + 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', + //Multiline-continued preprocessor define + 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i", + //Hexadecimal Char Specs + 2 => "#\\\\x[\da-fA-F]{2}#", + //Hexadecimal Char Specs + 3 => "#\\\\u[\da-fA-F]{4}#", + //Hexadecimal Char Specs + 4 => "#\\\\U[\da-fA-F]{8}#", + //Octal Char Specs + 5 => "#\\\\[0-7]{1,3}#" + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | + GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( + 'if', 'return', 'while', 'case', 'continue', 'default', + 'do', 'else', 'for', 'switch', 'goto' + ), + 2 => array( + 'null', 'false', 'break', 'true', 'function', 'enum', 'extern', 'inline' + ), + 3 => array( + 'printf', 'cout' + ), + 4 => array( + 'auto', 'char', 'const', 'double', 'float', 'int', 'long', + 'register', 'short', 'signed', 'sizeof', 'static', 'struct', + 'typedef', 'union', 'unsigned', 'void', 'volatile', 'wchar_t', + + 'int8', 'int16', 'int32', 'int64', + 'uint8', 'uint16', 'uint32', 'uint64', + + 'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t', + 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t', + + 'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t', + 'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t', + + 'int8_t', 'int16_t', 'int32_t', 'int64_t', + 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', + + 'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t' + ), + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', + '+', '-', '*', '/', '%', + '=', '<', '>', + '!', '^', '&', '|', + '?', ':', + ';', ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;', + 4 => 'color: #993333;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #339933;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #660099; font-weight: bold;', + 3 => 'color: #660099; font-weight: bold;', + 4 => 'color: #660099; font-weight: bold;', + 5 => 'color: #006699; font-weight: bold;', + 'HARD' => '', + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000dd;', + GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;', + GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', + GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', + GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI => 'color:#800080;' + ), + 'METHODS' => array( + 1 => 'color: #202020;', + 2 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/c_mac.php b/_piecrust/libs/Geshi/geshi/c_mac.php new file mode 100644 index 0000000..3e73519 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/c_mac.php @@ -0,0 +1,227 @@ + 'C (Mac)', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Multiline-continued single-line comments + 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', + //Multiline-continued preprocessor define + 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i", + //Hexadecimal Char Specs + 2 => "#\\\\x[\da-fA-F]{2}#", + //Hexadecimal Char Specs + 3 => "#\\\\u[\da-fA-F]{4}#", + //Hexadecimal Char Specs + 4 => "#\\\\U[\da-fA-F]{8}#", + //Octal Char Specs + 5 => "#\\\\[0-7]{1,3}#" + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | + GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( + 'if', 'return', 'while', 'case', 'continue', 'default', + 'do', 'else', 'for', 'switch', 'goto' + ), + 2 => array( + 'NULL', 'false', 'break', 'true', 'enum', 'errno', 'EDOM', + 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG', + 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG', + 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP', + 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP', + 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN', + 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN', + 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT', + 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR', + 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', + 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr', + 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC', + // Mac-specific constants: + 'kCFAllocatorDefault' + ), + 3 => array( + 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert', + 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint', + 'ispunct', 'isspace', 'isupper', 'isxdigit', 'tolower', 'toupper', + 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp', + 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2', + 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', + 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen', + 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf', + 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf', + 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc', + 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind', + 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs', + 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc', + 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv', + 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat', + 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn', + 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy', + 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime', + 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime' + ), + 4 => array( + 'auto', 'char', 'const', 'double', 'float', 'int', 'long', + 'register', 'short', 'signed', 'static', 'struct', + 'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf', + 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t', + 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', 'wchar_t', + + 'int8', 'int16', 'int32', 'int64', + 'uint8', 'uint16', 'uint32', 'uint64', + + 'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t', + 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t', + + 'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t', + 'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t', + + 'int8_t', 'int16_t', 'int32_t', 'int64_t', + 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', + + 'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t', + + // Mac-specific types: + 'CFArrayRef', 'CFDictionaryRef', 'CFMutableDictionaryRef', 'CFBundleRef', 'CFSetRef', 'CFStringRef', + 'CFURLRef', 'CFLocaleRef', 'CFDateFormatterRef', 'CFNumberFormatterRef', 'CFPropertyListRef', + 'CFTreeRef', 'CFWriteStreamRef', 'CFCharacterSetRef', 'CFMutableStringRef', 'CFNotificationRef', + 'CFReadStreamRef', 'CFNull', 'CFAllocatorRef', 'CFBagRef', 'CFBinaryHeapRef', + 'CFBitVectorRef', 'CFBooleanRef', 'CFDataRef', 'CFDateRef', 'CFMachPortRef', 'CFMessagePortRef', + 'CFMutableArrayRef', 'CFMutableBagRef', 'CFMutableBitVectorRef', 'CFMutableCharacterSetRef', + 'CFMutableDataRef', 'CFMutableSetRef', 'CFNumberRef', 'CFPlugInRef', 'CFPlugInInstanceRef', + 'CFRunLoopRef', 'CFRunLoopObserverRef', 'CFRunLoopSourceRef', 'CFRunLoopTimerRef', 'CFSocketRef', + 'CFTimeZoneRef', 'CFTypeRef', 'CFUserNotificationRef', 'CFUUIDRef', 'CFXMLNodeRef', 'CFXMLParserRef', + 'CFXMLTreeRef' + ), + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff;', + 2 => 'color: #0000ff;', + 3 => 'color: #0000dd;', + 4 => 'color: #0000ff;' + ), + 'COMMENTS' => array( + 1 => 'color: #ff0000;', + 2 => 'color: #339900;', + 'MULTI' => 'color: #ff0000; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #660099; font-weight: bold;', + 3 => 'color: #660099; font-weight: bold;', + 4 => 'color: #660099; font-weight: bold;', + 5 => 'color: #006699; font-weight: bold;', + 'HARD' => '', + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #666666;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000dd;', + GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;', + GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', + GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', + GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI => 'color:#800080;' + ), + 'METHODS' => array( + 1 => 'color: #00eeff;', + 2 => 'color: #00eeff;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/caddcl.php b/_piecrust/libs/Geshi/geshi/caddcl.php new file mode 100644 index 0000000..c09c84a --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/caddcl.php @@ -0,0 +1,126 @@ + 'CAD DCL', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'boxed_column','boxed_radio_column','boxed_radio_row','boxed_row', + 'column','concatenation','button','dialog','edit_box','image','image_button', + 'errtile','list_box','ok_cancel','ok_cancel_help','ok_cancel_help_errtile', + 'ok_cancel_help_info','ok_only','paragraph','popup_list','radio_button', + 'radio_column','radio_row','row','slider','spacer','spacer_0','spacer_1','text', + 'text_part','toggle', + 'action','alignment','allow_accept','aspect_ratio','big_increment', + 'children_alignment','children_fixed_height', + 'children_fixed_width','color', + 'edit_limit','edit_width','fixed_height','fixed_width', + 'height','initial_focus','is_cancel','is_default', + 'is_enabled','is_tab_stop','is-bold','key','label','layout','list', + 'max_value','min_value','mnemonic','multiple_select','password_char', + 'small_increment','tabs','tab_truncate','value','width', + 'false','true','left','right','centered','top','bottom', + 'dialog_line','dialog_foreground','dialog_background', + 'graphics_background','black','red','yellow','green','cyan', + 'blue','magenta','whitegraphics_foreground', + 'horizontal','vertical' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/cadlisp.php b/_piecrust/libs/Geshi/geshi/cadlisp.php new file mode 100644 index 0000000..d56e571 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/cadlisp.php @@ -0,0 +1,186 @@ + 'CAD Lisp', + 'COMMENT_SINGLE' => array(1 => ";"), + 'COMMENT_MULTI' => array(";|" => "|;"), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'abs','acad_colordlg','acad_helpdlg','acad_strlsort','action_tile', + 'add_list','alert','alloc','and','angle','angtof','angtos','append','apply', + 'arx','arxload','arxunload','ascii','assoc','atan','atof','atoi','atom', + 'atoms-family','autoarxload','autoload','Boole','boundp','caddr', + 'cadr','car','cdr','chr','client_data_tile','close','command','cond', + 'cons','cos','cvunit','defun','defun-q','defun-q-list-ref', + 'defun-q-list-set','dictadd','dictnext','dictremove','dictrename', + 'dictsearch','dimx_tile','dimy_tile','distance','distof','done_dialog', + 'end_image','end_list','entdel','entget','entlast','entmake', + 'entmakex','entmod','entnext','entsel','entupd','eq','equal','eval','exit', + 'exp','expand','expt','fill_image','findfile','fix','float','foreach','function', + 'gc','gcd','get_attr','get_tile','getangle','getcfg','getcname','getcorner', + 'getdist','getenv','getfiled','getint','getkword','getorient','getpoint', + 'getreal','getstring','getvar','graphscr','grclear','grdraw','grread','grtext', + 'grvecs','handent','help','if','initdia','initget','inters','itoa','lambda','last', + 'layoutlist','length','list','listp','load','load_dialog','log','logand','logior', + 'lsh','mapcar','max','mem','member','menucmd','menugroup','min','minusp','mode_tile', + 'namedobjdict','nentsel','nentselp','new_dialog','nil','not','nth','null', + 'numberp','open','or','osnap','polar','prin1','princ','print','progn','prompt', + 'quit','quote','read','read-char','read-line','redraw','regapp','rem','repeat', + 'reverse','rtos','set','set_tile','setcfg','setenv','setfunhelp','setq','setvar', + 'setview','sin','slide_image','snvalid','sqrt','ssadd','ssdel','ssget','ssgetfirst', + 'sslength','ssmemb','ssname','ssnamex','sssetfirst','start_dialog','start_image', + 'start_list','startapp','strcase','strcat','strlen','subst','substr','t','tablet', + 'tblnext','tblobjname','tblsearch','term_dialog','terpri','textbox','textpage', + 'textscr','trace','trans','type','unload_dialog','untrace','vector_image','ver', + 'vports','wcmatch','while','write-char','write-line','xdroom','xdsize','zerop', + 'vl-acad-defun','vl-acad-undefun','vl-arx-import','vlax-3D-point', + 'vlax-add-cmd','vlax-create-object','vlax-curve-getArea', + 'vlax-curve-getClosestPointTo','vlax-curve-getClosestPointToProjection', + 'vlax-curve-getDistAtParam','vlax-curve-getDistAtPoint', + 'vlax-curve-getEndParam','vlax-curve-getEndPoint', + 'vlax-curve-getFirstDeriv','vlax-curve-getParamAtDist', + 'vlax-curve-getParamAtPoint','vlax-curve-getPointAtDist', + 'vlax-curve-getPointAtParam','vlax-curve-getSecondDeriv', + 'vlax-curve-getStartParam','vlax-curve-getStartPoint', + 'vlax-curve-isClosed','vlax-curve-isPeriodic','vlax-curve-isPlanar', + 'vlax-dump-object','vlax-erased-p','vlax-for','vlax-get-acad-object', + 'vlax-get-object','vlax-get-or-create-object','vlax-get-property', + 'vlax-import-type-library','vlax-invoke-method','vlax-ldata-delete', + 'vlax-ldata-get','vlax-ldata-list','vlax-ldata-put','vlax-ldata-test', + 'vlax-make-safearray','vlax-make-variant','vlax-map-collection', + 'vlax-method-applicable-p','vlax-object-released-p','vlax-product-key', + 'vlax-property-available-p','vlax-put-property','vlax-read-enabled-p', + 'vlax-release-object','vlax-remove-cmd','vlax-safearray-fill', + 'vlax-safearray-get-dim','vlax-safearray-get-element', + 'vlax-safearray-get-l-bound','vlax-safearray-get-u-bound', + 'vlax-safearray-put-element','vlax-safearray-type','vlax-tmatrix', + 'vlax-typeinfo-available-p','vlax-variant-change-type', + 'vlax-variant-type','vlax-variant-value','vlax-write-enabled-p', + 'vl-bb-ref','vl-bb-set','vl-catch-all-apply','vl-catch-all-error-message', + 'vl-catch-all-error-p','vl-cmdf','vl-consp','vl-directory-files','vl-doc-export', + 'vl-doc-import','vl-doc-ref','vl-doc-set','vl-every','vl-exit-with-error', + 'vl-exit-with-value','vl-file-copy','vl-file-delete','vl-file-directory-p', + 'vl-filename-base','vl-filename-directory','vl-filename-extension', + 'vl-filename-mktemp','vl-file-rename','vl-file-size','vl-file-systime', + 'vl-get-resource','vlisp-compile','vl-list-exported-functions', + 'vl-list-length','vl-list-loaded-vlx','vl-load-all','vl-load-com', + 'vl-load-reactors','vl-member-if','vl-member-if-not','vl-position', + 'vl-prin1-to-string','vl-princ-to-string','vl-propagate','vlr-acdb-reactor', + 'vlr-add','vlr-added-p','vlr-beep-reaction','vlr-command-reactor', + 'vlr-current-reaction-name','vlr-data','vlr-data-set', + 'vlr-deepclone-reactor','vlr-docmanager-reactor','vlr-dwg-reactor', + 'vlr-dxf-reactor','vlr-editor-reactor','vl-registry-delete', + 'vl-registry-descendents','vl-registry-read','vl-registry-write', + 'vl-remove','vl-remove-if','vl-remove-if-not','vlr-insert-reactor', + 'vlr-linker-reactor','vlr-lisp-reactor','vlr-miscellaneous-reactor', + 'vlr-mouse-reactor','vlr-notification','vlr-object-reactor', + 'vlr-owner-add','vlr-owner-remove','vlr-owners','vlr-pers','vlr-pers-list', + 'vlr-pers-p','vlr-pers-release','vlr-reaction-names','vlr-reactions', + 'vlr-reaction-set','vlr-reactors','vlr-remove','vlr-remove-all', + 'vlr-set-notification','vlr-sysvar-reactor','vlr-toolbar-reactor', + 'vlr-trace-reaction','vlr-type','vlr-types','vlr-undo-reactor', + 'vlr-wblock-reactor','vlr-window-reactor','vlr-xref-reactor', + 'vl-some','vl-sort','vl-sort-i','vl-string-elt','vl-string-left-trim', + 'vl-string-mismatch','vl-string-position','vl-string-right-trim', + 'vl-string-search','vl-string-subst','vl-string-translate','vl-string-trim', + 'vl-symbol-name','vl-symbolp','vl-symbol-value','vl-unload-vlx','vl-vbaload', + 'vl-vbarun','vl-vlx-loaded-p' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/cfdg.php b/_piecrust/libs/Geshi/geshi/cfdg.php new file mode 100644 index 0000000..27ade0c --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/cfdg.php @@ -0,0 +1,124 @@ + + * Copyright: (c) 2006 John Horigan http://www.ozonehouse.com/john/ + * Release Version: 1.0.8.9 + * Date Started: 2006/03/11 + * + * CFDG language file for GeSHi. + * + * CHANGES + * ------- + * 2006/03/11 (1.0.0) + * - First Release + * + * TODO (updated 2006/03/11) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'CFDG', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'include', 'startshape', 'rule', 'background' + ), + 2 => array( + 'SQUARE', 'CIRCLE', 'TRIANGLE', + ), + 3 => array( + 'b','brightness','h','hue','sat','saturation', + 'a','alpha','x','y','z','s','size', + 'r','rotate','f','flip','skew','xml_set_object' + ) + ), + 'SYMBOLS' => array( + '[', ']', '{', '}', '*', '|' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #717100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #006666;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/cfm.php b/_piecrust/libs/Geshi/geshi/cfm.php new file mode 100644 index 0000000..80a7f72 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/cfm.php @@ -0,0 +1,299 @@ + 'ColdFusion', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + /* CFM Tags */ + 1 => array( + 'cfabort', 'cfapplet', 'cfapplication', 'cfargument', 'cfassociate', + 'cfbreak', 'cfcache', 'cfcase', 'cfcatch', 'cfchart', 'cfchartdata', + 'cfchartseries', 'cfcol', 'cfcollection', 'cfcomponent', + 'cfcontent', 'cfcookie', 'cfdefaultcase', 'cfdirectory', + 'cfdocument', 'cfdocumentitem', 'cfdocumentsection', 'cfdump', + 'cfelse', 'cfelseif', 'cferror', 'cfexecute', 'cfexit', 'cffile', + 'cfflush', 'cfform', 'cfformgroup', 'cfformitem', 'cfftp', + 'cffunction', 'cfgrid', 'cfgridcolumn', 'cfgridrow', 'cfgridupdate', + 'cfheader', 'cfhtmlhead', 'cfhttp', 'cfhttpparam', 'cfif', + 'cfimport', 'cfinclude', 'cfindex', 'cfinput', 'cfinsert', + 'cfinvoke', 'cfinvokeargument', 'cfldap', 'cflocation', 'cflock', + 'cflog', 'cflogin', 'cfloginuser', 'cflogout', 'cfloop', 'cfmail', + 'cfmailparam', 'cfmailpart', 'cfmodule', 'cfNTauthenticate', + 'cfobject', 'cfobjectcache', 'cfoutput', 'cfparam', 'cfpop', + 'cfprocessingdirective', 'cfprocparam', + 'cfprocresult', 'cfproperty', 'cfquery', 'cfqueryparam', + 'cfregistry', 'cfreport', 'cfreportparam', 'cfrethrow', 'cfreturn', + 'cfsavecontent', 'cfschedule', 'cfscript', 'cfsearch', 'cfselect', + 'cfset', 'cfsetting', 'cfsilent', 'cfstoredproc', + 'cfswitch', 'cftable', 'cftextarea', 'cfthrow', 'cftimer', + 'cftrace', 'cftransaction', 'cftree', 'cftreeitem', 'cftry', + 'cfupdate', 'cfwddx' + ), + /* HTML Tags */ + 2 => array( + 'a', 'abbr', 'acronym', 'address', 'applet', + + 'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b', + + 'caption', 'center', 'cite', 'code', 'colgroup', 'col', + + 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', + + 'em', + + 'fieldset', 'font', 'form', 'frame', 'frameset', + + 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', + + 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i', + + 'kbd', + + 'label', 'legend', 'link', 'li', + + 'map', 'meta', + + 'noframes', 'noscript', + + 'object', 'ol', 'optgroup', 'option', + + 'param', 'pre', 'p', + + 'q', + + 'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's', + + 'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt', + + 'ul', 'u', + + 'var', + ), + /* HTML attributes */ + 3 => array( + 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', + 'background', 'bgcolor', 'border', + 'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', + 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', + 'enctype', + 'face', 'for', 'frame', 'frameborder', + 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', + 'id', 'ismap', + 'label', 'lang', 'language', 'link', 'longdesc', + 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', + 'name', 'nohref', 'noresize', 'noshade', 'nowrap', + 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload', + 'profile', 'prompt', + 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', + 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', + 'tabindex', 'target', 'text', 'title', 'type', + 'usemap', + 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace', + 'width' + ), + /* CFM Script delimeters */ + 4 => array( + 'var', 'function', 'while', 'if','else' + ), + /* CFM Functions */ + 5 => array( + 'Abs', 'GetFunctionList', 'LSTimeFormat','ACos','GetGatewayHelper','LTrim','AddSOAPRequestHeader','GetHttpRequestData', + 'Max','AddSOAPResponseHeader','GetHttpTimeString','Mid','ArrayAppend','GetLocale','Min','ArrayAvg','GetLocaleDisplayName', + 'Minute','ArrayClear','GetMetaData','Month','ArrayDeleteAt','GetMetricData','MonthAsString','ArrayInsertAt','GetPageContext', + 'Now','ArrayIsEmpty','GetProfileSections','NumberFormat','ArrayLen','GetProfileString','ParagraphFormat','ArrayMax', + 'GetLocalHostIP','ParseDateTime','ArrayMin','GetSOAPRequest','Pi','ArrayNew','GetSOAPRequestHeader','PreserveSingleQuotes', + 'ArrayPrepend','GetSOAPResponse','Quarter','ArrayResize','GetSOAPResponseHeader','QueryAddColumn','ArraySet', + 'GetTempDirectory','QueryAddRow','ArraySort','QueryNew','ArraySum','GetTempFile','QuerySetCell', + 'ArraySwap','GetTickCount','QuotedValueList','ArrayToList','GetTimeZoneInfo','Rand','Asc','GetToken','Randomize', + 'ASin','Hash','RandRange','Atn','Hour','REFind','BinaryDecode','HTMLCodeFormat','REFindNoCase','BinaryEncode', + 'HTMLEditFormat','ReleaseComObject','BitAnd','IIf','RemoveChars','BitMaskClear','IncrementValue','RepeatString', + 'BitMaskRead','InputBaseN','Replace','BitMaskSet','Insert','ReplaceList','BitNot','Int','ReplaceNoCase','BitOr', + 'IsArray','REReplace','BitSHLN','IsBinary','REReplaceNoCase','BitSHRN','IsBoolean','Reverse','BitXor','IsCustomFunction', + 'Right','Ceiling','IsDate','RJustify','CharsetDecode','IsDebugMode','Round','CharsetEncode','IsDefined','RTrim', + 'Chr','IsLeapYear','Second','CJustify','IsLocalHost','SendGatewayMessage','Compare','IsNumeric','SetEncoding', + 'CompareNoCase','IsNumericDate','SetLocale','Cos','IsObject','SetProfileString','CreateDate','IsQuery','SetVariable', + 'CreateDateTime','IsSimpleValue','Sgn','CreateObject','IsSOAPRequest','Sin','CreateODBCDate','IsStruct','SpanExcluding', + 'CreateODBCDateTime','IsUserInRole','SpanIncluding','CreateODBCTime','IsValid','Sqr','CreateTime','IsWDDX','StripCR', + 'CreateTimeSpan','IsXML','StructAppend','CreateUUID','IsXmlAttribute','StructClear','DateAdd','IsXmlDoc','StructCopy', + 'DateCompare','IsXmlElem','StructCount','DateConvert','IsXmlNode','StructDelete','DateDiff','IsXmlRoot','StructFind', + 'DateFormat','JavaCast','StructFindKey','DatePart','JSStringFormat','StructFindValue','Day','LCase','StructGet', + 'DayOfWeek','Left','StructInsert','DayOfWeekAsString','Len','StructIsEmpty','DayOfYear','ListAppend','StructKeyArray', + 'DaysInMonth','ListChangeDelims','StructKeyExists','DaysInYear','ListContains','StructKeyList','DE','ListContainsNoCase', + 'StructNew','DecimalFormat','ListDeleteAt','StructSort','DecrementValue','ListFind','StructUpdate','Decrypt','ListFindNoCase', + 'Tan','DecryptBinary','ListFirst','TimeFormat','DeleteClientVariable','ListGetAt','ToBase64','DirectoryExists', + 'ListInsertAt','ToBinary','DollarFormat','ListLast','ToScript','Duplicate','ListLen','ToString','Encrypt','ListPrepend', + 'Trim','EncryptBinary','ListQualify','UCase','Evaluate','ListRest','URLDecode','Exp','ListSetAt','URLEncodedFormat', + 'ExpandPath','ListSort','URLSessionFormat','FileExists','ListToArray','Val','Find','ListValueCount','ValueList', + 'FindNoCase','ListValueCountNoCase','Week','FindOneOf','LJustify','Wrap','FirstDayOfMonth','Log','WriteOutput', + 'Fix','Log10','XmlChildPos','FormatBaseN','LSCurrencyFormat','XmlElemNew','GetAuthUser','LSDateFormat','XmlFormat', + 'GetBaseTagData','LSEuroCurrencyFormat','XmlGetNodeType','GetBaseTagList','LSIsCurrency','XmlNew','GetBaseTemplatePath', + 'LSIsDate','XmlParse','GetClientVariablesList','LSIsNumeric','XmlSearch','GetCurrentTemplatePath','LSNumberFormat', + 'XmlTransform','GetDirectoryFromPath','LSParseCurrency','XmlValidate','GetEncoding','LSParseDateTime','Year', + 'GetException','LSParseEuroCurrency','YesNoFormat','GetFileFromPath','LSParseNumber' + ), + /* CFM Attributes */ + 6 => array( + 'dbtype','connectstring','datasource','username','password','query','delimeter','description','required','hint','default','access','from','to','list','index' + ), + 7 => array( + 'EQ', 'GT', 'LT', 'GTE', 'LTE', 'IS', 'LIKE', 'NEQ' + ) + ), + 'SYMBOLS' => array( + '/', '=', '{', '}', '(', ')', '[', ']', '<', '>', '&' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #990000; font-weight: bold;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #0000FF;', + 4 => 'color: #000000; font-weight: bold;', + 5 => 'color: #0000FF;', + 6 => 'color: #0000FF;', + 7 => 'color: #0000FF;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #0000FF;' + ), + 'STRINGS' => array( + 0 => 'color: #009900;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #0000FF;' + ), + 'SCRIPT' => array( + 0 => 'color: #808080; font-style: italic;', + 1 => 'color: #00bbdd;', + 2 => 'color: #0000FF;', + 3 => 'color: #000099;', + 4 => 'color: #333333;', + 5 => 'color: #333333;' + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => 'http://december.com/html/4/element/{FNAMEL}.html', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '' + ), + 1 => array( + ' '>' + ), + 2 => "/(?!<#)(?:(?:##)*)(#)[a-zA-Z0-9_\.\(\)]+(#)/", + 3 => array( + '' => '' + ), + 4 => array( + '<' => '>' + ), + 5 => '/((?!])+?(>)/si' + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => false, + 1 => false, + 2 => true, + 3 => true, + 4 => true, + 5 => true + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 1 => array( + 'DISALLOWED_BEFORE' => '(?<=<|<\/)', + 'DISALLOWED_AFTER' => '(?=\s|\/|>)', + ), + 2 => array( + 'DISALLOWED_BEFORE' => '(?<=<|<\/)', + 'DISALLOWED_AFTER' => '(?=\s|\/|>)', + ), + 3 => array( + 'DISALLOWED_BEFORE' => '(?|^])', // allow ; before keywords + 'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-])', // allow & after keywords + ), + 7 => array( + 'DISALLOWED_BEFORE' => '(?&|^])', // allow ; before keywords + 'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-])', // allow & after keywords + ) + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/chaiscript.php b/_piecrust/libs/Geshi/geshi/chaiscript.php new file mode 100644 index 0000000..a4dc431 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/chaiscript.php @@ -0,0 +1,140 @@ + 'ChaiScript', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + //Regular Expressions + 'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'break', 'else', 'else if', 'eval', 'for', 'if', 'return', 'while', 'try', 'catch', 'finally', + ), + 2 => array( + 'def', 'false', 'fun', 'true', 'var', 'attr', + ), + 3 => array( + // built in functions + 'throw', + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', + '+', '-', '*', '/', '%', + '!', '@', '&', '|', '^', + '<', '>', '=', + ',', ';', '?', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000066; font-weight: bold;', + 2 => 'color: #003366; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #006600; font-style: italic;', + 2 => 'color: #009966; font-style: italic;', + 'MULTI' => 'color: #006600; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #3366CC;' + ), + 'NUMBERS' => array( + 0 => 'color: #CC0000;' + ), + 'METHODS' => array( + 1 => 'color: #660066;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + ), + 1 => array( + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/cil.php b/_piecrust/libs/Geshi/geshi/cil.php new file mode 100644 index 0000000..58bd42b --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/cil.php @@ -0,0 +1,196 @@ + 'CIL', + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'COMMENT_SINGLE' => array('//'), + 'COMMENT_MULTI' => array(), + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array(//Dotted + '.zeroinit', '.vtfixup', '.vtentry', '.vtable', '.ver', '.try', '.subsystem', '.size', '.set', '.removeon', + '.publickeytoken', '.publickey', '.property', '.permissionset', '.permission', '.pdirect', '.param', '.pack', + '.override', '.other', '.namespace', '.mresource', '.module', '.method', '.maxstack', '.manifestres', '.locals', + '.localized', '.locale', '.line', '.language', '.import', '.imagebase', '.hash', '.get', '.fire', '.file', '.field', + '.export', '.event', '.entrypoint', '.emitbyte', '.data', '.custom', '.culture', '.ctor', '.corflags', '.class', + '.cctor', '.assembly', '.addon' + ), + 2 => array(//Attributes + 'wrapper', 'with', 'winapi', 'virtual', 'vector', 'vararg', 'value', 'userdefined', 'unused', 'unmanagedexp', + 'unmanaged', 'unicode', 'to', 'tls', 'thiscall', 'synchronized', 'struct', 'strict', 'storage', 'stdcall', + 'static', 'specialname', 'special', 'serializable', 'sequential', 'sealed', 'runtime', 'rtspecialname', 'request', + 'reqsecobj', 'reqrefuse', 'reqopt', 'reqmin', 'record', 'public', 'privatescope', 'private', 'preservesig', + 'prejitgrant', 'prejitdeny', 'platformapi', 'pinvokeimpl', 'pinned', 'permitonly', 'out', 'optil', 'opt', + 'notserialized', 'notremotable', 'not_in_gc_heap', 'noprocess', 'noncaslinkdemand', 'noncasinheritance', + 'noncasdemand', 'nometadata', 'nomangle', 'nomachine', 'noinlining', 'noappdomain', 'newslot', 'nested', 'native', + 'modreq', 'modopt', 'marshal', 'managed', 'literal', 'linkcheck', 'lcid', 'lasterr', 'internalcall', 'interface', + 'instance', 'initonly', 'init', 'inheritcheck', 'in', 'import', 'implicitres', 'implicitcom', 'implements', + 'illegal', 'il', 'hidebysig', 'handler', 'fromunmanaged', 'forwardref', 'fixed', 'finally', 'final', 'filter', + 'filetime', 'field', 'fault', 'fastcall', 'famorassem', 'family', 'famandassem', 'extern', 'extends', 'explicit', + 'error', 'enum', 'endmac', 'deny', 'demand', 'default', 'custom', 'compilercontrolled', 'clsid', 'class', 'cil', + 'cf', 'cdecl', 'catch', 'beforefieldinit', 'autochar', 'auto', 'at', 'assert', 'assembly', 'as', 'any', 'ansi', + 'alignment', 'algorithm', 'abstract' + ), + 3 => array(//Types + 'wchar', 'void', 'variant', 'unsigned', 'valuetype', 'typedref', 'tbstr', 'sysstring', 'syschar', 'string', + 'streamed_object', 'stream', 'stored_object', 'safearray', 'objectref', 'object', 'nullref', 'method', 'lpwstr', + 'lpvoid', 'lptstr', 'lpstruct', 'lpstr', 'iunknown', 'int64', 'int32', 'int16', 'int8', 'int', 'idispatch', + 'hresult', 'float64', 'float32', 'float', 'decimal', 'date', 'currency', 'char', 'carray', 'byvalstr', + 'bytearray', 'boxed', 'bool', 'blob_object', 'blob', 'array' + ), + 4 => array(//Prefix + 'volatile', 'unaligned', 'tail', 'readonly', 'no', 'constrained' + ), + 5 => array(//Suffix + 'un', 'u8', 'u4', 'u2', 'u1', 'u', 's', 'ref', 'r8', 'r4', 'm1', 'i8', 'i4', 'i2', 'i1', 'i'#, '.8', '.7', '.6', '.5', '.4', '.3', '.2', '.1', '.0' + ), + 6 => array(//Base + 'xor', 'switch', 'sub', 'stloc', + 'stind', 'starg', + 'shr', 'shl', 'ret', 'rem', 'pop', 'or', 'not', 'nop', 'neg', 'mul', + 'localloc', 'leave', 'ldnull', 'ldloca', + 'ldloc', 'ldind', 'ldftn', 'ldc', 'ldarga', + 'ldarg', 'jmp', 'initblk', 'endfinally', 'endfilter', + 'endfault', 'dup', 'div', 'cpblk', 'conv', 'clt', 'ckfinite', 'cgt', 'ceq', 'calli', + 'call', 'brzero', 'brtrue', 'brnull', 'brinst', + 'brfalse', 'break', 'br', 'bne', 'blt', 'ble', 'bgt', 'bge', 'beq', 'arglist', + 'and', 'add' + ), + 7 => array(//Object + 'unbox.any', 'unbox', 'throw', 'stsfld', 'stobj', 'stfld', 'stelem', 'sizeof', 'rethrow', 'refanyval', 'refanytype', 'newobj', + 'newarr', 'mkrefany', 'ldvirtftn', 'ldtoken', 'ldstr', 'ldsflda', 'ldsfld', 'ldobj', 'ldlen', 'ldflda', 'ldfld', + 'ldelema', 'ldelem', 'isinst', 'initobj', 'cpobj', 'castclass', + 'callvirt', 'callmostderived', 'box' + ), + 8 => array(//Other + 'prefixref', 'prefix7', 'prefix6', 'prefix5', 'prefix4', 'prefix3', 'prefix2', 'prefix1', 'prefix0' + ), + 9 => array(//Literal + 'true', 'null', 'false' + ), + 10 => array(//Comment-like + '#line', '^THE_END^' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', '!!' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + 9 => true, + 10 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color:maroon;font-weight:bold;', + 2 => 'color:blue;font-weight:bold;', + 3 => 'color:purple;font-weight:bold;', + 4 => 'color:teal;', + 5 => 'color:blue;', + 6 => 'color:blue;', + 7 => 'color:blue;', + 8 => 'color:blue;', + 9 => 'color:00008B', + 10 => 'color:gray' + ), + 'COMMENTS' => array( + 0 => 'color:gray;font-style:italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #008000; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #006400;' + ), + 'STRINGS' => array( + 0 => 'color: #008000;' + ), + 'NUMBERS' => array( + 0 => 'color: #00008B;' + ), + 'METHODS' => array( + 1 => 'color: #000033;' + ), + 'SYMBOLS' => array( + 0 => 'color: #006400;' + ), + 'REGEXPS' => array( + 0 => 'color:blue;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + 9 => '', + 10 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '::' + ), + 'REGEXPS' => array( + 0 => '(?<=ldc\\.i4\\.)[0-8]|(?<=(?:ldarg|ldloc|stloc)\\.)[0-3]' # Pickup the opcodes that end with integers + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/clojure.php b/_piecrust/libs/Geshi/geshi/clojure.php new file mode 100644 index 0000000..4494fb2 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/clojure.php @@ -0,0 +1,134 @@ + 'Clojure', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(';|' => '|;'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'defn', 'defn-', 'defmulti', 'defmethod', 'defmacro', 'deftest', + 'defstruct', 'def', 'defonce', 'let', 'letfn', 'do', 'cond', 'condp', + 'for', 'loop', 'recur', 'when', 'when-not', 'when-let', 'when-first', + 'if', 'if-let', 'if-not', 'doto', 'and', 'or','not','aget','aset', + 'dosync', 'doseq', 'dotimes', 'dorun', 'doall', + 'load', 'import', 'unimport', 'ns', 'in-ns', 'refer', 'print', + 'try', 'catch', 'finally', 'throw', 'fn', 'update-in', + 'with-open', 'with-local-vars', 'binding', + 'gen-class', 'gen-and-load-class', 'gen-and-save-class', + 'implement', 'proxy', 'lazy-cons', 'with-meta', + 'struct', 'struct-map', 'delay', 'locking', 'sync', 'time', 'apply', + 'remove', 'merge', 'interleave', 'interpose', 'distinct', + 'cons', 'concat', 'lazy-cat', 'cycle', 'rest', 'frest', 'drop', + 'drop-while', 'nthrest', 'take', 'take-while', 'take-nth', 'butlast', + 'reverse', 'sort', 'sort-by', 'split-at', 'partition', 'split-with', + 'first', 'ffirst', 'rfirst', 'zipmap', 'into', 'set', 'vec', + 'to-array-2d', 'not-empty', 'seq?', 'not-every?', 'every?', 'not-any?', + 'map', 'mapcat', 'vector?', 'list?', 'hash-map', 'reduce', 'filter', + 'vals', 'keys', 'rseq', 'subseq', 'rsubseq', 'count', 'empty?', + 'fnseq', 'repeatedly', 'iterate', 'drop-last', + 'repeat', 'replicate', 'range', 'into-array', + 'line-seq', 'resultset-seq', 're-seq', 're-find', 'tree-seq', 'file-seq', + 'iterator-seq', 'enumeration-seq', 'declare', 'xml-seq', + 'symbol?', 'string?', 'vector', 'conj', 'str', + 'pos?', 'neg?', 'zero?', 'nil?', 'inc', 'dec', 'format', + 'alter', 'commute', 'ref-set', 'floor', 'assoc', 'send', 'send-off' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>',';','|', '.', '..', '->', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #555;', + 1 => 'color: #555;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + '::', ':' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/cmake.php b/_piecrust/libs/Geshi/geshi/cmake.php new file mode 100644 index 0000000..00143bf --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/cmake.php @@ -0,0 +1,181 @@ + () + * - First Release + * + * TODO (updated ) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'CMake', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'ESCAPE_REGEXP' => array( + // Quoted variables ${...} + 1 => "/\\$(ENV)?\\{[^\\n\\}]*?\\}/i", + // Quoted registry keys [...] + 2 => "/\\[HKEY[^\n\\]]*?]/i" + ), + 'KEYWORDS' => array( + 1 => array( + 'add_custom_command', 'add_custom_target', 'add_definitions', + 'add_dependencies', 'add_executable', 'add_library', + 'add_subdirectory', 'add_test', 'aux_source_directory', 'break', + 'build_command', 'cmake_minimum_required', 'cmake_policy', + 'configure_file', 'create_test_sourcelist', 'define_property', + 'else', 'elseif', 'enable_language', 'enable_testing', + 'endforeach', 'endfunction', 'endif', 'endmacro', + 'endwhile', 'execute_process', 'export', 'file', 'find_file', + 'find_library', 'find_package', 'find_path', 'find_program', + 'fltk_wrap_ui', 'foreach', 'function', 'get_cmake_property', + 'get_directory_property', 'get_filename_component', 'get_property', + 'get_source_file_property', 'get_target_property', + 'get_test_property', 'if', 'include', 'include_directories', + 'include_external_msproject', 'include_regular_expression', + 'install', 'link_directories', 'list', 'load_cache', + 'load_command', 'macro', 'mark_as_advanced', 'math', 'message', + 'option', 'output_required_files', 'project', 'qt_wrap_cpp', + 'qt_wrap_ui', 'remove_definitions', 'return', 'separate_arguments', + 'set', 'set_directory_properties', 'set_property', + 'set_source_files_properties', 'set_target_properties', + 'set_tests_properties', 'site_name', 'source_group', 'string', + 'target_link_libraries', 'try_compile', 'try_run', 'unset', + 'variable_watch', 'while' + ), + 2 => array( + // Deprecated commands + 'build_name', 'exec_program', 'export_library_dependencies', + 'install_files', 'install_programs', 'install_targets', + 'link_libraries', 'make_directory', 'remove', 'subdir_depends', + 'subdirs', 'use_mangled_mesa', 'utility_source', + 'variable_requires', 'write_file' + ), + 3 => array( + // Special command arguments, this list is not comprehesive. + 'AND', 'APPEND', 'ASCII', 'BOOL', 'CACHE', 'COMMAND', 'COMMENT', + 'COMPARE', 'CONFIGURE', 'DEFINED', 'DEPENDS', 'DIRECTORY', + 'EQUAL', 'EXCLUDE_FROM_ALL', 'EXISTS', 'FALSE', 'FATAL_ERROR', + 'FILEPATH', 'FIND', 'FORCE', 'GET', 'GLOBAL', 'GREATER', + 'IMPLICIT_DEPENDS', 'INSERT', 'INTERNAL', 'IS_ABSOLUTE', + 'IS_DIRECTORY', 'IS_NEWER_THAN', 'LENGTH', 'LESS', + 'MAIN_DEPENDENCY', 'MATCH', 'MATCHALL', 'MATCHES', 'MODULE', 'NOT', + 'NOTFOUND', 'OFF', 'ON', 'OR', 'OUTPUT', 'PARENT_SCOPE', 'PATH', + 'POLICY', 'POST_BUILD', 'PRE_BUILD', 'PRE_LINK', 'PROPERTY', + 'RANDOM', 'REGEX', 'REMOVE_AT', 'REMOVE_DUPLICATES', 'REMOVE_ITEM', + 'REPLACE', 'REVERSE', 'SEND_ERROR', 'SHARED', 'SORT', 'SOURCE', + 'STATIC', 'STATUS', 'STREQUAL', 'STRGREATER', 'STRING', 'STRIP', + 'STRLESS', 'SUBSTRING', 'TARGET', 'TEST', 'TOLOWER', 'TOUPPER', + 'TRUE', 'VERBATIM', 'VERSION', 'VERSION_EQUAL', 'VERSION_GREATOR', + 'VERSION_LESS', 'WORKING_DIRECTORY', + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => true + ), + 'SYMBOLS' => array( + 0 => array('(', ')') + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #1f3f81; font-style: bold;', + 2 => 'color: #1f3f81;', + 3 => 'color: #077807; font-sytle: italic;' + ), + 'BRACKETS' => array(), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 1 => 'color: #b08000;', + 2 => 'color: #0000cd;' + ), + 'STRINGS' => array( + 0 => 'color: #912f11;', + ), + 'SYMBOLS' => array( + 0 => 'color: #197d8b;' + ), + 'NUMBERS' => array(), + 'METHODS' => array(), + 'REGEXPS' => array( + 0 => 'color: #b08000;', + 1 => 'color: #0000cd;' + ), + 'SCRIPT' => array() + ), + 'URLS' => array( + 1 => 'http://www.cmake.org/cmake/help/cmake2.6docs.html#command:{FNAMEL}', + 2 => 'http://www.cmake.org/cmake/help/cmake2.6docs.html#command:{FNAMEL}', + 3 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array( + // Unquoted variables + 0 => "\\$(ENV)?\\{[^\\n}]*?\\}", + // Unquoted registry keys + 1 => "\\[HKEY[^\n\\]]*?]" + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array(), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + // These keywords cannot come after a open paren + 1 => array( + 'DISALLOWED_AFTER' => '(?= *\()' + ), + 2 => array( + 'DISALLOWED_AFTER' => '(?= *\()' + ) + ), + 'ENABLE_FLAGS' => array( + 'BRACKETS' => GESHI_NEVER, + 'METHODS' => GESHI_NEVER, + 'NUMBERS' => GESHI_NEVER + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/cobol.php b/_piecrust/libs/Geshi/geshi/cobol.php new file mode 100644 index 0000000..9263370 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/cobol.php @@ -0,0 +1,244 @@ + 'COBOL', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array(1 => '/^\*.*?$/m'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', "'"), + 'ESCAPE_CHAR' => '\\', + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_SCI_SHORT | + GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( //Compiler Directives + 'ANSI', 'BLANK', 'NOBLANK', 'CALL-SHARED', 'CANCEL', 'NOCANCEL', + 'CHECK', 'CODE', 'NOCODE', 'COLUMNS', 'COMPACT', 'NOCOMPACT', + 'COMPILE', 'CONSULT', 'NOCONSULT', 'CROSSREF', 'NOCROSSREF', + 'DIAGNOSE-74', 'NODIAGNOSE-74', 'DIAGNOSE-85', 'NODIAGNOSE-85', + 'DIAGNOSEALL', 'NODIAGNOSEALL', 'ENDIF', 'ENDUNIT', 'ENV', + 'ERRORFILE', 'ERRORS', 'FIPS', 'NOFIPS', 'FMAP', 'HEADING', 'HEAP', + 'HIGHPIN', 'HIGHREQUESTERS', 'ICODE', 'NOICODE', 'IF', 'IFNOT', + 'INNERLIST', 'NOINNERLIST', 'INSPECT', 'NOINSPECT', 'LARGEDATA', + 'LD', 'LESS-CODE', 'LIBRARY', 'LINES', 'LIST', 'NOLIST', 'LMAP', + 'NOLMAP', 'MAIN', 'MAP', 'NOMAP', 'NLD', 'NONSTOP', 'NON-SHARED', + 'OPTIMIZE', 'PERFORM-TRACE', 'PORT', 'NOPORT', 'RESETTOG', + 'RUNNABLE', 'RUNNAMED', 'SAVE', 'SAVEABEND', 'NOSAVEABEND', + 'SEARCH', 'NOSEARCH', 'SECTION', 'SETTOG', 'SHARED', 'SHOWCOPY', + 'NOSHOWCOPY', 'SHOWFILE', 'NOSHOWFILE', 'SOURCE', 'SQL', 'NOSQL', + 'SQLMEM', 'SUBSET', 'SUBTYPE', 'SUPPRESS', 'NOSUPPRESS', 'SYMBOLS', + 'NOSYMBOLS', 'SYNTAX', 'TANDEM', 'TRAP2', 'NOTRAP2', 'TRAP2-74', + 'NOTRAP2-74', 'UL', 'WARN', 'NOWARN' + ), + 2 => array( //Statement Keywords + 'ACCEPT', 'ADD', 'TO', 'GIVING', 'CORRESPONDING', 'ALTER', 'CALL', + 'CHECKPOINT', 'CLOSE', 'COMPUTE', 'CONTINUE', 'COPY', + 'DELETE', 'DISPLAY', 'DIVIDE', 'INTO', 'REMAINDER', 'ENTER', + 'COBOL', 'EVALUATE', 'EXIT', 'GO', 'INITIALIZE', + 'TALLYING', 'REPLACING', 'CONVERTING', 'LOCKFILE', 'MERGE', 'MOVE', + 'MULTIPLY', 'OPEN', 'PERFORM', 'TIMES', + 'UNTIL', 'VARYING', 'RETURN', + ), + 3 => array( //Reserved in some contexts + 'ACCESS', 'ADDRESS', 'ADVANCING', 'AFTER', 'ALL', + 'ALPHABET', 'ALPHABETIC', 'ALPHABETIC-LOWER', 'ALPHABETIC-UPPER', + 'ALPHANUMERIC', 'ALPHANUMERIC-EDITED', 'ALSO', 'ALTERNATE', + 'AND', 'ANY', 'APPROXIMATE', 'AREA', 'AREAS', 'ASCENDING', 'ASSIGN', + 'AT', 'AUTHOR', 'BEFORE', 'BINARY', 'BLOCK', 'BOTTOM', 'BY', + 'CD', 'CF', 'CH', 'CHARACTER', 'CHARACTERS', + 'CHARACTER-SET', 'CLASS', 'CLOCK-UNITS', + 'CODE-SET', 'COLLATING', 'COLUMN', 'COMMA', + 'COMMON', 'COMMUNICATION', 'COMP', 'COMP-3', 'COMP-5', + 'COMPUTATIONAL', 'COMPUTATIONAL-3', 'COMPUTATIONAL-5', + 'CONFIGURATION', 'CONTAINS', 'CONTENT', 'CONTROL', + 'CONTROLS', 'CORR', 'COUNT', + 'CURRENCY', 'DATA', 'DATE', 'DATE-COMPILED', 'DATE-WRITTEN', 'DAY', + 'DAY-OF-WEEK', 'DE', 'DEBUG-CONTENTS', 'DEBUG-ITEM', 'DEBUG-LINE', + 'DEBUG-SUB-2', 'DEBUG-SUB-3', 'DEBUGGING', 'DECIMAL-POINT', + 'DECLARATIVES', 'DEBUG-NAME', 'DEBUG-SUB-1', 'DELIMITED', + 'DELIMITER', 'DEPENDING', 'DESCENDING', 'DESTINATION', 'DETAIL', + 'DISABLE', 'DIVISION', 'DOWN', 'DUPLICATES', + 'DYNAMIC', 'EGI', 'ELSE', 'EMI', 'ENABLE', 'END', 'END-ADD', + 'END-COMPUTE', 'END-DELETE', 'END-DIVIDE', 'END-EVALUATE', 'END-IF', + 'END-MULTIPLY', 'END-OF-PAGE', 'END-PERFORM', 'END-READ', + 'END-RECEIVE', 'END-RETURN', 'END-REWRITE', 'END-SEARCH', + 'END-START', 'END-STRING', 'END-SUBTRACT', 'END-UNSTRING', + 'END-WRITE', 'EOP', 'EQUAL', 'ERROR', 'ESI', + 'EVERY', 'EXCEPTION', 'EXCLUSIVE', 'EXTEND', + 'EXTENDED-STORAGE', 'EXTERNAL', 'FALSE', 'FD', 'FILE', + 'FILE-CONTROL', 'FILLER', 'FINAL', 'FIRST', 'FOOTING', 'FOR', + 'FROM', 'FUNCTION', 'GENERATE', 'GENERIC', 'GLOBAL', + 'GREATER', 'GROUP', 'GUARDIAN-ERR', 'HIGH-VALUE', + 'HIGH-VALUES', 'I-O', 'I-O-CONTROL', 'IDENTIFICATION', 'IN', + 'INDEX', 'INDEXED', 'INDICATE', 'INITIAL', 'INITIATE', + 'INPUT', 'INPUT-OUTPUT', 'INSTALLATION', + 'INVALID', 'IS', 'JUST', 'JUSTIFIED', 'KEY', 'LABEL', 'LAST', + 'LEADING', 'LEFT', 'LESS', 'LIMIT', 'LIMITS', 'LINAGE', + 'LINAGE-COUNTER', 'LINE', 'LINE-COUNTER', 'LINKAGE', 'LOCK', + 'LOW-VALUE', 'LOW-VALUES', 'MEMORY', 'MESSAGE', + 'MODE', 'MODULES', 'MULTIPLE', 'NATIVE', + 'NEGATIVE', 'NEXT', 'NO', 'NOT', 'NULL', 'NULLS', 'NUMBER', + 'NUMERIC', 'NUMERIC-EDITED', 'OBJECT-COMPUTER', 'OCCURS', 'OF', + 'OFF', 'OMITTED', 'ON', 'OPTIONAL', 'OR', 'ORDER', + 'ORGANIZATION', 'OTHER', 'OUTPUT', 'OVERFLOW', 'PACKED-DECIMAL', + 'PADDING', 'PAGE', 'PAGE-COUNTER', 'PF', 'PH', 'PIC', + 'PICTURE', 'PLUS', 'POINTER', 'POSITION', 'POSITIVE', 'PRINTING', + 'PROCEDURE', 'PROCEDURES', 'PROCEED', 'PROGRAM', 'PROGRAM-ID', + 'PROGRAM-STATUS', 'PROGRAM-STATUS-1', 'PROGRAM-STATUS-2', 'PROMPT', + 'PROTECTED', 'PURGE', 'QUEUE', 'QUOTE', 'QUOTES', 'RD', + 'RECEIVE', 'RECEIVE-CONTROL', 'RECORD', 'RECORDS', + 'REDEFINES', 'REEL', 'REFERENCE', 'REFERENCES', 'RELATIVE', + 'REMOVAL', 'RENAMES', 'REPLACE', + 'REPLY', 'REPORT', 'REPORTING', 'REPORTS', 'RERUN', + 'RESERVE', 'RESET', 'REVERSED', 'REWIND', 'REWRITE', 'RF', + 'RH', 'RIGHT', 'ROUNDED', 'RUN', 'SAME', 'SD', + 'SECURITY', 'SEGMENT', 'SEGMENT-LIMIT', 'SELECT', 'SEND', + 'SENTENCE', 'SEPARATE', 'SEQUENCE', 'SEQUENTIAL', 'SET', + 'SIGN', 'SIZE', 'SORT', 'SORT-MERGE', 'SOURCE-COMPUTER', + 'SPACE', 'SPACES', 'SPECIAL-NAMES', 'STANDARD', 'STANDARD-1', + 'STANDARD-2', 'START', 'STARTBACKUP', 'STATUS', 'STOP', 'STRING', + 'SUB-QUEUE-1', 'SUB-QUEUE-2', 'SUB-QUEUE-3', 'SUBTRACT', + 'SYMBOLIC', 'SYNC', 'SYNCDEPTH', 'SYNCHRONIZED', + 'TABLE', 'TAL', 'TAPE', 'TERMINAL', 'TERMINATE', 'TEST', + 'TEXT', 'THAN', 'THEN', 'THROUGH', 'THRU', 'TIME', + 'TOP', 'TRAILING', 'TRUE', 'TYPE', 'UNIT', 'UNLOCK', 'UNLOCKFILE', + 'UNLOCKRECORD', 'UNSTRING', 'UP', 'UPON', 'USAGE', 'USE', + 'USING', 'VALUE', 'VALUES', 'WHEN', 'WITH', 'WORDS', + 'WORKING-STORAGE', 'WRITE', 'ZERO', 'ZEROES' + ), + 4 => array( //Standard functions + 'ACOS', 'ANNUITY', 'ASIN', 'ATAN', 'CHAR', 'COS', 'CURRENT-DATE', + 'DATE-OF-INTEGER', 'DAY-OF-INTEGER', 'FACTORIAL', 'INTEGER', + 'INTEGER-OF-DATE', 'INTEGER-OF-DAY', 'INTEGER-PART', 'LENGTH', + 'LOG', 'LOG10', 'LOWER-CASE', 'MAX', 'MEAN', 'MEDIAN', 'MIDRANGE', + 'MIN', 'MOD', 'NUMVAL', 'NUMVAL-C', 'ORD', 'ORD-MAX', 'ORD-MIN', + 'PRESENT-VALUE', 'RANDOM', 'RANGE', 'REM', 'REVERSE', 'SIN', 'SQRT', + 'STANDARD-DEVIATION', 'SUM', 'TAN', 'UPPER-CASE', 'VARIANCE', + 'WHEN-COMPILED' + ), + 5 => array( //Privileged Built-in Functions + '#IN', '#OUT', '#TERM', '#TEMP', '#DYNAMIC', 'COBOL85^ARMTRAP', + 'COBOL85^COMPLETION', 'COBOL_COMPLETION_', 'COBOL_CONTROL_', + 'COBOL_GETENV_', 'COBOL_PUTENV_', 'COBOL85^RETURN^SORT^ERRORS', + 'COBOL_RETURN_SORT_ERRORS_', 'COBOL85^REWIND^SEQUENTIAL', + 'COBOL_REWIND_SEQUENTIAL_', 'COBOL85^SET^SORT^PARAM^TEXT', + 'COBOL_SET_SORT_PARAM_TEXT_', 'COBOL85^SET^SORT^PARAM^VALUE', + 'COBOL_SET_SORT_PARAM_VALUE_', 'COBOL_SET_MAX_RECORD_', + 'COBOL_SETMODE_', 'COBOL85^SPECIAL^OPEN', 'COBOL_SPECIAL_OPEN_', + 'COBOLASSIGN', 'COBOL_ASSIGN_', 'COBOLFILEINFO', 'COBOL_FILE_INFO_', + 'COBOLSPOOLOPEN', 'CREATEPROCESS', 'ALTERPARAMTEXT', + 'CHECKLOGICALNAME', 'CHECKMESSAGE', 'DELETEASSIGN', 'DELETEPARAM', + 'DELETESTARTUP', 'GETASSIGNTEXT', 'GETASSIGNVALUE', 'GETBACKUPCPU', + 'GETPARAMTEXT', 'GETSTARTUPTEXT', 'PUTASSIGNTEXT', 'PUTASSIGNVALUE', + 'PUTPARAMTEXT', 'PUTSTARTUPTEXT' + ) + ), + 'SYMBOLS' => array( + //Avoid having - in identifiers marked as symbols + ' + ', ' - ', ' * ', ' / ', ' ** ', + '.', ',', + '=', + '(', ')', '[', ']' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000080; font-weight: bold;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #008000; font-weight: bold;', + 4 => 'color: #000080;', + 5 => 'color: #008000;', + ), + 'COMMENTS' => array( + 1 => 'color: #a0a0a0; font-style: italic;', + 'MULTI' => 'color: #a0a0a0; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #339933;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #993399;' + ), + 'METHODS' => array( + 1 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000066;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 + ); + +?> diff --git a/_piecrust/libs/Geshi/geshi/cpp-qt.php b/_piecrust/libs/Geshi/geshi/cpp-qt.php new file mode 100644 index 0000000..07f0cf2 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/cpp-qt.php @@ -0,0 +1,564 @@ + 'C++ (QT)', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Multiline-continued single-line comments + 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', + //Multiline-continued preprocessor define + 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i", + //Hexadecimal Char Specs + 2 => "#\\\\x[\da-fA-F]{2}#", + //Hexadecimal Char Specs + 3 => "#\\\\u[\da-fA-F]{4}#", + //Hexadecimal Char Specs + 4 => "#\\\\U[\da-fA-F]{8}#", + //Octal Char Specs + 5 => "#\\\\[0-7]{1,3}#" + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | + GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( + 'case', 'continue', 'default', 'do', 'else', 'for', 'goto', 'if', 'return', + 'switch', 'while', 'delete', 'new', 'this' + ), + 2 => array( + 'NULL', 'false', 'break', 'true', 'enum', 'errno', 'EDOM', + 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG', + 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG', + 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP', + 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP', + 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN', + 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN', + 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT', + 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR', + 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', + 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr', + 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC', + 'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace', + 'try', 'catch', 'inline', 'dynamic_cast', 'const_cast', 'reinterpret_cast', + 'static_cast', 'explicit', 'friend', 'typename', 'typeid', 'class' , + 'foreach','connect', 'Q_OBJECT' , 'slots' , 'signals', 'Q_SIGNALS', 'Q_SLOTS', + 'Q_FOREACH', 'QCOMPARE', 'QVERIFY', 'qDebug', 'kDebug', 'QBENCHMARK' + ), + 3 => array( + 'cin', 'cerr', 'clog', 'cout', + 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert', + 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint', + 'ispunct', 'isspace', 'isupper', 'isxdigit', 'tolower', 'toupper', + 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp', + 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2', + 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', + 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen', + 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf', + 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf', + 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc', + 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind', + 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs', + 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc', + 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv', + 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat', + 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn', + 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy', + 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime', + 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime' + ), + 4 => array( + 'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint', + 'register', 'short', 'shortint', 'signed', 'static', 'struct', + 'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf', + 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t', + 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', 'wchar_t', + + 'int8', 'int16', 'int32', 'int64', + 'uint8', 'uint16', 'uint32', 'uint64', + + 'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t', + 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t', + + 'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t', + 'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t', + + 'int8_t', 'int16_t', 'int32_t', 'int64_t', + 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', + + 'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t' + ), + 5 => array( + "Q_UINT16", "Q_UINT32", "Q_UINT64", "Q_UINT8", "Q_ULLONG", + "Q_ULONG", "Q3Accel", "Q3Action", "Q3ActionGroup", "Q3AsciiBucket", + "Q3AsciiCache", "Q3AsciiCacheIterator", "Q3AsciiDict", + "Q3AsciiDictIterator", "Q3BaseBucket", "Q3BoxLayout", "Q3Button", + "Q3ButtonGroup", "Q3Cache", "Q3CacheIterator", "Q3Canvas", + "Q3CanvasEllipse", "Q3CanvasItem", "Q3CanvasItemList", + "Q3CanvasLine", "Q3CanvasPixmap", "Q3CanvasPixmapArray", + "Q3CanvasPolygon", "Q3CanvasPolygonalItem", "Q3CanvasRectangle", + "Q3CanvasSpline", "Q3CanvasSprite", "Q3CanvasText", "Q3CanvasView", + "Q3CheckListItem", "Q3CheckTableItem", "Q3CleanupHandler", + "Q3ColorDrag", "Q3ComboBox", "Q3ComboTableItem", "Q3CString", + "Q3DataBrowser", "Q3DataTable", "Q3DataView", "Q3DateEdit", + "Q3DateTimeEdit", "Q3DateTimeEditBase", "Q3DeepCopy", "Q3Dict", + "Q3DictIterator", "Q3Dns", "Q3DnsSocket", "Q3DockArea", + "Q3DockAreaLayout", "Q3DockWindow", "Q3DragObject", "Q3DropSite", + "Q3EditorFactory", "Q3FileDialog", "Q3FileIconProvider", + "Q3FilePreview", "Q3Frame", "Q3Ftp", "Q3GArray", "Q3GCache", + "Q3GCacheIterator", "Q3GDict", "Q3GDictIterator", "Q3GList", + "Q3GListIterator", "Q3GListStdIterator", "Q3Grid", "Q3GridLayout", + "Q3GridView", "Q3GroupBox", "Q3GVector", "Q3HBox", "Q3HBoxLayout", + "Q3HButtonGroup", "Q3Header", "Q3HGroupBox", "Q3Http", + "Q3HttpHeader", "Q3HttpRequestHeader", "Q3HttpResponseHeader", + "Q3IconDrag", "Q3IconDragItem", "Q3IconView", "Q3IconViewItem", + "Q3ImageDrag", "Q3IntBucket", "Q3IntCache", "Q3IntCacheIterator", + "Q3IntDict", "Q3IntDictIterator", "Q3ListBox", "Q3ListBoxItem", + "Q3ListBoxPixmap", "Q3ListBoxText", "Q3ListView", "Q3ListViewItem", + "Q3ListViewItemIterator", "Q3LNode", "Q3LocalFs", "Q3MainWindow", + "Q3MemArray", "Q3MimeSourceFactory", "Q3MultiLineEdit", + "Q3NetworkOperation", "Q3NetworkProtocol", "Q3NetworkProtocolDict", + "Q3NetworkProtocolFactory", "Q3NetworkProtocolFactoryBase", + "Q3ObjectDictionary", "Q3PaintDeviceMetrics", "Q3Painter", + "Q3Picture", "Q3PointArray", "Q3PolygonScanner", "Q3PopupMenu", + "Q3Process", "Q3ProgressBar", "Q3ProgressDialog", "Q3PtrBucket", + "Q3PtrCollection", "Q3PtrDict", "Q3PtrDictIterator", "Q3PtrList", + "Q3PtrListIterator", "Q3PtrListStdIterator", "Q3PtrQueue", + "Q3PtrStack", "Q3PtrVector", "Q3RangeControl", "Q3ScrollView", + "Q3Semaphore", "Q3ServerSocket", "Q3Shared", "Q3Signal", + "Q3SimpleRichText", "Q3SingleCleanupHandler", "Q3Socket", + "Q3SocketDevice", "Q3SortedList", "Q3SpinWidget", "Q3SqlCursor", + "Q3SqlEditorFactory", "Q3SqlFieldInfo", "Q3SqlFieldInfoList", + "Q3SqlForm", "Q3SqlPropertyMap", "Q3SqlRecordInfo", + "Q3SqlSelectCursor", "Q3StoredDrag", "Q3StrIList", "Q3StringBucket", + "Q3StrIVec", "Q3StrList", "Q3StrListIterator", "Q3StrVec", + "Q3StyleSheet", "Q3StyleSheetItem", "Q3SyntaxHighlighter", + "Q3TabDialog", "Q3Table", "Q3TableItem", "Q3TableSelection", + "Q3TextBrowser", "Q3TextDrag", "Q3TextEdit", + "Q3TextEditOptimPrivate", "Q3TextStream", "Q3TextView", + "Q3TimeEdit", "Q3ToolBar", "Q3TSFUNC", "Q3UriDrag", "Q3Url", + "Q3UrlOperator", "Q3ValueList", "Q3ValueListConstIterator", + "Q3ValueListIterator", "Q3ValueStack", "Q3ValueVector", "Q3VBox", + "Q3VBoxLayout", "Q3VButtonGroup", "Q3VGroupBox", "Q3WhatsThis", + "Q3WidgetStack", "Q3Wizard", "QAbstractButton", + "QAbstractEventDispatcher", "QAbstractExtensionFactory", + "QAbstractExtensionManager", "QAbstractFileEngine", + "QAbstractFileEngineHandler", "QAbstractFileEngineIterator", + "QAbstractFormBuilder", "QAbstractGraphicsShapeItem", + "QAbstractItemDelegate", "QAbstractItemModel", "QAbstractItemView", + "QAbstractListModel", "QAbstractMessageHandler", + "QAbstractNetworkCache", "QAbstractPageSetupDialog", + "QAbstractPrintDialog", "QAbstractProxyModel", + "QAbstractScrollArea", "QAbstractSlider", "QAbstractSocket", + "QAbstractSpinBox", "QAbstractTableModel", + "QAbstractTextDocumentLayout", "QAbstractUndoItem", + "QAbstractUriResolver", "QAbstractXmlNodeModel", + "QAbstractXmlReceiver", "QAccessible", "QAccessible2Interface", + "QAccessibleApplication", "QAccessibleBridge", + "QAccessibleBridgeFactoryInterface", "QAccessibleBridgePlugin", + "QAccessibleEditableTextInterface", "QAccessibleEvent", + "QAccessibleFactoryInterface", "QAccessibleInterface", + "QAccessibleInterfaceEx", "QAccessibleObject", + "QAccessibleObjectEx", "QAccessiblePlugin", + "QAccessibleSimpleEditableTextInterface", + "QAccessibleTableInterface", "QAccessibleTextInterface", + "QAccessibleValueInterface", "QAccessibleWidget", + "QAccessibleWidgetEx", "QAction", "QActionEvent", "QActionGroup", + "QApplication", "QArgument", "QAssistantClient", "QAtomicInt", + "QAtomicPointer", "QAuthenticator", "QBasicAtomicInt", + "QBasicAtomicPointer", "QBasicTimer", "QBitArray", "QBitmap", + "QBitRef", "QBool", "QBoxLayout", "QBrush", "QBrushData", "QBuffer", + "QButtonGroup", "QByteArray", "QByteArrayMatcher", "QByteRef", + "QCache", "QCalendarWidget", "QCDEStyle", "QChar", "QCharRef", + "QCheckBox", "QChildEvent", "QCleanlooksStyle", "QClipboard", + "QClipboardEvent", "QCloseEvent", "QColor", "QColorDialog", + "QColorGroup", "QColormap", "QColumnView", "QComboBox", + "QCommandLinkButton", "QCommonStyle", "QCompleter", + "QConicalGradient", "QConstString", "QContextMenuEvent", "QCOORD", + "QCoreApplication", "QCryptographicHash", "QCursor", "QCursorShape", + "QCustomEvent", "QDataStream", "QDataWidgetMapper", "QDate", + "QDateEdit", "QDateTime", "QDateTimeEdit", "QDB2Driver", + "QDB2Result", "QDBusAbstractAdaptor", "QDBusAbstractInterface", + "QDBusArgument", "QDBusConnection", "QDBusConnectionInterface", + "QDBusContext", "QDBusError", "QDBusInterface", "QDBusMessage", + "QDBusMetaType", "QDBusObjectPath", "QDBusPendingCall", + "QDBusPendingCallWatcher", "QDBusPendingReply", + "QDBusPendingReplyData", "QDBusReply", "QDBusServer", + "QDBusSignature", "QDBusVariant", "QDebug", + "QDesignerActionEditorInterface", "QDesignerBrushManagerInterface", + "QDesignerComponents", "QDesignerContainerExtension", + "QDesignerCustomWidgetCollectionInterface", + "QDesignerCustomWidgetInterface", "QDesignerDnDItemInterface", + "QDesignerDynamicPropertySheetExtension", "QDesignerExportWidget", + "QDesignerExtraInfoExtension", "QDesignerFormEditorInterface", + "QDesignerFormEditorPluginInterface", "QDesignerFormWindowCursorInterface", + "QDesignerFormWindowInterface", "QDesignerFormWindowManagerInterface", + "QDesignerFormWindowToolInterface", + "QDesignerIconCacheInterface", "QDesignerIntegrationInterface", + "QDesignerLanguageExtension", "QDesignerLayoutDecorationExtension", + "QDesignerMemberSheetExtension", "QDesignerMetaDataBaseInterface", + "QDesignerMetaDataBaseItemInterface", + "QDesignerObjectInspectorInterface", "QDesignerPromotionInterface", + "QDesignerPropertyEditorInterface", + "QDesignerPropertySheetExtension", "QDesignerResourceBrowserInterface", + "QDesignerTaskMenuExtension", "QDesignerWidgetBoxInterface", + "QDesignerWidgetDataBaseInterface", "QDesignerWidgetDataBaseItemInterface", + "QDesignerWidgetFactoryInterface", "QDesktopServices", + "QDesktopWidget", "QDial", "QDialog", "QDialogButtonBox", "QDir", + "QDirIterator", "QDirModel", "QDockWidget", "QDomAttr", + "QDomCDATASection", "QDomCharacterData", "QDomComment", + "QDomDocument", "QDomDocumentFragment", "QDomDocumentType", + "QDomElement", "QDomEntity", "QDomEntityReference", + "QDomImplementation", "QDomNamedNodeMap", "QDomNode", + "QDomNodeList", "QDomNotation", "QDomProcessingInstruction", + "QDomText", "QDoubleSpinBox", "QDoubleValidator", "QDrag", + "QDragEnterEvent", "QDragLeaveEvent", "QDragMoveEvent", + "QDragResponseEvent", "QDropEvent", "QDynamicPropertyChangeEvent", + "QErrorMessage", "QEvent", "QEventLoop", "QEventSizeOfChecker", + "QExplicitlySharedDataPointer", "QExtensionFactory", + "QExtensionManager", "QFactoryInterface", "QFile", "QFileDialog", + "QFileIconProvider", "QFileInfo", "QFileInfoList", + "QFileInfoListIterator", "QFileOpenEvent", "QFileSystemModel", + "QFileSystemWatcher", "QFlag", "QFlags", "QFocusEvent", + "QFocusFrame", "QFont", "QFontComboBox", "QFontDatabase", + "QFontDialog", "QFontInfo", "QFontMetrics", "QFontMetricsF", + "QForeachContainer", "QForeachContainerBase", "QFormBuilder", + "QFormLayout", "QFrame", "QFSFileEngine", "QFtp", "QFuture", + "QFutureInterface", "QFutureInterfaceBase", "QFutureIterator", + "QFutureSynchronizer", "QFutureWatcher", "QFutureWatcherBase", + "QGenericArgument", "QGenericReturnArgument", "QGLColormap", + "QGLContext", "QGLFormat", "QGLFramebufferObject", "QGlobalStatic", + "QGlobalStaticDeleter", "QGLPixelBuffer", "QGLWidget", "QGradient", + "QGradientStop", "QGradientStops", "QGraphicsEllipseItem", + "QGraphicsGridLayout", "QGraphicsItem", "QGraphicsItemAnimation", + "QGraphicsItemGroup", "QGraphicsLayout", "QGraphicsLayoutItem", + "QGraphicsLinearLayout", "QGraphicsLineItem", "QGraphicsPathItem", + "QGraphicsPixmapItem", "QGraphicsPolygonItem", + "QGraphicsProxyWidget", "QGraphicsRectItem", "QGraphicsScene", + "QGraphicsSceneContextMenuEvent", "QGraphicsSceneDragDropEvent", + "QGraphicsSceneEvent", "QGraphicsSceneHelpEvent", + "QGraphicsSceneHoverEvent", "QGraphicsSceneMouseEvent", + "QGraphicsSceneMoveEvent", "QGraphicsSceneResizeEvent", + "QGraphicsSceneWheelEvent", "QGraphicsSimpleTextItem", + "QGraphicsSvgItem", "QGraphicsTextItem", "QGraphicsView", + "QGraphicsWidget", "QGridLayout", "QGroupBox", "QGtkStyle", "QHash", + "QHashData", "QHashDummyNode", "QHashDummyValue", "QHashIterator", + "QHashNode", "QHBoxLayout", "QHeaderView", "QHelpContentItem", + "QHelpContentModel", "QHelpContentWidget", "QHelpEngine", + "QHelpEngineCore", "QHelpEvent", "QHelpGlobal", "QHelpIndexModel", + "QHelpIndexWidget", "QHelpSearchEngine", "QHelpSearchQuery", + "QHelpSearchQueryWidget", "QHelpSearchResultWidget", "QHideEvent", + "QHostAddress", "QHostInfo", "QHoverEvent", "QHttp", "QHttpHeader", + "QHttpRequestHeader", "QHttpResponseHeader", "QIBaseDriver", + "QIBaseResult", "QIcon", "QIconDragEvent", "QIconEngine", + "QIconEngineFactoryInterface", "QIconEngineFactoryInterfaceV2", + "QIconEnginePlugin", "QIconEnginePluginV2", "QIconEngineV2", + "QIconSet", "QImage", "QImageIOHandler", + "QImageIOHandlerFactoryInterface", "QImageIOPlugin", "QImageReader", + "QImageTextKeyLang", "QImageWriter", "QIncompatibleFlag", + "QInputContext", "QInputContextFactory", + "QInputContextFactoryInterface", "QInputContextPlugin", + "QInputDialog", "QInputEvent", "QInputMethodEvent", "Q_INT16", + "Q_INT32", "Q_INT64", "Q_INT8", "QInternal", "QIntForSize", + "QIntForType", "QIntValidator", "QIODevice", "Q_IPV6ADDR", + "QIPv6Address", "QItemDelegate", "QItemEditorCreator", + "QItemEditorCreatorBase", "QItemEditorFactory", "QItemSelection", + "QItemSelectionModel", "QItemSelectionRange", "QKeyEvent", + "QKeySequence", "QLabel", "QLatin1Char", "QLatin1String", "QLayout", + "QLayoutItem", "QLayoutIterator", "QLCDNumber", "QLibrary", + "QLibraryInfo", "QLine", "QLinearGradient", "QLineEdit", "QLineF", + "QLinkedList", "QLinkedListData", "QLinkedListIterator", + "QLinkedListNode", "QList", "QListData", "QListIterator", + "QListView", "QListWidget", "QListWidgetItem", "Q_LLONG", "QLocale", + "QLocalServer", "QLocalSocket", "Q_LONG", "QMacCompatGLenum", + "QMacCompatGLint", "QMacCompatGLuint", "QMacGLCompatTypes", + "QMacMime", "QMacPasteboardMime", "QMainWindow", "QMap", "QMapData", + "QMapIterator", "QMapNode", "QMapPayloadNode", "QMatrix", + "QMdiArea", "QMdiSubWindow", "QMenu", "QMenuBar", + "QMenubarUpdatedEvent", "QMenuItem", "QMessageBox", + "QMetaClassInfo", "QMetaEnum", "QMetaMethod", "QMetaObject", + "QMetaObjectExtraData", "QMetaProperty", "QMetaType", "QMetaTypeId", + "QMetaTypeId2", "QMimeData", "QMimeSource", "QModelIndex", + "QModelIndexList", "QMotifStyle", "QMouseEvent", "QMoveEvent", + "QMovie", "QMultiHash", "QMultiMap", "QMutableFutureIterator", + "QMutableHashIterator", "QMutableLinkedListIterator", + "QMutableListIterator", "QMutableMapIterator", + "QMutableSetIterator", "QMutableStringListIterator", + "QMutableVectorIterator", "QMutex", "QMutexLocker", "QMYSQLDriver", + "QMYSQLResult", "QNetworkAccessManager", "QNetworkAddressEntry", + "QNetworkCacheMetaData", "QNetworkCookie", "QNetworkCookieJar", + "QNetworkDiskCache", "QNetworkInterface", "QNetworkProxy", + "QNetworkProxyFactory", "QNetworkProxyQuery", "QNetworkReply", + "QNetworkRequest", "QNoDebug", "QNoImplicitBoolCast", "QObject", + "QObjectCleanupHandler", "QObjectData", "QObjectList", + "QObjectUserData", "QOCIDriver", "QOCIResult", "QODBCDriver", + "QODBCResult", "QPageSetupDialog", "QPaintDevice", "QPaintEngine", + "QPaintEngineState", "QPainter", "QPainterPath", + "QPainterPathPrivate", "QPainterPathStroker", "QPaintEvent", + "QPair", "QPalette", "QPen", "QPersistentModelIndex", "QPicture", + "QPictureFormatInterface", "QPictureFormatPlugin", "QPictureIO", + "Q_PID", "QPixmap", "QPixmapCache", "QPlainTextDocumentLayout", + "QPlainTextEdit", "QPlastiqueStyle", "QPluginLoader", "QPoint", + "QPointer", "QPointF", "QPolygon", "QPolygonF", "QPrintDialog", + "QPrintEngine", "QPrinter", "QPrinterInfo", "QPrintPreviewDialog", + "QPrintPreviewWidget", "QProcess", "QProgressBar", + "QProgressDialog", "QProxyModel", "QPSQLDriver", "QPSQLResult", + "QPushButton", "QQueue", "QRadialGradient", "QRadioButton", + "QReadLocker", "QReadWriteLock", "QRect", "QRectF", "QRegExp", + "QRegExpValidator", "QRegion", "QResizeEvent", "QResource", + "QReturnArgument", "QRgb", "QRubberBand", "QRunnable", + "QScriptable", "QScriptClass", "QScriptClassPropertyIterator", + "QScriptContext", "QScriptContextInfo", "QScriptContextInfoList", + "QScriptEngine", "QScriptEngineAgent", "QScriptEngineDebugger", + "QScriptExtensionInterface", "QScriptExtensionPlugin", + "QScriptString", "QScriptSyntaxCheckResult", "QScriptValue", + "QScriptValueIterator", "QScriptValueList", "QScrollArea", + "QScrollBar", "QSemaphore", "QSessionManager", "QSet", + "QSetIterator", "QSettings", "QSharedData", "QSharedDataPointer", + "QSharedMemory", "QSharedPointer", "QShortcut", "QShortcutEvent", + "QShowEvent", "QSignalMapper", "QSignalSpy", "QSimpleXmlNodeModel", + "QSize", "QSizeF", "QSizeGrip", "QSizePolicy", "QSlider", + "QSocketNotifier", "QSortFilterProxyModel", "QSound", + "QSourceLocation", "QSpacerItem", "QSpinBox", "QSplashScreen", + "QSplitter", "QSplitterHandle", "QSpontaneKeyEvent", "QSqlDatabase", + "QSqlDriver", "QSqlDriverCreator", "QSqlDriverCreatorBase", + "QSqlDriverFactoryInterface", "QSqlDriverPlugin", "QSqlError", + "QSqlField", "QSqlIndex", "QSQLite2Driver", "QSQLite2Result", + "QSQLiteDriver", "QSQLiteResult", "QSqlQuery", "QSqlQueryModel", + "QSqlRecord", "QSqlRelation", "QSqlRelationalDelegate", + "QSqlRelationalTableModel", "QSqlResult", "QSqlTableModel", "QSsl", + "QSslCertificate", "QSslCipher", "QSslConfiguration", "QSslError", + "QSslKey", "QSslSocket", "QStack", "QStackedLayout", + "QStackedWidget", "QStandardItem", "QStandardItemEditorCreator", + "QStandardItemModel", "QStatusBar", "QStatusTipEvent", + "QStdWString", "QString", "QStringList", "QStringListIterator", + "QStringListModel", "QStringMatcher", "QStringRef", "QStyle", + "QStyledItemDelegate", "QStyleFactory", "QStyleFactoryInterface", + "QStyleHintReturn", "QStyleHintReturnMask", + "QStyleHintReturnVariant", "QStyleOption", "QStyleOptionButton", + "QStyleOptionComboBox", "QStyleOptionComplex", + "QStyleOptionDockWidget", "QStyleOptionDockWidgetV2", + "QStyleOptionFocusRect", "QStyleOptionFrame", "QStyleOptionFrameV2", + "QStyleOptionFrameV3", "QStyleOptionGraphicsItem", + "QStyleOptionGroupBox", "QStyleOptionHeader", + "QStyleOptionMenuItem", "QStyleOptionProgressBar", + "QStyleOptionProgressBarV2", "QStyleOptionQ3DockWindow", + "QStyleOptionQ3ListView", "QStyleOptionQ3ListViewItem", + "QStyleOptionRubberBand", "QStyleOptionSizeGrip", + "QStyleOptionSlider", "QStyleOptionSpinBox", "QStyleOptionTab", + "QStyleOptionTabBarBase", "QStyleOptionTabBarBaseV2", + "QStyleOptionTabV2", "QStyleOptionTabV3", + "QStyleOptionTabWidgetFrame", "QStyleOptionTitleBar", + "QStyleOptionToolBar", "QStyleOptionToolBox", + "QStyleOptionToolBoxV2", "QStyleOptionToolButton", + "QStyleOptionViewItem", "QStyleOptionViewItemV2", + "QStyleOptionViewItemV3", "QStyleOptionViewItemV4", "QStylePainter", + "QStylePlugin", "QSvgGenerator", "QSvgRenderer", "QSvgWidget", + "QSyntaxHighlighter", "QSysInfo", "QSystemLocale", + "QSystemSemaphore", "QSystemTrayIcon", "Qt", "Qt3Support", + "QTabBar", "QTabletEvent", "QTableView", "QTableWidget", + "QTableWidgetItem", "QTableWidgetSelectionRange", "QTabWidget", + "QtAlgorithms", "QtAssistant", "QtCleanUpFunction", + "QtConcurrentFilter", "QtConcurrentMap", "QtConcurrentRun", + "QtContainerFwd", "QtCore", "QTcpServer", "QTcpSocket", "QtDBus", + "QtDebug", "QtDesigner", "QTDSDriver", "QTDSResult", + "QTemporaryFile", "QtEndian", "QTest", "QTestAccessibility", + "QTestAccessibilityEvent", "QTestData", "QTestDelayEvent", + "QTestEvent", "QTestEventList", "QTestEventLoop", + "QTestKeyClicksEvent", "QTestKeyEvent", "QTestMouseEvent", + "QtEvents", "QTextBlock", "QTextBlockFormat", "QTextBlockGroup", + "QTextBlockUserData", "QTextBoundaryFinder", "QTextBrowser", + "QTextCharFormat", "QTextCodec", "QTextCodecFactoryInterface", + "QTextCodecPlugin", "QTextCursor", "QTextDecoder", "QTextDocument", + "QTextDocumentFragment", "QTextDocumentWriter", "QTextEdit", + "QTextEncoder", "QTextFormat", "QTextFragment", "QTextFrame", + "QTextFrameFormat", "QTextFrameLayoutData", "QTextImageFormat", + "QTextInlineObject", "QTextIStream", "QTextItem", "QTextLayout", + "QTextLength", "QTextLine", "QTextList", "QTextListFormat", + "QTextObject", "QTextObjectInterface", "QTextOption", + "QTextOStream", "QTextStream", "QTextStreamFunction", + "QTextStreamManipulator", "QTextTable", "QTextTableCell", + "QTextTableCellFormat", "QTextTableFormat", "QtGlobal", "QtGui", + "QtHelp", "QThread", "QThreadPool", "QThreadStorage", + "QThreadStorageData", "QTime", "QTimeEdit", "QTimeLine", "QTimer", + "QTimerEvent", "QtMsgHandler", "QtNetwork", "QToolBar", + "QToolBarChangeEvent", "QToolBox", "QToolButton", "QToolTip", + "QtOpenGL", "QtPlugin", "QtPluginInstanceFunction", "QTransform", + "QTranslator", "QTreeView", "QTreeWidget", "QTreeWidgetItem", + "QTreeWidgetItemIterator", "QTS", "QtScript", "QtScriptTools", + "QtSql", "QtSvg", "QtTest", "QtUiTools", "QtWebKit", "QtXml", + "QtXmlPatterns", "QTypeInfo", "QUdpSocket", "QUiLoader", + "QUintForSize", "QUintForType", "QUndoCommand", "QUndoGroup", + "QUndoStack", "QUndoView", "QUnixPrintWidget", "QUpdateLaterEvent", + "QUrl", "QUrlInfo", "QUuid", "QValidator", "QVariant", + "QVariantComparisonHelper", "QVariantHash", "QVariantList", + "QVariantMap", "QVarLengthArray", "QVBoxLayout", "QVector", + "QVectorData", "QVectorIterator", "QVectorTypedData", + "QWaitCondition", "QWeakPointer", "QWebDatabase", "QWebFrame", + "QWebHistory", "QWebHistoryInterface", "QWebHistoryItem", + "QWebHitTestResult", "QWebPage", "QWebPluginFactory", + "QWebSecurityOrigin", "QWebSettings", "QWebView", "QWhatsThis", + "QWhatsThisClickedEvent", "QWheelEvent", "QWidget", "QWidgetAction", + "QWidgetData", "QWidgetItem", "QWidgetItemV2", "QWidgetList", + "QWidgetMapper", "QWidgetSet", "QWindowsCEStyle", "QWindowsMime", + "QWindowsMobileStyle", "QWindowsStyle", "QWindowStateChangeEvent", + "QWindowsVistaStyle", "QWindowsXPStyle", "QWizard", "QWizardPage", + "QWMatrix", "QWorkspace", "QWriteLocker", "QX11EmbedContainer", + "QX11EmbedWidget", "QX11Info", "QXmlAttributes", + "QXmlContentHandler", "QXmlDeclHandler", "QXmlDefaultHandler", + "QXmlDTDHandler", "QXmlEntityResolver", "QXmlErrorHandler", + "QXmlFormatter", "QXmlInputSource", "QXmlItem", + "QXmlLexicalHandler", "QXmlLocator", "QXmlName", "QXmlNamePool", + "QXmlNamespaceSupport", "QXmlNodeModelIndex", "QXmlParseException", + "QXmlQuery", "QXmlReader", "QXmlResultItems", "QXmlSerializer", + "QXmlSimpleReader", "QXmlStreamAttribute", "QXmlStreamAttributes", + "QXmlStreamEntityDeclaration", "QXmlStreamEntityDeclarations", + "QXmlStreamEntityResolver", "QXmlStreamNamespaceDeclaration", + "QXmlStreamNamespaceDeclarations", "QXmlStreamNotationDeclaration", + "QXmlStreamNotationDeclarations", "QXmlStreamReader", + "QXmlStreamStringRef", "QXmlStreamWriter" + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':', ',', ';', '|', '<', '>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight:bold;', + 2 => 'color: #0057AE;', + 3 => 'color: #2B74C7;', + 4 => 'color: #0057AE;', + 5 => 'color: #22aadd;' + ), + 'COMMENTS' => array( + 1 => 'color: #888888;', + 2 => 'color: #006E28;', + 'MULTI' => 'color: #888888; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #660099; font-weight: bold;', + 3 => 'color: #660099; font-weight: bold;', + 4 => 'color: #660099; font-weight: bold;', + 5 => 'color: #006699; font-weight: bold;', + 'HARD' => '', + ), + 'BRACKETS' => array( + 0 => 'color: #006E28;' + ), + 'STRINGS' => array( + 0 => 'color: #BF0303;' + ), + 'NUMBERS' => array( + 0 => 'color: #B08000;', + GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;', + GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', + GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', + GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI => 'color:#800080;' + ), + 'METHODS' => array( + 1 => 'color: #2B74C7;', + 2 => 'color: #2B74C7;', + 3 => 'color: #2B74C7;' + ), + 'SYMBOLS' => array( + 0 => 'color: #006E28;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => 'http://doc.trolltech.com/latest/{FNAMEL}.html' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::', + 3 => '->', + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(?|^])", + 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-])" + ), + 'OOLANG' => array( + 'MATCH_AFTER' => '~?[a-zA-Z][a-zA-Z0-9_]*', + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/cpp.php b/_piecrust/libs/Geshi/geshi/cpp.php new file mode 100644 index 0000000..48b7726 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/cpp.php @@ -0,0 +1,240 @@ + 'C++', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Multiline-continued single-line comments + 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', + //Multiline-continued preprocessor define + 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i", + //Hexadecimal Char Specs + 2 => "#\\\\x[\da-fA-F]{2}#", + //Hexadecimal Char Specs + 3 => "#\\\\u[\da-fA-F]{4}#", + //Hexadecimal Char Specs + 4 => "#\\\\U[\da-fA-F]{8}#", + //Octal Char Specs + 5 => "#\\\\[0-7]{1,3}#" + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | + GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( + 'break', 'case', 'continue', 'default', 'do', 'else', 'for', 'goto', 'if', 'return', + 'switch', 'throw', 'while' + ), + 2 => array( + 'NULL', 'false', 'true', 'enum', 'errno', 'EDOM', + 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG', + 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG', + 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP', + 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP', + 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN', + 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN', + 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT', + 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR', + 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', + 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr', + 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC', + 'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace', + 'try', 'catch', 'inline', 'dynamic_cast', 'const_cast', 'reinterpret_cast', + 'static_cast', 'explicit', 'friend', 'typename', 'typeid', 'class' + ), + 3 => array( + 'cin', 'cerr', 'clog', 'cout', 'delete', 'new', 'this', + 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert', + 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint', + 'ispunct', 'isspace', 'isupper', 'isxdigit', 'tolower', 'toupper', + 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp', + 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2', + 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', + 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen', + 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf', + 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf', + 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc', + 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind', + 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs', + 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc', + 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv', + 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat', + 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn', + 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy', + 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime', + 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime' + ), + 4 => array( + 'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint', + 'register', 'short', 'shortint', 'signed', 'static', 'struct', + 'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf', + 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t', + 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', 'wchar_t', + + 'int8', 'int16', 'int32', 'int64', + 'uint8', 'uint16', 'uint32', 'uint64', + + 'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t', + 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t', + + 'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t', + 'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t', + + 'int8_t', 'int16_t', 'int32_t', 'int64_t', + 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', + + 'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t' + ), + ), + 'SYMBOLS' => array( + 0 => array('(', ')', '{', '}', '[', ']'), + 1 => array('<', '>','='), + 2 => array('+', '-', '*', '/', '%'), + 3 => array('!', '^', '&', '|'), + 4 => array('?', ':', ';') + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff;', + 2 => 'color: #0000ff;', + 3 => 'color: #0000dd;', + 4 => 'color: #0000ff;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666;', + 2 => 'color: #339900;', + 'MULTI' => 'color: #ff0000; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #660099; font-weight: bold;', + 3 => 'color: #660099; font-weight: bold;', + 4 => 'color: #660099; font-weight: bold;', + 5 => 'color: #006699; font-weight: bold;', + 'HARD' => '', + ), + 'BRACKETS' => array( + 0 => 'color: #008000;' + ), + 'STRINGS' => array( + 0 => 'color: #FF0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000dd;', + GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;', + GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', + GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', + GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI => 'color:#800080;' + ), + 'METHODS' => array( + 1 => 'color: #007788;', + 2 => 'color: #007788;' + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;', + 1 => 'color: #000080;', + 2 => 'color: #000040;', + 3 => 'color: #000040;', + 4 => 'color: #008080;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(? "(?![a-zA-Z0-9_\|%\\-])" + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/csharp.php b/_piecrust/libs/Geshi/geshi/csharp.php new file mode 100644 index 0000000..1c7eea0 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/csharp.php @@ -0,0 +1,253 @@ + 'C#', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Using and Namespace directives (basic support) + //Please note that the alias syntax for using is not supported + 3 => '/(?:(?<=using[\\n\\s])|(?<=namespace[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*[a-zA-Z0-9_]+[\n\s]*(?=[;=])/i'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'HARDQUOTE' => array('@"', '"'), + 'HARDESCAPE' => array('"'), + 'HARDCHAR' => '"', + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'as', 'auto', 'base', 'break', 'case', 'catch', 'const', 'continue', + 'default', 'do', 'else', 'event', 'explicit', 'extern', 'false', + 'finally', 'fixed', 'for', 'foreach', 'from', 'goto', 'if', + 'implicit', 'in', 'internal', 'lock', 'namespace', 'null', + 'operator', 'out', 'override', 'params', 'partial', 'private', + 'protected', 'public', 'readonly', 'ref', 'return', 'sealed', + 'select', 'stackalloc', 'static', 'switch', 'this', 'throw', 'true', + 'try', 'unsafe', 'using', 'virtual', 'where', 'while', 'yield' + ), + 2 => array( + '#elif', '#endif', '#endregion', '#else', '#error', '#define', '#if', + '#line', '#region', '#undef', '#warning' + ), + 3 => array( + 'checked', 'is', 'new', 'sizeof', 'typeof', 'unchecked' + ), + 4 => array( + 'bool', 'byte', 'char', 'class', 'decimal', 'delegate', 'double', + 'enum', 'float', 'int', 'interface', 'long', 'object', 'sbyte', + 'short', 'string', 'struct', 'uint', 'ulong', 'ushort', 'void' + ), + 5 => array( + 'Microsoft.Win32', + 'System', + 'System.CodeDOM', + 'System.CodeDOM.Compiler', + 'System.Collections', + 'System.Collections.Bases', + 'System.ComponentModel', + 'System.ComponentModel.Design', + 'System.ComponentModel.Design.CodeModel', + 'System.Configuration', + 'System.Configuration.Assemblies', + 'System.Configuration.Core', + 'System.Configuration.Install', + 'System.Configuration.Interceptors', + 'System.Configuration.Schema', + 'System.Configuration.Web', + 'System.Core', + 'System.Data', + 'System.Data.ADO', + 'System.Data.Design', + 'System.Data.Internal', + 'System.Data.SQL', + 'System.Data.SQLTypes', + 'System.Data.XML', + 'System.Data.XML.DOM', + 'System.Data.XML.XPath', + 'System.Data.XML.XSLT', + 'System.Diagnostics', + 'System.Diagnostics.SymbolStore', + 'System.DirectoryServices', + 'System.Drawing', + 'System.Drawing.Design', + 'System.Drawing.Drawing2D', + 'System.Drawing.Imaging', + 'System.Drawing.Printing', + 'System.Drawing.Text', + 'System.Globalization', + 'System.IO', + 'System.IO.IsolatedStorage', + 'System.Messaging', + 'System.Net', + 'System.Net.Sockets', + 'System.NewXml', + 'System.NewXml.XPath', + 'System.NewXml.Xsl', + 'System.Reflection', + 'System.Reflection.Emit', + 'System.Resources', + 'System.Runtime.InteropServices', + 'System.Runtime.InteropServices.Expando', + 'System.Runtime.Remoting', + 'System.Runtime.Serialization', + 'System.Runtime.Serialization.Formatters', + 'System.Runtime.Serialization.Formatters.Binary', + 'System.Security', + 'System.Security.Cryptography', + 'System.Security.Cryptography.X509Certificates', + 'System.Security.Permissions', + 'System.Security.Policy', + 'System.Security.Principal', + 'System.ServiceProcess', + 'System.Text', + 'System.Text.RegularExpressions', + 'System.Threading', + 'System.Timers', + 'System.Web', + 'System.Web.Caching', + 'System.Web.Configuration', + 'System.Web.Security', + 'System.Web.Services', + 'System.Web.Services.Description', + 'System.Web.Services.Discovery', + 'System.Web.Services.Protocols', + 'System.Web.UI', + 'System.Web.UI.Design', + 'System.Web.UI.Design.WebControls', + 'System.Web.UI.Design.WebControls.ListControls', + 'System.Web.UI.HtmlControls', + 'System.Web.UI.WebControls', + 'System.WinForms', + 'System.WinForms.ComponentModel', + 'System.WinForms.Design', + 'System.Xml', + 'System.Xml.Serialization', + 'System.Xml.Serialization.Code', + 'System.Xml.Serialization.Schema' + ), + ), + 'SYMBOLS' => array( + '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', ':', ';', + '(', ')', '{', '}', '[', ']', '|', '.' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0600FF; font-weight: bold;', + 2 => 'color: #FF8000; font-weight: bold;', + 3 => 'color: #008000;', + 4 => 'color: #6666cc; font-weight: bold;', + 5 => 'color: #000000;' + ), + 'COMMENTS' => array( + 1 => 'color: #008080; font-style: italic;', + 2 => 'color: #008080;', + 3 => 'color: #008080;', + 'MULTI' => 'color: #008080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #008080; font-weight: bold;', + 'HARD' => 'color: #008080; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #008000;' + ), + 'STRINGS' => array( + 0 => 'color: #666666;', + 'HARD' => 'color: #666666;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;' + ), + 'METHODS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #0000FF;' + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.google.com/search?q={FNAMEL}+msdn.microsoft.com', + 4 => '', + 5 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(?|^])", + 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_%\\-])" + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/css.php b/_piecrust/libs/Geshi/geshi/css.php new file mode 100644 index 0000000..2cb3f34 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/css.php @@ -0,0 +1,212 @@ + 'CSS', + 'COMMENT_SINGLE' => array(1 => '@'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + 2 => "/(?<=\\()\\s*(?:(?:[a-z0-9]+?:\\/\\/)?[a-z0-9_\\-\\.\\/:]+?)?[a-z]+?\\.[a-z]+?(\\?[^\)]+?)?\\s*?(?=\\))/i" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', "'"), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'aqua', 'azimuth', 'background-attachment', 'background-color', + 'background-image', 'background-position', 'background-repeat', + 'background', 'black', 'blue', 'border-bottom-color', + 'border-bottom-style', 'border-bottom-width', 'border-left-color', + 'border-left-style', 'border-left-width', 'border-right', + 'border-right-color', 'border-right-style', 'border-right-width', + 'border-top-color', 'border-top-style', + 'border-top-width','border-bottom', 'border-collapse', + 'border-left', 'border-width', 'border-color', 'border-spacing', + 'border-style', 'border-top', 'border', 'caption-side', 'clear', + 'clip', 'color', 'content', 'counter-increment', 'counter-reset', + 'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display', + 'elevation', 'empty-cells', 'float', 'font-family', 'font-size', + 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', + 'font-weight', 'font', 'line-height', 'letter-spacing', + 'list-style', 'list-style-image', 'list-style-position', + 'list-style-type', 'margin-bottom', 'margin-left', 'margin-right', + 'margin-top', 'margin', 'marker-offset', 'marks', 'max-height', + 'max-width', 'min-height', 'min-width', 'orphans', 'outline', + 'outline-color', 'outline-style', 'outline-width', 'overflow', + 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', + 'padding', 'page', 'page-break-after', 'page-break-before', + 'page-break-inside', 'pause-after', 'pause-before', 'pause', + 'pitch', 'pitch-range', 'play-during', 'position', 'quotes', + 'richness', 'right', 'size', 'speak-header', 'speak-numeral', + 'speak-punctuation', 'speak', 'speech-rate', 'stress', + 'table-layout', 'text-align', 'text-decoration', 'text-indent', + 'text-shadow', 'text-transform', 'top', 'unicode-bidi', + 'vertical-align', 'visibility', 'voice-family', 'volume', + 'white-space', 'widows', 'width', 'word-spacing', 'z-index', + 'bottom', 'left', 'height' + ), + 2 => array( + 'above', 'absolute', 'always', 'armenian', 'aural', 'auto', + 'avoid', 'baseline', 'behind', 'below', 'bidi-override', 'blink', + 'block', 'bold', 'bolder', 'both', 'capitalize', 'center-left', + 'center-right', 'center', 'circle', 'cjk-ideographic', + 'close-quote', 'collapse', 'condensed', 'continuous', 'crop', + 'crosshair', 'cross', 'cursive', 'dashed', 'decimal-leading-zero', + 'decimal', 'default', 'digits', 'disc', 'dotted', 'double', + 'e-resize', 'embed', 'extra-condensed', 'extra-expanded', + 'expanded', 'fantasy', 'far-left', 'far-right', 'faster', 'fast', + 'fixed', 'fuchsia', 'georgian', 'gray', 'green', 'groove', + 'hebrew', 'help', 'hidden', 'hide', 'higher', 'high', + 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', + 'inline', 'inset', 'inside', 'invert', 'italic', 'justify', + 'katakana-iroha', 'katakana', 'landscape', 'larger', 'large', + 'left-side', 'leftwards', 'level', 'lighter', 'lime', + 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', + 'lower-roman', 'lowercase', 'ltr', 'lower', 'low', 'maroon', + 'medium', 'message-box', 'middle', 'mix', 'monospace', 'n-resize', + 'narrower', 'navy', 'ne-resize', 'no-close-quote', + 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', + 'nw-resize', 'oblique', 'olive', 'once', 'open-quote', 'outset', + 'outside', 'overline', 'pointer', 'portrait', 'purple', 'px', + 'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', + 'ridge', 'right-side', 'rightwards', 's-resize', 'sans-serif', + 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', + 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', + 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', + 'spell-out', 'square', 'static', 'status-bar', 'super', + 'sw-resize', 'table-caption', 'table-cell', 'table-column', + 'table-column-group', 'table-footer-group', 'table-header-group', + 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', + 'text-top', 'thick', 'thin', 'transparent', 'ultra-condensed', + 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', + 'upper-roman', 'uppercase', 'url', 'visible', 'w-resize', 'wait', + 'white', 'wider', 'x-fast', 'x-high', 'x-large', 'x-loud', + 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small', 'yellow', + 'yes' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', ':', ';', + '>', '+', '*', ',', '^', '=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #993333;' + ), + 'COMMENTS' => array( + 1 => 'color: #a1a100;', + 2 => 'color: #ff0000; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #00AA00;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #00AA00;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + 0 => 'color: #cc00cc;', + 1 => 'color: #6666ff;', + 2 => 'color: #3333ff;', + 3 => 'color: #933;' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + //DOM Node ID + 0 => '\#[a-zA-Z0-9\-_]+(?:\\\\:[a-zA-Z0-9\-_]+)*', + //CSS classname + 1 => '\.(?!\d)[a-zA-Z0-9\-_]+(?:\\\\:[a-zA-Z0-9\-_]+)*\b(?=[\{\.#\s,:].|<\|)', + //CSS Pseudo classes + //note: & is needed for > (i.e. > ) + 2 => '(? '[+\-]?(\d+|(\d*\.\d+))(em|ex|pt|px|cm|in|%)', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-&\.])' + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/cuesheet.php b/_piecrust/libs/Geshi/geshi/cuesheet.php new file mode 100644 index 0000000..2820b04 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/cuesheet.php @@ -0,0 +1,138 @@ + 'Cuesheet', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + //Single-Line Comments using REM command + 1 => "/(?<=\bREM\b).*?$/im", + ), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'CATALOG','CDTEXTFILE','FILE','FLAGS','INDEX','ISRC','PERFORMER', + 'POSTGAP','PREGAP','REM','SONGWRITER','TITLE','TRACK' + ), + 2 => array( + 'AIFF', 'BINARY', 'MOTOROLA', 'MP3', 'WAVE' + ), + 3 => array( + '4CH', 'DCP', 'PRE', 'SCMS' + ), + 4 => array( + 'AUDIO', 'CDG', 'MODE1/2048', 'MODE1/2336', 'MODE2/2336', + 'MODE2/2352', 'CDI/2336', 'CDI/2352' + ) + ), + 'SYMBOLS' => array( + ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #000066; font-weight: bold;', + 3 => 'color: #000066; font-weight: bold;', + 4 => 'color: #000066; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080;', + ), + 'BRACKETS' => array( + 0 => 'color: #0000ff;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #006600;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #000066;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + 1 => 'color: #000099;', + 2 => 'color: #009900;', + ) + ), + 'URLS' => array( + 1 => 'http://digitalx.org/cuesheetsyntax.php#{FNAMEL}', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 2 => '\b[A-Za-z0-9]{5}\d{7}\b', + 1 => '(?<=[\s:]|^)\d+(?=[\s:]|$)', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 2, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => '(? '(?![\w\.])', + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/d.php b/_piecrust/libs/Geshi/geshi/d.php new file mode 100644 index 0000000..af0468a --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/d.php @@ -0,0 +1,272 @@ + 'D', + 'COMMENT_SINGLE' => array(2 => '///', 1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + // doxygen comments + 3 => '#/\*\*(?![\*\/]).*\*/#sU', + // raw strings + 4 => '#r"[^"]*"#s', + // Script Style interpreter comment + 5 => "/\A#!(?=\\/).*?$/m" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', "'"), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + 1 => "#\\\\[abfnrtv\\'\"?\n\\\\]#i", + //Hexadecimal Char Specs + 2 => "#\\\\x[\da-fA-F]{2}#", + //Hexadecimal Char Specs + 3 => "#\\\\u[\da-fA-F]{4}#", + //Hexadecimal Char Specs + 4 => "#\\\\U[\da-fA-F]{8}#", + //Octal Char Specs + 5 => "#\\\\[0-7]{1,3}#", + //Named entity escapes + /*6 => "#\\\\&(?:quot|amp|lt|gt|OElig|oelig|Scaron|scaron|Yuml|circ|tilde|". + "ensp|emsp|thinsp|zwnj|zwj|lrm|rlm|ndash|mdash|lsquo|rsquo|sbquo|". + "ldquo|rdquo|bdquo|dagger|Dagger|permil|lsaquo|rsaquo|euro|nbsp|". + "iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|". + "shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|". + "sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|". + "Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|". + "Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|". + "times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|". + "aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|". + "euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|". + "otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|". + "yuml|fnof|Alpha|Beta|Gamma|Delta|Epsilon|Zeta|Eta|Theta|Iota|". + "Kappa|Lambda|Mu|Nu|Xi|Omicron|Pi|Rho|Sigma|Tau|Upsilon|Phi|Chi|". + "Psi|Omega|alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|". + "kappa|lambda|mu|nu|xi|omicron|pi|rho|sigmaf|sigma|tau|upsilon|". + "phi|chi|psi|omega|thetasym|upsih|piv|bull|hellip|prime|Prime|". + "oline|frasl|weierp|image|real|trade|alefsym|larr|uarr|rarr|darr|". + "harr|crarr|lArr|uArr|rArr|dArr|hArr|forall|part|exist|empty|". + "nabla|isin|notin|ni|prod|sum|minus|lowast|radic|prop|infin|ang|". + "and|or|cap|cup|int|there4|sim|cong|asymp|ne|equiv|le|ge|sub|sup|". + "nsub|sube|supe|oplus|otimes|perp|sdot|lceil|rceil|lfloor|rfloor|". + "lang|rang|loz|spades|clubs|hearts|diams);#",*/ + // optimized: + 6 => "#\\\\&(?:A(?:Elig|acute|circ|grave|lpha|ring|tilde|uml)|Beta|". + "C(?:cedil|hi)|D(?:agger|elta)|E(?:TH|acute|circ|grave|psilon|ta|uml)|". + "Gamma|I(?:acute|circ|grave|ota|uml)|Kappa|Lambda|Mu|N(?:tilde|u)|". + "O(?:Elig|acute|circ|grave|m(?:ega|icron)|slash|tilde|uml)|". + "P(?:hi|i|rime|si)|Rho|S(?:caron|igma)|T(?:HORN|au|heta)|". + "U(?:acute|circ|grave|psilon|uml)|Xi|Y(?:acute|uml)|Zeta|". + "a(?:acute|c(?:irc|ute)|elig|grave|l(?:efsym|pha)|mp|n[dg]|ring|". + "symp|tilde|uml)|b(?:dquo|eta|rvbar|ull)|c(?:ap|cedil|e(?:dil|nt)|". + "hi|irc|lubs|o(?:ng|py)|rarr|u(?:p|rren))|d(?:Arr|a(?:gger|rr)|". + "e(?:g|lta)|i(?:ams|vide))|e(?:acute|circ|grave|m(?:pty|sp)|nsp|". + "psilon|quiv|t[ah]|u(?:ml|ro)|xist)|f(?:nof|orall|ra(?:c(?:1[24]|34)|sl))|". + "g(?:amma|e|t)|h(?:Arr|arr|e(?:arts|llip))|i(?:acute|circ|excl|grave|mage|". + "n(?:fin|t)|ota|quest|sin|uml)|kappa|l(?:Arr|a(?:mbda|ng|quo|rr)|ceil|". + "dquo|e|floor|o(?:wast|z)|rm|s(?:aquo|quo)|t)|m(?:acr|dash|". + "i(?:cro|ddot|nus)|u)|n(?:abla|bsp|dash|e|i|ot(?:in)?|sub|tilde|u)|". + "o(?:acute|circ|elig|grave|line|m(?:ega|icron)|plus|r(?:d[fm])?|". + "slash|ti(?:lde|mes)|uml)|p(?:ar[at]|er(?:mil|p)|hi|iv?|lusmn|ound|". + "r(?:ime|o[dp])|si)|quot|r(?:Arr|a(?:dic|ng|quo|rr)|ceil|dquo|e(?:al|g)|". + "floor|ho|lm|s(?:aquo|quo))|s(?:bquo|caron|dot|ect|hy|i(?:gmaf?|m)|". + "pades|u(?:be?|m|p[123e]?)|zlig)|t(?:au|h(?:e(?:re4|ta(?:sym)?)|insp|". + "orn)|i(?:lde|mes)|rade)|u(?:Arr|a(?:cute|rr)|circ|grave|ml|". + "psi(?:h|lon)|uml)|weierp|xi|y(?:acute|en|uml)|z(?:eta|w(?:j|nj)));#", + ), + 'HARDQUOTE' => array('`', '`'), + 'HARDESCAPE' => array(), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | + GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( + 'break', 'case', 'continue', 'do', 'else', + 'for', 'foreach', 'goto', 'if', 'return', + 'switch', 'while' + ), + 2 => array( + 'alias', 'asm', 'assert', 'body', 'cast', + 'catch', 'default', 'delegate', 'delete', + 'extern', 'false', 'finally', 'function', + 'import', 'in', 'inout', 'interface', + 'invariant', 'is', 'mixin', 'module', 'new', + 'null', 'out', 'pragma', 'ref', 'super', 'this', + 'throw', 'true', 'try', 'typedef', 'typeid', + 'typeof', 'union', 'with' + ), + 3 => array( + 'ArrayBoundsError', 'AssertError', + 'ClassInfo', 'Error', 'Exception', + 'Interface', 'ModuleInfo', 'Object', + 'OutOfMemoryException', 'SwitchError', + 'TypeInfo', '_d_arrayappend', + '_d_arrayappendb', '_d_arrayappendc', + '_d_arrayappendcb', '_d_arraycast', + '_d_arraycast_frombit', '_d_arraycat', + '_d_arraycatb', '_d_arraycatn', + '_d_arraycopy', '_d_arraycopybit', + '_d_arraysetbit', '_d_arraysetbit2', + '_d_arraysetlength', '_d_arraysetlengthb', + '_d_callfinalizer', + '_d_create_exception_object', + '_d_criticalenter', '_d_criticalexit', + '_d_delarray', '_d_delclass', + '_d_delinterface', '_d_delmemory', + '_d_dynamic_cast', '_d_exception', + '_d_exception_filter', '_d_framehandler', + '_d_interface_cast', '_d_interface_vtbl', + '_d_invariant', '_d_isbaseof', + '_d_isbaseof2', '_d_local_unwind', + '_d_monitorenter', '_d_monitorexit', + '_d_monitorrelease', '_d_monitor_epilog', + '_d_monitor_handler', '_d_monitor_prolog', + '_d_new', '_d_newarrayi', '_d_newbitarray', + '_d_newclass', '_d_obj_cmp', '_d_obj_eq', + '_d_OutOfMemory', '_d_switch_dstring', + '_d_switch_string', '_d_switch_ustring', + '_d_throw', + ), + 4 => array( + 'abstract', 'align', 'auto', 'bit', 'bool', + 'byte', 'cdouble', 'cent', 'cfloat', 'char', + 'class', 'const', 'creal', 'dchar', 'debug', + 'deprecated', 'double', 'enum', 'export', + 'final', 'float', 'idouble', 'ifloat', 'int', + 'ireal', 'long', 'override', 'package', + 'private', 'protected', 'ptrdiff_t', + 'public', 'real', 'short', 'size_t', + 'static', 'struct', 'synchronized', + 'template', 'ubyte', 'ucent', 'uint', + 'ulong', 'unittest', 'ushort', 'version', + 'void', 'volatile', 'wchar' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '?', '!', ';', ':', ',', '...', '..', + '+', '-', '*', '/', '%', '&', '|', '^', '<', '>', '=', '~', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #aaaadd; font-weight: bold;', + 4 => 'color: #993333;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #009933; font-style: italic;', + 3 => 'color: #009933; font-style: italic;', + 4 => 'color: #ff0000;', + 5 => 'color: #0040ff;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #660099; font-weight: bold;', + 3 => 'color: #660099; font-weight: bold;', + 4 => 'color: #660099; font-weight: bold;', + 5 => 'color: #006699; font-weight: bold;', + 6 => 'color: #666699; font-weight: bold; font-style: italic;', + 'HARD' => '', + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;', + 'HARD' => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000dd;', + GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;', + GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', + GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', + GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI => 'color:#800080;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/dcs.php b/_piecrust/libs/Geshi/geshi/dcs.php new file mode 100644 index 0000000..05f2d31 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/dcs.php @@ -0,0 +1,182 @@ + 'DCS', + 'COMMENT_SINGLE' => array( + 1 => ';' + ), + 'COMMENT_MULTI' => array( + ), + 'COMMENT_REGEXP' => array( + // Highlight embedded C code in a separate color: + 2 => '/\bINSERT_C_CODE\b.*?\bEND_C_CODE\b/ims' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array( + '"' + ), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => '', + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( + 'abs', 'ascii_value', 'bit_value', 'blank_date', 'calc_unit_values', 'cm', + 'complete_months', 'complete_years', 'correct', 'create_input_file', 'cy', + 'date_convert', 'day', 'del_output_separator', + 'delete_existing_output_files', 'div', 'ex', 'exact_years', 'exp', + 'extract_date', 'failed_validation', 'file_number', 'first_record', + 'fract', 'fund_fac_a', 'fund_fac_b', 'fund_fac_c', 'fund_fac_d', + 'fund_fac_e', 'fund_fac_f', 'fund_fac_g', 'fund_fac_h', 'fund_fac_i', + 'fund_fac_j', 'fund_fac_k', 'fund_fac_l', 'fund_fac_m', 'fund_fac_n', + 'fund_fac_o', 'fund_fac_p', 'fund_fac_q', 'fund_fac_r', 'fund_fac_s', + 'fund_fac_t', 'fund_fac_u', 'fund_fac_v', 'fund_fac_w', 'fund_fac_x', + 'fund_fac_y', 'fund_fac_z', 'group', 'group_record', + 'input_file_date_time', 'input_file_extension', 'input_file_location', + 'input_file_name', 'int', 'invalid', 'last_record', 'leap_year', 'len', + 'ln', 'log', 'main_format_name', 'max', 'max_num_subrecords', 'message', + 'min', 'mod', 'month', 'months_add', 'months_sub', 'nearest_months', + 'nearest_years', 'next_record', 'nm', 'no_of_current_records', + 'no_of_records', 'numval', 'ny', 'output', 'output_array_as_constants', + 'output_file_path', 'output_record', 'pmdf_output', 'previous', 'rand', + 're_start', 'read_generic_table', 'read_generic_table_text', + 'read_input_footer', 'read_input_footer_text', 'read_input_header', + 'read_input_header_text', 'record_count', 'record_suppressed', 'round', + 'round_down', 'round_near', 'round_up', 'run_dcs_program', 'run_parameter', + 'run_parameter_text', 'set_main_record', 'set_num_subrecords', + 'sort_array', 'sort_current_records', 'sort_input', 'strval', 'substr', + 'summarise', 'summarise_record', 'summarise_units', + 'summarise_units_record', 'suppress_record', 'table_correct', + 'table_validate', 'terminate', 'time', 'today', 'trim', 'ubound', 'year', + 'years_add', 'years_sub' + ), + 2 => array( + 'and', 'as', 'begin', 'boolean', 'byref', 'byval', 'call', 'case', 'date', + 'default', 'do', 'else', 'elseif', 'end_c_code', 'endfor', 'endfunction', + 'endif', 'endproc', 'endswitch', 'endwhile', 'eq', + 'explicit_declarations', 'false', 'for', 'from', 'function', 'ge', 'gt', + 'if', 'insert_c_code', 'integer', 'le', 'loop', 'lt', 'ne', 'not', + 'number', 'or', 'private', 'proc', 'public', 'quitloop', 'return', + 'short', 'step', 'switch', 'text', 'then', 'to', 'true', 'while' + ), + 3 => array( + // These keywords are not highlighted by the DCS IDE but we may as well + // keep track of them anyway: + 'mp_file', 'odbc_file' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', + '=', '<', '>', + '+', '-', '*', '/', '^', + ':', ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: red;', + 2 => 'color: blue;', + 3 => 'color: black;' + ), + 'COMMENTS' => array( + 1 => 'color: black; background-color: silver;', + // Colors for highlighting embedded C code: + 2 => 'color: maroon; background-color: pink;' + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + 0 => 'color: black;' + ), + 'STRINGS' => array( + 0 => 'color: green;' + ), + 'NUMBERS' => array( + 0 => 'color: green;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: black;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ), + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/delphi.php b/_piecrust/libs/Geshi/geshi/delphi.php new file mode 100644 index 0000000..1c252e3 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/delphi.php @@ -0,0 +1,289 @@ + 'Delphi', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('(*' => '*)', '{' => '}'), + //Compiler directives + 'COMMENT_REGEXP' => array(2 => '/\\{\\$.*?}|\\(\\*\\$.*?\\*\\)/U'), + 'CASE_KEYWORDS' => 0, + 'QUOTEMARKS' => array("'"), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'Abstract', 'And', 'Array', 'As', 'Asm', 'At', 'Begin', 'Case', + 'Class', 'Const', 'Constructor', 'Contains', 'Destructor', + 'DispInterface', 'Div', 'Do', 'DownTo', 'Else', 'End', 'Except', + 'Export', 'Exports', 'External', 'File', 'Finalization', 'Finally', + 'For', 'Function', 'Goto', 'If', 'Implementation', 'In', 'Inherited', + 'Initialization', 'Inline', 'Interface', 'Is', 'Label', 'Library', + 'Mod', 'Not', 'Object', 'Of', 'On', 'Or', 'Overload', 'Override', + 'Package', 'Packed', 'Private', 'Procedure', 'Program', 'Property', + 'Protected', 'Public', 'Published', 'Raise', 'Record', 'Register', + 'Repeat', 'Requires', 'Resourcestring', 'Set', 'Shl', 'Shr', 'Then', + 'ThreadVar', 'To', 'Try', 'Type', 'Unit', 'Until', 'Uses', 'Var', + 'Virtual', 'While', 'With', 'Xor', 'assembler', 'far', + 'near', 'pascal', 'cdecl', 'safecall', 'stdcall', 'varargs' + ), + 2 => array( + 'nil', 'false', 'self', 'true', 'var', 'type', 'const' + ), + 3 => array( + 'Abs', 'AcquireExceptionObject', 'Addr', 'AnsiToUtf8', 'Append', 'ArcTan', + 'Assert', 'AssignFile', 'Assigned', 'BeginThread', 'BlockRead', + 'BlockWrite', 'Break', 'ChDir', 'Chr', 'Close', 'CloseFile', + 'CompToCurrency', 'CompToDouble', 'Concat', 'Continue', 'Copy', 'Cos', + 'Dec', 'Delete', 'Dispose', 'DoubleToComp', 'EndThread', 'EnumModules', + 'EnumResourceModules', 'Eof', 'Eoln', 'Erase', 'ExceptAddr', + 'ExceptObject', 'Exclude', 'Exit', 'Exp', 'FilePos', 'FileSize', + 'FillChar', 'Finalize', 'FindClassHInstance', 'FindHInstance', + 'FindResourceHInstance', 'Flush', 'Frac', 'FreeMem', 'Get8087CW', + 'GetDir', 'GetLastError', 'GetMem', 'GetMemoryManager', + 'GetModuleFileName', 'GetVariantManager', 'Halt', 'Hi', 'High', + 'IOResult', 'Inc', 'Include', 'Initialize', 'Insert', 'Int', + 'IsMemoryManagerSet', 'IsVariantManagerSet', 'Length', 'Ln', 'Lo', 'Low', + 'MkDir', 'Move', 'New', 'Odd', 'OleStrToStrVar', 'OleStrToString', 'Ord', + 'PUCS4Chars', 'ParamCount', 'ParamStr', 'Pi', 'Pos', 'Pred', 'Ptr', + 'Random', 'Randomize', 'Read', 'ReadLn', 'ReallocMem', + 'ReleaseExceptionObject', 'Rename', 'Reset', 'Rewrite', 'RmDir', 'Round', + 'RunError', 'Seek', 'SeekEof', 'SeekEoln', 'Set8087CW', 'SetLength', + 'SetLineBreakStyle', 'SetMemoryManager', 'SetString', 'SetTextBuf', + 'SetVariantManager', 'Sin', 'SizeOf', 'Slice', 'Sqr', 'Sqrt', 'Str', + 'StringOfChar', 'StringToOleStr', 'StringToWideChar', 'Succ', 'Swap', + 'Trunc', 'Truncate', 'TypeInfo', 'UCS4StringToWideString', 'UTF8Decode', + 'UTF8Encode', 'UnicodeToUtf8', 'UniqueString', 'UpCase', 'Utf8ToAnsi', + 'Utf8ToUnicode', 'Val', 'VarArrayRedim', 'VarClear', + 'WideCharLenToStrVar', 'WideCharLenToString', 'WideCharToStrVar', + 'WideCharToString', 'WideStringToUCS4String', 'Write', 'WriteLn', + + 'Abort', 'AddExitProc', 'AddTerminateProc', 'AdjustLineBreaks', 'AllocMem', + 'AnsiCompareFileName', 'AnsiCompareStr', 'AnsiCompareText', + 'AnsiDequotedStr', 'AnsiExtractQuotedStr', 'AnsiLastChar', + 'AnsiLowerCase', 'AnsiLowerCaseFileName', 'AnsiPos', 'AnsiQuotedStr', + 'AnsiSameStr', 'AnsiSameText', 'AnsiStrComp', 'AnsiStrIComp', + 'AnsiStrLComp', 'AnsiStrLIComp', 'AnsiStrLastChar', 'AnsiStrLower', + 'AnsiStrPos', 'AnsiStrRScan', 'AnsiStrScan', 'AnsiStrUpper', + 'AnsiUpperCase', 'AnsiUpperCaseFileName', 'AppendStr', 'AssignStr', + 'Beep', 'BoolToStr', 'ByteToCharIndex', 'ByteToCharLen', 'ByteType', + 'CallTerminateProcs', 'ChangeFileExt', 'CharLength', 'CharToByteIndex', + 'CharToByteLen', 'CompareMem', 'CompareStr', 'CompareText', 'CreateDir', + 'CreateGUID', 'CurrToStr', 'CurrToStrF', 'CurrentYear', 'Date', + 'DateTimeToFileDate', 'DateTimeToStr', 'DateTimeToString', + 'DateTimeToSystemTime', 'DateTimeToTimeStamp', 'DateToStr', 'DayOfWeek', + 'DecodeDate', 'DecodeDateFully', 'DecodeTime', 'DeleteFile', + 'DirectoryExists', 'DiskFree', 'DiskSize', 'DisposeStr', 'EncodeDate', + 'EncodeTime', 'ExceptionErrorMessage', 'ExcludeTrailingBackslash', + 'ExcludeTrailingPathDelimiter', 'ExpandFileName', 'ExpandFileNameCase', + 'ExpandUNCFileName', 'ExtractFileDir', 'ExtractFileDrive', + 'ExtractFileExt', 'ExtractFileName', 'ExtractFilePath', + 'ExtractRelativePath', 'ExtractShortPathName', 'FileAge', 'FileClose', + 'FileCreate', 'FileDateToDateTime', 'FileExists', 'FileGetAttr', + 'FileGetDate', 'FileIsReadOnly', 'FileOpen', 'FileRead', 'FileSearch', + 'FileSeek', 'FileSetAttr', 'FileSetDate', 'FileSetReadOnly', 'FileWrite', + 'FinalizePackage', 'FindClose', 'FindCmdLineSwitch', 'FindFirst', + 'FindNext', 'FloatToCurr', 'FloatToDateTime', 'FloatToDecimal', + 'FloatToStr', 'FloatToStrF', 'FloatToText', 'FloatToTextFmt', + 'FmtLoadStr', 'FmtStr', 'ForceDirectories', 'Format', 'FormatBuf', + 'FormatCurr', 'FormatDateTime', 'FormatFloat', 'FreeAndNil', + 'GUIDToString', 'GetCurrentDir', 'GetEnvironmentVariable', + 'GetFileVersion', 'GetFormatSettings', 'GetLocaleFormatSettings', + 'GetModuleName', 'GetPackageDescription', 'GetPackageInfo', 'GetTime', + 'IncAMonth', 'IncMonth', 'IncludeTrailingBackslash', + 'IncludeTrailingPathDelimiter', 'InitializePackage', 'IntToHex', + 'IntToStr', 'InterlockedDecrement', 'InterlockedExchange', + 'InterlockedExchangeAdd', 'InterlockedIncrement', 'IsDelimiter', + 'IsEqualGUID', 'IsLeapYear', 'IsPathDelimiter', 'IsValidIdent', + 'Languages', 'LastDelimiter', 'LoadPackage', 'LoadStr', 'LowerCase', + 'MSecsToTimeStamp', 'NewStr', 'NextCharIndex', 'Now', 'OutOfMemoryError', + 'QuotedStr', 'RaiseLastOSError', 'RaiseLastWin32Error', 'RemoveDir', + 'RenameFile', 'ReplaceDate', 'ReplaceTime', 'SafeLoadLibrary', + 'SameFileName', 'SameText', 'SetCurrentDir', 'ShowException', 'Sleep', + 'StrAlloc', 'StrBufSize', 'StrByteType', 'StrCat', 'StrCharLength', + 'StrComp', 'StrCopy', 'StrDispose', 'StrECopy', 'StrEnd', 'StrFmt', + 'StrIComp', 'StrLCat', 'StrLComp', 'StrLCopy', 'StrLFmt', 'StrLIComp', + 'StrLen', 'StrLower', 'StrMove', 'StrNew', 'StrNextChar', 'StrPCopy', + 'StrPLCopy', 'StrPas', 'StrPos', 'StrRScan', 'StrScan', 'StrToBool', + 'StrToBoolDef', 'StrToCurr', 'StrToCurrDef', 'StrToDate', 'StrToDateDef', + 'StrToDateTime', 'StrToDateTimeDef', 'StrToFloat', 'StrToFloatDef', + 'StrToInt', 'StrToInt64', 'StrToInt64Def', 'StrToIntDef', 'StrToTime', + 'StrToTimeDef', 'StrUpper', 'StringReplace', 'StringToGUID', 'Supports', + 'SysErrorMessage', 'SystemTimeToDateTime', 'TextToFloat', 'Time', + 'TimeStampToDateTime', 'TimeStampToMSecs', 'TimeToStr', 'Trim', + 'TrimLeft', 'TrimRight', 'TryEncodeDate', 'TryEncodeTime', + 'TryFloatToCurr', 'TryFloatToDateTime', 'TryStrToBool', 'TryStrToCurr', + 'TryStrToDate', 'TryStrToDateTime', 'TryStrToFloat', 'TryStrToInt', + 'TryStrToInt64', 'TryStrToTime', 'UnloadPackage', 'UpperCase', + 'WideCompareStr', 'WideCompareText', 'WideFmtStr', 'WideFormat', + 'WideFormatBuf', 'WideLowerCase', 'WideSameStr', 'WideSameText', + 'WideUpperCase', 'Win32Check', 'WrapText', + + 'ActivateClassGroup', 'AllocateHwnd', 'BinToHex', 'CheckSynchronize', + 'CollectionsEqual', 'CountGenerations', 'DeallocateHwnd', 'EqualRect', + 'ExtractStrings', 'FindClass', 'FindGlobalComponent', 'GetClass', + 'GroupDescendantsWith', 'HexToBin', 'IdentToInt', + 'InitInheritedComponent', 'IntToIdent', 'InvalidPoint', + 'IsUniqueGlobalComponentName', 'LineStart', 'ObjectBinaryToText', + 'ObjectResourceToText', 'ObjectTextToBinary', 'ObjectTextToResource', + 'PointsEqual', 'ReadComponentRes', 'ReadComponentResEx', + 'ReadComponentResFile', 'Rect', 'RegisterClass', 'RegisterClassAlias', + 'RegisterClasses', 'RegisterComponents', 'RegisterIntegerConsts', + 'RegisterNoIcon', 'RegisterNonActiveX', 'SmallPoint', 'StartClassGroup', + 'TestStreamFormat', 'UnregisterClass', 'UnregisterClasses', + 'UnregisterIntegerConsts', 'UnregisterModuleClasses', + 'WriteComponentResFile', + + 'ArcCos', 'ArcCosh', 'ArcCot', 'ArcCotH', 'ArcCsc', 'ArcCscH', 'ArcSec', + 'ArcSecH', 'ArcSin', 'ArcSinh', 'ArcTan2', 'ArcTanh', 'Ceil', + 'CompareValue', 'Cosecant', 'Cosh', 'Cot', 'CotH', 'Cotan', 'Csc', 'CscH', + 'CycleToDeg', 'CycleToGrad', 'CycleToRad', 'DegToCycle', 'DegToGrad', + 'DegToRad', 'DivMod', 'DoubleDecliningBalance', 'EnsureRange', 'Floor', + 'Frexp', 'FutureValue', 'GetExceptionMask', 'GetPrecisionMode', + 'GetRoundMode', 'GradToCycle', 'GradToDeg', 'GradToRad', 'Hypot', + 'InRange', 'IntPower', 'InterestPayment', 'InterestRate', + 'InternalRateOfReturn', 'IsInfinite', 'IsNan', 'IsZero', 'Ldexp', 'LnXP1', + 'Log10', 'Log2', 'LogN', 'Max', 'MaxIntValue', 'MaxValue', 'Mean', + 'MeanAndStdDev', 'Min', 'MinIntValue', 'MinValue', 'MomentSkewKurtosis', + 'NetPresentValue', 'Norm', 'NumberOfPeriods', 'Payment', 'PeriodPayment', + 'Poly', 'PopnStdDev', 'PopnVariance', 'Power', 'PresentValue', + 'RadToCycle', 'RadToDeg', 'RadToGrad', 'RandG', 'RandomRange', 'RoundTo', + 'SLNDepreciation', 'SYDDepreciation', 'SameValue', 'Sec', 'SecH', + 'Secant', 'SetExceptionMask', 'SetPrecisionMode', 'SetRoundMode', 'Sign', + 'SimpleRoundTo', 'SinCos', 'Sinh', 'StdDev', 'Sum', 'SumInt', + 'SumOfSquares', 'SumsAndSquares', 'Tan', 'Tanh', 'TotalVariance', + 'Variance' + ), + 4 => array( + 'AnsiChar', 'AnsiString', 'Bool', 'Boolean', 'Byte', 'ByteBool', 'Cardinal', 'Char', + 'Comp', 'Currency', 'DWORD', 'Double', 'Extended', 'Int64', 'Integer', 'IUnknown', + 'LongBool', 'LongInt', 'LongWord', 'PAnsiChar', 'PAnsiString', 'PBool', 'PBoolean', 'PByte', + 'PByteArray', 'PCardinal', 'PChar', 'PComp', 'PCurrency', 'PDWORD', 'PDate', 'PDateTime', + 'PDouble', 'PExtended', 'PInt64', 'PInteger', 'PLongInt', 'PLongWord', 'Pointer', 'PPointer', + 'PShortInt', 'PShortString', 'PSingle', 'PSmallInt', 'PString', 'PHandle', 'PVariant', 'PWord', + 'PWordArray', 'PWordBool', 'PWideChar', 'PWideString', 'Real', 'Real48', 'ShortInt', 'ShortString', + 'Single', 'SmallInt', 'String', 'TClass', 'TDate', 'TDateTime', 'TextFile', 'THandle', + 'TObject', 'TTime', 'Variant', 'WideChar', 'WideString', 'Word', 'WordBool' + ), + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'SYMBOLS' => array( + 0 => array('(', ')', '[', ']'), + 1 => array('.', ',', ':', ';'), + 2 => array('@', '^'), + 3 => array('=', '+', '-', '*', '/') + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;', + 4 => 'color: #000066; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #008000; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #ff0000; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000066;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000ff;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'REGEXPS' => array( + 0 => 'color: #9ac;', + 1 => 'color: #ff0000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000066;', + 1 => 'color: #000066;', + 2 => 'color: #000066;', + 3 => 'color: #000066;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + //Hex numbers + 0 => '\$[0-9a-fA-F]+', + //Characters + 1 => '\#(?:\$[0-9a-fA-F]{1,2}|\d{1,3})' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 2 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/diff.php b/_piecrust/libs/Geshi/geshi/diff.php new file mode 100644 index 0000000..bcf0c1d --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/diff.php @@ -0,0 +1,196 @@ + 'Diff', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => ' ', + 'KEYWORDS' => array( + 1 => array( + '\ No newline at end of file' + ), +// 2 => array( +// '***************' /* This only seems to works in some cases? */ +// ), + ), + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + 1 => false, +// 2 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #aaaaaa; font-style: italic;', +// 2 => 'color: #dd6611;', + ), + 'COMMENTS' => array( + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => '' + ), + 'STRINGS' => array( + 0 => '' + ), + 'NUMBERS' => array( + 0 => '' + ), + 'METHODS' => array( + 0 => '' + ), + 'SYMBOLS' => array( + 0 => '' + ), + 'SCRIPT' => array( + 0 => '' + ), + 'REGEXPS' => array( + 0 => 'color: #440088;', + 1 => 'color: #991111;', + 2 => 'color: #00b000;', + 3 => 'color: #888822;', + 4 => 'color: #888822;', + 5 => 'color: #0011dd;', + 6 => 'color: #440088;', + 7 => 'color: #991111;', + 8 => 'color: #00b000;', + 9 => 'color: #888822;', + ), + ), + 'URLS' => array( + 1 => '', +// 2 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array( + 0 => "[0-9,]+[acd][0-9,]+", + //Removed lines + 1 => array( + GESHI_SEARCH => '(^|(?<=\A\s))\\<.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + //Inserted lines + 2 => array( + GESHI_SEARCH => '(^|(?<=\A\s))\\>.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + //Location line + 3 => array( + GESHI_SEARCH => '(^|(?<=\A\s))-{3}\\s.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + //Inserted line + 4 => array( + GESHI_SEARCH => '(^|(?<=\A\s))(\\+){3}\\s.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + //Modified line + 5 => array( + GESHI_SEARCH => '(^|(?<=\A\s))\\!.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + //File specification + 6 => array( + GESHI_SEARCH => '(^|(?<=\A\s))[\\@]{2}.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + //Removed line + 7 => array( + GESHI_SEARCH => '(^|(?<=\A\s))\\-.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + //Inserted line + 8 => array( + GESHI_SEARCH => '(^|(?<=\A\s))\\+.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + //File specification + 9 => array( + GESHI_SEARCH => '(^|(?<=\A\s))(\\*){3}\\s.*$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/div.php b/_piecrust/libs/Geshi/geshi/div.php new file mode 100644 index 0000000..2bfa24d --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/div.php @@ -0,0 +1,126 @@ + 'DIV', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'while','until','to','switch','step','return','repeat','loop','if','from','frame','for','end','elseif', + 'else','default','debug','continue','clone','case','break','begin' + ), + 2 => array( + 'xor','whoami','type','sizeof','pointer','or','offset','not','neg','mod','id','dup','and','_ne','_lt', + '_le','_gt','_ge','_eq' + ), + 3 => array( + 'setup_program','program','process','private','local','import','global','function','const', + 'compiler_options' + ), + 4 => array( + 'word','struct','string','int','byte' + ), + ), + 'SYMBOLS' => array( + '(',')','[',']','=','+','-','*','/','!','%','^','&',':',';',',','<','>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0040b1;', + 2 => 'color: #000000;', + 3 => 'color: #000066; font-weight: bold;', + 4 => 'color: #993333;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => 'color: #44aa44;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #202020;', + ), + 'SYMBOLS' => array( + 0 => 'color: #44aa44;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/dos.php b/_piecrust/libs/Geshi/geshi/dos.php new file mode 100644 index 0000000..75fee1c --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/dos.php @@ -0,0 +1,227 @@ + 'DOS', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + //DOS comment lines + 'COMMENT_REGEXP' => array( + 1 => "/^\s*@?REM\b.*$/mi", + 2 => "/^\s*::.*$/m", + 3 => "/\^./" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* Flow control keywords */ + 1 => array( + 'if', 'else', 'goto', 'shift', + 'for', 'in', 'do', + 'call', 'exit' + ), + /* IF statement keywords */ + 2 => array( + 'not', 'exist', 'errorlevel', + 'defined', + 'equ', 'neq', 'lss', 'leq', 'gtr', 'geq' + ), + /* Internal commands */ + 3 => array( + 'cd', 'md', 'rd', 'chdir', 'mkdir', 'rmdir', 'dir', + 'del', 'copy', 'move', 'ren', 'rename', + 'echo', + 'setlocal', 'endlocal', 'set', + 'pause', + 'pushd', 'popd', 'title', 'verify' + ), + /* Special files */ + 4 => array( + 'prn', 'nul', 'lpt3', 'lpt2', 'lpt1', 'con', + 'com4', 'com3', 'com2', 'com1', 'aux' + ) + ), + 'SYMBOLS' => array( + '(', ')', '@', '%', '!', '|', '<', '>', '&' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00b100; font-weight: bold;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #b1b100; font-weight: bold;', + 4 => 'color: #0000ff; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #b100b1; font-style: italic;', + 3 => 'color: #33cc33;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #ff0000; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #33cc33;', + 1 => 'color: #33cc33;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + 0 => 'color: #b100b1; font-weight: bold;', + 1 => 'color: #448844;', + 2 => 'color: #448888;', + 3 => 'color: #448888;' + ) + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'URLS' => array( + 1 => 'http://www.ss64.com/nt/{FNAMEL}.html', + 2 => 'http://www.ss64.com/nt/{FNAMEL}.html', + 3 => 'http://www.ss64.com/nt/{FNAMEL}.html', + 4 => 'http://www.ss64.com/nt/{FNAMEL}.html' + ), + 'REGEXPS' => array( + /* Label */ + 0 => array( +/* GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((? '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((? '\\2', + GESHI_MODIFIERS => 'si', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + /* Variable assignement */ + 1 => array( +/* GESHI_SEARCH => '(SET[\s]+(?si:\/A[\s]+|\/P[\s]+|))([^=\s\n]+)([\s]*=)',*/ + GESHI_SEARCH => '(SET[\s]+(?si:\/A[\s]+|\/P[\s]+|))([^=\n]+)([\s]*=)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'si', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + /* Arguments or variable evaluation */ + 2 => array( +/* GESHI_SEARCH => '(%)([\d*]|[^%\s]*(?=%))((? '(%(?:%(?=[a-z0-9]))?)([\d*]|(?:~[adfnpstxz]*(?:$\w+:)?)?[a-z0-9](?!\w)|[^%\n]*(?=%))((? '\\2', + GESHI_MODIFIERS => 'si', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + /* Arguments or variable evaluation */ + 3 => array( +/* GESHI_SEARCH => '(%)([\d*]|[^%\s]*(?=%))((? '(!(?:!(?=[a-z0-9]))?)([\d*]|(?:~[adfnpstxz]*(?:$\w+:)?)?[a-z0-9](?!\w)|[^!>\n]*(?=!))((?)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'si', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'BRACKETS' => GESHI_NEVER, + 'NUMBERS' => GESHI_NEVER + ), + 'KEYWORDS' => array( + 1 => array( + 'DISALLOWED_BEFORE' => '(? array( + 'DISALLOWED_BEFORE' => '(? array( + 'DISALLOWED_BEFORE' => '(? array( + 'DISALLOWED_BEFORE' => '(? \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/dot.php b/_piecrust/libs/Geshi/geshi/dot.php new file mode 100644 index 0000000..698cf13 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/dot.php @@ -0,0 +1,164 @@ + 'dot', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'URL', 'arrowhead', 'arrowsize', 'arrowtail', 'bb', 'bgcolor', 'bottomlabel', + 'center', 'clusterrank', 'color', 'comment', 'constraint', 'decorate', + 'dir', 'distortion', 'fillcolor', 'fixedsize', 'fontcolor', + 'fontname', 'fontsize', 'group', 'headclip', 'headlabel', 'headport', + 'height', 'id', 'label', 'labelangle', 'labeldistance', 'labelfontcolor', + 'labelfontname', 'labelfontsize', 'layer', 'layers', 'margin', 'mclimit', + 'minlen', 'nodesep', 'nslimit', 'ordering', 'orientation', 'page', + 'pagedir', 'peripheries', 'port_label_distance', 'quantum', 'rank', 'rankdir', + 'ranksep', 'ratio', 'regular', 'rotate', 'samehead', 'sametail', 'searchsize', + 'shape', 'shapefile', 'showboxes', 'sides', 'size', 'skew', 'style', + 'tailclip', 'taillabel', 'tailport', 'toplabel', 'weight', 'width' + ), + 2 => array( + 'node', 'graph', 'digraph', 'strict', 'edge', 'subgraph' + ), + 3 => array( + 'Mcircle', 'Mdiamond', 'Mrecord', 'Msquare', 'auto', 'back', 'bold', + 'both', 'box', 'circle', 'compress', 'dashed', 'diamond', 'dot', + 'dotted', 'doublecircle', 'doubleoctagon', 'egg', 'ellipse', 'epsf', + 'false', 'fill', 'filled', 'forward', 'global', 'hexagon', 'house', + 'inv', 'invdot', 'invhouse', 'invis', 'invodot', 'invtrapezium', + 'invtriangle', 'local', 'max', 'min', 'none', 'normal', 'octagon', + 'odot', 'out', 'parallelogram', 'plaintext', 'polygon', 'record', + 'same', 'solid', 'trapezium', 'triangle', 'tripleoctagon', 'true' + ), + 4 => array( + 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'black', + 'blanchedalmond', 'blue', 'blueviolet', 'brown', 'burlywood', 'cadetblue', + 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', + 'cyan', 'darkgoldenrod', 'darkgreen', 'darkkhaki', 'darkolivegreen', + 'darkorange', 'darkorchid', 'darksalmon', 'darkseagreen', 'darkslateblue', + 'darkslategray', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', + 'dimgray', 'dodgerblue', 'firebrick', 'forestgreen', 'gainsboro', 'ghostwhite', + 'gold', 'goldenrod', 'gray', 'green', 'greenyellow', 'honeydew', 'hotpink', + 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', + 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcyan', 'lightgoldenrod', + 'lightgoldenrodyellow', 'lightgray', 'lightpink', 'lightsalmon', + 'lightseagreen', 'lightskyblue', 'lightslateblue', 'lightslategray', + 'lightyellow', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine', + 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', + 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', + 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'navy', + 'navyblue', 'oldlace', 'olivedrab', 'oralwhite', 'orange', 'orangered', + 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', + 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'purple', + 'red', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'salmon2', 'sandybrown', + 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'snow', + 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', + 'violetred', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen' + ) + ), + 'SYMBOLS' => array( + '[', ']', '{', '}', '-', '+', '*', '/', '<', '>', '!', '~', '%', '&', '|', '=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000066;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #993333;', + 4 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #339933;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #af624d; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'METHODS' => array( + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ), + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/e.php b/_piecrust/libs/Geshi/geshi/e.php new file mode 100644 index 0000000..fb80fca --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/e.php @@ -0,0 +1,208 @@ + 'E', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array('/**' => '*/'), // Note: This is method doc, not a general comment syntax. + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + + // FIXME: The escaping inside ` is actually doubling of any interior `, $, or @ -- backslash is NOT special + 'QUOTEMARKS' => array('\'', '"', '`'), + 'ESCAPE_CHAR' => '\\', + + 'KEYWORDS' => array( + // builtin control structures + 1 => array( + 'accum', 'break', 'try', 'continue', 'if', 'while', 'for', 'switch' + ), + + // control structures subsidiary keywords + 2 => array( + 'catch', 'else', 'finally', 'in', 'exit' + ), + + // named operators + 3 => array( + 'fn', 'via' + ), + + // variable/function/object definers + 4 => array( + 'def', 'bind', 'var' + ), + + // object definition subsidiary keywords + 5 => array( + 'extends', 'as', 'implements', 'guards', 'match', 'to', 'method' + ), + + // builtin nouns in safeEnv + 6 => array( + 'null', 'false', 'true', 'throw', '__loop', '__makeList', + '__makeMap', '__makeProtocolDesc', '__makeMessageDesc', + '__makeParamDesc', 'any', 'void', 'boolean', '__makeOrderedSpace', + 'ValueGuard', '__MatchContext', 'require', '__makeVerbFacet', 'NaN', + 'Infinity', '__identityFunc', '__makeInt', '__makeFinalSlot', + '__makeVarSlot', '__makeGuardedSlot', '__makeGuard', '__makeTwine', + '__makeSourceSpan', '__auditedBy', 'Guard', 'near', 'pbc', + 'PassByCopy', 'DeepPassByCopy', 'Data', 'Persistent', 'DeepFrozen', + 'int', 'float64', 'char', 'String', 'Twine', 'TextWriter', 'List', + 'Map', 'nullOk', 'Tuple', '__Portrayal', 'notNull', 'vow', 'rcvr', + 'SturdyRef', 'simple__quasiParser', 'twine__quasiParser', + 'rx__quasiParser', 'e__quasiParser', 'epatt__quasiParser', + 'sml__quasiParser', 'term__quasiParser', 'traceln', '__equalizer', + '__comparer', 'Ref', 'E', 'promiseAllFulfilled', 'EIO', 'help', + 'safeScope', '__eval', 'resource__uriGetter', 'type__uriGetter', + 'import__uriGetter', 'elib__uriGetter', 'elang__uriGetter', + 'opaque__uriGetter' + ), + + // builtin nouns in privilegedEnv + 7 => array( + 'file__uriGetter', 'fileURL__uriGetter', 'jar__uriGetter', + 'http__uriGetter', 'ftp__uriGetter', 'gopher__uriGetter', + 'news__uriGetter', 'cap__uriGetter', 'makeCommand', 'stdout', + 'stderr', 'stdin', 'print', 'println', 'interp', 'entropy', 'timer', + 'introducer', 'identityMgr', 'makeSturdyRef', 'timeMachine', + 'unsafe__uriGetter', 'currentVat', 'rune', 'awt__uriGetter', + 'swing__uriGetter', 'JPanel__quasiParser', 'swt__uriGetter', + 'currentDisplay', 'swtGrid__quasiParser', 'swtGrid`', + 'privilegedScope' + ), + + // reserved keywords + 8 => array( + 'abstract', 'an', 'assert', 'attribute', 'be', 'begin', 'behalf', + 'belief', 'believe', 'believes', 'case', 'class', 'const', + 'constructor', 'declare', 'default', 'define', 'defmacro', + 'delicate', 'deprecated', 'dispatch', 'do', 'encapsulate', + 'encapsulated', 'encapsulates', 'end', 'ensure', 'enum', 'eventual', + 'eventually', 'export', 'facet', 'forall', 'function', 'given', + 'hidden', 'hides', 'inline', 'is', 'know', 'knows', 'lambda', 'let', + 'methods', 'module', 'namespace', 'native', 'obeys', 'octet', + 'oneway', 'operator', 'package', 'private', 'protected', 'public', + 'raises', 'reliance', 'reliant', 'relies', 'rely', 'reveal', 'sake', + 'signed', 'static', 'struct', 'suchthat', 'supports', 'suspect', + 'suspects', 'synchronized', 'this', 'transient', 'truncatable', + 'typedef', 'unsigned', 'unum', 'uses', 'using', 'utf8', 'utf16', + 'virtual', 'volatile', 'wstring' + ) + ), + 'SYMBOLS' => array( + 1 => array( + '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', '!', '^', '&', '|', '?', ':', ';', ',' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #b1b100;', + 3 => 'color: #b1b100;', + 4 => 'color: #b1b100;', + 5 => 'color: #b1b100;', + 6 => 'color: #b1b100;', + 7 => 'color: #b1b100;', + 8 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + ), + 'METHODS' => array( + 0 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 1 => 'color: #339933;' + ), + 'REGEXPS' => array(), + 'SCRIPT' => array() + ), + 'URLS' => array( + 1 => 'http://wiki.erights.org/wiki/{FNAME}', + 2 => 'http://wiki.erights.org/wiki/{FNAME}', + 3 => 'http://wiki.erights.org/wiki/{FNAME}', + 4 => 'http://wiki.erights.org/wiki/{FNAME}', + 5 => 'http://wiki.erights.org/wiki/{FNAME}', + 6 => 'http://wiki.erights.org/wiki/{FNAME}', + 7 => 'http://wiki.erights.org/wiki/{FNAME}', + 8 => 'http://wiki.erights.org/wiki/{FNAME}' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '<-', + 3 => '::' + ), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/ecmascript.php b/_piecrust/libs/Geshi/geshi/ecmascript.php new file mode 100644 index 0000000..2d3f09f --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/ecmascript.php @@ -0,0 +1,210 @@ + 'ECMAScript', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + // Regular Expression Literals + 'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\*\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\*\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\*\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i", + //Hexadecimal Char Specs + 2 => "#\\\\x[\da-fA-F]{2}#", + //Hexadecimal Char Specs + 3 => "#\\\\u[\da-fA-F]{4}#", + //Hexadecimal Char Specs + 4 => "#\\\\U[\da-fA-F]{8}#", + //Octal Char Specs + 5 => "#\\\\[0-7]{1,3}#" + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | + GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( // Reserved literals + 'false', 'true', + 'null' + ), + 2 => array( // Main keywords + 'break', 'case', 'catch', 'continue', 'default', 'delete', 'do', 'else', + 'finally', 'for', 'function', 'if', 'in', 'instanceof', 'new', 'return', + 'switch', 'this', 'throw', 'try', 'typeof', 'var', 'void', 'while', + 'with' + ), + 3 => array( // Extra keywords or keywords reserved for future use + 'abstract', 'as', 'boolean', 'byte', 'char', 'class', 'const', 'debugger', + 'double', 'enum', 'export', 'extends', 'final', 'float', 'goto', 'implements', + 'import', 'int', 'interface', 'is', 'long', 'native', 'namespace', 'package', + 'private', 'protected', 'public', 'short', 'static', 'super', 'synchronized', 'throws', + 'transient', 'use', 'volatile' + ), + 4 => array( // Operators + 'get', 'set' + ), + 5 => array( // Built-in object classes + 'Array', 'Boolean', 'Date', 'EvalError', 'Error', 'Function', 'Math', 'Number', + 'Object', 'RangeError', 'ReferenceError', 'RegExp', 'String', 'SyntaxError', 'TypeError', 'URIError' + ), + 6 => array( // Global properties + 'Infinity', 'NaN', 'undefined' + ), + 7 => array( // Global methods + 'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', + 'eval', 'isFinite', 'isNaN', 'parseFloat', 'parseInt', + // The escape and unescape functions do not work properly for non-ASCII characters and have been deprecated. + // In JavaScript 1.5 and later, use encodeURI, decodeURI, encodeURIComponent, and decodeURIComponent. + 'escape', 'unescape' + ), + 8 => array( // Function's arguments + 'arguments' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', + '+', '-', '*', '/', '%', + '!', '.', '&', '|', '^', + '<', '>', '=', '~', + ',', ';', '?', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #009999;', + 2 => 'color: #1500C8;', + 3 => 'color: #1500C8;', + 4 => 'color: #1500C8;', + 5 => 'color: #1500C8;', + 6 => 'color: #1500C8;', + 7 => 'color: #1500C8;', + 8 => 'color: #1500C8;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #CC0000;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #3366CC;', + 1 => 'color: #3366CC;', + 2 => 'color: #3366CC;', + 3 => 'color: #3366CC;', + 4 => 'color: #3366CC;', + 5 => 'color: #3366CC;', + 'HARD' => '', + ), + 'BRACKETS' => array( + 0 => 'color: #008800;' + ), + 'STRINGS' => array( + 0 => 'color: #9900FF;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF00FF;', + GESHI_NUMBER_BIN_PREFIX_0B => 'color: #FF00FF;', + GESHI_NUMBER_OCT_PREFIX => 'color: #FF00FF;', + GESHI_NUMBER_HEX_PREFIX => 'color: #FF00FF;', + GESHI_NUMBER_FLT_SCI_SHORT => 'color: #FF00FF;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color: #FF00FF;', + GESHI_NUMBER_FLT_NONSCI_F => 'color: #FF00FF;', + GESHI_NUMBER_FLT_NONSCI => 'color: #FF00FF;' + ), + 'METHODS' => array( + 1 => 'color: #660066;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/eiffel.php b/_piecrust/libs/Geshi/geshi/eiffel.php new file mode 100644 index 0000000..57e00b9 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/eiffel.php @@ -0,0 +1,395 @@ + 'Eiffel', + 'COMMENT_SINGLE' => array(1 => '--'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '%', + 'KEYWORDS' => array( + 1 => array( + 'separate', + 'invariant', + 'inherit', + 'indexing', + 'feature', + 'expanded', + 'deferred', + 'class' + ), + 2 => array( + 'xor', + 'when', + 'variant', + 'until', + 'unique', + 'undefine', + 'then', + 'strip', + 'select', + 'retry', + 'rescue', + 'require', + 'rename', + 'reference', + 'redefine', + 'prefix', + 'or', + 'once', + 'old', + 'obsolete', + 'not', + 'loop', + 'local', + 'like', + 'is', + 'inspect', + 'infix', + 'include', + 'implies', + 'if', + 'frozen', + 'from', + 'external', + 'export', + 'ensure', + 'end', + 'elseif', + 'else', + 'do', + 'creation', + 'create', + 'check', + 'as', + 'and', + 'alias', + 'agent' + ), + 3 => array( + 'Void', + 'True', + 'Result', + 'Precursor', + 'False', + 'Current' + ), + 4 => array( + 'UNIX_SIGNALS', + 'UNIX_FILE_INFO', + 'UNBOUNDED', + 'TWO_WAY_TREE_CURSOR', + 'TWO_WAY_TREE', + 'TWO_WAY_SORTED_SET', + 'TWO_WAY_LIST', + 'TWO_WAY_CURSOR_TREE', + 'TWO_WAY_CIRCULAR', + 'TWO_WAY_CHAIN_ITERATOR', + 'TUPLE', + 'TREE', + 'TRAVERSABLE', + 'TO_SPECIAL', + 'THREAD_CONTROL', + 'THREAD_ATTRIBUTES', + 'THREAD', + 'TABLE', + 'SUBSET', + 'STRING_HANDLER', + 'STRING', + 'STREAM', + 'STORABLE', + 'STD_FILES', + 'STACK', + 'SPECIAL', + 'SORTED_TWO_WAY_LIST', + 'SORTED_STRUCT', + 'SORTED_LIST', + 'SINGLE_MATH', + 'SET', + 'SEQUENCE', + 'SEQ_STRING', + 'SEMAPHORE', + 'ROUTINE', + 'RESIZABLE', + 'RECURSIVE_TREE_CURSOR', + 'RECURSIVE_CURSOR_TREE', + 'REAL_REF', + 'REAL', + 'RAW_FILE', + 'RANDOM', + 'QUEUE', + 'PROXY', + 'PROFILING_SETTING', + 'PROCEDURE', + 'PRIORITY_QUEUE', + 'PRIMES', + 'PRECOMP', + 'POINTER_REF', + 'POINTER', + 'PLATFORM', + 'PLAIN_TEXT_FILE', + 'PATH_NAME', + 'PART_SORTED_TWO_WAY_LIST', + 'PART_SORTED_SET', + 'PART_SORTED_LIST', + 'PART_COMPARABLE', + 'OPERATING_ENVIRONMENT', + 'ONCE_CONTROL', + 'OBJECT_OWNER', + 'OBJECT_CONTROL', + 'NUMERIC', + 'NONE', + 'MUTEX', + 'MULTI_ARRAY_LIST', + 'MULTAR_LIST_CURSOR', + 'MEMORY', + 'MEM_INFO', + 'MEM_CONST', + 'MATH_CONST', + 'LIST', + 'LINKED_TREE_CURSOR', + 'LINKED_TREE', + 'LINKED_STACK', + 'LINKED_SET', + 'LINKED_QUEUE', + 'LINKED_PRIORITY_QUEUE', + 'LINKED_LIST_CURSOR', + 'LINKED_LIST', + 'LINKED_CURSOR_TREE', + 'LINKED_CIRCULAR', + 'LINKABLE', + 'LINEAR_ITERATOR', + 'LINEAR', + 'ITERATOR', + 'IO_MEDIUM', + 'INTERNAL', + 'INTEGER_REF', + 'INTEGER_INTERVAL', + 'INTEGER', + 'INFINITE', + 'INDEXABLE', + 'IDENTIFIED_CONTROLLER', + 'IDENTIFIED', + 'HIERARCHICAL', + 'HEAP_PRIORITY_QUEUE', + 'HASHABLE', + 'HASH_TABLE_CURSOR', + 'HASH_TABLE', + 'GENERAL', + 'GC_INFO', + 'FUNCTION', + 'FORMAT_INTEGER', + 'FORMAT_DOUBLE', + 'FIXED_TREE', + 'FIXED_LIST', + 'FIXED', + 'FINITE', + 'FILE_NAME', + 'FILE', + 'FIBONACCI', + 'EXECUTION_ENVIRONMENT', + 'EXCEPTIONS', + 'EXCEP_CONST', + 'DYNAMIC_TREE', + 'DYNAMIC_LIST', + 'DYNAMIC_CIRCULAR', + 'DYNAMIC_CHAIN', + 'DOUBLE_REF', + 'DOUBLE_MATH', + 'DOUBLE', + 'DISPENSER', + 'DIRECTORY_NAME', + 'DIRECTORY', + 'DECLARATOR', + 'DEBUG_OUTPUT', + 'CURSOR_TREE_ITERATOR', + 'CURSOR_TREE', + 'CURSOR_STRUCTURE', + 'CURSOR', + 'COUNTABLE_SEQUENCE', + 'COUNTABLE', + 'CONTAINER', + 'CONSOLE', + 'CONDITION_VARIABLE', + 'COMPARABLE_STRUCT', + 'COMPARABLE_SET', + 'COMPARABLE', + 'COMPACT_TREE_CURSOR', + 'COMPACT_CURSOR_TREE', + 'COLLECTION', + 'CIRCULAR_CURSOR', + 'CIRCULAR', + 'CHARACTER_REF', + 'CHARACTER', + 'CHAIN', + 'CELL', + 'BOX', + 'BOUNDED_STACK', + 'BOUNDED_QUEUE', + 'BOUNDED', + 'BOOLEAN_REF', + 'BOOLEAN', + 'BOOL_STRING', + 'BIT_REF', + 'BINARY_TREE', + 'BINARY_SEARCH_TREE_SET', + 'BINARY_SEARCH_TREE', + 'BILINEAR', + 'BI_LINKABLE', + 'BASIC_ROUTINES', + 'BAG', + 'ASCII', + 'ARRAYED_TREE', + 'ARRAYED_STACK', + 'ARRAYED_QUEUE', + 'ARRAYED_LIST_CURSOR', + 'ARRAYED_LIST', + 'ARRAYED_CIRCULAR', + 'ARRAY2', + 'ARRAY', + 'ARGUMENTS', + 'ANY', + 'ACTIVE' + ), + 5 => array( + 'yes', + 'visible', + 'trace', + 'system', + 'root', + 'profile', + 'override_cluster', + 'object', + 'no', + 'multithreaded', + 'msil_generation_type', + 'line_generation', + 'library', + 'inlining_size', + 'inlining', + 'include_path', + 'il_verifiable', + 'exclude', + 'exception_trace', + 'dynamic_runtime', + 'dotnet_naming_convention', + 'disabled_debug', + 'default', + 'debug', + 'dead_code_removal', + 'console_application', + 'cluster', + 'cls_compliant', + 'check_vape', + 'assertion', + 'array_optimization', + 'all', + 'address_expression' + ), + ), + 'SYMBOLS' => array( + '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', '|', ':', + '(', ')', '{', '}', '[', ']', '#' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => true, + 5 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0600FF; font-weight: bold;', + 2 => 'color: #0600FF; font-weight: bold;', + 3 => 'color: #800080;', + 4 => 'color: #800000', + 5 => 'color: #603000;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000; font-style: italic;', + 'MULTI' => '' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #005070; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #FF0000;' + ), + 'STRINGS' => array( + 0 => 'color: #0080A0;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;' + ), + 'METHODS' => array( + 1 => 'color: #000060;', + 2 => 'color: #000050;' + ), + 'SYMBOLS' => array( + 0 => 'color: #600000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => 'http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+{FNAMEL}&btnI=I%27m+Feeling+Lucky', + 5 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/email.php b/_piecrust/libs/Geshi/geshi/email.php new file mode 100644 index 0000000..6becb1f --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/email.php @@ -0,0 +1,210 @@ + 'eMail (mbox)', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'HTTP', 'SMTP', 'ASMTP', 'ESMTP' + ), + 2 => array( + 'Authentication-Results','Content-Description','Content-Type', + 'Content-Disposition','Content-Transfer-Encoding','Delivered-To', + 'Dkim-Signature','Domainkey-Signature','In-Reply-To','Message-Id', + 'MIME-Version','OpenPGP','Received','Received-SPF','References', + 'Resend-From','Resend-To','Return-Path','User-Agent' + ), + 3 => array( + 'Date','From','Subject','To', + ), + 4 => array( + 'by', 'for', 'from', 'id', 'with' + ) + ), + 'SYMBOLS' => array( + ':', ';', '<', '>', '[', ']' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => false, + 3 => false, + 4 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF; font-weight: bold;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #800000; font-weight: bold;', + 4 => 'font-weight: bold;', + ), + 'COMMENTS' => array( + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + 0 => 'color: #000040;', + ), + 'REGEXPS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #0000FF;', + 3 => 'color: #008000;', + 4 => 'color: #0000FF; font-weight: bold;', + 5 => 'font-weight: bold;', + 6 => 'color: #400080;' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + // Non-Standard-Header + 1 => array( + GESHI_SEARCH => "(?<=\A\x20|\n)x-[a-z0-9\-]*(?=\s*:|\s*<)", + GESHI_REPLACE => "\\0", + GESHI_MODIFIERS => "smi", + GESHI_BEFORE => "", + GESHI_AFTER => "" + ), + //Email-Adresses or Mail-IDs + 2 => array( + GESHI_SEARCH => "\b[\w\.\-]+@\w+(?:(?:\.\w+)*\.\w{2,4})?", + GESHI_REPLACE => "\\0", + GESHI_MODIFIERS => "mi", + GESHI_BEFORE => "", + GESHI_AFTER => "" + ), + //Date values in RFC format + 3 => array( + GESHI_SEARCH => "\b(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s+\d\d?\s+" . + "(?:Jan|Feb|Mar|apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+" . + "\d{4}\s+\d\d?:\d\d:\d\d\s+[+\-]\d{4}(?:\s+\(\w+\))?", + GESHI_REPLACE => "\\0", + GESHI_MODIFIERS => "mi", + GESHI_BEFORE => "", + GESHI_AFTER => "" + ), + //IP addresses + 4 => array( + GESHI_SEARCH => "(?<=\s)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?=\s)|". + "(?<=\[)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?=\])|". + "(?<==)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?=<)", + GESHI_REPLACE => "\\0", + GESHI_MODIFIERS => "i", + GESHI_BEFORE => "", + GESHI_AFTER => "" + ), + //Field-Assignments + 5 => array( + GESHI_SEARCH => "(?<=\s)[A-Z0-9\-\.]+(?==(?:$|\s$|[^\s=]))", + GESHI_REPLACE => "\\0", + GESHI_MODIFIERS => "mi", + GESHI_BEFORE => "", + GESHI_AFTER => "" + ), + //MIME type + 6 => array( + GESHI_SEARCH => "(?<=\s)(?:audio|application|image|multipart|text|". + "video|x-[a-z0-9\-]+)\/[a-z0-9][a-z0-9\-]*(?=\s|<|$)", + GESHI_REPLACE => "\\0", + GESHI_MODIFIERS => "m", + GESHI_BEFORE => "", + GESHI_AFTER => "" + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, + 'SCRIPT_DELIMITERS' => array( + 0 => "/(?P^)[A-Z][a-zA-Z0-9\-]*\s*:\s*(?:.|(?=\n\s)\n)*(?P$)/m" + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 2 => array( + 'DISALLOWED_BEFORE' => '(?<=\A\x20|\n)', + 'DISALLOWED_AFTER' => '(?=\s*:)', + ), + 3 => array( + 'DISALLOWED_BEFORE' => '(?<=\A\x20|\n)', + 'DISALLOWED_AFTER' => '(?=\s*:)', + ), + 4 => array( + 'DISALLOWED_BEFORE' => '(?<=\s)', + 'DISALLOWED_AFTER' => '(?=\s|\b)', + ) + ), + 'ENABLE_FLAGS' => array( + 'BRACKETS' => GESHI_NEVER, + 'COMMENTS' => GESHI_NEVER, + 'NUMBERS' => GESHI_NEVER + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/erlang.php b/_piecrust/libs/Geshi/geshi/erlang.php new file mode 100644 index 0000000..1d4bccf --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/erlang.php @@ -0,0 +1,441 @@ +' + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array( + 'LANG_NAME' => 'Erlang', + 'COMMENT_SINGLE' => array(1 => '%'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'HARDQUOTE' => array("'", "'"), + 'HARDESCAPE' => array("'", "\\"), + 'HARDCHAR' => "\\", + 'ESCAPE_CHAR' => '\\', + 'NUMBERS' => GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + //Control flow keywrods + 1 => array( + 'after', 'andalso', 'begin', 'case', 'catch', 'end', 'fun', 'if', + 'of', 'orelse', 'receive', 'try', 'when', 'query' + ), + //Binary operators + 2 => array( + 'and', 'band', 'bnot', 'bor', 'bsl', 'bsr', 'bxor', 'div', 'not', + 'or', 'rem', 'xor' + ), + 3 => array( + 'abs', 'alive', 'apply', 'atom_to_list', 'binary_to_list', + 'binary_to_term', 'concat_binary', 'date', 'disconnect_node', + 'element', 'erase', 'exit', 'float', 'float_to_list', 'get', + 'get_keys', 'group_leader', 'halt', 'hd', 'integer_to_list', + 'is_alive', 'length', 'link', 'list_to_atom', 'list_to_binary', + 'list_to_float', 'list_to_integer', 'list_to_pid', 'list_to_tuple', + 'load_module', 'make_ref', 'monitor_node', 'node', 'nodes', 'now', + 'open_port', 'pid_to_list', 'process_flag', 'process_info', + 'process', 'put', 'register', 'registered', 'round', 'self', + 'setelement', 'size', 'spawn', 'spawn_link', 'split_binary', + 'statistics', 'term_to_binary', 'throw', 'time', 'tl', 'trunc', + 'tuple_to_list', 'unlink', 'unregister', 'whereis' + ), + // Built-In Functions + 4 => array( + 'atom', 'binary', 'constant', 'function', 'integer', 'is_atom', + 'is_binary', 'is_constant', 'is_function', 'is_integer', 'is_list', + 'is_number', 'is_pid', 'is_reference', 'is_record', 'list', + 'number', 'pid', 'ports', 'port_close', 'port_info', 'reference' + ), + // Erlang/OTP internal modules (scary one) + 5 => array( + 'alarm_handler', 'any', 'app', 'application', 'appmon', 'appup', + 'array', 'asn1ct', 'asn1rt', 'auth', 'base64', 'beam_lib', 'c', + 'calendar', 'code', 'common_test_app', 'compile', 'config', + 'corba', 'corba_object', 'cosEventApp', 'CosEventChannelAdmin', + 'CosEventChannelAdmin_ConsumerAdmin', + 'CosEventChannelAdmin_EventChannel', + 'CosEventChannelAdmin_ProxyPullConsumer', + 'CosEventChannelAdmin_ProxyPullSupplier', + 'CosEventChannelAdmin_ProxyPushConsumer', + 'CosEventChannelAdmin_ProxyPushSupplier', + 'CosEventChannelAdmin_SupplierAdmin', 'CosEventDomainAdmin', + 'CosEventDomainAdmin_EventDomain', + 'CosEventDomainAdmin_EventDomainFactory', + 'cosEventDomainApp', 'CosFileTransfer_Directory', + 'CosFileTransfer_File', 'CosFileTransfer_FileIterator', + 'CosFileTransfer_FileTransferSession', + 'CosFileTransfer_VirtualFileSystem', + 'cosFileTransferApp', 'CosNaming', 'CosNaming_BindingIterator', + 'CosNaming_NamingContext', 'CosNaming_NamingContextExt', + 'CosNotification', 'CosNotification_AdminPropertiesAdmin', + 'CosNotification_QoSAdmin', 'cosNotificationApp', + 'CosNotifyChannelAdmin_ConsumerAdmin', + 'CosNotifyChannelAdmin_EventChannel', + 'CosNotifyChannelAdmin_EventChannelFactory', + 'CosNotifyChannelAdmin_ProxyConsumer', + 'CosNotifyChannelAdmin_ProxyPullConsumer', + 'CosNotifyChannelAdmin_ProxyPullSupplier', + 'CosNotifyChannelAdmin_ProxyPushConsumer', + 'CosNotifyChannelAdmin_ProxyPushSupplier', + 'CosNotifyChannelAdmin_ProxySupplier', + 'CosNotifyChannelAdmin_SequenceProxyPullConsumer', + 'CosNotifyChannelAdmin_SequenceProxyPullSupplier', + 'CosNotifyChannelAdmin_SequenceProxyPushConsumer', + 'CosNotifyChannelAdmin_SequenceProxyPushSupplier', + 'CosNotifyChannelAdmin_StructuredProxyPullConsumer', + 'CosNotifyChannelAdmin_StructuredProxyPullSupplier', + 'CosNotifyChannelAdmin_StructuredProxyPushConsumer', + 'CosNotifyChannelAdmin_StructuredProxyPushSupplier', + 'CosNotifyChannelAdmin_SupplierAdmin', + 'CosNotifyComm_NotifyPublish', 'CosNotifyComm_NotifySubscribe', + 'CosNotifyFilter_Filter', 'CosNotifyFilter_FilterAdmin', + 'CosNotifyFilter_FilterFactory', 'CosNotifyFilter_MappingFilter', + 'cosProperty', 'CosPropertyService_PropertiesIterator', + 'CosPropertyService_PropertyNamesIterator', + 'CosPropertyService_PropertySet', + 'CosPropertyService_PropertySetDef', + 'CosPropertyService_PropertySetDefFactory', + 'CosPropertyService_PropertySetFactory', 'cosTime', + 'CosTime_TimeService', 'CosTime_TIO', 'CosTime_UTO', + 'CosTimerEvent_TimerEventHandler', + 'CosTimerEvent_TimerEventService', 'cosTransactions', + 'CosTransactions_Control', 'CosTransactions_Coordinator', + 'CosTransactions_RecoveryCoordinator', 'CosTransactions_Resource', + 'CosTransactions_SubtransactionAwareResource', + 'CosTransactions_Terminator', 'CosTransactions_TransactionFactory', + 'cover', 'cprof', 'cpu_sup', 'crashdump', 'crypto', 'crypto_app', + 'ct', 'ct_cover', 'ct_ftp', 'ct_master', 'ct_rpc', 'ct_snmp', + 'ct_ssh', 'ct_telnet', 'dbg', 'debugger', 'dets', 'dialyzer', + 'dict', 'digraph', 'digraph_utils', 'disk_log', 'disksup', + 'docb_gen', 'docb_transform', 'docb_xml_check', 'docbuilder_app', + 'driver_entry', 'edoc', 'edoc_doclet', 'edoc_extract', + 'edoc_layout', 'edoc_lib', 'edoc_run', 'egd', 'ei', 'ei_connect', + 'epmd', 'epp', 'epp_dodger', 'eprof', 'erl', 'erl_boot_server', + 'erl_call', 'erl_comment_scan', 'erl_connect', 'erl_ddll', + 'erl_driver', 'erl_error', 'erl_eterm', 'erl_eval', + 'erl_expand_records', 'erl_format', 'erl_global', 'erl_id_trans', + 'erl_internal', 'erl_lint', 'erl_malloc', 'erl_marshal', + 'erl_parse', 'erl_pp', 'erl_prettypr', 'erl_prim_loader', + 'erl_prim_loader_stub', 'erl_recomment', 'erl_scan', + 'erl_set_memory_block', 'erl_syntax', 'erl_syntax_lib', 'erl_tar', + 'erl_tidy', 'erlang', 'erlang_mode', 'erlang_stub', 'erlc', + 'erlsrv', 'error_handler', 'error_logger', 'erts_alloc', + 'erts_alloc_config', 'escript', 'et', 'et_collector', + 'et_selector', 'et_viewer', 'etop', 'ets', 'eunit', 'file', + 'file_sorter', 'filelib', 'filename', 'fixed', 'fprof', 'ftp', + 'gb_sets', 'gb_trees', 'gen_event', 'gen_fsm', 'gen_sctp', + 'gen_server', 'gen_tcp', 'gen_udp', 'gl', 'global', 'global_group', + 'glu', 'gs', 'heart', 'http', 'httpd', 'httpd_conf', + 'httpd_socket', 'httpd_util', 'i', 'ic', 'ic_c_protocol', + 'ic_clib', 'igor', 'inet', 'inets', 'init', 'init_stub', + 'instrument', 'int', 'interceptors', 'inviso', 'inviso_as_lib', + 'inviso_lfm', 'inviso_lfm_tpfreader', 'inviso_rt', + 'inviso_rt_meta', 'io', 'io_lib', 'kernel_app', 'lib', 'lists', + 'lname', 'lname_component', 'log_mf_h', 'make', 'math', 'megaco', + 'megaco_codec_meas', 'megaco_codec_transform', + 'megaco_edist_compress', 'megaco_encoder', 'megaco_flex_scanner', + 'megaco_tcp', 'megaco_transport', 'megaco_udp', 'megaco_user', + 'memsup', 'mnesia', 'mnesia_frag_hash', 'mnesia_registry', + 'mod_alias', 'mod_auth', 'mod_esi', 'mod_security', + 'Module_Interface', 'ms_transform', 'net_adm', 'net_kernel', + 'new_ssl', 'nteventlog', 'observer_app', 'odbc', 'orber', + 'orber_acl', 'orber_diagnostics', 'orber_ifr', 'orber_tc', + 'orddict', 'ordsets', 'os', 'os_mon', 'os_mon_mib', 'os_sup', + 'otp_mib', 'overload', 'packages', 'percept', 'percept_profile', + 'pg', 'pg2', 'pman', 'pool', 'prettypr', 'proc_lib', 'proplists', + 'public_key', 'qlc', 'queue', 'random', 'rb', 're', 'regexp', + 'registry', 'rel', 'release_handler', 'reltool', 'relup', 'rpc', + 'run_erl', 'run_test', 'runtime_tools_app', 'sasl_app', 'script', + 'seq_trace', 'sets', 'shell', 'shell_default', 'slave', 'snmp', + 'snmp_app', 'snmp_community_mib', 'snmp_framework_mib', + 'snmp_generic', 'snmp_index', 'snmp_notification_mib', 'snmp_pdus', + 'snmp_standard_mib', 'snmp_target_mib', 'snmp_user_based_sm_mib', + 'snmp_view_based_acm_mib', 'snmpa', 'snmpa_conf', 'snmpa_error', + 'snmpa_error_io', 'snmpa_error_logger', 'snmpa_error_report', + 'snmpa_local_db', 'snmpa_mpd', 'snmpa_network_interface', + 'snmpa_network_interface_filter', + 'snmpa_notification_delivery_info_receiver', + 'snmpa_notification_filter', 'snmpa_supervisor', 'snmpc', 'snmpm', + 'snmpm_conf', 'snmpm_mpd', 'snmpm_network_interface', 'snmpm_user', + 'sofs', 'ssh', 'ssh_channel', 'ssh_connection', 'ssh_sftp', + 'ssh_sftpd', 'ssl', 'ssl_app', 'ssl_pkix', 'start', 'start_erl', + 'start_webtool', 'stdlib_app', 'string', 'supervisor', + 'supervisor_bridge', 'sys', 'systools', 'tags', 'test_server', + 'test_server_app', 'test_server_ctrl', 'tftp', 'timer', 'toolbar', + 'ttb', 'tv', 'unicode', 'unix_telnet', 'user', 'webtool', 'werl', + 'win32reg', 'wrap_log_reader', 'wx', 'wx_misc', 'wx_object', + 'wxAcceleratorEntry', 'wxAcceleratorTable', 'wxArtProvider', + 'wxAuiDockArt', 'wxAuiManager', 'wxAuiNotebook', 'wxAuiPaneInfo', + 'wxAuiTabArt', 'wxBitmap', 'wxBitmapButton', 'wxBitmapDataObject', + 'wxBoxSizer', 'wxBrush', 'wxBufferedDC', 'wxBufferedPaintDC', + 'wxButton', 'wxCalendarCtrl', 'wxCalendarDateAttr', + 'wxCalendarEvent', 'wxCaret', 'wxCheckBox', 'wxCheckListBox', + 'wxChildFocusEvent', 'wxChoice', 'wxClientDC', 'wxClipboard', + 'wxCloseEvent', 'wxColourData', 'wxColourDialog', + 'wxColourPickerCtrl', 'wxColourPickerEvent', 'wxComboBox', + 'wxCommandEvent', 'wxContextMenuEvent', 'wxControl', + 'wxControlWithItems', 'wxCursor', 'wxDataObject', 'wxDateEvent', + 'wxDatePickerCtrl', 'wxDC', 'wxDialog', 'wxDirDialog', + 'wxDirPickerCtrl', 'wxDisplayChangedEvent', 'wxEraseEvent', + 'wxEvent', 'wxEvtHandler', 'wxFileDataObject', 'wxFileDialog', + 'wxFileDirPickerEvent', 'wxFilePickerCtrl', 'wxFindReplaceData', + 'wxFindReplaceDialog', 'wxFlexGridSizer', 'wxFocusEvent', 'wxFont', + 'wxFontData', 'wxFontDialog', 'wxFontPickerCtrl', + 'wxFontPickerEvent', 'wxFrame', 'wxGauge', 'wxGBSizerItem', + 'wxGenericDirCtrl', 'wxGLCanvas', 'wxGraphicsBrush', + 'wxGraphicsContext', 'wxGraphicsFont', 'wxGraphicsMatrix', + 'wxGraphicsObject', 'wxGraphicsPath', 'wxGraphicsPen', + 'wxGraphicsRenderer', 'wxGrid', 'wxGridBagSizer', 'wxGridCellAttr', + 'wxGridCellEditor', 'wxGridCellRenderer', 'wxGridEvent', + 'wxGridSizer', 'wxHelpEvent', 'wxHtmlEasyPrinting', 'wxIcon', + 'wxIconBundle', 'wxIconizeEvent', 'wxIdleEvent', 'wxImage', + 'wxImageList', 'wxJoystickEvent', 'wxKeyEvent', + 'wxLayoutAlgorithm', 'wxListBox', 'wxListCtrl', 'wxListEvent', + 'wxListItem', 'wxListView', 'wxMask', 'wxMaximizeEvent', + 'wxMDIChildFrame', 'wxMDIClientWindow', 'wxMDIParentFrame', + 'wxMemoryDC', 'wxMenu', 'wxMenuBar', 'wxMenuEvent', 'wxMenuItem', + 'wxMessageDialog', 'wxMiniFrame', 'wxMirrorDC', + 'wxMouseCaptureChangedEvent', 'wxMouseEvent', 'wxMoveEvent', + 'wxMultiChoiceDialog', 'wxNavigationKeyEvent', 'wxNcPaintEvent', + 'wxNotebook', 'wxNotebookEvent', 'wxNotifyEvent', + 'wxPageSetupDialog', 'wxPageSetupDialogData', 'wxPaintDC', + 'wxPaintEvent', 'wxPalette', 'wxPaletteChangedEvent', 'wxPanel', + 'wxPasswordEntryDialog', 'wxPen', 'wxPickerBase', 'wxPostScriptDC', + 'wxPreviewCanvas', 'wxPreviewControlBar', 'wxPreviewFrame', + 'wxPrintData', 'wxPrintDialog', 'wxPrintDialogData', 'wxPrinter', + 'wxPrintout', 'wxPrintPreview', 'wxProgressDialog', + 'wxQueryNewPaletteEvent', 'wxRadioBox', 'wxRadioButton', + 'wxRegion', 'wxSashEvent', 'wxSashLayoutWindow', 'wxSashWindow', + 'wxScreenDC', 'wxScrollBar', 'wxScrolledWindow', 'wxScrollEvent', + 'wxScrollWinEvent', 'wxSetCursorEvent', 'wxShowEvent', + 'wxSingleChoiceDialog', 'wxSizeEvent', 'wxSizer', 'wxSizerFlags', + 'wxSizerItem', 'wxSlider', 'wxSpinButton', 'wxSpinCtrl', + 'wxSpinEvent', 'wxSplashScreen', 'wxSplitterEvent', + 'wxSplitterWindow', 'wxStaticBitmap', 'wxStaticBox', + 'wxStaticBoxSizer', 'wxStaticLine', 'wxStaticText', 'wxStatusBar', + 'wxStdDialogButtonSizer', 'wxStyledTextCtrl', 'wxStyledTextEvent', + 'wxSysColourChangedEvent', 'wxTextAttr', 'wxTextCtrl', + 'wxTextDataObject', 'wxTextEntryDialog', 'wxToggleButton', + 'wxToolBar', 'wxToolTip', 'wxTopLevelWindow', 'wxTreeCtrl', + 'wxTreeEvent', 'wxUpdateUIEvent', 'wxWindow', 'wxWindowCreateEvent', + 'wxWindowDC', 'wxWindowDestroyEvent', 'wxXmlResource', 'xmerl', + 'xmerl_eventp', 'xmerl_scan', 'xmerl_xpath', 'xmerl_xs', + 'xmerl_xsd', 'xref', 'yecc', 'zip', 'zlib', 'zlib_stub' + ), + // Binary modifiers + 6 => array( + 'big', 'binary', 'float', 'integer', 'little', 'signed', 'unit', 'unsigned' + ) + ), + 'SYMBOLS' => array( + 0 => array('(', ')', '[', ']', '{', '}'), + 1 => array('->', ',', ';', '.'), + 2 => array('<<', '>>'), + 3 => array('=', '||', '-', '+', '*', '/', '++', '--', '!', '<', '>', '>=', + '=<', '==', '/=', '=:=', '=/=') + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #186895;', + 2 => 'color: #014ea4;', + 3 => 'color: #fa6fff;', + 4 => 'color: #fa6fff;', + 5 => 'color: #ff4e18;', + 6 => 'color: #9d4f37;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #109ab8;' + ), + 'STRINGS' => array( + 0 => 'color: #ff7800;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff9600;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #004866;', + 1 => 'color: #6bb810;', + 2 => 'color: #ee3800;', + 3 => 'color: #014ea4;' + ), + 'REGEXPS' => array( + 0 => 'color: #6941fd;', + 1 => 'color: #d400ed;', + 2 => 'color: #5400b3;', + 3 => 'color: #ff3c00;', + 4 => 'color: #6941fd;', + 5 => 'color: #45b3e6;', + 6 => 'color: #ff9600;', + 7 => 'color: #d400ed;', + 8 => 'color: #ff9600;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => 'http://erlang.org/doc/man/{FNAME}.html', + 6 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '->', + 2 => ':' + ), + 'REGEXPS' => array( + //Macro definitions + 0 => array( + GESHI_SEARCH => '(-define\s*\()([a-zA-Z0-9_]+)(\(|,)', + GESHI_REPLACE => '\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\1', + GESHI_AFTER => '\3' + ), + // Record definitions + 1 => array( + GESHI_SEARCH => '(-record\s*\()([a-zA-Z0-9_]+)(,)', + GESHI_REPLACE => '\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\1', + GESHI_AFTER => '\3' + ), + // Precompiler directives + 2 => array( + GESHI_SEARCH => '(-)([a-z][a-zA-Z0-9_]*)(\()', + GESHI_REPLACE => '\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\1', + GESHI_AFTER => '\3' + ), + // Functions + 3 => array( + GESHI_SEARCH => '([a-z]\w*|\'\w*\')(\s*\()', + GESHI_REPLACE => '\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '\2' + ), + // Macros + 4 => array( + GESHI_SEARCH => '(\?)([a-zA-Z0-9_]+)', + GESHI_REPLACE => '\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\1', + GESHI_AFTER => '' + ), + // Variables - With hack to avoid interfering wish GeSHi internals + 5 => array( + GESHI_SEARCH => '([([{,<+*-\/=\s!]|<)(?!(?:PIPE|SEMI|DOT|NUM|REG3XP\d*)\W)([A-Z_]\w*)(?!\w)', + GESHI_REPLACE => '\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\1', + GESHI_AFTER => '' + ), + // ASCIIcodes + 6 => '(\$[a-zA-Z0-9_])', + // Records + 7 => array( + GESHI_SEARCH => '(#)([a-z][a-zA-Z0-9_]*)(\.|\{)', + GESHI_REPLACE => '\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\1', + GESHI_AFTER => '\3' + ), + // Numbers with a different radix + 8 => '(?<=>)(#[a-zA-Z0-9]*)' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array(), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 3 => array( + 'DISALLOWED_BEFORE' => '', + 'DISALLOWED_AFTER' => '(?=\s*\()' + ), + 5 => array( + 'DISALLOWED_BEFORE' => '(?<=\'|)', + 'DISALLOWED_AFTER' => '(?=(\'|):)' + ), + 6 => array( + 'DISALLOWED_BEFORE' => '(?<=\/|-)', + 'DISALLOWED_AFTER' => '' + ) + ) + ), +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/f1.php b/_piecrust/libs/Geshi/geshi/f1.php new file mode 100644 index 0000000..dd3a812 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/f1.php @@ -0,0 +1,151 @@ + 'Formula One', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('{' => '}'), + 'COMMENT_REGEXP' => array( + //Nested Comments + 2 => "/(\{(?:\{.*\}|[^\{])*\})/m" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'",'"'), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + 1 => "#\\\\[\\\\nrt\'\"?\n]#i", + //Hexadecimal Char Specs (Utf16 codes, Unicode versions only) + 2 => "#\\\\u[\da-fA-F]{4}#", + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | + GESHI_NUMBER_BIN_PREFIX_0B | + GESHI_NUMBER_OCT_PREFIX_0O | + GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( + 'pred','proc','subr','else','elsif','iff','if','then','false','true', + 'case','of','use','local','mod','end','list','file','all','one','max','min','rel', + 'external','Nil','_stdcall','_cdecl','_addressof','_pred','_file','_line' + ), + 2 => array( + 'Ascii','Bin','I','L','P','R','S','U' + ), + 3 => array( + 'Append','in','Dupl','Len','Print','_AllDifferent','_AllAscending', + '_AllDescending','_Ascending','_Descending' + ) + ), + 'SYMBOLS' => array( + 0 => array('(', ')', '[', ']'), + 1 => array('<', '>','='), + 2 => array('+', '-', '*', '/'), + 3 => array('&', '|'), + 4 => array(':', ';') + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff;', + 2 => 'color: #000080;', + 3 => 'color: #000080;', + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000; font-style: italic;', + 2 => 'color: #008000; font-style: italic;', + 'MULTI' => 'color: #008000; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #009999; font-weight: bold;', + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #800000;' + ), + 'METHODS' => array( + 1 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;', + 1 => 'color: #000000;', + 2 => 'color: #000000;', + 3 => 'color: #000000;', + 4 => 'color: #000000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.f1compiler.com/f1helponline/f1_runtime_library.html#{FNAME}' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/fo.php b/_piecrust/libs/Geshi/geshi/fo.php new file mode 100644 index 0000000..9e08b9c --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/fo.php @@ -0,0 +1,327 @@ + 'FO (abas-ERP)', + 'COMMENT_SINGLE' => array(1 => '..'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + //Control Flow + 1 => array( + /* see http://www.abas.de/sub_de/kunden/help/hd/html/9.html */ + + /* fo keywords, part 1: control flow */ + '.weiter', '.continue' + + /* this language works with goto's only*/ + ), + + //FO Keywords + 2 => array( + /* fo keywords, part 2 */ + '.fo', '.formel', '.formula', + '.zuweisen', '.assign', + '.fehler', '.error', + '.ende', '.end' + ), + + //Java Keywords + 3 => array( + /* Java keywords, part 3: primitive data types */ + '.art', '.type', + 'integer', 'real', 'bool', 'text', 'datum', 'woche', 'termin', 'zeit', + 'mehr', 'MEHR' + ), + + //Reserved words in fo literals + 4 => array( + /* other reserved words in fo literals */ + /* should be styled to look similar to numbers and Strings */ + 'false', 'null', 'true', + 'OBJEKT', + 'VORGANG', 'PROCESS', + 'OFFEN', 'OPEN', + 'ABORT', + 'AN', 'ADDEDTO', + 'AUF', 'NEW', + 'BILDSCHIRM', 'TERMINAL', + 'PC', + 'MASKE', 'SCREEN', + 'ZEILE', 'LINE' + ), + + // interpreter settings + 5 => array ( + '..!INTERPRETER', 'DEBUG' + ), + + // database commands + 6 => array ( + '.hole', '.hol', '.select', + '.lade', '.load', + '.aktion', '.action', + '.belegen', '.occupy', + '.bringe', '.rewrite', + '.dazu', '.add', + '.löschen', '.delete', + '.mache', '.make', + '.merke', '.reserve', + '.setze', '.set', + 'SPERREN', 'LOCK', + 'TEIL', 'PART', + 'KEINESPERRE', + 'AMASKE', 'ASCREEN', + 'BETRIEB', 'WORK-ORDER', + 'NUMERISCH', 'NUMERICAL', + 'VORSCHLAG', 'SUGGESTION', + 'OBLIGO', 'OUTSTANDING', + 'LISTE', 'LIST', + 'DRUCK', 'PRINT', + 'ÜBERNAHME', 'TAGEOVER', + 'ABLAGE', 'FILINGSYSTEM', + 'BDE', 'PDC', + 'BINDUNG', 'ALLOCATION', + 'BUCHUNG', 'ENTRY', + 'COLLI', 'SERIAL', + 'DATEI', 'FILE', + 'VERKAUF', 'SALES', + 'EINKAUF', 'PURCHASING', + 'EXEMPLAR', 'EXAMPLE', + 'FERTIGUNG', 'PRODUCTION', + 'FIFO', + 'GRUPPE', 'GROUP', + 'JAHR', 'YEAR', + 'JOURNAL', + 'KOPF', 'HEADER', + 'KOSTEN', + 'LIFO', + 'LMENGE', 'SQUANTITY', + 'LOHNFERTIGUNG', 'SUBCONTRACTING', + 'LPLATZ', 'LOCATION', + 'MBELEGUNG', 'MACHLOADING', + 'MONAT', 'MONTH', 'MZ', + 'NACHRICHT', 'MESSAGE', + 'PLAN', 'TARGET', + 'REGIONEN', 'REGIONS', + 'SERVICEANFRAGE', 'SERVICEREQUEST', + 'VERWENDUNG', 'APPLICATION', + 'WEITER', 'CONTINUE', + 'ABBRUCH', 'CANCEL', + 'ABLAGEKENNZEICHEN', 'FILLINGCODE', + 'ALLEIN', 'SINGLEUSER', + 'AUFZAEHLTYP', 'ENUMERATION-TYPE', + 'AUSGABE', 'OUTPUT', + 'DEZPUNKT', 'DECPOINT' + ), + + // output settings + 7 => array ( + '.absatz', '.para', + '.blocksatz', '.justified', + '.flattersatz', '.unjustified', + '.format', + '.box', + '.drucken', '.print', + '.gedruckt', '.printed', + '.länge', '.length', + '.links', '.left', + '.rechts', '.right', + '.oben', '.up', + '.unten', '.down', + '.seite', '.page', + '.tabellensatz', '.tablerecord', + '.trenner', '.separator', + 'ARCHIV' + ), + + // text commands + 8 => array ( + '.text', + '.atext', + '.println', + '.uebersetzen', '.translate' + ), + + // I/O commands + 9 => array ( + '.aus', '.ausgabe', '.output', + '.ein', '.eingabe', '.input', + '.datei', '.file', + '.lesen', '.read', + '.sortiere', '.sort', + '-ÖFFNEN', '-OPEN', + '-TEST', + '-LESEN', '-READ', + 'VON', 'FROM' + ), + + //system + 10 => array ( + '.browser', + '.kommando', '.command', + '.system', '.dde', + '.editiere', '.edit', + '.hilfe', '.help', + '.kopieren', '.copy', + '.pc.clip', + '.pc.copy', + '.pc.dll', + '.pc.exec', + '.pc.open', + 'DIAGNOSE', 'ERRORREPORT', + 'DOPPELPUNKT', 'COLON', + 'ERSETZUNG', 'REPLACEMENT', + 'WARTEN', 'PARALLEL' + ), + + //fibu/accounting specific commands + 11 => array ( + '.budget', + '.chart', + 'VKZ', + 'KONTO', 'ACCOUNT', + 'AUSZUG', 'STATEMENT', + 'WAEHRUNG', 'CURRENCY', + 'WAEHRUNGSKURS', 'EXCHANGERATE', + 'AUSWAEHR', 'FORCURR', + 'BUCHUNGSKREIS', 'SET OF BOOKS' + ), + + // efop - extended flexible surface + 12 => array ( + '.cursor', + '.farbe', '.colour', + '.fenster', '.window', + '.hinweis', '.note', + '.menue', '.menu', + '.schutz', '.protection', + '.zeigen', '.view', + '.zeile', '.line', + 'VORDERGRUND', 'FOREGROUND', + 'HINTERGRUND', 'BACKGROUND', + 'SOFORT', 'IMMEDIATELY', + 'AKTUALISIEREN', 'UPDATE', + 'FENSTERSCHLIESSEN', 'CLOSEWINDOWS' + ), + ), + 'SYMBOLS' => array( + 0 => array('(', ')', '[', ']', '{', '}', '*', '&', '%', ';', '<', '>'), + 1 => array('?', '!') + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + /* all fo keywords are case sensitive, don't have to but I like this type of coding */ + 1 => true, 2 => true, 3 => true, 4 => true, + 5 => true, 6 => true, 7 => true, 8 => true, 9 => true, + 10 => true, 11 => true, 12 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #006600; font-weight: bold;', + 4 => 'color: #006600; font-weight: bold;', + 5 => 'color: #003399; font-weight: bold;', + 6 => 'color: #003399; font-weight: bold;', + 7 => 'color: #003399; font-weight: bold;', + 8 => 'color: #003399; font-weight: bold;', + 9 => 'color: #003399; font-weight: bold;', + 10 => 'color: #003399; font-weight: bold;', + 11 => 'color: #003399; font-weight: bold;', + 12 => 'color: #003399; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + //2 => 'color: #006699;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006633;', + 2 => 'color: #006633;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;', + 1 => 'color: #000000; font-weight: bold;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + 9 => '', + 10 => '', + 11 => '', + 12 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/fortran.php b/_piecrust/libs/Geshi/geshi/fortran.php new file mode 100644 index 0000000..d8b104a --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/fortran.php @@ -0,0 +1,160 @@ +'Fortran', + 'COMMENT_SINGLE'=> array(1 =>'!',2=>'Cf2py'), + 'COMMENT_MULTI'=> array(), + //Fortran Comments + 'COMMENT_REGEXP' => array(1 => '/^C.*?$/mi'), + 'CASE_KEYWORDS'=> GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS'=> array("'",'"'), + 'ESCAPE_CHAR'=>'\\', + 'KEYWORDS'=> array( + 1 => array( + 'allocate','block','call','case','contains','continue','cycle','deallocate', + 'default','do','else','elseif','elsewhere','end','enddo','endif','endwhere', + 'entry','exit','function','go','goto','if','interface','module','nullify','only', + 'operator','procedure','program','recursive','return','select','stop', + 'subroutine','then','to','where','while', + 'access','action','advance','blank','blocksize','carriagecontrol', + 'delim','direct','eor','err','exist','file','flen','fmt','form','formatted', + 'iostat','name','named','nextrec','nml','number','opened','pad','position', + 'readwrite','recl','sequential','status','unformatted','unit' + ), + 2 => array( + '.AND.','.EQ.','.EQV.','.GE.','.GT.','.LE.','.LT.','.NE.','.NEQV.','.NOT.', + '.OR.','.TRUE.','.FALSE.' + ), + 3 => array( + 'allocatable','character','common','complex','data','dimension','double', + 'equivalence','external','implicit','in','inout','integer','intent','intrinsic', + 'kind','logical','namelist','none','optional','out','parameter','pointer', + 'private','public','real','result','save','sequence','target','type','use' + ), + 4 => array( + 'abs','achar','acos','adjustl','adjustr','aimag','aint','all','allocated', + 'anint','any','asin','atan','atan2','bit_size','break','btest','carg', + 'ceiling','char','cmplx','conjg','cos','cosh','cpu_time','count','cshift', + 'date_and_time','dble','digits','dim','dot_product','dprod dvchk', + 'eoshift','epsilon','error','exp','exponent','floor','flush','fraction', + 'getcl','huge','iachar','iand','ibclr','ibits','ibset','ichar','ieor','index', + 'int','intrup','invalop','ior','iostat_msg','ishft','ishftc','lbound', + 'len','len_trim','lge','lgt','lle','llt','log','log10','matmul','max','maxexponent', + 'maxloc','maxval','merge','min','minexponent','minloc','minval','mod','modulo', + 'mvbits','nbreak','ndperr','ndpexc','nearest','nint','not','offset','ovefl', + 'pack','precfill','precision','present','product','prompt','radix', + 'random_number','random_seed','range','repeat','reshape','rrspacing', + 'scale','scan','segment','selected_int_kind','selected_real_kind', + 'set_exponent','shape','sign','sin','sinh','size','spacing','spread','sqrt', + 'sum system','system_clock','tan','tanh','timer','tiny','transfer','transpose', + 'trim','ubound','undfl','unpack','val','verify' + ), + ), + 'SYMBOLS'=> array( + '(',')','{','}','[',']','=','+','-','*','/','!','%','^','&',':' + ), + 'CASE_SENSITIVE'=> array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES'=> array( + 'KEYWORDS'=> array( + 1 =>'color: #b1b100;', + 2 =>'color: #000000; font-weight: bold;', + 3 =>'color: #000066;', + 4 =>'color: #993333;' + ), + 'COMMENTS'=> array( + 1 =>'color: #666666; font-style: italic;', + 2 =>'color: #339933;', + 'MULTI'=>'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR'=> array( + 0 =>'color: #000099; font-weight: bold;' + ), + 'BRACKETS'=> array( + 0 =>'color: #009900;' + ), + 'STRINGS'=> array( + 0 =>'color: #ff0000;' + ), + 'NUMBERS'=> array( + 0 =>'color: #cc66cc;' + ), + 'METHODS'=> array( + 1 =>'color: #202020;', + 2 =>'color: #202020;' + ), + 'SYMBOLS'=> array( + 0 =>'color: #339933;' + ), + 'REGEXPS'=> array( + ), + 'SCRIPT'=> array( + ) + ), + 'URLS'=> array( + 1 =>'', + 2 =>'', + 3 =>'', + 4 =>'' + ), + 'OOLANG'=> true, + 'OBJECT_SPLITTERS'=> array( + 1 =>'.', + 2 =>'::' + ), + 'REGEXPS'=> array( + ), + 'STRICT_MODE_APPLIES'=> GESHI_NEVER, + 'SCRIPT_DELIMITERS'=> array( + ), + 'HIGHLIGHT_STRICT_BLOCK'=> array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/freebasic.php b/_piecrust/libs/Geshi/geshi/freebasic.php new file mode 100644 index 0000000..77f75b5 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/freebasic.php @@ -0,0 +1,141 @@ + 'FreeBasic', + 'COMMENT_SINGLE' => array(1 => "'", 2 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + "append", "as", "asc", "asin", "asm", "atan2", "atn", "beep", "bin", "binary", "bit", + "bitreset", "bitset", "bload", "bsave", "byref", "byte", "byval", "call", + "callocate", "case", "cbyte", "cdbl", "cdecl", "chain", "chdir", "chr", "cint", + "circle", "clear", "clng", "clngint", "close", "cls", "color", "command", + "common", "cons", "const", "continue", "cos", "cshort", "csign", "csng", + "csrlin", "cubyte", "cuint", "culngint", "cunsg", "curdir", "cushort", "custom", + "cvd", "cvi", "cvl", "cvlongint", "cvs", "cvshort", "data", "date", + "deallocate", "declare", "defbyte", "defdbl", "defined", "defint", "deflng", + "deflngint", "defshort", "defsng", "defstr", "defubyte", "defuint", + "defulngint", "defushort", "dim", "dir", "do", "double", "draw", "dylibload", + "dylibsymbol", "else", "elseif", "end", "enum", "environ", 'environ$', "eof", + "eqv", "erase", "err", "error", "exec", "exepath", "exit", "exp", "export", + "extern", "field", "fix", "flip", "for", "fre", "freefile", "function", "get", + "getjoystick", "getkey", "getmouse", "gosub", "goto", "hex", "hibyte", "hiword", + "if", "iif", "imagecreate", "imagedestroy", "imp", "inkey", "inp", "input", + "instr", "int", "integer", "is", "kill", "lbound", "lcase", "left", "len", + "let", "lib", "line", "lobyte", "loc", "local", "locate", "lock", "lof", "log", + "long", "longint", "loop", "loword", "lset", "ltrim", "mid", "mkd", "mkdir", + "mki", "mkl", "mklongint", "mks", "mkshort", "mod", "multikey", "mutexcreate", + "mutexdestroy", "mutexlock", "mutexunlock", "name", "next", "not", "oct", "on", + "once", "open", "option", "or", "out", "output", "overload", "paint", "palette", + "pascal", "pcopy", "peek", "peeki", "peeks", "pipe", "pmap", "point", "pointer", + "poke", "pokei", "pokes", "pos", "preserve", "preset", "print", "private", + "procptr", "pset", "ptr", "public", "put", "random", "randomize", "read", + "reallocate", "redim", "rem", "reset", "restore", "resume", + "return", "rgb", "rgba", "right", "rmdir", "rnd", "rset", "rtrim", "run", + "sadd", "screen", "screencopy", "screeninfo", "screenlock", "screenptr", + "screenres", "screenset", "screensync", "screenunlock", "seek", "statement", + "selectcase", "setdate", "setenviron", "setmouse", + "settime", "sgn", "shared", "shell", "shl", "short", "shr", "sin", "single", + "sizeof", "sleep", "space", "spc", "sqr", "static", "stdcall", "step", "stop", + "str", "string", "strptr", "sub", "swap", "system", "tab", "tan", + "then", "threadcreate", "threadwait", "time", "timer", "to", "trans", + "trim", "type", "ubound", "ubyte", "ucase", "uinteger", "ulongint", "union", + "unlock", "unsigned", "until", "ushort", "using", "va_arg", "va_first", + "va_next", "val", "val64", "valint", "varptr", "view", "viewprint", "wait", + "wend", "while", "width", "window", "windowtitle", "with", "write", "xor", + "zstring", "explicit", "escape", "true", "false" + ) + ), + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080;', + 2 => 'color: #339933;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #66cc66;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/fsharp.php b/_piecrust/libs/Geshi/geshi/fsharp.php new file mode 100644 index 0000000..afff9dc --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/fsharp.php @@ -0,0 +1,211 @@ + 'F#', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('(*' => '*)', '/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'HARDQUOTE' => array('@"', '"'), + 'HARDESCAPE' => array('"'), + 'HARDCHAR' => '"', + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + /* main F# keywords */ + /* section 3.4 */ + 1 => array( + 'abstract', 'and', 'as', 'assert', 'base', 'begin', 'class', 'default', 'delegate', 'do', 'done', + 'downcast', 'downto', 'elif', 'else', 'end', 'exception', 'extern', 'false', 'finally', 'for', + 'fun', 'function', 'if', 'in', 'inherit', 'inline', 'interface', 'internal', 'lazy', 'let', + 'match', 'member', 'module', 'mutable', 'namespace', 'new', 'not', 'null', 'of', 'open', 'or', + 'override', 'private', 'public', 'rec', 'return', 'sig', 'static', 'struct', 'then', 'to', + 'true', 'try', 'type', 'upcast', 'use', 'val', 'void', 'when', 'while', 'with', 'yield', + 'asr', 'land', 'lor', 'lsl', 'lsr', 'lxor', 'mod', + /* identifiers are reserved for future use by F# */ + 'atomic', 'break', 'checked', 'component', 'const', 'constraint', 'constructor', + 'continue', 'eager', 'fixed', 'fori', 'functor', 'global', 'include', 'method', 'mixin', + 'object', 'parallel', 'params', 'process', 'protected', 'pure', 'sealed', 'tailcall', + 'trait', 'virtual', 'volatile', + /* take monads into account */ + 'let!', 'yield!' + ), + /* define names of main libraries in F# Core, so we can link to it + * http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/namespaces.html + */ + 2 => array( + 'Array', 'Array2D', 'Array3D', 'Array4D', 'ComparisonIdentity', 'HashIdentity', 'List', + 'Map', 'Seq', 'SequenceExpressionHelpers', 'Set', 'CommonExtensions', 'Event', + 'ExtraTopLevelOperators', 'LanguagePrimitives', 'NumericLiterals', 'Operators', + 'OptimizedClosures', 'Option', 'String', 'NativePtr', 'Printf' + ), + /* 17.2 & 17.3 */ + 3 => array( + 'abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'cosh', 'exp', + 'floor', 'log', 'log10', 'pown', 'round', 'sign', 'sin', 'sinh', 'sqrt', + 'tan', 'tanh', + 'ignore', + 'fst', 'snd', + 'stdin', 'stdout', 'stderr', + 'KeyValue', + 'max', 'min' + ), + /* Pervasives Types & Overloaded Conversion Functions */ + 4 => array( + 'bool', 'byref', 'byte', 'char', 'decimal', 'double', 'exn', 'float', 'float32', + 'FuncConvert', 'ilsigptr', 'int', 'int16', 'int32', 'int64', 'int8', + 'nativeint', 'nativeptr', 'obj', 'option', 'ref', 'sbyte', 'single', 'string', 'uint16', + 'uint32', 'uint64', 'uint8', 'unativeint', 'unit', + 'enum', + 'async', 'seq', 'dict' + ), + /* 17.2 Exceptions */ + 5 => array ( + 'failwith', 'invalidArg', 'raise', 'rethrow' + ), + /* 3.3 Conditional compilation & 13.3 Compiler Directives + light / light off */ + 6 => array( + '(*IF-FSHARP', 'ENDIF-FSHARP*)', '(*F#', 'F#*)', '(*IF-OCAML', 'ENDIF-OCAML*)', + '#light', + '#if', '#else', '#endif', '#indent', '#nowarn', '#r', '#reference', + '#I', '#Include', '#load', '#time', '#help', '#q', '#quit', + ), + /* 3.11 Pre-processor Declarations / Identifier Replacements */ + 7 => array( + '__SOURCE_DIRECTORY__', '__SOURCE_FILE__', '__LINE__' + ), + /* 17.2 Object Transformation Operators */ + 8 => array( + 'box', 'hash', 'sizeof', 'typeof', 'typedefof', 'unbox' + ) + ), + /* 17.2 basic operators + the yield and yield! arrows */ + 'SYMBOLS' => array( + 1 => array('+', '-', '/', '*', '**', '%', '~-'), + 2 => array('<', '<=', '>', '<=', '=', '<>'), + 3 => array('<<<', '>>>', '^^^', '&&&', '|||', '~~~'), + 4 => array('|>', '>>', '<|', '<<'), + 5 => array('!', '->', '->>'), + 6 => array('[',']','(',')','{','}', '[|', '|]', '(|', '|)'), + 7 => array(':=', ';', ';;') + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, /* keywords */ + 2 => true, /* modules */ + 3 => true, /* pervasives functions */ + 4 => true, /* types and overloaded conversion operators */ + 5 => true, /* exceptions */ + 6 => true, /* conditional compilation & compiler Directives */ + 7 => true, /* pre-processor declarations / identifier replacements */ + 8 => true /* object transformation operators */ + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #06c; font-weight: bold;', /* nice blue */ + 2 => 'color: #06c; font-weight: bold;', /* nice blue */ + 3 => 'color: #06c; font-weight: bold;', /* nice blue */ + 4 => 'color: #06c; font-weight: bold;', /* nice blue */ + 5 => 'color: #06c; font-weight: bold;', /* nice blue */ + 6 => 'color: #06c; font-weight: bold;', /* nice blue */ + 7 => 'color: #06c; font-weight: bold;', /* nice blue */ + 8 => 'color: #06c; font-weight: bold;' /* nice blue */ + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #5d478b; font-style: italic;', /* light purple */ + 1 => 'color: #5d478b; font-style: italic;', + 2 => 'color: #5d478b; font-style: italic;' /* light purple */ + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + 0 => 'color: #6c6;' + ), + 'STRINGS' => array( + 0 => 'color: #3cb371;' /* nice green */ + ), + 'NUMBERS' => array( + 0 => 'color: #c6c;' /* pink */ + ), + 'METHODS' => array( + 1 => 'color: #060;' /* dark green */ + ), + 'REGEXPS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #a52a2a;' /* maroon */ + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + /* some of keywords are Pervasives functions (land, lxor, asr, ...) */ + 1 => '', + 2 => 'http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/namespaces.html', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(?|^])", + 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-])" + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/gambas.php b/_piecrust/libs/Geshi/geshi/gambas.php new file mode 100644 index 0000000..a4dd43f --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/gambas.php @@ -0,0 +1,214 @@ + 'GAMBAS', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + //keywords + 1 => array( + 'APPEND', 'AS', 'BREAK', 'BYREF', 'CASE', 'CATCH', 'CLASS', 'CLOSE', 'CONST', 'CONTINUE', 'COPY', + 'CREATE', 'DEBUG', 'DEC', 'DEFAULT', 'DIM', 'DO', 'EACH', 'ELSE', 'END', 'ENDIF', 'ERROR', 'EVENT', 'EXEC', + 'EXPORT', 'EXTERN', 'FALSE', 'FINALLY', 'FLUSH', 'FOR', 'FUNCTION', 'GOTO', 'IF', 'IN', 'INC', 'INHERITS', + 'INPUT', 'FROM', 'IS', 'KILL', 'LAST', 'LIBRARY', 'LIKE', 'LINE INPUT', 'LINK', 'LOCK', 'LOOP', 'ME', + 'MKDIR', 'MOVE', 'NEW', 'NEXT', 'NULL', 'OPEN', 'OPTIONAL', 'OUTPUT', 'PIPE', 'PRINT', 'PRIVATE', + 'PROCEDURE', 'PROPERTY', 'PUBLIC', 'QUIT', 'RAISE', 'RANDOMIZE', 'READ', 'REPEAT', 'RETURN', 'RMDIR', + 'SEEK', 'SELECT', 'SHELL', 'SLEEP', 'STATIC', 'STEP', 'STOP', 'SUB', 'SUPER', 'SWAP', 'THEN', 'TO', + 'TRUE', 'TRY', 'UNLOCK', 'UNTIL', 'WAIT', 'WATCH', 'WEND', 'WHILE', 'WITH', 'WRITE' + ), + //functions + 2 => array( + 'Abs', 'Access', 'Acos', 'Acosh', 'Alloc', 'Ang', 'Asc', 'ASin', 'ASinh', 'Asl', 'Asr', 'Assign', 'Atan', + 'ATan2', 'ATanh', + 'BChg', 'BClr', 'Bin', 'BSet', 'BTst', + 'CBool', 'Cbr', 'CByte', 'CDate', 'CFloat', 'Choose', 'Chr', 'CInt', 'CLong', 'Comp', 'Conv', 'Cos', + 'Cosh', 'CShort', 'CSng', 'CStr', + 'DateAdd', 'DateDiff', 'Day', 'DConv', 'Deg', 'DFree', 'Dir', + 'Eof', 'Eval', 'Exist', 'Exp', 'Exp10', 'Exp2', 'Expm', + 'Fix', 'Format', 'Frac', 'Free', + 'Hex', 'Hour', 'Hyp', + 'Iif', 'InStr', 'Int', 'IsAscii', 'IsBlank', 'IsBoolean', 'IsByte', 'IsDate', 'IsDigit', 'IsDir', + 'IsFloat', 'IsHexa', 'IsInteger', 'IsLCase', 'IsLetter', 'IsLong', 'IsNull', 'IsNumber', 'IsObject', + 'IsPunct', 'IsShort', 'IsSingle', 'IsSpace', 'IsString', 'IsUCase', 'IsVariant', + 'LCase', 'Left', 'Len', 'Lof', 'Log', 'Log10', 'Log2', 'Logp', 'Lsl', 'Lsr', 'LTrim', + 'Mag', 'Max', 'Mid', 'Min', 'Minute', 'Month', 'Now', 'Quote', + 'Rad', 'RDir', 'Realloc', 'Replace', 'Right', 'RInStr', 'Rnd', 'Rol', 'Ror', 'Round', 'RTrim', + 'Scan', 'SConv', 'Second', 'Seek', 'Sgn', 'Shl', 'Shr', 'Sin', 'Sinh', 'Space', 'Split', 'Sqr', + 'Stat', 'Str', 'StrPtr', 'Subst', + 'Tan', 'Tanh', 'Temp$', 'Time', 'Timer', 'Tr', 'Trim', 'TypeOf', + 'UCase', 'Unquote', 'Val', 'VarPtr', 'Week', 'WeekDay', 'Year' + ), + //string functions + 3 => array( + 'Bin$', 'Chr$', 'Conv$', 'DConv$', 'Format$', 'Hex$', 'LCase$', 'Left$', 'LTrim$', 'Mid$', 'Quote$', + 'Replace$', 'Right$', 'SConv$', 'Space$', 'Str$', 'String$', 'Subst$', 'Tr$', 'Trim$', 'UCase$', + 'Unquote$' + ), + //datatypes + 4 => array( + 'Boolean', 'Byte', 'Short', 'Integer', 'Long', 'Single', 'Float', 'Date', 'String', 'Variant', 'Object', + 'Pointer', 'File' + ), + //operators + 5 => array( + 'AND', 'DIV', 'MOD', 'NOT', 'OR', 'XOR' + ), + //objects/classes + 6 => array( + 'Application', 'Array', 'Byte[]', 'Collection', 'Component', 'Enum', 'Observer', 'Param', 'Process', + 'Stream', 'System', 'User', 'Chart', 'Compress', 'Crypt', 'Blob', 'Connection', 'DB', 'Database', + 'DatabaseUser', 'Field', 'Index', 'Result', 'ResultField', 'Table', 'DataBrowser', 'DataCombo', + 'DataControl', 'DataSource', 'DataView', 'Desktop', 'DesktopFile', 'Balloon', 'ColorButton', + 'ColorChooser', 'DateChooser', 'DirChooser', 'DirView', 'Expander', 'FileChooser', 'FileView', + 'FontChooser', 'InputBox', 'ListContainer', 'SidePanel', 'Stock', 'TableView', 'ToolPanel', 'ValueBox', + 'Wizard', 'Dialog', 'ToolBar', 'WorkSpace', 'DnsClient', 'SerialPort', 'ServerSocket', 'Socket', + 'UdpSocket', 'FtpClient', 'HttpClient', 'SmtpClient', 'Regexp', 'Action', 'Button', 'CheckBox', + 'ColumnView', 'ComboBox', 'Draw', 'Container', 'Control', 'Cursor', 'DrawingArea', 'Embedder', + 'Font', 'Form', 'Frame', 'GridView', 'HBox', 'HPanel', 'HSplit', 'IconView', 'Image', 'Key', 'Label', + 'Line', 'ListBox', 'ListView', 'Menu', 'Message', 'Mouse', 'MovieBox', 'Panel', 'Picture', 'PictureBox', + 'ProgressBar', 'RadioButton', 'ScrollBar', 'ScrollView', 'Separator', 'Slider', 'SpinBox', 'TabStrip', + 'TextArea', 'TextBox', 'TextLabel', 'ToggleButton', 'TrayIcon', 'TreeView', 'VBox', 'VPanel', 'VSplit', + 'Watcher', 'Window', 'Dial', 'Editor', 'LCDNumber', 'Printer', 'TextEdit', 'WebBrowser', 'GLarea', + 'Report', 'ReportCloner', 'ReportContainer', 'ReportControl', 'ReportDrawing', 'ReportField', 'ReportHBox', + 'ReportImage', 'ReportLabel', 'ReportSection', 'ReportSpecialField', 'ReportTextLabel', 'ReportVBox', + 'CDRom', 'Channel', 'Music', 'Sound', 'Settings', 'VideoDevice', 'Vb', 'CGI', 'HTML', 'Request', 'Response', + 'Session', 'XmlDocument', 'XmlNode', 'XmlReader', 'XmlReaderNodeType', 'XmlWriter', 'RpcArray', 'RpcClient', + 'RpcFunction', 'RpcServer', 'RpcStruct', 'RpcType', 'XmlRpc', 'Xslt' + ), + //constants + 7 => array( + 'Pi' + ), + ), + 'SYMBOLS' => array( + '&', '&=', '&/', '*', '*=', '+', '+=', '-', '-=', '//', '/', '/=', '=', '==', '\\', '\\=', + '^', '^=', '[', ']', '{', '}', '<', '>', '<>', '<=', '>=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0600FF; font-weight: bold;', // Keywords + 2 => 'color: #8B1433;', // Functions + 3 => 'color: #8B1433;', // String Functions + 4 => 'color: #0600FF;', // Data Types + 5 => 'color: #1E90FF;', // Operators + 6 => 'color: #0600FF;', // Objects/Components + 7 => 'color: #0600FF;' // Constants + ), + 'COMMENTS' => array( + 1 => 'color: #1A5B1A; font-style: italic;', + 'MULTI' => 'color: #1A5B1A; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #008080;' + ), + 'BRACKETS' => array( + 0 => 'color: #612188;' + ), + 'STRINGS' => array( + 0 => 'color: #7E4B05;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;', + GESHI_NUMBER_INT_BASIC => 'color: #FF0000;' + ), + 'METHODS' => array( + 1 => 'color: #0000FF;' + ), + 'SYMBOLS' => array( + 0 => 'color: #6132B2;' + ), + 'REGEXPS' => array( + //3 => 'color: #8B1433;' //fakes '$' colour matched by REGEXP + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => 'http://gambasdoc.org/help/lang/{FNAMEL}', + 2 => 'http://gambasdoc.org/help/lang/{FNAMEL}', + 3 => 'http://www.google.com/search?hl=en&q={FNAMEL}+site:http://gambasdoc.org/help/lang/&btnI=I%27m%20Feeling%20Lucky', + 4 => 'http://gambasdoc.org/help/lang/type/{FNAMEL}', + 5 => 'http://gambasdoc.org/help/lang/{FNAMEL}', + 6 => 'http://www.google.com/search?hl=en&q={FNAMEL}+site:http://gambasdoc.org/&btnI=I%27m%20Feeling%20Lucky', + 7 => 'http://gambasdoc.org/help/lang/{FNAMEL}' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 =>'.' + ), + 'REGEXPS' => array( + //3 => "\\$(?!\\w)" //matches '$' at the end of Keyword + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 2 => array( + 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_\|%\\-&;\$])" + ) + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/gdb.php b/_piecrust/libs/Geshi/geshi/gdb.php new file mode 100644 index 0000000..be94fa8 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/gdb.php @@ -0,0 +1,175 @@ + 'GDB', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 0 => array( + 'Application', + 'signal', + ), + 1 => array( + 'Segmentation fault', + '[KCrash Handler]', + ), + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC, + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + 0 => true, + 1 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 0 => 'font-weight:bold;', + 1 => 'font-weight:bold; color: #ff0000;' + ), + 'COMMENTS' => array( + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => 'font-weight:bold;' + ), + 'STRINGS' => array( + 0 => 'color: #933;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + ), + 'REGEXPS' => array( + 0 => 'color: #000066; font-weight:bold;', + 1 => 'color: #006600;', + 2 => 'color: #000066;', + 3 => 'color: #0066FF; text-style:italic;', + 4 => 'color: #80B5FF; text-style:italic;', + 5 => 'color: #A3007D;', + 6 => 'color: #FF00BF;', + 7 => 'font-weight: bold;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 0 => '', + 1 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + //[Current Thread...], [KCrash Handler] etc. + 0 => array( + GESHI_SEARCH => '^\[.+\]', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + //stack number + 1 => array( + GESHI_SEARCH => '^#\d+', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + //Thread X (Thread...) + 2 => array( + GESHI_SEARCH => '^Thread \d.+$', + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + //Files with linenumbers + 3 => array( + GESHI_SEARCH => '(at )(.+)(:\d+\s*)$', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + //Libs without linenumbers + 4 => array( + GESHI_SEARCH => '(from )(.+)(\s*)$', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + //Hex mem address + 5 => '0x[a-f0-9]+', + //Line numbers + 6 => array( + GESHI_SEARCH => '(:)(\d+)(\s*)$', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + //Location + 7 => array( + GESHI_SEARCH => '( in )([^ \(\)]+)( \()', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/genero.php b/_piecrust/libs/Geshi/geshi/genero.php new file mode 100644 index 0000000..5f752b8 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/genero.php @@ -0,0 +1,463 @@ + 'genero', + 'COMMENT_SINGLE' => array(1 => '--', 2 => '#'), + 'COMMENT_MULTI' => array('{' => '}'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + "ABSOLUTE", + "ACCEPT", + "ACTION", + "ADD", + "AFTER", + "ALL", + "ALTER", + "AND", + "ANY", + "APPEND", + "APPLICATION", + "AS", + "AT", + "ATTRIBUTE", + "ATTRIBUTES", + "AUDIT", + "AVG", + "BEFORE", + "BEGIN", + "BETWEEN", + "BORDER", + "BOTTOM", + "BREAKPOINT", + "BUFFER", + "BUFFERED", + "BY", + "CALL", + "CANCEL", + "CASE", + "CENTURY", + "CHANGE", + "CHECK", + "CLEAR", + "CLIPPED", + "CLOSE", + "CLUSTER", + "COLUMN", + "COLUMNS", + "COMMAND", + "COMMENT", + "COMMIT", + "COMMITTED", + "CONCURRENT ", + "CONNECT", + "CONNECTION", + "CONSTANT", + "CONSTRAINED", + "CONSTRAINT", + "CONSTRUCT", + "CONTINUE", + "CONTROL", + "COUNT", + "CREATE", + "CROSS", + "CURRENT", + "DATABASE", + "DBA", + "DEC", + "DECLARE", + "DEFAULT", + "DEFAULTS", + "DEFER", + "DEFINE", + "DELETE", + "DELIMITER", + "DESCRIBE", + "DESTINATION", + "DIM", + "DIALOG", + "DIMENSION", + "DIRTY", + "DISCONNECT", + "DISPLAY", + "DISTINCT", + "DORMANT", + "DOWN", + "DROP", + "DYNAMIC", + "ELSE", + "END", + "ERROR", + "ESCAPE", + "EVERY", + "EXCLUSIVE", + "EXECUTE", + "EXISTS", + "EXIT", + "EXPLAIN", + "EXTEND", + "EXTENT", + "EXTERNAL", + "FETCH", + "FGL_DRAWBOX", + "FIELD", + "FIELD_TOUCHED", + "FILE", + "FILL", + "FINISH", + "FIRST", + "FLOAT", + "FLUSH", + "FOR", + "FOREACH", + "FORM", + "FORMAT", + "FOUND", + "FRACTION", + "FREE", + "FROM", + "FULL", + "FUNCTION", + "GET_FLDBUF", + "GLOBALS", + "GO", + "GOTO", + "GRANT", + "GROUP", + "HAVING", + "HEADER", + "HELP", + "HIDE", + "HOLD", + "HOUR", + "IDLE", + "IF", + "IMAGE", + "IMMEDIATE", + "IN", + "INDEX", + "INFIELD", + "INITIALIZE", + "INNER", + "INPUT", + "INSERT", + "INTERRUPT", + "INTERVAL", + "INTO", + "INVISIBLE", + "IS", + "ISOLATION", + "JOIN", + "KEEP", + "KEY", + "LABEL", + "LAST", + "LEFT", + "LENGTH", + "LET", + "LIKE", + "LINE", + "LINENO", + "LINES", + "LOAD", + "LOCATE", + "LOCK", + "LOG", + "LSTR", + "MAIN", + "MARGIN", + "MATCHES", + "MAX", + "MAXCOUNT", + "MDY", + "MEMORY", + "MENU", + "MESSAGE", + "MIN", + "MINUTE", + "MOD", + "MODE", + "MODIFY", + "MONEY", + "NAME", + "NEED", + "NEXT", + "NO", + "NORMAL", + "NOT", + "NOTFOUND", + "NULL", + "NUMERIC", + "OF", + "ON", + "OPEN", + "OPTION", + "OPTIONS", + "OR", + "ORDER", + "OTHERWISE", + "OUTER", + "OUTPUT", + "PAGE", + "PAGENO", + "PAUSE", + "PERCENT", + "PICTURE", + "PIPE", + "PRECISION", + "PREPARE", + "PREVIOUS", + "PRINT", + "PRINTER", + "PRINTX", + "PRIOR", + "PRIVILEGES", + "PROCEDURE", + "PROGRAM", + "PROMPT", + "PUBLIC", + "PUT", + "QUIT", + "READ", + "REAL", + "RECORD", + "RECOVER", + "RED ", + "RELATIVE", + "RENAME", + "REOPTIMIZATION", + "REPEATABLE", + "REPORT", + "RESOURCE", + "RETURN", + "RETURNING", + "REVERSE", + "REVOKE", + "RIGHT", + "ROLLBACK", + "ROLLFORWARD", + "ROW", + "ROWS", + "RUN", + "SCHEMA", + "SCREEN", + "SCROLL", + "SECOND", + "SELECT", + "SERIAL", + "SET", + "SFMT", + "SHARE", + "SHIFT", + "SHOW", + "SIGNAL ", + "SIZE", + "SKIP", + "SLEEP", + "SOME", + "SPACE", + "SPACES", + "SQL", + "SQLERRMESSAGE", + "SQLERROR", + "SQLSTATE", + "STABILITY", + "START", + "STATISTICS", + "STEP", + "STOP", + "STYLE", + "SUM", + "SYNONYM", + "TABLE", + "TEMP", + "TERMINATE", + "TEXT", + "THEN", + "THROUGH", + "THRU", + "TO", + "TODAY", + "TOP", + "TRAILER", + "TRANSACTION ", + "UNBUFFERED", + "UNCONSTRAINED", + "UNDERLINE", + "UNION", + "UNIQUE", + "UNITS", + "UNLOAD", + "UNLOCK", + "UP", + "UPDATE", + "USE", + "USER", + "USING", + "VALIDATE", + "VALUE", + "VALUES", + "VARCHAR", + "VIEW", + "WAIT", + "WAITING", + "WARNING", + "WHEN", + "WHENEVER", + "WHERE", + "WHILE", + "WINDOW", + "WITH", + "WITHOUT", + "WORDWRAP", + "WORK", + "WRAP" + ), + 2 => array( + '&IFDEF', '&ENDIF' + ), + 3 => array( + "ARRAY", + "BYTE", + "CHAR", + "CHARACTER", + "CURSOR", + "DATE", + "DATETIME", + "DECIMAL", + "DOUBLE", + "FALSE", + "INT", + "INTEGER", + "SMALLFLOAT", + "SMALLINT", + "STRING", + "TIME", + "TRUE" + ), + 4 => array( + "BLACK", + "BLINK", + "BLUE", + "BOLD", + "ANSI", + "ASC", + "ASCENDING", + "ASCII", + "CYAN", + "DESC", + "DESCENDING", + "GREEN", + "MAGENTA", + "OFF", + "WHITE", + "YELLOW", + "YEAR", + "DAY", + "MONTH", + "WEEKDAY" + ), + ), + 'SYMBOLS' => array( + '+', '-', '*', '?', '=', '/', '%', '>', '<', '^', '!', '|', ':', + '(', ')', '[', ']' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0600FF;', + 2 => 'color: #0000FF; font-weight: bold;', + 3 => 'color: #008000;', + 4 => 'color: #FF0000;', + ), + 'COMMENTS' => array( + 1 => 'color: #008080; font-style: italic;', + 2 => 'color: #008080;', + 'MULTI' => 'color: #008080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #008080; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #808080;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;' + ), + 'METHODS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #0000FF;' + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/genie.php b/_piecrust/libs/Geshi/geshi/genie.php new file mode 100644 index 0000000..3c354ad --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/genie.php @@ -0,0 +1,157 @@ + 'Genie', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Using and Namespace directives (basic support) + //Please note that the alias syntax for using is not supported + 3 => '/(?:(?<=using[\\n\\s])|(?<=namespace[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*[a-zA-Z0-9_]+[\n\s]*(?=[;=])/i'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'HARDQUOTE' => array('@"', '"'), + 'HARDESCAPE' => array('""'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'and', 'as', 'abstract', 'break', 'case', 'cast', 'catch', 'const', + 'construct', 'continue', 'default', 'def', 'delete', 'div', + 'dynamic', 'do', 'downto', 'else', 'ensures', 'except', 'extern', + 'false', 'final', 'finally', 'for', 'foreach', 'get', 'if', 'in', + 'init', 'inline', 'internal', 'implements', 'lock', 'not', 'null', + 'of', 'or', 'otherwise', 'out', 'override', 'pass', 'raise', + 'raises', 'readonly', 'ref', 'requires', 'self', 'set', 'static', + 'super', 'switch', 'to', 'true', 'try', 'unless', 'uses', 'var', 'virtual', + 'volatile', 'void', 'when', 'while' + ), +// 2 => array( +// ), + 3 => array( + 'is', 'isa', 'new', 'owned', 'sizeof', 'typeof', 'unchecked', + 'unowned', 'weak' + ), + 4 => array( + 'bool', 'byte', 'class', 'char', 'date', 'datetime', 'decimal', 'delegate', + 'double', 'enum', 'event', 'exception', 'float', 'int', 'interface', + 'long', 'object', 'prop', 'sbyte', 'short', 'single', 'string', + 'struct', 'ulong', 'ushort' + ), +// 5 => array( +// ), + ), + 'SYMBOLS' => array( + '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', ':', ';', + '(', ')', '{', '}', '[', ']', '|' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, +// 2 => false, + 3 => false, + 4 => false, +// 5 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0600FF;', +// 2 => 'color: #FF8000; font-weight: bold;', + 3 => 'color: #008000;', + 4 => 'color: #FF0000;', +// 5 => 'color: #000000;' + ), + 'COMMENTS' => array( + 1 => 'color: #008080; font-style: italic;', +// 2 => 'color: #008080;', + 3 => 'color: #008080;', + 'MULTI' => 'color: #008080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #008080; font-weight: bold;', + 'HARD' => 'color: #008080; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #666666;', + 'HARD' => 'color: #666666;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;' + ), + 'METHODS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #0000FF;' + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', +// 2 => '', + 3 => '', + 4 => '', +// 5 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(?|^])", + 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-])" + ) + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/gettext.php b/_piecrust/libs/Geshi/geshi/gettext.php new file mode 100644 index 0000000..90c34a8 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/gettext.php @@ -0,0 +1,97 @@ + 'GNU Gettext', + 'COMMENT_SINGLE' => array('#:', '#.', '#,', '#|', '#'), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array('msgctxt', 'msgid_plural', 'msgid', 'msgstr'), + ), + 'SYMBOLS' => array(), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;' + ), + 'COMMENTS' => array( + 0 => 'color: #000099;', + 1 => 'color: #000099;', + 2 => 'color: #000099;', + 3 => 'color: #006666;', + 4 => 'color: #666666; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'REGEXPS' => array(), + 'SYMBOLS' => array(), + 'NUMBERS' => array( + 0 => 'color: #000099;' + ), + 'METHODS' => array(), + 'SCRIPT' => array(), + 'BRACKETS' => array( + 0 => 'color: #000099;' + ), + ), + 'URLS' => array( + 1 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/glsl.php b/_piecrust/libs/Geshi/geshi/glsl.php new file mode 100644 index 0000000..dbb7ff6 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/glsl.php @@ -0,0 +1,205 @@ + 'glSlang', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Multiline-continued single-line comments + 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', + //Multiline-continued preprocessor define + 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'if', 'else', 'for', 'while', 'do', 'break', 'continue', 'asm', + 'switch', 'case', 'default', 'return', 'discard', + 'namespace', 'using', 'sizeof', 'cast' + ), + 2 => array( + 'const', 'uniform', 'attribute', 'centroid', 'varying', 'invariant', + 'in', 'out', 'inout', 'input', 'output', 'typedef', 'volatile', + 'public', 'static', 'extern', 'external', 'packed', + 'inline', 'noinline', 'noperspective', 'flat' + ), + 3 => array( + 'void', 'bool', 'int', 'long', 'short', 'float', 'half', 'fixed', + 'unsigned', 'lowp', 'mediump', 'highp', 'precision', + 'vec2', 'vec3', 'vec4', 'bvec2', 'bvec3', 'bvec4', + 'dvec2', 'dvec3', 'dvec4', 'fvec2', 'fvec3', 'fvec4', + 'hvec2', 'hvec3', 'hvec4', 'ivec2', 'ivec3', 'ivec4', + 'mat2', 'mat3', 'mat4', 'mat2x2', 'mat3x2', 'mat4x2', + 'mat2x3', 'mat3x3', 'mat4x3', 'mat2x4', 'mat3x4', 'mat4x4', + 'sampler1D', 'sampler2D', 'sampler3D', 'samplerCube', + 'sampler1DShadow', 'sampler2DShadow', + 'struct', 'class', 'union', 'enum', 'interface', 'template' + ), + 4 => array( + 'this', 'false', 'true' + ), + 5 => array( + 'radians', 'degrees', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', + 'pow', 'exp2', 'log2', 'sqrt', 'inversesqrt', 'abs', 'sign', 'ceil', + 'floor', 'fract', 'mod', 'min', 'max', 'clamp', 'mix', 'step', + 'smoothstep', 'length', 'distance', 'dot', 'cross', 'normalize', + 'ftransform', 'faceforward', 'reflect', 'matrixCompMult', 'equal', + 'lessThan', 'lessThanEqual', 'greaterThan', 'greaterThanEqual', + 'notEqual', 'any', 'all', 'not', 'texture1D', 'texture1DProj', + 'texture1DLod', 'texture1DProjLod', 'texture2D', 'texture2DProj', + 'texture2DLod', 'texture2DProjLod', 'texture3D', 'texture3DProj', + 'texture3DLod', 'texture3DProjLod', 'textureCube', 'textureCubeLod', + 'shadow1D', 'shadow1DProj', 'shadow1DLod', 'shadow1DProjLod', + 'shadow2D', 'shadow2DProj', 'shadow2DLod', 'shadow2DProjLod', + 'noise1', 'noise2', 'noise3', 'noise4' + ), + 6 => array( + 'gl_Position', 'gl_PointSize', 'gl_ClipVertex', 'gl_FragColor', + 'gl_FragData', 'gl_FragDepth', 'gl_FragCoord', 'gl_FrontFacing', + 'gl_Color', 'gl_SecondaryColor', 'gl_Normal', 'gl_Vertex', + 'gl_MultiTexCoord0', 'gl_MultiTexCoord1', 'gl_MultiTexCoord2', + 'gl_MultiTexCoord3', 'gl_MultiTexCoord4', 'gl_MultiTexCoord5', + 'gl_MultiTexCoord6', 'gl_MultiTexCoord7', 'gl_FogCoord', + 'gl_MaxLights', 'gl_MaxClipPlanes', 'gl_MaxTextureUnits', + 'gl_MaxTextureCoords', 'gl_MaxVertexAttribs', 'gl_MaxVaryingFloats', + 'gl_MaxVertexUniformComponents', 'gl_MaxVertexTextureImageUnits', + 'gl_MaxCombinedTextureImageUnits', 'gl_MaxTextureImageUnits', + 'gl_MaxFragmentUniformComponents', 'gl_MaxDrawBuffers', 'gl_Point', + 'gl_ModelViewMatrix', 'gl_ProjectionMatrix', 'gl_FrontMaterial', + 'gl_ModelViewProjectionMatrix', 'gl_TextureMatrix', 'gl_ClipPlane', + 'gl_NormalMatrix', 'gl_ModelViewMatrixInverse', 'gl_BackMaterial', + 'gl_ProjectionMatrixInverse', 'gl_ModelViewProjectionMatrixInverse', + 'gl_TextureMatrixInverse', 'gl_ModelViewMatrixTranspose', 'gl_Fog', + 'gl_ProjectionMatrixTranspose', 'gl_NormalScale', 'gl_DepthRange', + 'gl_odelViewProjectionMatrixTranspose', 'gl_TextureMatrixTranspose', + 'gl_ModelViewMatrixInverseTranspose', 'gl_LightSource', + 'gl_ProjectionMatrixInverseTranspose', 'gl_LightModel', + 'gl_ModelViewProjectionMatrixInverseTranspose', 'gl_TexCoord', + 'gl_TextureMatrixInverseTranspose', 'gl_TextureEnvColor', + 'gl_FrontLightModelProduct', 'gl_BackLightModelProduct', + 'gl_FrontLightProduct', 'gl_BackLightProduct', 'gl_ObjectPlaneS', + 'gl_ObjectPlaneT', 'gl_ObjectPlaneR', 'gl_ObjectPlaneQ', + 'gl_EyePlaneS', 'gl_EyePlaneT', 'gl_EyePlaneR', 'gl_EyePlaneQ', + 'gl_FrontColor', 'gl_BackColor', 'gl_FrontSecondaryColor', + 'gl_BackSecondaryColor', 'gl_FogFragCoord', 'gl_PointCoord' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', + '&', '?', ':', '.', '|', ';', ',', '<', '>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #333399; font-weight: bold;', + 3 => 'color: #000066; font-weight: bold;', + 4 => 'color: #333399; font-weight: bold;', + 5 => 'color: #993333; font-weight: bold;', + 6 => 'color: #551111;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #009900;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000066;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000ff;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000066;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'OOLANG' => array( + 'MATCH_BEFORE' => '', + 'MATCH_AFTER' => '[a-zA-Z_][a-zA-Z0-9_]*', + 'MATCH_SPACES' => '[\s]*' + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/gml.php b/_piecrust/libs/Geshi/geshi/gml.php new file mode 100644 index 0000000..9d0d88d --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/gml.php @@ -0,0 +1,506 @@ +5 and KEYWORDS=>6 sections (actually, they were empty). + * I was planning of using those for the GML functions available only in the + * registered version of the program, but not anymore. + * + * 2005/06/26 (1.0.3) + * - First Release. + * + * TODO (updated 2005/11/11) + * ------------------------- + * - Test it for a while and make the appropiate corrections. + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'GML', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'"), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + // language keywords + 1 => array( + 'break', 'continue', 'do', 'until', 'if', 'else', + 'exit', 'for', 'repeat', 'return', 'switch', + 'case', 'default', 'var', 'while', 'with', 'div', 'mod', + // GML Language overview + 'self', 'other', 'all', 'noone', 'global', + ), + // modifiers and built-in variables + 2 => array( + // Game play + 'x','y','xprevious','yprevious','xstart','ystart','hspeed','vspeed','direction','speed', + 'friction','gravity','gravity_direction', + 'path_index','path_position','path_positionprevious','path_speed','path_orientation', + 'path_endaction', + 'object_index','id','mask_index','solid','persistent','instance_count','instance_id', + 'room_speed','fps','current_time','current_year','current_month','current_day','current_weekday', + 'current_hour','current_minute','current_second','alarm','timeline_index','timeline_position', + 'timeline_speed', + 'room','room_first','room_last','room_width','room_height','room_caption','room_persistent', + 'score','lives','health','show_score','show_lives','show_health','caption_score','caption_lives', + 'caption_health', + 'event_type','event_number','event_object','event_action', + 'error_occurred','error_last', + // User interaction + 'keyboard_lastkey','keyboard_key','keyboard_lastchar','keyboard_string', + 'mouse_x','mouse_y','mouse_button','mouse_lastbutton', + // Game Graphics + 'sprite_index','sprite_width','sprite_height','sprite_xoffset','sprite_yoffset', + 'image_number','image_index','image_speed','image_xscale','image_yscale','image_angle', + 'image_alpha','image_blend','bbox_left','bbox_right','bbox_top','bbox_bottom', + 'background_color','background_showcolor','background_visible','background_foreground', + 'background_index','background_x','background_y','background_width','background_height', + 'background_htiled','background_vtiled','background_xscale','background_yscale', + 'background_hspeed','background_vspeed','background_blend','background_alpha', + 'background','left, top, width, height','depth','visible','xscale','yscale','blend','alpha', + 'view_enabled','view_current','view_visible','view_yview','view_wview','view_hview','view_xport', + 'view_yport','view_wport','view_hport','view_angle','view_hborder','view_vborder','view_hspeed', + 'view_vspeed','view_object', + 'transition_kind', + // Files, registry and executing programs + 'game_id','working_directory','temp_directory', + 'secure_mode', + // Creating particles + 'xmin', 'xmax', 'ymin', 'ymax','shape','distribution','particle type','number', + 'force','dist','kind','additive', 'parttype1', 'parttype2' + ), + // functions + 3 => array( + // Computing things + 'random','choose','abs','sign','round','floor','ceil','frac','sqrt','sqr','power','exp','ln', + 'log2','log10','logn','sin','cos','tan','arcsin','arccos','arctan','arctan2','degtorad', + 'radtodeg','min','max','mean','median','point_distance','point_direction','lengthdir_x', + 'lengthdir_y','is_real','is_string', + 'chr','ord','real','string','string_format','string_length','string_pos','string_copy', + 'string_char_at','string_delete','string_insert','string_replace','string_replace_all', + 'string_count','string_lower','string_upper','string_repeat','string_letters','string_digits', + 'string_lettersdigits','clipboard_has_text','clipboard_get_text','clipboard_set_text', + 'date_current_datetime','date_current_date','date_current_time','date_create_datetime', + 'date_create_date','date_create_time','date_valid_datetime','date_valid_date','date_valid_time', + 'date_inc_year','date_inc_month','date_inc_week','date_inc_day','date_inc_hour', + 'date_inc_minute','date_inc_second','date_get_year','date_get_month','date_get_week', + 'date_get_day','date_get_hour', 'date_get_minute','date_get_second','date_get_weekday', + 'date_get_day_of_year','date_get_hour_of_year','date_get_minute_of_year', + 'date_get_second_of_year','date_year_span','date_month_span','date_week_span','date_day_span', + 'date_hour_span','date_minute_span','date_second_span','date_compare_datetime', + 'date_compare_date','date_compare_time','date_date_of','date_time_of','date_datetime_string', + 'date_date_string','date_time_string','date_days_in_month','date_days_in_year','date_leap_year', + 'date_is_today', + // Game play + 'motion_set','motion_add','place_free','place_empty','place_meeting','place_snapped', + 'move_random','move_snap','move_wrap','move_towards_point','move_bounce_solid','move_bounce_all', + 'move_contact_solid','move_contact_all','move_outside_solid','move_outside_all', + 'distance_to_point','distance_to_object','position_empty','position_meeting', + 'path_start','path_end', + 'mp_linear_step','mp_linear_step_object','mp_potential_step','mp_potential_step_object', + 'mp_potential_settings','mp_linear_path','mp_linear_path_object', 'mp_potential_path', + 'mp_potential_path_object','mp_grid_create','mp_grid_destroy','mp_grid_clear_all', + 'mp_grid_clear_cell','mp_grid_clear_rectangle','mp_grid_add_cell','mp_grid_add_rectangle', + 'mp_grid_add_instances','mp_grid_path','mp_grid_draw', + 'collision_point','collision_rectangle','collision_circle','collision_ellipse','collision_line', + 'instance_find','instance_exists','instance_number','instance_position','instance_nearest', + 'instance_furthest','instance_place','instance_create','instance_copy','instance_destroy', + 'instance_change','position_destroy','position_change', + 'instance_deactivate_all','instance_deactivate_object','instance_deactivate_region', + 'instance_activate_all','instance_activate_object','instance_activate_region', + 'sleep', + 'room_goto','room_goto_previous','room_goto_next','room_restart','room_previous','room_next', + 'game_end','game_restart','game_save','game_load', + 'event_perform', 'event_perform_object','event_user','event_inherited', + 'show_debug_message','variable_global_exists','variable_local_exists','variable_global_get', + 'variable_global_array_get','variable_global_array2_get','variable_local_get', + 'variable_local_array_get','variable_local_array2_get','variable_global_set', + 'variable_global_array_set','variable_global_array2_set','variable_local_set', + 'variable_local_array_set','variable_local_array2_set','set_program_priority', + // User interaction + 'keyboard_set_map','keyboard_get_map','keyboard_unset_map','keyboard_check', + 'keyboard_check_pressed','keyboard_check_released','keyboard_check_direct', + 'keyboard_get_numlock','keyboard_set_numlock','keyboard_key_press','keyboard_key_release', + 'keyboard_clear','io_clear','io_handle','keyboard_wait', + 'mouse_check_button','mouse_check_button_pressed','mouse_check_button_released','mouse_clear', + 'mouse_wait', + 'joystick_exists','joystick_name','joystick_axes','joystick_buttons','joystick_has_pov', + 'joystick_direction','joystick_check_button','joystick_xpos','joystick_ypos','joystick_zpos', + 'joystick_rpos','joystick_upos','joystick_vpos','joystick_pov', + // Game Graphics + 'draw_sprite','draw_sprite_stretched','draw_sprite_tiled','draw_sprite_part','draw_background', + 'draw_background_stretched','draw_background_tiled','draw_background_part','draw_sprite_ext', + 'draw_sprite_stretched_ext','draw_sprite_tiled_ext','draw_sprite_part_ext','draw_sprite_general', + 'draw_background_ext','draw_background_stretched_ext','draw_background_tiled_ext', + 'draw_background_part_ext','draw_background_general', + 'draw_clear','draw_clear_alpha','draw_point','draw_line','draw_rectangle','draw_roundrect', + 'draw_triangle','draw_circle','draw_ellipse','draw_arrow','draw_button','draw_path', + 'draw_healthbar','draw_set_color','draw_set_alpha','draw_get_color','draw_get_alpha', + 'make_color_rgb','make_color_hsv','color_get_red','color_get_green','color_get_blue', + 'color_get_hue','color_get_saturation','color_get_value','merge_color','draw_getpixel', + 'screen_save','screen_save_part', + 'draw_set_font','draw_set_halign','draw_set_valign','draw_text','draw_text_ext','string_width', + 'string_height','string_width_ext','string_height_ext','draw_text_transformed', + 'draw_text_ext_transformed','draw_text_color','draw_text_ext_color', + 'draw_text_transformed_color','draw_text_ext_transformed_color', + 'draw_point_color','draw_line_color','draw_rectangle_color','draw_roundrect_color', + 'draw_triangle_color','draw_circle_color','draw_ellipse_color','draw_primitive_begin', + 'draw_vertex','draw_vertex_color','draw_primitive_end','sprite_get_texture', + 'background_get_texture','texture_preload','texture_set_priority', + 'texture_get_width','texture_get_height','draw_primitive_begin_texture','draw_vertex_texture', + 'draw_vertex_texture_color','texture_set_interpolation', + 'texture_set_blending','texture_set_repeat','draw_set_blend_mode','draw_set_blend_mode_ext', + 'surface_create','surface_free','surface_exists','surface_get_width','surface_get_height', + 'surface_get_texture','surface_set_target','surface_reset_target','surface_getpixel', + 'surface_save','surface_save_part','draw_surface','draw_surface_stretched','draw_surface_tiled', + 'draw_surface_part','draw_surface_ext','draw_surface_stretched_ext','draw_surface_tiled_ext', + 'draw_surface_part_ext','draw_surface_general','surface_copy','surface_copy_part', + 'tile_add','tile_delete','tile_exists','tile_get_x','tile_get_y','tile_get_left','tile_get_top', + 'tile_get_width','tile_get_height','tile_get_depth','tile_get_visible','tile_get_xscale', + 'tile_get_yscale','tile_get_background','tile_get_blend','tile_get_alpha','tile_set_position', + 'tile_set_region','tile_set_background','tile_set_visible','tile_set_depth','tile_set_scale', + 'tile_set_blend','tile_set_alpha','tile_layer_hide','tile_layer_show','tile_layer_delete', + 'tile_layer_shift','tile_layer_find','tile_layer_delete_at','tile_layer_depth', + 'display_get_width','display_get_height','display_get_colordepth','display_get_frequency', + 'display_set_size','display_set_colordepth','display_set_frequency','display_set_all', + 'display_test_all','display_reset','display_mouse_get_x','display_mouse_get_y','display_mouse_set', + 'window_set_visible','window_get_visible','window_set_fullscreen','window_get_fullscreen', + 'window_set_showborder','window_get_showborder','window_set_showicons','window_get_showicons', + 'window_set_stayontop','window_get_stayontop','window_set_sizeable','window_get_sizeable', + 'window_set_caption','window_get_caption','window_set_cursor', 'window_get_cursor', + 'window_set_color','window_get_color','window_set_region_scale','window_get_region_scale', + 'window_set_position','window_set_size','window_set_rectangle','window_center','window_default', + 'window_get_x','window_get_y','window_get_width','window_get_height','window_mouse_get_x', + 'window_mouse_get_y','window_mouse_set', + 'window_set_region_size','window_get_region_width','window_get_region_height', + 'window_view_mouse_get_x','window_view_mouse_get_y','window_view_mouse_set', + 'window_views_mouse_get_x','window_views_mouse_get_y','window_views_mouse_set', + 'screen_redraw','screen_refresh','set_automatic_draw','set_synchronization','screen_wait_vsync', + // Sound and music) + 'sound_play','sound_loop','sound_stop','sound_stop_all','sound_isplaying','sound_volume', + 'sound_global_volume','sound_fade','sound_pan','sound_background_tempo','sound_set_search_directory', + 'sound_effect_set','sound_effect_chorus','sound_effect_echo', 'sound_effect_flanger', + 'sound_effect_gargle','sound_effect_reverb','sound_effect_compressor','sound_effect_equalizer', + 'sound_3d_set_sound_position','sound_3d_set_sound_velocity','sound_3d_set_sound_distance', + 'sound_3d_set_sound_cone', + 'cd_init','cd_present','cd_number','cd_playing','cd_paused','cd_track','cd_length', + 'cd_track_length','cd_position','cd_track_position','cd_play','cd_stop','cd_pause','cd_resume', + 'cd_set_position','cd_set_track_position','cd_open_door','cd_close_door','MCI_command', + // Splash screens, highscores, and other pop-ups + 'show_text','show_image','show_video','show_info','load_info', + 'show_message','show_message_ext','show_question','get_integer','get_string', + 'message_background','message_alpha','message_button','message_text_font','message_button_font', + 'message_input_font','message_mouse_color','message_input_color','message_caption', + 'message_position','message_size','show_menu','show_menu_pos','get_color','get_open_filename', + 'get_save_filename','get_directory','get_directory_alt','show_error', + 'highscore_show','highscore_set_background','highscore_set_border','highscore_set_font', + 'highscore_set_colors','highscore_set_strings','highscore_show_ext','highscore_clear', + 'highscore_add','highscore_add_current','highscore_value','highscore_name','draw_highscore', + // Resources + 'sprite_exists','sprite_get_name','sprite_get_number','sprite_get_width','sprite_get_height', + 'sprite_get_transparent','sprite_get_smooth','sprite_get_preload','sprite_get_xoffset', + 'sprite_get_yoffset','sprite_get_bbox_left','sprite_get_bbox_right','sprite_get_bbox_top', + 'sprite_get_bbox_bottom','sprite_get_bbox_mode','sprite_get_precise', + 'sound_exists','sound_get_name','sound_get_kind','sound_get_preload','sound_discard', + 'sound_restore', + 'background_exists','background_get_name','background_get_width','background_get_height', + 'background_get_transparent','background_get_smooth','background_get_preload', + 'font_exists','font_get_name','font_get_fontname','font_get_bold','font_get_italic', + 'font_get_first','font_get_last', + 'path_exists','path_get_name','path_get_length','path_get_kind','path_get_closed', + 'path_get_precision','path_get_number','path_get_point_x','path_get_point_y', + 'path_get_point_speed','path_get_x','path_get_y','path_get_speed', + 'script_exists','script_get_name','script_get_text', + 'timeline_exists','timeline_get_name', + 'object_exists','object_get_name','object_get_sprite','object_get_solid','object_get_visible', + 'object_get_depth','object_get_persistent','object_get_mask','object_get_parent', + 'object_is_ancestor', + 'room_exists','room_get_name', + // Changing resources + 'sprite_set_offset','sprite_set_bbox_mode','sprite_set_bbox','sprite_set_precise', + 'sprite_duplicate','sprite_assign','sprite_merge','sprite_add','sprite_replace', + 'sprite_create_from_screen','sprite_add_from_screen','sprite_create_from_surface', + 'sprite_add_from_surface','sprite_delete','sprite_set_alpha_from_sprite', + 'sound_add','sound_replace','sound_delete', + 'background_duplicate','background_assign','background_add','background_replace', + 'background_create_color','background_create_gradient','background_create_from_screen', + 'background_create_from_surface','background_delete','background_set_alpha_from_background', + 'font_add','font_add_sprite','font_replace_sprite','font_delete', + 'path_set_kind','path_set_closed','path_set_precision','path_add','path_delete','path_duplicate', + 'path_assign','path_append','path_add_point','path_insert_point','path_change_point', + 'path_delete_point','path_clear_points','path_reverse','path_mirror','path_flip','path_rotate', + 'path_scale','path_shift', + 'execute_string','execute_file','script_execute', + 'timeline_add','timeline_delete','timeline_moment_add','timeline_moment_clear', + 'object_set_sprite','object_set_solid','object_set_visible','object_set_depth', + 'object_set_persistent','object_set_mask','object_set_parent','object_add','object_delete', + 'object_event_add','object_event_clear', + 'room_set_width','room_set_height','room_set_caption','room_set_persistent','room_set_code', + 'room_set_background_color','room_set_background','room_set_view','room_set_view_enabled', + 'room_add','room_duplicate','room_assign','room_instance_add','room_instance_clear', + 'room_tile_add','room_tile_add_ext','room_tile_clear', + // Files, registry and executing programs + 'file_text_open_read','file_text_open_write','file_text_open_append','file_text_close', + 'file_text_write_string','file_text_write_real','file_text_writeln','file_text_read_string', + 'file_text_read_real','file_text_readln','file_text_eof','file_exists','file_delete', + 'file_rename','file_copy','directory_exists','directory_create','file_find_first', + 'file_find_next','file_find_close','file_attributes', 'filename_name','filename_path', + 'filename_dir','filename_drive','filename_ext','filename_change_ext','file_bin_open', + 'file_bin_rewrite','file_bin_close','file_bin_size','file_bin_position','file_bin_seek', + 'file_bin_write_byte','file_bin_read_byte','parameter_count','parameter_string', + 'environment_get_variable', + 'registry_write_string','registry_write_real','registry_read_string','registry_read_real', + 'registry_exists','registry_write_string_ext','registry_write_real_ext', + 'registry_read_string_ext','registry_read_real_ext','registry_exists_ext','registry_set_root', + 'ini_open','ini_close','ini_read_string','ini_read_real','ini_write_string','ini_write_real', + 'ini_key_exists','ini_section_exists','ini_key_delete','ini_section_delete', + 'execute_program','execute_shell', + // Data structures + 'ds_stack_create','ds_stack_destroy','ds_stack_clear','ds_stack_size','ds_stack_empty', + 'ds_stack_push','ds_stack_pop','ds_stack_top', + 'ds_queue_create','ds_queue_destroy','ds_queue_clear','ds_queue_size','ds_queue_empty', + 'ds_queue_enqueue','ds_queue_dequeue','ds_queue_head','ds_queue_tail', + 'ds_list_create','ds_list_destroy','ds_list_clear','ds_list_size','ds_list_empty','ds_list_add', + 'ds_list_insert','ds_list_replace','ds_list_delete','ds_list_find_index','ds_list_find_value', + 'ds_list_sort', + 'ds_map_create','ds_map_destroy','ds_map_clear','ds_map_size','ds_map_empty','ds_map_add', + 'ds_map_replace','ds_map_delete','ds_map_exists','ds_map_find_value','ds_map_find_previous', + 'ds_map_find_next','ds_map_find_first','ds_map_find_last', + 'ds_priority_create','ds_priority_destroy','ds_priority_clear','ds_priority_size', + 'ds_priority_empty','ds_priority_add','ds_priority_change_priority','ds_priority_find_priority', + 'ds_priority_delete_value','ds_priority_delete_min','ds_priority_find_min', + 'ds_priority_delete_max','ds_priority_find_max', + 'ds_grid_create','ds_grid_destroy','ds_grid_resize','ds_grid_width','ds_grid_height', + 'ds_grid_clear','ds_grid_set','ds_grid_add','ds_grid_multiply','ds_grid_set_region', + 'ds_grid_add_region','ds_grid_multiply_region','ds_grid_set_disk','ds_grid_add_disk', + 'ds_grid_multiply_disk','ds_grid_get','ds_grid_get_sum','ds_grid_get_max','ds_grid_get_min', + 'ds_grid_get_mean','ds_grid_get_disk_sum','ds_grid_get_disk_min','ds_grid_get_disk_max', + 'ds_grid_get_disk_mean','ds_grid_value_exists','ds_grid_value_x','ds_grid_value_y', + 'ds_grid_value_disk_exists','ds_grid_value_disk_x','ds_grid_value_disk_y', + // Creating particles + 'effect_create_below','effect_create_above','effect_clear', + 'part_type_create','part_type_destroy','part_type_exists','part_type_clear','part_type_shape', + 'part_type_sprite','part_type_size','part_type_scale', + 'part_type_orientation','part_type_color1','part_type_color2','part_type_color3', + 'part_type_color_mix','part_type_color_rgb','part_type_color_hsv', + 'part_type_alpha1','part_type_alpha2','part_type_alpha3','part_type_blend','part_type_life', + 'part_type_step','part_type_death','part_type_speed','part_type_direction','part_type_gravity', + 'part_system_create','part_system_destroy','part_system_exists','part_system_clear', + 'part_system_draw_order','part_system_depth','part_system_position', + 'part_system_automatic_update','part_system_automatic_draw','part_system_update', + 'part_system_drawit','part_particles_create','part_particles_create_color', + 'part_particles_clear','part_particles_count', + 'part_emitter_create','part_emitter_destroy','part_emitter_destroy_all','part_emitter_exists', + 'part_emitter_clear','part_emitter_region','part_emitter_burst','part_emitter_stream', + 'part_attractor_create','part_attractor_destroy','part_attractor_destroy_all', + 'part_attractor_exists','part_attractor_clear','part_attractor_position','part_attractor_force', + 'part_destroyer_create','part_destroyer_destroy','part_destroyer_destroy_all', + 'part_destroyer_exists','part_destroyer_clear','part_destroyer_region', + 'part_deflector_create','part_deflector_destroy','part_deflector_destroy_all', + 'part_deflector_exists','part_deflector_clear','part_deflector_region','part_deflector_kind', + 'part_deflector_friction', + 'part_changer_create','part_changer_destroy','part_changer_destroy_all','part_changer_exists', + 'part_changer_clear','part_changer_region','part_changer_types','part_changer_kind', + // Multiplayer games + 'mplay_init_ipx','mplay_init_tcpip','mplay_init_modem','mplay_init_serial', + 'mplay_connect_status','mplay_end','mplay_ipaddress', + 'mplay_session_create','mplay_session_find','mplay_session_name','mplay_session_join', + 'mplay_session_mode','mplay_session_status','mplay_session_end', + 'mplay_player_find','mplay_player_name','mplay_player_id', + 'mplay_data_write','mplay_data_read','mplay_data_mode', + 'mplay_message_send','mplay_message_send_guaranteed','mplay_message_receive','mplay_message_id', + 'mplay_message_value','mplay_message_player','mplay_message_name','mplay_message_count', + 'mplay_message_clear', + // Using DLL's + 'external_define','external_call','external_free','window_handle', + // 3D Graphics + 'd3d_start','d3d_end','d3d_set_hidden','d3d_set_perspective', + 'd3d_set_depth', + 'd3d_primitive_begin','d3d_vertex','d3d_vertex_color','d3d_primitive_end', + 'd3d_primitive_begin_texture','d3d_vertex_texture','d3d_vertex_texture_color','d3d_set_culling', + 'd3d_draw_block','d3d_draw_cylinder','d3d_draw_cone','d3d_draw_ellipsoid','d3d_draw_wall', + 'd3d_draw_floor', + 'd3d_set_projection','d3d_set_projection_ext','d3d_set_projection_ortho', + 'd3d_set_projection_perspective', + 'd3d_transform_set_identity','d3d_transform_set_translation','d3d_transform_set_scaling', + 'd3d_transform_set_rotation_x','d3d_transform_set_rotation_y','d3d_transform_set_rotation_z', + 'd3d_transform_set_rotation_axis','d3d_transform_add_translation','d3d_transform_add_scaling', + 'd3d_transform_add_rotation_x','d3d_transform_add_rotation_y','d3d_transform_add_rotation_z', + 'd3d_transform_add_rotation_axis','d3d_transform_stack_clear','d3d_transform_stack_empty', + 'd3d_transform_stack_push','d3d_transform_stack_pop','d3d_transform_stack_top', + 'd3d_transform_stack_discard', + 'd3d_set_fog', + 'd3d_set_lighting','d3d_set_shading','d3d_light_define_direction','d3d_light_define_point', + 'd3d_light_enable','d3d_vertex_normal','d3d_vertex_normal_color','d3d_vertex_normal_texture', + 'd3d_vertex_normal_texture_color', + 'd3d_model_create','d3d_model_destroy','d3d_model_clear','d3d_model_save','d3d_model_load', + 'd3d_model_draw','d3d_model_primitive_begin','d3d_model_vertex','d3d_model_vertex_color', + 'd3d_model_vertex_texture','d3d_model_vertex_texture_color','d3d_model_vertex_normal', + 'd3d_model_vertex_normal_color','d3d_model_vertex_normal_texture', + 'd3d_model_vertex_normal_texture_color','d3d_model_primitive_end','d3d_model_block', + 'd3d_model_cylinder','d3d_model_cone','d3d_model_ellipsoid','d3d_model_wall','d3d_model_floor' + ), + // constants + 4 => array( + 'true', 'false', 'pi', + 'ev_destroy','ev_step','ev_alarm','ev_keyboard','ev_mouse','ev_collision','ev_other','ev_draw', + 'ev_keypress','ev_keyrelease','ev_left_button','ev_right_button','ev_middle_button', + 'ev_no_button','ev_left_press','ev_right_press','ev_middle_press','ev_left_release', + 'ev_right_release','ev_middle_release','ev_mouse_enter','ev_mouse_leave','ev_mouse_wheel_up', + 'ev_mouse_wheel_down','ev_global_left_button','ev_global_right_button','ev_global_middle_button', + 'ev_global_left_press','ev_global_right_press','ev_global_middle_press','ev_global_left_release', + 'ev_global_right_release','ev_global_middle_release','ev_joystick1_left','ev_joystick1_right', + 'ev_joystick1_up','ev_joystick1_down','ev_joystick1_button1','ev_joystick1_button2', + 'ev_joystick1_button3','ev_joystick1_button4','ev_joystick1_button5','ev_joystick1_button6', + 'ev_joystick1_button7','ev_joystick1_button8','ev_joystick2_left','ev_joystick2_right', + 'ev_joystick2_up','ev_joystick2_down','ev_joystick2_button1','ev_joystick2_button2', + 'ev_joystick2_button3','ev_joystick2_button4','ev_joystick2_button5','ev_joystick2_button6', + 'ev_joystick2_button7','ev_joystick2_button8', + 'ev_outside','ev_boundary','ev_game_start','ev_game_end','ev_room_start','ev_room_end', + 'ev_no_more_lives','ev_no_more_health','ev_animation_end','ev_end_of_path','ev_user0','ev_user1', + 'ev_user2','ev_user3','ev_user4','ev_user5','ev_user6','ev_user7','ev_user8','ev_user9', + 'ev_user10','ev_user11','ev_user12','ev_user13','ev_user14','ev_user15','ev_step_normal', + 'ev_step_begin','ev_step_end', + 'vk_nokey','vk_anykey','vk_left','vk_right','vk_up','vk_down','vk_enter','vk_escape','vk_space', + 'vk_shift','vk_control','vk_alt','vk_backspace','vk_tab','vk_home','vk_end','vk_delete', + 'vk_insert','vk_pageup','vk_pagedown','vk_pause','vk_printscreen', + 'vk_f1','vk_f2','vk_f3','vk_f4','vk_f5','vk_f6','vk_f7','vk_f8','vk_f9','vk_f10','vk_f11','vk_f12', + 'vk_numpad0','vk_numpad1','vk_numpad2','vk_numpad3','vk_numpad4','vk_numpad5','vk_numpad6', + 'vk_numpad7','vk_numpad8','vk_numpad9', 'vk_multiply','vk_divide','vk_add','vk_subtract', + 'vk_decimal','vk_lshift','vk_lcontrol','vk_lalt','vk_rshift','vk_rcontrol','vk_ralt', + 'c_aqua','c_black','c_blue','c_dkgray','c_fuchsia','c_gray','c_green','c_lime','c_ltgray', + 'c_maroon','c_navy','c_olive','c_purple','c_red','c_silver','c_teal','c_white','c_yellow', + 'fa_left', 'fa_center','fa_right','fa_top','fa_middle','fa_bottom', + 'pr_pointlist','pr_linelist','pr_linestrip','pr_trianglelist','pr_trianglestrip', + 'pr_trianglefan', + 'cr_none','cr_arrow','cr_cross','cr_beam','cr_size_nesw','cr_size_ns','cr_size_nwse', + 'cr_size_we','cr_uparrow','cr_hourglass','cr_drag','cr_nodrop','cr_hsplit','cr_vsplit', + 'cr_multidrag','cr_sqlwait','cr_no','cr_appstart','cr_help','cr_handpoint','cr_size_all', + 'se_chorus','se_echo','se_flanger','se_gargle','se_reverb','se_compressor','se_equalizer', + 'fa_readonly','fa_hidden','fa_sysfile','fa_volumeid','fa_directory','fa_archive', + 'pt_shape_pixel','pt_shape_disk','pt_shape_square','pt_shape_line','pt_shape_star', + 'pt_shape_circle','pt_shape_ring','pt_shape_sphere','pt_shape_flare','pt_shape_spark', + 'pt_shape_explosion','pt_shape_cloud','pt_shape_smoke','pt_shape_snow', + 'ps_shape_rectangle','ps_shape_ellipse ','ps_shape_diamond','ps_shape_line', + 'ps_distr_linear','ps_distr_gaussian','ps_force_constant','ps_force_linear','ps_force_quadratic', + 'ps_deflect_horizontal', 'ps_deflect_vertical', + 'ps_change_motion','ps_change_shape','ps_change_all' + ), + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', + '&&', '||', '^^', '&', '|', '^', + '<', '<=', '==', '!=', '>', '>=', '=', + '<<', '>>', + '+=', '-=', '*=', '/=', + '+', '-', '*', '/', + '!', '~', ',', ';' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'font-weight: bold; color: #000000;', + 2 => 'font-weight: bold; color: #000000;', + 3 => 'color: navy;', + 4 => 'color: #663300;', + ), + 'COMMENTS' => array( + 1 => 'font-style: italic; color: green;', + 'MULTI' => 'font-style: italic; color: green;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' //'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66; font-weight: bold;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/gnuplot.php b/_piecrust/libs/Geshi/geshi/gnuplot.php new file mode 100644 index 0000000..05e2601 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/gnuplot.php @@ -0,0 +1,296 @@ + 'Gnuplot', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('`', '"', "'"), + 'ESCAPE_CHAR' => '\\', + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_SCI_SHORT | + GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + // copy output of help command, indent properly and use this replace regexp: + // ([a-z0-9_\-]+)(( )+|$) => '\1',\3 + + // commands as found in `help commands` + 1 => array( + 'bind', 'call', 'cd', 'clear', + 'exit', 'fit', 'help', 'history', + 'if', 'load', 'lower', 'pause', + 'plot', 'print', 'pwd', 'quit', + 'raise', 'replot', 'reread', 'reset', + 'save', 'set', 'shell', 'show', + 'splot', 'system', 'test', 'unset', + 'update' + ), + 2 => array( + // set commands as returned by `help set` + 'angles', 'arrow', 'autoscale', 'bars', + 'bmargin', 'border', 'boxwidth', 'cbdata', + 'cbdtics', 'cblabel', 'cbmtics', 'cbrange', + 'cbtics', 'clabel', 'clip', 'cntrparam', + 'colorbox', 'contour', 'datafile', 'date_specifiers', + 'decimalsign', 'dgrid3d', 'dummy', 'encoding', + 'fontpath', 'format', 'grid', + 'hidden3d', 'historysize', 'isosamples', 'key', + 'label', 'lmargin', 'loadpath', 'locale', + 'log', 'logscale', 'macros', 'mapping', + 'margin', 'missing', 'mouse', 'multiplot', + 'mx2tics', 'mxtics', 'my2tics', 'mytics', + 'mztics', 'object', 'offsets', 'origin', + 'output', 'palette', 'parametric', 'pm3d', + 'pointsize', 'polar', 'rmargin', + 'rrange', 'samples', 'size', 'style', + 'surface', 'table', 'term', 'terminal', + 'termoption', 'tics', 'ticscale', 'ticslevel', + 'time_specifiers', 'timefmt', 'timestamp', 'title', + 'trange', 'urange', 'view', + 'vrange', 'x2data', 'x2dtics', 'x2label', + 'x2mtics', 'x2range', 'x2tics', 'x2zeroaxis', + 'xdata', 'xdtics', 'xlabel', 'xmtics', + 'xrange', 'xtics', 'xyplane', 'xzeroaxis', + 'y2data', 'y2dtics', 'y2label', 'y2mtics', + 'y2range', 'y2tics', 'y2zeroaxis', 'ydata', + 'ydtics', 'ylabel', 'ymtics', 'yrange', + 'ytics', 'yzeroaxis', 'zdata', 'zdtics', + 'zero', 'zeroaxis', 'zlabel', 'zmtics', + 'zrange', 'ztics', 'zzeroaxis', + // same but with leading no + 'noangles', 'noarrow', 'noautoscale', 'nobars', + 'nobmargin', 'noborder', 'noboxwidth', 'nocbdata', + 'nocbdtics', 'nocblabel', 'nocbmtics', 'nocbrange', + 'nocbtics', 'noclabel', 'noclip', 'nocntrparam', + 'nocolorbox', 'nocontour', 'nodatafile', 'nodate_specifiers', + 'nodecimalsign', 'nodgrid3d', 'nodummy', 'noencoding', + 'nofit', 'nofontpath', 'noformat', 'nogrid', + 'nohidden3d', 'nohistorysize', 'noisosamples', 'nokey', + 'nolabel', 'nolmargin', 'noloadpath', 'nolocale', + 'nolog', 'nologscale', 'nomacros', 'nomapping', + 'nomargin', 'nomissing', 'nomouse', 'nomultiplot', + 'nomx2tics', 'nomxtics', 'nomy2tics', 'nomytics', + 'nomztics', 'noobject', 'nooffsets', 'noorigin', + 'nooutput', 'nopalette', 'noparametric', 'nopm3d', + 'nopointsize', 'nopolar', 'noprint', 'normargin', + 'norrange', 'nosamples', 'nosize', 'nostyle', + 'nosurface', 'notable', 'noterm', 'noterminal', + 'notermoption', 'notics', 'noticscale', 'noticslevel', + 'notime_specifiers', 'notimefmt', 'notimestamp', 'notitle', + 'notmargin', 'notrange', 'nourange', 'noview', + 'novrange', 'nox2data', 'nox2dtics', 'nox2label', + 'nox2mtics', 'nox2range', 'nox2tics', 'nox2zeroaxis', + 'noxdata', 'noxdtics', 'noxlabel', 'noxmtics', + 'noxrange', 'noxtics', 'noxyplane', 'noxzeroaxis', + 'noy2data', 'noy2dtics', 'noy2label', 'noy2mtics', + 'noy2range', 'noy2tics', 'noy2zeroaxis', 'noydata', + 'noydtics', 'noylabel', 'noymtics', 'noyrange', + 'noytics', 'noyzeroaxis', 'nozdata', 'nozdtics', + 'nozero', 'nozeroaxis', 'nozlabel', 'nozmtics', + 'nozrange', 'noztics', 'nozzeroaxis', + ), + 3 => array( + // predefined variables + 'pi', 'NaN', 'GNUTERM', + 'GPVAL_X_MIN', 'GPVAL_X_MAX', 'GPVAL_Y_MIN', 'GPVAL_Y_MAX', + 'GPVAL_TERM', 'GPVAL_TERMOPTIONS', 'GPVAL_OUTPUT', + 'GPVAL_VERSION', 'GPVAL_PATcHLEVEL', 'GPVAL_COMPILE_OPTIONS', + 'MOUSE_KEY', 'MOUSE_X', 'MOUSE_X2', 'MOUSE_Y', 'MOUSE_Y2', + 'MOUSE_BUTTON', 'MOUSE_SHIFT', 'MOUSE_ALT', 'MOUSE_CTRL' + ), + 4 => array( + // predefined functions `help functions` + 'abs', 'acos', 'acosh', 'arg', + 'asin', 'asinh', 'atan', 'atan2', + 'atanh', 'besj0', 'besj1', 'besy0', + 'besy1', 'ceil', 'column', 'cos', + 'cosh', 'defined', 'erf', 'erfc', + 'exists', 'exp', 'floor', 'gamma', + 'gprintf', 'ibeta', 'igamma', 'imag', + 'int', 'inverf', 'invnorm', 'lambertw', + 'lgamma', 'log10', 'norm', + 'rand', 'random', 'real', 'sgn', + 'sin', 'sinh', 'sprintf', 'sqrt', + 'stringcolumn', 'strlen', 'strstrt', 'substr', + 'tan', 'tanh', 'timecolumn', + 'tm_hour', 'tm_mday', 'tm_min', 'tm_mon', + 'tm_sec', 'tm_wday', 'tm_yday', 'tm_year', + 'valid', 'word', 'words', + ), + 5 => array( + // mixed arguments + // there is no sane way to get these ones easily... + 'autofreq', 'x', 'y', 'z', + 'lt', 'linetype', 'lw', 'linewidth', 'ls', 'linestyle', + 'out', 'rotate by', 'screen', + 'enhanced', 'via', + // `help set key` + 'on', 'off', 'default', 'inside', 'outside', 'tmargin', + 'at', 'left', 'right', 'center', 'top', 'bottom', 'vertical', 'horizontal', 'Left', 'Right', + 'noreverse', 'reverse', 'noinvert', 'invert', 'samplen', 'spacing', 'width', 'height', + 'noautotitle', 'autotitle', 'noenhanced', 'nobox', 'box', + + // help set terminal postscript + 'landscape', 'portrait', 'eps', 'defaultplex', 'simplex', 'duplex', + 'fontfile', 'add', 'delete', 'nofontfiles', 'level1', 'leveldefault', + 'color', 'colour', 'monochrome', 'solid', 'dashed', 'dashlength', 'dl', + 'rounded', 'butt', 'palfuncparam', 'blacktext', 'colortext', 'colourtext', + 'font', + + // help set terminal png + 'notransparent', 'transparent', 'nointerlace', 'interlace', + 'notruecolor', 'truecolor', 'tiny', 'small', 'medium', 'large', 'giant', + 'nocrop', 'crop', + + // `help plot` + 'acsplines', 'bezier', 'binary', 'csplines', + 'every', + 'example', 'frequency', 'index', 'matrix', + 'ranges', 'sbezier', 'smooth', + 'special-filenames', 'thru', + 'unique', 'using', 'with', + + // `help plotting styles` + 'boxerrorbars', 'boxes', 'boxxyerrorbars', 'candlesticks', + 'dots', 'errorbars', 'errorlines', 'filledcurves', + 'financebars', 'fsteps', 'histeps', 'histograms', + 'image', 'impulses', 'labels', 'lines', + 'linespoints', 'points', 'rgbimage', 'steps', + 'vectors', 'xerrorbars', 'xerrorlines', 'xyerrorbars', + 'xyerrorlines', 'yerrorbars', 'yerrorlines', + + + // terminals `help terminals` + 'aed512', 'aed767', 'aifm', 'bitgraph', + 'cgm', 'corel', 'dumb', 'dxf', + 'eepic', 'emf', 'emtex', 'epslatex', + 'epson-180dpi', 'epson-60dpi', 'epson-lx800', 'fig', + 'gif', 'gpic', 'hp2623a', 'hp2648', + 'hp500c', 'hpdj', 'hpgl', 'hpljii', + 'hppj', 'imagen', 'jpeg', 'kc-tek40xx', + 'km-tek40xx', 'latex', 'mf', 'mif', + 'mp', 'nec-cp6', 'okidata', 'pbm', + 'pcl5', 'png', 'pop', 'postscript', + 'pslatex', 'pstex', 'pstricks', 'push', + 'qms', 'regis', 'selanar', 'starc', + 'svg', 'tandy-60dpi', 'tek40xx', 'tek410x', + 'texdraw', 'tgif', 'tkcanvas', 'tpic', + 'vttek', 'x11', 'xlib', + ) + ), + 'REGEXPS' => array( + //Variable assignment + 0 => "(?\w])([a-zA-Z_][a-zA-Z0-9_]*)\s*=", + //Numbers with unit + 1 => "(?<=^|\s)([0-9]*\.?[0-9]+\s*cm)" + ), + 'SYMBOLS' => array( + '-', '+', '~', '!', '$', + '*', '/', '%', '=', '<', '>', '&', + '^', '|', '.', 'eq', 'ne', '?:', ':', '`', ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #990000;', + 3 => 'color: #550000;', + 4 => 'color: #7a0874;', + 5 => 'color: #448888;' + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight:bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000099; font-weight:bold;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;', + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #000; font-weight: bold;' + ), + 'REGEXPS' => array( + 0 => 'color: #007800;', + 1 => 'color: #cc66cc;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => 'http://www.google.com/search?q=%22set+{FNAME}%22+site%3Ahttp%3A%2F%2Fwww.gnuplot.info%2Fdocs%2F&btnI=lucky', + 3 => '', + 4 => '', + 5 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 4 => array( + 'DISALLOWED_AFTER' => "(?![\.\-a-zA-Z0-9_%])" + ) + ) + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/go.php b/_piecrust/libs/Geshi/geshi/go.php new file mode 100644 index 0000000..941b74a --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/go.php @@ -0,0 +1,396 @@ + 'Go', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + # Raw strings (escapes and linebreaks ignored) + 2 => "#`[^`]*`#" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', "'"), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + 1 => "#\\\\[abfnrtv\\\\\'\"]#", + 2 => "#\\\\[0-7]{3}#", + 3 => "#\\\\x[0-9a-fA-F]{2}#", + 4 => "#\\\\u[0-9a-fA-F]{4}#", + 5 => "#\\\\U[0-9a-fA-F]{8}#" + ), + 'KEYWORDS' => array( + # statements + 1 => array( + 'break', 'case', 'const', 'continue', 'default', 'defer', 'else', + 'fallthrough', 'for', 'go', 'goto', 'if', 'import', 'package', + 'range', 'return', 'select', 'switch', 'type', 'var' + ), + # literals + 2 => array( + 'nil', 'true', 'false' + ), + # built-in functions + 3 => array( + 'close', 'closed', 'len', 'cap', 'new', 'make', 'copy', 'cmplx', + 'real', 'imag', 'panic', 'recover', 'print', 'println' + ), + # built-in types + 4 => array( + 'chan', 'func', 'interface', 'map', 'struct', 'bool', 'uint8', + 'uint16', 'uint32', 'uint64', 'int8', 'int16', 'int32', 'int64', + 'float32', 'float64', 'complex64', 'complex128', 'byte', 'uint', + 'int', 'float', 'complex', 'uintptr', 'string' + ), + # library types + 5 => array( + 'aes.Cipher', 'aes.KeySizeError', 'ascii85.CorruptInputError', 'asn1.BitString', + 'asn1.RawValue', 'asn1.StructuralError', 'asn1.SyntaxError', 'ast.ChanDir', + 'ast.Comment', 'ast.CommentGroup', 'ast.Decl', 'ast.Expr', 'ast.Field', + 'ast.FieldList', 'ast.File', 'ast.Filter', 'ast.MergeMode', 'ast.Node', + 'ast.ObjKind', 'ast.Object', 'ast.Package', 'ast.Scope', 'ast.Stmt', + 'ast.Visitor', 'av.Color', 'av.Image', 'av.Window', 'base64.CorruptInputError', + 'base64.Encoding', 'big.Int', 'big.Word', 'bignum.Integer', 'bignum.Rational', + 'binary.ByteOrder', 'block.Cipher', 'block.EAXTagError', 'blowfish.Cipher', + 'blowfish.KeySizeError', 'bufio.BufSizeError', 'bufio.Error', 'bufio.ReadWriter', + 'bufio.Reader', 'bufio.Writer', 'bytes.Buffer', 'datafmt.Environment', + 'datafmt.Format', 'datafmt.Formatter', 'datafmt.FormatterMap', 'datafmt.State', + 'doc.Filter', 'doc.FuncDoc', 'doc.PackageDoc', 'doc.TypeDoc', 'doc.ValueDoc', + 'draw.Color', 'draw.Context', 'draw.Image', 'draw.Mouse', 'draw.Op', + 'draw.Point', 'draw.Rectangle', 'dwarf.AddrType', 'dwarf.ArrayType', + 'dwarf.Attr', 'dwarf.BasicType', 'dwarf.BoolType', 'dwarf.CharType', + 'dwarf.CommonType', 'dwarf.ComplexType', 'dwarf.Data', 'dwarf.DecodeError', + 'dwarf.DotDotDotType', 'dwarf.Entry', 'dwarf.EnumType', 'dwarf.EnumValue', + 'dwarf.Field', 'dwarf.FloatType', 'dwarf.FuncType', 'dwarf.IntType', + 'dwarf.Offset', 'dwarf.PtrType', 'dwarf.QualType', 'dwarf.Reader', + 'dwarf.StructField', 'dwarf.StructType', 'dwarf.Tag', 'dwarf.Type', + 'dwarf.TypedefType', 'dwarf.UcharType', 'dwarf.UintType', 'dwarf.VoidType', + 'elf.Class', 'elf.Data', 'elf.Dyn32', 'elf.Dyn64', 'elf.DynFlag', 'elf.DynTag', + 'elf.File', 'elf.FileHeader', 'elf.FormatError', 'elf.Header32', 'elf.Header64', + 'elf.Machine', 'elf.NType', 'elf.OSABI', 'elf.Prog', 'elf.Prog32', 'elf.Prog64', + 'elf.ProgFlag', 'elf.ProgHeader', 'elf.ProgType', 'elf.R_386', 'elf.R_ALPHA', + 'elf.R_ARM', 'elf.R_PPC', 'elf.R_SPARC', 'elf.R_X86_64', 'elf.Rel32', + 'elf.Rel64', 'elf.Rela32', 'elf.Rela64', 'elf.Section', 'elf.Section32', + 'elf.Section64', 'elf.SectionFlag', 'elf.SectionHeader', 'elf.SectionIndex', + 'elf.SectionType', 'elf.Sym32', 'elf.Sym64', 'elf.SymBind', 'elf.SymType', + 'elf.SymVis', 'elf.Symbol', 'elf.Type', 'elf.Version', 'eval.ArrayType', + 'eval.ArrayValue', 'eval.BoolValue', 'eval.BoundedType', 'eval.ChanType', + 'eval.Code', 'eval.Constant', 'eval.Def', 'eval.DivByZeroError', + 'eval.FloatValue', 'eval.Frame', 'eval.Func', 'eval.FuncDecl', 'eval.FuncType', + 'eval.FuncValue', 'eval.IMethod', 'eval.IdealFloatValue', 'eval.IdealIntValue', + 'eval.IndexError', 'eval.IntValue', 'eval.Interface', 'eval.InterfaceType', + 'eval.InterfaceValue', 'eval.KeyError', 'eval.Map', 'eval.MapType', + 'eval.MapValue', 'eval.Method', 'eval.MultiType', 'eval.NamedType', + 'eval.NegativeCapacityError', 'eval.NegativeLengthError', 'eval.NilPointerError', + 'eval.PtrType', 'eval.PtrValue', 'eval.RedefinitionError', 'eval.Scope', + 'eval.Slice', 'eval.SliceError', 'eval.SliceType', 'eval.SliceValue', + 'eval.StringValue', 'eval.StructField', 'eval.StructType', 'eval.StructValue', + 'eval.Thread', 'eval.Type', 'eval.UintValue', 'eval.Value', 'eval.Variable', + 'eval.World', 'exec.Cmd', 'expvar.Int', 'expvar.IntFunc', 'expvar.KeyValue', + 'expvar.Map', 'expvar.String', 'expvar.StringFunc', 'expvar.Var', 'flag.Flag', + 'flag.Value', 'flate.CorruptInputError', 'flate.InternalError', + 'flate.ReadError', 'flate.Reader', 'flate.WriteError', 'flate.WrongValueError', + 'fmt.Formatter', 'fmt.GoStringer', 'fmt.State', 'fmt.Stringer', + 'git85.CorruptInputError', 'gob.Decoder', 'gob.Encoder', 'gosym.DecodingError', + 'gosym.Func', 'gosym.LineTable', 'gosym.Obj', 'gosym.Sym', 'gosym.Table', + 'gosym.UnknownFileError', 'gosym.UnknownLineError', 'gzip.Deflater', + 'gzip.Header', 'gzip.Inflater', 'hash.Hash', 'hash.Hash32', 'hash.Hash64', + 'heap.Interface', 'hex.InvalidHexCharError', 'hex.OddLengthInputError', + 'http.ClientConn', 'http.Conn', 'http.Handler', 'http.HandlerFunc', + 'http.ProtocolError', 'http.Request', 'http.Response', 'http.ServeMux', + 'http.ServerConn', 'http.URL', 'http.URLError', 'http.URLEscapeError', + 'image.Alpha', 'image.AlphaColor', 'image.Color', 'image.ColorImage', + 'image.ColorModel', 'image.ColorModelFunc', 'image.Image', 'image.NRGBA', + 'image.NRGBA64', 'image.NRGBA64Color', 'image.NRGBAColor', 'image.Paletted', + 'image.RGBA', 'image.RGBA64', 'image.RGBA64Color', 'image.RGBAColor', + 'io.Closer', 'io.Error', 'io.PipeReader', 'io.PipeWriter', 'io.ReadByter', + 'io.ReadCloser', 'io.ReadSeeker', 'io.ReadWriteCloser', 'io.ReadWriteSeeker', + 'io.ReadWriter', 'io.Reader', 'io.ReaderAt', 'io.ReaderFrom', 'io.SectionReader', + 'io.Seeker', 'io.WriteCloser', 'io.WriteSeeker', 'io.Writer', 'io.WriterAt', + 'io.WriterTo', 'iterable.Func', 'iterable.Group', 'iterable.Grouper', + 'iterable.Injector', 'iterable.Iterable', 'jpeg.FormatError', 'jpeg.Reader', + 'jpeg.UnsupportedError', 'json.Decoder', 'json.Encoder', + 'json.InvalidUnmarshalError', 'json.Marshaler', 'json.MarshalerError', + 'json.SyntaxError', 'json.UnmarshalTypeError', 'json.Unmarshaler', + 'json.UnsupportedTypeError', 'list.Element', 'list.List', 'log.Logger', + 'macho.Cpu', 'macho.File', 'macho.FileHeader', 'macho.FormatError', 'macho.Load', + 'macho.LoadCmd', 'macho.Regs386', 'macho.RegsAMD64', 'macho.Section', + 'macho.Section32', 'macho.Section64', 'macho.SectionHeader', 'macho.Segment', + 'macho.Segment32', 'macho.Segment64', 'macho.SegmentHeader', 'macho.Thread', + 'macho.Type', 'net.Addr', 'net.AddrError', 'net.Conn', 'net.DNSConfigError', + 'net.DNSError', 'net.Error', 'net.InvalidAddrError', 'net.InvalidConnError', + 'net.Listener', 'net.OpError', 'net.PacketConn', 'net.TCPAddr', 'net.TCPConn', + 'net.TCPListener', 'net.UDPAddr', 'net.UDPConn', 'net.UnixAddr', 'net.UnixConn', + 'net.UnixListener', 'net.UnknownNetworkError', 'net.UnknownSocketError', + 'netchan.Dir', 'netchan.Exporter', 'netchan.Importer', 'nntp.Article', + 'nntp.Conn', 'nntp.Error', 'nntp.Group', 'nntp.ProtocolError', 'ogle.Arch', + 'ogle.ArchAlignedMultiple', 'ogle.ArchLSB', 'ogle.Breakpoint', 'ogle.Event', + 'ogle.EventAction', 'ogle.EventHandler', 'ogle.EventHook', 'ogle.FormatError', + 'ogle.Frame', 'ogle.Goroutine', 'ogle.GoroutineCreate', 'ogle.GoroutineExit', + 'ogle.NoCurrentGoroutine', 'ogle.NotOnStack', 'ogle.Process', + 'ogle.ProcessNotStopped', 'ogle.ReadOnlyError', 'ogle.RemoteMismatchError', + 'ogle.UnknownArchitecture', 'ogle.UnknownGoroutine', 'ogle.UsageError', + 'os.Errno', 'os.Error', 'os.ErrorString', 'os.File', 'os.FileInfo', + 'os.LinkError', 'os.PathError', 'os.SyscallError', 'os.Waitmsg', 'patch.Diff', + 'patch.File', 'patch.GitBinaryLiteral', 'patch.Op', 'patch.Set', + 'patch.SyntaxError', 'patch.TextChunk', 'patch.Verb', 'path.Visitor', + 'pdp1.HaltError', 'pdp1.LoopError', 'pdp1.Trapper', 'pdp1.UnknownInstrError', + 'pdp1.Word', 'pem.Block', 'png.FormatError', 'png.IDATDecodingError', + 'png.UnsupportedError', 'printer.Config', 'printer.HTMLTag', 'printer.Styler', + 'proc.Breakpoint', 'proc.Cause', 'proc.Process', 'proc.ProcessExited', + 'proc.Regs', 'proc.Signal', 'proc.Stopped', 'proc.Thread', 'proc.ThreadCreate', + 'proc.ThreadExit', 'proc.Word', 'quick.CheckEqualError', 'quick.CheckError', + 'quick.Config', 'quick.Generator', 'quick.SetupError', 'rand.Rand', + 'rand.Source', 'rand.Zipf', 'rc4.Cipher', 'rc4.KeySizeError', + 'reflect.ArrayOrSliceType', 'reflect.ArrayOrSliceValue', 'reflect.ArrayType', + 'reflect.ArrayValue', 'reflect.BoolType', 'reflect.BoolValue', 'reflect.ChanDir', + 'reflect.ChanType', 'reflect.ChanValue', 'reflect.Complex128Type', + 'reflect.Complex128Value', 'reflect.Complex64Type', 'reflect.Complex64Value', + 'reflect.ComplexType', 'reflect.ComplexValue', 'reflect.Float32Type', + 'reflect.Float32Value', 'reflect.Float64Type', 'reflect.Float64Value', + 'reflect.FloatType', 'reflect.FloatValue', 'reflect.FuncType', + 'reflect.FuncValue', 'reflect.Int16Type', 'reflect.Int16Value', + 'reflect.Int32Type', 'reflect.Int32Value', 'reflect.Int64Type', + 'reflect.Int64Value', 'reflect.Int8Type', 'reflect.Int8Value', 'reflect.IntType', + 'reflect.IntValue', 'reflect.InterfaceType', 'reflect.InterfaceValue', + 'reflect.MapType', 'reflect.MapValue', 'reflect.Method', 'reflect.PtrType', + 'reflect.PtrValue', 'reflect.SliceHeader', 'reflect.SliceType', + 'reflect.SliceValue', 'reflect.StringHeader', 'reflect.StringType', + 'reflect.StringValue', 'reflect.StructField', 'reflect.StructType', + 'reflect.StructValue', 'reflect.Type', 'reflect.Uint16Type', + 'reflect.Uint16Value', 'reflect.Uint32Type', 'reflect.Uint32Value', + 'reflect.Uint64Type', 'reflect.Uint64Value', 'reflect.Uint8Type', + 'reflect.Uint8Value', 'reflect.UintType', 'reflect.UintValue', + 'reflect.UintptrType', 'reflect.UintptrValue', 'reflect.UnsafePointerType', + 'reflect.UnsafePointerValue', 'reflect.Value', 'regexp.Error', 'regexp.Regexp', + 'ring.Ring', 'rpc.Call', 'rpc.Client', 'rpc.ClientCodec', 'rpc.InvalidRequest', + 'rpc.Request', 'rpc.Response', 'rpc.ServerCodec', 'rsa.DecryptionError', + 'rsa.MessageTooLongError', 'rsa.PKCS1v15Hash', 'rsa.PrivateKey', 'rsa.PublicKey', + 'rsa.VerificationError', 'runtime.ArrayType', 'runtime.BoolType', + 'runtime.ChanDir', 'runtime.ChanType', 'runtime.Complex128Type', + 'runtime.Complex64Type', 'runtime.ComplexType', 'runtime.Error', + 'runtime.Float32Type', 'runtime.Float64Type', 'runtime.FloatType', + 'runtime.Func', 'runtime.FuncType', 'runtime.Int16Type', 'runtime.Int32Type', + 'runtime.Int64Type', 'runtime.Int8Type', 'runtime.IntType', + 'runtime.InterfaceType', 'runtime.Itable', 'runtime.MapType', + 'runtime.MemProfileRecord', 'runtime.MemStatsType', 'runtime.PtrType', + 'runtime.SliceType', 'runtime.StringType', 'runtime.StructType', 'runtime.Type', + 'runtime.TypeAssertionError', 'runtime.Uint16Type', 'runtime.Uint32Type', + 'runtime.Uint64Type', 'runtime.Uint8Type', 'runtime.UintType', + 'runtime.UintptrType', 'runtime.UnsafePointerType', 'scanner.Error', + 'scanner.ErrorHandler', 'scanner.ErrorVector', 'scanner.Position', + 'scanner.Scanner', 'script.Close', 'script.Closed', 'script.Event', + 'script.ReceivedUnexpected', 'script.Recv', 'script.RecvMatch', 'script.Send', + 'script.SetupError', 'signal.Signal', 'signal.UnixSignal', 'sort.Interface', + 'srpc.Client', 'srpc.Errno', 'srpc.Handler', 'srpc.RPC', 'strconv.NumError', + 'strings.Reader', 'sync.Mutex', 'sync.RWMutex', + 'syscall.ByHandleFileInformation', 'syscall.Cmsghdr', 'syscall.Dirent', + 'syscall.EpollEvent', 'syscall.Fbootstraptransfer_t', 'syscall.FdSet', + 'syscall.Filetime', 'syscall.Flock_t', 'syscall.Fstore_t', 'syscall.Iovec', + 'syscall.Kevent_t', 'syscall.Linger', 'syscall.Log2phys_t', 'syscall.Msghdr', + 'syscall.Overlapped', 'syscall.PtraceRegs', 'syscall.Radvisory_t', + 'syscall.RawSockaddr', 'syscall.RawSockaddrAny', 'syscall.RawSockaddrInet4', + 'syscall.RawSockaddrInet6', 'syscall.RawSockaddrUnix', 'syscall.Rlimit', + 'syscall.Rusage', 'syscall.Sockaddr', 'syscall.SockaddrInet4', + 'syscall.SockaddrInet6', 'syscall.SockaddrUnix', 'syscall.Stat_t', + 'syscall.Statfs_t', 'syscall.Sysinfo_t', 'syscall.Time_t', 'syscall.Timespec', + 'syscall.Timeval', 'syscall.Timex', 'syscall.Tms', 'syscall.Ustat_t', + 'syscall.Utimbuf', 'syscall.Utsname', 'syscall.WaitStatus', + 'syscall.Win32finddata', 'syslog.Priority', 'syslog.Writer', 'tabwriter.Writer', + 'tar.Header', 'tar.Reader', 'tar.Writer', 'template.Error', + 'template.FormatterMap', 'template.Template', 'testing.Benchmark', + 'testing.Regexp', 'testing.Test', 'time.ParseError', 'time.Ticker', 'time.Time', + 'tls.CASet', 'tls.Certificate', 'tls.Config', 'tls.Conn', 'tls.ConnectionState', + 'tls.Listener', 'token.Position', 'token.Token', 'unicode.CaseRange', + 'unicode.Range', 'unsafe.ArbitraryType', 'vector.LessInterface', + 'websocket.Conn', 'websocket.Draft75Handler', 'websocket.Handler', + 'websocket.ProtocolError', 'websocket.WebSocketAddr', 'x509.Certificate', + 'x509.ConstraintViolationError', 'x509.KeyUsage', 'x509.Name', + 'x509.PublicKeyAlgorithm', 'x509.SignatureAlgorithm', + 'x509.UnhandledCriticalExtension', 'x509.UnsupportedAlgorithmError', 'xml.Attr', + 'xml.EndElement', 'xml.Name', 'xml.Parser', 'xml.ProcInst', 'xml.StartElement', + 'xml.SyntaxError', 'xml.Token', 'xml.UnmarshalError', 'xtea.Cipher', + 'xtea.KeySizeError' + ) + ), + 'SYMBOLS' => array( + # delimiters + 1 => array( + '(', ')', '{', '}', '[', ']', ',', ':', ';' + ), + # assignments + 2 => array( + '<<=', '!=', '%=', '&=', '&^=', '*=', '+=', '-=', '/=', ':=', '>>=', + '^=', '|=', '=', '++', '--' + ), + # operators + 3 => array( + '<=', '<', '==', '>', '>=', '&&', '!', '||', '&', '&^', '|', '^', + '>>', '<<', '*', '%', '+', '-', '.', '/', '<-'), + # vararg + 4 => array( + '...' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + # statements + 1 => 'color: #b1b100; font-weight: bold;', + # literals + 2 => 'color: #000000; font-weight: bold;', + # built-in functions + 3 => 'color: #000066;', + # built-in types + 4 => 'color: #993333;', + # library types + 5 => 'color: #003399;' + ), + 'COMMENTS' => array( + # single-line comments + 1 => 'color: #666666; font-style: italic;', + # raw strings + 2 => 'color: #0000ff;', + # multi-line comments + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + # simple escape + 1 => 'color: #000099; font-weight: bold;', + # octal escape + 2 => 'color: #000099;', + # hex escape + 3 => 'color: #000099;', + # unicode escape + 4 => 'color: #000099;', + # long unicode escape + 5 => 'color: #000099;' + ), + 'BRACKETS' => array( + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;', + 0 => 'color: #cc66cc;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #004000;' + ), + 'SYMBOLS' => array( + # delimiters + 1 => 'color: #339933;', + # assignments + 2 => 'color: #339933;', + # operators + 3 => 'color: #339933;', + # vararg (highlighted as a keyword) + 4 => 'color: #000000; font-weight: bold;' + ), + 'REGEXPS' => array( + # If CSS classes are enabled, these would be highlighted as numbers (nu0) + # integer literals (possibly imaginary) + 0 => 'color: #cc66cc;', + # real floating point literals + 1 => 'color: #cc66cc;', + # imaginary floating point literals + 2 => 'color: #cc66cc;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => 'http://golang.org/search?q={FNAME}' + ), + 'REGEXPS' => array( + # integer literals (possibly imaginary) + 0 => array( + GESHI_SEARCH => '\b([1-9][0-9]+i?|0[0-7]*|0[xX][0-9a-f]+|0[0-9]*i)\b', + GESHI_REPLACE => '\0', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '', + GESHI_CLASS => 'nu0' + ), + # real floating point literals + 1 => array( + GESHI_SEARCH => '((?:\b\d+\.\d*(?:[Ee][+-]?\d+\b)?|\.\d+(?:[Ee][+-]?\d+)?\b|\b\d+[Ee][+-]?\d+\b)?)', + GESHI_REPLACE => '\0', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '', + GESHI_CLASS => 'nu0' + ), + # imaginary floating point literals + 2 => array( + GESHI_SEARCH => '((?:\b\d+\.\d*(?:[Ee][+-]?\d+)?|\.\d+(?:[Ee][+-]?\d+)?|\b\d+[Ee][+-]?\d+)?i\b)', + GESHI_REPLACE => '\0', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '', + GESHI_CLASS => 'nu0' + ) + # NB. "08" is an invalid number (octal), but "08i" is valid (complex). + ), +'OOLANG' => true, + 'OBJECT_SPLITTERS' => array(1 => '.'), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array(), + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'BRACKETS' => GESHI_NEVER, # handled by symbols + 'NUMBERS' => GESHI_NEVER, # handled by regexp + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/groovy.php b/_piecrust/libs/Geshi/geshi/groovy.php new file mode 100644 index 0000000..e6f8ae0 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/groovy.php @@ -0,0 +1,1011 @@ + 'Groovy', + 'COMMENT_SINGLE' => array(1 => '//', 3 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Import and Package directives (Basic Support only) + 2 => '/(?:(?<=import[\\n\\s])|(?<=package[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*([a-zA-Z0-9_]+|\*)(?=[\n\s;])/i', + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'''", '"""', "'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'case', 'do', 'else', 'for', 'foreach', 'if', 'in', 'switch', + 'while', + ), + 2 => array( + 'abstract', 'as', 'assert', 'break', 'catch', 'class', 'const', + 'continue', 'def', 'default', 'enum', 'extends', + 'false', 'final', 'finally', 'goto', 'implements', 'import', + 'instanceof', 'interface', 'native', 'new', 'null', + 'package', 'private', 'property', 'protected', + 'public', 'return', 'static', 'strictfp', 'super', + 'synchronized', 'this', 'throw', 'throws', + 'transient', 'true', 'try', 'volatile' + ), + 3 => array( + 'AbstractAction', 'AbstractBorder', 'AbstractButton', + 'AbstractCellEditor', 'AbstractCollection', + 'AbstractColorChooserPanel', 'AbstractDocument', + 'AbstractDocument.AttributeContext', + 'AbstractDocument.Content', + 'AbstractDocument.ElementEdit', + 'AbstractLayoutCache', + 'AbstractLayoutCache.NodeDimensions', 'AbstractList', + 'AbstractListModel', 'AbstractMap', + 'AbstractMethodError', 'AbstractSequentialList', + 'AbstractSet', 'AbstractTableModel', + 'AbstractUndoableEdit', 'AbstractWriter', + 'AccessControlContext', 'AccessControlException', + 'AccessController', 'AccessException', 'Accessible', + 'AccessibleAction', 'AccessibleBundle', + 'AccessibleComponent', 'AccessibleContext', + 'AccessibleHyperlink', 'AccessibleHypertext', + 'AccessibleIcon', 'AccessibleObject', + 'AccessibleRelation', 'AccessibleRelationSet', + 'AccessibleResourceBundle', 'AccessibleRole', + 'AccessibleSelection', 'AccessibleState', + 'AccessibleStateSet', 'AccessibleTable', + 'AccessibleTableModelChange', 'AccessibleText', + 'AccessibleValue', 'Acl', 'AclEntry', + 'AclNotFoundException', 'Action', 'ActionEvent', + 'ActionListener', 'ActionMap', 'ActionMapUIResource', + 'Activatable', 'ActivateFailedException', + 'ActivationDesc', 'ActivationException', + 'ActivationGroup', 'ActivationGroupDesc', + 'ActivationGroupDesc.CommandEnvironment', + 'ActivationGroupID', 'ActivationID', + 'ActivationInstantiator', 'ActivationMonitor', + 'ActivationSystem', 'Activator', 'ActiveEvent', + 'Adjustable', 'AdjustmentEvent', + 'AdjustmentListener', 'Adler32', 'AffineTransform', + 'AffineTransformOp', 'AlgorithmParameterGenerator', + 'AlgorithmParameterGeneratorSpi', + 'AlgorithmParameters', 'AlgorithmParameterSpec', + 'AlgorithmParametersSpi', 'AllPermission', + 'AlphaComposite', 'AlreadyBound', + 'AlreadyBoundException', 'AlreadyBoundHelper', + 'AlreadyBoundHolder', 'AncestorEvent', + 'AncestorListener', 'Annotation', 'Any', 'AnyHolder', + 'AnySeqHelper', 'AnySeqHolder', 'Applet', + 'AppletContext', 'AppletInitializer', 'AppletStub', + 'ApplicationException', 'Arc2D', 'Arc2D.Double', + 'Arc2D.Float', 'Area', 'AreaAveragingScaleFilter', + 'ARG_IN', 'ARG_INOUT', 'ARG_OUT', + 'ArithmeticException', 'Array', + 'ArrayIndexOutOfBoundsException', 'ArrayList', + 'Arrays', 'ArrayStoreException', 'AsyncBoxView', + 'Attribute', 'AttributedCharacterIterator', + 'AttributedCharacterIterator.Attribute', + 'AttributedString', 'AttributeInUseException', + 'AttributeList', 'AttributeModificationException', + 'Attributes', 'Attributes.Name', 'AttributeSet', + 'AttributeSet.CharacterAttribute', + 'AttributeSet.ColorAttribute', + 'AttributeSet.FontAttribute', + 'AttributeSet.ParagraphAttribute', 'AudioClip', + 'AudioFileFormat', 'AudioFileFormat.Type', + 'AudioFileReader', 'AudioFileWriter', 'AudioFormat', + 'AudioFormat.Encoding', 'AudioInputStream', + 'AudioPermission', 'AudioSystem', + 'AuthenticationException', + 'AuthenticationNotSupportedException', + 'Authenticator', 'Autoscroll', 'AWTError', + 'AWTEvent', 'AWTEventListener', + 'AWTEventMulticaster', 'AWTException', + 'AWTPermission', 'BadKind', 'BadLocationException', + 'BAD_CONTEXT', 'BAD_INV_ORDER', 'BAD_OPERATION', + 'BAD_PARAM', 'BAD_POLICY', 'BAD_POLICY_TYPE', + 'BAD_POLICY_VALUE', 'BAD_TYPECODE', 'BandCombineOp', + 'BandedSampleModel', 'BasicArrowButton', + 'BasicAttribute', 'BasicAttributes', 'BasicBorders', + 'BasicBorders.ButtonBorder', + 'BasicBorders.FieldBorder', + 'BasicBorders.MarginBorder', + 'BasicBorders.MenuBarBorder', + 'BasicBorders.RadioButtonBorder', + 'BasicBorders.SplitPaneBorder', + 'BasicBorders.ToggleButtonBorder', + 'BasicButtonListener', 'BasicButtonUI', + 'BasicCheckBoxMenuItemUI', 'BasicCheckBoxUI', + 'BasicColorChooserUI', 'BasicComboBoxEditor', + 'BasicComboBoxEditor.UIResource', + 'BasicComboBoxRenderer', + 'BasicComboBoxRenderer.UIResource', + 'BasicComboBoxUI', 'BasicComboPopup', + 'BasicDesktopIconUI', 'BasicDesktopPaneUI', + 'BasicDirectoryModel', 'BasicEditorPaneUI', + 'BasicFileChooserUI', 'BasicGraphicsUtils', + 'BasicHTML', 'BasicIconFactory', + 'BasicInternalFrameTitlePane', + 'BasicInternalFrameUI', 'BasicLabelUI', + 'BasicListUI', 'BasicLookAndFeel', 'BasicMenuBarUI', + 'BasicMenuItemUI', 'BasicMenuUI', + 'BasicOptionPaneUI', + 'BasicOptionPaneUI.ButtonAreaLayout', 'BasicPanelUI', + 'BasicPasswordFieldUI', 'BasicPermission', + 'BasicPopupMenuSeparatorUI', 'BasicPopupMenuUI', + 'BasicProgressBarUI', 'BasicRadioButtonMenuItemUI', + 'BasicRadioButtonUI', 'BasicRootPaneUI', + 'BasicScrollBarUI', 'BasicScrollPaneUI', + 'BasicSeparatorUI', 'BasicSliderUI', + 'BasicSplitPaneDivider', 'BasicSplitPaneUI', + 'BasicStroke', 'BasicTabbedPaneUI', + 'BasicTableHeaderUI', 'BasicTableUI', + 'BasicTextAreaUI', 'BasicTextFieldUI', + 'BasicTextPaneUI', 'BasicTextUI', + 'BasicTextUI.BasicCaret', + 'BasicTextUI.BasicHighlighter', + 'BasicToggleButtonUI', 'BasicToolBarSeparatorUI', + 'BasicToolBarUI', 'BasicToolTipUI', 'BasicTreeUI', + 'BasicViewportUI', 'BatchUpdateException', + 'BeanContext', 'BeanContextChild', + 'BeanContextChildComponentProxy', + 'BeanContextChildSupport', + 'BeanContextContainerProxy', 'BeanContextEvent', + 'BeanContextMembershipEvent', + 'BeanContextMembershipListener', 'BeanContextProxy', + 'BeanContextServiceAvailableEvent', + 'BeanContextServiceProvider', + 'BeanContextServiceProviderBeanInfo', + 'BeanContextServiceRevokedEvent', + 'BeanContextServiceRevokedListener', + 'BeanContextServices', 'BeanContextServicesListener', + 'BeanContextServicesSupport', + 'BeanContextServicesSupport.BCSSServiceProvider', + 'BeanContextSupport', + 'BeanContextSupport.BCSIterator', 'BeanDescriptor', + 'BeanInfo', 'Beans', 'BevelBorder', 'BigDecimal', + 'BigInteger', 'BinaryRefAddr', 'BindException', + 'Binding', 'BindingHelper', 'BindingHolder', + 'BindingIterator', 'BindingIteratorHelper', + 'BindingIteratorHolder', 'BindingIteratorOperations', + 'BindingListHelper', 'BindingListHolder', + 'BindingType', 'BindingTypeHelper', + 'BindingTypeHolder', 'BitSet', 'Blob', 'BlockView', + 'Book', 'Boolean', 'BooleanControl', + 'BooleanControl.Type', 'BooleanHolder', + 'BooleanSeqHelper', 'BooleanSeqHolder', 'Border', + 'BorderFactory', 'BorderLayout', 'BorderUIResource', + 'BorderUIResource.BevelBorderUIResource', + 'BorderUIResource.CompoundBorderUIResource', + 'BorderUIResource.EmptyBorderUIResource', + 'BorderUIResource.EtchedBorderUIResource', + 'BorderUIResource.LineBorderUIResource', + 'BorderUIResource.MatteBorderUIResource', + 'BorderUIResource.TitledBorderUIResource', + 'BoundedRangeModel', 'Bounds', 'Box', 'Box.Filler', + 'BoxedValueHelper', 'BoxLayout', 'BoxView', + 'BreakIterator', 'BufferedImage', + 'BufferedImageFilter', 'BufferedImageOp', + 'BufferedInputStream', 'BufferedOutputStream', + 'BufferedReader', 'BufferedWriter', 'Button', + 'ButtonGroup', 'ButtonModel', 'ButtonUI', 'Byte', + 'ByteArrayInputStream', 'ByteArrayOutputStream', + 'ByteHolder', 'ByteLookupTable', 'Calendar', + 'CallableStatement', 'CannotProceed', + 'CannotProceedException', 'CannotProceedHelper', + 'CannotProceedHolder', 'CannotRedoException', + 'CannotUndoException', 'Canvas', 'CardLayout', + 'Caret', 'CaretEvent', 'CaretListener', 'CellEditor', + 'CellEditorListener', 'CellRendererPane', + 'Certificate', 'Certificate.CertificateRep', + 'CertificateEncodingException', + 'CertificateException', + 'CertificateExpiredException', 'CertificateFactory', + 'CertificateFactorySpi', + 'CertificateNotYetValidException', + 'CertificateParsingException', + 'ChangedCharSetException', 'ChangeEvent', + 'ChangeListener', 'Character', 'Character.Subset', + 'Character.UnicodeBlock', 'CharacterIterator', + 'CharArrayReader', 'CharArrayWriter', + 'CharConversionException', 'CharHolder', + 'CharSeqHelper', 'CharSeqHolder', 'Checkbox', + 'CheckboxGroup', 'CheckboxMenuItem', + 'CheckedInputStream', 'CheckedOutputStream', + 'Checksum', 'Choice', 'ChoiceFormat', 'Class', + 'ClassCastException', 'ClassCircularityError', + 'ClassDesc', 'ClassFormatError', 'ClassLoader', + 'ClassNotFoundException', 'Clip', 'Clipboard', + 'ClipboardOwner', 'Clob', 'Cloneable', + 'CloneNotSupportedException', 'CMMException', + 'CodeSource', 'CollationElementIterator', + 'CollationKey', 'Collator', 'Collection', + 'Collections', 'Color', + 'ColorChooserComponentFactory', 'ColorChooserUI', + 'ColorConvertOp', 'ColorModel', + 'ColorSelectionModel', 'ColorSpace', + 'ColorUIResource', 'ComboBoxEditor', 'ComboBoxModel', + 'ComboBoxUI', 'ComboPopup', 'CommunicationException', + 'COMM_FAILURE', 'Comparable', 'Comparator', + 'Compiler', 'CompletionStatus', + 'CompletionStatusHelper', 'Component', + 'ComponentAdapter', 'ComponentColorModel', + 'ComponentEvent', 'ComponentInputMap', + 'ComponentInputMapUIResource', 'ComponentListener', + 'ComponentOrientation', 'ComponentSampleModel', + 'ComponentUI', 'ComponentView', 'Composite', + 'CompositeContext', 'CompositeName', 'CompositeView', + 'CompoundBorder', 'CompoundControl', + 'CompoundControl.Type', 'CompoundEdit', + 'CompoundName', 'ConcurrentModificationException', + 'ConfigurationException', 'ConnectException', + 'ConnectIOException', 'Connection', 'Constructor', + 'Container', 'ContainerAdapter', 'ContainerEvent', + 'ContainerListener', 'ContentHandler', + 'ContentHandlerFactory', 'ContentModel', 'Context', + 'ContextList', 'ContextNotEmptyException', + 'ContextualRenderedImageFactory', 'Control', + 'Control.Type', 'ControlFactory', + 'ControllerEventListener', 'ConvolveOp', 'CRC32', + 'CRL', 'CRLException', 'CropImageFilter', 'CSS', + 'CSS.Attribute', 'CTX_RESTRICT_SCOPE', + 'CubicCurve2D', 'CubicCurve2D.Double', + 'CubicCurve2D.Float', 'Current', 'CurrentHelper', + 'CurrentHolder', 'CurrentOperations', 'Cursor', + 'Customizer', 'CustomMarshal', 'CustomValue', + 'DatabaseMetaData', 'DataBuffer', 'DataBufferByte', + 'DataBufferInt', 'DataBufferShort', + 'DataBufferUShort', 'DataFlavor', + 'DataFormatException', 'DatagramPacket', + 'DatagramSocket', 'DatagramSocketImpl', + 'DatagramSocketImplFactory', 'DataInput', + 'DataInputStream', 'DataLine', 'DataLine.Info', + 'DataOutput', 'DataOutputStream', 'DataTruncation', + 'DATA_CONVERSION', 'Date', 'DateFormat', + 'DateFormatSymbols', 'DebugGraphics', + 'DecimalFormat', 'DecimalFormatSymbols', + 'DefaultBoundedRangeModel', 'DefaultButtonModel', + 'DefaultCaret', 'DefaultCellEditor', + 'DefaultColorSelectionModel', 'DefaultComboBoxModel', + 'DefaultDesktopManager', 'DefaultEditorKit', + 'DefaultEditorKit.BeepAction', + 'DefaultEditorKit.CopyAction', + 'DefaultEditorKit.CutAction', + 'DefaultEditorKit.DefaultKeyTypedAction', + 'DefaultEditorKit.InsertBreakAction', + 'DefaultEditorKit.InsertContentAction', + 'DefaultEditorKit.InsertTabAction', + 'DefaultEditorKit.PasteAction,', + 'DefaultFocusManager', 'DefaultHighlighter', + 'DefaultHighlighter.DefaultHighlightPainter', + 'DefaultListCellRenderer', + 'DefaultListCellRenderer.UIResource', + 'DefaultListModel', 'DefaultListSelectionModel', + 'DefaultMenuLayout', 'DefaultMetalTheme', + 'DefaultMutableTreeNode', + 'DefaultSingleSelectionModel', + 'DefaultStyledDocument', + 'DefaultStyledDocument.AttributeUndoableEdit', + 'DefaultStyledDocument.ElementSpec', + 'DefaultTableCellRenderer', + 'DefaultTableCellRenderer.UIResource', + 'DefaultTableColumnModel', 'DefaultTableModel', + 'DefaultTextUI', 'DefaultTreeCellEditor', + 'DefaultTreeCellRenderer', 'DefaultTreeModel', + 'DefaultTreeSelectionModel', 'DefinitionKind', + 'DefinitionKindHelper', 'Deflater', + 'DeflaterOutputStream', 'Delegate', 'DesignMode', + 'DesktopIconUI', 'DesktopManager', 'DesktopPaneUI', + 'DGC', 'Dialog', 'Dictionary', 'DigestException', + 'DigestInputStream', 'DigestOutputStream', + 'Dimension', 'Dimension2D', 'DimensionUIResource', + 'DirContext', 'DirectColorModel', 'DirectoryManager', + 'DirObjectFactory', 'DirStateFactory', + 'DirStateFactory.Result', 'DnDConstants', 'Document', + 'DocumentEvent', 'DocumentEvent.ElementChange', + 'DocumentEvent.EventType', 'DocumentListener', + 'DocumentParser', 'DomainCombiner', 'DomainManager', + 'DomainManagerOperations', 'Double', 'DoubleHolder', + 'DoubleSeqHelper', 'DoubleSeqHolder', + 'DragGestureEvent', 'DragGestureListener', + 'DragGestureRecognizer', 'DragSource', + 'DragSourceContext', 'DragSourceDragEvent', + 'DragSourceDropEvent', 'DragSourceEvent', + 'DragSourceListener', 'Driver', 'DriverManager', + 'DriverPropertyInfo', 'DropTarget', + 'DropTarget.DropTargetAutoScroller', + 'DropTargetContext', 'DropTargetDragEvent', + 'DropTargetDropEvent', 'DropTargetEvent', + 'DropTargetListener', 'DSAKey', + 'DSAKeyPairGenerator', 'DSAParameterSpec', + 'DSAParams', 'DSAPrivateKey', 'DSAPrivateKeySpec', + 'DSAPublicKey', 'DSAPublicKeySpec', 'DTD', + 'DTDConstants', 'DynamicImplementation', 'DynAny', + 'DynArray', 'DynEnum', 'DynFixed', 'DynSequence', + 'DynStruct', 'DynUnion', 'DynValue', 'EditorKit', + 'Element', 'ElementIterator', 'Ellipse2D', + 'Ellipse2D.Double', 'Ellipse2D.Float', 'EmptyBorder', + 'EmptyStackException', 'EncodedKeySpec', 'Entity', + 'EnumControl', 'EnumControl.Type', 'Enumeration', + 'Environment', 'EOFException', 'Error', + 'EtchedBorder', 'Event', 'EventContext', + 'EventDirContext', 'EventListener', + 'EventListenerList', 'EventObject', 'EventQueue', + 'EventSetDescriptor', 'Exception', + 'ExceptionInInitializerError', 'ExceptionList', + 'ExpandVetoException', 'ExportException', + 'ExtendedRequest', 'ExtendedResponse', + 'Externalizable', 'FeatureDescriptor', 'Field', + 'FieldNameHelper', 'FieldPosition', 'FieldView', + 'File', 'FileChooserUI', 'FileDescriptor', + 'FileDialog', 'FileFilter', 'FileInputStream', + 'FilenameFilter', 'FileNameMap', + 'FileNotFoundException', 'FileOutputStream', + 'FilePermission', 'FileReader', 'FileSystemView', + 'FileView', 'FileWriter', 'FilteredImageSource', + 'FilterInputStream', 'FilterOutputStream', + 'FilterReader', 'FilterWriter', + 'FixedHeightLayoutCache', 'FixedHolder', + 'FlatteningPathIterator', 'FlavorMap', 'Float', + 'FloatControl', 'FloatControl.Type', 'FloatHolder', + 'FloatSeqHelper', 'FloatSeqHolder', 'FlowLayout', + 'FlowView', 'FlowView.FlowStrategy', 'FocusAdapter', + 'FocusEvent', 'FocusListener', 'FocusManager', + 'Font', 'FontFormatException', 'FontMetrics', + 'FontRenderContext', 'FontUIResource', 'Format', + 'FormatConversionProvider', 'FormView', 'Frame', + 'FREE_MEM', 'GapContent', 'GeneralPath', + 'GeneralSecurityException', 'GlyphJustificationInfo', + 'GlyphMetrics', 'GlyphVector', 'GlyphView', + 'GlyphView.GlyphPainter', 'GradientPaint', + 'GraphicAttribute', 'Graphics', 'Graphics2D', + 'GraphicsConfigTemplate', 'GraphicsConfiguration', + 'GraphicsDevice', 'GraphicsEnvironment', + 'GrayFilter', 'GregorianCalendar', + 'GridBagConstraints', 'GridBagLayout', 'GridLayout', + 'Group', 'Guard', 'GuardedObject', 'GZIPInputStream', + 'GZIPOutputStream', 'HasControls', 'HashMap', + 'HashSet', 'Hashtable', 'HierarchyBoundsAdapter', + 'HierarchyBoundsListener', 'HierarchyEvent', + 'HierarchyListener', 'Highlighter', + 'Highlighter.Highlight', + 'Highlighter.HighlightPainter', 'HTML', + 'HTML.Attribute', 'HTML.Tag', 'HTML.UnknownTag', + 'HTMLDocument', 'HTMLDocument.Iterator', + 'HTMLEditorKit', 'HTMLEditorKit.HTMLFactory', + 'HTMLEditorKit.HTMLTextAction', + 'HTMLEditorKit.InsertHTMLTextAction', + 'HTMLEditorKit.LinkController', + 'HTMLEditorKit.Parser', + 'HTMLEditorKit.ParserCallback', + 'HTMLFrameHyperlinkEvent', 'HTMLWriter', + 'HttpURLConnection', 'HyperlinkEvent', + 'HyperlinkEvent.EventType', 'HyperlinkListener', + 'ICC_ColorSpace', 'ICC_Profile', 'ICC_ProfileGray', + 'ICC_ProfileRGB', 'Icon', 'IconUIResource', + 'IconView', 'IdentifierHelper', 'Identity', + 'IdentityScope', 'IDLEntity', 'IDLType', + 'IDLTypeHelper', 'IDLTypeOperations', + 'IllegalAccessError', 'IllegalAccessException', + 'IllegalArgumentException', + 'IllegalComponentStateException', + 'IllegalMonitorStateException', + 'IllegalPathStateException', 'IllegalStateException', + 'IllegalThreadStateException', 'Image', + 'ImageConsumer', 'ImageFilter', + 'ImageGraphicAttribute', 'ImageIcon', + 'ImageObserver', 'ImageProducer', + 'ImagingOpException', 'IMP_LIMIT', + 'IncompatibleClassChangeError', + 'InconsistentTypeCode', 'IndexColorModel', + 'IndexedPropertyDescriptor', + 'IndexOutOfBoundsException', 'IndirectionException', + 'InetAddress', 'Inflater', 'InflaterInputStream', + 'InheritableThreadLocal', 'InitialContext', + 'InitialContextFactory', + 'InitialContextFactoryBuilder', 'InitialDirContext', + 'INITIALIZE', 'Initializer', 'InitialLdapContext', + 'InlineView', 'InputContext', 'InputEvent', + 'InputMap', 'InputMapUIResource', 'InputMethod', + 'InputMethodContext', 'InputMethodDescriptor', + 'InputMethodEvent', 'InputMethodHighlight', + 'InputMethodListener', 'InputMethodRequests', + 'InputStream', 'InputStreamReader', 'InputSubset', + 'InputVerifier', 'Insets', 'InsetsUIResource', + 'InstantiationError', 'InstantiationException', + 'Instrument', 'InsufficientResourcesException', + 'Integer', 'INTERNAL', 'InternalError', + 'InternalFrameAdapter', 'InternalFrameEvent', + 'InternalFrameListener', 'InternalFrameUI', + 'InterruptedException', 'InterruptedIOException', + 'InterruptedNamingException', 'INTF_REPOS', + 'IntHolder', 'IntrospectionException', + 'Introspector', 'Invalid', + 'InvalidAlgorithmParameterException', + 'InvalidAttributeIdentifierException', + 'InvalidAttributesException', + 'InvalidAttributeValueException', + 'InvalidClassException', + 'InvalidDnDOperationException', + 'InvalidKeyException', 'InvalidKeySpecException', + 'InvalidMidiDataException', 'InvalidName', + 'InvalidNameException', 'InvalidNameHelper', + 'InvalidNameHolder', 'InvalidObjectException', + 'InvalidParameterException', + 'InvalidParameterSpecException', + 'InvalidSearchControlsException', + 'InvalidSearchFilterException', 'InvalidSeq', + 'InvalidTransactionException', 'InvalidValue', + 'INVALID_TRANSACTION', 'InvocationEvent', + 'InvocationHandler', 'InvocationTargetException', + 'InvokeHandler', 'INV_FLAG', 'INV_IDENT', + 'INV_OBJREF', 'INV_POLICY', 'IOException', + 'IRObject', 'IRObjectOperations', 'IstringHelper', + 'ItemEvent', 'ItemListener', 'ItemSelectable', + 'Iterator', 'JApplet', 'JarEntry', 'JarException', + 'JarFile', 'JarInputStream', 'JarOutputStream', + 'JarURLConnection', 'JButton', 'JCheckBox', + 'JCheckBoxMenuItem', 'JColorChooser', 'JComboBox', + 'JComboBox.KeySelectionManager', 'JComponent', + 'JDesktopPane', 'JDialog', 'JEditorPane', + 'JFileChooser', 'JFrame', 'JInternalFrame', + 'JInternalFrame.JDesktopIcon', 'JLabel', + 'JLayeredPane', 'JList', 'JMenu', 'JMenuBar', + 'JMenuItem', 'JobAttributes', + 'JobAttributes.DefaultSelectionType', + 'JobAttributes.DestinationType', + 'JobAttributes.DialogType', + 'JobAttributes.MultipleDocumentHandlingType', + 'JobAttributes.SidesType', 'JOptionPane', 'JPanel', + 'JPasswordField', 'JPopupMenu', + 'JPopupMenu.Separator', 'JProgressBar', + 'JRadioButton', 'JRadioButtonMenuItem', 'JRootPane', + 'JScrollBar', 'JScrollPane', 'JSeparator', 'JSlider', + 'JSplitPane', 'JTabbedPane', 'JTable', + 'JTableHeader', 'JTextArea', 'JTextComponent', + 'JTextComponent.KeyBinding', 'JTextField', + 'JTextPane', 'JToggleButton', + 'JToggleButton.ToggleButtonModel', 'JToolBar', + 'JToolBar.Separator', 'JToolTip', 'JTree', + 'JTree.DynamicUtilTreeNode', + 'JTree.EmptySelectionModel', 'JViewport', 'JWindow', + 'Kernel', 'Key', 'KeyAdapter', 'KeyEvent', + 'KeyException', 'KeyFactory', 'KeyFactorySpi', + 'KeyListener', 'KeyManagementException', 'Keymap', + 'KeyPair', 'KeyPairGenerator', 'KeyPairGeneratorSpi', + 'KeySpec', 'KeyStore', 'KeyStoreException', + 'KeyStoreSpi', 'KeyStroke', 'Label', 'LabelUI', + 'LabelView', 'LastOwnerException', + 'LayeredHighlighter', + 'LayeredHighlighter.LayerPainter', 'LayoutManager', + 'LayoutManager2', 'LayoutQueue', 'LdapContext', + 'LdapReferralException', 'Lease', + 'LimitExceededException', 'Line', 'Line.Info', + 'Line2D', 'Line2D.Double', 'Line2D.Float', + 'LineBorder', 'LineBreakMeasurer', 'LineEvent', + 'LineEvent.Type', 'LineListener', 'LineMetrics', + 'LineNumberInputStream', 'LineNumberReader', + 'LineUnavailableException', 'LinkageError', + 'LinkedList', 'LinkException', 'LinkLoopException', + 'LinkRef', 'List', 'ListCellRenderer', + 'ListDataEvent', 'ListDataListener', 'ListIterator', + 'ListModel', 'ListResourceBundle', + 'ListSelectionEvent', 'ListSelectionListener', + 'ListSelectionModel', 'ListUI', 'ListView', + 'LoaderHandler', 'Locale', 'LocateRegistry', + 'LogStream', 'Long', 'LongHolder', + 'LongLongSeqHelper', 'LongLongSeqHolder', + 'LongSeqHelper', 'LongSeqHolder', 'LookAndFeel', + 'LookupOp', 'LookupTable', 'MalformedLinkException', + 'MalformedURLException', 'Manifest', 'Map', + 'Map.Entry', 'MARSHAL', 'MarshalException', + 'MarshalledObject', 'Math', 'MatteBorder', + 'MediaTracker', 'Member', 'MemoryImageSource', + 'Menu', 'MenuBar', 'MenuBarUI', 'MenuComponent', + 'MenuContainer', 'MenuDragMouseEvent', + 'MenuDragMouseListener', 'MenuElement', 'MenuEvent', + 'MenuItem', 'MenuItemUI', 'MenuKeyEvent', + 'MenuKeyListener', 'MenuListener', + 'MenuSelectionManager', 'MenuShortcut', + 'MessageDigest', 'MessageDigestSpi', 'MessageFormat', + 'MetaEventListener', 'MetalBorders', + 'MetalBorders.ButtonBorder', + 'MetalBorders.Flush3DBorder', + 'MetalBorders.InternalFrameBorder', + 'MetalBorders.MenuBarBorder', + 'MetalBorders.MenuItemBorder', + 'MetalBorders.OptionDialogBorder', + 'MetalBorders.PaletteBorder', + 'MetalBorders.PopupMenuBorder', + 'MetalBorders.RolloverButtonBorder', + 'MetalBorders.ScrollPaneBorder', + 'MetalBorders.TableHeaderBorder', + 'MetalBorders.TextFieldBorder', + 'MetalBorders.ToggleButtonBorder', + 'MetalBorders.ToolBarBorder', 'MetalButtonUI', + 'MetalCheckBoxIcon', 'MetalCheckBoxUI', + 'MetalComboBoxButton', 'MetalComboBoxEditor', + 'MetalComboBoxEditor.UIResource', + 'MetalComboBoxIcon', 'MetalComboBoxUI', + 'MetalDesktopIconUI', 'MetalFileChooserUI', + 'MetalIconFactory', 'MetalIconFactory.FileIcon16', + 'MetalIconFactory.FolderIcon16', + 'MetalIconFactory.PaletteCloseIcon', + 'MetalIconFactory.TreeControlIcon', + 'MetalIconFactory.TreeFolderIcon', + 'MetalIconFactory.TreeLeafIcon', + 'MetalInternalFrameTitlePane', + 'MetalInternalFrameUI', 'MetalLabelUI', + 'MetalLookAndFeel', 'MetalPopupMenuSeparatorUI', + 'MetalProgressBarUI', 'MetalRadioButtonUI', + 'MetalScrollBarUI', 'MetalScrollButton', + 'MetalScrollPaneUI', 'MetalSeparatorUI', + 'MetalSliderUI', 'MetalSplitPaneUI', + 'MetalTabbedPaneUI', 'MetalTextFieldUI', + 'MetalTheme', 'MetalToggleButtonUI', + 'MetalToolBarUI', 'MetalToolTipUI', 'MetalTreeUI', + 'MetaMessage', 'Method', 'MethodDescriptor', + 'MidiChannel', 'MidiDevice', 'MidiDevice.Info', + 'MidiDeviceProvider', 'MidiEvent', 'MidiFileFormat', + 'MidiFileReader', 'MidiFileWriter', 'MidiMessage', + 'MidiSystem', 'MidiUnavailableException', + 'MimeTypeParseException', 'MinimalHTMLWriter', + 'MissingResourceException', 'Mixer', 'Mixer.Info', + 'MixerProvider', 'ModificationItem', 'Modifier', + 'MouseAdapter', 'MouseDragGestureRecognizer', + 'MouseEvent', 'MouseInputAdapter', + 'MouseInputListener', 'MouseListener', + 'MouseMotionAdapter', 'MouseMotionListener', + 'MultiButtonUI', 'MulticastSocket', + 'MultiColorChooserUI', 'MultiComboBoxUI', + 'MultiDesktopIconUI', 'MultiDesktopPaneUI', + 'MultiFileChooserUI', 'MultiInternalFrameUI', + 'MultiLabelUI', 'MultiListUI', 'MultiLookAndFeel', + 'MultiMenuBarUI', 'MultiMenuItemUI', + 'MultiOptionPaneUI', 'MultiPanelUI', + 'MultiPixelPackedSampleModel', 'MultipleMaster', + 'MultiPopupMenuUI', 'MultiProgressBarUI', + 'MultiScrollBarUI', 'MultiScrollPaneUI', + 'MultiSeparatorUI', 'MultiSliderUI', + 'MultiSplitPaneUI', 'MultiTabbedPaneUI', + 'MultiTableHeaderUI', 'MultiTableUI', 'MultiTextUI', + 'MultiToolBarUI', 'MultiToolTipUI', 'MultiTreeUI', + 'MultiViewportUI', 'MutableAttributeSet', + 'MutableComboBoxModel', 'MutableTreeNode', 'Name', + 'NameAlreadyBoundException', 'NameClassPair', + 'NameComponent', 'NameComponentHelper', + 'NameComponentHolder', 'NamedValue', 'NameHelper', + 'NameHolder', 'NameNotFoundException', 'NameParser', + 'NamespaceChangeListener', 'NameValuePair', + 'NameValuePairHelper', 'Naming', 'NamingContext', + 'NamingContextHelper', 'NamingContextHolder', + 'NamingContextOperations', 'NamingEnumeration', + 'NamingEvent', 'NamingException', + 'NamingExceptionEvent', 'NamingListener', + 'NamingManager', 'NamingSecurityException', + 'NegativeArraySizeException', 'NetPermission', + 'NoClassDefFoundError', 'NoInitialContextException', + 'NoninvertibleTransformException', + 'NoPermissionException', 'NoRouteToHostException', + 'NoSuchAlgorithmException', + 'NoSuchAttributeException', 'NoSuchElementException', + 'NoSuchFieldError', 'NoSuchFieldException', + 'NoSuchMethodError', 'NoSuchMethodException', + 'NoSuchObjectException', 'NoSuchProviderException', + 'NotActiveException', 'NotBoundException', + 'NotContextException', 'NotEmpty', 'NotEmptyHelper', + 'NotEmptyHolder', 'NotFound', 'NotFoundHelper', + 'NotFoundHolder', 'NotFoundReason', + 'NotFoundReasonHelper', 'NotFoundReasonHolder', + 'NotOwnerException', 'NotSerializableException', + 'NO_IMPLEMENT', 'NO_MEMORY', 'NO_PERMISSION', + 'NO_RESOURCES', 'NO_RESPONSE', + 'NullPointerException', 'Number', 'NumberFormat', + 'NumberFormatException', 'NVList', 'Object', + 'ObjectChangeListener', 'ObjectFactory', + 'ObjectFactoryBuilder', 'ObjectHelper', + 'ObjectHolder', 'ObjectImpl', 'ObjectInput', + 'ObjectInputStream', 'ObjectInputStream.GetField', + 'ObjectInputValidation', 'ObjectOutput', + 'ObjectOutputStream', 'ObjectOutputStream.PutField', + 'ObjectStreamClass', 'ObjectStreamConstants', + 'ObjectStreamException', 'ObjectStreamField', + 'ObjectView', 'OBJECT_NOT_EXIST', 'ObjID', + 'OBJ_ADAPTER', 'Observable', 'Observer', + 'OctetSeqHelper', 'OctetSeqHolder', 'OMGVMCID', + 'OpenType', 'Operation', + 'OperationNotSupportedException', 'Option', + 'OptionalDataException', 'OptionPaneUI', 'ORB', + 'OutOfMemoryError', 'OutputStream', + 'OutputStreamWriter', 'OverlayLayout', 'Owner', + 'Package', 'PackedColorModel', 'Pageable', + 'PageAttributes', 'PageAttributes.ColorType', + 'PageAttributes.MediaType', + 'PageAttributes.OrientationRequestedType', + 'PageAttributes.OriginType', + 'PageAttributes.PrintQualityType', 'PageFormat', + 'Paint', 'PaintContext', 'PaintEvent', 'Panel', + 'PanelUI', 'Paper', 'ParagraphView', + 'ParameterBlock', 'ParameterDescriptor', + 'ParseException', 'ParsePosition', 'Parser', + 'ParserDelegator', 'PartialResultException', + 'PasswordAuthentication', 'PasswordView', 'Patch', + 'PathIterator', 'Permission', 'PermissionCollection', + 'Permissions', 'PERSIST_STORE', 'PhantomReference', + 'PipedInputStream', 'PipedOutputStream', + 'PipedReader', 'PipedWriter', 'PixelGrabber', + 'PixelInterleavedSampleModel', 'PKCS8EncodedKeySpec', + 'PlainDocument', 'PlainView', 'Point', 'Point2D', + 'Point2D.Double', 'Point2D.Float', 'Policy', + 'PolicyError', 'PolicyHelper', 'PolicyHolder', + 'PolicyListHelper', 'PolicyListHolder', + 'PolicyOperations', 'PolicyTypeHelper', 'Polygon', + 'PopupMenu', 'PopupMenuEvent', 'PopupMenuListener', + 'PopupMenuUI', 'Port', 'Port.Info', + 'PortableRemoteObject', + 'PortableRemoteObjectDelegate', 'Position', + 'Position.Bias', 'PreparedStatement', 'Principal', + 'PrincipalHolder', 'Printable', + 'PrinterAbortException', 'PrinterException', + 'PrinterGraphics', 'PrinterIOException', + 'PrinterJob', 'PrintGraphics', 'PrintJob', + 'PrintStream', 'PrintWriter', 'PrivateKey', + 'PRIVATE_MEMBER', 'PrivilegedAction', + 'PrivilegedActionException', + 'PrivilegedExceptionAction', 'Process', + 'ProfileDataException', 'ProgressBarUI', + 'ProgressMonitor', 'ProgressMonitorInputStream', + 'Properties', 'PropertyChangeEvent', + 'PropertyChangeListener', 'PropertyChangeSupport', + 'PropertyDescriptor', 'PropertyEditor', + 'PropertyEditorManager', 'PropertyEditorSupport', + 'PropertyPermission', 'PropertyResourceBundle', + 'PropertyVetoException', 'ProtectionDomain', + 'ProtocolException', 'Provider', 'ProviderException', + 'Proxy', 'PublicKey', 'PUBLIC_MEMBER', + 'PushbackInputStream', 'PushbackReader', + 'QuadCurve2D', 'QuadCurve2D.Double', + 'QuadCurve2D.Float', 'Random', 'RandomAccessFile', + 'Raster', 'RasterFormatException', 'RasterOp', + 'Reader', 'Receiver', 'Rectangle', 'Rectangle2D', + 'Rectangle2D.Double', 'Rectangle2D.Float', + 'RectangularShape', 'Ref', 'RefAddr', 'Reference', + 'Referenceable', 'ReferenceQueue', + 'ReferralException', 'ReflectPermission', 'Registry', + 'RegistryHandler', 'RemarshalException', 'Remote', + 'RemoteCall', 'RemoteException', 'RemoteObject', + 'RemoteRef', 'RemoteServer', 'RemoteStub', + 'RenderableImage', 'RenderableImageOp', + 'RenderableImageProducer', 'RenderContext', + 'RenderedImage', 'RenderedImageFactory', 'Renderer', + 'RenderingHints', 'RenderingHints.Key', + 'RepaintManager', 'ReplicateScaleFilter', + 'Repository', 'RepositoryIdHelper', 'Request', + 'RescaleOp', 'Resolver', 'ResolveResult', + 'ResourceBundle', 'ResponseHandler', 'ResultSet', + 'ResultSetMetaData', 'ReverbType', 'RGBImageFilter', + 'RMIClassLoader', 'RMIClientSocketFactory', + 'RMIFailureHandler', 'RMISecurityException', + 'RMISecurityManager', 'RMIServerSocketFactory', + 'RMISocketFactory', 'Robot', 'RootPaneContainer', + 'RootPaneUI', 'RoundRectangle2D', + 'RoundRectangle2D.Double', 'RoundRectangle2D.Float', + 'RowMapper', 'RSAKey', 'RSAKeyGenParameterSpec', + 'RSAPrivateCrtKey', 'RSAPrivateCrtKeySpec', + 'RSAPrivateKey', 'RSAPrivateKeySpec', 'RSAPublicKey', + 'RSAPublicKeySpec', 'RTFEditorKit', + 'RuleBasedCollator', 'Runnable', 'Runtime', + 'RunTime', 'RuntimeException', 'RunTimeOperations', + 'RuntimePermission', 'SampleModel', + 'SchemaViolationException', 'Scrollable', + 'Scrollbar', 'ScrollBarUI', 'ScrollPane', + 'ScrollPaneConstants', 'ScrollPaneLayout', + 'ScrollPaneLayout.UIResource', 'ScrollPaneUI', + 'SearchControls', 'SearchResult', + 'SecureClassLoader', 'SecureRandom', + 'SecureRandomSpi', 'Security', 'SecurityException', + 'SecurityManager', 'SecurityPermission', 'Segment', + 'SeparatorUI', 'Sequence', 'SequenceInputStream', + 'Sequencer', 'Sequencer.SyncMode', 'Serializable', + 'SerializablePermission', 'ServantObject', + 'ServerCloneException', 'ServerError', + 'ServerException', 'ServerNotActiveException', + 'ServerRef', 'ServerRequest', + 'ServerRuntimeException', 'ServerSocket', + 'ServiceDetail', 'ServiceDetailHelper', + 'ServiceInformation', 'ServiceInformationHelper', + 'ServiceInformationHolder', + 'ServiceUnavailableException', 'Set', + 'SetOverrideType', 'SetOverrideTypeHelper', 'Shape', + 'ShapeGraphicAttribute', 'Short', 'ShortHolder', + 'ShortLookupTable', 'ShortMessage', 'ShortSeqHelper', + 'ShortSeqHolder', 'Signature', 'SignatureException', + 'SignatureSpi', 'SignedObject', 'Signer', + 'SimpleAttributeSet', 'SimpleBeanInfo', + 'SimpleDateFormat', 'SimpleTimeZone', + 'SinglePixelPackedSampleModel', + 'SingleSelectionModel', 'SizeLimitExceededException', + 'SizeRequirements', 'SizeSequence', 'Skeleton', + 'SkeletonMismatchException', + 'SkeletonNotFoundException', 'SliderUI', 'Socket', + 'SocketException', 'SocketImpl', 'SocketImplFactory', + 'SocketOptions', 'SocketPermission', + 'SocketSecurityException', 'SoftBevelBorder', + 'SoftReference', 'SortedMap', 'SortedSet', + 'Soundbank', 'SoundbankReader', 'SoundbankResource', + 'SourceDataLine', 'SplitPaneUI', 'SQLData', + 'SQLException', 'SQLInput', 'SQLOutput', + 'SQLPermission', 'SQLWarning', 'Stack', + 'StackOverflowError', 'StateEdit', 'StateEditable', + 'StateFactory', 'Statement', 'Streamable', + 'StreamableValue', 'StreamCorruptedException', + 'StreamTokenizer', 'StrictMath', 'String', + 'StringBuffer', 'StringBufferInputStream', + 'StringCharacterIterator', 'StringContent', + 'StringHolder', 'StringIndexOutOfBoundsException', + 'StringReader', 'StringRefAddr', 'StringSelection', + 'StringTokenizer', 'StringValueHelper', + 'StringWriter', 'Stroke', 'Struct', 'StructMember', + 'StructMemberHelper', 'Stub', 'StubDelegate', + 'StubNotFoundException', 'Style', 'StyleConstants', + 'StyleConstants.CharacterConstants', + 'StyleConstants.ColorConstants', + 'StyleConstants.FontConstants', + 'StyleConstants.ParagraphConstants', 'StyleContext', + 'StyledDocument', 'StyledEditorKit', + 'StyledEditorKit.AlignmentAction', + 'StyledEditorKit.BoldAction', + 'StyledEditorKit.FontFamilyAction', + 'StyledEditorKit.FontSizeAction', + 'StyledEditorKit.ForegroundAction', + 'StyledEditorKit.ItalicAction', + 'StyledEditorKit.StyledTextAction', + 'StyledEditorKit.UnderlineAction', 'StyleSheet', + 'StyleSheet.BoxPainter', 'StyleSheet.ListPainter', + 'SwingConstants', 'SwingPropertyChangeSupport', + 'SwingUtilities', 'SyncFailedException', + 'Synthesizer', 'SysexMessage', 'System', + 'SystemColor', 'SystemException', 'SystemFlavorMap', + 'TabableView', 'TabbedPaneUI', 'TabExpander', + 'TableCellEditor', 'TableCellRenderer', + 'TableColumn', 'TableColumnModel', + 'TableColumnModelEvent', 'TableColumnModelListener', + 'TableHeaderUI', 'TableModel', 'TableModelEvent', + 'TableModelListener', 'TableUI', 'TableView', + 'TabSet', 'TabStop', 'TagElement', 'TargetDataLine', + 'TCKind', 'TextAction', 'TextArea', 'TextAttribute', + 'TextComponent', 'TextEvent', 'TextField', + 'TextHitInfo', 'TextLayout', + 'TextLayout.CaretPolicy', 'TextListener', + 'TextMeasurer', 'TextUI', 'TexturePaint', 'Thread', + 'ThreadDeath', 'ThreadGroup', 'ThreadLocal', + 'Throwable', 'Tie', 'TileObserver', 'Time', + 'TimeLimitExceededException', 'Timer', 'TimerTask', + 'Timestamp', 'TimeZone', 'TitledBorder', 'ToolBarUI', + 'Toolkit', 'ToolTipManager', 'ToolTipUI', + 'TooManyListenersException', 'Track', + 'TransactionRequiredException', + 'TransactionRolledbackException', + 'TRANSACTION_REQUIRED', 'TRANSACTION_ROLLEDBACK', + 'Transferable', 'TransformAttribute', 'TRANSIENT', + 'Transmitter', 'Transparency', 'TreeCellEditor', + 'TreeCellRenderer', 'TreeExpansionEvent', + 'TreeExpansionListener', 'TreeMap', 'TreeModel', + 'TreeModelEvent', 'TreeModelListener', 'TreeNode', + 'TreePath', 'TreeSelectionEvent', + 'TreeSelectionListener', 'TreeSelectionModel', + 'TreeSet', 'TreeUI', 'TreeWillExpandListener', + 'TypeCode', 'TypeCodeHolder', 'TypeMismatch', + 'Types', 'UID', 'UIDefaults', + 'UIDefaults.ActiveValue', 'UIDefaults.LazyInputMap', + 'UIDefaults.LazyValue', 'UIDefaults.ProxyLazyValue', + 'UIManager', 'UIManager.LookAndFeelInfo', + 'UIResource', 'ULongLongSeqHelper', + 'ULongLongSeqHolder', 'ULongSeqHelper', + 'ULongSeqHolder', 'UndeclaredThrowableException', + 'UndoableEdit', 'UndoableEditEvent', + 'UndoableEditListener', 'UndoableEditSupport', + 'UndoManager', 'UnexpectedException', + 'UnicastRemoteObject', 'UnionMember', + 'UnionMemberHelper', 'UNKNOWN', 'UnknownError', + 'UnknownException', 'UnknownGroupException', + 'UnknownHostException', 'UnknownObjectException', + 'UnknownServiceException', 'UnknownUserException', + 'UnmarshalException', 'UnrecoverableKeyException', + 'Unreferenced', 'UnresolvedPermission', + 'UnsatisfiedLinkError', 'UnsolicitedNotification', + 'UnsolicitedNotificationEvent', + 'UnsolicitedNotificationListener', + 'UnsupportedAudioFileException', + 'UnsupportedClassVersionError', + 'UnsupportedEncodingException', + 'UnsupportedFlavorException', + 'UnsupportedLookAndFeelException', + 'UnsupportedOperationException', + 'UNSUPPORTED_POLICY', 'UNSUPPORTED_POLICY_VALUE', + 'URL', 'URLClassLoader', 'URLConnection', + 'URLDecoder', 'URLEncoder', 'URLStreamHandler', + 'URLStreamHandlerFactory', 'UserException', + 'UShortSeqHelper', 'UShortSeqHolder', + 'UTFDataFormatException', 'Util', 'UtilDelegate', + 'Utilities', 'ValueBase', 'ValueBaseHelper', + 'ValueBaseHolder', 'ValueFactory', 'ValueHandler', + 'ValueMember', 'ValueMemberHelper', + 'VariableHeightLayoutCache', 'Vector', 'VerifyError', + 'VersionSpecHelper', 'VetoableChangeListener', + 'VetoableChangeSupport', 'View', 'ViewFactory', + 'ViewportLayout', 'ViewportUI', + 'VirtualMachineError', 'Visibility', + 'VisibilityHelper', 'VMID', 'VM_ABSTRACT', + 'VM_CUSTOM', 'VM_NONE', 'VM_TRUNCATABLE', + 'VoiceStatus', 'Void', 'WCharSeqHelper', + 'WCharSeqHolder', 'WeakHashMap', 'WeakReference', + 'Window', 'WindowAdapter', 'WindowConstants', + 'WindowEvent', 'WindowListener', 'WrappedPlainView', + 'WritableRaster', 'WritableRenderedImage', + 'WriteAbortedException', 'Writer', + 'WrongTransaction', 'WStringValueHelper', + 'X509Certificate', 'X509CRL', 'X509CRLEntry', + 'X509EncodedKeySpec', 'X509Extension', 'ZipEntry', + 'ZipException', 'ZipFile', 'ZipInputStream', + 'ZipOutputStream', 'ZoneView', + '_BindingIteratorImplBase', '_BindingIteratorStub', + '_IDLTypeStub', '_NamingContextImplBase', + '_NamingContextStub', '_PolicyStub', '_Remote_Stub' + ), + 4 => array( + 'boolean', 'byte', 'char', 'double', 'float', 'int', 'long', + 'short', 'void' + ), + 5 => array( + 'allProperties', 'asImmutable', 'asSynchronized', 'collect', + 'count', 'each', 'eachProperty', 'eachPropertyName', + 'eachWithIndex', 'find', 'findAll', 'findIndexOf', + 'flatten', 'get', 'grep', 'inject', 'intersect', + 'join', 'max', 'min', 'pop', 'reverse', + 'reverseEach', 'size', 'sort', 'subMap', 'toList' + ), + 6 => array( + 'center', 'contains', 'eachMatch', 'padLeft', 'padRight', + 'toCharacter', 'tokenize', 'toLong', 'toURL' + ), + 7 => array( + 'append', 'eachByte', 'eachFile', 'eachFileRecurse', 'eachLine', + 'eachLines', 'encodeBase64', 'filterLine', 'getText', + 'splitEachLine', 'transformChar', 'transformLine', + 'withOutputStream', 'withPrintWriter', 'withReader', + 'withStream', 'withStreams', 'withWriter', + 'withWriterAppend', 'write', 'writeLine' + ), + 8 => array( + 'dump', 'getLastMatcher', 'inspect', 'invokeMethod', 'print', + 'println', 'start', 'startDaemon', 'step', 'times', + 'upto', 'use' + ), + 9 => array( + 'call', 'close', 'eachRow', 'execute', 'executeUpdate', 'Sql' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?', '|', '=', + '=>', '||', '-', '+', '<<', '<<<', '&&' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + 9 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #aaaadd; font-weight: bold;', + 4 => 'color: #993333;', + 5 => 'color: #663399;', + 6 => 'color: #CC0099;', + 7 => 'color: #FFCC33;', + 8 => 'color: #993399;', + 9 => 'color: #993399; font-weight: bold;' + ), + 'COMMENTS' => array( + 1=> 'color: #808080; font-style: italic;', + 2=> 'color: #a1a100;', + 3=> 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff;' + ) + ), + 'URLS' => array( + 1 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAMEL}', + 2 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAMEL}', + 3 => 'http://www.google.de/search?as_q={FNAME}&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1%2E5%2E0%2Fdocs%2Fapi%2F', + 4 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', + 5 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', + 6 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', + 7 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', + 8 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', + 9 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + //Variables + 0 => '\\$\\{[a-zA-Z_][a-zA-Z0-9_]*\\}' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/gwbasic.php b/_piecrust/libs/Geshi/geshi/gwbasic.php new file mode 100644 index 0000000..4b2b272 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/gwbasic.php @@ -0,0 +1,153 @@ + 'GwBasic', + 'COMMENT_SINGLE' => array(1 => "'", 2=> "REM"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* Statements */ + 1 => array('END','FOR','NEXT','DATA','INPUT','DIM','READ','LET', + 'GOTO','RUN','IF','RESTORE','GOSUB','RETURN','REM', + 'STOP','PRINT','CLEAR','LIST','NEW','ON','WAIT','DEF', + 'POKE','CONT','OUT','LPRINT','LLIST','WIDTH','ELSE', + 'TRON','TROFF','SWAP','ERASE','EDIT','ERROR','RESUME', + 'DELETE','AUTO','RENUM','DEFSTR','DEFINT','DEFSNG', + 'DEFDBL','LINE','WHILE','WEND','CALL','WRITE','OPTION', + 'RANDOMIZE','OPEN','CLOSE','LOAD','MERGE','SAVE', + 'COLOR','CLS','MOTOR','BSAVE','BLOAD','SOUND','BEEP', + 'PSET','PRESET','SCREEN','KEY','LOCATE','TO','THEN', + 'STEP','USR','FN','SPC','NOT','ERL','ERR','STRING', + 'USING','INSTR','VARPTR','CSRLIN','POINT','OFF', + 'FILES','FIELD','SYSTEM','NAME','LSET','RSET','KILL', + 'PUT','GET','RESET','COMMON','CHAIN','PAINT','COM', + 'CIRCLE','DRAW','PLAY','TIMER','IOCTL','CHDIR','MKDIR', + 'RMDIR','SHELL','VIEW','WINDOW','PMAP','PALETTE','LCOPY', + 'CALLS','PCOPY','LOCK','UNLOCK','RANDOM','APPEND', + ), + 2 => array( + /* Functions */ + 'CVI','CVS','CVD','MKI','MKS','MKD','ENVIRON', + 'LEFT','RIGHT','MID','SGN','INT','ABS', + 'SQR','SIN','LOG','EXP','COS','TAN','ATN', + 'FRE','INP','POS','LEN','STR','VAL','ASC', + 'CHR','PEEK','SPACE','OCT','HEX','LPOS', + 'CINT','CSNG','CDBL','FIX','PEN','STICK', + 'STRIG','EOF','LOC','LOF' + ), + 3 => array( + /* alpha Operators */ + 'AND','OR','XOR','EQV','IMP','MOD' + ), + 4 => array( + /* parameterless functions */ + 'INKEY','DATE','TIME','ERDEV','RND' + ) + ), + 'SYMBOLS' => array( + 0 => array( + '>','=','<','+','-','*','/','^','\\' + ), + 1 => array( + '?' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00a1a1;font-weight: bold', + 2 => 'color: #000066;font-weight: bold', + 3 => 'color: #00a166;font-weight: bold', + 4 => 'color: #0066a1;font-weight: bold' + ), + 'COMMENTS' => array( + 1 => 'color: #808080;', + 2 => 'color: #808080;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + /* Same as KEYWORDS[3] (and, or, not...) */ + 0 => 'color: #00a166;font-weight: bold', + 1 => 'color: #00a1a1;font-weight: bold', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + 1 => 'color: #708090' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 1 => '^[0-9]+ ' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/haskell.php b/_piecrust/libs/Geshi/geshi/haskell.php new file mode 100644 index 0000000..d459470 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/haskell.php @@ -0,0 +1,202 @@ + 'Haskell', + 'COMMENT_SINGLE' => array( 1 => '--'), + 'COMMENT_MULTI' => array('{-' => '-}'), + 'COMMENT_REGEXP' => array( + 2 => "/-->/", + 3 => "/{-(?:(?R)|.)-}/s", //Nested Comments + ), + 'CASE_KEYWORDS' => 0, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => "\\", + 'KEYWORDS' => array( + /* main haskell keywords */ + 1 => array( + 'as', + 'case', 'of', 'class', 'data', 'default', + 'deriving', 'do', 'forall', 'hiding', 'if', 'then', + 'else', 'import', 'infix', 'infixl', 'infixr', + 'instance', 'let', 'in', 'module', 'newtype', + 'qualified', 'type', 'where' + ), + /* define names of main librarys, so we can link to it */ + 2 => array( + 'Foreign', 'Numeric', 'Prelude' + ), + /* just link to Prelude functions, cause it's the default opened library when starting Haskell */ + 3 => array( + 'not', 'otherwise', 'maybe', + 'either', 'fst', 'snd', 'curry', 'uncurry', + 'compare', + 'max', 'min', 'succ', 'pred', 'toEnum', 'fromEnum', + 'enumFrom', 'enumFromThen', 'enumFromTo', + 'enumFromThenTo', 'minBound', 'maxBound', + 'negate', 'abs', 'signum', + 'fromInteger', 'toRational', 'quot', 'rem', + 'div', 'mod', 'quotRem', 'divMod', 'toInteger', + 'recip', 'fromRational', 'pi', 'exp', + 'log', 'sqrt', 'logBase', 'sin', 'cos', + 'tan', 'asin', 'acos', 'atan', 'sinh', 'cosh', + 'tanh', 'asinh', 'acosh', 'atanh', + 'properFraction', 'truncate', 'round', 'ceiling', + 'floor', 'floatRadix', 'floatDigits', 'floatRange', + 'decodeFloat', 'encodeFloat', 'exponent', + 'significand', 'scaleFloat', 'isNaN', 'isInfinite', + 'isDenomalized', 'isNegativeZero', 'isIEEE', + 'atan2', 'subtract', 'even', 'odd', 'gcd', + 'lcm', 'fromIntegral', 'realToFrac', + 'return', 'fail', 'fmap', + 'mapM', 'mapM_', 'sequence', 'sequence_', + 'id', 'const','flip', + 'until', 'asTypeOf', 'error', 'undefined', + 'seq','map','filter', 'head', + 'last', 'tail', 'init', 'null', 'length', + 'reverse', 'foldl', 'foldl1', 'foldr', + 'foldr1', 'and', 'or', 'any', 'all', 'sum', + 'product', 'concat', 'concatMap', 'maximum', + 'minimum', 'scanl', 'scanl1', 'scanr', 'scanr1', + 'iterate', 'repeat', 'cycle', 'take', 'drop', + 'splitAt', 'teakWhile', 'dropWhile', 'span', + 'break', 'elem', 'notElem', 'lookup', 'zip', + 'zip3', 'zipWith', 'zipWith3', 'unzip', 'unzip3', + 'lines', 'words', 'unlines', + 'unwords', 'showPrec', 'show', 'showList', + 'shows', 'showChar', 'showString', 'showParen', + 'readsPrec', 'readList', 'reads', 'readParen', + 'read', 'lex', 'putChar', 'putStr', 'putStrLn', + 'print', 'getChar', 'getLine', 'getContents', + 'interact', 'readFile', 'writeFile', 'appendFile', + 'readIO', 'readLn', 'ioError', 'userError', 'catch' + ), + /* here Prelude Types */ + 4 => array ( + 'Bool', 'Maybe', 'Either', 'Ord', 'Ordering', + 'Char', 'String', 'Eq', 'Enum', 'Bounded', + 'Int', 'Integer', 'Float', 'Double', 'Rational', + 'Num', 'Real', 'Integral', 'Fractional', + 'Floating', 'RealFrac', 'RealFloat', 'Monad', + 'Functor', 'Show', 'ShowS', 'Read', 'ReadS', + 'IO' + ), + /* finally Prelude Exceptions */ + 5 => array ( + 'IOError', 'IOException' + ) + ), + /* highlighting symbols is really important in Haskell */ + 'SYMBOLS' => array( + '|', '->', '<-', '@', '!', '::', '_', '~', '=', '?', + '&&', '||', '==', '/=', '<', '<=', '>', + '>=','+', '-', '*','/', '%', '**', '^', '^^', + '>>=', '>>', '=<<', '$', '.', ',', '$!', + '++', '!!' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, /* functions name are case seinsitive */ + 3 => true, /* types name too */ + 4 => true, /* finally exceptions too */ + 5 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #06c; font-weight: bold;', /* nice blue */ + 2 => 'color: #06c; font-weight: bold;', /* blue as well */ + 3 => 'font-weight: bold;', /* make the preduled functions bold */ + 4 => 'color: #cccc00; font-weight: bold;', /* give types a different bg */ + 5 => 'color: maroon;' + ), + 'COMMENTS' => array( + 1 => 'color: #5d478b; font-style: italic;', + 2 => 'color: #339933; font-weight: bold;', + 3 => 'color: #5d478b; font-style: italic;', /* light purple */ + 'MULTI' => 'color: #5d478b; font-style: italic;' /* light purple */ + ), + 'ESCAPE_CHAR' => array( + 0 => 'background-color: #3cb371; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: green;' + ), + 'STRINGS' => array( + 0 => 'background-color: #3cb371;' /* nice green */ + ), + 'NUMBERS' => array( + 0 => 'color: red;' /* pink */ + ), + 'METHODS' => array( + 1 => 'color: #060;' /* dark green */ + ), + 'REGEXPS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #339933; font-weight: bold;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + /* some of keywords are Prelude functions */ + 1 => '', + /* link to the wanted library */ + 2 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/{FNAME}.html', + /* link to Prelude functions */ + 3 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:{FNAME}', + /* link to Prelude types */ + 4 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:{FNAME}', + /* link to Prelude exceptions */ + 5 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:{FNAME}', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/hicest.php b/_piecrust/libs/Geshi/geshi/hicest.php new file mode 100644 index 0000000..532c83a --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/hicest.php @@ -0,0 +1,108 @@ + 'HicEst', + 'COMMENT_SINGLE' => array(1 => '!'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', '\''), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + '$cmd_line', 'abs', 'acos', 'alarm', 'alias', 'allocate', 'appendix', 'asin', 'atan', 'axis', 'beep', + 'call', 'ceiling', 'char', 'character', 'com', 'continue', 'cos', 'cosh', 'data', 'diffeq', 'dimension', 'dlg', 'dll', + 'do', 'edit', 'else', 'elseif', 'end', 'enddo', 'endif', 'exp', 'floor', 'function', 'fuz', 'goto', 'iand', 'ichar', + 'ieor', 'if', 'index', 'init', 'int', 'intpol', 'ior', 'key', 'len', 'len_trim', 'line', 'lock', 'log', 'max', 'maxloc', + 'min', 'minloc', 'mod', 'nint', 'not', 'open', 'pop', 'ran', 'read', 'real', 'return', 'rgb', 'roots', 'sign', 'sin', + 'sinh', 'solve', 'sort', 'subroutine', 'sum', 'system', 'tan', 'tanh', 'then', 'time', 'use', 'window', 'write', 'xeq' + ) + ), + 'SYMBOLS' => array( + 1 => array( + '(', ')', '+', '-', '*', '/', '=', '<', '>', '!', '^', ':', ',' + ), + 2 => array( + '$', '$$' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #ff0000;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + ), + 'METHODS' => array( + 0 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 1 => 'color: #339933;', + 2 => 'color: #ff0000;' + ), + 'REGEXPS' => array(), + 'SCRIPT' => array() + ), + 'URLS' => array(1 => ''), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/hq9plus.php b/_piecrust/libs/Geshi/geshi/hq9plus.php new file mode 100644 index 0000000..a06fdc8 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/hq9plus.php @@ -0,0 +1,104 @@ + 'HQ9+', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + ), + 'SYMBOLS' => array( + 'H', 'Q', '9', '+', 'h', 'q' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + ), + 'COMMENTS' => array( + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #a16000;' + ), + 'ESCAPE_CHAR' => array( + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'KEYWORDS' => GESHI_NEVER, + 'COMMENTS' => GESHI_NEVER, + 'STRINGS' => GESHI_NEVER, + 'REGEXPS' => GESHI_NEVER, + 'NUMBERS' => GESHI_NEVER + ) + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/html4strict.php b/_piecrust/libs/Geshi/geshi/html4strict.php new file mode 100644 index 0000000..6e0e2f0 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/html4strict.php @@ -0,0 +1,203 @@ + 'HTML', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 2 => array( + 'a', 'abbr', 'acronym', 'address', 'applet', + + 'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b', + + 'caption', 'center', 'cite', 'code', 'colgroup', 'col', + + 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', + + 'em', + + 'fieldset', 'font', 'form', 'frame', 'frameset', + + 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', + + 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i', + + 'kbd', + + 'label', 'legend', 'link', 'li', + + 'map', 'meta', + + 'noframes', 'noscript', + + 'object', 'ol', 'optgroup', 'option', + + 'param', 'pre', 'p', + + 'q', + + 'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's', + + 'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt', + + 'ul', 'u', + + 'var', + ), + 3 => array( + 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', + 'background', 'bgcolor', 'border', + 'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', + 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', + 'enctype', + 'face', 'for', 'frame', 'frameborder', + 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', + 'id', 'ismap', + 'label', 'lang', 'language', 'link', 'longdesc', + 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', + 'name', 'nohref', 'noresize', 'noshade', 'nowrap', + 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload', + 'profile', 'prompt', + 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', + 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', + 'tabindex', 'target', 'text', 'title', 'type', + 'usemap', + 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace', + 'width' + ) + ), + 'SYMBOLS' => array( + '/', '=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + -1 => 'color: #808080; font-style: italic;', // comments + 0 => 'color: #00bbdd;', + 1 => 'color: #ddbb00;', + 2 => 'color: #009900;' + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 2 => 'http://december.com/html/4/element/{FNAMEL}.html', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, + 'SCRIPT_DELIMITERS' => array( + -1 => array( + '' + ), + 0 => array( + ' '>' + ), + 1 => array( + '&' => ';' + ), + 2 => array( + '<' => '>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + -1 => false, + 0 => false, + 1 => false, + 2 => true + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 2 => array( + 'DISALLOWED_BEFORE' => '(?<=<|<\/)', + 'DISALLOWED_AFTER' => '(?=\s|\/|>)', + ) + ) + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/icon.php b/_piecrust/libs/Geshi/geshi/icon.php new file mode 100644 index 0000000..8852e77 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/icon.php @@ -0,0 +1,212 @@ + 'Icon', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', '\''), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'break', 'case', 'continue', 'create', 'default', 'do', 'else', + 'end', 'every', 'fail', 'for', 'if', 'import', 'initial', + 'initially', 'invocable', 'link', 'next', 'not', 'of', 'package', + 'procedure', 'record', 'repeat', 'return', 'switch', 'suspend', + 'then', 'to', 'until', 'while' + ), + 2 => array( + 'global', 'local', 'static' + ), + 3 => array( + 'allocated', 'ascii', 'clock', 'collections', + 'column', 'cset', 'current', 'date', 'dateline', 'digits', + 'dump', 'e', 'error', 'errornumber', 'errortext', + 'errorvalue', 'errout', 'eventcode', 'eventsource', 'eventvalue', + 'fail', 'features', 'file', 'host', 'input', 'lcase', + 'letters', 'level', 'line', 'main', 'now', 'null', + 'output', 'phi', 'pi', 'pos', 'progname', 'random', + 'regions', 'source', 'storage', 'subject', 'syserr', 'time', + 'trace', 'ucase', 'version', 'col', 'control', 'interval', + 'ldrag', 'lpress', 'lrelease', 'mdrag', 'meta', 'mpress', + 'mrelease', 'rdrag', 'resize', 'row', 'rpress', 'rrelease', + 'shift', 'window', 'x', 'y' + ), + 4 => array( + 'abs', 'acos', 'any', 'args', 'asin', 'atan', 'bal', 'center', 'char', + 'chmod', 'close', 'cofail', 'collect', 'copy', 'cos', 'cset', 'ctime', 'delay', 'delete', + 'detab', 'display', 'dtor', 'entab', 'errorclear', 'event', 'eventmask', 'EvGet', 'exit', + 'exp', 'fetch', 'fieldnames', 'find', 'flock', 'flush', 'function', 'get', 'getch', + 'getche', 'getenv', 'gettimeofday', 'globalnames', 'gtime', 'iand', 'icom', 'image', + 'insert', 'integer', 'ior', 'ishift', 'ixor', 'key', 'left', 'list', 'load', 'loadfunc', + 'localnames', 'log', 'many', 'map', 'match', 'member', 'mkdir', 'move', 'name', 'numeric', + 'open', 'opmask', 'ord', 'paramnames', 'parent', 'pipe', 'pop', 'pos', 'proc', 'pull', + 'push', 'put', 'read', 'reads', 'real', 'receive', 'remove', 'rename', 'repl', 'reverse', + 'right', 'rmdir', 'rtod', 'runerr', 'seek', 'select', 'send', 'seq', 'serial', 'set', + 'setenv', 'sort', 'sortf', 'sql', 'sqrt', 'stat', 'stop', 'string', 'system', 'tab', + 'table', 'tan', 'trap', 'trim', 'truncate', 'type', 'upto', 'utime', 'variable', 'where', + 'write', 'writes' + ), + 5 => array( + 'Active', 'Alert', 'Bg', 'Clip', 'Clone', 'Color', 'ColorValue', + 'CopyArea', 'Couple', 'DrawArc', 'DrawCircle', 'DrawCurve', 'DrawCylinder', 'DrawDisk', + 'DrawImage', 'DrawLine', 'DrawPoint', 'DrawPolygon', 'DrawRectangle', 'DrawSegment', + 'DrawSphere', 'DrawString', 'DrawTorus', 'EraseArea', 'Event', 'Fg', 'FillArc', + 'FillCircle', 'FillPolygon', 'FillRectangle', 'Font', 'FreeColor', 'GotoRC', 'GotoXY', + 'IdentifyMatrix', 'Lower', 'MatrixMode', 'NewColor', 'PaletteChars', 'PaletteColor', + 'PaletteKey', 'Pattern', 'Pending', 'Pixel', 'PopMatrix', 'PushMatrix', 'PushRotate', + 'PushScale', 'PushTranslate', 'QueryPointer', 'Raise', 'ReadImage', 'Refresh', 'Rotate', + 'Scale', 'Texcoord', 'TextWidth', 'Texture', 'Translate', 'Uncouple', 'WAttrib', + 'WDefault', 'WFlush', 'WindowContents', 'WriteImage', 'WSync' + ), + 6 => array( + 'define', 'include', 'ifdef', 'ifndef', 'else', 'endif', 'error', + 'line', 'undef' + ), + 7 => array( + '_V9', '_AMIGA', '_ACORN', '_CMS', '_MACINTOSH', '_MSDOS_386', + '_MS_WINDOWS_NT', '_MSDOS', '_MVS', '_OS2', '_POR', 'T', '_UNIX', '_POSIX', '_DBM', + '_VMS', '_ASCII', '_EBCDIC', '_CO_EXPRESSIONS', '_CONSOLE_WINDOW', '_DYNAMIC_LOADING', + '_EVENT_MONITOR', '_EXTERNAL_FUNCTIONS', '_KEYBOARD_FUNCTIONS', '_LARGE_INTEGERS', + '_MULTITASKING', '_PIPES', '_RECORD_IO', '_SYSTEM_FUNCTION', '_MESSAGING', '_GRAPHICS', + '_X_WINDOW_SYSTEM', '_MS_WINDOWS', '_WIN32', '_PRESENTATION_MGR', '_ARM_FUNCTIONS', + '_DOS_FUNCTIONS' + ), + 8 => array( + 'line' + ) + ), + 'SYMBOLS' => array( + 1 => array( + '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '\\', '%', '=', '<', '>', '!', '^', + '&', '|', '?', ':', ';', ',', '.', '~', '@' + ), + 2 => array( + '$(', '$)', '$<', '$>', '$' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #b1b100;', + 3 => 'color: #b1b100;', + 4 => 'color: #b1b100;', + 5 => 'color: #b1b100;', + 6 => 'color: #b1b100;', + 7 => 'color: #b1b100;', + 8 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + ), + 'METHODS' => array( + 0 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 1 => 'color: #339933;', + 2 => 'color: #b1b100;' + ), + 'REGEXPS' => array(), + 'SCRIPT' => array() + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array(1 => '.'), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array(), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 3 => array( + 'DISALLOWED_BEFORE' => '(?<=&)' + ), + 4 => array( + 'DISALLOWED_BEFORE' => "(? "(?![a-zA-Z0-9_\"\'])" + ), + 6 => array( + 'DISALLOWED_BEFORE' => '(?<=\$)' + ), + 8 => array( + 'DISALLOWED_BEFORE' => '(?<=#)' + ) + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/idl.php b/_piecrust/libs/Geshi/geshi/idl.php new file mode 100644 index 0000000..5e73027 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/idl.php @@ -0,0 +1,123 @@ + 'Uno Idl', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'published', 'get', 'set', 'service', 'singleton', 'type', 'module', 'interface', 'struct', + 'const', 'constants', 'exception', 'enum', 'raises', 'typedef' + ), + 2 => array( + 'bound', 'maybeambiguous', 'maybedefault', 'maybevoid', 'oneway', 'optional', + 'readonly', 'in', 'out', 'inout', 'attribute', 'transient', 'removable' + ), + 3 => array( + 'True', 'False', 'TRUE', 'FALSE' + ), + 4 => array( + 'string', 'long', 'byte', 'hyper', 'boolean', 'any', 'char', 'double', + 'void', 'sequence', 'unsigned' + ), + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':', ';', '...' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #990078; font-weight: bold', + 2 => 'color: #36dd1c;', + 3 => 'color: #990078; font-weight: bold', + 4 => 'color: #0000ec;' + ), + 'COMMENTS' => array( + 1 => 'color: #3f7f5f;', + 2 => 'color: #808080;', + 'MULTI' => 'color: #4080ff; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #666666; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #808080;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000dd;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + 1 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/ini.php b/_piecrust/libs/Geshi/geshi/ini.php new file mode 100644 index 0000000..692a1aa --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/ini.php @@ -0,0 +1,128 @@ + 'INI', + 'COMMENT_SINGLE' => array(0 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + ), + 'SYMBOLS' => array( + '[', ']', '=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + ), + 'COMMENTS' => array( + 0 => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => '' + ), + 'STRINGS' => array( + 0 => 'color: #933;' + ), + 'NUMBERS' => array( + 0 => '' + ), + 'METHODS' => array( + 0 => '' + ), + 'SYMBOLS' => array( + 0 => 'color: #000066; font-weight:bold;' + ), + 'REGEXPS' => array( + 0 => 'color: #000066; font-weight:bold;', + 1 => 'color: #000099;', + 2 => 'color: #660066;' + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + //Section names + 0 => '\[.+\]', + //Entry names + 1 => array( + GESHI_SEARCH => '^(\s*)([a-zA-Z0-9_\-]+)(\s*=)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + //Entry values + 2 => array( + // Evil hackery to get around GeSHi bug: <>" and ; are added so s can be matched + // Explicit match on variable names because if a comment is before the first < of the span + // gets chewed up... + GESHI_SEARCH => '([<>";a-zA-Z0-9_]+\s*)=(.*)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1=', + GESHI_AFTER => '' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/inno.php b/_piecrust/libs/Geshi/geshi/inno.php new file mode 100644 index 0000000..af2aab5 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/inno.php @@ -0,0 +1,212 @@ + 'Inno', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('(*' => '*)'), + 'CASE_KEYWORDS' => 0, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'Setup','Types','Components','Tasks','Dirs','Files','Icons','INI', + 'InstallDelete','Languages','Messages','CustomMessage', + 'LangOptions','Registry','RUN','UninstallDelete','UninstallRun', + 'app','win','sys','syswow64','src','sd','pf','pf32','pf64','cf', + 'cf32','cf64','tmp','fonts','dao','group','localappdata','sendto', + 'userappdata','commonappdata','userdesktop','commondesktop', + 'userdocs','commondocs','userfavorites','commonfavorites', + 'userprograms','commonprograms','userstartmenu','commonstartmenu', + 'userstartup','commonstartup','usertemplates','commontemplates' + ), + 2 => array( + 'nil', 'false', 'true', 'var', 'type', 'const','And', 'Array', 'As', 'Begin', 'Case', 'Class', 'Constructor', 'Destructor', 'Div', 'Do', 'DownTo', 'Else', + 'End', 'Except', 'File', 'Finally', 'For', 'Function', 'Goto', 'If', 'Implementation', 'In', 'Inherited', 'Interface', + 'Is', 'Mod', 'Not', 'Object', 'Of', 'On', 'Or', 'Packed', 'Procedure', 'Property', 'Raise', 'Record', + 'Repeat', 'Set', 'Shl', 'Shr', 'Then', 'ThreadVar', 'To', 'Try', 'Unit', 'Until', 'Uses', 'While', 'With', 'Xor', + + 'HKCC','HKCR','HKCU','HKLM','HKU','alwaysoverwrite','alwaysskipifsameorolder','append', + 'binary','classic','closeonexit','comparetimestamp','confirmoverwrite', + 'createkeyifdoesntexist','createonlyiffileexists','createvalueifdoesntexist', + 'deleteafterinstall','deletekey','deletevalue','dirifempty','dontcloseonexit', + 'dontcopy','dontcreatekey','disablenouninstallwarning','dword','exclusive','expandsz', + 'external','files','filesandordirs','fixed','fontisnttruetype','ignoreversion','iscustom','isreadme', + 'modern','multisz','new','noerror','none','normal','nowait','onlyifdestfileexists', + 'onlyifdoesntexist','onlyifnewer','overwrite','overwritereadonly','postinstall', + 'preservestringtype','promptifolder','regserver','regtypelib','restart','restartreplace', + 'runhidden','runmaximized','runminimized','sharedfile','shellexec','showcheckbox', + 'skipifnotsilent','skipifsilent','silent','skipifdoesntexist', + 'skipifsourcedoesntexist','sortfilesbyextension','unchecked','uninsalwaysuninstall', + 'uninsclearvalue','uninsdeleteentry','uninsdeletekey','uninsdeletekeyifempty', + 'uninsdeletesection','uninsdeletesectionifempty','uninsdeletevalue', + 'uninsneveruninstall','useapppaths','verysilent','waituntilidle' + ), + 3 => array( + 'Abs', 'Addr', 'AnsiCompareStr', 'AnsiCompareText', 'AnsiContainsStr', 'AnsiEndsStr', 'AnsiIndexStr', 'AnsiLeftStr', + 'AnsiLowerCase', 'AnsiMatchStr', 'AnsiMidStr', 'AnsiPos', 'AnsiReplaceStr', 'AnsiReverseString', 'AnsiRightStr', + 'AnsiStartsStr', 'AnsiUpperCase', 'ArcCos', 'ArcSin', 'ArcTan', 'Assigned', 'BeginThread', 'Bounds', 'CelsiusToFahrenheit', + 'ChangeFileExt', 'Chr', 'CompareStr', 'CompareText', 'Concat', 'Convert', 'Copy', 'Cos', 'CreateDir', 'CurrToStr', + 'CurrToStrF', 'Date', 'DateTimeToFileDate', 'DateTimeToStr', 'DateToStr', 'DayOfTheMonth', 'DayOfTheWeek', 'DayOfTheYear', + 'DayOfWeek', 'DaysBetween', 'DaysInAMonth', 'DaysInAYear', 'DaySpan', 'DegToRad', 'DeleteFile', 'DiskFree', 'DiskSize', + 'DupeString', 'EncodeDate', 'EncodeDateTime', 'EncodeTime', 'EndOfADay', 'EndOfAMonth', 'Eof', 'Eoln', 'Exp', 'ExtractFileDir', + 'ExtractFileDrive', 'ExtractFileExt', 'ExtractFileName', 'ExtractFilePath', 'FahrenheitToCelsius', 'FileAge', + 'FileDateToDateTime', 'FileExists', 'FilePos', 'FileSearch', 'FileSetDate', 'FileSize', 'FindClose', 'FindCmdLineSwitch', + 'FindFirst', 'FindNext', 'FloatToStr', 'FloatToStrF', 'Format', 'FormatCurr', 'FormatDateTime', 'FormatFloat', 'Frac', + 'GetCurrentDir', 'GetLastError', 'GetMem', 'High', 'IncDay', 'IncMinute', 'IncMonth', 'IncYear', 'InputBox', + 'InputQuery', 'Int', 'IntToHex', 'IntToStr', 'IOResult', 'IsInfinite', 'IsLeapYear', 'IsMultiThread', 'IsNaN', + 'LastDelimiter', 'Length', 'Ln', 'Lo', 'Log10', 'Low', 'LowerCase', 'Max', 'Mean', 'MessageDlg', 'MessageDlgPos', + 'MonthOfTheYear', 'Now', 'Odd', 'Ord', 'ParamCount', 'ParamStr', 'Pi', 'Point', 'PointsEqual', 'Pos', 'Pred', + 'Printer', 'PromptForFileName', 'PtInRect', 'RadToDeg', 'Random', 'RandomRange', 'RecodeDate', 'RecodeTime', 'Rect', + 'RemoveDir', 'RenameFile', 'Round', 'SeekEof', 'SeekEoln', 'SelectDirectory', 'SetCurrentDir', 'Sin', 'SizeOf', + 'Slice', 'Sqr', 'Sqrt', 'StringOfChar', 'StringReplace', 'StringToWideChar', 'StrToCurr', 'StrToDate', 'StrToDateTime', + 'StrToFloat', 'StrToInt', 'StrToInt64', 'StrToInt64Def', 'StrToIntDef', 'StrToTime', 'StuffString', 'Succ', 'Sum', 'Tan', + 'Time', 'TimeToStr', 'Tomorrow', 'Trunc', 'UpCase', 'UpperCase', 'VarType', 'WideCharToString', 'WrapText', 'Yesterday', + 'Append', 'AppendStr', 'Assign', 'AssignFile', 'AssignPrn', 'Beep', 'BlockRead', 'BlockWrite', 'Break', + 'ChDir', 'Close', 'CloseFile', 'Continue', 'DateTimeToString', 'Dec', 'DecodeDate', 'DecodeDateTime', + 'DecodeTime', 'Delete', 'Dispose', 'EndThread', 'Erase', 'Exclude', 'Exit', 'FillChar', 'Flush', 'FreeAndNil', + 'FreeMem', 'GetDir', 'GetLocaleFormatSettings', 'Halt', 'Inc', 'Include', 'Insert', 'MkDir', 'Move', 'New', + 'ProcessPath', 'Randomize', 'Read', 'ReadLn', 'ReallocMem', 'Rename', 'ReplaceDate', 'ReplaceTime', + 'Reset', 'ReWrite', 'RmDir', 'RunError', 'Seek', 'SetLength', 'SetString', 'ShowMessage', 'ShowMessageFmt', + 'ShowMessagePos', 'Str', 'Truncate', 'Val', 'Write', 'WriteLn', + + 'AdminPrivilegesRequired','AfterInstall','AllowCancelDuringInstall','AllowNoIcons','AllowRootDirectory','AllowUNCPath','AlwaysRestart','AlwaysShowComponentsList','AlwaysShowDirOnReadyPage','AlwaysShowGroupOnReadyPage ','AlwaysUsePersonalGroup','AppComments','AppContact','AppCopyright','AppendDefaultDirName', + 'AppendDefaultGroupName','AppId','AppModifyPath','AppMutex','AppName','AppPublisher', + 'AppPublisherURL','AppReadmeFile','AppSupportURL','AppUpdatesURL','AppVerName','AppVersion', + 'Attribs','BackColor','BackColor2','BackColorDirection','BackSolid','BeforeInstall', + 'ChangesAssociations','ChangesEnvironment','Check','CodeFile','Comment','Compression','CopyMode', + 'CreateAppDir','CreateUninstallRegKey','DefaultDirName','DefaultGroupName', + 'DefaultUserInfoName','DefaultUserInfoOrg','DefaultUserInfoSerial', + 'Description','DestDir','DestName','DirExistsWarning', + 'DisableDirPage','DisableFinishedPage', + 'DisableProgramGroupPage','DisableReadyMemo','DisableReadyPage', + 'DisableStartupPrompt','DiskClusterSize','DiskSliceSize','DiskSpaceMBLabel', + 'DiskSpanning','DontMergeDuplicateFiles','EnableDirDoesntExistWarning','Encryption', + 'Excludes','ExtraDiskSpaceRequired','Filename','Flags','FlatComponentsList','FontInstall', + 'GroupDescription','HotKey','IconFilename','IconIndex','InfoAfterFile','InfoBeforeFile', + 'InternalCompressLevel','Key','LanguageDetectionMethod', + 'LicenseFile','MergeDuplicateFiles','MessagesFile','MinVersion','Name', + 'OnlyBelowVersion','OutputBaseFilename','OutputManifestFile','OutputDir', + 'Parameters','Password','Permissions','PrivilegesRequired','ReserveBytes', + 'RestartIfNeededByRun','Root','RunOnceId','Section','SetupIconFile', + 'ShowComponentSizes','ShowLanguageDialog','ShowTasksTreeLines','SlicesPerDisk', + 'SolidCompression','Source','SourceDir','StatusMsg','Subkey', + 'TimeStampRounding','TimeStampsInUTC','TouchDate','TouchTime','Type', + 'UninstallDisplayIcon','UninstallDisplayName','UninstallFilesDir','UninstallIconFile', + 'UninstallLogMode','UninstallRestartComputer','UninstallStyle','Uninstallable', + 'UpdateUninstallLogAppName','UsePreviousAppDir','UsePreviousGroup', + 'UsePreviousTasks','UsePreviousSetupType','UsePreviousUserInfo', + 'UserInfoPage','UseSetupLdr','ValueData','ValueName','ValueType', + 'VersionInfoVersion','VersionInfoCompany','VersionInfoDescription','VersionInfoTextVersion', + 'WindowResizable','WindowShowCaption','WindowStartMaximized', + 'WindowVisible','WizardImageBackColor','WizardImageFile','WizardImageStretch','WizardSmallImageBackColor','WizardSmallImageFile','WizardStyle','WorkingDir' + ), + 4 => array( + 'AnsiChar', 'AnsiString', 'Boolean', 'Byte', 'Cardinal', 'Char', 'Comp', 'Currency', 'Double', 'Extended', + 'Int64', 'Integer', 'LongInt', 'LongWord', 'PAnsiChar', 'PAnsiString', 'PChar', 'PCurrency', 'PDateTime', + 'PExtended', 'PInt64', 'Pointer', 'PShortString', 'PString', 'PVariant', 'PWideChar', 'PWideString', + 'Real', 'Real48', 'ShortInt', 'ShortString', 'Single', 'SmallInt', 'String', 'TBits', 'TConvType', 'TDateTime', + 'Text', 'TextFile', 'TFloatFormat', 'TFormatSettings', 'TList', 'TObject', 'TOpenDialog', 'TPoint', + 'TPrintDialog', 'TRect', 'TReplaceFlags', 'TSaveDialog', 'TSearchRec', 'TStringList', 'TSysCharSet', + 'TThreadFunc', 'Variant', 'WideChar', 'WideString', 'Word' + ), + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '@', '%', '&', '*', '|', '/', '<', '>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;',/*bold Black*/ + 2 => 'color: #000000;font-style: italic;',/*Black*/ + 3 => 'color: #0000FF;',/*blue*/ + 4 => 'color: #CC0000;'/*red*/ + ), + 'COMMENTS' => array( + 1 => 'color: #33FF00; font-style: italic;', + 'MULTI' => 'color: #33FF00; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'REGEXPS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #000000; font-weight: bold;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/intercal.php b/_piecrust/libs/Geshi/geshi/intercal.php new file mode 100644 index 0000000..e123dae --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/intercal.php @@ -0,0 +1,122 @@ + 'INTERCAL', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + //Politeness + 1 => array( + 'DO', 'DOES', 'DONT', 'DON\'T', 'NOT', 'PLEASE', 'PLEASENT', 'PLEASEN\'T', 'MAYBE' + ), + //Statements + 2 => array( + 'STASH', 'RETRIEVE', 'NEXT', 'RESUME', 'FORGET', 'ABSTAIN', 'ABSTAINING', + 'COME', 'FROM', 'CALCULATING', 'REINSTATE', 'IGNORE', 'REMEMBER', + 'WRITE', 'IN', 'READ', 'OUT', 'GIVE', 'UP' + ) + ), + 'SYMBOLS' => array( + '.', ',', ':', ';', '#', + '~', '$', '&', '?', + '\'', '"', '<-' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000080; font-weight: bold;', + 2 => 'color: #000080; font-weight: bold;' + ), + 'COMMENTS' => array( + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'ESCAPE_CHAR' => array( + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + 1 => 'color: #808080; font-style: italic;' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 1 => '^\(\d+\)' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'COMMENTS' => GESHI_NEVER, + 'STRINGS' => GESHI_NEVER, + 'NUMBERS' => GESHI_NEVER + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/io.php b/_piecrust/libs/Geshi/geshi/io.php new file mode 100644 index 0000000..b6fcb81 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/io.php @@ -0,0 +1,138 @@ + 'Io', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'and', 'break', 'else', 'elseif', 'exit', 'for', 'foreach', 'if', 'ifFalse', 'ifNil', + 'ifTrue', 'or', 'pass', 'raise', 'return', 'then', 'try', 'wait', 'while', 'yield' + ), + 2 => array( + 'activate', 'activeCoroCount', 'asString', 'block', 'catch', 'clone', 'collectGarbage', + 'compileString', 'continue', 'do', 'doFile', 'doMessage', 'doString', 'forward', + 'getSlot', 'getenv', 'hasSlot', 'isActive', 'isNil', 'isResumable', 'list', 'message', + 'method', 'parent', 'pause', 'perform', 'performWithArgList', 'print', 'proto', + 'raiseResumable', 'removeSlot', 'resend', 'resume', 'schedulerSleepSeconds', 'self', + 'sender', 'setSchedulerSleepSeconds', 'setSlot', 'shallowCopy', 'slotNames', 'super', + 'system', 'thisBlock', 'thisContext', 'thisMessage', 'type', 'uniqueId', 'updateSlot', + 'write' + ), + 3 => array( + 'Array', 'AudioDevice', 'AudioMixer', 'Block', 'Box', 'Buffer', 'CFunction', 'CGI', + 'Color', 'Curses', 'DBM', 'DNSResolver', 'DOConnection', 'DOProxy', 'DOServer', + 'Date', 'Directory', 'Duration', 'DynLib', 'Error', 'Exception', 'FFT', 'File', + 'Fnmatch', 'Font', 'Future', 'GL', 'GLE', 'GLScissor', 'GLU', 'GLUCylinder', + 'GLUQuadric', 'GLUSphere', 'GLUT', 'Host', 'Image', 'Importer', 'LinkList', 'List', + 'Lobby', 'Locals', 'MD5', 'MP3Decoder', 'MP3Encoder', 'Map', 'Message', 'Movie', + 'NULL', 'Nil', 'Nop', 'Notifiction', 'Number', 'Object', 'OpenGL', 'Point', 'Protos', + 'Regex', 'SGMLTag', 'SQLite', 'Server', 'ShowMessage', 'SleepyCat', 'SleepyCatCursor', + 'Socket', 'SocketManager', 'Sound', 'Soup', 'Store', 'String', 'Tree', 'UDPSender', + 'UDPReceiver', 'URL', 'User', 'Warning', 'WeakLink' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/j.php b/_piecrust/libs/Geshi/geshi/j.php new file mode 100644 index 0000000..184385b --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/j.php @@ -0,0 +1,227 @@ + 'J', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + 1 => '/(? '/(?<=\bNote\b).*?$\s+\)(?:(?!\n)\s)*$/sm', //multiline comments in Note + 3 => "/'[^']*?$/m" //incomplete strings/open quotes + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'HARDQUOTE' => array("'", "'"), + 'HARDESCAPE' => array("'"), + 'HARDCHAR' => "'", + 'NUMBERS' => array( + //Some instances of infinity are not correctly handled by GeSHi NUMBERS currently + //There are two solutions labelled "infinity Method A" and "infinity Method B" + //infinity Method B - requires following adjustment to line 3349 of geshi.php + // preg_match('#\d#' becomes preg_match('#[\d_]#' + 0 => '\b(?:_?\d+(?:\.\d+)?(?:x|[bejprx]_?[\da-z]+(?:\.[\da-z]+)?)?)(?![\w\.\:])', //infinity Method A + //0 => '\b(?:_?\d+(?:\.\d+)?(?:x|[bejprx]_?[\da-z]+(?:\.[\da-z]+)?)?|__?)(?![\w\.\:])', //infinity Method B + ), + 'KEYWORDS' => array( + //Control words + 1 => array( + 'assert.', 'break.', 'case.', 'catch.', 'catcht.', 'continue.', 'do.', + 'else.', 'elseif.', 'end.', 'fcase.', 'for.', 'goto.', 'if.', 'label.', + 'return.', 'select.', 'throw.', 'trap.', 'try.', 'while.', 'whilst.' + ), + //Arguments + 2 => array( + 'm', 'n', 'u', 'v', 'x', 'y' + ), +/* +Commented out for now due to conflicts with Lang Check + //Primitives beginning with a symbol (except . or :) + 6 => array( + '=', '<', '<.', '<:', //verbs + '_:','>', '>.', '>:', + '+', '+.', '+:', '*', '*.', '*:', '-', '-.', '-:', '%', '%.', '%:', + '^', '^.', '$', '$.', '$:', '~.', '~:', '\|', '|.', '|:', + ',', ',.', ',:', ';', ';:', '#', '#.', '#:', '!', '/:', '\:', + '[', '[:', ']', '{', '{.', '{:', '{::', '}.', '}:', + '".', '":', '?', '?.', + '~', '\/;', '\\', '/.', '\\.', '}', //adverbs + '^:', ';.', '!.', '!:', //conj + '"', '`', '`:', '@', '@.', '@:', + '&', '&.', '&:', '&.:', + '_.', //nouns + '=.', '=:', //other + ), + //Primitives beginning with a letter or number + 7 => array( + 'A.', 'c.', 'C.', 'e.', 'E.', //verbs + 'i.', 'i:', 'I.', 'j.', 'L.', 'o.', + 'p.', 'p..', 'p:', 'q:', 'r.', 's:', 'u:', 'x:', + '_9:', '_8:', '_7:', '_6:', '_5:', '_4:', '_3:', '_2:', '_1:', + '0:', '1:', '2:', '3:', '4:', '5:', '6:', '7:', '8:', '9:', + 'b.', 'f.', 'M.', 't.', 't:', //adverbs + 'd.', 'D.', 'D:', 'H.', 'L:', 'S:', 'T.', //conj + 'a.', 'a:', //nouns + ), + //Primitives beginning with symbol . or : + 8 => array( + '..', '.:', '.', ':.', '::', ':', //conj + ), +*/ + ), + 'SYMBOLS' => array( + //Punctuation + 0 => array( + '(', ')' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, +// 6 => true, +// 7 => true, +// 8 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff; font-weight: bold;', + 2 => 'color: #0000cc; font-weight: bold;', +// 6 => 'color: #000000; font-weight: bold;', +// 7 => 'color: #000000; font-weight: bold;', +// 8 => 'color: #000000; font-weight: bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #666666; font-style: italic; font-weight: bold;', + 3 => 'color: #ff00ff; ', //open quote + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 'HARD' => 'font-weight: bold;', + 0 => '', + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 'HARD' => 'color: #ff0000;', + 0 => 'color: #ff0000;', + ), + 'NUMBERS' => array( + 0 => 'color: #009999; font-weight: bold;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #009900; font-weight: bold;' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff; font-weight: bold;', //for_xyz. - same as kw1 + 1 => 'color: #009999; font-weight: bold;' //infinity - same as nu0 + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', //'http://www.jsoftware.com/help/dictionary/ctrl.htm', + 2 => '', +// 6 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', +// 7 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', +// 8 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => '\b(for|goto|label)_[a-zA-Z]\w*\.', //for_xyz. - should be kw1 + 1 => '\b__?(?![\w\.\:])' //infinity - should be nu0 + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'BRACKETS' => GESHI_NEVER, + ), + 'KEYWORDS' => array( + //Control words + 2 => array( + 'DISALLOWED_BEFORE' => '(? '(?![\w\.\:])', + ), + //Primtives starting with a symbol (except . or :) + 6 => array( + 'DISALLOWED_BEFORE' => '(?!K)', // effect should be to allow anything + 'DISALLOWED_AFTER' => '(?=.*)', + ), + //Primtives starting with a letter + 7 => array( + 'DISALLOWED_BEFORE' => '(? '(?=.*)', + ), + //Primtives starting with symbol . or : + 8 => array( + 'DISALLOWED_BEFORE' => '(?<=\s)', + 'DISALLOWED_AFTER' => '(?=.*)', + ), + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/java.php b/_piecrust/libs/Geshi/geshi/java.php new file mode 100644 index 0000000..7fcc2e8 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/java.php @@ -0,0 +1,983 @@ + 'Java', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Import and Package directives (Basic Support only) + 2 => '/(?:(?<=import[\\n\\s])|(?<=package[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*([a-zA-Z0-9_]+|\*)(?=[\n\s;])/i', + // javadoc comments + 3 => '#/\*\*(?![\*\/]).*\*/#sU' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'for', 'foreach', 'if', 'else', 'while', 'do', + 'switch', 'case', 'return', 'public', + 'private', 'protected', 'extends', 'break', 'class', + 'new', 'try', 'catch', 'throws', 'finally', 'implements', + 'interface', 'throw', 'final', 'native', 'synchronized', 'this', + 'abstract', 'transient', 'instanceof', 'assert', 'continue', + 'default', 'enum', 'package', 'static', 'strictfp', 'super', + 'volatile', 'const', 'goto', 'import' + ), + 2 => array( + 'null', 'false', 'true' + ), + 3 => array( + 'AbstractAction', 'AbstractBorder', 'AbstractButton', + 'AbstractCellEditor', 'AbstractCollection', + 'AbstractColorChooserPanel', 'AbstractDocument', + 'AbstractDocument.AttributeContext', + 'AbstractDocument.Content', + 'AbstractDocument.ElementEdit', + 'AbstractLayoutCache', + 'AbstractLayoutCache.NodeDimensions', 'AbstractList', + 'AbstractListModel', 'AbstractMap', + 'AbstractMethodError', 'AbstractSequentialList', + 'AbstractSet', 'AbstractTableModel', + 'AbstractUndoableEdit', 'AbstractWriter', + 'AccessControlContext', 'AccessControlException', + 'AccessController', 'AccessException', 'Accessible', + 'AccessibleAction', 'AccessibleBundle', + 'AccessibleComponent', 'AccessibleContext', + 'AccessibleHyperlink', 'AccessibleHypertext', + 'AccessibleIcon', 'AccessibleObject', + 'AccessibleRelation', 'AccessibleRelationSet', + 'AccessibleResourceBundle', 'AccessibleRole', + 'AccessibleSelection', 'AccessibleState', + 'AccessibleStateSet', 'AccessibleTable', + 'AccessibleTableModelChange', 'AccessibleText', + 'AccessibleValue', 'Acl', 'AclEntry', + 'AclNotFoundException', 'Action', 'ActionEvent', + 'ActionListener', 'ActionMap', 'ActionMapUIResource', + 'Activatable', 'ActivateFailedException', + 'ActivationDesc', 'ActivationException', + 'ActivationGroup', 'ActivationGroupDesc', + 'ActivationGroupDesc.CommandEnvironment', + 'ActivationGroupID', 'ActivationID', + 'ActivationInstantiator', 'ActivationMonitor', + 'ActivationSystem', 'Activator', 'ActiveEvent', + 'Adjustable', 'AdjustmentEvent', + 'AdjustmentListener', 'Adler32', 'AffineTransform', + 'AffineTransformOp', 'AlgorithmParameterGenerator', + 'AlgorithmParameterGeneratorSpi', + 'AlgorithmParameters', 'AlgorithmParameterSpec', + 'AlgorithmParametersSpi', 'AllPermission', + 'AlphaComposite', 'AlreadyBound', + 'AlreadyBoundException', 'AlreadyBoundHelper', + 'AlreadyBoundHolder', 'AncestorEvent', + 'AncestorListener', 'Annotation', 'Any', 'AnyHolder', + 'AnySeqHelper', 'AnySeqHolder', 'Applet', + 'AppletContext', 'AppletInitializer', 'AppletStub', + 'ApplicationException', 'Arc2D', 'Arc2D.Double', + 'Arc2D.Float', 'Area', 'AreaAveragingScaleFilter', + 'ARG_IN', 'ARG_INOUT', 'ARG_OUT', + 'ArithmeticException', 'Array', + 'ArrayIndexOutOfBoundsException', 'ArrayList', + 'Arrays', 'ArrayStoreException', 'AsyncBoxView', + 'Attribute', 'AttributedCharacterIterator', + 'AttributedCharacterIterator.Attribute', + 'AttributedString', 'AttributeInUseException', + 'AttributeList', 'AttributeModificationException', + 'Attributes', 'Attributes.Name', 'AttributeSet', + 'AttributeSet.CharacterAttribute', + 'AttributeSet.ColorAttribute', + 'AttributeSet.FontAttribute', + 'AttributeSet.ParagraphAttribute', 'AudioClip', + 'AudioFileFormat', 'AudioFileFormat.Type', + 'AudioFileReader', 'AudioFileWriter', 'AudioFormat', + 'AudioFormat.Encoding', 'AudioInputStream', + 'AudioPermission', 'AudioSystem', + 'AuthenticationException', + 'AuthenticationNotSupportedException', + 'Authenticator', 'Autoscroll', 'AWTError', + 'AWTEvent', 'AWTEventListener', + 'AWTEventMulticaster', 'AWTException', + 'AWTPermission', 'BadKind', 'BadLocationException', + 'BAD_CONTEXT', 'BAD_INV_ORDER', 'BAD_OPERATION', + 'BAD_PARAM', 'BAD_POLICY', 'BAD_POLICY_TYPE', + 'BAD_POLICY_VALUE', 'BAD_TYPECODE', 'BandCombineOp', + 'BandedSampleModel', 'BasicArrowButton', + 'BasicAttribute', 'BasicAttributes', 'BasicBorders', + 'BasicBorders.ButtonBorder', + 'BasicBorders.FieldBorder', + 'BasicBorders.MarginBorder', + 'BasicBorders.MenuBarBorder', + 'BasicBorders.RadioButtonBorder', + 'BasicBorders.SplitPaneBorder', + 'BasicBorders.ToggleButtonBorder', + 'BasicButtonListener', 'BasicButtonUI', + 'BasicCheckBoxMenuItemUI', 'BasicCheckBoxUI', + 'BasicColorChooserUI', 'BasicComboBoxEditor', + 'BasicComboBoxEditor.UIResource', + 'BasicComboBoxRenderer', + 'BasicComboBoxRenderer.UIResource', + 'BasicComboBoxUI', 'BasicComboPopup', + 'BasicDesktopIconUI', 'BasicDesktopPaneUI', + 'BasicDirectoryModel', 'BasicEditorPaneUI', + 'BasicFileChooserUI', 'BasicGraphicsUtils', + 'BasicHTML', 'BasicIconFactory', + 'BasicInternalFrameTitlePane', + 'BasicInternalFrameUI', 'BasicLabelUI', + 'BasicListUI', 'BasicLookAndFeel', 'BasicMenuBarUI', + 'BasicMenuItemUI', 'BasicMenuUI', + 'BasicOptionPaneUI', + 'BasicOptionPaneUI.ButtonAreaLayout', 'BasicPanelUI', + 'BasicPasswordFieldUI', 'BasicPermission', + 'BasicPopupMenuSeparatorUI', 'BasicPopupMenuUI', + 'BasicProgressBarUI', 'BasicRadioButtonMenuItemUI', + 'BasicRadioButtonUI', 'BasicRootPaneUI', + 'BasicScrollBarUI', 'BasicScrollPaneUI', + 'BasicSeparatorUI', 'BasicSliderUI', + 'BasicSplitPaneDivider', 'BasicSplitPaneUI', + 'BasicStroke', 'BasicTabbedPaneUI', + 'BasicTableHeaderUI', 'BasicTableUI', + 'BasicTextAreaUI', 'BasicTextFieldUI', + 'BasicTextPaneUI', 'BasicTextUI', + 'BasicTextUI.BasicCaret', + 'BasicTextUI.BasicHighlighter', + 'BasicToggleButtonUI', 'BasicToolBarSeparatorUI', + 'BasicToolBarUI', 'BasicToolTipUI', 'BasicTreeUI', + 'BasicViewportUI', 'BatchUpdateException', + 'BeanContext', 'BeanContextChild', + 'BeanContextChildComponentProxy', + 'BeanContextChildSupport', + 'BeanContextContainerProxy', 'BeanContextEvent', + 'BeanContextMembershipEvent', + 'BeanContextMembershipListener', 'BeanContextProxy', + 'BeanContextServiceAvailableEvent', + 'BeanContextServiceProvider', + 'BeanContextServiceProviderBeanInfo', + 'BeanContextServiceRevokedEvent', + 'BeanContextServiceRevokedListener', + 'BeanContextServices', 'BeanContextServicesListener', + 'BeanContextServicesSupport', + 'BeanContextServicesSupport.BCSSServiceProvider', + 'BeanContextSupport', + 'BeanContextSupport.BCSIterator', 'BeanDescriptor', + 'BeanInfo', 'Beans', 'BevelBorder', 'BigDecimal', + 'BigInteger', 'BinaryRefAddr', 'BindException', + 'Binding', 'BindingHelper', 'BindingHolder', + 'BindingIterator', 'BindingIteratorHelper', + 'BindingIteratorHolder', 'BindingIteratorOperations', + 'BindingListHelper', 'BindingListHolder', + 'BindingType', 'BindingTypeHelper', + 'BindingTypeHolder', 'BitSet', 'Blob', 'BlockView', + 'Book', 'Boolean', 'BooleanControl', + 'BooleanControl.Type', 'BooleanHolder', + 'BooleanSeqHelper', 'BooleanSeqHolder', 'Border', + 'BorderFactory', 'BorderLayout', 'BorderUIResource', + 'BorderUIResource.BevelBorderUIResource', + 'BorderUIResource.CompoundBorderUIResource', + 'BorderUIResource.EmptyBorderUIResource', + 'BorderUIResource.EtchedBorderUIResource', + 'BorderUIResource.LineBorderUIResource', + 'BorderUIResource.MatteBorderUIResource', + 'BorderUIResource.TitledBorderUIResource', + 'BoundedRangeModel', 'Bounds', 'Box', 'Box.Filler', + 'BoxedValueHelper', 'BoxLayout', 'BoxView', + 'BreakIterator', 'BufferedImage', + 'BufferedImageFilter', 'BufferedImageOp', + 'BufferedInputStream', 'BufferedOutputStream', + 'BufferedReader', 'BufferedWriter', 'Button', + 'ButtonGroup', 'ButtonModel', 'ButtonUI', 'Byte', + 'ByteArrayInputStream', 'ByteArrayOutputStream', + 'ByteHolder', 'ByteLookupTable', 'Calendar', + 'CallableStatement', 'CannotProceed', + 'CannotProceedException', 'CannotProceedHelper', + 'CannotProceedHolder', 'CannotRedoException', + 'CannotUndoException', 'Canvas', 'CardLayout', + 'Caret', 'CaretEvent', 'CaretListener', 'CellEditor', + 'CellEditorListener', 'CellRendererPane', + 'Certificate', 'Certificate.CertificateRep', + 'CertificateEncodingException', + 'CertificateException', + 'CertificateExpiredException', 'CertificateFactory', + 'CertificateFactorySpi', + 'CertificateNotYetValidException', + 'CertificateParsingException', + 'ChangedCharSetException', 'ChangeEvent', + 'ChangeListener', 'Character', 'Character.Subset', + 'Character.UnicodeBlock', 'CharacterIterator', + 'CharArrayReader', 'CharArrayWriter', + 'CharConversionException', 'CharHolder', + 'CharSeqHelper', 'CharSeqHolder', 'Checkbox', + 'CheckboxGroup', 'CheckboxMenuItem', + 'CheckedInputStream', 'CheckedOutputStream', + 'Checksum', 'Choice', 'ChoiceFormat', 'Class', + 'ClassCastException', 'ClassCircularityError', + 'ClassDesc', 'ClassFormatError', 'ClassLoader', + 'ClassNotFoundException', 'Clip', 'Clipboard', + 'ClipboardOwner', 'Clob', 'Cloneable', + 'CloneNotSupportedException', 'CMMException', + 'CodeSource', 'CollationElementIterator', + 'CollationKey', 'Collator', 'Collection', + 'Collections', 'Color', + 'ColorChooserComponentFactory', 'ColorChooserUI', + 'ColorConvertOp', 'ColorModel', + 'ColorSelectionModel', 'ColorSpace', + 'ColorUIResource', 'ComboBoxEditor', 'ComboBoxModel', + 'ComboBoxUI', 'ComboPopup', 'CommunicationException', + 'COMM_FAILURE', 'Comparable', 'Comparator', + 'Compiler', 'CompletionStatus', + 'CompletionStatusHelper', 'Component', + 'ComponentAdapter', 'ComponentColorModel', + 'ComponentEvent', 'ComponentInputMap', + 'ComponentInputMapUIResource', 'ComponentListener', + 'ComponentOrientation', 'ComponentSampleModel', + 'ComponentUI', 'ComponentView', 'Composite', + 'CompositeContext', 'CompositeName', 'CompositeView', + 'CompoundBorder', 'CompoundControl', + 'CompoundControl.Type', 'CompoundEdit', + 'CompoundName', 'ConcurrentModificationException', + 'ConfigurationException', 'ConnectException', + 'ConnectIOException', 'Connection', 'Constructor', 'Container', + 'ContainerAdapter', 'ContainerEvent', + 'ContainerListener', 'ContentHandler', + 'ContentHandlerFactory', 'ContentModel', 'Context', + 'ContextList', 'ContextNotEmptyException', + 'ContextualRenderedImageFactory', 'Control', + 'Control.Type', 'ControlFactory', + 'ControllerEventListener', 'ConvolveOp', 'CRC32', + 'CRL', 'CRLException', 'CropImageFilter', 'CSS', + 'CSS.Attribute', 'CTX_RESTRICT_SCOPE', + 'CubicCurve2D', 'CubicCurve2D.Double', + 'CubicCurve2D.Float', 'Current', 'CurrentHelper', + 'CurrentHolder', 'CurrentOperations', 'Cursor', + 'Customizer', 'CustomMarshal', 'CustomValue', + 'DatabaseMetaData', 'DataBuffer', 'DataBufferByte', + 'DataBufferInt', 'DataBufferShort', + 'DataBufferUShort', 'DataFlavor', + 'DataFormatException', 'DatagramPacket', + 'DatagramSocket', 'DatagramSocketImpl', + 'DatagramSocketImplFactory', 'DataInput', + 'DataInputStream', 'DataLine', 'DataLine.Info', + 'DataOutput', 'DataOutputStream', + 'DataTruncation', 'DATA_CONVERSION', 'Date', + 'DateFormat', 'DateFormatSymbols', 'DebugGraphics', + 'DecimalFormat', 'DecimalFormatSymbols', + 'DefaultBoundedRangeModel', 'DefaultButtonModel', + 'DefaultCaret', 'DefaultCellEditor', + 'DefaultColorSelectionModel', 'DefaultComboBoxModel', + 'DefaultDesktopManager', 'DefaultEditorKit', + 'DefaultEditorKit.BeepAction', + 'DefaultEditorKit.CopyAction', + 'DefaultEditorKit.CutAction', + 'DefaultEditorKit.DefaultKeyTypedAction', + 'DefaultEditorKit.InsertBreakAction', + 'DefaultEditorKit.InsertContentAction', + 'DefaultEditorKit.InsertTabAction', + 'DefaultEditorKit.PasteAction,', + 'DefaultFocusManager', 'DefaultHighlighter', + 'DefaultHighlighter.DefaultHighlightPainter', + 'DefaultListCellRenderer', + 'DefaultListCellRenderer.UIResource', + 'DefaultListModel', 'DefaultListSelectionModel', + 'DefaultMenuLayout', 'DefaultMetalTheme', + 'DefaultMutableTreeNode', + 'DefaultSingleSelectionModel', + 'DefaultStyledDocument', + 'DefaultStyledDocument.AttributeUndoableEdit', + 'DefaultStyledDocument.ElementSpec', + 'DefaultTableCellRenderer', + 'DefaultTableCellRenderer.UIResource', + 'DefaultTableColumnModel', 'DefaultTableModel', + 'DefaultTextUI', 'DefaultTreeCellEditor', + 'DefaultTreeCellRenderer', 'DefaultTreeModel', + 'DefaultTreeSelectionModel', 'DefinitionKind', + 'DefinitionKindHelper', 'Deflater', + 'DeflaterOutputStream', 'Delegate', 'DesignMode', + 'DesktopIconUI', 'DesktopManager', 'DesktopPaneUI', + 'DGC', 'Dialog', 'Dictionary', 'DigestException', + 'DigestInputStream', 'DigestOutputStream', + 'Dimension', 'Dimension2D', 'DimensionUIResource', + 'DirContext', 'DirectColorModel', 'DirectoryManager', + 'DirObjectFactory', 'DirStateFactory', + 'DirStateFactory.Result', 'DnDConstants', 'Document', + 'DocumentEvent', 'DocumentEvent.ElementChange', + 'DocumentEvent.EventType', 'DocumentListener', + 'DocumentParser', 'DomainCombiner', 'DomainManager', + 'DomainManagerOperations', 'Double', 'DoubleHolder', + 'DoubleSeqHelper', 'DoubleSeqHolder', + 'DragGestureEvent', 'DragGestureListener', + 'DragGestureRecognizer', 'DragSource', + 'DragSourceContext', 'DragSourceDragEvent', + 'DragSourceDropEvent', 'DragSourceEvent', + 'DragSourceListener', 'Driver', 'DriverManager', + 'DriverPropertyInfo', 'DropTarget', + 'DropTarget.DropTargetAutoScroller', + 'DropTargetContext', 'DropTargetDragEvent', + 'DropTargetDropEvent', 'DropTargetEvent', + 'DropTargetListener', 'DSAKey', + 'DSAKeyPairGenerator', 'DSAParameterSpec', + 'DSAParams', 'DSAPrivateKey', 'DSAPrivateKeySpec', + 'DSAPublicKey', 'DSAPublicKeySpec', 'DTD', + 'DTDConstants', 'DynamicImplementation', 'DynAny', + 'DynArray', 'DynEnum', 'DynFixed', 'DynSequence', + 'DynStruct', 'DynUnion', 'DynValue', 'EditorKit', + 'Element', 'ElementIterator', 'Ellipse2D', + 'Ellipse2D.Double', 'Ellipse2D.Float', 'EmptyBorder', + 'EmptyStackException', 'EncodedKeySpec', 'Entity', + 'EnumControl', 'EnumControl.Type', 'Enumeration', + 'Environment', 'EOFException', 'Error', + 'EtchedBorder', 'Event', 'EventContext', + 'EventDirContext', 'EventListener', + 'EventListenerList', 'EventObject', 'EventQueue', + 'EventSetDescriptor', 'Exception', + 'ExceptionInInitializerError', 'ExceptionList', + 'ExpandVetoException', 'ExportException', + 'ExtendedRequest', 'ExtendedResponse', + 'Externalizable', 'FeatureDescriptor', 'Field', + 'FieldNameHelper', 'FieldPosition', 'FieldView', + 'File', 'FileChooserUI', 'FileDescriptor', + 'FileDialog', 'FileFilter', + 'FileInputStream', 'FilenameFilter', 'FileNameMap', + 'FileNotFoundException', 'FileOutputStream', + 'FilePermission', 'FileReader', 'FileSystemView', + 'FileView', 'FileWriter', 'FilteredImageSource', + 'FilterInputStream', 'FilterOutputStream', + 'FilterReader', 'FilterWriter', + 'FixedHeightLayoutCache', 'FixedHolder', + 'FlatteningPathIterator', 'FlavorMap', 'Float', + 'FloatControl', 'FloatControl.Type', 'FloatHolder', + 'FloatSeqHelper', 'FloatSeqHolder', 'FlowLayout', + 'FlowView', 'FlowView.FlowStrategy', 'FocusAdapter', + 'FocusEvent', 'FocusListener', 'FocusManager', + 'Font', 'FontFormatException', 'FontMetrics', + 'FontRenderContext', 'FontUIResource', 'Format', + 'FormatConversionProvider', 'FormView', 'Frame', + 'FREE_MEM', 'GapContent', 'GeneralPath', + 'GeneralSecurityException', 'GlyphJustificationInfo', + 'GlyphMetrics', 'GlyphVector', 'GlyphView', + 'GlyphView.GlyphPainter', 'GradientPaint', + 'GraphicAttribute', 'Graphics', 'Graphics2D', + 'GraphicsConfigTemplate', 'GraphicsConfiguration', + 'GraphicsDevice', 'GraphicsEnvironment', + 'GrayFilter', 'GregorianCalendar', + 'GridBagConstraints', 'GridBagLayout', 'GridLayout', + 'Group', 'Guard', 'GuardedObject', 'GZIPInputStream', + 'GZIPOutputStream', 'HasControls', 'HashMap', + 'HashSet', 'Hashtable', 'HierarchyBoundsAdapter', + 'HierarchyBoundsListener', 'HierarchyEvent', + 'HierarchyListener', 'Highlighter', + 'Highlighter.Highlight', + 'Highlighter.HighlightPainter', 'HTML', + 'HTML.Attribute', 'HTML.Tag', 'HTML.UnknownTag', + 'HTMLDocument', 'HTMLDocument.Iterator', + 'HTMLEditorKit', 'HTMLEditorKit.HTMLFactory', + 'HTMLEditorKit.HTMLTextAction', + 'HTMLEditorKit.InsertHTMLTextAction', + 'HTMLEditorKit.LinkController', + 'HTMLEditorKit.Parser', + 'HTMLEditorKit.ParserCallback', + 'HTMLFrameHyperlinkEvent', 'HTMLWriter', + 'HttpURLConnection', 'HyperlinkEvent', + 'HyperlinkEvent.EventType', 'HyperlinkListener', + 'ICC_ColorSpace', 'ICC_Profile', 'ICC_ProfileGray', + 'ICC_ProfileRGB', 'Icon', 'IconUIResource', + 'IconView', 'IdentifierHelper', 'Identity', + 'IdentityScope', 'IDLEntity', 'IDLType', + 'IDLTypeHelper', 'IDLTypeOperations', + 'IllegalAccessError', 'IllegalAccessException', + 'IllegalArgumentException', + 'IllegalComponentStateException', + 'IllegalMonitorStateException', + 'IllegalPathStateException', 'IllegalStateException', + 'IllegalThreadStateException', 'Image', + 'ImageConsumer', 'ImageFilter', + 'ImageGraphicAttribute', 'ImageIcon', + 'ImageObserver', 'ImageProducer', + 'ImagingOpException', 'IMP_LIMIT', + 'IncompatibleClassChangeError', + 'InconsistentTypeCode', 'IndexColorModel', + 'IndexedPropertyDescriptor', + 'IndexOutOfBoundsException', 'IndirectionException', + 'InetAddress', 'Inflater', 'InflaterInputStream', + 'InheritableThreadLocal', 'InitialContext', + 'InitialContextFactory', + 'InitialContextFactoryBuilder', 'InitialDirContext', + 'INITIALIZE', 'Initializer', 'InitialLdapContext', + 'InlineView', 'InputContext', 'InputEvent', + 'InputMap', 'InputMapUIResource', 'InputMethod', + 'InputMethodContext', 'InputMethodDescriptor', + 'InputMethodEvent', 'InputMethodHighlight', + 'InputMethodListener', 'InputMethodRequests', + 'InputStream', + 'InputStreamReader', 'InputSubset', 'InputVerifier', + 'Insets', 'InsetsUIResource', 'InstantiationError', + 'InstantiationException', 'Instrument', + 'InsufficientResourcesException', 'Integer', + 'INTERNAL', 'InternalError', 'InternalFrameAdapter', + 'InternalFrameEvent', 'InternalFrameListener', + 'InternalFrameUI', 'InterruptedException', + 'InterruptedIOException', + 'InterruptedNamingException', 'INTF_REPOS', + 'IntHolder', 'IntrospectionException', + 'Introspector', 'Invalid', + 'InvalidAlgorithmParameterException', + 'InvalidAttributeIdentifierException', + 'InvalidAttributesException', + 'InvalidAttributeValueException', + 'InvalidClassException', + 'InvalidDnDOperationException', + 'InvalidKeyException', 'InvalidKeySpecException', + 'InvalidMidiDataException', 'InvalidName', + 'InvalidNameException', + 'InvalidNameHelper', 'InvalidNameHolder', + 'InvalidObjectException', + 'InvalidParameterException', + 'InvalidParameterSpecException', + 'InvalidSearchControlsException', + 'InvalidSearchFilterException', 'InvalidSeq', + 'InvalidTransactionException', 'InvalidValue', + 'INVALID_TRANSACTION', 'InvocationEvent', + 'InvocationHandler', 'InvocationTargetException', + 'InvokeHandler', 'INV_FLAG', 'INV_IDENT', + 'INV_OBJREF', 'INV_POLICY', 'IOException', + 'IRObject', 'IRObjectOperations', 'IstringHelper', + 'ItemEvent', 'ItemListener', 'ItemSelectable', + 'Iterator', 'JApplet', 'JarEntry', 'JarException', + 'JarFile', 'JarInputStream', 'JarOutputStream', + 'JarURLConnection', 'JButton', 'JCheckBox', + 'JCheckBoxMenuItem', 'JColorChooser', 'JComboBox', + 'JComboBox.KeySelectionManager', 'JComponent', + 'JDesktopPane', 'JDialog', 'JEditorPane', + 'JFileChooser', 'JFrame', 'JInternalFrame', + 'JInternalFrame.JDesktopIcon', 'JLabel', + 'JLayeredPane', 'JList', 'JMenu', 'JMenuBar', + 'JMenuItem', 'JobAttributes', + 'JobAttributes.DefaultSelectionType', + 'JobAttributes.DestinationType', + 'JobAttributes.DialogType', + 'JobAttributes.MultipleDocumentHandlingType', + 'JobAttributes.SidesType', 'JOptionPane', 'JPanel', + 'JPasswordField', 'JPopupMenu', + 'JPopupMenu.Separator', 'JProgressBar', + 'JRadioButton', 'JRadioButtonMenuItem', 'JRootPane', + 'JScrollBar', 'JScrollPane', 'JSeparator', 'JSlider', + 'JSplitPane', 'JTabbedPane', 'JTable', + 'JTableHeader', 'JTextArea', 'JTextComponent', + 'JTextComponent.KeyBinding', 'JTextField', + 'JTextPane', 'JToggleButton', + 'JToggleButton.ToggleButtonModel', 'JToolBar', + 'JToolBar.Separator', 'JToolTip', 'JTree', + 'JTree.DynamicUtilTreeNode', + 'JTree.EmptySelectionModel', 'JViewport', 'JWindow', + 'Kernel', 'Key', 'KeyAdapter', 'KeyEvent', + 'KeyException', 'KeyFactory', 'KeyFactorySpi', + 'KeyListener', 'KeyManagementException', 'Keymap', + 'KeyPair', 'KeyPairGenerator', 'KeyPairGeneratorSpi', + 'KeySpec', 'KeyStore', 'KeyStoreException', + 'KeyStoreSpi', 'KeyStroke', 'Label', 'LabelUI', + 'LabelView', 'LastOwnerException', + 'LayeredHighlighter', + 'LayeredHighlighter.LayerPainter', 'LayoutManager', + 'LayoutManager2', 'LayoutQueue', 'LdapContext', + 'LdapReferralException', 'Lease', + 'LimitExceededException', 'Line', 'Line.Info', + 'Line2D', 'Line2D.Double', 'Line2D.Float', + 'LineBorder', 'LineBreakMeasurer', 'LineEvent', + 'LineEvent.Type', 'LineListener', 'LineMetrics', + 'LineNumberInputStream', 'LineNumberReader', + 'LineUnavailableException', 'LinkageError', + 'LinkedList', 'LinkException', 'LinkLoopException', + 'LinkRef', 'List', 'ListCellRenderer', + 'ListDataEvent', 'ListDataListener', 'ListIterator', + 'ListModel', 'ListResourceBundle', + 'ListSelectionEvent', 'ListSelectionListener', + 'ListSelectionModel', 'ListUI', 'ListView', + 'LoaderHandler', 'Locale', 'LocateRegistry', + 'LogStream', 'Long', 'LongHolder', + 'LongLongSeqHelper', 'LongLongSeqHolder', + 'LongSeqHelper', 'LongSeqHolder', 'LookAndFeel', + 'LookupOp', 'LookupTable', 'MalformedLinkException', + 'MalformedURLException', 'Manifest', 'Map', + 'Map.Entry', 'MARSHAL', 'MarshalException', + 'MarshalledObject', 'Math', 'MatteBorder', + 'MediaTracker', 'Member', 'MemoryImageSource', + 'Menu', 'MenuBar', 'MenuBarUI', 'MenuComponent', + 'MenuContainer', 'MenuDragMouseEvent', + 'MenuDragMouseListener', 'MenuElement', 'MenuEvent', + 'MenuItem', 'MenuItemUI', 'MenuKeyEvent', + 'MenuKeyListener', 'MenuListener', + 'MenuSelectionManager', 'MenuShortcut', + 'MessageDigest', 'MessageDigestSpi', 'MessageFormat', + 'MetaEventListener', 'MetalBorders', + 'MetalBorders.ButtonBorder', + 'MetalBorders.Flush3DBorder', + 'MetalBorders.InternalFrameBorder', + 'MetalBorders.MenuBarBorder', + 'MetalBorders.MenuItemBorder', + 'MetalBorders.OptionDialogBorder', + 'MetalBorders.PaletteBorder', + 'MetalBorders.PopupMenuBorder', + 'MetalBorders.RolloverButtonBorder', + 'MetalBorders.ScrollPaneBorder', + 'MetalBorders.TableHeaderBorder', + 'MetalBorders.TextFieldBorder', + 'MetalBorders.ToggleButtonBorder', + 'MetalBorders.ToolBarBorder', 'MetalButtonUI', + 'MetalCheckBoxIcon', 'MetalCheckBoxUI', + 'MetalComboBoxButton', 'MetalComboBoxEditor', + 'MetalComboBoxEditor.UIResource', + 'MetalComboBoxIcon', 'MetalComboBoxUI', + 'MetalDesktopIconUI', 'MetalFileChooserUI', + 'MetalIconFactory', 'MetalIconFactory.FileIcon16', + 'MetalIconFactory.FolderIcon16', + 'MetalIconFactory.PaletteCloseIcon', + 'MetalIconFactory.TreeControlIcon', + 'MetalIconFactory.TreeFolderIcon', + 'MetalIconFactory.TreeLeafIcon', + 'MetalInternalFrameTitlePane', + 'MetalInternalFrameUI', 'MetalLabelUI', + 'MetalLookAndFeel', 'MetalPopupMenuSeparatorUI', + 'MetalProgressBarUI', 'MetalRadioButtonUI', + 'MetalScrollBarUI', 'MetalScrollButton', + 'MetalScrollPaneUI', 'MetalSeparatorUI', + 'MetalSliderUI', 'MetalSplitPaneUI', + 'MetalTabbedPaneUI', 'MetalTextFieldUI', + 'MetalTheme', 'MetalToggleButtonUI', + 'MetalToolBarUI', 'MetalToolTipUI', 'MetalTreeUI', + 'MetaMessage', 'Method', 'MethodDescriptor', + 'MidiChannel', 'MidiDevice', 'MidiDevice.Info', + 'MidiDeviceProvider', 'MidiEvent', 'MidiFileFormat', + 'MidiFileReader', 'MidiFileWriter', 'MidiMessage', + 'MidiSystem', 'MidiUnavailableException', + 'MimeTypeParseException', 'MinimalHTMLWriter', + 'MissingResourceException', 'Mixer', 'Mixer.Info', + 'MixerProvider', 'ModificationItem', 'Modifier', + 'MouseAdapter', 'MouseDragGestureRecognizer', + 'MouseEvent', 'MouseInputAdapter', + 'MouseInputListener', 'MouseListener', + 'MouseMotionAdapter', 'MouseMotionListener', + 'MultiButtonUI', 'MulticastSocket', + 'MultiColorChooserUI', 'MultiComboBoxUI', + 'MultiDesktopIconUI', 'MultiDesktopPaneUI', + 'MultiFileChooserUI', 'MultiInternalFrameUI', + 'MultiLabelUI', 'MultiListUI', 'MultiLookAndFeel', + 'MultiMenuBarUI', 'MultiMenuItemUI', + 'MultiOptionPaneUI', 'MultiPanelUI', + 'MultiPixelPackedSampleModel', 'MultipleMaster', + 'MultiPopupMenuUI', 'MultiProgressBarUI', + 'MultiScrollBarUI', 'MultiScrollPaneUI', + 'MultiSeparatorUI', 'MultiSliderUI', + 'MultiSplitPaneUI', 'MultiTabbedPaneUI', + 'MultiTableHeaderUI', 'MultiTableUI', 'MultiTextUI', + 'MultiToolBarUI', 'MultiToolTipUI', 'MultiTreeUI', + 'MultiViewportUI', 'MutableAttributeSet', + 'MutableComboBoxModel', 'MutableTreeNode', 'Name', + 'NameAlreadyBoundException', 'NameClassPair', + 'NameComponent', 'NameComponentHelper', + 'NameComponentHolder', 'NamedValue', 'NameHelper', + 'NameHolder', 'NameNotFoundException', 'NameParser', + 'NamespaceChangeListener', 'NameValuePair', + 'NameValuePairHelper', 'Naming', 'NamingContext', + 'NamingContextHelper', 'NamingContextHolder', + 'NamingContextOperations', 'NamingEnumeration', + 'NamingEvent', 'NamingException', + 'NamingExceptionEvent', 'NamingListener', + 'NamingManager', 'NamingSecurityException', + 'NegativeArraySizeException', 'NetPermission', + 'NoClassDefFoundError', 'NoInitialContextException', + 'NoninvertibleTransformException', + 'NoPermissionException', 'NoRouteToHostException', + 'NoSuchAlgorithmException', + 'NoSuchAttributeException', 'NoSuchElementException', + 'NoSuchFieldError', 'NoSuchFieldException', + 'NoSuchMethodError', 'NoSuchMethodException', + 'NoSuchObjectException', 'NoSuchProviderException', + 'NotActiveException', 'NotBoundException', + 'NotContextException', 'NotEmpty', 'NotEmptyHelper', + 'NotEmptyHolder', 'NotFound', 'NotFoundHelper', + 'NotFoundHolder', 'NotFoundReason', + 'NotFoundReasonHelper', 'NotFoundReasonHolder', + 'NotOwnerException', 'NotSerializableException', + 'NO_IMPLEMENT', 'NO_MEMORY', 'NO_PERMISSION', + 'NO_RESOURCES', 'NO_RESPONSE', + 'NullPointerException', 'Number', 'NumberFormat', + 'NumberFormatException', 'NVList', 'Object', + 'ObjectChangeListener', 'ObjectFactory', + 'ObjectFactoryBuilder', 'ObjectHelper', + 'ObjectHolder', 'ObjectImpl', + 'ObjectInput', 'ObjectInputStream', + 'ObjectInputStream.GetField', + 'ObjectInputValidation', 'ObjectOutput', + 'ObjectOutputStream', 'ObjectOutputStream.PutField', + 'ObjectStreamClass', 'ObjectStreamConstants', + 'ObjectStreamException', 'ObjectStreamField', + 'ObjectView', 'OBJECT_NOT_EXIST', 'ObjID', + 'OBJ_ADAPTER', 'Observable', 'Observer', + 'OctetSeqHelper', 'OctetSeqHolder', 'OMGVMCID', + 'OpenType', 'Operation', + 'OperationNotSupportedException', 'Option', + 'OptionalDataException', 'OptionPaneUI', 'ORB', + 'OutOfMemoryError', 'OutputStream', + 'OutputStreamWriter', 'OverlayLayout', 'Owner', + 'Package', 'PackedColorModel', 'Pageable', + 'PageAttributes', 'PageAttributes.ColorType', + 'PageAttributes.MediaType', + 'PageAttributes.OrientationRequestedType', + 'PageAttributes.OriginType', + 'PageAttributes.PrintQualityType', 'PageFormat', + 'Paint', 'PaintContext', 'PaintEvent', 'Panel', + 'PanelUI', 'Paper', 'ParagraphView', + 'ParameterBlock', 'ParameterDescriptor', + 'ParseException', 'ParsePosition', 'Parser', + 'ParserDelegator', 'PartialResultException', + 'PasswordAuthentication', 'PasswordView', 'Patch', + 'PathIterator', 'Permission', + 'PermissionCollection', 'Permissions', + 'PERSIST_STORE', 'PhantomReference', + 'PipedInputStream', 'PipedOutputStream', + 'PipedReader', 'PipedWriter', 'PixelGrabber', + 'PixelInterleavedSampleModel', 'PKCS8EncodedKeySpec', + 'PlainDocument', 'PlainView', 'Point', 'Point2D', + 'Point2D.Double', 'Point2D.Float', 'Policy', + 'PolicyError', 'PolicyHelper', + 'PolicyHolder', 'PolicyListHelper', + 'PolicyListHolder', 'PolicyOperations', + 'PolicyTypeHelper', 'Polygon', 'PopupMenu', + 'PopupMenuEvent', 'PopupMenuListener', 'PopupMenuUI', + 'Port', 'Port.Info', 'PortableRemoteObject', + 'PortableRemoteObjectDelegate', 'Position', + 'Position.Bias', 'PreparedStatement', 'Principal', + 'PrincipalHolder', 'Printable', + 'PrinterAbortException', 'PrinterException', + 'PrinterGraphics', 'PrinterIOException', + 'PrinterJob', 'PrintGraphics', 'PrintJob', + 'PrintStream', 'PrintWriter', 'PrivateKey', + 'PRIVATE_MEMBER', 'PrivilegedAction', + 'PrivilegedActionException', + 'PrivilegedExceptionAction', 'Process', + 'ProfileDataException', 'ProgressBarUI', + 'ProgressMonitor', 'ProgressMonitorInputStream', + 'Properties', 'PropertyChangeEvent', + 'PropertyChangeListener', 'PropertyChangeSupport', + 'PropertyDescriptor', 'PropertyEditor', + 'PropertyEditorManager', 'PropertyEditorSupport', + 'PropertyPermission', 'PropertyResourceBundle', + 'PropertyVetoException', 'ProtectionDomain', + 'ProtocolException', 'Provider', 'ProviderException', + 'Proxy', 'PublicKey', 'PUBLIC_MEMBER', + 'PushbackInputStream', 'PushbackReader', + 'QuadCurve2D', 'QuadCurve2D.Double', + 'QuadCurve2D.Float', 'Random', 'RandomAccessFile', + 'Raster', 'RasterFormatException', 'RasterOp', + 'Reader', 'Receiver', 'Rectangle', 'Rectangle2D', + 'Rectangle2D.Double', 'Rectangle2D.Float', + 'RectangularShape', 'Ref', 'RefAddr', 'Reference', + 'Referenceable', 'ReferenceQueue', + 'ReferralException', 'ReflectPermission', 'Registry', + 'RegistryHandler', 'RemarshalException', 'Remote', + 'RemoteCall', 'RemoteException', 'RemoteObject', + 'RemoteRef', 'RemoteServer', 'RemoteStub', + 'RenderableImage', 'RenderableImageOp', + 'RenderableImageProducer', 'RenderContext', + 'RenderedImage', 'RenderedImageFactory', 'Renderer', + 'RenderingHints', 'RenderingHints.Key', + 'RepaintManager', 'ReplicateScaleFilter', + 'Repository', 'RepositoryIdHelper', 'Request', + 'RescaleOp', 'Resolver', 'ResolveResult', + 'ResourceBundle', 'ResponseHandler', 'ResultSet', + 'ResultSetMetaData', 'ReverbType', 'RGBImageFilter', + 'RMIClassLoader', 'RMIClientSocketFactory', + 'RMIFailureHandler', 'RMISecurityException', + 'RMISecurityManager', 'RMIServerSocketFactory', + 'RMISocketFactory', 'Robot', 'RootPaneContainer', + 'RootPaneUI', 'RoundRectangle2D', + 'RoundRectangle2D.Double', 'RoundRectangle2D.Float', + 'RowMapper', 'RSAKey', 'RSAKeyGenParameterSpec', + 'RSAPrivateCrtKey', 'RSAPrivateCrtKeySpec', + 'RSAPrivateKey', 'RSAPrivateKeySpec', 'RSAPublicKey', + 'RSAPublicKeySpec', 'RTFEditorKit', + 'RuleBasedCollator', 'Runnable', 'RunTime', + 'Runtime', 'RuntimeException', 'RunTimeOperations', + 'RuntimePermission', 'SampleModel', + 'SchemaViolationException', 'Scrollable', + 'Scrollbar', 'ScrollBarUI', 'ScrollPane', + 'ScrollPaneConstants', 'ScrollPaneLayout', + 'ScrollPaneLayout.UIResource', 'ScrollPaneUI', + 'SearchControls', 'SearchResult', + 'SecureClassLoader', 'SecureRandom', + 'SecureRandomSpi', 'Security', 'SecurityException', + 'SecurityManager', 'SecurityPermission', 'Segment', + 'SeparatorUI', 'Sequence', 'SequenceInputStream', + 'Sequencer', 'Sequencer.SyncMode', 'Serializable', + 'SerializablePermission', 'ServantObject', + 'ServerCloneException', 'ServerError', + 'ServerException', 'ServerNotActiveException', + 'ServerRef', 'ServerRequest', + 'ServerRuntimeException', 'ServerSocket', + 'ServiceDetail', 'ServiceDetailHelper', + 'ServiceInformation', 'ServiceInformationHelper', + 'ServiceInformationHolder', + 'ServiceUnavailableException', 'Set', + 'SetOverrideType', 'SetOverrideTypeHelper', 'Shape', + 'ShapeGraphicAttribute', 'Short', 'ShortHolder', + 'ShortLookupTable', 'ShortMessage', 'ShortSeqHelper', + 'ShortSeqHolder', 'Signature', 'SignatureException', + 'SignatureSpi', 'SignedObject', 'Signer', + 'SimpleAttributeSet', 'SimpleBeanInfo', + 'SimpleDateFormat', 'SimpleTimeZone', + 'SinglePixelPackedSampleModel', + 'SingleSelectionModel', 'SizeLimitExceededException', + 'SizeRequirements', 'SizeSequence', 'Skeleton', + 'SkeletonMismatchException', + 'SkeletonNotFoundException', 'SliderUI', 'Socket', + 'SocketException', 'SocketImpl', 'SocketImplFactory', + 'SocketOptions', 'SocketPermission', + 'SocketSecurityException', 'SoftBevelBorder', + 'SoftReference', 'SortedMap', 'SortedSet', + 'Soundbank', 'SoundbankReader', 'SoundbankResource', + 'SourceDataLine', 'SplitPaneUI', 'SQLData', + 'SQLException', 'SQLInput', 'SQLOutput', + 'SQLPermission', 'SQLWarning', 'Stack', + 'StackOverflowError', 'StateEdit', 'StateEditable', + 'StateFactory', 'Statement', 'Streamable', + 'StreamableValue', 'StreamCorruptedException', + 'StreamTokenizer', 'StrictMath', 'String', + 'StringBuffer', 'StringBufferInputStream', + 'StringCharacterIterator', 'StringContent', + 'StringHolder', 'StringIndexOutOfBoundsException', + 'StringReader', 'StringRefAddr', 'StringSelection', + 'StringTokenizer', 'StringValueHelper', + 'StringWriter', 'Stroke', 'Struct', 'StructMember', + 'StructMemberHelper', 'Stub', 'StubDelegate', + 'StubNotFoundException', 'Style', 'StyleConstants', + 'StyleConstants.CharacterConstants', + 'StyleConstants.ColorConstants', + 'StyleConstants.FontConstants', + 'StyleConstants.ParagraphConstants', 'StyleContext', + 'StyledDocument', 'StyledEditorKit', + 'StyledEditorKit.AlignmentAction', + 'StyledEditorKit.BoldAction', + 'StyledEditorKit.FontFamilyAction', + 'StyledEditorKit.FontSizeAction', + 'StyledEditorKit.ForegroundAction', + 'StyledEditorKit.ItalicAction', + 'StyledEditorKit.StyledTextAction', + 'StyledEditorKit.UnderlineAction', 'StyleSheet', + 'StyleSheet.BoxPainter', 'StyleSheet.ListPainter', + 'SwingConstants', 'SwingPropertyChangeSupport', + 'SwingUtilities', 'SyncFailedException', + 'Synthesizer', 'SysexMessage', 'System', + 'SystemColor', 'SystemException', 'SystemFlavorMap', + 'TabableView', 'TabbedPaneUI', 'TabExpander', + 'TableCellEditor', 'TableCellRenderer', + 'TableColumn', 'TableColumnModel', + 'TableColumnModelEvent', 'TableColumnModelListener', + 'TableHeaderUI', 'TableModel', 'TableModelEvent', + 'TableModelListener', 'TableUI', 'TableView', + 'TabSet', 'TabStop', 'TagElement', 'TargetDataLine', + 'TCKind', 'TextAction', 'TextArea', 'TextAttribute', + 'TextComponent', 'TextEvent', 'TextField', + 'TextHitInfo', 'TextLayout', + 'TextLayout.CaretPolicy', 'TextListener', + 'TextMeasurer', 'TextUI', 'TexturePaint', 'Thread', + 'ThreadDeath', 'ThreadGroup', 'ThreadLocal', + 'Throwable', 'Tie', 'TileObserver', 'Time', + 'TimeLimitExceededException', 'Timer', + 'TimerTask', 'Timestamp', 'TimeZone', 'TitledBorder', + 'ToolBarUI', 'Toolkit', 'ToolTipManager', + 'ToolTipUI', 'TooManyListenersException', 'Track', + 'TransactionRequiredException', + 'TransactionRolledbackException', + 'TRANSACTION_REQUIRED', 'TRANSACTION_ROLLEDBACK', + 'Transferable', 'TransformAttribute', 'TRANSIENT', + 'Transmitter', 'Transparency', 'TreeCellEditor', + 'TreeCellRenderer', 'TreeExpansionEvent', + 'TreeExpansionListener', 'TreeMap', 'TreeModel', + 'TreeModelEvent', 'TreeModelListener', 'TreeNode', + 'TreePath', 'TreeSelectionEvent', + 'TreeSelectionListener', 'TreeSelectionModel', + 'TreeSet', 'TreeUI', 'TreeWillExpandListener', + 'TypeCode', 'TypeCodeHolder', 'TypeMismatch', + 'Types', 'UID', 'UIDefaults', + 'UIDefaults.ActiveValue', 'UIDefaults.LazyInputMap', + 'UIDefaults.LazyValue', 'UIDefaults.ProxyLazyValue', + 'UIManager', 'UIManager.LookAndFeelInfo', + 'UIResource', 'ULongLongSeqHelper', + 'ULongLongSeqHolder', 'ULongSeqHelper', + 'ULongSeqHolder', 'UndeclaredThrowableException', + 'UndoableEdit', 'UndoableEditEvent', + 'UndoableEditListener', 'UndoableEditSupport', + 'UndoManager', 'UnexpectedException', + 'UnicastRemoteObject', 'UnionMember', + 'UnionMemberHelper', 'UNKNOWN', 'UnknownError', + 'UnknownException', 'UnknownGroupException', + 'UnknownHostException', + 'UnknownObjectException', 'UnknownServiceException', + 'UnknownUserException', 'UnmarshalException', + 'UnrecoverableKeyException', 'Unreferenced', + 'UnresolvedPermission', 'UnsatisfiedLinkError', + 'UnsolicitedNotification', + 'UnsolicitedNotificationEvent', + 'UnsolicitedNotificationListener', + 'UnsupportedAudioFileException', + 'UnsupportedClassVersionError', + 'UnsupportedEncodingException', + 'UnsupportedFlavorException', + 'UnsupportedLookAndFeelException', + 'UnsupportedOperationException', + 'UNSUPPORTED_POLICY', 'UNSUPPORTED_POLICY_VALUE', + 'URL', 'URLClassLoader', 'URLConnection', + 'URLDecoder', 'URLEncoder', 'URLStreamHandler', + 'URLStreamHandlerFactory', 'UserException', + 'UShortSeqHelper', 'UShortSeqHolder', + 'UTFDataFormatException', 'Util', 'UtilDelegate', + 'Utilities', 'ValueBase', 'ValueBaseHelper', + 'ValueBaseHolder', 'ValueFactory', 'ValueHandler', + 'ValueMember', 'ValueMemberHelper', + 'VariableHeightLayoutCache', 'Vector', 'VerifyError', + 'VersionSpecHelper', 'VetoableChangeListener', + 'VetoableChangeSupport', 'View', 'ViewFactory', + 'ViewportLayout', 'ViewportUI', + 'VirtualMachineError', 'Visibility', + 'VisibilityHelper', 'VMID', 'VM_ABSTRACT', + 'VM_CUSTOM', 'VM_NONE', 'VM_TRUNCATABLE', + 'VoiceStatus', 'Void', 'WCharSeqHelper', + 'WCharSeqHolder', 'WeakHashMap', 'WeakReference', + 'Window', 'WindowAdapter', 'WindowConstants', + 'WindowEvent', 'WindowListener', 'WrappedPlainView', + 'WritableRaster', 'WritableRenderedImage', + 'WriteAbortedException', 'Writer', + 'WrongTransaction', 'WStringValueHelper', + 'X509Certificate', 'X509CRL', 'X509CRLEntry', + 'X509EncodedKeySpec', 'X509Extension', 'ZipEntry', + 'ZipException', 'ZipFile', 'ZipInputStream', + 'ZipOutputStream', 'ZoneView', + '_BindingIteratorImplBase', '_BindingIteratorStub', + '_IDLTypeStub', '_NamingContextImplBase', + '_NamingContextStub', '_PolicyStub', '_Remote_Stub' + ), + 4 => array( + 'void', 'double', 'int', 'boolean', 'byte', 'short', 'long', 'char', 'float' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', + '+', '-', '*', '/', '%', + '!', '&', '|', '^', + '<', '>', '=', + '?', ':', ';', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => true, + 4 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #000066; font-weight: bold;', + 3 => 'color: #003399;', + 4 => 'color: #000066; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #006699;', + 3 => 'color: #008000; font-style: italic; font-weight: bold;', + 3 => 'color: #008000; font-style: italic; font-weight: bold;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006633;', + 2 => 'color: #006633;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.google.com/search?hl=en&q=allinurl%3A{FNAMEL}+java.sun.com&btnI=I%27m%20Feeling%20Lucky', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/java5.php b/_piecrust/libs/Geshi/geshi/java5.php new file mode 100644 index 0000000..b51edab --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/java5.php @@ -0,0 +1,1037 @@ + 'Java(TM) 2 Platform Standard Edition 5.0', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Import and Package directives (Basic Support only) + 2 => '/(?:(?<=import[\\n\\s](?!static))|(?<=import[\\n\\s]static[\\n\\s])|(?<=package[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*([a-zA-Z0-9_]+|\*)(?=[\n\s;])/i', + // javadoc comments + 3 => '#/\*\*(?![\*\/]).*\*/#sU' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + /* see the authoritative list of all 50 Java keywords at */ + /* http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#229308 */ + + /* java keywords, part 1: control flow */ + 'case', 'default', 'do', 'else', 'for', + 'goto', 'if', 'switch', 'while' + + /* IMO 'break', 'continue', 'return' and 'throw' */ + /* should also be added to this group, as they */ + /* also manage the control flow, */ + /* arguably 'try'/'catch'/'finally' as well */ + ), + 2 => array( + /* java keywords, part 2 */ + + 'break', 'continue', 'return', 'throw', + 'try', 'catch', 'finally', + + 'abstract', 'assert', 'class', 'const', 'enum', 'extends', + 'final', 'implements', 'import', 'instanceof', 'interface', + 'native', 'new', 'package', 'private', 'protected', + 'public', 'static', 'strictfp', 'super', 'synchronized', + 'this', 'throws', 'transient', 'volatile' + ), + 3 => array( + /* Java keywords, part 3: primitive data types and 'void' */ + 'boolean', 'byte', 'char', 'double', + 'float', 'int', 'long', 'short', 'void' + ), + 4 => array( + /* other reserved words in Java: literals */ + /* should be styled to look similar to numbers and Strings */ + 'false', 'null', 'true' + ), + 5 => array ( + 'Applet', 'AppletContext', 'AppletStub', 'AudioClip' + ), + 6 => array ( + 'AWTError', 'AWTEvent', 'AWTEventMulticaster', 'AWTException', 'AWTKeyStroke', 'AWTPermission', 'ActiveEvent', 'Adjustable', 'AlphaComposite', 'BasicStroke', 'BorderLayout', 'BufferCapabilities', 'BufferCapabilities.FlipContents', 'Button', 'Canvas', 'CardLayout', 'Checkbox', 'CheckboxGroup', 'CheckboxMenuItem', 'Choice', 'Color', 'Component', 'ComponentOrientation', 'Composite', 'CompositeContext', 'Container', 'ContainerOrderFocusTraversalPolicy', 'Cursor', 'DefaultFocusTraversalPolicy', 'DefaultKeyboardFocusManager', 'Dialog', 'Dimension', 'DisplayMode', 'EventQueue', 'FileDialog', 'FlowLayout', 'FocusTraversalPolicy', 'Font', 'FontFormatException', 'FontMetrics', 'Frame', 'GradientPaint', 'Graphics', 'Graphics2D', 'GraphicsConfigTemplate', 'GraphicsConfiguration', 'GraphicsDevice', 'GraphicsEnvironment', 'GridBagConstraints', 'GridBagLayout', 'GridLayout', 'HeadlessException', 'IllegalComponentStateException', 'Image', 'ImageCapabilities', 'Insets', 'ItemSelectable', 'JobAttributes', + 'JobAttributes.DefaultSelectionType', 'JobAttributes.DestinationType', 'JobAttributes.DialogType', 'JobAttributes.MultipleDocumentHandlingType', 'JobAttributes.SidesType', 'KeyEventDispatcher', 'KeyEventPostProcessor', 'KeyboardFocusManager', 'Label', 'LayoutManager', 'LayoutManager2', 'MediaTracker', 'Menu', 'MenuBar', 'MenuComponent', 'MenuContainer', 'MenuItem', 'MenuShortcut', 'MouseInfo', 'PageAttributes', 'PageAttributes.ColorType', 'PageAttributes.MediaType', 'PageAttributes.OrientationRequestedType', 'PageAttributes.OriginType', 'PageAttributes.PrintQualityType', 'Paint', 'PaintContext', 'Panel', 'Point', 'PointerInfo', 'Polygon', 'PopupMenu', 'PrintGraphics', 'PrintJob', 'Rectangle', 'RenderingHints', 'RenderingHints.Key', 'Robot', 'ScrollPane', 'ScrollPaneAdjustable', 'Scrollbar', 'Shape', 'Stroke', 'SystemColor', 'TextArea', 'TextComponent', 'TextField', 'TexturePaint', 'Toolkit', 'Transparency', 'Window' + ), + 7 => array ( + 'CMMException', 'ColorSpace', 'ICC_ColorSpace', 'ICC_Profile', 'ICC_ProfileGray', 'ICC_ProfileRGB', 'ProfileDataException' + ), + 8 => array ( + 'Clipboard', 'ClipboardOwner', 'DataFlavor', 'FlavorEvent', 'FlavorListener', 'FlavorMap', 'FlavorTable', 'MimeTypeParseException', 'StringSelection', 'SystemFlavorMap', 'Transferable', 'UnsupportedFlavorException' + ), + 9 => array ( + 'Autoscroll', 'DnDConstants', 'DragGestureEvent', 'DragGestureListener', 'DragGestureRecognizer', 'DragSource', 'DragSourceAdapter', 'DragSourceContext', 'DragSourceDragEvent', 'DragSourceDropEvent', 'DragSourceEvent', 'DragSourceListener', 'DragSourceMotionListener', 'DropTarget', 'DropTarget.DropTargetAutoScroller', 'DropTargetAdapter', 'DropTargetContext', 'DropTargetDragEvent', 'DropTargetDropEvent', 'DropTargetEvent', 'DropTargetListener', 'InvalidDnDOperationException', 'MouseDragGestureRecognizer' + ), + 10 => array ( + 'AWTEventListener', 'AWTEventListenerProxy', 'ActionEvent', 'ActionListener', 'AdjustmentEvent', 'AdjustmentListener', 'ComponentAdapter', 'ComponentEvent', 'ComponentListener', 'ContainerAdapter', 'ContainerEvent', 'ContainerListener', 'FocusAdapter', 'FocusEvent', 'FocusListener', 'HierarchyBoundsAdapter', 'HierarchyBoundsListener', 'HierarchyEvent', 'HierarchyListener', 'InputEvent', 'InputMethodEvent', 'InputMethodListener', 'InvocationEvent', 'ItemEvent', 'ItemListener', 'KeyAdapter', 'KeyEvent', 'KeyListener', 'MouseAdapter', 'MouseListener', 'MouseMotionAdapter', 'MouseMotionListener', 'MouseWheelEvent', 'MouseWheelListener', 'PaintEvent', 'TextEvent', 'TextListener', 'WindowAdapter', 'WindowEvent', 'WindowFocusListener', 'WindowListener', 'WindowStateListener' + ), + 11 => array ( + 'FontRenderContext', 'GlyphJustificationInfo', 'GlyphMetrics', 'GlyphVector', 'GraphicAttribute', 'ImageGraphicAttribute', 'LineBreakMeasurer', 'LineMetrics', 'MultipleMaster', 'NumericShaper', 'ShapeGraphicAttribute', 'TextAttribute', 'TextHitInfo', 'TextLayout', 'TextLayout.CaretPolicy', 'TextMeasurer', 'TransformAttribute' + ), + 12 => array ( + 'AffineTransform', 'Arc2D', 'Arc2D.Double', 'Arc2D.Float', 'Area', 'CubicCurve2D', 'CubicCurve2D.Double', 'CubicCurve2D.Float', 'Dimension2D', 'Ellipse2D', 'Ellipse2D.Double', 'Ellipse2D.Float', 'FlatteningPathIterator', 'GeneralPath', 'IllegalPathStateException', 'Line2D', 'Line2D.Double', 'Line2D.Float', 'NoninvertibleTransformException', 'PathIterator', 'Point2D', 'Point2D.Double', 'Point2D.Float', 'QuadCurve2D', 'QuadCurve2D.Double', 'QuadCurve2D.Float', 'Rectangle2D', 'Rectangle2D.Double', 'Rectangle2D.Float', 'RectangularShape', 'RoundRectangle2D', 'RoundRectangle2D.Double', 'RoundRectangle2D.Float' + ), + 13 => array ( + 'InputContext', 'InputMethodHighlight', 'InputMethodRequests', 'InputSubset' + ), + 14 => array ( + 'InputMethod', 'InputMethodContext', 'InputMethodDescriptor' + ), + 15 => array ( + 'AffineTransformOp', 'AreaAveragingScaleFilter', 'BandCombineOp', 'BandedSampleModel', 'BufferStrategy', 'BufferedImage', 'BufferedImageFilter', 'BufferedImageOp', 'ByteLookupTable', 'ColorConvertOp', 'ColorModel', 'ComponentColorModel', 'ComponentSampleModel', 'ConvolveOp', 'CropImageFilter', 'DataBuffer', 'DataBufferByte', 'DataBufferDouble', 'DataBufferFloat', 'DataBufferInt', 'DataBufferShort', 'DataBufferUShort', 'DirectColorModel', 'FilteredImageSource', 'ImageConsumer', 'ImageFilter', 'ImageObserver', 'ImageProducer', 'ImagingOpException', 'IndexColorModel', 'Kernel', 'LookupOp', 'LookupTable', 'MemoryImageSource', 'MultiPixelPackedSampleModel', 'PackedColorModel', 'PixelGrabber', 'PixelInterleavedSampleModel', 'RGBImageFilter', 'Raster', 'RasterFormatException', 'RasterOp', 'RenderedImage', 'ReplicateScaleFilter', 'RescaleOp', 'SampleModel', 'ShortLookupTable', 'SinglePixelPackedSampleModel', 'TileObserver', 'VolatileImage', 'WritableRaster', 'WritableRenderedImage' + ), + 16 => array ( + 'ContextualRenderedImageFactory', 'ParameterBlock', 'RenderContext', 'RenderableImage', 'RenderableImageOp', 'RenderableImageProducer', 'RenderedImageFactory' + ), + 17 => array ( + 'Book', 'PageFormat', 'Pageable', 'Paper', 'Printable', 'PrinterAbortException', 'PrinterException', 'PrinterGraphics', 'PrinterIOException', 'PrinterJob' + ), + 18 => array ( + 'AppletInitializer', 'BeanDescriptor', 'BeanInfo', 'Beans', 'Customizer', 'DefaultPersistenceDelegate', 'DesignMode', 'Encoder', 'EventHandler', 'EventSetDescriptor', 'ExceptionListener', 'Expression', 'FeatureDescriptor', 'IndexedPropertyChangeEvent', 'IndexedPropertyDescriptor', 'Introspector', 'MethodDescriptor', 'ParameterDescriptor', 'PersistenceDelegate', 'PropertyChangeEvent', 'PropertyChangeListener', 'PropertyChangeListenerProxy', 'PropertyChangeSupport', 'PropertyDescriptor', 'PropertyEditor', 'PropertyEditorManager', 'PropertyEditorSupport', 'PropertyVetoException', 'SimpleBeanInfo', 'VetoableChangeListener', 'VetoableChangeListenerProxy', 'VetoableChangeSupport', 'Visibility', 'XMLDecoder', 'XMLEncoder' + ), + 19 => array ( + 'BeanContext', 'BeanContextChild', 'BeanContextChildComponentProxy', 'BeanContextChildSupport', 'BeanContextContainerProxy', 'BeanContextEvent', 'BeanContextMembershipEvent', 'BeanContextMembershipListener', 'BeanContextProxy', 'BeanContextServiceAvailableEvent', 'BeanContextServiceProvider', 'BeanContextServiceProviderBeanInfo', 'BeanContextServiceRevokedEvent', 'BeanContextServiceRevokedListener', 'BeanContextServices', 'BeanContextServicesListener', 'BeanContextServicesSupport', 'BeanContextServicesSupport.BCSSServiceProvider', 'BeanContextSupport', 'BeanContextSupport.BCSIterator' + ), + 20 => array ( + 'BufferedInputStream', 'BufferedOutputStream', 'BufferedReader', 'BufferedWriter', 'ByteArrayInputStream', 'ByteArrayOutputStream', 'CharArrayReader', 'CharArrayWriter', 'CharConversionException', 'Closeable', 'DataInput', 'DataOutput', 'EOFException', 'Externalizable', 'File', 'FileDescriptor', 'FileInputStream', 'FileNotFoundException', 'FileOutputStream', 'FilePermission', 'FileReader', 'FileWriter', 'FilenameFilter', 'FilterInputStream', 'FilterOutputStream', 'FilterReader', 'FilterWriter', 'Flushable', 'IOException', 'InputStreamReader', 'InterruptedIOException', 'InvalidClassException', 'InvalidObjectException', 'LineNumberInputStream', 'LineNumberReader', 'NotActiveException', 'NotSerializableException', 'ObjectInput', 'ObjectInputStream', 'ObjectInputStream.GetField', 'ObjectInputValidation', 'ObjectOutput', 'ObjectOutputStream', 'ObjectOutputStream.PutField', 'ObjectStreamClass', 'ObjectStreamConstants', 'ObjectStreamException', 'ObjectStreamField', 'OptionalDataException', 'OutputStreamWriter', + 'PipedInputStream', 'PipedOutputStream', 'PipedReader', 'PipedWriter', 'PrintStream', 'PrintWriter', 'PushbackInputStream', 'PushbackReader', 'RandomAccessFile', 'Reader', 'SequenceInputStream', 'Serializable', 'SerializablePermission', 'StreamCorruptedException', 'StreamTokenizer', 'StringBufferInputStream', 'StringReader', 'StringWriter', 'SyncFailedException', 'UTFDataFormatException', 'UnsupportedEncodingException', 'WriteAbortedException', 'Writer' + ), + 21 => array ( + 'AbstractMethodError', 'Appendable', 'ArithmeticException', 'ArrayIndexOutOfBoundsException', 'ArrayStoreException', 'AssertionError', 'Boolean', 'Byte', 'CharSequence', 'Character', 'Character.Subset', 'Character.UnicodeBlock', 'Class', 'ClassCastException', 'ClassCircularityError', 'ClassFormatError', 'ClassLoader', 'ClassNotFoundException', 'CloneNotSupportedException', 'Cloneable', 'Comparable', 'Compiler', 'Deprecated', 'Double', 'Enum', 'EnumConstantNotPresentException', 'Error', 'Exception', 'ExceptionInInitializerError', 'Float', 'IllegalAccessError', 'IllegalAccessException', 'IllegalArgumentException', 'IllegalMonitorStateException', 'IllegalStateException', 'IllegalThreadStateException', 'IncompatibleClassChangeError', 'IndexOutOfBoundsException', 'InheritableThreadLocal', 'InstantiationError', 'InstantiationException', 'Integer', 'InternalError', 'InterruptedException', 'Iterable', 'LinkageError', 'Long', 'Math', 'NegativeArraySizeException', 'NoClassDefFoundError', 'NoSuchFieldError', + 'NoSuchFieldException', 'NoSuchMethodError', 'NoSuchMethodException', 'NullPointerException', 'Number', 'NumberFormatException', 'OutOfMemoryError', 'Override', 'Package', 'Process', 'ProcessBuilder', 'Readable', 'Runnable', 'Runtime', 'RuntimeException', 'RuntimePermission', 'SecurityException', 'SecurityManager', 'Short', 'StackOverflowError', 'StackTraceElement', 'StrictMath', 'String', 'StringBuffer', 'StringBuilder', 'StringIndexOutOfBoundsException', 'SuppressWarnings', 'System', 'Thread', 'Thread.State', 'Thread.UncaughtExceptionHandler', 'ThreadDeath', 'ThreadGroup', 'ThreadLocal', 'Throwable', 'TypeNotPresentException', 'UnknownError', 'UnsatisfiedLinkError', 'UnsupportedClassVersionError', 'UnsupportedOperationException', 'VerifyError', 'VirtualMachineError', 'Void' + ), + 22 => array ( + 'AnnotationFormatError', 'AnnotationTypeMismatchException', 'Documented', 'ElementType', 'IncompleteAnnotationException', 'Inherited', 'Retention', 'RetentionPolicy', 'Target' + ), + 23 => array ( + 'ClassDefinition', 'ClassFileTransformer', 'IllegalClassFormatException', 'Instrumentation', 'UnmodifiableClassException' + ), + 24 => array ( + 'ClassLoadingMXBean', 'CompilationMXBean', 'GarbageCollectorMXBean', 'ManagementFactory', 'ManagementPermission', 'MemoryMXBean', 'MemoryManagerMXBean', 'MemoryNotificationInfo', 'MemoryPoolMXBean', 'MemoryType', 'MemoryUsage', 'OperatingSystemMXBean', 'RuntimeMXBean', 'ThreadInfo', 'ThreadMXBean' + ), + 25 => array ( + 'PhantomReference', 'ReferenceQueue', 'SoftReference', 'WeakReference' + ), + 26 => array ( + 'AccessibleObject', 'AnnotatedElement', 'Constructor', 'Field', 'GenericArrayType', 'GenericDeclaration', 'GenericSignatureFormatError', 'InvocationHandler', 'InvocationTargetException', 'MalformedParameterizedTypeException', 'Member', 'Method', 'Modifier', 'ParameterizedType', 'ReflectPermission', 'Type', 'TypeVariable', 'UndeclaredThrowableException', 'WildcardType' + ), + 27 => array ( + 'BigDecimal', 'BigInteger', 'MathContext', 'RoundingMode' + ), + 28 => array ( + 'Authenticator', 'Authenticator.RequestorType', 'BindException', 'CacheRequest', 'CacheResponse', 'ContentHandlerFactory', 'CookieHandler', 'DatagramPacket', 'DatagramSocket', 'DatagramSocketImpl', 'DatagramSocketImplFactory', 'FileNameMap', 'HttpRetryException', 'HttpURLConnection', 'Inet4Address', 'Inet6Address', 'InetAddress', 'InetSocketAddress', 'JarURLConnection', 'MalformedURLException', 'MulticastSocket', 'NetPermission', 'NetworkInterface', 'NoRouteToHostException', 'PasswordAuthentication', 'PortUnreachableException', 'ProtocolException', 'Proxy.Type', 'ProxySelector', 'ResponseCache', 'SecureCacheResponse', 'ServerSocket', 'Socket', 'SocketAddress', 'SocketException', 'SocketImpl', 'SocketImplFactory', 'SocketOptions', 'SocketPermission', 'SocketTimeoutException', 'URI', 'URISyntaxException', 'URL', 'URLClassLoader', 'URLConnection', 'URLDecoder', 'URLEncoder', 'URLStreamHandler', 'URLStreamHandlerFactory', 'UnknownServiceException' + ), + 29 => array ( + 'Buffer', 'BufferOverflowException', 'BufferUnderflowException', 'ByteBuffer', 'ByteOrder', 'CharBuffer', 'DoubleBuffer', 'FloatBuffer', 'IntBuffer', 'InvalidMarkException', 'LongBuffer', 'MappedByteBuffer', 'ReadOnlyBufferException', 'ShortBuffer' + ), + 30 => array ( + 'AlreadyConnectedException', 'AsynchronousCloseException', 'ByteChannel', 'CancelledKeyException', 'Channel', 'Channels', 'ClosedByInterruptException', 'ClosedChannelException', 'ClosedSelectorException', 'ConnectionPendingException', 'DatagramChannel', 'FileChannel', 'FileChannel.MapMode', 'FileLock', 'FileLockInterruptionException', 'GatheringByteChannel', 'IllegalBlockingModeException', 'IllegalSelectorException', 'InterruptibleChannel', 'NoConnectionPendingException', 'NonReadableChannelException', 'NonWritableChannelException', 'NotYetBoundException', 'NotYetConnectedException', 'OverlappingFileLockException', 'Pipe', 'Pipe.SinkChannel', 'Pipe.SourceChannel', 'ReadableByteChannel', 'ScatteringByteChannel', 'SelectableChannel', 'SelectionKey', 'Selector', 'ServerSocketChannel', 'SocketChannel', 'UnresolvedAddressException', 'UnsupportedAddressTypeException', 'WritableByteChannel' + ), + 31 => array ( + 'AbstractInterruptibleChannel', 'AbstractSelectableChannel', 'AbstractSelectionKey', 'AbstractSelector', 'SelectorProvider' + ), + 32 => array ( + 'CharacterCodingException', 'Charset', 'CharsetDecoder', 'CharsetEncoder', 'CoderMalfunctionError', 'CoderResult', 'CodingErrorAction', 'IllegalCharsetNameException', 'MalformedInputException', 'UnmappableCharacterException', 'UnsupportedCharsetException' + ), + 33 => array ( + 'CharsetProvider' + ), + 34 => array ( + 'AccessException', 'AlreadyBoundException', 'ConnectIOException', 'MarshalException', 'MarshalledObject', 'Naming', 'NoSuchObjectException', 'NotBoundException', 'RMISecurityException', 'RMISecurityManager', 'Remote', 'RemoteException', 'ServerError', 'ServerException', 'ServerRuntimeException', 'StubNotFoundException', 'UnexpectedException', 'UnmarshalException' + ), + 35 => array ( + 'Activatable', 'ActivateFailedException', 'ActivationDesc', 'ActivationException', 'ActivationGroup', 'ActivationGroupDesc', 'ActivationGroupDesc.CommandEnvironment', 'ActivationGroupID', 'ActivationGroup_Stub', 'ActivationID', 'ActivationInstantiator', 'ActivationMonitor', 'ActivationSystem', 'Activator', 'UnknownGroupException', 'UnknownObjectException' + ), + 36 => array ( + 'DGC', 'Lease', 'VMID' + ), + 37 => array ( + 'LocateRegistry', 'Registry', 'RegistryHandler' + ), + 38 => array ( + 'ExportException', 'LoaderHandler', 'LogStream', 'ObjID', 'Operation', 'RMIClassLoader', 'RMIClassLoaderSpi', 'RMIClientSocketFactory', 'RMIFailureHandler', 'RMIServerSocketFactory', 'RMISocketFactory', 'RemoteCall', 'RemoteObject', 'RemoteObjectInvocationHandler', 'RemoteRef', 'RemoteServer', 'RemoteStub', 'ServerCloneException', 'ServerNotActiveException', 'ServerRef', 'Skeleton', 'SkeletonMismatchException', 'SkeletonNotFoundException', 'SocketSecurityException', 'UID', 'UnicastRemoteObject', 'Unreferenced' + ), + 39 => array ( + 'AccessControlContext', 'AccessControlException', 'AccessController', 'AlgorithmParameterGenerator', 'AlgorithmParameterGeneratorSpi', 'AlgorithmParameters', 'AlgorithmParametersSpi', 'AllPermission', 'AuthProvider', 'BasicPermission', 'CodeSigner', 'CodeSource', 'DigestException', 'DigestInputStream', 'DigestOutputStream', 'DomainCombiner', 'GeneralSecurityException', 'Guard', 'GuardedObject', 'Identity', 'IdentityScope', 'InvalidAlgorithmParameterException', 'InvalidParameterException', 'Key', 'KeyException', 'KeyFactory', 'KeyFactorySpi', 'KeyManagementException', 'KeyPair', 'KeyPairGenerator', 'KeyPairGeneratorSpi', 'KeyRep', 'KeyRep.Type', 'KeyStore', 'KeyStore.Builder', 'KeyStore.CallbackHandlerProtection', 'KeyStore.Entry', 'KeyStore.LoadStoreParameter', 'KeyStore.PasswordProtection', 'KeyStore.PrivateKeyEntry', 'KeyStore.ProtectionParameter', 'KeyStore.SecretKeyEntry', 'KeyStore.TrustedCertificateEntry', 'KeyStoreException', 'KeyStoreSpi', 'MessageDigest', 'MessageDigestSpi', + 'NoSuchAlgorithmException', 'NoSuchProviderException', 'PermissionCollection', 'Permissions', 'PrivateKey', 'PrivilegedAction', 'PrivilegedActionException', 'PrivilegedExceptionAction', 'ProtectionDomain', 'Provider', 'Provider.Service', 'ProviderException', 'PublicKey', 'SecureClassLoader', 'SecureRandom', 'SecureRandomSpi', 'Security', 'SecurityPermission', 'Signature', 'SignatureException', 'SignatureSpi', 'SignedObject', 'Signer', 'UnrecoverableEntryException', 'UnrecoverableKeyException', 'UnresolvedPermission' + ), + 40 => array ( + 'Acl', 'AclEntry', 'AclNotFoundException', 'Group', 'LastOwnerException', 'NotOwnerException', 'Owner' + ), + 41 => array ( + 'CRL', 'CRLException', 'CRLSelector', 'CertPath', 'CertPath.CertPathRep', 'CertPathBuilder', 'CertPathBuilderException', 'CertPathBuilderResult', 'CertPathBuilderSpi', 'CertPathParameters', 'CertPathValidator', 'CertPathValidatorException', 'CertPathValidatorResult', 'CertPathValidatorSpi', 'CertSelector', 'CertStore', 'CertStoreException', 'CertStoreParameters', 'CertStoreSpi', 'Certificate.CertificateRep', 'CertificateFactory', 'CertificateFactorySpi', 'CollectionCertStoreParameters', 'LDAPCertStoreParameters', 'PKIXBuilderParameters', 'PKIXCertPathBuilderResult', 'PKIXCertPathChecker', 'PKIXCertPathValidatorResult', 'PKIXParameters', 'PolicyNode', 'PolicyQualifierInfo', 'TrustAnchor', 'X509CRL', 'X509CRLEntry', 'X509CRLSelector', 'X509CertSelector', 'X509Extension' + ), + 42 => array ( + 'DSAKey', 'DSAKeyPairGenerator', 'DSAParams', 'DSAPrivateKey', 'DSAPublicKey', 'ECKey', 'ECPrivateKey', 'ECPublicKey', 'RSAKey', 'RSAMultiPrimePrivateCrtKey', 'RSAPrivateCrtKey', 'RSAPrivateKey', 'RSAPublicKey' + ), + 43 => array ( + 'AlgorithmParameterSpec', 'DSAParameterSpec', 'DSAPrivateKeySpec', 'DSAPublicKeySpec', 'ECField', 'ECFieldF2m', 'ECFieldFp', 'ECGenParameterSpec', 'ECParameterSpec', 'ECPoint', 'ECPrivateKeySpec', 'ECPublicKeySpec', 'EllipticCurve', 'EncodedKeySpec', 'InvalidKeySpecException', 'InvalidParameterSpecException', 'KeySpec', 'MGF1ParameterSpec', 'PKCS8EncodedKeySpec', 'PSSParameterSpec', 'RSAKeyGenParameterSpec', 'RSAMultiPrimePrivateCrtKeySpec', 'RSAOtherPrimeInfo', 'RSAPrivateCrtKeySpec', 'RSAPrivateKeySpec', 'RSAPublicKeySpec', 'X509EncodedKeySpec' + ), + 44 => array ( + 'BatchUpdateException', 'Blob', 'CallableStatement', 'Clob', 'Connection', 'DataTruncation', 'DatabaseMetaData', 'Driver', 'DriverManager', 'DriverPropertyInfo', 'ParameterMetaData', 'PreparedStatement', 'Ref', 'ResultSet', 'ResultSetMetaData', 'SQLData', 'SQLException', 'SQLInput', 'SQLOutput', 'SQLPermission', 'SQLWarning', 'Savepoint', 'Struct', 'Time', 'Types' + ), + 45 => array ( + 'AttributedCharacterIterator', 'AttributedCharacterIterator.Attribute', 'AttributedString', 'Bidi', 'BreakIterator', 'CharacterIterator', 'ChoiceFormat', 'CollationElementIterator', 'CollationKey', 'Collator', 'DateFormat', 'DateFormat.Field', 'DateFormatSymbols', 'DecimalFormat', 'DecimalFormatSymbols', 'FieldPosition', 'Format', 'Format.Field', 'MessageFormat', 'MessageFormat.Field', 'NumberFormat', 'NumberFormat.Field', 'ParseException', 'ParsePosition', 'RuleBasedCollator', 'SimpleDateFormat', 'StringCharacterIterator' + ), + 46 => array ( + 'AbstractCollection', 'AbstractList', 'AbstractMap', 'AbstractQueue', 'AbstractSequentialList', 'AbstractSet', 'ArrayList', 'Arrays', 'BitSet', 'Calendar', 'Collection', 'Collections', 'Comparator', 'ConcurrentModificationException', 'Currency', 'Dictionary', 'DuplicateFormatFlagsException', 'EmptyStackException', 'EnumMap', 'EnumSet', 'Enumeration', 'EventListenerProxy', 'EventObject', 'FormatFlagsConversionMismatchException', 'Formattable', 'FormattableFlags', 'Formatter.BigDecimalLayoutForm', 'FormatterClosedException', 'GregorianCalendar', 'HashMap', 'HashSet', 'Hashtable', 'IdentityHashMap', 'IllegalFormatCodePointException', 'IllegalFormatConversionException', 'IllegalFormatException', 'IllegalFormatFlagsException', 'IllegalFormatPrecisionException', 'IllegalFormatWidthException', 'InputMismatchException', 'InvalidPropertiesFormatException', 'Iterator', 'LinkedHashMap', 'LinkedHashSet', 'LinkedList', 'ListIterator', 'ListResourceBundle', 'Locale', 'Map', 'Map.Entry', 'MissingFormatArgumentException', + 'MissingFormatWidthException', 'MissingResourceException', 'NoSuchElementException', 'Observable', 'Observer', 'PriorityQueue', 'Properties', 'PropertyPermission', 'PropertyResourceBundle', 'Queue', 'Random', 'RandomAccess', 'ResourceBundle', 'Scanner', 'Set', 'SimpleTimeZone', 'SortedMap', 'SortedSet', 'Stack', 'StringTokenizer', 'TimeZone', 'TimerTask', 'TooManyListenersException', 'TreeMap', 'TreeSet', 'UUID', 'UnknownFormatConversionException', 'UnknownFormatFlagsException', 'Vector', 'WeakHashMap' + ), + 47 => array ( + 'AbstractExecutorService', 'ArrayBlockingQueue', 'BlockingQueue', 'BrokenBarrierException', 'Callable', 'CancellationException', 'CompletionService', 'ConcurrentHashMap', 'ConcurrentLinkedQueue', 'ConcurrentMap', 'CopyOnWriteArrayList', 'CopyOnWriteArraySet', 'CountDownLatch', 'CyclicBarrier', 'DelayQueue', 'Delayed', 'Exchanger', 'ExecutionException', 'Executor', 'ExecutorCompletionService', 'ExecutorService', 'Executors', 'Future', 'FutureTask', 'LinkedBlockingQueue', 'PriorityBlockingQueue', 'RejectedExecutionException', 'RejectedExecutionHandler', 'ScheduledExecutorService', 'ScheduledFuture', 'ScheduledThreadPoolExecutor', 'Semaphore', 'SynchronousQueue', 'ThreadFactory', 'ThreadPoolExecutor', 'ThreadPoolExecutor.AbortPolicy', 'ThreadPoolExecutor.CallerRunsPolicy', 'ThreadPoolExecutor.DiscardOldestPolicy', 'ThreadPoolExecutor.DiscardPolicy', 'TimeUnit', 'TimeoutException' + ), + 48 => array ( + 'AtomicBoolean', 'AtomicInteger', 'AtomicIntegerArray', 'AtomicIntegerFieldUpdater', 'AtomicLong', 'AtomicLongArray', 'AtomicLongFieldUpdater', 'AtomicMarkableReference', 'AtomicReference', 'AtomicReferenceArray', 'AtomicReferenceFieldUpdater', 'AtomicStampedReference' + ), + 49 => array ( + 'AbstractQueuedSynchronizer', 'Condition', 'Lock', 'LockSupport', 'ReadWriteLock', 'ReentrantLock', 'ReentrantReadWriteLock', 'ReentrantReadWriteLock.ReadLock', 'ReentrantReadWriteLock.WriteLock' + ), + 50 => array ( + 'Attributes.Name', 'JarEntry', 'JarException', 'JarFile', 'JarInputStream', 'JarOutputStream', 'Manifest', 'Pack200', 'Pack200.Packer', 'Pack200.Unpacker' + ), + 51 => array ( + 'ConsoleHandler', 'ErrorManager', 'FileHandler', 'Filter', 'Handler', 'Level', 'LogManager', 'LogRecord', 'Logger', 'LoggingMXBean', 'LoggingPermission', 'MemoryHandler', 'SimpleFormatter', 'SocketHandler', 'StreamHandler', 'XMLFormatter' + ), + 52 => array ( + 'AbstractPreferences', 'BackingStoreException', 'InvalidPreferencesFormatException', 'NodeChangeEvent', 'NodeChangeListener', 'PreferenceChangeEvent', 'PreferenceChangeListener', 'Preferences', 'PreferencesFactory' + ), + 53 => array ( + 'MatchResult', 'Matcher', 'Pattern', 'PatternSyntaxException' + ), + 54 => array ( + 'Adler32', 'CRC32', 'CheckedInputStream', 'CheckedOutputStream', 'Checksum', 'DataFormatException', 'Deflater', 'DeflaterOutputStream', 'GZIPInputStream', 'GZIPOutputStream', 'Inflater', 'InflaterInputStream', 'ZipEntry', 'ZipException', 'ZipFile', 'ZipInputStream', 'ZipOutputStream' + ), + 55 => array ( + 'Accessible', 'AccessibleAction', 'AccessibleAttributeSequence', 'AccessibleBundle', 'AccessibleComponent', 'AccessibleContext', 'AccessibleEditableText', 'AccessibleExtendedComponent', 'AccessibleExtendedTable', 'AccessibleExtendedText', 'AccessibleHyperlink', 'AccessibleHypertext', 'AccessibleIcon', 'AccessibleKeyBinding', 'AccessibleRelation', 'AccessibleRelationSet', 'AccessibleResourceBundle', 'AccessibleRole', 'AccessibleSelection', 'AccessibleState', 'AccessibleStateSet', 'AccessibleStreamable', 'AccessibleTable', 'AccessibleTableModelChange', 'AccessibleText', 'AccessibleTextSequence', 'AccessibleValue' + ), + 56 => array ( + 'ActivityCompletedException', 'ActivityRequiredException', 'InvalidActivityException' + ), + 57 => array ( + 'BadPaddingException', 'Cipher', 'CipherInputStream', 'CipherOutputStream', 'CipherSpi', 'EncryptedPrivateKeyInfo', 'ExemptionMechanism', 'ExemptionMechanismException', 'ExemptionMechanismSpi', 'IllegalBlockSizeException', 'KeyAgreement', 'KeyAgreementSpi', 'KeyGenerator', 'KeyGeneratorSpi', 'Mac', 'MacSpi', 'NoSuchPaddingException', 'NullCipher', 'SealedObject', 'SecretKey', 'SecretKeyFactory', 'SecretKeyFactorySpi', 'ShortBufferException' + ), + 58 => array ( + 'DHKey', 'DHPrivateKey', 'DHPublicKey', 'PBEKey' + ), + 59 => array ( + 'DESKeySpec', 'DESedeKeySpec', 'DHGenParameterSpec', 'DHParameterSpec', 'DHPrivateKeySpec', 'DHPublicKeySpec', 'IvParameterSpec', 'OAEPParameterSpec', 'PBEKeySpec', 'PBEParameterSpec', 'PSource', 'PSource.PSpecified', 'RC2ParameterSpec', 'RC5ParameterSpec', 'SecretKeySpec' + ), + 60 => array ( + 'IIOException', 'IIOImage', 'IIOParam', 'IIOParamController', 'ImageIO', 'ImageReadParam', 'ImageReader', 'ImageTranscoder', 'ImageTypeSpecifier', 'ImageWriteParam', 'ImageWriter' + ), + 61 => array ( + 'IIOReadProgressListener', 'IIOReadUpdateListener', 'IIOReadWarningListener', 'IIOWriteProgressListener', 'IIOWriteWarningListener' + ), + 62 => array ( + 'IIOInvalidTreeException', 'IIOMetadata', 'IIOMetadataController', 'IIOMetadataFormat', 'IIOMetadataFormatImpl', 'IIOMetadataNode' + ), + 63 => array ( + 'BMPImageWriteParam' + ), + 64 => array ( + 'JPEGHuffmanTable', 'JPEGImageReadParam', 'JPEGImageWriteParam', 'JPEGQTable' + ), + 65 => array ( + 'IIORegistry', 'IIOServiceProvider', 'ImageInputStreamSpi', 'ImageOutputStreamSpi', 'ImageReaderSpi', 'ImageReaderWriterSpi', 'ImageTranscoderSpi', 'ImageWriterSpi', 'RegisterableService', 'ServiceRegistry', 'ServiceRegistry.Filter' + ), + 66 => array ( + 'FileCacheImageInputStream', 'FileCacheImageOutputStream', 'FileImageInputStream', 'FileImageOutputStream', 'IIOByteBuffer', 'ImageInputStream', 'ImageInputStreamImpl', 'ImageOutputStream', 'ImageOutputStreamImpl', 'MemoryCacheImageInputStream', 'MemoryCacheImageOutputStream' + ), + 67 => array ( + 'AttributeChangeNotification', 'AttributeChangeNotificationFilter', 'AttributeNotFoundException', 'AttributeValueExp', 'BadAttributeValueExpException', 'BadBinaryOpValueExpException', 'BadStringOperationException', 'Descriptor', 'DescriptorAccess', 'DynamicMBean', 'InstanceAlreadyExistsException', 'InstanceNotFoundException', 'InvalidApplicationException', 'JMException', 'JMRuntimeException', 'ListenerNotFoundException', 'MBeanAttributeInfo', 'MBeanConstructorInfo', 'MBeanException', 'MBeanFeatureInfo', 'MBeanInfo', 'MBeanNotificationInfo', 'MBeanOperationInfo', 'MBeanParameterInfo', 'MBeanPermission', 'MBeanRegistration', 'MBeanRegistrationException', 'MBeanServer', 'MBeanServerBuilder', 'MBeanServerConnection', 'MBeanServerDelegate', 'MBeanServerDelegateMBean', 'MBeanServerFactory', 'MBeanServerInvocationHandler', 'MBeanServerNotification', 'MBeanServerPermission', 'MBeanTrustPermission', 'MalformedObjectNameException', 'NotCompliantMBeanException', 'Notification', 'NotificationBroadcaster', + 'NotificationBroadcasterSupport', 'NotificationEmitter', 'NotificationFilter', 'NotificationFilterSupport', 'NotificationListener', 'ObjectInstance', 'ObjectName', 'OperationsException', 'PersistentMBean', 'Query', 'QueryEval', 'QueryExp', 'ReflectionException', 'RuntimeErrorException', 'RuntimeMBeanException', 'RuntimeOperationsException', 'ServiceNotFoundException', 'StandardMBean', 'StringValueExp', 'ValueExp' + ), + 68 => array ( + 'ClassLoaderRepository', 'MLet', 'MLetMBean', 'PrivateClassLoader', 'PrivateMLet' + ), + 69 => array ( + 'DescriptorSupport', 'InvalidTargetObjectTypeException', 'ModelMBean', 'ModelMBeanAttributeInfo', 'ModelMBeanConstructorInfo', 'ModelMBeanInfo', 'ModelMBeanInfoSupport', 'ModelMBeanNotificationBroadcaster', 'ModelMBeanNotificationInfo', 'ModelMBeanOperationInfo', 'RequiredModelMBean', 'XMLParseException' + ), + 70 => array ( + 'CounterMonitor', 'CounterMonitorMBean', 'GaugeMonitor', 'GaugeMonitorMBean', 'Monitor', 'MonitorMBean', 'MonitorNotification', 'MonitorSettingException', 'StringMonitor', 'StringMonitorMBean' + ), + 71 => array ( + 'ArrayType', 'CompositeData', 'CompositeDataSupport', 'CompositeType', 'InvalidOpenTypeException', 'KeyAlreadyExistsException', 'OpenDataException', 'OpenMBeanAttributeInfo', 'OpenMBeanAttributeInfoSupport', 'OpenMBeanConstructorInfo', 'OpenMBeanConstructorInfoSupport', 'OpenMBeanInfo', 'OpenMBeanInfoSupport', 'OpenMBeanOperationInfo', 'OpenMBeanOperationInfoSupport', 'OpenMBeanParameterInfo', 'OpenMBeanParameterInfoSupport', 'SimpleType', 'TabularData', 'TabularDataSupport', 'TabularType' + ), + 72 => array ( + 'InvalidRelationIdException', 'InvalidRelationServiceException', 'InvalidRelationTypeException', 'InvalidRoleInfoException', 'InvalidRoleValueException', 'MBeanServerNotificationFilter', 'Relation', 'RelationException', 'RelationNotFoundException', 'RelationNotification', 'RelationService', 'RelationServiceMBean', 'RelationServiceNotRegisteredException', 'RelationSupport', 'RelationSupportMBean', 'RelationType', 'RelationTypeNotFoundException', 'RelationTypeSupport', 'Role', 'RoleInfo', 'RoleInfoNotFoundException', 'RoleList', 'RoleNotFoundException', 'RoleResult', 'RoleStatus', 'RoleUnresolved', 'RoleUnresolvedList' + ), + 73 => array ( + 'JMXAuthenticator', 'JMXConnectionNotification', 'JMXConnector', 'JMXConnectorFactory', 'JMXConnectorProvider', 'JMXConnectorServer', 'JMXConnectorServerFactory', 'JMXConnectorServerMBean', 'JMXConnectorServerProvider', 'JMXPrincipal', 'JMXProviderException', 'JMXServerErrorException', 'JMXServiceURL', 'MBeanServerForwarder', 'NotificationResult', 'SubjectDelegationPermission', 'TargetedNotification' + ), + 74 => array ( + 'RMIConnection', 'RMIConnectionImpl', 'RMIConnectionImpl_Stub', 'RMIConnector', 'RMIConnectorServer', 'RMIIIOPServerImpl', 'RMIJRMPServerImpl', 'RMIServer', 'RMIServerImpl', 'RMIServerImpl_Stub' + ), + 75 => array ( + 'TimerAlarmClockNotification', 'TimerMBean', 'TimerNotification' + ), + 76 => array ( + 'AuthenticationNotSupportedException', 'BinaryRefAddr', 'CannotProceedException', 'CommunicationException', 'CompositeName', 'CompoundName', 'ConfigurationException', 'ContextNotEmptyException', 'InitialContext', 'InsufficientResourcesException', 'InterruptedNamingException', 'InvalidNameException', 'LimitExceededException', 'LinkException', 'LinkLoopException', 'LinkRef', 'MalformedLinkException', 'Name', 'NameAlreadyBoundException', 'NameClassPair', 'NameNotFoundException', 'NameParser', 'NamingEnumeration', 'NamingException', 'NamingSecurityException', 'NoInitialContextException', 'NoPermissionException', 'NotContextException', 'OperationNotSupportedException', 'PartialResultException', 'RefAddr', 'Referenceable', 'ReferralException', 'ServiceUnavailableException', 'SizeLimitExceededException', 'StringRefAddr', 'TimeLimitExceededException' + ), + 77 => array ( + 'AttributeInUseException', 'AttributeModificationException', 'BasicAttribute', 'BasicAttributes', 'DirContext', 'InitialDirContext', 'InvalidAttributeIdentifierException', 'InvalidAttributesException', 'InvalidSearchControlsException', 'InvalidSearchFilterException', 'ModificationItem', 'NoSuchAttributeException', 'SchemaViolationException', 'SearchControls', 'SearchResult' + ), + 78 => array ( + 'EventContext', 'EventDirContext', 'NamespaceChangeListener', 'NamingEvent', 'NamingExceptionEvent', 'NamingListener', 'ObjectChangeListener' + ), + 79 => array ( + 'BasicControl', 'ControlFactory', 'ExtendedRequest', 'ExtendedResponse', 'HasControls', 'InitialLdapContext', 'LdapContext', 'LdapName', 'LdapReferralException', 'ManageReferralControl', 'PagedResultsControl', 'PagedResultsResponseControl', 'Rdn', 'SortControl', 'SortKey', 'SortResponseControl', 'StartTlsRequest', 'StartTlsResponse', 'UnsolicitedNotification', 'UnsolicitedNotificationEvent', 'UnsolicitedNotificationListener' + ), + 80 => array ( + 'DirObjectFactory', 'DirStateFactory', 'DirStateFactory.Result', 'DirectoryManager', 'InitialContextFactory', 'InitialContextFactoryBuilder', 'NamingManager', 'ObjectFactory', 'ObjectFactoryBuilder', 'ResolveResult', 'Resolver', 'StateFactory' + ), + 81 => array ( + 'ServerSocketFactory', 'SocketFactory' + ), + 82 => array ( + 'CertPathTrustManagerParameters', 'HandshakeCompletedEvent', 'HandshakeCompletedListener', 'HostnameVerifier', 'HttpsURLConnection', 'KeyManager', 'KeyManagerFactory', 'KeyManagerFactorySpi', 'KeyStoreBuilderParameters', 'ManagerFactoryParameters', 'SSLContext', 'SSLContextSpi', 'SSLEngine', 'SSLEngineResult', 'SSLEngineResult.HandshakeStatus', 'SSLEngineResult.Status', 'SSLException', 'SSLHandshakeException', 'SSLKeyException', 'SSLPeerUnverifiedException', 'SSLPermission', 'SSLProtocolException', 'SSLServerSocket', 'SSLServerSocketFactory', 'SSLSession', 'SSLSessionBindingEvent', 'SSLSessionBindingListener', 'SSLSessionContext', 'SSLSocket', 'SSLSocketFactory', 'TrustManager', 'TrustManagerFactory', 'TrustManagerFactorySpi', 'X509ExtendedKeyManager', 'X509KeyManager', 'X509TrustManager' + ), + 83 => array ( + 'AttributeException', 'CancelablePrintJob', 'Doc', 'DocFlavor', 'DocFlavor.BYTE_ARRAY', 'DocFlavor.CHAR_ARRAY', 'DocFlavor.INPUT_STREAM', 'DocFlavor.READER', 'DocFlavor.SERVICE_FORMATTED', 'DocFlavor.STRING', 'DocFlavor.URL', 'DocPrintJob', 'FlavorException', 'MultiDoc', 'MultiDocPrintJob', 'MultiDocPrintService', 'PrintException', 'PrintService', 'PrintServiceLookup', 'ServiceUI', 'ServiceUIFactory', 'SimpleDoc', 'StreamPrintService', 'StreamPrintServiceFactory', 'URIException' + ), + 84 => array ( + 'AttributeSetUtilities', 'DateTimeSyntax', 'DocAttribute', 'DocAttributeSet', 'EnumSyntax', 'HashAttributeSet', 'HashDocAttributeSet', 'HashPrintJobAttributeSet', 'HashPrintRequestAttributeSet', 'HashPrintServiceAttributeSet', 'IntegerSyntax', 'PrintJobAttribute', 'PrintJobAttributeSet', 'PrintRequestAttribute', 'PrintRequestAttributeSet', 'PrintServiceAttribute', 'PrintServiceAttributeSet', 'ResolutionSyntax', 'SetOfIntegerSyntax', 'Size2DSyntax', 'SupportedValuesAttribute', 'TextSyntax', 'URISyntax', 'UnmodifiableSetException' + ), + 85 => array ( + 'Chromaticity', 'ColorSupported', 'Compression', 'Copies', 'CopiesSupported', 'DateTimeAtCompleted', 'DateTimeAtCreation', 'DateTimeAtProcessing', 'Destination', 'DocumentName', 'Fidelity', 'Finishings', 'JobHoldUntil', 'JobImpressions', 'JobImpressionsCompleted', 'JobImpressionsSupported', 'JobKOctets', 'JobKOctetsProcessed', 'JobKOctetsSupported', 'JobMediaSheets', 'JobMediaSheetsCompleted', 'JobMediaSheetsSupported', 'JobMessageFromOperator', 'JobName', 'JobOriginatingUserName', 'JobPriority', 'JobPrioritySupported', 'JobSheets', 'JobState', 'JobStateReason', 'JobStateReasons', 'Media', 'MediaName', 'MediaPrintableArea', 'MediaSize', 'MediaSize.Engineering', 'MediaSize.ISO', 'MediaSize.JIS', 'MediaSize.NA', 'MediaSize.Other', 'MediaSizeName', 'MediaTray', 'MultipleDocumentHandling', 'NumberOfDocuments', 'NumberOfInterveningJobs', 'NumberUp', 'NumberUpSupported', 'OrientationRequested', 'OutputDeviceAssigned', 'PDLOverrideSupported', 'PageRanges', 'PagesPerMinute', 'PagesPerMinuteColor', + 'PresentationDirection', 'PrintQuality', 'PrinterInfo', 'PrinterIsAcceptingJobs', 'PrinterLocation', 'PrinterMakeAndModel', 'PrinterMessageFromOperator', 'PrinterMoreInfo', 'PrinterMoreInfoManufacturer', 'PrinterName', 'PrinterResolution', 'PrinterState', 'PrinterStateReason', 'PrinterStateReasons', 'PrinterURI', 'QueuedJobCount', 'ReferenceUriSchemesSupported', 'RequestingUserName', 'Severity', 'SheetCollate', 'Sides' + ), + 86 => array ( + 'PrintEvent', 'PrintJobAdapter', 'PrintJobAttributeEvent', 'PrintJobAttributeListener', 'PrintJobEvent', 'PrintJobListener', 'PrintServiceAttributeEvent', 'PrintServiceAttributeListener' + ), + 87 => array ( + 'PortableRemoteObject' + ), + 88 => array ( + 'ClassDesc', 'PortableRemoteObjectDelegate', 'Stub', 'StubDelegate', 'Tie', 'Util', 'UtilDelegate', 'ValueHandler', 'ValueHandlerMultiFormat' + ), + 89 => array ( + 'SslRMIClientSocketFactory', 'SslRMIServerSocketFactory' + ), + 90 => array ( + 'AuthPermission', 'DestroyFailedException', 'Destroyable', 'PrivateCredentialPermission', 'RefreshFailedException', 'Refreshable', 'Subject', 'SubjectDomainCombiner' + ), + 91 => array ( + 'Callback', 'CallbackHandler', 'ChoiceCallback', 'ConfirmationCallback', 'LanguageCallback', 'NameCallback', 'PasswordCallback', 'TextInputCallback', 'TextOutputCallback', 'UnsupportedCallbackException' + ), + 92 => array ( + 'DelegationPermission', 'KerberosKey', 'KerberosPrincipal', 'KerberosTicket', 'ServicePermission' + ), + 93 => array ( + 'AccountException', 'AccountExpiredException', 'AccountLockedException', 'AccountNotFoundException', 'AppConfigurationEntry', 'AppConfigurationEntry.LoginModuleControlFlag', 'Configuration', 'CredentialException', 'CredentialExpiredException', 'CredentialNotFoundException', 'FailedLoginException', 'LoginContext', 'LoginException' + ), + 94 => array ( + 'LoginModule' + ), + 95 => array ( + 'X500Principal', 'X500PrivateCredential' + ), + 96 => array ( + 'AuthorizeCallback', 'RealmCallback', 'RealmChoiceCallback', 'Sasl', 'SaslClient', 'SaslClientFactory', 'SaslException', 'SaslServer', 'SaslServerFactory' + ), + 97 => array ( + 'ControllerEventListener', 'Instrument', 'InvalidMidiDataException', 'MetaEventListener', 'MetaMessage', 'MidiChannel', 'MidiDevice', 'MidiDevice.Info', 'MidiEvent', 'MidiFileFormat', 'MidiMessage', 'MidiSystem', 'MidiUnavailableException', 'Patch', 'Receiver', 'Sequence', 'Sequencer', 'Sequencer.SyncMode', 'ShortMessage', 'Soundbank', 'SoundbankResource', 'Synthesizer', 'SysexMessage', 'Track', 'Transmitter', 'VoiceStatus' + ), + 98 => array ( + 'MidiDeviceProvider', 'MidiFileReader', 'MidiFileWriter', 'SoundbankReader' + ), + 99 => array ( + 'AudioFileFormat', 'AudioFileFormat.Type', 'AudioFormat', 'AudioFormat.Encoding', 'AudioInputStream', 'AudioPermission', 'AudioSystem', 'BooleanControl', 'BooleanControl.Type', 'Clip', 'CompoundControl', 'CompoundControl.Type', 'Control.Type', 'DataLine', 'DataLine.Info', 'EnumControl', 'EnumControl.Type', 'FloatControl', 'FloatControl.Type', 'Line', 'Line.Info', 'LineEvent', 'LineEvent.Type', 'LineListener', 'LineUnavailableException', 'Mixer', 'Mixer.Info', 'Port', 'Port.Info', 'ReverbType', 'SourceDataLine', 'TargetDataLine', 'UnsupportedAudioFileException' + ), + 100 => array ( + 'AudioFileReader', 'AudioFileWriter', 'FormatConversionProvider', 'MixerProvider' + ), + 101 => array ( + 'ConnectionEvent', 'ConnectionEventListener', 'ConnectionPoolDataSource', 'DataSource', 'PooledConnection', 'RowSet', 'RowSetEvent', 'RowSetInternal', 'RowSetListener', 'RowSetMetaData', 'RowSetReader', 'RowSetWriter', 'XAConnection', 'XADataSource' + ), + 102 => array ( + 'BaseRowSet', 'CachedRowSet', 'FilteredRowSet', 'JdbcRowSet', 'JoinRowSet', 'Joinable', 'Predicate', 'RowSetMetaDataImpl', 'RowSetWarning', 'WebRowSet' + ), + 103 => array ( + 'SQLInputImpl', 'SQLOutputImpl', 'SerialArray', 'SerialBlob', 'SerialClob', 'SerialDatalink', 'SerialException', 'SerialJavaObject', 'SerialRef', 'SerialStruct' + ), + 104 => array ( + 'SyncFactory', 'SyncFactoryException', 'SyncProvider', 'SyncProviderException', 'SyncResolver', 'TransactionalWriter', 'XmlReader', 'XmlWriter' + ), + 105 => array ( + 'AbstractAction', 'AbstractButton', 'AbstractCellEditor', 'AbstractListModel', 'AbstractSpinnerModel', 'Action', 'ActionMap', 'BorderFactory', 'BoundedRangeModel', 'Box', 'Box.Filler', 'BoxLayout', 'ButtonGroup', 'ButtonModel', 'CellEditor', 'CellRendererPane', 'ComboBoxEditor', 'ComboBoxModel', 'ComponentInputMap', 'DebugGraphics', 'DefaultBoundedRangeModel', 'DefaultButtonModel', 'DefaultCellEditor', 'DefaultComboBoxModel', 'DefaultDesktopManager', 'DefaultFocusManager', 'DefaultListCellRenderer', 'DefaultListCellRenderer.UIResource', 'DefaultListModel', 'DefaultListSelectionModel', 'DefaultSingleSelectionModel', 'DesktopManager', 'FocusManager', 'GrayFilter', 'Icon', 'ImageIcon', 'InputMap', 'InputVerifier', 'InternalFrameFocusTraversalPolicy', 'JApplet', 'JButton', 'JCheckBox', 'JCheckBoxMenuItem', 'JColorChooser', 'JComboBox', 'JComboBox.KeySelectionManager', 'JComponent', 'JDesktopPane', 'JDialog', 'JEditorPane', 'JFileChooser', 'JFormattedTextField', 'JFormattedTextField.AbstractFormatter', + 'JFormattedTextField.AbstractFormatterFactory', 'JFrame', 'JInternalFrame', 'JInternalFrame.JDesktopIcon', 'JLabel', 'JLayeredPane', 'JList', 'JMenu', 'JMenuBar', 'JMenuItem', 'JOptionPane', 'JPanel', 'JPasswordField', 'JPopupMenu', 'JPopupMenu.Separator', 'JProgressBar', 'JRadioButton', 'JRadioButtonMenuItem', 'JRootPane', 'JScrollBar', 'JScrollPane', 'JSeparator', 'JSlider', 'JSpinner', 'JSpinner.DateEditor', 'JSpinner.DefaultEditor', 'JSpinner.ListEditor', 'JSpinner.NumberEditor', 'JSplitPane', 'JTabbedPane', 'JTable', 'JTable.PrintMode', 'JTextArea', 'JTextField', 'JTextPane', 'JToggleButton', 'JToggleButton.ToggleButtonModel', 'JToolBar', 'JToolBar.Separator', 'JToolTip', 'JTree', 'JTree.DynamicUtilTreeNode', 'JTree.EmptySelectionModel', 'JViewport', 'JWindow', 'KeyStroke', 'LayoutFocusTraversalPolicy', 'ListCellRenderer', 'ListModel', 'ListSelectionModel', 'LookAndFeel', 'MenuElement', 'MenuSelectionManager', 'MutableComboBoxModel', 'OverlayLayout', 'Popup', 'PopupFactory', 'ProgressMonitor', + 'ProgressMonitorInputStream', 'Renderer', 'RepaintManager', 'RootPaneContainer', 'ScrollPaneConstants', 'ScrollPaneLayout', 'ScrollPaneLayout.UIResource', 'Scrollable', 'SingleSelectionModel', 'SizeRequirements', 'SizeSequence', 'SortingFocusTraversalPolicy', 'SpinnerDateModel', 'SpinnerListModel', 'SpinnerModel', 'SpinnerNumberModel', 'Spring', 'SpringLayout', 'SpringLayout.Constraints', 'SwingConstants', 'SwingUtilities', 'ToolTipManager', 'TransferHandler', 'UIDefaults', 'UIDefaults.ActiveValue', 'UIDefaults.LazyInputMap', 'UIDefaults.LazyValue', 'UIDefaults.ProxyLazyValue', 'UIManager', 'UIManager.LookAndFeelInfo', 'UnsupportedLookAndFeelException', 'ViewportLayout', 'WindowConstants' + ), + 106 => array ( + 'AbstractBorder', 'BevelBorder', 'Border', 'CompoundBorder', 'EmptyBorder', 'EtchedBorder', 'LineBorder', 'MatteBorder', 'SoftBevelBorder', 'TitledBorder' + ), + 107 => array ( + 'AbstractColorChooserPanel', 'ColorChooserComponentFactory', 'ColorSelectionModel', 'DefaultColorSelectionModel' + ), + 108 => array ( + 'AncestorEvent', 'AncestorListener', 'CaretEvent', 'CaretListener', 'CellEditorListener', 'ChangeEvent', 'ChangeListener', 'DocumentEvent.ElementChange', 'DocumentEvent.EventType', 'DocumentListener', 'EventListenerList', 'HyperlinkEvent', 'HyperlinkEvent.EventType', 'HyperlinkListener', 'InternalFrameAdapter', 'InternalFrameEvent', 'InternalFrameListener', 'ListDataEvent', 'ListDataListener', 'ListSelectionEvent', 'ListSelectionListener', 'MenuDragMouseEvent', 'MenuDragMouseListener', 'MenuEvent', 'MenuKeyEvent', 'MenuKeyListener', 'MenuListener', 'MouseInputAdapter', 'MouseInputListener', 'PopupMenuEvent', 'PopupMenuListener', 'SwingPropertyChangeSupport', 'TableColumnModelEvent', 'TableColumnModelListener', 'TableModelEvent', 'TableModelListener', 'TreeExpansionEvent', 'TreeExpansionListener', 'TreeModelEvent', 'TreeModelListener', 'TreeSelectionEvent', 'TreeSelectionListener', 'TreeWillExpandListener', 'UndoableEditEvent', 'UndoableEditListener' + ), + 109 => array ( + 'FileSystemView', 'FileView' + ), + 110 => array ( + 'ActionMapUIResource', 'BorderUIResource', 'BorderUIResource.BevelBorderUIResource', 'BorderUIResource.CompoundBorderUIResource', 'BorderUIResource.EmptyBorderUIResource', 'BorderUIResource.EtchedBorderUIResource', 'BorderUIResource.LineBorderUIResource', 'BorderUIResource.MatteBorderUIResource', 'BorderUIResource.TitledBorderUIResource', 'ButtonUI', 'ColorChooserUI', 'ColorUIResource', 'ComboBoxUI', 'ComponentInputMapUIResource', 'ComponentUI', 'DesktopIconUI', 'DesktopPaneUI', 'DimensionUIResource', 'FileChooserUI', 'FontUIResource', 'IconUIResource', 'InputMapUIResource', 'InsetsUIResource', 'InternalFrameUI', 'LabelUI', 'ListUI', 'MenuBarUI', 'MenuItemUI', 'OptionPaneUI', 'PanelUI', 'PopupMenuUI', 'ProgressBarUI', 'RootPaneUI', 'ScrollBarUI', 'ScrollPaneUI', 'SeparatorUI', 'SliderUI', 'SpinnerUI', 'SplitPaneUI', 'TabbedPaneUI', 'TableHeaderUI', 'TableUI', 'TextUI', 'ToolBarUI', 'ToolTipUI', 'TreeUI', 'UIResource', 'ViewportUI' + ), + 111 => array ( + 'BasicArrowButton', 'BasicBorders', 'BasicBorders.ButtonBorder', 'BasicBorders.FieldBorder', 'BasicBorders.MarginBorder', 'BasicBorders.MenuBarBorder', 'BasicBorders.RadioButtonBorder', 'BasicBorders.RolloverButtonBorder', 'BasicBorders.SplitPaneBorder', 'BasicBorders.ToggleButtonBorder', 'BasicButtonListener', 'BasicButtonUI', 'BasicCheckBoxMenuItemUI', 'BasicCheckBoxUI', 'BasicColorChooserUI', 'BasicComboBoxEditor', 'BasicComboBoxEditor.UIResource', 'BasicComboBoxRenderer', 'BasicComboBoxRenderer.UIResource', 'BasicComboBoxUI', 'BasicComboPopup', 'BasicDesktopIconUI', 'BasicDesktopPaneUI', 'BasicDirectoryModel', 'BasicEditorPaneUI', 'BasicFileChooserUI', 'BasicFormattedTextFieldUI', 'BasicGraphicsUtils', 'BasicHTML', 'BasicIconFactory', 'BasicInternalFrameTitlePane', 'BasicInternalFrameUI', 'BasicLabelUI', 'BasicListUI', 'BasicLookAndFeel', 'BasicMenuBarUI', 'BasicMenuItemUI', 'BasicMenuUI', 'BasicOptionPaneUI', 'BasicOptionPaneUI.ButtonAreaLayout', 'BasicPanelUI', 'BasicPasswordFieldUI', + 'BasicPopupMenuSeparatorUI', 'BasicPopupMenuUI', 'BasicProgressBarUI', 'BasicRadioButtonMenuItemUI', 'BasicRadioButtonUI', 'BasicRootPaneUI', 'BasicScrollBarUI', 'BasicScrollPaneUI', 'BasicSeparatorUI', 'BasicSliderUI', 'BasicSpinnerUI', 'BasicSplitPaneDivider', 'BasicSplitPaneUI', 'BasicTabbedPaneUI', 'BasicTableHeaderUI', 'BasicTableUI', 'BasicTextAreaUI', 'BasicTextFieldUI', 'BasicTextPaneUI', 'BasicTextUI', 'BasicTextUI.BasicCaret', 'BasicTextUI.BasicHighlighter', 'BasicToggleButtonUI', 'BasicToolBarSeparatorUI', 'BasicToolBarUI', 'BasicToolTipUI', 'BasicTreeUI', 'BasicViewportUI', 'ComboPopup', 'DefaultMenuLayout' + ), + 112 => array ( + 'DefaultMetalTheme', 'MetalBorders', 'MetalBorders.ButtonBorder', 'MetalBorders.Flush3DBorder', 'MetalBorders.InternalFrameBorder', 'MetalBorders.MenuBarBorder', 'MetalBorders.MenuItemBorder', 'MetalBorders.OptionDialogBorder', 'MetalBorders.PaletteBorder', 'MetalBorders.PopupMenuBorder', 'MetalBorders.RolloverButtonBorder', 'MetalBorders.ScrollPaneBorder', 'MetalBorders.TableHeaderBorder', 'MetalBorders.TextFieldBorder', 'MetalBorders.ToggleButtonBorder', 'MetalBorders.ToolBarBorder', 'MetalButtonUI', 'MetalCheckBoxIcon', 'MetalCheckBoxUI', 'MetalComboBoxButton', 'MetalComboBoxEditor', 'MetalComboBoxEditor.UIResource', 'MetalComboBoxIcon', 'MetalComboBoxUI', 'MetalDesktopIconUI', 'MetalFileChooserUI', 'MetalIconFactory', 'MetalIconFactory.FileIcon16', 'MetalIconFactory.FolderIcon16', 'MetalIconFactory.PaletteCloseIcon', 'MetalIconFactory.TreeControlIcon', 'MetalIconFactory.TreeFolderIcon', 'MetalIconFactory.TreeLeafIcon', 'MetalInternalFrameTitlePane', 'MetalInternalFrameUI', 'MetalLabelUI', + 'MetalLookAndFeel', 'MetalMenuBarUI', 'MetalPopupMenuSeparatorUI', 'MetalProgressBarUI', 'MetalRadioButtonUI', 'MetalRootPaneUI', 'MetalScrollBarUI', 'MetalScrollButton', 'MetalScrollPaneUI', 'MetalSeparatorUI', 'MetalSliderUI', 'MetalSplitPaneUI', 'MetalTabbedPaneUI', 'MetalTextFieldUI', 'MetalTheme', 'MetalToggleButtonUI', 'MetalToolBarUI', 'MetalToolTipUI', 'MetalTreeUI', 'OceanTheme' + ), + 113 => array ( + 'MultiButtonUI', 'MultiColorChooserUI', 'MultiComboBoxUI', 'MultiDesktopIconUI', 'MultiDesktopPaneUI', 'MultiFileChooserUI', 'MultiInternalFrameUI', 'MultiLabelUI', 'MultiListUI', 'MultiLookAndFeel', 'MultiMenuBarUI', 'MultiMenuItemUI', 'MultiOptionPaneUI', 'MultiPanelUI', 'MultiPopupMenuUI', 'MultiProgressBarUI', 'MultiRootPaneUI', 'MultiScrollBarUI', 'MultiScrollPaneUI', 'MultiSeparatorUI', 'MultiSliderUI', 'MultiSpinnerUI', 'MultiSplitPaneUI', 'MultiTabbedPaneUI', 'MultiTableHeaderUI', 'MultiTableUI', 'MultiTextUI', 'MultiToolBarUI', 'MultiToolTipUI', 'MultiTreeUI', 'MultiViewportUI' + ), + 114 => array ( + 'ColorType', 'Region', 'SynthConstants', 'SynthContext', 'SynthGraphicsUtils', 'SynthLookAndFeel', 'SynthPainter', 'SynthStyle', 'SynthStyleFactory' + ), + 115 => array ( + 'AbstractTableModel', 'DefaultTableCellRenderer', 'DefaultTableCellRenderer.UIResource', 'DefaultTableColumnModel', 'DefaultTableModel', 'JTableHeader', 'TableCellEditor', 'TableCellRenderer', 'TableColumn', 'TableColumnModel', 'TableModel' + ), + 116 => array ( + 'AbstractDocument', 'AbstractDocument.AttributeContext', 'AbstractDocument.Content', 'AbstractDocument.ElementEdit', 'AbstractWriter', 'AsyncBoxView', 'AttributeSet.CharacterAttribute', 'AttributeSet.ColorAttribute', 'AttributeSet.FontAttribute', 'AttributeSet.ParagraphAttribute', 'BadLocationException', 'BoxView', 'Caret', 'ChangedCharSetException', 'ComponentView', 'CompositeView', 'DateFormatter', 'DefaultCaret', 'DefaultEditorKit', 'DefaultEditorKit.BeepAction', 'DefaultEditorKit.CopyAction', 'DefaultEditorKit.CutAction', 'DefaultEditorKit.DefaultKeyTypedAction', 'DefaultEditorKit.InsertBreakAction', 'DefaultEditorKit.InsertContentAction', 'DefaultEditorKit.InsertTabAction', 'DefaultEditorKit.PasteAction', 'DefaultFormatter', 'DefaultFormatterFactory', 'DefaultHighlighter', 'DefaultHighlighter.DefaultHighlightPainter', 'DefaultStyledDocument', 'DefaultStyledDocument.AttributeUndoableEdit', 'DefaultStyledDocument.ElementSpec', 'DefaultTextUI', 'DocumentFilter', 'DocumentFilter.FilterBypass', + 'EditorKit', 'ElementIterator', 'FieldView', 'FlowView', 'FlowView.FlowStrategy', 'GapContent', 'GlyphView', 'GlyphView.GlyphPainter', 'Highlighter', 'Highlighter.Highlight', 'Highlighter.HighlightPainter', 'IconView', 'InternationalFormatter', 'JTextComponent', 'JTextComponent.KeyBinding', 'Keymap', 'LabelView', 'LayeredHighlighter', 'LayeredHighlighter.LayerPainter', 'LayoutQueue', 'MaskFormatter', 'MutableAttributeSet', 'NavigationFilter', 'NavigationFilter.FilterBypass', 'NumberFormatter', 'PasswordView', 'PlainDocument', 'PlainView', 'Position', 'Position.Bias', 'Segment', 'SimpleAttributeSet', 'StringContent', 'Style', 'StyleConstants', 'StyleConstants.CharacterConstants', 'StyleConstants.ColorConstants', 'StyleConstants.FontConstants', 'StyleConstants.ParagraphConstants', 'StyleContext', 'StyledDocument', 'StyledEditorKit', 'StyledEditorKit.AlignmentAction', 'StyledEditorKit.BoldAction', 'StyledEditorKit.FontFamilyAction', 'StyledEditorKit.FontSizeAction', 'StyledEditorKit.ForegroundAction', + 'StyledEditorKit.ItalicAction', 'StyledEditorKit.StyledTextAction', 'StyledEditorKit.UnderlineAction', 'TabExpander', 'TabSet', 'TabStop', 'TabableView', 'TableView', 'TextAction', 'Utilities', 'View', 'ViewFactory', 'WrappedPlainView', 'ZoneView' + ), + 117 => array ( + 'BlockView', 'CSS', 'CSS.Attribute', 'FormSubmitEvent', 'FormSubmitEvent.MethodType', 'FormView', 'HTML', 'HTML.Attribute', 'HTML.Tag', 'HTML.UnknownTag', 'HTMLDocument', 'HTMLDocument.Iterator', 'HTMLEditorKit', 'HTMLEditorKit.HTMLFactory', 'HTMLEditorKit.HTMLTextAction', 'HTMLEditorKit.InsertHTMLTextAction', 'HTMLEditorKit.LinkController', 'HTMLEditorKit.Parser', 'HTMLEditorKit.ParserCallback', 'HTMLFrameHyperlinkEvent', 'HTMLWriter', 'ImageView', 'InlineView', 'ListView', 'MinimalHTMLWriter', 'ObjectView', 'Option', 'StyleSheet', 'StyleSheet.BoxPainter', 'StyleSheet.ListPainter' + ), + 118 => array ( + 'ContentModel', 'DTD', 'DTDConstants', 'DocumentParser', 'ParserDelegator', 'TagElement' + ), + 119 => array ( + 'RTFEditorKit' + ), + 120 => array ( + 'AbstractLayoutCache', 'AbstractLayoutCache.NodeDimensions', 'DefaultMutableTreeNode', 'DefaultTreeCellEditor', 'DefaultTreeCellRenderer', 'DefaultTreeModel', 'DefaultTreeSelectionModel', 'ExpandVetoException', 'FixedHeightLayoutCache', 'MutableTreeNode', 'RowMapper', 'TreeCellEditor', 'TreeCellRenderer', 'TreeModel', 'TreeNode', 'TreePath', 'TreeSelectionModel', 'VariableHeightLayoutCache' + ), + 121 => array ( + 'AbstractUndoableEdit', 'CannotRedoException', 'CannotUndoException', 'CompoundEdit', 'StateEdit', 'StateEditable', 'UndoManager', 'UndoableEdit', 'UndoableEditSupport' + ), + 122 => array ( + 'InvalidTransactionException', 'TransactionRequiredException', 'TransactionRolledbackException' + ), + 123 => array ( + 'XAException', 'XAResource', 'Xid' + ), + 124 => array ( + 'XMLConstants' + ), + 125 => array ( + 'DatatypeConfigurationException', 'DatatypeConstants', 'DatatypeConstants.Field', 'DatatypeFactory', 'Duration', 'XMLGregorianCalendar' + ), + 126 => array ( + 'NamespaceContext', 'QName' + ), + 127 => array ( + 'DocumentBuilder', 'DocumentBuilderFactory', 'FactoryConfigurationError', 'ParserConfigurationException', 'SAXParser', 'SAXParserFactory' + ), + 128 => array ( + 'ErrorListener', 'OutputKeys', 'Result', 'Source', 'SourceLocator', 'Templates', 'Transformer', 'TransformerConfigurationException', 'TransformerException', 'TransformerFactory', 'TransformerFactoryConfigurationError', 'URIResolver' + ), + 129 => array ( + 'DOMResult', 'DOMSource' + ), + 130 => array ( + 'SAXResult', 'SAXSource', 'SAXTransformerFactory', 'TemplatesHandler', 'TransformerHandler' + ), + 131 => array ( + 'StreamResult', 'StreamSource' + ), + 132 => array ( + 'Schema', 'SchemaFactory', 'SchemaFactoryLoader', 'TypeInfoProvider', 'Validator', 'ValidatorHandler' + ), + 133 => array ( + 'XPath', 'XPathConstants', 'XPathException', 'XPathExpression', 'XPathExpressionException', 'XPathFactory', 'XPathFactoryConfigurationException', 'XPathFunction', 'XPathFunctionException', 'XPathFunctionResolver', 'XPathVariableResolver' + ), + 134 => array ( + 'ChannelBinding', 'GSSContext', 'GSSCredential', 'GSSException', 'GSSManager', 'GSSName', 'MessageProp', 'Oid' + ), + 135 => array ( + 'ACTIVITY_COMPLETED', 'ACTIVITY_REQUIRED', 'ARG_IN', 'ARG_INOUT', 'ARG_OUT', 'Any', 'AnyHolder', 'AnySeqHolder', 'BAD_CONTEXT', 'BAD_INV_ORDER', 'BAD_OPERATION', 'BAD_PARAM', 'BAD_POLICY', 'BAD_POLICY_TYPE', 'BAD_POLICY_VALUE', 'BAD_QOS', 'BAD_TYPECODE', 'BooleanHolder', 'BooleanSeqHelper', 'BooleanSeqHolder', 'ByteHolder', 'CODESET_INCOMPATIBLE', 'COMM_FAILURE', 'CTX_RESTRICT_SCOPE', 'CharHolder', 'CharSeqHelper', 'CharSeqHolder', 'CompletionStatus', 'CompletionStatusHelper', 'ContextList', 'CurrentHolder', 'CustomMarshal', 'DATA_CONVERSION', 'DefinitionKind', 'DefinitionKindHelper', 'DomainManager', 'DomainManagerOperations', 'DoubleHolder', 'DoubleSeqHelper', 'DoubleSeqHolder', 'Environment', 'ExceptionList', 'FREE_MEM', 'FixedHolder', 'FloatHolder', 'FloatSeqHelper', 'FloatSeqHolder', 'IDLType', 'IDLTypeHelper', 'IDLTypeOperations', 'IMP_LIMIT', 'INITIALIZE', 'INTERNAL', 'INTF_REPOS', 'INVALID_ACTIVITY', 'INVALID_TRANSACTION', 'INV_FLAG', 'INV_IDENT', 'INV_OBJREF', 'INV_POLICY', 'IRObject', + 'IRObjectOperations', 'IdentifierHelper', 'IntHolder', 'LocalObject', 'LongHolder', 'LongLongSeqHelper', 'LongLongSeqHolder', 'LongSeqHelper', 'LongSeqHolder', 'MARSHAL', 'NO_IMPLEMENT', 'NO_MEMORY', 'NO_PERMISSION', 'NO_RESOURCES', 'NO_RESPONSE', 'NVList', 'NamedValue', 'OBJECT_NOT_EXIST', 'OBJ_ADAPTER', 'OMGVMCID', 'ObjectHelper', 'ObjectHolder', 'OctetSeqHelper', 'OctetSeqHolder', 'PERSIST_STORE', 'PRIVATE_MEMBER', 'PUBLIC_MEMBER', 'ParameterMode', 'ParameterModeHelper', 'ParameterModeHolder', 'PolicyError', 'PolicyErrorCodeHelper', 'PolicyErrorHelper', 'PolicyErrorHolder', 'PolicyHelper', 'PolicyHolder', 'PolicyListHelper', 'PolicyListHolder', 'PolicyOperations', 'PolicyTypeHelper', 'PrincipalHolder', 'REBIND', 'RepositoryIdHelper', 'Request', 'ServerRequest', 'ServiceDetail', 'ServiceDetailHelper', 'ServiceInformation', 'ServiceInformationHelper', 'ServiceInformationHolder', 'SetOverrideType', 'SetOverrideTypeHelper', 'ShortHolder', 'ShortSeqHelper', 'ShortSeqHolder', 'StringHolder', + 'StringSeqHelper', 'StringSeqHolder', 'StringValueHelper', 'StructMember', 'StructMemberHelper', 'SystemException', 'TCKind', 'TIMEOUT', 'TRANSACTION_MODE', 'TRANSACTION_REQUIRED', 'TRANSACTION_ROLLEDBACK', 'TRANSACTION_UNAVAILABLE', 'TRANSIENT', 'TypeCode', 'TypeCodeHolder', 'ULongLongSeqHelper', 'ULongLongSeqHolder', 'ULongSeqHelper', 'ULongSeqHolder', 'UNSUPPORTED_POLICY', 'UNSUPPORTED_POLICY_VALUE', 'UShortSeqHelper', 'UShortSeqHolder', 'UnionMember', 'UnionMemberHelper', 'UnknownUserException', 'UnknownUserExceptionHelper', 'UnknownUserExceptionHolder', 'UserException', 'VM_ABSTRACT', 'VM_CUSTOM', 'VM_NONE', 'VM_TRUNCATABLE', 'ValueBaseHelper', 'ValueBaseHolder', 'ValueMember', 'ValueMemberHelper', 'VersionSpecHelper', 'VisibilityHelper', 'WCharSeqHelper', 'WCharSeqHolder', 'WStringSeqHelper', 'WStringSeqHolder', 'WStringValueHelper', 'WrongTransaction', 'WrongTransactionHelper', 'WrongTransactionHolder', '_IDLTypeStub', '_PolicyStub' + ), + 136 => array ( + 'Invalid', 'InvalidSeq' + ), + 137 => array ( + 'BadKind' + ), + 138 => array ( + 'ApplicationException', 'BoxedValueHelper', 'CustomValue', 'IDLEntity', 'IndirectionException', 'InvokeHandler', 'RemarshalException', 'ResponseHandler', 'ServantObject', 'Streamable', 'StreamableValue', 'UnknownException', 'ValueBase', 'ValueFactory', 'ValueInputStream', 'ValueOutputStream' + ), + 139 => array ( + 'BindingHelper', 'BindingHolder', 'BindingIterator', 'BindingIteratorHelper', 'BindingIteratorHolder', 'BindingIteratorOperations', 'BindingIteratorPOA', 'BindingListHelper', 'BindingListHolder', 'BindingType', 'BindingTypeHelper', 'BindingTypeHolder', 'IstringHelper', 'NameComponent', 'NameComponentHelper', 'NameComponentHolder', 'NameHelper', 'NameHolder', 'NamingContext', 'NamingContextExt', 'NamingContextExtHelper', 'NamingContextExtHolder', 'NamingContextExtOperations', 'NamingContextExtPOA', 'NamingContextHelper', 'NamingContextHolder', 'NamingContextOperations', 'NamingContextPOA', '_BindingIteratorImplBase', '_BindingIteratorStub', '_NamingContextExtStub', '_NamingContextImplBase', '_NamingContextStub' + ), + 140 => array ( + 'AddressHelper', 'InvalidAddress', 'InvalidAddressHelper', 'InvalidAddressHolder', 'StringNameHelper', 'URLStringHelper' + ), + 141 => array ( + 'AlreadyBound', 'AlreadyBoundHelper', 'AlreadyBoundHolder', 'CannotProceed', 'CannotProceedHelper', 'CannotProceedHolder', 'InvalidNameHolder', 'NotEmpty', 'NotEmptyHelper', 'NotEmptyHolder', 'NotFound', 'NotFoundHelper', 'NotFoundHolder', 'NotFoundReason', 'NotFoundReasonHelper', 'NotFoundReasonHolder' + ), + 142 => array ( + 'Parameter' + ), + 143 => array ( + 'DynAnyFactory', 'DynAnyFactoryHelper', 'DynAnyFactoryOperations', 'DynAnyHelper', 'DynAnyOperations', 'DynAnySeqHelper', 'DynArrayHelper', 'DynArrayOperations', 'DynEnumHelper', 'DynEnumOperations', 'DynFixedHelper', 'DynFixedOperations', 'DynSequenceHelper', 'DynSequenceOperations', 'DynStructHelper', 'DynStructOperations', 'DynUnionHelper', 'DynUnionOperations', 'DynValueBox', 'DynValueBoxOperations', 'DynValueCommon', 'DynValueCommonOperations', 'DynValueHelper', 'DynValueOperations', 'NameDynAnyPair', 'NameDynAnyPairHelper', 'NameDynAnyPairSeqHelper', 'NameValuePairSeqHelper', '_DynAnyFactoryStub', '_DynAnyStub', '_DynArrayStub', '_DynEnumStub', '_DynFixedStub', '_DynSequenceStub', '_DynStructStub', '_DynUnionStub', '_DynValueStub' + ), + 144 => array ( + 'InconsistentTypeCodeHelper' + ), + 145 => array ( + 'InvalidValueHelper' + ), + 146 => array ( + 'CodeSets', 'Codec', 'CodecFactory', 'CodecFactoryHelper', 'CodecFactoryOperations', 'CodecOperations', 'ComponentIdHelper', 'ENCODING_CDR_ENCAPS', 'Encoding', 'ExceptionDetailMessage', 'IOR', 'IORHelper', 'IORHolder', 'MultipleComponentProfileHelper', 'MultipleComponentProfileHolder', 'ProfileIdHelper', 'RMICustomMaxStreamFormat', 'ServiceContext', 'ServiceContextHelper', 'ServiceContextHolder', 'ServiceContextListHelper', 'ServiceContextListHolder', 'ServiceIdHelper', 'TAG_ALTERNATE_IIOP_ADDRESS', 'TAG_CODE_SETS', 'TAG_INTERNET_IOP', 'TAG_JAVA_CODEBASE', 'TAG_MULTIPLE_COMPONENTS', 'TAG_ORB_TYPE', 'TAG_POLICIES', 'TAG_RMI_CUSTOM_MAX_STREAM_FORMAT', 'TaggedComponent', 'TaggedComponentHelper', 'TaggedComponentHolder', 'TaggedProfile', 'TaggedProfileHelper', 'TaggedProfileHolder', 'TransactionService' + ), + 147 => array ( + 'UnknownEncoding', 'UnknownEncodingHelper' + ), + 148 => array ( + 'FormatMismatch', 'FormatMismatchHelper', 'InvalidTypeForEncoding', 'InvalidTypeForEncodingHelper' + ), + 149 => array ( + 'SYNC_WITH_TRANSPORT', 'SyncScopeHelper' + ), + 150 => array ( + 'ACTIVE', 'AdapterManagerIdHelper', 'AdapterNameHelper', 'AdapterStateHelper', 'ClientRequestInfo', 'ClientRequestInfoOperations', 'ClientRequestInterceptor', 'ClientRequestInterceptorOperations', 'DISCARDING', 'HOLDING', 'INACTIVE', 'IORInfo', 'IORInfoOperations', 'IORInterceptor', 'IORInterceptorOperations', 'IORInterceptor_3_0', 'IORInterceptor_3_0Helper', 'IORInterceptor_3_0Holder', 'IORInterceptor_3_0Operations', 'Interceptor', 'InterceptorOperations', 'InvalidSlot', 'InvalidSlotHelper', 'LOCATION_FORWARD', 'NON_EXISTENT', 'ORBIdHelper', 'ORBInitInfo', 'ORBInitInfoOperations', 'ORBInitializer', 'ORBInitializerOperations', 'ObjectReferenceFactory', 'ObjectReferenceFactoryHelper', 'ObjectReferenceFactoryHolder', 'ObjectReferenceTemplate', 'ObjectReferenceTemplateHelper', 'ObjectReferenceTemplateHolder', 'ObjectReferenceTemplateSeqHelper', 'ObjectReferenceTemplateSeqHolder', 'PolicyFactory', 'PolicyFactoryOperations', 'RequestInfo', 'RequestInfoOperations', 'SUCCESSFUL', 'SYSTEM_EXCEPTION', + 'ServerIdHelper', 'ServerRequestInfo', 'ServerRequestInfoOperations', 'ServerRequestInterceptor', 'ServerRequestInterceptorOperations', 'TRANSPORT_RETRY', 'USER_EXCEPTION' + ), + 151 => array ( + 'DuplicateName', 'DuplicateNameHelper' + ), + 152 => array ( + 'AdapterActivator', 'AdapterActivatorOperations', 'ID_ASSIGNMENT_POLICY_ID', 'ID_UNIQUENESS_POLICY_ID', 'IMPLICIT_ACTIVATION_POLICY_ID', 'IdAssignmentPolicy', 'IdAssignmentPolicyOperations', 'IdAssignmentPolicyValue', 'IdUniquenessPolicy', 'IdUniquenessPolicyOperations', 'IdUniquenessPolicyValue', 'ImplicitActivationPolicy', 'ImplicitActivationPolicyOperations', 'ImplicitActivationPolicyValue', 'LIFESPAN_POLICY_ID', 'LifespanPolicy', 'LifespanPolicyOperations', 'LifespanPolicyValue', 'POA', 'POAHelper', 'POAManager', 'POAManagerOperations', 'POAOperations', 'REQUEST_PROCESSING_POLICY_ID', 'RequestProcessingPolicy', 'RequestProcessingPolicyOperations', 'RequestProcessingPolicyValue', 'SERVANT_RETENTION_POLICY_ID', 'Servant', 'ServantActivator', 'ServantActivatorHelper', 'ServantActivatorOperations', 'ServantActivatorPOA', 'ServantLocator', 'ServantLocatorHelper', 'ServantLocatorOperations', 'ServantLocatorPOA', 'ServantManager', 'ServantManagerOperations', 'ServantRetentionPolicy', + 'ServantRetentionPolicyOperations', 'ServantRetentionPolicyValue', 'THREAD_POLICY_ID', 'ThreadPolicy', 'ThreadPolicyOperations', 'ThreadPolicyValue', '_ServantActivatorStub', '_ServantLocatorStub' + ), + 153 => array ( + 'NoContext', 'NoContextHelper' + ), + 154 => array ( + 'AdapterInactive', 'AdapterInactiveHelper', 'State' + ), + 155 => array ( + 'AdapterAlreadyExists', 'AdapterAlreadyExistsHelper', 'AdapterNonExistent', 'AdapterNonExistentHelper', 'InvalidPolicy', 'InvalidPolicyHelper', 'NoServant', 'NoServantHelper', 'ObjectAlreadyActive', 'ObjectAlreadyActiveHelper', 'ObjectNotActive', 'ObjectNotActiveHelper', 'ServantAlreadyActive', 'ServantAlreadyActiveHelper', 'ServantNotActive', 'ServantNotActiveHelper', 'WrongAdapter', 'WrongAdapterHelper', 'WrongPolicy', 'WrongPolicyHelper' + ), + 156 => array ( + 'CookieHolder' + ), + 157 => array ( + 'RunTime', 'RunTimeOperations' + ), + 158 => array ( + '_Remote_Stub' + ), + 159 => array ( + 'Attr', 'CDATASection', 'CharacterData', 'Comment', 'DOMConfiguration', 'DOMError', 'DOMErrorHandler', 'DOMException', 'DOMImplementation', 'DOMImplementationList', 'DOMImplementationSource', 'DOMStringList', 'DocumentFragment', 'DocumentType', 'EntityReference', 'NameList', 'NamedNodeMap', 'Node', 'NodeList', 'Notation', 'ProcessingInstruction', 'Text', 'TypeInfo', 'UserDataHandler' + ), + 160 => array ( + 'DOMImplementationRegistry' + ), + 161 => array ( + 'EventException', 'EventTarget', 'MutationEvent', 'UIEvent' + ), + 162 => array ( + 'DOMImplementationLS', 'LSException', 'LSInput', 'LSLoadEvent', 'LSOutput', 'LSParser', 'LSParserFilter', 'LSProgressEvent', 'LSResourceResolver', 'LSSerializer', 'LSSerializerFilter' + ), + 163 => array ( + 'DTDHandler', 'DocumentHandler', 'EntityResolver', 'ErrorHandler', 'HandlerBase', 'InputSource', 'Locator', 'SAXException', 'SAXNotRecognizedException', 'SAXNotSupportedException', 'SAXParseException', 'XMLFilter', 'XMLReader' + ), + 164 => array ( + 'Attributes2', 'Attributes2Impl', 'DeclHandler', 'DefaultHandler2', 'EntityResolver2', 'LexicalHandler', 'Locator2', 'Locator2Impl' + ), + 165 => array ( + 'AttributeListImpl', 'AttributesImpl', 'DefaultHandler', 'LocatorImpl', 'NamespaceSupport', 'ParserAdapter', 'ParserFactory', 'XMLFilterImpl', 'XMLReaderAdapter', 'XMLReaderFactory' + ), + /* ambiguous class names (appear in more than one package) */ + 166 => array ( + 'Annotation', 'AnySeqHelper', 'Array', 'Attribute', 'AttributeList', 'AttributeSet', 'Attributes', 'AuthenticationException', 'Binding', 'Bounds', 'Certificate', 'CertificateEncodingException', 'CertificateException', 'CertificateExpiredException', 'CertificateNotYetValidException', 'CertificateParsingException', 'ConnectException', 'ContentHandler', 'Context', 'Control', 'Current', 'CurrentHelper', 'CurrentOperations', 'DOMLocator', 'DataInputStream', 'DataOutputStream', 'Date', 'DefaultLoaderRepository', 'Delegate', 'Document', 'DocumentEvent', 'DynAny', 'DynArray', 'DynEnum', 'DynFixed', 'DynSequence', 'DynStruct', 'DynUnion', 'DynValue', 'DynamicImplementation', 'Element', 'Entity', 'Event', 'EventListener', 'FieldNameHelper', 'FileFilter', 'Formatter', 'ForwardRequest', 'ForwardRequestHelper', 'InconsistentTypeCode', 'InputStream', 'IntrospectionException', 'InvalidAttributeValueException', 'InvalidKeyException', 'InvalidName', 'InvalidNameHelper', 'InvalidValue', 'List', 'MouseEvent', + 'NameValuePair', 'NameValuePairHelper', 'ORB', 'Object', 'ObjectIdHelper', 'ObjectImpl', 'OpenType', 'OutputStream', 'ParagraphView', 'Parser', 'Permission', 'Policy', 'Principal', 'Proxy', 'Reference', 'Statement', 'Timer', 'Timestamp', 'TypeMismatch', 'TypeMismatchHelper', 'UNKNOWN', 'UnknownHostException', 'X509Certificate' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + /* all Java keywords are case sensitive */ + 1 => true, 2 => true, 3 => true, 4 => true, + 5 => true, 6 => true, 7 => true, 8 => true, 9 => true, + 10 => true, 11 => true, 12 => true, 13 => true, 14 => true, + 15 => true, 16 => true, 17 => true, 18 => true, 19 => true, + 20 => true, 21 => true, 22 => true, 23 => true, 24 => true, + 25 => true, 26 => true, 27 => true, 28 => true, 29 => true, + 30 => true, 31 => true, 32 => true, 33 => true, 34 => true, + 35 => true, 36 => true, 37 => true, 38 => true, 39 => true, + 40 => true, 41 => true, 42 => true, 43 => true, 44 => true, + 45 => true, 46 => true, 47 => true, 48 => true, 49 => true, + 50 => true, 51 => true, 52 => true, 53 => true, 54 => true, + 55 => true, 56 => true, 57 => true, 58 => true, 59 => true, + 60 => true, 61 => true, 62 => true, 63 => true, 64 => true, + 65 => true, 66 => true, 67 => true, 68 => true, 69 => true, + 70 => true, 71 => true, 72 => true, 73 => true, 74 => true, + 75 => true, 76 => true, 77 => true, 78 => true, 79 => true, + 80 => true, 81 => true, 82 => true, 83 => true, 84 => true, + 85 => true, 86 => true, 87 => true, 88 => true, 89 => true, + 90 => true, 91 => true, 92 => true, 93 => true, 94 => true, + 95 => true, 96 => true, 97 => true, 98 => true, 99 => true, + 100 => true, 101 => true, 102 => true, 103 => true, 104 => true, + 105 => true, 106 => true, 107 => true, 108 => true, 109 => true, + 110 => true, 111 => true, 112 => true, 113 => true, 114 => true, + 115 => true, 116 => true, 117 => true, 118 => true, 119 => true, + 120 => true, 121 => true, 122 => true, 123 => true, 124 => true, + 125 => true, 126 => true, 127 => true, 128 => true, 129 => true, + 130 => true, 131 => true, 132 => true, 133 => true, 134 => true, + 135 => true, 136 => true, 137 => true, 138 => true, 139 => true, + 140 => true, 141 => true, 142 => true, 143 => true, 144 => true, + 145 => true, 146 => true, 147 => true, 148 => true, 149 => true, + 150 => true, 151 => true, 152 => true, 153 => true, 154 => true, + 155 => true, 156 => true, 157 => true, 158 => true, 159 => true, + 160 => true, 161 => true, 162 => true, 163 => true, 164 => true, + 165 => true, 166 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #006600; font-weight: bold;', + 4 => 'color: #006600; font-weight: bold;', + 5 => 'color: #003399; font-weight: bold;', + 6 => 'color: #003399; font-weight: bold;', + 7 => 'color: #003399; font-weight: bold;', + 8 => 'color: #003399; font-weight: bold;', + 9 => 'color: #003399; font-weight: bold;', + 10 => 'color: #003399; font-weight: bold;', + 11 => 'color: #003399; font-weight: bold;', + 12 => 'color: #003399; font-weight: bold;', + 13 => 'color: #003399; font-weight: bold;', + 14 => 'color: #003399; font-weight: bold;', + 15 => 'color: #003399; font-weight: bold;', + 16 => 'color: #003399; font-weight: bold;', + 17 => 'color: #003399; font-weight: bold;', + 18 => 'color: #003399; font-weight: bold;', + 19 => 'color: #003399; font-weight: bold;', + 20 => 'color: #003399; font-weight: bold;', + 21 => 'color: #003399; font-weight: bold;', + 22 => 'color: #003399; font-weight: bold;', + 23 => 'color: #003399; font-weight: bold;', + 24 => 'color: #003399; font-weight: bold;', + 25 => 'color: #003399; font-weight: bold;', + 26 => 'color: #003399; font-weight: bold;', + 27 => 'color: #003399; font-weight: bold;', + 28 => 'color: #003399; font-weight: bold;', + 29 => 'color: #003399; font-weight: bold;', + 30 => 'color: #003399; font-weight: bold;', + 31 => 'color: #003399; font-weight: bold;', + 32 => 'color: #003399; font-weight: bold;', + 33 => 'color: #003399; font-weight: bold;', + 34 => 'color: #003399; font-weight: bold;', + 35 => 'color: #003399; font-weight: bold;', + 36 => 'color: #003399; font-weight: bold;', + 37 => 'color: #003399; font-weight: bold;', + 38 => 'color: #003399; font-weight: bold;', + 39 => 'color: #003399; font-weight: bold;', + 40 => 'color: #003399; font-weight: bold;', + 41 => 'color: #003399; font-weight: bold;', + 42 => 'color: #003399; font-weight: bold;', + 43 => 'color: #003399; font-weight: bold;', + 44 => 'color: #003399; font-weight: bold;', + 45 => 'color: #003399; font-weight: bold;', + 46 => 'color: #003399; font-weight: bold;', + 47 => 'color: #003399; font-weight: bold;', + 48 => 'color: #003399; font-weight: bold;', + 49 => 'color: #003399; font-weight: bold;', + 50 => 'color: #003399; font-weight: bold;', + 51 => 'color: #003399; font-weight: bold;', + 52 => 'color: #003399; font-weight: bold;', + 53 => 'color: #003399; font-weight: bold;', + 54 => 'color: #003399; font-weight: bold;', + 55 => 'color: #003399; font-weight: bold;', + 56 => 'color: #003399; font-weight: bold;', + 57 => 'color: #003399; font-weight: bold;', + 58 => 'color: #003399; font-weight: bold;', + 59 => 'color: #003399; font-weight: bold;', + 60 => 'color: #003399; font-weight: bold;', + 61 => 'color: #003399; font-weight: bold;', + 62 => 'color: #003399; font-weight: bold;', + 63 => 'color: #003399; font-weight: bold;', + 64 => 'color: #003399; font-weight: bold;', + 65 => 'color: #003399; font-weight: bold;', + 66 => 'color: #003399; font-weight: bold;', + 67 => 'color: #003399; font-weight: bold;', + 68 => 'color: #003399; font-weight: bold;', + 69 => 'color: #003399; font-weight: bold;', + 70 => 'color: #003399; font-weight: bold;', + 71 => 'color: #003399; font-weight: bold;', + 72 => 'color: #003399; font-weight: bold;', + 73 => 'color: #003399; font-weight: bold;', + 74 => 'color: #003399; font-weight: bold;', + 75 => 'color: #003399; font-weight: bold;', + 76 => 'color: #003399; font-weight: bold;', + 77 => 'color: #003399; font-weight: bold;', + 78 => 'color: #003399; font-weight: bold;', + 79 => 'color: #003399; font-weight: bold;', + 80 => 'color: #003399; font-weight: bold;', + 81 => 'color: #003399; font-weight: bold;', + 82 => 'color: #003399; font-weight: bold;', + 83 => 'color: #003399; font-weight: bold;', + 84 => 'color: #003399; font-weight: bold;', + 85 => 'color: #003399; font-weight: bold;', + 86 => 'color: #003399; font-weight: bold;', + 87 => 'color: #003399; font-weight: bold;', + 88 => 'color: #003399; font-weight: bold;', + 89 => 'color: #003399; font-weight: bold;', + 90 => 'color: #003399; font-weight: bold;', + 91 => 'color: #003399; font-weight: bold;', + 92 => 'color: #003399; font-weight: bold;', + 93 => 'color: #003399; font-weight: bold;', + 94 => 'color: #003399; font-weight: bold;', + 95 => 'color: #003399; font-weight: bold;', + 96 => 'color: #003399; font-weight: bold;', + 97 => 'color: #003399; font-weight: bold;', + 98 => 'color: #003399; font-weight: bold;', + 99 => 'color: #003399; font-weight: bold;', + 100 => 'color: #003399; font-weight: bold;', + 101 => 'color: #003399; font-weight: bold;', + 102 => 'color: #003399; font-weight: bold;', + 103 => 'color: #003399; font-weight: bold;', + 104 => 'color: #003399; font-weight: bold;', + 105 => 'color: #003399; font-weight: bold;', + 106 => 'color: #003399; font-weight: bold;', + 107 => 'color: #003399; font-weight: bold;', + 108 => 'color: #003399; font-weight: bold;', + 109 => 'color: #003399; font-weight: bold;', + 110 => 'color: #003399; font-weight: bold;', + 111 => 'color: #003399; font-weight: bold;', + 112 => 'color: #003399; font-weight: bold;', + 113 => 'color: #003399; font-weight: bold;', + 114 => 'color: #003399; font-weight: bold;', + 115 => 'color: #003399; font-weight: bold;', + 116 => 'color: #003399; font-weight: bold;', + 117 => 'color: #003399; font-weight: bold;', + 118 => 'color: #003399; font-weight: bold;', + 119 => 'color: #003399; font-weight: bold;', + 120 => 'color: #003399; font-weight: bold;', + 121 => 'color: #003399; font-weight: bold;', + 122 => 'color: #003399; font-weight: bold;', + 123 => 'color: #003399; font-weight: bold;', + 124 => 'color: #003399; font-weight: bold;', + 125 => 'color: #003399; font-weight: bold;', + 126 => 'color: #003399; font-weight: bold;', + 127 => 'color: #003399; font-weight: bold;', + 128 => 'color: #003399; font-weight: bold;', + 129 => 'color: #003399; font-weight: bold;', + 130 => 'color: #003399; font-weight: bold;', + 131 => 'color: #003399; font-weight: bold;', + 132 => 'color: #003399; font-weight: bold;', + 133 => 'color: #003399; font-weight: bold;', + 134 => 'color: #003399; font-weight: bold;', + 135 => 'color: #003399; font-weight: bold;', + 136 => 'color: #003399; font-weight: bold;', + 137 => 'color: #003399; font-weight: bold;', + 138 => 'color: #003399; font-weight: bold;', + 139 => 'color: #003399; font-weight: bold;', + 140 => 'color: #003399; font-weight: bold;', + 141 => 'color: #003399; font-weight: bold;', + 142 => 'color: #003399; font-weight: bold;', + 143 => 'color: #003399; font-weight: bold;', + 144 => 'color: #003399; font-weight: bold;', + 145 => 'color: #003399; font-weight: bold;', + 146 => 'color: #003399; font-weight: bold;', + 147 => 'color: #003399; font-weight: bold;', + 148 => 'color: #003399; font-weight: bold;', + 149 => 'color: #003399; font-weight: bold;', + 150 => 'color: #003399; font-weight: bold;', + 151 => 'color: #003399; font-weight: bold;', + 152 => 'color: #003399; font-weight: bold;', + 153 => 'color: #003399; font-weight: bold;', + 154 => 'color: #003399; font-weight: bold;', + 155 => 'color: #003399; font-weight: bold;', + 156 => 'color: #003399; font-weight: bold;', + 157 => 'color: #003399; font-weight: bold;', + 158 => 'color: #003399; font-weight: bold;', + 159 => 'color: #003399; font-weight: bold;', + 160 => 'color: #003399; font-weight: bold;', + 161 => 'color: #003399; font-weight: bold;', + 162 => 'color: #003399; font-weight: bold;', + 163 => 'color: #003399; font-weight: bold;', + 164 => 'color: #003399; font-weight: bold;', + 165 => 'color: #003399; font-weight: bold;', + 166 => 'color: #003399; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #006699;', + 3 => 'color: #008000; font-style: italic; font-weight: bold;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006633;', + 2 => 'color: #006633;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/applet/{FNAME}.html', + 6 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/{FNAME}.html', + 7 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/color/{FNAME}.html', + 8 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/datatransfer/{FNAME}.html', + 9 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/dnd/{FNAME}.html', + 10 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/event/{FNAME}.html', + 11 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/font/{FNAME}.html', + 12 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/geom/{FNAME}.html', + 13 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/im/{FNAME}.html', + 14 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/im/spi/{FNAME}.html', + 15 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/image/{FNAME}.html', + 16 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/image/renderable/{FNAME}.html', + 17 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/print/{FNAME}.html', + 18 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/beans/{FNAME}.html', + 19 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/beans/beancontext/{FNAME}.html', + 20 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/io/{FNAME}.html', + 21 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/{FNAME}.html', + 22 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/annotation/{FNAME}.html', + 23 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/instrument/{FNAME}.html', + 24 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/management/{FNAME}.html', + 25 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/ref/{FNAME}.html', + 26 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/reflect/{FNAME}.html', + 27 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/math/{FNAME}.html', + 28 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/net/{FNAME}.html', + 29 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/nio/{FNAME}.html', + 30 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/nio/channels/{FNAME}.html', + 31 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/nio/channels/spi/{FNAME}.html', + 32 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/nio/charset/{FNAME}.html', + 33 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/nio/charset/spi/{FNAME}.html', + 34 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/rmi/{FNAME}.html', + 35 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/rmi/activation/{FNAME}.html', + 36 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/rmi/dgc/{FNAME}.html', + 37 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/rmi/registry/{FNAME}.html', + 38 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/rmi/server/{FNAME}.html', + 39 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/security/{FNAME}.html', + 40 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/security/acl/{FNAME}.html', + 41 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/security/cert/{FNAME}.html', + 42 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/security/interfaces/{FNAME}.html', + 43 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/security/spec/{FNAME}.html', + 44 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/sql/{FNAME}.html', + 45 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/text/{FNAME}.html', + 46 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/{FNAME}.html', + 47 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/concurrent/{FNAME}.html', + 48 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/concurrent/atomic/{FNAME}.html', + 49 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/concurrent/locks/{FNAME}.html', + 50 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/jar/{FNAME}.html', + 51 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/logging/{FNAME}.html', + 52 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/prefs/{FNAME}.html', + 53 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/regex/{FNAME}.html', + 54 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/zip/{FNAME}.html', + 55 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/accessibility/{FNAME}.html', + 56 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/activity/{FNAME}.html', + 57 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/crypto/{FNAME}.html', + 58 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/crypto/interfaces/{FNAME}.html', + 59 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/crypto/spec/{FNAME}.html', + 60 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/imageio/{FNAME}.html', + 61 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/imageio/event/{FNAME}.html', + 62 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/imageio/metadata/{FNAME}.html', + 63 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/imageio/plugins/bmp/{FNAME}.html', + 64 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/imageio/plugins/jpeg/{FNAME}.html', + 65 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/imageio/spi/{FNAME}.html', + 66 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/imageio/stream/{FNAME}.html', + 67 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/{FNAME}.html', + 68 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/loading/{FNAME}.html', + 69 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/modelmbean/{FNAME}.html', + 70 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/monitor/{FNAME}.html', + 71 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/openmbean/{FNAME}.html', + 72 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/relation/{FNAME}.html', + 73 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/remote/{FNAME}.html', + 74 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/remote/rmi/{FNAME}.html', + 75 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/timer/{FNAME}.html', + 76 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/naming/{FNAME}.html', + 77 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/naming/directory/{FNAME}.html', + 78 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/naming/event/{FNAME}.html', + 79 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/naming/ldap/{FNAME}.html', + 80 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/naming/spi/{FNAME}.html', + 81 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/net/{FNAME}.html', + 82 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/net/ssl/{FNAME}.html', + 83 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/print/{FNAME}.html', + 84 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/print/attribute/{FNAME}.html', + 85 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/print/attribute/standard/{FNAME}.html', + 86 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/print/event/{FNAME}.html', + 87 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/rmi/{FNAME}.html', + 88 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/rmi/CORBA/{FNAME}.html', + 89 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/rmi/ssl/{FNAME}.html', + 90 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/security/auth/{FNAME}.html', + 91 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/security/auth/callback/{FNAME}.html', + 92 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/security/auth/kerberos/{FNAME}.html', + 93 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/security/auth/login/{FNAME}.html', + 94 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/security/auth/spi/{FNAME}.html', + 95 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/security/auth/x500/{FNAME}.html', + 96 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/security/sasl/{FNAME}.html', + 97 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/sound/midi/{FNAME}.html', + 98 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/sound/midi/spi/{FNAME}.html', + 99 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/sound/sampled/{FNAME}.html', + 100 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/sound/sampled/spi/{FNAME}.html', + 101 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/sql/{FNAME}.html', + 102 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/sql/rowset/{FNAME}.html', + 103 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/sql/rowset/serial/{FNAME}.html', + 104 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/sql/rowset/spi/{FNAME}.html', + 105 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/{FNAME}.html', + 106 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/border/{FNAME}.html', + 107 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/colorchooser/{FNAME}.html', + 108 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/event/{FNAME}.html', + 109 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/filechooser/{FNAME}.html', + 110 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/plaf/{FNAME}.html', + 111 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/plaf/basic/{FNAME}.html', + 112 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/plaf/metal/{FNAME}.html', + 113 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/plaf/multi/{FNAME}.html', + 114 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/plaf/synth/{FNAME}.html', + 115 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/table/{FNAME}.html', + 116 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/text/{FNAME}.html', + 117 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/text/html/{FNAME}.html', + 118 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/text/html/parser/{FNAME}.html', + 119 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/text/rtf/{FNAME}.html', + 120 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/tree/{FNAME}.html', + 121 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/undo/{FNAME}.html', + 122 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/transaction/{FNAME}.html', + 123 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/transaction/xa/{FNAME}.html', + 124 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/{FNAME}.html', + 125 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/datatype/{FNAME}.html', + 126 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/namespace/{FNAME}.html', + 127 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/parsers/{FNAME}.html', + 128 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/transform/{FNAME}.html', + 129 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/transform/dom/{FNAME}.html', + 130 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/transform/sax/{FNAME}.html', + 131 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/transform/stream/{FNAME}.html', + 132 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/validation/{FNAME}.html', + 133 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/xpath/{FNAME}.html', + 134 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/ietf/jgss/{FNAME}.html', + 135 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/CORBA/{FNAME}.html', + 136 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/CORBA/DynAnyPackage/{FNAME}.html', + 137 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/CORBA/TypeCodePackage/{FNAME}.html', + 138 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/CORBA/portable/{FNAME}.html', + 139 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/CosNaming/{FNAME}.html', + 140 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/CosNaming/NamingContextExtPackage/{FNAME}.html', + 141 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/CosNaming/NamingContextPackage/{FNAME}.html', + 142 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/Dynamic/{FNAME}.html', + 143 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/DynamicAny/{FNAME}.html', + 144 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/DynamicAny/DynAnyFactoryPackage/{FNAME}.html', + 145 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/DynamicAny/DynAnyPackage/{FNAME}.html', + 146 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/IOP/{FNAME}.html', + 147 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/IOP/CodecFactoryPackage/{FNAME}.html', + 148 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/IOP/CodecPackage/{FNAME}.html', + 149 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/Messaging/{FNAME}.html', + 150 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/PortableInterceptor/{FNAME}.html', + 151 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/PortableInterceptor/ORBInitInfoPackage/{FNAME}.html', + 152 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/PortableServer/{FNAME}.html', + 153 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/PortableServer/CurrentPackage/{FNAME}.html', + 154 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/PortableServer/POAManagerPackage/{FNAME}.html', + 155 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/PortableServer/POAPackage/{FNAME}.html', + 156 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/PortableServer/ServantLocatorPackage/{FNAME}.html', + 157 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/SendingContext/{FNAME}.html', + 158 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/stub/java/rmi/{FNAME}.html', + 159 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/w3c/dom/{FNAME}.html', + 160 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/w3c/dom/bootstrap/{FNAME}.html', + 161 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/w3c/dom/events/{FNAME}.html', + 162 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/w3c/dom/ls/{FNAME}.html', + 163 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/xml/sax/{FNAME}.html', + 164 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/xml/sax/ext/{FNAME}.html', + 165 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/xml/sax/helpers/{FNAME}.html', + /* ambiguous class names (appear in more than one package) */ + 166 => 'http://www.google.com/search?sitesearch=java.sun.com&q=allinurl%3Aj2se%2F1+5+0%2Fdocs%2Fapi+{FNAME}' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + /* Java does not use '::' */ + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => '(?|^&"\'])', + 'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-;"\'])' + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/javascript.php b/_piecrust/libs/Geshi/geshi/javascript.php new file mode 100644 index 0000000..f250e50 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/javascript.php @@ -0,0 +1,150 @@ + 'Javascript', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + //Regular Expressions + 'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do', + 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item', + 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void', + 'while', 'write', 'with' + ), + 2 => array( + 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false', + 'function', 'import', 'namespace', 'new', 'null', 'package', 'private', + 'protected', 'public', 'super', 'true', 'use', 'var' + ), + 3 => array( + // common functions for Window object + 'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home', + 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove', + 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status', + 'stop', + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', + '+', '-', '*', '/', '%', + '!', '@', '&', '|', '^', + '<', '>', '=', + ',', ';', '?', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000066; font-weight: bold;', + 2 => 'color: #003366; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #006600; font-style: italic;', + 2 => 'color: #009966; font-style: italic;', + 'MULTI' => 'color: #006600; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #3366CC;' + ), + 'NUMBERS' => array( + 0 => 'color: #CC0000;' + ), + 'METHODS' => array( + 1 => 'color: #660066;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '' + ), + 1 => array( + '' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/jquery.php b/_piecrust/libs/Geshi/geshi/jquery.php new file mode 100644 index 0000000..bd7cd5c --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/jquery.php @@ -0,0 +1,238 @@ + 'jQuery', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + //Regular Expressions + 'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do', + 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item', + 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void', + 'while', 'write', 'with' + ), + 2 => array( + 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false', + 'function', 'import', 'namespace', 'new', 'null', 'package', 'private', + 'protected', 'public', 'super', 'true', 'use', 'var' + ), + 3 => array( + // common functions for Window object + 'alert', 'back', 'close', 'confirm', 'forward', 'home', + 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove', + 'onresize', 'onunload', 'open', 'print', 'prompt', 'status', + //'blur', 'focus', 'scroll', // Duplicate with kw9 + //'stop', //Duplicate with kw10 + ), + 4 => array( + // jQuery Core Functions + 'jQuery', 'each', 'size', 'length', 'selector', 'context', 'eq', + 'index', 'data', 'removeData', 'queue', 'dequeue', 'noConflict' + //'get', //Duplicate with kw11 + ), + 5 => array( + // jQuery Attribute Functions + 'attr', 'removeAttr', 'addClass', 'hasClass', 'removeClass', 'toggleClass', + 'html', 'text', 'val', + ), + 6 => array( + // jQuery Traversing Functions + 'filter', 'not', 'slice', 'add', 'children', 'closest', + 'contents', 'find', 'next', 'nextAll', 'parent', 'parents', + 'prev', 'prevAll', 'siblings', 'andSelf', 'end', + //'is', //Dup with kw1 + //'offsetParent', //Duplicate with kw8 + //'map', //Duplicate with kw12 + ), + 7 => array( + // jQuery Manipulation Functions + 'append', 'appendTo', 'prepend', 'prependTo', 'after', 'before', 'insertAfter', + 'insertBefore', 'wrap', 'wrapAll', 'wrapInner', 'replaceWith', 'replaceAll', + 'empty', 'remove', 'clone', + ), + 8 => array( + // jQuery CSS Functions + 'css', 'offset', 'offsetParent', 'position', 'scrollTop', 'scrollLeft', + 'height', 'width', 'innerHeight', 'innerWidth', 'outerHeight', 'outerWidth', + ), + 9 => array( + // jQuery Events Functions + 'ready', 'bind', 'one', 'trigger', 'triggerHandler', 'unbind', 'live', + 'die', 'hover', 'blur', 'change', 'click', 'dblclick', 'error', + 'focus', 'keydown', 'keypress', 'keyup', 'mousedown', 'mouseenter', + 'mouseleave', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'resize', + 'scroll', 'select', 'submit', 'unload', + //'toggle', //Duplicate with kw10 + //'load', //Duplicate with kw11 + ), + 10 => array( + // jQuery Effects Functions + 'show', 'hide', 'toggle', 'slideDown', 'slideUp', 'slideToggle', 'fadeIn', + 'fadeOut', 'fadeTo', 'animate', 'stop', + ), + 11 => array( + // jQuery Ajax Functions + 'ajax', 'load', 'get', 'getJSON', 'getScript', 'post', 'ajaxComplete', + 'ajaxError', 'ajaxSend', 'ajaxStart', 'ajaxStop', 'ajaxSuccess', 'ajaxSetup', + 'serialize', 'serializeArray', + ), + 12 => array( + // jQuery Utility Functions + 'support', 'browser', 'version', 'boxModal', 'extend', 'grep', 'makeArray', + 'map', 'inArray', 'merge', 'unique', 'isArray', 'isFunction', 'trim', + 'param', + ), + ), + 'SYMBOLS' => array( + 0 => array( + '(', ')', '[', ']', '{', '}', + '+', '-', '*', '/', '%', + '!', '@', '&', '|', '^', + '<', '>', '=', + ',', ';', '?', ':' + ), + 1 => array( + '$' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false, + 9 => false, + 10 => false, + 11 => false, + 12 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000066; font-weight: bold;', + 2 => 'color: #003366; font-weight: bold;', + 3 => 'color: #000066;', + 4 => 'color: #000066;', + 5 => 'color: #000066;', + 6 => 'color: #000066;', + 7 => 'color: #000066;', + 8 => 'color: #000066;', + 9 => 'color: #000066;', + 10 => 'color: #000066;', + 11 => 'color: #000066;', + 12 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #006600; font-style: italic;', + 2 => 'color: #009966; font-style: italic;', + 'MULTI' => 'color: #006600; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #3366CC;' + ), + 'NUMBERS' => array( + 0 => 'color: #CC0000;' + ), + 'METHODS' => array( + 1 => 'color: #660066;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;', + 1 => 'color: #000066;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => 'http://docs.jquery.com/Core/{FNAME}', + 5 => 'http://docs.jquery.com/Attributes/{FNAME}', + 6 => 'http://docs.jquery.com/Traversing/{FNAME}', + 7 => 'http://docs.jquery.com/Manipulation/{FNAME}', + 8 => 'http://docs.jquery.com/CSS/{FNAME}', + 9 => 'http://docs.jquery.com/Events/{FNAME}', + 10 => 'http://docs.jquery.com/Effects/{FNAME}', + 11 => 'http://docs.jquery.com/Ajax/{FNAME}', + 12 => 'http://docs.jquery.com/Utilities/{FNAME}' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '' + ), + 1 => array( + '' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/kixtart.php b/_piecrust/libs/Geshi/geshi/kixtart.php new file mode 100644 index 0000000..e2d7174 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/kixtart.php @@ -0,0 +1,329 @@ + 'KiXtart', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'While', 'Loop', + 'Use', + 'Small', + 'Sleep', + 'Shell', + 'SetTime', + 'SetM', + 'SetL', + 'Set', + 'Select', 'Case', + 'Run', + 'Return', + 'Redim', + 'RD', + 'Quit', + 'Play', + 'Move', + 'MD', + 'Include', + 'If', 'Else', 'Endif', + 'GoTo', + 'GoSub', + 'Go', + 'Global', + 'GetS', + 'Get', + 'Function', 'Endfunction', + 'For', 'Next', + 'Each', + 'FlushKb', + 'Exit', + 'Do', 'Until', + 'Display', + 'Dim', + 'Del', + 'Debug', + 'Copy', + 'Cookie1', + 'Color', + 'CLS', + 'CD', + 'Call', + 'Break', + 'Big', + 'Beep', + ), + 2 => array( + '@Address', + '@Build', + '@Color', + '@Comment', + '@CPU', + '@CRLF', + '@CSD', + '@CurDir', + '@Date', + '@Day', + '@Domain', + '@DOS', + '@Error', + '@FullName', + '@HomeDir', + '@HomeDrive', + '@HomeShr', + '@HostName', + '@InWin', + '@IPaddressX', + '@KiX', + '@LanRoot', + '@LDomain', + '@LDrive', + '@LM', + '@LogonMode', + '@LongHomeDir', + '@LServer', + '@MaxPWAge', + '@MDayNo', + '@MHz', + '@MonthNo', + '@Month', + '@MSecs', + '@OnWoW64', + '@PID', + '@PrimaryGroup', + '@Priv', + '@ProductSuite', + '@ProductType', + '@PWAge', + '@RAS', + '@Result', + '@RServer', + '@ScriptDir', + '@ScriptExe', + '@ScriptName', + '@SError', + '@SID', + '@Site', + '@StartDir', + '@SysLang', + '@Ticks', + '@Time', + '@TsSession', + '@UserID', + '@UserLang', + '@WDayNo', + '@Wksta', + '@WUserID', + '@YDayNo', + '@Year', + ), + 3 => array( + 'WriteValue', + 'WriteProfileString', + 'WriteLine', + 'VarTypeName', + 'VarType', + 'Val', + 'UnloadHive', + 'UCase', + 'Ubound', + 'Trim', + 'Substr', + 'SRnd', + 'Split', + 'SidToName', + 'ShutDown', + 'ShowProgramGroup', + 'SetWallpaper', + 'SetTitle', + 'SetSystemState', + 'SetOption', + 'SetFocus', + 'SetFileAttr', + 'SetDefaultPrinter', + 'SetConsole', + 'SetAscii', + 'SendMessage', + 'SendKeys', + 'SaveKey', + 'RTrim', + 'Round', + 'Rnd', + 'Right', + 'RedirectOutput', + 'ReadValue', + 'ReadType', + 'ReadProfileString', + 'ReadLine', + 'Open', + 'MessageBox', + 'MemorySize', + 'LTrim', + 'Logoff', + 'LogEvent', + 'LoadKey', + 'LoadHive', + 'Len', + 'Left', + 'LCase', + 'KeyExist', + 'KbHit', + 'Join', + 'IsDeclared', + 'Int', + 'InStrRev', + 'InStr', + 'InGroup', + 'IIF', + 'GetObject', + 'GetFileVersion', + 'GetFileTime', + 'GetFileSize', + 'GetFileAttr', + 'GetDiskSpace', + 'FreeFileHandle', + 'FormatNumber', + 'Fix', + 'ExpandEnvironmentVars', + 'Exist', + 'Execute', + 'EnumValue', + 'EnumLocalGroup', + 'EnumKey', + 'EnumIpInfo', + 'EnumGroup', + 'Dir', + 'DelValue', + 'DelTree', + 'DelProgramItem', + 'DelProgramGroup', + 'DelPrinterConnection', + 'DelKey', + 'DecToHex', + 'CStr', + 'CreateObject', + 'CompareFileTimes', + 'Close', + 'ClearEventLog', + 'CInt', + 'Chr', + 'CDbl', + 'Box', + 'BackupEventLog', + 'At', + 'AScan', + 'Asc', + 'AddProgramItem', + 'AddProgramGroup', + 'AddPrinterConnection', + 'AddKey', + 'Abs' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '?', ':', '+', '-', '*', '/', '&', '|', '^', '~', '<', '>', '=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => 'http://www.kixtart.org/manual/Commands/{FNAMEL}.htm', + 2 => '', + 3 => 'http://www.kixtart.org/manual/Functions/{FNAMEL}.htm' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/klonec.php b/_piecrust/libs/Geshi/geshi/klonec.php new file mode 100644 index 0000000..9a33499 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/klonec.php @@ -0,0 +1,282 @@ + 'KLone C', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),//#pour precede les include de C + 'COMMENT_MULTI' => array('/*' => '*/', '' ),//comentaires C et KLone suivi de ceux pour HTML + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array(//mots-cles C + 'if', 'return', 'while', 'case', 'class', 'continue', 'default', + 'do', 'else', 'for', 'switch', 'goto', + 'null', 'break', 'true', 'enum', 'extern', 'inline', 'false' + ), + 2 => array(//mots-cles KLone + 'out', 'request', 'response', + ), + 3 => array(//fonctions C usuelles + 'printf', 'malloc', 'fopen', 'fclose', 'free', 'fputs', 'fgets', 'feof', 'fwrite', + 'perror', 'ferror', 'qsort', 'stats', 'sscanf', 'scanf', + 'strdup', 'strcpy', 'strcmp', 'strncpy', 'strcasecmp', 'cat', 'strcat', 'strstr', + 'strlen', 'strtof', 'strtod', 'strtok', 'towlower', 'towupper', + 'cd', 'system', 'exit', 'exec', 'fork', 'vfork', 'kill', 'signal', 'syslog', + 'usleep', 'utime', 'wait', 'waitpid', 'waitid', + 'ceil', 'eval', 'round', 'floor', + 'atoi', 'atol', 'abs', 'cos', 'sin', 'tan', 'acos', 'asin', 'atan', 'exp', + 'time', 'ctime', 'localtime', 'asctime', 'gmtime', 'difftime', 'date' + ), + 4 => array(//fonctions KLone usuelles + 'request_get_cookies', 'request_get_cookie', 'request_get_args', 'request_get_arg', + 'request_io', 'request_get_uri', 'request_get_filename', 'request_get_query_string', 'request_get_path_info', + 'request_get_if_modified_since', 'request_get_http', 'request_get_client_request', + 'request_get_content_length', 'request_get_uploads', 'request_get_uploaded_file', + 'request_get_method', 'request_get_protocol', 'request_get_resolved_filename', + 'request_get_resolved_path_info', 'request_get_addr', 'request_get_peer_addr', + 'request_get_header', 'request_get_field', 'request_get_field_value', + 'response_set_content_encoding', 'response_disable_caching', 'response_enable_caching', + 'response_set_cookie', 'response_set_method', 'response_get_method', + 'response_print_header', 'response_set_field', 'response_del_field', + 'response_set_content_type', 'response_set_date', 'response_set_last_modified', + 'response_set_content_length', 'response_get_status', 'response_get_header', + 'response_io', 'response_redirect', 'response_set_status', + 'session_get_vars', 'session_get', 'session_set', 'session_age', 'session_clean', 'session_del', + 'io_type', 'io_pipe', 'io_dup', 'io_copy', 'io_seek', 'io_tell', 'io_close', + 'io_free', 'io_read', 'io_printf', 'io_flush', 'io_write', 'io_putc', 'io_getc', + 'io_get_until', 'io_gets', 'io_codec_add_head', 'io_codec_add_tail', + 'io_codecs_remove', 'io_name_set', 'io_name_get' + ), + 5 => array(//types C + 'auto', 'char', 'const', 'double', 'float', 'int', 'long', + 'register', 'short', 'signed', 'sizeof', 'static', 'string', 'struct', + 'typedef', 'union', 'unsigned', 'void', 'volatile', + 'wchar_t', 'time_t', 'FILE' + ), + 6 => array(//mots-cles HTML + 'a', 'abbr', 'acronym', 'address', 'applet', + + 'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b', + + 'caption', 'center', 'cite', 'code', 'colgroup', 'col', + + 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', + + 'em', + + 'fieldset', 'font', 'form', 'frame', 'frameset', + + 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', + + 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i', + + 'kbd', + + 'label', 'legend', 'link', 'li', + + 'map', 'meta', + + 'noframes', 'noscript', + + 'object', 'ol', 'optgroup', 'option', + + 'param', 'pre', 'p', + + 'q', + + 'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's', + + 'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt', + + 'ul', 'u', + + 'var', + ), + 7 => array(//autres mots-cles HTML + 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', + 'background', 'bgcolor', 'border', + 'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', + 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', + 'enctype', + 'face', 'for', 'frame', 'frameborder', + 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', + 'id', 'ismap', + 'label', 'lang', 'language', 'link', 'longdesc', + 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', + 'name', 'nohref', 'noresize', 'noshade', 'nowrap', + 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload', + 'profile', 'prompt', + 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', + 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', + 'tabindex', 'target', 'text', 'title', 'type', + 'usemap', + 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace', + 'width' + ) + ), + 'SYMBOLS' => array( + 1 => array( + '<%=', '<%!', '<%', '%>' + ), + 0 => array( + '(', ')', '[', ']', '{', '}', + '!', '%', '&', '|', '/', + '<', '>', + '=', '-', '+', '*', + '.', ':', ',', ';', '^' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100; font-weight: bold;',//pour les mots-cles C + 2 => 'color: #000000; font-weight: bold;',//pour les mots-cles KLone + 3 => 'color: #6600FF;',//pour les fonctions C + 4 => 'color: #6600FF;',//pour les fonctions Klone + 5 => 'color: #0099FF; font-weight: bold;',//pour les types C + 6 => 'color: #990099; font-weight: bold;',//pour les mots-cles HTML + 7 => 'color: #000066;'//pour les autres mots-cles HTML + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;',//commentaire sur une ligne C et KLone + 2 => 'color: #339933;',//pour les #... en C + 'MULTI' => 'color: #808080; font-style: italic;'//commentaire sur plusieurs lignes C et KLone + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;', + 1 => 'color: #000000; font-weight: bold;' + ), + 'REGEXPS' => array(), + 'SCRIPT' => array( + 0 => 'background-color:#ffccff; font-weight: bold; color:#000000;', + 1 => '', + 2 => '', + 3 => 'color: #00bbdd; font-weight: bold;', + 4 => 'color: #ddbb00;', + 5 => 'color: #009900;' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html', + 4 => 'http://www.koanlogic.com/klone/api/html/globals.html', + 5 => '', + 6 => 'http://december.com/html/4/element/{FNAMEL}.html', + 7 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, + 'SCRIPT_DELIMITERS' => array( + //delimiteurs pour KLone + 0 => array( + '<%=' => '%>' + ), + 1 => array( + '<%!' => '%>' + ), + 2 => array( + '<%' => '%>' + ), + //delimiteur pour HTML + 3 => array( + ' '>' + ), + 4 => array( + '&' => ';' + ), + 5 => array( + '<' => '>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => false, + 1 => true, + 2 => true, + 3 => false, + 4 => false, + 5 => true + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 6 => array( + 'DISALLOWED_BEFORE' => '(?<=<|<\/)', + 'DISALLOWED_AFTER' => '(?=\s|\/|>)', + ), + 7 => array( + 'DISALLOWED_AFTER' => '(?=\s*=)', + ) + ) + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/klonecpp.php b/_piecrust/libs/Geshi/geshi/klonecpp.php new file mode 100644 index 0000000..9018b78 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/klonecpp.php @@ -0,0 +1,310 @@ + 'KLone C++', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),//#pour precede les include de C + 'COMMENT_MULTI' => array('/*' => '*/', '' ),//comentaires C et KLone suivi de ceux pour HTML + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array(//mots-cles C++ + 'if', 'return', 'while', 'case', 'continue', 'default', + 'do', 'else', 'for', 'switch', 'goto', + 'break', 'true', 'enum', 'extern', 'inline', 'false', + 'errno', 'stdin', 'stdout', 'stderr', + 'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace', + 'try', 'catch', 'dynamic_cast', 'const_cast', 'reinterpret_cast', + 'static_cast', 'explicit', 'friend', 'typename', 'typeid', 'class', + 'EDOM', 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG', + 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG', + 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP', + 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP', + 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN', + 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN', + 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT', + 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR', + 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL', + 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', + 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC' + ), + 2 => array(//mots-cles KLone + 'out', 'request', 'response', + ), + 3 => array(//fonctions C++ usuelles + 'cin', 'cerr', 'clog', 'cout', 'delete', 'new', 'this', + 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert', + 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint', + 'ispunct', 'isspace', 'isupper', 'isxdigit', 'tolower', 'toupper', + 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp', + 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2', + 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', + 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen', + 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf', + 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf', + 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc', + 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind', + 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs', + 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc', + 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv', + 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat', + 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn', + 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy', + 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime', + 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime' + ), + 4 => array(//fonctions KLone usuelles + 'request_get_cookies', 'request_get_cookie', 'request_get_args', 'request_get_arg', + 'request_io', 'request_get_uri', 'request_get_filename', 'request_get_query_string', 'request_get_path_info', + 'request_get_if_modified_since', 'request_get_http', 'request_get_client_request', + 'request_get_content_length', 'request_get_uploads', 'request_get_uploaded_file', + 'request_get_method', 'request_get_protocol', 'request_get_resolved_filename', + 'request_get_resolved_path_info', 'request_get_addr', 'request_get_peer_addr', + 'request_get_header', 'request_get_field', 'request_get_field_value', + 'response_set_content_encoding', 'response_disable_caching', 'response_enable_caching', + 'response_set_cookie', 'response_set_method', 'response_get_method', + 'response_print_header', 'response_set_field', 'response_del_field', + 'response_set_content_type', 'response_set_date', 'response_set_last_modified', + 'response_set_content_length', 'response_get_status', 'response_get_header', + 'response_io', 'response_redirect', 'response_set_status', + 'session_get_vars', 'session_get', 'session_set', 'session_age', 'session_clean', 'session_del', + 'io_type', 'io_pipe', 'io_dup', 'io_copy', 'io_seek', 'io_tell', 'io_close', + 'io_free', 'io_read', 'io_printf', 'io_flush', 'io_write', 'io_putc', 'io_getc', + 'io_get_until', 'io_gets', 'io_codec_add_head', 'io_codec_add_tail', + 'io_codecs_remove', 'io_name_set', 'io_name_get' + ), + 5 => array(//types C++ + 'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint', + 'register', 'short', 'shortint', 'signed', 'static', 'struct', + 'typedef', 'union', 'unsigned', 'void', 'volatile', 'jmp_buf', + 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t', + 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', + 'string', 'wchar_t' + ), + 6 => array(//mots-cles HTML + 'a', 'abbr', 'acronym', 'address', 'applet', + + 'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b', + + 'caption', 'center', 'cite', 'code', 'colgroup', 'col', + + 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', + + 'em', + + 'fieldset', 'font', 'form', 'frame', 'frameset', + + 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', + + 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i', + + 'kbd', + + 'label', 'legend', 'link', 'li', + + 'map', 'meta', + + 'noframes', 'noscript', + + 'object', 'ol', 'optgroup', 'option', + + 'param', 'pre', 'p', + + 'q', + + 'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's', + + 'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt', + + 'ul', 'u', + + 'var', + ), + 7 => array(//autres mots-cles HTML + 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', + 'background', 'bgcolor', 'border', + 'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', + 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', + 'enctype', + 'face', 'for', 'frame', 'frameborder', + 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', + 'id', 'ismap', + 'label', 'lang', 'language', 'link', 'longdesc', + 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', + 'name', 'nohref', 'noresize', 'noshade', 'nowrap', + 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload', + 'profile', 'prompt', + 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', + 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', + 'tabindex', 'target', 'text', 'title', 'type', + 'usemap', + 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace', + 'width' + ) + ), + 'SYMBOLS' => array( + 1 => array( + '<%=', '<%!', '<%', '%>' + ), + 0 => array( + '(', ')', '[', ']', '{', '}', + '!', '%', '&', '|', '/', + '<', '>', + '=', '-', '+', '*', + '.', ':', ',', ';', '^' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100; font-weight: bold;',//pour les mots-cles C++ + 2 => 'color: #000000; font-weight: bold;',//pour les mots-cles KLone + 3 => 'color: #6600FF;',//pour les fonctions C++ + 4 => 'color: #6600FF;',//pour les fonctions Klone + 5 => 'color: #0099FF; font-weight: bold;',//pour les types C++ + 6 => 'color: #990099; font-weight: bold;',//pour les mots-cles HTML + 7 => 'color: #000066;'//pour les autres mots-cles HTML + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;',//commentaire sur une ligne C++ et KLone + 2 => 'color: #339933;',//pour les #... en C++ + 'MULTI' => 'color: #808080; font-style: italic;'//commentaire sur plusieurs lignes C++ et KLone + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;', + 1 => 'color: #000000; font-weight: bold;' + ), + 'REGEXPS' => array(), + 'SCRIPT' => array( + 0 => 'background-color:#ffccff; font-weight: bold; color:#000000;', + 1 => '', + 2 => '', + 3 => 'color: #00bbdd; font-weight: bold;', + 4 => 'color: #ddbb00;', + 5 => 'color: #009900;' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html', + 4 => 'http://www.koanlogic.com/klone/api/html/globals.html', + 5 => '', + 6 => 'http://december.com/html/4/element/{FNAMEL}.html', + 7 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, + 'SCRIPT_DELIMITERS' => array( + //delimiteurs pour KLone + 0 => array( + '<%=' => '%>' + ), + 1 => array( + '<%!' => '%>' + ), + 2 => array( + '<%' => '%>' + ), + //delimiteur pour HTML + 3 => array( + ' '>' + ), + 4 => array( + '&' => ';' + ), + 5 => array( + '<' => '>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => false, + 1 => true, + 2 => true, + 3 => false, + 4 => false, + 5 => true + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 6 => array( + 'DISALLOWED_BEFORE' => '(?<=<|<\/)', + 'DISALLOWED_AFTER' => '(?=\s|\/|>)', + ), + 7 => array( + 'DISALLOWED_AFTER' => '(?=\s*=)', + ) + ) + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/latex.php b/_piecrust/libs/Geshi/geshi/latex.php new file mode 100644 index 0000000..51ca73f --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/latex.php @@ -0,0 +1,223 @@ + 'LaTeX', + 'COMMENT_SINGLE' => array( + 1 => '%' + ), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'addlinespace','and','address','appendix','author','backmatter', + 'bfseries','bibitem','bigskip','blindtext','caption','captionabove', + 'captionbelow','cdot','centering','chapter','cite','color', + 'colorbox','date','dedication','def','definecolor','documentclass', + 'edef','else','email','emph','eqref','extratitle','fbox','fi', + 'flushleft','flushright','footnote','frac','frontmatter', + 'graphicspath','hfill','hline','hspace','huge','ifx','include', + 'includegraphics','infty','input','int','item','itemsep', + 'KOMAoption','KOMAoptions','label','LaTeX','left','let','limits', + 'listfiles','listoffigures','listoftables','lowertitleback', + 'mainmatter','makeatletter','makeatother','makebox','makeindex', + 'maketitle','mbox','mediumskip','newcommand','newenvironment', + 'newpage','nocite','nonumber','pagestyle','par','paragraph', + 'parbox','parident','parskip','partial','publishers','raggedleft', + 'raggedright','raisebox','ref','renewcommand','renewenvironment', + 'right','rule','section','setlength','sffamily','subject', + 'subparagraph','subsection','subsubsection','subtitle','sum', + 'table','tableofcontents','textbf','textcolor','textit', + 'textnormal','textsuperscript','texttt','textwidth','thanks','title', + 'titlehead','today','ttfamily','uppertitleback','urlstyle', + 'usepackage','vspace' + ) + ), + 'SYMBOLS' => array( + "&", "\\", "{", "}", "[", "]" + ), + 'CASE_SENSITIVE' => array( + 1 => true, + GESHI_COMMENTS => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #800000;', + ), + 'COMMENTS' => array( + 1 => 'color: #2C922C; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000000; font-weight: bold;' + ), + 'BRACKETS' => array( + ), + 'STRINGS' => array( + 0 => 'color: #000000;' + ), + 'NUMBERS' => array( + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #E02020; ' + ), + 'REGEXPS' => array( + 1 => 'color: #8020E0; font-weight: normal;', // Math inner + 2 => 'color: #C08020; font-weight: normal;', // [Option] + 3 => 'color: #8020E0; font-weight: normal;', // Maths + 4 => 'color: #800000; font-weight: normal;', // Structure: Labels + 5 => 'color: #00008B; font-weight: bold;', // Structure (\section{->x<-}) + 6 => 'color: #800000; font-weight: normal;', // Structure (\section) + 7 => 'color: #0000D0; font-weight: normal;', // Environment \end or \begin{->x<-} (brighter blue) + 8 => 'color: #C00000; font-weight: normal;', // Structure \end or \begin + 9 => 'color: #2020C0; font-weight: normal;', // {...} + 10 => 'color: #800000; font-weight: normal;', // \%, \& etc. + 11 => 'color: #E00000; font-weight: normal;', // \@keyword + 12 => 'color: #800000; font-weight: normal;', // \keyword + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => 'http://www.golatex.de/wiki/index.php?title=%5C{FNAME}', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + // Math inner + 1 => array( + GESHI_SEARCH => "(\\\\begin\\{(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|alignat|flalign)\\})(.*)(\\\\end\\{\\2\\})", + GESHI_REPLACE => '\3', + GESHI_MODIFIERS => 'Us', + GESHI_BEFORE => '\1', + GESHI_AFTER => '\4' + ), + // [options] + 2 => array( + GESHI_SEARCH => "(?<=\[).*(?=\])", + GESHI_REPLACE => '\0', + GESHI_MODIFIERS => 'Us', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + // Math mode with $ ... $ + 3 => array( + GESHI_SEARCH => "\\$.+\\$", + GESHI_REPLACE => '\0', + GESHI_MODIFIERS => 'Us', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + // Structure: Label + 4 => "\\\\(?:label|pageref|ref|cite)(?=[^a-zA-Z])", + // Structure: sections + 5 => array( + GESHI_SEARCH => "(\\\\(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph|addpart|addchap|addsec)\*?\\{)(.*)(?=\\})", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'U', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + // Structure: sections + 6 => "\\\\(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph|addpart|addchap|addsec)\*?(?=[^a-zA-Z])", + // environment \begin{} and \end{} (i.e. the things inside the {}) + 7 => array( + GESHI_SEARCH => "(\\\\(?:begin|end)\\{)(.*)(?=\\})", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'U', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + // Structure \begin and \end + 8 => "\\\\(?:end|begin)(?=[^a-zA-Z])", + // {parameters} + 9 => array( + GESHI_SEARCH => "(?<=\\{)(?!<\|!REG3XP5!>).*(?=\\})", + GESHI_REPLACE => '\0', + GESHI_MODIFIERS => 'Us', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + // \%, \& usw. + 10 => "\\\\(?:[_$%]|&)", + // \@keywords + 11 => "(?)\\\\@[a-zA-Z]+\*?", + // \keywords + 12 => "(?)\\\\[a-zA-Z]+\*?", + +// --------------------------------------------- + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'COMMENTS' => array( + 'DISALLOWED_BEFORE' => '\\' + ), + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(?<=\\\\)", + 'DISALLOWED_AFTER' => "(?![A-Za-z0-9])" + ), + 'ENABLE_FLAGS' => array( + 'NUMBERS' => GESHI_NEVER, + 'BRACKETS' => GESHI_NEVER + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/lb.php b/_piecrust/libs/Geshi/geshi/lb.php new file mode 100644 index 0000000..6c93268 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/lb.php @@ -0,0 +1,158 @@ + 'Liberty BASIC', + 'COMMENT_SINGLE' => array(1 => '\''), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'and', 'append', 'as', 'beep', 'bmpbutton', 'bmpsave', 'boolean', + 'button', 'byref', 'call', 'callback', 'calldll', 'callfn', 'case', + 'checkbox', 'close', 'cls', 'colordialog', 'combobox', 'confirm', + 'cursor', 'data', 'dialog', 'dim', 'dll', 'do', 'double', 'dump', + 'dword', 'else', 'end', 'error', 'exit', 'field', 'filedialog', + 'files', 'fontdialog', 'for', 'function', 'get', 'gettrim', + 'global', 'gosub', 'goto', 'graphicbox', 'graphics', 'groupbox', + 'if', 'input', 'kill', 'let', 'line', 'listbox', 'loadbmp', + 'locate', 'long', 'loop', 'lprint', 'mainwin', 'maphandle', 'menu', + 'mod', 'name', 'next', 'nomainwin', 'none', 'notice', 'on', + 'oncomerror', 'or', 'open', 'out', 'output', 'password', 'playmidi', + 'playwave', 'popupmenu', 'print', 'printerdialog', 'prompt', 'ptr', + 'put', 'radiobutton', 'random', 'randomize', 'read', 'readjoystick', + 'redim', 'rem', 'restore', 'resume', 'return', 'run', 'scan', + 'seek', 'select', 'short', 'sort', 'statictext', 'stop', 'stopmidi', + 'struct', 'stylebits', 'sub', 'text', 'textbox', 'texteditor', + 'then', 'timer', 'titlebar', 'to', 'trace', 'ulong', 'unloadbmp', + 'until', 'ushort', 'void', 'wait', 'window', 'wend', 'while', + 'word', 'xor' + ), + 2 => array( + 'abs', 'acs', 'asc', 'asn', 'atn', 'chr$', 'cos', 'date$', + 'dechex$', 'eof', 'eval', 'eval$', 'exp', 'hbmp', 'hexdec', 'hwnd', + 'inp', 'input$', 'inputto$', 'instr', 'int', 'left$', 'len', 'lof', + 'log', 'lower$', 'max', 'midipos', 'mid$', 'min', 'mkdir', 'not', + 'right$', 'rmdir', 'rnd', 'sin', 'space$', 'sqr', 'str$', 'tab', + 'tan', 'time$', 'trim$', 'txcount', 'upper$', 'using', 'val', + 'winstring', 'word$' + ), + 3 => array( + 'BackgroundColor$', 'ComboboxColor$', 'CommandLine$', 'DefaultDir$', + 'DisplayHeight', 'DisplayWidth', 'Drives$', 'Err', 'Err$', + 'ForegroundColor$', 'Inkey$', 'Joy1x', 'Joy1y', 'Joy1z', + 'Joy1button1', 'Joy1button2', 'Joy2x', 'Joy2y', 'Joy2z', + 'Joy2button1', 'Joy2button2', 'ListboxColor$', 'Platform$', + 'PrintCollate', 'PrintCopies', 'PrinterFont$', 'PrinterName$', + 'TextboxColor$', 'TexteditorColor$', 'Version$', 'WindowHeight', + 'WindowWidth', 'UpperLeftX', 'UpperLeftY' + ) + ), + 'SYMBOLS' => array( + 1 => array( + '(', ')', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', ':', ',', '#' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #AD0080;', + 3 => 'color: #008080;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #008000;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;', + ), + 'METHODS' => array( + 0 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 1 => 'color: #339933;' + ), + 'REGEXPS' => array(), + 'SCRIPT' => array() + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array(), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 2 => array( + //In LB, the second keyword list is a list of built-in functions, + //and their names should not be highlighted unless being used + //as a function name. + 'DISALLOWED_AFTER' => '(?=\s*\()' + ) + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/lisp.php b/_piecrust/libs/Geshi/geshi/lisp.php new file mode 100644 index 0000000..c80ce23 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/lisp.php @@ -0,0 +1,144 @@ + 'Lisp', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(';|' => '|;'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'not','defun','princ','when', + 'eval','apply','funcall','quote','identity','function', + 'complement','backquote','lambda','set','setq','setf', + 'defmacro','gensym','make','symbol','intern', + 'name','value','plist','get', + 'getf','putprop','remprop','hash','array','aref', + 'car','cdr','caar','cadr','cdar','cddr','caaar','caadr','cadar', + 'caddr','cdaar','cdadr','cddar','cdddr','caaaar','caaadr', + 'caadar','caaddr','cadaar','cadadr','caddar','cadddr', + 'cdaaar','cdaadr','cdadar','cdaddr','cddaar','cddadr', + 'cdddar','cddddr','cons','list','append','reverse','last','nth', + 'nthcdr','member','assoc','subst','sublis','nsubst', + 'nsublis','remove','length', + 'mapc','mapcar','mapl','maplist','mapcan','mapcon','rplaca', + 'rplacd','nconc','delete','atom','symbolp','numberp', + 'boundp','null','listp','consp','minusp','zerop','plusp', + 'evenp','oddp','eq','eql','equal','cond','case','and','or', + 'let','l','if','prog','prog1','prog2','progn','go','return', + 'do','dolist','dotimes','catch','throw','error','cerror','break', + 'continue','errset','baktrace','evalhook','truncate','float', + 'rem','min','max','abs','sin','cos','tan','expt','exp','sqrt', + 'random','logand','logior','logxor','lognot','bignums','logeqv', + 'lognand','lognor','logorc2','logtest','logbitp','logcount', + 'integer','nil','parse-integer','make-list','print','write' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', + '!', '%', '^', '&', + ' + ',' - ',' * ',' / ', + '=','<','>', + '.',':',',',';', + '|' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #555;', + 1 => 'color: #555;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + '::', ':' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'OOLANG' => array( + 'MATCH_AFTER' => '[a-zA-Z][a-zA-Z0-9_\-]*' + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/locobasic.php b/_piecrust/libs/Geshi/geshi/locobasic.php new file mode 100644 index 0000000..1bc88c8 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/locobasic.php @@ -0,0 +1,130 @@ + 'Locomotive Basic', + 'COMMENT_SINGLE' => array(1 => "'", 2 => 'REM'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + "AFTER", "AND", "AUTO", "BORDER", "BREAK", "CALL", "CAT", "CHAIN", + "CLEAR", "CLG", "CLS", "CLOSEIN", "CLOSEOUT", "CONT", "CURSOR", + "DATA", "DEF", "DEFINT", "DEFREAL", "DEFSTR", "DEG", "DELETE", + "DERR", "DI", "DIM", "DRAW", "DRAWR", "EDIT", "EI", "ELSE", "END", + "ENV", "ENT", "EOF", "ERASE", "ERL", "ERR", "ERROR", "EVERY", + "FILL", "FN", "FOR", "FRAME", "GOSUB", "GOTO", "GRAPHICS", "HIMEM", + "IF", "INK", "INPUT", "KEY", "LET", "LINE", "LIST", "LOAD", + "LOCATE", "MASK", "MEMORY", "MERGE", "MODE", "MOVE", "MOVER", "NEW", + "NEXT", "NOT", "ON", "OPENIN", "OPENOUT", "OR", "ORIGIN", "PAPER", + "PEEK", "PEN", "PLOT", "PLOTR", "POKE", "PRINT", "RAD", "RANDOMIZE", + "READ", "RELEASE", "REMAIN", "RENUM", "RESTORE", "RESUME", "RETURN", + "RUN", "SAVE", "SPEED", "SOUND", "SPC", "SQ", "STEP", "STOP", "SWAP", + "SYMBOL", "TAB", "TAG", "TAGOFF", "TEST", "TESTR", "TIME", "TO", + "THEN", "TRON", "TROFF", "USING", "WAIT", "WEND", "WHILE", "WIDTH", + "WINDOW", "WRITE", "XOR", "ZONE" + ), + 2 => array( + "ABS", "ASC", "ATN", "BIN", "CHR", "CINT", "COPYCHR", "COS", + "CREAL", "DEC", "FIX", "FRE", "EXP", "HEX", "INKEY", "INP", "INSTR", + "INT", "JOY", "LEFT", "LEN", "LOG", "LOG10", "LOWER", "MAX", "MID", + "MIN", "MOD", "OUT", "PI", "POS", "RIGHT", "RND", "ROUND", "SGN", + "SIN", "SPACE", "SQR", "STR", "STRING", "TAN", "UNT", "UPPER", + "VAL", "VPOS", "XPOS", "YPOS" + ) + ), + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000088; font-weight: bold;', + 2 => 'color: #AA00AA; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080;', + 2 => 'color: #808080;' + ), + 'BRACKETS' => array( + 0 => 'color: #ff0000;' + ), + 'STRINGS' => array( + 0 => 'color: #008800;' + ), + 'NUMBERS' => array( + 0 => 'color: #0044ff;' + ), + 'METHODS' => array( + 0 => 'color: #66cc66;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/logtalk.php b/_piecrust/libs/Geshi/geshi/logtalk.php new file mode 100644 index 0000000..90355ff --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/logtalk.php @@ -0,0 +1,330 @@ + 'Logtalk', + 'COMMENT_SINGLE' => array(1 => '%'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array(2 => "/0'./sim"), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'"), + 'HARDQUOTE' => array('"', '"'), + 'HARDESCAPE' => array(), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i", + //Hexadecimal Char Specs + 2 => "#\\\\x[\da-fA-F]+\\\\#", + //Octal Char Specs + 3 => "#\\\\[0-7]+\\\\#" + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_BIN_PREFIX_0B | + GESHI_NUMBER_OCT_PREFIX_0O | + GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + // Directives (with arguments) + 1 => array( + // file directives + 'encoding', 'ensure_loaded', + // flag directives + 'set_logtalk_flag', 'set_prolog_flag', + // entity opening directives + 'category', 'object', 'protocol', + // predicate scope directives + 'private', 'protected', 'public', + // conditional compilation directives + 'elif', 'if', + // entity directives + 'calls', 'initialization', 'op', 'uses', + // predicate directives + 'alias', 'discontiguous', 'dynamic', 'mode', 'info', 'meta_predicate', 'multifile', 'synchronized', + // module directives + 'export', 'module', 'reexport', 'use_module' + ), + // Directives (no arguments) + 2 => array( + // entity directives + 'dynamic', + // multi-threading directives + 'synchronized', 'threaded', + // entity closing directives + 'end_category', 'end_object', 'end_protocol', + // conditional compilation directives + 'else', 'endif' + ), + // Entity relations + 3 => array( + 'complements', 'extends', 'imports', 'implements','instantiates', 'specializes' + ), + // Built-in predicates (with arguments) + 4 => array( + // event handlers + 'after', 'before', + // execution-context methods + 'parameter', 'self', 'sender', 'this', + // predicate reflection + 'current_predicate', 'predicate_property', + // DCGs and term expansion + 'expand_goal', 'expand_term', 'goal_expansion', 'phrase', 'term_expansion', + // entity + 'abolish_category', 'abolish_object', 'abolish_protocol', + 'create_category', 'create_object', 'create_protocol', + 'current_category', 'current_object', 'current_protocol', + 'category_property', 'object_property', 'protocol_property', + // entity relations + 'complements_object', + 'extends_category', 'extends_object', 'extends_protocol', + 'implements_protocol', 'imports_category', + 'instantiates_class', 'specializes_class', + // events + 'abolish_events', 'current_event', 'define_events', + // flags + 'current_logtalk_flag', 'set_logtalk_flag', + 'current_prolog_flag', 'set_prolog_flag', + // compiling, loading, and library path + 'logtalk_compile', 'logtalk_library_path', 'logtalk_load', + // database + 'abolish', 'asserta', 'assertz', 'clause', 'retract', 'retractall', + // control + 'call', 'catch', 'once', 'throw', + // all solutions predicates + 'bagof', 'findall', 'forall', 'setof', + // multi-threading meta-predicates + 'threaded', + 'threaded_call', 'threaded_once', 'threaded_ignore', 'threaded_exit', 'threaded_peek', + 'threaded_wait', 'threaded_notify', + // term unification + 'unify_with_occurs_check', + // atomic term processing + 'atom_chars', 'atom_codes', 'atom_concat', 'atom_length', + 'number_chars', 'number_codes', + 'char_code', + // term creation and decomposition + 'arg', 'copy_term', 'functor', + // term testing + 'atom', 'atomic', 'compound', 'float', 'integer', 'nonvar', 'number', 'sub_atom', 'var', + // stream selection and control + 'current_input', 'current_output', 'set_input', 'set_output', + 'open', 'close', 'flush_output', 'stream_property', + 'at_end_of_stream', 'set_stream_position', + // character and byte input/output predicates + 'get_byte', 'get_char', 'get_code', + 'peek_byte', 'peek_char', 'peek_code', + 'put_byte', 'put_char', 'put_code', + 'nl', + // term input/output predicates + 'current_op', 'op', + 'write', 'writeq', 'write_canonical', 'write_term', + 'read', 'read_term', + 'char_conversion', 'current_char_conversion', + // + 'halt' + ), + // Built-in predicates (no arguments) + 5 => array( + // control + 'fail', 'repeat', 'true', + // character and byte input/output predicates + 'nl', + // implementation defined hooks functions + 'halt', + // arithemtic evaluation + 'is', + // stream selection and control + 'at_end_of_stream', 'flush_output' + ), + // Evaluable functors (with arguments) + 6 => array( + 'float_integer_part', 'float_fractional_part', + 'rem', 'mod', 'abs', 'sign', 'floor', 'truncate', 'round', 'ceiling', + 'cos', 'atan', 'exp', 'log', 'sin', 'sqrt' + ), + // Evaluable functors (no arguments) + 7 => array( + 'mod', 'rem' + ), + ), + 'SYMBOLS' => array( + 0 => array( + // external call + '{', '}' + ), + 1 => array( + // arithemtic comparison + '=:=', '=\=', '<', '=<', '>=', '>', + // term comparison + '<<', '>>', '/\\', '\\/', '\\', + // bitwise functors + '==', '\==', '@<', '@=<', '@>=', '@>', + // evaluable functors + '+', '-', '*', '/', '**', + // logic and control + '!', '\\+', ';', + // message sending operators + '::', '^^', ':', + // grammar rule and conditional functors + '-->', '->', + // mode operators + '@', '?', + // term to list predicate + '=..', + // unification + '=', '\\=' + ), + 2 => array( + // clause and directive functors + ':-' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #2e4dc9;', + 2 => 'color: #2e4dc9;', + 3 => 'color: #2e4dc9;', + 4 => 'color: #9d4f37;', + 5 => 'color: #9d4f37;', + 6 => 'color: #9d4f37;', + 7 => 'color: #9d4f37;' + ), + 'NUMBERS' => array( + 0 => 'color: #430000;' + ), + 'COMMENTS' => array( + 1 => 'color: #60a0b0; font-style: italic;', + 2 => 'color: #430000;', + 'MULTI' => 'color: #60a0b0; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #9f0000; font-weight: bold;', + 1 => 'color: #9f0000; font-weight: bold;', + 2 => 'color: #9f0000; font-weight: bold;', + 3 => 'color: #9f0000; font-weight: bold;', + 'HARD' => '', + ), + 'SYMBOLS' => array( + 0 => 'color: #666666;font-weight: bold;', + 1 => 'color: #666666;font-weight: bold;', + 2 => 'color: #000000;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #9f0000;', + 'HARD' => 'color: #9f0000;' + ), + 'METHODS' => array( + ), + 'REGEXPS' => array( + 0 => 'color: #848484;' + ), + 'SCRIPT' => array() + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + 1 => '::' + ), + 'REGEXPS' => array( + // variables + 0 => '\b(?!(?:PIPE|SEMI|REG3XP\d*)[^a-zA-Z0-9_])[A-Z_][a-zA-Z0-9_]*(?![a-zA-Z0-9_])' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array(), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'BRACKETS' => GESHI_NEVER + ), + 'KEYWORDS' => array( + 1 => array( + 'DISALLOWED_BEFORE' => '(?<=:-\s)', + 'DISALLOWED_AFTER' => '(?=\()' + ), + 2 => array( + 'DISALLOWED_BEFORE' => '(?<=:-\s)', + 'DISALLOWED_AFTER' => '(?=\.)' + ), + 3 => array( + 'DISALLOWED_BEFORE' => '(?|^&\'"])', + 'DISALLOWED_AFTER' => '(?=\()' + ), + 4 => array( + 'DISALLOWED_BEFORE' => '(?|^&\'"])', + 'DISALLOWED_AFTER' => '(?=\()' + ), + 5 => array( + 'DISALLOWED_BEFORE' => '(?|^&\'"])', + 'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-&\'"])' + ), + 6 => array( + 'DISALLOWED_BEFORE' => '(?|^&\'"])', + 'DISALLOWED_AFTER' => '(?=\()' + ), + 7 => array( + 'DISALLOWED_BEFORE' => '(?|^&\'"])', + 'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-&\'"])' + ) + ) + ), +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/lolcode.php b/_piecrust/libs/Geshi/geshi/lolcode.php new file mode 100644 index 0000000..f161ff3 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/lolcode.php @@ -0,0 +1,152 @@ + 'LOLcode', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + 1 => "/\bBTW\b.*$/im", + 2 => "/(^|\b)(?:OBTW\b.+?\bTLDR|LOL\b.+?\/LOL)(\b|$)/si" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + 1 => '/:[)>o":]/', + 2 => '/:\([\da-f]+\)/i', + 3 => '/:\{\w+\}/i', + 4 => '/:\[\w+\]/i', + ), + 'KEYWORDS' => array( + //Statements + 1 => array( + 'VISIBLE', 'HAI', 'KTHX', 'KTHXBYE', 'SMOOSH', 'GIMMEH', 'PLZ', + 'ON', 'INVISIBLE', 'R', 'ITZ', 'GTFO', 'COMPLAIN', 'GIMME', + + 'OPEN', 'FILE', 'I HAS A', 'AWSUM THX', 'O NOES', 'CAN', 'HAS', 'HAZ', + 'HOW DOES I', 'IF U SAY SO', 'FOUND YR', 'BORROW', 'OWN', 'ALONG', + 'WITH', 'WIT', 'LOOK', 'AT', 'AWSUM', 'THX' + ), + //Conditionals + 2 => array( + 'IZ', 'YARLY', 'NOWAI', 'WTF?', 'MEBBE', 'OMG', 'OMGWTF', + 'ORLY?', 'OF', 'NOPE', 'SO', 'IM', 'MAI', + + 'O RLY?', 'SUM', 'BOTH SAEM', 'DIFFRINT', 'BOTH', 'EITHER', 'WON', + 'DIFF', 'PRODUKT', 'QUOSHUNT', 'MOD', 'MKAY', 'OK', 'THING', + 'BIGNESS' + ), + //Repetition + 3 => array( + 'IN', 'OUTTA', 'LOOP', 'WHILE' + ), + //Operators \Math + 4 => array( + 'AN', 'AND', 'NOT', 'UP', 'YR', 'UPPIN', 'NERF', 'NERFIN', 'NERFZ', + 'SMASHING', 'UR', 'KINDA', 'LIKE', 'SAEM', 'BIG', 'SMALL', + 'BIGGR', 'SMALLR', 'BIGGER', 'SMALLER', 'GOOD', 'CUTE', 'THAN' + ) + ), + 'SYMBOLS' => array( + '.', ',', '?', + '!!' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #008000;', + 2 => 'color: #000080;', + 3 => 'color: #000080;', + 4 => 'color: #800000;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; style: italic;', + 2 => 'color: #666666; style: italic;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'ESCAPE_CHAR' => array( + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'SPACE_AS_WHITESPACE' => true + ) + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/lotusformulas.php b/_piecrust/libs/Geshi/geshi/lotusformulas.php new file mode 100644 index 0000000..6542375 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/lotusformulas.php @@ -0,0 +1,318 @@ + 'Lotus Notes @Formulas', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array('REM' => ';'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array ( + '[ZoomPreview]', '[WorkspaceStackReplicaIcons]', + '[WorkspaceProperties]', '[WindowWorkspace]', + '[WindowTile]', '[WindowRestore]', '[WindowNext]', + '[WindowMinimizeAll]', '[WindowMinimize]', '[WindowMaximizeAll]', + '[WindowMaximize]', '[WindowCascade]', '[ViewSwitchForm]', + '[ViewShowUnread]', '[ViewShowServerNames]', '[ViewShowSearchBar]', + '[ViewShowRuler]', '[ViewShowPageBreaks]', '[ViewShowOnlyUnread]', + '[ViewShowOnlySelected]', '[ViewShowOnlySearchResults]', + '[ViewShowOnlyCategories]', '[ViewShowObject]', + '[ViewShowFieldHelp]', '[ViewRenamePerson]', '[ViewRefreshUnread]', + '[ViewRefreshFields]', '[ViewNavigatorsNone]', + '[ViewNavigatorsFolders]', '[ViewMoveName]', '[ViewHorizScrollbar]', + '[ViewExpandWithChildren]', '[ViewExpandAll]', '[ViewExpand]', + '[ViewCollapseAll]', '[ViewCollapse]', '[ViewChange]', + '[ViewCertify]', '[ViewBesideFolders]', '[ViewBelowFolders]', + '[ViewArrangeIcons]', '[V3EditPrevField]', '[V3EditNextField]', + '[UserIDSwitch]', '[UserIDSetPassword]', '[UserIDMergeCopy]', + '[UserIDInfo]', '[UserIDEncryptionKeys]', '[UserIDCreateSafeCopy]', + '[UserIDClearPassword]', '[UserIDCertificates]', + '[ToolsUserLogoff]', '[ToolsSpellCheck]', '[ToolsSmartIcons]', + '[ToolsSetupUserSetup]', '[ToolsSetupPorts]', '[ToolsSetupMail]', + '[ToolsSetupLocation]', '[ToolsScanUnreadSelected]', + '[ToolsScanUnreadPreferred]', '[ToolsScanUnreadChoose]', + '[ToolsRunMacro]', '[ToolsRunBackgroundMacros]', '[ToolsReplicate]', + '[ToolsRefreshSelectedDocs]', '[ToolsRefreshAllDocs]', + '[ToolsMarkSelectedUnread]', '[ToolsMarkSelectedRead]', + '[ToolsMarkAllUnread]', '[ToolsMarkAllRead]', '[ToolsHangUp]', + '[ToolsCategorize]', '[ToolsCall]', '[TextUnderline]', + '[TextSpacingSingle]', '[TextSpacingOneAndaHalf]', + '[TextSpacingDouble]', '[TextSetFontSize]', '[TextSetFontFace]', + '[TextSetFontColor]', '[TextReduceFont]', '[TextPermanentPen]', + '[TextParagraphStyles]', '[TextParagraph]', '[TextOutdent]', + '[TextNumbers]', '[TextNormal]', '[TextItalic]', '[TextFont]', + '[TextEnlargeFont]', '[TextCycleSpacing]', '[TextBullet]', + '[TextBold]', '[TextAlignRight]', '[TextAlignNone]', + '[TextAlignLeft]', '[TextAlignFull]', '[TextAlignCenter]', + '[SwitchView]', '[SwitchForm]', '[StyleCycleKey]', + '[SmartIconsNextSet]', '[SmartIconsFloating]', '[ShowProperties]', + '[ShowHidePreviewPane]', '[ShowHideParentPreview]', + '[ShowHideLinkPreview]', '[ShowHideIMContactList]', + '[SetCurrentLocation]', '[SendInstantMessage]', + '[SectionRemoveHeader]', '[SectionProperties]', + '[SectionExpandAll]', '[SectionExpand]', '[SectionDefineEditors]', + '[SectionCollapseAll]', '[SectionCollapse]', '[RunScheduledAgents]', + '[RunAgent]', '[ReplicatorStop]', '[ReplicatorStart]', + '[ReplicatorSendReceiveMail]', '[ReplicatorSendMail]', + '[ReplicatorReplicateWithServer]', '[ReplicatorReplicateSelected]', + '[ReplicatorReplicateNext]', '[ReplicatorReplicateHigh]', + '[Replicator]', '[RenameDatabase]', '[RemoveFromFolder]', + '[RemoteDebugLotusScript]', '[ReloadWindow]', '[RefreshWindow]', + '[RefreshParentNote]', '[RefreshHideFormulas]', '[RefreshFrame]', + '[PublishDatabase]', '[PictureProperties]', '[PasteBitmapAsObject]', + '[PasteBitmapAsBackground]', '[OpenView]', '[OpenPage]', + '[OpenNavigator]', '[OpenInNewWindow]', '[OpenHelpDocument]', + '[OpenFrameset]', '[OpenDocument]', '[OpenCalendar]', + '[ObjectProperties]', '[ObjectOpen]', '[ObjectDisplayAs]', + '[NavPrevUnread]', '[NavPrevSelected]', '[NavPrevMain]', + '[NavPrev]', '[NavNextUnread]', '[NavNextSelected]', + '[NavNextMain]', '[NavNext]', '[NavigatorTest]', + '[NavigatorProperties]', '[NavigateToBacklink]', + '[NavigatePrevUnread]', '[NavigatePrevSelected]', + '[NavigatePrevMain]', '[NavigatePrevHighlight]', '[NavigatePrev]', + '[NavigateNextUnread]', '[NavigateNextSelected]', + '[NavigateNextMain]', '[NavigateNextHighlight]', '[NavigateNext]', + '[MoveToTrash]', '[MailSendPublicKey]', '[MailSendEncryptionKey]', + '[MailSendCertificateRequest]', '[MailSend]', '[MailScanUnread]', + '[MailRequestNewPublicKey]', '[MailRequestNewName]', + '[MailRequestCrossCert]', '[MailOpen]', '[MailForwardAsAttachment]', + '[MailForward]', '[MailComposeMemo]', '[MailAddress]', + '[LayoutProperties]', '[LayoutElementSendToBack]', + '[LayoutElementProperties]', '[LayoutElementBringToFront]', + '[LayoutAddText]', '[LayoutAddGraphic]', '[InsertSubform]', + '[HotspotProperties]', '[HotspotClear]', '[HelpUsingDatabase]', + '[HelpAboutNotes]', '[HelpAboutDatabase]', '[GoUpLevel]', + '[FormTestDocument]', '[FormActions]', '[FolderRename]', + '[FolderProperties]', '[FolderMove]', '[FolderExpandWithChildren]', + '[FolderExpandAll]', '[FolderExpand]', '[FolderDocuments]', + '[FolderCustomize]', '[FolderCollapse]', '[Folder]', + '[FindFreeTimeDialog]', '[FileSaveNewVersion]', '[FileSave]', + '[FilePrintSetup]', '[FilePrint]', '[FilePageSetup]', + '[FileOpenDBRepID]', '[FileOpenDatabase]', '[FileNewReplica]', + '[FileNewDatabase]', '[FileImport]', '[FileFullTextUpdate]', + '[FileFullTextInfo]', '[FileFullTextDelete]', + '[FileFullTextCreate]', '[FileExport]', '[FileExit]', + '[FileDatabaseUseServer]', '[FileDatabaseRemove]', + '[FileDatabaseInfo]', '[FileDatabaseDelete]', '[FileDatabaseCopy]', + '[FileDatabaseCompact]', '[FileDatabaseACL]', '[FileCloseWindow]', + '[ExitNotes]', '[Execute]', '[ExchangeUnreadMarks]', '[EmptyTrash]', + '[EditUp]', '[EditUntruncate]', '[EditUndo]', '[EditTop]', + '[EditTableInsertRowColumn]', '[EditTableFormat]', + '[EditTableDeleteRowColumn]', '[EditShowHideHiddenChars]', + '[EditSelectByDate]', '[EditSelectAll]', '[EditRight]', + '[EditRestoreDocument]', '[EditResizePicture]', + '[EditQuoteSelection]', '[EditProfileDocument]', '[EditProfile]', + '[EditPrevField]', '[EditPhoneNumbers]', '[EditPasteSpecial]', + '[EditPaste]', '[EditOpenLink]', '[EditNextField]', + '[EditMakeDocLink]', '[EditLocations]', '[EditLinks]', '[EditLeft]', + '[EditInsertText]', '[EditInsertTable]', '[EditInsertPopup]', + '[EditInsertPageBreak]', '[EditInsertObject]', + '[EditInsertFileAttachment]', '[EditInsertButton]', + '[EditIndentFirstLine]', '[EditIndent]', '[EditHorizScrollbar]', + '[EditHeaderFooter]', '[EditGotoField]', '[EditFindNext]', + '[EditFindInPreview]', '[EditFind]', '[EditEncryptionKeys]', + '[EditDown]', '[EditDocument]', '[EditDetach]', '[EditDeselectAll]', + '[EditCut]', '[EditCopy]', '[EditClear]', '[EditButton]', + '[EditBottom]', '[DiscoverFolders]', '[Directories]', + '[DialingRules]', '[DesignViewSelectFormula]', '[DesignViews]', + '[DesignViewNewColumn]', '[DesignViewFormFormula]', + '[DesignViewEditActions]', '[DesignViewColumnDef]', + '[DesignViewAttributes]', '[DesignViewAppendColumn]', + '[DesignSynopsis]', '[DesignSharedFields]', '[DesignReplace]', + '[DesignRefresh]', '[DesignMacros]', '[DesignIcon]', + '[DesignHelpUsingDocument]', '[DesignHelpAboutDocument]', + '[DesignFormWindowTitle]', '[DesignFormUseField]', + '[DesignFormShareField]', '[DesignForms]', '[DesignFormNewField]', + '[DesignFormFieldDef]', '[DesignFormAttributes]', + '[DesignDocumentInfo]', '[DebugLotusScript]', + '[DatabaseReplSettings]', '[DatabaseDelete]', '[CreateView]', + '[CreateTextbox]', '[CreateSubForm]', '[CreateSection]', + '[CreateRectangularHotspot]', '[CreateRectangle]', + '[CreatePolyline]', '[CreatePolygon]', '[CreateNavigator]', + '[CreateLayoutRegion]', '[CreateForm]', '[CreateFolder]', + '[CreateEllipse]', '[CreateControlledAccessSection]', + '[CreateAgent]', '[CreateAction]', '[CopySelectedAsTable]', + '[ComposeWithReference]', '[Compose]', '[CloseWindow]', '[Clear]', + '[ChooseFolders]', '[CalendarGoTo]', '[CalendarFormat]', + '[AttachmentView]', '[AttachmentProperties]', '[AttachmentLaunch]', + '[AttachmentDetachAll]', '[AgentTestRun]', '[AgentSetServerName]', + '[AgentRun]', '[AgentLog]', '[AgentEnableDisable]', '[AgentEdit]', + '[AdminTraceConnection]', '[AdminStatisticsConfig]', + '[AdminSendMailTrace]', '[AdminRemoteConsole]', + '[AdminRegisterUser]', '[AdminRegisterServer]', + '[AdminRegisterFromFile]', '[AdminOutgoingMail]', + '[AdminOpenUsersView]', '[AdminOpenStatistics]', + '[AdminOpenServersView]', '[AdminOpenServerLog]', + '[AdminOpenGroupsView]', '[AdminOpenCertLog]', '[AdminOpenCatalog]', + '[AdminOpenAddressBook]', '[AdminNewOrgUnit]', + '[AdminNewOrganization]', '[Administration]', + '[AdminIDFileSetPassword]', '[AdminIDFileExamine]', + '[AdminIDFileClearPassword]', '[AdminDatabaseQuotas]', + '[AdminDatabaseAnalysis]', '[AdminCrossCertifyKey]', + '[AdminCrossCertifyIDFile]', '[AdminCreateGroup]', '[AdminCertify]', + '[AddToIMContactList]', '[AddDatabaseRepID]', '[AddDatabase]', + '[AddBookmark]' + ), + 2 => array( + 'SELECT', 'FIELD', 'ENVIRONMENT', 'DEFAULT', '@Zone ', '@Yesterday', + '@Yes', '@Year', '@Word', '@Wide', '@While', '@Weekday', + '@WebDbName', '@ViewTitle', '@ViewShowThisUnread', '@Version', + '@VerifyPassword', '@ValidateInternetAddress', '@V4UserAccess', + '@V3UserName', '@V2If', '@UserRoles', '@UserPrivileges', + '@UserNamesList', '@UserNameLanguage', '@UserName', '@UserAccess', + '@UrlQueryString', '@URLOpen', '@URLHistory', '@URLGetHeader', + '@URLEncode', '@URLDecode', '@UpperCase', '@UpdateFormulaContext', + '@Unique', '@UndeleteDocument', '@Unavailable', '@True', '@Trim', + '@Transform', '@ToTime', '@ToNumber', '@Tomorrow', '@Today', + '@TimeZoneToText', '@TimeToTextInZone', '@TimeMerge', '@Time', + '@ThisValue', '@ThisName', '@TextToTime', '@TextToNumber', '@Text', + '@TemplateVersion', '@Tan', '@Sum', '@Success', '@Subset', + '@StatusBar', '@Sqrt', '@Soundex', '@Sort', '@Sin', '@Sign', + '@SetViewInfo', '@SetTargetFrame', '@SetProfileField', + '@SetHTTPHeader', '@SetField', '@SetEnvironment', '@SetDocField', + '@Set', '@ServerName', '@ServerAccess', '@Select', '@Second', + '@Round', '@RightBack', '@Right', '@Return', '@Responses', + '@ReplicaID', '@ReplaceSubstring', '@Replace', '@Repeat', + '@RegQueryValue', '@RefreshECL', '@Random', '@ProperCase', + '@Prompt', '@Power', '@PostedCommand', '@PolicyIsFieldLocked', + '@Platform', '@PickList', '@Pi', '@PasswordQuality', '@Password', + '@OrgDir', '@OptimizeMailAddress', '@OpenInNewWindow', '@Now', + '@Nothing', '@NoteID', '@No', '@NewLine', '@Narrow', '@NameLookup', + '@Name', '@Month', '@Modulo', '@Modified', '@Minute', '@Min', + '@MiddleBack', '@Middle', '@Member', '@Max', '@Matches', + '@MailSignPreference', '@MailSend', '@MailSavePreference', + '@MailEncryptSentPreference', '@MailEncryptSavedPreference', + '@MailDbName', '@LowerCase', '@Log', '@Locale', '@Ln', '@Like', + '@Length', '@LeftBack', '@Left', '@LDAPServer', '@LaunchApp', + '@LanguagePreference', '@Keywords', '@IsVirtualizedDirectory', + '@IsValid', '@IsUsingJavaElement', '@IsUnavailable', '@IsTime', + '@IsText', '@IsResponseDoc', '@IsNumber', '@IsNull', '@IsNotMember', + '@IsNewDoc', '@IsModalHelp', '@IsMember', '@IsExpandable', + '@IsError', '@IsEmbeddedInsideWCT', '@IsDocTruncated', + '@IsDocBeingSaved', '@IsDocBeingRecalculated', '@IsDocBeingMailed', + '@IsDocBeingLoaded', '@IsDocBeingEdited', '@IsDB2', '@IsCategory', + '@IsAvailable', '@IsAppInstalled', '@IsAgentEnabled', '@Integer', + '@InheritedDocumentUniqueID', '@Implode', '@IfError', '@If', + '@Hour', '@HashPassword', '@HardDeleteDocument', '@GetViewInfo', + '@GetProfileField', '@GetPortsList', '@GetIMContactListGroupNames', + '@GetHTTPHeader', '@GetFocusTable', '@GetField', '@GetDocField', + '@GetCurrentTimeZone', '@GetAddressBooks', '@FormLanguage', '@For', + '@FontList', '@FloatEq', '@FileDir', '@False', '@Failure', + '@Explode', '@Exp', '@Eval', '@Error', '@Environment', '@Ends', + '@EnableAlarms', '@Elements', '@EditUserECL', '@EditECL', + '@DoWhile', '@Domain', '@DocumentUniqueID', '@DocSiblings', + '@DocParentNumber', '@DocOmmittedLength', '@DocNumber', '@DocMark', + '@DocLock', '@DocLevel', '@DocLength', '@DocFields', + '@DocDescendants', '@DocChildren', '@Do', '@DialogBox', + '@DeleteField', '@DeleteDocument', '@DDETerminate', '@DDEPoke', + '@DDEInitiate', '@DDEExecute', '@DbTitle', '@DbName', '@DbManager', + '@DbLookup', '@DbExists', '@DbCommand', '@DbColumn', '@DB2Schema', + '@Day', '@Date', '@Created', '@Count', '@Cos', '@Contains', + '@ConfigFile', '@Compare', '@Command', '@ClientType', + '@CheckFormulaSyntax', '@CheckAlarms', '@Char', '@Certificate', + '@BusinessDays', '@BrowserInfo', '@Begins', '@Author', + '@Attachments', '@AttachmentNames', '@AttachmentModifiedTimes', + '@AttachmentLengths', '@ATan2', '@ATan', '@ASin', '@Ascii', + '@AllDescendants', '@AllChildren', '@All', '@AdminECLIsLocked', + '@Adjust', '@AddToFolder', '@ACos', '@Accessed', '@AbstractSimple', + '@Abstract', '@Abs' + ) + ), + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #800000;', + 2 => 'color: #0000FF;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #FF00FF;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF00FF;' + ), + 'METHODS' => array( + 1 => 'color: #0000AA;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 2 + ); + +?> diff --git a/_piecrust/libs/Geshi/geshi/lotusscript.php b/_piecrust/libs/Geshi/geshi/lotusscript.php new file mode 100644 index 0000000..412e6e4 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/lotusscript.php @@ -0,0 +1,191 @@ + 'LotusScript', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array('%REM' => '%END REM'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"' , "|"), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array ( + 'Yield', 'Year', 'Xor', 'Write', 'With', 'Width', 'While', 'Wend', + 'Weekday', 'VarType', 'Variant', 'Val', 'UString', 'UString$', + 'UseLSX', 'Use', 'Until', 'Unlock', 'Unicode', 'Uni', 'UChr', + 'UChr$', 'UCase', 'UCase$', 'UBound', 'TypeName', 'Type', 'TRUE', + 'Trim', 'Trim$', 'Today', 'To', 'TimeValue', 'TimeSerial', 'Timer', + 'TimeNumber', 'Time', 'Time$', 'Then', 'Text', 'Tan', 'Tab', 'Sub', + 'StrToken', 'StrToken$', 'StrRightBack', 'StrRightBack$', + 'StrRight', 'StrRight$', 'StrLeftBack', 'StrLeftBack$', 'StrLeft', + 'StrLeft$', 'String', 'String$', 'StrConv', 'StrCompare', 'StrComp', + 'Str', 'Str$', 'Stop', 'Step', 'Static', 'Sqr', 'Split', 'Spc', + 'Space', 'Space$', 'Sleep', 'Single', 'Sin', 'Shell', 'Shared', + 'Sgn', 'SetFileAttr', 'SetAttr', 'Set', 'SendKeys', 'Select', + 'Seek', 'Second', 'RTrim', 'RTrim$', 'RSet', 'Round', 'Rnd', + 'RmDir', 'RightC', 'RightC$', 'RightBP', 'RightBP$', 'RightB', + 'RightB$', 'Right', 'Right$', 'Return', 'Resume', 'Reset', + 'Replace', 'Remove', 'Rem', 'ReDim', 'Read', 'Randomize', + 'Random', 'Put', 'Public', 'Property', 'Private', 'Print', + 'Preserve', 'Pitch', 'PI', 'Output', 'Or', 'Option', 'Open', 'On', + 'Oct', 'Oct$', 'NULL', 'Now', 'NOTHING', 'Not', 'NoPitch', 'NoCase', + 'Next', 'New', 'Name', 'MsgBox', 'Month', 'Mod', 'MkDir', 'Minute', + 'MidC', 'MidC$', 'MidBP', 'MidBP$', 'MidB', 'MidB$', 'Mid', 'Mid$', + 'MessageBox', 'Me', 'LTrim', 'LTrim$', 'LSServer', 'LSI_Info', + 'LSet', 'Loop', 'Long', 'Log', 'LOF', 'Lock', 'LOC', 'LMBCS', + 'ListTag', 'List', 'Line', 'Like', 'Lib', 'Let', 'LenC', 'LenBP', + 'LenB', 'Len', 'LeftC', 'LeftC$', 'LeftBP', 'LeftBP$', 'LeftB', + 'LeftB$', 'Left', 'Left$', 'LCase', 'LCase$', 'LBound', 'Kill', + 'Join', 'IsUnknown', 'IsScalar', 'IsObject', 'IsNumeric', 'IsNull', + 'IsList', 'IsEmpty', 'IsElement', 'IsDate', 'IsArray', 'IsA', 'Is', + 'Integer', 'Int', 'InStrC', 'InStrBP', 'InStrB', 'InStr', 'InputBP', + 'InputBP$', 'InputBox', 'InputBox$', 'InputB', 'InputB$', 'Input', + 'Input$', 'In', 'IMSetMode', 'Implode', 'Implode$', 'Imp', + 'IMEStatus', 'If', 'Hour', 'Hex', 'Hex$', 'Goto', 'GoSub', + 'GetThreadInfo', 'GetFileAttr', 'GetAttr', 'Get', 'Function', + 'FullTrim', 'From', 'FreeFile', 'Fraction', 'Format', 'Format$', + 'ForAll', 'For', 'Fix', 'FileLen', 'FileDateTime', 'FileCopy', + 'FileAttr', 'FALSE', 'Explicit', 'Exp', 'Exit', 'Execute', 'Event', + 'Evaluate', 'Error', 'Error$', 'Err', 'Erl', 'Erase', 'Eqv', 'EOF', + 'Environ', 'Environ$', 'End', 'ElseIf', 'Else', 'Double', 'DoEvents', + 'Do', 'Dir', 'Dir$', 'Dim', 'DestroyLock', 'Delete', 'DefVar', + 'DefStr', 'DefSng', 'DefLng', 'DefInt', 'DefDbl', 'DefCur', + 'DefByte', 'DefBool', 'Declare', 'Day', 'DateValue', 'DateSerial', + 'DateNumber', 'Date', 'Date$', 'DataType', 'CVDate', 'CVar', + 'Currency', 'CurDrive', 'CurDrive$', 'CurDir', 'CurDir$', 'CStr', + 'CSng', 'CreateLock', 'Cos', 'Const', 'Compare', 'Command', + 'Command$', 'CodeUnlock', 'CodeLockCheck', 'CodeLock', 'Close', + 'CLng', 'Class', 'CInt', 'Chr', 'Chr$', 'ChDrive', 'ChDir', 'CDbl', + 'CDat', 'CCur', 'CByte', 'CBool', 'Case', 'Call', 'ByVal', 'Byte', + 'Boolean', 'Bind', 'Binary', 'Bin', 'Bin$', 'Beep', 'Base', 'Atn2', + 'Atn', 'ASin', 'Asc', 'As', 'ArrayUnique', 'ArrayReplace', + 'ArrayGetIndex', 'ArrayAppend', 'Append', 'AppActivate', 'Any', + 'And', 'Alias', 'ActivateApp', 'ACos', 'Access', 'Abs', '%Include', + '%If', '%END', '%ElseIf', '%Else' + ), + 2 => array ( + 'NotesXSLTransformer', 'NotesXMLProcessor', 'NotesViewNavigator', + 'NotesViewEntryCollection', 'NotesViewEntry', 'NotesViewColumn', + 'NotesView', 'NotesUIWorkspace', 'NotesUIView', 'NotesUIScheduler', + 'NotesUIDocument', 'NotesUIDatabase', 'NotesTimer', 'NotesStream', + 'NotesSession', 'NotesSAXParser', 'NotesSAXException', + 'NotesSAXAttributeList', 'NotesRichTextTable', 'NotesRichTextTab', + 'NotesRichTextStyle', 'NotesRichTextSection', 'NotesRichTextRange', + 'NotesRichTextParagraphStyle', 'NotesRichTextNavigator', + 'NotesRichTextItem', 'NotesRichTextDocLink', + 'NotesReplicationEntry', 'NotesReplication', 'NotesRegistration', + 'NotesOutlineEntry', 'NotesOutline', 'NotesNoteCollection', + 'NotesNewsLetter', 'NotesName', 'NotesMIMEHeader', + 'NotesMIMEEntity', 'NotesLog', 'NotesItem', 'NotesInternational', + 'NotesForm', 'NotesEmbeddedObject', 'NotesDXLImporter', + 'NotesDXLExporter', 'NotesDOMXMLDeclNode', 'NotesDOMTextNode', + 'NotesDOMProcessingInstructionNode', 'NotesDOMParser', + 'NotesDOMNotationNode', 'NotesDOMNodeList', 'NotesDOMNode', + 'NotesDOMNamedNodeMap', 'NotesDOMEntityReferenceNode', + 'NotesDOMEntityNode', 'NotesDOMElementNode', + 'NotesDOMDocumentTypeNode', 'NotesDOMDocumentNode', + 'NotesDOMDocumentFragmentNode', 'NotesDOMCommentNode', + 'NotesDOMCharacterDataNote', 'NotesDOMCDATASectionNode', + 'NotesDOMAttributeNode', 'NotesDocumentCollection', 'NotesDocument', + 'NotesDbDirectory', 'NotesDateTime', 'NotesDateRange', + 'NotesDatabase', 'NotesColorObject', 'NotesAgent', + 'NotesAdministrationProcess', 'NotesACLEntry', 'NotesACL', + 'Navigator', 'Field', 'Button' + ) + ) , + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #0000EE;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #000000;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF00FF;' + ), + 'METHODS' => array( + 1 => 'color: #0000AA;' + ), + 'SYMBOLS' => array( + 0 => 'color: #006600;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 2 +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/lscript.php b/_piecrust/libs/Geshi/geshi/lscript.php new file mode 100644 index 0000000..fb16d35 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/lscript.php @@ -0,0 +1,387 @@ + 'LScript', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + //Yes, I'm aware these are out of order, + //I had to rearrange and couldn't be bothered changing the numbers... + 7 => array( + '@data', '@define', '@else', '@end', '@fpdepth', '@if', '@include', + '@insert', '@library', '@localipc', '@name', '@save', '@script', + '@sequence', '@version', '@warnings' + ), + 1 => array( + 'break', 'case', 'continue', 'else', 'end', 'false', 'for', + 'foreach', 'if', 'return', 'switch', 'true', 'while', + ), + 3 => array( + 'active', 'alertlevel', 'alpha', 'alphaprefix', 'animfilename', 'autokeycreate', + 'backdroptype', 'blue', 'boxthreshold', 'button', + 'channelsvisible', 'childrenvisible', 'compfg', 'compbg', 'compfgalpha', + 'coneangles', 'cosine', 'count', 'ctl', 'curFilename', 'curFrame', + 'currenttime', 'curTime', 'curType', + 'depth', 'diffshade', 'diffuse', 'dimensions', 'displayopts', 'dynamicupdate', + 'end', 'eta', + 'filename', 'flags', 'fogtype', 'fps', 'frame', 'frameend', 'frameheight', + 'framestart', 'framestep', 'framewidth', + 'generalopts', 'genus', 'geometry', 'gNorm', 'goal', 'green', + 'h', 'hasAlpha', 'height', + 'id', 'innerlimit', 'isColor', + 'keyCount', 'keys', + 'limiteregion', 'locked', 'luminous', + 'maxsamplesperpixel', 'minsamplesperpixel', 'mirror', 'motionx', 'motiony', + 'name', 'newFilename', 'newFrame', 'newTime', 'newType', 'null', 'numthreads', + 'objID', 'oPos', 'outerlimit', 'oXfrm', + 'parent', 'pixel', 'pixelaspect', 'point', 'points', 'pointcount', 'polNum', + 'polycount', 'polygon', 'polygons', 'postBehavior', 'preBehavior', 'previewend', + 'previewstart', 'previewstep', + 'range', 'rawblue', 'rawgreen', 'rawred', 'rayLength', 'raySource', 'red', + 'reflectblue', 'reflectgreen', 'reflectred', 'recursiondepth', 'renderend', + 'renderopts', 'renderstart', 'renderstep', 'rendertype', 'restlength', + 'rgbprefix', 'roughness', + 'selected', 'setColor', 'setPattern', 'shading', 'shadow', 'shadows', + 'shadowtype', 'size', 'source', 'special', 'specshade', 'specular', + 'spotsize', 'start', 'sx', 'sy', 'sz', + 'target', 'totallayers', 'totalpoints', 'totalpolygons', 'trans', 'transparency', + 'type', + 'value', 'view', 'visible', 'visibility', + 'w', 'width', 'wNorm', 'wPos', 'wXfrm', + 'x', 'xoffset', + 'y', 'yoffset', + 'z' + ), + 4 => array( + 'addLayer', 'addParticle', 'alphaspot', 'ambient', 'asAsc', 'asBin', + 'asInt', 'asNum', 'asStr', 'asVec', 'attach', 'axislocks', + 'backdropColor', 'backdropRay', 'backdropSqueeze', 'bone', 'blurLength', + 'close', 'color', 'contains', 'copy', 'createKey', + 'deleteKey', 'detach', 'drawCircle', 'drawLine', 'drawPoint', 'drawText', + 'drawTriangle', + 'edit', 'eof', 'event', + 'firstChannel', 'firstLayer', 'firstSelect', 'focalLength', 'fogColor', + 'fogMaxAmount', 'fogMaxDist', 'fogMinAmount', 'fogMinDist', + 'fovAngles', 'fStop', 'firstChild', 'focalDistance', + 'get', 'getChannelGroup', 'getEnvelope', 'getForward', 'getKeyBias', + 'getKeyContinuity', 'getKeyCurve', 'getKeyHermite', 'getKeyTension', + 'getKeyTime', 'getKeyValue', 'getParticle', 'getPivot', 'getPosition', + 'getRight', 'getRotation', 'getSelect', 'getScaling', 'getTag', 'getTexture', + 'getUp', 'getValue', 'getWorldPosition', 'getWorldForward', 'getWorldRight', + 'getWorldRotation', 'getWorldUp', 'globalBlur', 'globalMask', 'globalResolution', + 'hasCCEnd', 'hasCCStart', + 'illuminate', 'indexOf', 'isAscii', 'isAlnum', 'isAlpha', 'isBone', + 'isCamera', 'isChannel', 'isChannelGroup', 'isCntrl', 'isCurve', 'isDigit', + 'isEnvelope', 'isImage', 'isInt', 'isLight', 'isLower', 'isMapped', 'isMesh', + 'isNil', 'isNum', 'IsOpen', 'isOriginal', 'isPrint', 'isPunct', 'isScene', + 'isSpace', 'isStr', 'isUpper', 'isValid', 'isVMap', 'isVec', 'isXDigit', + 'keyExists', + 'layer', 'layerName', 'layerVisible', 'limits', 'line', 'linecount', 'load', 'luma', + 'next', 'nextLayer', 'nextSelect', 'nextChannel', 'nextChild', 'nl', + 'offset', 'open', + 'pack', 'param', 'parse', 'paste', 'persist', 'polygonCount', 'position', + 'rayCast', 'rayTrace', 'read', 'readByte', 'readInt', 'readNumber', + 'readDouble', 'readShort', 'readString', 'readVector', 'reduce', + 'remParticle', 'renderCamera', 'reopen', 'replace', 'reset', 'restParam', + 'rewind', 'rgb', 'rgbambient', 'rgbcolor', 'rgbspot', + 'save', 'schemaPosition', 'select', 'set', 'setChannelGroup', 'setKeyBias', + 'setKeyContinuity', 'setKeyCurve', + 'setKeyHermite', 'setKeyTension', 'setKeyValue', 'setParticle', 'setPoints', + 'setTag', 'setValue', 'server', 'serverFlags', 'sortA', 'sortD', 'surface', + 'trunc', + 'write', 'writeln', 'writeByte', 'writeData', 'writeNumber', 'writeDouble', + 'writeShort', 'writeString', 'writeVector', + 'vertex', 'vertexCount', + 'zoomFactor' + ), + 2 => array( + 'abs', 'acos', 'angle', 'append', 'ascii', 'asin', 'atan', + 'binary', + 'ceil', 'center', 'chdir', 'clearimage', 'cloned', 'comringattach', + 'comringdecode', 'comringdetach', 'comringencode', 'comringmsg', 'cos', + 'cosh', 'cot', 'cross2d', 'cross3d', 'csc', 'ctlstring', 'ctlinteger', + 'ctlnumber', 'ctlvector', 'ctldistance', 'ctlchoice', 'ctltext', + 'ctlcolor', 'ctlsurface', 'ctlfont', 'ctlpopup', 'ctledit', 'ctlpercent', + 'ctlangle', 'ctlrgb', 'ctlhsv', 'ctlcheckbox', 'ctlstate', 'ctlfilename', + 'ctlbutton', 'ctllistbox', 'ctlslider', 'ctlminislider', 'ctlsep', 'ctlimage', + 'ctltab', 'ctlallitems', 'ctlmeshitems', 'ctlcameraitems', 'ctllightitems', + 'ctlboneitems', 'ctlimageitems', 'ctlchannel', 'ctlviewport', 'Control_Management', + 'ctlpage', 'ctlgroup', 'ctlposition', 'ctlactive', 'ctlvisible', 'ctlalign', + 'ctlrefresh', 'ctlmenu', 'ctlinfo', + 'date', 'debug', 'deg', 'dot2d', 'dot3d', 'drawborder', 'drawbox', 'drawcircle', + 'drawelipse', 'drawerase', 'drawfillcircle', 'drawfillelipse', 'drawline', + 'drawpixel', 'drawtext', 'drawtextwidth', 'drawtextheight', 'dump', + 'error', 'exp', 'expose', 'extent', + 'fac', 'filecrc', 'filedelete', 'fileexists', 'filefind', 'filerename', + 'filestat', 'floor', 'format', 'frac', 'fullpath', + 'gamma', 'getdir', 'getenv', 'getfile', 'getfirstitem', 'getsep', 'getvalue', + 'globalrecall', 'globalstore', + 'hash', 'hex', 'hostBuild', 'hostVersion', 'hypot', + 'info', 'integer', + 'library', 'licenseId', 'lscriptVersion', 'load', 'loadimage', 'log', 'log10', + 'matchdirs', 'matchfiles', 'max', 'min', 'mkdir', 'mod', 'monend', 'moninit', 'monstep', + 'nil', 'normalize', 'number', + 'octal', 'overlayglyph', + 'parse', 'platform', 'pow', + 'rad', 'random', 'randu', 'range', 'read', 'readdouble', 'readInt', 'readNumber', + 'readShort', 'recall', 'regexp', 'reqabort', 'reqbegin', 'reqend', 'reqisopen', + 'reqkeyboard', 'reqopen', 'reqposition', 'reqpost', 'reqredraw', + 'reqsize', 'reqresize', 'requpdate', 'rmdir', 'round', 'runningUnder', + 'save', 'sec', 'select', 'selector', 'setdesc', 'setvalue', 'sin', 'sinh', 'size', + 'sizeof', 'sleep', 'spawn', 'split', 'sqrt', 'step', 'store', 'string', 'strleft', + 'strlower', 'strright', 'strsub', 'strupper', + 'tan', 'tanh', 'targetobject', 'terminate', 'text', 'time', + 'wait', 'warn', 'when', 'write', 'writeDouble', 'writeInt', 'writeNumber', 'writeShort', + 'var', 'vector', 'visitnodes', 'vmag', + ), + 5 => array( + 'addcurve', 'addpoint', 'addpolygon', 'addquad', 'addtriangle', 'alignpols', + 'autoflex', 'axisdrill', + 'bend', 'bevel', 'boolean', 'boundingbox', + 'changepart', 'changesurface', 'close', 'closeall', 'cmdseq', 'copy', 'copysurface', + 'createsurface', 'cut', + 'deformregion', 'delete', + 'editbegin', 'editend', 'exit', 'extrude', + 'fixedflex', 'flip', 'fontclear', 'fontcount', 'fontindex', 'fontload', + 'fontname', 'fracsubdivide', 'freezecurves', + 'getdefaultsurface', + 'jitter', + 'lathe', 'layerName', 'layerVisible', 'lyrbg', 'lyrdata', 'lyrempty', 'lyremptybg', + 'lyremptyfg', 'lyrfg', 'lyrsetbg', 'lyrsetfg', 'lyrswap', + 'magnet', 'make4patch', 'makeball', 'makebox', 'makecone', 'makedisc', + 'maketesball', 'maketext', 'mergepoints', 'mergepols', 'meshedit', 'mirror', + 'morphpols', 'move', + 'new', 'nextsurface', + 'paste', 'pathclone', 'pathextrude', 'pixel', 'pointcount', 'pointinfo', + 'pointmove', 'pole', 'polycount', 'polyinfo', 'polynormal', 'polypointcount', + 'polypoints', 'polysurface', + 'quantize', + 'railclone', 'railextrude', 'redo', 'removepols', 'rempoint', 'rempoly', + 'renamesurface', 'revert', 'rotate', + 'scale', 'selhide', 'selinvert', 'selmode', 'selpoint', 'selpolygon', 'selunhide', + 'selectvmap', 'setlayername', 'setobject', 'setpivot', 'setsurface', 'shapebevel', + 'shear', 'skinpols', 'smooth', 'smoothcurves', 'smoothscale', 'smoothshift', + 'soliddrill', 'splitpols', 'subdivide', 'swaphidden', + 'taper', 'triple', 'toggleCCend', 'toggleCCstart', 'togglepatches', 'twist', + 'undo', 'undogroupend', 'undogroupbegin', 'unifypols', 'unweld', + 'vortex', + 'weldaverage', 'weldpoints' + ), + 6 => array( + 'About', 'AboutOpenGL', 'AdaptiveSampling', 'AdaptiveThreshold', + 'AddAreaLight', 'AddBone', 'AddButton', 'AddCamera', 'AddChildBone', + 'AddDistantLight', 'AddEnvelope', 'AddLinearLight', 'AddNull', + 'AddPartigon', 'AddPlugins', 'AddPointLight', 'AddPosition', + 'AddRotation', 'AddScale', 'AddSpotlight', 'AddToSelection', + 'AdjustRegionTool', 'AffectCaustics', 'AffectDiffuse', 'AffectOpenGL', + 'AffectSpecular', 'AlertLevel', 'AmbientColor', 'AmbientIntensity', + 'Antialiasing', 'ApertureHeight', 'ApplyServer', 'AreaLight', + 'AutoConfirm', 'AutoFrameAdvance', 'AutoKey', + 'BackdropColor', 'BackView', 'BController', 'BLimits', 'BLurLength', 'BoneActive', + 'BoneFalloffType', 'BoneJointComp', 'BoneJointCompAmounts', 'BoneJointCompParent', + 'BoneLimitedRange', 'BoneMaxRange', 'BoneMinRange', 'BoneMuscleFlex', + 'BoneMuscleFlexAmounts', 'BoneMuscleFlexParent', 'BoneNormalization', + 'BoneRestLength', 'BoneRestPosition', 'BoneRestRotation', 'BoneSource', + 'BoneStrength', 'BoneStrengthMultiply', 'BoneWeightMapName', 'BoneWeightMapOnly', + 'BoneWeightShade', 'BoneXRay', 'BottomView', 'BoundingBoxThreshold', + 'BStiffness', + 'CacheCaustics', 'CacheRadiosity', 'CacheShadowMap', + 'CameraMask', 'CameraView', 'CameraZoomTool', 'CastShadow', 'CausticIntensity', + 'CenterItem', 'CenterMouse', 'ChangeTool', 'ClearAllBones', 'ClearAllCameras', + 'ClearAllLights', 'ClearAllObjects', 'ClearAudio', 'ClearScene', 'ClearSelected', + 'Clone', 'CommandHistory', 'CommandInput', 'Compositing', 'ConeAngleTool', + 'ContentDirectory', 'CreateKey', + 'DecreaseGrid', 'DeleteKey', 'DepthBufferAA', 'DepthOfField', 'DisplayOptions', + 'DistantLight', 'DrawAntialiasing', 'DrawBones', 'DrawChildBones', 'DynamicUpdate', + 'EditBones', 'EditCameras', 'EditKeys', 'EditLights', + 'EditMenus', 'EditObjects', 'EditPlugins', 'EditServer', 'EnableCaustics', + 'EnableDeformations', 'EnableIK', 'EnableLensFlares', 'EnableRadiosity', 'EnableServer', + 'EnableShadowMaps', 'EnableVIPER', 'EnableVolumetricLights', 'EnableXH', + 'EnableYP', 'EnableZB', 'EnahancedAA', 'ExcludeLight', 'ExcludeObject', + 'EyeSeparation', + 'FasterBones', 'FirstFrame', 'FirstItem', 'FitAll', 'FitSelected', + 'FlareIntensity', 'FlareOptions', 'FocalDistance', 'FogColor', 'FogMaxAmount', + 'FogMaxDistance', 'FogMinAmount', 'FogMinDistance', 'FogType', 'FractionalFrames', + 'FrameSize', 'FramesPerSecond', 'FrameStep', 'FreePreview', 'FrontView', 'FullTimeIK', + 'GeneralOptions', 'Generics', 'GlobalApertureHeight', 'GlobalBlurLength', + 'GlobalFrameSize', 'GlobalIllumination', 'GlobalMaskPosition', 'GlobalMotionBlur', + 'GlobalParticleBlur', 'GlobalPixelAspect', 'GlobalResolutionMulitplier', 'GoalItem', + 'GoalStrength', 'GoToFrame', 'GradientBackdrop', 'GraphEditor', 'GridSize', 'GroundColor', + 'HController', 'HideToolbar', 'HideWindows', 'HLimits', 'HStiffness', + 'ImageEditor', 'ImageProcessing', 'IncludeLight', 'IncludeObject', 'IncreaseGrid', + 'IndirectBounces', 'Item_SetWindowPos', 'ItemActive', 'ItemColor', 'ItemLock', + 'ItemProperties', 'ItemVisibilty', + 'KeepGoalWithinReach', + 'LastFrame', 'LastItem', 'LastPluginInterface', 'Layout_SetWindowPos', + 'Layout_SetWindowSize', 'LeftView', 'LensFlare', 'LensFStop', 'LightColor', + 'LightConeAngle', 'LightEdgeAngle', 'LightFalloffType', 'LightIntensity', + 'LightIntensityTool', 'LightQuality', 'LightRange', 'LightView', 'LimitB', + 'LimitDynamicRange', 'LimitedRegion', 'LimitH', 'LimitP', 'LinearLight', + 'LoadAudio', 'LoadFromScene', 'LoadMotion', 'LoadObject', 'LoadObjectLayer', + 'LoadPreview', 'LoadScene', 'LocalCoordinateSystem', + 'MakePreview', 'MaskColor', 'MaskPosition', 'MasterPlugins', 'MatchGoalOrientation', + 'MatteColor', 'MatteObject', 'MetaballResolution', 'Model', 'MorphAmount', + 'MorphAmountTool', 'MorphMTSE', 'MorphSurfaces', 'MorphTarget', 'MotionBlur', + 'MotionBlurDOFPreview', 'MotionOptions', 'MovePathTool', 'MovePivotTool', 'MoveTool', + 'NadirColor', 'NetRender', 'NextFrame', 'NextItem', 'NextKey', 'NextSibling', + 'NextViewLayout', 'NoiseReduction', 'Numeric', + 'ObjectDissolve', + 'ParentCoordinateSystem', 'ParentInPlace', 'ParentItem', + 'ParticleBlur', 'PathAlignLookAhead', 'PathAlignMaxLookSteps', 'PathAlignReliableDist', + 'Pause', 'PController', 'PerspectiveView', + 'PivotPosition', 'PivotRotation', 'PixelAspect', 'PlayAudio', 'PlayBackward', + 'PlayForward', 'PlayPreview', 'PLimits', 'PointLight', 'PolygonEdgeColor', + 'PolygonEdgeFlags', 'PolygonEdgeThickness', 'PolygonEdgeZScale', 'PolygonSize', + 'Position', 'Presets', 'PreviewFirstFrame', 'PreviewFrameStep', 'PreviewLastFrame', + 'PreviewOptions', 'PreviousFrame', 'PreviousItem', 'PreviousKey', 'PreviousSibling', + 'PreviousViewLayout', 'PStiffness', + 'Quit', + 'RadiosityIntensity', 'RadiosityTolerance', 'RadiosityType', 'RayRecursionLimit', + 'RayTraceReflection', 'RayTraceShadows', + 'RayTraceTransparency', 'ReceiveShadow', 'RecentContentDirs', 'RecentScenes', + 'ReconstructionFilter', 'RecordMaxAngles', 'RecordMinAngles', 'RecordPivotRotation', + 'RecordRestPosition', 'Redraw', 'RedrawNow', 'Refresh', 'RefreshNow', 'RegionPosition', + 'RemoveEnvelope', 'RemoveFromSelection', 'RemoveServer', 'Rename', 'RenderFrame', + 'RenderOptions', 'RenderScene', 'RenderSelected', 'RenderThreads', + 'ReplaceObjectLayer', 'ReplaceWithNull', 'ReplaceWithObject', 'Reset', + 'ResolutionMultiplier', 'RestLengthTool', 'RightView', 'RotatePivotTool', + 'RotateTool', 'Rotation', + 'SaveAllObjects', 'SaveCommandList', 'SaveCommandMessages', + 'SaveEndomorph', 'SaveLight', 'SaveLWSC1', 'SaveMotion', 'SaveObject', 'SaveObjectCopy', + 'SavePreview', 'SaveScene', 'SaveSceneAs', 'SaveSceneCopy', 'SaveTransformed', + 'SaveViewLayout', 'Scale', 'Scene_SetWindowPos', 'Scene_SetWindowSize', + 'SceneEditor', 'SchematicPosition', 'SchematicView', 'SelectAllBones', + 'SelectAllCameras', 'SelectAllLights', 'SelectAllObjects', 'SelectByName', + 'SelectChild', 'SelectItem', 'SelectParent', 'SelfShadow', 'ShadowColor', + 'ShadowExclusion', 'ShadowMapAngle', 'ShadowMapFitCone', 'ShadowMapFuzziness', + 'ShadowMapSize', 'ShadowType', 'ShowCages', 'ShowFieldChart', 'ShowHandles', + 'ShowIKChains', 'ShowMotionPaths', 'ShowSafeAreas', 'ShowTargetLines', + 'ShrinkEdgesWithDistance', 'SingleView', 'SizeTool', 'SkelegonsToBones', 'SkyColor', + 'Spotlight', 'SquashTool', 'Statistics', 'StatusMsg', 'Stereoscopic', 'StretchTool', + 'SubdivisionOrder', 'SubPatchLevel', 'SurfaceEditor', 'Synchronize', + 'TargetItem', 'TopView', + 'UnaffectedByFog', 'UnaffectedByIK', 'Undo', 'UnseenByAlphaChannel', 'UnseenByCamera', + 'UnseenByRays', 'UseGlobalResolution', 'UseGlobalBlur', 'UseGlobalMask', + 'UseMorphedPositions', + 'ViewLayout', 'VIPER', 'VolumetricLighting', + 'VolumetricLightingOptions', 'VolumetricRadiosity', 'Volumetrics', + 'WorldCoordinateSystem', + 'XYView', 'XZView', + 'ZenithColor', 'ZoomFactor', 'ZoomIn', 'ZoomInX2', 'ZoomOut', 'ZoomOutX2', 'ZYView', + 'Camera', 'Channel', 'ChannelGroup', 'Envelope', 'File', 'Glyph', 'Icon', 'Image', + 'Light', 'Mesh', 'Scene', 'Surface', 'VMap' + ), + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '<', '>', '+', '-', '*', '/', '!', '%', '&', '@' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #FF6820; font-weight: bold;', //LS_COMMANDS + 3 => 'color: #007F7F; font-weight: bold;', //LS_MEMBERS + 4 => 'color: #800080; font-weight: bold;', //LS_METHODS + 5 => 'color: #51BD95; font-weight: bold;', //LS_MODELER + 6 => 'color: #416F85; font-weight: bold;', //LS_GENERAL + 7 => 'color: #C92929; font-weight: bold;' //LS_COMMANDS (cont) + ), + 'COMMENTS' => array( + 1 => 'color: #7F7F7F;', + 'MULTI' => 'color: #7F7F7F;' + ), + 'BRACKETS' => array( + 0 => 'color: #0040A0;' + ), + 'STRINGS' => array( + 0 => 'color: #00C800;' + ), + 'NUMBERS' => array( + 0 => 'color: #6953AC;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #0040A0;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ), + 'ESCAPE_CHAR' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 3 => array( + 'DISALLOWED_BEFORE' => '(?<=\.)' + ), + 4 => array( + 'DISALLOWED_BEFORE' => '(?<=\.)' + ) + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/lsl2.php b/_piecrust/libs/Geshi/geshi/lsl2.php new file mode 100644 index 0000000..5e50d1f --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/lsl2.php @@ -0,0 +1,898 @@ + 'LSL2', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( // flow control + 'do', + 'else', + 'for', + 'if', + 'jump', + 'return', + 'state', + 'while', + ), + 2 => array( // manifest constants + 'ACTIVE', + 'AGENT', + 'AGENT_ALWAYS_RUN', + 'AGENT_ATTACHMENTS', + 'AGENT_AWAY', + 'AGENT_BUSY', + 'AGENT_CROUCHING', + 'AGENT_FLYING', + 'AGENT_IN_AIR', + 'AGENT_MOUSELOOK', + 'AGENT_ON_OBJECT', + 'AGENT_SCRIPTED', + 'AGENT_SITTING', + 'AGENT_TYPING', + 'AGENT_WALKING', + 'ALL_SIDES', + 'ANIM_ON', + 'ATTACH_BACK', + 'ATTACH_BELLY', + 'ATTACH_CHEST', + 'ATTACH_CHIN', + 'ATTACH_HEAD', + 'ATTACH_HUD_BOTTOM', + 'ATTACH_HUD_BOTTOM_LEFT', + 'ATTACH_HUD_BOTTOM_RIGHT', + 'ATTACH_HUD_CENTER_1', + 'ATTACH_HUD_CENTER_2', + 'ATTACH_HUD_TOP_CENTER', + 'ATTACH_HUD_TOP_LEFT', + 'ATTACH_HUD_TOP_RIGHT', + 'ATTACH_LEAR', + 'ATTACH_LEYE', + 'ATTACH_LFOOT', + 'ATTACH_LHAND', + 'ATTACH_LHIP', + 'ATTACH_LLARM', + 'ATTACH_LLLEG', + 'ATTACH_LPEC', + 'ATTACH_LSHOULDER', + 'ATTACH_LUARM', + 'ATTACH_LULEG', + 'ATTACH_MOUTH', + 'ATTACH_NOSE', + 'ATTACH_PELVIS', + 'ATTACH_REAR', + 'ATTACH_REYE', + 'ATTACH_RFOOT', + 'ATTACH_RHAND', + 'ATTACH_RHIP', + 'ATTACH_RLARM', + 'ATTACH_RLLEG', + 'ATTACH_RPEC', + 'ATTACH_RSHOULDER', + 'ATTACH_RUARM', + 'ATTACH_RULEG', + 'CAMERA_ACTIVE', + 'CAMERA_BEHINDNESS_ANGLE', + 'CAMERA_BEHINDNESS_LAG', + 'CAMERA_DISTANCE', + 'CAMERA_FOCUS', + 'CAMERA_FOCUS_LAG', + 'CAMERA_FOCUS_LOCKED', + 'CAMERA_FOCUS_OFFSET', + 'CAMERA_FOCUS_THRESHOLD', + 'CAMERA_PITCH', + 'CAMERA_POSITION', + 'CAMERA_POSITION_LAG', + 'CAMERA_POSITION_LOCKED', + 'CAMERA_POSITION_THRESHOLD', + 'CHANGED_ALLOWED_DROP', + 'CHANGED_COLOR', + 'CHANGED_INVENTORY', + 'CHANGED_LINK', + 'CHANGED_OWNER', + 'CHANGED_REGION', + 'CHANGED_SCALE', + 'CHANGED_SHAPE', + 'CHANGED_TELEPORT', + 'CHANGED_TEXTURE', + 'CLICK_ACTION_NONE', + 'CLICK_ACTION_OPEN', + 'CLICK_ACTION_OPEN_MEDIA', + 'CLICK_ACTION_PAY', + 'CLICK_ACTION_SIT', + 'CLICK_ACTION_TOUCH', + 'CONTROL_BACK', + 'CONTROL_DOWN', + 'CONTROL_FWD', + 'CONTROL_LBUTTON', + 'CONTROL_LEFT', + 'CONTROL_ML_LBUTTON', + 'CONTROL_RIGHT', + 'CONTROL_ROT_LEFT', + 'CONTROL_ROT_RIGHT', + 'CONTROL_UP', + 'DATA_BORN', + 'DATA_NAME', + 'DATA_ONLINE', + 'DATA_PAYINFO', + 'DATA_RATING', + 'DATA_SIM_POS', + 'DATA_SIM_RATING', + 'DATA_SIM_STATUS', + 'DEBUG_CHANNEL', + 'DEG_TO_RAD', + 'EOF', + 'FALSE', + 'HTTP_BODY_MAXLENGTH', + 'HTTP_BODY_TRUNCATED', + 'HTTP_METHOD', + 'HTTP_MIMETYPE', + 'HTTP_VERIFY_CERT', + 'INVENTORY_ALL', + 'INVENTORY_ANIMATION', + 'INVENTORY_BODYPART', + 'INVENTORY_CLOTHING', + 'INVENTORY_GESTURE', + 'INVENTORY_LANDMARK', + 'INVENTORY_NONE', + 'INVENTORY_NOTECARD', + 'INVENTORY_OBJECT', + 'INVENTORY_SCRIPT', + 'INVENTORY_SOUND', + 'INVENTORY_TEXTURE', + 'LAND_LEVEL', + 'LAND_LOWER', + 'LAND_NOISE', + 'LAND_RAISE', + 'LAND_REVERT', + 'LAND_SMOOTH', + 'LINK_ALL_CHILDREN', + 'LINK_ALL_OTHERS', + 'LINK_ROOT', + 'LINK_SET', + 'LINK_THIS', + 'LIST_STAT_GEOMETRIC_MEAN', + 'LIST_STAT_MAX', + 'LIST_STAT_MEAN', + 'LIST_STAT_MEDIAN', + 'LIST_STAT_MIN', + 'LIST_STAT_NUM_COUNT', + 'LIST_STAT_RANGE', + 'LIST_STAT_STD_DEV', + 'LIST_STAT_SUM', + 'LIST_STAT_SUM_SQUARES', + 'LOOP', + 'MASK_BASE', + 'MASK_EVERYONE', + 'MASK_GROUP', + 'MASK_NEXT', + 'MASK_OWNER', + 'NULL_KEY', + 'OBJECT_CREATOR', + 'OBJECT_DESC', + 'OBJECT_GROUP', + 'OBJECT_NAME', + 'OBJECT_OWNER', + 'OBJECT_POS', + 'OBJECT_ROT', + 'OBJECT_UNKNOWN_DETAIL', + 'OBJECT_VELOCITY', + 'PARCEL_DETAILS_AREA', + 'PARCEL_DETAILS_DESC', + 'PARCEL_DETAILS_GROUP', + 'PARCEL_DETAILS_NAME', + 'PARCEL_DETAILS_OWNER', + 'PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY', + 'PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS', + 'PARCEL_FLAG_ALLOW_CREATE_OBJECTS', + 'PARCEL_FLAG_ALLOW_DAMAGE', + 'PARCEL_FLAG_ALLOW_FLY', + 'PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY', + 'PARCEL_FLAG_ALLOW_GROUP_SCRIPTS', + 'PARCEL_FLAG_ALLOW_LANDMARK', + 'PARCEL_FLAG_ALLOW_SCRIPTS', + 'PARCEL_FLAG_ALLOW_TERRAFORM', + 'PARCEL_FLAG_LOCAL_SOUND_ONLY', + 'PARCEL_FLAG_RESTRICT_PUSHOBJECT', + 'PARCEL_FLAG_USE_ACCESS_GROUP', + 'PARCEL_FLAG_USE_ACCESS_LIST', + 'PARCEL_FLAG_USE_BAN_LIST', + 'PARCEL_FLAG_USE_LAND_PASS_LIST', + 'PARCEL_MEDIA_COMMAND_AGENT', + 'PARCEL_MEDIA_COMMAND_AUTO_ALIGN', + 'PARCEL_MEDIA_COMMAND_DESC', + 'PARCEL_MEDIA_COMMAND_LOOP_SET', + 'PARCEL_MEDIA_COMMAND_PAUSE', + 'PARCEL_MEDIA_COMMAND_PLAY', + 'PARCEL_MEDIA_COMMAND_SIZE', + 'PARCEL_MEDIA_COMMAND_STOP', + 'PARCEL_MEDIA_COMMAND_TEXTURE', + 'PARCEL_MEDIA_COMMAND_TIME', + 'PARCEL_MEDIA_COMMAND_TYPE', + 'PARCEL_MEDIA_COMMAND_URL', + 'PASSIVE', + 'PAYMENT_INFO_ON_FILE', + 'PAYMENT_INFO_USED', + 'PAY_DEFAULT', + 'PAY_HIDE', + 'PERMISSION_ATTACH', + 'PERMISSION_CHANGE_LINKS', + 'PERMISSION_CONTROL_CAMERA', + 'PERMISSION_DEBIT', + 'PERMISSION_TAKE_CONTROLS', + 'PERMISSION_TRACK_CAMERA', + 'PERMISSION_TRIGGER_ANIMATION', + 'PERM_ALL', + 'PERM_COPY', + 'PERM_MODIFY', + 'PERM_MOVE', + 'PERM_TRANSFER', + 'PI', + 'PI_BY_TWO', + 'PRIM_BUMP_BARK', + 'PRIM_BUMP_BLOBS', + 'PRIM_BUMP_BRICKS', + 'PRIM_BUMP_BRIGHT', + 'PRIM_BUMP_CHECKER', + 'PRIM_BUMP_CONCRETE', + 'PRIM_BUMP_DARK', + 'PRIM_BUMP_DISKS', + 'PRIM_BUMP_GRAVEL', + 'PRIM_BUMP_LARGETILE', + 'PRIM_BUMP_NONE', + 'PRIM_BUMP_SHINY', + 'PRIM_BUMP_SIDING', + 'PRIM_BUMP_STONE', + 'PRIM_BUMP_STUCCO', + 'PRIM_BUMP_SUCTION', + 'PRIM_BUMP_TILE', + 'PRIM_BUMP_WEAVE', + 'PRIM_BUMP_WOOD', + 'PRIM_COLOR', + 'PRIM_FULLBRIGHT', + 'PRIM_HOLE_CIRCLE', + 'PRIM_HOLE_DEFAULT', + 'PRIM_HOLE_SQUARE', + 'PRIM_HOLE_TRIANGLE', + 'PRIM_MATERIAL', + 'PRIM_MATERIAL_FLESH', + 'PRIM_MATERIAL_GLASS', + 'PRIM_MATERIAL_LIGHT', + 'PRIM_MATERIAL_METAL', + 'PRIM_MATERIAL_PLASTIC', + 'PRIM_MATERIAL_RUBBER', + 'PRIM_MATERIAL_STONE', + 'PRIM_MATERIAL_WOOD', + 'PRIM_PHANTOM', + 'PRIM_PHYSICS', + 'PRIM_POSITION', + 'PRIM_ROTATION', + 'PRIM_SHINY_HIGH', + 'PRIM_SHINY_LOW', + 'PRIM_SHINY_MEDIUM', + 'PRIM_SHINY_NONE', + 'PRIM_SIZE', + 'PRIM_TEMP_ON_REZ', + 'PRIM_TEXTURE', + 'PRIM_TYPE', + 'PRIM_TYPE_BOX', + 'PRIM_TYPE_CYLINDER', + 'PRIM_TYPE_PRISM', + 'PRIM_TYPE_RING', + 'PRIM_TYPE_SPHERE', + 'PRIM_TYPE_TORUS', + 'PRIM_TYPE_TUBE', + 'PSYS_PART_BOUNCE_MASK', + 'PSYS_PART_EMISSIVE_MASK', + 'PSYS_PART_END_ALPHA', + 'PSYS_PART_END_COLOR', + 'PSYS_PART_END_SCALE', + 'PSYS_PART_FLAGS', + 'PSYS_PART_FOLLOW_SRC_MASK', + 'PSYS_PART_FOLLOW_VELOCITY_MASK', + 'PSYS_PART_INTERP_COLOR_MASK', + 'PSYS_PART_INTERP_SCALE_MASK', + 'PSYS_PART_MAX_AGE', + 'PSYS_PART_START_ALPHA', + 'PSYS_PART_START_COLOR', + 'PSYS_PART_START_SCALE', + 'PSYS_PART_TARGET_LINEAR_MASK', + 'PSYS_PART_TARGET_POS_MASK', + 'PSYS_PART_WIND_MASK', + 'PSYS_SRC_ACCEL', + 'PSYS_SRC_ANGLE_BEGIN', + 'PSYS_SRC_ANGLE_END', + 'PSYS_SRC_BURST_PART_COUNT', + 'PSYS_SRC_BURST_RADIUS', + 'PSYS_SRC_BURST_RATE', + 'PSYS_SRC_BURST_SPEED_MAX', + 'PSYS_SRC_BURST_SPEED_MIN', + 'PSYS_SRC_INNERANGLE', + 'PSYS_SRC_MAX_AGE', + 'PSYS_SRC_OMEGA', + 'PSYS_SRC_OUTERANGLE', + 'PSYS_SRC_PATTERN', + 'PSYS_SRC_PATTERN_ANGLE', + 'PSYS_SRC_PATTERN_ANGLE_CONE', + 'PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY', + 'PSYS_SRC_PATTERN_DROP', + 'PSYS_SRC_PATTERN_EXPLODE', + 'PSYS_SRC_TARGET_KEY', + 'PSYS_SRC_TEXTURE', + 'RAD_TO_DEG', + 'REMOTE_DATA_CHANNEL', + 'REMOTE_DATA_REQUEST', + 'SCRIPTED', + 'SQRT2', + 'STATUS_BLOCK_GRAB', + 'STATUS_DIE_AT_EDGE', + 'STATUS_PHANTOM', + 'STATUS_PHYSICS', + 'STATUS_RETURN_AT_EDGE', + 'STATUS_ROTATE_X', + 'STATUS_ROTATE_Y', + 'STATUS_ROTATE_Z', + 'STATUS_SANDBOX', + 'TRUE', + 'TWO_PI', + 'VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY', + 'VEHICLE_ANGULAR_DEFLECTION_TIMESCALE', + 'VEHICLE_ANGULAR_FRICTION_TIMESCALE', + 'VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE', + 'VEHICLE_ANGULAR_MOTOR_DIRECTION', + 'VEHICLE_ANGULAR_MOTOR_TIMESCALE', + 'VEHICLE_BANKING_EFFICIENCY', + 'VEHICLE_BANKING_MIX', + 'VEHICLE_BANKING_TIMESCALE', + 'VEHICLE_BUOYANCY', + 'VEHICLE_FLAG_CAMERA_DECOUPLED', + 'VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT', + 'VEHICLE_FLAG_HOVER_TERRAIN_ONLY', + 'VEHICLE_FLAG_HOVER_UP_ONLY', + 'VEHICLE_FLAG_HOVER_WATER_ONLY', + 'VEHICLE_FLAG_LIMIT_MOTOR_UP', + 'VEHICLE_FLAG_LIMIT_ROLL_ONLY', + 'VEHICLE_FLAG_MOUSELOOK_BANK', + 'VEHICLE_FLAG_MOUSELOOK_STEER', + 'VEHICLE_FLAG_NO_DEFLECTION_UP', + 'VEHICLE_HOVER_EFFICIENCY', + 'VEHICLE_HOVER_HEIGHT', + 'VEHICLE_HOVER_TIMESCALE', + 'VEHICLE_LINEAR_DEFLECTION_EFFICIENCY', + 'VEHICLE_LINEAR_DEFLECTION_TIMESCALE', + 'VEHICLE_LINEAR_FRICTION_TIMESCALE', + 'VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE', + 'VEHICLE_LINEAR_MOTOR_DIRECTION', + 'VEHICLE_LINEAR_MOTOR_OFFSET', + 'VEHICLE_LINEAR_MOTOR_TIMESCALE', + 'VEHICLE_REFERENCE_FRAME', + 'VEHICLE_TYPE_AIRPLANE', + 'VEHICLE_TYPE_BALLOON', + 'VEHICLE_TYPE_BOAT', + 'VEHICLE_TYPE_CAR', + 'VEHICLE_TYPE_NONE', + 'VEHICLE_TYPE_SLED', + 'VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY', + 'VEHICLE_VERTICAL_ATTRACTION_TIMESCALE', + 'ZERO_ROTATION', + 'ZERO_VECTOR', + ), + 3 => array( // handlers + 'at_rot_target', + 'at_target', + 'attached', + 'changed', + 'collision', + 'collision_end', + 'collision_start', + 'control', + 'dataserver', + 'email', + 'http_response', + 'land_collision', + 'land_collision_end', + 'land_collision_start', + 'link_message', + 'listen', + 'money', + 'moving_end', + 'moving_start', + 'no_sensor', + 'not_at_rot_target', + 'not_at_target', + 'object_rez', + 'on_rez', + 'remote_data', + 'run_time_permissions', + 'sensor', + 'state_entry', + 'state_exit', + 'timer', + 'touch', + 'touch_end', + 'touch_start', + ), + 4 => array( // data types + 'float', + 'integer', + 'key', + 'list', + 'rotation', + 'string', + 'vector', + ), + 5 => array( // library + 'default', + 'llAbs', + 'llAcos', + 'llAddToLandBanList', + 'llAddToLandPassList', + 'llAdjustSoundVolume', + 'llAllowInventoryDrop', + 'llAngleBetween', + 'llApplyImpulse', + 'llApplyRotationalImpulse', + 'llAsin', + 'llAtan2', + 'llAttachToAvatar', + 'llAvatarOnSitTarget', + 'llAxes2Rot', + 'llAxisAngle2Rot', + 'llBase64ToInteger', + 'llBase64ToString', + 'llBreakAllLinks', + 'llBreakLink', + 'llCeil', + 'llClearCameraParams', + 'llCloseRemoteDataChannel', + 'llCloud', + 'llCollisionFilter', + 'llCollisionSound', + 'llCollisionSprite', + 'llCos', + 'llCreateLink', + 'llCSV2List', + 'llDeleteSubList', + 'llDeleteSubString', + 'llDetachFromAvatar', + 'llDetectedGrab', + 'llDetectedGroup', + 'llDetectedKey', + 'llDetectedLinkNumber', + 'llDetectedName', + 'llDetectedOwner', + 'llDetectedPos', + 'llDetectedRot', + 'llDetectedTouchBinormal', + 'llDetectedTouchFace', + 'llDetectedTouchNormal', + 'llDetectedTouchPos', + 'llDetectedTouchST', + 'llDetectedTouchUV', + 'llDetectedType', + 'llDetectedVel', + 'llDialog', + 'llDie', + 'llDumpList2String', + 'llEdgeOfWorld', + 'llEjectFromLand', + 'llEmail', + 'llEscapeURL', + 'llEuler2Rot', + 'llFabs', + 'llFloor', + 'llForceMouselook', + 'llFrand', + 'llGetAccel', + 'llGetAgentInfo', + 'llGetAgentLanguage', + 'llGetAgentSize', + 'llGetAlpha', + 'llGetAndResetTime', + 'llGetAnimation', + 'llGetAnimationList', + 'llGetAttached', + 'llGetBoundingBox', + 'llGetCameraPos', + 'llGetCameraRot', + 'llGetCenterOfMass', + 'llGetColor', + 'llGetCreator', + 'llGetDate', + 'llGetEnergy', + 'llGetForce', + 'llGetFreeMemory', + 'llGetGeometricCenter', + 'llGetGMTclock', + 'llGetInventoryCreator', + 'llGetInventoryKey', + 'llGetInventoryName', + 'llGetInventoryNumber', + 'llGetInventoryPermMask', + 'llGetInventoryType', + 'llGetKey', + 'llGetLandOwnerAt', + 'llGetLinkKey', + 'llGetLinkName', + 'llGetLinkNumber', + 'llGetListEntryType', + 'llGetListLength', + 'llGetLocalPos', + 'llGetLocalRot', + 'llGetMass', + 'llGetNextEmail', + 'llGetNotecardLine', + 'llGetNumberOfNotecardLines', + 'llGetNumberOfPrims', + 'llGetNumberOfSides', + 'llGetObjectDesc', + 'llGetObjectDetails', + 'llGetObjectMass', + 'llGetObjectName', + 'llGetObjectPermMask', + 'llGetObjectPrimCount', + 'llGetOmega', + 'llGetOwner', + 'llGetOwnerKey', + 'llGetParcelDetails', + 'llGetParcelFlags', + 'llGetParcelMaxPrims', + 'llGetParcelPrimCount', + 'llGetParcelPrimOwners', + 'llGetPermissions', + 'llGetPermissionsKey', + 'llGetPos', + 'llGetPrimitiveParams', + 'llGetRegionAgentCount', + 'llGetRegionCorner', + 'llGetRegionFlags', + 'llGetRegionFPS', + 'llGetRegionName', + 'llGetRegionTimeDilation', + 'llGetRootPosition', + 'llGetRootRotation', + 'llGetRot', + 'llGetScale', + 'llGetScriptName', + 'llGetScriptState', + 'llGetSimulatorHostname', + 'llGetStartParameter', + 'llGetStatus', + 'llGetSubString', + 'llGetSunDirection', + 'llGetTexture', + 'llGetTextureOffset', + 'llGetTextureRot', + 'llGetTextureScale', + 'llGetTime', + 'llGetTimeOfDay', + 'llGetTimestamp', + 'llGetTorque', + 'llGetUnixTime', + 'llGetVel', + 'llGetWallclock', + 'llGiveInventory', + 'llGiveInventoryList', + 'llGiveMoney', + 'llGround', + 'llGroundContour', + 'llGroundNormal', + 'llGroundRepel', + 'llGroundSlope', + 'llHTTPRequest', + 'llInsertString', + 'llInstantMessage', + 'llIntegerToBase64', + 'llKey2Name', + 'llList2CSV', + 'llList2Float', + 'llList2Integer', + 'llList2Key', + 'llList2List', + 'llList2ListStrided', + 'llList2Rot', + 'llList2String', + 'llList2Vector', + 'llListen', + 'llListenControl', + 'llListenRemove', + 'llListFindList', + 'llListInsertList', + 'llListRandomize', + 'llListReplaceList', + 'llListSort', + 'llListStatistics', + 'llLoadURL', + 'llLog', + 'llLog10', + 'llLookAt', + 'llLoopSound', + 'llLoopSoundMaster', + 'llLoopSoundSlave', + 'llMapDestination', + 'llMD5String', + 'llMessageLinked', + 'llMinEventDelay', + 'llModifyLand', + 'llModPow', + 'llMoveToTarget', + 'llOffsetTexture', + 'llOpenRemoteDataChannel', + 'llOverMyLand', + 'llOwnerSay', + 'llParcelMediaCommandList', + 'llParcelMediaQuery', + 'llParseString2List', + 'llParseStringKeepNulls', + 'llParticleSystem', + 'llPassCollisions', + 'llPassTouches', + 'llPlaySound', + 'llPlaySoundSlave', + 'llPow', + 'llPreloadSound', + 'llPushObject', + 'llRegionSay', + 'llReleaseControls', + 'llRemoteDataReply', + 'llRemoteDataSetRegion', + 'llRemoteLoadScriptPin', + 'llRemoveFromLandBanList', + 'llRemoveFromLandPassList', + 'llRemoveInventory', + 'llRemoveVehicleFlags', + 'llRequestAgentData', + 'llRequestInventoryData', + 'llRequestPermissions', + 'llRequestSimulatorData', + 'llResetLandBanList', + 'llResetLandPassList', + 'llResetOtherScript', + 'llResetScript', + 'llResetTime', + 'llRezAtRoot', + 'llRezObject', + 'llRot2Angle', + 'llRot2Axis', + 'llRot2Euler', + 'llRot2Fwd', + 'llRot2Left', + 'llRot2Up', + 'llRotateTexture', + 'llRotBetween', + 'llRotLookAt', + 'llRotTarget', + 'llRotTargetRemove', + 'llRound', + 'llSameGroup', + 'llSay', + 'llScaleTexture', + 'llScriptDanger', + 'llSendRemoteData', + 'llSensor', + 'llSensorRemove', + 'llSensorRepeat', + 'llSetAlpha', + 'llSetBuoyancy', + 'llSetCameraAtOffset', + 'llSetCameraEyeOffset', + 'llSetCameraParams', + 'llSetClickAction', + 'llSetColor', + 'llSetDamage', + 'llSetForce', + 'llSetForceAndTorque', + 'llSetHoverHeight', + 'llSetLinkAlpha', + 'llSetLinkColor', + 'llSetLinkPrimitiveParams', + 'llSetLinkTexture', + 'llSetLocalRot', + 'llSetObjectDesc', + 'llSetObjectName', + 'llSetParcelMusicURL', + 'llSetPayPrice', + 'llSetPos', + 'llSetPrimitiveParams', + 'llSetRemoteScriptAccessPin', + 'llSetRot', + 'llSetScale', + 'llSetScriptState', + 'llSetSitText', + 'llSetSoundQueueing', + 'llSetSoundRadius', + 'llSetStatus', + 'llSetText', + 'llSetTexture', + 'llSetTextureAnim', + 'llSetTimerEvent', + 'llSetTorque', + 'llSetTouchText', + 'llSetVehicleFlags', + 'llSetVehicleFloatParam', + 'llSetVehicleRotationParam', + 'llSetVehicleType', + 'llSetVehicleVectorParam', + 'llSHA1String', + 'llShout', + 'llSin', + 'llSitTarget', + 'llSleep', + 'llSqrt', + 'llStartAnimation', + 'llStopAnimation', + 'llStopHover', + 'llStopLookAt', + 'llStopMoveToTarget', + 'llStopSound', + 'llStringLength', + 'llStringToBase64', + 'llStringTrim', + 'llSubStringIndex', + 'llTakeControls', + 'llTan', + 'llTarget', + 'llTargetOmega', + 'llTargetRemove', + 'llTeleportAgentHome', + 'llToLower', + 'llToUpper', + 'llTriggerSound', + 'llTriggerSoundLimited', + 'llUnescapeURL', + 'llUnSit', + 'llVecDist', + 'llVecMag', + 'llVecNorm', + 'llVolumeDetect', + 'llWater', + 'llWhisper', + 'llWind', + 'llXorBase64StringsCorrect', + ), + 6 => array( // deprecated + 'llMakeExplosion', + 'llMakeFire', + 'llMakeFountain', + 'llMakeSmoke', + 'llSound', + 'llSoundPreload', + 'llXorBase64Strings', + ), + 7 => array( // unimplemented + 'llPointAt', + 'llRefreshPrimURL', + 'llReleaseCamera', + 'llRemoteLoadScript', + 'llSetPrimURL', + 'llStopPointAt', + 'llTakeCamera', + 'llTextBox', + ), + 8 => array( // God mode + 'llGodLikeRezObject', + 'llSetInventoryPermMask', + 'llSetObjectPermMask', + ), + ), + 'SYMBOLS' => array( + '{', '}', '(', ')', '[', ']', + '=', '+', '-', '*', '/', + '+=', '-=', '*=', '/=', '++', '--', + '!', '%', '&', '|', '&&', '||', + '==', '!=', '<', '>', '<=', '>=', + '~', '<<', '>>', '^', ':', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff;', + 2 => 'color: #000080;', + 3 => 'color: #008080;', + 4 => 'color: #228b22;', + 5 => 'color: #b22222;', + 6 => 'color: #8b0000; background-color: #ffff00;', + 7 => 'color: #8b0000; background-color: #fa8072;', + 8 => 'color: #000000; background-color: #ba55d3;', + ), + 'COMMENTS' => array( + 1 => 'color: #ff7f50; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #006400;' + ), + 'NUMBERS' => array( + 0 => 'color: #000000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.lslwiki.net/lslwiki/wakka.php?wakka={FNAME}', // http://wiki.secondlife.com/wiki/{FNAME} + 4 => 'http://www.lslwiki.net/lslwiki/wakka.php?wakka={FNAME}', // http://wiki.secondlife.com/wiki/{FNAME} + 5 => 'http://www.lslwiki.net/lslwiki/wakka.php?wakka={FNAME}', // http://wiki.secondlife.com/wiki/{FNAME} + 6 => 'http://www.lslwiki.net/lslwiki/wakka.php?wakka={FNAME}', // http://wiki.secondlife.com/wiki/{FNAME} + 7 => 'http://www.lslwiki.net/lslwiki/wakka.php?wakka={FNAME}', // http://wiki.secondlife.com/wiki/{FNAME} + 8 => 'http://www.lslwiki.net/lslwiki/wakka.php?wakka={FNAME}', // http://wiki.secondlife.com/wiki/{FNAME} + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/lua.php b/_piecrust/libs/Geshi/geshi/lua.php new file mode 100644 index 0000000..2d43b84 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/lua.php @@ -0,0 +1,137 @@ + 'Lua', + 'COMMENT_SINGLE' => array(1 => "--"), + 'COMMENT_MULTI' => array('--[[' => ']]'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'and','break','do','else','elseif','end','false','for','function','if', + 'in','local','nil','not','or','repeat','return','then','true','until','while', + '_VERSION','assert','collectgarbage','dofile','error','gcinfo','loadfile','loadstring', + 'print','tonumber','tostring','type','unpack', + '_ALERT','_ERRORMESSAGE','_INPUT','_PROMPT','_OUTPUT', + '_STDERR','_STDIN','_STDOUT','call','dostring','foreach','foreachi','getn','globals','newtype', + 'rawget','rawset','require','sort','tinsert','tremove', + 'abs','acos','asin','atan','atan2','ceil','cos','deg','exp', + 'floor','format','frexp','gsub','ldexp','log','log10','max','min','mod','rad','random','randomseed', + 'sin','sqrt','strbyte','strchar','strfind','strlen','strlower','strrep','strsub','strupper','tan', + 'openfile','closefile','readfrom','writeto','appendto', + 'remove','rename','flush','seek','tmpfile','tmpname','read','write', + 'clock','date','difftime','execute','exit','getenv','setlocale','time', + '_G','getfenv','getmetatable','ipairs','loadlib','next','pairs','pcall', + 'rawegal','setfenv','setmetatable','xpcall', + 'string.byte','string.char','string.dump','string.find','string.len', + 'string.lower','string.rep','string.sub','string.upper','string.format','string.gfind','string.gsub', + 'table.concat','table.foreach','table.foreachi','table.getn','table.sort','table.insert','table.remove','table.setn', + 'math.abs','math.acos','math.asin','math.atan','math.atan2','math.ceil','math.cos','math.deg','math.exp', + 'math.floor','math.frexp','math.ldexp','math.log','math.log10','math.max','math.min','math.mod', + 'math.pi','math.rad','math.random','math.randomseed','math.sin','math.sqrt','math.tan', + 'coroutine.create','coroutine.resume','coroutine.status', + 'coroutine.wrap','coroutine.yield', + 'io.close','io.flush','io.input','io.lines','io.open','io.output','io.read','io.tmpfile','io.type','io.write', + 'io.stdin','io.stdout','io.stderr', + 'os.clock','os.date','os.difftime','os.execute','os.exit','os.getenv','os.remove','os.rename', + 'os.setlocale','os.time','os.tmpname', + 'string','table','math','coroutine','io','os','debug' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>', '=', ';' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #b1b100;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/m68k.php b/_piecrust/libs/Geshi/geshi/m68k.php new file mode 100644 index 0000000..3c0dfc2 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/m68k.php @@ -0,0 +1,143 @@ + 'Motorola 68000 Assembler', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /*CPU*/ + 1 => array( + 'adc','add','ais','aix','and','asl','asr','bcc','bclr','bcs','beq', + 'bge','bgt','bhcc','bhcs','bhi','bhs','bih','bil','bit','ble','blo', + 'bls','blt','bmc','bmi','bms','bne','bpl','bra','brclr','brn', + 'brset','bset','bsr','cbeq','clc','cli','clr','cmp','com','cphx', + 'cpx','daa','dbnz','dec','div','eor','inc','jmp','jsr','lda','ldhx', + 'ldx','lsl','lsr','mov','mul','neg','nop','nsa','ora','psha','pshh', + 'pshx','pula','pulh','pulx','rol','ror','rsp','rti','rts','sbc', + 'sec','sei','sta','sthx','stop','stx','sub','swi','tap','tax','tpa', + 'tst','tsx','txa','txs','wait' + ), + /*registers*/ + 2 => array( + 'a','h','x', + 'hx','sp' + ), + /*Directive*/ + 3 => array( + '#define','#endif','#else','#ifdef','#ifndef','#include','#undef', + '.db','.dd','.df','.dq','.dt','.dw','.end','.org','equ' + ), + ), + 'SYMBOLS' => array( + ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff; font-weight:bold;', + 2 => 'color: #0000ff;', + 3 => 'color: #46aa03; font-weight:bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #0000ff;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #dd22dd;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;' + ), + 'REGEXPS' => array( + 0 => 'color: #22bbff;', + 1 => 'color: #22bbff;', + 2 => 'color: #993333;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + //Hex numbers + 0 => '#?0[0-9a-fA-F]{1,32}[hH]', + //Binary numbers + 1 => '\%[01]{1,64}[bB]', + //Labels + 2 => '^[_a-zA-Z][_a-zA-Z0-9]*?\:' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8 +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/magiksf.php b/_piecrust/libs/Geshi/geshi/magiksf.php new file mode 100644 index 0000000..5cb21af --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/magiksf.php @@ -0,0 +1,193 @@ + null, + 'LANG_NAME' => 'MagikSF', + 'COMMENT_SINGLE' => array(1 => '##', 2 => '#%', 3 => '#'), + 'COMMENT_MULTI' => array("_pragma(" => ")"), + //Multiline-continued single-line comments + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + '_block', '_endblock', '_proc', '_endproc', '_loop', '_endloop', + '_method', '_endmethod', + '_protect', '_endprotect', '_protection', '_locking', + '_continue', + ), + 2 => array( + '_self', '_thisthread', '_pragma', '_private', '_abstract', + '_local', '_global', '_dynamic', '_package', '_constant', + '_import', '_iter', '_lock', '_optional', '_recursive', '_super' + ), + 3 => array( + '_if', '_endif', '_then', '_else', '_elif', '_orif', '_andif', '_for', '_over', + '_try', '_endtry', '_when', '_throw', '_catch', '_endcatch', '_handling', + '_finally', '_loopbody', '_return', '_leave', '_with' + ), + 4 => array( + '_false', '_true', '_maybe', '_unset', '_no_way' + ), + 5 => array( + '_mod', '_div', '_or', '_and', '_cf', '_is', '_isnt', '_not', '_gather', '_scatter', + '_allresults', '_clone', '_xor' + ), + 6 => array( + 'def_slotted_exemplar', 'write_string', 'write', 'condition', + 'record_transaction', 'gis_program_manager', 'perform', 'define_shared_constant', + 'property_list', 'rope', 'def_property', 'def_mixin' + ), + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', + '+', '-', '*', '/', '**', + '=', '<', '>', '<<', '>>', + ',', '$', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #ff3f3f;', + 3 => 'color: #3f7f3f; font-weight: bold;', + 4 => 'color: #cc66cc;', + 5 => 'color: #ff3fff; font-weight: bold;', + 6 => 'font-weight: bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #339933; font-weight: bold;', + 2 => 'color: #993333;', + 3 => 'color: #339933;', + 'MULTI' => 'color: #7f7f7f; font-style: italic', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #ff3f3f;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #202020;', + 2 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #ff3f3f;' + ), + 'REGEXPS' => array( + 1 => 'color: #3f3fff;', + 2 => 'color: #3f3fff;', + 3 => 'color: #cc66cc;', + 4 => 'color: #7f3f7f; font-style: italic;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + 1 => array( + GESHI_SEARCH => '\b[a-zA-Z0-9_]+:', // package identifiers + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 2 => array( + GESHI_SEARCH => ':(?:[a-zA-Z0-9!?_]+|(?:[].*?[]))*', //symbols + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 3 => array( + GESHI_SEARCH => '%space|%tab|%newline|%.', //characters + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 4 => array( + GESHI_SEARCH => '@(?:[a-zA-Z0-9!?_]+|(?:[].*?[]))*', //symbols + GESHI_REPLACE => '\\0', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/make.php b/_piecrust/libs/Geshi/geshi/make.php new file mode 100644 index 0000000..fe49583 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/make.php @@ -0,0 +1,151 @@ + + * Copyright: (c) 2008 Neil Bird + * Release Version: 1.0.8.9 + * Date Started: 2008/08/26 + * + * make language file for GeSHi. + * + * (GNU make specific) + * + * CHANGES + * ------- + * 2008/09/05 (1.0.0) + * - First Release + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'GNU make', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_REGEXP' => array( + //Escaped String Starters + 2 => "/\\\\['\"]/siU" + ), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + // core + 'ifeq', 'else', 'endif', 'ifneq', 'ifdef', 'ifndef', + 'include', 'vpath', 'export', 'unexport', 'override', + 'info', 'warning', 'error' + ), + 2 => array( + // macros, literals + '.SUFFIXES', '.PHONY', '.DEFAULT', '.PRECIOUS', '.IGNORE', '.SILENT', '.EXPORT_ALL_VARIABLES', '.KEEP_STATE', + '.LIBPATTERNS', '.NOTPARALLEL', '.DELETE_ON_ERROR', '.INTERMEDIATE', '.POSIX', '.SECONDARY' + ), + /* + 3 => array( + // funcs - see regex + //'subst', 'addprefix', 'addsuffix', 'basename', 'call', 'dir', 'error', 'eval', 'filter-out', 'filter', + //'findstring', 'firstword', 'foreach', 'if', 'join', 'notdir', 'origin', 'patsubst', 'shell', 'sort', 'strip', + //'suffix', 'warning', 'wildcard', 'word', 'wordlist', 'words' + )*/ + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', + '!', '@', '%', '&', '|', '/', + '<', '>', + '=', '-', '+', '*', + '.', ':', ',', ';', + '$' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + //3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #666622; font-weight: bold;', + 2 => 'color: #990000;', + //3 => 'color: #000000; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #339900; font-style: italic;', + 2 => 'color: #000099; font-weight: bold;', + 'MULTI' => '' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( # keep same as symbols so as to make ${} and $() equiv. + 0 => 'color: #004400;' + ), + 'STRINGS' => array( + 0 => 'color: #CC2200;' + ), + 'NUMBERS' => array( + 0 => 'color: #CC2200;' + ), + 'SYMBOLS' => array( + 0 => 'color: #004400;' + ), + 'REGEXPS' => array( + 0 => 'color: #000088; font-weight: bold;', + 1 => 'color: #0000CC; font-weight: bold;', + 2 => 'color: #000088;' + ), + 'SCRIPT' => array(), + 'METHODS' => array() + ), + 'URLS' => array( + 1 => '', + 2 => '', + //3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array( + //Simple variables + 0 => "\\$(?:[^{(&]|&(?:amp|lt|gt);)", + //Complex variables/functions [built-ins] + 1 => array( + GESHI_SEARCH => '(\\$[({])(subst|addprefix|addsuffix|basename|call|dir|error|eval|filter-out|filter,|findstring|firstword|foreach|if|join|notdir|origin|patsubst|shell|sort|strip,|suffix|warning|wildcard|word|wordlist|words)([ })])', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + //Complex variables/functions [others] + 2 => array( + GESHI_SEARCH => '(\\$[({])([A-Za-z_][A-Za-z_0-9]*)([ })])', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array(), + 'TAB_WIDTH' => 8 +// vim: set sw=4 sts=4 : +); +?> diff --git a/_piecrust/libs/Geshi/geshi/mapbasic.php b/_piecrust/libs/Geshi/geshi/mapbasic.php new file mode 100644 index 0000000..c8cf0e1 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/mapbasic.php @@ -0,0 +1,908 @@ + 'MapBasic', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( +/* + 1 - Statements + Clauses + Data Types + Logical Operators, Geographical Operators + SQL + 2 - Special Procedures + 3 - Functions + 4 - Constants + 5 - Extended keywords (case sensitive) +*/ + 1 => array( + 'Add', 'Alias', 'All', 'Alter', 'And', 'Any', 'Application', 'Arc', + 'Area', 'As', 'AutoLabel', 'Bar', 'Beep', 'Begin', 'Bind', + 'Browse', 'Brush', 'BrushPicker', 'Button', 'ButtonPad', + 'ButtonPads', 'BY', 'Call', 'CancelButton', 'Cartographic', 'Case', + 'CharSet', 'Check', 'CheckBox', 'Clean', 'Close', 'Collection', + 'Column', 'Combine', 'Command', 'Commit', 'Connection', + 'ConnectionNumber', 'Contains', 'Continue', 'Control', 'CoordSys', + 'Create', 'Cutter', 'Date', 'Datum', 'DDEExecute', 'DDEPoke', + 'DDETerminate', 'DDETerminateAll', 'Declare', 'Default', 'Define', + 'Delete', 'Dialog', 'Digitizer', 'Dim', 'Disaggregate', + 'Disconnect', 'Distance', 'Do', 'Document', 'DocumentWindow', + 'Drag', 'Drop', 'EditText', 'Ellipse', 'Enclose', 'End', 'Entire', + 'Entirely', 'Erase', 'Error', 'Event', 'Exit', 'Export', + 'Farthest', 'Fetch', 'File', 'Find', 'Float', 'FME', 'Font', + 'FontPicker', 'For', 'Format', 'Frame', 'From', 'Function', + 'Geocode', 'Get', 'Global', 'Goto', 'Graph', 'Grid', 'GROUP', + 'GroupBox', 'Handler', 'If', 'Import', 'In', 'Include', 'Index', + 'Info', 'Input', 'Insert', 'Integer', 'Intersect', 'Intersects', + 'INTO', 'Isogram', 'Item', 'Kill', 'Layout', 'Legend', 'Line', + 'Link', 'ListBox', 'Logical', 'Loop', 'Map', 'Map3D', 'MapInfo', + 'MapInfoDialog', 'Menu', 'Merge', 'Metadata', 'Method', 'Mod', + 'Move', 'MultiListBox', 'MultiPoint', 'MWS', 'Nearest', 'Next', + 'NOSELECT', 'Not', 'Note', 'Object', 'Objects', 'Offset', + 'OKButton', 'OnError', 'Open', 'Or', 'ORDER', 'Overlay', 'Pack', + 'Paper', 'Part', 'Partly', 'Pen', 'PenPicker', 'Pline', 'Point', + 'PopupMenu', 'Preserve', 'Print', 'PrintWin', 'PrismMap', + 'Processing', 'Program', 'ProgressBar', 'ProgressBars', 'Put', + 'RadioGroup', 'Randomize', 'Ranges', 'Rect', 'ReDim', + 'Redistricter', 'Refresh', 'Region', 'Register', 'Relief', + 'Reload', 'Remove', 'Rename', 'Report', 'Reproject', 'Resolution', + 'Resume', 'Rollback', 'RoundRect', 'RowID', 'Run', 'Save', 'Seek', + 'Select', 'Selection', 'Server', 'Set', 'Shade', 'SmallInt', + 'Snap', 'Split', 'StaticText', 'StatusBar', 'Stop', 'String', + 'Style', 'Styles', 'Sub', 'Symbol', 'SymbolPicker', 'Symbols', + 'Table', 'Target', 'Terminate', 'Text', 'Then', 'Threshold', + 'Timeout', 'To', 'Transaction', 'Transform', 'Type', 'UnDim', + 'Units', 'Unlink', 'Update', 'Using', 'VALUES', 'Version', + 'Versioning', 'Wend', 'WFS', 'WHERE', 'While', 'Window', 'Within', + 'Workspace', 'Write' + ), + 2 => array( + 'EndHandler', 'ForegroundTaskSwitchHandler', 'Main', + 'RemoteMapGenHandler', 'RemoteMsgHandler', 'SelChangedHandler', + 'ToolHandler', 'WinChangedHandler', 'WinClosedHandler', + 'WinFocusChangedHandler' + ), + 3 => array( + 'Abs', 'Acos', 'ApplicationDirectory$', 'AreaOverlap', 'Asc', + 'Asin', 'Ask', 'Atn', 'Avg', 'Buffer', 'ButtonPadInfo', + 'CartesianArea', 'CartesianBuffer', 'CartesianConnectObjects', + 'CartesianDistance', 'CartesianObjectDistance', + 'CartesianObjectLen', 'CartesianOffset', 'CartesianOffsetXY', + 'CartesianPerimeter', 'Centroid', 'CentroidX', 'CentroidY', + 'ChooseProjection$', 'Chr$', 'ColumnInfo', 'CommandInfo', + 'ConnectObjects', 'ControlPointInfo', 'ConvertToPline', + 'ConvertToRegion', 'ConvexHull', 'CoordSysName$', 'Cos', 'Count', + 'CreateCircle', 'CreateLine', 'CreatePoint', 'CreateText', + 'CurDate', 'CurrentBorderPen', 'CurrentBrush', 'CurrentFont', + 'CurrentLinePen', 'CurrentPen', 'CurrentSymbol', 'DateWindow', + 'Day', 'DDEInitiate', 'DDERequest$', 'DeformatNumber$', 'EOF', + 'EOT', 'EPSGToCoordSysString$', 'Err', 'Error$', 'Exp', + 'ExtractNodes', 'FileAttr', 'FileExists', 'FileOpenDlg', + 'FileSaveAsDlg', 'Fix', 'Format$', 'FormatDate$', 'FormatNumber$', + 'FrontWindow', 'GeocodeInfo', 'GetFolderPath$', 'GetGridCellValue', + 'GetMetadata$', 'GetSeamlessSheet', 'GridTableInfo', + 'HomeDirectory$', 'InStr', 'Int', 'IntersectNodes', + 'IsGridCellNull', 'IsogramInfo', 'IsPenWidthPixels', + 'LabelFindByID', 'LabelFindFirst', 'LabelFindNext', 'LabelInfo', + 'LayerInfo', 'LCase$', 'Left$', 'LegendFrameInfo', 'LegendInfo', + 'LegendStyleInfo', 'Len', 'Like', 'LocateFile$', 'LOF', 'Log', + 'LTrim$', 'MakeBrush', 'MakeCustomSymbol', 'MakeFont', + 'MakeFontSymbol', 'MakePen', 'MakeSymbol', 'Map3DInfo', + 'MapperInfo', 'Max', 'Maximum', 'MBR', 'MenuItemInfoByHandler', + 'MenuItemInfoByID', 'MGRSToPoint', 'MICloseContent', + 'MICloseFtpConnection', 'MICloseFtpFileFind', + 'MICloseHttpConnection', 'MICloseHttpFile', 'MICloseSession', + 'MICreateSession', 'MICreateSessionFull', 'Mid$', 'MidByte$', + 'MIErrorDlg', 'MIFindFtpFile', 'MIFindNextFtpFile', 'MIGetContent', + 'MIGetContentBuffer', 'MIGetContentLen', 'MIGetContentString', + 'MIGetContentToFile', 'MIGetContentType', + 'MIGetCurrentFtpDirectory', 'MIGetErrorCode', 'MIGetErrorMessage', + 'MIGetFileURL', 'MIGetFtpConnection', 'MIGetFtpFile', + 'MIGetFtpFileFind', 'MIGetFtpFileName', 'MIGetHttpConnection', + 'MIIsFtpDirectory', 'MIIsFtpDots', 'Min', 'Minimum', + 'MIOpenRequest', 'MIOpenRequestFull', 'MIParseURL', 'MIPutFtpFile', + 'MIQueryInfo', 'MIQueryInfoStatusCode', 'MISaveContent', + 'MISendRequest', 'MISendSimpleRequest', 'MISetCurrentFtpDirectory', + 'MISetSessionTimeout', 'MIXmlAttributeListDestroy', + 'MIXmlDocumentCreate', 'MIXmlDocumentDestroy', + 'MIXmlDocumentGetNamespaces', 'MIXmlDocumentGetRootNode', + 'MIXmlDocumentLoad', 'MIXmlDocumentLoadXML', + 'MIXmlDocumentLoadXMLString', 'MIXmlDocumentSetProperty', + 'MIXmlGetAttributeList', 'MIXmlGetChildList', + 'MIXmlGetNextAttribute', 'MIXmlGetNextNode', 'MIXmlNodeDestroy', + 'MIXmlNodeGetAttributeValue', 'MIXmlNodeGetFirstChild', + 'MIXmlNodeGetName', 'MIXmlNodeGetParent', 'MIXmlNodeGetText', + 'MIXmlNodeGetValue', 'MIXmlNodeListDestroy', 'MIXmlSCDestroy', + 'MIXmlSCGetLength', 'MIXmlSCGetNamespace', 'MIXmlSelectNodes', + 'MIXmlSelectSingleNode', 'Month', 'NumAllWindows', 'NumberToDate', + 'NumCols', 'NumTables', 'NumWindows', 'ObjectDistance', + 'ObjectGeography', 'ObjectInfo', 'ObjectLen', 'ObjectNodeHasM', + 'ObjectNodeHasZ', 'ObjectNodeM', 'ObjectNodeX', 'ObjectNodeY', + 'ObjectNodeZ', 'OffsetXY', 'Overlap', 'OverlayNodes', + 'PathToDirectory$', 'PathToFileName$', 'PathToTableName$', + 'PenWidthToPoints', 'Perimeter', 'PointsToPenWidth', + 'PointToMGRS$', 'PrismMapInfo', 'ProgramDirectory$', 'Proper$', + 'ProportionOverlap', 'RasterTableInfo', 'ReadControlValue', + 'RegionInfo', 'RemoteQueryHandler', 'RGB', 'Right$', 'Rnd', + 'Rotate', 'RotateAtPoint', 'Round', 'RTrim$', 'SearchInfo', + 'SearchPoint', 'SearchRect', 'SelectionInfo', 'Server_ColumnInfo', + 'Server_Connect', 'Server_ConnectInfo', 'Server_DriverInfo', + 'Server_EOT', 'Server_Execute', 'Server_GetODBCHConn', + 'Server_GetODBCHStmt', 'Server_NumCols', 'Server_NumDrivers', + 'SessionInfo', 'Sgn', 'Sin', 'Space$', 'SphericalArea', + 'SphericalConnectObjects', 'SphericalDistance', + 'SphericalObjectDistance', 'SphericalObjectLen', 'SphericalOffset', + 'SphericalOffsetXY', 'SphericalPerimeter', 'Sqr', 'Str$', + 'String$', 'StringCompare', 'StringCompareIntl', 'StringToDate', + 'StyleAttr', 'Sum', 'SystemInfo', 'TableInfo', 'Tan', + 'TempFileName$', 'TextSize', 'Time', 'Timer', 'TriggerControl', + 'TrueFileName$', 'UBound', 'UCase$', 'UnitAbbr$', 'UnitName$', + 'Val', 'Weekday', 'WindowID', 'WindowInfo', 'WtAvg', 'Year' + ), + 4 => array( + 'BLACK', 'BLUE', 'BRUSH_BACKCOLOR', 'BRUSH_FORECOLOR', + 'BRUSH_PATTERN', 'BTNPAD_INFO_FLOATING', 'BTNPAD_INFO_NBTNS', + 'BTNPAD_INFO_WIDTH', 'BTNPAD_INFO_WINID', 'BTNPAD_INFO_X', + 'BTNPAD_INFO_Y', 'CLS', 'CMD_INFO_CTRL', 'CMD_INFO_CUSTOM_OBJ', + 'CMD_INFO_DLG_DBL', 'CMD_INFO_DLG_OK', 'CMD_INFO_EDIT_ASK', + 'CMD_INFO_EDIT_DISCARD', 'CMD_INFO_EDIT_SAVE', + 'CMD_INFO_EDIT_STATUS', 'CMD_INFO_EDIT_TABLE', 'CMD_INFO_FIND_RC', + 'CMD_INFO_FIND_ROWID', 'CMD_INFO_HL_FILE_NAME', + 'CMD_INFO_HL_LAYER_ID', 'CMD_INFO_HL_ROWID', + 'CMD_INFO_HL_TABLE_NAME', 'CMD_INFO_HL_WINDOW_ID', + 'CMD_INFO_INTERRUPT', 'CMD_INFO_MENUITEM', 'CMD_INFO_MSG', + 'CMD_INFO_ROWID', 'CMD_INFO_SELTYPE', 'CMD_INFO_SHIFT', + 'CMD_INFO_STATUS', 'CMD_INFO_TASK_SWITCH', 'CMD_INFO_TOOLBTN', + 'CMD_INFO_WIN', 'CMD_INFO_X', 'CMD_INFO_X2', 'CMD_INFO_XCMD', + 'CMD_INFO_Y', 'CMD_INFO_Y2', 'COL_INFO_DECPLACES', + 'COL_INFO_EDITABLE', 'COL_INFO_INDEXED', 'COL_INFO_NAME', + 'COL_INFO_NUM', 'COL_INFO_TYPE', 'COL_INFO_WIDTH', 'COL_TYPE_CHAR', + 'COL_TYPE_DATE', 'COL_TYPE_DATETIME', 'COL_TYPE_DECIMAL', + 'COL_TYPE_FLOAT', 'COL_TYPE_GRAPHIC', 'COL_TYPE_INTEGER', + 'COL_TYPE_LOGICAL', 'COL_TYPE_SMALLINT', 'COL_TYPE_TIME', 'CYAN', + 'DATE_WIN_CURPROG', 'DATE_WIN_SESSION', 'DEG_2_RAD', + 'DICTIONARY_ADDRESS_ONLY', 'DICTIONARY_ALL', + 'DICTIONARY_PREFER_ADDRESS', 'DICTIONARY_PREFER_USER', + 'DICTIONARY_USER_ONLY', 'DM_CUSTOM_CIRCLE', 'DM_CUSTOM_ELLIPSE', + 'DM_CUSTOM_LINE', 'DM_CUSTOM_POINT', 'DM_CUSTOM_POLYGON', + 'DM_CUSTOM_POLYLINE', 'DM_CUSTOM_RECT', 'DMPAPER_10X11', + 'DMPAPER_10X14', 'DMPAPER_11X17', 'DMPAPER_12X11', 'DMPAPER_15X11', + 'DMPAPER_9X11', 'DMPAPER_A_PLUS', 'DMPAPER_A2', 'DMPAPER_A3', + 'DMPAPER_A3_EXTRA', 'DMPAPER_A3_EXTRA_TRANSVERSE', + 'DMPAPER_A3_ROTATED', 'DMPAPER_A3_TRANSVERSE', 'DMPAPER_A4', + 'DMPAPER_A4_EXTRA', 'DMPAPER_A4_PLUS', 'DMPAPER_A4_ROTATED', + 'DMPAPER_A4_TRANSVERSE', 'DMPAPER_A4SMALL', 'DMPAPER_A5', + 'DMPAPER_A5_EXTRA', 'DMPAPER_A5_ROTATED', 'DMPAPER_A5_TRANSVERSE', + 'DMPAPER_A6', 'DMPAPER_A6_ROTATED', 'DMPAPER_B_PLUS', 'DMPAPER_B4', + 'DMPAPER_B4_JIS_ROTATED', 'DMPAPER_B5', 'DMPAPER_B5_EXTRA', + 'DMPAPER_B5_JIS_ROTATED', 'DMPAPER_B5_TRANSVERSE', + 'DMPAPER_B6_JIS', 'DMPAPER_B6_JIS_ROTATED', 'DMPAPER_CSHEET', + 'DMPAPER_DBL_JAPANESE_POSTCARD', + 'DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED', 'DMPAPER_DSHEET', + 'DMPAPER_ENV_10', 'DMPAPER_ENV_11', 'DMPAPER_ENV_12', + 'DMPAPER_ENV_14', 'DMPAPER_ENV_9', 'DMPAPER_ENV_B4', + 'DMPAPER_ENV_B5', 'DMPAPER_ENV_B6', 'DMPAPER_ENV_C3', + 'DMPAPER_ENV_C4', 'DMPAPER_ENV_C5', 'DMPAPER_ENV_C6', + 'DMPAPER_ENV_C65', 'DMPAPER_ENV_DL', 'DMPAPER_ENV_INVITE', + 'DMPAPER_ENV_ITALY', 'DMPAPER_ENV_MONARCH', 'DMPAPER_ENV_PERSONAL', + 'DMPAPER_ESHEET', 'DMPAPER_EXECUTIVE', + 'DMPAPER_FANFOLD_LGL_GERMAN', 'DMPAPER_FANFOLD_STD_GERMAN', + 'DMPAPER_FANFOLD_US', 'DMPAPER_FIRST', 'DMPAPER_FOLIO', + 'DMPAPER_ISO_B4', 'DMPAPER_JAPANESE_POSTCARD', + 'DMPAPER_JAPANESE_POSTCARD_ROTATED', 'DMPAPER_JENV_CHOU3', + 'DMPAPER_JENV_CHOU3_ROTATED', 'DMPAPER_JENV_CHOU4', + 'DMPAPER_JENV_CHOU4_ROTATED', 'DMPAPER_JENV_KAKU2', + 'DMPAPER_JENV_KAKU2_ROTATED', 'DMPAPER_JENV_KAKU3', + 'DMPAPER_JENV_KAKU3_ROTATED', 'DMPAPER_JENV_YOU4', + 'DMPAPER_JENV_YOU4_ROTATED', 'DMPAPER_LEDGER', 'DMPAPER_LEGAL', + 'DMPAPER_LEGAL_EXTRA', 'DMPAPER_LETTER', 'DMPAPER_LETTER_EXTRA', + 'DMPAPER_LETTER_EXTRA_TRANSVERSE', 'DMPAPER_LETTER_PLUS', + 'DMPAPER_LETTER_ROTATED', 'DMPAPER_LETTER_TRANSVERSE', + 'DMPAPER_LETTERSMALL', 'DMPAPER_NOTE', 'DMPAPER_P16K', + 'DMPAPER_P16K_ROTATED', 'DMPAPER_P32K', 'DMPAPER_P32K_ROTATED', + 'DMPAPER_P32KBIG', 'DMPAPER_P32KBIG_ROTATED', 'DMPAPER_PENV_1', + 'DMPAPER_PENV_1_ROTATED', 'DMPAPER_PENV_10', + 'DMPAPER_PENV_10_ROTATED', 'DMPAPER_PENV_2', + 'DMPAPER_PENV_2_ROTATED', 'DMPAPER_PENV_3', + 'DMPAPER_PENV_3_ROTATED', 'DMPAPER_PENV_4', + 'DMPAPER_PENV_4_ROTATED', 'DMPAPER_PENV_5', + 'DMPAPER_PENV_5_ROTATED', 'DMPAPER_PENV_6', + 'DMPAPER_PENV_6_ROTATED', 'DMPAPER_PENV_7', + 'DMPAPER_PENV_7_ROTATED', 'DMPAPER_PENV_8', + 'DMPAPER_PENV_8_ROTATED', 'DMPAPER_PENV_9', + 'DMPAPER_PENV_9_ROTATED', 'DMPAPER_QUARTO', 'DMPAPER_RESERVED_48', + 'DMPAPER_RESERVED_49', 'DMPAPER_STATEMENT', 'DMPAPER_TABLOID', + 'DMPAPER_TABLOID_EXTRA', 'DMPAPER_USER', 'ERR_BAD_WINDOW', + 'ERR_BAD_WINDOW_NUM', 'ERR_CANT_ACCESS_FILE', + 'ERR_CANT_INITIATE_LINK', 'ERR_CMD_NOT_SUPPORTED', + 'ERR_FCN_ARG_RANGE', 'ERR_FCN_INVALID_FMT', + 'ERR_FCN_OBJ_FETCH_FAILED', 'ERR_FILEMGR_NOTOPEN', + 'ERR_FP_MATH_LIB_DOMAIN', 'ERR_FP_MATH_LIB_RANGE', + 'ERR_INVALID_CHANNEL', 'ERR_INVALID_READ_CONTROL', + 'ERR_INVALID_TRIG_CONTROL', 'ERR_NO_FIELD', + 'ERR_NO_RESPONSE_FROM_APP', 'ERR_NULL_SELECTION', + 'ERR_PROCESS_FAILED_IN_APP', 'ERR_TABLE_NOT_FOUND', + 'ERR_WANT_MAPPER_WIN', 'FALSE', 'FILE_ATTR_FILESIZE', + 'FILE_ATTR_MODE', 'FILTER_ALL_DIRECTIONS_1', + 'FILTER_ALL_DIRECTIONS_2', 'FILTER_DIAGONALLY', + 'FILTER_HORIZONTALLY', 'FILTER_VERTICALLY', + 'FILTER_VERTICALLY_AND_HORIZONTALLY', 'FOLDER_APPDATA', + 'FOLDER_COMMON_APPDATA', 'FOLDER_COMMON_DOCS', + 'FOLDER_LOCAL_APPDATA', 'FOLDER_MI_APPDATA', + 'FOLDER_MI_COMMON_APPDATA', 'FOLDER_MI_LOCAL_APPDATA', + 'FOLDER_MI_PREFERENCE', 'FOLDER_MYDOCS', 'FOLDER_MYPICS', + 'FONT_BACKCOLOR', 'FONT_FORECOLOR', 'FONT_NAME', 'FONT_POINTSIZE', + 'FONT_STYLE', 'FRAME_INFO_BORDER_PEN', 'FRAME_INFO_COLUMN', + 'FRAME_INFO_HEIGHT', 'FRAME_INFO_LABEL', 'FRAME_INFO_MAP_LAYER_ID', + 'FRAME_INFO_NUM_STYLES', 'FRAME_INFO_POS_X', 'FRAME_INFO_POS_Y', + 'FRAME_INFO_REFRESHABLE', 'FRAME_INFO_SUBTITLE', + 'FRAME_INFO_SUBTITLE_FONT', 'FRAME_INFO_TITLE', + 'FRAME_INFO_TITLE_FONT', 'FRAME_INFO_TYPE', 'FRAME_INFO_VISIBLE', + 'FRAME_INFO_WIDTH', 'FRAME_TYPE_STYLE', 'FRAME_TYPE_THEME', + 'GEO_CONTROL_POINT_X', 'GEO_CONTROL_POINT_Y', 'GEOCODE_BATCH_SIZE', + 'GEOCODE_COUNT_GEOCODED', 'GEOCODE_COUNT_NOTGEOCODED', + 'GEOCODE_COUNTRY_SUBDIVISION', 'GEOCODE_COUNTRY_SUBDIVISION2', + 'GEOCODE_DICTIONARY', 'GEOCODE_FALLBACK_GEOGRAPHIC', + 'GEOCODE_FALLBACK_POSTAL', 'GEOCODE_MAX_BATCH_SIZE', + 'GEOCODE_MIXED_CASE', 'GEOCODE_MUNICIPALITY', + 'GEOCODE_MUNICIPALITY2', 'GEOCODE_OFFSET_CENTER', + 'GEOCODE_OFFSET_CENTER_UNITS', 'GEOCODE_OFFSET_END', + 'GEOCODE_OFFSET_END_UNITS', 'GEOCODE_PASSTHROUGH', + 'GEOCODE_POSTAL_CODE', 'GEOCODE_RESULT_MARK_MULTIPLE', + 'GEOCODE_STREET_NAME', 'GEOCODE_STREET_NUMBER', + 'GEOCODE_UNABLE_TO_CONVERT_DATA', 'GREEN', + 'GRID_TAB_INFO_HAS_HILLSHADE', 'GRID_TAB_INFO_MAX_VALUE', + 'GRID_TAB_INFO_MIN_VALUE', 'HOTLINK_INFO_ENABLED', + 'HOTLINK_INFO_EXPR', 'HOTLINK_INFO_MODE', 'HOTLINK_INFO_RELATIVE', + 'HOTLINK_MODE_BOTH', 'HOTLINK_MODE_LABEL', 'HOTLINK_MODE_OBJ', + 'IMAGE_CLASS_BILEVEL', 'IMAGE_CLASS_GREYSCALE', + 'IMAGE_CLASS_PALETTE', 'IMAGE_CLASS_RGB', 'IMAGE_TYPE_GRID', + 'IMAGE_TYPE_RASTER', 'INCL_ALL', 'INCL_COMMON', 'INCL_CROSSINGS', + 'ISOGRAM_AMBIENT_SPEED_DIST_UNIT', + 'ISOGRAM_AMBIENT_SPEED_TIME_UNIT', 'ISOGRAM_BANDING', + 'ISOGRAM_BATCH_SIZE', 'ISOGRAM_DEFAULT_AMBIENT_SPEED', + 'ISOGRAM_MAJOR_POLYGON_ONLY', 'ISOGRAM_MAJOR_ROADS_ONLY', + 'ISOGRAM_MAX_BANDS', 'ISOGRAM_MAX_BATCH_SIZE', + 'ISOGRAM_MAX_DISTANCE', 'ISOGRAM_MAX_DISTANCE_UNITS', + 'ISOGRAM_MAX_OFFROAD_DIST', 'ISOGRAM_MAX_OFFROAD_DIST_UNITS', + 'ISOGRAM_MAX_TIME', 'ISOGRAM_MAX_TIME_UNITS', + 'ISOGRAM_POINTS_ONLY', 'ISOGRAM_PROPAGATION_FACTOR', + 'ISOGRAM_RECORDS_INSERTED', 'ISOGRAM_RECORDS_NOTINSERTED', + 'ISOGRAM_RETURN_HOLES', 'ISOGRAM_SIMPLIFICATION_FACTOR', + 'LABEL_INFO_ANCHORX', 'LABEL_INFO_ANCHORY', 'LABEL_INFO_DRAWN', + 'LABEL_INFO_EDIT', 'LABEL_INFO_EDIT_ANCHOR', + 'LABEL_INFO_EDIT_ANGLE', 'LABEL_INFO_EDIT_FONT', + 'LABEL_INFO_EDIT_OFFSET', 'LABEL_INFO_EDIT_PEN', + 'LABEL_INFO_EDIT_POSITION', 'LABEL_INFO_EDIT_TEXT', + 'LABEL_INFO_EDIT_TEXTARROW', 'LABEL_INFO_EDIT_TEXTLINE', + 'LABEL_INFO_EDIT_VISIBILITY', 'LABEL_INFO_OBJECT', + 'LABEL_INFO_OFFSET', 'LABEL_INFO_ORIENTATION', + 'LABEL_INFO_POSITION', 'LABEL_INFO_ROWID', 'LABEL_INFO_SELECT', + 'LABEL_INFO_TABLE', 'LAYER_INFO_ARROWS', 'LAYER_INFO_CENTROIDS', + 'LAYER_INFO_COSMETIC', 'LAYER_INFO_DISPLAY', + 'LAYER_INFO_DISPLAY_GLOBAL', 'LAYER_INFO_DISPLAY_GRAPHIC', + 'LAYER_INFO_DISPLAY_OFF', 'LAYER_INFO_DISPLAY_VALUE', + 'LAYER_INFO_EDITABLE', 'LAYER_INFO_HOTLINK_COUNT', + 'LAYER_INFO_HOTLINK_EXPR', 'LAYER_INFO_HOTLINK_MODE', + 'LAYER_INFO_HOTLINK_RELATIVE', 'LAYER_INFO_LABEL_ALPHA', + 'LAYER_INFO_LABEL_ORIENT_CURVED', + 'LAYER_INFO_LABEL_ORIENT_HORIZONTAL', + 'LAYER_INFO_LABEL_ORIENT_PARALLEL', 'LAYER_INFO_LAYER_ALPHA', + 'LAYER_INFO_LAYER_TRANSLUCENCY', 'LAYER_INFO_LBL_AUTODISPLAY', + 'LAYER_INFO_LBL_CURFONT', 'LAYER_INFO_LBL_DUPLICATES', + 'LAYER_INFO_LBL_EXPR', 'LAYER_INFO_LBL_FONT', 'LAYER_INFO_LBL_LT', + 'LAYER_INFO_LBL_LT_ARROW', 'LAYER_INFO_LBL_LT_NONE', + 'LAYER_INFO_LBL_LT_SIMPLE', 'LAYER_INFO_LBL_MAX', + 'LAYER_INFO_LBL_OFFSET', 'LAYER_INFO_LBL_ORIENTATION', + 'LAYER_INFO_LBL_OVERLAP', 'LAYER_INFO_LBL_PARALLEL', + 'LAYER_INFO_LBL_PARTIALSEGS', 'LAYER_INFO_LBL_POS', + 'LAYER_INFO_LBL_POS_BC', 'LAYER_INFO_LBL_POS_BL', + 'LAYER_INFO_LBL_POS_BR', 'LAYER_INFO_LBL_POS_CC', + 'LAYER_INFO_LBL_POS_CL', 'LAYER_INFO_LBL_POS_CR', + 'LAYER_INFO_LBL_POS_TC', 'LAYER_INFO_LBL_POS_TL', + 'LAYER_INFO_LBL_POS_TR', 'LAYER_INFO_LBL_VIS_OFF', + 'LAYER_INFO_LBL_VIS_ON', 'LAYER_INFO_LBL_VIS_ZOOM', + 'LAYER_INFO_LBL_VISIBILITY', 'LAYER_INFO_LBL_ZOOM_MAX', + 'LAYER_INFO_LBL_ZOOM_MIN', 'LAYER_INFO_NAME', 'LAYER_INFO_NODES', + 'LAYER_INFO_OVR_BRUSH', 'LAYER_INFO_OVR_FONT', + 'LAYER_INFO_OVR_LINE', 'LAYER_INFO_OVR_PEN', + 'LAYER_INFO_OVR_SYMBOL', 'LAYER_INFO_PATH', + 'LAYER_INFO_SELECTABLE', 'LAYER_INFO_TYPE', + 'LAYER_INFO_TYPE_COSMETIC', 'LAYER_INFO_TYPE_GRID', + 'LAYER_INFO_TYPE_IMAGE', 'LAYER_INFO_TYPE_NORMAL', + 'LAYER_INFO_TYPE_THEMATIC', 'LAYER_INFO_TYPE_WMS', + 'LAYER_INFO_ZOOM_LAYERED', 'LAYER_INFO_ZOOM_MAX', + 'LAYER_INFO_ZOOM_MIN', 'LEGEND_INFO_MAP_ID', + 'LEGEND_INFO_NUM_FRAMES', 'LEGEND_INFO_ORIENTATION', + 'LEGEND_INFO_STYLE_SAMPLE_SIZE', 'LEGEND_STYLE_INFO_FONT', + 'LEGEND_STYLE_INFO_OBJ', 'LEGEND_STYLE_INFO_TEXT', + 'LOCATE_ABB_FILE', 'LOCATE_CLR_FILE', 'LOCATE_CUSTSYMB_DIR', + 'LOCATE_DEF_WOR', 'LOCATE_FNT_FILE', 'LOCATE_GEOCODE_SERVERLIST', + 'LOCATE_GRAPH_DIR', 'LOCATE_LAYOUT_TEMPLATE_DIR', + 'LOCATE_MNU_FILE', 'LOCATE_PEN_FILE', 'LOCATE_PREF_FILE', + 'LOCATE_PRJ_FILE', 'LOCATE_ROUTING_SERVERLIST', + 'LOCATE_THMTMPLT_DIR', 'LOCATE_WFS_SERVERLIST', + 'LOCATE_WMS_SERVERLIST', 'M_3DMAP_CLONE_VIEW', + 'M_3DMAP_PREVIOUS_VIEW', 'M_3DMAP_PROPERTIES', + 'M_3DMAP_REFRESH_GRID_TEXTURE', 'M_3DMAP_VIEW_ENTIRE_GRID', + 'M_3DMAP_VIEWPOINT_CONTROL', 'M_3DMAP_WIREFRAME', + 'M_ANALYZE_CALC_STATISTICS', 'M_ANALYZE_CUSTOMIZE_LEGEND', + 'M_ANALYZE_FIND', 'M_ANALYZE_FIND_SELECTION', + 'M_ANALYZE_INVERTSELECT', 'M_ANALYZE_SELECT', + 'M_ANALYZE_SELECTALL', 'M_ANALYZE_SHADE', 'M_ANALYZE_SQLQUERY', + 'M_ANALYZE_UNSELECT', 'M_BROWSE_EDIT', 'M_BROWSE_GRID', + 'M_BROWSE_NEW_RECORD', 'M_BROWSE_OPTIONS', 'M_BROWSE_PICK_FIELDS', + 'M_DBMS_OPEN_ODBC', 'M_EDIT_CLEAR', 'M_EDIT_CLEAROBJ', + 'M_EDIT_COPY', 'M_EDIT_CUT', 'M_EDIT_GETINFO', 'M_EDIT_NEW_ROW', + 'M_EDIT_PASTE', 'M_EDIT_PREFERENCES', 'M_EDIT_PREFERENCES_COUNTRY', + 'M_EDIT_PREFERENCES_FILE', 'M_EDIT_PREFERENCES_IMAGE_PROC', + 'M_EDIT_PREFERENCES_LAYOUT', 'M_EDIT_PREFERENCES_LEGEND', + 'M_EDIT_PREFERENCES_MAP', 'M_EDIT_PREFERENCES_OUTPUT', + 'M_EDIT_PREFERENCES_PATH', 'M_EDIT_PREFERENCES_PRINTER', + 'M_EDIT_PREFERENCES_STYLES', 'M_EDIT_PREFERENCES_SYSTEM', + 'M_EDIT_PREFERENCES_WEBSERVICES', 'M_EDIT_RESHAPE', 'M_EDIT_UNDO', + 'M_FILE_ABOUT', 'M_FILE_ADD_WORKSPACE', 'M_FILE_CLOSE', + 'M_FILE_CLOSE_ALL', 'M_FILE_CLOSE_ODBC', 'M_FILE_EXIT', + 'M_FILE_HELP', 'M_FILE_NEW', 'M_FILE_OPEN', 'M_FILE_OPEN_ODBC', + 'M_FILE_OPEN_ODBC_CONN', 'M_FILE_OPEN_UNIVERSAL_DATA', + 'M_FILE_OPEN_WFS', 'M_FILE_OPEN_WMS', 'M_FILE_PAGE_SETUP', + 'M_FILE_PRINT', 'M_FILE_PRINT_SETUP', 'M_FILE_REVERT', + 'M_FILE_RUN', 'M_FILE_SAVE', 'M_FILE_SAVE_COPY_AS', + 'M_FILE_SAVE_QUERY', 'M_FILE_SAVE_WINDOW_AS', + 'M_FILE_SAVE_WORKSPACE', 'M_FORMAT_CUSTOM_COLORS', + 'M_FORMAT_PICK_FILL', 'M_FORMAT_PICK_FONT', 'M_FORMAT_PICK_LINE', + 'M_FORMAT_PICK_SYMBOL', 'M_GRAPH_3D_VIEWING_ANGLE', + 'M_GRAPH_FORMATING', 'M_GRAPH_GENERAL_OPTIONS', + 'M_GRAPH_GRID_SCALES', 'M_GRAPH_LABEL_AXIS', + 'M_GRAPH_SAVE_AS_TEMPLATE', 'M_GRAPH_SERIES', + 'M_GRAPH_SERIES_OPTIONS', 'M_GRAPH_TITLES', 'M_GRAPH_TYPE', + 'M_GRAPH_VALUE_AXIS', 'M_HELP_ABOUT', 'M_HELP_CHECK_FOR_UPDATE', + 'M_HELP_CONNECT_MIFORUM', 'M_HELP_CONTENTS', + 'M_HELP_CONTEXTSENSITIVE', 'M_HELP_HELPMODE', + 'M_HELP_MAPINFO_3DGRAPH_HELP', 'M_HELP_MAPINFO_CONNECT_SERVICES', + 'M_HELP_MAPINFO_WWW', 'M_HELP_MAPINFO_WWW_STORE', + 'M_HELP_MAPINFO_WWW_TUTORIAL', 'M_HELP_SEARCH', + 'M_HELP_TECHSUPPORT', 'M_HELP_USE_HELP', 'M_LAYOUT_ACTUAL', + 'M_LAYOUT_ALIGN', 'M_LAYOUT_AUTOSCROLL_ONOFF', + 'M_LAYOUT_BRING2FRONT', 'M_LAYOUT_CHANGE_VIEW', + 'M_LAYOUT_DISPLAYOPTIONS', 'M_LAYOUT_DROPSHADOWS', + 'M_LAYOUT_ENTIRE', 'M_LAYOUT_LAYOUT_SIZE', 'M_LAYOUT_PREVIOUS', + 'M_LAYOUT_SEND2BACK', 'M_LEGEND_ADD_FRAMES', 'M_LEGEND_DELETE', + 'M_LEGEND_PROPERTIES', 'M_LEGEND_REFRESH', 'M_MAP_AUTOLABEL', + 'M_MAP_AUTOSCROLL_ONOFF', 'M_MAP_CHANGE_VIEW', + 'M_MAP_CLEAR_COSMETIC', 'M_MAP_CLEAR_CUSTOM_LABELS', + 'M_MAP_CLIP_REGION_ONOFF', 'M_MAP_CLONE_MAPPER', + 'M_MAP_CREATE_3DMAP', 'M_MAP_CREATE_LEGEND', + 'M_MAP_CREATE_PRISMMAP', 'M_MAP_ENTIRE_LAYER', + 'M_MAP_LAYER_CONTROL', 'M_MAP_MODIFY_THEMATIC', 'M_MAP_OPTIONS', + 'M_MAP_PREVIOUS', 'M_MAP_PROJECTION', 'M_MAP_SAVE_COSMETIC', + 'M_MAP_SET_CLIP_REGION', 'M_MAP_SETUNITS', 'M_MAP_SETUPDIGITIZER', + 'M_MAP_THEMATIC', 'M_MAPBASIC_CLEAR', 'M_MAPBASIC_SAVECONTENTS', + 'M_OBJECTS_BREAKPOLY', 'M_OBJECTS_BUFFER', + 'M_OBJECTS_CHECK_REGIONS', 'M_OBJECTS_CLEAN', + 'M_OBJECTS_CLEAR_TARGET', 'M_OBJECTS_COMBINE', + 'M_OBJECTS_CONVEX_HULL', 'M_OBJECTS_CVT_PGON', + 'M_OBJECTS_CVT_PLINE', 'M_OBJECTS_DISAGG', + 'M_OBJECTS_DRIVE_REGION', 'M_OBJECTS_ENCLOSE', 'M_OBJECTS_ERASE', + 'M_OBJECTS_ERASE_OUT', 'M_OBJECTS_MERGE', 'M_OBJECTS_OFFSET', + 'M_OBJECTS_OVERLAY', 'M_OBJECTS_POLYLINE_SPLIT', + 'M_OBJECTS_POLYLINE_SPLIT_AT_NODE', 'M_OBJECTS_RESHAPE', + 'M_OBJECTS_ROTATE', 'M_OBJECTS_SET_TARGET', 'M_OBJECTS_SMOOTH', + 'M_OBJECTS_SNAP', 'M_OBJECTS_SPLIT', 'M_OBJECTS_UNSMOOTH', + 'M_OBJECTS_VORONOI', 'M_ORACLE_CREATE_WORKSPACE', + 'M_ORACLE_DELETE_WORKSPACE', 'M_ORACLE_MERGE_PARENT', + 'M_ORACLE_REFRESH_FROM_PARENT', 'M_ORACLE_VERSION_ENABLE_OFF', + 'M_ORACLE_VERSION_ENABLE_ON', 'M_QUERY_CALC_STATISTICS', + 'M_QUERY_FIND', 'M_QUERY_FIND_ADDRESS', 'M_QUERY_FIND_SELECTION', + 'M_QUERY_FIND_SELECTION_CURRENT_MAP', 'M_QUERY_INVERTSELECT', + 'M_QUERY_SELECT', 'M_QUERY_SELECTALL', 'M_QUERY_SQLQUERY', + 'M_QUERY_UNSELECT', 'M_REDISTRICT_ADD', 'M_REDISTRICT_ASSIGN', + 'M_REDISTRICT_DELETE', 'M_REDISTRICT_OPTIONS', + 'M_REDISTRICT_TARGET', 'M_SENDMAIL_CURRENTWINDOW', + 'M_SENDMAIL_WORKSPACE', 'M_TABLE_APPEND', 'M_TABLE_BUFFER', + 'M_TABLE_CHANGESYMBOL', 'M_TABLE_CREATE_POINTS', 'M_TABLE_DELETE', + 'M_TABLE_DRIVE_REGION', 'M_TABLE_EXPORT', 'M_TABLE_GEOCODE', + 'M_TABLE_IMPORT', 'M_TABLE_MAKEMAPPABLE', + 'M_TABLE_MERGE_USING_COLUMN', 'M_TABLE_MODIFY_STRUCTURE', + 'M_TABLE_PACK', 'M_TABLE_RASTER_REG', 'M_TABLE_RASTER_STYLE', + 'M_TABLE_REFRESH', 'M_TABLE_RENAME', + 'M_TABLE_UNIVERSAL_DATA_REFRESH', 'M_TABLE_UNLINK', + 'M_TABLE_UPDATE_COLUMN', 'M_TABLE_VORONOI', 'M_TABLE_WEB_GEOCODE', + 'M_TABLE_WFS_PROPS', 'M_TABLE_WFS_REFRESH', 'M_TABLE_WMS_PROPS', + 'M_TOOLS_ADD_NODE', 'M_TOOLS_ARC', 'M_TOOLS_CRYSTAL_REPORTS_NEW', + 'M_TOOLS_CRYSTAL_REPORTS_OPEN', 'M_TOOLS_DRAGWINDOW', + 'M_TOOLS_ELLIPSE', 'M_TOOLS_EXPAND', 'M_TOOLS_FRAME', + 'M_TOOLS_HOTLINK', 'M_TOOLS_LABELER', 'M_TOOLS_LINE', + 'M_TOOLS_MAPBASIC', 'M_TOOLS_PNT_QUERY', 'M_TOOLS_POINT', + 'M_TOOLS_POLYGON', 'M_TOOLS_POLYLINE', 'M_TOOLS_RASTER_REG', + 'M_TOOLS_RECENTER', 'M_TOOLS_RECTANGLE', 'M_TOOLS_ROUNDEDRECT', + 'M_TOOLS_RULER', 'M_TOOLS_RUN', 'M_TOOLS_SEARCH_BOUNDARY', + 'M_TOOLS_SEARCH_POLYGON', 'M_TOOLS_SEARCH_RADIUS', + 'M_TOOLS_SEARCH_RECT', 'M_TOOLS_SELECTOR', 'M_TOOLS_SHRINK', + 'M_TOOLS_TEXT', 'M_TOOLS_TOOL_MANAGER', 'M_WINDOW_ARRANGEICONS', + 'M_WINDOW_BROWSE', 'M_WINDOW_BUTTONPAD', 'M_WINDOW_CASCADE', + 'M_WINDOW_EXPORT_WINDOW', 'M_WINDOW_FIRST', 'M_WINDOW_GRAPH', + 'M_WINDOW_LAYOUT', 'M_WINDOW_LEGEND', 'M_WINDOW_MAP', + 'M_WINDOW_MAPBASIC', 'M_WINDOW_MORE', 'M_WINDOW_REDISTRICT', + 'M_WINDOW_REDRAW', 'M_WINDOW_STATISTICS', 'M_WINDOW_STATUSBAR', + 'M_WINDOW_TILE', 'M_WINDOW_TOOL_PALETTE', 'MAGENTA', + 'MAP3D_INFO_BACKGROUND', 'MAP3D_INFO_CAMERA_CLIP_FAR', + 'MAP3D_INFO_CAMERA_CLIP_NEAR', 'MAP3D_INFO_CAMERA_FOCAL_X', + 'MAP3D_INFO_CAMERA_FOCAL_Y', 'MAP3D_INFO_CAMERA_FOCAL_Z', + 'MAP3D_INFO_CAMERA_VPN_1', 'MAP3D_INFO_CAMERA_VPN_2', + 'MAP3D_INFO_CAMERA_VPN_3', 'MAP3D_INFO_CAMERA_VU_1', + 'MAP3D_INFO_CAMERA_VU_2', 'MAP3D_INFO_CAMERA_VU_3', + 'MAP3D_INFO_CAMERA_X', 'MAP3D_INFO_CAMERA_Y', + 'MAP3D_INFO_CAMERA_Z', 'MAP3D_INFO_LIGHT_COLOR', + 'MAP3D_INFO_LIGHT_X', 'MAP3D_INFO_LIGHT_Y', 'MAP3D_INFO_LIGHT_Z', + 'MAP3D_INFO_RESOLUTION_X', 'MAP3D_INFO_RESOLUTION_Y', + 'MAP3D_INFO_SCALE', 'MAP3D_INFO_UNITS', 'MAPPER_INFO_AREAUNITS', + 'MAPPER_INFO_CENTERX', 'MAPPER_INFO_CENTERY', + 'MAPPER_INFO_CLIP_DISPLAY_ALL', 'MAPPER_INFO_CLIP_DISPLAY_POLYOBJ', + 'MAPPER_INFO_CLIP_OVERLAY', 'MAPPER_INFO_CLIP_REGION', + 'MAPPER_INFO_CLIP_TYPE', 'MAPPER_INFO_COORDSYS_CLAUSE', + 'MAPPER_INFO_COORDSYS_CLAUSE_WITH_BOUNDS', + 'MAPPER_INFO_COORDSYS_NAME', 'MAPPER_INFO_DISPLAY', + 'MAPPER_INFO_DISPLAY_DECIMAL', 'MAPPER_INFO_DISPLAY_DEGMINSEC', + 'MAPPER_INFO_DISPLAY_DMS', 'MAPPER_INFO_DISPLAY_MGRS', + 'MAPPER_INFO_DISPLAY_POSITION', 'MAPPER_INFO_DISPLAY_SCALE', + 'MAPPER_INFO_DISPLAY_ZOOM', 'MAPPER_INFO_DIST_CALC_TYPE', + 'MAPPER_INFO_DIST_CARTESIAN', 'MAPPER_INFO_DIST_SPHERICAL', + 'MAPPER_INFO_DISTUNITS', 'MAPPER_INFO_EDIT_LAYER', + 'MAPPER_INFO_LAYERS', 'MAPPER_INFO_MAXX', 'MAPPER_INFO_MAXY', + 'MAPPER_INFO_MERGE_MAP', 'MAPPER_INFO_MINX', 'MAPPER_INFO_MINY', + 'MAPPER_INFO_MOVE_DUPLICATE_NODES', 'MAPPER_INFO_NUM_THEMATIC', + 'MAPPER_INFO_REPROJECTION', 'MAPPER_INFO_RESAMPLING', + 'MAPPER_INFO_SCALE', 'MAPPER_INFO_SCROLLBARS', + 'MAPPER_INFO_XYUNITS', 'MAPPER_INFO_ZOOM', 'MAX_STRING_LENGTH', + 'MENUITEM_INFO_ACCELERATOR', 'MENUITEM_INFO_CHECKABLE', + 'MENUITEM_INFO_CHECKED', 'MENUITEM_INFO_ENABLED', + 'MENUITEM_INFO_HANDLER', 'MENUITEM_INFO_HELPMSG', + 'MENUITEM_INFO_ID', 'MENUITEM_INFO_SHOWHIDEABLE', + 'MENUITEM_INFO_TEXT', 'MI_CURSOR_ARROW', 'MI_CURSOR_CHANGE_WIDTH', + 'MI_CURSOR_CROSSHAIR', 'MI_CURSOR_DRAG_OBJ', + 'MI_CURSOR_FINGER_LEFT', 'MI_CURSOR_FINGER_UP', + 'MI_CURSOR_GRABBER', 'MI_CURSOR_IBEAM', 'MI_CURSOR_IBEAM_CROSS', + 'MI_CURSOR_ZOOM_IN', 'MI_CURSOR_ZOOM_OUT', 'MI_ICON_ADD_NODE', + 'MI_ICON_ARC', 'MI_ICON_ARROW', 'MI_ICON_ARROW_1', + 'MI_ICON_ARROW_10', 'MI_ICON_ARROW_11', 'MI_ICON_ARROW_12', + 'MI_ICON_ARROW_13', 'MI_ICON_ARROW_14', 'MI_ICON_ARROW_15', + 'MI_ICON_ARROW_16', 'MI_ICON_ARROW_17', 'MI_ICON_ARROW_18', + 'MI_ICON_ARROW_19', 'MI_ICON_ARROW_2', 'MI_ICON_ARROW_20', + 'MI_ICON_ARROW_21', 'MI_ICON_ARROW_3', 'MI_ICON_ARROW_4', + 'MI_ICON_ARROW_5', 'MI_ICON_ARROW_6', 'MI_ICON_ARROW_7', + 'MI_ICON_ARROW_8', 'MI_ICON_ARROW_9', 'MI_ICON_CLIP_MODE', + 'MI_ICON_CLIP_REGION', 'MI_ICON_CLOSE_ALL', + 'MI_ICON_COMMUNICATION_1', 'MI_ICON_COMMUNICATION_10', + 'MI_ICON_COMMUNICATION_11', 'MI_ICON_COMMUNICATION_12', + 'MI_ICON_COMMUNICATION_2', 'MI_ICON_COMMUNICATION_3', + 'MI_ICON_COMMUNICATION_4', 'MI_ICON_COMMUNICATION_5', + 'MI_ICON_COMMUNICATION_6', 'MI_ICON_COMMUNICATION_7', + 'MI_ICON_COMMUNICATION_8', 'MI_ICON_COMMUNICATION_9', + 'MI_ICON_COMPASS_CIRCLE_TA', 'MI_ICON_COMPASS_CONTRACT', + 'MI_ICON_COMPASS_EXPAND', 'MI_ICON_COMPASS_POLY_TA', + 'MI_ICON_COMPASS_TAG', 'MI_ICON_COMPASS_UNTAG', 'MI_ICON_COPY', + 'MI_ICON_CROSSHAIR', 'MI_ICON_CUT', 'MI_ICON_DISTRICT_MANY', + 'MI_ICON_DISTRICT_SAME', 'MI_ICON_DRAG_HANDLE', 'MI_ICON_ELLIPSE', + 'MI_ICON_EMERGENCY_1', 'MI_ICON_EMERGENCY_10', + 'MI_ICON_EMERGENCY_11', 'MI_ICON_EMERGENCY_12', + 'MI_ICON_EMERGENCY_13', 'MI_ICON_EMERGENCY_14', + 'MI_ICON_EMERGENCY_15', 'MI_ICON_EMERGENCY_16', + 'MI_ICON_EMERGENCY_17', 'MI_ICON_EMERGENCY_18', + 'MI_ICON_EMERGENCY_2', 'MI_ICON_EMERGENCY_3', + 'MI_ICON_EMERGENCY_4', 'MI_ICON_EMERGENCY_5', + 'MI_ICON_EMERGENCY_6', 'MI_ICON_EMERGENCY_7', + 'MI_ICON_EMERGENCY_8', 'MI_ICON_EMERGENCY_9', 'MI_ICON_GRABBER', + 'MI_ICON_GRAPH_SELECT', 'MI_ICON_HELP', 'MI_ICON_HOT_LINK', + 'MI_ICON_INFO', 'MI_ICON_INVERTSELECT', 'MI_ICON_LABEL', + 'MI_ICON_LAYERS', 'MI_ICON_LEGEND', 'MI_ICON_LETTERS_A', + 'MI_ICON_LETTERS_B', 'MI_ICON_LETTERS_C', 'MI_ICON_LETTERS_D', + 'MI_ICON_LETTERS_E', 'MI_ICON_LETTERS_F', 'MI_ICON_LETTERS_G', + 'MI_ICON_LETTERS_H', 'MI_ICON_LETTERS_I', 'MI_ICON_LETTERS_J', + 'MI_ICON_LETTERS_K', 'MI_ICON_LETTERS_L', 'MI_ICON_LETTERS_M', + 'MI_ICON_LETTERS_N', 'MI_ICON_LETTERS_O', 'MI_ICON_LETTERS_P', + 'MI_ICON_LETTERS_Q', 'MI_ICON_LETTERS_R', 'MI_ICON_LETTERS_S', + 'MI_ICON_LETTERS_T', 'MI_ICON_LETTERS_U', 'MI_ICON_LETTERS_V', + 'MI_ICON_LETTERS_W', 'MI_ICON_LETTERS_X', 'MI_ICON_LETTERS_Y', + 'MI_ICON_LETTERS_Z', 'MI_ICON_LINE', 'MI_ICON_LINE_STYLE', + 'MI_ICON_MAPSYMB_1', 'MI_ICON_MAPSYMB_10', 'MI_ICON_MAPSYMB_11', + 'MI_ICON_MAPSYMB_12', 'MI_ICON_MAPSYMB_13', 'MI_ICON_MAPSYMB_14', + 'MI_ICON_MAPSYMB_15', 'MI_ICON_MAPSYMB_16', 'MI_ICON_MAPSYMB_17', + 'MI_ICON_MAPSYMB_18', 'MI_ICON_MAPSYMB_19', 'MI_ICON_MAPSYMB_2', + 'MI_ICON_MAPSYMB_20', 'MI_ICON_MAPSYMB_21', 'MI_ICON_MAPSYMB_22', + 'MI_ICON_MAPSYMB_23', 'MI_ICON_MAPSYMB_24', 'MI_ICON_MAPSYMB_25', + 'MI_ICON_MAPSYMB_26', 'MI_ICON_MAPSYMB_3', 'MI_ICON_MAPSYMB_4', + 'MI_ICON_MAPSYMB_5', 'MI_ICON_MAPSYMB_6', 'MI_ICON_MAPSYMB_7', + 'MI_ICON_MAPSYMB_8', 'MI_ICON_MAPSYMB_9', 'MI_ICON_MARITIME_1', + 'MI_ICON_MARITIME_10', 'MI_ICON_MARITIME_2', 'MI_ICON_MARITIME_3', + 'MI_ICON_MARITIME_4', 'MI_ICON_MARITIME_5', 'MI_ICON_MARITIME_6', + 'MI_ICON_MARITIME_7', 'MI_ICON_MARITIME_8', 'MI_ICON_MARITIME_9', + 'MI_ICON_MB_1', 'MI_ICON_MB_10', 'MI_ICON_MB_11', 'MI_ICON_MB_12', + 'MI_ICON_MB_13', 'MI_ICON_MB_14', 'MI_ICON_MB_2', 'MI_ICON_MB_3', + 'MI_ICON_MB_4', 'MI_ICON_MB_5', 'MI_ICON_MB_6', 'MI_ICON_MB_7', + 'MI_ICON_MB_8', 'MI_ICON_MB_9', 'MI_ICON_MISC_1', + 'MI_ICON_MISC_10', 'MI_ICON_MISC_11', 'MI_ICON_MISC_12', + 'MI_ICON_MISC_13', 'MI_ICON_MISC_14', 'MI_ICON_MISC_15', + 'MI_ICON_MISC_16', 'MI_ICON_MISC_17', 'MI_ICON_MISC_18', + 'MI_ICON_MISC_19', 'MI_ICON_MISC_2', 'MI_ICON_MISC_20', + 'MI_ICON_MISC_21', 'MI_ICON_MISC_22', 'MI_ICON_MISC_23', + 'MI_ICON_MISC_24', 'MI_ICON_MISC_25', 'MI_ICON_MISC_26', + 'MI_ICON_MISC_27', 'MI_ICON_MISC_28', 'MI_ICON_MISC_29', + 'MI_ICON_MISC_3', 'MI_ICON_MISC_30', 'MI_ICON_MISC_31', + 'MI_ICON_MISC_4', 'MI_ICON_MISC_5', 'MI_ICON_MISC_6', + 'MI_ICON_MISC_7', 'MI_ICON_MISC_8', 'MI_ICON_MISC_9', + 'MI_ICON_NEW_DOC', 'MI_ICON_NUMBERS_1', 'MI_ICON_NUMBERS_10', + 'MI_ICON_NUMBERS_11', 'MI_ICON_NUMBERS_12', 'MI_ICON_NUMBERS_13', + 'MI_ICON_NUMBERS_14', 'MI_ICON_NUMBERS_15', 'MI_ICON_NUMBERS_16', + 'MI_ICON_NUMBERS_17', 'MI_ICON_NUMBERS_18', 'MI_ICON_NUMBERS_19', + 'MI_ICON_NUMBERS_2', 'MI_ICON_NUMBERS_20', 'MI_ICON_NUMBERS_21', + 'MI_ICON_NUMBERS_22', 'MI_ICON_NUMBERS_23', 'MI_ICON_NUMBERS_24', + 'MI_ICON_NUMBERS_25', 'MI_ICON_NUMBERS_26', 'MI_ICON_NUMBERS_27', + 'MI_ICON_NUMBERS_28', 'MI_ICON_NUMBERS_29', 'MI_ICON_NUMBERS_3', + 'MI_ICON_NUMBERS_30', 'MI_ICON_NUMBERS_31', 'MI_ICON_NUMBERS_32', + 'MI_ICON_NUMBERS_4', 'MI_ICON_NUMBERS_5', 'MI_ICON_NUMBERS_6', + 'MI_ICON_NUMBERS_7', 'MI_ICON_NUMBERS_8', 'MI_ICON_NUMBERS_9', + 'MI_ICON_ODBC_DISCONNECT', 'MI_ICON_ODBC_MAPPABLE', + 'MI_ICON_ODBC_OPEN', 'MI_ICON_ODBC_REFRESH', 'MI_ICON_ODBC_SYMBOL', + 'MI_ICON_ODBC_UNLINK', 'MI_ICON_OPEN_FILE', 'MI_ICON_OPEN_WOR', + 'MI_ICON_OPENWFS', 'MI_ICON_OPENWMS', 'MI_ICON_PASTE', + 'MI_ICON_POLYGON', 'MI_ICON_POLYLINE', 'MI_ICON_PRINT', + 'MI_ICON_REALESTATE_1', 'MI_ICON_REALESTATE_10', + 'MI_ICON_REALESTATE_11', 'MI_ICON_REALESTATE_12', + 'MI_ICON_REALESTATE_13', 'MI_ICON_REALESTATE_14', + 'MI_ICON_REALESTATE_15', 'MI_ICON_REALESTATE_16', + 'MI_ICON_REALESTATE_17', 'MI_ICON_REALESTATE_18', + 'MI_ICON_REALESTATE_19', 'MI_ICON_REALESTATE_2', + 'MI_ICON_REALESTATE_20', 'MI_ICON_REALESTATE_21', + 'MI_ICON_REALESTATE_22', 'MI_ICON_REALESTATE_23', + 'MI_ICON_REALESTATE_3', 'MI_ICON_REALESTATE_4', + 'MI_ICON_REALESTATE_5', 'MI_ICON_REALESTATE_6', + 'MI_ICON_REALESTATE_7', 'MI_ICON_REALESTATE_8', + 'MI_ICON_REALESTATE_9', 'MI_ICON_RECT', 'MI_ICON_REGION_STYLE', + 'MI_ICON_RESHAPE', 'MI_ICON_ROUND_RECT', 'MI_ICON_RULER', + 'MI_ICON_RUN', 'MI_ICON_SAVE_FILE', 'MI_ICON_SAVE_WIN', + 'MI_ICON_SAVE_WOR', 'MI_ICON_SEARCH_BDY', 'MI_ICON_SEARCH_POLYGON', + 'MI_ICON_SEARCH_RADIUS', 'MI_ICON_SEARCH_RECT', 'MI_ICON_SIGNS_1', + 'MI_ICON_SIGNS_10', 'MI_ICON_SIGNS_11', 'MI_ICON_SIGNS_12', + 'MI_ICON_SIGNS_13', 'MI_ICON_SIGNS_14', 'MI_ICON_SIGNS_15', + 'MI_ICON_SIGNS_16', 'MI_ICON_SIGNS_17', 'MI_ICON_SIGNS_18', + 'MI_ICON_SIGNS_19', 'MI_ICON_SIGNS_2', 'MI_ICON_SIGNS_3', + 'MI_ICON_SIGNS_4', 'MI_ICON_SIGNS_5', 'MI_ICON_SIGNS_6', + 'MI_ICON_SIGNS_7', 'MI_ICON_SIGNS_8', 'MI_ICON_SIGNS_9', + 'MI_ICON_STATISTICS', 'MI_ICON_SYMBOL', 'MI_ICON_SYMBOL_STYLE', + 'MI_ICON_TEXT', 'MI_ICON_TEXT_STYLE', 'MI_ICON_TRANSPORT_1', + 'MI_ICON_TRANSPORT_10', 'MI_ICON_TRANSPORT_11', + 'MI_ICON_TRANSPORT_12', 'MI_ICON_TRANSPORT_13', + 'MI_ICON_TRANSPORT_14', 'MI_ICON_TRANSPORT_15', + 'MI_ICON_TRANSPORT_16', 'MI_ICON_TRANSPORT_17', + 'MI_ICON_TRANSPORT_18', 'MI_ICON_TRANSPORT_19', + 'MI_ICON_TRANSPORT_2', 'MI_ICON_TRANSPORT_20', + 'MI_ICON_TRANSPORT_21', 'MI_ICON_TRANSPORT_22', + 'MI_ICON_TRANSPORT_23', 'MI_ICON_TRANSPORT_24', + 'MI_ICON_TRANSPORT_25', 'MI_ICON_TRANSPORT_26', + 'MI_ICON_TRANSPORT_27', 'MI_ICON_TRANSPORT_3', + 'MI_ICON_TRANSPORT_4', 'MI_ICON_TRANSPORT_5', + 'MI_ICON_TRANSPORT_6', 'MI_ICON_TRANSPORT_7', + 'MI_ICON_TRANSPORT_8', 'MI_ICON_TRANSPORT_9', 'MI_ICON_UNDO', + 'MI_ICON_UNSELECT_ALL', 'MI_ICON_WINDOW_FRAME', 'MI_ICON_WRENCH', + 'MI_ICON_ZOOM_IN', 'MI_ICON_ZOOM_OUT', 'MI_ICON_ZOOM_QUESTION', + 'MI_ICONS_MAPS_1', 'MI_ICONS_MAPS_10', 'MI_ICONS_MAPS_11', + 'MI_ICONS_MAPS_12', 'MI_ICONS_MAPS_13', 'MI_ICONS_MAPS_14', + 'MI_ICONS_MAPS_15', 'MI_ICONS_MAPS_2', 'MI_ICONS_MAPS_3', + 'MI_ICONS_MAPS_4', 'MI_ICONS_MAPS_5', 'MI_ICONS_MAPS_6', + 'MI_ICONS_MAPS_7', 'MI_ICONS_MAPS_8', 'MI_ICONS_MAPS_9', + 'MIPLATFORM_HP', 'MIPLATFORM_MAC68K', 'MIPLATFORM_POWERMAC', + 'MIPLATFORM_SPECIAL', 'MIPLATFORM_SUN', 'MIPLATFORM_WIN16', + 'MIPLATFORM_WIN32', 'MODE_APPEND', 'MODE_BINARY', 'MODE_INPUT', + 'MODE_OUTPUT', 'MODE_RANDOM', 'OBJ_ARC', 'OBJ_ELLIPSE', + 'OBJ_FRAME', 'OBJ_GEO_ARCBEGANGLE', 'OBJ_GEO_ARCENDANGLE', + 'OBJ_GEO_CENTROID', 'OBJ_GEO_LINEBEGX', 'OBJ_GEO_LINEBEGY', + 'OBJ_GEO_LINEENDX', 'OBJ_GEO_LINEENDY', 'OBJ_GEO_MAXX', + 'OBJ_GEO_MAXY', 'OBJ_GEO_MINX', 'OBJ_GEO_MINY', 'OBJ_GEO_POINTM', + 'OBJ_GEO_POINTX', 'OBJ_GEO_POINTY', 'OBJ_GEO_POINTZ', + 'OBJ_GEO_ROUNDRADIUS', 'OBJ_GEO_TEXTANGLE', 'OBJ_GEO_TEXTLINEX', + 'OBJ_GEO_TEXTLINEY', 'OBJ_INFO_BRUSH', 'OBJ_INFO_FILLFRAME', + 'OBJ_INFO_FRAMETITLE', 'OBJ_INFO_FRAMEWIN', 'OBJ_INFO_HAS_M', + 'OBJ_INFO_HAS_Z', 'OBJ_INFO_MPOINT', 'OBJ_INFO_NONEMPTY', + 'OBJ_INFO_NPNTS', 'OBJ_INFO_NPOLYGONS', 'OBJ_INFO_PEN', + 'OBJ_INFO_PLINE', 'OBJ_INFO_REGION', 'OBJ_INFO_SMOOTH', + 'OBJ_INFO_SYMBOL', 'OBJ_INFO_TEXTARROW', 'OBJ_INFO_TEXTFONT', + 'OBJ_INFO_TEXTJUSTIFY', 'OBJ_INFO_TEXTSPACING', + 'OBJ_INFO_TEXTSTRING', 'OBJ_INFO_TYPE', 'OBJ_INFO_Z_UNIT', + 'OBJ_INFO_Z_UNIT_SET', 'OBJ_LINE', 'OBJ_PLINE', 'OBJ_POINT', + 'OBJ_RECT', 'OBJ_REGION', 'OBJ_ROUNDRECT', 'OBJ_TEXT', + 'OBJ_TYPE_ARC', 'OBJ_TYPE_COLLECTION', 'OBJ_TYPE_ELLIPSE', + 'OBJ_TYPE_FRAME', 'OBJ_TYPE_LINE', 'OBJ_TYPE_MPOINT', + 'OBJ_TYPE_PLINE', 'OBJ_TYPE_POINT', 'OBJ_TYPE_RECT', + 'OBJ_TYPE_REGION', 'OBJ_TYPE_ROUNDRECT', 'OBJ_TYPE_TEXT', + 'ORIENTATION_CUSTOM', 'ORIENTATION_LANDSCAPE', + 'ORIENTATION_PORTRAIT', 'PEN_COLOR', 'PEN_INDEX', + 'PEN_INTERLEAVED', 'PEN_PATTERN', 'PEN_WIDTH', 'PLATFORM_MAC', + 'PLATFORM_MOTIF', 'PLATFORM_SPECIAL', 'PLATFORM_WIN', + 'PLATFORM_X11', 'PLATFORM_XOL', 'PRISMMAP_INFO_BACKGROUND', + 'PRISMMAP_INFO_CAMERA_CLIP_FAR', 'PRISMMAP_INFO_CAMERA_CLIP_NEAR', + 'PRISMMAP_INFO_CAMERA_FOCAL_X', 'PRISMMAP_INFO_CAMERA_FOCAL_Y', + 'PRISMMAP_INFO_CAMERA_FOCAL_Z', 'PRISMMAP_INFO_CAMERA_VPN_1', + 'PRISMMAP_INFO_CAMERA_VPN_2', 'PRISMMAP_INFO_CAMERA_VPN_3', + 'PRISMMAP_INFO_CAMERA_VU_1', 'PRISMMAP_INFO_CAMERA_VU_2', + 'PRISMMAP_INFO_CAMERA_VU_3', 'PRISMMAP_INFO_CAMERA_X', + 'PRISMMAP_INFO_CAMERA_Y', 'PRISMMAP_INFO_CAMERA_Z', + 'PRISMMAP_INFO_INFOTIP_EXPR', 'PRISMMAP_INFO_LIGHT_COLOR', + 'PRISMMAP_INFO_LIGHT_X', 'PRISMMAP_INFO_LIGHT_Y', + 'PRISMMAP_INFO_LIGHT_Z', 'PRISMMAP_INFO_SCALE', 'RAD_2_DEG', + 'RASTER_CONTROL_POINT_X', 'RASTER_CONTROL_POINT_Y', + 'RASTER_TAB_INFO_ALPHA', 'RASTER_TAB_INFO_BITS_PER_PIXEL', + 'RASTER_TAB_INFO_BRIGHTNESS', 'RASTER_TAB_INFO_CONTRAST', + 'RASTER_TAB_INFO_DISPLAY_TRANSPARENT', 'RASTER_TAB_INFO_GREYSCALE', + 'RASTER_TAB_INFO_HEIGHT', 'RASTER_TAB_INFO_IMAGE_CLASS', + 'RASTER_TAB_INFO_IMAGE_NAME', 'RASTER_TAB_INFO_IMAGE_TYPE', + 'RASTER_TAB_INFO_NUM_CONTROL_POINTS', + 'RASTER_TAB_INFO_TRANSPARENT_COLOR', 'RASTER_TAB_INFO_WIDTH', + 'RED', 'REGION_INFO_IS_CLOCKWISE', 'SEARCH_INFO_ROW', + 'SEARCH_INFO_TABLE', 'SECONDS_PER_DAY', 'SEL_INFO_NROWS', + 'SEL_INFO_SELNAME', 'SEL_INFO_TABLENAME', + 'SESSION_INFO_AREA_UNITS', 'SESSION_INFO_COORDSYS_CLAUSE', + 'SESSION_INFO_DISTANCE_UNITS', 'SESSION_INFO_PAPER_UNITS', + 'SRV_COL_INFO_ALIAS', 'SRV_COL_INFO_NAME', + 'SRV_COL_INFO_PRECISION', 'SRV_COL_INFO_SCALE', + 'SRV_COL_INFO_STATUS', 'SRV_COL_INFO_TYPE', 'SRV_COL_INFO_VALUE', + 'SRV_COL_INFO_WIDTH', 'SRV_COL_TYPE_BIN_STRING', + 'SRV_COL_TYPE_CHAR', 'SRV_COL_TYPE_DATE', 'SRV_COL_TYPE_DECIMAL', + 'SRV_COL_TYPE_FIXED_LEN_STRING', 'SRV_COL_TYPE_FLOAT', + 'SRV_COL_TYPE_INTEGER', 'SRV_COL_TYPE_LOGICAL', + 'SRV_COL_TYPE_NONE', 'SRV_COL_TYPE_SMALLINT', + 'SRV_CONNECT_INFO_DB_NAME', 'SRV_CONNECT_INFO_DRIVER_NAME', + 'SRV_CONNECT_INFO_DS_NAME', 'SRV_CONNECT_INFO_QUOTE_CHAR', + 'SRV_CONNECT_INFO_SQL_USER_ID', 'SRV_DRV_DATA_SOURCE', + 'SRV_DRV_INFO_NAME', 'SRV_DRV_INFO_NAME_LIST', 'SRV_ERROR', + 'SRV_FETCH_FIRST', 'SRV_FETCH_LAST', 'SRV_FETCH_NEXT', + 'SRV_FETCH_PREV', 'SRV_INVALID_HANDLE', 'SRV_NEED_DATA', + 'SRV_NO_MORE_DATA', 'SRV_NULL_DATA', 'SRV_SUCCESS', + 'SRV_SUCCESS_WITH_INFO', 'SRV_TRUNCATED_DATA', + 'SRV_WM_HIST_NO_OVERWRITE', 'SRV_WM_HIST_NONE', + 'SRV_WM_HIST_OVERWRITE', 'STR_EQ', 'STR_GT', 'STR_LT', + 'STYLE_SAMPLE_SIZE_LARGE', 'STYLE_SAMPLE_SIZE_SMALL', + 'SWITCHING_INTO_MAPINFO', 'SWITCHING_OUT_OF_MAPINFO', + 'SYMBOL_ANGLE', 'SYMBOL_CODE', 'SYMBOL_COLOR', + 'SYMBOL_CUSTOM_NAME', 'SYMBOL_CUSTOM_STYLE', 'SYMBOL_FONT_NAME', + 'SYMBOL_FONT_STYLE', 'SYMBOL_KIND', 'SYMBOL_KIND_CUSTOM', + 'SYMBOL_KIND_FONT', 'SYMBOL_KIND_VECTOR', 'SYMBOL_POINTSIZE', + 'SYS_INFO_APPIDISPATCH', 'SYS_INFO_APPLICATIONWND', + 'SYS_INFO_APPVERSION', 'SYS_INFO_CHARSET', + 'SYS_INFO_COPYPROTECTED', 'SYS_INFO_DATE_FORMAT', + 'SYS_INFO_DDESTATUS', 'SYS_INFO_DIG_INSTALLED', + 'SYS_INFO_DIG_MODE', 'SYS_INFO_MAPINFOWND', + 'SYS_INFO_MDICLIENTWND', 'SYS_INFO_MIBUILD_NUMBER', + 'SYS_INFO_MIPLATFORM', 'SYS_INFO_MIVERSION', + 'SYS_INFO_NUMBER_FORMAT', 'SYS_INFO_PLATFORM', + 'SYS_INFO_PRODUCTLEVEL', 'SYS_INFO_RUNTIME', + 'TAB_GEO_CONTROL_POINT_X', 'TAB_GEO_CONTROL_POINT_Y', + 'TAB_INFO_BROWSER_LIST', 'TAB_INFO_COORDSYS_CLAUSE', + 'TAB_INFO_COORDSYS_CLAUSE_WITHOUT_BOUNDS', + 'TAB_INFO_COORDSYS_MAXX', 'TAB_INFO_COORDSYS_MAXY', + 'TAB_INFO_COORDSYS_MINX', 'TAB_INFO_COORDSYS_MINY', + 'TAB_INFO_COORDSYS_NAME', 'TAB_INFO_EDITED', 'TAB_INFO_FASTEDIT', + 'TAB_INFO_MAPPABLE', 'TAB_INFO_MAPPABLE_TABLE', 'TAB_INFO_MAXX', + 'TAB_INFO_MAXY', 'TAB_INFO_MINX', 'TAB_INFO_MINY', 'TAB_INFO_NAME', + 'TAB_INFO_NCOLS', 'TAB_INFO_NREFS', 'TAB_INFO_NROWS', + 'TAB_INFO_NUM', 'TAB_INFO_READONLY', 'TAB_INFO_SEAMLESS', + 'TAB_INFO_SUPPORT_MZ', 'TAB_INFO_TABFILE', 'TAB_INFO_TEMP', + 'TAB_INFO_THEME_METADATA', 'TAB_INFO_TYPE', 'TAB_INFO_UNDO', + 'TAB_INFO_USERBROWSE', 'TAB_INFO_USERCLOSE', + 'TAB_INFO_USERDISPLAYMAP', 'TAB_INFO_USEREDITABLE', + 'TAB_INFO_USERMAP', 'TAB_INFO_USERREMOVEMAP', 'TAB_INFO_Z_UNIT', + 'TAB_INFO_Z_UNIT_SET', 'TAB_TYPE_BASE', 'TAB_TYPE_FME', + 'TAB_TYPE_IMAGE', 'TAB_TYPE_LINKED', 'TAB_TYPE_RESULT', + 'TAB_TYPE_VIEW', 'TAB_TYPE_WFS', 'TAB_TYPE_WMS', 'TRUE', 'WHITE', + 'WIN_3DMAP', 'WIN_BROWSER', 'WIN_BUTTONPAD', 'WIN_CART_LEGEND', + 'WIN_GRAPH', 'WIN_HELP', 'WIN_INFO', 'WIN_INFO_AUTOSCROLL', + 'WIN_INFO_CLONEWINDOW', 'WIN_INFO_ENHANCED_RENDERING', + 'WIN_INFO_EXPORT_ANTIALIASING', 'WIN_INFO_EXPORT_BORDER', + 'WIN_INFO_EXPORT_DITHER', 'WIN_INFO_EXPORT_FILTER', + 'WIN_INFO_EXPORT_MASKSIZE', 'WIN_INFO_EXPORT_THRESHOLD', + 'WIN_INFO_EXPORT_TRANSPRASTER', 'WIN_INFO_EXPORT_TRANSPVECTOR', + 'WIN_INFO_EXPORT_TRUECOLOR', 'WIN_INFO_HEIGHT', + 'WIN_INFO_LEGENDS_MAP', 'WIN_INFO_NAME', 'WIN_INFO_OPEN', + 'WIN_INFO_PRINTER_BORDER', 'WIN_INFO_PRINTER_BOTTOMMARGIN', + 'WIN_INFO_PRINTER_COPIES', 'WIN_INFO_PRINTER_DITHER', + 'WIN_INFO_PRINTER_LEFTMARGIN', 'WIN_INFO_PRINTER_METHOD', + 'WIN_INFO_PRINTER_NAME', 'WIN_INFO_PRINTER_ORIENT', + 'WIN_INFO_PRINTER_PAPERSIZE', 'WIN_INFO_PRINTER_RIGHTMARGIN', + 'WIN_INFO_PRINTER_SCALE_PATTERNS', 'WIN_INFO_PRINTER_TOPMARGIN', + 'WIN_INFO_PRINTER_TRANSPRASTER', 'WIN_INFO_PRINTER_TRANSPVECTOR', + 'WIN_INFO_PRINTER_TRUECOLOR', 'WIN_INFO_SMARTPAN', + 'WIN_INFO_SMOOTH_IMAGE', 'WIN_INFO_SMOOTH_TEXT', + 'WIN_INFO_SMOOTH_VECTOR', 'WIN_INFO_SNAPMODE', + 'WIN_INFO_SNAPTHRESHOLD', 'WIN_INFO_STATE', + 'WIN_INFO_SYSMENUCLOSE', 'WIN_INFO_TABLE', 'WIN_INFO_TOPMOST', + 'WIN_INFO_TYPE', 'WIN_INFO_WIDTH', 'WIN_INFO_WINDOWID', + 'WIN_INFO_WND', 'WIN_INFO_WORKSPACE', 'WIN_INFO_X', 'WIN_INFO_Y', + 'WIN_LAYOUT', 'WIN_LEGEND', 'WIN_MAPBASIC', 'WIN_MAPINFO', + 'WIN_MAPPER', 'WIN_MESSAGE', 'WIN_PENPICKER', + 'WIN_PRINTER_LANDSCAPE', 'WIN_PRINTER_PORTRAIT', 'WIN_RULER', + 'WIN_STATE_MAXIMIZED', 'WIN_STATE_MINIMIZED', 'WIN_STATE_NORMAL', + 'WIN_STATISTICS', 'WIN_STYLE_CHILD', 'WIN_STYLE_POPUP', + 'WIN_STYLE_POPUP_FULLCAPTION', 'WIN_STYLE_STANDARD', + 'WIN_SYMBOLPICKER', 'WIN_TOOLBAR', 'WIN_TOOLPICKER', 'YELLOW' + ), + 5 => array( + 'Abbrs', 'Above', 'Access', 'Active', 'Address', 'Advanced', + 'Affine', 'Align', 'Alpha', 'alpha_value', 'Always', 'Angle', + 'Animate', 'Antialiasing', 'Append', 'Apply', 'ApplyUpdates', + 'Arrow', 'Ascending', 'ASCII', 'At', 'AttributeData', 'Auto', + 'Autoflip', 'Autokey', 'Automatic', 'Autoscroll', 'Axis', + 'Background', 'Banding', 'Batch', 'Behind', 'Below', 'Bend', + 'Binary', 'Blocks', 'Border', 'BorderPen', 'Bottom', 'Bounds', + 'ByteOrder', 'ByVal', 'Calling', 'Camera', 'Candidates', + 'Cartesian', 'Cell', 'Center', 'Change', 'Char', 'Circle', + 'Clipping', 'CloseMatchesOnly', 'ClosestAddr', 'Color', 'Columns', + 'Contents', 'ControlPoints', 'Copies', 'Copyright', 'Counter', + 'Country', 'CountrySecondarySubdivision', 'CountrySubdivision', + 'Cross', 'CubicConvolution', 'Cull', 'Cursor', 'Custom', 'Data', + 'DBF', 'DDE', 'Decimal', 'DecimalPlaces', 'DefaultAmbientSpeed', + 'DefaultPropagationFactor', 'DeformatNumber', 'Delimiter', + 'Density', 'DenyWrite', 'Descending', 'Destroy', 'Device', + 'Dictionary', 'DInfo', 'Disable', 'DiscardUpdates', 'Display', + 'Dither', 'DrawMode', 'DropKey', 'Droplines', 'Duplicates', + 'Dynamic', 'Earth', 'East', 'EditLayerPopup', 'Elevation', 'Else', + 'ElseIf', 'Emf', 'Enable', 'Envinsa', 'ErrorDiffusion', 'Extents', + 'Fallback', 'FastEdit', 'FillFrame', 'Filter', 'First', 'Fit', + 'Fixed', 'FocalPoint', 'Footnote', 'Force', 'FromMapCatalog', + 'Front', 'Gap', 'Geographic', 'Geography', 'Graduated', 'Graphic', + 'Gutter', 'Half', 'Halftone', 'Handles', 'Height', 'Help', + 'HelpMsg', 'Hide', 'Hierarchical', 'HIGHLOW', 'History', 'Icon', + 'ID', 'Ignore', 'Image', 'Inflect', 'Inset', 'Inside', + 'Interactive', 'Internal', 'Interpolate', 'IntersectingStreet', + 'Justify', 'Key', 'Label', 'Labels', 'Landscape', 'Large', 'Last', + 'Layer', 'Left', 'Lib', 'Light', 'LinePen', 'Lines', 'Linestyle', + 'Longitude', 'LOWHIGH', 'Major', 'MajorPolygonOnly', + 'MajorRoadsOnly', 'MapBounds', 'MapMarker', 'MapString', 'Margins', + 'MarkMultiple', 'MaskSize', 'Match', 'MaxOffRoadDistance', + 'Message', 'MICODE', 'Minor', 'MixedCase', 'Mode', 'ModifierKeys', + 'Modify', 'Multiple', 'MultiPolygonRgns', 'Municipality', + 'MunicipalitySubdivision', 'Name', 'NATIVE', 'NearestNeighbor', + 'NoCollision', 'Node', 'Nodes', 'NoIndex', 'None', 'Nonearth', + 'NoRefresh', 'Normalized', 'North', 'Number', 'ObjectType', 'ODBC', + 'Off', 'OK', 'OLE', 'On', 'Options', 'Orientation', 'OtherBdy', + 'Output', 'Outside', 'Overlapped', 'Overwrite', 'Pagebreaks', + 'Pan', 'Papersize', 'Parent', 'PassThrough', 'Password', + 'Patterns', 'Per', 'Percent', 'Percentage', 'Permanent', + 'PersistentCache', 'Pie', 'Pitch', 'Placename', 'PointsOnly', + 'PolyObj', 'Portrait', 'Position', 'PostalCode', 'Prefer', + 'Preferences', 'Prev', 'Printer', 'Projection', 'PushButton', + 'Quantile', 'Query', 'Random', 'Range', 'Raster', 'Read', + 'ReadOnly', 'Rec', 'Redraw', 'Refine', 'Regionstyle', 'RemoveData', + 'Replace', 'Reprojection', 'Resampling', 'Restore', 'ResultCode', + 'ReturnHoles', 'Right', 'Roll', 'ROP', 'Rotated', 'Row', 'Ruler', + 'Scale', 'ScrollBars', 'Seamless', 'SecondaryPostalCode', + 'SelfInt', 'Separator', 'Series', 'Service', 'SetKey', + 'SetTraverse', 'Shades', 'Show', 'Simple', 'SimplificationFactor', + 'Size', 'Small', 'Smart', 'Smooth', 'South', 'Spacing', + 'SPATIALWARE', 'Spherical', 'Square', 'Stacked', 'Step', 'Store', + 'Street', 'StreetName', 'StreetNumber', 'StyleType', 'Subtitle', + 'SysMenuClose', 'Thin', 'Tick', 'Title', 'TitleAxisY', + 'TitleGroup', 'Titles', 'TitleSeries', 'ToggleButton', 'Tolerance', + 'ToolbarPosition', 'ToolButton', 'Toolkit', 'Top', 'Translucency', + 'translucency_percent', 'Transparency', 'Transparent', 'Traverse', + 'TrueColor', 'Uncheck', 'Undo', 'Union', 'Unit', 'Until', 'URL', + 'Use', 'User', 'UserBrowse', 'UserClose', 'UserDisplayMap', + 'UserEdit', 'UserMap', 'UserRemoveMap', 'Value', 'Variable', + 'Vary', 'Vector', 'Versioned', 'View', 'ViewDisplayPopup', + 'VisibleOnly', 'VMDefault', 'VMGrid', 'VMRaster', 'Voronoi', + 'Warnings', 'Wedge', 'West', 'Width', 'With', 'XY', 'XYINDEX', + 'Yaw', 'Zoom' + ) + ), + 'SYMBOLS' => array( + //Numeric/String Operators + Comparison Operators + '(', ')', '[', ']', '+', '-', '*', '/', '\\', '^', '&', + '=', '<', '>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff;', //Statements + Clauses + Data Types + Logical Operators, Geographical Operators + SQL + 2 => 'color: #2391af;', //Special Procedures + 3 => 'color: #2391af;', //Functions + 4 => 'color: #c635cb;', //Constants + 5 => 'color: #0000ff;' //Extended keywords (case sensitive) + ), + 'COMMENTS' => array( + 1 => 'color: #008000;', + 'MULTI' => 'color: #008000;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #a31515;' + ), + 'NUMBERS' => array( + 0 => 'color: #000000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;' + ), + 'ESCAPE_CHAR' => array( + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + 0 => 'color: #12198b;', //Table Attributes + 1 => 'color: #2391af;' //Data Types + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + //Table Attribute + 0 => "[\\.]{1}[a-zA-Z0-9_]+", + //Data Type + 1 => "(?xi) \\s+ as \\s+ (Alias|Brush|Date|Float|Font|Integer|Logical|Object|Pen|SmallInt|String|Symbol)" + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/matlab.php b/_piecrust/libs/Geshi/geshi/matlab.php new file mode 100644 index 0000000..3922f50 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/matlab.php @@ -0,0 +1,227 @@ + 'Matlab M', + 'COMMENT_SINGLE' => array(1 => '%'), + 'COMMENT_MULTI' => array(), + //Matlab Strings + 'COMMENT_REGEXP' => array( + 2 => "/(? GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'break', 'case', 'catch', 'continue', 'elseif', 'else', 'end', 'for', + 'function', 'global', 'if', 'otherwise', 'persistent', 'return', + 'switch', 'try', 'while' + ), + 2 => array( + 'all','any','exist','is','logical','mislocked', + + 'abs','acos','acosh','acot','acoth','acsc','acsch','airy','angle', + 'ans','area','asec','asech','asin','asinh','atan','atan2','atanh', + 'auread','autumn','auwrite','axes','axis','balance','bar','bar3', + 'bar3h','barh','besselh','besseli','besselj','besselk','Bessely', + 'beta','betainc','betaln','bicg','bicgstab','bin2dec','bitand', + 'bitcmp','bitget','bitmax','bitor','bitset','bitshift','bitxor', + 'blkdiag','bone','box','brighten','builtin','bwcontr','calendar', + 'camdolly','camlight','camlookat','camorbit','campan','campos', + 'camproj','camroll','camtarget','camup','camva','camzoom','capture', + 'cart2pol','cart2sph','cat','caxis','cdf2rdf','ceil','cell', + 'cell2struct','celldisp','cellfun','cellplot','cellstr','cgs', + 'char','chol','cholinc','cholupdate','cla','clabel','class','clc', + 'clf','clg','clock','close','colmmd','colorbar','colorcube', + 'colordef','colormap','colperm','comet','comet3','compan','compass', + 'complex','computer','cond','condeig','condest','coneplot','conj', + 'contour','contourc','contourf','contourslice','contrast','conv', + 'conv2','convhull','cool','copper','copyobj','corrcoef','cos', + 'cosh','cot','coth','cov','cplxpair','cputime','cross','csc','csch', + 'cumprod','cumsum','cumtrapz','cylinder','daspect','date','datenum', + 'datestr','datetick','datevec','dbclear','dbcont','dbdown', + 'dblquad','dbmex','dbquit','dbstack','dbstatus','dbstep','dbstop', + 'dbtype','dbup','deblank','dec2bin','dec2hex','deconv','del2', + 'delaunay','det','diag','dialog','diff','diffuse','dlmread', + 'dlmwrite','dmperm','double','dragrect','drawnow','dsearch','eig', + 'eigs','ellipj','ellipke','eomday','eps','erf','erfc','erfcx', + 'erfiny','error','errorbar','errordlg','etime','eval','evalc', + 'evalin','exp','expint','expm','eye','ezcontour','ezcontourf', + 'ezmesh','ezmeshc','ezplot','ezplot3','ezpolar','ezsurf','ezsurfc', + 'factor','factorial','fclose','feather','feof','ferror','feval', + 'fft','fft2','fftshift','fgetl','fgets','fieldnames','figure', + 'fill','fill3','filter','filter2','find','findfigs','findobj', + 'findstr','fix','flag','flipdim','fliplr','flipud','floor','flops', + 'fmin','fmins','fopen','fplot','fprintf','fread','frewind','fscanf', + 'fseek','ftell','full','funm','fwrite','fzero','gallery','gamma', + 'gammainc','gammaln','gca','gcbo','gcd','gcf','gco','get', + 'getfield','ginput','gmres','gradient','gray','graymon','grid', + 'griddata','gsvd','gtext','hadamard','hankel','hdf','helpdlg', + 'hess','hex2dec','hex2num','hidden','hilb','hist','hold','hot', + 'hsv','hsv2rgb','i','ifft','ifft2','ifftn','ifftshift','imag', + 'image','imfinfo','imread','imwrite','ind2sub','Inf','inferiorto', + 'inline','inpolygon','input','inputdlg','inputname','int16', + 'int2str','int32','int8','interp1','interp2','interp3','interpft', + 'interpn','intersect','inv','invhilb','ipermute','isa','ishandle', + 'ismember','isocaps','isonormals','isosurface','j','jet','keyboard', + 'lcm','legend','legendre','light','lighting','lightingangle', + 'lin2mu','line','lines','linspace','listdlg','loadobj','log', + 'log10','log2','loglog','logm','logspace','lower','lscov','lu', + 'luinc','magic','mat2str','material','max','mean','median','menu', + 'menuedit','mesh','meshc','meshgrid','min','mod','msgbox','mu2lin', + 'NaN','nargchk','nargin','nargout','nchoosek','ndgrid','ndims', + 'newplot','nextpow2','nnls','nnz','nonzeros','norm','normest','now', + 'null','num2cell','num2str','nzmax','ode113,','ode15s,','ode23s,', + 'ode23t,','ode23tb','ode45,','odefile','odeget','odeset','ones', + 'orient','orth','pagedlg','pareto','pascal','patch','pause', + 'pbaspect','pcg','pcolor','peaks','perms','permute','pi','pie', + 'pie3','pinv','plot','plot3','plotmatrix','plotyy','pol2cart', + 'polar','poly','polyarea','polyder','polyeig','polyfit','polyval', + 'polyvalm','pow2','primes','print','printdlg','printopt','prism', + 'prod','propedit','qmr','qr','qrdelete','qrinsert','qrupdate', + 'quad','questdlg','quiver','quiver3','qz','rand','randn','randperm', + 'rank','rat','rats','rbbox','rcond','real','realmax','realmin', + 'rectangle','reducepatch','reducevolume','refresh','rem','repmat', + 'reset','reshape','residue','rgb2hsv','rgbplot','ribbon','rmfield', + 'roots','rose','rot90','rotate','rotate3d','round','rref', + 'rrefmovie','rsf2csf','saveobj','scatter','scatter3','schur', + 'script','sec','sech','selectmoveresize','semilogx','semilogy', + 'set','setdiff','setfield','setxor','shading','shg','shiftdim', + 'shrinkfaces','sign','sin','single','sinh','slice','smooth3','sort', + 'sortrows','sound','soundsc','spalloc','sparse','spconvert', + 'spdiags','specular','speye','spfun','sph2cart','sphere','spinmap', + 'spline','spones','spparms','sprand','sprandn','sprandsym','spring', + 'sprintf','sqrt','sqrtm','squeeze','sscanf','stairs','std','stem', + 'stem3','str2double','str2num','strcat','strcmp','strcmpi', + 'stream2','stream3','streamline','strings','strjust','strmatch', + 'strncmp','strrep','strtok','struct','struct2cell','strvcat', + 'sub2ind','subplot','subspace','subvolume','sum','summer', + 'superiorto','surf','surf2patch','surface','surfc','surfl', + 'surfnorm','svd','svds','symmmd','symrcm','symvar','tan','tanh', + 'texlabel','text Create','textread','textwrap','tic','title','toc', + 'toeplitz','trace','trapz','tril','trimesh','trisurf','triu', + 'tsearch','uicontext Create','uicontextmenu','uicontrol', + 'uigetfile','uimenu','uint32','uint8','uiputfile','uiresume', + 'uisetcolor','uisetfont','uiwait Used','union','unique','unwrap', + 'upper','var','varargin','varargout','vectorize','view','viewmtx', + 'voronoi','waitbar','waitforbuttonpress','warndlg','warning', + 'waterfall','wavread','wavwrite','weekday','whitebg','wilkinson', + 'winter','wk1read','wk1write','xlabel','xlim','ylabel','ylim', + 'zeros','zlabel','zlim','zoom', + //'[Keywords 6]', + 'addpath','cd','clear','copyfile','delete','diary','dir','disp', + 'doc','docopt','echo','edit','fileparts','format','fullfile','help', + 'helpdesk','helpwin','home','inmem','lasterr','lastwarn','length', + 'load','lookfor','ls','matlabrc','matlabroot','mkdir','mlock', + 'more','munlock','open','openvar','pack','partialpath','path', + 'pathtool','profile','profreport','pwd','quit','rmpath','save', + 'saveas','size','tempdir','tempname','type','ver','version','web', + 'what','whatsnew','which','who','whos','workspace' + ) + ), + 'SYMBOLS' => array( + '...' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + //3 => false, + //4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #0000FF;' + ), + 'COMMENTS' => array( + 1 => 'color: #228B22;', + 2 => 'color:#A020F0;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => 'color: #080;' + ), + 'STRINGS' => array( + //0 => 'color: #A020F0;' + ), + 'NUMBERS' => array( + 0 => 'color: #33f;' + ), + 'METHODS' => array( + 1 => '', + 2 => '' + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + 0 => 'color: #33f;' + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => 'http://www.mathworks.com/access/helpdesk/help/techdoc/ref/{FNAMEL}.html' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + //Complex numbers + 0 => '(?html)' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/mirc.php b/_piecrust/libs/Geshi/geshi/mirc.php new file mode 100644 index 0000000..d6d8e29 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/mirc.php @@ -0,0 +1,171 @@ + 'mIRC Scripting', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'alias', 'menu', 'dialog', + ), + 2 => array( + 'if', 'elseif', 'else', 'while', 'return', 'goto', 'var' + ), + 3 => array( + 'action','ajinvite','amsg','ame','anick','aop','auser', + 'avoice','auto','autojoin','away','background','ban','beep', + 'channel','clear','clearall','clipboard','close','closemsg','color', + 'copy','creq','ctcp','ctcpreply','ctcps','dcc','dde','ddeserver', + 'debug','describe','disable','disconnect','dlevel','dll','dns', + 'dqwindow','ebeeps','echo','editbox','emailaddr','enable','events', + 'exit','filter','findtext','finger','flash','flood','flush', + 'flushini','font','fsend','fserve','fullname','ghide','gload', + 'gmove','gopts','gplay','gpoint','gqreq','groups','gshow','gsize', + 'gstop','gtalk','gunload','guser','help','hop','ignore','invite', + 'join','kick','linesep','links','list','load','loadbuf','localinfo', + 'log','me','mdi','mkdir','mnick','mode','msg','names','nick','noop', + 'notice','notify','omsg','onotice','part','partall','pdcc', + 'perform','ping','play','pop','protect','pvoice','qmsg','qme', + 'query','queryrn','quit','raw','remini','remote','remove','rename', + 'enwin','resetidle','rlevel','rmdir','run','ruser','save','savebuf', + 'saveini','say','server','showmirc','sline','sound','speak','splay', + 'sreq','strip','time', + //'timer[N/name]', //Handled as a regular expression below ... + 'timers','timestamp','titlebar','tnick','tokenize','topic','ulist', + 'unload','updatenl','url','uwho','window','winhelp','write', + 'writeini','who','whois','whowas' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '/' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #994444;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #990000; font-weight: bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + 0 => 'color: #FF0000;', + ), + 'STRINGS' => array( + ), + 'NUMBERS' => array( + 0 => '', + ), + 'METHODS' => array( + 0 => 'color: #008000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #FF0000;', + ), + 'REGEXPS' => array( + 0 => 'color: #000099;', + 1 => 'color: #990000;', + 2 => 'color: #000099;', + 3 => 'color: #888800;', + 4 => 'color: #888800;', + 5 => 'color: #000099;', + 6 => 'color: #990000; font-weight: bold;', + 7 => 'color: #990000; font-weight: bold;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.mirc.com/{FNAMEL}' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array('.'), + 'REGEXPS' => array( + //Variable names + 0 => '\$[a-zA-Z0-9]+', + //Variable names + 1 => '(%|&)[\w\x80-\xFE]+', + //Client to Client Protocol handling + 2 => '(on|ctcp) (!|@|&)?(\d|\*):[a-zA-Z]+:', + /*4 => array( + GESHI_SEARCH => '((on|ctcp) (!|@|&)?(\d|\*):(Action|Active|Agent|AppActive|Ban|Chat|Close|Connect|Ctcp|CtcpReply|DccServer|DeHelp|DeOp|DeVoice|Dialog|Dns|Error|Exit|FileRcvd|FileSent|GetFail|Help|Hotlink|Input|Invite|Join|KeyDown|KeyUp|Kick|Load|Logon|MidiEnd|Mode|Mp3End|Nick|NoSound|Notice|Notify|Op|Open|Part|Ping|Pong|PlayEnd|Quit|Raw|RawMode|SendFail|Serv|ServerMode|ServerOp|Signal|Snotice|Start|Text|Topic|UnBan|Unload|Unotify|User|Mode|Voice|Wallops|WaveEnd):)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ),*/ + //Channel names + 3 => '(#|@)[a-zA-Z0-9]+', + 4 => '-[a-z\d]+', + //Raw protocol handling + 5 => 'raw (\d|\*):', + //Timer handling + 6 => '(?|:|\/)\/timer(?!s\b)[0-9a-zA-Z_]+', + // /... + 7 => '(?|:|\/|\w)\/[a-zA-Z][a-zA-Z0-9]*(?!>)' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'NUMBERS' => GESHI_NEVER + ), + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => '(? \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/mmix.php b/_piecrust/libs/Geshi/geshi/mmix.php new file mode 100644 index 0000000..75b69c2 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/mmix.php @@ -0,0 +1,173 @@ + 'MMIX', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + //Line address prefix suppression + 'COMMENT_REGEXP' => array(2 => "/^\s*[0-9a-f]{12,16}+(?:\s+[0-9a-f]+(?:\.{3}[0-9a-f]{2,})?)?:/mi"), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /*CPU*/ + 1 => array( + '16ADDU','2ADDU','4ADDU','8ADDU','ADD','ADDU','AND','ANDN','ANDNH', + 'ANDNL','ANDNMH','ANDNML','BDIF','BEV','BN','BNN','BNP','BNZ','BOD', + 'BP','BZ','CMP','CMPU','CSEV','CSN','CSNN','CSNP','CSNZ','CSOD', + 'CSP','CSWAP','CSZ','DIV','DIVU','FADD','FCMP','FCMPE','FDIV', + 'FEQL','FEQLE','FINT','FIX','FIXU','FLOT','FLOTU','FMUL','FREM', + 'FSQRT','FSUB','FUN','FUNE','GET','GETA','GO','INCH','INCL','INCMH', + 'INCML','JMP','LDB','LDBU','LDHT','LDO','LDOU','LDSF','LDT','LDTU', + 'LDUNC','LDVTS','LDW','LDWU','MOR','MUL','MULU','MUX','MXOR','NAND', + 'NEG','NEGU','NOR','NXOR','ODIF','OR','ORH','ORL','ORMH','ORML', + 'ORN','PBEV','PBN','PBNN','PBNP','PBNZ','PBOD','PBP','PBZ','POP', + 'PREGO','PRELD','PREST','PUSHGO','PUSHJ','PUT','RESUME','SADD', + 'SAVE','SETH','SETL','SETMH','SETML','SFLOT','SFLOTU','SL','SLU', + 'SR','SRU','STB','STBU','STCO','STHT','STO','STOU','STSF','STT', + 'STTU','STUNC','STW','STWU','SUB','SUBU','SWYM','SYNC','SYNCD', + 'SYNCID','TDIF','TRAP','TRIP','UNSAVE','WDIF','XOR','ZSEV','ZSN', + 'ZSNN','ZSNP','ZSNZ','ZSOD','ZSP','ZSZ' + ), + /*registers*/ + 3 => array( + 'rA','rB','rC','rD','rE','rF','rG','rH','rI','rJ','rK','rL','rM', + 'rN','rO','rP','rQ','rR','rS','rT','rU','rV','rW','rX','rY','rZ', + 'rBB','rTT','rWW','rXX','rYY','rZZ' + ), + /*Directive*/ + 4 => array( + ), + /*Operands*/ + 5 => array( + ) + ), + 'SYMBOLS' => array( + '[', ']', '(', ')', + '+', '-', '*', '/', '%', + '.', ',', ';', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => false, + 3 => true, + 4 => false, + 5 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00007f; font-weight: bold;', + 2 => 'color: #0000ff; font-weight: bold;', + 3 => 'color: #00007f;', + 4 => 'color: #000000; font-weight: bold;', + 5 => 'color: #000000; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #adadad; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000ff;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( +// 0 => 'color: #0000ff;', +// 1 => 'color: #0000ff;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '' + ), + 'NUMBERS' => + GESHI_NUMBER_BIN_PREFIX_PERCENT | + GESHI_NUMBER_BIN_SUFFIX | + GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_HEX_SUFFIX | + GESHI_NUMBER_OCT_SUFFIX | + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_NONSCI_F | + GESHI_NUMBER_FLT_SCI_ZERO, + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + //Hex numbers +// 0 => /* */ "(?<=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))(?:[0-9][0-9a-fA-F]{0,31}[hH]|0x[0-9a-fA-F]{1,32})(?=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))", + //Binary numbers +// 1 => "(?<=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))[01]{1,64}[bB](?=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))" + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(?|^])", + 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%])" + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/modula2.php b/_piecrust/libs/Geshi/geshi/modula2.php new file mode 100644 index 0000000..0e3a9ae --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/modula2.php @@ -0,0 +1,136 @@ + 'Modula-2', + 'COMMENT_MULTI' => array('(*' => '*)'), + 'COMMENT_SINGLE' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'HARDQUOTE' => array("'", "'"), + 'HARDESCAPE' => array("''"), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( /* reserved words */ + 'AND', 'ARRAY', 'BEGIN', 'BY', 'CASE', 'CONST', 'DEFINITION', + 'DIV', 'DO', 'ELSE', 'ELSIF', 'END', 'EXIT', 'EXPORT', 'FOR', + 'FROM', 'IF', 'IMPLEMENTATION', 'IMPORT', 'IN', 'LOOP', 'MOD', + 'MODULE', 'NOT', 'OF', 'OR', 'POINTER', 'PROCEDURE', 'QUALIFIED', + 'RECORD', 'REPEAT', 'RETURN', 'SET', 'THEN', 'TO', 'TYPE', + 'UNTIL', 'VAR', 'WHILE', 'WITH' + ), + 2 => array( /* pervasive constants */ + 'NIL', 'FALSE', 'TRUE', + ), + 3 => array( /* pervasive types */ + 'BITSET', 'CAP', 'CHR', 'DEC', 'DISPOSE', 'EXCL', 'FLOAT', + 'HALT', 'HIGH', 'INC', 'INCL', 'MAX', 'MIN', 'NEW', 'ODD', 'ORD', + 'SIZE', 'TRUNC', 'VAL' + ), + 4 => array( /* pervasive functions and macros */ + 'ABS', 'BOOLEAN', 'CARDINAL', 'CHAR', 'INTEGER', + 'LONGCARD', 'LONGINT', 'LONGREAL', 'PROC', 'REAL' + ), + ), + 'SYMBOLS' => array( + ',', ':', '=', '+', '-', '*', '/', '#', '~' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;', + 4 => 'color: #000066; font-weight: bold;' + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;', + 'HARD' => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #0066ee;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + 1 => '' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/modula3.php b/_piecrust/libs/Geshi/geshi/modula3.php new file mode 100644 index 0000000..e6a9a07 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/modula3.php @@ -0,0 +1,135 @@ + 'Modula-3', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('(*' => '*)'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'HARDQUOTE' => array("'", "'"), + 'HARDESCAPE' => array("''"), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'AND', 'ANY', 'ARRAY', 'AS', 'BEGIN', 'BITS', 'BRANDED', 'BY', 'CASE', + 'CONST', 'DIV', 'DO', 'ELSE', 'ELSIF', 'END', 'EVAL', 'EXCEPT', 'EXCEPTION', + 'EXIT', 'EXPORTS', 'FINALLY', 'FOR', 'FROM', 'GENERIC', 'IF', 'IMPORT', 'IN', + 'INTERFACE', 'LOCK', 'LOOP', 'METHODS', 'MOD', 'MODULE', 'NOT', 'OBJECT', 'OF', + 'OR', 'OVERRIDE', 'PROCEDURE', 'RAISE', 'RAISES', 'READONLY', 'RECORD', 'REF', + 'REPEAT', 'RETURN', 'REVEAL', 'ROOT', 'SET', 'THEN', 'TO', 'TRY', 'TYPE', 'TYPECASE', + 'UNSAFE', 'UNTIL', 'UNTRACED', 'VALUE', 'VAR', 'WHILE', 'WITH' + ), + 2 => array( + 'NIL', 'NULL', 'FALSE', 'TRUE', + ), + 3 => array( + 'ABS','ADR','ADRSIZE','BITSIZE','BYTESIZE','CEILING','DEC','DISPOSE', + 'EXTENDED','FIRST','FLOAT','FLOOR','INC','ISTYPE','LAST','LOOPHOLE','MAX','MIN', + 'NARROW','NEW','NUMBER','ORD','ROUND','SUBARRAY','TRUNC','TYPECODE', 'VAL' + ), + 4 => array( + 'ADDRESS', 'BOOLEAN', 'CARDINAL', 'CHAR', 'INTEGER', + 'LONGREAL', 'MUTEX', 'REAL', 'REFANY', 'TEXT' + ), + ), + 'SYMBOLS' => array( + ',', ':', '=', '+', '-', '*', '/', '#' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;', + 4 => 'color: #000066; font-weight: bold;' + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;', + 'HARD' => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #0066ee;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/mpasm.php b/_piecrust/libs/Geshi/geshi/mpasm.php new file mode 100644 index 0000000..e57f2c3 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/mpasm.php @@ -0,0 +1,164 @@ + 'Microchip Assembler', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /*Directive Language*/ + 4 => array( + 'CONSTANT', '#DEFINE', 'END', 'EQU', 'ERROR', 'ERROR-LEVEL', '#INCLUDE', 'LIST', + 'MESSG', 'NOLIST', 'ORG', 'PAGE', 'PROCESSOR', 'RADIX', 'SET', 'SPACE', 'SUBTITLE', + 'TITLE', '#UNDEFINE', 'VARIABLE', 'ELSE', 'ENDIF', 'ENDW', 'IF', 'IFDEF', 'IFNDEF', + 'WHILE', '__BADRAM', 'CBLOCK', '__CONFIG', 'DA', 'DATA', 'DB', 'DE', 'DT', 'DW', + 'ENDC', 'FILL', '__IDLOCS', '__MAXRAM', 'RES', 'ENDM', 'EXITM', 'EXPAND', 'LOCAL', + 'MACRO', 'NOEXPAND', 'BANKISEL', 'BANKSEL', 'CODE', 'EXTERN', 'GLOBAL', 'IDATA', + 'PAGESEL', 'UDATA', 'UDATA_ACS', 'UDATA_OVR', 'UDATA_SHR' + ), + /* 12&14-bit Specific Instruction Set*/ + 1 => array( + 'andlw', 'call', 'clrwdt', 'goto', 'iorlw', 'movlw', 'option', 'retlw', 'sleep', + 'tris', 'xorlw', 'addwf', 'andwf', 'clrf', 'clrw', 'comf', 'decf', 'decfsz', 'incf', + 'incfsz', 'iorwf', 'movf', 'nop', 'rlf', 'rrf', 'subwf', 'swapf', 'xorwf', + 'bcf', 'bsf', 'btfsc', 'btfss', + 'addlw', 'retfie', 'return', 'sublw', 'addcf', 'adddcf', 'b', 'bc', 'bdc', + 'bnc', 'bndc', 'bnz', 'bz', 'clrc', 'clrdc', 'clrz', 'lcall', 'lgoto', 'movfw', + 'negf', 'setc', 'setdc', 'setz', 'skpc', 'skpdc', 'skpnc', 'skpndc', 'skpnz', 'skpz', + 'subcf', 'subdcf', 'tstf' + ), + /* 16-bit Specific Instructiob Set */ + 2 => array ( + 'movfp', 'movlb', 'movlp', 'movpf', 'movwf', 'tablrd', 'tablwt', 'tlrd', 'tlwt', + 'addwfc', 'daw', 'mullw', 'negw', 'rlcf', 'rlncf', 'rrcf', 'rrncf', 'setf', 'subwfb', + 'btg', 'cpfseq', 'cpfsgt', 'cpfslt', 'dcfsnz', 'infsnz', 'tstfsz', 'lfsr', 'bnn', + 'bnov', 'bra', 'pop', 'push', 'rcall', 'reset' + ), + /* Registers */ + 3 => array( + 'INDF', 'TMR0', 'PCL', 'STATUS', 'FSR', 'PORTA', 'PORTB', 'PORTC', 'PORTD', 'PORTE', + 'PCLATH', 'INTCON', 'PIR1', 'PIR2', 'TMR1L', 'TMR1H', 'T1CON', 'TMR2', 'T2CON', 'TMR2L', + 'TMR2H', 'TMR0H', 'TMR0L', 'SSPBUF', 'SSPCON', 'CCPR1L', 'CCPR1H', 'CCP1CON', 'RCSTA', + 'TXREG', 'RCREG', 'CCPR2L', 'CCPR2H', 'CCP2CON', 'OPTION', 'TRISA', 'TRISB', 'TRISC', + 'TRISD', 'TRISE', 'PIE2', 'PIE1', 'PR2', 'SSPADD', 'SSPSTAT', 'TXSTA', 'SPBRG' + ), + /*Operands*/ + 5 => array( + 'high','low' + ) + ), + 'SYMBOLS' => array( + '[', ']', '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00007f;', + 2 => 'color: #0000ff;', + 3 => 'color: #007f00;', + 4 => 'color: #46aa03; font-weight:bold;', + 5 => 'color: #7f0000;' + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + 0 => 'color: #ff0000;', + 1 => 'color: #ff0000;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + //Hex numbers + 0 => '[0-9a-fA-F]{1,32}[hH]', + //Binary numbers + 1 => '[01]{1,64}[bB]' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/mxml.php b/_piecrust/libs/Geshi/geshi/mxml.php new file mode 100644 index 0000000..fc1c424 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/mxml.php @@ -0,0 +1,145 @@ + 'MXML', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(''), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + ), + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + 0 => 'color: #00bbdd;', + 1 => 'color: #ddbb00;', + 2 => 'color: #339933;', + 3 => 'color: #000000;' + ), + 'REGEXPS' => array( + 0 => 'font-weight: bold; color: black;', + 1 => 'color: #7400FF;', + 2 => 'color: #7400FF;' + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + // xml declaration + 0 => array( + GESHI_SEARCH => '(<[\/?|(\?xml)]?[a-z0-9_\-:]*(\?>))', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + // opening tags + 1 => array( + GESHI_SEARCH => '(<\/?[a-z]+:[a-z]+)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + // closing tags + 2 => array( + GESHI_SEARCH => '(\/?>)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + ' '>' + ), + 1 => array( + '&' => ';' + ), + 2 => array( + //' ']]>' + '' => '' + ), + 3 => array( + '<' => '>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => false, + 1 => false, + 2 => false, + 3 => true + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/mysql.php b/_piecrust/libs/Geshi/geshi/mysql.php new file mode 100644 index 0000000..873cff3 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/mysql.php @@ -0,0 +1,475 @@ + 'MySQL', + //'COMMENT_SINGLE' => array(1 =>'--', 2 => '#'), // '--' MUST be folowed by whitespace,not necessarily a space + 'COMMENT_SINGLE' => array( + 1 =>'-- ', + 2 => '#' + ), + 'COMMENT_REGEXP' => array( + 1 => "/(?:--\s).*?$/", // double dash followed by any whitespace + ), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, // @@@ would be nice if this could be defined per group! + 'QUOTEMARKS' => array("'", '"', '`'), + 'ESCAPE_CHAR' => '\\', // by default only, can be specified + 'ESCAPE_REGEXP' => array( + 1 => "/[_%]/", // search wildcards + ), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_OCT_PREFIX | + GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_FLT_NONSCI | + GESHI_NUMBER_FLT_SCI_SHORT | + GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( + // Mix: statement keywords and keywords that don't fit in any other + // category, or have multiple usage/meanings + 'ACTION','ADD','AFTER','ALGORITHM','ALL','ALTER','ANALYZE','ANY', + 'ASC','AS','BDB','BEGIN','BERKELEYDB','BINARY','BTREE','CALL', + 'CASCADED','CASCADE','CHAIN','CHECK','COLUMNS','COLUMN','COMMENT', + 'COMMIT','COMMITTED','CONSTRAINT','CONTAINS SQL','CONSISTENT', + 'CONVERT','CREATE','CROSS','DATA','DATABASES', + 'DECLARE','DEFINER','DELAYED','DELETE','DESCRIBE','DESC', + 'DETERMINISTIC','DISABLE','DISCARD','DISTINCTROW','DISTINCT','DO', + 'DROP','DUMPFILE','DUPLICATE KEY','ENABLE','ENCLOSED BY','ENGINE', + 'ERRORS','ESCAPED BY','EXISTS','EXPLAIN','EXTENDED','FIELDS', + 'FIRST','FOR EACH ROW','FORCE','FOREIGN KEY','FROM','FULL', + 'FUNCTION','GLOBAL','GRANT','GROUP BY','HANDLER','HASH','HAVING', + 'HELP','HIGH_PRIORITY','IF NOT EXISTS','IGNORE','IMPORT','INDEX', + 'INFILE','INNER','INNODB','INOUT','INTO','INVOKER', + 'ISOLATION LEVEL','JOIN','KEYS','KEY','KILL','LANGUAGE SQL','LAST', + 'LIMIT','LINES','LOAD','LOCAL','LOCK','LOW_PRIORITY', + 'MASTER_SERVER_ID','MATCH','MERGE','MIDDLEINT','MODIFIES SQL DATA', + 'MODIFY','MRG_MYISAM','NATURAL','NEXT','NO SQL','NO','ON', + 'OPTIMIZE','OPTIONALLY','OPTION','ORDER BY','OUTER','OUTFILE','OUT', + 'PARTIAL','PREV','PRIMARY KEY','PRIVILEGES','PROCEDURE','PURGE', + 'QUICK','READS SQL DATA','READ','REFERENCES','RELEASE','RENAME', + 'REPEATABLE','REQUIRE','RESTRICT','RETURNS','REVOKE', + 'ROLLBACK','ROUTINE','RTREE','SAVEPOINT','SELECT', + 'SERIALIZABLE','SESSION','SET','SHARE MODE','SHOW','SIMPLE', + 'SNAPSHOT','SOME','SONAME','SQL SECURITY','SQL_BIG_RESULT', + 'SQL_BUFFER_RESULT','SQL_CACHE','SQL_CALC_FOUND_ROWS', + 'SQL_NO_CACHE','SQL_SMALL_RESULT','SSL','START','STARTING BY', + 'STATUS','STRAIGHT_JOIN','STRIPED','TABLESPACE','TABLES','TABLE', + 'TEMPORARY','TEMPTABLE','TERMINATED BY','TO','TRANSACTIONS', + 'TRANSACTION','TRIGGER','TYPES','TYPE','UNCOMMITTED','UNDEFINED', + 'UNION','UNLOCK_TABLES','UPDATE','USAGE','USE','USER_RESOURCES', + 'USING','VALUES','VALUE','VIEW','WARNINGS','WHERE','WITH ROLLUP', + 'WITH','WORK','WRITE', + ), + 2 => array( //No ( must follow + // Mix: statement keywords distinguished from functions by the same name + "CURRENT_USER", "DATABASE", "IN", "INSERT", "DEFAULT", "REPLACE", "SCHEMA", "TRUNCATE" + ), + 3 => array( + // Values (Constants) + 'FALSE','NULL','TRUE', + ), + 4 => array( + // Column Data Types + 'BIGINT','BIT','BLOB','BOOLEAN','BOOL','CHARACTER VARYING', + 'CHAR VARYING','DATETIME','DECIMAL','DEC','DOUBLE PRECISION', + 'DOUBLE','ENUM','FIXED','FLOAT','GEOMETRYCOLLECTION','GEOMETRY', + 'INTEGER','INT','LINESTRING','LONGBLOB','LONGTEXT','MEDIUMBLOB', + 'MEDIUMINT','MEDIUMTEXT','MULTIPOINT','MULTILINESTRING', + 'MULTIPOLYGON','NATIONAL CHARACTER','NATIONAL CHARACTER VARYING', + 'NATIONAL CHAR VARYING','NATIONAL VARCHAR','NCHAR VARCHAR','NCHAR', + 'NUMERIC','POINT','POLYGON','REAL','SERIAL', + 'SMALLINT','TEXT','TIMESTAMP','TINYBLOB','TINYINT', + 'TINYTEXT','VARBINARY','VARCHARACTER','VARCHAR', + ), + 5 => array( //No ( must follow + // Column data types distinguished from functions by the same name + "CHAR", "DATE", "TIME" + ), + 6 => array( + // Table, Column & Index Attributes + 'AUTO_INCREMENT','AVG_ROW_LENGTH','BOTH','CHECKSUM','CONNECTION', + 'DATA DIRECTORY','DEFAULT NULL','DELAY_KEY_WRITE','FULLTEXT', + 'INDEX DIRECTORY','INSERT_METHOD','LEADING','MAX_ROWS','MIN_ROWS', + 'NOT NULL','PACK_KEYS','ROW_FORMAT','SERIAL DEFAULT VALUE','SIGNED', + 'SPATIAL','TRAILING','UNIQUE','UNSIGNED','ZEROFILL' + ), + 7 => array( //No ( must follow + // Column attribute distinguished from function by the same name + "CHARSET" + ), + 8 => array( + // Date and Time Unit Specifiers + 'DAY_HOUR','DAY_MICROSECOND','DAY_MINUTE','DAY_SECOND', + 'HOUR_MICROSECOND','HOUR_MINUTE','HOUR_SECOND', + 'MINUTE_MICROSECOND','MINUTE_SECOND', + 'SECOND_MICROSECOND','YEAR_MONTH' + ), + 9 => array( //No ( must follow + // Date-time unit specifiers distinguished from functions by the same name + "DAY", "HOUR", "MICROSECOND", "MINUTE", "MONTH", "QUARTER", "SECOND", "WEEK", "YEAR" + ), + 10 => array( + // Operators (see also Symbols) + 'AND','BETWEEN','CHARACTER SET','COLLATE','DIV','IS NOT NULL', + 'IS NOT','IS NULL','IS','LIKE','NOT','OFFSET','OR','REGEXP','RLIKE', + 'SOUNDS LIKE','XOR' + ), + 11 => array( //No ( must follow + // Operator distinghuished from function by the same name + "INTERVAL" + ), + 12 => array( + // Control Flow (functions) + 'CASE','ELSE','END','IFNULL','IF','NULLIF','THEN','WHEN', + ), + 13 => array( + // String Functions + 'ASCII','BIN','BIT_LENGTH','CHAR_LENGTH','CHARACTER_LENGTH', + 'CONCAT_WS','CONCAT','ELT','EXPORT_SET','FIELD', + 'FIND_IN_SET','FORMAT','HEX','INSTR','LCASE','LEFT','LENGTH', + 'LOAD_FILE','LOCATE','LOWER','LPAD','LTRIM','MAKE_SET','MID', + 'OCTET_LENGTH','ORD','POSITION','QUOTE','REPEAT','REVERSE', + 'RIGHT','RPAD','RTRIM','SOUNDEX','SPACE','STRCMP','SUBSTRING_INDEX', + 'SUBSTRING','TRIM','UCASE','UNHEX','UPPER', + ), + 14 => array( //A ( must follow + // String functions distinguished from other keywords by the same name + "INSERT", "REPLACE", "CHAR" + ), + 15 => array( + // Numeric Functions + 'ABS','ACOS','ASIN','ATAN2','ATAN','CEILING','CEIL', + 'CONV','COS','COT','CRC32','DEGREES','EXP','FLOOR','LN','LOG10', + 'LOG2','LOG','MOD','OCT','PI','POWER','POW','RADIANS','RAND', + 'ROUND','SIGN','SIN','SQRT','TAN', + ), + 16 => array( //A ( must follow + // Numeric function distinguished from other keyword by the same name + "TRUNCATE" + ), + 17 => array( + // Date and Time Functions + 'ADDDATE','ADDTIME','CONVERT_TZ','CURDATE','CURRENT_DATE', + 'CURRENT_TIME','CURRENT_TIMESTAMP','CURTIME','DATE_ADD', + 'DATE_FORMAT','DATE_SUB','DATEDIFF','DAYNAME','DAYOFMONTH', + 'DAYOFWEEK','DAYOFYEAR','EXTRACT','FROM_DAYS','FROM_UNIXTIME', + 'GET_FORMAT','LAST_DAY','LOCALTIME','LOCALTIMESTAMP','MAKEDATE', + 'MAKETIME','MONTHNAME','NOW','PERIOD_ADD', + 'PERIOD_DIFF','SEC_TO_TIME','STR_TO_DATE','SUBDATE','SUBTIME', + 'SYSDATE','TIME_FORMAT','TIME_TO_SEC', + 'TIMESTAMPADD','TIMESTAMPDIFF','TO_DAYS', + 'UNIX_TIMESTAMP','UTC_DATE','UTC_TIME','UTC_TIMESTAMP','WEEKDAY', + 'WEEKOFYEAR','YEARWEEK', + ), + 18 => array( //A ( must follow + // Date-time functions distinguished from other keywords by the same name + "DATE", "DAY", "HOUR", "MICROSECOND", "MINUTE", "MONTH", "QUARTER", + "SECOND", "TIME", "WEEK", "YEAR" + ), + 19 => array( + // Comparison Functions + 'COALESCE','GREATEST','ISNULL','LEAST', + ), + 20 => array( //A ( must follow + // Comparison functions distinguished from other keywords by the same name + "IN", "INTERVAL" + ), + 21 => array( + // Encryption and Compression Functions + 'AES_DECRYPT','AES_ENCRYPT','COMPRESS','DECODE','DES_DECRYPT', + 'DES_ENCRYPT','ENCODE','ENCRYPT','MD5','OLD_PASSWORD','PASSWORD', + 'SHA1','SHA','UNCOMPRESS','UNCOMPRESSED_LENGTH', + ), + 22 => array( + // GROUP BY (aggregate) Functions + 'AVG','BIT_AND','BIT_OR','BIT_XOR','COUNT','GROUP_CONCAT', + 'MAX','MIN','STDDEV_POP','STDDEV_SAMP','STDDEV','STD','SUM', + 'VAR_POP','VAR_SAMP','VARIANCE', + ), + 23 => array( + // Information Functions + 'BENCHMARK','COERCIBILITY','COLLATION','CONNECTION_ID', + 'FOUND_ROWS','LAST_INSERT_ID','ROW_COUNT', + 'SESSION_USER','SYSTEM_USER','USER','VERSION', + ), + 24 => array( //A ( must follow + // Information functions distinguished from other keywords by the same name + "CURRENT_USER", "DATABASE", "SCHEMA", "CHARSET" + ), + 25 => array( + // Miscellaneous Functions + 'ExtractValue','BIT_COUNT','GET_LOCK','INET_ATON','INET_NTOA', + 'IS_FREE_LOCK','IS_USED_LOCK','MASTER_POS_WAIT','NAME_CONST', + 'RELEASE_LOCK','SLEEP','UpdateXML','UUID', + ), + 26 => array( //A ( must follow + // Miscellaneous function distinguished from other keyword by the same name + "DEFAULT" + ), + 27 => array( + // Geometry Functions + 'Area','AsBinary','AsText','AsWKB','AsWKT','Boundary','Buffer', + 'Centroid','Contains','ConvexHull','Crosses', + 'Difference','Dimension','Disjoint','Distance', + 'EndPoint','Envelope','Equals','ExteriorRing', + 'GLength','GeomCollFromText','GeomCollFromWKB','GeomFromText', + 'GeomFromWKB','GeometryCollectionFromText', + 'GeometryCollectionFromWKB','GeometryFromText','GeometryFromWKB', + 'GeometryN','GeometryType', + 'InteriorRingN','Intersection','Intersects','IsClosed','IsEmpty', + 'IsRing','IsSimple', + 'LineFromText','LineFromWKB','LineStringFromText', + 'LineStringFromWKB', + 'MBRContains','MBRDisjoint','MBREqual','MBRIntersects', + 'MBROverlaps','MBRTouches','MBRWithin','MLineFromText', + 'MLineFromWKB','MPointFromText','MPointFromWKB','MPolyFromText', + 'MPolyFromWKB','MultiLineStringFromText','MultiLineStringFromWKB', + 'MultiPointFromText','MultiPointFromWKB','MultiPolygonFromText', + 'MultiPolygonFromWKB', + 'NumGeometries','NumInteriorRings','NumPoints', + 'Overlaps', + 'PointFromText','PointFromWKB','PointN','PointOnSurface', + 'PolyFromText','PolyFromWKB','PolygonFromText','PolygonFromWKB', + 'Related','SRID','StartPoint','SymDifference', + 'Touches', + 'Union', + 'Within', + 'X', + 'Y', + ), + ), + 'SYMBOLS' => array( + 1 => array( + /* Operators */ + '=', ':=', // assignment operators + '||', '&&', '!', // locical operators + '=', '<=>', '>=', '>', '<=', '<', '<>', '!=', // comparison operators + '|', '&', '^', '~', '<<', '>>', // bitwise operators + '-', '+', '*', '/', '%', // numerical operators + ), + 2 => array( + /* Other syntactical symbols */ + '(', ')', + ',', ';', + ), + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false, + 9 => false, + 10 => false, + 11 => false, + 12 => false, + 13 => false, + 13 => false, + 14 => false, + 15 => false, + 16 => false, + 17 => false, + 18 => false, + 19 => false, + 20 => false, + 21 => false, + 22 => false, + 23 => false, + 24 => false, + 25 => false, + 26 => false, + 27 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #990099; font-weight: bold;', // mix + 2 => 'color: #990099; font-weight: bold;', // mix + 3 => 'color: #9900FF; font-weight: bold;', // constants + 4 => 'color: #999900; font-weight: bold;', // column data types + 5 => 'color: #999900; font-weight: bold;', // column data types + 6 => 'color: #FF9900; font-weight: bold;', // attributes + 7 => 'color: #FF9900; font-weight: bold;', // attributes + 8 => 'color: #9900FF; font-weight: bold;', // date-time units + 9 => 'color: #9900FF; font-weight: bold;', // date-time units + + 10 => 'color: #CC0099; font-weight: bold;', // operators + 11 => 'color: #CC0099; font-weight: bold;', // operators + + 12 => 'color: #009900;', // control flow (functions) + 13 => 'color: #000099;', // string functions + 14 => 'color: #000099;', // string functions + 15 => 'color: #000099;', // numeric functions + 16 => 'color: #000099;', // numeric functions + 17 => 'color: #000099;', // date-time functions + 18 => 'color: #000099;', // date-time functions + 19 => 'color: #000099;', // comparison functions + 20 => 'color: #000099;', // comparison functions + 21 => 'color: #000099;', // encryption functions + 22 => 'color: #000099;', // aggregate functions + 23 => 'color: #000099;', // information functions + 24 => 'color: #000099;', // information functions + 25 => 'color: #000099;', // miscellaneous functions + 26 => 'color: #000099;', // miscellaneous functions + 27 => 'color: #00CC00;', // geometry functions + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #808000; font-style: italic;', + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #004000; font-weight: bold;', + 1 => 'color: #008080; font-weight: bold;' // search wildcards + ), + 'BRACKETS' => array( + 0 => 'color: #FF00FF;' + ), + 'STRINGS' => array( + 0 => 'color: #008000;' + ), + 'NUMBERS' => array( + 0 => 'color: #008080;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 1 => 'color: #CC0099;', // operators + 2 => 'color: #000033;', // syntax + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', + 2 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', + 3 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', + 4 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', + 5 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', + 6 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', + 7 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', + 8 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', + 9 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', + + 10 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/non-typed-operators.html', + 11 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/non-typed-operators.html', + + 12 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/control-flow-functions.html', + 13 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/string-functions.html', + 14 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/string-functions.html', + 15 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/numeric-functions.html', + 16 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/numeric-functions.html', + 17 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/date-and-time-functions.html', + 18 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/date-and-time-functions.html', + 19 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/comparison-operators.html', + 20 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/comparison-operators.html', + 21 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/encryption-functions.html', + 22 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/group-by-functions-and-modifiers.html', + 23 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/information-functions.html', + 24 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/information-functions.html', + 25 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/func-op-summary-ref.html', + 26 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/func-op-summary-ref.html', + 27 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/analysing-spatial-information.html', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 2 => array( + 'DISALLOWED_AFTER' => '(?![\(\w])' + ), + 5 => array( + 'DISALLOWED_AFTER' => '(?![\(\w])' + ), + 7 => array( + 'DISALLOWED_AFTER' => '(?![\(\w])' + ), + 9 => array( + 'DISALLOWED_AFTER' => '(?![\(\w])' + ), + 11 => array( + 'DISALLOWED_AFTER' => '(?![\(\w])' + ), + + 14 => array( + 'DISALLOWED_AFTER' => '(?=\()' + ), + 16 => array( + 'DISALLOWED_AFTER' => '(?=\()' + ), + 18 => array( + 'DISALLOWED_AFTER' => '(?=\()' + ), + 20 => array( + 'DISALLOWED_AFTER' => '(?=\()' + ), + 24 => array( + 'DISALLOWED_AFTER' => '(?=\()' + ), + 26 => array( + 'DISALLOWED_AFTER' => '(?=\()' + ) + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/newlisp.php b/_piecrust/libs/Geshi/geshi/newlisp.php new file mode 100644 index 0000000..b2e0f60 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/newlisp.php @@ -0,0 +1,191 @@ + 'newlisp', + 'COMMENT_SINGLE' => array(1 => ';', 2 => '#'), + 'COMMENT_MULTI' => array('[text]' => '[/text]', '{' => '}'), // also used for strings + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'NUMBERS' => GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_SCI_ZERO, + 'TAB_WIDTH' => 2, + 'KEYWORDS' => array( + 1 => array( + 'NaN?','abort','abs','acos','acosh','add','address','amb','and', + 'append','append-file','apply','args','array','array-list','array?', + 'asin','asinh','assoc','atan','atan2','atanh','atom?','base64-dec', + 'base64-enc','bayes-query','bayes-train','begin','beta','betai', + 'bind','binomial','bits','callback','case','catch','ceil', + 'change-dir','char','chop','clean','close','command-event','cond', + 'cons','constant','context','context?','copy','copy-file','cos', + 'cosh','count','cpymem','crc32','crit-chi2','crit-z','current-line', + 'curry','date','date-value','debug','dec','def-new','default', + 'define','define-macro','delete','delete-file','delete-url', + 'destroy','det','device','difference','directory','directory?', + 'div','do-until','do-while','doargs','dolist','dostring','dotimes', + 'dotree','dump','dup','empty?','encrypt','ends-with','env','erf', + 'error-event','estack','eval','eval-string','exec','exists','exit', + 'exp','expand','explode','factor','fft','file-info','file?', + 'filter','find','find-all','first','flat','float','float?','floor', + 'flt','for','for-all','fork','format','fv','gammai','gammaln','gcd', + 'get-char','get-float','get-int','get-long','get-string','get-url', + 'global','global?','if','if-not','ifft','import','inc','index', + 'inf?','int','integer','integer?','intersect','invert','irr','join', + 'lambda','lambda?','last','last-error','legal?','length','let', + 'letex','letn','list','list?','load','local','log','lookup', + 'lower-case','macro?','main-args','make-dir','map','mat','match', + 'max','member','min','mod','mul','multiply','name','net-accept', + 'net-close','net-connect','net-error','net-eval','net-interface', + 'net-listen','net-local','net-lookup','net-peek','net-peer', + 'net-ping','net-receive','net-receive-from','net-receive-udp', + 'net-select','net-send','net-send-to','net-send-udp','net-service', + 'net-sessions','new','nil','nil?','normal','not','now','nper','npv', + 'nth','null?','number?','open','or','pack','parse','parse-date', + 'peek','pipe','pmt','pop','pop-assoc','post-url','pow', + 'pretty-print','primitive?','print','println','prob-chi2','prob-z', + 'process','prompt-event','protected?','push','put-url','pv','quote', + 'quote?','rand','random','randomize','read-buffer','read-char', + 'read-expr','read-file','read-key','read-line','read-utf8', + 'real-path','receive','ref','ref-all','regex','regex-comp', + 'remove-dir','rename-file','replace','reset','rest','reverse', + 'rotate','round','save','search','seed','seek','select','semaphore', + 'send','sequence','series','set','set-locale','set-ref', + 'set-ref-all','setf','setq','sgn','share','signal','silent','sin', + 'sinh','sleep','slice','sort','source','spawn','sqrt','starts-with', + 'string','string?','sub','swap','sym','symbol?','symbols','sync', + 'sys-error','sys-info','tan','tanh','throw','throw-error','time', + 'time-of-day','timer','title-case','trace','trace-highlight', + 'transpose','trim','true','true?','unicode','unify','unique', + 'unless','unpack','until','upper-case','utf8','utf8len','uuid', + 'wait-pid','when','while','write-buffer','write-char','write-file', + 'write-line','xfer-event','xml-error','xml-parse','xml-type-tags', + 'zero?' + ) + ), + 'SYMBOLS' => array( + 0 => array( + '(', ')','\'' + ), + 1 => array( + '!','!=','$','%','&','*','+','-','/',':', + '<','<<','<=','=','>','>=','>>','^','|' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000AA;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #00aa00; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #009900;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #009900;' + ), + 'NUMBERS' => array( + 0 => 'color: #777700;' + ), + 'METHODS' => array( + 0 => 'color: #000099;' + ), + 'SYMBOLS' => array( + 0 => 'color: #AA0000;', + 1 => 'color: #0000AA;' + ), + 'REGEXPS' => array( + 0 => 'color: #00aa00;', + 1 => 'color: #00aa00;', + 2 => 'color: #00aa00;', + 3 => 'color: #00aa00;', + 4 => 'color: #00aa00;', + 5 => 'color: #AA0000;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => 'http://www.newlisp.org/downloads/newlisp_manual.html#{FNAME}' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array(':'), + 'REGEXPS' => array( + // tags in newlispdoc + 0 => "\s+@\S*?\s+", + // dollar sign symbols + 1 => "[\\$]\w*", + // curly-braced string literals + 2 => "{[^{}]*?}", + // [text] multi-line strings + 3 => "(?s)\[text\].*\[\/text\](?-s)", + // [code] multi-line blocks + 4 => "(?s)\[code\].*\[\/code\](?-s)", + // variable references + 5 => "'[\w\-]+" + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'OOLANG' => array( + 'MATCH_AFTER' => '[a-zA-Z][a-zA-Z0-9_\-]*' + ), + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => '(?<=[^\w\-])', + ) + ), + +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/nsis.php b/_piecrust/libs/Geshi/geshi/nsis.php new file mode 100644 index 0000000..2079169 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/nsis.php @@ -0,0 +1,351 @@ + 'NSIS', + 'COMMENT_SINGLE' => array(1 => ';', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'",'"','`'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + '!appendfile', '!addIncludeDir', '!addplugindir', '!cd', '!define', '!delfile', '!echo', '!else', + '!endif', '!error', '!execute', '!ifdef', '!ifmacrodef', '!ifmacrondef', '!ifndef', '!include', + '!insertmacro', '!macro', '!macroend', '!packhdr', '!tempfile', '!system', '!undef', '!verbose', + '!warning' + ), + 2 => array( + 'AddBrandingImage', 'AllowRootDirInstall', 'AutoCloseWindow', 'BGFont', + 'BGGradient', 'BrandingText', 'Caption', 'ChangeUI', 'CheckBitmap', 'CompletedText', 'ComponentText', + 'CRCCheck', 'DetailsButtonText', 'DirShow', 'DirText', 'DirVar', 'DirVerify', 'FileErrorText', + 'Function', 'FunctionEnd', 'Icon', 'InstallButtonText', 'InstallColors', 'InstallDir', + 'InstallDirRegKey', 'InstProgressFlags', 'InstType', 'LangString', 'LangStringUP', 'LicenseBkColor', + 'LicenseData', 'LicenseForceSelection', 'LicenseLangString', 'LicenseText', 'LoadLanguageFile', + 'MiscButtonText', 'Name', 'OutFile', 'Page', 'PageEx', 'PageExEnd', 'Section', + 'SectionEnd', 'SectionGroup', 'SectionGroupEnd', 'SetCompressor', 'SetFont', 'ShowInstDetails', + 'ShowUninstDetails', 'SilentInstall', 'SilentUnInstall', 'SpaceTexts', 'SubCaption', 'SubSection', + 'SubSectionEnd', 'UninstallButtonText', 'UninstallCaption', 'UninstallIcon', 'UninstallSubCaption', + 'UninstallText', 'UninstPage', 'Var', 'VIAddVersionKey', 'VIProductVersion', 'WindowIcon', 'XPStyle' + ), + 3 => array( + 'AddSize', 'AllowSkipFiles', 'FileBufSize', 'GetInstDirError', 'PageCallbacks', + 'SectionIn', 'SetCompress', 'SetCompressionLevel', 'SetCompressorDictSize', + 'SetDatablockOptimize', 'SetDateSave', 'SetOverwrite', 'SetPluginUnload' + ), + 4 => array( + 'Abort', 'BringToFront', 'Call', 'CallInstDLL', 'ClearErrors', 'CopyFiles','CreateDirectory', + 'CreateFont', 'CreateShortCut', 'Delete', 'DeleteINISec', 'DeleteINIStr', 'DeleteRegKey', + 'DeleteRegValue', 'DetailPrint', 'EnableWindow', 'EnumRegKey', 'EnumRegValue', 'Exch', 'Exec', + 'ExecShell', 'ExecWait', 'ExpandEnvStrings', 'File', 'FileClose', 'FileOpen', 'FileRead', + 'FileReadByte', 'FileSeek', 'FileWrite', 'FileWriteByte', 'FindClose', 'FindFirst', 'FindNext', + 'FindWindow', 'FlushINI', 'GetCurInstType', 'GetCurrentAddress', 'GetDlgItem', 'GetDLLVersion', + 'GetDLLVersionLocal', 'GetErrorLevel', 'GetFileTime', 'GetFileTimeLocal', 'GetFullPathName', + 'GetFunctionAddress', 'GetLabelAddress', 'GetTempFileName', 'GetWindowText', 'Goto', 'HideWindow', + 'IfAbort', 'IfErrors', 'IfFileExists', 'IfRebootFlag', 'IfSilent', 'InitPluginsDir', 'InstTypeGetText', + 'InstTypeSetText', 'IntCmp', 'IntCmpU', 'IntFmt', 'IntOp', 'IsWindow', 'LockWindow', 'LogSet', 'LogText', + 'MessageBox', 'Nop', 'Pop', 'Push', 'Quit', 'ReadEnvStr', 'ReadIniStr', 'ReadRegDWORD', 'ReadRegStr', + 'Reboot', 'RegDLL', 'Rename', 'ReserveFile', 'Return', 'RMDir', 'SearchPath', 'SectionGetFlags', + 'SectionGetInstTypes', 'SectionGetSize', 'SectionGetText', 'SectionSetFlags', 'SectionSetInstTypes', + 'SectionSetSize', 'SectionSetText', 'SendMessage', 'SetAutoClose', 'SetBrandingImage', 'SetCtlColors', + 'SetCurInstType', 'SetDetailsPrint', 'SetDetailsView', 'SetErrorLevel', 'SetErrors', 'SetFileAttributes', + 'SetOutPath', 'SetRebootFlag', 'SetShellVarContext', 'SetSilent', 'ShowWindow', 'Sleep', 'StrCmp', + 'StrCpy', 'StrLen', 'UnRegDLL', 'WriteINIStr', 'WriteRegBin', 'WriteRegDWORD', 'WriteRegExpandStr', + 'WriteRegStr', 'WriteUninstaller' + ), + 5 => array( + 'all', 'alwaysoff', 'ARCHIVE', 'auto', 'both', 'bzip2', 'checkbox', 'components', 'current', + 'custom', 'directory', 'false', 'FILE_ATTRIBUTE_ARCHIVE', 'FILE_ATTRIBUTE_HIDDEN', 'FILE_ATTRIBUTE_NORMAL', + 'FILE_ATTRIBUTE_OFFLINE', 'FILE_ATTRIBUTE_READONLY', 'FILE_ATTRIBUTE_SYSTEM,TEMPORARY', + 'FILE_ATTRIBUTE_TEMPORARY', 'force', 'HIDDEN', 'hide', 'HKCC', 'HKCR', 'HKCU', 'HKDD', 'HKEY_CLASSES_ROOT', + 'HKEY_CURRENT_CONFIG', 'HKEY_CURRENT_USER', 'HKEY_DYN_DATA', 'HKEY_LOCAL_MACHINE', 'HKEY_PERFORMANCE_DATA', + 'HKEY_USERS', 'HKLM', 'HKPD', 'HKU', 'IDABORT', 'IDCANCEL', 'IDIGNORE', 'IDNO', 'IDOK', 'IDRETRY', 'IDYES', + 'ifdiff', 'ifnewer', 'instfiles', 'lastused', 'leave', 'license', 'listonly', 'lzma', 'manual', + 'MB_ABORTRETRYIGNORE', 'MB_DEFBUTTON1', 'MB_DEFBUTTON2', 'MB_DEFBUTTON3', 'MB_DEFBUTTON4', + 'MB_ICONEXCLAMATION', 'MB_ICONINFORMATION', 'MB_ICONQUESTION', 'MB_ICONSTOP', 'MB_OK', 'MB_OKCANCEL', + 'MB_RETRYCANCEL', 'MB_RIGHT', 'MB_SETFOREGROUND', 'MB_TOPMOST', 'MB_YESNO', 'MB_YESNOCANCEL', 'nevershow', + 'none', 'normal', 'off', 'OFFLINE', 'on', 'radiobuttons', 'READONLY', 'RO', 'SHCTX', 'SHELL_CONTEXT', 'show', + 'silent', 'silentlog', 'SW_HIDE', 'SW_SHOWMAXIMIZED', 'SW_SHOWMINIMIZED', 'SW_SHOWNORMAL', 'SYSTEM', + 'textonly', 'true', 'try', 'uninstConfirm', 'zlib' + ), + 6 => array( + '/a', '/components', '/COMPONENTSONLYONCUSTOM', '/CUSTOMSTRING', '/e', '/FILESONLY', '/FINAL', '/gray', '/GLOBAL', + '/ifempty', '/IMGID', '/ITALIC', '/lang', '/NOCUSTOM', '/nonfatal', '/NOUNLOAD', '/oname', '/r', '/REBOOTOK', + '/RESIZETOFIT', '/SOLID', '/SD', '/SHORT', '/silent', '/STRIKE', '/TIMEOUT', '/TRIMCENTER', '/TRIMLEFT', + '/TRIMRIGHT', '/UNDERLINE', '/windows', '/x' + ), + 7 => array( + '.onGUIEnd', '.onGUIInit', '.onInit', '.onInstFailed', '.onInstSuccess', '.onMouseOverSection', + '.onRebootFailed', '.onSelChange', '.onUserAbort', '.onVerifyInstDir', 'un.onGUIEnd', 'un.onGUIInit', + 'un.onInit', 'un.onRebootFailed', 'un.onUninstFailed', 'un.onUninstSuccess', 'un.onUserAbort' + ), + 8 => array( + 'MUI.nsh', '"${NSISDIR}\Contrib\Modern UI\System.nsh"', 'MUI_SYSVERSION', 'MUI_ICON', 'MUI_UNICON', + 'MUI_HEADERIMAGE', 'MUI_HEADERIMAGE_BITMAP', 'MUI_HEADERIMAGE_BITMAP_NOSTRETCH', 'MUI_HEADERIMAGE_BITMAP_RTL', + 'MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH', 'MUI_HEADERIMAGE_UNBITMAP', 'MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH', + 'MUI_HEADERIMAGE_UNBITMAP_RTL', 'MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH', 'MUI_HEADERIMAGE_RIGHT', 'MUI_BGCOLOR', + 'MUI_UI', 'MUI_UI_HEADERIMAGE', 'MUI_UI_HEADERIMAGE_RIGHT', 'MUI_UI_COMPONENTSPAGE_SMALLDESC', + 'MUI_UI_COMPONENTSPAGE_NODESC', 'MUI_WELCOMEFINISHPAGE_BITMAP', 'MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH', + 'MUI_WELCOMEFINISHPAGE_INI', 'MUI_UNWELCOMEFINISHPAGE_BITMAP', 'MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH', + 'MUI_UNWELCOMEFINISHPAGE_INI', 'MUI_LICENSEPAGE_BGCOLOR', 'MUI_COMPONENTSPAGE_CHECKBITMAP', + 'MUI_COMPONENTSPAGE_SMALLDESC', 'MUI_COMPONENTSPAGE_NODESC', 'MUI_INSTFILESPAGE_COLORS', + 'MUI_INSTFILESPAGE_PROGRESSBAR', 'MUI_FINISHPAGE_NOAUTOCLOSE', 'MUI_UNFINISHPAGE_NOAUTOCLOSE', + 'MUI_ABORTWARNING', 'MUI_ABORTWARNING_TEXT', 'MUI_UNABORTWARNING', 'MUI_UNABORTWARNING_TEXT', + 'MUI_PAGE_WELCOME', 'MUI_PAGE_LICENSE', 'MUI_PAGE_COMPONENTS', 'MUI_PAGE_DIRECTORY', + 'MUI_PAGE_STARTMENU', 'MUI_PAGE_INSTFILES', 'MUI_PAGE_FINISH', 'MUI_UNPAGE_WELCOME', + 'MUI_UNPAGE_CONFIRM', 'MUI_UNPAGE_LICENSE', 'MUI_UNPAGE_COMPONENTS', 'MUI_UNPAGE_DIRECTORY', + 'MUI_UNPAGE_INSTFILES', 'MUI_UNPAGE_FINISH', 'MUI_PAGE_HEADER_TEXT', 'MUI_PAGE_HEADER_SUBTEXT', + 'MUI_WELCOMEPAGE_TITLE', 'MUI_WELCOMEPAGE_TITLE_3LINES', 'MUI_WELCOMEPAGE_TEXT', + 'MUI_LICENSEPAGE_TEXT_TOP', 'MUI_LICENSEPAGE_TEXT_BOTTOM', 'MUI_LICENSEPAGE_BUTTON', + 'MUI_LICENSEPAGE_CHECKBOX', 'MUI_LICENSEPAGE_CHECKBOX_TEXT', 'MUI_LICENSEPAGE_RADIOBUTTONS', + 'MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT', 'MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE', + 'MUI_COMPONENTSPAGE_TEXT_TOP', 'MUI_COMPONENTSPAGE_TEXT_COMPLIST', 'MUI_COMPONENTSPAGE_TEXT_INSTTYPE', + 'MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE', 'MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO', + 'MUI_DIRECTORYPAGE_TEXT_TOP', 'MUI_DIRECTORYPAGE_TEXT_DESTINATION', 'MUI_DIRECTORYPAGE_VARIABLE', + 'MUI_DIRECTORYPAGE_VERIFYONLEAVE', 'MUI_STARTMENU_WRITE_BEGIN', 'MUI_STARTMENU_WRITE_END', + 'MUI_STARTMENUPAGE_TEXT_TOP', 'MUI_STARTMENUPAGE_TEXT_CHECKBOX', 'MUI_STARTMENUPAGE_DEFAULTFOLDER', + 'MUI_STARTMENUPAGE_NODISABLE', 'MUI_STARTMENUPAGE_REGISTRY_ROOT', 'MUI_STARTMENUPAGE_REGISTRY_KEY', + 'MUI_STARTMENUPAGE_REGISTRY_VALUENAME', 'MUI_INSTFILESPAGE_FINISHHEADER_TEXT', + 'MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT', 'MUI_INSTFILESPAGE_ABORTHEADER_TEXT', + 'MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT', 'MUI_FINISHPAGE_TITLE', 'MUI_FINISHPAGE_TITLE_3LINES', + 'MUI_FINISHPAGE_TEXT', 'MUI_FINISHPAGE_TEXT_LARGE', 'MUI_FINISHPAGE_BUTTON', + 'MUI_FINISHPAGE_TEXT_REBOOT', 'MUI_FINISHPAGE_TEXT_REBOOTNOW', 'MUI_FINISHPAGE_TEXT_REBOOTLATER', + 'MUI_FINISHPAGE_RUN', 'MUI_FINISHPAGE_RUN_TEXT', 'MUI_FINISHPAGE_RUN_PARAMETERS', + 'MUI_FINISHPAGE_RUN_NOTCHECKED', 'MUI_FINISHPAGE_RUN_FUNCTION', 'MUI_FINISHPAGE_SHOWREADME', + 'MUI_FINISHPAGE_SHOWREADME_TEXT', 'MUI_FINISHPAGE_SHOWREADME_NOTCHECKED', + 'MUI_FINISHPAGE_SHOWREADME_FUNCTION', 'MUI_FINISHPAGE_LINK', 'MUI_FINISHPAGE_LINK_LOCATION', + 'MUI_FINISHPAGE_LINK_COLOR', 'MUI_FINISHPAGE_NOREBOOTSUPPORT', 'MUI_UNCONFIRMPAGE_TEXT_TOP', + 'MUI_UNCONFIRMPAGE_TEXT_LOCATION', 'MUI_LANGUAGE', 'MUI_LANGDLL_DISPLAY', + 'MUI_LANGDLL_REGISTRY_ROOT', 'MUI_LANGDLL_REGISTRY_KEY', 'MUI_LANGDLL_REGISTRY_VALUENAME', + 'MUI_LANGDLL_WINDOWTITLE', 'MUI_LANGDLL_INFO', 'MUI_LANGDLL_ALWAYSSHOW', + 'MUI_RESERVEFILE_INSTALLOPTIONS', 'MUI_RESERVEFILE_LANGDLL', 'MUI_FUNCTION_DESCRIPTION_BEGIN', + 'MUI_DESCRIPTION_TEXT', 'MUI_FUNCTION_DESCRIPTION_END', 'MUI_INSTALLOPTIONS_EXTRACT', + 'MUI_INSTALLOPTIONS_EXTRACT_AS', 'MUI_HEADER_TEXT', 'MUI_INSTALLOPTIONS_DISPLAY', + 'MUI_INSTALLOPTIONS_INITDIALOG', 'MUI_INSTALLOPTIONS_SHOW', + 'MUI_INSTALLOPTIONS_DISPLAY_RETURN', 'MUI_INSTALLOPTIONS_SHOW_RETURN', + 'MUI_INSTALLOPTIONS_READ', 'MUI_INSTALLOPTIONS_WRITE', + 'MUI_CUSTOMFUNCTION_GUIINIT', 'MUI_CUSTOMFUNCTION_UNGUIINIT', + 'MUI_CUSTOMFUNCTION_ABORT', 'MUI_CUSTOMFUNCTION_UNABORT', + 'MUI_PAGE_CUSTOMFUNCTION_PRE', 'MUI_PAGE_CUSTOMFUNCTION_SHOW', 'MUI_PAGE_CUSTOMFUNCTION_LEAVE', + 'MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT' + ), + 9 => array( + 'LogicLib.nsh', '${LOGICLIB}', 'LOGICLIB_STRCMP', 'LOGICLIB_INT64CMP', 'LOGICLIB_SECTIONCMP', '${If}', '${Unless}', + '${ElseIf}', '${ElseUnless}', '${Else}', '${EndIf}', '${EndUnless}', '${AndIf}', '${AndUnless}', + '${OrIf}', '${OrUnless}', '${IfThen}', '${IfCmd}', '${Select}', '${Case2}', '${Case3}', + '${Case4}', '${Case5}', '${CaseElse}', '${Default}', '${EndSelect}', '${Switch}', + '${Case}', '${EndSwitch}', '${Do}', '${DoWhile}', '${UntilWhile}', '${Continue}', '${Break}', + '${Loop}', '${LoopWhile}', '${LoopUntil}', '${While}', '${ExitWhile}', '${EndWhile}', '${For}', + '${ForEach}', '${ExitFor}', '${Next}', '${Abort}', '${Errors}', '${RebootFlag}', '${Silent}', + '${FileExists}', '${Cmd}', '${SectionIsSelected}', '${SectionIsSectionGroup}', + '${SectionIsSectionGroupEnd}', '${SectionIsBold}', '${SectionIsReadOnly}', + '${SectionIsExpanded}', '${SectionIsPartiallySelected}' + ), + 10 => array( + 'StrFunc.nsh', '${STRFUNC}', '${StrCase}', '${StrClb}', '${StrIOToNSIS}', '${StrLoc}', '${StrNSISToIO}', '${StrRep}', + '${StrSort}', '${StrStr}', '${StrStrAdv}', '${StrTok}', '${StrTrimNewLines}' + ), + 11 => array( + 'UpgradeDLL.nsh', 'UPGRADEDLL_INCLUDED', 'UpgradeDLL' + ), + 12 => array( + 'Sections.nsh', 'SECTIONS_INCLUDED', '${SF_SELECTED}', '${SF_SECGRP}', '${SF_SUBSEC}', '${SF_SECGRPEND}', + '${SF_SUBSECEND}', '${SF_BOLD}', '${SF_RO}', '${SF_EXPAND}', '${SF_PSELECTED}', '${SF_TOGGLED}', + '${SF_NAMECHG}', '${SECTION_OFF}', 'SelectSection', 'UnselectSection', 'ReverseSection', + 'StartRadioButtons', 'RadioButton', 'EndRadioButtons', '${INSTTYPE_0}', '${INSTTYPE_1}', '${INSTTYPE_2}', + '${INSTTYPE_3}', '${INSTTYPE_4}', '${INSTTYPE_5}', '${INSTTYPE_6}', '${INSTTYPE_7}', '${INSTTYPE_8}', + '${INSTTYPE_9}', '${INSTTYPE_10}', '${INSTTYPE_11}', '${INSTTYPE_12}', '${INSTTYPE_13}', '${INSTTYPE_14}', + '${INSTTYPE_15}', '${INSTTYPE_16}', '${INSTTYPE_17}', '${INSTTYPE_18}', '${INSTTYPE_19}', '${INSTTYPE_20}', + '${INSTTYPE_21}', '${INSTTYPE_22}', '${INSTTYPE_23}', '${INSTTYPE_24}', '${INSTTYPE_25}', '${INSTTYPE_26}', + '${INSTTYPE_27}', '${INSTTYPE_28}', '${INSTTYPE_29}', '${INSTTYPE_30}', '${INSTTYPE_31}', '${INSTTYPE_32}', + 'SetSectionInInstType', 'ClearSectionInInstType', 'SetSectionFlag', 'ClearSectionFlag', 'SectionFlagIsSet' + ), + 13 => array( + 'Colors.nsh', 'WHITE', 'BLACK', 'YELLOW', 'RED', 'GREEN', 'BLUE', 'MAGENTA', 'CYAN', 'rgb2hex' + ), + 14 => array( + 'FileFunc.nsh', '${Locate}', '${GetSize}', '${DriveSpace}', '${GetDrives}', '${GetTime}', '${GetFileAttributes}', '${GetFileVersion}', '${GetExeName}', '${GetExePath}', '${GetParameters}', '${GetOptions}', '${GetRoot}', '${GetParent}', '${GetFileName}', '${GetBaseName}', '${GetFileExt}', '${BannerTrimPath}', '${DirState}', '${RefreshShellIcons}' + ), + 15 => array( + 'TextFunc.nsh', '${LineFind}', '${LineRead}', '${FileReadFromEnd}', '${LineSum}', '${FileJoin}', '${TextCompare}', '${ConfigRead}', '${ConfigWrite}', '${FileRecode}', '${TrimNewLines}' + ), + 16 => array( + 'WordFunc.nsh', '${WordFind}', '${WordFind2X}', '${WordFind3X}', '${WordReplace}', '${WordAdd}', '${WordInsert}', '${StrFilter}', '${VersionCompare}', '${VersionConvert}' + ) + ), + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false, + 9 => false, + 10 => false, + 11 => false, + 12 => false, + 13 => false, + 14 => false, + 15 => false, + 16 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000066; font-weight:bold;', + 2 => 'color: #000066;', + 3 => 'color: #003366;', + 4 => 'color: #000099;', + 5 => 'color: #ff6600;', + 6 => 'color: #ff6600;', + 7 => 'color: #006600;', + 8 => 'color: #006600;', + 9 => 'color: #006600;', + 10 => 'color: #006600;', + 11 => 'color: #006600;', + 12 => 'color: #006600;', + 13 => 'color: #006600;', + 14 => 'color: #006600;', + 15 => 'color: #006600;', + 16 => 'color: #006600;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #660066; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => '' + ), + 'STRINGS' => array( + 0 => 'color: #660066;' + ), + 'NUMBERS' => array( + 0 => '' + ), + 'METHODS' => array( + 0 => '' + ), + 'SYMBOLS' => array( + 0 => '' + ), + 'REGEXPS' => array( + 0 => 'color: #660000;', + 1 => 'color: #660000;', + 2 => 'color: #660000;', + 3 => 'color: #660000;', + 4 => 'color: #660000;', + 5 => 'color: #660000;', + 6 => 'color: #660000;', + 7 => 'color: #000099;', + 8 => 'color: #003399;' + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + 9 => '', + 10 => '', + 11 => '', + 12 => '', + 13 => '', + 14 => '', + 15 => '', + 16 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => '\$\$', + 1 => '\$\\r', + 2 => '\$\\n', + 3 => '\$\\t', + 4 => '\$[a-zA-Z0-9_]+', + 5 => '\$\{.{1,256}\}', + 6 => '\$\\\(.{1,256}\\\)', + 7 => array( + GESHI_SEARCH => '([^:\/\\\*\?\"\<\>(?:)\s]*?)(::)([^:\/\\\*\?\"\<\>(?:)\s]*?)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '\\2\\3' + ), + 8 => array( + GESHI_SEARCH => '([^:\/\\\*\?\"\<\>(?:)\s]*?)(::)([^:\/\\\*\?\"\<\>(?:)]*?\s)', + GESHI_REPLACE => '\\3', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1\\2', + GESHI_AFTER => '' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/oberon2.php b/_piecrust/libs/Geshi/geshi/oberon2.php new file mode 100644 index 0000000..1fd99e2 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/oberon2.php @@ -0,0 +1,135 @@ + 'Oberon-2', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('(*' => '*)'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'HARDQUOTE' => array("'", "'"), + 'HARDESCAPE' => array("''"), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'ARRAY', 'BEGIN', 'BY', 'CASE', + 'CONST', 'DIV', 'DO', 'ELSE', 'ELSIF', 'END', + 'EXIT', 'FOR', 'IF', 'IMPORT', 'IN', 'IS', + 'LOOP', 'MOD', 'MODULE', 'OF', + 'OR', 'POINTER', 'PROCEDURE', 'RECORD', + 'REPEAT', 'RETURN', 'THEN', 'TO', + 'TYPE', 'UNTIL', 'VAR', 'WHILE', 'WITH' + ), + 2 => array( + 'NIL', 'FALSE', 'TRUE', + ), + 3 => array( + 'ABS', 'ASH', 'ASSERT', 'CAP', 'CHR', 'COPY', 'DEC', + 'ENTIER', 'EXCL', 'HALT', 'INC', 'INCL', 'LEN', + 'LONG', 'MAX', 'MIN', 'NEW', 'ODD', 'ORD', 'SHORT', 'SIZE' + ), + 4 => array( + 'BOOLEAN', 'CHAR', 'SHORTINT', 'LONGINT', + 'INTEGER', 'LONGREAL', 'REAL', 'SET', 'PTR' + ), + ), + 'SYMBOLS' => array( + ',', ':', '=', '+', '-', '*', '/', '#', '~' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;', + 4 => 'color: #000066; font-weight: bold;' + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;', + 'HARD' => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #0066ee;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/objc.php b/_piecrust/libs/Geshi/geshi/objc.php new file mode 100644 index 0000000..a6a8b23 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/objc.php @@ -0,0 +1,358 @@ + 'Objective-C', + 'COMMENT_SINGLE' => array( + //Compiler directives + 1 => '#', + //Single line C-Comments + 2 => '//' + ), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Multiline Continuation for single-line comment + 2 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', + //Pseudo-Highlighting of the @-sign before strings + 3 => "/@(?=\")/" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', "'"), + 'ESCAPE_CHAR' => '\\', + + 'KEYWORDS' => array( + // Objective-C keywords + 1 => array( + 'while', 'switch', 'return', 'in', 'if', 'goto', 'foreach', 'for', + 'else', 'do', 'default', 'continue', 'case', '@try', '@throw', + '@synthesize', '@synchronized', '@selector', '@public', '@protocol', + '@protected', '@property', '@private', '@interface', + '@implementation', '@finally', '@end', '@encode', '@defs', '@class', + '@catch' + ), + // Macros and constants + 2 => array( + 'YES', 'USHRT_MAX', 'ULONG_MAX', 'UINT_MAX', 'UCHAR_MAX', 'true', + 'TMP_MAX', 'stdout', 'stdin', 'stderr', 'SIGTERM', 'SIGSEGV', + 'SIGINT', 'SIGILL', 'SIG_IGN', 'SIGFPE', 'SIG_ERR', 'SIG_DFL', + 'SIGABRT', 'SHRT_MIN', 'SHRT_MAX', 'SEEK_SET', 'SEEK_END', + 'SEEK_CUR', 'SCHAR_MIN', 'SCHAR_MAX', 'RAND_MAX', 'NULL', + 'NO', 'nil', 'Nil', 'L_tmpnam', 'LONG_MIN', 'LONG_MAX', + 'LDBL_MIN_EXP', 'LDBL_MIN', 'LDBL_MAX_EXP', 'LDBL_MAX', + 'LDBL_MANT_DIG', 'LDBL_EPSILON', 'LDBL_DIG', 'INT_MIN', 'INT_MAX', + 'HUGE_VAL', 'FOPEN_MAX', 'FLT_ROUNDS', 'FLT_RADIX', 'FLT_MIN_EXP', + 'FLT_MIN', 'FLT_MAX_EXP', 'FLT_MAX', 'FLT_MANT_DIG', 'FLT_EPSILON', + 'FLT_DIG', 'FILENAME_MAX', 'false', 'EXIT_SUCCESS', 'EXIT_FAILURE', + 'errno', 'ERANGE', 'EOF', 'enum', 'EDOM', 'DBL_MIN_EXP', 'DBL_MIN', + 'DBL_MAX_EXP', 'DBL_MAX', 'DBL_MANT_DIG', 'DBL_EPSILON', 'DBL_DIG', + 'CLOCKS_PER_SEC', 'CHAR_MIN', 'CHAR_MAX', 'CHAR_BIT', 'BUFSIZ', + 'break' + ), + // C standard library functions + 3 => array( + 'vsprintf', 'vprintf', 'vfprintf', 'va_start', 'va_end', 'va_arg', + 'ungetc', 'toupper', 'tolower', 'tmpname', 'tmpfile', 'time', + 'tanh', 'tan', 'system', 'strxfrm', 'strtoul', 'strtol', 'strtok', + 'strtod', 'strstr', 'strspn', 'strrchr', 'strpbrk', 'strncpy', + 'strncmp', 'strncat', 'strlen', 'strftime', 'strerror', 'strcspn', + 'strcpy', 'strcoll', 'strcmp', 'strchr', 'strcat', 'sscanf', + 'srand', 'sqrt', 'sprintf', 'snprintf', 'sizeof', 'sinh', 'sin', + 'setvbuf', 'setjmp', 'setbuf', 'scanf', 'rewind', 'rename', + 'remove', 'realloc', 'rand', 'qsort', 'puts', 'putchar', 'putc', + 'printf', 'pow', 'perror', 'offsetof', 'modf', 'mktime', 'memset', + 'memmove', 'memcpy', 'memcmp', 'memchr', 'malloc', 'longjmp', + 'log10', 'log', 'localtime', 'ldiv', 'ldexp', 'labs', 'isxdigit', + 'isupper', 'isspace', 'ispunct', 'isprint', 'islower', + 'isgraph', 'isdigit', 'iscntrl', 'isalpha', 'isalnum', 'gmtime', + 'gets', 'getenv', 'getchar', 'getc', 'fwrite', 'ftell', 'fsetpos', + 'fseek', 'fscanf', 'frexp', 'freopen', 'free', 'fread', 'fputs', + 'fputc', 'fprintf', 'fopen', 'fmod', 'floor', 'fgets', 'fgetpos', + 'fgetc', 'fflush', 'ferror', 'feof', 'fclose', 'fabs', 'exp', + 'exit', 'div', 'difftime', 'ctime', 'cosh', 'cos', 'clock', + 'clearerr', 'ceil', 'calloc', 'bsearch', 'atol', 'atoi', 'atof', + 'atexit', 'atan2', 'atan', 'assert', 'asin', 'asctime', 'acos', + 'abs', 'abort' + ), + // Data types (C, Objective-C, Cocoa) + 4 => array( + 'volatile', 'void', 'va_list', 'unsigned', 'union', 'typedef', 'tm', + 'time_t', 'struct', 'string', 'static', 'size_t', + 'signed', 'signal', 'short', 'SEL', 'register', 'raise', + 'ptrdiff_t', 'NSZone', 'NSRect', 'NSRange', 'NSPoint', 'long', + 'ldiv_t', 'jmp_buf', 'int', 'IMP', 'id', 'fpos_t', 'float', 'FILE', + 'extern', 'double', 'div_t', 'const', 'clock_t', 'Class', 'char', + 'BOOL', 'auto' + ), + // Foundation classes + 5 => array( + 'NSXMLParser', 'NSXMLNode', 'NSXMLElement', 'NSXMLDTDNode', + 'NSXMLDTD', 'NSXMLDocument', 'NSWhoseSpecifier', + 'NSValueTransformer', 'NSValue', 'NSUserDefaults', 'NSURLResponse', + 'NSURLRequest', 'NSURLProtocol', 'NSURLProtectionSpace', + 'NSURLHandle', 'NSURLDownload', 'NSURLCredentialStorage', + 'NSURLCredential', 'NSURLConnection', 'NSURLCache', + 'NSURLAuthenticationChallenge', 'NSURL', 'NSUniqueIDSpecifier', + 'NSUndoManager', 'NSUnarchiver', 'NSTimeZone', 'NSTimer', + 'NSThread', 'NSTask', 'NSString', 'NSStream', 'NSSpellServer', + 'NSSpecifierTest', 'NSSortDescriptor', 'NSSocketPortNameServer', + 'NSSocketPort', 'NSSetCommand', 'NSSet', 'NSSerializer', + 'NSScriptWhoseTest', 'NSScriptSuiteRegistry', + 'NSScriptObjectSpecifier', 'NSScriptExecutionContext', + 'NSScriptCommandDescription', 'NSScriptCommand', + 'NSScriptCoercionHandler', 'NSScriptClassDescription', 'NSScanner', + 'NSRunLoop', 'NSRelativeSpecifier', 'NSRecursiveLock', + 'NSRangeSpecifier', 'NSRandomSpecifier', 'NSQuitCommand', 'NSProxy', + 'NSProtocolChecker', 'NSPropertySpecifier', + 'NSPropertyListSerialization', 'NSProcessInfo', 'NSPredicate', + 'NSPositionalSpecifier', 'NSPortNameServer', 'NSPortMessage', + 'NSPortCoder', 'NSPort', 'NSPointerFunctions', 'NSPointerArray', + 'NSPipe', 'NSOutputStream', 'NSOperationQueue', 'NSOperation', + 'NSObject', 'NSNumberFormatter', 'NSNumber', 'NSNull', + 'NSNotificationQueue', 'NSNotificationCenter', 'NSNotification', + 'NSNetServiceBrowser', 'NSNetService', 'NSNameSpecifier', + 'NSMutableURLRequest', 'NSMutableString', 'NSMutableSet', + 'NSMutableIndexSet', 'NSMutableDictionary', 'NSMutableData', + 'NSMutableCharacterSet', 'NSMutableAttributedString', + 'NSMutableArray', 'NSMoveCommand', 'NSMiddleSpecifier', + 'NSMethodSignature', 'NSMetadataQueryResultGroup', + 'NSMetadataQueryAttributeValueTuple', 'NSMetadataQuery', + 'NSMetadataItem', 'NSMessagePortNameServer', 'NSMessagePort', + 'NSMapTable', 'NSMachPort', 'NSMachBootstrapServer', + 'NSLogicalTest', 'NSLock', 'NSLocale', 'NSKeyedUnarchiver', + 'NSKeyedArchiver', 'NSInvocationOperation', 'NSInvocation', + 'NSInputStream', 'NSIndexSpecifier', 'NSIndexSet', 'NSIndexPath', + 'NSHTTPURLResponse', 'NSHTTPCookieStorage', 'NSHTTPCookie', + 'NSHost', 'NSHashTable', 'NSGetCommand', 'NSGarbageCollector', + 'NSFormatter', 'NSFileManager', 'NSFileHandle', 'NSExpression', + 'NSExistsCommand', 'NSException', 'NSError', 'NSEnumerator', + 'NSDistributedNotificationCenter', 'NSDistributedLock', + 'NSDistantObjectRequest', 'NSDistantObject', + 'NSDirectoryEnumerator', 'NSDictionary', 'NSDeserializer', + 'NSDeleteCommand', 'NSDecimalNumberHandler', 'NSDecimalNumber', + 'NSDateFormatter', 'NSDateComponents', 'NSDate', 'NSData', + 'NSCreateCommand', 'NSCountedSet', 'NSCountCommand', 'NSConnection', + 'NSConditionLock', 'NSCondition', 'NSCompoundPredicate', + 'NSComparisonPredicate', 'NSCoder', 'NSCloseCommand', + 'NSCloneCommand', 'NSClassDescription', 'NSCharacterSet', + 'NSCalendarDate', 'NSCalendar', 'NSCachedURLResponse', 'NSBundle', + 'NSAutoreleasePool', 'NSAttributedString', 'NSAssertionHandler', + 'NSArray', 'NSArchiver', 'NSAppleScript', 'NSAppleEventManager', + 'NSAppleEventDescriptor', 'NSAffineTransform' + ), + // Foundation protocols + 6 => array( + 'NSURLProtocolClient', 'NSURLHandleClient', 'NSURLClient', + 'NSURLAuthenticationChallengeSender', 'NSScriptObjectSpecifiers', + 'NSScriptKeyValueCoding', 'NSScriptingComparisonMethods', + 'NSObjCTypeSerializationCallBack', 'NSMutableCopying', + 'NSLocking', 'NSKeyValueObserving', 'NSKeyValueCoding', + 'NSFastEnumeration', 'NSErrorRecoveryAttempting', + 'NSDecimalNumberBehaviors', 'NSCopying', 'NSComparisonMethods', + 'NSCoding' + ), + // AppKit classes + 7 => array( + 'NSWorkspace', 'NSWindowController', 'NSWindow', 'NSViewController', + 'NSViewAnimation', 'NSView', 'NSUserDefaultsController', + 'NSTypesetter', 'NSTreeNode', 'NSTreeController', 'NSTrackingArea', + 'NSToolbarItemGroup', 'NSToolbarItem', 'NSToolbar', + 'NSTokenFieldCell', 'NSTokenField', 'NSTextView', + 'NSTextTableBlock', 'NSTextTable', 'NSTextTab', 'NSTextStorage', + 'NSTextList', 'NSTextFieldCell', 'NSTextField', 'NSTextContainer', + 'NSTextBlock', 'NSTextAttachmentCell', 'NSTextAttachment', 'NSText', + 'NSTabViewItem', 'NSTabView', 'NSTableView', 'NSTableHeaderView', + 'NSTableHeaderCell', 'NSTableColumn', 'NSStepperCell', 'NSStepper', + 'NSStatusItem', 'NSStatusBar', 'NSSplitView', 'NSSpellChecker', + 'NSSpeechSynthesizer', 'NSSpeechRecognizer', 'NSSound', + 'NSSliderCell', 'NSSlider', 'NSSimpleHorizontalTypesetter', + 'NSShadow', 'NSSegmentedControl', 'NSSegmentedCell', + 'NSSecureTextFieldCell', 'NSSecureTextField', 'NSSearchFieldCell', + 'NSSearchField', 'NSScrollView', 'NSScroller', 'NSScreen', + 'NSSavePanel', 'NSRulerView', 'NSRulerMarker', 'NSRuleEditor', + 'NSResponder', 'NSQuickDrawView', 'NSProgressIndicator', + 'NSPrintPanel', 'NSPrintOperation', 'NSPrintInfo', 'NSPrinter', + 'NSPredicateEditorRowTemplate', 'NSPredicateEditor', + 'NSPopUpButtonCell', 'NSPopUpButton', 'NSPICTImageRep', + 'NSPersistentDocument', 'NSPDFImageRep', 'NSPathControl', + 'NSPathComponentCell', 'NSPathCell', 'NSPasteboard', + 'NSParagraphStyle', 'NSPanel', 'NSPageLayout', 'NSOutlineView', + 'NSOpenPanel', 'NSOpenGLView', 'NSOpenGLPixelFormat', + 'NSOpenGLPixelBuffer', 'NSOpenGLContext', 'NSObjectController', + 'NSNibOutletConnector', 'NSNibControlConnector', 'NSNibConnector', + 'NSNib', 'NSMutableParagraphStyle', 'NSMovieView', 'NSMovie', + 'NSMenuView', 'NSMenuItemCell', 'NSMenuItem', 'NSMenu', 'NSMatrix', + 'NSLevelIndicatorCell', 'NSLevelIndicator', 'NSLayoutManager', + 'NSInputServer', 'NSInputManager', 'NSImageView', 'NSImageRep', + 'NSImageCell', 'NSImage', 'NSHelpManager', 'NSGraphicsContext', + 'NSGradient', 'NSGlyphInfo', 'NSGlyphGenerator', 'NSFormCell', + 'NSForm', 'NSFontPanel', 'NSFontManager', 'NSFontDescriptor', + 'NSFont', 'NSFileWrapper', 'NSEvent', 'NSEPSImageRep', 'NSDrawer', + 'NSDocumentController', 'NSDocument', 'NSDockTile', + 'NSDictionaryController', 'NSDatePickerCell', 'NSDatePicker', + 'NSCustomImageRep', 'NSCursor', 'NSController', 'NSControl', + 'NSComboBoxCell', 'NSComboBox', 'NSColorWell', 'NSColorSpace', + 'NSColorPicker', 'NSColorPanel', 'NSColorList', 'NSColor', + 'NSCollectionViewItem', 'NSCollectionView', 'NSClipView', + 'NSCIImageRep', 'NSCell', 'NSCachedImageRep', 'NSButtonCell', + 'NSButton', 'NSBrowserCell', 'NSBrowser', 'NSBox', + 'NSBitmapImageRep', 'NSBezierPath', 'NSATSTypesetter', + 'NSArrayController', 'NSApplication', 'NSAnimationContext', + 'NSAnimation', 'NSAlert', 'NSActionCell' + ), + // AppKit protocols + 8 => array( + 'NSWindowScripting', 'NSValidatedUserInterfaceItem', + 'NSUserInterfaceValidations', 'NSToolTipOwner', + 'NSToolbarItemValidation', 'NSTextInput', + 'NSTableDataSource', 'NSServicesRequests', + 'NSPrintPanelAccessorizing', 'NSPlaceholders', + 'NSPathControlDelegate', 'NSPathCellDelegate', + 'NSOutlineViewDataSource', 'NSNibAwaking', 'NSMenuValidation', + 'NSKeyValueBindingCreation', 'NSInputServiceProvider', + 'NSInputServerMouseTracker', 'NSIgnoreMisspelledWords', + 'NSGlyphStorage', 'NSFontPanelValidation', 'NSEditorRegistration', + 'NSEditor', 'NSDraggingSource', 'NSDraggingInfo', + 'NSDraggingDestination', 'NSDictionaryControllerKeyValuePair', + 'NSComboBoxDataSource', 'NSComboBoxCellDataSource', + 'NSColorPickingDefault', 'NSColorPickingCustom', 'NSChangeSpelling', + 'NSAnimatablePropertyContainer', 'NSAccessibility' + ), + // CoreData classes + 9 => array( + 'NSRelationshipDescription', 'NSPropertyMapping', + 'NSPropertyDescription', 'NSPersistentStoreCoordinator', + 'NSPersistentStore', 'NSMigrationManager', 'NSMappingModel', + 'NSManagedObjectModel', 'NSManagedObjectID', + 'NSManagedObjectContext', 'NSManagedObject', + 'NSFetchRequestExpression', 'NSFetchRequest', + 'NSFetchedPropertyDescription', 'NSEntityMigrationPolicy', + 'NSEntityMapping', 'NSEntityDescription', 'NSAttributeDescription', + 'NSAtomicStoreCacheNode', 'NSAtomicStore' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + 9 => true + ), + // Define the colors for the groups listed above + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #a61390;', // Objective-C keywords + 2 => 'color: #a61390;', // Macros and constants + 3 => 'color: #a61390;', // C standard library functions + 4 => 'color: #a61390;', // data types + 5 => 'color: #400080;', // Foundation classes + 6 => 'color: #2a6f76;', // Foundation protocols + 7 => 'color: #400080;', // AppKit classes + 8 => 'color: #2a6f76;', // AppKit protocols + 9 => 'color: #400080;' // CoreData classes + ), + 'COMMENTS' => array( + 1 => 'color: #6e371a;', // Preprocessor directives + 2 => 'color: #11740a; font-style: italic;', // Normal C single-line comments + 3 => 'color: #bf1d1a;', // Q-sign in front of Strings + 'MULTI' => 'color: #11740a; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #2400d9;' + ), + 'BRACKETS' => array( + 0 => 'color: #002200;' + ), + 'STRINGS' => array( + 0 => 'color: #bf1d1a;' + ), + 'NUMBERS' => array( + 0 => 'color: #2400d9;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #002200;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAME}.html', + 4 => '', + 5 => 'http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/{FNAME}_Class/', + 6 => 'http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Protocols/{FNAME}_Protocol/', + 7 => 'http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/{FNAME}_Class/', + 8 => 'http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Protocols/{FNAME}_Protocol/', + 9 => 'http://developer.apple.com/documentation/Cocoa/Reference/CoreDataFramework/Classes/{FNAME}_Class/' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/objeck.php b/_piecrust/libs/Geshi/geshi/objeck.php new file mode 100644 index 0000000..6bf17de --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/objeck.php @@ -0,0 +1,114 @@ + 'Objeck Programming Language', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array('#~' => '~#'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'virtual', 'if', 'else', 'do', 'while', 'use', 'bundle', 'native', + 'static', 'public', 'private', 'class', 'function', 'method', + 'select', 'other', 'enum', 'for', 'label', 'return', 'from' + ), + 2 => array( + 'Byte', 'Int', 'Nil', 'Float', 'Char', 'Bool' + ), + 3 => array( + 'true', 'false' + ) + ), + 'SYMBOLS' => array( + 1 => array( + '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', '&', '|', ':', ';', ',' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #b1b100;', + 3 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + ), + 'METHODS' => array( + 0 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 1 => 'color: #339933;' + ), + 'REGEXPS' => array(), + 'SCRIPT' => array() + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '->' + ), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/ocaml-brief.php b/_piecrust/libs/Geshi/geshi/ocaml-brief.php new file mode 100644 index 0000000..f450342 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/ocaml-brief.php @@ -0,0 +1,112 @@ + 'OCaml (brief)', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('(*' => '*)'), + 'CASE_KEYWORDS' => 0, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => "", + 'KEYWORDS' => array( + /* main OCaml keywords */ + 1 => array( + 'and', 'as', 'asr', 'begin', 'class', 'closed', 'constraint', 'do', 'done', 'downto', 'else', + 'end', 'exception', 'external', 'failwith', 'false', 'flush', 'for', 'fun', 'function', 'functor', + 'if', 'in', 'include', 'inherit', 'incr', 'land', 'let', 'load', 'los', 'lsl', 'lsr', 'lxor', + 'match', 'method', 'mod', 'module', 'mutable', 'new', 'not', 'of', 'open', 'option', 'or', 'parser', + 'private', 'ref', 'rec', 'raise', 'regexp', 'sig', 'struct', 'stdout', 'stdin', 'stderr', 'then', + 'to', 'true', 'try', 'type', 'val', 'virtual', 'when', 'while', 'with' + ) + ), + /* highlighting symbols is really important in OCaml */ + 'SYMBOLS' => array( + ';', '!', ':', '.', '=', '%', '^', '*', '-', '/', '+', + '>', '<', '(', ')', '[', ']', '&', '|', '#', "'" + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #06c; font-weight: bold;' /* nice blue */ + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #5d478b; font-style: italic;' /* light purple */ + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + 0 => 'color: #6c6;' + ), + 'STRINGS' => array( + 0 => 'color: #3cb371;' /* nice green */ + ), + 'NUMBERS' => array( + 0 => 'color: #c6c;' /* pink */ + ), + 'METHODS' => array( + 1 => 'color: #060;' /* dark green */ + ), + 'REGEXPS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #a52a2a;' /* maroon */ + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/ocaml.php b/_piecrust/libs/Geshi/geshi/ocaml.php new file mode 100644 index 0000000..67d8a76 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/ocaml.php @@ -0,0 +1,187 @@ + 'OCaml', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('(*' => '*)'), + 'COMMENT_REGEXP' => array(1 => '/\(\*(?:(?R)|.)+?\*\)/s'), + 'CASE_KEYWORDS' => 0, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => "", + 'KEYWORDS' => array( + /* main OCaml keywords */ + 1 => array( + 'and', 'as', 'asr', 'begin', 'class', 'closed', 'constraint', 'do', 'done', 'downto', 'else', + 'end', 'exception', 'external', 'failwith', 'false', 'for', 'fun', 'function', 'functor', + 'if', 'in', 'include', 'inherit', 'incr', 'land', 'let', 'load', 'los', 'lsl', 'lsr', 'lxor', + 'match', 'method', 'mod', 'module', 'mutable', 'new', 'not', 'of', 'open', 'option', 'or', 'parser', + 'private', 'ref', 'rec', 'raise', 'regexp', 'sig', 'struct', 'stdout', 'stdin', 'stderr', 'then', + 'to', 'true', 'try', 'type', 'val', 'virtual', 'when', 'while', 'with' + ), + /* define names of main librarys, so we can link to it */ + 2 => array( + 'Arg', 'Arith_status', 'Array', //'Array1', 'Array2', 'Array3', + 'ArrayLabels', 'Big_int', 'Bigarray', 'Buffer', 'Callback', + 'CamlinternalLazy', 'CamlinternalMod', 'CamlinternalOO', 'Char', + 'Complex', 'Condition', 'Dbm', 'Digest', 'Dynlink', 'Event', + 'Filename', 'Format', 'Gc', 'Genlex', 'Graphics', 'GraphicsX11', + 'Hashtbl', 'Int32', 'Int64', 'Lazy', 'Lexing', 'List', 'ListLabels', + 'Map', 'Marshal', 'MoreLabels', 'Mutex', 'Nativeint', 'Num', 'Obj', + 'Oo', 'Parsing', 'Pervasives', 'Printexc', 'Printf', 'Queue', + 'Random', 'Scanf', 'Set', 'Sort', 'Stack', 'StdLabels', 'Str', + 'Stream', 'String', 'StringLabels', 'Sys', 'Thread', 'ThreadUnix', + 'Tk', 'Unix', 'UnixLabels', 'Weak' + ), + /* just link to the Pervasives functions library, cause it's the default opened library when starting OCaml */ + 3 => array( + 'abs', 'abs_float', 'acos', 'asin', 'at_exit', 'atan', 'atan2', + 'bool_of_string', 'ceil', 'char_of_int', 'classify_float', + 'close_in', 'close_in_noerr', 'close_out', 'close_out_noerr', + 'compare', 'cos', 'cosh', 'decr', 'epsilon_float', 'exit', 'exp', + 'float', 'float_of_int', 'float_of_string', 'floor', 'flush', + 'flush_all', 'format_of_string', 'frexp', 'fst', 'ignore', + 'in_channel_length', 'infinity', 'input', 'input_binary_int', + 'input_byte', 'input_char', 'input_line', 'input_value', + 'int_of_char', 'int_of_float', 'int_of_string', 'invalid_arg', + 'ldexp', 'log', 'log10', 'max', 'max_float', 'max_int', 'min', + 'min_float', 'min_int', 'mod_float', 'modf', 'nan', 'open_in', + 'open_in_bin', 'open_in_gen', 'open_out', 'open_out_bin', + 'open_out_gen', 'out_channel_length', 'output', 'output_binary_int', + 'output_byte', 'output_char', 'output_string', 'output_value', + 'pos_in', 'pos_out', 'pred', 'prerr_char', 'prerr_endline', + 'prerr_float', 'prerr_int', 'prerr_newline', 'prerr_string', + 'print_char', 'print_endline', 'print_float', 'print_int', + 'print_newline', 'print_string', 'read_float', 'read_int', + 'read_line', 'really_input', 'seek_in', 'seek_out', + 'set_binary_mode_in', 'set_binary_mode_out', 'sin', 'sinh', 'snd', + 'sqrt', 'string_of_bool', 'string_of_float', 'string_of_format', + 'string_of_int', 'succ', 'tan', 'tanh', 'truncate' + ), + /* here Pervasives Types */ + 4 => array ( + 'array','bool','char','exn','file_descr','format','fpclass', + 'in_channel','int','int32','int64','list','nativeint','open_flag', + 'out_channel','string','Sys_error','unit' + ), + /* finally Pervasives Exceptions */ + 5 => array ( + 'Exit', 'Invalid_Argument', 'Failure', 'Division_by_zero' + ) + ), + /* highlighting symbols is really important in OCaml */ + 'SYMBOLS' => array( + '+.', '-.', '*.', '/.', '[<', '>]', + ';', '!', ':', '.', '=', '%', '^', '*', '-', '/', '+', + '>', '<', '(', ')', '[', ']', '&', '|', '#', "'", + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => true, /* functions name are case sensitive */ + 3 => true, /* types name too */ + 4 => true, /* pervasives types */ + 5 => true /* pervasives exceptions */ + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #06c; font-weight: bold;', /* nice blue */ + 2 => 'color: #06c; font-weight: bold;', /* nice blue */ + 3 => 'color: #06c; font-weight: bold;', /* nice blue */ + 4 => 'color: #06c; font-weight: bold;', /* nice blue */ + 5 => 'color: #06c; font-weight: bold;' /* nice blue */ + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #5d478b; font-style: italic;', /* light purple */ + 1 => 'color: #5d478b; font-style: italic;' /* light purple */ + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + 0 => 'color: #a52a2a;' + ), + 'STRINGS' => array( + 0 => 'color: #3cb371;' /* nice green */ + ), + 'NUMBERS' => array( + 0 => 'color: #c6c;' /* pink */ + ), + 'METHODS' => array( + 1 => 'color: #060;' /* dark green */ + ), + 'REGEXPS' => array( + 1 => 'font-weight:bold; color:#339933;', + 2 => 'font-weight:bold; color:#993399;' + ), + 'SYMBOLS' => array( + 0 => 'color: #a52a2a;' /* maroon */ + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + /* some of keywords are Pervasives functions (land, lxor, asr, ...) */ + 1 => '', + /* link to the wanted library */ + 2 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/{FNAME}.html', + /* link to Pervasives functions */ + 3 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#VAL{FNAME}', + /* link to Pervasives type */ + 4 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#TYPE{FNAME}', + /* link to Pervasives exceptions */ + 5 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#EXCEPTION{FNAME}' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + 1 => '~\w+', + 2 => '`(?=(?-i:[a-z]))\w*', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/oobas.php b/_piecrust/libs/Geshi/geshi/oobas.php new file mode 100644 index 0000000..6418059 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/oobas.php @@ -0,0 +1,135 @@ + 'OpenOffice.org Basic', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array(), + //Single-Line comments using REM keyword + 'COMMENT_REGEXP' => array(2 => '/\bREM.*?$/i'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'dim','private','public','global','as','if','redim','true','set','byval', + 'false','bool','double','integer','long','object','single','variant', + 'msgbox','print','inputbox','green','blue','red','qbcolor', + 'rgb','open','close','reset','freefile','get','input','line', + 'put','write','loc','seek','eof','lof','chdir','chdrive', + 'curdir','dir','fileattr','filecopy','filedatetime','fileexists', + 'filelen','getattr','kill','mkdir','name','rmdir','setattr', + 'dateserial','datevalue','day','month','weekday','year','cdatetoiso', + 'cdatefromiso','hour','minute','second','timeserial','timevalue', + 'date','now','time','timer','erl','err','error','on','goto','resume', + 'and','eqv','imp','not','or','xor','mod','atn','cos','sin','tan','log', + 'exp','rnd','randomize','sqr','fix','int','abs','sgn','hex','oct', + 'it','then','else','select','case','iif','do','loop','for','next','to', + 'while','wend','gosub','return','call','choose','declare', + 'end','exit','freelibrary','function','rem','stop','sub','switch','with', + 'cbool','cdate','cdbl','cint','clng','const','csng','cstr','defbool', + 'defdate','defdbl','defint','deflng','asc','chr','str','val','cbyte', + 'space','string','format','lcase','left','lset','ltrim','mid','right', + 'rset','rtrim','trim','ucase','split','join','converttourl','convertfromurl', + 'instr','len','strcomp','beep','shell','wait','getsystemticks','environ', + 'getsolarversion','getguitype','twipsperpixelx','twipsperpixely', + 'createunostruct','createunoservice','getprocessservicemanager', + 'createunodialog','createunolistener','createunovalue','thiscomponent', + 'globalscope' + ) + ), + 'SYMBOLS' => array( + '(', ')', '=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080;', + 2 => 'color: #808080;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/oracle11.php b/_piecrust/libs/Geshi/geshi/oracle11.php new file mode 100644 index 0000000..8444d00 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/oracle11.php @@ -0,0 +1,614 @@ + 'Oracle 11 SQL', + 'COMMENT_SINGLE' => array(1 => '--'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array("'", '"', '`'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( +//Put your package names here - e.g. select distinct ''''|| lower(name) || ''',' from user_source; +// 6 => array( +// ), + +//Put your table names here - e.g. select distinct ''''|| lower(table_name) || ''',' from user_tables; +// 5 => array( +// ), + +//Put your view names here - e.g. select distinct ''''|| lower(view_name) || ''',' from user_views; +// 4 => array( +// ), + +//Put your table field names here - e.g. select distinct ''''|| lower(column_name) || ''',' from user_tab_columns; +// 3 => array( +// ), + + //Put ORACLE reserved keywords here (11i). I like mine uppercase. + 1 => array( + 'ABS', + 'ACCESS', + 'ACOS', + 'ADD', + 'ADD_MONTHS', + 'ALL', + 'ALTER', + 'ANALYZE', + 'AND', + 'ANY', + 'APPENDCHILDXML', + 'ARRAY', + 'AS', + 'ASC', + 'ASCII', + 'ASCIISTR', + 'ASIN', + 'ASSOCIATE', + 'AT', + 'ATAN', + 'ATAN2', + 'AUDIT', + 'AUTHID', + 'AVG', + 'BEGIN', + 'BETWEEN', + 'BFILENAME', + 'BIN_TO_NUM', + 'BINARY_INTEGER', + 'BITAND', + 'BODY', + 'BOOLEAN', + 'BULK', + 'BY', + 'CALL', + 'CARDINALITY', + 'CASCADE', + 'CASE', + 'CAST', + 'CEIL', + 'CHAR', + 'CHAR_BASE', + 'CHARTOROWID', + 'CHECK', + 'CHR', + 'CLOSE', + 'CLUSTER', + 'CLUSTER_ID', + 'CLUSTER_PROBABILITY', + 'CLUSTER_SET', + 'COALESCE', + 'COLLECT', + 'COLUMN', + 'COMMENT', + 'COMMIT', + 'COMPOSE', + 'COMPRESS', + 'CONCAT', + 'CONNECT', + 'CONSTANT', + 'CONSTRAINT', + 'CONSTRAINTS', + 'CONTEXT', + 'CONTROLFILE', + 'CONVERT', + 'CORR', + 'CORR_K', + 'CORR_S', + 'COS', + 'COSH', + 'COST', + 'COUNT', + 'COVAR_POP', + 'COVAR_SAMP', + 'CREATE', + 'CUBE_TABLE', + 'CUME_DIST', + 'CURRENT', + 'CURRENT_DATE', + 'CURRENT_TIMESTAMP', + 'CURRVAL', + 'CURSOR', + 'CV', + 'DATABASE', + 'DATAOBJ_TO_PARTITION', + 'DATE', + 'DAY', + 'DBTIMEZONE', + 'DECIMAL', + 'DECLARE', + 'DECODE', + 'DECOMPOSE', + 'DEFAULT', + 'DELETE', + 'DELETEXML', + 'DENSE_RANK', + 'DEPTH', + 'DEREF', + 'DESC', + 'DIMENSION', + 'DIRECTORY', + 'DISASSOCIATE', + 'DISTINCT', + 'DO', + 'DROP', + 'DUMP', + 'ELSE', + 'ELSIF', + 'EMPTY_BLOB', + 'EMPTY_CLOB', + 'END', + 'EXCEPTION', + 'EXCLUSIVE', + 'EXEC', + 'EXECUTE', + 'EXISTS', + 'EXISTSNODE', + 'EXIT', + 'EXP', + 'EXPLAIN', + 'EXTENDS', + 'EXTRACT', + 'EXTRACTVALUE', + 'FALSE', + 'FEATURE_ID', + 'FEATURE_SET', + 'FEATURE_VALUE', + 'FETCH', + 'FILE', + 'FIRST', + 'FIRST_VALUE', + 'FLOAT', + 'FLOOR', + 'FOR', + 'FORALL', + 'FROM', + 'FROM_TZ', + 'FUNCTION', + 'GOTO', + 'GRANT', + 'GREATEST', + 'GROUP', + 'GROUP_ID', + 'GROUPING', + 'GROUPING_ID', + 'HAVING', + 'HEAP', + 'HEXTORAW', + 'HOUR', + 'IDENTIFIED', + 'IF', + 'IMMEDIATE', + 'IN', + 'INCREMENT', + 'INDEX', + 'INDEXTYPE', + 'INDICATOR', + 'INITCAP', + 'INITIAL', + 'INSERT', + 'INSERTCHILDXML', + 'INSERTXMLBEFORE', + 'INSTR', + 'INSTRB', + 'INTEGER', + 'INTERFACE', + 'INTERSECT', + 'INTERVAL', + 'INTO', + 'IS', + 'ISOLATION', + 'ITERATION_NUMBER', + 'JAVA', + 'KEY', + 'LAG', + 'LAST', + 'LAST_DAY', + 'LAST_VALUE', + 'LEAD', + 'LEAST', + 'LENGTH', + 'LENGTHB', + 'LEVEL', + 'LIBRARY', + 'LIKE', + 'LIMITED', + 'LINK', + 'LN', + 'LNNVL', + 'LOCALTIMESTAMP', + 'LOCK', + 'LOG', + 'LONG', + 'LOOP', + 'LOWER', + 'LPAD', + 'LTRIM', + 'MAKE_REF', + 'MATERIALIZED', + 'MAX', + 'MAXEXTENTS', + 'MEDIAN', + 'MIN', + 'MINUS', + 'MINUTE', + 'MLSLABEL', + 'MOD', + 'MODE', + 'MODIFY', + 'MONTH', + 'MONTHS_BETWEEN', + 'NANVL', + 'NATURAL', + 'NATURALN', + 'NCHR', + 'NEW', + 'NEW_TIME', + 'NEXT_DAY', + 'NEXTVAL', + 'NLS_CHARSET_DECL_LEN', + 'NLS_CHARSET_ID', + 'NLS_CHARSET_NAME', + 'NLS_INITCAP', + 'NLS_LOWER', + 'NLS_UPPER', + 'NLSSORT', + 'NOAUDIT', + 'NOCOMPRESS', + 'NOCOPY', + 'NOT', + 'NOWAIT', + 'NTILE', + 'NULL', + 'NULLIF', + 'NUMBER', + 'NUMBER_BASE', + 'NUMTODSINTERVAL', + 'NUMTOYMINTERVAL', + 'NVL', + 'NVL2', + 'OCIROWID', + 'OF', + 'OFFLINE', + 'ON', + 'ONLINE', + 'OPAQUE', + 'OPEN', + 'OPERATOR', + 'OPTION', + 'OR', + 'ORA_HASH', + 'ORDER', + 'ORGANIZATION', + 'OTHERS', + 'OUT', + 'OUTLINE', + 'PACKAGE', + 'PARTITION', + 'PATH', + 'PCTFREE', + 'PERCENT_RANK', + 'PERCENTILE_CONT', + 'PERCENTILE_DISC', + 'PLAN', + 'PLS_INTEGER', + 'POSITIVE', + 'POSITIVEN', + 'POWER', + 'POWERMULTISET', + 'POWERMULTISET_BY_CARDINALITY', + 'PRAGMA', + 'PREDICTION', + 'PREDICTION_BOUNDS', + 'PREDICTION_COST', + 'PREDICTION_DETAILS', + 'PREDICTION_PROBABILITY', + 'PREDICTION_SET', + 'PRESENTNNV', + 'PRESENTV', + 'PREVIOUS', + 'PRIMARY', + 'PRIOR', + 'PRIVATE', + 'PRIVILEGES', + 'PROCEDURE', + 'PROFILE', + 'PUBLIC', + 'RAISE', + 'RANGE', + 'RANK', + 'RATIO_TO_REPORT', + 'RAW', + 'RAWTOHEX', + 'RAWTONHEX', + 'REAL', + 'RECORD', + 'REF', + 'REFTOHEX', + 'REGEXP_COUNT', + 'REGEXP_INSTR', + 'REGEXP_REPLACE', + 'REGEXP_SUBSTR', + 'REGR_AVGX', + 'REGR_AVGY', + 'REGR_COUNT', + 'REGR_INTERCEPT', + 'REGR_R2', + 'REGR_SLOPE', + 'REGR_SXX', + 'REGR_SXY', + 'REGR_SYY', + 'RELEASE', + 'REMAINDER', + 'RENAME', + 'REPLACE', + 'RESOURCE', + 'RETURN', + 'RETURNING', + 'REVERSE', + 'REVOKE', + 'ROLE', + 'ROLLBACK', + 'ROUND', + 'ROW', + 'ROW_NUMBER', + 'ROWID', + 'ROWIDTOCHAR', + 'ROWIDTONCHAR', + 'ROWNUM', + 'ROWS', + 'ROWTYPE', + 'RPAD', + 'RTRIM', + 'SAVEPOINT', + 'SCHEMA', + 'SCN_TO_TIMESTAMP', + 'SECOND', + 'SEGMENT', + 'SELECT', + 'SEPERATE', + 'SEQUENCE', + 'SESSION', + 'SESSIONTIMEZONE', + 'SET', + 'SHARE', + 'SIGN', + 'SIN', + 'SINH', + 'SIZE', + 'SMALLINT', + 'SOUNDEX', + 'SPACE', + 'SQL', + 'SQLCODE', + 'SQLERRM', + 'SQRT', + 'START', + 'STATISTICS', + 'STATS_BINOMIAL_TEST', + 'STATS_CROSSTAB', + 'STATS_F_TEST', + 'STATS_KS_TEST', + 'STATS_MODE', + 'STATS_MW_TEST', + 'STATS_ONE_WAY_ANOVA', + 'STATS_T_TEST_INDEP', + 'STATS_T_TEST_INDEPU', + 'STATS_T_TEST_ONE', + 'STATS_T_TEST_PAIRED', + 'STATS_WSR_TEST', + 'STDDEV', + 'STDDEV_POP', + 'STDDEV_SAMP', + 'STOP', + 'SUBSTR', + 'SUBSTRB', + 'SUBTYPE', + 'SUCCESSFUL', + 'SUM', + 'SYNONYM', + 'SYS_CONNECT_BY_PATH', + 'SYS_CONTEXT', + 'SYS_DBURIGEN', + 'SYS_EXTRACT_UTC', + 'SYS_GUID', + 'SYS_TYPEID', + 'SYS_XMLAGG', + 'SYS_XMLGEN', + 'SYSDATE', + 'SYSTEM', + 'SYSTIMESTAMP', + 'TABLE', + 'TABLESPACE', + 'TAN', + 'TANH', + 'TEMPORARY', + 'THEN', + 'TIME', + 'TIMESTAMP', + 'TIMESTAMP_TO_SCN', + 'TIMEZONE_ABBR', + 'TIMEZONE_HOUR', + 'TIMEZONE_MINUTE', + 'TIMEZONE_REGION', + 'TIMING', + 'TO', + 'TO_BINARY_DOUBLE', + 'TO_BINARY_FLOAT', + 'TO_CHAR', + 'TO_CLOB', + 'TO_DATE', + 'TO_DSINTERVAL', + 'TO_LOB', + 'TO_MULTI_BYTE', + 'TO_NCHAR', + 'TO_NCLOB', + 'TO_NUMBER', + 'TO_SINGLE_BYTE', + 'TO_TIMESTAMP', + 'TO_TIMESTAMP_TZ', + 'TO_YMINTERVAL', + 'TRANSACTION', + 'TRANSLATE', + 'TREAT', + 'TRIGGER', + 'TRIM', + 'TRUE', + 'TRUNC', + 'TRUNCATE', + 'TYPE', + 'TZ_OFFSET', + 'UI', + 'UID', + 'UNION', + 'UNIQUE', + 'UNISTR', + 'UPDATE', + 'UPDATEXML', + 'UPPER', + 'USE', + 'USER', + 'USERENV', + 'USING', + 'VALIDATE', + 'VALUE', + 'VALUES', + 'VAR_POP', + 'VAR_SAMP', + 'VARCHAR', + 'VARCHAR2', + 'VARIANCE', + 'VIEW', + 'VSIZE', + 'WHEN', + 'WHENEVER', + 'WHERE', + 'WHILE', + 'WIDTH_BUCKET', + 'WITH', + 'WORK', + 'WRITE', + 'XMLAGG', + 'XMLCAST', + 'XMLCDATA', + 'XMLCOLATTVAL', + 'XMLCOMMENT', + 'XMLCONCAT', + 'XMLDIFF', + 'XMLELEMENT', + 'XMLEXISTS', + 'XMLFOREST', + 'XMLPARSE', + 'XMLPATCH', + 'XMLPI', + 'XMLQUERY', + 'XMLROOT', + 'XMLSEQUENCE', + 'XMLSERIALIZE', + 'XMLTABLE', + 'XMLTRANSFORM', + 'YEAR', + 'ZONE' + ) + ), + 'SYMBOLS' => array( + '(', ')', '=', '<', '>', '|', '+', '-', '*', '/', ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, +// 3 => false, +// 4 => false, +// 5 => false, +// 6 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #993333; font-weight: bold; text-transform: uppercase;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #ff0000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', +// 3 => '', +// 4 => '', +// 5 => '', +// 6 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/oracle8.php b/_piecrust/libs/Geshi/geshi/oracle8.php new file mode 100644 index 0000000..7bd1343 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/oracle8.php @@ -0,0 +1,496 @@ + 'Oracle 8 SQL', + 'COMMENT_SINGLE' => array(1 => '--'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array("'", '"', '`'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( +//Put your package names here - e.g. select distinct ''''|| lower(name) || ''',' from user_source; +// 6 => array( +// ), + +//Put your table names here - e.g. select distinct ''''|| lower(table_name) || ''',' from user_tables; +// 5 => array( +// ), + +//Put your view names here - e.g. select distinct ''''|| lower(view_name) || ''',' from user_views; +// 4 => array( +// ), + +//Put your table field names here - e.g. select distinct ''''|| lower(column_name) || ''',' from user_tab_columns; +// 3 => array( +// ), + +//Put ORACLE reserved keywords here (8.1.7). I like mine uppercase. + 1 => array( + 'ABS', + 'ACCESS', + 'ACOS', + 'ADD', + 'ADD_MONTHS', + 'ALL', + 'ALTER', + 'ANALYZE', + 'AND', + 'ANY', + 'ARRAY', + 'AS', + 'ASC', + 'ASCII', + 'ASIN', + 'ASSOCIATE', + 'AT', + 'ATAN', + 'ATAN2', + 'AUDIT', + 'AUTHID', + 'AVG', + 'BEGIN', + 'BETWEEN', + 'BFILENAME', + 'BINARY_INTEGER', + 'BITAND', + 'BODY', + 'BOOLEAN', + 'BULK', + 'BY', + 'CALL', + 'CASCADE', + 'CASE', + 'CEIL', + 'CHAR', + 'CHAR_BASE', + 'CHARTOROWID', + 'CHECK', + 'CHR', + 'CLOSE', + 'CLUSTER', + 'COALESCE', + 'COLLECT', + 'COLUMN', + 'COMMENT', + 'COMMIT', + 'COMPRESS', + 'CONCAT', + 'CONNECT', + 'CONSTANT', + 'CONSTRAINT', + 'CONSTRAINTS', + 'CONTEXT', + 'CONTROLFILE', + 'CONVERT', + 'CORR', + 'COS', + 'COSH', + 'COST', + 'COUNT', + 'COVAR_POP', + 'COVAR_SAMP', + 'CREATE', + 'CUME_DIST', + 'CURRENT', + 'CURRVAL', + 'CURSOR', + 'DATABASE', + 'DATE', + 'DAY', + 'DECIMAL', + 'DECLARE', + 'DECODE', + 'DEFAULT', + 'DELETE', + 'DENSE_RANK', + 'DEREF', + 'DESC', + 'DIMENSION', + 'DIRECTORY', + 'DISASSOCIATE', + 'DISTINCT', + 'DO', + 'DROP', + 'DUMP', + 'ELSE', + 'ELSIF', + 'EMPTY_BLOB', + 'EMPTY_CLOB', + 'END', + 'EXCEPTION', + 'EXCLUSIVE', + 'EXEC', + 'EXECUTE', + 'EXISTS', + 'EXIT', + 'EXP', + 'EXPLAIN', + 'EXTENDS', + 'EXTRACT', + 'FALSE', + 'FETCH', + 'FILE', + 'FIRST_VALUE', + 'FLOAT', + 'FLOOR', + 'FOR', + 'FORALL', + 'FROM', + 'FUNCTION', + 'GOTO', + 'GRANT', + 'GREATEST', + 'GROUP', + 'GROUPING', + 'HAVING', + 'HEAP', + 'HEXTORAW', + 'HOUR', + 'IDENTIFIED', + 'IF', + 'IMMEDIATE', + 'IN', + 'INCREMENT', + 'INDEX', + 'INDEXTYPE', + 'INDICATOR', + 'INITCAP', + 'INITIAL', + 'INSERT', + 'INSTR', + 'INSTRB', + 'INTEGER', + 'INTERFACE', + 'INTERSECT', + 'INTERVAL', + 'INTO', + 'IS', + 'ISOLATION', + 'JAVA', + 'KEY', + 'LAG', + 'LAST_DAY', + 'LAST_VALUE', + 'LEAD', + 'LEAST', + 'LENGTH', + 'LENGTHB', + 'LEVEL', + 'LIBRARY', + 'LIKE', + 'LIMITED', + 'LINK', + 'LN', + 'LOCK', + 'LOG', + 'LONG', + 'LOOP', + 'LOWER', + 'LPAD', + 'LTRIM', + 'MAKE_REF', + 'MATERIALIZED', + 'MAX', + 'MAXEXTENTS', + 'MIN', + 'MINUS', + 'MINUTE', + 'MLSLABEL', + 'MOD', + 'MODE', + 'MODIFY', + 'MONTH', + 'MONTHS_BETWEEN', + 'NATURAL', + 'NATURALN', + 'NEW', + 'NEW_TIME', + 'NEXT_DAY', + 'NEXTVAL', + 'NLS_CHARSET_DECL_LEN', + 'NLS_CHARSET_ID', + 'NLS_CHARSET_NAME', + 'NLS_INITCAP', + 'NLS_LOWER', + 'NLS_UPPER', + 'NLSSORT', + 'NOAUDIT', + 'NOCOMPRESS', + 'NOCOPY', + 'NOT', + 'NOWAIT', + 'NTILE', + 'NULL', + 'NULLIF', + 'NUMBER', + 'NUMBER_BASE', + 'NUMTODSINTERVAL', + 'NUMTOYMINTERVAL', + 'NVL', + 'NVL2', + 'OCIROWID', + 'OF', + 'OFFLINE', + 'ON', + 'ONLINE', + 'OPAQUE', + 'OPEN', + 'OPERATOR', + 'OPTION', + 'OR', + 'ORDER', + 'ORGANIZATION', + 'OTHERS', + 'OUT', + 'OUTLINE', + 'PACKAGE', + 'PARTITION', + 'PCTFREE', + 'PERCENT_RANK', + 'PLAN', + 'PLS_INTEGER', + 'POSITIVE', + 'POSITIVEN', + 'POWER', + 'PRAGMA', + 'PRIMARY', + 'PRIOR', + 'PRIVATE', + 'PRIVILEGES', + 'PROCEDURE', + 'PROFILE', + 'PUBLIC', + 'RAISE', + 'RANGE', + 'RANK', + 'RATIO_TO_REPORT', + 'RAW', + 'RAWTOHEX', + 'REAL', + 'RECORD', + 'REF', + 'REFTOHEX', + 'REGR_AVGX', + 'REGR_AVGY', + 'REGR_COUNT', + 'REGR_INTERCEPT', + 'REGR_R2', + 'REGR_SLOPE', + 'REGR_SXX', + 'REGR_SXY', + 'REGR_SYY', + 'RELEASE', + 'RENAME', + 'REPLACE', + 'RESOURCE', + 'RETURN', + 'RETURNING', + 'REVERSE', + 'REVOKE', + 'ROLE', + 'ROLLBACK', + 'ROUND', + 'ROW', + 'ROW_NUMBER', + 'ROWID', + 'ROWIDTOCHAR', + 'ROWNUM', + 'ROWS', + 'ROWTYPE', + 'RPAD', + 'RTRIM', + 'SAVEPOINT', + 'SCHEMA', + 'SECOND', + 'SEGMENT', + 'SELECT', + 'SEPERATE', + 'SEQUENCE', + 'SESSION', + 'SET', + 'SHARE', + 'SIGN', + 'SIN', + 'SINH', + 'SIZE', + 'SMALLINT', + 'SOUNDEX', + 'SPACE', + 'SQL', + 'SQLCODE', + 'SQLERRM', + 'SQRT', + 'START', + 'STATISTICS', + 'STDDEV', + 'STDDEV_POP', + 'STDDEV_SAMP', + 'STOP', + 'SUBSTR', + 'SUBSTRB', + 'SUBTYPE', + 'SUCCESSFUL', + 'SUM', + 'SYNONYM', + 'SYS_CONTEXT', + 'SYS_GUID', + 'SYSDATE', + 'SYSTEM', + 'TABLE', + 'TABLESPACE', + 'TAN', + 'TANH', + 'TEMPORARY', + 'THEN', + 'TIME', + 'TIMESTAMP', + 'TIMEZONE_ABBR', + 'TIMEZONE_HOUR', + 'TIMEZONE_MINUTE', + 'TIMEZONE_REGION', + 'TIMING', + 'TO', + 'TO_CHAR', + 'TO_DATE', + 'TO_LOB', + 'TO_MULTI_BYTE', + 'TO_NUMBER', + 'TO_SINGLE_BYTE', + 'TRANSACTION', + 'TRANSLATE', + 'TRIGGER', + 'TRIM', + 'TRUE', + 'TRUNC', + 'TRUNCATE', + 'TYPE', + 'UI', + 'UID', + 'UNION', + 'UNIQUE', + 'UPDATE', + 'UPPER', + 'USE', + 'USER', + 'USERENV', + 'USING', + 'VALIDATE', + 'VALUE', + 'VALUES', + 'VAR_POP', + 'VAR_SAMP', + 'VARCHAR', + 'VARCHAR2', + 'VARIANCE', + 'VIEW', + 'VSIZE', + 'WHEN', + 'WHENEVER', + 'WHERE', + 'WHILE', + 'WITH', + 'WORK', + 'WRITE', + 'YEAR', + 'ZONE' + ) + ), + 'SYMBOLS' => array( + '(', ')', '=', '<', '>', '|', '+', '-', '*', '/', ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, +// 3 => false, +// 4 => false, +// 5 => false, +// 6 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #993333; font-weight: bold; text-transform: uppercase;' +//Add the styles for groups 3-6 here when used + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #ff0000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', +// 3 => '', +// 4 => '', +// 5 => '', +// 6 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/oxygene.php b/_piecrust/libs/Geshi/geshi/oxygene.php new file mode 100644 index 0000000..a079c84 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/oxygene.php @@ -0,0 +1,152 @@ + 'Oxygene (Delphi Prism)', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('(*' => '*)', '{' => '}'), + //Compiler directives + 'COMMENT_REGEXP' => array(2 => '/{\\$.*?}|\\(\\*\\$.*?\\*\\)/U'), + 'CASE_KEYWORDS' => 0, + 'QUOTEMARKS' => array("'"), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'and', 'begin', 'case', 'const', 'div', 'do', 'downto', 'else', + 'end', 'for', 'function', 'if', 'in', 'mod', 'not', 'of', 'or', + 'procedure', 'repeat', 'record', 'set', 'shl', 'shr', 'then', 'to', + 'type', 'until', 'uses', 'var','while', 'with', 'xor', 'exit', 'break', + 'class', 'constructor', 'inherited', 'private', 'public', 'protected', + 'property', 'As', 'Is', 'Unit', 'Continue', 'Try', 'Except', 'Forward', + 'Interface','Implementation', 'nil', 'out', 'loop', 'namespace', 'true', + 'false', 'new', 'ensure', 'require', 'on', 'event', 'delegate', 'method', + 'raise', 'assembly', 'module', 'using','locking', 'old', 'invariants', 'operator', + 'self', 'async', 'finalizer', 'where', 'yield', 'nullable', 'Future', + 'From', 'Finally', 'dynamic' + ), + 2 => array( + 'override', 'virtual', 'External', 'read', 'add', 'remove','final', 'abstract', + 'empty', 'global', 'locked', 'sealed', 'reintroduce', 'implements', 'each', + 'default', 'partial', 'finalize', 'enum', 'flags', 'result', 'readonly', 'unsafe', + 'pinned', 'matching', 'static', 'has', 'step', 'iterator', 'inline', 'nested', + 'Implies', 'Select', 'Order', 'By', 'Desc', 'Asc', 'Group', 'Join', 'Take', + 'Skip', 'Concat', 'Union', 'Reverse', 'Distinct', 'Into', 'Equals', 'params', + 'sequence', 'index', 'notify', 'Parallel', 'create', 'array', 'Queryable', 'Aspect', + 'volatile' + ), + 3 => array( + 'chr', 'ord', 'inc', 'dec', 'assert', 'iff', 'assigned','futureAssigned', 'length', 'low', 'high', 'typeOf', 'sizeOf', 'disposeAndNil', 'Coalesce', 'unquote' + ), + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, +// 4 => false, + ), + 'SYMBOLS' => array( + 0 => array('(', ')', '[', ']'), + 1 => array('.', ',', ':', ';'), + 2 => array('@', '^'), + 3 => array('=', '+', '-', '*', '/') + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;', +// 4 => 'color: #000066; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #008000; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #ff0000; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000066;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000ff;' + ), + 'METHODS' => array( + 1 => 'color: #000000;' + ), + 'REGEXPS' => array( + 0 => 'color: #9ac;', + 1 => 'color: #ff0000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000066;', + 1 => 'color: #000066;', + 2 => 'color: #000066;', + 3 => 'color: #000066;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', +// 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + //Hex numbers + 0 => '\$[0-9a-fA-F]+', + //Characters + 1 => '\#\$?[0-9]{1,3}' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 2 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/oz.php b/_piecrust/libs/Geshi/geshi/oz.php new file mode 100644 index 0000000..23be8d6 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/oz.php @@ -0,0 +1,144 @@ + 'OZ', + 'COMMENT_SINGLE' => array(1 => '%'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"','\''), + 'ESCAPE_CHAR' => '\\', + 'NUMBERS' => array(), + 'KEYWORDS' => array( + 1 => array( + 'declare','local','in','end','proc','fun','functor','require','prepare', + 'import','export','define','at','case','then','else','of','elseof', + 'elsecase','if','elseif','class','from','prop','attr','feat','meth', + 'self','true','false','unit','div','mod','andthen','orelse','cond','or', + 'dis','choice','not','thread','try','catch','finally','raise','lock', + 'skip','fail','for','do' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true + ), + 'SYMBOLS' => array( + '@', '!', '|', '<-', ':=', '<', '>', '=<', '>=', '<=', '#', '~', '.', + '*', '-', '+', '/', '<:', '>:', '=:', '=<:', '>=:', '\\=', '\\=:', ',', + '!!', '...', '==', '::', ':::' + ), + 'STYLES' => array( + 'REGEXPS' => array( + 1 => 'color: #0000ff;', + 2 => 'color: #00a030;', + 3 => 'color: #bc8f8f;', + 4 => 'color: #0000ff;', + 5 => 'color: #a020f0;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #bc8f8f;' + ), + 'KEYWORDS' => array( + 1 => 'color: #a020f0;' + ), + 'COMMENTS' => array( + 1 => 'color: #B22222;', + 'MULTI' => 'color: #B22222;' + ), + 'STRINGS' => array( + 0 => 'color: #bc8f8f;' + ), + 'SYMBOLS' => array( + 0 => 'color: #a020f0;' + ), + 'BRACKETS' => array(), + 'NUMBERS' => array(), + 'METHODS' => array(), + 'SCRIPT' => array() + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array(), + 'URLS' => array( + 1 => '' + ), + 'REGEXPS' => array( + // function and procedure definition + 1 => array( + GESHI_SEARCH => "(proc|fun)([^{}\n\)]*)(\\{)([\$A-Z\300-\326\330-\336][A-Z\300-\326\330-\336a-z\337-\366\370-\3770-9_.]*)", + GESHI_REPLACE => '\4', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\1\2\3', + GESHI_AFTER => '' + ), + // class definition + 2 => array( + GESHI_SEARCH => "(class)([^A-Z\$]*)([\$A-Z\300-\326\330-\336][A-Z\300-\326\330-\336a-z\337-\366\370-\3770-9_.]*)", + GESHI_REPLACE => '\3\4', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\1\2', + GESHI_AFTER => '' + ), + // single character + 3 => array( + GESHI_SEARCH => "&.", + GESHI_REPLACE => '\0', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + // method definition + 4 => array( + GESHI_SEARCH => "(meth)([^a-zA-Z]+)([a-zA-Z\300-\326\330-\336][A-Z\300-\326\330-\336a-z\337-\366\370-\3770-9]*)", + GESHI_REPLACE => '\3', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\1\2', + GESHI_AFTER => '' + ), + // highlight "[]" + // ([] is actually a keyword, but that causes problems in validation; putting it into symbols doesn't work.) + 5 => array( + GESHI_SEARCH => "\[\]", + GESHI_REPLACE => '\0', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/pascal.php b/_piecrust/libs/Geshi/geshi/pascal.php new file mode 100644 index 0000000..769566f --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/pascal.php @@ -0,0 +1,152 @@ + 'Pascal', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('{' => '}','(*' => '*)'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'HARDQUOTE' => array("'", "'"), + 'HARDESCAPE' => array("''"), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'absolute','asm','assembler','begin','break','case','catch','cdecl', + 'const','constructor','default','destructor','div','do','downto', + 'else','end','except','export','exports','external','far', + 'finalization','finally','for','forward','function','goto','if', + 'implementation','in','index','inherited','initialization','inline', + 'interface','interrupt','label','library','mod','name','not','of', + 'or','overload','override','private','procedure','program', + 'property','protected','public','published','raise','repeat', + 'resourcestring','shl','shr','stdcall','stored','switch','then', + 'to','try','type','unit','until','uses','var','while','xor' + ), + 2 => array( + 'nil', 'false', 'true', + ), + 3 => array( + 'abs','and','arc','arctan','blockread','blockwrite','chr','dispose', + 'cos','eof','eoln','exp','get','ln','new','odd','ord','ordinal', + 'pred','read','readln','sin','sqrt','succ','write','writeln' + ), + 4 => array( + 'ansistring','array','boolean','byte','bytebool','char','file', + 'integer','longbool','longint','object','packed','pointer','real', + 'record','set','shortint','smallint','string','union','word' + ), + ), + 'SYMBOLS' => array( + ',', ':', '=', '+', '-', '*', '/' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;', + 4 => 'color: #000066; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;', + 'HARD' => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #0066ee;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/pcre.php b/_piecrust/libs/Geshi/geshi/pcre.php new file mode 100644 index 0000000..b0bd297 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/pcre.php @@ -0,0 +1,188 @@ + 'PCRE', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array( + ), + 'COMMENT_REGEXP' => array( + // Non-matching groups + 1 => "/(?<=\()\?(?::|(?=\())/", + + // Modifier groups + 2 => "/(?<=\()\?[cdegimopsuxUX\-]+(?::|(?=\)))/", + + // Look-Aheads + 3 => "/(?<=\()\?[!=]/", + + // Look-Behinds + 4 => "/(?<=\()\?<[!=]/", + + // Forward Matching + 5 => "/(?<=\()\?>/", + + // Recursive Matching + 6 => "/(?<=\()\?R(?=\))/", + + // Named Subpattern + 7 => "/(?<=\()\?(?:P?<\w+>|\d+(?=\))|P[=>]\w+(?=\)))/", + + // Back Reference + 8 => "/\\\\(?:[1-9]\d?|g\d+|g\{(?:-?\d+|\w+)\}|k<\w+>|k'\w+'|k\{\w+\})/", + + // Byte sequence: Octal + 9 => "/\\\\[0-7]{2,3}/", + + // Byte sequence: Hex + 10 => "/\\\\x[0-9a-fA-F]{2}/", + + // Byte sequence: Hex + 11 => "/\\\\u[0-9a-fA-F]{4}/", + + // Byte sequence: Hex + 12 => "/\\\\U[0-9a-fA-F]{8}/", + + // Byte sequence: Unicode + 13 => "/\\\\[pP]\{[^}\n]+\}/", + + // One-Char Escapes + 14 => "/\\\\[abdefnrstvwzABCDGSWXZ\\\\\\.\[\]\(\)\{\}\^\\\$\?\+\*]/", + + // Byte sequence: Control-X sequence + 15 => "/\\\\c./", + + // Quantifier + 16 => "/\{(?:\d+,?|\d*,\d+)\}/", + + // Comment Subpattern + 17 => "/(?<=\()\?#[^\)]*/", + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + ), + 'SYMBOLS' => array( + 0 => array('.'), + 1 => array('(', ')'), + 2 => array('[', ']', '|'), + 3 => array('^', '$'), + 4 => array('?', '+', '*'), + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + ), + 'COMMENTS' => array( + 1 => 'color: #993333; font-weight: bold;', + 2 => 'color: #cc3300; font-weight: bold;', + 3 => 'color: #cc0066; font-weight: bold;', + 4 => 'color: #cc0066; font-weight: bold;', + 5 => 'color: #cc6600; font-weight: bold;', + 6 => 'color: #cc00cc; font-weight: bold;', + 7 => 'color: #cc9900; font-weight: bold; font-style: italic;', + 8 => 'color: #cc9900; font-style: italic;', + 9 => 'color: #669933; font-style: italic;', + 10 => 'color: #339933; font-style: italic;', + 11 => 'color: #339966; font-style: italic;', + 12 => 'color: #339999; font-style: italic;', + 13 => 'color: #663399; font-style: italic;', + 14 => 'color: #999933; font-style: italic;', + 15 => 'color: #993399; font-style: italic;', + 16 => 'color: #333399; font-style: italic;', + 17 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;', + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #333399; font-weight: bold;', + 1 => 'color: #993333; font-weight: bold;', + 2 => 'color: #339933; font-weight: bold;', + 3 => 'color: #333399; font-weight: bold;', + 4 => 'color: #333399; font-style: italic;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'BRACKETS' => GESHI_NEVER, + 'NUMBERS' => GESHI_NEVER + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/per.php b/_piecrust/libs/Geshi/geshi/per.php new file mode 100644 index 0000000..797bcab --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/per.php @@ -0,0 +1,302 @@ + 'per', + 'COMMENT_SINGLE' => array(1 => '--', 2 => '#'), + 'COMMENT_MULTI' => array('{' => '}'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + "ACCELERATOR", + "ACCELERATOR2", + "ACTION", + "ALT", + "AND", + "AUTO", + "AUTONEXT", + "AUTOSCALE", + "BETWEEN", + "BOTH", + "BUTTON", + "BUTTONEDIT", + "BUTTONTEXTHIDDEN", + "BY", + "BYTE", + "CANVAS", + "CENTER", + "CHECKBOX", + "CLASS", + "COLOR", + "COLUMNS", + "COMBOBOX", + "COMMAND", + "COMMENT", + "COMMENTS", + "COMPACT", + "COMPRESS", + "CONFIG", + "CONTROL", + "CURRENT", + "DATABASE", + "DATEEDIT", + "DEC", + "DEFAULT", + "DEFAULTS", + "DELIMITERS", + "DISPLAY", + "DISPLAYONLY", + "DOWNSHIFT", + "DYNAMIC", + "EDIT", + "FIXED", + "FOLDER", + "FONTPITCH", + "FORMAT", + "FORMONLY", + "GRID", + "GRIDCHILDRENINPARENT", + "GROUP", + "HBOX", + "HEIGHT", + "HIDDEN", + "HORIZONTAL", + "INCLUDE", + "INITIAL", + "INITIALIZER", + "INPUT", + "INSTRUCTIONS", + "INTERVAL", + "INVISIBLE", + "IS", + "ITEM", + "ITEMS", + "JUSTIFY", + "KEY", + "KEYS", + "LABEL", + "LEFT", + "LIKE", + "LINES", + "MATCHES", + "NAME", + "NOENTRY", + "NONCOMPRESS", + "NORMAL", + "NOT", + "NOUPDATE", + "OPTIONS", + "OR", + "ORIENTATION", + "PACKED", + "PAGE", + "PICTURE", + "PIXELHEIGHT", + "PIXELS", + "PIXELWIDTH", + "POINTS", + "PROGRAM", + "PROGRESSBAR", + "QUERYCLEAR", + "QUERYEDITABLE", + "RADIOGROUP", + "RECORD", + "REQUIRED", + "REVERSE", + "RIGHT", + "SAMPLE", + "SCREEN", + "SCROLL", + "SCROLLBARS", + "SCROLLGRID", + "SECOND", + "SEPARATOR", + "SHIFT", + "SIZE", + "SIZEPOLICY", + "SMALLFLOAT", + "SMALLINT", + "SPACING", + "STRETCH", + "STYLE", + "TABINDEX", + "TABLE", + "TAG", + "TEXT", + "TEXTEDIT", + "THROUGH", + "THRU", + "TITLE", + "TO", + "TOOLBAR", + "TOPMENU", + "TYPE", + "UNHIDABLE", + "UNHIDABLECOLUMNS", + "UNMOVABLE", + "UNMOVABLECOLUMNS", + "UNSIZABLE", + "UNSIZABLECOLUMNS", + "UNSORTABLE", + "UNSORTABLECOLUMNS", + "UPSHIFT", + "USER", + "VALIDATE", + "VALUECHECKED", + "VALUEMAX", + "VALUEMIN", + "VALUEUNCHECKED", + "VARCHAR", + "VARIABLE", + "VBOX", + "VERIFY", + "VERSION", + "VERTICAL", + "TIMESTAMP", + "WANTCOLUMNSANCHORED", /* to be removed! */ + "WANTFIXEDPAGESIZE", + "WANTNORETURNS", + "WANTTABS", + "WHERE", + "WIDGET", + "WIDTH", + "WINDOWSTYLE", + "WITHOUT", + "WORDWRAP", + "X", + "Y", + "ZEROFILL", + "SCHEMA", + "ATTRIBUTES", + "TABLES", + "LAYOUT", + "END" + ), + 2 => array( + "YEAR", + "BLACK", + "BLINK", + "BLUE", + "YELLOW", + "WHITE", + "UNDERLINE", + "CENTURY", + "FRACTION", + "CHAR", + "CHARACTER", + "CHARACTERS", + "CYAN", + "DATE", + "DATETIME", + "DAY", + "DECIMAL", + "FALSE", + "FLOAT", + "GREEN", + "HOUR", + "INT", + "INTEGER", + "MAGENTA", + "MINUTE", + "MONEY", + "NONE", + "NULL", + "REAL", + "RED", + "TRUE", + "TODAY", + "MONTH", + "IMAGE" + ), + ), + 'SYMBOLS' => array( + '+', '-', '*', '?', '=', '/', '%', '>', '<', '^', '!', '|', ':', + '(', ')', '[', ']' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0600FF;', + 2 => 'color: #0000FF; font-weight: bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #008080; font-style: italic;', + 2 => 'color: #008080;', + 'MULTI' => 'color: green' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #008080; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #808080;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;' + ), + 'METHODS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #0000FF;' + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/perl.php b/_piecrust/libs/Geshi/geshi/perl.php new file mode 100644 index 0000000..e66b52f --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/perl.php @@ -0,0 +1,213 @@ + 'Perl', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array( + '=back' => '=cut', + '=head' => '=cut', + '=item' => '=cut', + '=over' => '=cut', + '=begin' => '=cut', + '=end' => '=cut', + '=for' => '=cut', + '=encoding' => '=cut', + '=pod' => '=cut' + ), + 'COMMENT_REGEXP' => array( + //Regular expressions + 2 => "/(?<=[\\s^])(s|tr|y)\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])*\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU", + //Regular expression match variables + 3 => '/\$\d+/', + //Heredoc + 4 => '/<<\s*?([\'"]?)([a-zA-Z0-9]+)\1;[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU', + //Predefined variables + 5 => '/\$(\^[a-zA-Z]?|[\*\$`\'&_\.,+\-~:;\\\\\/"\|%=\?!@#<>\(\)\[\]])(?!\w)|@[_+\-]|%[!]|\$(?=\{)/', + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"','`'), + 'HARDQUOTE' => array("'", "'"), // An optional 2-element array defining the beginning and end of a hard-quoted string + 'HARDESCAPE' => array('\\\'',), + // Things that must still be escaped inside a hard-quoted string + // If HARDQUOTE is defined, HARDESCAPE must be defined + // This will not work unless the first character of each element is either in the + // QUOTEMARKS array or is the ESCAPE_CHAR + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'case', 'do', 'else', 'elsif', 'for', 'if', 'then', 'until', 'while', 'foreach', 'my', + 'xor', 'or', 'and', 'unless', 'next', 'last', 'redo', 'not', 'our', + 'reset', 'continue', 'cmp', 'ne', 'eq', 'lt', 'gt', 'le', 'ge', + ), + 2 => array( + 'use', 'sub', 'new', '__END__', '__DATA__', '__DIE__', '__WARN__', 'BEGIN', + 'STDIN', 'STDOUT', 'STDERR', 'ARGV', 'ARGVOUT' + ), + 3 => array( + 'abs', 'accept', 'alarm', 'atan2', 'bind', 'binmode', 'bless', + 'caller', 'chdir', 'chmod', 'chomp', 'chop', 'chown', 'chr', + 'chroot', 'close', 'closedir', 'connect', 'cos', + 'crypt', 'dbmclose', 'dbmopen', 'defined', 'delete', 'die', + 'dump', 'each', 'endgrent', 'endhostent', 'endnetent', 'endprotoent', + 'endpwent', 'endservent', 'eof', 'eval', 'exec', 'exists', 'exit', + 'exp', 'fcntl', 'fileno', 'flock', 'fork', 'format', 'formline', + 'getc', 'getgrent', 'getgrgid', 'getgrnam', 'gethostbyaddr', + 'gethostbyname', 'gethostent', 'getlogin', 'getnetbyaddr', 'getnetbyname', + 'getnetent', 'getpeername', 'getpgrp', 'getppid', 'getpriority', + 'getprotobyname', 'getprotobynumber', 'getprotoent', 'getpwent', + 'getpwnam', 'getpwuid', 'getservbyname', 'getservbyport', 'getservent', + 'getsockname', 'getsockopt', 'glob', 'gmtime', 'goto', 'grep', + 'hex', 'import', 'index', 'int', 'ioctl', 'join', 'keys', 'kill', + 'lc', 'lcfirst', 'length', 'link', 'listen', 'local', + 'localtime', 'log', 'lstat', 'm', 'map', 'mkdir', 'msgctl', 'msgget', + 'msgrcv', 'msgsnd', 'no', 'oct', 'open', 'opendir', + 'ord', 'pack', 'package', 'pipe', 'pop', 'pos', 'print', + 'printf', 'prototype', 'push', 'qq', 'qr', 'quotemeta', 'qw', + 'qx', 'q', 'rand', 'read', 'readdir', 'readline', 'readlink', 'readpipe', + 'recv', 'ref', 'rename', 'require', 'return', + 'reverse', 'rewinddir', 'rindex', 'rmdir', 's', 'scalar', 'seek', + 'seekdir', 'select', 'semctl', 'semget', 'semop', 'send', 'setgrent', + 'sethostent', 'setnetent', 'setpgrp', 'setpriority', 'setprotoent', + 'setpwent', 'setservent', 'setsockopt', 'shift', 'shmctl', 'shmget', + 'shmread', 'shmwrite', 'shutdown', 'sin', 'sleep', 'socket', 'socketpair', + 'sort', 'splice', 'split', 'sprintf', 'sqrt', 'srand', 'stat', + 'study', 'substr', 'symlink', 'syscall', 'sysopen', 'sysread', + 'sysseek', 'system', 'syswrite', 'tell', 'telldir', 'tie', 'tied', + 'time', 'times', 'tr', 'truncate', 'uc', 'ucfirst', 'umask', 'undef', + 'unlink', 'unpack', 'unshift', 'untie', 'utime', 'values', + 'vec', 'wait', 'waitpid', 'wantarray', 'warn', 'write', 'y' + ) + ), + 'SYMBOLS' => array( + '<', '>', '=', + '!', '@', '~', '&', '|', '^', + '+','-', '*', '/', '%', + ',', ';', '?', '.', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #009966; font-style: italic;', + 3 => 'color: #0000ff;', + 4 => 'color: #cc0000; font-style: italic;', + 5 => 'color: #0000ff;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;', + 'HARD' => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff;', + 4 => 'color: #009999;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://perldoc.perl.org/functions/{FNAMEL}.html' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '->', + 2 => '::' + ), + 'REGEXPS' => array( + //Variable + 0 => '(?:\$[\$#]?|\\\\(?:[@%*]?|\\\\*\$|&)|%[$]?|@[$]?|\*[$]?|&[$]?)[a-zA-Z_][a-zA-Z0-9_]*', + //File Descriptor + 4 => '<[a-zA-Z_][a-zA-Z0-9_]*>', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'COMMENTS' => array( + 'DISALLOWED_BEFORE' => '$' + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/perl6.php b/_piecrust/libs/Geshi/geshi/perl6.php new file mode 100644 index 0000000..57b8514 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/perl6.php @@ -0,0 +1,197 @@ + 'Perl 6', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array('=begin' => '=end'), + 'COMMENT_REGEXP' => array( + //Regular expressions + 2 => "/(?<=[\\s^])(s|tr|y)\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])*\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU", + //Regular expression match variables + 3 => '/\$\d+/', + //Heredoc + 4 => '/<<\s*?([\'"]?)([a-zA-Z0-9]+)\1;[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU', + //Beastly hack to finish highlighting each POD block + 5 => '((?<==end) .+)' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'HARDQUOTE' => array("'", "'"), // An optional 2-element array defining the beginning and end of a hard-quoted string + 'HARDESCAPE' => array('\\\''), + // Things that must still be escaped inside a hard-quoted string + // If HARDQUOTE is defined, HARDESCAPE must be defined + // This will not work unless the first character of each element is either in the + // QUOTEMARKS array or is the ESCAPE_CHAR + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'do', 'else', 'elsif', 'for', 'if', 'then', 'until', + 'while', 'loop', 'repeat', 'my', 'xor', 'or', 'and', + 'unless', 'next', 'last', 'redo', 'not', 'our', 'let', + 'temp', 'state', 'enum', 'constant', 'continue', 'cmp', + 'ne', 'eq', 'lt', 'gt', 'le', 'ge', 'leg', 'div', 'X', + 'Z', 'x', 'xx', 'given', 'when', 'default', 'has', + 'returns', 'of', 'is', 'does', 'where', 'subset', 'but', + 'True', 'False', 'return', 'die', 'fail' + ), + 2 => array( + 'use', 'sub', 'multi', 'method', 'submethod', 'proto', + 'class', 'role', 'grammar', 'regex', 'token', 'rule', + 'new', 'BEGIN', 'END', 'CHECK', 'INIT', 'START', 'FIRST', + 'ENTER', 'LEAVE', 'KEEP', 'UNDO', 'NEXT', 'LAST', 'PRE', + 'POST', 'CATCH', 'CONTROL', 'BUILD' + ), + 3 => array( + 'all', 'any', 'cat', 'classify', 'defined', 'grep', 'first', + 'keys', 'kv', 'join', 'map', 'max', 'min', 'none', 'one', 'pairs', + 'print', 'printf', 'roundrobin', 'pick', 'reduce', 'reverse', 'say', + 'shape', 'sort', 'srand', 'undefine', 'uri', 'values', 'warn', 'zip', + + # Container + 'rotate', 'comb', 'end', 'elems', 'delete', + 'exists', 'pop', 'push', 'shift', 'splice', + 'unshift', 'invert', 'decode', + + # Numeric + 'succ', 'pred', 'abs', 'exp', 'log', + 'log10', 'rand', 'roots', 'cis', 'unpolar', 'i', 'floor', + 'ceiling', 'round', 'truncate', 'sign', 'sqrt', + 'polar', 're', 'im', 'I', 'atan2', 'nude', + 'denominator', 'numerator', + + # Str + 'p5chop', 'chop', 'p5chomp', 'chomp', 'lc', 'lcfirst', + 'uc', 'ucfirst', 'normalize', 'samecase', 'sameaccent', + 'capitalize', 'length', 'chars', 'graphs', 'codes', + 'bytes', 'encode', 'index', 'pack', 'quotemeta', 'rindex', + 'split', 'words', 'flip', 'sprintf', 'fmt', + 'substr', 'trim', 'unpack', 'match', 'subst', 'trans' + ) + ), + 'SYMBOLS' => array( + '<', '>', '=', + '!', '@', '~', '&', '|', '^', + '+','-', '*', '/', '%', + ',', ';', '?', '.', ':', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #009966; font-style: italic;', + 3 => 'color: #0000ff;', + 4 => 'color: #cc0000; font-style: italic;', + 5 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;', + 'HARD' => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + //Variable + 0 => '(?:[$@%]|&)(?:(?:[\^:*?!~]|<)?[a-zA-Z_][a-zA-Z0-9_]*|(?=\.))' + # We treat the . twigil specially so the name can be highlighted as an + # object field (via OBJECT_SPLITTERS). + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'COMMENTS' => array( + 'DISALLOWED_BEFORE' => '$' + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/pf.php b/_piecrust/libs/Geshi/geshi/pf.php new file mode 100644 index 0000000..26cfdcf --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/pf.php @@ -0,0 +1,178 @@ + 'OpenBSD Packet Filter', + 'COMMENT_SINGLE' => array('#'), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + 1 => "/\\$\\{[^\\n\\}]*?\\}/i", + 2 => '/<<-?\s*?(\'?)([a-zA-Z0-9]+)\1\\n.*\\n\\2(?![a-zA-Z0-9])/siU', + 3 => "/\\\\['\"]/siU" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'HARDQUOTE' => array("'", "'"), + 'HARDESCAPE' => array("\'"), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + 1 => "#\\\\[nfrtv\\$\\\"\n]#i", + 2 => "#\\$[a-z_][a-z0-9_]*#i", + 3 => "/\\$\\{[^\\n\\}]*?\\}/i", + 4 => "/\\$\\([^\\n\\)]*?\\)/i", + 5 => "/`[^`]*`/" + ), + 'KEYWORDS' => array( + 1 => array( + 'pass' + ), + 2 => array( + 'block' + ), + 3 => array( + 'quick','keep','state','antispoof','table','persist','file','scrub', + 'set','skip','flags','on' + ), + 4 => array( + 'in','out','proto' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', ';;', '`','=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #009900; font-weight: bold;', + 2 => 'color: #990000; font-weight: bold;', + 3 => 'color: #7a0874;', + 4 => 'color: #336699;' + ), + 'COMMENTS' => array( + 0 => 'color: #666666; font-style: italic;', + 1 => 'color: #800000;', + 2 => 'color: #cc0000; font-style: italic;', + 3 => 'color: #000000; font-weight: bold;' + ), + 'ESCAPE_CHAR' => array( + 1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #007800;', + 3 => 'color: #007800;', + 4 => 'color: #007800;', + 5 => 'color: #780078;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #7a0874; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'color: #CC0000;', + 'HARD' => 'color: #CC0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff00cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #000000; font-weight: bold;' + ), + 'REGEXPS' => array( + 0 => 'color: #007800;', + 1 => 'color: #007800;', + 2 => 'color: #007800;', + 4 => 'color: #007800;', + 5 => 'color: #660033;', + 6 => 'color: #000099; font-weight: bold;', + 7 => 'color: #0000ff;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + //Variables (will be handled by comment_regexps) + 0 => "\\$\\{[a-zA-Z_][a-zA-Z0-9_]*?\\}", + //Variables without braces + 1 => "\\$[a-zA-Z_][a-zA-Z0-9_]*", + //Variable assignment + 2 => "(? "\\$[*#\$\\-\\?!]", + //Parameters of commands + 5 => "(?<=\s)--?[0-9a-zA-Z\-]+(?=[\s=]|$)", + //IPs + 6 => "([0-9]{1,3}\.){3}[0-9]{1,3}", + //Tables + 7 => "(<(.*)>)" + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'COMMENTS' => array( + 'DISALLOWED_BEFORE' => '$' + ), + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(? "(?![\.\-a-zA-Z0-9_%\\/])" + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/php-brief.php b/_piecrust/libs/Geshi/geshi/php-brief.php new file mode 100644 index 0000000..945ea8b --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/php-brief.php @@ -0,0 +1,222 @@ + 'PHP (brief)', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + //Heredoc and Nowdoc syntax + 'COMMENT_REGEXP' => array(3 => '/<<<\s*?(\'?)([a-zA-Z0-9]+)\1[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'HARDQUOTE' => array("'", "'"), + 'HARDESCAPE' => array("\'"), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( + 'include', 'require', 'include_once', 'require_once', + 'for', 'as', 'foreach', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', 'endif', 'switch', 'case', 'endswitch', + 'return', 'break' + ), + 2 => array( + 'null', '__LINE__', '__FILE__', + 'false', '<?php', + 'true', 'var', 'default', + 'function', 'class', 'new', '&new', 'public', 'private', 'interface', 'extends', + 'const', 'self' + ), + 3 => array( + 'func_num_args', 'func_get_arg', 'func_get_args', 'strlen', 'strcmp', 'strncmp', 'strcasecmp', 'strncasecmp', 'each', 'error_reporting', 'define', 'defined', + 'trigger_error', 'user_error', 'set_error_handler', 'restore_error_handler', 'get_declared_classes', 'get_loaded_extensions', + 'extension_loaded', 'get_extension_funcs', 'debug_backtrace', + 'constant', 'bin2hex', 'sleep', 'usleep', 'time', 'mktime', 'gmmktime', 'strftime', 'gmstrftime', 'strtotime', 'date', 'gmdate', 'getdate', 'localtime', 'checkdate', 'flush', 'wordwrap', 'htmlspecialchars', 'htmlentities', 'html_entity_decode', 'md5', 'md5_file', 'crc32', 'getimagesize', 'image_type_to_mime_type', 'phpinfo', 'phpversion', 'phpcredits', 'strnatcmp', 'strnatcasecmp', 'substr_count', 'strspn', 'strcspn', 'strtok', 'strtoupper', 'strtolower', 'strpos', 'strrpos', 'strrev', 'hebrev', 'hebrevc', 'nl2br', 'basename', 'dirname', 'pathinfo', 'stripslashes', 'stripcslashes', 'strstr', 'stristr', 'strrchr', 'str_shuffle', 'str_word_count', 'strcoll', 'substr', 'substr_replace', 'quotemeta', 'ucfirst', 'ucwords', 'strtr', 'addslashes', 'addcslashes', 'rtrim', 'str_replace', 'str_repeat', 'count_chars', 'chunk_split', 'trim', 'ltrim', 'strip_tags', 'similar_text', 'explode', 'implode', 'setlocale', 'localeconv', + 'parse_str', 'str_pad', 'chop', 'strchr', 'sprintf', 'printf', 'vprintf', 'vsprintf', 'sscanf', 'fscanf', 'parse_url', 'urlencode', 'urldecode', 'rawurlencode', 'rawurldecode', 'readlink', 'linkinfo', 'link', 'unlink', 'exec', 'system', 'escapeshellcmd', 'escapeshellarg', 'passthru', 'shell_exec', 'proc_open', 'proc_close', 'rand', 'srand', 'getrandmax', 'mt_rand', 'mt_srand', 'mt_getrandmax', 'base64_decode', 'base64_encode', 'abs', 'ceil', 'floor', 'round', 'is_finite', 'is_nan', 'is_infinite', 'bindec', 'hexdec', 'octdec', 'decbin', 'decoct', 'dechex', 'base_convert', 'number_format', 'fmod', 'ip2long', 'long2ip', 'getenv', 'putenv', 'getopt', 'microtime', 'gettimeofday', 'getrusage', 'uniqid', 'quoted_printable_decode', 'set_time_limit', 'get_cfg_var', 'magic_quotes_runtime', 'set_magic_quotes_runtime', 'get_magic_quotes_gpc', 'get_magic_quotes_runtime', + 'import_request_variables', 'error_log', 'serialize', 'unserialize', 'memory_get_usage', 'var_dump', 'var_export', 'debug_zval_dump', 'print_r','highlight_file', 'show_source', 'highlight_string', 'ini_get', 'ini_get_all', 'ini_set', 'ini_alter', 'ini_restore', 'get_include_path', 'set_include_path', 'restore_include_path', 'setcookie', 'header', 'headers_sent', 'connection_aborted', 'connection_status', 'ignore_user_abort', 'parse_ini_file', 'is_uploaded_file', 'move_uploaded_file', 'intval', 'floatval', 'doubleval', 'strval', 'gettype', 'settype', 'is_null', 'is_resource', 'is_bool', 'is_long', 'is_float', 'is_int', 'is_integer', 'is_double', 'is_real', 'is_numeric', 'is_string', 'is_array', 'is_object', 'is_scalar', + 'ereg', 'ereg_replace', 'eregi', 'eregi_replace', 'split', 'spliti', 'join', 'sql_regcase', 'dl', 'pclose', 'popen', 'readfile', 'rewind', 'rmdir', 'umask', 'fclose', 'feof', 'fgetc', 'fgets', 'fgetss', 'fread', 'fopen', 'fpassthru', 'ftruncate', 'fstat', 'fseek', 'ftell', 'fflush', 'fwrite', 'fputs', 'mkdir', 'rename', 'copy', 'tempnam', 'tmpfile', 'file', 'file_get_contents', 'stream_select', 'stream_context_create', 'stream_context_set_params', 'stream_context_set_option', 'stream_context_get_options', 'stream_filter_prepend', 'stream_filter_append', 'fgetcsv', 'flock', 'get_meta_tags', 'stream_set_write_buffer', 'set_file_buffer', 'set_socket_blocking', 'stream_set_blocking', 'socket_set_blocking', 'stream_get_meta_data', 'stream_register_wrapper', 'stream_wrapper_register', 'stream_set_timeout', 'socket_set_timeout', 'socket_get_status', 'realpath', 'fnmatch', 'fsockopen', 'pfsockopen', 'pack', 'unpack', 'get_browser', 'crypt', 'opendir', 'closedir', 'chdir', 'getcwd', 'rewinddir', 'readdir', 'dir', 'glob', 'fileatime', 'filectime', 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', 'filesize', 'filetype', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'stat', 'lstat', 'chown', + 'touch', 'clearstatcache', 'mail', 'ob_start', 'ob_flush', 'ob_clean', 'ob_end_flush', 'ob_end_clean', 'ob_get_flush', 'ob_get_clean', 'ob_get_length', 'ob_get_level', 'ob_get_status', 'ob_get_contents', 'ob_implicit_flush', 'ob_list_handlers', 'ksort', 'krsort', 'natsort', 'natcasesort', 'asort', 'arsort', 'sort', 'rsort', 'usort', 'uasort', 'uksort', 'shuffle', 'array_walk', 'count', 'end', 'prev', 'next', 'reset', 'current', 'key', 'min', 'max', 'in_array', 'array_search', 'extract', 'compact', 'array_fill', 'range', 'array_multisort', 'array_push', 'array_pop', 'array_shift', 'array_unshift', 'array_splice', 'array_slice', 'array_merge', 'array_merge_recursive', 'array_keys', 'array_values', 'array_count_values', 'array_reverse', 'array_reduce', 'array_pad', 'array_flip', 'array_change_key_case', 'array_rand', 'array_unique', 'array_intersect', 'array_intersect_assoc', 'array_diff', 'array_diff_assoc', 'array_sum', 'array_filter', 'array_map', 'array_chunk', 'array_key_exists', 'pos', 'sizeof', 'key_exists', 'assert', 'assert_options', 'version_compare', 'ftok', 'str_rot13', 'aggregate', + 'session_name', 'session_module_name', 'session_save_path', 'session_id', 'session_regenerate_id', 'session_decode', 'session_register', 'session_unregister', 'session_is_registered', 'session_encode', + 'session_start', 'session_destroy', 'session_unset', 'session_set_save_handler', 'session_cache_limiter', 'session_cache_expire', 'session_set_cookie_params', 'session_get_cookie_params', 'session_write_close', 'preg_match', 'preg_match_all', 'preg_replace', 'preg_replace_callback', 'preg_split', 'preg_quote', 'preg_grep', 'overload', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', 'ctype_lower', 'ctype_graph', 'ctype_print', 'ctype_punct', 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'virtual', 'apache_request_headers', 'apache_note', 'apache_lookup_uri', 'apache_child_terminate', 'apache_setenv', 'apache_response_headers', 'apache_get_version', 'getallheaders', 'mysql_connect', 'mysql_pconnect', 'mysql_close', 'mysql_select_db', 'mysql_create_db', 'mysql_drop_db', 'mysql_query', 'mysql_unbuffered_query', 'mysql_db_query', 'mysql_list_dbs', 'mysql_list_tables', 'mysql_list_fields', 'mysql_list_processes', 'mysql_error', 'mysql_errno', 'mysql_affected_rows', 'mysql_insert_id', 'mysql_result', 'mysql_num_rows', 'mysql_num_fields', 'mysql_fetch_row', 'mysql_fetch_array', 'mysql_fetch_assoc', 'mysql_fetch_object', 'mysql_data_seek', 'mysql_fetch_lengths', 'mysql_fetch_field', 'mysql_field_seek', 'mysql_free_result', 'mysql_field_name', 'mysql_field_table', 'mysql_field_len', 'mysql_field_type', 'mysql_field_flags', 'mysql_escape_string', 'mysql_real_escape_string', 'mysql_stat', + 'mysql_thread_id', 'mysql_client_encoding', 'mysql_get_client_info', 'mysql_get_host_info', 'mysql_get_proto_info', 'mysql_get_server_info', 'mysql_info', 'mysql', 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldlen', 'mysql_fieldtype', 'mysql_fieldflags', 'mysql_selectdb', 'mysql_createdb', 'mysql_dropdb', 'mysql_freeresult', 'mysql_numfields', 'mysql_numrows', 'mysql_listdbs', 'mysql_listtables', 'mysql_listfields', 'mysql_db_name', 'mysql_dbname', 'mysql_tablename', 'mysql_table_name', 'pg_connect', 'pg_pconnect', 'pg_close', 'pg_connection_status', 'pg_connection_busy', 'pg_connection_reset', 'pg_host', 'pg_dbname', 'pg_port', 'pg_tty', 'pg_options', 'pg_ping', 'pg_query', 'pg_send_query', 'pg_cancel_query', 'pg_fetch_result', 'pg_fetch_row', 'pg_fetch_assoc', 'pg_fetch_array', 'pg_fetch_object', 'pg_fetch_all', 'pg_affected_rows', 'pg_get_result', 'pg_result_seek', 'pg_result_status', 'pg_free_result', 'pg_last_oid', 'pg_num_rows', 'pg_num_fields', 'pg_field_name', 'pg_field_num', 'pg_field_size', 'pg_field_type', 'pg_field_prtlen', 'pg_field_is_null', 'pg_get_notify', 'pg_get_pid', 'pg_result_error', 'pg_last_error', 'pg_last_notice', 'pg_put_line', 'pg_end_copy', 'pg_copy_to', 'pg_copy_from', + 'pg_trace', 'pg_untrace', 'pg_lo_create', 'pg_lo_unlink', 'pg_lo_open', 'pg_lo_close', 'pg_lo_read', 'pg_lo_write', 'pg_lo_read_all', 'pg_lo_import', 'pg_lo_export', 'pg_lo_seek', 'pg_lo_tell', 'pg_escape_string', 'pg_escape_bytea', 'pg_unescape_bytea', 'pg_client_encoding', 'pg_set_client_encoding', 'pg_meta_data', 'pg_convert', 'pg_insert', 'pg_update', 'pg_delete', 'pg_select', 'pg_exec', 'pg_getlastoid', 'pg_cmdtuples', 'pg_errormessage', 'pg_numrows', 'pg_numfields', 'pg_fieldname', 'pg_fieldsize', 'pg_fieldtype', 'pg_fieldnum', 'pg_fieldprtlen', 'pg_fieldisnull', 'pg_freeresult', 'pg_result', 'pg_loreadall', 'pg_locreate', 'pg_lounlink', 'pg_loopen', 'pg_loclose', 'pg_loread', 'pg_lowrite', 'pg_loimport', 'pg_loexport', + 'echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die' + ) + ), + 'SYMBOLS' => array( + 1 => array( + '<%', '<%=', '%>', '' + ), + 0 => array( + '(', ')', '[', ']', '{', '}', + '!', '@', '%', '&', '|', '/', + '<', '>', + '=', '-', '+', '*', + '.', ':', ',', ';' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #990000;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #666666; font-style: italic;', + 3 => 'color: #0000cc; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;', + 'HARD' => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', + GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', + ), + 'METHODS' => array( + 1 => 'color: #004000;', + 2 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;', + 1 => 'color: #000000; font-weight: bold;' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff;' + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.php.net/{FNAMEL}' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '->', + 2 => '::' + ), + 'REGEXPS' => array( + //Variables + 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*" + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + ' '?>' + ), + 1 => array( + ' '?>' + ), + 2 => array( + '<%' => '%>' + ), + 3 => array( + '' + ), + 4 => "/(?P<\\?(?>php\b)?)(?:". + "(?>[^\"'?\\/<]+)|". + "\\?(?!>)|". + "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|". + "(?>\"(?>[^\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|". + "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|". + "\\/\\/(?>.*?$)|". + "\\/(?=[^*\\/])|". + "<(?!<<)|". + "<<<(?P\w+)\s.*?\s\k". + ")*(?P\\?>|\Z)/sm", + 5 => "/(?P<%)(?:". + "(?>[^\"'%\\/<]+)|". + "%(?!>)|". + "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|". + "(?>\"(?>[^\\\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|". + "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|". + "\\/\\/(?>.*?$)|". + "\\/(?=[^*\\/])|". + "<(?!<<)|". + "<<<(?P\w+)\s.*?\s\k". + ")*(?P%>)/sm" + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/php.php b/_piecrust/libs/Geshi/geshi/php.php new file mode 100644 index 0000000..a7e8a58 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/php.php @@ -0,0 +1,1114 @@ + 'PHP', + 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Heredoc and Nowdoc syntax + 3 => '/<<<\s*?(\'?)([a-zA-Z0-9]+?)\1[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU', + // phpdoc comments + 4 => '#/\*\*(?![\*\/]).*\*/#sU', + // Advanced # handling + 2 => "/#.*?(?:(?=\?\>)|^)/smi" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'ESCAPE_REGEXP' => array( + //Simple Single Char Escapes + 1 => "#\\\\[nfrtv\$\"\n\\\\]#i", + //Hexadecimal Char Specs + 2 => "#\\\\x[\da-fA-F]{1,2}#i", + //Octal Char Specs + 3 => "#\\\\[0-7]{1,3}#", + //String Parsing of Variable Names + 4 => "#\\$[a-z0-9_]+(?:\\[[a-z0-9_]+\\]|->[a-z0-9_]+)?|(?:\\{\\$|\\$\\{)[a-z0-9_]+(?:\\[('?)[a-z0-9_]*\\1\\]|->[a-z0-9_]+)*\\}#i", + //Experimental extension supporting cascaded {${$var}} syntax + 5 => "#\$[a-z0-9_]+(?:\[[a-z0-9_]+\]|->[a-z0-9_]+)?|(?:\{\$|\$\{)[a-z0-9_]+(?:\[('?)[a-z0-9_]*\\1\]|->[a-z0-9_]+)*\}|\{\$(?R)\}#i", + //Format String support in ""-Strings + 6 => "#%(?:%|(?:\d+\\\\\\\$)?\\+?(?:\x20|0|'.)?-?(?:\d+|\\*)?(?:\.\d+)?[bcdefFosuxX])#" + ), + 'HARDQUOTE' => array("'", "'"), + 'HARDESCAPE' => array("'", "\\"), + 'HARDCHAR' => "\\", + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( + 'as','break','case','continue','default','do','else','elseif', + 'endfor','endforeach','endif','endswitch','endwhile','for', + 'foreach','if','include','include_once','require','require_once', + 'return','switch','throw','while', + + 'echo','print' + ), + 2 => array( + '&new','</script>','<?php','<script language', + 'class','const','declare','extends','function','global','interface', + 'namespace','new','private','protected','public','self','use','var' + ), + 3 => array( + 'abs','acos','acosh','addcslashes','addslashes','aggregate', + 'aggregate_methods','aggregate_methods_by_list', + 'aggregate_methods_by_regexp','aggregate_properties', + 'aggregate_properties_by_list','aggregate_properties_by_regexp', + 'aggregation_info','apache_child_terminate','apache_get_modules', + 'apache_get_version','apache_getenv','apache_lookup_uri', + 'apache_note','apache_request_headers','apache_response_headers', + 'apache_setenv','array','array_change_key_case','array_chunk', + 'array_combine','array_count_values','array_diff', + 'array_diff_assoc','array_diff_key','array_diff_uassoc', + 'array_diff_ukey','array_fill','array_fill_keys','array_filter', + 'array_flip','array_intersect','array_intersect_assoc', + 'array_intersect_key','array_intersect_uassoc', + 'array_intersect_ukey','array_key_exists','array_keys','array_map', + 'array_merge','array_merge_recursive','array_multisort','array_pad', + 'array_pop','array_product','array_push','array_rand', + 'array_reduce','array_reverse','array_search','array_shift', + 'array_slice','array_splice','array_sum','array_udiff', + 'array_udiff_assoc','array_udiff_uassoc','array_uintersect', + 'array_uintersect_assoc','array_uintersect_uassoc','array_unique', + 'array_unshift','array_values','array_walk','array_walk_recursive', + 'arsort','asin','asinh','asort','assert','assert_options','atan', + 'atan2','atanh','base_convert','base64_decode','base64_encode', + 'basename','bcadd','bccomp','bcdiv','bcmod','bcmul', + 'bcompiler_load','bcompiler_load_exe','bcompiler_parse_class', + 'bcompiler_read','bcompiler_write_class','bcompiler_write_constant', + 'bcompiler_write_exe_footer','bcompiler_write_file', + 'bcompiler_write_footer','bcompiler_write_function', + 'bcompiler_write_functions_from_file','bcompiler_write_header', + 'bcompiler_write_included_filename','bcpow','bcpowmod','bcscale', + 'bcsqrt','bcsub','bin2hex','bindec','bindtextdomain', + 'bind_textdomain_codeset','bitset_empty','bitset_equal', + 'bitset_excl','bitset_fill','bitset_from_array','bitset_from_hash', + 'bitset_from_string','bitset_in','bitset_incl', + 'bitset_intersection','bitset_invert','bitset_is_empty', + 'bitset_subset','bitset_to_array','bitset_to_hash', + 'bitset_to_string','bitset_union','blenc_encrypt','bzclose', + 'bzcompress','bzdecompress','bzerrno','bzerror','bzerrstr', + 'bzflush','bzopen','bzread','bzwrite','cal_days_in_month', + 'cal_from_jd','cal_info','cal_to_jd','call_user_func', + 'call_user_func_array','call_user_method','call_user_method_array', + 'ceil','chdir','checkdate','checkdnsrr','chgrp','chmod','chop', + 'chown','chr','chunk_split','class_exists','class_implements', + 'class_parents','classkit_aggregate_methods', + 'classkit_doc_comments','classkit_import','classkit_method_add', + 'classkit_method_copy','classkit_method_redefine', + 'classkit_method_remove','classkit_method_rename','clearstatcache', + 'closedir','closelog','com_create_guid','com_event_sink', + 'com_get_active_object','com_load_typelib','com_message_pump', + 'com_print_typeinfo','compact','confirm_phpdoc_compiled', + 'connection_aborted','connection_status','constant', + 'convert_cyr_string','convert_uudecode','convert_uuencode','copy', + 'cos','cosh','count','count_chars','cpdf_add_annotation', + 'cpdf_add_outline','cpdf_arc','cpdf_begin_text','cpdf_circle', + 'cpdf_clip','cpdf_close','cpdf_closepath', + 'cpdf_closepath_fill_stroke','cpdf_closepath_stroke', + 'cpdf_continue_text','cpdf_curveto','cpdf_end_text','cpdf_fill', + 'cpdf_fill_stroke','cpdf_finalize','cpdf_finalize_page', + 'cpdf_global_set_document_limits','cpdf_import_jpeg','cpdf_lineto', + 'cpdf_moveto','cpdf_newpath','cpdf_open','cpdf_output_buffer', + 'cpdf_page_init','cpdf_rect','cpdf_restore','cpdf_rlineto', + 'cpdf_rmoveto','cpdf_rotate','cpdf_rotate_text','cpdf_save', + 'cpdf_save_to_file','cpdf_scale','cpdf_set_action_url', + 'cpdf_set_char_spacing','cpdf_set_creator','cpdf_set_current_page', + 'cpdf_set_font','cpdf_set_font_directories', + 'cpdf_set_font_map_file','cpdf_set_horiz_scaling', + 'cpdf_set_keywords','cpdf_set_leading','cpdf_set_page_animation', + 'cpdf_set_subject','cpdf_set_text_matrix','cpdf_set_text_pos', + 'cpdf_set_text_rendering','cpdf_set_text_rise','cpdf_set_title', + 'cpdf_set_viewer_preferences','cpdf_set_word_spacing', + 'cpdf_setdash','cpdf_setflat','cpdf_setgray','cpdf_setgray_fill', + 'cpdf_setgray_stroke','cpdf_setlinecap','cpdf_setlinejoin', + 'cpdf_setlinewidth','cpdf_setmiterlimit','cpdf_setrgbcolor', + 'cpdf_setrgbcolor_fill','cpdf_setrgbcolor_stroke','cpdf_show', + 'cpdf_show_xy','cpdf_stringwidth','cpdf_stroke','cpdf_text', + 'cpdf_translate','crack_check','crack_closedict', + 'crack_getlastmessage','crack_opendict','crc32','create_function', + 'crypt','ctype_alnum','ctype_alpha','ctype_cntrl','ctype_digit', + 'ctype_graph','ctype_lower','ctype_print','ctype_punct', + 'ctype_space','ctype_upper','ctype_xdigit','curl_close', + 'curl_copy_handle','curl_errno','curl_error','curl_exec', + 'curl_getinfo','curl_init','curl_multi_add_handle', + 'curl_multi_close','curl_multi_exec','curl_multi_getcontent', + 'curl_multi_info_read','curl_multi_init','curl_multi_remove_handle', + 'curl_multi_select','curl_setopt','curl_setopt_array', + 'curl_version','current','cvsclient_connect','cvsclient_log', + 'cvsclient_login','cvsclient_retrieve','date','date_create', + 'date_date_set','date_default_timezone_get', + 'date_default_timezone_set','date_format','date_isodate_set', + 'date_modify','date_offset_get','date_parse','date_sun_info', + 'date_sunrise','date_sunset','date_time_set','date_timezone_get', + 'date_timezone_set','db_id_list','dba_close','dba_delete', + 'dba_exists','dba_fetch','dba_firstkey','dba_handlers','dba_insert', + 'dba_key_split','dba_list','dba_nextkey','dba_open','dba_optimize', + 'dba_popen','dba_replace','dba_sync','dbase_add_record', + 'dbase_close','dbase_create','dbase_delete_record', + 'dbase_get_header_info','dbase_get_record', + 'dbase_get_record_with_names','dbase_numfields','dbase_numrecords', + 'dbase_open','dbase_pack','dbase_replace_record', + 'dbg_get_all_contexts','dbg_get_all_module_names', + 'dbg_get_all_source_lines','dbg_get_context_name', + 'dbg_get_module_name','dbg_get_profiler_results', + 'dbg_get_source_context','dblist','dbmclose','dbmdelete', + 'dbmexists','dbmfetch','dbmfirstkey','dbminsert','dbmnextkey', + 'dbmopen','dbmreplace','dbx_close','dbx_compare','dbx_connect', + 'dbx_error','dbx_escape_string','dbx_fetch_row','dbx_query', + 'dbx_sort','dcgettext','dcngettext','deaggregate','debug_backtrace', + 'debug_zval_dump','debugbreak','decbin','dechex','decoct','define', + 'defined','define_syslog_variables','deg2rad','dgettext','die', + 'dio_close','dio_open','dio_read','dio_seek','dio_stat','dio_write', + 'dir','dirname','disk_free_space','disk_total_space', + 'diskfreespace','dl','dngettext','docblock_token_name', + 'docblock_tokenize','dom_import_simplexml','domxml_add_root', + 'domxml_attributes','domxml_children','domxml_doc_add_root', + 'domxml_doc_document_element','domxml_doc_get_element_by_id', + 'domxml_doc_get_elements_by_tagname','domxml_doc_get_root', + 'domxml_doc_set_root','domxml_doc_validate','domxml_doc_xinclude', + 'domxml_dump_mem','domxml_dump_mem_file','domxml_dump_node', + 'domxml_dumpmem','domxml_elem_get_attribute', + 'domxml_elem_set_attribute','domxml_get_attribute','domxml_getattr', + 'domxml_html_dump_mem','domxml_new_child','domxml_new_doc', + 'domxml_new_xmldoc','domxml_node','domxml_node_add_namespace', + 'domxml_node_attributes','domxml_node_children', + 'domxml_node_get_content','domxml_node_has_attributes', + 'domxml_node_new_child','domxml_node_set_content', + 'domxml_node_set_namespace','domxml_node_unlink_node', + 'domxml_open_file','domxml_open_mem','domxml_parser', + 'domxml_parser_add_chunk','domxml_parser_cdata_section', + 'domxml_parser_characters','domxml_parser_comment', + 'domxml_parser_end','domxml_parser_end_document', + 'domxml_parser_end_element','domxml_parser_entity_reference', + 'domxml_parser_get_document','domxml_parser_namespace_decl', + 'domxml_parser_processing_instruction', + 'domxml_parser_start_document','domxml_parser_start_element', + 'domxml_root','domxml_set_attribute','domxml_setattr', + 'domxml_substitute_entities_default','domxml_unlink_node', + 'domxml_version','domxml_xmltree','doubleval','each','easter_date', + 'easter_days','empty','end','ereg','ereg_replace','eregi', + 'eregi_replace','error_get_last','error_log','error_reporting', + 'escapeshellarg','escapeshellcmd','eval','event_deschedule', + 'event_dispatch','event_free','event_handle_signal', + 'event_have_events','event_init','event_new','event_pending', + 'event_priority_set','event_schedule','event_set','event_timeout', + 'exec','exif_imagetype','exif_read_data','exif_tagname', + 'exif_thumbnail','exit','exp','explode','expm1','extension_loaded', + 'extract','ezmlm_hash','fbird_add_user','fbird_affected_rows', + 'fbird_backup','fbird_blob_add','fbird_blob_cancel', + 'fbird_blob_close','fbird_blob_create','fbird_blob_echo', + 'fbird_blob_get','fbird_blob_import','fbird_blob_info', + 'fbird_blob_open','fbird_close','fbird_commit','fbird_commit_ret', + 'fbird_connect','fbird_db_info','fbird_delete_user','fbird_drop_db', + 'fbird_errcode','fbird_errmsg','fbird_execute','fbird_fetch_assoc', + 'fbird_fetch_object','fbird_fetch_row','fbird_field_info', + 'fbird_free_event_handler','fbird_free_query','fbird_free_result', + 'fbird_gen_id','fbird_maintain_db','fbird_modify_user', + 'fbird_name_result','fbird_num_fields','fbird_num_params', + 'fbird_param_info','fbird_pconnect','fbird_prepare','fbird_query', + 'fbird_restore','fbird_rollback','fbird_rollback_ret', + 'fbird_server_info','fbird_service_attach','fbird_service_detach', + 'fbird_set_event_handler','fbird_trans','fbird_wait_event','fclose', + 'fdf_add_doc_javascript','fdf_add_template','fdf_close', + 'fdf_create','fdf_enum_values','fdf_errno','fdf_error','fdf_get_ap', + 'fdf_get_attachment','fdf_get_encoding','fdf_get_file', + 'fdf_get_flags','fdf_get_opt','fdf_get_status','fdf_get_value', + 'fdf_get_version','fdf_header','fdf_next_field_name','fdf_open', + 'fdf_open_string','fdf_remove_item','fdf_save','fdf_save_string', + 'fdf_set_ap','fdf_set_encoding','fdf_set_file','fdf_set_flags', + 'fdf_set_javascript_action','fdf_set_on_import_javascript', + 'fdf_set_opt','fdf_set_status','fdf_set_submit_form_action', + 'fdf_set_target_frame','fdf_set_value','fdf_set_version','feof', + 'fflush','fgetc','fgetcsv','fgets','fgetss','file','file_exists', + 'file_get_contents','file_put_contents','fileatime','filectime', + 'filegroup','fileinode','filemtime','fileowner','fileperms', + 'filepro','filepro_fieldcount','filepro_fieldname', + 'filepro_fieldtype','filepro_fieldwidth','filepro_retrieve', + 'filepro_rowcount','filesize','filetype','filter_has_var', + 'filter_id','filter_input','filter_input_array','filter_list', + 'filter_var','filter_var_array','finfo_buffer','finfo_close', + 'finfo_file','finfo_open','finfo_set_flags','floatval','flock', + 'floor','flush','fmod','fnmatch','fopen','fpassthru','fprintf', + 'fputcsv','fputs','fread','frenchtojd','fribidi_charset_info', + 'fribidi_get_charsets','fribidi_log2vis','fscanf','fseek', + 'fsockopen','fstat','ftell','ftok','ftp_alloc','ftp_cdup', + 'ftp_chdir','ftp_chmod','ftp_close','ftp_connect','ftp_delete', + 'ftp_exec','ftp_fget','ftp_fput','ftp_get','ftp_get_option', + 'ftp_login','ftp_mdtm','ftp_mkdir','ftp_nb_continue','ftp_nb_fget', + 'ftp_nb_fput','ftp_nb_get','ftp_nb_put','ftp_nlist','ftp_pasv', + 'ftp_put','ftp_pwd','ftp_quit','ftp_raw','ftp_rawlist','ftp_rename', + 'ftp_rmdir','ftp_set_option','ftp_site','ftp_size', + 'ftp_ssl_connect','ftp_systype','ftruncate','function_exists', + 'func_get_arg','func_get_args','func_num_args','fwrite','gd_info', + 'getallheaders','getcwd','getdate','getenv','gethostbyaddr', + 'gethostbyname','gethostbynamel','getimagesize','getlastmod', + 'getmxrr','getmygid','getmyinode','getmypid','getmyuid','getopt', + 'getprotobyname','getprotobynumber','getrandmax','getrusage', + 'getservbyname','getservbyport','gettext','gettimeofday','gettype', + 'get_browser','get_cfg_var','get_class','get_class_methods', + 'get_class_vars','get_current_user','get_declared_classes', + 'get_defined_constants','get_defined_functions','get_defined_vars', + 'get_extension_funcs','get_headers','get_html_translation_table', + 'get_included_files','get_include_path','get_loaded_extensions', + 'get_magic_quotes_gpc','get_magic_quotes_runtime','get_meta_tags', + 'get_object_vars','get_parent_class','get_required_files', + 'get_resource_type','glob','gmdate','gmmktime','gmp_abs','gmp_add', + 'gmp_and','gmp_clrbit','gmp_cmp','gmp_com','gmp_div','gmp_div_q', + 'gmp_div_qr','gmp_div_r','gmp_divexact','gmp_fact','gmp_gcd', + 'gmp_gcdext','gmp_hamdist','gmp_init','gmp_intval','gmp_invert', + 'gmp_jacobi','gmp_legendre','gmp_mod','gmp_mul','gmp_neg', + 'gmp_nextprime','gmp_or','gmp_perfect_square','gmp_popcount', + 'gmp_pow','gmp_powm','gmp_prob_prime','gmp_random','gmp_scan0', + 'gmp_scan1','gmp_setbit','gmp_sign','gmp_sqrt','gmp_sqrtrem', + 'gmp_strval','gmp_sub','gmp_xor','gmstrftime','gopher_parsedir', + 'gregoriantojd','gzclose','gzcompress','gzdeflate','gzencode', + 'gzeof','gzfile','gzgetc','gzgets','gzgetss','gzinflate','gzopen', + 'gzpassthru','gzputs','gzread','gzrewind','gzseek','gztell', + 'gzuncompress','gzwrite','hash','hash_algos','hash_file', + 'hash_final','hash_hmac','hash_hmac_file','hash_init','hash_update', + 'hash_update_file','hash_update_stream','header','headers_list', + 'headers_sent','hebrev','hebrevc','hexdec','highlight_file', + 'highlight_string','html_doc','html_doc_file','html_entity_decode', + 'htmlentities','htmlspecialchars','htmlspecialchars_decode', + 'http_build_cookie','http_build_query','http_build_str', + 'http_build_url','http_cache_etag','http_cache_last_modified', + 'http_chunked_decode','http_date','http_deflate','http_get', + 'http_get_request_body','http_get_request_body_stream', + 'http_get_request_headers','http_head','http_inflate', + 'http_match_etag','http_match_modified','http_match_request_header', + 'http_negotiate_charset','http_negotiate_content_type', + 'http_negotiate_language','http_parse_cookie','http_parse_headers', + 'http_parse_message','http_parse_params', + 'http_persistent_handles_clean','http_persistent_handles_count', + 'http_persistent_handles_ident','http_post_data','http_post_fields', + 'http_put_data','http_put_file','http_put_stream','http_redirect', + 'http_request','http_request_body_encode', + 'http_request_method_exists','http_request_method_name', + 'http_request_method_register','http_request_method_unregister', + 'http_send_content_disposition','http_send_content_type', + 'http_send_data','http_send_file','http_send_last_modified', + 'http_send_status','http_send_stream','http_support', + 'http_throttle','hypot','i18n_convert','i18n_discover_encoding', + 'i18n_http_input','i18n_http_output','i18n_internal_encoding', + 'i18n_ja_jp_hantozen','i18n_mime_header_decode', + 'i18n_mime_header_encode','ibase_add_user','ibase_affected_rows', + 'ibase_backup','ibase_blob_add','ibase_blob_cancel', + 'ibase_blob_close','ibase_blob_create','ibase_blob_echo', + 'ibase_blob_get','ibase_blob_import','ibase_blob_info', + 'ibase_blob_open','ibase_close','ibase_commit','ibase_commit_ret', + 'ibase_connect','ibase_db_info','ibase_delete_user','ibase_drop_db', + 'ibase_errcode','ibase_errmsg','ibase_execute','ibase_fetch_assoc', + 'ibase_fetch_object','ibase_fetch_row','ibase_field_info', + 'ibase_free_event_handler','ibase_free_query','ibase_free_result', + 'ibase_gen_id','ibase_maintain_db','ibase_modify_user', + 'ibase_name_result','ibase_num_fields','ibase_num_params', + 'ibase_param_info','ibase_pconnect','ibase_prepare','ibase_query', + 'ibase_restore','ibase_rollback','ibase_rollback_ret', + 'ibase_server_info','ibase_service_attach','ibase_service_detach', + 'ibase_set_event_handler','ibase_trans','ibase_wait_event','iconv', + 'iconv_get_encoding','iconv_mime_decode', + 'iconv_mime_decode_headers','iconv_mime_encode', + 'iconv_set_encoding','iconv_strlen','iconv_strpos','iconv_strrpos', + 'iconv_substr','id3_get_frame_long_name','id3_get_frame_short_name', + 'id3_get_genre_id','id3_get_genre_list','id3_get_genre_name', + 'id3_get_tag','id3_get_version','id3_remove_tag','id3_set_tag', + 'idate','ignore_user_abort','image_type_to_extension', + 'image_type_to_mime_type','image2wbmp','imagealphablending', + 'imageantialias','imagearc','imagechar','imagecharup', + 'imagecolorallocate','imagecolorallocatealpha','imagecolorat', + 'imagecolorclosest','imagecolorclosestalpha','imagecolordeallocate', + 'imagecolorexact','imagecolorexactalpha','imagecolormatch', + 'imagecolorresolve','imagecolorresolvealpha','imagecolorset', + 'imagecolorsforindex','imagecolorstotal','imagecolortransparent', + 'imageconvolution','imagecopy','imagecopymerge', + 'imagecopymergegray','imagecopyresampled','imagecopyresized', + 'imagecreate','imagecreatefromgd','imagecreatefromgd2', + 'imagecreatefromgd2part','imagecreatefromgif','imagecreatefromjpeg', + 'imagecreatefrompng','imagecreatefromstring','imagecreatefromwbmp', + 'imagecreatefromxbm','imagecreatetruecolor','imagedashedline', + 'imagedestroy','imageellipse','imagefill','imagefilledarc', + 'imagefilledellipse','imagefilledpolygon','imagefilledrectangle', + 'imagefilltoborder','imagefilter','imagefontheight', + 'imagefontwidth','imageftbbox','imagefttext','imagegammacorrect', + 'imagegd','imagegd2','imagegif','imagegrabscreen','imagegrabwindow', + 'imageinterlace','imageistruecolor','imagejpeg','imagelayereffect', + 'imageline','imageloadfont','imagepalettecopy','imagepng', + 'imagepolygon','imagepsbbox','imagepsencodefont', + 'imagepsextendfont','imagepsfreefont','imagepsloadfont', + 'imagepsslantfont','imagepstext','imagerectangle','imagerotate', + 'imagesavealpha','imagesetbrush','imagesetpixel','imagesetstyle', + 'imagesetthickness','imagesettile','imagestring','imagestringup', + 'imagesx','imagesy','imagetruecolortopalette','imagettfbbox', + 'imagettftext','imagetypes','imagewbmp','imagexbm','imap_8bit', + 'imap_alerts','imap_append','imap_base64','imap_binary','imap_body', + 'imap_bodystruct','imap_check','imap_clearflag_full','imap_close', + 'imap_create','imap_createmailbox','imap_delete', + 'imap_deletemailbox','imap_errors','imap_expunge', + 'imap_fetch_overview','imap_fetchbody','imap_fetchheader', + 'imap_fetchstructure','imap_fetchtext','imap_get_quota', + 'imap_get_quotaroot','imap_getacl','imap_getmailboxes', + 'imap_getsubscribed','imap_header','imap_headerinfo','imap_headers', + 'imap_last_error','imap_list','imap_listmailbox', + 'imap_listsubscribed','imap_lsub','imap_mail','imap_mail_compose', + 'imap_mail_copy','imap_mail_move','imap_mailboxmsginfo', + 'imap_mime_header_decode','imap_msgno','imap_num_msg', + 'imap_num_recent','imap_open','imap_ping','imap_qprint', + 'imap_rename','imap_renamemailbox','imap_reopen', + 'imap_rfc822_parse_adrlist','imap_rfc822_parse_headers', + 'imap_rfc822_write_address','imap_savebody','imap_scan', + 'imap_scanmailbox','imap_search','imap_set_quota','imap_setacl', + 'imap_setflag_full','imap_sort','imap_status','imap_subscribe', + 'imap_thread','imap_timeout','imap_uid','imap_undelete', + 'imap_unsubscribe','imap_utf7_decode','imap_utf7_encode', + 'imap_utf8','implode','import_request_variables','in_array', + 'ini_alter','ini_get','ini_get_all','ini_restore','ini_set', + 'intval','ip2long','iptcembed','iptcparse','isset','is_a', + 'is_array','is_bool','is_callable','is_dir','is_double', + 'is_executable','is_file','is_finite','is_float','is_infinite', + 'is_int','is_integer','is_link','is_long','is_nan','is_null', + 'is_numeric','is_object','is_readable','is_real','is_resource', + 'is_scalar','is_soap_fault','is_string','is_subclass_of', + 'is_uploaded_file','is_writable','is_writeable','iterator_apply', + 'iterator_count','iterator_to_array','java_last_exception_clear', + 'java_last_exception_get','jddayofweek','jdmonthname','jdtofrench', + 'jdtogregorian','jdtojewish','jdtojulian','jdtounix','jewishtojd', + 'join','jpeg2wbmp','json_decode','json_encode','juliantojd','key', + 'key_exists','krsort','ksort','lcg_value','ldap_add','ldap_bind', + 'ldap_close','ldap_compare','ldap_connect','ldap_count_entries', + 'ldap_delete','ldap_dn2ufn','ldap_err2str','ldap_errno', + 'ldap_error','ldap_explode_dn','ldap_first_attribute', + 'ldap_first_entry','ldap_first_reference','ldap_free_result', + 'ldap_get_attributes','ldap_get_dn','ldap_get_entries', + 'ldap_get_option','ldap_get_values','ldap_get_values_len', + 'ldap_list','ldap_mod_add','ldap_mod_del','ldap_mod_replace', + 'ldap_modify','ldap_next_attribute','ldap_next_entry', + 'ldap_next_reference','ldap_parse_reference','ldap_parse_result', + 'ldap_read','ldap_rename','ldap_search','ldap_set_option', + 'ldap_sort','ldap_start_tls','ldap_unbind','levenshtein', + 'libxml_clear_errors','libxml_get_errors','libxml_get_last_error', + 'libxml_set_streams_context','libxml_use_internal_errors','link', + 'linkinfo','list','localeconv','localtime','log','log1p','log10', + 'long2ip','lstat','ltrim','lzf_compress','lzf_decompress', + 'lzf_optimized_for','magic_quotes_runtime','mail','max','mbereg', + 'mberegi','mberegi_replace','mbereg_match','mbereg_replace', + 'mbereg_search','mbereg_search_getpos','mbereg_search_getregs', + 'mbereg_search_init','mbereg_search_pos','mbereg_search_regs', + 'mbereg_search_setpos','mbregex_encoding','mbsplit','mbstrcut', + 'mbstrlen','mbstrpos','mbstrrpos','mbsubstr','mb_check_encoding', + 'mb_convert_case','mb_convert_encoding','mb_convert_kana', + 'mb_convert_variables','mb_decode_mimeheader', + 'mb_decode_numericentity','mb_detect_encoding','mb_detect_order', + 'mb_encode_mimeheader','mb_encode_numericentity','mb_ereg', + 'mb_eregi','mb_eregi_replace','mb_ereg_match','mb_ereg_replace', + 'mb_ereg_search','mb_ereg_search_getpos','mb_ereg_search_getregs', + 'mb_ereg_search_init','mb_ereg_search_pos','mb_ereg_search_regs', + 'mb_ereg_search_setpos','mb_get_info','mb_http_input', + 'mb_http_output','mb_internal_encoding','mb_language', + 'mb_list_encodings','mb_output_handler','mb_parse_str', + 'mb_preferred_mime_name','mb_regex_encoding','mb_regex_set_options', + 'mb_send_mail','mb_split','mb_strcut','mb_strimwidth','mb_stripos', + 'mb_stristr','mb_strlen','mb_strpos','mb_strrchr','mb_strrichr', + 'mb_strripos','mb_strrpos','mb_strstr','mb_strtolower', + 'mb_strtoupper','mb_strwidth','mb_substitute_character','mb_substr', + 'mb_substr_count','mcrypt_cbc','mcrypt_cfb','mcrypt_create_iv', + 'mcrypt_decrypt','mcrypt_ecb','mcrypt_enc_get_algorithms_name', + 'mcrypt_enc_get_block_size','mcrypt_enc_get_iv_size', + 'mcrypt_enc_get_key_size','mcrypt_enc_get_modes_name', + 'mcrypt_enc_get_supported_key_sizes', + 'mcrypt_enc_is_block_algorithm', + 'mcrypt_enc_is_block_algorithm_mode','mcrypt_enc_is_block_mode', + 'mcrypt_enc_self_test','mcrypt_encrypt','mcrypt_generic', + 'mcrypt_generic_deinit','mcrypt_generic_end','mcrypt_generic_init', + 'mcrypt_get_block_size','mcrypt_get_cipher_name', + 'mcrypt_get_iv_size','mcrypt_get_key_size','mcrypt_list_algorithms', + 'mcrypt_list_modes','mcrypt_module_close', + 'mcrypt_module_get_algo_block_size', + 'mcrypt_module_get_algo_key_size', + 'mcrypt_module_get_supported_key_sizes', + 'mcrypt_module_is_block_algorithm', + 'mcrypt_module_is_block_algorithm_mode', + 'mcrypt_module_is_block_mode','mcrypt_module_open', + 'mcrypt_module_self_test','mcrypt_ofb','md5','md5_file', + 'mdecrypt_generic','memcache_add','memcache_add_server', + 'memcache_close','memcache_connect','memcache_debug', + 'memcache_decrement','memcache_delete','memcache_flush', + 'memcache_get','memcache_get_extended_stats', + 'memcache_get_server_status','memcache_get_stats', + 'memcache_get_version','memcache_increment','memcache_pconnect', + 'memcache_replace','memcache_set','memcache_set_compress_threshold', + 'memcache_set_server_params','memory_get_peak_usage', + 'memory_get_usage','metaphone','mhash','mhash_count', + 'mhash_get_block_size','mhash_get_hash_name','mhash_keygen_s2k', + 'method_exists','microtime','mime_content_type','min', + 'ming_keypress','ming_setcubicthreshold','ming_setscale', + 'ming_useconstants','ming_useswfversion','mkdir','mktime', + 'money_format','move_uploaded_file','msql','msql_affected_rows', + 'msql_close','msql_connect','msql_create_db','msql_createdb', + 'msql_data_seek','msql_db_query','msql_dbname','msql_drop_db', + 'msql_dropdb','msql_error','msql_fetch_array','msql_fetch_field', + 'msql_fetch_object','msql_fetch_row','msql_field_flags', + 'msql_field_len','msql_field_name','msql_field_seek', + 'msql_field_table','msql_field_type','msql_fieldflags', + 'msql_fieldlen','msql_fieldname','msql_fieldtable','msql_fieldtype', + 'msql_free_result','msql_freeresult','msql_list_dbs', + 'msql_list_fields','msql_list_tables','msql_listdbs', + 'msql_listfields','msql_listtables','msql_num_fields', + 'msql_num_rows','msql_numfields','msql_numrows','msql_pconnect', + 'msql_query','msql_regcase','msql_result','msql_select_db', + 'msql_selectdb','msql_tablename','mssql_bind','mssql_close', + 'mssql_connect','mssql_data_seek','mssql_execute', + 'mssql_fetch_array','mssql_fetch_assoc','mssql_fetch_batch', + 'mssql_fetch_field','mssql_fetch_object','mssql_fetch_row', + 'mssql_field_length','mssql_field_name','mssql_field_seek', + 'mssql_field_type','mssql_free_result','mssql_free_statement', + 'mssql_get_last_message','mssql_guid_string','mssql_init', + 'mssql_min_error_severity','mssql_min_message_severity', + 'mssql_next_result','mssql_num_fields','mssql_num_rows', + 'mssql_pconnect','mssql_query','mssql_result','mssql_rows_affected', + 'mssql_select_db','mt_getrandmax','mt_rand','mt_srand','mysql', + 'mysql_affected_rows','mysql_client_encoding','mysql_close', + 'mysql_connect','mysql_createdb','mysql_create_db', + 'mysql_data_seek','mysql_dbname','mysql_db_name','mysql_db_query', + 'mysql_dropdb','mysql_drop_db','mysql_errno','mysql_error', + 'mysql_escape_string','mysql_fetch_array','mysql_fetch_assoc', + 'mysql_fetch_field','mysql_fetch_lengths','mysql_fetch_object', + 'mysql_fetch_row','mysql_fieldflags','mysql_fieldlen', + 'mysql_fieldname','mysql_fieldtable','mysql_fieldtype', + 'mysql_field_flags','mysql_field_len','mysql_field_name', + 'mysql_field_seek','mysql_field_table','mysql_field_type', + 'mysql_freeresult','mysql_free_result','mysql_get_client_info', + 'mysql_get_host_info','mysql_get_proto_info', + 'mysql_get_server_info','mysql_info','mysql_insert_id', + 'mysql_listdbs','mysql_listfields','mysql_listtables', + 'mysql_list_dbs','mysql_list_fields','mysql_list_processes', + 'mysql_list_tables','mysql_numfields','mysql_numrows', + 'mysql_num_fields','mysql_num_rows','mysql_pconnect','mysql_ping', + 'mysql_query','mysql_real_escape_string','mysql_result', + 'mysql_selectdb','mysql_select_db','mysql_set_charset','mysql_stat', + 'mysql_tablename','mysql_table_name','mysql_thread_id', + 'mysql_unbuffered_query','mysqli_affected_rows','mysqli_autocommit', + 'mysqli_bind_param','mysqli_bind_result','mysqli_change_user', + 'mysqli_character_set_name','mysqli_client_encoding','mysqli_close', + 'mysqli_commit','mysqli_connect','mysqli_connect_errno', + 'mysqli_connect_error','mysqli_data_seek','mysqli_debug', + 'mysqli_disable_reads_from_master','mysqli_disable_rpl_parse', + 'mysqli_dump_debug_info','mysqli_embedded_server_end', + 'mysqli_embedded_server_start','mysqli_enable_reads_from_master', + 'mysqli_enable_rpl_parse','mysqli_errno','mysqli_error', + 'mysqli_escape_string','mysqli_execute','mysqli_fetch', + 'mysqli_fetch_array','mysqli_fetch_assoc','mysqli_fetch_field', + 'mysqli_fetch_field_direct','mysqli_fetch_fields', + 'mysqli_fetch_lengths','mysqli_fetch_object','mysqli_fetch_row', + 'mysqli_field_count','mysqli_field_seek','mysqli_field_tell', + 'mysqli_free_result','mysqli_get_charset','mysqli_get_client_info', + 'mysqli_get_client_version','mysqli_get_host_info', + 'mysqli_get_metadata','mysqli_get_proto_info', + 'mysqli_get_server_info','mysqli_get_server_version', + 'mysqli_get_warnings','mysqli_info','mysqli_init', + 'mysqli_insert_id','mysqli_kill','mysqli_master_query', + 'mysqli_more_results','mysqli_multi_query','mysqli_next_result', + 'mysqli_num_fields','mysqli_num_rows','mysqli_options', + 'mysqli_param_count','mysqli_ping','mysqli_prepare','mysqli_query', + 'mysqli_real_connect','mysqli_real_escape_string', + 'mysqli_real_query','mysqli_report','mysqli_rollback', + 'mysqli_rpl_parse_enabled','mysqli_rpl_probe', + 'mysqli_rpl_query_type','mysqli_select_db','mysqli_send_long_data', + 'mysqli_send_query','mysqli_set_charset', + 'mysqli_set_local_infile_default','mysqli_set_local_infile_handler', + 'mysqli_set_opt','mysqli_slave_query','mysqli_sqlstate', + 'mysqli_ssl_set','mysqli_stat','mysqli_stmt_affected_rows', + 'mysqli_stmt_attr_get','mysqli_stmt_attr_set', + 'mysqli_stmt_bind_param','mysqli_stmt_bind_result', + 'mysqli_stmt_close','mysqli_stmt_data_seek','mysqli_stmt_errno', + 'mysqli_stmt_error','mysqli_stmt_execute','mysqli_stmt_fetch', + 'mysqli_stmt_field_count','mysqli_stmt_free_result', + 'mysqli_stmt_get_warnings','mysqli_stmt_init', + 'mysqli_stmt_insert_id','mysqli_stmt_num_rows', + 'mysqli_stmt_param_count','mysqli_stmt_prepare','mysqli_stmt_reset', + 'mysqli_stmt_result_metadata','mysqli_stmt_send_long_data', + 'mysqli_stmt_sqlstate','mysqli_stmt_store_result', + 'mysqli_store_result','mysqli_thread_id','mysqli_thread_safe', + 'mysqli_use_result','mysqli_warning_count','natcasesort','natsort', + 'new_xmldoc','next','ngettext','nl2br','nl_langinfo', + 'ntuser_getdomaincontroller','ntuser_getusergroups', + 'ntuser_getuserinfo','ntuser_getuserlist','number_format', + 'ob_clean','ob_deflatehandler','ob_end_clean','ob_end_flush', + 'ob_etaghandler','ob_flush','ob_get_clean','ob_get_contents', + 'ob_get_flush','ob_get_length','ob_get_level','ob_get_status', + 'ob_gzhandler','ob_iconv_handler','ob_implicit_flush', + 'ob_inflatehandler','ob_list_handlers','ob_start','ob_tidyhandler', + 'octdec','odbc_autocommit','odbc_binmode','odbc_close', + 'odbc_close_all','odbc_columnprivileges','odbc_columns', + 'odbc_commit','odbc_connect','odbc_cursor','odbc_data_source', + 'odbc_do','odbc_error','odbc_errormsg','odbc_exec','odbc_execute', + 'odbc_fetch_array','odbc_fetch_into','odbc_fetch_object', + 'odbc_fetch_row','odbc_field_len','odbc_field_name', + 'odbc_field_num','odbc_field_precision','odbc_field_scale', + 'odbc_field_type','odbc_foreignkeys','odbc_free_result', + 'odbc_gettypeinfo','odbc_longreadlen','odbc_next_result', + 'odbc_num_fields','odbc_num_rows','odbc_pconnect','odbc_prepare', + 'odbc_primarykeys','odbc_procedurecolumns','odbc_procedures', + 'odbc_result','odbc_result_all','odbc_rollback','odbc_setoption', + 'odbc_specialcolumns','odbc_statistics','odbc_tableprivileges', + 'odbc_tables','opendir','openlog','openssl_csr_export', + 'openssl_csr_export_to_file','openssl_csr_get_public_key', + 'openssl_csr_get_subject','openssl_csr_new','openssl_csr_sign', + 'openssl_error_string','openssl_free_key','openssl_get_privatekey', + 'openssl_get_publickey','openssl_open','openssl_pkcs12_export', + 'openssl_pkcs12_export_to_file','openssl_pkcs12_read', + 'openssl_pkcs7_decrypt','openssl_pkcs7_encrypt', + 'openssl_pkcs7_sign','openssl_pkcs7_verify','openssl_pkey_export', + 'openssl_pkey_export_to_file','openssl_pkey_free', + 'openssl_pkey_get_details','openssl_pkey_get_private', + 'openssl_pkey_get_public','openssl_pkey_new', + 'openssl_private_decrypt','openssl_private_encrypt', + 'openssl_public_decrypt','openssl_public_encrypt','openssl_seal', + 'openssl_sign','openssl_verify','openssl_x509_checkpurpose', + 'openssl_x509_check_private_key','openssl_x509_export', + 'openssl_x509_export_to_file','openssl_x509_free', + 'openssl_x509_parse','openssl_x509_read','ord', + 'output_add_rewrite_var','output_reset_rewrite_vars','overload', + 'outputdebugstring','pack','parse_ini_file','parse_str','parse_url', + 'parsekit_compile_file','parsekit_compile_string', + 'parsekit_func_arginfo','parsekit_opcode_flags', + 'parsekit_opcode_name','passthru','pathinfo','pclose', + 'pdf_add_bookmark','pdf_add_launchlink','pdf_add_locallink', + 'pdf_add_nameddest','pdf_add_note','pdf_add_pdflink', + 'pdf_add_thumbnail','pdf_add_weblink','pdf_arc','pdf_arcn', + 'pdf_attach_file','pdf_begin_font','pdf_begin_glyph', + 'pdf_begin_page','pdf_begin_pattern','pdf_begin_template', + 'pdf_circle','pdf_clip','pdf_close','pdf_close_image', + 'pdf_close_pdi','pdf_close_pdi_page','pdf_closepath', + 'pdf_closepath_fill_stroke','pdf_closepath_stroke','pdf_concat', + 'pdf_continue_text','pdf_create_gstate','pdf_create_pvf', + 'pdf_curveto','pdf_delete','pdf_delete_pvf','pdf_encoding_set_char', + 'pdf_end_font','pdf_end_glyph','pdf_end_page','pdf_end_pattern', + 'pdf_end_template','pdf_endpath','pdf_fill','pdf_fill_imageblock', + 'pdf_fill_pdfblock','pdf_fill_stroke','pdf_fill_textblock', + 'pdf_findfont','pdf_fit_image','pdf_fit_pdi_page', + 'pdf_fit_textline','pdf_get_apiname','pdf_get_buffer', + 'pdf_get_errmsg','pdf_get_errnum','pdf_get_parameter', + 'pdf_get_pdi_parameter','pdf_get_pdi_value','pdf_get_value', + 'pdf_initgraphics','pdf_lineto','pdf_load_font', + 'pdf_load_iccprofile','pdf_load_image','pdf_makespotcolor', + 'pdf_moveto','pdf_new','pdf_open_ccitt','pdf_open_file', + 'pdf_open_image','pdf_open_image_file','pdf_open_pdi', + 'pdf_open_pdi_page','pdf_place_image','pdf_place_pdi_page', + 'pdf_process_pdi','pdf_rect','pdf_restore','pdf_rotate','pdf_save', + 'pdf_scale','pdf_set_border_color','pdf_set_border_dash', + 'pdf_set_border_style','pdf_set_gstate','pdf_set_info', + 'pdf_set_parameter','pdf_set_text_pos','pdf_set_value', + 'pdf_setcolor','pdf_setdash','pdf_setdashpattern','pdf_setflat', + 'pdf_setfont','pdf_setlinecap','pdf_setlinejoin','pdf_setlinewidth', + 'pdf_setmatrix','pdf_setmiterlimit','pdf_setpolydash','pdf_shading', + 'pdf_shading_pattern','pdf_shfill','pdf_show','pdf_show_boxed', + 'pdf_show_xy','pdf_skew','pdf_stringwidth','pdf_stroke', + 'pdf_translate','pdo_drivers','pfsockopen','pg_affected_rows', + 'pg_cancel_query','pg_clientencoding','pg_client_encoding', + 'pg_close','pg_cmdtuples','pg_connect','pg_connection_busy', + 'pg_connection_reset','pg_connection_status','pg_convert', + 'pg_copy_from','pg_copy_to','pg_dbname','pg_delete','pg_end_copy', + 'pg_errormessage','pg_escape_bytea','pg_escape_string','pg_exec', + 'pg_execute','pg_fetch_all','pg_fetch_all_columns','pg_fetch_array', + 'pg_fetch_assoc','pg_fetch_object','pg_fetch_result','pg_fetch_row', + 'pg_fieldisnull','pg_fieldname','pg_fieldnum','pg_fieldprtlen', + 'pg_fieldsize','pg_fieldtype','pg_field_is_null','pg_field_name', + 'pg_field_num','pg_field_prtlen','pg_field_size','pg_field_table', + 'pg_field_type','pg_field_type_oid','pg_free_result', + 'pg_freeresult','pg_get_notify','pg_get_pid','pg_get_result', + 'pg_getlastoid','pg_host','pg_insert','pg_last_error', + 'pg_last_notice','pg_last_oid','pg_loclose','pg_locreate', + 'pg_loexport','pg_loimport','pg_loopen','pg_loread','pg_loreadall', + 'pg_lounlink','pg_lowrite','pg_lo_close','pg_lo_create', + 'pg_lo_export','pg_lo_import','pg_lo_open','pg_lo_read', + 'pg_lo_read_all','pg_lo_seek','pg_lo_tell','pg_lo_unlink', + 'pg_lo_write','pg_meta_data','pg_numfields','pg_numrows', + 'pg_num_fields','pg_num_rows','pg_options','pg_parameter_status', + 'pg_pconnect','pg_ping','pg_port','pg_prepare','pg_put_line', + 'pg_query','pg_query_params','pg_result','pg_result_error', + 'pg_result_error_field','pg_result_seek','pg_result_status', + 'pg_select','pg_send_execute','pg_send_prepare','pg_send_query', + 'pg_send_query_params','pg_set_client_encoding', + 'pg_set_error_verbosity','pg_setclientencoding','pg_trace', + 'pg_transaction_status','pg_tty','pg_unescape_bytea','pg_untrace', + 'pg_update','pg_version','php_egg_logo_guid','php_ini_loaded_file', + 'php_ini_scanned_files','php_logo_guid','php_real_logo_guid', + 'php_sapi_name','php_strip_whitespace','php_uname','phpcredits', + 'phpdoc_xml_from_string','phpinfo','phpversion','pi','png2wbmp', + 'pop3_close','pop3_delete_message','pop3_get_account_size', + 'pop3_get_message','pop3_get_message_count', + 'pop3_get_message_header','pop3_get_message_ids', + 'pop3_get_message_size','pop3_get_message_sizes','pop3_open', + 'pop3_undelete','popen','pos','posix_ctermid','posix_errno', + 'posix_getcwd','posix_getegid','posix_geteuid','posix_getgid', + 'posix_getgrgid','posix_getgrnam','posix_getgroups', + 'posix_getlogin','posix_getpgid','posix_getpgrp','posix_getpid', + 'posix_getppid','posix_getpwnam','posix_getpwuid','posix_getrlimit', + 'posix_getsid','posix_getuid','posix_get_last_error','posix_isatty', + 'posix_kill','posix_mkfifo','posix_setegid','posix_seteuid', + 'posix_setgid','posix_setpgid','posix_setsid','posix_setuid', + 'posix_strerror','posix_times','posix_ttyname','posix_uname','pow', + 'preg_grep','preg_last_error','preg_match','preg_match_all', + 'preg_quote','preg_replace','preg_replace_callback','preg_split', + 'prev','print_r','printf','proc_close','proc_get_status', + 'proc_open','proc_terminate','putenv','quoted_printable_decode', + 'quotemeta','rad2deg','radius_acct_open','radius_add_server', + 'radius_auth_open','radius_close','radius_config', + 'radius_create_request','radius_cvt_addr','radius_cvt_int', + 'radius_cvt_string','radius_demangle','radius_demangle_mppe_key', + 'radius_get_attr','radius_get_vendor_attr','radius_put_addr', + 'radius_put_attr','radius_put_int','radius_put_string', + 'radius_put_vendor_addr','radius_put_vendor_attr', + 'radius_put_vendor_int','radius_put_vendor_string', + 'radius_request_authenticator','radius_send_request', + 'radius_server_secret','radius_strerror','rand','range', + 'rawurldecode','rawurlencode','read_exif_data','readdir','readfile', + 'readgzfile','readlink','realpath','reg_close_key','reg_create_key', + 'reg_enum_key','reg_enum_value','reg_get_value','reg_open_key', + 'reg_set_value','register_shutdown_function', + 'register_tick_function','rename','res_close','res_get','res_list', + 'res_list_type','res_open','res_set','reset', + 'restore_error_handler','restore_include_path','rewind','rewinddir', + 'rmdir','round','rsort','rtrim','runkit_class_adopt', + 'runkit_class_emancipate','runkit_constant_add', + 'runkit_constant_redefine','runkit_constant_remove', + 'runkit_default_property_add','runkit_function_add', + 'runkit_function_copy','runkit_function_redefine', + 'runkit_function_remove','runkit_function_rename','runkit_import', + 'runkit_lint','runkit_lint_file','runkit_method_add', + 'runkit_method_copy','runkit_method_redefine', + 'runkit_method_remove','runkit_method_rename','runkit_object_id', + 'runkit_return_value_used','runkit_sandbox_output_handler', + 'runkit_superglobals','runkit_zval_inspect','scandir','sem_acquire', + 'sem_get','sem_release','sem_remove','serialize', + 'session_cache_expire','session_cache_limiter','session_commit', + 'session_decode','session_destroy','session_encode', + 'session_get_cookie_params','session_id','session_is_registered', + 'session_module_name','session_name','session_regenerate_id', + 'session_register','session_save_path','session_set_cookie_params', + 'session_set_save_handler','session_start','session_unregister', + 'session_unset','session_write_close','set_content', + 'set_error_handler','set_file_buffer','set_include_path', + 'set_magic_quotes_runtime','set_socket_blocking','set_time_limit', + 'setcookie','setlocale','setrawcookie','settype','sha1','sha1_file', + 'shell_exec','shmop_close','shmop_delete','shmop_open','shmop_read', + 'shmop_size','shmop_write','shm_attach','shm_detach','shm_get_var', + 'shm_put_var','shm_remove','shm_remove_var','show_source','shuffle', + 'similar_text','simplexml_import_dom','simplexml_load_file', + 'simplexml_load_string','sin','sinh','sizeof','sleep','smtp_close', + 'smtp_cmd_data','smtp_cmd_mail','smtp_cmd_rcpt','smtp_connect', + 'snmp_get_quick_print','snmp_get_valueretrieval','snmp_read_mib', + 'snmp_set_quick_print','snmp_set_valueretrieval','snmp2_get', + 'snmp2_getnext','snmp2_real_walk','snmp2_set','snmp2_walk', + 'snmp3_get','snmp3_getnext','snmp3_real_walk','snmp3_set', + 'snmp3_walk','snmpget','snmpgetnext','snmprealwalk','snmpset', + 'snmpwalk','snmpwalkoid','socket_accept','socket_bind', + 'socket_clear_error','socket_close','socket_connect', + 'socket_create','socket_create_listen','socket_create_pair', + 'socket_getopt','socket_getpeername','socket_getsockname', + 'socket_get_option','socket_get_status','socket_iovec_add', + 'socket_iovec_alloc','socket_iovec_delete','socket_iovec_fetch', + 'socket_iovec_free','socket_iovec_set','socket_last_error', + 'socket_listen','socket_read','socket_readv','socket_recv', + 'socket_recvfrom','socket_recvmsg','socket_select','socket_send', + 'socket_sendmsg','socket_sendto','socket_setopt','socket_set_block', + 'socket_set_blocking','socket_set_nonblock','socket_set_option', + 'socket_set_timeout','socket_shutdown','socket_strerror', + 'socket_write','socket_writev','sort','soundex','spl_autoload', + 'spl_autoload_call','spl_autoload_extensions', + 'spl_autoload_functions','spl_autoload_register', + 'spl_autoload_unregister','spl_classes','spl_object_hash','split', + 'spliti','sprintf','sql_regcase','sqlite_array_query', + 'sqlite_busy_timeout','sqlite_changes','sqlite_close', + 'sqlite_column','sqlite_create_aggregate','sqlite_create_function', + 'sqlite_current','sqlite_error_string','sqlite_escape_string', + 'sqlite_exec','sqlite_factory','sqlite_fetch_all', + 'sqlite_fetch_array','sqlite_fetch_column_types', + 'sqlite_fetch_object','sqlite_fetch_single','sqlite_fetch_string', + 'sqlite_field_name','sqlite_has_more','sqlite_has_prev', + 'sqlite_last_error','sqlite_last_insert_rowid','sqlite_libencoding', + 'sqlite_libversion','sqlite_next','sqlite_num_fields', + 'sqlite_num_rows','sqlite_open','sqlite_popen','sqlite_prev', + 'sqlite_query','sqlite_rewind','sqlite_seek','sqlite_single_query', + 'sqlite_udf_decode_binary','sqlite_udf_encode_binary', + 'sqlite_unbuffered_query','sqlite_valid','sqrt','srand','sscanf', + 'ssh2_auth_hostbased_file','ssh2_auth_none','ssh2_auth_password', + 'ssh2_auth_pubkey_file','ssh2_connect','ssh2_exec', + 'ssh2_fetch_stream','ssh2_fingerprint','ssh2_forward_accept', + 'ssh2_forward_listen','ssh2_methods_negotiated','ssh2_poll', + 'ssh2_publickey_add','ssh2_publickey_init','ssh2_publickey_list', + 'ssh2_publickey_remove','ssh2_scp_recv','ssh2_scp_send','ssh2_sftp', + 'ssh2_sftp_lstat','ssh2_sftp_mkdir','ssh2_sftp_readlink', + 'ssh2_sftp_realpath','ssh2_sftp_rename','ssh2_sftp_rmdir', + 'ssh2_sftp_stat','ssh2_sftp_symlink','ssh2_sftp_unlink', + 'ssh2_shell','ssh2_tunnel','stat','stats_absolute_deviation', + 'stats_cdf_beta','stats_cdf_binomial','stats_cdf_cauchy', + 'stats_cdf_chisquare','stats_cdf_exponential','stats_cdf_f', + 'stats_cdf_gamma','stats_cdf_laplace','stats_cdf_logistic', + 'stats_cdf_negative_binomial','stats_cdf_noncentral_chisquare', + 'stats_cdf_noncentral_f','stats_cdf_noncentral_t', + 'stats_cdf_normal','stats_cdf_poisson','stats_cdf_t', + 'stats_cdf_uniform','stats_cdf_weibull','stats_covariance', + 'stats_dens_beta','stats_dens_cauchy','stats_dens_chisquare', + 'stats_dens_exponential','stats_dens_f','stats_dens_gamma', + 'stats_dens_laplace','stats_dens_logistic','stats_dens_normal', + 'stats_dens_pmf_binomial','stats_dens_pmf_hypergeometric', + 'stats_dens_pmf_negative_binomial','stats_dens_pmf_poisson', + 'stats_dens_t','stats_dens_uniform','stats_dens_weibull', + 'stats_harmonic_mean','stats_kurtosis','stats_rand_gen_beta', + 'stats_rand_gen_chisquare','stats_rand_gen_exponential', + 'stats_rand_gen_f','stats_rand_gen_funiform','stats_rand_gen_gamma', + 'stats_rand_gen_ipoisson','stats_rand_gen_iuniform', + 'stats_rand_gen_noncenral_f','stats_rand_gen_noncentral_chisquare', + 'stats_rand_gen_noncentral_t','stats_rand_gen_normal', + 'stats_rand_gen_t','stats_rand_getsd','stats_rand_ibinomial', + 'stats_rand_ibinomial_negative','stats_rand_ignlgi', + 'stats_rand_phrase_to_seeds','stats_rand_ranf','stats_rand_setall', + 'stats_skew','stats_standard_deviation','stats_stat_binomial_coef', + 'stats_stat_correlation','stats_stat_factorial', + 'stats_stat_independent_t','stats_stat_innerproduct', + 'stats_stat_paired_t','stats_stat_percentile','stats_stat_powersum', + 'stats_variance','strcasecmp','strchr','strcmp','strcoll','strcspn', + 'stream_bucket_append','stream_bucket_make_writeable', + 'stream_bucket_new','stream_bucket_prepend','stream_context_create', + 'stream_context_get_default','stream_context_get_options', + 'stream_context_set_default','stream_context_set_option', + 'stream_context_set_params','stream_copy_to_stream', + 'stream_encoding','stream_filter_append','stream_filter_prepend', + 'stream_filter_register','stream_filter_remove', + 'stream_get_contents','stream_get_filters','stream_get_line', + 'stream_get_meta_data','stream_get_transports', + 'stream_get_wrappers','stream_is_local', + 'stream_notification_callback','stream_register_wrapper', + 'stream_resolve_include_path','stream_select','stream_set_blocking', + 'stream_set_timeout','stream_set_write_buffer', + 'stream_socket_accept','stream_socket_client', + 'stream_socket_enable_crypto','stream_socket_get_name', + 'stream_socket_pair','stream_socket_recvfrom', + 'stream_socket_sendto','stream_socket_server', + 'stream_socket_shutdown','stream_supports_lock', + 'stream_wrapper_register','stream_wrapper_restore', + 'stream_wrapper_unregister','strftime','stripcslashes','stripos', + 'stripslashes','strip_tags','stristr','strlen','strnatcasecmp', + 'strnatcmp','strpbrk','strncasecmp','strncmp','strpos','strrchr', + 'strrev','strripos','strrpos','strspn','strstr','strtok', + 'strtolower','strtotime','strtoupper','strtr','strval', + 'str_ireplace','str_pad','str_repeat','str_replace','str_rot13', + 'str_split','str_shuffle','str_word_count','substr', + 'substr_compare','substr_count','substr_replace','svn_add', + 'svn_auth_get_parameter','svn_auth_set_parameter','svn_cat', + 'svn_checkout','svn_cleanup','svn_client_version','svn_commit', + 'svn_diff','svn_export','svn_fs_abort_txn','svn_fs_apply_text', + 'svn_fs_begin_txn2','svn_fs_change_node_prop','svn_fs_check_path', + 'svn_fs_contents_changed','svn_fs_copy','svn_fs_delete', + 'svn_fs_dir_entries','svn_fs_file_contents','svn_fs_file_length', + 'svn_fs_is_dir','svn_fs_is_file','svn_fs_make_dir', + 'svn_fs_make_file','svn_fs_node_created_rev','svn_fs_node_prop', + 'svn_fs_props_changed','svn_fs_revision_prop', + 'svn_fs_revision_root','svn_fs_txn_root','svn_fs_youngest_rev', + 'svn_import','svn_info','svn_log','svn_ls','svn_repos_create', + 'svn_repos_fs','svn_repos_fs_begin_txn_for_commit', + 'svn_repos_fs_commit_txn','svn_repos_hotcopy','svn_repos_open', + 'svn_repos_recover','svn_status','svn_update','symlink', + 'sys_get_temp_dir','syslog','system','tan','tanh','tempnam', + 'textdomain','thread_get','thread_include','thread_lock', + 'thread_lock_try','thread_mutex_destroy','thread_mutex_init', + 'thread_set','thread_start','thread_unlock','tidy_access_count', + 'tidy_clean_repair','tidy_config_count','tidy_diagnose', + 'tidy_error_count','tidy_get_body','tidy_get_config', + 'tidy_get_error_buffer','tidy_get_head','tidy_get_html', + 'tidy_get_html_ver','tidy_get_output','tidy_get_release', + 'tidy_get_root','tidy_get_status','tidy_getopt','tidy_is_xhtml', + 'tidy_is_xml','tidy_parse_file','tidy_parse_string', + 'tidy_repair_file','tidy_repair_string','tidy_warning_count','time', + 'timezone_abbreviations_list','timezone_identifiers_list', + 'timezone_name_from_abbr','timezone_name_get','timezone_offset_get', + 'timezone_open','timezone_transitions_get','tmpfile', + 'token_get_all','token_name','touch','trigger_error', + 'transliterate','transliterate_filters_get','trim','uasort', + 'ucfirst','ucwords','uksort','umask','uniqid','unixtojd','unlink', + 'unpack','unregister_tick_function','unserialize','unset', + 'urldecode','urlencode','user_error','use_soap_error_handler', + 'usleep','usort','utf8_decode','utf8_encode','var_dump', + 'var_export','variant_abs','variant_add','variant_and', + 'variant_cast','variant_cat','variant_cmp', + 'variant_date_from_timestamp','variant_date_to_timestamp', + 'variant_div','variant_eqv','variant_fix','variant_get_type', + 'variant_idiv','variant_imp','variant_int','variant_mod', + 'variant_mul','variant_neg','variant_not','variant_or', + 'variant_pow','variant_round','variant_set','variant_set_type', + 'variant_sub','variant_xor','version_compare','virtual','vfprintf', + 'vprintf','vsprintf','wddx_add_vars','wddx_deserialize', + 'wddx_packet_end','wddx_packet_start','wddx_serialize_value', + 'wddx_serialize_vars','win_beep','win_browse_file', + 'win_browse_folder','win_create_link','win_message_box', + 'win_play_wav','win_shell_execute','win32_create_service', + 'win32_delete_service','win32_get_last_control_message', + 'win32_ps_list_procs','win32_ps_stat_mem','win32_ps_stat_proc', + 'win32_query_service_status','win32_scheduler_delete_task', + 'win32_scheduler_enum_tasks','win32_scheduler_get_task_info', + 'win32_scheduler_run','win32_scheduler_set_task_info', + 'win32_set_service_status','win32_start_service', + 'win32_start_service_ctrl_dispatcher','win32_stop_service', + 'wordwrap','xml_error_string','xml_get_current_byte_index', + 'xml_get_current_column_number','xml_get_current_line_number', + 'xml_get_error_code','xml_parse','xml_parser_create', + 'xml_parser_create_ns','xml_parser_free','xml_parser_get_option', + 'xml_parser_set_option','xml_parse_into_struct', + 'xml_set_character_data_handler','xml_set_default_handler', + 'xml_set_element_handler','xml_set_end_namespace_decl_handler', + 'xml_set_external_entity_ref_handler', + 'xml_set_notation_decl_handler','xml_set_object', + 'xml_set_processing_instruction_handler', + 'xml_set_start_namespace_decl_handler', + 'xml_set_unparsed_entity_decl_handler','xmldoc','xmldocfile', + 'xmlrpc_decode','xmlrpc_decode_request','xmlrpc_encode', + 'xmlrpc_encode_request','xmlrpc_get_type','xmlrpc_is_fault', + 'xmlrpc_parse_method_descriptions', + 'xmlrpc_server_add_introspection_data','xmlrpc_server_call_method', + 'xmlrpc_server_create','xmlrpc_server_destroy', + 'xmlrpc_server_register_introspection_callback', + 'xmlrpc_server_register_method','xmlrpc_set_type','xmltree', + 'xmlwriter_end_attribute','xmlwriter_end_cdata', + 'xmlwriter_end_comment','xmlwriter_end_document', + 'xmlwriter_end_dtd','xmlwriter_end_dtd_attlist', + 'xmlwriter_end_dtd_element','xmlwriter_end_dtd_entity', + 'xmlwriter_end_element','xmlwriter_end_pi','xmlwriter_flush', + 'xmlwriter_full_end_element','xmlwriter_open_memory', + 'xmlwriter_open_uri','xmlwriter_output_memory', + 'xmlwriter_set_indent','xmlwriter_set_indent_string', + 'xmlwriter_start_attribute','xmlwriter_start_attribute_ns', + 'xmlwriter_start_cdata','xmlwriter_start_comment', + 'xmlwriter_start_document','xmlwriter_start_dtd', + 'xmlwriter_start_dtd_attlist','xmlwriter_start_dtd_element', + 'xmlwriter_start_dtd_entity','xmlwriter_start_element', + 'xmlwriter_start_element_ns','xmlwriter_start_pi','xmlwriter_text', + 'xmlwriter_write_attribute','xmlwriter_write_attribute_ns', + 'xmlwriter_write_cdata','xmlwriter_write_comment', + 'xmlwriter_write_dtd','xmlwriter_write_dtd_attlist', + 'xmlwriter_write_dtd_element','xmlwriter_write_dtd_entity', + 'xmlwriter_write_element','xmlwriter_write_element_ns', + 'xmlwriter_write_pi','xmlwriter_write_raw','xpath_eval', + 'xpath_eval_expression','xpath_new_context','xpath_register_ns', + 'xpath_register_ns_auto','xptr_eval','xptr_new_context','yp_all', + 'yp_cat','yp_errno','yp_err_string','yp_first', + 'yp_get_default_domain','yp_master','yp_match','yp_next','yp_order', + 'zend_current_obfuscation_level','zend_get_cfg_var','zend_get_id', + 'zend_loader_current_file','zend_loader_enabled', + 'zend_loader_file_encoded','zend_loader_file_licensed', + 'zend_loader_install_license','zend_loader_version', + 'zend_logo_guid','zend_match_hostmasks','zend_obfuscate_class_name', + 'zend_obfuscate_function_name','zend_optimizer_version', + 'zend_runtime_obfuscate','zend_version','zip_close', + 'zip_entry_close','zip_entry_compressedsize', + 'zip_entry_compressionmethod','zip_entry_filesize','zip_entry_name', + 'zip_entry_open','zip_entry_read','zip_open','zip_read', + 'zlib_get_coding_type' + ), + 4 => array( + 'DEFAULT_INCLUDE_PATH', 'DIRECTORY_SEPARATOR', 'E_ALL', + 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_CORE_ERROR', + 'E_CORE_WARNING', 'E_ERROR', 'E_NOTICE', 'E_PARSE', 'E_STRICT', + 'E_USER_ERROR', 'E_USER_NOTICE', 'E_USER_WARNING', 'E_WARNING', + 'ENT_COMPAT','ENT_QUOTES','ENT_NOQUOTES', + 'false', 'null', 'PEAR_EXTENSION_DIR', 'PEAR_INSTALL_DIR', + 'PHP_BINDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_DATADIR', + 'PHP_EXTENSION_DIR', 'PHP_LIBDIR', + 'PHP_LOCALSTATEDIR', 'PHP_OS', + 'PHP_OUTPUT_HANDLER_CONT', 'PHP_OUTPUT_HANDLER_END', + 'PHP_OUTPUT_HANDLER_START', 'PHP_SYSCONFDIR', + 'PHP_VERSION', 'true', '__CLASS__', '__FILE__', '__FUNCTION__', + '__LINE__', '__METHOD__' + ) + ), + 'SYMBOLS' => array( + 1 => array( + '<'.'%', '<'.'%=', '%'.'>', '<'.'?', '<'.'?=', '?'.'>' + ), + 0 => array( + '(', ')', '[', ']', '{', '}', + '!', '@', '%', '&', '|', '/', + '<', '>', + '=', '-', '+', '*', + '.', ':', ',', ';' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #990000;', + 4 => 'color: #009900; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #666666; font-style: italic;', + 3 => 'color: #0000cc; font-style: italic;', + 4 => 'color: #009933; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #660099; font-weight: bold;', + 3 => 'color: #660099; font-weight: bold;', + 4 => 'color: #006699; font-weight: bold;', + 5 => 'color: #006699; font-weight: bold; font-style: italic;', + 6 => 'color: #009933; font-weight: bold;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;', + 'HARD' => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', + GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', + ), + 'METHODS' => array( + 1 => 'color: #004000;', + 2 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;', + 1 => 'color: #000000; font-weight: bold;' + ), + 'REGEXPS' => array( + 0 => 'color: #000088;' + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.php.net/{FNAMEL}', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '->', + 2 => '::' + ), + 'REGEXPS' => array( + //Variables + 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*" + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '<'.'?php' => '?'.'>' + ), + 1 => array( + '<'.'?' => '?'.'>' + ), + 2 => array( + '<'.'%' => '%'.'>' + ), + 3 => array( + '' + ), + 4 => "/(?P<\\?(?>php\b)?)(?:". + "(?>[^\"'?\\/<]+)|". + "\\?(?!>)|". + "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|". + "(?>\"(?>[^\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|". + "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|". + "\\/\\/(?>.*?$)|". + "\\/(?=[^*\\/])|". + "<(?!<<)|". + "<<<(?P\w+)\s.*?\s\k". + ")*(?P\\?>|\Z)/sm", + 5 => "/(?P<%)(?:". + "(?>[^\"'%\\/<]+)|". + "%(?!>)|". + "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|". + "(?>\"(?>[^\\\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|". + "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|". + "\\/\\/(?>.*?$)|". + "\\/(?=[^*\\/])|". + "<(?!<<)|". + "<<<(?P\w+)\s.*?\s\k". + ")*(?P%>)/sm", + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/pic16.php b/_piecrust/libs/Geshi/geshi/pic16.php new file mode 100644 index 0000000..776a86d --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/pic16.php @@ -0,0 +1,141 @@ + 'PIC16', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + /*Instructions*/ + 1 => array( + 'addcf','adddcf','addlw','addwf','andlw','andwf','bc','bcf','bdc', + 'bnc','bndc','bnz','bsf','btfsc','btfss','bz','call','clrc','clrdc', + 'clrf','clrw','clrwdt','clrz','comf','decf','goto','incf','incfsz', + 'iorlw','iorwf','lcall','lgoto','movf','movfw','movlw','movwf', + 'option','negf','nop','retfie','retlw','return','rlf','rrf','setc', + 'setdc','setz','skpc','skpdc','skpnc','skpndc','skpnz','skpz', + 'sleep','subcf','subdcf','sublw','subwf','swapf','tris','tstf', + 'xorlw','xorwf' + ), + /*Registers*/ + 2 => array( + 'INDF','TMR0','OPTION','PCL','STATUS','FSR','PORTA','PORTB','PORTC', + 'PORTD','PORTE','PORTF','TRISA','TRISB','TRISC','TRISD','TRISE', + 'TRISF','PCLATH','INTCON','PIR1','PIE1','PCON','CMCON','VRCON', + 'F','W' + ), + /*Directives*/ + 3 => array( + '_BADRAM','BANKISEL','BANKSEL','CBLOCK','CODE','_CONFIG','CONSTANT', + 'DA','DATA','DB','DE','#DEFINE','DT','DW','ELSE','END','ENDC', + 'ENDIF','ENDM','ENDW','EQU','ERROR','ERRORLEVEL','EXITM','EXPAND', + 'EXTERN','FILL','GLOBAL','IDATA','_IDLOCS','IF','IFDEF','IFNDEF', + 'INCLUDE','#INCLUDE','LIST','LOCAL','MACRO','_MAXRAM','MESSG', + 'NOEXPAND','NOLIST','ORG','PAGE','PAGESEL','PROCESSOR','RADIX', + 'RES','SET','SPACE','SUBTITLE','TITLE','UDATA','UDATA_ACS', + 'UDATA_OVR','UDATA_SHR','#UNDEFINE','VARIABLE','WHILE', + 'D','H','O','B','A' + ), + ), + 'SYMBOLS' => array('=','.',',',':'), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000a0; font-weight: bold;', + 2 => 'color: #aa3300; font-weight: bold;', + 3 => 'color: #0000ff;', + ), + 'COMMENTS' => array( + 1 => 'color: #00a000;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #ff0000;' + ), + 'BRACKETS' => array( + 0 => 'color: #0000ff;' + ), + 'STRINGS' => array( + 0 => 'color: #ff7700;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff7700;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #7777ff;' + ), + 'REGEXPS' => array(), + 'SCRIPT' => array() + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | + GESHI_NUMBER_BIN_SUFFIX | + GESHI_NUMBER_HEX_PREFIX | + GESHI_NUMBER_HEX_SUFFIX, + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array(), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "a-zA-Z0-9\$_\|\#>|^", + 'DISALLOWED_AFTER' => "a-zA-Z0-9_<\|%" + ) + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/pike.php b/_piecrust/libs/Geshi/geshi/pike.php new file mode 100644 index 0000000..bc2843b --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/pike.php @@ -0,0 +1,103 @@ + 'Pike', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'goto', 'break', 'continue', 'return', 'case', 'default', 'if', + 'else', 'switch', 'while', 'foreach', 'do', 'for', 'gauge', + 'destruct', 'lambda', 'inherit', 'import', 'typeof', 'catch', + 'inline', 'nomask', 'private', 'protected', 'public', 'static' + ) + ), + 'SYMBOLS' => array( + 1 => array( + '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '%', '=', '!', '&', '|', '?', ';' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + ), + 'METHODS' => array( + 0 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 1 => 'color: #339933;' + ), + 'REGEXPS' => array(), + 'SCRIPT' => array() + ), + 'URLS' => array(1 => ''), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array(1 => '.'), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/pixelbender.php b/_piecrust/libs/Geshi/geshi/pixelbender.php new file mode 100644 index 0000000..8cf0529 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/pixelbender.php @@ -0,0 +1,176 @@ + 'Pixel Bender 1.0', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'languageVersion', 'kernel' + ), + 2 => array( + 'import', 'parameter', 'dependent', 'const', 'input', 'output', + 'evaluatePixel', 'evaluateDependents', 'needed', 'changed', 'generated' + ), + 3 => array( + 'bool', 'bool2', 'bool3', 'bool4', 'int', 'int2', 'int3', 'int4', + 'float', 'float2', 'float3', 'float4', 'float2x2', 'float3x3', 'float4x4', + 'pixel2', 'pixel3', 'pixel4', 'region', 'image1', 'image2', 'image3', 'image4', + 'imageRef', 'void' + ), + 4 => array( + 'in', 'out', 'inout', 'if', 'else', 'for', 'while', 'do', 'break', + 'continue', 'return' + ), + 5 => array( + 'radians', 'degrees', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'pow', + 'exp', 'exp2', 'log', 'log2', 'sqrt', 'inverseSqrt', 'abs', 'sign', 'floor', + 'ceil', 'fract', 'mod', 'min', 'max', 'step', 'clamp', 'mix', 'smoothStep', + 'length', 'distance', 'dot', 'cross', 'normalize', 'matrixCompMult', 'lessThan', + 'lessThanEqual', 'greaterThan', 'greaterThanEqual', 'equal', 'notEqual', 'any', + 'all', 'not', 'nowhere', 'everywhere', 'transform', 'union', 'intersect', + 'outset', 'inset', 'bounds', 'isEmpty', 'sample', 'sampleLinear', 'sampleNearest', + 'outCoord', 'dod', 'pixelSize', 'pixelAspectRatio' + ), + 6 => array( + 'namespace', 'vendor', 'version', 'minValue', 'maxValue', 'defaultValue', 'description' + ), + 7 => array( + '#if', '#endif', '#ifdef', '#elif', 'defined', '#define', + 'AIF_ATI', 'AIF_NVIDIA', 'AIF_FLASH_TARGET' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', '%', '&', '|', '+', '-', '*', '/', '=', '<', '>', '?', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0033ff;', + 2 => 'color: #0033ff; font-weight: bold;', + 3 => 'color: #0033ff;', + 4 => 'color: #9900cc; font-weight: bold;', + 5 => 'color: #333333;', + 6 => 'color: #666666;', + 7 => 'color: #990000;', + ), + 'COMMENTS' => array( + 1 => 'color: #009900;', + 'MULTI' => 'color: #3f5fbf;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #990000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000000; font-weight:bold;' + ), + 'METHODS' => array( + 0 => 'color: #000000;', + ), + 'SYMBOLS' => array( + 0 => 'color: #000000; font-weight: bold;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array('.'), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + + +?> diff --git a/_piecrust/libs/Geshi/geshi/plsql.php b/_piecrust/libs/Geshi/geshi/plsql.php new file mode 100644 index 0000000..1a9378c --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/plsql.php @@ -0,0 +1,256 @@ + + * Copyright: (c) 2006 Victor Engmark (http://l0b0.net/) + * Release Version: 1.0.8.9 + * Date Started: 2006/10/26 + * + * Oracle 9.2 PL/SQL language file for GeSHi. + * Formatting is based on the default setup of TOAD 8.6. + * + * CHANGES + * ------- + * 2006/10/27 (1.0.0) + * - First Release + * + * TODO (updated 2006/10/27) + * ------------------------- + * * Add < and > to brackets + * * Remove symbols which are also comment delimiters / quote marks? + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'PL/SQL', + 'COMMENT_SINGLE' => array(1 =>'--'), //http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#2930 + 'COMMENT_MULTI' => array('/*' => '*/'), //http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#2950 + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array("'", '"'), //http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + //PL/SQL reserved keywords (http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/f_words.htm#LNPLS019) + 1 => array('ZONE', 'YEAR', 'WRITE', 'WORK', 'WITH', 'WHILE', 'WHERE', + 'WHENEVER', 'WHEN', 'VIEW', 'VARCHAR2', 'VARCHAR', 'VALUES', + 'VALIDATE', 'USE', 'UPDATE', 'UNIQUE', 'UNION', 'TYPE', 'TRUE', + 'TRIGGER', 'TO', 'TIMEZONE_REGION', 'TIMEZONE_MINUTE', 'TIMEZONE_HOUR', + 'TIMEZONE_ABBR', 'TIMESTAMP', 'TIME', 'THEN', 'TABLE', 'SYNONYM', + 'SUCCESSFUL', 'SUBTYPE', 'START', 'SQLERRM', 'SQLCODE', 'SQL', 'SPACE', + 'SMALLINT', 'SHARE', 'SET', 'SEPARATE', 'SELECT', 'SECOND', + 'SAVEPOINT', 'ROWTYPE', 'ROWNUM', 'ROWID', 'ROW', 'ROLLBACK', + 'REVERSE', 'RETURN', 'RELEASE', 'RECORD', 'REAL', 'RAW', 'RANGE', + 'RAISE', 'PUBLIC', 'PROCEDURE', 'PRIVATE', 'PRIOR', 'PRAGMA', + 'POSITIVEN', 'POSITIVE', 'PLS_INTEGER', 'PCTFREE', 'PARTITION', + 'PACKAGE', 'OUT', 'OTHERS', 'ORGANIZATION', 'ORDER', 'OR', 'OPTION', + 'OPERATOR', 'OPEN', 'OPAQUE', 'ON', 'OF', 'OCIROWID', 'NUMBER_BASE', + 'NUMBER', 'NULL', 'NOWAIT', 'NOT', 'NOCOPY', 'NEXTVAL', 'NEW', + 'NATURALN', 'NATURAL', 'MONTH', 'MODE', 'MLSLABEL', 'MINUTE', 'MINUS', + 'LOOP', 'LONG', 'LOCK', 'LIMITED', 'LIKE', 'LEVEL', 'JAVA', + 'ISOLATION', 'IS', 'INTO', 'INTERVAL', 'INTERSECT', 'INTERFACE', + 'INTEGER', 'INSERT', 'INDICATOR', 'INDEX', 'IN', 'IMMEDIATE', 'IF', + 'HOUR', 'HEAP', 'HAVING', 'GROUP', 'GOTO', 'FUNCTION', 'FROM', + 'FORALL', 'FOR', 'FLOAT', 'FETCH', 'FALSE', 'EXTENDS', 'EXIT', + 'EXISTS', 'EXECUTE', 'EXCLUSIVE', 'EXCEPTION', 'END', 'ELSIF', 'ELSE', + 'DROP', 'DO', 'DISTINCT', 'DESC', 'DELETE', 'DEFAULT', 'DECLARE', + 'DECIMAL', 'DAY', 'DATE', 'CURSOR', 'CURRVAL', 'CURRENT', 'CREATE', + 'CONSTANT', 'CONNECT', 'COMPRESS', 'COMMIT', 'COMMENT', 'COLLECT', + 'CLUSTER', 'CLOSE', 'CHECK', 'CHAR_BASE', 'CHAR', 'CASE', 'BY', 'BULK', + 'BOOLEAN', 'BODY', 'BINARY_INTEGER', 'BETWEEN', 'BEGIN', 'AUTHID', + 'AT', 'ASC', 'AS', 'ARRAY', 'ANY', 'AND', 'ALTER', 'ALL'), + //SQL functions (http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/toc.htm & http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/functions101a.htm#85925) + 2 => array('XMLTRANSFORM', 'XMLSEQUENCE', 'XMLFOREST', 'XMLELEMENT', + 'XMLCONCAT', 'XMLCOLATTVAL', 'XMLAGG', 'WIDTH_BUCKET', 'VSIZE', + 'VARIANCE', 'VAR_SAMP', 'VAR_POP', 'VALUE', 'USERENV', 'USER', 'UPPER', + 'UPDATEXML', 'UNISTR', 'UID', 'TZ_OFFSET', 'TRUNC', 'TRIM', 'TREAT', + 'TRANSLATE', 'TO_YMINTERVAL', 'TO_TIMESTAMP_TZ', 'TO_TIMESTAMP', + 'TO_SINGLE_BYTE', 'TO_NUMBER', 'TO_NCLOB', 'TO_NCHAR', 'TO_MULTI_BYTE', + 'TO_LOB', 'TO_DSINTERVAL', 'TO_DATE', 'TO_CLOB', 'TO_CHAR', 'TANH', + 'TAN', 'SYSTIMESTAMP', 'SYSDATE', 'SYS_XMLGEN', 'SYS_XMLAGG', + 'SYS_TYPEID', 'SYS_GUID', 'SYS_EXTRACT_UTC', 'SYS_DBURIGEN', + 'SYS_CONTEXT', 'SYS_CONNECT_BY_PATH', 'SUM', 'SUBSTR', 'STDDEV_SAMP', + 'STDDEV_POP', 'STDDEV', 'SQRT', 'SOUNDEX', 'SINH', 'SIN', 'SIGN', + 'SESSIONTIMEZONE', 'RTRIM', 'RPAD', 'ROWIDTONCHAR', 'ROWIDTOCHAR', + 'ROW_NUMBER', 'ROUND', 'REPLACE', 'REGR_SYY', 'REGR_SXY', 'REGR_SXX', + 'REGR_SLOPE', 'REGR_R2', 'REGR_INTERCEPT', 'REGR_COUNT', 'REGR_AVGY', + 'REGR_AVGX', 'REFTOHEX', 'REF', 'RAWTONHEX', 'RAWTOHEX', + 'RATIO_TO_REPORT', 'RANK', 'POWER', 'PERCENTILE_DISC', + 'PERCENTILE_CONT', 'PERCENT_RANK', 'PATH', 'NVL2', 'NVL', + 'NUMTOYMINTERVAL', 'NUMTODSINTERVAL', 'NULLIF', 'NTILE', 'NLSSORT', + 'NLS_UPPER', 'NLS_LOWER', 'NLS_INITCAP', 'NLS_CHARSET_NAME', + 'NLS_CHARSET_ID', 'NLS_CHARSET_DECL_LEN', 'NEXT_DAY', 'NEW_TIME', + 'NCHR', 'MONTHS_BETWEEN', 'MOD', 'MIN', 'MAX', 'MAKE_REF', 'LTRIM', + 'LPAD', 'LOWER', 'LOG', 'LOCALTIMESTAMP', 'LN', 'LENGTH', 'LEAST', + 'LEAD', 'LAST_VALUE', 'LAST_DAY', 'LAST', 'LAG', 'INSTR', 'INITCAP', + 'HEXTORAW', 'GROUPING_ID', 'GROUPING', 'GROUP_ID', 'GREATEST', + 'FROM_TZ', 'FLOOR', 'FIRST_VALUE', 'FIRST', 'EXTRACTVALUE', 'EXTRACT', + 'EXP', 'EXISTSNODE', 'EMPTY_CLOB', 'EMPTY_BLOB', 'DUMP', 'DEREF', + 'DEPTH', 'DENSE_RANK', 'DECOMPOSE', 'DECODE', 'DBTIMEZONE', + 'CURRENT_TIMESTAMP', 'CURRENT_DATE', 'CUME_DIST', 'COVAR_SAMP', + 'COVAR_POP', 'COUNT', 'COSH', 'COS', 'CORR', 'CONVERT', 'CONCAT', + 'COMPOSE', 'COALESCE', 'CHR', 'CHARTOROWID', 'CEIL', 'CAST', 'BITAND', + 'BIN_TO_NUM', 'BFILENAME', 'AVG', 'ATAN2', 'ATAN', 'ASIN', 'ASCIISTR', + 'ASCII', 'ADD_MONTHS', 'ACOS', 'ABS'), + //PL/SQL packages (http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96612/intro2.htm#1025672) + 3 => array('UTL_URL', 'UTL_TCP', 'UTL_SMTP', 'UTL_REF', 'UTL_RAW', + 'UTL_PG', 'UTL_INADDR', 'UTL_HTTP', 'UTL_FILE', 'UTL_ENCODE', + 'UTL_COLL', 'SDO_UTIL', 'SDO_TUNE', 'SDO_MIGRATE', 'SDO_LRS', + 'SDO_GEOM', 'SDO_CS', 'DMBS_XMLQUERY', 'DMBS_FLASHBACK', + 'DMBS_DEFER_SYS', 'DEBUG_EXTPROC', 'DBMS_XSLPROCESSOR', 'DBMS_XPLAN', + 'DBMS_XMLSCHEMA', 'DBMS_XMLSAVE', 'DBMS_XMLPARSER', 'DBMS_XMLGEN', + 'DBMS_XMLDOM', 'DBMS_XDBT', 'DBMS_XDB_VERSION', 'DBMS_XDB', 'DBMS_WM', + 'DBMS_UTILITY', 'DBMS_TYPES', 'DBMS_TTS', 'DBMS_TRANSFORM', + 'DBMS_TRANSACTION', 'DBMS_TRACE', 'DBMS_STRM_A', 'DBMS_STRM', + 'DBMS_STORAGE_MAP', 'DBMS_STATS', 'DBMS_SQL', 'DBMS_SPACE_ADMIN', + 'DBMS_SPACE', 'DBMS_SHARED_POOL', 'DBMS_SESSION', 'DBMS_RULE_ADM', + 'DBMS_RULE', 'DBMS_ROWID', 'DBMS_RLS', 'DBMS_RESUMABLE', + 'DBMS_RESOURCE_MANAGER_PRIVS', 'DBMS_RESOURCE_MANAGER', 'DBMS_REPUTIL', + 'DBMS_REPCAT_RGT', 'DBMS_REPCAT_INSTATIATE', 'DBMS_REPCAT_ADMIN', + 'DBMS_REPCAT', 'DBMS_REPAIR', 'DBMS_REFRESH', 'DBMS_REDEFINITION', + 'DBMS_RECTIFIER_DIFF', 'DBMS_RANDOM', 'DBMS_PROPAGATION_ADM', + 'DBMS_PROFILER', 'DBMS_PIPE', 'DBMS_PCLXUTIL', 'DBMS_OUTPUT', + 'DBMS_OUTLN_EDIT', 'DBMS_OUTLN', 'DBMS_ORACLE_TRACE_USER', + 'DBMS_ORACLE_TRACE_AGENT', 'DBMS_OLAP', 'DBMS_OFFLINE_SNAPSHOT', + 'DBMS_OFFLINE_OG', 'DBMS_ODCI', 'DBMS_OBFUSCATION_TOOLKIT', + 'DBMS_MVIEW', 'DBMS_MGWMSG', 'DBMS_MGWADM', 'DBMS_METADATA', + 'DBMS_LOGSTDBY', 'DBMS_LOGMNR_D', 'DBMS_LOGMNR_CDC_SUBSCRIBE', + 'DBMS_LOGMNR_CDC_PUBLISH', 'DBMS_LOGMNR', 'DBMS_LOCK', 'DBMS_LOB', + 'DBMS_LIBCACHE', 'DBMS_LDAP', 'DBMS_JOB', 'DBMS_IOT', + 'DBMS_HS_PASSTHROUGH', 'DBMS_FGA', 'DBMS_DISTRIBUTED_TRUST_ADMIN', + 'DBMS_DESCRIBE', 'DBMS_DEFER_QUERY', 'DBMS_DEFER', 'DBMS_DEBUG', + 'DBMS_DDL', 'DBMS_CAPTURE_ADM', 'DBMS_AW', 'DBMS_AQELM', 'DBMS_AQADM', + 'DBMS_AQ', 'DBMS_APPLY_ADM', 'DBMS_APPLICATION_INFO', 'DBMS_ALERT', + 'CWM2_OLAP_AW_ACCESS'), + //PL/SQL predefined exceptions (http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/07_errs.htm#784) + 4 => array('ZERO_DIVIDE', 'VALUE_ERROR', 'TOO_MANY_ROWS', + 'TIMEOUT_ON_RESOURCE', 'SYS_INVALID_ROWID', 'SUBSCRIPT_OUTSIDE_LIMIT', + 'SUBSCRIPT_BEYOND_COUNT', 'STORAGE_ERROR', 'SELF_IS_NULL', + 'ROWTYPE_MISMATCH', 'PROGRAM_ERROR', 'NOT_LOGGED_ON', 'NO_DATA_FOUND', + 'LOGIN_DENIED', 'INVALID_NUMBER', 'INVALID_CURSOR', 'DUP_VAL_ON_INDEX', + 'CURSOR_ALREADY_OPEN', 'COLLECTION_IS_NULL', 'CASE_NOT_FOUND', + 'ACCESS_INTO_NULL'), + //Static data dictionary views (http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96536/ch2.htm) + 5 => array('USER_REPSITES', 'USER_REPSCHEMA', + 'USER_REPRESOLUTION_STATISTICS', 'USER_REPRESOLUTION_METHOD', + 'USER_REPRESOLUTION', 'USER_REPRESOL_STATS_CONTROL', 'USER_REPPROP', + 'USER_REPPRIORITY_GROUP', 'USER_REPPRIORITY', + 'USER_REPPARAMETER_COLUMN', 'USER_REPOBJECT', 'USER_REPKEY_COLUMNS', + 'USER_REPGROUPED_COLUMN', 'USER_REPGROUP_PRIVILEGES', 'USER_REPGROUP', + 'USER_REPGENOBJECTS', 'USER_REPGENERATED', 'USER_REPFLAVORS', + 'USER_REPFLAVOR_OBJECTS', 'USER_REPFLAVOR_COLUMNS', 'USER_REPDDL', + 'USER_REPCONFLICT', 'USER_REPCOLUMN_GROUP', 'USER_REPCOLUMN', + 'USER_REPCATLOG', 'USER_REPCAT_USER_PARM_VALUES', + 'USER_REPCAT_USER_AUTHORIZATIONS', 'USER_REPCAT_TEMPLATE_SITES', + 'USER_REPCAT_TEMPLATE_PARMS', 'USER_REPCAT_TEMPLATE_OBJECTS', + 'USER_REPCAT_REFRESH_TEMPLATES', 'USER_REPCAT', 'USER_REPAUDIT_COLUMN', + 'USER_REPAUDIT_ATTRIBUTE', 'DBA_REPSITES_NEW', 'DBA_REPSITES', + 'DBA_REPSCHEMA', 'DBA_REPRESOLUTION_STATISTICS', + 'DBA_REPRESOLUTION_METHOD', 'DBA_REPRESOLUTION', + 'DBA_REPRESOL_STATS_CONTROL', 'DBA_REPPROP', 'DBA_REPPRIORITY_GROUP', + 'DBA_REPPRIORITY', 'DBA_REPPARAMETER_COLUMN', 'DBA_REPOBJECT', + 'DBA_REPKEY_COLUMNS', 'DBA_REPGROUPED_COLUMN', + 'DBA_REPGROUP_PRIVILEGES', 'DBA_REPGROUP', 'DBA_REPGENOBJECTS', + 'DBA_REPGENERATED', 'DBA_REPFLAVORS', 'DBA_REPFLAVOR_OBJECTS', + 'DBA_REPFLAVOR_COLUMNS', 'DBA_REPEXTENSIONS', 'DBA_REPDDL', + 'DBA_REPCONFLICT', 'DBA_REPCOLUMN_GROUP', 'DBA_REPCOLUMN', + 'DBA_REPCATLOG', 'DBA_REPCAT_USER_PARM_VALUES', + 'DBA_REPCAT_USER_AUTHORIZATIONS', 'DBA_REPCAT_TEMPLATE_SITES', + 'DBA_REPCAT_TEMPLATE_PARMS', 'DBA_REPCAT_TEMPLATE_OBJECTS', + 'DBA_REPCAT_REFRESH_TEMPLATES', 'DBA_REPCAT_EXCEPTIONS', 'DBA_REPCAT', + 'DBA_REPAUDIT_COLUMN', 'DBA_REPAUDIT_ATTRIBUTE', 'ALL_REPSITES', + 'ALL_REPSCHEMA', 'ALL_REPRESOLUTION_STATISTICS', + 'ALL_REPRESOLUTION_METHOD', 'ALL_REPRESOLUTION', + 'ALL_REPRESOL_STATS_CONTROL', 'ALL_REPPROP', 'ALL_REPPRIORITY_GROUP', + 'ALL_REPPRIORITY', 'ALL_REPPARAMETER_COLUMN', 'ALL_REPOBJECT', + 'ALL_REPKEY_COLUMNS', 'ALL_REPGROUPED_COLUMN', + 'ALL_REPGROUP_PRIVILEGES', 'ALL_REPGROUP', 'ALL_REPGENOBJECTS', + 'ALL_REPGENERATED', 'ALL_REPFLAVORS', 'ALL_REPFLAVOR_OBJECTS', + 'ALL_REPFLAVOR_COLUMNS', 'ALL_REPDDL', 'ALL_REPCONFLICT', + 'ALL_REPCOLUMN_GROUP', 'ALL_REPCOLUMN', 'ALL_REPCATLOG', + 'ALL_REPCAT_USER_PARM_VALUES', 'ALL_REPCAT_USER_AUTHORIZATIONS', + 'ALL_REPCAT_TEMPLATE_SITES', 'ALL_REPCAT_TEMPLATE_PARMS', + 'ALL_REPCAT_TEMPLATE_OBJECTS', 'ALL_REPCAT_REFRESH_TEMPLATES', + 'ALL_REPCAT', 'ALL_REPAUDIT_COLUMN', 'ALL_REPAUDIT_ATTRIBUTE') + ), + 'SYMBOLS' => array( + //PL/SQL delimiters (http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#2732) + '+', '%', "'", '.', '/', '(', ')', ':', ',', '*', '"', '=', '<', '>', '@', ';', '-', ':=', '=>', '||', '**', '<<', '>>', '/*', '*/', '..', '<>', '!=', '~=', '^=', '<=', '>=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00F;', + 2 => 'color: #000;', + 3 => 'color: #00F;', + 4 => 'color: #F00;', + 5 => 'color: #800;' + ), + 'COMMENTS' => array( + 1 => 'color: #080; font-style: italic;', + 'MULTI' => 'color: #080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #00F;' + ), + 'STRINGS' => array( + 0 => 'color: #F00;' + ), + 'NUMBERS' => array( + 0 => 'color: #800;' + ), + 'METHODS' => array( + 0 => 'color: #0F0;' + ), + 'SYMBOLS' => array( + 0 => 'color: #00F;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => 'color: #0F0;' + ) + ), + 'URLS' => array( + 1 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAMEU}', + 2 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAMEU}', + 3 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAMEU}', + 4 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAMEU}', + 5 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAMEU}' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/postgresql.php b/_piecrust/libs/Geshi/geshi/postgresql.php new file mode 100644 index 0000000..c0decd0 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/postgresql.php @@ -0,0 +1,288 @@ + 2010-05-03 + * Copyright: (c) 2007 Christophe Chauvet (http://kryskool.org/), Nigel McNie (http://qbnz.com/highlighter) + * Release Version: 1.0.8.9 + * Date Started: 2007/07/20 + * + * PostgreSQL language file for GeSHi. + * + * CHANGES + * ------- + * 2007/07/20 (1.0.0) + * - First Release + * + * TODO (updated 2007/07/20) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'PostgreSQL', + 'COMMENT_SINGLE' => array(1 => '--'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"', '`'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + //Put PostgreSQL reserved keywords here. I like mine uppercase. + 1 => array( + 'ABORT','ABSOLUTE','ACCESS','ACTION','ADD','ADMIN','AFTER', + 'AGGREGATE','ALL','ALSO','ALTER','ALWAYS','ANALYSE','ANALYZE','AND', + 'ANY','AS','ASC,','ASSERTION','ASSIGNMENT','ASYMMETRIC','AT', + 'AUTHORIZATION','BACKWARD','BEFORE','BEGIN','BETWEEN','BOTH','BY', + 'CACHE','CALLED','CASCADE','CASCADED','CASE','CAST','CATALOG', + 'CHAIN','CHARACTERISTICS','CHECK','CHECKPOINT','CLASS','CLOSE', + 'CLUSTER','COALESCE','COLLATE','COLUMN','COMMENT','COMMIT', + 'COMMITTED','CONCURRENTLY','CONFIGURATION','CONNECTION', + 'CONSTRAINT','CONSTRAINTS','CONTENT','CONTINUE','CONVERSION','COPY', + 'COST','CREATE','CREATEDB','CREATEROLE','CREATEUSER','CROSS','CSV', + 'CURRENT','CURRENT_CATALOG','CURRENT_DATE','CURRENT_ROLE', + 'CURRENT_SCHEMA','CURRENT_TIME','CURRENT_TIMESTAMP','CURRENT_USER', + 'CURSOR','CYCLE','DATA','DATABASE','DAY','DEALLOCATE','DEC', + 'DECLARE','DEFAULT','DEFAULTS','DEFERRABLE','DEFERRED','DEFINER', + 'DELETE','DELIMITER','DELIMITERS','DESC','DICTIONARY','DISABLE', + 'DISCARD','DISTINCT','DO','DOCUMENT','DOMAIN','DOUBLE','DROP', + 'EACH','ELSE','ENABLE','ENCODING','ENCRYPTED','END','ESCAPE', + 'EXCEPT','EXCLUDING','EXCLUSIVE','EXECUTE','EXISTS','EXPLAIN', + 'EXTERNAL','EXTRACT','FALSE','FAMILY','FETCH','FIRST','FOLLOWING', + 'FOR','FORCE','FOREIGN','FORWARD','FREEZE','FROM','FULL','FUNCTION', + 'GLOBAL','GRANT','GRANTED','GREATEST','GROUP','HANDLER','HAVING', + 'HEADER','HOLD','HOUR','IDENTITY','IF','ILIKE','IMMEDIATE', + 'IMMUTABLE','IMPLICIT','IN','INCLUDING','INCREMENT','INDEX', + 'INDEXES','INHERIT','INHERITS','INITIALLY','INNER','INOUT','INPUT', + 'INSENSITIVE','INSERT','INSTEAD','INTERSECT','INTO','INVOKER','IS', + 'ISNULL','ISOLATION','JOIN','KEY','LANCOMPILER','LANGUAGE','LARGE', + 'LAST','LC_COLLATE','LC_CTYPE','LEADING','LEAST','LEFT','LEVEL', + 'LIKE','LIMIT','LISTEN','LOAD','LOCAL','LOCALTIME','LOCALTIMESTAMP', + 'LOCATION','LOCK','LOGIN','LOOP','MAPPING','MATCH','MAXVALUE', + 'MINUTE','MINVALUE','MODE','MONTH','MOVE','NAME','NAMES','NATIONAL', + 'NATURAL','NEW','NEXT','NO','NOCREATEDB','NOCREATEROLE', + 'NOCREATEUSER','NOINHERIT','NOLOGIN','NONE','NOSUPERUSER','NOT', + 'NOTHING','NOTIFY','NOTNULL','NOWAIT','NULL','NULLIF','NULLS', + 'NUMERIC','OBJECT','OF','OFF','OFFSET','OIDS','OLD','ON','ONLY', + 'OPERATOR','OPTION','OPTIONS','OR','ORDER','OUT','OUTER','OVER', + 'OVERLAPS','OVERLAY','OWNED','OWNER','PARSER','PARTIAL','PARTITION', + 'PASSWORD','PLACING','PLANS','POSITION','PRECEDING','PRECISION', + 'PREPARE','PREPARED','PRESERVE','PRIMARY','PRIOR','PRIVILEGES', + 'PROCEDURAL','PROCEDURE','QUOTE','RANGE','READ','REASSIGN', + 'RECHECK','RECURSIVE','REFERENCES','REINDEX','RELATIVE','RELEASE', + 'RENAME','REPEATABLE','REPLACE','REPLICA','RESET','RESTART', + 'RESTRICT','RETURN','RETURNING','RETURNS','REVOKE','RIGHT','ROLE', + 'ROLLBACK','ROW','ROWS','RULE','SAVEPOINT','SCHEMA','SCROLL', + 'SEARCH','SECOND', + 'SECURITY','SELECT','SEQUENCE','SERIALIZABLE','SERVER','SESSION', + 'SESSION_USER','SET','SETOF','SHARE','SHOW','SIMILAR','SIMPLE', + 'SOME','STABLE','STANDALONE','START','STATEMENT','STATISTICS', + 'STDIN','STDOUT','STORAGE','STRICT','STRIP','SUPERUSER', + 'SYMMETRIC','SYSID','SYSTEM','TABLE','TABLESPACE','TEMP','TEMPLATE', + 'TEMPORARY','THEN','TO','TRAILING','TRANSACTION','TREAT','TRIGGER', + 'TRUE','TRUNCATE','TRUSTED','TYPE','UNBOUNDED','UNCOMMITTED', + 'UNENCRYPTED','UNION','UNIQUE','UNKNOWN','UNLISTEN','UNTIL', + 'UPDATE','USER','USING','VACUUM','VALID','VALIDATOR','VALUE', + 'VALUES','VARIADIC','VERBOSE','VERSION','VIEW','VOLATILE','WHEN', + 'WHERE','WHILE','WHITESPACE','WINDOW','WITH','WITHOUT','WORK','WRAPPER', + 'WRITE','XMLATTRIBUTES','XMLCONCAT','XMLELEMENT','XMLFOREST', + 'XMLPARSE','XMLPI','XMLROOT','XMLSERIALIZE','YEAR','YES','ZONE' + ), + + //Put functions here + 3 => array( + // mathematical functions + 'ABS','CBRT','CEIL','CEILING','DEGREES','DIV','EXP','FLOOR','LN', + 'LOG','MOD','PI','POWER','RADIANS','RANDOM','ROUND','SETSEED', + 'SIGN','SQRT','TRUNC','WIDTH_BUCKET', + // trigonometric functions + 'ACOS','ASIN','ATAN','ATAN2','COS','COT','SIN','TAN', + // string functions + 'BIT_LENGTH','CHAR_LENGTH','CHARACTER_LENGTH','LOWER', + 'OCTET_LENGTH','POSITION','SUBSTRING','TRIM','UPPER', + // other string functions + 'ASCII','BTRIM','CHR','CONVERT','CONVERT_FROM','CONVERT_TO', + 'DECODE','ENCODE','INITCAP','LENGTH','LPAD','LTRIM','MD5', + 'PG_CLIENT_ENCODING','QUOTE_IDENT','QUOTE_LITERAL','QUOTE_NULLABLE', + 'REGEXP_MATCHES','REGEXP_REPLACE','REGEXP_SPLIT_TO_ARRAY', + 'REGEXP_SPLIT_TO_TABLE','REPEAT','RPAD','RTRIM','SPLIT_PART', + 'STRPOS','SUBSTR','TO_ASCII','TO_HEX','TRANSLATE', + // binary string functions + 'GET_BIT','GET_BYTE','SET_BIT','SET_BYTE', + // data type formatting functions + 'TO_CHAR','TO_DATE','TO_NUMBER','TO_TIMESTAMP', + // date/time functions + 'AGE','CLOCK_TIMESTAMP','DATE_PART','DATE_TRUNC','EXTRACT', + 'ISFINITE','JUSTIFY_DAYS','JUSTIFY_HOURS','JUSTIFY_INTERVAL','NOW', + 'STATEMENT_TIMESTAMP','TIMEOFDAY','TRANSACTION_TIMESTAMP', + // enum support functions + 'ENUM_FIRST','ENUM_LAST','ENUM_RANGE', + // geometric functions + 'AREA','CENTER','DIAMETER','HEIGHT','ISCLOSED','ISOPEN','NPOINTS', + 'PCLOSE','POPEN','RADIUS','WIDTH', + 'BOX','CIRCLE','LSEG','PATH','POINT','POLYGON', + // cidr and inet functions + 'ABBREV','BROADCAST','FAMILY','HOST','HOSTMASK','MASKLEN','NETMASK', + 'NETWORK','SET_MASKLEN', + // text search functions + 'TO_TSVECTOR','SETWEIGHT','STRIP','TO_TSQUERY','PLAINTO_TSQUERY', + 'NUMNODE','QUERYTREE','TS_RANK','TS_RANK_CD','TS_HEADLINE', + 'TS_REWRITE','GET_CURRENT_TS_CONFIG','TSVECTOR_UPDATE_TRIGGER', + 'TSVECTOR_UPDATE_TRIGGER_COLUMN', + 'TS_DEBUG','TS_LEXISE','TS_PARSE','TS_TOKEN_TYPE','TS_STAT', + // XML functions + 'XMLCOMMENT','XMLCONCAT','XMLELEMENT','XMLFOREST','XMLPI','XMLROOT', + 'XMLAGG','XPATH','TABLE_TO_XMLSCHEMA','QUERY_TO_XMLSCHEMA', + 'CURSOR_TO_XMLSCHEMA','TABLE_TO_XML_AND_XMLSCHEMA', + 'QUERY_TO_XML_AND_XMLSCHEMA','SCHEMA_TO_XML','SCHEMA_TO_XMLSCHEMA', + 'SCHEMA_TO_XML_AND_XMLSCHEMA','DATABASE_TO_XML', + 'DATABASE_TO_XMLSCHEMA','DATABASE_TO_XML_AND_XMLSCHEMA', + // sequence manipulating functions + 'CURRVAL','LASTVAL','NEXTVAL','SETVAL', + // conditional expressions + 'COALESCE','NULLIF','GREATEST','LEAST', + // array functions + 'ARRAY_APPEND','ARRAY_CAT','ARRAY_NDIMS','ARRAY_DIMS','ARRAY_FILL', + 'ARRAY_LENGTH','ARRAY_LOWER','ARRAY_PREPEND','ARRAY_TO_STRING', + 'ARRAY_UPPER','STRING_TO_ARRAY','UNNEST', + // aggregate functions + 'ARRAY_AGG','AVG','BIT_AND','BIT_OR','BOOL_AND','BOOL_OR','COUNT', + 'EVERY','MAX','MIN','STRING_AGG','SUM', + // statistic aggregate functions + 'CORR','COVAR_POP','COVAR_SAMP','REGR_AVGX','REGR_AVGY', + 'REGR_COUNT','REGR_INTERCEPT','REGR_R2','REGR_SLOPE','REGR_SXX', + 'REGR_SXY','REGR_SYY','STDDEV','STDDEV_POP','STDDEV_SAMP', + 'VARIANCE','VAR_POP','VAR_SAMP', + // window functions + 'ROW_NUMBER','RANK','DENSE_RANK','PERCENT_RANK','CUME_DIST','NTILE', + 'LAG','LEAD','FIRST_VALUE','LAST_VALUE','NTH_VALUE', + // set returning functions + 'GENERATE_SERIES','GENERATE_SUBSCRIPTS' + // system information functions not currently included + ), + + //Put your postgresql var + 4 => array( + 'client_encoding', + 'standard_conforming_strings' + ), + + //Put your data types here + 5 => array( + 'ARRAY','ABSTIME','BIGINT','BIGSERIAL','BINARY','BIT','BIT VARYING', + 'BOOLEAN','BOX','BYTEA','CHAR','CHARACTER','CHARACTER VARYING', + 'CIDR','CIRCLE','DATE','DECIMAL','DOUBLE PRECISION','ENUM','FLOAT', + 'INET','INT','INTEGER','INTERVAL','NCHAR','REAL','SMALLINT','TEXT', + 'TIME','TIMESTAMP','VARCHAR','XML', + ), + + // //Put your package names here + // 6 => array( + // ), + + ), + 'SYMBOLS' => array( + '(', ')', '=', '<', '>', '|' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 3 => false, + 4 => false, + 5 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + // regular keywords + 1 => 'color: #000000; font-weight: bold; text-transform: uppercase;', + // inbuilt functions + 3 => 'color: #333399; font-weight: bold; text-transform: uppercase;', + // postgresql var(?) + 4 => 'color: #993333; font-weight: bold; text-transform: uppercase;', + // data types + 5 => 'color: #993333; font-weight: bold; text-transform: uppercase;', + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #ff0000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 3 => '', + 4 => 'http://paste.postgresql.fr/wiki/desc.php?def={FNAME}', + 5 => '', + ), + + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 1 => array( + 'DISALLOWED_AFTER' => '(?![\(\w])' + ), + + 3 => array( + 'DISALLOWED_AFTER' => '(?=\()' + ), + + 4 => array( + 'DISALLOWED_AFTER' => '(?![\(\w])' + ), + + 5 => array( + 'DISALLOWED_AFTER' => '(?![\(\w])' + ), + ) + ) + +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/povray.php b/_piecrust/libs/Geshi/geshi/povray.php new file mode 100644 index 0000000..a0939bb --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/povray.php @@ -0,0 +1,199 @@ + 'POVRAY', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'yes', 'wrinkles', 'wood', 'width', 'waves', 'water_level', 'warp', 'vturbulence', + 'vstr', 'vrotate', 'vnormalize', 'vlength', 'vcross', 'vaxis_rotate', 'variance', 'v_steps', + 'uv_mapping', 'utf8', 'use_index', 'use_colour', 'use_color', 'use_alpha', 'up', 'undef', + 'ultra_wide_angle', 'u_steps', 'type', 'turbulence', 'turb_depth', 'ttf', 'true', 'triangle_wave', + 'translate', 'transform', 'trace', 'toroidal', 'tolerance', 'tiles', 'tile2', 'tightness', + 'tiff', 'threshold', 'thickness', 'tga', 'texture_map', 'target', 'sys', 'sum', + 'substr', 'sturm', 'strupr', 'strlwr', 'strength', 'str', 'statistics', 'sqr', + 'spotted', 'spotlight', 'split_union', 'spline', 'spiral2', 'spiral1', 'spherical', 'specular', + 'spacing', 'solid', 'smooth', 'slope', 'slice', 'sky', 'size', 'sine_wave', + 'shadowless', 'scattering', 'scallop_wave', 'scale', 'save_file', 'samples', 'roughness', 'rotate', + 'ripples', 'right', 'rgbt', 'rgbft', 'rgbf', 'rgb', 'repeat', 'render', + 'refraction', 'reflection_exponent', 'recursion_limit', 'reciprocal', 'ratio', 'ramp_wave', 'radius', 'radial', + 'quilted', 'quick_colour', 'quick_color', 'quaternion', 'quadratic_spline', 'pwr', 'projected_through', 'prod', + 'pretrace_start', 'pretrace_end', 'precompute', 'precision', 'ppm', 'pow', 'pot', 'poly_wave', + 'point_at', 'png', 'planar', 'pigment_pattern', 'pi', 'phong_size', 'phong', 'phase', + 'pgm', 'perspective', 'pattern', 'pass_through', 'parallel', 'panoramic', 'orthographic', 'orientation', + 'orient', 'open', 'onion', 'once', 'on', 'omnimax', 'omega', 'offset', + 'off', 'octaves', 'number_of_waves', 'noise_generator', 'no_shadow', 'no_reflection', 'no_image', 'no_bump_scale', + 'no', 'nearest_count', 'natural_spline', 'mortar', 'minimum_reuse', 'min_extent', 'metric', 'method', + 'metallic', 'media_interaction', 'media_attenuation', 'media', 'max_trace_level', 'max_trace', 'max_sample', 'max_iteration', + 'max_intersections', 'max_gradient', 'max_extent', 'matrix', 'material_map', 'marble', 'map_type', 'mandel', + 'major_radius', 'magnet', 'low_error_factor', 'look_at', 'location', 'load_file', 'linear_sweep', 'linear_spline', + 'leopard', 'lambda', 'julia', 'jpeg', 'jitter', 'irid_wavelength', 'ior', 'inverse', + 'intervals', 'interpolate', 'internal', 'inside_vector', 'inside', 'initial_frame', 'initial_clock', 'image_width', + 'image_pattern', 'image_height', 'iff', 'hypercomplex', 'hollow', 'hierarchy', 'hf_gray_16', 'hexagon', + 'gray_threshold', 'granite', 'gradient', 'global_lights', 'gif', 'gather', 'fresnel', 'frequency', + 'frame_number', 'form', 'fog_type', 'fog_offset', 'fog_alt', 'focal_point', 'flip', 'flatness', + 'fisheye', 'final_frame', 'final_clock', 'false', 'falloff_angle', 'falloff', 'fade_power', 'fade_distance', + 'fade_colour', 'fade_color', 'facets', 'extinction', 'exterior', 'exponent', 'expand_thresholds', 'evaluate', + 'error_bound', 'emission', 'eccentricity', 'double_illuminate', 'distance', 'dist_exp', 'dispersion_samples', 'dispersion', + 'direction', 'diffuse', 'df3', 'dents', 'density_map', 'density_file', 'density', 'cylindrical', + 'cutaway_textures', 'cubic_wave', 'cubic_spline', 'cube', 'crand', 'crackle', 'count', 'coords', + 'control1', 'control0', 'conserve_energy', 'conic_sweep', 'confidence', 'concat', 'composite', 'component', + 'colour_map', 'colour', 'color', 'collect', 'clock_on', 'clock_delta', 'clock', 'circular', + 'chr', 'checker', 'charset', 'cells', 'caustics', 'bumps', 'bump_size', 'brilliance', + 'brightness', 'brick_size', 'brick', 'bozo', 'boxed', 'blur_samples', 'black_hole', 'bezier_spline', + 'b_spline', 'average', 'autostop', 'assumed_gamma', 'ascii', 'array', 'area_light', 'arc_angle', + 'append', 'aperture', 'angle', 'ambient_light', 'ambient', 'always_sample', 'altitude', 'alpha', + 'all_intersections', 'all', 'agate_turb', 'agate', 'adc_bailout', 'adaptive', 'accuracy', 'absorption', + 'aa_threshold', 'aa_level', 'reflection' + ), + 2 => array( + 'abs', 'acos', 'acosh', 'asc', 'asin', 'asinh', 'atan', 'atanh', + 'atan2', 'ceil', 'cos', 'cosh', 'defined', 'degrees', 'dimensions', 'dimension_size', + 'div', 'exp', 'file_exists', 'floor', 'int', 'ln', 'log', 'max', + 'min', 'mod', 'pov', 'radians', 'rand', 'seed', 'select', 'sin', + 'sinh', 'sqrt', 'strcmp', 'strlen', 'tan', 'tanh', 'val', 'vdot', + 'vlenght', + ), + 3 => array ( + 'x', 'y', 'z', 't', 'u', 'v', 'red', 'blue', + 'green', 'filter', 'transmit', 'gray', 'e', + ), + 4 => array ( + 'camera', 'background', 'fog', 'sky_sphere', 'rainbow', 'global_settings', 'radiosity', 'photon', + 'object', 'blob', 'sphere', 'cylinder', 'box', 'cone', 'height_field', 'julia_fractal', + 'lathe', 'prism', 'sphere_sweep', 'superellipsoid', 'sor', 'text', 'torus', 'bicubic_patch', + 'disc', 'mesh', 'triangle', 'smooth_triangle', 'mesh2', 'vertex_vectors', 'normal_vectors', 'uv_vectors', + 'texture_list', 'face_indices', 'normal_indices', 'uv_indices', 'texture', 'polygon', 'plane', 'poly', + 'cubic', 'quartic', 'quadric', 'isosurface', 'function', 'contained_by', 'parametric', 'pigment', + 'union', 'intersection', 'difference', 'merge', 'light_source', 'looks_like', 'light_group', 'clipped_by', + 'bounded_by', 'interior', 'material', 'interior_texture', 'normal', 'finish', 'color_map', 'pigment_map', + 'image_map', 'bump_map', 'slope_map', 'normal_map', 'irid', 'photons', + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', + '@', '%', '&', '*', '|', '/', '<', + '>', '+', '-', '.', '=', '<=', '>=', + '!=', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #a63123;', + 2 => 'color: #2312bc;', + 3 => 'color: #cc1122; font-weight: bold;', + 4 => 'color: #116688; font-weight: bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', +// 2 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66aa;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + 0 => 'color: #6666cc; font-weight: bold;', + 1 => 'color: #66cc66; font-weight: bold;', + 2 => 'color: #66cc66; font-weight: bold;' + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + # normal hash lines + 0 => '\#(?!(include|declare|local|fopen|fclose|read|write|default|version|if|else|end|ifdef|ifndef|switch|case|range|break|while|debug|error|warning|macro) )[[:word:]]*', + # syntax functions hash thingis + 1 => "\#(include|declare|local|fopen|fclose|read|write|default|version|if|else|end|ifdef|ifndef|switch|case|range|break|while|debug|error|warning|macro)", + 2 => array( + GESHI_SEARCH => "([a-zA-Z]+)(\n)(.*)(\n)(\\1;?)", + GESHI_REPLACE => '\3', + GESHI_BEFORE => '\1\2', + GESHI_AFTER => '\4\5', + GESHI_MODIFIERS => 'siU' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true + ), + 'TAB_WIDTH' => 4 +); +?> diff --git a/_piecrust/libs/Geshi/geshi/powerbuilder.php b/_piecrust/libs/Geshi/geshi/powerbuilder.php new file mode 100644 index 0000000..c694bdb --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/powerbuilder.php @@ -0,0 +1,418 @@ + 'PowerBuilder', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '~', + 'KEYWORDS' => array( + 1 => array( + 'alias', 'and', 'autoinstantiate', 'call', + 'case', 'catch', 'choose', 'close', 'commit', 'connect', + 'constant', 'continue', 'create', 'cursor', 'declare', + 'delete', 'describe', 'descriptor', 'destroy', 'disconnect', + 'do', 'dynamic', 'else', 'elseif', 'end', 'enumerated', + 'event', 'execute', 'exit', 'external', 'false', 'fetch', + 'first', 'for', 'forward', 'from', 'function', 'global', + 'goto', 'halt', 'if', 'immediate', 'indirect', 'insert', + 'into', 'intrinsic', 'is', 'last', 'library', 'loop', 'next', + 'not', 'of', 'on', 'open', 'or', 'parent', 'post', 'prepare', + 'prior', 'private', 'privateread', 'privatewrite', 'procedure', + 'protected', 'protectedread', 'protectedwrite', 'prototypes', + 'public', 'readonly', 'ref', 'return', 'rollback', 'rpcfunc', + 'select', 'selectblob', 'shared', 'static', 'step', 'subroutine', + 'super', 'system', 'systemread', 'systemwrite', 'then', 'this', + 'to', 'trigger', 'true', 'try', 'type', 'until', 'update', 'updateblob', + 'using', 'variables', 'where', 'while', 'with', 'within' + ), + 2 => array ( + 'blob', 'boolean', 'char', 'character', 'date', 'datetime', + 'dec', 'decimal', + 'double', 'int', 'integer', 'long', 'real', 'string', 'time', + 'uint', 'ulong', 'unsignedint', 'unsignedinteger', 'unsignedlong' + ), + 3 => array ( + 'abortretryignore!', 'actbegin!', 'acterror!', 'actesql!', + 'actgarbagecollect!', 'activate!', 'activatemanually!', + 'activateondoubleclick!', + 'activateongetfocus!', 'actline!', 'actobjectcreate!', 'actobjectdestroy!', + 'actprofile!', 'actroutine!', 'acttrace!', 'actual!', + 'actuser!', 'adoresultset!', 'adtdate!', 'adtdatetime!', + 'adtdefault!', 'adtdouble!', 'adttext!', 'adttime!', + 'aix!', 'alignatbottom!', 'alignatleft!', 'alignatright!', + 'alignattop!', 'all!', 'allowpartialchanges!', 'alpha!', + 'ansi!', 'any!', 'anycase!', 'anyfont!', + 'append!', 'application!', 'arabiccharset!', 'area3d!', + 'areagraph!', 'arraybounds!', 'arrow!', 'ascending!', + 'asstatement!', 'atbottom!', 'atleft!', 'atright!', + 'attop!', 'autosize!', 'background!', 'balticcharset!', + 'bar3dgraph!', 'bar3dobjgraph!', 'bargraph!', 'barstack3dobjgraph!', + 'barstackgraph!', 'bdiagonal!', 'beam!', 'begin!', + 'begindrag!', 'beginlabeledit!', 'beginrightdrag!', 'behind!', + 'blob!', 'bold!', 'boolean!', 'bottom!', + 'boundedarray!', 'box!', 'byreferenceargument!', 'byvalueargument!', + 'cancel!', 'cascade!', 'cascaded!', 'category!', + 'center!', 'character!', 'charsetansi!', 'charsetansiarabic!', + 'charsetansihebrew!', 'charsetdbcsjapanese!', 'charsetunicode!', 'checkbox!', + 'child!', 'childtreeitem!', 'chinesebig5!', 'classdefinition!', + 'classdefinitionobject!', 'classorstructuretype!', 'clicked!', 'clip!', + 'clipboard!', 'clipformatbitmap!', 'clipformatdib!', 'clipformatdif!', + 'clipformatenhmetafile!', 'clipformathdrop!', 'clipformatlocale!', + 'clipformatmetafilepict!', + 'clipformatoemtext!', 'clipformatpalette!', 'clipformatpendata!', 'clipformatriff!', + 'clipformatsylk!', 'clipformattext!', 'clipformattiff!', 'clipformatunicodetext!', + 'clipformatwave!', 'clock!', 'close!', 'closequery!', + 'col3dgraph!', 'col3dobjgraph!', 'colgraph!', + 'colstack3dobjgraph!', 'colstackgraph!', 'columnclick!', 'commandbutton!', + 'connection!', 'connectioninfo!', 'connectobject!', 'connectprivilege!', + 'connectwithadminprivilege!', 'constructor!', 'containsany!', 'containsembeddedonly!', + 'containslinkedonly!', 'contextinformation!', 'contextkeyword!', 'continuous!', + 'corbaobject!', 'corbaunion!', 'cplusplus!', 'cross!', + 'csv!', 'cumulative!', 'cumulativepercent!', 'currenttreeitem!', + 'customvisual!', 'dash!', 'dashdot!', 'dashdotdot!', + 'data!', 'datachange!', 'datamodified!', 'datastore!', + 'datawindow!', 'datawindowchild!', 'date!', 'datemask!', + 'datetime!', 'datetimemask!', 'dbase2!', 'dbase3!', + 'dberror!', 'deactivate!', 'decimal!', 'decimalmask!', + 'decorative!', 'default!', 'defaultcharset!', 'delete!', + 'deleteallitems!', 'deleteitem!', 'descending!', 'desktop!', + 'destructor!', 'detail!', 'diamond!', 'dif!', + 'dirall!', 'dirapplication!', 'dirdatawindow!', 'directionall!', + 'directiondown!', 'directionleft!', 'directionright!', 'directionup!', + 'dirfunction!', 'dirmenu!', 'dirpipeline!', 'dirproject!', + 'dirquery!', 'dirstructure!', 'diruserobject!', 'dirwindow!', + 'displayasactivexdocument!', 'displayascontent!', 'displayasicon!', 'dot!', + 'double!', 'doubleclicked!', 'dragdrop!', 'dragenter!', + 'dragleave!', 'dragobject!', 'dragwithin!', 'drawobject!', + 'dropdownlistbox!', 'dropdownpicturelistbox!', 'drophighlighttreeitem!', 'dwobject!', + 'dynamicdescriptionarea!', 'dynamicstagingarea!', 'easteuropecharset!', 'editchanged!', + 'editmask!', 'editmenu!', 'end!', 'endlabeledit!', + 'enterprise!', 'enterpriseonlyfeature!', 'enumeratedtype!', 'enumerationdefinition!', + 'enumerationitemdefinition!', 'environment!', 'error!', 'errorlogging!', + 'eventnotexisterror!', 'eventwrongprototypeerror!', 'excel!', 'excel5!', + 'exceptionfail!', 'exceptionignore!', 'exceptionretry!', + 'exceptionsubstitutereturnvalue!', + 'exclamation!', 'exclude!', 'exportapplication!', 'exportdatawindow!', + 'exportfunction!', 'exportmenu!', 'exportpipeline!', 'exportproject!', + 'exportquery!', 'exportstructure!', 'exportuserobject!', 'exportwindow!', + 'externalvisual!', 'extobject!', 'failonanyconflict!', 'fdiagonal!', + 'featurenotsupportederror!', 'filealreadyopenerror!', 'filecloseerror!', + 'fileexists!', + 'fileinvalidformaterror!', 'filemenu!', 'filenotopenerror!', 'filenotseterror!', + 'filereaderror!', 'filetyperichtext!', 'filetypetext!', 'filewriteerror!', + 'filter!', 'first!', 'firstvisibletreeitem!', 'fixed!', + 'floating!', 'focusrect!', 'footer!', 'foreground!', + 'frombeginning!', 'fromcurrent!', 'fromend!', 'functionobject!', + 'gb231charset!', 'getfocus!', 'graph!', 'graphicobject!', + 'graxis!', 'grdispattr!', 'greekcharset!', 'groupbox!', + 'hand!', 'hangeul!', 'header!', 'hebrewcharset!', + 'helpmenu!', 'hide!', 'horizontal!', 'hotlinkalarm!', + 'hourglass!', 'hppa!', 'hprogressbar!', 'hpux!', + 'hscrollbar!', 'hticksonboth!', 'hticksonbottom!', 'hticksonneither!', + 'hticksontop!', 'htmltable!', 'htrackbar!', 'i286!', + 'i386!', 'i486!', 'icon!', 'icons!', + 'idle!', 'importdatawindow!', 'indent!', 'index!', + 'inet!', 'information!', 'inplace!', 'inputfieldselected!', + 'insertitem!', 'inside!', 'integer!', 'internetresult!', + 'italic!', 'itemchanged!', 'itemchanging!', 'itemcollapsed!', + 'itemcollapsing!', 'itemerror!', 'itemexpanded!', 'itemexpanding!', + 'itemfocuschanged!', 'itempopulate!', 'jaguarorb!', 'johabcharset!', + 'justify!', 'key!', 'key0!', 'key1!', + 'key2!', 'key3!', 'key4!', 'key5!', + 'key6!', 'key7!', 'key8!', 'key9!', + 'keya!', 'keyadd!', 'keyalt!', 'keyapps!', + 'keyb!', 'keyback!', 'keybackquote!', 'keybackslash!', + 'keyc!', 'keycapslock!', 'keycomma!', 'keycontrol!', + 'keyd!', 'keydash!', 'keydecimal!', 'keydelete!', + 'keydivide!', 'keydownarrow!', 'keye!', 'keyend!', + 'keyenter!', 'keyequal!', 'keyescape!', 'keyf!', + 'keyf1!', 'keyf10!', 'keyf11!', 'keyf12!', + 'keyf2!', 'keyf3!', 'keyf4!', 'keyf5!', + 'keyf6!', 'keyf7!', 'keyf8!', 'keyf9!', + 'keyg!', 'keyh!', 'keyhome!', 'keyi!', + 'keyinsert!', 'keyj!', 'keyk!', 'keyl!', + 'keyleftarrow!', 'keyleftbracket!', 'keyleftbutton!', 'keyleftwindows!', + 'keym!', 'keymiddlebutton!', 'keymultiply!', 'keyn!', + 'keynull!', 'keynumlock!', 'keynumpad0!', 'keynumpad1!', + 'keynumpad2!', 'keynumpad3!', 'keynumpad4!', 'keynumpad5!', + 'keynumpad6!', 'keynumpad7!', 'keynumpad8!', 'keynumpad9!', + 'keyo!', 'keyp!', 'keypagedown!', 'keypageup!', + 'keypause!', 'keyperiod!', 'keyprintscreen!', 'keyq!', + 'keyquote!', 'keyr!', 'keyrightarrow!', 'keyrightbracket!', + 'keyrightbutton!', 'keyrightwindows!', 'keys!', 'keyscrolllock!', + 'keysemicolon!', 'keyshift!', 'keyslash!', 'keyspacebar!', + 'keysubtract!', 'keyt!', 'keytab!', 'keyu!', + 'keyuparrow!', 'keyv!', 'keyw!', 'keyword!', + 'keyx!', 'keyy!', 'keyz!', 'languageafrikaans!', + 'languagealbanian!', 'languagearabicalgeria!', 'languagearabicbahrain!', + 'languagearabicegypt!', + 'languagearabiciraq!', 'languagearabicjordan!', 'languagearabickuwait!', + 'languagearabiclebanon!', + 'languagearabiclibya!', 'languagearabicmorocco!', 'languagearabicoman!', + 'languagearabicqatar!', + 'languagearabicsaudiarabia!', 'languagearabicsyria!', 'languagearabictunisia!', + 'languagearabicuae!', + 'languagearabicyemen!', 'languagebasque!', 'languagebulgarian!', 'languagebyelorussian!', + 'languagecatalan!', 'languagechinese!', 'languagechinesehongkong!', 'languagechinesesimplified!', + 'languagechinesesingapore!', 'languagechinesetraditional!', 'languagecroatian!', 'languageczech!', + 'languagedanish!', 'languagedutch!', 'languagedutchbelgian!', 'languagedutchneutral!', + 'languageenglish!', 'languageenglishaustralian!', 'languageenglishcanadian!', + 'languageenglishirish!', + 'languageenglishnewzealand!', 'languageenglishsouthafrica!', 'languageenglishuk!', + 'languageenglishus!', + 'languageestonian!', 'languagefaeroese!', 'languagefarsi!', 'languagefinnish!', + 'languagefrench!', 'languagefrenchbelgian!', 'languagefrenchcanadian!', 'languagefrenchluxembourg!', + 'languagefrenchneutral!', 'languagefrenchswiss!', 'languagegerman!', 'languagegermanaustrian!', + 'languagegermanliechtenstein!', 'languagegermanluxembourg!', 'languagegermanneutral!', + 'languagegermanswiss!', + 'languagegreek!', 'languagehebrew!', 'languagehindi!', 'languagehungarian!', + 'languageicelandic!', 'languageindonesian!', 'languageitalian!', 'languageitalianneutral!', + 'languageitalianswiss!', 'languagejapanese!', 'languagekorean!', 'languagekoreanjohab!', + 'languagelatvian!', 'languagelithuanian!', 'languagemacedonian!', 'languagemaltese!', + 'languageneutral!', 'languagenorwegian!', 'languagenorwegianbokmal!', 'languagenorwegiannynorsk!', + 'languagepolish!', 'languageportuguese!', 'languageportuguese_brazilian!', + 'languageportugueseneutral!', + 'languagerhaetoromanic!', 'languageromanian!', 'languageromanianmoldavia!', 'languagerussian!', + 'languagerussianmoldavia!', 'languagesami!', 'languageserbian!', 'languageslovak!', + 'languageslovenian!', 'languagesorbian!', 'languagesortnative!', 'languagesortunicode!', + 'languagespanish!', 'languagespanishcastilian!', 'languagespanishmexican!', 'languagespanishmodern!', + 'languagesutu!', 'languageswedish!', 'languagesystemdefault!', 'languagethai!', + 'languagetsonga!', 'languagetswana!', 'languageturkish!', 'languageukrainian!', + 'languageurdu!', 'languageuserdefault!', 'languagevenda!', 'languagexhosa!', + 'languagezulu!', 'last!', 'layer!', 'layered!', + 'Left!', 'leftmargin!', 'line!', 'line3d!', + 'linear!', 'linecolor!', 'linedown!', 'linegraph!', + 'lineleft!', 'linemode!', 'lineright!', 'lineup!', + 'linkupdateautomatic!', 'linkupdatemanual!', 'listbox!', 'listview!', + 'listviewitem!', 'listviewlargeicon!', 'listviewlist!', 'listviewreport!', + 'listviewsmallicon!', 'lockread!', 'lockreadwrite!', 'lockwrite!', + 'log10!', 'loge!', 'long!', 'losefocus!', + 'lower!', 'lowered!', 'm68000!', 'm68020!', + 'm68030!', 'm68040!', 'maccharset!', 'macintosh!', + 'mailattach!', 'mailbcc!', 'mailbodyasfile!', 'mailcc!', + 'maildownload!', 'mailentiremessage!', 'mailenvelopeonly!', 'mailfiledescription!', + 'mailmessage!', 'mailnewsession!', 'mailnewsessionwithdownload!', 'mailole!', + 'mailolestatic!', 'mailoriginator!', 'mailrecipient!', 'mailreturnaccessdenied!', + 'mailreturnattachmentnotfound!', 'mailreturnattachmentopenfailure!', + 'mailreturnattachmentwritefailure!', 'mailreturndiskfull!', + 'mailreturnfailure!', 'mailreturninsufficientmemory!', 'mailreturninvalidmessage!', + 'mailreturnloginfailure!', + 'mailreturnmessageinuse!', 'mailreturnnomessages!', 'mailreturnsuccess!', 'mailreturntexttoolarge!', + 'mailreturntoomanyfiles!', 'mailreturntoomanyrecipients!', 'mailreturntoomanysessions!', + 'mailreturnunknownrecipient!', + 'mailreturnuserabort!', 'mailsession!', 'mailsuppressattachments!', 'mailto!', + 'main!', 'maximized!', 'mdi!', 'mdiclient!', + 'mdihelp!', 'menu!', 'menucascade!', 'menuitemtypeabout!', + 'menuitemtypeexit!', 'menuitemtypehelp!', 'menuitemtypenormal!', 'merge!', + 'message!', 'minimized!', 'mips!', 'modelexistserror!', + 'modelnotexistserror!', 'modern!', 'modified!', 'mousedown!', + 'mousemove!', 'mouseup!', 'moved!', 'multiline!', + 'multilineedit!', 'mutexcreateerror!', 'new!', 'newmodified!', + 'next!', 'nexttreeitem!', 'nextvisibletreeitem!', 'noborder!', + 'noconnectprivilege!', 'nolegend!', 'none!', 'nonvisualobject!', + 'normal!', 'nosymbol!', 'notic!', 'notmodified!', + 'notopmost!', 'notype!', 'numericmask!', 'objhandle!', + 'oem!', 'off!', 'offsite!', 'ok!', + 'okcancel!', 'olecontrol!', 'olecustomcontrol!', 'oleobject!', + 'olestorage!', 'olestream!', 'oletxnobject!', 'omcontrol!', + 'omcustomcontrol!', 'omembeddedcontrol!', 'omobject!', 'omstorage!', + 'omstream!', 'open!', 'orb!', 'original!', + 'osf1!', 'other!', 'outside!', 'oval!', + 'pagedown!', 'pageleft!', 'pageright!', 'pageup!', + 'parenttreeitem!', 'pbtocppobject!', 'pentium!', 'percentage!', + 'picture!', 'picturebutton!', 'picturehyperlink!', 'picturelistbox!', + 'pictureselected!', 'pie3d!', 'piegraph!', 'pipeend!', + 'pipeline!', 'pipemeter!', 'pipestart!', 'popup!', + 'powerobject!', 'powerpc!', 'powerrs!', 'ppc601!', + 'ppc603!', 'ppc604!', 'previewdelete!', 'previewfunctionreselectrow!', + 'previewfunctionretrieve!', 'previewfunctionupdate!', 'previewinsert!', 'previewselect!', + 'previewupdate!', 'previoustreeitem!', 'previousvisibletreeitem!', 'primary!', + 'printend!', 'printfooter!', 'printheader!', 'printpage!', + 'printstart!', 'prior!', 'private!', 'process!', + 'profilecall!', 'profileclass!', 'profileline!', 'profileroutine!', + 'profiling!', 'protected!', 'psreport!', 'public!', + 'question!', 'radiobutton!', 'raised!', 'rbuttondown!', + 'rbuttonup!', 'read!', 'readonlyargument!', 'real!', + 'rectangle!', 'regbinary!', 'regexpandstring!', 'reglink!', + 'regmultistring!', 'regstring!', 'regulong!', 'regulongbigendian!', + 'remoteexec!', 'remotehotlinkstart!', 'remotehotlinkstop!', 'remoteobject!', + 'remoterequest!', 'remotesend!', 'rename!', 'replace!', + 'resize!', 'resizeborder!', 'response!', 'resultset!', + 'resultsets!', 'retrieveend!', 'retrieverow!', 'retrievestart!', + 'retrycancel!', 'richtextedit!', 'Right!', 'rightclicked!', + 'rightdoubleclicked!', 'rightmargin!', 'rnddays!', 'rnddefault!', + 'rndhours!', 'rndmicroseconds!', 'rndminutes!', 'rndmonths!', + 'rndnumber!', 'rndseconds!', 'rndyears!', 'roman!', + 'roottreeitem!', 'roundrectangle!', 'routineesql!', 'routineevent!', + 'routinefunction!', 'routinegarbagecollection!', 'routineobjectcreation!', + 'routineobjectdestruction!', + 'routineroot!', 'rowfocuschanged!', 'russiancharset!', 'save!', + 'scalartype!', 'scattergraph!', 'script!', 'scriptdefinition!', + 'scriptevent!', 'scriptfunction!', 'scrollhorizontal!', 'scrollvertical!', + 'selected!', 'selectionchanged!', 'selectionchanging!', 'series!', + 'service!', 'shade!', 'shadowbox!', 'shared!', + 'sharedobjectcreateinstanceerror!', 'sharedobjectcreatepbsessionerror!', + 'sharedobjectexistserror!', 'sharedobjectnotexistserror!', + 'shiftjis!', 'show!', 'simpletype!', 'simpletypedefinition!', + 'singlelineedit!', 'size!', 'sizenesw!', 'sizens!', + 'sizenwse!', 'sizewe!', 'sol2!', 'solid!', + 'sort!', 'sourcepblerror!', 'spacing1!', 'spacing15!', + 'spacing2!', 'sparc!', 'sqlinsert!', 'sqlpreview!', + 'square!', 'sslcallback!', 'sslserviceprovider!', 'statichyperlink!', + 'statictext!', 'stgdenynone!', 'stgdenyread!', 'stgdenywrite!', + 'stgexclusive!', 'stgread!', 'stgreadwrite!', 'stgwrite!', + 'stopsign!', 'straddle!', 'streammode!', 'stretch!', + 'strikeout!', 'string!', 'stringmask!', 'structure!', + 'stylebox!', 'stylelowered!', 'styleraised!', 'styleshadowbox!', + 'subscript!', 'success!', 'superscript!', 'swiss!', + 'sylk!', 'symbol!', 'symbolhollowbox!', 'symbolhollowcircle!', + 'symbolhollowdiamond!', 'symbolhollowdownarrow!', 'symbolhollowuparrow!', 'symbolplus!', + 'symbolsolidbox!', 'symbolsolidcircle!', 'symbolsoliddiamond!', 'symbolsoliddownarrow!', + 'symbolsoliduparrow!', 'symbolstar!', 'symbolx!', 'system!', + 'systemerror!', 'systemfunctions!', 'systemkey!', 'tab!', + 'tabsonbottom!', 'tabsonbottomandtop!', 'tabsonleft!', 'tabsonleftandright!', + 'tabsonright!', 'tabsonrightandleft!', 'tabsontop!', 'tabsontopandbottom!', + 'text!', 'thaicharset!', 'thread!', 'tile!', + 'tilehorizontal!', 'time!', 'timemask!', 'timer!', + 'timernone!', 'timing!', 'tobottom!', 'toolbarmoved!', + 'top!', 'topic!', 'topmost!', 'totop!', + 'traceactivitynode!', 'traceatomic!', 'tracebeginend!', 'traceerror!', + 'traceesql!', 'tracefile!', 'tracegarbagecollect!', 'tracegeneralerror!', + 'tracein!', 'traceline!', 'tracenomorenodes!', 'tracenotstartederror!', + 'traceobject!', 'traceout!', 'traceroutine!', 'tracestartederror!', + 'tracetree!', 'tracetreeerror!', 'tracetreeesql!', 'tracetreegarbagecollect!', + 'tracetreeline!', 'tracetreenode!', 'tracetreeobject!', 'tracetreeroutine!', + 'tracetreeuser!', 'traceuser!', 'transaction!', 'transactionserver!', + 'transparent!', 'transport!', 'treeview!', 'treeviewitem!', + 'turkishcharset!', 'typeboolean!', 'typecategory!', 'typecategoryaxis!', + 'typecategorylabel!', 'typedata!', 'typedate!', 'typedatetime!', + 'typedecimal!', 'typedefinition!', 'typedouble!', 'typegraph!', + 'typeinteger!', 'typelegend!', 'typelong!', 'typereal!', + 'typeseries!', 'typeseriesaxis!', 'typeserieslabel!', 'typestring!', + 'typetime!', 'typetitle!', 'typeuint!', 'typeulong!', + 'typeunknown!', 'typevalueaxis!', 'typevaluelabel!', 'ultrasparc!', + 'unboundedarray!', 'underline!', 'underlined!', 'unsignedinteger!', + 'unsignedlong!', 'unsorted!', 'uparrow!', 'updateend!', + 'updatestart!', 'upper!', 'userdefinedsort!', 'userobject!', + 'variable!', 'variableargument!', 'variablecardinalitydefinition!', 'variabledefinition!', + 'variableglobal!', 'variableinstance!', 'variablelocal!', 'variableshared!', + 'varlistargument!', 'vbxvisual!', 'vcenter!', 'vertical!', + 'vietnamesecharset!', 'viewchange!', 'vprogressbar!', 'vscrollbar!', + 'vticksonboth!', 'vticksonleft!', 'vticksonneither!', 'vticksonright!', + 'vtrackbar!', 'window!', 'windowmenu!', 'windowobject!', + 'windows!', 'windowsnt!', 'wk1!', 'wks!', + 'wmf!', 'write!', 'xpixelstounits!', 'xunitstopixels!', + 'xvalue!', 'yesno!', 'yesnocancel!', 'ypixelstounits!', + 'yunitstopixels!', + 'yvalue!', + 'zoom!' + ) + ), + 'SYMBOLS' => array( + 0 => array('(', ')', '[', ']', '{', '}'), + 1 => array('|'), + 2 => array('+', '-', '*', '/'), + 3 => array('=', '<', '>', '^') + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #008000; font-weight: bold;', + 2 => 'color: #990099; font-weight: bold;', + 3 => 'color: #330099; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #0000ff; font-weight: bold;', + 'MULTI' => 'color: #0000ff; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #800000;' + ), + 'NUMBERS' => array( + 0 => 'color: #330099; font-weight: bold;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;', + 1 => 'color: #ffff00; background-color:#993300; font-weight: bold', + 2 => 'color: #000000;', + 3 => 'color: #000000;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #800000; font-weight: bold;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/powershell.php b/_piecrust/libs/Geshi/geshi/powershell.php new file mode 100644 index 0000000..37747af --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/powershell.php @@ -0,0 +1,277 @@ + 'PowerShell', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array('<#' => '#>'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '`', + 'KEYWORDS' => array( + 1 => array( + // Cmdlets + 'Add-Content', 'Add-History', 'Add-Member', 'Add-PSSnapin', 'Clear-Content', 'Clear-Item', + 'Clear-ItemProperty', 'Clear-Variable', 'Compare-Object', 'ConvertFrom-SecureString', + 'Convert-Path', 'ConvertTo-Html', 'ConvertTo-SecureString', 'Copy-Item', 'Copy-ItemProperty', + 'Export-Alias', 'Export-Clixml', 'Export-Console', 'Export-Csv', 'ForEach-Object', + 'Format-Custom', 'Format-List', 'Format-Table', 'Format-Wide', 'Get-Acl', 'Get-Alias', + 'Get-AuthenticodeSignature', 'Get-ChildItem', 'Get-Command', 'Get-Content', 'Get-Credential', + 'Get-Culture', 'Get-Date', 'Get-EventLog', 'Get-ExecutionPolicy', 'Get-Help', 'Get-History', + 'Get-Host', 'Get-Item', 'Get-ItemProperty', 'Get-Location', 'Get-Member', + 'Get-PfxCertificate', 'Get-Process', 'Get-PSDrive', 'Get-PSProvider', 'Get-PSSnapin', + 'Get-Service', 'Get-TraceSource', 'Get-UICulture', 'Get-Unique', 'Get-Variable', + 'Get-WmiObject', 'Group-Object', 'Import-Alias', 'Import-Clixml', 'Import-Csv', + 'Invoke-Expression', 'Invoke-History', 'Invoke-Item', 'Join-Path', 'Measure-Command', + 'Measure-Object', 'Move-Item', 'Move-ItemProperty', 'New-Alias', 'New-Item', + 'New-ItemProperty', 'New-Object', 'New-PSDrive', 'New-Service', 'New-TimeSpan', + 'New-Variable', 'Out-Default', 'Out-File', 'Out-Host', 'Out-Null', 'Out-Printer', + 'Out-String', 'Pop-Location', 'Push-Location', 'Read-Host', 'Remove-Item', + 'Remove-ItemProperty', 'Remove-PSDrive', 'Remove-PSSnapin', 'Remove-Variable', 'Rename-Item', + 'Rename-ItemProperty', 'Resolve-Path', 'Restart-Service', 'Resume-Service', 'Select-Object', + 'Select-String', 'Set-Acl', 'Set-Alias', 'Set-AuthenticodeSignature', 'Set-Content', + 'Set-Date', 'Set-ExecutionPolicy', 'Set-Item', 'Set-ItemProperty', 'Set-Location', + 'Set-PSDebug', 'Set-Service', 'Set-TraceSource', 'Set-Variable', 'Sort-Object', 'Split-Path', + 'Start-Service', 'Start-Sleep', 'Start-Transcript', 'Stop-Process', 'Stop-Service', + 'Stop-Transcript', 'Suspend-Service', 'Tee-Object', 'Test-Path', 'Trace-Command', + 'Update-FormatData', 'Update-TypeData', 'Where-Object', 'Write-Debug', 'Write-Error', + 'Write-Host', 'Write-Output', 'Write-Progress', 'Write-Verbose', 'Write-Warning' + ), + 2 => array( + // Aliases + 'ac', 'asnp', 'clc', 'cli', 'clp', 'clv', 'cpi', 'cpp', 'cvpa', 'diff', 'epal', 'epcsv', 'fc', + 'fl', 'ft', 'fw', 'gal', 'gc', 'gci', 'gcm', 'gdr', 'ghy', 'gi', 'gl', 'gm', + 'gp', 'gps', 'group', 'gsv', 'gsnp', 'gu', 'gv', 'gwmi', 'iex', 'ihy', 'ii', 'ipal', 'ipcsv', + 'mi', 'mp', 'nal', 'ndr', 'ni', 'nv', 'oh', 'rdr', 'ri', 'rni', 'rnp', 'rp', 'rsnp', 'rv', + 'rvpa', 'sal', 'sasv', 'sc', 'select', 'si', 'sl', 'sleep', 'sort', 'sp', 'spps', 'spsv', 'sv', + 'tee', 'write', 'cat', 'cd', 'clear', 'cp', 'h', 'history', 'kill', 'lp', 'ls', + 'mount', 'mv', 'popd', 'ps', 'pushd', 'pwd', 'r', 'rm', 'rmdir', 'echo', 'cls', 'chdir', + 'copy', 'del', 'dir', 'erase', 'move', 'rd', 'ren', 'set', 'type' + ), + 3 => array( + // Reserved words + 'break', 'continue', 'do', 'for', 'foreach', 'while', 'if', 'switch', 'until', 'where', + 'function', 'filter', 'else', 'elseif', 'in', 'return', 'param', 'throw', 'trap' + ), + 4 => array( + // Operators + '-eq', '-ne', '-gt', '-ge', '-lt', '-le', '-ieq', '-ine', '-igt', '-ige', '-ilt', '-ile', + '-ceq', '-cne', '-cgt', '-cge', '-clt', '-cle', '-like', '-notlike', '-match', '-notmatch', + '-ilike', '-inotlike', '-imatch', '-inotmatch', '-clike', '-cnotlike', '-cmatch', '-cnotmatch', + '-contains', '-notcontains', '-icontains', '-inotcontains', '-ccontains', '-cnotcontains', + '-isnot', '-is', '-as', '-replace', '-ireplace', '-creplace', '-and', '-or', '-band', '-bor', + '-not', '-bnot', '-f', '-casesensitive', '-exact', '-file', '-regex', '-wildcard' + ), + 5 => array( + // Options + '-Year', '-Wrap', '-Word', '-Width', '-WhatIf', '-Wait', '-View', '-Verbose', '-Verb', + '-Variable', '-ValueOnly', '-Value', '-Unique', '-UFormat', '-TypeName', '-Trace', '-TotalCount', + '-Title', '-TimestampServer', '-TargetObject', '-Syntax', '-SyncWindow', '-Sum', '-String', + '-Strict', '-Stream', '-Step', '-Status', '-Static', '-StartupType', '-Start', '-StackName', + '-Stack', '-SourceId', '-SimpleMatch', '-ShowError', '-Separator', '-SecureString', '-SecureKey', + '-SecondValue', '-SecondsRemaining', '-Seconds', '-Second', '-Scope', '-Root', '-Role', + '-Resolve', '-RemoveListener', '-RemoveFileListener', '-Registered', '-ReferenceObject', + '-Recurse', '-RecommendedAction', '-ReadCount', '-Quiet', '-Query', '-Qualifier', '-PSSnapin', + '-PSProvider', '-PSHost', '-PSDrive', '-PropertyType', '-Property', '-Prompt', '-Process', + '-PrependPath', '-PercentComplete', '-Pattern', '-PathType', '-Path', '-PassThru', '-ParentId', + '-Parent', '-Parameter', '-Paging', '-OutVariable', '-OutBuffer', '-Option', '-OnType', '-Off', + '-Object', '-Noun', '-NoTypeInformation', '-NoQualifier', '-NoNewline', '-NoElement', + '-NoClobber', '-NewName', '-Newest', '-Namespace', '-Name', '-Month', '-Minutes', '-Minute', + '-Minimum', '-Milliseconds', '-Message', '-MemberType', '-Maximum', '-LogName', '-LiteralPath', + '-LiteralName', '-ListenerOption', '-List', '-Line', '-Leaf', '-Last', '-Key', '-ItemType', + '-IsValid', '-IsAbsolute', '-InputObject', '-IncludeEqual', '-IncludeChain', '-Include', + '-IgnoreWhiteSpace', '-Id', '-Hours', '-Hour', '-HideTableHeaders', '-Head', '-GroupBy', + '-Functionality', '-Full', '-Format', '-ForegroundColor', '-Force', '-First', '-FilterScript', + '-Filter', '-FilePath', '-Expression', '-ExpandProperty', '-Expand', '-ExecutionPolicy', + '-ExcludeProperty', '-ExcludeDifferent', '-Exclude', '-Exception', '-Examples', '-ErrorVariable', + '-ErrorRecord', '-ErrorId', '-ErrorAction', '-End', '-Encoding', '-DisplayName', '-DisplayHint', + '-DisplayError', '-DifferenceObject', '-Detailed', '-Destination', '-Description', '-Descending', + '-Depth', '-DependsOn', '-Delimiter', '-Debugger', '-Debug', '-Days', '-Day', '-Date', + '-CurrentOperation', '-Culture', '-Credential', '-Count', '-Container', '-Confirm', + '-ComputerName', '-Component', '-Completed', '-ComObject', '-CommandType', '-Command', + '-Column', '-Class', '-ChildPath', '-Character', '-Certificate', '-CategoryTargetType', + '-CategoryTargetName', '-CategoryReason', '-CategoryActivity', '-Category', '-CaseSensitive', + '-Body', '-BinaryPathName', '-Begin', '-BackgroundColor', '-Average', '-AutoSize', '-Audit', + '-AsString', '-AsSecureString', '-AsPlainText', '-As', '-ArgumentList', '-AppendPath', '-Append', + '-Adjust', '-Activity', '-AclObject' + ), + 6 => array( + '_','args','DebugPreference','Error','ErrorActionPreference', + 'foreach','Home','Host','Input','LASTEXITCODE','MaximumAliasCount', + 'MaximumDriveCount','MaximumFunctionCount','MaximumHistoryCount', + 'MaximumVariableCount','OFS','PsHome', + 'ReportErrorShowExceptionClass','ReportErrorShowInnerException', + 'ReportErrorShowSource','ReportErrorShowStackTrace', + 'ShouldProcessPreference','ShouldProcessReturnPreference', + 'StackTrace','VerbosePreference','WarningPreference','PWD' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '=', '<', '>', '@', '|', '&', ',', '?', + '+=', '-=', '*=', '/=', '%=', '*', '/', '%', '!', '+', '-', '++', '--' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #008080; font-weight: bold;', + 2 => 'color: #008080; font-weight: bold;', + 3 => 'color: #0000FF;', + 4 => 'color: #FF0000;', + 5 => 'color: #008080; font-style: italic;', + 6 => 'color: #000080;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000;', + 'MULTI' => 'color: #008000;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #008080; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #800000;' + ), + 'NUMBERS' => array( + 0 => 'color: #804000;' + ), + 'METHODS' => array( + 0 => 'color: pink;' + ), + 'SYMBOLS' => array( + 0 => 'color: pink;' + ), + 'REGEXPS' => array( + 0 => 'color: #800080;', + 3 => 'color: #008080;', + 4 => 'color: #008080;', + 5 => 'color: #800000;', + 6 => 'color: #000080;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => 'about:blank', + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + // special after pipe + 3 => array( + GESHI_SEARCH => '(\[)(int|long|string|char|bool|byte|double|decimal|float|single|regex|array|xml|scriptblock|switch|hashtable|type|ref|psobject|wmi|wmisearcher|wmiclass|object)((\[.*\])?\])', + GESHI_REPLACE => '\2', + GESHI_MODIFIERS => 'si', + GESHI_BEFORE => '\1', + GESHI_AFTER => '\3' + ), + // Classes + 4 => array( + GESHI_SEARCH => '(\[)(System\.Reflection\.Assembly|System\.Net\.CredentialCache|Microsoft\.SharePoint\.SPFileLevel|Microsoft\.SharePoint\.Publishing\.PublishingWeb|Microsoft\.SharePoint\.Publishing|Microsoft\.SharePoint\.SPWeb)(\])', + GESHI_REPLACE => '\2', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '\1', + GESHI_AFTER => '\3' + ), + // Members + // There's about a hundred million of these, add the ones you need as you need them + 5 => array ( + GESHI_SEARCH => '(::)(ReflectionOnlyLoadFrom|ReflectionOnlyLoad|ReferenceEquals|LoadWithPartialName|LoadFrom|LoadFile|Load|GetExecutingAssembly|GetEntryAssembly|GetCallingAssembly|GetAssembly|Equals|DefaultNetworkCredentials|DefaultCredentials|CreateQualifiedName|Checkout|Draft|Published|IsPublishingWeb)', + GESHI_REPLACE => '\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\1', + GESHI_AFTER => '' + ), + // Special variables + 6 => array( + GESHI_SEARCH => '(\$)(\$[_\^]?|\?)(?!\w)', + GESHI_REPLACE => '\1\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + // variables + //BenBE: Please note that changes here and in Keyword group 6 have to be synchronized in order to work properly. + //This Regexp must only match, if keyword group 6 doesn't. If this assumption fails + //Highlighting of the keywords will be incomplete or incorrect! + 0 => "(?)[\\\$](\w+)(?=[^|\w])", + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 4 => array( + 'DISALLOWED_AFTER' => '(?![a-zA-Z])', + 'DISALLOWED_BEFORE' => '' + ), + 6 => array( + 'DISALLOWED_BEFORE' => '(?)\$' + ) + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/progress.php b/_piecrust/libs/Geshi/geshi/progress.php new file mode 100644 index 0000000..3816e58 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/progress.php @@ -0,0 +1,485 @@ + 'Progress', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array ( + 1 => array( + 'ACCUMULATE','APPLY','ASSIGN','BELL','QUERY', + 'BUFFER-COMPARE','BUFFER-COPY','CALL','CASE', + 'CHOOSE','CLASS','CLOSE QUERY','each','WHERE', + 'CLOSE STORED-PROCEDURE','COLOR','COMPILE','CONNECT', + 'CONSTRUCTOR','COPY-LOB','CREATE','CREATE ALIAS', + 'CREATE BROWSE','CREATE BUFFER','CREATE CALL','CREATE CLIENT-PRINCIPAL', + 'CREATE DATABASE','CREATE DATASET','CREATE DATA-SOURCE','CREATE QUERY', + 'CREATE SAX-attributeS','CREATE SAX-READER','CREATE SAX-WRITER','CREATE SERVER', + 'CREATE SERVER-SOCKET','CREATE SOAP-HEADER','CREATE SOAP-HEADER-ENTRYREF','CREATE SOCKET', + 'CREATE TEMP-TABLE','CREATE WIDGET','CREATE widget-POOL','CREATE X-DOCUMENT', + 'CREATE X-NODEREF','CURRENT-LANGUAGE','CURRENT-VALUE','DDE ADVISE', + 'DDE EXECUTE','DDE GET','DDE INITIATE','DDE REQUEST', + 'DDE SEND','DDE TERMINATE','DEFINE BROWSE','DEFINE BUFFER','DEFINE', + 'DEFINE BUTTON','DEFINE DATASET','DEFINE DATA-SOURCE','DEFINE FRAME','DEF','VAR', + 'DEFINE IMAGE','DEFINE MENU','DEFINE PARAMETER','DEFINE property','PARAM', + 'DEFINE QUERY','DEFINE RECTANGLE','DEFINE STREAM','DEFINE SUB-MENU', + 'DEFINE TEMP-TABLE','DEFINE WORKFILE','DEFINE WORK-TABLE', + 'DELETE','DELETE ALIAS','DELETE object','DELETE PROCEDURE', + 'DELETE widget','DELETE widget-POOL','DESTRUCTOR','DICTIONARY', + 'DISABLE','DISABLE TRIGGERS','DISCONNECT','DISPLAY', + 'DO','DOS','DOWN','DYNAMIC-CURRENT-VALUE', + 'ELSE','EMPTY TEMP-TABLE','ENABLE','END', + 'ENTRY','FIND','AND', + 'FIX-CODEPAGE','FOR','FORM','FRAME-VALUE', + 'GET','GET-KEY-VALUE','HIDE','IF', + 'IMPORT','INPUT CLEAR','INPUT CLOSE','INPUT FROM','input', + 'INPUT THROUGH','INPUT-OUTPUT CLOSE','INPUT-OUTPUT THROUGH', + 'INTERFACE','LEAVE','BREAK', + 'LOAD-PICTURE','MESSAGE','method','NEXT','prev', + 'NEXT-PROMPT','ON','OPEN QUERY','OS-APPEND', + 'OS-COMMAND','OS-COPY','OS-CREATE-DIR','OS-DELETE', + 'OS-RENAME','OUTPUT CLOSE','OUTPUT THROUGH','OUTPUT TO', + 'OVERLAY','PAGE','PAUSE','PROCEDURE', + 'PROCESS EVENTS','PROMPT-FOR','PROMSGS','PROPATH', + 'PUBLISH','PUT','PUT CURSOR','PUT SCREEN', + 'PUT-BITS','PUT-BYTE','PUT-BYTES','PUT-DOUBLE', + 'PUT-FLOAT','PUT-INT64','PUT-KEY-VALUE','PUT-LONG', + 'PUT-SHORT','PUT-STRING','PUT-UNSIGNED-LONG','PUT-UNSIGNED-SHORT', + 'QUIT','RAW-TRANSFER','READKEY','RELEASE', + 'RELEASE EXTERNAL','RELEASE object','REPEAT','REPOSITION', + 'RUN','RUN STORED-PROCEDURE','RUN SUPER', + 'SAVE CACHE','SCROLL','SEEK','SET', + 'SET-BYTE-ORDER','SET-POINTER-VALUE','SET-SIZE','SHOW-STATS', + 'STATUS','STOP','SUBSCRIBE','SUBSTRING', + 'system-DIALOG COLOR','system-DIALOG FONT','system-DIALOG GET-DIR','system-DIALOG GET-FILE', + 'system-DIALOG PRINTER-SETUP','system-HELP','THEN','THIS-object', + 'TRANSACTION-MODE AUTOMATIC','TRIGGER PROCEDURE','UNDERLINE','UNDO', + 'UNIX','UNLOAD','UNSUBSCRIBE','UP','STRING', + 'UPDATE','USE','USING','substr','SKIP','CLOSE', + 'VIEW','WAIT-FOR','MODULO','NE','AVAIL', + 'NOT','OR','&GLOBAL-DEFINE','&IF','UNFORMATTED','NO-PAUSE', + '&THEN','&ELSEIF','&ELSE','&ENDIF','OPEN','NO-WAIT', + '&MESSAGE','&SCOPED-DEFINE','&UNDEFINE','DEFINED', + 'BROWSE','BUTTON','COMBO-BOX','CONTROL-FRAME', + 'DIALOG-BOX','EDITOR','FIELD-GROUP','FILL-IN', + 'FRAME','IMAGE','LITERAL','MENU', + 'MENU-ITEM','RADIO-SET','RECTANGLE','SELECTION-LIST', + 'SLIDER','SUB-MENU','TEXT','TOGGLE-BOX', + 'WINDOW','WITH','AT','OF','EDITING','ON ENDKEY','output', + 'ON ERROR','ON QUIT','ON STOP','PRESELECT', + 'QUERY-TUNING','SIZE','Trigger','VIEW-AS','ALERT-BOX', + 'Buffer','Data-relation','ProDataSet','SAX-attributes', + 'SAX-reader','SAX-writer','Server socket','SOAP-fault', + 'SOAP-header','SOAP-header-entryref','Socket','Temp-table', + 'X-noderef','Height','Left','Top','TO', + 'Width','ACTIVE-WINDOW','AUDIT-CONTROL','FIRST','LAST', + 'AUDIT-POLICY','CLIPBOARD','CODEBASE-LOCATOR','COLOR-TABLE', + 'COMPILER','COM-SELF','DEBUGGER','DEFAULT-WINDOW', + 'ERROR-STATUS','FILE-INFO','FOCUS','FONT-TABLE', + 'LAST-EVENT','LOG-MANAGER','RCODE-INFO','SECURITY-POLICY', + 'SELF','SESSION','SOURCE-PROCEDURE','TARGET-PROCEDURE','NO-LOCK','NO-error', + 'THIS-PROCEDURE','WEB-CONTEXT','FUNCTION','RETURNS','NO-UNDO' + ), + 2 => array( + 'ACCEPT-CHANGES','ACCEPT-ROW-CHANGES','ADD-BUFFER','ADD-CALC-COLUMN', + 'ADD-COLUMNS-FROM','ADD-EVENTS-PROCEDURE','ADD-FIELDS-FROM','ADD-FIRST', + 'ADD-HEADER-ENTRY','ADD-INDEX-FIELD','ADD-LAST','ADD-LIKE-COLUMN', + 'ADD-LIKE-FIELD','ADD-LIKE-INDEX','ADD-NEW-FIELD','ADD-NEW-INDEX', + 'ADD-RELATION','ADD-SCHEMA-LOCATION','ADD-SOURCE-BUFFER','ADD-SUPER-PROCEDURE', + 'APPEND-CHILD','APPLY-CALLBACK','ATTACH-DATA-SOURCE','AUTHENTICATION-FAILED', + 'BEGIN-EVENT-GROUP','BUFFER-CREATE', + 'BUFFER-DELETE','BUFFER-RELEASE','BUFFER-VALIDATE', + 'CANCEL-BREAK','CANCEL-REQUESTS','CLEAR','CLEAR-APPL-CONTEXT', + 'CLEAR-LOG','CLEAR-SELECTION','CLEAR-SORT-ARROWS','CLONE-NODE', + 'CLOSE-LOG','CONNECTED','CONVERT-TO-OFFSET', + 'COPY-DATASET','COPY-SAX-attributeS','COPY-TEMP-TABLE','CREATE-LIKE', + 'CREATE-NODE','CREATE-NODE-NAMESPACE','CREATE-RESULT-LIST-ENTRY','DEBUG', + 'DECLARE-NAMESPACE','DELETE-CHAR','DELETE-CURRENT-ROW', + 'DELETE-HEADER-ENTRY','DELETE-LINE','DELETE-NODE','DELETE-RESULT-LIST-ENTRY', + 'DELETE-SELECTED-ROW','DELETE-SELECTED-ROWS','DESELECT-FOCUSED-ROW','DESELECT-ROWS', + 'DESELECT-SELECTED-ROW','DETACH-DATA-SOURCE','DISABLE-CONNECTIONS', + 'DISABLE-DUMP-TRIGGERS','DISABLE-LOAD-TRIGGERS','DISPLAY-MESSAGE', + 'DUMP-LOGGING-NOW','EDIT-CLEAR','EDIT-COPY','EDIT-CUT', + 'EDIT-PASTE','EDIT-UNDO','EMPTY-DATASET','EMPTY-TEMP-TABLE', + 'ENABLE-CONNECTIONS','ENABLE-EVENTS','ENCRYPT-AUDIT-MAC-KEY', + 'END-DOCUMENT','END-ELEMENT','END-EVENT-GROUP','END-FILE-DROP', + 'EXPORT','EXPORT-PRINCIPAL','FETCH-SELECTED-ROW', + 'FILL','FIND-BY-ROWID','FIND-CURRENT','FIND-FIRST', + 'FIND-LAST','FIND-UNIQUE','GET-attribute','GET-attribute-NODE', + 'GET-BINARY-DATA','GET-BLUE-VALUE','GET-BROWSE-COLUMN','GET-BUFFER-HANDLE', + 'GET-BYTES-AVAILABLE','GET-CALLBACK-PROC-CONTEXT','GET-CALLBACK-PROC-NAME','GET-CGI-LIST', + 'GET-CGI-LONG-VALUE','GET-CGI-VALUE','GET-CHANGES','GET-CHILD', + 'GET-CHILD-RELATION','GET-CONFIG-VALUE','GET-CURRENT','GET-DATASET-BUFFER', + 'GET-DOCUMENT-ELEMENT','GET-DROPPED-FILE','GET-DYNAMIC','GET-ERROR-COLUMN ', + 'GET-ERROR-ROW ','GET-FILE-NAME ','GET-FILE-OFFSET ','GET-FIRST', + 'GET-GREEN-VALUE','GET-HEADER-ENTRY','GET-INDEX-BY-NAMESPACE-NAME','GET-INDEX-BY-QNAME', + 'GET-ITERATION','GET-LAST','GET-LOCALNAME-BY-INDEX','GET-MESSAGE', + 'GET-NEXT','GET-NODE','GET-NUMBER','GET-PARENT', + 'GET-PREV','GET-PRINTERS','GET-property','GET-QNAME-BY-INDEX', + 'GET-RED-VALUE','GET-RELATION','GET-REPOSITIONED-ROW','GET-RGB-VALUE', + 'GET-SELECTED-widget','GET-SERIALIZED','GET-SIGNATURE','GET-SOCKET-OPTION', + 'GET-SOURCE-BUFFER','GET-TAB-ITEM','GET-TEXT-HEIGHT-CHARS','GET-TEXT-HEIGHT-PIXELS', + 'GET-TEXT-WIDTH-CHARS','GET-TEXT-WIDTH-PIXELS','GET-TOP-BUFFER','GET-TYPE-BY-INDEX', + 'GET-TYPE-BY-NAMESPACE-NAME','GET-TYPE-BY-QNAME','GET-URI-BY-INDEX','GET-VALUE-BY-INDEX', + 'GET-VALUE-BY-NAMESPACE-NAME','GET-VALUE-BY-QNAME','GET-WAIT-STATE','IMPORT-NODE', + 'IMPORT-PRINCIPAL','INCREMENT-EXCLUSIVE-ID','INITIALIZE-DOCUMENT-TYPE', + 'INITIATE','INSERT','INSERT-attribute','INSERT-BACKTAB', + 'INSERT-BEFORE','INSERT-FILE','INSERT-ROW','INSERT-STRING', + 'INSERT-TAB','INVOKE','IS-ROW-SELECTED','IS-SELECTED', + 'LIST-property-NAMES','LOAD','LoadControls','LOAD-DOMAINS', + 'LOAD-ICON','LOAD-IMAGE','LOAD-IMAGE-DOWN','LOAD-IMAGE-INSENSITIVE', + 'LOAD-IMAGE-UP','LOAD-MOUSE-POINTER','LOAD-SMALL-ICON','LOCK-REGISTRATION', + 'LOG-AUDIT-EVENT','LOGOUT','LONGCHAR-TO-NODE-VALUE','LOOKUP', + 'MEMPTR-TO-NODE-VALUE','MERGE-CHANGES','MERGE-ROW-CHANGES','MOVE-AFTER-TAB-ITEM', + 'MOVE-BEFORE-TAB-ITEM','MOVE-COLUMN','MOVE-TO-BOTTOM','MOVE-TO-EOF', + 'MOVE-TO-TOP','NODE-VALUE-TO-LONGCHAR','NODE-VALUE-TO-MEMPTR','NORMALIZE', + 'QUERY-CLOSE','QUERY-OPEN','QUERY-PREPARE', + 'READ','READ-FILE','READ-XML','READ-XMLSCHEMA', + 'REFRESH','REFRESH-AUDIT-POLICY','REGISTER-DOMAIN','REJECT-CHANGES', + 'REJECT-ROW-CHANGES','REMOVE-attribute','REMOVE-CHILD','REMOVE-EVENTS-PROCEDURE', + 'REMOVE-SUPER-PROCEDURE','REPLACE','REPLACE-CHILD','REPLACE-SELECTION-TEXT', + 'REPOSITION-BACKWARD','REPOSITION-FORWARD','REPOSITION-TO-ROW','REPOSITION-TO-ROWID', + 'RESET','SAVE','SAVE-FILE','SAVE-ROW-CHANGES', + 'SAX-PARSE','SAX-PARSE-FIRST','SAX-PARSE-NEXT','SCROLL-TO-CURRENT-ROW', + 'SCROLL-TO-ITEM','SCROLL-TO-SELECTED-ROW','SEAL','SEARCH', + 'SELECT-ALL','SELECT-FOCUSED-ROW','SELECT-NEXT-ROW','SELECT-PREV-ROW', + 'SELECT-ROW','SET-ACTOR','SET-APPL-CONTEXT','SET-attribute', + 'SET-attribute-NODE','SET-BLUE-VALUE','SET-BREAK','SET-BUFFERS', + 'SET-CALLBACK','SET-CALLBACK-PROCEDURE','SET-CLIENT','SET-COMMIT', + 'SET-CONNECT-PROCEDURE','SET-DYNAMIC','SET-GREEN-VALUE','SET-INPUT-SOURCE', + 'SET-MUST-UNDERSTAND','SET-NODE','SET-NUMERIC-FORMAT','SET-OUTPUT-DESTINATION', + 'SET-PARAMETER','SET-property','SET-READ-RESPONSE-PROCEDURE','SET-RED-VALUE', + 'SET-REPOSITIONED-ROW','SET-RGB-VALUE','SET-ROLLBACK','SET-SELECTION', + 'SET-SERIALIZED','SET-SOCKET-OPTION','SET-SORT-ARROW','SET-WAIT-STATE', + 'START-DOCUMENT','START-ELEMENT','STOP-PARSING','SYNCHRONIZE', + 'TEMP-TABLE-PREPARE','UPDATE-attribute','URL-DECODE','URL-ENCODE', + 'VALIDATE','VALIDATE-SEAL','WRITE','WRITE-CDATA','USE-INDEX', + 'WRITE-CHARACTERS','WRITE-COMMENT','WRITE-DATA-ELEMENT','WRITE-EMPTY-ELEMENT', + 'WRITE-ENTITY-REF','WRITE-EXTERNAL-DTD','WRITE-FRAGMENT','WRITE-MESSAGE', + 'WRITE-PROCESSING-INSTRUCTION','WRITE-XML','WRITE-XMLSCHEMA','FALSE','true' + ), + 3 => array( + 'ABSOLUTE','ACCUM','ADD-INTERVAL','ALIAS','mod', + 'AMBIGUOUS','ASC','AUDIT-ENABLED','AVAILABLE', + 'BASE64-DECODE','BASE64-ENCODE','CAN-DO','CAN-FIND', + 'CAN-QUERY','CAN-SET','CAPS','CAST','OS-DIR', + 'CHR','CODEPAGE-CONVERT','COMPARE', + 'COUNT-OF','CURRENT-CHANGED','CURRENT-RESULT-ROW','DATASERVERS', + 'DATA-SOURCE-MODIFIED','DATETIME','DATETIME-TZ', + 'DAY','DBCODEPAGE','DBCOLLATION','DBNAME', + 'DBPARAM','DBRESTRICTIONS','DBTASKID','DBTYPE', + 'DBVERSION','DECIMAL','DECRYPT','DYNAMIC-function', + 'DYNAMIC-NEXT-VALUE','ENCODE','ENCRYPT','ENTERED', + 'ERROR','ETIME','EXP','ENDKEY','END-error', + 'FIRST-OF','FRAME-DB','FRAME-DOWN', + 'FRAME-FIELD','FRAME-FILE','FRAME-INDEX','FRAME-LINE', + 'GATEWAYS','GENERATE-PBE-KEY','GENERATE-PBE-SALT','GENERATE-RANDOM-KEY', + 'GENERATE-UUID','GET-BITS','GET-BYTE','GET-BYTE-ORDER', + 'GET-BYTES','GET-CODEPAGE','GET-CODEPAGES','GET-COLLATION', + 'GET-COLLATIONS','GET-DOUBLE','GET-FLOAT','GET-INT64', + 'GET-LONG','GET-POINTER-VALUE','GET-SHORT','GET-SIZE', + 'GET-STRING','GET-UNSIGNED-LONG','GET-UNSIGNED-SHORT','GO-PENDING', + 'GUID','HEX-DECODE','INDEX', + 'INT64','INTEGER','INTERVAL','IS-ATTR-SPACE', + 'IS-CODEPAGE-FIXED','IS-COLUMN-CODEPAGE','IS-LEAD-BYTE','ISO-DATE', + 'KBLABEL','KEYCODE','KEYFUNCTION','KEYLABEL', + 'KEYWORD','KEYWORD-ALL','LASTKEY', + 'LAST-OF','LC','LDBNAME','LEFT-TRIM', + 'LIBRARY','LINE-COUNTER','LIST-EVENTS','LIST-QUERY-ATTRS', + 'LIST-SET-ATTRS','LIST-widgetS','LOCKED', + 'LOGICAL','MAXIMUM','MD5-DIGEST', + 'MEMBER','MESSAGE-LINES','MINIMUM','MONTH', + 'MTIME','NEW','NEXT-VALUE','SHARED', + 'NOT ENTERED','NOW','NUM-ALIASES','NUM-DBS', + 'NUM-ENTRIES','NUM-RESULTS','OPSYS','OS-DRIVES', + 'OS-ERROR','OS-GETENV','PAGE-NUMBER','PAGE-SIZE', + 'PDBNAME','PROC-HANDLE','PROC-STATUS','PROGRAM-NAME', + 'PROGRESS','PROVERSION','QUERY-OFF-END','QUOTER', + 'RANDOM','RAW','RECID','REJECTED', + 'RETRY','RETURN-VALUE','RGB-VALUE', + 'RIGHT-TRIM','R-INDEX','ROUND','ROWID','LENGTH', + 'SDBNAME','SET-DB-CLIENT','SETUSERID', + 'SHA1-DIGEST','SQRT','SUBSTITUTE','VARIABLE', + 'SUPER','TERMINAL','TIME','TIMEZONE','external', + 'TODAY','TO-ROWID','TRIM','TRUNCATE','return', + 'TYPE-OF','USERID','VALID-EVENT','VALID-HANDLE', + 'VALID-object','WEEKDAY','YEAR','BEGINS','VALUE', + 'EQ','GE','GT','LE','LT','MATCHES','AS','BY','LIKE' + ), + 4 => array( + 'ACCELERATOR','ACTIVE','ACTOR','ADM-DATA', + 'AFTER-BUFFER','AFTER-ROWID','AFTER-TABLE','ALLOW-COLUMN-SEARCHING', + 'ALWAYS-ON-TOP','APPL-ALERT-BOXES','APPL-CONTEXT-ID','APPSERVER-INFO', + 'APPSERVER-PASSWORD','APPSERVER-USERID','ASYNCHRONOUS','ASYNC-REQUEST-COUNT', + 'ASYNC-REQUEST-HANDLE','ATTACHED-PAIRLIST','attribute-NAMES','ATTR-SPACE', + 'AUDIT-EVENT-CONTEXT','AUTO-COMPLETION','AUTO-DELETE','AUTO-DELETE-XML', + 'AUTO-END-KEY','AUTO-GO','AUTO-INDENT','AUTO-RESIZE', + 'AUTO-RETURN','AUTO-SYNCHRONIZE','AUTO-VALIDATE','AUTO-ZAP', + 'AVAILABLE-FORMATS','BACKGROUND','BASE-ADE','BASIC-LOGGING', + 'BATCH-MODE','BATCH-SIZE','BEFORE-BUFFER','BEFORE-ROWID', + 'BEFORE-TABLE','BGCOLOR','BLANK','BLOCK-ITERATION-DISPLAY', + 'BORDER-BOTTOM-CHARS','BORDER-BOTTOM-PIXELS','BORDER-LEFT-CHARS','BORDER-LEFT-PIXELS', + 'BORDER-RIGHT-CHARS','BORDER-RIGHT-PIXELS','BORDER-TOP-CHARS','BORDER-TOP-PIXELS', + 'BOX','BOX-SELECTABLE','BUFFER-CHARS','BUFFER-FIELD', + 'BUFFER-HANDLE','BUFFER-LINES','BUFFER-NAME','BUFFER-VALUE', + 'BYTES-READ','BYTES-WRITTEN','CACHE','CALL-NAME', + 'CALL-TYPE','CANCEL-BUTTON','CANCELLED','CAN-CREATE', + 'CAN-DELETE','CAN-READ','CAN-WRITE','CAREFUL-PAINT', + 'CASE-SENSITIVE','CENTERED','CHARSET','CHECKED', + 'CHILD-BUFFER','CHILD-NUM','CLASS-TYPE','CLIENT-CONNECTION-ID', + 'CLIENT-TTY','CLIENT-TYPE','CLIENT-WORKSTATION','CODE', + 'CODEPAGE','COLUMN','COLUMN-BGCOLOR','COLUMN-DCOLOR', + 'COLUMN-FGCOLOR','COLUMN-FONT','COLUMN-LABEL','COLUMN-MOVABLE', + 'COLUMN-PFCOLOR','COLUMN-READ-ONLY','COLUMN-RESIZABLE','COLUMN-SCROLLING', + 'COM-HANDLE','COMPLETE','CONFIG-NAME','CONTEXT-HELP', + 'CONTEXT-HELP-FILE','CONTEXT-HELP-ID','CONTROL-BOX','CONVERT-3D-COLORS', + 'CPCASE','CPCOLL','CPINTERNAL','CPLOG', + 'CPPRINT','CPRCODEIN','CPRCODEOUT','CPSTREAM', + 'CPTERM','CRC-VALUE','CURRENT-COLUMN','CURRENT-ENVIRONMENT', + 'CURRENT-ITERATION','CURRENT-ROW-MODIFIED','CURRENT-WINDOW','CURSOR-CHAR', + 'CURSOR-LINE','CURSOR-OFFSET','DATA-ENTRY-RETURN','DATASET', + 'DATA-SOURCE','DATA-SOURCE-COMPLETE-MAP','DATA-TYPE','DATE-FORMAT', + 'DB-REFERENCES','DCOLOR','DDE-ERROR','DDE-ID', + 'DDE-ITEM','DDE-NAME','DDE-TOPIC','DEBLANK', + 'DEBUG-ALERT','DECIMALS','DEFAULT','DEFAULT-BUFFER-HANDLE', + 'DEFAULT-BUTTON','DEFAULT-COMMIT','DELIMITER','DISABLE-AUTO-ZAP', + 'DISPLAY-TIMEZONE','DISPLAY-TYPE','DOMAIN-DESCRIPTION','DOMAIN-NAME', + 'DOMAIN-TYPE','DRAG-ENABLED','DROP-TARGET','DYNAMIC', + 'EDGE-CHARS','EDGE-PIXELS','EDIT-CAN-PASTE','EDIT-CAN-UNDO', + 'EMPTY','ENCODING','ENCRYPTION-SALT','END-USER-PROMPT', + 'ENTRY-TYPES-LIST','ERROR-COLUMN','ERROR-object-DETAIL','ERROR-ROW', + 'ERROR-STRING','EVENT-GROUP-ID','EVENT-PROCEDURE','EVENT-PROCEDURE-CONTEXT', + 'EVENT-TYPE','EXCLUSIVE-ID','EXECUTION-LOG','EXPAND', + 'EXPANDABLE','FGCOLOR','FILE-CREATE-DATE','FILE-CREATE-TIME', + 'FILE-MOD-DATE','FILE-MOD-TIME','FILE-NAME','FILE-OFFSET', + 'FILE-SIZE','FILE-TYPE','FILLED','FILL-MODE', + 'FILL-WHERE-STRING','FIRST-ASYNC-REQUEST','FIRST-BUFFER','FIRST-CHILD', + 'FIRST-COLUMN','FIRST-DATASET','FIRST-DATA-SOURCE','FIRST-object', + 'FIRST-PROCEDURE','FIRST-QUERY','FIRST-SERVER','FIRST-SERVER-SOCKET', + 'FIRST-SOCKET','FIRST-TAB-ITEM','FIT-LAST-COLUMN','FLAT-BUTTON', + 'FOCUSED-ROW','FOCUSED-ROW-SELECTED','FONT','FOREGROUND', + 'FORMAT','FORMATTED','FORM-INPUT','FORM-LONG-INPUT', + 'FORWARD-ONLY','FRAGMENT','FRAME-COL','FRAME-NAME', + 'FRAME-ROW','FRAME-SPACING','FRAME-X','FRAME-Y', + 'FREQUENCY','FULL-HEIGHT-CHARS','FULL-HEIGHT-PIXELS','FULL-PATHNAME', + 'FULL-WIDTH-CHARS','FULL-WIDTH-PIXELS','GRAPHIC-EDGE', + 'GRID-FACTOR-HORIZONTAL','GRID-FACTOR-VERTICAL','GRID-SNAP','GRID-UNIT-HEIGHT-CHARS', + 'GRID-UNIT-HEIGHT-PIXELS','GRID-UNIT-WIDTH-CHARS','GRID-UNIT-WIDTH-PIXELS','GRID-VISIBLE', + 'GROUP-BOX','HANDLE','HANDLER','HAS-LOBS', + 'HAS-RECORDS','HEIGHT-CHARS','HEIGHT-PIXELS','HELP', + 'HIDDEN','HORIZONTAL','HTML-CHARSET','HTML-END-OF-LINE', + 'HTML-END-OF-PAGE','HTML-FRAME-BEGIN','HTML-FRAME-END','HTML-HEADER-BEGIN', + 'HTML-HEADER-END','HTML-TITLE-BEGIN','HTML-TITLE-END','HWND', + 'ICFPARAMETER','ICON','IGNORE-CURRENT-MODIFIED','IMAGE-DOWN', + 'IMAGE-INSENSITIVE','IMAGE-UP','IMMEDIATE-DISPLAY','INDEX-INFORMATION', + 'IN-HANDLE','INHERIT-BGCOLOR','INHERIT-FGCOLOR','INITIAL','INIT', + 'INNER-CHARS','INNER-LINES','INPUT-VALUE','INSTANTIATING-PROCEDURE', + 'INTERNAL-ENTRIES','IS-CLASS','IS-OPEN','IS-PARAMETER-SET', + 'IS-XML','ITEMS-PER-ROW','KEEP-CONNECTION-OPEN','KEEP-FRAME-Z-ORDER', + 'KEEP-SECURITY-CACHE','KEY','KEYS','LABEL', + 'LABEL-BGCOLOR','LABEL-DCOLOR','LABEL-FGCOLOR','LABEL-FONT', + 'LABELS','LANGUAGES','LARGE','LARGE-TO-SMALL', + 'LAST-ASYNC-REQUEST','LAST-BATCH','LAST-CHILD','LAST-object', + 'LAST-PROCEDURE','LAST-SERVER','LAST-SERVER-SOCKET','LAST-SOCKET', + 'LAST-TAB-ITEM','LINE','LIST-ITEM-PAIRS','LIST-ITEMS', + 'LITERAL-QUESTION','LOCAL-HOST','LOCAL-NAME','LOCAL-PORT', + 'LOCATOR-COLUMN-NUMBER','LOCATOR-LINE-NUMBER','LOCATOR-PUBLIC-ID','LOCATOR-system-ID', + 'LOCATOR-TYPE','LOG-ENTRY-TYPES','LOGFILE-NAME','LOGGING-LEVEL', + 'LOGIN-EXPIRATION-TIMESTAMP','LOGIN-HOST','LOGIN-STATE','LOG-THRESHOLD', + 'MANDATORY','MANUAL-HIGHLIGHT','MAX-BUTTON','MAX-CHARS', + 'MAX-DATA-GUESS','MAX-HEIGHT-CHARS','MAX-HEIGHT-PIXELS','MAX-VALUE', + 'MAX-WIDTH-CHARS','MAX-WIDTH-PIXELS','MD5-VALUE','MENU-BAR', + 'MENU-KEY','MENU-MOUSE','MERGE-BY-FIELD','MESSAGE-AREA', + 'MESSAGE-AREA-FONT','MIN-BUTTON','MIN-COLUMN-WIDTH-CHARS','MIN-COLUMN-WIDTH-PIXELS', + 'MIN-HEIGHT-CHARS','MIN-HEIGHT-PIXELS','MIN-SCHEMA-MARSHAL','MIN-VALUE', + 'MIN-WIDTH-CHARS','MIN-WIDTH-PIXELS','MODIFIED','MOUSE-POINTER', + 'MOVABLE','MULTI-COMPILE','MULTIPLE','MULTITASKING-INTERVAL', + 'MUST-UNDERSTAND','NAME','NAMESPACE-PREFIX','NAMESPACE-URI', + 'NEEDS-APPSERVER-PROMPT','NEEDS-PROMPT','NESTED','NEW-ROW', + 'NEXT-COLUMN','NEXT-ROWID','NEXT-SIBLING','NEXT-TAB-ITEM', 'NO-BOX', + 'NO-CURRENT-VALUE','NODE-VALUE','NO-EMPTY-SPACE','NO-FOCUS', + 'NONAMESPACE-SCHEMA-LOCATION','NO-SCHEMA-MARSHAL','NO-VALIDATE','NUM-BUFFERS', + 'NUM-BUTTONS','NUM-CHILD-RELATIONS','NUM-CHILDREN','NUM-COLUMNS', + 'NUM-DROPPED-FILES','NUMERIC-DECIMAL-POINT','NUMERIC-FORMAT','NUMERIC-SEPARATOR', + 'NUM-FIELDS','NUM-FORMATS','NUM-HEADER-ENTRIES','NUM-ITEMS', + 'NUM-ITERATIONS','NUM-LINES','NUM-LOCKED-COLUMNS','NUM-LOG-FILES', + 'NUM-MESSAGES','NUM-PARAMETERS','NUM-REFERENCES','NUM-RELATIONS', + 'NUM-REPLACED','NUM-SELECTED-ROWS','NUM-SELECTED-WIDGETS','NUM-SOURCE-BUFFERS', + 'NUM-TABS','NUM-TOP-BUFFERS','NUM-TO-RETAIN','NUM-VISIBLE-COLUMNS', + 'ON-FRAME-BORDER','ORIGIN-HANDLE','ORIGIN-ROWID','OWNER', + 'OWNER-DOCUMENT','PAGE-BOTTOM','PAGE-TOP','PARAMETER', + 'PARENT','PARENT-BUFFER','PARENT-RELATION','PARSE-STATUS', + 'PASSWORD-FIELD','PATHNAME','PBE-HASH-ALGORITHM','PBE-KEY-ROUNDS', + 'PERSISTENT','PERSISTENT-CACHE-DISABLED','PERSISTENT-PROCEDURE','PFCOLOR', + 'PIXELS-PER-COLUMN','PIXELS-PER-ROW','POPUP-MENU','POPUP-ONLY', + 'POSITION','PREFER-DATASET','PREPARED','PREPARE-STRING', + 'PREV-COLUMN','PREV-SIBLING','PREV-TAB-ITEM','PRIMARY', + 'PRINTER-CONTROL-HANDLE','PRINTER-HDC','PRINTER-NAME','PRINTER-PORT', + 'PRIVATE-DATA','PROCEDURE-NAME','PROGRESS-SOURCE','PROXY', + 'PROXY-PASSWORD','PROXY-USERID','PUBLIC-ID','PUBLISHED-EVENTS', + 'RADIO-BUTTONS','READ-ONLY','RECORD-LENGTH', + 'REFRESHABLE','RELATION-FIELDS','RELATIONS-ACTIVE','REMOTE', + 'REMOTE-HOST','REMOTE-PORT','RESIZABLE','RESIZE', + 'RESTART-ROWID','RETAIN-SHAPE','RETURN-INSERTED','RETURN-VALUE-DATA-TYPE', + 'ROLES','ROUNDED','COL','ROW','ROW-HEIGHT-CHARS', + 'ROW-HEIGHT-PIXELS','ROW-MARKERS','ROW-RESIZABLE','ROW-STATE', + 'SAVE-WHERE-STRING','SCHEMA-CHANGE','SCHEMA-LOCATION','SCHEMA-MARSHAL', + 'SCHEMA-PATH','SCREEN-LINES','SCREEN-VALUE','SCROLLABLE', + 'SCROLLBAR-HORIZONTAL','SCROLL-BARS','SCROLLBAR-VERTICAL','SEAL-TIMESTAMP', + 'SELECTABLE','SELECTED','SELECTION-END','SELECTION-START', + 'SELECTION-TEXT','SENSITIVE','SEPARATOR-FGCOLOR','SEPARATORS', + 'SERVER','SERVER-CONNECTION-BOUND','SERVER-CONNECTION-BOUND-REQUEST','SERVER-CONNECTION-CONTEXT', + 'SERVER-CONNECTION-ID','SERVER-OPERATING-MODE','SESSION-END','SESSION-ID', + 'SHOW-IN-TASKBAR','SIDE-LABEL-HANDLE','SIDE-LABELS','SKIP-DELETED-RECORD', + 'SMALL-ICON','SMALL-TITLE','SOAP-FAULT-ACTOR','SOAP-FAULT-CODE', + 'SOAP-FAULT-DETAIL','SOAP-FAULT-STRING','SORT','SORT-ASCENDING', + 'SORT-NUMBER','SSL-SERVER-NAME','STANDALONE','STARTUP-PARAMETERS', + 'STATE-DETAIL','STATUS-AREA','STATUS-AREA-FONT','STOPPED', + 'STREAM','STRETCH-TO-FIT','STRICT','STRING-VALUE', + 'SUBTYPE','SUPER-PROCEDURES','SUPPRESS-NAMESPACE-PROCESSING','SUPPRESS-WARNINGS', + 'SYMMETRIC-ENCRYPTION-ALGORITHM','SYMMETRIC-ENCRYPTION-IV','SYMMETRIC-ENCRYPTION-KEY','SYMMETRIC-SUPPORT', + 'system-ALERT-BOXES','system-ID','TABLE','TABLE-CRC-LIST', + 'TABLE-HANDLE','TABLE-LIST','TABLE-NUMBER','TAB-POSITION', + 'TAB-STOP','TEMP-DIRECTORY','TEXT-SELECTED','THREE-D', + 'TIC-MARKS','TIME-SOURCE','TITLE','TITLE-BGCOLOR','FIELD', + 'TITLE-DCOLOR','TITLE-FGCOLOR','TITLE-FONT','TOOLTIP', + 'TOOLTIPS','TOP-ONLY','TRACKING-CHANGES','TRANSACTION', + 'TRANS-INIT-PROCEDURE','TRANSPARENT','TYPE','UNIQUE-ID', + 'UNIQUE-MATCH','URL','URL-PASSWORD','URL-USERID','EXTENT', + 'USER-ID','V6DISPLAY','VALIDATE-EXPRESSION','VALIDATE-MESSAGE', + 'VALIDATE-XML','VALIDATION-ENABLED','VIEW-FIRST-COLUMN-ON-REOPEN', + 'VIRTUAL-HEIGHT-CHARS','VIRTUAL-HEIGHT-PIXELS','VIRTUAL-WIDTH-CHARS','VIRTUAL-WIDTH-PIXELS', + 'VISIBLE','WARNING','WHERE-STRING','widget-ENTER','DATE', + 'widget-LEAVE','WIDTH-CHARS','WIDTH-PIXELS','WINDOW-STATE', + 'WINDOW-system','WORD-WRAP','WORK-AREA-HEIGHT-PIXELS','WORK-AREA-WIDTH-PIXELS', + 'WORK-AREA-X','WORK-AREA-Y','WRITE-STATUS','X','widget-Handle', + 'X-DOCUMENT','XML-DATA-TYPE','XML-NODE-TYPE','XML-SCHEMA-PATH', + 'XML-SUPPRESS-NAMESPACE-PROCESSING','Y','YEAR-OFFSET','CHARACTER', + 'LONGCHAR','MEMPTR','CHAR','DEC','INT','LOG','DECI','INTE','LOGI','long' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', + '<', '>', '=', + '+', '-', '*', '/', + '!', '@', '%', '|', '$', + ':', '.', ';', ',', + '?', '<=','<>','>=', '\\' + ), + 'CASE_SENSITIVE' => array ( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false + ), + 'STYLES' => array ( + 'KEYWORDS' => array ( + 1 => 'color: #0000ff; font-weight: bold;', + 2 => 'color: #1D16B2;', + 3 => 'color: #993333;', + 4 => 'color: #0000ff;' + ), + 'COMMENTS' => array ( +// 1 => 'color: #808080; font-style: italic;', +// 2 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array ( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array ( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array ( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array ( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array ( + 0 => 'color: #006600;' + ), + 'SYMBOLS' => array ( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array ( + ), + 'SCRIPT' => array ( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 0 => ':' + ), + 'REGEXPS' => array ( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array ( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array ( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(? "(?![\-a-zA-Z0-9_%])", + 1 => array( + 'SPACE_AS_WHITESPACE' => true + ), + 2 => array( + 'SPACE_AS_WHITESPACE' => true + ) + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/prolog.php b/_piecrust/libs/Geshi/geshi/prolog.php new file mode 100644 index 0000000..7488497 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/prolog.php @@ -0,0 +1,143 @@ + 'Prolog', + 'COMMENT_SINGLE' => array(1 => '%'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'HARDQUOTE' => array("'", "'"), + 'HARDESCAPE' => array("\'"), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'NUMBERS' => + GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_FLT_SCI_ZERO, + 'KEYWORDS' => array( + 1 => array( + 'abolish','abs','arg','asserta','assertz','at_end_of_stream','atan', + 'atom','atom_chars','atom_codes','atom_concat','atom_length', + 'atomic','bagof','call','catch','ceiling','char_code', + 'char_conversion','clause','close','compound','consult','copy_term', + 'cos','current_char_conversion','current_input','current_op', + 'current_output','current_predicate','current_prolog_flag', + 'discontiguous','dynamic','ensure_loaded','exp','fail','findall', + 'float','float_fractional_part','float_integer_part','floor', + 'flush_output','functor','get_byte','get_char','get_code','halt', + 'include','initialization','integer','is','listing','log','mod', + 'multifile','nl','nonvar','notrace','number','number_chars', + 'number_codes','once','op','open','peek_byte','peek_char', + 'peek_code','put_byte','put_char','put_code','read','read_term', + 'rem','repeat','retract','round','set_input','set_output', + 'set_prolog_flag','set_stream_position','setof','sign','sin','sqrt', + 'stream_property','sub_atom','throw','trace','true','truncate', + 'unify_with_occurs_check','univ','var','write','write_canonical', + 'write_term','writeq' + ) + ), + 'SYMBOLS' => array( + 0 => array('(', ')', '[', ']', '{', '}',), + 1 => array('?-', ':-', '=:='), + 2 => array('\-', '\+', '\*', '\/'), + 3 => array('-', '+', '*', '/'), + 4 => array('.', ':', ',', ';'), + 5 => array('!', '@', '&', '|'), + 6 => array('<', '>', '=') + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #990000;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;', + 'HARD' => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #800080;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;', + 1 => 'color: #339933;', + 2 => 'color: #339933;', + 3 => 'color: #339933;', + 4 => 'color: #339933;', + 5 => 'color: #339933;', + 6 => 'color: #339933;' + ), + 'REGEXPS' => array( + 0 => 'color: #008080;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => 'http://pauillac.inria.fr/~deransar/prolog/bips.html' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + //Variables + 0 => "(? GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/properties.php b/_piecrust/libs/Geshi/geshi/properties.php new file mode 100644 index 0000000..ba91639 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/properties.php @@ -0,0 +1,127 @@ + 'PROPERTIES', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* Common used variables */ + 1 => array( + '${user.home}' + ), + ), + 'SYMBOLS' => array( + '[', ']', '=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'font-weight: bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => '' + ), + 'STRINGS' => array( + 0 => 'color: #933;' + ), + 'NUMBERS' => array( + 0 => '' + ), + 'METHODS' => array( + 0 => '' + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;' + ), + 'REGEXPS' => array( + 0 => 'color: #000080; font-weight:bold;', + 1 => 'color: #008000; font-weight:bold;' + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array( + 1 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + //Entry names + 0 => array( + GESHI_SEARCH => '^(\s*)([.a-zA-Z0-9_\-]+)(\s*=)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + //Entry values + 1 => array( + // Evil hackery to get around GeSHi bug: <>" and ; are added so s can be matched + // Explicit match on variable names because if a comment is before the first < of the span + // gets chewed up... + GESHI_SEARCH => '([<>";a-zA-Z0-9_]+\s*)=(.*)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1=', + GESHI_AFTER => '' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/providex.php b/_piecrust/libs/Geshi/geshi/providex.php new file mode 100644 index 0000000..d6aab00 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/providex.php @@ -0,0 +1,299 @@ + 'ProvideX', + 'COMMENT_SINGLE' => array(1 => '!'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + // Single-Line Comments using REM command + 2 => "/\bREM\b.*?$/i" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + // Directives + '*break', '*continue', '*end', '*escape', '*next', '*proceed', + '*retry', '*return', '*same', 'accept', 'add index', 'addr', + 'auto', 'begin', 'break', 'button', 'bye', 'call', 'case', + 'chart', 'check_box', 'class', 'clear', 'clip_board', 'close', + 'continue', 'control', 'create required', 'create table', + 'cwdir', 'data', 'day_format', 'def', 'default', 'defctl', + 'defprt', 'deftty', 'delete required', 'dictionary', 'dim', 'direct', + 'directory', 'disable', 'drop', 'drop_box', 'dump', 'edit', + 'else', 'enable', 'end switch', 'end', 'end_if', 'endtrace', + 'enter', 'erase', 'error_handler', 'escape', 'event', 'execute', + 'exit', 'exitto', 'extract', 'file', 'find', 'floating point', + 'for', 'function', 'get_file_box', 'gosub', 'goto', 'grid', + 'h_scrollbar', 'hide', 'if', 'index', 'indexed', 'input', + 'insert', 'invoke', 'iolist', 'keyed', 'let', 'like', + 'line_switch', 'list', 'list_box', 'load', 'local', 'lock', + 'long_form', 'menu_bar', 'merge', 'message_lib', 'mnemonic', + 'msgbox', 'multi_line', 'multi_media', 'next', 'object', 'obtain', + 'on', 'open', 'password', 'perform', 'pop', 'popup_menu', + 'precision', 'prefix', 'preinput', 'print', 'process', 'program', + 'property', 'purge', 'quit', 'radio_button', 'randomize', + 'read', 'record', 'redim', 'refile', 'release', 'rem', 'remove', + 'rename', 'renumber', 'repeat', 'reset', 'restore', 'retry', + 'return', 'round', 'run', 'save', 'select', 'serial', 'server', + 'set_focus', 'set_nbf', 'set_param', 'setctl', 'setday', 'setdev', + 'setdrive', 'seterr', 'setesc', 'setfid', 'setmouse', 'settime', + 'settrace', 'short_form', 'show', 'sort', 'start', 'static', + 'step', 'stop', 'switch', 'system_help', 'system_jrnl', 'table', + 'then', 'to', 'translate', 'tristate_box', 'unlock', 'until', + 'update', 'user_lex', 'v_scrollbar', 'vardrop_box', 'varlist_box', + 'via', 'video_palette', 'wait', 'wend', 'while', 'winprt_setup', + 'with', 'write' + ), + 2 => array( + // System Functions + '@x', '@y', 'abs', 'acs', 'and', 'arg', 'asc', 'asn', 'ath', + 'atn', 'bin', 'bsz', 'chg', 'chr', 'cmp', 'cos', 'cpl', + 'crc', 'cse', 'ctl', 'cvs', 'dec', 'dir', 'dll', 'dsk', + 'dte', 'env', 'ept', 'err', 'evn', 'evs', 'exp', 'ffn', + 'fib', 'fid', 'fin', 'fpt', 'gap', 'gbl', 'gep', 'hsa', + 'hsh', 'hta', 'hwn', 'i3e', 'ind', 'int', 'iol', 'ior', + 'jul', 'jst', 'kec', 'kef', 'kel', 'ken', 'kep', 'key', + 'kgn', 'lcs', 'len', 'lno', 'log', 'lrc', 'lst', 'max', + 'mem', 'mid', 'min', 'mnm', 'mod', 'msg', 'msk', 'mxc', + 'mxl', 'new', 'not', 'nul', 'num', 'obj', 'opt', 'pad', + 'pck', 'pfx', 'pgm', 'pos', 'prc', 'prm', 'pth', 'pub', + 'rcd', 'rdx', 'rec', 'ref', 'rnd', 'rno', 'sep', 'sgn', + 'sin', 'sqr', 'srt', 'ssz', 'stk', 'stp', 'str', 'sub', + 'swp', 'sys', 'tan', 'tbl', 'tcb', 'tmr', 'trx', 'tsk', + 'txh', 'txw', 'ucp', 'ucs', 'upk', 'vin', 'vis', 'xeq', + 'xfa', 'xor', '_obj' + ), + 3 => array( + // System Variables + // Vars that are duplicates of functions + // 'ctl', 'err', 'pfx', 'prm', 'rnd', 'sep', 'sys', + 'bkg', 'chn', 'day', 'dlm', 'dsz', 'eom', 'ers', 'esc', + 'gfn', 'gid', 'hfn', 'hlp', 'hwd', 'lfa', 'lfo', 'lip', + 'lpg', 'lwd', 'mse', 'msl', 'nar', 'nid', 'pgn', 'psz', + 'quo', 'ret', 'sid', 'ssn', 'tim', 'tme', 'tms', 'tsm', + 'uid', 'unt', 'who' + + ), + 4 => array( + // Nomads Variables + '%Flmaint_Lib$', '%Flmaint_Msg$', '%Nomads_Activation_Ok', + '%Nomads_Auto_Qry', '%Nomads_Disable_Debug', + '%Nomads_Disable_Trace', '%Nomads_Fkey_Handler$', + '%Nomads_Fkey_Tbl$', '%Nomads_Notest', '%Nomads_Onexit$', + '%Nomads_Post_Display', '%Nomads_Pre_Display$', + '%Nomads_Process$', '%Nomads_Trace_File$', + '%Nomad_Actv_Folder_Colors$', '%Nomad_Automation_Enabled', + '%Nomad_Auto_Close', '%Nomad_Center_Wdw', '%Nomad_Concurrent_Wdw', + '%Nomad_Custom_Define', '%Nomad_Custom_Dir$', + '%Nomad_Custom_Genmtc', '%Nomad_Custom_Skip_Definition', + '%Nomad_Def_Sfx$', '%Nomad_Enter_Tab', '%Nomad_Esc_Sel', + '%Nomad_Isjavx', '%Nomad_Iswindx', '%Nomad_Iswindx$', + '%Nomad_Menu$', '%Nomad_Menu_Leftedge_Clr$', + '%Nomad_Menu_Textbackground_Clr$', '%Nomad_Mln_Sep$', + '%Nomad_Msgmnt$', '%Nomad_Noplusw', '%Nomad_No_Customize', + '%Nomad_Object_Persistence', '%Nomad_Object_Resize', + '%Nomad_Open_Load', '%Nomad_Override_Font$', + '%Nomad_Palette_Loaded', '%Nomad_Panel_Info_Force', + '%Nomad_Panel_Info_Prog$', '%Nomad_Pnl_Def_Colour$', + '%Nomad_Pnl_Def_Font$', '%Nomad_Prg_Cache', '%Nomad_Qry_Attr$', + '%Nomad_Qry_Btn$', '%Nomad_Qry_Clear_Start', '%Nomad_Qry_Tip$', + '%Nomad_Qry_Wide', '%Nomad_Query_Clear_Status', '%Nomad_Query_Kno', + '%Nomad_Query_No_Gray', '%Nomad_Query_Odb_Ignore', + '%Nomad_Query_Retkno', '%Nomad_Query_Sbar_Max', + '%Nomad_Relative_Wdw', '%Nomad_Save_Qry_Path', '%Nomad_Script_Fn', + '%Nomad_Script_Log', '%Nomad_Script_Wdw', + '%Nomad_Skip_Change_Logic', '%Nomad_Skip_Onselect_Logic', + '%Nomad_Stk$', '%Nomad_Tab_Dir', '%Nomad_Timeout', + '%Nomad_Turbo_Off', '%Nomad_Visual_Effect', + '%Nomad_Visual_Override', '%Nomad_Win_Ver', '%Nomad_Xchar', + '%Nomad_Xmax', '%Nomad_Ychar', '%Nomad_Ymax', '%Scr_Def_Attr$', + '%Scr_Def_H_Fl$', '%Scr_Def_H_Id$', '%Scr_Lib', '%Scr_Lib$', + '%Z__Usr_Sec$', 'Alternate_Panel$', 'Alternate_Panel_Type$', + 'Arg_1$', 'Arg_10$', 'Arg_11$', 'Arg_12$', 'Arg_13$', 'Arg_14$', + 'Arg_15$', 'Arg_16$', 'Arg_17$', 'Arg_18$', 'Arg_19$', 'Arg_2$', + 'Arg_20$', 'Arg_3$', 'Arg_4$', 'Arg_5$', 'Arg_6$', 'Arg_7$', + 'Arg_8$', 'Arg_9$', 'Change_Flg', 'Cmd_Str$', 'Default_Prog$', + 'Disp_Cmd$', 'Entire_Record$', 'Exit_Cmd$', 'Fldr_Default_Prog$', + 'Folder_Id$', 'Id', 'Id$', 'Ignore_Exit', 'Initialize_Flg', + 'Init_Text$', 'Init_Val$', 'Main_Scrn_K$', 'Mnu_Ln$', + 'Next_Folder', 'Next_Id', 'Next_Id$', 'No_Flush', 'Prime_Key$', + 'Prior_Val', 'Prior_Val$', 'Qry_Val$', 'Refresh_Flg', + 'Replacement_Folder$', 'Replacement_Lib$', 'Replacement_Scrn$', + 'Scrn_Id$', 'Scrn_K$', 'Scrn_Lib$', 'Tab_Table$', '_Eom$' + ), + 5 => array( + // Mnemonics + "'!w'", "'*c'", "'*h'", "'*i'", "'*o'", "'*r'", "'*x'", + "'+b'", "'+d'", "'+e'", "'+f'", "'+i'", "'+n'", + "'+p'", "'+s'", "'+t'", "'+u'", "'+v'", "'+w'", "'+x'", + "'+z'", "'-b'", "'-d'", "'-e'", "'-f'", "'-i'", + "'-n'", "'-p'", "'-s'", "'-t'", "'-u'", "'-v'", "'-w'", + "'-x'", "'-z'", "'2d'", "'3d'", "'4d'", "'@@'", "'ab'", + "'arc'", "'at'", "'backgr'", "'bb'", "'be'", "'beep'", + "'bg'", "'bi'", "'bj'", "'bk'", "'black'", "'blue'", + "'bm'", "'bo'", "'box'", "'br'", "'bs'", "'bt'", "'bu'", + "'bw'", "'bx'", "'caption'", "'ce'", "'cf'", "'ch'", + "'ci'", "'circle'", "'cl'", "'colour'", "'cp'", "'cpi'", + "'cr'", "'cs'", "'cursor'", "'cyan''_cyan'", "'dc'", + "'default'", "'df'", "'dialogue'", "'dn'", "'do'", + "'drop'", "'eb'", "'ee'", "'ef'", "'eg'", "'ei'", "'ej'", + "'el'", "'em'", "'eo'", "'ep'", "'er'", "'es'", "'et'", + "'eu'", "'ew'", "'ff'", "'fill'", "'fl'", "'font'", + "'frame'", "'gd'", "'ge'", "'gf'", "'goto'", "'green'", + "'gs'", "'hide'", "'ic'", "'image'", "'jc'", + "'jd'", "'jl'", "'jn'", "'jr'", "'js'", "'l6'", "'l8'", + "'lc'", "'ld'", "'lf'", "'li'", "'line'", "'lm'", + "'lpi'", "'lt'", "'magenta'", "'maxsize'", "'me'", + "'message'", "'minsize'", "'mn'", "'mode'", + "'move'", "'mp'", "'ms'", "'ni'", "'offset'", "'option'", + "'pe'", "'pen'", "'picture'", "'pie'", "'pm'", "'polygon'", + "'pop'", "'ps'", "'push'", "'rb'", "'rc'", "'rectangle'", + "'red'", "'rl'", "'rm'", "'rp'", "'rs'", "'rt'", "'sb'", + "'scroll'", "'sd'", "'se'", "'sf'", "'show'", "'size'", + "'sl'", "'sn'", "'sp'", "'sr'", "'swap'", "'sx'", "'text'", + "'textwdw'", "'tr'", "'tw'", "'uc'", "'up'", "'vt'", "'wa'", + "'wc'", "'wd'", "'wg'", "'white'", "'window'", "'wm'", + "'wp'", "'wr'", "'wrap'", "'ws'", "'wx'", "'xp'", "'yellow'", + "'zx'", "'_black'", "'_blue'", "'_colour'", "'_green'", + "'_magenta'", "'_red'", "'_white'", "'_yellow'" + ), + ), + 'SYMBOLS' => array( + 0 => array('+', '-', '*', '/', '^', '|'), + 1 => array('++', '--', '+=', '-=', '*=', '/=', '^=', '|='), + 2 => array('<', '>', '='), + 3 => array('(', ')', '[', ']', '{', '}'), + 4 => array(',', '@', ';', '\\') + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: navy;', // Directives + 2 => 'color: blue;', // System Functions + 3 => 'color: blue;', // System Variables + 4 => 'color: #6A5ACD; font-style: italic;', // Nomads Global Variables + 5 => 'color: #BDB76B;', // Mnemonics + ), + 'COMMENTS' => array( + 1 => 'color: #008080; font-style: italic;', + 2 => 'color: #008080;', + 'MULTI' => 'color: #008080; font-style: italic;' + ), + 'BRACKETS' => array( + 0 => 'color: #000066;' + ), + 'STRINGS' => array( + 0 => 'color: green;' + ), + 'NUMBERS' => array( + 0 => 'color: #00008B;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;', + 1 => 'color: #000099;', + 2 => 'color: #000099;', + 3 => 'color: #0000C9;', + 4 => 'color: #000099;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + 1 => 'color: #006400; font-weight: bold', + 2 => 'color: #6A5ACD;' + ) + ), + 'URLS' => array( + 1 => 'http://www.allbasic.info./wiki/index.php/PX:Directive_{FNAME}', + 2 => 'http://www.allbasic.info./wiki/index.php/PX:System_function_{FNAME}', + 3 => 'http://www.allbasic.info./wiki/index.php/PX:System_variable_{FNAME}', + 4 => 'http://www.allbasic.info./wiki/index.php/PX:Nomads_{FNAME}', + 5 => 'http://www.allbasic.info./wiki/index.php/PX:Mnemonic_{FNAMEU}' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => "'" + ), + 'REGEXPS' => array( + 1 => array( + // Line Labels + GESHI_SEARCH => '([[:space:]])([a-zA-Z_][a-zA-Z0-9_]+)(:)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + 2 => array( + // Global String Variables + GESHI_SEARCH => '(\%)([a-zA-Z_][a-zA-Z0-9_]+)(\$)', + GESHI_REPLACE => '\\1\\2\\3', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'NUMBERS' => GESHI_NEVER + ) + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/purebasic.php b/_piecrust/libs/Geshi/geshi/purebasic.php new file mode 100644 index 0000000..c3cfc08 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/purebasic.php @@ -0,0 +1,303 @@ + 'PureBasic', + 'COMMENT_SINGLE' => array( 1 => ";" ), + 'COMMENT_MULTI' => array( ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + // Keywords + 'And', 'As', 'Break', 'CallDebugger', 'Case', 'CompilerCase', 'CompilerDefault', 'CompilerElse', 'CompilerEndIf', 'CompilerEndSelect', + 'CompilerError', 'CompilerIf', 'CompilerSelect', 'Continue', 'Data', 'DataSection', 'EndDataSection', 'Debug', 'DebugLevel', 'Declare', + 'DeclareCDLL', 'DeclareDLL', 'Default', 'Define', 'Dim', 'DisableASM', 'DisableDebugger', 'DisableExplicit', 'Else', 'ElseIf', 'EnableASM', + 'EnableDebugger', 'EnableExplicit', 'End', 'EndEnumeration', 'EndIf', 'EndImport', 'EndInterface', 'EndMacro', 'EndProcedure', + 'EndSelect', 'EndStructure', 'EndStructureUnion', 'EndWith', 'Enumeration', 'Extends', 'FakeReturn', 'For', 'Next', 'ForEach', + 'ForEver', 'Global', 'Gosub', 'Goto', 'If', 'Import', 'ImportC', 'IncludeBinary', 'IncludeFile', 'IncludePath', 'Interface', 'Macro', + 'NewList', 'Not', 'Or', 'Procedure', 'ProcedureC', 'ProcedureCDLL', 'ProcedureDLL', 'ProcedureReturn', 'Protected', 'Prototype', + 'PrototypeC', 'Read', 'ReDim', 'Repeat', 'Until', 'Restore', 'Return', 'Select', 'Shared', 'Static', 'Step', 'Structure', 'StructureUnion', + 'Swap', 'To', 'Wend', 'While', 'With', 'XIncludeFile', 'XOr' + ), + 2 => array( + // All Functions + 'Abs', 'ACos', 'Add3DArchive', 'AddBillboard', 'AddDate', 'AddElement', 'AddGadgetColumn', 'AddGadgetItem', + 'AddKeyboardShortcut', 'AddMaterialLayer', 'AddPackFile', 'AddPackMemory', 'AddStatusBarField', 'AddSysTrayIcon', + 'AllocateMemory', 'AmbientColor', 'AnimateEntity', 'Asc', 'ASin', 'ATan', 'AudioCDLength', 'AudioCDName', 'AudioCDStatus', + 'AudioCDTrackLength', 'AudioCDTracks', 'AudioCDTrackSeconds', 'AvailableProgramOutput', 'AvailableScreenMemory', + 'BackColor', 'Base64Decoder', 'Base64Encoder', 'BillboardGroupLocate', 'BillboardGroupMaterial', 'BillboardGroupX', + 'BillboardGroupY', 'BillboardGroupZ', 'BillboardHeight', 'BillboardLocate', 'BillboardWidth', 'BillboardX', 'BillboardY', 'BillboardZ', + 'Bin', 'BinQ', 'Blue', 'Box', 'ButtonGadget', 'ButtonImageGadget', 'CalendarGadget', 'CallCFunction', 'CallCFunctionFast', + 'CallFunction', 'CallFunctionFast', 'CameraBackColor', 'CameraFOV', 'CameraLocate', 'CameraLookAt', 'CameraProjection', + 'CameraRange', 'CameraRenderMode', 'CameraX', 'CameraY', 'CameraZ', 'CatchImage', 'CatchSound', 'CatchSprite', + 'CatchXML', 'ChangeAlphaIntensity', 'ChangeCurrentElement', 'ChangeGamma', 'ChangeListIconGadgetDisplay', + 'ChangeSysTrayIcon', 'CheckBoxGadget', 'CheckEntityCollision', 'CheckFilename', 'ChildXMLNode', 'Chr', 'Circle', + 'ClearBillboards', 'ClearClipboard', 'ClearConsole', 'ClearError', 'ClearGadgetItemList', 'ClearList', 'ClearScreen', 'ClipSprite', + 'CloseConsole', 'CloseDatabase', 'CloseFile', 'CloseGadgetList', 'CloseHelp', 'CloseLibrary', 'CloseNetworkConnection', + 'CloseNetworkServer', 'ClosePack', 'ClosePreferences', 'CloseProgram', 'CloseScreen', 'CloseSubMenu', 'CloseWindow', + 'ColorRequester', 'ComboBoxGadget', 'CompareMemory', 'CompareMemoryString', 'ConnectionID', 'ConsoleColor', + 'ConsoleCursor', 'ConsoleError', 'ConsoleLocate', 'ConsoleTitle', 'ContainerGadget', 'CopyDirectory', 'CopyEntity', + 'CopyFile', 'CopyImage', 'CopyLight', 'CopyMaterial', 'CopyMemory', 'CopyMemoryString', 'CopyMesh', 'CopySprite', + 'CopyTexture', 'CopyXMLNode', 'Cos', 'CountBillboards', 'CountGadgetItems', 'CountLibraryFunctions', 'CountList', + 'CountMaterialLayers', 'CountProgramParameters', 'CountRenderedTriangles', 'CountString', 'CRC32Fingerprint', + 'CreateBillboardGroup', 'CreateCamera', 'CreateDirectory', 'CreateEntity', 'CreateFile', 'CreateGadgetList', + 'CreateImage', 'CreateLight', 'CreateMaterial', 'CreateMenu', 'CreateMesh', 'CreateMutex', 'CreateNetworkServer', + 'CreatePack', 'CreatePalette', 'CreateParticleEmitter', 'CreatePopupMenu', 'CreatePreferences', 'CreateSprite', + 'CreateSprite3D', 'CreateStatusBar', 'CreateTerrain', 'CreateTexture', 'CreateThread', 'CreateToolBar', 'CreateXML', + 'CreateXMLNode', 'DatabaseColumnName', 'DatabaseColumns', 'DatabaseColumnType', 'DatabaseDriverDescription', + 'DatabaseDriverName', 'DatabaseError', 'DatabaseQuery', 'DatabaseUpdate', 'Date', 'DateGadget', 'Day', 'DayOfWeek', + 'DayOfYear', 'DefaultPrinter', 'Defined', 'Delay', 'DeleteDirectory', 'DeleteElement', 'DeleteFile', 'DeleteXMLNode', + 'DESFingerprint', 'DesktopDepth', 'DesktopFrequency', 'DesktopHeight', 'DesktopMouseX', 'DesktopMouseY', 'DesktopName', + 'DesktopWidth', 'DirectoryEntryAttributes', 'DirectoryEntryDate', 'DirectoryEntryName', 'DirectoryEntrySize', + 'DirectoryEntryType', 'DisableGadget', 'DisableMaterialLighting', 'DisableMenuItem', 'DisableToolBarButton', 'DisableWindow', + 'DisASMCommand', 'DisplayAlphaSprite', 'DisplayPalette', 'DisplayPopupMenu', 'DisplayRGBFilter', 'DisplayShadowSprite', + 'DisplaySolidSprite', 'DisplaySprite', 'DisplaySprite3D', 'DisplayTranslucentSprite', 'DisplayTransparentSprite', 'DragFiles', + 'DragImage', 'DragOSFormats', 'DragPrivate', 'DragText', 'DrawAlphaImage', 'DrawImage', 'DrawingBuffer', + 'DrawingBufferPitch', 'DrawingBufferPixelFormat', 'DrawingFont', 'DrawingMode', 'DrawText', 'EditorGadget', + 'egrid_AddColumn', 'egrid_AddRows', 'egrid_AppendCells', 'egrid_ClearRows', 'egrid_CopyCells', + 'egrid_CreateCellCallback', 'egrid_CreateGrid', 'egrid_DeleteCells', 'egrid_FastDeleteCells', 'egrid_FreeGrid', + 'egrid_GetCellSelection', 'egrid_GetCellText', 'egrid_GetColumnOrderArray', 'egrid_HasSelectedCellChanged', 'egrid_Height', + 'egrid_HideEdit', 'egrid_HideGrid', 'egrid_MakeCellVisible', 'egrid_NumberOfColumns', 'egrid_NumberOfRows', + 'egrid_PasteCells', 'egrid_Register', 'egrid_RemoveCellCallback', 'egrid_RemoveColumn', 'egrid_RemoveRow', 'egrid_Resize', + 'egrid_SelectCell', 'egrid_SelectedColumn', 'egrid_SelectedRow', 'egrid_SetCellSelection', 'egrid_SetCellText', + 'egrid_SetColumnOrderArray', 'egrid_SetHeaderFont', 'egrid_SetHeaderHeight', 'egrid_SetOption', 'egrid_Width', 'egrid_x', + 'egrid_y', 'EjectAudioCD', 'ElapsedMilliseconds', 'Ellipse', 'EnableGadgetDrop', 'EnableGraphicalConsole', + 'EnableWindowDrop', 'EnableWorldCollisions', 'EnableWorldPhysics', 'Engine3DFrameRate', 'EntityAngleX', + 'EntityAnimationLength', 'EntityLocate', 'EntityMaterial', 'EntityMesh', 'EntityPhysicBody', 'EntityRenderMode', + 'EntityX', 'EntityY', 'EntityZ', 'EnvironmentVariableName', 'EnvironmentVariableValue', 'Eof', 'EventClient', + 'EventDropAction', 'EventDropBuffer', 'EventDropFiles', 'EventDropImage', 'EventDropPrivate', 'EventDropSize', + 'EventDropText', 'EventDropType', 'EventDropX', 'EventDropY', 'EventGadget', 'EventlParam', 'EventMenu', 'EventServer', + 'EventType', 'EventWindow', 'EventwParam', 'ExamineDatabaseDrivers', 'ExamineDesktops', 'ExamineDirectory', + 'ExamineEnvironmentVariables', 'ExamineIPAddresses', 'ExamineJoystick', 'ExamineKeyboard', 'ExamineLibraryFunctions', + 'ExamineMouse', 'ExaminePreferenceGroups', 'ExaminePreferenceKeys', 'ExamineScreenModes', 'ExamineWorldCollisions', + 'ExamineXMLAttributes', 'ExplorerComboGadget', 'ExplorerListGadget', 'ExplorerTreeGadget', 'ExportXML', + 'ExportXMLSize', 'FileBuffersSize', 'FileID', 'FileSeek', 'FileSize', 'FillArea', 'FindString', 'FinishDirectory', + 'FirstDatabaseRow', 'FirstElement', 'FirstWorldCollisionEntity', 'FlipBuffers', 'FlushFileBuffers', 'Fog', 'FontID', + 'FontRequester', 'FormatDate', 'FormatXML', 'Frame3DGadget', 'FreeBillboardGroup', 'FreeCamera', 'FreeEntity', + 'FreeFont', 'FreeGadget', 'FreeImage', 'FreeLight', 'FreeMaterial', 'FreeMemory', 'FreeMenu', 'FreeMesh', + 'FreeModule', 'FreeMovie', 'FreeMutex', 'FreePalette', 'FreeParticleEmitter', 'FreeSound', 'FreeSprite', + 'FreeSprite3D', 'FreeStatusBar', 'FreeTexture', 'FreeToolBar', 'FreeXML', 'FrontColor', 'GadgetHeight', 'GadgetID', + 'GadgetItemID', 'GadgetToolTip', 'GadgetType', 'GadgetWidth', 'GadgetX', 'GadgetY', 'GetActiveGadget', + 'GetActiveWindow', 'GetClientIP', 'GetClientPort', 'GetClipboardImage', 'GetClipboardText', 'GetCurrentDirectory', + 'GetCurrentEIP', 'GetDatabaseDouble', 'GetDatabaseFloat', 'GetDatabaseLong', 'GetDatabaseQuad', 'GetDatabaseString', + 'GetDisASMString', 'GetEntityAnimationTime', 'GetEntityFriction', 'GetEntityMass', 'GetEnvironmentVariable', + 'GetErrorAddress', 'GetErrorCounter', 'GetErrorDescription', 'GetErrorDLL', 'GetErrorLineNR', 'GetErrorModuleName', + 'GetErrorNumber', 'GetErrorRegister', 'GetExtensionPart', 'GetFileAttributes', 'GetFileDate', 'GetFilePart', 'GetFunction', + 'GetFunctionEntry', 'GetGadgetAttribute', 'GetGadgetColor', 'GetGadgetData', 'GetGadgetFont', + 'GetGadgetItemAttribute', 'GetGadgetItemColor', 'GetGadgetItemData', 'GetGadgetItemState', 'GetGadgetItemText', + 'GetGadgetState', 'GetGadgetText', 'GetHomeDirectory', 'GetMenuItemState', 'GetMenuItemText', 'GetMenuTitleText', + 'GetModulePosition', 'GetModuleRow', 'GetPaletteColor', 'GetPathPart', 'GetTemporaryDirectory', + 'GetToolBarButtonState', 'GetWindowColor', 'GetWindowState', 'GetWindowTitle', 'GetXMLAttribute', 'GetXMLEncoding', + 'GetXMLNodeName', 'GetXMLNodeOffset', 'GetXMLNodeText', 'GetXMLStandalone', 'GoToEIP', 'GrabImage', 'GrabSprite', + 'Green', 'Hex', 'HexQ', 'HideBillboardGroup', 'HideEntity', 'HideGadget', 'HideLight', 'HideMenu', 'HideParticleEmitter', + 'HideWindow', 'Hostname', 'Hour', 'HyperLinkGadget', 'ImageDepth', 'ImageGadget', 'ImageHeight', 'ImageID', + 'ImageOutput', 'ImageWidth', 'InitAudioCD', 'InitEngine3D', 'InitJoystick', 'InitKeyboard', 'InitMouse', 'InitMovie', + 'InitNetwork', 'InitPalette', 'InitScintilla', 'InitSound', 'InitSprite', 'InitSprite3D', 'Inkey', 'Input', 'InputRequester', + 'InsertElement', 'Int', 'IntQ', 'IPAddressField', 'IPAddressGadget', 'IPString', 'IsBillboardGroup', 'IsCamera', 'IsDatabase', + 'IsDirectory', 'IsEntity', 'IsFile', 'IsFont', 'IsGadget', 'IsImage', 'IsLibrary', 'IsLight', 'IsMaterial', 'IsMenu', 'IsMesh', + 'IsModule', 'IsMovie', 'IsPalette', 'IsParticleEmitter', 'IsProgram', 'IsScreenActive', 'IsSound', 'IsSprite', 'IsSprite3D', + 'IsStatusBar', 'IsSysTrayIcon', 'IsTexture', 'IsThread', 'IsToolBar', 'IsWindow', 'IsXML', 'JoystickAxisX', 'JoystickAxisY', + 'JoystickButton', 'KeyboardInkey', 'KeyboardMode', 'KeyboardPushed', 'KeyboardReleased', 'KillProgram', 'KillThread', + 'LastElement', 'LCase', 'Left', 'Len', 'LibraryFunctionAddress', 'LibraryFunctionName', 'LibraryID', 'LightColor', + 'LightLocate', 'LightSpecularColor', 'Line', 'LineXY', 'ListIconGadget', 'ListIndex', 'ListViewGadget', 'LoadFont', + 'LoadImage', 'LoadMesh', 'LoadModule', 'LoadMovie', 'LoadPalette', 'LoadSound', 'LoadSprite', 'LoadTexture', + 'LoadWorld', 'LoadXML', 'Loc', 'LockMutex', 'Lof', 'Log', 'Log10', 'LSet', 'LTrim', 'MainXMLNode', 'MakeIPAddress', + 'MaterialAmbientColor', 'MaterialBlendingMode', 'MaterialDiffuseColor', 'MaterialFilteringMode', 'MaterialID', + 'MaterialShadingMode', 'MaterialSpecularColor', 'MD5FileFingerprint', 'MD5Fingerprint', 'MDIGadget', 'MemorySize', + 'MemoryStringLength', 'MenuBar', 'MenuHeight', 'MenuID', 'MenuItem', 'MenuTitle', 'MeshID', 'MessageRequester', + 'Mid', 'Minute', 'ModuleVolume', 'Month', 'MouseButton', 'MouseDeltaX', 'MouseDeltaY', 'MouseLocate', 'MouseWheel', + 'MouseX', 'MouseY', 'MoveBillboard', 'MoveBillboardGroup', 'MoveCamera', 'MoveEntity', 'MoveLight', 'MoveMemory', + 'MoveParticleEmitter', 'MoveXMLNode', 'MovieAudio', 'MovieHeight', 'MovieInfo', 'MovieLength', 'MovieSeek', + 'MovieStatus', 'MovieWidth', 'NetworkClientEvent', 'NetworkServerEvent', 'NewPrinterPage', 'NextDatabaseDriver', + 'NextDatabaseRow', 'NextDirectoryEntry', 'NextElement', 'NextEnvironmentVariable', 'NextIPAddress', + 'NextLibraryFunction', 'NextPackFile', 'NextPreferenceGroup', 'NextPreferenceKey', 'NextScreenMode', + 'NextSelectedFileName', 'NextWorldCollision', 'NextXMLAttribute', 'NextXMLNode', 'OffsetOf', 'OnErrorExit', + 'OnErrorGosub', 'OnErrorGoto', 'OnErrorResume', 'OpenComPort', 'OpenConsole', 'OpenDatabase', + 'OpenDatabaseRequester', 'OpenFile', 'OpenFileRequester', 'OpenGadgetList', 'OpenHelp', 'OpenLibrary', + 'OpenNetworkConnection', 'OpenPack', 'OpenPreferences', 'OpenScreen', 'OpenSubMenu', 'OpenWindow', + 'OpenWindowedScreen', 'OptionGadget', 'OSVersion', 'PackerCallback', 'PackFileSize', 'PackMemory', 'PanelGadget', + 'ParentXMLNode', 'Parse3DScripts', 'ParseDate', 'ParticleColorFader', 'ParticleColorRange', 'ParticleEmissionRate', + 'ParticleEmitterDirection', 'ParticleEmitterLocate', 'ParticleEmitterX', 'ParticleEmitterY', 'ParticleEmitterZ', + 'ParticleMaterial', 'ParticleSize', 'ParticleTimeToLive', 'ParticleVelocity', 'PathRequester', 'PauseAudioCD', + 'PauseMovie', 'PauseThread', 'PeekB', 'PeekC', 'PeekD', 'PeekF', 'PeekL', 'PeekQ', 'PeekS', 'PeekW', 'PlayAudioCD', + 'PlayModule', 'PlayMovie', 'PlaySound', 'Plot', 'Point', 'PokeB', 'PokeC', 'PokeD', 'PokeF', 'PokeL', 'PokeQ', 'PokeS', + 'PokeW', 'Pow', 'PreferenceComment', 'PreferenceGroup', 'PreferenceGroupName', 'PreferenceKeyName', + 'PreferenceKeyValue', 'PreviousDatabaseRow', 'PreviousElement', 'PreviousXMLNode', 'Print', 'PrinterOutput', + 'PrinterPageHeight', 'PrinterPageWidth', 'PrintN', 'PrintRequester', 'ProgramExitCode', 'ProgramFilename', + 'ProgramID', 'ProgramParameter', 'ProgramRunning', 'ProgressBarGadget', 'Random', 'RandomSeed', 'RawKey', + 'ReadByte', 'ReadCharacter', 'ReadConsoleData', 'ReadData', 'ReadDouble', 'ReadFile', 'ReadFloat', 'ReadLong', + 'ReadPreferenceDouble', 'ReadPreferenceFloat', 'ReadPreferenceLong', 'ReadPreferenceQuad', + 'ReadPreferenceString', 'ReadProgramData', 'ReadProgramError', 'ReadProgramString', 'ReadQuad', 'ReadString', + 'ReadStringFormat', 'ReadWord', 'ReAllocateMemory', 'ReceiveNetworkData', 'ReceiveNetworkFile', 'Red', + 'Reg_DeleteEmptyKey', 'Reg_DeleteKey', 'Reg_DeleteValue', 'Reg_GetErrorMsg', 'Reg_GetErrorNr', + 'Reg_GetValueTyp', 'Reg_ListSubKey', 'Reg_ListSubValue', 'Reg_ReadBinary', 'Reg_ReadExpandString', + 'Reg_ReadLong', 'Reg_ReadMultiLineString', 'Reg_ReadQuad', 'Reg_ReadString', 'Reg_WriteBinary', + 'Reg_WriteExpandString', 'Reg_WriteLong', 'Reg_WriteMultiLineString', 'Reg_WriteQuad', 'Reg_WriteString', + 'ReleaseMouse', 'RemoveBillboard', 'RemoveEnvironmentVariable', 'RemoveGadgetColumn', 'RemoveGadgetItem', + 'RemoveKeyboardShortcut', 'RemoveMaterialLayer', 'RemovePreferenceGroup', 'RemovePreferenceKey', + 'RemoveString', 'RemoveSysTrayIcon', 'RemoveXMLAttribute', 'RenameFile', 'RenderMovieFrame', 'RenderWorld', + 'ReplaceString', 'ResetList', 'ResizeBillboard', 'ResizeEntity', 'ResizeGadget', 'ResizeImage', 'ResizeMovie', + 'ResizeParticleEmitter', 'ResizeWindow', 'ResolveXMLAttributeName', 'ResolveXMLNodeName', 'ResumeAudioCD', + 'ResumeMovie', 'ResumeThread', 'RGB', 'Right', 'RootXMLNode', 'RotateBillboardGroup', 'RotateCamera', + 'RotateEntity', 'RotateMaterial', 'RotateSprite3D', 'Round', 'RSet', 'RTrim', 'RunProgram', 'SaveFileRequester', + 'SaveImage', 'SaveSprite', 'SaveXML', 'ScaleEntity', 'ScaleMaterial', 'ScintillaGadget', 'ScintillaSendMessage', + 'ScreenID', 'ScreenModeDepth', 'ScreenModeHeight', 'ScreenModeRefreshRate', 'ScreenModeWidth', + 'ScreenOutput', 'ScrollAreaGadget', 'ScrollBarGadget', 'ScrollMaterial', 'Second', 'SecondWorldCollisionEntity', + 'SelectedFilePattern', 'SelectedFontColor', 'SelectedFontName', 'SelectedFontSize', 'SelectedFontStyle', + 'SelectElement', 'SendNetworkData', 'SendNetworkFile', 'SendNetworkString', 'SetActiveGadget', + 'SetActiveWindow', 'SetClipboardImage', 'SetClipboardText', 'SetCurrentDirectory', 'SetDragCallback', + 'SetDropCallback', 'SetEntityAnimationTime', 'SetEntityFriction', 'SetEntityMass', 'SetEnvironmentVariable', + 'SetErrorNumber', 'SetFileAttributes', 'SetFileDate', 'SetFrameRate', 'SetGadgetAttribute', 'SetGadgetColor', + 'SetGadgetData', 'SetGadgetFont', 'SetGadgetItemAttribute', 'SetGadgetItemColor', 'SetGadgetItemData', + 'SetGadgetItemState', 'SetGadgetItemText', 'SetGadgetState', 'SetGadgetText', 'SetMenuItemState', + 'SetMenuItemText', 'SetMenuTitleText', 'SetMeshData', 'SetModulePosition', 'SetPaletteColor', 'SetRefreshRate', + 'SetToolBarButtonState', 'SetWindowCallback', 'SetWindowColor', 'SetWindowState', 'SetWindowTitle', + 'SetXMLAttribute', 'SetXMLEncoding', 'SetXMLNodeName', 'SetXMLNodeOffset', 'SetXMLNodeText', + 'SetXMLStandalone', 'Sin', 'SizeOf', 'SkyBox', 'SkyDome', 'SmartWindowRefresh', 'SortArray', 'SortList', + 'SortStructuredArray', 'SortStructuredList', 'SoundFrequency', 'SoundPan', 'SoundVolume', 'Space', + 'SpinGadget', 'SplitterGadget', 'Sprite3DBlendingMode', 'Sprite3DQuality', 'SpriteCollision', 'SpriteDepth', + 'SpriteHeight', 'SpriteID', 'SpriteOutput', 'SpritePixelCollision', 'SpriteWidth', 'Sqr', 'Start3D', 'StartDrawing', + 'StartPrinting', 'StartSpecialFX', 'StatusBarHeight', 'StatusBarIcon', 'StatusBarID', 'StatusBarText', + 'StickyWindow', 'Stop3D', 'StopAudioCD', 'StopDrawing', 'StopModule', 'StopMovie', 'StopPrinting', + 'StopSound', 'StopSpecialFX', 'Str', 'StrD', 'StrF', 'StringByteLength', 'StringField', 'StringGadget', 'StrQ', + 'StrU', 'Subsystem', 'SwapElements', 'SysTrayIconToolTip', 'Tan', 'TerrainHeight', 'TextGadget', 'TextHeight', + 'TextureHeight', 'TextureID', 'TextureOutput', 'TextureWidth', 'TextWidth', 'ThreadID', 'ThreadPriority', + 'ToolBarHeight', 'ToolBarID', 'ToolBarImageButton', 'ToolBarSeparator', 'ToolBarStandardButton', + 'ToolBarToolTip', 'TrackBarGadget', 'TransformSprite3D', 'TransparentSpriteColor', 'TreeGadget', 'Trim', + 'TruncateFile', 'TryLockMutex', 'UCase', 'UnlockMutex', 'UnpackMemory', 'UseAudioCD', 'UseBuffer', + 'UseGadgetList', 'UseJPEGImageDecoder', 'UseJPEGImageEncoder', 'UseODBCDatabase', 'UseOGGSoundDecoder', + 'UsePNGImageDecoder', 'UsePNGImageEncoder', 'UseTGAImageDecoder', 'UseTIFFImageDecoder', 'Val', 'ValD', + 'ValF', 'ValQ', 'WaitProgram', 'WaitThread', 'WaitWindowEvent', 'WebGadget', 'WebGadgetPath', 'WindowEvent', + 'WindowHeight', 'WindowID', 'WindowMouseX', 'WindowMouseY', 'WindowOutput', 'WindowWidth', 'WindowX', + 'WindowY', 'WorldGravity', 'WorldShadows', 'WriteByte', 'WriteCharacter', 'WriteConsoleData', 'WriteData', + 'WriteDouble', 'WriteFloat', 'WriteLong', 'WritePreferenceDouble', 'WritePreferenceFloat', 'WritePreferenceLong', + 'WritePreferenceQuad', 'WritePreferenceString', 'WriteProgramData', 'WriteProgramString', 'WriteProgramStringN', + 'WriteQuad', 'WriteString', 'WriteStringFormat', 'WriteStringN', 'WriteWord', 'XMLAttributeName', 'XMLAttributeValue', + 'XMLChildCount', 'XMLError', 'XMLErrorLine', 'XMLErrorPosition', 'XMLNodeFromID', 'XMLNodeFromPath', 'XMLNodePath', + 'XMLNodeType', 'XMLStatus', 'Year', 'ZoomSprite3D' + ), + 3 => array( + // some ASM instructions + 'AAA', 'AAD', 'AAM', 'AAS', 'ADC', 'ADD', 'AND', 'ARPL', 'BOUND', 'BSF', 'BSR', 'BSWAP', 'BT', 'BTC', 'BTR', + 'BTS', 'CALL', 'CBW', 'CDQ', 'CLC', 'CLD', 'CLI', 'CLTS', 'CMC', 'CMP', 'CMPS', 'CMPXCHG', 'CWD', 'CWDE', + 'DAA', 'DAS', 'DB', 'DD', 'DEC', 'DIV', 'DW', 'ENTER', 'ESC', 'F2XM1', 'FABS', 'FADD', 'FCHS', 'FCLEX', + 'FCOM', 'FDIV', 'FDIVR', 'FFREE', 'FINCSTP', 'FINIT', 'FLD', 'FLD1', 'FLDCW', 'FMUL', 'FNOP', 'FPATAN', + 'FPREM', 'FRNDINT', 'FSAVE', 'FSCALE', 'FSETPM', 'FSIN', 'FSQRT', 'FST', 'FSTENV', 'FSTSW', 'FSUB', + 'FSUBR', 'FTST', 'FUCOM', 'FWAIT', 'FXAM', 'FXCH', 'FXTRACT', 'FYL2X', 'FYL2XP1', 'HLT', 'IDIV', 'IMUL', + 'IN', 'INC', 'INS', 'INT', 'INTO', 'INVLPG', 'IRET', 'IRETD', 'JA', 'JAE', 'JB', 'JBE', 'JC', 'JCXZ', 'JE', 'JECXZ', + 'JG', 'JGE', 'JL', 'JLE', 'JMP', 'JNA', 'JNAE', 'JNB', 'JNBE', 'JNC', 'JNE', 'JNG', 'JNGE', 'JNL', 'JNLE', 'JNO', 'JNP', + 'JNS', 'JNZ', 'JO', 'JP', 'JPE', 'JPO', 'JS', 'JZ', 'LAHF', 'LAR', 'LDS', 'LEA', 'LEAVE', 'LES', 'LFS', 'LGDT', 'LGS', + 'LIDT', 'LLDT', 'LMSW', 'LOCK', 'LODS', 'LOOP', 'LOOPE', 'LOOPNE', 'LOOPNZ', 'LOOPZ', 'LSL', 'LSS', 'LTR', + 'MOV', 'MOVS', 'MOVSX', 'MOVZX', 'MUL', 'NEG', 'NOP', 'NOT', 'OR', 'OUT', 'OUTS', 'POP', 'POPA', 'POPAD', + 'POPF', 'POPFD', 'PUSH', 'PUSHA', 'PUSHAD', 'PUSHF', 'PUSHFD', 'RCL', 'RCR', 'REP', 'REPE', 'REPNE', + 'REPNZ', 'REPZ', 'RET', 'RETF', 'ROL', 'ROR', 'SAHF', 'SAL', 'SAR', 'SBB', 'SCAS', 'SETAE', 'SETB', 'SETBE', + 'SETC', 'SETE', 'SETG', 'SETGE', 'SETL', 'SETLE', 'SETNA', 'SETNAE', 'SETNB', 'SETNC', 'SETNE', 'SETNG', + 'SETNGE', 'SETNL', 'SETNLE', 'SETNO', 'SETNP', 'SETNS', 'SETNZ', 'SETO', 'SETP', 'SETPE', 'SETPO', + 'SETS', 'SETZ', 'SGDT', 'SHL', 'SHLD', 'SHR', 'SHRD', 'SIDT', 'SLDT', 'SMSW', 'STC', 'STD', 'STI', + 'STOS', 'STR', 'SUB', 'TEST', 'VERR', 'VERW', 'WAIT', 'WBINVD', 'XCHG', 'XLAT', 'XLATB', 'XOR' + ) + ), + 'SYMBOLS' => array( + '(', ')', '+', '-', '*', '/', '\\', '>', '<', '=', '<=', '>=', '&', '|', '!', '~', '<>', '>>', '<<', '%' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000066; font-weight: bold;', + 2 => 'color: #0000ff;', + 3 => 'color: #000fff;' + ), + 'COMMENTS' => array( + 1 => 'color: #ff0000; font-style: italic;', + 'MULTI' => 'color: #ff0000; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000066;' + ), + 'STRINGS' => array( + 0 => 'color: #009900;' + ), + 'NUMBERS' => array( + 0 => 'color: #CC0000;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000066;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + 1 => '\\' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => false, + 1 => false + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/python.php b/_piecrust/libs/Geshi/geshi/python.php new file mode 100644 index 0000000..0db4632 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/python.php @@ -0,0 +1,237 @@ + 'Python', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + //Longest quotemarks ALWAYS first + 'QUOTEMARKS' => array('"""', '"', "'"), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + + /* + ** Set 1: reserved words + ** http://python.org/doc/current/ref/keywords.html + */ + 1 => array( + 'and', 'del', 'for', 'is', 'raise', 'assert', 'elif', 'from', 'lambda', 'return', 'break', + 'else', 'global', 'not', 'try', 'class', 'except', 'if', 'or', 'while', 'continue', 'exec', + 'import', 'pass', 'yield', 'def', 'finally', 'in', 'print', 'with', 'as' + ), + + /* + ** Set 2: builtins + ** http://python.org/doc/current/lib/built-in-funcs.html + */ + 2 => array( + '__import__', 'abs', 'basestring', 'bool', 'callable', 'chr', 'classmethod', 'cmp', + 'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile', + 'file', 'filter', 'float', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', + 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'list', 'locals', + 'long', 'map', 'max', 'min', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'range', + 'raw_input', 'reduce', 'reload', 'reversed', 'round', 'set', 'setattr', 'slice', + 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode', + 'vars', 'xrange', 'zip', + // Built-in constants: http://python.org/doc/current/lib/node35.html + 'False', 'True', 'None', 'NotImplemented', 'Ellipsis', + // Built-in Exceptions: http://python.org/doc/current/lib/module-exceptions.html + 'Exception', 'StandardError', 'ArithmeticError', 'LookupError', 'EnvironmentError', + 'AssertionError', 'AttributeError', 'EOFError', 'FloatingPointError', 'IOError', + 'ImportError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'MemoryError', 'NameError', + 'NotImplementedError', 'OSError', 'OverflowError', 'ReferenceError', 'RuntimeError', + 'StopIteration', 'SyntaxError', 'SystemError', 'SystemExit', 'TypeError', + 'UnboundlocalError', 'UnicodeError', 'UnicodeEncodeError', 'UnicodeDecodeError', + 'UnicodeTranslateError', 'ValueError', 'WindowsError', 'ZeroDivisionError', 'Warning', + 'UserWarning', 'DeprecationWarning', 'PendingDeprecationWarning', 'SyntaxWarning', + 'RuntimeWarning', 'FutureWarning', + // self: this is a common python convention (but not a reserved word) + 'self', + // other + 'any', 'all' + ), + + /* + ** Set 3: standard library + ** http://python.org/doc/current/lib/modindex.html + */ + 3 => array( + '__builtin__', '__future__', '__main__', '_winreg', 'aifc', 'AL', 'al', 'anydbm', + 'array', 'asynchat', 'asyncore', 'atexit', 'audioop', 'base64', 'BaseHTTPServer', + 'Bastion', 'binascii', 'binhex', 'bisect', 'bsddb', 'bz2', 'calendar', 'cd', 'cgi', + 'CGIHTTPServer', 'cgitb', 'chunk', 'cmath', 'cmd', 'code', 'codecs', 'codeop', + 'collections', 'colorsys', 'commands', 'compileall', 'compiler', + 'ConfigParser', 'Cookie', 'cookielib', 'copy', 'copy_reg', 'cPickle', 'crypt', + 'cStringIO', 'csv', 'curses', 'datetime', 'dbhash', 'dbm', 'decimal', 'DEVICE', + 'difflib', 'dircache', 'dis', 'distutils', 'dl', 'doctest', 'DocXMLRPCServer', 'dumbdbm', + 'dummy_thread', 'dummy_threading', 'email', 'encodings', 'errno', 'exceptions', 'fcntl', + 'filecmp', 'fileinput', 'FL', 'fl', 'flp', 'fm', 'fnmatch', 'formatter', 'fpectl', + 'fpformat', 'ftplib', 'gc', 'gdbm', 'getopt', 'getpass', 'gettext', 'GL', 'gl', 'glob', + 'gopherlib', 'grp', 'gzip', 'heapq', 'hmac', 'hotshot', 'htmlentitydefs', 'htmllib', + 'HTMLParser', 'httplib', 'imageop', 'imaplib', 'imgfile', 'imghdr', 'imp', 'inspect', + 'itertools', 'jpeg', 'keyword', 'linecache', 'locale', 'logging', 'mailbox', 'mailcap', + 'marshal', 'math', 'md5', 'mhlib', 'mimetools', 'mimetypes', 'MimeWriter', 'mimify', + 'mmap', 'msvcrt', 'multifile', 'mutex', 'netrc', 'new', 'nis', 'nntplib', 'operator', + 'optparse', 'os', 'ossaudiodev', 'parser', 'pdb', 'pickle', 'pickletools', 'pipes', + 'pkgutil', 'platform', 'popen2', 'poplib', 'posix', 'posixfile', 'pprint', 'profile', + 'pstats', 'pty', 'pwd', 'py_compile', 'pyclbr', 'pydoc', 'Queue', 'quopri', 'random', + 're', 'readline', 'repr', 'resource', 'rexec', 'rfc822', 'rgbimg', 'rlcompleter', + 'robotparser', 'sched', 'ScrolledText', 'select', 'sets', 'sgmllib', 'sha', 'shelve', + 'shlex', 'shutil', 'signal', 'SimpleHTTPServer', 'SimpleXMLRPCServer', 'site', 'smtpd', + 'smtplib', 'sndhdr', 'socket', 'SocketServer', 'stat', 'statcache', 'statvfs', 'string', + 'StringIO', 'stringprep', 'struct', 'subprocess', 'sunau', 'SUNAUDIODEV', 'sunaudiodev', + 'symbol', 'sys', 'syslog', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'termios', + 'test', 'textwrap', 'thread', 'threading', 'time', 'timeit', 'Tix', 'Tkinter', 'token', + 'tokenize', 'traceback', 'tty', 'turtle', 'types', 'unicodedata', 'unittest', 'urllib2', + 'urllib', 'urlparse', 'user', 'UserDict', 'UserList', 'UserString', 'uu', 'warnings', + 'wave', 'weakref', 'webbrowser', 'whichdb', 'whrandom', 'winsound', 'xdrlib', 'xml', + 'xmllib', 'xmlrpclib', 'zipfile', 'zipimport', 'zlib', + // Python 3.0 + 'bytes', 'bytearray' + ), + + /* + ** Set 4: special methods + ** http://python.org/doc/current/ref/specialnames.html + */ + 4 => array( + /* + // Iterator types: http://python.org/doc/current/lib/typeiter.html + '__iter__', 'next', + // String types: http://python.org/doc/current/lib/string-methods.html + 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', + 'find', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', + 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rjust', + 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', + 'translate', 'upper', 'zfill', + */ + // Basic customization: http://python.org/doc/current/ref/customization.html + '__new__', '__init__', '__del__', '__repr__', '__str__', + '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__cmp__', '__rcmp__', + '__hash__', '__nonzero__', '__unicode__', '__dict__', + // Attribute access: http://python.org/doc/current/ref/attribute-access.html + '__setattr__', '__delattr__', '__getattr__', '__getattribute__', '__get__', '__set__', + '__delete__', '__slots__', + // Class creation, callable objects + '__metaclass__', '__call__', + // Container types: http://python.org/doc/current/ref/sequence-types.html + '__len__', '__getitem__', '__setitem__', '__delitem__', '__iter__', '__contains__', + '__getslice__', '__setslice__', '__delslice__', + // Numeric types: http://python.org/doc/current/ref/numeric-types.html + '__abs__','__add__','__and__','__coerce__','__div__','__divmod__','__float__', + '__hex__','__iadd__','__isub__','__imod__','__idiv__','__ipow__','__iand__', + '__ior__','__ixor__', '__ilshift__','__irshift__','__invert__','__int__', + '__long__','__lshift__', + '__mod__','__mul__','__neg__','__oct__','__or__','__pos__','__pow__', + '__radd__','__rdiv__','__rdivmod__','__rmod__','__rpow__','__rlshift__','__rrshift__', + '__rshift__','__rsub__','__rmul__','__rand__','__rxor__','__ror__', + '__sub__','__xor__' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?', '`' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #ff7700;font-weight:bold;', // Reserved + 2 => 'color: #008000;', // Built-ins + self + 3 => 'color: #dc143c;', // Standard lib + 4 => 'color: #0000cd;' // Special methods + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: black;' + ), + 'STRINGS' => array( + 0 => 'color: #483d8b;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff4500;' + ), + 'METHODS' => array( + 1 => 'color: black;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/q.php b/_piecrust/libs/Geshi/geshi/q.php new file mode 100644 index 0000000..fa3717c --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/q.php @@ -0,0 +1,149 @@ +) + * ------------------------- + * - Fix the handling of single line comments + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'q/kdb+', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + 2 => '/ \s\/.*/', # This needs to get fixed up, since it won't catch some instances + # Multi line comments (Moved from REGEXPS) + 3 => '/^\/\s*?\n.*?\n\\\s*?\n/smi' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array(), + 'TAB_WIDTH' => 4, + 'KEYWORDS' => array( + 1 => array( + 'abs', 'acos', 'all', 'and', 'any', 'asc', 'asin', 'asof', 'atan', 'attr', 'avg', 'avgs', 'bin', 'ceiling', + 'cols', 'cor', 'cos', 'count', 'cov', 'cross', 'cut', 'deltas', 'desc', 'dev', 'differ', 'distinct', + 'div', 'each', 'enlist', 'eval', 'except', 'exec', 'exit', 'exp', 'fills', 'first', 'flip', 'floor', + 'fkeys', 'get', 'getenv', 'group', 'gtime', 'hclose', 'hcount', 'hdel', 'hopen', 'hsym', 'iasc', 'idesc', + 'in', 'insert', 'inter', 'inv', 'joins', 'key', 'keys', 'last', 'like', 'load', 'log', 'lower', + 'lsq', 'ltime', 'ltrim', 'mavg', 'max', 'maxs', 'mcount', 'md5', 'mdev', 'med', 'meta', 'min', 'mins', + 'mmax', 'mmin', 'mmu', 'mod', 'msum', 'neg', 'next', 'not', 'null', 'or', 'over', 'parse', 'peach', + 'plist', 'prd', 'prds', 'prev', 'rand', 'rank', 'ratios', 'raze', 'read0', 'read1', 'reciprocal', + 'reverse', 'rload', 'rotate', 'rsave', 'rtrim', 'save', 'scan', 'set', 'setenv', 'show', 'signum', + 'sin', 'sqrt', 'ss', 'ssr', 'string', 'sublist', 'sum', 'sums', 'sv', 'system', 'tables', 'tan', 'til', 'trim', + 'txf', 'type', 'ungroup', 'union', 'upper', 'upsert', 'value', 'var', 'view', 'views', 'vs', + 'wavg', 'within', 'wsum', 'xasc', 'xbar', 'xcol', 'xcols', 'xdesc', 'xexp', 'xgroup', 'xkey', + 'xlog', 'xprev', 'xrank' + ), + # kdb database template keywords + 2 => array( + 'aj', 'by', 'delete', 'fby', 'from', 'ij', 'lj', 'pj', 'select', 'uj', 'update', 'where', 'wj', + ), + ), + 'SYMBOLS' => array( + '?', '#', ',', '_', '@', '.', '^', '~', '$', '!', '\\', '\\', '/:', '\:', "'", "':", '::', '+', '-', '%', '*' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #009900; font-weight: bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #666666; font-style: italic;', + 3 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 1 => 'color: #000099; font-weight: bold;', + 2 => 'color: #660099; font-weight: bold;', + 3 => 'color: #660099; font-weight: bold;', + 4 => 'color: #660099; font-weight: bold;', + 5 => 'color: #006699; font-weight: bold;', + 'HARD' => '', + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #990000;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000dd;', + GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;', + GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', + GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', + GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;', + GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;', + GESHI_NUMBER_FLT_NONSCI => 'color:#800080;' + ), + 'METHODS' => array( + 1 => 'color: #202020;', + 2 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( + 2 => 'color: #999900;', + ), + 'SCRIPT' => array( + ) + ), + 'REGEXPS' => array( + # Symbols + 2 => '`[^\s"]*', + ), + 'URLS' => array( + 1 => '', + 2 => '', + ), +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/qbasic.php b/_piecrust/libs/Geshi/geshi/qbasic.php new file mode 100644 index 0000000..e7d12ff --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/qbasic.php @@ -0,0 +1,158 @@ + 'QBasic/QuickBASIC', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + //Single-Line Comments using REM command + 2 => "/\bREM.*?$/i", + //Line numbers + 3 => "/^\s*\d+/im" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'DO', 'LOOP', 'WHILE', 'WEND', 'THEN', 'ELSE', 'ELSEIF', 'IF', + 'FOR', 'TO', 'NEXT', 'STEP', 'GOTO', 'GOSUB', 'CALL', 'CALLS', + 'SUB', 'FUNCTION', 'RETURN', 'RESUME', 'SELECT', 'CASE', 'UNTIL' + ), + 3 => array( + 'ABS', 'ABSOLUTE', 'ACCESS', 'ALIAS', 'AND', 'ANY', 'APPEND', 'AS', 'ASC', 'ATN', + 'BASE', 'BEEP', 'BINARY', 'BLOAD', 'BSAVE', 'BYVAL', + 'CDBL', 'CDECL', 'CHAIN', 'CHDIR', 'CHR$', 'CINT', 'CIRCLE', 'CLEAR', + 'CLNG', 'CLOSE', 'CLS', 'COM', 'COMMAND$', 'COMMON', 'CONST', 'COS', 'CSNG', + 'CSRLIN', 'CVD', 'CVDMBF', 'CVI', 'CVL', 'CVS', 'CVSMDF', 'DATA', 'DATE$', + 'DECLARE', 'DEF', 'FN', 'SEG', 'DEFDBL', 'DEFINT', 'DEFLNG', 'DEFSNG', 'DEFSTR', + 'DIM', 'DOUBLE', 'DRAW', 'END', 'ENVIRON', 'ENVIRON$', 'EOF', 'EQV', 'ERASE', + 'ERDEV', 'ERDEV$', 'ERL', 'ERR', 'ERROR', 'EXIT', 'EXP', 'FIELD', 'FILEATTR', + 'FILES', 'FIX', 'FRE', 'FREEFILE', 'GET', 'HEX$', 'IMP', 'INKEY$', + 'INP', 'INPUT', 'INPUT$', 'INSTR', 'INT', 'INTEGER', 'IOCTL', 'IOCTL$', 'IS', + 'KEY', 'KILL', 'LBOUND', 'LCASE$', 'LEFT$', 'LEN', 'LET', 'LINE', 'LIST', 'LOC', + 'LOCAL', 'LOCATE', 'LOCK', 'LOF', 'LOG', 'LONG', 'LPOS', 'LPRINT', + 'LSET', 'LTRIM$', 'MID$', 'MKD$', 'MKDIR', 'MKDMBF$', 'MKI$', 'MKL$', + 'MKS$', 'MKSMBF$', 'MOD', 'NAME', 'NOT', 'OCT$', 'OFF', 'ON', 'PEN', 'PLAY', + 'OPEN', 'OPTION', 'OR', 'OUT', 'OUTPUT', + 'PAINT', 'PALETTE', 'PCOPY', 'PEEK', 'PMAP', 'POINT', 'POKE', 'POS', 'PRESET', + 'PRINT', 'PSET', 'PUT', 'RANDOM', 'RANDOMIZE', 'READ', 'REDIM', 'RESET', + 'RESTORE', 'RIGHT$', 'RMDIR', 'RND', 'RSET', 'RTRIM$', 'RUN', 'SADD', 'SCREEN', + 'SEEK', 'SETMEM', 'SGN', 'SHARED', 'SHELL', 'SIGNAL', 'SIN', 'SINGLE', 'SLEEP', + 'SOUND', 'SPACE$', 'SPC', 'SQR', 'STATIC', 'STICK', 'STOP', 'STR$', 'STRIG', + 'STRING', 'STRING$', 'SWAP', 'SYSTEM', 'TAB', 'TAN', 'TIME$', 'TIMER', + 'TROFF', 'TRON', 'TYPE', 'UBOUND', 'UCASE$', 'UEVENT', 'UNLOCK', 'USING', 'VAL', + 'VARPTR', 'VARPTR$', 'VARSEG', 'VIEW', 'WAIT', 'WIDTH', 'WINDOW', 'WRITE', 'XOR' + ) + ), + 'SYMBOLS' => array( + '(', ')', ',', '+', '-', '*', '/', '=', '<', '>', '^' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 3 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #a1a100;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080;', + 2 => 'color: #808080;', + 3 => 'color: #8080C0;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + 1 => 'color: #cc66cc;', + 2 => 'color: #339933;' + ) + ), + 'URLS' => array( + 1 => '', + 3 => 'http://www.qbasicnews.com/qboho/qck{FNAMEL}.shtml' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 1 => '&(?:H[0-9a-fA-F]+|O[0-7]+)(?!\w)', + 2 => '#[0-9]+(?!\w)' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/rails.php b/_piecrust/libs/Geshi/geshi/rails.php new file mode 100644 index 0000000..1982c67 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/rails.php @@ -0,0 +1,406 @@ + 'Rails', + 'COMMENT_SINGLE' => array(1 => "#"), + 'COMMENT_MULTI' => array("=begin" => "=end"), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', '`','\''), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'alias', 'and', 'begin', 'break', 'case', 'class', + 'def', 'defined', 'do', 'else', 'elsif', 'end', + 'ensure', 'for', 'if', 'in', 'module', 'while', + 'next', 'not', 'or', 'redo', 'rescue', 'yield', + 'retry', 'super', 'then', 'undef', 'unless', + 'until', 'when', 'BEGIN', 'END', 'include' + ), + 2 => array( + '__FILE__', '__LINE__', 'false', 'nil', 'self', 'true', + 'return' + ), + 3 => array( + 'Array', 'Float', 'Integer', 'String', 'at_exit', + 'autoload', 'binding', 'caller', 'catch', 'chop', 'chop!', + 'chomp', 'chomp!', 'eval', 'exec', 'exit', 'exit!', 'fail', + 'fork', 'format', 'gets', 'global_variables', 'gsub', 'gsub!', + 'iterator?', 'lambda', 'load', 'local_variables', 'loop', + 'open', 'p', 'print', 'printf', 'proc', 'putc', 'puts', + 'raise', 'rand', 'readline', 'readlines', 'require', 'select', + 'sleep', 'split', 'sprintf', 'srand', 'sub', 'sub!', 'syscall', + 'system', 'trace_var', 'trap', 'untrace_var' + ), + 4 => array( + 'Abbrev', 'ArgumentError', 'Base64', 'Benchmark', + 'Benchmark::Tms', 'Bignum', 'Binding', 'CGI', 'CGI::Cookie', + 'CGI::HtmlExtension', 'CGI::QueryExtension', + 'CGI::Session', 'CGI::Session::FileStore', + 'CGI::Session::MemoryStore', 'Class', 'Comparable', 'Complex', + 'ConditionVariable', 'Continuation', 'Data', + 'Date', 'DateTime', 'Delegator', 'Dir', 'EOFError', 'ERB', + 'ERB::Util', 'Enumerable', 'Enumerable::Enumerator', 'Errno', + 'Exception', 'FalseClass', 'File', + 'File::Constants', 'File::Stat', 'FileTest', 'FileUtils', + 'FileUtils::DryRun', 'FileUtils::NoWrite', + 'FileUtils::StreamUtils_', 'FileUtils::Verbose', 'Find', + 'Fixnum', 'FloatDomainError', 'Forwardable', 'GC', 'Generator', + 'Hash', 'IO', 'IOError', 'Iconv', 'Iconv::BrokenLibrary', + 'Iconv::Failure', 'Iconv::IllegalSequence', + 'Iconv::InvalidCharacter', 'Iconv::InvalidEncoding', + 'Iconv::OutOfRange', 'IndexError', 'Interrupt', 'Kernel', + 'LoadError', 'LocalJumpError', 'Logger', 'Logger::Application', + 'Logger::Error', 'Logger::Formatter', 'Logger::LogDevice', + 'Logger::LogDevice::LogDeviceMutex', 'Logger::Severity', + 'Logger::ShiftingError', 'Marshal', 'MatchData', + 'Math', 'Matrix', 'Method', 'Module', 'Mutex', 'NameError', + 'NameError::message', 'NilClass', 'NoMemoryError', + 'NoMethodError', 'NotImplementedError', 'Numeric', 'Object', + 'ObjectSpace', 'Observable', 'PStore', 'PStore::Error', + 'Pathname', 'Precision', 'Proc', 'Process', 'Process::GID', + 'Process::Status', 'Process::Sys', 'Process::UID', 'Queue', + 'Range', 'RangeError', 'Rational', 'Regexp', 'RegexpError', + 'RuntimeError', 'ScriptError', 'SecurityError', 'Set', + 'Shellwords', 'Signal', 'SignalException', 'SimpleDelegator', + 'SingleForwardable', 'Singleton', 'SingletonClassMethods', + 'SizedQueue', 'SortedSet', 'StandardError', 'StringIO', + 'StringScanner', 'StringScanner::Error', 'Struct', 'Symbol', + 'SyncEnumerator', 'SyntaxError', 'SystemCallError', + 'SystemExit', 'SystemStackError', 'Tempfile', + 'Test::Unit::TestCase', 'Test::Unit', 'Test', 'Thread', + 'ThreadError', 'ThreadGroup', + 'ThreadsWait', 'Time', 'TrueClass', 'TypeError', 'URI', + 'URI::BadURIError', 'URI::Error', 'URI::Escape', 'URI::FTP', + 'URI::Generic', 'URI::HTTP', 'URI::HTTPS', + 'URI::InvalidComponentError', 'URI::InvalidURIError', + 'URI::LDAP', 'URI::MailTo', 'URI::REGEXP', + 'URI::REGEXP::PATTERN', 'UnboundMethod', 'Vector', 'YAML', + 'ZeroDivisionError', 'Zlib', + 'Zlib::BufError', 'Zlib::DataError', 'Zlib::Deflate', + 'Zlib::Error', 'Zlib::GzipFile', 'Zlib::GzipFile::CRCError', + 'Zlib::GzipFile::Error', 'Zlib::GzipFile::LengthError', + 'Zlib::GzipFile::NoFooter', 'Zlib::GzipReader', + 'Zlib::GzipWriter', 'Zlib::Inflate', 'Zlib::MemError', + 'Zlib::NeedDict', 'Zlib::StreamEnd', 'Zlib::StreamError', + 'Zlib::VersionError', + 'Zlib::ZStream', + 'ActionController::AbstractRequest', + 'ActionController::Assertions::DomAssertions', + 'ActionController::Assertions::ModelAssertions', + 'ActionController::Assertions::ResponseAssertions', + 'ActionController::Assertions::RoutingAssertions', + 'ActionController::Assertions::SelectorAssertions', + 'ActionController::Assertions::TagAssertions', + 'ActionController::Base', + 'ActionController::Benchmarking::ClassMethods', + 'ActionController::Caching', + 'ActionController::Caching::Actions', + 'ActionController::Caching::Actions::ActionCachePath', + 'ActionController::Caching::Fragments', + 'ActionController::Caching::Pages', + 'ActionController::Caching::Pages::ClassMethods', + 'ActionController::Caching::Sweeping', + 'ActionController::Components', + 'ActionController::Components::ClassMethods', + 'ActionController::Components::InstanceMethods', + 'ActionController::Cookies', + 'ActionController::Filters::ClassMethods', + 'ActionController::Flash', + 'ActionController::Flash::FlashHash', + 'ActionController::Helpers::ClassMethods', + 'ActionController::Integration::Session', + 'ActionController::IntegrationTest', + 'ActionController::Layout::ClassMethods', + 'ActionController::Macros', + 'ActionController::Macros::AutoComplete::ClassMethods', + 'ActionController::Macros::InPlaceEditing::ClassMethods', + 'ActionController::MimeResponds::InstanceMethods', + 'ActionController::Pagination', + 'ActionController::Pagination::ClassMethods', + 'ActionController::Pagination::Paginator', + 'ActionController::Pagination::Paginator::Page', + 'ActionController::Pagination::Paginator::Window', + 'ActionController::Rescue', 'ActionController::Resources', + 'ActionController::Routing', + 'ActionController::Scaffolding::ClassMethods', + 'ActionController::SessionManagement::ClassMethods', + 'ActionController::Streaming', 'ActionController::TestProcess', + 'ActionController::TestUploadedFile', + 'ActionController::UrlWriter', + 'ActionController::Verification::ClassMethods', + 'ActionMailer::Base', 'ActionView::Base', + 'ActionView::Helpers::ActiveRecordHelper', + 'ActionView::Helpers::AssetTagHelper', + 'ActionView::Helpers::BenchmarkHelper', + 'ActionView::Helpers::CacheHelper', + 'ActionView::Helpers::CaptureHelper', + 'ActionView::Helpers::DateHelper', + 'ActionView::Helpers::DebugHelper', + 'ActionView::Helpers::FormHelper', + 'ActionView::Helpers::FormOptionsHelper', + 'ActionView::Helpers::FormTagHelper', + 'ActionView::Helpers::JavaScriptHelper', + 'ActionView::Helpers::JavaScriptMacrosHelper', + 'ActionView::Helpers::NumberHelper', + 'ActionView::Helpers::PaginationHelper', + 'ActionView::Helpers::PrototypeHelper', + 'ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods', + 'ActionView::Helpers::ScriptaculousHelper', + 'ActionView::Helpers::TagHelper', + 'ActionView::Helpers::TextHelper', + 'ActionView::Helpers::UrlHelper', 'ActionView::Partials', + 'ActionWebService::API::Method', 'ActionWebService::Base', + 'ActionWebService::Client::Soap', + 'ActionWebService::Client::XmlRpc', + 'ActionWebService::Container::ActionController::ClassMethods', + 'ActionWebService::Container::Delegated::ClassMethods', + 'ActionWebService::Container::Direct::ClassMethods', + 'ActionWebService::Invocation::ClassMethods', + 'ActionWebService::Scaffolding::ClassMethods', + 'ActionWebService::SignatureTypes', 'ActionWebService::Struct', + 'ActiveRecord::Acts::List::ClassMethods', + 'ActiveRecord::Acts::List::InstanceMethods', + 'ActiveRecord::Acts::NestedSet::ClassMethods', + 'ActiveRecord::Acts::NestedSet::InstanceMethods', + 'ActiveRecord::Acts::Tree::ClassMethods', + 'ActiveRecord::Acts::Tree::InstanceMethods', + 'ActiveRecord::Aggregations::ClassMethods', + 'ActiveRecord::Associations::ClassMethods', + 'ActiveRecord::AttributeMethods::ClassMethods', + 'ActiveRecord::Base', + 'ActiveRecord::Calculations::ClassMethods', + 'ActiveRecord::Callbacks', + 'ActiveRecord::ConnectionAdapters::AbstractAdapter', + 'ActiveRecord::ConnectionAdapters::Column', + 'ActiveRecord::ConnectionAdapters::DB2Adapter', + 'ActiveRecord::ConnectionAdapters::DatabaseStatements', + 'ActiveRecord::ConnectionAdapters::FirebirdAdapter', + 'ActiveRecord::ConnectionAdapters::FrontBaseAdapter', + 'ActiveRecord::ConnectionAdapters::MysqlAdapter', + 'ActiveRecord::ConnectionAdapters::OpenBaseAdapter', + 'ActiveRecord::ConnectionAdapters::OracleAdapter', + 'ActiveRecord::ConnectionAdapters::PostgreSQLAdapter', + 'ActiveRecord::ConnectionAdapters::Quoting', + 'ActiveRecord::ConnectionAdapters::SQLServerAdapter', + 'ActiveRecord::ConnectionAdapters::SQLiteAdapter', + 'ActiveRecord::ConnectionAdapters::SchemaStatements', + 'ActiveRecord::ConnectionAdapters::SybaseAdapter::ColumnWithIdentity', + 'ActiveRecord::ConnectionAdapters::SybaseAdapterContext', + 'ActiveRecord::ConnectionAdapters::TableDefinition', + 'ActiveRecord::Errors', 'ActiveRecord::Locking', + 'ActiveRecord::Locking::Optimistic', + 'ActiveRecord::Locking::Optimistic::ClassMethods', + 'ActiveRecord::Locking::Pessimistic', + 'ActiveRecord::Migration', 'ActiveRecord::Observer', + 'ActiveRecord::Observing::ClassMethods', + 'ActiveRecord::Reflection::ClassMethods', + 'ActiveRecord::Reflection::MacroReflection', + 'ActiveRecord::Schema', 'ActiveRecord::Timestamp', + 'ActiveRecord::Transactions::ClassMethods', + 'ActiveRecord::Validations', + 'ActiveRecord::Validations::ClassMethods', + 'ActiveRecord::XmlSerialization', + 'ActiveSupport::CachingTools::HashCaching', + 'ActiveSupport::CoreExtensions::Array::Conversions', + 'ActiveSupport::CoreExtensions::Array::Grouping', + 'ActiveSupport::CoreExtensions::Date::Conversions', + 'ActiveSupport::CoreExtensions::Hash::Conversions', + 'ActiveSupport::CoreExtensions::Hash::Conversions::ClassMethods', + 'ActiveSupport::CoreExtensions::Hash::Diff', + 'ActiveSupport::CoreExtensions::Hash::Keys', + 'ActiveSupport::CoreExtensions::Hash::ReverseMerge', + 'ActiveSupport::CoreExtensions::Integer::EvenOdd', + 'ActiveSupport::CoreExtensions::Integer::Inflections', + 'ActiveSupport::CoreExtensions::Numeric::Bytes', + 'ActiveSupport::CoreExtensions::Numeric::Time', + 'ActiveSupport::CoreExtensions::Pathname::CleanWithin', + 'ActiveSupport::CoreExtensions::Range::Conversions', + 'ActiveSupport::CoreExtensions::String::Access', + 'ActiveSupport::CoreExtensions::String::Conversions', + 'ActiveSupport::CoreExtensions::String::Inflections', + 'ActiveSupport::CoreExtensions::String::Iterators', + 'ActiveSupport::CoreExtensions::String::StartsEndsWith', + 'ActiveSupport::CoreExtensions::String::Unicode', + 'ActiveSupport::CoreExtensions::Time::Calculations', + 'ActiveSupport::CoreExtensions::Time::Calculations::ClassMethods', + 'ActiveSupport::CoreExtensions::Time::Conversions', + 'ActiveSupport::Multibyte::Chars', + 'ActiveSupport::Multibyte::Handlers::UTF8Handler', + 'Breakpoint', 'Builder::BlankSlate', 'Builder::XmlMarkup', + 'Fixtures', + 'HTML::Selector', 'HashWithIndifferentAccess', 'Inflector', + 'Inflector::Inflections', 'Mime', 'Mime::Type', + 'OCI8AutoRecover', 'TimeZone', 'XmlSimple' + ), + 5 => array( + 'image_tag', 'link_to', 'link_to_remote', 'javascript_include_tag', + 'assert_equal', 'assert_not_equal', 'before_filter', + 'after_filter', 'render', 'redirect_to', 'hide_action', + 'render_to_string', 'url_for', 'controller_name', + 'controller_class_name', 'controller_path', 'session', + 'render_component', 'render_component_as_string', 'cookie', + 'layout', 'flash', 'auto_complete_for', 'in_place_editor_for', + 'respond_to', 'paginate', 'current_page', 'each', 'first', + 'first_page', 'last_page', 'last', 'length', 'new', 'page_count', + 'previous', 'scaffold', 'send_data', + 'send_file', 'deliver', 'receive', 'error_messages_for', + 'error_message_on', 'form', 'input', 'stylesheet_link_tag', + 'stylesheet_path', 'content_for', 'select_date', 'ago', + 'month', 'day', 'check_box', 'fields_for', 'file_field', + 'form_for', 'hidden_field', 'text_area', 'password_field', + 'collection_select', 'options_for_select', + 'options_from_collection_for_select', 'file_field_tag', + 'form_for_tag', 'hidden_field_tag', 'text_area_tag', + 'password_field_tag', 'link_to_function', 'javascript_tag', + 'human_size', 'number_to_currency', 'pagination_links', + 'form_remote_tag', 'form_remote_for', + 'submit_to_remote', 'remote_function', 'observe_form', + 'observe_field', 'remote_form_for', 'options_for_ajax', 'alert', + 'call', 'assign', 'show', 'hide', 'insert_html', 'sortable', + 'toggle', 'visual_effect', 'replace', 'replace_html', 'remove', + 'save', 'save!', 'draggable', 'drop_receiving', 'literal', + 'draggable_element', 'drop_receiving_element', 'sortable_element', + 'content_tag', 'tag', 'link_to_image', 'link_to_if', + 'link_to_unless', 'mail_to', 'link_image_to', 'button_to', + 'current_page?', 'act_as_list', 'act_as_nested', 'act_as_tree', + 'has_many', 'has_one', 'belongs_to', 'has_many_and_belogns_to', + 'delete', 'destroy', 'destroy_all', 'clone', 'deep_clone', 'copy', + 'update', 'table_name', 'primary_key', 'sum', 'maximun', 'minimum', + 'count', 'size', 'after_save', 'after_create', 'before_save', + 'before_create', 'add_to_base', 'errors', 'add', 'validate', + 'validates_presence_of', 'validates_numericality_of', + 'validates_uniqueness_of', 'validates_length_of', + 'validates_format_of', 'validates_size_of', 'to_a', 'to_s', + 'to_xml', 'to_i' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '%', '&', '*', '|', '/', '<', '>', + '+', '-', '=>', '<<' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color:#9966CC; font-weight:bold;', + 2 => 'color:#0000FF; font-weight:bold;', + 3 => 'color:#CC0066; font-weight:bold;', + 4 => 'color:#CC00FF; font-weight:bold;', + 5 => 'color:#5A0A0A; font-weight:bold;' + ), + 'COMMENTS' => array( + 1 => 'color:#008000; font-style:italic;', + 'MULTI' => 'color:#000080; font-style:italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color:#000099;' + ), + 'BRACKETS' => array( + 0 => 'color:#006600; font-weight:bold;' + ), + 'STRINGS' => array( + 0 => 'color:#996600;' + ), + 'NUMBERS' => array( + 0 => 'color:#006666;' + ), + 'METHODS' => array( + 1 => 'color:#9900CC;' + ), + 'SYMBOLS' => array( + 0 => 'color:#006600; font-weight:bold;' + ), + 'REGEXPS' => array( + 0 => 'color:#ff6633; font-weight:bold;', + 1 => 'color:#0066ff; font-weight:bold;', + 2 => 'color:#6666ff; font-weight:bold;', + 3 => 'color:#ff3333; font-weight:bold;' + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + 0 => array( + GESHI_SEARCH => "([[:space:]])(\\$[a-zA-Z_][a-zA-Z0-9_]*)", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 1 => array( + GESHI_SEARCH => "([[:space:]])(@[a-zA-Z_][a-zA-Z0-9_]*)", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*", //Static OOP References + 3 => array( + GESHI_SEARCH => "([[:space:]]|\[|\()(:[a-zA-Z_][a-zA-Z0-9_]*)", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '<%' => '%>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/rebol.php b/_piecrust/libs/Geshi/geshi/rebol.php new file mode 100644 index 0000000..02ec8de --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/rebol.php @@ -0,0 +1,196 @@ + 'REBOL', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array('rebol [' => ']', 'comment [' => ']'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'binary!','block!','char!','date!','decimal!','email!','file!', + 'hash!','integer!','issue!','list!','logic!','money!','none!', + 'object!','paren!','pair!','path!','string!','tag!','time!', + 'tuple!','url!', + ), + 2 => array( + 'all','any','attempt','break','catch','compose','disarm','dispatch', + 'do','do-events','does','either','else','exit','for','forall', + 'foreach','forever','forskip','func','function','halt','has','if', + 'launch','loop','next','quit','reduce','remove-each','repeat', + 'return','secure','switch','throw','try','until','wait','while', + ), + 3 => array( + 'about','abs','absolute','add','alert','alias','alter','and', + 'any-block?','any-function?','any-string?','any-type?','any-word?', + 'append','arccosine','arcsine','arctangent','array','as-pair', + 'ask','at','back','binary?','bind','bitset?','block?','brightness?', + 'browse','build-tag','caret-to-offset','center-face','change', + 'change-dir','char?','charset','checksum','choose','clean-path', + 'clear','clear-fields','close','comment','complement','component?', + 'compress','confirm','connected?','construct','context','copy', + 'cosine','datatype?','date?','debase','decimal?','decode-cgi', + 'decompress','dehex','delete','detab','difference','dir?','dirize', + 'divide','dump-face','dump-obj','echo','email?','empty?','enbase', + 'entab','equal?','error?','even?','event?','exclude','exists?', + 'exp','extract','fifth','file?','find','first','flash','focus', + 'form','found?','fourth','free','function?','get','get-modes', + 'get-word?','greater-or-equal?','greater?','hash?','head','head?', + 'help','hide','hide-popup','image?','import-email','in', + 'in-window?','index?','info?','inform','input','input?','insert', + 'integer?','intersect','issue?','join','last','layout','length?', + 'lesser-or-equal?','lesser?','library?','license','link?', + 'list-dir','list?','lit-path?','lit-word?','load','load-image', + 'log-10','log-2','log-e','logic?','lowercase','make','make-dir', + 'make-face','max','maximum','maximum-of','min','minimum', + 'minimum-of','modified?','mold','money?','multiply','native?', + 'negate','negative?','none?','not','not-equal?','now','number?', + 'object?','odd?','offset-to-caret','offset?','op?','open','or', + 'pair?','paren?','parse','parse-xml','path?','pick','poke','port?', + 'positive?','power','prin','print','probe','protect', + 'protect-system','query','random','read','read-io','recycle', + 'refinement?','reform','rejoin','remainder','remold','remove', + 'rename', + //'repeat', + 'repend','replace','request','request-color','request-date', + 'request-download','request-file','request-list','request-pass', + 'request-text','resend','reverse','routine?','same?','save', + 'script?','second','select','send','series?','set','set-modes', + 'set-net','set-path?','set-word?','show','show-popup','sign?', + 'sine','size-text','size?','skip','sort','source','span?', + 'split-path','square-root','strict-equal?','strict-not-equal?', + 'string?','struct?','stylize','subtract','suffix?','tag?','tail', + 'tail?','tangent','third','time?','to','to-binary','to-bitset', + 'to-block','to-char','to-date','to-decimal','to-email','to-file', + 'to-get-word','to-hash','to-hex','to-idate','to-image','to-integer', + 'to-issue','to-list','to-lit-path','to-lit-word','to-local-file', + 'to-logic','to-money','to-pair','to-paren','to-path', + 'to-rebol-file','to-refinement','to-set-path','to-set-word', + 'to-string','to-tag','to-time','to-tuple','to-url','to-word', + 'trace','trim','tuple?','type?','unfocus','union','unique', + 'unprotect','unset','unset?','unview','update','upgrade', + 'uppercase','url?','usage','use','value?','view','viewed?','what', + 'what-dir','within?','word?','write','write-io','xor','zero?', + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', +// 2 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff;' + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' +// 2 => 'includes/dico_rebol.php?word={FNAME}', +// 3 => 'includes/dico_rebol.php?word={FNAME}' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*", + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/reg.php b/_piecrust/libs/Geshi/geshi/reg.php new file mode 100644 index 0000000..2e0dd33 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/reg.php @@ -0,0 +1,233 @@ + 'Microsoft Registry', + 'COMMENT_SINGLE' => array(1 =>';'), + 'COMMENT_MULTI' => array( ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( +// 1 => array(), +// 2 => array(), + /* Registry Key Constants Not Used */ + 3 => array( + 'HKEY_LOCAL_MACHINE', + 'HKEY_CLASSES_ROOT', + 'HKEY_CURRENT_USER', + 'HKEY_USERS', + 'HKEY_CURRENT_CONFIG', + 'HKEY_DYN_DATA', + 'HKLM', 'HKCR', 'HKCU', 'HKU', 'HKCC', 'HKDD' + ) + ), + 'SYMBOLS' => array( + '=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, +// 1 => false, +// 2 => false, + 3 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( +// 1 => 'color: #00CCFF;', +// 2 => 'color: #0000FF;', + 3 => 'color: #800000;' + ), + 'COMMENTS' => array( + 1 => 'color: #009900;' + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #009900;' + ), + 'NUMBERS' => array( + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + 0 => 'color: #00CCFF;', + 1 => 'color: #0000FF;', + 2 => '', + 3 => 'color: #0000FF;', + 4 => 'color: #0000FF;', + 5 => '', + 6 => '', + 7 => '', + 8 => 'color: #FF6600;', + ) + ), + 'URLS' => array( +// 1 => '', +// 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + // Highlight Key Delimiters + 0 => array( + GESHI_SEARCH => '((^|\\n)\\s*)(\\\\\\[(.*)\\\\\\])(\\s*(\\n|$))', + GESHI_REPLACE => '\\3', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\5' +// GESHI_CLASS => 'kw1' + ), + // Highlight File Format Header Version 5 + 1 => array( + GESHI_SEARCH => '(^\s*)(Windows Registry Editor Version \d+\.\d+)(\s*$)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3', + GESHI_CLASS => 'geshi_registry_header' + ), + // Highlight File Format Header Version 4 + 2 => array( + GESHI_SEARCH => '(^\\s*)(REGEDIT\s?\d+)(\s*$)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3', + GESHI_CLASS => 'geshi_registry_header' + ), + // Highlight dword: 32 bit integer values + 3 => array( + GESHI_SEARCH => '(=\s*)(dword:[0-9a-fA-F]{8})(\s*$)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' +// GESHI_CLASS => 'kw2' + ), + // Highlight variable names + 4 => array( + GESHI_SEARCH => '(^\s*)(\".*?\")(\s*=)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3', + GESHI_CLASS => 'geshi_variable' + ), + // Highlight String Values + 5 => array( + GESHI_SEARCH => '(=\s*)(\".*?\")(\s*$)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3', + GESHI_CLASS => 'st0' + ), + // Highlight Hexadecimal Values (Single-Line and Multi-Line) + 6 => array( + GESHI_SEARCH => '(=\s*\n?\s*)(hex:[0-9a-fA-F]{2}(,(\\\s*\n\s*)?[0-9a-fA-F]{2})*)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '', + GESHI_CLASS => 'kw2' + ), + // Highlight Default Variable + 7 => array( + GESHI_SEARCH => '(^\s*)(@)(\s*=)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'm', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3', + GESHI_CLASS => 'geshi_variable' + ), + // Highlight GUID's found anywhere. + 8 => array( + GESHI_SEARCH => '(\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\})', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '', + GESHI_CLASS => 'geshi_guid' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'NUMBERS' => GESHI_NEVER, + ) + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/robots.php b/_piecrust/libs/Geshi/geshi/robots.php new file mode 100644 index 0000000..838eddb --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/robots.php @@ -0,0 +1,100 @@ + 'robots.txt', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array(1 => "/^Comment:.*?/m"), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'Allow', 'Crawl-delay', 'Disallow', 'Request-rate', 'Robot-version', + 'Sitemap', 'User-agent', 'Visit-time' + ) + ), + 'SYMBOLS' => array( + ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => 'http://www.robotstxt.org/wc/norobots.html' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/rpmspec.php b/_piecrust/libs/Geshi/geshi/rpmspec.php new file mode 100644 index 0000000..7f2a8e5 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/rpmspec.php @@ -0,0 +1,133 @@ + 'RPM Specification File', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'QUOTEMARKS' => array('"','`'), + 'ESCAPE_CHAR' => '\\', + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + ), + 'KEYWORDS' => array( + ), + 'SYMBOLS' => array( + '<', '>', '=', + '!', '@', '~', '&', '|', '^', + '+','-', '*', '/', '%', + ',', ';', '?', '.', ':' + ), + 'STYLES' => array( + 'KEYWORDS' => array( + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;', + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( + 1 => 'color: #0000ff;', + 2 => 'color: #009999;', + 3 => 'color: #000000; font-weight: bold;', + 4 => 'color: #ff6600; font-style: italic;', + ), + 'SCRIPT' => array( + ) + ), + 'REGEXPS' => array( + 1 => array( + // search for generic macros + GESHI_SEARCH => '(%{?[a-zA-Z0-9_]+}?)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '', + ), + 2 => array( + // search for special macros + GESHI_SEARCH => '(%(?:define|patch\d*|mklibname|mkrel|configure\S+|makeinstall\S+|make_session|make|defattr|config|doc|setup))', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '', + ), + 3 => array ( + // special definitions + GESHI_SEARCH => '((?:summary|license|buildroot|buildrequires|provides|version|release|source\d*|group|buildarch|autoreqprov|provides|obsoletes|vendor|distribution|suggests|autoreq|autoprov|conflicts|name|url|requires|patch\d*):)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '', + ), + 4 => array ( + // section delimiting words + GESHI_SEARCH => '(%(?:description|package|prep|build|install|clean|postun|preun|post|pre|files|changelog))', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '', + ), + ), + 'URLS' => array(), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/rsplus.php b/_piecrust/libs/Geshi/geshi/rsplus.php new file mode 100644 index 0000000..ef09b23 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/rsplus.php @@ -0,0 +1,483 @@ + 'R / S+', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', "'"), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'else','global','in', 'otherwise','persistent', + ), + 2 => array( // base package + '$.package_version', '$<-', '$<-.data.frame', 'abbreviate', 'abs', 'acos', 'acosh', 'addNA', 'addTaskCallback', + 'agrep', 'alist', 'all', 'all.equal', 'all.equal.character', 'all.equal.default', 'all.equal.factor', + 'all.equal.formula', 'all.equal.language', 'all.equal.list', 'all.equal.numeric', 'all.equal.POSIXct', + 'all.equal.raw', 'all.names', 'all.vars', 'any', 'aperm', 'append', 'apply', 'Arg', 'args', 'array', 'as.array', + 'as.array.default', 'as.call', 'as.character', 'as.character.condition', 'as.character.Date', 'as.character.default', + 'as.character.error', 'as.character.factor', 'as.character.hexmode', 'as.character.numeric_version', 'as.character.octmode', + 'as.character.POSIXt', 'as.character.srcref', 'as.complex', 'as.data.frame', 'as.data.frame.array', 'as.data.frame.AsIs', + 'as.data.frame.character', 'as.data.frame.complex', 'as.data.frame.data.frame', 'as.data.frame.Date', 'as.data.frame.default', + 'as.data.frame.difftime', 'as.data.frame.factor', 'as.data.frame.integer', 'as.data.frame.list', 'as.data.frame.logical', + 'as.data.frame.matrix', 'as.data.frame.model.matrix', 'as.data.frame.numeric', 'as.data.frame.numeric_version', + 'as.data.frame.ordered', 'as.data.frame.POSIXct', 'as.data.frame.POSIXlt', 'as.data.frame.raw', 'as.data.frame.table', + 'as.data.frame.ts', 'as.data.frame.vector', 'as.Date', 'as.Date.character', 'as.Date.date', 'as.Date.dates', + 'as.Date.default', 'as.Date.factor', 'as.Date.numeric', 'as.Date.POSIXct', 'as.Date.POSIXlt', 'as.difftime', 'as.double', + 'as.double.difftime', 'as.double.POSIXlt', 'as.environment', 'as.expression', 'as.expression.default', 'as.factor', + 'as.function', 'as.function.default', 'as.hexmode', 'as.integer', 'as.list', 'as.list.data.frame', 'as.list.default', + 'as.list.environment', 'as.list.factor', 'as.list.function', 'as.list.numeric_version', 'as.logical', 'as.matrix', + 'as.matrix.data.frame', 'as.matrix.default', 'as.matrix.noquote', 'as.matrix.POSIXlt', 'as.name', 'as.null', 'as.null.default', + 'as.numeric', 'as.numeric_version', 'as.octmode', 'as.ordered', 'as.package_version', 'as.pairlist', 'as.POSIXct', + 'as.POSIXct.date', 'as.POSIXct.Date', 'as.POSIXct.dates', 'as.POSIXct.default', 'as.POSIXct.numeric', 'as.POSIXct.POSIXlt', + 'as.POSIXlt', 'as.POSIXlt.character', 'as.POSIXlt.date', 'as.POSIXlt.Date', 'as.POSIXlt.dates', 'as.POSIXlt.default', + 'as.POSIXlt.factor', 'as.POSIXlt.numeric', 'as.POSIXlt.POSIXct', 'as.qr', 'as.raw', 'as.real', 'as.single', + 'as.single.default', 'as.symbol', 'as.table', 'as.table.default', 'as.vector', 'as.vector.factor', 'asin', 'asinh', + 'asNamespace', 'asS4', 'assign', 'atan', 'atan2', 'atanh', 'attach', 'attachNamespace', 'attr', 'attr.all.equal', + 'attr<-', 'attributes', 'attributes<-', 'autoload', 'autoloader', 'backsolve', 'baseenv', 'basename', 'besselI', + 'besselJ', 'besselK', 'besselY', 'beta', 'bindingIsActive', 'bindingIsLocked', 'bindtextdomain', 'body', 'body<-', + 'bquote', 'break', 'browser', 'builtins', 'by', 'by.data.frame', 'by.default', 'bzfile', 'c', 'c.Date', 'c.noquote', + 'c.numeric_version', 'c.POSIXct', 'c.POSIXlt', 'call', 'callCC', 'capabilities', 'casefold', 'cat', 'category', + 'cbind', 'cbind.data.frame', 'ceiling', 'char.expand', 'character', 'charmatch', 'charToRaw', 'chartr', 'check_tzones', + 'chol', 'chol.default', 'chol2inv', 'choose', 'class', 'class<-', 'close', 'close.connection', 'close.srcfile', + 'closeAllConnections', 'codes', 'codes.factor', 'codes.ordered', 'codes<-', 'col', 'colMeans', 'colnames', + 'colnames<-', 'colSums', 'commandArgs', 'comment', 'comment<-', 'complex', 'computeRestarts', 'conditionCall', + 'conditionCall.condition', 'conditionMessage', 'conditionMessage.condition', 'conflicts', 'Conj', 'contributors', + 'cos', 'cosh', 'crossprod', 'Cstack_info', 'cummax', 'cummin', 'cumprod', 'cumsum', 'cut', 'cut.Date', 'cut.default', + 'cut.POSIXt', 'data.class', 'data.frame', 'data.matrix', 'date', 'debug', 'default.stringsAsFactors', 'delay', + 'delayedAssign', 'deparse', 'det', 'detach', 'determinant', 'determinant.matrix', 'dget', 'diag', 'diag<-', 'diff', + 'diff.Date', 'diff.default', 'diff.POSIXt', 'difftime', 'digamma', 'dim', 'dim.data.frame', 'dim<-', 'dimnames', + 'dimnames.data.frame', 'dimnames<-', 'dimnames<-.data.frame', 'dir', 'dir.create', 'dirname', 'do.call', 'double', + 'dput', 'dQuote', 'drop', 'dump', 'duplicated', 'duplicated.array', 'duplicated.data.frame', 'duplicated.default', + 'duplicated.matrix', 'duplicated.numeric_version', 'duplicated.POSIXlt', 'dyn.load', 'dyn.unload', 'eapply', 'eigen', + 'emptyenv', 'encodeString', 'Encoding', 'Encoding<-', 'env.profile', 'environment', 'environment<-', 'environmentIsLocked', + 'environmentName', 'eval', 'eval.parent', 'evalq', 'exists', 'exp', 'expand.grid', 'expm1', 'expression', 'F', 'factor', + 'factorial', 'fifo', 'file', 'file.access', 'file.append', 'file.choose', 'file.copy', 'file.create', 'file.exists', + 'file.info', 'file.path', 'file.remove', 'file.rename', 'file.show', 'file.symlink', 'Filter', 'Find', 'findInterval', + 'findPackageEnv', 'findRestart', 'floor', 'flush', 'flush.connection', 'for', 'force', 'formals', 'formals<-', + 'format', 'format.AsIs', 'format.char', 'format.data.frame', 'format.Date', 'format.default', 'format.difftime', + 'format.factor', 'format.hexmode', 'format.info', 'format.octmode', 'format.POSIXct', 'format.POSIXlt', + 'format.pval', 'formatC', 'formatDL', 'forwardsolve', 'function', 'gamma', 'gammaCody', 'gc', 'gc.time', + 'gcinfo', 'gctorture', 'get', 'getAllConnections', 'getCallingDLL', 'getCallingDLLe', 'getCConverterDescriptions', + 'getCConverterStatus', 'getConnection', 'getDLLRegisteredRoutines', 'getDLLRegisteredRoutines.character', + 'getDLLRegisteredRoutines.DLLInfo', 'getenv', 'geterrmessage', 'getExportedValue', 'getHook', 'getLoadedDLLs', + 'getNamespace', 'getNamespaceExports', 'getNamespaceImports', 'getNamespaceInfo', 'getNamespaceName', + 'getNamespaceUsers', 'getNamespaceVersion', 'getNativeSymbolInfo', 'getNumCConverters', 'getOption', 'getRversion', + 'getSrcLines', 'getTaskCallbackNames', 'gettext', 'gettextf', 'getwd', 'gl', 'globalenv', 'gregexpr', 'grep', + 'grepl', 'gsub', 'gzcon', 'gzfile', 'httpclient', 'I', 'iconv', 'iconvlist', 'icuSetCollate', 'identical', 'identity', + 'if', 'ifelse', 'Im', 'importIntoEnv', 'inherits', 'integer', 'interaction', 'interactive', 'intersect', 'intToBits', + 'intToUtf8', 'inverse.rle', 'invisible', 'invokeRestart', 'invokeRestartInteractively', 'is.array', 'is.atomic', + 'is.call', 'is.character', 'is.complex', 'is.data.frame', 'is.double', 'is.element', 'is.environment', + 'is.expression', 'is.factor', 'is.finite', 'is.function', 'is.infinite', 'is.integer', 'is.language', + 'is.list', 'is.loaded', 'is.logical', 'is.matrix', 'is.na', 'is.na.data.frame', 'is.na.POSIXlt', 'is.na<-', + 'is.na<-.default', 'is.na<-.factor', 'is.name', 'is.nan', 'is.null', 'is.numeric', 'is.numeric_version', + 'is.numeric.Date', 'is.numeric.POSIXt', 'is.object', 'is.ordered', 'is.package_version', 'is.pairlist', 'is.primitive', + 'is.qr', 'is.R', 'is.raw', 'is.real', 'is.recursive', 'is.single', 'is.symbol', 'is.table', 'is.unsorted', 'is.vector', + 'isBaseNamespace', 'isdebugged', 'isIncomplete', 'isNamespace', 'ISOdate', 'ISOdatetime', 'isOpen', 'isRestart', 'isS4', + 'isSeekable', 'isSymmetric', 'isSymmetric.matrix', 'isTRUE', 'jitter', 'julian', 'julian.Date', 'julian.POSIXt', 'kappa', + 'kappa.default', 'kappa.lm', 'kappa.qr', 'kappa.tri', 'kronecker', 'l10n_info', 'La.chol', 'La.chol2inv', 'La.eigen', + 'La.svd', 'labels', 'labels.default', 'lapply', 'lazyLoad', 'lazyLoadDBfetch', 'lbeta', 'lchoose', 'length', 'length<-', + 'length<-.factor', 'letters', 'LETTERS', 'levels', 'levels.default', 'levels<-', 'levels<-.factor', 'lfactorial', 'lgamma', + 'library', 'library.dynam', 'library.dynam.unload', 'licence', 'license', 'list', 'list.files', 'load', 'loadedNamespaces', + 'loadingNamespaceInfo', 'loadNamespace', 'loadURL', 'local', 'lockBinding', 'lockEnvironment', 'log', 'log10', 'log1p', 'log2', + 'logb', 'logical', 'lower.tri', 'ls', 'machine', 'Machine', 'make.names', 'make.unique', 'makeActiveBinding', 'manglePackageName', + 'Map', 'mapply', 'margin.table', 'mat.or.vec', 'match', 'match.arg', 'match.call', 'match.fun', 'Math.data.frame', 'Math.Date', + 'Math.difftime', 'Math.factor', 'Math.POSIXt', 'matrix', 'max', 'max.col', 'mean', 'mean.data.frame', 'mean.Date', 'mean.default', + 'mean.difftime', 'mean.POSIXct', 'mean.POSIXlt', 'mem.limits', 'memory.profile', 'merge', 'merge.data.frame', 'merge.default', + 'message', 'mget', 'min', 'missing', 'Mod', 'mode', 'mode<-', 'month.abb', 'month.name', 'months', 'months.Date', + 'months.POSIXt', 'mostattributes<-', 'names', 'names<-', 'namespaceExport', 'namespaceImport', 'namespaceImportClasses', + 'namespaceImportFrom', 'namespaceImportMethods', 'nargs', 'nchar', 'ncol', 'NCOL', 'Negate', 'new.env', 'next', 'NextMethod', + 'ngettext', 'nlevels', 'noquote', 'nrow', 'NROW', 'numeric', 'numeric_version', 'nzchar', 'objects', 'oldClass', + 'oldClass<-', 'on.exit', 'open', 'open.connection', 'open.srcfile', 'open.srcfilecopy', 'Ops.data.frame', 'Ops.Date', + 'Ops.difftime', 'Ops.factor', 'Ops.numeric_version', 'Ops.ordered', 'Ops.POSIXt', 'options', 'order', 'ordered', + 'outer', 'package_version', 'package.description', 'packageEvent', 'packageHasNamespace', 'packageStartupMessage', + 'packBits', 'pairlist', 'parent.env', 'parent.env<-', 'parent.frame', 'parse', 'parse.dcf', 'parseNamespaceFile', + 'paste', 'path.expand', 'pentagamma', 'pi', 'pipe', 'Platform', 'pmatch', 'pmax', 'pmax.int', 'pmin', 'pmin.int', + 'polyroot', 'pos.to.env', 'Position', 'pretty', 'prettyNum', 'print', 'print.AsIs', 'print.atomic', 'print.by', + 'print.condition', 'print.connection', 'print.data.frame', 'print.Date', 'print.default', 'print.difftime', + 'print.DLLInfo', 'print.DLLInfoList', 'print.DLLRegisteredRoutines', 'print.factor', 'print.hexmode', 'print.libraryIQR', + 'print.listof', 'print.NativeRoutineList', 'print.noquote', 'print.numeric_version', 'print.octmode', 'print.packageInfo', + 'print.POSIXct', 'print.POSIXlt', 'print.proc_time', 'print.restart', 'print.rle', 'print.simple.list', + 'print.srcfile', 'print.srcref', 'print.summary.table', 'print.table', 'print.warnings', 'printNoClass', + 'prmatrix', 'proc.time', 'prod', 'prop.table', 'provide', 'psigamma', 'pushBack', 'pushBackLength', 'q', 'qr', + 'qr.coef', 'qr.default', 'qr.fitted', 'qr.Q', 'qr.qty', 'qr.qy', 'qr.R', 'qr.resid', 'qr.solve', 'qr.X', 'quarters', + 'quarters.Date', 'quarters.POSIXt', 'quit', 'quote', 'R_system_version', 'R.home', 'R.version', 'R.Version', + 'R.version.string', 'range', 'range.default', 'rank', 'rapply', 'raw', 'rawConnection', 'rawConnectionValue', + 'rawShift', 'rawToBits', 'rawToChar', 'rbind', 'rbind.data.frame', 'rcond', 'Re', 'read.dcf', 'read.table.url', + 'readBin', 'readChar', 'readline', 'readLines', 'real', 'Recall', 'Reduce', 'reg.finalizer', 'regexpr', + 'registerS3method', 'registerS3methods', 'remove', 'removeCConverter', 'removeTaskCallback', 'rep', 'rep.Date', + 'rep.factor', 'rep.int', 'rep.numeric_version', 'rep.POSIXct', 'rep.POSIXlt', 'repeat', 'replace', 'replicate', + 'require', 'restart', 'restartDescription', 'restartFormals', 'retracemem', 'return', 'rev', 'rev.default', 'rle', + 'rm', 'RNGkind', 'RNGversion', 'round', 'round.Date', 'round.difftime', 'round.POSIXt', 'row', 'row.names', + 'row.names.data.frame', 'row.names.default', 'row.names<-', 'row.names<-.data.frame', 'row.names<-.default', + 'rowMeans', 'rownames', 'rownames<-', 'rowsum', 'rowsum.data.frame', 'rowsum.default', 'rowSums', 'sample', + 'sample.int', 'sapply', 'save', 'save.image', 'saveNamespaceImage', 'scale', 'scale.default', 'scan', 'scan.url', + 'search', 'searchpaths', 'seek', 'seek.connection', 'seq', 'seq_along', 'seq_len', 'seq.Date', 'seq.default', + 'seq.int', 'seq.POSIXt', 'sequence', 'serialize', 'set.seed', 'setCConverterStatus', 'setdiff', 'setequal', + 'setHook', 'setNamespaceInfo', 'setSessionTimeLimit', 'setTimeLimit', 'setwd', 'showConnections', 'shQuote', + 'sign', 'signalCondition', 'signif', 'simpleCondition', 'simpleError', 'simpleMessage', 'simpleWarning', 'sin', + 'single', 'sinh', 'sink', 'sink.number', 'slice.index', 'socketConnection', 'socketSelect', 'solve', 'solve.default', + 'solve.qr', 'sort', 'sort.default', 'sort.int', 'sort.list', 'sort.POSIXlt', 'source', 'source.url', 'split', + 'split.data.frame', 'split.Date', 'split.default', 'split.POSIXct', 'split<-', 'split<-.data.frame', 'split<-.default', + 'sprintf', 'sqrt', 'sQuote', 'srcfile', 'srcfilecopy', 'srcref', 'standardGeneric', 'stderr', 'stdin', 'stdout', + 'stop', 'stopifnot', 'storage.mode', 'storage.mode<-', 'strftime', 'strptime', 'strsplit', 'strtrim', 'structure', + 'strwrap', 'sub', 'subset', 'subset.data.frame', 'subset.default', 'subset.matrix', 'substitute', 'substr', + 'substr<-', 'substring', 'substring<-', 'sum', 'summary', 'summary.connection', 'summary.data.frame', + 'Summary.data.frame', 'summary.Date', 'Summary.Date', 'summary.default', 'Summary.difftime', + 'summary.factor', 'Summary.factor', 'summary.matrix', 'Summary.numeric_version', 'summary.POSIXct', + 'Summary.POSIXct', 'summary.POSIXlt', 'Summary.POSIXlt', 'summary.table', 'suppressMessages', + 'suppressPackageStartupMessages', 'suppressWarnings', 'svd', 'sweep', 'switch', 'symbol.C', + 'symbol.For', 'sys.call', 'sys.calls', 'Sys.chmod', 'Sys.Date', 'sys.frame', 'sys.frames', + 'sys.function', 'Sys.getenv', 'Sys.getlocale', 'Sys.getpid', 'Sys.glob', 'Sys.info', 'sys.load.image', + 'Sys.localeconv', 'sys.nframe', 'sys.on.exit', 'sys.parent', 'sys.parents', 'Sys.putenv', + 'sys.save.image', 'Sys.setenv', 'Sys.setlocale', 'Sys.sleep', 'sys.source', 'sys.status', + 'Sys.time', 'Sys.timezone', 'Sys.umask', 'Sys.unsetenv', 'Sys.which', 'system', 'system.file', + 'system.time', 't', 'T', 't.data.frame', 't.default', 'table', 'tabulate', 'tan', 'tanh', 'tapply', + 'taskCallbackManager', 'tcrossprod', 'tempdir', 'tempfile', 'testPlatformEquivalence', 'tetragamma', + 'textConnection', 'textConnectionValue', 'tolower', 'topenv', 'toString', 'toString.default', 'toupper', + 'trace', 'traceback', 'tracemem', 'tracingState', 'transform', 'transform.data.frame', 'transform.default', + 'trigamma', 'trunc', 'trunc.Date', 'trunc.POSIXt', 'truncate', 'truncate.connection', 'try', 'tryCatch', + 'typeof', 'unclass', 'undebug', 'union', 'unique', 'unique.array', 'unique.data.frame', 'unique.default', + 'unique.matrix', 'unique.numeric_version', 'unique.POSIXlt', 'units', 'units.difftime', 'units<-', + 'units<-.difftime', 'unix', 'unix.time', 'unlink', 'unlist', 'unloadNamespace', 'unlockBinding', + 'unname', 'unserialize', 'unsplit', 'untrace', 'untracemem', 'unz', 'upper.tri', 'url', 'UseMethod', + 'utf8ToInt', 'vector', 'Vectorize', 'version', 'Version', 'warning', 'warnings', 'weekdays', + 'weekdays.Date', 'weekdays.POSIXt', 'which', 'which.max', 'which.min', 'while', 'with', + 'with.default', 'withCallingHandlers', 'within', 'within.data.frame', 'within.list', 'withRestarts', + 'withVisible', 'write', 'write.dcf', 'write.table0', 'writeBin', 'writeChar', 'writeLines', 'xor', + 'xpdrows.data.frame', 'xtfrm', 'xtfrm.Date', 'xtfrm.default', 'xtfrm.factor', 'xtfrm.numeric_version', + 'xtfrm.POSIXct', 'xtfrm.POSIXlt', 'xtfrm.Surv', 'zapsmall', + ), + 3 => array( // Datasets + 'ability.cov', 'airmiles', 'AirPassengers', 'airquality', + 'anscombe', 'attenu', 'attitude', 'austres', 'beaver1', + 'beaver2', 'BJsales', 'BJsales.lead', 'BOD', 'cars', + 'ChickWeight', 'chickwts', 'co2', 'crimtab', + 'discoveries', 'DNase', 'esoph', 'euro', 'euro.cross', + 'eurodist', 'EuStockMarkets', 'faithful', 'fdeaths', + 'Formaldehyde', 'freeny', 'freeny.x', 'freeny.y', + 'HairEyeColor', 'Harman23.cor', 'Harman74.cor', 'Indometh', + 'infert', 'InsectSprays', 'iris', 'iris3', 'islands', + 'JohnsonJohnson', 'LakeHuron', 'ldeaths', 'lh', 'LifeCycleSavings', + 'Loblolly', 'longley', 'lynx', 'mdeaths', 'morley', 'mtcars', + 'nhtemp', 'Nile', 'nottem', 'occupationalStatus', 'Orange', + 'OrchardSprays', 'PlantGrowth', 'precip', 'presidents', + 'pressure', 'Puromycin', 'quakes', 'randu', 'rivers', 'rock', + 'Seatbelts', 'sleep', 'stack.loss', 'stack.x', 'stackloss', + 'state.abb', 'state.area', 'state.center', 'state.division', + 'state.name', 'state.region', 'state.x77', 'sunspot.month', + 'sunspot.year', 'sunspots', 'swiss', 'Theoph', 'Titanic', 'ToothGrowth', + 'treering', 'trees', 'UCBAdmissions', 'UKDriverDeaths', 'UKgas', + 'USAccDeaths', 'USArrests', 'USJudgeRatings', 'USPersonalExpenditure', + 'uspop', 'VADeaths', 'volcano', 'warpbreaks', 'women', 'WorldPhones', + 'WWWusage', + ), + 4 => array( // graphics package + 'abline', 'arrows', 'assocplot', 'axis', 'Axis', 'axis.Date', 'axis.POSIXct', + 'axTicks', 'barplot', 'barplot.default', 'box', 'boxplot', 'boxplot.default', + 'boxplot.matrix', 'bxp', 'cdplot', 'clip', 'close.screen', 'co.intervals', + 'contour', 'contour.default', 'coplot', 'curve', 'dotchart', 'erase.screen', + 'filled.contour', 'fourfoldplot', 'frame', 'grconvertX', 'grconvertY', 'grid', + 'hist', 'hist.default', 'identify', 'image', 'image.default', 'layout', + 'layout.show', 'lcm', 'legend', 'lines', 'lines.default', 'locator', 'matlines', + 'matplot', 'matpoints', 'mosaicplot', 'mtext', 'pairs', 'pairs.default', + 'panel.smooth', 'par', 'persp', 'pie', 'piechart', 'plot', 'plot.default', + 'plot.design', 'plot.new', 'plot.window', 'plot.xy', 'points', 'points.default', + 'polygon', 'rect', 'rug', 'screen', 'segments', 'smoothScatter', 'spineplot', + 'split.screen', 'stars', 'stem', 'strheight', 'stripchart', 'strwidth', 'sunflowerplot', + 'symbols', 'text', 'text.default', 'title', 'xinch', 'xspline', 'xyinch', 'yinch', + ), + 5 => array( // grDevices pkg + 'as.graphicsAnnot', 'bitmap', 'blues9', 'bmp', 'boxplot.stats', 'cairo_pdf', 'cairo_ps', 'check.options', + 'chull', 'CIDFont', 'cm', 'cm.colors', 'col2rgb', 'colorConverter', 'colorRamp', 'colorRampPalette', + 'colors', 'colorspaces', 'colours', 'contourLines', 'convertColor', 'densCols', 'dev.control', 'dev.copy', + 'dev.copy2eps', 'dev.copy2pdf', 'dev.cur', 'dev.interactive', 'dev.list', 'dev.new', 'dev.next', 'dev.off', + 'dev.prev', 'dev.print', 'dev.set', 'dev.size', 'dev2bitmap', 'devAskNewPage', 'deviceIsInteractive', + 'embedFonts', 'extendrange', 'getGraphicsEvent', 'graphics.off', 'gray', 'gray.colors', 'grey', 'grey.colors', + 'hcl', 'heat.colors', 'Hershey', 'hsv', 'jpeg', 'make.rgb', 'n2mfrow', 'nclass.FD', 'nclass.scott', + 'nclass.Sturges', 'palette', 'pdf', 'pdf.options', 'pdfFonts', 'pictex', 'png', 'postscript', 'postscriptFont', + 'postscriptFonts', 'ps.options', 'quartz', 'quartz.options', 'quartzFont', 'quartzFonts', 'rainbow', + 'recordGraphics', 'recordPlot', 'replayPlot', 'rgb', 'rgb2hsv', 'savePlot', 'setEPS', 'setPS', 'svg', + 'terrain.colors', 'tiff', 'topo.colors', 'trans3d', 'Type1Font', 'x11', 'X11', 'X11.options', 'X11Font', + 'X11Fonts', 'xfig', 'xy.coords', 'xyTable', 'xyz.coords', + ), + 6 => array( // methods package + 'addNextMethod', 'allGenerics', 'allNames', 'Arith', 'as', 'as<-', + 'asMethodDefinition', 'assignClassDef', 'assignMethodsMetaData', 'balanceMethodsList', + 'cacheGenericsMetaData', 'cacheMetaData', 'cacheMethod', 'callGeneric', + 'callNextMethod', 'canCoerce', 'cbind2', 'checkSlotAssignment', 'classesToAM', + 'classMetaName', 'coerce', 'coerce<-', 'Compare', 'completeClassDefinition', + 'completeExtends', 'completeSubclasses', 'Complex', 'conformMethod', 'defaultDumpName', + 'defaultPrototype', 'doPrimitiveMethod', 'dumpMethod', 'dumpMethods', 'el', 'el<-', + 'elNamed', 'elNamed<-', 'empty.dump', 'emptyMethodsList', 'existsFunction', 'existsMethod', + 'extends', 'finalDefaultMethod', 'findClass', 'findFunction', 'findMethod', 'findMethods', + 'findMethodSignatures', 'findUnique', 'fixPre1.8', 'formalArgs', 'functionBody', + 'functionBody<-', 'generic.skeleton', 'getAccess', 'getAllMethods', 'getAllSuperClasses', + 'getClass', 'getClassDef', 'getClasses', 'getClassName', 'getClassPackage', 'getDataPart', + 'getExtends', 'getFunction', 'getGeneric', 'getGenerics', 'getGroup', 'getGroupMembers', + 'getMethod', 'getMethods', 'getMethodsForDispatch', 'getMethodsMetaData', 'getPackageName', + 'getProperties', 'getPrototype', 'getSlots', 'getSubclasses', 'getValidity', 'getVirtual', + 'hasArg', 'hasMethod', 'hasMethods', 'implicitGeneric', 'initialize', 'insertMethod', 'is', + 'isClass', 'isClassDef', 'isClassUnion', 'isGeneric', 'isGrammarSymbol', 'isGroup', + 'isSealedClass', 'isSealedMethod', 'isVirtualClass', 'isXS3Class', 'languageEl', 'languageEl<-', + 'linearizeMlist', 'listFromMethods', 'listFromMlist', 'loadMethod', 'Logic', + 'makeClassRepresentation', 'makeExtends', 'makeGeneric', 'makeMethodsList', + 'makePrototypeFromClassDef', 'makeStandardGeneric', 'matchSignature', 'Math', 'Math2', 'mergeMethods', + 'metaNameUndo', 'method.skeleton', 'MethodAddCoerce', 'methodSignatureMatrix', 'MethodsList', + 'MethodsListSelect', 'methodsPackageMetaName', 'missingArg', 'mlistMetaName', 'new', 'newBasic', + 'newClassRepresentation', 'newEmptyObject', 'Ops', 'packageSlot', 'packageSlot<-', 'possibleExtends', + 'prohibitGeneric', 'promptClass', 'promptMethods', 'prototype', 'Quote', 'rbind2', + 'reconcilePropertiesAndPrototype', 'registerImplicitGenerics', 'rematchDefinition', + 'removeClass', 'removeGeneric', 'removeMethod', 'removeMethods', 'removeMethodsObject', 'representation', + 'requireMethods', 'resetClass', 'resetGeneric', 'S3Class', 'S3Class<-', 'S3Part', 'S3Part<-', 'sealClass', + 'seemsS4Object', 'selectMethod', 'selectSuperClasses', 'sessionData', 'setAs', 'setClass', 'setClassUnion', + 'setDataPart', 'setGeneric', 'setGenericImplicit', 'setGroupGeneric', 'setIs', 'setMethod', 'setOldClass', + 'setPackageName', 'setPrimitiveMethods', 'setReplaceMethod', 'setValidity', 'show', 'showClass', 'showDefault', + 'showExtends', 'showMethods', 'showMlist', 'signature', 'SignatureMethod', 'sigToEnv', 'slot', 'slot<-', + 'slotNames', 'slotsFromS3', 'substituteDirect', 'substituteFunctionArgs', 'Summary', 'superClassDepth', + 'testInheritedMethods', 'testVirtual', 'traceOff', 'traceOn', 'tryNew', 'trySilent', 'unRematchDefinition', + 'validObject', 'validSlotNames', + ), + 7 => array( // stats pkg + 'acf', 'acf2AR', 'add.scope', 'add1', 'addmargins', 'aggregate', + 'aggregate.data.frame', 'aggregate.default', 'aggregate.ts', 'AIC', + 'alias', 'anova', 'anova.glm', 'anova.glmlist', 'anova.lm', 'anova.lmlist', + 'anova.mlm', 'anovalist.lm', 'ansari.test', 'aov', 'approx', 'approxfun', + 'ar', 'ar.burg', 'ar.mle', 'ar.ols', 'ar.yw', 'arima', 'arima.sim', + 'arima0', 'arima0.diag', 'ARMAacf', 'ARMAtoMA', 'as.dendrogram', 'as.dist', + 'as.formula', 'as.hclust', 'as.stepfun', 'as.ts', 'asOneSidedFormula', 'ave', + 'bandwidth.kernel', 'bartlett.test', 'binom.test', 'binomial', 'biplot', + 'Box.test', 'bw.bcv', 'bw.nrd', 'bw.nrd0', 'bw.SJ', 'bw.ucv', 'C', 'cancor', + 'case.names', 'ccf', 'chisq.test', 'clearNames', 'cmdscale', 'coef', 'coefficients', + 'complete.cases', 'confint', 'confint.default', 'constrOptim', 'contr.helmert', + 'contr.poly', 'contr.SAS', 'contr.sum', 'contr.treatment', 'contrasts', 'contrasts<-', + 'convolve', 'cooks.distance', 'cophenetic', 'cor', 'cor.test', 'cov', 'cov.wt', + 'cov2cor', 'covratio', 'cpgram', 'cutree', 'cycle', 'D', 'dbeta', 'dbinom', 'dcauchy', + 'dchisq', 'decompose', 'delete.response', 'deltat', 'dendrapply', 'density', 'density.default', + 'deriv', 'deriv.default', 'deriv.formula', 'deriv3', 'deriv3.default', 'deriv3.formula', + 'deviance', 'dexp', 'df', 'df.kernel', 'df.residual', 'dfbeta', 'dfbetas', 'dffits', + 'dgamma', 'dgeom', 'dhyper', 'diff.ts', 'diffinv', 'dist', 'dlnorm', 'dlogis', + 'dmultinom', 'dnbinom', 'dnorm', 'dpois', 'drop.scope', 'drop.terms', 'drop1', + 'dsignrank', 'dt', 'dummy.coef', 'dunif', 'dweibull', 'dwilcox', 'ecdf', 'eff.aovlist', + 'effects', 'embed', 'end', 'estVar', 'expand.model.frame', 'extractAIC', 'factanal', + 'factor.scope', 'family', 'fft', 'filter', 'fisher.test', 'fitted', 'fitted.values', + 'fivenum', 'fligner.test', 'formula', 'frequency', 'friedman.test', 'ftable', 'Gamma', + 'gaussian', 'get_all_vars', 'getInitial', 'glm', 'glm.control', 'glm.fit', 'glm.fit.null', + 'hasTsp', 'hat', 'hatvalues', 'hatvalues.lm', 'hclust', 'heatmap', 'HoltWinters', 'influence', + 'influence.measures', 'integrate', 'interaction.plot', 'inverse.gaussian', 'IQR', + 'is.empty.model', 'is.leaf', 'is.mts', 'is.stepfun', 'is.ts', 'is.tskernel', 'isoreg', + 'KalmanForecast', 'KalmanLike', 'KalmanRun', 'KalmanSmooth', 'kernapply', 'kernel', 'kmeans', + 'knots', 'kruskal.test', 'ks.test', 'ksmooth', 'lag', 'lag.plot', 'line', 'lines.ts', 'lm', + 'lm.fit', 'lm.fit.null', 'lm.influence', 'lm.wfit', 'lm.wfit.null', 'loadings', 'loess', + 'loess.control', 'loess.smooth', 'logLik', 'loglin', 'lowess', 'ls.diag', 'ls.print', 'lsfit', + 'mad', 'mahalanobis', 'make.link', 'makeARIMA', 'makepredictcall', 'manova', 'mantelhaen.test', + 'mauchley.test', 'mauchly.test', 'mcnemar.test', 'median', 'median.default', 'medpolish', + 'model.extract', 'model.frame', 'model.frame.aovlist', 'model.frame.default', 'model.frame.glm', + 'model.frame.lm', 'model.matrix', 'model.matrix.default', 'model.matrix.lm', 'model.offset', + 'model.response', 'model.tables', 'model.weights', 'monthplot', 'mood.test', 'mvfft', 'na.action', + 'na.contiguous', 'na.exclude', 'na.fail', 'na.omit', 'na.pass', 'napredict', 'naprint', 'naresid', + 'nextn', 'nlm', 'nlminb', 'nls', 'nls.control', 'NLSstAsymptotic', 'NLSstClosestX', 'NLSstLfAsymptote', + 'NLSstRtAsymptote', 'numericDeriv', 'offset', 'oneway.test', 'optim', 'optimise', 'optimize', + 'order.dendrogram', 'p.adjust', 'p.adjust.methods', 'pacf', 'pairwise.prop.test', 'pairwise.t.test', + 'pairwise.table', 'pairwise.wilcox.test', 'pbeta', 'pbinom', 'pbirthday', 'pcauchy', 'pchisq', 'pexp', + 'pf', 'pgamma', 'pgeom', 'phyper', 'plclust', 'plnorm', 'plogis', 'plot.density', 'plot.ecdf', 'plot.lm', + 'plot.mlm', 'plot.spec', 'plot.spec.coherency', 'plot.spec.phase', 'plot.stepfun', 'plot.ts', 'plot.TukeyHSD', + 'pnbinom', 'pnorm', 'poisson', 'poisson.test', 'poly', 'polym', 'power', 'power.anova.test', 'power.prop.test', + 'power.t.test', 'PP.test', 'ppoints', 'ppois', 'ppr', 'prcomp', 'predict', 'predict.glm', 'predict.lm', + 'predict.mlm', 'predict.poly', 'preplot', 'princomp', 'print.anova', 'print.coefmat', 'print.density', + 'print.family', 'print.formula', 'print.ftable', 'print.glm', 'print.infl', 'print.integrate', 'print.lm', + 'print.logLik', 'print.terms', 'print.ts', 'printCoefmat', 'profile', 'proj', 'promax', 'prop.test', + 'prop.trend.test', 'psignrank', 'pt', 'ptukey', 'punif', 'pweibull', 'pwilcox', 'qbeta', 'qbinom', + 'qbirthday', 'qcauchy', 'qchisq', 'qexp', 'qf', 'qgamma', 'qgeom', 'qhyper', 'qlnorm', 'qlogis', + 'qnbinom', 'qnorm', 'qpois', 'qqline', 'qqnorm', 'qqnorm.default', 'qqplot', 'qsignrank', 'qt', + 'qtukey', 'quade.test', 'quantile', 'quantile.default', 'quasi', 'quasibinomial', 'quasipoisson', + 'qunif', 'qweibull', 'qwilcox', 'r2dtable', 'rbeta', 'rbinom', 'rcauchy', 'rchisq', 'read.ftable', + 'rect.hclust', 'reformulate', 'relevel', 'reorder', 'replications', 'reshape', 'reshapeLong', 'reshapeWide', + 'resid', 'residuals', 'residuals.default', 'residuals.glm', 'residuals.lm', 'rexp', 'rf', 'rgamma', 'rgeom', + 'rhyper', 'rlnorm', 'rlogis', 'rmultinom', 'rnbinom', 'rnorm', 'rpois', 'rsignrank', 'rstandard', 'rstandard.glm', + 'rstandard.lm', 'rstudent', 'rstudent.glm', 'rstudent.lm', 'rt', 'runif', 'runmed', 'rweibull', 'rwilcox', + 'scatter.smooth', 'screeplot', 'sd', 'se.contrast', 'selfStart', 'setNames', 'shapiro.test', 'simulate', + 'smooth', 'smooth.spline', 'smoothEnds', 'sortedXyData', 'spec.ar', 'spec.pgram', 'spec.taper', 'spectrum', + 'spline', 'splinefun', 'splinefunH', 'SSasymp', 'SSasympOff', 'SSasympOrig', 'SSbiexp', 'SSD', 'SSfol', + 'SSfpl', 'SSgompertz', 'SSlogis', 'SSmicmen', 'SSweibull', 'start', 'stat.anova', 'step', 'stepfun', 'stl', + 'StructTS', 'summary.aov', 'summary.aovlist', 'summary.glm', 'summary.infl', 'summary.lm', 'summary.manova', + 'summary.mlm', 'summary.stepfun', 'supsmu', 'symnum', 't.test', 'termplot', 'terms', 'terms.aovlist', + 'terms.default', 'terms.formula', 'terms.terms', 'time', 'toeplitz', 'ts', 'ts.intersect', 'ts.plot', + 'ts.union', 'tsdiag', 'tsp', 'tsp<-', 'tsSmooth', 'TukeyHSD', 'TukeyHSD.aov', 'uniroot', 'update', + 'update.default', 'update.formula', 'var', 'var.test', 'variable.names', 'varimax', 'vcov', 'weighted.mean', + 'weighted.residuals', 'weights', 'wilcox.test', 'window', 'window<-', 'write.ftable', 'xtabs', + ), + 8 => array( // utils pkg + 'alarm', 'apropos', 'argsAnywhere', 'as.person', 'as.personList', 'as.relistable', 'as.roman', + 'assignInNamespace', 'available.packages', 'browseEnv', 'browseURL', 'browseVignettes', 'bug.report', + 'capture.output', 'checkCRAN', 'chooseCRANmirror', 'citation', 'citEntry', 'citFooter', 'citHeader', + 'close.socket', 'combn', 'compareVersion', 'contrib.url', 'count.fields', 'CRAN.packages', 'data', + 'data.entry', 'dataentry', 'de', 'de.ncols', 'de.restore', 'de.setup', 'debugger', 'demo', 'download.file', + 'download.packages', 'dump.frames', 'edit', 'emacs', 'example', 'file_test', 'file.edit', 'find', 'fix', + 'fixInNamespace', 'flush.console', 'formatOL', 'formatUL', 'getAnywhere', 'getCRANmirrors', 'getFromNamespace', + 'getS3method', 'getTxtProgressBar', 'glob2rx', 'head', 'head.matrix', 'help', 'help.request', 'help.search', + 'help.start', 'history', 'index.search', 'install.packages', 'installed.packages', 'is.relistable', + 'limitedLabels', 'loadhistory', 'localeToCharset', 'ls.str', 'lsf.str', 'make.packages.html', 'make.socket', + 'makeRweaveLatexCodeRunner', 'memory.limit', 'memory.size', 'menu', 'methods', 'mirror2html', 'modifyList', + 'new.packages', 'normalizePath', 'nsl', 'object.size', 'old.packages', 'package.contents', 'package.skeleton', + 'packageDescription', 'packageStatus', 'page', 'person', 'personList', 'pico', 'prompt', 'promptData', + 'promptPackage', 'rc.getOption', 'rc.options', 'rc.settings', 'rc.status', 'read.csv', 'read.csv2', 'read.delim', + 'read.delim2', 'read.DIF', 'read.fortran', 'read.fwf', 'read.socket', 'read.table', 'readCitationFile', 'recover', + 'relist', 'remove.packages', 'Rprof', 'Rprofmem', 'RShowDoc', 'RSiteSearch', 'rtags', 'Rtangle', 'RtangleSetup', + 'RtangleWritedoc', 'RweaveChunkPrefix', 'RweaveEvalWithOpt', 'RweaveLatex', 'RweaveLatexFinish', 'RweaveLatexOptions', + 'RweaveLatexSetup', 'RweaveLatexWritedoc', 'RweaveTryStop', 'savehistory', 'select.list', 'sessionInfo', + 'setRepositories', 'setTxtProgressBar', 'stack', 'Stangle', 'str', 'strOptions', 'summaryRprof', 'Sweave', + 'SweaveHooks', 'SweaveSyntaxLatex', 'SweaveSyntaxNoweb', 'SweaveSyntConv', 'tail', 'tail.matrix', 'timestamp', + 'toBibtex', 'toLatex', 'txtProgressBar', 'type.convert', 'unstack', 'unzip', 'update.packages', 'update.packageStatus', + 'upgrade', 'url.show', 'URLdecode', 'URLencode', 'vi', 'View', 'vignette', 'write.csv', 'write.csv2', 'write.socket', + 'write.table', 'wsbrowser', 'xedit', 'xemacs', 'zip.file.extract', + ), + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>',';','|','<-','->', + '^', '-', ':', '::', ':::', '!', '!=', '*', '?', + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF; font-weight: bold;', + 2 => 'color: #0000FF; font-weight: bold;', + 3 => 'color: #CC9900; font-weight: bold;', + 4 => 'color: #0000FF; font-weight: bold;', + 5 => 'color: #0000FF; font-weight: bold;', + 6 => 'color: #0000FF; font-weight: bold;', + 7 => 'color: #0000FF; font-weight: bold;', + 8 => 'color: #0000FF; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #228B22;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + ), + 'BRACKETS' => array( + 0 => 'color: #080;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0000;' + ), + 'METHODS' => array( + 1 => '', + 2 => '' + ), + 'SYMBOLS' => array( + 0 => 'color: #080;' + ), + 'REGEXPS' => array( + 0 => 'color:#A020F0;' + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => 'http://astrostatistics.psu.edu/su07/R/html/graphics/html/{FNAME}.html', // http://sekhon.berkeley.edu/library/graphics/html/{FNAME}.html + 3 => 'http://astrostatistics.psu.edu/su07/R/html/stats/html/Normal.html', // http://sekhon.berkeley.edu/library/stats/html/Normal.html + 4 => 'http://astrostatistics.psu.edu/su07/R/html/stats/html/{FNAME}.html', // http://sekhon.berkeley.edu/library/stats/html/{FNAME}.html + 5 => 'http://astrostatistics.psu.edu/su07/R/html/stats/html/summary.lm.html', // http://sekhon.berkeley.edu/library/stats/html/summary.lm.html + 6 => 'http://astrostatistics.psu.edu/su07/R/html/base/html/Log.html', // http://sekhon.berkeley.edu/library/base/html/Log.html + 7 => '', + 8 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + 0 => array( + GESHI_SEARCH => "([^\w])'([^\\n\\r']*)'", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => "\\1'", + GESHI_AFTER => "'" + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(?|^&\\.])(? "(?![a-zA-Z0-9_\|%\\-&;\\.])" + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/ruby.php b/_piecrust/libs/Geshi/geshi/ruby.php new file mode 100644 index 0000000..69e395e --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/ruby.php @@ -0,0 +1,231 @@ + 'Ruby', + 'COMMENT_SINGLE' => array(1 => "#"), + 'COMMENT_MULTI' => array("=begin" => "=end"), + 'COMMENT_REGEXP' => array( + //Heredoc + 4 => '/<<\s*?(\w+)\\n.*?\\n\\1(?![a-zA-Z0-9])/si', + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', '`','\''), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'alias', 'and', 'begin', 'break', 'case', 'class', + 'def', 'defined', 'do', 'else', 'elsif', 'end', + 'ensure', 'for', 'if', 'in', 'module', 'while', + 'next', 'not', 'or', 'redo', 'rescue', 'yield', + 'retry', 'super', 'then', 'undef', 'unless', + 'until', 'when', 'include' + ), + 2 => array( + '__FILE__', '__LINE__', 'false', 'nil', 'self', 'true', + 'return' + ), + 3 => array( + 'Array', 'Float', 'Integer', 'String', 'at_exit', + 'autoload', 'binding', 'caller', 'catch', 'chop', 'chop!', + 'chomp', 'chomp!', 'eval', 'exec', 'exit', 'exit!', 'fail', + 'fork', 'format', 'gets', 'global_variables', 'gsub', 'gsub!', + 'iterator?', 'lambda', 'load', 'local_variables', 'loop', + 'open', 'p', 'print', 'printf', 'proc', 'putc', 'puts', + 'raise', 'rand', 'readline', 'readlines', 'require', 'select', + 'sleep', 'split', 'sprintf', 'srand', 'sub', 'sub!', 'syscall', + 'system', 'trace_var', 'trap', 'untrace_var' + ), + 4 => array( + 'Abbrev', 'ArgumentError', 'Base64', 'Benchmark', + 'Benchmark::Tms', 'Bignum', 'Binding', 'CGI', 'CGI::Cookie', + 'CGI::HtmlExtension', 'CGI::QueryExtension', + 'CGI::Session', 'CGI::Session::FileStore', + 'CGI::Session::MemoryStore', 'Class', 'Comparable', 'Complex', + 'ConditionVariable', 'Continuation', 'Data', + 'Date', 'DateTime', 'Delegator', 'Dir', 'EOFError', 'ERB', + 'ERB::Util', 'Enumerable', 'Enumerable::Enumerator', 'Errno', + 'Exception', 'FalseClass', 'File', + 'File::Constants', 'File::Stat', 'FileTest', 'FileUtils', + 'FileUtils::DryRun', 'FileUtils::NoWrite', + 'FileUtils::StreamUtils_', 'FileUtils::Verbose', 'Find', + 'Fixnum', 'FloatDomainError', 'Forwardable', 'GC', 'Generator', + 'Hash', 'IO', 'IOError', 'Iconv', 'Iconv::BrokenLibrary', + 'Iconv::Failure', 'Iconv::IllegalSequence', + 'Iconv::InvalidCharacter', 'Iconv::InvalidEncoding', + 'Iconv::OutOfRange', 'IndexError', 'Interrupt', 'Kernel', + 'LoadError', 'LocalJumpError', 'Logger', 'Logger::Application', + 'Logger::Error', 'Logger::Formatter', 'Logger::LogDevice', + 'Logger::LogDevice::LogDeviceMutex', 'Logger::Severity', + 'Logger::ShiftingError', 'Marshal', 'MatchData', + 'Math', 'Matrix', 'Method', 'Module', 'Mutex', 'NameError', + 'NameError::message', 'NilClass', 'NoMemoryError', + 'NoMethodError', 'NotImplementedError', 'Numeric', 'Object', + 'ObjectSpace', 'Observable', 'PStore', 'PStore::Error', + 'Pathname', 'Precision', 'Proc', 'Process', 'Process::GID', + 'Process::Status', 'Process::Sys', 'Process::UID', 'Queue', + 'Range', 'RangeError', 'Rational', 'Regexp', 'RegexpError', + 'RuntimeError', 'ScriptError', 'SecurityError', 'Set', + 'Shellwords', 'Signal', 'SignalException', 'SimpleDelegator', + 'SingleForwardable', 'Singleton', 'SingletonClassMethods', + 'SizedQueue', 'SortedSet', 'StandardError', 'StringIO', + 'StringScanner', 'StringScanner::Error', 'Struct', 'Symbol', + 'SyncEnumerator', 'SyntaxError', 'SystemCallError', + 'SystemExit', 'SystemStackError', 'Tempfile', + 'Test::Unit::TestCase', 'Test::Unit', 'Test', 'Thread', + 'ThreadError', 'ThreadGroup', + 'ThreadsWait', 'Time', 'TrueClass', 'TypeError', 'URI', + 'URI::BadURIError', 'URI::Error', 'URI::Escape', 'URI::FTP', + 'URI::Generic', 'URI::HTTP', 'URI::HTTPS', + 'URI::InvalidComponentError', 'URI::InvalidURIError', + 'URI::LDAP', 'URI::MailTo', 'URI::REGEXP', + 'URI::REGEXP::PATTERN', 'UnboundMethod', 'Vector', 'YAML', + 'ZeroDivisionError', 'Zlib', + 'Zlib::BufError', 'Zlib::DataError', 'Zlib::Deflate', + 'Zlib::Error', 'Zlib::GzipFile', 'Zlib::GzipFile::CRCError', + 'Zlib::GzipFile::Error', 'Zlib::GzipFile::LengthError', + 'Zlib::GzipFile::NoFooter', 'Zlib::GzipReader', + 'Zlib::GzipWriter', 'Zlib::Inflate', 'Zlib::MemError', + 'Zlib::NeedDict', 'Zlib::StreamEnd', 'Zlib::StreamError', + 'Zlib::VersionError', + 'Zlib::ZStream', + 'HTML::Selector', 'HashWithIndifferentAccess', 'Inflector', + 'Inflector::Inflections', 'Mime', 'Mime::Type', + 'OCI8AutoRecover', 'TimeZone', 'XmlSimple' + ), + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '%', '&', '*', '|', '/', '<', '>', + '+', '-', '=>', '<<' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color:#9966CC; font-weight:bold;', + 2 => 'color:#0000FF; font-weight:bold;', + 3 => 'color:#CC0066; font-weight:bold;', + 4 => 'color:#CC00FF; font-weight:bold;', + ), + 'COMMENTS' => array( + 1 => 'color:#008000; font-style:italic;', + 4 => 'color: #cc0000; font-style: italic;', + 'MULTI' => 'color:#000080; font-style:italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color:#000099;' + ), + 'BRACKETS' => array( + 0 => 'color:#006600; font-weight:bold;' + ), + 'STRINGS' => array( + 0 => 'color:#996600;' + ), + 'NUMBERS' => array( + 0 => 'color:#006666;' + ), + 'METHODS' => array( + 1 => 'color:#9900CC;' + ), + 'SYMBOLS' => array( + 0 => 'color:#006600; font-weight:bold;' + ), + 'REGEXPS' => array( + 0 => 'color:#ff6633; font-weight:bold;', + 1 => 'color:#0066ff; font-weight:bold;', + 2 => 'color:#6666ff; font-weight:bold;', + 3 => 'color:#ff3333; font-weight:bold;' + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + 0 => array(//Variables + GESHI_SEARCH => "([[:space:]])(\\$[a-zA-Z_][a-zA-Z0-9_]*)", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 1 => array(//Arrays + GESHI_SEARCH => "([[:space:]])(@[a-zA-Z_][a-zA-Z0-9_]*)", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*",//Static OOP symbols + 3 => array( + GESHI_SEARCH => "([[:space:]]|\[|\()(:[a-zA-Z_][a-zA-Z0-9_]*)", + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '<%' => '%>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + ), + 'TAB_WIDTH' => 2 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/sas.php b/_piecrust/libs/Geshi/geshi/sas.php new file mode 100644 index 0000000..ba1f85a --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/sas.php @@ -0,0 +1,290 @@ + 'SAS', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + '_ALL_','_CHARACTER_','_INFILE_','_N_','_NULL_','_NUMERIC_', + '_WEBOUT_' + ), + 2 => array( + '%BQUOTE','%CMPRES','%COMPSTOR','%DATATYP','%DISPLAY','%DO','%ELSE', + '%END','%EVAL','%GLOBAL','%GOTO','%IF','%INDEX','%INPUT','%KEYDEF', + '%LABEL','%LEFT','%LENGTH','%LET','%LOCAL','%LOWCASE','%MACRO', + '%MEND','%NRBQUOTE','%NRQUOTE','%NRSTR','%PUT','%QCMPRES','%QLEFT', + '%QLOWCASE','%QSCAN','%QSUBSTR','%QSYSFUNC','%QTRIM','%QUOTE', + '%QUPCASE','%SCAN','%STR','%SUBSTR','%SUPERQ','%SYSCALL', + '%SYSEVALF','%SYSEXEC','%SYSFUNC','%SYSGET','%SYSLPUT','%SYSPROD', + '%SYSRC','%SYSRPUT','%THEN','%TO','%TRIM','%UNQUOTE','%UNTIL', + '%UPCASE','%VERIFY','%WHILE','%WINDOW' + ), + 3 => array( + 'ABS','ADDR','AIRY','ARCOS','ARSIN','ATAN','ATTRC','ATTRN','BAND', + 'BETAINV','BLSHIFT','BNOT','BOR','BRSHIFT','BXOR','BYTE','CDF', + 'CEIL','CEXIST','CINV','CLOSE','CNONCT','COLLATE','COMPBL', + 'COMPOUND','COMPRESS','COSH','COS','CSS','CUROBS','CV','DACCDBSL', + 'DACCDB','DACCSL','DACCSYD','DACCTAB','DAIRY','DATETIME','DATEJUL', + 'DATEPART','DATE','DAY','DCLOSE','DEPDBSL','DEPDB','DEPSL','DEPSYD', + 'DEPTAB','DEQUOTE','DHMS','DIF','DIGAMMA','DIM','DINFO','DNUM', + 'DOPEN','DOPTNAME','DOPTNUM','DREAD','DROPNOTE','DSNAME','ERFC', + 'ERF','EXIST','EXP','FAPPEND','FCLOSE','FCOL','FDELETE','FETCHOBS', + 'FETCH','FEXIST','FGET','FILEEXIST','FILENAME','FILEREF','FINFO', + 'FINV','FIPNAMEL','FIPNAME','FIPSTATE','FLOOR','FNONCT','FNOTE', + 'FOPEN','FOPTNAME','FOPTNUM','FPOINT','FPOS','FPUT','FREAD', + 'FREWIND','FRLEN','FSEP','FUZZ','FWRITE','GAMINV','GAMMA', + 'GETOPTION','GETVARC','GETVARN','HBOUND','HMS','HOSTHELP','HOUR', + 'IBESSEL','INDEXW','INDEXC','INDEX','INPUTN','INPUTC','INPUT', + 'INTRR','INTCK','INTNX','INT','IRR','JBESSEL','JULDATE','KURTOSIS', + 'LAG','LBOUND','LEFT','LENGTH','LGAMMA','LIBNAME','LIBREF','LOG10', + 'LOG2','LOGPDF','LOGPMF','LOGSDF','LOG','LOWCASE','MAX','MDY', + 'MEAN','MINUTE','MIN','MOD','MONTH','MOPEN','MORT','NETPV','NMISS', + 'NORMAL','NPV','N','OPEN','ORDINAL','PATHNAME','PDF','PEEKC','PEEK', + 'PMF','POINT','POISSON','POKE','PROBBETA','PROBBNML','PROBCHI', + 'PROBF','PROBGAM','PROBHYPR','PROBIT','PROBNEGB','PROBNORM','PROBT', + 'PUTN','PUTC','PUT','QTR','QUOTE','RANBIN','RANCAU','RANEXP', + 'RANGAM','RANGE','RANK','RANNOR','RANPOI','RANTBL','RANTRI', + 'RANUNI','REPEAT','RESOLVE','REVERSE','REWIND','RIGHT','ROUND', + 'SAVING','SCAN','SDF','SECOND','SIGN','SINH','SIN','SKEWNESS', + 'SOUNDEX','SPEDIS','SQRT','STDERR','STD','STFIPS','STNAME', + 'STNAMEL','SUBSTR','SUM','SYMGET','SYSGET','SYSMSG','SYSPROD', + 'SYSRC','SYSTEM','TANH','TAN','TIMEPART','TIME','TINV','TNONCT', + 'TODAY','TRANSLATE','TRANWRD','TRIGAMMA','TRIMN','TRIM','TRUNC', + 'UNIFORM','UPCASE','USS','VARFMT','VARINFMT','VARLABEL','VARLEN', + 'VARNAME','VARNUM','VARRAYX','VARRAY','VARTYPE','VAR','VERIFY', + 'VFORMATX','VFORMATDX','VFORMATD','VFORMATNX','VFORMATN', + 'VFORMATWX','VFORMATW','VFORMAT','VINARRAYX','VINARRAY', + 'VINFORMATX','VINFORMATDX','VINFORMATD','VINFORMATNX','VINFORMATN', + 'VINFORMATWX','VINFORMATW','VINFORMAT','VLABELX','VLABEL', + 'VLENGTHX','VLENGTH','VNAMEX','VNAME','VTYPEX','VTYPE','WEEKDAY', + 'YEAR','YYQ','ZIPFIPS','ZIPNAME','ZIPNAMEL','ZIPSTATE' + ), + 4 => array( + 'ABORT','ADD','ALTER','AND','ARRAY','AS','ATTRIB','BY','CALL', + 'CARDS4','CASCADE','CATNAME','CHECK','CONTINUE','CREATE', + 'DATALINES4','DELETE','DESCRIBE','DISPLAY','DISTINCT','DM','DROP', + 'ENDSAS','FILE','FOOTNOTE','FOREIGN','FORMAT','FROM', + 'GOTO','GROUP','HAVING','IN','INFILE','INFORMAT', + 'INSERT','INTO','KEEP','KEY','LABEL','LEAVE', + 'LIKE','LINK','LIST','LOSTCARD','MERGE','MESSAGE','MISSING', + 'MODIFY','MSGTYPE','NOT','NULL','ON','OPTIONS','OR','ORDER', + 'OUTPUT','PAGE','PRIMARY','REDIRECT','REFERENCES','REMOVE', + 'RENAME','REPLACE','RESET','RESTRICT','RETAIN','RETURN','SELECT', + 'SET','SKIP','STARTSAS','STOP','SYSTASK','TABLE','TITLE','UNIQUE', + 'UPDATE','VALIDATE','VIEW','WAITSAS','WHERE','WINDOW','X' + ), + 5 => array( + 'DO','ELSE','END','IF','THEN','UNTIL','WHILE' + ), + 6 => array( + 'RUN','QUIT','DATA' + ), + 7 => array( + 'ERROR' + ), + 8 => array( + 'WARNING' + ), + 9 => array( + 'NOTE' + ) + ), + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false, + 9 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff;', + 2 => 'color: #0000ff;', + 3 => 'color: #0000ff;', + 4 => 'color: #0000ff;', + 5 => 'color: #0000ff;', + 6 => 'color: #000080; font-weight: bold;', + 7 => 'color: #ff0000;', + 8 => 'color: #00ff00;', + 9 => 'color: #0000ff;' + ), + 'COMMENTS' => array( +// 1 => 'color: #006400; font-style: italic;', + 'MULTI' => 'color: #006400; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #a020f0;' + ), + 'NUMBERS' => array( + 0 => 'color: #2e8b57; font-weight: bold;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff; font-weight: bold;', + 1 => 'color: #000080; font-weight: bold;', + 2 => 'color: #006400; font-style: italic;', + 3 => 'color: #006400; font-style: italic;', + 4 => 'color: #006400; font-style: italic;', + 5 => 'color: #ff0000; font-weight: bold;', + 6 => 'color: #00ff00; font-style: italic;', + 7 => 'color: #0000ff; font-style: normal;', + 8 => 'color: #b218b2; font-weight: bold;', + 9 => 'color: #b218b2; font-weight: bold;' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + 9 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => "&[a-zA-Z_][a-zA-Z0-9_]*", + 1 => array(//Procedures + GESHI_SEARCH => '(^\\s*)(PROC \\w+)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'im', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 2 => array( + GESHI_SEARCH => '(^\\s*)(\\*.*;)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'im', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 3 => array( + GESHI_SEARCH => '(.*;\\s*)(\\*.*;)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'im', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 4 => array( + GESHI_SEARCH => '(^\\s*)(%\\*.*;)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'im', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 5 => array(//Error messages + GESHI_SEARCH => '(^ERROR.*)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'im', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 6 => array(//Warning messages + GESHI_SEARCH => '(^WARNING.*)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'im', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 7 => array(//Notice messages + GESHI_SEARCH => '(^NOTE.*)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'im', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 8 => array( + GESHI_SEARCH => '(^\\s*)(CARDS.*)(^\\s*;\\s*$)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'sim', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + 9 => array( + GESHI_SEARCH => '(^\\s*)(DATALINES.*)(^\\s*;\\s*$)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'sim', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/scala.php b/_piecrust/libs/Geshi/geshi/scala.php new file mode 100644 index 0000000..58e7d23 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/scala.php @@ -0,0 +1,122 @@ + 'Scala', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'abstract', 'case', 'catch', 'class', 'def', + 'do', 'else', 'extends', 'false', 'final', + 'finally', 'for', 'forSome', 'if', 'implicit', + 'import', 'match', 'new', 'null', 'object', + 'override', 'package', 'private', 'protected', 'requires', + 'return', 'sealed', 'super', 'this', 'throw', + 'trait', 'try', 'true', 'type', 'val', + 'var', 'while', 'with', 'yield' + ), + 2 => array( + 'void', 'double', 'int', 'boolean', 'byte', 'short', 'long', 'char', 'float' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?', + '_', ':', '=', '=>', '<<:', + '<%', '>:', '#', '@' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff; font-weight: bold;', + 2 => 'color: #9999cc; font-weight: bold;', + ), + 'COMMENTS' => array( + 1=> 'color: #008000; font-style: italic;', + 'MULTI' => 'color: #00ff00; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #0000ff; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #F78811;' + ), + 'STRINGS' => array( + 0 => 'color: #6666FF;' + ), + 'NUMBERS' => array( + 0 => 'color: #F78811;' + ), + 'METHODS' => array( + 1 => 'color: #000000;', + 2 => 'color: #000000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000080;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => 'http://scala-lang.org', + 2 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/scheme.php b/_piecrust/libs/Geshi/geshi/scheme.php new file mode 100644 index 0000000..7258914 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/scheme.php @@ -0,0 +1,170 @@ + 'Scheme', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array('#|' => '|#'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'abs', 'acos', 'and', 'angle', 'append', 'appply', 'approximate', + 'asin', 'assoc', 'assq', 'assv', 'atan', + + 'begin', 'boolean?', 'bound-identifier=?', + + 'caar', 'caddr', 'cadr', 'call-with-current-continuation', + 'call-with-input-file', 'call-with-output-file', 'call/cc', 'car', + 'case', 'catch', 'cdddar', 'cddddr', 'cdr', 'ceiling', 'char->integer', + 'char-alphabetic?', 'char-ci<=?', 'char-ci=?', + 'char-ci>?', 'char-ci=?', 'char-downcase', 'char-lower-case?', + 'char-numeric', 'char-ready', 'char-ready?', 'char-upcase', + 'char-upper-case?', 'char-whitespace?', 'char<=?', 'char=?', 'char>?', 'char?', 'close-input-port', 'close-output-port', + 'complex?', 'cond', 'cons', 'construct-identifier', 'cos', + 'current-input-port', 'current-output-port', + + 'd', 'define', 'define-syntax', 'delay', 'denominator', 'display', 'do', + + 'e', 'eof-object?', 'eq?', 'equal?', 'eqv?', 'even?', 'exact->inexact', + 'exact?', 'exp', 'expt', 'else', + + 'f', 'floor', 'for-each', 'force', 'free-identifer=?', + + 'gcd', 'gen-counter', 'gen-loser', 'generate-identifier', + + 'identifier->symbol', 'identifier', 'if', 'imag-part', 'inexact->exact', + 'inexact?', 'input-port?', 'integer->char', 'integer?', 'integrate-system', + + 'l', 'lambda', 'last-pair', 'lcm', 'length', 'let', 'let*', 'letrec', + 'list', 'list->string', 'list->vector', 'list-ref', 'list-tail', 'list?', + 'load', 'log', + + 'magnitude', 'make-polar', 'make-promise', 'make-rectangular', + 'make-string', 'make-vector', 'map', 'map-streams', 'max', 'member', + 'memq', 'memv', 'min', 'modulo', + + 'negative', 'newline', 'nil', 'not', 'null?', 'number->string', 'number?', + 'numerator', + + 'odd?', 'open-input-file', 'open-output-file', 'or', 'output-port', + + 'pair?', 'peek-char', 'positive?', 'procedure?', + + 'quasiquote', 'quote', 'quotient', + + 'rational', 'rationalize', 'read', 'read-char', 'real-part', 'real?', + 'remainder', 'return', 'reverse', + + 's', 'sequence', 'set!', 'set-char!', 'set-cdr!', 'sin', 'sqrt', 'string', + 'string->list', 'string->number', 'string->symbol', 'string-append', + 'string-ci<=?', 'string-ci=?', + 'string-ci>?', 'string-copy', 'string-fill!', 'string-length', + 'string-ref', 'string-set!', 'string<=?', 'string=?', 'string>?', 'string?', 'substring', 'symbol->string', + 'symbol?', 'syntax', 'syntax-rules', + + 't', 'tan', 'template', 'transcript-off', 'transcript-on', 'truncate', + + 'unquote', 'unquote-splicing', 'unwrap-syntax', + + 'vector', 'vector->list', 'vector-fill!', 'vector-length', 'vector-ref', + 'vector-set!', 'vector?', + + 'with-input-from-file', 'with-output-to-file', 'write', 'write-char', + + 'zero?' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>',';','|' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/scilab.php b/_piecrust/libs/Geshi/geshi/scilab.php new file mode 100644 index 0000000..b2636c7 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/scilab.php @@ -0,0 +1,295 @@ + 'SciLab', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + 2 => "/(?<=\)|\]|\w)'/" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'HARDQUOTE' => array("'", "'"), + 'HARDESCAPE' => array(), + 'KEYWORDS' => array( + 1 => array( + 'if', 'else', 'elseif', 'end', 'select', 'case', 'for', 'while', 'break' + ), + 2 => array( + 'STDIN', 'STDOUT', 'STDERR', + '%i', '%pi', '%e', '%eps', '%nan', '%inf', '%s', '%t', '%f', + 'usual', 'polynomial', 'boolean', 'character', 'function', 'rational', 'state-space', + 'sparse', 'boolean sparse', 'list', 'tlist', 'library', 'endfunction' + ), + 3 => array( + '%asn', '%helps', '%k', '%sn', 'abcd', 'abinv', 'abort', 'about', 'About_M2SCI_tools', + 'abs', 'acos', 'acosh', 'acoshm', 'acosm', 'AdCommunications', 'add_demo', 'add_edge', + 'add_help_chapter', 'add_node', 'add_palette', 'addcolor', 'addf', 'addinter', 'addmenu', + 'adj_lists', 'adj2sp', 'aff2ab', 'alufunctions', 'amell', 'analpf', 'analyze', 'and', + 'ans', 'apropos', 'arc_graph', 'arc_number', 'arc_properties', 'argn', 'arhnk', 'arl2', + 'arma', 'arma2p', 'armac', 'armax', 'armax1', 'arsimul', 'artest', 'articul', 'ascii', + 'asciimat', 'asin', 'asinh', 'asinhm', 'asinm', 'assignation', 'atan', 'atanh', 'atanhm', + 'atanm', 'augment', 'auread', 'auwrite', 'axes_properties', 'axis_properties', 'backslash', + 'balanc', 'balreal', 'bandwr', 'banner','bar', 'barh', 'barhomogenize', 'basename', 'bdiag', + 'beep', 'besselh', 'besseli', 'besselj', 'besselk', 'bessely', 'best_match', 'beta','bezout', + 'bifish', 'bilin', 'binomial', 'black', 'bloc2exp', 'bloc2ss', 'bode', 'bool2s', + 'boucle', 'brackets', 'browsevar', 'bsplin3val', 'bstap', 'buttmag', 'buttondialog', + 'bvode', 'bvodeS', 'c_link', 'cainv', 'calendar', 'calerf', 'calfrq', 'call', 'canon', 'casc', + 'cat', 'catch', 'ccontrg', 'cd', 'cdfbet', 'cdfbin', 'cdfchi', 'cdfchn', 'cdff', 'cdffnc', + 'cdfgam', 'cdfnbn', 'cdfnor', 'cdfpoi', 'cdft', 'ceil', 'cell', 'cell2mat', 'cellstr', 'center', + 'cepstrum', 'chain_struct', 'chaintest', 'champ', 'champ_properties', 'champ1', 'char', 'chart', + 'chartooem', 'chdir', 'cheb1mag', 'cheb2mag', 'check_graph', 'chepol', 'chfact', 'chol', 'chsolve', + 'circuit', 'classmarkov', 'clc', 'clean', 'clear', 'clear_pixmap', 'clearfun', 'clearglobal','clf', + 'clipboard', 'close', 'cls2dls', 'cmb_lin', 'cmndred', 'cmoment', 'code2str', 'coeff', 'coff', 'coffg', + 'colcomp', 'colcompr', 'colinout', 'colon', 'color', 'color_list', 'colorbar', 'colordef', 'colormap', + 'colregul', 'comma', 'comments', 'comp', 'companion', 'comparison', 'Compound_properties', 'con_nodes', + 'cond', 'config', 'configure_msvc', 'conj', 'connex', 'console', 'cont_frm', 'cont_mat', 'Contents', + 'continue', 'contour', 'contour2d', 'contour2di', 'contourf', 'contr', 'contract_edge', 'contrss', + 'convex_hull', 'convol', 'convstr', 'copfac', 'copy', 'corr', 'correl', 'cos', 'cosh', 'coshm', + 'cosm', 'cotg', 'coth', 'cothm', 'covar', 'create_palette', 'cshep2d', 'csim', 'cspect', 'Cste', + 'ctr_gram', 'cumprod', 'cumsum', 'cycle_basis', 'czt', 'dasrt', 'dassl', 'datafit', 'date', 'datenum', + 'datevec', 'dbphi', 'dcf', 'ddp', 'debug', 'dec2hex', 'deff', 'definedfields', 'degree', 'delbpt', + 'delete', 'delete_arcs', 'delete_nodes', 'delip', 'delmenu', 'demoplay', 'denom', 'derivat', 'derivative', + 'des2ss', 'des2tf', 'det', 'determ', 'detr', 'detrend', 'dft', 'dhinf', 'dhnorm', 'diag', 'diary', + 'diff', 'diophant', 'dir', 'dirname', 'disp', 'dispbpt', 'dispfiles', 'dlgamma', 'dnaupd', 'do', 'dot', + 'double', 'dragrect', 'draw', 'drawaxis', 'drawlater', 'drawnow', 'driver', 'dsaupd', 'dscr', + 'dsearch', 'dsimul', 'dt_ility', 'dtsi', 'edge_number', 'edit', 'edit_curv', 'edit_error', + 'edit_graph', 'edit_graph_menus', 'editvar', 'eigenmarkov', 'ell1mag', + 'empty', 'emptystr', 'eqfir', 'eqiir', 'equal', 'Equal', 'equil', 'equil1', + 'ereduc', 'erf', 'erfc', 'erfcx', 'errbar', 'errcatch', 'errclear', 'error', 'error_table', 'etime', + 'eval', 'eval_cshep2d', 'eval3d', 'eval3dp', 'evans', 'evstr', 'excel2sci', 'exec', 'execstr', 'exists', + 'exit', 'exp', 'expm', 'external', 'extraction', 'eye', 'fac3d', 'factorial', 'factors', 'faurre', 'fchamp', + 'fcontour', 'fcontour2d', 'fec', 'fec_properties', 'feedback', 'feval', 'ffilt', 'fft', 'fft2', 'fftshift', + 'fgrayplot', 'figure', 'figure_properties', 'figure_style', 'file', 'fileinfo', 'fileparts', 'filter', 'find', + 'find_freq', 'find_path', 'findABCD', 'findAC', 'findBD', 'findBDK', 'findm', 'findmsvccompiler', 'findobj', + 'findR', 'findx0BD', 'firstnonsingleton', 'fit_dat', 'fix', 'floor', 'flts', 'foo', 'format', + 'formatman', 'fort', 'fourplan', 'fplot2d', 'fplot3d', 'fplot3d1', 'fprintf', 'fprintfMat', 'frep2tf', + 'freq', 'freson', 'frexp', 'frfit', 'frmag', 'fscanf', 'fscanfMat', 'fsfirlin', 'fsolve', 'fspecg', + 'fstabst', 'fstair', 'ftest', 'ftuneq', 'full', 'fullfile', 'fullrf', 'fullrfk', 'fun2string', 'Funcall', + 'funcprot', 'functions', 'funptr', 'fusee', 'G_make', 'g_margin', 'gainplot', 'gamitg', + 'gamma', 'gammaln', 'gca', 'gcare', 'gcd', 'gce', 'gcf', 'gda', 'gdf', 'gen_net', 'genfac3d', 'genlib', + 'genmarkov', 'geom3d', 'geomean', 'get', 'get_contents_infer', 'get_function_path', 'getcolor', 'getcwd', + 'getd', 'getdate', 'getenv', 'getf', 'getfield', 'getfont', 'gethistory', 'getio', 'getlinestyle', + 'getlongpathname', 'getmark', 'getmemory', 'getos', 'getpid', 'getscilabkeywords', 'getshell', + 'getshortpathname', 'getsymbol', 'getvalue', 'getversion', 'gfare', 'gfrancis', 'girth', 'givens', + 'glever', 'glist', 'global', 'GlobalProperty', 'glue', 'gmres', 'gpeche', 'gr_menu', 'graduate', 'grand', + 'graph_2_mat', 'graph_center', 'graph_complement', 'graph_diameter', 'graph_power', 'graph_simp', 'graph_sum', + 'graph_union', 'graphic', 'Graphics', 'graphics_entities', 'graph-list', 'graycolormap', 'grayplot', + 'grayplot_properties', 'graypolarplot', 'great', 'grep', 'group', 'gschur', 'gsort', 'gspec', 'gstacksize', + 'gtild', 'h_cl', 'h_inf', 'h_inf_st', 'h_norm', 'h2norm', 'halt', 'hamilton', 'hank', 'hankelsv', 'harmean', + 'hat', 'havewindow', 'head_comments', 'help', 'help_skeleton', 'hermit', 'hess', 'hex2dec', 'hilb', 'hinf', + 'hist3d', 'histplot', 'horner', 'host', 'hotcolormap', 'householder', 'hrmt', 'hsv2rgb', 'hsvcolormap', + 'htrianr', 'hypermat', 'hypermatrices', 'iconvert', 'ieee', 'ifft', 'iir', 'iirgroup', 'iirlp', + 'ilib_build', 'ilib_compile', 'ilib_for_link', 'ilib_gen_gateway', 'ilib_gen_loader', 'ilib_gen_Make', + 'im_inv', 'imag', 'impl', 'imrep2ss', 'imult', 'ind2sub', 'Infer', 'inistate', 'input', 'insertion', 'int', + 'int16', 'int2d', 'int32', 'int3d', 'int8', 'intc', 'intdec', 'integrate', 'interp', 'interp1', 'interp2d', + 'interp3d', 'interpln', 'intersci', 'intersect', 'intg', 'intl', 'intppty', 'intsplin', 'inttrap', 'inttype', + 'inv', 'inv_coeff', 'invr', 'invsyslin', 'iqr', 'is_connex', 'iscellstr', 'isdef', 'isdir', 'isempty', + 'isequal', 'isequalbitwise', 'iserror', 'isglobal', 'isinf', 'isnan', 'isoview', 'isreal', 'javasci', + 'jetcolormap', 'jmat', 'justify', 'kalm', 'karmarkar', 'kernel', 'keyboard', 'knapsack', 'kpure', 'krac2', + 'kron', 'kroneck', 'label_properties', 'labostat', 'LANGUAGE', 'lasterror', 'lattn', 'lattp', 'lcf', 'lcm', + 'lcmdiag', 'ldiv', 'ldivf', 'leastsq', 'left', 'legend', 'legend_properties', 'legendre', 'legends', 'length', + 'leqr', 'less', 'lev', 'levin', 'lex_sort', 'lft', 'lgfft', 'lib', 'lin', 'lin2mu', 'lindquist', + 'line_graph', 'linear_interpn', 'lines', 'LineSpec', 'linf', 'linfn', 'link', 'linmeq', 'linpro', 'linsolve', + 'linspace', 'listfiles', 'listvarinfile', 'lmisolver', 'lmitool', 'load', 'load_graph', 'loadhistory', + 'loadmatfile', 'loadplots', 'loadwave', 'locate', 'log', 'log10', 'log1p', 'log2', 'logm', 'logspace', + 'lotest', 'lqe', 'lqg', 'lqg_ltr', 'lqg2stan', 'lqr', 'ls', 'lsq', 'lsq_splin', 'lsqrsolve', 'lsslist', + 'lstcat', 'lstsize', 'ltitr', 'lu', 'ludel', 'lufact', 'luget', 'lusolve', 'lyap', 'm_circle', 'm2scideclare', + 'macglov', 'macr2lst', 'macr2tree', 'macro', 'macrovar', 'mad', 'make_graph', 'make_index', 'makecell', 'man', + 'manedit', 'mapsound', 'markp2ss', 'mat_2_graph', 'matfile2sci', 'Matlab-Scilab_character_strings', 'Matplot', + 'Matplot_properties', 'Matplot1', 'matrices', 'matrix', 'max', 'max_cap_path', 'max_clique', 'max_flow', + 'maxi', 'mcisendstring', 'mclearerr', 'mclose', 'mdelete', 'mean', 'meanf', 'median', 'menus', 'meof', + 'merror', 'mese', 'mesh', 'mesh2d', 'meshgrid', 'mfft', 'mfile2sci', 'mfprintf', 'mfscanf', 'mget', 'mgeti', + 'mgetl', 'mgetstr', 'milk_drop', 'min', 'min_lcost_cflow', 'min_lcost_flow1', 'min_lcost_flow2', + 'min_qcost_flow', 'min_weight_tree', 'mine', 'mini', 'minreal', 'minss', 'minus', 'mkdir', 'mlist', 'mode', + 'modulo', 'moment', 'mopen', 'move', 'mprintf', 'mps2linpro', 'mput', 'mputl', 'mputstr', 'mrfit', 'mscanf', + 'msd', 'mseek', 'msprintf', 'msscanf', 'mstr2sci', 'mtell', 'mtlb_0', 'mtlb_a', 'mtlb_all', 'mtlb_any', + 'mtlb_axis', 'mtlb_beta', 'mtlb_box', 'mtlb_close', 'mtlb_colordef', 'mtlb_conv', 'mtlb_cumprod', 'mtlb_cumsum', + 'mtlb_dec2hex', 'mtlb_delete', 'mtlb_diag', 'mtlb_diff', 'mtlb_dir', 'mtlb_double', 'mtlb_e', 'mtlb_echo', + 'mtlb_eig', 'mtlb_eval', 'mtlb_exist', 'mtlb_eye', 'mtlb_false', 'mtlb_fft', 'mtlb_fftshift', 'mtlb_find', + 'mtlb_findstr', 'mtlb_fliplr', 'mtlb_fopen', 'mtlb_format', 'mtlb_fprintf', 'mtlb_fread', 'mtlb_fscanf', + 'mtlb_full', 'mtlb_fwrite', 'mtlb_grid', 'mtlb_hold', 'mtlb_i', 'mtlb_ifft', 'mtlb_imp', 'mtlb_int16', + 'mtlb_int32', 'mtlb_int8', 'mtlb_is', 'mtlb_isa', 'mtlb_isfield', 'mtlb_isletter', 'mtlb_isspace', 'mtlb_l', + 'mtlb_legendre', 'mtlb_linspace', 'mtlb_load', 'mtlb_logic', 'mtlb_logical', 'mtlb_lower', 'mtlb_max', + 'mtlb_min', 'mtlb_mode', 'mtlb_more', 'mtlb_num2str', 'mtlb_ones', 'mtlb_plot', 'mtlb_prod', 'mtlb_rand', + 'mtlb_randn', 'mtlb_rcond', 'mtlb_realmax', 'mtlb_realmin', 'mtlb_repmat', 'mtlb_s', 'mtlb_save', + 'mtlb_setstr', 'mtlb_size', 'mtlb_sort', 'mtlb_sparse', 'mtlb_strcmp', 'mtlb_strcmpi', 'mtlb_strfind', + 'mtlb_strrep', 'mtlb_sum', 'mtlb_t', 'mtlb_toeplitz', 'mtlb_tril', 'mtlb_triu', 'mtlb_true', 'mtlb_uint16', + 'mtlb_uint32', 'mtlb_uint8', 'mtlb_upper', 'mtlb_zeros', 'mu2lin', 'mucomp', 'mulf', 'mvvacov', 'name2rgb', + 'names', 'nancumsum', 'nand2mean', 'nanmax', 'nanmean', 'nanmeanf', 'nanmedian', 'nanmin', 'nanstdev', + 'nansum', 'narsimul', 'NDcost', 'ndgrid', 'ndims', 'nearfloat', 'nehari', 'neighbors', 'netclose', 'netwindow', + 'netwindows', 'new', 'newaxes', 'newest', 'newfun', 'nextpow2', 'nf3d', 'nfreq', 'nlev', 'nnz', 'node_number', + 'nodes_2_path', 'nodes_degrees', 'noisegen', 'norm', 'not', 'null', 'number_properties', 'numdiff', 'numer', + 'nyquist', 'object_editor', 'obs_gram', 'obscont', 'obscont1', 'observer', 'obsv_mat', 'obsvss', 'ode', + 'ode_discrete', 'ode_optional_output', 'ode_root', 'odedc', 'odeoptions', 'oemtochar', 'old_style', + 'oldbesseli', 'oldbesselj', 'oldbesselk', 'oldbessely', 'oldload', 'oldplot', 'oldsave', 'ones', + 'Operation', 'optim', 'or', 'orth', 'overloading', 'p_margin', 'param3d', 'param3d_properties', + 'param3d1', 'paramfplot2d', 'parents', 'parrot', 'part', 'path_2_nodes', 'pathconvert', 'pause', 'pbig', + 'pca', 'pcg', 'pdiv', 'pen2ea', 'pencan', 'penlaur', 'percent', 'perctl', 'perfect_match', 'perl', + 'perms', 'permute', 'pertrans', 'pfss', 'phasemag', 'phc', 'pie', 'pinv', 'pipe_network', 'playsnd', 'plot', + 'plot_graph', 'plot2d', 'plot2d_old_version', 'plot2d1', 'plot2d2', 'plot2d3', 'plot2d4', 'plot3d', + 'plot3d_old_version', 'plot3d1', 'plot3d2', 'plot3d3', 'plotframe', 'plotprofile', 'plus', 'plzr', + 'pmodulo', 'pol2des', 'pol2str', 'pol2tex', 'polar', 'polarplot', 'polfact', 'poly', 'polyline_properties', + 'portr3d', 'portrait', 'power', 'ppol', 'prbs_a', 'predecessors', 'predef', 'print', 'printf', + 'printf_conversion', 'printing', 'printsetupbox', 'prod', 'profile', 'progressionbar', 'proj', 'projsl', + 'projspec', 'psmall', 'pspect', 'pvm', 'pvm_addhosts', 'pvm_barrier', 'pvm_bcast', 'pvm_bufinfo', 'pvm_config', + 'pvm_delhosts', 'pvm_error', 'pvm_exit', 'pvm_f772sci', 'pvm_get_timer', 'pvm_getinst', 'pvm_gettid', + 'pvm_gsize', 'pvm_halt', 'pvm_joingroup', 'pvm_kill', 'pvm_lvgroup', 'pvm_mytid', 'pvm_parent', 'pvm_probe', + 'pvm_recv', 'pvm_reduce', 'pvm_sci2f77', 'pvm_send', 'pvm_set_timer', 'pvm_spawn', 'pvm_spawn_independent', + 'pvm_start', 'pvm_tasks', 'pvm_tidtohost', 'pvmd3', 'pwd', 'qassign', 'qld', 'qmr', 'qr', 'quapro', 'quart', + 'quaskro', 'quit', 'quote', 'rand', 'randpencil', 'range', 'rank', 'rankqr', 'rat', 'rcond', + 'rdivf', 'read', 'read4b', 'readb', 'readc_', 'readmps', 'readxls', 'real', 'realtime', 'realtimeinit', + 'rectangle_properties', 'recur', 'reglin', 'regress', 'remez', 'remezb', 'repfreq', 'replot', 'resethistory', + 'residu', 'resume', 'return', 'rgb2name', 'ric_desc', 'ricc', 'riccati', 'rlist', 'rmdir', 'roots', 'rotate', + 'round', 'routh_t', 'rowcomp', 'rowcompr', 'rowinout', 'rowregul', 'rowshuff', 'rpem', 'rref', 'rtitr', + 'rubberbox', 'salesman', 'sample', 'samplef', 'samwr', 'save', 'save_format', 'save_graph', 'savehistory', + 'savematfile', 'savewave', 'sca', 'scaling', 'scanf', 'scanf_conversion', 'scf', 'schur', 'sci_files', + 'sci2exp', 'sci2for', 'sci2map', 'sciargs', 'SciComplex', 'SciComplexArray', 'SciDouble', 'SciDoubleArray', + 'scilab', 'Scilab', 'ScilabEval', 'scilink', 'scipad', 'SciString', 'SciStringArray', 'sd2sci', 'sda', 'sdf', + 'secto3d', 'segs_properties', 'semi', 'semicolon', 'semidef', 'sensi', 'set', 'set_posfig_dim', + 'setbpt', 'setdiff', 'setenv', 'seteventhandler', 'setfield', 'sethomedirectory', 'setlanguage', 'setmenu', + 'sfact', 'Sfgrayplot', 'Sgrayplot', 'sgrid', 'shortest_path', 'show_arcs', 'show_graph', 'show_nodes', + 'show_pixmap', 'showprofile', 'sident', 'sign', 'Signal', 'signm', 'simp', 'simp_mode', 'sin', 'sinc', + 'sincd', 'sinh', 'sinhm', 'sinm', 'size', 'slash', 'sleep', 'sm2des', 'sm2ss', 'smooth', 'solve', + 'sorder', 'sort', 'sound', 'soundsec', 'sp2adj', 'spaninter', 'spanplus', 'spantwo', 'spchol', + 'spcompack', 'spec', 'specfact', 'speye', 'spget', 'splin', 'splin2d', 'splin3d', 'split_edge', 'spones', + 'sprand', 'sprintf', 'spzeros', 'sqroot', 'sqrt', 'sqrtm', 'square', 'squarewave', 'srfaur', 'srkf', 'ss2des', + 'ss2ss', 'ss2tf', 'sscanf', 'sskf', 'ssprint', 'ssrand', 'st_deviation', 'st_ility', 'stabil', 'stacksize', + 'star', 'startup', 'stdev', 'stdevf', 'str2code', 'strange', 'strcat', 'strindex', 'string', 'stringbox', + 'strings', 'stripblanks', 'strong_con_nodes', 'strong_connex', 'strsplit', 'strsubst', 'struct', 'sub2ind', + 'subf', 'subgraph', 'subplot', 'successors', 'sum', 'supernode', 'surf', 'surface_properties', 'sva', + 'svd', 'svplot', 'sylm', 'sylv', 'symbols', 'sysconv', 'sysdiag', 'sysfact', 'syslin', 'syssize', 'system', + 'systems', 'systmat', 'tabul', 'tan', 'tangent', 'tanh', 'tanhm', 'tanm', 'TCL_CreateSlave', 'TCL_DeleteInterp', + 'TCL_EvalFile', 'TCL_EvalStr', 'TCL_ExistInterp', 'TCL_ExistVar', 'TCL_GetVar', 'TCL_GetVersion', 'TCL_SetVar', + 'TCL_UnsetVar', 'TCL_UpVar', 'tdinit', 'testmatrix', 'texprint', 'text_properties', 'tf2des', 'tf2ss', 'then', + 'thrownan', 'tic', 'tilda', 'time_id', 'timer', 'title', 'titlepage', 'TK_EvalFile', 'TK_EvalStr', 'tk_getdir', + 'tk_getfile', 'TK_GetVar', 'tk_savefile', 'TK_SetVar', 'toc', 'toeplitz', 'tohome', 'tokenpos', + 'tokens', 'toolbar', 'toprint', 'trace', 'trans', 'trans_closure', 'translatepaths', 'tree2code', 'trfmod', + 'trianfml', 'tril', 'trimmean', 'trisolve', 'triu', 'try', 'trzeros', 'twinkle', 'type', 'Type', 'typename', + 'typeof', 'ui_observer', 'uicontrol', 'uimenu', 'uint16', 'uint32', 'uint8', 'ulink', 'unglue', 'union', + 'unique', 'unix', 'unix_g', 'unix_s', 'unix_w', 'unix_x', 'unobs', 'unsetmenu', 'unzoom', 'user', 'varargin', + 'varargout', 'Variable', 'variance', 'variancef', 'varn', 'vectorfind', 'waitbar', 'warning', 'wavread', + 'wavwrite', 'wcenter', 'wfir', 'what', 'where', 'whereami', 'whereis', 'who', 'who_user', 'whos', + 'wiener', 'wigner', 'winclose', 'window', 'winlist', 'winopen', 'winqueryreg', 'winsid', 'with_atlas', + 'with_gtk', 'with_javasci', 'with_pvm', 'with_texmacs', 'with_tk', 'writb', 'write', 'write4b', 'x_choices', + 'x_choose', 'x_dialog', 'x_matrix', 'x_mdialog', 'x_message', 'x_message_modeless', 'xarc', 'xarcs', 'xarrows', + 'xaxis', 'xbasc', 'xbasimp', 'xbasr', 'xchange', 'xclea', 'xclear', 'xclick', 'xclip', 'xdel', 'xend', + 'xfarc', 'xfarcs', 'xfpoly', 'xfpolys', 'xfrect', 'xget', 'xgetech', 'xgetfile', 'xgetmouse', 'xgraduate', + 'xgrid', 'xinfo', 'xinit', 'xlfont', 'xload', 'xls_open', 'xls_read', 'xmltohtml', 'xname', 'xnumb', 'xpause', + 'xpoly', 'xpolys', 'xrect', 'xrects', 'xrpoly', 'xs2bmp', 'xs2emf', 'xs2eps', 'xs2fig', 'xs2gif', 'xs2ppm', + 'xs2ps', 'xsave', 'xsegs', 'xselect', 'xset', 'xsetech', 'xsetm', 'xstring', 'xstringb', 'xstringl', 'xtape', + 'xtitle', 'yulewalk', 'zeropen', 'zeros', 'zgrid', 'zoom_rect', 'zpbutt', 'zpch1', 'zpch2', 'zpell' + ) + ), + 'SYMBOLS' => array( + '<', '>', '=', + '!', '@', '~', '&', '|', + '+','-', '*', '/', '%', + ',', ';', '?', ':', "'" + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => true, + 2 => true, + 3 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #000000; font-weight: bold;', + 3 => 'color: #000066;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => '', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;', + 'HARD' => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;', + 2 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933;' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff;', + 4 => 'color: #009999;', + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => 'http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm', + 2 => 'http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm', + 3 => 'http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '->', + 2 => '::' + ), + 'REGEXPS' => array( + //Variable + 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*', + //File Descriptor + 4 => '<[a-zA-Z_][a-zA-Z0-9_]*>', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/sdlbasic.php b/_piecrust/libs/Geshi/geshi/sdlbasic.php new file mode 100644 index 0000000..9bb8058 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/sdlbasic.php @@ -0,0 +1,165 @@ + 'sdlBasic', + 'COMMENT_SINGLE' => array(1 => "'", 2 => "rem", 3 => "!", 4 => "#"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'const', 'option', 'explicit', 'qbasic', 'include', 'argc', + 'argv', 'command', 'command$', 'run', 'shell', 'os', 'declare', + 'sub', 'function', 'return', 'while', 'wend', 'exit', 'end', + 'continue', 'if', 'then', 'else', 'elseif', + 'select', 'case', 'for', 'each', 'step', + 'next', 'to', 'dim', 'shared', 'common', 'lbound', 'bound', + 'erase', 'asc', 'chr', 'chr$', 'insert', 'insert$', 'instr', 'lcase', + 'lcase$', 'left', 'left$', 'len', 'length', 'ltrim', 'ltrim$', 'mid', + 'mid$', 'replace', 'replace$', 'replacesubstr', 'replacesubstr$', + 'reverse', 'reverse$', 'right', 'right$', 'rinstr', 'rtrim', 'rtrim$', + 'space', 'space$', 'str', 'str$', 'strf', 'strf$', 'string', 'string$', + 'tally', 'trim', 'trim$', 'typeof', 'typeof$', 'ucase', 'ucase$', 'val', + 'abs', 'acos', 'andbit', 'asin', 'atan', 'bitwiseand', 'bitwiseor', + 'bitwisexor', 'cos', 'exp', 'fix', 'floor', 'frac', 'hex', 'hex$', 'int', + 'log', 'min', 'max', 'orbit', 'randomize', 'rnd', 'round', 'sgn', 'sin', + 'sqr', 'tan', 'xorbit', 'open', 'as', 'file', 'input', 'close', 'output', + 'append', 'eof', 'fileexists', 'filecopy', 'filemove', 'filerename', + 'freefile', 'kill', 'loc', 'lof', 'readbyte', 'rename', 'seek', + 'writebyte', 'chdir', 'dir', 'dir$', 'direxists', 'dirfirst', 'dirnext', + 'mkdir', 'rmdir', 'print', 'date', 'date$', 'time', 'time$', 'ticks', + 'data', 'read', 'reservebank', 'freebank', 'copybank', 'loadbank', + 'savebank', 'setbank', 'sizebank', 'poke', 'doke', 'loke', 'peek', 'deek', + 'leek', 'memcopy', 'setdisplay', 'setcaption', 'caption', 'displaywidth', + 'displayheight', 'displaybpp', 'screen', 'directscreen', 'screenopen', + 'screenclose', 'screenclone', 'screencopy', 'screenfade', 'screenfadein', + 'screencrossfade', 'screenalpha', 'screenlock', 'screenunlock', + 'screenrect', 'xscreenrect', 'yscreenrect', 'wscreenrect', 'hscreenrect', + 'flagscreenrect', 'screenwidth', 'screenheight', 'offset', 'xoffset', + 'yoffset', 'cls', 'screenswap', 'autoback', 'setautoback', + 'dualplayfield', 'waitvbl', 'fps', 'rgb', 'enablepalette', 'color', + 'palette', 'colorcycling', 'ink', 'point', 'dot', 'plot', 'line', 'box', + 'bar', 'circle', 'fillcircle', 'ellipse', 'fillellipse', 'paint', + 'loadimage', 'saveimage', 'loadsound', 'savesound', 'loadmusic', + 'hotspot', 'setcolorkey', 'imageexists', 'imagewidth', 'imageheight', + 'deleteimage', 'copyimage', 'setalpha', 'zoomimage', 'rotateimage', + 'rotozoomimage', 'blt', 'pastebob', 'pasteicon', 'grab', 'spriteclip', + 'sprite', 'deletesprite', 'xsprite', 'ysprite', 'spritewidth', + 'spriteheight', 'frsprite', 'livesprite', 'spritehit', 'autoupdatesprite', + 'updatesprite', 'setbob', 'bob', 'deletebob', 'xbob', 'ybob', 'bobwidth', + 'bobheight', 'frbob', 'livebob', 'bobhit', 'autoupdatebob', 'updatebob', + 'text', 'setfont', 'textrender', 'pen', 'paper', 'prints', 'locate', + 'atx', 'aty', 'curson', 'cursoff', 'inputs', 'zoneinputs', + 'isenabledsound', 'soundexists', 'deletesound', 'copysound', + 'musicexists', 'playsound', 'volumesound', 'stopsound', 'pausesound', + 'resumesound', 'vumetersound', 'positionsound', 'soundchannels', + 'playmusic', 'positionmusic', 'stopmusic', 'fademusic', 'pausemusic', + 'resumemusic', 'rewindmusic', 'volumemusic', 'speedmusic', 'numdrivescd', + 'namecd', 'getfreecd', 'opencd', 'indrivecd', 'trackscd', 'curtrackcd', + 'curframecd', 'playcd', 'playtrackscd', + 'pausecd', 'resumecd', 'stopcd', 'ejectcd', 'closecd', 'tracktypecd', + 'tracklengthcd', 'trackoffsetcd', 'key', 'inkey', 'waitkey', 'xmouse', + 'ymouse', 'xmousescreen', 'ymousescreen', 'bmouse', 'changemouse', + 'locatemouse', 'mouseshow', 'mousehide', 'mousezone', 'numjoysticks', + 'namejoystick', 'numaxesjoystick', 'numballsjoystick', 'numhatsjoystick', + 'numbuttonsjoystick', 'getaxisjoystick', 'gethatjoystick', + 'getbuttonjoystick', 'xgetballjoystick', 'ygetballjoystick', 'joy', + 'bjoy', 'wait', 'timer', 'isenabledsock', 'getfreesock', 'opensock', + 'acceptsock', 'isserverready', 'connectsock', 'connectionreadysock', + 'isclientready', 'losesock', 'peeksock', 'readsock', 'readbytesock', + 'readlinesock', 'writesock', 'writebytesock', 'writelinesock', + 'getremoteip', 'getremoteport', 'getlocalip' + ) + ), + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080;', + 2 => 'color: #808080;', + 3 => 'color: #808080;', + 4 => 'color: #808080;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #66cc66;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/smalltalk.php b/_piecrust/libs/Geshi/geshi/smalltalk.php new file mode 100644 index 0000000..f8b3016 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/smalltalk.php @@ -0,0 +1,154 @@ + 'Smalltalk', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('"' => '"'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'"), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'self','super','true','false','nil' + ) + ), + 'SYMBOLS' => array( + '[', ']', '=' , ':=', '(', ')', '#' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #7f007f;' + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #007f00; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => '' + ), + 'STRINGS' => array( + 0 => 'color: #7f0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #7f0000;' + ), + 'METHODS' => array( + 0 => '' + ), + 'SYMBOLS' => array( + 0 => 'color: #000066; font-weight:bold;' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff;', + 1 => 'color: #7f0000;', + 2 => 'color: #7f0000;', + 3 => 'color: #00007f;', + 5 => 'color: #00007f;', + 6 => 'color: #00007f;' + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array( + 1 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => array( + GESHI_SEARCH => '([^a-zA-Z0-9_#<])([A-Z]+[a-zA-Z0-9_]*)(?!>)', //class names + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 1 => array( + GESHI_SEARCH => '(#+)([a-zA-Z0-9_]+)', //symbols + GESHI_REPLACE => '\\1\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 2 => array( + GESHI_SEARCH => '(#\s*\([^)]*\))', //array symbols + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 3 => array( + GESHI_SEARCH => '([a-zA-Z0-9_\s]+)', //temporary variables + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '|', + GESHI_AFTER => '|' + ), + 5 => array( + GESHI_SEARCH => '([:(,=[.*\/+-]\s*(?!\d+\/))([a-zA-Z0-9_]+)', //message parameters, message receivers + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 's', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + 6 => array( + GESHI_SEARCH => '([a-zA-Z0-9_]+)(\s*:=)', //assignment targets + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '\\2' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/smarty.php b/_piecrust/libs/Geshi/geshi/smarty.php new file mode 100644 index 0000000..1f9f021 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/smarty.php @@ -0,0 +1,192 @@ + 'Smarty', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array('{*' => '*}'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + '$smarty', 'now', 'const', 'capture', 'config', 'section', 'foreach', 'template', 'version', 'ldelim', 'rdelim', + 'foreachelse', 'include', 'include_php', 'insert', 'if', 'elseif', 'else', 'php', + 'sectionelse', 'is_cached', + ), + 2 => array( + 'capitalize', 'count_characters', 'cat', 'count_paragraphs', 'count_sentences', 'count_words', 'date_format', + 'default', 'escape', 'indent', 'lower', 'nl2br', 'regex_replace', 'replace', 'spacify', 'string_format', + 'strip', 'strip_tags', 'truncate', 'upper', 'wordwrap', + ), + 3 => array( + 'counter', 'cycle', 'debug', 'eval', 'html_checkboxes', 'html_image', 'html_options', + 'html_radios', 'html_select_date', 'html_select_time', 'html_table', 'math', 'mailto', 'popup_init', + 'popup', 'textformat' + ), + 4 => array( + '$template_dir', '$compile_dir', '$config_dir', '$plugins_dir', '$debugging', '$debug_tpl', + '$debugging_ctrl', '$autoload_filters', '$compile_check', '$force_compile', '$caching', '$cache_dir', + '$cache_lifetime', '$cache_handler_func', '$cache_modified_check', '$config_overwrite', + '$config_booleanize', '$config_read_hidden', '$config_fix_newlines', '$default_template_handler_func', + '$php_handling', '$security', '$secure_dir', '$security_settings', '$trusted_dir', '$left_delimiter', + '$right_delimiter', '$compiler_class', '$request_vars_order', '$request_use_auto_globals', + '$error_reporting', '$compile_id', '$use_sub_dirs', '$default_modifiers', '$default_resource_type' + ), + 5 => array( + 'append', 'append_by_ref', 'assign', 'assign_by_ref', 'clear_all_assign', 'clear_all_cache', + 'clear_assign', 'clear_cache', 'clear_compiled_tpl', 'clear_config', 'config_load', 'display', + 'fetch', 'get_config_vars', 'get_registered_object', 'get_template_vars', + 'load_filter', 'register_block', 'register_compiler_function', 'register_function', + 'register_modifier', 'register_object', 'register_outputfilter', 'register_postfilter', + 'register_prefilter', 'register_resource', 'trigger_error', 'template_exists', 'unregister_block', + 'unregister_compiler_function', 'unregister_function', 'unregister_modifier', 'unregister_object', + 'unregister_outputfilter', 'unregister_postfilter', 'unregister_prefilter', 'unregister_resource' + ), + 6 => array( + 'name', 'file', 'scope', 'global', 'key', 'once', 'script', + 'loop', 'start', 'step', 'max', 'show', 'values', 'value', 'from', 'item' + ), + 7 => array( + 'eq', 'neq', 'ne', 'lte', 'gte', 'ge', 'le', 'not', 'mod' + ), + 8 => array( + // some common php functions + 'isset', 'is_array', 'empty', 'count', 'sizeof' + ) + ), + 'SYMBOLS' => array( + '/', '=', '==', '!=', '>', '<', '>=', '<=', '!', '%' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0600FF;', //Functions + 2 => 'color: #008000;', //Modifiers + 3 => 'color: #0600FF;', //Custom Functions + 4 => 'color: #804040;', //Variables + 5 => 'color: #008000;', //Methods + 6 => 'color: #6A0A0A;', //Attributes + 7 => 'color: #D36900;', //Text-based symbols + 8 => 'color: #0600FF;' //php functions + ), + 'COMMENTS' => array( + 'MULTI' => 'color: #008080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #D36900;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #D36900;' + ), + 'SCRIPT' => array( + 0 => '', + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #009000;' + ), + 'REGEXPS' => array( + 0 => 'color: #00aaff;' + ) + ), + 'URLS' => array( + 1 => 'http://smarty.php.net/{FNAMEL}', + 2 => 'http://smarty.php.net/{FNAMEL}', + 3 => 'http://smarty.php.net/{FNAMEL}', + 4 => 'http://smarty.php.net/{FNAMEL}', + 5 => 'http://smarty.php.net/{FNAMEL}', + 6 => '', + 7 => 'http://smarty.php.net/{FNAMEL}', + 8 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + // variables + 0 => '\$[a-zA-Z][a-zA-Z0-9_]*' + ), + 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, + 'SCRIPT_DELIMITERS' => array( + 0 => array( + '{' => '}' + ), + 1 => array( + '', + ), + 2 => array( + '<' => '>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => false, + 2 => false + ), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(?|^])", + 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-&])" + ) + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/sql.php b/_piecrust/libs/Geshi/geshi/sql.php new file mode 100644 index 0000000..4d1d519 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/sql.php @@ -0,0 +1,165 @@ + 'SQL', + 'COMMENT_SINGLE' => array(1 =>'--'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => 1, + 'QUOTEMARKS' => array("'", '"', '`'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'ADD', 'ALL', 'ALTER', 'AND', 'AS', 'ASC', 'AUTO_INCREMENT', + 'BEFORE', 'BEGIN', 'BETWEEN', 'BIGINT', 'BINARY', 'BLOB', 'BOOLEAN', 'BOTH', 'BY', + 'CALL', 'CASE', 'CAST', 'CEIL', 'CEILING', 'CHANGE', 'CHAR', 'CHAR_LENGTH', 'CHARACTER', + 'CHARACTER_LENGTH', 'CHECK', 'CLOB', 'COALESCE', 'COLLATE', 'COLUMN', 'COLUMNS', + 'CONNECT', 'CONSTRAINT', 'CONVERT', 'COUNT', 'CREATE', 'CROSS', 'CURRENT', + 'CURRENT_DATE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER', + 'DATA', 'DATABASE', 'DATABASES', 'DATE', 'DAY', 'DEC', 'DECIMAL', 'DECLARE', + 'DEFAULT', 'DELAYED', 'DELETE', 'DESC', 'DESCRIBE', 'DISTINCT', 'DOUBLE', + 'DOMAIN', 'DROP', + 'ELSE', 'ENCLOSED', 'END', 'ESCAPED', 'EXCEPT', 'EXEC', 'EXECUTE', 'EXISTS', 'EXP', + 'EXPLAIN', 'EXTRACT', + 'FALSE', 'FIELD', 'FIELDS', 'FILTER', 'FIRST', 'FLOAT', 'FLOOR', 'FLUSH', 'FOR', + 'FOREIGN', 'FROM', 'FULL', 'FUNCTION', + 'GET', 'GROUP', 'GROUPING', 'GO', 'GOTO', 'GRANT', 'GRANTED', + 'HAVING', 'HOUR', + 'IDENTIFIED', 'IDENTITY', 'IF', 'IGNORE', 'IN', 'INCREMENT', 'INDEX', 'INFILE', 'INNER', + 'INOUT', 'INPUT', 'INSERT', 'INT', 'INTEGER', 'INTERSECT', 'INTERSECTION', 'INTERVAL', + 'INTO', 'IS', + 'JOIN', + 'KEY', 'KEYS', 'KILL', + 'LANGUAGE', 'LARGE', 'LAST', 'LEADING', 'LEFT', 'LENGTH', 'LIKE', 'LIMIT', 'LINES', 'LOAD', + 'LOCAL', 'LOCK', 'LOW_PRIORITY', 'LOWER', + 'MATCH', 'MAX', 'MERGE', 'MIN', 'MINUTE', 'MOD', 'MODIFIES', 'MODIFY', 'MONTH', + 'NATIONAL', 'NATURAL', 'NCHAR', 'NEW', 'NEXT', 'NEXTVAL', 'NONE', 'NOT', + 'NULL', 'NULLABLE', 'NULLIF', 'NULLS', 'NUMBER', 'NUMERIC', + 'OF', 'OLD', 'ON', 'ONLY', 'OPEN', 'OPTIMIZE', 'OPTION', + 'OPTIONALLY', 'OR', 'ORDER', 'OUT', 'OUTER', 'OUTFILE', 'OVER', + 'POSITION', 'POWER', 'PRECISION', 'PREPARE', 'PRIMARY', 'PROCEDURAL', 'PROCEDURE', + 'READ', 'REAL', 'REF', 'REFERENCES', 'REFERENCING', 'REGEXP', 'RENAME', 'REPLACE', + 'RESULT', 'RETURN', 'RETURNS', 'REVOKE', 'RIGHT', 'RLIKE', 'ROLLBACK', 'ROW', + 'ROW_NUMBER', 'ROWS', 'RESTRICT', 'ROLE', 'ROUTINE', 'ROW_COUNT', + 'SAVEPOINT', 'SEARCH', 'SECOND', 'SECTION', 'SELECT', 'SELF', 'SEQUENCE', + 'SESSION', 'SET', 'SETVAL', 'SHOW', 'SIMILAR', 'SIZE', 'SMALLINT', 'SOME', + 'SONAME', 'SOURCE', 'SPACE', 'SQL', 'SQRT', 'START', 'STATUS', + 'STRAIGHT_JOIN', 'STRUCTURE', 'STYLE', 'SUBSTRING', 'SUM', + 'TABLE', 'TABLE_NAME', 'TABLES', 'TERMINATED', 'TEMPORARY', 'THEN', 'TIME', + 'TIMESTAMP', 'TO', 'TRAILING', 'TRANSACTION', 'TRIGGER', 'TRIM', 'TRUE', 'TRUNCATE', + 'TRUSTED', 'TYPE', + 'UNDER', 'UNION', 'UNIQUE', 'UNKNOWN', 'UNLOCK', 'UNSIGNED', + 'UPDATE', 'UPPER', 'USE', 'USER', 'USING', + 'VALUE', 'VALUES', 'VARCHAR', 'VARIABLES', 'VARYING', 'VIEW', + 'WHEN', 'WHERE', 'WITH', 'WITHIN', 'WITHOUT', 'WORK', 'WRITE', + 'XOR', + 'YEAR', + 'ZEROFILL' + ) + ), + 'SYMBOLS' => array( + '(', ')', '=', '<', '>', '|', ',', '.', '+', '-', '*', '/' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #993333; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + //2 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/systemverilog.php b/_piecrust/libs/Geshi/geshi/systemverilog.php new file mode 100644 index 0000000..c30b976 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/systemverilog.php @@ -0,0 +1,317 @@ +. + * + ************************************************************************ + * Title: SystemVerilog Language Keywords File for GeSHi + * Description: This file contains the SV keywords defined in the + * IEEE1800-2009 Draft Standard in the format expected by + * GeSHi. + * + * Original Author: Sean O'Boyle + * Contact: seanoboyle@intelligentdv.com + * Company: Intelligent Design Verification + * Company URL: http://intelligentdv.com + * + * Download the most recent version here: + * http://intelligentdv.com/downloads + * + * File Bugs Here: http://bugs.intelligentdv.com + * Project: SyntaxFiles + * + * File: systemverilog.php + * $LastChangedBy: seanoboyle $ + * $LastChangedDate: 2009-07-22 22:20:25 -0700 (Wed, 22 Jul 2009) $ + * $LastChangedRevision: 17 $ + * + ************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'SystemVerilog', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array(1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + // system tasks + 1 => array( + 'acos','acosh','asin','asinh','assertfailoff','assertfailon', + 'assertkill','assertnonvacuouson','assertoff','asserton', + 'assertpassoff','assertpasson','assertvacuousoff','async$and$array', + 'async$and$plane','async$nand$array','async$nand$plane', + 'async$nor$array','async$nor$plane','async$or$array', + 'async$or$plane','atan','atan2','atanh','bits','bitstoreal', + 'bitstoshortreal','cast','ceil','changed','changed_gclk', + 'changing_gclk','clog2','cos','cosh','countones','coverage_control', + 'coverage_get','coverage_get_max','coverage_merge','coverage_save', + 'dimensions','display','displayb','displayh','displayo', + 'dist_chi_square','dist_erlang','dist_exponential','dist_normal', + 'dist_poisson','dist_t','dist_uniform','dumpall','dumpfile', + 'dumpflush','dumplimit','dumpoff','dumpon','dumpports', + 'dumpportsall','dumpportsflush','dumpportslimit','dumpportsoff', + 'dumpportson','dumpvars','error','exit','exp','falling_gclk', + 'fclose','fdisplay','fdisplayb','fdisplayh','fdisplayo','fell', + 'fell_gclk','feof','ferror','fflush','fgetc','fgets','finish', + 'floor','fmonitor','fmonitorb','fmonitorh','fmonitoro','fopen', + 'fread','fscanf','fseek','fstrobe','fstrobeb','fstrobeh','fstrobeo', + 'ftell','future_gclk','fwrite','fwriteb','fwriteh','fwriteo', + 'get_coverage','high','hypot','increment','info','isunbounded', + 'isunknown','itor','left','ln','load_coverage_db','log10','low', + 'monitor','monitorb','monitorh','monitoro','monitoroff','monitoron', + 'onehot','onehot0','past','past_gclk','pow','printtimescale', + 'q_add','q_exam','q_full','q_initialize','q_remove','random', + 'readmemb','readmemh','realtime','realtobits','rewind','right', + 'rising_gclk','rose','rose_gclk','rtoi','sampled', + 'set_coverage_db_name','sformat','sformatf','shortrealtobits', + 'signed','sin','sinh','size','sqrt','sscanf','stable','stable_gclk', + 'steady_gclk','stime','stop','strobe','strobeb','strobeh','strobeo', + 'swrite','swriteb','swriteh','swriteo','sync$and$array', + 'sync$and$plane','sync$nand$array','sync$nand$plane', + 'sync$nor$array','sync$nor$plane','sync$or$array','sync$or$plane', + 'system','tan','tanh','test$plusargs','time','timeformat', + 'typename','ungetc','unpacked_dimensions','unsigned', + 'value$plusargs','warning','write','writeb','writeh','writememb', + 'writememh','writeo', + ), + // compiler directives + 2 => array( + '`__FILE__', '`__LINE__', '`begin_keywords', '`case', '`celldefine', + '`endcelldefine', '`default_nettype', '`define', '`default', '`else', + '`elsif', '`end_keywords', '`endfor', '`endif', + '`endprotect', '`endswitch', '`endwhile', '`for', '`format', + '`if', '`ifdef', '`ifndef', '`include', '`let', + '`line', '`nounconnected_drive', '`pragma', '`protect', '`resetall', + '`switch', '`timescale', '`unconnected_drive', '`undef', '`undefineall', + '`while' + ), + // keywords + 3 => array( + 'assert', 'assume', 'cover', 'expect', 'disable', + 'iff', 'binsof', 'intersect', 'first_match', 'throughout', + 'within', 'coverpoint', 'cross', 'wildcard', 'bins', + 'ignore_bins', 'illegal_bins', 'genvar', 'if', 'else', + 'unique', 'priority', 'matches', 'default', 'forever', + 'repeat', 'while', 'for', 'do', 'foreach', + 'break', 'continue', 'return', 'pulsestyle_onevent', 'pulsestyle_ondetect', + 'noshowcancelled', 'showcancelled', 'ifnone', 'posedge', 'negedge', + 'edge', 'wait', 'wait_order', 'timeunit', 'timeprecision', + 's', 'ms', 'us', 'ns', + 'ps', 'fs', 'step', 'new', 'extends', + 'this', 'super', 'protected', 'local', 'rand', + 'randc', 'bind', 'constraint', 'solve', 'before', + 'dist', 'inside', 'with', 'virtual', 'extern', + 'pure', 'forkjoin', 'design', 'instance', 'cell', + 'liblist', 'use', 'library', 'incdir', 'include', + 'modport', 'sync_accept_on', 'reject_on', 'accept_on', + 'sync_reject_on', 'restrict', 'let', 'until', 'until_with', + 'unique0', 'eventually', 's_until', 's_always', 's_eventually', + 's_nexttime', 's_until_with', 'global', 'untyped', 'implies', + 'weak', 'strong', 'nexttime' + ), + // block keywords + 4 => array( + 'begin', 'end', 'package', 'endpackage', 'macromodule', + 'module', 'endmodule', 'generate', 'endgenerate', 'program', + 'endprogram', 'class', 'endclass', 'function', 'endfunction', + 'case', 'casex', 'casez', 'randcase', 'endcase', + 'interface', 'endinterface', 'clocking', 'endclocking', 'task', + 'endtask', 'primitive', 'endprimitive', 'fork', 'join', + 'join_any', 'join_none', 'covergroup', 'endgroup', 'checker', + 'endchecker', 'property', 'endproperty', 'randsequence', 'sequence', + 'endsequence', 'specify', 'endspecify', 'config', 'endconfig', + 'table', 'endtable', 'initial', 'final', 'always', + 'always_comb', 'always_ff', 'always_latch', 'alias', 'assign', + 'force', 'release' + ), + + // types + 5 => array( + 'parameter', 'localparam', 'specparam', 'input', 'output', + 'inout', 'ref', 'byte', 'shortint', 'int', + 'integer', 'longint', 'time', 'bit', 'logic', + 'reg', 'supply0', 'supply1', 'tri', 'triand', + 'trior', 'trireg', 'tri0', 'tri1', 'wire', + 'uwire', 'wand', 'wor', 'signed', 'unsigned', + 'shortreal', 'real', 'realtime', 'type', 'void', + 'struct', 'union', 'tagged', 'const', 'var', + 'automatic', 'static', 'packed', 'vectored', 'scalared', + 'typedef', 'enum', 'string', 'chandle', 'event', + 'null', 'pullup', 'pulldown', 'cmos', 'rcmos', + 'nmos', 'pmos', 'rnmos', 'rpmos', 'and', + 'nand', 'or', 'nor', 'xor', 'xnor', + 'not', 'buf', 'tran', 'rtran', 'tranif0', + 'tranif1', 'rtranif0', 'rtranif1', 'bufif0', 'bufif1', + 'notif0', 'notif1', 'strong0', 'strong1', 'pull0', + 'pull1', 'weak0', 'weak1', 'highz0', 'highz1', + 'small', 'medium', 'large' + ), + + // DPI + 6 => array( + 'DPI', 'DPI-C', 'import', 'export', 'context' + ), + + // stdlib + 7 => array( + 'randomize', 'mailbox', 'semaphore', 'put', 'get', + 'try_put', 'try_get', 'peek', 'try_peek', 'process', + 'state', 'self', 'status', 'kill', 'await', + 'suspend', 'resume', 'size', 'delete', 'insert', + 'num', 'first', 'last', 'next', 'prev', + 'pop_front', 'pop_back', 'push_front', 'push_back', 'find', + 'find_index', 'find_first', 'find_last', 'find_last_index', 'min', + 'max', 'unique_index', 'reverse', 'sort', 'rsort', + 'shuffle', 'sum', 'product', 'List', 'List_Iterator', + 'neq', 'eq', 'data', 'empty', 'front', + 'back', 'start', 'finish', 'insert_range', 'erase', + 'erase_range', 'set', 'swap', 'clear', 'purge' + ), + + // key_deprecated + 8 => array( + 'defparam', 'deassign', 'TODO' + ), + + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', + '^', '&', '|', '~', + '?', ':', + '#', '<<', '<<<', + '>', '<', '>=', '<=', + '@', ';', ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #996666; font-weight: bold;', + 2 => 'color: #336600; font-weight: bold;', + 3 => 'color: #996600; font-weight: bold;', + 4 => 'color: #000033; font-weight: bold;', + 5 => 'color: #330033; font-weight: bold;', + 6 => 'color: #996600; font-weight: bold;', + 7 => 'color: #CC9900; font-weight: bold;', + 8 => 'color: #990000; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #00008B; font-style: italic;', + 'MULTI' => 'color: #00008B; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #9F79EE' + ), + 'BRACKETS' => array( + 0 => 'color: #9F79EE;' + ), + 'STRINGS' => array( + 0 => 'color: #FF00FF;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0055;' + ), + 'METHODS' => array( + 1 => 'color: #202020;', + 2 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #5D478B;' + ), + 'REGEXPS' => array( + 0 => 'color: #ff0055;', + 1 => 'color: #ff0055;', + 2 => 'color: #ff0055;', + 3 => 'color: #ff0055;' + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + 1 => '' + ), + 'REGEXPS' => array( + // integer + 0 => "\d'[bdh][0-9_a-fA-FxXzZ]+", + // realtime + 1 => "\d*\.\d+[munpf]?s", + // time s, ms, us, ns, ps, of fs + 2 => "\d+[munpf]?s", + // real + 3 => "\d*\.\d+" + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + 0 => '' + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true + ), + 'TAB_WIDTH' => 3, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 1 => array( + 'DISALLOWED_BEFORE' => '(?<=$)' + ) + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/tcl.php b/_piecrust/libs/Geshi/geshi/tcl.php new file mode 100644 index 0000000..64da1fe --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/tcl.php @@ -0,0 +1,194 @@ + 'TCL', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + 1 => '/(? '/{[^}\n]+}/' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', "'"), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + /* + * Set 1: reserved words + * http://python.org/doc/current/ref/keywords.html + */ + 1 => array( + 'proc', 'global', 'upvar', 'if', 'then', 'else', 'elseif', 'for', 'foreach', + 'break', 'continue', 'while', 'set', 'eval', 'case', 'in', 'switch', + 'default', 'exit', 'error', 'return', 'uplevel', 'loop', + 'for_array_keys', 'for_recursive_glob', 'for_file', 'unwind_protect', + 'expr', 'catch', 'namespace', 'rename', 'variable', + // itcl + 'method', 'itcl_class', 'public', 'protected'), + + /* + * Set 2: builtins + * http://asps.activatestate.com/ASPN/docs/ActiveTcl/8.4/tcl/tcl_2_contents.htm + */ + 2 => array( + // string handling + 'append', 'binary', 'format', 're_syntax', 'regexp', 'regsub', + 'scan', 'string', 'subst', + // list handling + 'concat', 'join', 'lappend', 'lindex', 'list', 'llength', 'lrange', + 'lreplace', 'lsearch', 'lset', 'lsort', 'split', + // procedures and output + 'incr', 'close', 'eof', 'fblocked', 'fconfigure', 'fcopy', 'file', + 'fileevent', 'flush', 'gets', 'open', 'puts', 'read', 'seek', + 'socket', 'tell', + // packages and source files + 'load', 'loadTk', 'package', 'pgk::create', 'pgk_mkIndex', 'source', + // interpreter routines + 'bgerror', 'history', 'info', 'interp', 'memory', 'unknown', + // library routines + 'enconding', 'http', 'msgcat', + // system related + 'cd', 'clock', 'exec', 'glob', 'pid', 'pwd', 'time', + // platform specified + 'dde', 'registry', 'resource', + // special variables + '$argc', '$argv', '$errorCode', '$errorInfo', '$argv0', + '$auto_index', '$auto_oldpath', '$auto_path', '$env', + '$tcl_interactive', '$tcl_libpath', '$tcl_library', + '$tcl_pkgPath', '$tcl_platform', '$tcl_precision', '$tcl_traceExec', + ), + + /* + * Set 3: standard library + */ + 3 => array( + 'comment', 'filename', 'library', 'packagens', 'tcltest', 'tclvars', + ), + + /* + * Set 4: special methods + */ +// 4 => array( +// ) + + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '$', '*', '&', '%', '!', ';', '<', '>', '?' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, +// 4 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #ff7700;font-weight:bold;', // Reserved + 2 => 'color: #008000;', // Built-ins + self + 3 => 'color: #dc143c;', // Standard lib +// 4 => 'color: #0000cd;' // Special methods + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', +// 2 => 'color: #483d8b;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: black;' + ), + 'STRINGS' => array( + 0 => 'color: #483d8b;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff4500;' + ), + 'METHODS' => array( + 1 => 'color: black;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + 0 => 'color: #ff3333;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', +// 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '::' + ), + 'REGEXPS' => array( + //Special variables + 0 => '[\\$]+[a-zA-Z_][a-zA-Z0-9_]*', + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'COMMENTS' => array( + 'DISALLOWED_BEFORE' => '\\' + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/teraterm.php b/_piecrust/libs/Geshi/geshi/teraterm.php new file mode 100644 index 0000000..5b29c1e --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/teraterm.php @@ -0,0 +1,317 @@ + 'Tera Term Macro', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /* Commands */ + 1 => array( + 'Beep', + 'BplusRecv', + 'BplusSend', + 'Break', // (version 4.53 or later) + 'Call', + 'CallMenu', // (version 4.56 or later) + 'ChangeDir', + 'ClearScreen', + 'Clipb2Var', //(version 4.46 or later) + 'ClosesBox', + 'CloseTT', + 'Code2Str', + 'Connect', + 'CRC32', // (version 4.60 or later) + 'CRC32File', // (version 4.60 or later) + 'CygConnect', // (version 4.57 or later) + 'DelPassword', + 'Disconnect', + 'Do', // (version 4.56 or later) + 'Else', + 'EnableKeyb', + 'End', + 'EndIf', + 'EndUntil', // (version 4.56 or later) + 'EndWhile', + 'Exec', + 'ExecCmnd', + 'Exit', + 'FileClose', + 'FileConcat', + 'FileCopy', + 'FileCreate', + 'FileDelete', + 'FileMarkPtr', + 'FilenameBox', //(version 4.54 or later) + 'FileOpen', + 'FileRead', + 'FileReadln', // (version 4.48 or later) + 'FileRename', + 'FileSearch', + 'FileSeek', + 'FileSeekBack', + 'FileStrSeek', + 'FileStrSeek2', + 'FileWrite', + 'FileWriteln', + 'FindOperations', + 'FlushRecv', + 'ForNext', + 'GetDate', + 'GetDir', //(version 4.46 or later) + 'GetEnv', + 'GetPassword', + 'GetTime', + 'GetTitle', + 'GetVer', //(version 4.58 or later) + 'GoTo', + 'If', + 'IfDefined', // (version 4.46 or later) + 'IfThenElseIf', + 'Include', + 'InputBox', + 'Int2Str', + 'KmtFinish', + 'KmtGet', + 'KmtRecv', + 'KmtSend', + 'LoadKeyMap', + 'LogClose', + 'LogOpen', + 'LogPause', + 'LogStart', + 'LogWrite', + 'Loop', // (version 4.56 or later) + 'MakePath', + 'MessageBox', + 'MPause', // (version 4.27 or later) + 'PasswordBox', + 'Pause', + 'QuickvanRecv', + 'QuickvanSend', + 'Random', //(version 4.27 or later) + 'Recvln', + 'RestoreSetup', + 'Return', + 'RotateLeft', //(version 4.54 or later) + 'RotateRight', //(version 4.54 or later) + 'ScpRecv', // (version 4.57 or later) + 'ScpSend', // (version 4.57 or later) + 'Send', + 'SendBreak', + 'SendFile', + 'SendKcode', + 'Sendln', + 'SetBaud', // (version 4.58 or later) + 'SetDate', + 'SetDir', + 'SetDlgPos', + 'SetDTR', // (version 4.59 or later) + 'SetRTS', // (version 4.59 or later) + 'SetEnv', // (version 4.54 or later) + 'SetEcho', + 'SetExitCode', + 'SetSync', + 'SetTime', + 'SetTitle', + 'Show', + 'ShowTT', + 'Sprintf', // (version 4.52 or later) + 'StatusBox', + 'Str2Code', + 'Str2Int', + 'StrCompare', + 'StrConcat', + 'StrCopy', + 'StrLen', + 'StrMatch', // (version 4.59 or later) + 'StrScan', + 'Testlink', + 'Then', + 'ToLower', //(version 4.53 or later) + 'ToUpper', //(version 4.53 or later) + 'Unlink', + 'Until', // (version 4.56 or later) + 'Var2Clipb', //(version 4.46 or later) + 'Wait', + 'WaitEvent', + 'Waitln', + 'WaitRecv', + 'WaitRegex', // (version 4.21 or later) + 'While', + 'XmodemRecv', + 'XmodemSend', + 'YesNoBox', + 'ZmodemRecv', + 'ZmodemSend' + ), + /* System Variables */ + 2 => array( + 'groupmatchstr1', + 'groupmatchstr2', + 'groupmatchstr3', + 'groupmatchstr4', + 'groupmatchstr5', + 'groupmatchstr6', + 'groupmatchstr7', + 'groupmatchstr8', + 'groupmatchstr9', + 'inputstr', + 'matchstr', + 'param2', + 'param3', + 'param4', + 'param5', + 'param6', + 'param7', + 'param8', + 'param9', + 'result', + 'timeout' + ), + /* LogMeTT Key Words */ + 3 => array( + '$[1]', + '$[2]', + '$[3]', + '$[4]', + '$[5]', + '$[6]', + '$[7]', + '$[8]', + '$connection$', + '$email$', + '$logdir$', + '$logfilename$', + '$logit$', + '$mobile$', + '$name$', + '$pager$', + '$parent$', + '$phone$', + '$snippet$', + '$ttdir$', + '$user$', + '$windir$', + ), + /* Keyword Symbols */ + 4 => array( + 'and', + 'not', + 'or', + 'xor' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', + '~', '!', '+', '-', '*', '/', '%', '>>', '<<', '<<<', '>>>', '&', '^', '|', + '<>', '<=', '>=', '=', '==', '<>', '!=', '&&', '||' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000080; font-weight: bold!important;', + 2 => 'color: #808000; font-weight: bold;', // System Variables + 3 => 'color: #ff0000; font-weight: bold;', // LogMeTT Key Words + 4 => 'color: #ff00ff; font-weight: bold;' // Keyword Symbols + ), + 'COMMENTS' => array( + 1 => 'color: #008000; font-style: italic;', + ), + 'ESCAPE_CHAR' => array(), + 'BRACKETS' => array( + 0 => 'color: #ff00ff; font-weight: bold;' + ), + 'STRINGS' => array( + 0 => 'color: #800080;' + ), + 'NUMBERS' => array( + 0 => 'color: #008080;' + ), + 'SCRIPT' => array( + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #ff00ff; font-weight: bold;' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff; font-weight: bold;' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array( + 0 => array ( + GESHI_SEARCH => '(\:[_a-zA-Z][_a-zA-Z0-9]+)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array(), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/text.php b/_piecrust/libs/Geshi/geshi/text.php new file mode 100644 index 0000000..259af41 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/text.php @@ -0,0 +1,84 @@ + 'Text', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array(), + 'SYMBOLS' => array(), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false + ), + 'STYLES' => array( + 'KEYWORDS' => array(), + 'COMMENTS' => array(), + 'ESCAPE_CHAR' => array(), + 'BRACKETS' => array(), + 'STRINGS' => array(), + 'NUMBERS' => array(), + 'METHODS' => array(), + 'SYMBOLS' => array(), + 'SCRIPT' => array(), + 'REGEXPS' => array() + ), + 'URLS' => array(), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array(), + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'ALL' => GESHI_NEVER + ), + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/thinbasic.php b/_piecrust/libs/Geshi/geshi/thinbasic.php new file mode 100644 index 0000000..b41471b --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/thinbasic.php @@ -0,0 +1,868 @@ + 'thinBasic', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'XOR','XML_TREETOSTRING','XML_PARSEFILE','XML_PARSE','XML_PARENT','XML_NODETYPE','XML_NODETOSTRING','XML_NEXTSIBLING', + 'XML_LASTERROR','XML_GETTAG','XML_FREE','XML_FINDNODE','XML_DECODEPARAM','XML_CHILDDATA','XML_CHILD','XML_ATTRIBVALUE', + 'XML_ATTRIBNAME','XML_ATTRIBCOUNT','WORD','WITH','WIN_SHOW','WIN_SETTITLE','WIN_SETFOREGROUND','WIN_ISZOOMED', + 'WIN_ISVISIBLE','WIN_ISICONIC','WIN_GETTITLE','WIN_GETFOREGROUND','WIN_GETCLASS','WIN_GETACTIVE','WIN_FLASH','WIN_FINDBYTITLE', + 'WIN_FINDBYCLASS','WHILE','WEND','VERIFY','VARPTR','VARIANTVT$','VARIANTVT','VARIANT', + 'VARIABLE_GETINFO','VARIABLE_EXISTS','VARIABLE_EXIST','VALUE','VAL','USING$','USING','USES', + 'USER','UNTIL','UNITS','UNION','UNICODE2ASCII','UDP_SEND','UDP_RECV','UDP_OPENSERVER', + 'UDP_OPEN','UDP_FREEFILE','UDP_CLOSE','UCODE$','UCASE$','UBOUND','TYPE','TRIMFULL$', + 'TRIM$','TOOLTIP','TOKENIZER_MOVETOEOL','TOKENIZER_KEYSETUSERSTRING','TOKENIZER_KEYSETUSERNUMBER','TOKENIZER_KEYGETUSERSTRING','TOKENIZER_KEYGETUSERNUMBER','TOKENIZER_KEYGETSUBTYPE', + 'TOKENIZER_KEYGETNAME','TOKENIZER_KEYGETMAINTYPE','TOKENIZER_KEYFIND','TOKENIZER_KEYADD','TOKENIZER_GETNEXTTOKEN','TOKENIZER_DEFAULT_SET','TOKENIZER_DEFAULT_GET','TOKENIZER_DEFAULT_CODE', + 'TOKENIZER_DEFAULT_CHAR','TO','TIMER','TIME$','THEN','TEXTBOX','TEXT','TCP_SEND', + 'TCP_RECV','TCP_PRINT','TCP_OPEN','TCP_LINEINPUT','TCP_FREEFILE','TCP_CLOSE','TB_IMGCTX_SETIMAGEADJUSTMENT','TB_IMGCTX_LOADIMAGE', + 'TB_IMGCTX_GETIMAGEADJUSTMENT','TBGL_VIEWPORT','TBGL_VERTEX','TBGL_USETEXTUREFLAG','TBGL_USETEXTURE','TBGL_USELINESTIPPLEFLAG','TBGL_USELINESTIPPLE','TBGL_USELIGHTSOURCEFLAG', + 'TBGL_USELIGHTSOURCE','TBGL_USELIGHTINGFLAG','TBGL_USELIGHTING','TBGL_USEFOGFLAG','TBGL_USEFOG','TBGL_USEDEPTHMASK','TBGL_USEDEPTHFLAG','TBGL_USEDEPTH', + 'TBGL_USECLIPPLANEFLAG','TBGL_USECLIPPLANE','TBGL_USEBLENDFLAG','TBGL_USEBLEND','TBGL_USEALPHATEST','TBGL_TRANSLATE','TBGL_TORUS','TBGL_TEXCOORD2D', + 'TBGL_SPHERE','TBGL_SHOWWINDOW','TBGL_SHOWCURSOR','TBGL_SETWINDOWTITLE','TBGL_SETUPLIGHTSOURCE','TBGL_SETUPFOG','TBGL_SETUPCLIPPLANE','TBGL_SETPRIMITIVEQUALITY', + 'TBGL_SETLIGHTPARAMETER','TBGL_SETDRAWDISTANCE','TBGL_SCALE','TBGL_SAVESCREENSHOT','TBGL_ROTATEXYZ','TBGL_ROTATE','TBGL_RESETMATRIX','TBGL_RENDERTOTEXTURE', + 'TBGL_RENDERMATRIX3D','TBGL_RENDERMATRIX2D','TBGL_PUSHMATRIX','TBGL_PRINTFONT','TBGL_PRINTBMP','TBGL_PRINT','TBGL_POS3DTOPOS2D','TBGL_POPMATRIX', + 'TBGL_POLYGONLOOK','TBGL_POINTSIZE','TBGL_POINTINSIDE3D','TBGL_NORMAL','TBGL_NEWLIST','TBGL_MOUSEGETWHEELDELTA','TBGL_MOUSEGETRBUTTON','TBGL_MOUSEGETPOSY', + 'TBGL_MOUSEGETPOSX','TBGL_MOUSEGETMBUTTON','TBGL_MOUSEGETLBUTTON','TBGL_M15SETVERTEXZ','TBGL_M15SETVERTEXY','TBGL_M15SETVERTEXXYZ','TBGL_M15SETVERTEXX','TBGL_M15SETVERTEXTEXY', + 'TBGL_M15SETVERTEXTEXXY','TBGL_M15SETVERTEXTEXX','TBGL_M15SETVERTEXTEXN','TBGL_M15SETVERTEXRGB','TBGL_M15SETVERTEXR','TBGL_M15SETVERTEXPSTOP','TBGL_M15SETVERTEXPARAM','TBGL_M15SETVERTEXLAYER', + 'TBGL_M15SETVERTEXG','TBGL_M15SETVERTEXB','TBGL_M15SETMODELVERTEXCOUNT','TBGL_M15SETBONECHILD','TBGL_M15ROTBONEZ','TBGL_M15ROTBONEY','TBGL_M15ROTBONEX','TBGL_M15ROTBONE', + 'TBGL_M15RESETBONES','TBGL_M15RECALCNORMALS','TBGL_M15LOADMODEL','TBGL_M15INITMODELBUFFERS','TBGL_M15GETVERTEXZ','TBGL_M15GETVERTEXY','TBGL_M15GETVERTEXXYZ','TBGL_M15GETVERTEXX', + 'TBGL_M15GETVERTEXTEXY','TBGL_M15GETVERTEXTEXXY','TBGL_M15GETVERTEXTEXX','TBGL_M15GETVERTEXTEXN','TBGL_M15GETVERTEXRGB','TBGL_M15GETVERTEXR','TBGL_M15GETVERTEXPSTOP','TBGL_M15GETVERTEXPARAM', + 'TBGL_M15GETVERTEXLAYER','TBGL_M15GETVERTEXG','TBGL_M15GETVERTEXB','TBGL_M15GETMODELVERTEXCOUNT','TBGL_M15GETMODELPOLYCOUNT','TBGL_M15ERASECHILDBONES','TBGL_M15DRAWMODEL','TBGL_M15DEFBONERESET', + 'TBGL_M15DEFBONELAYER','TBGL_M15DEFBONEBOX','TBGL_M15DEFBONEANCHOR','TBGL_M15DEFBONEADDVERTEX','TBGL_M15CLEARMODEL','TBGL_M15APPLYBONES','TBGL_M15ADDBONETREEITEM','TBGL_LOADTEXTURE', + 'TBGL_LOADFONT','TBGL_LOADBMPFONT','TBGL_LINEWIDTH','TBGL_LINESTIPPLE','TBGL_KILLFONT','TBGL_ISWINDOW','TBGL_ISPOINTVISIBLE','TBGL_ISPOINTBEHINDVIEW', + 'TBGL_GETWINDOWMULTIKEYSTATE','TBGL_GETWINDOWKEYSTATE','TBGL_GETWINDOWKEYONCE','TBGL_GETWINDOWCLIENT','TBGL_GETTEXTURENAME','TBGL_GETTEXTURELIST','TBGL_GETPIXELINFO','TBGL_GETMULTIASYNCKEYSTATE', + 'TBGL_GETLASTGLERROR','TBGL_GETFRAMERATE','TBGL_GETDESKTOPINFO','TBGL_GETASYNCKEYSTATE','TBGL_ERRORMESSAGES','TBGL_ENDPOLY','TBGL_ENDLIST','TBGL_DRAWFRAME', + 'TBGL_DESTROYWINDOW','TBGL_DELETELIST','TBGL_CYLINDER','TBGL_CREATEWINDOWEX','TBGL_CREATEWINDOW','TBGL_COLORALPHA','TBGL_COLOR','TBGL_CLEARFRAME', + 'TBGL_CAMERA','TBGL_CALLLIST','TBGL_BUILDFONT','TBGL_BOX','TBGL_BLENDFUNC','TBGL_BINDTEXTURE','TBGL_BEGINPOLY','TBGL_BACKCOLOR', + 'TBGL_ALPHAFUNC','TBDI_JOYZ','TBDI_JOYY','TBDI_JOYX','TBDI_JOYSTOPEFFECT','TBDI_JOYSLIDER','TBDI_JOYSETRANGEZ','TBDI_JOYSETRANGEY', + 'TBDI_JOYSETRANGEXYZ','TBDI_JOYSETRANGEX','TBDI_JOYSETDEADZONEZ','TBDI_JOYSETDEADZONEY','TBDI_JOYSETDEADZONEXYZ','TBDI_JOYSETDEADZONEX','TBDI_JOYSETAUTOCENTER','TBDI_JOYRZ', + 'TBDI_JOYRY','TBDI_JOYRX','TBDI_JOYPOV','TBDI_JOYPLAYEFFECT','TBDI_JOYLOADEFFECT','TBDI_JOYHASFF','TBDI_JOYHASEFFECT','TBDI_JOYGETEFFECTNAME', + 'TBDI_JOYGETEFFECTGUID','TBDI_JOYCREATEEFFECT','TBDI_JOYCOUNTPOV','TBDI_JOYCOUNTEFFECTS','TBDI_JOYCOUNTBTN','TBDI_JOYCOUNTAXES','TBDI_JOYBUTTON','TBDI_JOYAVAIL', + 'TBDI_INIT','TBASS_STREAMFREE','TBASS_STREAMCREATEFILE','TBASS_SETVOLUME','TBASS_SETEAXPRESET','TBASS_SETEAXPARAMETERS','TBASS_SETCONFIG','TBASS_SET3DPOSITION', + 'TBASS_SET3DFACTORS','TBASS_SAMPLELOAD','TBASS_SAMPLEGETCHANNEL','TBASS_MUSICLOAD','TBASS_MUSICFREE','TBASS_INIT','TBASS_GETVOLUME','TBASS_GETVERSION', + 'TBASS_GETCONFIG','TBASS_FREE','TBASS_ERRORGETCODE','TBASS_CHANNELSTOP','TBASS_CHANNELSETPOSITION','TBASS_CHANNELSETATTRIBUTES','TBASS_CHANNELSET3DPOSITION','TBASS_CHANNELPLAY', + 'TBASS_CHANNELPAUSE','TBASS_CHANNELISACTIVE','TBASS_CHANNELGETPOSITION','TBASS_CHANNELGETLENGTH','TBASS_CHANNELGETATTRIBUTES','TBASS_APPLY3D','TANH','TANGENT', + 'TAN','TALLY','TABCTRL_ONNOTIFY','TABCTRL_INSERTITEM','TABCTRL_GETCURSEL','SWAP','SUB','STRZIP$', + 'STRUNZIP$','STRREVERSE$','STRPTRLEN','STRPTR','STRINSERT$','STRING$','STRING','STRDELETE$', + 'STR$','STOP','STEP','STDOUT','STDIN','STAT_SUM','STAT_STDERROR','STAT_STDDEVIATION', + 'STAT_RANDOM','STAT_PRODUCT','STAT_MIN','STAT_MEDIAN','STAT_MEANHARMONIC','STAT_MEANGEOMETRIC','STAT_MEANARITHMETIC','STAT_MAX', + 'STAT_INVERSESUM','STAT_HISTOGRAM','STAT_FILLARRAY','STAT_COUNT','STAT_COPYARRAY','STAT_CLONEARRAY','STAT_CHISQUARE','STATIC', + 'STATE','SQR','SPLIT','SORT','SMTP_STATISTICS','SMTP_SETOPTION','SMTP_SETLOGFILE','SMTP_SENDHTML', + 'SMTP_SENDEMAIL','SMTP_GETERROR','SMTP_FINISHED','SMTP_DEBUG','SMTP_CONNECT','SMTP_CLOSE','SLEEP','SIZEOF', + 'SIZE','SINH','SINGLE','SIN','SIGNED','SHOW','SHIFT','SHAPETOBMP', + 'SGN','SETAT','SET','SENDMESSAGE','SENDKEYSBULK','SENDKEYS','SEND','SELECTEXPRESSION', + 'SELECT','SECH','SEC','SCAN','SAPI_SPEAK','SAPI_SETVOLUME','SAPI_SETRATE','SAPI_MODULELOADED', + 'SAPI_GETVOLUME','SAPI_GETRATE','RTRIM$','RTF_SETTEXT','RTF_SETFONTSIZE','RTF_SETFONTNAME','RTF_SETFGCOLOR','RTF_SETEFFECT', + 'RTF_SETBGCOLOR','RTF_SETALIGN','RTF_SAVETOFILE','RTF_LOADFROMFILE','RTF_GETTEXT','RTF_GETFONTSIZE','RTF_GETFONTNAME','RTF_GETEFFECT', + 'RTF_GETCLASS','RTF_APPENDTEXT','RSET$','ROUND','RNDF','RND','RIGHT$','RIGHT', + 'RGB','RESOURCE','RESIZE','RESET','REPLACE$','REPEAT$','REMOVE$','REM', + 'REGISTRY_SETVALUE','REGISTRY_SETTXTNUM','REGISTRY_SETTXTBOOL','REGISTRY_SETDWORD','REGISTRY_GETVALUE','REGISTRY_GETTXTNUM','REGISTRY_GETTXTBOOL','REGISTRY_GETDWORD', + 'REGISTRY_GETALLKEYS','REGISTRY_DELVALUE','REGISTRY_DELKEY','REFERENCE','REF','REDRAW','REDIM','RAS_SETPARAMS', + 'RAS_OPENDIALUPDIALOG','RAS_LOADENTRIES','RAS_HANGUPALL','RAS_HANGUP','RAS_GETENTRY','RAS_BEGINDIAL','RANDOMIZE','RADTODEG', + 'QUERYPERFORMANCEFREQUENCY','QUERYPERFORMANCECOUNTER','QUAD','PTR','PRESERVE','POST','POPUP','POKE$', + 'POKE','PIXELS','PI','PERMUTATIONS','PEEKMESSAGE','PEEK$','PEEK','PC_SYSTEMUPFROM', + 'PC_SUSPENDSTATE','PC_SHUTDOWN','PC_SHOWCARET','PC_SETCARETBLINKTIME','PC_RESTARTDIALOG','PC_PREVENTSHUTDOWN','PC_LOCK','PC_INSERTCD', + 'PC_HIDECARET','PC_GETSTATEONOFF','PC_GETSCROLLLOCKKEYSTATE','PC_GETNUMLOCKKEYSTATE','PC_GETCARETBLINKTIME','PC_GETCAPSLOCKKEYSTATE','PC_EMPTYBIN','PC_EJECTCD', + 'PC_DECODECDERROR','PCT','PARSESET$','PARSECOUNT','PARSE$','PARSE','PARAMETERS','OUTSIDE', + 'OS_WINVERSIONTEXT','OS_WINGETVERSIONTIMELINE','OS_SHELLEXECUTE','OS_SHELLABOUT','OS_SHELL','OS_SETLASTCALLDLLERROR','OS_SERVICESTOP','OS_SERVICESTATUSDESCRIPTION', + 'OS_SERVICESTARTTYPEDESCRIPTION','OS_SERVICESTART','OS_SERVICESETSTARTTYPE','OS_SERVICEQUERY','OS_SERVICEGETSTARTTYPE','OS_SERVICEGETLIST','OS_PROCESSKILLBYNAME','OS_PROCESSKILLBYID', + 'OS_PROCESSISRUNNING','OS_PROCESSGETLIST','OS_PROCESSGETID','OS_PROCESSARERUNNING','OS_MESSAGEBEEP','OS_ISWOW64','OS_ISFEATUREPRESENT','OS_IEVERSION', + 'OS_GETWINDOWSDIR','OS_GETUSERNAME','OS_GETTEMPDIR','OS_GETSYSTEMDIR','OS_GETSPECIALFOLDER','OS_GETLASTCALLDLLSTATUS','OS_GETLASTCALLDLLERROR','OS_GETCURRENTTHREADID', + 'OS_GETCURRENTPROCESSID','OS_GETCOMPUTERNAME','OS_GETCOMMANDS','OS_GETCOMMAND','OS_FLASHWINDOW','OS_FATALAPPEXIT','OS_ENVIRON','OS_CALLDLL', + 'OR','OPTIONAL','OPTION','OPT','ONCE','ON','OFF','NUMBER', + 'NOT','NEXT','NEW','MSGBOX','MOUSEPTR','MODULE','MODELESS','MODAL', + 'MOD','MKWRD$','MKS$','MKQ$','MKL$','MKI$','MKE$','MKDWD$', + 'MKD$','MKCUX$','MKCUR$','MKBYT$','MIN$','MIN','MID$','MENU', + 'MDI_CREATE','MCASE$','MAX$','MAX','MAKWRD','MAKLNG','MAKINT','MAKDWR', + 'LTRIM$','LSET$','LOWRD','LOOP','LONG','LOINT','LOG_WRITE','LOGB', + 'LOG2','LOG10','LOG','LOCAL','LOC','LL_UPDATEBYNAME','LL_UPDATE','LL_TOSTRING', + 'LL_TOFILE','LL_NAME','LL_GETITEM','LL_GETBYNUMBER','LL_FROMFILE','LL_FREE','LL_FINDLAST','LL_FINDBYNAME', + 'LL_FINDBYDATA','LL_DELETELIKE','LL_DELETEBYNAME','LL_DELETE','LL_DATABYNAME','LL_DATA','LL_COUNT','LL_ADD', + 'LISTBOX','LINE','LIBRARY_EXISTS','LIB','LEN','LEFT$','LEFT','LCASE$', + 'LBOUND','LABEL','KILL','JOIN$','ITERATE','ISWINDOW','ISUNICODE','ISTRUE', + 'ISODD','ISLIKE','ISFALSE','ISEVEN','IP_TOSTRING','IP_ADDR','INTERNALINFO','INTEGER', + 'INT','INSTR','INSIDE','INPUTBOX$','INI_SETKEY','INI_GETSECTIONSLIST','INI_GETSECTIONKEYLIST','INI_GETKEY', + 'INET_URLDOWNLOAD','INET_PING','INET_OPENDIALUPDIALOG','INET_GETSTATE','INET_GETREMOTEMACADDRESS','INET_GETIP','INET_GETCONNECTIONMODE','INCR', + 'IN','IMAGE','IIF$','IIF','IF','ICRYPTO_TESTSHA1','ICRYPTO_TESTMD5','ICRYPTO_TESTCRC32', + 'ICRYPTO_TESTCRC16','ICRYPTO_STRING2ASCII','ICRYPTO_SHA1','ICRYPTO_MD5','ICRYPTO_ENCRYPTRIJNDAEL','ICRYPTO_ENCRYPTRC4','ICRYPTO_DECRYPTRIJNDAEL','ICRYPTO_DECRYPTRC4', + 'ICRYPTO_CRC32','ICRYPTO_CRC16','ICRYPTO_BYTEXOR','ICRYPTO_BIN2ASCII','ICRYPTO_ASCII2STRING','ICRYPTO_ASCII2BIN','HOST_ADDR','HOSTNAME_TOIP', + 'HOSTIP_TONAME','HIWRD','HIINT','HEX$','HASH','HANDLE','GUIDTXT$','GUID$', + 'GRAPHIC','GLVOID','GLUSHORT','GLUINT','GLUBYTE','GLSIZEI','GLSHORT','GLOBAL', + 'GLINT','GLFLOAT','GLENUM','GLDOUBLE','GLCLAMPF','GLCLAMPD','GLBYTE','GLBOOLEAN', + 'GLBITFIELD','GETWINDOWMULTIKEYSTATE','GETWINDOWKEYSTATE','GETTICKCOUNT','GETS','GETMULTIASYNCKEYSTATE','GETMESSAGE','GETCURRENTINSTANCE', + 'GETAT','GETASYNCKEYSTATE','GET','FUNCTION_NPARAMS','FUNCTION_EXISTS','FUNCTION_CPARAMS','FUNCTION','FTP_SETSTRING', + 'FTP_SETSERVERDIR','FTP_SETNUMBER','FTP_SETMODE','FTP_SETLOGFILE','FTP_SETLOCALDIR','FTP_QUIT','FTP_PUTFILE','FTP_GETSTRING', + 'FTP_GETSERVERDIR','FTP_GETNUMBER','FTP_GETLOCALDIR','FTP_GETLIST','FTP_GETFILE','FTP_GETERRORSTRING','FTP_GETERRORNUMBER','FTP_FINISHED', + 'FTP_EXTRACT','FTP_DELFILE','FTP_CONNECT','FTP_COMMAND','FRAME','FRAC','FORMAT$','FOR', + 'FONT_LIST','FONT_CREATE','FONT','FOCUS','FLUSH','FIX','FILE_SIZE','FILE_SHELLDELETE', + 'FILE_SHELLCOPY','FILE_SETDATETIME','FILE_SEEK','FILE_SAVE','FILE_RENAME','FILE_PUT','FILE_PATHSPLIT','FILE_OPEN', + 'FILE_LOF','FILE_LOAD','FILE_LINEPRINT','FILE_LINEINPUT','FILE_KILL','FILE_GETVERSIONSTRING','FILE_GETVERSION','FILE_GETTIME', + 'FILE_GETDATETIMESTAMP','FILE_GETDATETIME','FILE_GETDATE','FILE_GET','FILE_EXISTS','FILE_EOF','FILE_COPY','FILE_CLOSE', + 'FILE_CHANGED','FILE_APPEND','FACTORIAL','EXTRACT$','EXT','EXPORT','EXP2','EXP10', + 'EXP','EXIT','EVAL_STRING','EVAL_SETSTRING','EVAL_SETNUMBER','EVAL_MATH','EVAL_LINKEXT','EVAL_GETSTRING', + 'EVAL_GETNUMBER','EVAL_ERRORGETTOKEN','EVAL_ERRORDESCRIPTION','EVAL_ERRORCLEAR','EVAL','ERRCLEAR','ERR','ENGINE_GETCURRENTTOKEN', + 'ENDIF','END','ENABLE','ELSEIF','ELSE','ECHO','DWORD','DT_YEAR', + 'DT_TIMETOSEC','DT_TIMESUBSECONDS','DT_TIMEFORMAT','DT_TIMEADDSECONDS','DT_SETTIMESEPARATOR','DT_SETDATESEPARATOR','DT_SETDATECENTURY','DT_SECTOTIME', + 'DT_SECTODATE','DT_SECOND','DT_MONTH','DT_MINUTE','DT_LASTDAYOFMONTH','DT_ISVALIDDATE','DT_ISLEAPYEAR','DT_HOUR', + 'DT_GETWEEKDAYNAME','DT_GETWEEKDAY','DT_GETTIMESTAMP','DT_GETTIMESEPARATOR','DT_GETMONTHNAME','DT_GETDATESEPARATOR','DT_GETDATECENTURY','DT_DAY', + 'DT_DATETOSEC','DT_DATETIMESUBSECONDS','DT_DATETIMEADDSECONDS','DT_DATESUBDAYS','DT_DATEFORMAT','DT_DATEDIFF','DT_DATEADDDAYS','DT_COOKIEDATE', + 'DRAW','DOUBLE','DOEVENTS','DO','DISABLE','DIR_REMOVE','DIR_MAKEALL','DIR_MAKE', + 'DIR_LISTARRAY','DIR_LIST','DIR_ISEMPTY','DIR_ISDIR','DIR_GETCURRENT','DIR_EXISTS','DIR_CHANGEDRIVE','DIR_CHANGE', + 'DIM','DICTIONARY_MEMINFO','DICTIONARY_LISTKEYS','DICTIONARY_FREE','DICTIONARY_FIND','DICTIONARY_EXISTS','DICTIONARY_CREATE','DICTIONARY_COUNT', + 'DICTIONARY_ADD','DIALOG_STOPEVENTS','DIALOG_SAVEFILE','DIALOG_OPENFILE','DIALOG_GETCONTROL','DIALOG_CHOOSECOLOR','DIALOG_BROWSEFORFOLDER','DIALOG', + 'DESKTOP','DESCENDING','DESCEND','DELETEOBJECT','DELETE','DEGTORAD','DECR','DECLARE', + 'DATE$','CVWRD','CVS','CVQ','CVL','CVI','CVE','CVDWD', + 'CVD','CVCUX','CVCUR','CVBYT','CURRENCY','CUR','CSET$','CSCH', + 'CSC','CRYPTO_GETPROVIDERTYPESCOUNT','CRYPTO_GETPROVIDERSCOUNT','CRYPTO_GETDEFAULTPROVIDER','CRYPTO_GENRANDOMSTRING','CRYPTO_ENUMPROVIDERTYPES','CRYPTO_ENUMPROVIDERS','CRYPTO_ENCRYPT', + 'CRYPTO_DECRYPT','CREATEFONT','COTH','COTAN','COSH','COS','CONTROL_SETTEXT','CONTROL_GETTEXT', + 'CONTROL_GETNUMBER','CONTROL','CONST','CONSOLE_WRITELINE','CONSOLE_WRITE','CONSOLE_WAITKEY','CONSOLE_SHOWWINDOW','CONSOLE_SHOWCURSOR', + 'CONSOLE_SETTITLE','CONSOLE_SETTEXTATTRIBUTE','CONSOLE_SETSTDHANDLE','CONSOLE_SETSCREENBUFFERSIZE','CONSOLE_SETPROGRESSBARCHAR','CONSOLE_SETOUTPUTMODE','CONSOLE_SETOUTPUTCP','CONSOLE_SETINPUTMODE', + 'CONSOLE_SETFILEAPISTOOEM','CONSOLE_SETFILEAPISTOANSI','CONSOLE_SETCURSORSIZE','CONSOLE_SETCURSORPOSITION','CONSOLE_SETCP','CONSOLE_SETACTIVESCREENBUFFER','CONSOLE_SCROLLWINDOW','CONSOLE_SCROLLBUFFERONEROW', + 'CONSOLE_SCROLLBUFFER','CONSOLE_SAVESCREEN','CONSOLE_RESTORESCREEN','CONSOLE_READLINE','CONSOLE_READ','CONSOLE_PROGRESSBAR','CONSOLE_PRINTLINE','CONSOLE_PRINTAT', + 'CONSOLE_PRINT','CONSOLE_NORMALSCREEN','CONSOLE_LINE','CONSOLE_INKEYB','CONSOLE_INKEY','CONSOLE_HIDECURSOR','CONSOLE_GETTITLE','CONSOLE_GETTEXTATTRIBUTE', + 'CONSOLE_GETSTDHANDLE','CONSOLE_GETSIZEY','CONSOLE_GETSIZEX','CONSOLE_GETPROGRESSBARCHAR','CONSOLE_GETOUTPUTMODE','CONSOLE_GETOUTPUTCP','CONSOLE_GETNUMBEROFMOUSEBUTTONS','CONSOLE_GETINPUTMODE', + 'CONSOLE_GETCURSORY','CONSOLE_GETCURSORX','CONSOLE_GETCURSORSIZE','CONSOLE_GETCURRENTFONTINDEX','CONSOLE_GETCP','CONSOLE_GENERATECTRLEVENT','CONSOLE_FULLSCREEN','CONSOLE_FREE', + 'CONSOLE_FOREGROUNDRGB','CONSOLE_ENABLECTRLC','CONSOLE_DISABLECTRLC','CONSOLE_CREATESCREENBUFFER','CONSOLE_COLORAT','CONSOLE_CLS','CONSOLE_BOX','CONSOLE_BACKGROUNDRGB', + 'CONSOLE_ATTACH','CONSOLE_AREFILEAPISANSI','CONSOLE_ALLOC','COM_VARIANTINIT','COM_VARIANTCOPY','COM_VARIANTCLEAR','COM_SUCCEEDED','COM_STRINGFROMCLSID', + 'COM_RELEASE','COM_QUERYINTERFACE','COM_PROGIDFROMCLSID','COM_ISEQUALIID','COM_ISEQUALGUID','COM_ISEQUALCLSID','COM_GETOBJECT','COM_GETENGINEGUID', + 'COM_EXECUTE','COM_DISPLAYERROR','COM_CREATEOBJECT','COM_CLSIDFROMSTRING','COM_CLSIDFROMPROGID','COM_BUILDVARIANT','COMBOBOX','COMBINATIONS', + 'COLOR','CLIPBOARD_SETTEXT','CLIPBOARD_GETTEXT','CLIENT','CLEARMESSAGES','CHR$','CHOOSE$','CHOOSE', + 'CHECKBOX','CHECK3STATE','CHECK','CGI_WRITELOGFILE','CGI_WRITE','CGI_URLDECODESTRING','CGI_UPLOADFILESTIME','CGI_UPLOADFILESNUMBER', + 'CGI_UPLOADFILESIZE','CGI_STARTSESSION','CGI_SETSESSIONVARIABLE','CGI_RESETDEFAULTSETTINGS','CGI_REMOVESPECIALCHARSPREFIX','CGI_REMOVEQUOTE','CGI_READ','CGI_LOADCONFIGFILE', + 'CGI_HEADER','CGI_GETSESSIONVARIABLE','CGI_GETREQUESTMETHOD','CGI_GETQUERYVALUE','CGI_GETCURRENTSESSION','CGI_GETCURRENTGUID','CGI_ENVIRON','CGI_CFGSETOPTION', + 'CGI_CFGGETOPTION','CGI_ADDSPECIALCHARSPREFIX','CGI_ADDQUOTE','CEIL','CASE','CALL','BYVAL','BYTE', + 'BYREF','BYCMD','BUTTON','BUNDLE_SETSCRIPTPARAMETERS','BUNDLE_SETSCRIPTNAME','BUNDLE_SETFLAGOBFUSCATEMAINSCRIPT','BUNDLE_SETFLAGDELETEAFTERRUN','BUNDLE_SETFLAGCOMPRESSALLFILES', + 'BUNDLE_SETFLAGASKBEFOREEXTRACT','BUNDLE_SETEXTRACTIONFOLDER','BUNDLE_SETCREATIONFOLDER','BUNDLE_SETBUNDLENAME','BUNDLE_RESET','BUNDLE_MAKE','BUNDLE_BUILDER','BUNDLE_ADDFOLDER', + 'BUNDLE_ADDFILE','BOUNDCHECK','BIN$','BIFF_WRITETEXT','BIFF_WRITENUMBER','BIFF_WRITEDATE','BIFF_SETROWHEIGHT','BIFF_SETCOLWIDTH', + 'BIFF_SETBUFFER','BIFF_CREATEFILE','BIFF_CLOSEFILE','BETWEEN','BEEP','BAR','ATTACH','ATN', + 'AT','ASSIGN','ASCIZ','ASCIIZ','ASCII2UNICODE','ASCENDING','ASCEND','ASC', + 'AS','ARRAY','ARCTANH','ARCSINH','ARCSIN','ARCSECH','ARCSEC','ARCCSCH', + 'ARCCSC','ARCCOTH','ARCCOT','ARCCOSH','ARCCOS','APP_TIMER','APP_SOURCEPATH','APP_SOURCENAME', + 'APP_SOURCEFULLNAME','APP_PATH','APP_NAME','APP_LISTVARIABLES','APP_LISTKEYWORDS','APP_LISTFUNCTIONS','APP_LISTEQUATES','APP_INCLUDEPATH', + 'APP_GETMODULEFULLPATH','APP_COUNTER','APPEND','ANY','ANIMATE_STOP','ANIMATE_PLAY','ANIMATE_OPEN','AND', + 'ALIAS','ALERT','ADD','ACODE$','ABS','%DEF','#MINVERSION','#IF', + '#ENDIF','#ELSEIF','#ELSE','#DEFAULT','#DEF','SQLWRITEPRIVATEPROFILESTRING','SQLWRITEFILEDSN','SQLWRITEDSNTOINI', + 'SQLVALIDDSN','SQLTRANSACT','SQLTABLES','SQLTABLEPRIVILEGES','SQLSTATISTICS','SQLSPECIALCOLUMNS','SQLSETSTMTOPTION','SQLSETSTMTATTR', + 'SQLSETSCROLLOPTIONS','SQLSETPOS','SQLSETPARAM','SQLSETENVATTR','SQLSETDESCREC','SQLSETDESCFIELD','SQLSETCURSORNAME','SQLSETCONNECTOPTION', + 'SQLSETCONNECTATTR','SQLSETCONFIGMODE','SQLROWCOUNT','SQLREMOVETRANSLATOR','SQLREMOVEDSNFROMINI','SQLREMOVEDRIVERMANAGER','SQLREMOVEDRIVER','SQLREADFILEDSN', + 'SQLPUTDATA','SQLPROCEDURES','SQLPROCEDURECOLUMNS','SQLPRIMARYKEYS','SQLPREPARE','SQLPOSTINSTALLERERROR','SQLPARAMOPTIONS','SQLPARAMDATA', + 'SQLNUMRESULTCOLS','SQLNUMPARAMS','SQLNATIVESQL','SQLMORERESULTS','SQLMANAGEDATASOURCES','SQLINSTALLTRANSLATOREX','SQLINSTALLERERROR','SQLINSTALLDRIVERMANAGER', + 'SQLINSTALLDRIVEREX','SQLGETTYPEINFO','SQLGETTRANSLATOR','SQLGETSTMTOPTION','SQLGETSTMTATTR','SQLGETPRIVATEPROFILESTRING','SQLGETINSTALLEDDRIVERS','SQLGETINFO', + 'SQLGETFUNCTIONS','SQLGETENVATTR','SQLGETDIAGREC','SQLGETDIAGFIELD','SQLGETDESCREC','SQLGETDESCFIELD','SQLGETDATA','SQLGETCURSORNAME', + 'SQLGETCONNECTOPTION','SQLGETCONNECTATTR','SQLGETCONFIGMODE','SQLFREESTMT','SQLFREEHANDLE','SQLFREEENV','SQLFREECONNECT','SQLFOREIGNKEYS', + 'SQLFETCHSCROLL','SQLFETCH','SQLEXTENDEDFETCH','SQLEXECUTE','SQLEXECDIRECT','SQLERROR','SQLENDTRAN','SQLDRIVERS', + 'SQLDRIVERCONNECT','SQLDISCONNECT','SQLDESCRIBEPARAM','SQLDESCRIBECOL','SQLDATASOURCES','SQLCREATEDATASOURCE','SQLCOPYDESC','SQLCONNECT', + 'SQLCONFIGDRIVER','SQLCONFIGDATASOURCE','SQLCOLUMNS','SQLCOLUMNPRIVILEGES','SQLCOLATTRIBUTES','SQLCOLATTRIBUTE','SQLCLOSECURSOR','SQLCANCEL', + 'SQLBULKOPERATIONS','SQLBROWSECONNECT','SQLBINDPARAMETER','SQLBINDPARAM','SQLBINDCOL','SQLALLOCSTMT','SQLALLOCHANDLE','SQLALLOCENV', + 'SQLALLOCCONNECT','ODBCWRONGDRIVER','ODBCWRITEPRIVATEPROFILESTRING','ODBCWRITEFILEDSN','ODBCWRITEDSNTOINI','ODBCVALIDDSN','ODBCUPDATERECORD','ODBCUPDATEBYBOOKMARK', + 'ODBCUNLOCKRECORD','ODBCUNBINDCOLUMNS','ODBCUNBINDCOL','ODBCTABLESCOUNT','ODBCTABLES','ODBCTABLEPRIVILEGESCOUNT','ODBCTABLEPRIVILEGES','ODBCSUPPORTS', + 'ODBCSTATTABLESCHEMANAME','ODBCSTATTABLEPAGES','ODBCSTATTABLECATALOGNAME','ODBCSTATTABLECARDINALITY','ODBCSTATISTICSCOUNT','ODBCSTATISTICS','ODBCSTATINDEXSORTSEQUENCE','ODBCSTATINDEXSCHEMANAME', + 'ODBCSTATINDEXQUALIFIER','ODBCSTATINDEXPAGES','ODBCSTATINDEXFILTERCONDITION','ODBCSTATINDEXCOLUMNORDINALPOSITION','ODBCSTATINDEXCOLUMNNAME','ODBCSTATINDEXCATALOGNAME','ODBCSTATINDEXCARDINALITY','ODBCSTATINDEXALLOWDUPLICATES', + 'ODBCSPECIALCOLUMNSCOUNT','ODBCSPECIALCOLUMNS','ODBCSETTXNISOLATION','ODBCSETTRANSLATELIB','ODBCSETTRACEFILE','ODBCSETTRACE','ODBCSETSTMTUSEBOOKMARKS','ODBCSETSTMTSIMULATECURSOR', + 'ODBCSETSTMTROWSTATUSPTR','ODBCSETSTMTROWSFETCHEDPTR','ODBCSETSTMTROWOPERATIONPTR','ODBCSETSTMTROWBINDTYPE','ODBCSETSTMTROWBINDOFFSETPTR','ODBCSETSTMTROWARRAYSIZE','ODBCSETSTMTRETRIEVEDATA','ODBCSETSTMTQUERYTIMEOUT', + 'ODBCSETSTMTPARAMSTATUSPTR','ODBCSETSTMTPARAMSPROCESSEDPTR','ODBCSETSTMTPARAMSETSIZE','ODBCSETSTMTPARAMOPERATIONPTR','ODBCSETSTMTPARAMBINDTYPE','ODBCSETSTMTPARAMBINDOFFSETPTR','ODBCSETSTMTNOSCAN','ODBCSETSTMTMETADATAID', + 'ODBCSETSTMTMAXROWS','ODBCSETSTMTMAXLENGTH','ODBCSETSTMTKEYSETSIZE','ODBCSETSTMTFETCHBOOKMARKPTR','ODBCSETSTMTENABLEAUTOIPD','ODBCSETSTMTCURSORTYPE','ODBCSETSTMTCURSORSENSITIVITY','ODBCSETSTMTCURSORSCROLLABLE', + 'ODBCSETSTMTCONCURRENCY','ODBCSETSTMTATTR','ODBCSETSTMTASYNCENABLE','ODBCSETSTMTAPPROWDESC','ODBCSETSTMTAPPPARAMDESC','ODBCSETSTATICCURSOR','ODBCSETROWVERCONCURRENCY','ODBCSETRESULT', + 'ODBCSETRELATIVEPOSITION','ODBCSETREADONLYCONCURRENCY','ODBCSETQUIETMODE','ODBCSETPOSITION','ODBCSETPOS','ODBCSETPACKETMODE','ODBCSETOPTIMISTICCONCURRENCY','ODBCSETODBCCURSORS', + 'ODBCSETMULTIUSERKEYSETCURSOR','ODBCSETMETADATAID','ODBCSETLOGINTIMEOUT','ODBCSETLOCKCONCURRENCY','ODBCSETKEYSETDRIVENCURSOR','ODBCSETFORWARDONLYCURSOR','ODBCSETENVOUTPUTNTS','ODBCSETENVODBCVERSION', + 'ODBCSETENVCPMATCH','ODBCSETENVCONNECTIONPOOLING','ODBCSETENVATTR','ODBCSETDYNAMICCURSOR','ODBCSETDESCREC','ODBCSETDESCFIELD','ODBCSETCURSORTYPE','ODBCSETCURSORSENSITIVITY', + 'ODBCSETCURSORSCROLLABILITY','ODBCSETCURSORNAME','ODBCSETCURSORLOCKTYPE','ODBCSETCURSORKEYSETSIZE','ODBCSETCURSORCONCURRENCY','ODBCSETCURRENTCATALOG','ODBCSETCONNECTIONTIMEOUT','ODBCSETCONNECTATTR', + 'ODBCSETCONFIGMODE','ODBCSETCONCURVALUESCONCURRENCY','ODBCSETAUTOCOMMITON','ODBCSETAUTOCOMMITOFF','ODBCSETAUTOCOMMIT','ODBCSETASYNCENABLE','ODBCSETACCESSMODE','ODBCSETABSOLUTEPOSITION', + 'ODBCROWCOUNT','ODBCROLLBACKTRAN','ODBCROLLBACKENVTRAN','ODBCROLLBACKDBCTRAN','ODBCRESULT','ODBCRESETPARAMS','ODBCREMOVETRANSLATOR','ODBCREMOVEDSNFROMINI', + 'ODBCREMOVEDRIVERMANAGER','ODBCREMOVEDRIVER','ODBCREFRESHRECORD','ODBCRECORDCOUNT','ODBCREADFILEDSN','ODBCQUOTEDIDENTIFIERCASE','ODBCPUTDATA','ODBCPROCEDURESCOUNT', + 'ODBCPROCEDURES','ODBCPROCEDURECOLUMNSCOUNT','ODBCPROCEDURECOLUMNS','ODBCPRIMARYKEYSCOUNT','ODBCPRIMARYKEYS','ODBCPREPARE','ODBCPOSTINSTALLERERROR','ODBCPARAMDATA', + 'ODBCOPENSTMT','ODBCOPENCONNECTION','ODBCNUMRESULTCOLS','ODBCNUMPARAMS','ODBCNATIVESQL','ODBCMOVEPREVIOUS','ODBCMOVENEXT','ODBCMOVELAST', + 'ODBCMOVEFIRST','ODBCMOVE','ODBCMORERESULTS','ODBCMANAGEDATASOURCES','ODBCLOCKRECORD','ODBCINSTALLTRANSLATOREX','ODBCINSTALLERERROR','ODBCINSTALLDRIVERMANAGER', + 'ODBCINSTALLDRIVEREX','ODBCGETXOPENCLIYEAR','ODBCGETUSERNAME','ODBCGETUNION','ODBCGETTYPEINFOCOUNT','ODBCGETTYPEINFO','ODBCGETTXNISOLATIONOPTION','ODBCGETTXNISOLATION', + 'ODBCGETTXNCAPABLE','ODBCGETTRANSLATOR','ODBCGETTRANSLATELIB','ODBCGETTRACEFILE','ODBCGETTRACE','ODBCGETTIMEDATEFUNCTIONS','ODBCGETTIMEDATEDIFFINTERVALS','ODBCGETTIMEDATEADDINTERVALS', + 'ODBCGETTABLETERM','ODBCGETSYSTEMFUNCTIONS','ODBCGETSUBQUERIES','ODBCGETSTRINGFUNCTIONS','ODBCGETSTMTUSEBOOKMARKS','ODBCGETSTMTSQLSTATE','ODBCGETSTMTSIMULATECURSOR','ODBCGETSTMTROWSTATUSPTR', + 'ODBCGETSTMTROWSFETCHEDPTR','ODBCGETSTMTROWOPERATIONPTR','ODBCGETSTMTROWNUMBER','ODBCGETSTMTROWBINDTYPE','ODBCGETSTMTROWBINDOFFSETPTR','ODBCGETSTMTROWARRAYSIZE','ODBCGETSTMTRETRIEVEDATA','ODBCGETSTMTQUERYTIMEOUT', + 'ODBCGETSTMTPARAMSTATUSPTR','ODBCGETSTMTPARAMSPROCESSEDPTR','ODBCGETSTMTPARAMSETSIZE','ODBCGETSTMTPARAMOPERATIONPTR','ODBCGETSTMTPARAMBINDTYPE','ODBCGETSTMTPARAMBINDOFFSETPTR','ODBCGETSTMTNOSCAN','ODBCGETSTMTMETADATAID', + 'ODBCGETSTMTMAXROWS','ODBCGETSTMTMAXLENGTH','ODBCGETSTMTKEYSETSIZE','ODBCGETSTMTIMPROWDESC','ODBCGETSTMTIMPPARAMDESC','ODBCGETSTMTFETCHBOOKMARKPTR','ODBCGETSTMTERRORINFO','ODBCGETSTMTENABLEAUTOIPD', + 'ODBCGETSTMTCURSORTYPE','ODBCGETSTMTCURSORSENSITIVITY','ODBCGETSTMTCURSORSCROLLABLE','ODBCGETSTMTCONCURRENCY','ODBCGETSTMTATTR','ODBCGETSTMTASYNCENABLE','ODBCGETSTMTAPPROWDESC','ODBCGETSTMTAPPPARAMDESC', + 'ODBCGETSTATICCURSORATTRIBUTES2','ODBCGETSTATICCURSORATTRIBUTES1','ODBCGETSTATEMENTSQLSTATE','ODBCGETSTATEMENTERRORINFO','ODBCGETSTANDARDCLICONFORMANCE','ODBCGETSQLSTATE','ODBCGETSQLCONFORMANCE','ODBCGETSQL92VALUEEXPRESSIONS', + 'ODBCGETSQL92STRINGFUNCTIONS','ODBCGETSQL92ROWVALUECONSTRUCTOR','ODBCGETSQL92REVOKE','ODBCGETSQL92RELATIONALJOINOPERATORS','ODBCGETSQL92PREDICATES','ODBCGETSQL92NUMERICVALUEFUNCTIONS','ODBCGETSQL92GRANT','ODBCGETSQL92FOREIGNKEYUPDATERULE', + 'ODBCGETSQL92FOREIGNKEYDELETERULE','ODBCGETSQL92DATETIMEFUNCTIONS','ODBCGETSPECIALCHARACTERS','ODBCGETSERVERNAME','ODBCGETSEARCHPATTERNESCAPE','ODBCGETSCROLLOPTIONS','ODBCGETSCHEMAUSAGE','ODBCGETSCHEMATERM', + 'ODBCGETROWUPDATES','ODBCGETQUIETMODE','ODBCGETPROCEDURETERM','ODBCGETPROCEDURESSUPPORT','ODBCGETPRIVATEPROFILESTRING','ODBCGETPOSOPERATIONS','ODBCGETPARAMARRAYSELECTS','ODBCGETPARAMARRAYROWCOUNTS', + 'ODBCGETPACKETMODE','ODBCGETOUTERJOINS','ODBCGETORDERBYCOLUMNSINSELECT','ODBCGETOJCAPABILITIES','ODBCGETODBCVER','ODBCGETODBCINTERFACECONFORMANCE','ODBCGETODBCCURSORS','ODBCGETNUMERICFUNCTIONS', + 'ODBCGETNULLCOLLATION','ODBCGETNONNULLABLECOLUMNS','ODBCGETNEEDLONGDATALEN','ODBCGETMULTRESULTSETS','ODBCGETMULTIPLEACTIVETXN','ODBCGETMETADATAID','ODBCGETMAXUSERNAMELEN','ODBCGETMAXTABLESINSELECT', + 'ODBCGETMAXTABLENAMELEN','ODBCGETMAXSTATEMENTLEN','ODBCGETMAXSCHEMANAMELEN','ODBCGETMAXROWSIZEINCLUDESLONG','ODBCGETMAXROWSIZE','ODBCGETMAXPROCEDURENAMELEN','ODBCGETMAXINDEXSIZE','ODBCGETMAXIDENTIFIERLEN', + 'ODBCGETMAXDRIVERCONNECTIONS','ODBCGETMAXCURSORNAMELEN','ODBCGETMAXCONCURRENTACTIVITIES','ODBCGETMAXCOLUMNSINTABLE','ODBCGETMAXCOLUMNSINSELECT','ODBCGETMAXCOLUMNSINORDERBY','ODBCGETMAXCOLUMNSININDEX','ODBCGETMAXCOLUMNSINGROUPBY', + 'ODBCGETMAXCOLUMNNAMELEN','ODBCGETMAXCHARLITERALLEN','ODBCGETMAXCATALOGNAMELEN','ODBCGETMAXBINARYLITERALLEN','ODBCGETMAXASYNCCONCURRENTSTATEMENTS','ODBCGETLONGVARCHARDATABYCOLNAME','ODBCGETLONGVARCHARDATA','ODBCGETLOGINTIMEOUT', + 'ODBCGETLIKEESCAPECLAUSE','ODBCGETKEYWORDS','ODBCGETKEYSETCURSORATTRIBUTES2','ODBCGETKEYSETCURSORATTRIBUTES1','ODBCGETINTEGRITY','ODBCGETINSTALLERERRORMESSAGE','ODBCGETINSTALLERERRORCODE','ODBCGETINSTALLEDDRIVERS', + 'ODBCGETINSERTSTATEMENT','ODBCGETINFOSTR','ODBCGETINFOSCHEMAVIEWS','ODBCGETINFOLONG','ODBCGETINFOINT','ODBCGETINFO','ODBCGETINDEXKEYWORDS','ODBCGETIMPROWDESCREC', + 'ODBCGETIMPROWDESCFIELDTYPE','ODBCGETIMPROWDESCFIELDSCALE','ODBCGETIMPROWDESCFIELDPRECISION','ODBCGETIMPROWDESCFIELDOCTETLENGTH','ODBCGETIMPROWDESCFIELDNULLABLE','ODBCGETIMPROWDESCFIELDNAME','ODBCGETIMPROWDESCFIELD','ODBCGETIMPPARAMDESCREC', + 'ODBCGETIMPPARAMDESCFIELDTYPE','ODBCGETIMPPARAMDESCFIELDSCALE','ODBCGETIMPPARAMDESCFIELDPRECISION','ODBCGETIMPPARAMDESCFIELDOCTETLENGTH','ODBCGETIMPPARAMDESCFIELDNULLABLE','ODBCGETIMPPARAMDESCFIELDNAME','ODBCGETIMPPARAMDESCFIELD','ODBCGETIDENTIFIERQUOTECHAR', + 'ODBCGETIDENTIFIERCASE','ODBCGETGROUPBY','ODBCGETFUNCTIONS','ODBCGETFORWARDONLYCURSORATTRIBUTES2','ODBCGETFORWARDONLYCURSORATTRIBUTES1','ODBCGETFILEUSAGE','ODBCGETEXPRESSIONSINORDERBY','ODBCGETERRORINFO', + 'ODBCGETENVSQLSTATE','ODBCGETENVOUTPUTNTS','ODBCGETENVODBCVERSION','ODBCGETENVIRONMENTSQLSTATE','ODBCGETENVIRONMENTERRORINFO','ODBCGETENVERRORINFO','ODBCGETENVCPMATCH','ODBCGETENVCONNECTIONPOOLING', + 'ODBCGETENVATTR','ODBCGETDYNAMICCURSORATTRIBUTES2','ODBCGETDYNAMICCURSORATTRIBUTES1','ODBCGETDROPVIEW','ODBCGETDROPTRANSLATION','ODBCGETDROPTABLE','ODBCGETDROPSCHEMA','ODBCGETDROPDOMAIN', + 'ODBCGETDROPCOLLATION','ODBCGETDROPCHARACTERSET','ODBCGETDROPASSERTION','ODBCGETDRIVERVER','ODBCGETDRIVERODBCVER','ODBCGETDRIVERNAME','ODBCGETDRIVERMANAGERINSTALLPATH','ODBCGETDRIVERHLIB', + 'ODBCGETDRIVERHENV','ODBCGETDRIVERHDBC','ODBCGETDMVERMINOR','ODBCGETDMVERMAJOR','ODBCGETDMVER','ODBCGETDIAGREC','ODBCGETDIAGFIELD','ODBCGETDESCSQLSTATE', + 'ODBCGETDESCRIPTORSQLSTATE','ODBCGETDESCRIPTORERRORINFO','ODBCGETDESCRIBEPARAMETER','ODBCGETDESCREC','ODBCGETDESCFIELD','ODBCGETDESCERRORINFO','ODBCGETDEFAULTTXNISOLATION','ODBCGETDDLINDEX', + 'ODBCGETDBMSVER','ODBCGETDBMSNAME','ODBCGETDBCSQLSTATE','ODBCGETDBCERRORINFO','ODBCGETDATETIMELITERALS','ODBCGETDATASTRINGBYCOLNAME','ODBCGETDATASTRING','ODBCGETDATASOURCEREADONLY', + 'ODBCGETDATASOURCENAME','ODBCGETDATAEXTENSIONS','ODBCGETDATABASENAME','ODBCGETDATA','ODBCGETCURSORTYPE','ODBCGETCURSORSENSITIVITYSUPPORT','ODBCGETCURSORSENSITIVITY','ODBCGETCURSORSCROLLABILITY', + 'ODBCGETCURSORROLLBACKBEHAVIOR','ODBCGETCURSORNAME','ODBCGETCURSORLOCKTYPE','ODBCGETCURSORKEYSETSIZE','ODBCGETCURSORCONCURRENCY','ODBCGETCURSORCOMMITBEHAVIOR','ODBCGETCURRENTCATALOG','ODBCGETCREATEVIEW', + 'ODBCGETCREATETRANSLATION','ODBCGETCREATETABLE','ODBCGETCREATESCHEMA','ODBCGETCREATEDOMAIN','ODBCGETCREATECOLLATION','ODBCGETCREATECHARACTERSET','ODBCGETCREATEASSERTION','ODBCGETCORRELATIONNAME', + 'ODBCGETCONVERTVARCHAR','ODBCGETCONVERTVARBINARY','ODBCGETCONVERTTINYINT','ODBCGETCONVERTTIMESTAMP','ODBCGETCONVERTTIME','ODBCGETCONVERTSMALLINT','ODBCGETCONVERTREAL','ODBCGETCONVERTNUMERIC', + 'ODBCGETCONVERTLONGVARCHAR','ODBCGETCONVERTLONGVARBINARY','ODBCGETCONVERTINTERVALYEARMONTH','ODBCGETCONVERTINTERVALDAYTIME','ODBCGETCONVERTINTEGER','ODBCGETCONVERTFUNCTIONS','ODBCGETCONVERTFLOAT','ODBCGETCONVERTDOUBLE', + 'ODBCGETCONVERTDECIMAL','ODBCGETCONVERTDATE','ODBCGETCONVERTCHAR','ODBCGETCONVERTBIT','ODBCGETCONVERTBINARY','ODBCGETCONVERTBIGINT','ODBCGETCONNECTIONTIMEOUT','ODBCGETCONNECTIONSQLSTATE', + 'ODBCGETCONNECTIONERRORINFO','ODBCGETCONNECTIONDEAD','ODBCGETCONNECTATTR','ODBCGETCONFIGMODE','ODBCGETCONCATNULLBEHAVIOR','ODBCGETCOLUMNALIAS','ODBCGETCOLLATIONSEQ','ODBCGETCATALOGUSAGE', + 'ODBCGETCATALOGTERM','ODBCGETCATALOGNAMESEPARATOR','ODBCGETCATALOGNAME','ODBCGETCATALOGLOCATION','ODBCGETBOOKMARKPERSISTENCE','ODBCGETBATCHSUPPORT','ODBCGETBATCHROWCOUNT','ODBCGETAUTOIPD', + 'ODBCGETAUTOCOMMIT','ODBCGETASYNCMODE','ODBCGETASYNCENABLE','ODBCGETALTERTABLE','ODBCGETALTERDOMAIN','ODBCGETAGGREGATEFUNCTIONS','ODBCGETACTIVEENVIRONMENTS','ODBCGETACCESSMODE', + 'ODBCGETACCESSIBLETABLES','ODBCGETACCESSIBLEPROCEDURES','ODBCFREESTMT','ODBCFREEHANDLE','ODBCFREEENV','ODBCFREEDESC','ODBCFREEDBC','ODBCFREECONNECT', + 'ODBCFOREIGNKEYSCOUNT','ODBCFOREIGNKEYS','ODBCFETCHSCROLL','ODBCFETCHBYBOOKMARK','ODBCFETCH','ODBCEXTENDEDFETCH','ODBCEXECUTE','ODBCEXECDIRECT', + 'ODBCERROR','ODBCEOF','ODBCENDTRAN','ODBCDRIVERSCOUNT','ODBCDRIVERS','ODBCDRIVERCONNECT','ODBCDISCONNECT','ODBCDESCRIBEPARAM', + 'ODBCDESCRIBECOL','ODBCDELETERECORD','ODBCDELETEBYBOOKMARK','ODBCDATASOURCES','ODBCCREATEDATASOURCE','ODBCCOPYDESC','ODBCCONNECTIONISDEAD','ODBCCONNECTIONISALIVE', + 'ODBCCONNECT','ODBCCONFIGDRIVER','ODBCCONFIGDATASOURCE','ODBCCOMMITTRAN','ODBCCOMMITENVTRAN','ODBCCOMMITDBCTRAN','ODBCCOLUPDATABLE','ODBCCOLUNSIGNED', + 'ODBCCOLUNNAMED','ODBCCOLUMNSCOUNT','ODBCCOLUMNS','ODBCCOLUMNPRIVILEGESCOUNT','ODBCCOLUMNPRIVILEGES','ODBCCOLUMN','ODBCCOLTYPENAME','ODBCCOLTYPE', + 'ODBCCOLTABLENAME','ODBCCOLSEARCHABLE','ODBCCOLSCHEMANAME','ODBCCOLSCALE','ODBCCOLPRECISION','ODBCCOLOCTETLENGTH','ODBCCOLNUMPRECRADIX','ODBCCOLNULLABLE', + 'ODBCCOLNAME','ODBCCOLLOCALTYPENAME','ODBCCOLLITERALSUFFIX','ODBCCOLLITERALPREFIX','ODBCCOLLENGTH','ODBCCOLLABEL','ODBCCOLISNULL','ODBCCOLFIXEDPRECSCALE', + 'ODBCCOLDISPLAYSIZE','ODBCCOLCOUNT','ODBCCOLCONCISETYPE','ODBCCOLCATALOGNAME','ODBCCOLCASESENSITIVE','ODBCCOLBASETABLENAME','ODBCCOLBASECOLUMNNAME','ODBCCOLAUTOUNIQUEVALUE', + 'ODBCCOLATTRIBUTE','ODBCCLOSESTMTCURSOR','ODBCCLOSESTMT','ODBCCLOSECURSOR','ODBCCLOSECONNECTION','ODBCCLEARRESULT','ODBCCANCEL','ODBCBULKOPERATIONS', + 'ODBCBROWSECONNECT','ODBCBINDPARAMETER','ODBCBINDCOLTOWORD','ODBCBINDCOLTOTIMESTAMP','ODBCBINDCOLTOTIME','ODBCBINDCOLTOSTRING','ODBCBINDCOLTOSINGLE','ODBCBINDCOLTOQUAD', + 'ODBCBINDCOLTONUMERIC','ODBCBINDCOLTOLONG','ODBCBINDCOLTOINTEGER','ODBCBINDCOLTODWORD','ODBCBINDCOLTODOUBLE','ODBCBINDCOLTODECIMAL','ODBCBINDCOLTODATE','ODBCBINDCOLTOCURRENCY', + 'ODBCBINDCOLTOBYTE','ODBCBINDCOLTOBIT','ODBCBINDCOLTOBINARY','ODBCBINDCOL','ODBCALLOCSTMT','ODBCALLOCHANDLE','ODBCALLOCENV','ODBCALLOCDESC', + 'ODBCALLOCDBC','ODBCALLOCCONNECT','ODBCADDRECORD','GLVIEWPORT','GLVERTEXPOINTER','GLVERTEX4SV','GLVERTEX4S','GLVERTEX4IV', + 'GLVERTEX4I','GLVERTEX4FV','GLVERTEX4F','GLVERTEX4DV','GLVERTEX4D','GLVERTEX3SV','GLVERTEX3S','GLVERTEX3IV', + 'GLVERTEX3I','GLVERTEX3FV','GLVERTEX3F','GLVERTEX3DV','GLVERTEX3D','GLVERTEX2SV','GLVERTEX2S','GLVERTEX2IV', + 'GLVERTEX2I','GLVERTEX2FV','GLVERTEX2F','GLVERTEX2DV','GLVERTEX2D','GLUUNPROJECT','GLUTESSVERTEX','GLUTESSPROPERTY', + 'GLUTESSNORMAL','GLUTESSENDPOLYGON','GLUTESSENDCONTOUR','GLUTESSCALLBACK','GLUTESSBEGINPOLYGON','GLUTESSBEGINCONTOUR','GLUSPHERE','GLUSCALEIMAGE', + 'GLUQUADRICTEXTURE','GLUQUADRICORIENTATION','GLUQUADRICNORMALS','GLUQUADRICDRAWSTYLE','GLUQUADRICCALLBACK','GLUPWLCURVE','GLUPROJECT','GLUPICKMATRIX', + 'GLUPERSPECTIVE','GLUPARTIALDISK','GLUORTHO2D','GLUNURBSSURFACE','GLUNURBSPROPERTY','GLUNURBSCURVE','GLUNURBSCALLBACK','GLUNEXTCONTOUR', + 'GLUNEWTESS','GLUNEWQUADRIC','GLUNEWNURBSRENDERER','GLULOOKAT','GLULOADSAMPLINGMATRICES','GLUGETTESSPROPERTY','GLUGETSTRING','GLUGETNURBSPROPERTY', + 'GLUERRORSTRING','GLUENDTRIM','GLUENDSURFACE','GLUENDPOLYGON','GLUENDCURVE','GLUDISK','GLUDELETETESS','GLUDELETEQUADRIC', + 'GLUDELETENURBSRENDERER','GLUCYLINDER','GLUBUILD2DMIPMAPS','GLUBUILD1DMIPMAPS','GLUBEGINTRIM','GLUBEGINSURFACE','GLUBEGINPOLYGON','GLUBEGINCURVE', + 'GLTRANSLATEF','GLTRANSLATED','GLTEXSUBIMAGE2D','GLTEXSUBIMAGE1D','GLTEXPARAMETERIV','GLTEXPARAMETERI','GLTEXPARAMETERFV','GLTEXPARAMETERF', + 'GLTEXIMAGE2D','GLTEXIMAGE1D','GLTEXGENIV','GLTEXGENI','GLTEXGENFV','GLTEXGENF','GLTEXGENDV','GLTEXGEND', + 'GLTEXENVIV','GLTEXENVI','GLTEXENVFV','GLTEXENVF','GLTEXCOORDPOINTER','GLTEXCOORD4SV','GLTEXCOORD4S','GLTEXCOORD4IV', + 'GLTEXCOORD4I','GLTEXCOORD4FV','GLTEXCOORD4F','GLTEXCOORD4DV','GLTEXCOORD4D','GLTEXCOORD3SV','GLTEXCOORD3S','GLTEXCOORD3IV', + 'GLTEXCOORD3I','GLTEXCOORD3FV','GLTEXCOORD3F','GLTEXCOORD3DV','GLTEXCOORD3D','GLTEXCOORD2SV','GLTEXCOORD2S','GLTEXCOORD2IV', + 'GLTEXCOORD2I','GLTEXCOORD2FV','GLTEXCOORD2F','GLTEXCOORD2DV','GLTEXCOORD2D','GLTEXCOORD1SV','GLTEXCOORD1S','GLTEXCOORD1IV', + 'GLTEXCOORD1I','GLTEXCOORD1FV','GLTEXCOORD1F','GLTEXCOORD1DV','GLTEXCOORD1D','GLSTENCILOP','GLSTENCILMASK','GLSTENCILFUNC', + 'GLSHADEMODEL','GLSELECTBUFFER','GLSCISSOR','GLSCALEF','GLSCALED','GLROTATEF','GLROTATED','GLRENDERMODE', + 'GLRECTSV','GLRECTS','GLRECTIV','GLRECTI','GLRECTFV','GLRECTF','GLRECTDV','GLRECTD', + 'GLREADPIXELS','GLREADBUFFER','GLRASTERPOS4SV','GLRASTERPOS4S','GLRASTERPOS4IV','GLRASTERPOS4I','GLRASTERPOS4FV','GLRASTERPOS4F', + 'GLRASTERPOS4DV','GLRASTERPOS4D','GLRASTERPOS3SV','GLRASTERPOS3S','GLRASTERPOS3IV','GLRASTERPOS3I','GLRASTERPOS3FV','GLRASTERPOS3F', + 'GLRASTERPOS3DV','GLRASTERPOS3D','GLRASTERPOS2SV','GLRASTERPOS2S','GLRASTERPOS2IV','GLRASTERPOS2I','GLRASTERPOS2FV','GLRASTERPOS2F', + 'GLRASTERPOS2DV','GLRASTERPOS2D','GLPUSHNAME','GLPUSHMATRIX','GLPUSHCLIENTATTRIB','GLPUSHATTRIB','GLPRIORITIZETEXTURES','GLPOPNAME', + 'GLPOPMATRIX','GLPOPCLIENTATTRIB','GLPOPATTRIB','GLPOLYGONSTIPPLE','GLPOLYGONOFFSET','GLPOLYGONMODE','GLPOINTSIZE','GLPIXELZOOM', + 'GLPIXELTRANSFERI','GLPIXELTRANSFERF','GLPIXELSTOREI','GLPIXELSTOREF','GLPIXELMAPUSV','GLPIXELMAPUIV','GLPIXELMAPFV','GLPASSTHROUGH', + 'GLORTHO','GLNORMALPOINTER','GLNORMAL3SV','GLNORMAL3S','GLNORMAL3IV','GLNORMAL3I','GLNORMAL3FV','GLNORMAL3F', + 'GLNORMAL3DV','GLNORMAL3D','GLNORMAL3BV','GLNORMAL3B','GLNEWLIST','GLMULTMATRIXF','GLMULTMATRIXD','GLMATRIXMODE', + 'GLMATERIALIV','GLMATERIALI','GLMATERIALFV','GLMATERIALF','GLMAPGRID2F','GLMAPGRID2D','GLMAPGRID1F','GLMAPGRID1D', + 'GLMAP2F','GLMAP2D','GLMAP1F','GLMAP1D','GLLOGICOP','GLLOADNAME','GLLOADMATRIXF','GLLOADMATRIXD', + 'GLLOADIDENTITY','GLLISTBASE','GLLINEWIDTH','GLLINESTIPPLE','GLLIGHTMODELIV','GLLIGHTMODELI','GLLIGHTMODELFV','GLLIGHTMODELF', + 'GLLIGHTIV','GLLIGHTI','GLLIGHTFV','GLLIGHTF','GLISTEXTURE','GLISLIST','GLISENABLED','GLINTERLEAVEDARRAYS', + 'GLINITNAMES','GLINDEXUBV','GLINDEXUB','GLINDEXSV','GLINDEXS','GLINDEXPOINTER','GLINDEXMASK','GLINDEXIV', + 'GLINDEXI','GLINDEXFV','GLINDEXF','GLINDEXDV','GLINDEXD','GLHINT','GLGETTEXPARAMETERIV','GLGETTEXPARAMETERFV', + 'GLGETTEXLEVELPARAMETERIV','GLGETTEXLEVELPARAMETERFV','GLGETTEXIMAGE','GLGETTEXGENIV','GLGETTEXGENFV','GLGETTEXGENDV','GLGETTEXENVIV','GLGETTEXENVFV', + 'GLGETSTRING','GLGETPOLYGONSTIPPLE','GLGETPOINTERV','GLGETPIXELMAPUSV','GLGETPIXELMAPUIV','GLGETPIXELMAPFV','GLGETMATERIALIV','GLGETMATERIALFV', + 'GLGETMAPIV','GLGETMAPFV','GLGETMAPDV','GLGETLIGHTIV','GLGETLIGHTFV','GLGETINTEGERV','GLGETFLOATV','GLGETERROR', + 'GLGETDOUBLEV','GLGETCLIPPLANE','GLGETBOOLEANV','GLGENTEXTURES','GLGENLISTS','GLFRUSTUM','GLFRONTFACE','GLFOGIV', + 'GLFOGI','GLFOGFV','GLFOGF','GLFLUSH','GLFINISH','GLFEEDBACKBUFFER','GLEVALPOINT2','GLEVALPOINT1', + 'GLEVALMESH2','GLEVALMESH1','GLEVALCOORD2FV','GLEVALCOORD2F','GLEVALCOORD2DV','GLEVALCOORD2D','GLEVALCOORD1FV','GLEVALCOORD1F', + 'GLEVALCOORD1DV','GLEVALCOORD1D','GLENDLIST','GLEND','GLENABLECLIENTSTATE','GLENABLE','GLEDGEFLAGV','GLEDGEFLAGPOINTER', + 'GLEDGEFLAG','GLDRAWPIXELS','GLDRAWELEMENTS','GLDRAWBUFFER','GLDRAWARRAYS','GLDISABLECLIENTSTATE','GLDISABLE','GLDEPTHRANGE', + 'GLDEPTHMASK','GLDEPTHFUNC','GLDELETETEXTURES','GLDELETELISTS','GLCULLFACE','GLCOPYTEXSUBIMAGE2D','GLCOPYTEXSUBIMAGE1D','GLCOPYTEXIMAGE2D', + 'GLCOPYTEXIMAGE1D','GLCOPYPIXELS','GLCOLORPOINTER','GLCOLORMATERIAL','GLCOLORMASK','GLCOLOR4USV','GLCOLOR4US','GLCOLOR4UIV', + 'GLCOLOR4UI','GLCOLOR4UBV','GLCOLOR4UB','GLCOLOR4SV','GLCOLOR4S','GLCOLOR4IV','GLCOLOR4I','GLCOLOR4FV', + 'GLCOLOR4F','GLCOLOR4DV','GLCOLOR4D','GLCOLOR4BV','GLCOLOR4B','GLCOLOR3USV','GLCOLOR3US','GLCOLOR3UIV', + 'GLCOLOR3UI','GLCOLOR3UBV','GLCOLOR3UB','GLCOLOR3SV','GLCOLOR3S','GLCOLOR3IV','GLCOLOR3I','GLCOLOR3FV', + 'GLCOLOR3F','GLCOLOR3DV','GLCOLOR3D','GLCOLOR3BV','GLCOLOR3B','GLCLIPPLANE','GLCLEARSTENCIL','GLCLEARINDEX', + 'GLCLEARDEPTH','GLCLEARCOLOR','GLCLEARACCUM','GLCLEAR','GLCALLLISTS','GLCALLLIST','GLBLENDFUNC','GLBITMAP', + 'GLBINDTEXTURE','GLBEGIN','GLARRAYELEMENT','GLARETEXTURESRESIDENT','GLALPHAFUNC','GLACCUM'), + 2 => array( + '$BEL','$BS','$CR','$CRLF','$DQ','$DT_DATE_SEPARATOR','$DT_LANGUAGE','$DT_TIME_SEPARATOR', + '$ESC','$FF','$LF','$NUL','$PC_SD_MY_PC','$SPC','$SQL_OPT_TRACE_FILE_DEFAULT','$SQL_SPEC_STRING', + '$TAB','$TRACKBAR_CLASS','$VT','%ACM_OPEN','%ACM_OPENW','%ACM_PLAY','%ACM_STOP','%ACN_START', + '%ACN_STOP','%ACS_AUTOPLAY','%ACS_CENTER','%ACS_TIMER','%ACS_TRANSPARENT','%APP_COUNTER_FUNLOOKUP','%APP_COUNTER_KEYLOOKUP','%APP_COUNTER_LOOKUP', + '%APP_COUNTER_TESTALPHA','%APP_COUNTER_UDTLOOKUP','%APP_COUNTER_VARLOOKUP','%APP_TIMER_EXECTOTAL','%APP_TIMER_INIT','%APP_TIMER_LOAD','%APP_TIMER_PREPROCESSOR','%AW_ACTIVATE', + '%AW_BLEND','%AW_CENTER','%AW_HIDE','%AW_HOR_NEGATIVE','%AW_HOR_POSITIVE','%AW_SLIDE','%AW_VER_NEGATIVE','%AW_VER_POSITIVE', + '%BCM_FIRST','%BLACK','%BLUE','%BM_GETCHECK','%BM_SETCHECK','%BST_CHECKED','%BST_UNCHECKED','%BS_AUTOCHECKBOX', + '%BS_BOTTOM','%BS_CENTER','%BS_DEFAULT','%BS_DEFPUSHBUTTON','%BS_FLAT','%BS_LEFT','%BS_LEFTTEXT','%BS_MULTILINE', + '%BS_NOTIFY','%BS_OWNERDRAW','%BS_PUSHLIKE','%BS_RIGHT','%BS_TOP','%BS_VCENTER','%BUNDLE_BUILDER_CANCELLED','%CBM_FIRST', + '%CBN_CLOSEUP','%CBN_DBLCLK','%CBN_DROPDOWN','%CBN_EDITCHANGE','%CBN_EDITUPDATE','%CBN_ERRSPACE','%CBN_KILLFOCUS','%CBN_SELCANCEL', + '%CBN_SELCHANGE','%CBN_SELENDCANCEL','%CBN_SELENDOK','%CBN_SETFOCUS','%CBS_AUTOHSCROLL','%CBS_DISABLENOSCROLL','%CBS_DROPDOWN','%CBS_DROPDOWNLIST', + '%CBS_HASSTRINGS','%CBS_LOWERCASE','%CBS_NOINTEGRALHEIGHT','%CBS_SIMPLE','%CBS_SORT','%CBS_UPPERCASE','%CB_SELECTSTRING','%CCM_FIRST', + '%CC_ANYCOLOR','%CC_ENABLEHOOK','%CC_ENABLETEMPLATE','%CC_ENABLETEMPLATEHANDLE','%CC_FULLOPEN','%CC_PREVENTFULLOPEN','%CC_RGBINIT','%CC_SHOWHELP', + '%CC_SOLIDCOLOR','%CFE_BOLD','%CFE_ITALIC','%CFE_LINK','%CFE_PROTECTED','%CFE_STRIKEOUT','%CFE_UNDERLINE','%CFM_ANIMATION', + '%CFM_BACKCOLOR','%CFM_BOLD','%CFM_CHARSET','%CFM_COLOR','%CFM_FACE','%CFM_ITALIC','%CFM_KERNING','%CFM_LCID', + '%CFM_LINK','%CFM_OFFSET','%CFM_PROTECTED','%CFM_REVAUTHOR','%CFM_SIZE','%CFM_SPACING','%CFM_STRIKEOUT','%CFM_STYLE', + '%CFM_UNDERLINE','%CFM_UNDERLINETYPE','%CFM_WEIGHT','%CGI_ACCEPT_FILE_UPLOAD','%CGI_AUTO_ADD_SPECIAL_CHARS_PREFIX','%CGI_AUTO_CREATE_VARS','%CGI_BUFFERIZE_OUTPUT','%CGI_DOUBLE_QUOTE', + '%CGI_FILE_UPLOAD_BASEPATH','%CGI_FORCE_SESSION_VALIDATION','%CGI_MAX_BYTE_FROM_STD_IN','%CGI_REQUEST_METHOD_GET','%CGI_REQUEST_METHOD_POST','%CGI_SESSION_FILE_BASEPATH','%CGI_SINGLE_QUOTE','%CGI_SPECIAL_CHARS_PREFIX', + '%CGI_TEMPORARY_UPLOAD_PATH','%CGI_UPLOAD_CAN_OVERWRITE','%CGI_WRITE_LOG_FILE','%CGI_WRITE_VARS_INTO_LOG_FILE','%CONOLE_ATTACH_PARENT_PROCESS','%CONSOLE_BACKGROUND_BLUE','%CONSOLE_BACKGROUND_GREEN','%CONSOLE_BACKGROUND_INTENSITY', + '%CONSOLE_BACKGROUND_RED','%CONSOLE_BOX_FLAG_3DOFF','%CONSOLE_BOX_FLAG_3DON','%CONSOLE_BOX_FLAG_SHADOW','%CONSOLE_COMMON_LVB_GRID_HORIZONTAL','%CONSOLE_COMMON_LVB_GRID_LVERTICAL','%CONSOLE_COMMON_LVB_GRID_RVERTICAL','%CONSOLE_COMMON_LVB_LEADING_BYTE', + '%CONSOLE_COMMON_LVB_REVERSE_VIDEO','%CONSOLE_COMMON_LVB_TRAILING_BYTE','%CONSOLE_COMMON_LVB_UNDERSCORE','%CONSOLE_CTRL_BREAK_EVENT','%CONSOLE_CTRL_C_EVENT','%CONSOLE_DOUBLE_CLICK','%CONSOLE_ENABLE_AUTO_POSITION','%CONSOLE_ENABLE_ECHO_INPUT', + '%CONSOLE_ENABLE_EXTENDED_FLAGS','%CONSOLE_ENABLE_INSERT_MODE','%CONSOLE_ENABLE_LINE_INPUT','%CONSOLE_ENABLE_MOUSE_INPUT','%CONSOLE_ENABLE_PROCESSED_INPUT','%CONSOLE_ENABLE_PROCESSED_OUTPUT','%CONSOLE_ENABLE_QUICK_EDIT_MODE','%CONSOLE_ENABLE_WINDOW_INPUT', + '%CONSOLE_ENABLE_WRAP_AT_EOL_OUTPUT','%CONSOLE_FOREGROUND_BLUE','%CONSOLE_FOREGROUND_GREEN','%CONSOLE_FOREGROUND_INTENSITY','%CONSOLE_FOREGROUND_RED','%CONSOLE_LBUTTON','%CONSOLE_LINE_HORIZONTAL','%CONSOLE_LINE_VERTICAL', + '%CONSOLE_MBUTTON','%CONSOLE_MOUSE_MOVED','%CONSOLE_MOUSE_WHEELED','%CONSOLE_RBUTTON','%CONSOLE_SCROLLBUF_DOWN','%CONSOLE_SCROLLBUF_UP','%CONSOLE_SCROLLWND_ABSOLUTE','%CONSOLE_SCROLLWND_RELATIVE', + '%CONSOLE_STD_ERROR_HANDLE','%CONSOLE_STD_INPUT_HANDLE','%CONSOLE_STD_OUTPUT_HANDLE','%CONSOLE_SW_FORCEMINIMIZE','%CONSOLE_SW_HIDE','%CONSOLE_SW_MAXIMIZE','%CONSOLE_SW_MINIMIZE','%CONSOLE_SW_RESTORE', + '%CONSOLE_SW_SHOW','%CONSOLE_SW_SHOWDEFAULT','%CONSOLE_SW_SHOWMAXIMIZED','%CONSOLE_SW_SHOWMINIMIZED','%CONSOLE_SW_SHOWMINNOACTIVE','%CONSOLE_SW_SHOWNA','%CONSOLE_SW_SHOWNOACTIVATE','%CONSOLE_SW_SHOWNORMAL', + '%CONSOLE_UNAVAILABLE','%CRYPTO_CALG_DES','%CRYPTO_CALG_RC2','%CRYPTO_CALG_RC4','%CRYPTO_PROV_DH_SCHANNEL','%CRYPTO_PROV_DSS','%CRYPTO_PROV_DSS_DH','%CRYPTO_PROV_FORTEZZA', + '%CRYPTO_PROV_MS_EXCHANGE','%CRYPTO_PROV_RSA_FULL','%CRYPTO_PROV_RSA_SCHANNEL','%CRYPTO_PROV_RSA_SIG','%CRYPTO_PROV_SSL','%CSIDL_ADMINTOOLS','%CSIDL_ALTSTARTUP','%CSIDL_APPDATA', + '%CSIDL_BITBUCKET','%CSIDL_CDBURN_AREA','%CSIDL_COMMON_ADMINTOOLS','%CSIDL_COMMON_ALTSTARTUP','%CSIDL_COMMON_APPDATA','%CSIDL_COMMON_DESKTOPDIRECTORY','%CSIDL_COMMON_DOCUMENTS','%CSIDL_COMMON_FAVORITES', + '%CSIDL_COMMON_MUSIC','%CSIDL_COMMON_PICTURES','%CSIDL_COMMON_PROGRAMS','%CSIDL_COMMON_STARTMENU','%CSIDL_COMMON_STARTUP','%CSIDL_COMMON_TEMPLATES','%CSIDL_COMMON_VIDEO','%CSIDL_CONTROLS', + '%CSIDL_COOKIES','%CSIDL_DESKTOP','%CSIDL_DESKTOPDIRECTORY','%CSIDL_DRIVES','%CSIDL_FAVORITES','%CSIDL_FLAG_CREATE','%CSIDL_FONTS','%CSIDL_HISTORY', + '%CSIDL_INTERNET','%CSIDL_INTERNET_CACHE','%CSIDL_LOCAL_APPDATA','%CSIDL_MYDOCUMENTS','%CSIDL_MYMUSIC','%CSIDL_MYPICTURES','%CSIDL_MYVIDEO','%CSIDL_NETHOOD', + '%CSIDL_NETWORK','%CSIDL_PERSONAL','%CSIDL_PRINTERS','%CSIDL_PRINTHOOD','%CSIDL_PROFILE','%CSIDL_PROGRAMS','%CSIDL_PROGRAM_FILES','%CSIDL_PROGRAM_FILES_COMMON', + '%CSIDL_RECENT','%CSIDL_SENDTO','%CSIDL_STARTMENU','%CSIDL_STARTUP','%CSIDL_SYSTEM','%CSIDL_TEMPLATES','%CSIDL_WINDOWS','%CW_USEDEFAULT', + '%CYAN','%DATE_TIME_FILE_CREATION','%DATE_TIME_LAST_FILE_ACCESS','%DATE_TIME_LAST_FILE_WRITE','%DICTIONARY_MEMINFO_DATA','%DICTIONARY_MEMINFO_KEYS','%DICTIONARY_MEMINFO_TOTAL','%DICTIONARY_SORTDESCENDING', + '%DICTIONARY_SORTKEYS','%DSCAPS_CERTIFIED','%DSCAPS_CONTINUOUSRATE','%DSCAPS_EMULDRIVER','%DSCAPS_SECONDARY16BIT','%DSCAPS_SECONDARY8BIT','%DSCAPS_SECONDARYMONO','%DSCAPS_SECONDARYSTEREO', + '%DSCCAPS_CERTIFIED','%DSCCAPS_EMULDRIVER','%DS_3DLOOK','%DS_ABSALIGN','%DS_CENTER','%DS_CENTERMOUSE','%DS_CONTEXTHELP','%DS_CONTROL', + '%DS_MODALFRAME','%DS_NOFAILCREATE','%DS_SETFONT','%DS_SETFOREGROUND','%DS_SYSMODAL','%DTM_FIRST','%DTM_GETMCCOLOR','%DTM_GETMCFONT', + '%DTM_GETMONTHCAL','%DTM_GETRANGE','%DTM_GETSYSTEMTIME','%DTM_SETFORMAT','%DTM_SETFORMATW','%DTM_SETMCCOLOR','%DTM_SETMCFONT','%DTM_SETRANGE', + '%DTM_SETSYSTEMTIME','%DTN_CLOSEUP','%DTN_DATETIMECHANGE','%DTN_DROPDOWN','%DTN_FORMAT','%DTN_FORMATQUERY','%DTN_FORMATQUERYW','%DTN_FORMATW', + '%DTN_USERSTRING','%DTN_USERSTRINGW','%DTN_WMKEYDOWN','%DTN_WMKEYDOWNW','%DTS_APPCANPARSE','%DTS_LONGDATEFORMAT','%DTS_RIGHTALIGN','%DTS_SHORTDATECENTURYFORMAT', + '%DTS_SHORTDATEFORMAT','%DTS_SHOWNONE','%DTS_TIMEFORMAT','%DTS_UPDOWN','%DT_DATE_CENTURY','%DT_DATE_OK','%DT_DAY_IN_YEAR','%DT_DIFF_IN_DAYS', + '%DT_DIFF_IN_HOURS','%DT_DIFF_IN_MINUTES','%DT_DIFF_IN_SECONDS','%DT_HOURS_IN_DAY','%DT_MINUTES_IN_HOUR','%DT_SECONDS_IN_DAY','%DT_SECONDS_IN_HOUR','%DT_SECONDS_IN_MINUTE', + '%DT_SECONDS_IN_YEAR','%DT_USE_LONG_FORM','%DT_USE_SHORT_FORM','%DT_WRONG_DATE','%DT_WRONG_DAY','%DT_WRONG_MONTH','%ECM_FIRST','%ECOOP_AND', + '%ECOOP_OR','%ECOOP_SET','%ECOOP_XOR','%ECO_AUTOHSCROLL','%ECO_AUTOVSCROLL','%ECO_AUTOWORDSELECTION','%ECO_NOHIDESEL','%ECO_READONLY', + '%ECO_SELECTIONBAR','%ECO_WANTRETURN','%EM_AUTOURLDETECT','%EM_CANPASTE','%EM_CANREDO','%EM_CANUNDO','%EM_CHARFROMPOS','%EM_DISPLAYBAND', + '%EM_EMPTYUNDOBUFFER','%EM_EXGETSEL','%EM_EXLIMITTEXT','%EM_EXLINEFROMCHAR','%EM_EXSETSEL','%EM_FINDTEXT','%EM_FINDTEXTEX','%EM_FINDWORDBREAK', + '%EM_FMTLINES','%EM_FORMATRANGE','%EM_GETAUTOURLDETECT','%EM_GETCHARFORMAT','%EM_GETEDITSTYLE','%EM_GETEVENTMASK','%EM_GETFIRSTVISIBLELINE','%EM_GETHANDLE', + '%EM_GETIMESTATUS','%EM_GETLIMITTEXT','%EM_GETLINE','%EM_GETLINECOUNT','%EM_GETMARGINS','%EM_GETMODIFY','%EM_GETOLEINTERFACE','%EM_GETOPTIONS', + '%EM_GETPARAFORMAT','%EM_GETPASSWORDCHAR','%EM_GETRECT','%EM_GETREDONAME','%EM_GETSCROLLPOS','%EM_GETSEL','%EM_GETSELTEXT','%EM_GETTEXTMODE', + '%EM_GETTEXTRANGE','%EM_GETTHUMB','%EM_GETUNDONAME','%EM_GETWORDBREAKPROC','%EM_GETWORDBREAKPROCEX','%EM_HIDESELECTION','%EM_LIMITTEXT','%EM_LINEFROMCHAR', + '%EM_LINEINDEX','%EM_LINELENGTH','%EM_LINESCROLL','%EM_PASTESPECIAL','%EM_POSFROMCHAR','%EM_REDO','%EM_REPLACESEL','%EM_REQUESTRESIZE', + '%EM_SCROLL','%EM_SCROLLCARET','%EM_SELECTIONTYPE','%EM_SETBKGNDCOLOR','%EM_SETCHARFORMAT','%EM_SETEDITSTYLE','%EM_SETEVENTMASK','%EM_SETHANDLE', + '%EM_SETIMESTATUS','%EM_SETLIMITTEXT','%EM_SETMARGINS','%EM_SETMODIFY','%EM_SETOLECALLBACK','%EM_SETOPTIONS','%EM_SETPARAFORMAT','%EM_SETPASSWORDCHAR', + '%EM_SETREADONLY','%EM_SETRECT','%EM_SETRECTNP','%EM_SETSCROLLPOS','%EM_SETSEL','%EM_SETTABSTOPS','%EM_SETTARGETDEVICE','%EM_SETTEXTMODE', + '%EM_SETUNDOLIMIT','%EM_SETWORDBREAKPROC','%EM_SETWORDBREAKPROCEX','%EM_SETWORDWRAPMODE','%EM_SETZOOM','%EM_STOPGROUPTYPING','%EM_STREAMIN','%EM_STREAMOUT', + '%EM_UNDO','%ENM_CHANGE','%ENM_CORRECTTEXT','%ENM_DRAGDROPDONE','%ENM_DROPFILES','%ENM_KEYEVENTS','%ENM_MOUSEEVENTS','%ENM_NONE', + '%ENM_PARAGRAPHEXPANDED','%ENM_PROTECTED','%ENM_REQUESTRESIZE','%ENM_SCROLL','%ENM_SCROLLEVENTS','%ENM_SELCHANGE','%ENM_UPDATE','%EN_CHANGE', + '%EN_MSGFILTER','%EN_SELCHANGE','%EN_UPDATE','%ES_AUTOHSCROLL','%ES_AUTOVSCROLL','%ES_CENTER','%ES_DISABLENOSCROLL','%ES_EX_NOCALLOLEINIT', + '%ES_LEFT','%ES_LOWERCASE','%ES_MULTILINE','%ES_NOHIDESEL','%ES_NOOLEDRAGDROP','%ES_NUMBER','%ES_OEMCONVERT','%ES_PASSWORD', + '%ES_READONLY','%ES_RIGHT','%ES_SAVESEL','%ES_SELECTIONBAR','%ES_SUNKEN','%ES_UPPERCASE','%ES_WANTRETURN','%EVAL_EXEC_STRING', + '%FALSE','%FILE_ADDPATH','%FILE_ARCHIVE','%FILE_BUILDVERSION','%FILE_HIDDEN','%FILE_MAJORVERSION','%FILE_MINORVERSION','%FILE_NORMAL', + '%FILE_READONLY','%FILE_REVISIONVERSION','%FILE_SUBDIR','%FILE_SYSTEM','%FILE_VLABEL','%FTP_GET_CONNECT_STATUS','%FTP_GET_FILE_BYTES_RCVD','%FTP_GET_FILE_BYTES_SENT', + '%FTP_GET_LAST_RESPONSE','%FTP_GET_LOCAL_IP','%FTP_GET_SERVER_IP','%FTP_GET_TOTAL_BYTES_RCVD','%FTP_GET_TOTAL_BYTES_SENT','%FTP_LIST_FULLLIST','%FTP_LIST_FULLLISTDIR','%FTP_LIST_FULLLISTFILE', + '%FTP_SET_ASYNC','%FTP_SET_CONNECT_WAIT','%FTP_SET_MAX_LISTEN_WAIT','%FTP_SET_MAX_RESPONSE_WAIT','%FTP_SET_PASSIVE','%FTP_SET_SYNC','%FW_BLACK','%FW_BOLD', + '%FW_DEMIBOLD','%FW_DONTCARE','%FW_EXTRABOLD','%FW_EXTRALIGHT','%FW_HEAVY','%FW_LIGHT','%FW_MEDIUM','%FW_NORMAL', + '%FW_REGULAR','%FW_SEMIBOLD','%FW_THIN','%FW_ULTRABOLD','%FW_ULTRALIGHT','%GDTR_MAX','%GDTR_MIN','%GLU_AUTO_LOAD_MATRIX', + '%GLU_BEGIN','%GLU_CCW','%GLU_CULLING','%GLU_CW','%GLU_DISPLAY_MODE','%GLU_DOMAIN_DISTANCE','%GLU_EDGE_FLAG','%GLU_END', + '%GLU_ERROR','%GLU_EXTENSIONS','%GLU_EXTERIOR','%GLU_FALSE','%GLU_FILL','%GLU_FLAT','%GLU_INCOMPATIBLE_GL_VERSION','%GLU_INSIDE', + '%GLU_INTERIOR','%GLU_INVALID_ENUM','%GLU_INVALID_VALUE','%GLU_LINE','%GLU_MAP1_TRIM_2','%GLU_MAP1_TRIM_3','%GLU_NONE','%GLU_NURBS_ERROR1', + '%GLU_NURBS_ERROR10','%GLU_NURBS_ERROR11','%GLU_NURBS_ERROR12','%GLU_NURBS_ERROR13','%GLU_NURBS_ERROR14','%GLU_NURBS_ERROR15','%GLU_NURBS_ERROR16','%GLU_NURBS_ERROR17', + '%GLU_NURBS_ERROR18','%GLU_NURBS_ERROR19','%GLU_NURBS_ERROR2','%GLU_NURBS_ERROR20','%GLU_NURBS_ERROR21','%GLU_NURBS_ERROR22','%GLU_NURBS_ERROR23','%GLU_NURBS_ERROR24', + '%GLU_NURBS_ERROR25','%GLU_NURBS_ERROR26','%GLU_NURBS_ERROR27','%GLU_NURBS_ERROR28','%GLU_NURBS_ERROR29','%GLU_NURBS_ERROR3','%GLU_NURBS_ERROR30','%GLU_NURBS_ERROR31', + '%GLU_NURBS_ERROR32','%GLU_NURBS_ERROR33','%GLU_NURBS_ERROR34','%GLU_NURBS_ERROR35','%GLU_NURBS_ERROR36','%GLU_NURBS_ERROR37','%GLU_NURBS_ERROR4','%GLU_NURBS_ERROR5', + '%GLU_NURBS_ERROR6','%GLU_NURBS_ERROR7','%GLU_NURBS_ERROR8','%GLU_NURBS_ERROR9','%GLU_OUTLINE_PATCH','%GLU_OUTLINE_POLYGON','%GLU_OUTSIDE','%GLU_OUT_OF_MEMORY', + '%GLU_PARAMETRIC_ERROR','%GLU_PARAMETRIC_TOLERANCE','%GLU_PATH_LENGTH','%GLU_POINT','%GLU_SAMPLING_METHOD','%GLU_SAMPLING_TOLERANCE','%GLU_SILHOUETTE','%GLU_SMOOTH', + '%GLU_TESS_BEGIN','%GLU_TESS_BEGIN_DATA','%GLU_TESS_BOUNDARY_ONLY','%GLU_TESS_COMBINE','%GLU_TESS_COMBINE_DATA','%GLU_TESS_COORD_TOO_LARGE','%GLU_TESS_EDGE_FLAG','%GLU_TESS_EDGE_FLAG_DATA', + '%GLU_TESS_END','%GLU_TESS_END_DATA','%GLU_TESS_ERROR','%GLU_TESS_ERROR1','%GLU_TESS_ERROR2','%GLU_TESS_ERROR3','%GLU_TESS_ERROR4','%GLU_TESS_ERROR5', + '%GLU_TESS_ERROR6','%GLU_TESS_ERROR7','%GLU_TESS_ERROR8','%GLU_TESS_ERROR_DATA','%GLU_TESS_MISSING_BEGIN_CONTOUR','%GLU_TESS_MISSING_BEGIN_POLYGON','%GLU_TESS_MISSING_END_CONTOUR','%GLU_TESS_MISSING_END_POLYGON', + '%GLU_TESS_NEED_COMBINE_CALLBACK','%GLU_TESS_TOLERANCE','%GLU_TESS_VERTEX','%GLU_TESS_VERTEX_DATA','%GLU_TESS_WINDING_ABS_GEQ_TWO','%GLU_TESS_WINDING_NEGATIVE','%GLU_TESS_WINDING_NONZERO','%GLU_TESS_WINDING_ODD', + '%GLU_TESS_WINDING_POSITIVE','%GLU_TESS_WINDING_RULE','%GLU_TRUE','%GLU_UNKNOWN','%GLU_U_STEP','%GLU_VERSION','%GLU_VERSION_1_1','%GLU_VERSION_1_2', + '%GLU_VERTEX','%GLU_V_STEP','%GL_2D','%GL_2_BYTES','%GL_3D','%GL_3D_COLOR','%GL_3D_COLOR_TEXTURE','%GL_3_BYTES', + '%GL_4D_COLOR_TEXTURE','%GL_4_BYTES','%GL_ABGR_EXT','%GL_ACCUM','%GL_ACCUM_ALPHA_BITS','%GL_ACCUM_BLUE_BITS','%GL_ACCUM_BUFFER_BIT','%GL_ACCUM_CLEAR_VALUE', + '%GL_ACCUM_GREEN_BITS','%GL_ACCUM_RED_BITS','%GL_ADD','%GL_ALL_ATTRIB_BITS','%GL_ALPHA','%GL_ALPHA12','%GL_ALPHA16','%GL_ALPHA4', + '%GL_ALPHA8','%GL_ALPHA_BIAS','%GL_ALPHA_BITS','%GL_ALPHA_SCALE','%GL_ALPHA_TEST','%GL_ALPHA_TEST_FUNC','%GL_ALPHA_TEST_REF','%GL_ALWAYS', + '%GL_AMBIENT','%GL_AMBIENT_AND_DIFFUSE','%GL_AND','%GL_AND_INVERTED','%GL_AND_REVERSE','%GL_ARRAY_ELEMENT_LOCK_COUNT_EXT','%GL_ARRAY_ELEMENT_LOCK_FIRST_EXT','%GL_ATTRIB_STACK_DEPTH', + '%GL_AUTO_NORMAL','%GL_AUX0','%GL_AUX1','%GL_AUX2','%GL_AUX3','%GL_AUX_BUFFERS','%GL_BACK','%GL_BACK_LEFT', + '%GL_BACK_RIGHT','%GL_BGRA_EXT','%GL_BGR_EXT','%GL_BITMAP','%GL_BITMAP_TOKEN','%GL_BLEND','%GL_BLEND_COLOR_EXT','%GL_BLEND_DST', + '%GL_BLEND_EQUATION_EXT','%GL_BLEND_SRC','%GL_BLUE','%GL_BLUE_BIAS','%GL_BLUE_BITS','%GL_BLUE_SCALE','%GL_BYTE','%GL_C3F_V3F', + '%GL_C4F_N3F_V3F','%GL_C4UB_V2F','%GL_C4UB_V3F','%GL_CCW','%GL_CLAMP','%GL_CLEAR','%GL_CLIENT_ALL_ATTRIB_BITS','%GL_CLIENT_ATTRIB_STACK_DEPTH', + '%GL_CLIENT_PIXEL_STORE_BIT','%GL_CLIENT_VERTEX_ARRAY_BIT','%GL_CLIP_PLANE0','%GL_CLIP_PLANE1','%GL_CLIP_PLANE2','%GL_CLIP_PLANE3','%GL_CLIP_PLANE4','%GL_CLIP_PLANE5', + '%GL_CLIP_VOLUME_CLIPPING_HINT_EXT','%GL_COEFF','%GL_COLOR','%GL_COLOR_ARRAY','%GL_COLOR_ARRAY_COUNT_EXT','%GL_COLOR_ARRAY_EXT','%GL_COLOR_ARRAY_POINTER','%GL_COLOR_ARRAY_POINTER_EXT', + '%GL_COLOR_ARRAY_SIZE','%GL_COLOR_ARRAY_SIZE_EXT','%GL_COLOR_ARRAY_STRIDE','%GL_COLOR_ARRAY_STRIDE_EXT','%GL_COLOR_ARRAY_TYPE','%GL_COLOR_ARRAY_TYPE_EXT','%GL_COLOR_BUFFER_BIT','%GL_COLOR_CLEAR_VALUE', + '%GL_COLOR_INDEX','%GL_COLOR_INDEX12_EXT','%GL_COLOR_INDEX16_EXT','%GL_COLOR_INDEX1_EXT','%GL_COLOR_INDEX2_EXT','%GL_COLOR_INDEX4_EXT','%GL_COLOR_INDEX8_EXT','%GL_COLOR_INDEXES', + '%GL_COLOR_LOGIC_OP','%GL_COLOR_MATERIAL','%GL_COLOR_MATERIAL_FACE','%GL_COLOR_MATERIAL_PARAMETER','%GL_COLOR_SUM_EXT','%GL_COLOR_TABLE_ALPHA_SIZE_EXT','%GL_COLOR_TABLE_BIAS_EXT','%GL_COLOR_TABLE_BLUE_SIZE_EXT', + '%GL_COLOR_TABLE_EXT','%GL_COLOR_TABLE_FORMAT_EXT','%GL_COLOR_TABLE_GREEN_SIZE_EXT','%GL_COLOR_TABLE_INTENSITY_SIZE_EXT','%GL_COLOR_TABLE_LUMINANCE_SIZE_EXT','%GL_COLOR_TABLE_RED_SIZE_EXT','%GL_COLOR_TABLE_SCALE_EXT','%GL_COLOR_TABLE_WIDTH_EXT', + '%GL_COLOR_WRITEMASK','%GL_COMPILE','%GL_COMPILE_AND_EXECUTE','%GL_CONSTANT_ALPHA_EXT','%GL_CONSTANT_ATTENUATION','%GL_CONSTANT_COLOR_EXT','%GL_CONVOLUTION_1D_EXT','%GL_CONVOLUTION_2D_EXT', + '%GL_CONVOLUTION_BORDER_MODE_EXT','%GL_CONVOLUTION_FILTER_BIAS_EXT','%GL_CONVOLUTION_FILTER_SCALE_EXT','%GL_CONVOLUTION_FORMAT_EXT','%GL_CONVOLUTION_HEIGHT_EXT','%GL_CONVOLUTION_WIDTH_EXT','%GL_COPY','%GL_COPY_INVERTED', + '%GL_COPY_PIXEL_TOKEN','%GL_CULL_FACE','%GL_CULL_FACE_MODE','%GL_CULL_VERTEX_EXT','%GL_CULL_VERTEX_EYE_POSITION_EXT','%GL_CULL_VERTEX_OBJECT_POSITION_EXT','%GL_CURRENT_BIT','%GL_CURRENT_COLOR', + '%GL_CURRENT_INDEX','%GL_CURRENT_NORMAL','%GL_CURRENT_RASTER_COLOR','%GL_CURRENT_RASTER_DISTANCE','%GL_CURRENT_RASTER_INDEX','%GL_CURRENT_RASTER_POSITION','%GL_CURRENT_RASTER_POSITION_VALID','%GL_CURRENT_RASTER_TEXTURE_COORDS', + '%GL_CURRENT_SECONDARY_COLOR_EXT','%GL_CURRENT_TEXTURE_COORDS','%GL_CW','%GL_DECAL','%GL_DECR','%GL_DEPTH','%GL_DEPTH_BIAS','%GL_DEPTH_BITS', + '%GL_DEPTH_BUFFER_BIT','%GL_DEPTH_CLEAR_VALUE','%GL_DEPTH_COMPONENT','%GL_DEPTH_FUNC','%GL_DEPTH_RANGE','%GL_DEPTH_SCALE','%GL_DEPTH_TEST','%GL_DEPTH_WRITEMASK', + '%GL_DIFFUSE','%GL_DITHER','%GL_DOMAIN','%GL_DONT_CARE','%GL_DOUBLE','%GL_DOUBLEBUFFER','%GL_DOUBLE_EXT','%GL_DRAW_BUFFER', + '%GL_DRAW_PIXEL_TOKEN','%GL_DST_ALPHA','%GL_DST_COLOR','%GL_EDGE_FLAG','%GL_EDGE_FLAG_ARRAY','%GL_EDGE_FLAG_ARRAY_COUNT_EXT','%GL_EDGE_FLAG_ARRAY_EXT','%GL_EDGE_FLAG_ARRAY_POINTER', + '%GL_EDGE_FLAG_ARRAY_POINTER_EXT','%GL_EDGE_FLAG_ARRAY_STRIDE','%GL_EDGE_FLAG_ARRAY_STRIDE_EXT','%GL_EMISSION','%GL_ENABLE_BIT','%GL_EQUAL','%GL_EQUIV','%GL_EVAL_BIT', + '%GL_EXP','%GL_EXP2','%GL_EXTENSIONS','%GL_EXT_ABGR','%GL_EXT_BGRA','%GL_EXT_BLEND_COLOR','%GL_EXT_BLEND_MINMAX','%GL_EXT_BLEND_SUBTRACT', + '%GL_EXT_CLIP_VOLUME_HINT','%GL_EXT_COLOR_TABLE','%GL_EXT_COMPILED_VERTEX_ARRAY','%GL_EXT_CONVOLUTION','%GL_EXT_CULL_VERTEX','%GL_EXT_HISTOGRAM','%GL_EXT_PACKED_PIXELS','%GL_EXT_PALETTED_TEXTURE', + '%GL_EXT_POLYGON_OFFSET','%GL_EXT_SECONDARY_COLOR','%GL_EXT_SEPARATE_SPECULAR_COLOR','%GL_EXT_VERTEX_ARRAY','%GL_EYE_LINEAR','%GL_EYE_PLANE','%GL_FALSE','%GL_FASTEST', + '%GL_FEEDBACK','%GL_FEEDBACK_BUFFER_POINTER','%GL_FEEDBACK_BUFFER_SIZE','%GL_FEEDBACK_BUFFER_TYPE','%GL_FILL','%GL_FLAT','%GL_FLOAT','%GL_FOG', + '%GL_FOG_BIT','%GL_FOG_COLOR','%GL_FOG_DENSITY','%GL_FOG_END','%GL_FOG_HINT','%GL_FOG_INDEX','%GL_FOG_MODE','%GL_FOG_START', + '%GL_FRONT','%GL_FRONT_AND_BACK','%GL_FRONT_FACE','%GL_FRONT_LEFT','%GL_FRONT_RIGHT','%GL_FUNC_ADD_EXT','%GL_FUNC_REVERSE_SUBTRACT_EXT','%GL_FUNC_SUBTRACT_EXT', + '%GL_GEQUAL','%GL_GREATER','%GL_GREEN','%GL_GREEN_BIAS','%GL_GREEN_BITS','%GL_GREEN_SCALE','%GL_HINT_BIT','%GL_HISTOGRAM_ALPHA_SIZE_EXT', + '%GL_HISTOGRAM_BLUE_SIZE_EXT','%GL_HISTOGRAM_EXT','%GL_HISTOGRAM_FORMAT_EXT','%GL_HISTOGRAM_GREEN_SIZE_EXT','%GL_HISTOGRAM_LUMINANCE_SIZE_EXT','%GL_HISTOGRAM_RED_SIZE_EXT','%GL_HISTOGRAM_SINK_EXT','%GL_HISTOGRAM_WIDTH_EXT', + '%GL_INCR','%GL_INDEX_ARRAY','%GL_INDEX_ARRAY_COUNT_EXT','%GL_INDEX_ARRAY_EXT','%GL_INDEX_ARRAY_POINTER','%GL_INDEX_ARRAY_POINTER_EXT','%GL_INDEX_ARRAY_STRIDE','%GL_INDEX_ARRAY_STRIDE_EXT', + '%GL_INDEX_ARRAY_TYPE','%GL_INDEX_ARRAY_TYPE_EXT','%GL_INDEX_BITS','%GL_INDEX_CLEAR_VALUE','%GL_INDEX_LOGIC_OP','%GL_INDEX_MODE','%GL_INDEX_OFFSET','%GL_INDEX_SHIFT', + '%GL_INDEX_WRITEMASK','%GL_INT','%GL_INTENSITY','%GL_INTENSITY12','%GL_INTENSITY16','%GL_INTENSITY4','%GL_INTENSITY8','%GL_INVALID_ENUM', + '%GL_INVALID_OPERATION','%GL_INVALID_VALUE','%GL_INVERT','%GL_KEEP','%GL_LEFT','%GL_LEQUAL','%GL_LESS','%GL_LIGHT0', + '%GL_LIGHT1','%GL_LIGHT2','%GL_LIGHT3','%GL_LIGHT4','%GL_LIGHT5','%GL_LIGHT6','%GL_LIGHT7','%GL_LIGHTING', + '%GL_LIGHTING_BIT','%GL_LIGHT_MODEL_AMBIENT','%GL_LIGHT_MODEL_COLOR_CONTROL_EXT','%GL_LIGHT_MODEL_LOCAL_VIEWER','%GL_LIGHT_MODEL_TWO_SIDE','%GL_LINE','%GL_LINEAR','%GL_LINEAR_ATTENUATION', + '%GL_LINEAR_MIPMAP_LINEAR','%GL_LINEAR_MIPMAP_NEAREST','%GL_LINES','%GL_LINE_BIT','%GL_LINE_LOOP','%GL_LINE_RESET_TOKEN','%GL_LINE_SMOOTH','%GL_LINE_SMOOTH_HINT', + '%GL_LINE_STIPPLE','%GL_LINE_STIPPLE_PATTERN','%GL_LINE_STIPPLE_REPEAT','%GL_LINE_STRIP','%GL_LINE_TOKEN','%GL_LINE_WIDTH','%GL_LINE_WIDTH_GRANULARITY','%GL_LINE_WIDTH_RANGE', + '%GL_LIST_BASE','%GL_LIST_BIT','%GL_LIST_INDEX','%GL_LIST_MODE','%GL_LOAD','%GL_LOGIC_OP','%GL_LOGIC_OP_MODE','%GL_LUMINANCE', + '%GL_LUMINANCE12','%GL_LUMINANCE12_ALPHA12','%GL_LUMINANCE12_ALPHA4','%GL_LUMINANCE16','%GL_LUMINANCE16_ALPHA16','%GL_LUMINANCE4','%GL_LUMINANCE4_ALPHA4','%GL_LUMINANCE6_ALPHA2', + '%GL_LUMINANCE8','%GL_LUMINANCE8_ALPHA8','%GL_LUMINANCE_ALPHA','%GL_MAP1_COLOR_4','%GL_MAP1_GRID_DOMAIN','%GL_MAP1_GRID_SEGMENTS','%GL_MAP1_INDEX','%GL_MAP1_NORMAL', + '%GL_MAP1_TEXTURE_COORD_1','%GL_MAP1_TEXTURE_COORD_2','%GL_MAP1_TEXTURE_COORD_3','%GL_MAP1_TEXTURE_COORD_4','%GL_MAP1_VERTEX_3','%GL_MAP1_VERTEX_4','%GL_MAP2_COLOR_4','%GL_MAP2_GRID_DOMAIN', + '%GL_MAP2_GRID_SEGMENTS','%GL_MAP2_INDEX','%GL_MAP2_NORMAL','%GL_MAP2_TEXTURE_COORD_1','%GL_MAP2_TEXTURE_COORD_2','%GL_MAP2_TEXTURE_COORD_3','%GL_MAP2_TEXTURE_COORD_4','%GL_MAP2_VERTEX_3', + '%GL_MAP2_VERTEX_4','%GL_MAP_COLOR','%GL_MAP_STENCIL','%GL_MATRIX_MODE','%GL_MAX_ATTRIB_STACK_DEPTH','%GL_MAX_CLIENT_ATTRIB_STACK_DEPTH','%GL_MAX_CLIP_PLANES','%GL_MAX_CONVOLUTION_HEIGHT_EXT', + '%GL_MAX_CONVOLUTION_WIDTH_EXT','%GL_MAX_EVAL_ORDER','%GL_MAX_EXT','%GL_MAX_LIGHTS','%GL_MAX_LIST_NESTING','%GL_MAX_MODELVIEW_STACK_DEPTH','%GL_MAX_NAME_STACK_DEPTH','%GL_MAX_PIXEL_MAP_TABLE', + '%GL_MAX_PROJECTION_STACK_DEPTH','%GL_MAX_TEXTURE_SIZE','%GL_MAX_TEXTURE_STACK_DEPTH','%GL_MAX_VIEWPORT_DIMS','%GL_MINMAX_EXT','%GL_MINMAX_FORMAT_EXT','%GL_MINMAX_SINK_EXT','%GL_MIN_EXT', + '%GL_MODELVIEW','%GL_MODELVIEW_MATRIX','%GL_MODELVIEW_STACK_DEPTH','%GL_MODULATE','%GL_MULT','%GL_N3F_V3F','%GL_NAME_STACK_DEPTH','%GL_NAND', + '%GL_NEAREST','%GL_NEAREST_MIPMAP_LINEAR','%GL_NEAREST_MIPMAP_NEAREST','%GL_NEVER','%GL_NICEST','%GL_NONE','%GL_NOOP','%GL_NOR', + '%GL_NORMALIZE','%GL_NORMAL_ARRAY','%GL_NORMAL_ARRAY_COUNT_EXT','%GL_NORMAL_ARRAY_EXT','%GL_NORMAL_ARRAY_POINTER','%GL_NORMAL_ARRAY_POINTER_EXT','%GL_NORMAL_ARRAY_STRIDE','%GL_NORMAL_ARRAY_STRIDE_EXT', + '%GL_NORMAL_ARRAY_TYPE','%GL_NORMAL_ARRAY_TYPE_EXT','%GL_NOTEQUAL','%GL_NO_ERROR','%GL_OBJECT_LINEAR','%GL_OBJECT_PLANE','%GL_ONE','%GL_ONE_MINUS_CONSTANT_ALPHA_EXT', + '%GL_ONE_MINUS_CONSTANT_COLOR_EXT','%GL_ONE_MINUS_DST_ALPHA','%GL_ONE_MINUS_DST_COLOR','%GL_ONE_MINUS_SRC_ALPHA','%GL_ONE_MINUS_SRC_COLOR','%GL_OR','%GL_ORDER','%GL_OR_INVERTED', + '%GL_OR_REVERSE','%GL_OUT_OF_MEMORY','%GL_PACK_ALIGNMENT','%GL_PACK_LSB_FIRST','%GL_PACK_ROW_LENGTH','%GL_PACK_SKIP_PIXELS','%GL_PACK_SKIP_ROWS','%GL_PACK_SWAP_BYTES', + '%GL_PASS_THROUGH_TOKEN','%GL_PERSPECTIVE_CORRECTION_HINT','%GL_PIXEL_MAP_A_TO_A','%GL_PIXEL_MAP_A_TO_A_SIZE','%GL_PIXEL_MAP_B_TO_B','%GL_PIXEL_MAP_B_TO_B_SIZE','%GL_PIXEL_MAP_G_TO_G','%GL_PIXEL_MAP_G_TO_G_SIZE', + '%GL_PIXEL_MAP_I_TO_A','%GL_PIXEL_MAP_I_TO_A_SIZE','%GL_PIXEL_MAP_I_TO_B','%GL_PIXEL_MAP_I_TO_B_SIZE','%GL_PIXEL_MAP_I_TO_G','%GL_PIXEL_MAP_I_TO_G_SIZE','%GL_PIXEL_MAP_I_TO_I','%GL_PIXEL_MAP_I_TO_I_SIZE', + '%GL_PIXEL_MAP_I_TO_R','%GL_PIXEL_MAP_I_TO_R_SIZE','%GL_PIXEL_MAP_R_TO_R','%GL_PIXEL_MAP_R_TO_R_SIZE','%GL_PIXEL_MAP_S_TO_S','%GL_PIXEL_MAP_S_TO_S_SIZE','%GL_PIXEL_MODE_BIT','%GL_POINT', + '%GL_POINTS','%GL_POINT_BIT','%GL_POINT_SIZE','%GL_POINT_SIZE_GRANULARITY','%GL_POINT_SIZE_RANGE','%GL_POINT_SMOOTH','%GL_POINT_SMOOTH_HINT','%GL_POINT_TOKEN', + '%GL_POLYGON','%GL_POLYGON_BIT','%GL_POLYGON_MODE','%GL_POLYGON_OFFSET_BIAS_EXT','%GL_POLYGON_OFFSET_EXT','%GL_POLYGON_OFFSET_FACTOR','%GL_POLYGON_OFFSET_FACTOR_EXT','%GL_POLYGON_OFFSET_FILL', + '%GL_POLYGON_OFFSET_LINE','%GL_POLYGON_OFFSET_POINT','%GL_POLYGON_OFFSET_UNITS','%GL_POLYGON_SMOOTH','%GL_POLYGON_SMOOTH_HINT','%GL_POLYGON_STIPPLE','%GL_POLYGON_STIPPLE_BIT','%GL_POLYGON_TOKEN', + '%GL_POSITION','%GL_POST_COLOR_MATRIX_COLOR_TABLE_EXT','%GL_POST_CONVOLUTION_ALPHA_BIAS_EXT','%GL_POST_CONVOLUTION_ALPHA_SCALE_EXT','%GL_POST_CONVOLUTION_BLUE_BIAS_EXT','%GL_POST_CONVOLUTION_BLUE_SCALE_EXT','%GL_POST_CONVOLUTION_COLOR_TABLE_EXT','%GL_POST_CONVOLUTION_GREEN_BIAS_EXT', + '%GL_POST_CONVOLUTION_GREEN_SCALE_EXT','%GL_POST_CONVOLUTION_RED_BIAS_EXT','%GL_POST_CONVOLUTION_RED_SCALE_EXT','%GL_PROJECTION','%GL_PROJECTION_MATRIX','%GL_PROJECTION_STACK_DEPTH','%GL_PROXY_COLOR_TABLE_EXT','%GL_PROXY_HISTOGRAM_EXT', + '%GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_EXT','%GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_EXT','%GL_PROXY_TEXTURE_1D','%GL_PROXY_TEXTURE_2D','%GL_Q','%GL_QUADRATIC_ATTENUATION','%GL_QUADS','%GL_QUAD_STRIP', + '%GL_R','%GL_R3_G3_B2','%GL_READ_BUFFER','%GL_RED','%GL_REDUCE_EXT','%GL_RED_BIAS','%GL_RED_BITS','%GL_RED_SCALE', + '%GL_RENDER','%GL_RENDERER','%GL_RENDER_MODE','%GL_REPEAT','%GL_REPLACE','%GL_RETURN','%GL_RGB','%GL_RGB10', + '%GL_RGB10_A2','%GL_RGB12','%GL_RGB16','%GL_RGB4','%GL_RGB5','%GL_RGB5_A1','%GL_RGB8','%GL_RGBA', + '%GL_RGBA12','%GL_RGBA16','%GL_RGBA2','%GL_RGBA4','%GL_RGBA8','%GL_RGBA_MODE','%GL_RIGHT','%GL_S', + '%GL_SCISSOR_BIT','%GL_SCISSOR_BOX','%GL_SCISSOR_TEST','%GL_SECONDARY_COLOR_ARRAY_EXT','%GL_SECONDARY_COLOR_ARRAY_POINTER_EXT','%GL_SECONDARY_COLOR_ARRAY_SIZE_EXT','%GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT','%GL_SECONDARY_COLOR_ARRAY_TYPE_EXT', + '%GL_SELECT','%GL_SELECTION_BUFFER_POINTER','%GL_SELECTION_BUFFER_SIZE','%GL_SEPARABLE_2D_EXT','%GL_SEPARATE_SPECULAR_COLOR_EXT','%GL_SET','%GL_SHADE_MODEL','%GL_SHININESS', + '%GL_SHORT','%GL_SINGLE_COLOR_EXT','%GL_SMOOTH','%GL_SPECULAR','%GL_SPHERE_MAP','%GL_SPOT_CUTOFF','%GL_SPOT_DIRECTION','%GL_SPOT_EXPONENT', + '%GL_SRC_ALPHA','%GL_SRC_ALPHA_SATURATE','%GL_SRC_COLOR','%GL_STACK_OVERFLOW','%GL_STACK_UNDERFLOW','%GL_STENCIL','%GL_STENCIL_BITS','%GL_STENCIL_BUFFER_BIT', + '%GL_STENCIL_CLEAR_VALUE','%GL_STENCIL_FAIL','%GL_STENCIL_FUNC','%GL_STENCIL_INDEX','%GL_STENCIL_PASS_DEPTH_FAIL','%GL_STENCIL_PASS_DEPTH_PASS','%GL_STENCIL_REF','%GL_STENCIL_TEST', + '%GL_STENCIL_VALUE_MASK','%GL_STENCIL_WRITEMASK','%GL_STEREO','%GL_SUBPIXEL_BITS','%GL_T','%GL_T2F_C3F_V3F','%GL_T2F_C4F_N3F_V3F','%GL_T2F_C4UB_V3F', + '%GL_T2F_N3F_V3F','%GL_T2F_V3F','%GL_T4F_C4F_N3F_V4F','%GL_T4F_V4F','%GL_TABLE_TOO_LARGE_EXT','%GL_TEXTURE','%GL_TEXTURE_1D','%GL_TEXTURE_2D', + '%GL_TEXTURE_ALPHA_SIZE','%GL_TEXTURE_BINDING_1D','%GL_TEXTURE_BINDING_2D','%GL_TEXTURE_BIT','%GL_TEXTURE_BLUE_SIZE','%GL_TEXTURE_BORDER','%GL_TEXTURE_BORDER_COLOR','%GL_TEXTURE_COMPONENTS', + '%GL_TEXTURE_COORD_ARRAY','%GL_TEXTURE_COORD_ARRAY_COUNT_EXT','%GL_TEXTURE_COORD_ARRAY_EXT','%GL_TEXTURE_COORD_ARRAY_POINTER','%GL_TEXTURE_COORD_ARRAY_POINTER_EXT','%GL_TEXTURE_COORD_ARRAY_SIZE','%GL_TEXTURE_COORD_ARRAY_SIZE_EXT','%GL_TEXTURE_COORD_ARRAY_STRIDE', + '%GL_TEXTURE_COORD_ARRAY_STRIDE_EXT','%GL_TEXTURE_COORD_ARRAY_TYPE','%GL_TEXTURE_COORD_ARRAY_TYPE_EXT','%GL_TEXTURE_ENV','%GL_TEXTURE_ENV_COLOR','%GL_TEXTURE_ENV_MODE','%GL_TEXTURE_GEN_MODE','%GL_TEXTURE_GEN_Q', + '%GL_TEXTURE_GEN_R','%GL_TEXTURE_GEN_S','%GL_TEXTURE_GEN_T','%GL_TEXTURE_GREEN_SIZE','%GL_TEXTURE_HEIGHT','%GL_TEXTURE_INTENSITY_SIZE','%GL_TEXTURE_INTERNAL_FORMAT','%GL_TEXTURE_LUMINANCE_SIZE', + '%GL_TEXTURE_MAG_FILTER','%GL_TEXTURE_MATRIX','%GL_TEXTURE_MIN_FILTER','%GL_TEXTURE_PRIORITY','%GL_TEXTURE_RED_SIZE','%GL_TEXTURE_RESIDENT','%GL_TEXTURE_STACK_DEPTH','%GL_TEXTURE_WIDTH', + '%GL_TEXTURE_WRAP_S','%GL_TEXTURE_WRAP_T','%GL_TRANSFORM_BIT','%GL_TRIANGLES','%GL_TRIANGLE_FAN','%GL_TRIANGLE_STRIP','%GL_TRUE','%GL_UNPACK_ALIGNMENT', + '%GL_UNPACK_LSB_FIRST','%GL_UNPACK_ROW_LENGTH','%GL_UNPACK_SKIP_PIXELS','%GL_UNPACK_SKIP_ROWS','%GL_UNPACK_SWAP_BYTES','%GL_UNSIGNED_BYTE','%GL_UNSIGNED_BYTE_3_3_2_EXT','%GL_UNSIGNED_INT', + '%GL_UNSIGNED_INT_10_10_10_2_EXT','%GL_UNSIGNED_INT_8_8_8_8_EXT','%GL_UNSIGNED_SHORT','%GL_UNSIGNED_SHORT_4_4_4_4_EXT','%GL_UNSIGNED_SHORT_5_5_5_1_EXT','%GL_V2F','%GL_V3F','%GL_VENDOR', + '%GL_VERSION','%GL_VERSION_1_1','%GL_VERTEX_ARRAY','%GL_VERTEX_ARRAY_COUNT_EXT','%GL_VERTEX_ARRAY_EXT','%GL_VERTEX_ARRAY_POINTER','%GL_VERTEX_ARRAY_POINTER_EXT','%GL_VERTEX_ARRAY_SIZE', + '%GL_VERTEX_ARRAY_SIZE_EXT','%GL_VERTEX_ARRAY_STRIDE','%GL_VERTEX_ARRAY_STRIDE_EXT','%GL_VERTEX_ARRAY_TYPE','%GL_VERTEX_ARRAY_TYPE_EXT','%GL_VIEWPORT','%GL_VIEWPORT_BIT','%GL_WIN_SWAP_HINT', + '%GL_XOR','%GL_ZERO','%GL_ZOOM_X','%GL_ZOOM_Y','%GRAY','%GREEN','%GWLP_HINSTANCE','%GWLP_HWNDPARENT', + '%GWLP_ID','%GWLP_USERDATA','%GWLP_WNDPROC','%GWL_EXSTYLE','%GWL_HINSTANCE','%GWL_HWNDPARENT','%GWL_ID','%GWL_STYLE', + '%GWL_USERDATA','%GWL_WNDPROC','%HDM_FIRST','%HTCAPTION','%HWND_BOTTOM','%HWND_DESKTOP','%HWND_MESSAGE','%HWND_NOTOPMOST', + '%HWND_TOP','%HWND_TOPMOST','%ICRYPTO_XOR_DECREASE','%ICRYPTO_XOR_INCREASE','%ICRYPTO_XOR_NORMAL','%IDABORT','%IDCANCEL','%IDCONTINUE', + '%IDIGNORE','%IDNO','%IDOK','%IDRETRY','%IDTIMEOUT','%IDTRYAGAIN','%IDYES','%INTERNET_CONNECTION_CONFIGURED', + '%INTERNET_CONNECTION_LAN','%INTERNET_CONNECTION_MODEM','%INTERNET_CONNECTION_MODEM_BUSY','%INTERNET_CONNECTION_OFFLINE','%INTERNET_CONNECTION_PROXY','%INTERNET_RAS_INSTALLED','%LBN_DBLCLK','%LBN_KILLFOCUS', + '%LBN_SELCANCEL','%LBN_SELCHANGE','%LBN_SETFOCUS','%LBS_DISABLENOSCROLL','%LBS_EXTENDEDSEL','%LBS_MULTICOLUMN','%LBS_MULTIPLESEL','%LBS_NOINTEGRALHEIGHT', + '%LBS_NOSEL','%LBS_NOTIFY','%LBS_SORT','%LBS_STANDARD','%LBS_USETABSTOPS','%LB_ADDFILE','%LB_ADDSTRING','%LB_DELETESTRING', + '%LB_DIR','%LB_FINDSTRING','%LB_FINDSTRINGEXACT','%LB_GETANCHORINDEX','%LB_GETCARETINDEX','%LB_GETCOUNT','%LB_GETCURSEL','%LB_GETHORIZONTALEXTENT', + '%LB_GETITEMDATA','%LB_GETITEMHEIGHT','%LB_GETITEMRECT','%LB_GETLISTBOXINFO','%LB_GETLOCALE','%LB_GETSEL','%LB_GETSELCOUNT','%LB_GETSELITEMS', + '%LB_GETTEXT','%LB_GETTEXTLEN','%LB_GETTOPINDEX','%LB_INITSTORAGE','%LB_INSERTSTRING','%LB_ITEMFROMPOINT','%LB_MULTIPLEADDSTRING','%LB_RESETCONTENT', + '%LB_SELECTSTRING','%LB_SELITEMRANGE','%LB_SELITEMRANGEEX','%LB_SETANCHORINDEX','%LB_SETCARETINDEX','%LB_SETCOLUMNWIDTH','%LB_SETCOUNT','%LB_SETCURSEL', + '%LB_SETHORIZONTALEXTENT','%LB_SETITEMDATA','%LB_SETITEMHEIGHT','%LB_SETLOCALE','%LB_SETSEL','%LB_SETTABSTOPS','%LB_SETTOPINDEX','%LF_FACESIZE', + '%LTGRAY','%LVM_FIRST','%LWA_ALPHA','%LWA_COLORKEY','%MAGENTA','%MAXBYTE','%MAXCHAR','%MAXDWORD', + '%MAXSHORT','%MAXWORD','%MAX_PATH','%MB_ABORTRETRYIGNORE','%MB_APPLMODAL','%MB_CANCELTRYCONTINUE','%MB_DEFBUTTON1','%MB_DEFBUTTON2', + '%MB_DEFBUTTON3','%MB_HELP','%MB_ICONASTERISK','%MB_ICONERROR','%MB_ICONEXCLAMATION','%MB_ICONHAND','%MB_ICONINFORMATION','%MB_ICONQUESTION', + '%MB_ICONSTOP','%MB_ICONWARNING','%MB_OK','%MB_OKCANCEL','%MB_RETRYCANCEL','%MB_SIMPLE','%MB_SYSTEMMODAL','%MB_TOPMOST', + '%MB_YESNO','%MB_YESNOCANCEL','%MF_CHECKED','%MF_DISABLED','%MF_ENABLED','%MF_GRAYED','%MF_SEPARATOR','%MF_UNCHECKED', + '%MINCHAR','%MINLONG','%MINSHORT','%NULL','%ODBC352_INC','%ODBCVER','%ODBC_ADD_DSN','%ODBC_ADD_SYS_DSN', + '%ODBC_BOTH_DSN','%ODBC_CONFIG_DRIVER','%ODBC_CONFIG_DRIVER_MAX','%ODBC_CONFIG_DSN','%ODBC_CONFIG_SYS_DSN','%ODBC_DRIVER_VERSION','%ODBC_ERROR_COMPONENT_NOT_FOUND','%ODBC_ERROR_CREATE_DSN_FAILED', + '%ODBC_ERROR_GENERAL_ERR','%ODBC_ERROR_INVALID_BUFF_LEN','%ODBC_ERROR_INVALID_DSN','%ODBC_ERROR_INVALID_HWND','%ODBC_ERROR_INVALID_INF','%ODBC_ERROR_INVALID_KEYWORD_VALUE','%ODBC_ERROR_INVALID_LOG_FILE','%ODBC_ERROR_INVALID_NAME', + '%ODBC_ERROR_INVALID_PARAM_SEQUENCE','%ODBC_ERROR_INVALID_PATH','%ODBC_ERROR_INVALID_REQUEST_TYPE','%ODBC_ERROR_INVALID_STR','%ODBC_ERROR_LOAD_LIB_FAILED','%ODBC_ERROR_OUTPUT_STRING_TRUNCATED','%ODBC_ERROR_OUT_OF_MEM','%ODBC_ERROR_REMOVE_DSN_FAILED', + '%ODBC_ERROR_REQUEST_FAILED','%ODBC_ERROR_USAGE_UPDATE_FAILED','%ODBC_ERROR_USER_CANCELED','%ODBC_ERROR_WRITING_SYSINFO_FAILED','%ODBC_INSTALL_COMPLETE','%ODBC_INSTALL_DRIVER','%ODBC_INSTALL_INQUIRY','%ODBC_REMOVE_DEFAULT_DSN', + '%ODBC_REMOVE_DRIVER','%ODBC_REMOVE_DSN','%ODBC_REMOVE_SYS_DSN','%ODBC_SYSTEM_DSN','%ODBC_USER_DSN','%OFN_ALLOWMULTISELECT','%OFN_CREATEPROMPT','%OFN_ENABLEHOOK', + '%OFN_ENABLEINCLUDENOTIFY','%OFN_ENABLESIZING','%OFN_ENABLETEMPLATE','%OFN_ENABLETEMPLATEHANDLE','%OFN_EXPLORER','%OFN_EXTENSIONDIFFERENT','%OFN_FILEMUSTEXIST','%OFN_HIDEREADONLY', + '%OFN_LONGNAMES','%OFN_NOCHANGEDIR','%OFN_NODEREFERENCELINKS','%OFN_NOLONGNAMES','%OFN_NONETWORKBUTTON','%OFN_NOREADONLYRETURN','%OFN_NOTESTFILECREATE','%OFN_NOVALIDATE', + '%OFN_OVERWRITEPROMPT','%OFN_PATHMUSTEXIST','%OFN_READONLY','%OFN_SHAREAWARE','%OFN_SHOWHELP','%OS_ERROR_CALLFUNCTION','%OS_ERROR_EMPTYSTRING','%OS_ERROR_LOADLIBRARY', + '%OS_ERROR_SUCCESS','%OS_ERROR_WRONGPARAMETER','%OS_SHELL_ASYNC','%OS_SHELL_SYNC','%OS_WINDOWS_2K','%OS_WINDOWS_95','%OS_WINDOWS_95_OSR2','%OS_WINDOWS_98', + '%OS_WINDOWS_98_SE','%OS_WINDOWS_ME','%OS_WINDOWS_NT','%OS_WINDOWS_SERVER_2003','%OS_WINDOWS_SERVER_LONGHORN','%OS_WINDOWS_SERVER_LONGHORN_DC','%OS_WINDOWS_VISTA','%OS_WINDOWS_XP', + '%OS_WNDSTYLE_HIDE','%OS_WNDSTYLE_MAXIMIZED','%OS_WNDSTYLE_MINIMIZED','%OS_WNDSTYLE_MINIMIZEDNOFOCUS','%OS_WNDSTYLE_NORMAL','%OS_WNDSTYLE_NORMALNOFOCUS','%PATH_EXT','%PATH_FILE', + '%PATH_FILEEXT','%PATH_ROOT','%PATH_ROOTPATH','%PATH_ROOTPATHPROG','%PATH_ROOTPATHPROGEXT','%PBM_DELTAPOS','%PBM_GETPOS','%PBM_GETRANGE', + '%PBM_SETBARCOLOR','%PBM_SETBKCOLOR','%PBM_SETPOS','%PBM_SETRANGE','%PBM_SETRANGE32','%PBM_SETSTEP','%PBM_STEPIT','%PBS_SMOOTH', + '%PBS_VERTICAL','%PC_DISABLEWAKEEVENT_OFF','%PC_DISABLEWAKEEVENT_ON','%PC_EB_NOCONFIRMATION','%PC_EB_NOPROGRESSUI','%PC_EB_NORMAL','%PC_EB_NOSOUND','%PC_FORCECRITICAL_OFF', + '%PC_FORCECRITICAL_ON','%PC_HIBERNATE_OFF','%PC_HIBERNATE_ON','%PC_RD_FORCE','%PC_RD_FORCEIFHUNG','%PC_RD_LOGOFF','%PC_RD_POWEROFF','%PC_RD_REBOOT', + '%PC_RD_SHUTDOWN','%PC_SD_DONOT_FORCE','%PC_SD_DONOT_REBOOT','%PC_SD_FORCE','%PC_SD_REBOOT','%PFA_CENTER','%PFA_LEFT','%PFA_RIGHT', + '%PF_3DNOW_INSTRUCTIONS_AVAILABLE','%PF_CHANNELS_ENABLED','%PF_COMPARE64_EXCHANGE128','%PF_COMPARE_EXCHANGE128','%PF_COMPARE_EXCHANGE_DOUBLE','%PF_FLOATING_POINT_EMULATED','%PF_FLOATING_POINT_PRECISION_ERRATA','%PF_MMX_INSTRUCTIONS_AVAILABLE', + '%PF_NX_ENABLED','%PF_PAE_ENABLED','%PF_RDTSC_INSTRUCTION_AVAILABLE','%PF_SSE3_INSTRUCTIONS_AVAILABLE','%PF_XMMI64_INSTRUCTIONS_AVAILABLE','%PF_XMMI_INSTRUCTIONS_AVAILABLE','%PGM_FIRST','%RED', + '%RTF_UBB','%SAPI_SVSFDEFAULT','%SAPI_SVSFISFILENAME','%SAPI_SVSFISNOTXML','%SAPI_SVSFISXML','%SAPI_SVSFLAGSASYNC','%SAPI_SVSFNLPMASK','%SAPI_SVSFNLPSPEAKPUNC', + '%SAPI_SVSFPERSISTXML','%SAPI_SVSFPURGEBEFORESPEAK','%SAPI_SVSFUNUSEDFLAGS','%SAPI_SVSFVOICEMASK','%SBS_SIZEGRIP','%SB_BOTTOM','%SB_ENDSCROLL','%SB_LEFT', + '%SB_LINEDOWN','%SB_LINELEFT','%SB_LINERIGHT','%SB_LINEUP','%SB_PAGEDOWN','%SB_PAGELEFT','%SB_PAGERIGHT','%SB_PAGEUP', + '%SB_RIGHT','%SB_SETPARTS','%SB_SETTEXT','%SB_THUMBPOSITION','%SB_THUMBTRACK','%SB_TOP','%SCF_ALL','%SCF_ASSOCIATEFONT', + '%SCF_DEFAULT','%SCF_NOKBUPDATE','%SCF_SELECTION','%SCF_USEUIRULES','%SCF_WORD','%SC_CLOSE','%SC_CONTEXTHELP','%SC_HOTKEY', + '%SC_HSCROLL','%SC_KEYMENU','%SC_MAXIMIZE','%SC_MINIMIZE','%SC_MONITORPOWER','%SC_MOUSEMENU','%SC_MOVE','%SC_NEXTWINDOW', + '%SC_PREVWINDOW','%SC_RESTORE','%SC_SCREENSAVE','%SC_SIZE','%SC_TASKLIST','%SC_VSCROLL','%SERVICE_ACTIVE','%SERVICE_AUTO_START', + '%SERVICE_BOOT_START','%SERVICE_CONTINUE_PENDING','%SERVICE_DEMAND_START','%SERVICE_DISABLED','%SERVICE_DRIVER','%SERVICE_INACTIVE','%SERVICE_INFO_DISPLAY_NAME','%SERVICE_INFO_NAME', + '%SERVICE_PAUSED','%SERVICE_PAUSE_PENDING','%SERVICE_RUNNING','%SERVICE_START_PENDING','%SERVICE_STATE_ALL','%SERVICE_STOPPED','%SERVICE_STOP_PENDING','%SERVICE_SYSTEM_START', + '%SERVICE_TYPE_ALL','%SERVICE_WIN32','%SES_ALLOWBEEPS','%SES_BEEPONMAXTEXT','%SES_BIDI','%SES_EMULATE10','%SES_EMULATESYSEDIT','%SES_EXTENDBACKCOLOR', + '%SES_LOWERCASE','%SES_MAPCPS','%SES_NOIME','%SES_NOINPUTSEQUENCECHK','%SES_SCROLLONKILLFOCUS','%SES_UPPERCASE','%SES_USEAIMM','%SES_USECRLF', + '%SES_XLTCRCRLFTOCR','%SF_RTF','%SF_TEXT','%SMTP_SET_ATTACH_CONTENT_TYPE','%SMTP_SET_CONTENT_TYPE_PREFIX','%SQL_AA_FALSE','%SQL_AA_TRUE','%SQL_ACCESSIBLE_PROCEDURES', + '%SQL_ACCESSIBLE_TABLES','%SQL_ACCESS_MODE','%SQL_ACTIVE_CONNECTIONS','%SQL_ACTIVE_ENVIRONMENTS','%SQL_ACTIVE_STATEMENTS','%SQL_ADD','%SQL_AD_ADD_CONSTRAINT_DEFERRABLE','%SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED', + '%SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE','%SQL_AD_ADD_DOMAIN_CONSTRAINT','%SQL_AD_ADD_DOMAIN_DEFAULT','%SQL_AD_CONSTRAINT_NAME_DEFINITION','%SQL_AD_DROP_DOMAIN_CONSTRAINT','%SQL_AD_DROP_DOMAIN_DEFAULT','%SQL_AF_ALL', + '%SQL_AF_AVG','%SQL_AF_COUNT','%SQL_AF_DISTINCT','%SQL_AF_MAX','%SQL_AF_MIN','%SQL_AF_SUM','%SQL_AGGREGATE_FUNCTIONS','%SQL_ALL_EXCEPT_LIKE', + '%SQL_ALL_TYPES','%SQL_ALTER_DOMAIN','%SQL_ALTER_TABLE','%SQL_AM_CONNECTION','%SQL_AM_NONE','%SQL_AM_STATEMENT','%SQL_API_ALL_FUNCTIONS','%SQL_API_LOADBYORDINAL', + '%SQL_API_ODBC3_ALL_FUNCTIONS','%SQL_API_ODBC3_ALL_FUNCTIONS_SIZE','%SQL_API_SQLALLOCCONNECT','%SQL_API_SQLALLOCENV','%SQL_API_SQLALLOCHANDLE','%SQL_API_SQLALLOCHANDLESTD','%SQL_API_SQLALLOCSTMT','%SQL_API_SQLBINDCOL', + '%SQL_API_SQLBINDPARAM','%SQL_API_SQLBINDPARAMETER','%SQL_API_SQLBROWSECONNECT','%SQL_API_SQLBULKOPERATIONS','%SQL_API_SQLCANCEL','%SQL_API_SQLCLOSECURSOR','%SQL_API_SQLCOLATTRIBUTE','%SQL_API_SQLCOLATTRIBUTES', + '%SQL_API_SQLCOLUMNPRIVILEGES','%SQL_API_SQLCOLUMNS','%SQL_API_SQLCONNECT','%SQL_API_SQLCOPYDESC','%SQL_API_SQLDATASOURCES','%SQL_API_SQLDESCRIBECOL','%SQL_API_SQLDESCRIBEPARAM','%SQL_API_SQLDISCONNECT', + '%SQL_API_SQLDRIVERCONNECT','%SQL_API_SQLDRIVERS','%SQL_API_SQLENDTRAN','%SQL_API_SQLERROR','%SQL_API_SQLEXECDIRECT','%SQL_API_SQLEXECUTE','%SQL_API_SQLEXTENDEDFETCH','%SQL_API_SQLFETCH', + '%SQL_API_SQLFETCHSCROLL','%SQL_API_SQLFOREIGNKEYS','%SQL_API_SQLFREECONNECT','%SQL_API_SQLFREEENV','%SQL_API_SQLFREEHANDLE','%SQL_API_SQLFREESTMT','%SQL_API_SQLGETCONNECTATTR','%SQL_API_SQLGETCONNECTOPTION', + '%SQL_API_SQLGETCURSORNAME','%SQL_API_SQLGETDATA','%SQL_API_SQLGETDESCFIELD','%SQL_API_SQLGETDESCREC','%SQL_API_SQLGETDIAGFIELD','%SQL_API_SQLGETDIAGREC','%SQL_API_SQLGETENVATTR','%SQL_API_SQLGETFUNCTIONS', + '%SQL_API_SQLGETINFO','%SQL_API_SQLGETSTMTATTR','%SQL_API_SQLGETSTMTOPTION','%SQL_API_SQLGETTYPEINFO','%SQL_API_SQLMORERESULTS','%SQL_API_SQLNATIVESQL','%SQL_API_SQLNUMPARAMS','%SQL_API_SQLNUMRESULTCOLS', + '%SQL_API_SQLPARAMDATA','%SQL_API_SQLPARAMOPTIONS','%SQL_API_SQLPREPARE','%SQL_API_SQLPRIMARYKEYS','%SQL_API_SQLPROCEDURECOLUMNS','%SQL_API_SQLPROCEDURES','%SQL_API_SQLPUTDATA','%SQL_API_SQLROWCOUNT', + '%SQL_API_SQLSETCONNECTATTR','%SQL_API_SQLSETCONNECTOPTION','%SQL_API_SQLSETCURSORNAME','%SQL_API_SQLSETDESCFIELD','%SQL_API_SQLSETDESCREC','%SQL_API_SQLSETENVATTR','%SQL_API_SQLSETPARAM','%SQL_API_SQLSETPOS', + '%SQL_API_SQLSETSCROLLOPTIONS','%SQL_API_SQLSETSTMTATTR','%SQL_API_SQLSETSTMTOPTION','%SQL_API_SQLSPECIALCOLUMNS','%SQL_API_SQLSTATISTICS','%SQL_API_SQLTABLEPRIVILEGES','%SQL_API_SQLTABLES','%SQL_API_SQLTRANSACT', + '%SQL_ARD_TYPE','%SQL_ASYNC_ENABLE','%SQL_ASYNC_ENABLE_DEFAULT','%SQL_ASYNC_ENABLE_OFF','%SQL_ASYNC_ENABLE_ON','%SQL_ASYNC_MODE','%SQL_ATTR_ACCESS_MODE','%SQL_ATTR_ANSI_APP', + '%SQL_ATTR_APP_PARAM_DESC','%SQL_ATTR_APP_ROW_DESC','%SQL_ATTR_ASYNC_ENABLE','%SQL_ATTR_AUTOCOMMIT','%SQL_ATTR_AUTO_IPD','%SQL_ATTR_CONCURRENCY','%SQL_ATTR_CONNECTION_DEAD','%SQL_ATTR_CONNECTION_POOLING', + '%SQL_ATTR_CONNECTION_TIMEOUT','%SQL_ATTR_CP_MATCH','%SQL_ATTR_CURRENT_CATALOG','%SQL_ATTR_CURSOR_SCROLLABLE','%SQL_ATTR_CURSOR_SENSITIVITY','%SQL_ATTR_CURSOR_TYPE','%SQL_ATTR_DISCONNECT_BEHAVIOR','%SQL_ATTR_ENABLE_AUTO_IPD', + '%SQL_ATTR_ENLIST_IN_DTC','%SQL_ATTR_ENLIST_IN_XA','%SQL_ATTR_FETCH_BOOKMARK_PTR','%SQL_ATTR_IMP_PARAM_DESC','%SQL_ATTR_IMP_ROW_DESC','%SQL_ATTR_KEYSET_SIZE','%SQL_ATTR_LOGIN_TIMEOUT','%SQL_ATTR_MAX_LENGTH', + '%SQL_ATTR_MAX_ROWS','%SQL_ATTR_METADATA_ID','%SQL_ATTR_NOSCAN','%SQL_ATTR_ODBC_CURSORS','%SQL_ATTR_ODBC_VERSION','%SQL_ATTR_OUTPUT_NTS','%SQL_ATTR_PACKET_SIZE','%SQL_ATTR_PARAMSET_SIZE', + '%SQL_ATTR_PARAMS_PROCESSED_PTR','%SQL_ATTR_PARAM_BIND_OFFSET_PTR','%SQL_ATTR_PARAM_BIND_TYPE','%SQL_ATTR_PARAM_OPERATION_PTR','%SQL_ATTR_PARAM_STATUS_PTR','%SQL_ATTR_QUERY_TIMEOUT','%SQL_ATTR_QUIET_MODE','%SQL_ATTR_READONLY', + '%SQL_ATTR_READWRITE_UNKNOWN','%SQL_ATTR_RETRIEVE_DATA','%SQL_ATTR_ROWS_FETCHED_PTR','%SQL_ATTR_ROW_ARRAY_SIZE','%SQL_ATTR_ROW_BIND_OFFSET_PTR','%SQL_ATTR_ROW_BIND_TYPE','%SQL_ATTR_ROW_NUMBER','%SQL_ATTR_ROW_OPERATION_PTR', + '%SQL_ATTR_ROW_STATUS_PTR','%SQL_ATTR_SIMULATE_CURSOR','%SQL_ATTR_TRACE','%SQL_ATTR_TRACEFILE','%SQL_ATTR_TRANSLATE_LIB','%SQL_ATTR_TRANSLATE_OPTION','%SQL_ATTR_TXN_ISOLATION','%SQL_ATTR_USE_BOOKMARKS', + '%SQL_ATTR_WRITE','%SQL_AT_ADD_COLUMN','%SQL_AT_ADD_COLUMN_COLLATION','%SQL_AT_ADD_COLUMN_DEFAULT','%SQL_AT_ADD_COLUMN_SINGLE','%SQL_AT_ADD_CONSTRAINT','%SQL_AT_ADD_TABLE_CONSTRAINT','%SQL_AT_CONSTRAINT_DEFERRABLE', + '%SQL_AT_CONSTRAINT_INITIALLY_DEFERRED','%SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_AT_CONSTRAINT_NAME_DEFINITION','%SQL_AT_CONSTRAINT_NON_DEFERRABLE','%SQL_AT_DROP_COLUMN','%SQL_AT_DROP_COLUMN_CASCADE','%SQL_AT_DROP_COLUMN_DEFAULT','%SQL_AT_DROP_COLUMN_RESTRICT', + '%SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE','%SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT','%SQL_AT_SET_COLUMN_DEFAULT','%SQL_AUTOCOMMIT','%SQL_AUTOCOMMIT_DEFAULT','%SQL_AUTOCOMMIT_OFF','%SQL_AUTOCOMMIT_ON','%SQL_BATCH_ROW_COUNT', + '%SQL_BATCH_SUPPORT','%SQL_BEST_ROWID','%SQL_BIGINT','%SQL_BINARY','%SQL_BIND_BY_COLUMN','%SQL_BIND_TYPE','%SQL_BIND_TYPE_DEFAULT','%SQL_BIT', + '%SQL_BOOKMARK_PERSISTENCE','%SQL_BP_CLOSE','%SQL_BP_DELETE','%SQL_BP_DROP','%SQL_BP_OTHER_HSTMT','%SQL_BP_SCROLL','%SQL_BP_TRANSACTION','%SQL_BP_UPDATE', + '%SQL_BRC_EXPLICIT','%SQL_BRC_PROCEDURES','%SQL_BRC_ROLLED_UP','%SQL_BS_ROW_COUNT_EXPLICIT','%SQL_BS_ROW_COUNT_PROC','%SQL_BS_SELECT_EXPLICIT','%SQL_BS_SELECT_PROC','%SQL_CA1_ABSOLUTE', + '%SQL_CA1_BOOKMARK','%SQL_CA1_BULK_ADD','%SQL_CA1_BULK_DELETE_BY_BOOKMARK','%SQL_CA1_BULK_FETCH_BY_BOOKMARK','%SQL_CA1_BULK_UPDATE_BY_BOOKMARK','%SQL_CA1_LOCK_EXCLUSIVE','%SQL_CA1_LOCK_NO_CHANGE','%SQL_CA1_LOCK_UNLOCK', + '%SQL_CA1_NEXT','%SQL_CA1_POSITIONED_DELETE','%SQL_CA1_POSITIONED_UPDATE','%SQL_CA1_POS_DELETE','%SQL_CA1_POS_POSITION','%SQL_CA1_POS_REFRESH','%SQL_CA1_POS_UPDATE','%SQL_CA1_RELATIVE', + '%SQL_CA1_SELECT_FOR_UPDATE','%SQL_CA2_CRC_APPROXIMATE','%SQL_CA2_CRC_EXACT','%SQL_CA2_LOCK_CONCURRENCY','%SQL_CA2_MAX_ROWS_AFFECTS_ALL','%SQL_CA2_MAX_ROWS_CATALOG','%SQL_CA2_MAX_ROWS_DELETE','%SQL_CA2_MAX_ROWS_INSERT', + '%SQL_CA2_MAX_ROWS_SELECT','%SQL_CA2_MAX_ROWS_UPDATE','%SQL_CA2_OPT_ROWVER_CONCURRENCY','%SQL_CA2_OPT_VALUES_CONCURRENCY','%SQL_CA2_READ_ONLY_CONCURRENCY','%SQL_CA2_SENSITIVITY_ADDITIONS','%SQL_CA2_SENSITIVITY_DELETIONS','%SQL_CA2_SENSITIVITY_UPDATES', + '%SQL_CA2_SIMULATE_NON_UNIQUE','%SQL_CA2_SIMULATE_TRY_UNIQUE','%SQL_CA2_SIMULATE_UNIQUE','%SQL_CASCADE','%SQL_CATALOG_LOCATION','%SQL_CATALOG_NAME','%SQL_CATALOG_NAME_SEPARATOR','%SQL_CATALOG_TERM', + '%SQL_CATALOG_USAGE','%SQL_CA_CONSTRAINT_DEFERRABLE','%SQL_CA_CONSTRAINT_INITIALLY_DEFERRED','%SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_CA_CONSTRAINT_NON_DEFERRABLE','%SQL_CA_CREATE_ASSERTION','%SQL_CB_CLOSE','%SQL_CB_DELETE', + '%SQL_CB_NON_NULL','%SQL_CB_NULL','%SQL_CB_PRESERVE','%SQL_CCOL_CREATE_COLLATION','%SQL_CCS_COLLATE_CLAUSE','%SQL_CCS_CREATE_CHARACTER_SET','%SQL_CCS_LIMITED_COLLATION','%SQL_CC_CLOSE', + '%SQL_CC_DELETE','%SQL_CC_PRESERVE','%SQL_CDO_COLLATION','%SQL_CDO_CONSTRAINT','%SQL_CDO_CONSTRAINT_DEFERRABLE','%SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED','%SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_CDO_CONSTRAINT_NAME_DEFINITION', + '%SQL_CDO_CONSTRAINT_NON_DEFERRABLE','%SQL_CDO_CREATE_DOMAIN','%SQL_CDO_DEFAULT','%SQL_CD_FALSE','%SQL_CD_TRUE','%SQL_CHAR','%SQL_CLOSE','%SQL_CL_END', + '%SQL_CL_START','%SQL_CN_ANY','%SQL_CN_DIFFERENT','%SQL_CN_NONE','%SQL_CODE_DATE','%SQL_CODE_DAY','%SQL_CODE_DAY_TO_HOUR','%SQL_CODE_DAY_TO_MINUTE', + '%SQL_CODE_DAY_TO_SECOND','%SQL_CODE_HOUR','%SQL_CODE_HOUR_TO_MINUTE','%SQL_CODE_HOUR_TO_SECOND','%SQL_CODE_MINUTE','%SQL_CODE_MINUTE_TO_SECOND','%SQL_CODE_MONTH','%SQL_CODE_SECOND', + '%SQL_CODE_TIME','%SQL_CODE_TIMESTAMP','%SQL_CODE_YEAR','%SQL_CODE_YEAR_TO_MONTH','%SQL_COLATT_OPT_MAX','%SQL_COLATT_OPT_MIN','%SQL_COLLATION_SEQ','%SQL_COLUMN_ALIAS', + '%SQL_COLUMN_AUTO_INCREMENT','%SQL_COLUMN_CASE_SENSITIVE','%SQL_COLUMN_COUNT','%SQL_COLUMN_DISPLAY_SIZE','%SQL_COLUMN_IGNORE','%SQL_COLUMN_LABEL','%SQL_COLUMN_LENGTH','%SQL_COLUMN_MONEY', + '%SQL_COLUMN_NAME','%SQL_COLUMN_NULLABLE','%SQL_COLUMN_NUMBER_UNKNOWN','%SQL_COLUMN_OWNER_NAME','%SQL_COLUMN_PRECISION','%SQL_COLUMN_QUALIFIER_NAME','%SQL_COLUMN_SCALE','%SQL_COLUMN_SEARCHABLE', + '%SQL_COLUMN_TABLE_NAME','%SQL_COLUMN_TYPE','%SQL_COLUMN_TYPE_NAME','%SQL_COLUMN_UNSIGNED','%SQL_COLUMN_UPDATABLE','%SQL_COL_PRED_BASIC','%SQL_COL_PRED_CHAR','%SQL_COMMIT', + '%SQL_CONCAT_NULL_BEHAVIOR','%SQL_CONCURRENCY','%SQL_CONCUR_DEFAULT','%SQL_CONCUR_LOCK','%SQL_CONCUR_READ_ONLY','%SQL_CONCUR_ROWVER','%SQL_CONCUR_TIMESTAMP','%SQL_CONCUR_VALUES', + '%SQL_CONVERT_BIGINT','%SQL_CONVERT_BINARY','%SQL_CONVERT_BIT','%SQL_CONVERT_CHAR','%SQL_CONVERT_DATE','%SQL_CONVERT_DECIMAL','%SQL_CONVERT_DOUBLE','%SQL_CONVERT_FLOAT', + '%SQL_CONVERT_FUNCTIONS','%SQL_CONVERT_GUID','%SQL_CONVERT_INTEGER','%SQL_CONVERT_INTERVAL_DAY_TIME','%SQL_CONVERT_INTERVAL_YEAR_MONTH','%SQL_CONVERT_LONGVARBINARY','%SQL_CONVERT_LONGVARCHAR','%SQL_CONVERT_NUMERIC', + '%SQL_CONVERT_REAL','%SQL_CONVERT_SMALLINT','%SQL_CONVERT_TIME','%SQL_CONVERT_TIMESTAMP','%SQL_CONVERT_TINYINT','%SQL_CONVERT_VARBINARY','%SQL_CONVERT_VARCHAR','%SQL_CONVERT_WCHAR', + '%SQL_CONVERT_WLONGVARCHAR','%SQL_CONVERT_WVARCHAR','%SQL_CORRELATION_NAME','%SQL_CP_DEFAULT','%SQL_CP_MATCH_DEFAULT','%SQL_CP_OFF','%SQL_CP_ONE_PER_DRIVER','%SQL_CP_ONE_PER_HENV', + '%SQL_CP_RELAXED_MATCH','%SQL_CP_STRICT_MATCH','%SQL_CREATE_ASSERTION','%SQL_CREATE_CHARACTER_SET','%SQL_CREATE_COLLATION','%SQL_CREATE_DOMAIN','%SQL_CREATE_SCHEMA','%SQL_CREATE_TABLE', + '%SQL_CREATE_TRANSLATION','%SQL_CREATE_VIEW','%SQL_CR_CLOSE','%SQL_CR_DELETE','%SQL_CR_PRESERVE','%SQL_CS_AUTHORIZATION','%SQL_CS_CREATE_SCHEMA','%SQL_CS_DEFAULT_CHARACTER_SET', + '%SQL_CTR_CREATE_TRANSLATION','%SQL_CT_COLUMN_COLLATION','%SQL_CT_COLUMN_CONSTRAINT','%SQL_CT_COLUMN_DEFAULT','%SQL_CT_COMMIT_DELETE','%SQL_CT_COMMIT_PRESERVE','%SQL_CT_CONSTRAINT_DEFERRABLE','%SQL_CT_CONSTRAINT_INITIALLY_DEFERRED', + '%SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_CT_CONSTRAINT_NAME_DEFINITION','%SQL_CT_CONSTRAINT_NON_DEFERRABLE','%SQL_CT_CREATE_TABLE','%SQL_CT_GLOBAL_TEMPORARY','%SQL_CT_LOCAL_TEMPORARY','%SQL_CT_TABLE_CONSTRAINT','%SQL_CURRENT_QUALIFIER', + '%SQL_CURSOR_COMMIT_BEHAVIOR','%SQL_CURSOR_DYNAMIC','%SQL_CURSOR_FORWARD_ONLY','%SQL_CURSOR_KEYSET_DRIVEN','%SQL_CURSOR_ROLLBACK_BEHAVIOR','%SQL_CURSOR_SENSITIVITY','%SQL_CURSOR_STATIC','%SQL_CURSOR_TYPE', + '%SQL_CURSOR_TYPE_DEFAULT','%SQL_CUR_DEFAULT','%SQL_CUR_USE_DRIVER','%SQL_CUR_USE_IF_NEEDED','%SQL_CUR_USE_ODBC','%SQL_CU_DML_STATEMENTS','%SQL_CU_INDEX_DEFINITION','%SQL_CU_PRIVILEGE_DEFINITION', + '%SQL_CU_PROCEDURE_INVOCATION','%SQL_CU_TABLE_DEFINITION','%SQL_CVT_BIGINT','%SQL_CVT_BINARY','%SQL_CVT_BIT','%SQL_CVT_CHAR','%SQL_CVT_DATE','%SQL_CVT_DECIMAL', + '%SQL_CVT_DOUBLE','%SQL_CVT_FLOAT','%SQL_CVT_GUID','%SQL_CVT_INTEGER','%SQL_CVT_INTERVAL_DAY_TIME','%SQL_CVT_INTERVAL_YEAR_MONTH','%SQL_CVT_LONGVARBINARY','%SQL_CVT_LONGVARCHAR', + '%SQL_CVT_NUMERIC','%SQL_CVT_REAL','%SQL_CVT_SMALLINT','%SQL_CVT_TIME','%SQL_CVT_TIMESTAMP','%SQL_CVT_TINYINT','%SQL_CVT_VARBINARY','%SQL_CVT_VARCHAR', + '%SQL_CVT_WCHAR','%SQL_CVT_WLONGVARCHAR','%SQL_CVT_WVARCHAR','%SQL_CV_CASCADED','%SQL_CV_CHECK_OPTION','%SQL_CV_CREATE_VIEW','%SQL_CV_LOCAL','%SQL_C_BINARY', + '%SQL_C_BIT','%SQL_C_BOOKMARK','%SQL_C_CHAR','%SQL_C_DATE','%SQL_C_DEFAULT','%SQL_C_DOUBLE','%SQL_C_FLOAT','%SQL_C_GUID', + '%SQL_C_INTERVAL_DAY','%SQL_C_INTERVAL_DAY_TO_HOUR','%SQL_C_INTERVAL_DAY_TO_MINUTE','%SQL_C_INTERVAL_DAY_TO_SECOND','%SQL_C_INTERVAL_HOUR','%SQL_C_INTERVAL_HOUR_TO_MINUTE','%SQL_C_INTERVAL_HOUR_TO_SECOND','%SQL_C_INTERVAL_MINUTE', + '%SQL_C_INTERVAL_MINUTE_TO_SECOND','%SQL_C_INTERVAL_MONTH','%SQL_C_INTERVAL_SECOND','%SQL_C_INTERVAL_YEAR','%SQL_C_INTERVAL_YEAR_TO_MONTH','%SQL_C_LONG','%SQL_C_NUMERIC','%SQL_C_SBIGINT', + '%SQL_C_SHORT','%SQL_C_SLONG','%SQL_C_SSHORT','%SQL_C_STINYINT','%SQL_C_TIME','%SQL_C_TIMESTAMP','%SQL_C_TINYINT','%SQL_C_TYPE_DATE', + '%SQL_C_TYPE_TIME','%SQL_C_TYPE_TIMESTAMP','%SQL_C_UBIGINT','%SQL_C_ULONG','%SQL_C_USHORT','%SQL_C_UTINYINT','%SQL_C_VARBOOKMARK','%SQL_DATABASE_NAME', + '%SQL_DATA_AT_EXEC','%SQL_DATA_SOURCE_NAME','%SQL_DATA_SOURCE_READ_ONLY','%SQL_DATE','%SQL_DATETIME','%SQL_DATETIME_LITERALS','%SQL_DATE_LEN','%SQL_DAY', + '%SQL_DAY_TO_HOUR','%SQL_DAY_TO_MINUTE','%SQL_DAY_TO_SECOND','%SQL_DA_DROP_ASSERTION','%SQL_DBMS_NAME','%SQL_DBMS_VER','%SQL_DB_DEFAULT','%SQL_DB_DISCONNECT', + '%SQL_DB_RETURN_TO_POOL','%SQL_DCS_DROP_CHARACTER_SET','%SQL_DC_DROP_COLLATION','%SQL_DDL_INDEX','%SQL_DD_CASCADE','%SQL_DD_DROP_DOMAIN','%SQL_DD_RESTRICT','%SQL_DECIMAL', + '%SQL_DEFAULT','%SQL_DEFAULT_PARAM','%SQL_DEFAULT_TXN_ISOLATION','%SQL_DELETE','%SQL_DELETE_BY_BOOKMARK','%SQL_DESCRIBE_PARAMETER','%SQL_DESC_ALLOC_AUTO','%SQL_DESC_ALLOC_TYPE', + '%SQL_DESC_ALLOC_USER','%SQL_DESC_ARRAY_SIZE','%SQL_DESC_ARRAY_STATUS_PTR','%SQL_DESC_AUTO_UNIQUE_VALUE','%SQL_DESC_BASE_COLUMN_NAME','%SQL_DESC_BASE_TABLE_NAME','%SQL_DESC_BIND_OFFSET_PTR','%SQL_DESC_BIND_TYPE', + '%SQL_DESC_CASE_SENSITIVE','%SQL_DESC_CATALOG_NAME','%SQL_DESC_CONCISE_TYPE','%SQL_DESC_COUNT','%SQL_DESC_DATA_PTR','%SQL_DESC_DATETIME_INTERVAL_CODE','%SQL_DESC_DATETIME_INTERVAL_PRECISION','%SQL_DESC_DISPLAY_SIZE', + '%SQL_DESC_FIXED_PREC_SCALE','%SQL_DESC_INDICATOR_PTR','%SQL_DESC_LABEL','%SQL_DESC_LENGTH','%SQL_DESC_LITERAL_PREFIX','%SQL_DESC_LITERAL_SUFFIX','%SQL_DESC_LOCAL_TYPE_NAME','%SQL_DESC_MAXIMUM_SCALE', + '%SQL_DESC_MINIMUM_SCALE','%SQL_DESC_NAME','%SQL_DESC_NULLABLE','%SQL_DESC_NUM_PREC_RADIX','%SQL_DESC_OCTET_LENGTH','%SQL_DESC_OCTET_LENGTH_PTR','%SQL_DESC_PARAMETER_TYPE','%SQL_DESC_PRECISION', + '%SQL_DESC_ROWS_PROCESSED_PTR','%SQL_DESC_SCALE','%SQL_DESC_SCHEMA_NAME','%SQL_DESC_SEARCHABLE','%SQL_DESC_TABLE_NAME','%SQL_DESC_TYPE','%SQL_DESC_TYPE_NAME','%SQL_DESC_UNNAMED', + '%SQL_DESC_UNSIGNED','%SQL_DESC_UPDATABLE','%SQL_DIAG_ALTER_TABLE','%SQL_DIAG_CALL','%SQL_DIAG_CLASS_ORIGIN','%SQL_DIAG_COLUMN_NUMBER','%SQL_DIAG_CONNECTION_NAME','%SQL_DIAG_CREATE_INDEX', + '%SQL_DIAG_CREATE_TABLE','%SQL_DIAG_CREATE_VIEW','%SQL_DIAG_CURSOR_ROW_COUNT','%SQL_DIAG_DELETE_WHERE','%SQL_DIAG_DROP_INDEX','%SQL_DIAG_DROP_TABLE','%SQL_DIAG_DROP_VIEW','%SQL_DIAG_DYNAMIC_DELETE_CURSOR', + '%SQL_DIAG_DYNAMIC_FUNCTION','%SQL_DIAG_DYNAMIC_FUNCTION_CODE','%SQL_DIAG_DYNAMIC_UPDATE_CURSOR','%SQL_DIAG_GRANT','%SQL_DIAG_INSERT','%SQL_DIAG_MESSAGE_TEXT','%SQL_DIAG_NATIVE','%SQL_DIAG_NUMBER', + '%SQL_DIAG_RETURNCODE','%SQL_DIAG_REVOKE','%SQL_DIAG_ROW_COUNT','%SQL_DIAG_ROW_NUMBER','%SQL_DIAG_SELECT_CURSOR','%SQL_DIAG_SERVER_NAME','%SQL_DIAG_SQLSTATE','%SQL_DIAG_SUBCLASS_ORIGIN', + '%SQL_DIAG_UNKNOWN_STATEMENT','%SQL_DIAG_UPDATE_WHERE','%SQL_DI_CREATE_INDEX','%SQL_DI_DROP_INDEX','%SQL_DL_SQL92_DATE','%SQL_DL_SQL92_INTERVAL_DAY','%SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR','%SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE', + '%SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND','%SQL_DL_SQL92_INTERVAL_HOUR','%SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE','%SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND','%SQL_DL_SQL92_INTERVAL_MINUTE','%SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND','%SQL_DL_SQL92_INTERVAL_MONTH','%SQL_DL_SQL92_INTERVAL_SECOND', + '%SQL_DL_SQL92_INTERVAL_YEAR','%SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH','%SQL_DL_SQL92_TIME','%SQL_DL_SQL92_TIMESTAMP','%SQL_DM_VER','%SQL_DOUBLE','%SQL_DRIVER_COMPLETE','%SQL_DRIVER_COMPLETE_REQUIRED', + '%SQL_DRIVER_HDBC','%SQL_DRIVER_HDESC','%SQL_DRIVER_HENV','%SQL_DRIVER_HLIB','%SQL_DRIVER_HSTMT','%SQL_DRIVER_NAME','%SQL_DRIVER_NOPROMPT','%SQL_DRIVER_ODBC_VER', + '%SQL_DRIVER_PROMPT','%SQL_DRIVER_VER','%SQL_DROP','%SQL_DROP_ASSERTION','%SQL_DROP_CHARACTER_SET','%SQL_DROP_COLLATION','%SQL_DROP_DOMAIN','%SQL_DROP_SCHEMA', + '%SQL_DROP_TABLE','%SQL_DROP_TRANSLATION','%SQL_DROP_VIEW','%SQL_DS_CASCADE','%SQL_DS_DROP_SCHEMA','%SQL_DS_RESTRICT','%SQL_DTC_DONE','%SQL_DTC_ENLIST_EXPENSIVE', + '%SQL_DTC_TRANSITION_COST','%SQL_DTC_UNENLIST_EXPENSIVE','%SQL_DTR_DROP_TRANSLATION','%SQL_DT_CASCADE','%SQL_DT_DROP_TABLE','%SQL_DT_RESTRICT','%SQL_DV_CASCADE','%SQL_DV_DROP_VIEW', + '%SQL_DV_RESTRICT','%SQL_DYNAMIC_CURSOR_ATTRIBUTES1','%SQL_DYNAMIC_CURSOR_ATTRIBUTES2','%SQL_ENSURE','%SQL_ENTIRE_ROWSET','%SQL_ERROR','%SQL_EXPRESSIONS_IN_ORDERBY','%SQL_FALSE', + '%SQL_FD_FETCH_ABSOLUTE','%SQL_FD_FETCH_BOOKMARK','%SQL_FD_FETCH_FIRST','%SQL_FD_FETCH_LAST','%SQL_FD_FETCH_NEXT','%SQL_FD_FETCH_PREV','%SQL_FD_FETCH_PRIOR','%SQL_FD_FETCH_RELATIVE', + '%SQL_FETCH_ABSOLUTE','%SQL_FETCH_BOOKMARK','%SQL_FETCH_BY_BOOKMARK','%SQL_FETCH_DIRECTION','%SQL_FETCH_FIRST','%SQL_FETCH_FIRST_SYSTEM','%SQL_FETCH_FIRST_USER','%SQL_FETCH_LAST', + '%SQL_FETCH_NEXT','%SQL_FETCH_PREV','%SQL_FETCH_PRIOR','%SQL_FETCH_RELATIVE','%SQL_FILE_CATALOG','%SQL_FILE_NOT_SUPPORTED','%SQL_FILE_QUALIFIER','%SQL_FILE_TABLE', + '%SQL_FILE_USAGE','%SQL_FLOAT','%SQL_FN_CVT_CAST','%SQL_FN_CVT_CONVERT','%SQL_FN_NUM_ABS','%SQL_FN_NUM_ACOS','%SQL_FN_NUM_ASIN','%SQL_FN_NUM_ATAN', + '%SQL_FN_NUM_ATAN2','%SQL_FN_NUM_CEILING','%SQL_FN_NUM_COS','%SQL_FN_NUM_COT','%SQL_FN_NUM_DEGREES','%SQL_FN_NUM_EXP','%SQL_FN_NUM_FLOOR','%SQL_FN_NUM_LOG', + '%SQL_FN_NUM_LOG10','%SQL_FN_NUM_MOD','%SQL_FN_NUM_PI','%SQL_FN_NUM_POWER','%SQL_FN_NUM_RADIANS','%SQL_FN_NUM_RAND','%SQL_FN_NUM_ROUND','%SQL_FN_NUM_SIGN', + '%SQL_FN_NUM_SIN','%SQL_FN_NUM_SQRT','%SQL_FN_NUM_TAN','%SQL_FN_NUM_TRUNCATE','%SQL_FN_STR_ASCII','%SQL_FN_STR_BIT_LENGTH','%SQL_FN_STR_CHAR','%SQL_FN_STR_CHARACTER_LENGTH', + '%SQL_FN_STR_CHAR_LENGTH','%SQL_FN_STR_CONCAT','%SQL_FN_STR_DIFFERENCE','%SQL_FN_STR_INSERT','%SQL_FN_STR_LCASE','%SQL_FN_STR_LEFT','%SQL_FN_STR_LENGTH','%SQL_FN_STR_LOCATE', + '%SQL_FN_STR_LOCATE_2','%SQL_FN_STR_LTRIM','%SQL_FN_STR_OCTET_LENGTH','%SQL_FN_STR_POSITION','%SQL_FN_STR_REPEAT','%SQL_FN_STR_REPLACE','%SQL_FN_STR_RIGHT','%SQL_FN_STR_RTRIM', + '%SQL_FN_STR_SOUNDEX','%SQL_FN_STR_SPACE','%SQL_FN_STR_SUBSTRING','%SQL_FN_STR_UCASE','%SQL_FN_SYS_DBNAME','%SQL_FN_SYS_IFNULL','%SQL_FN_SYS_USERNAME','%SQL_FN_TD_CURDATE', + '%SQL_FN_TD_CURRENT_DATE','%SQL_FN_TD_CURRENT_TIME','%SQL_FN_TD_CURRENT_TIMESTAMP','%SQL_FN_TD_CURTIME','%SQL_FN_TD_DAYNAME','%SQL_FN_TD_DAYOFMONTH','%SQL_FN_TD_DAYOFWEEK','%SQL_FN_TD_DAYOFYEAR', + '%SQL_FN_TD_EXTRACT','%SQL_FN_TD_HOUR','%SQL_FN_TD_MINUTE','%SQL_FN_TD_MONTH','%SQL_FN_TD_MONTHNAME','%SQL_FN_TD_NOW','%SQL_FN_TD_QUARTER','%SQL_FN_TD_SECOND', + '%SQL_FN_TD_TIMESTAMPADD','%SQL_FN_TD_TIMESTAMPDIFF','%SQL_FN_TD_WEEK','%SQL_FN_TD_YEAR','%SQL_FN_TSI_DAY','%SQL_FN_TSI_FRAC_SECOND','%SQL_FN_TSI_HOUR','%SQL_FN_TSI_MINUTE', + '%SQL_FN_TSI_MONTH','%SQL_FN_TSI_QUARTER','%SQL_FN_TSI_SECOND','%SQL_FN_TSI_WEEK','%SQL_FN_TSI_YEAR','%SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1','%SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2','%SQL_GB_COLLATE', + '%SQL_GB_GROUP_BY_CONTAINS_SELECT','%SQL_GB_GROUP_BY_EQUALS_SELECT','%SQL_GB_NOT_SUPPORTED','%SQL_GB_NO_RELATION','%SQL_GD_ANY_COLUMN','%SQL_GD_ANY_ORDER','%SQL_GD_BLOCK','%SQL_GD_BOUND', + '%SQL_GETDATA_EXTENSIONS','%SQL_GET_BOOKMARK','%SQL_GROUP_BY','%SQL_GUID','%SQL_HANDLE_DBC','%SQL_HANDLE_DESC','%SQL_HANDLE_ENV','%SQL_HANDLE_SENV', + '%SQL_HANDLE_STMT','%SQL_HOUR','%SQL_HOUR_TO_MINUTE','%SQL_HOUR_TO_SECOND','%SQL_IC_LOWER','%SQL_IC_MIXED','%SQL_IC_SENSITIVE','%SQL_IC_UPPER', + '%SQL_IDENTIFIER_CASE','%SQL_IDENTIFIER_QUOTE_CHAR','%SQL_IGNORE','%SQL_IK_ALL','%SQL_IK_ASC','%SQL_IK_DESC','%SQL_IK_NONE','%SQL_INDEX_ALL', + '%SQL_INDEX_CLUSTERED','%SQL_INDEX_HASHED','%SQL_INDEX_KEYWORDS','%SQL_INDEX_OTHER','%SQL_INDEX_UNIQUE','%SQL_INFO_FIRST','%SQL_INFO_SCHEMA_VIEWS','%SQL_INITIALLY_DEFERRED', + '%SQL_INITIALLY_IMMEDIATE','%SQL_INSENSITIVE','%SQL_INSERT_STATEMENT','%SQL_INTEGER','%SQL_INTEGRITY','%SQL_INTERVAL','%SQL_INTERVAL_DAY','%SQL_INTERVAL_DAY_TO_HOUR', + '%SQL_INTERVAL_DAY_TO_MINUTE','%SQL_INTERVAL_DAY_TO_SECOND','%SQL_INTERVAL_HOUR','%SQL_INTERVAL_HOUR_TO_MINUTE','%SQL_INTERVAL_HOUR_TO_SECOND','%SQL_INTERVAL_MINUTE','%SQL_INTERVAL_MINUTE_TO_SECOND','%SQL_INTERVAL_MONTH', + '%SQL_INTERVAL_SECOND','%SQL_INTERVAL_YEAR','%SQL_INTERVAL_YEAR_TO_MONTH','%SQL_INVALID_HANDLE','%SQL_ISV_ASSERTIONS','%SQL_ISV_CHARACTER_SETS','%SQL_ISV_CHECK_CONSTRAINTS','%SQL_ISV_COLLATIONS', + '%SQL_ISV_COLUMNS','%SQL_ISV_COLUMN_DOMAIN_USAGE','%SQL_ISV_COLUMN_PRIVILEGES','%SQL_ISV_CONSTRAINT_COLUMN_USAGE','%SQL_ISV_CONSTRAINT_TABLE_USAGE','%SQL_ISV_DOMAINS','%SQL_ISV_DOMAIN_CONSTRAINTS','%SQL_ISV_KEY_COLUMN_USAGE', + '%SQL_ISV_REFERENTIAL_CONSTRAINTS','%SQL_ISV_SCHEMATA','%SQL_ISV_SQL_LANGUAGES','%SQL_ISV_TABLES','%SQL_ISV_TABLE_CONSTRAINTS','%SQL_ISV_TABLE_PRIVILEGES','%SQL_ISV_TRANSLATIONS','%SQL_ISV_USAGE_PRIVILEGES', + '%SQL_ISV_VIEWS','%SQL_ISV_VIEW_COLUMN_USAGE','%SQL_ISV_VIEW_TABLE_USAGE','%SQL_IS_DAY','%SQL_IS_DAY_TO_HOUR','%SQL_IS_DAY_TO_MINUTE','%SQL_IS_DAY_TO_SECOND','%SQL_IS_HOUR', + '%SQL_IS_HOUR_TO_MINUTE','%SQL_IS_HOUR_TO_SECOND','%SQL_IS_INSERT_LITERALS','%SQL_IS_INSERT_SEARCHED','%SQL_IS_INTEGER','%SQL_IS_MINUTE','%SQL_IS_MINUTE_TO_SECOND','%SQL_IS_MONTH', + '%SQL_IS_POINTER','%SQL_IS_SECOND','%SQL_IS_SELECT_INTO','%SQL_IS_SMALLINT','%SQL_IS_UINTEGER','%SQL_IS_USMALLINT','%SQL_IS_YEAR','%SQL_IS_YEAR_TO_MONTH', + '%SQL_KEYSET_CURSOR_ATTRIBUTES1','%SQL_KEYSET_CURSOR_ATTRIBUTES2','%SQL_KEYSET_SIZE','%SQL_KEYSET_SIZE_DEFAULT','%SQL_KEYWORDS','%SQL_LCK_EXCLUSIVE','%SQL_LCK_NO_CHANGE','%SQL_LCK_UNLOCK', + '%SQL_LEN_BINARY_ATTR_OFFSET','%SQL_LEN_DATA_AT_EXEC_OFFSET','%SQL_LIKE_ESCAPE_CLAUSE','%SQL_LIKE_ONLY','%SQL_LOCK_EXCLUSIVE','%SQL_LOCK_NO_CHANGE','%SQL_LOCK_TYPES','%SQL_LOCK_UNLOCK', + '%SQL_LOGIN_TIMEOUT','%SQL_LOGIN_TIMEOUT_DEFAULT','%SQL_LONGVARBINARY','%SQL_LONGVARCHAR','%SQL_MAXIMUM_CATALOG_NAME_LENGTH','%SQL_MAXIMUM_COLUMNS_IN_GROUP_BY','%SQL_MAXIMUM_COLUMNS_IN_INDEX','%SQL_MAXIMUM_COLUMNS_IN_ORDER_BY', + '%SQL_MAXIMUM_COLUMNS_IN_SELECT','%SQL_MAXIMUM_COLUMN_NAME_LENGTH','%SQL_MAXIMUM_CONCURRENT_ACTIVITIES','%SQL_MAXIMUM_CURSOR_NAME_LENGTH','%SQL_MAXIMUM_DRIVER_CONNECTIONS','%SQL_MAXIMUM_IDENTIFIER_LENGTH','%SQL_MAXIMUM_INDEX_SIZE','%SQL_MAXIMUM_ROW_SIZE', + '%SQL_MAXIMUM_SCHEMA_NAME_LENGTH','%SQL_MAXIMUM_STATEMENT_LENGTH','%SQL_MAXIMUM_TABLES_IN_SELECT','%SQL_MAXIMUM_USER_NAME_LENGTH','%SQL_MAX_ASYNC_CONCURRENT_STATEMENTS','%SQL_MAX_BINARY_LITERAL_LEN','%SQL_MAX_CATALOG_NAME_LEN','%SQL_MAX_CHAR_LITERAL_LEN', + '%SQL_MAX_COLUMNS_IN_GROUP_BY','%SQL_MAX_COLUMNS_IN_INDEX','%SQL_MAX_COLUMNS_IN_ORDER_BY','%SQL_MAX_COLUMNS_IN_SELECT','%SQL_MAX_COLUMNS_IN_TABLE','%SQL_MAX_COLUMN_NAME_LEN','%SQL_MAX_CONCURRENT_ACTIVITIES','%SQL_MAX_CURSOR_NAME_LEN', + '%SQL_MAX_DRIVER_CONNECTIONS','%SQL_MAX_DSN_LENGTH','%SQL_MAX_IDENTIFIER_LEN','%SQL_MAX_INDEX_SIZE','%SQL_MAX_LENGTH','%SQL_MAX_LENGTH_DEFAULT','%SQL_MAX_MESSAGE_LENGTH','%SQL_MAX_NUMERIC_LEN', + '%SQL_MAX_OPTION_STRING_LENGTH','%SQL_MAX_OWNER_NAME_LEN','%SQL_MAX_PROCEDURE_NAME_LEN','%SQL_MAX_QUALIFIER_NAME_LEN','%SQL_MAX_ROWS','%SQL_MAX_ROWS_DEFAULT','%SQL_MAX_ROW_SIZE','%SQL_MAX_ROW_SIZE_INCLUDES_LONG', + '%SQL_MAX_SCHEMA_NAME_LEN','%SQL_MAX_STATEMENT_LEN','%SQL_MAX_TABLES_IN_SELECT','%SQL_MAX_TABLE_NAME_LEN','%SQL_MAX_USER_NAME_LEN','%SQL_MINUTE','%SQL_MINUTE_TO_SECOND','%SQL_MODE_DEFAULT', + '%SQL_MODE_READ_ONLY','%SQL_MODE_READ_WRITE','%SQL_MONTH','%SQL_MULTIPLE_ACTIVE_TXN','%SQL_MULT_RESULT_SETS','%SQL_NAMED','%SQL_NC_END','%SQL_NC_HIGH', + '%SQL_NC_LOW','%SQL_NC_START','%SQL_NEED_DATA','%SQL_NEED_LONG_DATA_LEN','%SQL_NNC_NON_NULL','%SQL_NNC_NULL','%SQL_NONSCROLLABLE','%SQL_NON_NULLABLE_COLUMNS', + '%SQL_NOSCAN','%SQL_NOSCAN_DEFAULT','%SQL_NOSCAN_OFF','%SQL_NOSCAN_ON','%SQL_NOT_DEFERRABLE','%SQL_NO_ACTION','%SQL_NO_COLUMN_NUMBER','%SQL_NO_DATA', + '%SQL_NO_DATA_FOUND','%SQL_NO_NULLS','%SQL_NO_ROW_NUMBER','%SQL_NO_TOTAL','%SQL_NTS','%SQL_NTSL','%SQL_NULLABLE','%SQL_NULLABLE_UNKNOWN', + '%SQL_NULL_COLLATION','%SQL_NULL_DATA','%SQL_NULL_HANDLE','%SQL_NULL_HDBC','%SQL_NULL_HDESC','%SQL_NULL_HENV','%SQL_NULL_HSTMT','%SQL_NUMERIC', + '%SQL_NUMERIC_FUNCTIONS','%SQL_OAC_LEVEL1','%SQL_OAC_LEVEL2','%SQL_OAC_NONE','%SQL_ODBC_API_CONFORMANCE','%SQL_ODBC_CURSORS','%SQL_ODBC_INTERFACE_CONFORMANCE','%SQL_ODBC_SAG_CLI_CONFORMANCE', + '%SQL_ODBC_SQL_CONFORMANCE','%SQL_ODBC_SQL_OPT_IEF','%SQL_ODBC_VER','%SQL_OIC_CORE','%SQL_OIC_LEVEL1','%SQL_OIC_LEVEL2','%SQL_OJ_ALL_COMPARISON_OPS','%SQL_OJ_CAPABILITIES', + '%SQL_OJ_FULL','%SQL_OJ_INNER','%SQL_OJ_LEFT','%SQL_OJ_NESTED','%SQL_OJ_NOT_ORDERED','%SQL_OJ_RIGHT','%SQL_OPT_TRACE','%SQL_OPT_TRACEFILE', + '%SQL_OPT_TRACE_DEFAULT','%SQL_OPT_TRACE_OFF','%SQL_OPT_TRACE_ON','%SQL_ORDER_BY_COLUMNS_IN_SELECT','%SQL_OSCC_COMPLIANT','%SQL_OSCC_NOT_COMPLIANT','%SQL_OSC_CORE','%SQL_OSC_EXTENDED', + '%SQL_OSC_MINIMUM','%SQL_OUTER_JOINS','%SQL_OUTER_JOIN_CAPABILITIES','%SQL_OU_DML_STATEMENTS','%SQL_OU_INDEX_DEFINITION','%SQL_OU_PRIVILEGE_DEFINITION','%SQL_OU_PROCEDURE_INVOCATION','%SQL_OU_TABLE_DEFINITION', + '%SQL_OV_ODBC2','%SQL_OV_ODBC3','%SQL_OWNER_TERM','%SQL_OWNER_USAGE','%SQL_PACKET_SIZE','%SQL_PARAM_ARRAY_ROW_COUNTS','%SQL_PARAM_ARRAY_SELECTS','%SQL_PARAM_BIND_BY_COLUMN', + '%SQL_PARAM_BIND_TYPE_DEFAULT','%SQL_PARAM_DIAG_UNAVAILABLE','%SQL_PARAM_ERROR','%SQL_PARAM_IGNORE','%SQL_PARAM_INPUT','%SQL_PARAM_INPUT_OUTPUT','%SQL_PARAM_OUTPUT','%SQL_PARAM_PROCEED', + '%SQL_PARAM_SUCCESS','%SQL_PARAM_SUCCESS_WITH_INFO','%SQL_PARAM_TYPE_DEFAULT','%SQL_PARAM_TYPE_UNKNOWN','%SQL_PARAM_UNUSED','%SQL_PARC_BATCH','%SQL_PARC_NO_BATCH','%SQL_PAS_BATCH', + '%SQL_PAS_NO_BATCH','%SQL_PAS_NO_SELECT','%SQL_PC_NON_PSEUDO','%SQL_PC_NOT_PSEUDO','%SQL_PC_PSEUDO','%SQL_PC_UNKNOWN','%SQL_POSITION','%SQL_POSITIONED_STATEMENTS', + '%SQL_POS_ADD','%SQL_POS_DELETE','%SQL_POS_OPERATIONS','%SQL_POS_POSITION','%SQL_POS_REFRESH','%SQL_POS_UPDATE','%SQL_PRED_BASIC','%SQL_PRED_CHAR', + '%SQL_PRED_NONE','%SQL_PRED_SEARCHABLE','%SQL_PROCEDURES','%SQL_PROCEDURE_TERM','%SQL_PS_POSITIONED_DELETE','%SQL_PS_POSITIONED_UPDATE','%SQL_PS_SELECT_FOR_UPDATE','%SQL_PT_FUNCTION', + '%SQL_PT_PROCEDURE','%SQL_PT_UNKNOWN','%SQL_QL_END','%SQL_QL_START','%SQL_QUALIFIER_LOCATION','%SQL_QUALIFIER_NAME_SEPARATOR','%SQL_QUALIFIER_TERM','%SQL_QUALIFIER_USAGE', + '%SQL_QUERY_TIMEOUT','%SQL_QUERY_TIMEOUT_DEFAULT','%SQL_QUICK','%SQL_QUIET_MODE','%SQL_QUOTED_IDENTIFIER_CASE','%SQL_QU_DML_STATEMENTS','%SQL_QU_INDEX_DEFINITION','%SQL_QU_PRIVILEGE_DEFINITION', + '%SQL_QU_PROCEDURE_INVOCATION','%SQL_QU_TABLE_DEFINITION','%SQL_RD_DEFAULT','%SQL_RD_OFF','%SQL_RD_ON','%SQL_REAL','%SQL_REFRESH','%SQL_RESET_PARAMS', + '%SQL_RESTRICT','%SQL_RESULT_COL','%SQL_RETRIEVE_DATA','%SQL_RETURN_VALUE','%SQL_ROLLBACK','%SQL_ROWSET_SIZE','%SQL_ROWSET_SIZE_DEFAULT','%SQL_ROWVER', + '%SQL_ROW_ADDED','%SQL_ROW_DELETED','%SQL_ROW_ERROR','%SQL_ROW_IDENTIFIER','%SQL_ROW_IGNORE','%SQL_ROW_NOROW','%SQL_ROW_NUMBER','%SQL_ROW_NUMBER_UNKNOWN', + '%SQL_ROW_PROCEED','%SQL_ROW_SUCCESS','%SQL_ROW_SUCCESS_WITH_INFO','%SQL_ROW_UPDATED','%SQL_ROW_UPDATES','%SQL_SCCO_LOCK','%SQL_SCCO_OPT_ROWVER','%SQL_SCCO_OPT_TIMESTAMP', + '%SQL_SCCO_OPT_VALUES','%SQL_SCCO_READ_ONLY','%SQL_SCC_ISO92_CLI','%SQL_SCC_XOPEN_CLI_VERSION1','%SQL_SCHEMA_TERM','%SQL_SCHEMA_USAGE','%SQL_SCOPE_CURROW','%SQL_SCOPE_SESSION', + '%SQL_SCOPE_TRANSACTION','%SQL_SCROLLABLE','%SQL_SCROLL_CONCURRENCY','%SQL_SCROLL_DYNAMIC','%SQL_SCROLL_FORWARD_ONLY','%SQL_SCROLL_KEYSET_DRIVEN','%SQL_SCROLL_OPTIONS','%SQL_SCROLL_STATIC', + '%SQL_SC_FIPS127_2_TRANSITIONAL','%SQL_SC_NON_UNIQUE','%SQL_SC_SQL92_ENTRY','%SQL_SC_SQL92_FULL','%SQL_SC_SQL92_INTERMEDIATE','%SQL_SC_TRY_UNIQUE','%SQL_SC_UNIQUE','%SQL_SDF_CURRENT_DATE', + '%SQL_SDF_CURRENT_TIME','%SQL_SDF_CURRENT_TIMESTAMP','%SQL_SEARCHABLE','%SQL_SEARCH_PATTERN_ESCAPE','%SQL_SECOND','%SQL_SENSITIVE','%SQL_SERVER_NAME','%SQL_SETPARAM_VALUE_MAX', + '%SQL_SETPOS_MAX_LOCK_VALUE','%SQL_SETPOS_MAX_OPTION_VALUE','%SQL_SET_DEFAULT','%SQL_SET_NULL','%SQL_SFKD_CASCADE','%SQL_SFKD_NO_ACTION','%SQL_SFKD_SET_DEFAULT','%SQL_SFKD_SET_NULL', + '%SQL_SFKU_CASCADE','%SQL_SFKU_NO_ACTION','%SQL_SFKU_SET_DEFAULT','%SQL_SFKU_SET_NULL','%SQL_SG_DELETE_TABLE','%SQL_SG_INSERT_COLUMN','%SQL_SG_INSERT_TABLE','%SQL_SG_REFERENCES_COLUMN', + '%SQL_SG_REFERENCES_TABLE','%SQL_SG_SELECT_TABLE','%SQL_SG_UPDATE_COLUMN','%SQL_SG_UPDATE_TABLE','%SQL_SG_USAGE_ON_CHARACTER_SET','%SQL_SG_USAGE_ON_COLLATION','%SQL_SG_USAGE_ON_DOMAIN','%SQL_SG_USAGE_ON_TRANSLATION', + '%SQL_SG_WITH_GRANT_OPTION','%SQL_SIGNED_OFFSET','%SQL_SIMULATE_CURSOR','%SQL_SMALLINT','%SQL_SNVF_BIT_LENGTH','%SQL_SNVF_CHARACTER_LENGTH','%SQL_SNVF_CHAR_LENGTH','%SQL_SNVF_EXTRACT', + '%SQL_SNVF_OCTET_LENGTH','%SQL_SNVF_POSITION','%SQL_SO_DYNAMIC','%SQL_SO_FORWARD_ONLY','%SQL_SO_KEYSET_DRIVEN','%SQL_SO_MIXED','%SQL_SO_STATIC','%SQL_SPECIAL_CHARACTERS', + '%SQL_SPEC_MAJOR','%SQL_SPEC_MINOR','%SQL_SP_BETWEEN','%SQL_SP_COMPARISON','%SQL_SP_EXISTS','%SQL_SP_IN','%SQL_SP_ISNOTNULL','%SQL_SP_ISNULL', + '%SQL_SP_LIKE','%SQL_SP_MATCH_FULL','%SQL_SP_MATCH_PARTIAL','%SQL_SP_MATCH_UNIQUE_FULL','%SQL_SP_MATCH_UNIQUE_PARTIAL','%SQL_SP_OVERLAPS','%SQL_SP_QUANTIFIED_COMPARISON','%SQL_SP_UNIQUE', + '%SQL_SQL92_DATETIME_FUNCTIONS','%SQL_SQL92_FOREIGN_KEY_DELETE_RULE','%SQL_SQL92_FOREIGN_KEY_UPDATE_RULE','%SQL_SQL92_GRANT','%SQL_SQL92_NUMERIC_VALUE_FUNCTIONS','%SQL_SQL92_PREDICATES','%SQL_SQL92_RELATIONAL_JOIN_OPERATORS','%SQL_SQL92_REVOKE', + '%SQL_SQL92_ROW_VALUE_CONSTRUCTOR','%SQL_SQL92_STRING_FUNCTIONS','%SQL_SQL92_VALUE_EXPRESSIONS','%SQL_SQLSTATE_SIZE','%SQL_SQL_CONFORMANCE','%SQL_SQ_COMPARISON','%SQL_SQ_CORRELATED_SUBQUERIES','%SQL_SQ_EXISTS', + '%SQL_SQ_IN','%SQL_SQ_QUANTIFIED','%SQL_SRJO_CORRESPONDING_CLAUSE','%SQL_SRJO_CROSS_JOIN','%SQL_SRJO_EXCEPT_JOIN','%SQL_SRJO_FULL_OUTER_JOIN','%SQL_SRJO_INNER_JOIN','%SQL_SRJO_INTERSECT_JOIN', + '%SQL_SRJO_LEFT_OUTER_JOIN','%SQL_SRJO_NATURAL_JOIN','%SQL_SRJO_RIGHT_OUTER_JOIN','%SQL_SRJO_UNION_JOIN','%SQL_SRVC_DEFAULT','%SQL_SRVC_NULL','%SQL_SRVC_ROW_SUBQUERY','%SQL_SRVC_VALUE_EXPRESSION', + '%SQL_SR_CASCADE','%SQL_SR_DELETE_TABLE','%SQL_SR_GRANT_OPTION_FOR','%SQL_SR_INSERT_COLUMN','%SQL_SR_INSERT_TABLE','%SQL_SR_REFERENCES_COLUMN','%SQL_SR_REFERENCES_TABLE','%SQL_SR_RESTRICT', + '%SQL_SR_SELECT_TABLE','%SQL_SR_UPDATE_COLUMN','%SQL_SR_UPDATE_TABLE','%SQL_SR_USAGE_ON_CHARACTER_SET','%SQL_SR_USAGE_ON_COLLATION','%SQL_SR_USAGE_ON_DOMAIN','%SQL_SR_USAGE_ON_TRANSLATION','%SQL_SSF_CONVERT', + '%SQL_SSF_LOWER','%SQL_SSF_SUBSTRING','%SQL_SSF_TRANSLATE','%SQL_SSF_TRIM_BOTH','%SQL_SSF_TRIM_LEADING','%SQL_SSF_TRIM_TRAILING','%SQL_SSF_UPPER','%SQL_SS_ADDITIONS', + '%SQL_SS_DELETIONS','%SQL_SS_UPDATES','%SQL_STANDARD_CLI_CONFORMANCE','%SQL_STATIC_CURSOR_ATTRIBUTES1','%SQL_STATIC_CURSOR_ATTRIBUTES2','%SQL_STATIC_SENSITIVITY','%SQL_STILL_EXECUTING','%SQL_STRING_FUNCTIONS', + '%SQL_SUBQUERIES','%SQL_SUCCESS','%SQL_SUCCESS_WITH_INFO','%SQL_SU_DML_STATEMENTS','%SQL_SU_INDEX_DEFINITION','%SQL_SU_PRIVILEGE_DEFINITION','%SQL_SU_PROCEDURE_INVOCATION','%SQL_SU_TABLE_DEFINITION', + '%SQL_SVE_CASE','%SQL_SVE_CAST','%SQL_SVE_COALESCE','%SQL_SVE_NULLIF','%SQL_SYSTEM_FUNCTIONS','%SQL_TABLE_STAT','%SQL_TABLE_TERM','%SQL_TC_ALL', + '%SQL_TC_DDL_COMMIT','%SQL_TC_DDL_IGNORE','%SQL_TC_DML','%SQL_TC_NONE','%SQL_TIME','%SQL_TIMEDATE_ADD_INTERVALS','%SQL_TIMEDATE_DIFF_INTERVALS','%SQL_TIMEDATE_FUNCTIONS', + '%SQL_TIMESTAMP','%SQL_TIMESTAMP_LEN','%SQL_TIME_LEN','%SQL_TINYINT','%SQL_TRANSACTION_CAPABLE','%SQL_TRANSACTION_ISOLATION_OPTION','%SQL_TRANSACTION_READ_COMMITTED','%SQL_TRANSACTION_READ_UNCOMMITTED', + '%SQL_TRANSACTION_REPEATABLE_READ','%SQL_TRANSACTION_SERIALIZABLE','%SQL_TRANSLATE_DLL','%SQL_TRANSLATE_OPTION','%SQL_TRUE','%SQL_TXN_CAPABLE','%SQL_TXN_ISOLATION','%SQL_TXN_ISOLATION_OPTION', + '%SQL_TXN_READ_COMMITTED','%SQL_TXN_READ_UNCOMMITTED','%SQL_TXN_REPEATABLE_READ','%SQL_TXN_SERIALIZABLE','%SQL_TYPE_DATE','%SQL_TYPE_NULL','%SQL_TYPE_TIME','%SQL_TYPE_TIMESTAMP', + '%SQL_UB_DEFAULT','%SQL_UB_FIXED','%SQL_UB_OFF','%SQL_UB_ON','%SQL_UB_VARIABLE','%SQL_UNBIND','%SQL_UNICODE','%SQL_UNICODE_CHAR', + '%SQL_UNICODE_LONGVARCHAR','%SQL_UNICODE_VARCHAR','%SQL_UNION','%SQL_UNION_STATEMENT','%SQL_UNKNOWN_TYPE','%SQL_UNNAMED','%SQL_UNSEARCHABLE','%SQL_UNSIGNED_OFFSET', + '%SQL_UNSPECIFIED','%SQL_UPDATE','%SQL_UPDATE_BY_BOOKMARK','%SQL_USER_NAME','%SQL_USE_BOOKMARKS','%SQL_US_UNION','%SQL_US_UNION_ALL','%SQL_U_UNION', + '%SQL_U_UNION_ALL','%SQL_VARBINARY','%SQL_VARCHAR','%SQL_XOPEN_CLI_YEAR','%SQL_YEAR','%SQL_YEAR_TO_MONTH','%SRCCOPY','%SS_BITMAP', + '%SS_BLACKFRAME','%SS_BLACKRECT','%SS_CENTER','%SS_CENTERIMAGE','%SS_ENDELLIPSIS','%SS_ETCHEDFRAME','%SS_ETCHEDHORZ','%SS_ETCHEDVERT', + '%SS_GRAYFRAME','%SS_GRAYRECT','%SS_LEFT','%SS_NOPREFIX','%SS_NOTIFY','%SS_NOWORDWRAP','%SS_PATHELLIPSIS','%SS_RIGHT', + '%SS_RIGHTJUST','%SS_SIMPLE','%SS_SUNKEN','%SS_WHITEFRAME','%SS_WHITERECT','%SS_WORDELLIPSIS','%STAT_FILL_FROM_MEMORY','%STAT_FILL_NATURAL', + '%STAT_FILL_NATURAL_ERASTONE','%STAT_FILL_NATURAL_EVEN','%STAT_FILL_NATURAL_FIBONACCI','%STAT_FILL_NATURAL_ODD','%STAT_FILL_WITH_NUMBER','%STAT_MINMAX_INDEX','%STAT_MINMAX_VALUE','%STAT_TYPE_BYTE', + '%STAT_TYPE_CURRENCY','%STAT_TYPE_DOUBLE','%STAT_TYPE_DWORD','%STAT_TYPE_EXT','%STAT_TYPE_INTEGER','%STAT_TYPE_LONG','%STAT_TYPE_QUAD','%STAT_TYPE_SINGLE', + '%STAT_TYPE_WORD','%SWP_ASYNCWINDOWPOS','%SWP_DEFERERASE','%SWP_DRAWFRAME','%SWP_FRAMECHANGED','%SWP_HIDEWINDOW','%SWP_NOACTIVATE','%SWP_NOCOPYBITS', + '%SWP_NOMOVE','%SWP_NOOWNERZORDER','%SWP_NOREDRAW','%SWP_NOREPOSITION','%SWP_NOSENDCHANGING','%SWP_NOSIZE','%SWP_NOZORDER','%SWP_SHOWWINDOW', + '%SW_FORCEMINIMIZE','%SW_HIDE','%SW_MAXIMIZE','%SW_MINIMIZE','%SW_NORMAL','%SW_RESTORE','%SW_SHOW','%SW_SHOWDEFAULT', + '%SW_SHOWMAXIMIZED','%SW_SHOWMINIMIZED','%SW_SHOWMINNOACTIVE','%SW_SHOWNA','%SW_SHOWNOACTIVATE','%SW_SHOWNORMAL','%TBASS_3DALG_DEFAULT','%TBASS_3DALG_FULL', + '%TBASS_3DALG_LIGHT','%TBASS_3DALG_OFF','%TBASS_3DMODE_NORMAL','%TBASS_3DMODE_OFF','%TBASS_3DMODE_RELATIVE','%TBASS_ACTIVE_PAUSED','%TBASS_ACTIVE_PLAYING','%TBASS_ACTIVE_STALLED', + '%TBASS_ACTIVE_STOPPED','%TBASS_CONFIG_3DALGORITHM','%TBASS_CONFIG_BUFFER','%TBASS_CONFIG_CURVE_PAN','%TBASS_CONFIG_CURVE_VOL','%TBASS_CONFIG_FLOATDSP','%TBASS_CONFIG_GVOL_MUSIC','%TBASS_CONFIG_GVOL_SAMPLE', + '%TBASS_CONFIG_GVOL_STREAM','%TBASS_CONFIG_MAXVOL','%TBASS_CONFIG_MP3_CODEC','%TBASS_CONFIG_NET_AGENT','%TBASS_CONFIG_NET_BUFFER','%TBASS_CONFIG_NET_PASSIVE','%TBASS_CONFIG_NET_PREBUF','%TBASS_CONFIG_NET_PROXY', + '%TBASS_CONFIG_NET_TIMEOUT','%TBASS_CONFIG_PAUSE_NOPLAY','%TBASS_CONFIG_UPDATEPERIOD','%TBASS_CTYPE_MUSIC_IT','%TBASS_CTYPE_MUSIC_MO3','%TBASS_CTYPE_MUSIC_MOD','%TBASS_CTYPE_MUSIC_MTM','%TBASS_CTYPE_MUSIC_S3M', + '%TBASS_CTYPE_MUSIC_XM','%TBASS_CTYPE_RECORD','%TBASS_CTYPE_SAMPLE','%TBASS_CTYPE_STREAM','%TBASS_CTYPE_STREAM_AIFF','%TBASS_CTYPE_STREAM_MP1','%TBASS_CTYPE_STREAM_MP2','%TBASS_CTYPE_STREAM_MP3', + '%TBASS_CTYPE_STREAM_OGG','%TBASS_CTYPE_STREAM_WAV','%TBASS_CTYPE_STREAM_WAV_FLOAT','%TBASS_CTYPE_STREAM_WAV_PCM','%TBASS_DATA_AVAILABLE','%TBASS_DATA_FFT1024','%TBASS_DATA_FFT2048','%TBASS_DATA_FFT4096', + '%TBASS_DATA_FFT512','%TBASS_DATA_FFT_INDIVIDUAL','%TBASS_DATA_FFT_NOWINDOW','%TBASS_DATA_FLOAT','%TBASS_DEVICE_3D','%TBASS_DEVICE_8BITS','%TBASS_DEVICE_LATENCY','%TBASS_DEVICE_MONO', + '%TBASS_DEVICE_NOSPEAKER','%TBASS_DEVICE_SPEAKERS','%TBASS_EAX_ENVIRONMENT_ALLEY','%TBASS_EAX_ENVIRONMENT_ARENA','%TBASS_EAX_ENVIRONMENT_AUDITORIUM','%TBASS_EAX_ENVIRONMENT_BATHROOM','%TBASS_EAX_ENVIRONMENT_CARPETEDHALLWAY','%TBASS_EAX_ENVIRONMENT_CAVE', + '%TBASS_EAX_ENVIRONMENT_CITY','%TBASS_EAX_ENVIRONMENT_CONCERTHALL','%TBASS_EAX_ENVIRONMENT_COUNT','%TBASS_EAX_ENVIRONMENT_DIZZY','%TBASS_EAX_ENVIRONMENT_DRUGGED','%TBASS_EAX_ENVIRONMENT_FOREST','%TBASS_EAX_ENVIRONMENT_GENERIC','%TBASS_EAX_ENVIRONMENT_HALLWAY', + '%TBASS_EAX_ENVIRONMENT_HANGAR','%TBASS_EAX_ENVIRONMENT_LIVINGROOM','%TBASS_EAX_ENVIRONMENT_MOUNTAINS','%TBASS_EAX_ENVIRONMENT_PADDEDCELL','%TBASS_EAX_ENVIRONMENT_PARKINGLOT','%TBASS_EAX_ENVIRONMENT_PLAIN','%TBASS_EAX_ENVIRONMENT_PSYCHOTIC','%TBASS_EAX_ENVIRONMENT_QUARRY', + '%TBASS_EAX_ENVIRONMENT_ROOM','%TBASS_EAX_ENVIRONMENT_SEWERPIPE','%TBASS_EAX_ENVIRONMENT_STONECORRIDOR','%TBASS_EAX_ENVIRONMENT_STONEROOM','%TBASS_EAX_ENVIRONMENT_UNDERWATER','%TBASS_ERROR_ALREADY','%TBASS_ERROR_BUFLOST','%TBASS_ERROR_CODEC', + '%TBASS_ERROR_CREATE','%TBASS_ERROR_DECODE','%TBASS_ERROR_DEVICE','%TBASS_ERROR_DRIVER','%TBASS_ERROR_DX','%TBASS_ERROR_EMPTY','%TBASS_ERROR_FILEFORM','%TBASS_ERROR_FILEOPEN', + '%TBASS_ERROR_FORMAT','%TBASS_ERROR_FREQ','%TBASS_ERROR_HANDLE','%TBASS_ERROR_ILLPARAM','%TBASS_ERROR_ILLTYPE','%TBASS_ERROR_INIT','%TBASS_ERROR_MEM','%TBASS_ERROR_NO3D', + '%TBASS_ERROR_NOCHAN','%TBASS_ERROR_NOEAX','%TBASS_ERROR_NOFX','%TBASS_ERROR_NOHW','%TBASS_ERROR_NONET','%TBASS_ERROR_NOPAUSE','%TBASS_ERROR_NOPLAY','%TBASS_ERROR_NOTAVAIL', + '%TBASS_ERROR_NOTFILE','%TBASS_ERROR_PLAYING','%TBASS_ERROR_POSITION','%TBASS_ERROR_SPEAKER','%TBASS_ERROR_START','%TBASS_ERROR_TIMEOUT','%TBASS_ERROR_UNKNOWN','%TBASS_ERROR_VERSION', + '%TBASS_FALSE','%TBASS_FILEPOS_CURRENT','%TBASS_FILEPOS_DECODE','%TBASS_FILEPOS_DOWNLOAD','%TBASS_FILEPOS_END','%TBASS_FILEPOS_START','%TBASS_FILE_CLOSE','%TBASS_FILE_LEN', + '%TBASS_FILE_READ','%TBASS_FILE_SEEK','%TBASS_FX_CHORUS','%TBASS_FX_COMPRESSOR','%TBASS_FX_DISTORTION','%TBASS_FX_ECHO','%TBASS_FX_FLANGER','%TBASS_FX_GARGLE', + '%TBASS_FX_I3DL2REVERB','%TBASS_FX_PARAMEQ','%TBASS_FX_PHASE_180','%TBASS_FX_PHASE_90','%TBASS_FX_PHASE_NEG_180','%TBASS_FX_PHASE_NEG_90','%TBASS_FX_PHASE_ZERO','%TBASS_FX_REVERB', + '%TBASS_INPUT_LEVEL','%TBASS_INPUT_OFF','%TBASS_INPUT_ON','%TBASS_INPUT_TYPE_ANALOG','%TBASS_INPUT_TYPE_AUX','%TBASS_INPUT_TYPE_CD','%TBASS_INPUT_TYPE_DIGITAL','%TBASS_INPUT_TYPE_LINE', + '%TBASS_INPUT_TYPE_MASK','%TBASS_INPUT_TYPE_MIC','%TBASS_INPUT_TYPE_PHONE','%TBASS_INPUT_TYPE_SPEAKER','%TBASS_INPUT_TYPE_SYNTH','%TBASS_INPUT_TYPE_UNDEF','%TBASS_INPUT_TYPE_WAVE','%TBASS_MP3_SETPOS', + '%TBASS_MUSIC_3D','%TBASS_MUSIC_ATTRIB_AMPLIFY','%TBASS_MUSIC_ATTRIB_BPM','%TBASS_MUSIC_ATTRIB_PANSEP','%TBASS_MUSIC_ATTRIB_PSCALER','%TBASS_MUSIC_ATTRIB_SPEED','%TBASS_MUSIC_ATTRIB_VOL_CHAN','%TBASS_MUSIC_ATTRIB_VOL_GLOBAL', + '%TBASS_MUSIC_ATTRIB_VOL_INST','%TBASS_MUSIC_AUTOFREE','%TBASS_MUSIC_CALCLEN','%TBASS_MUSIC_DECODE','%TBASS_MUSIC_FLOAT','%TBASS_MUSIC_FT2MOD','%TBASS_MUSIC_FX','%TBASS_MUSIC_LOOP', + '%TBASS_MUSIC_MONO','%TBASS_MUSIC_NONINTER','%TBASS_MUSIC_NOSAMPLE','%TBASS_MUSIC_POSRESET','%TBASS_MUSIC_POSRESETEX','%TBASS_MUSIC_PRESCAN','%TBASS_MUSIC_PT1MOD','%TBASS_MUSIC_RAMP', + '%TBASS_MUSIC_RAMPS','%TBASS_MUSIC_STOPBACK','%TBASS_MUSIC_SURROUND','%TBASS_MUSIC_SURROUND2','%TBASS_OBJECT_DS','%TBASS_OBJECT_DS3DL','%TBASS_OK','%TBASS_RECORD_PAUSE', + '%TBASS_SAMPLE_3D','%TBASS_SAMPLE_8BITS','%TBASS_SAMPLE_FLOAT','%TBASS_SAMPLE_FX','%TBASS_SAMPLE_LOOP','%TBASS_SAMPLE_MONO','%TBASS_SAMPLE_MUTEMAX','%TBASS_SAMPLE_OVER_DIST', + '%TBASS_SAMPLE_OVER_POS','%TBASS_SAMPLE_OVER_VOL','%TBASS_SAMPLE_SOFTWARE','%TBASS_SAMPLE_VAM','%TBASS_SLIDE_FREQ','%TBASS_SLIDE_PAN','%TBASS_SLIDE_VOL','%TBASS_SPEAKER_CENLFE', + '%TBASS_SPEAKER_CENTER','%TBASS_SPEAKER_FRONT','%TBASS_SPEAKER_FRONTLEFT','%TBASS_SPEAKER_FRONTRIGHT','%TBASS_SPEAKER_LEFT','%TBASS_SPEAKER_LFE','%TBASS_SPEAKER_REAR','%TBASS_SPEAKER_REAR2', + '%TBASS_SPEAKER_REAR2LEFT','%TBASS_SPEAKER_REAR2RIGHT','%TBASS_SPEAKER_REARLEFT','%TBASS_SPEAKER_REARRIGHT','%TBASS_SPEAKER_RIGHT','%TBASS_STREAMPROC_END','%TBASS_STREAM_AUTOFREE','%TBASS_STREAM_BLOCK', + '%TBASS_STREAM_DECODE','%TBASS_STREAM_PRESCAN','%TBASS_STREAM_RESTRATE','%TBASS_STREAM_STATUS','%TBASS_SYNC_DOWNLOAD','%TBASS_SYNC_END','%TBASS_SYNC_FREE','%TBASS_SYNC_MESSAGE', + '%TBASS_SYNC_META','%TBASS_SYNC_MIXTIME','%TBASS_SYNC_MUSICFX','%TBASS_SYNC_MUSICINST','%TBASS_SYNC_MUSICPOS','%TBASS_SYNC_ONETIME','%TBASS_SYNC_POS','%TBASS_SYNC_SLIDE', + '%TBASS_SYNC_STALL','%TBASS_TAG_HTTP','%TBASS_TAG_ICY','%TBASS_TAG_ID3','%TBASS_TAG_ID3V2','%TBASS_TAG_META','%TBASS_TAG_MUSIC_INST','%TBASS_TAG_MUSIC_MESSAGE', + '%TBASS_TAG_MUSIC_NAME','%TBASS_TAG_MUSIC_SAMPLE','%TBASS_TAG_OGG','%TBASS_TAG_RIFF_INFO','%TBASS_TAG_VENDOR','%TBASS_TRUE','%TBASS_UNICODE','%TBASS_VAM_HARDWARE', + '%TBASS_VAM_SOFTWARE','%TBASS_VAM_TERM_DIST','%TBASS_VAM_TERM_PRIO','%TBASS_VAM_TERM_TIME','%TBASS_VERSION','%TBCD_CHANNEL','%TBCD_THUMB','%TBCD_TICS', + '%TBGL_ALIGN_CENTER','%TBGL_ALIGN_CENTER_CENTER','%TBGL_ALIGN_CENTER_DOWN','%TBGL_ALIGN_CENTER_UP','%TBGL_ALIGN_LEFT','%TBGL_ALIGN_LEFT_CENTER','%TBGL_ALIGN_LEFT_DOWN','%TBGL_ALIGN_LEFT_UP', + '%TBGL_ALIGN_RIGHT','%TBGL_ALIGN_RIGHT_CENTER','%TBGL_ALIGN_RIGHT_DOWN','%TBGL_ALIGN_RIGHT_UP','%TBGL_ALWAYS','%TBGL_EQUAL','%TBGL_ERROR_FILE','%TBGL_ERROR_MSGBOX', + '%TBGL_ERROR_NONE','%TBGL_GEQUAL','%TBGL_GREATER','%TBGL_LEQUAL','%TBGL_LESS','%TBGL_LIGHT_AMBIENT','%TBGL_LIGHT_CONSTANT_ATTENUATION','%TBGL_LIGHT_DIFFUSE', + '%TBGL_LIGHT_LINEAR_ATTENUATION','%TBGL_LIGHT_POSITION','%TBGL_LIGHT_QUADRATIC_ATTENUATION','%TBGL_LIGHT_SPECULAR','%TBGL_LIGHT_SPOT_CUTOFF','%TBGL_LIGHT_SPOT_DIRECTION','%TBGL_LIGHT_SPOT_EXPONENT','%TBGL_M15B', + '%TBGL_M15G','%TBGL_M15LAYER','%TBGL_M15PSTOP','%TBGL_M15R','%TBGL_M15TEXN','%TBGL_M15TEXX','%TBGL_M15TEXY','%TBGL_M15X', + '%TBGL_M15Y','%TBGL_M15Z','%TBGL_NEVER','%TBGL_NORMAL_NONE','%TBGL_NORMAL_PRECISE','%TBGL_NORMAL_SMOOTH','%TBGL_NOTEQUAL','%TBGL_OBJ_CUBE', + '%TBGL_OBJ_CUBE3','%TBGL_OBJ_CYLINDER','%TBGL_OBJ_SPHERE','%TBGL_PINFO_RGB','%TBGL_PINFO_XYZ','%TBGL_TEX_LINEAR','%TBGL_TEX_MIPMAP','%TBGL_TEX_NEAREST', + '%TBM_CLEARSEL','%TBM_CLEARTICS','%TBM_GETBUDDY','%TBM_GETCHANNELRECT','%TBM_GETLINESIZE','%TBM_GETNUMTICS','%TBM_GETPAGESIZE','%TBM_GETPOS', + '%TBM_GETPTICS','%TBM_GETRANGEMAX','%TBM_GETRANGEMIN','%TBM_GETSELEND','%TBM_GETSELSTART','%TBM_GETTHUMBLENGTH','%TBM_GETTHUMBRECT','%TBM_GETTIC', + '%TBM_GETTICPOS','%TBM_GETTOOLTIPS','%TBM_GETUNICODEFORMAT','%TBM_SETBUDDY','%TBM_SETLINESIZE','%TBM_SETPAGESIZE','%TBM_SETPOS','%TBM_SETRANGE', + '%TBM_SETRANGEMAX','%TBM_SETRANGEMIN','%TBM_SETSEL','%TBM_SETSELEND','%TBM_SETSELSTART','%TBM_SETTHUMBLENGTH','%TBM_SETTIC','%TBM_SETTICFREQ', + '%TBM_SETTIPSIDE','%TBM_SETTOOLTIPS','%TBM_SETUNICODEFORMAT','%TBS_AUTOTICKS','%TBS_BOTH','%TBS_BOTTOM','%TBS_DOWNISLEFT','%TBS_ENABLESELRANGE', + '%TBS_FIXEDLENGTH','%TBS_HORZ','%TBS_LEFT','%TBS_NOTHUMB','%TBS_NOTICKS','%TBS_REVERSED','%TBS_RIGHT','%TBS_TOOLTIPS', + '%TBS_TOP','%TBS_VERT','%TBTS_BOTTOM','%TBTS_LEFT','%TBTS_RIGHT','%TBTS_TOP','%TB_%VT_BSTR','%TB_%VT_CY', + '%TB_%VT_DATE','%TB_%VT_EMPTY','%TB_%VT_I2','%TB_%VT_I4','%TB_%VT_NULL','%TB_%VT_R4','%TB_%VT_R8','%TB_BOTTOM', + '%TB_CLASS_E_NOAGGREGATION','%TB_CO_E_CLASSSTRING','%TB_DISPATCH_METHOD','%TB_DISPATCH_PROPERTYGET','%TB_DISPATCH_PROPERTYPUT','%TB_DISPATCH_PROPERTYPUTREF','%TB_ENDTRACK','%TB_E_INVALIDARG', + '%TB_E_NOINTERFACE','%TB_E_OUTOFMEMORY','%TB_IMGCTX_ACTUALSIZE','%TB_IMGCTX_AUTOSIZE','%TB_IMGCTX_FITTOHEIGHT','%TB_IMGCTX_FITTOWIDTH','%TB_IMGCTX_STRETCH','%TB_LINEDOWN', + '%TB_LINEUP','%TB_MK_E_CONNECTMANUALLY','%TB_MK_E_EXCEEDEDDEADLINE','%TB_MK_E_INTERMEDIATEINTERFACENOTSUPPORTED','%TB_MK_E_NOOBJECT','%TB_MK_E_SYNTAX','%TB_PAGEDOWN','%TB_PAGEUP', + '%TB_REGDB_E_CLASSNOTREG','%TB_REGDB_E_WRITEREGDB','%TB_SIZEOF_TBVARIANT','%TB_S_FALSE','%TB_S_OK','%TB_THUMBPOSITION','%TB_THUMBTRACK','%TB_TOP', + '%TCM_FIRST','%TCM_GETCURSEL','%TCN_FOCUSCHANGE','%TCN_GETOBJECT','%TCN_SELCHANGE','%TCN_SELCHANGING','%TCS_BOTTOM','%TCS_BUTTONS', + '%TCS_EX_FLATSEPARATORS','%TCS_EX_REGISTERDROP','%TCS_FIXEDWIDTH','%TCS_FLATBUTTONS','%TCS_FOCUSNEVER','%TCS_FOCUSONBUTTONDOWN','%TCS_FORCEICONLEFT','%TCS_FORCELABELLEFT', + '%TCS_HOTTRACK','%TCS_MULTILINE','%TCS_MULTISELECT','%TCS_OWNERDRAWFIXED','%TCS_RAGGEDRIGHT','%TCS_RIGHT','%TCS_RIGHTJUSTIFY','%TCS_SCROLLOPPOSITE', + '%TCS_SINGLELINE','%TCS_TABS','%TCS_TOOLTIPS','%TCS_VERTICAL','%TM_PLAINTEXT','%TM_RICHTEXT','%TOKENIZER_DEFAULT_ALPHA','%TOKENIZER_DEFAULT_DELIM', + '%TOKENIZER_DEFAULT_DQUOTE','%TOKENIZER_DEFAULT_NEWLINE','%TOKENIZER_DEFAULT_NUMERIC','%TOKENIZER_DEFAULT_SPACE','%TOKENIZER_DELIMITER','%TOKENIZER_EOL','%TOKENIZER_ERROR','%TOKENIZER_FINISHED', + '%TOKENIZER_NUMBER','%TOKENIZER_QUOTE','%TOKENIZER_STRING','%TOKENIZER_UNDEFTOK','%TRUE','%TV_FIRST','%UDM_GETACCEL','%UDM_GETBASE', + '%UDM_GETBUDDY','%UDM_GETPOS','%UDM_GETPOS32','%UDM_GETRANGE','%UDM_GETRANGE32','%UDM_GETUNICODEFORMAT','%UDM_SETACCEL','%UDM_SETBASE', + '%UDM_SETBUDDY','%UDM_SETPOS','%UDM_SETPOS32','%UDM_SETRANGE','%UDM_SETRANGE32','%UDM_SETUNICODEFORMAT','%UDS_ALIGNLEFT','%UDS_ALIGNRIGHT', + '%UDS_ARROWKEYS','%UDS_AUTOBUDDY','%UDS_HORZ','%UDS_HOTTRACK','%UDS_NOTHOUSANDS','%UDS_SETBUDDYINT','%UDS_WRAP','%UD_MAXVAL', + '%UD_MINVAL','%VK_0','%VK_1','%VK_2','%VK_3','%VK_4','%VK_5','%VK_6', + '%VK_7','%VK_8','%VK_9','%VK_A','%VK_ACCEPT','%VK_ADD','%VK_APPS','%VK_B', + '%VK_BACK','%VK_C','%VK_CANCEL','%VK_CAPITAL','%VK_CLEAR','%VK_CONTROL','%VK_CONVERT','%VK_D', + '%VK_DECIMAL','%VK_DELETE','%VK_DIVIDE','%VK_DOWN','%VK_E','%VK_END','%VK_ESCAPE','%VK_EXECUTE', + '%VK_F','%VK_F1','%VK_F10','%VK_F11','%VK_F12','%VK_F13','%VK_F14','%VK_F15', + '%VK_F16','%VK_F17','%VK_F18','%VK_F19','%VK_F2','%VK_F20','%VK_F21','%VK_F22', + '%VK_F23','%VK_F24','%VK_F3','%VK_F4','%VK_F5','%VK_F6','%VK_F7','%VK_F8', + '%VK_F9','%VK_FINAL','%VK_G','%VK_H','%VK_HANGEUL','%VK_HANGUL','%VK_HANJA','%VK_HELP', + '%VK_HOME','%VK_I','%VK_INSERT','%VK_J','%VK_JUNJA','%VK_K','%VK_KANA','%VK_KANJI', + '%VK_L','%VK_LBUTTON','%VK_LEFT','%VK_LINEFEED','%VK_LWIN','%VK_M','%VK_MBUTTON','%VK_MENU', + '%VK_MODECHANGE','%VK_MULTIPLY','%VK_N','%VK_NEXT','%VK_NONCONVERT','%VK_NUMLOCK','%VK_NUMPAD0','%VK_NUMPAD1', + '%VK_NUMPAD2','%VK_NUMPAD3','%VK_NUMPAD4','%VK_NUMPAD5','%VK_NUMPAD6','%VK_NUMPAD7','%VK_NUMPAD8','%VK_NUMPAD9', + '%VK_O','%VK_P','%VK_PAUSE','%VK_PGDN','%VK_PGUP','%VK_PRINT','%VK_PRIOR','%VK_Q', + '%VK_R','%VK_RBUTTON','%VK_RETURN','%VK_RIGHT','%VK_RWIN','%VK_S','%VK_SCROLL','%VK_SELECT', + '%VK_SEPARATOR','%VK_SHIFT','%VK_SLEEP','%VK_SNAPSHOT','%VK_SPACE','%VK_SUBTRACT','%VK_T','%VK_TAB', + '%VK_U','%VK_UP','%VK_V','%VK_W','%VK_X','%VK_XBUTTON1','%VK_XBUTTON2','%VK_Y', + '%VK_Z','%VT_ARRAY','%VT_BLOB','%VT_BLOB_OBJECT','%VT_BOOL','%VT_BSTR','%VT_BYREF','%VT_CARRAY', + '%VT_CF','%VT_CLSID','%VT_CY','%VT_DATE','%VT_DISPATCH','%VT_EMPTY','%VT_ERROR','%VT_FILETIME', + '%VT_HRESULT','%VT_I1','%VT_I2','%VT_I4','%VT_I8','%VT_INT','%VT_LPSTR','%VT_LPWSTR', + '%VT_NULL','%VT_PTR','%VT_R4','%VT_R8','%VT_RECORD','%VT_RESERVED','%VT_SAFEARRAY','%VT_STORAGE', + '%VT_STORED_OBJECT','%VT_STREAM','%VT_STREAMED_OBJECT','%VT_UI1','%VT_UI2','%VT_UI4','%VT_UI8','%VT_UINT', + '%VT_UNKNOWN','%VT_USERDEFINED','%VT_VARIANT','%VT_VECTOR','%VT_VOID','%WAVE_FORMAT_1M08','%WAVE_FORMAT_1M16','%WAVE_FORMAT_1S08', + '%WAVE_FORMAT_1S16','%WAVE_FORMAT_2M08','%WAVE_FORMAT_2M16','%WAVE_FORMAT_2S08','%WAVE_FORMAT_2S16','%WAVE_FORMAT_4M08','%WAVE_FORMAT_4M16','%WAVE_FORMAT_4S08', + '%WAVE_FORMAT_4S16','%WBF_CUSTOM','%WBF_LEVEL1','%WBF_LEVEL2','%WBF_OVERFLOW','%WBF_WORDBREAK','%WBF_WORDWRAP','%WHITE', + '%WIN_FINDTITLECONTAIN','%WIN_FINDTITLEEND','%WIN_FINDTITLEEQUAL','%WIN_FINDTITLESTART','%WM_ACTIVATE','%WM_ACTIVATEAPP','%WM_CAPTURECHANGED','%WM_CHAR', + '%WM_CLOSE','%WM_COMMAND','%WM_DESTROY','%WM_DROPFILES','%WM_ERASEBKGND','%WM_GETTEXTLENGTH','%WM_HOTKEY','%WM_HSCROLL', + '%WM_IDLE','%WM_INITDIALOG','%WM_KEYDOWN','%WM_KEYUP','%WM_KILLFOCUS','%WM_LBUTTONDBLCLK','%WM_LBUTTONDOWN','%WM_LBUTTONUP', + '%WM_MBUTTONDBLCLK','%WM_MBUTTONDOWN','%WM_MBUTTONUP','%WM_MOUSEFIRST','%WM_MOUSEMOVE','%WM_MOUSEWHEEL','%WM_MOVE','%WM_MOVING', + '%WM_NCLBUTTONDOWN','%WM_NCRBUTTONDOWN','%WM_NEXTDLGCTL','%WM_NOTIFY','%WM_PAINT','%WM_QUIT','%WM_RBUTTONDBLCLK','%WM_RBUTTONDOWN', + '%WM_RBUTTONUP','%WM_SETFOCUS','%WM_SETFONT','%WM_SETTEXT','%WM_SIZE','%WM_SIZING','%WM_SYSCOMMAND','%WM_TIMER', + '%WM_USER','%WM_VSCROLL','%WS_BORDER','%WS_CAPTION','%WS_CHILD','%WS_CLIPCHILDREN','%WS_CLIPSIBLINGS','%WS_DISABLED', + '%WS_DLGFRAME','%WS_EX_ACCEPTFILES','%WS_EX_APPWINDOW','%WS_EX_CLIENTEDGE','%WS_EX_CONTEXTHELP','%WS_EX_CONTROLPARENT','%WS_EX_LAYERED','%WS_EX_LEFT', + '%WS_EX_LEFTSCROLLBAR','%WS_EX_LTRREADING','%WS_EX_MDICHILD','%WS_EX_NOPARENTNOTIFY','%WS_EX_OVERLAPPEDWINDOW','%WS_EX_PALETTEWINDOW','%WS_EX_RIGHT','%WS_EX_RIGHTSCROLLBAR', + '%WS_EX_RTLREADING','%WS_EX_STATICEDGE','%WS_EX_TOOLWINDOW','%WS_EX_TOPMOST','%WS_EX_TRANSPARENT','%WS_EX_WINDOWEDGE','%WS_GROUP','%WS_HSCROLL', + '%WS_ICONIC','%WS_MAXIMIZE','%WS_MAXIMIZEBOX','%WS_MINIMIZE','%WS_MINIMIZEBOX','%WS_OVERLAPPEDWINDOW','%WS_POPUP','%WS_POPUPWINDOW', + '%WS_SYSMENU','%WS_TABSTOP','%WS_THICKFRAME','%WS_VISIBLE','%WS_VSCROLL','%YELLOW','%ZERO','CRLF', + 'FALSE','M_E','M_PI','NULL','TAB','TRUE' + ) + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF; font-weight: bold;', + 2 => 'color: #993333; font-style: italic; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000;' + ), + 'BRACKETS' => array( + 0 => 'color: #333333;' + ), + 'STRINGS' => array( + 0 => 'color: #800080;' + ), + 'NUMBERS' => array( + 0 => 'color: #CC0000;' + ), + 'METHODS' => array( + 1 => 'color: #66cc66;' + ), + 'SYMBOLS' => array( + 0 => 'color: #333333;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + 1 => '_' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/tsql.php b/_piecrust/libs/Geshi/geshi/tsql.php new file mode 100644 index 0000000..42e2ce2 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/tsql.php @@ -0,0 +1,375 @@ + 'T-SQL', + 'COMMENT_SINGLE' => array(1 => '--'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + // Datatypes + 'bigint', 'tinyint', 'money', + 'smallmoney', 'datetime', 'smalldatetime', + 'text', 'nvarchar', 'ntext', 'varbinary', 'image', + 'sql_variant', 'uniqueidentifier', + + // Keywords + 'ABSOLUTE', 'ACTION', 'ADD', 'ADMIN', 'AFTER', 'AGGREGATE', 'ALIAS', 'ALLOCATE', 'ALTER', 'ARE', 'ARRAY', 'AS', + 'ASC', 'ASSERTION', 'AT', 'AUTHORIZATION', 'BACKUP', 'BEFORE', 'BEGIN', 'BINARY', 'BIT', 'BLOB', 'BOOLEAN', 'BOTH', 'BREADTH', + 'BREAK', 'BROWSE', 'BULK', 'BY', 'CALL', 'CASCADE', 'CASCADED', 'CASE', 'CAST', 'CATALOG', 'CHAR', 'CHARACTER', 'CHECK', 'CHECKPOINT', + 'CLASS', 'CLOB', 'CLOSE', 'CLUSTERED', 'COALESCE', 'COLLATE', 'COLLATION', 'COLUMN', 'COMMIT', 'COMPLETION', 'COMPUTE', 'CONNECT', + 'CONNECTION', 'CONSTRAINT', 'CONSTRAINTS', 'CONSTRUCTOR', 'CONTAINS', 'CONTAINSTABLE', 'CONTINUE', 'CONVERT', 'CORRESPONDING', 'CREATE', + 'CUBE', 'CURRENT', 'CURRENT_DATE', 'CURRENT_PATH', 'CURRENT_ROLE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER', + 'CURSOR', 'CYCLE', 'DATA', 'DATABASE', 'DATE', 'DAY', 'DBCC', 'DEALLOCATE', 'DEC', 'DECIMAL', 'DECLARE', 'DEFAULT', 'DEFERRABLE', + 'DEFERRED', 'DELETE', 'DENY', 'DEPTH', 'DEREF', 'DESC', 'DESCRIBE', 'DESCRIPTOR', 'DESTROY', 'DESTRUCTOR', 'DETERMINISTIC', + 'DIAGNOSTICS', 'DICTIONARY', 'DISCONNECT', 'DISK', 'DISTINCT', 'DISTRIBUTED', 'DOMAIN', 'DOUBLE', 'DROP', 'DUMMY', 'DUMP', 'DYNAMIC', + 'EACH', 'ELSE', 'END', 'END-EXEC', 'EQUALS', 'ERRLVL', 'ESCAPE', 'EVERY', 'EXCEPT', 'EXCEPTION', 'EXEC', 'EXECUTE', 'EXIT', + 'EXTERNAL', 'FALSE', 'FETCH', 'FILE', 'FILLFACTOR', 'FIRST', 'FLOAT', 'FOR', 'FOREIGN', 'FOUND', 'FREE', 'FREETEXT', 'FREETEXTTABLE', + 'FROM', 'FULL', 'FUNCTION', 'GENERAL', 'GET', 'GLOBAL', 'GOTO', 'GRANT', 'GROUP', 'GROUPING', 'HAVING', 'HOLDLOCK', 'HOST', 'HOUR', + 'IDENTITY', 'IDENTITY_INSERT', 'IDENTITYCOL', 'IF', 'IGNORE', 'IMMEDIATE', 'INDEX', 'INDICATOR', 'INITIALIZE', 'INITIALLY', + 'INNER', 'INOUT', 'INPUT', 'INSERT', 'INT', 'INTEGER', 'INTERSECT', 'INTERVAL', 'INTO', 'IS', 'ISOLATION', 'ITERATE', 'KEY', + 'KILL', 'LANGUAGE', 'LARGE', 'LAST', 'LATERAL', 'LEADING', 'LEFT', 'LESS', 'LEVEL', 'LIMIT', 'LINENO', 'LOAD', 'LOCAL', + 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCATOR', 'MAP', 'MATCH', 'MINUTE', 'MODIFIES', 'MODIFY', 'MODULE', 'MONTH', 'NAMES', 'NATIONAL', + 'NATURAL', 'NCHAR', 'NCLOB', 'NEW', 'NEXT', 'NO', 'NOCHECK', 'NONCLUSTERED', 'NONE', 'NULLIF', 'NUMERIC', 'OBJECT', 'OF', + 'OFF', 'OFFSETS', 'OLD', 'ON', 'ONLY', 'OPEN', 'OPENDATASOURCE', 'OPENQUERY', 'OPENROWSET', 'OPENXML', 'OPERATION', 'OPTION', + 'ORDER', 'ORDINALITY', 'OUT', 'OUTPUT', 'OVER', 'PAD', 'PARAMETER', 'PARAMETERS', 'PARTIAL', 'PATH', 'PERCENT', 'PLAN', + 'POSTFIX', 'PRECISION', 'PREFIX', 'PREORDER', 'PREPARE', 'PRESERVE', 'PRIMARY', 'PRINT', 'PRIOR', 'PRIVILEGES', 'PROC', 'PROCEDURE', + 'PUBLIC', 'RAISERROR', 'READ', 'READS', 'READTEXT', 'REAL', 'RECONFIGURE', 'RECURSIVE', 'REF', 'REFERENCES', 'REFERENCING', 'RELATIVE', + 'REPLICATION', 'RESTORE', 'RESTRICT', 'RESULT', 'RETURN', 'RETURNS', 'REVOKE', 'RIGHT', 'ROLE', 'ROLLBACK', 'ROLLUP', 'ROUTINE', 'ROW', + 'ROWGUIDCOL', 'ROWS', 'RULE', 'SAVE', 'SAVEPOINT', 'SCHEMA', 'SCOPE', 'SCROLL', 'SEARCH', 'SECOND', 'SECTION', 'SELECT', + 'SEQUENCE', 'SESSION', 'SESSION_USER', 'SET', 'SETS', 'SETUSER', 'SHUTDOWN', 'SIZE', 'SMALLINT', 'SPACE', 'SPECIFIC', + 'SPECIFICTYPE', 'SQL', 'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNING', 'START', 'STATE', 'STATEMENT', 'STATIC', 'STATISTICS', 'STRUCTURE', + 'SYSTEM_USER', 'TABLE', 'TEMPORARY', 'TERMINATE', 'TEXTSIZE', 'THAN', 'THEN', 'TIME', 'TIMESTAMP', 'TIMEZONE_HOUR', 'TIMEZONE_MINUTE', + 'TO', 'TOP', 'TRAILING', 'TRAN', 'TRANSACTION', 'TRANSLATION', 'TREAT', 'TRIGGER', 'TRUE', 'TRUNCATE', 'TSEQUAL', 'UNDER', 'UNION', + 'UNIQUE', 'UNKNOWN', 'UNNEST', 'UPDATE', 'UPDATETEXT', 'USAGE', 'USE', 'USER', 'USING', 'VALUE', 'VALUES', 'VARCHAR', 'VARIABLE', + 'VARYING', 'VIEW', 'WAITFOR', 'WHEN', 'WHENEVER', 'WHERE', 'WHILE', 'WITH', 'WITHOUT', 'WORK', 'WRITE', 'WRITETEXT', 'YEAR', 'ZONE', + 'UNCOMMITTED', 'NOCOUNT', + ), + 2 => array( + /* + Built-in functions + Highlighted in pink. + */ + + //Configuration Functions + '@@DATEFIRST','@@OPTIONS','@@DBTS','@@REMSERVER','@@LANGID','@@SERVERNAME', + '@@LANGUAGE','@@SERVICENAME','@@LOCK_TIMEOUT','@@SPID','@@MAX_CONNECTIONS', + '@@TEXTSIZE','@@MAX_PRECISION','@@VERSION','@@NESTLEVEL', + + //Cursor Functions + '@@CURSOR_ROWS','@@FETCH_STATUS', + + //Date and Time Functions + 'DATEADD','DATEDIFF','DATENAME','DATEPART','GETDATE','GETUTCDATE', + + //Mathematical Functions + 'ABS','DEGREES','RAND','ACOS','EXP','ROUND','ASIN','FLOOR','SIGN', + 'ATAN','LOG','SIN','ATN2','LOG10','SQUARE','CEILING','PI','SQRT','COS', + 'POWER','TAN','COT','RADIANS', + + //Meta Data Functions + 'COL_LENGTH','COL_NAME','FULLTEXTCATALOGPROPERTY', + 'COLUMNPROPERTY','FULLTEXTSERVICEPROPERTY','DATABASEPROPERTY','INDEX_COL', + 'DATABASEPROPERTYEX','INDEXKEY_PROPERTY','DB_ID','INDEXPROPERTY','DB_NAME', + 'OBJECT_ID','FILE_ID','OBJECT_NAME','FILE_NAME','OBJECTPROPERTY','FILEGROUP_ID', + '@@PROCID','FILEGROUP_NAME','SQL_VARIANT_PROPERTY','FILEGROUPPROPERTY', + 'TYPEPROPERTY','FILEPROPERTY', + + //Security Functions + 'IS_SRVROLEMEMBER','SUSER_SID','SUSER_SNAME','USER_ID', + 'HAS_DBACCESS','IS_MEMBER', + + //String Functions + 'ASCII','SOUNDEX','PATINDEX','CHARINDEX','REPLACE','STR', + 'DIFFERENCE','QUOTENAME','STUFF','REPLICATE','SUBSTRING','LEN', + 'REVERSE','UNICODE','LOWER','UPPER','LTRIM','RTRIM', + + //System Functions + 'APP_NAME','COLLATIONPROPERTY','@@ERROR','FORMATMESSAGE', + 'GETANSINULL','HOST_ID','HOST_NAME','IDENT_CURRENT','IDENT_INCR', + 'IDENT_SEED','@@IDENTITY','ISDATE','ISNUMERIC','PARSENAME','PERMISSIONS', + '@@ROWCOUNT','ROWCOUNT_BIG','SCOPE_IDENTITY','SERVERPROPERTY','SESSIONPROPERTY', + 'STATS_DATE','@@TRANCOUNT','USER_NAME', + + //System Statistical Functions + '@@CONNECTIONS','@@PACK_RECEIVED','@@CPU_BUSY','@@PACK_SENT', + '@@TIMETICKS','@@IDLE','@@TOTAL_ERRORS','@@IO_BUSY', + '@@TOTAL_READ','@@PACKET_ERRORS','@@TOTAL_WRITE', + + //Text and Image Functions + 'TEXTPTR','TEXTVALID', + + //Aggregate functions + 'AVG', 'MAX', 'BINARY_CHECKSUM', 'MIN', 'CHECKSUM', 'SUM', 'CHECKSUM_AGG', + 'STDEV', 'COUNT', 'STDEVP', 'COUNT_BIG', 'VAR', 'VARP' + ), + 3 => array( + /* + System stored procedures + Higlighted dark brown + */ + + //Active Directory Procedures + 'sp_ActiveDirectory_Obj', 'sp_ActiveDirectory_SCP', + + //Catalog Procedures + 'sp_column_privileges', 'sp_special_columns', 'sp_columns', 'sp_sproc_columns', + 'sp_databases', 'sp_statistics', 'sp_fkeys', 'sp_stored_procedures', 'sp_pkeys', + 'sp_table_privileges', 'sp_server_info', 'sp_tables', + + //Cursor Procedures + 'sp_cursor_list', 'sp_describe_cursor_columns', 'sp_describe_cursor', 'sp_describe_cursor_tables', + + //Database Maintenance Plan Procedures + 'sp_add_maintenance_plan', 'sp_delete_maintenance_plan_db', 'sp_add_maintenance_plan_db', + 'sp_delete_maintenance_plan_job', 'sp_add_maintenance_plan_job', 'sp_help_maintenance_plan', + 'sp_delete_maintenance_plan', + + //Distributed Queries Procedures + 'sp_addlinkedserver', 'sp_indexes', 'sp_addlinkedsrvlogin', 'sp_linkedservers', 'sp_catalogs', + 'sp_primarykeys', 'sp_column_privileges_ex', 'sp_columns_ex', + 'sp_table_privileges_ex', 'sp_tables_ex', 'sp_foreignkeys', + + //Full-Text Search Procedures + 'sp_fulltext_catalog', 'sp_help_fulltext_catalogs_cursor', 'sp_fulltext_column', + 'sp_help_fulltext_columns', 'sp_fulltext_database', 'sp_help_fulltext_columns_cursor', + 'sp_fulltext_service', 'sp_help_fulltext_tables', 'sp_fulltext_table', + 'sp_help_fulltext_tables_cursor', 'sp_help_fulltext_catalogs', + + //Log Shipping Procedures + 'sp_add_log_shipping_database', 'sp_delete_log_shipping_database', 'sp_add_log_shipping_plan', + 'sp_delete_log_shipping_plan', 'sp_add_log_shipping_plan_database', + 'sp_delete_log_shipping_plan_database', 'sp_add_log_shipping_primary', + 'sp_delete_log_shipping_primary', 'sp_add_log_shipping_secondary', + 'sp_delete_log_shipping_secondary', 'sp_can_tlog_be_applied', 'sp_get_log_shipping_monitor_info', + 'sp_change_monitor_role', 'sp_remove_log_shipping_monitor', 'sp_change_primary_role', + 'sp_resolve_logins', 'sp_change_secondary_role', 'sp_update_log_shipping_monitor_info', + 'sp_create_log_shipping_monitor_account', 'sp_update_log_shipping_plan', + 'sp_define_log_shipping_monitor', 'sp_update_log_shipping_plan_database', + + //OLE Automation Extended Stored Procedures + 'sp_OACreate', 'sp_OAMethod', 'sp_OADestroy', 'sp_OASetProperty', 'sp_OAGetErrorInfo', + 'sp_OAStop', 'sp_OAGetProperty', + + //Replication Procedures + 'sp_add_agent_parameter', 'sp_enableagentoffload', 'sp_add_agent_profile', + 'sp_enumcustomresolvers', 'sp_addarticle', 'sp_enumdsn', 'sp_adddistpublisher', + 'sp_enumfullsubscribers', 'sp_adddistributiondb', 'sp_expired_subscription_cleanup', + 'sp_adddistributor', 'sp_generatefilters', 'sp_addmergealternatepublisher', + 'sp_getagentoffloadinfo', 'sp_addmergearticle', 'sp_getmergedeletetype', 'sp_addmergefilter', + 'sp_get_distributor', 'sp_addmergepublication', 'sp_getqueuedrows', 'sp_addmergepullsubscription', + 'sp_getsubscriptiondtspackagename', 'sp_addmergepullsubscription_agent', 'sp_grant_publication_access', + 'sp_addmergesubscription', 'sp_help_agent_default', 'sp_addpublication', 'sp_help_agent_parameter', + 'sp_addpublication_snapshot', 'sp_help_agent_profile', 'sp_addpublisher70', 'sp_helparticle', + 'sp_addpullsubscription', 'sp_helparticlecolumns', 'sp_addpullsubscription_agent', 'sp_helparticledts', + 'sp_addscriptexec', 'sp_helpdistpublisher', 'sp_addsubscriber', 'sp_helpdistributiondb', + 'sp_addsubscriber_schedule', 'sp_helpdistributor', 'sp_addsubscription', 'sp_helpmergealternatepublisher', + 'sp_addsynctriggers', 'sp_helpmergearticle', 'sp_addtabletocontents', 'sp_helpmergearticlecolumn', + 'sp_adjustpublisheridentityrange', 'sp_helpmergearticleconflicts', 'sp_article_validation', + 'sp_helpmergeconflictrows', 'sp_articlecolumn', 'sp_helpmergedeleteconflictrows', 'sp_articlefilter', + 'sp_helpmergefilter', 'sp_articlesynctranprocs', 'sp_helpmergepublication', 'sp_articleview', + 'sp_helpmergepullsubscription', 'sp_attachsubscription', 'sp_helpmergesubscription', 'sp_browsesnapshotfolder', + 'sp_helppublication', 'sp_browsemergesnapshotfolder', 'sp_help_publication_access', 'sp_browsereplcmds', + 'sp_helppullsubscription', 'sp_change_agent_parameter', 'sp_helpreplfailovermode', 'sp_change_agent_profile', + 'sp_helpreplicationdboption', 'sp_changearticle', 'sp_helpreplicationoption', 'sp_changedistpublisher', + 'sp_helpsubscriberinfo', 'sp_changedistributiondb', 'sp_helpsubscription', 'sp_changedistributor_password', + 'sp_ivindexhasnullcols', 'sp_changedistributor_property', 'sp_helpsubscription_properties', 'sp_changemergearticle', + 'sp_link_publication', 'sp_changemergefilter', 'sp_marksubscriptionvalidation', 'sp_changemergepublication', + 'sp_mergearticlecolumn', 'sp_changemergepullsubscription', 'sp_mergecleanupmetadata', 'sp_changemergesubscription', + 'sp_mergedummyupdate', 'sp_changepublication', 'sp_mergesubscription_cleanup', 'sp_changesubscriber', + 'sp_publication_validation', 'sp_changesubscriber_schedule', 'sp_refreshsubscriptions', 'sp_changesubscriptiondtsinfo', + 'sp_reinitmergepullsubscription', 'sp_changesubstatus', 'sp_reinitmergesubscription', 'sp_change_subscription_properties', + 'sp_reinitpullsubscription', 'sp_check_for_sync_trigger', 'sp_reinitsubscription', 'sp_copymergesnapshot', + 'sp_removedbreplication', 'sp_copysnapshot', 'sp_repladdcolumn', 'sp_copysubscription', 'sp_replcmds', + 'sp_deletemergeconflictrow', 'sp_replcounters', 'sp_disableagentoffload', 'sp_repldone', 'sp_drop_agent_parameter', + 'sp_repldropcolumn', 'sp_drop_agent_profile', 'sp_replflush', 'sp_droparticle', 'sp_replicationdboption', + 'sp_dropanonymouseagent', 'sp_replication_agent_checkup', 'sp_dropdistpublisher', 'sp_replqueuemonitor', + 'sp_dropdistributiondb', 'sp_replsetoriginator', 'sp_dropmergealternatepublisher', 'sp_replshowcmds', + 'sp_dropdistributor', 'sp_repltrans', 'sp_dropmergearticle', 'sp_restoredbreplication', 'sp_dropmergefilter', + 'sp_revoke_publication_access', 'sp_scriptsubconflicttable', 'sp_dropmergepublication', 'sp_script_synctran_commands', + 'sp_dropmergepullsubscription', 'sp_setreplfailovermode', 'sp_showrowreplicainfo', 'sp_dropmergesubscription', + 'sp_subscription_cleanup', 'sp_droppublication', 'sp_table_validation', 'sp_droppullsubscription', + 'sp_update_agent_profile', 'sp_dropsubscriber', 'sp_validatemergepublication', 'sp_dropsubscription', + 'sp_validatemergesubscription', 'sp_dsninfo', 'sp_vupgrade_replication', 'sp_dumpparamcmd', + + //Security Procedures + 'sp_addalias', 'sp_droprolemember', 'sp_addapprole', 'sp_dropserver', 'sp_addgroup', 'sp_dropsrvrolemember', + 'sp_dropuser', 'sp_addlogin', 'sp_grantdbaccess', 'sp_addremotelogin', + 'sp_grantlogin', 'sp_addrole', 'sp_helpdbfixedrole', 'sp_addrolemember', 'sp_helpgroup', + 'sp_addserver', 'sp_helplinkedsrvlogin', 'sp_addsrvrolemember', 'sp_helplogins', 'sp_adduser', + 'sp_helpntgroup', 'sp_approlepassword', 'sp_helpremotelogin', 'sp_changedbowner', 'sp_helprole', + 'sp_changegroup', 'sp_helprolemember', 'sp_changeobjectowner', 'sp_helprotect', 'sp_change_users_login', + 'sp_helpsrvrole', 'sp_dbfixedrolepermission', 'sp_helpsrvrolemember', 'sp_defaultdb', 'sp_helpuser', + 'sp_defaultlanguage', 'sp_MShasdbaccess', 'sp_denylogin', 'sp_password', 'sp_dropalias', 'sp_remoteoption', + 'sp_dropapprole', 'sp_revokedbaccess', 'sp_dropgroup', 'sp_revokelogin', 'sp_droplinkedsrvlogin', + 'sp_setapprole', 'sp_droplogin', 'sp_srvrolepermission', 'sp_dropremotelogin', 'sp_validatelogins', 'sp_droprole', + + //SQL Mail Procedures + 'sp_processmail', 'xp_sendmail', 'xp_deletemail', 'xp_startmail', 'xp_findnextmsg', 'xp_stopmail', 'xp_readmail', + + //SQL Profiler Procedures + 'sp_trace_create', 'sp_trace_setfilter', 'sp_trace_generateevent', 'sp_trace_setstatus', 'sp_trace_setevent', + + //SQL Server Agent Procedures + 'sp_add_alert', 'sp_help_jobhistory', 'sp_add_category', 'sp_help_jobschedule', 'sp_add_job', + 'sp_help_jobserver', 'sp_add_jobschedule', 'sp_help_jobstep', 'sp_add_jobserver', 'sp_help_notification', + 'sp_add_jobstep', 'sp_help_operator', 'sp_add_notification', 'sp_help_targetserver', + 'sp_add_operator', 'sp_help_targetservergroup', 'sp_add_targetservergroup', 'sp_helptask', + 'sp_add_targetsvrgrp_member', 'sp_manage_jobs_by_login', 'sp_addtask', 'sp_msx_defect', + 'sp_apply_job_to_targets', 'sp_msx_enlist', 'sp_delete_alert', 'sp_post_msx_operation', + 'sp_delete_category', 'sp_purgehistory', 'sp_delete_job', 'sp_purge_jobhistory', 'sp_delete_jobschedule', + 'sp_reassigntask', 'sp_delete_jobserver', 'sp_remove_job_from_targets', 'sp_delete_jobstep', + 'sp_resync_targetserver', 'sp_delete_notification', 'sp_start_job', 'sp_delete_operator', + 'sp_stop_job', 'sp_delete_targetserver', 'sp_update_alert', 'sp_delete_targetservergroup', + 'sp_update_category', 'sp_delete_targetsvrgrp_member', 'sp_update_job', 'sp_droptask', + 'sp_update_jobschedule', 'sp_help_alert', 'sp_update_jobstep', 'sp_help_category', + 'sp_update_notification', 'sp_help_downloadlist', 'sp_update_operator', 'sp_helphistory', + 'sp_update_targetservergroup', 'sp_help_job', 'sp_updatetask', 'xp_sqlagent_proxy_account', + + //System Procedures + 'sp_add_data_file_recover_suspect_db', 'sp_helpconstraint', 'sp_addextendedproc', + 'sp_helpdb', 'sp_addextendedproperty', 'sp_helpdevice', 'sp_add_log_file_recover_suspect_db', + 'sp_helpextendedproc', 'sp_addmessage', 'sp_helpfile', 'sp_addtype', 'sp_helpfilegroup', + 'sp_addumpdevice', 'sp_helpindex', 'sp_altermessage', 'sp_helplanguage', 'sp_autostats', + 'sp_helpserver', 'sp_attach_db', 'sp_helpsort', 'sp_attach_single_file_db', 'sp_helpstats', + 'sp_bindefault', 'sp_helptext', 'sp_bindrule', 'sp_helptrigger', 'sp_bindsession', + 'sp_indexoption', 'sp_certify_removable', 'sp_invalidate_textptr', 'sp_configure', + 'sp_lock', 'sp_create_removable', 'sp_monitor', 'sp_createstats', 'sp_procoption', + 'sp_cycle_errorlog', 'sp_recompile', 'sp_datatype_info', 'sp_refreshview', 'sp_dbcmptlevel', + 'sp_releaseapplock', 'sp_dboption', 'sp_rename', 'sp_dbremove', 'sp_renamedb', + 'sp_delete_backuphistory', 'sp_resetstatus', 'sp_depends', 'sp_serveroption', 'sp_detach_db', + 'sp_setnetname', 'sp_dropdevice', 'sp_settriggerorder', 'sp_dropextendedproc', 'sp_spaceused', + 'sp_dropextendedproperty', 'sp_tableoption', 'sp_dropmessage', 'sp_unbindefault', 'sp_droptype', + 'sp_unbindrule', 'sp_executesql', 'sp_updateextendedproperty', 'sp_getapplock', 'sp_updatestats', + 'sp_getbindtoken', 'sp_validname', 'sp_help', 'sp_who', + + //Web Assistant Procedures + 'sp_dropwebtask', 'sp_makewebtask', 'sp_enumcodepages', 'sp_runwebtask', + + //XML Procedures + 'sp_xml_preparedocument', 'sp_xml_removedocument', + + //General Extended Procedures + 'xp_cmdshellxp_logininfo', 'xp_enumgroups', 'xp_msver', 'xp_findnextmsgxp_revokelogin', + 'xp_grantlogin', 'xp_sprintf', 'xp_logevent', 'xp_sqlmaint', 'xp_loginconfig', 'xp_sscanf', + + //API System Stored Procedures + 'sp_cursor', 'sp_cursorclose', 'sp_cursorexecute', 'sp_cursorfetch', 'sp_cursoropen', + 'sp_cursoroption', 'sp_cursorprepare', 'sp_cursorunprepare', 'sp_execute', 'sp_prepare', 'sp_unprepare', + + //Misc + 'sp_createorphan', 'sp_droporphans', 'sp_reset_connection', 'sp_sdidebug' + ), + 4 => array( + //Function/sp's higlighted brown. + 'fn_helpcollations', 'fn_listextendedproperty ', 'fn_servershareddrives', + 'fn_trace_geteventinfo', 'fn_trace_getfilterinfo', 'fn_trace_getinfo', + 'fn_trace_gettable', 'fn_virtualfilestats','fn_listextendedproperty', + ), + ), + 'SYMBOLS' => array( + '!', '!=', '%', '&', '&&', '(', ')', '*', '+', '-', '/', '<', '<<', '<=', + '<=>', '<>', '=', '>', '>=', '>>', '^', 'ALL', 'AND', 'ANY', 'BETWEEN', 'CROSS', + 'EXISTS', 'IN', 'JOIN', 'LIKE', 'NOT', 'NULL', 'OR', 'OUTER', 'SOME', '|', '||', '~' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #FF00FF;', + 3 => 'color: #AF0000;', + 4 => 'color: #AF0000;' + ), + 'COMMENTS' => array( + 1 => 'color: #008080;', + 'MULTI' => 'color: #008080;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #808080;' + ), + 'STRINGS' => array( + 0 => 'color: #FF0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000;' + ), + 'METHODS' => array( + 1 => 'color: #202020;', + 2 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #808080;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/typoscript.php b/_piecrust/libs/Geshi/geshi/typoscript.php new file mode 100644 index 0000000..c1e3806 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/typoscript.php @@ -0,0 +1,300 @@ + Complete rewrite + * 2005/07/29 (1.0.0) + * - First Release + * + * TODO (updated 2004/07/14) + * ------------------------- + * + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'TypoScript', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array(2 => '/(? GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + // Conditions: http://documentation.typo3.org/documentation/tsref/conditions/ + 1 => array( + 'browser', 'compatVersion', 'dayofmonth', 'dayofweek', 'device', + 'globalString', 'globalVars', 'hostname', 'hour', + 'ip', 'language', 'loginUser', 'loginuser', 'minute', + 'month', 'PIDinRootline', 'PIDupinRootline', + 'system', 'treelevel', 'useragent', 'userFunc', + 'usergroup', 'version' + ), + + // Functions: http://documentation.typo3.org/documentation/tsref/functions/ + 2 => array( + 'addParams', 'encapsLines', 'filelink', 'HTMLparser', + 'HTMLparser_tags', 'if', 'imageLinkWrap', + 'imgResource', 'makelinks', 'numRows', 'parseFunc', + 'select', 'split', 'stdWrap', 'tableStyle', 'tags', + 'textStyle', 'typolink' + ), + + // Toplevel objects: http://documentation.typo3.org/documentation/tsref/tlo-objects/ + 3 => array( + 'CARRAY', 'CONFIG', 'CONSTANTS', 'FE_DATA', 'FE_TABLE', 'FRAME', + 'FRAMESET', 'META', 'PAGE', 'plugin' + ), + + // Content Objects (cObject) : http://documentation.typo3.org/documentation/tsref/cobjects/ + 4 => array( + 'CASE', 'CLEARGIF', 'COA', 'COA_INT', 'COBJ_ARRAY', 'COLUMNS', + 'CONTENT', 'CTABLE', 'EDITPANEL', 'FILE', 'FORM', + 'HMENU', 'HRULER', 'HTML', 'IMAGE', 'IMGTEXT', + 'IMG_RESOURCE', 'LOAD_REGISTER', 'MULTIMEDIA', + 'OTABLE', 'PHP_SCRIPT', 'PHP_SCRIPT_EXT', + 'PHP_SCRIPT_INT', 'RECORDS', 'RESTORE_REGISTER', + 'SEARCHRESULT', 'TEMPLATE', 'TEXT', 'USER', + 'USER_INT' + ), + + // GIFBUILDER toplevel link: http://documentation.typo3.org/documentation/tsref/gifbuilder/ + 5 => array( + 'GIFBUILDER', + ), + + // GIFBUILDER: http://documentation.typo3.org/documentation/tsref/gifbuilder/ + // skipped fields: IMAGE, TEXT + // NOTE! the IMAGE and TEXT field already are linked in group 4, they + // cannot be linked twice . . . . unfortunately + 6 => array( + 'ADJUST', 'BOX', 'CROP', 'EFFECT', 'EMBOSS', + 'IMGMAP', 'OUTLINE', 'SCALE', 'SHADOW', + 'WORKAREA' + ), + + // MENU Objects: http://documentation.typo3.org/documentation/tsref/menu/ + 7 => array( + 'GMENU', 'GMENU_FOLDOUT', 'GMENU_LAYERS', 'IMGMENU', + 'IMGMENUITEM', 'JSMENU', 'JSMENUITEM', 'TMENU', + 'TMENUITEM', 'TMENU_LAYERS' + ), + + // MENU common properties: http://documentation.typo3.org/documentation/tsref/menu/common-properties/ + 8 => array( + 'alternativeSortingField', 'begin', 'debugItemConf', + 'imgNameNotRandom', 'imgNamePrefix', + 'itemArrayProcFunc', 'JSWindow', 'maxItems', + 'minItems', 'overrideId', 'sectionIndex', + 'showAccessRestrictedPages', 'submenuObjSuffixes' + ), + + // MENU item states: http://documentation.typo3.org/documentation/tsref/menu/item-states/ + 9 => array( + 'ACT', 'ACTIFSUB', 'ACTIFSUBRO', 'ACTRO', 'CUR', 'CURIFSUB', + 'CURIFSUBRO', 'CURRO', 'IFSUB', 'IFSUBRO', 'NO', + 'SPC', 'USERDEF1', 'USERDEF1RO', 'USERDEF2', + 'USERDEF2RO', 'USR', 'USRRO' + ), + ), + + // Does not include '-' because of stuff like htmlTag_langKey = en-GB and + // lib.nav-sub + 'SYMBOLS' => array( + 0 => array( + '|', + '+', '*', '/', '%', + '!', '&&', '^', + '<', '>', '=', + '?', ':', + '.' + ), + 1 => array( + '(', ')', '{', '}', '[', ']' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + 9 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #ed7d14;', + 2 => 'font-weight: bold;', + 3 => 'color: #990000; font-weight: bold;', + 4 => 'color: #990000; font-weight: bold;', + 5 => 'color: #990000; font-weight: bold;', + 6 => 'color: #990000; font-weight: bold;', + 7 => 'color: #990000; font-weight: bold;', + 8 => 'font-weight: bold;', + 9 => 'color: #990000; font-weight: bold;', + ), + 'COMMENTS' => array( + 1 => 'color: #aaa; font-style: italic;', + 2 => 'color: #aaa; font-style: italic;', + 'MULTI' => 'color: #aaa; font-style: italic;' + ), + 'STRINGS' => array( + 0 => 'color: #ac14aa;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc0000;' + ), + 'METHODS' => array( + 1 => 'color: #0000e0; font-weight: bold;', + 2 => 'color: #0000e0; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'SYMBOLS' => array( + 0 => 'color: #339933; font-weight: bold;', + // Set this to the same value as brackets above + 1 => 'color: #009900; font-weight: bold;' + ), + 'REGEXPS' => array( + 0 => 'color: #009900;', + 1 => 'color: #009900; font-weight: bold;', + 2 => 'color: #3366CC;', + 3 => 'color: #000066; font-weight: bold;', + 4 => 'color: #ed7d14;', + 5 => 'color: #000066; font-weight: bold;', + 6 => 'color: #009900;', + 7 => 'color: #3366CC;' + ), + 'ESCAPE_CHAR' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => 'http://documentation.typo3.org/documentation/tsref/conditions/{FNAME}/', + 2 => 'http://documentation.typo3.org/documentation/tsref/functions/{FNAME}/', + 3 => 'http://documentation.typo3.org/documentation/tsref/tlo-objects/{FNAME}/', + 4 => 'http://documentation.typo3.org/documentation/tsref/cobjects/{FNAME}/', + 5 => 'http://documentation.typo3.org/documentation/tsref/gifbuilder/', + 6 => 'http://documentation.typo3.org/documentation/tsref/gifbuilder/{FNAME}/', + 7 => 'http://documentation.typo3.org/documentation/tsref/menu/{FNAME}/', + 8 => 'http://documentation.typo3.org/documentation/tsref/menu/common-properties/', + 9 => 'http://documentation.typo3.org/documentation/tsref/menu/item-states/' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + // Constant + 0 => array( + GESHI_SEARCH => '(\{)(\$[a-zA-Z_\.]+[a-zA-Z0-9_\.]*)(\})', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '\\3' + ), + + // Constant dollar sign + 1 => array( + GESHI_SEARCH => '(\$)([a-zA-Z_\.]+[a-zA-Z0-9_\.]*)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '\\2' + ), + + // xhtml tag + 2 => array( + GESHI_SEARCH => '(<[a-zA-Z\!\/].*?>)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 's', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + + // extension keys / tables: (static|user|ttx|tx|tt|fe)_something[_something] + 3 => array( + GESHI_SEARCH => '(plugin\.|[^\.]\b)((?:static|user|ttx|tx|tt|fe)(?:_[0-9A-Za-z_]+?)\b)', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + + // conditions and controls + 4 => array( + GESHI_SEARCH => '(\[)(globalVar|global|end)\b', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + + // lowlevel setup and constant objects + 5 => array( + GESHI_SEARCH => '([^\.\$-\{]\b)(cObj|field|config|content|file|frameset|includeLibs|lib|page|plugin|register|resources|sitemap|sitetitle|styles|temp|tt_content|tt_news|types|xmlnews)\b', + GESHI_REPLACE => '\\2', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '\\1', + GESHI_AFTER => '' + ), + + // markers + 6 => array( + GESHI_SEARCH => '(###[^#]+###)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + + // hex color codes + 7 => array( + GESHI_SEARCH => '(#[a-fA-F0-9]{6}\b|#[a-fA-F0-9]{3}\b)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => '', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ) + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/unicon.php b/_piecrust/libs/Geshi/geshi/unicon.php new file mode 100644 index 0000000..839bc09 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/unicon.php @@ -0,0 +1,210 @@ + 'Unicon (Unified Extended Dialect of Icon)', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"', '\''), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'break', 'case', 'class', 'continue', 'create', 'default', 'do', + 'else', 'end', 'every', 'fail', 'for', 'if', 'import', 'initial', 'initially', + 'invocable', 'link', 'method', 'next', 'not', 'of', 'package', 'procedure', 'record', + 'repeat', 'return', 'switch', 'suspend', 'then', 'to', 'until', 'while' + ), + 2 => array( + 'global', 'local', 'static' + ), + 3 => array( + 'allocated', 'ascii', 'clock', 'collections', + 'column', 'cset', 'current', 'date', 'dateline', 'digits', + 'dump', 'e', 'error', 'errornumber', 'errortext', + 'errorvalue', 'errout', 'eventcode', 'eventsource', 'eventvalue', + 'fail', 'features', 'file', 'host', 'input', 'lcase', + 'letters', 'level', 'line', 'main', 'now', 'null', + 'output', 'phi', 'pi', 'pos', 'progname', 'random', + 'regions', 'source', 'storage', 'subject', 'syserr', 'time', + 'trace', 'ucase', 'version', 'col', 'control', 'interval', + 'ldrag', 'lpress', 'lrelease', 'mdrag', 'meta', 'mpress', + 'mrelease', 'rdrag', 'resize', 'row', 'rpress', 'rrelease', + 'shift', 'window', 'x', 'y' + ), + 4 => array( + 'abs', 'acos', 'any', 'args', 'asin', 'atan', 'bal', 'center', 'char', + 'chmod', 'close', 'cofail', 'collect', 'copy', 'cos', 'cset', 'ctime', 'dbcolumns', + 'dbdriver', 'dbkeys', 'dblimits', 'dbproduction', 'dbtables', 'delay', 'delete', 'detab', + 'display', 'dtor', 'entab', 'errorclear', 'event', 'eventmask', 'EvGet', 'exit', 'exp', + 'fetch', 'fieldnames', 'find', 'flock', 'flush', 'function', 'get', 'getch', 'getche', + 'getenv', 'gettimeofday', 'globalnames', 'gtime', 'iand', 'icom', 'image', 'insert', + 'integer', 'ior', 'ishift', 'ixor', 'key', 'left', 'list', 'load', 'loadfunc', + 'localnames', 'log', 'many', 'map', 'match', 'member', 'mkdir', 'move', 'name', 'numeric', + 'open', 'opmask', 'ord', 'paramnames', 'parent', 'pipe', 'pop', 'pos', 'proc', 'pull', + 'push', 'put', 'read', 'reads', 'real', 'receive', 'remove', 'rename', 'repl', 'reverse', + 'right', 'rmdir', 'rtod', 'runerr', 'seek', 'select', 'send', 'seq', 'serial', 'set', + 'setenv', 'sort', 'sortf', 'sql', 'sqrt', 'stat', 'staticnames', 'stop', 'string', 'system', 'tab', + 'table', 'tan', 'trap', 'trim', 'truncate', 'type', 'upto', 'utime', 'variable', 'where', + 'write', 'writes' + ), + 5 => array( + 'Active', 'Alert', 'Bg', 'Clip', 'Clone', 'Color', 'ColorValue', + 'CopyArea', 'Couple', 'DrawArc', 'DrawCircle', 'DrawCurve', 'DrawCylinder', 'DrawDisk', + 'DrawImage', 'DrawLine', 'DrawPoint', 'DrawPolygon', 'DrawRectangle', 'DrawSegment', + 'DrawSphere', 'DrawString', 'DrawTorus', 'EraseArea', 'Event', 'Fg', 'FillArc', + 'FillCircle', 'FillPolygon', 'FillRectangle', 'Font', 'FreeColor', 'GotoRC', 'GotoXY', + 'IdentifyMatrix', 'Lower', 'MatrixMode', 'NewColor', 'PaletteChars', 'PaletteColor', + 'PaletteKey', 'Pattern', 'Pending', 'Pixel', 'PopMatrix', 'PushMatrix', 'PushRotate', + 'PushScale', 'PushTranslate', 'QueryPointer', 'Raise', 'ReadImage', 'Refresh', 'Rotate', + 'Scale', 'Texcoord', 'TextWidth', 'Texture', 'Translate', 'Uncouple', 'WAttrib', + 'WDefault', 'WFlush', 'WindowContents', 'WriteImage', 'WSync' + ), + 6 => array( + 'define', 'include', 'ifdef', 'ifndef', 'else', 'endif', 'error', + 'line', 'undef' + ), + 7 => array( + '_V9', '_AMIGA', '_ACORN', '_CMS', '_MACINTOSH', '_MSDOS_386', + '_MS_WINDOWS_NT', '_MSDOS', '_MVS', '_OS2', '_POR', 'T', '_UNIX', '_POSIX', '_DBM', + '_VMS', '_ASCII', '_EBCDIC', '_CO_EXPRESSIONS', '_CONSOLE_WINDOW', '_DYNAMIC_LOADING', + '_EVENT_MONITOR', '_EXTERNAL_FUNCTIONS', '_KEYBOARD_FUNCTIONS', '_LARGE_INTEGERS', + '_MULTITASKING', '_PIPES', '_RECORD_IO', '_SYSTEM_FUNCTION', '_MESSAGING', '_GRAPHICS', + '_X_WINDOW_SYSTEM', '_MS_WINDOWS', '_WIN32', '_PRESENTATION_MGR', '_ARM_FUNCTIONS', + '_DOS_FUNCTIONS' + ), + 8 => array( + 'line') + ), + 'SYMBOLS' => array( + 1 => array( + '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '\\', '%', '=', '<', '>', '!', '^', + '&', '|', '?', ':', ';', ',', '.', '~', '@' + ), + 2 => array( + '$(', '$)', '$<', '$>' + ) + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #b1b100;', + 3 => 'color: #b1b100;', + 4 => 'color: #b1b100;', + 5 => 'color: #b1b100;', + 6 => 'color: #b1b100;', + 7 => 'color: #b1b100;', + 8 => 'color: #b1b100;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;', + ), + 'METHODS' => array( + 0 => 'color: #004000;' + ), + 'SYMBOLS' => array( + 1 => 'color: #339933;' + ), + 'REGEXPS' => array(), + 'SCRIPT' => array() + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array(1 => '.'), + 'REGEXPS' => array(), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array(), + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 3 => array( + 'DISALLOWED_BEFORE' => '(?<=&)' + ), + 4 => array( + 'DISALLOWED_BEFORE' => "(? "(?![a-zA-Z0-9_\"\'])" + ), + 6 => array( + 'DISALLOWED_BEFORE' => '(?<=\$)' + ), + 8 => array( + 'DISALLOWED_BEFORE' => '(?<=#)' + ) + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/vala.php b/_piecrust/libs/Geshi/geshi/vala.php new file mode 100644 index 0000000..1e4cece --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/vala.php @@ -0,0 +1,151 @@ + 'Vala', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + //Using and Namespace directives (basic support) + //Please note that the alias syntax for using is not supported + 3 => '/(?:(?<=using[\\n\\s])|(?<=namespace[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*[a-zA-Z0-9_]+[\n\s]*(?=[;=])/i'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'HARDQUOTE' => array('"""'), + 'HARDESCAPE' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'as', 'abstract', 'base', 'break', 'case', 'catch', 'const', + 'construct', 'continue', 'default', 'delete', 'dynamic', 'do', + 'else', 'ensures', 'extern', 'false', 'finally', 'for', 'foreach', + 'get', 'if', 'in', 'inline', 'internal', 'lock', 'namespace', + 'null', 'out', 'override', 'private', 'protected', 'public', 'ref', + 'requires', 'return', 'set', 'static', 'switch', 'this', 'throw', + 'throws', 'true', 'try', 'using', 'value', 'var', 'virtual', + 'volatile', 'void', 'yield', 'yields', 'while' + ), + 2 => array( + '#elif', '#endif', '#else', '#if' + ), + 3 => array( + 'is', 'new', 'owned', 'sizeof', 'typeof', 'unchecked', 'unowned', 'weak' + ), + 4 => array( + 'bool', 'char', 'class', 'delegate', 'double', 'enum', + 'errordomain', 'float', 'int', 'int8', 'int16', 'int32', 'int64', + 'interface', 'long', 'short', 'signal', 'size_t', 'ssize_t', + 'string', 'struct', 'uchar', 'uint', 'uint8', 'uint16', 'uint32', + 'ulong', 'unichar', 'ushort' + ) + ), + 'SYMBOLS' => array( + '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', ':', ';', + '(', ')', '{', '}', '[', ']', '|' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0600FF;', + 2 => 'color: #FF8000; font-weight: bold;', + 3 => 'color: #008000;', + 4 => 'color: #FF0000;' + ), + 'COMMENTS' => array( + 1 => 'color: #008080; font-style: italic;', + 3 => 'color: #008080;', + 'MULTI' => 'color: #008080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #008080; font-weight: bold;', + 'HARD' => 'color: #008080; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #666666;', + 'HARD' => 'color: #666666;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;' + ), + 'METHODS' => array( + 1 => 'color: #0000FF;', + 2 => 'color: #0000FF;' + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 'DISALLOWED_BEFORE' => "(?|^])", + 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-])" + ) + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/vb.php b/_piecrust/libs/Geshi/geshi/vb.php new file mode 100644 index 0000000..638da5e --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/vb.php @@ -0,0 +1,157 @@ + 'Visual Basic', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + // Comments (either single or multiline with _ + 1 => '/\'.*(? GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'Binary', 'Boolean', 'Byte', 'Currency', 'Date', 'Decimal', 'Double', + 'String', 'Enum', 'Integer', 'Long', 'Object', 'Single', 'Variant' + ), + 2 => array( + 'CreateObject', 'GetObject', 'New', 'Option', 'Function', + 'Call', 'Private', 'Public', 'Sub', 'Explicit', 'Compare', 'Exit' + ), + 3 => array( + 'And', 'Case', 'Do', 'Each', 'Else', 'ElseIf', 'For', + 'Goto', 'If', 'Is', 'Loop', 'Next', 'Not', 'Or', 'Select', 'Step', + 'Then', 'To', 'Until', 'While', 'With', 'Xor', 'WithEvents', + 'DoEvents', 'Close', 'Like', 'In', 'End' + ), + 4 => array( + 'As', 'Dim', 'Get', 'Set', 'ReDim', 'Error', + 'Resume', 'Declare', 'Let', 'ByRef', 'ByVal', + 'Optional', 'Property', 'Control', 'UBound', 'Mod', + 'GoSub', 'Implements', 'Input', 'LBound', 'Static', 'Stop', + 'Type', 'TypeOf', 'On', 'Open', 'Output', 'ParamArray', + 'Preserve', 'Print', 'RaiseEvent', 'Random', 'Line' + ), + 5 => array( + 'Nothing', 'False', 'True', 'Null', 'Empty' + ), + 6 => array( + 'ErrorHandler','ExitProc', 'PublishReport' + ), + ), + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #F660AB; font-weight: bold;', + 2 => 'color: #E56717; font-weight: bold;', + 3 => 'color: #8D38C9; font-weight: bold;', + 4 => 'color: #151B8D; font-weight: bold;', + 5 => 'color: #00C2FF; font-weight: bold;', + 6 => 'color: #3EA99F; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000;' + ), + 'BRACKETS' => array( + ), + 'STRINGS' => array( + 0 => 'color: #800000;' + ), + 'NUMBERS' => array( + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #800000; font-weight: bold;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'BRACKETS' => GESHI_NEVER, + 'SYMBOLS' => GESHI_NEVER, + 'NUMBERS' => GESHI_NEVER + ) + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/vbnet.php b/_piecrust/libs/Geshi/geshi/vbnet.php new file mode 100644 index 0000000..0121f8d --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/vbnet.php @@ -0,0 +1,201 @@ + 'vb.net', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + '3DDKSHADOW', '3DHIGHLIGHT', '3DLIGHT', 'ABORT', 'ABORTRETRYIGNORE', 'ACTIVEBORDER', + 'ACTIVETITLEBAR', 'ALIAS', 'APPLICATIONMODAL', 'APPLICATIONWORKSPACE', 'ARCHIVE', + 'BACK', 'BINARYCOMPARE', 'BLACK', 'BLUE', 'BUTTONFACE', 'BUTTONSHADOW', 'BUTTONTEXT', + 'CANCEL', 'CDROM', 'CR', 'CRITICAL', 'CRLF', 'CYAN', 'DEFAULT', 'DEFAULTBUTTON1', + 'DEFAULTBUTTON2', 'DEFAULTBUTTON3', 'DESKTOP', 'DIRECTORY', 'EXCLAMATION', 'FALSE', + 'FIXED', 'FORAPPENDING', 'FORMFEED', 'FORREADING', 'FORWRITING', 'FROMUNICODE', + 'GRAYTEXT', 'GREEN', 'HIDDEN', 'HIDE', 'HIGHLIGHT', 'HIGHLIGHTTEXT', 'HIRAGANA', + 'IGNORE', 'INACTIVEBORDER', 'INACTIVECAPTIONTEXT', 'INACTIVETITLEBAR', 'INFOBACKGROUND', + 'INFORMATION', 'INFOTEXT', 'KATAKANALF', 'LOWERCASE', 'MAGENTA', 'MAXIMIZEDFOCUS', + 'MENUBAR', 'MENUTEXT', 'METHOD', 'MINIMIZEDFOCUS', 'MINIMIZEDNOFOCUS', 'MSGBOXRIGHT', + 'MSGBOXRTLREADING', 'MSGBOXSETFOREGROUND', 'NARROW', 'NEWLINE', 'NO', 'NORMAL', + 'NORMALFOCUS', 'NORMALNOFOCUS', 'NULLSTRING', 'OBJECTERROR', 'OK', 'OKCANCEL', 'OKONLY', + 'PROPERCASE', 'QUESTION', 'RAMDISK', 'READONLY', 'RED', 'REMOTE', 'REMOVABLE', 'RETRY', + 'RETRYCANCEL', 'SCROLLBARS', 'SYSTEMFOLDER', 'SYSTEMMODAL', 'TEMPORARYFOLDER', + 'TEXTCOMPARE', 'TITLEBARTEXT', 'TRUE', 'UNICODE', 'UNKNOWN', 'UPPERCASE', 'VERTICALTAB', + 'VOLUME', 'WHITE', 'WIDE', 'WIN16', 'WIN32', 'WINDOWBACKGROUND', 'WINDOWFRAME', + 'WINDOWSFOLDER', 'WINDOWTEXT', 'YELLOW', 'YES', 'YESNO', 'YESNOCANCEL' + ), + 2 => array( + 'AndAlso', 'As', 'ADDHANDLER', 'ASSEMBLY', 'AUTO', 'Binary', 'ByRef', 'ByVal', 'BEGINEPILOGUE', + 'Else', 'ElseIf', 'Empty', 'Error', 'ENDPROLOGUE', 'EXTERNALSOURCE', 'ENVIRON', 'For', + 'Friend', 'Func', 'GET', 'HANDLES', 'Input', 'Is', 'IsNot', 'Len', 'Lock', 'Me', 'Mid', 'MUSTINHERIT', 'MustOverride', + 'MYBASE', 'MYCLASS', 'New', 'Next', 'Nothing', 'Null', 'NOTINHERITABLE', + 'NOTOVERRIDABLE', 'Of', 'OFF', 'On', 'Option', 'Optional', 'Overloads', 'OVERRIDABLE', 'Overrides', 'ParamArray', 'Predicate', + 'Print', 'Private', 'Property', 'Public', 'Resume', 'Return', 'Seek', 'Static', 'Step', + 'String', 'SHELL', 'SENDKEYS', 'SET', 'Shared', 'Then', 'Time', 'To', 'THROW', 'WithEvents' + ), + 3 => array( + 'COLLECTION', 'DEBUG', 'DICTIONARY', 'DRIVE', 'DRIVES', 'ERR', 'FILE', 'FILES', + 'FILESYSTEMOBJECT', 'FOLDER', 'FOLDERS', 'TEXTSTREAM' + ), + 4 => array( + 'BOOLEAN', 'BYTE', 'DATE', 'DECIMIAL', 'DOUBLE', 'INTEGER', 'LONG', 'OBJECT', + 'SINGLE STRING' + ), + 5 => array( + 'ADDRESSOF', 'AND', 'BITAND', 'BITNOT', 'BITOR', 'BITXOR', + 'GETTYPE', 'LIKE', 'MOD', 'NOT', 'ORXOR' + ), + 6 => array( + 'APPACTIVATE', 'BEEP', 'CALL', 'CHDIR', 'CHDRIVE', 'CLASS', 'CASE', 'CATCH', 'CONST', + 'DECLARE', 'DELEGATE', 'DELETESETTING', 'DIM', 'DO', 'DOEVENTS', 'END', 'ENUM', + 'EVENT', 'EXIT', 'EACH', 'FUNCTION', 'FINALLY', 'IF', 'IMPORTS', 'INHERITS', + 'INTERFACE', 'IMPLEMENTS', 'KILL', 'LOOP', 'NAMESPACE', 'OPEN', 'PUT', + 'RAISEEVENT', 'RANDOMIZE', 'REDIM', 'REM', 'RESET', 'SAVESETTING', 'SELECT', + 'SETATTR', 'STOP', 'SUB', 'SYNCLOCK', 'STRUCTURE', 'SHADOWS', 'SWITCH', + 'TRY', 'WIDTH', 'WITH', 'WRITE', 'WHILE' + ), + 7 => array( + 'ABS', 'ARRAY', 'ASC', 'ASCB', 'ASCW', 'CALLBYNAME', 'CBOOL', 'CBYTE', 'CCHAR', + 'CCHR', 'CDATE', 'CDBL', 'CDEC', 'CHOOSE', 'CHR', 'CHR$', 'CHRB', 'CHRB$', 'CHRW', + 'CINT', 'CLNG', 'CLNG8', 'CLOSE', 'COBJ', 'COMMAND', 'COMMAND$', 'CONVERSION', + 'COS', 'CREATEOBJECT', 'CSHORT', 'CSTR', 'CURDIR', 'CTYPE', 'CVDATE', 'DATEADD', + 'DATEDIFF', 'DATEPART', 'DATESERIAL', 'DATEVALUE', 'DAY', 'DDB', 'DIR', 'DIR$', + 'EOF', 'ERROR$', 'EXP', 'FILEATTR', 'FILECOPY', 'FILEDATATIME', 'FILELEN', 'FILTER', + 'FIX', 'FORMAT', 'FORMAT$', 'FORMATCURRENCY', 'FORMATDATETIME', 'FORMATNUMBER', + 'FORMATPERCENT', 'FREEFILE', 'FV', 'GETALLSETTINGS', 'GETATTRGETOBJECT', 'GETSETTING', + 'HEX', 'HEX$', 'HOUR', 'IIF', 'IMESTATUS', 'INPUT$', 'INPUTB', 'INPUTB$', 'INPUTBOX', + 'INSTR', 'INSTRB', 'INSTRREV', 'INT', 'IPMT', 'IRR', 'ISARRAY', 'ISDATE', 'ISEMPTY', + 'ISERROR', 'ISNULL', 'ISNUMERIC', 'ISOBJECT', 'JOIN', 'LBOUND', 'LCASE', 'LCASE$', + 'LEFT', 'LEFT$', 'LEFTB', 'LEFTB$', 'LENB', 'LINEINPUT', 'LOC', 'LOF', 'LOG', 'LTRIM', + 'LTRIM$', 'MID$', 'MIDB', 'MIDB$', 'MINUTE', 'MIRR', 'MKDIR', 'MONTH', 'MONTHNAME', + 'MSGBOX', 'NOW', 'NPER', 'NPV', 'OCT', 'OCT$', 'PARTITION', 'PMT', 'PPMT', 'PV', + 'RATE', 'REPLACE', 'RIGHT', 'RIGHT$', 'RIGHTB', 'RIGHTB$', 'RMDIR', 'RND', 'RTRIM', + 'RTRIM$', 'SECOND', 'SIN', 'SLN', 'SPACE', 'SPACE$', 'SPC', 'SPLIT', 'SQRT', 'STR', 'STR$', + 'STRCOMP', 'STRCONV', 'STRING$', 'STRREVERSE', 'SYD', 'TAB', 'TAN', 'TIMEOFDAY', + 'TIMER', 'TIMESERIAL', 'TIMEVALUE', 'TODAY', 'TRIM', 'TRIM$', 'TYPENAME', 'UBOUND', + 'UCASE', 'UCASE$', 'VAL', 'WEEKDAY', 'WEEKDAYNAME', 'YEAR' + ), + 8 => array( + 'ANY', 'ATN', 'CALENDAR', 'CIRCLE', 'CURRENCY', 'DEFBOOL', 'DEFBYTE', 'DEFCUR', + 'DEFDATE', 'DEFDBL', 'DEFDEC', 'DEFINT', 'DEFLNG', 'DEFOBJ', 'DEFSNG', 'DEFSTR', + 'DEFVAR', 'EQV', 'GOSUB', 'IMP', 'INITIALIZE', 'ISMISSING', 'LET', 'LINE', 'LSET', + 'RSET', 'SGN', 'SQR', 'TERMINATE', 'VARIANT', 'VARTYPE', 'WEND' + ), + ), + 'SYMBOLS' => array( + '&', '&=', '*', '*=', '+', '+=', '-', '-=', '//', '/', '/=', '=', '\\', '\\=', + '^', '^=' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false, + 6 => false, + 7 => false, + 8 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0600FF;', //Constants + 2 => 'color: #FF8000;', //Keywords + 3 => 'color: #008000;', //Data Types + 4 => 'color: #FF0000;', //Objects + 5 => 'color: #804040;', //Operators + 6 => 'color: #0600FF;', //Statements + 7 => 'color: #0600FF;', //Functions + 8 => 'color: #0600FF;' //Deprecated + ), + 'COMMENTS' => array( + 1 => 'color: #008080; font-style: italic;', + 'MULTI' => 'color: #008080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #008080; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #808080;' + ), + 'NUMBERS' => array( + 0 => 'color: #FF0000;' + ), + 'METHODS' => array( + 1 => 'color: #0000FF;' + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.google.com/search?q={FNAMEU}+site:msdn.microsoft.com', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 =>'.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/verilog.php b/_piecrust/libs/Geshi/geshi/verilog.php new file mode 100644 index 0000000..3c3c224 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/verilog.php @@ -0,0 +1,173 @@ + + * Copyright: (C) 2008 Guenter Dannoritzer + * Release Version: 1.0.8.9 + * Date Started: 2008/05/28 + * + * Verilog language file for GeSHi. + * + * CHANGES + * ------- + * 2008/05/29 + * - added regular expression to find numbers of the form 4'b001xz + * - added regular expression to find values for `timescale command + * - extended macro keywords + * + * TODO (updated 2008/05/29) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'Verilog', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array(1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + // keywords + 1 => array('always', 'and', 'assign', 'begin', 'buf', 'bufif0', 'bufif1', 'case', + 'casex', 'casez', 'cmos', 'deassign', 'default', 'defparam', + 'disable', 'edge', 'else', 'end', 'endcase', 'endfunction', + 'endmodule', 'endprimitive', 'endspecify', 'endtable', 'endtask', + 'event', 'for', 'force', 'forever', 'function', 'highz0', + 'highz1', 'if', 'ifnone', 'initial', 'inout', 'input', 'integer', + 'join', 'large', 'macromodule', 'medium', 'module', 'nand', + 'negedge', 'nmos', 'nor', 'not', 'notif0', 'notif1', 'or', + 'output', 'parameter', 'pmos', 'posedge', 'primitive', 'pull0', + 'pull1', 'pulldown', 'pullup', 'rcmos', 'real', 'realtime', 'reg', + 'release', 'repeat', 'rnmos', 'rpmos', 'rtran', 'rtranif0', + 'rtranif1', 'scalared', 'small', 'specify', 'specparam', + 'strong0', 'strong1', 'supply0', 'supply1', 'table', 'task', + 'time', 'tran', 'tranif0', 'tranif1', 'tri', 'tri0', 'tri1', + 'triand', 'trior', 'trireg', 'vectored', 'wait', 'wand', 'weak0', + 'weak1', 'while', 'wire', 'wor', 'xnor', 'xor' + ), + // system tasks + 2 => array( + '$display', '$monitor', + '$dumpall', '$dumpfile', '$dumpflush', '$dumplimit', '$dumpoff', + '$dumpon', '$dumpvars', + '$fclose', '$fdisplay', '$fopen', + '$finish', '$fmonitor', '$fstrobe', '$fwrite', + '$fgetc', '$ungetc', '$fgets', '$fscanf', '$fread', '$ftell', + '$fseek', '$frewind', '$ferror', '$fflush', '$feof', + '$random', + '$readmemb', '$readmemh', '$readmemx', + '$signed', '$stime', '$stop', + '$strobe', '$time', '$unsigned', '$write' + ), + // macros + 3 => array( + '`default-net', '`define', + '`celldefine', '`default_nettype', '`else', '`elsif', '`endcelldefine', + '`endif', '`ifdef', '`ifndef', '`include', '`line', '`nounconnected_drive', + '`resetall', '`timescale', '`unconnected_drive', '`undef' + ), + ), + 'SYMBOLS' => array( + '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', + '^', '&', '|', '~', + '?', ':', + '#', '<<', '<<<', + '>', '<', '>=', '<=', + '@', ';', ',' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #A52A2A; font-weight: bold;', + 2 => 'color: #9932CC;', + 3 => 'color: #008800;' + ), + 'COMMENTS' => array( + 1 => 'color: #00008B; font-style: italic;', + 'MULTI' => 'color: #00008B; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #9F79EE' + ), + 'BRACKETS' => array( + 0 => 'color: #9F79EE;' + ), + 'STRINGS' => array( + 0 => 'color: #FF00FF;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0055;' + ), + 'METHODS' => array( + 1 => 'color: #202020;', + 2 => 'color: #202020;' + ), + 'SYMBOLS' => array( + 0 => 'color: #5D478B;' + ), + 'REGEXPS' => array( + 0 => 'color: #ff0055;', + 1 => 'color: #ff0055;', + ), + 'SCRIPT' => array( + 0 => '', + 1 => '', + 2 => '', + 3 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + 1 => '' + ), + 'REGEXPS' => array( + // numbers + 0 => "\d'[bdh][0-9_a-fA-FxXzZ]+", + // time -> 1, 10, or 100; s, ms, us, ns, ps, of fs + 1 => "1[0]{0,2}[munpf]?s" + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + 1 => '' + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + 0 => true, + 1 => true, + 2 => true, + 3 => true + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/vhdl.php b/_piecrust/libs/Geshi/geshi/vhdl.php new file mode 100644 index 0000000..386604c --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/vhdl.php @@ -0,0 +1,144 @@ + 'VHDL', + 'COMMENT_SINGLE' => array(1 => '--'), + 'COMMENT_MULTI' => array('%' => '%'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /*keywords*/ + 1 => array( + 'access','after','alias','all','assert','attribute','architecture','begin', + 'block','body','buffer','bus','case','component','configuration','constant', + 'disconnect','downto','else','elsif','end','entity','exit','file','for', + 'function','generate','generic','group','guarded','if','impure','in', + 'inertial','inout','is','label','library','linkage','literal','loop', + 'map','new','next','null','of','on','open','others','out','package', + 'port','postponed','procedure','process','pure','range','record','register', + 'reject','report','return','select','severity','signal','shared','subtype', + 'then','to','transport','type','unaffected','units','until','use','variable', + 'wait','when','while','with','note','warning','error','failure','and', + 'or','xor','not','nor','used','memory','segments','dff','dffe','help_id', + 'mod','info','latch','rising_edge','falling_edge' + ), + /*types*/ + 2 => array( + 'bit','bit_vector','character','boolean','integer','real','time','string', + 'severity_level','positive','natural','signed','unsigned','line','text', + 'std_logic','std_logic_vector','std_ulogic','std_ulogic_vector','qsim_state', + 'qsim_state_vector','qsim_12state','qsim_12state_vector','qsim_strength', + 'mux_bit','mux_vector','reg_bit','reg_vector','wor_bit','wor_vector', + 'work','ieee','std_logic_signed','std_logic_1164','std_logic_arith', + 'numeric_std' + + ), + /*operators*/ + ), + 'SYMBOLS' => array( + '[', ']', '(', ')', + ';',':', + '<','>','=','<=',':=','=>','==' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000080; font-weight: bold;', + 2 => 'color: #0000ff;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000; font-style: italic;', + 'MULTI' => 'color: #008000; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #000066;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #ff0000;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #000066;' + ), + 'REGEXPS' => array( + 0 => 'color: #ff0000;', + 1 => 'color: #ff0000;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + //Hex numbers and scientific notation for numbers + 0 => '(\b0x[0-9a-fA-F]+|\b\d[0-9a-fA-F]+[hH])|'. + '(\b\d+?(\.\d+?)?E[+\-]?\d+)|(\bns)|'. + "('[0-9a-zA-Z]+(?!'))", + //Number characters? + 1 => "\b(''\d'')" + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/vim.php b/_piecrust/libs/Geshi/geshi/vim.php new file mode 100644 index 0000000..0d63ccd --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/vim.php @@ -0,0 +1,420 @@ + ... ... works event if they aren't surround by space. + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array( + 'LANG_NAME' => 'Vim Script', + 'COMMENT_SINGLE' => array(), + 'COMMENT_REGEXP' => array( + 1 => "/\s*\"[^\"]*?$/m", + //Regular expressions (Ported from perl.php) +// 2 => "/(?<=[\\s^])(s|tr|y)\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])*\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU", + ), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'au', 'augroup', 'autocmd', 'brea', 'break', 'bufadd', + 'bufcreate', 'bufdelete', 'bufenter', 'buffilepost', + 'buffilepre', 'bufleave', 'bufnew', 'bufnewfile', + 'bufread', 'bufreadcmd', 'bufreadpost', 'bufreadpre', + 'bufunload', 'bufwinenter', 'bufwinleave', 'bufwipeout', + 'bufwrite', 'bufwritecmd', 'bufwritepost', 'bufwritepre', + 'call', 'cat', 'catc', 'catch', 'cmd-event', 'cmdwinenter', + 'cmdwinleave', 'colorscheme', 'con', 'confirm', 'cont', 'conti', + 'contin', 'continu', 'continue', 'cursorhold', 'cursorholdi', + 'cursormoved', 'cursormovedi', 'ec', 'echo', 'echoe', + 'echoer', 'echoerr', 'echoh', 'echohl', 'echom', 'echoms', + 'echomsg', 'echon', 'el', 'els', 'else', 'elsei', 'elseif', + 'en', 'encodingchanged', 'end', 'endfo', 'endfor', 'endi', + 'endif', 'endt', 'endtr', 'endtry', 'endw', 'endwh', 'endwhi', + 'endwhil', 'endwhile', 'exe', 'exec', 'execu', 'execut', + 'execute', 'fileappendcmd', 'fileappendpost', 'fileappendpre', + 'filechangedro', 'filechangedshell', 'filechangedshellpost', + 'filereadcmd', 'filereadpost', 'filereadpre', + 'filetype', 'filewritecmd', 'filewritepost', 'filewritepre', + 'filterreadpost', 'filterreadpre', 'filterwritepost', + 'filterwritepre', 'fina', 'final', 'finall', 'finally', + 'finish', 'focusgained', 'focuslost', 'for', 'fun', 'func', + 'funct', 'functi', 'functio', 'function', 'funcundefined', + 'guienter', 'guifailed', 'hi', 'highlight', 'if', 'in', + 'insertchange', 'insertenter', 'insertleave', 'let', 'lockv', + 'lockva', 'lockvar', 'map', 'match', 'menupopup', 'nnoremap', + 'quickfixcmdpost', 'quickfixcmdpre', 'remotereply', 'retu', + 'retur', 'return', 'sessionloadpost', 'set', 'setlocal', + 'shellcmdpost', 'shellfilterpost', 'sourcecmd', 'sourcepre', + 'spellfilemissing', 'stdinreadpost', 'stdinreadpre', + 'swapexists', 'syntax', 'tabenter', 'tableave', 'termchanged', + 'termresponse', 'th', 'thr', 'thro', 'throw', 'tr', 'try', 'unl', + 'unle', 'unlet', 'unlo', 'unloc', 'unlock', 'unlockv', + 'unlockva', 'unlockvar', 'user', 'usergettingbored', + 'vimenter', 'vimleave', 'vimleavepre', 'vimresized', 'wh', + 'whi', 'whil', 'while', 'winenter', 'winleave' + ), + 2 => array( + '<CR>', '<Esc>', '<F1>', '<F10>', + '<F11>', '<F12>', '<F2>', '<F3>', + '<F4>', '<F5>', '<F6>', '<F7>', + '<F8>', '<F9>', '<cr>', '<silent>', + '-nargs', 'acd', 'ai', 'akm', 'al', 'aleph', + 'allowrevins', 'altkeymap', 'ambiwidth', 'ambw', + 'anti', 'antialias', 'ar', 'arab', 'arabic', + 'arabicshape', 'ari', 'arshape', 'autochdir', + 'autoindent', 'autoread', 'autowrite', 'autowriteall', + 'aw', 'awa', 'background', 'backspace', 'backup', + 'backupcopy', 'backupdir', 'backupext', + 'backupskip', 'balloondelay', 'ballooneval', 'balloonexpr', + 'bdir', 'bdlay', 'beval', 'bex', 'bexpr', 'bg', + 'bh', 'bin', 'binary', 'biosk', 'bioskey', + 'bk', 'bkc', 'bl', 'bomb', 'breakat', 'brk', + 'bs', 'bsdir', 'bsk', 'bt', 'bufhidden', + 'buftype', 'casemap', 'cb', + 'ccv', 'cd', 'cdpath', 'cedit', 'cf', 'cfu', 'ch', + 'charconvert', 'ci', 'cin', 'cink', + 'cinkeys', 'cino', 'cinoptions', 'cinw', 'cinwords', + 'clipboard', 'cmdheight', 'cmdwinheight', + 'cmp', 'cms', 'co', 'columns', 'com', + 'comc', 'comcl', 'comcle', 'comclea', 'comclear', 'comm', + 'comma', 'comman', 'command', 'comments', 'commentstring', + 'compatible', 'completefunc', 'completeopt', + 'consk', 'conskey', 'copyindent', + 'cot', 'cp', 'cpo', 'cpoptions', 'cpt', + 'cscopepathcomp', 'cscopeprg', 'cscopequickfix', 'cscopetag', + 'cscopetagorder', 'cscopeverbose', + 'cspc', 'csprg', 'csqf', 'cst', 'csto', 'csverb', 'cuc', + 'cul', 'cursorcolumn', 'cursorline', 'cwh', 'debug', + 'deco', 'def', 'define', 'delc', 'delco', 'delcom', + 'delcombine', 'delcomm', 'delcomman', 'delcommand', 'dex', + 'dg', 'dict', 'dictionary', 'diff', 'diffexpr', + 'diffopt', 'digraph', 'dip', 'dir', 'directory', 'display', + 'dlcomma', 'dy', 'ea', 'ead', 'eadirection', + 'eb', 'ed', 'edcompatible', 'ef', 'efm', + 'ei', 'ek', 'enc', 'encoding', 'endfun', 'endofline', + 'eol', 'ep', 'equalalways', 'equalprg', 'errorbells', + 'errorfile', 'errorformat', 'esckeys', 'et', + 'eventignore', 'ex', 'expandtab', 'exrc', 'fcl', + 'fcs', 'fdc', 'fde', 'fdi', 'fdl', 'fdls', 'fdm', + 'fdn', 'fdo', 'fdt', 'fen', 'fenc', 'fencs', 'fex', + 'ff', 'ffs', 'fileencoding', 'fileencodings', 'fileformat', + 'fileformats', /*'filetype',*/ 'fillchars', 'fk', + 'fkmap', 'flp', 'fml', 'fmr', 'fo', 'foldclose', + 'foldcolumn', 'foldenable', 'foldexpr', 'foldignore', + 'foldlevelstart', 'foldmarker', 'foldmethod', 'foldminlines', + 'foldnestmax', 'foldopen', 'formatexpr', 'formatlistpat', + 'formatoptions', 'formatprg', 'fp', 'fs', 'fsync', 'ft', + 'gcr', 'gd', 'gdefault', 'gfm', 'gfn', 'gfs', 'gfw', + 'ghr', 'go', 'gp', 'grepformat', 'grepprg', 'gtl', + 'gtt', 'guicursor', 'guifont', 'guifontset', + 'guifontwide', 'guiheadroom', 'guioptions', 'guipty', + 'guitablabel', 'guitabtooltip', 'helpfile', + 'helpheight', 'helplang', 'hf', 'hh', 'hid', 'hidden', + 'history', 'hk', 'hkmap', 'hkmapp', 'hkp', 'hl', + 'hlg', 'hls', 'hlsearch', 'ic', 'icon', 'iconstring', + 'ignorecase', 'im', 'imactivatekey', 'imak', 'imc', + 'imcmdline', 'imd', 'imdisable', 'imi', 'iminsert', 'ims', + 'imsearch', 'inc', 'include', 'includeexpr', + 'incsearch', 'inde', 'indentexpr', 'indentkeys', + 'indk', 'inex', 'inf', 'infercase', 'insertmode', 'is', 'isf', + 'isfname', 'isi', 'isident', 'isk', 'iskeyword', + 'isp', 'isprint', 'joinspaces', 'js', 'key', + 'keymap', 'keymodel', 'keywordprg', 'km', 'kmp', 'kp', + 'langmap', 'langmenu', 'laststatus', 'lazyredraw', 'lbr', + 'lcs', 'linebreak', 'lines', 'linespace', 'lisp', + 'lispwords', 'list', 'listchars', 'lm', 'lmap', + 'loadplugins', 'lpl', 'ls', 'lsp', 'lw', 'lz', 'ma', + 'macatsui', 'magic', 'makeef', 'makeprg', 'mat', + 'matchpairs', 'matchtime', 'maxcombine', 'maxfuncdepth', + 'maxmapdepth', 'maxmem', 'maxmempattern', + 'maxmemtot', 'mco', 'mef', 'menuitems', 'mfd', 'mh', + 'mis', 'mkspellmem', 'ml', 'mls', 'mm', 'mmd', 'mmp', + 'mmt', 'mod', 'modeline', 'modelines', 'modifiable', + 'modified', 'more', 'mouse', 'mousef', 'mousefocus', + 'mousehide', 'mousem', 'mousemodel', 'mouses', + 'mouseshape', 'mouset', 'mousetime', 'mp', 'mps', 'msm', + 'mzq', 'mzquantum', 'nf', 'noacd', 'noai', 'noakm', + 'noallowrevins', 'noaltkeymap', 'noanti', 'noantialias', + 'noar', 'noarab', 'noarabic', 'noarabicshape', 'noari', + 'noarshape', 'noautochdir', 'noautoindent', 'noautoread', + 'noautowrite', 'noautowriteall', 'noaw', 'noawa', 'nobackup', + 'noballooneval', 'nobeval', 'nobin', 'nobinary', 'nobiosk', + 'nobioskey', 'nobk', 'nobl', 'nobomb', 'nobuflisted', 'nocf', + 'noci', 'nocin', 'nocindent', 'nocompatible', 'noconfirm', + 'noconsk', 'noconskey', 'nocopyindent', 'nocp', 'nocscopetag', + 'nocscopeverbose', 'nocst', 'nocsverb', 'nocuc', 'nocul', + 'nocursorcolumn', 'nocursorline', 'nodeco', 'nodelcombine', + 'nodg', 'nodiff', 'nodigraph', 'nodisable', 'noea', 'noeb', + 'noed', 'noedcompatible', 'noek', 'noendofline', 'noeol', + 'noequalalways', 'noerrorbells', 'noesckeys', 'noet', + 'noex', 'noexpandtab', 'noexrc', 'nofen', 'nofk', 'nofkmap', + 'nofoldenable', 'nogd', 'nogdefault', 'noguipty', 'nohid', + 'nohidden', 'nohk', 'nohkmap', 'nohkmapp', 'nohkp', 'nohls', + 'nohlsearch', 'noic', 'noicon', 'noignorecase', 'noim', + 'noimc', 'noimcmdline', 'noimd', 'noincsearch', 'noinf', + 'noinfercase', 'noinsertmode', 'nois', 'nojoinspaces', + 'nojs', 'nolazyredraw', 'nolbr', 'nolinebreak', 'nolisp', + 'nolist', 'noloadplugins', 'nolpl', 'nolz', 'noma', + 'nomacatsui', 'nomagic', 'nomh', 'noml', 'nomod', + 'nomodeline', 'nomodifiable', 'nomodified', 'nomore', + 'nomousef', 'nomousefocus', 'nomousehide', 'nonu', + 'nonumber', 'noodev', 'noopendevice', 'nopaste', 'nopi', + 'nopreserveindent', 'nopreviewwindow', 'noprompt', 'nopvw', + 'noreadonly', 'noremap', 'norestorescreen', 'norevins', + 'nori', 'norightleft', 'norightleftcmd', 'norl', 'norlc', + 'noro', 'nors', 'noru', 'noruler', 'nosb', 'nosc', 'noscb', + 'noscrollbind', 'noscs', 'nosecure', 'nosft', 'noshellslash', + 'noshelltemp', 'noshiftround', 'noshortname', 'noshowcmd', + 'noshowfulltag', 'noshowmatch', 'noshowmode', 'nosi', 'nosm', + 'nosmartcase', 'nosmartindent', 'nosmarttab', 'nosmd', + 'nosn', 'nosol', 'nospell', 'nosplitbelow', 'nosplitright', + 'nospr', 'nosr', 'nossl', 'nosta', 'nostartofline', + 'nostmp', 'noswapfile', 'noswf', 'nota', 'notagbsearch', + 'notagrelative', 'notagstack', 'notbi', 'notbidi', 'notbs', + 'notermbidi', 'noterse', 'notextauto', 'notextmode', + 'notf', 'notgst', 'notildeop', 'notimeout', 'notitle', + 'noto', 'notop', 'notr', 'nottimeout', 'nottybuiltin', + 'nottyfast', 'notx', 'novb', 'novisualbell', 'nowa', + 'nowarn', 'nowb', 'noweirdinvert', 'nowfh', 'nowfw', + 'nowildmenu', 'nowinfixheight', 'nowinfixwidth', 'nowiv', + 'nowmnu', 'nowrap', 'nowrapscan', 'nowrite', 'nowriteany', + 'nowritebackup', 'nows', 'nrformats', 'nu', 'number', + 'numberwidth', 'nuw', 'odev', 'oft', 'ofu', + 'omnifunc', 'opendevice', 'operatorfunc', 'opfunc', + 'osfiletype', 'pa', 'para', 'paragraphs', + 'paste', 'pastetoggle', 'patchexpr', + 'patchmode', 'path', 'pdev', 'penc', 'pex', 'pexpr', + 'pfn', 'ph', 'pheader', 'pi', 'pm', 'pmbcs', + 'pmbfn', 'popt', 'preserveindent', 'previewheight', + 'previewwindow', 'printdevice', 'printencoding', 'printexpr', + 'printfont', 'printheader', 'printmbcharset', + 'printmbfont', 'printoptions', 'prompt', 'pt', 'pumheight', + 'pvh', 'pvw', 'qe', 'quoteescape', 'rdt', + 'readonly', 'redrawtime', 'remap', 'report', + 'restorescreen', 'revins', 'ri', 'rightleft', 'rightleftcmd', + 'rl', 'rlc', 'ro', 'rs', 'rtp', 'ru', + 'ruf', 'ruler', 'rulerformat', 'runtimepath', 'sb', 'sbo', + 'sbr', 'sc', 'scb', 'scr', 'scroll', 'scrollbind', + 'scrolljump', 'scrolloff', 'scrollopt', + 'scs', 'sect', 'sections', 'secure', 'sel', + 'selection', 'selectmode', 'sessionoptions', 'sft', + 'sh', 'shcf', 'shell', 'shellcmdflag', 'shellpipe', + 'shellquote', 'shellredir', 'shellslash', + 'shelltemp', 'shelltype', 'shellxquote', 'shiftround', + 'shiftwidth', 'shm', 'shortmess', 'shortname', + 'showbreak', 'showcmd', 'showfulltag', 'showmatch', + 'showmode', 'showtabline', 'shq', 'si', 'sidescroll', + 'sidescrolloff', 'siso', 'sj', 'slm', 'sm', 'smartcase', + 'smartindent', 'smarttab', 'smc', 'smd', 'sn', + 'so', 'softtabstop', 'sol', 'sp', 'spc', 'spell', + 'spellcapcheck', 'spellfile', 'spelllang', + 'spf', 'spl', 'splitbelow', 'splitright', 'spr', + 'sps', 'sr', 'srr', 'ss', 'ssl', 'ssop', 'st', 'sta', + 'stal', 'startofline', 'statusline', 'stl', 'stmp', + 'sts', 'su', 'sua', 'suffixes', 'suffixesadd', 'sw', + 'swapfile', 'swapsync', 'swb', 'swf', 'switchbuf', + 'sws', 'sxq', 'syn', 'synmaxcol', 'ta', + 'tabline', 'tabpagemax', 'tabstop', 'tag', + 'tagbsearch', 'taglength', 'tagrelative', 'tags', 'tagstack', + 'tal', 'tb', 'tbi', 'tbidi', 'tbis', 'tbs', + 'tenc', 'term', 'termbidi', 'termencoding', 'terse', + 'textauto', 'textmode', 'textwidth', 'tf', 'tgst', + 'thesaurus', 'tildeop', 'timeout', 'timeoutlen', + 'title', 'titlelen', 'titleold', 'titlestring', + 'tl', 'tm', 'to', 'toolbar', 'toolbariconsize', 'top', + 'tpm', 'ts', 'tsl', 'tsr', 'ttimeout', + 'ttimeoutlen', 'ttm', 'tty', 'ttybuiltin', 'ttyfast', 'ttym', + 'ttymouse', 'ttyscroll', 'ttytype', 'tw', 'tx', 'uc', + 'ul', 'undolevels', 'updatecount', 'updatetime', 'ut', + 'vb', 'vbs', 'vdir', 've', 'verbose', 'verbosefile', + 'vfile', 'vi', 'viewdir', 'viewoptions', 'viminfo', + 'virtualedit', 'visualbell', 'vop', 'wa', 'wak', + 'warn', 'wb', 'wc', 'wcm', 'wd', 'weirdinvert', 'wfh', + 'wfw', /*'wh',*/ 'whichwrap', 'wi', 'wig', 'wildchar', + 'wildcharm', 'wildignore', 'wildmenu', + 'wildmode', 'wildoptions', 'wim', 'winaltkeys', 'window', + 'winfixheight', 'winfixwidth', 'winheight', + 'winminheight', 'winminwidth', 'winwidth', 'wiv', + 'wiw', 'wm', 'wmh', 'wmnu', 'wmw', 'wop', 'wrap', + 'wrapmargin', 'wrapscan', 'write', 'writeany', + 'writebackup', 'writedelay', 'ws', 'ww' + ), + 3 => array( + 'BufAdd', 'BufCreate', 'BufDelete', 'BufEnter', 'BufFilePost', + 'BufFilePre', 'BufHidden', 'BufLeave', 'BufNew', 'BufNewFile', + 'BufRead', 'BufReadCmd', 'BufReadPost', 'BufReadPre', + 'BufUnload', 'BufWinEnter', 'BufWinLeave', 'BufWipeout', + 'BufWrite', 'BufWriteCmd', 'BufWritePost', 'BufWritePre', + 'Cmd-event', 'CmdwinEnter', 'CmdwinLeave', 'ColorScheme', + 'CursorHold', 'CursorHoldI', 'CursorMoved', 'CursorMovedI', + 'EncodingChanged', 'FileAppendCmd', 'FileAppendPost', + 'FileAppendPre', 'FileChangedRO', 'FileChangedShell', + 'FileChangedShellPost', 'FileEncoding', 'FileReadCmd', + 'FileReadPost', 'FileReadPre', 'FileType', + 'FileWriteCmd', 'FileWritePost', 'FileWritePre', + 'FilterReadPost', 'FilterReadPre', 'FilterWritePost', + 'FilterWritePre', 'FocusGained', 'FocusLost', 'FuncUndefined', + 'GUIEnter', 'GUIFailed', 'InsertChange', 'InsertEnter', + 'InsertLeave', 'MenuPopup', 'QuickFixCmdPost', + 'QuickFixCmdPre', 'RemoteReply', 'SessionLoadPost', + 'ShellCmdPost', 'ShellFilterPost', 'SourceCmd', + 'SourcePre', 'SpellFileMissing', 'StdinReadPost', + 'StdinReadPre', 'SwapExists', 'Syntax', 'TabEnter', + 'TabLeave', 'TermChanged', 'TermResponse', 'User', + 'UserGettingBored', 'VimEnter', 'VimLeave', 'VimLeavePre', + 'VimResized', 'WinEnter', 'WinLeave', 'abs', 'add', 'append', + 'argc', 'argidx', 'argv', 'atan', 'browse', 'browsedir', + 'bufexists', 'buflisted', 'bufloaded', 'bufname', 'bufnr', + 'bufwinnr', 'byte2line', 'byteidx', 'ceil', 'changenr', + 'char2nr', 'cindent', 'clearmatches', 'col', 'complete', + 'complete_add', 'complete_check', 'copy', + 'cos', 'count', 'cscope_connection', 'cursor', 'deepcopy', + 'delete', 'did_filetype', 'diff_filler', 'diff_hlID', + 'empty', 'escape', 'eval', 'eventhandler', 'executable', + 'exists', 'expand', 'extend', 'feedkeys', 'filereadable', + 'filewritable', 'filter', 'finddir', 'findfile', 'float2nr', + 'floor', 'fnameescape', 'fnamemodify', 'foldclosed', + 'foldclosedend', 'foldlevel', 'foldtext', 'foldtextresult', + 'foreground', 'garbagecollect', 'get', 'getbufline', + 'getbufvar', 'getchar', 'getcharmod', 'getcmdline', + 'getcmdpos', 'getcmdtype', 'getcwd', 'getfontname', + 'getfperm', 'getfsize', 'getftime', 'getftype', 'getline', + 'getloclist', 'getmatches', 'getpid', 'getpos', 'getqflist', + 'getreg', 'getregtype', 'gettabwinvar', 'getwinposx', + 'getwinposy', 'getwinvar', 'glob', 'globpath', 'has', + 'has_key', 'haslocaldir', 'hasmapto', 'histadd', 'histdel', + 'histget', 'histnr', 'hlID', 'hlexists', 'hostname', 'iconv', + 'indent', 'index', 'input', 'inputdialog', 'inputlist', + 'inputrestore', 'inputsave', 'inputsecret', 'insert', + 'isdirectory', 'islocked', 'items', 'join', 'keys', 'len', + 'libcall', 'libcallnr', 'line', 'line2byte', 'lispindent', + 'localtime', 'log10', 'maparg', 'mapcheck', 'matchadd', + 'matcharg', 'matchdelete', 'matchend', 'matchlist', + 'matchstr', 'max', 'min', 'mkdir', 'mode', 'nextnonblank', + 'nr2char', 'off', 'on', 'pathshorten', 'plugin', 'pow', + 'prevnonblank', 'printf', 'pumvisible', 'range', 'readfile', + 'reltime', 'reltimestr', 'remote_expr', 'remote_foreground', + 'remote_peek', 'remote_read', 'remote_send', 'remove', + 'rename', 'repeat', 'resolve', 'reverse', 'round', 'search', + 'searchdecl', 'searchpair', 'searchpairpos', 'searchpos', + 'server2client', 'serverlist', 'setbufvar', 'setcmdpos', + 'setline', 'setloclist', 'setmatches', 'setpos', 'setqflist', + 'setreg', 'settabwinvar', 'setwinvar', 'shellescape', + 'simplify', 'sin', 'sort', 'soundfold', 'spellbadword', + 'spellsuggest', 'split', 'sqrt', 'str2float', 'str2nr', + 'strftime', 'stridx', 'string', 'strlen', 'strpart', + 'strridx', 'strtrans', 'submatch', 'substitute', + 'synID', 'synIDattr', 'synIDtrans', 'synstack', 'system', + 'tabpagebuflist', 'tabpagenr', 'tabpagewinnr', 'tagfiles', + 'taglist', 'tempname', 'tolower', 'toupper', 'trunc', + 'type', 'values', 'virtcol', 'visualmode', 'winbufnr', + 'wincol', 'winline', 'winnr', 'winrestcmd', + 'winrestview', 'winsaveview', 'writefile' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', '%', '&', '*', '|', '/', '<', '>', + '^', '-', '+', '~', '?', ':', '$', '@', '.' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true + ), + 'STYLES' => array( + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', +// 2 => 'color: #009966; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'KEYWORDS' => array( + 1 => 'color: #804040;', + 2 => 'color: #668080;', + 3 => 'color: #25BB4D;' + ), + 'METHODS' => array( + 0 => 'color: #000000;', + ), + 'NUMBERS' => array( + 0 => 'color: #000000; font-weight:bold;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ), + 'STRINGS' => array( + 0 => 'color: #C5A22D;' + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, //Save some time as OO identifiers aren't used + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array(), + 'HIGHLIGHT_STRICT_BLOCK' => array() +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/visualfoxpro.php b/_piecrust/libs/Geshi/geshi/visualfoxpro.php new file mode 100644 index 0000000..a14bed8 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/visualfoxpro.php @@ -0,0 +1,456 @@ + 'Visual Fox Pro', + 'COMMENT_SINGLE' => array(1 => "//", 2 => "\n*"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'Case', 'Else', '#Else', 'Then', + 'Endcase', 'Enddefine', 'Enddo', 'Endfor', 'Endfunc', 'Endif', 'Endprintjob', + 'Endproc', 'Endscan', 'Endtext', 'Endwith', '#Endif', + '#Elif','#Define','#If','#Include', + '#Itsexpression','#Readclauses','#Region','#Section','#Undef','#Wname', + 'Define','Do', + 'For','Function','Hidden', + 'If','Local','Lparameter','Lparameters','Next','Otherwise', + 'Parameters','Printjob','Procedure','Protected','Public','Scan', + 'Text','While','With','Abs','Accept','Access','Aclass','Acopy', + 'Acos','Adatabases','Adbobjects','Addbs','Addrelationtoenv','Addtabletoenv', + 'Adel','Adir','Aelement','Aerror','Afields','Afont', + 'Agetclass','Agetfileversion','Ains','Ainstance','Alen','Align', + 'Alines','Alltrim','Alter','Amembers','Amouseobj','Anetresources', + 'Ansitooem','Append','Aprinters','Ascan','Aselobj','Asin', + 'Asort','Assert','Asserts','Assist','Asubscript','Asynchronous', + 'At_c','Atan','Atc','Atcc','Atcline','Atline', + 'Atn2','Aused','Autoform','Autoreport','Avcxclasses','Average', + 'BarCount','BarPrompt','BatchMode','BatchUpdateCount','Begin','BellSound', + 'BinToC','Bitand','Bitclear','Bitlshift','Bitnot', + 'Bitor','Bitrshift','Bitset','Bittest','Bitxor','Bof', + 'Browse','BrowseRefresh','Buffering','BuilderLock','COMArray','COMReturnError', + 'CToBin','Calculate','Call','Capslock','Cd','Cdow', + 'Ceiling','Central','Change','Char','Chdir','Chr', + 'Chrsaw','Chrtran','Chrtranc','Close','Cmonth','Cntbar', + 'Cntpad','Col','Comclassinfo','CommandTargetQuery','Compile','Completed', + 'Compobj','Compute','Concat','ConnectBusy','ConnectHandle','ConnectName', + 'ConnectString','ConnectTimeOut','ContainerReleaseType','Continue','Copy','Cos', + 'Cot','Count','Coverage','Cpconvert','Cpcurrent','Cpdbf', + 'Cpnotrans','Create','CreateBinary','Createobject','Createobjectex','Createoffline', + 'CrsBuffering','CrsFetchMemo','CrsFetchSize','CrsMaxRows','CrsMethodUsed','CrsNumBatch', + 'CrsShareConnection','CrsUseMemoSize','CrsWhereClause','Ctod','Ctot', + 'Curdate','Curdir','CurrLeft','CurrSymbol','CursorGetProp','CursorSetProp', + 'Curtime','Curval','DBGetProp','DBSetProp','DB_BufLockRow','DB_BufLockTable', + 'DB_BufOff','DB_BufOptRow','DB_BufOptTable','DB_Complette','DB_DeleteInsert','DB_KeyAndModified', + 'DB_KeyAndTimestamp','DB_KeyAndUpdatable','DB_LocalSQL','DB_NoPrompt','DB_Prompt','DB_RemoteSQL', + 'DB_TransAuto','DB_TransManual','DB_TransNone','DB_Update','Datetime','Day', + 'Dayname','Dayofmonth','Dayofweek','Dayofyear','Dbalias','Dbused', + 'Ddeaborttrans','Ddeadvise','Ddeenabled','Ddeexecute','Ddeinitiate','Ddelasterror', + 'Ddepoke','Dderequest','Ddesetoption','Ddesetservice','Ddesettopic','Ddeterminate', + 'Debugout','Declare','DefOLELCid','DefaultValue','Defaultext','Degrees', + 'DeleteTrigger','Desc','Description','Difference','Dimension','Dir', + 'Directory','Diskspace','DispLogin','DispWarnings','Display','Dll', + 'Dmy','DoDefault','DoEvents','Doc','Dow', + 'Drivetype','Drop','Dropoffline','Dtoc','Dtor','Dtos', + 'Dtot','DynamicInputMask','Each','Edit','Eject','Elif', + 'End','Eof','Erase','Evaluate','Event','Eventtracking', + 'Exclude','Exclusive','Exit','Exp','Export','External', + 'FDate','FTime','Fchsize','Fclose','Fcount','Fcreate', + 'Feof','Ferror','FetchMemo','FetchSize','Fflush','Fgets', + 'Filer','Filetostr','Find','Fklabel','Fkmax','Fldlist', + 'Flock','Floor','Flush','Fontmetric','Fopen','Forceext', + 'Forcepath','FormSetClass','FormSetLib','FormsClass','FormsLib','Found', + 'FoxPro','Foxcode','Foxdoc','Foxgen','Foxgraph','Foxview', + 'Fputs','Fread','French','Fseek','Fsize','Fv', + 'Fwrite','Gather','German','GetPem','Getbar','Getcolor', + 'Getcp','Getdir','Getenv','Getexpr','Getfile','Getfldstate', + 'Getfont','Gethost','Getnextmodified','Getobject','Getpad','Getpict', + 'Getprinter','Go','Gomonth','Goto','Graph','GridHorz', + 'GridShow','GridShowPos','GridSnap','GridVert','Help','HelpOn', + 'HelpTo','HighLightRow','Home','Hour','IMEStatus','IdleTimeOut', + 'Idxcollate','Ifdef','Ifndef','Iif','Import','Include', + 'Indbc','Index','Indexseek','Inkey','Inlist','Input', + 'Insert','InsertTrigger','Insmode','IsBlank','IsFLocked','IsLeadByte', + 'IsMouse','IsNull','IsRLocked','Isalpha','Iscolor','Isdigit', + 'IsExclusive','Ishosted','IsLower','IsReadOnly', + 'IsUpper','Italian','Japan','Join','Justdrive','Justext', + 'Justfname','Justpath','Juststem','KeyField','KeyFieldList','Keyboard' + ), + 2 => array('Keymatch','LastProject','Lastkey','Lcase','Leftc','Len', + 'Lenc','Length','Likec','Lineno','LoadPicture', + 'Locate','Locfile','Log','Log10','Logout','Lookup', + 'Loop','Lower','Ltrim','Lupdate','Mail','MaxRecords', + 'Mcol','Md','Mdown','Mdx','Mdy','Memlines', + 'Menu','Messagebox','Minute','Mkdir','Mline','Modify', + 'Month','Monthname','Mouse','Mrkbar','Mrkpad','Mrow', + 'Mtdll','Mton','Mwindow','Native','Ndx','Network', + 'NoFilter','Nodefault','Normalize','Note','Now','Ntom', + 'NullString','Numlock','Nvl','ODBChdbc','ODBChstmt','OLEDropTextInsertion', + 'OLELCid','Objnum','Objref','Objtoclient','Objvar','Occurs', + 'Oemtoansi','Oldval','OlePublic','Olereturnerror','On','Open', + 'Oracle','Order','Os','Outer','PCount','Pack', + 'PacketSize','Padc','Padl','Padr','Payment','Pcol', + 'PemStatus','Pi','Pivot','Play','Pop','Popup', + 'Power','PrimaryKey','Printstatus','Private','Prmbar','Prmpad', + 'ProjectClick','Proper','Prow','Prtinfo','Push','Putfile', + 'Pv','Qpr','Quater','QueryTimeOut','Quit','Radians', + 'Rand','Rat','Ratc','Ratline','Rd','Rdlevel', + 'Read','Readkey','Recall','Reccount','RecentlyUsedFiles','Recno', + 'Recsize','Regional','Reindex','RelatedChild','RelatedTable','RelatedTag', + 'Remove','Rename','Repeat','Replace','Replicate','Report', + 'ResHeight','ResWidth','ResourceOn','ResourceTo','Resources','Restore', + 'Resume','Retry','Return','Revertoffline','Rgbscheme','Rightc', + 'Rlock','Rmdir','Rollback','Round','Rtod','Rtrim', + 'RuleExpression','RuleText','Run','Runscript','Rview','SQLAsynchronous', + 'SQLBatchMode','SQLCancel','SQLColumns','SQLConnect','SQLConnectTimeOut','SQLDisconnect', + 'SQLDispLogin','SQLDispWarnings','SQLExec','SQLGetProp','SQLIdleTimeOut','SQLMoreResults', + 'SQLPrepare','SQLQueryTimeOut','SQLSetProp','SQLTables','SQLTransactions','SQLWaitTime', + 'Save','SavePicture','ScaleUnits','Scatter','Scols', + 'Scroll','Sec','Second','Seek','Select','SendUpdates', + 'Set','SetDefault','Setfldstate','Setup','ShareConnection','ShowOLEControls', + 'ShowOLEInsertable','ShowVCXs','Sign','Sin','Size','SizeBox', + 'Skpbar','Skppad','Sort','Soundex','SourceName','Sqlcommit', + 'Sqll','Sqlrollback','Sqlstringconnect','Sqrt','Srows','StatusBar', + 'Store','Str','Strconv','Strtofile','Strtran','Stuff', + 'Stuffc','Substr','Substrc','Substring','Sum','Suspend', + 'Sys','Sysmetric','TabOrdering','Table','TableRefresh','Tablerevert', + 'Tableupdate','TagCount','TagNo','Tan','Target','This', + 'Thisform','Thisformset','Timestamp','Timestampdiff','Total','Transactions', + 'Transform','Trim','Truncate','Ttoc','Ttod','Txnlevel', + 'Txtwidth','Type','Ucase','Undefine','Unlock','Unpack', + 'Updatable','UpdatableFieldList','Update','UpdateName','UpdateNameList','UpdateTrigger', + 'UpdateType','Updated','Upper','Upsizing','Usa','Use', + 'UseMemoSize','Used','Val','Validate','Varread','Vartype', + 'Version','VersionLanguage','Wait','WaitTime','Wborder','Wchild', + 'Wcols','Week','Wexist','Wfont','WhereType','Windcmd', + 'Windhelp','Windmemo','Windmenu','Windmodify','Windquery','Windscreen', + 'Windsnip','Windstproc','WizardPrompt','Wlast','Wlcol','Wlrow', + 'Wmaximum','Wminimum','Wontop','Woutput','Wparent','Wread', + 'Wrows','Wtitle','Wvisible','Year','Zap','_Alignment', + '_Asciicols','_Asciirows','_Assist','_Beautify','_Box','_Browser', + '_Builder','_Calcmem','_Calcvalue','_Cliptext','_Converter','_Coverage', + '_Curobj','_Dblclick','_Diarydate','_Dos','_Foxdoc','_Foxgraph', + '_Gallery','_Gengraph','_Genhtml','_Genmenu','_Genpd','_Genscrn', + '_Genxtab','_Getexpr','_Include','_Indent','_Lmargin','_Mac', + '_Mbr_appnd','_Mbr_cpart','_Mbr_delet','_Mbr_font','_Mbr_goto','_Mbr_grid', + '_Mbr_link','_Mbr_mode','_Mbr_mvfld','_Mbr_mvprt','_Mbr_seek','_Mbr_sp100', + '_Mbr_sp200','_Mbr_szfld','_Mbrowse','_Mda_appnd','_Mda_avg','_Mda_brow', + '_Mda_calc','_Mda_copy','_Mda_count','_Mda_label','_Mda_pack','_Mda_reprt', + '_Mda_rindx','_Mda_setup','_Mda_sort','_Mda_sp100','_Mda_sp200','_Mda_sp300', + '_Mda_sum','_Mda_total','_Mdata','_Mdiary','_Med_clear','_Med_copy', + '_Med_cut','_Med_cvtst','_Med_find','_Med_finda','_Med_goto','_Med_insob', + '_Med_link','_Med_obj','_Med_paste','_Med_pref','_Med_pstlk','_Med_redo', + '_Med_repl','_Med_repla','_Med_slcta','_Med_sp100','_Med_sp200','_Med_sp300', + '_Med_sp400','_Med_sp500','_Med_undo','_Medit','_Mfi_clall','_Mfi_close', + '_Mfi_export','_Mfi_import','_Mfi_new','_Mfi_open','_Mfi_pgset','_Mfi_prevu', + '_Mfi_print','_Mfi_quit','_Mfi_revrt','_Mfi_savas','_Mfi_save','_Mfi_send', + '_Mfi_setup','_Mfi_sp100','_Mfi_sp200','_Mfi_sp300','_Mfi_sp400','_Mfile', + '_Mfiler','_Mfirst','_Mlabel','_Mlast','_Mline','_Mmacro', + '_Mmbldr','_Mpr_beaut','_Mpr_cancl','_Mpr_compl','_Mpr_do','_Mpr_docum', + '_Mpr_formwz','_Mpr_gener','_Mpr_graph','_Mpr_resum','_Mpr_sp100','_Mpr_sp200', + '_Mpr_sp300','_Mpr_suspend','_Mprog','_Mproj','_Mrc_appnd','_Mrc_chnge', + '_Mrc_cont','_Mrc_delet','_Mrc_goto','_Mrc_locat','_Mrc_recal','_Mrc_repl', + '_Mrc_seek','_Mrc_sp100','_Mrc_sp200','_Mrecord','_Mreport','_Mrqbe', + '_Mscreen','_Msm_data','_Msm_edit','_Msm_file','_Msm_format','_Msm_prog', + '_Msm_recrd','_Msm_systm','_Msm_text','_Msm_tools','_Msm_view','_Msm_windo', + '_Mst_about','_Mst_ascii','_Mst_calcu','_Mst_captr','_Mst_dbase','_Mst_diary', + '_Mst_filer','_Mst_help','_Mst_hphow','_Mst_hpsch','_Mst_macro','_Mst_office', + '_Mst_puzzl','_Mst_sp100','_Mst_sp200','_Mst_sp300','_Mst_specl','_Msysmenu', + '_Msystem','_Mtable','_Mtb_appnd','_Mtb_cpart','_Mtb_delet','_Mtb_delrc', + '_Mtb_goto','_Mtb_link','_Mtb_mvfld','_Mtb_mvprt','_Mtb_props','_Mtb_recal', + '_Mtb_sp100','_Mtb_sp200','_Mtb_sp300','_Mtb_sp400','_Mtb_szfld','_Mwi_arran', + '_Mwi_clear','_Mwi_cmd','_Mwi_color','_Mwi_debug','_Mwi_hide','_Mwi_hidea', + '_Mwi_min','_Mwi_move','_Mwi_rotat','_Mwi_showa','_Mwi_size','_Mwi_sp100', + '_Mwi_sp200','_Mwi_toolb','_Mwi_trace','_Mwi_view','_Mwi_zoom','_Mwindow', + '_Mwizards','_Mwz_all','_Mwz_form','_Mwz_foxdoc','_Mwz_import','_Mwz_label', + '_Mwz_mail','_Mwz_pivot','_Mwz_query','_Mwz_reprt','_Mwz_setup','_Mwz_table', + '_Mwz_upsizing','_Netware','_Oracle','_Padvance','_Pageno','_Pbpage', + '_Pcolno','_Pcopies','_Pdparms','_Pdriver','_Pdsetup','_Pecode', + '_Peject','_Pepage','_Pform','_Plength','_Plineno','_Ploffset', + '_Ppitch','_Pquality','_Pretext','_Pscode','_Pspacing','_Pwait', + '_Rmargin','_Runactivedoc','_Samples','_Screen','_Shell','_Spellchk', + '_Sqlserver','_Startup','_Tabs','_Tally','_Text','_Throttle', + '_Transport','_Triggerlevel','_Unix','_WebDevOnly','_WebMenu','_WebMsftHomePage', + '_WebVFPHomePage','_WebVfpOnlineSupport','_Windows','_Wizard','_Wrap','_scctext', + '_vfp','Additive','After','Again','Aindent','Alignright', + 'All','Alt','Alternate','And','Ansi','Any', + 'Aplabout','App','Array','As','Asc','Ascending', + 'Ascii','At','Attributes','Automatic','Autosave','Avg', + 'Bar','Before','Bell','Between','Bitmap','Blank', + 'Blink','Blocksize','Border','Bottom','Brstatus','Bucket', + 'Buffers','By','Candidate','Carry','Cascade','Catalog', + 'Cdx','Center','Century','Cga','Character','Check', + 'Classlib','Clock','Cnt','Codepage','Collate','Color', + 'Com1','Com2','Command','Compact','Compatible','Compress', + 'Confirm','Connection','Connections','Connstring','Console','Copies', + 'Cpcompile','Cpdialog','Csv','Currency','Cycle','Databases', + 'Datasource','Date','Db4','Dbc','Dbf','Dbmemo3', + 'Debug','Decimals','Defaultsource','Deletetables','Delimited','Delimiters', + 'Descending','Design','Development','Device','Dif','Disabled', + 'Distinct','Dlls','Dohistory','Dos','Dosmem','Double', + 'Driver','Duplex','Echo','Editwork','Ega25','Ega43', + 'Ems','Ems64','Encrypt','Encryption','Environment','Escape', + 'Events','Exact','Except','Exe','Exists','Expression', + 'Extended','F','Fdow','Fetch','Field','Fields', + 'File','Files','Fill','Fixed','Float','Foldconst', + 'Font','Footer','Force','Foreign','Fox2x','Foxplus', + 'Free','Freeze','From','Fullpath','Fw2','Fweek', + 'Get','Gets','Global','Group','Grow','Halfheight', + 'Having','Heading','Headings','Helpfilter','History','Hmemory', + 'Hours','Id','In','Indexes','Information','Instruct', + 'Int','Integer','Intensity','Intersect','Into','Is', + 'Isometric','Key','Keycolumns','Keycomp','Keyset','Last', + 'Ledit','Level','Library','Like','Linked','Lock', + 'Logerrors','Long','Lpartition','Mac','Macdesktop','Machelp', + 'Mackey','Macros','Mark','Master','Max','Maxmem', + 'Mdi','Memlimit','Memory','Memos','Memowidth','Memvar', + 'Menus','Messages','Middle','Min','Minimize','Minus', + 'Mod','Modal','Module','Mono43','Movers','Multilocks', + 'Mvarsiz','Mvcount','N','Near','Negotiate','Noalias', + 'Noappend','Noclear','Noclose','Noconsole','Nocptrans','Nodata', + 'Nodebug','Nodelete','Nodup','Noedit','Noeject','Noenvironment', + 'Nofloat','Nofollow','Nogrow','Noinit','Nolgrid','Nolink', + 'Nolock','Nomargin','Nomdi','Nomenu','Nominimize','Nomodify' + ), + 3 => array('Nomouse','None','Nooptimize','Nooverwrite','Noprojecthook','Noprompt', + 'Noread','Norefresh','Norequery','Norgrid','Norm','Normal', + 'Nosave','Noshadow','Noshow','Nospace','Not','Notab', + 'Notify','Noupdate','Novalidate','Noverify','Nowait','Nowindow', + 'Nowrap','Nozoom','Npv','Null','Number','Objects', + 'Odometer','Of','Off','Oleobjects','Only','Optimize', + 'Or','Orientation','Output','Outshow','Overlay','Overwrite', + 'Pad','Palette','Paperlength','Papersize','Paperwidth','Password', + 'Path','Pattern','Pause','Pdox','Pdsetup','Pen', + 'Pfs','Pixels','Plain','Popups','Precision','Preference', + 'Preview','Primary','Printer','Printquality','Procedures','Production', + 'Program','Progwork','Project','Prompt','Query','Random', + 'Range','Readborder','Readerror','Record','Recover','Redit', + 'Reference','References','Relative','Remote','Reprocess','Resource', + 'Rest','Restrict','Rgb','Right','Row','Rowset', + 'Rpd','Runtime','Safety','Same','Sample','Say', + 'Scale','Scheme','Scoreboard','Screen','Sdf','Seconds', + 'Selection','Shadows','Shared','Sheet','Shell','Shift', + 'Shutdown','Single','Some','Sortwork','Space','Sql', + 'Standalone','Status','Std','Step','Sticky','String', + 'Structure','Subclass','Summary','Sylk','Sysformats','Sysmenus', + 'System','T','Tab','Tables','Talk','Tedit', + 'Textmerge','Time','Timeout','Titles','Tmpfiles','To', + 'Topic','Transaction','Trap','Trbetween','Trigger','Ttoption', + 'Typeahead','Udfparms','Union','Unique','Userid','Users', + 'Values','Var','Verb','Vga25','Vga50','Views', + 'Volume','Where','Windows','Wk1','Wk3','Wks', + 'Workarea','Wp','Wr1','Wrap','Wrk','Xcmdfile', + 'Xl5','Xl8','Xls','Y','Yresolution','Zoom', + 'Activate','ActivateCell','Add','AddColumn','AddItem','AddListItem', + 'AddObject','AddProperty','AddToSCC','AfterBuild','AfterCloseTables','AfterDock', + 'AfterRowColChange','BeforeBuild','BeforeDock','BeforeOpenTables','BeforeRowColChange','Box', + 'Build','CheckIn','CheckOut','Circle','Clear','ClearData', + 'Cleanup','Click','CloneObject','CloseEditor','CloseTables','Cls', + 'CommandTargetExec','CommandTargetQueryStas','ContainerRelease','DataToClip','DblClick','Deactivate', + 'Delete','DeleteColumn','Deleted','Destroy','DoCmd','Dock', + 'DoScroll','DoVerb','DownClick','Drag','DragDrop','DragOver', + 'DropDown','Draw','EnterFocus','Error','ErrorMessage','Eval', + 'ExitFocus','FormatChange','GetData','GetFormat','GetLatestVersion','GoBack', + 'GotFocus','GoForward','GridHitTest','Hide','HideDoc','IndexToItemId', + 'Init','InteractiveChange','Item','ItemIdToIndex','KeyPress','Line', + 'Load','LostFocus','Message','MiddleClick','MouseDown','MouseMove', + 'MouseUp','MouseWheel','Move','Moved','NavigateTo','Newobject', + 'OLECompleteDrag','OLEDrag','OLEDragDrop','OLEDragOver','OLEGiveFeedback','OLESetData', + 'OLEStartDrag','OpenEditor','OpenTables','Paint','Point','Print', + 'ProgrammaticChange','PSet','QueryAddFile','QueryModifyFile','QueryRemoveFile','QueryRunFile', + 'QueryUnload','RangeHigh','RangeLow','ReadActivate','ReadExpression','ReadDeactivate', + 'ReadMethod','ReadShow','ReadValid','ReadWhen','Refresh','Release', + 'RemoveFromSCC','RemoveItem','RemoveListItem','RemoveObject','Requery','RequestData', + 'Reset','ResetToDefault','Resize','RightClick','SaveAs','SaveAsClass', + 'Scrolled','SetAll','SetData','SetFocus','SetFormat','SetMain', + 'SetVar','SetViewPort','ShowDoc','ShowWhatsThis','TextHeight','TextWidth', + 'Timer','UIEnable','UnDock','UndoCheckOut','Unload','UpClick', + 'Valid','WhatsThisMode','When','WriteExpression','WriteMethod','ZOrder', + 'ATGetColors','ATListColors','Accelerate','ActiveColumn','ActiveControl','ActiveForm', + 'ActiveObjectId','ActivePage','ActiveProject','ActiveRow','AddLineFeeds','Alias', + 'Alignment','AllowAddNew','AllowHeaderSizing','AllowResize','AllowRowSizing','AllowTabs', + 'AlwaysOnTop','Application','AutoActivate','AutoCenter','AutoCloseTables','AutoIncrement', + 'AutoOpenTables','AutoRelease','AutoSize','AutoVerbMenu','AutoYield','AvailNum', + 'BackColor','BackStyle','BaseClass','BorderColor','BorderStyle','BorderWidth', + 'Bound','BoundColumn','BoundTo','BrowseAlignment','BrowseCellMarg','BrowseDestWidth', + 'BufferMode','BufferModeOverride','BuildDateTime','ButtonCount','ButtonIndex','Buttons', + 'CLSID','CanAccelerate','CanGetFocus','CanLoseFocus','Cancel','Caption', + 'ChildAlias','ChildOrder','Class','ClassLibrary','ClipControls','ClipRect', + 'Closable','ColorScheme','ColorSource','ColumnCount','ColumnHeaders','ColumnLines', + 'ColumnOrder','ColumnWidths','Columns','Comment','ContinuousScroll','ControlBox', + 'ControlCount','ControlIndex','ControlSource','Controls','CurrentControl','CurrentX', + 'CurrentY','CursorSource','Curvature','DataSession','DataSessionId','DataSourceObj', + 'DataType','Database','DateFormat','DateMark','DefButton','DefButtonOrig', + 'DefHeight','DefLeft','DefTop','DefWidth','Default','DefaultFilePath', + 'DefineWindows','DeleteMark','Desktop','Dirty','DisabledBackColor','DisabledByEOF', + 'DisabledForeColor','DisabledItemBackColor','DisabledItemForeColor','DisabledPicture','DispPageHeight','DispPageWidth', + 'DisplayCount','DisplayValue','DoCreate','DockPosition','Docked','DocumentFile', + 'DownPicture','DragIcon','DragMode','DragState','DrawMode','DrawStyle', + 'DrawWidth','DynamicAlignment','DynamicBackColor','DynamicCurrentControl','DynamicFontBold','DynamicFontItalic', + 'DynamicFontName','DynamicFontOutline','DynamicFontShadow','DynamicFontSize','DynamicFontStrikethru','DynamicFontUnderline', + 'DynamicForeColor','EditFlags','Enabled','EnabledByReadLock','Encrypted','EnvLevel', + 'ErasePage','FileClass','FileClassLibrary','FillColor','FillStyle','Filter', + 'FirstElement','FontBold','FontItalic','FontName','FontOutline','FontShadow', + 'FontSize','FontStrikethru','FontUnderline','ForceFocus','ForeColor','FormCount', + 'FormIndex','FormPageCount','FormPageIndex','Format','Forms','FoxFont', + 'FullName','GoFirst','GoLast','GridLineColor','GridLineWidth','GridLines' + ), + 4 => array('HPROJ','HWnd','HalfHeightCaption','HasClip','HeaderGap','HeaderHeight', + 'Height','HelpContextID','HideSelection','Highlight','HomeDir','HostName', + 'HotKey','HscrollSmallChange','IMEMode','Icon','IgnoreInsert','InResize', + 'Increment','IncrementalSearch','InitialSelectedAlias','InputMask','Instancing','IntegralHeight', + 'Interval','ItemBackColor','ItemData','ItemForeColor','ItemIDData','ItemTips', + 'JustReadLocked','KeyPreview','KeyboardHighValue','KeyboardLowValue','LastModified','Left', + 'LeftColumn','LineSlant','LinkMaster','List','ListCount','ListIndex', + 'ListItem','ListItemId','LockDataSource','LockScreen','MDIForm','MainClass', + 'MainFile','Margin','MaxButton','MaxHeight','MaxLeft','MaxLength', + 'MaxTop','MaxWidth','MemoWindow','MinButton','MinHeight','MinWidth', + 'MouseIcon','MousePointer','Movable','MoverBars','MultiSelect','Name', + 'NapTime','NewIndex','NewItemId','NoDataOnLoad','NoDefine','NotifyContainer', + 'NullDisplay','NumberOfElements','OLEDragMode','OLEDragPicture','OLEDropEffects','OLEDropHasData', + 'OLEDropMode','OLERequestPendingTimeOut','OLEServerBusyRaiseError','OLEServerBusyTimeOut','OLETypeAllowed','OleClass', + 'OleClassId','OleControlContainer','OleIDispInValue','OleIDispOutValue','OleIDispatchIncoming','OleIDispatchOutgoing', + 'OnResize','OneToMany','OpenViews','OpenWindow','PageCount','PageHeight', + 'PageOrder','PageWidth','Pages','Panel','PanelLink','Parent', + 'ParentAlias','ParentClass','Partition','PasswordChar','Picture','ProcessID', + 'ProgID','ProjectHookClass','ProjectHookLibrary','Projects','ReadColors','ReadCycle', + 'ReadFiller','ReadLock','ReadMouse','ReadOnly','ReadSave','ReadSize', + 'ReadTimeout','RecordMark','RecordSource','RecordSourceType','Rect','RelationalExpr', + 'RelativeColumn','RelativeRow','ReleaseErase','ReleaseType','ReleaseWindows','Resizable', + 'RightToLeft','RowHeight','RowSource','RowSourceType','SCCProvider','SCCStatus', + 'SDIForm','ScaleMode','ScrollBars','SelLength','SelStart','SelText', + 'SelectOnEntry','Selected','SelectedBackColor','SelectedForeColor','SelectedID','SelectedItemBackColor', + 'SelectedItemForeColor','SelfEdit','ServerClass','ServerClassLibrary','ServerHelpFile','ServerName', + 'ServerProject','ShowTips','ShowWindow','Sizable','Size','Size', + 'Size','Skip','SkipForm','Sorted','SourceType','Sparse', + 'SpecialEffect','SpinnerHighValue','SpinnerLowValue','SplitBar','StartMode','StatusBarText', + 'Stretch','StrictDateEntry','Style','SystemRefCount','TabIndex','TabStop', + 'TabStretch','TabStyle','Tabhit','Tabs','Tag','TerminateRead', + 'ThreadID','TitleBar','ToolTipText','Top','TopIndex','TopItemId', + 'TypeLibCLSID','TypeLibDesc','TypeLibName','UnlockDataSource','Value','ValueDirty', + 'VersionComments','VersionCompany','VersionCopyright','VersionDescription','VersionNumber','VersionProduct', + 'VersionTrademarks','View','ViewPortHeight','ViewPortLeft','ViewPortTop','ViewPortWidth', + 'Visible','VscrollSmallChange','WasActive','WasOpen','WhatsThisButton','WhatsThisHelp', + 'WhatsThisHelpID','Width','WindowList','WindowNTIList','WindowState','WindowType', + 'WordWrap','ZOrderSet','ActiveDoc','Checkbox','Column','ComboBox', + 'CommandButton','CommandGroup','Container','Control','Cursor','Custom', + 'DataEnvironment','EditBox','Empty','FontClass','Form','Formset', + 'General','Grid','Header','HyperLink','Image','Label', + 'ListBox','Memo','OleBaseControl','OleBoundControl','OleClassIDispOut','OleControl', + 'OptionButton','OptionGroup','Page','PageFrame','ProjectHook','RectClass', + 'Relation','Session','Shape','Spinner','TextBox' ,'Toolbar' + ), + ), + 'SYMBOLS' => array( + "!", "@", "$", "%", + "(", ")", "{", "}", "[", "]", + "-", "+", "*", "/", + "=", "<", ">", + ":", ";", ",", ".", "&", + "?", "??", "???" + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: blue;', + 2 => 'color: blue;', + 3 => 'color: blue;', + 4 => 'color: blue;' + ), + 'COMMENTS' => array( + 1 => 'color: green; font-style: italic;', + 2 => 'color: green; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: blue;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 1 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: blue;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/visualprolog.php b/_piecrust/libs/Geshi/geshi/visualprolog.php new file mode 100644 index 0000000..2182719 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/visualprolog.php @@ -0,0 +1,129 @@ + 'Visual Prolog', + 'COMMENT_SINGLE' => array(1 => '%'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'HARDQUOTE' => array('@"', '"'), + 'HARDESCAPE' => array('""'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + 'clauses','constants','constructors','delegate','domains','facts', + 'goal','guards','inherits','monitor','namespace','open', + 'predicates','properties','resolve','supports' + ), + 2 => array( + 'align','and','anyflow','as','bitsize','catch','determ','digits', + 'div','do','else','elseif','erroneous','externally','failure', + 'finally','from','language','mod','multi','nondeterm','or', + 'procedure','quot','rem','single','then','to' + ), + 3 => array( + '#bininclude','#else','#elseif','#endif','#error','#export', + '#externally','#if','#import','#include','#message','#options', + '#orrequires','#requires','#then','#warning' + ), + ), + 'SYMBOLS' => array( + '+', '-', '*', '?', '=', '/', '>', '<', '^', '!', ':', '(', ')', '{', '}', '[', ']' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => true, + 1 => true, + 2 => true, + 3 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #808000;', + 2 => 'color: #333399;', + 3 => 'color: #800080;', + ), + 'COMMENTS' => array( + 1 => 'color: #AA77BD', + 'MULTI' => 'color: #AA77BD' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #008080;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #00B7B7;' + ), + 'NUMBERS' => array( + 0 => 'color: #0000FF;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #000000;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + 0 => 'color: #008000;', + 1 => 'color: #808000;', + 2 => 'color: #333399;', + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => ':', + 2 => '::' + ), + 'REGEXPS' => array( + 0 => "(?)[A-Z_]\w*(?!\w)", + 1 => "\\b(end\\s+)?(implement|class|interface)\\b", + 2 => "\\b(end\\s+)?(foreach|if|try)\\b", + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/whitespace.php b/_piecrust/libs/Geshi/geshi/whitespace.php new file mode 100644 index 0000000..91186d3 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/whitespace.php @@ -0,0 +1,121 @@ + 'Whitespace', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + 3 => "/[^\n\x20\x09]+/s" + ), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + ), + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + ), + 'COMMENTS' => array( + 3 => 'color: #666666; font-style: italic;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + ), + 'ESCAPE_CHAR' => array( + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + 2 => 'background-color: #FF9999;', + 3 => 'background-color: #9999FF;' + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 2 => array( + GESHI_SEARCH => "(? " ", + GESHI_MODIFIERS => 's', + GESHI_BEFORE => "", + GESHI_AFTER => "" + ), + 3 => array( + GESHI_SEARCH => "\x09", + GESHI_REPLACE => " ", + GESHI_MODIFIERS => 's', + GESHI_BEFORE => "", + GESHI_AFTER => "" + ), + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'KEYWORDS' => GESHI_NEVER, + 'SYMBOLS' => GESHI_NEVER, + 'STRINGS' => GESHI_NEVER, +// 'REGEXPS' => GESHI_NEVER, + 'NUMBERS' => GESHI_NEVER + ) + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/whois.php b/_piecrust/libs/Geshi/geshi/whois.php new file mode 100644 index 0000000..24065ed --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/whois.php @@ -0,0 +1,181 @@ + 'Whois (RPSL format)', + 'COMMENT_SINGLE' => array(1 => '% ', 2 => '%ERROR:'), + 'COMMENT_MULTI' => array(), + 'COMMENT_REGEXP' => array( + //Description + 3 => '/(?:(?<=^remarks:)|(?<=^descr:))(.|\n\s)*$/mi', + + //Contact Details + 4 => '/(?<=^address:)(.|\n\s)*$/mi', + 5 => '/\+\d+(?:(?:\s\(\d+(\s\d+)*\))?(?:\s\d+)+|-\d+-\d+)/', + 6 => '/\b(?!-|\.)[\w\-\.]+(?!-|\.)@((?!-)[\w\-]+\.)+\w+\b/', + + //IP, Networks and AS information\links + 7 => '/\b(? '/\bAS\d+\b/' + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array(), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( //Object Types + 'as-block','as-set','aut-num','domain','filter-set','inet-rtr', + 'inet6num','inetnum','irt','key-cert','limerick','mntner', + 'organisation','peering-set','person','poem','role','route-set', + 'route','route6','rtr-set' + ), + 2 => array( //Field Types + 'abuse-mailbox','address','admin-c','aggr-bndry','aggr-mtd','alias', + 'as-block','as-name','as-set','aut-num','auth','author','certif', + 'changed','components','country','default','descr','dom-net', + 'domain','ds-rdata','e-mail','encryption','export','export-comps', + 'fax-no','filter','filter-set','fingerpr','form','holes','ifaddr', + 'import','inet-rtr','inet6num','inetnum','inject','interface','irt', + 'irt-nfy','key-cert','limerick','local-as','mbrs-by-ref', + 'member-of','members','method','mnt-by','mnt-domains','mnt-irt', + 'mnt-lower','mnt-nfy','mnt-ref','mnt-routes','mntner','mp-default', + 'mp-export','mp-filter','mp-import','mp-members','mp-peer', + 'mp-peering','netname','nic-hdl','notify','nserver','org', + 'org-name','org-type','organisation','origin','owner','peer', + 'peering','peering-set','person','phone','poem','ref-nfy','refer', + 'referral-by','remarks','rev-srv','role','route','route-set', + 'route6','rtr-set','signature','source','status','sub-dom','tech-c', + 'text','upd-to','zone-c' + ), + 3 => array( //RPSL reserved + 'accept','action','and','announce','any','as-any','at','atomic', + 'except','from','inbound','into','networks','not','or','outbound', + 'peeras','refine','rs-any','to' + ) + ), + 'SYMBOLS' => array( + ':' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000FF; font-weight: bold;', + 2 => 'color: #000080; font-weight: bold;', + 3 => 'color: #990000; font-weight: bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #666666; font-style: italic;', + 2 => 'color: #666666; font-style: italic;', + 3 => 'color: #404080;', + 4 => 'color: #408040;', + 5 => 'color: #408040;', + 6 => 'color: #408040;', + 7 => 'color: #804040;', + 8 => 'color: #804040;', + 'MULTI' => 'color: #666666; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;', + 'HARD' => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #009900;' + ), + 'STRINGS' => array( + 0 => '', + ), + 'NUMBERS' => array( + 0 => 'color: #000080;', + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #0000FF;' + ), + 'REGEXPS' => array( + 0 => 'color: #000088;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.irr.net/docs/rpsl.html' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + //Variables + 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*" + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4, + 'PARSER_CONTROL' => array( + 'KEYWORDS' => array( + 1 => array( + 'DISALLOWED_BEFORE' => '(?<=\A |\A \n(?m:^)|\n\n(?m:^))' + ), + 2 => array( + 'DISALLOWED_BEFORE' => '(?m:^)' + ) + ), + 'ENABLE_FLAGS' => array( + 'BRACKETS' => GESHI_NEVER, + 'SYMBOLS' => GESHI_NEVER, + 'BRACKETS' => GESHI_NEVER, + 'STRINGS' => GESHI_NEVER, + 'ESCAPE_CHAR' => GESHI_NEVER, + 'NUMBERS' => GESHI_NEVER, + 'METHODS' => GESHI_NEVER, + 'SCRIPT' => GESHI_NEVER + ) + ), +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/winbatch.php b/_piecrust/libs/Geshi/geshi/winbatch.php new file mode 100644 index 0000000..a39d1de --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/winbatch.php @@ -0,0 +1,369 @@ + 'Winbatch', + 'COMMENT_SINGLE' => array(1 => ';', 2 => ':'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"', '`'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'While', 'To', 'Then', 'Switch', 'Select', 'Return', 'Next', 'IntControl', 'Include', 'In', 'If', + 'Goto', 'GoSub', 'ForEach', 'For', 'Exit', 'Execute', 'ErrorMode', 'EndWhile', 'EndSwitch', '#EndSubRoutine', + 'EndSelect', 'EndIf', '#EEndFunction', 'EndFor', 'End', 'Else', 'DropWild', 'Drop', '#DefineSubRoutine', + '#DefineFunction', 'Debug', 'Continue', 'Case', 'CallExt', 'Call', 'By', 'BreakPoint', 'Break' + ), + 2 => array( + 'ZOOMED', 'YES', 'WORD4', 'WORD2', 'WORD1', 'WHOLESECTION', 'WAIT', 'UNSORTED', 'UNCHECK', 'TRUE', 'TILE', + 'TAB', 'STRING', 'STACK', 'SPC2NET', 'SORTED', 'SOK', 'SNET2PC', 'SINGLE', 'SHIFT', 'SERVER', 'SERRWINSOCK', + 'SERRVOICE', 'SERRSOCKET', 'SERRSERVICE', 'SERRSELECT', 'SERRPARAM', 'SERROUTOFMEM', 'SERRNOTFOUND', 'SERRNOCONN', + 'SERRNOANSWER', 'SERRMUSTWAIT', 'SERRIPADDR', 'SERRHOSTNAME', 'SERRFAILURE', 'SERRBUSY', 'SCROLLLOCK', 'SCANCEL', + 'SAVE', 'SALREADY', 'ROWS', 'REGUSERS', 'REGROOT', 'REGMACHINE', 'REGCURRENT', 'REGCLASSES', 'RDBLCLICK', 'RCLICK', + 'RBUTTON', 'RAD2DEG', 'QSUCCESSINFO', 'QSUCCESS', 'QSTILLEX', 'QROLLBACK', 'QNULL', 'QNODATA', 'QNEXT', 'QNEEDDATA', + 'QFIRST', 'QCOMMIT', 'QBADHANDLE', 'PRINTER', 'PLANCKJOULES', 'PLANCKERGS', 'PI', 'PARSEONLY', 'PARSEC', 'P3ERRREPLY', + 'OPEN', 'ON', 'OFF', 'NUMLOCK', 'NOWAIT', 'NOTIFY', 'NORMAL', 'NORESIZE', 'NONE', 'NO', 'NCSAFORMAT', 'MULTIPLE', + 'MSFORMAT', 'MPLAYRDBLCK', 'MPLAYRCLK', 'MPLAYRBUTTON', 'MPLAYMDBLCK', 'MPLAYMCLK', 'MPLAYMBUTTON', 'MPLAYLDBLCK', + 'MPLAYLCLK', 'MPLAYLBUTTON', 'MINOR', 'MDBLCLICK', 'MCLICK', 'MBYESNO', 'MBUTTON', 'MBOKCANCEL', 'MAJOR', 'MAGFIELD', + 'LOCALGROUP', 'LIGHTMTPS', 'LIGHTMPS', 'LF', 'LDBLCLICK', 'LCLICK', 'LBUTTON', 'LAFFDBERROR', 'ICON', 'HTTPS', 'HTTP', + 'HNOHEADER', 'HMETHODPOST', 'HMETHODGET', 'HIDDEN', 'HHEADERONLY', 'HHEADER', 'GRAVITATION', 'GOPHER', 'GOLDENRATIO', + 'GMTSEC', 'GLOBALGROUP', 'GFTSEC', 'GETPROCID', 'GETEXITCODE', 'FWDSCAN', 'FTPPASSIVE', 'FTP', 'FLOAT8', 'FARADAY', + 'FALSE', 'EXTENDED', 'EULERS', 'ENABLE', 'ELECTRIC', 'DRIVE', 'DISABLE', 'DESCENDING', 'DEG2RAD', 'DEFAULT', 'CTRL', + 'CRLF', 'CR', 'COMMONFORMAT', 'COLUMNS', 'CHECK', 'CAPSLOCK', 'CANCEL', 'BOLTZMANN', 'BACKSCAN', 'AVOGADRO', 'ATTR_X', + 'ATTR_T', 'ATTR_SY', 'ATTR_SH', 'ATTR_RO', 'ATTR_RI', 'ATTR_P', 'ATTR_IC', 'ATTR_H', 'ATTR_DM', 'ATTR_DI', 'ATTR_DC', + 'ATTR_CI', 'ATTR_A', 'ASCENDING', 'ARRANGE', 'AMC', 'ACC_WRITE', 'ACC_READ_NT', 'ACC_READ_95', 'ACC_READ', 'ACC_PRINT_NT', + 'ACC_PMANG_NT', 'ACC_PFULL_NT', 'ACC_LIST', 'ACC_FULL_NT', 'ACC_FULL_95', 'ACC_DELETE', 'ACC_CREATE', 'ACC_CONTROL', + 'ACC_CHNG_NT', 'ACC_ATTRIB', 'ABOVEICONS' + ), + 3 => array( + 'Yields', 'Yield', 'WinZoom', 'WinWaitExist', 'WinWaitClose', 'WinWaitChild', 'WinVersion', 'WinTitle', 'WinSysInfo', + 'WinState', 'WinShow', 'WinResources', 'WinPositionChild', 'WinPosition', 'WinPlaceSet', 'WinPlaceGet', 'WinPlaceChild', + 'WinPlace', 'WinParmSet', 'WinParmGet', 'WinName', 'WinMetrics', 'WinItemProcId', 'WinItemNameId', 'WinItemizeEx', + 'WinItemize', 'WinItemChild', 'WinIsDos', 'WinIdGet', 'WinIconize', 'WinHide', 'WinHelp', 'WinGetactive', 'WinExistchild', + 'WinExist', 'WinExename', 'WinConfig', 'WinClosenot', 'WinClose', 'WinArrange', 'WinActivechild', 'WinActivchild', + 'WinActivate', 'WebVerifyCard', 'WebSetTimeout', 'WebParamSize', 'WebParamNames', 'WebParamFile', 'WebParamData', + 'WebParamBuf', 'WebOutFile', 'WebOutBinary', 'WebOut', 'WebDumpError', 'WebDatData', 'WebCounter', 'WebConSize', 'WebConData', + 'WebConBuf', 'WebCmdData', 'WebBaseConv', 'Wallpaper', 'WaitForKeyEX', 'WaitForKey', 'VersionDLL', 'Version', 'VarType', + 'TimeYmdHms', 'TimeWait', 'TimeSubtract', 'TimeJulToYmd', 'TimeJulianDay', 'TimeDiffSecs', 'TimeDiffDays', 'TimeDiff', 'TimeDelay', + 'TimeDate', 'TimeAdd', 'TextSelect', 'TextBoxSort', 'TextBox', 'Terminate', 'Tanh', 'Tan', 'SysParamInfo', 'SvcWaitForCmd', + 'SvcSetState', 'SvcSetAccept', 'StrUpper', 'StrTrim', 'StrSubWild', 'StrSub', 'StrScan', 'StrReplace', 'StrLower', 'StrLenWild', + 'StrLen', 'StrIndexWild', 'StrIndexNC', 'StrIndex', 'StriCmp', 'StrFixLeft', 'StrFixCharsL', 'StrFixChars', 'StrFix', 'StrFill', + 'StrCnt', 'StrCmp', 'StrClean', 'StrCharCount', 'StrCat', 'StrByteCount', 'Sqrt', 'SoundVolume', 'Sounds', 'Snapshot', 'Sinh', 'Sin', + 'ShortCutMake', 'ShortCutInfo', 'ShortCutExtra', 'ShortCutEdit', 'ShortCutDir', 'ShellExecute', 'SendMenusToEx', 'SendMenusTo', + 'SendKeysTo', 'SendKeysChild', 'SendKey', 'RunZoomWait', 'RunZoom', 'RunWithLogon', 'RunWait', 'RunShell', 'RunIconWait', + 'RunIcon', 'RunHideWait', 'RunHide', 'RunExit', 'RunEnviron', 'Run', 'RtStatus', 'Reload', 'RegUnloadHive', 'RegSetValue', + 'RegSetQword', 'RegSetMulSz', 'RegSetExpSz', 'RegSetEx', 'RegSetDword', 'RegSetBin', 'RegQueryValue', 'RegQueryStr', + 'RegQueryQword', 'RegQueryMulSz', 'RegQueryKeys', 'RegQueryKeyLastWriteTime', 'RegQueryKey', 'RegQueryItem', 'RegQueryExpSz', + 'RegQueryEx', 'RegQueryDword', 'RegQueryBin', 'RegOpenKeyEx', 'RegOpenKey', 'RegOpenFlags', 'RegLoadHive', 'RegExistValue', + 'RegExistKey', 'RegEntryType', 'RegDelValue', 'RegDeleteKey', 'RegCreateKey', 'RegConnect', 'RegCloseKey', 'RegApp', 'Random', + 'PtrPersistent', 'PtrGlobalDefine', 'PtrGlobal', 'Print', 'PlayWaveform', 'PlayMidi', 'PlayMedia', 'PipeServerWrite', 'PipeServerRead', + 'PipeServerCreate', 'PipeServerClose', 'PipeInfo', 'PipeClientSendRecvData', 'PipeClientOpen', 'PipeClientClose', 'Pause', + 'ParseData', 'ObjectTypeGet', 'ObjectType', 'ObjectOpen', 'ObjectGet', 'ObjectEventRemove', 'ObjectEventAdd', + 'ObjectCreate', 'ObjectConstToArray', 'ObjectConstantsGet', 'ObjectCollectionOpen', 'ObjectCollectionNext', + 'ObjectCollectionClose', 'ObjectClose', 'ObjectAccess', 'Num2Char', 'NetInfo', 'MsgTextGet', 'MousePlay', 'MouseMove', 'MouseInfo', + 'MouseDrag', 'MouseCoords', 'MouseClickBtn', 'MouseClick', 'mod', 'Min', 'Message', 'Max', 'Loge', 'LogDisk', 'Log10', 'LastError', + 'KeyToggleSet', 'KeyToggleGet', 'ItemSortNc', 'ItemSort', 'ItemSelect', 'ItemReplace', 'ItemRemove', 'ItemLocate', 'ItemInsert', + 'ItemExtractCSV', 'ItemExtract', 'ItemCountCSV', 'ItemCount', 'IsNumber', 'IsLicensed', 'IsKeyDown', 'IsInt', 'IsFloat', 'IsDefined', + 'Int', 'InstallFile', 'IniWritePvt', 'IniWrite', 'IniReadPvt', 'IniRead', 'IniItemizePvt', 'IniItemize', 'IniDeletePvt', 'IniDelete', + 'IgnoreInput', 'IconReplace', 'IconInfo', 'IconExtract', 'IconArrange', 'GetTickCount', 'GetObject', 'GetExactTime', 'Floor', + 'FindWindow', 'FileYmdHms', 'FileWrite', 'FileVerInfo', 'FileTimeTouch', 'FileTimeSetEx', 'FileTimeSet', 'FileTimeGetEx', + 'FileTimeGet', 'FileTimeCode', 'FileSizeEx', 'FileSize', 'FileRoot', 'FileRename', 'FileRead', 'FilePutW', 'FilePut', 'FilePath', + 'FileOpen', 'FileNameShort', 'FileNameLong', 'FileNameEval2', 'FileNameEval1', 'FileMoveAttr', 'FileMove', 'FileMapName', + 'FileLocate', 'FileItemPath', 'FileItemize', 'FileInfoToArray', 'FileGetW', 'FileGet', 'FileFullname', 'FileExtension', 'FileExist', + 'FileDelete', 'FileCreateTemp', 'FileCopyAttr', 'FileCopy', 'FileCompare', 'FileClose', 'FileBaseName', 'FileAttrSetEx', + 'FileAttrSet', 'FileAttrGetEx', 'FileAttrGet', 'FileAppend', 'Fabs', 'ExtractAttachedFile', 'Exp', 'ExeTypeInfo', 'Exclusive', + 'EnvItemize', 'EnvironSet', 'Environment', 'EndSession', 'DosVersion', 'DllLoad', 'DllLastError', 'DllHwnd', 'DllHinst', + 'DllFree', 'DllCallCDecl', 'DllCall', 'Display', 'DiskVolinfo', 'DiskSize', 'DiskScan', 'DiskInfo', 'DiskFree', 'DiskExist', + 'DirWindows', 'DirSize', 'DirScript', 'DirRename', 'DirRemove', 'DirMake', 'DirItemize', 'DirInfoToArray', 'DirHome', 'DirGet', + 'DirExist', 'DirChange', 'DirAttrSetEx', 'DirAttrSet', 'DirAttrGetEx', 'DirAttrGet', 'DialogProcOptions', 'DialogObject', + 'DialogControlState', 'DialogControlSet', 'DialogControlGet', 'DialogBox', 'Dialog', 'Delay', 'Decimals', 'DebugTrace', + 'DebugData', 'DDETimeout', 'DDETerminate', 'DDERequest', 'DDEPoke', 'DDEInitiate', 'DDEExecute', 'DateTime', 'CurrFilepath', + 'CurrentPath', 'CurrentFile', 'CreateObject', 'Cosh', 'Cos', 'ClipPut', 'ClipHasFormat', 'ClipGetEx', 'ClipGet', 'ClipAppend', + 'ChrUnicodeToString', 'ChrUnicodeToHex', 'ChrStringToUnicode', 'ChrSetCodepage', 'ChrHexToUnicode', 'ChrGetCodepage', + 'Char2Num', 'Ceiling', 'ButtonNames', 'BoxUpdates', 'BoxTitle', 'BoxTextFont', 'BoxTextColor', 'BoxText', 'BoxShut', 'BoxPen', + 'BoxOpen', 'BoxNew', 'BoxMapmode', 'BoxesUp', 'BoxDrawText', 'BoxDrawRect', 'BoxDrawLine', 'BoxDrawCircle', 'BoxDestroy', + 'BoxDataTag', 'BoxDataClear', 'BoxColor', 'BoxCaption', 'BoxButtonWait', 'BoxButtonStat', 'BoxButtonKill', 'BoxButtonDraw', + 'BoxBitMap', 'BinaryXor', 'BinaryXlate', 'BinaryWriteEx', 'BinaryWrite', 'BinaryTagRepl', 'BinaryTagLen', 'BinaryTagInit', + 'BinaryTagIndex', 'BinaryTagFind', 'BinaryTagExtr', 'BinaryStrCnt', 'BinarySort', 'BinaryReplace', 'BinaryReadEx', + 'BinaryRead', 'BinaryPokeStrW', 'BinaryPokeStr', 'BinaryPokeHex', 'BinaryPokeFlt', 'BinaryPoke4', 'BinaryPoke2', 'BinaryPoke', + 'BinaryPeekStrW', 'BinaryPeekStr', 'BinaryPeekHex', 'BinaryPeekFlt', 'BinaryPeek4', 'BinaryPeek2', 'BinaryPeek', 'BinaryOr', + 'BinaryOleType', 'BinaryIndexNc', 'BinaryIndexEx', 'BinaryIndexBin', 'BinaryIndex', 'BinaryIncrFlt', 'BinaryIncr4', + 'BinaryIncr2', 'BinaryIncr', 'BinaryHashRec', 'BinaryFree', 'BinaryEodSet', 'BinaryEodGet', 'BinaryCopy', 'BinaryConvert', + 'BinaryCompare', 'BinaryClipPut', 'BinaryClipGet', 'BinaryChecksum', 'BinaryBufInfo', 'BinaryAnd', 'BinaryAllocArray', + 'BinaryAlloc', 'Beep', 'Average', 'Atan', 'AskYesNo', 'AskTextbox', 'AskPassword', 'AskLine', 'AskItemlist', 'AskFont', + 'AskFiletext', 'AskFilename', 'AskDirectory', 'AskColor', 'Asin', 'ArrInitialize', 'ArrInfo', 'ArrDimension', + 'Arrayize', 'ArrayFilePutCSV', 'ArrayFilePut', 'ArrayFileGetCSV', 'ArrayFileGet', 'AppWaitClose', 'AppExist', 'AddExtender', + 'Acos', 'Abs', 'About' + ), + 4 => array( + 'zZipFiles', 'zVersionInfo', 'zVersion', 'zUnZipFiles', 'zSetPortBit', 'zRPortShift', 'zPortOut', 'zPortIn', 'zNotPortBit', + 'zLPortShift', 'zGetPortBit', 'zClrPortBit', 'xVerifyCCard', 'xSendMessage', 'xMessageBox', 'xMemCompact', 'xHex', 'xGetElapsed', + 'xGetChildHwnd', 'xExtenderInfo', 'xEnumStreams', 'xEjectMedia', 'xDriveReady', 'xDiskLabelGet', 'xCursorSet', 'xBaseConvert', + 'wxPing', 'wxParmSet', 'wxParmGet', 'wxMsgSetHdr', 'wxMsgGetHdr', 'wxMsgGetBody', 'wxHost2Addr', 'wxGetLastErr', 'wxGetInfo', + 'wxGetErrDesc', 'wxAddr2Host', 'wtsWaitSystemEvent', 'wtsVersion', 'wtsTerminateProcess', 'wtsShutdownSystem', 'wtsSendMessage', + 'wtsQuerySessionInfo', 'wtsProcIdToSessId', 'wtsLogoffSession', 'wtsLastErrMsg', 'wtsIsTSEnabled', 'wtsIsCitrixEnabled', + 'wtsGetActiveConsoleSessId', 'wtsEnumSessions', 'wtsEnumProcesses', 'wtsDisconnectSession', 'wnWrkGroups', 'wnVersion', 'wntWtsUserSet', + 'wntWtsUserGet', 'wntVersion', 'wntUserSidChk', 'wntUserSetDat', 'wntUserRename', 'wntUserProps', 'wntUserList', 'wntUserInfo', + 'wntUserGetDat', 'wntUserFiles', 'wntUserExist', 'wntUserDel', 'wntUserAddDat', 'wntUserAdd', 'wntSvcStatus', 'wntSvcStart', + 'wntSvcList', 'wntSvcDelete', 'wntSvcCreate', 'wntSvcControl', 'wntSvcCfgSet', 'wntSvcCfgGet', 'wntShutdown', 'wntShareUsers', + 'wntShareSet', 'wntShareList', 'wntShareInfo', 'wntShareDel', 'wntShareAdd', 'wntServiceInf', 'wntServiceAt', 'wntServerType', + 'wntServerList', 'wntServerInfo', 'wntSecurityGet', 'wntRunAsUser', 'wntResources2', 'wntResources', 'wntRemoteTime', 'wntRasUserSet', + 'wntRasUserGet', 'wntProfileInfo', 'wntProfileDel', 'wntPrivUsers', 'wntPrivList', 'wntPrivGet', 'wntPrivDel', 'wntPrivAdd', + 'wntOwnerSet', 'wntOwnerGet', 'wntMemberSet', 'wntMemberLst2', 'wntMemberList', 'wntMemberGrps', 'wntMemberGet', 'wntMemberDel', + 'wntLsaPolSet', 'wntLsaPolGet', 'wntListGroups', 'wntLastErrMsg', 'wntGroupRen', 'wntGroupInfo', 'wntGroupEdit', 'wntGroupDel', + 'wntGroupAdd', 'wntGetUser', 'wntGetDrive', 'wntGetDc', 'wntGetCon', 'wntFileUsers', 'wntFilesOpen', 'wntFileClose', 'wntEventWrite', + 'wntEventLog', 'wntDomainSync', 'wntDirDialog', 'wntDfsList', 'wntDfsGetInfo', 'wntCurrUsers', 'wntChgPswd', 'wntCancelCon', + 'wntAuditMod', 'wntAuditList', 'wntAuditGet', 'wntAuditDel', 'wntAuditAdd2', 'wntAuditAdd', 'wntAddPrinter', 'wntAddDrive', + 'wntAcctPolSet', 'wntAcctPolGet', 'wntAcctList', 'wntAcctInfo', 'wntAccessMod', 'wntAccessList', 'wntAccessGet', 'wntAccessDel', + 'wntaccessadd2', 'wntAccessAdd', 'wnShares', 'wnSharePath', 'wnShareName', 'wnShareCnt', 'wnServers', 'wnRestore', 'wnNetNames', + 'wnGetUser', 'wnGetCon', 'wnGetCaps', 'wnDlgShare', 'wnDlgNoShare', 'wnDlgDiscon', 'wnDlgCon4', 'wnDlgCon3', 'wnDlgCon2', 'wnDlgCon', + 'wnDlgBrowse', 'wnDialog', 'wnCmptrInfo', 'wnCancelCon', 'wnAddCon', 'WaitSRQ', 'w9xVersion', 'w9xUserSetDat', 'w9xUserRename', + 'w9xUserprops', 'w9xUserList', 'w9xUserinfo', 'w9xUserGetDat', 'w9xUserExist', 'w9xUserDel', 'w9xUserAddDat', 'w9xUserAdd', 'w9xShareSet', + 'w9xShareInfo', 'w9xShareDel', 'w9xShareAdd', 'w9xServiceAt', 'w9xServerList', 'w9xRemoteTime', 'w9xOwnerGet', 'w9xMemberSet', + 'w9xMemberList', 'w9xMemberGrps', 'w9xMemberGet', 'w9xMemberDel', 'w9xListGroups', 'w9xGroupInfo', 'w9xGroupDel', 'w9xGroupAdd', + 'w9xGetDC', 'w9xFileUsers', 'w9xAccessList', 'w9xAccessGet', 'w9xAccessDel', 'w9xAccessAdd', 'w95Version', 'w95ShareUsers', + 'w95ShareSet', 'w95ShareList', 'w95ShareInfo', 'w95ShareDel', 'w95ShareAdd', 'w95ServiceInf', 'w95ServiceAt', 'w95ServerType', + 'w95ServerInfo', 'w95Resources', 'w95GetUser', 'w95GetDrive', 'w95GetCon', 'w95FileUsers', 'w95FileClose', 'w95DirDialog', + 'w95CancelCon', 'w95AddPrinter', 'w95AddDrive', 'w95AccessDel', 'w95AccessAdd', 'w3Version', 'w3PrtBrowse', 'w3NetGetUser', + 'w3NetDialog', 'w3GetCon', 'w3GetCaps', 'w3DirBrowse', 'w3CancelCon', 'w3AddCon', 'urlGetScheme', 'urlEncode', 'urlDecode', + 'tVersion', 'tSetPriority', 'TriggerList', 'Trigger', 'tRemoteConn', 'tOpenProc', 'tListProc', 'tListMod', 'tKillProc', 'tGetProcInfo', + 'tGetPriority', 'tGetModInfo', 'tGetLastError', 'tGetData', 'TestSys', 'TestSRQ', 'tCountProc', 'tCompatible', 'tCloseProc', + 'tBrowseCntrs', 'sSendString', 'sSendNum', 'sSendLine', 'sSendBinary', 'sRecvNum', 'sRecvLine', 'sRecvBinary', 'SrchVersion', + 'SrchNext', 'SrchInit', 'SrchFree', 'sOpen', 'sOK2Send', 'sOK2Recv', 'smtpSendText', 'smtpSendFile', 'sListen', 'SetRWLS', + 'SendSetup', 'SendLLO', 'SendList', 'SendIFC', 'SendDataBytes', 'SendCmds', 'Send', 'sConnect', 'sClose', 'SByteOrder32', + 'sByteOrder16', 'sAccept', 'rRegVersion', 'rRegSearch', 'ResetSys', 'ReceiveSetup', 'Receive', 'ReadStsByte', 'RcvRespMsg', + 'RasVersion', 'RasTypeSize', 'RasRename', 'RasNumCons', 'RasNameValid', 'RasListActCon', 'RasItemize', 'RasHangUp', 'RasGetLastErr', + 'RasGetConStat', 'RasEntrySet', 'RasEntryInfo', 'RasEntryExist', 'RasEntryDel', 'RasEntryAdd', 'RasDialInfo', 'RasDial', + 'RasCopy', 'RasConStatus', 'qVersionInfo', 'qTransact', 'qTables', 'qSpecial', 'qSetConnOpt', 'qNumRsltCol', 'qNativeSql', 'qLastCode', + 'qGetData', 'qFreeStmt', 'qFreeEnv', 'qFreeConnect', 'qFetch', 'qExecDirect', 'qError', 'qDriverList', 'qDriverCon', 'qDisconnect', + 'qDataSources', 'qConnect', 'qConfigError', 'qConfigData', 'qColumns', 'qBindCol', 'qAllocStmt', 'qAllocEnv', 'qAllocConnect', + 'pWaitFor', 'pVersionInfo', 'pTimeout', 'pSetPublish', 'pSetPrtInfo', 'pSetPrtAttrib', 'pSetDefPrtEx', 'pSetDefPrt', 'pSendFile', + 'pRecvFile', 'pPutString', 'pPutLine', 'pPutChar', 'pPutByte', 'pPutBinary', 'PPollUnconfig', 'PPollConfig', 'PPoll', 'pPeekChar', + 'pPeekByte', 'pPaperSizes', 'pPaperBins', 'pModemSReg', 'pModemParams', 'pModemInit', 'pModemHangUp', 'pModemDial', 'pModemControl', + 'pModemConnect', 'pModemCommand', 'pModemAnsRing', 'pModemAnsCall', 'pMediaTypes', 'pGetString', 'pGetPublish', 'pGetPrtList', + 'pGetPrtInfo', 'pGetPrtAttrib', 'pGetLine', 'pGetLastError', 'pGetErrorMsg', 'pGetErrorCode', 'pGetDefPrtInf', 'pGetChar', + 'pGetByte', 'pGetBinary', 'pDelPrtConn', 'pDelPrinter', 'pComOpen', 'pComModify', 'pComInfo', 'pComControl', 'pComClose', + 'pCheckSum', 'pCheckBinary', 'pCaptureOn', 'pCaptureOff', 'pCaptureLog', 'PassControl', 'pAddPrtConn', 'pAddPrinter', 'p3RecvText', + 'p3RecvFile', 'p3Peek', 'p3Open', 'p3GetReply', 'p3Delete', 'p3Count', 'p3Close', 'nwWhoAmI', 'nwVfyPassword', 'nwVersion', + 'nwSrvShutdown', 'nwSrvNLMMgr', 'nwSrvGenGUID', 'nwSrvExecNCF', 'nwSetVolLimit', 'nwSetSrvParam', 'nwSetSrvInfo', 'nwSetPrimServ', + 'nwSetPassword', 'nwSetOptions', 'nwSetFileInfo', 'nwSetDirLimit', 'nwSetDirInfo', 'nwSetContext', 'nwSetBcastMode', 'nwServerList', + 'nwSendBcastMsg', 'nwSearchObjects', 'nwSearchFilter', 'nwRenameObject', 'nwRemoveObject', 'nwReceiveBcastMsg', 'nwNameConvert', + 'nwMutateObject', 'nwMoveObject', 'nwModifyObject', 'nwMapDelete', 'nwMap', 'nwLogout', 'nwLogin', 'nwListUserGroups', + 'nwListObjects', 'nwListGroupMembers', 'nwLastErrMsg', 'nwIsUserInGroup', 'nwGetVolLimit', 'nwGetSrvStats', 'nwGetSrvParam', + 'nwGetSrvInfo', 'nwGetSrvCfg', 'nwGetOptions', 'nwGetObjValue', 'nwGetObjInfo', 'nwGetNLMInfo', 'nwGetMapped', 'nwGetFileInfo', + 'nwGetDirLimit', 'nwGetDirInfo', 'nwGetContext', 'nwGetConnInfo', 'nwGetCapture', 'nwGetBcastMode', 'nwGetAttrInfo', + 'nwDriveStatus', 'nwDrivePath', 'nwDetachFromServer', 'nwDelUserFromGroup', 'nwDelConnNum', 'nwCompareObject', 'nwClientInfo', + 'nwChgPassword', 'nwAttachToServer', 'nwAddUserToGroup', 'nwAddObject', 'netVersion', 'netResources', 'netGetUser', 'netGetCon', + 'netDirDialog', 'netCancelCon', 'netAddPrinter', 'netAddDrive', 'n4Version', 'n4UserGroups', 'n4UserGroupEx', 'n4SetPrimServ', + 'n4SetOptions', 'n4SetContextG', 'n4SetContext', 'n4ServerList', 'n4ServerInfo', 'n4ObjSearch', 'n4ObjRename', 'n4ObjOptions', + 'n4ObjMove', 'n4ObjGetVal', 'n4ObjectProps', 'n4ObjectList', 'n4ObjectInfo', 'n4ObjDelete', 'n4NameConvert', 'n4MsgsEndAll', + 'n4MsgsEnd', 'n4MemberSet', 'n4MemberGet', 'n4MemberDel', 'n4MapRoot', 'n4MapDir', 'n4MapDelete', 'n4Map', 'n4LogoutTree', + 'n4Logout', 'n4Login', 'n4GetUserName', 'n4GetUserId', 'n4GetUser', 'n4GetNetAddr', 'n4GetMapped', 'n4GetContext', + 'n4GetConnNum', 'n4FileUsers', 'n4FileTimeGet', 'n4FileAttrSet', 'n4FileAttrGet', 'n4DriveStatus', 'n4DrivePath', 'n4DirTimeGet', + 'n4DirAttrSet', 'n4DirAttrGet', 'n4Detach', 'n4ChgPassword', 'n4CapturePrt', 'n4CaptureGet', 'n4CaptureEnd', 'n4Attach', + 'n3Version', 'n3UserGroups', 'n3ServerList', 'n3ServerInfo', 'n3MsgsEndAll', 'n3MsgsEnd', 'n3MemberSet', 'n3MemberGet', + 'n3MemberDel', 'n3Maproot', 'n3Mapdir', 'n3Mapdelete', 'n3Map', 'n3Logout', 'n3GetUserId', 'n3GetUser', 'n3GetNetAddr', + 'n3GetMapped', 'n3GetConnNum', 'n3FileTimeGet', 'n3FileAttrSet', 'n3FileAttrGet', 'n3DriveStatus', 'n3DrivePath', + 'n3DirTimeGet', 'n3DirAttrSet', 'n3DirAttrGet', 'n3Detach', 'n3ChgPassword', 'n3CapturePrt', 'n3CaptureGet', + 'n3CaptureEnd', 'n3Attach', 'mVersion', 'mSyncMail', 'mSendMailEx', 'mSendMail', 'mrecvmail', 'mReadNextMsg', 'mLogOn', + 'mLogOff', 'mFindNext', 'mError', 'mCompatible', 'kVerInfo', 'kStatusInfo', 'kSendText', 'kSendFile', 'kManageImap4', + 'kInit', 'kGetMail', 'kExtra', 'kDest', 'kDeletePop3', 'iWriteDataBuf', 'iWriteData', 'iVersion', 'IUrlOpen', 'iUrlEncode', + 'iUrlDecode', 'iReadDataBuf', 'iReadData', 'ipVersion', 'ipPing', 'iPing', 'ipHost2Addr', 'ipGetLastErr', 'ipGetAddress', + 'iParseURL', 'ipAddr2Host', 'iOptionSet', 'iOptionGet', 'ImgWave', 'ImgVersion', 'ImgUnsharpMask', 'ImgThreshold', 'ImgSwirl', + 'ImgSpread', 'ImgSolarize', 'ImgShear', 'ImgSharpen', 'ImgShade', 'ImgScale', 'ImgSample', 'ImgRotate', 'ImgResize', + 'ImgReduceNoise', 'ImgRaise', 'ImgOilPaint', 'ImgNormalize', 'ImgNegate', 'ImgMotionBlur', 'ImgModulate', 'ImgMinify', + 'ImgMedianFilter', 'ImgMagnify', 'ImgLevel', 'ImgIsValid', 'ImgIsPalette', 'ImgIsMono', 'ImgIsGray', 'ImgInfo', 'ImgImplode', + 'ImgGetImageType', 'ImgGetColorCount', 'ImgGaussianBlur', 'ImgGamma', 'ImgFrame', 'ImgFlop', 'ImgFlip', 'ImgEqualize', + 'ImgEnhance', 'ImgEmboss', 'ImgCrop', 'ImgConvert', 'ImgContrast', 'ImgCompare', 'ImgColorize', 'ImgChop', 'ImgCharcoal', + 'ImgBorder', 'ImgBlur', 'ImgAddNoise', 'iLocFindNext', 'iLocFindInit', 'iHttpOpen', 'iHttpInit', 'iHttpHeaders', 'iHttpAccept', + 'iHostConnect', 'iHost2Addr', 'iGetResponse', 'iGetLastError', 'iGetIEVer', 'iGetConStatEx', 'iGetConState', 'iFtpRename', + 'iFtpPut', 'iFtpOpen', 'iFtpGet', 'iFtpFindNext', 'iFtpFindInit', 'iFtpDirRemove', 'iFtpDirMake', 'iFtpDirGet', 'iFtpDirChange', + 'iFtpDialog', 'iFtpDelete', 'iFtpCmd', 'iErrorDialog', 'iDialItemize', 'iDialHangUp', 'iDial', 'iCookieSet', 'iCookieGet', + 'iContentURL', 'iContentFile', 'iContentData', 'iClose', 'ibWrtf', 'ibWrt', 'ibWait', 'ibVersion', 'ibUnlock', 'ibTrg', + 'ibTmo', 'ibStop', 'ibStatus', 'ibSta', 'ibSre', 'ibSic', 'ibSad', 'ibRsv', 'ibRsp', 'ibRsc', 'ibRpp', 'ibRdf', 'ibRd', + 'ibPpc', 'ibPoke', 'ibPct', 'ibPad', 'ibOnl', 'ibMakeAddr', 'ibLock', 'ibLoc', 'ibLn', 'ibLines', 'ibIst', 'ibInit', + 'ibGts', 'ibGetSad', 'ibGetPad', 'ibFind', 'ibEvent', 'ibErr', 'ibEot', 'ibEos', 'iBegin', 'ibDma', 'ibDev', 'ibConfig', + 'ibCntl', 'ibCnt', 'ibCmda', 'ibCmd', 'ibClr', 'ibCac', 'ibBna', 'ibAsk', 'iAddr2Host', 'huge_Thousands', 'huge_Subtract', + 'huge_SetOptions', 'huge_Multiply', 'huge_GetLastError', 'huge_ExtenderInfo', 'huge_Divide', 'huge_Decimal', 'huge_Add', + 'httpStripHTML', 'httpRecvTextF', 'httpRecvText', 'httpRecvQuery', 'httpRecvQryF', 'httpRecvFile', 'httpGetServer', + 'httpGetQuery', 'httpGetPath', 'httpGetFile', 'httpGetDir', 'httpGetAnchor', 'httpFullPath', 'httpFirewall', 'httpAuth', + 'ftpRename', 'ftpQuote', 'ftpPut', 'ftpOpen', 'ftpList', 'ftpGet', 'ftpFirewall', 'ftpDelete', 'ftpClose', 'ftpChDir', + 'FindRQS', 'FindLstn', 'EnvSetVar', 'EnvPathDel', 'EnvPathChk', 'EnvPathAdd', 'EnvListVars', 'EnvGetVar', 'EnvGetInfo', + 'EnableRemote', 'EnableLocal', 'ehllapiWait', 'ehllapiVersion', 'ehllapiUninit', 'ehllapiStopKeyIntercept', 'ehllapiStopHostNotify', + 'ehllapiStopCloseIntercept', 'ehllapiStartKeyIntercept', 'ehllapiStartHostNotify', 'ehllapiStartCloseIntercept', + 'ehllapiSetWindowStatus', 'ehllapiSetSessionParams', 'ehllapiSetPSWindowName', 'ehllapiSetCursorLoc', 'ehllapiSendKey', + 'ehllapiSendFile', 'ehllapiSearchPS', 'ehllapiSearchField', 'ehllapiRunProfile', 'ehllapiResetSystem', 'ehllapiReserve', + 'ehllapiRelease', 'ehllapiReceiveFile', 'ehllapiQuerySystem', 'ehllapiQueryPSStatus', 'ehllapiQueryHostNotify', + 'ehllapiQueryFieldAttr', 'ehllapiQueryCursorLoc', 'ehllapiQueryCloseIntercept', 'ehllapiPostInterceptStatus', + 'ehllapiPause', 'ehllapiLastErrMsg', 'ehllapiInit', 'ehllapiGetWindowStatus', 'ehllapiGetPSHWND', 'ehllapiGetKey', + 'ehllapiFindFieldPos', 'ehllapiFindFieldLen', 'ehllapiDisconnectPS', 'ehllapiCvtRCToPos', 'ehllapiCvtPosToRC', + 'ehllapiCopyTextToPS', 'ehllapiCopyTextToField', 'ehllapiCopyTextFromPS', 'ehllapiCopyTextFromField', 'ehllapiCopyOIA', + 'ehllapiConnectPS', 'dunItemize', 'dunDisconnect', 'dunConnectEx', 'dunConnect', 'dsTestParam', 'dsSIDtoHexStr', 'dsSetSecProp', + 'dsSetProperty', 'dsSetPassword', 'dsSetObj', 'dsSetCredentX', 'dsSetCredent', 'dsRemFromGrp', 'dsRelSecObj', 'dsMoveObj', + 'dsIsObject', 'dsIsMemberGrp', 'dsIsContainer', 'dsGetUsersGrps', 'dsGetSecProp', 'dsGetPropName', 'dsGetProperty', + 'dsGetPrntPath', 'dsGetPrimGrp', 'dsGetMemGrp', 'dsGetInfo', 'dsGetClass', 'dsGetChldPath', 'dsFindPath', 'dsDeleteObj', + 'dsCreatSecObj', 'dsCreateObj', 'dsCopySecObj', 'dsAddToGrp', 'dsAclRemAce', 'dsAclOrderAce', 'dsAclGetAces', 'dsAclAddAce', + 'DevClearList', 'DevClear', 'dbTest', 'dbSwapColumns', 'dbSort', 'dbSetRecordField', 'dbSetOptions', 'dbSetErrorReporting', + 'dbSetEntireRecord', 'dbSetDelimiter', 'dbSave', 'dbOpen', 'dbNameColumn', 'dbMakeNewItem', 'dbInsertColumn', 'dbGetVersion', + 'dbGetSaveStatus', 'dbGetRecordField', 'dbGetRecordCount', 'dbGetNextItem', 'dbGetLastError', 'dbGetEntireRecord', + 'dbGetColumnType', 'dbGetColumnNumber', 'dbGetColumnName', 'dbGetColumnCount', 'dbFindRecord', 'dbExist', 'dbEasterEgg', + 'dbDeleteRecord', 'dbDeleteColumn', 'dbDebug', 'dbCookDatabases', 'dbClose', 'dbCloneRecord', 'dbBindCol', 'cWndState', + 'cWndinfo', 'cWndGetWndSpecName', 'cWndGetWndSpec', 'cWndexist', 'cWndByWndSpecName', 'cWndByWndSpec', 'cWndbyseq', + 'cWndbyname', 'cWndbyid', 'cWndbyclass', 'cWinIDConvert', 'cVersionInfo', 'cVendorId', 'cSetWndText', 'cSetUpDownPos', + 'cSetTvItem', 'cSetTrackPos', 'cSetTabItem', 'cSetLvItem', 'cSetLbItemEx', 'cSetLbItem', 'cSetIpAddr', 'cSetFocus', + 'cSetEditText', 'cSetDtpDate', 'cSetCbItem', 'cSetCalDate', 'cSendMessage', 'cRadioButton', 'cPostMessage', 'cPostButton', + 'cMemStat', 'cGetWndCursor', 'cGetUpDownPos', 'cGetUpDownMin', 'cGetUpDownMax', 'cGetTVItem', 'cGetTrackPos', 'cGetTrackMin', + 'cGetTrackMax', 'cGetTbText', 'cGetSbText', 'cGetLvText', 'cGetLvSelText', 'cGetLvFocText', 'cGetLvDdtText', 'cGetLvColText', + 'cGetLbText', 'cGetLbSelText', 'cGetLbCount', 'cGetIpAddr', 'cGetInfo', 'cGetHrText', 'cGetFocus', 'cGetEditText', 'cGetDtpDate', + 'cGetControlImageCRC', 'cGetCBText', 'cGetCbCount', 'cGetCalDate', 'cFindByName', 'cFindByClass', 'cEnablestate', 'cDblClickItem', + 'cCpuSupt', 'cCpuSpeed', 'cCpuIdExt', 'cCpuId', 'cCpuFeat', 'cCpuBenchmark', 'cCloneCheck', 'cClickToolbar', 'cClickButton', + 'cClearTvItem', 'cClearLvItem', 'cClearLbAll', 'cCheckbox', 'aVersion', 'aStatusbar', 'aShellFolder', 'aMsgTimeout', 'AllSPoll', + 'aGetLastError', 'aFileRename', 'aFileMove', 'aFileDelete', 'aFileCopy' + ), + 5 => array( + 'wWordRight', 'wWordLeft', 'wWinTile', 'wWinRestore', 'wWinNext', 'wWinMinimize', 'wWinMaximize', 'wWinCloseAll', 'wWinClose', + 'wWinCascade', 'wWinArricons', 'wViewOutput', 'wViewOptions', 'wViewHtml', 'wUpperCase', 'wUpline', 'wUndo', 'wTopOfFile', 'wToggleIns', + 'wTab', 'wStatusMsg', 'wStartSel', 'wSpellcheck', 'wSetProject', 'wSetPrefs', 'wSetColblk', 'wSetBookmark', 'wSelWordRight', + 'wSelWordLeft', 'wSelUp', 'wSelTop', 'wSelRight', 'wSelPgUp', 'wSelPgDn', 'wSelLeft', 'wSelInfo', 'wSelHome', 'wSelEnd', 'wSelectAll', + 'wSelDown', 'wSelBottom', 'wRunRebuild', 'wRunMake', 'wRunExecute', 'wRunDebug', 'wRunConfig', 'wRunCompile', 'wRunCommand', 'wRight', + 'wRepeat', 'wRedo', 'wRecord', 'wProperties', 'wPrintDirect', 'wPrinSetup', 'wPrevError', 'wPaste', 'wPageUp', 'wPageDown', 'wNextError', + 'wNewLine', 'wLowerCase', 'wLineCount', 'wLeft', 'wInvertCase', 'wInsString', 'wInsLine', 'wHome', 'wHelpKeyword', 'wHelpKeybrd', + 'wHelpIndex', 'wHelpHelp', 'wHelpCmds', 'wHelpAbout', 'wGotoLine', 'wGotoCol', 'wGetWrap', 'wGetWord', 'wGetUndo', 'wGetSelstate', + 'wGetRedo', 'wGetOutput', 'wGetModified', 'wGetLineNo', 'wGetIns', 'wGetFilename', 'wGetColNo', 'wGetChar', 'wFtpOpen', 'wFindNext', + 'wFindInFiles', 'wFind', 'wFileSaveAs', 'wFileSave', 'wFileRevert', 'wFilePrint', 'wFilePgSetup', 'wFileOpen', 'wFileNew', 'wFileMerge', + 'wFileList', 'wFileExit', 'wEndSel', 'wEndOfFile', 'wEnd', 'wEdWrap', 'wEdWordRight', 'wEdWordLeft', 'wEdUpLine', 'wEdUndo', 'wEdTopOfFile', + 'wEdToggleIns', 'wEdTab', 'wEdStartSel', 'wEdSetColBlk', 'wEdSelectAll', 'wEdRight', 'wEdRedo', 'wEdPaste', 'wEdPageUp', 'wEdPageDown', + 'wEdNewLine', 'wEdLeft', 'wEdInsString', 'wEdHome', 'wEdGoToLine', 'wEdGoToCol', 'wEdGetWord', 'wEdEndSel', 'wEdEndOfFile', 'wEdEnd', + 'wEdDownLine', 'wEdDelete', 'wEdCutLine', 'wEdCut', 'wEdCopyLine', 'wEdCopy', 'wEdClearSel', 'wEdBackTab', 'wEdBackspace', 'wDownLine', + 'wDelete', 'wDelButton', 'wCutMarked', 'wCutLine', 'wCutAppend', 'wCut', 'wCopyMarked', 'wCopyLine', 'wCopyAppend', 'wCopy', 'wCompile', + 'wClearSel', 'wChange', 'wCallMacro', 'wBackTab', 'wBackspace', 'wAutoIndent', 'wAddButton', 'edWindowTile', 'edWindowRestore', + 'edWindowNext', 'edWindowMinimize', 'edWindowMaximize', 'edWindowCloseall', 'edWindowClose', 'edWindowCascade', 'edWindowArrangeIcons', + 'edStatusMsg', 'edSearchViewOutput', 'edSearchRepeat', 'edSearchPrevError', 'edSearchNextError', 'edSearchFind', 'edSearchChange', + 'edRunRebuild', 'edRunMake', 'edRunExecute', 'edRunDebug', 'edRunConfigure', 'edRunCompile', 'edRunCommand', 'edRecord', 'edHelpProcedures', + 'edHelpKeyword', 'edHelpKeyboard', 'edHelpIndex', 'edHelpHelp', 'edHelpCommands', 'edHelpAbout', 'edGetWordWrapState', 'edGetWindowName', + 'edGetUndoState', 'edGetSelectionState', 'edGetRedoState', 'edGetModifiedStatus', 'edGetLineNumber', 'edGetInsertState', 'edGetColumnNumber', + 'edGetChar', 'edFileSetPreferences', 'edFileSaveAs', 'edFileSave', 'edFilePrinterSetup', 'edFilePrint', 'edFilePageSetup', 'edFileOpen', + 'edFileNew', 'edFileMerge', 'edFileList', 'edFileExit', 'edEditWrap', 'edEditWordRight', 'edEditWordLeft', 'edEditUpLine', 'edEditUndo', + 'edEditToggleIns', 'edEditTab', 'edEditStartSelection', 'edEditSetColumnBlock', 'edEditSetBookmark', 'edEditSelectAll', 'edEditRight', + 'edEditRedo', 'edEditPaste', 'edEditPageUp', 'edEditPageDown', 'edEditLeft', 'edEditInsertString', 'edEditGoToLine', 'edEditGoToColumn', + 'edEditGoToBookmark', 'edEditGetCurrentWord', 'edEditEndSelection', 'edEditEndOfLine', 'edEditEndOfFile', 'edEditDownline', 'edEditDelete', + 'edEditCutline', 'edEditCut', 'edEditCopyline', 'edEditCopy', 'edEditClearSelection', 'edEditBeginningOfLine', 'edEditBeginningOfFile', + 'edEditBackTab', 'edEditBackspace', 'edDeleteButton', 'edAddButton' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '{', '}', '!', '+', '-', '~', '$', '^', '?', '@', '%', '#', '&', '*', '|', '/', '<', '>' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false, + 5 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #800080;', + 2 => 'color: #0080FF; font-weight: bold;', + 3 => 'color: #0000FF;', + 4 => 'color: #FF00FF;', + 5 => 'color: #008000;' + ), + 'COMMENTS' => array( + 1 => 'color: #008000; font-style: italic;', + 2 => 'color: #FF1010; font-weight: bold;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + 0 => 'color: #006600;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'REGEXPS' => array( + 0 => 'color: #0000ff;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array(), + 'REGEXPS' => array(//Variable names + 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*" + ), + 'STRICT_MODE_APPLIES' => GESHI_MAYBE, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/xbasic.php b/_piecrust/libs/Geshi/geshi/xbasic.php new file mode 100644 index 0000000..b30c02c --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/xbasic.php @@ -0,0 +1,144 @@ + 'XBasic', + 'COMMENT_SINGLE' => array(1 => "'"), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( + 'WHILE', 'UNTIL', 'TRUE', 'TO', 'THEN', 'SUB', 'STOP', 'STEP', + 'SELECT', 'RETURN', 'PROGRAM', 'NEXT', 'LOOP', 'IFZ', + 'IFT', 'IFF', 'IF', 'GOTO', 'GOSUB', 'FOR', 'FALSE', 'EXIT', + 'ENDIF', 'END', 'ELSE', 'DO', 'CASE', 'ALL' + ), + 2 => array( + 'XMAKE', 'XLONGAT', 'XLONG', 'WRITE', 'VOID', 'VERSION$', 'VERSION', + 'USHORTAT', 'USHORT', 'UNION', 'ULONGAT', 'ULONG', 'UCASE$', + 'UBYTEAT', 'UBYTE', 'UBOUND', 'TYPE','TRIM$', 'TAB', 'SWAP', + 'SUBADDRESS', 'SUBADDR', 'STUFF$', 'STRING', 'STRING$', 'STR$', + 'STATIC', 'SSHORTAT', 'SSHORT', 'SPACE$', 'SMAKE', 'SLONGAT', 'SLONG', + 'SIZE', 'SINGLEAT', 'SINGLE', 'SIGNED$', 'SIGN', 'SHELL', 'SHARED', + 'SGN', 'SFUNCTION', 'SET', 'SEEK', 'SCOMPLEX', 'SBYTEAT', 'SBYTE', + 'RTRIM$', 'ROTATER', 'ROTATEL', 'RJUST$', 'RINSTRI', 'RINSTR', + 'RINCHRI', 'RINCHR', 'RIGHT$', 'REDIM', 'READ', 'RCLIP$', 'QUIT', + 'PROGRAM$', 'PRINT', 'POF', 'OPEN', 'OCTO$', 'OCT$', 'NULL$', 'MIN', + 'MID$', 'MAX', 'MAKE', 'LTRIM$', 'LOF', 'LJUST$', 'LIBRARY', 'LEN', + 'LEFT$', 'LCLIP$', 'LCASE$', 'INTERNAL', 'INT', 'INSTRI', 'INSTR', + 'INLINE$', 'INFILE$', 'INCHRI', 'INCHR', 'INC', 'IMPORT', 'HIGH1', + 'HIGH0', 'HEXX$', 'HEX$', 'GOADDRESS', 'GOADDR', 'GMAKE', 'GLOW', + 'GIANTAT', 'GIANT', 'GHIGH', 'FUNCTION', 'FUNCADDRESS', 'FUNCADDR', + 'FORMAT$', 'FIX', 'EXTU', 'EXTS', 'EXTERNAL', 'ERROR', 'ERROR$', + 'EOF', 'DOUBLEAT', 'DOUBLE', 'DMAKE', 'DLOW', 'DIM', 'DHIGH', + 'DECLARE', 'DEC', 'DCOMPLEX', 'CSTRING$', 'CSIZE', 'CSIZE$', 'CLR', + 'CLOSE', 'CLEAR', 'CJUST$', 'CHR$', 'CFUNCTION', 'BITFIELD', 'BINB$', + 'BIN$', 'AUTOX', 'AUTOS', 'AUTO', 'ATTACH', 'ASC', 'ABS' + ), + 3 => array( + 'XOR', 'OR', 'NOT', 'MOD', 'AND' + ), + 4 => array( + 'TANH', 'TAN', 'SQRT', 'SINH', 'SIN', 'SECH', 'SEC', 'POWER', + 'LOG10', 'LOG', 'EXP10', 'EXP', 'CSCH', 'CSC', 'COTH', 'COT', 'COSH', + 'COS', 'ATANH', 'ATAN', 'ASINH', 'ASIN', 'ASECH', 'ASEC', 'ACSCH', + 'ACSC', 'ACOSH', 'ACOS' + ) + ), + 'SYMBOLS' => array( + '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', + '=','+','-' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #00a1a1;font-weight: bold', + 2 => 'color: #000066;font-weight: bold', + 3 => 'color: #00a166;font-weight: bold', + 4 => 'color: #0066a1;font-weight: bold' + ), + 'COMMENTS' => array( + 1 => 'color: #808080;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => 'http://www.xbasic.org', + 4 => 'http://www.xbasic.org' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/xml.php b/_piecrust/libs/Geshi/geshi/xml.php new file mode 100644 index 0000000..e85a556 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/xml.php @@ -0,0 +1,157 @@ + 'XML', + 'COMMENT_SINGLE' => array(), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + ), + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + ), + 'COMMENTS' => array( + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #66cc66;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'SCRIPT' => array( + -1 => 'color: #808080; font-style: italic;', // comments + 0 => 'color: #00bbdd;', + 1 => 'color: #ddbb00;', + 2 => 'color: #339933;', + 3 => 'color: #009900;' + ), + 'REGEXPS' => array( + 0 => 'color: #000066;', + 1 => 'color: #000000; font-weight: bold;', + 2 => 'color: #000000; font-weight: bold;' + ) + ), + 'URLS' => array( + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + 0 => array(//attribute names + GESHI_SEARCH => '([a-z_:][\w\-\.:]*)(=)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '\\2' + ), + 1 => array(//Initial header line + GESHI_SEARCH => '(<[\/?|(\?xml)]?[a-z_:][\w\-\.:]*(\??>)?)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + 2 => array(//Tag end markers + GESHI_SEARCH => '(([\/|\?])?>)', + GESHI_REPLACE => '\\1', + GESHI_MODIFIERS => 'i', + GESHI_BEFORE => '', + GESHI_AFTER => '' + ), + ), + 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, + 'SCRIPT_DELIMITERS' => array( + -1 => array( + '' + ), + 0 => array( + ' '>' + ), + 1 => array( + '&' => ';' + ), + 2 => array( + ' ']]>' + ), + 3 => array( + '<' => '>' + ) + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + -1 => false, + 0 => false, + 1 => false, + 2 => false, + 3 => true + ), + 'TAB_WIDTH' => 2, + 'PARSER_CONTROL' => array( + 'ENABLE_FLAGS' => array( + 'NUMBERS' => GESHI_NEVER + ) + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/xorg_conf.php b/_piecrust/libs/Geshi/geshi/xorg_conf.php new file mode 100644 index 0000000..388850d --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/xorg_conf.php @@ -0,0 +1,124 @@ + 'Xorg configuration', + 'COMMENT_SINGLE' => array(1 => '#'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + // sections + 1 => array( + 'Section', 'EndSection', 'SubSection', 'EndSubSection' + ), + 2 => array( + // see http://www.x.org/archive/X11R6.9.0/doc/html/xorg.conf.5.html + 'BiosBase', 'Black', 'Boardname', 'BusID', 'ChipID', 'ChipRev', + 'Chipset', 'ClockChip', 'Clocks', 'DacSpeed', + 'DefaultDepth', 'DefaultFbBpp', 'Depth', 'Device', + 'DisplaySize', 'Driver', 'FbBpp', 'Gamma', + 'HorizSync', 'IOBase', 'Identifier', 'InputDevice', + 'Load', 'MemBase', 'Mode', 'Modeline', 'Modelname', + 'Modes', 'Monitor', 'Option', 'Ramdac', 'RgbPath', + 'Screen', 'TextClockFreq', 'UseModes', 'VendorName', + 'VertRefresh', 'VideoAdaptor', 'VideoRam', + 'ViewPort', 'Virtual', 'Visual', 'Weight', 'White' + ), + 3 => array( + // some sub-keywords + // screen position + 'Above', 'Absolute', 'Below', 'LeftOf', 'Relative', 'RightOf', + // modes + 'DotClock', 'Flags', 'HSkew', 'HTimings', 'VScan', 'VTimings' + ), + ), + 'REGEXPS' => array( + ), + 'SYMBOLS' => array( + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #b1b100;', + 2 => 'color: #990000;', + 3 => 'color: #550000;' + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + ), + 'BRACKETS' => array( + ), + 'STRINGS' => array( + 0 => 'color: #0000ff;', + ), + 'NUMBERS' => array( + 0 => 'color: #cc66cc;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 4 +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/xpp.php b/_piecrust/libs/Geshi/geshi/xpp.php new file mode 100644 index 0000000..367a1c6 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/xpp.php @@ -0,0 +1,436 @@ + + * + * CHANGES + * ------- + * 2007/02/28 (1.0.0) + * - First Release + * + * TODO (updated 2007/02/27) + * ------------------------- + * + ************************************************************************************* + * + * This file is part of GeSHi. + * + * GeSHi is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GeSHi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeSHi; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + ************************************************************************************/ + +$language_data = array ( + 'LANG_NAME' => 'X++', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( // Primitive types + 'void', + 'str', + 'real', + 'int64', + 'int', + 'date', + 'container', + 'boolean', + 'anytype' + ), + 2 => array( // Keywords + 'window', + 'while', + 'try', + 'true', + 'throw', + 'switch', + 'super', + 'static', + 'server', + 'right', + 'return', + 'retry', + 'public', + 'protected', + 'private', + 'print', + 'pause', + 'null', + 'new', + 'mod', + 'left', + 'interface', + 'implements', + 'if', + 'for', + 'final', + 'false', + 'extends', + 'else', + 'edit', + 'do', + 'div', + 'display', + 'default', + 'continue', + 'client', + 'class', + 'changeCompany', + 'case', + 'breakpoint', + 'break', + 'at', + 'abstract' + ), + 3 => array( // Functions within the Axapta kernel + 'year', + 'wkofyr', + 'webwebpartstr', + 'webstaticfilestr', + 'websitetempstr', + 'websitedefstr', + 'webreportstr', + 'webpagedefstr', + 'weboutputcontentitemstr', + 'webmenustr', + 'webletitemstr', + 'webformstr', + 'webdisplaycontentitemstr', + 'webactionitemstr', + 'varstr', + 'utilmoyr', + 'uint2str', + 'typeof', + 'typeid', + 'trunc', + 'today', + 'timenow', + 'time2str', + 'term', + 'tanh', + 'tan', + 'tablestr', + 'tablestaticmethodstr', + 'tablepname', + 'tablenum', + 'tablename2id', + 'tablemethodstr', + 'tableid2pname', + 'tableid2name', + 'tablefieldgroupstr', + 'tablecollectionstr', + 'systemdateset', + 'systemdateget', + 'syd', + 'substr', + 'strupr', + 'strscan', + 'strrtrim', + 'strrep', + 'strrem', + 'strprompt', + 'strpoke', + 'strnfind', + 'strlwr', + 'strltrim', + 'strline', + 'strlen', + 'strkeep', + 'strins', + 'strfmt', + 'strfind', + 'strdel', + 'strcolseq', + 'strcmp', + 'stralpha', + 'str2time', + 'str2num', + 'str2int64', + 'str2int', + 'str2guid', + 'str2enum', + 'str2date', + 'staticmethodstr', + 'sln', + 'sleep', + 'sinh', + 'sin', + 'setprefix', + 'sessionid', + 'securitykeystr', + 'securitykeynum', + 'runbuf', + 'runas', + 'round', + 'resourcestr', + 'reportstr', + 'refprintall', + 'rate', + 'querystr', + 'pv', + 'pt', + 'prmisdefault', + 'primoyr', + 'prevyr', + 'prevqtr', + 'prevmth', + 'power', + 'pmt', + 'num2str', + 'num2date', + 'num2char', + 'nextyr', + 'nextqtr', + 'nextmth', + 'newguid', + 'mthofyr', + 'mthname', + 'mkdate', + 'minint', + 'min', + 'methodstr', + 'menustr', + 'menuitemoutputstr', + 'menuitemdisplaystr', + 'menuitemactionstr', + 'maxint', + 'maxdate', + 'max', + 'match', + 'logn', + 'log10', + 'literalstr', + 'licensecodestr', + 'licensecodenum', + 'intvnorm', + 'intvno', + 'intvname', + 'intvmax', + 'int64str', + 'indexstr', + 'indexnum', + 'indexname2id', + 'indexid2name', + 'idg', + 'identifierstr', + 'helpfilestr', + 'helpdevstr', + 'helpapplstr', + 'guid2str', + 'getprefix', + 'getCurrentUTCTime', + 'fv', + 'funcname', + 'frac', + 'formstr', + 'fieldstr', + 'fieldpname', + 'fieldnum', + 'fieldname2id', + 'fieldid2pname', + 'fieldid2name', + 'extendedTypeStr', + 'extendedTypeNum', + 'exp10', + 'exp', + 'evalbuf', + 'enumstr', + 'enumnum', + 'enumcnt', + 'enum2str', + 'endmth', + 'dimof', + 'dg', + 'decround', + 'ddb', + 'dayofyr', + 'dayofwk', + 'dayofmth', + 'dayname', + 'date2str', + 'date2num', + 'curuserid', + 'curext', + 'cterm', + 'cosh', + 'cos', + 'corrflagset', + 'corrflagget', + 'convertUTCTimeToLocalTime', + 'convertUTCDateToLocalDate', + 'conpoke', + 'conpeek', + 'connull', + 'conlen', + 'conins', + 'confind', + 'configurationkeystr', + 'configurationkeynum', + 'condel', + 'classstr', + 'classnum', + 'classidget', + 'char2num', + 'beep', + 'atan', + 'asin', + 'ascii2ansi', + 'any2str', + 'any2real', + 'any2int64', + 'any2int', + 'any2guid', + 'any2enum', + 'any2date', + 'ansi2ascii', + 'acos', + 'abs' + ), + 4 => array( // X++ SQL stuff + 'where', + 'update_recordset', + 'ttsCommit', + 'ttsBegin', + 'ttsAbort', + 'sum', + 'setting', + 'select', + 'reverse', + 'pessimisticLock', + 'outer', + 'order by', + 'optimisticLock', + 'notExists', + 'noFetch', + 'next', + 'minof', + 'maxof', + 'like', + 'join', + 'insert_recordset', + 'index hint', + 'index', + 'group by', + 'from', + 'forUpdate', + 'forceSelectOrder', + 'forcePlaceholders', + 'forceNestedLoop', + 'forceLiterals', + 'flush', + 'firstOnly', + 'firstFast', + 'exists', + 'desc', + 'delete_from', + 'count', + 'avg', + 'asc' + ) + ), + 'SYMBOLS' => array( // X++ symbols + '!', + '&', + '(', + ')', + '*', + '^', + '|', + '~', + '+', + ',', + '-', + '/', + ':', + '<', + '=', + '>', + '?', + '[', + ']', + '{', + '}' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff;', + 2 => 'color: #0000ff;', + 3 => 'color: #0000ff;', + 4 => 'color: #0000ff;' + ), + 'COMMENTS' => array( + 1 => 'color: #007f00;', + 'MULTI' => 'color: #007f00; font-style: italic;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000000;' + ), + 'BRACKETS' => array( + 0 => 'color: #000000;' + ), + 'STRINGS' => array( + 0 => 'color: #ff0000;' + ), + 'NUMBERS' => array( + 0 => 'color: #000000;' + ), + 'METHODS' => array( + 1 => 'color: #000000;', + 2 => 'color: #000000;' + ), + 'SYMBOLS' => array( + 0 => 'color: #00007f;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.', + 2 => '::' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> diff --git a/_piecrust/libs/Geshi/geshi/z80.php b/_piecrust/libs/Geshi/geshi/z80.php new file mode 100644 index 0000000..5ab146b --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/z80.php @@ -0,0 +1,144 @@ + 'ZiLOG Z80 Assembler', + 'COMMENT_SINGLE' => array(1 => ';'), + 'COMMENT_MULTI' => array(), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array("'", '"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + /*CPU*/ + 1 => array( + 'adc','add','and','bit','call','ccf','cp','cpd','cpdr','cpir','cpi', + 'cpl','daa','dec','di','djnz','ei','ex','exx','halt','im','in', + 'in0','inc','ind','indr','inir','ini','jp','jr','ld','ldd','lddr', + 'ldir','ldi','mlt','neg','nop','or','otdm','otdmr','otdr','otim', + 'otimr','otir','out','out0','outd','outi','pop','push','res','ret', + 'reti','retn','rl','rla','rlc','rlca','rld','rr','rra','rrc','rrca', + 'rrd','rst','sbc','scf','set','sla','sl1','sll','slp','sra','srl', + 'sub','tst','tstio','xor' + ), + /*registers*/ + 2 => array( + 'a','b','c','d','e','h','l', + 'af','bc','de','hl','ix','iy','sp', + 'af\'','ixh','ixl','iyh','iyl' + ), + /*Directive*/ + 3 => array( + '#define','#endif','#else','#ifdef','#ifndef','#include','#undef', + '.db','.dd','.df','.dq','.dt','.dw','.end','.org','equ' + ), + ), + 'SYMBOLS' => array( + '[', ']', '(', ')', '?', '+', '-', '*', '/', '%', '$' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #0000ff; font-weight:bold;', + 2 => 'color: #0000ff;', + 3 => 'color: #46aa03; font-weight:bold;' + ), + 'COMMENTS' => array( + 1 => 'color: #adadad; font-style: italic;', + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099; font-weight: bold;' + ), + 'BRACKETS' => array( + 0 => 'color: #0000ff;' + ), + 'STRINGS' => array( + 0 => 'color: #7f007f;' + ), + 'NUMBERS' => array( + 0 => 'color: #dd22dd;' + ), + 'METHODS' => array( + ), + 'SYMBOLS' => array( + 0 => 'color: #008000;' + ), + 'REGEXPS' => array( + 0 => 'color: #22bbff;', + 1 => 'color: #22bbff;', + 2 => 'color: #993333;' + ), + 'SCRIPT' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + //Hex numbers + 0 => '0[0-9a-fA-F]{1,32}[hH]', + //Binary numbers + 1 => '\%[01]{1,64}|[01]{1,64}[bB]?(?![^<]*>)', + //Labels + 2 => '^[_a-zA-Z][_a-zA-Z0-9]?\:' + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ), + 'TAB_WIDTH' => 8 +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/zxbasic.php b/_piecrust/libs/Geshi/geshi/zxbasic.php new file mode 100644 index 0000000..430e5f6 --- /dev/null +++ b/_piecrust/libs/Geshi/geshi/zxbasic.php @@ -0,0 +1,150 @@ + 'ZXBasic', + 'COMMENT_SINGLE' => array( + 1 => "'", + 2 => '#', + 3 => 'REM' + ), + 'COMMENT_MULTI' => array("/'" => "'/"), + 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, //GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '\\', + 'KEYWORDS' => array( + 1 => array( + "ASM", "BEEP", "BOLD", "BORDER", "BRIGHT", "ByRef", "ByVal", "CAST", + "CIRCLE", "CLS", "CONST", "CONTINUE", "DECLARE", "DIM", "DO", + "DRAW", "ELSE", "ELSEIF", "END", "EXIT", "FastCall", "FLASH", "FOR", + "FUNCTION", "GOTO", "GOSUB", "GO", "IF", "INK", "INVERSE", "ITALIC", + "LET", "LOAD", "LOOP", "NEXT", "OVER", "PAPER", "PAUSE", "PI", + "PLOT", "POKE", "PRINT", "RANDOMIZE", "REM", "RETURN", "SAVE", + "StdCall", "Sub", "THEN", "TO", "UNTIL", "VERIFY", "WEND", "WHILE", + ), + + // types + 2 => array( + 'byte', 'ubyte', 'integer', 'uinteger', 'long', 'ulong', 'fixed', + 'float', 'string' + ), + + // Functions + 3 => array( + "ABS", "ACS", "ASN", "ATN", "CHR", "CODE", "COS", "CSRLIN", "EXP", + "HEX", "HEX16", "INKEY", "INT", "LEN", "LN", "PEEK", "POS", "RND", + "SCREEN$", "SGN", "SIN", "SQR", "STR", "TAN", "VAL", + ), + + // Operators and modifiers + 4 => array( + "AT", "AS", "AND", "MOD", "NOT", "OR", "SHL", "SHR", "STEP", "XOR" + ) + ), + 'SYMBOLS' => array( + '(', ')' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => false, + 2 => false, + 3 => false, + 4 => false + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #000080; font-weight: bold;', // Commands + 2 => 'color: #800080; font-weight: bold;', // Types + 3 => 'color: #006000; font-weight: bold;', // Functions + 4 => 'color: #801010; font-weight: bold;' // Operators and Modifiers + ), + 'COMMENTS' => array( + 1 => 'color: #808080; font-style: italic;', + 2 => 'color: #339933;', + 3 => 'color: #808080; font-style: italic;', + 'MULTI' => 'color: #808080; font-style: italic;' + ), + 'BRACKETS' => array( + //0 => 'color: #66cc66;' + 0 => 'color: #007676;' + ), + 'STRINGS' => array( + //0 => 'color: #ff0000;' + 0 => 'color: #A00000; font-style: italic;' + ), + 'NUMBERS' => array( + //0 => 'color: #cc66cc;' + 0 => 'color: #b05103;'// font-weight: bold;' + ), + 'METHODS' => array( + 0 => 'color: #66cc66;' + ), + 'SYMBOLS' => array( + 0 => 'color: #66cc66;' + ), + 'ESCAPE_CHAR' => array( + 0 => 'color: #000099;' + ), + 'SCRIPT' => array( + ), + 'REGEXPS' => array( + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '' + ), + 'OOLANG' => true, + 'OBJECT_SPLITTERS' => array( + 1 => '.' + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?> \ No newline at end of file diff --git a/_piecrust/libs/LessPhp/LICENSE b/_piecrust/libs/LessPhp/LICENSE new file mode 100755 index 0000000..b2338b1 --- /dev/null +++ b/_piecrust/libs/LessPhp/LICENSE @@ -0,0 +1,660 @@ +For ease of distribution, lessphp 0.2.0 is under a dual license. +You are free to pick which one suits your needs. + + + + +MIT LICENSE + + + + +Copyright (c) 2010 Leaf Corcoran, http://leafo.net/lessphp + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + + +GPL VERSION 3 + + + + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + diff --git a/_piecrust/libs/LessPhp/README.md b/_piecrust/libs/LessPhp/README.md new file mode 100755 index 0000000..810d6c0 --- /dev/null +++ b/_piecrust/libs/LessPhp/README.md @@ -0,0 +1,59 @@ +# lessphp v0.2.0 +#### + +`lessphp` is a compiler for LESS written in php. +For a complete description of the language see + +### How to use in your php project + +Copy lessc.inc.php to your include directory and include it into your project. + +There are a few ways to interface with the compiler. The easiest is to have it +compile a LESS file when the page is requested. The static function +`lessc::ccompile`, checked compile, will compile the input LESS file only when it +is newer than the output file. + + try { + lessc::ccompile('input.less', 'output.css'); + catch (exception $ex) { + exit($ex->getMessage()); + } + +Note that all failures with lessc are reported through exceptions. +If you need more control you can make your own instance of lessc. + + $input = 'mystyle.less'; + + $lc = new lessc($input); + + try { + file_put_contents('mystyle.css', $lc->parse()); + } catch (exception $ex) { ... } + +In addition to loading from file, you can also parse from a string like so: + + $lc = new lessc(); + $lesscode = 'body { ... }'; + $out = $lc->parse($lesscode); + +### How to use from the command line + +An additional script has been included to use the compiler from the command +line. In the simplest invocation, you specify an input file and the compiled +css is written to standard out: + + ~> plessc input.less > output.css + +Using the -r flag, you can specify LESS code directly as an argument or, if +the argument is left off, from standard in: + + ~> plessc -r "my less code here" + +Finally, by using the -w flag you can watch a specified input file and have it +compile as needed to the output file + + ~> plessc -w input-file output-file + +Errors from watch mode are written to standard out. + + diff --git a/_piecrust/libs/LessPhp/lessc.inc.php b/_piecrust/libs/LessPhp/lessc.inc.php new file mode 100755 index 0000000..be44660 --- /dev/null +++ b/_piecrust/libs/LessPhp/lessc.inc.php @@ -0,0 +1,1900 @@ + + * Licensed under MIT or GPLv3, see LICENSE + */ + + +/** + * The less compiler and parser. + * + * Converting LESS to CSS is a two stage process. First the incoming document + * must be parsed. Parsing creates a tree in memory that represents the + * structure of the document. Then, the tree of the document is recursively + * compiled into the CSS text. The compile step has an implicit step called + * reduction, where values are brought to their lowest form before being + * turned to text, eg. mathematical equations are solved, and variables are + * dereferenced. + * + * The parsing stage produces the final structure of the document, for this + * reason mixins are mixed in and attribute accessors are referenced during + * the parse step. A reduction is done on the mixed in block as it is mixed in. + * + * See the following: + * - entry point for parsing and compiling: lessc::parse() + * - parsing: lessc::parseChunk() + * - compiling: lessc::compileBlock() + * + */ +class lessc { + protected $buffer; + protected $count; + protected $line; + + public $indentLevel; + public $indentChar = ' '; + + protected $env = null; + + protected $allParsedFiles = array(); + + public $vPrefix = '@'; // prefix of abstract properties + public $mPrefix = '$'; // prefix of abstract blocks + public $imPrefix = '!'; // special character to add !important + public $selfSelector = '&'; + + static protected $precedence = array( + '+' => 0, + '-' => 0, + '*' => 1, + '/' => 1, + '%' => 1, + ); + static protected $operatorString; // regex string to match any of the operators + + // types that have delayed computation + static protected $dtypes = array('expression', 'variable', + 'function', 'negative', 'list', 'lookup'); + + /** + * @link http://www.w3.org/TR/css3-values/ + */ + static protected $units=array( + 'em', 'ex', 'px', 'gd', 'rem', 'vw', 'vh', 'vm', 'ch', // Relative length units + 'in', 'cm', 'mm', 'pt', 'pc', // Absolute length units + '%', // Percentages + 'deg', 'grad', 'rad', 'turn', // Angles + 'ms', 's', // Times + 'Hz', 'kHz', //Frequencies + ); + + public $importDisabled = false; + public $importDir = ''; + + public $compat = false; // lessjs compatibility mode, does nothing right now + + /** + * if we are in an expression then we don't need to worry about parsing font shorthand + * $inExp becomes true after the first value in an expression, or if we enter parens + */ + protected $inExp = false; + + /** + * if we are in parens we can be more liberal with whitespace around operators because + * it must evaluate to a single value and thus is less ambiguous. + * + * Consider: + * property1: 10 -5; // is two numbers, 10 and -5 + * property2: (10 -5); // should evaluate to 5 + */ + protected $inParens = false; + + /** + * Parse a single chunk off the head of the buffer and place it. + * @return false when the buffer is empty, or there is an error + * + * This functions is called repeatedly until the entire document is + * parsed. + * + * This parser is most similar to a recursive descent parser. Single + * functions represent discrete grammatical rules for the language, and + * they are able to capture the text that represents those rules. + * + * Consider the function lessc::keyword(). (all parse functions are + * structured the same) + * + * The function takes a single reference argument. When calling the the + * function it will attempt to match a keyword on the head of the buffer. + * If it is successful, it will place the keyword in the referenced + * argument, advance the position in the buffer, and return true. If it + * fails then it won't advance the buffer and it will return false. + * + * All of these parse functions are powered by lessc::match(), which behaves + * the same way, but takes a literal regular expression. Sometimes it is + * more convenient to use match instead of creating a new function. + * + * Because of the format of the functions, to parse an entire string of + * grammatical rules, you can chain them together using &&. + * + * But, if some of the rules in the chain succeed before one fails, then + * then buffer position will be left at an invalid state. In order to + * avoid this, lessc::seek() is used to remember and set buffer positions. + * + * Before doing a chain, use $s = $this->seek() to remember the current + * position into $s. Then if a chain fails, use $this->seek($s) to + * go back where we started. + */ + function parseChunk() { + if (empty($this->buffer)) return false; + $s = $this->seek(); + + // setting a property + if ($this->keyword($key) && $this->assign() && + $this->propertyValue($value) && $this->end()) + { + $this->append(array('assign', $key, $value)); + return true; + } else { + $this->seek($s); + } + + // look for special css blocks + if ($this->env->parent == null && $this->literal('@', false)) { + $this->count--; + + // a font-face block + if ($this->literal('@font-face') && $this->literal('{')) { + $b = $this->pushSpecialBlock('@font-face'); + return true; + } else { + $this->seek($s); + } + + // charset + if ($this->literal('@charset') && $this->propertyValue($value) && + $this->end()) + { + $this->append(array('charset', $value)); + return true; + } else { + $this->seek($s); + } + + + // media + if ($this->literal('@media') && $this->mediaTypes($types, $rest) && + $this->literal('{')) + { + $b = $this->pushSpecialBlock('@media'); + $b->media = array($types, $rest); + return true; + } else { + $this->seek($s); + } + + // css animations + if ($this->match('(@(-[a-z]+-)?keyframes)', $m) && + $this->propertyValue($value) && $this->literal('{')) + { + $b = $this->pushSpecialBlock(trim($m[0])); + $b->keyframes = $value; + return true; + } else { + $this->seek($s); + } + } + + if (isset($this->env->keyframes)) { + if ($this->match("(to|from|[0-9]+%)", $m) && $this->literal('{')) { + $this->pushSpecialBlock($m[1]); + return true; + } else { + $this->seek($s); + } + } + + // setting a variable + if ($this->variable($name) && $this->assign() && + $this->propertyValue($value) && $this->end()) + { + $this->append(array('assign', $this->vPrefix.$name, $value)); + return true; + } else { + $this->seek($s); + } + + if ($this->import($url, $media)) { + // don't check .css files + if (empty($media) && substr_compare($url, '.css', -4, 4) !== 0) { + if ($this->importDisabled) { + $this->append(array('raw', '/* import disabled */')); + } else { + $path = $this->findImport($url); + if (!is_null($path)) { + $this->append(array('import', $path)); + return true; + } + } + } + + $this->append(array('raw', '@import url("'.$url.'")'. + ($media ? ' '.$media : '').';')); + return true; + } + + // opening parametric mixin + if ($this->tag($tag, true) && $this->argumentDef($args) && + $this->literal('{')) + { + $block = $this->pushBlock($this->fixTags(array($tag))); + $block->args = $args; + return true; + } else { + $this->seek($s); + } + + // opening a simple block + if ($this->tags($tags) && $this->literal('{')) { + $tags = $this->fixTags($tags); + $this->pushBlock($tags); + return true; + } else { + $this->seek($s); + } + + // closing a block + if ($this->literal('}')) { + try { + $block = $this->pop(); + } catch (exception $e) { + $this->seek($s); + $this->throwParseError($e->getMessage()); + } + + $hidden = true; + if (!isset($block->args)) foreach ($block->tags as $tag) { + if ($tag{0} != $this->mPrefix) { + $hidden = false; + break; + } + } + + if (!$hidden) $this->append(array('block', $block)); + foreach ($block->tags as $tag) { + $this->env->children[$tag] = $block; + } + + return true; + } + + + // mixin + if ($this->tags($tags, true, '>') && + ($this->argumentValues($argv) || true) && $this->end()) + { + $tags = $this->fixTags($tags); + $this->append(array('mixin', $tags, $argv)); + return true; + } else { + $this->seek($s); + } + // spare ; + if ($this->literal(';')) return true; + + return false; // got nothing, throw error + } + + function fixTags($tags) { + // move @ tags out of variable namespace + foreach ($tags as &$tag) { + if ($tag{0} == $this->vPrefix) $tag[0] = $this->mPrefix; + } + return $tags; + } + + // attempts to find the path of an import url, returns null for css files + function findImport($url) { + foreach ((array)$this->importDir as $dir) { + $full = $dir.(substr($dir, -1) != '/' ? '/' : '').$url; + if ($this->fileExists($file = $full.'.less') || $this->fileExists($file = $full)) { + return $file; + } + } + + return null; + } + + function fileExists($name) { + // sym link workaround + return file_exists($name) || file_exists(realpath(preg_replace('/\w+\/\.\.\//', '', $name))); + } + + // a list of expressions + function expressionList(&$exps) { + $values = array(); + + while ($this->expression($exp)) { + $values[] = $exp; + } + + if (count($values) == 0) return false; + + $exps = $this->compressList($values, ' '); + return true; + } + + /** + * Attempt to consume an expression. + * @link http://en.wikipedia.org/wiki/Operator-precedence_parser#Pseudo-code + */ + function expression(&$out) { + $s = $this->seek(); + if ($this->literal('(') && ($this->inExp = $this->inParens = true) && $this->expression($exp) && $this->literal(')')) { + $lhs = $exp; + } elseif ($this->seek($s) && $this->value($val)) { + $lhs = $val; + } else { + $this->inParens = $this->inExp = false; + $this->seek($s); + return false; + } + + $out = $this->expHelper($lhs, 0); + $this->inParens = $this->inExp = false; + return true; + } + + /** + * recursively parse infix equation with $lhs at precedence $minP + */ + function expHelper($lhs, $minP) { + $this->inExp = true; + $ss = $this->seek(); + + // if the if there was whitespace before the operator, then we require whitespace after + // the operator for it to be a mathematical operator. + + $needWhite = false; + if (!$this->inParens && preg_match('/\s/', $this->buffer{$this->count - 1})) { + $needWhite = true; + } + + // try to find a valid operator + while ($this->match(self::$operatorString.($needWhite ? '\s' : ''), $m) && self::$precedence[$m[1]] >= $minP) { + // get rhs + $s = $this->seek(); + $p = $this->inParens; + if ($this->literal('(') && ($this->inParens = true) && $this->expression($exp) && $this->literal(')')) { + $this->inParens = $p; + $rhs = $exp; + } else { + $this->inParens = $p; + if ($this->seek($s) && $this->value($val)) { + $rhs = $val; + } else { + break; + } + } + + // peek for next operator to see what to do with rhs + if ($this->peek(self::$operatorString, $next) && self::$precedence[$next[1]] > $minP) { + $rhs = $this->expHelper($rhs, self::$precedence[$next[1]]); + } + + // don't evaluate yet if it is dynamic + if (in_array($rhs[0], self::$dtypes) || in_array($lhs[0], self::$dtypes)) + $lhs = array('expression', $m[1], $lhs, $rhs); + else + $lhs = $this->evaluate($m[1], $lhs, $rhs); + + $ss = $this->seek(); + + $needWhite = false; + if (!$this->inParens && preg_match('/\s/', $this->buffer{$this->count - 1})) { + $needWhite = true; + } + } + $this->seek($ss); + + return $lhs; + } + + // consume a list of values for a property + function propertyValue(&$value) { + $values = array(); + + $s = null; + while ($this->expressionList($v)) { + $values[] = $v; + $s = $this->seek(); + if (!$this->literal(',')) break; + } + + if ($s) $this->seek($s); + + if (count($values) == 0) return false; + + $value = $this->compressList($values, ', '); + return true; + } + + // a single value + function value(&$value) { + // try a unit + if ($this->unit($value)) return true; + + // see if there is a negation + $s = $this->seek(); + if ($this->literal('-', false) && $this->variable($vname)) { + $value = array('negative', array('variable', $this->vPrefix.$vname)); + return true; + } else { + $this->seek($s); + } + + // accessor + // must be done before color + // this needs negation too + if ($this->accessor($a)) { + $a[1] = $this->fixTags($a[1]); + $value = $a; + return true; + } + + // color + if ($this->color($value)) return true; + + // css function + // must be done after color + if ($this->func($value)) return true; + + // string + if ($this->string($tmp, $d)) { + $value = array('string', $d.$tmp.$d); + return true; + } + + // try a keyword + if ($this->keyword($word)) { + $value = array('keyword', $word); + return true; + } + + // try a variable + if ($this->variable($vname)) { + $value = array('variable', $this->vPrefix.$vname); + return true; + } + + return false; + } + + // an import statement + function import(&$url, &$media) { + $s = $this->seek(); + if (!$this->literal('@import')) return false; + + // @import "something.css" media; + // @import url("something.css") media; + // @import url(something.css) media; + + if ($this->literal('url(')) $parens = true; else $parens = false; + + if (!$this->string($url)) { + if ($parens && $this->to(')', $url)) { + $parens = false; // got em + } else { + $this->seek($s); + return false; + } + } + + if ($parens && !$this->literal(')')) { + $this->seek($s); + return false; + } + + // now the rest is media + return $this->to(';', $media, false, true); + } + + // a list of media types, very lenient + function mediaTypes(&$types, &$rest) { + $s = $this->seek(); + $types = array(); + while ($this->match('([^,{\s]+)', $m)) { + $types[] = $m[1]; + if (!$this->literal(',')) break; + } + + // get everything else + if ($this->to('{', $rest, true, true)) { + $rest = trim($rest); + } + + return count($types) > 0; + } + + // a scoped value accessor + // .hello > @scope1 > @scope2['value']; + function accessor(&$var) { + $s = $this->seek(); + + if (!$this->tags($scope, true, '>') || !$this->literal('[')) { + $this->seek($s); + return false; + } + + // either it is a variable or a property + // why is a property wrapped in quotes, who knows! + if ($this->variable($name)) { + $name = $this->vPrefix.$name; + } elseif ($this->literal("'") && $this->keyword($name) && $this->literal("'")) { + // .. $this->count is messed up if we wanted to test another access type + } else { + $this->seek($s); + return false; + } + + if (!$this->literal(']')) { + $this->seek($s); + return false; + } + + $var = array('lookup', $scope, $name); + return true; + } + + // a string + function string(&$string, &$d = null) { + $s = $this->seek(); + if ($this->literal('"', false)) { + $delim = '"'; + } elseif ($this->literal("'", false)) { + $delim = "'"; + } else { + return false; + } + + if (!$this->to($delim, $string)) { + $this->seek($s); + return false; + } + + $d = $delim; + return true; + } + + /** + * Consume a number and optionally a unit. + * Can also consume a font shorthand if it is a simple case. + * $allowed restricts the types that are matched. + */ + function unit(&$unit, $allowed = null) { + $simpleCase = $allowed == null; + if (!$allowed) $allowed = self::$units; + + if ($this->match('(-?[0-9]*(\.)?[0-9]+)('.implode('|', $allowed).')?', $m, !$simpleCase)) { + if (!isset($m[3])) $m[3] = 'number'; + $unit = array($m[3], $m[1]); + + // check for size/height font unit.. should this even be here? + if ($simpleCase) { + $s = $this->seek(); + if (!$this->inExp && $this->literal('/', false) && $this->unit($right, self::$units)) { + $unit = array('keyword', $this->compileValue($unit).'/'.$this->compileValue($right)); + } else { + // get rid of whitespace + $this->seek($s); + $this->match('', $_); + } + } + + return true; + } + + return false; + } + + // a # color + function color(&$out) { + $color = array('color'); + + if ($this->match('(#([0-9a-f]{6})|#([0-9a-f]{3}))', $m)) { + if (isset($m[3])) { + $num = $m[3]; + $width = 16; + } else { + $num = $m[2]; + $width = 256; + } + + $num = hexdec($num); + foreach (array(3,2,1) as $i) { + $t = $num % $width; + $num /= $width; + + $color[$i] = $t * (256/$width) + $t * floor(16/$width); + } + + $out = $color; + return true; + } + + return false; + } + + // consume a list of property values delimited by ; and wrapped in () + function argumentValues(&$args, $delim = ';') { + $s = $this->seek(); + if (!$this->literal('(')) return false; + + $values = array(); + while (true) { + if ($this->propertyValue($value)) $values[] = $value; + if (!$this->literal($delim)) break; + else { + if ($value == null) $values[] = null; + $value = null; + } + } + + if (!$this->literal(')')) { + $this->seek($s); + return false; + } + + $args = $values; + return true; + } + + // consume an argument definition list surrounded by () + // each argument is a variable name with optional value + function argumentDef(&$args, $delim = ';') { + $s = $this->seek(); + if (!$this->literal('(')) return false; + + $values = array(); + while ($this->variable($vname)) { + $arg = array($vname); + if ($this->assign() && $this->propertyValue($value)) { + $arg[] = $value; + // let the : slide if there is no value + } + + $values[] = $arg; + if (!$this->literal($delim)) break; + } + + if (!$this->literal(')')) { + $this->seek($s); + return false; + } + + $args = $values; + return true; + } + + // consume a list of tags + // this accepts a hanging delimiter + function tags(&$tags, $simple = false, $delim = ',') { + $tags = array(); + while ($this->tag($tt, $simple)) { + $tags[] = $tt; + if (!$this->literal($delim)) break; + } + if (count($tags) == 0) return false; + + return true; + } + + // a bracketed value (contained within in a tag definition) + function tagBracket(&$value) { + $s = $this->seek(); + if ($this->literal('[') && $this->to(']', $c, true) && $this->literal(']', false)) { + $value = '['.$c.']'; + // whitespace? + if ($this->match('', $_)) $value .= $_[0]; + return true; + } + + $this->seek($s); + return false; + } + + // a single tag + function tag(&$tag, $simple = false) { + if ($simple) + $chars = '^,:;{}\][>\(\) '; + else + $chars = '^,;{}['; + + $tag = ''; + while ($this->tagBracket($first)) $tag .= $first; + while ($this->match('(['.$chars.'0-9]['.$chars.']*)', $m)) { + $tag .= $m[1]; + if ($simple) break; + + while ($this->tagBracket($brack)) $tag .= $brack; + } + $tag = trim($tag); + if ($tag == '') return false; + + return true; + } + + // a css function + function func(&$func) { + $s = $this->seek(); + + if ($this->match('([\w\-_][\w\-_:\.]*)', $m) && $this->literal('(')) { + $fname = $m[1]; + if ($fname == 'url') { + $this->to(')', $content, true); + $args = array('string', $content); + } else { + $args = array(); + while (true) { + $ss = $this->seek(); + if ($this->keyword($name) && $this->literal('=') && $this->expressionList($value)) { + $args[] = array('list', '=', array(array('keyword', $name), $value)); + } else { + $this->seek($ss); + if ($this->expressionList($value)) { + $args[] = $value; + } + } + + if (!$this->literal(',')) break; + } + $args = array('list', ',', $args); + } + + if ($this->literal(')')) { + $func = array('function', $fname, $args); + return true; + } + } + + $this->seek($s); + return false; + } + + // consume a less variable + function variable(&$name) { + $s = $this->seek(); + if ($this->literal($this->vPrefix, false) && $this->keyword($name)) { + return true; + } + + return false; + } + + /** + * Consume an assignment operator + * Can optionally take a name that will be set to the current property name + */ + function assign($name = null) { + if ($name) $this->currentProperty = $name; + return $this->literal(':') || $this->literal('='); + } + + // consume a keyword + function keyword(&$word) { + if ($this->match('([\w_\-\*!"][\w\-_"]*)', $m)) { + $word = $m[1]; + return true; + } + return false; + } + + // consume an end of statement delimiter + function end() { + if ($this->literal(';')) + return true; + elseif ($this->count == strlen($this->buffer) || $this->buffer{$this->count} == '}') { + // if there is end of file or a closing block next then we don't need a ; + return true; + } + return false; + } + + function compressList($items, $delim) { + if (count($items) == 1) return $items[0]; + else return array('list', $delim, $items); + } + + /** + * Recursively compiles a block. + * @param $block the block + * @param $parentTags the tags of the block that contained this one + * + * A block is analogous to a CSS block in most cases. A single less document + * is encapsulated in a block when parsed, but it does not have parent tags + * so all of it's children appear on the root level when compiled. + * + * Blocks are made up of props and children. + * + * Props are property instructions, array tuples which describe an action + * to be taken, eg. write a property, set a variable, mixin a block. + * + * The children of a block are just all the blocks that are defined within. + * + * Compiling the block involves pushing a fresh environment on the stack, + * and iterating through the props, compiling each one. + * + * See lessc::compileProp() + * + */ + function compileBlock($block, $parent_tags = null) { + $isRoot = $parent_tags == null && $block->tags == null; + + $indent = str_repeat($this->indentChar, $this->indentLevel); + + if (!empty($block->no_multiply)) { + $special_block = true; + $this->indentLevel++; + $tags = array(); + } else { + $special_block = false; + $tags = $this->multiplyTags($parent_tags, $block->tags); + } + + $this->pushEnv(); + $lines = array(); + $blocks = array(); + foreach ($block->props as $prop) { + $this->compileProp($prop, $block, $tags, $lines, $blocks); + } + + $this->pop(); + + $nl = $isRoot ? "\n".$indent : + "\n".$indent.$this->indentChar; + + ob_start(); + + if ($special_block) { + $this->indentLevel--; + if (isset($block->media)) { + list($media_types, $media_rest) = $block->media; + echo "@media ".join(', ', $media_types). + (!empty($media_rest) ? " $media_rest" : '' ); + } elseif (isset($block->keyframes)) { + echo $block->tags[0]." ". + $this->compileValue($this->reduce($block->keyframes)); + } else { + list($name) = $block->tags; + echo $indent.$name; + } + + echo ' {'.(count($lines) > 0 ? $nl : "\n"); + } + + // dump it + if (count($lines) > 0) { + if (!$special_block && !$isRoot) { + echo $indent.implode(", ", $tags); + if (count($lines) > 1) echo " {".$nl; + else echo " { "; + } + + echo implode($nl, $lines); + + if (!$special_block && !$isRoot) { + if (count($lines) > 1) echo "\n".$indent."}\n"; + else echo " }\n"; + } else echo "\n"; + } + + foreach ($blocks as $b) echo $b; + + if ($special_block) { + echo $indent."}\n"; + } + + return ob_get_clean(); + } + + + // find the fully qualified tags for a block and its parent's tags + function multiplyTags($parents, $current) { + if ($parents == null) return $current; + + $tags = array(); + foreach ($parents as $ptag) { + foreach ($current as $tag) { + $tags[] = trim($ptag. + ($tag{0} == $this->selfSelector || $tag{0} == ':' + ? ltrim($tag, $this->selfSelector) : ' '.$tag)); + } + } + + return $tags; + } + + // attempt to find block pointed at by path within search_in or its parent + function findBlock($search_in, $path) { + if ($search_in == null) return null; + $name = $path[0]; + + if (isset($search_in->children[$name])) { + $block = $search_in->children[$name]; + if (count($path) == 1) { + return $block; + } else { + return $this->findBlock($block, array_slice($path, 1)); + } + } else { + return $this->findBlock($search_in->parent, $path); + } + } + + // sets all argument names in $args to either the default value + // or the one passed in through $values + function zipSetArgs($args, $values) { + $i = 0; + foreach ($args as $a) { + if ($i < count($values) && !is_null($values[$i])) { + $value = $values[$i]; + } elseif (isset($a[1])) { + $value = $a[1]; + } else $value = null; + + $this->set($this->vPrefix.$a[0], $this->reduce($value)); + $i++; + } + } + + // compile a prop and update $lines or $blocks appropriately + function compileProp($prop, $block, $tags, &$_lines, &$_blocks) { + switch ($prop[0]) { + case 'assign': + list(, $name, $value) = $prop; + if ($name[0] == $this->vPrefix) { + $this->set($name, $this->reduce($value)); + } else { + $_lines[] = "$name:". + $this->compileValue($this->reduce($value)).";"; + } + break; + case 'block': + list(, $child) = $prop; + $_blocks[] = $this->compileBlock($child, $tags); + break; + case 'mixin': + list(, $path, $args) = $prop; + + $mixin = $this->findBlock($block, $path); + if (is_null($mixin)) { + // echo "failed to find block: ".implode(" > ", $path)."\n"; + break; // throw error here?? + } + + $have_args = false; + if (isset($mixin->args)) { + $have_args = true; + $this->pushEnv(); + $this->zipSetArgs($mixin->args, $args); + } + + list($name) = $mixin->tags; + if ($name == "div") { + print_r($mixin->props); + } + + $old_parent = $mixin->parent; + $mixin->parent = $block; + + foreach ($mixin->props as $sub_prop) { + $this->compileProp($sub_prop, $mixin, $tags, $_lines, $_blocks); + } + + $mixin->parent = $old_parent; + + if ($have_args) $this->pop(); + + break; + case 'raw': + $_lines[] = $prop[1]; + break; + case 'import': + list(, $path) = $prop; + $this->addParsedFile($path); + $root = $this->createChild($path)->parseTree(); + + $root->parent = $block; + foreach ($root->props as $sub_prop) { + $this->compileProp($sub_prop, $root, $tags, $_lines, $_blocks); + } + + // inject imported blocks into this block, local will overwrite import + $block->children = array_merge($root->children, $block->children); + break; + case 'charset': + list(, $value) = $prop; + $_lines[] = '@charset '.$this->compileValue($this->reduce($value)).';'; + break; + default: + echo "unknown op: {$prop[0]}\n"; + throw new exception(); + } + } + + + /** + * Compiles a primitive value into a CSS property value. + * + * Values in lessphp are typed by being wrapped in arrays, their format is + * typically: + * + * array(type, contents [, additional_contents]*) + * + * Will not work on non reduced values (expressions, variables, etc) + */ + function compileValue($value) { + switch ($value[0]) { + case 'list': + // [1] - delimiter + // [2] - array of values + return implode($value[1], array_map(array($this, 'compileValue'), $value[2])); + case 'keyword': + // [1] - the keyword + case 'number': + // [1] - the number + return $value[1]; + case 'string': + // [1] - contents of string (includes quotes) + + // search for inline variables to replace + $replace = array(); + if (preg_match_all('/{('.$this->preg_quote($this->vPrefix).'[\w-_][0-9\w-_]*?)}/', $value[1], $m)) { + foreach ($m[1] as $name) { + if (!isset($replace[$name])) + $replace[$name] = $this->compileValue($this->reduce(array('variable', $name))); + } + } + foreach ($replace as $var=>$val) { + // strip quotes + if (preg_match('/^(["\']).*?(\1)$/', $val)) { + $val = substr($val, 1, -1); + } + $value[1] = str_replace('{'.$var.'}', $val, $value[1]); + } + + return $value[1]; + case 'color': + // [1] - red component (either number for a %) + // [2] - green component + // [3] - blue component + // [4] - optional alpha component + if (count($value) == 5) { // rgba + return 'rgba('.$value[1].','.$value[2].','.$value[3].','.$value[4].')'; + } + return sprintf("#%02x%02x%02x", $value[1], $value[2], $value[3]); + case 'function': + // [1] - function name + // [2] - some value representing arguments + + // see if function evaluates to something else + $value = $this->reduce($value); + if ($value[0] == 'function') { + return $value[1].'('.$this->compileValue($value[2]).')'; + } + else return $this->compileValue($value); + default: // assumed to be unit + return $value[1].$value[0]; + } + } + + function lib_rgbahex($color) { + if ($color[0] != 'color') + throw new exception("color expected for rgbahex"); + + return sprintf("#%02x%02x%02x%02x", + isset($color[4]) ? $color[4]*255 : 0, + $color[1],$color[2], $color[3]); + } + + function lib_quote($arg) { + return '"'.$this->compileValue($arg).'"'; + } + + function lib_unquote($arg) { + $out = $this->compileValue($arg); + if ($this->quoted($out)) $out = substr($out, 1, -1); + return $out; + } + + // alias for unquote + function lib_e($arg) { + return $this->lib_unquote($arg); + } + + function lib_floor($arg) { + return floor($arg[1]); + } + + function lib_round($arg) { + return round($arg[1]); + } + + // is a string surrounded in quotes? returns the quoting char if true + function quoted($s) { + if (preg_match('/^("|\').*?\1$/', $s, $m)) + return $m[1]; + else return false; + } + + /** + * Helper function to get argurments for color functions + * accepts invalid input, non colors interpreted to black + */ + function colorArgs($args) { + if ($args[0] != 'list' || count($args[2]) < 2) { + return array(array('color', 0, 0, 0)); + } + list($color, $delta) = $args[2]; + if ($color[0] != 'color') + $color = array('color', 0, 0, 0); + + $delta = floatval($delta[1]); + + return array($color, $delta); + } + + function lib_darken($args) { + list($color, $delta) = $this->colorArgs($args); + + $hsl = $this->toHSL($color); + $hsl[3] = $this->clamp($hsl[3] - $delta, 100); + return $this->toRGB($hsl); + } + + function lib_lighten($args) { + list($color, $delta) = $this->colorArgs($args); + + $hsl = $this->toHSL($color); + $hsl[3] = $this->clamp($hsl[3] + $delta, 100); + return $this->toRGB($hsl); + } + + function lib_saturate($args) { + list($color, $delta) = $this->colorArgs($args); + + $hsl = $this->toHSL($color); + $hsl[2] = $this->clamp($hsl[2] + $delta, 100); + return $this->toRGB($hsl); + } + + function lib_desaturate($args) { + list($color, $delta) = $this->colorArgs($args); + + $hsl = $this->toHSL($color); + $hsl[2] = $this->clamp($hsl[2] - $delta, 100); + return $this->toRGB($hsl); + } + + function lib_spin($args) { + list($color, $delta) = $this->colorArgs($args); + + $hsl = $this->toHSL($color); + $hsl[1] = $this->clamp($hsl[1] + $delta, 360); + return $this->toRGB($hsl); + } + + function lib_fadeout($args) { + list($color, $delta) = $this->colorArgs($args); + $color[4] = $this->clamp((isset($color[4]) ? $color[4] : 1) - $delta/100); + return $color; + } + + function lib_fadein($args) { + list($color, $delta) = $this->colorArgs($args); + $color[4] = $this->clamp((isset($color[4]) ? $color[4] : 1) + $delta/100); + return $color; + } + + function lib_hue($color) { + if ($color[0] != 'color') return 0; + $hsl = $this->toHSL($color); + return round($hsl[1]); + } + + function lib_saturation($color) { + if ($color[0] != 'color') return 0; + $hsl = $this->toHSL($color); + return round($hsl[2]); + } + + function lib_lightness($color) { + if ($color[0] != 'color') return 0; + $hsl = $this->toHSL($color); + return round($hsl[3]); + } + + function toHSL($color) { + if ($color[0] == 'hsl') return $color; + + $r = $color[1] / 255; + $g = $color[2] / 255; + $b = $color[3] / 255; + + $min = min($r, $g, $b); + $max = max($r, $g, $b); + + $L = ($min + $max) / 2; + if ($min == $max) { + $S = $H = 0; + } else { + if ($L < 0.5) + $S = ($max - $min)/($max + $min); + else + $S = ($max - $min)/(2.0 - $max - $min); + + if ($r == $max) $H = ($g - $b)/($max - $min); + elseif ($g == $max) $H = 2.0 + ($b - $r)/($max - $min); + elseif ($b == $max) $H = 4.0 + ($r - $g)/($max - $min); + + } + + $out = array('hsl', + ($H < 0 ? $H + 6 : $H)*60, + $S*100, + $L*100, + ); + + if (count($color) > 4) $out[] = $color[4]; // copy alpha + return $out; + } + + function toRGB_helper($comp, $temp1, $temp2) { + if ($comp < 0) $comp += 1.0; + elseif ($comp > 1) $comp -= 1.0; + + if (6 * $comp < 1) return $temp1 + ($temp2 - $temp1) * 6 * $comp; + if (2 * $comp < 1) return $temp2; + if (3 * $comp < 2) return $temp1 + ($temp2 - $temp1)*((2/3) - $comp) * 6; + + return $temp1; + } + + /** + * Converts an hsl array into a color value in rgb. + * Expects H to be in range of 0 to 360, S and L in 0 to 100 + */ + function toRGB($color) { + if ($color == 'color') return $color; + + $H = $color[1] / 360; + $S = $color[2] / 100; + $L = $color[3] / 100; + + if ($S == 0) { + $r = $g = $b = $L; + } else { + $temp2 = $L < 0.5 ? + $L*(1.0 + $S) : + $L + $S - $L * $S; + + $temp1 = 2.0 * $L - $temp2; + + $r = $this->toRGB_helper($H + 1/3, $temp1, $temp2); + $g = $this->toRGB_helper($H, $temp1, $temp2); + $b = $this->toRGB_helper($H - 1/3, $temp1, $temp2); + } + + $out = array('color', round($r*255), round($g*255), round($b*255)); + if (count($color) > 4) $out[] = $color[4]; // copy alpha + return $out; + } + + function clamp($v, $max = 1, $min = 0) { + return min($max, max($min, $v)); + } + + /** + * Convert the rgb, rgba, hsl color literals of function type + * as returned by the parser into values of color type. + */ + function funcToColor($func) { + $fname = $func[1]; + if ($func[2][0] != 'list') return false; // need a list of arguments + $rawComponents = $func[2][2]; + + if ($fname == 'hsl' || $fname == 'hsla') { + $hsl = array('hsl'); + $i = 0; + foreach ($rawComponents as $c) { + $val = $this->reduce($c); + $val = isset($val[1]) ? floatval($val[1]) : 0; + + if ($i == 0) $clamp = 360; + elseif ($i < 4) $clamp = 100; + else $clamp = 1; + + $hsl[] = $this->clamp($val, $clamp); + $i++; + } + + while (count($hsl) < 4) $hsl[] = 0; + return $this->toRGB($hsl); + + } elseif ($fname == 'rgb' || $fname == 'rgba') { + $components = array(); + $i = 1; + foreach ($rawComponents as $c) { + $c = $this->reduce($c); + if ($i < 4) { + if ($c[0] == '%') $components[] = 255 * ($c[1] / 100); + else $components[] = floatval($c[1]); + } elseif ($i == 4) { + if ($c[0] == '%') $components[] = 1.0 * ($c[1] / 100); + else $components[] = floatval($c[1]); + } else break; + + $i++; + } + while (count($components) < 3) $components[] = 0; + array_unshift($components, 'color'); + return $this->fixColor($components); + } + + return false; + } + + // reduce a delayed type to its final value + // dereference variables and solve equations + function reduce($var, $defaultValue = array('number', 0)) { + while (in_array($var[0], self::$dtypes)) { + if ($var[0] == 'list') { + foreach ($var[2] as &$value) $value = $this->reduce($value); + break; + } elseif ($var[0] == 'expression') { + $var = $this->evaluate($var[1], $var[2], $var[3]); + } elseif ($var[0] == 'variable') { + $var = $this->get($var[1]); + } elseif ($var[0] == 'lookup') { + // do accessor here.... + $var = array('number', 0); + } elseif ($var[0] == 'function') { + $color = $this->funcToColor($var); + if ($color) $var = $color; + else { + list($_, $name, $args) = $var; + $f = array($this, 'lib_'.$name); + if (is_callable($f)) { + if ($args[0] == 'list') + $args = $this->compressList($args[2], $args[1]); + + $var = call_user_func($f, $this->reduce($args)); + + // convet to a typed value if the result is a php primitive + if (is_numeric($var)) $var = array('number', $var); + elseif (!is_array($var)) $var = array('keyword', $var); + } else { + // plain function, reduce args + $var[2] = $this->reduce($var[2]); + } + } + break; // done reducing after a function + } elseif ($var[0] == 'negative') { + $value = $this->reduce($var[1]); + if (is_numeric($value[1])) { + $value[1] = -1*$value[1]; + } + $var = $value; + } + } + + return $var; + } + + // evaluate an expression + function evaluate($op, $left, $right) { + $left = $this->reduce($left); + $right = $this->reduce($right); + + if ($left[0] == 'color' && $right[0] == 'color') { + $out = $this->op_color_color($op, $left, $right); + return $out; + } + + if ($left[0] == 'color') { + return $this->op_color_number($op, $left, $right); + } + + if ($right[0] == 'color') { + return $this->op_number_color($op, $left, $right); + } + + // concatenate strings + if ($op == '+' && $left[0] == 'string') { + $append = $this->compileValue($right); + if ($this->quoted($append)) $append = substr($append, 1, -1); + + $lhs = $this->compileValue($left); + if ($q = $this->quoted($lhs)) $lhs = substr($lhs, 1, -1); + if (!$q) $q = ''; + + return array('string', $q.$lhs.$append.$q); + } + + if ($left[0] == 'keyword' || $right[0] == 'keyword' || + $left[0] == 'string' || $right[0] == 'string') + { + // look for negative op + if ($op == '-') $right[1] = '-'.$right[1]; + return array('keyword', $this->compileValue($left) .' '. $this->compileValue($right)); + } + + // default to number operation + return $this->op_number_number($op, $left, $right); + } + + // make sure a color's components don't go out of bounds + function fixColor($c) { + foreach (range(1, 3) as $i) { + if ($c[$i] < 0) $c[$i] = 0; + if ($c[$i] > 255) $c[$i] = 255; + $c[$i] = floor($c[$i]); + } + + return $c; + } + + function op_number_color($op, $lft, $rgt) { + if ($op == '+' || $op = '*') { + return $this->op_color_number($op, $rgt, $lft); + } + } + + function op_color_number($op, $lft, $rgt) { + if ($rgt[0] == '%') $rgt[1] /= 100; + + return $this->op_color_color($op, $lft, + array_fill(1, count($lft) - 1, $rgt[1])); + } + + function op_color_color($op, $left, $right) { + $out = array('color'); + $max = count($left) > count($right) ? count($left) : count($right); + foreach (range(1, $max - 1) as $i) { + $lval = isset($left[$i]) ? $left[$i] : 0; + $rval = isset($right[$i]) ? $right[$i] : 0; + switch ($op) { + case '+': + $out[] = $lval + $rval; + break; + case '-': + $out[] = $lval - $rval; + break; + case '*': + $out[] = $lval * $rval; + break; + case '%': + $out[] = $lval % $rval; + break; + case '/': + if ($rval == 0) throw new exception("evaluate error: can't divide by zero"); + $out[] = $lval / $rval; + break; + default: + throw new exception('evaluate error: color op number failed on op '.$op); + } + } + return $this->fixColor($out); + } + + // operator on two numbers + function op_number_number($op, $left, $right) { + if ($right[0] == '%') $right[1] /= 100; + + // figure out type + if ($right[0] == 'number' || $right[0] == '%') $type = $left[0]; + else $type = $right[0]; + + $value = 0; + switch ($op) { + case '+': + $value = $left[1] + $right[1]; + break; + case '*': + $value = $left[1] * $right[1]; + break; + case '-': + $value = $left[1] - $right[1]; + break; + case '%': + $value = $left[1] % $right[1]; + break; + case '/': + if ($right[1] == 0) throw new exception('parse error: divide by zero'); + $value = $left[1] / $right[1]; + break; + default: + throw new exception('parse error: unknown number operator: '.$op); + } + + return array($type, $value); + } + + + /* environment functions */ + + // push a new block on the stack, used for parsing + function pushBlock($tags) { + $b = new stdclass; + $b->parent = $this->env; + + $b->tags = $tags; + $b->props = array(); + $b->children = array(); + + $this->env = $b; + return $b; + } + + // push a block that doesn't multiply tags + function pushSpecialBlock($name) { + $b = $this->pushBlock(array($name)); + $b->no_multiply = true; + return $b; + } + + // used for compiliation variable state + function pushEnv() { + $e = new stdclass; + $e->parent = $this->env; + + $this->store = array(); + + $this->env = $e; + return $e; + } + + // pop something off the stack + function pop() { + $old = $this->env; + $this->env = $this->env->parent; + return $old; + } + + // set something in the current env + function set($name, $value) { + $this->env->store[$name] = $value; + } + + // append an property + function append($prop) { + $this->env->props[] = $prop; + } + + // get the highest occurrence entry for a name + function get($name) { + $current = $this->env; + while ($current) { + if (isset($current->store[$name])) + return $current->store[$name]; + else + $current = $current->parent; + } + + return null; + } + + /* raw parsing functions */ + + function literal($what, $eatWhitespace = true) { + // this is here mainly prevent notice from { } string accessor + if ($this->count >= strlen($this->buffer)) return false; + + // shortcut on single letter + if (!$eatWhitespace and strlen($what) == 1) { + if ($this->buffer{$this->count} == $what) { + $this->count++; + return true; + } + else return false; + } + + return $this->match($this->preg_quote($what), $m, $eatWhitespace); + } + + function preg_quote($what) { + return preg_quote($what, '/'); + } + + // advance counter to next occurrence of $what + // $until - don't include $what in advance + function to($what, &$out, $until = false, $allowNewline = false) { + $validChars = $allowNewline ? "[^\n]" : '.'; + if (!$this->match('('.$validChars.'*?)'.$this->preg_quote($what), $m, !$until)) return false; + if ($until) $this->count -= strlen($what); // give back $what + $out = $m[1]; + return true; + } + + // try to match something on head of buffer + function match($regex, &$out, $eatWhitespace = true) { + $r = '/'.$regex.($eatWhitespace ? '\s*' : '').'/Ais'; + if (preg_match($r, $this->buffer, $out, null, $this->count)) { + $this->count += strlen($out[0]); + return true; + } + return false; + } + + // match something without consuming it + function peek($regex, &$out = null) { + $r = '/'.$regex.'/Ais'; + $result = preg_match($r, $this->buffer, $out, null, $this->count); + + return $result; + } + + // seek to a spot in the buffer or return where we are on no argument + function seek($where = null) { + if ($where === null) return $this->count; + else $this->count = $where; + return true; + } + + /** + * Initialize state for a fresh parse + */ + protected function prepareParser($buff) { + $this->env = null; + $this->expandStack = array(); + $this->indentLevel = 0; + $this->count = 0; + $this->line = 1; + + $this->buffer = $this->removeComments($buff); + $this->pushBlock(null); // set up global scope + + // trim whitespace on head + if (preg_match('/^\s+/', $this->buffer, $m)) { + $this->line += substr_count($m[0], "\n"); + $this->buffer = ltrim($this->buffer); + } + } + + // create a child parser (for compiling an import) + protected function createChild($fname) { + $less = new lessc($fname); + $less->importDir = $this->importDir; + $less->indentChar = $this->indentChar; + $less->compat = $this->compat; + return $less; + } + + // parse code and return intermediate tree + public function parseTree($str = null) { + $this->prepareParser(is_null($str) ? $this->buffer : $str); + while (false !== $this->parseChunk()); + + if ($this->count != strlen($this->buffer)) + $this->throwParseError(); + + if (!is_null($this->env->parent)) + throw new exception('parse error: unclosed block'); + + $root = $this->env; + $this->env = null; + return $root; + } + + // inject array of unparsed strings into environment as variables + protected function injectVariables($args) { + $this->pushEnv(); + $parser = new lessc(); + foreach ($args as $name => $str_value) { + if ($name{0} != '@') $name = '@'.$name; + $parser->count = 0; + $parser->buffer = (string)$str_value; + if (!$parser->propertyValue($value)) { + throw new Exception("failed to parse passed in variable $name: $str_value"); + } + + $this->set($name, $value); + } + } + + // parse and compile buffer + function parse($str = null, $initial_variables = null) { + $locale = setlocale(LC_NUMERIC, 0); + setlocale(LC_NUMERIC, "C"); + $root = $this->parseTree($str); + + if ($initial_variables) $this->injectVariables($initial_variables); + $out = $this->compileBlock($root); + setlocale(LC_NUMERIC, $locale); + return $out; + } + + function throwParseError($msg = 'parse error') { + $line = $this->line + substr_count(substr($this->buffer, 0, $this->count), "\n"); + if (isset($this->fileName)) { + $loc = $this->fileName.' on line '.$line; + } else { + $loc = "line: ".$line; + } + + if ($this->peek("(.*?)(\n|$)", $m)) + throw new exception($msg.': failed at `'.$m[1].'` '.$loc); + } + + /** + * Initialize any static state, can initialize parser for a file + */ + function __construct($fname = null, $opts = null) { + if (!self::$operatorString) { + self::$operatorString = + '('.implode('|', array_map(array($this, 'preg_quote'), + array_keys(self::$precedence))).')'; + } + + if ($fname) { + if (!is_file($fname)) { + throw new Exception('load error: failed to find '.$fname); + } + $pi = pathinfo($fname); + + $this->fileName = $fname; + $this->importDir = $pi['dirname'].'/'; + $this->buffer = file_get_contents($fname); + + $this->addParsedFile($fname); + } + } + + // remove comments from $text + // todo: make it work for all functions, not just url + function removeComments($text) { + $look = array( + 'url(', '//', '/*', '"', "'" + ); + + $out = ''; + $min = null; + $done = false; + while (true) { + // find the next item + foreach ($look as $token) { + $pos = strpos($text, $token); + if ($pos !== false) { + if (!isset($min) || $pos < $min[1]) $min = array($token, $pos); + } + } + + if (is_null($min)) break; + + $count = $min[1]; + $skip = 0; + $newlines = 0; + switch ($min[0]) { + case 'url(': + if (preg_match('/url\(.*?\)/', $text, $m, 0, $count)) + $count += strlen($m[0]) - strlen($min[0]); + break; + case '"': + case "'": + if (preg_match('/'.$min[0].'.*?'.$min[0].'/', $text, $m, 0, $count)) + $count += strlen($m[0]) - 1; + break; + case '//': + $skip = strpos($text, "\n", $count); + if ($skip === false) $skip = strlen($text) - $count; + else $skip -= $count; + break; + case '/*': + if (preg_match('/\/\*.*?\*\//s', $text, $m, 0, $count)) { + $skip = strlen($m[0]); + $newlines = substr_count($m[0], "\n"); + } + break; + } + + if ($skip == 0) $count += strlen($min[0]); + + $out .= substr($text, 0, $count).str_repeat("\n", $newlines); + $text = substr($text, $count + $skip); + + $min = null; + } + + return $out.$text; + } + + public function allParsedFiles() { return $this->allParsedFiles; } + protected function addParsedFile($file) { + $this->allParsedFiles[realpath($file)] = filemtime($file); + } + + + // compile to $in to $out if $in is newer than $out + // returns true when it compiles, false otherwise + public static function ccompile($in, $out) { + if (!is_file($out) || filemtime($in) > filemtime($out)) { + $less = new lessc($in); + file_put_contents($out, $less->parse()); + return true; + } + + return false; + } + + /** + * Execute lessphp on a .less file or a lessphp cache structure + * + * The lessphp cache structure contains information about a specific + * less file having been parsed. It can be used as a hint for future + * calls to determine whether or not a rebuild is required. + * + * The cache structure contains two important keys that may be used + * externally: + * + * compiled: The final compiled CSS + * updated: The time (in seconds) the CSS was last compiled + * + * The cache structure is a plain-ol' PHP associative array and can + * be serialized and unserialized without a hitch. + * + * @param mixed $in Input + * @param bool $force Force rebuild? + * @return array lessphp cache structure + */ + public static function cexecute($in, $force = false) { + + // assume no root + $root = null; + + if (is_string($in)) { + $root = $in; + } elseif (is_array($in) and isset($in['root'])) { + if ($force or ! isset($in['files'])) { + // If we are forcing a recompile or if for some reason the + // structure does not contain any file information we should + // specify the root to trigger a rebuild. + $root = $in['root']; + } elseif (isset($in['files']) and is_array($in['files'])) { + foreach ($in['files'] as $fname => $ftime ) { + if (!file_exists($fname) or filemtime($fname) > $ftime) { + // One of the files we knew about previously has changed + // so we should look at our incoming root again. + $root = $in['root']; + break; + } + } + } + } else { + // TODO: Throw an exception? We got neither a string nor something + // that looks like a compatible lessphp cache structure. + return null; + } + + if ($root !== null) { + // If we have a root value which means we should rebuild. + $less = new lessc($root); + $out = array(); + $out['root'] = $root; + $out['compiled'] = $less->parse(); + $out['files'] = $less->allParsedFiles(); + $out['updated'] = time(); + return $out; + } else { + // No changes, pass back the structure + // we were given initially. + return $in; + } + + } +} + diff --git a/_piecrust/libs/LessPhp/lessify b/_piecrust/libs/LessPhp/lessify new file mode 100755 index 0000000..416f0ca --- /dev/null +++ b/_piecrust/libs/LessPhp/lessify @@ -0,0 +1,23 @@ +#!/usr/bin/php -q +parse(); +} catch (exception $e) { + exit("Fatal error: ".$e->getMessage()."\n"); +} + + diff --git a/_piecrust/libs/LessPhp/lessify.inc.php b/_piecrust/libs/LessPhp/lessify.inc.php new file mode 100755 index 0000000..3567f24 --- /dev/null +++ b/_piecrust/libs/LessPhp/lessify.inc.php @@ -0,0 +1,443 @@ + + */ + +require "lessc.inc.php"; + +// +// check if the merge during mixin is overwriting values. should or should it not? +// + +// +// 1. split apart class tags +// + +class easyparse { + var $buffer; + var $count; + + function __construct($str) { + $this->count = 0; + $this->buffer = trim($str); + } + + function seek($where = null) { + if ($where === null) return $this->count; + else $this->count = $where; + return true; + } + + function preg_quote($what) { + return preg_quote($what, '/'); + } + + function match($regex, &$out, $eatWhitespace = true) { + $r = '/'.$regex.($eatWhitespace ? '\s*' : '').'/Ais'; + if (preg_match($r, $this->buffer, $out, null, $this->count)) { + $this->count += strlen($out[0]); + return true; + } + return false; + } + + function literal($what, $eatWhitespace = true) { + // this is here mainly prevent notice from { } string accessor + if ($this->count >= strlen($this->buffer)) return false; + + // shortcut on single letter + if (!$eatWhitespace and strlen($what) == 1) { + if ($this->buffer{$this->count} == $what) { + $this->count++; + return true; + } + else return false; + } + + return $this->match($this->preg_quote($what), $m, $eatWhitespace); + } + +} + +class tagparse extends easyparse { + static private $combinators = null; + static private $match_opts = null; + + function parse() { + if (empty(self::$combinators)) { + self::$combinators = '('.implode('|', array_map(array($this, 'preg_quote'), + array('+', '>', '~'))).')'; + self::$match_opts = '('.implode('|', array_map(array($this, 'preg_quote'), + array('=', '~=', '|=', '$=', '*='))).')'; + } + + // crush whitespace + $this->buffer = preg_replace('/\s+/', ' ', $this->buffer).' '; + + $tags = array(); + while ($this->tag($t)) $tags[] = $t; + + return $tags; + } + + static function compileString($string) { + list(, $delim, $str) = $string; + $str = str_replace($delim, "\\".$delim, $str); + $str = str_replace("\n", "\\\n", $str); + return $delim.$str.$delim; + } + + static function compilePaths($paths) { + return implode(', ', array_map(array('self', 'compilePath'), $paths)); + } + + // array of tags + static function compilePath($path) { + return implode(' ', array_map(array('self', 'compileTag'), $path)); + } + + + static function compileTag($tag) { + ob_start(); + if (isset($tag['comb'])) echo $tag['comb']." "; + if (isset($tag['front'])) echo $tag['front']; + if (isset($tag['attr'])) { + echo '['.$tag['attr']; + if (isset($tag['op'])) { + echo $tag['op'].$tag['op_value']; + } + echo ']'; + } + return ob_get_clean(); + } + + function string(&$out) { + $s = $this->seek(); + + if ($this->literal('"')) { + $delim = '"'; + } elseif ($this->literal("'")) { + $delim = "'"; + } else { + return false; + } + + while (true) { + // step through letters looking for either end or escape + $buff = ""; + $escapeNext = false; + $finished = false; + for ($i = $this->count; $i < strlen($this->buffer); $i++) { + $char = $this->buffer[$i]; + switch ($char) { + case $delim: + if ($escapeNext) { + $buff .= $char; + $escapeNext = false; + break; + } + $finished = true; + break 2; + case "\\": + if ($escapeNext) { + $buff .= $char; + $escapeNext = false; + } else { + $escapeNext = true; + } + break; + case "\n": + if (!$escapeNext) { + break 3; + } + + $buff .= $char; + $escapeNext = false; + break; + default: + if ($escapeNext) { + $buff .= "\\"; + $escapeNext = false; + } + $buff .= $char; + } + } + if (!$finished) break; + $out = array('string', $delim, $buff); + $this->seek($i+1); + return true; + } + + $this->seek($s); + return false; + } + + function tag(&$out) { + $s = $this->seek(); + $tag = array(); + if ($this->combinator($op)) $tag['comb'] = $op; + + if (!$this->match('(.*?)( |$|\[|'.self::$combinators.')', $match)) { + $this->seek($s); + return false; + } + + if (!empty($match[3])) { + // give back combinator + $this->count-=strlen($match[3]); + } + + if (!empty($match[1])) $tag['front'] = $match[1]; + + if ($match[2] == '[') { + if ($this->ident($i)) { + $tag['attr'] = $i; + + if ($this->match(self::$match_opts, $m) && $this->value($v)) { + $tag['op'] = $m[1]; + $tag['op_value'] = $v; + } + + if ($this->literal(']')) { + $out = $tag; + return true; + } + } + } elseif (isset($tag['front'])) { + $out = $tag; + return true; + } + + $this->seek($s); + return false; + } + + function ident(&$out) { + // [-]?{nmstart}{nmchar}* + // nmstart: [_a-z]|{nonascii}|{escape} + // nmchar: [_a-z0-9-]|{nonascii}|{escape} + if ($this->match('(-?[_a-z][_\w]*)', $m)) { + $out = $m[1]; + return true; + } + return false; + } + + function value(&$out) { + if ($this->string($str)) { + $out = $this->compileString($str); + return true; + } elseif ($this->ident($id)) { + $out = $id; + return true; + } + return false; + } + + + function combinator(&$op) { + if ($this->match(self::$combinators, $m)) { + $op = $m[1]; + return true; + } + return false; + } +} + +class nodecounter { + var $count = 0; + var $children = array(); + + var $name; + var $child_blocks; + var $the_block; + + function __construct($name) { + $this->name = $name; + } + + function dump($stack = null) { + if (is_null($stack)) $stack = array(); + $stack[] = $this->getName(); + echo implode(' -> ', $stack)." ($this->count)\n"; + foreach ($this->children as $child) { + $child->dump($stack); + } + } + + static function compileProperties($c, $block) { + foreach($block as $name => $value) { + if ($c->isProperty($name, $value)) { + echo $c->compileProperty($name, $value)."\n"; + } + } + } + + function compile($c, $path = null) { + if (is_null($path)) $path = array(); + $path[] = $this->name; + + $isVisible = !is_null($this->the_block) || !is_null($this->child_blocks); + + if ($isVisible) { + echo $c->indent(implode(' ', $path).' {'); + $c->indentLevel++; + $path = array(); + + if ($this->the_block) { + $this->compileProperties($c, $this->the_block); + } + + if ($this->child_blocks) { + foreach ($this->child_blocks as $block) { + echo $c->indent(tagparse::compilePaths($block['__tags']).' {'); + $c->indentLevel++; + $this->compileProperties($c, $block); + $c->indentLevel--; + echo $c->indent('}'); + } + } + } + + // compile child nodes + foreach($this->children as $node) { + $node->compile($c, $path); + } + + if ($isVisible) { + $c->indentLevel--; + echo $c->indent('}'); + } + + } + + function getName() { + if (is_null($this->name)) return "[root]"; + else return $this->name; + } + + function getNode($name) { + if (!isset($this->children[$name])) { + $this->children[$name] = new nodecounter($name); + } + + return $this->children[$name]; + } + + function findNode($path) { + $current = $this; + for ($i = 0; $i < count($path); $i++) { + $t = tagparse::compileTag($path[$i]); + $current = $current->getNode($t); + } + + return $current; + } + + function addBlock($path, $block) { + $node = $this->findNode($path); + if (!is_null($node->the_block)) throw new exception("can this happen?"); + + unset($block['__tags']); + $node->the_block = $block; + } + + function addToNode($path, $block) { + $node = $this->findNode($path); + $node->child_blocks[] = $block; + } +} + +/** + * create a less file from a css file by combining blocks where appropriate + */ +class lessify extends lessc { + public function dump() { + print_r($this->env); + } + + public function parse($str = null) { + $this->prepareParser($str ? $str : $this->buffer); + while (false !== $this->parseChunk()); + + $root = new nodecounter(null); + + // attempt to preserve some of the block order + $order = array(); + + $visitedTags = array(); + foreach (end($this->env) as $name => $block) { + if (!$this->isBlock($name, $block)) continue; + if (isset($visitedTags[$name])) continue; + + foreach ($block['__tags'] as $t) { + $visitedTags[$t] = true; + } + + // skip those with more than 1 + if (count($block['__tags']) == 1) { + $p = new tagparse(end($block['__tags'])); + $path = $p->parse(); + $root->addBlock($path, $block); + $order[] = array('compressed', $path, $block); + continue; + } else { + $common = null; + $paths = array(); + foreach ($block['__tags'] as $rawtag) { + $p = new tagparse($rawtag); + $paths[] = $path = $p->parse(); + if (is_null($common)) $common = $path; + else { + $new_common = array(); + foreach ($path as $tag) { + $head = array_shift($common); + if ($tag == $head) { + $new_common[] = $head; + } else break; + } + $common = $new_common; + if (empty($common)) { + // nothing in common + break; + } + } + } + + if (!empty($common)) { + $new_paths = array(); + foreach ($paths as $p) $new_paths[] = array_slice($p, count($common)); + $block['__tags'] = $new_paths; + $root->addToNode($common, $block); + $order[] = array('compressed', $common, $block); + continue; + } + + } + + $order[] = array('none', $block['__tags'], $block); + } + + + $compressed = $root->children; + foreach ($order as $item) { + list($type, $tags, $block) = $item; + if ($type == 'compressed') { + $top = tagparse::compileTag(reset($tags)); + if (isset($compressed[$top])) { + $compressed[$top]->compile($this); + unset($compressed[$top]); + } + } else { + echo $this->indent(implode(', ', $tags).' {'); + $this->indentLevel++; + nodecounter::compileProperties($this, $block); + $this->indentLevel--; + echo $this->indent('}'); + } + } + } +} diff --git a/_piecrust/libs/LessPhp/plessc b/_piecrust/libs/LessPhp/plessc new file mode 100755 index 0000000..6ef9f90 --- /dev/null +++ b/_piecrust/libs/LessPhp/plessc @@ -0,0 +1,191 @@ +#!/usr/bin/php -q + +$VERSION = "v0.2.1"; + +error_reporting(E_ALL); +$path = realpath(dirname(__FILE__)).'/'; + +require $path."lessc.inc.php"; + +$fa = "Fatal Error: "; +function err($msg) { + fwrite(STDERR, $msg."\n"); +} + +if (php_sapi_name() != "cli") { + err($fa.$argv[0]." must be run in the command line."); + exit(1); +} +$exe = array_shift($argv); // remove filename + +function process($data, $import = null) { + global $fa; + + $l = new lessc(); + if ($import) $l->importDir = $import; + try { + echo $l->parse($data); + exit(0); + } catch (exception $ex) { + err($fa."\n".str_repeat('=', 20)."\n". + $ex->getMessage()); + exit(1); + } +} + +// process args +$opts = array(); +foreach ($argv as $loc => $a) { + if (preg_match("/^-([a-zA-Z]+)$/", $a, $m)) { + $m = $m[1]; + for ($i = 0; $i < strlen($m); $i++) + $opts[$m{$i}] = $loc; + unset($argv[$loc]); + } +} + +function has($o, &$loc = null) { + global $opts; + if (!isset($opts[$o])) return false; + $loc = $opts[$o]; + return true; +} + +function hasValue($o, &$value = null) { + global $argv; + if (!has($o,$loc)) return false; + if (!isset($argv[$loc+1])) return false; + $value = $argv[$loc+1]; + return true; +} + +if (has("v")) { + exit($VERSION."\n"); +} + +if (has("r", $loc)) { + if (!hasValue("r", $data)) { + while (!feof(STDIN)) { + $data .= fread(STDIN, 8192); + } + } + return process($data); +} + +if (has("w")) { + // need two files + if (!is_file($in = array_shift($argv)) || + null == $out = array_shift($argv)) + { + err($fa.$exe." -w infile outfile"); + exit(1); + } + + echo "Watching ".$in. + (has("n") ? ' with notifications' : ''). + ", press Ctrl + c to exit.\n"; + + $cache = $in; + $last_action = 0; + while (1) { + clearstatcache(); + + // check if anything has changed since last fail + $updated = false; + if (is_array($cache)) { + foreach ($cache['files'] as $fname=>$_) { + if (filemtime($fname) > $last_action) { + $updated = true; + break; + } + } + } else $updated = true; + + // try to compile it + if ($updated) { + $last_action = time(); + + try { + $cache = lessc::cexecute($cache); + echo "Writing updated file: ".$out."\n"; + if (!file_put_contents($out, $cache['compiled'])) { + err($fa."Could not write to file ".$out); + exit(1); + } + } catch (exception $ex) { + echo "\nFatal Error:\n".str_repeat('=', 20)."\n".$ex->getMessage()."\n\n"; + + if (has("n")) { + `notify-send -u critical "compile failed" "{$ex->getMessage()}"`; + } + } + } + + sleep(1); + } + exit(0); +} + +if (!$fname = array_shift($argv)) { + echo "Usage: ".$exe." input-file [output-file]\n"; + exit(1); +} + +function dumpValue($node, $depth = 0) { + if (is_object($node)) { + $indent = str_repeat(" ", $depth); + $out = array(); + foreach ($node->props as $prop) { + $out[] = $indent . dumpValue($prop, $depth + 1); + } + $out = implode("\n", $out); + if (!empty($node->tags)) { + $out = "+ ".implode(", ", $node->tags)."\n".$out; + } + return $out; + } elseif (is_array($node)) { + $type = $node[0]; + if ($type == "block") + return dumpValue($node[1], $depth); + + $out = array(); + foreach ($node as $value) { + $out[] = dumpValue($value, $depth); + } + return "{ ".implode(", ", $out)." }"; + } else { + if (is_string($node) && preg_match("/[\s,]/", $node)) { + return '"'.$node.'"'; + } + return $node; // normal value + } +} + +try { + $l = new lessc($fname); + if (has("T") || has("X")) { + $t = $l->parseTree(); + if (has("X")) + $out = print_r($t, 1); + else + $out = dumpValue($t)."\n"; + } else { + $out = $l->parse(); + } + + if (!$fout = array_shift($argv)) { + echo $out; + } else { + file_put_contents($fout, $out); + } + +} catch (exception $ex) { + err($fa.$ex->getMessage()); + exit(1); +} + + +?> diff --git a/_piecrust/libs/Log/Log.php b/_piecrust/libs/Log/Log.php new file mode 100644 index 0000000..2019341 --- /dev/null +++ b/_piecrust/libs/Log/Log.php @@ -0,0 +1,842 @@ + + * @author Jon Parise + * @since Horde 1.3 + * @package Log + */ +class Log +{ + /** + * Indicates whether or not the log can been opened / connected. + * + * @var boolean + * @access protected + */ + var $_opened = false; + + /** + * Instance-specific unique identification number. + * + * @var integer + * @access protected + */ + var $_id = 0; + + /** + * The label that uniquely identifies this set of log messages. + * + * @var string + * @access protected + */ + var $_ident = ''; + + /** + * The default priority to use when logging an event. + * + * @var integer + * @access protected + */ + var $_priority = PEAR_LOG_INFO; + + /** + * The bitmask of allowed log levels. + * + * @var integer + * @access protected + */ + var $_mask = PEAR_LOG_ALL; + + /** + * Holds all Log_observer objects that wish to be notified of new messages. + * + * @var array + * @access protected + */ + var $_listeners = array(); + + /** + * Maps canonical format keys to position arguments for use in building + * "line format" strings. + * + * @var array + * @access protected + */ + var $_formatMap = array('%{timestamp}' => '%1$s', + '%{ident}' => '%2$s', + '%{priority}' => '%3$s', + '%{message}' => '%4$s', + '%{file}' => '%5$s', + '%{line}' => '%6$s', + '%{function}' => '%7$s', + '%{class}' => '%8$s', + '%\{' => '%%{'); + + /** + * Attempts to return a concrete Log instance of type $handler. + * + * @param string $handler The type of concrete Log subclass to return. + * Attempt to dynamically include the code for + * this subclass. Currently, valid values are + * 'console', 'syslog', 'sql', 'file', and 'mcal'. + * + * @param string $name The name of the actually log file, table, or + * other specific store to use. Defaults to an + * empty string, with which the subclass will + * attempt to do something intelligent. + * + * @param string $ident The identity reported to the log system. + * + * @param array $conf A hash containing any additional configuration + * information that a subclass might need. + * + * @param int $level Log messages up to and including this level. + * + * @return object Log The newly created concrete Log instance, or + * null on an error. + * @access public + * @since Log 1.0 + */ + public static function factory($handler, $name = '', $ident = '', + $conf = array(), $level = PEAR_LOG_DEBUG) + { + $handler = strtolower($handler); + $class = 'Log_' . $handler; + $classfile = 'Log/' . $handler . '.php'; + + /* + * Attempt to include our version of the named class, but don't treat + * a failure as fatal. The caller may have already included their own + * version of the named class. + */ + if (!class_exists($class, false)) { + include_once $classfile; + } + + /* If the class exists, return a new instance of it. */ + if (class_exists($class, false)) { + $obj = new $class($name, $ident, $conf, $level); + return $obj; + } + + $null = null; + return $null; + } + + /** + * Attempts to return a reference to a concrete Log instance of type + * $handler, only creating a new instance if no log instance with the same + * parameters currently exists. + * + * You should use this if there are multiple places you might create a + * logger, you don't want to create multiple loggers, and you don't want to + * check for the existance of one each time. The singleton pattern does all + * the checking work for you. + * + * You MUST call this method with the $var = &Log::singleton() syntax. + * Without the ampersand (&) in front of the method name, you will not get + * a reference, you will get a copy. + * + * @param string $handler The type of concrete Log subclass to return. + * Attempt to dynamically include the code for + * this subclass. Currently, valid values are + * 'console', 'syslog', 'sql', 'file', and 'mcal'. + * + * @param string $name The name of the actually log file, table, or + * other specific store to use. Defaults to an + * empty string, with which the subclass will + * attempt to do something intelligent. + * + * @param string $ident The identity reported to the log system. + * + * @param array $conf A hash containing any additional configuration + * information that a subclass might need. + * + * @param int $level Log messages up to and including this level. + * + * @return object Log The newly created concrete Log instance, or + * null on an error. + * @access public + * @since Log 1.0 + */ + public static function singleton($handler, $name = '', $ident = '', + $conf = array(), $level = PEAR_LOG_DEBUG) + { + static $instances; + if (!isset($instances)) $instances = array(); + + $signature = serialize(array($handler, $name, $ident, $conf, $level)); + if (!isset($instances[$signature])) { + $instances[$signature] = Log::factory($handler, $name, $ident, + $conf, $level); + } + + return $instances[$signature]; + } + + /** + * Abstract implementation of the open() method. + * @since Log 1.0 + */ + function open() + { + return false; + } + + /** + * Abstract implementation of the close() method. + * @since Log 1.0 + */ + function close() + { + return false; + } + + /** + * Abstract implementation of the flush() method. + * @since Log 1.8.2 + */ + function flush() + { + return false; + } + + /** + * Abstract implementation of the log() method. + * @since Log 1.0 + */ + function log($message, $priority = null) + { + return false; + } + + /** + * A convenience function for logging a emergency event. It will log a + * message at the PEAR_LOG_EMERG log level. + * + * @param mixed $message String or object containing the message + * to log. + * + * @return boolean True if the message was successfully logged. + * + * @access public + * @since Log 1.7.0 + */ + function emerg($message) + { + return $this->log($message, PEAR_LOG_EMERG); + } + + /** + * A convenience function for logging an alert event. It will log a + * message at the PEAR_LOG_ALERT log level. + * + * @param mixed $message String or object containing the message + * to log. + * + * @return boolean True if the message was successfully logged. + * + * @access public + * @since Log 1.7.0 + */ + function alert($message) + { + return $this->log($message, PEAR_LOG_ALERT); + } + + /** + * A convenience function for logging a critical event. It will log a + * message at the PEAR_LOG_CRIT log level. + * + * @param mixed $message String or object containing the message + * to log. + * + * @return boolean True if the message was successfully logged. + * + * @access public + * @since Log 1.7.0 + */ + function crit($message) + { + return $this->log($message, PEAR_LOG_CRIT); + } + + /** + * A convenience function for logging a error event. It will log a + * message at the PEAR_LOG_ERR log level. + * + * @param mixed $message String or object containing the message + * to log. + * + * @return boolean True if the message was successfully logged. + * + * @access public + * @since Log 1.7.0 + */ + function err($message) + { + return $this->log($message, PEAR_LOG_ERR); + } + + /** + * A convenience function for logging a warning event. It will log a + * message at the PEAR_LOG_WARNING log level. + * + * @param mixed $message String or object containing the message + * to log. + * + * @return boolean True if the message was successfully logged. + * + * @access public + * @since Log 1.7.0 + */ + function warning($message) + { + return $this->log($message, PEAR_LOG_WARNING); + } + + /** + * A convenience function for logging a notice event. It will log a + * message at the PEAR_LOG_NOTICE log level. + * + * @param mixed $message String or object containing the message + * to log. + * + * @return boolean True if the message was successfully logged. + * + * @access public + * @since Log 1.7.0 + */ + function notice($message) + { + return $this->log($message, PEAR_LOG_NOTICE); + } + + /** + * A convenience function for logging a information event. It will log a + * message at the PEAR_LOG_INFO log level. + * + * @param mixed $message String or object containing the message + * to log. + * + * @return boolean True if the message was successfully logged. + * + * @access public + * @since Log 1.7.0 + */ + function info($message) + { + return $this->log($message, PEAR_LOG_INFO); + } + + /** + * A convenience function for logging a debug event. It will log a + * message at the PEAR_LOG_DEBUG log level. + * + * @param mixed $message String or object containing the message + * to log. + * + * @return boolean True if the message was successfully logged. + * + * @access public + * @since Log 1.7.0 + */ + function debug($message) + { + return $this->log($message, PEAR_LOG_DEBUG); + } + + /** + * Returns the string representation of the message data. + * + * If $message is an object, _extractMessage() will attempt to extract + * the message text using a known method (such as a PEAR_Error object's + * getMessage() method). If a known method, cannot be found, the + * serialized representation of the object will be returned. + * + * If the message data is already a string, it will be returned unchanged. + * + * @param mixed $message The original message data. This may be a + * string or any object. + * + * @return string The string representation of the message. + * + * @access protected + */ + function _extractMessage($message) + { + /* + * If we've been given an object, attempt to extract the message using + * a known method. If we can't find such a method, default to the + * "human-readable" version of the object. + * + * We also use the human-readable format for arrays. + */ + if (is_object($message)) { + if (method_exists($message, 'getmessage')) { + $message = $message->getMessage(); + } else if (method_exists($message, 'tostring')) { + $message = $message->toString(); + } else if (method_exists($message, '__tostring')) { + $message = (string)$message; + } else { + $message = var_export($message, true); + } + } else if (is_array($message)) { + if (isset($message['message'])) { + if (is_scalar($message['message'])) { + $message = $message['message']; + } else { + $message = var_export($message['message'], true); + } + } else { + $message = var_export($message, true); + } + } else if (is_bool($message) || $message === NULL) { + $message = var_export($message, true); + } + + /* Otherwise, we assume the message is a string. */ + return $message; + } + + /** + * Using debug_backtrace(), returns the file, line, and enclosing function + * name of the source code context from which log() was invoked. + * + * @param int $depth The initial number of frames we should step + * back into the trace. + * + * @return array Array containing four strings: the filename, the line, + * the function name, and the class name from which log() + * was called. + * + * @access private + * @since Log 1.9.4 + */ + function _getBacktraceVars($depth) + { + /* Start by generating a backtrace from the current call (here). */ + $bt = debug_backtrace(); + + /* Store some handy shortcuts to our previous frames. */ + $bt0 = isset($bt[$depth]) ? $bt[$depth] : null; + $bt1 = isset($bt[$depth + 1]) ? $bt[$depth + 1] : null; + + /* + * If we were ultimately invoked by the composite handler, we need to + * increase our depth one additional level to compensate. + */ + $class = isset($bt1['class']) ? $bt1['class'] : null; + if ($class !== null && strcasecmp($class, 'Log_composite') == 0) { + $depth++; + $bt0 = isset($bt[$depth]) ? $bt[$depth] : null; + $bt1 = isset($bt[$depth + 1]) ? $bt[$depth + 1] : null; + $class = isset($bt1['class']) ? $bt1['class'] : null; + } + + /* + * We're interested in the frame which invoked the log() function, so + * we need to walk back some number of frames into the backtrace. The + * $depth parameter tells us where to start looking. We go one step + * further back to find the name of the encapsulating function from + * which log() was called. + */ + $file = isset($bt0) ? $bt0['file'] : null; + $line = isset($bt0) ? $bt0['line'] : 0; + $func = isset($bt1) ? $bt1['function'] : null; + + /* + * However, if log() was called from one of our "shortcut" functions, + * we're going to need to go back an additional step. + */ + if (in_array($func, array('emerg', 'alert', 'crit', 'err', 'warning', + 'notice', 'info', 'debug'))) { + $bt2 = isset($bt[$depth + 2]) ? $bt[$depth + 2] : null; + + $file = is_array($bt1) ? $bt1['file'] : null; + $line = is_array($bt1) ? $bt1['line'] : 0; + $func = is_array($bt2) ? $bt2['function'] : null; + $class = isset($bt2['class']) ? $bt2['class'] : null; + } + + /* + * If we couldn't extract a function name (perhaps because we were + * executed from the "main" context), provide a default value. + */ + if ($func === null) { + $func = '(none)'; + } + + /* Return a 4-tuple containing (file, line, function, class). */ + return array($file, $line, $func, $class); + } + + /** + * Produces a formatted log line based on a format string and a set of + * variables representing the current log record and state. + * + * @return string Formatted log string. + * + * @access protected + * @since Log 1.9.4 + */ + function _format($format, $timestamp, $priority, $message) + { + /* + * If the format string references any of the backtrace-driven + * variables (%5 %6,%7,%8), generate the backtrace and fetch them. + */ + if (preg_match('/%[5678]/', $format)) { + list($file, $line, $func, $class) = $this->_getBacktraceVars(2); + } + + /* + * Build the formatted string. We use the sprintf() function's + * "argument swapping" capability to dynamically select and position + * the variables which will ultimately appear in the log string. + */ + return sprintf($format, + $timestamp, + $this->_ident, + $this->priorityToString($priority), + $message, + isset($file) ? $file : '', + isset($line) ? $line : '', + isset($func) ? $func : '', + isset($class) ? $class : ''); + } + + /** + * Returns the string representation of a PEAR_LOG_* integer constant. + * + * @param int $priority A PEAR_LOG_* integer constant. + * + * @return string The string representation of $level. + * + * @access public + * @since Log 1.0 + */ + function priorityToString($priority) + { + $levels = array( + PEAR_LOG_EMERG => 'emergency', + PEAR_LOG_ALERT => 'alert', + PEAR_LOG_CRIT => 'critical', + PEAR_LOG_ERR => 'error', + PEAR_LOG_WARNING => 'warning', + PEAR_LOG_NOTICE => 'notice', + PEAR_LOG_INFO => 'info', + PEAR_LOG_DEBUG => 'debug' + ); + + return $levels[$priority]; + } + + /** + * Returns the the PEAR_LOG_* integer constant for the given string + * representation of a priority name. This function performs a + * case-insensitive search. + * + * @param string $name String containing a priority name. + * + * @return string The PEAR_LOG_* integer contstant corresponding + * the the specified priority name. + * + * @access public + * @since Log 1.9.0 + */ + function stringToPriority($name) + { + $levels = array( + 'emergency' => PEAR_LOG_EMERG, + 'alert' => PEAR_LOG_ALERT, + 'critical' => PEAR_LOG_CRIT, + 'error' => PEAR_LOG_ERR, + 'warning' => PEAR_LOG_WARNING, + 'notice' => PEAR_LOG_NOTICE, + 'info' => PEAR_LOG_INFO, + 'debug' => PEAR_LOG_DEBUG + ); + + return $levels[strtolower($name)]; + } + + /** + * Calculate the log mask for the given priority. + * + * This method may be called statically. + * + * @param integer $priority The priority whose mask will be calculated. + * + * @return integer The calculated log mask. + * + * @access public + * @since Log 1.7.0 + */ + public static function MASK($priority) + { + return (1 << $priority); + } + + /** + * Calculate the log mask for all priorities up to the given priority. + * + * This method may be called statically. + * + * @param integer $priority The maximum priority covered by this mask. + * + * @return integer The resulting log mask. + * + * @access public + * @since Log 1.7.0 + * + * @deprecated deprecated since Log 1.9.4; use Log::MAX() instead + */ + public static function UPTO($priority) + { + return Log::MAX($priority); + } + + /** + * Calculate the log mask for all priorities greater than or equal to the + * given priority. In other words, $priority will be the lowest priority + * matched by the resulting mask. + * + * This method may be called statically. + * + * @param integer $priority The minimum priority covered by this mask. + * + * @return integer The resulting log mask. + * + * @access public + * @since Log 1.9.4 + */ + public static function MIN($priority) + { + return PEAR_LOG_ALL ^ ((1 << $priority) - 1); + } + + /** + * Calculate the log mask for all priorities less than or equal to the + * given priority. In other words, $priority will be the highests priority + * matched by the resulting mask. + * + * This method may be called statically. + * + * @param integer $priority The maximum priority covered by this mask. + * + * @return integer The resulting log mask. + * + * @access public + * @since Log 1.9.4 + */ + public static function MAX($priority) + { + return ((1 << ($priority + 1)) - 1); + } + + /** + * Set and return the level mask for the current Log instance. + * + * @param integer $mask A bitwise mask of log levels. + * + * @return integer The current level mask. + * + * @access public + * @since Log 1.7.0 + */ + function setMask($mask) + { + $this->_mask = $mask; + + return $this->_mask; + } + + /** + * Returns the current level mask. + * + * @return interger The current level mask. + * + * @access public + * @since Log 1.7.0 + */ + function getMask() + { + return $this->_mask; + } + + /** + * Check if the given priority is included in the current level mask. + * + * @param integer $priority The priority to check. + * + * @return boolean True if the given priority is included in the current + * log mask. + * + * @access protected + * @since Log 1.7.0 + */ + function _isMasked($priority) + { + return (Log::MASK($priority) & $this->_mask); + } + + /** + * Returns the current default priority. + * + * @return integer The current default priority. + * + * @access public + * @since Log 1.8.4 + */ + function getPriority() + { + return $this->_priority; + } + + /** + * Sets the default priority to the specified value. + * + * @param integer $priority The new default priority. + * + * @access public + * @since Log 1.8.4 + */ + function setPriority($priority) + { + $this->_priority = $priority; + } + + /** + * Adds a Log_observer instance to the list of observers that are listening + * for messages emitted by this Log instance. + * + * @param object $observer The Log_observer instance to attach as a + * listener. + * + * @param boolean True if the observer is successfully attached. + * + * @access public + * @since Log 1.0 + */ + function attach(&$observer) + { + if (!is_a($observer, 'Log_observer')) { + return false; + } + + $this->_listeners[$observer->_id] = &$observer; + + return true; + } + + /** + * Removes a Log_observer instance from the list of observers. + * + * @param object $observer The Log_observer instance to detach from + * the list of listeners. + * + * @param boolean True if the observer is successfully detached. + * + * @access public + * @since Log 1.0 + */ + function detach($observer) + { + if (!is_a($observer, 'Log_observer') || + !isset($this->_listeners[$observer->_id])) { + return false; + } + + unset($this->_listeners[$observer->_id]); + + return true; + } + + /** + * Informs each registered observer instance that a new message has been + * logged. + * + * @param array $event A hash describing the log event. + * + * @access protected + */ + function _announce($event) + { + foreach ($this->_listeners as $id => $listener) { + if ($event['priority'] <= $this->_listeners[$id]->_priority) { + $this->_listeners[$id]->notify($event); + } + } + } + + /** + * Indicates whether this is a composite class. + * + * @return boolean True if this is a composite class. + * + * @access public + * @since Log 1.0 + */ + function isComposite() + { + return false; + } + + /** + * Sets this Log instance's identification string. + * + * @param string $ident The new identification string. + * + * @access public + * @since Log 1.6.3 + */ + function setIdent($ident) + { + $this->_ident = $ident; + } + + /** + * Returns the current identification string. + * + * @return string The current Log instance's identification string. + * + * @access public + * @since Log 1.6.3 + */ + function getIdent() + { + return $this->_ident; + } +} diff --git a/_piecrust/libs/Log/Log/composite.php b/_piecrust/libs/Log/Log/composite.php new file mode 100644 index 0000000..88c4012 --- /dev/null +++ b/_piecrust/libs/Log/Log/composite.php @@ -0,0 +1,274 @@ + + * @author Jon Parise + * + * @since Horde 1.3 + * @since Log 1.0 + * @package Log + * + * @example composite.php Using the composite handler. + */ +class Log_composite extends Log +{ + /** + * Array holding all of the Log instances to which log events should be + * sent. + * + * @var array + * @access private + */ + var $_children = array(); + + + /** + * Constructs a new composite Log object. + * + * @param boolean $name This parameter is ignored. + * @param boolean $ident This parameter is ignored. + * @param boolean $conf This parameter is ignored. + * @param boolean $level This parameter is ignored. + * + * @access public + */ + function Log_composite($name, $ident = '', $conf = array(), + $level = PEAR_LOG_DEBUG) + { + $this->_ident = $ident; + } + + /** + * Opens all of the child instances. + * + * @return True if all of the child instances were successfully opened. + * + * @access public + */ + function open() + { + /* Attempt to open each of our children. */ + $this->_opened = true; + foreach ($this->_children as $child) { + $this->_opened &= $child->open(); + } + + /* If all children were opened, return success. */ + return $this->_opened; + } + + /** + * Closes all open child instances. + * + * @return True if all of the opened child instances were successfully + * closed. + * + * @access public + */ + function close() + { + /* If we haven't been opened, there's nothing more to do. */ + if (!$this->_opened) { + return true; + } + + /* Attempt to close each of our children. */ + $closed = true; + foreach ($this->_children as $child) { + if ($child->_opened) { + $closed &= $child->close(); + } + } + + /* Clear the opened state for consistency. */ + $this->_opened = false; + + /* If all children were closed, return success. */ + return $closed; + } + + /** + * Flushes all child instances. It is assumed that all of the children + * have been successfully opened. + * + * @return True if all of the child instances were successfully flushed. + * + * @access public + * @since Log 1.8.2 + */ + function flush() + { + /* Attempt to flush each of our children. */ + $flushed = true; + foreach ($this->_children as $child) { + $flushed &= $child->flush(); + } + + /* If all children were flushed, return success. */ + return $flushed; + } + + /** + * Sends $message and $priority to each child of this composite. If the + * appropriate children aren't already open, they will be opened here. + * + * @param mixed $message String or object containing the message + * to log. + * @param string $priority (optional) The priority of the message. + * Valid values are: PEAR_LOG_EMERG, + * PEAR_LOG_ALERT, PEAR_LOG_CRIT, + * PEAR_LOG_ERR, PEAR_LOG_WARNING, + * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and + * PEAR_LOG_DEBUG. + * + * @return boolean True if the entry is successfully logged. + * + * @access public + */ + function log($message, $priority = null) + { + /* If a priority hasn't been specified, use the default value. */ + if ($priority === null) { + $priority = $this->_priority; + } + + /* + * Abort early if the priority is above the composite handler's + * maximum logging level. + * + * XXX: Consider whether or not introducing this change would break + * backwards compatibility. Some users may be expecting composite + * handlers to pass on all events to their children regardless of + * their own priority. + */ + #if (!$this->_isMasked($priority)) { + # return false; + #} + + /* + * Iterate over all of our children. If a unopened child will respond + * to this log event, we attempt to open it immediately. The composite + * handler's opened state will be enabled as soon as the first child + * handler is successfully opened. + * + * We track an overall success state that indicates whether or not all + * of the relevant child handlers were opened and successfully logged + * the event. If one handler fails, we still attempt any remaining + * children, but we consider the overall result a failure. + */ + $success = true; + foreach ($this->_children as $child) { + /* If this child won't respond to this event, skip it. */ + if (!$child->_isMasked($priority)) { + continue; + } + + /* If this child has yet to be opened, attempt to do so now. */ + if (!$child->_opened) { + $success &= $child->open(); + + /* + * If we've successfully opened our first handler, the + * composite handler itself is considered to be opened. + */ + if (!$this->_opened && $success) { + $this->_opened = true; + } + } + + /* Finally, attempt to log the message to the child handler. */ + if ($child->_opened) { + $success &= $child->log($message, $priority); + } + } + + /* Notify the observers. */ + $this->_announce(array('priority' => $priority, 'message' => $message)); + + /* Return success if all of the open children logged the event. */ + return $success; + } + + /** + * Returns true if this is a composite. + * + * @return boolean True if this is a composite class. + * + * @access public + */ + function isComposite() + { + return true; + } + + /** + * Sets this identification string for all of this composite's children. + * + * @param string $ident The new identification string. + * + * @access public + * @since Log 1.6.7 + */ + function setIdent($ident) + { + /* Call our base class's setIdent() method. */ + parent::setIdent($ident); + + /* ... and then call setIdent() on all of our children. */ + foreach ($this->_children as $child) { + $child->setIdent($ident); + } + } + + /** + * Adds a Log instance to the list of children. + * + * @param object $child The Log instance to add. + * + * @return boolean True if the Log instance was successfully added. + * + * @access public + */ + function addChild(&$child) + { + /* Make sure this is a Log instance. */ + if (!is_a($child, 'Log')) { + return false; + } + + $this->_children[$child->_id] = $child; + + return true; + } + + /** + * Removes a Log instance from the list of children. + * + * @param object $child The Log instance to remove. + * + * @return boolean True if the Log instance was successfully removed. + * + * @access public + */ + function removeChild($child) + { + if (!is_a($child, 'Log') || !isset($this->_children[$child->_id])) { + return false; + } + + unset($this->_children[$child->_id]); + + return true; + } + +} diff --git a/_piecrust/libs/Log/Log/console.php b/_piecrust/libs/Log/Log/console.php new file mode 100644 index 0000000..3a735a0 --- /dev/null +++ b/_piecrust/libs/Log/Log/console.php @@ -0,0 +1,208 @@ + + * @since Log 1.1 + * @package Log + * + * @example console.php Using the console handler. + */ +class Log_console extends Log +{ + /** + * Handle to the current output stream. + * @var resource + * @access private + */ + var $_stream = STDOUT; + + /** + * Should the output be buffered or displayed immediately? + * @var string + * @access private + */ + var $_buffering = false; + + /** + * String holding the buffered output. + * @var string + * @access private + */ + var $_buffer = ''; + + /** + * String containing the format of a log line. + * @var string + * @access private + */ + var $_lineFormat = '%1$s %2$s [%3$s] %4$s'; + + /** + * String containing the timestamp format. It will be passed directly to + * strftime(). Note that the timestamp string will generated using the + * current locale. + * @var string + * @access private + */ + var $_timeFormat = '%b %d %H:%M:%S'; + + /** + * Constructs a new Log_console object. + * + * @param string $name Ignored. + * @param string $ident The identity string. + * @param array $conf The configuration array. + * @param int $level Log messages up to and including this level. + * @access public + */ + function Log_console($name, $ident = '', $conf = array(), + $level = PEAR_LOG_DEBUG) + { + $this->_id = md5(microtime()); + $this->_ident = $ident; + $this->_mask = Log::UPTO($level); + + if (!empty($conf['stream'])) { + $this->_stream = $conf['stream']; + } + + if (isset($conf['buffering'])) { + $this->_buffering = $conf['buffering']; + } + + if (!empty($conf['lineFormat'])) { + $this->_lineFormat = str_replace(array_keys($this->_formatMap), + array_values($this->_formatMap), + $conf['lineFormat']); + } + + if (!empty($conf['timeFormat'])) { + $this->_timeFormat = $conf['timeFormat']; + } + + /* + * If output buffering has been requested, we need to register a + * shutdown function that will dump the buffer upon termination. + */ + if ($this->_buffering) { + register_shutdown_function(array(&$this, '_Log_console')); + } + } + + /** + * Destructor + */ + function _Log_console() + { + $this->close(); + } + + /** + * Open the output stream. + * + * @access public + * @since Log 1.9.7 + */ + function open() + { + $this->_opened = true; + return true; + } + + /** + * Closes the output stream. + * + * This results in a call to flush(). + * + * @access public + * @since Log 1.9.0 + */ + function close() + { + $this->flush(); + $this->_opened = false; + return true; + } + + /** + * Flushes all pending ("buffered") data to the output stream. + * + * @access public + * @since Log 1.8.2 + */ + function flush() + { + /* + * If output buffering is enabled, dump the contents of the buffer to + * the output stream. + */ + if ($this->_buffering && (strlen($this->_buffer) > 0)) { + fwrite($this->_stream, $this->_buffer); + $this->_buffer = ''; + } + + if (is_resource($this->_stream)) { + return fflush($this->_stream); + } + + return false; + } + + /** + * Writes $message to the text console. Also, passes the message + * along to any Log_observer instances that are observing this Log. + * + * @param mixed $message String or object containing the message to log. + * @param string $priority The priority of the message. Valid + * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, + * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, + * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. + * @return boolean True on success or false on failure. + * @access public + */ + function log($message, $priority = null) + { + /* If a priority hasn't been specified, use the default value. */ + if ($priority === null) { + $priority = $this->_priority; + } + + /* Abort early if the priority is above the maximum logging level. */ + if (!$this->_isMasked($priority)) { + return false; + } + + /* Extract the string representation of the message. */ + $message = $this->_extractMessage($message); + + /* Build the string containing the complete log line. */ + $line = $this->_format($this->_lineFormat, + strftime($this->_timeFormat), + $priority, $message) . "\n"; + + /* + * If buffering is enabled, append this line to the output buffer. + * Otherwise, print the line to the output stream immediately. + */ + if ($this->_buffering) { + $this->_buffer .= $line; + } else { + fwrite($this->_stream, $line); + } + + /* Notify observers about this log message. */ + $this->_announce(array('priority' => $priority, 'message' => $message)); + + return true; + } + +} diff --git a/_piecrust/libs/Log/Log/daemon.php b/_piecrust/libs/Log/Log/daemon.php new file mode 100644 index 0000000..418173d --- /dev/null +++ b/_piecrust/libs/Log/Log/daemon.php @@ -0,0 +1,235 @@ + + * @version $Revision: 250926 $ + * @package Log + */ +class Log_daemon extends Log +{ + /** + * Integer holding the log facility to use. + * @var string + */ + var $_name = LOG_DAEMON; + + /** + * Var holding the resource pointer to the socket + * @var resource + */ + var $_socket; + + /** + * The ip address or servername + * @see http://www.php.net/manual/en/transports.php + * @var string + */ + var $_ip = '127.0.0.1'; + + /** + * Protocol to use (tcp, udp, etc.) + * @see http://www.php.net/manual/en/transports.php + * @var string + */ + var $_proto = 'udp'; + + /** + * Port to connect to + * @var int + */ + var $_port = 514; + + /** + * Maximum message length in bytes + * @var int + */ + var $_maxsize = 4096; + + /** + * Socket timeout in seconds + * @var int + */ + var $_timeout = 1; + + + /** + * Constructs a new syslog object. + * + * @param string $name The syslog facility. + * @param string $ident The identity string. + * @param array $conf The configuration array. + * @param int $maxLevel Maximum level at which to log. + * @access public + */ + function Log_daemon($name, $ident = '', $conf = array(), + $level = PEAR_LOG_DEBUG) + { + /* Ensure we have a valid integer value for $name. */ + if (empty($name) || !is_int($name)) { + $name = LOG_SYSLOG; + } + + $this->_id = md5(microtime()); + $this->_name = $name; + $this->_ident = $ident; + $this->_mask = Log::UPTO($level); + + if (isset($conf['ip'])) { + $this->_ip = $conf['ip']; + } + if (isset($conf['proto'])) { + $this->_proto = $conf['proto']; + } + if (isset($conf['port'])) { + $this->_port = $conf['port']; + } + if (isset($conf['maxsize'])) { + $this->_maxsize = $conf['maxsize']; + } + if (isset($conf['timeout'])) { + $this->_timeout = $conf['timeout']; + } + $this->_proto = $this->_proto . '://'; + + register_shutdown_function(array(&$this, '_Log_daemon')); + } + + /** + * Destructor. + * + * @access private + */ + function _Log_daemon() + { + $this->close(); + } + + /** + * Opens a connection to the system logger, if it has not already + * been opened. This is implicitly called by log(), if necessary. + * @access public + */ + function open() + { + if (!$this->_opened) { + $this->_opened = (bool)($this->_socket = @fsockopen( + $this->_proto . $this->_ip, + $this->_port, + $errno, + $errstr, + $this->_timeout)); + } + return $this->_opened; + } + + /** + * Closes the connection to the system logger, if it is open. + * @access public + */ + function close() + { + if ($this->_opened) { + $this->_opened = false; + return fclose($this->_socket); + } + return true; + } + + /** + * Sends $message to the currently open syslog connection. Calls + * open() if necessary. Also passes the message along to any Log_observer + * instances that are observing this Log. + * + * @param string $message The textual message to be logged. + * @param int $priority (optional) The priority of the message. Valid + * values are: LOG_EMERG, LOG_ALERT, LOG_CRIT, + * LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, + * and LOG_DEBUG. The default is LOG_INFO. + * @access public + */ + function log($message, $priority = null) + { + /* If a priority hasn't been specified, use the default value. */ + if ($priority === null) { + $priority = $this->_priority; + } + + /* Abort early if the priority is above the maximum logging level. */ + if (!$this->_isMasked($priority)) { + return false; + } + + /* If the connection isn't open and can't be opened, return failure. */ + if (!$this->_opened && !$this->open()) { + return false; + } + + /* Extract the string representation of the message. */ + $message = $this->_extractMessage($message); + + /* Set the facility level. */ + $facility_level = intval($this->_name) + + intval($this->_toSyslog($priority)); + + /* Prepend ident info. */ + if (!empty($this->_ident)) { + $message = $this->_ident . ' ' . $message; + } + + /* Check for message length. */ + if (strlen($message) > $this->_maxsize) { + $message = substr($message, 0, ($this->_maxsize) - 10) . ' [...]'; + } + + /* Write to socket. */ + fwrite($this->_socket, '<' . $facility_level . '>' . $message . "\n"); + + $this->_announce(array('priority' => $priority, 'message' => $message)); + } + + /** + * Converts a PEAR_LOG_* constant into a syslog LOG_* constant. + * + * This function exists because, under Windows, not all of the LOG_* + * constants have unique values. Instead, the PEAR_LOG_* were introduced + * for global use, with the conversion to the LOG_* constants kept local to + * to the syslog driver. + * + * @param int $priority PEAR_LOG_* value to convert to LOG_* value. + * + * @return The LOG_* representation of $priority. + * + * @access private + */ + function _toSyslog($priority) + { + static $priorities = array( + PEAR_LOG_EMERG => LOG_EMERG, + PEAR_LOG_ALERT => LOG_ALERT, + PEAR_LOG_CRIT => LOG_CRIT, + PEAR_LOG_ERR => LOG_ERR, + PEAR_LOG_WARNING => LOG_WARNING, + PEAR_LOG_NOTICE => LOG_NOTICE, + PEAR_LOG_INFO => LOG_INFO, + PEAR_LOG_DEBUG => LOG_DEBUG + ); + + /* If we're passed an unknown priority, default to LOG_INFO. */ + if (!is_int($priority) || !in_array($priority, $priorities)) { + return LOG_INFO; + } + + return $priorities[$priority]; + } + +} diff --git a/_piecrust/libs/Log/Log/display.php b/_piecrust/libs/Log/Log/display.php new file mode 100644 index 0000000..633f373 --- /dev/null +++ b/_piecrust/libs/Log/Log/display.php @@ -0,0 +1,181 @@ + + * @since Log 1.8.0 + * @package Log + * + * @example display.php Using the display handler. + */ +class Log_display extends Log +{ + /** + * String containing the format of a log line. + * @var string + * @access private + */ + var $_lineFormat = '%3$s: %4$s'; + + /** + * String containing the timestamp format. It will be passed directly to + * strftime(). Note that the timestamp string will generated using the + * current locale. + * @var string + * @access private + */ + var $_timeFormat = '%b %d %H:%M:%S'; + + /** + * Flag indicating whether raw message text should be passed directly to + * the log system. Otherwise, the text will be converted to an HTML-safe + * representation. + * @var boolean + * @access private + */ + var $_rawText = false; + + /** + * Constructs a new Log_display object. + * + * @param string $name Ignored. + * @param string $ident The identity string. + * @param array $conf The configuration array. + * @param int $level Log messages up to and including this level. + * @access public + */ + function Log_display($name = '', $ident = '', $conf = array(), + $level = PEAR_LOG_DEBUG) + { + $this->_id = md5(microtime()); + $this->_ident = $ident; + $this->_mask = Log::UPTO($level); + + /* Start by configuring the line format. */ + if (!empty($conf['lineFormat'])) { + $this->_lineFormat = str_replace(array_keys($this->_formatMap), + array_values($this->_formatMap), + $conf['lineFormat']); + } + + /* We may need to prepend a string to our line format. */ + $prepend = null; + if (isset($conf['error_prepend'])) { + $prepend = $conf['error_prepend']; + } else { + $prepend = ini_get('error_prepend_string'); + } + if (!empty($prepend)) { + $this->_lineFormat = $prepend . $this->_lineFormat; + } + + /* We may also need to append a string to our line format. */ + $append = null; + if (isset($conf['error_append'])) { + $append = $conf['error_append']; + } else { + $append = ini_get('error_append_string'); + } + if (!empty($append)) { + $this->_lineFormat .= $append; + } + + /* Lastly, the line ending sequence is also configurable. */ + if (isset($conf['linebreak'])) { + $this->_lineFormat .= $conf['linebreak']; + } else { + $this->_lineFormat .= "
        \n"; + } + + /* The user can also change the time format. */ + if (!empty($conf['timeFormat'])) { + $this->_timeFormat = $conf['timeFormat']; + } + + /* Message text conversion can be disabled. */ + if (isset($conf['rawText'])) { + $this->_rawText = $conf['rawText']; + } + } + + /** + * Opens the display handler. + * + * @access public + * @since Log 1.9.6 + */ + function open() + { + $this->_opened = true; + return true; + } + + /** + * Closes the display handler. + * + * @access public + * @since Log 1.9.6 + */ + function close() + { + $this->_opened = false; + return true; + } + + /** + * Writes $message to the text browser. Also, passes the message + * along to any Log_observer instances that are observing this Log. + * + * @param mixed $message String or object containing the message to log. + * @param string $priority The priority of the message. Valid + * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, + * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, + * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. + * @return boolean True on success or false on failure. + * @access public + */ + function log($message, $priority = null) + { + /* If a priority hasn't been specified, use the default value. */ + if ($priority === null) { + $priority = $this->_priority; + } + + /* Abort early if the priority is above the maximum logging level. */ + if (!$this->_isMasked($priority)) { + return false; + } + + /* Extract the string representation of the message. */ + $message = $this->_extractMessage($message); + + /* Convert the message to an HTML-friendly represention unless raw + * text has been requested. */ + if ($this->_rawText === false) { + $message = nl2br(htmlspecialchars($message)); + } + + /* Build and output the complete log line. */ + echo $this->_format($this->_lineFormat, + strftime($this->_timeFormat), + $priority, + $message); + + /* Notify observers about this log message. */ + $this->_announce(array('priority' => $priority, 'message' => $message)); + + return true; + } + +} diff --git a/_piecrust/libs/Log/Log/error_log.php b/_piecrust/libs/Log/Log/error_log.php new file mode 100644 index 0000000..05faf87 --- /dev/null +++ b/_piecrust/libs/Log/Log/error_log.php @@ -0,0 +1,160 @@ + + * @since Log 1.7.0 + * @package Log + * + * @example error_log.php Using the error_log handler. + */ +class Log_error_log extends Log +{ + /** + * The error_log() log type. + * @var integer + * @access private + */ + var $_type = PEAR_LOG_TYPE_SYSTEM; + + /** + * The type-specific destination value. + * @var string + * @access private + */ + var $_destination = ''; + + /** + * Additional headers to pass to the mail() function when the + * PEAR_LOG_TYPE_MAIL type is used. + * @var string + * @access private + */ + var $_extra_headers = ''; + + /** + * String containing the format of a log line. + * @var string + * @access private + */ + var $_lineFormat = '%2$s: %4$s'; + + /** + * String containing the timestamp format. It will be passed directly to + * strftime(). Note that the timestamp string will generated using the + * current locale. + * @var string + * @access private + */ + var $_timeFormat = '%b %d %H:%M:%S'; + + /** + * Constructs a new Log_error_log object. + * + * @param string $name One of the PEAR_LOG_TYPE_* constants. + * @param string $ident The identity string. + * @param array $conf The configuration array. + * @param int $level Log messages up to and including this level. + * @access public + */ + function Log_error_log($name, $ident = '', $conf = array(), + $level = PEAR_LOG_DEBUG) + { + $this->_id = md5(microtime()); + $this->_type = $name; + $this->_ident = $ident; + $this->_mask = Log::UPTO($level); + + if (!empty($conf['destination'])) { + $this->_destination = $conf['destination']; + } + + if (!empty($conf['extra_headers'])) { + $this->_extra_headers = $conf['extra_headers']; + } + + if (!empty($conf['lineFormat'])) { + $this->_lineFormat = str_replace(array_keys($this->_formatMap), + array_values($this->_formatMap), + $conf['lineFormat']); + } + + if (!empty($conf['timeFormat'])) { + $this->_timeFormat = $conf['timeFormat']; + } + } + + /** + * Opens the handler. + * + * @access public + * @since Log 1.9.6 + */ + function open() + { + $this->_opened = true; + return true; + } + + /** + * Closes the handler. + * + * @access public + * @since Log 1.9.6 + */ + function close() + { + $this->_opened = false; + return true; + } + + /** + * Logs $message using PHP's error_log() function. The message is also + * passed along to any Log_observer instances that are observing this Log. + * + * @param mixed $message String or object containing the message to log. + * @param string $priority The priority of the message. Valid + * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, + * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, + * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. + * @return boolean True on success or false on failure. + * @access public + */ + function log($message, $priority = null) + { + /* If a priority hasn't been specified, use the default value. */ + if ($priority === null) { + $priority = $this->_priority; + } + + /* Abort early if the priority is above the maximum logging level. */ + if (!$this->_isMasked($priority)) { + return false; + } + + /* Extract the string representation of the message. */ + $message = $this->_extractMessage($message); + + /* Build the string containing the complete log line. */ + $line = $this->_format($this->_lineFormat, + strftime($this->_timeFormat), + $priority, $message); + + /* Pass the log line and parameters to the error_log() function. */ + $success = error_log($line, $this->_type, $this->_destination, + $this->_extra_headers); + + $this->_announce(array('priority' => $priority, 'message' => $message)); + + return $success; + } + +} diff --git a/_piecrust/libs/Log/Log/file.php b/_piecrust/libs/Log/Log/file.php new file mode 100644 index 0000000..9e84eb3 --- /dev/null +++ b/_piecrust/libs/Log/Log/file.php @@ -0,0 +1,316 @@ + + * @author Roman Neuhauser + * @since Log 1.0 + * @package Log + * + * @example file.php Using the file handler. + */ +class Log_file extends Log +{ + /** + * String containing the name of the log file. + * @var string + * @access private + */ + var $_filename = 'php.log'; + + /** + * Handle to the log file. + * @var resource + * @access private + */ + var $_fp = false; + + /** + * Should new log entries be append to an existing log file, or should the + * a new log file overwrite an existing one? + * @var boolean + * @access private + */ + var $_append = true; + + /** + * Should advisory file locking (i.e., flock()) be used? + * @var boolean + * @access private + */ + var $_locking = false; + + /** + * Integer (in octal) containing the log file's permissions mode. + * @var integer + * @access private + */ + var $_mode = 0644; + + /** + * Integer (in octal) specifying the file permission mode that will be + * used when creating directories that do not already exist. + * @var integer + * @access private + */ + var $_dirmode = 0755; + + /** + * String containing the format of a log line. + * @var string + * @access private + */ + var $_lineFormat = '%1$s %2$s [%3$s] %4$s'; + + /** + * String containing the timestamp format. It will be passed directly to + * strftime(). Note that the timestamp string will generated using the + * current locale. + * @var string + * @access private + */ + var $_timeFormat = '%b %d %H:%M:%S'; + + /** + * String containing the end-on-line character sequence. + * @var string + * @access private + */ + var $_eol = "\n"; + + /** + * Constructs a new Log_file object. + * + * @param string $name Ignored. + * @param string $ident The identity string. + * @param array $conf The configuration array. + * @param int $level Log messages up to and including this level. + * @access public + */ + function Log_file($name, $ident = '', $conf = array(), + $level = PEAR_LOG_DEBUG) + { + $this->_id = md5(microtime()); + $this->_filename = $name; + $this->_ident = $ident; + $this->_mask = Log::UPTO($level); + + if (isset($conf['append'])) { + $this->_append = $conf['append']; + } + + if (isset($conf['locking'])) { + $this->_locking = $conf['locking']; + } + + if (!empty($conf['mode'])) { + if (is_string($conf['mode'])) { + $this->_mode = octdec($conf['mode']); + } else { + $this->_mode = $conf['mode']; + } + } + + if (!empty($conf['dirmode'])) { + if (is_string($conf['dirmode'])) { + $this->_dirmode = octdec($conf['dirmode']); + } else { + $this->_dirmode = $conf['dirmode']; + } + } + + if (!empty($conf['lineFormat'])) { + $this->_lineFormat = str_replace(array_keys($this->_formatMap), + array_values($this->_formatMap), + $conf['lineFormat']); + } + + if (!empty($conf['timeFormat'])) { + $this->_timeFormat = $conf['timeFormat']; + } + + if (!empty($conf['eol'])) { + $this->_eol = $conf['eol']; + } else { + $this->_eol = (strstr(PHP_OS, 'WIN')) ? "\r\n" : "\n"; + } + + register_shutdown_function(array(&$this, '_Log_file')); + } + + /** + * Destructor + */ + function _Log_file() + { + if ($this->_opened) { + $this->close(); + } + } + + /** + * Creates the given directory path. If the parent directories don't + * already exist, they will be created, too. + * + * This implementation is inspired by Python's os.makedirs function. + * + * @param string $path The full directory path to create. + * @param integer $mode The permissions mode with which the + * directories will be created. + * + * @return True if the full path is successfully created or already + * exists. + * + * @access private + */ + function _mkpath($path, $mode = 0700) + { + /* Separate the last pathname component from the rest of the path. */ + $head = dirname($path); + $tail = basename($path); + + /* Make sure we've split the path into two complete components. */ + if (empty($tail)) { + $head = dirname($path); + $tail = basename($path); + } + + /* Recurse up the path if our current segment does not exist. */ + if (!empty($head) && !empty($tail) && !is_dir($head)) { + $this->_mkpath($head, $mode); + } + + /* Create this segment of the path. */ + return @mkdir($head, $mode); + } + + /** + * Opens the log file for output. If the specified log file does not + * already exist, it will be created. By default, new log entries are + * appended to the end of the log file. + * + * This is implicitly called by log(), if necessary. + * + * @access public + */ + function open() + { + if (!$this->_opened) { + /* If the log file's directory doesn't exist, create it. */ + if (!is_dir(dirname($this->_filename))) { + $this->_mkpath($this->_filename, $this->_dirmode); + } + + /* Determine whether the log file needs to be created. */ + $creating = !file_exists($this->_filename); + + /* Obtain a handle to the log file. */ + $this->_fp = fopen($this->_filename, ($this->_append) ? 'a' : 'w'); + + /* We consider the file "opened" if we have a valid file pointer. */ + $this->_opened = ($this->_fp !== false); + + /* Attempt to set the file's permissions if we just created it. */ + if ($creating && $this->_opened) { + chmod($this->_filename, $this->_mode); + } + } + + return $this->_opened; + } + + /** + * Closes the log file if it is open. + * + * @access public + */ + function close() + { + /* If the log file is open, close it. */ + if ($this->_opened && fclose($this->_fp)) { + $this->_opened = false; + } + + return ($this->_opened === false); + } + + /** + * Flushes all pending data to the file handle. + * + * @access public + * @since Log 1.8.2 + */ + function flush() + { + if (is_resource($this->_fp)) { + return fflush($this->_fp); + } + + return false; + } + + /** + * Logs $message to the output window. The message is also passed along + * to any Log_observer instances that are observing this Log. + * + * @param mixed $message String or object containing the message to log. + * @param string $priority The priority of the message. Valid + * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, + * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, + * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. + * @return boolean True on success or false on failure. + * @access public + */ + function log($message, $priority = null) + { + /* If a priority hasn't been specified, use the default value. */ + if ($priority === null) { + $priority = $this->_priority; + } + + /* Abort early if the priority is above the maximum logging level. */ + if (!$this->_isMasked($priority)) { + return false; + } + + /* If the log file isn't already open, open it now. */ + if (!$this->_opened && !$this->open()) { + return false; + } + + /* Extract the string representation of the message. */ + $message = $this->_extractMessage($message); + + /* Build the string containing the complete log line. */ + $line = $this->_format($this->_lineFormat, + strftime($this->_timeFormat), + $priority, $message) . $this->_eol; + + /* If locking is enabled, acquire an exclusive lock on the file. */ + if ($this->_locking) { + flock($this->_fp, LOCK_EX); + } + + /* Write the log line to the log file. */ + $success = (fwrite($this->_fp, $line) !== false); + + /* Unlock the file now that we're finished writing to it. */ + if ($this->_locking) { + flock($this->_fp, LOCK_UN); + } + + /* Notify observers about this log message. */ + $this->_announce(array('priority' => $priority, 'message' => $message)); + + return $success; + } + +} diff --git a/_piecrust/libs/Log/Log/firebug.php b/_piecrust/libs/Log/Log/firebug.php new file mode 100644 index 0000000..f820ac2 --- /dev/null +++ b/_piecrust/libs/Log/Log/firebug.php @@ -0,0 +1,207 @@ + + * @since Log 1.9.11 + * @package Log + * + * @example firebug.php Using the firebug handler. + */ +class Log_firebug extends Log +{ + /** + * Should the output be buffered or displayed immediately? + * @var string + * @access private + */ + var $_buffering = false; + + /** + * String holding the buffered output. + * @var string + * @access private + */ + var $_buffer = array(); + + /** + * String containing the format of a log line. + * @var string + * @access private + */ + var $_lineFormat = '%2$s [%3$s] %4$s'; + + /** + * String containing the timestamp format. It will be passed directly to + * strftime(). Note that the timestamp string will generated using the + * current locale. + * + * Note! Default lineFormat of this driver does not display time. + * + * @var string + * @access private + */ + var $_timeFormat = '%b %d %H:%M:%S'; + + /** + * Mapping of log priorities to Firebug methods. + * @var array + * @access private + */ + var $_methods = array( + PEAR_LOG_EMERG => 'error', + PEAR_LOG_ALERT => 'error', + PEAR_LOG_CRIT => 'error', + PEAR_LOG_ERR => 'error', + PEAR_LOG_WARNING => 'warn', + PEAR_LOG_NOTICE => 'info', + PEAR_LOG_INFO => 'info', + PEAR_LOG_DEBUG => 'debug' + ); + + /** + * Constructs a new Log_firebug object. + * + * @param string $name Ignored. + * @param string $ident The identity string. + * @param array $conf The configuration array. + * @param int $level Log messages up to and including this level. + * @access public + */ + function Log_firebug($name = '', $ident = 'PHP', $conf = array(), + $level = PEAR_LOG_DEBUG) + { + $this->_id = md5(microtime()); + $this->_ident = $ident; + $this->_mask = Log::UPTO($level); + if (isset($conf['buffering'])) { + $this->_buffering = $conf['buffering']; + } + + if ($this->_buffering) { + register_shutdown_function(array(&$this, '_Log_firebug')); + } + + if (!empty($conf['lineFormat'])) { + $this->_lineFormat = str_replace(array_keys($this->_formatMap), + array_values($this->_formatMap), + $conf['lineFormat']); + } + + if (!empty($conf['timeFormat'])) { + $this->_timeFormat = $conf['timeFormat']; + } + } + + /** + * Opens the firebug handler. + * + * @access public + */ + function open() + { + $this->_opened = true; + return true; + } + + /** + * Destructor + */ + function _Log_firebug() + { + $this->close(); + } + + /** + * Closes the firebug handler. + * + * @access public + */ + function close() + { + $this->flush(); + $this->_opened = false; + return true; + } + + /** + * Flushes all pending ("buffered") data. + * + * @access public + */ + function flush() { + if (count($this->_buffer)) { + print '\n"; + }; + $this->_buffer = array(); + } + + /** + * Writes $message to Firebug console. Also, passes the message + * along to any Log_observer instances that are observing this Log. + * + * @param mixed $message String or object containing the message to log. + * @param string $priority The priority of the message. Valid + * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, + * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, + * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. + * @return boolean True on success or false on failure. + * @access public + */ + function log($message, $priority = null) + { + /* If a priority hasn't been specified, use the default value. */ + if ($priority === null) { + $priority = $this->_priority; + } + + /* Abort early if the priority is above the maximum logging level. */ + if (!$this->_isMasked($priority)) { + return false; + } + + /* Extract the string representation of the message. */ + $message = $this->_extractMessage($message); + $method = $this->_methods[$priority]; + + /* normalize line breaks and escape quotes*/ + $message = preg_replace("/\r?\n/", "\\n", addslashes($message)); + + /* Build the string containing the complete log line. */ + $line = $this->_format($this->_lineFormat, + strftime($this->_timeFormat), + $priority, + $message); + + if ($this->_buffering) { + $this->_buffer[] = sprintf('console.%s("%s");', $method, $line); + } else { + print '\n"; + } + /* Notify observers about this log message. */ + $this->_announce(array('priority' => $priority, 'message' => $message)); + + return true; + } +} diff --git a/_piecrust/libs/Log/Log/mail.php b/_piecrust/libs/Log/Log/mail.php new file mode 100644 index 0000000..9f0b29c --- /dev/null +++ b/_piecrust/libs/Log/Log/mail.php @@ -0,0 +1,294 @@ + + * @author Jon Parise + * @since Log 1.3 + * @package Log + * + * @example mail.php Using the mail handler. + */ +class Log_mail extends Log +{ + /** + * String holding the recipients' email addresses. Multiple addresses + * should be separated with commas. + * @var string + * @access private + */ + var $_recipients = ''; + + /** + * String holding the sender's email address. + * @var string + * @access private + */ + var $_from = ''; + + /** + * String holding the email's subject. + * @var string + * @access private + */ + var $_subject = '[Log_mail] Log message'; + + /** + * String holding an optional preamble for the log messages. + * @var string + * @access private + */ + var $_preamble = ''; + + /** + * String containing the format of a log line. + * @var string + * @access private + */ + var $_lineFormat = '%1$s %2$s [%3$s] %4$s'; + + /** + * String containing the timestamp format. It will be passed directly to + * strftime(). Note that the timestamp string will generated using the + * current locale. + * @var string + * @access private + */ + var $_timeFormat = '%b %d %H:%M:%S'; + + /** + * String holding the mail message body. + * @var string + * @access private + */ + var $_message = ''; + + /** + * Flag used to indicated that log lines have been written to the message + * body and the message should be sent on close(). + * @var boolean + * @access private + */ + var $_shouldSend = false; + + /** + * String holding the backend name of PEAR::Mail + * @var string + * @access private + */ + var $_mailBackend = ''; + + /** + * Array holding the params for PEAR::Mail + * @var array + * @access private + */ + var $_mailParams = array(); + + /** + * Constructs a new Log_mail object. + * + * Here is how you can customize the mail driver with the conf[] hash : + * $conf['from']: the mail's "From" header line, + * $conf['subject']: the mail's "Subject" line. + * $conf['mailBackend']: backend name of PEAR::Mail + * $conf['mailParams']: parameters for the PEAR::Mail backend + * + * @param string $name The message's recipients. + * @param string $ident The identity string. + * @param array $conf The configuration array. + * @param int $level Log messages up to and including this level. + * @access public + */ + function Log_mail($name, $ident = '', $conf = array(), + $level = PEAR_LOG_DEBUG) + { + $this->_id = md5(microtime()); + $this->_recipients = $name; + $this->_ident = $ident; + $this->_mask = Log::UPTO($level); + + if (!empty($conf['from'])) { + $this->_from = $conf['from']; + } else { + $this->_from = ini_get('sendmail_from'); + } + + if (!empty($conf['subject'])) { + $this->_subject = $conf['subject']; + } + + if (!empty($conf['preamble'])) { + $this->_preamble = $conf['preamble']; + } + + if (!empty($conf['lineFormat'])) { + $this->_lineFormat = str_replace(array_keys($this->_formatMap), + array_values($this->_formatMap), + $conf['lineFormat']); + } + + if (!empty($conf['timeFormat'])) { + $this->_timeFormat = $conf['timeFormat']; + } + + if (!empty($conf['mailBackend'])) { + $this->_mailBackend = $conf['mailBackend']; + } + + if (!empty($conf['mailParams'])) { + $this->_mailParams = $conf['mailParams']; + } + + /* register the destructor */ + register_shutdown_function(array(&$this, '_Log_mail')); + } + + /** + * Destructor. Calls close(). + * + * @access private + */ + function _Log_mail() + { + $this->close(); + } + + /** + * Starts a new mail message. + * This is implicitly called by log(), if necessary. + * + * @access public + */ + function open() + { + if (!$this->_opened) { + if (!empty($this->_preamble)) { + $this->_message = $this->_preamble . "\r\n\r\n"; + } + $this->_opened = true; + $_shouldSend = false; + } + + return $this->_opened; + } + + /** + * Closes the message, if it is open, and sends the mail. + * This is implicitly called by the destructor, if necessary. + * + * @access public + */ + function close() + { + if ($this->_opened) { + if ($this->_shouldSend && !empty($this->_message)) { + if ($this->_mailBackend === '') { // use mail() + $headers = "From: $this->_from\r\n"; + $headers .= 'User-Agent: PEAR Log Package'; + if (mail($this->_recipients, $this->_subject, + $this->_message, $headers) == false) { + return false; + } + } else { // use PEAR::Mail + include_once 'Mail.php'; + $headers = array('From' => $this->_from, + 'To' => $this->_recipients, + 'User-Agent' => 'PEAR Log Package', + 'Subject' => $this->_subject); + $mailer = &Mail::factory($this->_mailBackend, + $this->_mailParams); + $res = $mailer->send($this->_recipients, $headers, + $this->_message); + if (PEAR::isError($res)) { + return false; + } + } + + /* Clear the message string now that the email has been sent. */ + $this->_message = ''; + $this->_shouldSend = false; + } + $this->_opened = false; + } + + return ($this->_opened === false); + } + + /** + * Flushes the log output by forcing the email message to be sent now. + * Events that are logged after flush() is called will be appended to a + * new email message. + * + * @access public + * @since Log 1.8.2 + */ + function flush() + { + /* + * It's sufficient to simply call close() to flush the output. + * The next call to log() will cause the handler to be reopened. + */ + return $this->close(); + } + + /** + * Writes $message to the currently open mail message. + * Calls open(), if necessary. + * + * @param mixed $message String or object containing the message to log. + * @param string $priority The priority of the message. Valid + * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, + * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, + * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. + * @return boolean True on success or false on failure. + * @access public + */ + function log($message, $priority = null) + { + /* If a priority hasn't been specified, use the default value. */ + if ($priority === null) { + $priority = $this->_priority; + } + + /* Abort early if the priority is above the maximum logging level. */ + if (!$this->_isMasked($priority)) { + return false; + } + + /* If the message isn't open and can't be opened, return failure. */ + if (!$this->_opened && !$this->open()) { + return false; + } + + /* Extract the string representation of the message. */ + $message = $this->_extractMessage($message); + + /* Append the string containing the complete log line. */ + $this->_message .= $this->_format($this->_lineFormat, + strftime($this->_timeFormat), + $priority, $message) . "\r\n"; + $this->_shouldSend = true; + + /* Notify observers about this log message. */ + $this->_announce(array('priority' => $priority, 'message' => $message)); + + return true; + } +} diff --git a/_piecrust/libs/Log/Log/mcal.php b/_piecrust/libs/Log/Log/mcal.php new file mode 100644 index 0000000..76788d0 --- /dev/null +++ b/_piecrust/libs/Log/Log/mcal.php @@ -0,0 +1,170 @@ + + * @since Horde 1.3 + * @since Log 1.0 + * @package Log + */ +class Log_mcal extends Log +{ + /** + * holding the calendar specification to connect to. + * @var string + * @access private + */ + var $_calendar = '{localhost/mstore}'; + + /** + * holding the username to use. + * @var string + * @access private + */ + var $_username = ''; + + /** + * holding the password to use. + * @var string + * @access private + */ + var $_password = ''; + + /** + * holding the options to pass to the calendar stream. + * @var integer + * @access private + */ + var $_options = 0; + + /** + * ResourceID of the MCAL stream. + * @var string + * @access private + */ + var $_stream = ''; + + /** + * Integer holding the log facility to use. + * @var string + * @access private + */ + var $_name = LOG_SYSLOG; + + + /** + * Constructs a new Log_mcal object. + * + * @param string $name The category to use for our events. + * @param string $ident The identity string. + * @param array $conf The configuration array. + * @param int $level Log messages up to and including this level. + * @access public + */ + function Log_mcal($name, $ident = '', $conf = array(), + $level = PEAR_LOG_DEBUG) + { + $this->_id = md5(microtime()); + $this->_name = $name; + $this->_ident = $ident; + $this->_mask = Log::UPTO($level); + $this->_calendar = $conf['calendar']; + $this->_username = $conf['username']; + $this->_password = $conf['password']; + $this->_options = $conf['options']; + } + + /** + * Opens a calendar stream, if it has not already been + * opened. This is implicitly called by log(), if necessary. + * @access public + */ + function open() + { + if (!$this->_opened) { + $this->_stream = mcal_open($this->_calendar, $this->_username, + $this->_password, $this->_options); + $this->_opened = true; + } + + return $this->_opened; + } + + /** + * Closes the calendar stream, if it is open. + * @access public + */ + function close() + { + if ($this->_opened) { + mcal_close($this->_stream); + $this->_opened = false; + } + + return ($this->_opened === false); + } + + /** + * Logs $message and associated information to the currently open + * calendar stream. Calls open() if necessary. Also passes the + * message along to any Log_observer instances that are observing + * this Log. + * + * @param mixed $message String or object containing the message to log. + * @param string $priority The priority of the message. Valid + * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, + * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, + * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. + * @return boolean True on success or false on failure. + * @access public + */ + function log($message, $priority = null) + { + /* If a priority hasn't been specified, use the default value. */ + if ($priority === null) { + $priority = $this->_priority; + } + + /* Abort early if the priority is above the maximum logging level. */ + if (!$this->_isMasked($priority)) { + return false; + } + + /* If the connection isn't open and can't be opened, return failure. */ + if (!$this->_opened && !$this->open()) { + return false; + } + + /* Extract the string representation of the message. */ + $message = $this->_extractMessage($message); + + $date_str = date('Y:n:j:G:i:s'); + $dates = explode(':', $date_str); + + mcal_event_init($this->_stream); + mcal_event_set_title($this->_stream, $this->_ident); + mcal_event_set_category($this->_stream, $this->_name); + mcal_event_set_description($this->_stream, $message); + mcal_event_add_attribute($this->_stream, 'priority', $priority); + mcal_event_set_start($this->_stream, $dates[0], $dates[1], $dates[2], + $dates[3], $dates[4], $dates[5]); + mcal_event_set_end($this->_stream, $dates[0], $dates[1], $dates[2], + $dates[3], $dates[4], $dates[5]); + mcal_append_event($this->_stream); + + $this->_announce(array('priority' => $priority, 'message' => $message)); + + return true; + } + +} diff --git a/_piecrust/libs/Log/Log/mdb2.php b/_piecrust/libs/Log/Log/mdb2.php new file mode 100644 index 0000000..6d0a9e4 --- /dev/null +++ b/_piecrust/libs/Log/Log/mdb2.php @@ -0,0 +1,358 @@ + + * @author Jon Parise + * @since Log 1.9.0 + * @package Log + */ +class Log_mdb2 extends Log +{ + /** + * Variable containing the DSN information. + * @var mixed + * @access private + */ + var $_dsn = ''; + + /** + * Array containing our set of DB configuration options. + * @var array + * @access private + */ + var $_options = array('persistent' => true); + + /** + * Object holding the database handle. + * @var object + * @access private + */ + var $_db = null; + + /** + * Resource holding the prepared statement handle. + * @var resource + * @access private + */ + var $_statement = null; + + /** + * Flag indicating that we're using an existing database connection. + * @var boolean + * @access private + */ + var $_existingConnection = false; + + /** + * String holding the database table to use. + * @var string + * @access private + */ + var $_table = 'log_table'; + + /** + * String holding the name of the ID sequence. + * @var string + * @access private + */ + var $_sequence = 'log_id'; + + /** + * Maximum length of the $ident string. This corresponds to the size of + * the 'ident' column in the SQL table. + * @var integer + * @access private + */ + var $_identLimit = 16; + + /** + * Set of field types used in the database table. + * @var array + * @access private + */ + var $_types = array( + 'id' => 'integer', + 'logtime' => 'timestamp', + 'ident' => 'text', + 'priority' => 'text', + 'message' => 'clob' + ); + + /** + * Constructs a new sql logging object. + * + * @param string $name The target SQL table. + * @param string $ident The identification field. + * @param array $conf The connection configuration array. + * @param int $level Log messages up to and including this level. + * @access public + */ + function Log_mdb2($name, $ident = '', $conf = array(), + $level = PEAR_LOG_DEBUG) + { + $this->_id = md5(microtime()); + $this->_table = $name; + $this->_mask = Log::UPTO($level); + + /* If an options array was provided, use it. */ + if (isset($conf['options']) && is_array($conf['options'])) { + $this->_options = $conf['options']; + } + + /* If a specific sequence name was provided, use it. */ + if (!empty($conf['sequence'])) { + $this->_sequence = $conf['sequence']; + } + + /* If a specific sequence name was provided, use it. */ + if (isset($conf['identLimit'])) { + $this->_identLimit = $conf['identLimit']; + } + + /* Now that the ident limit is confirmed, set the ident string. */ + $this->setIdent($ident); + + /* If an existing database connection was provided, use it. */ + if (isset($conf['db'])) { + $this->_db = &$conf['db']; + $this->_existingConnection = true; + $this->_opened = true; + } elseif (isset($conf['singleton'])) { + $this->_db = &MDB2::singleton($conf['singleton'], $this->_options); + $this->_existingConnection = true; + $this->_opened = true; + } else { + $this->_dsn = $conf['dsn']; + } + } + + /** + * Opens a connection to the database, if it has not already + * been opened. This is implicitly called by log(), if necessary. + * + * @return boolean True on success, false on failure. + * @access public + */ + function open() + { + if (!$this->_opened) { + /* Use the DSN and options to create a database connection. */ + $this->_db = &MDB2::connect($this->_dsn, $this->_options); + if (PEAR::isError($this->_db)) { + return false; + } + + /* Create a prepared statement for repeated use in log(). */ + if (!$this->_prepareStatement()) { + return false; + } + + /* We now consider out connection open. */ + $this->_opened = true; + } + + return $this->_opened; + } + + /** + * Closes the connection to the database if it is still open and we were + * the ones that opened it. It is the caller's responsible to close an + * existing connection that was passed to us via $conf['db']. + * + * @return boolean True on success, false on failure. + * @access public + */ + function close() + { + /* If we have a statement object, free it. */ + if (is_object($this->_statement)) { + $this->_statement->free(); + $this->_statement = null; + } + + /* If we opened the database connection, disconnect it. */ + if ($this->_opened && !$this->_existingConnection) { + $this->_opened = false; + return $this->_db->disconnect(); + } + + return ($this->_opened === false); + } + + /** + * Sets this Log instance's identification string. Note that this + * SQL-specific implementation will limit the length of the $ident string + * to sixteen (16) characters. + * + * @param string $ident The new identification string. + * + * @access public + * @since Log 1.8.5 + */ + function setIdent($ident) + { + $this->_ident = substr($ident, 0, $this->_identLimit); + } + + /** + * Inserts $message to the currently open database. Calls open(), + * if necessary. Also passes the message along to any Log_observer + * instances that are observing this Log. + * + * @param mixed $message String or object containing the message to log. + * @param string $priority The priority of the message. Valid + * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, + * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, + * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. + * @return boolean True on success or false on failure. + * @access public + */ + function log($message, $priority = null) + { + /* If a priority hasn't been specified, use the default value. */ + if ($priority === null) { + $priority = $this->_priority; + } + + /* Abort early if the priority is above the maximum logging level. */ + if (!$this->_isMasked($priority)) { + return false; + } + + /* If the connection isn't open and can't be opened, return failure. */ + if (!$this->_opened && !$this->open()) { + return false; + } + + /* If we don't already have a statement object, create one. */ + if (!is_object($this->_statement) && !$this->_prepareStatement()) { + return false; + } + + /* Extract the string representation of the message. */ + $message = $this->_extractMessage($message); + + /* Build our set of values for this log entry. */ + $values = array( + 'id' => $this->_db->nextId($this->_sequence), + 'logtime' => MDB2_Date::mdbNow(), + 'ident' => $this->_ident, + 'priority' => $priority, + 'message' => $message + ); + + /* Execute the SQL query for this log entry insertion. */ + $this->_db->expectError(MDB2_ERROR_NOSUCHTABLE); + $result = &$this->_statement->execute($values); + $this->_db->popExpect(); + + /* Attempt to handle any errors. */ + if (PEAR::isError($result)) { + /* We can only handle MDB2_ERROR_NOSUCHTABLE errors. */ + if ($result->getCode() != MDB2_ERROR_NOSUCHTABLE) { + return false; + } + + /* Attempt to create the target table. */ + if (!$this->_createTable()) { + return false; + } + + /* Recreate our prepared statement resource. */ + $this->_statement->free(); + if (!$this->_prepareStatement()) { + return false; + } + + /* Attempt to re-execute the insertion query. */ + $result = $this->_statement->execute($values); + if (PEAR::isError($result)) { + return false; + } + } + + $this->_announce(array('priority' => $priority, 'message' => $message)); + + return true; + } + + /** + * Create the log table in the database. + * + * @return boolean True on success or false on failure. + * @access private + */ + function _createTable() + { + $this->_db->loadModule('Manager', null, true); + $result = $this->_db->manager->createTable( + $this->_table, + array( + 'id' => array('type' => $this->_types['id']), + 'logtime' => array('type' => $this->_types['logtime']), + 'ident' => array('type' => $this->_types['ident']), + 'priority' => array('type' => $this->_types['priority']), + 'message' => array('type' => $this->_types['message']) + ) + ); + if (PEAR::isError($result)) { + return false; + } + + $result = $this->_db->manager->createIndex( + $this->_table, + 'unique_id', + array('fields' => array('id' => true), 'unique' => true) + ); + if (PEAR::isError($result)) { + return false; + } + + return true; + } + + /** + * Prepare the SQL insertion statement. + * + * @return boolean True if the statement was successfully created. + * + * @access private + * @since Log 1.9.0 + */ + function _prepareStatement() + { + $this->_statement = &$this->_db->prepare( + 'INSERT INTO ' . $this->_table . + ' (id, logtime, ident, priority, message)' . + ' VALUES(:id, :logtime, :ident, :priority, :message)', + $this->_types, MDB2_PREPARE_MANIP); + + /* Return success if we didn't generate an error. */ + return (PEAR::isError($this->_statement) === false); + } +} diff --git a/_piecrust/libs/Log/Log/null.php b/_piecrust/libs/Log/Log/null.php new file mode 100644 index 0000000..5fc69f9 --- /dev/null +++ b/_piecrust/libs/Log/Log/null.php @@ -0,0 +1,91 @@ + + * @since Log 1.8.2 + * @package Log + * + * @example null.php Using the null handler. + */ +class Log_null extends Log +{ + /** + * Constructs a new Log_null object. + * + * @param string $name Ignored. + * @param string $ident The identity string. + * @param array $conf The configuration array. + * @param int $level Log messages up to and including this level. + * @access public + */ + function Log_null($name, $ident = '', $conf = array(), + $level = PEAR_LOG_DEBUG) + { + $this->_id = md5(microtime()); + $this->_ident = $ident; + $this->_mask = Log::UPTO($level); + } + + /** + * Opens the handler. + * + * @access public + * @since Log 1.9.6 + */ + function open() + { + $this->_opened = true; + return true; + } + + /** + * Closes the handler. + * + * @access public + * @since Log 1.9.6 + */ + function close() + { + $this->_opened = false; + return true; + } + + /** + * Simply consumes the log event. The message will still be passed + * along to any Log_observer instances that are observing this Log. + * + * @param mixed $message String or object containing the message to log. + * @param string $priority The priority of the message. Valid + * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, + * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, + * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. + * @return boolean True on success or false on failure. + * @access public + */ + function log($message, $priority = null) + { + /* If a priority hasn't been specified, use the default value. */ + if ($priority === null) { + $priority = $this->_priority; + } + + /* Abort early if the priority is above the maximum logging level. */ + if (!$this->_isMasked($priority)) { + return false; + } + + $this->_announce(array('priority' => $priority, 'message' => $message)); + + return true; + } + +} diff --git a/_piecrust/libs/Log/Log/observer.php b/_piecrust/libs/Log/Log/observer.php new file mode 100644 index 0000000..43ba04c --- /dev/null +++ b/_piecrust/libs/Log/Log/observer.php @@ -0,0 +1,129 @@ + + * @since Horde 1.3 + * @since Log 1.0 + * @package Log + * + * @example observer_mail.php An example Log_observer implementation. + */ +class Log_observer +{ + /** + * Instance-specific unique identification number. + * + * @var integer + * @access private + */ + var $_id = 0; + + /** + * The minimum priority level of message that we want to hear about. + * PEAR_LOG_EMERG is the highest priority, so we will only hear messages + * with an integer priority value less than or equal to ours. It defaults + * to PEAR_LOG_INFO, which listens to everything except PEAR_LOG_DEBUG. + * + * @var string + * @access private + */ + var $_priority = PEAR_LOG_INFO; + + /** + * Creates a new basic Log_observer instance. + * + * @param integer $priority The highest priority at which to receive + * log event notifications. + * + * @access public + */ + function Log_observer($priority = PEAR_LOG_INFO) + { + $this->_id = md5(microtime()); + $this->_priority = $priority; + } + + /** + * Attempts to return a new concrete Log_observer instance of the requested + * type. + * + * @param string $type The type of concreate Log_observer subclass + * to return. + * @param integer $priority The highest priority at which to receive + * log event notifications. + * @param array $conf Optional associative array of additional + * configuration values. + * + * @return object The newly created concrete Log_observer + * instance, or null on an error. + */ + function &factory($type, $priority = PEAR_LOG_INFO, $conf = array()) + { + $type = strtolower($type); + $class = 'Log_observer_' . $type; + + /* + * If the desired class already exists (because the caller has supplied + * it from some custom location), simply instantiate and return a new + * instance. + */ + if (class_exists($class)) { + $object = &new $class($priority, $conf); + return $object; + } + + /* Support both the new-style and old-style file naming conventions. */ + $newstyle = true; + $classfile = dirname(__FILE__) . '/observer_' . $type . '.php'; + + if (!file_exists($classfile)) { + $classfile = 'Log/' . $type . '.php'; + $newstyle = false; + } + + /* + * Attempt to include our version of the named class, but don't treat + * a failure as fatal. The caller may have already included their own + * version of the named class. + */ + @include_once $classfile; + + /* If the class exists, return a new instance of it. */ + if (class_exists($class)) { + /* Support both new-style and old-style construction. */ + if ($newstyle) { + $object = &new $class($priority, $conf); + } else { + $object = &new $class($priority); + } + return $object; + } + + $null = null; + return $null; + } + + /** + * This is a stub method to make sure that Log_Observer classes do + * something when they are notified of a message. The default behavior + * is to just print the message, which is obviously not desireable in + * practically any situation - which is why you need to override this + * method. :) + * + * @param array $event A hash describing the log event. + */ + function notify($event) + { + print_r($event); + } +} diff --git a/_piecrust/libs/Log/Log/sql.php b/_piecrust/libs/Log/Log/sql.php new file mode 100644 index 0000000..a8efbfb --- /dev/null +++ b/_piecrust/libs/Log/Log/sql.php @@ -0,0 +1,294 @@ + + * @since Horde 1.3 + * @since Log 1.0 + * @package Log + * + * @example sql.php Using the SQL handler. + */ +class Log_sql extends Log +{ + /** + * Variable containing the DSN information. + * @var mixed + * @access private + */ + var $_dsn = ''; + + /** + * String containing the SQL insertion statement. + * + * @var string + * @access private + */ + var $_sql = ''; + + /** + * Array containing our set of DB configuration options. + * @var array + * @access private + */ + var $_options = array('persistent' => true); + + /** + * Object holding the database handle. + * @var object + * @access private + */ + var $_db = null; + + /** + * Resource holding the prepared statement handle. + * @var resource + * @access private + */ + var $_statement = null; + + /** + * Flag indicating that we're using an existing database connection. + * @var boolean + * @access private + */ + var $_existingConnection = false; + + /** + * String holding the database table to use. + * @var string + * @access private + */ + var $_table = 'log_table'; + + /** + * String holding the name of the ID sequence. + * @var string + * @access private + */ + var $_sequence = 'log_id'; + + /** + * Maximum length of the $ident string. This corresponds to the size of + * the 'ident' column in the SQL table. + * @var integer + * @access private + */ + var $_identLimit = 16; + + + /** + * Constructs a new sql logging object. + * + * @param string $name The target SQL table. + * @param string $ident The identification field. + * @param array $conf The connection configuration array. + * @param int $level Log messages up to and including this level. + * @access public + */ + function Log_sql($name, $ident = '', $conf = array(), + $level = PEAR_LOG_DEBUG) + { + $this->_id = md5(microtime()); + $this->_table = $name; + $this->_mask = Log::UPTO($level); + + /* Now that we have a table name, assign our SQL statement. */ + if (!empty($conf['sql'])) { + $this->_sql = $conf['sql']; + } else { + $this->_sql = 'INSERT INTO ' . $this->_table . + ' (id, logtime, ident, priority, message)' . + ' VALUES(?, CURRENT_TIMESTAMP, ?, ?, ?)'; + } + + /* If an options array was provided, use it. */ + if (isset($conf['options']) && is_array($conf['options'])) { + $this->_options = $conf['options']; + } + + /* If a specific sequence name was provided, use it. */ + if (!empty($conf['sequence'])) { + $this->_sequence = $conf['sequence']; + } + + /* If a specific sequence name was provided, use it. */ + if (isset($conf['identLimit'])) { + $this->_identLimit = $conf['identLimit']; + } + + /* Now that the ident limit is confirmed, set the ident string. */ + $this->setIdent($ident); + + /* If an existing database connection was provided, use it. */ + if (isset($conf['db'])) { + $this->_db = &$conf['db']; + $this->_existingConnection = true; + $this->_opened = true; + } else { + $this->_dsn = $conf['dsn']; + } + } + + /** + * Opens a connection to the database, if it has not already + * been opened. This is implicitly called by log(), if necessary. + * + * @return boolean True on success, false on failure. + * @access public + */ + function open() + { + if (!$this->_opened) { + /* Use the DSN and options to create a database connection. */ + $this->_db = &DB::connect($this->_dsn, $this->_options); + if (DB::isError($this->_db)) { + return false; + } + + /* Create a prepared statement for repeated use in log(). */ + if (!$this->_prepareStatement()) { + return false; + } + + /* We now consider out connection open. */ + $this->_opened = true; + } + + return $this->_opened; + } + + /** + * Closes the connection to the database if it is still open and we were + * the ones that opened it. It is the caller's responsible to close an + * existing connection that was passed to us via $conf['db']. + * + * @return boolean True on success, false on failure. + * @access public + */ + function close() + { + if ($this->_opened && !$this->_existingConnection) { + $this->_opened = false; + $this->_db->freePrepared($this->_statement); + return $this->_db->disconnect(); + } + + return ($this->_opened === false); + } + + /** + * Sets this Log instance's identification string. Note that this + * SQL-specific implementation will limit the length of the $ident string + * to sixteen (16) characters. + * + * @param string $ident The new identification string. + * + * @access public + * @since Log 1.8.5 + */ + function setIdent($ident) + { + $this->_ident = substr($ident, 0, $this->_identLimit); + } + + /** + * Inserts $message to the currently open database. Calls open(), + * if necessary. Also passes the message along to any Log_observer + * instances that are observing this Log. + * + * @param mixed $message String or object containing the message to log. + * @param string $priority The priority of the message. Valid + * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, + * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, + * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. + * @return boolean True on success or false on failure. + * @access public + */ + function log($message, $priority = null) + { + /* If a priority hasn't been specified, use the default value. */ + if ($priority === null) { + $priority = $this->_priority; + } + + /* Abort early if the priority is above the maximum logging level. */ + if (!$this->_isMasked($priority)) { + return false; + } + + /* If the connection isn't open and can't be opened, return failure. */ + if (!$this->_opened && !$this->open()) { + return false; + } + + /* If we don't already have our statement object yet, create it. */ + if (!is_object($this->_statement) && !$this->_prepareStatement()) { + return false; + } + + /* Extract the string representation of the message. */ + $message = $this->_extractMessage($message); + + /* Build our set of values for this log entry. */ + $id = $this->_db->nextId($this->_sequence); + $values = array($id, $this->_ident, $priority, $message); + + /* Execute the SQL query for this log entry insertion. */ + $result =& $this->_db->execute($this->_statement, $values); + if (DB::isError($result)) { + return false; + } + + $this->_announce(array('priority' => $priority, 'message' => $message)); + + return true; + } + + /** + * Prepare the SQL insertion statement. + * + * @return boolean True if the statement was successfully created. + * + * @access private + * @since Log 1.9.1 + */ + function _prepareStatement() + { + $this->_statement = $this->_db->prepare($this->_sql); + + /* Return success if we didn't generate an error. */ + return (DB::isError($this->_statement) === false); + } +} diff --git a/_piecrust/libs/Log/Log/sqlite.php b/_piecrust/libs/Log/Log/sqlite.php new file mode 100644 index 0000000..ee50109 --- /dev/null +++ b/_piecrust/libs/Log/Log/sqlite.php @@ -0,0 +1,225 @@ + + * @author Jon Parise + * @since Log 1.8.3 + * @package Log + * + * @example sqlite.php Using the Sqlite handler. + */ +class Log_sqlite extends Log +{ + /** + * Array containing the connection defaults + * @var array + * @access private + */ + var $_options = array('mode' => 0666, + 'persistent' => false); + + /** + * Object holding the database handle. + * @var object + * @access private + */ + var $_db = null; + + /** + * Flag indicating that we're using an existing database connection. + * @var boolean + * @access private + */ + var $_existingConnection = false; + + /** + * String holding the database table to use. + * @var string + * @access private + */ + var $_table = 'log_table'; + + + /** + * Constructs a new sql logging object. + * + * @param string $name The target SQL table. + * @param string $ident The identification field. + * @param mixed $conf Can be an array of configuration options used + * to open a new database connection + * or an already opened sqlite connection. + * @param int $level Log messages up to and including this level. + * @access public + */ + function Log_sqlite($name, $ident = '', &$conf, $level = PEAR_LOG_DEBUG) + { + $this->_id = md5(microtime()); + $this->_table = $name; + $this->_ident = $ident; + $this->_mask = Log::UPTO($level); + + if (is_array($conf)) { + foreach ($conf as $k => $opt) { + $this->_options[$k] = $opt; + } + } else { + // If an existing database connection was provided, use it. + $this->_db =& $conf; + $this->_existingConnection = true; + } + } + + /** + * Opens a connection to the database, if it has not already + * been opened. This is implicitly called by log(), if necessary. + * + * @return boolean True on success, false on failure. + * @access public + */ + function open() + { + if (is_resource($this->_db)) { + $this->_opened = true; + return $this->_createTable(); + } else { + /* Set the connection function based on the 'persistent' option. */ + if (empty($this->_options['persistent'])) { + $connectFunction = 'sqlite_open'; + } else { + $connectFunction = 'sqlite_popen'; + } + + /* Attempt to connect to the database. */ + if ($this->_db = $connectFunction($this->_options['filename'], + (int)$this->_options['mode'], + $error)) { + $this->_opened = true; + return $this->_createTable(); + } + } + + return $this->_opened; + } + + /** + * Closes the connection to the database if it is still open and we were + * the ones that opened it. It is the caller's responsible to close an + * existing connection that was passed to us via $conf['db']. + * + * @return boolean True on success, false on failure. + * @access public + */ + function close() + { + /* We never close existing connections. */ + if ($this->_existingConnection) { + return false; + } + + if ($this->_opened) { + $this->_opened = false; + sqlite_close($this->_db); + } + + return ($this->_opened === false); + } + + /** + * Inserts $message to the currently open database. Calls open(), + * if necessary. Also passes the message along to any Log_observer + * instances that are observing this Log. + * + * @param mixed $message String or object containing the message to log. + * @param string $priority The priority of the message. Valid + * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, + * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, + * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. + * @return boolean True on success or false on failure. + * @access public + */ + function log($message, $priority = null) + { + /* If a priority hasn't been specified, use the default value. */ + if ($priority === null) { + $priority = $this->_priority; + } + + /* Abort early if the priority is above the maximum logging level. */ + if (!$this->_isMasked($priority)) { + return false; + } + + /* If the connection isn't open and can't be opened, return failure. */ + if (!$this->_opened && !$this->open()) { + return false; + } + + // Extract the string representation of the message. + $message = $this->_extractMessage($message); + + // Build the SQL query for this log entry insertion. + $q = sprintf('INSERT INTO [%s] (logtime, ident, priority, message) ' . + "VALUES ('%s', '%s', %d, '%s')", + $this->_table, + strftime('%Y-%m-%d %H:%M:%S', time()), + sqlite_escape_string($this->_ident), + $priority, + sqlite_escape_string($message)); + if (!($res = @sqlite_unbuffered_query($this->_db, $q))) { + return false; + } + $this->_announce(array('priority' => $priority, 'message' => $message)); + + return true; + } + + /** + * Checks whether the log table exists and creates it if necessary. + * + * @return boolean True on success or false on failure. + * @access private + */ + function _createTable() + { + $q = "SELECT name FROM sqlite_master WHERE name='" . $this->_table . + "' AND type='table'"; + + $res = sqlite_query($this->_db, $q); + + if (sqlite_num_rows($res) == 0) { + $q = 'CREATE TABLE [' . $this->_table . '] (' . + 'id INTEGER PRIMARY KEY NOT NULL, ' . + 'logtime NOT NULL, ' . + 'ident CHAR(16) NOT NULL, ' . + 'priority INT NOT NULL, ' . + 'message)'; + + if (!($res = sqlite_unbuffered_query($this->_db, $q))) { + return false; + } + } + + return true; + } + +} diff --git a/_piecrust/libs/Log/Log/syslog.php b/_piecrust/libs/Log/Log/syslog.php new file mode 100644 index 0000000..58fd91f --- /dev/null +++ b/_piecrust/libs/Log/Log/syslog.php @@ -0,0 +1,228 @@ + + * @author Jon Parise + * @since Horde 1.3 + * @since Log 1.0 + * @package Log + * + * @example syslog.php Using the syslog handler. + */ +class Log_syslog extends Log +{ + /** + * Integer holding the log facility to use. + * @var integer + * @access private + */ + var $_name = LOG_SYSLOG; + + /** + * Should we inherit the current syslog connection for this process, or + * should we call openlog() to start a new syslog connection? + * @var boolean + * @access private + */ + var $_inherit = false; + + /** + * Maximum message length that will be sent to syslog(). If the handler + * receives a message longer than this length limit, it will be split into + * multiple syslog() calls. + * @var integer + * @access private + */ + var $_maxLength = 500; + + /** + * String containing the format of a message. + * @var string + * @access private + */ + var $_lineFormat = '%4$s'; + + /** + * String containing the timestamp format. It will be passed directly to + * strftime(). Note that the timestamp string will generated using the + * current locale. + * @var string + * @access private + */ + var $_timeFormat = '%b %d %H:%M:%S'; + + /** + * Constructs a new syslog object. + * + * @param string $name The syslog facility. + * @param string $ident The identity string. + * @param array $conf The configuration array. + * @param int $level Log messages up to and including this level. + * @access public + */ + function Log_syslog($name, $ident = '', $conf = array(), + $level = PEAR_LOG_DEBUG) + { + /* Ensure we have a valid integer value for $name. */ + if (empty($name) || !is_int($name)) { + $name = LOG_SYSLOG; + } + + if (isset($conf['inherit'])) { + $this->_inherit = $conf['inherit']; + $this->_opened = $this->_inherit; + } + if (isset($conf['maxLength'])) { + $this->_maxLength = $conf['maxLength']; + } + if (!empty($conf['lineFormat'])) { + $this->_lineFormat = str_replace(array_keys($this->_formatMap), + array_values($this->_formatMap), + $conf['lineFormat']); + } + if (!empty($conf['timeFormat'])) { + $this->_timeFormat = $conf['timeFormat']; + } + + $this->_id = md5(microtime()); + $this->_name = $name; + $this->_ident = $ident; + $this->_mask = Log::UPTO($level); + } + + /** + * Opens a connection to the system logger, if it has not already + * been opened. This is implicitly called by log(), if necessary. + * @access public + */ + function open() + { + if (!$this->_opened) { + $this->_opened = openlog($this->_ident, LOG_PID, $this->_name); + } + + return $this->_opened; + } + + /** + * Closes the connection to the system logger, if it is open. + * @access public + */ + function close() + { + if ($this->_opened && !$this->_inherit) { + closelog(); + $this->_opened = false; + } + + return true; + } + + /** + * Sends $message to the currently open syslog connection. Calls + * open() if necessary. Also passes the message along to any Log_observer + * instances that are observing this Log. + * + * @param mixed $message String or object containing the message to log. + * @param int $priority (optional) The priority of the message. Valid + * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, + * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, + * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. + * @return boolean True on success or false on failure. + * @access public + */ + function log($message, $priority = null) + { + /* If a priority hasn't been specified, use the default value. */ + if ($priority === null) { + $priority = $this->_priority; + } + + /* Abort early if the priority is above the maximum logging level. */ + if (!$this->_isMasked($priority)) { + return false; + } + + /* If the connection isn't open and can't be opened, return failure. */ + if (!$this->_opened && !$this->open()) { + return false; + } + + /* Extract the string representation of the message. */ + $message = $this->_extractMessage($message); + + /* Build a syslog priority value based on our current configuration. */ + $priority = $this->_toSyslog($priority); + if ($this->_inherit) { + $priority |= $this->_name; + } + + /* Apply the configured line format to the message string. */ + $message = $this->_format($this->_lineFormat, + strftime($this->_timeFormat), + $priority, $message); + + /* Split the string into parts based on our maximum length setting. */ + $parts = str_split($message, $this->_maxLength); + if ($parts === false) { + return false; + } + + foreach ($parts as $part) { + if (!syslog($priority, $part)) { + return false; + } + } + + $this->_announce(array('priority' => $priority, 'message' => $message)); + + return true; + } + + /** + * Converts a PEAR_LOG_* constant into a syslog LOG_* constant. + * + * This function exists because, under Windows, not all of the LOG_* + * constants have unique values. Instead, the PEAR_LOG_* were introduced + * for global use, with the conversion to the LOG_* constants kept local to + * to the syslog driver. + * + * @param int $priority PEAR_LOG_* value to convert to LOG_* value. + * + * @return The LOG_* representation of $priority. + * + * @access private + */ + function _toSyslog($priority) + { + static $priorities = array( + PEAR_LOG_EMERG => LOG_EMERG, + PEAR_LOG_ALERT => LOG_ALERT, + PEAR_LOG_CRIT => LOG_CRIT, + PEAR_LOG_ERR => LOG_ERR, + PEAR_LOG_WARNING => LOG_WARNING, + PEAR_LOG_NOTICE => LOG_NOTICE, + PEAR_LOG_INFO => LOG_INFO, + PEAR_LOG_DEBUG => LOG_DEBUG + ); + + /* If we're passed an unknown priority, default to LOG_INFO. */ + if (!is_int($priority) || !in_array($priority, $priorities)) { + return LOG_INFO; + } + + return $priorities[$priority]; + } + +} diff --git a/_piecrust/libs/Log/Log/win.php b/_piecrust/libs/Log/Log/win.php new file mode 100644 index 0000000..f80d146 --- /dev/null +++ b/_piecrust/libs/Log/Log/win.php @@ -0,0 +1,286 @@ + + * @since Log 1.7.0 + * @package Log + * + * @example win.php Using the window handler. + */ +class Log_win extends Log +{ + /** + * The name of the output window. + * @var string + * @access private + */ + var $_name = 'LogWindow'; + + /** + * The title of the output window. + * @var string + * @access private + */ + var $_title = 'Log Output Window'; + + /** + * Mapping of log priorities to styles. + * @var array + * @access private + */ + var $_styles = array( + PEAR_LOG_EMERG => 'color: red;', + PEAR_LOG_ALERT => 'color: orange;', + PEAR_LOG_CRIT => 'color: yellow;', + PEAR_LOG_ERR => 'color: green;', + PEAR_LOG_WARNING => 'color: blue;', + PEAR_LOG_NOTICE => 'color: indigo;', + PEAR_LOG_INFO => 'color: violet;', + PEAR_LOG_DEBUG => 'color: black;' + ); + + /** + * String buffer that holds line that are pending output. + * @var array + * @access private + */ + var $_buffer = array(); + + /** + * Constructs a new Log_win object. + * + * @param string $name Ignored. + * @param string $ident The identity string. + * @param array $conf The configuration array. + * @param int $level Log messages up to and including this level. + * @access public + */ + function Log_win($name, $ident = '', $conf = array(), + $level = PEAR_LOG_DEBUG) + { + $this->_id = md5(microtime()); + $this->_name = str_replace(' ', '_', $name); + $this->_ident = $ident; + $this->_mask = Log::UPTO($level); + + if (isset($conf['title'])) { + $this->_title = $conf['title']; + } + if (isset($conf['styles']) && is_array($conf['styles'])) { + $this->_styles = $conf['styles']; + } + if (isset($conf['colors']) && is_array($conf['colors'])) { + foreach ($conf['colors'] as $level => $color) { + $this->_styles[$level] .= "color: $color;"; + } + } + + register_shutdown_function(array(&$this, '_Log_win')); + } + + /** + * Destructor + */ + function _Log_win() + { + if ($this->_opened || (count($this->_buffer) > 0)) { + $this->close(); + } + } + + /** + * The first time open() is called, it will open a new browser window and + * prepare it for output. + * + * This is implicitly called by log(), if necessary. + * + * @access public + */ + function open() + { + if (!$this->_opened) { + $win = $this->_name; + $styles = $this->_styles; + + if (!empty($this->_ident)) { + $identHeader = "$win.document.writeln('Ident')"; + } else { + $identHeader = ''; + } + + echo <<< EOT + +EOT; + $this->_opened = true; + } + + return $this->_opened; + } + + /** + * Closes the output stream if it is open. If there are still pending + * lines in the output buffer, the output window will be opened so that + * the buffer can be drained. + * + * @access public + */ + function close() + { + /* + * If there are still lines waiting to be written, open the output + * window so that we can drain the buffer. + */ + if (!$this->_opened && (count($this->_buffer) > 0)) { + $this->open(); + } + + if ($this->_opened) { + $this->_writeln(''); + $this->_writeln(''); + $this->_drainBuffer(); + $this->_opened = false; + } + + return ($this->_opened === false); + } + + /** + * Writes the contents of the output buffer to the output window. + * + * @access private + */ + function _drainBuffer() + { + $win = $this->_name; + foreach ($this->_buffer as $line) { + echo "\n"; + } + + /* Now that the buffer has been drained, clear it. */ + $this->_buffer = array(); + } + + /** + * Writes a single line of text to the output buffer. + * + * @param string $line The line of text to write. + * + * @access private + */ + function _writeln($line) + { + /* Add this line to our output buffer. */ + $this->_buffer[] = $line; + + /* Buffer the output until this page's headers have been sent. */ + if (!headers_sent()) { + return; + } + + /* If we haven't already opened the output window, do so now. */ + if (!$this->_opened && !$this->open()) { + return; + } + + /* Drain the buffer to the output window. */ + $this->_drainBuffer(); + } + + /** + * Logs $message to the output window. The message is also passed along + * to any Log_observer instances that are observing this Log. + * + * @param mixed $message String or object containing the message to log. + * @param string $priority The priority of the message. Valid + * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, + * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, + * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. + * @return boolean True on success or false on failure. + * @access public + */ + function log($message, $priority = null) + { + /* If a priority hasn't been specified, use the default value. */ + if ($priority === null) { + $priority = $this->_priority; + } + + /* Abort early if the priority is above the maximum logging level. */ + if (!$this->_isMasked($priority)) { + return false; + } + + /* Extract the string representation of the message. */ + $message = $this->_extractMessage($message); + $message = preg_replace('/\r\n|\n|\r/', '
        ', $message); + + list($usec, $sec) = explode(' ', microtime()); + + /* Build the output line that contains the log entry row. */ + $line = ''; + $line .= sprintf('%s.%s', + strftime('%H:%M:%S', $sec), substr($usec, 2, 2)); + if (!empty($this->_ident)) { + $line .= '' . $this->_ident . ''; + } + $line .= '' . ucfirst($this->priorityToString($priority)) . ''; + $line .= sprintf('%s', $priority, $message); + $line .= ''; + + $this->_writeln($line); + + $this->_announce(array('priority' => $priority, 'message' => $message)); + + return true; + } + +} diff --git a/_piecrust/libs/Markdown/License.text b/_piecrust/libs/Markdown/License.text new file mode 100644 index 0000000..ea90c49 --- /dev/null +++ b/_piecrust/libs/Markdown/License.text @@ -0,0 +1,36 @@ +PHP Markdown +Copyright (c) 2004-2009 Michel Fortin + +All rights reserved. + +Based on Markdown +Copyright (c) 2003-2006 John Gruber + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +* Neither the name "Markdown" nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +This software is provided by the copyright holders and contributors "as +is" and any express or implied warranties, including, but not limited +to, the implied warranties of merchantability and fitness for a +particular purpose are disclaimed. In no event shall the copyright owner +or contributors be liable for any direct, indirect, incidental, special, +exemplary, or consequential damages (including, but not limited to, +procurement of substitute goods or services; loss of use, data, or +profits; or business interruption) however caused and on any theory of +liability, whether in contract, strict liability, or tort (including +negligence or otherwise) arising in any way out of the use of this +software, even if advised of the possibility of such damage. diff --git a/_piecrust/libs/Markdown/PHP Markdown Readme.text b/_piecrust/libs/Markdown/PHP Markdown Readme.text new file mode 100644 index 0000000..db61f2b --- /dev/null +++ b/_piecrust/libs/Markdown/PHP Markdown Readme.text @@ -0,0 +1,770 @@ +PHP Markdown +============ + +Version 1.0.1m - Sat 21 Jun 2008 + +by Michel Fortin + + +based on work by John Gruber + + + +Introduction +------------ + +Markdown is a text-to-HTML conversion tool for web writers. Markdown +allows you to write using an easy-to-read, easy-to-write plain text +format, then convert it to structurally valid XHTML (or HTML). + +"Markdown" is two things: a plain text markup syntax, and a software +tool, written in Perl, that converts the plain text markup to HTML. +PHP Markdown is a port to PHP of the original Markdown program by +John Gruber. + +PHP Markdown can work as a plug-in for WordPress and bBlog, as a +modifier for the Smarty templating engine, or as a remplacement for +textile formatting in any software that support textile. + +Full documentation of Markdown's syntax is available on John's +Markdown page: + + +Installation and Requirement +---------------------------- + +PHP Markdown requires PHP version 4.0.5 or later. + + +### WordPress ### + +PHP Markdown works with [WordPress][wp], version 1.2 or later. + + [wp]: http://wordpress.org/ + +1. To use PHP Markdown with WordPress, place the "makrdown.php" file + in the "plugins" folder. This folder is located inside + "wp-content" at the root of your site: + + (site home)/wp-content/plugins/ + +2. Activate the plugin with the administrative interface of + WordPress. In the "Plugins" section you will now find Markdown. + To activate the plugin, click on the "Activate" button on the + same line than Markdown. Your entries will now be formatted by + PHP Markdown. + +3. To post Markdown content, you'll first have to disable the + "visual" editor in the User section of WordPress. + +You can configure PHP Markdown to not apply to the comments on your +WordPress weblog. See the "Configuration" section below. + +It is not possible at this time to apply a different set of +filters to different entries. All your entries will be formated by +PHP Markdown. This is a limitation of WordPress. If your old entries +are written in HTML (as opposed to another formatting syntax, like +Textile), they'll probably stay fine after installing Markdown. + + +### bBlog ### + +PHP Markdown also works with [bBlog][bb]. + + [bb]: http://www.bblog.com/ + +To use PHP Markdown with bBlog, rename "markdown.php" to +"modifier.markdown.php" and place the file in the "bBlog_plugins" +folder. This folder is located inside the "bblog" directory of +your site, like this: + + (site home)/bblog/bBlog_plugins/modifier.markdown.php + +Select "Markdown" as the "Entry Modifier" when you post a new +entry. This setting will only apply to the entry you are editing. + + +### Replacing Textile in TextPattern ### + +[TextPattern][tp] use [Textile][tx] to format your text. You can +replace Textile by Markdown in TextPattern without having to change +any code by using the *Texitle Compatibility Mode*. This may work +with other software that expect Textile too. + + [tx]: http://www.textism.com/tools/textile/ + [tp]: http://www.textpattern.com/ + +1. Rename the "markdown.php" file to "classTextile.php". This will + make PHP Markdown behave as if it was the actual Textile parser. + +2. Replace the "classTextile.php" file TextPattern installed in your + web directory. It can be found in the "lib" directory: + + (site home)/textpattern/lib/ + +Contrary to Textile, Markdown does not convert quotes to curly ones +and does not convert multiple hyphens (`--` and `---`) into en- and +em-dashes. If you use PHP Markdown in Textile Compatibility Mode, you +can solve this problem by installing the "smartypants.php" file from +[PHP SmartyPants][psp] beside the "classTextile.php" file. The Textile +Compatibility Mode function will use SmartyPants automatically without +further modification. + + [psp]: http://michelf.com/projects/php-smartypants/ + + +### Updating Markdown in Other Programs ### + +Many web applications now ship with PHP Markdown, or have plugins to +perform the conversion to HTML. You can update PHP Markdown in many of +these programs by swapping the old "markdown.php" file for the new one. + +Here is a short non-exhaustive list of some programs and where they +hide the "markdown.php" file. + +| Program | Path to Markdown +| ------- | ---------------- +| [Pivot][] | `(site home)/pivot/includes/markdown/markdown.php` + +If you're unsure if you can do this with your application, ask the +developer, or wait for the developer to update his application or +plugin with the new version of PHP Markdown. + + [Pivot]: http://pivotlog.net/ + + +### In Your Own Programs ### + +You can use PHP Markdown easily in your current PHP program. Simply +include the file and then call the Markdown function on the text you +want to convert: + + include_once "markdown.php"; + $my_html = Markdown($my_text); + +If you wish to use PHP Markdown with another text filter function +built to parse HTML, you should filter the text *after* the Markdown +function call. This is an example with [PHP SmartyPants][psp]: + + $my_html = SmartyPants(Markdown($my_text)); + + +### With Smarty ### + +If your program use the [Smarty][sm] template engine, PHP Markdown +can now be used as a modifier for your templates. Rename "markdown.php" +to "modifier.markdown.php" and put it in your smarty plugins folder. + + [sm]: http://smarty.php.net/ + +If you are using MovableType 3.1 or later, the Smarty plugin folder is +located at `(MT CGI root)/php/extlib/smarty/plugins`. This will allow +Markdown to work on dynamic pages. + + +Configuration +------------- + +By default, PHP Markdown produces XHTML output for tags with empty +elements. E.g.: + +
        + +Markdown can be configured to produce HTML-style tags; e.g.: + +
        + +To do this, you must edit the "MARKDOWN_EMPTY_ELEMENT_SUFFIX" +definition below the "Global default settings" header at the start of +the "markdown.php" file. + + +### WordPress-Specific Settings ### + +By default, the Markdown plugin applies to both posts and comments on +your WordPress weblog. To deactivate one or the other, edit the +`MARKDOWN_WP_POSTS` or `MARKDOWN_WP_COMMENTS` definitions under the +"WordPress settings" header at the start of the "markdown.php" file. + + +Bugs +---- + +To file bug reports please send email to: + + +Please include with your report: (1) the example input; (2) the output you +expected; (3) the output PHP Markdown actually produced. + + +Version History +--------------- + +1.0.1n (10 Oct 2009): + +* Enabled reference-style shortcut links. Now you can write reference-style + links with less brakets: + + This is [my website]. + + [my website]: http://example.com/ + + This was added in the 1.0.2 betas, but commented out in the 1.0.1 branch, + waiting for the feature to be officialized. [But half of the other Markdown + implementations are supporting this syntax][half], so it makes sense for + compatibility's sake to allow it in PHP Markdown too. + + [half]: http://babelmark.bobtfish.net/?markdown=This+is+%5Bmy+website%5D.%0D%0A%09%09%0D%0A%5Bmy+website%5D%3A+http%3A%2F%2Fexample.com%2F%0D%0A&src=1&dest=2 + +* Now accepting many valid email addresses in autolinks that were + previously rejected, such as: + + + + <"abc@def"@example.com> + <"Fred Bloggs"@example.com> + + +* Now accepting spaces in URLs for inline and reference-style links. Such + URLs need to be surrounded by angle brakets. For instance: + + [link text]( "optional title") + + [link text][ref] + [ref]: "optional title" + + There is still a quirk which may prevent this from working correctly with + relative URLs in inline-style links however. + +* Fix for adjacent list of different kind where the second list could + end as a sublist of the first when not separated by an empty line. + +* Fixed a bug where inline-style links wouldn't be recognized when the link + definition contains a line break between the url and the title. + +* Fixed a bug where tags where the name contains an underscore aren't parsed + correctly. + +* Fixed some corner-cases mixing underscore-ephasis and asterisk-emphasis. + + +1.0.1m (21 Jun 2008): + +* Lists can now have empty items. + +* Rewrote the emphasis and strong emphasis parser to fix some issues + with odly placed and overlong markers. + + +1.0.1l (11 May 2008): + +* Now removing the UTF-8 BOM at the start of a document, if present. + +* Now accepting capitalized URI schemes (such as HTTP:) in automatic + links, such as ``. + +* Fixed a problem where `` was seen as a horizontal + rule instead of an automatic link. + +* Fixed an issue where some characters in Markdown-generated HTML + attributes weren't properly escaped with entities. + +* Fix for code blocks as first element of a list item. Previously, + this didn't create any code block for item 2: + + * Item 1 (regular paragraph) + + * Item 2 (code block) + +* A code block starting on the second line of a document wasn't seen + as a code block. This has been fixed. + +* Added programatically-settable parser properties `predef_urls` and + `predef_titles` for predefined URLs and titles for reference-style + links. To use this, your PHP code must call the parser this way: + + $parser = new Markdwon_Parser; + $parser->predef_urls = array('linkref' => 'http://example.com'); + $html = $parser->transform($text); + + You can then use the URL as a normal link reference: + + [my link][linkref] + [my link][linkRef] + + Reference names in the parser properties *must* be lowercase. + Reference names in the Markdown source may have any case. + +* Added `setup` and `teardown` methods which can be used by subclassers + as hook points to arrange the state of some parser variables before and + after parsing. + + +1.0.1k (26 Sep 2007): + +* Fixed a problem introduced in 1.0.1i where three or more identical + uppercase letters, as well as a few other symbols, would trigger + a horizontal line. + + +1.0.1j (4 Sep 2007): + +* Fixed a problem introduced in 1.0.1i where the closing `code` and + `pre` tags at the end of a code block were appearing in the wrong + order. + +* Overriding configuration settings by defining constants from an + external before markdown.php is included is now possible without + producing a PHP warning. + + +1.0.1i (31 Aug 2007): + +* Fixed a problem where an escaped backslash before a code span + would prevent the code span from being created. This should now + work as expected: + + Litteral backslash: \\`code span` + +* Overall speed improvements, especially with long documents. + + +1.0.1h (3 Aug 2007): + +* Added two properties (`no_markup` and `no_entities`) to the parser + allowing HTML tags and entities to be disabled. + +* Fix for a problem introduced in 1.0.1g where posting comments in + WordPress would trigger PHP warnings and cause some markup to be + incorrectly filtered by the kses filter in WordPress. + + +1.0.1g (3 Jul 2007): + +* Fix for PHP 5 compiled without the mbstring module. Previous fix to + calculate the length of UTF-8 strings in `detab` when `mb_strlen` is + not available was only working with PHP 4. + +* Fixed a problem with WordPress 2.x where full-content posts in RSS feeds + were not processed correctly by Markdown. + +* Now supports URLs containing literal parentheses for inline links + and images, such as: + + [WIMP](http://en.wikipedia.org/wiki/WIMP_(computing)) + + Such parentheses may be arbitrarily nested, but must be + balanced. Unbalenced parentheses are allowed however when the URL + when escaped or when the URL is enclosed in angle brakets `<>`. + +* Fixed a performance problem where the regular expression for strong + emphasis introduced in version 1.0.1d could sometime be long to process, + give slightly wrong results, and in some circumstances could remove + entirely the content for a whole paragraph. + +* Some change in version 1.0.1d made possible the incorrect nesting of + anchors within each other. This is now fixed. + +* Fixed a rare issue where certain MD5 hashes in the content could + be changed to their corresponding text. For instance, this: + + The MD5 value for "+" is "26b17225b626fb9238849fd60eabdf60". + + was incorrectly changed to this in previous versions of PHP Markdown: + +

        The MD5 value for "+" is "+".

        + +* Now convert escaped characters to their numeric character + references equivalent. + + This fix an integration issue with SmartyPants and backslash escapes. + Since Markdown and SmartyPants have some escapable characters in common, + it was sometime necessary to escape them twice. Previously, two + backslashes were sometime required to prevent Markdown from "eating" the + backslash before SmartyPants sees it: + + Here are two hyphens: \\-- + + Now, only one backslash will do: + + Here are two hyphens: \-- + + +1.0.1f (7 Feb 2007): + +* Fixed an issue with WordPress where manually-entered excerpts, but + not the auto-generated ones, would contain nested paragraphs. + +* Fixed an issue introduced in 1.0.1d where headers and blockquotes + preceded too closely by a paragraph (not separated by a blank line) + where incorrectly put inside the paragraph. + +* Fixed an issue introduced in 1.0.1d in the tokenizeHTML method where + two consecutive code spans would be merged into one when together they + form a valid tag in a multiline paragraph. + +* Fixed an long-prevailing issue where blank lines in code blocks would + be doubled when the code block is in a list item. + + This was due to the list processing functions relying on artificially + doubled blank lines to correctly determine when list items should + contain block-level content. The list item processing model was thus + changed to avoid the need for double blank lines. + +* Fixed an issue with `<% asp-style %>` instructions used as inline + content where the opening `<` was encoded as `<`. + +* Fixed a parse error occuring when PHP is configured to accept + ASP-style delimiters as boundaries for PHP scripts. + +* Fixed a bug introduced in 1.0.1d where underscores in automatic links + got swapped with emphasis tags. + + +1.0.1e (28 Dec 2006) + +* Added support for internationalized domain names for email addresses in + automatic link. Improved the speed at which email addresses are converted + to entities. Thanks to Milian Wolff for his optimisations. + +* Made deterministic the conversion to entities of email addresses in + automatic links. This means that a given email address will always be + encoded the same way. + +* PHP Markdown will now use its own function to calculate the length of an + UTF-8 string in `detab` when `mb_strlen` is not available instead of + giving a fatal error. + + +1.0.1d (1 Dec 2006) + +* Fixed a bug where inline images always had an empty title attribute. The + title attribute is now present only when explicitly defined. + +* Link references definitions can now have an empty title, previously if the + title was defined but left empty the link definition was ignored. This can + be useful if you want an empty title attribute in images to hide the + tooltip in Internet Explorer. + +* Made `detab` aware of UTF-8 characters. UTF-8 multi-byte sequences are now + correctly mapped to one character instead of the number of bytes. + +* Fixed a small bug with WordPress where WordPress' default filter `wpautop` + was not properly deactivated on comment text, resulting in hard line breaks + where Markdown do not prescribes them. + +* Added a `TextileRestrited` method to the textile compatibility mode. There + is no restriction however, as Markdown does not have a restricted mode at + this point. This should make PHP Markdown work again in the latest + versions of TextPattern. + +* Converted PHP Markdown to a object-oriented design. + +* Changed span and block gamut methods so that they loop over a + customizable list of methods. This makes subclassing the parser a more + interesting option for creating syntax extensions. + +* Also added a "document" gamut loop which can be used to hook document-level + methods (like for striping link definitions). + +* Changed all methods which were inserting HTML code so that they now return + a hashed representation of the code. New methods `hashSpan` and `hashBlock` + are used to hash respectivly span- and block-level generated content. This + has a couple of significant effects: + + 1. It prevents invalid nesting of Markdown-generated elements which + could occur occuring with constructs like `*something [link*][1]`. + 2. It prevents problems occuring with deeply nested lists on which + paragraphs were ill-formed. + 3. It removes the need to call `hashHTMLBlocks` twice during the the + block gamut. + + Hashes are turned back to HTML prior output. + +* Made the block-level HTML parser smarter using a specially-crafted regular + expression capable of handling nested tags. + +* Solved backtick issues in tag attributes by rewriting the HTML tokenizer to + be aware of code spans. All these lines should work correctly now: + + bar + bar + `` + +* Changed the parsing of HTML comments to match simply from `` + instead using of the more complicated SGML-style rule with paired `--`. + This is how most browsers parse comments and how XML defines them too. + +* `
        ` has been added to the list of block-level elements and is now + treated as an HTML block instead of being wrapped within paragraph tags. + +* Now only trim trailing newlines from code blocks, instead of trimming + all trailing whitespace characters. + +* Fixed bug where this: + + [text](http://m.com "title" ) + + wasn't working as expected, because the parser wasn't allowing for spaces + before the closing paren. + +* Filthy hack to support markdown='1' in div tags. + +* _DoAutoLinks() now supports the 'dict://' URL scheme. + +* PHP- and ASP-style processor instructions are now protected as + raw HTML blocks. + + + <% ... %> + +* Fix for escaped backticks still triggering code spans: + + There are two raw backticks here: \` and here: \`, not a code span + + +1.0.1c (9 Dec 2005) + +* Fixed a problem occurring with PHP 5.1.1 due to a small + change to strings variable replacement behaviour in + this version. + + +1.0.1b (6 Jun 2005) + +* Fixed a bug where an inline image followed by a reference link would + give a completely wrong result. + +* Fix for escaped backticks still triggering code spans: + + There are two raw backticks here: \` and here: \`, not a code span + +* Fix for an ordered list following an unordered list, and the + reverse. There is now a loop in _DoList that does the two + separately. + +* Fix for nested sub-lists in list-paragraph mode. Previously we got + a spurious extra level of `

        ` tags for something like this: + + * this + + * sub + + that + +* Fixed some incorrect behaviour with emphasis. This will now work + as it should: + + *test **thing*** + **test *thing*** + ***thing* test** + ***thing** test* + + Name: __________ + Address: _______ + +* Correct a small bug in `_TokenizeHTML` where a Doctype declaration + was not seen as HTML. + +* Major rewrite of the WordPress integration code that should + correct many problems by preventing default WordPress filters from + tampering with Markdown-formatted text. More details here: + + + +1.0.1a (15 Apr 2005) + +* Fixed an issue where PHP warnings were trigged when converting + text with list items running on PHP 4.0.6. This was comming from + the `rtrim` function which did not support the second argument + prior version 4.1. Replaced by a regular expression. + +* Markdown now filter correctly post excerpts and comment + excerpts in WordPress. + +* Automatic links and some code sample were "corrected" by + the balenceTag filter in WordPress meant to ensure HTML + is well formed. This new version of PHP Markdown postpone this + filter so that it runs after Markdown. + +* Blockquote syntax and some code sample were stripped by + a new WordPress 1.5 filter meant to remove unwanted HTML + in comments. This new version of PHP Markdown postpone this + filter so that it runs after Markdown. + + +1.0.1 (16 Dec 2004): + +* Changed the syntax rules for code blocks and spans. Previously, + backslash escapes for special Markdown characters were processed + everywhere other than within inline HTML tags. Now, the contents of + code blocks and spans are no longer processed for backslash escapes. + This means that code blocks and spans are now treated literally, + with no special rules to worry about regarding backslashes. + + **IMPORTANT**: This breaks the syntax from all previous versions of + Markdown. Code blocks and spans involving backslash characters will + now generate different output than before. + + Implementation-wise, this change was made by moving the call to + `_EscapeSpecialChars()` from the top-level `Markdown()` function to + within `_RunSpanGamut()`. + +* Significants performance improvement in `_DoHeader`, `_Detab` + and `_TokenizeHTML`. + +* Added `>`, `+`, and `-` to the list of backslash-escapable + characters. These should have been done when these characters + were added as unordered list item markers. + +* Inline links using `<` and `>` URL delimiters weren't working: + + like [this]() + + Fixed by moving `_DoAutoLinks()` after `_DoAnchors()` in + `_RunSpanGamut()`. + +* Fixed bug where auto-links were being processed within code spans: + + like this: `` + + Fixed by moving `_DoAutoLinks()` from `_RunBlockGamut()` to + `_RunSpanGamut()`. + +* Sort-of fixed a bug where lines in the middle of hard-wrapped + paragraphs, which lines look like the start of a list item, + would accidentally trigger the creation of a list. E.g. a + paragraph that looked like this: + + I recommend upgrading to version + 8. Oops, now this line is treated + as a sub-list. + + This is fixed for top-level lists, but it can still happen for + sub-lists. E.g., the following list item will not be parsed + properly: + + * I recommend upgrading to version + 8. Oops, now this line is treated + as a sub-list. + + Given Markdown's list-creation rules, I'm not sure this can + be fixed. + +* Fix for horizontal rules preceded by 2 or 3 spaces or followed by + trailing spaces and tabs. + +* Standalone HTML comments are now handled; previously, they'd get + wrapped in a spurious `

        ` tag. + +* `_HashHTMLBlocks()` now tolerates trailing spaces and tabs following + HTML comments and `


        ` tags. + +* Changed special case pattern for hashing `
        ` tags in + `_HashHTMLBlocks()` so that they must occur within three spaces + of left margin. (With 4 spaces or a tab, they should be + code blocks, but weren't before this fix.) + +* Auto-linked email address can now optionally contain + a 'mailto:' protocol. I.e. these are equivalent: + + + + +* Fixed annoying bug where nested lists would wind up with + spurious (and invalid) `

        ` tags. + +* Changed `_StripLinkDefinitions()` so that link definitions must + occur within three spaces of the left margin. Thus if you indent + a link definition by four spaces or a tab, it will now be a code + block. + +* You can now write empty links: + + [like this]() + + and they'll be turned into anchor tags with empty href attributes. + This should have worked before, but didn't. + +* `***this***` and `___this___` are now turned into + + this + + Instead of + + this + + which isn't valid. + +* Fixed problem for links defined with urls that include parens, e.g.: + + [1]: http://sources.wikipedia.org/wiki/Middle_East_Policy_(Chomsky) + + "Chomsky" was being erroneously treated as the URL's title. + +* Double quotes in the title of an inline link used to give strange + results (incorrectly made entities). Fixed. + +* Tabs are now correctly changed into spaces. Previously, only + the first tab was converted. In code blocks, the second one was too, + but was not always correctly aligned. + +* Fixed a bug where a tab character inserted after a quote on the same + line could add a slash before the quotes. + + This is "before" [tab] and "after" a tab. + + Previously gave this result: + +

        This is \"before\" [tab] and "after" a tab.

        + +* Removed a call to `htmlentities`. This fixes a bug where multibyte + characters present in the title of a link reference could lead to + invalid utf-8 characters. + +* Changed a regular expression in `_TokenizeHTML` that could lead to + a segmentation fault with PHP 4.3.8 on Linux. + +* Fixed some notices that could show up if PHP error reporting + E_NOTICE flag was set. + + +Copyright and License +--------------------- + +PHP Markdown +Copyright (c) 2004-2009 Michel Fortin + +All rights reserved. + +Based on Markdown +Copyright (c) 2003-2006 John Gruber + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +* Neither the name "Markdown" nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +This software is provided by the copyright holders and contributors "as +is" and any express or implied warranties, including, but not limited +to, the implied warranties of merchantability and fitness for a +particular purpose are disclaimed. In no event shall the copyright owner +or contributors be liable for any direct, indirect, incidental, special, +exemplary, or consequential damages (including, but not limited to, +procurement of substitute goods or services; loss of use, data, or +profits; or business interruption) however caused and on any theory of +liability, whether in contract, strict liability, or tort (including +negligence or otherwise) arising in any way out of the use of this +software, even if advised of the possibility of such damage. diff --git a/_piecrust/libs/Markdown/markdown.php b/_piecrust/libs/Markdown/markdown.php new file mode 100644 index 0000000..dd1b9e5 --- /dev/null +++ b/_piecrust/libs/Markdown/markdown.php @@ -0,0 +1,1732 @@ + +# +# Original Markdown +# Copyright (c) 2004-2006 John Gruber +# +# + + +define( 'MARKDOWN_VERSION', "1.0.1n" ); # Sat 10 Oct 2009 + + +# +# Global default settings: +# + +# Change to ">" for HTML output +@define( 'MARKDOWN_EMPTY_ELEMENT_SUFFIX', " />"); + +# Define the width of a tab for code blocks. +@define( 'MARKDOWN_TAB_WIDTH', 4 ); + + +# +# WordPress settings: +# + +# Change to false to remove Markdown from posts and/or comments. +@define( 'MARKDOWN_WP_POSTS', true ); +@define( 'MARKDOWN_WP_COMMENTS', true ); + + + +### Standard Function Interface ### + +@define( 'MARKDOWN_PARSER_CLASS', 'Markdown_Parser' ); + +function Markdown($text) { +# +# Initialize the parser and return the result of its transform method. +# + # Setup static parser variable. + static $parser; + if (!isset($parser)) { + $parser_class = MARKDOWN_PARSER_CLASS; + $parser = new $parser_class; + } + + # Transform text using parser. + return $parser->transform($text); +} + + +### WordPress Plugin Interface ### + +/* +Plugin Name: Markdown +Plugin URI: http://michelf.com/projects/php-markdown/ +Description: Markdown syntax allows you to write using an easy-to-read, easy-to-write plain text format. Based on the original Perl version by John Gruber. More... +Version: 1.0.1n +Author: Michel Fortin +Author URI: http://michelf.com/ +*/ + +if (isset($wp_version)) { + # More details about how it works here: + # + + # Post content and excerpts + # - Remove WordPress paragraph generator. + # - Run Markdown on excerpt, then remove all tags. + # - Add paragraph tag around the excerpt, but remove it for the excerpt rss. + if (MARKDOWN_WP_POSTS) { + remove_filter('the_content', 'wpautop'); + remove_filter('the_content_rss', 'wpautop'); + remove_filter('the_excerpt', 'wpautop'); + add_filter('the_content', 'Markdown', 6); + add_filter('the_content_rss', 'Markdown', 6); + add_filter('get_the_excerpt', 'Markdown', 6); + add_filter('get_the_excerpt', 'trim', 7); + add_filter('the_excerpt', 'mdwp_add_p'); + add_filter('the_excerpt_rss', 'mdwp_strip_p'); + + remove_filter('content_save_pre', 'balanceTags', 50); + remove_filter('excerpt_save_pre', 'balanceTags', 50); + add_filter('the_content', 'balanceTags', 50); + add_filter('get_the_excerpt', 'balanceTags', 9); + } + + # Comments + # - Remove WordPress paragraph generator. + # - Remove WordPress auto-link generator. + # - Scramble important tags before passing them to the kses filter. + # - Run Markdown on excerpt then remove paragraph tags. + if (MARKDOWN_WP_COMMENTS) { + remove_filter('comment_text', 'wpautop', 30); + remove_filter('comment_text', 'make_clickable'); + add_filter('pre_comment_content', 'Markdown', 6); + add_filter('pre_comment_content', 'mdwp_hide_tags', 8); + add_filter('pre_comment_content', 'mdwp_show_tags', 12); + add_filter('get_comment_text', 'Markdown', 6); + add_filter('get_comment_excerpt', 'Markdown', 6); + add_filter('get_comment_excerpt', 'mdwp_strip_p', 7); + + global $mdwp_hidden_tags, $mdwp_placeholders; + $mdwp_hidden_tags = explode(' ', + '

         
      1. '); + $mdwp_placeholders = explode(' ', str_rot13( + 'pEj07ZbbBZ U1kqgh4w4p pre2zmeN6K QTi31t9pre ol0MP1jzJR '. + 'ML5IjmbRol ulANi1NsGY J7zRLJqPul liA8ctl16T K9nhooUHli')); + } + + function mdwp_add_p($text) { + if (!preg_match('{^$|^<(p|ul|ol|dl|pre|blockquote)>}i', $text)) { + $text = '

        '.$text.'

        '; + $text = preg_replace('{\n{2,}}', "

        \n\n

        ", $text); + } + return $text; + } + + function mdwp_strip_p($t) { return preg_replace('{}i', '', $t); } + + function mdwp_hide_tags($text) { + global $mdwp_hidden_tags, $mdwp_placeholders; + return str_replace($mdwp_hidden_tags, $mdwp_placeholders, $text); + } + function mdwp_show_tags($text) { + global $mdwp_hidden_tags, $mdwp_placeholders; + return str_replace($mdwp_placeholders, $mdwp_hidden_tags, $text); + } +} + + +### bBlog Plugin Info ### + +function identify_modifier_markdown() { + return array( + 'name' => 'markdown', + 'type' => 'modifier', + 'nicename' => 'Markdown', + 'description' => 'A text-to-HTML conversion tool for web writers', + 'authors' => 'Michel Fortin and John Gruber', + 'licence' => 'BSD-like', + 'version' => MARKDOWN_VERSION, + 'help' => 'Markdown syntax allows you to write using an easy-to-read, easy-to-write plain text format. Based on the original Perl version by John Gruber. More...' + ); +} + + +### Smarty Modifier Interface ### + +function smarty_modifier_markdown($text) { + return Markdown($text); +} + + +### Textile Compatibility Mode ### + +# Rename this file to "classTextile.php" and it can replace Textile everywhere. + +if (strcasecmp(substr(__FILE__, -16), "classTextile.php") == 0) { + # Try to include PHP SmartyPants. Should be in the same directory. + @include_once 'smartypants.php'; + # Fake Textile class. It calls Markdown instead. + class Textile { + function TextileThis($text, $lite='', $encode='') { + if ($lite == '' && $encode == '') $text = Markdown($text); + if (function_exists('SmartyPants')) $text = SmartyPants($text); + return $text; + } + # Fake restricted version: restrictions are not supported for now. + function TextileRestricted($text, $lite='', $noimage='') { + return $this->TextileThis($text, $lite); + } + # Workaround to ensure compatibility with TextPattern 4.0.3. + function blockLite($text) { return $text; } + } +} + + + +# +# Markdown Parser Class +# + +class Markdown_Parser { + + # Regex to match balanced [brackets]. + # Needed to insert a maximum bracked depth while converting to PHP. + var $nested_brackets_depth = 6; + var $nested_brackets_re; + + var $nested_url_parenthesis_depth = 4; + var $nested_url_parenthesis_re; + + # Table of hash values for escaped characters: + var $escape_chars = '\`*_{}[]()>#+-.!'; + var $escape_chars_re; + + # Change to ">" for HTML output. + var $empty_element_suffix = MARKDOWN_EMPTY_ELEMENT_SUFFIX; + var $tab_width = MARKDOWN_TAB_WIDTH; + + # Change to `true` to disallow markup or entities. + var $no_markup = false; + var $no_entities = false; + + # Predefined urls and titles for reference links and images. + var $predef_urls = array(); + var $predef_titles = array(); + + + function Markdown_Parser() { + # + # Constructor function. Initialize appropriate member variables. + # + $this->_initDetab(); + $this->prepareItalicsAndBold(); + + $this->nested_brackets_re = + str_repeat('(?>[^\[\]]+|\[', $this->nested_brackets_depth). + str_repeat('\])*', $this->nested_brackets_depth); + + $this->nested_url_parenthesis_re = + str_repeat('(?>[^()\s]+|\(', $this->nested_url_parenthesis_depth). + str_repeat('(?>\)))*', $this->nested_url_parenthesis_depth); + + $this->escape_chars_re = '['.preg_quote($this->escape_chars).']'; + + # Sort document, block, and span gamut in ascendent priority order. + asort($this->document_gamut); + asort($this->block_gamut); + asort($this->span_gamut); + } + + + # Internal hashes used during transformation. + var $urls = array(); + var $titles = array(); + var $html_hashes = array(); + + # Status flag to avoid invalid nesting. + var $in_anchor = false; + + + function setup() { + # + # Called before the transformation process starts to setup parser + # states. + # + # Clear global hashes. + $this->urls = $this->predef_urls; + $this->titles = $this->predef_titles; + $this->html_hashes = array(); + + $in_anchor = false; + } + + function teardown() { + # + # Called after the transformation process to clear any variable + # which may be taking up memory unnecessarly. + # + $this->urls = array(); + $this->titles = array(); + $this->html_hashes = array(); + } + + + function transform($text) { + # + # Main function. Performs some preprocessing on the input text + # and pass it through the document gamut. + # + $this->setup(); + + # Remove UTF-8 BOM and marker character in input, if present. + $text = preg_replace('{^\xEF\xBB\xBF|\x1A}', '', $text); + + # Standardize line endings: + # DOS to Unix and Mac to Unix + $text = preg_replace('{\r\n?}', "\n", $text); + + # Make sure $text ends with a couple of newlines: + $text .= "\n\n"; + + # Convert all tabs to spaces. + $text = $this->detab($text); + + # Turn block-level HTML blocks into hash entries + $text = $this->hashHTMLBlocks($text); + + # Strip any lines consisting only of spaces and tabs. + # This makes subsequent regexen easier to write, because we can + # match consecutive blank lines with /\n+/ instead of something + # contorted like /[ ]*\n+/ . + $text = preg_replace('/^[ ]+$/m', '', $text); + + # Run document gamut methods. + foreach ($this->document_gamut as $method => $priority) { + $text = $this->$method($text); + } + + $this->teardown(); + + return $text . "\n"; + } + + var $document_gamut = array( + # Strip link definitions, store in hashes. + "stripLinkDefinitions" => 20, + + "runBasicBlockGamut" => 30, + ); + + + function stripLinkDefinitions($text) { + # + # Strips link definitions from text, stores the URLs and titles in + # hash references. + # + $less_than_tab = $this->tab_width - 1; + + # Link defs are in the form: ^[id]: url "optional title" + $text = preg_replace_callback('{ + ^[ ]{0,'.$less_than_tab.'}\[(.+)\][ ]?: # id = $1 + [ ]* + \n? # maybe *one* newline + [ ]* + (?: + <(.+?)> # url = $2 + | + (\S+?) # url = $3 + ) + [ ]* + \n? # maybe one newline + [ ]* + (?: + (?<=\s) # lookbehind for whitespace + ["(] + (.*?) # title = $4 + [")] + [ ]* + )? # title is optional + (?:\n+|\Z) + }xm', + array(&$this, '_stripLinkDefinitions_callback'), + $text); + return $text; + } + function _stripLinkDefinitions_callback($matches) { + $link_id = strtolower($matches[1]); + $url = $matches[2] == '' ? $matches[3] : $matches[2]; + $this->urls[$link_id] = $url; + $this->titles[$link_id] =& $matches[4]; + return ''; # String that will replace the block + } + + + function hashHTMLBlocks($text) { + if ($this->no_markup) return $text; + + $less_than_tab = $this->tab_width - 1; + + # Hashify HTML blocks: + # We only want to do this for block-level HTML tags, such as headers, + # lists, and tables. That's because we still want to wrap

        s around + # "paragraphs" that are wrapped in non-block-level tags, such as anchors, + # phrase emphasis, and spans. The list of tags we're looking for is + # hard-coded: + # + # * List "a" is made of tags which can be both inline or block-level. + # These will be treated block-level when the start tag is alone on + # its line, otherwise they're not matched here and will be taken as + # inline later. + # * List "b" is made of tags which are always block-level; + # + $block_tags_a_re = 'ins|del'; + $block_tags_b_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|'. + 'script|noscript|form|fieldset|iframe|math'; + + # Regular expression for the content of a block tag. + $nested_tags_level = 4; + $attr = ' + (?> # optional tag attributes + \s # starts with whitespace + (?> + [^>"/]+ # text outside quotes + | + /+(?!>) # slash not followed by ">" + | + "[^"]*" # text inside double quotes (tolerate ">") + | + \'[^\']*\' # text inside single quotes (tolerate ">") + )* + )? + '; + $content = + str_repeat(' + (?> + [^<]+ # content without tag + | + <\2 # nested opening tag + '.$attr.' # attributes + (?> + /> + | + >', $nested_tags_level). # end of opening tag + '.*?'. # last level nested tag content + str_repeat(' + # closing nested tag + ) + | + <(?!/\2\s*> # other tags with a different name + ) + )*', + $nested_tags_level); + $content2 = str_replace('\2', '\3', $content); + + # First, look for nested blocks, e.g.: + #

        + #
        + # tags for inner block must be indented. + #
        + #
        + # + # The outermost tags must start at the left margin for this to match, and + # the inner nested divs must be indented. + # We need to do this before the next, more liberal match, because the next + # match will start at the first `
        ` and stop at the first `
        `. + $text = preg_replace_callback('{(?> + (?> + (?<=\n\n) # Starting after a blank line + | # or + \A\n? # the beginning of the doc + ) + ( # save in $1 + + # Match from `\n` to `\n`, handling nested tags + # in between. + + [ ]{0,'.$less_than_tab.'} + <('.$block_tags_b_re.')# start tag = $2 + '.$attr.'> # attributes followed by > and \n + '.$content.' # content, support nesting + # the matching end tag + [ ]* # trailing spaces/tabs + (?=\n+|\Z) # followed by a newline or end of document + + | # Special version for tags of group a. + + [ ]{0,'.$less_than_tab.'} + <('.$block_tags_a_re.')# start tag = $3 + '.$attr.'>[ ]*\n # attributes followed by > + '.$content2.' # content, support nesting + # the matching end tag + [ ]* # trailing spaces/tabs + (?=\n+|\Z) # followed by a newline or end of document + + | # Special case just for
        . It was easier to make a special + # case than to make the other regex more complicated. + + [ ]{0,'.$less_than_tab.'} + <(hr) # start tag = $2 + '.$attr.' # attributes + /?> # the matching end tag + [ ]* + (?=\n{2,}|\Z) # followed by a blank line or end of document + + | # Special case for standalone HTML comments: + + [ ]{0,'.$less_than_tab.'} + (?s: + + ) + [ ]* + (?=\n{2,}|\Z) # followed by a blank line or end of document + + | # PHP and ASP-style processor instructions ( + ) + [ ]* + (?=\n{2,}|\Z) # followed by a blank line or end of document + + ) + )}Sxmi', + array(&$this, '_hashHTMLBlocks_callback'), + $text); + + return $text; + } + function _hashHTMLBlocks_callback($matches) { + $text = $matches[1]; + $key = $this->hashBlock($text); + return "\n\n$key\n\n"; + } + + + function hashPart($text, $boundary = 'X') { + # + # Called whenever a tag must be hashed when a function insert an atomic + # element in the text stream. Passing $text to through this function gives + # a unique text-token which will be reverted back when calling unhash. + # + # The $boundary argument specify what character should be used to surround + # the token. By convension, "B" is used for block elements that needs not + # to be wrapped into paragraph tags at the end, ":" is used for elements + # that are word separators and "X" is used in the general case. + # + # Swap back any tag hash found in $text so we do not have to `unhash` + # multiple times at the end. + $text = $this->unhash($text); + + # Then hash the block. + static $i = 0; + $key = "$boundary\x1A" . ++$i . $boundary; + $this->html_hashes[$key] = $text; + return $key; # String that will replace the tag. + } + + + function hashBlock($text) { + # + # Shortcut function for hashPart with block-level boundaries. + # + return $this->hashPart($text, 'B'); + } + + + var $block_gamut = array( + # + # These are all the transformations that form block-level + # tags like paragraphs, headers, and list items. + # + "doHeaders" => 10, + "doHorizontalRules" => 20, + + "doLists" => 40, + "doCodeBlocks" => 50, + "doBlockQuotes" => 60, + ); + + function runBlockGamut($text) { + # + # Run block gamut tranformations. + # + # We need to escape raw HTML in Markdown source before doing anything + # else. This need to be done for each block, and not only at the + # begining in the Markdown function since hashed blocks can be part of + # list items and could have been indented. Indented blocks would have + # been seen as a code block in a previous pass of hashHTMLBlocks. + $text = $this->hashHTMLBlocks($text); + + return $this->runBasicBlockGamut($text); + } + + function runBasicBlockGamut($text) { + # + # Run block gamut tranformations, without hashing HTML blocks. This is + # useful when HTML blocks are known to be already hashed, like in the first + # whole-document pass. + # + foreach ($this->block_gamut as $method => $priority) { + $text = $this->$method($text); + } + + # Finally form paragraph and restore hashed blocks. + $text = $this->formParagraphs($text); + + return $text; + } + + + function doHorizontalRules($text) { + # Do Horizontal Rules: + return preg_replace( + '{ + ^[ ]{0,3} # Leading space + ([-*_]) # $1: First marker + (?> # Repeated marker group + [ ]{0,2} # Zero, one, or two spaces. + \1 # Marker character + ){2,} # Group repeated at least twice + [ ]* # Tailing spaces + $ # End of line. + }mx', + "\n".$this->hashBlock("empty_element_suffix")."\n", + $text); + } + + + var $span_gamut = array( + # + # These are all the transformations that occur *within* block-level + # tags like paragraphs, headers, and list items. + # + # Process character escapes, code spans, and inline HTML + # in one shot. + "parseSpan" => -30, + + # Process anchor and image tags. Images must come first, + # because ![foo][f] looks like an anchor. + "doImages" => 10, + "doAnchors" => 20, + + # Make links out of things like `` + # Must come after doAnchors, because you can use < and > + # delimiters in inline links like [this](). + "doAutoLinks" => 30, + "encodeAmpsAndAngles" => 40, + + "doItalicsAndBold" => 50, + "doHardBreaks" => 60, + ); + + function runSpanGamut($text) { + # + # Run span gamut tranformations. + # + foreach ($this->span_gamut as $method => $priority) { + $text = $this->$method($text); + } + + return $text; + } + + + function doHardBreaks($text) { + # Do hard breaks: + return preg_replace_callback('/ {2,}\n/', + array(&$this, '_doHardBreaks_callback'), $text); + } + function _doHardBreaks_callback($matches) { + return $this->hashPart("empty_element_suffix\n"); + } + + + function doAnchors($text) { + # + # Turn Markdown link shortcuts into XHTML tags. + # + if ($this->in_anchor) return $text; + $this->in_anchor = true; + + # + # First, handle reference-style links: [link text] [id] + # + $text = preg_replace_callback('{ + ( # wrap whole match in $1 + \[ + ('.$this->nested_brackets_re.') # link text = $2 + \] + + [ ]? # one optional space + (?:\n[ ]*)? # one optional newline followed by spaces + + \[ + (.*?) # id = $3 + \] + ) + }xs', + array(&$this, '_doAnchors_reference_callback'), $text); + + # + # Next, inline-style links: [link text](url "optional title") + # + $text = preg_replace_callback('{ + ( # wrap whole match in $1 + \[ + ('.$this->nested_brackets_re.') # link text = $2 + \] + \( # literal paren + [ \n]* + (?: + <(.+?)> # href = $3 + | + ('.$this->nested_url_parenthesis_re.') # href = $4 + ) + [ \n]* + ( # $5 + ([\'"]) # quote char = $6 + (.*?) # Title = $7 + \6 # matching quote + [ \n]* # ignore any spaces/tabs between closing quote and ) + )? # title is optional + \) + ) + }xs', + array(&$this, '_doAnchors_inline_callback'), $text); + + # + # Last, handle reference-style shortcuts: [link text] + # These must come last in case you've also got [link text][1] + # or [link text](/foo) + # + $text = preg_replace_callback('{ + ( # wrap whole match in $1 + \[ + ([^\[\]]+) # link text = $2; can\'t contain [ or ] + \] + ) + }xs', + array(&$this, '_doAnchors_reference_callback'), $text); + + $this->in_anchor = false; + return $text; + } + function _doAnchors_reference_callback($matches) { + $whole_match = $matches[1]; + $link_text = $matches[2]; + $link_id =& $matches[3]; + + if ($link_id == "") { + # for shortcut links like [this][] or [this]. + $link_id = $link_text; + } + + # lower-case and turn embedded newlines into spaces + $link_id = strtolower($link_id); + $link_id = preg_replace('{[ ]?\n}', ' ', $link_id); + + if (isset($this->urls[$link_id])) { + $url = $this->urls[$link_id]; + $url = $this->encodeAttribute($url); + + $result = "titles[$link_id] ) ) { + $title = $this->titles[$link_id]; + $title = $this->encodeAttribute($title); + $result .= " title=\"$title\""; + } + + $link_text = $this->runSpanGamut($link_text); + $result .= ">$link_text"; + $result = $this->hashPart($result); + } + else { + $result = $whole_match; + } + return $result; + } + function _doAnchors_inline_callback($matches) { + $whole_match = $matches[1]; + $link_text = $this->runSpanGamut($matches[2]); + $url = $matches[3] == '' ? $matches[4] : $matches[3]; + $title =& $matches[7]; + + $url = $this->encodeAttribute($url); + + $result = "encodeAttribute($title); + $result .= " title=\"$title\""; + } + + $link_text = $this->runSpanGamut($link_text); + $result .= ">$link_text"; + + return $this->hashPart($result); + } + + + function doImages($text) { + # + # Turn Markdown image shortcuts into tags. + # + # + # First, handle reference-style labeled images: ![alt text][id] + # + $text = preg_replace_callback('{ + ( # wrap whole match in $1 + !\[ + ('.$this->nested_brackets_re.') # alt text = $2 + \] + + [ ]? # one optional space + (?:\n[ ]*)? # one optional newline followed by spaces + + \[ + (.*?) # id = $3 + \] + + ) + }xs', + array(&$this, '_doImages_reference_callback'), $text); + + # + # Next, handle inline images: ![alt text](url "optional title") + # Don't forget: encode * and _ + # + $text = preg_replace_callback('{ + ( # wrap whole match in $1 + !\[ + ('.$this->nested_brackets_re.') # alt text = $2 + \] + \s? # One optional whitespace character + \( # literal paren + [ \n]* + (?: + <(\S*)> # src url = $3 + | + ('.$this->nested_url_parenthesis_re.') # src url = $4 + ) + [ \n]* + ( # $5 + ([\'"]) # quote char = $6 + (.*?) # title = $7 + \6 # matching quote + [ \n]* + )? # title is optional + \) + ) + }xs', + array(&$this, '_doImages_inline_callback'), $text); + + return $text; + } + function _doImages_reference_callback($matches) { + $whole_match = $matches[1]; + $alt_text = $matches[2]; + $link_id = strtolower($matches[3]); + + if ($link_id == "") { + $link_id = strtolower($alt_text); # for shortcut links like ![this][]. + } + + $alt_text = $this->encodeAttribute($alt_text); + if (isset($this->urls[$link_id])) { + $url = $this->encodeAttribute($this->urls[$link_id]); + $result = "\"$alt_text\"";titles[$link_id])) { + $title = $this->titles[$link_id]; + $title = $this->encodeAttribute($title); + $result .= " title=\"$title\""; + } + $result .= $this->empty_element_suffix; + $result = $this->hashPart($result); + } + else { + # If there's no such link ID, leave intact: + $result = $whole_match; + } + + return $result; + } + function _doImages_inline_callback($matches) { + $whole_match = $matches[1]; + $alt_text = $matches[2]; + $url = $matches[3] == '' ? $matches[4] : $matches[3]; + $title =& $matches[7]; + + $alt_text = $this->encodeAttribute($alt_text); + $url = $this->encodeAttribute($url); + $result = "\"$alt_text\"";encodeAttribute($title); + $result .= " title=\"$title\""; # $title already quoted + } + $result .= $this->empty_element_suffix; + + return $this->hashPart($result); + } + + + function doHeaders($text) { + # Setext-style headers: + # Header 1 + # ======== + # + # Header 2 + # -------- + # + $text = preg_replace_callback('{ ^(.+?)[ ]*\n(=+|-+)[ ]*\n+ }mx', + array(&$this, '_doHeaders_callback_setext'), $text); + + # atx-style headers: + # # Header 1 + # ## Header 2 + # ## Header 2 with closing hashes ## + # ... + # ###### Header 6 + # + $text = preg_replace_callback('{ + ^(\#{1,6}) # $1 = string of #\'s + [ ]* + (.+?) # $2 = Header text + [ ]* + \#* # optional closing #\'s (not counted) + \n+ + }xm', + array(&$this, '_doHeaders_callback_atx'), $text); + + return $text; + } + function _doHeaders_callback_setext($matches) { + # Terrible hack to check we haven't found an empty list item. + if ($matches[2] == '-' && preg_match('{^-(?: |$)}', $matches[1])) + return $matches[0]; + + $level = $matches[2]{0} == '=' ? 1 : 2; + $block = "".$this->runSpanGamut($matches[1]).""; + return "\n" . $this->hashBlock($block) . "\n\n"; + } + function _doHeaders_callback_atx($matches) { + $level = strlen($matches[1]); + $block = "".$this->runSpanGamut($matches[2]).""; + return "\n" . $this->hashBlock($block) . "\n\n"; + } + + + function doLists($text) { + # + # Form HTML ordered (numbered) and unordered (bulleted) lists. + # + $less_than_tab = $this->tab_width - 1; + + # Re-usable patterns to match list item bullets and number markers: + $marker_ul_re = '[*+-]'; + $marker_ol_re = '\d+[.]'; + $marker_any_re = "(?:$marker_ul_re|$marker_ol_re)"; + + $markers_relist = array( + $marker_ul_re => $marker_ol_re, + $marker_ol_re => $marker_ul_re, + ); + + foreach ($markers_relist as $marker_re => $other_marker_re) { + # Re-usable pattern to match any entirel ul or ol list: + $whole_list_re = ' + ( # $1 = whole list + ( # $2 + ([ ]{0,'.$less_than_tab.'}) # $3 = number of spaces + ('.$marker_re.') # $4 = first list item marker + [ ]+ + ) + (?s:.+?) + ( # $5 + \z + | + \n{2,} + (?=\S) + (?! # Negative lookahead for another list item marker + [ ]* + '.$marker_re.'[ ]+ + ) + | + (?= # Lookahead for another kind of list + \n + \3 # Must have the same indentation + '.$other_marker_re.'[ ]+ + ) + ) + ) + '; // mx + + # We use a different prefix before nested lists than top-level lists. + # See extended comment in _ProcessListItems(). + + if ($this->list_level) { + $text = preg_replace_callback('{ + ^ + '.$whole_list_re.' + }mx', + array(&$this, '_doLists_callback'), $text); + } + else { + $text = preg_replace_callback('{ + (?:(?<=\n)\n|\A\n?) # Must eat the newline + '.$whole_list_re.' + }mx', + array(&$this, '_doLists_callback'), $text); + } + } + + return $text; + } + function _doLists_callback($matches) { + # Re-usable patterns to match list item bullets and number markers: + $marker_ul_re = '[*+-]'; + $marker_ol_re = '\d+[.]'; + $marker_any_re = "(?:$marker_ul_re|$marker_ol_re)"; + + $list = $matches[1]; + $list_type = preg_match("/$marker_ul_re/", $matches[4]) ? "ul" : "ol"; + + $marker_any_re = ( $list_type == "ul" ? $marker_ul_re : $marker_ol_re ); + + $list .= "\n"; + $result = $this->processListItems($list, $marker_any_re); + + $result = $this->hashBlock("<$list_type>\n" . $result . ""); + return "\n". $result ."\n\n"; + } + + var $list_level = 0; + + function processListItems($list_str, $marker_any_re) { + # + # Process the contents of a single ordered or unordered list, splitting it + # into individual list items. + # + # The $this->list_level global keeps track of when we're inside a list. + # Each time we enter a list, we increment it; when we leave a list, + # we decrement. If it's zero, we're not in a list anymore. + # + # We do this because when we're not inside a list, we want to treat + # something like this: + # + # I recommend upgrading to version + # 8. Oops, now this line is treated + # as a sub-list. + # + # As a single paragraph, despite the fact that the second line starts + # with a digit-period-space sequence. + # + # Whereas when we're inside a list (or sub-list), that line will be + # treated as the start of a sub-list. What a kludge, huh? This is + # an aspect of Markdown's syntax that's hard to parse perfectly + # without resorting to mind-reading. Perhaps the solution is to + # change the syntax rules such that sub-lists must start with a + # starting cardinal number; e.g. "1." or "a.". + + $this->list_level++; + + # trim trailing blank lines: + $list_str = preg_replace("/\n{2,}\\z/", "\n", $list_str); + + $list_str = preg_replace_callback('{ + (\n)? # leading line = $1 + (^[ ]*) # leading whitespace = $2 + ('.$marker_any_re.' # list marker and space = $3 + (?:[ ]+|(?=\n)) # space only required if item is not empty + ) + ((?s:.*?)) # list item text = $4 + (?:(\n+(?=\n))|\n) # tailing blank line = $5 + (?= \n* (\z | \2 ('.$marker_any_re.') (?:[ ]+|(?=\n)))) + }xm', + array(&$this, '_processListItems_callback'), $list_str); + + $this->list_level--; + return $list_str; + } + function _processListItems_callback($matches) { + $item = $matches[4]; + $leading_line =& $matches[1]; + $leading_space =& $matches[2]; + $marker_space = $matches[3]; + $tailing_blank_line =& $matches[5]; + + if ($leading_line || $tailing_blank_line || + preg_match('/\n{2,}/', $item)) + { + # Replace marker with the appropriate whitespace indentation + $item = $leading_space . str_repeat(' ', strlen($marker_space)) . $item; + $item = $this->runBlockGamut($this->outdent($item)."\n"); + } + else { + # Recursion for sub-lists: + $item = $this->doLists($this->outdent($item)); + $item = preg_replace('/\n+$/', '', $item); + $item = $this->runSpanGamut($item); + } + + return "
      2. " . $item . "
      3. \n"; + } + + + function doCodeBlocks($text) { + # + # Process Markdown `
        ` blocks.
        +	#
        +		$text = preg_replace_callback('{
        +				(?:\n\n|\A\n?)
        +				(	            # $1 = the code block -- one or more lines, starting with a space/tab
        +				  (?>
        +					[ ]{'.$this->tab_width.'}  # Lines must start with a tab or a tab-width of spaces
        +					.*\n+
        +				  )+
        +				)
        +				((?=^[ ]{0,'.$this->tab_width.'}\S)|\Z)	# Lookahead for non-space at line-start, or end of doc
        +			}xm',
        +			array(&$this, '_doCodeBlocks_callback'), $text);
        +
        +		return $text;
        +	}
        +	function _doCodeBlocks_callback($matches) {
        +		$codeblock = $matches[1];
        +
        +		$codeblock = $this->outdent($codeblock);
        +		$codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES);
        +
        +		# trim leading newlines and trailing newlines
        +		$codeblock = preg_replace('/\A\n+|\n+\z/', '', $codeblock);
        +
        +		$codeblock = "
        $codeblock\n
        "; + return "\n\n".$this->hashBlock($codeblock)."\n\n"; + } + + + function makeCodeSpan($code) { + # + # Create a code span markup for $code. Called from handleSpanToken. + # + $code = htmlspecialchars(trim($code), ENT_NOQUOTES); + return $this->hashPart("$code"); + } + + + var $em_relist = array( + '' => '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(?em_relist as $em => $em_re) { + foreach ($this->strong_relist as $strong => $strong_re) { + # Construct list of allowed token expressions. + $token_relist = array(); + if (isset($this->em_strong_relist["$em$strong"])) { + $token_relist[] = $this->em_strong_relist["$em$strong"]; + } + $token_relist[] = $em_re; + $token_relist[] = $strong_re; + + # Construct master expression from list. + $token_re = '{('. implode('|', $token_relist) .')}'; + $this->em_strong_prepared_relist["$em$strong"] = $token_re; + } + } + } + + function doItalicsAndBold($text) { + $token_stack = array(''); + $text_stack = array(''); + $em = ''; + $strong = ''; + $tree_char_em = false; + + while (1) { + # + # Get prepared regular expression for seraching emphasis tokens + # in current context. + # + $token_re = $this->em_strong_prepared_relist["$em$strong"]; + + # + # Each loop iteration search for the next emphasis token. + # Each token is then passed to handleSpanToken. + # + $parts = preg_split($token_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE); + $text_stack[0] .= $parts[0]; + $token =& $parts[1]; + $text =& $parts[2]; + + if (empty($token)) { + # Reached end of text span: empty stack without emitting. + # any more emphasis. + while ($token_stack[0]) { + $text_stack[1] .= array_shift($token_stack); + $text_stack[0] .= array_shift($text_stack); + } + break; + } + + $token_len = strlen($token); + if ($tree_char_em) { + # Reached closing marker while inside a three-char emphasis. + if ($token_len == 3) { + # Three-char closing marker, close em and strong. + array_shift($token_stack); + $span = array_shift($text_stack); + $span = $this->runSpanGamut($span); + $span = "$span"; + $text_stack[0] .= $this->hashPart($span); + $em = ''; + $strong = ''; + } else { + # Other closing marker: close one em or strong and + # change current token state to match the other + $token_stack[0] = str_repeat($token{0}, 3-$token_len); + $tag = $token_len == 2 ? "strong" : "em"; + $span = $text_stack[0]; + $span = $this->runSpanGamut($span); + $span = "<$tag>$span"; + $text_stack[0] = $this->hashPart($span); + $$tag = ''; # $$tag stands for $em or $strong + } + $tree_char_em = false; + } else if ($token_len == 3) { + if ($em) { + # Reached closing marker for both em and strong. + # Closing strong marker: + for ($i = 0; $i < 2; ++$i) { + $shifted_token = array_shift($token_stack); + $tag = strlen($shifted_token) == 2 ? "strong" : "em"; + $span = array_shift($text_stack); + $span = $this->runSpanGamut($span); + $span = "<$tag>$span"; + $text_stack[0] .= $this->hashPart($span); + $$tag = ''; # $$tag stands for $em or $strong + } + } else { + # Reached opening three-char emphasis marker. Push on token + # stack; will be handled by the special condition above. + $em = $token{0}; + $strong = "$em$em"; + array_unshift($token_stack, $token); + array_unshift($text_stack, ''); + $tree_char_em = true; + } + } else if ($token_len == 2) { + if ($strong) { + # Unwind any dangling emphasis marker: + if (strlen($token_stack[0]) == 1) { + $text_stack[1] .= array_shift($token_stack); + $text_stack[0] .= array_shift($text_stack); + } + # Closing strong marker: + array_shift($token_stack); + $span = array_shift($text_stack); + $span = $this->runSpanGamut($span); + $span = "$span"; + $text_stack[0] .= $this->hashPart($span); + $strong = ''; + } else { + array_unshift($token_stack, $token); + array_unshift($text_stack, ''); + $strong = $token; + } + } else { + # Here $token_len == 1 + if ($em) { + if (strlen($token_stack[0]) == 1) { + # Closing emphasis marker: + array_shift($token_stack); + $span = array_shift($text_stack); + $span = $this->runSpanGamut($span); + $span = "$span"; + $text_stack[0] .= $this->hashPart($span); + $em = ''; + } else { + $text_stack[0] .= $token; + } + } else { + array_unshift($token_stack, $token); + array_unshift($text_stack, ''); + $em = $token; + } + } + } + return $text_stack[0]; + } + + + function doBlockQuotes($text) { + $text = preg_replace_callback('/ + ( # Wrap whole match in $1 + (?> + ^[ ]*>[ ]? # ">" at the start of a line + .+\n # rest of the first line + (.+\n)* # subsequent consecutive lines + \n* # blanks + )+ + ) + /xm', + array(&$this, '_doBlockQuotes_callback'), $text); + + return $text; + } + function _doBlockQuotes_callback($matches) { + $bq = $matches[1]; + # trim one level of quoting - trim whitespace-only lines + $bq = preg_replace('/^[ ]*>[ ]?|^[ ]+$/m', '', $bq); + $bq = $this->runBlockGamut($bq); # recurse + + $bq = preg_replace('/^/m', " ", $bq); + # These leading spaces cause problem with
         content, 
        +		# so we need to fix that:
        +		$bq = preg_replace_callback('{(\s*
        .+?
        )}sx', + array(&$this, '_doBlockQuotes_callback2'), $bq); + + return "\n". $this->hashBlock("
        \n$bq\n
        ")."\n\n"; + } + function _doBlockQuotes_callback2($matches) { + $pre = $matches[1]; + $pre = preg_replace('/^ /m', '', $pre); + return $pre; + } + + + function formParagraphs($text) { + # + # Params: + # $text - string to process with html

        tags + # + # Strip leading and trailing lines: + $text = preg_replace('/\A\n+|\n+\z/', '', $text); + + $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY); + + # + # Wrap

        tags and unhashify HTML blocks + # + foreach ($grafs as $key => $value) { + if (!preg_match('/^B\x1A[0-9]+B$/', $value)) { + # Is a paragraph. + $value = $this->runSpanGamut($value); + $value = preg_replace('/^([ ]*)/', "

        ", $value); + $value .= "

        "; + $grafs[$key] = $this->unhash($value); + } + else { + # Is a block. + # Modify elements of @grafs in-place... + $graf = $value; + $block = $this->html_hashes[$graf]; + $graf = $block; +// if (preg_match('{ +// \A +// ( # $1 =
        tag +//
        ]* +// \b +// markdown\s*=\s* ([\'"]) # $2 = attr quote char +// 1 +// \2 +// [^>]* +// > +// ) +// ( # $3 = contents +// .* +// ) +// (
        ) # $4 = closing tag +// \z +// }xs', $block, $matches)) +// { +// list(, $div_open, , $div_content, $div_close) = $matches; +// +// # We can't call Markdown(), because that resets the hash; +// # that initialization code should be pulled into its own sub, though. +// $div_content = $this->hashHTMLBlocks($div_content); +// +// # Run document gamut methods on the content. +// foreach ($this->document_gamut as $method => $priority) { +// $div_content = $this->$method($div_content); +// } +// +// $div_open = preg_replace( +// '{\smarkdown\s*=\s*([\'"]).+?\1}', '', $div_open); +// +// $graf = $div_open . "\n" . $div_content . "\n" . $div_close; +// } + $grafs[$key] = $graf; + } + } + + return implode("\n\n", $grafs); + } + + + function encodeAttribute($text) { + # + # Encode text for a double-quoted HTML attribute. This function + # is *not* suitable for attributes enclosed in single quotes. + # + $text = $this->encodeAmpsAndAngles($text); + $text = str_replace('"', '"', $text); + return $text; + } + + + function encodeAmpsAndAngles($text) { + # + # Smart processing for ampersands and angle brackets that need to + # be encoded. Valid character entities are left alone unless the + # no-entities mode is set. + # + if ($this->no_entities) { + $text = str_replace('&', '&', $text); + } else { + # Ampersand-encoding based entirely on Nat Irons's Amputator + # MT plugin: + $text = preg_replace('/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/', + '&', $text);; + } + # Encode remaining <'s + $text = str_replace('<', '<', $text); + + return $text; + } + + + function doAutoLinks($text) { + $text = preg_replace_callback('{<((https?|ftp|dict):[^\'">\s]+)>}i', + array(&$this, '_doAutoLinks_url_callback'), $text); + + # Email addresses: + $text = preg_replace_callback('{ + < + (?:mailto:)? + ( + (?: + [-!#$%&\'*+/=?^_`.{|}~\w\x80-\xFF]+ + | + ".*?" + ) + \@ + (?: + [-a-z0-9\x80-\xFF]+(\.[-a-z0-9\x80-\xFF]+)*\.[a-z]+ + | + \[[\d.a-fA-F:]+\] # IPv4 & IPv6 + ) + ) + > + }xi', + array(&$this, '_doAutoLinks_email_callback'), $text); + + return $text; + } + function _doAutoLinks_url_callback($matches) { + $url = $this->encodeAttribute($matches[1]); + $link = "$url"; + return $this->hashPart($link); + } + function _doAutoLinks_email_callback($matches) { + $address = $matches[1]; + $link = $this->encodeEmailAddress($address); + return $this->hashPart($link); + } + + + function encodeEmailAddress($addr) { + # + # Input: an email address, e.g. "foo@example.com" + # + # Output: the email address as a mailto link, with each character + # of the address encoded as either a decimal or hex entity, in + # the hopes of foiling most address harvesting spam bots. E.g.: + # + #

        foo@exampl + # e.com

        + # + # Based by a filter by Matthew Wickline, posted to BBEdit-Talk. + # With some optimizations by Milian Wolff. + # + $addr = "mailto:" . $addr; + $chars = preg_split('/(? $char) { + $ord = ord($char); + # Ignore non-ascii chars. + if ($ord < 128) { + $r = ($seed * (1 + $key)) % 100; # Pseudo-random function. + # roughly 10% raw, 45% hex, 45% dec + # '@' *must* be encoded. I insist. + if ($r > 90 && $char != '@') /* do nothing */; + else if ($r < 45) $chars[$key] = '&#x'.dechex($ord).';'; + else $chars[$key] = '&#'.$ord.';'; + } + } + + $addr = implode('', $chars); + $text = implode('', array_slice($chars, 7)); # text without `mailto:` + $addr = "$text"; + + return $addr; + } + + + function parseSpan($str) { + # + # Take the string $str and parse it into tokens, hashing embeded HTML, + # escaped characters and handling code spans. + # + $output = ''; + + $span_re = '{ + ( + \\\\'.$this->escape_chars_re.' + | + (?no_markup ? '' : ' + | + # comment + | + <\?.*?\?> | <%.*?%> # processing instruction + | + <[/!$]?[-a-zA-Z0-9:_]+ # regular tags + (?> + \s + (?>[^"\'>]+|"[^"]*"|\'[^\']*\')* + )? + > + ').' + ) + }xs'; + + while (1) { + # + # Each loop iteration seach for either the next tag, the next + # openning code span marker, or the next escaped character. + # Each token is then passed to handleSpanToken. + # + $parts = preg_split($span_re, $str, 2, PREG_SPLIT_DELIM_CAPTURE); + + # Create token from text preceding tag. + if ($parts[0] != "") { + $output .= $parts[0]; + } + + # Check if we reach the end. + if (isset($parts[1])) { + $output .= $this->handleSpanToken($parts[1], $parts[2]); + $str = $parts[2]; + } + else { + break; + } + } + + return $output; + } + + + function handleSpanToken($token, &$str) { + # + # Handle $token provided by parseSpan by determining its nature and + # returning the corresponding value that should replace it. + # + switch ($token{0}) { + case "\\": + return $this->hashPart("&#". ord($token{1}). ";"); + case "`": + # Search for end marker in remaining text. + if (preg_match('/^(.*?[^`])'.preg_quote($token).'(?!`)(.*)$/sm', + $str, $matches)) + { + $str = $matches[2]; + $codespan = $this->makeCodeSpan($matches[1]); + return $this->hashPart($codespan); + } + return $token; // return as text since no ending marker found. + default: + return $this->hashPart($token); + } + } + + + function outdent($text) { + # + # Remove one level of line-leading tabs or spaces + # + return preg_replace('/^(\t|[ ]{1,'.$this->tab_width.'})/m', '', $text); + } + + + # String length function for detab. `_initDetab` will create a function to + # hanlde UTF-8 if the default function does not exist. + var $utf8_strlen = 'mb_strlen'; + + function detab($text) { + # + # Replace tabs with the appropriate amount of space. + # + # For each line we separate the line in blocks delemited by + # tab characters. Then we reconstruct every line by adding the + # appropriate number of space between each blocks. + + $text = preg_replace_callback('/^.*\t.*$/m', + array(&$this, '_detab_callback'), $text); + + return $text; + } + function _detab_callback($matches) { + $line = $matches[0]; + $strlen = $this->utf8_strlen; # strlen function for UTF-8. + + # Split in blocks. + $blocks = explode("\t", $line); + # Add each blocks to the line. + $line = $blocks[0]; + unset($blocks[0]); # Do not add first block twice. + foreach ($blocks as $block) { + # Calculate amount of space, insert spaces, insert block. + $amount = $this->tab_width - + $strlen($line, 'UTF-8') % $this->tab_width; + $line .= str_repeat(" ", $amount) . $block; + } + return $line; + } + function _initDetab() { + # + # Check for the availability of the function in the `utf8_strlen` property + # (initially `mb_strlen`). If the function is not available, create a + # function that will loosely count the number of UTF-8 characters with a + # regular expression. + # + if (function_exists($this->utf8_strlen)) return; + $this->utf8_strlen = create_function('$text', 'return preg_match_all( + "/[\\\\x00-\\\\xBF]|[\\\\xC0-\\\\xFF][\\\\x80-\\\\xBF]*/", + $text, $m);'); + } + + + function unhash($text) { + # + # Swap back in all the tags hashed by _HashHTMLBlocks. + # + return preg_replace_callback('/(.)\x1A[0-9]+\1/', + array(&$this, '_unhash_callback'), $text); + } + function _unhash_callback($matches) { + return $this->html_hashes[$matches[0]]; + } + +} + +/* + +PHP Markdown +============ + +Description +----------- + +This is a PHP translation of the original Markdown formatter written in +Perl by John Gruber. + +Markdown is a text-to-HTML filter; it translates an easy-to-read / +easy-to-write structured text format into HTML. Markdown's text format +is most similar to that of plain text email, and supports features such +as headers, *emphasis*, code blocks, blockquotes, and links. + +Markdown's syntax is designed not as a generic markup language, but +specifically to serve as a front-end to (X)HTML. You can use span-level +HTML tags anywhere in a Markdown document, and you can use block level +HTML tags (like
        and as well). + +For more information about Markdown's syntax, see: + + + + +Bugs +---- + +To file bug reports please send email to: + + + +Please include with your report: (1) the example input; (2) the output you +expected; (3) the output Markdown actually produced. + + +Version History +--------------- + +See the readme file for detailed release notes for this version. + + +Copyright and License +--------------------- + +PHP Markdown +Copyright (c) 2004-2009 Michel Fortin + +All rights reserved. + +Based on Markdown +Copyright (c) 2003-2006 John Gruber + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +* Neither the name "Markdown" nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +This software is provided by the copyright holders and contributors "as +is" and any express or implied warranties, including, but not limited +to, the implied warranties of merchantability and fitness for a +particular purpose are disclaimed. In no event shall the copyright owner +or contributors be liable for any direct, indirect, incidental, special, +exemplary, or consequential damages (including, but not limited to, +procurement of substitute goods or services; loss of use, data, or +profits; or business interruption) however caused and on any theory of +liability, whether in contract, strict liability, or tort (including +negligence or otherwise) arising in any way out of the use of this +software, even if advised of the possibility of such damage. + +*/ +?> \ No newline at end of file diff --git a/_piecrust/libs/MarkdownExtra/License.text b/_piecrust/libs/MarkdownExtra/License.text new file mode 100644 index 0000000..4d6bf8b --- /dev/null +++ b/_piecrust/libs/MarkdownExtra/License.text @@ -0,0 +1,36 @@ +PHP Markdown & Extra +Copyright (c) 2004-2009 Michel Fortin + +All rights reserved. + +Based on Markdown +Copyright (c) 2003-2006 John Gruber + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +* Neither the name "Markdown" nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +This software is provided by the copyright holders and contributors "as +is" and any express or implied warranties, including, but not limited +to, the implied warranties of merchantability and fitness for a +particular purpose are disclaimed. In no event shall the copyright owner +or contributors be liable for any direct, indirect, incidental, special, +exemplary, or consequential damages (including, but not limited to, +procurement of substitute goods or services; loss of use, data, or +profits; or business interruption) however caused and on any theory of +liability, whether in contract, strict liability, or tort (including +negligence or otherwise) arising in any way out of the use of this +software, even if advised of the possibility of such damage. diff --git a/_piecrust/libs/MarkdownExtra/PHP Markdown Extra Readme.text b/_piecrust/libs/MarkdownExtra/PHP Markdown Extra Readme.text new file mode 100644 index 0000000..b72ee99 --- /dev/null +++ b/_piecrust/libs/MarkdownExtra/PHP Markdown Extra Readme.text @@ -0,0 +1,786 @@ +PHP Markdown Extra +================== + +Version 1.2.4 - Sat 10 Oct 2009 + +by Michel Fortin + + +based on Markdown by John Gruber + + + +Introduction +------------ + +This is a special version of PHP Markdown with extra features. See + for details. + +Markdown is a text-to-HTML conversion tool for web writers. Markdown +allows you to write using an easy-to-read, easy-to-write plain text +format, then convert it to structurally valid XHTML (or HTML). + +"Markdown" is two things: a plain text markup syntax, and a software +tool, written in Perl, that converts the plain text markup to HTML. +PHP Markdown is a port to PHP of the original Markdown program by +John Gruber. + +PHP Markdown can work as a plug-in for WordPress and bBlog, as a +modifier for the Smarty templating engine, or as a remplacement for +textile formatting in any software that support textile. + +Full documentation of Markdown's syntax is available on John's +Markdown page: + + +Installation and Requirement +---------------------------- + +PHP Markdown requires PHP version 4.0.5 or later. + + +### WordPress ### + +PHP Markdown works with [WordPress][wp], version 1.2 or later. + + [wp]: http://wordpress.org/ + +1. To use PHP Markdown with WordPress, place the "makrdown.php" file + in the "plugins" folder. This folder is located inside + "wp-content" at the root of your site: + + (site home)/wp-content/plugins/ + +2. Activate the plugin with the administrative interface of + WordPress. In the "Plugins" section you will now find Markdown. + To activate the plugin, click on the "Activate" button on the + same line than Markdown. Your entries will now be formatted by + PHP Markdown. + +3. To post Markdown content, you'll first have to disable the + "visual" editor in the User section of WordPress. + +You can configure PHP Markdown to not apply to the comments on your +WordPress weblog. See the "Configuration" section below. + +It is not possible at this time to apply a different set of +filters to different entries. All your entries will be formated by +PHP Markdown. This is a limitation of WordPress. If your old entries +are written in HTML (as opposed to another formatting syntax, like +Textile), they'll probably stay fine after installing Markdown. + + +### bBlog ### + +PHP Markdown also works with [bBlog][bb]. + + [bb]: http://www.bblog.com/ + +To use PHP Markdown with bBlog, rename "markdown.php" to +"modifier.markdown.php" and place the file in the "bBlog_plugins" +folder. This folder is located inside the "bblog" directory of +your site, like this: + + (site home)/bblog/bBlog_plugins/modifier.markdown.php + +Select "Markdown" as the "Entry Modifier" when you post a new +entry. This setting will only apply to the entry you are editing. + + +### Replacing Textile in TextPattern ### + +[TextPattern][tp] use [Textile][tx] to format your text. You can +replace Textile by Markdown in TextPattern without having to change +any code by using the *Texitle Compatibility Mode*. This may work +with other software that expect Textile too. + + [tx]: http://www.textism.com/tools/textile/ + [tp]: http://www.textpattern.com/ + +1. Rename the "markdown.php" file to "classTextile.php". This will + make PHP Markdown behave as if it was the actual Textile parser. + +2. Replace the "classTextile.php" file TextPattern installed in your + web directory. It can be found in the "lib" directory: + + (site home)/textpattern/lib/ + +Contrary to Textile, Markdown does not convert quotes to curly ones +and does not convert multiple hyphens (`--` and `---`) into en- and +em-dashes. If you use PHP Markdown in Textile Compatibility Mode, you +can solve this problem by installing the "smartypants.php" file from +[PHP SmartyPants][psp] beside the "classTextile.php" file. The Textile +Compatibility Mode function will use SmartyPants automatically without +further modification. + + [psp]: http://michelf.com/projects/php-smartypants/ + + +### In Your Own Programs ### + +You can use PHP Markdown easily in your current PHP program. Simply +include the file and then call the Markdown function on the text you +want to convert: + + include_once "markdown.php"; + $my_html = Markdown($my_text); + +If you wish to use PHP Markdown with another text filter function +built to parse HTML, you should filter the text *after* the Markdown +function call. This is an example with [PHP SmartyPants][psp]: + + $my_html = SmartyPants(Markdown($my_text)); + + +### With Smarty ### + +If your program use the [Smarty][sm] template engine, PHP Markdown +can now be used as a modifier for your templates. Rename "markdown.php" +to "modifier.markdown.php" and put it in your smarty plugins folder. + + [sm]: http://smarty.php.net/ + +If you are using MovableType 3.1 or later, the Smarty plugin folder is +located at `(MT CGI root)/php/extlib/smarty/plugins`. This will allow +Markdown to work on dynamic pages. + + +### Updating Markdown in Other Programs ### + +Many web applications now ship with PHP Markdown, or have plugins to +perform the conversion to HTML. You can update PHP Markdown -- or +replace it with PHP Markdown Extra -- in many of these programs by +swapping the old "markdown.php" file for the new one. + +Here is a short non-exhaustive list of some programs and where they +hide the "markdown.php" file. + +| Program | Path to Markdown +| ------- | ---------------- +| [Pivot][] | `(site home)/pivot/includes/markdown/` + +If you're unsure if you can do this with your application, ask the +developer, or wait for the developer to update his application or +plugin with the new version of PHP Markdown. + + [Pivot]: http://pivotlog.net/ + + +Configuration +------------- + +By default, PHP Markdown produces XHTML output for tags with empty +elements. E.g.: + +
        + +Markdown can be configured to produce HTML-style tags; e.g.: + +
        + +To do this, you must edit the "MARKDOWN_EMPTY_ELEMENT_SUFFIX" +definition below the "Global default settings" header at the start of +the "markdown.php" file. + + +### WordPress-Specific Settings ### + +By default, the Markdown plugin applies to both posts and comments on +your WordPress weblog. To deactivate one or the other, edit the +`MARKDOWN_WP_POSTS` or `MARKDOWN_WP_COMMENTS` definitions under the +"WordPress settings" header at the start of the "markdown.php" file. + + +Bugs +---- + +To file bug reports please send email to: + + +Please include with your report: (1) the example input; (2) the output you +expected; (3) the output PHP Markdown actually produced. + + +Version History +--------------- + +1.0.1n (10 Oct 2009): + +* Enabled reference-style shortcut links. Now you can write reference-style + links with less brakets: + + This is [my website]. + + [my website]: http://example.com/ + + This was added in the 1.0.2 betas, but commented out in the 1.0.1 branch, + waiting for the feature to be officialized. [But half of the other Markdown + implementations are supporting this syntax][half], so it makes sense for + compatibility's sake to allow it in PHP Markdown too. + + [half]: http://babelmark.bobtfish.net/?markdown=This+is+%5Bmy+website%5D.%0D%0A%09%09%0D%0A%5Bmy+website%5D%3A+http%3A%2F%2Fexample.com%2F%0D%0A&src=1&dest=2 + +* Now accepting many valid email addresses in autolinks that were + previously rejected, such as: + + + + <"abc@def"@example.com> + <"Fred Bloggs"@example.com> + + +* Now accepting spaces in URLs for inline and reference-style links. Such + URLs need to be surrounded by angle brakets. For instance: + + [link text]( "optional title") + + [link text][ref] + [ref]: "optional title" + + There is still a quirk which may prevent this from working correctly with + relative URLs in inline-style links however. + +* Fix for adjacent list of different kind where the second list could + end as a sublist of the first when not separated by an empty line. + +* Fixed a bug where inline-style links wouldn't be recognized when the link + definition contains a line break between the url and the title. + +* Fixed a bug where tags where the name contains an underscore aren't parsed + correctly. + +* Fixed some corner-cases mixing underscore-ephasis and asterisk-emphasis. + + +Extra 1.2.4: + +* Fixed a problem where unterminated tags in indented code blocks could + prevent proper escaping of characaters in the code block. + + +Extra 1.2.3 (31 Dec 2008): + +* In WordPress pages featuring more than one post, footnote id prefixes are + now automatically applied with the current post ID to avoid clashes + between footnotes belonging to different posts. + +* Fix for a bug introduced in Extra 1.2 where block-level HTML tags where + not detected correctly, thus the addition of erroneous `

        ` tags and + interpretation of their content as Markdown-formatted instead of + HTML-formatted. + + +Extra 1.2.2 (21 Jun 2008): + +* Fixed a problem where abbreviation definitions, footnote + definitions and link references were stripped inside + fenced code blocks. + +* Fixed a bug where characters such as `"` in abbreviation + definitions weren't properly encoded to HTML entities. + +* Fixed a bug where double quotes `"` were not correctly encoded + as HTML entities when used inside a footnote reference id. + + +1.0.1m (21 Jun 2008): + +* Lists can now have empty items. + +* Rewrote the emphasis and strong emphasis parser to fix some issues + with odly placed and overlong markers. + + +Extra 1.2.1 (27 May 2008): + +* Fixed a problem where Markdown headers and horizontal rules were + transformed into their HTML equivalent inside fenced code blocks. + + +Extra 1.2 (11 May 2008): + +* Added fenced code block syntax which don't require indentation + and can start and end with blank lines. A fenced code block + starts with a line of consecutive tilde (~) and ends on the + next line with the same number of consecutive tilde. Here's an + example: + + ~~~~~~~~~~~~ + Hello World! + ~~~~~~~~~~~~ + +* Rewrote parts of the HTML block parser to better accomodate + fenced code blocks. + +* Footnotes may now be referenced from within another footnote. + +* Added programatically-settable parser property `predef_attr` for + predefined attribute definitions. + +* Fixed an issue where an indented code block preceded by a blank + line containing some other whitespace would confuse the HTML + block parser into creating an HTML block when it should have + been code. + + +1.0.1l (11 May 2008): + +* Now removing the UTF-8 BOM at the start of a document, if present. + +* Now accepting capitalized URI schemes (such as HTTP:) in automatic + links, such as ``. + +* Fixed a problem where `` was seen as a horizontal + rule instead of an automatic link. + +* Fixed an issue where some characters in Markdown-generated HTML + attributes weren't properly escaped with entities. + +* Fix for code blocks as first element of a list item. Previously, + this didn't create any code block for item 2: + + * Item 1 (regular paragraph) + + * Item 2 (code block) + +* A code block starting on the second line of a document wasn't seen + as a code block. This has been fixed. + +* Added programatically-settable parser properties `predef_urls` and + `predef_titles` for predefined URLs and titles for reference-style + links. To use this, your PHP code must call the parser this way: + + $parser = new Markdwon_Parser; + $parser->predef_urls = array('linkref' => 'http://example.com'); + $html = $parser->transform($text); + + You can then use the URL as a normal link reference: + + [my link][linkref] + [my link][linkRef] + + Reference names in the parser properties *must* be lowercase. + Reference names in the Markdown source may have any case. + +* Added `setup` and `teardown` methods which can be used by subclassers + as hook points to arrange the state of some parser variables before and + after parsing. + + +Extra 1.1.7 (26 Sep 2007): + +1.0.1k (26 Sep 2007): + +* Fixed a problem introduced in 1.0.1i where three or more identical + uppercase letters, as well as a few other symbols, would trigger + a horizontal line. + + +Extra 1.1.6 (4 Sep 2007): + +1.0.1j (4 Sep 2007): + +* Fixed a problem introduced in 1.0.1i where the closing `code` and + `pre` tags at the end of a code block were appearing in the wrong + order. + +* Overriding configuration settings by defining constants from an + external before markdown.php is included is now possible without + producing a PHP warning. + + +Extra 1.1.5 (31 Aug 2007): + +1.0.1i (31 Aug 2007): + +* Fixed a problem where an escaped backslash before a code span + would prevent the code span from being created. This should now + work as expected: + + Litteral backslash: \\`code span` + +* Overall speed improvements, especially with long documents. + + +Extra 1.1.4 (3 Aug 2007): + +1.0.1h (3 Aug 2007): + +* Added two properties (`no_markup` and `no_entities`) to the parser + allowing HTML tags and entities to be disabled. + +* Fix for a problem introduced in 1.0.1g where posting comments in + WordPress would trigger PHP warnings and cause some markup to be + incorrectly filtered by the kses filter in WordPress. + + +Extra 1.1.3 (3 Jul 2007): + +* Fixed a performance problem when parsing some invalid HTML as an HTML + block which was resulting in too much recusion and a segmentation fault + for long documents. + +* The markdown="" attribute now accepts unquoted values. + +* Fixed an issue where underscore-emphasis didn't work when applied on the + first or the last word of an element having the markdown="1" or + markdown="span" attribute set unless there was some surrounding whitespace. + This didn't work: + +

        _Hello_ _world_

        + + Now it does produce emphasis as expected. + +* Fixed an issue preventing footnotes from working when the parser's + footnote id prefix variable (fn_id_prefix) is not empty. + +* Fixed a performance problem where the regular expression for strong + emphasis introduced in version 1.1 could sometime be long to process, + give slightly wrong results, and in some circumstances could remove + entirely the content for a whole paragraph. + +* Fixed an issue were abbreviations tags could be incorrectly added + inside URLs and title of links. + +* Placing footnote markers inside a link, resulting in two nested links, is + no longer allowed. + + +1.0.1g (3 Jul 2007): + +* Fix for PHP 5 compiled without the mbstring module. Previous fix to + calculate the length of UTF-8 strings in `detab` when `mb_strlen` is + not available was only working with PHP 4. + +* Fixed a problem with WordPress 2.x where full-content posts in RSS feeds + were not processed correctly by Markdown. + +* Now supports URLs containing literal parentheses for inline links + and images, such as: + + [WIMP](http://en.wikipedia.org/wiki/WIMP_(computing)) + + Such parentheses may be arbitrarily nested, but must be + balanced. Unbalenced parentheses are allowed however when the URL + when escaped or when the URL is enclosed in angle brakets `<>`. + +* Fixed a performance problem where the regular expression for strong + emphasis introduced in version 1.0.1d could sometime be long to process, + give slightly wrong results, and in some circumstances could remove + entirely the content for a whole paragraph. + +* Some change in version 1.0.1d made possible the incorrect nesting of + anchors within each other. This is now fixed. + +* Fixed a rare issue where certain MD5 hashes in the content could + be changed to their corresponding text. For instance, this: + + The MD5 value for "+" is "26b17225b626fb9238849fd60eabdf60". + + was incorrectly changed to this in previous versions of PHP Markdown: + +

        The MD5 value for "+" is "+".

        + +* Now convert escaped characters to their numeric character + references equivalent. + + This fix an integration issue with SmartyPants and backslash escapes. + Since Markdown and SmartyPants have some escapable characters in common, + it was sometime necessary to escape them twice. Previously, two + backslashes were sometime required to prevent Markdown from "eating" the + backslash before SmartyPants sees it: + + Here are two hyphens: \\-- + + Now, only one backslash will do: + + Here are two hyphens: \-- + + +Extra 1.1.2 (7 Feb 2007) + +* Fixed an issue where headers preceded too closely by a paragraph + (with no blank line separating them) where put inside the paragraph. + +* Added the missing TextileRestricted method that was added to regular + PHP Markdown since 1.0.1d but which I forgot to add to Extra. + + +1.0.1f (7 Feb 2007): + +* Fixed an issue with WordPress where manually-entered excerpts, but + not the auto-generated ones, would contain nested paragraphs. + +* Fixed an issue introduced in 1.0.1d where headers and blockquotes + preceded too closely by a paragraph (not separated by a blank line) + where incorrectly put inside the paragraph. + +* Fixed an issue introduced in 1.0.1d in the tokenizeHTML method where + two consecutive code spans would be merged into one when together they + form a valid tag in a multiline paragraph. + +* Fixed an long-prevailing issue where blank lines in code blocks would + be doubled when the code block is in a list item. + + This was due to the list processing functions relying on artificially + doubled blank lines to correctly determine when list items should + contain block-level content. The list item processing model was thus + changed to avoid the need for double blank lines. + +* Fixed an issue with `<% asp-style %>` instructions used as inline + content where the opening `<` was encoded as `<`. + +* Fixed a parse error occuring when PHP is configured to accept + ASP-style delimiters as boundaries for PHP scripts. + +* Fixed a bug introduced in 1.0.1d where underscores in automatic links + got swapped with emphasis tags. + + +Extra 1.1.1 (28 Dec 2006) + +* Fixed a problem where whitespace at the end of the line of an atx-style + header would cause tailing `#` to appear as part of the header's content. + This was caused by a small error in the regex that handles the definition + for the id attribute in PHP Markdown Extra. + +* Fixed a problem where empty abbreviations definitions would eat the + following line as its definition. + +* Fixed an issue with calling the Markdown parser repetitivly with text + containing footnotes. The footnote hashes were not reinitialized properly. + + +1.0.1e (28 Dec 2006) + +* Added support for internationalized domain names for email addresses in + automatic link. Improved the speed at which email addresses are converted + to entities. Thanks to Milian Wolff for his optimisations. + +* Made deterministic the conversion to entities of email addresses in + automatic links. This means that a given email address will always be + encoded the same way. + +* PHP Markdown will now use its own function to calculate the length of an + UTF-8 string in `detab` when `mb_strlen` is not available instead of + giving a fatal error. + + +Extra 1.1 (1 Dec 2006) + +* Added a syntax for footnotes. + +* Added an experimental syntax to define abbreviations. + + +1.0.1d (1 Dec 2006) + +* Fixed a bug where inline images always had an empty title attribute. The + title attribute is now present only when explicitly defined. + +* Link references definitions can now have an empty title, previously if the + title was defined but left empty the link definition was ignored. This can + be useful if you want an empty title attribute in images to hide the + tooltip in Internet Explorer. + +* Made `detab` aware of UTF-8 characters. UTF-8 multi-byte sequences are now + correctly mapped to one character instead of the number of bytes. + +* Fixed a small bug with WordPress where WordPress' default filter `wpautop` + was not properly deactivated on comment text, resulting in hard line breaks + where Markdown do not prescribes them. + +* Added a `TextileRestrited` method to the textile compatibility mode. There + is no restriction however, as Markdown does not have a restricted mode at + this point. This should make PHP Markdown work again in the latest + versions of TextPattern. + +* Converted PHP Markdown to a object-oriented design. + +* Changed span and block gamut methods so that they loop over a + customizable list of methods. This makes subclassing the parser a more + interesting option for creating syntax extensions. + +* Also added a "document" gamut loop which can be used to hook document-level + methods (like for striping link definitions). + +* Changed all methods which were inserting HTML code so that they now return + a hashed representation of the code. New methods `hashSpan` and `hashBlock` + are used to hash respectivly span- and block-level generated content. This + has a couple of significant effects: + + 1. It prevents invalid nesting of Markdown-generated elements which + could occur occuring with constructs like `*something [link*][1]`. + 2. It prevents problems occuring with deeply nested lists on which + paragraphs were ill-formed. + 3. It removes the need to call `hashHTMLBlocks` twice during the the + block gamut. + + Hashes are turned back to HTML prior output. + +* Made the block-level HTML parser smarter using a specially-crafted regular + expression capable of handling nested tags. + +* Solved backtick issues in tag attributes by rewriting the HTML tokenizer to + be aware of code spans. All these lines should work correctly now: + + bar + bar + `` + +* Changed the parsing of HTML comments to match simply from `` + instead using of the more complicated SGML-style rule with paired `--`. + This is how most browsers parse comments and how XML defines them too. + +* `
        ` has been added to the list of block-level elements and is now + treated as an HTML block instead of being wrapped within paragraph tags. + +* Now only trim trailing newlines from code blocks, instead of trimming + all trailing whitespace characters. + +* Fixed bug where this: + + [text](http://m.com "title" ) + + wasn't working as expected, because the parser wasn't allowing for spaces + before the closing paren. + +* Filthy hack to support markdown='1' in div tags. + +* _DoAutoLinks() now supports the 'dict://' URL scheme. + +* PHP- and ASP-style processor instructions are now protected as + raw HTML blocks. + + + <% ... %> + +* Fix for escaped backticks still triggering code spans: + + There are two raw backticks here: \` and here: \`, not a code span + + +Extra 1.0 - 5 September 2005 + +* Added support for setting the id attributes for headers like this: + + Header 1 {#header1} + ======== + + ## Header 2 ## {#header2} + + This only work only for headers for now. + +* Tables will now work correctly as the first element of a definition + list. For example, this input: + + Term + + : Header | Header + ------- | ------- + Cell | Cell + + used to produce no definition list and a table where the first + header was named ": Header". This is now fixed. + +* Fix for a problem where a paragraph following a table was not + placed between `

        ` tags. + + +Extra 1.0b4 - 1 August 2005 + +* Fixed some issues where whitespace around HTML blocks were trigging + empty paragraph tags. + +* Fixed an HTML block parsing issue that would cause a block element + following a code span or block with unmatched opening bracket to be + placed inside a paragraph. + +* Removed some PHP notices that could appear when parsing definition + lists and tables with PHP notice reporting flag set. + + +Extra 1.0b3 - 29 July 2005 + +* Definition lists now require a blank line before each term. Solves + an ambiguity where the last line of lazy-indented definitions could + be mistaken by PHP Markdown as a new term in the list. + +* Definition lists now support multiple terms per definition. + +* Some special tags were replaced in the output by their md5 hash + key. Things such as this now work as expected: + + ## Header ## + + +Extra 1.0b2 - 26 July 2005 + +* Definition lists can now take two or more definitions for one term. + This should have been the case before, but a bug prevented this + from working right. + +* Fixed a problem where single column table with a pipe only at the + end where not parsed as table. Here is such a table: + + | header + | ------ + | cell + +* Fixed problems with empty cells in the first column of a table with + no leading pipe, like this one: + + header | header + ------ | ------ + | cell + +* Code spans containing pipes did not within a table. This is now + fixed by parsing code spans before splitting rows into cells. + +* Added the pipe character to the backlash escape character lists. + +Extra 1.0b1 (25 Jun 2005) + +* First public release of PHP Markdown Extra. + + +Copyright and License +--------------------- + +PHP Markdown & Extra +Copyright (c) 2004-2009 Michel Fortin + +All rights reserved. + +Based on Markdown +Copyright (c) 2003-2005 John Gruber + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the + distribution. + +* Neither the name "Markdown" nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +This software is provided by the copyright holders and contributors "as +is" and any express or implied warranties, including, but not limited +to, the implied warranties of merchantability and fitness for a +particular purpose are disclaimed. In no event shall the copyright owner +or contributors be liable for any direct, indirect, incidental, special, +exemplary, or consequential damages (including, but not limited to, +procurement of substitute goods or services; loss of use, data, or +profits; or business interruption) however caused and on any theory of +liability, whether in contract, strict liability, or tort (including +negligence or otherwise) arising in any way out of the use of this +software, even if advised of the possibility of such damage. diff --git a/_piecrust/libs/MarkdownExtra/markdown.php b/_piecrust/libs/MarkdownExtra/markdown.php new file mode 100644 index 0000000..ee3dddb --- /dev/null +++ b/_piecrust/libs/MarkdownExtra/markdown.php @@ -0,0 +1,2932 @@ + +# +# Original Markdown +# Copyright (c) 2004-2006 John Gruber +# +# + + +define( 'MARKDOWN_VERSION', "1.0.1n" ); # Sat 10 Oct 2009 +define( 'MARKDOWNEXTRA_VERSION', "1.2.4" ); # Sat 10 Oct 2009 + + +# +# Global default settings: +# + +# Change to ">" for HTML output +@define( 'MARKDOWN_EMPTY_ELEMENT_SUFFIX', " />"); + +# Define the width of a tab for code blocks. +@define( 'MARKDOWN_TAB_WIDTH', 4 ); + +# Optional title attribute for footnote links and backlinks. +@define( 'MARKDOWN_FN_LINK_TITLE', "" ); +@define( 'MARKDOWN_FN_BACKLINK_TITLE', "" ); + +# Optional class attribute for footnote links and backlinks. +@define( 'MARKDOWN_FN_LINK_CLASS', "" ); +@define( 'MARKDOWN_FN_BACKLINK_CLASS', "" ); + + +# +# WordPress settings: +# + +# Change to false to remove Markdown from posts and/or comments. +@define( 'MARKDOWN_WP_POSTS', true ); +@define( 'MARKDOWN_WP_COMMENTS', true ); + + + +### Standard Function Interface ### + +@define( 'MARKDOWN_PARSER_CLASS', 'MarkdownExtra_Parser' ); + +function Markdown($text) { +# +# Initialize the parser and return the result of its transform method. +# + # Setup static parser variable. + static $parser; + if (!isset($parser)) { + $parser_class = MARKDOWN_PARSER_CLASS; + $parser = new $parser_class; + } + + # Transform text using parser. + return $parser->transform($text); +} + + +### WordPress Plugin Interface ### + +/* +Plugin Name: Markdown Extra +Plugin URI: http://michelf.com/projects/php-markdown/ +Description: Markdown syntax allows you to write using an easy-to-read, easy-to-write plain text format. Based on the original Perl version by John Gruber. More... +Version: 1.2.4 +Author: Michel Fortin +Author URI: http://michelf.com/ +*/ + +if (isset($wp_version)) { + # More details about how it works here: + # + + # Post content and excerpts + # - Remove WordPress paragraph generator. + # - Run Markdown on excerpt, then remove all tags. + # - Add paragraph tag around the excerpt, but remove it for the excerpt rss. + if (MARKDOWN_WP_POSTS) { + remove_filter('the_content', 'wpautop'); + remove_filter('the_content_rss', 'wpautop'); + remove_filter('the_excerpt', 'wpautop'); + add_filter('the_content', 'mdwp_MarkdownPost', 6); + add_filter('the_content_rss', 'mdwp_MarkdownPost', 6); + add_filter('get_the_excerpt', 'mdwp_MarkdownPost', 6); + add_filter('get_the_excerpt', 'trim', 7); + add_filter('the_excerpt', 'mdwp_add_p'); + add_filter('the_excerpt_rss', 'mdwp_strip_p'); + + remove_filter('content_save_pre', 'balanceTags', 50); + remove_filter('excerpt_save_pre', 'balanceTags', 50); + add_filter('the_content', 'balanceTags', 50); + add_filter('get_the_excerpt', 'balanceTags', 9); + } + + # Add a footnote id prefix to posts when inside a loop. + function mdwp_MarkdownPost($text) { + static $parser; + if (!$parser) { + $parser_class = MARKDOWN_PARSER_CLASS; + $parser = new $parser_class; + } + if (is_single() || is_page() || is_feed()) { + $parser->fn_id_prefix = ""; + } else { + $parser->fn_id_prefix = get_the_ID() . "."; + } + return $parser->transform($text); + } + + # Comments + # - Remove WordPress paragraph generator. + # - Remove WordPress auto-link generator. + # - Scramble important tags before passing them to the kses filter. + # - Run Markdown on excerpt then remove paragraph tags. + if (MARKDOWN_WP_COMMENTS) { + remove_filter('comment_text', 'wpautop', 30); + remove_filter('comment_text', 'make_clickable'); + add_filter('pre_comment_content', 'Markdown', 6); + add_filter('pre_comment_content', 'mdwp_hide_tags', 8); + add_filter('pre_comment_content', 'mdwp_show_tags', 12); + add_filter('get_comment_text', 'Markdown', 6); + add_filter('get_comment_excerpt', 'Markdown', 6); + add_filter('get_comment_excerpt', 'mdwp_strip_p', 7); + + global $mdwp_hidden_tags, $mdwp_placeholders; + $mdwp_hidden_tags = explode(' ', + '

         
      4. '); + $mdwp_placeholders = explode(' ', str_rot13( + 'pEj07ZbbBZ U1kqgh4w4p pre2zmeN6K QTi31t9pre ol0MP1jzJR '. + 'ML5IjmbRol ulANi1NsGY J7zRLJqPul liA8ctl16T K9nhooUHli')); + } + + function mdwp_add_p($text) { + if (!preg_match('{^$|^<(p|ul|ol|dl|pre|blockquote)>}i', $text)) { + $text = '

        '.$text.'

        '; + $text = preg_replace('{\n{2,}}', "

        \n\n

        ", $text); + } + return $text; + } + + function mdwp_strip_p($t) { return preg_replace('{}i', '', $t); } + + function mdwp_hide_tags($text) { + global $mdwp_hidden_tags, $mdwp_placeholders; + return str_replace($mdwp_hidden_tags, $mdwp_placeholders, $text); + } + function mdwp_show_tags($text) { + global $mdwp_hidden_tags, $mdwp_placeholders; + return str_replace($mdwp_placeholders, $mdwp_hidden_tags, $text); + } +} + + +### bBlog Plugin Info ### + +function identify_modifier_markdown() { + return array( + 'name' => 'markdown', + 'type' => 'modifier', + 'nicename' => 'PHP Markdown Extra', + 'description' => 'A text-to-HTML conversion tool for web writers', + 'authors' => 'Michel Fortin and John Gruber', + 'licence' => 'GPL', + 'version' => MARKDOWNEXTRA_VERSION, + 'help' => 'Markdown syntax allows you to write using an easy-to-read, easy-to-write plain text format. Based on the original Perl version by John Gruber. More...', + ); +} + + +### Smarty Modifier Interface ### + +function smarty_modifier_markdown($text) { + return Markdown($text); +} + + +### Textile Compatibility Mode ### + +# Rename this file to "classTextile.php" and it can replace Textile everywhere. + +if (strcasecmp(substr(__FILE__, -16), "classTextile.php") == 0) { + # Try to include PHP SmartyPants. Should be in the same directory. + @include_once 'smartypants.php'; + # Fake Textile class. It calls Markdown instead. + class Textile { + function TextileThis($text, $lite='', $encode='') { + if ($lite == '' && $encode == '') $text = Markdown($text); + if (function_exists('SmartyPants')) $text = SmartyPants($text); + return $text; + } + # Fake restricted version: restrictions are not supported for now. + function TextileRestricted($text, $lite='', $noimage='') { + return $this->TextileThis($text, $lite); + } + # Workaround to ensure compatibility with TextPattern 4.0.3. + function blockLite($text) { return $text; } + } +} + + + +# +# Markdown Parser Class +# + +class Markdown_Parser { + + # Regex to match balanced [brackets]. + # Needed to insert a maximum bracked depth while converting to PHP. + var $nested_brackets_depth = 6; + var $nested_brackets_re; + + var $nested_url_parenthesis_depth = 4; + var $nested_url_parenthesis_re; + + # Table of hash values for escaped characters: + var $escape_chars = '\`*_{}[]()>#+-.!'; + var $escape_chars_re; + + # Change to ">" for HTML output. + var $empty_element_suffix = MARKDOWN_EMPTY_ELEMENT_SUFFIX; + var $tab_width = MARKDOWN_TAB_WIDTH; + + # Change to `true` to disallow markup or entities. + var $no_markup = false; + var $no_entities = false; + + # Predefined urls and titles for reference links and images. + var $predef_urls = array(); + var $predef_titles = array(); + + + function Markdown_Parser() { + # + # Constructor function. Initialize appropriate member variables. + # + $this->_initDetab(); + $this->prepareItalicsAndBold(); + + $this->nested_brackets_re = + str_repeat('(?>[^\[\]]+|\[', $this->nested_brackets_depth). + str_repeat('\])*', $this->nested_brackets_depth); + + $this->nested_url_parenthesis_re = + str_repeat('(?>[^()\s]+|\(', $this->nested_url_parenthesis_depth). + str_repeat('(?>\)))*', $this->nested_url_parenthesis_depth); + + $this->escape_chars_re = '['.preg_quote($this->escape_chars).']'; + + # Sort document, block, and span gamut in ascendent priority order. + asort($this->document_gamut); + asort($this->block_gamut); + asort($this->span_gamut); + } + + + # Internal hashes used during transformation. + var $urls = array(); + var $titles = array(); + var $html_hashes = array(); + + # Status flag to avoid invalid nesting. + var $in_anchor = false; + + + function setup() { + # + # Called before the transformation process starts to setup parser + # states. + # + # Clear global hashes. + $this->urls = $this->predef_urls; + $this->titles = $this->predef_titles; + $this->html_hashes = array(); + + $in_anchor = false; + } + + function teardown() { + # + # Called after the transformation process to clear any variable + # which may be taking up memory unnecessarly. + # + $this->urls = array(); + $this->titles = array(); + $this->html_hashes = array(); + } + + + function transform($text) { + # + # Main function. Performs some preprocessing on the input text + # and pass it through the document gamut. + # + $this->setup(); + + # Remove UTF-8 BOM and marker character in input, if present. + $text = preg_replace('{^\xEF\xBB\xBF|\x1A}', '', $text); + + # Standardize line endings: + # DOS to Unix and Mac to Unix + $text = preg_replace('{\r\n?}', "\n", $text); + + # Make sure $text ends with a couple of newlines: + $text .= "\n\n"; + + # Convert all tabs to spaces. + $text = $this->detab($text); + + # Turn block-level HTML blocks into hash entries + $text = $this->hashHTMLBlocks($text); + + # Strip any lines consisting only of spaces and tabs. + # This makes subsequent regexen easier to write, because we can + # match consecutive blank lines with /\n+/ instead of something + # contorted like /[ ]*\n+/ . + $text = preg_replace('/^[ ]+$/m', '', $text); + + # Run document gamut methods. + foreach ($this->document_gamut as $method => $priority) { + $text = $this->$method($text); + } + + $this->teardown(); + + return $text . "\n"; + } + + var $document_gamut = array( + # Strip link definitions, store in hashes. + "stripLinkDefinitions" => 20, + + "runBasicBlockGamut" => 30, + ); + + + function stripLinkDefinitions($text) { + # + # Strips link definitions from text, stores the URLs and titles in + # hash references. + # + $less_than_tab = $this->tab_width - 1; + + # Link defs are in the form: ^[id]: url "optional title" + $text = preg_replace_callback('{ + ^[ ]{0,'.$less_than_tab.'}\[(.+)\][ ]?: # id = $1 + [ ]* + \n? # maybe *one* newline + [ ]* + (?: + <(.+?)> # url = $2 + | + (\S+?) # url = $3 + ) + [ ]* + \n? # maybe one newline + [ ]* + (?: + (?<=\s) # lookbehind for whitespace + ["(] + (.*?) # title = $4 + [")] + [ ]* + )? # title is optional + (?:\n+|\Z) + }xm', + array(&$this, '_stripLinkDefinitions_callback'), + $text); + return $text; + } + function _stripLinkDefinitions_callback($matches) { + $link_id = strtolower($matches[1]); + $url = $matches[2] == '' ? $matches[3] : $matches[2]; + $this->urls[$link_id] = $url; + $this->titles[$link_id] =& $matches[4]; + return ''; # String that will replace the block + } + + + function hashHTMLBlocks($text) { + if ($this->no_markup) return $text; + + $less_than_tab = $this->tab_width - 1; + + # Hashify HTML blocks: + # We only want to do this for block-level HTML tags, such as headers, + # lists, and tables. That's because we still want to wrap

        s around + # "paragraphs" that are wrapped in non-block-level tags, such as anchors, + # phrase emphasis, and spans. The list of tags we're looking for is + # hard-coded: + # + # * List "a" is made of tags which can be both inline or block-level. + # These will be treated block-level when the start tag is alone on + # its line, otherwise they're not matched here and will be taken as + # inline later. + # * List "b" is made of tags which are always block-level; + # + $block_tags_a_re = 'ins|del'; + $block_tags_b_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|'. + 'script|noscript|form|fieldset|iframe|math'; + + # Regular expression for the content of a block tag. + $nested_tags_level = 4; + $attr = ' + (?> # optional tag attributes + \s # starts with whitespace + (?> + [^>"/]+ # text outside quotes + | + /+(?!>) # slash not followed by ">" + | + "[^"]*" # text inside double quotes (tolerate ">") + | + \'[^\']*\' # text inside single quotes (tolerate ">") + )* + )? + '; + $content = + str_repeat(' + (?> + [^<]+ # content without tag + | + <\2 # nested opening tag + '.$attr.' # attributes + (?> + /> + | + >', $nested_tags_level). # end of opening tag + '.*?'. # last level nested tag content + str_repeat(' + # closing nested tag + ) + | + <(?!/\2\s*> # other tags with a different name + ) + )*', + $nested_tags_level); + $content2 = str_replace('\2', '\3', $content); + + # First, look for nested blocks, e.g.: + #

        + #
        + # tags for inner block must be indented. + #
        + #
        + # + # The outermost tags must start at the left margin for this to match, and + # the inner nested divs must be indented. + # We need to do this before the next, more liberal match, because the next + # match will start at the first `
        ` and stop at the first `
        `. + $text = preg_replace_callback('{(?> + (?> + (?<=\n\n) # Starting after a blank line + | # or + \A\n? # the beginning of the doc + ) + ( # save in $1 + + # Match from `\n` to `\n`, handling nested tags + # in between. + + [ ]{0,'.$less_than_tab.'} + <('.$block_tags_b_re.')# start tag = $2 + '.$attr.'> # attributes followed by > and \n + '.$content.' # content, support nesting + # the matching end tag + [ ]* # trailing spaces/tabs + (?=\n+|\Z) # followed by a newline or end of document + + | # Special version for tags of group a. + + [ ]{0,'.$less_than_tab.'} + <('.$block_tags_a_re.')# start tag = $3 + '.$attr.'>[ ]*\n # attributes followed by > + '.$content2.' # content, support nesting + # the matching end tag + [ ]* # trailing spaces/tabs + (?=\n+|\Z) # followed by a newline or end of document + + | # Special case just for
        . It was easier to make a special + # case than to make the other regex more complicated. + + [ ]{0,'.$less_than_tab.'} + <(hr) # start tag = $2 + '.$attr.' # attributes + /?> # the matching end tag + [ ]* + (?=\n{2,}|\Z) # followed by a blank line or end of document + + | # Special case for standalone HTML comments: + + [ ]{0,'.$less_than_tab.'} + (?s: + + ) + [ ]* + (?=\n{2,}|\Z) # followed by a blank line or end of document + + | # PHP and ASP-style processor instructions ( + ) + [ ]* + (?=\n{2,}|\Z) # followed by a blank line or end of document + + ) + )}Sxmi', + array(&$this, '_hashHTMLBlocks_callback'), + $text); + + return $text; + } + function _hashHTMLBlocks_callback($matches) { + $text = $matches[1]; + $key = $this->hashBlock($text); + return "\n\n$key\n\n"; + } + + + function hashPart($text, $boundary = 'X') { + # + # Called whenever a tag must be hashed when a function insert an atomic + # element in the text stream. Passing $text to through this function gives + # a unique text-token which will be reverted back when calling unhash. + # + # The $boundary argument specify what character should be used to surround + # the token. By convension, "B" is used for block elements that needs not + # to be wrapped into paragraph tags at the end, ":" is used for elements + # that are word separators and "X" is used in the general case. + # + # Swap back any tag hash found in $text so we do not have to `unhash` + # multiple times at the end. + $text = $this->unhash($text); + + # Then hash the block. + static $i = 0; + $key = "$boundary\x1A" . ++$i . $boundary; + $this->html_hashes[$key] = $text; + return $key; # String that will replace the tag. + } + + + function hashBlock($text) { + # + # Shortcut function for hashPart with block-level boundaries. + # + return $this->hashPart($text, 'B'); + } + + + var $block_gamut = array( + # + # These are all the transformations that form block-level + # tags like paragraphs, headers, and list items. + # + "doHeaders" => 10, + "doHorizontalRules" => 20, + + "doLists" => 40, + "doCodeBlocks" => 50, + "doBlockQuotes" => 60, + ); + + function runBlockGamut($text) { + # + # Run block gamut tranformations. + # + # We need to escape raw HTML in Markdown source before doing anything + # else. This need to be done for each block, and not only at the + # begining in the Markdown function since hashed blocks can be part of + # list items and could have been indented. Indented blocks would have + # been seen as a code block in a previous pass of hashHTMLBlocks. + $text = $this->hashHTMLBlocks($text); + + return $this->runBasicBlockGamut($text); + } + + function runBasicBlockGamut($text) { + # + # Run block gamut tranformations, without hashing HTML blocks. This is + # useful when HTML blocks are known to be already hashed, like in the first + # whole-document pass. + # + foreach ($this->block_gamut as $method => $priority) { + $text = $this->$method($text); + } + + # Finally form paragraph and restore hashed blocks. + $text = $this->formParagraphs($text); + + return $text; + } + + + function doHorizontalRules($text) { + # Do Horizontal Rules: + return preg_replace( + '{ + ^[ ]{0,3} # Leading space + ([-*_]) # $1: First marker + (?> # Repeated marker group + [ ]{0,2} # Zero, one, or two spaces. + \1 # Marker character + ){2,} # Group repeated at least twice + [ ]* # Tailing spaces + $ # End of line. + }mx', + "\n".$this->hashBlock("empty_element_suffix")."\n", + $text); + } + + + var $span_gamut = array( + # + # These are all the transformations that occur *within* block-level + # tags like paragraphs, headers, and list items. + # + # Process character escapes, code spans, and inline HTML + # in one shot. + "parseSpan" => -30, + + # Process anchor and image tags. Images must come first, + # because ![foo][f] looks like an anchor. + "doImages" => 10, + "doAnchors" => 20, + + # Make links out of things like `` + # Must come after doAnchors, because you can use < and > + # delimiters in inline links like [this](). + "doAutoLinks" => 30, + "encodeAmpsAndAngles" => 40, + + "doItalicsAndBold" => 50, + "doHardBreaks" => 60, + ); + + function runSpanGamut($text) { + # + # Run span gamut tranformations. + # + foreach ($this->span_gamut as $method => $priority) { + $text = $this->$method($text); + } + + return $text; + } + + + function doHardBreaks($text) { + # Do hard breaks: + return preg_replace_callback('/ {2,}\n/', + array(&$this, '_doHardBreaks_callback'), $text); + } + function _doHardBreaks_callback($matches) { + return $this->hashPart("empty_element_suffix\n"); + } + + + function doAnchors($text) { + # + # Turn Markdown link shortcuts into XHTML tags. + # + if ($this->in_anchor) return $text; + $this->in_anchor = true; + + # + # First, handle reference-style links: [link text] [id] + # + $text = preg_replace_callback('{ + ( # wrap whole match in $1 + \[ + ('.$this->nested_brackets_re.') # link text = $2 + \] + + [ ]? # one optional space + (?:\n[ ]*)? # one optional newline followed by spaces + + \[ + (.*?) # id = $3 + \] + ) + }xs', + array(&$this, '_doAnchors_reference_callback'), $text); + + # + # Next, inline-style links: [link text](url "optional title") + # + $text = preg_replace_callback('{ + ( # wrap whole match in $1 + \[ + ('.$this->nested_brackets_re.') # link text = $2 + \] + \( # literal paren + [ \n]* + (?: + <(.+?)> # href = $3 + | + ('.$this->nested_url_parenthesis_re.') # href = $4 + ) + [ \n]* + ( # $5 + ([\'"]) # quote char = $6 + (.*?) # Title = $7 + \6 # matching quote + [ \n]* # ignore any spaces/tabs between closing quote and ) + )? # title is optional + \) + ) + }xs', + array(&$this, '_doAnchors_inline_callback'), $text); + + # + # Last, handle reference-style shortcuts: [link text] + # These must come last in case you've also got [link text][1] + # or [link text](/foo) + # + $text = preg_replace_callback('{ + ( # wrap whole match in $1 + \[ + ([^\[\]]+) # link text = $2; can\'t contain [ or ] + \] + ) + }xs', + array(&$this, '_doAnchors_reference_callback'), $text); + + $this->in_anchor = false; + return $text; + } + function _doAnchors_reference_callback($matches) { + $whole_match = $matches[1]; + $link_text = $matches[2]; + $link_id =& $matches[3]; + + if ($link_id == "") { + # for shortcut links like [this][] or [this]. + $link_id = $link_text; + } + + # lower-case and turn embedded newlines into spaces + $link_id = strtolower($link_id); + $link_id = preg_replace('{[ ]?\n}', ' ', $link_id); + + if (isset($this->urls[$link_id])) { + $url = $this->urls[$link_id]; + $url = $this->encodeAttribute($url); + + $result = "titles[$link_id] ) ) { + $title = $this->titles[$link_id]; + $title = $this->encodeAttribute($title); + $result .= " title=\"$title\""; + } + + $link_text = $this->runSpanGamut($link_text); + $result .= ">$link_text"; + $result = $this->hashPart($result); + } + else { + $result = $whole_match; + } + return $result; + } + function _doAnchors_inline_callback($matches) { + $whole_match = $matches[1]; + $link_text = $this->runSpanGamut($matches[2]); + $url = $matches[3] == '' ? $matches[4] : $matches[3]; + $title =& $matches[7]; + + $url = $this->encodeAttribute($url); + + $result = "encodeAttribute($title); + $result .= " title=\"$title\""; + } + + $link_text = $this->runSpanGamut($link_text); + $result .= ">$link_text"; + + return $this->hashPart($result); + } + + + function doImages($text) { + # + # Turn Markdown image shortcuts into tags. + # + # + # First, handle reference-style labeled images: ![alt text][id] + # + $text = preg_replace_callback('{ + ( # wrap whole match in $1 + !\[ + ('.$this->nested_brackets_re.') # alt text = $2 + \] + + [ ]? # one optional space + (?:\n[ ]*)? # one optional newline followed by spaces + + \[ + (.*?) # id = $3 + \] + + ) + }xs', + array(&$this, '_doImages_reference_callback'), $text); + + # + # Next, handle inline images: ![alt text](url "optional title") + # Don't forget: encode * and _ + # + $text = preg_replace_callback('{ + ( # wrap whole match in $1 + !\[ + ('.$this->nested_brackets_re.') # alt text = $2 + \] + \s? # One optional whitespace character + \( # literal paren + [ \n]* + (?: + <(\S*)> # src url = $3 + | + ('.$this->nested_url_parenthesis_re.') # src url = $4 + ) + [ \n]* + ( # $5 + ([\'"]) # quote char = $6 + (.*?) # title = $7 + \6 # matching quote + [ \n]* + )? # title is optional + \) + ) + }xs', + array(&$this, '_doImages_inline_callback'), $text); + + return $text; + } + function _doImages_reference_callback($matches) { + $whole_match = $matches[1]; + $alt_text = $matches[2]; + $link_id = strtolower($matches[3]); + + if ($link_id == "") { + $link_id = strtolower($alt_text); # for shortcut links like ![this][]. + } + + $alt_text = $this->encodeAttribute($alt_text); + if (isset($this->urls[$link_id])) { + $url = $this->encodeAttribute($this->urls[$link_id]); + $result = "\"$alt_text\"";titles[$link_id])) { + $title = $this->titles[$link_id]; + $title = $this->encodeAttribute($title); + $result .= " title=\"$title\""; + } + $result .= $this->empty_element_suffix; + $result = $this->hashPart($result); + } + else { + # If there's no such link ID, leave intact: + $result = $whole_match; + } + + return $result; + } + function _doImages_inline_callback($matches) { + $whole_match = $matches[1]; + $alt_text = $matches[2]; + $url = $matches[3] == '' ? $matches[4] : $matches[3]; + $title =& $matches[7]; + + $alt_text = $this->encodeAttribute($alt_text); + $url = $this->encodeAttribute($url); + $result = "\"$alt_text\"";encodeAttribute($title); + $result .= " title=\"$title\""; # $title already quoted + } + $result .= $this->empty_element_suffix; + + return $this->hashPart($result); + } + + + function doHeaders($text) { + # Setext-style headers: + # Header 1 + # ======== + # + # Header 2 + # -------- + # + $text = preg_replace_callback('{ ^(.+?)[ ]*\n(=+|-+)[ ]*\n+ }mx', + array(&$this, '_doHeaders_callback_setext'), $text); + + # atx-style headers: + # # Header 1 + # ## Header 2 + # ## Header 2 with closing hashes ## + # ... + # ###### Header 6 + # + $text = preg_replace_callback('{ + ^(\#{1,6}) # $1 = string of #\'s + [ ]* + (.+?) # $2 = Header text + [ ]* + \#* # optional closing #\'s (not counted) + \n+ + }xm', + array(&$this, '_doHeaders_callback_atx'), $text); + + return $text; + } + function _doHeaders_callback_setext($matches) { + # Terrible hack to check we haven't found an empty list item. + if ($matches[2] == '-' && preg_match('{^-(?: |$)}', $matches[1])) + return $matches[0]; + + $level = $matches[2]{0} == '=' ? 1 : 2; + $block = "".$this->runSpanGamut($matches[1]).""; + return "\n" . $this->hashBlock($block) . "\n\n"; + } + function _doHeaders_callback_atx($matches) { + $level = strlen($matches[1]); + $block = "".$this->runSpanGamut($matches[2]).""; + return "\n" . $this->hashBlock($block) . "\n\n"; + } + + + function doLists($text) { + # + # Form HTML ordered (numbered) and unordered (bulleted) lists. + # + $less_than_tab = $this->tab_width - 1; + + # Re-usable patterns to match list item bullets and number markers: + $marker_ul_re = '[*+-]'; + $marker_ol_re = '\d+[.]'; + $marker_any_re = "(?:$marker_ul_re|$marker_ol_re)"; + + $markers_relist = array( + $marker_ul_re => $marker_ol_re, + $marker_ol_re => $marker_ul_re, + ); + + foreach ($markers_relist as $marker_re => $other_marker_re) { + # Re-usable pattern to match any entirel ul or ol list: + $whole_list_re = ' + ( # $1 = whole list + ( # $2 + ([ ]{0,'.$less_than_tab.'}) # $3 = number of spaces + ('.$marker_re.') # $4 = first list item marker + [ ]+ + ) + (?s:.+?) + ( # $5 + \z + | + \n{2,} + (?=\S) + (?! # Negative lookahead for another list item marker + [ ]* + '.$marker_re.'[ ]+ + ) + | + (?= # Lookahead for another kind of list + \n + \3 # Must have the same indentation + '.$other_marker_re.'[ ]+ + ) + ) + ) + '; // mx + + # We use a different prefix before nested lists than top-level lists. + # See extended comment in _ProcessListItems(). + + if ($this->list_level) { + $text = preg_replace_callback('{ + ^ + '.$whole_list_re.' + }mx', + array(&$this, '_doLists_callback'), $text); + } + else { + $text = preg_replace_callback('{ + (?:(?<=\n)\n|\A\n?) # Must eat the newline + '.$whole_list_re.' + }mx', + array(&$this, '_doLists_callback'), $text); + } + } + + return $text; + } + function _doLists_callback($matches) { + # Re-usable patterns to match list item bullets and number markers: + $marker_ul_re = '[*+-]'; + $marker_ol_re = '\d+[.]'; + $marker_any_re = "(?:$marker_ul_re|$marker_ol_re)"; + + $list = $matches[1]; + $list_type = preg_match("/$marker_ul_re/", $matches[4]) ? "ul" : "ol"; + + $marker_any_re = ( $list_type == "ul" ? $marker_ul_re : $marker_ol_re ); + + $list .= "\n"; + $result = $this->processListItems($list, $marker_any_re); + + $result = $this->hashBlock("<$list_type>\n" . $result . ""); + return "\n". $result ."\n\n"; + } + + var $list_level = 0; + + function processListItems($list_str, $marker_any_re) { + # + # Process the contents of a single ordered or unordered list, splitting it + # into individual list items. + # + # The $this->list_level global keeps track of when we're inside a list. + # Each time we enter a list, we increment it; when we leave a list, + # we decrement. If it's zero, we're not in a list anymore. + # + # We do this because when we're not inside a list, we want to treat + # something like this: + # + # I recommend upgrading to version + # 8. Oops, now this line is treated + # as a sub-list. + # + # As a single paragraph, despite the fact that the second line starts + # with a digit-period-space sequence. + # + # Whereas when we're inside a list (or sub-list), that line will be + # treated as the start of a sub-list. What a kludge, huh? This is + # an aspect of Markdown's syntax that's hard to parse perfectly + # without resorting to mind-reading. Perhaps the solution is to + # change the syntax rules such that sub-lists must start with a + # starting cardinal number; e.g. "1." or "a.". + + $this->list_level++; + + # trim trailing blank lines: + $list_str = preg_replace("/\n{2,}\\z/", "\n", $list_str); + + $list_str = preg_replace_callback('{ + (\n)? # leading line = $1 + (^[ ]*) # leading whitespace = $2 + ('.$marker_any_re.' # list marker and space = $3 + (?:[ ]+|(?=\n)) # space only required if item is not empty + ) + ((?s:.*?)) # list item text = $4 + (?:(\n+(?=\n))|\n) # tailing blank line = $5 + (?= \n* (\z | \2 ('.$marker_any_re.') (?:[ ]+|(?=\n)))) + }xm', + array(&$this, '_processListItems_callback'), $list_str); + + $this->list_level--; + return $list_str; + } + function _processListItems_callback($matches) { + $item = $matches[4]; + $leading_line =& $matches[1]; + $leading_space =& $matches[2]; + $marker_space = $matches[3]; + $tailing_blank_line =& $matches[5]; + + if ($leading_line || $tailing_blank_line || + preg_match('/\n{2,}/', $item)) + { + # Replace marker with the appropriate whitespace indentation + $item = $leading_space . str_repeat(' ', strlen($marker_space)) . $item; + $item = $this->runBlockGamut($this->outdent($item)."\n"); + } + else { + # Recursion for sub-lists: + $item = $this->doLists($this->outdent($item)); + $item = preg_replace('/\n+$/', '', $item); + $item = $this->runSpanGamut($item); + } + + return "
      5. " . $item . "
      6. \n"; + } + + + function doCodeBlocks($text) { + # + # Process Markdown `
        ` blocks.
        +	#
        +		$text = preg_replace_callback('{
        +				(?:\n\n|\A\n?)
        +				(	            # $1 = the code block -- one or more lines, starting with a space/tab
        +				  (?>
        +					[ ]{'.$this->tab_width.'}  # Lines must start with a tab or a tab-width of spaces
        +					.*\n+
        +				  )+
        +				)
        +				((?=^[ ]{0,'.$this->tab_width.'}\S)|\Z)	# Lookahead for non-space at line-start, or end of doc
        +			}xm',
        +			array(&$this, '_doCodeBlocks_callback'), $text);
        +
        +		return $text;
        +	}
        +	function _doCodeBlocks_callback($matches) {
        +		$codeblock = $matches[1];
        +
        +		$codeblock = $this->outdent($codeblock);
        +		$codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES);
        +
        +		# trim leading newlines and trailing newlines
        +		$codeblock = preg_replace('/\A\n+|\n+\z/', '', $codeblock);
        +
        +		$codeblock = "
        $codeblock\n
        "; + return "\n\n".$this->hashBlock($codeblock)."\n\n"; + } + + + function makeCodeSpan($code) { + # + # Create a code span markup for $code. Called from handleSpanToken. + # + $code = htmlspecialchars(trim($code), ENT_NOQUOTES); + return $this->hashPart("$code"); + } + + + var $em_relist = array( + '' => '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(?em_relist as $em => $em_re) { + foreach ($this->strong_relist as $strong => $strong_re) { + # Construct list of allowed token expressions. + $token_relist = array(); + if (isset($this->em_strong_relist["$em$strong"])) { + $token_relist[] = $this->em_strong_relist["$em$strong"]; + } + $token_relist[] = $em_re; + $token_relist[] = $strong_re; + + # Construct master expression from list. + $token_re = '{('. implode('|', $token_relist) .')}'; + $this->em_strong_prepared_relist["$em$strong"] = $token_re; + } + } + } + + function doItalicsAndBold($text) { + $token_stack = array(''); + $text_stack = array(''); + $em = ''; + $strong = ''; + $tree_char_em = false; + + while (1) { + # + # Get prepared regular expression for seraching emphasis tokens + # in current context. + # + $token_re = $this->em_strong_prepared_relist["$em$strong"]; + + # + # Each loop iteration search for the next emphasis token. + # Each token is then passed to handleSpanToken. + # + $parts = preg_split($token_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE); + $text_stack[0] .= $parts[0]; + $token =& $parts[1]; + $text =& $parts[2]; + + if (empty($token)) { + # Reached end of text span: empty stack without emitting. + # any more emphasis. + while ($token_stack[0]) { + $text_stack[1] .= array_shift($token_stack); + $text_stack[0] .= array_shift($text_stack); + } + break; + } + + $token_len = strlen($token); + if ($tree_char_em) { + # Reached closing marker while inside a three-char emphasis. + if ($token_len == 3) { + # Three-char closing marker, close em and strong. + array_shift($token_stack); + $span = array_shift($text_stack); + $span = $this->runSpanGamut($span); + $span = "$span"; + $text_stack[0] .= $this->hashPart($span); + $em = ''; + $strong = ''; + } else { + # Other closing marker: close one em or strong and + # change current token state to match the other + $token_stack[0] = str_repeat($token{0}, 3-$token_len); + $tag = $token_len == 2 ? "strong" : "em"; + $span = $text_stack[0]; + $span = $this->runSpanGamut($span); + $span = "<$tag>$span"; + $text_stack[0] = $this->hashPart($span); + $$tag = ''; # $$tag stands for $em or $strong + } + $tree_char_em = false; + } else if ($token_len == 3) { + if ($em) { + # Reached closing marker for both em and strong. + # Closing strong marker: + for ($i = 0; $i < 2; ++$i) { + $shifted_token = array_shift($token_stack); + $tag = strlen($shifted_token) == 2 ? "strong" : "em"; + $span = array_shift($text_stack); + $span = $this->runSpanGamut($span); + $span = "<$tag>$span"; + $text_stack[0] .= $this->hashPart($span); + $$tag = ''; # $$tag stands for $em or $strong + } + } else { + # Reached opening three-char emphasis marker. Push on token + # stack; will be handled by the special condition above. + $em = $token{0}; + $strong = "$em$em"; + array_unshift($token_stack, $token); + array_unshift($text_stack, ''); + $tree_char_em = true; + } + } else if ($token_len == 2) { + if ($strong) { + # Unwind any dangling emphasis marker: + if (strlen($token_stack[0]) == 1) { + $text_stack[1] .= array_shift($token_stack); + $text_stack[0] .= array_shift($text_stack); + } + # Closing strong marker: + array_shift($token_stack); + $span = array_shift($text_stack); + $span = $this->runSpanGamut($span); + $span = "$span"; + $text_stack[0] .= $this->hashPart($span); + $strong = ''; + } else { + array_unshift($token_stack, $token); + array_unshift($text_stack, ''); + $strong = $token; + } + } else { + # Here $token_len == 1 + if ($em) { + if (strlen($token_stack[0]) == 1) { + # Closing emphasis marker: + array_shift($token_stack); + $span = array_shift($text_stack); + $span = $this->runSpanGamut($span); + $span = "$span"; + $text_stack[0] .= $this->hashPart($span); + $em = ''; + } else { + $text_stack[0] .= $token; + } + } else { + array_unshift($token_stack, $token); + array_unshift($text_stack, ''); + $em = $token; + } + } + } + return $text_stack[0]; + } + + + function doBlockQuotes($text) { + $text = preg_replace_callback('/ + ( # Wrap whole match in $1 + (?> + ^[ ]*>[ ]? # ">" at the start of a line + .+\n # rest of the first line + (.+\n)* # subsequent consecutive lines + \n* # blanks + )+ + ) + /xm', + array(&$this, '_doBlockQuotes_callback'), $text); + + return $text; + } + function _doBlockQuotes_callback($matches) { + $bq = $matches[1]; + # trim one level of quoting - trim whitespace-only lines + $bq = preg_replace('/^[ ]*>[ ]?|^[ ]+$/m', '', $bq); + $bq = $this->runBlockGamut($bq); # recurse + + $bq = preg_replace('/^/m', " ", $bq); + # These leading spaces cause problem with
         content, 
        +		# so we need to fix that:
        +		$bq = preg_replace_callback('{(\s*
        .+?
        )}sx', + array(&$this, '_doBlockQuotes_callback2'), $bq); + + return "\n". $this->hashBlock("
        \n$bq\n
        ")."\n\n"; + } + function _doBlockQuotes_callback2($matches) { + $pre = $matches[1]; + $pre = preg_replace('/^ /m', '', $pre); + return $pre; + } + + + function formParagraphs($text) { + # + # Params: + # $text - string to process with html

        tags + # + # Strip leading and trailing lines: + $text = preg_replace('/\A\n+|\n+\z/', '', $text); + + $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY); + + # + # Wrap

        tags and unhashify HTML blocks + # + foreach ($grafs as $key => $value) { + if (!preg_match('/^B\x1A[0-9]+B$/', $value)) { + # Is a paragraph. + $value = $this->runSpanGamut($value); + $value = preg_replace('/^([ ]*)/', "

        ", $value); + $value .= "

        "; + $grafs[$key] = $this->unhash($value); + } + else { + # Is a block. + # Modify elements of @grafs in-place... + $graf = $value; + $block = $this->html_hashes[$graf]; + $graf = $block; +// if (preg_match('{ +// \A +// ( # $1 =
        tag +//
        ]* +// \b +// markdown\s*=\s* ([\'"]) # $2 = attr quote char +// 1 +// \2 +// [^>]* +// > +// ) +// ( # $3 = contents +// .* +// ) +// (
        ) # $4 = closing tag +// \z +// }xs', $block, $matches)) +// { +// list(, $div_open, , $div_content, $div_close) = $matches; +// +// # We can't call Markdown(), because that resets the hash; +// # that initialization code should be pulled into its own sub, though. +// $div_content = $this->hashHTMLBlocks($div_content); +// +// # Run document gamut methods on the content. +// foreach ($this->document_gamut as $method => $priority) { +// $div_content = $this->$method($div_content); +// } +// +// $div_open = preg_replace( +// '{\smarkdown\s*=\s*([\'"]).+?\1}', '', $div_open); +// +// $graf = $div_open . "\n" . $div_content . "\n" . $div_close; +// } + $grafs[$key] = $graf; + } + } + + return implode("\n\n", $grafs); + } + + + function encodeAttribute($text) { + # + # Encode text for a double-quoted HTML attribute. This function + # is *not* suitable for attributes enclosed in single quotes. + # + $text = $this->encodeAmpsAndAngles($text); + $text = str_replace('"', '"', $text); + return $text; + } + + + function encodeAmpsAndAngles($text) { + # + # Smart processing for ampersands and angle brackets that need to + # be encoded. Valid character entities are left alone unless the + # no-entities mode is set. + # + if ($this->no_entities) { + $text = str_replace('&', '&', $text); + } else { + # Ampersand-encoding based entirely on Nat Irons's Amputator + # MT plugin: + $text = preg_replace('/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/', + '&', $text);; + } + # Encode remaining <'s + $text = str_replace('<', '<', $text); + + return $text; + } + + + function doAutoLinks($text) { + $text = preg_replace_callback('{<((https?|ftp|dict):[^\'">\s]+)>}i', + array(&$this, '_doAutoLinks_url_callback'), $text); + + # Email addresses: + $text = preg_replace_callback('{ + < + (?:mailto:)? + ( + (?: + [-!#$%&\'*+/=?^_`.{|}~\w\x80-\xFF]+ + | + ".*?" + ) + \@ + (?: + [-a-z0-9\x80-\xFF]+(\.[-a-z0-9\x80-\xFF]+)*\.[a-z]+ + | + \[[\d.a-fA-F:]+\] # IPv4 & IPv6 + ) + ) + > + }xi', + array(&$this, '_doAutoLinks_email_callback'), $text); + + return $text; + } + function _doAutoLinks_url_callback($matches) { + $url = $this->encodeAttribute($matches[1]); + $link = "$url"; + return $this->hashPart($link); + } + function _doAutoLinks_email_callback($matches) { + $address = $matches[1]; + $link = $this->encodeEmailAddress($address); + return $this->hashPart($link); + } + + + function encodeEmailAddress($addr) { + # + # Input: an email address, e.g. "foo@example.com" + # + # Output: the email address as a mailto link, with each character + # of the address encoded as either a decimal or hex entity, in + # the hopes of foiling most address harvesting spam bots. E.g.: + # + #

        foo@exampl + # e.com

        + # + # Based by a filter by Matthew Wickline, posted to BBEdit-Talk. + # With some optimizations by Milian Wolff. + # + $addr = "mailto:" . $addr; + $chars = preg_split('/(? $char) { + $ord = ord($char); + # Ignore non-ascii chars. + if ($ord < 128) { + $r = ($seed * (1 + $key)) % 100; # Pseudo-random function. + # roughly 10% raw, 45% hex, 45% dec + # '@' *must* be encoded. I insist. + if ($r > 90 && $char != '@') /* do nothing */; + else if ($r < 45) $chars[$key] = '&#x'.dechex($ord).';'; + else $chars[$key] = '&#'.$ord.';'; + } + } + + $addr = implode('', $chars); + $text = implode('', array_slice($chars, 7)); # text without `mailto:` + $addr = "$text"; + + return $addr; + } + + + function parseSpan($str) { + # + # Take the string $str and parse it into tokens, hashing embeded HTML, + # escaped characters and handling code spans. + # + $output = ''; + + $span_re = '{ + ( + \\\\'.$this->escape_chars_re.' + | + (?no_markup ? '' : ' + | + # comment + | + <\?.*?\?> | <%.*?%> # processing instruction + | + <[/!$]?[-a-zA-Z0-9:_]+ # regular tags + (?> + \s + (?>[^"\'>]+|"[^"]*"|\'[^\']*\')* + )? + > + ').' + ) + }xs'; + + while (1) { + # + # Each loop iteration seach for either the next tag, the next + # openning code span marker, or the next escaped character. + # Each token is then passed to handleSpanToken. + # + $parts = preg_split($span_re, $str, 2, PREG_SPLIT_DELIM_CAPTURE); + + # Create token from text preceding tag. + if ($parts[0] != "") { + $output .= $parts[0]; + } + + # Check if we reach the end. + if (isset($parts[1])) { + $output .= $this->handleSpanToken($parts[1], $parts[2]); + $str = $parts[2]; + } + else { + break; + } + } + + return $output; + } + + + function handleSpanToken($token, &$str) { + # + # Handle $token provided by parseSpan by determining its nature and + # returning the corresponding value that should replace it. + # + switch ($token{0}) { + case "\\": + return $this->hashPart("&#". ord($token{1}). ";"); + case "`": + # Search for end marker in remaining text. + if (preg_match('/^(.*?[^`])'.preg_quote($token).'(?!`)(.*)$/sm', + $str, $matches)) + { + $str = $matches[2]; + $codespan = $this->makeCodeSpan($matches[1]); + return $this->hashPart($codespan); + } + return $token; // return as text since no ending marker found. + default: + return $this->hashPart($token); + } + } + + + function outdent($text) { + # + # Remove one level of line-leading tabs or spaces + # + return preg_replace('/^(\t|[ ]{1,'.$this->tab_width.'})/m', '', $text); + } + + + # String length function for detab. `_initDetab` will create a function to + # hanlde UTF-8 if the default function does not exist. + var $utf8_strlen = 'mb_strlen'; + + function detab($text) { + # + # Replace tabs with the appropriate amount of space. + # + # For each line we separate the line in blocks delemited by + # tab characters. Then we reconstruct every line by adding the + # appropriate number of space between each blocks. + + $text = preg_replace_callback('/^.*\t.*$/m', + array(&$this, '_detab_callback'), $text); + + return $text; + } + function _detab_callback($matches) { + $line = $matches[0]; + $strlen = $this->utf8_strlen; # strlen function for UTF-8. + + # Split in blocks. + $blocks = explode("\t", $line); + # Add each blocks to the line. + $line = $blocks[0]; + unset($blocks[0]); # Do not add first block twice. + foreach ($blocks as $block) { + # Calculate amount of space, insert spaces, insert block. + $amount = $this->tab_width - + $strlen($line, 'UTF-8') % $this->tab_width; + $line .= str_repeat(" ", $amount) . $block; + } + return $line; + } + function _initDetab() { + # + # Check for the availability of the function in the `utf8_strlen` property + # (initially `mb_strlen`). If the function is not available, create a + # function that will loosely count the number of UTF-8 characters with a + # regular expression. + # + if (function_exists($this->utf8_strlen)) return; + $this->utf8_strlen = create_function('$text', 'return preg_match_all( + "/[\\\\x00-\\\\xBF]|[\\\\xC0-\\\\xFF][\\\\x80-\\\\xBF]*/", + $text, $m);'); + } + + + function unhash($text) { + # + # Swap back in all the tags hashed by _HashHTMLBlocks. + # + return preg_replace_callback('/(.)\x1A[0-9]+\1/', + array(&$this, '_unhash_callback'), $text); + } + function _unhash_callback($matches) { + return $this->html_hashes[$matches[0]]; + } + +} + + +# +# Markdown Extra Parser Class +# + +class MarkdownExtra_Parser extends Markdown_Parser { + + # Prefix for footnote ids. + var $fn_id_prefix = ""; + + # Optional title attribute for footnote links and backlinks. + var $fn_link_title = MARKDOWN_FN_LINK_TITLE; + var $fn_backlink_title = MARKDOWN_FN_BACKLINK_TITLE; + + # Optional class attribute for footnote links and backlinks. + var $fn_link_class = MARKDOWN_FN_LINK_CLASS; + var $fn_backlink_class = MARKDOWN_FN_BACKLINK_CLASS; + + # Predefined abbreviations. + var $predef_abbr = array(); + + + function MarkdownExtra_Parser() { + # + # Constructor function. Initialize the parser object. + # + # Add extra escapable characters before parent constructor + # initialize the table. + $this->escape_chars .= ':|'; + + # Insert extra document, block, and span transformations. + # Parent constructor will do the sorting. + $this->document_gamut += array( + "doFencedCodeBlocks" => 5, + "stripFootnotes" => 15, + "stripAbbreviations" => 25, + "appendFootnotes" => 50, + ); + $this->block_gamut += array( + "doFencedCodeBlocks" => 5, + "doTables" => 15, + "doDefLists" => 45, + ); + $this->span_gamut += array( + "doFootnotes" => 5, + "doAbbreviations" => 70, + ); + + parent::Markdown_Parser(); + } + + + # Extra variables used during extra transformations. + var $footnotes = array(); + var $footnotes_ordered = array(); + var $abbr_desciptions = array(); + var $abbr_word_re = ''; + + # Give the current footnote number. + var $footnote_counter = 1; + + + function setup() { + # + # Setting up Extra-specific variables. + # + parent::setup(); + + $this->footnotes = array(); + $this->footnotes_ordered = array(); + $this->abbr_desciptions = array(); + $this->abbr_word_re = ''; + $this->footnote_counter = 1; + + foreach ($this->predef_abbr as $abbr_word => $abbr_desc) { + if ($this->abbr_word_re) + $this->abbr_word_re .= '|'; + $this->abbr_word_re .= preg_quote($abbr_word); + $this->abbr_desciptions[$abbr_word] = trim($abbr_desc); + } + } + + function teardown() { + # + # Clearing Extra-specific variables. + # + $this->footnotes = array(); + $this->footnotes_ordered = array(); + $this->abbr_desciptions = array(); + $this->abbr_word_re = ''; + + parent::teardown(); + } + + + ### HTML Block Parser ### + + # Tags that are always treated as block tags: + var $block_tags_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend'; + + # Tags treated as block tags only if the opening tag is alone on it's line: + var $context_block_tags_re = 'script|noscript|math|ins|del'; + + # Tags where markdown="1" default to span mode: + var $contain_span_tags_re = 'p|h[1-6]|li|dd|dt|td|th|legend|address'; + + # Tags which must not have their contents modified, no matter where + # they appear: + var $clean_tags_re = 'script|math'; + + # Tags that do not need to be closed. + var $auto_close_tags_re = 'hr|img'; + + + function hashHTMLBlocks($text) { + # + # Hashify HTML Blocks and "clean tags". + # + # We only want to do this for block-level HTML tags, such as headers, + # lists, and tables. That's because we still want to wrap

        s around + # "paragraphs" that are wrapped in non-block-level tags, such as anchors, + # phrase emphasis, and spans. The list of tags we're looking for is + # hard-coded. + # + # This works by calling _HashHTMLBlocks_InMarkdown, which then calls + # _HashHTMLBlocks_InHTML when it encounter block tags. When the markdown="1" + # attribute is found whitin a tag, _HashHTMLBlocks_InHTML calls back + # _HashHTMLBlocks_InMarkdown to handle the Markdown syntax within the tag. + # These two functions are calling each other. It's recursive! + # + # + # Call the HTML-in-Markdown hasher. + # + list($text, ) = $this->_hashHTMLBlocks_inMarkdown($text); + + return $text; + } + function _hashHTMLBlocks_inMarkdown($text, $indent = 0, + $enclosing_tag_re = '', $span = false) + { + # + # Parse markdown text, calling _HashHTMLBlocks_InHTML for block tags. + # + # * $indent is the number of space to be ignored when checking for code + # blocks. This is important because if we don't take the indent into + # account, something like this (which looks right) won't work as expected: + # + #

        + #
        + # Hello World. <-- Is this a Markdown code block or text? + #
        <-- Is this a Markdown code block or a real tag? + #
        + # + # If you don't like this, just don't indent the tag on which + # you apply the markdown="1" attribute. + # + # * If $enclosing_tag_re is not empty, stops at the first unmatched closing + # tag with that name. Nested tags supported. + # + # * If $span is true, text inside must treated as span. So any double + # newline will be replaced by a single newline so that it does not create + # paragraphs. + # + # Returns an array of that form: ( processed text , remaining text ) + # + if ($text === '') return array('', ''); + + # Regex to check for the presense of newlines around a block tag. + $newline_before_re = '/(?:^\n?|\n\n)*$/'; + $newline_after_re = + '{ + ^ # Start of text following the tag. + (?>[ ]*)? # Optional comment. + [ ]*\n # Must be followed by newline. + }xs'; + + # Regex to match any tag. + $block_tag_re = + '{ + ( # $2: Capture hole tag. + # Tag name. + '.$this->block_tags_re.' | + '.$this->context_block_tags_re.' | + '.$this->clean_tags_re.' | + (?!\s)'.$enclosing_tag_re.' + ) + (?: + (?=[\s"\'/a-zA-Z0-9]) # Allowed characters after tag name. + (?> + ".*?" | # Double quotes (can contain `>`) + \'.*?\' | # Single quotes (can contain `>`) + .+? # Anything but quotes and `>`. + )*? + )? + > # End of tag. + | + # HTML Comment + | + <\?.*?\?> | <%.*?%> # Processing instruction + | + # CData Block + | + # Code span marker + `+ + '. ( !$span ? ' # If not in span. + | + # Indented code block + (?: ^[ ]*\n | ^ | \n[ ]*\n ) + [ ]{'.($indent+4).'}[^\n]* \n + (?> + (?: [ ]{'.($indent+4).'}[^\n]* | [ ]* ) \n + )* + | + # Fenced code block marker + (?> ^ | \n ) + [ ]{'.($indent).'}~~~+[ ]*\n + ' : '' ). ' # End (if not is span). + ) + }xs'; + + + $depth = 0; # Current depth inside the tag tree. + $parsed = ""; # Parsed text that will be returned. + + # + # Loop through every tag until we find the closing tag of the parent + # or loop until reaching the end of text if no parent tag specified. + # + do { + # + # Split the text using the first $tag_match pattern found. + # Text before pattern will be first in the array, text after + # pattern will be at the end, and between will be any catches made + # by the pattern. + # + $parts = preg_split($block_tag_re, $text, 2, + PREG_SPLIT_DELIM_CAPTURE); + + # If in Markdown span mode, add a empty-string span-level hash + # after each newline to prevent triggering any block element. + if ($span) { + $void = $this->hashPart("", ':'); + $newline = "$void\n"; + $parts[0] = $void . str_replace("\n", $newline, $parts[0]) . $void; + } + + $parsed .= $parts[0]; # Text before current tag. + + # If end of $text has been reached. Stop loop. + if (count($parts) < 3) { + $text = ""; + break; + } + + $tag = $parts[1]; # Tag to handle. + $text = $parts[2]; # Remaining text after current tag. + $tag_re = preg_quote($tag); # For use in a regular expression. + + # + # Check for: Code span marker + # + if ($tag{0} == "`") { + # Find corresponding end marker. + $tag_re = preg_quote($tag); + if (preg_match('{^(?>.+?|\n(?!\n))*?(?.*\n)+?'.$tag_re.' *\n}', $text, + $matches)) + { + # End marker found: pass text unchanged until marker. + $parsed .= $tag . $matches[0]; + $text = substr($text, strlen($matches[0])); + } + else { + # No end marker: just skip it. + $parsed .= $tag; + } + } + # + # Check for: Opening Block level tag or + # Opening Context Block tag (like ins and del) + # used as a block tag (tag is alone on it's line). + # + else if (preg_match('{^<(?:'.$this->block_tags_re.')\b}', $tag) || + ( preg_match('{^<(?:'.$this->context_block_tags_re.')\b}', $tag) && + preg_match($newline_before_re, $parsed) && + preg_match($newline_after_re, $text) ) + ) + { + # Need to parse tag and following text using the HTML parser. + list($block_text, $text) = + $this->_hashHTMLBlocks_inHTML($tag . $text, "hashBlock", true); + + # Make sure it stays outside of any paragraph by adding newlines. + $parsed .= "\n\n$block_text\n\n"; + } + # + # Check for: Clean tag (like script, math) + # HTML Comments, processing instructions. + # + else if (preg_match('{^<(?:'.$this->clean_tags_re.')\b}', $tag) || + $tag{1} == '!' || $tag{1} == '?') + { + # Need to parse tag and following text using the HTML parser. + # (don't check for markdown attribute) + list($block_text, $text) = + $this->_hashHTMLBlocks_inHTML($tag . $text, "hashClean", false); + + $parsed .= $block_text; + } + # + # Check for: Tag with same name as enclosing tag. + # + else if ($enclosing_tag_re !== '' && + # Same name as enclosing tag. + preg_match('{^= 0); + + return array($parsed, $text); + } + function _hashHTMLBlocks_inHTML($text, $hash_method, $md_attr) { + # + # Parse HTML, calling _HashHTMLBlocks_InMarkdown for block tags. + # + # * Calls $hash_method to convert any blocks. + # * Stops when the first opening tag closes. + # * $md_attr indicate if the use of the `markdown="1"` attribute is allowed. + # (it is not inside clean tags) + # + # Returns an array of that form: ( processed text , remaining text ) + # + if ($text === '') return array('', ''); + + # Regex to match `markdown` attribute inside of a tag. + $markdown_attr_re = ' + { + \s* # Eat whitespace before the `markdown` attribute + markdown + \s*=\s* + (?> + (["\']) # $1: quote delimiter + (.*?) # $2: attribute value + \1 # matching delimiter + | + ([^\s>]*) # $3: unquoted attribute value + ) + () # $4: make $3 always defined (avoid warnings) + }xs'; + + # Regex to match any tag. + $tag_re = '{ + ( # $2: Capture hole tag. + + ".*?" | # Double quotes (can contain `>`) + \'.*?\' | # Single quotes (can contain `>`) + .+? # Anything but quotes and `>`. + )*? + )? + > # End of tag. + | + # HTML Comment + | + <\?.*?\?> | <%.*?%> # Processing instruction + | + # CData Block + ) + }xs'; + + $original_text = $text; # Save original text in case of faliure. + + $depth = 0; # Current depth inside the tag tree. + $block_text = ""; # Temporary text holder for current text. + $parsed = ""; # Parsed text that will be returned. + + # + # Get the name of the starting tag. + # (This pattern makes $base_tag_name_re safe without quoting.) + # + if (preg_match('/^<([\w:$]*)\b/', $text, $matches)) + $base_tag_name_re = $matches[1]; + + # + # Loop through every tag until we find the corresponding closing tag. + # + do { + # + # Split the text using the first $tag_match pattern found. + # Text before pattern will be first in the array, text after + # pattern will be at the end, and between will be any catches made + # by the pattern. + # + $parts = preg_split($tag_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE); + + if (count($parts) < 3) { + # + # End of $text reached with unbalenced tag(s). + # In that case, we return original text unchanged and pass the + # first character as filtered to prevent an infinite loop in the + # parent function. + # + return array($original_text{0}, substr($original_text, 1)); + } + + $block_text .= $parts[0]; # Text before current tag. + $tag = $parts[1]; # Tag to handle. + $text = $parts[2]; # Remaining text after current tag. + + # + # Check for: Auto-close tag (like
        ) + # Comments and Processing Instructions. + # + if (preg_match('{^auto_close_tags_re.')\b}', $tag) || + $tag{1} == '!' || $tag{1} == '?') + { + # Just add the tag to the block as if it was text. + $block_text .= $tag; + } + else { + # + # Increase/decrease nested tag count. Only do so if + # the tag's name match base tag's. + # + if (preg_match('{^mode = $attr_m[2] . $attr_m[3]; + $span_mode = $this->mode == 'span' || $this->mode != 'block' && + preg_match('{^<(?:'.$this->contain_span_tags_re.')\b}', $tag); + + # Calculate indent before tag. + if (preg_match('/(?:^|\n)( *?)(?! ).*?$/', $block_text, $matches)) { + $strlen = $this->utf8_strlen; + $indent = $strlen($matches[1], 'UTF-8'); + } else { + $indent = 0; + } + + # End preceding block with this tag. + $block_text .= $tag; + $parsed .= $this->$hash_method($block_text); + + # Get enclosing tag name for the ParseMarkdown function. + # (This pattern makes $tag_name_re safe without quoting.) + preg_match('/^<([\w:$]*)\b/', $tag, $matches); + $tag_name_re = $matches[1]; + + # Parse the content using the HTML-in-Markdown parser. + list ($block_text, $text) + = $this->_hashHTMLBlocks_inMarkdown($text, $indent, + $tag_name_re, $span_mode); + + # Outdent markdown text. + if ($indent > 0) { + $block_text = preg_replace("/^[ ]{1,$indent}/m", "", + $block_text); + } + + # Append tag content to parsed text. + if (!$span_mode) $parsed .= "\n\n$block_text\n\n"; + else $parsed .= "$block_text"; + + # Start over a new block. + $block_text = ""; + } + else $block_text .= $tag; + } + + } while ($depth > 0); + + # + # Hash last block text that wasn't processed inside the loop. + # + $parsed .= $this->$hash_method($block_text); + + return array($parsed, $text); + } + + + function hashClean($text) { + # + # Called whenever a tag must be hashed when a function insert a "clean" tag + # in $text, it pass through this function and is automaticaly escaped, + # blocking invalid nested overlap. + # + return $this->hashPart($text, 'C'); + } + + + function doHeaders($text) { + # + # Redefined to add id attribute support. + # + # Setext-style headers: + # Header 1 {#header1} + # ======== + # + # Header 2 {#header2} + # -------- + # + $text = preg_replace_callback( + '{ + (^.+?) # $1: Header text + (?:[ ]+\{\#([-_:a-zA-Z0-9]+)\})? # $2: Id attribute + [ ]*\n(=+|-+)[ ]*\n+ # $3: Header footer + }mx', + array(&$this, '_doHeaders_callback_setext'), $text); + + # atx-style headers: + # # Header 1 {#header1} + # ## Header 2 {#header2} + # ## Header 2 with closing hashes ## {#header3} + # ... + # ###### Header 6 {#header2} + # + $text = preg_replace_callback('{ + ^(\#{1,6}) # $1 = string of #\'s + [ ]* + (.+?) # $2 = Header text + [ ]* + \#* # optional closing #\'s (not counted) + (?:[ ]+\{\#([-_:a-zA-Z0-9]+)\})? # id attribute + [ ]* + \n+ + }xm', + array(&$this, '_doHeaders_callback_atx'), $text); + + return $text; + } + function _doHeaders_attr($attr) { + if (empty($attr)) return ""; + return " id=\"$attr\""; + } + function _doHeaders_callback_setext($matches) { + if ($matches[3] == '-' && preg_match('{^- }', $matches[1])) + return $matches[0]; + $level = $matches[3]{0} == '=' ? 1 : 2; + $attr = $this->_doHeaders_attr($id =& $matches[2]); + $block = "".$this->runSpanGamut($matches[1]).""; + return "\n" . $this->hashBlock($block) . "\n\n"; + } + function _doHeaders_callback_atx($matches) { + $level = strlen($matches[1]); + $attr = $this->_doHeaders_attr($id =& $matches[3]); + $block = "".$this->runSpanGamut($matches[2]).""; + return "\n" . $this->hashBlock($block) . "\n\n"; + } + + + function doTables($text) { + # + # Form HTML tables. + # + $less_than_tab = $this->tab_width - 1; + # + # Find tables with leading pipe. + # + # | Header 1 | Header 2 + # | -------- | -------- + # | Cell 1 | Cell 2 + # | Cell 3 | Cell 4 + # + $text = preg_replace_callback(' + { + ^ # Start of a line + [ ]{0,'.$less_than_tab.'} # Allowed whitespace. + [|] # Optional leading pipe (present) + (.+) \n # $1: Header row (at least one pipe) + + [ ]{0,'.$less_than_tab.'} # Allowed whitespace. + [|] ([ ]*[-:]+[-| :]*) \n # $2: Header underline + + ( # $3: Cells + (?> + [ ]* # Allowed whitespace. + [|] .* \n # Row content. + )* + ) + (?=\n|\Z) # Stop at final double newline. + }xm', + array(&$this, '_doTable_leadingPipe_callback'), $text); + + # + # Find tables without leading pipe. + # + # Header 1 | Header 2 + # -------- | -------- + # Cell 1 | Cell 2 + # Cell 3 | Cell 4 + # + $text = preg_replace_callback(' + { + ^ # Start of a line + [ ]{0,'.$less_than_tab.'} # Allowed whitespace. + (\S.*[|].*) \n # $1: Header row (at least one pipe) + + [ ]{0,'.$less_than_tab.'} # Allowed whitespace. + ([-:]+[ ]*[|][-| :]*) \n # $2: Header underline + + ( # $3: Cells + (?> + .* [|] .* \n # Row content + )* + ) + (?=\n|\Z) # Stop at final double newline. + }xm', + array(&$this, '_DoTable_callback'), $text); + + return $text; + } + function _doTable_leadingPipe_callback($matches) { + $head = $matches[1]; + $underline = $matches[2]; + $content = $matches[3]; + + # Remove leading pipe for each row. + $content = preg_replace('/^ *[|]/m', '', $content); + + return $this->_doTable_callback(array($matches[0], $head, $underline, $content)); + } + function _doTable_callback($matches) { + $head = $matches[1]; + $underline = $matches[2]; + $content = $matches[3]; + + # Remove any tailing pipes for each line. + $head = preg_replace('/[|] *$/m', '', $head); + $underline = preg_replace('/[|] *$/m', '', $underline); + $content = preg_replace('/[|] *$/m', '', $content); + + # Reading alignement from header underline. + $separators = preg_split('/ *[|] */', $underline); + foreach ($separators as $n => $s) { + if (preg_match('/^ *-+: *$/', $s)) $attr[$n] = ' align="right"'; + else if (preg_match('/^ *:-+: *$/', $s))$attr[$n] = ' align="center"'; + else if (preg_match('/^ *:-+ *$/', $s)) $attr[$n] = ' align="left"'; + else $attr[$n] = ''; + } + + # Parsing span elements, including code spans, character escapes, + # and inline HTML tags, so that pipes inside those gets ignored. + $head = $this->parseSpan($head); + $headers = preg_split('/ *[|] */', $head); + $col_count = count($headers); + + # Write column headers. + $text = "
        \n"; + $text .= "\n"; + $text .= "\n"; + foreach ($headers as $n => $header) + $text .= " ".$this->runSpanGamut(trim($header))."\n"; + $text .= "\n"; + $text .= "\n"; + + # Split content by row. + $rows = explode("\n", trim($content, "\n")); + + $text .= "\n"; + foreach ($rows as $row) { + # Parsing span elements, including code spans, character escapes, + # and inline HTML tags, so that pipes inside those gets ignored. + $row = $this->parseSpan($row); + + # Split row by cell. + $row_cells = preg_split('/ *[|] */', $row, $col_count); + $row_cells = array_pad($row_cells, $col_count, ''); + + $text .= "\n"; + foreach ($row_cells as $n => $cell) + $text .= " ".$this->runSpanGamut(trim($cell))."\n"; + $text .= "\n"; + } + $text .= "\n"; + $text .= "
        "; + + return $this->hashBlock($text) . "\n"; + } + + + function doDefLists($text) { + # + # Form HTML definition lists. + # + $less_than_tab = $this->tab_width - 1; + + # Re-usable pattern to match any entire dl list: + $whole_list_re = '(?> + ( # $1 = whole list + ( # $2 + [ ]{0,'.$less_than_tab.'} + ((?>.*\S.*\n)+) # $3 = defined term + \n? + [ ]{0,'.$less_than_tab.'}:[ ]+ # colon starting definition + ) + (?s:.+?) + ( # $4 + \z + | + \n{2,} + (?=\S) + (?! # Negative lookahead for another term + [ ]{0,'.$less_than_tab.'} + (?: \S.*\n )+? # defined term + \n? + [ ]{0,'.$less_than_tab.'}:[ ]+ # colon starting definition + ) + (?! # Negative lookahead for another definition + [ ]{0,'.$less_than_tab.'}:[ ]+ # colon starting definition + ) + ) + ) + )'; // mx + + $text = preg_replace_callback('{ + (?>\A\n?|(?<=\n\n)) + '.$whole_list_re.' + }mx', + array(&$this, '_doDefLists_callback'), $text); + + return $text; + } + function _doDefLists_callback($matches) { + # Re-usable patterns to match list item bullets and number markers: + $list = $matches[1]; + + # Turn double returns into triple returns, so that we can make a + # paragraph for the last item in a list, if necessary: + $result = trim($this->processDefListItems($list)); + $result = "
        \n" . $result . "\n
        "; + return $this->hashBlock($result) . "\n\n"; + } + + + function processDefListItems($list_str) { + # + # Process the contents of a single definition list, splitting it + # into individual term and definition list items. + # + $less_than_tab = $this->tab_width - 1; + + # trim trailing blank lines: + $list_str = preg_replace("/\n{2,}\\z/", "\n", $list_str); + + # Process definition terms. + $list_str = preg_replace_callback('{ + (?>\A\n?|\n\n+) # leading line + ( # definition terms = $1 + [ ]{0,'.$less_than_tab.'} # leading whitespace + (?![:][ ]|[ ]) # negative lookahead for a definition + # mark (colon) or more whitespace. + (?> \S.* \n)+? # actual term (not whitespace). + ) + (?=\n?[ ]{0,3}:[ ]) # lookahead for following line feed + # with a definition mark. + }xm', + array(&$this, '_processDefListItems_callback_dt'), $list_str); + + # Process actual definitions. + $list_str = preg_replace_callback('{ + \n(\n+)? # leading line = $1 + ( # marker space = $2 + [ ]{0,'.$less_than_tab.'} # whitespace before colon + [:][ ]+ # definition mark (colon) + ) + ((?s:.+?)) # definition text = $3 + (?= \n+ # stop at next definition mark, + (?: # next term or end of text + [ ]{0,'.$less_than_tab.'} [:][ ] | +
        | \z + ) + ) + }xm', + array(&$this, '_processDefListItems_callback_dd'), $list_str); + + return $list_str; + } + function _processDefListItems_callback_dt($matches) { + $terms = explode("\n", trim($matches[1])); + $text = ''; + foreach ($terms as $term) { + $term = $this->runSpanGamut(trim($term)); + $text .= "\n
        " . $term . "
        "; + } + return $text . "\n"; + } + function _processDefListItems_callback_dd($matches) { + $leading_line = $matches[1]; + $marker_space = $matches[2]; + $def = $matches[3]; + + if ($leading_line || preg_match('/\n{2,}/', $def)) { + # Replace marker with the appropriate whitespace indentation + $def = str_repeat(' ', strlen($marker_space)) . $def; + $def = $this->runBlockGamut($this->outdent($def . "\n\n")); + $def = "\n". $def ."\n"; + } + else { + $def = rtrim($def); + $def = $this->runSpanGamut($this->outdent($def)); + } + + return "\n
        " . $def . "
        \n"; + } + + + function doFencedCodeBlocks($text) { + # + # Adding the fenced code block syntax to regular Markdown: + # + # ~~~ + # Code block + # ~~~ + # + $less_than_tab = $this->tab_width; + + $text = preg_replace_callback('{ + (?:\n|\A) + # 1: Opening marker + ( + ~{3,} # Marker: three tilde or more. + ) + [ ]* \n # Whitespace and newline following marker. + + # 2: Content + ( + (?> + (?!\1 [ ]* \n) # Not a closing marker. + .*\n+ + )+ + ) + + # Closing marker. + \1 [ ]* \n + }xm', + array(&$this, '_doFencedCodeBlocks_callback'), $text); + + return $text; + } + function _doFencedCodeBlocks_callback($matches) { + $codeblock = $matches[2]; + $codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES); + $codeblock = preg_replace_callback('/^\n+/', + array(&$this, '_doFencedCodeBlocks_newlines'), $codeblock); + $codeblock = "
        $codeblock
        "; + return "\n\n".$this->hashBlock($codeblock)."\n\n"; + } + function _doFencedCodeBlocks_newlines($matches) { + return str_repeat("empty_element_suffix", + strlen($matches[0])); + } + + + # + # Redefining emphasis markers so that emphasis by underscore does not + # work in the middle of a word. + # + var $em_relist = array( + '' => '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? tags + # + # Strip leading and trailing lines: + $text = preg_replace('/\A\n+|\n+\z/', '', $text); + + $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY); + + # + # Wrap

        tags and unhashify HTML blocks + # + foreach ($grafs as $key => $value) { + $value = trim($this->runSpanGamut($value)); + + # Check if this should be enclosed in a paragraph. + # Clean tag hashes & block tag hashes are left alone. + $is_p = !preg_match('/^B\x1A[0-9]+B|^C\x1A[0-9]+C$/', $value); + + if ($is_p) { + $value = "

        $value

        "; + } + $grafs[$key] = $value; + } + + # Join grafs in one text, then unhash HTML tags. + $text = implode("\n\n", $grafs); + + # Finish by removing any tag hashes still present in $text. + $text = $this->unhash($text); + + return $text; + } + + + ### Footnotes + + function stripFootnotes($text) { + # + # Strips link definitions from text, stores the URLs and titles in + # hash references. + # + $less_than_tab = $this->tab_width - 1; + + # Link defs are in the form: [^id]: url "optional title" + $text = preg_replace_callback('{ + ^[ ]{0,'.$less_than_tab.'}\[\^(.+?)\][ ]?: # note_id = $1 + [ ]* + \n? # maybe *one* newline + ( # text = $2 (no blank lines allowed) + (?: + .+ # actual text + | + \n # newlines but + (?!\[\^.+?\]:\s)# negative lookahead for footnote marker. + (?!\n+[ ]{0,3}\S)# ensure line is not blank and followed + # by non-indented content + )* + ) + }xm', + array(&$this, '_stripFootnotes_callback'), + $text); + return $text; + } + function _stripFootnotes_callback($matches) { + $note_id = $this->fn_id_prefix . $matches[1]; + $this->footnotes[$note_id] = $this->outdent($matches[2]); + return ''; # String that will replace the block + } + + + function doFootnotes($text) { + # + # Replace footnote references in $text [^id] with a special text-token + # which will be replaced by the actual footnote marker in appendFootnotes. + # + if (!$this->in_anchor) { + $text = preg_replace('{\[\^(.+?)\]}', "F\x1Afn:\\1\x1A:", $text); + } + return $text; + } + + + function appendFootnotes($text) { + # + # Append footnote list to text. + # + $text = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}', + array(&$this, '_appendFootnotes_callback'), $text); + + if (!empty($this->footnotes_ordered)) { + $text .= "\n\n"; + $text .= "
        \n"; + $text .= "empty_element_suffix ."\n"; + $text .= "
          \n\n"; + + $attr = " rev=\"footnote\""; + if ($this->fn_backlink_class != "") { + $class = $this->fn_backlink_class; + $class = $this->encodeAttribute($class); + $attr .= " class=\"$class\""; + } + if ($this->fn_backlink_title != "") { + $title = $this->fn_backlink_title; + $title = $this->encodeAttribute($title); + $attr .= " title=\"$title\""; + } + $num = 0; + + while (!empty($this->footnotes_ordered)) { + $footnote = reset($this->footnotes_ordered); + $note_id = key($this->footnotes_ordered); + unset($this->footnotes_ordered[$note_id]); + + $footnote .= "\n"; # Need to append newline before parsing. + $footnote = $this->runBlockGamut("$footnote\n"); + $footnote = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}', + array(&$this, '_appendFootnotes_callback'), $footnote); + + $attr = str_replace("%%", ++$num, $attr); + $note_id = $this->encodeAttribute($note_id); + + # Add backlink to last paragraph; create new paragraph if needed. + $backlink = ""; + if (preg_match('{

          $}', $footnote)) { + $footnote = substr($footnote, 0, -4) . " $backlink

          "; + } else { + $footnote .= "\n\n

          $backlink

          "; + } + + $text .= "
        1. \n"; + $text .= $footnote . "\n"; + $text .= "
        2. \n\n"; + } + + $text .= "
        \n"; + $text .= "
        "; + } + return $text; + } + function _appendFootnotes_callback($matches) { + $node_id = $this->fn_id_prefix . $matches[1]; + + # Create footnote marker only if it has a corresponding footnote *and* + # the footnote hasn't been used by another marker. + if (isset($this->footnotes[$node_id])) { + # Transfert footnote content to the ordered list. + $this->footnotes_ordered[$node_id] = $this->footnotes[$node_id]; + unset($this->footnotes[$node_id]); + + $num = $this->footnote_counter++; + $attr = " rel=\"footnote\""; + if ($this->fn_link_class != "") { + $class = $this->fn_link_class; + $class = $this->encodeAttribute($class); + $attr .= " class=\"$class\""; + } + if ($this->fn_link_title != "") { + $title = $this->fn_link_title; + $title = $this->encodeAttribute($title); + $attr .= " title=\"$title\""; + } + + $attr = str_replace("%%", $num, $attr); + $node_id = $this->encodeAttribute($node_id); + + return + "". + "$num". + ""; + } + + return "[^".$matches[1]."]"; + } + + + ### Abbreviations ### + + function stripAbbreviations($text) { + # + # Strips abbreviations from text, stores titles in hash references. + # + $less_than_tab = $this->tab_width - 1; + + # Link defs are in the form: [id]*: url "optional title" + $text = preg_replace_callback('{ + ^[ ]{0,'.$less_than_tab.'}\*\[(.+?)\][ ]?: # abbr_id = $1 + (.*) # text = $2 (no blank lines allowed) + }xm', + array(&$this, '_stripAbbreviations_callback'), + $text); + return $text; + } + function _stripAbbreviations_callback($matches) { + $abbr_word = $matches[1]; + $abbr_desc = $matches[2]; + if ($this->abbr_word_re) + $this->abbr_word_re .= '|'; + $this->abbr_word_re .= preg_quote($abbr_word); + $this->abbr_desciptions[$abbr_word] = trim($abbr_desc); + return ''; # String that will replace the block + } + + + function doAbbreviations($text) { + # + # Find defined abbreviations in text and wrap them in elements. + # + if ($this->abbr_word_re) { + // cannot use the /x modifier because abbr_word_re may + // contain significant spaces: + $text = preg_replace_callback('{'. + '(?abbr_word_re.')'. + '(?![\w\x1A])'. + '}', + array(&$this, '_doAbbreviations_callback'), $text); + } + return $text; + } + function _doAbbreviations_callback($matches) { + $abbr = $matches[0]; + if (isset($this->abbr_desciptions[$abbr])) { + $desc = $this->abbr_desciptions[$abbr]; + if (empty($desc)) { + return $this->hashPart("$abbr"); + } else { + $desc = $this->encodeAttribute($desc); + return $this->hashPart("$abbr"); + } + } else { + return $matches[0]; + } + } + +} + + +/* + +PHP Markdown Extra +================== + +Description +----------- + +This is a PHP port of the original Markdown formatter written in Perl +by John Gruber. This special "Extra" version of PHP Markdown features +further enhancements to the syntax for making additional constructs +such as tables and definition list. + +Markdown is a text-to-HTML filter; it translates an easy-to-read / +easy-to-write structured text format into HTML. Markdown's text format +is most similar to that of plain text email, and supports features such +as headers, *emphasis*, code blocks, blockquotes, and links. + +Markdown's syntax is designed not as a generic markup language, but +specifically to serve as a front-end to (X)HTML. You can use span-level +HTML tags anywhere in a Markdown document, and you can use block level +HTML tags (like
        and as well). + +For more information about Markdown's syntax, see: + + + + +Bugs +---- + +To file bug reports please send email to: + + + +Please include with your report: (1) the example input; (2) the output you +expected; (3) the output Markdown actually produced. + + +Version History +--------------- + +See the readme file for detailed release notes for this version. + + +Copyright and License +--------------------- + +PHP Markdown & Extra +Copyright (c) 2004-2009 Michel Fortin + +All rights reserved. + +Based on Markdown +Copyright (c) 2003-2006 John Gruber + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +* Neither the name "Markdown" nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + +This software is provided by the copyright holders and contributors "as +is" and any express or implied warranties, including, but not limited +to, the implied warranties of merchantability and fitness for a +particular purpose are disclaimed. In no event shall the copyright owner +or contributors be liable for any direct, indirect, incidental, special, +exemplary, or consequential damages (including, but not limited to, +procurement of substitute goods or services; loss of use, data, or +profits; or business interruption) however caused and on any theory of +liability, whether in contract, strict liability, or tort (including +negligence or otherwise) arising in any way out of the use of this +software, even if advised of the possibility of such damage. + +*/ +?> \ No newline at end of file diff --git a/_piecrust/libs/Mustache/LICENSE b/_piecrust/libs/Mustache/LICENSE new file mode 100644 index 0000000..63c95ac --- /dev/null +++ b/_piecrust/libs/Mustache/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2010 Justin Hileman + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/_piecrust/libs/Mustache/Mustache.php b/_piecrust/libs/Mustache/Mustache.php new file mode 100644 index 0000000..34c5e15 --- /dev/null +++ b/_piecrust/libs/Mustache/Mustache.php @@ -0,0 +1,795 @@ + false, + MustacheException::UNCLOSED_SECTION => true, + MustacheException::UNEXPECTED_CLOSE_SECTION => true, + MustacheException::UNKNOWN_PARTIAL => false, + MustacheException::UNKNOWN_PRAGMA => true, + ); + + // Override charset passed to htmlentities() and htmlspecialchars(). Defaults to UTF-8. + protected $_charset = 'UTF-8'; + + /** + * Pragmas are macro-like directives that, when invoked, change the behavior or + * syntax of Mustache. + * + * They should be considered extremely experimental. Most likely their implementation + * will change in the future. + */ + + /** + * The {{%DOT-NOTATION}} pragma allows context traversal via dots. Given the following context: + * + * $context = array('foo' => array('bar' => array('baz' => 'qux'))); + * + * One could access nested properties using dot notation: + * + * {{%DOT-NOTATION}}{{foo.bar.baz}} + * + * Which would render as `qux`. + */ + const PRAGMA_DOT_NOTATION = 'DOT-NOTATION'; + + /** + * The {{%IMPLICIT-ITERATOR}} pragma allows access to non-associative array data in an + * iterable section: + * + * $context = array('items' => array('foo', 'bar', 'baz')); + * + * With this template: + * + * {{%IMPLICIT-ITERATOR}}{{#items}}{{.}}{{/items}} + * + * Would render as `foobarbaz`. + * + * {{%IMPLICIT-ITERATOR}} accepts an optional 'iterator' argument which allows implicit + * iterator tags other than {{.}} ... + * + * {{%IMPLICIT-ITERATOR iterator=i}}{{#items}}{{i}}{{/items}} + */ + const PRAGMA_IMPLICIT_ITERATOR = 'IMPLICIT-ITERATOR'; + + /** + * The {{%UNESCAPED}} pragma swaps the meaning of the {{normal}} and {{{unescaped}}} + * Mustache tags. That is, once this pragma is activated the {{normal}} tag will not be + * escaped while the {{{unescaped}}} tag will be escaped. + * + * Pragmas apply only to the current template. Partials, even those included after the + * {{%UNESCAPED}} call, will need their own pragma declaration. + * + * This may be useful in non-HTML Mustache situations. + */ + const PRAGMA_UNESCAPED = 'UNESCAPED'; + + /** + * Constants used for section and tag RegEx + */ + const SECTION_TYPES = '\^#\/'; + const TAG_TYPES = '#\^\/=!<>\\{&'; + + public $_otag = '{{'; + public $_ctag = '}}'; + + protected $_tagRegEx; + + protected $_template = ''; + protected $_context = array(); + protected $_partials = array(); + protected $_pragmas = array(); + + protected $_pragmasImplemented = array( + self::PRAGMA_DOT_NOTATION, + self::PRAGMA_IMPLICIT_ITERATOR, + self::PRAGMA_UNESCAPED + ); + + protected $_localPragmas = array(); + + /** + * Mustache class constructor. + * + * This method accepts a $template string and a $view object. Optionally, pass an associative + * array of partials as well. + * + * @access public + * @param string $template (default: null) + * @param mixed $view (default: null) + * @param array $partials (default: null) + * @return void + */ + public function __construct($template = null, $view = null, $partials = null) { + if ($template !== null) $this->_template = $template; + if ($partials !== null) $this->_partials = $partials; + if ($view !== null) $this->_context = array($view); + } + + /** + * Mustache class clone method. + * + * A cloned Mustache instance should have pragmas, delimeters and root context + * reset to default values. + * + * @access public + * @return void + */ + public function __clone() { + $this->_otag = '{{'; + $this->_ctag = '}}'; + $this->_localPragmas = array(); + + if ($keys = array_keys($this->_context)) { + $last = array_pop($keys); + if ($this->_context[$last] instanceof Mustache) { + $this->_context[$last] =& $this; + } + } + } + + /** + * Render the given template and view object. + * + * Defaults to the template and view passed to the class constructor unless a new one is provided. + * Optionally, pass an associative array of partials as well. + * + * @access public + * @param string $template (default: null) + * @param mixed $view (default: null) + * @param array $partials (default: null) + * @return string Rendered Mustache template. + */ + public function render($template = null, $view = null, $partials = null) { + if ($template === null) $template = $this->_template; + if ($partials !== null) $this->_partials = $partials; + + if ($view) { + $this->_context = array($view); + } else if (empty($this->_context)) { + $this->_context = array($this); + } + + $template = $this->_renderPragmas($template); + return $this->_renderTemplate($template, $this->_context); + } + + /** + * Wrap the render() function for string conversion. + * + * @access public + * @return string + */ + public function __toString() { + // PHP doesn't like exceptions in __toString. + // catch any exceptions and convert them to strings. + try { + $result = $this->render(); + return $result; + } catch (Exception $e) { + return "Error rendering mustache: " . $e->getMessage(); + } + } + + /** + * Internal render function, used for recursive calls. + * + * @access protected + * @param string $template + * @return string Rendered Mustache template. + */ + protected function _renderTemplate($template) { + $template = $this->_renderSections($template); + return $this->_renderTags($template); + } + + /** + * Render boolean, enumerable and inverted sections. + * + * @access protected + * @param string $template + * @return string + */ + protected function _renderSections($template) { + while ($section_data = $this->_findSection($template)) { + list($section, $offset, $type, $tag_name, $content) = $section_data; + + $replace = ''; + $val = $this->_getVariable($tag_name); + switch($type) { + // inverted section + case '^': + if (empty($val)) { + $replace .= $content; + } + break; + + // regular section + case '#': + if ($this->_varIsIterable($val)) { + if ($this->_hasPragma(self::PRAGMA_IMPLICIT_ITERATOR)) { + if ($opt = $this->_getPragmaOptions(self::PRAGMA_IMPLICIT_ITERATOR)) { + $iterator = $opt['iterator']; + } else { + $iterator = '.'; + } + } else { + $iterator = false; + } + + foreach ($val as $local_context) { + + if ($iterator) { + $iterator_context = array($iterator => $local_context); + $this->_pushContext($iterator_context); + } else { + $this->_pushContext($local_context); + } + $replace .= $this->_renderTemplate($content); + $this->_popContext(); + } + } else if ($val) { + if (is_array($val) || is_object($val)) { + $this->_pushContext($val); + $replace .= $this->_renderTemplate($content); + $this->_popContext(); + } else { + $replace .= $content; + } + } + break; + } + + $template = substr_replace($template, $replace, $offset, strlen($section)); + } + + return $template; + } + + /** + * Prepare a section RegEx string for the given opening/closing tags. + * + * @access protected + * @param string $otag + * @param string $ctag + * @return string + */ + protected function _prepareSectionRegEx($otag, $ctag) { + return sprintf( + '/(?:(?<=\\n)[ \\t]*)?%s(?P[%s])(?P.+?)%s\\n?/s', + preg_quote($otag, '/'), + self::SECTION_TYPES, + preg_quote($ctag, '/') + ); + } + + /** + * Extract a section from $template. + * + * This is a helper function to find sections needed by _renderSections. + * + * @access protected + * @param string $template + * @return array $section, $offset, $type, $tag_name and $content + */ + protected function _findSection($template) { + $regEx = $this->_prepareSectionRegEx($this->_otag, $this->_ctag); + + $section_start = null; + $section_type = null; + $content_start = null; + + $search_offset = 0; + + $section_stack = array(); + $matches = array(); + while (preg_match($regEx, $template, $matches, PREG_OFFSET_CAPTURE, $search_offset)) { + + $match = $matches[0][0]; + $offset = $matches[0][1]; + $type = $matches['type'][0]; + $tag_name = trim($matches['tag_name'][0]); + + $search_offset = $offset + strlen($match); + + switch ($type) { + case '^': + case '#': + if (empty($section_stack)) { + $section_start = $offset; + $section_type = $type; + $content_start = $search_offset; + } + array_push($section_stack, $tag_name); + break; + case '/': + if (empty($section_stack) || ($tag_name !== array_pop($section_stack))) { + if ($this->_throwsException(MustacheException::UNEXPECTED_CLOSE_SECTION)) { + throw new MustacheException('Unexpected close section: ' . $tag_name, MustacheException::UNEXPECTED_CLOSE_SECTION); + } + } + + if (empty($section_stack)) { + $section = substr($template, $section_start, $search_offset - $section_start); + $content = substr($template, $content_start, $offset - $content_start); + + return array($section, $section_start, $section_type, $tag_name, $content); + } + break; + } + } + + if (!empty($section_stack)) { + if ($this->_throwsException(MustacheException::UNCLOSED_SECTION)) { + throw new MustacheException('Unclosed section: ' . $section_stack[0], MustacheException::UNCLOSED_SECTION); + } + } + } + + /** + * Prepare a pragma RegEx for the given opening/closing tags. + * + * @access protected + * @param string $otag + * @param string $ctag + * @return string + */ + protected function _preparePragmaRegEx($otag, $ctag) { + return sprintf( + '/%s%%\\s*(?P[\\w_-]+)(?P(?: [\\w]+=[\\w]+)*)\\s*%s\\n?/s', + preg_quote($otag, '/'), + preg_quote($ctag, '/') + ); + } + + /** + * Initialize pragmas and remove all pragma tags. + * + * @access protected + * @param string $template + * @return string + */ + protected function _renderPragmas($template) { + $this->_localPragmas = $this->_pragmas; + + // no pragmas + if (strpos($template, $this->_otag . '%') === false) { + return $template; + } + + $regEx = $this->_preparePragmaRegEx($this->_otag, $this->_ctag); + return preg_replace_callback($regEx, array($this, '_renderPragma'), $template); + } + + /** + * A preg_replace helper to remove {{%PRAGMA}} tags and enable requested pragma. + * + * @access protected + * @param mixed $matches + * @return void + * @throws MustacheException unknown pragma + */ + protected function _renderPragma($matches) { + $pragma = $matches[0]; + $pragma_name = $matches['pragma_name']; + $options_string = $matches['options_string']; + + if (!in_array($pragma_name, $this->_pragmasImplemented)) { + throw new MustacheException('Unknown pragma: ' . $pragma_name, MustacheException::UNKNOWN_PRAGMA); + } + + $options = array(); + foreach (explode(' ', trim($options_string)) as $o) { + if ($p = trim($o)) { + $p = explode('=', $p); + $options[$p[0]] = $p[1]; + } + } + + if (empty($options)) { + $this->_localPragmas[$pragma_name] = true; + } else { + $this->_localPragmas[$pragma_name] = $options; + } + + return ''; + } + + /** + * Check whether this Mustache has a specific pragma. + * + * @access protected + * @param string $pragma_name + * @return bool + */ + protected function _hasPragma($pragma_name) { + if (array_key_exists($pragma_name, $this->_localPragmas) && $this->_localPragmas[$pragma_name]) { + return true; + } else { + return false; + } + } + + /** + * Return pragma options, if any. + * + * @access protected + * @param string $pragma_name + * @return mixed + * @throws MustacheException Unknown pragma + */ + protected function _getPragmaOptions($pragma_name) { + if (!$this->_hasPragma($pragma_name)) { + throw new MustacheException('Unknown pragma: ' . $pragma_name, MustacheException::UNKNOWN_PRAGMA); + } + + return (is_array($this->_localPragmas[$pragma_name])) ? $this->_localPragmas[$pragma_name] : array(); + } + + /** + * Check whether this Mustache instance throws a given exception. + * + * Expects exceptions to be MustacheException error codes (i.e. class constants). + * + * @access protected + * @param mixed $exception + * @return void + */ + protected function _throwsException($exception) { + return (isset($this->_throwsExceptions[$exception]) && $this->_throwsExceptions[$exception]); + } + + /** + * Prepare a tag RegEx for the given opening/closing tags. + * + * @access protected + * @param string $otag + * @param string $ctag + * @return string + */ + protected function _prepareTagRegEx($otag, $ctag) { + return sprintf( + '/(?P(?<=\\n)[ \\t]*)?%s(?P[%s]?)(?P.+?)(?:\\2|})?%s(?:\\s*(?=\\n))?/s', + preg_quote($otag, '/'), + self::TAG_TYPES, + preg_quote($ctag, '/') + ); + } + + /** + * Loop through and render individual Mustache tags. + * + * @access protected + * @param string $template + * @return void + */ + protected function _renderTags($template) { + if (strpos($template, $this->_otag) === false) { + return $template; + } + + $otag_orig = $this->_otag; + $ctag_orig = $this->_ctag; + + $this->_tagRegEx = $this->_prepareTagRegEx($this->_otag, $this->_ctag); + + $html = ''; + $matches = array(); + while (preg_match($this->_tagRegEx, $template, $matches, PREG_OFFSET_CAPTURE)) { + $tag = $matches[0][0]; + $offset = $matches[0][1]; + $modifier = $matches['type'][0]; + $tag_name = trim($matches['tag_name'][0]); + + if (isset($matches['whitespace']) && $matches['whitespace'][1] > -1) { + $whitespace = $matches['whitespace'][0]; + } else { + $whitespace = null; + } + + $html .= substr($template, 0, $offset); + + $next_offset = $offset + strlen($tag); + if ((substr($html, -1) == "\n") && (substr($template, $next_offset, 1) == "\n")) { + $next_offset++; + } + $template = substr($template, $next_offset); + + $html .= $this->_renderTag($modifier, $tag_name, $whitespace); + } + + $this->_otag = $otag_orig; + $this->_ctag = $ctag_orig; + + return $html . $template; + } + + /** + * Render the named tag, given the specified modifier. + * + * Accepted modifiers are `=` (change delimiter), `!` (comment), `>` (partial) + * `{` or `&` (don't escape output), or none (render escaped output). + * + * @access protected + * @param string $modifier + * @param string $tag_name + * @throws MustacheException Unmatched section tag encountered. + * @return string + */ + protected function _renderTag($modifier, $tag_name, $whitespace) { + switch ($modifier) { + case '=': + return $this->_changeDelimiter($tag_name); + break; + case '!': + return $this->_renderComment($tag_name); + break; + case '>': + case '<': + return $this->_renderPartial($tag_name, $whitespace); + break; + case '{': + // strip the trailing } ... + if ($tag_name[(strlen($tag_name) - 1)] == '}') { + $tag_name = substr($tag_name, 0, -1); + } + case '&': + if ($this->_hasPragma(self::PRAGMA_UNESCAPED)) { + return $this->_renderEscaped($tag_name); + } else { + return $this->_renderUnescaped($tag_name); + } + break; + case '#': + case '^': + case '/': + // remove any leftovers from _renderSections + return ''; + break; + } + + if ($this->_hasPragma(self::PRAGMA_UNESCAPED)) { + return $this->_renderUnescaped($modifier . $tag_name); + } else { + return $this->_renderEscaped($modifier . $tag_name); + } + } + + /** + * Escape and return the requested tag. + * + * @access protected + * @param string $tag_name + * @return string + */ + protected function _renderEscaped($tag_name) { + return htmlentities($this->_getVariable($tag_name), ENT_COMPAT, $this->_charset); + } + + /** + * Render a comment (i.e. return an empty string). + * + * @access protected + * @param string $tag_name + * @return string + */ + protected function _renderComment($tag_name) { + return ''; + } + + /** + * Return the requested tag unescaped. + * + * @access protected + * @param string $tag_name + * @return string + */ + protected function _renderUnescaped($tag_name) { + return $this->_getVariable($tag_name); + } + + /** + * Render the requested partial. + * + * @access protected + * @param string $tag_name + * @return string + */ + protected function _renderPartial($tag_name, $whitespace = '') { + $view = clone($this); + + return $whitespace . preg_replace('/\n(?!$)/s', "\n" . $whitespace, $view->render($this->_getPartial($tag_name))); + } + + /** + * Change the Mustache tag delimiter. This method also replaces this object's current + * tag RegEx with one using the new delimiters. + * + * @access protected + * @param string $tag_name + * @return string + */ + protected function _changeDelimiter($tag_name) { + list($otag, $ctag) = explode(' ', $tag_name); + $this->_otag = $otag; + $this->_ctag = $ctag; + + $this->_tagRegEx = $this->_prepareTagRegEx($this->_otag, $this->_ctag); + + return ''; + } + + /** + * Push a local context onto the stack. + * + * @access protected + * @param array &$local_context + * @return void + */ + protected function _pushContext(&$local_context) { + $new = array(); + $new[] =& $local_context; + foreach (array_keys($this->_context) as $key) { + $new[] =& $this->_context[$key]; + } + $this->_context = $new; + } + + /** + * Remove the latest context from the stack. + * + * @access protected + * @return void + */ + protected function _popContext() { + $new = array(); + + $keys = array_keys($this->_context); + array_shift($keys); + foreach ($keys as $key) { + $new[] =& $this->_context[$key]; + } + $this->_context = $new; + } + + /** + * Get a variable from the context array. + * + * If the view is an array, returns the value with array key $tag_name. + * If the view is an object, this will check for a public member variable + * named $tag_name. If none is available, this method will execute and return + * any class method named $tag_name. Failing all of the above, this method will + * return an empty string. + * + * @access protected + * @param string $tag_name + * @throws MustacheException Unknown variable name. + * @return string + */ + protected function _getVariable($tag_name) { + if ($tag_name != '.' && strpos($tag_name, '.') !== false && $this->_hasPragma(self::PRAGMA_DOT_NOTATION)) { + $chunks = explode('.', $tag_name); + $first = array_shift($chunks); + + $ret = $this->_findVariableInContext($first, $this->_context); + while ($next = array_shift($chunks)) { + // Slice off a chunk of context for dot notation traversal. + $c = array($ret); + $ret = $this->_findVariableInContext($next, $c); + } + return $ret; + } else { + return $this->_findVariableInContext($tag_name, $this->_context); + } + } + + /** + * Get a variable from the context array. Internal helper used by getVariable() to abstract + * variable traversal for dot notation. + * + * @access protected + * @param string $tag_name + * @param array $context + * @throws MustacheException Unknown variable name. + * @return string + */ + protected function _findVariableInContext($tag_name, $context) { + foreach ($context as $view) { + if (is_object($view)) { + if (method_exists($view, $tag_name)) { + return $view->$tag_name(); + } else if (isset($view->$tag_name)) { + return $view->$tag_name; + } + } else if (array_key_exists($tag_name, $view)) { + return $view[$tag_name]; + } + } + + if ($this->_throwsException(MustacheException::UNKNOWN_VARIABLE)) { + throw new MustacheException("Unknown variable: " . $tag_name, MustacheException::UNKNOWN_VARIABLE); + } else { + return ''; + } + } + + /** + * Retrieve the partial corresponding to the requested tag name. + * + * Silently fails (i.e. returns '') when the requested partial is not found. + * + * @access protected + * @param string $tag_name + * @throws MustacheException Unknown partial name. + * @return string + */ + protected function _getPartial($tag_name) { + if (is_array($this->_partials) && isset($this->_partials[$tag_name])) { + return $this->_partials[$tag_name]; + } + + if ($this->_throwsException(MustacheException::UNKNOWN_PARTIAL)) { + throw new MustacheException('Unknown partial: ' . $tag_name, MustacheException::UNKNOWN_PARTIAL); + } else { + return ''; + } + } + + /** + * Check whether the given $var should be iterated (i.e. in a section context). + * + * @access protected + * @param mixed $var + * @return bool + */ + protected function _varIsIterable($var) { + return $var instanceof Traversable || (is_array($var) && !array_diff_key($var, array_keys(array_keys($var)))); + } +} + + +/** + * MustacheException class. + * + * @extends Exception + */ +class MustacheException extends Exception { + + // An UNKNOWN_VARIABLE exception is thrown when a {{variable}} is not found + // in the current context. + const UNKNOWN_VARIABLE = 0; + + // An UNCLOSED_SECTION exception is thrown when a {{#section}} is not closed. + const UNCLOSED_SECTION = 1; + + // An UNEXPECTED_CLOSE_SECTION exception is thrown when {{/section}} appears + // without a corresponding {{#section}} or {{^section}}. + const UNEXPECTED_CLOSE_SECTION = 2; + + // An UNKNOWN_PARTIAL exception is thrown whenever a {{>partial}} tag appears + // with no associated partial. + const UNKNOWN_PARTIAL = 3; + + // An UNKNOWN_PRAGMA exception is thrown whenever a {{%PRAGMA}} tag appears + // which can't be handled by this Mustache instance. + const UNKNOWN_PRAGMA = 4; + +} \ No newline at end of file diff --git a/_piecrust/libs/Mustache/README.markdown b/_piecrust/libs/Mustache/README.markdown new file mode 100644 index 0000000..3662d3c --- /dev/null +++ b/_piecrust/libs/Mustache/README.markdown @@ -0,0 +1,92 @@ +Mustache.php +============ + +A [Mustache](http://defunkt.github.com/mustache/) implementation in PHP. + + +Usage +----- + +A quick example: + + render('Hello {{planet}}', array('planet' => 'World!')); + // "Hello World!" + ?> + + +And a more in-depth example--this is the canonical Mustache template: + + Hello {{name}} + You have just won ${{value}}! + {{#in_ca}} + Well, ${{taxed_value}}, after taxes. + {{/in_ca}} + + +Along with the associated Mustache class: + + value - ($this->value * 0.4); + } + + public $in_ca = true; + } + + +Render it like so: + + render($template); + ?> + + +Here's the same thing, a different way: + +Create a view object--which could also be an associative array, but those don't do functions quite as well: + + value - ($this->value * 0.4); + } + + public $in_ca = true; + } + ?> + + +And render it: + + render($template, $chris); + ?> + + + + +Known Issues +------------ + + * Things get weird when you change delimiters inside a section -- `delimiters` example currently fails with an + "unclosed section" exception. + + +See Also +-------- + + * [Readme for the Ruby Mustache implementation](http://github.com/defunkt/mustache/blob/master/README.md). + * [mustache(1)](http://defunkt.github.com/mustache/mustache.1.html) and [mustache(5)](http://defunkt.github.com/mustache/mustache.5.html) man pages. \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Autoloader.php b/_piecrust/libs/PEAR/Autoloader.php new file mode 100644 index 0000000..0ed707e --- /dev/null +++ b/_piecrust/libs/PEAR/Autoloader.php @@ -0,0 +1,218 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Autoloader.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader + * @since File available since Release 0.1 + * @deprecated File deprecated in Release 1.4.0a1 + */ + +// /* vim: set expandtab tabstop=4 shiftwidth=4: */ + +if (!extension_loaded("overload")) { + // die hard without ext/overload + die("Rebuild PHP with the `overload' extension to use PEAR_Autoloader"); +} + +/** + * Include for PEAR_Error and PEAR classes + */ +require_once "PEAR.php"; + +/** + * This class is for objects where you want to separate the code for + * some methods into separate classes. This is useful if you have a + * class with not-frequently-used methods that contain lots of code + * that you would like to avoid always parsing. + * + * The PEAR_Autoloader class provides autoloading and aggregation. + * The autoloading lets you set up in which classes the separated + * methods are found. Aggregation is the technique used to import new + * methods, an instance of each class providing separated methods is + * stored and called every time the aggregated method is called. + * + * @category pear + * @package PEAR + * @author Stig Bakken + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader + * @since File available since Release 0.1 + * @deprecated File deprecated in Release 1.4.0a1 + */ +class PEAR_Autoloader extends PEAR +{ + // {{{ properties + + /** + * Map of methods and classes where they are defined + * + * @var array + * + * @access private + */ + var $_autoload_map = array(); + + /** + * Map of methods and aggregate objects + * + * @var array + * + * @access private + */ + var $_method_map = array(); + + // }}} + // {{{ addAutoload() + + /** + * Add one or more autoload entries. + * + * @param string $method which method to autoload + * + * @param string $classname (optional) which class to find the method in. + * If the $method parameter is an array, this + * parameter may be omitted (and will be ignored + * if not), and the $method parameter will be + * treated as an associative array with method + * names as keys and class names as values. + * + * @return void + * + * @access public + */ + function addAutoload($method, $classname = null) + { + if (is_array($method)) { + array_walk($method, create_function('$a,&$b', '$b = strtolower($b);')); + $this->_autoload_map = array_merge($this->_autoload_map, $method); + } else { + $this->_autoload_map[strtolower($method)] = $classname; + } + } + + // }}} + // {{{ removeAutoload() + + /** + * Remove an autoload entry. + * + * @param string $method which method to remove the autoload entry for + * + * @return bool TRUE if an entry was removed, FALSE if not + * + * @access public + */ + function removeAutoload($method) + { + $method = strtolower($method); + $ok = isset($this->_autoload_map[$method]); + unset($this->_autoload_map[$method]); + return $ok; + } + + // }}} + // {{{ addAggregateObject() + + /** + * Add an aggregate object to this object. If the specified class + * is not defined, loading it will be attempted following PEAR's + * file naming scheme. All the methods in the class will be + * aggregated, except private ones (name starting with an + * underscore) and constructors. + * + * @param string $classname what class to instantiate for the object. + * + * @return void + * + * @access public + */ + function addAggregateObject($classname) + { + $classname = strtolower($classname); + if (!class_exists($classname)) { + $include_file = preg_replace('/[^a-z0-9]/i', '_', $classname); + include_once $include_file; + } + $obj =& new $classname; + $methods = get_class_methods($classname); + foreach ($methods as $method) { + // don't import priviate methods and constructors + if ($method{0} != '_' && $method != $classname) { + $this->_method_map[$method] = $obj; + } + } + } + + // }}} + // {{{ removeAggregateObject() + + /** + * Remove an aggregate object. + * + * @param string $classname the class of the object to remove + * + * @return bool TRUE if an object was removed, FALSE if not + * + * @access public + */ + function removeAggregateObject($classname) + { + $ok = false; + $classname = strtolower($classname); + reset($this->_method_map); + while (list($method, $obj) = each($this->_method_map)) { + if (is_a($obj, $classname)) { + unset($this->_method_map[$method]); + $ok = true; + } + } + return $ok; + } + + // }}} + // {{{ __call() + + /** + * Overloaded object call handler, called each time an + * undefined/aggregated method is invoked. This method repeats + * the call in the right aggregate object and passes on the return + * value. + * + * @param string $method which method that was called + * + * @param string $args An array of the parameters passed in the + * original call + * + * @return mixed The return value from the aggregated method, or a PEAR + * error if the called method was unknown. + */ + function __call($method, $args, &$retval) + { + $method = strtolower($method); + if (empty($this->_method_map[$method]) && isset($this->_autoload_map[$method])) { + $this->addAggregateObject($this->_autoload_map[$method]); + } + if (isset($this->_method_map[$method])) { + $retval = call_user_func_array(array($this->_method_map[$method], $method), $args); + return true; + } + return false; + } + + // }}} +} + +overload("PEAR_Autoloader"); + +?> diff --git a/_piecrust/libs/PEAR/Builder.php b/_piecrust/libs/PEAR/Builder.php new file mode 100644 index 0000000..90f3a14 --- /dev/null +++ b/_piecrust/libs/PEAR/Builder.php @@ -0,0 +1,489 @@ + + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Builder.php 313024 2011-07-06 19:51:24Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + * + * TODO: log output parameters in PECL command line + * TODO: msdev path in configuration + */ + +/** + * Needed for extending PEAR_Builder + */ +require_once 'PEAR/Common.php'; +require_once 'PEAR/PackageFile.php'; + +/** + * Class to handle building (compiling) extensions. + * + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since PHP 4.0.2 + * @see http://pear.php.net/manual/en/core.ppm.pear-builder.php + */ +class PEAR_Builder extends PEAR_Common +{ + var $php_api_version = 0; + var $zend_module_api_no = 0; + var $zend_extension_api_no = 0; + + var $extensions_built = array(); + + /** + * @var string Used for reporting when it is not possible to pass function + * via extra parameter, e.g. log, msdevCallback + */ + var $current_callback = null; + + // used for msdev builds + var $_lastline = null; + var $_firstline = null; + + /** + * PEAR_Builder constructor. + * + * @param object $ui user interface object (instance of PEAR_Frontend_*) + * + * @access public + */ + function PEAR_Builder(&$ui) + { + parent::PEAR_Common(); + $this->setFrontendObject($ui); + } + + /** + * Build an extension from source on windows. + * requires msdev + */ + function _build_win32($descfile, $callback = null) + { + if (is_object($descfile)) { + $pkg = $descfile; + $descfile = $pkg->getPackageFile(); + } else { + $pf = &new PEAR_PackageFile($this->config, $this->debug); + $pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL); + if (PEAR::isError($pkg)) { + return $pkg; + } + } + $dir = dirname($descfile); + $old_cwd = getcwd(); + + if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) { + return $this->raiseError("could not chdir to $dir"); + } + + // packages that were in a .tar have the packagefile in this directory + $vdir = $pkg->getPackage() . '-' . $pkg->getVersion(); + if (file_exists($dir) && is_dir($vdir)) { + if (!chdir($vdir)) { + return $this->raiseError("could not chdir to " . realpath($vdir)); + } + + $dir = getcwd(); + } + + $this->log(2, "building in $dir"); + + $dsp = $pkg->getPackage().'.dsp'; + if (!file_exists("$dir/$dsp")) { + return $this->raiseError("The DSP $dsp does not exist."); + } + // XXX TODO: make release build type configurable + $command = 'msdev '.$dsp.' /MAKE "'.$pkg->getPackage(). ' - Release"'; + + $err = $this->_runCommand($command, array(&$this, 'msdevCallback')); + if (PEAR::isError($err)) { + return $err; + } + + // figure out the build platform and type + $platform = 'Win32'; + $buildtype = 'Release'; + if (preg_match('/.*?'.$pkg->getPackage().'\s-\s(\w+)\s(.*?)-+/i',$this->_firstline,$matches)) { + $platform = $matches[1]; + $buildtype = $matches[2]; + } + + if (preg_match('/(.*)?\s-\s(\d+).*?(\d+)/', $this->_lastline, $matches)) { + if ($matches[2]) { + // there were errors in the build + return $this->raiseError("There were errors during compilation."); + } + $out = $matches[1]; + } else { + return $this->raiseError("Did not understand the completion status returned from msdev.exe."); + } + + // msdev doesn't tell us the output directory :/ + // open the dsp, find /out and use that directory + $dsptext = join(file($dsp),''); + + // this regex depends on the build platform and type having been + // correctly identified above. + $regex ='/.*?!IF\s+"\$\(CFG\)"\s+==\s+("'. + $pkg->getPackage().'\s-\s'. + $platform.'\s'. + $buildtype.'").*?'. + '\/out:"(.*?)"/is'; + + if ($dsptext && preg_match($regex, $dsptext, $matches)) { + // what we get back is a relative path to the output file itself. + $outfile = realpath($matches[2]); + } else { + return $this->raiseError("Could not retrieve output information from $dsp."); + } + // realpath returns false if the file doesn't exist + if ($outfile && copy($outfile, "$dir/$out")) { + $outfile = "$dir/$out"; + } + + $built_files[] = array( + 'file' => "$outfile", + 'php_api' => $this->php_api_version, + 'zend_mod_api' => $this->zend_module_api_no, + 'zend_ext_api' => $this->zend_extension_api_no, + ); + + return $built_files; + } + // }}} + + // {{{ msdevCallback() + function msdevCallback($what, $data) + { + if (!$this->_firstline) + $this->_firstline = $data; + $this->_lastline = $data; + call_user_func($this->current_callback, $what, $data); + } + + /** + * @param string + * @param string + * @param array + * @access private + */ + function _harvestInstDir($dest_prefix, $dirname, &$built_files) + { + $d = opendir($dirname); + if (!$d) + return false; + + $ret = true; + while (($ent = readdir($d)) !== false) { + if ($ent{0} == '.') + continue; + + $full = $dirname . DIRECTORY_SEPARATOR . $ent; + if (is_dir($full)) { + if (!$this->_harvestInstDir( + $dest_prefix . DIRECTORY_SEPARATOR . $ent, + $full, $built_files)) { + $ret = false; + break; + } + } else { + $dest = $dest_prefix . DIRECTORY_SEPARATOR . $ent; + $built_files[] = array( + 'file' => $full, + 'dest' => $dest, + 'php_api' => $this->php_api_version, + 'zend_mod_api' => $this->zend_module_api_no, + 'zend_ext_api' => $this->zend_extension_api_no, + ); + } + } + closedir($d); + return $ret; + } + + /** + * Build an extension from source. Runs "phpize" in the source + * directory, but compiles in a temporary directory + * (TMPDIR/pear-build-USER/PACKAGE-VERSION). + * + * @param string|PEAR_PackageFile_v* $descfile path to XML package description file, or + * a PEAR_PackageFile object + * + * @param mixed $callback callback function used to report output, + * see PEAR_Builder::_runCommand for details + * + * @return array an array of associative arrays with built files, + * format: + * array( array( 'file' => '/path/to/ext.so', + * 'php_api' => YYYYMMDD, + * 'zend_mod_api' => YYYYMMDD, + * 'zend_ext_api' => YYYYMMDD ), + * ... ) + * + * @access public + * + * @see PEAR_Builder::_runCommand + */ + function build($descfile, $callback = null) + { + if (preg_match('/(\\/|\\\\|^)([^\\/\\\\]+)?php(.+)?$/', + $this->config->get('php_bin'), $matches)) { + if (isset($matches[2]) && strlen($matches[2]) && + trim($matches[2]) != trim($this->config->get('php_prefix'))) { + $this->log(0, 'WARNING: php_bin ' . $this->config->get('php_bin') . + ' appears to have a prefix ' . $matches[2] . ', but' . + ' config variable php_prefix does not match'); + } + + if (isset($matches[3]) && strlen($matches[3]) && + trim($matches[3]) != trim($this->config->get('php_suffix'))) { + $this->log(0, 'WARNING: php_bin ' . $this->config->get('php_bin') . + ' appears to have a suffix ' . $matches[3] . ', but' . + ' config variable php_suffix does not match'); + } + } + + $this->current_callback = $callback; + if (PEAR_OS == "Windows") { + return $this->_build_win32($descfile, $callback); + } + + if (PEAR_OS != 'Unix') { + return $this->raiseError("building extensions not supported on this platform"); + } + + if (is_object($descfile)) { + $pkg = $descfile; + $descfile = $pkg->getPackageFile(); + if (is_a($pkg, 'PEAR_PackageFile_v1')) { + $dir = dirname($descfile); + } else { + $dir = $pkg->_config->get('temp_dir') . '/' . $pkg->getName(); + // automatically delete at session end + $this->addTempFile($dir); + } + } else { + $pf = &new PEAR_PackageFile($this->config); + $pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL); + if (PEAR::isError($pkg)) { + return $pkg; + } + $dir = dirname($descfile); + } + + // Find config. outside of normal path - e.g. config.m4 + foreach (array_keys($pkg->getInstallationFileList()) as $item) { + if (stristr(basename($item), 'config.m4') && dirname($item) != '.') { + $dir .= DIRECTORY_SEPARATOR . dirname($item); + break; + } + } + + $old_cwd = getcwd(); + if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) { + return $this->raiseError("could not chdir to $dir"); + } + + $vdir = $pkg->getPackage() . '-' . $pkg->getVersion(); + if (is_dir($vdir)) { + chdir($vdir); + } + + $dir = getcwd(); + $this->log(2, "building in $dir"); + putenv('PATH=' . $this->config->get('bin_dir') . ':' . getenv('PATH')); + $err = $this->_runCommand($this->config->get('php_prefix') + . "phpize" . + $this->config->get('php_suffix'), + array(&$this, 'phpizeCallback')); + if (PEAR::isError($err)) { + return $err; + } + + if (!$err) { + return $this->raiseError("`phpize' failed"); + } + + // {{{ start of interactive part + $configure_command = "$dir/configure"; + $configure_options = $pkg->getConfigureOptions(); + if ($configure_options) { + foreach ($configure_options as $o) { + $default = array_key_exists('default', $o) ? $o['default'] : null; + list($r) = $this->ui->userDialog('build', + array($o['prompt']), + array('text'), + array($default)); + if (substr($o['name'], 0, 5) == 'with-' && + ($r == 'yes' || $r == 'autodetect')) { + $configure_command .= " --$o[name]"; + } else { + $configure_command .= " --$o[name]=".trim($r); + } + } + } + // }}} end of interactive part + + // FIXME make configurable + if (!$user=getenv('USER')) { + $user='defaultuser'; + } + + $tmpdir = $this->config->get('temp_dir'); + $build_basedir = System::mktemp(' -t "' . $tmpdir . '" -d "pear-build-' . $user . '"'); + $build_dir = "$build_basedir/$vdir"; + $inst_dir = "$build_basedir/install-$vdir"; + $this->log(1, "building in $build_dir"); + if (is_dir($build_dir)) { + System::rm(array('-rf', $build_dir)); + } + + if (!System::mkDir(array('-p', $build_dir))) { + return $this->raiseError("could not create build dir: $build_dir"); + } + + $this->addTempFile($build_dir); + if (!System::mkDir(array('-p', $inst_dir))) { + return $this->raiseError("could not create temporary install dir: $inst_dir"); + } + $this->addTempFile($inst_dir); + + $make_command = getenv('MAKE') ? getenv('MAKE') : 'make'; + + $to_run = array( + $configure_command, + $make_command, + "$make_command INSTALL_ROOT=\"$inst_dir\" install", + "find \"$inst_dir\" | xargs ls -dils" + ); + if (!file_exists($build_dir) || !is_dir($build_dir) || !chdir($build_dir)) { + return $this->raiseError("could not chdir to $build_dir"); + } + putenv('PHP_PEAR_VERSION=1.9.4'); + foreach ($to_run as $cmd) { + $err = $this->_runCommand($cmd, $callback); + if (PEAR::isError($err)) { + chdir($old_cwd); + return $err; + } + if (!$err) { + chdir($old_cwd); + return $this->raiseError("`$cmd' failed"); + } + } + if (!($dp = opendir("modules"))) { + chdir($old_cwd); + return $this->raiseError("no `modules' directory found"); + } + $built_files = array(); + $prefix = exec($this->config->get('php_prefix') + . "php-config" . + $this->config->get('php_suffix') . " --prefix"); + $this->_harvestInstDir($prefix, $inst_dir . DIRECTORY_SEPARATOR . $prefix, $built_files); + chdir($old_cwd); + return $built_files; + } + + /** + * Message callback function used when running the "phpize" + * program. Extracts the API numbers used. Ignores other message + * types than "cmdoutput". + * + * @param string $what the type of message + * @param mixed $data the message + * + * @return void + * + * @access public + */ + function phpizeCallback($what, $data) + { + if ($what != 'cmdoutput') { + return; + } + $this->log(1, rtrim($data)); + if (preg_match('/You should update your .aclocal.m4/', $data)) { + return; + } + $matches = array(); + if (preg_match('/^\s+(\S[^:]+):\s+(\d{8})/', $data, $matches)) { + $member = preg_replace('/[^a-z]/', '_', strtolower($matches[1])); + $apino = (int)$matches[2]; + if (isset($this->$member)) { + $this->$member = $apino; + //$msg = sprintf("%-22s : %d", $matches[1], $apino); + //$this->log(1, $msg); + } + } + } + + /** + * Run an external command, using a message callback to report + * output. The command will be run through popen and output is + * reported for every line with a "cmdoutput" message with the + * line string, including newlines, as payload. + * + * @param string $command the command to run + * + * @param mixed $callback (optional) function to use as message + * callback + * + * @return bool whether the command was successful (exit code 0 + * means success, any other means failure) + * + * @access private + */ + function _runCommand($command, $callback = null) + { + $this->log(1, "running: $command"); + $pp = popen("$command 2>&1", "r"); + if (!$pp) { + return $this->raiseError("failed to run `$command'"); + } + if ($callback && $callback[0]->debug == 1) { + $olddbg = $callback[0]->debug; + $callback[0]->debug = 2; + } + + while ($line = fgets($pp, 1024)) { + if ($callback) { + call_user_func($callback, 'cmdoutput', $line); + } else { + $this->log(2, rtrim($line)); + } + } + if ($callback && isset($olddbg)) { + $callback[0]->debug = $olddbg; + } + + $exitcode = is_resource($pp) ? pclose($pp) : -1; + return ($exitcode == 0); + } + + function log($level, $msg) + { + if ($this->current_callback) { + if ($this->debug >= $level) { + call_user_func($this->current_callback, 'output', $msg); + } + return; + } + return PEAR_Common::log($level, $msg); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/ChannelFile.php b/_piecrust/libs/PEAR/ChannelFile.php new file mode 100644 index 0000000..f2c02ab --- /dev/null +++ b/_piecrust/libs/PEAR/ChannelFile.php @@ -0,0 +1,1559 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: ChannelFile.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * Needed for error handling + */ +require_once 'PEAR/ErrorStack.php'; +require_once 'PEAR/XMLParser.php'; +require_once 'PEAR/Common.php'; + +/** + * Error code if the channel.xml tag does not contain a valid version + */ +define('PEAR_CHANNELFILE_ERROR_NO_VERSION', 1); +/** + * Error code if the channel.xml tag version is not supported (version 1.0 is the only supported version, + * currently + */ +define('PEAR_CHANNELFILE_ERROR_INVALID_VERSION', 2); + +/** + * Error code if parsing is attempted with no xml extension + */ +define('PEAR_CHANNELFILE_ERROR_NO_XML_EXT', 3); + +/** + * Error code if creating the xml parser resource fails + */ +define('PEAR_CHANNELFILE_ERROR_CANT_MAKE_PARSER', 4); + +/** + * Error code used for all sax xml parsing errors + */ +define('PEAR_CHANNELFILE_ERROR_PARSER_ERROR', 5); + +/**#@+ + * Validation errors + */ +/** + * Error code when channel name is missing + */ +define('PEAR_CHANNELFILE_ERROR_NO_NAME', 6); +/** + * Error code when channel name is invalid + */ +define('PEAR_CHANNELFILE_ERROR_INVALID_NAME', 7); +/** + * Error code when channel summary is missing + */ +define('PEAR_CHANNELFILE_ERROR_NO_SUMMARY', 8); +/** + * Error code when channel summary is multi-line + */ +define('PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY', 9); +/** + * Error code when channel server is missing for protocol + */ +define('PEAR_CHANNELFILE_ERROR_NO_HOST', 10); +/** + * Error code when channel server is invalid for protocol + */ +define('PEAR_CHANNELFILE_ERROR_INVALID_HOST', 11); +/** + * Error code when a mirror name is invalid + */ +define('PEAR_CHANNELFILE_ERROR_INVALID_MIRROR', 21); +/** + * Error code when a mirror type is invalid + */ +define('PEAR_CHANNELFILE_ERROR_INVALID_MIRRORTYPE', 22); +/** + * Error code when an attempt is made to generate xml, but the parsed content is invalid + */ +define('PEAR_CHANNELFILE_ERROR_INVALID', 23); +/** + * Error code when an empty package name validate regex is passed in + */ +define('PEAR_CHANNELFILE_ERROR_EMPTY_REGEX', 24); +/** + * Error code when a tag has no version + */ +define('PEAR_CHANNELFILE_ERROR_NO_FUNCTIONVERSION', 25); +/** + * Error code when a tag has no name + */ +define('PEAR_CHANNELFILE_ERROR_NO_FUNCTIONNAME', 26); +/** + * Error code when a tag has no name + */ +define('PEAR_CHANNELFILE_ERROR_NOVALIDATE_NAME', 27); +/** + * Error code when a tag has no version attribute + */ +define('PEAR_CHANNELFILE_ERROR_NOVALIDATE_VERSION', 28); +/** + * Error code when a mirror does not exist but is called for in one of the set* + * methods. + */ +define('PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND', 32); +/** + * Error code when a server port is not numeric + */ +define('PEAR_CHANNELFILE_ERROR_INVALID_PORT', 33); +/** + * Error code when contains no version attribute + */ +define('PEAR_CHANNELFILE_ERROR_NO_STATICVERSION', 34); +/** + * Error code when contains no type attribute in a protocol definition + */ +define('PEAR_CHANNELFILE_ERROR_NOBASEURLTYPE', 35); +/** + * Error code when a mirror is defined and the channel.xml represents the __uri pseudo-channel + */ +define('PEAR_CHANNELFILE_URI_CANT_MIRROR', 36); +/** + * Error code when ssl attribute is present and is not "yes" + */ +define('PEAR_CHANNELFILE_ERROR_INVALID_SSL', 37); +/**#@-*/ + +/** + * Mirror types allowed. Currently only internet servers are recognized. + */ +$GLOBALS['_PEAR_CHANNELS_MIRROR_TYPES'] = array('server'); + + +/** + * The Channel handling class + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_ChannelFile +{ + /** + * @access private + * @var PEAR_ErrorStack + * @access private + */ + var $_stack; + + /** + * Supported channel.xml versions, for parsing + * @var array + * @access private + */ + var $_supportedVersions = array('1.0'); + + /** + * Parsed channel information + * @var array + * @access private + */ + var $_channelInfo; + + /** + * index into the subchannels array, used for parsing xml + * @var int + * @access private + */ + var $_subchannelIndex; + + /** + * index into the mirrors array, used for parsing xml + * @var int + * @access private + */ + var $_mirrorIndex; + + /** + * Flag used to determine the validity of parsed content + * @var boolean + * @access private + */ + var $_isValid = false; + + function PEAR_ChannelFile() + { + $this->_stack = &new PEAR_ErrorStack('PEAR_ChannelFile'); + $this->_stack->setErrorMessageTemplate($this->_getErrorMessage()); + $this->_isValid = false; + } + + /** + * @return array + * @access protected + */ + function _getErrorMessage() + { + return + array( + PEAR_CHANNELFILE_ERROR_INVALID_VERSION => + 'While parsing channel.xml, an invalid version number "%version% was passed in, expecting one of %versions%', + PEAR_CHANNELFILE_ERROR_NO_VERSION => + 'No version number found in tag', + PEAR_CHANNELFILE_ERROR_NO_XML_EXT => + '%error%', + PEAR_CHANNELFILE_ERROR_CANT_MAKE_PARSER => + 'Unable to create XML parser', + PEAR_CHANNELFILE_ERROR_PARSER_ERROR => + '%error%', + PEAR_CHANNELFILE_ERROR_NO_NAME => + 'Missing channel name', + PEAR_CHANNELFILE_ERROR_INVALID_NAME => + 'Invalid channel %tag% "%name%"', + PEAR_CHANNELFILE_ERROR_NO_SUMMARY => + 'Missing channel summary', + PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY => + 'Channel summary should be on one line, but is multi-line', + PEAR_CHANNELFILE_ERROR_NO_HOST => + 'Missing channel server for %type% server', + PEAR_CHANNELFILE_ERROR_INVALID_HOST => + 'Server name "%server%" is invalid for %type% server', + PEAR_CHANNELFILE_ERROR_INVALID_MIRROR => + 'Invalid mirror name "%name%", mirror type %type%', + PEAR_CHANNELFILE_ERROR_INVALID_MIRRORTYPE => + 'Invalid mirror type "%type%"', + PEAR_CHANNELFILE_ERROR_INVALID => + 'Cannot generate xml, contents are invalid', + PEAR_CHANNELFILE_ERROR_EMPTY_REGEX => + 'packagenameregex cannot be empty', + PEAR_CHANNELFILE_ERROR_NO_FUNCTIONVERSION => + '%parent% %protocol% function has no version', + PEAR_CHANNELFILE_ERROR_NO_FUNCTIONNAME => + '%parent% %protocol% function has no name', + PEAR_CHANNELFILE_ERROR_NOBASEURLTYPE => + '%parent% rest baseurl has no type', + PEAR_CHANNELFILE_ERROR_NOVALIDATE_NAME => + 'Validation package has no name in tag', + PEAR_CHANNELFILE_ERROR_NOVALIDATE_VERSION => + 'Validation package "%package%" has no version', + PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND => + 'Mirror "%mirror%" does not exist', + PEAR_CHANNELFILE_ERROR_INVALID_PORT => + 'Port "%port%" must be numeric', + PEAR_CHANNELFILE_ERROR_NO_STATICVERSION => + ' tag must contain version attribute', + PEAR_CHANNELFILE_URI_CANT_MIRROR => + 'The __uri pseudo-channel cannot have mirrors', + PEAR_CHANNELFILE_ERROR_INVALID_SSL => + '%server% has invalid ssl attribute "%ssl%" can only be yes or not present', + ); + } + + /** + * @param string contents of package.xml file + * @return bool success of parsing + */ + function fromXmlString($data) + { + if (preg_match('/_supportedVersions)) { + $this->_stack->push(PEAR_CHANNELFILE_ERROR_INVALID_VERSION, 'error', + array('version' => $channelversion[1])); + return false; + } + $parser = new PEAR_XMLParser; + $result = $parser->parse($data); + if ($result !== true) { + if ($result->getCode() == 1) { + $this->_stack->push(PEAR_CHANNELFILE_ERROR_NO_XML_EXT, 'error', + array('error' => $result->getMessage())); + } else { + $this->_stack->push(PEAR_CHANNELFILE_ERROR_CANT_MAKE_PARSER, 'error'); + } + return false; + } + $this->_channelInfo = $parser->getData(); + return true; + } else { + $this->_stack->push(PEAR_CHANNELFILE_ERROR_NO_VERSION, 'error', array('xml' => $data)); + return false; + } + } + + /** + * @return array + */ + function toArray() + { + if (!$this->_isValid && !$this->validate()) { + return false; + } + return $this->_channelInfo; + } + + /** + * @param array + * @static + * @return PEAR_ChannelFile|false false if invalid + */ + function &fromArray($data, $compatibility = false, $stackClass = 'PEAR_ErrorStack') + { + $a = new PEAR_ChannelFile($compatibility, $stackClass); + $a->_fromArray($data); + if (!$a->validate()) { + $a = false; + return $a; + } + return $a; + } + + /** + * Unlike {@link fromArray()} this does not do any validation + * @param array + * @static + * @return PEAR_ChannelFile + */ + function &fromArrayWithErrors($data, $compatibility = false, + $stackClass = 'PEAR_ErrorStack') + { + $a = new PEAR_ChannelFile($compatibility, $stackClass); + $a->_fromArray($data); + return $a; + } + + /** + * @param array + * @access private + */ + function _fromArray($data) + { + $this->_channelInfo = $data; + } + + /** + * Wrapper to {@link PEAR_ErrorStack::getErrors()} + * @param boolean determines whether to purge the error stack after retrieving + * @return array + */ + function getErrors($purge = false) + { + return $this->_stack->getErrors($purge); + } + + /** + * Unindent given string (?) + * + * @param string $str The string that has to be unindented. + * @return string + * @access private + */ + function _unIndent($str) + { + // remove leading newlines + $str = preg_replace('/^[\r\n]+/', '', $str); + // find whitespace at the beginning of the first line + $indent_len = strspn($str, " \t"); + $indent = substr($str, 0, $indent_len); + $data = ''; + // remove the same amount of whitespace from following lines + foreach (explode("\n", $str) as $line) { + if (substr($line, 0, $indent_len) == $indent) { + $data .= substr($line, $indent_len) . "\n"; + } + } + return $data; + } + + /** + * Parse a channel.xml file. Expects the name of + * a channel xml file as input. + * + * @param string $descfile name of channel xml file + * @return bool success of parsing + */ + function fromXmlFile($descfile) + { + if (!file_exists($descfile) || !is_file($descfile) || !is_readable($descfile) || + (!$fp = fopen($descfile, 'r'))) { + require_once 'PEAR.php'; + return PEAR::raiseError("Unable to open $descfile"); + } + + // read the whole thing so we only get one cdata callback + // for each block of cdata + fclose($fp); + $data = file_get_contents($descfile); + return $this->fromXmlString($data); + } + + /** + * Parse channel information from different sources + * + * This method is able to extract information about a channel + * from an .xml file or a string + * + * @access public + * @param string Filename of the source or the source itself + * @return bool + */ + function fromAny($info) + { + if (is_string($info) && file_exists($info) && strlen($info) < 255) { + $tmp = substr($info, -4); + if ($tmp == '.xml') { + $info = $this->fromXmlFile($info); + } else { + $fp = fopen($info, "r"); + $test = fread($fp, 5); + fclose($fp); + if ($test == "fromXmlFile($info); + } + } + if (PEAR::isError($info)) { + require_once 'PEAR.php'; + return PEAR::raiseError($info); + } + } + if (is_string($info)) { + $info = $this->fromXmlString($info); + } + return $info; + } + + /** + * Return an XML document based on previous parsing and modifications + * + * @return string XML data + * + * @access public + */ + function toXml() + { + if (!$this->_isValid && !$this->validate()) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID); + return false; + } + if (!isset($this->_channelInfo['attribs']['version'])) { + $this->_channelInfo['attribs']['version'] = '1.0'; + } + $channelInfo = $this->_channelInfo; + $ret = "\n"; + $ret .= " + $channelInfo[name] + " . htmlspecialchars($channelInfo['summary'])." +"; + if (isset($channelInfo['suggestedalias'])) { + $ret .= ' ' . $channelInfo['suggestedalias'] . "\n"; + } + if (isset($channelInfo['validatepackage'])) { + $ret .= ' ' . + htmlspecialchars($channelInfo['validatepackage']['_content']) . + "\n"; + } + $ret .= " \n"; + $ret .= ' _makeRestXml($channelInfo['servers']['primary']['rest'], ' '); + } + $ret .= " \n"; + if (isset($channelInfo['servers']['mirror'])) { + $ret .= $this->_makeMirrorsXml($channelInfo); + } + $ret .= " \n"; + $ret .= ""; + return str_replace("\r", "\n", str_replace("\r\n", "\n", $ret)); + } + + /** + * Generate the tag + * @access private + */ + function _makeRestXml($info, $indent) + { + $ret = $indent . "\n"; + if (isset($info['baseurl']) && !isset($info['baseurl'][0])) { + $info['baseurl'] = array($info['baseurl']); + } + + if (isset($info['baseurl'])) { + foreach ($info['baseurl'] as $url) { + $ret .= "$indent \n"; + } + } + $ret .= $indent . "\n"; + return $ret; + } + + /** + * Generate the tag + * @access private + */ + function _makeMirrorsXml($channelInfo) + { + $ret = ""; + if (!isset($channelInfo['servers']['mirror'][0])) { + $channelInfo['servers']['mirror'] = array($channelInfo['servers']['mirror']); + } + foreach ($channelInfo['servers']['mirror'] as $mirror) { + $ret .= ' _makeRestXml($mirror['rest'], ' '); + } + $ret .= " \n"; + } else { + $ret .= "/>\n"; + } + } + return $ret; + } + + /** + * Generate the tag + * @access private + */ + function _makeFunctionsXml($functions, $indent, $rest = false) + { + $ret = ''; + if (!isset($functions[0])) { + $functions = array($functions); + } + foreach ($functions as $function) { + $ret .= "$indent\n"; + } + return $ret; + } + + /** + * Validation error. Also marks the object contents as invalid + * @param error code + * @param array error information + * @access private + */ + function _validateError($code, $params = array()) + { + $this->_stack->push($code, 'error', $params); + $this->_isValid = false; + } + + /** + * Validation warning. Does not mark the object contents invalid. + * @param error code + * @param array error information + * @access private + */ + function _validateWarning($code, $params = array()) + { + $this->_stack->push($code, 'warning', $params); + } + + /** + * Validate parsed file. + * + * @access public + * @return boolean + */ + function validate() + { + $this->_isValid = true; + $info = $this->_channelInfo; + if (empty($info['name'])) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_NAME); + } elseif (!$this->validChannelServer($info['name'])) { + if ($info['name'] != '__uri') { + $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME, array('tag' => 'name', + 'name' => $info['name'])); + } + } + if (empty($info['summary'])) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_SUMMARY); + } elseif (strpos(trim($info['summary']), "\n") !== false) { + $this->_validateWarning(PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY, + array('summary' => $info['summary'])); + } + if (isset($info['suggestedalias'])) { + if (!$this->validChannelServer($info['suggestedalias'])) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME, + array('tag' => 'suggestedalias', 'name' =>$info['suggestedalias'])); + } + } + if (isset($info['localalias'])) { + if (!$this->validChannelServer($info['localalias'])) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME, + array('tag' => 'localalias', 'name' =>$info['localalias'])); + } + } + if (isset($info['validatepackage'])) { + if (!isset($info['validatepackage']['_content'])) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_NOVALIDATE_NAME); + } + if (!isset($info['validatepackage']['attribs']['version'])) { + $content = isset($info['validatepackage']['_content']) ? + $info['validatepackage']['_content'] : + null; + $this->_validateError(PEAR_CHANNELFILE_ERROR_NOVALIDATE_VERSION, + array('package' => $content)); + } + } + + if (isset($info['servers']['primary']['attribs'], $info['servers']['primary']['attribs']['port']) && + !is_numeric($info['servers']['primary']['attribs']['port'])) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_PORT, + array('port' => $info['servers']['primary']['attribs']['port'])); + } + + if (isset($info['servers']['primary']['attribs'], $info['servers']['primary']['attribs']['ssl']) && + $info['servers']['primary']['attribs']['ssl'] != 'yes') { + $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_SSL, + array('ssl' => $info['servers']['primary']['attribs']['ssl'], + 'server' => $info['name'])); + } + + if (isset($info['servers']['primary']['rest']) && + isset($info['servers']['primary']['rest']['baseurl'])) { + $this->_validateFunctions('rest', $info['servers']['primary']['rest']['baseurl']); + } + if (isset($info['servers']['mirror'])) { + if ($this->_channelInfo['name'] == '__uri') { + $this->_validateError(PEAR_CHANNELFILE_URI_CANT_MIRROR); + } + if (!isset($info['servers']['mirror'][0])) { + $info['servers']['mirror'] = array($info['servers']['mirror']); + } + foreach ($info['servers']['mirror'] as $mirror) { + if (!isset($mirror['attribs']['host'])) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_HOST, + array('type' => 'mirror')); + } elseif (!$this->validChannelServer($mirror['attribs']['host'])) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_HOST, + array('server' => $mirror['attribs']['host'], 'type' => 'mirror')); + } + if (isset($mirror['attribs']['ssl']) && $mirror['attribs']['ssl'] != 'yes') { + $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_SSL, + array('ssl' => $info['ssl'], 'server' => $mirror['attribs']['host'])); + } + if (isset($mirror['rest'])) { + $this->_validateFunctions('rest', $mirror['rest']['baseurl'], + $mirror['attribs']['host']); + } + } + } + return $this->_isValid; + } + + /** + * @param string rest - protocol name this function applies to + * @param array the functions + * @param string the name of the parent element (mirror name, for instance) + */ + function _validateFunctions($protocol, $functions, $parent = '') + { + if (!isset($functions[0])) { + $functions = array($functions); + } + + foreach ($functions as $function) { + if (!isset($function['_content']) || empty($function['_content'])) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_FUNCTIONNAME, + array('parent' => $parent, 'protocol' => $protocol)); + } + + if ($protocol == 'rest') { + if (!isset($function['attribs']['type']) || + empty($function['attribs']['type'])) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_NOBASEURLTYPE, + array('parent' => $parent, 'protocol' => $protocol)); + } + } else { + if (!isset($function['attribs']['version']) || + empty($function['attribs']['version'])) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_FUNCTIONVERSION, + array('parent' => $parent, 'protocol' => $protocol)); + } + } + } + } + + /** + * Test whether a string contains a valid channel server. + * @param string $ver the package version to test + * @return bool + */ + function validChannelServer($server) + { + if ($server == '__uri') { + return true; + } + return (bool) preg_match(PEAR_CHANNELS_SERVER_PREG, $server); + } + + /** + * @return string|false + */ + function getName() + { + if (isset($this->_channelInfo['name'])) { + return $this->_channelInfo['name']; + } + + return false; + } + + /** + * @return string|false + */ + function getServer() + { + if (isset($this->_channelInfo['name'])) { + return $this->_channelInfo['name']; + } + + return false; + } + + /** + * @return int|80 port number to connect to + */ + function getPort($mirror = false) + { + if ($mirror) { + if ($mir = $this->getMirror($mirror)) { + if (isset($mir['attribs']['port'])) { + return $mir['attribs']['port']; + } + + if ($this->getSSL($mirror)) { + return 443; + } + + return 80; + } + + return false; + } + + if (isset($this->_channelInfo['servers']['primary']['attribs']['port'])) { + return $this->_channelInfo['servers']['primary']['attribs']['port']; + } + + if ($this->getSSL()) { + return 443; + } + + return 80; + } + + /** + * @return bool Determines whether secure sockets layer (SSL) is used to connect to this channel + */ + function getSSL($mirror = false) + { + if ($mirror) { + if ($mir = $this->getMirror($mirror)) { + if (isset($mir['attribs']['ssl'])) { + return true; + } + + return false; + } + + return false; + } + + if (isset($this->_channelInfo['servers']['primary']['attribs']['ssl'])) { + return true; + } + + return false; + } + + /** + * @return string|false + */ + function getSummary() + { + if (isset($this->_channelInfo['summary'])) { + return $this->_channelInfo['summary']; + } + + return false; + } + + /** + * @param string protocol type + * @param string Mirror name + * @return array|false + */ + function getFunctions($protocol, $mirror = false) + { + if ($this->getName() == '__uri') { + return false; + } + + $function = $protocol == 'rest' ? 'baseurl' : 'function'; + if ($mirror) { + if ($mir = $this->getMirror($mirror)) { + if (isset($mir[$protocol][$function])) { + return $mir[$protocol][$function]; + } + } + + return false; + } + + if (isset($this->_channelInfo['servers']['primary'][$protocol][$function])) { + return $this->_channelInfo['servers']['primary'][$protocol][$function]; + } + + return false; + } + + /** + * @param string Protocol type + * @param string Function name (null to return the + * first protocol of the type requested) + * @param string Mirror name, if any + * @return array + */ + function getFunction($type, $name = null, $mirror = false) + { + $protocols = $this->getFunctions($type, $mirror); + if (!$protocols) { + return false; + } + + foreach ($protocols as $protocol) { + if ($name === null) { + return $protocol; + } + + if ($protocol['_content'] != $name) { + continue; + } + + return $protocol; + } + + return false; + } + + /** + * @param string protocol type + * @param string protocol name + * @param string version + * @param string mirror name + * @return boolean + */ + function supports($type, $name = null, $mirror = false, $version = '1.0') + { + $protocols = $this->getFunctions($type, $mirror); + if (!$protocols) { + return false; + } + + foreach ($protocols as $protocol) { + if ($protocol['attribs']['version'] != $version) { + continue; + } + + if ($name === null) { + return true; + } + + if ($protocol['_content'] != $name) { + continue; + } + + return true; + } + + return false; + } + + /** + * Determines whether a channel supports Representational State Transfer (REST) protocols + * for retrieving channel information + * @param string + * @return bool + */ + function supportsREST($mirror = false) + { + if ($mirror == $this->_channelInfo['name']) { + $mirror = false; + } + + if ($mirror) { + if ($mir = $this->getMirror($mirror)) { + return isset($mir['rest']); + } + + return false; + } + + return isset($this->_channelInfo['servers']['primary']['rest']); + } + + /** + * Get the URL to access a base resource. + * + * Hyperlinks in the returned xml will be used to retrieve the proper information + * needed. This allows extreme extensibility and flexibility in implementation + * @param string Resource Type to retrieve + */ + function getBaseURL($resourceType, $mirror = false) + { + if ($mirror == $this->_channelInfo['name']) { + $mirror = false; + } + + if ($mirror) { + $mir = $this->getMirror($mirror); + if (!$mir) { + return false; + } + + $rest = $mir['rest']; + } else { + $rest = $this->_channelInfo['servers']['primary']['rest']; + } + + if (!isset($rest['baseurl'][0])) { + $rest['baseurl'] = array($rest['baseurl']); + } + + foreach ($rest['baseurl'] as $baseurl) { + if (strtolower($baseurl['attribs']['type']) == strtolower($resourceType)) { + return $baseurl['_content']; + } + } + + return false; + } + + /** + * Since REST does not implement RPC, provide this as a logical wrapper around + * resetFunctions for REST + * @param string|false mirror name, if any + */ + function resetREST($mirror = false) + { + return $this->resetFunctions('rest', $mirror); + } + + /** + * Empty all protocol definitions + * @param string protocol type + * @param string|false mirror name, if any + */ + function resetFunctions($type, $mirror = false) + { + if ($mirror) { + if (isset($this->_channelInfo['servers']['mirror'])) { + $mirrors = $this->_channelInfo['servers']['mirror']; + if (!isset($mirrors[0])) { + $mirrors = array($mirrors); + } + + foreach ($mirrors as $i => $mir) { + if ($mir['attribs']['host'] == $mirror) { + if (isset($this->_channelInfo['servers']['mirror'][$i][$type])) { + unset($this->_channelInfo['servers']['mirror'][$i][$type]); + } + + return true; + } + } + + return false; + } + + return false; + } + + if (isset($this->_channelInfo['servers']['primary'][$type])) { + unset($this->_channelInfo['servers']['primary'][$type]); + } + + return true; + } + + /** + * Set a channel's protocols to the protocols supported by pearweb + */ + function setDefaultPEARProtocols($version = '1.0', $mirror = false) + { + switch ($version) { + case '1.0' : + $this->resetREST($mirror); + + if (!isset($this->_channelInfo['servers'])) { + $this->_channelInfo['servers'] = array('primary' => + array('rest' => array())); + } elseif (!isset($this->_channelInfo['servers']['primary'])) { + $this->_channelInfo['servers']['primary'] = array('rest' => array()); + } + + return true; + break; + default : + return false; + break; + } + } + + /** + * @return array + */ + function getMirrors() + { + if (isset($this->_channelInfo['servers']['mirror'])) { + $mirrors = $this->_channelInfo['servers']['mirror']; + if (!isset($mirrors[0])) { + $mirrors = array($mirrors); + } + + return $mirrors; + } + + return array(); + } + + /** + * Get the unserialized XML representing a mirror + * @return array|false + */ + function getMirror($server) + { + foreach ($this->getMirrors() as $mirror) { + if ($mirror['attribs']['host'] == $server) { + return $mirror; + } + } + + return false; + } + + /** + * @param string + * @return string|false + * @error PEAR_CHANNELFILE_ERROR_NO_NAME + * @error PEAR_CHANNELFILE_ERROR_INVALID_NAME + */ + function setName($name) + { + return $this->setServer($name); + } + + /** + * Set the socket number (port) that is used to connect to this channel + * @param integer + * @param string|false name of the mirror server, or false for the primary + */ + function setPort($port, $mirror = false) + { + if ($mirror) { + if (!isset($this->_channelInfo['servers']['mirror'])) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND, + array('mirror' => $mirror)); + return false; + } + + if (isset($this->_channelInfo['servers']['mirror'][0])) { + foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) { + if ($mirror == $mir['attribs']['host']) { + $this->_channelInfo['servers']['mirror'][$i]['attribs']['port'] = $port; + return true; + } + } + + return false; + } elseif ($this->_channelInfo['servers']['mirror']['attribs']['host'] == $mirror) { + $this->_channelInfo['servers']['mirror']['attribs']['port'] = $port; + $this->_isValid = false; + return true; + } + } + + $this->_channelInfo['servers']['primary']['attribs']['port'] = $port; + $this->_isValid = false; + return true; + } + + /** + * Set the socket number (port) that is used to connect to this channel + * @param bool Determines whether to turn on SSL support or turn it off + * @param string|false name of the mirror server, or false for the primary + */ + function setSSL($ssl = true, $mirror = false) + { + if ($mirror) { + if (!isset($this->_channelInfo['servers']['mirror'])) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND, + array('mirror' => $mirror)); + return false; + } + + if (isset($this->_channelInfo['servers']['mirror'][0])) { + foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) { + if ($mirror == $mir['attribs']['host']) { + if (!$ssl) { + if (isset($this->_channelInfo['servers']['mirror'][$i] + ['attribs']['ssl'])) { + unset($this->_channelInfo['servers']['mirror'][$i]['attribs']['ssl']); + } + } else { + $this->_channelInfo['servers']['mirror'][$i]['attribs']['ssl'] = 'yes'; + } + + return true; + } + } + + return false; + } elseif ($this->_channelInfo['servers']['mirror']['attribs']['host'] == $mirror) { + if (!$ssl) { + if (isset($this->_channelInfo['servers']['mirror']['attribs']['ssl'])) { + unset($this->_channelInfo['servers']['mirror']['attribs']['ssl']); + } + } else { + $this->_channelInfo['servers']['mirror']['attribs']['ssl'] = 'yes'; + } + + $this->_isValid = false; + return true; + } + } + + if ($ssl) { + $this->_channelInfo['servers']['primary']['attribs']['ssl'] = 'yes'; + } else { + if (isset($this->_channelInfo['servers']['primary']['attribs']['ssl'])) { + unset($this->_channelInfo['servers']['primary']['attribs']['ssl']); + } + } + + $this->_isValid = false; + return true; + } + + /** + * @param string + * @return string|false + * @error PEAR_CHANNELFILE_ERROR_NO_SERVER + * @error PEAR_CHANNELFILE_ERROR_INVALID_SERVER + */ + function setServer($server, $mirror = false) + { + if (empty($server)) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_SERVER); + return false; + } elseif (!$this->validChannelServer($server)) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME, + array('tag' => 'name', 'name' => $server)); + return false; + } + + if ($mirror) { + $found = false; + foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) { + if ($mirror == $mir['attribs']['host']) { + $found = true; + break; + } + } + + if (!$found) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND, + array('mirror' => $mirror)); + return false; + } + + $this->_channelInfo['mirror'][$i]['attribs']['host'] = $server; + return true; + } + + $this->_channelInfo['name'] = $server; + return true; + } + + /** + * @param string + * @return boolean success + * @error PEAR_CHANNELFILE_ERROR_NO_SUMMARY + * @warning PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY + */ + function setSummary($summary) + { + if (empty($summary)) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_SUMMARY); + return false; + } elseif (strpos(trim($summary), "\n") !== false) { + $this->_validateWarning(PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY, + array('summary' => $summary)); + } + + $this->_channelInfo['summary'] = $summary; + return true; + } + + /** + * @param string + * @param boolean determines whether the alias is in channel.xml or local + * @return boolean success + */ + function setAlias($alias, $local = false) + { + if (!$this->validChannelServer($alias)) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME, + array('tag' => 'suggestedalias', 'name' => $alias)); + return false; + } + + if ($local) { + $this->_channelInfo['localalias'] = $alias; + } else { + $this->_channelInfo['suggestedalias'] = $alias; + } + + return true; + } + + /** + * @return string + */ + function getAlias() + { + if (isset($this->_channelInfo['localalias'])) { + return $this->_channelInfo['localalias']; + } + if (isset($this->_channelInfo['suggestedalias'])) { + return $this->_channelInfo['suggestedalias']; + } + if (isset($this->_channelInfo['name'])) { + return $this->_channelInfo['name']; + } + return ''; + } + + /** + * Set the package validation object if it differs from PEAR's default + * The class must be includeable via changing _ in the classname to path separator, + * but no checking of this is made. + * @param string|false pass in false to reset to the default packagename regex + * @return boolean success + */ + function setValidationPackage($validateclass, $version) + { + if (empty($validateclass)) { + unset($this->_channelInfo['validatepackage']); + } + $this->_channelInfo['validatepackage'] = array('_content' => $validateclass); + $this->_channelInfo['validatepackage']['attribs'] = array('version' => $version); + } + + /** + * Add a protocol to the provides section + * @param string protocol type + * @param string protocol version + * @param string protocol name, if any + * @param string mirror name, if this is a mirror's protocol + * @return bool + */ + function addFunction($type, $version, $name = '', $mirror = false) + { + if ($mirror) { + return $this->addMirrorFunction($mirror, $type, $version, $name); + } + + $set = array('attribs' => array('version' => $version), '_content' => $name); + if (!isset($this->_channelInfo['servers']['primary'][$type]['function'])) { + if (!isset($this->_channelInfo['servers'])) { + $this->_channelInfo['servers'] = array('primary' => + array($type => array())); + } elseif (!isset($this->_channelInfo['servers']['primary'])) { + $this->_channelInfo['servers']['primary'] = array($type => array()); + } + + $this->_channelInfo['servers']['primary'][$type]['function'] = $set; + $this->_isValid = false; + return true; + } elseif (!isset($this->_channelInfo['servers']['primary'][$type]['function'][0])) { + $this->_channelInfo['servers']['primary'][$type]['function'] = array( + $this->_channelInfo['servers']['primary'][$type]['function']); + } + + $this->_channelInfo['servers']['primary'][$type]['function'][] = $set; + return true; + } + /** + * Add a protocol to a mirror's provides section + * @param string mirror name (server) + * @param string protocol type + * @param string protocol version + * @param string protocol name, if any + */ + function addMirrorFunction($mirror, $type, $version, $name = '') + { + if (!isset($this->_channelInfo['servers']['mirror'])) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND, + array('mirror' => $mirror)); + return false; + } + + $setmirror = false; + if (isset($this->_channelInfo['servers']['mirror'][0])) { + foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) { + if ($mirror == $mir['attribs']['host']) { + $setmirror = &$this->_channelInfo['servers']['mirror'][$i]; + break; + } + } + } else { + if ($this->_channelInfo['servers']['mirror']['attribs']['host'] == $mirror) { + $setmirror = &$this->_channelInfo['servers']['mirror']; + } + } + + if (!$setmirror) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND, + array('mirror' => $mirror)); + return false; + } + + $set = array('attribs' => array('version' => $version), '_content' => $name); + if (!isset($setmirror[$type]['function'])) { + $setmirror[$type]['function'] = $set; + $this->_isValid = false; + return true; + } elseif (!isset($setmirror[$type]['function'][0])) { + $setmirror[$type]['function'] = array($setmirror[$type]['function']); + } + + $setmirror[$type]['function'][] = $set; + $this->_isValid = false; + return true; + } + + /** + * @param string Resource Type this url links to + * @param string URL + * @param string|false mirror name, if this is not a primary server REST base URL + */ + function setBaseURL($resourceType, $url, $mirror = false) + { + if ($mirror) { + if (!isset($this->_channelInfo['servers']['mirror'])) { + $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND, + array('mirror' => $mirror)); + return false; + } + + $setmirror = false; + if (isset($this->_channelInfo['servers']['mirror'][0])) { + foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) { + if ($mirror == $mir['attribs']['host']) { + $setmirror = &$this->_channelInfo['servers']['mirror'][$i]; + break; + } + } + } else { + if ($this->_channelInfo['servers']['mirror']['attribs']['host'] == $mirror) { + $setmirror = &$this->_channelInfo['servers']['mirror']; + } + } + } else { + $setmirror = &$this->_channelInfo['servers']['primary']; + } + + $set = array('attribs' => array('type' => $resourceType), '_content' => $url); + if (!isset($setmirror['rest'])) { + $setmirror['rest'] = array(); + } + + if (!isset($setmirror['rest']['baseurl'])) { + $setmirror['rest']['baseurl'] = $set; + $this->_isValid = false; + return true; + } elseif (!isset($setmirror['rest']['baseurl'][0])) { + $setmirror['rest']['baseurl'] = array($setmirror['rest']['baseurl']); + } + + foreach ($setmirror['rest']['baseurl'] as $i => $url) { + if ($url['attribs']['type'] == $resourceType) { + $this->_isValid = false; + $setmirror['rest']['baseurl'][$i] = $set; + return true; + } + } + + $setmirror['rest']['baseurl'][] = $set; + $this->_isValid = false; + return true; + } + + /** + * @param string mirror server + * @param int mirror http port + * @return boolean + */ + function addMirror($server, $port = null) + { + if ($this->_channelInfo['name'] == '__uri') { + return false; // the __uri channel cannot have mirrors by definition + } + + $set = array('attribs' => array('host' => $server)); + if (is_numeric($port)) { + $set['attribs']['port'] = $port; + } + + if (!isset($this->_channelInfo['servers']['mirror'])) { + $this->_channelInfo['servers']['mirror'] = $set; + return true; + } + + if (!isset($this->_channelInfo['servers']['mirror'][0])) { + $this->_channelInfo['servers']['mirror'] = + array($this->_channelInfo['servers']['mirror']); + } + + $this->_channelInfo['servers']['mirror'][] = $set; + return true; + } + + /** + * Retrieve the name of the validation package for this channel + * @return string|false + */ + function getValidationPackage() + { + if (!$this->_isValid && !$this->validate()) { + return false; + } + + if (!isset($this->_channelInfo['validatepackage'])) { + return array('attribs' => array('version' => 'default'), + '_content' => 'PEAR_Validate'); + } + + return $this->_channelInfo['validatepackage']; + } + + /** + * Retrieve the object that can be used for custom validation + * @param string|false the name of the package to validate. If the package is + * the channel validation package, PEAR_Validate is returned + * @return PEAR_Validate|false false is returned if the validation package + * cannot be located + */ + function &getValidationObject($package = false) + { + if (!class_exists('PEAR_Validate')) { + require_once 'PEAR/Validate.php'; + } + + if (!$this->_isValid) { + if (!$this->validate()) { + $a = false; + return $a; + } + } + + if (isset($this->_channelInfo['validatepackage'])) { + if ($package == $this->_channelInfo['validatepackage']) { + // channel validation packages are always validated by PEAR_Validate + $val = &new PEAR_Validate; + return $val; + } + + if (!class_exists(str_replace('.', '_', + $this->_channelInfo['validatepackage']['_content']))) { + if ($this->isIncludeable(str_replace('_', '/', + $this->_channelInfo['validatepackage']['_content']) . '.php')) { + include_once str_replace('_', '/', + $this->_channelInfo['validatepackage']['_content']) . '.php'; + $vclass = str_replace('.', '_', + $this->_channelInfo['validatepackage']['_content']); + $val = &new $vclass; + } else { + $a = false; + return $a; + } + } else { + $vclass = str_replace('.', '_', + $this->_channelInfo['validatepackage']['_content']); + $val = &new $vclass; + } + } else { + $val = &new PEAR_Validate; + } + + return $val; + } + + function isIncludeable($path) + { + $possibilities = explode(PATH_SEPARATOR, ini_get('include_path')); + foreach ($possibilities as $dir) { + if (file_exists($dir . DIRECTORY_SEPARATOR . $path) + && is_readable($dir . DIRECTORY_SEPARATOR . $path)) { + return true; + } + } + + return false; + } + + /** + * This function is used by the channel updater and retrieves a value set by + * the registry, or the current time if it has not been set + * @return string + */ + function lastModified() + { + if (isset($this->_channelInfo['_lastmodified'])) { + return $this->_channelInfo['_lastmodified']; + } + + return time(); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/ChannelFile/Parser.php b/_piecrust/libs/PEAR/ChannelFile/Parser.php new file mode 100644 index 0000000..e630ace --- /dev/null +++ b/_piecrust/libs/PEAR/ChannelFile/Parser.php @@ -0,0 +1,68 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Parser.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * base xml parser class + */ +require_once 'PEAR/XMLParser.php'; +require_once 'PEAR/ChannelFile.php'; +/** + * Parser for channel.xml + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_ChannelFile_Parser extends PEAR_XMLParser +{ + var $_config; + var $_logger; + var $_registry; + + function setConfig(&$c) + { + $this->_config = &$c; + $this->_registry = &$c->getRegistry(); + } + + function setLogger(&$l) + { + $this->_logger = &$l; + } + + function parse($data, $file) + { + if (PEAR::isError($err = parent::parse($data, $file))) { + return $err; + } + + $ret = new PEAR_ChannelFile; + $ret->setConfig($this->_config); + if (isset($this->_logger)) { + $ret->setLogger($this->_logger); + } + + $ret->fromArray($this->_unserializedData); + // make sure the filelist is in the easy to read format needed + $ret->flattenFilelist(); + $ret->setPackagefile($file, $archive); + return $ret; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command.php b/_piecrust/libs/PEAR/Command.php new file mode 100644 index 0000000..db39b8f --- /dev/null +++ b/_piecrust/libs/PEAR/Command.php @@ -0,0 +1,414 @@ + + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Command.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ + +/** + * Needed for error handling + */ +require_once 'PEAR.php'; +require_once 'PEAR/Frontend.php'; +require_once 'PEAR/XMLParser.php'; + +/** + * List of commands and what classes they are implemented in. + * @var array command => implementing class + */ +$GLOBALS['_PEAR_Command_commandlist'] = array(); + +/** + * List of commands and their descriptions + * @var array command => description + */ +$GLOBALS['_PEAR_Command_commanddesc'] = array(); + +/** + * List of shortcuts to common commands. + * @var array shortcut => command + */ +$GLOBALS['_PEAR_Command_shortcuts'] = array(); + +/** + * Array of command objects + * @var array class => object + */ +$GLOBALS['_PEAR_Command_objects'] = array(); + +/** + * PEAR command class, a simple factory class for administrative + * commands. + * + * How to implement command classes: + * + * - The class must be called PEAR_Command_Nnn, installed in the + * "PEAR/Common" subdir, with a method called getCommands() that + * returns an array of the commands implemented by the class (see + * PEAR/Command/Install.php for an example). + * + * - The class must implement a run() function that is called with three + * params: + * + * (string) command name + * (array) assoc array with options, freely defined by each + * command, for example: + * array('force' => true) + * (array) list of the other parameters + * + * The run() function returns a PEAR_CommandResponse object. Use + * these methods to get information: + * + * int getStatus() Returns PEAR_COMMAND_(SUCCESS|FAILURE|PARTIAL) + * *_PARTIAL means that you need to issue at least + * one more command to complete the operation + * (used for example for validation steps). + * + * string getMessage() Returns a message for the user. Remember, + * no HTML or other interface-specific markup. + * + * If something unexpected happens, run() returns a PEAR error. + * + * - DON'T OUTPUT ANYTHING! Return text for output instead. + * + * - DON'T USE HTML! The text you return will be used from both Gtk, + * web and command-line interfaces, so for now, keep everything to + * plain text. + * + * - DON'T USE EXIT OR DIE! Always use pear errors. From static + * classes do PEAR::raiseError(), from other classes do + * $this->raiseError(). + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + */ +class PEAR_Command +{ + // {{{ factory() + + /** + * Get the right object for executing a command. + * + * @param string $command The name of the command + * @param object $config Instance of PEAR_Config object + * + * @return object the command object or a PEAR error + * + * @access public + * @static + */ + function &factory($command, &$config) + { + if (empty($GLOBALS['_PEAR_Command_commandlist'])) { + PEAR_Command::registerCommands(); + } + if (isset($GLOBALS['_PEAR_Command_shortcuts'][$command])) { + $command = $GLOBALS['_PEAR_Command_shortcuts'][$command]; + } + if (!isset($GLOBALS['_PEAR_Command_commandlist'][$command])) { + $a = PEAR::raiseError("unknown command `$command'"); + return $a; + } + $class = $GLOBALS['_PEAR_Command_commandlist'][$command]; + if (!class_exists($class)) { + require_once $GLOBALS['_PEAR_Command_objects'][$class]; + } + if (!class_exists($class)) { + $a = PEAR::raiseError("unknown command `$command'"); + return $a; + } + $ui =& PEAR_Command::getFrontendObject(); + $obj = &new $class($ui, $config); + return $obj; + } + + // }}} + // {{{ & getObject() + function &getObject($command) + { + $class = $GLOBALS['_PEAR_Command_commandlist'][$command]; + if (!class_exists($class)) { + require_once $GLOBALS['_PEAR_Command_objects'][$class]; + } + if (!class_exists($class)) { + return PEAR::raiseError("unknown command `$command'"); + } + $ui =& PEAR_Command::getFrontendObject(); + $config = &PEAR_Config::singleton(); + $obj = &new $class($ui, $config); + return $obj; + } + + // }}} + // {{{ & getFrontendObject() + + /** + * Get instance of frontend object. + * + * @return object|PEAR_Error + * @static + */ + function &getFrontendObject() + { + $a = &PEAR_Frontend::singleton(); + return $a; + } + + // }}} + // {{{ & setFrontendClass() + + /** + * Load current frontend class. + * + * @param string $uiclass Name of class implementing the frontend + * + * @return object the frontend object, or a PEAR error + * @static + */ + function &setFrontendClass($uiclass) + { + $a = &PEAR_Frontend::setFrontendClass($uiclass); + return $a; + } + + // }}} + // {{{ setFrontendType() + + /** + * Set current frontend. + * + * @param string $uitype Name of the frontend type (for example "CLI") + * + * @return object the frontend object, or a PEAR error + * @static + */ + function setFrontendType($uitype) + { + $uiclass = 'PEAR_Frontend_' . $uitype; + return PEAR_Command::setFrontendClass($uiclass); + } + + // }}} + // {{{ registerCommands() + + /** + * Scan through the Command directory looking for classes + * and see what commands they implement. + * + * @param bool (optional) if FALSE (default), the new list of + * commands should replace the current one. If TRUE, + * new entries will be merged with old. + * + * @param string (optional) where (what directory) to look for + * classes, defaults to the Command subdirectory of + * the directory from where this file (__FILE__) is + * included. + * + * @return bool TRUE on success, a PEAR error on failure + * + * @access public + * @static + */ + function registerCommands($merge = false, $dir = null) + { + $parser = new PEAR_XMLParser; + if ($dir === null) { + $dir = dirname(__FILE__) . '/Command'; + } + if (!is_dir($dir)) { + return PEAR::raiseError("registerCommands: opendir($dir) '$dir' does not exist or is not a directory"); + } + $dp = @opendir($dir); + if (empty($dp)) { + return PEAR::raiseError("registerCommands: opendir($dir) failed"); + } + if (!$merge) { + $GLOBALS['_PEAR_Command_commandlist'] = array(); + } + + while ($file = readdir($dp)) { + if ($file{0} == '.' || substr($file, -4) != '.xml') { + continue; + } + + $f = substr($file, 0, -4); + $class = "PEAR_Command_" . $f; + // List of commands + if (empty($GLOBALS['_PEAR_Command_objects'][$class])) { + $GLOBALS['_PEAR_Command_objects'][$class] = "$dir/" . $f . '.php'; + } + + $parser->parse(file_get_contents("$dir/$file")); + $implements = $parser->getData(); + foreach ($implements as $command => $desc) { + if ($command == 'attribs') { + continue; + } + + if (isset($GLOBALS['_PEAR_Command_commandlist'][$command])) { + return PEAR::raiseError('Command "' . $command . '" already registered in ' . + 'class "' . $GLOBALS['_PEAR_Command_commandlist'][$command] . '"'); + } + + $GLOBALS['_PEAR_Command_commandlist'][$command] = $class; + $GLOBALS['_PEAR_Command_commanddesc'][$command] = $desc['summary']; + if (isset($desc['shortcut'])) { + $shortcut = $desc['shortcut']; + if (isset($GLOBALS['_PEAR_Command_shortcuts'][$shortcut])) { + return PEAR::raiseError('Command shortcut "' . $shortcut . '" already ' . + 'registered to command "' . $command . '" in class "' . + $GLOBALS['_PEAR_Command_commandlist'][$command] . '"'); + } + $GLOBALS['_PEAR_Command_shortcuts'][$shortcut] = $command; + } + + if (isset($desc['options']) && $desc['options']) { + foreach ($desc['options'] as $oname => $option) { + if (isset($option['shortopt']) && strlen($option['shortopt']) > 1) { + return PEAR::raiseError('Option "' . $oname . '" short option "' . + $option['shortopt'] . '" must be ' . + 'only 1 character in Command "' . $command . '" in class "' . + $class . '"'); + } + } + } + } + } + + ksort($GLOBALS['_PEAR_Command_shortcuts']); + ksort($GLOBALS['_PEAR_Command_commandlist']); + @closedir($dp); + return true; + } + + // }}} + // {{{ getCommands() + + /** + * Get the list of currently supported commands, and what + * classes implement them. + * + * @return array command => implementing class + * + * @access public + * @static + */ + function getCommands() + { + if (empty($GLOBALS['_PEAR_Command_commandlist'])) { + PEAR_Command::registerCommands(); + } + return $GLOBALS['_PEAR_Command_commandlist']; + } + + // }}} + // {{{ getShortcuts() + + /** + * Get the list of command shortcuts. + * + * @return array shortcut => command + * + * @access public + * @static + */ + function getShortcuts() + { + if (empty($GLOBALS['_PEAR_Command_shortcuts'])) { + PEAR_Command::registerCommands(); + } + return $GLOBALS['_PEAR_Command_shortcuts']; + } + + // }}} + // {{{ getGetoptArgs() + + /** + * Compiles arguments for getopt. + * + * @param string $command command to get optstring for + * @param string $short_args (reference) short getopt format + * @param array $long_args (reference) long getopt format + * + * @return void + * + * @access public + * @static + */ + function getGetoptArgs($command, &$short_args, &$long_args) + { + if (empty($GLOBALS['_PEAR_Command_commandlist'])) { + PEAR_Command::registerCommands(); + } + if (isset($GLOBALS['_PEAR_Command_shortcuts'][$command])) { + $command = $GLOBALS['_PEAR_Command_shortcuts'][$command]; + } + if (!isset($GLOBALS['_PEAR_Command_commandlist'][$command])) { + return null; + } + $obj = &PEAR_Command::getObject($command); + return $obj->getGetoptArgs($command, $short_args, $long_args); + } + + // }}} + // {{{ getDescription() + + /** + * Get description for a command. + * + * @param string $command Name of the command + * + * @return string command description + * + * @access public + * @static + */ + function getDescription($command) + { + if (!isset($GLOBALS['_PEAR_Command_commanddesc'][$command])) { + return null; + } + return $GLOBALS['_PEAR_Command_commanddesc'][$command]; + } + + // }}} + // {{{ getHelp() + + /** + * Get help for command. + * + * @param string $command Name of the command to return help for + * + * @access public + * @static + */ + function getHelp($command) + { + $cmds = PEAR_Command::getCommands(); + if (isset($GLOBALS['_PEAR_Command_shortcuts'][$command])) { + $command = $GLOBALS['_PEAR_Command_shortcuts'][$command]; + } + if (isset($cmds[$command])) { + $obj = &PEAR_Command::getObject($command); + return $obj->getHelp($command); + } + return false; + } + // }}} +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Auth.php b/_piecrust/libs/PEAR/Command/Auth.php new file mode 100644 index 0000000..63cd152 --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Auth.php @@ -0,0 +1,81 @@ + + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Auth.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + * @deprecated since 1.8.0alpha1 + */ + +/** + * base class + */ +require_once 'PEAR/Command/Channels.php'; + +/** + * PEAR commands for login/logout + * + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + * @deprecated since 1.8.0alpha1 + */ +class PEAR_Command_Auth extends PEAR_Command_Channels +{ + var $commands = array( + 'login' => array( + 'summary' => 'Connects and authenticates to remote server [Deprecated in favor of channel-login]', + 'shortcut' => 'li', + 'function' => 'doLogin', + 'options' => array(), + 'doc' => ' +WARNING: This function is deprecated in favor of using channel-login + +Log in to a remote channel server. If is not supplied, +the default channel is used. To use remote functions in the installer +that require any kind of privileges, you need to log in first. The +username and password you enter here will be stored in your per-user +PEAR configuration (~/.pearrc on Unix-like systems). After logging +in, your username and password will be sent along in subsequent +operations on the remote server.', + ), + 'logout' => array( + 'summary' => 'Logs out from the remote server [Deprecated in favor of channel-logout]', + 'shortcut' => 'lo', + 'function' => 'doLogout', + 'options' => array(), + 'doc' => ' +WARNING: This function is deprecated in favor of using channel-logout + +Logs out from the remote server. This command does not actually +connect to the remote server, it only deletes the stored username and +password from your user configuration.', + ) + + ); + + /** + * PEAR_Command_Auth constructor. + * + * @access public + */ + function PEAR_Command_Auth(&$ui, &$config) + { + parent::PEAR_Command_Channels($ui, $config); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Auth.xml b/_piecrust/libs/PEAR/Command/Auth.xml new file mode 100644 index 0000000..590193d --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Auth.xml @@ -0,0 +1,30 @@ + + + Connects and authenticates to remote server [Deprecated in favor of channel-login] + doLogin + li + + <channel name> +WARNING: This function is deprecated in favor of using channel-login + +Log in to a remote channel server. If <channel name> is not supplied, +the default channel is used. To use remote functions in the installer +that require any kind of privileges, you need to log in first. The +username and password you enter here will be stored in your per-user +PEAR configuration (~/.pearrc on Unix-like systems). After logging +in, your username and password will be sent along in subsequent +operations on the remote server. + + + Logs out from the remote server [Deprecated in favor of channel-logout] + doLogout + lo + + +WARNING: This function is deprecated in favor of using channel-logout + +Logs out from the remote server. This command does not actually +connect to the remote server, it only deletes the stored username and +password from your user configuration. + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Build.php b/_piecrust/libs/PEAR/Command/Build.php new file mode 100644 index 0000000..1de7320 --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Build.php @@ -0,0 +1,85 @@ + + * @author Tomas V.V.Cox + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Build.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ + +/** + * base class + */ +require_once 'PEAR/Command/Common.php'; + +/** + * PEAR commands for building extensions. + * + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Tomas V.V.Cox + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + */ +class PEAR_Command_Build extends PEAR_Command_Common +{ + var $commands = array( + 'build' => array( + 'summary' => 'Build an Extension From C Source', + 'function' => 'doBuild', + 'shortcut' => 'b', + 'options' => array(), + 'doc' => '[package.xml] +Builds one or more extensions contained in a package.' + ), + ); + + /** + * PEAR_Command_Build constructor. + * + * @access public + */ + function PEAR_Command_Build(&$ui, &$config) + { + parent::PEAR_Command_Common($ui, $config); + } + + function doBuild($command, $options, $params) + { + require_once 'PEAR/Builder.php'; + if (sizeof($params) < 1) { + $params[0] = 'package.xml'; + } + + $builder = &new PEAR_Builder($this->ui); + $this->debug = $this->config->get('verbose'); + $err = $builder->build($params[0], array(&$this, 'buildCallback')); + if (PEAR::isError($err)) { + return $err; + } + + return true; + } + + function buildCallback($what, $data) + { + if (($what == 'cmdoutput' && $this->debug > 1) || + ($what == 'output' && $this->debug > 0)) { + $this->ui->outputData(rtrim($data), 'build'); + } + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Build.xml b/_piecrust/libs/PEAR/Command/Build.xml new file mode 100644 index 0000000..ec4e6f5 --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Build.xml @@ -0,0 +1,10 @@ + + + Build an Extension From C Source + doBuild + b + + [package.xml] +Builds one or more extensions contained in a package. + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Channels.php b/_piecrust/libs/PEAR/Command/Channels.php new file mode 100644 index 0000000..fcf01b5 --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Channels.php @@ -0,0 +1,883 @@ + + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Channels.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * base class + */ +require_once 'PEAR/Command/Common.php'; + +define('PEAR_COMMAND_CHANNELS_CHANNEL_EXISTS', -500); + +/** + * PEAR commands for managing channels. + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Command_Channels extends PEAR_Command_Common +{ + var $commands = array( + 'list-channels' => array( + 'summary' => 'List Available Channels', + 'function' => 'doList', + 'shortcut' => 'lc', + 'options' => array(), + 'doc' => ' +List all available channels for installation. +', + ), + 'update-channels' => array( + 'summary' => 'Update the Channel List', + 'function' => 'doUpdateAll', + 'shortcut' => 'uc', + 'options' => array(), + 'doc' => ' +List all installed packages in all channels. +' + ), + 'channel-delete' => array( + 'summary' => 'Remove a Channel From the List', + 'function' => 'doDelete', + 'shortcut' => 'cde', + 'options' => array(), + 'doc' => ' +Delete a channel from the registry. You may not +remove any channel that has installed packages. +' + ), + 'channel-add' => array( + 'summary' => 'Add a Channel', + 'function' => 'doAdd', + 'shortcut' => 'ca', + 'options' => array(), + 'doc' => ' +Add a private channel to the channel list. Note that all +public channels should be synced using "update-channels". +Parameter may be either a local file or remote URL to a +channel.xml. +' + ), + 'channel-update' => array( + 'summary' => 'Update an Existing Channel', + 'function' => 'doUpdate', + 'shortcut' => 'cu', + 'options' => array( + 'force' => array( + 'shortopt' => 'f', + 'doc' => 'will force download of new channel.xml if an existing channel name is used', + ), + 'channel' => array( + 'shortopt' => 'c', + 'arg' => 'CHANNEL', + 'doc' => 'will force download of new channel.xml if an existing channel name is used', + ), +), + 'doc' => '[|] +Update a channel in the channel list directly. Note that all +public channels can be synced using "update-channels". +Parameter may be a local or remote channel.xml, or the name of +an existing channel. +' + ), + 'channel-info' => array( + 'summary' => 'Retrieve Information on a Channel', + 'function' => 'doInfo', + 'shortcut' => 'ci', + 'options' => array(), + 'doc' => ' +List the files in an installed package. +' + ), + 'channel-alias' => array( + 'summary' => 'Specify an alias to a channel name', + 'function' => 'doAlias', + 'shortcut' => 'cha', + 'options' => array(), + 'doc' => ' +Specify a specific alias to use for a channel name. +The alias may not be an existing channel name or +alias. +' + ), + 'channel-discover' => array( + 'summary' => 'Initialize a Channel from its server', + 'function' => 'doDiscover', + 'shortcut' => 'di', + 'options' => array(), + 'doc' => '[|] +Initialize a channel from its server and create a local channel.xml. +If is in the format ":@" then + and will be set as the login username/password for +. Use caution when passing the username/password in this way, as +it may allow other users on your computer to briefly view your username/ +password via the system\'s process list. +' + ), + 'channel-login' => array( + 'summary' => 'Connects and authenticates to remote channel server', + 'shortcut' => 'cli', + 'function' => 'doLogin', + 'options' => array(), + 'doc' => ' +Log in to a remote channel server. If is not supplied, +the default channel is used. To use remote functions in the installer +that require any kind of privileges, you need to log in first. The +username and password you enter here will be stored in your per-user +PEAR configuration (~/.pearrc on Unix-like systems). After logging +in, your username and password will be sent along in subsequent +operations on the remote server.', + ), + 'channel-logout' => array( + 'summary' => 'Logs out from the remote channel server', + 'shortcut' => 'clo', + 'function' => 'doLogout', + 'options' => array(), + 'doc' => ' +Logs out from a remote channel server. If is not supplied, +the default channel is used. This command does not actually connect to the +remote server, it only deletes the stored username and password from your user +configuration.', + ), + ); + + /** + * PEAR_Command_Registry constructor. + * + * @access public + */ + function PEAR_Command_Channels(&$ui, &$config) + { + parent::PEAR_Command_Common($ui, $config); + } + + function _sortChannels($a, $b) + { + return strnatcasecmp($a->getName(), $b->getName()); + } + + function doList($command, $options, $params) + { + $reg = &$this->config->getRegistry(); + $registered = $reg->getChannels(); + usort($registered, array(&$this, '_sortchannels')); + $i = $j = 0; + $data = array( + 'caption' => 'Registered Channels:', + 'border' => true, + 'headline' => array('Channel', 'Alias', 'Summary') + ); + foreach ($registered as $channel) { + $data['data'][] = array($channel->getName(), + $channel->getAlias(), + $channel->getSummary()); + } + + if (count($registered) === 0) { + $data = '(no registered channels)'; + } + $this->ui->outputData($data, $command); + return true; + } + + function doUpdateAll($command, $options, $params) + { + $reg = &$this->config->getRegistry(); + $channels = $reg->getChannels(); + + $success = true; + foreach ($channels as $channel) { + if ($channel->getName() != '__uri') { + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $err = $this->doUpdate('channel-update', + $options, + array($channel->getName())); + if (PEAR::isError($err)) { + $this->ui->outputData($err->getMessage(), $command); + $success = false; + } else { + $success &= $err; + } + } + } + return $success; + } + + function doInfo($command, $options, $params) + { + if (count($params) !== 1) { + return $this->raiseError("No channel specified"); + } + + $reg = &$this->config->getRegistry(); + $channel = strtolower($params[0]); + if ($reg->channelExists($channel)) { + $chan = $reg->getChannel($channel); + if (PEAR::isError($chan)) { + return $this->raiseError($chan); + } + } else { + if (strpos($channel, '://')) { + $downloader = &$this->getDownloader(); + $tmpdir = $this->config->get('temp_dir'); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $loc = $downloader->downloadHttp($channel, $this->ui, $tmpdir); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($loc)) { + return $this->raiseError('Cannot open "' . $channel . + '" (' . $loc->getMessage() . ')'); + } else { + $contents = implode('', file($loc)); + } + } else { + if (!file_exists($params[0])) { + return $this->raiseError('Unknown channel "' . $channel . '"'); + } + + $fp = fopen($params[0], 'r'); + if (!$fp) { + return $this->raiseError('Cannot open "' . $params[0] . '"'); + } + + $contents = ''; + while (!feof($fp)) { + $contents .= fread($fp, 1024); + } + fclose($fp); + } + + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } + + $chan = new PEAR_ChannelFile; + $chan->fromXmlString($contents); + $chan->validate(); + if ($errs = $chan->getErrors(true)) { + foreach ($errs as $err) { + $this->ui->outputData($err['level'] . ': ' . $err['message']); + } + return $this->raiseError('Channel file "' . $params[0] . '" is not valid'); + } + } + + if (!$chan) { + return $this->raiseError('Serious error: Channel "' . $params[0] . + '" has a corrupted registry entry'); + } + + $channel = $chan->getName(); + $caption = 'Channel ' . $channel . ' Information:'; + $data1 = array( + 'caption' => $caption, + 'border' => true); + $data1['data']['server'] = array('Name and Server', $chan->getName()); + if ($chan->getAlias() != $chan->getName()) { + $data1['data']['alias'] = array('Alias', $chan->getAlias()); + } + + $data1['data']['summary'] = array('Summary', $chan->getSummary()); + $validate = $chan->getValidationPackage(); + $data1['data']['vpackage'] = array('Validation Package Name', $validate['_content']); + $data1['data']['vpackageversion'] = + array('Validation Package Version', $validate['attribs']['version']); + $d = array(); + $d['main'] = $data1; + + $data['data'] = array(); + $data['caption'] = 'Server Capabilities'; + $data['headline'] = array('Type', 'Version/REST type', 'Function Name/REST base'); + if ($chan->supportsREST()) { + if ($chan->supportsREST()) { + $funcs = $chan->getFunctions('rest'); + if (!isset($funcs[0])) { + $funcs = array($funcs); + } + foreach ($funcs as $protocol) { + $data['data'][] = array('rest', $protocol['attribs']['type'], + $protocol['_content']); + } + } + } else { + $data['data'][] = array('No supported protocols'); + } + + $d['protocols'] = $data; + $data['data'] = array(); + $mirrors = $chan->getMirrors(); + if ($mirrors) { + $data['caption'] = 'Channel ' . $channel . ' Mirrors:'; + unset($data['headline']); + foreach ($mirrors as $mirror) { + $data['data'][] = array($mirror['attribs']['host']); + $d['mirrors'] = $data; + } + + foreach ($mirrors as $i => $mirror) { + $data['data'] = array(); + $data['caption'] = 'Mirror ' . $mirror['attribs']['host'] . ' Capabilities'; + $data['headline'] = array('Type', 'Version/REST type', 'Function Name/REST base'); + if ($chan->supportsREST($mirror['attribs']['host'])) { + if ($chan->supportsREST($mirror['attribs']['host'])) { + $funcs = $chan->getFunctions('rest', $mirror['attribs']['host']); + if (!isset($funcs[0])) { + $funcs = array($funcs); + } + + foreach ($funcs as $protocol) { + $data['data'][] = array('rest', $protocol['attribs']['type'], + $protocol['_content']); + } + } + } else { + $data['data'][] = array('No supported protocols'); + } + $d['mirrorprotocols' . $i] = $data; + } + } + $this->ui->outputData($d, 'channel-info'); + } + + // }}} + + function doDelete($command, $options, $params) + { + if (count($params) !== 1) { + return $this->raiseError('channel-delete: no channel specified'); + } + + $reg = &$this->config->getRegistry(); + if (!$reg->channelExists($params[0])) { + return $this->raiseError('channel-delete: channel "' . $params[0] . '" does not exist'); + } + + $channel = $reg->channelName($params[0]); + if ($channel == 'pear.php.net') { + return $this->raiseError('Cannot delete the pear.php.net channel'); + } + + if ($channel == 'pecl.php.net') { + return $this->raiseError('Cannot delete the pecl.php.net channel'); + } + + if ($channel == 'doc.php.net') { + return $this->raiseError('Cannot delete the doc.php.net channel'); + } + + if ($channel == '__uri') { + return $this->raiseError('Cannot delete the __uri pseudo-channel'); + } + + if (PEAR::isError($err = $reg->listPackages($channel))) { + return $err; + } + + if (count($err)) { + return $this->raiseError('Channel "' . $channel . + '" has installed packages, cannot delete'); + } + + if (!$reg->deleteChannel($channel)) { + return $this->raiseError('Channel "' . $channel . '" deletion failed'); + } else { + $this->config->deleteChannel($channel); + $this->ui->outputData('Channel "' . $channel . '" deleted', $command); + } + } + + function doAdd($command, $options, $params) + { + if (count($params) !== 1) { + return $this->raiseError('channel-add: no channel file specified'); + } + + if (strpos($params[0], '://')) { + $downloader = &$this->getDownloader(); + $tmpdir = $this->config->get('temp_dir'); + if (!file_exists($tmpdir)) { + require_once 'System.php'; + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $err = System::mkdir(array('-p', $tmpdir)); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($err)) { + return $this->raiseError('channel-add: temp_dir does not exist: "' . + $tmpdir . + '" - You can change this location with "pear config-set temp_dir"'); + } + } + + if (!is_writable($tmpdir)) { + return $this->raiseError('channel-add: temp_dir is not writable: "' . + $tmpdir . + '" - You can change this location with "pear config-set temp_dir"'); + } + + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $loc = $downloader->downloadHttp($params[0], $this->ui, $tmpdir, null, false); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($loc)) { + return $this->raiseError('channel-add: Cannot open "' . $params[0] . + '" (' . $loc->getMessage() . ')'); + } + + list($loc, $lastmodified) = $loc; + $contents = implode('', file($loc)); + } else { + $lastmodified = $fp = false; + if (file_exists($params[0])) { + $fp = fopen($params[0], 'r'); + } + + if (!$fp) { + return $this->raiseError('channel-add: cannot open "' . $params[0] . '"'); + } + + $contents = ''; + while (!feof($fp)) { + $contents .= fread($fp, 1024); + } + fclose($fp); + } + + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } + + $channel = new PEAR_ChannelFile; + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $result = $channel->fromXmlString($contents); + PEAR::staticPopErrorHandling(); + if (!$result) { + $exit = false; + if (count($errors = $channel->getErrors(true))) { + foreach ($errors as $error) { + $this->ui->outputData(ucfirst($error['level'] . ': ' . $error['message'])); + if (!$exit) { + $exit = $error['level'] == 'error' ? true : false; + } + } + if ($exit) { + return $this->raiseError('channel-add: invalid channel.xml file'); + } + } + } + + $reg = &$this->config->getRegistry(); + if ($reg->channelExists($channel->getName())) { + return $this->raiseError('channel-add: Channel "' . $channel->getName() . + '" exists, use channel-update to update entry', PEAR_COMMAND_CHANNELS_CHANNEL_EXISTS); + } + + $ret = $reg->addChannel($channel, $lastmodified); + if (PEAR::isError($ret)) { + return $ret; + } + + if (!$ret) { + return $this->raiseError('channel-add: adding Channel "' . $channel->getName() . + '" to registry failed'); + } + + $this->config->setChannels($reg->listChannels()); + $this->config->writeConfigFile(); + $this->ui->outputData('Adding Channel "' . $channel->getName() . '" succeeded', $command); + } + + function doUpdate($command, $options, $params) + { + if (count($params) !== 1) { + return $this->raiseError("No channel file specified"); + } + + $tmpdir = $this->config->get('temp_dir'); + if (!file_exists($tmpdir)) { + require_once 'System.php'; + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $err = System::mkdir(array('-p', $tmpdir)); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($err)) { + return $this->raiseError('channel-add: temp_dir does not exist: "' . + $tmpdir . + '" - You can change this location with "pear config-set temp_dir"'); + } + } + + if (!is_writable($tmpdir)) { + return $this->raiseError('channel-add: temp_dir is not writable: "' . + $tmpdir . + '" - You can change this location with "pear config-set temp_dir"'); + } + + $reg = &$this->config->getRegistry(); + $lastmodified = false; + if ((!file_exists($params[0]) || is_dir($params[0])) + && $reg->channelExists(strtolower($params[0]))) { + $c = $reg->getChannel(strtolower($params[0])); + if (PEAR::isError($c)) { + return $this->raiseError($c); + } + + $this->ui->outputData("Updating channel \"$params[0]\"", $command); + $dl = &$this->getDownloader(array()); + // if force is specified, use a timestamp of "1" to force retrieval + $lastmodified = isset($options['force']) ? false : $c->lastModified(); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $contents = $dl->downloadHttp('http://' . $c->getName() . '/channel.xml', + $this->ui, $tmpdir, null, $lastmodified); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($contents)) { + // Attempt to fall back to https + $this->ui->outputData("Channel \"$params[0]\" is not responding over http://, failed with message: " . $contents->getMessage()); + $this->ui->outputData("Trying channel \"$params[0]\" over https:// instead"); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $contents = $dl->downloadHttp('https://' . $c->getName() . '/channel.xml', + $this->ui, $tmpdir, null, $lastmodified); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($contents)) { + return $this->raiseError('Cannot retrieve channel.xml for channel "' . + $c->getName() . '" (' . $contents->getMessage() . ')'); + } + } + + list($contents, $lastmodified) = $contents; + if (!$contents) { + $this->ui->outputData("Channel \"$params[0]\" is up to date"); + return; + } + + $contents = implode('', file($contents)); + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } + + $channel = new PEAR_ChannelFile; + $channel->fromXmlString($contents); + if (!$channel->getErrors()) { + // security check: is the downloaded file for the channel we got it from? + if (strtolower($channel->getName()) != strtolower($c->getName())) { + if (!isset($options['force'])) { + return $this->raiseError('ERROR: downloaded channel definition file' . + ' for channel "' . $channel->getName() . '" from channel "' . + strtolower($c->getName()) . '"'); + } + + $this->ui->log(0, 'WARNING: downloaded channel definition file' . + ' for channel "' . $channel->getName() . '" from channel "' . + strtolower($c->getName()) . '"'); + } + } + } else { + if (strpos($params[0], '://')) { + $dl = &$this->getDownloader(); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $loc = $dl->downloadHttp($params[0], + $this->ui, $tmpdir, null, $lastmodified); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($loc)) { + return $this->raiseError("Cannot open " . $params[0] . + ' (' . $loc->getMessage() . ')'); + } + + list($loc, $lastmodified) = $loc; + $contents = implode('', file($loc)); + } else { + $fp = false; + if (file_exists($params[0])) { + $fp = fopen($params[0], 'r'); + } + + if (!$fp) { + return $this->raiseError("Cannot open " . $params[0]); + } + + $contents = ''; + while (!feof($fp)) { + $contents .= fread($fp, 1024); + } + fclose($fp); + } + + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } + + $channel = new PEAR_ChannelFile; + $channel->fromXmlString($contents); + } + + $exit = false; + if (count($errors = $channel->getErrors(true))) { + foreach ($errors as $error) { + $this->ui->outputData(ucfirst($error['level'] . ': ' . $error['message'])); + if (!$exit) { + $exit = $error['level'] == 'error' ? true : false; + } + } + if ($exit) { + return $this->raiseError('Invalid channel.xml file'); + } + } + + if (!$reg->channelExists($channel->getName())) { + return $this->raiseError('Error: Channel "' . $channel->getName() . + '" does not exist, use channel-add to add an entry'); + } + + $ret = $reg->updateChannel($channel, $lastmodified); + if (PEAR::isError($ret)) { + return $ret; + } + + if (!$ret) { + return $this->raiseError('Updating Channel "' . $channel->getName() . + '" in registry failed'); + } + + $this->config->setChannels($reg->listChannels()); + $this->config->writeConfigFile(); + $this->ui->outputData('Update of Channel "' . $channel->getName() . '" succeeded'); + } + + function &getDownloader() + { + if (!class_exists('PEAR_Downloader')) { + require_once 'PEAR/Downloader.php'; + } + $a = new PEAR_Downloader($this->ui, array(), $this->config); + return $a; + } + + function doAlias($command, $options, $params) + { + if (count($params) === 1) { + return $this->raiseError('No channel alias specified'); + } + + if (count($params) !== 2 || (!empty($params[1]) && $params[1]{0} == '-')) { + return $this->raiseError( + 'Invalid format, correct is: channel-alias channel alias'); + } + + $reg = &$this->config->getRegistry(); + if (!$reg->channelExists($params[0], true)) { + $extra = ''; + if ($reg->isAlias($params[0])) { + $extra = ' (use "channel-alias ' . $reg->channelName($params[0]) . ' ' . + strtolower($params[1]) . '")'; + } + + return $this->raiseError('"' . $params[0] . '" is not a valid channel' . $extra); + } + + if ($reg->isAlias($params[1])) { + return $this->raiseError('Channel "' . $reg->channelName($params[1]) . '" is ' . + 'already aliased to "' . strtolower($params[1]) . '", cannot re-alias'); + } + + $chan = &$reg->getChannel($params[0]); + if (PEAR::isError($chan)) { + return $this->raiseError('Corrupt registry? Error retrieving channel "' . $params[0] . + '" information (' . $chan->getMessage() . ')'); + } + + // make it a local alias + if (!$chan->setAlias(strtolower($params[1]), true)) { + return $this->raiseError('Alias "' . strtolower($params[1]) . + '" is not a valid channel alias'); + } + + $reg->updateChannel($chan); + $this->ui->outputData('Channel "' . $chan->getName() . '" aliased successfully to "' . + strtolower($params[1]) . '"'); + } + + /** + * The channel-discover command + * + * @param string $command command name + * @param array $options option_name => value + * @param array $params list of additional parameters. + * $params[0] should contain a string with either: + * - or + * - :@ + * @return null|PEAR_Error + */ + function doDiscover($command, $options, $params) + { + if (count($params) !== 1) { + return $this->raiseError("No channel server specified"); + } + + // Look for the possible input format ":@" + if (preg_match('/^(.+):(.+)@(.+)\\z/', $params[0], $matches)) { + $username = $matches[1]; + $password = $matches[2]; + $channel = $matches[3]; + } else { + $channel = $params[0]; + } + + $reg = &$this->config->getRegistry(); + if ($reg->channelExists($channel)) { + if (!$reg->isAlias($channel)) { + return $this->raiseError("Channel \"$channel\" is already initialized", PEAR_COMMAND_CHANNELS_CHANNEL_EXISTS); + } + + return $this->raiseError("A channel alias named \"$channel\" " . + 'already exists, aliasing channel "' . $reg->channelName($channel) + . '"'); + } + + $this->pushErrorHandling(PEAR_ERROR_RETURN); + $err = $this->doAdd($command, $options, array('http://' . $channel . '/channel.xml')); + $this->popErrorHandling(); + if (PEAR::isError($err)) { + if ($err->getCode() === PEAR_COMMAND_CHANNELS_CHANNEL_EXISTS) { + return $this->raiseError("Discovery of channel \"$channel\" failed (" . + $err->getMessage() . ')'); + } + // Attempt fetch via https + $this->ui->outputData("Discovering channel $channel over http:// failed with message: " . $err->getMessage()); + $this->ui->outputData("Trying to discover channel $channel over https:// instead"); + $this->pushErrorHandling(PEAR_ERROR_RETURN); + $err = $this->doAdd($command, $options, array('https://' . $channel . '/channel.xml')); + $this->popErrorHandling(); + if (PEAR::isError($err)) { + return $this->raiseError("Discovery of channel \"$channel\" failed (" . + $err->getMessage() . ')'); + } + } + + // Store username/password if they were given + // Arguably we should do a logintest on the channel here, but since + // that's awkward on a REST-based channel (even "pear login" doesn't + // do it for those), and XML-RPC is deprecated, it's fairly pointless. + if (isset($username)) { + $this->config->set('username', $username, 'user', $channel); + $this->config->set('password', $password, 'user', $channel); + $this->config->store(); + $this->ui->outputData("Stored login for channel \"$channel\" using username \"$username\"", $command); + } + + $this->ui->outputData("Discovery of channel \"$channel\" succeeded", $command); + } + + /** + * Execute the 'login' command. + * + * @param string $command command name + * @param array $options option_name => value + * @param array $params list of additional parameters + * + * @return bool TRUE on success or + * a PEAR error on failure + * + * @access public + */ + function doLogin($command, $options, $params) + { + $reg = &$this->config->getRegistry(); + + // If a parameter is supplied, use that as the channel to log in to + $channel = isset($params[0]) ? $params[0] : $this->config->get('default_channel'); + + $chan = $reg->getChannel($channel); + if (PEAR::isError($chan)) { + return $this->raiseError($chan); + } + + $server = $this->config->get('preferred_mirror', null, $channel); + $username = $this->config->get('username', null, $channel); + if (empty($username)) { + $username = isset($_ENV['USER']) ? $_ENV['USER'] : null; + } + $this->ui->outputData("Logging in to $server.", $command); + + list($username, $password) = $this->ui->userDialog( + $command, + array('Username', 'Password'), + array('text', 'password'), + array($username, '') + ); + $username = trim($username); + $password = trim($password); + + $ourfile = $this->config->getConfFile('user'); + if (!$ourfile) { + $ourfile = $this->config->getConfFile('system'); + } + + $this->config->set('username', $username, 'user', $channel); + $this->config->set('password', $password, 'user', $channel); + + if ($chan->supportsREST()) { + $ok = true; + } + + if ($ok !== true) { + return $this->raiseError('Login failed!'); + } + + $this->ui->outputData("Logged in.", $command); + // avoid changing any temporary settings changed with -d + $ourconfig = new PEAR_Config($ourfile, $ourfile); + $ourconfig->set('username', $username, 'user', $channel); + $ourconfig->set('password', $password, 'user', $channel); + $ourconfig->store(); + + return true; + } + + /** + * Execute the 'logout' command. + * + * @param string $command command name + * @param array $options option_name => value + * @param array $params list of additional parameters + * + * @return bool TRUE on success or + * a PEAR error on failure + * + * @access public + */ + function doLogout($command, $options, $params) + { + $reg = &$this->config->getRegistry(); + + // If a parameter is supplied, use that as the channel to log in to + $channel = isset($params[0]) ? $params[0] : $this->config->get('default_channel'); + + $chan = $reg->getChannel($channel); + if (PEAR::isError($chan)) { + return $this->raiseError($chan); + } + + $server = $this->config->get('preferred_mirror', null, $channel); + $this->ui->outputData("Logging out from $server.", $command); + $this->config->remove('username', 'user', $channel); + $this->config->remove('password', 'user', $channel); + $this->config->store(); + return true; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Channels.xml b/_piecrust/libs/PEAR/Command/Channels.xml new file mode 100644 index 0000000..47b7206 --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Channels.xml @@ -0,0 +1,123 @@ + + + List Available Channels + doList + lc + + +List all available channels for installation. + + + + Update the Channel List + doUpdateAll + uc + + +List all installed packages in all channels. + + + + Remove a Channel From the List + doDelete + cde + + <channel name> +Delete a channel from the registry. You may not +remove any channel that has installed packages. + + + + Add a Channel + doAdd + ca + + <channel.xml> +Add a private channel to the channel list. Note that all +public channels should be synced using "update-channels". +Parameter may be either a local file or remote URL to a +channel.xml. + + + + Update an Existing Channel + doUpdate + cu + + + f + will force download of new channel.xml if an existing channel name is used + + + c + will force download of new channel.xml if an existing channel name is used + CHANNEL + + + [<channel.xml>|<channel name>] +Update a channel in the channel list directly. Note that all +public channels can be synced using "update-channels". +Parameter may be a local or remote channel.xml, or the name of +an existing channel. + + + + Retrieve Information on a Channel + doInfo + ci + + <package> +List the files in an installed package. + + + + Specify an alias to a channel name + doAlias + cha + + <channel> <alias> +Specify a specific alias to use for a channel name. +The alias may not be an existing channel name or +alias. + + + + Initialize a Channel from its server + doDiscover + di + + [<channel.xml>|<channel name>] +Initialize a channel from its server and create a local channel.xml. +If <channel name> is in the format "<username>:<password>@<channel>" then +<username> and <password> will be set as the login username/password for +<channel>. Use caution when passing the username/password in this way, as +it may allow other users on your computer to briefly view your username/ +password via the system's process list. + + + + Connects and authenticates to remote channel server + doLogin + cli + + <channel name> +Log in to a remote channel server. If <channel name> is not supplied, +the default channel is used. To use remote functions in the installer +that require any kind of privileges, you need to log in first. The +username and password you enter here will be stored in your per-user +PEAR configuration (~/.pearrc on Unix-like systems). After logging +in, your username and password will be sent along in subsequent +operations on the remote server. + + + Logs out from the remote channel server + doLogout + clo + + <channel name> +Logs out from a remote channel server. If <channel name> is not supplied, +the default channel is used. This command does not actually connect to the +remote server, it only deletes the stored username and password from your user +configuration. + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Common.php b/_piecrust/libs/PEAR/Command/Common.php new file mode 100644 index 0000000..279a716 --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Common.php @@ -0,0 +1,273 @@ + + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Common.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ + +/** + * base class + */ +require_once 'PEAR.php'; + +/** + * PEAR commands base class + * + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + */ +class PEAR_Command_Common extends PEAR +{ + /** + * PEAR_Config object used to pass user system and configuration + * on when executing commands + * + * @var PEAR_Config + */ + var $config; + /** + * @var PEAR_Registry + * @access protected + */ + var $_registry; + + /** + * User Interface object, for all interaction with the user. + * @var object + */ + var $ui; + + var $_deps_rel_trans = array( + 'lt' => '<', + 'le' => '<=', + 'eq' => '=', + 'ne' => '!=', + 'gt' => '>', + 'ge' => '>=', + 'has' => '==' + ); + + var $_deps_type_trans = array( + 'pkg' => 'package', + 'ext' => 'extension', + 'php' => 'PHP', + 'prog' => 'external program', + 'ldlib' => 'external library for linking', + 'rtlib' => 'external runtime library', + 'os' => 'operating system', + 'websrv' => 'web server', + 'sapi' => 'SAPI backend' + ); + + /** + * PEAR_Command_Common constructor. + * + * @access public + */ + function PEAR_Command_Common(&$ui, &$config) + { + parent::PEAR(); + $this->config = &$config; + $this->ui = &$ui; + } + + /** + * Return a list of all the commands defined by this class. + * @return array list of commands + * @access public + */ + function getCommands() + { + $ret = array(); + foreach (array_keys($this->commands) as $command) { + $ret[$command] = $this->commands[$command]['summary']; + } + + return $ret; + } + + /** + * Return a list of all the command shortcuts defined by this class. + * @return array shortcut => command + * @access public + */ + function getShortcuts() + { + $ret = array(); + foreach (array_keys($this->commands) as $command) { + if (isset($this->commands[$command]['shortcut'])) { + $ret[$this->commands[$command]['shortcut']] = $command; + } + } + + return $ret; + } + + function getOptions($command) + { + $shortcuts = $this->getShortcuts(); + if (isset($shortcuts[$command])) { + $command = $shortcuts[$command]; + } + + if (isset($this->commands[$command]) && + isset($this->commands[$command]['options'])) { + return $this->commands[$command]['options']; + } + + return null; + } + + function getGetoptArgs($command, &$short_args, &$long_args) + { + $short_args = ''; + $long_args = array(); + if (empty($this->commands[$command]) || empty($this->commands[$command]['options'])) { + return; + } + + reset($this->commands[$command]['options']); + while (list($option, $info) = each($this->commands[$command]['options'])) { + $larg = $sarg = ''; + if (isset($info['arg'])) { + if ($info['arg']{0} == '(') { + $larg = '=='; + $sarg = '::'; + $arg = substr($info['arg'], 1, -1); + } else { + $larg = '='; + $sarg = ':'; + $arg = $info['arg']; + } + } + + if (isset($info['shortopt'])) { + $short_args .= $info['shortopt'] . $sarg; + } + + $long_args[] = $option . $larg; + } + } + + /** + * Returns the help message for the given command + * + * @param string $command The command + * @return mixed A fail string if the command does not have help or + * a two elements array containing [0]=>help string, + * [1]=> help string for the accepted cmd args + */ + function getHelp($command) + { + $config = &PEAR_Config::singleton(); + if (!isset($this->commands[$command])) { + return "No such command \"$command\""; + } + + $help = null; + if (isset($this->commands[$command]['doc'])) { + $help = $this->commands[$command]['doc']; + } + + if (empty($help)) { + // XXX (cox) Fallback to summary if there is no doc (show both?) + if (!isset($this->commands[$command]['summary'])) { + return "No help for command \"$command\""; + } + $help = $this->commands[$command]['summary']; + } + + if (preg_match_all('/{config\s+([^\}]+)}/e', $help, $matches)) { + foreach($matches[0] as $k => $v) { + $help = preg_replace("/$v/", $config->get($matches[1][$k]), $help); + } + } + + return array($help, $this->getHelpArgs($command)); + } + + /** + * Returns the help for the accepted arguments of a command + * + * @param string $command + * @return string The help string + */ + function getHelpArgs($command) + { + if (isset($this->commands[$command]['options']) && + count($this->commands[$command]['options'])) + { + $help = "Options:\n"; + foreach ($this->commands[$command]['options'] as $k => $v) { + if (isset($v['arg'])) { + if ($v['arg'][0] == '(') { + $arg = substr($v['arg'], 1, -1); + $sapp = " [$arg]"; + $lapp = "[=$arg]"; + } else { + $sapp = " $v[arg]"; + $lapp = "=$v[arg]"; + } + } else { + $sapp = $lapp = ""; + } + + if (isset($v['shortopt'])) { + $s = $v['shortopt']; + $help .= " -$s$sapp, --$k$lapp\n"; + } else { + $help .= " --$k$lapp\n"; + } + + $p = " "; + $doc = rtrim(str_replace("\n", "\n$p", $v['doc'])); + $help .= " $doc\n"; + } + + return $help; + } + + return null; + } + + function run($command, $options, $params) + { + if (empty($this->commands[$command]['function'])) { + // look for shortcuts + foreach (array_keys($this->commands) as $cmd) { + if (isset($this->commands[$cmd]['shortcut']) && $this->commands[$cmd]['shortcut'] == $command) { + if (empty($this->commands[$cmd]['function'])) { + return $this->raiseError("unknown command `$command'"); + } else { + $func = $this->commands[$cmd]['function']; + } + $command = $cmd; + + //$command = $this->commands[$cmd]['function']; + break; + } + } + } else { + $func = $this->commands[$command]['function']; + } + + return $this->$func($command, $options, $params); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Config.php b/_piecrust/libs/PEAR/Command/Config.php new file mode 100644 index 0000000..a761b27 --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Config.php @@ -0,0 +1,414 @@ + + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Config.php 313024 2011-07-06 19:51:24Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ + +/** + * base class + */ +require_once 'PEAR/Command/Common.php'; + +/** + * PEAR commands for managing configuration data. + * + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + */ +class PEAR_Command_Config extends PEAR_Command_Common +{ + var $commands = array( + 'config-show' => array( + 'summary' => 'Show All Settings', + 'function' => 'doConfigShow', + 'shortcut' => 'csh', + 'options' => array( + 'channel' => array( + 'shortopt' => 'c', + 'doc' => 'show configuration variables for another channel', + 'arg' => 'CHAN', + ), +), + 'doc' => '[layer] +Displays all configuration values. An optional argument +may be used to tell which configuration layer to display. Valid +configuration layers are "user", "system" and "default". To display +configurations for different channels, set the default_channel +configuration variable and run config-show again. +', + ), + 'config-get' => array( + 'summary' => 'Show One Setting', + 'function' => 'doConfigGet', + 'shortcut' => 'cg', + 'options' => array( + 'channel' => array( + 'shortopt' => 'c', + 'doc' => 'show configuration variables for another channel', + 'arg' => 'CHAN', + ), +), + 'doc' => ' [layer] +Displays the value of one configuration parameter. The +first argument is the name of the parameter, an optional second argument +may be used to tell which configuration layer to look in. Valid configuration +layers are "user", "system" and "default". If no layer is specified, a value +will be picked from the first layer that defines the parameter, in the order +just specified. The configuration value will be retrieved for the channel +specified by the default_channel configuration variable. +', + ), + 'config-set' => array( + 'summary' => 'Change Setting', + 'function' => 'doConfigSet', + 'shortcut' => 'cs', + 'options' => array( + 'channel' => array( + 'shortopt' => 'c', + 'doc' => 'show configuration variables for another channel', + 'arg' => 'CHAN', + ), +), + 'doc' => ' [layer] +Sets the value of one configuration parameter. The first argument is +the name of the parameter, the second argument is the new value. Some +parameters are subject to validation, and the command will fail with +an error message if the new value does not make sense. An optional +third argument may be used to specify in which layer to set the +configuration parameter. The default layer is "user". The +configuration value will be set for the current channel, which +is controlled by the default_channel configuration variable. +', + ), + 'config-help' => array( + 'summary' => 'Show Information About Setting', + 'function' => 'doConfigHelp', + 'shortcut' => 'ch', + 'options' => array(), + 'doc' => '[parameter] +Displays help for a configuration parameter. Without arguments it +displays help for all configuration parameters. +', + ), + 'config-create' => array( + 'summary' => 'Create a Default configuration file', + 'function' => 'doConfigCreate', + 'shortcut' => 'coc', + 'options' => array( + 'windows' => array( + 'shortopt' => 'w', + 'doc' => 'create a config file for a windows install', + ), + ), + 'doc' => ' +Create a default configuration file with all directory configuration +variables set to subdirectories of , and save it as . +This is useful especially for creating a configuration file for a remote +PEAR installation (using the --remoteconfig option of install, upgrade, +and uninstall). +', + ), + ); + + /** + * PEAR_Command_Config constructor. + * + * @access public + */ + function PEAR_Command_Config(&$ui, &$config) + { + parent::PEAR_Command_Common($ui, $config); + } + + function doConfigShow($command, $options, $params) + { + $layer = null; + if (is_array($params)) { + $layer = isset($params[0]) ? $params[0] : null; + } + + // $params[0] -> the layer + if ($error = $this->_checkLayer($layer)) { + return $this->raiseError("config-show:$error"); + } + + $keys = $this->config->getKeys(); + sort($keys); + $channel = isset($options['channel']) ? $options['channel'] : + $this->config->get('default_channel'); + $reg = &$this->config->getRegistry(); + if (!$reg->channelExists($channel)) { + return $this->raiseError('Channel "' . $channel . '" does not exist'); + } + + $channel = $reg->channelName($channel); + $data = array('caption' => 'Configuration (channel ' . $channel . '):'); + foreach ($keys as $key) { + $type = $this->config->getType($key); + $value = $this->config->get($key, $layer, $channel); + if ($type == 'password' && $value) { + $value = '********'; + } + + if ($value === false) { + $value = 'false'; + } elseif ($value === true) { + $value = 'true'; + } + + $data['data'][$this->config->getGroup($key)][] = array($this->config->getPrompt($key) , $key, $value); + } + + foreach ($this->config->getLayers() as $layer) { + $data['data']['Config Files'][] = array(ucfirst($layer) . ' Configuration File', 'Filename' , $this->config->getConfFile($layer)); + } + + $this->ui->outputData($data, $command); + return true; + } + + function doConfigGet($command, $options, $params) + { + $args_cnt = is_array($params) ? count($params) : 0; + switch ($args_cnt) { + case 1: + $config_key = $params[0]; + $layer = null; + break; + case 2: + $config_key = $params[0]; + $layer = $params[1]; + if ($error = $this->_checkLayer($layer)) { + return $this->raiseError("config-get:$error"); + } + break; + case 0: + default: + return $this->raiseError("config-get expects 1 or 2 parameters"); + } + + $reg = &$this->config->getRegistry(); + $channel = isset($options['channel']) ? $options['channel'] : $this->config->get('default_channel'); + if (!$reg->channelExists($channel)) { + return $this->raiseError('Channel "' . $channel . '" does not exist'); + } + + $channel = $reg->channelName($channel); + $this->ui->outputData($this->config->get($config_key, $layer, $channel), $command); + return true; + } + + function doConfigSet($command, $options, $params) + { + // $param[0] -> a parameter to set + // $param[1] -> the value for the parameter + // $param[2] -> the layer + $failmsg = ''; + if (count($params) < 2 || count($params) > 3) { + $failmsg .= "config-set expects 2 or 3 parameters"; + return PEAR::raiseError($failmsg); + } + + if (isset($params[2]) && ($error = $this->_checkLayer($params[2]))) { + $failmsg .= $error; + return PEAR::raiseError("config-set:$failmsg"); + } + + $channel = isset($options['channel']) ? $options['channel'] : $this->config->get('default_channel'); + $reg = &$this->config->getRegistry(); + if (!$reg->channelExists($channel)) { + return $this->raiseError('Channel "' . $channel . '" does not exist'); + } + + $channel = $reg->channelName($channel); + if ($params[0] == 'default_channel' && !$reg->channelExists($params[1])) { + return $this->raiseError('Channel "' . $params[1] . '" does not exist'); + } + + if ($params[0] == 'preferred_mirror' + && ( + !$reg->mirrorExists($channel, $params[1]) && + (!$reg->channelExists($params[1]) || $channel != $params[1]) + ) + ) { + $msg = 'Channel Mirror "' . $params[1] . '" does not exist'; + $msg .= ' in your registry for channel "' . $channel . '".'; + $msg .= "\n" . 'Attempt to run "pear channel-update ' . $channel .'"'; + $msg .= ' if you believe this mirror should exist as you may'; + $msg .= ' have outdated channel information.'; + return $this->raiseError($msg); + } + + if (count($params) == 2) { + array_push($params, 'user'); + $layer = 'user'; + } else { + $layer = $params[2]; + } + + array_push($params, $channel); + if (!call_user_func_array(array(&$this->config, 'set'), $params)) { + array_pop($params); + $failmsg = "config-set (" . implode(", ", $params) . ") failed, channel $channel"; + } else { + $this->config->store($layer); + } + + if ($failmsg) { + return $this->raiseError($failmsg); + } + + $this->ui->outputData('config-set succeeded', $command); + return true; + } + + function doConfigHelp($command, $options, $params) + { + if (empty($params)) { + $params = $this->config->getKeys(); + } + + $data['caption'] = "Config help" . ((count($params) == 1) ? " for $params[0]" : ''); + $data['headline'] = array('Name', 'Type', 'Description'); + $data['border'] = true; + foreach ($params as $name) { + $type = $this->config->getType($name); + $docs = $this->config->getDocs($name); + if ($type == 'set') { + $docs = rtrim($docs) . "\nValid set: " . + implode(' ', $this->config->getSetValues($name)); + } + + $data['data'][] = array($name, $type, $docs); + } + + $this->ui->outputData($data, $command); + } + + function doConfigCreate($command, $options, $params) + { + if (count($params) != 2) { + return PEAR::raiseError('config-create: must have 2 parameters, root path and ' . + 'filename to save as'); + } + + $root = $params[0]; + // Clean up the DIRECTORY_SEPARATOR mess + $ds2 = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR; + $root = preg_replace(array('!\\\\+!', '!/+!', "!$ds2+!"), + array('/', '/', '/'), + $root); + if ($root{0} != '/') { + if (!isset($options['windows'])) { + return PEAR::raiseError('Root directory must be an absolute path beginning ' . + 'with "/", was: "' . $root . '"'); + } + + if (!preg_match('/^[A-Za-z]:/', $root)) { + return PEAR::raiseError('Root directory must be an absolute path beginning ' . + 'with "\\" or "C:\\", was: "' . $root . '"'); + } + } + + $windows = isset($options['windows']); + if ($windows) { + $root = str_replace('/', '\\', $root); + } + + if (!file_exists($params[1]) && !@touch($params[1])) { + return PEAR::raiseError('Could not create "' . $params[1] . '"'); + } + + $params[1] = realpath($params[1]); + $config = &new PEAR_Config($params[1], '#no#system#config#', false, false); + if ($root{strlen($root) - 1} == '/') { + $root = substr($root, 0, strlen($root) - 1); + } + + $config->noRegistry(); + $config->set('php_dir', $windows ? "$root\\pear\\php" : "$root/pear/php", 'user'); + $config->set('data_dir', $windows ? "$root\\pear\\data" : "$root/pear/data"); + $config->set('www_dir', $windows ? "$root\\pear\\www" : "$root/pear/www"); + $config->set('cfg_dir', $windows ? "$root\\pear\\cfg" : "$root/pear/cfg"); + $config->set('ext_dir', $windows ? "$root\\pear\\ext" : "$root/pear/ext"); + $config->set('doc_dir', $windows ? "$root\\pear\\docs" : "$root/pear/docs"); + $config->set('test_dir', $windows ? "$root\\pear\\tests" : "$root/pear/tests"); + $config->set('cache_dir', $windows ? "$root\\pear\\cache" : "$root/pear/cache"); + $config->set('download_dir', $windows ? "$root\\pear\\download" : "$root/pear/download"); + $config->set('temp_dir', $windows ? "$root\\pear\\temp" : "$root/pear/temp"); + $config->set('bin_dir', $windows ? "$root\\pear" : "$root/pear"); + $config->writeConfigFile(); + $this->_showConfig($config); + $this->ui->outputData('Successfully created default configuration file "' . $params[1] . '"', + $command); + } + + function _showConfig(&$config) + { + $params = array('user'); + $keys = $config->getKeys(); + sort($keys); + $channel = 'pear.php.net'; + $data = array('caption' => 'Configuration (channel ' . $channel . '):'); + foreach ($keys as $key) { + $type = $config->getType($key); + $value = $config->get($key, 'user', $channel); + if ($type == 'password' && $value) { + $value = '********'; + } + + if ($value === false) { + $value = 'false'; + } elseif ($value === true) { + $value = 'true'; + } + $data['data'][$config->getGroup($key)][] = + array($config->getPrompt($key) , $key, $value); + } + + foreach ($config->getLayers() as $layer) { + $data['data']['Config Files'][] = + array(ucfirst($layer) . ' Configuration File', 'Filename' , + $config->getConfFile($layer)); + } + + $this->ui->outputData($data, 'config-show'); + return true; + } + + /** + * Checks if a layer is defined or not + * + * @param string $layer The layer to search for + * @return mixed False on no error or the error message + */ + function _checkLayer($layer = null) + { + if (!empty($layer) && $layer != 'default') { + $layers = $this->config->getLayers(); + if (!in_array($layer, $layers)) { + return " only the layers: \"" . implode('" or "', $layers) . "\" are supported"; + } + } + + return false; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Config.xml b/_piecrust/libs/PEAR/Command/Config.xml new file mode 100644 index 0000000..f64a925 --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Config.xml @@ -0,0 +1,92 @@ + + + Show All Settings + doConfigShow + csh + + + c + show configuration variables for another channel + CHAN + + + [layer] +Displays all configuration values. An optional argument +may be used to tell which configuration layer to display. Valid +configuration layers are "user", "system" and "default". To display +configurations for different channels, set the default_channel +configuration variable and run config-show again. + + + + Show One Setting + doConfigGet + cg + + + c + show configuration variables for another channel + CHAN + + + <parameter> [layer] +Displays the value of one configuration parameter. The +first argument is the name of the parameter, an optional second argument +may be used to tell which configuration layer to look in. Valid configuration +layers are "user", "system" and "default". If no layer is specified, a value +will be picked from the first layer that defines the parameter, in the order +just specified. The configuration value will be retrieved for the channel +specified by the default_channel configuration variable. + + + + Change Setting + doConfigSet + cs + + + c + show configuration variables for another channel + CHAN + + + <parameter> <value> [layer] +Sets the value of one configuration parameter. The first argument is +the name of the parameter, the second argument is the new value. Some +parameters are subject to validation, and the command will fail with +an error message if the new value does not make sense. An optional +third argument may be used to specify in which layer to set the +configuration parameter. The default layer is "user". The +configuration value will be set for the current channel, which +is controlled by the default_channel configuration variable. + + + + Show Information About Setting + doConfigHelp + ch + + [parameter] +Displays help for a configuration parameter. Without arguments it +displays help for all configuration parameters. + + + + Create a Default configuration file + doConfigCreate + coc + + + w + create a config file for a windows install + + + <root path> <filename> +Create a default configuration file with all directory configuration +variables set to subdirectories of <root path>, and save it as <filename>. +This is useful especially for creating a configuration file for a remote +PEAR installation (using the --remoteconfig option of install, upgrade, +and uninstall). + + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Install.php b/_piecrust/libs/PEAR/Command/Install.php new file mode 100644 index 0000000..c035f6d --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Install.php @@ -0,0 +1,1268 @@ + + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Install.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ + +/** + * base class + */ +require_once 'PEAR/Command/Common.php'; + +/** + * PEAR commands for installation or deinstallation/upgrading of + * packages. + * + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + */ +class PEAR_Command_Install extends PEAR_Command_Common +{ + // {{{ properties + + var $commands = array( + 'install' => array( + 'summary' => 'Install Package', + 'function' => 'doInstall', + 'shortcut' => 'i', + 'options' => array( + 'force' => array( + 'shortopt' => 'f', + 'doc' => 'will overwrite newer installed packages', + ), + 'loose' => array( + 'shortopt' => 'l', + 'doc' => 'do not check for recommended dependency version', + ), + 'nodeps' => array( + 'shortopt' => 'n', + 'doc' => 'ignore dependencies, install anyway', + ), + 'register-only' => array( + 'shortopt' => 'r', + 'doc' => 'do not install files, only register the package as installed', + ), + 'soft' => array( + 'shortopt' => 's', + 'doc' => 'soft install, fail silently, or upgrade if already installed', + ), + 'nobuild' => array( + 'shortopt' => 'B', + 'doc' => 'don\'t build C extensions', + ), + 'nocompress' => array( + 'shortopt' => 'Z', + 'doc' => 'request uncompressed files when downloading', + ), + 'installroot' => array( + 'shortopt' => 'R', + 'arg' => 'DIR', + 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT), use packagingroot for RPM', + ), + 'packagingroot' => array( + 'shortopt' => 'P', + 'arg' => 'DIR', + 'doc' => 'root directory used when packaging files, like RPM packaging', + ), + 'ignore-errors' => array( + 'doc' => 'force install even if there were errors', + ), + 'alldeps' => array( + 'shortopt' => 'a', + 'doc' => 'install all required and optional dependencies', + ), + 'onlyreqdeps' => array( + 'shortopt' => 'o', + 'doc' => 'install all required dependencies', + ), + 'offline' => array( + 'shortopt' => 'O', + 'doc' => 'do not attempt to download any urls or contact channels', + ), + 'pretend' => array( + 'shortopt' => 'p', + 'doc' => 'Only list the packages that would be downloaded', + ), + ), + 'doc' => '[channel/] ... +Installs one or more PEAR packages. You can specify a package to +install in four ways: + +"Package-1.0.tgz" : installs from a local file + +"http://example.com/Package-1.0.tgz" : installs from +anywhere on the net. + +"package.xml" : installs the package described in +package.xml. Useful for testing, or for wrapping a PEAR package in +another package manager such as RPM. + +"Package[-version/state][.tar]" : queries your default channel\'s server +({config master_server}) and downloads the newest package with +the preferred quality/state ({config preferred_state}). + +To retrieve Package version 1.1, use "Package-1.1," to retrieve +Package state beta, use "Package-beta." To retrieve an uncompressed +file, append .tar (make sure there is no file by the same name first) + +To download a package from another channel, prefix with the channel name like +"channel/Package" + +More than one package may be specified at once. It is ok to mix these +four ways of specifying packages. +'), + 'upgrade' => array( + 'summary' => 'Upgrade Package', + 'function' => 'doInstall', + 'shortcut' => 'up', + 'options' => array( + 'channel' => array( + 'shortopt' => 'c', + 'doc' => 'upgrade packages from a specific channel', + 'arg' => 'CHAN', + ), + 'force' => array( + 'shortopt' => 'f', + 'doc' => 'overwrite newer installed packages', + ), + 'loose' => array( + 'shortopt' => 'l', + 'doc' => 'do not check for recommended dependency version', + ), + 'nodeps' => array( + 'shortopt' => 'n', + 'doc' => 'ignore dependencies, upgrade anyway', + ), + 'register-only' => array( + 'shortopt' => 'r', + 'doc' => 'do not install files, only register the package as upgraded', + ), + 'nobuild' => array( + 'shortopt' => 'B', + 'doc' => 'don\'t build C extensions', + ), + 'nocompress' => array( + 'shortopt' => 'Z', + 'doc' => 'request uncompressed files when downloading', + ), + 'installroot' => array( + 'shortopt' => 'R', + 'arg' => 'DIR', + 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT)', + ), + 'ignore-errors' => array( + 'doc' => 'force install even if there were errors', + ), + 'alldeps' => array( + 'shortopt' => 'a', + 'doc' => 'install all required and optional dependencies', + ), + 'onlyreqdeps' => array( + 'shortopt' => 'o', + 'doc' => 'install all required dependencies', + ), + 'offline' => array( + 'shortopt' => 'O', + 'doc' => 'do not attempt to download any urls or contact channels', + ), + 'pretend' => array( + 'shortopt' => 'p', + 'doc' => 'Only list the packages that would be downloaded', + ), + ), + 'doc' => ' ... +Upgrades one or more PEAR packages. See documentation for the +"install" command for ways to specify a package. + +When upgrading, your package will be updated if the provided new +package has a higher version number (use the -f option if you need to +upgrade anyway). + +More than one package may be specified at once. +'), + 'upgrade-all' => array( + 'summary' => 'Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters]', + 'function' => 'doUpgradeAll', + 'shortcut' => 'ua', + 'options' => array( + 'channel' => array( + 'shortopt' => 'c', + 'doc' => 'upgrade packages from a specific channel', + 'arg' => 'CHAN', + ), + 'nodeps' => array( + 'shortopt' => 'n', + 'doc' => 'ignore dependencies, upgrade anyway', + ), + 'register-only' => array( + 'shortopt' => 'r', + 'doc' => 'do not install files, only register the package as upgraded', + ), + 'nobuild' => array( + 'shortopt' => 'B', + 'doc' => 'don\'t build C extensions', + ), + 'nocompress' => array( + 'shortopt' => 'Z', + 'doc' => 'request uncompressed files when downloading', + ), + 'installroot' => array( + 'shortopt' => 'R', + 'arg' => 'DIR', + 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT), use packagingroot for RPM', + ), + 'ignore-errors' => array( + 'doc' => 'force install even if there were errors', + ), + 'loose' => array( + 'doc' => 'do not check for recommended dependency version', + ), + ), + 'doc' => ' +WARNING: This function is deprecated in favor of using the upgrade command with no params + +Upgrades all packages that have a newer release available. Upgrades are +done only if there is a release available of the state specified in +"preferred_state" (currently {config preferred_state}), or a state considered +more stable. +'), + 'uninstall' => array( + 'summary' => 'Un-install Package', + 'function' => 'doUninstall', + 'shortcut' => 'un', + 'options' => array( + 'nodeps' => array( + 'shortopt' => 'n', + 'doc' => 'ignore dependencies, uninstall anyway', + ), + 'register-only' => array( + 'shortopt' => 'r', + 'doc' => 'do not remove files, only register the packages as not installed', + ), + 'installroot' => array( + 'shortopt' => 'R', + 'arg' => 'DIR', + 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT)', + ), + 'ignore-errors' => array( + 'doc' => 'force install even if there were errors', + ), + 'offline' => array( + 'shortopt' => 'O', + 'doc' => 'do not attempt to uninstall remotely', + ), + ), + 'doc' => '[channel/] ... +Uninstalls one or more PEAR packages. More than one package may be +specified at once. Prefix with channel name to uninstall from a +channel not in your default channel ({config default_channel}) +'), + 'bundle' => array( + 'summary' => 'Unpacks a Pecl Package', + 'function' => 'doBundle', + 'shortcut' => 'bun', + 'options' => array( + 'destination' => array( + 'shortopt' => 'd', + 'arg' => 'DIR', + 'doc' => 'Optional destination directory for unpacking (defaults to current path or "ext" if exists)', + ), + 'force' => array( + 'shortopt' => 'f', + 'doc' => 'Force the unpacking even if there were errors in the package', + ), + ), + 'doc' => ' +Unpacks a Pecl Package into the selected location. It will download the +package if needed. +'), + 'run-scripts' => array( + 'summary' => 'Run Post-Install Scripts bundled with a package', + 'function' => 'doRunScripts', + 'shortcut' => 'rs', + 'options' => array( + ), + 'doc' => ' +Run post-installation scripts in package , if any exist. +'), + ); + + // }}} + // {{{ constructor + + /** + * PEAR_Command_Install constructor. + * + * @access public + */ + function PEAR_Command_Install(&$ui, &$config) + { + parent::PEAR_Command_Common($ui, $config); + } + + // }}} + + /** + * For unit testing purposes + */ + function &getDownloader(&$ui, $options, &$config) + { + if (!class_exists('PEAR_Downloader')) { + require_once 'PEAR/Downloader.php'; + } + $a = &new PEAR_Downloader($ui, $options, $config); + return $a; + } + + /** + * For unit testing purposes + */ + function &getInstaller(&$ui) + { + if (!class_exists('PEAR_Installer')) { + require_once 'PEAR/Installer.php'; + } + $a = &new PEAR_Installer($ui); + return $a; + } + + function enableExtension($binaries, $type) + { + if (!($phpini = $this->config->get('php_ini', null, 'pear.php.net'))) { + return PEAR::raiseError('configuration option "php_ini" is not set to php.ini location'); + } + $ini = $this->_parseIni($phpini); + if (PEAR::isError($ini)) { + return $ini; + } + $line = 0; + if ($type == 'extsrc' || $type == 'extbin') { + $search = 'extensions'; + $enable = 'extension'; + } else { + $search = 'zend_extensions'; + ob_start(); + phpinfo(INFO_GENERAL); + $info = ob_get_contents(); + ob_end_clean(); + $debug = function_exists('leak') ? '_debug' : ''; + $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : ''; + $enable = 'zend_extension' . $debug . $ts; + } + foreach ($ini[$search] as $line => $extension) { + if (in_array($extension, $binaries, true) || in_array( + $ini['extension_dir'] . DIRECTORY_SEPARATOR . $extension, $binaries, true)) { + // already enabled - assume if one is, all are + return true; + } + } + if ($line) { + $newini = array_slice($ini['all'], 0, $line); + } else { + $newini = array(); + } + foreach ($binaries as $binary) { + if ($ini['extension_dir']) { + $binary = basename($binary); + } + $newini[] = $enable . '="' . $binary . '"' . (OS_UNIX ? "\n" : "\r\n"); + } + $newini = array_merge($newini, array_slice($ini['all'], $line)); + $fp = @fopen($phpini, 'wb'); + if (!$fp) { + return PEAR::raiseError('cannot open php.ini "' . $phpini . '" for writing'); + } + foreach ($newini as $line) { + fwrite($fp, $line); + } + fclose($fp); + return true; + } + + function disableExtension($binaries, $type) + { + if (!($phpini = $this->config->get('php_ini', null, 'pear.php.net'))) { + return PEAR::raiseError('configuration option "php_ini" is not set to php.ini location'); + } + $ini = $this->_parseIni($phpini); + if (PEAR::isError($ini)) { + return $ini; + } + $line = 0; + if ($type == 'extsrc' || $type == 'extbin') { + $search = 'extensions'; + $enable = 'extension'; + } else { + $search = 'zend_extensions'; + ob_start(); + phpinfo(INFO_GENERAL); + $info = ob_get_contents(); + ob_end_clean(); + $debug = function_exists('leak') ? '_debug' : ''; + $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : ''; + $enable = 'zend_extension' . $debug . $ts; + } + $found = false; + foreach ($ini[$search] as $line => $extension) { + if (in_array($extension, $binaries, true) || in_array( + $ini['extension_dir'] . DIRECTORY_SEPARATOR . $extension, $binaries, true)) { + $found = true; + break; + } + } + if (!$found) { + // not enabled + return true; + } + $fp = @fopen($phpini, 'wb'); + if (!$fp) { + return PEAR::raiseError('cannot open php.ini "' . $phpini . '" for writing'); + } + if ($line) { + $newini = array_slice($ini['all'], 0, $line); + // delete the enable line + $newini = array_merge($newini, array_slice($ini['all'], $line + 1)); + } else { + $newini = array_slice($ini['all'], 1); + } + foreach ($newini as $line) { + fwrite($fp, $line); + } + fclose($fp); + return true; + } + + function _parseIni($filename) + { + if (!file_exists($filename)) { + return PEAR::raiseError('php.ini "' . $filename . '" does not exist'); + } + + if (filesize($filename) > 300000) { + return PEAR::raiseError('php.ini "' . $filename . '" is too large, aborting'); + } + + ob_start(); + phpinfo(INFO_GENERAL); + $info = ob_get_contents(); + ob_end_clean(); + $debug = function_exists('leak') ? '_debug' : ''; + $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : ''; + $zend_extension_line = 'zend_extension' . $debug . $ts; + $all = @file($filename); + if (!$all) { + return PEAR::raiseError('php.ini "' . $filename .'" could not be read'); + } + $zend_extensions = $extensions = array(); + // assume this is right, but pull from the php.ini if it is found + $extension_dir = ini_get('extension_dir'); + foreach ($all as $linenum => $line) { + $line = trim($line); + if (!$line) { + continue; + } + if ($line[0] == ';') { + continue; + } + if (strtolower(substr($line, 0, 13)) == 'extension_dir') { + $line = trim(substr($line, 13)); + if ($line[0] == '=') { + $x = trim(substr($line, 1)); + $x = explode(';', $x); + $extension_dir = str_replace('"', '', array_shift($x)); + continue; + } + } + if (strtolower(substr($line, 0, 9)) == 'extension') { + $line = trim(substr($line, 9)); + if ($line[0] == '=') { + $x = trim(substr($line, 1)); + $x = explode(';', $x); + $extensions[$linenum] = str_replace('"', '', array_shift($x)); + continue; + } + } + if (strtolower(substr($line, 0, strlen($zend_extension_line))) == + $zend_extension_line) { + $line = trim(substr($line, strlen($zend_extension_line))); + if ($line[0] == '=') { + $x = trim(substr($line, 1)); + $x = explode(';', $x); + $zend_extensions[$linenum] = str_replace('"', '', array_shift($x)); + continue; + } + } + } + return array( + 'extensions' => $extensions, + 'zend_extensions' => $zend_extensions, + 'extension_dir' => $extension_dir, + 'all' => $all, + ); + } + + // {{{ doInstall() + + function doInstall($command, $options, $params) + { + if (!class_exists('PEAR_PackageFile')) { + require_once 'PEAR/PackageFile.php'; + } + + if (isset($options['installroot']) && isset($options['packagingroot'])) { + return $this->raiseError('ERROR: cannot use both --installroot and --packagingroot'); + } + + $reg = &$this->config->getRegistry(); + $channel = isset($options['channel']) ? $options['channel'] : $this->config->get('default_channel'); + if (!$reg->channelExists($channel)) { + return $this->raiseError('Channel "' . $channel . '" does not exist'); + } + + if (empty($this->installer)) { + $this->installer = &$this->getInstaller($this->ui); + } + + if ($command == 'upgrade' || $command == 'upgrade-all') { + // If people run the upgrade command but pass nothing, emulate a upgrade-all + if ($command == 'upgrade' && empty($params)) { + return $this->doUpgradeAll($command, $options, $params); + } + $options['upgrade'] = true; + } else { + $packages = $params; + } + + $instreg = &$reg; // instreg used to check if package is installed + if (isset($options['packagingroot']) && !isset($options['upgrade'])) { + $packrootphp_dir = $this->installer->_prependPath( + $this->config->get('php_dir', null, 'pear.php.net'), + $options['packagingroot']); + $instreg = new PEAR_Registry($packrootphp_dir); // other instreg! + + if ($this->config->get('verbose') > 2) { + $this->ui->outputData('using package root: ' . $options['packagingroot']); + } + } + + $abstractpackages = $otherpackages = array(); + // parse params + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + + foreach ($params as $param) { + if (strpos($param, 'http://') === 0) { + $otherpackages[] = $param; + continue; + } + + if (strpos($param, 'channel://') === false && @file_exists($param)) { + if (isset($options['force'])) { + $otherpackages[] = $param; + continue; + } + + $pkg = new PEAR_PackageFile($this->config); + $pf = $pkg->fromAnyFile($param, PEAR_VALIDATE_DOWNLOADING); + if (PEAR::isError($pf)) { + $otherpackages[] = $param; + continue; + } + + $exists = $reg->packageExists($pf->getPackage(), $pf->getChannel()); + $pversion = $reg->packageInfo($pf->getPackage(), 'version', $pf->getChannel()); + $version_compare = version_compare($pf->getVersion(), $pversion, '<='); + if ($exists && $version_compare) { + if ($this->config->get('verbose')) { + $this->ui->outputData('Ignoring installed package ' . + $reg->parsedPackageNameToString( + array('package' => $pf->getPackage(), + 'channel' => $pf->getChannel()), true)); + } + continue; + } + $otherpackages[] = $param; + continue; + } + + $e = $reg->parsePackageName($param, $channel); + if (PEAR::isError($e)) { + $otherpackages[] = $param; + } else { + $abstractpackages[] = $e; + } + } + PEAR::staticPopErrorHandling(); + + // if there are any local package .tgz or remote static url, we can't + // filter. The filter only works for abstract packages + if (count($abstractpackages) && !isset($options['force'])) { + // when not being forced, only do necessary upgrades/installs + if (isset($options['upgrade'])) { + $abstractpackages = $this->_filterUptodatePackages($abstractpackages, $command); + } else { + $count = count($abstractpackages); + foreach ($abstractpackages as $i => $package) { + if (isset($package['group'])) { + // do not filter out install groups + continue; + } + + if ($instreg->packageExists($package['package'], $package['channel'])) { + if ($count > 1) { + if ($this->config->get('verbose')) { + $this->ui->outputData('Ignoring installed package ' . + $reg->parsedPackageNameToString($package, true)); + } + unset($abstractpackages[$i]); + } elseif ($count === 1) { + // Lets try to upgrade it since it's already installed + $options['upgrade'] = true; + } + } + } + } + $abstractpackages = + array_map(array($reg, 'parsedPackageNameToString'), $abstractpackages); + } elseif (count($abstractpackages)) { + $abstractpackages = + array_map(array($reg, 'parsedPackageNameToString'), $abstractpackages); + } + + $packages = array_merge($abstractpackages, $otherpackages); + if (!count($packages)) { + $c = ''; + if (isset($options['channel'])){ + $c .= ' in channel "' . $options['channel'] . '"'; + } + $this->ui->outputData('Nothing to ' . $command . $c); + return true; + } + + $this->downloader = &$this->getDownloader($this->ui, $options, $this->config); + $errors = $downloaded = $binaries = array(); + $downloaded = &$this->downloader->download($packages); + if (PEAR::isError($downloaded)) { + return $this->raiseError($downloaded); + } + + $errors = $this->downloader->getErrorMsgs(); + if (count($errors)) { + $err = array(); + $err['data'] = array(); + foreach ($errors as $error) { + if ($error !== null) { + $err['data'][] = array($error); + } + } + + if (!empty($err['data'])) { + $err['headline'] = 'Install Errors'; + $this->ui->outputData($err); + } + + if (!count($downloaded)) { + return $this->raiseError("$command failed"); + } + } + + $data = array( + 'headline' => 'Packages that would be Installed' + ); + + if (isset($options['pretend'])) { + foreach ($downloaded as $package) { + $data['data'][] = array($reg->parsedPackageNameToString($package->getParsedPackage())); + } + $this->ui->outputData($data, 'pretend'); + return true; + } + + $this->installer->setOptions($options); + $this->installer->sortPackagesForInstall($downloaded); + if (PEAR::isError($err = $this->installer->setDownloadedPackages($downloaded))) { + $this->raiseError($err->getMessage()); + return true; + } + + $binaries = $extrainfo = array(); + foreach ($downloaded as $param) { + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $info = $this->installer->install($param, $options); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($info)) { + $oldinfo = $info; + $pkg = &$param->getPackageFile(); + if ($info->getCode() != PEAR_INSTALLER_NOBINARY) { + if (!($info = $pkg->installBinary($this->installer))) { + $this->ui->outputData('ERROR: ' .$oldinfo->getMessage()); + continue; + } + + // we just installed a different package than requested, + // let's change the param and info so that the rest of this works + $param = $info[0]; + $info = $info[1]; + } + } + + if (!is_array($info)) { + return $this->raiseError("$command failed"); + } + + if ($param->getPackageType() == 'extsrc' || + $param->getPackageType() == 'extbin' || + $param->getPackageType() == 'zendextsrc' || + $param->getPackageType() == 'zendextbin' + ) { + $pkg = &$param->getPackageFile(); + if ($instbin = $pkg->getInstalledBinary()) { + $instpkg = &$instreg->getPackage($instbin, $pkg->getChannel()); + } else { + $instpkg = &$instreg->getPackage($pkg->getPackage(), $pkg->getChannel()); + } + + foreach ($instpkg->getFilelist() as $name => $atts) { + $pinfo = pathinfo($atts['installed_as']); + if (!isset($pinfo['extension']) || + in_array($pinfo['extension'], array('c', 'h')) + ) { + continue; // make sure we don't match php_blah.h + } + + if ((strpos($pinfo['basename'], 'php_') === 0 && + $pinfo['extension'] == 'dll') || + // most unices + $pinfo['extension'] == 'so' || + // hp-ux + $pinfo['extension'] == 'sl') { + $binaries[] = array($atts['installed_as'], $pinfo); + break; + } + } + + if (count($binaries)) { + foreach ($binaries as $pinfo) { + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $ret = $this->enableExtension(array($pinfo[0]), $param->getPackageType()); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($ret)) { + $extrainfo[] = $ret->getMessage(); + if ($param->getPackageType() == 'extsrc' || + $param->getPackageType() == 'extbin') { + $exttype = 'extension'; + } else { + ob_start(); + phpinfo(INFO_GENERAL); + $info = ob_get_contents(); + ob_end_clean(); + $debug = function_exists('leak') ? '_debug' : ''; + $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : ''; + $exttype = 'zend_extension' . $debug . $ts; + } + $extrainfo[] = 'You should add "' . $exttype . '=' . + $pinfo[1]['basename'] . '" to php.ini'; + } else { + $extrainfo[] = 'Extension ' . $instpkg->getProvidesExtension() . + ' enabled in php.ini'; + } + } + } + } + + if ($this->config->get('verbose') > 0) { + $chan = $param->getChannel(); + $label = $reg->parsedPackageNameToString( + array( + 'channel' => $chan, + 'package' => $param->getPackage(), + 'version' => $param->getVersion(), + )); + $out = array('data' => "$command ok: $label"); + if (isset($info['release_warnings'])) { + $out['release_warnings'] = $info['release_warnings']; + } + $this->ui->outputData($out, $command); + + if (!isset($options['register-only']) && !isset($options['offline'])) { + if ($this->config->isDefinedLayer('ftp')) { + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $info = $this->installer->ftpInstall($param); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($info)) { + $this->ui->outputData($info->getMessage()); + $this->ui->outputData("remote install failed: $label"); + } else { + $this->ui->outputData("remote install ok: $label"); + } + } + } + } + + $deps = $param->getDeps(); + if ($deps) { + if (isset($deps['group'])) { + $groups = $deps['group']; + if (!isset($groups[0])) { + $groups = array($groups); + } + + foreach ($groups as $group) { + if ($group['attribs']['name'] == 'default') { + // default group is always installed, unless the user + // explicitly chooses to install another group + continue; + } + $extrainfo[] = $param->getPackage() . ': Optional feature ' . + $group['attribs']['name'] . ' available (' . + $group['attribs']['hint'] . ')'; + } + + $extrainfo[] = $param->getPackage() . + ': To install optional features use "pear install ' . + $reg->parsedPackageNameToString( + array('package' => $param->getPackage(), + 'channel' => $param->getChannel()), true) . + '#featurename"'; + } + } + + $pkg = &$instreg->getPackage($param->getPackage(), $param->getChannel()); + // $pkg may be NULL if install is a 'fake' install via --packagingroot + if (is_object($pkg)) { + $pkg->setConfig($this->config); + if ($list = $pkg->listPostinstallScripts()) { + $pn = $reg->parsedPackageNameToString(array('channel' => + $param->getChannel(), 'package' => $param->getPackage()), true); + $extrainfo[] = $pn . ' has post-install scripts:'; + foreach ($list as $file) { + $extrainfo[] = $file; + } + $extrainfo[] = $param->getPackage() . + ': Use "pear run-scripts ' . $pn . '" to finish setup.'; + $extrainfo[] = 'DO NOT RUN SCRIPTS FROM UNTRUSTED SOURCES'; + } + } + } + + if (count($extrainfo)) { + foreach ($extrainfo as $info) { + $this->ui->outputData($info); + } + } + + return true; + } + + // }}} + // {{{ doUpgradeAll() + + function doUpgradeAll($command, $options, $params) + { + $reg = &$this->config->getRegistry(); + $upgrade = array(); + + if (isset($options['channel'])) { + $channels = array($options['channel']); + } else { + $channels = $reg->listChannels(); + } + + foreach ($channels as $channel) { + if ($channel == '__uri') { + continue; + } + + // parse name with channel + foreach ($reg->listPackages($channel) as $name) { + $upgrade[] = $reg->parsedPackageNameToString(array( + 'channel' => $channel, + 'package' => $name + )); + } + } + + $err = $this->doInstall($command, $options, $upgrade); + if (PEAR::isError($err)) { + $this->ui->outputData($err->getMessage(), $command); + } + } + + // }}} + // {{{ doUninstall() + + function doUninstall($command, $options, $params) + { + if (count($params) < 1) { + return $this->raiseError("Please supply the package(s) you want to uninstall"); + } + + if (empty($this->installer)) { + $this->installer = &$this->getInstaller($this->ui); + } + + if (isset($options['remoteconfig'])) { + $e = $this->config->readFTPConfigFile($options['remoteconfig']); + if (!PEAR::isError($e)) { + $this->installer->setConfig($this->config); + } + } + + $reg = &$this->config->getRegistry(); + $newparams = array(); + $binaries = array(); + $badparams = array(); + foreach ($params as $pkg) { + $channel = $this->config->get('default_channel'); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $parsed = $reg->parsePackageName($pkg, $channel); + PEAR::staticPopErrorHandling(); + if (!$parsed || PEAR::isError($parsed)) { + $badparams[] = $pkg; + continue; + } + $package = $parsed['package']; + $channel = $parsed['channel']; + $info = &$reg->getPackage($package, $channel); + if ($info === null && + ($channel == 'pear.php.net' || $channel == 'pecl.php.net')) { + // make sure this isn't a package that has flipped from pear to pecl but + // used a package.xml 1.0 + $testc = ($channel == 'pear.php.net') ? 'pecl.php.net' : 'pear.php.net'; + $info = &$reg->getPackage($package, $testc); + if ($info !== null) { + $channel = $testc; + } + } + if ($info === null) { + $badparams[] = $pkg; + } else { + $newparams[] = &$info; + // check for binary packages (this is an alias for those packages if so) + if ($installedbinary = $info->getInstalledBinary()) { + $this->ui->log('adding binary package ' . + $reg->parsedPackageNameToString(array('channel' => $channel, + 'package' => $installedbinary), true)); + $newparams[] = &$reg->getPackage($installedbinary, $channel); + } + // add the contents of a dependency group to the list of installed packages + if (isset($parsed['group'])) { + $group = $info->getDependencyGroup($parsed['group']); + if ($group) { + $installed = $reg->getInstalledGroup($group); + if ($installed) { + foreach ($installed as $i => $p) { + $newparams[] = &$installed[$i]; + } + } + } + } + } + } + $err = $this->installer->sortPackagesForUninstall($newparams); + if (PEAR::isError($err)) { + $this->ui->outputData($err->getMessage(), $command); + return true; + } + $params = $newparams; + // twist this to use it to check on whether dependent packages are also being uninstalled + // for circular dependencies like subpackages + $this->installer->setUninstallPackages($newparams); + $params = array_merge($params, $badparams); + $binaries = array(); + foreach ($params as $pkg) { + $this->installer->pushErrorHandling(PEAR_ERROR_RETURN); + if ($err = $this->installer->uninstall($pkg, $options)) { + $this->installer->popErrorHandling(); + if (PEAR::isError($err)) { + $this->ui->outputData($err->getMessage(), $command); + continue; + } + if ($pkg->getPackageType() == 'extsrc' || + $pkg->getPackageType() == 'extbin' || + $pkg->getPackageType() == 'zendextsrc' || + $pkg->getPackageType() == 'zendextbin') { + if ($instbin = $pkg->getInstalledBinary()) { + continue; // this will be uninstalled later + } + + foreach ($pkg->getFilelist() as $name => $atts) { + $pinfo = pathinfo($atts['installed_as']); + if (!isset($pinfo['extension']) || + in_array($pinfo['extension'], array('c', 'h'))) { + continue; // make sure we don't match php_blah.h + } + if ((strpos($pinfo['basename'], 'php_') === 0 && + $pinfo['extension'] == 'dll') || + // most unices + $pinfo['extension'] == 'so' || + // hp-ux + $pinfo['extension'] == 'sl') { + $binaries[] = array($atts['installed_as'], $pinfo); + break; + } + } + if (count($binaries)) { + foreach ($binaries as $pinfo) { + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $ret = $this->disableExtension(array($pinfo[0]), $pkg->getPackageType()); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($ret)) { + $extrainfo[] = $ret->getMessage(); + if ($pkg->getPackageType() == 'extsrc' || + $pkg->getPackageType() == 'extbin') { + $exttype = 'extension'; + } else { + ob_start(); + phpinfo(INFO_GENERAL); + $info = ob_get_contents(); + ob_end_clean(); + $debug = function_exists('leak') ? '_debug' : ''; + $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : ''; + $exttype = 'zend_extension' . $debug . $ts; + } + $this->ui->outputData('Unable to remove "' . $exttype . '=' . + $pinfo[1]['basename'] . '" from php.ini', $command); + } else { + $this->ui->outputData('Extension ' . $pkg->getProvidesExtension() . + ' disabled in php.ini', $command); + } + } + } + } + $savepkg = $pkg; + if ($this->config->get('verbose') > 0) { + if (is_object($pkg)) { + $pkg = $reg->parsedPackageNameToString($pkg); + } + $this->ui->outputData("uninstall ok: $pkg", $command); + } + if (!isset($options['offline']) && is_object($savepkg) && + defined('PEAR_REMOTEINSTALL_OK')) { + if ($this->config->isDefinedLayer('ftp')) { + $this->installer->pushErrorHandling(PEAR_ERROR_RETURN); + $info = $this->installer->ftpUninstall($savepkg); + $this->installer->popErrorHandling(); + if (PEAR::isError($info)) { + $this->ui->outputData($info->getMessage()); + $this->ui->outputData("remote uninstall failed: $pkg"); + } else { + $this->ui->outputData("remote uninstall ok: $pkg"); + } + } + } + } else { + $this->installer->popErrorHandling(); + if (!is_object($pkg)) { + return $this->raiseError("uninstall failed: $pkg"); + } + $pkg = $reg->parsedPackageNameToString($pkg); + } + } + + return true; + } + + // }}} + + + // }}} + // {{{ doBundle() + /* + (cox) It just downloads and untars the package, does not do + any check that the PEAR_Installer::_installFile() does. + */ + + function doBundle($command, $options, $params) + { + $opts = array( + 'force' => true, + 'nodeps' => true, + 'soft' => true, + 'downloadonly' => true + ); + $downloader = &$this->getDownloader($this->ui, $opts, $this->config); + $reg = &$this->config->getRegistry(); + if (count($params) < 1) { + return $this->raiseError("Please supply the package you want to bundle"); + } + + if (isset($options['destination'])) { + if (!is_dir($options['destination'])) { + System::mkdir('-p ' . $options['destination']); + } + $dest = realpath($options['destination']); + } else { + $pwd = getcwd(); + $dir = $pwd . DIRECTORY_SEPARATOR . 'ext'; + $dest = is_dir($dir) ? $dir : $pwd; + } + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $err = $downloader->setDownloadDir($dest); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($err)) { + return PEAR::raiseError('download directory "' . $dest . + '" is not writeable.'); + } + $result = &$downloader->download(array($params[0])); + if (PEAR::isError($result)) { + return $result; + } + if (!isset($result[0])) { + return $this->raiseError('unable to unpack ' . $params[0]); + } + $pkgfile = &$result[0]->getPackageFile(); + $pkgname = $pkgfile->getName(); + $pkgversion = $pkgfile->getVersion(); + + // Unpacking ------------------------------------------------- + $dest .= DIRECTORY_SEPARATOR . $pkgname; + $orig = $pkgname . '-' . $pkgversion; + + $tar = &new Archive_Tar($pkgfile->getArchiveFile()); + if (!$tar->extractModify($dest, $orig)) { + return $this->raiseError('unable to unpack ' . $pkgfile->getArchiveFile()); + } + $this->ui->outputData("Package ready at '$dest'"); + // }}} + } + + // }}} + + function doRunScripts($command, $options, $params) + { + if (!isset($params[0])) { + return $this->raiseError('run-scripts expects 1 parameter: a package name'); + } + + $reg = &$this->config->getRegistry(); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $parsed = $reg->parsePackageName($params[0], $this->config->get('default_channel')); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($parsed)) { + return $this->raiseError($parsed); + } + + $package = &$reg->getPackage($parsed['package'], $parsed['channel']); + if (!is_object($package)) { + return $this->raiseError('Could not retrieve package "' . $params[0] . '" from registry'); + } + + $package->setConfig($this->config); + $package->runPostinstallScripts(); + $this->ui->outputData('Install scripts complete', $command); + return true; + } + + /** + * Given a list of packages, filter out those ones that are already up to date + * + * @param $packages: packages, in parsed array format ! + * @return list of packages that can be upgraded + */ + function _filterUptodatePackages($packages, $command) + { + $reg = &$this->config->getRegistry(); + $latestReleases = array(); + + $ret = array(); + foreach ($packages as $package) { + if (isset($package['group'])) { + $ret[] = $package; + continue; + } + + $channel = $package['channel']; + $name = $package['package']; + if (!$reg->packageExists($name, $channel)) { + $ret[] = $package; + continue; + } + + if (!isset($latestReleases[$channel])) { + // fill in cache for this channel + $chan = &$reg->getChannel($channel); + if (PEAR::isError($chan)) { + return $this->raiseError($chan); + } + + $base2 = false; + $preferred_mirror = $this->config->get('preferred_mirror', null, $channel); + if ($chan->supportsREST($preferred_mirror) && + ( + //($base2 = $chan->getBaseURL('REST1.4', $preferred_mirror)) || + ($base = $chan->getBaseURL('REST1.0', $preferred_mirror)) + ) + ) { + $dorest = true; + } + + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + if (!isset($package['state'])) { + $state = $this->config->get('preferred_state', null, $channel); + } else { + $state = $package['state']; + } + + if ($dorest) { + if ($base2) { + $rest = &$this->config->getREST('1.4', array()); + $base = $base2; + } else { + $rest = &$this->config->getREST('1.0', array()); + } + + $installed = array_flip($reg->listPackages($channel)); + $latest = $rest->listLatestUpgrades($base, $state, $installed, $channel, $reg); + } + + PEAR::staticPopErrorHandling(); + if (PEAR::isError($latest)) { + $this->ui->outputData('Error getting channel info from ' . $channel . + ': ' . $latest->getMessage()); + continue; + } + + $latestReleases[$channel] = array_change_key_case($latest); + } + + // check package for latest release + $name_lower = strtolower($name); + if (isset($latestReleases[$channel][$name_lower])) { + // if not set, up to date + $inst_version = $reg->packageInfo($name, 'version', $channel); + $channel_version = $latestReleases[$channel][$name_lower]['version']; + if (version_compare($channel_version, $inst_version, 'le')) { + // installed version is up-to-date + continue; + } + + // maintain BC + if ($command == 'upgrade-all') { + $this->ui->outputData(array('data' => 'Will upgrade ' . + $reg->parsedPackageNameToString($package)), $command); + } + $ret[] = $package; + } + } + + return $ret; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Install.xml b/_piecrust/libs/PEAR/Command/Install.xml new file mode 100644 index 0000000..1b1e933 --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Install.xml @@ -0,0 +1,276 @@ + + + Install Package + doInstall + i + + + f + will overwrite newer installed packages + + + l + do not check for recommended dependency version + + + n + ignore dependencies, install anyway + + + r + do not install files, only register the package as installed + + + s + soft install, fail silently, or upgrade if already installed + + + B + don't build C extensions + + + Z + request uncompressed files when downloading + + + R + root directory used when installing files (ala PHP's INSTALL_ROOT), use packagingroot for RPM + DIR + + + P + root directory used when packaging files, like RPM packaging + DIR + + + + force install even if there were errors + + + a + install all required and optional dependencies + + + o + install all required dependencies + + + O + do not attempt to download any urls or contact channels + + + p + Only list the packages that would be downloaded + + + [channel/]<package> ... +Installs one or more PEAR packages. You can specify a package to +install in four ways: + +"Package-1.0.tgz" : installs from a local file + +"http://example.com/Package-1.0.tgz" : installs from +anywhere on the net. + +"package.xml" : installs the package described in +package.xml. Useful for testing, or for wrapping a PEAR package in +another package manager such as RPM. + +"Package[-version/state][.tar]" : queries your default channel's server +({config master_server}) and downloads the newest package with +the preferred quality/state ({config preferred_state}). + +To retrieve Package version 1.1, use "Package-1.1," to retrieve +Package state beta, use "Package-beta." To retrieve an uncompressed +file, append .tar (make sure there is no file by the same name first) + +To download a package from another channel, prefix with the channel name like +"channel/Package" + +More than one package may be specified at once. It is ok to mix these +four ways of specifying packages. + + + + Upgrade Package + doInstall + up + + + c + upgrade packages from a specific channel + CHAN + + + f + overwrite newer installed packages + + + l + do not check for recommended dependency version + + + n + ignore dependencies, upgrade anyway + + + r + do not install files, only register the package as upgraded + + + B + don't build C extensions + + + Z + request uncompressed files when downloading + + + R + root directory used when installing files (ala PHP's INSTALL_ROOT) + DIR + + + + force install even if there were errors + + + a + install all required and optional dependencies + + + o + install all required dependencies + + + O + do not attempt to download any urls or contact channels + + + p + Only list the packages that would be downloaded + + + <package> ... +Upgrades one or more PEAR packages. See documentation for the +"install" command for ways to specify a package. + +When upgrading, your package will be updated if the provided new +package has a higher version number (use the -f option if you need to +upgrade anyway). + +More than one package may be specified at once. + + + + Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters] + doUpgradeAll + ua + + + c + upgrade packages from a specific channel + CHAN + + + n + ignore dependencies, upgrade anyway + + + r + do not install files, only register the package as upgraded + + + B + don't build C extensions + + + Z + request uncompressed files when downloading + + + R + root directory used when installing files (ala PHP's INSTALL_ROOT), use packagingroot for RPM + DIR + + + + force install even if there were errors + + + + do not check for recommended dependency version + + + +WARNING: This function is deprecated in favor of using the upgrade command with no params + +Upgrades all packages that have a newer release available. Upgrades are +done only if there is a release available of the state specified in +"preferred_state" (currently {config preferred_state}), or a state considered +more stable. + + + + Un-install Package + doUninstall + un + + + n + ignore dependencies, uninstall anyway + + + r + do not remove files, only register the packages as not installed + + + R + root directory used when installing files (ala PHP's INSTALL_ROOT) + DIR + + + + force install even if there were errors + + + O + do not attempt to uninstall remotely + + + [channel/]<package> ... +Uninstalls one or more PEAR packages. More than one package may be +specified at once. Prefix with channel name to uninstall from a +channel not in your default channel ({config default_channel}) + + + + Unpacks a Pecl Package + doBundle + bun + + + d + Optional destination directory for unpacking (defaults to current path or "ext" if exists) + DIR + + + f + Force the unpacking even if there were errors in the package + + + <package> +Unpacks a Pecl Package into the selected location. It will download the +package if needed. + + + + Run Post-Install Scripts bundled with a package + doRunScripts + rs + + <package> +Run post-installation scripts in package <package>, if any exist. + + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Mirror.php b/_piecrust/libs/PEAR/Command/Mirror.php new file mode 100644 index 0000000..4d157c6 --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Mirror.php @@ -0,0 +1,139 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Mirror.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.2.0 + */ + +/** + * base class + */ +require_once 'PEAR/Command/Common.php'; + +/** + * PEAR commands for providing file mirrors + * + * @category pear + * @package PEAR + * @author Alexander Merz + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.2.0 + */ +class PEAR_Command_Mirror extends PEAR_Command_Common +{ + var $commands = array( + 'download-all' => array( + 'summary' => 'Downloads each available package from the default channel', + 'function' => 'doDownloadAll', + 'shortcut' => 'da', + 'options' => array( + 'channel' => + array( + 'shortopt' => 'c', + 'doc' => 'specify a channel other than the default channel', + 'arg' => 'CHAN', + ), + ), + 'doc' => ' +Requests a list of available packages from the default channel ({config default_channel}) +and downloads them to current working directory. Note: only +packages within preferred_state ({config preferred_state}) will be downloaded' + ), + ); + + /** + * PEAR_Command_Mirror constructor. + * + * @access public + * @param object PEAR_Frontend a reference to an frontend + * @param object PEAR_Config a reference to the configuration data + */ + function PEAR_Command_Mirror(&$ui, &$config) + { + parent::PEAR_Command_Common($ui, $config); + } + + /** + * For unit-testing + */ + function &factory($a) + { + $a = &PEAR_Command::factory($a, $this->config); + return $a; + } + + /** + * retrieves a list of avaible Packages from master server + * and downloads them + * + * @access public + * @param string $command the command + * @param array $options the command options before the command + * @param array $params the stuff after the command name + * @return bool true if succesful + * @throw PEAR_Error + */ + function doDownloadAll($command, $options, $params) + { + $savechannel = $this->config->get('default_channel'); + $reg = &$this->config->getRegistry(); + $channel = isset($options['channel']) ? $options['channel'] : + $this->config->get('default_channel'); + if (!$reg->channelExists($channel)) { + $this->config->set('default_channel', $savechannel); + return $this->raiseError('Channel "' . $channel . '" does not exist'); + } + $this->config->set('default_channel', $channel); + + $this->ui->outputData('Using Channel ' . $this->config->get('default_channel')); + $chan = $reg->getChannel($channel); + if (PEAR::isError($chan)) { + return $this->raiseError($chan); + } + + if ($chan->supportsREST($this->config->get('preferred_mirror')) && + $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) { + $rest = &$this->config->getREST('1.0', array()); + $remoteInfo = array_flip($rest->listPackages($base, $channel)); + } + + if (PEAR::isError($remoteInfo)) { + return $remoteInfo; + } + + $cmd = &$this->factory("download"); + if (PEAR::isError($cmd)) { + return $cmd; + } + + $this->ui->outputData('Using Preferred State of ' . + $this->config->get('preferred_state')); + $this->ui->outputData('Gathering release information, please wait...'); + + /** + * Error handling not necessary, because already done by + * the download command + */ + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $err = $cmd->run('download', array('downloadonly' => true), array_keys($remoteInfo)); + PEAR::staticPopErrorHandling(); + $this->config->set('default_channel', $savechannel); + if (PEAR::isError($err)) { + $this->ui->outputData($err->getMessage()); + } + + return true; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Mirror.xml b/_piecrust/libs/PEAR/Command/Mirror.xml new file mode 100644 index 0000000..fe8be9d --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Mirror.xml @@ -0,0 +1,18 @@ + + + Downloads each available package from the default channel + doDownloadAll + da + + + c + specify a channel other than the default channel + CHAN + + + +Requests a list of available packages from the default channel ({config default_channel}) +and downloads them to current working directory. Note: only +packages within preferred_state ({config preferred_state}) will be downloaded + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Package.php b/_piecrust/libs/PEAR/Command/Package.php new file mode 100644 index 0000000..ae6d52b --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Package.php @@ -0,0 +1,1124 @@ + + * @author Martin Jansen + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Package.php 313024 2011-07-06 19:51:24Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ + +/** + * base class + */ +require_once 'PEAR/Command/Common.php'; + +/** + * PEAR commands for login/logout + * + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Martin Jansen + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + */ + +class PEAR_Command_Package extends PEAR_Command_Common +{ + var $commands = array( + 'package' => array( + 'summary' => 'Build Package', + 'function' => 'doPackage', + 'shortcut' => 'p', + 'options' => array( + 'nocompress' => array( + 'shortopt' => 'Z', + 'doc' => 'Do not gzip the package file' + ), + 'showname' => array( + 'shortopt' => 'n', + 'doc' => 'Print the name of the packaged file.', + ), + ), + 'doc' => '[descfile] [descfile2] +Creates a PEAR package from its description file (usually called +package.xml). If a second packagefile is passed in, then +the packager will check to make sure that one is a package.xml +version 1.0, and the other is a package.xml version 2.0. The +package.xml version 1.0 will be saved as "package.xml" in the archive, +and the other as "package2.xml" in the archive" +' + ), + 'package-validate' => array( + 'summary' => 'Validate Package Consistency', + 'function' => 'doPackageValidate', + 'shortcut' => 'pv', + 'options' => array(), + 'doc' => ' +', + ), + 'cvsdiff' => array( + 'summary' => 'Run a "cvs diff" for all files in a package', + 'function' => 'doCvsDiff', + 'shortcut' => 'cd', + 'options' => array( + 'quiet' => array( + 'shortopt' => 'q', + 'doc' => 'Be quiet', + ), + 'reallyquiet' => array( + 'shortopt' => 'Q', + 'doc' => 'Be really quiet', + ), + 'date' => array( + 'shortopt' => 'D', + 'doc' => 'Diff against revision of DATE', + 'arg' => 'DATE', + ), + 'release' => array( + 'shortopt' => 'R', + 'doc' => 'Diff against tag for package release REL', + 'arg' => 'REL', + ), + 'revision' => array( + 'shortopt' => 'r', + 'doc' => 'Diff against revision REV', + 'arg' => 'REV', + ), + 'context' => array( + 'shortopt' => 'c', + 'doc' => 'Generate context diff', + ), + 'unified' => array( + 'shortopt' => 'u', + 'doc' => 'Generate unified diff', + ), + 'ignore-case' => array( + 'shortopt' => 'i', + 'doc' => 'Ignore case, consider upper- and lower-case letters equivalent', + ), + 'ignore-whitespace' => array( + 'shortopt' => 'b', + 'doc' => 'Ignore changes in amount of white space', + ), + 'ignore-blank-lines' => array( + 'shortopt' => 'B', + 'doc' => 'Ignore changes that insert or delete blank lines', + ), + 'brief' => array( + 'doc' => 'Report only whether the files differ, no details', + ), + 'dry-run' => array( + 'shortopt' => 'n', + 'doc' => 'Don\'t do anything, just pretend', + ), + ), + 'doc' => ' +Compares all the files in a package. Without any options, this +command will compare the current code with the last checked-in code. +Using the -r or -R option you may compare the current code with that +of a specific release. +', + ), + 'svntag' => array( + 'summary' => 'Set SVN Release Tag', + 'function' => 'doSvnTag', + 'shortcut' => 'sv', + 'options' => array( + 'quiet' => array( + 'shortopt' => 'q', + 'doc' => 'Be quiet', + ), + 'slide' => array( + 'shortopt' => 'F', + 'doc' => 'Move (slide) tag if it exists', + ), + 'delete' => array( + 'shortopt' => 'd', + 'doc' => 'Remove tag', + ), + 'dry-run' => array( + 'shortopt' => 'n', + 'doc' => 'Don\'t do anything, just pretend', + ), + ), + 'doc' => ' [files...] + Sets a SVN tag on all files in a package. Use this command after you have + packaged a distribution tarball with the "package" command to tag what + revisions of what files were in that release. If need to fix something + after running svntag once, but before the tarball is released to the public, + use the "slide" option to move the release tag. + + to include files (such as a second package.xml, or tests not included in the + release), pass them as additional parameters. + ', + ), + 'cvstag' => array( + 'summary' => 'Set CVS Release Tag', + 'function' => 'doCvsTag', + 'shortcut' => 'ct', + 'options' => array( + 'quiet' => array( + 'shortopt' => 'q', + 'doc' => 'Be quiet', + ), + 'reallyquiet' => array( + 'shortopt' => 'Q', + 'doc' => 'Be really quiet', + ), + 'slide' => array( + 'shortopt' => 'F', + 'doc' => 'Move (slide) tag if it exists', + ), + 'delete' => array( + 'shortopt' => 'd', + 'doc' => 'Remove tag', + ), + 'dry-run' => array( + 'shortopt' => 'n', + 'doc' => 'Don\'t do anything, just pretend', + ), + ), + 'doc' => ' [files...] +Sets a CVS tag on all files in a package. Use this command after you have +packaged a distribution tarball with the "package" command to tag what +revisions of what files were in that release. If need to fix something +after running cvstag once, but before the tarball is released to the public, +use the "slide" option to move the release tag. + +to include files (such as a second package.xml, or tests not included in the +release), pass them as additional parameters. +', + ), + 'package-dependencies' => array( + 'summary' => 'Show package dependencies', + 'function' => 'doPackageDependencies', + 'shortcut' => 'pd', + 'options' => array(), + 'doc' => ' or or +List all dependencies the package has. +Can take a tgz / tar file, package.xml or a package name of an installed package.' + ), + 'sign' => array( + 'summary' => 'Sign a package distribution file', + 'function' => 'doSign', + 'shortcut' => 'si', + 'options' => array( + 'verbose' => array( + 'shortopt' => 'v', + 'doc' => 'Display GnuPG output', + ), + ), + 'doc' => ' +Signs a package distribution (.tar or .tgz) file with GnuPG.', + ), + 'makerpm' => array( + 'summary' => 'Builds an RPM spec file from a PEAR package', + 'function' => 'doMakeRPM', + 'shortcut' => 'rpm', + 'options' => array( + 'spec-template' => array( + 'shortopt' => 't', + 'arg' => 'FILE', + 'doc' => 'Use FILE as RPM spec file template' + ), + 'rpm-pkgname' => array( + 'shortopt' => 'p', + 'arg' => 'FORMAT', + 'doc' => 'Use FORMAT as format string for RPM package name, %s is replaced +by the PEAR package name, defaults to "PEAR::%s".', + ), + ), + 'doc' => ' + +Creates an RPM .spec file for wrapping a PEAR package inside an RPM +package. Intended to be used from the SPECS directory, with the PEAR +package tarball in the SOURCES directory: + +$ pear makerpm ../SOURCES/Net_Socket-1.0.tgz +Wrote RPM spec file PEAR::Net_Geo-1.0.spec +$ rpm -bb PEAR::Net_Socket-1.0.spec +... +Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm +', + ), + 'convert' => array( + 'summary' => 'Convert a package.xml 1.0 to package.xml 2.0 format', + 'function' => 'doConvert', + 'shortcut' => 'c2', + 'options' => array( + 'flat' => array( + 'shortopt' => 'f', + 'doc' => 'do not beautify the filelist.', + ), + ), + 'doc' => '[descfile] [descfile2] +Converts a package.xml in 1.0 format into a package.xml +in 2.0 format. The new file will be named package2.xml by default, +and package.xml will be used as the old file by default. +This is not the most intelligent conversion, and should only be +used for automated conversion or learning the format. +' + ), + ); + + var $output; + + /** + * PEAR_Command_Package constructor. + * + * @access public + */ + function PEAR_Command_Package(&$ui, &$config) + { + parent::PEAR_Command_Common($ui, $config); + } + + function _displayValidationResults($err, $warn, $strict = false) + { + foreach ($err as $e) { + $this->output .= "Error: $e\n"; + } + foreach ($warn as $w) { + $this->output .= "Warning: $w\n"; + } + $this->output .= sprintf('Validation: %d error(s), %d warning(s)'."\n", + sizeof($err), sizeof($warn)); + if ($strict && count($err) > 0) { + $this->output .= "Fix these errors and try again."; + return false; + } + return true; + } + + function &getPackager() + { + if (!class_exists('PEAR_Packager')) { + require_once 'PEAR/Packager.php'; + } + $a = &new PEAR_Packager; + return $a; + } + + function &getPackageFile($config, $debug = false) + { + if (!class_exists('PEAR_Common')) { + require_once 'PEAR/Common.php'; + } + if (!class_exists('PEAR_PackageFile')) { + require_once 'PEAR/PackageFile.php'; + } + $a = &new PEAR_PackageFile($config, $debug); + $common = new PEAR_Common; + $common->ui = $this->ui; + $a->setLogger($common); + return $a; + } + + function doPackage($command, $options, $params) + { + $this->output = ''; + $pkginfofile = isset($params[0]) ? $params[0] : 'package.xml'; + $pkg2 = isset($params[1]) ? $params[1] : null; + if (!$pkg2 && !isset($params[0]) && file_exists('package2.xml')) { + $pkg2 = 'package2.xml'; + } + + $packager = &$this->getPackager(); + $compress = empty($options['nocompress']) ? true : false; + $result = $packager->package($pkginfofile, $compress, $pkg2); + if (PEAR::isError($result)) { + return $this->raiseError($result); + } + + // Don't want output, only the package file name just created + if (isset($options['showname'])) { + $this->output = $result; + } + + if ($this->output) { + $this->ui->outputData($this->output, $command); + } + + return true; + } + + function doPackageValidate($command, $options, $params) + { + $this->output = ''; + if (count($params) < 1) { + $params[0] = 'package.xml'; + } + + $obj = &$this->getPackageFile($this->config, $this->_debug); + $obj->rawReturn(); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $info = $obj->fromTgzFile($params[0], PEAR_VALIDATE_NORMAL); + if (PEAR::isError($info)) { + $info = $obj->fromPackageFile($params[0], PEAR_VALIDATE_NORMAL); + } else { + $archive = $info->getArchiveFile(); + $tar = &new Archive_Tar($archive); + $tar->extract(dirname($info->getPackageFile())); + $info->setPackageFile(dirname($info->getPackageFile()) . DIRECTORY_SEPARATOR . + $info->getPackage() . '-' . $info->getVersion() . DIRECTORY_SEPARATOR . + basename($info->getPackageFile())); + } + + PEAR::staticPopErrorHandling(); + if (PEAR::isError($info)) { + return $this->raiseError($info); + } + + $valid = false; + if ($info->getPackagexmlVersion() == '2.0') { + if ($valid = $info->validate(PEAR_VALIDATE_NORMAL)) { + $info->flattenFileList(); + $valid = $info->validate(PEAR_VALIDATE_PACKAGING); + } + } else { + $valid = $info->validate(PEAR_VALIDATE_PACKAGING); + } + + $err = $warn = array(); + if ($errors = $info->getValidationWarnings()) { + foreach ($errors as $error) { + if ($error['level'] == 'warning') { + $warn[] = $error['message']; + } else { + $err[] = $error['message']; + } + } + } + + $this->_displayValidationResults($err, $warn); + $this->ui->outputData($this->output, $command); + return true; + } + + function doSvnTag($command, $options, $params) + { + $this->output = ''; + $_cmd = $command; + if (count($params) < 1) { + $help = $this->getHelp($command); + return $this->raiseError("$command: missing parameter: $help[0]"); + } + + $packageFile = realpath($params[0]); + $dir = dirname($packageFile); + $dir = substr($dir, strrpos($dir, DIRECTORY_SEPARATOR) + 1); + $obj = &$this->getPackageFile($this->config, $this->_debug); + $info = $obj->fromAnyFile($packageFile, PEAR_VALIDATE_NORMAL); + if (PEAR::isError($info)) { + return $this->raiseError($info); + } + + $err = $warn = array(); + if (!$info->validate()) { + foreach ($info->getValidationWarnings() as $error) { + if ($error['level'] == 'warning') { + $warn[] = $error['message']; + } else { + $err[] = $error['message']; + } + } + } + + if (!$this->_displayValidationResults($err, $warn, true)) { + $this->ui->outputData($this->output, $command); + return $this->raiseError('SVN tag failed'); + } + + $version = $info->getVersion(); + $package = $info->getName(); + $svntag = "$package-$version"; + + if (isset($options['delete'])) { + return $this->_svnRemoveTag($version, $package, $svntag, $packageFile, $options); + } + + $path = $this->_svnFindPath($packageFile); + + // Check if there are any modified files + $fp = popen('svn st --xml ' . dirname($packageFile), "r"); + $out = ''; + while ($line = fgets($fp, 1024)) { + $out .= rtrim($line)."\n"; + } + pclose($fp); + + if (!isset($options['quiet']) && strpos($out, 'item="modified"')) { + $params = array(array( + 'name' => 'modified', + 'type' => 'yesno', + 'default' => 'no', + 'prompt' => 'You have files in your SVN checkout (' . $path['from'] . ') that have been modified but not commited, do you still want to tag ' . $version . '?', + )); + $answers = $this->ui->confirmDialog($params); + + if (!in_array($answers['modified'], array('y', 'yes', 'on', '1'))) { + return true; + } + } + + if (isset($options['slide'])) { + $this->_svnRemoveTag($version, $package, $svntag, $packageFile, $options); + } + + // Check if tag already exists + $releaseTag = $path['local']['base'] . 'tags' . DIRECTORY_SEPARATOR . $svntag; + $existsCommand = 'svn ls ' . $path['base'] . 'tags/'; + + $fp = popen($existsCommand, "r"); + $out = ''; + while ($line = fgets($fp, 1024)) { + $out .= rtrim($line)."\n"; + } + pclose($fp); + + if (in_array($svntag . DIRECTORY_SEPARATOR, explode("\n", $out))) { + $this->ui->outputData($this->output, $command); + return $this->raiseError('SVN tag ' . $svntag . ' for ' . $package . ' already exists.'); + } elseif (file_exists($path['local']['base'] . 'tags') === false) { + return $this->raiseError('Can not locate the tags directory at ' . $path['local']['base'] . 'tags'); + } elseif (is_writeable($path['local']['base'] . 'tags') === false) { + return $this->raiseError('Can not write to the tag directory at ' . $path['local']['base'] . 'tags'); + } else { + $makeCommand = 'svn mkdir ' . $releaseTag; + $this->output .= "+ $makeCommand\n"; + if (empty($options['dry-run'])) { + // We need to create the tag dir. + $fp = popen($makeCommand, "r"); + $out = ''; + while ($line = fgets($fp, 1024)) { + $out .= rtrim($line)."\n"; + } + pclose($fp); + $this->output .= "$out\n"; + } + } + + $command = 'svn'; + if (isset($options['quiet'])) { + $command .= ' -q'; + } + + $command .= ' copy --parents '; + + $dir = dirname($packageFile); + $dir = substr($dir, strrpos($dir, DIRECTORY_SEPARATOR) + 1); + $files = array_keys($info->getFilelist()); + if (!in_array(basename($packageFile), $files)) { + $files[] = basename($packageFile); + } + + array_shift($params); + if (count($params)) { + // add in additional files to be tagged (package files and such) + $files = array_merge($files, $params); + } + + $commands = array(); + foreach ($files as $file) { + if (!file_exists($file)) { + $file = $dir . DIRECTORY_SEPARATOR . $file; + } + $commands[] = $command . ' ' . escapeshellarg($file) . ' ' . + escapeshellarg($releaseTag . DIRECTORY_SEPARATOR . $file); + } + + $this->output .= implode("\n", $commands) . "\n"; + if (empty($options['dry-run'])) { + foreach ($commands as $command) { + $fp = popen($command, "r"); + while ($line = fgets($fp, 1024)) { + $this->output .= rtrim($line)."\n"; + } + pclose($fp); + } + } + + $command = 'svn ci -m "Tagging the ' . $version . ' release" ' . $releaseTag . "\n"; + $this->output .= "+ $command\n"; + if (empty($options['dry-run'])) { + $fp = popen($command, "r"); + while ($line = fgets($fp, 1024)) { + $this->output .= rtrim($line)."\n"; + } + pclose($fp); + } + + $this->ui->outputData($this->output, $_cmd); + return true; + } + + function _svnFindPath($file) + { + $xml = ''; + $command = "svn info --xml $file"; + $fp = popen($command, "r"); + while ($line = fgets($fp, 1024)) { + $xml .= rtrim($line)."\n"; + } + pclose($fp); + $url_tag = strpos($xml, ''); + $url = substr($xml, $url_tag + 5, strpos($xml, '', $url_tag + 5) - ($url_tag + 5)); + + $path = array(); + $path['from'] = substr($url, 0, strrpos($url, '/')); + $path['base'] = substr($path['from'], 0, strrpos($path['from'], '/') + 1); + + // Figure out the local paths - see http://pear.php.net/bugs/17463 + $pos = strpos($file, DIRECTORY_SEPARATOR . 'trunk' . DIRECTORY_SEPARATOR); + if ($pos === false) { + $pos = strpos($file, DIRECTORY_SEPARATOR . 'branches' . DIRECTORY_SEPARATOR); + } + $path['local']['base'] = substr($file, 0, $pos + 1); + + return $path; + } + + function _svnRemoveTag($version, $package, $tag, $packageFile, $options) + { + $command = 'svn'; + + if (isset($options['quiet'])) { + $command .= ' -q'; + } + + $command .= ' remove'; + $command .= ' -m "Removing tag for the ' . $version . ' release."'; + + $path = $this->_svnFindPath($packageFile); + $command .= ' ' . $path['base'] . 'tags/' . $tag; + + + if ($this->config->get('verbose') > 1) { + $this->output .= "+ $command\n"; + } + + $this->output .= "+ $command\n"; + if (empty($options['dry-run'])) { + $fp = popen($command, "r"); + while ($line = fgets($fp, 1024)) { + $this->output .= rtrim($line)."\n"; + } + pclose($fp); + } + + $this->ui->outputData($this->output, $command); + return true; + } + + function doCvsTag($command, $options, $params) + { + $this->output = ''; + $_cmd = $command; + if (count($params) < 1) { + $help = $this->getHelp($command); + return $this->raiseError("$command: missing parameter: $help[0]"); + } + + $packageFile = realpath($params[0]); + $obj = &$this->getPackageFile($this->config, $this->_debug); + $info = $obj->fromAnyFile($packageFile, PEAR_VALIDATE_NORMAL); + if (PEAR::isError($info)) { + return $this->raiseError($info); + } + + $err = $warn = array(); + if (!$info->validate()) { + foreach ($info->getValidationWarnings() as $error) { + if ($error['level'] == 'warning') { + $warn[] = $error['message']; + } else { + $err[] = $error['message']; + } + } + } + + if (!$this->_displayValidationResults($err, $warn, true)) { + $this->ui->outputData($this->output, $command); + return $this->raiseError('CVS tag failed'); + } + + $version = $info->getVersion(); + $cvsversion = preg_replace('/[^a-z0-9]/i', '_', $version); + $cvstag = "RELEASE_$cvsversion"; + $files = array_keys($info->getFilelist()); + $command = 'cvs'; + if (isset($options['quiet'])) { + $command .= ' -q'; + } + + if (isset($options['reallyquiet'])) { + $command .= ' -Q'; + } + + $command .= ' tag'; + if (isset($options['slide'])) { + $command .= ' -F'; + } + + if (isset($options['delete'])) { + $command .= ' -d'; + } + + $command .= ' ' . $cvstag . ' ' . escapeshellarg($params[0]); + array_shift($params); + if (count($params)) { + // add in additional files to be tagged + $files = array_merge($files, $params); + } + + $dir = dirname($packageFile); + $dir = substr($dir, strrpos($dir, '/') + 1); + foreach ($files as $file) { + if (!file_exists($file)) { + $file = $dir . DIRECTORY_SEPARATOR . $file; + } + $command .= ' ' . escapeshellarg($file); + } + + if ($this->config->get('verbose') > 1) { + $this->output .= "+ $command\n"; + } + + $this->output .= "+ $command\n"; + if (empty($options['dry-run'])) { + $fp = popen($command, "r"); + while ($line = fgets($fp, 1024)) { + $this->output .= rtrim($line)."\n"; + } + pclose($fp); + } + + $this->ui->outputData($this->output, $_cmd); + return true; + } + + function doCvsDiff($command, $options, $params) + { + $this->output = ''; + if (sizeof($params) < 1) { + $help = $this->getHelp($command); + return $this->raiseError("$command: missing parameter: $help[0]"); + } + + $file = realpath($params[0]); + $obj = &$this->getPackageFile($this->config, $this->_debug); + $info = $obj->fromAnyFile($file, PEAR_VALIDATE_NORMAL); + if (PEAR::isError($info)) { + return $this->raiseError($info); + } + + $err = $warn = array(); + if (!$info->validate()) { + foreach ($info->getValidationWarnings() as $error) { + if ($error['level'] == 'warning') { + $warn[] = $error['message']; + } else { + $err[] = $error['message']; + } + } + } + + if (!$this->_displayValidationResults($err, $warn, true)) { + $this->ui->outputData($this->output, $command); + return $this->raiseError('CVS diff failed'); + } + + $info1 = $info->getFilelist(); + $files = $info1; + $cmd = "cvs"; + if (isset($options['quiet'])) { + $cmd .= ' -q'; + unset($options['quiet']); + } + + if (isset($options['reallyquiet'])) { + $cmd .= ' -Q'; + unset($options['reallyquiet']); + } + + if (isset($options['release'])) { + $cvsversion = preg_replace('/[^a-z0-9]/i', '_', $options['release']); + $cvstag = "RELEASE_$cvsversion"; + $options['revision'] = $cvstag; + unset($options['release']); + } + + $execute = true; + if (isset($options['dry-run'])) { + $execute = false; + unset($options['dry-run']); + } + + $cmd .= ' diff'; + // the rest of the options are passed right on to "cvs diff" + foreach ($options as $option => $optarg) { + $arg = $short = false; + if (isset($this->commands[$command]['options'][$option])) { + $arg = $this->commands[$command]['options'][$option]['arg']; + $short = $this->commands[$command]['options'][$option]['shortopt']; + } + $cmd .= $short ? " -$short" : " --$option"; + if ($arg && $optarg) { + $cmd .= ($short ? '' : '=') . escapeshellarg($optarg); + } + } + + foreach ($files as $file) { + $cmd .= ' ' . escapeshellarg($file['name']); + } + + if ($this->config->get('verbose') > 1) { + $this->output .= "+ $cmd\n"; + } + + if ($execute) { + $fp = popen($cmd, "r"); + while ($line = fgets($fp, 1024)) { + $this->output .= rtrim($line)."\n"; + } + pclose($fp); + } + + $this->ui->outputData($this->output, $command); + return true; + } + + function doPackageDependencies($command, $options, $params) + { + // $params[0] -> the PEAR package to list its information + if (count($params) !== 1) { + return $this->raiseError("bad parameter(s), try \"help $command\""); + } + + $obj = &$this->getPackageFile($this->config, $this->_debug); + if (is_file($params[0]) || strpos($params[0], '.xml') > 0) { + $info = $obj->fromAnyFile($params[0], PEAR_VALIDATE_NORMAL); + } else { + $reg = $this->config->getRegistry(); + $info = $obj->fromArray($reg->packageInfo($params[0])); + } + + if (PEAR::isError($info)) { + return $this->raiseError($info); + } + + $deps = $info->getDeps(); + if (is_array($deps)) { + if ($info->getPackagexmlVersion() == '1.0') { + $data = array( + 'caption' => 'Dependencies for pear/' . $info->getPackage(), + 'border' => true, + 'headline' => array("Required?", "Type", "Name", "Relation", "Version"), + ); + + foreach ($deps as $d) { + if (isset($d['optional'])) { + if ($d['optional'] == 'yes') { + $req = 'No'; + } else { + $req = 'Yes'; + } + } else { + $req = 'Yes'; + } + + if (isset($this->_deps_rel_trans[$d['rel']])) { + $rel = $this->_deps_rel_trans[$d['rel']]; + } else { + $rel = $d['rel']; + } + + if (isset($this->_deps_type_trans[$d['type']])) { + $type = ucfirst($this->_deps_type_trans[$d['type']]); + } else { + $type = $d['type']; + } + + if (isset($d['name'])) { + $name = $d['name']; + } else { + $name = ''; + } + + if (isset($d['version'])) { + $version = $d['version']; + } else { + $version = ''; + } + + $data['data'][] = array($req, $type, $name, $rel, $version); + } + } else { // package.xml 2.0 dependencies display + require_once 'PEAR/Dependency2.php'; + $deps = $info->getDependencies(); + $reg = &$this->config->getRegistry(); + if (is_array($deps)) { + $d = new PEAR_Dependency2($this->config, array(), ''); + $data = array( + 'caption' => 'Dependencies for ' . $info->getPackage(), + 'border' => true, + 'headline' => array("Required?", "Type", "Name", 'Versioning', 'Group'), + ); + foreach ($deps as $type => $subd) { + $req = ($type == 'required') ? 'Yes' : 'No'; + if ($type == 'group') { + $group = $subd['attribs']['name']; + } else { + $group = ''; + } + + if (!isset($subd[0])) { + $subd = array($subd); + } + + foreach ($subd as $groupa) { + foreach ($groupa as $deptype => $depinfo) { + if ($deptype == 'attribs') { + continue; + } + + if ($deptype == 'pearinstaller') { + $deptype = 'pear Installer'; + } + + if (!isset($depinfo[0])) { + $depinfo = array($depinfo); + } + + foreach ($depinfo as $inf) { + $name = ''; + if (isset($inf['channel'])) { + $alias = $reg->channelAlias($inf['channel']); + if (!$alias) { + $alias = '(channel?) ' .$inf['channel']; + } + $name = $alias . '/'; + + } + if (isset($inf['name'])) { + $name .= $inf['name']; + } elseif (isset($inf['pattern'])) { + $name .= $inf['pattern']; + } else { + $name .= ''; + } + + if (isset($inf['uri'])) { + $name .= ' [' . $inf['uri'] . ']'; + } + + if (isset($inf['conflicts'])) { + $ver = 'conflicts'; + } else { + $ver = $d->_getExtraString($inf); + } + + $data['data'][] = array($req, ucfirst($deptype), $name, + $ver, $group); + } + } + } + } + } + } + + $this->ui->outputData($data, $command); + return true; + } + + // Fallback + $this->ui->outputData("This package does not have any dependencies.", $command); + } + + function doSign($command, $options, $params) + { + // should move most of this code into PEAR_Packager + // so it'll be easy to implement "pear package --sign" + if (count($params) !== 1) { + return $this->raiseError("bad parameter(s), try \"help $command\""); + } + + require_once 'System.php'; + require_once 'Archive/Tar.php'; + + if (!file_exists($params[0])) { + return $this->raiseError("file does not exist: $params[0]"); + } + + $obj = $this->getPackageFile($this->config, $this->_debug); + $info = $obj->fromTgzFile($params[0], PEAR_VALIDATE_NORMAL); + if (PEAR::isError($info)) { + return $this->raiseError($info); + } + + $tar = new Archive_Tar($params[0]); + + $tmpdir = $this->config->get('temp_dir'); + $tmpdir = System::mktemp(' -t "' . $tmpdir . '" -d pearsign'); + if (!$tar->extractList('package2.xml package.xml package.sig', $tmpdir)) { + return $this->raiseError("failed to extract tar file"); + } + + if (file_exists("$tmpdir/package.sig")) { + return $this->raiseError("package already signed"); + } + + $packagexml = 'package.xml'; + if (file_exists("$tmpdir/package2.xml")) { + $packagexml = 'package2.xml'; + } + + if (file_exists("$tmpdir/package.sig")) { + unlink("$tmpdir/package.sig"); + } + + if (!file_exists("$tmpdir/$packagexml")) { + return $this->raiseError("Extracted file $tmpdir/$packagexml not found."); + } + + $input = $this->ui->userDialog($command, + array('GnuPG Passphrase'), + array('password')); + if (!isset($input[0])) { + //use empty passphrase + $input[0] = ''; + } + + $devnull = (isset($options['verbose'])) ? '' : ' 2>/dev/null'; + $gpg = popen("gpg --batch --passphrase-fd 0 --armor --detach-sign --output $tmpdir/package.sig $tmpdir/$packagexml" . $devnull, "w"); + if (!$gpg) { + return $this->raiseError("gpg command failed"); + } + + fwrite($gpg, "$input[0]\n"); + if (pclose($gpg) || !file_exists("$tmpdir/package.sig")) { + return $this->raiseError("gpg sign failed"); + } + + if (!$tar->addModify("$tmpdir/package.sig", '', $tmpdir)) { + return $this->raiseError('failed adding signature to file'); + } + + $this->ui->outputData("Package signed.", $command); + return true; + } + + /** + * For unit testing purposes + */ + function &getInstaller(&$ui) + { + if (!class_exists('PEAR_Installer')) { + require_once 'PEAR/Installer.php'; + } + $a = &new PEAR_Installer($ui); + return $a; + } + + /** + * For unit testing purposes + */ + function &getCommandPackaging(&$ui, &$config) + { + if (!class_exists('PEAR_Command_Packaging')) { + if ($fp = @fopen('PEAR/Command/Packaging.php', 'r', true)) { + fclose($fp); + include_once 'PEAR/Command/Packaging.php'; + } + } + + if (class_exists('PEAR_Command_Packaging')) { + $a = &new PEAR_Command_Packaging($ui, $config); + } else { + $a = null; + } + + return $a; + } + + function doMakeRPM($command, $options, $params) + { + + // Check to see if PEAR_Command_Packaging is installed, and + // transparently switch to use the "make-rpm-spec" command from it + // instead, if it does. Otherwise, continue to use the old version + // of "makerpm" supplied with this package (PEAR). + $packaging_cmd = $this->getCommandPackaging($this->ui, $this->config); + if ($packaging_cmd !== null) { + $this->ui->outputData('PEAR_Command_Packaging is installed; using '. + 'newer "make-rpm-spec" command instead'); + return $packaging_cmd->run('make-rpm-spec', $options, $params); + } + + $this->ui->outputData('WARNING: "pear makerpm" is no longer available; an '. + 'improved version is available via "pear make-rpm-spec", which '. + 'is available by installing PEAR_Command_Packaging'); + return true; + } + + function doConvert($command, $options, $params) + { + $packagexml = isset($params[0]) ? $params[0] : 'package.xml'; + $newpackagexml = isset($params[1]) ? $params[1] : dirname($packagexml) . + DIRECTORY_SEPARATOR . 'package2.xml'; + $pkg = &$this->getPackageFile($this->config, $this->_debug); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $pf = $pkg->fromPackageFile($packagexml, PEAR_VALIDATE_NORMAL); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($pf)) { + if (is_array($pf->getUserInfo())) { + foreach ($pf->getUserInfo() as $warning) { + $this->ui->outputData($warning['message']); + } + } + return $this->raiseError($pf); + } + + if (is_a($pf, 'PEAR_PackageFile_v2')) { + $this->ui->outputData($packagexml . ' is already a package.xml version 2.0'); + return true; + } + + $gen = &$pf->getDefaultGenerator(); + $newpf = &$gen->toV2(); + $newpf->setPackagefile($newpackagexml); + $gen = &$newpf->getDefaultGenerator(); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $state = (isset($options['flat']) ? PEAR_VALIDATE_PACKAGING : PEAR_VALIDATE_NORMAL); + $saved = $gen->toPackageFile(dirname($newpackagexml), $state, basename($newpackagexml)); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($saved)) { + if (is_array($saved->getUserInfo())) { + foreach ($saved->getUserInfo() as $warning) { + $this->ui->outputData($warning['message']); + } + } + + $this->ui->outputData($saved->getMessage()); + return true; + } + + $this->ui->outputData('Wrote new version 2.0 package.xml to "' . $saved . '"'); + return true; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Package.xml b/_piecrust/libs/PEAR/Command/Package.xml new file mode 100644 index 0000000..d1aff9d --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Package.xml @@ -0,0 +1,237 @@ + + + Build Package + doPackage + p + + + Z + Do not gzip the package file + + + n + Print the name of the packaged file. + + + [descfile] [descfile2] +Creates a PEAR package from its description file (usually called +package.xml). If a second packagefile is passed in, then +the packager will check to make sure that one is a package.xml +version 1.0, and the other is a package.xml version 2.0. The +package.xml version 1.0 will be saved as "package.xml" in the archive, +and the other as "package2.xml" in the archive" + + + + Validate Package Consistency + doPackageValidate + pv + + + + + + Run a "cvs diff" for all files in a package + doCvsDiff + cd + + + q + Be quiet + + + Q + Be really quiet + + + D + Diff against revision of DATE + DATE + + + R + Diff against tag for package release REL + REL + + + r + Diff against revision REV + REV + + + c + Generate context diff + + + u + Generate unified diff + + + i + Ignore case, consider upper- and lower-case letters equivalent + + + b + Ignore changes in amount of white space + + + B + Ignore changes that insert or delete blank lines + + + + Report only whether the files differ, no details + + + n + Don't do anything, just pretend + + + <package.xml> +Compares all the files in a package. Without any options, this +command will compare the current code with the last checked-in code. +Using the -r or -R option you may compare the current code with that +of a specific release. + + + + Set SVN Release Tag + doSvnTag + sv + + + q + Be quiet + + + F + Move (slide) tag if it exists + + + d + Remove tag + + + n + Don't do anything, just pretend + + + <package.xml> [files...] + Sets a SVN tag on all files in a package. Use this command after you have + packaged a distribution tarball with the "package" command to tag what + revisions of what files were in that release. If need to fix something + after running svntag once, but before the tarball is released to the public, + use the "slide" option to move the release tag. + + to include files (such as a second package.xml, or tests not included in the + release), pass them as additional parameters. + + + + Set CVS Release Tag + doCvsTag + ct + + + q + Be quiet + + + Q + Be really quiet + + + F + Move (slide) tag if it exists + + + d + Remove tag + + + n + Don't do anything, just pretend + + + <package.xml> [files...] +Sets a CVS tag on all files in a package. Use this command after you have +packaged a distribution tarball with the "package" command to tag what +revisions of what files were in that release. If need to fix something +after running cvstag once, but before the tarball is released to the public, +use the "slide" option to move the release tag. + +to include files (such as a second package.xml, or tests not included in the +release), pass them as additional parameters. + + + + Show package dependencies + doPackageDependencies + pd + + <package-file> or <package.xml> or <install-package-name> +List all dependencies the package has. +Can take a tgz / tar file, package.xml or a package name of an installed package. + + + Sign a package distribution file + doSign + si + + + v + Display GnuPG output + + + <package-file> +Signs a package distribution (.tar or .tgz) file with GnuPG. + + + Builds an RPM spec file from a PEAR package + doMakeRPM + rpm + + + t + Use FILE as RPM spec file template + FILE + + + p + Use FORMAT as format string for RPM package name, %s is replaced +by the PEAR package name, defaults to "PEAR::%s". + FORMAT + + + <package-file> + +Creates an RPM .spec file for wrapping a PEAR package inside an RPM +package. Intended to be used from the SPECS directory, with the PEAR +package tarball in the SOURCES directory: + +$ pear makerpm ../SOURCES/Net_Socket-1.0.tgz +Wrote RPM spec file PEAR::Net_Geo-1.0.spec +$ rpm -bb PEAR::Net_Socket-1.0.spec +... +Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm + + + + Convert a package.xml 1.0 to package.xml 2.0 format + doConvert + c2 + + + f + do not beautify the filelist. + + + [descfile] [descfile2] +Converts a package.xml in 1.0 format into a package.xml +in 2.0 format. The new file will be named package2.xml by default, +and package.xml will be used as the old file by default. +This is not the most intelligent conversion, and should only be +used for automated conversion or learning the format. + + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Pickle.php b/_piecrust/libs/PEAR/Command/Pickle.php new file mode 100644 index 0000000..87aa25e --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Pickle.php @@ -0,0 +1,421 @@ + + * @copyright 2005-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Pickle.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.1 + */ + +/** + * base class + */ +require_once 'PEAR/Command/Common.php'; + +/** + * PEAR commands for login/logout + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 2005-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.1 + */ + +class PEAR_Command_Pickle extends PEAR_Command_Common +{ + var $commands = array( + 'pickle' => array( + 'summary' => 'Build PECL Package', + 'function' => 'doPackage', + 'shortcut' => 'pi', + 'options' => array( + 'nocompress' => array( + 'shortopt' => 'Z', + 'doc' => 'Do not gzip the package file' + ), + 'showname' => array( + 'shortopt' => 'n', + 'doc' => 'Print the name of the packaged file.', + ), + ), + 'doc' => '[descfile] +Creates a PECL package from its package2.xml file. + +An automatic conversion will be made to a package.xml 1.0 and written out to +disk in the current directory as "package.xml". Note that +only simple package.xml 2.0 will be converted. package.xml 2.0 with: + + - dependency types other than required/optional PECL package/ext/php/pearinstaller + - more than one extsrcrelease or zendextsrcrelease + - zendextbinrelease, extbinrelease, phprelease, or bundle release type + - dependency groups + - ignore tags in release filelist + - tasks other than replace + - custom roles + +will cause pickle to fail, and output an error message. If your package2.xml +uses any of these features, you are best off using PEAR_PackageFileManager to +generate both package.xml. +' + ), + ); + + /** + * PEAR_Command_Package constructor. + * + * @access public + */ + function PEAR_Command_Pickle(&$ui, &$config) + { + parent::PEAR_Command_Common($ui, $config); + } + + /** + * For unit-testing ease + * + * @return PEAR_Packager + */ + function &getPackager() + { + if (!class_exists('PEAR_Packager')) { + require_once 'PEAR/Packager.php'; + } + + $a = &new PEAR_Packager; + return $a; + } + + /** + * For unit-testing ease + * + * @param PEAR_Config $config + * @param bool $debug + * @param string|null $tmpdir + * @return PEAR_PackageFile + */ + function &getPackageFile($config, $debug = false) + { + if (!class_exists('PEAR_Common')) { + require_once 'PEAR/Common.php'; + } + + if (!class_exists('PEAR_PackageFile')) { + require_once 'PEAR/PackageFile.php'; + } + + $a = &new PEAR_PackageFile($config, $debug); + $common = new PEAR_Common; + $common->ui = $this->ui; + $a->setLogger($common); + return $a; + } + + function doPackage($command, $options, $params) + { + $this->output = ''; + $pkginfofile = isset($params[0]) ? $params[0] : 'package2.xml'; + $packager = &$this->getPackager(); + if (PEAR::isError($err = $this->_convertPackage($pkginfofile))) { + return $err; + } + + $compress = empty($options['nocompress']) ? true : false; + $result = $packager->package($pkginfofile, $compress, 'package.xml'); + if (PEAR::isError($result)) { + return $this->raiseError($result); + } + + // Don't want output, only the package file name just created + if (isset($options['showname'])) { + $this->ui->outputData($result, $command); + } + + return true; + } + + function _convertPackage($packagexml) + { + $pkg = &$this->getPackageFile($this->config); + $pf2 = &$pkg->fromPackageFile($packagexml, PEAR_VALIDATE_NORMAL); + if (!is_a($pf2, 'PEAR_PackageFile_v2')) { + return $this->raiseError('Cannot process "' . + $packagexml . '", is not a package.xml 2.0'); + } + + require_once 'PEAR/PackageFile/v1.php'; + $pf = new PEAR_PackageFile_v1; + $pf->setConfig($this->config); + if ($pf2->getPackageType() != 'extsrc' && $pf2->getPackageType() != 'zendextsrc') { + return $this->raiseError('Cannot safely convert "' . $packagexml . + '", is not an extension source package. Using a PEAR_PackageFileManager-based ' . + 'script is an option'); + } + + if (is_array($pf2->getUsesRole())) { + return $this->raiseError('Cannot safely convert "' . $packagexml . + '", contains custom roles. Using a PEAR_PackageFileManager-based script or ' . + 'the convert command is an option'); + } + + if (is_array($pf2->getUsesTask())) { + return $this->raiseError('Cannot safely convert "' . $packagexml . + '", contains custom tasks. Using a PEAR_PackageFileManager-based script or ' . + 'the convert command is an option'); + } + + $deps = $pf2->getDependencies(); + if (isset($deps['group'])) { + return $this->raiseError('Cannot safely convert "' . $packagexml . + '", contains dependency groups. Using a PEAR_PackageFileManager-based script ' . + 'or the convert command is an option'); + } + + if (isset($deps['required']['subpackage']) || + isset($deps['optional']['subpackage'])) { + return $this->raiseError('Cannot safely convert "' . $packagexml . + '", contains subpackage dependencies. Using a PEAR_PackageFileManager-based '. + 'script is an option'); + } + + if (isset($deps['required']['os'])) { + return $this->raiseError('Cannot safely convert "' . $packagexml . + '", contains os dependencies. Using a PEAR_PackageFileManager-based '. + 'script is an option'); + } + + if (isset($deps['required']['arch'])) { + return $this->raiseError('Cannot safely convert "' . $packagexml . + '", contains arch dependencies. Using a PEAR_PackageFileManager-based '. + 'script is an option'); + } + + $pf->setPackage($pf2->getPackage()); + $pf->setSummary($pf2->getSummary()); + $pf->setDescription($pf2->getDescription()); + foreach ($pf2->getMaintainers() as $maintainer) { + $pf->addMaintainer($maintainer['role'], $maintainer['handle'], + $maintainer['name'], $maintainer['email']); + } + + $pf->setVersion($pf2->getVersion()); + $pf->setDate($pf2->getDate()); + $pf->setLicense($pf2->getLicense()); + $pf->setState($pf2->getState()); + $pf->setNotes($pf2->getNotes()); + $pf->addPhpDep($deps['required']['php']['min'], 'ge'); + if (isset($deps['required']['php']['max'])) { + $pf->addPhpDep($deps['required']['php']['max'], 'le'); + } + + if (isset($deps['required']['package'])) { + if (!isset($deps['required']['package'][0])) { + $deps['required']['package'] = array($deps['required']['package']); + } + + foreach ($deps['required']['package'] as $dep) { + if (!isset($dep['channel'])) { + return $this->raiseError('Cannot safely convert "' . $packagexml . '"' . + ' contains uri-based dependency on a package. Using a ' . + 'PEAR_PackageFileManager-based script is an option'); + } + + if ($dep['channel'] != 'pear.php.net' + && $dep['channel'] != 'pecl.php.net' + && $dep['channel'] != 'doc.php.net') { + return $this->raiseError('Cannot safely convert "' . $packagexml . '"' . + ' contains dependency on a non-standard channel package. Using a ' . + 'PEAR_PackageFileManager-based script is an option'); + } + + if (isset($dep['conflicts'])) { + return $this->raiseError('Cannot safely convert "' . $packagexml . '"' . + ' contains conflicts dependency. Using a ' . + 'PEAR_PackageFileManager-based script is an option'); + } + + if (isset($dep['exclude'])) { + $this->ui->outputData('WARNING: exclude tags are ignored in conversion'); + } + + if (isset($dep['min'])) { + $pf->addPackageDep($dep['name'], $dep['min'], 'ge'); + } + + if (isset($dep['max'])) { + $pf->addPackageDep($dep['name'], $dep['max'], 'le'); + } + } + } + + if (isset($deps['required']['extension'])) { + if (!isset($deps['required']['extension'][0])) { + $deps['required']['extension'] = array($deps['required']['extension']); + } + + foreach ($deps['required']['extension'] as $dep) { + if (isset($dep['conflicts'])) { + return $this->raiseError('Cannot safely convert "' . $packagexml . '"' . + ' contains conflicts dependency. Using a ' . + 'PEAR_PackageFileManager-based script is an option'); + } + + if (isset($dep['exclude'])) { + $this->ui->outputData('WARNING: exclude tags are ignored in conversion'); + } + + if (isset($dep['min'])) { + $pf->addExtensionDep($dep['name'], $dep['min'], 'ge'); + } + + if (isset($dep['max'])) { + $pf->addExtensionDep($dep['name'], $dep['max'], 'le'); + } + } + } + + if (isset($deps['optional']['package'])) { + if (!isset($deps['optional']['package'][0])) { + $deps['optional']['package'] = array($deps['optional']['package']); + } + + foreach ($deps['optional']['package'] as $dep) { + if (!isset($dep['channel'])) { + return $this->raiseError('Cannot safely convert "' . $packagexml . '"' . + ' contains uri-based dependency on a package. Using a ' . + 'PEAR_PackageFileManager-based script is an option'); + } + + if ($dep['channel'] != 'pear.php.net' + && $dep['channel'] != 'pecl.php.net' + && $dep['channel'] != 'doc.php.net') { + return $this->raiseError('Cannot safely convert "' . $packagexml . '"' . + ' contains dependency on a non-standard channel package. Using a ' . + 'PEAR_PackageFileManager-based script is an option'); + } + + if (isset($dep['exclude'])) { + $this->ui->outputData('WARNING: exclude tags are ignored in conversion'); + } + + if (isset($dep['min'])) { + $pf->addPackageDep($dep['name'], $dep['min'], 'ge', 'yes'); + } + + if (isset($dep['max'])) { + $pf->addPackageDep($dep['name'], $dep['max'], 'le', 'yes'); + } + } + } + + if (isset($deps['optional']['extension'])) { + if (!isset($deps['optional']['extension'][0])) { + $deps['optional']['extension'] = array($deps['optional']['extension']); + } + + foreach ($deps['optional']['extension'] as $dep) { + if (isset($dep['exclude'])) { + $this->ui->outputData('WARNING: exclude tags are ignored in conversion'); + } + + if (isset($dep['min'])) { + $pf->addExtensionDep($dep['name'], $dep['min'], 'ge', 'yes'); + } + + if (isset($dep['max'])) { + $pf->addExtensionDep($dep['name'], $dep['max'], 'le', 'yes'); + } + } + } + + $contents = $pf2->getContents(); + $release = $pf2->getReleases(); + if (isset($releases[0])) { + return $this->raiseError('Cannot safely process "' . $packagexml . '" contains ' + . 'multiple extsrcrelease/zendextsrcrelease tags. Using a PEAR_PackageFileManager-based script ' . + 'or the convert command is an option'); + } + + if ($configoptions = $pf2->getConfigureOptions()) { + foreach ($configoptions as $option) { + $default = isset($option['default']) ? $option['default'] : false; + $pf->addConfigureOption($option['name'], $option['prompt'], $default); + } + } + + if (isset($release['filelist']['ignore'])) { + return $this->raiseError('Cannot safely process "' . $packagexml . '" contains ' + . 'ignore tags. Using a PEAR_PackageFileManager-based script or the convert' . + ' command is an option'); + } + + if (isset($release['filelist']['install']) && + !isset($release['filelist']['install'][0])) { + $release['filelist']['install'] = array($release['filelist']['install']); + } + + if (isset($contents['dir']['attribs']['baseinstalldir'])) { + $baseinstalldir = $contents['dir']['attribs']['baseinstalldir']; + } else { + $baseinstalldir = false; + } + + if (!isset($contents['dir']['file'][0])) { + $contents['dir']['file'] = array($contents['dir']['file']); + } + + foreach ($contents['dir']['file'] as $file) { + if ($baseinstalldir && !isset($file['attribs']['baseinstalldir'])) { + $file['attribs']['baseinstalldir'] = $baseinstalldir; + } + + $processFile = $file; + unset($processFile['attribs']); + if (count($processFile)) { + foreach ($processFile as $name => $task) { + if ($name != $pf2->getTasksNs() . ':replace') { + return $this->raiseError('Cannot safely process "' . $packagexml . + '" contains tasks other than replace. Using a ' . + 'PEAR_PackageFileManager-based script is an option.'); + } + $file['attribs']['replace'][] = $task; + } + } + + if (!in_array($file['attribs']['role'], PEAR_Common::getFileRoles())) { + return $this->raiseError('Cannot safely convert "' . $packagexml . + '", contains custom roles. Using a PEAR_PackageFileManager-based script ' . + 'or the convert command is an option'); + } + + if (isset($release['filelist']['install'])) { + foreach ($release['filelist']['install'] as $installas) { + if ($installas['attribs']['name'] == $file['attribs']['name']) { + $file['attribs']['install-as'] = $installas['attribs']['as']; + } + } + } + + $pf->addFile('/', $file['attribs']['name'], $file['attribs']); + } + + if ($pf2->getChangeLog()) { + $this->ui->outputData('WARNING: changelog is not translated to package.xml ' . + '1.0, use PEAR_PackageFileManager-based script if you need changelog-' . + 'translation for package.xml 1.0'); + } + + $gen = &$pf->getDefaultGenerator(); + $gen->toPackageFile('.'); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Pickle.xml b/_piecrust/libs/PEAR/Command/Pickle.xml new file mode 100644 index 0000000..721ecea --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Pickle.xml @@ -0,0 +1,36 @@ + + + Build PECL Package + doPackage + pi + + + Z + Do not gzip the package file + + + n + Print the name of the packaged file. + + + [descfile] +Creates a PECL package from its package2.xml file. + +An automatic conversion will be made to a package.xml 1.0 and written out to +disk in the current directory as "package.xml". Note that +only simple package.xml 2.0 will be converted. package.xml 2.0 with: + + - dependency types other than required/optional PECL package/ext/php/pearinstaller + - more than one extsrcrelease or zendextsrcrelease + - zendextbinrelease, extbinrelease, phprelease, or bundle release type + - dependency groups + - ignore tags in release filelist + - tasks other than replace + - custom roles + +will cause pickle to fail, and output an error message. If your package2.xml +uses any of these features, you are best off using PEAR_PackageFileManager to +generate both package.xml. + + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Registry.php b/_piecrust/libs/PEAR/Command/Registry.php new file mode 100644 index 0000000..4304db5 --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Registry.php @@ -0,0 +1,1145 @@ + + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Registry.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ + +/** + * base class + */ +require_once 'PEAR/Command/Common.php'; + +/** + * PEAR commands for registry manipulation + * + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + */ +class PEAR_Command_Registry extends PEAR_Command_Common +{ + var $commands = array( + 'list' => array( + 'summary' => 'List Installed Packages In The Default Channel', + 'function' => 'doList', + 'shortcut' => 'l', + 'options' => array( + 'channel' => array( + 'shortopt' => 'c', + 'doc' => 'list installed packages from this channel', + 'arg' => 'CHAN', + ), + 'allchannels' => array( + 'shortopt' => 'a', + 'doc' => 'list installed packages from all channels', + ), + 'channelinfo' => array( + 'shortopt' => 'i', + 'doc' => 'output fully channel-aware data, even on failure', + ), + ), + 'doc' => ' +If invoked without parameters, this command lists the PEAR packages +installed in your php_dir ({config php_dir}). With a parameter, it +lists the files in a package. +', + ), + 'list-files' => array( + 'summary' => 'List Files In Installed Package', + 'function' => 'doFileList', + 'shortcut' => 'fl', + 'options' => array(), + 'doc' => ' +List the files in an installed package. +' + ), + 'shell-test' => array( + 'summary' => 'Shell Script Test', + 'function' => 'doShellTest', + 'shortcut' => 'st', + 'options' => array(), + 'doc' => ' [[relation] version] +Tests if a package is installed in the system. Will exit(1) if it is not. + The version comparison operator. One of: + <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne + The version to compare with +'), + 'info' => array( + 'summary' => 'Display information about a package', + 'function' => 'doInfo', + 'shortcut' => 'in', + 'options' => array(), + 'doc' => ' +Displays information about a package. The package argument may be a +local package file, an URL to a package file, or the name of an +installed package.' + ) + ); + + /** + * PEAR_Command_Registry constructor. + * + * @access public + */ + function PEAR_Command_Registry(&$ui, &$config) + { + parent::PEAR_Command_Common($ui, $config); + } + + function _sortinfo($a, $b) + { + $apackage = isset($a['package']) ? $a['package'] : $a['name']; + $bpackage = isset($b['package']) ? $b['package'] : $b['name']; + return strcmp($apackage, $bpackage); + } + + function doList($command, $options, $params) + { + $reg = &$this->config->getRegistry(); + $channelinfo = isset($options['channelinfo']); + if (isset($options['allchannels']) && !$channelinfo) { + return $this->doListAll($command, array(), $params); + } + + if (isset($options['allchannels']) && $channelinfo) { + // allchannels with $channelinfo + unset($options['allchannels']); + $channels = $reg->getChannels(); + $errors = array(); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + foreach ($channels as $channel) { + $options['channel'] = $channel->getName(); + $ret = $this->doList($command, $options, $params); + + if (PEAR::isError($ret)) { + $errors[] = $ret; + } + } + + PEAR::staticPopErrorHandling(); + if (count($errors)) { + // for now, only give first error + return PEAR::raiseError($errors[0]); + } + + return true; + } + + if (count($params) === 1) { + return $this->doFileList($command, $options, $params); + } + + if (isset($options['channel'])) { + if (!$reg->channelExists($options['channel'])) { + return $this->raiseError('Channel "' . $options['channel'] .'" does not exist'); + } + + $channel = $reg->channelName($options['channel']); + } else { + $channel = $this->config->get('default_channel'); + } + + $installed = $reg->packageInfo(null, null, $channel); + usort($installed, array(&$this, '_sortinfo')); + + $data = array( + 'caption' => 'Installed packages, channel ' . + $channel . ':', + 'border' => true, + 'headline' => array('Package', 'Version', 'State'), + 'channel' => $channel, + ); + if ($channelinfo) { + $data['headline'] = array('Channel', 'Package', 'Version', 'State'); + } + + if (count($installed) && !isset($data['data'])) { + $data['data'] = array(); + } + + foreach ($installed as $package) { + $pobj = $reg->getPackage(isset($package['package']) ? + $package['package'] : $package['name'], $channel); + if ($channelinfo) { + $packageinfo = array($pobj->getChannel(), $pobj->getPackage(), $pobj->getVersion(), + $pobj->getState() ? $pobj->getState() : null); + } else { + $packageinfo = array($pobj->getPackage(), $pobj->getVersion(), + $pobj->getState() ? $pobj->getState() : null); + } + $data['data'][] = $packageinfo; + } + + if (count($installed) === 0) { + if (!$channelinfo) { + $data = '(no packages installed from channel ' . $channel . ')'; + } else { + $data = array( + 'caption' => 'Installed packages, channel ' . + $channel . ':', + 'border' => true, + 'channel' => $channel, + 'data' => array(array('(no packages installed)')), + ); + } + } + + $this->ui->outputData($data, $command); + return true; + } + + function doListAll($command, $options, $params) + { + // This duplicate code is deprecated over + // list --channelinfo, which gives identical + // output for list and list --allchannels. + $reg = &$this->config->getRegistry(); + $installed = $reg->packageInfo(null, null, null); + foreach ($installed as $channel => $packages) { + usort($packages, array($this, '_sortinfo')); + $data = array( + 'caption' => 'Installed packages, channel ' . $channel . ':', + 'border' => true, + 'headline' => array('Package', 'Version', 'State'), + 'channel' => $channel + ); + + foreach ($packages as $package) { + $p = isset($package['package']) ? $package['package'] : $package['name']; + $pobj = $reg->getPackage($p, $channel); + $data['data'][] = array($pobj->getPackage(), $pobj->getVersion(), + $pobj->getState() ? $pobj->getState() : null); + } + + // Adds a blank line after each section + $data['data'][] = array(); + + if (count($packages) === 0) { + $data = array( + 'caption' => 'Installed packages, channel ' . $channel . ':', + 'border' => true, + 'data' => array(array('(no packages installed)'), array()), + 'channel' => $channel + ); + } + $this->ui->outputData($data, $command); + } + return true; + } + + function doFileList($command, $options, $params) + { + if (count($params) !== 1) { + return $this->raiseError('list-files expects 1 parameter'); + } + + $reg = &$this->config->getRegistry(); + $fp = false; + if (!is_dir($params[0]) && (file_exists($params[0]) || $fp = @fopen($params[0], 'r'))) { + if ($fp) { + fclose($fp); + } + + if (!class_exists('PEAR_PackageFile')) { + require_once 'PEAR/PackageFile.php'; + } + + $pkg = &new PEAR_PackageFile($this->config, $this->_debug); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $info = &$pkg->fromAnyFile($params[0], PEAR_VALIDATE_NORMAL); + PEAR::staticPopErrorHandling(); + $headings = array('Package File', 'Install Path'); + $installed = false; + } else { + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $parsed = $reg->parsePackageName($params[0], $this->config->get('default_channel')); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($parsed)) { + return $this->raiseError($parsed); + } + + $info = &$reg->getPackage($parsed['package'], $parsed['channel']); + $headings = array('Type', 'Install Path'); + $installed = true; + } + + if (PEAR::isError($info)) { + return $this->raiseError($info); + } + + if ($info === null) { + return $this->raiseError("`$params[0]' not installed"); + } + + $list = ($info->getPackagexmlVersion() == '1.0' || $installed) ? + $info->getFilelist() : $info->getContents(); + if ($installed) { + $caption = 'Installed Files For ' . $params[0]; + } else { + $caption = 'Contents of ' . basename($params[0]); + } + + $data = array( + 'caption' => $caption, + 'border' => true, + 'headline' => $headings); + if ($info->getPackagexmlVersion() == '1.0' || $installed) { + foreach ($list as $file => $att) { + if ($installed) { + if (empty($att['installed_as'])) { + continue; + } + $data['data'][] = array($att['role'], $att['installed_as']); + } else { + if (isset($att['baseinstalldir']) && !in_array($att['role'], + array('test', 'data', 'doc'))) { + $dest = $att['baseinstalldir'] . DIRECTORY_SEPARATOR . + $file; + } else { + $dest = $file; + } + switch ($att['role']) { + case 'test': + case 'data': + case 'doc': + $role = $att['role']; + if ($role == 'test') { + $role .= 's'; + } + $dest = $this->config->get($role . '_dir') . DIRECTORY_SEPARATOR . + $info->getPackage() . DIRECTORY_SEPARATOR . $dest; + break; + case 'php': + default: + $dest = $this->config->get('php_dir') . DIRECTORY_SEPARATOR . + $dest; + } + $ds2 = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR; + $dest = preg_replace(array('!\\\\+!', '!/!', "!$ds2+!"), + array(DIRECTORY_SEPARATOR, + DIRECTORY_SEPARATOR, + DIRECTORY_SEPARATOR), + $dest); + $file = preg_replace('!/+!', '/', $file); + $data['data'][] = array($file, $dest); + } + } + } else { // package.xml 2.0, not installed + if (!isset($list['dir']['file'][0])) { + $list['dir']['file'] = array($list['dir']['file']); + } + + foreach ($list['dir']['file'] as $att) { + $att = $att['attribs']; + $file = $att['name']; + $role = &PEAR_Installer_Role::factory($info, $att['role'], $this->config); + $role->setup($this, $info, $att, $file); + if (!$role->isInstallable()) { + $dest = '(not installable)'; + } else { + $dest = $role->processInstallation($info, $att, $file, ''); + if (PEAR::isError($dest)) { + $dest = '(Unknown role "' . $att['role'] . ')'; + } else { + list(,, $dest) = $dest; + } + } + $data['data'][] = array($file, $dest); + } + } + + $this->ui->outputData($data, $command); + return true; + } + + function doShellTest($command, $options, $params) + { + if (count($params) < 1) { + return PEAR::raiseError('ERROR, usage: pear shell-test packagename [[relation] version]'); + } + + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $reg = &$this->config->getRegistry(); + $info = $reg->parsePackageName($params[0], $this->config->get('default_channel')); + if (PEAR::isError($info)) { + exit(1); // invalid package name + } + + $package = $info['package']; + $channel = $info['channel']; + // "pear shell-test Foo" + if (!$reg->packageExists($package, $channel)) { + if ($channel == 'pecl.php.net') { + if ($reg->packageExists($package, 'pear.php.net')) { + $channel = 'pear.php.net'; // magically change channels for extensions + } + } + } + + if (count($params) === 1) { + if (!$reg->packageExists($package, $channel)) { + exit(1); + } + // "pear shell-test Foo 1.0" + } elseif (count($params) === 2) { + $v = $reg->packageInfo($package, 'version', $channel); + if (!$v || !version_compare("$v", "{$params[1]}", "ge")) { + exit(1); + } + // "pear shell-test Foo ge 1.0" + } elseif (count($params) === 3) { + $v = $reg->packageInfo($package, 'version', $channel); + if (!$v || !version_compare("$v", "{$params[2]}", $params[1])) { + exit(1); + } + } else { + PEAR::staticPopErrorHandling(); + $this->raiseError("$command: expects 1 to 3 parameters"); + exit(1); + } + } + + function doInfo($command, $options, $params) + { + if (count($params) !== 1) { + return $this->raiseError('pear info expects 1 parameter'); + } + + $info = $fp = false; + $reg = &$this->config->getRegistry(); + if (is_file($params[0]) && !is_dir($params[0]) && + (file_exists($params[0]) || $fp = @fopen($params[0], 'r')) + ) { + if ($fp) { + fclose($fp); + } + + if (!class_exists('PEAR_PackageFile')) { + require_once 'PEAR/PackageFile.php'; + } + + $pkg = &new PEAR_PackageFile($this->config, $this->_debug); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $obj = &$pkg->fromAnyFile($params[0], PEAR_VALIDATE_NORMAL); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($obj)) { + $uinfo = $obj->getUserInfo(); + if (is_array($uinfo)) { + foreach ($uinfo as $message) { + if (is_array($message)) { + $message = $message['message']; + } + $this->ui->outputData($message); + } + } + + return $this->raiseError($obj); + } + + if ($obj->getPackagexmlVersion() != '1.0') { + return $this->_doInfo2($command, $options, $params, $obj, false); + } + + $info = $obj->toArray(); + } else { + $parsed = $reg->parsePackageName($params[0], $this->config->get('default_channel')); + if (PEAR::isError($parsed)) { + return $this->raiseError($parsed); + } + + $package = $parsed['package']; + $channel = $parsed['channel']; + $info = $reg->packageInfo($package, null, $channel); + if (isset($info['old'])) { + $obj = $reg->getPackage($package, $channel); + return $this->_doInfo2($command, $options, $params, $obj, true); + } + } + + if (PEAR::isError($info)) { + return $info; + } + + if (empty($info)) { + $this->raiseError("No information found for `$params[0]'"); + return; + } + + unset($info['filelist']); + unset($info['dirtree']); + unset($info['changelog']); + if (isset($info['xsdversion'])) { + $info['package.xml version'] = $info['xsdversion']; + unset($info['xsdversion']); + } + + if (isset($info['packagerversion'])) { + $info['packaged with PEAR version'] = $info['packagerversion']; + unset($info['packagerversion']); + } + + $keys = array_keys($info); + $longtext = array('description', 'summary'); + foreach ($keys as $key) { + if (is_array($info[$key])) { + switch ($key) { + case 'maintainers': { + $i = 0; + $mstr = ''; + foreach ($info[$key] as $m) { + if ($i++ > 0) { + $mstr .= "\n"; + } + $mstr .= $m['name'] . " <"; + if (isset($m['email'])) { + $mstr .= $m['email']; + } else { + $mstr .= $m['handle'] . '@php.net'; + } + $mstr .= "> ($m[role])"; + } + $info[$key] = $mstr; + break; + } + case 'release_deps': { + $i = 0; + $dstr = ''; + foreach ($info[$key] as $d) { + if (isset($this->_deps_rel_trans[$d['rel']])) { + $rel = $this->_deps_rel_trans[$d['rel']]; + } else { + $rel = $d['rel']; + } + if (isset($this->_deps_type_trans[$d['type']])) { + $type = ucfirst($this->_deps_type_trans[$d['type']]); + } else { + $type = $d['type']; + } + if (isset($d['name'])) { + $name = $d['name'] . ' '; + } else { + $name = ''; + } + if (isset($d['version'])) { + $version = $d['version'] . ' '; + } else { + $version = ''; + } + if (isset($d['optional']) && $d['optional'] == 'yes') { + $optional = ' (optional)'; + } else { + $optional = ''; + } + $dstr .= "$type $name$rel $version$optional\n"; + } + $info[$key] = $dstr; + break; + } + case 'provides' : { + $debug = $this->config->get('verbose'); + if ($debug < 2) { + $pstr = 'Classes: '; + } else { + $pstr = ''; + } + $i = 0; + foreach ($info[$key] as $p) { + if ($debug < 2 && $p['type'] != "class") { + continue; + } + // Only print classes when verbosity mode is < 2 + if ($debug < 2) { + if ($i++ > 0) { + $pstr .= ", "; + } + $pstr .= $p['name']; + } else { + if ($i++ > 0) { + $pstr .= "\n"; + } + $pstr .= ucfirst($p['type']) . " " . $p['name']; + if (isset($p['explicit']) && $p['explicit'] == 1) { + $pstr .= " (explicit)"; + } + } + } + $info[$key] = $pstr; + break; + } + case 'configure_options' : { + foreach ($info[$key] as $i => $p) { + $info[$key][$i] = array_map(null, array_keys($p), array_values($p)); + $info[$key][$i] = array_map(create_function('$a', + 'return join(" = ",$a);'), $info[$key][$i]); + $info[$key][$i] = implode(', ', $info[$key][$i]); + } + $info[$key] = implode("\n", $info[$key]); + break; + } + default: { + $info[$key] = implode(", ", $info[$key]); + break; + } + } + } + + if ($key == '_lastmodified') { + $hdate = date('Y-m-d', $info[$key]); + unset($info[$key]); + $info['Last Modified'] = $hdate; + } elseif ($key == '_lastversion') { + $info['Previous Installed Version'] = $info[$key] ? $info[$key] : '- None -'; + unset($info[$key]); + } else { + $info[$key] = trim($info[$key]); + if (in_array($key, $longtext)) { + $info[$key] = preg_replace('/ +/', ' ', $info[$key]); + } + } + } + + $caption = 'About ' . $info['package'] . '-' . $info['version']; + $data = array( + 'caption' => $caption, + 'border' => true); + foreach ($info as $key => $value) { + $key = ucwords(trim(str_replace('_', ' ', $key))); + $data['data'][] = array($key, $value); + } + $data['raw'] = $info; + + $this->ui->outputData($data, 'package-info'); + } + + /** + * @access private + */ + function _doInfo2($command, $options, $params, &$obj, $installed) + { + $reg = &$this->config->getRegistry(); + $caption = 'About ' . $obj->getChannel() . '/' .$obj->getPackage() . '-' . + $obj->getVersion(); + $data = array( + 'caption' => $caption, + 'border' => true); + switch ($obj->getPackageType()) { + case 'php' : + $release = 'PEAR-style PHP-based Package'; + break; + case 'extsrc' : + $release = 'PECL-style PHP extension (source code)'; + break; + case 'zendextsrc' : + $release = 'PECL-style Zend extension (source code)'; + break; + case 'extbin' : + $release = 'PECL-style PHP extension (binary)'; + break; + case 'zendextbin' : + $release = 'PECL-style Zend extension (binary)'; + break; + case 'bundle' : + $release = 'Package bundle (collection of packages)'; + break; + } + $extends = $obj->getExtends(); + $extends = $extends ? + $obj->getPackage() . ' (extends ' . $extends . ')' : $obj->getPackage(); + if ($src = $obj->getSourcePackage()) { + $extends .= ' (source package ' . $src['channel'] . '/' . $src['package'] . ')'; + } + + $info = array( + 'Release Type' => $release, + 'Name' => $extends, + 'Channel' => $obj->getChannel(), + 'Summary' => preg_replace('/ +/', ' ', $obj->getSummary()), + 'Description' => preg_replace('/ +/', ' ', $obj->getDescription()), + ); + $info['Maintainers'] = ''; + foreach (array('lead', 'developer', 'contributor', 'helper') as $role) { + $leads = $obj->{"get{$role}s"}(); + if (!$leads) { + continue; + } + + if (isset($leads['active'])) { + $leads = array($leads); + } + + foreach ($leads as $lead) { + if (!empty($info['Maintainers'])) { + $info['Maintainers'] .= "\n"; + } + + $active = $lead['active'] == 'no' ? ', inactive' : ''; + $info['Maintainers'] .= $lead['name'] . ' <'; + $info['Maintainers'] .= $lead['email'] . "> ($role$active)"; + } + } + + $info['Release Date'] = $obj->getDate(); + if ($time = $obj->getTime()) { + $info['Release Date'] .= ' ' . $time; + } + + $info['Release Version'] = $obj->getVersion() . ' (' . $obj->getState() . ')'; + $info['API Version'] = $obj->getVersion('api') . ' (' . $obj->getState('api') . ')'; + $info['License'] = $obj->getLicense(); + $uri = $obj->getLicenseLocation(); + if ($uri) { + if (isset($uri['uri'])) { + $info['License'] .= ' (' . $uri['uri'] . ')'; + } else { + $extra = $obj->getInstalledLocation($info['filesource']); + if ($extra) { + $info['License'] .= ' (' . $uri['filesource'] . ')'; + } + } + } + + $info['Release Notes'] = $obj->getNotes(); + if ($compat = $obj->getCompatible()) { + if (!isset($compat[0])) { + $compat = array($compat); + } + + $info['Compatible with'] = ''; + foreach ($compat as $package) { + $info['Compatible with'] .= $package['channel'] . '/' . $package['name'] . + "\nVersions >= " . $package['min'] . ', <= ' . $package['max']; + if (isset($package['exclude'])) { + if (is_array($package['exclude'])) { + $package['exclude'] = implode(', ', $package['exclude']); + } + + if (!isset($info['Not Compatible with'])) { + $info['Not Compatible with'] = ''; + } else { + $info['Not Compatible with'] .= "\n"; + } + $info['Not Compatible with'] .= $package['channel'] . '/' . + $package['name'] . "\nVersions " . $package['exclude']; + } + } + } + + $usesrole = $obj->getUsesrole(); + if ($usesrole) { + if (!isset($usesrole[0])) { + $usesrole = array($usesrole); + } + + foreach ($usesrole as $roledata) { + if (isset($info['Uses Custom Roles'])) { + $info['Uses Custom Roles'] .= "\n"; + } else { + $info['Uses Custom Roles'] = ''; + } + + if (isset($roledata['package'])) { + $rolepackage = $reg->parsedPackageNameToString($roledata, true); + } else { + $rolepackage = $roledata['uri']; + } + $info['Uses Custom Roles'] .= $roledata['role'] . ' (' . $rolepackage . ')'; + } + } + + $usestask = $obj->getUsestask(); + if ($usestask) { + if (!isset($usestask[0])) { + $usestask = array($usestask); + } + + foreach ($usestask as $taskdata) { + if (isset($info['Uses Custom Tasks'])) { + $info['Uses Custom Tasks'] .= "\n"; + } else { + $info['Uses Custom Tasks'] = ''; + } + + if (isset($taskdata['package'])) { + $taskpackage = $reg->parsedPackageNameToString($taskdata, true); + } else { + $taskpackage = $taskdata['uri']; + } + $info['Uses Custom Tasks'] .= $taskdata['task'] . ' (' . $taskpackage . ')'; + } + } + + $deps = $obj->getDependencies(); + $info['Required Dependencies'] = 'PHP version ' . $deps['required']['php']['min']; + if (isset($deps['required']['php']['max'])) { + $info['Required Dependencies'] .= '-' . $deps['required']['php']['max'] . "\n"; + } else { + $info['Required Dependencies'] .= "\n"; + } + + if (isset($deps['required']['php']['exclude'])) { + if (!isset($info['Not Compatible with'])) { + $info['Not Compatible with'] = ''; + } else { + $info['Not Compatible with'] .= "\n"; + } + + if (is_array($deps['required']['php']['exclude'])) { + $deps['required']['php']['exclude'] = + implode(', ', $deps['required']['php']['exclude']); + } + $info['Not Compatible with'] .= "PHP versions\n " . + $deps['required']['php']['exclude']; + } + + $info['Required Dependencies'] .= 'PEAR installer version'; + if (isset($deps['required']['pearinstaller']['max'])) { + $info['Required Dependencies'] .= 's ' . + $deps['required']['pearinstaller']['min'] . '-' . + $deps['required']['pearinstaller']['max']; + } else { + $info['Required Dependencies'] .= ' ' . + $deps['required']['pearinstaller']['min'] . ' or newer'; + } + + if (isset($deps['required']['pearinstaller']['exclude'])) { + if (!isset($info['Not Compatible with'])) { + $info['Not Compatible with'] = ''; + } else { + $info['Not Compatible with'] .= "\n"; + } + + if (is_array($deps['required']['pearinstaller']['exclude'])) { + $deps['required']['pearinstaller']['exclude'] = + implode(', ', $deps['required']['pearinstaller']['exclude']); + } + $info['Not Compatible with'] .= "PEAR installer\n Versions " . + $deps['required']['pearinstaller']['exclude']; + } + + foreach (array('Package', 'Extension') as $type) { + $index = strtolower($type); + if (isset($deps['required'][$index])) { + if (isset($deps['required'][$index]['name'])) { + $deps['required'][$index] = array($deps['required'][$index]); + } + + foreach ($deps['required'][$index] as $package) { + if (isset($package['conflicts'])) { + $infoindex = 'Not Compatible with'; + if (!isset($info['Not Compatible with'])) { + $info['Not Compatible with'] = ''; + } else { + $info['Not Compatible with'] .= "\n"; + } + } else { + $infoindex = 'Required Dependencies'; + $info[$infoindex] .= "\n"; + } + + if ($index == 'extension') { + $name = $package['name']; + } else { + if (isset($package['channel'])) { + $name = $package['channel'] . '/' . $package['name']; + } else { + $name = '__uri/' . $package['name'] . ' (static URI)'; + } + } + + $info[$infoindex] .= "$type $name"; + if (isset($package['uri'])) { + $info[$infoindex] .= "\n Download URI: $package[uri]"; + continue; + } + + if (isset($package['max']) && isset($package['min'])) { + $info[$infoindex] .= " \n Versions " . + $package['min'] . '-' . $package['max']; + } elseif (isset($package['min'])) { + $info[$infoindex] .= " \n Version " . + $package['min'] . ' or newer'; + } elseif (isset($package['max'])) { + $info[$infoindex] .= " \n Version " . + $package['max'] . ' or older'; + } + + if (isset($package['recommended'])) { + $info[$infoindex] .= "\n Recommended version: $package[recommended]"; + } + + if (isset($package['exclude'])) { + if (!isset($info['Not Compatible with'])) { + $info['Not Compatible with'] = ''; + } else { + $info['Not Compatible with'] .= "\n"; + } + + if (is_array($package['exclude'])) { + $package['exclude'] = implode(', ', $package['exclude']); + } + + $package['package'] = $package['name']; // for parsedPackageNameToString + if (isset($package['conflicts'])) { + $info['Not Compatible with'] .= '=> except '; + } + $info['Not Compatible with'] .= 'Package ' . + $reg->parsedPackageNameToString($package, true); + $info['Not Compatible with'] .= "\n Versions " . $package['exclude']; + } + } + } + } + + if (isset($deps['required']['os'])) { + if (isset($deps['required']['os']['name'])) { + $dep['required']['os']['name'] = array($dep['required']['os']['name']); + } + + foreach ($dep['required']['os'] as $os) { + if (isset($os['conflicts']) && $os['conflicts'] == 'yes') { + if (!isset($info['Not Compatible with'])) { + $info['Not Compatible with'] = ''; + } else { + $info['Not Compatible with'] .= "\n"; + } + $info['Not Compatible with'] .= "$os[name] Operating System"; + } else { + $info['Required Dependencies'] .= "\n"; + $info['Required Dependencies'] .= "$os[name] Operating System"; + } + } + } + + if (isset($deps['required']['arch'])) { + if (isset($deps['required']['arch']['pattern'])) { + $dep['required']['arch']['pattern'] = array($dep['required']['os']['pattern']); + } + + foreach ($dep['required']['arch'] as $os) { + if (isset($os['conflicts']) && $os['conflicts'] == 'yes') { + if (!isset($info['Not Compatible with'])) { + $info['Not Compatible with'] = ''; + } else { + $info['Not Compatible with'] .= "\n"; + } + $info['Not Compatible with'] .= "OS/Arch matching pattern '/$os[pattern]/'"; + } else { + $info['Required Dependencies'] .= "\n"; + $info['Required Dependencies'] .= "OS/Arch matching pattern '/$os[pattern]/'"; + } + } + } + + if (isset($deps['optional'])) { + foreach (array('Package', 'Extension') as $type) { + $index = strtolower($type); + if (isset($deps['optional'][$index])) { + if (isset($deps['optional'][$index]['name'])) { + $deps['optional'][$index] = array($deps['optional'][$index]); + } + + foreach ($deps['optional'][$index] as $package) { + if (isset($package['conflicts']) && $package['conflicts'] == 'yes') { + $infoindex = 'Not Compatible with'; + if (!isset($info['Not Compatible with'])) { + $info['Not Compatible with'] = ''; + } else { + $info['Not Compatible with'] .= "\n"; + } + } else { + $infoindex = 'Optional Dependencies'; + if (!isset($info['Optional Dependencies'])) { + $info['Optional Dependencies'] = ''; + } else { + $info['Optional Dependencies'] .= "\n"; + } + } + + if ($index == 'extension') { + $name = $package['name']; + } else { + if (isset($package['channel'])) { + $name = $package['channel'] . '/' . $package['name']; + } else { + $name = '__uri/' . $package['name'] . ' (static URI)'; + } + } + + $info[$infoindex] .= "$type $name"; + if (isset($package['uri'])) { + $info[$infoindex] .= "\n Download URI: $package[uri]"; + continue; + } + + if ($infoindex == 'Not Compatible with') { + // conflicts is only used to say that all versions conflict + continue; + } + + if (isset($package['max']) && isset($package['min'])) { + $info[$infoindex] .= " \n Versions " . + $package['min'] . '-' . $package['max']; + } elseif (isset($package['min'])) { + $info[$infoindex] .= " \n Version " . + $package['min'] . ' or newer'; + } elseif (isset($package['max'])) { + $info[$infoindex] .= " \n Version " . + $package['min'] . ' or older'; + } + + if (isset($package['recommended'])) { + $info[$infoindex] .= "\n Recommended version: $package[recommended]"; + } + + if (isset($package['exclude'])) { + if (!isset($info['Not Compatible with'])) { + $info['Not Compatible with'] = ''; + } else { + $info['Not Compatible with'] .= "\n"; + } + + if (is_array($package['exclude'])) { + $package['exclude'] = implode(', ', $package['exclude']); + } + + $info['Not Compatible with'] .= "Package $package\n Versions " . + $package['exclude']; + } + } + } + } + } + + if (isset($deps['group'])) { + if (!isset($deps['group'][0])) { + $deps['group'] = array($deps['group']); + } + + foreach ($deps['group'] as $group) { + $info['Dependency Group ' . $group['attribs']['name']] = $group['attribs']['hint']; + $groupindex = $group['attribs']['name'] . ' Contents'; + $info[$groupindex] = ''; + foreach (array('Package', 'Extension') as $type) { + $index = strtolower($type); + if (isset($group[$index])) { + if (isset($group[$index]['name'])) { + $group[$index] = array($group[$index]); + } + + foreach ($group[$index] as $package) { + if (!empty($info[$groupindex])) { + $info[$groupindex] .= "\n"; + } + + if ($index == 'extension') { + $name = $package['name']; + } else { + if (isset($package['channel'])) { + $name = $package['channel'] . '/' . $package['name']; + } else { + $name = '__uri/' . $package['name'] . ' (static URI)'; + } + } + + if (isset($package['uri'])) { + if (isset($package['conflicts']) && $package['conflicts'] == 'yes') { + $info[$groupindex] .= "Not Compatible with $type $name"; + } else { + $info[$groupindex] .= "$type $name"; + } + + $info[$groupindex] .= "\n Download URI: $package[uri]"; + continue; + } + + if (isset($package['conflicts']) && $package['conflicts'] == 'yes') { + $info[$groupindex] .= "Not Compatible with $type $name"; + continue; + } + + $info[$groupindex] .= "$type $name"; + if (isset($package['max']) && isset($package['min'])) { + $info[$groupindex] .= " \n Versions " . + $package['min'] . '-' . $package['max']; + } elseif (isset($package['min'])) { + $info[$groupindex] .= " \n Version " . + $package['min'] . ' or newer'; + } elseif (isset($package['max'])) { + $info[$groupindex] .= " \n Version " . + $package['min'] . ' or older'; + } + + if (isset($package['recommended'])) { + $info[$groupindex] .= "\n Recommended version: $package[recommended]"; + } + + if (isset($package['exclude'])) { + if (!isset($info['Not Compatible with'])) { + $info['Not Compatible with'] = ''; + } else { + $info[$groupindex] .= "Not Compatible with\n"; + } + + if (is_array($package['exclude'])) { + $package['exclude'] = implode(', ', $package['exclude']); + } + $info[$groupindex] .= " Package $package\n Versions " . + $package['exclude']; + } + } + } + } + } + } + + if ($obj->getPackageType() == 'bundle') { + $info['Bundled Packages'] = ''; + foreach ($obj->getBundledPackages() as $package) { + if (!empty($info['Bundled Packages'])) { + $info['Bundled Packages'] .= "\n"; + } + + if (isset($package['uri'])) { + $info['Bundled Packages'] .= '__uri/' . $package['name']; + $info['Bundled Packages'] .= "\n (URI: $package[uri]"; + } else { + $info['Bundled Packages'] .= $package['channel'] . '/' . $package['name']; + } + } + } + + $info['package.xml version'] = '2.0'; + if ($installed) { + if ($obj->getLastModified()) { + $info['Last Modified'] = date('Y-m-d H:i', $obj->getLastModified()); + } + + $v = $obj->getLastInstalledVersion(); + $info['Previous Installed Version'] = $v ? $v : '- None -'; + } + + foreach ($info as $key => $value) { + $data['data'][] = array($key, $value); + } + + $data['raw'] = $obj->getArray(); // no validation needed + $this->ui->outputData($data, 'package-info'); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Registry.xml b/_piecrust/libs/PEAR/Command/Registry.xml new file mode 100644 index 0000000..9f4e214 --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Registry.xml @@ -0,0 +1,58 @@ + + + List Installed Packages In The Default Channel + doList + l + + + c + list installed packages from this channel + CHAN + + + a + list installed packages from all channels + + + i + output fully channel-aware data, even on failure + + + <package> +If invoked without parameters, this command lists the PEAR packages +installed in your php_dir ({config php_dir}). With a parameter, it +lists the files in a package. + + + + List Files In Installed Package + doFileList + fl + + <package> +List the files in an installed package. + + + + Shell Script Test + doShellTest + st + + <package> [[relation] version] +Tests if a package is installed in the system. Will exit(1) if it is not. + <relation> The version comparison operator. One of: + <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne + <version> The version to compare with + + + + Display information about a package + doInfo + in + + <package> +Displays information about a package. The package argument may be a +local package file, an URL to a package file, or the name of an +installed package. + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Remote.php b/_piecrust/libs/PEAR/Command/Remote.php new file mode 100644 index 0000000..74478d8 --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Remote.php @@ -0,0 +1,810 @@ + + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Remote.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ + +/** + * base class + */ +require_once 'PEAR/Command/Common.php'; +require_once 'PEAR/REST.php'; + +/** + * PEAR commands for remote server querying + * + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + */ +class PEAR_Command_Remote extends PEAR_Command_Common +{ + var $commands = array( + 'remote-info' => array( + 'summary' => 'Information About Remote Packages', + 'function' => 'doRemoteInfo', + 'shortcut' => 'ri', + 'options' => array(), + 'doc' => ' +Get details on a package from the server.', + ), + 'list-upgrades' => array( + 'summary' => 'List Available Upgrades', + 'function' => 'doListUpgrades', + 'shortcut' => 'lu', + 'options' => array( + 'channelinfo' => array( + 'shortopt' => 'i', + 'doc' => 'output fully channel-aware data, even on failure', + ), + ), + 'doc' => '[preferred_state] +List releases on the server of packages you have installed where +a newer version is available with the same release state (stable etc.) +or the state passed as the second parameter.' + ), + 'remote-list' => array( + 'summary' => 'List Remote Packages', + 'function' => 'doRemoteList', + 'shortcut' => 'rl', + 'options' => array( + 'channel' => + array( + 'shortopt' => 'c', + 'doc' => 'specify a channel other than the default channel', + 'arg' => 'CHAN', + ) + ), + 'doc' => ' +Lists the packages available on the configured server along with the +latest stable release of each package.', + ), + 'search' => array( + 'summary' => 'Search remote package database', + 'function' => 'doSearch', + 'shortcut' => 'sp', + 'options' => array( + 'channel' => + array( + 'shortopt' => 'c', + 'doc' => 'specify a channel other than the default channel', + 'arg' => 'CHAN', + ), + 'allchannels' => array( + 'shortopt' => 'a', + 'doc' => 'search packages from all known channels', + ), + 'channelinfo' => array( + 'shortopt' => 'i', + 'doc' => 'output fully channel-aware data, even on failure', + ), + ), + 'doc' => '[packagename] [packageinfo] +Lists all packages which match the search parameters. The first +parameter is a fragment of a packagename. The default channel +will be used unless explicitly overridden. The second parameter +will be used to match any portion of the summary/description', + ), + 'list-all' => array( + 'summary' => 'List All Packages', + 'function' => 'doListAll', + 'shortcut' => 'la', + 'options' => array( + 'channel' => + array( + 'shortopt' => 'c', + 'doc' => 'specify a channel other than the default channel', + 'arg' => 'CHAN', + ), + 'channelinfo' => array( + 'shortopt' => 'i', + 'doc' => 'output fully channel-aware data, even on failure', + ), + ), + 'doc' => ' +Lists the packages available on the configured server along with the +latest stable release of each package.', + ), + 'download' => array( + 'summary' => 'Download Package', + 'function' => 'doDownload', + 'shortcut' => 'd', + 'options' => array( + 'nocompress' => array( + 'shortopt' => 'Z', + 'doc' => 'download an uncompressed (.tar) file', + ), + ), + 'doc' => '... +Download package tarballs. The files will be named as suggested by the +server, for example if you download the DB package and the latest stable +version of DB is 1.6.5, the downloaded file will be DB-1.6.5.tgz.', + ), + 'clear-cache' => array( + 'summary' => 'Clear Web Services Cache', + 'function' => 'doClearCache', + 'shortcut' => 'cc', + 'options' => array(), + 'doc' => ' +Clear the REST cache. See also the cache_ttl configuration +parameter. +', + ), + ); + + /** + * PEAR_Command_Remote constructor. + * + * @access public + */ + function PEAR_Command_Remote(&$ui, &$config) + { + parent::PEAR_Command_Common($ui, $config); + } + + function _checkChannelForStatus($channel, $chan) + { + if (PEAR::isError($chan)) { + $this->raiseError($chan); + } + if (!is_a($chan, 'PEAR_ChannelFile')) { + return $this->raiseError('Internal corruption error: invalid channel "' . + $channel . '"'); + } + $rest = new PEAR_REST($this->config); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $mirror = $this->config->get('preferred_mirror', null, + $channel); + $a = $rest->downloadHttp('http://' . $channel . + '/channel.xml', $chan->lastModified()); + PEAR::staticPopErrorHandling(); + if (!PEAR::isError($a) && $a) { + $this->ui->outputData('WARNING: channel "' . $channel . '" has ' . + 'updated its protocols, use "' . PEAR_RUNTYPE . ' channel-update ' . $channel . + '" to update'); + } + } + + function doRemoteInfo($command, $options, $params) + { + if (sizeof($params) != 1) { + return $this->raiseError("$command expects one param: the remote package name"); + } + $savechannel = $channel = $this->config->get('default_channel'); + $reg = &$this->config->getRegistry(); + $package = $params[0]; + $parsed = $reg->parsePackageName($package, $channel); + if (PEAR::isError($parsed)) { + return $this->raiseError('Invalid package name "' . $package . '"'); + } + + $channel = $parsed['channel']; + $this->config->set('default_channel', $channel); + $chan = $reg->getChannel($channel); + if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) { + return $e; + } + + $mirror = $this->config->get('preferred_mirror'); + if ($chan->supportsREST($mirror) && $base = $chan->getBaseURL('REST1.0', $mirror)) { + $rest = &$this->config->getREST('1.0', array()); + $info = $rest->packageInfo($base, $parsed['package'], $channel); + } + + if (!isset($info)) { + return $this->raiseError('No supported protocol was found'); + } + + if (PEAR::isError($info)) { + $this->config->set('default_channel', $savechannel); + return $this->raiseError($info); + } + + if (!isset($info['name'])) { + return $this->raiseError('No remote package "' . $package . '" was found'); + } + + $installed = $reg->packageInfo($info['name'], null, $channel); + $info['installed'] = $installed['version'] ? $installed['version'] : '- no -'; + if (is_array($info['installed'])) { + $info['installed'] = $info['installed']['release']; + } + + $this->ui->outputData($info, $command); + $this->config->set('default_channel', $savechannel); + + return true; + } + + function doRemoteList($command, $options, $params) + { + $savechannel = $channel = $this->config->get('default_channel'); + $reg = &$this->config->getRegistry(); + if (isset($options['channel'])) { + $channel = $options['channel']; + if (!$reg->channelExists($channel)) { + return $this->raiseError('Channel "' . $channel . '" does not exist'); + } + + $this->config->set('default_channel', $channel); + } + + $chan = $reg->getChannel($channel); + if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) { + return $e; + } + + $list_options = false; + if ($this->config->get('preferred_state') == 'stable') { + $list_options = true; + } + + $available = array(); + if ($chan->supportsREST($this->config->get('preferred_mirror')) && + $base = $chan->getBaseURL('REST1.1', $this->config->get('preferred_mirror')) + ) { + // use faster list-all if available + $rest = &$this->config->getREST('1.1', array()); + $available = $rest->listAll($base, $list_options, true, false, false, $chan->getName()); + } elseif ($chan->supportsREST($this->config->get('preferred_mirror')) && + $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) { + $rest = &$this->config->getREST('1.0', array()); + $available = $rest->listAll($base, $list_options, true, false, false, $chan->getName()); + } + + if (PEAR::isError($available)) { + $this->config->set('default_channel', $savechannel); + return $this->raiseError($available); + } + + $i = $j = 0; + $data = array( + 'caption' => 'Channel ' . $channel . ' Available packages:', + 'border' => true, + 'headline' => array('Package', 'Version'), + 'channel' => $channel + ); + + if (count($available) == 0) { + $data = '(no packages available yet)'; + } else { + foreach ($available as $name => $info) { + $version = (isset($info['stable']) && $info['stable']) ? $info['stable'] : '-n/a-'; + $data['data'][] = array($name, $version); + } + } + $this->ui->outputData($data, $command); + $this->config->set('default_channel', $savechannel); + return true; + } + + function doListAll($command, $options, $params) + { + $savechannel = $channel = $this->config->get('default_channel'); + $reg = &$this->config->getRegistry(); + if (isset($options['channel'])) { + $channel = $options['channel']; + if (!$reg->channelExists($channel)) { + return $this->raiseError("Channel \"$channel\" does not exist"); + } + + $this->config->set('default_channel', $channel); + } + + $list_options = false; + if ($this->config->get('preferred_state') == 'stable') { + $list_options = true; + } + + $chan = $reg->getChannel($channel); + if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) { + return $e; + } + + if ($chan->supportsREST($this->config->get('preferred_mirror')) && + $base = $chan->getBaseURL('REST1.1', $this->config->get('preferred_mirror'))) { + // use faster list-all if available + $rest = &$this->config->getREST('1.1', array()); + $available = $rest->listAll($base, $list_options, false, false, false, $chan->getName()); + } elseif ($chan->supportsREST($this->config->get('preferred_mirror')) && + $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) { + $rest = &$this->config->getREST('1.0', array()); + $available = $rest->listAll($base, $list_options, false, false, false, $chan->getName()); + } + + if (PEAR::isError($available)) { + $this->config->set('default_channel', $savechannel); + return $this->raiseError('The package list could not be fetched from the remote server. Please try again. (Debug info: "' . $available->getMessage() . '")'); + } + + $data = array( + 'caption' => 'All packages [Channel ' . $channel . ']:', + 'border' => true, + 'headline' => array('Package', 'Latest', 'Local'), + 'channel' => $channel, + ); + + if (isset($options['channelinfo'])) { + // add full channelinfo + $data['caption'] = 'Channel ' . $channel . ' All packages:'; + $data['headline'] = array('Channel', 'Package', 'Latest', 'Local', + 'Description', 'Dependencies'); + } + $local_pkgs = $reg->listPackages($channel); + + foreach ($available as $name => $info) { + $installed = $reg->packageInfo($name, null, $channel); + if (is_array($installed['version'])) { + $installed['version'] = $installed['version']['release']; + } + $desc = $info['summary']; + if (isset($params[$name])) { + $desc .= "\n\n".$info['description']; + } + if (isset($options['mode'])) + { + if ($options['mode'] == 'installed' && !isset($installed['version'])) { + continue; + } + if ($options['mode'] == 'notinstalled' && isset($installed['version'])) { + continue; + } + if ($options['mode'] == 'upgrades' + && (!isset($installed['version']) || version_compare($installed['version'], + $info['stable'], '>='))) { + continue; + } + } + $pos = array_search(strtolower($name), $local_pkgs); + if ($pos !== false) { + unset($local_pkgs[$pos]); + } + + if (isset($info['stable']) && !$info['stable']) { + $info['stable'] = null; + } + + if (isset($options['channelinfo'])) { + // add full channelinfo + if ($info['stable'] === $info['unstable']) { + $state = $info['state']; + } else { + $state = 'stable'; + } + $latest = $info['stable'].' ('.$state.')'; + $local = ''; + if (isset($installed['version'])) { + $inst_state = $reg->packageInfo($name, 'release_state', $channel); + $local = $installed['version'].' ('.$inst_state.')'; + } + + $packageinfo = array( + $channel, + $name, + $latest, + $local, + isset($desc) ? $desc : null, + isset($info['deps']) ? $info['deps'] : null, + ); + } else { + $packageinfo = array( + $reg->channelAlias($channel) . '/' . $name, + isset($info['stable']) ? $info['stable'] : null, + isset($installed['version']) ? $installed['version'] : null, + isset($desc) ? $desc : null, + isset($info['deps']) ? $info['deps'] : null, + ); + } + $data['data'][$info['category']][] = $packageinfo; + } + + if (isset($options['mode']) && in_array($options['mode'], array('notinstalled', 'upgrades'))) { + $this->config->set('default_channel', $savechannel); + $this->ui->outputData($data, $command); + return true; + } + + foreach ($local_pkgs as $name) { + $info = &$reg->getPackage($name, $channel); + $data['data']['Local'][] = array( + $reg->channelAlias($channel) . '/' . $info->getPackage(), + '', + $info->getVersion(), + $info->getSummary(), + $info->getDeps() + ); + } + + $this->config->set('default_channel', $savechannel); + $this->ui->outputData($data, $command); + return true; + } + + function doSearch($command, $options, $params) + { + if ((!isset($params[0]) || empty($params[0])) + && (!isset($params[1]) || empty($params[1]))) + { + return $this->raiseError('no valid search string supplied'); + } + + $channelinfo = isset($options['channelinfo']); + $reg = &$this->config->getRegistry(); + if (isset($options['allchannels'])) { + // search all channels + unset($options['allchannels']); + $channels = $reg->getChannels(); + $errors = array(); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + foreach ($channels as $channel) { + if ($channel->getName() != '__uri') { + $options['channel'] = $channel->getName(); + $ret = $this->doSearch($command, $options, $params); + if (PEAR::isError($ret)) { + $errors[] = $ret; + } + } + } + + PEAR::staticPopErrorHandling(); + if (count($errors) !== 0) { + // for now, only give first error + return PEAR::raiseError($errors[0]); + } + + return true; + } + + $savechannel = $channel = $this->config->get('default_channel'); + $package = strtolower($params[0]); + $summary = isset($params[1]) ? $params[1] : false; + if (isset($options['channel'])) { + $reg = &$this->config->getRegistry(); + $channel = $options['channel']; + if (!$reg->channelExists($channel)) { + return $this->raiseError('Channel "' . $channel . '" does not exist'); + } + + $this->config->set('default_channel', $channel); + } + + $chan = $reg->getChannel($channel); + if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) { + return $e; + } + + if ($chan->supportsREST($this->config->get('preferred_mirror')) && + $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) { + $rest = &$this->config->getREST('1.0', array()); + $available = $rest->listAll($base, false, false, $package, $summary, $chan->getName()); + } + + if (PEAR::isError($available)) { + $this->config->set('default_channel', $savechannel); + return $this->raiseError($available); + } + + if (!$available && !$channelinfo) { + // clean exit when not found, no error ! + $data = 'no packages found that match pattern "' . $package . '", for channel '.$channel.'.'; + $this->ui->outputData($data); + $this->config->set('default_channel', $channel); + return true; + } + + if ($channelinfo) { + $data = array( + 'caption' => 'Matched packages, channel ' . $channel . ':', + 'border' => true, + 'headline' => array('Channel', 'Package', 'Stable/(Latest)', 'Local'), + 'channel' => $channel + ); + } else { + $data = array( + 'caption' => 'Matched packages, channel ' . $channel . ':', + 'border' => true, + 'headline' => array('Package', 'Stable/(Latest)', 'Local'), + 'channel' => $channel + ); + } + + if (!$available && $channelinfo) { + unset($data['headline']); + $data['data'] = 'No packages found that match pattern "' . $package . '".'; + $available = array(); + } + + foreach ($available as $name => $info) { + $installed = $reg->packageInfo($name, null, $channel); + $desc = $info['summary']; + if (isset($params[$name])) + $desc .= "\n\n".$info['description']; + + if (!isset($info['stable']) || !$info['stable']) { + $version_remote = 'none'; + } else { + if ($info['unstable']) { + $version_remote = $info['unstable']; + } else { + $version_remote = $info['stable']; + } + $version_remote .= ' ('.$info['state'].')'; + } + $version = is_array($installed['version']) ? $installed['version']['release'] : + $installed['version']; + if ($channelinfo) { + $packageinfo = array( + $channel, + $name, + $version_remote, + $version, + $desc, + ); + } else { + $packageinfo = array( + $name, + $version_remote, + $version, + $desc, + ); + } + $data['data'][$info['category']][] = $packageinfo; + } + + $this->ui->outputData($data, $command); + $this->config->set('default_channel', $channel); + return true; + } + + function &getDownloader($options) + { + if (!class_exists('PEAR_Downloader')) { + require_once 'PEAR/Downloader.php'; + } + $a = &new PEAR_Downloader($this->ui, $options, $this->config); + return $a; + } + + function doDownload($command, $options, $params) + { + // make certain that dependencies are ignored + $options['downloadonly'] = 1; + + // eliminate error messages for preferred_state-related errors + /* TODO: Should be an option, but until now download does respect + prefered state */ + /* $options['ignorepreferred_state'] = 1; */ + // eliminate error messages for preferred_state-related errors + + $downloader = &$this->getDownloader($options); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $e = $downloader->setDownloadDir(getcwd()); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($e)) { + return $this->raiseError('Current directory is not writeable, cannot download'); + } + + $errors = array(); + $downloaded = array(); + $err = $downloader->download($params); + if (PEAR::isError($err)) { + return $err; + } + + $errors = $downloader->getErrorMsgs(); + if (count($errors)) { + foreach ($errors as $error) { + if ($error !== null) { + $this->ui->outputData($error); + } + } + + return $this->raiseError("$command failed"); + } + + $downloaded = $downloader->getDownloadedPackages(); + foreach ($downloaded as $pkg) { + $this->ui->outputData("File $pkg[file] downloaded", $command); + } + + return true; + } + + function downloadCallback($msg, $params = null) + { + if ($msg == 'done') { + $this->bytes_downloaded = $params; + } + } + + function doListUpgrades($command, $options, $params) + { + require_once 'PEAR/Common.php'; + if (isset($params[0]) && !is_array(PEAR_Common::betterStates($params[0]))) { + return $this->raiseError($params[0] . ' is not a valid state (stable/beta/alpha/devel/etc.) try "pear help list-upgrades"'); + } + + $savechannel = $channel = $this->config->get('default_channel'); + $reg = &$this->config->getRegistry(); + foreach ($reg->listChannels() as $channel) { + $inst = array_flip($reg->listPackages($channel)); + if (!count($inst)) { + continue; + } + + if ($channel == '__uri') { + continue; + } + + $this->config->set('default_channel', $channel); + $state = empty($params[0]) ? $this->config->get('preferred_state') : $params[0]; + + $caption = $channel . ' Available Upgrades'; + $chan = $reg->getChannel($channel); + if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) { + return $e; + } + + $latest = array(); + $base2 = false; + $preferred_mirror = $this->config->get('preferred_mirror'); + if ($chan->supportsREST($preferred_mirror) && + ( + //($base2 = $chan->getBaseURL('REST1.4', $preferred_mirror)) || + ($base = $chan->getBaseURL('REST1.0', $preferred_mirror)) + ) + + ) { + if ($base2) { + $rest = &$this->config->getREST('1.4', array()); + $base = $base2; + } else { + $rest = &$this->config->getREST('1.0', array()); + } + + if (empty($state) || $state == 'any') { + $state = false; + } else { + $caption .= ' (' . implode(', ', PEAR_Common::betterStates($state, true)) . ')'; + } + + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $latest = $rest->listLatestUpgrades($base, $state, $inst, $channel, $reg); + PEAR::staticPopErrorHandling(); + } + + if (PEAR::isError($latest)) { + $this->ui->outputData($latest->getMessage()); + continue; + } + + $caption .= ':'; + if (PEAR::isError($latest)) { + $this->config->set('default_channel', $savechannel); + return $latest; + } + + $data = array( + 'caption' => $caption, + 'border' => 1, + 'headline' => array('Channel', 'Package', 'Local', 'Remote', 'Size'), + 'channel' => $channel + ); + + foreach ((array)$latest as $pkg => $info) { + $package = strtolower($pkg); + if (!isset($inst[$package])) { + // skip packages we don't have installed + continue; + } + + extract($info); + $inst_version = $reg->packageInfo($package, 'version', $channel); + $inst_state = $reg->packageInfo($package, 'release_state', $channel); + if (version_compare("$version", "$inst_version", "le")) { + // installed version is up-to-date + continue; + } + + if ($filesize >= 20480) { + $filesize += 1024 - ($filesize % 1024); + $fs = sprintf("%dkB", $filesize / 1024); + } elseif ($filesize > 0) { + $filesize += 103 - ($filesize % 103); + $fs = sprintf("%.1fkB", $filesize / 1024.0); + } else { + $fs = " -"; // XXX center instead + } + + $data['data'][] = array($channel, $pkg, "$inst_version ($inst_state)", "$version ($state)", $fs); + } + + if (isset($options['channelinfo'])) { + if (empty($data['data'])) { + unset($data['headline']); + if (count($inst) == 0) { + $data['data'] = '(no packages installed)'; + } else { + $data['data'] = '(no upgrades available)'; + } + } + $this->ui->outputData($data, $command); + } else { + if (empty($data['data'])) { + $this->ui->outputData('Channel ' . $channel . ': No upgrades available'); + } else { + $this->ui->outputData($data, $command); + } + } + } + + $this->config->set('default_channel', $savechannel); + return true; + } + + function doClearCache($command, $options, $params) + { + $cache_dir = $this->config->get('cache_dir'); + $verbose = $this->config->get('verbose'); + $output = ''; + if (!file_exists($cache_dir) || !is_dir($cache_dir)) { + return $this->raiseError("$cache_dir does not exist or is not a directory"); + } + + if (!($dp = @opendir($cache_dir))) { + return $this->raiseError("opendir($cache_dir) failed: $php_errormsg"); + } + + if ($verbose >= 1) { + $output .= "reading directory $cache_dir\n"; + } + + $num = 0; + while ($ent = readdir($dp)) { + if (preg_match('/rest.cache(file|id)\\z/', $ent)) { + $path = $cache_dir . DIRECTORY_SEPARATOR . $ent; + if (file_exists($path)) { + $ok = @unlink($path); + } else { + $ok = false; + $php_errormsg = ''; + } + + if ($ok) { + if ($verbose >= 2) { + $output .= "deleted $path\n"; + } + $num++; + } elseif ($verbose >= 1) { + $output .= "failed to delete $path $php_errormsg\n"; + } + } + } + + closedir($dp); + if ($verbose >= 1) { + $output .= "$num cache entries cleared\n"; + } + + $this->ui->outputData(rtrim($output), $command); + return $num; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Remote.xml b/_piecrust/libs/PEAR/Command/Remote.xml new file mode 100644 index 0000000..b4f6100 --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Remote.xml @@ -0,0 +1,109 @@ + + + Information About Remote Packages + doRemoteInfo + ri + + <package> +Get details on a package from the server. + + + List Available Upgrades + doListUpgrades + lu + + + i + output fully channel-aware data, even on failure + + + [preferred_state] +List releases on the server of packages you have installed where +a newer version is available with the same release state (stable etc.) +or the state passed as the second parameter. + + + List Remote Packages + doRemoteList + rl + + + c + specify a channel other than the default channel + CHAN + + + +Lists the packages available on the configured server along with the +latest stable release of each package. + + + Search remote package database + doSearch + sp + + + c + specify a channel other than the default channel + CHAN + + + a + search packages from all known channels + + + i + output fully channel-aware data, even on failure + + + [packagename] [packageinfo] +Lists all packages which match the search parameters. The first +parameter is a fragment of a packagename. The default channel +will be used unless explicitly overridden. The second parameter +will be used to match any portion of the summary/description + + + List All Packages + doListAll + la + + + c + specify a channel other than the default channel + CHAN + + + i + output fully channel-aware data, even on failure + + + +Lists the packages available on the configured server along with the +latest stable release of each package. + + + Download Package + doDownload + d + + + Z + download an uncompressed (.tar) file + + + <package>... +Download package tarballs. The files will be named as suggested by the +server, for example if you download the DB package and the latest stable +version of DB is 1.6.5, the downloaded file will be DB-1.6.5.tgz. + + + Clear Web Services Cache + doClearCache + cc + + +Clear the XML-RPC/REST cache. See also the cache_ttl configuration +parameter. + + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Test.php b/_piecrust/libs/PEAR/Command/Test.php new file mode 100644 index 0000000..a757d9e --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Test.php @@ -0,0 +1,337 @@ + + * @author Martin Jansen + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Test.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ + +/** + * base class + */ +require_once 'PEAR/Command/Common.php'; + +/** + * PEAR commands for login/logout + * + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Martin Jansen + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + */ + +class PEAR_Command_Test extends PEAR_Command_Common +{ + var $commands = array( + 'run-tests' => array( + 'summary' => 'Run Regression Tests', + 'function' => 'doRunTests', + 'shortcut' => 'rt', + 'options' => array( + 'recur' => array( + 'shortopt' => 'r', + 'doc' => 'Run tests in child directories, recursively. 4 dirs deep maximum', + ), + 'ini' => array( + 'shortopt' => 'i', + 'doc' => 'actual string of settings to pass to php in format " -d setting=blah"', + 'arg' => 'SETTINGS' + ), + 'realtimelog' => array( + 'shortopt' => 'l', + 'doc' => 'Log test runs/results as they are run', + ), + 'quiet' => array( + 'shortopt' => 'q', + 'doc' => 'Only display detail for failed tests', + ), + 'simple' => array( + 'shortopt' => 's', + 'doc' => 'Display simple output for all tests', + ), + 'package' => array( + 'shortopt' => 'p', + 'doc' => 'Treat parameters as installed packages from which to run tests', + ), + 'phpunit' => array( + 'shortopt' => 'u', + 'doc' => 'Search parameters for AllTests.php, and use that to run phpunit-based tests +If none is found, all .phpt tests will be tried instead.', + ), + 'tapoutput' => array( + 'shortopt' => 't', + 'doc' => 'Output run-tests.log in TAP-compliant format', + ), + 'cgi' => array( + 'shortopt' => 'c', + 'doc' => 'CGI php executable (needed for tests with POST/GET section)', + 'arg' => 'PHPCGI', + ), + 'coverage' => array( + 'shortopt' => 'x', + 'doc' => 'Generate a code coverage report (requires Xdebug 2.0.0+)', + ), + ), + 'doc' => '[testfile|dir ...] +Run regression tests with PHP\'s regression testing script (run-tests.php).', + ), + ); + + var $output; + + /** + * PEAR_Command_Test constructor. + * + * @access public + */ + function PEAR_Command_Test(&$ui, &$config) + { + parent::PEAR_Command_Common($ui, $config); + } + + function doRunTests($command, $options, $params) + { + if (isset($options['phpunit']) && isset($options['tapoutput'])) { + return $this->raiseError('ERROR: cannot use both --phpunit and --tapoutput at the same time'); + } + + require_once 'PEAR/Common.php'; + require_once 'System.php'; + $log = new PEAR_Common; + $log->ui = &$this->ui; // slightly hacky, but it will work + $tests = array(); + $depth = isset($options['recur']) ? 14 : 1; + + if (!count($params)) { + $params[] = '.'; + } + + if (isset($options['package'])) { + $oldparams = $params; + $params = array(); + $reg = &$this->config->getRegistry(); + foreach ($oldparams as $param) { + $pname = $reg->parsePackageName($param, $this->config->get('default_channel')); + if (PEAR::isError($pname)) { + return $this->raiseError($pname); + } + + $package = &$reg->getPackage($pname['package'], $pname['channel']); + if (!$package) { + return PEAR::raiseError('Unknown package "' . + $reg->parsedPackageNameToString($pname) . '"'); + } + + $filelist = $package->getFilelist(); + foreach ($filelist as $name => $atts) { + if (isset($atts['role']) && $atts['role'] != 'test') { + continue; + } + + if (isset($options['phpunit']) && preg_match('/AllTests\.php\\z/i', $name)) { + $params[] = $atts['installed_as']; + continue; + } elseif (!preg_match('/\.phpt\\z/', $name)) { + continue; + } + $params[] = $atts['installed_as']; + } + } + } + + foreach ($params as $p) { + if (is_dir($p)) { + if (isset($options['phpunit'])) { + $dir = System::find(array($p, '-type', 'f', + '-maxdepth', $depth, + '-name', 'AllTests.php')); + if (count($dir)) { + foreach ($dir as $p) { + $p = realpath($p); + if (!count($tests) || + (count($tests) && strlen($p) < strlen($tests[0]))) { + // this is in a higher-level directory, use this one instead. + $tests = array($p); + } + } + } + continue; + } + + $args = array($p, '-type', 'f', '-name', '*.phpt'); + } else { + if (isset($options['phpunit'])) { + if (preg_match('/AllTests\.php\\z/i', $p)) { + $p = realpath($p); + if (!count($tests) || + (count($tests) && strlen($p) < strlen($tests[0]))) { + // this is in a higher-level directory, use this one instead. + $tests = array($p); + } + } + continue; + } + + if (file_exists($p) && preg_match('/\.phpt$/', $p)) { + $tests[] = $p; + continue; + } + + if (!preg_match('/\.phpt\\z/', $p)) { + $p .= '.phpt'; + } + + $args = array(dirname($p), '-type', 'f', '-name', $p); + } + + if (!isset($options['recur'])) { + $args[] = '-maxdepth'; + $args[] = 1; + } + + $dir = System::find($args); + $tests = array_merge($tests, $dir); + } + + $ini_settings = ''; + if (isset($options['ini'])) { + $ini_settings .= $options['ini']; + } + + if (isset($_ENV['TEST_PHP_INCLUDE_PATH'])) { + $ini_settings .= " -d include_path={$_ENV['TEST_PHP_INCLUDE_PATH']}"; + } + + if ($ini_settings) { + $this->ui->outputData('Using INI settings: "' . $ini_settings . '"'); + } + + $skipped = $passed = $failed = array(); + $tests_count = count($tests); + $this->ui->outputData('Running ' . $tests_count . ' tests', $command); + $start = time(); + if (isset($options['realtimelog']) && file_exists('run-tests.log')) { + unlink('run-tests.log'); + } + + if (isset($options['tapoutput'])) { + $tap = '1..' . $tests_count . "\n"; + } + + require_once 'PEAR/RunTest.php'; + $run = new PEAR_RunTest($log, $options); + $run->tests_count = $tests_count; + + if (isset($options['coverage']) && extension_loaded('xdebug')){ + $run->xdebug_loaded = true; + } else { + $run->xdebug_loaded = false; + } + + $j = $i = 1; + foreach ($tests as $t) { + if (isset($options['realtimelog'])) { + $fp = @fopen('run-tests.log', 'a'); + if ($fp) { + fwrite($fp, "Running test [$i / $tests_count] $t..."); + fclose($fp); + } + } + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + if (isset($options['phpunit'])) { + $result = $run->runPHPUnit($t, $ini_settings); + } else { + $result = $run->run($t, $ini_settings, $j); + } + PEAR::staticPopErrorHandling(); + if (PEAR::isError($result)) { + $this->ui->log($result->getMessage()); + continue; + } + + if (isset($options['tapoutput'])) { + $tap .= $result[0] . ' ' . $i . $result[1] . "\n"; + continue; + } + + if (isset($options['realtimelog'])) { + $fp = @fopen('run-tests.log', 'a'); + if ($fp) { + fwrite($fp, "$result\n"); + fclose($fp); + } + } + + if ($result == 'FAILED') { + $failed[] = $t; + } + if ($result == 'PASSED') { + $passed[] = $t; + } + if ($result == 'SKIPPED') { + $skipped[] = $t; + } + + $j++; + } + + $total = date('i:s', time() - $start); + if (isset($options['tapoutput'])) { + $fp = @fopen('run-tests.log', 'w'); + if ($fp) { + fwrite($fp, $tap, strlen($tap)); + fclose($fp); + $this->ui->outputData('wrote TAP-format log to "' .realpath('run-tests.log') . + '"', $command); + } + } else { + if (count($failed)) { + $output = "TOTAL TIME: $total\n"; + $output .= count($passed) . " PASSED TESTS\n"; + $output .= count($skipped) . " SKIPPED TESTS\n"; + $output .= count($failed) . " FAILED TESTS:\n"; + foreach ($failed as $failure) { + $output .= $failure . "\n"; + } + + $mode = isset($options['realtimelog']) ? 'a' : 'w'; + $fp = @fopen('run-tests.log', $mode); + + if ($fp) { + fwrite($fp, $output, strlen($output)); + fclose($fp); + $this->ui->outputData('wrote log to "' . realpath('run-tests.log') . '"', $command); + } + } elseif (file_exists('run-tests.log') && !is_dir('run-tests.log')) { + @unlink('run-tests.log'); + } + } + $this->ui->outputData('TOTAL TIME: ' . $total); + $this->ui->outputData(count($passed) . ' PASSED TESTS', $command); + $this->ui->outputData(count($skipped) . ' SKIPPED TESTS', $command); + if (count($failed)) { + $this->ui->outputData(count($failed) . ' FAILED TESTS:', $command); + foreach ($failed as $failure) { + $this->ui->outputData($failure, $command); + } + } + + return true; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Test.xml b/_piecrust/libs/PEAR/Command/Test.xml new file mode 100644 index 0000000..bbe9fcc --- /dev/null +++ b/_piecrust/libs/PEAR/Command/Test.xml @@ -0,0 +1,54 @@ + + + Run Regression Tests + doRunTests + rt + + + r + Run tests in child directories, recursively. 4 dirs deep maximum + + + i + actual string of settings to pass to php in format " -d setting=blah" + SETTINGS + + + l + Log test runs/results as they are run + + + q + Only display detail for failed tests + + + s + Display simple output for all tests + + + p + Treat parameters as installed packages from which to run tests + + + u + Search parameters for AllTests.php, and use that to run phpunit-based tests +If none is found, all .phpt tests will be tried instead. + + + t + Output run-tests.log in TAP-compliant format + + + c + CGI php executable (needed for tests with POST/GET section) + PHPCGI + + + x + Generate a code coverage report (requires Xdebug 2.0.0+) + + + [testfile|dir ...] +Run regression tests with PHP's regression testing script (run-tests.php). + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Common.php b/_piecrust/libs/PEAR/Common.php new file mode 100644 index 0000000..3a8c7e8 --- /dev/null +++ b/_piecrust/libs/PEAR/Common.php @@ -0,0 +1,837 @@ + + * @author Tomas V. V. Cox + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Common.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1.0 + * @deprecated File deprecated since Release 1.4.0a1 + */ + +/** + * Include error handling + */ +require_once 'PEAR.php'; + +/** + * PEAR_Common error when an invalid PHP file is passed to PEAR_Common::analyzeSourceCode() + */ +define('PEAR_COMMON_ERROR_INVALIDPHP', 1); +define('_PEAR_COMMON_PACKAGE_NAME_PREG', '[A-Za-z][a-zA-Z0-9_]+'); +define('PEAR_COMMON_PACKAGE_NAME_PREG', '/^' . _PEAR_COMMON_PACKAGE_NAME_PREG . '\\z/'); + +// this should allow: 1, 1.0, 1.0RC1, 1.0dev, 1.0dev123234234234, 1.0a1, 1.0b1, 1.0pl1 +define('_PEAR_COMMON_PACKAGE_VERSION_PREG', '\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?'); +define('PEAR_COMMON_PACKAGE_VERSION_PREG', '/^' . _PEAR_COMMON_PACKAGE_VERSION_PREG . '\\z/i'); + +// XXX far from perfect :-) +define('_PEAR_COMMON_PACKAGE_DOWNLOAD_PREG', '(' . _PEAR_COMMON_PACKAGE_NAME_PREG . + ')(-([.0-9a-zA-Z]+))?'); +define('PEAR_COMMON_PACKAGE_DOWNLOAD_PREG', '/^' . _PEAR_COMMON_PACKAGE_DOWNLOAD_PREG . + '\\z/'); + +define('_PEAR_CHANNELS_NAME_PREG', '[A-Za-z][a-zA-Z0-9\.]+'); +define('PEAR_CHANNELS_NAME_PREG', '/^' . _PEAR_CHANNELS_NAME_PREG . '\\z/'); + +// this should allow any dns or IP address, plus a path - NO UNDERSCORES ALLOWED +define('_PEAR_CHANNELS_SERVER_PREG', '[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*(\/[a-zA-Z0-9\-]+)*'); +define('PEAR_CHANNELS_SERVER_PREG', '/^' . _PEAR_CHANNELS_SERVER_PREG . '\\z/i'); + +define('_PEAR_CHANNELS_PACKAGE_PREG', '(' ._PEAR_CHANNELS_SERVER_PREG . ')\/(' + . _PEAR_COMMON_PACKAGE_NAME_PREG . ')'); +define('PEAR_CHANNELS_PACKAGE_PREG', '/^' . _PEAR_CHANNELS_PACKAGE_PREG . '\\z/i'); + +define('_PEAR_COMMON_CHANNEL_DOWNLOAD_PREG', '(' . _PEAR_CHANNELS_NAME_PREG . ')::(' + . _PEAR_COMMON_PACKAGE_NAME_PREG . ')(-([.0-9a-zA-Z]+))?'); +define('PEAR_COMMON_CHANNEL_DOWNLOAD_PREG', '/^' . _PEAR_COMMON_CHANNEL_DOWNLOAD_PREG . '\\z/'); + +/** + * List of temporary files and directories registered by + * PEAR_Common::addTempFile(). + * @var array + */ +$GLOBALS['_PEAR_Common_tempfiles'] = array(); + +/** + * Valid maintainer roles + * @var array + */ +$GLOBALS['_PEAR_Common_maintainer_roles'] = array('lead','developer','contributor','helper'); + +/** + * Valid release states + * @var array + */ +$GLOBALS['_PEAR_Common_release_states'] = array('alpha','beta','stable','snapshot','devel'); + +/** + * Valid dependency types + * @var array + */ +$GLOBALS['_PEAR_Common_dependency_types'] = array('pkg','ext','php','prog','ldlib','rtlib','os','websrv','sapi'); + +/** + * Valid dependency relations + * @var array + */ +$GLOBALS['_PEAR_Common_dependency_relations'] = array('has','eq','lt','le','gt','ge','not', 'ne'); + +/** + * Valid file roles + * @var array + */ +$GLOBALS['_PEAR_Common_file_roles'] = array('php','ext','test','doc','data','src','script'); + +/** + * Valid replacement types + * @var array + */ +$GLOBALS['_PEAR_Common_replacement_types'] = array('php-const', 'pear-config', 'package-info'); + +/** + * Valid "provide" types + * @var array + */ +$GLOBALS['_PEAR_Common_provide_types'] = array('ext', 'prog', 'class', 'function', 'feature', 'api'); + +/** + * Valid "provide" types + * @var array + */ +$GLOBALS['_PEAR_Common_script_phases'] = array('pre-install', 'post-install', 'pre-uninstall', 'post-uninstall', 'pre-build', 'post-build', 'pre-configure', 'post-configure', 'pre-setup', 'post-setup'); + +/** + * Class providing common functionality for PEAR administration classes. + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Tomas V. V. Cox + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + * @deprecated This class will disappear, and its components will be spread + * into smaller classes, like the AT&T breakup, as of Release 1.4.0a1 + */ +class PEAR_Common extends PEAR +{ + /** + * User Interface object (PEAR_Frontend_* class). If null, + * the log() method uses print. + * @var object + */ + var $ui = null; + + /** + * Configuration object (PEAR_Config). + * @var PEAR_Config + */ + var $config = null; + + /** stack of elements, gives some sort of XML context */ + var $element_stack = array(); + + /** name of currently parsed XML element */ + var $current_element; + + /** array of attributes of the currently parsed XML element */ + var $current_attributes = array(); + + /** assoc with information about a package */ + var $pkginfo = array(); + + var $current_path = null; + + /** + * Flag variable used to mark a valid package file + * @var boolean + * @access private + */ + var $_validPackageFile; + + /** + * PEAR_Common constructor + * + * @access public + */ + function PEAR_Common() + { + parent::PEAR(); + $this->config = &PEAR_Config::singleton(); + $this->debug = $this->config->get('verbose'); + } + + /** + * PEAR_Common destructor + * + * @access private + */ + function _PEAR_Common() + { + // doesn't work due to bug #14744 + //$tempfiles = $this->_tempfiles; + $tempfiles =& $GLOBALS['_PEAR_Common_tempfiles']; + while ($file = array_shift($tempfiles)) { + if (@is_dir($file)) { + if (!class_exists('System')) { + require_once 'System.php'; + } + + System::rm(array('-rf', $file)); + } elseif (file_exists($file)) { + unlink($file); + } + } + } + + /** + * Register a temporary file or directory. When the destructor is + * executed, all registered temporary files and directories are + * removed. + * + * @param string $file name of file or directory + * + * @return void + * + * @access public + */ + function addTempFile($file) + { + if (!class_exists('PEAR_Frontend')) { + require_once 'PEAR/Frontend.php'; + } + PEAR_Frontend::addTempFile($file); + } + + /** + * Wrapper to System::mkDir(), creates a directory as well as + * any necessary parent directories. + * + * @param string $dir directory name + * + * @return bool TRUE on success, or a PEAR error + * + * @access public + */ + function mkDirHier($dir) + { + // Only used in Installer - move it there ? + $this->log(2, "+ create dir $dir"); + if (!class_exists('System')) { + require_once 'System.php'; + } + return System::mkDir(array('-p', $dir)); + } + + /** + * Logging method. + * + * @param int $level log level (0 is quiet, higher is noisier) + * @param string $msg message to write to the log + * + * @return void + * + * @access public + * @static + */ + function log($level, $msg, $append_crlf = true) + { + if ($this->debug >= $level) { + if (!class_exists('PEAR_Frontend')) { + require_once 'PEAR/Frontend.php'; + } + + $ui = &PEAR_Frontend::singleton(); + if (is_a($ui, 'PEAR_Frontend')) { + $ui->log($msg, $append_crlf); + } else { + print "$msg\n"; + } + } + } + + /** + * Create and register a temporary directory. + * + * @param string $tmpdir (optional) Directory to use as tmpdir. + * Will use system defaults (for example + * /tmp or c:\windows\temp) if not specified + * + * @return string name of created directory + * + * @access public + */ + function mkTempDir($tmpdir = '') + { + $topt = $tmpdir ? array('-t', $tmpdir) : array(); + $topt = array_merge($topt, array('-d', 'pear')); + if (!class_exists('System')) { + require_once 'System.php'; + } + + if (!$tmpdir = System::mktemp($topt)) { + return false; + } + + $this->addTempFile($tmpdir); + return $tmpdir; + } + + /** + * Set object that represents the frontend to be used. + * + * @param object Reference of the frontend object + * @return void + * @access public + */ + function setFrontendObject(&$ui) + { + $this->ui = &$ui; + } + + /** + * Return an array containing all of the states that are more stable than + * or equal to the passed in state + * + * @param string Release state + * @param boolean Determines whether to include $state in the list + * @return false|array False if $state is not a valid release state + */ + function betterStates($state, $include = false) + { + static $states = array('snapshot', 'devel', 'alpha', 'beta', 'stable'); + $i = array_search($state, $states); + if ($i === false) { + return false; + } + if ($include) { + $i--; + } + return array_slice($states, $i + 1); + } + + /** + * Get the valid roles for a PEAR package maintainer + * + * @return array + * @static + */ + function getUserRoles() + { + return $GLOBALS['_PEAR_Common_maintainer_roles']; + } + + /** + * Get the valid package release states of packages + * + * @return array + * @static + */ + function getReleaseStates() + { + return $GLOBALS['_PEAR_Common_release_states']; + } + + /** + * Get the implemented dependency types (php, ext, pkg etc.) + * + * @return array + * @static + */ + function getDependencyTypes() + { + return $GLOBALS['_PEAR_Common_dependency_types']; + } + + /** + * Get the implemented dependency relations (has, lt, ge etc.) + * + * @return array + * @static + */ + function getDependencyRelations() + { + return $GLOBALS['_PEAR_Common_dependency_relations']; + } + + /** + * Get the implemented file roles + * + * @return array + * @static + */ + function getFileRoles() + { + return $GLOBALS['_PEAR_Common_file_roles']; + } + + /** + * Get the implemented file replacement types in + * + * @return array + * @static + */ + function getReplacementTypes() + { + return $GLOBALS['_PEAR_Common_replacement_types']; + } + + /** + * Get the implemented file replacement types in + * + * @return array + * @static + */ + function getProvideTypes() + { + return $GLOBALS['_PEAR_Common_provide_types']; + } + + /** + * Get the implemented file replacement types in + * + * @return array + * @static + */ + function getScriptPhases() + { + return $GLOBALS['_PEAR_Common_script_phases']; + } + + /** + * Test whether a string contains a valid package name. + * + * @param string $name the package name to test + * + * @return bool + * + * @access public + */ + function validPackageName($name) + { + return (bool)preg_match(PEAR_COMMON_PACKAGE_NAME_PREG, $name); + } + + /** + * Test whether a string contains a valid package version. + * + * @param string $ver the package version to test + * + * @return bool + * + * @access public + */ + function validPackageVersion($ver) + { + return (bool)preg_match(PEAR_COMMON_PACKAGE_VERSION_PREG, $ver); + } + + /** + * @param string $path relative or absolute include path + * @return boolean + * @static + */ + function isIncludeable($path) + { + if (file_exists($path) && is_readable($path)) { + return true; + } + + $ipath = explode(PATH_SEPARATOR, ini_get('include_path')); + foreach ($ipath as $include) { + $test = realpath($include . DIRECTORY_SEPARATOR . $path); + if (file_exists($test) && is_readable($test)) { + return true; + } + } + + return false; + } + + function _postProcessChecks($pf) + { + if (!PEAR::isError($pf)) { + return $this->_postProcessValidPackagexml($pf); + } + + $errs = $pf->getUserinfo(); + if (is_array($errs)) { + foreach ($errs as $error) { + $e = $this->raiseError($error['message'], $error['code'], null, null, $error); + } + } + + return $pf; + } + + /** + * Returns information about a package file. Expects the name of + * a gzipped tar file as input. + * + * @param string $file name of .tgz file + * + * @return array array with package information + * + * @access public + * @deprecated use PEAR_PackageFile->fromTgzFile() instead + * + */ + function infoFromTgzFile($file) + { + $packagefile = &new PEAR_PackageFile($this->config); + $pf = &$packagefile->fromTgzFile($file, PEAR_VALIDATE_NORMAL); + return $this->_postProcessChecks($pf); + } + + /** + * Returns information about a package file. Expects the name of + * a package xml file as input. + * + * @param string $descfile name of package xml file + * + * @return array array with package information + * + * @access public + * @deprecated use PEAR_PackageFile->fromPackageFile() instead + * + */ + function infoFromDescriptionFile($descfile) + { + $packagefile = &new PEAR_PackageFile($this->config); + $pf = &$packagefile->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL); + return $this->_postProcessChecks($pf); + } + + /** + * Returns information about a package file. Expects the contents + * of a package xml file as input. + * + * @param string $data contents of package.xml file + * + * @return array array with package information + * + * @access public + * @deprecated use PEAR_PackageFile->fromXmlstring() instead + * + */ + function infoFromString($data) + { + $packagefile = &new PEAR_PackageFile($this->config); + $pf = &$packagefile->fromXmlString($data, PEAR_VALIDATE_NORMAL, false); + return $this->_postProcessChecks($pf); + } + + /** + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @return array + */ + function _postProcessValidPackagexml(&$pf) + { + if (!is_a($pf, 'PEAR_PackageFile_v2')) { + $this->pkginfo = $pf->toArray(); + return $this->pkginfo; + } + + // sort of make this into a package.xml 1.0-style array + // changelog is not converted to old format. + $arr = $pf->toArray(true); + $arr = array_merge($arr, $arr['old']); + unset($arr['old'], $arr['xsdversion'], $arr['contents'], $arr['compatible'], + $arr['channel'], $arr['uri'], $arr['dependencies'], $arr['phprelease'], + $arr['extsrcrelease'], $arr['zendextsrcrelease'], $arr['extbinrelease'], + $arr['zendextbinrelease'], $arr['bundle'], $arr['lead'], $arr['developer'], + $arr['helper'], $arr['contributor']); + $arr['filelist'] = $pf->getFilelist(); + $this->pkginfo = $arr; + return $arr; + } + + /** + * Returns package information from different sources + * + * This method is able to extract information about a package + * from a .tgz archive or from a XML package definition file. + * + * @access public + * @param string Filename of the source ('package.xml', '.tgz') + * @return string + * @deprecated use PEAR_PackageFile->fromAnyFile() instead + */ + function infoFromAny($info) + { + if (is_string($info) && file_exists($info)) { + $packagefile = &new PEAR_PackageFile($this->config); + $pf = &$packagefile->fromAnyFile($info, PEAR_VALIDATE_NORMAL); + if (PEAR::isError($pf)) { + $errs = $pf->getUserinfo(); + if (is_array($errs)) { + foreach ($errs as $error) { + $e = $this->raiseError($error['message'], $error['code'], null, null, $error); + } + } + + return $pf; + } + + return $this->_postProcessValidPackagexml($pf); + } + + return $info; + } + + /** + * Return an XML document based on the package info (as returned + * by the PEAR_Common::infoFrom* methods). + * + * @param array $pkginfo package info + * + * @return string XML data + * + * @access public + * @deprecated use a PEAR_PackageFile_v* object's generator instead + */ + function xmlFromInfo($pkginfo) + { + $config = &PEAR_Config::singleton(); + $packagefile = &new PEAR_PackageFile($config); + $pf = &$packagefile->fromArray($pkginfo); + $gen = &$pf->getDefaultGenerator(); + return $gen->toXml(PEAR_VALIDATE_PACKAGING); + } + + /** + * Validate XML package definition file. + * + * @param string $info Filename of the package archive or of the + * package definition file + * @param array $errors Array that will contain the errors + * @param array $warnings Array that will contain the warnings + * @param string $dir_prefix (optional) directory where source files + * may be found, or empty if they are not available + * @access public + * @return boolean + * @deprecated use the validation of PEAR_PackageFile objects + */ + function validatePackageInfo($info, &$errors, &$warnings, $dir_prefix = '') + { + $config = &PEAR_Config::singleton(); + $packagefile = &new PEAR_PackageFile($config); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + if (strpos($info, 'fromXmlString($info, PEAR_VALIDATE_NORMAL, ''); + } else { + $pf = &$packagefile->fromAnyFile($info, PEAR_VALIDATE_NORMAL); + } + + PEAR::staticPopErrorHandling(); + if (PEAR::isError($pf)) { + $errs = $pf->getUserinfo(); + if (is_array($errs)) { + foreach ($errs as $error) { + if ($error['level'] == 'error') { + $errors[] = $error['message']; + } else { + $warnings[] = $error['message']; + } + } + } + + return false; + } + + return true; + } + + /** + * Build a "provides" array from data returned by + * analyzeSourceCode(). The format of the built array is like + * this: + * + * array( + * 'class;MyClass' => 'array('type' => 'class', 'name' => 'MyClass'), + * ... + * ) + * + * + * @param array $srcinfo array with information about a source file + * as returned by the analyzeSourceCode() method. + * + * @return void + * + * @access public + * + */ + function buildProvidesArray($srcinfo) + { + $file = basename($srcinfo['source_file']); + $pn = ''; + if (isset($this->_packageName)) { + $pn = $this->_packageName; + } + + $pnl = strlen($pn); + foreach ($srcinfo['declared_classes'] as $class) { + $key = "class;$class"; + if (isset($this->pkginfo['provides'][$key])) { + continue; + } + + $this->pkginfo['provides'][$key] = + array('file'=> $file, 'type' => 'class', 'name' => $class); + if (isset($srcinfo['inheritance'][$class])) { + $this->pkginfo['provides'][$key]['extends'] = + $srcinfo['inheritance'][$class]; + } + } + + foreach ($srcinfo['declared_methods'] as $class => $methods) { + foreach ($methods as $method) { + $function = "$class::$method"; + $key = "function;$function"; + if ($method{0} == '_' || !strcasecmp($method, $class) || + isset($this->pkginfo['provides'][$key])) { + continue; + } + + $this->pkginfo['provides'][$key] = + array('file'=> $file, 'type' => 'function', 'name' => $function); + } + } + + foreach ($srcinfo['declared_functions'] as $function) { + $key = "function;$function"; + if ($function{0} == '_' || isset($this->pkginfo['provides'][$key])) { + continue; + } + + if (!strstr($function, '::') && strncasecmp($function, $pn, $pnl)) { + $warnings[] = "in1 " . $file . ": function \"$function\" not prefixed with package name \"$pn\""; + } + + $this->pkginfo['provides'][$key] = + array('file'=> $file, 'type' => 'function', 'name' => $function); + } + } + + /** + * Analyze the source code of the given PHP file + * + * @param string Filename of the PHP file + * @return mixed + * @access public + */ + function analyzeSourceCode($file) + { + if (!class_exists('PEAR_PackageFile_v2_Validator')) { + require_once 'PEAR/PackageFile/v2/Validator.php'; + } + + $a = new PEAR_PackageFile_v2_Validator; + return $a->analyzeSourceCode($file); + } + + function detectDependencies($any, $status_callback = null) + { + if (!function_exists("token_get_all")) { + return false; + } + + if (PEAR::isError($info = $this->infoFromAny($any))) { + return $this->raiseError($info); + } + + if (!is_array($info)) { + return false; + } + + $deps = array(); + $used_c = $decl_c = $decl_f = $decl_m = array(); + foreach ($info['filelist'] as $file => $fa) { + $tmp = $this->analyzeSourceCode($file); + $used_c = @array_merge($used_c, $tmp['used_classes']); + $decl_c = @array_merge($decl_c, $tmp['declared_classes']); + $decl_f = @array_merge($decl_f, $tmp['declared_functions']); + $decl_m = @array_merge($decl_m, $tmp['declared_methods']); + $inheri = @array_merge($inheri, $tmp['inheritance']); + } + + $used_c = array_unique($used_c); + $decl_c = array_unique($decl_c); + $undecl_c = array_diff($used_c, $decl_c); + + return array('used_classes' => $used_c, + 'declared_classes' => $decl_c, + 'declared_methods' => $decl_m, + 'declared_functions' => $decl_f, + 'undeclared_classes' => $undecl_c, + 'inheritance' => $inheri, + ); + } + + /** + * Download a file through HTTP. Considers suggested file name in + * Content-disposition: header and can run a callback function for + * different events. The callback will be called with two + * parameters: the callback type, and parameters. The implemented + * callback types are: + * + * 'setup' called at the very beginning, parameter is a UI object + * that should be used for all output + * 'message' the parameter is a string with an informational message + * 'saveas' may be used to save with a different file name, the + * parameter is the filename that is about to be used. + * If a 'saveas' callback returns a non-empty string, + * that file name will be used as the filename instead. + * Note that $save_dir will not be affected by this, only + * the basename of the file. + * 'start' download is starting, parameter is number of bytes + * that are expected, or -1 if unknown + * 'bytesread' parameter is the number of bytes read so far + * 'done' download is complete, parameter is the total number + * of bytes read + * 'connfailed' if the TCP connection fails, this callback is called + * with array(host,port,errno,errmsg) + * 'writefailed' if writing to disk fails, this callback is called + * with array(destfile,errmsg) + * + * If an HTTP proxy has been configured (http_proxy PEAR_Config + * setting), the proxy will be used. + * + * @param string $url the URL to download + * @param object $ui PEAR_Frontend_* instance + * @param object $config PEAR_Config instance + * @param string $save_dir (optional) directory to save file in + * @param mixed $callback (optional) function/method to call for status + * updates + * + * @return string Returns the full path of the downloaded file or a PEAR + * error on failure. If the error is caused by + * socket-related errors, the error object will + * have the fsockopen error code available through + * getCode(). + * + * @access public + * @deprecated in favor of PEAR_Downloader::downloadHttp() + */ + function downloadHttp($url, &$ui, $save_dir = '.', $callback = null) + { + if (!class_exists('PEAR_Downloader')) { + require_once 'PEAR/Downloader.php'; + } + return PEAR_Downloader::downloadHttp($url, $ui, $save_dir, $callback); + } +} + +require_once 'PEAR/Config.php'; +require_once 'PEAR/PackageFile.php'; \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Config.php b/_piecrust/libs/PEAR/Config.php new file mode 100644 index 0000000..86a7db3 --- /dev/null +++ b/_piecrust/libs/PEAR/Config.php @@ -0,0 +1,2097 @@ + + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Config.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ + +/** + * Required for error handling + */ +require_once 'PEAR.php'; +require_once 'PEAR/Registry.php'; +require_once 'PEAR/Installer/Role.php'; +require_once 'System.php'; + +/** + * Last created PEAR_Config instance. + * @var object + */ +$GLOBALS['_PEAR_Config_instance'] = null; +if (!defined('PEAR_INSTALL_DIR') || !PEAR_INSTALL_DIR) { + $PEAR_INSTALL_DIR = PHP_LIBDIR . DIRECTORY_SEPARATOR . 'pear'; +} else { + $PEAR_INSTALL_DIR = PEAR_INSTALL_DIR; +} + +// Below we define constants with default values for all configuration +// parameters except username/password. All of them can have their +// defaults set through environment variables. The reason we use the +// PHP_ prefix is for some security, PHP protects environment +// variables starting with PHP_*. + +// default channel and preferred mirror is based on whether we are invoked through +// the "pear" or the "pecl" command +if (!defined('PEAR_RUNTYPE')) { + define('PEAR_RUNTYPE', 'pear'); +} + +if (PEAR_RUNTYPE == 'pear') { + define('PEAR_CONFIG_DEFAULT_CHANNEL', 'pear.php.net'); +} else { + define('PEAR_CONFIG_DEFAULT_CHANNEL', 'pecl.php.net'); +} + +if (getenv('PHP_PEAR_SYSCONF_DIR')) { + define('PEAR_CONFIG_SYSCONFDIR', getenv('PHP_PEAR_SYSCONF_DIR')); +} elseif (getenv('SystemRoot')) { + define('PEAR_CONFIG_SYSCONFDIR', getenv('SystemRoot')); +} else { + define('PEAR_CONFIG_SYSCONFDIR', PHP_SYSCONFDIR); +} + +// Default for master_server +if (getenv('PHP_PEAR_MASTER_SERVER')) { + define('PEAR_CONFIG_DEFAULT_MASTER_SERVER', getenv('PHP_PEAR_MASTER_SERVER')); +} else { + define('PEAR_CONFIG_DEFAULT_MASTER_SERVER', 'pear.php.net'); +} + +// Default for http_proxy +if (getenv('PHP_PEAR_HTTP_PROXY')) { + define('PEAR_CONFIG_DEFAULT_HTTP_PROXY', getenv('PHP_PEAR_HTTP_PROXY')); +} elseif (getenv('http_proxy')) { + define('PEAR_CONFIG_DEFAULT_HTTP_PROXY', getenv('http_proxy')); +} else { + define('PEAR_CONFIG_DEFAULT_HTTP_PROXY', ''); +} + +// Default for php_dir +if (getenv('PHP_PEAR_INSTALL_DIR')) { + define('PEAR_CONFIG_DEFAULT_PHP_DIR', getenv('PHP_PEAR_INSTALL_DIR')); +} else { + if (@file_exists($PEAR_INSTALL_DIR) && is_dir($PEAR_INSTALL_DIR)) { + define('PEAR_CONFIG_DEFAULT_PHP_DIR', $PEAR_INSTALL_DIR); + } else { + define('PEAR_CONFIG_DEFAULT_PHP_DIR', $PEAR_INSTALL_DIR); + } +} + +// Default for ext_dir +if (getenv('PHP_PEAR_EXTENSION_DIR')) { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', getenv('PHP_PEAR_EXTENSION_DIR')); +} else { + if (ini_get('extension_dir')) { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', ini_get('extension_dir')); + } elseif (defined('PEAR_EXTENSION_DIR') && + file_exists(PEAR_EXTENSION_DIR) && is_dir(PEAR_EXTENSION_DIR)) { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', PEAR_EXTENSION_DIR); + } elseif (defined('PHP_EXTENSION_DIR')) { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', PHP_EXTENSION_DIR); + } else { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', '.'); + } +} + +// Default for doc_dir +if (getenv('PHP_PEAR_DOC_DIR')) { + define('PEAR_CONFIG_DEFAULT_DOC_DIR', getenv('PHP_PEAR_DOC_DIR')); +} else { + define('PEAR_CONFIG_DEFAULT_DOC_DIR', + $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'docs'); +} + +// Default for bin_dir +if (getenv('PHP_PEAR_BIN_DIR')) { + define('PEAR_CONFIG_DEFAULT_BIN_DIR', getenv('PHP_PEAR_BIN_DIR')); +} else { + define('PEAR_CONFIG_DEFAULT_BIN_DIR', PHP_BINDIR); +} + +// Default for data_dir +if (getenv('PHP_PEAR_DATA_DIR')) { + define('PEAR_CONFIG_DEFAULT_DATA_DIR', getenv('PHP_PEAR_DATA_DIR')); +} else { + define('PEAR_CONFIG_DEFAULT_DATA_DIR', + $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'data'); +} + +// Default for cfg_dir +if (getenv('PHP_PEAR_CFG_DIR')) { + define('PEAR_CONFIG_DEFAULT_CFG_DIR', getenv('PHP_PEAR_CFG_DIR')); +} else { + define('PEAR_CONFIG_DEFAULT_CFG_DIR', + $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'cfg'); +} + +// Default for www_dir +if (getenv('PHP_PEAR_WWW_DIR')) { + define('PEAR_CONFIG_DEFAULT_WWW_DIR', getenv('PHP_PEAR_WWW_DIR')); +} else { + define('PEAR_CONFIG_DEFAULT_WWW_DIR', + $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'www'); +} + +// Default for test_dir +if (getenv('PHP_PEAR_TEST_DIR')) { + define('PEAR_CONFIG_DEFAULT_TEST_DIR', getenv('PHP_PEAR_TEST_DIR')); +} else { + define('PEAR_CONFIG_DEFAULT_TEST_DIR', + $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'tests'); +} + +// Default for temp_dir +if (getenv('PHP_PEAR_TEMP_DIR')) { + define('PEAR_CONFIG_DEFAULT_TEMP_DIR', getenv('PHP_PEAR_TEMP_DIR')); +} else { + define('PEAR_CONFIG_DEFAULT_TEMP_DIR', + System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' . + DIRECTORY_SEPARATOR . 'temp'); +} + +// Default for cache_dir +if (getenv('PHP_PEAR_CACHE_DIR')) { + define('PEAR_CONFIG_DEFAULT_CACHE_DIR', getenv('PHP_PEAR_CACHE_DIR')); +} else { + define('PEAR_CONFIG_DEFAULT_CACHE_DIR', + System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' . + DIRECTORY_SEPARATOR . 'cache'); +} + +// Default for download_dir +if (getenv('PHP_PEAR_DOWNLOAD_DIR')) { + define('PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR', getenv('PHP_PEAR_DOWNLOAD_DIR')); +} else { + define('PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR', + System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' . + DIRECTORY_SEPARATOR . 'download'); +} + +// Default for php_bin +if (getenv('PHP_PEAR_PHP_BIN')) { + define('PEAR_CONFIG_DEFAULT_PHP_BIN', getenv('PHP_PEAR_PHP_BIN')); +} else { + define('PEAR_CONFIG_DEFAULT_PHP_BIN', PEAR_CONFIG_DEFAULT_BIN_DIR. + DIRECTORY_SEPARATOR.'php'.(OS_WINDOWS ? '.exe' : '')); +} + +// Default for verbose +if (getenv('PHP_PEAR_VERBOSE')) { + define('PEAR_CONFIG_DEFAULT_VERBOSE', getenv('PHP_PEAR_VERBOSE')); +} else { + define('PEAR_CONFIG_DEFAULT_VERBOSE', 1); +} + +// Default for preferred_state +if (getenv('PHP_PEAR_PREFERRED_STATE')) { + define('PEAR_CONFIG_DEFAULT_PREFERRED_STATE', getenv('PHP_PEAR_PREFERRED_STATE')); +} else { + define('PEAR_CONFIG_DEFAULT_PREFERRED_STATE', 'stable'); +} + +// Default for umask +if (getenv('PHP_PEAR_UMASK')) { + define('PEAR_CONFIG_DEFAULT_UMASK', getenv('PHP_PEAR_UMASK')); +} else { + define('PEAR_CONFIG_DEFAULT_UMASK', decoct(umask())); +} + +// Default for cache_ttl +if (getenv('PHP_PEAR_CACHE_TTL')) { + define('PEAR_CONFIG_DEFAULT_CACHE_TTL', getenv('PHP_PEAR_CACHE_TTL')); +} else { + define('PEAR_CONFIG_DEFAULT_CACHE_TTL', 3600); +} + +// Default for sig_type +if (getenv('PHP_PEAR_SIG_TYPE')) { + define('PEAR_CONFIG_DEFAULT_SIG_TYPE', getenv('PHP_PEAR_SIG_TYPE')); +} else { + define('PEAR_CONFIG_DEFAULT_SIG_TYPE', 'gpg'); +} + +// Default for sig_bin +if (getenv('PHP_PEAR_SIG_BIN')) { + define('PEAR_CONFIG_DEFAULT_SIG_BIN', getenv('PHP_PEAR_SIG_BIN')); +} else { + define('PEAR_CONFIG_DEFAULT_SIG_BIN', + System::which( + 'gpg', OS_WINDOWS ? 'c:\gnupg\gpg.exe' : '/usr/local/bin/gpg')); +} + +// Default for sig_keydir +if (getenv('PHP_PEAR_SIG_KEYDIR')) { + define('PEAR_CONFIG_DEFAULT_SIG_KEYDIR', getenv('PHP_PEAR_SIG_KEYDIR')); +} else { + define('PEAR_CONFIG_DEFAULT_SIG_KEYDIR', + PEAR_CONFIG_SYSCONFDIR . DIRECTORY_SEPARATOR . 'pearkeys'); +} + +/** + * This is a class for storing configuration data, keeping track of + * which are system-defined, user-defined or defaulted. + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + */ +class PEAR_Config extends PEAR +{ + /** + * Array of config files used. + * + * @var array layer => config file + */ + var $files = array( + 'system' => '', + 'user' => '', + ); + + var $layers = array(); + + /** + * Configuration data, two-dimensional array where the first + * dimension is the config layer ('user', 'system' and 'default'), + * and the second dimension is keyname => value. + * + * The order in the first dimension is important! Earlier + * layers will shadow later ones when a config value is + * requested (if a 'user' value exists, it will be returned first, + * then 'system' and finally 'default'). + * + * @var array layer => array(keyname => value, ...) + */ + var $configuration = array( + 'user' => array(), + 'system' => array(), + 'default' => array(), + ); + + /** + * Configuration values that can be set for a channel + * + * All other configuration values can only have a global value + * @var array + * @access private + */ + var $_channelConfigInfo = array( + 'php_dir', 'ext_dir', 'doc_dir', 'bin_dir', 'data_dir', 'cfg_dir', + 'test_dir', 'www_dir', 'php_bin', 'php_prefix', 'php_suffix', 'username', + 'password', 'verbose', 'preferred_state', 'umask', 'preferred_mirror', 'php_ini' + ); + + /** + * Channels that can be accessed + * @see setChannels() + * @var array + * @access private + */ + var $_channels = array('pear.php.net', 'pecl.php.net', '__uri'); + + /** + * This variable is used to control the directory values returned + * @see setInstallRoot(); + * @var string|false + * @access private + */ + var $_installRoot = false; + + /** + * If requested, this will always refer to the registry + * contained in php_dir + * @var PEAR_Registry + */ + var $_registry = array(); + + /** + * @var array + * @access private + */ + var $_regInitialized = array(); + + /** + * @var bool + * @access private + */ + var $_noRegistry = false; + + /** + * amount of errors found while parsing config + * @var integer + * @access private + */ + var $_errorsFound = 0; + var $_lastError = null; + + /** + * Information about the configuration data. Stores the type, + * default value and a documentation string for each configuration + * value. + * + * @var array layer => array(infotype => value, ...) + */ + var $configuration_info = array( + // Channels/Internet Access + 'default_channel' => array( + 'type' => 'string', + 'default' => PEAR_CONFIG_DEFAULT_CHANNEL, + 'doc' => 'the default channel to use for all non explicit commands', + 'prompt' => 'Default Channel', + 'group' => 'Internet Access', + ), + 'preferred_mirror' => array( + 'type' => 'string', + 'default' => PEAR_CONFIG_DEFAULT_CHANNEL, + 'doc' => 'the default server or mirror to use for channel actions', + 'prompt' => 'Default Channel Mirror', + 'group' => 'Internet Access', + ), + 'remote_config' => array( + 'type' => 'password', + 'default' => '', + 'doc' => 'ftp url of remote configuration file to use for synchronized install', + 'prompt' => 'Remote Configuration File', + 'group' => 'Internet Access', + ), + 'auto_discover' => array( + 'type' => 'integer', + 'default' => 0, + 'doc' => 'whether to automatically discover new channels', + 'prompt' => 'Auto-discover new Channels', + 'group' => 'Internet Access', + ), + // Internet Access + 'master_server' => array( + 'type' => 'string', + 'default' => 'pear.php.net', + 'doc' => 'name of the main PEAR server [NOT USED IN THIS VERSION]', + 'prompt' => 'PEAR server [DEPRECATED]', + 'group' => 'Internet Access', + ), + 'http_proxy' => array( + 'type' => 'string', + 'default' => PEAR_CONFIG_DEFAULT_HTTP_PROXY, + 'doc' => 'HTTP proxy (host:port) to use when downloading packages', + 'prompt' => 'HTTP Proxy Server Address', + 'group' => 'Internet Access', + ), + // File Locations + 'php_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_PHP_DIR, + 'doc' => 'directory where .php files are installed', + 'prompt' => 'PEAR directory', + 'group' => 'File Locations', + ), + 'ext_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_EXT_DIR, + 'doc' => 'directory where loadable extensions are installed', + 'prompt' => 'PHP extension directory', + 'group' => 'File Locations', + ), + 'doc_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_DOC_DIR, + 'doc' => 'directory where documentation is installed', + 'prompt' => 'PEAR documentation directory', + 'group' => 'File Locations', + ), + 'bin_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_BIN_DIR, + 'doc' => 'directory where executables are installed', + 'prompt' => 'PEAR executables directory', + 'group' => 'File Locations', + ), + 'data_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_DATA_DIR, + 'doc' => 'directory where data files are installed', + 'prompt' => 'PEAR data directory', + 'group' => 'File Locations (Advanced)', + ), + 'cfg_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_CFG_DIR, + 'doc' => 'directory where modifiable configuration files are installed', + 'prompt' => 'PEAR configuration file directory', + 'group' => 'File Locations (Advanced)', + ), + 'www_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_WWW_DIR, + 'doc' => 'directory where www frontend files (html/js) are installed', + 'prompt' => 'PEAR www files directory', + 'group' => 'File Locations (Advanced)', + ), + 'test_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_TEST_DIR, + 'doc' => 'directory where regression tests are installed', + 'prompt' => 'PEAR test directory', + 'group' => 'File Locations (Advanced)', + ), + 'cache_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_CACHE_DIR, + 'doc' => 'directory which is used for web service cache', + 'prompt' => 'PEAR Installer cache directory', + 'group' => 'File Locations (Advanced)', + ), + 'temp_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_TEMP_DIR, + 'doc' => 'directory which is used for all temp files', + 'prompt' => 'PEAR Installer temp directory', + 'group' => 'File Locations (Advanced)', + ), + 'download_dir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR, + 'doc' => 'directory which is used for all downloaded files', + 'prompt' => 'PEAR Installer download directory', + 'group' => 'File Locations (Advanced)', + ), + 'php_bin' => array( + 'type' => 'file', + 'default' => PEAR_CONFIG_DEFAULT_PHP_BIN, + 'doc' => 'PHP CLI/CGI binary for executing scripts', + 'prompt' => 'PHP CLI/CGI binary', + 'group' => 'File Locations (Advanced)', + ), + 'php_prefix' => array( + 'type' => 'string', + 'default' => '', + 'doc' => '--program-prefix for php_bin\'s ./configure, used for pecl installs', + 'prompt' => '--program-prefix passed to PHP\'s ./configure', + 'group' => 'File Locations (Advanced)', + ), + 'php_suffix' => array( + 'type' => 'string', + 'default' => '', + 'doc' => '--program-suffix for php_bin\'s ./configure, used for pecl installs', + 'prompt' => '--program-suffix passed to PHP\'s ./configure', + 'group' => 'File Locations (Advanced)', + ), + 'php_ini' => array( + 'type' => 'file', + 'default' => '', + 'doc' => 'location of php.ini in which to enable PECL extensions on install', + 'prompt' => 'php.ini location', + 'group' => 'File Locations (Advanced)', + ), + // Maintainers + 'username' => array( + 'type' => 'string', + 'default' => '', + 'doc' => '(maintainers) your PEAR account name', + 'prompt' => 'PEAR username (for maintainers)', + 'group' => 'Maintainers', + ), + 'password' => array( + 'type' => 'password', + 'default' => '', + 'doc' => '(maintainers) your PEAR account password', + 'prompt' => 'PEAR password (for maintainers)', + 'group' => 'Maintainers', + ), + // Advanced + 'verbose' => array( + 'type' => 'integer', + 'default' => PEAR_CONFIG_DEFAULT_VERBOSE, + 'doc' => 'verbosity level +0: really quiet +1: somewhat quiet +2: verbose +3: debug', + 'prompt' => 'Debug Log Level', + 'group' => 'Advanced', + ), + 'preferred_state' => array( + 'type' => 'set', + 'default' => PEAR_CONFIG_DEFAULT_PREFERRED_STATE, + 'doc' => 'the installer will prefer releases with this state when installing packages without a version or state specified', + 'valid_set' => array( + 'stable', 'beta', 'alpha', 'devel', 'snapshot'), + 'prompt' => 'Preferred Package State', + 'group' => 'Advanced', + ), + 'umask' => array( + 'type' => 'mask', + 'default' => PEAR_CONFIG_DEFAULT_UMASK, + 'doc' => 'umask used when creating files (Unix-like systems only)', + 'prompt' => 'Unix file mask', + 'group' => 'Advanced', + ), + 'cache_ttl' => array( + 'type' => 'integer', + 'default' => PEAR_CONFIG_DEFAULT_CACHE_TTL, + 'doc' => 'amount of secs where the local cache is used and not updated', + 'prompt' => 'Cache TimeToLive', + 'group' => 'Advanced', + ), + 'sig_type' => array( + 'type' => 'set', + 'default' => PEAR_CONFIG_DEFAULT_SIG_TYPE, + 'doc' => 'which package signature mechanism to use', + 'valid_set' => array('gpg'), + 'prompt' => 'Package Signature Type', + 'group' => 'Maintainers', + ), + 'sig_bin' => array( + 'type' => 'string', + 'default' => PEAR_CONFIG_DEFAULT_SIG_BIN, + 'doc' => 'which package signature mechanism to use', + 'prompt' => 'Signature Handling Program', + 'group' => 'Maintainers', + ), + 'sig_keyid' => array( + 'type' => 'string', + 'default' => '', + 'doc' => 'which key to use for signing with', + 'prompt' => 'Signature Key Id', + 'group' => 'Maintainers', + ), + 'sig_keydir' => array( + 'type' => 'directory', + 'default' => PEAR_CONFIG_DEFAULT_SIG_KEYDIR, + 'doc' => 'directory where signature keys are located', + 'prompt' => 'Signature Key Directory', + 'group' => 'Maintainers', + ), + // __channels is reserved - used for channel-specific configuration + ); + + /** + * Constructor. + * + * @param string file to read user-defined options from + * @param string file to read system-wide defaults from + * @param bool determines whether a registry object "follows" + * the value of php_dir (is automatically created + * and moved when php_dir is changed) + * @param bool if true, fails if configuration files cannot be loaded + * + * @access public + * + * @see PEAR_Config::singleton + */ + function PEAR_Config($user_file = '', $system_file = '', $ftp_file = false, + $strict = true) + { + $this->PEAR(); + PEAR_Installer_Role::initializeConfig($this); + $sl = DIRECTORY_SEPARATOR; + if (empty($user_file)) { + if (OS_WINDOWS) { + $user_file = PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.ini'; + } else { + $user_file = getenv('HOME') . $sl . '.pearrc'; + } + } + + if (empty($system_file)) { + $system_file = PEAR_CONFIG_SYSCONFDIR . $sl; + if (OS_WINDOWS) { + $system_file .= 'pearsys.ini'; + } else { + $system_file .= 'pear.conf'; + } + } + + $this->layers = array_keys($this->configuration); + $this->files['user'] = $user_file; + $this->files['system'] = $system_file; + if ($user_file && file_exists($user_file)) { + $this->pushErrorHandling(PEAR_ERROR_RETURN); + $this->readConfigFile($user_file, 'user', $strict); + $this->popErrorHandling(); + if ($this->_errorsFound > 0) { + return; + } + } + + if ($system_file && @file_exists($system_file)) { + $this->mergeConfigFile($system_file, false, 'system', $strict); + if ($this->_errorsFound > 0) { + return; + } + + } + + if (!$ftp_file) { + $ftp_file = $this->get('remote_config'); + } + + if ($ftp_file && defined('PEAR_REMOTEINSTALL_OK')) { + $this->readFTPConfigFile($ftp_file); + } + + foreach ($this->configuration_info as $key => $info) { + $this->configuration['default'][$key] = $info['default']; + } + + $this->_registry['default'] = &new PEAR_Registry($this->configuration['default']['php_dir']); + $this->_registry['default']->setConfig($this, false); + $this->_regInitialized['default'] = false; + //$GLOBALS['_PEAR_Config_instance'] = &$this; + } + + /** + * Return the default locations of user and system configuration files + * @static + */ + function getDefaultConfigFiles() + { + $sl = DIRECTORY_SEPARATOR; + if (OS_WINDOWS) { + return array( + 'user' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.ini', + 'system' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pearsys.ini' + ); + } + + return array( + 'user' => getenv('HOME') . $sl . '.pearrc', + 'system' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.conf' + ); + } + + /** + * Static singleton method. If you want to keep only one instance + * of this class in use, this method will give you a reference to + * the last created PEAR_Config object if one exists, or create a + * new object. + * + * @param string (optional) file to read user-defined options from + * @param string (optional) file to read system-wide defaults from + * + * @return object an existing or new PEAR_Config instance + * + * @access public + * + * @see PEAR_Config::PEAR_Config + */ + function &singleton($user_file = '', $system_file = '', $strict = true) + { + if (is_object($GLOBALS['_PEAR_Config_instance'])) { + return $GLOBALS['_PEAR_Config_instance']; + } + + $t_conf = &new PEAR_Config($user_file, $system_file, false, $strict); + if ($t_conf->_errorsFound > 0) { + return $t_conf->lastError; + } + + $GLOBALS['_PEAR_Config_instance'] = &$t_conf; + return $GLOBALS['_PEAR_Config_instance']; + } + + /** + * Determine whether any configuration files have been detected, and whether a + * registry object can be retrieved from this configuration. + * @return bool + * @since PEAR 1.4.0a1 + */ + function validConfiguration() + { + if ($this->isDefinedLayer('user') || $this->isDefinedLayer('system')) { + return true; + } + + return false; + } + + /** + * Reads configuration data from a file. All existing values in + * the config layer are discarded and replaced with data from the + * file. + * @param string file to read from, if NULL or not specified, the + * last-used file for the same layer (second param) is used + * @param string config layer to insert data into ('user' or 'system') + * @return bool TRUE on success or a PEAR error on failure + */ + function readConfigFile($file = null, $layer = 'user', $strict = true) + { + if (empty($this->files[$layer])) { + return $this->raiseError("unknown config layer `$layer'"); + } + + if ($file === null) { + $file = $this->files[$layer]; + } + + $data = $this->_readConfigDataFrom($file); + if (PEAR::isError($data)) { + if (!$strict) { + return true; + } + + $this->_errorsFound++; + $this->lastError = $data; + + return $data; + } + + $this->files[$layer] = $file; + $this->_decodeInput($data); + $this->configuration[$layer] = $data; + $this->_setupChannels(); + if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) { + $this->_registry[$layer] = &new PEAR_Registry($phpdir); + $this->_registry[$layer]->setConfig($this, false); + $this->_regInitialized[$layer] = false; + } else { + unset($this->_registry[$layer]); + } + return true; + } + + /** + * @param string url to the remote config file, like ftp://www.example.com/pear/config.ini + * @return true|PEAR_Error + */ + function readFTPConfigFile($path) + { + do { // poor man's try + if (!class_exists('PEAR_FTP')) { + if (!class_exists('PEAR_Common')) { + require_once 'PEAR/Common.php'; + } + if (PEAR_Common::isIncludeable('PEAR/FTP.php')) { + require_once 'PEAR/FTP.php'; + } + } + + if (!class_exists('PEAR_FTP')) { + return PEAR::raiseError('PEAR_RemoteInstaller must be installed to use remote config'); + } + + $this->_ftp = &new PEAR_FTP; + $this->_ftp->pushErrorHandling(PEAR_ERROR_RETURN); + $e = $this->_ftp->init($path); + if (PEAR::isError($e)) { + $this->_ftp->popErrorHandling(); + return $e; + } + + $tmp = System::mktemp('-d'); + PEAR_Common::addTempFile($tmp); + $e = $this->_ftp->get(basename($path), $tmp . DIRECTORY_SEPARATOR . + 'pear.ini', false, FTP_BINARY); + if (PEAR::isError($e)) { + $this->_ftp->popErrorHandling(); + return $e; + } + + PEAR_Common::addTempFile($tmp . DIRECTORY_SEPARATOR . 'pear.ini'); + $this->_ftp->disconnect(); + $this->_ftp->popErrorHandling(); + $this->files['ftp'] = $tmp . DIRECTORY_SEPARATOR . 'pear.ini'; + $e = $this->readConfigFile(null, 'ftp'); + if (PEAR::isError($e)) { + return $e; + } + + $fail = array(); + foreach ($this->configuration_info as $key => $val) { + if (in_array($this->getGroup($key), + array('File Locations', 'File Locations (Advanced)')) && + $this->getType($key) == 'directory') { + // any directory configs must be set for this to work + if (!isset($this->configuration['ftp'][$key])) { + $fail[] = $key; + } + } + } + + if (!count($fail)) { + return true; + } + + $fail = '"' . implode('", "', $fail) . '"'; + unset($this->files['ftp']); + unset($this->configuration['ftp']); + return PEAR::raiseError('ERROR: Ftp configuration file must set all ' . + 'directory configuration variables. These variables were not set: ' . + $fail); + } while (false); // poor man's catch + unset($this->files['ftp']); + return PEAR::raiseError('no remote host specified'); + } + + /** + * Reads the existing configurations and creates the _channels array from it + */ + function _setupChannels() + { + $set = array_flip(array_values($this->_channels)); + foreach ($this->configuration as $layer => $data) { + $i = 1000; + if (isset($data['__channels']) && is_array($data['__channels'])) { + foreach ($data['__channels'] as $channel => $info) { + $set[$channel] = $i++; + } + } + } + $this->_channels = array_values(array_flip($set)); + $this->setChannels($this->_channels); + } + + function deleteChannel($channel) + { + $ch = strtolower($channel); + foreach ($this->configuration as $layer => $data) { + if (isset($data['__channels']) && isset($data['__channels'][$ch])) { + unset($this->configuration[$layer]['__channels'][$ch]); + } + } + + $this->_channels = array_flip($this->_channels); + unset($this->_channels[$ch]); + $this->_channels = array_flip($this->_channels); + } + + /** + * Merges data into a config layer from a file. Does the same + * thing as readConfigFile, except it does not replace all + * existing values in the config layer. + * @param string file to read from + * @param bool whether to overwrite existing data (default TRUE) + * @param string config layer to insert data into ('user' or 'system') + * @param string if true, errors are returned if file opening fails + * @return bool TRUE on success or a PEAR error on failure + */ + function mergeConfigFile($file, $override = true, $layer = 'user', $strict = true) + { + if (empty($this->files[$layer])) { + return $this->raiseError("unknown config layer `$layer'"); + } + + if ($file === null) { + $file = $this->files[$layer]; + } + + $data = $this->_readConfigDataFrom($file); + if (PEAR::isError($data)) { + if (!$strict) { + return true; + } + + $this->_errorsFound++; + $this->lastError = $data; + + return $data; + } + + $this->_decodeInput($data); + if ($override) { + $this->configuration[$layer] = + PEAR_Config::arrayMergeRecursive($this->configuration[$layer], $data); + } else { + $this->configuration[$layer] = + PEAR_Config::arrayMergeRecursive($data, $this->configuration[$layer]); + } + + $this->_setupChannels(); + if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) { + $this->_registry[$layer] = &new PEAR_Registry($phpdir); + $this->_registry[$layer]->setConfig($this, false); + $this->_regInitialized[$layer] = false; + } else { + unset($this->_registry[$layer]); + } + return true; + } + + /** + * @param array + * @param array + * @return array + * @static + */ + function arrayMergeRecursive($arr2, $arr1) + { + $ret = array(); + foreach ($arr2 as $key => $data) { + if (!isset($arr1[$key])) { + $ret[$key] = $data; + unset($arr1[$key]); + continue; + } + if (is_array($data)) { + if (!is_array($arr1[$key])) { + $ret[$key] = $arr1[$key]; + unset($arr1[$key]); + continue; + } + $ret[$key] = PEAR_Config::arrayMergeRecursive($arr1[$key], $arr2[$key]); + unset($arr1[$key]); + } + } + + return array_merge($ret, $arr1); + } + + /** + * Writes data into a config layer from a file. + * + * @param string|null file to read from, or null for default + * @param string config layer to insert data into ('user' or + * 'system') + * @param string|null data to write to config file or null for internal data [DEPRECATED] + * @return bool TRUE on success or a PEAR error on failure + */ + function writeConfigFile($file = null, $layer = 'user', $data = null) + { + $this->_lazyChannelSetup($layer); + if ($layer == 'both' || $layer == 'all') { + foreach ($this->files as $type => $file) { + $err = $this->writeConfigFile($file, $type, $data); + if (PEAR::isError($err)) { + return $err; + } + } + return true; + } + + if (empty($this->files[$layer])) { + return $this->raiseError("unknown config file type `$layer'"); + } + + if ($file === null) { + $file = $this->files[$layer]; + } + + $data = ($data === null) ? $this->configuration[$layer] : $data; + $this->_encodeOutput($data); + $opt = array('-p', dirname($file)); + if (!@System::mkDir($opt)) { + return $this->raiseError("could not create directory: " . dirname($file)); + } + + if (file_exists($file) && is_file($file) && !is_writeable($file)) { + return $this->raiseError("no write access to $file!"); + } + + $fp = @fopen($file, "w"); + if (!$fp) { + return $this->raiseError("PEAR_Config::writeConfigFile fopen('$file','w') failed ($php_errormsg)"); + } + + $contents = "#PEAR_Config 0.9\n" . serialize($data); + if (!@fwrite($fp, $contents)) { + return $this->raiseError("PEAR_Config::writeConfigFile: fwrite failed ($php_errormsg)"); + } + return true; + } + + /** + * Reads configuration data from a file and returns the parsed data + * in an array. + * + * @param string file to read from + * @return array configuration data or a PEAR error on failure + * @access private + */ + function _readConfigDataFrom($file) + { + $fp = false; + if (file_exists($file)) { + $fp = @fopen($file, "r"); + } + + if (!$fp) { + return $this->raiseError("PEAR_Config::readConfigFile fopen('$file','r') failed"); + } + + $size = filesize($file); + $rt = get_magic_quotes_runtime(); + set_magic_quotes_runtime(0); + fclose($fp); + $contents = file_get_contents($file); + if (empty($contents)) { + return $this->raiseError('Configuration file "' . $file . '" is empty'); + } + + set_magic_quotes_runtime($rt); + + $version = false; + if (preg_match('/^#PEAR_Config\s+(\S+)\s+/si', $contents, $matches)) { + $version = $matches[1]; + $contents = substr($contents, strlen($matches[0])); + } else { + // Museum config file + if (substr($contents,0,2) == 'a:') { + $version = '0.1'; + } + } + + if ($version && version_compare("$version", '1', '<')) { + // no '@', it is possible that unserialize + // raises a notice but it seems to block IO to + // STDOUT if a '@' is used and a notice is raise + $data = unserialize($contents); + + if (!is_array($data) && !$data) { + if ($contents == serialize(false)) { + $data = array(); + } else { + $err = $this->raiseError("PEAR_Config: bad data in $file"); + return $err; + } + } + if (!is_array($data)) { + if (strlen(trim($contents)) > 0) { + $error = "PEAR_Config: bad data in $file"; + $err = $this->raiseError($error); + return $err; + } + + $data = array(); + } + // add parsing of newer formats here... + } else { + $err = $this->raiseError("$file: unknown version `$version'"); + return $err; + } + + return $data; + } + + /** + * Gets the file used for storing the config for a layer + * + * @param string $layer 'user' or 'system' + */ + function getConfFile($layer) + { + return $this->files[$layer]; + } + + /** + * @param string Configuration class name, used for detecting duplicate calls + * @param array information on a role as parsed from its xml file + * @return true|PEAR_Error + * @access private + */ + function _addConfigVars($class, $vars) + { + static $called = array(); + if (isset($called[$class])) { + return; + } + + $called[$class] = 1; + if (count($vars) > 3) { + return $this->raiseError('Roles can only define 3 new config variables or less'); + } + + foreach ($vars as $name => $var) { + if (!is_array($var)) { + return $this->raiseError('Configuration information must be an array'); + } + + if (!isset($var['type'])) { + return $this->raiseError('Configuration information must contain a type'); + } elseif (!in_array($var['type'], + array('string', 'mask', 'password', 'directory', 'file', 'set'))) { + return $this->raiseError( + 'Configuration type must be one of directory, file, string, ' . + 'mask, set, or password'); + } + if (!isset($var['default'])) { + return $this->raiseError( + 'Configuration information must contain a default value ("default" index)'); + } + + if (is_array($var['default'])) { + $real_default = ''; + foreach ($var['default'] as $config_var => $val) { + if (strpos($config_var, 'text') === 0) { + $real_default .= $val; + } elseif (strpos($config_var, 'constant') === 0) { + if (!defined($val)) { + return $this->raiseError( + 'Unknown constant "' . $val . '" requested in ' . + 'default value for configuration variable "' . + $name . '"'); + } + + $real_default .= constant($val); + } elseif (isset($this->configuration_info[$config_var])) { + $real_default .= + $this->configuration_info[$config_var]['default']; + } else { + return $this->raiseError( + 'Unknown request for "' . $config_var . '" value in ' . + 'default value for configuration variable "' . + $name . '"'); + } + } + $var['default'] = $real_default; + } + + if ($var['type'] == 'integer') { + $var['default'] = (integer) $var['default']; + } + + if (!isset($var['doc'])) { + return $this->raiseError( + 'Configuration information must contain a summary ("doc" index)'); + } + + if (!isset($var['prompt'])) { + return $this->raiseError( + 'Configuration information must contain a simple prompt ("prompt" index)'); + } + + if (!isset($var['group'])) { + return $this->raiseError( + 'Configuration information must contain a simple group ("group" index)'); + } + + if (isset($this->configuration_info[$name])) { + return $this->raiseError('Configuration variable "' . $name . + '" already exists'); + } + + $this->configuration_info[$name] = $var; + // fix bug #7351: setting custom config variable in a channel fails + $this->_channelConfigInfo[] = $name; + } + + return true; + } + + /** + * Encodes/scrambles configuration data before writing to files. + * Currently, 'password' values will be base64-encoded as to avoid + * that people spot cleartext passwords by accident. + * + * @param array (reference) array to encode values in + * @return bool TRUE on success + * @access private + */ + function _encodeOutput(&$data) + { + foreach ($data as $key => $value) { + if ($key == '__channels') { + foreach ($data['__channels'] as $channel => $blah) { + $this->_encodeOutput($data['__channels'][$channel]); + } + } + + if (!isset($this->configuration_info[$key])) { + continue; + } + + $type = $this->configuration_info[$key]['type']; + switch ($type) { + // we base64-encode passwords so they are at least + // not shown in plain by accident + case 'password': { + $data[$key] = base64_encode($data[$key]); + break; + } + case 'mask': { + $data[$key] = octdec($data[$key]); + break; + } + } + } + + return true; + } + + /** + * Decodes/unscrambles configuration data after reading from files. + * + * @param array (reference) array to encode values in + * @return bool TRUE on success + * @access private + * + * @see PEAR_Config::_encodeOutput + */ + function _decodeInput(&$data) + { + if (!is_array($data)) { + return true; + } + + foreach ($data as $key => $value) { + if ($key == '__channels') { + foreach ($data['__channels'] as $channel => $blah) { + $this->_decodeInput($data['__channels'][$channel]); + } + } + + if (!isset($this->configuration_info[$key])) { + continue; + } + + $type = $this->configuration_info[$key]['type']; + switch ($type) { + case 'password': { + $data[$key] = base64_decode($data[$key]); + break; + } + case 'mask': { + $data[$key] = decoct($data[$key]); + break; + } + } + } + + return true; + } + + /** + * Retrieve the default channel. + * + * On startup, channels are not initialized, so if the default channel is not + * pear.php.net, then initialize the config. + * @param string registry layer + * @return string|false + */ + function getDefaultChannel($layer = null) + { + $ret = false; + if ($layer === null) { + foreach ($this->layers as $layer) { + if (isset($this->configuration[$layer]['default_channel'])) { + $ret = $this->configuration[$layer]['default_channel']; + break; + } + } + } elseif (isset($this->configuration[$layer]['default_channel'])) { + $ret = $this->configuration[$layer]['default_channel']; + } + + if ($ret == 'pear.php.net' && defined('PEAR_RUNTYPE') && PEAR_RUNTYPE == 'pecl') { + $ret = 'pecl.php.net'; + } + + if ($ret) { + if ($ret != 'pear.php.net') { + $this->_lazyChannelSetup(); + } + + return $ret; + } + + return PEAR_CONFIG_DEFAULT_CHANNEL; + } + + /** + * Returns a configuration value, prioritizing layers as per the + * layers property. + * + * @param string config key + * @return mixed the config value, or NULL if not found + * @access public + */ + function get($key, $layer = null, $channel = false) + { + if (!isset($this->configuration_info[$key])) { + return null; + } + + if ($key == '__channels') { + return null; + } + + if ($key == 'default_channel') { + return $this->getDefaultChannel($layer); + } + + if (!$channel) { + $channel = $this->getDefaultChannel(); + } elseif ($channel != 'pear.php.net') { + $this->_lazyChannelSetup(); + } + $channel = strtolower($channel); + + $test = (in_array($key, $this->_channelConfigInfo)) ? + $this->_getChannelValue($key, $layer, $channel) : + null; + if ($test !== null) { + if ($this->_installRoot) { + if (in_array($this->getGroup($key), + array('File Locations', 'File Locations (Advanced)')) && + $this->getType($key) == 'directory') { + return $this->_prependPath($test, $this->_installRoot); + } + } + return $test; + } + + if ($layer === null) { + foreach ($this->layers as $layer) { + if (isset($this->configuration[$layer][$key])) { + $test = $this->configuration[$layer][$key]; + if ($this->_installRoot) { + if (in_array($this->getGroup($key), + array('File Locations', 'File Locations (Advanced)')) && + $this->getType($key) == 'directory') { + return $this->_prependPath($test, $this->_installRoot); + } + } + + if ($key == 'preferred_mirror') { + $reg = &$this->getRegistry(); + if (is_object($reg)) { + $chan = &$reg->getChannel($channel); + if (PEAR::isError($chan)) { + return $channel; + } + + if (!$chan->getMirror($test) && $chan->getName() != $test) { + return $channel; // mirror does not exist + } + } + } + return $test; + } + } + } elseif (isset($this->configuration[$layer][$key])) { + $test = $this->configuration[$layer][$key]; + if ($this->_installRoot) { + if (in_array($this->getGroup($key), + array('File Locations', 'File Locations (Advanced)')) && + $this->getType($key) == 'directory') { + return $this->_prependPath($test, $this->_installRoot); + } + } + + if ($key == 'preferred_mirror') { + $reg = &$this->getRegistry(); + if (is_object($reg)) { + $chan = &$reg->getChannel($channel); + if (PEAR::isError($chan)) { + return $channel; + } + + if (!$chan->getMirror($test) && $chan->getName() != $test) { + return $channel; // mirror does not exist + } + } + } + + return $test; + } + + return null; + } + + /** + * Returns a channel-specific configuration value, prioritizing layers as per the + * layers property. + * + * @param string config key + * @return mixed the config value, or NULL if not found + * @access private + */ + function _getChannelValue($key, $layer, $channel) + { + if ($key == '__channels' || $channel == 'pear.php.net') { + return null; + } + + $ret = null; + if ($layer === null) { + foreach ($this->layers as $ilayer) { + if (isset($this->configuration[$ilayer]['__channels'][$channel][$key])) { + $ret = $this->configuration[$ilayer]['__channels'][$channel][$key]; + break; + } + } + } elseif (isset($this->configuration[$layer]['__channels'][$channel][$key])) { + $ret = $this->configuration[$layer]['__channels'][$channel][$key]; + } + + if ($key != 'preferred_mirror') { + return $ret; + } + + + if ($ret !== null) { + $reg = &$this->getRegistry($layer); + if (is_object($reg)) { + $chan = &$reg->getChannel($channel); + if (PEAR::isError($chan)) { + return $channel; + } + + if (!$chan->getMirror($ret) && $chan->getName() != $ret) { + return $channel; // mirror does not exist + } + } + + return $ret; + } + + if ($channel != $this->getDefaultChannel($layer)) { + return $channel; // we must use the channel name as the preferred mirror + // if the user has not chosen an alternate + } + + return $this->getDefaultChannel($layer); + } + + /** + * Set a config value in a specific layer (defaults to 'user'). + * Enforces the types defined in the configuration_info array. An + * integer config variable will be cast to int, and a set config + * variable will be validated against its legal values. + * + * @param string config key + * @param string config value + * @param string (optional) config layer + * @param string channel to set this value for, or null for global value + * @return bool TRUE on success, FALSE on failure + */ + function set($key, $value, $layer = 'user', $channel = false) + { + if ($key == '__channels') { + return false; + } + + if (!isset($this->configuration[$layer])) { + return false; + } + + if ($key == 'default_channel') { + // can only set this value globally + $channel = 'pear.php.net'; + if ($value != 'pear.php.net') { + $this->_lazyChannelSetup($layer); + } + } + + if ($key == 'preferred_mirror') { + if ($channel == '__uri') { + return false; // can't set the __uri pseudo-channel's mirror + } + + $reg = &$this->getRegistry($layer); + if (is_object($reg)) { + $chan = &$reg->getChannel($channel ? $channel : 'pear.php.net'); + if (PEAR::isError($chan)) { + return false; + } + + if (!$chan->getMirror($value) && $chan->getName() != $value) { + return false; // mirror does not exist + } + } + } + + if (!isset($this->configuration_info[$key])) { + return false; + } + + extract($this->configuration_info[$key]); + switch ($type) { + case 'integer': + $value = (int)$value; + break; + case 'set': { + // If a valid_set is specified, require the value to + // be in the set. If there is no valid_set, accept + // any value. + if ($valid_set) { + reset($valid_set); + if ((key($valid_set) === 0 && !in_array($value, $valid_set)) || + (key($valid_set) !== 0 && empty($valid_set[$value]))) + { + return false; + } + } + break; + } + } + + if (!$channel) { + $channel = $this->get('default_channel', null, 'pear.php.net'); + } + + if (!in_array($channel, $this->_channels)) { + $this->_lazyChannelSetup($layer); + $reg = &$this->getRegistry($layer); + if ($reg) { + $channel = $reg->channelName($channel); + } + + if (!in_array($channel, $this->_channels)) { + return false; + } + } + + if ($channel != 'pear.php.net') { + if (in_array($key, $this->_channelConfigInfo)) { + $this->configuration[$layer]['__channels'][$channel][$key] = $value; + return true; + } + + return false; + } + + if ($key == 'default_channel') { + if (!isset($reg)) { + $reg = &$this->getRegistry($layer); + if (!$reg) { + $reg = &$this->getRegistry(); + } + } + + if ($reg) { + $value = $reg->channelName($value); + } + + if (!$value) { + return false; + } + } + + $this->configuration[$layer][$key] = $value; + if ($key == 'php_dir' && !$this->_noRegistry) { + if (!isset($this->_registry[$layer]) || + $value != $this->_registry[$layer]->install_dir) { + $this->_registry[$layer] = &new PEAR_Registry($value); + $this->_regInitialized[$layer] = false; + $this->_registry[$layer]->setConfig($this, false); + } + } + + return true; + } + + function _lazyChannelSetup($uselayer = false) + { + if ($this->_noRegistry) { + return; + } + + $merge = false; + foreach ($this->_registry as $layer => $p) { + if ($uselayer && $uselayer != $layer) { + continue; + } + + if (!$this->_regInitialized[$layer]) { + if ($layer == 'default' && isset($this->_registry['user']) || + isset($this->_registry['system'])) { + // only use the default registry if there are no alternatives + continue; + } + + if (!is_object($this->_registry[$layer])) { + if ($phpdir = $this->get('php_dir', $layer, 'pear.php.net')) { + $this->_registry[$layer] = &new PEAR_Registry($phpdir); + $this->_registry[$layer]->setConfig($this, false); + $this->_regInitialized[$layer] = false; + } else { + unset($this->_registry[$layer]); + return; + } + } + + $this->setChannels($this->_registry[$layer]->listChannels(), $merge); + $this->_regInitialized[$layer] = true; + $merge = true; + } + } + } + + /** + * Set the list of channels. + * + * This should be set via a call to {@link PEAR_Registry::listChannels()} + * @param array + * @param bool + * @return bool success of operation + */ + function setChannels($channels, $merge = false) + { + if (!is_array($channels)) { + return false; + } + + if ($merge) { + $this->_channels = array_merge($this->_channels, $channels); + } else { + $this->_channels = $channels; + } + + foreach ($channels as $channel) { + $channel = strtolower($channel); + if ($channel == 'pear.php.net') { + continue; + } + + foreach ($this->layers as $layer) { + if (!isset($this->configuration[$layer]['__channels'])) { + $this->configuration[$layer]['__channels'] = array(); + } + if (!isset($this->configuration[$layer]['__channels'][$channel]) + || !is_array($this->configuration[$layer]['__channels'][$channel])) { + $this->configuration[$layer]['__channels'][$channel] = array(); + } + } + } + + return true; + } + + /** + * Get the type of a config value. + * + * @param string config key + * + * @return string type, one of "string", "integer", "file", + * "directory", "set" or "password". + * + * @access public + * + */ + function getType($key) + { + if (isset($this->configuration_info[$key])) { + return $this->configuration_info[$key]['type']; + } + return false; + } + + /** + * Get the documentation for a config value. + * + * @param string config key + * @return string documentation string + * + * @access public + * + */ + function getDocs($key) + { + if (isset($this->configuration_info[$key])) { + return $this->configuration_info[$key]['doc']; + } + + return false; + } + + /** + * Get the short documentation for a config value. + * + * @param string config key + * @return string short documentation string + * + * @access public + * + */ + function getPrompt($key) + { + if (isset($this->configuration_info[$key])) { + return $this->configuration_info[$key]['prompt']; + } + + return false; + } + + /** + * Get the parameter group for a config key. + * + * @param string config key + * @return string parameter group + * + * @access public + * + */ + function getGroup($key) + { + if (isset($this->configuration_info[$key])) { + return $this->configuration_info[$key]['group']; + } + + return false; + } + + /** + * Get the list of parameter groups. + * + * @return array list of parameter groups + * + * @access public + * + */ + function getGroups() + { + $tmp = array(); + foreach ($this->configuration_info as $key => $info) { + $tmp[$info['group']] = 1; + } + + return array_keys($tmp); + } + + /** + * Get the list of the parameters in a group. + * + * @param string $group parameter group + * @return array list of parameters in $group + * + * @access public + * + */ + function getGroupKeys($group) + { + $keys = array(); + foreach ($this->configuration_info as $key => $info) { + if ($info['group'] == $group) { + $keys[] = $key; + } + } + + return $keys; + } + + /** + * Get the list of allowed set values for a config value. Returns + * NULL for config values that are not sets. + * + * @param string config key + * @return array enumerated array of set values, or NULL if the + * config key is unknown or not a set + * + * @access public + * + */ + function getSetValues($key) + { + if (isset($this->configuration_info[$key]) && + isset($this->configuration_info[$key]['type']) && + $this->configuration_info[$key]['type'] == 'set') + { + $valid_set = $this->configuration_info[$key]['valid_set']; + reset($valid_set); + if (key($valid_set) === 0) { + return $valid_set; + } + + return array_keys($valid_set); + } + + return null; + } + + /** + * Get all the current config keys. + * + * @return array simple array of config keys + * + * @access public + */ + function getKeys() + { + $keys = array(); + foreach ($this->layers as $layer) { + $test = $this->configuration[$layer]; + if (isset($test['__channels'])) { + foreach ($test['__channels'] as $channel => $configs) { + $keys = array_merge($keys, $configs); + } + } + + unset($test['__channels']); + $keys = array_merge($keys, $test); + + } + return array_keys($keys); + } + + /** + * Remove the a config key from a specific config layer. + * + * @param string config key + * @param string (optional) config layer + * @param string (optional) channel (defaults to default channel) + * @return bool TRUE on success, FALSE on failure + * + * @access public + */ + function remove($key, $layer = 'user', $channel = null) + { + if ($channel === null) { + $channel = $this->getDefaultChannel(); + } + + if ($channel !== 'pear.php.net') { + if (isset($this->configuration[$layer]['__channels'][$channel][$key])) { + unset($this->configuration[$layer]['__channels'][$channel][$key]); + return true; + } + } + + if (isset($this->configuration[$layer][$key])) { + unset($this->configuration[$layer][$key]); + return true; + } + + return false; + } + + /** + * Temporarily remove an entire config layer. USE WITH CARE! + * + * @param string config key + * @param string (optional) config layer + * @return bool TRUE on success, FALSE on failure + * + * @access public + */ + function removeLayer($layer) + { + if (isset($this->configuration[$layer])) { + $this->configuration[$layer] = array(); + return true; + } + + return false; + } + + /** + * Stores configuration data in a layer. + * + * @param string config layer to store + * @return bool TRUE on success, or PEAR error on failure + * + * @access public + */ + function store($layer = 'user', $data = null) + { + return $this->writeConfigFile(null, $layer, $data); + } + + /** + * Tells what config layer that gets to define a key. + * + * @param string config key + * @param boolean return the defining channel + * + * @return string|array the config layer, or an empty string if not found. + * + * if $returnchannel, the return is an array array('layer' => layername, + * 'channel' => channelname), or an empty string if not found + * + * @access public + */ + function definedBy($key, $returnchannel = false) + { + foreach ($this->layers as $layer) { + $channel = $this->getDefaultChannel(); + if ($channel !== 'pear.php.net') { + if (isset($this->configuration[$layer]['__channels'][$channel][$key])) { + if ($returnchannel) { + return array('layer' => $layer, 'channel' => $channel); + } + return $layer; + } + } + + if (isset($this->configuration[$layer][$key])) { + if ($returnchannel) { + return array('layer' => $layer, 'channel' => 'pear.php.net'); + } + return $layer; + } + } + + return ''; + } + + /** + * Tells whether a given key exists as a config value. + * + * @param string config key + * @return bool whether exists in this object + * + * @access public + */ + function isDefined($key) + { + foreach ($this->layers as $layer) { + if (isset($this->configuration[$layer][$key])) { + return true; + } + } + + return false; + } + + /** + * Tells whether a given config layer exists. + * + * @param string config layer + * @return bool whether exists in this object + * + * @access public + */ + function isDefinedLayer($layer) + { + return isset($this->configuration[$layer]); + } + + /** + * Returns the layers defined (except the 'default' one) + * + * @return array of the defined layers + */ + function getLayers() + { + $cf = $this->configuration; + unset($cf['default']); + return array_keys($cf); + } + + function apiVersion() + { + return '1.1'; + } + + /** + * @return PEAR_Registry + */ + function &getRegistry($use = null) + { + $layer = $use === null ? 'user' : $use; + if (isset($this->_registry[$layer])) { + return $this->_registry[$layer]; + } elseif ($use === null && isset($this->_registry['system'])) { + return $this->_registry['system']; + } elseif ($use === null && isset($this->_registry['default'])) { + return $this->_registry['default']; + } elseif ($use) { + $a = false; + return $a; + } + + // only go here if null was passed in + echo "CRITICAL ERROR: Registry could not be initialized from any value"; + exit(1); + } + + /** + * This is to allow customization like the use of installroot + * @param PEAR_Registry + * @return bool + */ + function setRegistry(&$reg, $layer = 'user') + { + if ($this->_noRegistry) { + return false; + } + + if (!in_array($layer, array('user', 'system'))) { + return false; + } + + $this->_registry[$layer] = &$reg; + if (is_object($reg)) { + $this->_registry[$layer]->setConfig($this, false); + } + + return true; + } + + function noRegistry() + { + $this->_noRegistry = true; + } + + /** + * @return PEAR_REST + */ + function &getREST($version, $options = array()) + { + $version = str_replace('.', '', $version); + if (!class_exists($class = 'PEAR_REST_' . $version)) { + require_once 'PEAR/REST/' . $version . '.php'; + } + + $remote = &new $class($this, $options); + return $remote; + } + + /** + * The ftp server is set in {@link readFTPConfigFile()}. It exists only if a + * remote configuration file has been specified + * @return PEAR_FTP|false + */ + function &getFTP() + { + if (isset($this->_ftp)) { + return $this->_ftp; + } + + $a = false; + return $a; + } + + function _prependPath($path, $prepend) + { + if (strlen($prepend) > 0) { + if (OS_WINDOWS && preg_match('/^[a-z]:/i', $path)) { + if (preg_match('/^[a-z]:/i', $prepend)) { + $prepend = substr($prepend, 2); + } elseif ($prepend{0} != '\\') { + $prepend = "\\$prepend"; + } + $path = substr($path, 0, 2) . $prepend . substr($path, 2); + } else { + $path = $prepend . $path; + } + } + return $path; + } + + /** + * @param string|false installation directory to prepend to all _dir variables, or false to + * disable + */ + function setInstallRoot($root) + { + if (substr($root, -1) == DIRECTORY_SEPARATOR) { + $root = substr($root, 0, -1); + } + $old = $this->_installRoot; + $this->_installRoot = $root; + if (($old != $root) && !$this->_noRegistry) { + foreach (array_keys($this->_registry) as $layer) { + if ($layer == 'ftp' || !isset($this->_registry[$layer])) { + continue; + } + $this->_registry[$layer] = + &new PEAR_Registry($this->get('php_dir', $layer, 'pear.php.net')); + $this->_registry[$layer]->setConfig($this, false); + $this->_regInitialized[$layer] = false; + } + } + } +} diff --git a/_piecrust/libs/PEAR/Dependency2.php b/_piecrust/libs/PEAR/Dependency2.php new file mode 100644 index 0000000..f3ddeb1 --- /dev/null +++ b/_piecrust/libs/PEAR/Dependency2.php @@ -0,0 +1,1358 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Dependency2.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * Required for the PEAR_VALIDATE_* constants + */ +require_once 'PEAR/Validate.php'; + +/** + * Dependency check for PEAR packages + * + * This class handles both version 1.0 and 2.0 dependencies + * WARNING: *any* changes to this class must be duplicated in the + * test_PEAR_Dependency2 class found in tests/PEAR_Dependency2/setup.php.inc, + * or unit tests will not actually validate the changes + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Dependency2 +{ + /** + * One of the PEAR_VALIDATE_* states + * @see PEAR_VALIDATE_NORMAL + * @var integer + */ + var $_state; + + /** + * Command-line options to install/upgrade/uninstall commands + * @param array + */ + var $_options; + + /** + * @var OS_Guess + */ + var $_os; + + /** + * @var PEAR_Registry + */ + var $_registry; + + /** + * @var PEAR_Config + */ + var $_config; + + /** + * @var PEAR_DependencyDB + */ + var $_dependencydb; + + /** + * Output of PEAR_Registry::parsedPackageName() + * @var array + */ + var $_currentPackage; + + /** + * @param PEAR_Config + * @param array installation options + * @param array format of PEAR_Registry::parsedPackageName() + * @param int installation state (one of PEAR_VALIDATE_*) + */ + function PEAR_Dependency2(&$config, $installoptions, $package, + $state = PEAR_VALIDATE_INSTALLING) + { + $this->_config = &$config; + if (!class_exists('PEAR_DependencyDB')) { + require_once 'PEAR/DependencyDB.php'; + } + + if (isset($installoptions['packagingroot'])) { + // make sure depdb is in the right location + $config->setInstallRoot($installoptions['packagingroot']); + } + + $this->_registry = &$config->getRegistry(); + $this->_dependencydb = &PEAR_DependencyDB::singleton($config); + if (isset($installoptions['packagingroot'])) { + $config->setInstallRoot(false); + } + + $this->_options = $installoptions; + $this->_state = $state; + if (!class_exists('OS_Guess')) { + require_once 'OS/Guess.php'; + } + + $this->_os = new OS_Guess; + $this->_currentPackage = $package; + } + + function _getExtraString($dep) + { + $extra = ' ('; + if (isset($dep['uri'])) { + return ''; + } + + if (isset($dep['recommended'])) { + $extra .= 'recommended version ' . $dep['recommended']; + } else { + if (isset($dep['min'])) { + $extra .= 'version >= ' . $dep['min']; + } + + if (isset($dep['max'])) { + if ($extra != ' (') { + $extra .= ', '; + } + $extra .= 'version <= ' . $dep['max']; + } + + if (isset($dep['exclude'])) { + if (!is_array($dep['exclude'])) { + $dep['exclude'] = array($dep['exclude']); + } + + if ($extra != ' (') { + $extra .= ', '; + } + + $extra .= 'excluded versions: '; + foreach ($dep['exclude'] as $i => $exclude) { + if ($i) { + $extra .= ', '; + } + $extra .= $exclude; + } + } + } + + $extra .= ')'; + if ($extra == ' ()') { + $extra = ''; + } + + return $extra; + } + + /** + * This makes unit-testing a heck of a lot easier + */ + function getPHP_OS() + { + return PHP_OS; + } + + /** + * This makes unit-testing a heck of a lot easier + */ + function getsysname() + { + return $this->_os->getSysname(); + } + + /** + * Specify a dependency on an OS. Use arch for detailed os/processor information + * + * There are two generic OS dependencies that will be the most common, unix and windows. + * Other options are linux, freebsd, darwin (OS X), sunos, irix, hpux, aix + */ + function validateOsDependency($dep) + { + if ($this->_state != PEAR_VALIDATE_INSTALLING && $this->_state != PEAR_VALIDATE_DOWNLOADING) { + return true; + } + + if ($dep['name'] == '*') { + return true; + } + + $not = isset($dep['conflicts']) ? true : false; + switch (strtolower($dep['name'])) { + case 'windows' : + if ($not) { + if (strtolower(substr($this->getPHP_OS(), 0, 3)) == 'win') { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError("Cannot install %s on Windows"); + } + + return $this->warning("warning: Cannot install %s on Windows"); + } + } else { + if (strtolower(substr($this->getPHP_OS(), 0, 3)) != 'win') { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError("Can only install %s on Windows"); + } + + return $this->warning("warning: Can only install %s on Windows"); + } + } + break; + case 'unix' : + $unices = array('linux', 'freebsd', 'darwin', 'sunos', 'irix', 'hpux', 'aix'); + if ($not) { + if (in_array($this->getSysname(), $unices)) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError("Cannot install %s on any Unix system"); + } + + return $this->warning( "warning: Cannot install %s on any Unix system"); + } + } else { + if (!in_array($this->getSysname(), $unices)) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError("Can only install %s on a Unix system"); + } + + return $this->warning("warning: Can only install %s on a Unix system"); + } + } + break; + default : + if ($not) { + if (strtolower($dep['name']) == strtolower($this->getSysname())) { + if (!isset($this->_options['nodeps']) && + !isset($this->_options['force'])) { + return $this->raiseError('Cannot install %s on ' . $dep['name'] . + ' operating system'); + } + + return $this->warning('warning: Cannot install %s on ' . + $dep['name'] . ' operating system'); + } + } else { + if (strtolower($dep['name']) != strtolower($this->getSysname())) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('Cannot install %s on ' . + $this->getSysname() . + ' operating system, can only install on ' . $dep['name']); + } + + return $this->warning('warning: Cannot install %s on ' . + $this->getSysname() . + ' operating system, can only install on ' . $dep['name']); + } + } + } + return true; + } + + /** + * This makes unit-testing a heck of a lot easier + */ + function matchSignature($pattern) + { + return $this->_os->matchSignature($pattern); + } + + /** + * Specify a complex dependency on an OS/processor/kernel version, + * Use OS for simple operating system dependency. + * + * This is the only dependency that accepts an eregable pattern. The pattern + * will be matched against the php_uname() output parsed by OS_Guess + */ + function validateArchDependency($dep) + { + if ($this->_state != PEAR_VALIDATE_INSTALLING) { + return true; + } + + $not = isset($dep['conflicts']) ? true : false; + if (!$this->matchSignature($dep['pattern'])) { + if (!$not) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s Architecture dependency failed, does not ' . + 'match "' . $dep['pattern'] . '"'); + } + + return $this->warning('warning: %s Architecture dependency failed, does ' . + 'not match "' . $dep['pattern'] . '"'); + } + + return true; + } + + if ($not) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s Architecture dependency failed, required "' . + $dep['pattern'] . '"'); + } + + return $this->warning('warning: %s Architecture dependency failed, ' . + 'required "' . $dep['pattern'] . '"'); + } + + return true; + } + + /** + * This makes unit-testing a heck of a lot easier + */ + function extension_loaded($name) + { + return extension_loaded($name); + } + + /** + * This makes unit-testing a heck of a lot easier + */ + function phpversion($name = null) + { + if ($name !== null) { + return phpversion($name); + } + + return phpversion(); + } + + function validateExtensionDependency($dep, $required = true) + { + if ($this->_state != PEAR_VALIDATE_INSTALLING && + $this->_state != PEAR_VALIDATE_DOWNLOADING) { + return true; + } + + $loaded = $this->extension_loaded($dep['name']); + $extra = $this->_getExtraString($dep); + if (isset($dep['exclude'])) { + if (!is_array($dep['exclude'])) { + $dep['exclude'] = array($dep['exclude']); + } + } + + if (!isset($dep['min']) && !isset($dep['max']) && + !isset($dep['recommended']) && !isset($dep['exclude']) + ) { + if ($loaded) { + if (isset($dep['conflicts'])) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s conflicts with PHP extension "' . + $dep['name'] . '"' . $extra); + } + + return $this->warning('warning: %s conflicts with PHP extension "' . + $dep['name'] . '"' . $extra); + } + + return true; + } + + if (isset($dep['conflicts'])) { + return true; + } + + if ($required) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s requires PHP extension "' . + $dep['name'] . '"' . $extra); + } + + return $this->warning('warning: %s requires PHP extension "' . + $dep['name'] . '"' . $extra); + } + + return $this->warning('%s can optionally use PHP extension "' . + $dep['name'] . '"' . $extra); + } + + if (!$loaded) { + if (isset($dep['conflicts'])) { + return true; + } + + if (!$required) { + return $this->warning('%s can optionally use PHP extension "' . + $dep['name'] . '"' . $extra); + } + + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s requires PHP extension "' . $dep['name'] . + '"' . $extra); + } + + return $this->warning('warning: %s requires PHP extension "' . $dep['name'] . + '"' . $extra); + } + + $version = (string) $this->phpversion($dep['name']); + if (empty($version)) { + $version = '0'; + } + + $fail = false; + if (isset($dep['min']) && !version_compare($version, $dep['min'], '>=')) { + $fail = true; + } + + if (isset($dep['max']) && !version_compare($version, $dep['max'], '<=')) { + $fail = true; + } + + if ($fail && !isset($dep['conflicts'])) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s requires PHP extension "' . $dep['name'] . + '"' . $extra . ', installed version is ' . $version); + } + + return $this->warning('warning: %s requires PHP extension "' . $dep['name'] . + '"' . $extra . ', installed version is ' . $version); + } elseif ((isset($dep['min']) || isset($dep['max'])) && !$fail && isset($dep['conflicts'])) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s conflicts with PHP extension "' . + $dep['name'] . '"' . $extra . ', installed version is ' . $version); + } + + return $this->warning('warning: %s conflicts with PHP extension "' . + $dep['name'] . '"' . $extra . ', installed version is ' . $version); + } + + if (isset($dep['exclude'])) { + foreach ($dep['exclude'] as $exclude) { + if (version_compare($version, $exclude, '==')) { + if (isset($dep['conflicts'])) { + continue; + } + + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s is not compatible with PHP extension "' . + $dep['name'] . '" version ' . + $exclude); + } + + return $this->warning('warning: %s is not compatible with PHP extension "' . + $dep['name'] . '" version ' . + $exclude); + } elseif (version_compare($version, $exclude, '!=') && isset($dep['conflicts'])) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s conflicts with PHP extension "' . + $dep['name'] . '"' . $extra . ', installed version is ' . $version); + } + + return $this->warning('warning: %s conflicts with PHP extension "' . + $dep['name'] . '"' . $extra . ', installed version is ' . $version); + } + } + } + + if (isset($dep['recommended'])) { + if (version_compare($version, $dep['recommended'], '==')) { + return true; + } + + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s dependency: PHP extension ' . $dep['name'] . + ' version "' . $version . '"' . + ' is not the recommended version "' . $dep['recommended'] . + '", but may be compatible, use --force to install'); + } + + return $this->warning('warning: %s dependency: PHP extension ' . + $dep['name'] . ' version "' . $version . '"' . + ' is not the recommended version "' . $dep['recommended'].'"'); + } + + return true; + } + + function validatePhpDependency($dep) + { + if ($this->_state != PEAR_VALIDATE_INSTALLING && + $this->_state != PEAR_VALIDATE_DOWNLOADING) { + return true; + } + + $version = $this->phpversion(); + $extra = $this->_getExtraString($dep); + if (isset($dep['exclude'])) { + if (!is_array($dep['exclude'])) { + $dep['exclude'] = array($dep['exclude']); + } + } + + if (isset($dep['min'])) { + if (!version_compare($version, $dep['min'], '>=')) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s requires PHP' . + $extra . ', installed version is ' . $version); + } + + return $this->warning('warning: %s requires PHP' . + $extra . ', installed version is ' . $version); + } + } + + if (isset($dep['max'])) { + if (!version_compare($version, $dep['max'], '<=')) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s requires PHP' . + $extra . ', installed version is ' . $version); + } + + return $this->warning('warning: %s requires PHP' . + $extra . ', installed version is ' . $version); + } + } + + if (isset($dep['exclude'])) { + foreach ($dep['exclude'] as $exclude) { + if (version_compare($version, $exclude, '==')) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s is not compatible with PHP version ' . + $exclude); + } + + return $this->warning( + 'warning: %s is not compatible with PHP version ' . + $exclude); + } + } + } + + return true; + } + + /** + * This makes unit-testing a heck of a lot easier + */ + function getPEARVersion() + { + return '1.9.4'; + } + + function validatePearinstallerDependency($dep) + { + $pearversion = $this->getPEARVersion(); + $extra = $this->_getExtraString($dep); + if (isset($dep['exclude'])) { + if (!is_array($dep['exclude'])) { + $dep['exclude'] = array($dep['exclude']); + } + } + + if (version_compare($pearversion, $dep['min'], '<')) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s requires PEAR Installer' . $extra . + ', installed version is ' . $pearversion); + } + + return $this->warning('warning: %s requires PEAR Installer' . $extra . + ', installed version is ' . $pearversion); + } + + if (isset($dep['max'])) { + if (version_compare($pearversion, $dep['max'], '>')) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s requires PEAR Installer' . $extra . + ', installed version is ' . $pearversion); + } + + return $this->warning('warning: %s requires PEAR Installer' . $extra . + ', installed version is ' . $pearversion); + } + } + + if (isset($dep['exclude'])) { + if (!isset($dep['exclude'][0])) { + $dep['exclude'] = array($dep['exclude']); + } + + foreach ($dep['exclude'] as $exclude) { + if (version_compare($exclude, $pearversion, '==')) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s is not compatible with PEAR Installer ' . + 'version ' . $exclude); + } + + return $this->warning('warning: %s is not compatible with PEAR ' . + 'Installer version ' . $exclude); + } + } + } + + return true; + } + + function validateSubpackageDependency($dep, $required, $params) + { + return $this->validatePackageDependency($dep, $required, $params); + } + + /** + * @param array dependency information (2.0 format) + * @param boolean whether this is a required dependency + * @param array a list of downloaded packages to be installed, if any + * @param boolean if true, then deps on pear.php.net that fail will also check + * against pecl.php.net packages to accomodate extensions that have + * moved to pecl.php.net from pear.php.net + */ + function validatePackageDependency($dep, $required, $params, $depv1 = false) + { + if ($this->_state != PEAR_VALIDATE_INSTALLING && + $this->_state != PEAR_VALIDATE_DOWNLOADING) { + return true; + } + + if (isset($dep['providesextension'])) { + if ($this->extension_loaded($dep['providesextension'])) { + $save = $dep; + $subdep = $dep; + $subdep['name'] = $subdep['providesextension']; + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $ret = $this->validateExtensionDependency($subdep, $required); + PEAR::popErrorHandling(); + if (!PEAR::isError($ret)) { + return true; + } + } + } + + if ($this->_state == PEAR_VALIDATE_INSTALLING) { + return $this->_validatePackageInstall($dep, $required, $depv1); + } + + if ($this->_state == PEAR_VALIDATE_DOWNLOADING) { + return $this->_validatePackageDownload($dep, $required, $params, $depv1); + } + } + + function _validatePackageDownload($dep, $required, $params, $depv1 = false) + { + $dep['package'] = $dep['name']; + if (isset($dep['uri'])) { + $dep['channel'] = '__uri'; + } + + $depname = $this->_registry->parsedPackageNameToString($dep, true); + $found = false; + foreach ($params as $param) { + if ($param->isEqual( + array('package' => $dep['name'], + 'channel' => $dep['channel']))) { + $found = true; + break; + } + + if ($depv1 && $dep['channel'] == 'pear.php.net') { + if ($param->isEqual( + array('package' => $dep['name'], + 'channel' => 'pecl.php.net'))) { + $found = true; + break; + } + } + } + + if (!$found && isset($dep['providesextension'])) { + foreach ($params as $param) { + if ($param->isExtension($dep['providesextension'])) { + $found = true; + break; + } + } + } + + if ($found) { + $version = $param->getVersion(); + $installed = false; + $downloaded = true; + } else { + if ($this->_registry->packageExists($dep['name'], $dep['channel'])) { + $installed = true; + $downloaded = false; + $version = $this->_registry->packageinfo($dep['name'], 'version', + $dep['channel']); + } else { + if ($dep['channel'] == 'pecl.php.net' && $this->_registry->packageExists($dep['name'], + 'pear.php.net')) { + $installed = true; + $downloaded = false; + $version = $this->_registry->packageinfo($dep['name'], 'version', + 'pear.php.net'); + } else { + $version = 'not installed or downloaded'; + $installed = false; + $downloaded = false; + } + } + } + + $extra = $this->_getExtraString($dep); + if (isset($dep['exclude']) && !is_array($dep['exclude'])) { + $dep['exclude'] = array($dep['exclude']); + } + + if (!isset($dep['min']) && !isset($dep['max']) && + !isset($dep['recommended']) && !isset($dep['exclude']) + ) { + if ($installed || $downloaded) { + $installed = $installed ? 'installed' : 'downloaded'; + if (isset($dep['conflicts'])) { + $rest = ''; + if ($version) { + $rest = ", $installed version is " . $version; + } + + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s conflicts with package "' . $depname . '"' . $extra . $rest); + } + + return $this->warning('warning: %s conflicts with package "' . $depname . '"' . $extra . $rest); + } + + return true; + } + + if (isset($dep['conflicts'])) { + return true; + } + + if ($required) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s requires package "' . $depname . '"' . $extra); + } + + return $this->warning('warning: %s requires package "' . $depname . '"' . $extra); + } + + return $this->warning('%s can optionally use package "' . $depname . '"' . $extra); + } + + if (!$installed && !$downloaded) { + if (isset($dep['conflicts'])) { + return true; + } + + if ($required) { + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s requires package "' . $depname . '"' . $extra); + } + + return $this->warning('warning: %s requires package "' . $depname . '"' . $extra); + } + + return $this->warning('%s can optionally use package "' . $depname . '"' . $extra); + } + + $fail = false; + if (isset($dep['min']) && version_compare($version, $dep['min'], '<')) { + $fail = true; + } + + if (isset($dep['max']) && version_compare($version, $dep['max'], '>')) { + $fail = true; + } + + if ($fail && !isset($dep['conflicts'])) { + $installed = $installed ? 'installed' : 'downloaded'; + $dep['package'] = $dep['name']; + $dep = $this->_registry->parsedPackageNameToString($dep, true); + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s requires package "' . $depname . '"' . + $extra . ", $installed version is " . $version); + } + + return $this->warning('warning: %s requires package "' . $depname . '"' . + $extra . ", $installed version is " . $version); + } elseif ((isset($dep['min']) || isset($dep['max'])) && !$fail && + isset($dep['conflicts']) && !isset($dep['exclude'])) { + $installed = $installed ? 'installed' : 'downloaded'; + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s conflicts with package "' . $depname . '"' . $extra . + ", $installed version is " . $version); + } + + return $this->warning('warning: %s conflicts with package "' . $depname . '"' . + $extra . ", $installed version is " . $version); + } + + if (isset($dep['exclude'])) { + $installed = $installed ? 'installed' : 'downloaded'; + foreach ($dep['exclude'] as $exclude) { + if (version_compare($version, $exclude, '==') && !isset($dep['conflicts'])) { + if (!isset($this->_options['nodeps']) && + !isset($this->_options['force']) + ) { + return $this->raiseError('%s is not compatible with ' . + $installed . ' package "' . + $depname . '" version ' . + $exclude); + } + + return $this->warning('warning: %s is not compatible with ' . + $installed . ' package "' . + $depname . '" version ' . + $exclude); + } elseif (version_compare($version, $exclude, '!=') && isset($dep['conflicts'])) { + $installed = $installed ? 'installed' : 'downloaded'; + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('%s conflicts with package "' . $depname . '"' . + $extra . ", $installed version is " . $version); + } + + return $this->warning('warning: %s conflicts with package "' . $depname . '"' . + $extra . ", $installed version is " . $version); + } + } + } + + if (isset($dep['recommended'])) { + $installed = $installed ? 'installed' : 'downloaded'; + if (version_compare($version, $dep['recommended'], '==')) { + return true; + } + + if (!$found && $installed) { + $param = $this->_registry->getPackage($dep['name'], $dep['channel']); + } + + if ($param) { + $found = false; + foreach ($params as $parent) { + if ($parent->isEqual($this->_currentPackage)) { + $found = true; + break; + } + } + + if ($found) { + if ($param->isCompatible($parent)) { + return true; + } + } else { // this is for validPackage() calls + $parent = $this->_registry->getPackage($this->_currentPackage['package'], + $this->_currentPackage['channel']); + if ($parent !== null && $param->isCompatible($parent)) { + return true; + } + } + } + + if (!isset($this->_options['nodeps']) && !isset($this->_options['force']) && + !isset($this->_options['loose']) + ) { + return $this->raiseError('%s dependency package "' . $depname . + '" ' . $installed . ' version ' . $version . + ' is not the recommended version ' . $dep['recommended'] . + ', but may be compatible, use --force to install'); + } + + return $this->warning('warning: %s dependency package "' . $depname . + '" ' . $installed . ' version ' . $version . + ' is not the recommended version ' . $dep['recommended']); + } + + return true; + } + + function _validatePackageInstall($dep, $required, $depv1 = false) + { + return $this->_validatePackageDownload($dep, $required, array(), $depv1); + } + + /** + * Verify that uninstalling packages passed in to command line is OK. + * + * @param PEAR_Installer $dl + * @return PEAR_Error|true + */ + function validatePackageUninstall(&$dl) + { + if (PEAR::isError($this->_dependencydb)) { + return $this->_dependencydb; + } + + $params = array(); + // construct an array of "downloaded" packages to fool the package dependency checker + // into using these to validate uninstalls of circular dependencies + $downloaded = &$dl->getUninstallPackages(); + foreach ($downloaded as $i => $pf) { + if (!class_exists('PEAR_Downloader_Package')) { + require_once 'PEAR/Downloader/Package.php'; + } + $dp = &new PEAR_Downloader_Package($dl); + $dp->setPackageFile($downloaded[$i]); + $params[$i] = &$dp; + } + + // check cache + $memyselfandI = strtolower($this->_currentPackage['channel']) . '/' . + strtolower($this->_currentPackage['package']); + if (isset($dl->___uninstall_package_cache)) { + $badpackages = $dl->___uninstall_package_cache; + if (isset($badpackages[$memyselfandI]['warnings'])) { + foreach ($badpackages[$memyselfandI]['warnings'] as $warning) { + $dl->log(0, $warning[0]); + } + } + + if (isset($badpackages[$memyselfandI]['errors'])) { + foreach ($badpackages[$memyselfandI]['errors'] as $error) { + if (is_array($error)) { + $dl->log(0, $error[0]); + } else { + $dl->log(0, $error->getMessage()); + } + } + + if (isset($this->_options['nodeps']) || isset($this->_options['force'])) { + return $this->warning( + 'warning: %s should not be uninstalled, other installed packages depend ' . + 'on this package'); + } + + return $this->raiseError( + '%s cannot be uninstalled, other installed packages depend on this package'); + } + + return true; + } + + // first, list the immediate parents of each package to be uninstalled + $perpackagelist = array(); + $allparents = array(); + foreach ($params as $i => $param) { + $a = array( + 'channel' => strtolower($param->getChannel()), + 'package' => strtolower($param->getPackage()) + ); + + $deps = $this->_dependencydb->getDependentPackages($a); + if ($deps) { + foreach ($deps as $d) { + $pardeps = $this->_dependencydb->getDependencies($d); + foreach ($pardeps as $dep) { + if (strtolower($dep['dep']['channel']) == $a['channel'] && + strtolower($dep['dep']['name']) == $a['package']) { + if (!isset($perpackagelist[$a['channel'] . '/' . $a['package']])) { + $perpackagelist[$a['channel'] . '/' . $a['package']] = array(); + } + $perpackagelist[$a['channel'] . '/' . $a['package']][] + = array($d['channel'] . '/' . $d['package'], $dep); + if (!isset($allparents[$d['channel'] . '/' . $d['package']])) { + $allparents[$d['channel'] . '/' . $d['package']] = array(); + } + if (!isset($allparents[$d['channel'] . '/' . $d['package']][$a['channel'] . '/' . $a['package']])) { + $allparents[$d['channel'] . '/' . $d['package']][$a['channel'] . '/' . $a['package']] = array(); + } + $allparents[$d['channel'] . '/' . $d['package']] + [$a['channel'] . '/' . $a['package']][] + = array($d, $dep); + } + } + } + } + } + + // next, remove any packages from the parents list that are not installed + $remove = array(); + foreach ($allparents as $parent => $d1) { + foreach ($d1 as $d) { + if ($this->_registry->packageExists($d[0][0]['package'], $d[0][0]['channel'])) { + continue; + } + $remove[$parent] = true; + } + } + + // next remove any packages from the parents list that are not passed in for + // uninstallation + foreach ($allparents as $parent => $d1) { + foreach ($d1 as $d) { + foreach ($params as $param) { + if (strtolower($param->getChannel()) == $d[0][0]['channel'] && + strtolower($param->getPackage()) == $d[0][0]['package']) { + // found it + continue 3; + } + } + $remove[$parent] = true; + } + } + + // remove all packages whose dependencies fail + // save which ones failed for error reporting + $badchildren = array(); + do { + $fail = false; + foreach ($remove as $package => $unused) { + if (!isset($allparents[$package])) { + continue; + } + + foreach ($allparents[$package] as $kid => $d1) { + foreach ($d1 as $depinfo) { + if ($depinfo[1]['type'] != 'optional') { + if (isset($badchildren[$kid])) { + continue; + } + $badchildren[$kid] = true; + $remove[$kid] = true; + $fail = true; + continue 2; + } + } + } + if ($fail) { + // start over, we removed some children + continue 2; + } + } + } while ($fail); + + // next, construct the list of packages that can't be uninstalled + $badpackages = array(); + $save = $this->_currentPackage; + foreach ($perpackagelist as $package => $packagedeps) { + foreach ($packagedeps as $parent) { + if (!isset($remove[$parent[0]])) { + continue; + } + + $packagename = $this->_registry->parsePackageName($parent[0]); + $packagename['channel'] = $this->_registry->channelAlias($packagename['channel']); + $pa = $this->_registry->getPackage($packagename['package'], $packagename['channel']); + $packagename['package'] = $pa->getPackage(); + $this->_currentPackage = $packagename; + // parent is not present in uninstall list, make sure we can actually + // uninstall it (parent dep is optional) + $parentname['channel'] = $this->_registry->channelAlias($parent[1]['dep']['channel']); + $pa = $this->_registry->getPackage($parent[1]['dep']['name'], $parent[1]['dep']['channel']); + $parentname['package'] = $pa->getPackage(); + $parent[1]['dep']['package'] = $parentname['package']; + $parent[1]['dep']['channel'] = $parentname['channel']; + if ($parent[1]['type'] == 'optional') { + $test = $this->_validatePackageUninstall($parent[1]['dep'], false, $dl); + if ($test !== true) { + $badpackages[$package]['warnings'][] = $test; + } + } else { + $test = $this->_validatePackageUninstall($parent[1]['dep'], true, $dl); + if ($test !== true) { + $badpackages[$package]['errors'][] = $test; + } + } + } + } + + $this->_currentPackage = $save; + $dl->___uninstall_package_cache = $badpackages; + if (isset($badpackages[$memyselfandI])) { + if (isset($badpackages[$memyselfandI]['warnings'])) { + foreach ($badpackages[$memyselfandI]['warnings'] as $warning) { + $dl->log(0, $warning[0]); + } + } + + if (isset($badpackages[$memyselfandI]['errors'])) { + foreach ($badpackages[$memyselfandI]['errors'] as $error) { + if (is_array($error)) { + $dl->log(0, $error[0]); + } else { + $dl->log(0, $error->getMessage()); + } + } + + if (isset($this->_options['nodeps']) || isset($this->_options['force'])) { + return $this->warning( + 'warning: %s should not be uninstalled, other installed packages depend ' . + 'on this package'); + } + + return $this->raiseError( + '%s cannot be uninstalled, other installed packages depend on this package'); + } + } + + return true; + } + + function _validatePackageUninstall($dep, $required, $dl) + { + $depname = $this->_registry->parsedPackageNameToString($dep, true); + $version = $this->_registry->packageinfo($dep['package'], 'version', $dep['channel']); + if (!$version) { + return true; + } + + $extra = $this->_getExtraString($dep); + if (isset($dep['exclude']) && !is_array($dep['exclude'])) { + $dep['exclude'] = array($dep['exclude']); + } + + if (isset($dep['conflicts'])) { + return true; // uninstall OK - these packages conflict (probably installed with --force) + } + + if (!isset($dep['min']) && !isset($dep['max'])) { + if (!$required) { + return $this->warning('"' . $depname . '" can be optionally used by ' . + 'installed package %s' . $extra); + } + + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError('"' . $depname . '" is required by ' . + 'installed package %s' . $extra); + } + + return $this->warning('warning: "' . $depname . '" is required by ' . + 'installed package %s' . $extra); + } + + $fail = false; + if (isset($dep['min']) && version_compare($version, $dep['min'], '>=')) { + $fail = true; + } + + if (isset($dep['max']) && version_compare($version, $dep['max'], '<=')) { + $fail = true; + } + + // we re-use this variable, preserve the original value + $saverequired = $required; + if (!$required) { + return $this->warning($depname . $extra . ' can be optionally used by installed package' . + ' "%s"'); + } + + if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { + return $this->raiseError($depname . $extra . ' is required by installed package' . + ' "%s"'); + } + + return $this->raiseError('warning: ' . $depname . $extra . + ' is required by installed package "%s"'); + } + + /** + * validate a downloaded package against installed packages + * + * As of PEAR 1.4.3, this will only validate + * + * @param array|PEAR_Downloader_Package|PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * $pkg package identifier (either + * array('package' => blah, 'channel' => blah) or an array with + * index 'info' referencing an object) + * @param PEAR_Downloader $dl + * @param array $params full list of packages to install + * @return true|PEAR_Error + */ + function validatePackage($pkg, &$dl, $params = array()) + { + if (is_array($pkg) && isset($pkg['info'])) { + $deps = $this->_dependencydb->getDependentPackageDependencies($pkg['info']); + } else { + $deps = $this->_dependencydb->getDependentPackageDependencies($pkg); + } + + $fail = false; + if ($deps) { + if (!class_exists('PEAR_Downloader_Package')) { + require_once 'PEAR/Downloader/Package.php'; + } + + $dp = &new PEAR_Downloader_Package($dl); + if (is_object($pkg)) { + $dp->setPackageFile($pkg); + } else { + $dp->setDownloadURL($pkg); + } + + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + foreach ($deps as $channel => $info) { + foreach ($info as $package => $ds) { + foreach ($params as $packd) { + if (strtolower($packd->getPackage()) == strtolower($package) && + $packd->getChannel() == $channel) { + $dl->log(3, 'skipping installed package check of "' . + $this->_registry->parsedPackageNameToString( + array('channel' => $channel, 'package' => $package), + true) . + '", version "' . $packd->getVersion() . '" will be ' . + 'downloaded and installed'); + continue 2; // jump to next package + } + } + + foreach ($ds as $d) { + $checker = &new PEAR_Dependency2($this->_config, $this->_options, + array('channel' => $channel, 'package' => $package), $this->_state); + $dep = $d['dep']; + $required = $d['type'] == 'required'; + $ret = $checker->_validatePackageDownload($dep, $required, array(&$dp)); + if (is_array($ret)) { + $dl->log(0, $ret[0]); + } elseif (PEAR::isError($ret)) { + $dl->log(0, $ret->getMessage()); + $fail = true; + } + } + } + } + PEAR::popErrorHandling(); + } + + if ($fail) { + return $this->raiseError( + '%s cannot be installed, conflicts with installed packages'); + } + + return true; + } + + /** + * validate a package.xml 1.0 dependency + */ + function validateDependency1($dep, $params = array()) + { + if (!isset($dep['optional'])) { + $dep['optional'] = 'no'; + } + + list($newdep, $type) = $this->normalizeDep($dep); + if (!$newdep) { + return $this->raiseError("Invalid Dependency"); + } + + if (method_exists($this, "validate{$type}Dependency")) { + return $this->{"validate{$type}Dependency"}($newdep, $dep['optional'] == 'no', + $params, true); + } + } + + /** + * Convert a 1.0 dep into a 2.0 dep + */ + function normalizeDep($dep) + { + $types = array( + 'pkg' => 'Package', + 'ext' => 'Extension', + 'os' => 'Os', + 'php' => 'Php' + ); + + if (!isset($types[$dep['type']])) { + return array(false, false); + } + + $type = $types[$dep['type']]; + + $newdep = array(); + switch ($type) { + case 'Package' : + $newdep['channel'] = 'pear.php.net'; + case 'Extension' : + case 'Os' : + $newdep['name'] = $dep['name']; + break; + } + + $dep['rel'] = PEAR_Dependency2::signOperator($dep['rel']); + switch ($dep['rel']) { + case 'has' : + return array($newdep, $type); + break; + case 'not' : + $newdep['conflicts'] = true; + break; + case '>=' : + case '>' : + $newdep['min'] = $dep['version']; + if ($dep['rel'] == '>') { + $newdep['exclude'] = $dep['version']; + } + break; + case '<=' : + case '<' : + $newdep['max'] = $dep['version']; + if ($dep['rel'] == '<') { + $newdep['exclude'] = $dep['version']; + } + break; + case 'ne' : + case '!=' : + $newdep['min'] = '0'; + $newdep['max'] = '100000'; + $newdep['exclude'] = $dep['version']; + break; + case '==' : + $newdep['min'] = $dep['version']; + $newdep['max'] = $dep['version']; + break; + } + if ($type == 'Php') { + if (!isset($newdep['min'])) { + $newdep['min'] = '4.4.0'; + } + + if (!isset($newdep['max'])) { + $newdep['max'] = '6.0.0'; + } + } + return array($newdep, $type); + } + + /** + * Converts text comparing operators to them sign equivalents + * + * Example: 'ge' to '>=' + * + * @access public + * @param string Operator + * @return string Sign equivalent + */ + function signOperator($operator) + { + switch($operator) { + case 'lt': return '<'; + case 'le': return '<='; + case 'gt': return '>'; + case 'ge': return '>='; + case 'eq': return '=='; + case 'ne': return '!='; + default: + return $operator; + } + } + + function raiseError($msg) + { + if (isset($this->_options['ignore-errors'])) { + return $this->warning($msg); + } + + return PEAR::raiseError(sprintf($msg, $this->_registry->parsedPackageNameToString( + $this->_currentPackage, true))); + } + + function warning($msg) + { + return array(sprintf($msg, $this->_registry->parsedPackageNameToString( + $this->_currentPackage, true))); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/DependencyDB.php b/_piecrust/libs/PEAR/DependencyDB.php new file mode 100644 index 0000000..948f0c9 --- /dev/null +++ b/_piecrust/libs/PEAR/DependencyDB.php @@ -0,0 +1,769 @@ + + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: DependencyDB.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * Needed for error handling + */ +require_once 'PEAR.php'; +require_once 'PEAR/Config.php'; + +$GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'] = array(); +/** + * Track dependency relationships between installed packages + * @category pear + * @package PEAR + * @author Greg Beaver + * @author Tomas V.V.Cox + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_DependencyDB +{ + // {{{ properties + + /** + * This is initialized by {@link setConfig()} + * @var PEAR_Config + * @access private + */ + var $_config; + /** + * This is initialized by {@link setConfig()} + * @var PEAR_Registry + * @access private + */ + var $_registry; + /** + * Filename of the dependency DB (usually .depdb) + * @var string + * @access private + */ + var $_depdb = false; + /** + * File name of the lockfile (usually .depdblock) + * @var string + * @access private + */ + var $_lockfile = false; + /** + * Open file resource for locking the lockfile + * @var resource|false + * @access private + */ + var $_lockFp = false; + /** + * API version of this class, used to validate a file on-disk + * @var string + * @access private + */ + var $_version = '1.0'; + /** + * Cached dependency database file + * @var array|null + * @access private + */ + var $_cache; + + // }}} + // {{{ & singleton() + + /** + * Get a raw dependency database. Calls setConfig() and assertDepsDB() + * @param PEAR_Config + * @param string|false full path to the dependency database, or false to use default + * @return PEAR_DependencyDB|PEAR_Error + * @static + */ + function &singleton(&$config, $depdb = false) + { + $phpdir = $config->get('php_dir', null, 'pear.php.net'); + if (!isset($GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'][$phpdir])) { + $a = new PEAR_DependencyDB; + $GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'][$phpdir] = &$a; + $a->setConfig($config, $depdb); + $e = $a->assertDepsDB(); + if (PEAR::isError($e)) { + return $e; + } + } + + return $GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'][$phpdir]; + } + + /** + * Set up the registry/location of dependency DB + * @param PEAR_Config|false + * @param string|false full path to the dependency database, or false to use default + */ + function setConfig(&$config, $depdb = false) + { + if (!$config) { + $this->_config = &PEAR_Config::singleton(); + } else { + $this->_config = &$config; + } + + $this->_registry = &$this->_config->getRegistry(); + if (!$depdb) { + $this->_depdb = $this->_config->get('php_dir', null, 'pear.php.net') . + DIRECTORY_SEPARATOR . '.depdb'; + } else { + $this->_depdb = $depdb; + } + + $this->_lockfile = dirname($this->_depdb) . DIRECTORY_SEPARATOR . '.depdblock'; + } + // }}} + + function hasWriteAccess() + { + if (!file_exists($this->_depdb)) { + $dir = $this->_depdb; + while ($dir && $dir != '.') { + $dir = dirname($dir); // cd .. + if ($dir != '.' && file_exists($dir)) { + if (is_writeable($dir)) { + return true; + } + + return false; + } + } + + return false; + } + + return is_writeable($this->_depdb); + } + + // {{{ assertDepsDB() + + /** + * Create the dependency database, if it doesn't exist. Error if the database is + * newer than the code reading it. + * @return void|PEAR_Error + */ + function assertDepsDB() + { + if (!is_file($this->_depdb)) { + $this->rebuildDB(); + return; + } + + $depdb = $this->_getDepDB(); + // Datatype format has been changed, rebuild the Deps DB + if ($depdb['_version'] < $this->_version) { + $this->rebuildDB(); + } + + if ($depdb['_version']{0} > $this->_version{0}) { + return PEAR::raiseError('Dependency database is version ' . + $depdb['_version'] . ', and we are version ' . + $this->_version . ', cannot continue'); + } + } + + /** + * Get a list of installed packages that depend on this package + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2|array + * @return array|false + */ + function getDependentPackages(&$pkg) + { + $data = $this->_getDepDB(); + if (is_object($pkg)) { + $channel = strtolower($pkg->getChannel()); + $package = strtolower($pkg->getPackage()); + } else { + $channel = strtolower($pkg['channel']); + $package = strtolower($pkg['package']); + } + + if (isset($data['packages'][$channel][$package])) { + return $data['packages'][$channel][$package]; + } + + return false; + } + + /** + * Get a list of the actual dependencies of installed packages that depend on + * a package. + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2|array + * @return array|false + */ + function getDependentPackageDependencies(&$pkg) + { + $data = $this->_getDepDB(); + if (is_object($pkg)) { + $channel = strtolower($pkg->getChannel()); + $package = strtolower($pkg->getPackage()); + } else { + $channel = strtolower($pkg['channel']); + $package = strtolower($pkg['package']); + } + + $depend = $this->getDependentPackages($pkg); + if (!$depend) { + return false; + } + + $dependencies = array(); + foreach ($depend as $info) { + $temp = $this->getDependencies($info); + foreach ($temp as $dep) { + if ( + isset($dep['dep'], $dep['dep']['channel'], $dep['dep']['name']) && + strtolower($dep['dep']['channel']) == $channel && + strtolower($dep['dep']['name']) == $package + ) { + if (!isset($dependencies[$info['channel']])) { + $dependencies[$info['channel']] = array(); + } + + if (!isset($dependencies[$info['channel']][$info['package']])) { + $dependencies[$info['channel']][$info['package']] = array(); + } + $dependencies[$info['channel']][$info['package']][] = $dep; + } + } + } + + return $dependencies; + } + + /** + * Get a list of dependencies of this installed package + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2|array + * @return array|false + */ + function getDependencies(&$pkg) + { + if (is_object($pkg)) { + $channel = strtolower($pkg->getChannel()); + $package = strtolower($pkg->getPackage()); + } else { + $channel = strtolower($pkg['channel']); + $package = strtolower($pkg['package']); + } + + $data = $this->_getDepDB(); + if (isset($data['dependencies'][$channel][$package])) { + return $data['dependencies'][$channel][$package]; + } + + return false; + } + + /** + * Determine whether $parent depends on $child, near or deep + * @param array|PEAR_PackageFile_v2|PEAR_PackageFile_v2 + * @param array|PEAR_PackageFile_v2|PEAR_PackageFile_v2 + */ + function dependsOn($parent, $child) + { + $c = array(); + $this->_getDepDB(); + return $this->_dependsOn($parent, $child, $c); + } + + function _dependsOn($parent, $child, &$checked) + { + if (is_object($parent)) { + $channel = strtolower($parent->getChannel()); + $package = strtolower($parent->getPackage()); + } else { + $channel = strtolower($parent['channel']); + $package = strtolower($parent['package']); + } + + if (is_object($child)) { + $depchannel = strtolower($child->getChannel()); + $deppackage = strtolower($child->getPackage()); + } else { + $depchannel = strtolower($child['channel']); + $deppackage = strtolower($child['package']); + } + + if (isset($checked[$channel][$package][$depchannel][$deppackage])) { + return false; // avoid endless recursion + } + + $checked[$channel][$package][$depchannel][$deppackage] = true; + if (!isset($this->_cache['dependencies'][$channel][$package])) { + return false; + } + + foreach ($this->_cache['dependencies'][$channel][$package] as $info) { + if (isset($info['dep']['uri'])) { + if (is_object($child)) { + if ($info['dep']['uri'] == $child->getURI()) { + return true; + } + } elseif (isset($child['uri'])) { + if ($info['dep']['uri'] == $child['uri']) { + return true; + } + } + return false; + } + + if (strtolower($info['dep']['channel']) == $depchannel && + strtolower($info['dep']['name']) == $deppackage) { + return true; + } + } + + foreach ($this->_cache['dependencies'][$channel][$package] as $info) { + if (isset($info['dep']['uri'])) { + if ($this->_dependsOn(array( + 'uri' => $info['dep']['uri'], + 'package' => $info['dep']['name']), $child, $checked)) { + return true; + } + } else { + if ($this->_dependsOn(array( + 'channel' => $info['dep']['channel'], + 'package' => $info['dep']['name']), $child, $checked)) { + return true; + } + } + } + + return false; + } + + /** + * Register dependencies of a package that is being installed or upgraded + * @param PEAR_PackageFile_v2|PEAR_PackageFile_v2 + */ + function installPackage(&$package) + { + $data = $this->_getDepDB(); + unset($this->_cache); + $this->_setPackageDeps($data, $package); + $this->_writeDepDB($data); + } + + /** + * Remove dependencies of a package that is being uninstalled, or upgraded. + * + * Upgraded packages first uninstall, then install + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2|array If an array, then it must have + * indices 'channel' and 'package' + */ + function uninstallPackage(&$pkg) + { + $data = $this->_getDepDB(); + unset($this->_cache); + if (is_object($pkg)) { + $channel = strtolower($pkg->getChannel()); + $package = strtolower($pkg->getPackage()); + } else { + $channel = strtolower($pkg['channel']); + $package = strtolower($pkg['package']); + } + + if (!isset($data['dependencies'][$channel][$package])) { + return true; + } + + foreach ($data['dependencies'][$channel][$package] as $dep) { + $found = false; + $depchannel = isset($dep['dep']['uri']) ? '__uri' : strtolower($dep['dep']['channel']); + $depname = strtolower($dep['dep']['name']); + if (isset($data['packages'][$depchannel][$depname])) { + foreach ($data['packages'][$depchannel][$depname] as $i => $info) { + if ($info['channel'] == $channel && $info['package'] == $package) { + $found = true; + break; + } + } + } + + if ($found) { + unset($data['packages'][$depchannel][$depname][$i]); + if (!count($data['packages'][$depchannel][$depname])) { + unset($data['packages'][$depchannel][$depname]); + if (!count($data['packages'][$depchannel])) { + unset($data['packages'][$depchannel]); + } + } else { + $data['packages'][$depchannel][$depname] = + array_values($data['packages'][$depchannel][$depname]); + } + } + } + + unset($data['dependencies'][$channel][$package]); + if (!count($data['dependencies'][$channel])) { + unset($data['dependencies'][$channel]); + } + + if (!count($data['dependencies'])) { + unset($data['dependencies']); + } + + if (!count($data['packages'])) { + unset($data['packages']); + } + + $this->_writeDepDB($data); + } + + /** + * Rebuild the dependency DB by reading registry entries. + * @return true|PEAR_Error + */ + function rebuildDB() + { + $depdb = array('_version' => $this->_version); + if (!$this->hasWriteAccess()) { + // allow startup for read-only with older Registry + return $depdb; + } + + $packages = $this->_registry->listAllPackages(); + if (PEAR::isError($packages)) { + return $packages; + } + + foreach ($packages as $channel => $ps) { + foreach ($ps as $package) { + $package = $this->_registry->getPackage($package, $channel); + if (PEAR::isError($package)) { + return $package; + } + $this->_setPackageDeps($depdb, $package); + } + } + + $error = $this->_writeDepDB($depdb); + if (PEAR::isError($error)) { + return $error; + } + + $this->_cache = $depdb; + return true; + } + + /** + * Register usage of the dependency DB to prevent race conditions + * @param int one of the LOCK_* constants + * @return true|PEAR_Error + * @access private + */ + function _lock($mode = LOCK_EX) + { + if (stristr(php_uname(), 'Windows 9')) { + return true; + } + + if ($mode != LOCK_UN && is_resource($this->_lockFp)) { + // XXX does not check type of lock (LOCK_SH/LOCK_EX) + return true; + } + + $open_mode = 'w'; + // XXX People reported problems with LOCK_SH and 'w' + if ($mode === LOCK_SH) { + if (!file_exists($this->_lockfile)) { + touch($this->_lockfile); + } elseif (!is_file($this->_lockfile)) { + return PEAR::raiseError('could not create Dependency lock file, ' . + 'it exists and is not a regular file'); + } + $open_mode = 'r'; + } + + if (!is_resource($this->_lockFp)) { + $this->_lockFp = @fopen($this->_lockfile, $open_mode); + } + + if (!is_resource($this->_lockFp)) { + return PEAR::raiseError("could not create Dependency lock file" . + (isset($php_errormsg) ? ": " . $php_errormsg : "")); + } + + if (!(int)flock($this->_lockFp, $mode)) { + switch ($mode) { + case LOCK_SH: $str = 'shared'; break; + case LOCK_EX: $str = 'exclusive'; break; + case LOCK_UN: $str = 'unlock'; break; + default: $str = 'unknown'; break; + } + + return PEAR::raiseError("could not acquire $str lock ($this->_lockfile)"); + } + + return true; + } + + /** + * Release usage of dependency DB + * @return true|PEAR_Error + * @access private + */ + function _unlock() + { + $ret = $this->_lock(LOCK_UN); + if (is_resource($this->_lockFp)) { + fclose($this->_lockFp); + } + $this->_lockFp = null; + return $ret; + } + + /** + * Load the dependency database from disk, or return the cache + * @return array|PEAR_Error + */ + function _getDepDB() + { + if (!$this->hasWriteAccess()) { + return array('_version' => $this->_version); + } + + if (isset($this->_cache)) { + return $this->_cache; + } + + if (!$fp = fopen($this->_depdb, 'r')) { + $err = PEAR::raiseError("Could not open dependencies file `".$this->_depdb."'"); + return $err; + } + + $rt = get_magic_quotes_runtime(); + set_magic_quotes_runtime(0); + clearstatcache(); + fclose($fp); + $data = unserialize(file_get_contents($this->_depdb)); + set_magic_quotes_runtime($rt); + $this->_cache = $data; + return $data; + } + + /** + * Write out the dependency database to disk + * @param array the database + * @return true|PEAR_Error + * @access private + */ + function _writeDepDB(&$deps) + { + if (PEAR::isError($e = $this->_lock(LOCK_EX))) { + return $e; + } + + if (!$fp = fopen($this->_depdb, 'wb')) { + $this->_unlock(); + return PEAR::raiseError("Could not open dependencies file `".$this->_depdb."' for writing"); + } + + $rt = get_magic_quotes_runtime(); + set_magic_quotes_runtime(0); + fwrite($fp, serialize($deps)); + set_magic_quotes_runtime($rt); + fclose($fp); + $this->_unlock(); + $this->_cache = $deps; + return true; + } + + /** + * Register all dependencies from a package in the dependencies database, in essence + * "installing" the package's dependency information + * @param array the database + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @access private + */ + function _setPackageDeps(&$data, &$pkg) + { + $pkg->setConfig($this->_config); + if ($pkg->getPackagexmlVersion() == '1.0') { + $gen = &$pkg->getDefaultGenerator(); + $deps = $gen->dependenciesToV2(); + } else { + $deps = $pkg->getDeps(true); + } + + if (!$deps) { + return; + } + + if (!is_array($data)) { + $data = array(); + } + + if (!isset($data['dependencies'])) { + $data['dependencies'] = array(); + } + + $channel = strtolower($pkg->getChannel()); + $package = strtolower($pkg->getPackage()); + + if (!isset($data['dependencies'][$channel])) { + $data['dependencies'][$channel] = array(); + } + + $data['dependencies'][$channel][$package] = array(); + if (isset($deps['required']['package'])) { + if (!isset($deps['required']['package'][0])) { + $deps['required']['package'] = array($deps['required']['package']); + } + + foreach ($deps['required']['package'] as $dep) { + $this->_registerDep($data, $pkg, $dep, 'required'); + } + } + + if (isset($deps['optional']['package'])) { + if (!isset($deps['optional']['package'][0])) { + $deps['optional']['package'] = array($deps['optional']['package']); + } + + foreach ($deps['optional']['package'] as $dep) { + $this->_registerDep($data, $pkg, $dep, 'optional'); + } + } + + if (isset($deps['required']['subpackage'])) { + if (!isset($deps['required']['subpackage'][0])) { + $deps['required']['subpackage'] = array($deps['required']['subpackage']); + } + + foreach ($deps['required']['subpackage'] as $dep) { + $this->_registerDep($data, $pkg, $dep, 'required'); + } + } + + if (isset($deps['optional']['subpackage'])) { + if (!isset($deps['optional']['subpackage'][0])) { + $deps['optional']['subpackage'] = array($deps['optional']['subpackage']); + } + + foreach ($deps['optional']['subpackage'] as $dep) { + $this->_registerDep($data, $pkg, $dep, 'optional'); + } + } + + if (isset($deps['group'])) { + if (!isset($deps['group'][0])) { + $deps['group'] = array($deps['group']); + } + + foreach ($deps['group'] as $group) { + if (isset($group['package'])) { + if (!isset($group['package'][0])) { + $group['package'] = array($group['package']); + } + + foreach ($group['package'] as $dep) { + $this->_registerDep($data, $pkg, $dep, 'optional', + $group['attribs']['name']); + } + } + + if (isset($group['subpackage'])) { + if (!isset($group['subpackage'][0])) { + $group['subpackage'] = array($group['subpackage']); + } + + foreach ($group['subpackage'] as $dep) { + $this->_registerDep($data, $pkg, $dep, 'optional', + $group['attribs']['name']); + } + } + } + } + + if ($data['dependencies'][$channel][$package] == array()) { + unset($data['dependencies'][$channel][$package]); + if (!count($data['dependencies'][$channel])) { + unset($data['dependencies'][$channel]); + } + } + } + + /** + * @param array the database + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @param array the specific dependency + * @param required|optional whether this is a required or an optional dep + * @param string|false dependency group this dependency is from, or false for ordinary dep + */ + function _registerDep(&$data, &$pkg, $dep, $type, $group = false) + { + $info = array( + 'dep' => $dep, + 'type' => $type, + 'group' => $group + ); + + $dep = array_map('strtolower', $dep); + $depchannel = isset($dep['channel']) ? $dep['channel'] : '__uri'; + if (!isset($data['dependencies'])) { + $data['dependencies'] = array(); + } + + $channel = strtolower($pkg->getChannel()); + $package = strtolower($pkg->getPackage()); + + if (!isset($data['dependencies'][$channel])) { + $data['dependencies'][$channel] = array(); + } + + if (!isset($data['dependencies'][$channel][$package])) { + $data['dependencies'][$channel][$package] = array(); + } + + $data['dependencies'][$channel][$package][] = $info; + if (isset($data['packages'][$depchannel][$dep['name']])) { + $found = false; + foreach ($data['packages'][$depchannel][$dep['name']] as $i => $p) { + if ($p['channel'] == $channel && $p['package'] == $package) { + $found = true; + break; + } + } + } else { + if (!isset($data['packages'])) { + $data['packages'] = array(); + } + + if (!isset($data['packages'][$depchannel])) { + $data['packages'][$depchannel] = array(); + } + + if (!isset($data['packages'][$depchannel][$dep['name']])) { + $data['packages'][$depchannel][$dep['name']] = array(); + } + + $found = false; + } + + if (!$found) { + $data['packages'][$depchannel][$dep['name']][] = array( + 'channel' => $channel, + 'package' => $package + ); + } + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Downloader.php b/_piecrust/libs/PEAR/Downloader.php new file mode 100644 index 0000000..730df0b --- /dev/null +++ b/_piecrust/libs/PEAR/Downloader.php @@ -0,0 +1,1766 @@ + + * @author Stig Bakken + * @author Tomas V. V. Cox + * @author Martin Jansen + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Downloader.php 313024 2011-07-06 19:51:24Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.3.0 + */ + +/** + * Needed for constants, extending + */ +require_once 'PEAR/Common.php'; + +define('PEAR_INSTALLER_OK', 1); +define('PEAR_INSTALLER_FAILED', 0); +define('PEAR_INSTALLER_SKIPPED', -1); +define('PEAR_INSTALLER_ERROR_NO_PREF_STATE', 2); + +/** + * Administration class used to download anything from the internet (PEAR Packages, + * static URLs, xml files) + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @author Stig Bakken + * @author Tomas V. V. Cox + * @author Martin Jansen + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.3.0 + */ +class PEAR_Downloader extends PEAR_Common +{ + /** + * @var PEAR_Registry + * @access private + */ + var $_registry; + + /** + * Preferred Installation State (snapshot, devel, alpha, beta, stable) + * @var string|null + * @access private + */ + var $_preferredState; + + /** + * Options from command-line passed to Install. + * + * Recognized options:
        + * - onlyreqdeps : install all required dependencies as well + * - alldeps : install all dependencies, including optional + * - installroot : base relative path to install files in + * - force : force a download even if warnings would prevent it + * - nocompress : download uncompressed tarballs + * @see PEAR_Command_Install + * @access private + * @var array + */ + var $_options; + + /** + * Downloaded Packages after a call to download(). + * + * Format of each entry: + * + * + * array('pkg' => 'package_name', 'file' => '/path/to/local/file', + * 'info' => array() // parsed package.xml + * ); + * + * @access private + * @var array + */ + var $_downloadedPackages = array(); + + /** + * Packages slated for download. + * + * This is used to prevent downloading a package more than once should it be a dependency + * for two packages to be installed. + * Format of each entry: + * + *
        +     * array('package_name1' => parsed package.xml, 'package_name2' => parsed package.xml,
        +     * );
        +     * 
        + * @access private + * @var array + */ + var $_toDownload = array(); + + /** + * Array of every package installed, with names lower-cased. + * + * Format: + * + * array('package1' => 0, 'package2' => 1, ); + * + * @var array + */ + var $_installed = array(); + + /** + * @var array + * @access private + */ + var $_errorStack = array(); + + /** + * @var boolean + * @access private + */ + var $_internalDownload = false; + + /** + * Temporary variable used in sorting packages by dependency in {@link sortPkgDeps()} + * @var array + * @access private + */ + var $_packageSortTree; + + /** + * Temporary directory, or configuration value where downloads will occur + * @var string + */ + var $_downloadDir; + + /** + * @param PEAR_Frontend_* + * @param array + * @param PEAR_Config + */ + function PEAR_Downloader(&$ui, $options, &$config) + { + parent::PEAR_Common(); + $this->_options = $options; + $this->config = &$config; + $this->_preferredState = $this->config->get('preferred_state'); + $this->ui = &$ui; + if (!$this->_preferredState) { + // don't inadvertantly use a non-set preferred_state + $this->_preferredState = null; + } + + if (isset($this->_options['installroot'])) { + $this->config->setInstallRoot($this->_options['installroot']); + } + $this->_registry = &$config->getRegistry(); + + if (isset($this->_options['alldeps']) || isset($this->_options['onlyreqdeps'])) { + $this->_installed = $this->_registry->listAllPackages(); + foreach ($this->_installed as $key => $unused) { + if (!count($unused)) { + continue; + } + $strtolower = create_function('$a','return strtolower($a);'); + array_walk($this->_installed[$key], $strtolower); + } + } + } + + /** + * Attempt to discover a channel's remote capabilities from + * its server name + * @param string + * @return boolean + */ + function discover($channel) + { + $this->log(1, 'Attempting to discover channel "' . $channel . '"...'); + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $callback = $this->ui ? array(&$this, '_downloadCallback') : null; + if (!class_exists('System')) { + require_once 'System.php'; + } + + $tmpdir = $this->config->get('temp_dir'); + $tmp = System::mktemp('-d -t "' . $tmpdir . '"'); + $a = $this->downloadHttp('http://' . $channel . '/channel.xml', $this->ui, $tmp, $callback, false); + PEAR::popErrorHandling(); + if (PEAR::isError($a)) { + // Attempt to fallback to https automatically. + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $this->log(1, 'Attempting fallback to https instead of http on channel "' . $channel . '"...'); + $a = $this->downloadHttp('https://' . $channel . '/channel.xml', $this->ui, $tmp, $callback, false); + PEAR::popErrorHandling(); + if (PEAR::isError($a)) { + return false; + } + } + + list($a, $lastmodified) = $a; + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } + + $b = new PEAR_ChannelFile; + if ($b->fromXmlFile($a)) { + unlink($a); + if ($this->config->get('auto_discover')) { + $this->_registry->addChannel($b, $lastmodified); + $alias = $b->getName(); + if ($b->getName() == $this->_registry->channelName($b->getAlias())) { + $alias = $b->getAlias(); + } + + $this->log(1, 'Auto-discovered channel "' . $channel . + '", alias "' . $alias . '", adding to registry'); + } + + return true; + } + + unlink($a); + return false; + } + + /** + * For simpler unit-testing + * @param PEAR_Downloader + * @return PEAR_Downloader_Package + */ + function &newDownloaderPackage(&$t) + { + if (!class_exists('PEAR_Downloader_Package')) { + require_once 'PEAR/Downloader/Package.php'; + } + $a = &new PEAR_Downloader_Package($t); + return $a; + } + + /** + * For simpler unit-testing + * @param PEAR_Config + * @param array + * @param array + * @param int + */ + function &getDependency2Object(&$c, $i, $p, $s) + { + if (!class_exists('PEAR_Dependency2')) { + require_once 'PEAR/Dependency2.php'; + } + $z = &new PEAR_Dependency2($c, $i, $p, $s); + return $z; + } + + function &download($params) + { + if (!count($params)) { + $a = array(); + return $a; + } + + if (!isset($this->_registry)) { + $this->_registry = &$this->config->getRegistry(); + } + + $channelschecked = array(); + // convert all parameters into PEAR_Downloader_Package objects + foreach ($params as $i => $param) { + $params[$i] = &$this->newDownloaderPackage($this); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $err = $params[$i]->initialize($param); + PEAR::staticPopErrorHandling(); + if (!$err) { + // skip parameters that were missed by preferred_state + continue; + } + + if (PEAR::isError($err)) { + if (!isset($this->_options['soft']) && $err->getMessage() !== '') { + $this->log(0, $err->getMessage()); + } + + $params[$i] = false; + if (is_object($param)) { + $param = $param->getChannel() . '/' . $param->getPackage(); + } + + if (!isset($this->_options['soft'])) { + $this->log(2, 'Package "' . $param . '" is not valid'); + } + + // Message logged above in a specific verbose mode, passing null to not show up on CLI + $this->pushError(null, PEAR_INSTALLER_SKIPPED); + } else { + do { + if ($params[$i] && $params[$i]->getType() == 'local') { + // bug #7090 skip channel.xml check for local packages + break; + } + + if ($params[$i] && !isset($channelschecked[$params[$i]->getChannel()]) && + !isset($this->_options['offline']) + ) { + $channelschecked[$params[$i]->getChannel()] = true; + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + if (!class_exists('System')) { + require_once 'System.php'; + } + + $curchannel = &$this->_registry->getChannel($params[$i]->getChannel()); + if (PEAR::isError($curchannel)) { + PEAR::staticPopErrorHandling(); + return $this->raiseError($curchannel); + } + + if (PEAR::isError($dir = $this->getDownloadDir())) { + PEAR::staticPopErrorHandling(); + break; + } + + $mirror = $this->config->get('preferred_mirror', null, $params[$i]->getChannel()); + $url = 'http://' . $mirror . '/channel.xml'; + $a = $this->downloadHttp($url, $this->ui, $dir, null, $curchannel->lastModified()); + + PEAR::staticPopErrorHandling(); + if (PEAR::isError($a) || !$a) { + // Attempt fallback to https automatically + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $a = $this->downloadHttp('https://' . $mirror . + '/channel.xml', $this->ui, $dir, null, $curchannel->lastModified()); + + PEAR::staticPopErrorHandling(); + if (PEAR::isError($a) || !$a) { + break; + } + } + $this->log(0, 'WARNING: channel "' . $params[$i]->getChannel() . '" has ' . + 'updated its protocols, use "' . PEAR_RUNTYPE . ' channel-update ' . $params[$i]->getChannel() . + '" to update'); + } + } while (false); + + if ($params[$i] && !isset($this->_options['downloadonly'])) { + if (isset($this->_options['packagingroot'])) { + $checkdir = $this->_prependPath( + $this->config->get('php_dir', null, $params[$i]->getChannel()), + $this->_options['packagingroot']); + } else { + $checkdir = $this->config->get('php_dir', + null, $params[$i]->getChannel()); + } + + while ($checkdir && $checkdir != '/' && !file_exists($checkdir)) { + $checkdir = dirname($checkdir); + } + + if ($checkdir == '.') { + $checkdir = '/'; + } + + if (!is_writeable($checkdir)) { + return PEAR::raiseError('Cannot install, php_dir for channel "' . + $params[$i]->getChannel() . '" is not writeable by the current user'); + } + } + } + } + + unset($channelschecked); + PEAR_Downloader_Package::removeDuplicates($params); + if (!count($params)) { + $a = array(); + return $a; + } + + if (!isset($this->_options['nodeps']) && !isset($this->_options['offline'])) { + $reverify = true; + while ($reverify) { + $reverify = false; + foreach ($params as $i => $param) { + //PHP Bug 40768 / PEAR Bug #10944 + //Nested foreaches fail in PHP 5.2.1 + key($params); + $ret = $params[$i]->detectDependencies($params); + if (PEAR::isError($ret)) { + $reverify = true; + $params[$i] = false; + PEAR_Downloader_Package::removeDuplicates($params); + if (!isset($this->_options['soft'])) { + $this->log(0, $ret->getMessage()); + } + continue 2; + } + } + } + } + + if (isset($this->_options['offline'])) { + $this->log(3, 'Skipping dependency download check, --offline specified'); + } + + if (!count($params)) { + $a = array(); + return $a; + } + + while (PEAR_Downloader_Package::mergeDependencies($params)); + PEAR_Downloader_Package::removeDuplicates($params, true); + $errorparams = array(); + if (PEAR_Downloader_Package::detectStupidDuplicates($params, $errorparams)) { + if (count($errorparams)) { + foreach ($errorparams as $param) { + $name = $this->_registry->parsedPackageNameToString($param->getParsedPackage()); + $this->pushError('Duplicate package ' . $name . ' found', PEAR_INSTALLER_FAILED); + } + $a = array(); + return $a; + } + } + + PEAR_Downloader_Package::removeInstalled($params); + if (!count($params)) { + $this->pushError('No valid packages found', PEAR_INSTALLER_FAILED); + $a = array(); + return $a; + } + + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $err = $this->analyzeDependencies($params); + PEAR::popErrorHandling(); + if (!count($params)) { + $this->pushError('No valid packages found', PEAR_INSTALLER_FAILED); + $a = array(); + return $a; + } + + $ret = array(); + $newparams = array(); + if (isset($this->_options['pretend'])) { + return $params; + } + + $somefailed = false; + foreach ($params as $i => $package) { + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $pf = &$params[$i]->download(); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($pf)) { + if (!isset($this->_options['soft'])) { + $this->log(1, $pf->getMessage()); + $this->log(0, 'Error: cannot download "' . + $this->_registry->parsedPackageNameToString($package->getParsedPackage(), + true) . + '"'); + } + $somefailed = true; + continue; + } + + $newparams[] = &$params[$i]; + $ret[] = array( + 'file' => $pf->getArchiveFile(), + 'info' => &$pf, + 'pkg' => $pf->getPackage() + ); + } + + if ($somefailed) { + // remove params that did not download successfully + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $err = $this->analyzeDependencies($newparams, true); + PEAR::popErrorHandling(); + if (!count($newparams)) { + $this->pushError('Download failed', PEAR_INSTALLER_FAILED); + $a = array(); + return $a; + } + } + + $this->_downloadedPackages = $ret; + return $newparams; + } + + /** + * @param array all packages to be installed + */ + function analyzeDependencies(&$params, $force = false) + { + if (isset($this->_options['downloadonly'])) { + return; + } + + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $redo = true; + $reset = $hasfailed = $failed = false; + while ($redo) { + $redo = false; + foreach ($params as $i => $param) { + $deps = $param->getDeps(); + if (!$deps) { + $depchecker = &$this->getDependency2Object($this->config, $this->getOptions(), + $param->getParsedPackage(), PEAR_VALIDATE_DOWNLOADING); + $send = $param->getPackageFile(); + + $installcheck = $depchecker->validatePackage($send, $this, $params); + if (PEAR::isError($installcheck)) { + if (!isset($this->_options['soft'])) { + $this->log(0, $installcheck->getMessage()); + } + $hasfailed = true; + $params[$i] = false; + $reset = true; + $redo = true; + $failed = false; + PEAR_Downloader_Package::removeDuplicates($params); + continue 2; + } + continue; + } + + if (!$reset && $param->alreadyValidated() && !$force) { + continue; + } + + if (count($deps)) { + $depchecker = &$this->getDependency2Object($this->config, $this->getOptions(), + $param->getParsedPackage(), PEAR_VALIDATE_DOWNLOADING); + $send = $param->getPackageFile(); + if ($send === null) { + $send = $param->getDownloadURL(); + } + + $installcheck = $depchecker->validatePackage($send, $this, $params); + if (PEAR::isError($installcheck)) { + if (!isset($this->_options['soft'])) { + $this->log(0, $installcheck->getMessage()); + } + $hasfailed = true; + $params[$i] = false; + $reset = true; + $redo = true; + $failed = false; + PEAR_Downloader_Package::removeDuplicates($params); + continue 2; + } + + $failed = false; + if (isset($deps['required']) && is_array($deps['required'])) { + foreach ($deps['required'] as $type => $dep) { + // note: Dependency2 will never return a PEAR_Error if ignore-errors + // is specified, so soft is needed to turn off logging + if (!isset($dep[0])) { + if (PEAR::isError($e = $depchecker->{"validate{$type}Dependency"}($dep, + true, $params))) { + $failed = true; + if (!isset($this->_options['soft'])) { + $this->log(0, $e->getMessage()); + } + } elseif (is_array($e) && !$param->alreadyValidated()) { + if (!isset($this->_options['soft'])) { + $this->log(0, $e[0]); + } + } + } else { + foreach ($dep as $d) { + if (PEAR::isError($e = + $depchecker->{"validate{$type}Dependency"}($d, + true, $params))) { + $failed = true; + if (!isset($this->_options['soft'])) { + $this->log(0, $e->getMessage()); + } + } elseif (is_array($e) && !$param->alreadyValidated()) { + if (!isset($this->_options['soft'])) { + $this->log(0, $e[0]); + } + } + } + } + } + + if (isset($deps['optional']) && is_array($deps['optional'])) { + foreach ($deps['optional'] as $type => $dep) { + if (!isset($dep[0])) { + if (PEAR::isError($e = + $depchecker->{"validate{$type}Dependency"}($dep, + false, $params))) { + $failed = true; + if (!isset($this->_options['soft'])) { + $this->log(0, $e->getMessage()); + } + } elseif (is_array($e) && !$param->alreadyValidated()) { + if (!isset($this->_options['soft'])) { + $this->log(0, $e[0]); + } + } + } else { + foreach ($dep as $d) { + if (PEAR::isError($e = + $depchecker->{"validate{$type}Dependency"}($d, + false, $params))) { + $failed = true; + if (!isset($this->_options['soft'])) { + $this->log(0, $e->getMessage()); + } + } elseif (is_array($e) && !$param->alreadyValidated()) { + if (!isset($this->_options['soft'])) { + $this->log(0, $e[0]); + } + } + } + } + } + } + + $groupname = $param->getGroup(); + if (isset($deps['group']) && $groupname) { + if (!isset($deps['group'][0])) { + $deps['group'] = array($deps['group']); + } + + $found = false; + foreach ($deps['group'] as $group) { + if ($group['attribs']['name'] == $groupname) { + $found = true; + break; + } + } + + if ($found) { + unset($group['attribs']); + foreach ($group as $type => $dep) { + if (!isset($dep[0])) { + if (PEAR::isError($e = + $depchecker->{"validate{$type}Dependency"}($dep, + false, $params))) { + $failed = true; + if (!isset($this->_options['soft'])) { + $this->log(0, $e->getMessage()); + } + } elseif (is_array($e) && !$param->alreadyValidated()) { + if (!isset($this->_options['soft'])) { + $this->log(0, $e[0]); + } + } + } else { + foreach ($dep as $d) { + if (PEAR::isError($e = + $depchecker->{"validate{$type}Dependency"}($d, + false, $params))) { + $failed = true; + if (!isset($this->_options['soft'])) { + $this->log(0, $e->getMessage()); + } + } elseif (is_array($e) && !$param->alreadyValidated()) { + if (!isset($this->_options['soft'])) { + $this->log(0, $e[0]); + } + } + } + } + } + } + } + } else { + foreach ($deps as $dep) { + if (PEAR::isError($e = $depchecker->validateDependency1($dep, $params))) { + $failed = true; + if (!isset($this->_options['soft'])) { + $this->log(0, $e->getMessage()); + } + } elseif (is_array($e) && !$param->alreadyValidated()) { + if (!isset($this->_options['soft'])) { + $this->log(0, $e[0]); + } + } + } + } + $params[$i]->setValidated(); + } + + if ($failed) { + $hasfailed = true; + $params[$i] = false; + $reset = true; + $redo = true; + $failed = false; + PEAR_Downloader_Package::removeDuplicates($params); + continue 2; + } + } + } + + PEAR::staticPopErrorHandling(); + if ($hasfailed && (isset($this->_options['ignore-errors']) || + isset($this->_options['nodeps']))) { + // this is probably not needed, but just in case + if (!isset($this->_options['soft'])) { + $this->log(0, 'WARNING: dependencies failed'); + } + } + } + + /** + * Retrieve the directory that downloads will happen in + * @access private + * @return string + */ + function getDownloadDir() + { + if (isset($this->_downloadDir)) { + return $this->_downloadDir; + } + + $downloaddir = $this->config->get('download_dir'); + if (empty($downloaddir) || (is_dir($downloaddir) && !is_writable($downloaddir))) { + if (is_dir($downloaddir) && !is_writable($downloaddir)) { + $this->log(0, 'WARNING: configuration download directory "' . $downloaddir . + '" is not writeable. Change download_dir config variable to ' . + 'a writeable dir to avoid this warning'); + } + + if (!class_exists('System')) { + require_once 'System.php'; + } + + if (PEAR::isError($downloaddir = System::mktemp('-d'))) { + return $downloaddir; + } + $this->log(3, '+ tmp dir created at ' . $downloaddir); + } + + if (!is_writable($downloaddir)) { + if (PEAR::isError(System::mkdir(array('-p', $downloaddir))) || + !is_writable($downloaddir)) { + return PEAR::raiseError('download directory "' . $downloaddir . + '" is not writeable. Change download_dir config variable to ' . + 'a writeable dir'); + } + } + + return $this->_downloadDir = $downloaddir; + } + + function setDownloadDir($dir) + { + if (!@is_writable($dir)) { + if (PEAR::isError(System::mkdir(array('-p', $dir)))) { + return PEAR::raiseError('download directory "' . $dir . + '" is not writeable. Change download_dir config variable to ' . + 'a writeable dir'); + } + } + $this->_downloadDir = $dir; + } + + function configSet($key, $value, $layer = 'user', $channel = false) + { + $this->config->set($key, $value, $layer, $channel); + $this->_preferredState = $this->config->get('preferred_state', null, $channel); + if (!$this->_preferredState) { + // don't inadvertantly use a non-set preferred_state + $this->_preferredState = null; + } + } + + function setOptions($options) + { + $this->_options = $options; + } + + function getOptions() + { + return $this->_options; + } + + + /** + * @param array output of {@link parsePackageName()} + * @access private + */ + function _getPackageDownloadUrl($parr) + { + $curchannel = $this->config->get('default_channel'); + $this->configSet('default_channel', $parr['channel']); + // getDownloadURL returns an array. On error, it only contains information + // on the latest release as array(version, info). On success it contains + // array(version, info, download url string) + $state = isset($parr['state']) ? $parr['state'] : $this->config->get('preferred_state'); + if (!$this->_registry->channelExists($parr['channel'])) { + do { + if ($this->config->get('auto_discover') && $this->discover($parr['channel'])) { + break; + } + + $this->configSet('default_channel', $curchannel); + return PEAR::raiseError('Unknown remote channel: ' . $parr['channel']); + } while (false); + } + + $chan = &$this->_registry->getChannel($parr['channel']); + if (PEAR::isError($chan)) { + return $chan; + } + + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $version = $this->_registry->packageInfo($parr['package'], 'version', $parr['channel']); + $stability = $this->_registry->packageInfo($parr['package'], 'stability', $parr['channel']); + // package is installed - use the installed release stability level + if (!isset($parr['state']) && $stability !== null) { + $state = $stability['release']; + } + PEAR::staticPopErrorHandling(); + $base2 = false; + + $preferred_mirror = $this->config->get('preferred_mirror'); + if (!$chan->supportsREST($preferred_mirror) || + ( + !($base2 = $chan->getBaseURL('REST1.3', $preferred_mirror)) + && + !($base = $chan->getBaseURL('REST1.0', $preferred_mirror)) + ) + ) { + return $this->raiseError($parr['channel'] . ' is using a unsupported protocol - This should never happen.'); + } + + if ($base2) { + $rest = &$this->config->getREST('1.3', $this->_options); + $base = $base2; + } else { + $rest = &$this->config->getREST('1.0', $this->_options); + } + + $downloadVersion = false; + if (!isset($parr['version']) && !isset($parr['state']) && $version + && !PEAR::isError($version) + && !isset($this->_options['downloadonly']) + ) { + $downloadVersion = $version; + } + + $url = $rest->getDownloadURL($base, $parr, $state, $downloadVersion, $chan->getName()); + if (PEAR::isError($url)) { + $this->configSet('default_channel', $curchannel); + return $url; + } + + if ($parr['channel'] != $curchannel) { + $this->configSet('default_channel', $curchannel); + } + + if (!is_array($url)) { + return $url; + } + + $url['raw'] = false; // no checking is necessary for REST + if (!is_array($url['info'])) { + return PEAR::raiseError('Invalid remote dependencies retrieved from REST - ' . + 'this should never happen'); + } + + if (!isset($this->_options['force']) && + !isset($this->_options['downloadonly']) && + $version && + !PEAR::isError($version) && + !isset($parr['group']) + ) { + if (version_compare($version, $url['version'], '=')) { + return PEAR::raiseError($this->_registry->parsedPackageNameToString( + $parr, true) . ' is already installed and is the same as the ' . + 'released version ' . $url['version'], -976); + } + + if (version_compare($version, $url['version'], '>')) { + return PEAR::raiseError($this->_registry->parsedPackageNameToString( + $parr, true) . ' is already installed and is newer than detected ' . + 'released version ' . $url['version'], -976); + } + } + + if (isset($url['info']['required']) || $url['compatible']) { + require_once 'PEAR/PackageFile/v2.php'; + $pf = new PEAR_PackageFile_v2; + $pf->setRawChannel($parr['channel']); + if ($url['compatible']) { + $pf->setRawCompatible($url['compatible']); + } + } else { + require_once 'PEAR/PackageFile/v1.php'; + $pf = new PEAR_PackageFile_v1; + } + + $pf->setRawPackage($url['package']); + $pf->setDeps($url['info']); + if ($url['compatible']) { + $pf->setCompatible($url['compatible']); + } + + $pf->setRawState($url['stability']); + $url['info'] = &$pf; + if (!extension_loaded("zlib") || isset($this->_options['nocompress'])) { + $ext = '.tar'; + } else { + $ext = '.tgz'; + } + + if (is_array($url) && isset($url['url'])) { + $url['url'] .= $ext; + } + + return $url; + } + + /** + * @param array dependency array + * @access private + */ + function _getDepPackageDownloadUrl($dep, $parr) + { + $xsdversion = isset($dep['rel']) ? '1.0' : '2.0'; + $curchannel = $this->config->get('default_channel'); + if (isset($dep['uri'])) { + $xsdversion = '2.0'; + $chan = &$this->_registry->getChannel('__uri'); + if (PEAR::isError($chan)) { + return $chan; + } + + $version = $this->_registry->packageInfo($dep['name'], 'version', '__uri'); + $this->configSet('default_channel', '__uri'); + } else { + if (isset($dep['channel'])) { + $remotechannel = $dep['channel']; + } else { + $remotechannel = 'pear.php.net'; + } + + if (!$this->_registry->channelExists($remotechannel)) { + do { + if ($this->config->get('auto_discover')) { + if ($this->discover($remotechannel)) { + break; + } + } + return PEAR::raiseError('Unknown remote channel: ' . $remotechannel); + } while (false); + } + + $chan = &$this->_registry->getChannel($remotechannel); + if (PEAR::isError($chan)) { + return $chan; + } + + $version = $this->_registry->packageInfo($dep['name'], 'version', $remotechannel); + $this->configSet('default_channel', $remotechannel); + } + + $state = isset($parr['state']) ? $parr['state'] : $this->config->get('preferred_state'); + if (isset($parr['state']) && isset($parr['version'])) { + unset($parr['state']); + } + + if (isset($dep['uri'])) { + $info = &$this->newDownloaderPackage($this); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $err = $info->initialize($dep); + PEAR::staticPopErrorHandling(); + if (!$err) { + // skip parameters that were missed by preferred_state + return PEAR::raiseError('Cannot initialize dependency'); + } + + if (PEAR::isError($err)) { + if (!isset($this->_options['soft'])) { + $this->log(0, $err->getMessage()); + } + + if (is_object($info)) { + $param = $info->getChannel() . '/' . $info->getPackage(); + } + return PEAR::raiseError('Package "' . $param . '" is not valid'); + } + return $info; + } elseif ($chan->supportsREST($this->config->get('preferred_mirror')) + && + ( + ($base2 = $chan->getBaseURL('REST1.3', $this->config->get('preferred_mirror'))) + || + ($base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) + ) + ) { + if ($base2) { + $base = $base2; + $rest = &$this->config->getREST('1.3', $this->_options); + } else { + $rest = &$this->config->getREST('1.0', $this->_options); + } + + $url = $rest->getDepDownloadURL($base, $xsdversion, $dep, $parr, + $state, $version, $chan->getName()); + if (PEAR::isError($url)) { + return $url; + } + + if ($parr['channel'] != $curchannel) { + $this->configSet('default_channel', $curchannel); + } + + if (!is_array($url)) { + return $url; + } + + $url['raw'] = false; // no checking is necessary for REST + if (!is_array($url['info'])) { + return PEAR::raiseError('Invalid remote dependencies retrieved from REST - ' . + 'this should never happen'); + } + + if (isset($url['info']['required'])) { + if (!class_exists('PEAR_PackageFile_v2')) { + require_once 'PEAR/PackageFile/v2.php'; + } + $pf = new PEAR_PackageFile_v2; + $pf->setRawChannel($remotechannel); + } else { + if (!class_exists('PEAR_PackageFile_v1')) { + require_once 'PEAR/PackageFile/v1.php'; + } + $pf = new PEAR_PackageFile_v1; + + } + $pf->setRawPackage($url['package']); + $pf->setDeps($url['info']); + if ($url['compatible']) { + $pf->setCompatible($url['compatible']); + } + + $pf->setRawState($url['stability']); + $url['info'] = &$pf; + if (!extension_loaded("zlib") || isset($this->_options['nocompress'])) { + $ext = '.tar'; + } else { + $ext = '.tgz'; + } + + if (is_array($url) && isset($url['url'])) { + $url['url'] .= $ext; + } + + return $url; + } + + return $this->raiseError($parr['channel'] . ' is using a unsupported protocol - This should never happen.'); + } + + /** + * @deprecated in favor of _getPackageDownloadUrl + */ + function getPackageDownloadUrl($package, $version = null, $channel = false) + { + if ($version) { + $package .= "-$version"; + } + if ($this === null || $this->_registry === null) { + $package = "http://pear.php.net/get/$package"; + } else { + $chan = $this->_registry->getChannel($channel); + if (PEAR::isError($chan)) { + return ''; + } + $package = "http://" . $chan->getServer() . "/get/$package"; + } + if (!extension_loaded("zlib")) { + $package .= '?uncompress=yes'; + } + return $package; + } + + /** + * Retrieve a list of downloaded packages after a call to {@link download()}. + * + * Also resets the list of downloaded packages. + * @return array + */ + function getDownloadedPackages() + { + $ret = $this->_downloadedPackages; + $this->_downloadedPackages = array(); + $this->_toDownload = array(); + return $ret; + } + + function _downloadCallback($msg, $params = null) + { + switch ($msg) { + case 'saveas': + $this->log(1, "downloading $params ..."); + break; + case 'done': + $this->log(1, '...done: ' . number_format($params, 0, '', ',') . ' bytes'); + break; + case 'bytesread': + static $bytes; + if (empty($bytes)) { + $bytes = 0; + } + if (!($bytes % 10240)) { + $this->log(1, '.', false); + } + $bytes += $params; + break; + case 'start': + if($params[1] == -1) { + $length = "Unknown size"; + } else { + $length = number_format($params[1], 0, '', ',')." bytes"; + } + $this->log(1, "Starting to download {$params[0]} ($length)"); + break; + } + if (method_exists($this->ui, '_downloadCallback')) + $this->ui->_downloadCallback($msg, $params); + } + + function _prependPath($path, $prepend) + { + if (strlen($prepend) > 0) { + if (OS_WINDOWS && preg_match('/^[a-z]:/i', $path)) { + if (preg_match('/^[a-z]:/i', $prepend)) { + $prepend = substr($prepend, 2); + } elseif ($prepend{0} != '\\') { + $prepend = "\\$prepend"; + } + $path = substr($path, 0, 2) . $prepend . substr($path, 2); + } else { + $path = $prepend . $path; + } + } + return $path; + } + + /** + * @param string + * @param integer + */ + function pushError($errmsg, $code = -1) + { + array_push($this->_errorStack, array($errmsg, $code)); + } + + function getErrorMsgs() + { + $msgs = array(); + $errs = $this->_errorStack; + foreach ($errs as $err) { + $msgs[] = $err[0]; + } + $this->_errorStack = array(); + return $msgs; + } + + /** + * for BC + * + * @deprecated + */ + function sortPkgDeps(&$packages, $uninstall = false) + { + $uninstall ? + $this->sortPackagesForUninstall($packages) : + $this->sortPackagesForInstall($packages); + } + + /** + * Sort a list of arrays of array(downloaded packagefilename) by dependency. + * + * This uses the topological sort method from graph theory, and the + * Structures_Graph package to properly sort dependencies for installation. + * @param array an array of downloaded PEAR_Downloader_Packages + * @return array array of array(packagefilename, package.xml contents) + */ + function sortPackagesForInstall(&$packages) + { + require_once 'Structures/Graph.php'; + require_once 'Structures/Graph/Node.php'; + require_once 'Structures/Graph/Manipulator/TopologicalSorter.php'; + $depgraph = new Structures_Graph(true); + $nodes = array(); + $reg = &$this->config->getRegistry(); + foreach ($packages as $i => $package) { + $pname = $reg->parsedPackageNameToString( + array( + 'channel' => $package->getChannel(), + 'package' => strtolower($package->getPackage()), + )); + $nodes[$pname] = new Structures_Graph_Node; + $nodes[$pname]->setData($packages[$i]); + $depgraph->addNode($nodes[$pname]); + } + + $deplinks = array(); + foreach ($nodes as $package => $node) { + $pf = &$node->getData(); + $pdeps = $pf->getDeps(true); + if (!$pdeps) { + continue; + } + + if ($pf->getPackagexmlVersion() == '1.0') { + foreach ($pdeps as $dep) { + if ($dep['type'] != 'pkg' || + (isset($dep['optional']) && $dep['optional'] == 'yes')) { + continue; + } + + $dname = $reg->parsedPackageNameToString( + array( + 'channel' => 'pear.php.net', + 'package' => strtolower($dep['name']), + )); + + if (isset($nodes[$dname])) { + if (!isset($deplinks[$dname])) { + $deplinks[$dname] = array(); + } + + $deplinks[$dname][$package] = 1; + // dependency is in installed packages + continue; + } + + $dname = $reg->parsedPackageNameToString( + array( + 'channel' => 'pecl.php.net', + 'package' => strtolower($dep['name']), + )); + + if (isset($nodes[$dname])) { + if (!isset($deplinks[$dname])) { + $deplinks[$dname] = array(); + } + + $deplinks[$dname][$package] = 1; + // dependency is in installed packages + continue; + } + } + } else { + // the only ordering we care about is: + // 1) subpackages must be installed before packages that depend on them + // 2) required deps must be installed before packages that depend on them + if (isset($pdeps['required']['subpackage'])) { + $t = $pdeps['required']['subpackage']; + if (!isset($t[0])) { + $t = array($t); + } + + $this->_setupGraph($t, $reg, $deplinks, $nodes, $package); + } + + if (isset($pdeps['group'])) { + if (!isset($pdeps['group'][0])) { + $pdeps['group'] = array($pdeps['group']); + } + + foreach ($pdeps['group'] as $group) { + if (isset($group['subpackage'])) { + $t = $group['subpackage']; + if (!isset($t[0])) { + $t = array($t); + } + + $this->_setupGraph($t, $reg, $deplinks, $nodes, $package); + } + } + } + + if (isset($pdeps['optional']['subpackage'])) { + $t = $pdeps['optional']['subpackage']; + if (!isset($t[0])) { + $t = array($t); + } + + $this->_setupGraph($t, $reg, $deplinks, $nodes, $package); + } + + if (isset($pdeps['required']['package'])) { + $t = $pdeps['required']['package']; + if (!isset($t[0])) { + $t = array($t); + } + + $this->_setupGraph($t, $reg, $deplinks, $nodes, $package); + } + + if (isset($pdeps['group'])) { + if (!isset($pdeps['group'][0])) { + $pdeps['group'] = array($pdeps['group']); + } + + foreach ($pdeps['group'] as $group) { + if (isset($group['package'])) { + $t = $group['package']; + if (!isset($t[0])) { + $t = array($t); + } + + $this->_setupGraph($t, $reg, $deplinks, $nodes, $package); + } + } + } + } + } + + $this->_detectDepCycle($deplinks); + foreach ($deplinks as $dependent => $parents) { + foreach ($parents as $parent => $unused) { + $nodes[$dependent]->connectTo($nodes[$parent]); + } + } + + $installOrder = Structures_Graph_Manipulator_TopologicalSorter::sort($depgraph); + $ret = array(); + for ($i = 0, $count = count($installOrder); $i < $count; $i++) { + foreach ($installOrder[$i] as $index => $sortedpackage) { + $data = &$installOrder[$i][$index]->getData(); + $ret[] = &$nodes[$reg->parsedPackageNameToString( + array( + 'channel' => $data->getChannel(), + 'package' => strtolower($data->getPackage()), + ))]->getData(); + } + } + + $packages = $ret; + return; + } + + /** + * Detect recursive links between dependencies and break the cycles + * + * @param array + * @access private + */ + function _detectDepCycle(&$deplinks) + { + do { + $keepgoing = false; + foreach ($deplinks as $dep => $parents) { + foreach ($parents as $parent => $unused) { + // reset the parent cycle detector + $this->_testCycle(null, null, null); + if ($this->_testCycle($dep, $deplinks, $parent)) { + $keepgoing = true; + unset($deplinks[$dep][$parent]); + if (count($deplinks[$dep]) == 0) { + unset($deplinks[$dep]); + } + + continue 3; + } + } + } + } while ($keepgoing); + } + + function _testCycle($test, $deplinks, $dep) + { + static $visited = array(); + if ($test === null) { + $visited = array(); + return; + } + + // this happens when a parent has a dep cycle on another dependency + // but the child is not part of the cycle + if (isset($visited[$dep])) { + return false; + } + + $visited[$dep] = 1; + if ($test == $dep) { + return true; + } + + if (isset($deplinks[$dep])) { + if (in_array($test, array_keys($deplinks[$dep]), true)) { + return true; + } + + foreach ($deplinks[$dep] as $parent => $unused) { + if ($this->_testCycle($test, $deplinks, $parent)) { + return true; + } + } + } + + return false; + } + + /** + * Set up the dependency for installation parsing + * + * @param array $t dependency information + * @param PEAR_Registry $reg + * @param array $deplinks list of dependency links already established + * @param array $nodes all existing package nodes + * @param string $package parent package name + * @access private + */ + function _setupGraph($t, $reg, &$deplinks, &$nodes, $package) + { + foreach ($t as $dep) { + $depchannel = !isset($dep['channel']) ? '__uri': $dep['channel']; + $dname = $reg->parsedPackageNameToString( + array( + 'channel' => $depchannel, + 'package' => strtolower($dep['name']), + )); + + if (isset($nodes[$dname])) { + if (!isset($deplinks[$dname])) { + $deplinks[$dname] = array(); + } + $deplinks[$dname][$package] = 1; + } + } + } + + function _dependsOn($a, $b) + { + return $this->_checkDepTree(strtolower($a->getChannel()), strtolower($a->getPackage()), $b); + } + + function _checkDepTree($channel, $package, $b, $checked = array()) + { + $checked[$channel][$package] = true; + if (!isset($this->_depTree[$channel][$package])) { + return false; + } + + if (isset($this->_depTree[$channel][$package][strtolower($b->getChannel())] + [strtolower($b->getPackage())])) { + return true; + } + + foreach ($this->_depTree[$channel][$package] as $ch => $packages) { + foreach ($packages as $pa => $true) { + if ($this->_checkDepTree($ch, $pa, $b, $checked)) { + return true; + } + } + } + + return false; + } + + function _sortInstall($a, $b) + { + if (!$a->getDeps() && !$b->getDeps()) { + return 0; // neither package has dependencies, order is insignificant + } + if ($a->getDeps() && !$b->getDeps()) { + return 1; // $a must be installed after $b because $a has dependencies + } + if (!$a->getDeps() && $b->getDeps()) { + return -1; // $b must be installed after $a because $b has dependencies + } + // both packages have dependencies + if ($this->_dependsOn($a, $b)) { + return 1; + } + if ($this->_dependsOn($b, $a)) { + return -1; + } + return 0; + } + + /** + * Download a file through HTTP. Considers suggested file name in + * Content-disposition: header and can run a callback function for + * different events. The callback will be called with two + * parameters: the callback type, and parameters. The implemented + * callback types are: + * + * 'setup' called at the very beginning, parameter is a UI object + * that should be used for all output + * 'message' the parameter is a string with an informational message + * 'saveas' may be used to save with a different file name, the + * parameter is the filename that is about to be used. + * If a 'saveas' callback returns a non-empty string, + * that file name will be used as the filename instead. + * Note that $save_dir will not be affected by this, only + * the basename of the file. + * 'start' download is starting, parameter is number of bytes + * that are expected, or -1 if unknown + * 'bytesread' parameter is the number of bytes read so far + * 'done' download is complete, parameter is the total number + * of bytes read + * 'connfailed' if the TCP/SSL connection fails, this callback is called + * with array(host,port,errno,errmsg) + * 'writefailed' if writing to disk fails, this callback is called + * with array(destfile,errmsg) + * + * If an HTTP proxy has been configured (http_proxy PEAR_Config + * setting), the proxy will be used. + * + * @param string $url the URL to download + * @param object $ui PEAR_Frontend_* instance + * @param object $config PEAR_Config instance + * @param string $save_dir directory to save file in + * @param mixed $callback function/method to call for status + * updates + * @param false|string|array $lastmodified header values to check against for caching + * use false to return the header values from this download + * @param false|array $accept Accept headers to send + * @param false|string $channel Channel to use for retrieving authentication + * @return string|array Returns the full path of the downloaded file or a PEAR + * error on failure. If the error is caused by + * socket-related errors, the error object will + * have the fsockopen error code available through + * getCode(). If caching is requested, then return the header + * values. + * + * @access public + */ + function downloadHttp($url, &$ui, $save_dir = '.', $callback = null, $lastmodified = null, + $accept = false, $channel = false) + { + static $redirect = 0; + // always reset , so we are clean case of error + $wasredirect = $redirect; + $redirect = 0; + if ($callback) { + call_user_func($callback, 'setup', array(&$ui)); + } + + $info = parse_url($url); + if (!isset($info['scheme']) || !in_array($info['scheme'], array('http', 'https'))) { + return PEAR::raiseError('Cannot download non-http URL "' . $url . '"'); + } + + if (!isset($info['host'])) { + return PEAR::raiseError('Cannot download from non-URL "' . $url . '"'); + } + + $host = isset($info['host']) ? $info['host'] : null; + $port = isset($info['port']) ? $info['port'] : null; + $path = isset($info['path']) ? $info['path'] : null; + + if (isset($this)) { + $config = &$this->config; + } else { + $config = &PEAR_Config::singleton(); + } + + $proxy_host = $proxy_port = $proxy_user = $proxy_pass = ''; + if ($config->get('http_proxy') && + $proxy = parse_url($config->get('http_proxy'))) { + $proxy_host = isset($proxy['host']) ? $proxy['host'] : null; + if (isset($proxy['scheme']) && $proxy['scheme'] == 'https') { + $proxy_host = 'ssl://' . $proxy_host; + } + $proxy_port = isset($proxy['port']) ? $proxy['port'] : 8080; + $proxy_user = isset($proxy['user']) ? urldecode($proxy['user']) : null; + $proxy_pass = isset($proxy['pass']) ? urldecode($proxy['pass']) : null; + + if ($callback) { + call_user_func($callback, 'message', "Using HTTP proxy $host:$port"); + } + } + + if (empty($port)) { + $port = (isset($info['scheme']) && $info['scheme'] == 'https') ? 443 : 80; + } + + $scheme = (isset($info['scheme']) && $info['scheme'] == 'https') ? 'https' : 'http'; + + if ($proxy_host != '') { + $fp = @fsockopen($proxy_host, $proxy_port, $errno, $errstr); + if (!$fp) { + if ($callback) { + call_user_func($callback, 'connfailed', array($proxy_host, $proxy_port, + $errno, $errstr)); + } + return PEAR::raiseError("Connection to `$proxy_host:$proxy_port' failed: $errstr", $errno); + } + + if ($lastmodified === false || $lastmodified) { + $request = "GET $url HTTP/1.1\r\n"; + $request .= "Host: $host\r\n"; + } else { + $request = "GET $url HTTP/1.0\r\n"; + $request .= "Host: $host\r\n"; + } + } else { + $network_host = $host; + if (isset($info['scheme']) && $info['scheme'] == 'https') { + $network_host = 'ssl://' . $host; + } + + $fp = @fsockopen($network_host, $port, $errno, $errstr); + if (!$fp) { + if ($callback) { + call_user_func($callback, 'connfailed', array($host, $port, + $errno, $errstr)); + } + return PEAR::raiseError("Connection to `$host:$port' failed: $errstr", $errno); + } + + if ($lastmodified === false || $lastmodified) { + $request = "GET $path HTTP/1.1\r\n"; + $request .= "Host: $host\r\n"; + } else { + $request = "GET $path HTTP/1.0\r\n"; + $request .= "Host: $host\r\n"; + } + } + + $ifmodifiedsince = ''; + if (is_array($lastmodified)) { + if (isset($lastmodified['Last-Modified'])) { + $ifmodifiedsince = 'If-Modified-Since: ' . $lastmodified['Last-Modified'] . "\r\n"; + } + + if (isset($lastmodified['ETag'])) { + $ifmodifiedsince .= "If-None-Match: $lastmodified[ETag]\r\n"; + } + } else { + $ifmodifiedsince = ($lastmodified ? "If-Modified-Since: $lastmodified\r\n" : ''); + } + + $request .= $ifmodifiedsince . + "User-Agent: PEAR/1.9.4/PHP/" . PHP_VERSION . "\r\n"; + + if (isset($this)) { // only pass in authentication for non-static calls + $username = $config->get('username', null, $channel); + $password = $config->get('password', null, $channel); + if ($username && $password) { + $tmp = base64_encode("$username:$password"); + $request .= "Authorization: Basic $tmp\r\n"; + } + } + + if ($proxy_host != '' && $proxy_user != '') { + $request .= 'Proxy-Authorization: Basic ' . + base64_encode($proxy_user . ':' . $proxy_pass) . "\r\n"; + } + + if ($accept) { + $request .= 'Accept: ' . implode(', ', $accept) . "\r\n"; + } + + $request .= "Connection: close\r\n"; + $request .= "\r\n"; + fwrite($fp, $request); + $headers = array(); + $reply = 0; + while (trim($line = fgets($fp, 1024))) { + if (preg_match('/^([^:]+):\s+(.*)\s*\\z/', $line, $matches)) { + $headers[strtolower($matches[1])] = trim($matches[2]); + } elseif (preg_match('|^HTTP/1.[01] ([0-9]{3}) |', $line, $matches)) { + $reply = (int)$matches[1]; + if ($reply == 304 && ($lastmodified || ($lastmodified === false))) { + return false; + } + + if (!in_array($reply, array(200, 301, 302, 303, 305, 307))) { + return PEAR::raiseError("File $scheme://$host:$port$path not valid (received: $line)"); + } + } + } + + if ($reply != 200) { + if (!isset($headers['location'])) { + return PEAR::raiseError("File $scheme://$host:$port$path not valid (redirected but no location)"); + } + + if ($wasredirect > 4) { + return PEAR::raiseError("File $scheme://$host:$port$path not valid (redirection looped more than 5 times)"); + } + + $redirect = $wasredirect + 1; + return $this->downloadHttp($headers['location'], + $ui, $save_dir, $callback, $lastmodified, $accept); + } + + if (isset($headers['content-disposition']) && + preg_match('/\sfilename=\"([^;]*\S)\"\s*(;|\\z)/', $headers['content-disposition'], $matches)) { + $save_as = basename($matches[1]); + } else { + $save_as = basename($url); + } + + if ($callback) { + $tmp = call_user_func($callback, 'saveas', $save_as); + if ($tmp) { + $save_as = $tmp; + } + } + + $dest_file = $save_dir . DIRECTORY_SEPARATOR . $save_as; + if (is_link($dest_file)) { + return PEAR::raiseError('SECURITY ERROR: Will not write to ' . $dest_file . ' as it is symlinked to ' . readlink($dest_file) . ' - Possible symlink attack'); + } + + if (!$wp = @fopen($dest_file, 'wb')) { + fclose($fp); + if ($callback) { + call_user_func($callback, 'writefailed', array($dest_file, $php_errormsg)); + } + return PEAR::raiseError("could not open $dest_file for writing"); + } + + $length = isset($headers['content-length']) ? $headers['content-length'] : -1; + + $bytes = 0; + if ($callback) { + call_user_func($callback, 'start', array(basename($dest_file), $length)); + } + + while ($data = fread($fp, 1024)) { + $bytes += strlen($data); + if ($callback) { + call_user_func($callback, 'bytesread', $bytes); + } + if (!@fwrite($wp, $data)) { + fclose($fp); + if ($callback) { + call_user_func($callback, 'writefailed', array($dest_file, $php_errormsg)); + } + return PEAR::raiseError("$dest_file: write failed ($php_errormsg)"); + } + } + + fclose($fp); + fclose($wp); + if ($callback) { + call_user_func($callback, 'done', $bytes); + } + + if ($lastmodified === false || $lastmodified) { + if (isset($headers['etag'])) { + $lastmodified = array('ETag' => $headers['etag']); + } + + if (isset($headers['last-modified'])) { + if (is_array($lastmodified)) { + $lastmodified['Last-Modified'] = $headers['last-modified']; + } else { + $lastmodified = $headers['last-modified']; + } + } + return array($dest_file, $lastmodified, $headers); + } + return $dest_file; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Downloader/Package.php b/_piecrust/libs/PEAR/Downloader/Package.php new file mode 100644 index 0000000..987c965 --- /dev/null +++ b/_piecrust/libs/PEAR/Downloader/Package.php @@ -0,0 +1,1988 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Package.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * Error code when parameter initialization fails because no releases + * exist within preferred_state, but releases do exist + */ +define('PEAR_DOWNLOADER_PACKAGE_STATE', -1003); +/** + * Error code when parameter initialization fails because no releases + * exist that will work with the existing PHP version + */ +define('PEAR_DOWNLOADER_PACKAGE_PHPVERSION', -1004); + +/** + * Coordinates download parameters and manages their dependencies + * prior to downloading them. + * + * Input can come from three sources: + * + * - local files (archives or package.xml) + * - remote files (downloadable urls) + * - abstract package names + * + * The first two elements are handled cleanly by PEAR_PackageFile, but the third requires + * accessing pearweb's xml-rpc interface to determine necessary dependencies, and the + * format returned of dependencies is slightly different from that used in package.xml. + * + * This class hides the differences between these elements, and makes automatic + * dependency resolution a piece of cake. It also manages conflicts when + * two classes depend on incompatible dependencies, or differing versions of the same + * package dependency. In addition, download will not be attempted if the php version is + * not supported, PEAR installer version is not supported, or non-PECL extensions are not + * installed. + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Downloader_Package +{ + /** + * @var PEAR_Downloader + */ + var $_downloader; + /** + * @var PEAR_Config + */ + var $_config; + /** + * @var PEAR_Registry + */ + var $_registry; + /** + * Used to implement packagingroot properly + * @var PEAR_Registry + */ + var $_installRegistry; + /** + * @var PEAR_PackageFile_v1|PEAR_PackageFile|v2 + */ + var $_packagefile; + /** + * @var array + */ + var $_parsedname; + /** + * @var array + */ + var $_downloadURL; + /** + * @var array + */ + var $_downloadDeps = array(); + /** + * @var boolean + */ + var $_valid = false; + /** + * @var boolean + */ + var $_analyzed = false; + /** + * if this or a parent package was invoked with Package-state, this is set to the + * state variable. + * + * This allows temporary reassignment of preferred_state for a parent package and all of + * its dependencies. + * @var string|false + */ + var $_explicitState = false; + /** + * If this package is invoked with Package#group, this variable will be true + */ + var $_explicitGroup = false; + /** + * Package type local|url + * @var string + */ + var $_type; + /** + * Contents of package.xml, if downloaded from a remote channel + * @var string|false + * @access private + */ + var $_rawpackagefile; + /** + * @var boolean + * @access private + */ + var $_validated = false; + + /** + * @param PEAR_Downloader + */ + function PEAR_Downloader_Package(&$downloader) + { + $this->_downloader = &$downloader; + $this->_config = &$this->_downloader->config; + $this->_registry = &$this->_config->getRegistry(); + $options = $downloader->getOptions(); + if (isset($options['packagingroot'])) { + $this->_config->setInstallRoot($options['packagingroot']); + $this->_installRegistry = &$this->_config->getRegistry(); + $this->_config->setInstallRoot(false); + } else { + $this->_installRegistry = &$this->_registry; + } + $this->_valid = $this->_analyzed = false; + } + + /** + * Parse the input and determine whether this is a local file, a remote uri, or an + * abstract package name. + * + * This is the heart of the PEAR_Downloader_Package(), and is used in + * {@link PEAR_Downloader::download()} + * @param string + * @return bool|PEAR_Error + */ + function initialize($param) + { + $origErr = $this->_fromFile($param); + if ($this->_valid) { + return true; + } + + $options = $this->_downloader->getOptions(); + if (isset($options['offline'])) { + if (PEAR::isError($origErr) && !isset($options['soft'])) { + foreach ($origErr->getUserInfo() as $userInfo) { + if (isset($userInfo['message'])) { + $this->_downloader->log(0, $userInfo['message']); + } + } + + $this->_downloader->log(0, $origErr->getMessage()); + } + + return PEAR::raiseError('Cannot download non-local package "' . $param . '"'); + } + + $err = $this->_fromUrl($param); + if (PEAR::isError($err) || !$this->_valid) { + if ($this->_type == 'url') { + if (PEAR::isError($err) && !isset($options['soft'])) { + $this->_downloader->log(0, $err->getMessage()); + } + + return PEAR::raiseError("Invalid or missing remote package file"); + } + + $err = $this->_fromString($param); + if (PEAR::isError($err) || !$this->_valid) { + if (PEAR::isError($err) && $err->getCode() == PEAR_DOWNLOADER_PACKAGE_STATE) { + return false; // instruct the downloader to silently skip + } + + if (isset($this->_type) && $this->_type == 'local' && PEAR::isError($origErr)) { + if (is_array($origErr->getUserInfo())) { + foreach ($origErr->getUserInfo() as $err) { + if (is_array($err)) { + $err = $err['message']; + } + + if (!isset($options['soft'])) { + $this->_downloader->log(0, $err); + } + } + } + + if (!isset($options['soft'])) { + $this->_downloader->log(0, $origErr->getMessage()); + } + + if (is_array($param)) { + $param = $this->_registry->parsedPackageNameToString($param, true); + } + + if (!isset($options['soft'])) { + $this->_downloader->log(2, "Cannot initialize '$param', invalid or missing package file"); + } + + // Passing no message back - already logged above + return PEAR::raiseError(); + } + + if (PEAR::isError($err) && !isset($options['soft'])) { + $this->_downloader->log(0, $err->getMessage()); + } + + if (is_array($param)) { + $param = $this->_registry->parsedPackageNameToString($param, true); + } + + if (!isset($options['soft'])) { + $this->_downloader->log(2, "Cannot initialize '$param', invalid or missing package file"); + } + + // Passing no message back - already logged above + return PEAR::raiseError(); + } + } + + return true; + } + + /** + * Retrieve any non-local packages + * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2|PEAR_Error + */ + function &download() + { + if (isset($this->_packagefile)) { + return $this->_packagefile; + } + + if (isset($this->_downloadURL['url'])) { + $this->_isvalid = false; + $info = $this->getParsedPackage(); + foreach ($info as $i => $p) { + $info[$i] = strtolower($p); + } + + $err = $this->_fromUrl($this->_downloadURL['url'], + $this->_registry->parsedPackageNameToString($this->_parsedname, true)); + $newinfo = $this->getParsedPackage(); + foreach ($newinfo as $i => $p) { + $newinfo[$i] = strtolower($p); + } + + if ($info != $newinfo) { + do { + if ($info['channel'] == 'pecl.php.net' && $newinfo['channel'] == 'pear.php.net') { + $info['channel'] = 'pear.php.net'; + if ($info == $newinfo) { + // skip the channel check if a pecl package says it's a PEAR package + break; + } + } + if ($info['channel'] == 'pear.php.net' && $newinfo['channel'] == 'pecl.php.net') { + $info['channel'] = 'pecl.php.net'; + if ($info == $newinfo) { + // skip the channel check if a pecl package says it's a PEAR package + break; + } + } + + return PEAR::raiseError('CRITICAL ERROR: We are ' . + $this->_registry->parsedPackageNameToString($info) . ', but the file ' . + 'downloaded claims to be ' . + $this->_registry->parsedPackageNameToString($this->getParsedPackage())); + } while (false); + } + + if (PEAR::isError($err) || !$this->_valid) { + return $err; + } + } + + $this->_type = 'local'; + return $this->_packagefile; + } + + function &getPackageFile() + { + return $this->_packagefile; + } + + function &getDownloader() + { + return $this->_downloader; + } + + function getType() + { + return $this->_type; + } + + /** + * Like {@link initialize()}, but operates on a dependency + */ + function fromDepURL($dep) + { + $this->_downloadURL = $dep; + if (isset($dep['uri'])) { + $options = $this->_downloader->getOptions(); + if (!extension_loaded("zlib") || isset($options['nocompress'])) { + $ext = '.tar'; + } else { + $ext = '.tgz'; + } + + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $err = $this->_fromUrl($dep['uri'] . $ext); + PEAR::popErrorHandling(); + if (PEAR::isError($err)) { + if (!isset($options['soft'])) { + $this->_downloader->log(0, $err->getMessage()); + } + + return PEAR::raiseError('Invalid uri dependency "' . $dep['uri'] . $ext . '", ' . + 'cannot download'); + } + } else { + $this->_parsedname = + array( + 'package' => $dep['info']->getPackage(), + 'channel' => $dep['info']->getChannel(), + 'version' => $dep['version'] + ); + if (!isset($dep['nodefault'])) { + $this->_parsedname['group'] = 'default'; // download the default dependency group + $this->_explicitGroup = false; + } + + $this->_rawpackagefile = $dep['raw']; + } + } + + function detectDependencies($params) + { + $options = $this->_downloader->getOptions(); + if (isset($options['downloadonly'])) { + return; + } + + if (isset($options['offline'])) { + $this->_downloader->log(3, 'Skipping dependency download check, --offline specified'); + return; + } + + $pname = $this->getParsedPackage(); + if (!$pname) { + return; + } + + $deps = $this->getDeps(); + if (!$deps) { + return; + } + + if (isset($deps['required'])) { // package.xml 2.0 + return $this->_detect2($deps, $pname, $options, $params); + } + + return $this->_detect1($deps, $pname, $options, $params); + } + + function setValidated() + { + $this->_validated = true; + } + + function alreadyValidated() + { + return $this->_validated; + } + + /** + * Remove packages to be downloaded that are already installed + * @param array of PEAR_Downloader_Package objects + * @static + */ + function removeInstalled(&$params) + { + if (!isset($params[0])) { + return; + } + + $options = $params[0]->_downloader->getOptions(); + if (!isset($options['downloadonly'])) { + foreach ($params as $i => $param) { + $package = $param->getPackage(); + $channel = $param->getChannel(); + // remove self if already installed with this version + // this does not need any pecl magic - we only remove exact matches + if ($param->_installRegistry->packageExists($package, $channel)) { + $packageVersion = $param->_installRegistry->packageInfo($package, 'version', $channel); + if (version_compare($packageVersion, $param->getVersion(), '==')) { + if (!isset($options['force'])) { + $info = $param->getParsedPackage(); + unset($info['version']); + unset($info['state']); + if (!isset($options['soft'])) { + $param->_downloader->log(1, 'Skipping package "' . + $param->getShortName() . + '", already installed as version ' . $packageVersion); + } + $params[$i] = false; + } + } elseif (!isset($options['force']) && !isset($options['upgrade']) && + !isset($options['soft'])) { + $info = $param->getParsedPackage(); + $param->_downloader->log(1, 'Skipping package "' . + $param->getShortName() . + '", already installed as version ' . $packageVersion); + $params[$i] = false; + } + } + } + } + + PEAR_Downloader_Package::removeDuplicates($params); + } + + function _detect2($deps, $pname, $options, $params) + { + $this->_downloadDeps = array(); + $groupnotfound = false; + foreach (array('package', 'subpackage') as $packagetype) { + // get required dependency group + if (isset($deps['required'][$packagetype])) { + if (isset($deps['required'][$packagetype][0])) { + foreach ($deps['required'][$packagetype] as $dep) { + if (isset($dep['conflicts'])) { + // skip any package that this package conflicts with + continue; + } + $ret = $this->_detect2Dep($dep, $pname, 'required', $params); + if (is_array($ret)) { + $this->_downloadDeps[] = $ret; + } elseif (PEAR::isError($ret) && !isset($options['soft'])) { + $this->_downloader->log(0, $ret->getMessage()); + } + } + } else { + $dep = $deps['required'][$packagetype]; + if (!isset($dep['conflicts'])) { + // skip any package that this package conflicts with + $ret = $this->_detect2Dep($dep, $pname, 'required', $params); + if (is_array($ret)) { + $this->_downloadDeps[] = $ret; + } elseif (PEAR::isError($ret) && !isset($options['soft'])) { + $this->_downloader->log(0, $ret->getMessage()); + } + } + } + } + + // get optional dependency group, if any + if (isset($deps['optional'][$packagetype])) { + $skipnames = array(); + if (!isset($deps['optional'][$packagetype][0])) { + $deps['optional'][$packagetype] = array($deps['optional'][$packagetype]); + } + + foreach ($deps['optional'][$packagetype] as $dep) { + $skip = false; + if (!isset($options['alldeps'])) { + $dep['package'] = $dep['name']; + if (!isset($options['soft'])) { + $this->_downloader->log(3, 'Notice: package "' . + $this->_registry->parsedPackageNameToString($this->getParsedPackage(), + true) . '" optional dependency "' . + $this->_registry->parsedPackageNameToString(array('package' => + $dep['name'], 'channel' => 'pear.php.net'), true) . + '" will not be automatically downloaded'); + } + $skipnames[] = $this->_registry->parsedPackageNameToString($dep, true); + $skip = true; + unset($dep['package']); + } + + $ret = $this->_detect2Dep($dep, $pname, 'optional', $params); + if (PEAR::isError($ret) && !isset($options['soft'])) { + $this->_downloader->log(0, $ret->getMessage()); + } + + if (!$ret) { + $dep['package'] = $dep['name']; + $skip = count($skipnames) ? + $skipnames[count($skipnames) - 1] : ''; + if ($skip == + $this->_registry->parsedPackageNameToString($dep, true)) { + array_pop($skipnames); + } + } + + if (!$skip && is_array($ret)) { + $this->_downloadDeps[] = $ret; + } + } + + if (count($skipnames)) { + if (!isset($options['soft'])) { + $this->_downloader->log(1, 'Did not download optional dependencies: ' . + implode(', ', $skipnames) . + ', use --alldeps to download automatically'); + } + } + } + + // get requested dependency group, if any + $groupname = $this->getGroup(); + $explicit = $this->_explicitGroup; + if (!$groupname) { + if (!$this->canDefault()) { + continue; + } + + $groupname = 'default'; // try the default dependency group + } + + if ($groupnotfound) { + continue; + } + + if (isset($deps['group'])) { + if (isset($deps['group']['attribs'])) { + if (strtolower($deps['group']['attribs']['name']) == strtolower($groupname)) { + $group = $deps['group']; + } elseif ($explicit) { + if (!isset($options['soft'])) { + $this->_downloader->log(0, 'Warning: package "' . + $this->_registry->parsedPackageNameToString($pname, true) . + '" has no dependency ' . 'group named "' . $groupname . '"'); + } + + $groupnotfound = true; + continue; + } + } else { + $found = false; + foreach ($deps['group'] as $group) { + if (strtolower($group['attribs']['name']) == strtolower($groupname)) { + $found = true; + break; + } + } + + if (!$found) { + if ($explicit) { + if (!isset($options['soft'])) { + $this->_downloader->log(0, 'Warning: package "' . + $this->_registry->parsedPackageNameToString($pname, true) . + '" has no dependency ' . 'group named "' . $groupname . '"'); + } + } + + $groupnotfound = true; + continue; + } + } + } + + if (isset($group) && isset($group[$packagetype])) { + if (isset($group[$packagetype][0])) { + foreach ($group[$packagetype] as $dep) { + $ret = $this->_detect2Dep($dep, $pname, 'dependency group "' . + $group['attribs']['name'] . '"', $params); + if (is_array($ret)) { + $this->_downloadDeps[] = $ret; + } elseif (PEAR::isError($ret) && !isset($options['soft'])) { + $this->_downloader->log(0, $ret->getMessage()); + } + } + } else { + $ret = $this->_detect2Dep($group[$packagetype], $pname, + 'dependency group "' . + $group['attribs']['name'] . '"', $params); + if (is_array($ret)) { + $this->_downloadDeps[] = $ret; + } elseif (PEAR::isError($ret) && !isset($options['soft'])) { + $this->_downloader->log(0, $ret->getMessage()); + } + } + } + } + } + + function _detect2Dep($dep, $pname, $group, $params) + { + if (isset($dep['conflicts'])) { + return true; + } + + $options = $this->_downloader->getOptions(); + if (isset($dep['uri'])) { + return array('uri' => $dep['uri'], 'dep' => $dep);; + } + + $testdep = $dep; + $testdep['package'] = $dep['name']; + if (PEAR_Downloader_Package::willDownload($testdep, $params)) { + $dep['package'] = $dep['name']; + if (!isset($options['soft'])) { + $this->_downloader->log(2, $this->getShortName() . ': Skipping ' . $group . + ' dependency "' . + $this->_registry->parsedPackageNameToString($dep, true) . + '", will be installed'); + } + return false; + } + + $options = $this->_downloader->getOptions(); + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + if ($this->_explicitState) { + $pname['state'] = $this->_explicitState; + } + + $url = $this->_downloader->_getDepPackageDownloadUrl($dep, $pname); + if (PEAR::isError($url)) { + PEAR::popErrorHandling(); + return $url; + } + + $dep['package'] = $dep['name']; + $ret = $this->_analyzeDownloadURL($url, 'dependency', $dep, $params, $group == 'optional' && + !isset($options['alldeps']), true); + PEAR::popErrorHandling(); + if (PEAR::isError($ret)) { + if (!isset($options['soft'])) { + $this->_downloader->log(0, $ret->getMessage()); + } + + return false; + } + + // check to see if a dep is already installed and is the same or newer + if (!isset($dep['min']) && !isset($dep['max']) && !isset($dep['recommended'])) { + $oper = 'has'; + } else { + $oper = 'gt'; + } + + // do not try to move this before getDepPackageDownloadURL + // we can't determine whether upgrade is necessary until we know what + // version would be downloaded + if (!isset($options['force']) && $this->isInstalled($ret, $oper)) { + $version = $this->_installRegistry->packageInfo($dep['name'], 'version', $dep['channel']); + $dep['package'] = $dep['name']; + if (!isset($options['soft'])) { + $this->_downloader->log(3, $this->getShortName() . ': Skipping ' . $group . + ' dependency "' . + $this->_registry->parsedPackageNameToString($dep, true) . + '" version ' . $url['version'] . ', already installed as version ' . + $version); + } + + return false; + } + + if (isset($dep['nodefault'])) { + $ret['nodefault'] = true; + } + + return $ret; + } + + function _detect1($deps, $pname, $options, $params) + { + $this->_downloadDeps = array(); + $skipnames = array(); + foreach ($deps as $dep) { + $nodownload = false; + if (isset ($dep['type']) && $dep['type'] === 'pkg') { + $dep['channel'] = 'pear.php.net'; + $dep['package'] = $dep['name']; + switch ($dep['rel']) { + case 'not' : + continue 2; + case 'ge' : + case 'eq' : + case 'gt' : + case 'has' : + $group = (!isset($dep['optional']) || $dep['optional'] == 'no') ? + 'required' : + 'optional'; + if (PEAR_Downloader_Package::willDownload($dep, $params)) { + $this->_downloader->log(2, $this->getShortName() . ': Skipping ' . $group + . ' dependency "' . + $this->_registry->parsedPackageNameToString($dep, true) . + '", will be installed'); + continue 2; + } + $fakedp = new PEAR_PackageFile_v1; + $fakedp->setPackage($dep['name']); + // skip internet check if we are not upgrading (bug #5810) + if (!isset($options['upgrade']) && $this->isInstalled( + $fakedp, $dep['rel'])) { + $this->_downloader->log(2, $this->getShortName() . ': Skipping ' . $group + . ' dependency "' . + $this->_registry->parsedPackageNameToString($dep, true) . + '", is already installed'); + continue 2; + } + } + + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + if ($this->_explicitState) { + $pname['state'] = $this->_explicitState; + } + + $url = $this->_downloader->_getDepPackageDownloadUrl($dep, $pname); + $chan = 'pear.php.net'; + if (PEAR::isError($url)) { + // check to see if this is a pecl package that has jumped + // from pear.php.net to pecl.php.net channel + if (!class_exists('PEAR_Dependency2')) { + require_once 'PEAR/Dependency2.php'; + } + + $newdep = PEAR_Dependency2::normalizeDep($dep); + $newdep = $newdep[0]; + $newdep['channel'] = 'pecl.php.net'; + $chan = 'pecl.php.net'; + $url = $this->_downloader->_getDepPackageDownloadUrl($newdep, $pname); + $obj = &$this->_installRegistry->getPackage($dep['name']); + if (PEAR::isError($url)) { + PEAR::popErrorHandling(); + if ($obj !== null && $this->isInstalled($obj, $dep['rel'])) { + $group = (!isset($dep['optional']) || $dep['optional'] == 'no') ? + 'required' : + 'optional'; + $dep['package'] = $dep['name']; + if (!isset($options['soft'])) { + $this->_downloader->log(3, $this->getShortName() . + ': Skipping ' . $group . ' dependency "' . + $this->_registry->parsedPackageNameToString($dep, true) . + '", already installed as version ' . $obj->getVersion()); + } + $skip = count($skipnames) ? + $skipnames[count($skipnames) - 1] : ''; + if ($skip == + $this->_registry->parsedPackageNameToString($dep, true)) { + array_pop($skipnames); + } + continue; + } else { + if (isset($dep['optional']) && $dep['optional'] == 'yes') { + $this->_downloader->log(2, $this->getShortName() . + ': Skipping optional dependency "' . + $this->_registry->parsedPackageNameToString($dep, true) . + '", no releases exist'); + continue; + } else { + return $url; + } + } + } + } + + PEAR::popErrorHandling(); + if (!isset($options['alldeps'])) { + if (isset($dep['optional']) && $dep['optional'] == 'yes') { + if (!isset($options['soft'])) { + $this->_downloader->log(3, 'Notice: package "' . + $this->getShortName() . + '" optional dependency "' . + $this->_registry->parsedPackageNameToString( + array('channel' => $chan, 'package' => + $dep['name']), true) . + '" will not be automatically downloaded'); + } + $skipnames[] = $this->_registry->parsedPackageNameToString( + array('channel' => $chan, 'package' => + $dep['name']), true); + $nodownload = true; + } + } + + if (!isset($options['alldeps']) && !isset($options['onlyreqdeps'])) { + if (!isset($dep['optional']) || $dep['optional'] == 'no') { + if (!isset($options['soft'])) { + $this->_downloader->log(3, 'Notice: package "' . + $this->getShortName() . + '" required dependency "' . + $this->_registry->parsedPackageNameToString( + array('channel' => $chan, 'package' => + $dep['name']), true) . + '" will not be automatically downloaded'); + } + $skipnames[] = $this->_registry->parsedPackageNameToString( + array('channel' => $chan, 'package' => + $dep['name']), true); + $nodownload = true; + } + } + + // check to see if a dep is already installed + // do not try to move this before getDepPackageDownloadURL + // we can't determine whether upgrade is necessary until we know what + // version would be downloaded + if (!isset($options['force']) && $this->isInstalled( + $url, $dep['rel'])) { + $group = (!isset($dep['optional']) || $dep['optional'] == 'no') ? + 'required' : + 'optional'; + $dep['package'] = $dep['name']; + if (isset($newdep)) { + $version = $this->_installRegistry->packageInfo($newdep['name'], 'version', $newdep['channel']); + } else { + $version = $this->_installRegistry->packageInfo($dep['name'], 'version'); + } + + $dep['version'] = $url['version']; + if (!isset($options['soft'])) { + $this->_downloader->log(3, $this->getShortName() . ': Skipping ' . $group . + ' dependency "' . + $this->_registry->parsedPackageNameToString($dep, true) . + '", already installed as version ' . $version); + } + + $skip = count($skipnames) ? + $skipnames[count($skipnames) - 1] : ''; + if ($skip == + $this->_registry->parsedPackageNameToString($dep, true)) { + array_pop($skipnames); + } + + continue; + } + + if ($nodownload) { + continue; + } + + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + if (isset($newdep)) { + $dep = $newdep; + } + + $dep['package'] = $dep['name']; + $ret = $this->_analyzeDownloadURL($url, 'dependency', $dep, $params, + isset($dep['optional']) && $dep['optional'] == 'yes' && + !isset($options['alldeps']), true); + PEAR::popErrorHandling(); + if (PEAR::isError($ret)) { + if (!isset($options['soft'])) { + $this->_downloader->log(0, $ret->getMessage()); + } + continue; + } + + $this->_downloadDeps[] = $ret; + } + } + + if (count($skipnames)) { + if (!isset($options['soft'])) { + $this->_downloader->log(1, 'Did not download dependencies: ' . + implode(', ', $skipnames) . + ', use --alldeps or --onlyreqdeps to download automatically'); + } + } + } + + function setDownloadURL($pkg) + { + $this->_downloadURL = $pkg; + } + + /** + * Set the package.xml object for this downloaded package + * + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 $pkg + */ + function setPackageFile(&$pkg) + { + $this->_packagefile = &$pkg; + } + + function getShortName() + { + return $this->_registry->parsedPackageNameToString(array('channel' => $this->getChannel(), + 'package' => $this->getPackage()), true); + } + + function getParsedPackage() + { + if (isset($this->_packagefile) || isset($this->_parsedname)) { + return array('channel' => $this->getChannel(), + 'package' => $this->getPackage(), + 'version' => $this->getVersion()); + } + + return false; + } + + function getDownloadURL() + { + return $this->_downloadURL; + } + + function canDefault() + { + if (isset($this->_downloadURL) && isset($this->_downloadURL['nodefault'])) { + return false; + } + + return true; + } + + function getPackage() + { + if (isset($this->_packagefile)) { + return $this->_packagefile->getPackage(); + } elseif (isset($this->_downloadURL['info'])) { + return $this->_downloadURL['info']->getPackage(); + } + + return false; + } + + /** + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + */ + function isSubpackage(&$pf) + { + if (isset($this->_packagefile)) { + return $this->_packagefile->isSubpackage($pf); + } elseif (isset($this->_downloadURL['info'])) { + return $this->_downloadURL['info']->isSubpackage($pf); + } + + return false; + } + + function getPackageType() + { + if (isset($this->_packagefile)) { + return $this->_packagefile->getPackageType(); + } elseif (isset($this->_downloadURL['info'])) { + return $this->_downloadURL['info']->getPackageType(); + } + + return false; + } + + function isBundle() + { + if (isset($this->_packagefile)) { + return $this->_packagefile->getPackageType() == 'bundle'; + } + + return false; + } + + function getPackageXmlVersion() + { + if (isset($this->_packagefile)) { + return $this->_packagefile->getPackagexmlVersion(); + } elseif (isset($this->_downloadURL['info'])) { + return $this->_downloadURL['info']->getPackagexmlVersion(); + } + + return '1.0'; + } + + function getChannel() + { + if (isset($this->_packagefile)) { + return $this->_packagefile->getChannel(); + } elseif (isset($this->_downloadURL['info'])) { + return $this->_downloadURL['info']->getChannel(); + } + + return false; + } + + function getURI() + { + if (isset($this->_packagefile)) { + return $this->_packagefile->getURI(); + } elseif (isset($this->_downloadURL['info'])) { + return $this->_downloadURL['info']->getURI(); + } + + return false; + } + + function getVersion() + { + if (isset($this->_packagefile)) { + return $this->_packagefile->getVersion(); + } elseif (isset($this->_downloadURL['version'])) { + return $this->_downloadURL['version']; + } + + return false; + } + + function isCompatible($pf) + { + if (isset($this->_packagefile)) { + return $this->_packagefile->isCompatible($pf); + } elseif (isset($this->_downloadURL['info'])) { + return $this->_downloadURL['info']->isCompatible($pf); + } + + return true; + } + + function setGroup($group) + { + $this->_parsedname['group'] = $group; + } + + function getGroup() + { + if (isset($this->_parsedname['group'])) { + return $this->_parsedname['group']; + } + + return ''; + } + + function isExtension($name) + { + if (isset($this->_packagefile)) { + return $this->_packagefile->isExtension($name); + } elseif (isset($this->_downloadURL['info'])) { + if ($this->_downloadURL['info']->getPackagexmlVersion() == '2.0') { + return $this->_downloadURL['info']->getProvidesExtension() == $name; + } + + return false; + } + + return false; + } + + function getDeps() + { + if (isset($this->_packagefile)) { + $ver = $this->_packagefile->getPackagexmlVersion(); + if (version_compare($ver, '2.0', '>=')) { + return $this->_packagefile->getDeps(true); + } + + return $this->_packagefile->getDeps(); + } elseif (isset($this->_downloadURL['info'])) { + $ver = $this->_downloadURL['info']->getPackagexmlVersion(); + if (version_compare($ver, '2.0', '>=')) { + return $this->_downloadURL['info']->getDeps(true); + } + + return $this->_downloadURL['info']->getDeps(); + } + + return array(); + } + + /** + * @param array Parsed array from {@link PEAR_Registry::parsePackageName()} or a dependency + * returned from getDepDownloadURL() + */ + function isEqual($param) + { + if (is_object($param)) { + $channel = $param->getChannel(); + $package = $param->getPackage(); + if ($param->getURI()) { + $param = array( + 'channel' => $param->getChannel(), + 'package' => $param->getPackage(), + 'version' => $param->getVersion(), + 'uri' => $param->getURI(), + ); + } else { + $param = array( + 'channel' => $param->getChannel(), + 'package' => $param->getPackage(), + 'version' => $param->getVersion(), + ); + } + } else { + if (isset($param['uri'])) { + if ($this->getChannel() != '__uri') { + return false; + } + return $param['uri'] == $this->getURI(); + } + + $package = isset($param['package']) ? $param['package'] : $param['info']->getPackage(); + $channel = isset($param['channel']) ? $param['channel'] : $param['info']->getChannel(); + if (isset($param['rel'])) { + if (!class_exists('PEAR_Dependency2')) { + require_once 'PEAR/Dependency2.php'; + } + + $newdep = PEAR_Dependency2::normalizeDep($param); + $newdep = $newdep[0]; + } elseif (isset($param['min'])) { + $newdep = $param; + } + } + + if (isset($newdep)) { + if (!isset($newdep['min'])) { + $newdep['min'] = '0'; + } + + if (!isset($newdep['max'])) { + $newdep['max'] = '100000000000000000000'; + } + + // use magic to support pecl packages suddenly jumping to the pecl channel + // we need to support both dependency possibilities + if ($channel == 'pear.php.net' && $this->getChannel() == 'pecl.php.net') { + if ($package == $this->getPackage()) { + $channel = 'pecl.php.net'; + } + } + if ($channel == 'pecl.php.net' && $this->getChannel() == 'pear.php.net') { + if ($package == $this->getPackage()) { + $channel = 'pear.php.net'; + } + } + + return (strtolower($package) == strtolower($this->getPackage()) && + $channel == $this->getChannel() && + version_compare($newdep['min'], $this->getVersion(), '<=') && + version_compare($newdep['max'], $this->getVersion(), '>=')); + } + + // use magic to support pecl packages suddenly jumping to the pecl channel + if ($channel == 'pecl.php.net' && $this->getChannel() == 'pear.php.net') { + if (strtolower($package) == strtolower($this->getPackage())) { + $channel = 'pear.php.net'; + } + } + + if (isset($param['version'])) { + return (strtolower($package) == strtolower($this->getPackage()) && + $channel == $this->getChannel() && + $param['version'] == $this->getVersion()); + } + + return strtolower($package) == strtolower($this->getPackage()) && + $channel == $this->getChannel(); + } + + function isInstalled($dep, $oper = '==') + { + if (!$dep) { + return false; + } + + if ($oper != 'ge' && $oper != 'gt' && $oper != 'has' && $oper != '==') { + return false; + } + + if (is_object($dep)) { + $package = $dep->getPackage(); + $channel = $dep->getChannel(); + if ($dep->getURI()) { + $dep = array( + 'uri' => $dep->getURI(), + 'version' => $dep->getVersion(), + ); + } else { + $dep = array( + 'version' => $dep->getVersion(), + ); + } + } else { + if (isset($dep['uri'])) { + $channel = '__uri'; + $package = $dep['dep']['name']; + } else { + $channel = $dep['info']->getChannel(); + $package = $dep['info']->getPackage(); + } + } + + $options = $this->_downloader->getOptions(); + $test = $this->_installRegistry->packageExists($package, $channel); + if (!$test && $channel == 'pecl.php.net') { + // do magic to allow upgrading from old pecl packages to new ones + $test = $this->_installRegistry->packageExists($package, 'pear.php.net'); + $channel = 'pear.php.net'; + } + + if ($test) { + if (isset($dep['uri'])) { + if ($this->_installRegistry->packageInfo($package, 'uri', '__uri') == $dep['uri']) { + return true; + } + } + + if (isset($options['upgrade'])) { + $packageVersion = $this->_installRegistry->packageInfo($package, 'version', $channel); + if (version_compare($packageVersion, $dep['version'], '>=')) { + return true; + } + + return false; + } + + return true; + } + + return false; + } + + /** + * Detect duplicate package names with differing versions + * + * If a user requests to install Date 1.4.6 and Date 1.4.7, + * for instance, this is a logic error. This method + * detects this situation. + * + * @param array $params array of PEAR_Downloader_Package objects + * @param array $errorparams empty array + * @return array array of stupid duplicated packages in PEAR_Downloader_Package obejcts + */ + function detectStupidDuplicates($params, &$errorparams) + { + $existing = array(); + foreach ($params as $i => $param) { + $package = $param->getPackage(); + $channel = $param->getChannel(); + $group = $param->getGroup(); + if (!isset($existing[$channel . '/' . $package])) { + $existing[$channel . '/' . $package] = array(); + } + + if (!isset($existing[$channel . '/' . $package][$group])) { + $existing[$channel . '/' . $package][$group] = array(); + } + + $existing[$channel . '/' . $package][$group][] = $i; + } + + $indices = array(); + foreach ($existing as $package => $groups) { + foreach ($groups as $group => $dupes) { + if (count($dupes) > 1) { + $indices = $indices + $dupes; + } + } + } + + $indices = array_unique($indices); + foreach ($indices as $index) { + $errorparams[] = $params[$index]; + } + + return count($errorparams); + } + + /** + * @param array + * @param bool ignore install groups - for final removal of dupe packages + * @static + */ + function removeDuplicates(&$params, $ignoreGroups = false) + { + $pnames = array(); + foreach ($params as $i => $param) { + if (!$param) { + continue; + } + + if ($param->getPackage()) { + $group = $ignoreGroups ? '' : $param->getGroup(); + $pnames[$i] = $param->getChannel() . '/' . + $param->getPackage() . '-' . $param->getVersion() . '#' . $group; + } + } + + $pnames = array_unique($pnames); + $unset = array_diff(array_keys($params), array_keys($pnames)); + $testp = array_flip($pnames); + foreach ($params as $i => $param) { + if (!$param) { + $unset[] = $i; + continue; + } + + if (!is_a($param, 'PEAR_Downloader_Package')) { + $unset[] = $i; + continue; + } + + $group = $ignoreGroups ? '' : $param->getGroup(); + if (!isset($testp[$param->getChannel() . '/' . $param->getPackage() . '-' . + $param->getVersion() . '#' . $group])) { + $unset[] = $i; + } + } + + foreach ($unset as $i) { + unset($params[$i]); + } + + $ret = array(); + foreach ($params as $i => $param) { + $ret[] = &$params[$i]; + } + + $params = array(); + foreach ($ret as $i => $param) { + $params[] = &$ret[$i]; + } + } + + function explicitState() + { + return $this->_explicitState; + } + + function setExplicitState($s) + { + $this->_explicitState = $s; + } + + /** + * @static + */ + function mergeDependencies(&$params) + { + $bundles = $newparams = array(); + foreach ($params as $i => $param) { + if (!$param->isBundle()) { + continue; + } + + $bundles[] = $i; + $pf = &$param->getPackageFile(); + $newdeps = array(); + $contents = $pf->getBundledPackages(); + if (!is_array($contents)) { + $contents = array($contents); + } + + foreach ($contents as $file) { + $filecontents = $pf->getFileContents($file); + $dl = &$param->getDownloader(); + $options = $dl->getOptions(); + if (PEAR::isError($dir = $dl->getDownloadDir())) { + return $dir; + } + + $fp = @fopen($dir . DIRECTORY_SEPARATOR . $file, 'wb'); + if (!$fp) { + continue; + } + + // FIXME do symlink check + + fwrite($fp, $filecontents, strlen($filecontents)); + fclose($fp); + if ($s = $params[$i]->explicitState()) { + $obj->setExplicitState($s); + } + + $obj = &new PEAR_Downloader_Package($params[$i]->getDownloader()); + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + if (PEAR::isError($dir = $dl->getDownloadDir())) { + PEAR::popErrorHandling(); + return $dir; + } + + $e = $obj->_fromFile($a = $dir . DIRECTORY_SEPARATOR . $file); + PEAR::popErrorHandling(); + if (PEAR::isError($e)) { + if (!isset($options['soft'])) { + $dl->log(0, $e->getMessage()); + } + continue; + } + + $j = &$obj; + if (!PEAR_Downloader_Package::willDownload($j, + array_merge($params, $newparams)) && !$param->isInstalled($j)) { + $newparams[] = &$j; + } + } + } + + foreach ($bundles as $i) { + unset($params[$i]); // remove bundles - only their contents matter for installation + } + + PEAR_Downloader_Package::removeDuplicates($params); // strip any unset indices + if (count($newparams)) { // add in bundled packages for install + foreach ($newparams as $i => $unused) { + $params[] = &$newparams[$i]; + } + $newparams = array(); + } + + foreach ($params as $i => $param) { + $newdeps = array(); + foreach ($param->_downloadDeps as $dep) { + $merge = array_merge($params, $newparams); + if (!PEAR_Downloader_Package::willDownload($dep, $merge) + && !$param->isInstalled($dep) + ) { + $newdeps[] = $dep; + } else { + //var_dump($dep); + // detect versioning conflicts here + } + } + + // convert the dependencies into PEAR_Downloader_Package objects for the next time around + $params[$i]->_downloadDeps = array(); + foreach ($newdeps as $dep) { + $obj = &new PEAR_Downloader_Package($params[$i]->getDownloader()); + if ($s = $params[$i]->explicitState()) { + $obj->setExplicitState($s); + } + + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $e = $obj->fromDepURL($dep); + PEAR::popErrorHandling(); + if (PEAR::isError($e)) { + if (!isset($options['soft'])) { + $obj->_downloader->log(0, $e->getMessage()); + } + continue; + } + + $e = $obj->detectDependencies($params); + if (PEAR::isError($e)) { + if (!isset($options['soft'])) { + $obj->_downloader->log(0, $e->getMessage()); + } + } + + $j = &$obj; + $newparams[] = &$j; + } + } + + if (count($newparams)) { + foreach ($newparams as $i => $unused) { + $params[] = &$newparams[$i]; + } + return true; + } + + return false; + } + + + /** + * @static + */ + function willDownload($param, $params) + { + if (!is_array($params)) { + return false; + } + + foreach ($params as $obj) { + if ($obj->isEqual($param)) { + return true; + } + } + + return false; + } + + /** + * For simpler unit-testing + * @param PEAR_Config + * @param int + * @param string + */ + function &getPackagefileObject(&$c, $d) + { + $a = &new PEAR_PackageFile($c, $d); + return $a; + } + + /** + * This will retrieve from a local file if possible, and parse out + * a group name as well. The original parameter will be modified to reflect this. + * @param string|array can be a parsed package name as well + * @access private + */ + function _fromFile(&$param) + { + $saveparam = $param; + if (is_string($param)) { + if (!@file_exists($param)) { + $test = explode('#', $param); + $group = array_pop($test); + if (@file_exists(implode('#', $test))) { + $this->setGroup($group); + $param = implode('#', $test); + $this->_explicitGroup = true; + } + } + + if (@is_file($param)) { + $this->_type = 'local'; + $options = $this->_downloader->getOptions(); + $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->_debug); + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $pf = &$pkg->fromAnyFile($param, PEAR_VALIDATE_INSTALLING); + PEAR::popErrorHandling(); + if (PEAR::isError($pf)) { + $this->_valid = false; + $param = $saveparam; + return $pf; + } + $this->_packagefile = &$pf; + if (!$this->getGroup()) { + $this->setGroup('default'); // install the default dependency group + } + return $this->_valid = true; + } + } + $param = $saveparam; + return $this->_valid = false; + } + + function _fromUrl($param, $saveparam = '') + { + if (!is_array($param) && (preg_match('#^(http|https|ftp)://#', $param))) { + $options = $this->_downloader->getOptions(); + $this->_type = 'url'; + $callback = $this->_downloader->ui ? + array(&$this->_downloader, '_downloadCallback') : null; + $this->_downloader->pushErrorHandling(PEAR_ERROR_RETURN); + if (PEAR::isError($dir = $this->_downloader->getDownloadDir())) { + $this->_downloader->popErrorHandling(); + return $dir; + } + + $this->_downloader->log(3, 'Downloading "' . $param . '"'); + $file = $this->_downloader->downloadHttp($param, $this->_downloader->ui, + $dir, $callback, null, false, $this->getChannel()); + $this->_downloader->popErrorHandling(); + if (PEAR::isError($file)) { + if (!empty($saveparam)) { + $saveparam = ", cannot download \"$saveparam\""; + } + $err = PEAR::raiseError('Could not download from "' . $param . + '"' . $saveparam . ' (' . $file->getMessage() . ')'); + return $err; + } + + if ($this->_rawpackagefile) { + require_once 'Archive/Tar.php'; + $tar = &new Archive_Tar($file); + $packagexml = $tar->extractInString('package2.xml'); + if (!$packagexml) { + $packagexml = $tar->extractInString('package.xml'); + } + + if (str_replace(array("\n", "\r"), array('',''), $packagexml) != + str_replace(array("\n", "\r"), array('',''), $this->_rawpackagefile)) { + if ($this->getChannel() != 'pear.php.net') { + return PEAR::raiseError('CRITICAL ERROR: package.xml downloaded does ' . + 'not match value returned from xml-rpc'); + } + + // be more lax for the existing PEAR packages that have not-ok + // characters in their package.xml + $this->_downloader->log(0, 'CRITICAL WARNING: The "' . + $this->getPackage() . '" package has invalid characters in its ' . + 'package.xml. The next version of PEAR may not be able to install ' . + 'this package for security reasons. Please open a bug report at ' . + 'http://pear.php.net/package/' . $this->getPackage() . '/bugs'); + } + } + + // whew, download worked! + $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->debug); + + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $pf = &$pkg->fromAnyFile($file, PEAR_VALIDATE_INSTALLING); + PEAR::popErrorHandling(); + if (PEAR::isError($pf)) { + if (is_array($pf->getUserInfo())) { + foreach ($pf->getUserInfo() as $err) { + if (is_array($err)) { + $err = $err['message']; + } + + if (!isset($options['soft'])) { + $this->_downloader->log(0, "Validation Error: $err"); + } + } + } + + if (!isset($options['soft'])) { + $this->_downloader->log(0, $pf->getMessage()); + } + + ///FIXME need to pass back some error code that we can use to match with to cancel all further operations + /// At least stop all deps of this package from being installed + $out = $saveparam ? $saveparam : $param; + $err = PEAR::raiseError('Download of "' . $out . '" succeeded, but it is not a valid package archive'); + $this->_valid = false; + return $err; + } + + $this->_packagefile = &$pf; + $this->setGroup('default'); // install the default dependency group + return $this->_valid = true; + } + + return $this->_valid = false; + } + + /** + * + * @param string|array pass in an array of format + * array( + * 'package' => 'pname', + * ['channel' => 'channame',] + * ['version' => 'version',] + * ['state' => 'state',]) + * or a string of format [channame/]pname[-version|-state] + */ + function _fromString($param) + { + $options = $this->_downloader->getOptions(); + $channel = $this->_config->get('default_channel'); + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $pname = $this->_registry->parsePackageName($param, $channel); + PEAR::popErrorHandling(); + if (PEAR::isError($pname)) { + if ($pname->getCode() == 'invalid') { + $this->_valid = false; + return false; + } + + if ($pname->getCode() == 'channel') { + $parsed = $pname->getUserInfo(); + if ($this->_downloader->discover($parsed['channel'])) { + if ($this->_config->get('auto_discover')) { + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $pname = $this->_registry->parsePackageName($param, $channel); + PEAR::popErrorHandling(); + } else { + if (!isset($options['soft'])) { + $this->_downloader->log(0, 'Channel "' . $parsed['channel'] . + '" is not initialized, use ' . + '"pear channel-discover ' . $parsed['channel'] . '" to initialize' . + 'or pear config-set auto_discover 1'); + } + } + } + + if (PEAR::isError($pname)) { + if (!isset($options['soft'])) { + $this->_downloader->log(0, $pname->getMessage()); + } + + if (is_array($param)) { + $param = $this->_registry->parsedPackageNameToString($param); + } + + $err = PEAR::raiseError('invalid package name/package file "' . $param . '"'); + $this->_valid = false; + return $err; + } + } else { + if (!isset($options['soft'])) { + $this->_downloader->log(0, $pname->getMessage()); + } + + $err = PEAR::raiseError('invalid package name/package file "' . $param . '"'); + $this->_valid = false; + return $err; + } + } + + if (!isset($this->_type)) { + $this->_type = 'rest'; + } + + $this->_parsedname = $pname; + $this->_explicitState = isset($pname['state']) ? $pname['state'] : false; + $this->_explicitGroup = isset($pname['group']) ? true : false; + + $info = $this->_downloader->_getPackageDownloadUrl($pname); + if (PEAR::isError($info)) { + if ($info->getCode() != -976 && $pname['channel'] == 'pear.php.net') { + // try pecl + $pname['channel'] = 'pecl.php.net'; + if ($test = $this->_downloader->_getPackageDownloadUrl($pname)) { + if (!PEAR::isError($test)) { + $info = PEAR::raiseError($info->getMessage() . ' - package ' . + $this->_registry->parsedPackageNameToString($pname, true) . + ' can be installed with "pecl install ' . $pname['package'] . + '"'); + } else { + $pname['channel'] = 'pear.php.net'; + } + } else { + $pname['channel'] = 'pear.php.net'; + } + } + + return $info; + } + + $this->_rawpackagefile = $info['raw']; + $ret = $this->_analyzeDownloadURL($info, $param, $pname); + if (PEAR::isError($ret)) { + return $ret; + } + + if ($ret) { + $this->_downloadURL = $ret; + return $this->_valid = (bool) $ret; + } + } + + /** + * @param array output of package.getDownloadURL + * @param string|array|object information for detecting packages to be downloaded, and + * for errors + * @param array name information of the package + * @param array|null packages to be downloaded + * @param bool is this an optional dependency? + * @param bool is this any kind of dependency? + * @access private + */ + function _analyzeDownloadURL($info, $param, $pname, $params = null, $optional = false, + $isdependency = false) + { + if (!is_string($param) && PEAR_Downloader_Package::willDownload($param, $params)) { + return false; + } + + if ($info === false) { + $saveparam = !is_string($param) ? ", cannot download \"$param\"" : ''; + + // no releases exist + return PEAR::raiseError('No releases for package "' . + $this->_registry->parsedPackageNameToString($pname, true) . '" exist' . $saveparam); + } + + if (strtolower($info['info']->getChannel()) != strtolower($pname['channel'])) { + $err = false; + if ($pname['channel'] == 'pecl.php.net') { + if ($info['info']->getChannel() != 'pear.php.net') { + $err = true; + } + } elseif ($info['info']->getChannel() == 'pecl.php.net') { + if ($pname['channel'] != 'pear.php.net') { + $err = true; + } + } else { + $err = true; + } + + if ($err) { + return PEAR::raiseError('SECURITY ERROR: package in channel "' . $pname['channel'] . + '" retrieved another channel\'s name for download! ("' . + $info['info']->getChannel() . '")'); + } + } + + $preferred_state = $this->_config->get('preferred_state'); + if (!isset($info['url'])) { + $package_version = $this->_registry->packageInfo($info['info']->getPackage(), + 'version', $info['info']->getChannel()); + if ($this->isInstalled($info)) { + if ($isdependency && version_compare($info['version'], $package_version, '<=')) { + // ignore bogus errors of "failed to download dependency" + // if it is already installed and the one that would be + // downloaded is older or the same version (Bug #7219) + return false; + } + } + + if ($info['version'] === $package_version) { + if (!isset($options['soft'])) { + $this->_downloader->log(1, 'WARNING: failed to download ' . $pname['channel'] . + '/' . $pname['package'] . '-' . $package_version. ', additionally the suggested version' . + ' (' . $package_version . ') is the same as the locally installed one.'); + } + + return false; + } + + if (version_compare($info['version'], $package_version, '<=')) { + if (!isset($options['soft'])) { + $this->_downloader->log(1, 'WARNING: failed to download ' . $pname['channel'] . + '/' . $pname['package'] . '-' . $package_version . ', additionally the suggested version' . + ' (' . $info['version'] . ') is a lower version than the locally installed one (' . $package_version . ').'); + } + + return false; + } + + $instead = ', will instead download version ' . $info['version'] . + ', stability "' . $info['info']->getState() . '"'; + // releases exist, but we failed to get any + if (isset($this->_downloader->_options['force'])) { + if (isset($pname['version'])) { + $vs = ', version "' . $pname['version'] . '"'; + } elseif (isset($pname['state'])) { + $vs = ', stability "' . $pname['state'] . '"'; + } elseif ($param == 'dependency') { + if (!class_exists('PEAR_Common')) { + require_once 'PEAR/Common.php'; + } + + if (!in_array($info['info']->getState(), + PEAR_Common::betterStates($preferred_state, true))) { + if ($optional) { + // don't spit out confusing error message + return $this->_downloader->_getPackageDownloadUrl( + array('package' => $pname['package'], + 'channel' => $pname['channel'], + 'version' => $info['version'])); + } + $vs = ' within preferred state "' . $preferred_state . + '"'; + } else { + if (!class_exists('PEAR_Dependency2')) { + require_once 'PEAR/Dependency2.php'; + } + + if ($optional) { + // don't spit out confusing error message + return $this->_downloader->_getPackageDownloadUrl( + array('package' => $pname['package'], + 'channel' => $pname['channel'], + 'version' => $info['version'])); + } + $vs = PEAR_Dependency2::_getExtraString($pname); + $instead = ''; + } + } else { + $vs = ' within preferred state "' . $preferred_state . '"'; + } + + if (!isset($options['soft'])) { + $this->_downloader->log(1, 'WARNING: failed to download ' . $pname['channel'] . + '/' . $pname['package'] . $vs . $instead); + } + + // download the latest release + return $this->_downloader->_getPackageDownloadUrl( + array('package' => $pname['package'], + 'channel' => $pname['channel'], + 'version' => $info['version'])); + } else { + if (isset($info['php']) && $info['php']) { + $err = PEAR::raiseError('Failed to download ' . + $this->_registry->parsedPackageNameToString( + array('channel' => $pname['channel'], + 'package' => $pname['package']), + true) . + ', latest release is version ' . $info['php']['v'] . + ', but it requires PHP version "' . + $info['php']['m'] . '", use "' . + $this->_registry->parsedPackageNameToString( + array('channel' => $pname['channel'], 'package' => $pname['package'], + 'version' => $info['php']['v'])) . '" to install', + PEAR_DOWNLOADER_PACKAGE_PHPVERSION); + return $err; + } + + // construct helpful error message + if (isset($pname['version'])) { + $vs = ', version "' . $pname['version'] . '"'; + } elseif (isset($pname['state'])) { + $vs = ', stability "' . $pname['state'] . '"'; + } elseif ($param == 'dependency') { + if (!class_exists('PEAR_Common')) { + require_once 'PEAR/Common.php'; + } + + if (!in_array($info['info']->getState(), + PEAR_Common::betterStates($preferred_state, true))) { + if ($optional) { + // don't spit out confusing error message, and don't die on + // optional dep failure! + return $this->_downloader->_getPackageDownloadUrl( + array('package' => $pname['package'], + 'channel' => $pname['channel'], + 'version' => $info['version'])); + } + $vs = ' within preferred state "' . $preferred_state . '"'; + } else { + if (!class_exists('PEAR_Dependency2')) { + require_once 'PEAR/Dependency2.php'; + } + + if ($optional) { + // don't spit out confusing error message, and don't die on + // optional dep failure! + return $this->_downloader->_getPackageDownloadUrl( + array('package' => $pname['package'], + 'channel' => $pname['channel'], + 'version' => $info['version'])); + } + $vs = PEAR_Dependency2::_getExtraString($pname); + } + } else { + $vs = ' within preferred state "' . $this->_downloader->config->get('preferred_state') . '"'; + } + + $options = $this->_downloader->getOptions(); + // this is only set by the "download-all" command + if (isset($options['ignorepreferred_state'])) { + $err = PEAR::raiseError( + 'Failed to download ' . $this->_registry->parsedPackageNameToString( + array('channel' => $pname['channel'], 'package' => $pname['package']), + true) + . $vs . + ', latest release is version ' . $info['version'] . + ', stability "' . $info['info']->getState() . '", use "' . + $this->_registry->parsedPackageNameToString( + array('channel' => $pname['channel'], 'package' => $pname['package'], + 'version' => $info['version'])) . '" to install', + PEAR_DOWNLOADER_PACKAGE_STATE); + return $err; + } + + // Checks if the user has a package installed already and checks the release against + // the state against the installed package, this allows upgrades for packages + // with lower stability than the preferred_state + $stability = $this->_registry->packageInfo($pname['package'], 'stability', $pname['channel']); + if (!$this->isInstalled($info) + || !in_array($info['info']->getState(), PEAR_Common::betterStates($stability['release'], true)) + ) { + $err = PEAR::raiseError( + 'Failed to download ' . $this->_registry->parsedPackageNameToString( + array('channel' => $pname['channel'], 'package' => $pname['package']), + true) + . $vs . + ', latest release is version ' . $info['version'] . + ', stability "' . $info['info']->getState() . '", use "' . + $this->_registry->parsedPackageNameToString( + array('channel' => $pname['channel'], 'package' => $pname['package'], + 'version' => $info['version'])) . '" to install'); + return $err; + } + } + } + + if (isset($info['deprecated']) && $info['deprecated']) { + $this->_downloader->log(0, + 'WARNING: "' . + $this->_registry->parsedPackageNameToString( + array('channel' => $info['info']->getChannel(), + 'package' => $info['info']->getPackage()), true) . + '" is deprecated in favor of "' . + $this->_registry->parsedPackageNameToString($info['deprecated'], true) . + '"'); + } + + return $info; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/ErrorStack.php b/_piecrust/libs/PEAR/ErrorStack.php new file mode 100644 index 0000000..0303f52 --- /dev/null +++ b/_piecrust/libs/PEAR/ErrorStack.php @@ -0,0 +1,985 @@ + + * @copyright 2004-2008 Greg Beaver + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: ErrorStack.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR_ErrorStack + */ + +/** + * Singleton storage + * + * Format: + *
        + * array(
        + *  'package1' => PEAR_ErrorStack object,
        + *  'package2' => PEAR_ErrorStack object,
        + *  ...
        + * )
        + * 
        + * @access private + * @global array $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] + */ +$GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] = array(); + +/** + * Global error callback (default) + * + * This is only used if set to non-false. * is the default callback for + * all packages, whereas specific packages may set a default callback + * for all instances, regardless of whether they are a singleton or not. + * + * To exclude non-singletons, only set the local callback for the singleton + * @see PEAR_ErrorStack::setDefaultCallback() + * @access private + * @global array $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'] + */ +$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'] = array( + '*' => false, +); + +/** + * Global Log object (default) + * + * This is only used if set to non-false. Use to set a default log object for + * all stacks, regardless of instantiation order or location + * @see PEAR_ErrorStack::setDefaultLogger() + * @access private + * @global array $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] + */ +$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = false; + +/** + * Global Overriding Callback + * + * This callback will override any error callbacks that specific loggers have set. + * Use with EXTREME caution + * @see PEAR_ErrorStack::staticPushCallback() + * @access private + * @global array $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] + */ +$GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'] = array(); + +/**#@+ + * One of four possible return values from the error Callback + * @see PEAR_ErrorStack::_errorCallback() + */ +/** + * If this is returned, then the error will be both pushed onto the stack + * and logged. + */ +define('PEAR_ERRORSTACK_PUSHANDLOG', 1); +/** + * If this is returned, then the error will only be pushed onto the stack, + * and not logged. + */ +define('PEAR_ERRORSTACK_PUSH', 2); +/** + * If this is returned, then the error will only be logged, but not pushed + * onto the error stack. + */ +define('PEAR_ERRORSTACK_LOG', 3); +/** + * If this is returned, then the error is completely ignored. + */ +define('PEAR_ERRORSTACK_IGNORE', 4); +/** + * If this is returned, then the error is logged and die() is called. + */ +define('PEAR_ERRORSTACK_DIE', 5); +/**#@-*/ + +/** + * Error code for an attempt to instantiate a non-class as a PEAR_ErrorStack in + * the singleton method. + */ +define('PEAR_ERRORSTACK_ERR_NONCLASS', 1); + +/** + * Error code for an attempt to pass an object into {@link PEAR_ErrorStack::getMessage()} + * that has no __toString() method + */ +define('PEAR_ERRORSTACK_ERR_OBJTOSTRING', 2); +/** + * Error Stack Implementation + * + * Usage: + * + * // global error stack + * $global_stack = &PEAR_ErrorStack::singleton('MyPackage'); + * // local error stack + * $local_stack = new PEAR_ErrorStack('MyPackage'); + * + * @author Greg Beaver + * @version 1.9.4 + * @package PEAR_ErrorStack + * @category Debugging + * @copyright 2004-2008 Greg Beaver + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: ErrorStack.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR_ErrorStack + */ +class PEAR_ErrorStack { + /** + * Errors are stored in the order that they are pushed on the stack. + * @since 0.4alpha Errors are no longer organized by error level. + * This renders pop() nearly unusable, and levels could be more easily + * handled in a callback anyway + * @var array + * @access private + */ + var $_errors = array(); + + /** + * Storage of errors by level. + * + * Allows easy retrieval and deletion of only errors from a particular level + * @since PEAR 1.4.0dev + * @var array + * @access private + */ + var $_errorsByLevel = array(); + + /** + * Package name this error stack represents + * @var string + * @access protected + */ + var $_package; + + /** + * Determines whether a PEAR_Error is thrown upon every error addition + * @var boolean + * @access private + */ + var $_compat = false; + + /** + * If set to a valid callback, this will be used to generate the error + * message from the error code, otherwise the message passed in will be + * used + * @var false|string|array + * @access private + */ + var $_msgCallback = false; + + /** + * If set to a valid callback, this will be used to generate the error + * context for an error. For PHP-related errors, this will be a file + * and line number as retrieved from debug_backtrace(), but can be + * customized for other purposes. The error might actually be in a separate + * configuration file, or in a database query. + * @var false|string|array + * @access protected + */ + var $_contextCallback = false; + + /** + * If set to a valid callback, this will be called every time an error + * is pushed onto the stack. The return value will be used to determine + * whether to allow an error to be pushed or logged. + * + * The return value must be one an PEAR_ERRORSTACK_* constant + * @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG + * @var false|string|array + * @access protected + */ + var $_errorCallback = array(); + + /** + * PEAR::Log object for logging errors + * @var false|Log + * @access protected + */ + var $_logger = false; + + /** + * Error messages - designed to be overridden + * @var array + * @abstract + */ + var $_errorMsgs = array(); + + /** + * Set up a new error stack + * + * @param string $package name of the package this error stack represents + * @param callback $msgCallback callback used for error message generation + * @param callback $contextCallback callback used for context generation, + * defaults to {@link getFileLine()} + * @param boolean $throwPEAR_Error + */ + function PEAR_ErrorStack($package, $msgCallback = false, $contextCallback = false, + $throwPEAR_Error = false) + { + $this->_package = $package; + $this->setMessageCallback($msgCallback); + $this->setContextCallback($contextCallback); + $this->_compat = $throwPEAR_Error; + } + + /** + * Return a single error stack for this package. + * + * Note that all parameters are ignored if the stack for package $package + * has already been instantiated + * @param string $package name of the package this error stack represents + * @param callback $msgCallback callback used for error message generation + * @param callback $contextCallback callback used for context generation, + * defaults to {@link getFileLine()} + * @param boolean $throwPEAR_Error + * @param string $stackClass class to instantiate + * @static + * @return PEAR_ErrorStack + */ + function &singleton($package, $msgCallback = false, $contextCallback = false, + $throwPEAR_Error = false, $stackClass = 'PEAR_ErrorStack') + { + if (isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) { + return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]; + } + if (!class_exists($stackClass)) { + if (function_exists('debug_backtrace')) { + $trace = debug_backtrace(); + } + PEAR_ErrorStack::staticPush('PEAR_ErrorStack', PEAR_ERRORSTACK_ERR_NONCLASS, + 'exception', array('stackclass' => $stackClass), + 'stack class "%stackclass%" is not a valid class name (should be like PEAR_ErrorStack)', + false, $trace); + } + $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package] = + new $stackClass($package, $msgCallback, $contextCallback, $throwPEAR_Error); + + return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]; + } + + /** + * Internal error handler for PEAR_ErrorStack class + * + * Dies if the error is an exception (and would have died anyway) + * @access private + */ + function _handleError($err) + { + if ($err['level'] == 'exception') { + $message = $err['message']; + if (isset($_SERVER['REQUEST_URI'])) { + echo '
        '; + } else { + echo "\n"; + } + var_dump($err['context']); + die($message); + } + } + + /** + * Set up a PEAR::Log object for all error stacks that don't have one + * @param Log $log + * @static + */ + function setDefaultLogger(&$log) + { + if (is_object($log) && method_exists($log, 'log') ) { + $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = &$log; + } elseif (is_callable($log)) { + $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = &$log; + } + } + + /** + * Set up a PEAR::Log object for this error stack + * @param Log $log + */ + function setLogger(&$log) + { + if (is_object($log) && method_exists($log, 'log') ) { + $this->_logger = &$log; + } elseif (is_callable($log)) { + $this->_logger = &$log; + } + } + + /** + * Set an error code => error message mapping callback + * + * This method sets the callback that can be used to generate error + * messages for any instance + * @param array|string Callback function/method + */ + function setMessageCallback($msgCallback) + { + if (!$msgCallback) { + $this->_msgCallback = array(&$this, 'getErrorMessage'); + } else { + if (is_callable($msgCallback)) { + $this->_msgCallback = $msgCallback; + } + } + } + + /** + * Get an error code => error message mapping callback + * + * This method returns the current callback that can be used to generate error + * messages + * @return array|string|false Callback function/method or false if none + */ + function getMessageCallback() + { + return $this->_msgCallback; + } + + /** + * Sets a default callback to be used by all error stacks + * + * This method sets the callback that can be used to generate error + * messages for a singleton + * @param array|string Callback function/method + * @param string Package name, or false for all packages + * @static + */ + function setDefaultCallback($callback = false, $package = false) + { + if (!is_callable($callback)) { + $callback = false; + } + $package = $package ? $package : '*'; + $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'][$package] = $callback; + } + + /** + * Set a callback that generates context information (location of error) for an error stack + * + * This method sets the callback that can be used to generate context + * information for an error. Passing in NULL will disable context generation + * and remove the expensive call to debug_backtrace() + * @param array|string|null Callback function/method + */ + function setContextCallback($contextCallback) + { + if ($contextCallback === null) { + return $this->_contextCallback = false; + } + if (!$contextCallback) { + $this->_contextCallback = array(&$this, 'getFileLine'); + } else { + if (is_callable($contextCallback)) { + $this->_contextCallback = $contextCallback; + } + } + } + + /** + * Set an error Callback + * If set to a valid callback, this will be called every time an error + * is pushed onto the stack. The return value will be used to determine + * whether to allow an error to be pushed or logged. + * + * The return value must be one of the ERRORSTACK_* constants. + * + * This functionality can be used to emulate PEAR's pushErrorHandling, and + * the PEAR_ERROR_CALLBACK mode, without affecting the integrity of + * the error stack or logging + * @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG + * @see popCallback() + * @param string|array $cb + */ + function pushCallback($cb) + { + array_push($this->_errorCallback, $cb); + } + + /** + * Remove a callback from the error callback stack + * @see pushCallback() + * @return array|string|false + */ + function popCallback() + { + if (!count($this->_errorCallback)) { + return false; + } + return array_pop($this->_errorCallback); + } + + /** + * Set a temporary overriding error callback for every package error stack + * + * Use this to temporarily disable all existing callbacks (can be used + * to emulate the @ operator, for instance) + * @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG + * @see staticPopCallback(), pushCallback() + * @param string|array $cb + * @static + */ + function staticPushCallback($cb) + { + array_push($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'], $cb); + } + + /** + * Remove a temporary overriding error callback + * @see staticPushCallback() + * @return array|string|false + * @static + */ + function staticPopCallback() + { + $ret = array_pop($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK']); + if (!is_array($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'])) { + $GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'] = array(); + } + return $ret; + } + + /** + * Add an error to the stack + * + * If the message generator exists, it is called with 2 parameters. + * - the current Error Stack object + * - an array that is in the same format as an error. Available indices + * are 'code', 'package', 'time', 'params', 'level', and 'context' + * + * Next, if the error should contain context information, this is + * handled by the context grabbing method. + * Finally, the error is pushed onto the proper error stack + * @param int $code Package-specific error code + * @param string $level Error level. This is NOT spell-checked + * @param array $params associative array of error parameters + * @param string $msg Error message, or a portion of it if the message + * is to be generated + * @param array $repackage If this error re-packages an error pushed by + * another package, place the array returned from + * {@link pop()} in this parameter + * @param array $backtrace Protected parameter: use this to pass in the + * {@link debug_backtrace()} that should be used + * to find error context + * @return PEAR_Error|array if compatibility mode is on, a PEAR_Error is also + * thrown. If a PEAR_Error is returned, the userinfo + * property is set to the following array: + * + * + * array( + * 'code' => $code, + * 'params' => $params, + * 'package' => $this->_package, + * 'level' => $level, + * 'time' => time(), + * 'context' => $context, + * 'message' => $msg, + * //['repackage' => $err] repackaged error array/Exception class + * ); + * + * + * Normally, the previous array is returned. + */ + function push($code, $level = 'error', $params = array(), $msg = false, + $repackage = false, $backtrace = false) + { + $context = false; + // grab error context + if ($this->_contextCallback) { + if (!$backtrace) { + $backtrace = debug_backtrace(); + } + $context = call_user_func($this->_contextCallback, $code, $params, $backtrace); + } + + // save error + $time = explode(' ', microtime()); + $time = $time[1] + $time[0]; + $err = array( + 'code' => $code, + 'params' => $params, + 'package' => $this->_package, + 'level' => $level, + 'time' => $time, + 'context' => $context, + 'message' => $msg, + ); + + if ($repackage) { + $err['repackage'] = $repackage; + } + + // set up the error message, if necessary + if ($this->_msgCallback) { + $msg = call_user_func_array($this->_msgCallback, + array(&$this, $err)); + $err['message'] = $msg; + } + $push = $log = true; + $die = false; + // try the overriding callback first + $callback = $this->staticPopCallback(); + if ($callback) { + $this->staticPushCallback($callback); + } + if (!is_callable($callback)) { + // try the local callback next + $callback = $this->popCallback(); + if (is_callable($callback)) { + $this->pushCallback($callback); + } else { + // try the default callback + $callback = isset($GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'][$this->_package]) ? + $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'][$this->_package] : + $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK']['*']; + } + } + if (is_callable($callback)) { + switch(call_user_func($callback, $err)){ + case PEAR_ERRORSTACK_IGNORE: + return $err; + break; + case PEAR_ERRORSTACK_PUSH: + $log = false; + break; + case PEAR_ERRORSTACK_LOG: + $push = false; + break; + case PEAR_ERRORSTACK_DIE: + $die = true; + break; + // anything else returned has the same effect as pushandlog + } + } + if ($push) { + array_unshift($this->_errors, $err); + if (!isset($this->_errorsByLevel[$err['level']])) { + $this->_errorsByLevel[$err['level']] = array(); + } + $this->_errorsByLevel[$err['level']][] = &$this->_errors[0]; + } + if ($log) { + if ($this->_logger || $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER']) { + $this->_log($err); + } + } + if ($die) { + die(); + } + if ($this->_compat && $push) { + return $this->raiseError($msg, $code, null, null, $err); + } + return $err; + } + + /** + * Static version of {@link push()} + * + * @param string $package Package name this error belongs to + * @param int $code Package-specific error code + * @param string $level Error level. This is NOT spell-checked + * @param array $params associative array of error parameters + * @param string $msg Error message, or a portion of it if the message + * is to be generated + * @param array $repackage If this error re-packages an error pushed by + * another package, place the array returned from + * {@link pop()} in this parameter + * @param array $backtrace Protected parameter: use this to pass in the + * {@link debug_backtrace()} that should be used + * to find error context + * @return PEAR_Error|array if compatibility mode is on, a PEAR_Error is also + * thrown. see docs for {@link push()} + * @static + */ + function staticPush($package, $code, $level = 'error', $params = array(), + $msg = false, $repackage = false, $backtrace = false) + { + $s = &PEAR_ErrorStack::singleton($package); + if ($s->_contextCallback) { + if (!$backtrace) { + if (function_exists('debug_backtrace')) { + $backtrace = debug_backtrace(); + } + } + } + return $s->push($code, $level, $params, $msg, $repackage, $backtrace); + } + + /** + * Log an error using PEAR::Log + * @param array $err Error array + * @param array $levels Error level => Log constant map + * @access protected + */ + function _log($err) + { + if ($this->_logger) { + $logger = &$this->_logger; + } else { + $logger = &$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER']; + } + if (is_a($logger, 'Log')) { + $levels = array( + 'exception' => PEAR_LOG_CRIT, + 'alert' => PEAR_LOG_ALERT, + 'critical' => PEAR_LOG_CRIT, + 'error' => PEAR_LOG_ERR, + 'warning' => PEAR_LOG_WARNING, + 'notice' => PEAR_LOG_NOTICE, + 'info' => PEAR_LOG_INFO, + 'debug' => PEAR_LOG_DEBUG); + if (isset($levels[$err['level']])) { + $level = $levels[$err['level']]; + } else { + $level = PEAR_LOG_INFO; + } + $logger->log($err['message'], $level, $err); + } else { // support non-standard logs + call_user_func($logger, $err); + } + } + + + /** + * Pop an error off of the error stack + * + * @return false|array + * @since 0.4alpha it is no longer possible to specify a specific error + * level to return - the last error pushed will be returned, instead + */ + function pop() + { + $err = @array_shift($this->_errors); + if (!is_null($err)) { + @array_pop($this->_errorsByLevel[$err['level']]); + if (!count($this->_errorsByLevel[$err['level']])) { + unset($this->_errorsByLevel[$err['level']]); + } + } + return $err; + } + + /** + * Pop an error off of the error stack, static method + * + * @param string package name + * @return boolean + * @since PEAR1.5.0a1 + */ + function staticPop($package) + { + if ($package) { + if (!isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) { + return false; + } + return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]->pop(); + } + } + + /** + * Determine whether there are any errors on the stack + * @param string|array Level name. Use to determine if any errors + * of level (string), or levels (array) have been pushed + * @return boolean + */ + function hasErrors($level = false) + { + if ($level) { + return isset($this->_errorsByLevel[$level]); + } + return count($this->_errors); + } + + /** + * Retrieve all errors since last purge + * + * @param boolean set in order to empty the error stack + * @param string level name, to return only errors of a particular severity + * @return array + */ + function getErrors($purge = false, $level = false) + { + if (!$purge) { + if ($level) { + if (!isset($this->_errorsByLevel[$level])) { + return array(); + } else { + return $this->_errorsByLevel[$level]; + } + } else { + return $this->_errors; + } + } + if ($level) { + $ret = $this->_errorsByLevel[$level]; + foreach ($this->_errorsByLevel[$level] as $i => $unused) { + // entries are references to the $_errors array + $this->_errorsByLevel[$level][$i] = false; + } + // array_filter removes all entries === false + $this->_errors = array_filter($this->_errors); + unset($this->_errorsByLevel[$level]); + return $ret; + } + $ret = $this->_errors; + $this->_errors = array(); + $this->_errorsByLevel = array(); + return $ret; + } + + /** + * Determine whether there are any errors on a single error stack, or on any error stack + * + * The optional parameter can be used to test the existence of any errors without the need of + * singleton instantiation + * @param string|false Package name to check for errors + * @param string Level name to check for a particular severity + * @return boolean + * @static + */ + function staticHasErrors($package = false, $level = false) + { + if ($package) { + if (!isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) { + return false; + } + return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]->hasErrors($level); + } + foreach ($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] as $package => $obj) { + if ($obj->hasErrors($level)) { + return true; + } + } + return false; + } + + /** + * Get a list of all errors since last purge, organized by package + * @since PEAR 1.4.0dev BC break! $level is now in the place $merge used to be + * @param boolean $purge Set to purge the error stack of existing errors + * @param string $level Set to a level name in order to retrieve only errors of a particular level + * @param boolean $merge Set to return a flat array, not organized by package + * @param array $sortfunc Function used to sort a merged array - default + * sorts by time, and should be good for most cases + * @static + * @return array + */ + function staticGetErrors($purge = false, $level = false, $merge = false, + $sortfunc = array('PEAR_ErrorStack', '_sortErrors')) + { + $ret = array(); + if (!is_callable($sortfunc)) { + $sortfunc = array('PEAR_ErrorStack', '_sortErrors'); + } + foreach ($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] as $package => $obj) { + $test = $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]->getErrors($purge, $level); + if ($test) { + if ($merge) { + $ret = array_merge($ret, $test); + } else { + $ret[$package] = $test; + } + } + } + if ($merge) { + usort($ret, $sortfunc); + } + return $ret; + } + + /** + * Error sorting function, sorts by time + * @access private + */ + function _sortErrors($a, $b) + { + if ($a['time'] == $b['time']) { + return 0; + } + if ($a['time'] < $b['time']) { + return 1; + } + return -1; + } + + /** + * Standard file/line number/function/class context callback + * + * This function uses a backtrace generated from {@link debug_backtrace()} + * and so will not work at all in PHP < 4.3.0. The frame should + * reference the frame that contains the source of the error. + * @return array|false either array('file' => file, 'line' => line, + * 'function' => function name, 'class' => class name) or + * if this doesn't work, then false + * @param unused + * @param integer backtrace frame. + * @param array Results of debug_backtrace() + * @static + */ + function getFileLine($code, $params, $backtrace = null) + { + if ($backtrace === null) { + return false; + } + $frame = 0; + $functionframe = 1; + if (!isset($backtrace[1])) { + $functionframe = 0; + } else { + while (isset($backtrace[$functionframe]['function']) && + $backtrace[$functionframe]['function'] == 'eval' && + isset($backtrace[$functionframe + 1])) { + $functionframe++; + } + } + if (isset($backtrace[$frame])) { + if (!isset($backtrace[$frame]['file'])) { + $frame++; + } + $funcbacktrace = $backtrace[$functionframe]; + $filebacktrace = $backtrace[$frame]; + $ret = array('file' => $filebacktrace['file'], + 'line' => $filebacktrace['line']); + // rearrange for eval'd code or create function errors + if (strpos($filebacktrace['file'], '(') && + preg_match(';^(.*?)\((\d+)\) : (.*?)\\z;', $filebacktrace['file'], + $matches)) { + $ret['file'] = $matches[1]; + $ret['line'] = $matches[2] + 0; + } + if (isset($funcbacktrace['function']) && isset($backtrace[1])) { + if ($funcbacktrace['function'] != 'eval') { + if ($funcbacktrace['function'] == '__lambda_func') { + $ret['function'] = 'create_function() code'; + } else { + $ret['function'] = $funcbacktrace['function']; + } + } + } + if (isset($funcbacktrace['class']) && isset($backtrace[1])) { + $ret['class'] = $funcbacktrace['class']; + } + return $ret; + } + return false; + } + + /** + * Standard error message generation callback + * + * This method may also be called by a custom error message generator + * to fill in template values from the params array, simply + * set the third parameter to the error message template string to use + * + * The special variable %__msg% is reserved: use it only to specify + * where a message passed in by the user should be placed in the template, + * like so: + * + * Error message: %msg% - internal error + * + * If the message passed like so: + * + * + * $stack->push(ERROR_CODE, 'error', array(), 'server error 500'); + * + * + * The returned error message will be "Error message: server error 500 - + * internal error" + * @param PEAR_ErrorStack + * @param array + * @param string|false Pre-generated error message template + * @static + * @return string + */ + function getErrorMessage(&$stack, $err, $template = false) + { + if ($template) { + $mainmsg = $template; + } else { + $mainmsg = $stack->getErrorMessageTemplate($err['code']); + } + $mainmsg = str_replace('%__msg%', $err['message'], $mainmsg); + if (is_array($err['params']) && count($err['params'])) { + foreach ($err['params'] as $name => $val) { + if (is_array($val)) { + // @ is needed in case $val is a multi-dimensional array + $val = @implode(', ', $val); + } + if (is_object($val)) { + if (method_exists($val, '__toString')) { + $val = $val->__toString(); + } else { + PEAR_ErrorStack::staticPush('PEAR_ErrorStack', PEAR_ERRORSTACK_ERR_OBJTOSTRING, + 'warning', array('obj' => get_class($val)), + 'object %obj% passed into getErrorMessage, but has no __toString() method'); + $val = 'Object'; + } + } + $mainmsg = str_replace('%' . $name . '%', $val, $mainmsg); + } + } + return $mainmsg; + } + + /** + * Standard Error Message Template generator from code + * @return string + */ + function getErrorMessageTemplate($code) + { + if (!isset($this->_errorMsgs[$code])) { + return '%__msg%'; + } + return $this->_errorMsgs[$code]; + } + + /** + * Set the Error Message Template array + * + * The array format must be: + *
        +     * array(error code => 'message template',...)
        +     * 
        + * + * Error message parameters passed into {@link push()} will be used as input + * for the error message. If the template is 'message %foo% was %bar%', and the + * parameters are array('foo' => 'one', 'bar' => 'six'), the error message returned will + * be 'message one was six' + * @return string + */ + function setErrorMessageTemplate($template) + { + $this->_errorMsgs = $template; + } + + + /** + * emulate PEAR::raiseError() + * + * @return PEAR_Error + */ + function raiseError() + { + require_once 'PEAR.php'; + $args = func_get_args(); + return call_user_func_array(array('PEAR', 'raiseError'), $args); + } +} +$stack = &PEAR_ErrorStack::singleton('PEAR_ErrorStack'); +$stack->pushCallback(array('PEAR_ErrorStack', '_handleError')); +?> diff --git a/_piecrust/libs/PEAR/Exception.php b/_piecrust/libs/PEAR/Exception.php new file mode 100644 index 0000000..4a0e7b8 --- /dev/null +++ b/_piecrust/libs/PEAR/Exception.php @@ -0,0 +1,389 @@ + + * @author Hans Lellelid + * @author Bertrand Mansion + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Exception.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.3.3 + */ + + +/** + * Base PEAR_Exception Class + * + * 1) Features: + * + * - Nestable exceptions (throw new PEAR_Exception($msg, $prev_exception)) + * - Definable triggers, shot when exceptions occur + * - Pretty and informative error messages + * - Added more context info available (like class, method or cause) + * - cause can be a PEAR_Exception or an array of mixed + * PEAR_Exceptions/PEAR_ErrorStack warnings + * - callbacks for specific exception classes and their children + * + * 2) Ideas: + * + * - Maybe a way to define a 'template' for the output + * + * 3) Inherited properties from PHP Exception Class: + * + * protected $message + * protected $code + * protected $line + * protected $file + * private $trace + * + * 4) Inherited methods from PHP Exception Class: + * + * __clone + * __construct + * getMessage + * getCode + * getFile + * getLine + * getTraceSafe + * getTraceSafeAsString + * __toString + * + * 5) Usage example + * + * + * require_once 'PEAR/Exception.php'; + * + * class Test { + * function foo() { + * throw new PEAR_Exception('Error Message', ERROR_CODE); + * } + * } + * + * function myLogger($pear_exception) { + * echo $pear_exception->getMessage(); + * } + * // each time a exception is thrown the 'myLogger' will be called + * // (its use is completely optional) + * PEAR_Exception::addObserver('myLogger'); + * $test = new Test; + * try { + * $test->foo(); + * } catch (PEAR_Exception $e) { + * print $e; + * } + * + * + * @category pear + * @package PEAR + * @author Tomas V.V.Cox + * @author Hans Lellelid + * @author Bertrand Mansion + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.3.3 + * + */ +class PEAR_Exception extends Exception +{ + const OBSERVER_PRINT = -2; + const OBSERVER_TRIGGER = -4; + const OBSERVER_DIE = -8; + protected $cause; + private static $_observers = array(); + private static $_uniqueid = 0; + private $_trace; + + /** + * Supported signatures: + * - PEAR_Exception(string $message); + * - PEAR_Exception(string $message, int $code); + * - PEAR_Exception(string $message, Exception $cause); + * - PEAR_Exception(string $message, Exception $cause, int $code); + * - PEAR_Exception(string $message, PEAR_Error $cause); + * - PEAR_Exception(string $message, PEAR_Error $cause, int $code); + * - PEAR_Exception(string $message, array $causes); + * - PEAR_Exception(string $message, array $causes, int $code); + * @param string exception message + * @param int|Exception|PEAR_Error|array|null exception cause + * @param int|null exception code or null + */ + public function __construct($message, $p2 = null, $p3 = null) + { + if (is_int($p2)) { + $code = $p2; + $this->cause = null; + } elseif (is_object($p2) || is_array($p2)) { + // using is_object allows both Exception and PEAR_Error + if (is_object($p2) && !($p2 instanceof Exception)) { + if (!class_exists('PEAR_Error') || !($p2 instanceof PEAR_Error)) { + throw new PEAR_Exception('exception cause must be Exception, ' . + 'array, or PEAR_Error'); + } + } + $code = $p3; + if (is_array($p2) && isset($p2['message'])) { + // fix potential problem of passing in a single warning + $p2 = array($p2); + } + $this->cause = $p2; + } else { + $code = null; + $this->cause = null; + } + parent::__construct($message, $code); + $this->signal(); + } + + /** + * @param mixed $callback - A valid php callback, see php func is_callable() + * - A PEAR_Exception::OBSERVER_* constant + * - An array(const PEAR_Exception::OBSERVER_*, + * mixed $options) + * @param string $label The name of the observer. Use this if you want + * to remove it later with removeObserver() + */ + public static function addObserver($callback, $label = 'default') + { + self::$_observers[$label] = $callback; + } + + public static function removeObserver($label = 'default') + { + unset(self::$_observers[$label]); + } + + /** + * @return int unique identifier for an observer + */ + public static function getUniqueId() + { + return self::$_uniqueid++; + } + + private function signal() + { + foreach (self::$_observers as $func) { + if (is_callable($func)) { + call_user_func($func, $this); + continue; + } + settype($func, 'array'); + switch ($func[0]) { + case self::OBSERVER_PRINT : + $f = (isset($func[1])) ? $func[1] : '%s'; + printf($f, $this->getMessage()); + break; + case self::OBSERVER_TRIGGER : + $f = (isset($func[1])) ? $func[1] : E_USER_NOTICE; + trigger_error($this->getMessage(), $f); + break; + case self::OBSERVER_DIE : + $f = (isset($func[1])) ? $func[1] : '%s'; + die(printf($f, $this->getMessage())); + break; + default: + trigger_error('invalid observer type', E_USER_WARNING); + } + } + } + + /** + * Return specific error information that can be used for more detailed + * error messages or translation. + * + * This method may be overridden in child exception classes in order + * to add functionality not present in PEAR_Exception and is a placeholder + * to define API + * + * The returned array must be an associative array of parameter => value like so: + *
        +     * array('name' => $name, 'context' => array(...))
        +     * 
        + * @return array + */ + public function getErrorData() + { + return array(); + } + + /** + * Returns the exception that caused this exception to be thrown + * @access public + * @return Exception|array The context of the exception + */ + public function getCause() + { + return $this->cause; + } + + /** + * Function must be public to call on caused exceptions + * @param array + */ + public function getCauseMessage(&$causes) + { + $trace = $this->getTraceSafe(); + $cause = array('class' => get_class($this), + 'message' => $this->message, + 'file' => 'unknown', + 'line' => 'unknown'); + if (isset($trace[0])) { + if (isset($trace[0]['file'])) { + $cause['file'] = $trace[0]['file']; + $cause['line'] = $trace[0]['line']; + } + } + $causes[] = $cause; + if ($this->cause instanceof PEAR_Exception) { + $this->cause->getCauseMessage($causes); + } elseif ($this->cause instanceof Exception) { + $causes[] = array('class' => get_class($this->cause), + 'message' => $this->cause->getMessage(), + 'file' => $this->cause->getFile(), + 'line' => $this->cause->getLine()); + } elseif (class_exists('PEAR_Error') && $this->cause instanceof PEAR_Error) { + $causes[] = array('class' => get_class($this->cause), + 'message' => $this->cause->getMessage(), + 'file' => 'unknown', + 'line' => 'unknown'); + } elseif (is_array($this->cause)) { + foreach ($this->cause as $cause) { + if ($cause instanceof PEAR_Exception) { + $cause->getCauseMessage($causes); + } elseif ($cause instanceof Exception) { + $causes[] = array('class' => get_class($cause), + 'message' => $cause->getMessage(), + 'file' => $cause->getFile(), + 'line' => $cause->getLine()); + } elseif (class_exists('PEAR_Error') && $cause instanceof PEAR_Error) { + $causes[] = array('class' => get_class($cause), + 'message' => $cause->getMessage(), + 'file' => 'unknown', + 'line' => 'unknown'); + } elseif (is_array($cause) && isset($cause['message'])) { + // PEAR_ErrorStack warning + $causes[] = array( + 'class' => $cause['package'], + 'message' => $cause['message'], + 'file' => isset($cause['context']['file']) ? + $cause['context']['file'] : + 'unknown', + 'line' => isset($cause['context']['line']) ? + $cause['context']['line'] : + 'unknown', + ); + } + } + } + } + + public function getTraceSafe() + { + if (!isset($this->_trace)) { + $this->_trace = $this->getTrace(); + if (empty($this->_trace)) { + $backtrace = debug_backtrace(); + $this->_trace = array($backtrace[count($backtrace)-1]); + } + } + return $this->_trace; + } + + public function getErrorClass() + { + $trace = $this->getTraceSafe(); + return $trace[0]['class']; + } + + public function getErrorMethod() + { + $trace = $this->getTraceSafe(); + return $trace[0]['function']; + } + + public function __toString() + { + if (isset($_SERVER['REQUEST_URI'])) { + return $this->toHtml(); + } + return $this->toText(); + } + + public function toHtml() + { + $trace = $this->getTraceSafe(); + $causes = array(); + $this->getCauseMessage($causes); + $html = '
        ' . "\n"; + foreach ($causes as $i => $cause) { + $html .= '\n"; + } + $html .= '' . "\n" + . '' + . '' + . '' . "\n"; + + foreach ($trace as $k => $v) { + $html .= '' + . '' + . '' . "\n"; + } + $html .= '' + . '' + . '' . "\n" + . '
        ' + . str_repeat('-', $i) . ' ' . $cause['class'] . ': ' + . htmlspecialchars($cause['message']) . ' in ' . $cause['file'] . ' ' + . 'on line ' . $cause['line'] . '' + . "
        Exception trace
        #FunctionLocation
        ' . $k . ''; + if (!empty($v['class'])) { + $html .= $v['class'] . $v['type']; + } + $html .= $v['function']; + $args = array(); + if (!empty($v['args'])) { + foreach ($v['args'] as $arg) { + if (is_null($arg)) $args[] = 'null'; + elseif (is_array($arg)) $args[] = 'Array'; + elseif (is_object($arg)) $args[] = 'Object('.get_class($arg).')'; + elseif (is_bool($arg)) $args[] = $arg ? 'true' : 'false'; + elseif (is_int($arg) || is_double($arg)) $args[] = $arg; + else { + $arg = (string)$arg; + $str = htmlspecialchars(substr($arg, 0, 16)); + if (strlen($arg) > 16) $str .= '…'; + $args[] = "'" . $str . "'"; + } + } + } + $html .= '(' . implode(', ',$args) . ')' + . '' . (isset($v['file']) ? $v['file'] : 'unknown') + . ':' . (isset($v['line']) ? $v['line'] : 'unknown') + . '
        ' . ($k+1) . '{main} 
        '; + return $html; + } + + public function toText() + { + $causes = array(); + $this->getCauseMessage($causes); + $causeMsg = ''; + foreach ($causes as $i => $cause) { + $causeMsg .= str_repeat(' ', $i) . $cause['class'] . ': ' + . $cause['message'] . ' in ' . $cause['file'] + . ' on line ' . $cause['line'] . "\n"; + } + return $causeMsg . $this->getTraceAsString(); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/FixPHP5PEARWarnings.php b/_piecrust/libs/PEAR/FixPHP5PEARWarnings.php new file mode 100644 index 0000000..be5dc3c --- /dev/null +++ b/_piecrust/libs/PEAR/FixPHP5PEARWarnings.php @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Frontend.php b/_piecrust/libs/PEAR/Frontend.php new file mode 100644 index 0000000..531e541 --- /dev/null +++ b/_piecrust/libs/PEAR/Frontend.php @@ -0,0 +1,228 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Frontend.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * Include error handling + */ +//require_once 'PEAR.php'; + +/** + * Which user interface class is being used. + * @var string class name + */ +$GLOBALS['_PEAR_FRONTEND_CLASS'] = 'PEAR_Frontend_CLI'; + +/** + * Instance of $_PEAR_Command_uiclass. + * @var object + */ +$GLOBALS['_PEAR_FRONTEND_SINGLETON'] = null; + +/** + * Singleton-based frontend for PEAR user input/output + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Frontend extends PEAR +{ + /** + * Retrieve the frontend object + * @return PEAR_Frontend_CLI|PEAR_Frontend_Web|PEAR_Frontend_Gtk + * @static + */ + function &singleton($type = null) + { + if ($type === null) { + if (!isset($GLOBALS['_PEAR_FRONTEND_SINGLETON'])) { + $a = false; + return $a; + } + return $GLOBALS['_PEAR_FRONTEND_SINGLETON']; + } + + $a = PEAR_Frontend::setFrontendClass($type); + return $a; + } + + /** + * Set the frontend class that will be used by calls to {@link singleton()} + * + * Frontends are expected to conform to the PEAR naming standard of + * _ => DIRECTORY_SEPARATOR (PEAR_Frontend_CLI is in PEAR/Frontend/CLI.php) + * @param string $uiclass full class name + * @return PEAR_Frontend + * @static + */ + function &setFrontendClass($uiclass) + { + if (is_object($GLOBALS['_PEAR_FRONTEND_SINGLETON']) && + is_a($GLOBALS['_PEAR_FRONTEND_SINGLETON'], $uiclass)) { + return $GLOBALS['_PEAR_FRONTEND_SINGLETON']; + } + + if (!class_exists($uiclass)) { + $file = str_replace('_', '/', $uiclass) . '.php'; + if (PEAR_Frontend::isIncludeable($file)) { + include_once $file; + } + } + + if (class_exists($uiclass)) { + $obj = &new $uiclass; + // quick test to see if this class implements a few of the most + // important frontend methods + if (is_a($obj, 'PEAR_Frontend')) { + $GLOBALS['_PEAR_FRONTEND_SINGLETON'] = &$obj; + $GLOBALS['_PEAR_FRONTEND_CLASS'] = $uiclass; + return $obj; + } + + $err = PEAR::raiseError("not a frontend class: $uiclass"); + return $err; + } + + $err = PEAR::raiseError("no such class: $uiclass"); + return $err; + } + + /** + * Set the frontend class that will be used by calls to {@link singleton()} + * + * Frontends are expected to be a descendant of PEAR_Frontend + * @param PEAR_Frontend + * @return PEAR_Frontend + * @static + */ + function &setFrontendObject($uiobject) + { + if (is_object($GLOBALS['_PEAR_FRONTEND_SINGLETON']) && + is_a($GLOBALS['_PEAR_FRONTEND_SINGLETON'], get_class($uiobject))) { + return $GLOBALS['_PEAR_FRONTEND_SINGLETON']; + } + + if (!is_a($uiobject, 'PEAR_Frontend')) { + $err = PEAR::raiseError('not a valid frontend class: (' . + get_class($uiobject) . ')'); + return $err; + } + + $GLOBALS['_PEAR_FRONTEND_SINGLETON'] = &$uiobject; + $GLOBALS['_PEAR_FRONTEND_CLASS'] = get_class($uiobject); + return $uiobject; + } + + /** + * @param string $path relative or absolute include path + * @return boolean + * @static + */ + function isIncludeable($path) + { + if (file_exists($path) && is_readable($path)) { + return true; + } + + $fp = @fopen($path, 'r', true); + if ($fp) { + fclose($fp); + return true; + } + + return false; + } + + /** + * @param PEAR_Config + */ + function setConfig(&$config) + { + } + + /** + * This can be overridden to allow session-based temporary file management + * + * By default, all files are deleted at the end of a session. The web installer + * needs to be able to sustain a list over many sessions in order to support + * user interaction with install scripts + */ + function addTempFile($file) + { + $GLOBALS['_PEAR_Common_tempfiles'][] = $file; + } + + /** + * Log an action + * + * @param string $msg the message to log + * @param boolean $append_crlf + * @return boolean true + * @abstract + */ + function log($msg, $append_crlf = true) + { + } + + /** + * Run a post-installation script + * + * @param array $scripts array of post-install scripts + * @abstract + */ + function runPostinstallScripts(&$scripts) + { + } + + /** + * Display human-friendly output formatted depending on the + * $command parameter. + * + * This should be able to handle basic output data with no command + * @param mixed $data data structure containing the information to display + * @param string $command command from which this method was called + * @abstract + */ + function outputData($data, $command = '_default') + { + } + + /** + * Display a modal form dialog and return the given input + * + * A frontend that requires multiple requests to retrieve and process + * data must take these needs into account, and implement the request + * handling code. + * @param string $command command from which this method was called + * @param array $prompts associative array. keys are the input field names + * and values are the description + * @param array $types array of input field types (text, password, + * etc.) keys have to be the same like in $prompts + * @param array $defaults array of default values. again keys have + * to be the same like in $prompts. Do not depend + * on a default value being set. + * @return array input sent by the user + * @abstract + */ + function userDialog($command, $prompts, $types = array(), $defaults = array()) + { + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Frontend/CLI.php b/_piecrust/libs/PEAR/Frontend/CLI.php new file mode 100644 index 0000000..340b99b --- /dev/null +++ b/_piecrust/libs/PEAR/Frontend/CLI.php @@ -0,0 +1,751 @@ + + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: CLI.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ +/** + * base class + */ +require_once 'PEAR/Frontend.php'; + +/** + * Command-line Frontend for the PEAR Installer + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + */ +class PEAR_Frontend_CLI extends PEAR_Frontend +{ + /** + * What type of user interface this frontend is for. + * @var string + * @access public + */ + var $type = 'CLI'; + var $lp = ''; // line prefix + + var $params = array(); + var $term = array( + 'bold' => '', + 'normal' => '', + ); + + function PEAR_Frontend_CLI() + { + parent::PEAR(); + $term = getenv('TERM'); //(cox) $_ENV is empty for me in 4.1.1 + if (function_exists('posix_isatty') && !posix_isatty(1)) { + // output is being redirected to a file or through a pipe + } elseif ($term) { + if (preg_match('/^(xterm|vt220|linux)/', $term)) { + $this->term['bold'] = sprintf("%c%c%c%c", 27, 91, 49, 109); + $this->term['normal'] = sprintf("%c%c%c", 27, 91, 109); + } elseif (preg_match('/^vt100/', $term)) { + $this->term['bold'] = sprintf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); + $this->term['normal'] = sprintf("%c%c%c%c%c", 27, 91, 109, 0, 0); + } + } elseif (OS_WINDOWS) { + // XXX add ANSI codes here + } + } + + /** + * @param object PEAR_Error object + */ + function displayError($e) + { + return $this->_displayLine($e->getMessage()); + } + + /** + * @param object PEAR_Error object + */ + function displayFatalError($eobj) + { + $this->displayError($eobj); + if (class_exists('PEAR_Config')) { + $config = &PEAR_Config::singleton(); + if ($config->get('verbose') > 5) { + if (function_exists('debug_print_backtrace')) { + debug_print_backtrace(); + exit(1); + } + + $raised = false; + foreach (debug_backtrace() as $i => $frame) { + if (!$raised) { + if (isset($frame['class']) + && strtolower($frame['class']) == 'pear' + && strtolower($frame['function']) == 'raiseerror' + ) { + $raised = true; + } else { + continue; + } + } + + $frame['class'] = !isset($frame['class']) ? '' : $frame['class']; + $frame['type'] = !isset($frame['type']) ? '' : $frame['type']; + $frame['function'] = !isset($frame['function']) ? '' : $frame['function']; + $frame['line'] = !isset($frame['line']) ? '' : $frame['line']; + $this->_displayLine("#$i: $frame[class]$frame[type]$frame[function] $frame[line]"); + } + } + } + + exit(1); + } + + /** + * Instruct the runInstallScript method to skip a paramgroup that matches the + * id value passed in. + * + * This method is useful for dynamically configuring which sections of a post-install script + * will be run based on the user's setup, which is very useful for making flexible + * post-install scripts without losing the cross-Frontend ability to retrieve user input + * @param string + */ + function skipParamgroup($id) + { + $this->_skipSections[$id] = true; + } + + function runPostinstallScripts(&$scripts) + { + foreach ($scripts as $i => $script) { + $this->runInstallScript($scripts[$i]->_params, $scripts[$i]->_obj); + } + } + + /** + * @param array $xml contents of postinstallscript tag + * @param object $script post-installation script + * @param string install|upgrade + */ + function runInstallScript($xml, &$script) + { + $this->_skipSections = array(); + if (!is_array($xml) || !isset($xml['paramgroup'])) { + $script->run(array(), '_default'); + return; + } + + $completedPhases = array(); + if (!isset($xml['paramgroup'][0])) { + $xml['paramgroup'] = array($xml['paramgroup']); + } + + foreach ($xml['paramgroup'] as $group) { + if (isset($this->_skipSections[$group['id']])) { + // the post-install script chose to skip this section dynamically + continue; + } + + if (isset($group['name'])) { + $paramname = explode('::', $group['name']); + if ($lastgroup['id'] != $paramname[0]) { + continue; + } + + $group['name'] = $paramname[1]; + if (!isset($answers)) { + return; + } + + if (isset($answers[$group['name']])) { + switch ($group['conditiontype']) { + case '=' : + if ($answers[$group['name']] != $group['value']) { + continue 2; + } + break; + case '!=' : + if ($answers[$group['name']] == $group['value']) { + continue 2; + } + break; + case 'preg_match' : + if (!@preg_match('/' . $group['value'] . '/', + $answers[$group['name']])) { + continue 2; + } + break; + default : + return; + } + } + } + + $lastgroup = $group; + if (isset($group['instructions'])) { + $this->_display($group['instructions']); + } + + if (!isset($group['param'][0])) { + $group['param'] = array($group['param']); + } + + if (isset($group['param'])) { + if (method_exists($script, 'postProcessPrompts')) { + $prompts = $script->postProcessPrompts($group['param'], $group['id']); + if (!is_array($prompts) || count($prompts) != count($group['param'])) { + $this->outputData('postinstall', 'Error: post-install script did not ' . + 'return proper post-processed prompts'); + $prompts = $group['param']; + } else { + foreach ($prompts as $i => $var) { + if (!is_array($var) || !isset($var['prompt']) || + !isset($var['name']) || + ($var['name'] != $group['param'][$i]['name']) || + ($var['type'] != $group['param'][$i]['type']) + ) { + $this->outputData('postinstall', 'Error: post-install script ' . + 'modified the variables or prompts, severe security risk. ' . + 'Will instead use the defaults from the package.xml'); + $prompts = $group['param']; + } + } + } + + $answers = $this->confirmDialog($prompts); + } else { + $answers = $this->confirmDialog($group['param']); + } + } + + if ((isset($answers) && $answers) || !isset($group['param'])) { + if (!isset($answers)) { + $answers = array(); + } + + array_unshift($completedPhases, $group['id']); + if (!$script->run($answers, $group['id'])) { + $script->run($completedPhases, '_undoOnError'); + return; + } + } else { + $script->run($completedPhases, '_undoOnError'); + return; + } + } + } + + /** + * Ask for user input, confirm the answers and continue until the user is satisfied + * @param array an array of arrays, format array('name' => 'paramname', 'prompt' => + * 'text to display', 'type' => 'string'[, default => 'default value']) + * @return array + */ + function confirmDialog($params) + { + $answers = $prompts = $types = array(); + foreach ($params as $param) { + $prompts[$param['name']] = $param['prompt']; + $types[$param['name']] = $param['type']; + $answers[$param['name']] = isset($param['default']) ? $param['default'] : ''; + } + + $tried = false; + do { + if ($tried) { + $i = 1; + foreach ($answers as $var => $value) { + if (!strlen($value)) { + echo $this->bold("* Enter an answer for #" . $i . ": ({$prompts[$var]})\n"); + } + $i++; + } + } + + $answers = $this->userDialog('', $prompts, $types, $answers); + $tried = true; + } while (is_array($answers) && count(array_filter($answers)) != count($prompts)); + + return $answers; + } + + function userDialog($command, $prompts, $types = array(), $defaults = array(), $screensize = 20) + { + if (!is_array($prompts)) { + return array(); + } + + $testprompts = array_keys($prompts); + $result = $defaults; + + reset($prompts); + if (count($prompts) === 1) { + foreach ($prompts as $key => $prompt) { + $type = $types[$key]; + $default = @$defaults[$key]; + print "$prompt "; + if ($default) { + print "[$default] "; + } + print ": "; + + $line = fgets(STDIN, 2048); + $result[$key] = ($default && trim($line) == '') ? $default : trim($line); + } + + return $result; + } + + $first_run = true; + while (true) { + $descLength = max(array_map('strlen', $prompts)); + $descFormat = "%-{$descLength}s"; + $last = count($prompts); + + $i = 0; + foreach ($prompts as $n => $var) { + $res = isset($result[$n]) ? $result[$n] : null; + printf("%2d. $descFormat : %s\n", ++$i, $prompts[$n], $res); + } + print "\n1-$last, 'all', 'abort', or Enter to continue: "; + + $tmp = trim(fgets(STDIN, 1024)); + if (empty($tmp)) { + break; + } + + if ($tmp == 'abort') { + return false; + } + + if (isset($testprompts[(int)$tmp - 1])) { + $var = $testprompts[(int)$tmp - 1]; + $desc = $prompts[$var]; + $current = @$result[$var]; + print "$desc [$current] : "; + $tmp = trim(fgets(STDIN, 1024)); + if ($tmp !== '') { + $result[$var] = $tmp; + } + } elseif ($tmp == 'all') { + foreach ($prompts as $var => $desc) { + $current = $result[$var]; + print "$desc [$current] : "; + $tmp = trim(fgets(STDIN, 1024)); + if (trim($tmp) !== '') { + $result[$var] = trim($tmp); + } + } + } + + $first_run = false; + } + + return $result; + } + + function userConfirm($prompt, $default = 'yes') + { + trigger_error("PEAR_Frontend_CLI::userConfirm not yet converted", E_USER_ERROR); + static $positives = array('y', 'yes', 'on', '1'); + static $negatives = array('n', 'no', 'off', '0'); + print "$this->lp$prompt [$default] : "; + $fp = fopen("php://stdin", "r"); + $line = fgets($fp, 2048); + fclose($fp); + $answer = strtolower(trim($line)); + if (empty($answer)) { + $answer = $default; + } + if (in_array($answer, $positives)) { + return true; + } + if (in_array($answer, $negatives)) { + return false; + } + if (in_array($default, $positives)) { + return true; + } + return false; + } + + function outputData($data, $command = '_default') + { + switch ($command) { + case 'channel-info': + foreach ($data as $type => $section) { + if ($type == 'main') { + $section['data'] = array_values($section['data']); + } + + $this->outputData($section); + } + break; + case 'install': + case 'upgrade': + case 'upgrade-all': + if (is_array($data) && isset($data['release_warnings'])) { + $this->_displayLine(''); + $this->_startTable(array( + 'border' => false, + 'caption' => 'Release Warnings' + )); + $this->_tableRow(array($data['release_warnings']), null, array(1 => array('wrap' => 55))); + $this->_endTable(); + $this->_displayLine(''); + } + + $this->_displayLine(is_array($data) ? $data['data'] : $data); + break; + case 'search': + $this->_startTable($data); + if (isset($data['headline']) && is_array($data['headline'])) { + $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55))); + } + + $packages = array(); + foreach($data['data'] as $category) { + foreach($category as $name => $pkg) { + $packages[$pkg[0]] = $pkg; + } + } + + $p = array_keys($packages); + natcasesort($p); + foreach ($p as $name) { + $this->_tableRow($packages[$name], null, array(1 => array('wrap' => 55))); + } + + $this->_endTable(); + break; + case 'list-all': + if (!isset($data['data'])) { + $this->_displayLine('No packages in channel'); + break; + } + + $this->_startTable($data); + if (isset($data['headline']) && is_array($data['headline'])) { + $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55))); + } + + $packages = array(); + foreach($data['data'] as $category) { + foreach($category as $name => $pkg) { + $packages[$pkg[0]] = $pkg; + } + } + + $p = array_keys($packages); + natcasesort($p); + foreach ($p as $name) { + $pkg = $packages[$name]; + unset($pkg[4], $pkg[5]); + $this->_tableRow($pkg, null, array(1 => array('wrap' => 55))); + } + + $this->_endTable(); + break; + case 'config-show': + $data['border'] = false; + $opts = array( + 0 => array('wrap' => 30), + 1 => array('wrap' => 20), + 2 => array('wrap' => 35) + ); + + $this->_startTable($data); + if (isset($data['headline']) && is_array($data['headline'])) { + $this->_tableRow($data['headline'], array('bold' => true), $opts); + } + + foreach ($data['data'] as $group) { + foreach ($group as $value) { + if ($value[2] == '') { + $value[2] = ""; + } + + $this->_tableRow($value, null, $opts); + } + } + + $this->_endTable(); + break; + case 'remote-info': + $d = $data; + $data = array( + 'caption' => 'Package details:', + 'border' => false, + 'data' => array( + array("Latest", $data['stable']), + array("Installed", $data['installed']), + array("Package", $data['name']), + array("License", $data['license']), + array("Category", $data['category']), + array("Summary", $data['summary']), + array("Description", $data['description']), + ), + ); + + if (isset($d['deprecated']) && $d['deprecated']) { + $conf = &PEAR_Config::singleton(); + $reg = $conf->getRegistry(); + $name = $reg->parsedPackageNameToString($d['deprecated'], true); + $data['data'][] = array('Deprecated! use', $name); + } + default: { + if (is_array($data)) { + $this->_startTable($data); + $count = count($data['data'][0]); + if ($count == 2) { + $opts = array(0 => array('wrap' => 25), + 1 => array('wrap' => 48) + ); + } elseif ($count == 3) { + $opts = array(0 => array('wrap' => 30), + 1 => array('wrap' => 20), + 2 => array('wrap' => 35) + ); + } else { + $opts = null; + } + if (isset($data['headline']) && is_array($data['headline'])) { + $this->_tableRow($data['headline'], + array('bold' => true), + $opts); + } + + if (is_array($data['data'])) { + foreach($data['data'] as $row) { + $this->_tableRow($row, null, $opts); + } + } else { + $this->_tableRow(array($data['data']), null, $opts); + } + $this->_endTable(); + } else { + $this->_displayLine($data); + } + } + } + } + + function log($text, $append_crlf = true) + { + if ($append_crlf) { + return $this->_displayLine($text); + } + + return $this->_display($text); + } + + function bold($text) + { + if (empty($this->term['bold'])) { + return strtoupper($text); + } + + return $this->term['bold'] . $text . $this->term['normal']; + } + + function _displayHeading($title) + { + print $this->lp.$this->bold($title)."\n"; + print $this->lp.str_repeat("=", strlen($title))."\n"; + } + + function _startTable($params = array()) + { + $params['table_data'] = array(); + $params['widest'] = array(); // indexed by column + $params['highest'] = array(); // indexed by row + $params['ncols'] = 0; + $this->params = $params; + } + + function _tableRow($columns, $rowparams = array(), $colparams = array()) + { + $highest = 1; + for ($i = 0; $i < count($columns); $i++) { + $col = &$columns[$i]; + if (isset($colparams[$i]) && !empty($colparams[$i]['wrap'])) { + $col = wordwrap($col, $colparams[$i]['wrap']); + } + + if (strpos($col, "\n") !== false) { + $multiline = explode("\n", $col); + $w = 0; + foreach ($multiline as $n => $line) { + $len = strlen($line); + if ($len > $w) { + $w = $len; + } + } + $lines = count($multiline); + } else { + $w = strlen($col); + } + + if (isset($this->params['widest'][$i])) { + if ($w > $this->params['widest'][$i]) { + $this->params['widest'][$i] = $w; + } + } else { + $this->params['widest'][$i] = $w; + } + + $tmp = count_chars($columns[$i], 1); + // handle unix, mac and windows formats + $lines = (isset($tmp[10]) ? $tmp[10] : (isset($tmp[13]) ? $tmp[13] : 0)) + 1; + if ($lines > $highest) { + $highest = $lines; + } + } + + if (count($columns) > $this->params['ncols']) { + $this->params['ncols'] = count($columns); + } + + $new_row = array( + 'data' => $columns, + 'height' => $highest, + 'rowparams' => $rowparams, + 'colparams' => $colparams, + ); + $this->params['table_data'][] = $new_row; + } + + function _endTable() + { + extract($this->params); + if (!empty($caption)) { + $this->_displayHeading($caption); + } + + if (count($table_data) === 0) { + return; + } + + if (!isset($width)) { + $width = $widest; + } else { + for ($i = 0; $i < $ncols; $i++) { + if (!isset($width[$i])) { + $width[$i] = $widest[$i]; + } + } + } + + $border = false; + if (empty($border)) { + $cellstart = ''; + $cellend = ' '; + $rowend = ''; + $padrowend = false; + $borderline = ''; + } else { + $cellstart = '| '; + $cellend = ' '; + $rowend = '|'; + $padrowend = true; + $borderline = '+'; + foreach ($width as $w) { + $borderline .= str_repeat('-', $w + strlen($cellstart) + strlen($cellend) - 1); + $borderline .= '+'; + } + } + + if ($borderline) { + $this->_displayLine($borderline); + } + + for ($i = 0; $i < count($table_data); $i++) { + extract($table_data[$i]); + if (!is_array($rowparams)) { + $rowparams = array(); + } + + if (!is_array($colparams)) { + $colparams = array(); + } + + $rowlines = array(); + if ($height > 1) { + for ($c = 0; $c < count($data); $c++) { + $rowlines[$c] = preg_split('/(\r?\n|\r)/', $data[$c]); + if (count($rowlines[$c]) < $height) { + $rowlines[$c] = array_pad($rowlines[$c], $height, ''); + } + } + } else { + for ($c = 0; $c < count($data); $c++) { + $rowlines[$c] = array($data[$c]); + } + } + + for ($r = 0; $r < $height; $r++) { + $rowtext = ''; + for ($c = 0; $c < count($data); $c++) { + if (isset($colparams[$c])) { + $attribs = array_merge($rowparams, $colparams); + } else { + $attribs = $rowparams; + } + + $w = isset($width[$c]) ? $width[$c] : 0; + //$cell = $data[$c]; + $cell = $rowlines[$c][$r]; + $l = strlen($cell); + if ($l > $w) { + $cell = substr($cell, 0, $w); + } + + if (isset($attribs['bold'])) { + $cell = $this->bold($cell); + } + + if ($l < $w) { + // not using str_pad here because we may + // add bold escape characters to $cell + $cell .= str_repeat(' ', $w - $l); + } + + $rowtext .= $cellstart . $cell . $cellend; + } + + if (!$border) { + $rowtext = rtrim($rowtext); + } + + $rowtext .= $rowend; + $this->_displayLine($rowtext); + } + } + + if ($borderline) { + $this->_displayLine($borderline); + } + } + + function _displayLine($text) + { + print "$this->lp$text\n"; + } + + function _display($text) + { + print $text; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer.php b/_piecrust/libs/PEAR/Installer.php new file mode 100644 index 0000000..eb17ca7 --- /dev/null +++ b/_piecrust/libs/PEAR/Installer.php @@ -0,0 +1,1823 @@ + + * @author Tomas V.V. Cox + * @author Martin Jansen + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Installer.php 313024 2011-07-06 19:51:24Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ + +/** + * Used for installation groups in package.xml 2.0 and platform exceptions + */ +require_once 'OS/Guess.php'; +require_once 'PEAR/Downloader.php'; + +define('PEAR_INSTALLER_NOBINARY', -240); +/** + * Administration class used to install PEAR packages and maintain the + * installed package database. + * + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Tomas V.V. Cox + * @author Martin Jansen + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + */ +class PEAR_Installer extends PEAR_Downloader +{ + // {{{ properties + + /** name of the package directory, for example Foo-1.0 + * @var string + */ + var $pkgdir; + + /** directory where PHP code files go + * @var string + */ + var $phpdir; + + /** directory where PHP extension files go + * @var string + */ + var $extdir; + + /** directory where documentation goes + * @var string + */ + var $docdir; + + /** installation root directory (ala PHP's INSTALL_ROOT or + * automake's DESTDIR + * @var string + */ + var $installroot = ''; + + /** debug level + * @var int + */ + var $debug = 1; + + /** temporary directory + * @var string + */ + var $tmpdir; + + /** + * PEAR_Registry object used by the installer + * @var PEAR_Registry + */ + var $registry; + + /** + * array of PEAR_Downloader_Packages + * @var array + */ + var $_downloadedPackages; + + /** List of file transactions queued for an install/upgrade/uninstall. + * + * Format: + * array( + * 0 => array("rename => array("from-file", "to-file")), + * 1 => array("delete" => array("file-to-delete")), + * ... + * ) + * + * @var array + */ + var $file_operations = array(); + + // }}} + + // {{{ constructor + + /** + * PEAR_Installer constructor. + * + * @param object $ui user interface object (instance of PEAR_Frontend_*) + * + * @access public + */ + function PEAR_Installer(&$ui) + { + parent::PEAR_Common(); + $this->setFrontendObject($ui); + $this->debug = $this->config->get('verbose'); + } + + function setOptions($options) + { + $this->_options = $options; + } + + function setConfig(&$config) + { + $this->config = &$config; + $this->_registry = &$config->getRegistry(); + } + + // }}} + + function _removeBackups($files) + { + foreach ($files as $path) { + $this->addFileOperation('removebackup', array($path)); + } + } + + // {{{ _deletePackageFiles() + + /** + * Delete a package's installed files, does not remove empty directories. + * + * @param string package name + * @param string channel name + * @param bool if true, then files are backed up first + * @return bool TRUE on success, or a PEAR error on failure + * @access protected + */ + function _deletePackageFiles($package, $channel = false, $backup = false) + { + if (!$channel) { + $channel = 'pear.php.net'; + } + + if (!strlen($package)) { + return $this->raiseError("No package to uninstall given"); + } + + if (strtolower($package) == 'pear' && $channel == 'pear.php.net') { + // to avoid race conditions, include all possible needed files + require_once 'PEAR/Task/Common.php'; + require_once 'PEAR/Task/Replace.php'; + require_once 'PEAR/Task/Unixeol.php'; + require_once 'PEAR/Task/Windowseol.php'; + require_once 'PEAR/PackageFile/v1.php'; + require_once 'PEAR/PackageFile/v2.php'; + require_once 'PEAR/PackageFile/Generator/v1.php'; + require_once 'PEAR/PackageFile/Generator/v2.php'; + } + + $filelist = $this->_registry->packageInfo($package, 'filelist', $channel); + if ($filelist == null) { + return $this->raiseError("$channel/$package not installed"); + } + + $ret = array(); + foreach ($filelist as $file => $props) { + if (empty($props['installed_as'])) { + continue; + } + + $path = $props['installed_as']; + if ($backup) { + $this->addFileOperation('backup', array($path)); + $ret[] = $path; + } + + $this->addFileOperation('delete', array($path)); + } + + if ($backup) { + return $ret; + } + + return true; + } + + // }}} + // {{{ _installFile() + + /** + * @param string filename + * @param array attributes from tag in package.xml + * @param string path to install the file in + * @param array options from command-line + * @access private + */ + function _installFile($file, $atts, $tmp_path, $options) + { + // {{{ return if this file is meant for another platform + static $os; + if (!isset($this->_registry)) { + $this->_registry = &$this->config->getRegistry(); + } + + if (isset($atts['platform'])) { + if (empty($os)) { + $os = new OS_Guess(); + } + + if (strlen($atts['platform']) && $atts['platform']{0} == '!') { + $negate = true; + $platform = substr($atts['platform'], 1); + } else { + $negate = false; + $platform = $atts['platform']; + } + + if ((bool) $os->matchSignature($platform) === $negate) { + $this->log(3, "skipped $file (meant for $atts[platform], we are ".$os->getSignature().")"); + return PEAR_INSTALLER_SKIPPED; + } + } + // }}} + + $channel = $this->pkginfo->getChannel(); + // {{{ assemble the destination paths + switch ($atts['role']) { + case 'src': + case 'extsrc': + $this->source_files++; + return; + case 'doc': + case 'data': + case 'test': + $dest_dir = $this->config->get($atts['role'] . '_dir', null, $channel) . + DIRECTORY_SEPARATOR . $this->pkginfo->getPackage(); + unset($atts['baseinstalldir']); + break; + case 'ext': + case 'php': + $dest_dir = $this->config->get($atts['role'] . '_dir', null, $channel); + break; + case 'script': + $dest_dir = $this->config->get('bin_dir', null, $channel); + break; + default: + return $this->raiseError("Invalid role `$atts[role]' for file $file"); + } + + $save_destdir = $dest_dir; + if (!empty($atts['baseinstalldir'])) { + $dest_dir .= DIRECTORY_SEPARATOR . $atts['baseinstalldir']; + } + + if (dirname($file) != '.' && empty($atts['install-as'])) { + $dest_dir .= DIRECTORY_SEPARATOR . dirname($file); + } + + if (empty($atts['install-as'])) { + $dest_file = $dest_dir . DIRECTORY_SEPARATOR . basename($file); + } else { + $dest_file = $dest_dir . DIRECTORY_SEPARATOR . $atts['install-as']; + } + $orig_file = $tmp_path . DIRECTORY_SEPARATOR . $file; + + // Clean up the DIRECTORY_SEPARATOR mess + $ds2 = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR; + list($dest_file, $orig_file) = preg_replace(array('!\\\\+!', '!/!', "!$ds2+!"), + array(DIRECTORY_SEPARATOR, + DIRECTORY_SEPARATOR, + DIRECTORY_SEPARATOR), + array($dest_file, $orig_file)); + $final_dest_file = $installed_as = $dest_file; + if (isset($this->_options['packagingroot'])) { + $installedas_dest_dir = dirname($final_dest_file); + $installedas_dest_file = $dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file); + $final_dest_file = $this->_prependPath($final_dest_file, $this->_options['packagingroot']); + } else { + $installedas_dest_dir = dirname($final_dest_file); + $installedas_dest_file = $installedas_dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file); + } + + $dest_dir = dirname($final_dest_file); + $dest_file = $dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file); + if (preg_match('~/\.\.(/|\\z)|^\.\./~', str_replace('\\', '/', $dest_file))) { + return $this->raiseError("SECURITY ERROR: file $file (installed to $dest_file) contains parent directory reference ..", PEAR_INSTALLER_FAILED); + } + // }}} + + if (empty($this->_options['register-only']) && + (!file_exists($dest_dir) || !is_dir($dest_dir))) { + if (!$this->mkDirHier($dest_dir)) { + return $this->raiseError("failed to mkdir $dest_dir", + PEAR_INSTALLER_FAILED); + } + $this->log(3, "+ mkdir $dest_dir"); + } + + // pretty much nothing happens if we are only registering the install + if (empty($this->_options['register-only'])) { + if (empty($atts['replacements'])) { + if (!file_exists($orig_file)) { + return $this->raiseError("file $orig_file does not exist", + PEAR_INSTALLER_FAILED); + } + + if (!@copy($orig_file, $dest_file)) { + return $this->raiseError("failed to write $dest_file: $php_errormsg", + PEAR_INSTALLER_FAILED); + } + + $this->log(3, "+ cp $orig_file $dest_file"); + if (isset($atts['md5sum'])) { + $md5sum = md5_file($dest_file); + } + } else { + // {{{ file with replacements + if (!file_exists($orig_file)) { + return $this->raiseError("file does not exist", + PEAR_INSTALLER_FAILED); + } + + $contents = file_get_contents($orig_file); + if ($contents === false) { + $contents = ''; + } + + if (isset($atts['md5sum'])) { + $md5sum = md5($contents); + } + + $subst_from = $subst_to = array(); + foreach ($atts['replacements'] as $a) { + $to = ''; + if ($a['type'] == 'php-const') { + if (preg_match('/^[a-z0-9_]+\\z/i', $a['to'])) { + eval("\$to = $a[to];"); + } else { + if (!isset($options['soft'])) { + $this->log(0, "invalid php-const replacement: $a[to]"); + } + continue; + } + } elseif ($a['type'] == 'pear-config') { + if ($a['to'] == 'master_server') { + $chan = $this->_registry->getChannel($channel); + if (!PEAR::isError($chan)) { + $to = $chan->getServer(); + } else { + $to = $this->config->get($a['to'], null, $channel); + } + } else { + $to = $this->config->get($a['to'], null, $channel); + } + if (is_null($to)) { + if (!isset($options['soft'])) { + $this->log(0, "invalid pear-config replacement: $a[to]"); + } + continue; + } + } elseif ($a['type'] == 'package-info') { + if ($t = $this->pkginfo->packageInfo($a['to'])) { + $to = $t; + } else { + if (!isset($options['soft'])) { + $this->log(0, "invalid package-info replacement: $a[to]"); + } + continue; + } + } + if (!is_null($to)) { + $subst_from[] = $a['from']; + $subst_to[] = $to; + } + } + + $this->log(3, "doing ".sizeof($subst_from)." substitution(s) for $final_dest_file"); + if (sizeof($subst_from)) { + $contents = str_replace($subst_from, $subst_to, $contents); + } + + $wp = @fopen($dest_file, "wb"); + if (!is_resource($wp)) { + return $this->raiseError("failed to create $dest_file: $php_errormsg", + PEAR_INSTALLER_FAILED); + } + + if (@fwrite($wp, $contents) === false) { + return $this->raiseError("failed writing to $dest_file: $php_errormsg", + PEAR_INSTALLER_FAILED); + } + + fclose($wp); + // }}} + } + + // {{{ check the md5 + if (isset($md5sum)) { + if (strtolower($md5sum) === strtolower($atts['md5sum'])) { + $this->log(2, "md5sum ok: $final_dest_file"); + } else { + if (empty($options['force'])) { + // delete the file + if (file_exists($dest_file)) { + unlink($dest_file); + } + + if (!isset($options['ignore-errors'])) { + return $this->raiseError("bad md5sum for file $final_dest_file", + PEAR_INSTALLER_FAILED); + } + + if (!isset($options['soft'])) { + $this->log(0, "warning : bad md5sum for file $final_dest_file"); + } + } else { + if (!isset($options['soft'])) { + $this->log(0, "warning : bad md5sum for file $final_dest_file"); + } + } + } + } + // }}} + // {{{ set file permissions + if (!OS_WINDOWS) { + if ($atts['role'] == 'script') { + $mode = 0777 & ~(int)octdec($this->config->get('umask')); + $this->log(3, "+ chmod +x $dest_file"); + } else { + $mode = 0666 & ~(int)octdec($this->config->get('umask')); + } + + if ($atts['role'] != 'src') { + $this->addFileOperation("chmod", array($mode, $dest_file)); + if (!@chmod($dest_file, $mode)) { + if (!isset($options['soft'])) { + $this->log(0, "failed to change mode of $dest_file: $php_errormsg"); + } + } + } + } + // }}} + + if ($atts['role'] == 'src') { + rename($dest_file, $final_dest_file); + $this->log(2, "renamed source file $dest_file to $final_dest_file"); + } else { + $this->addFileOperation("rename", array($dest_file, $final_dest_file, + $atts['role'] == 'ext')); + } + } + + // Store the full path where the file was installed for easy unistall + if ($atts['role'] != 'script') { + $loc = $this->config->get($atts['role'] . '_dir'); + } else { + $loc = $this->config->get('bin_dir'); + } + + if ($atts['role'] != 'src') { + $this->addFileOperation("installed_as", array($file, $installed_as, + $loc, + dirname(substr($installedas_dest_file, strlen($loc))))); + } + + //$this->log(2, "installed: $dest_file"); + return PEAR_INSTALLER_OK; + } + + // }}} + // {{{ _installFile2() + + /** + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @param string filename + * @param array attributes from tag in package.xml + * @param string path to install the file in + * @param array options from command-line + * @access private + */ + function _installFile2(&$pkg, $file, &$real_atts, $tmp_path, $options) + { + $atts = $real_atts; + if (!isset($this->_registry)) { + $this->_registry = &$this->config->getRegistry(); + } + + $channel = $pkg->getChannel(); + // {{{ assemble the destination paths + if (!in_array($atts['attribs']['role'], + PEAR_Installer_Role::getValidRoles($pkg->getPackageType()))) { + return $this->raiseError('Invalid role `' . $atts['attribs']['role'] . + "' for file $file"); + } + + $role = &PEAR_Installer_Role::factory($pkg, $atts['attribs']['role'], $this->config); + $err = $role->setup($this, $pkg, $atts['attribs'], $file); + if (PEAR::isError($err)) { + return $err; + } + + if (!$role->isInstallable()) { + return; + } + + $info = $role->processInstallation($pkg, $atts['attribs'], $file, $tmp_path); + if (PEAR::isError($info)) { + return $info; + } + + list($save_destdir, $dest_dir, $dest_file, $orig_file) = $info; + if (preg_match('~/\.\.(/|\\z)|^\.\./~', str_replace('\\', '/', $dest_file))) { + return $this->raiseError("SECURITY ERROR: file $file (installed to $dest_file) contains parent directory reference ..", PEAR_INSTALLER_FAILED); + } + + $final_dest_file = $installed_as = $dest_file; + if (isset($this->_options['packagingroot'])) { + $final_dest_file = $this->_prependPath($final_dest_file, + $this->_options['packagingroot']); + } + + $dest_dir = dirname($final_dest_file); + $dest_file = $dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file); + // }}} + + if (empty($this->_options['register-only'])) { + if (!file_exists($dest_dir) || !is_dir($dest_dir)) { + if (!$this->mkDirHier($dest_dir)) { + return $this->raiseError("failed to mkdir $dest_dir", + PEAR_INSTALLER_FAILED); + } + $this->log(3, "+ mkdir $dest_dir"); + } + } + + $attribs = $atts['attribs']; + unset($atts['attribs']); + // pretty much nothing happens if we are only registering the install + if (empty($this->_options['register-only'])) { + if (!count($atts)) { // no tasks + if (!file_exists($orig_file)) { + return $this->raiseError("file $orig_file does not exist", + PEAR_INSTALLER_FAILED); + } + + if (!@copy($orig_file, $dest_file)) { + return $this->raiseError("failed to write $dest_file: $php_errormsg", + PEAR_INSTALLER_FAILED); + } + + $this->log(3, "+ cp $orig_file $dest_file"); + if (isset($attribs['md5sum'])) { + $md5sum = md5_file($dest_file); + } + } else { // file with tasks + if (!file_exists($orig_file)) { + return $this->raiseError("file $orig_file does not exist", + PEAR_INSTALLER_FAILED); + } + + $contents = file_get_contents($orig_file); + if ($contents === false) { + $contents = ''; + } + + if (isset($attribs['md5sum'])) { + $md5sum = md5($contents); + } + + foreach ($atts as $tag => $raw) { + $tag = str_replace(array($pkg->getTasksNs() . ':', '-'), array('', '_'), $tag); + $task = "PEAR_Task_$tag"; + $task = &new $task($this->config, $this, PEAR_TASK_INSTALL); + if (!$task->isScript()) { // scripts are only handled after installation + $task->init($raw, $attribs, $pkg->getLastInstalledVersion()); + $res = $task->startSession($pkg, $contents, $final_dest_file); + if ($res === false) { + continue; // skip this file + } + + if (PEAR::isError($res)) { + return $res; + } + + $contents = $res; // save changes + } + + $wp = @fopen($dest_file, "wb"); + if (!is_resource($wp)) { + return $this->raiseError("failed to create $dest_file: $php_errormsg", + PEAR_INSTALLER_FAILED); + } + + if (fwrite($wp, $contents) === false) { + return $this->raiseError("failed writing to $dest_file: $php_errormsg", + PEAR_INSTALLER_FAILED); + } + + fclose($wp); + } + } + + // {{{ check the md5 + if (isset($md5sum)) { + // Make sure the original md5 sum matches with expected + if (strtolower($md5sum) === strtolower($attribs['md5sum'])) { + $this->log(2, "md5sum ok: $final_dest_file"); + + if (isset($contents)) { + // set md5 sum based on $content in case any tasks were run. + $real_atts['attribs']['md5sum'] = md5($contents); + } + } else { + if (empty($options['force'])) { + // delete the file + if (file_exists($dest_file)) { + unlink($dest_file); + } + + if (!isset($options['ignore-errors'])) { + return $this->raiseError("bad md5sum for file $final_dest_file", + PEAR_INSTALLER_FAILED); + } + + if (!isset($options['soft'])) { + $this->log(0, "warning : bad md5sum for file $final_dest_file"); + } + } else { + if (!isset($options['soft'])) { + $this->log(0, "warning : bad md5sum for file $final_dest_file"); + } + } + } + } else { + $real_atts['attribs']['md5sum'] = md5_file($dest_file); + } + + // }}} + // {{{ set file permissions + if (!OS_WINDOWS) { + if ($role->isExecutable()) { + $mode = 0777 & ~(int)octdec($this->config->get('umask')); + $this->log(3, "+ chmod +x $dest_file"); + } else { + $mode = 0666 & ~(int)octdec($this->config->get('umask')); + } + + if ($attribs['role'] != 'src') { + $this->addFileOperation("chmod", array($mode, $dest_file)); + if (!@chmod($dest_file, $mode)) { + if (!isset($options['soft'])) { + $this->log(0, "failed to change mode of $dest_file: $php_errormsg"); + } + } + } + } + // }}} + + if ($attribs['role'] == 'src') { + rename($dest_file, $final_dest_file); + $this->log(2, "renamed source file $dest_file to $final_dest_file"); + } else { + $this->addFileOperation("rename", array($dest_file, $final_dest_file, $role->isExtension())); + } + } + + // Store the full path where the file was installed for easy uninstall + if ($attribs['role'] != 'src') { + $loc = $this->config->get($role->getLocationConfig(), null, $channel); + $this->addFileOperation('installed_as', array($file, $installed_as, + $loc, + dirname(substr($installed_as, strlen($loc))))); + } + + //$this->log(2, "installed: $dest_file"); + return PEAR_INSTALLER_OK; + } + + // }}} + // {{{ addFileOperation() + + /** + * Add a file operation to the current file transaction. + * + * @see startFileTransaction() + * @param string $type This can be one of: + * - rename: rename a file ($data has 3 values) + * - backup: backup an existing file ($data has 1 value) + * - removebackup: clean up backups created during install ($data has 1 value) + * - chmod: change permissions on a file ($data has 2 values) + * - delete: delete a file ($data has 1 value) + * - rmdir: delete a directory if empty ($data has 1 value) + * - installed_as: mark a file as installed ($data has 4 values). + * @param array $data For all file operations, this array must contain the + * full path to the file or directory that is being operated on. For + * the rename command, the first parameter must be the file to rename, + * the second its new name, the third whether this is a PHP extension. + * + * The installed_as operation contains 4 elements in this order: + * 1. Filename as listed in the filelist element from package.xml + * 2. Full path to the installed file + * 3. Full path from the php_dir configuration variable used in this + * installation + * 4. Relative path from the php_dir that this file is installed in + */ + function addFileOperation($type, $data) + { + if (!is_array($data)) { + return $this->raiseError('Internal Error: $data in addFileOperation' + . ' must be an array, was ' . gettype($data)); + } + + if ($type == 'chmod') { + $octmode = decoct($data[0]); + $this->log(3, "adding to transaction: $type $octmode $data[1]"); + } else { + $this->log(3, "adding to transaction: $type " . implode(" ", $data)); + } + $this->file_operations[] = array($type, $data); + } + + // }}} + // {{{ startFileTransaction() + + function startFileTransaction($rollback_in_case = false) + { + if (count($this->file_operations) && $rollback_in_case) { + $this->rollbackFileTransaction(); + } + $this->file_operations = array(); + } + + // }}} + // {{{ commitFileTransaction() + + function commitFileTransaction() + { + // {{{ first, check permissions and such manually + $errors = array(); + foreach ($this->file_operations as $key => $tr) { + list($type, $data) = $tr; + switch ($type) { + case 'rename': + if (!file_exists($data[0])) { + $errors[] = "cannot rename file $data[0], doesn't exist"; + } + + // check that dest dir. is writable + if (!is_writable(dirname($data[1]))) { + $errors[] = "permission denied ($type): $data[1]"; + } + break; + case 'chmod': + // check that file is writable + if (!is_writable($data[1])) { + $errors[] = "permission denied ($type): $data[1] " . decoct($data[0]); + } + break; + case 'delete': + if (!file_exists($data[0])) { + $this->log(2, "warning: file $data[0] doesn't exist, can't be deleted"); + } + // check that directory is writable + if (file_exists($data[0])) { + if (!is_writable(dirname($data[0]))) { + $errors[] = "permission denied ($type): $data[0]"; + } else { + // make sure the file to be deleted can be opened for writing + $fp = false; + if (!is_dir($data[0]) && + (!is_writable($data[0]) || !($fp = @fopen($data[0], 'a')))) { + $errors[] = "permission denied ($type): $data[0]"; + } elseif ($fp) { + fclose($fp); + } + } + + /* Verify we are not deleting a file owned by another package + * This can happen when a file moves from package A to B in + * an upgrade ala http://pear.php.net/17986 + */ + $info = array( + 'package' => strtolower($this->pkginfo->getName()), + 'channel' => strtolower($this->pkginfo->getChannel()), + ); + $result = $this->_registry->checkFileMap($data[0], $info, '1.1'); + if (is_array($result)) { + $res = array_diff($result, $info); + if (!empty($res)) { + $new = $this->_registry->getPackage($result[1], $result[0]); + $this->file_operations[$key] = false; + $this->log(3, "file $data[0] was scheduled for removal from {$this->pkginfo->getName()} but is owned by {$new->getChannel()}/{$new->getName()}, removal has been cancelled."); + } + } + } + break; + } + + } + // }}} + + $n = count($this->file_operations); + $this->log(2, "about to commit $n file operations for " . $this->pkginfo->getName()); + + $m = count($errors); + if ($m > 0) { + foreach ($errors as $error) { + if (!isset($this->_options['soft'])) { + $this->log(1, $error); + } + } + + if (!isset($this->_options['ignore-errors'])) { + return false; + } + } + + $this->_dirtree = array(); + // {{{ really commit the transaction + foreach ($this->file_operations as $i => $tr) { + if (!$tr) { + // support removal of non-existing backups + continue; + } + + list($type, $data) = $tr; + switch ($type) { + case 'backup': + if (!file_exists($data[0])) { + $this->file_operations[$i] = false; + break; + } + + if (!@copy($data[0], $data[0] . '.bak')) { + $this->log(1, 'Could not copy ' . $data[0] . ' to ' . $data[0] . + '.bak ' . $php_errormsg); + return false; + } + $this->log(3, "+ backup $data[0] to $data[0].bak"); + break; + case 'removebackup': + if (file_exists($data[0] . '.bak') && is_writable($data[0] . '.bak')) { + unlink($data[0] . '.bak'); + $this->log(3, "+ rm backup of $data[0] ($data[0].bak)"); + } + break; + case 'rename': + $test = file_exists($data[1]) ? @unlink($data[1]) : null; + if (!$test && file_exists($data[1])) { + if ($data[2]) { + $extra = ', this extension must be installed manually. Rename to "' . + basename($data[1]) . '"'; + } else { + $extra = ''; + } + + if (!isset($this->_options['soft'])) { + $this->log(1, 'Could not delete ' . $data[1] . ', cannot rename ' . + $data[0] . $extra); + } + + if (!isset($this->_options['ignore-errors'])) { + return false; + } + } + + // permissions issues with rename - copy() is far superior + $perms = @fileperms($data[0]); + if (!@copy($data[0], $data[1])) { + $this->log(1, 'Could not rename ' . $data[0] . ' to ' . $data[1] . + ' ' . $php_errormsg); + return false; + } + + // copy over permissions, otherwise they are lost + @chmod($data[1], $perms); + @unlink($data[0]); + $this->log(3, "+ mv $data[0] $data[1]"); + break; + case 'chmod': + if (!@chmod($data[1], $data[0])) { + $this->log(1, 'Could not chmod ' . $data[1] . ' to ' . + decoct($data[0]) . ' ' . $php_errormsg); + return false; + } + + $octmode = decoct($data[0]); + $this->log(3, "+ chmod $octmode $data[1]"); + break; + case 'delete': + if (file_exists($data[0])) { + if (!@unlink($data[0])) { + $this->log(1, 'Could not delete ' . $data[0] . ' ' . + $php_errormsg); + return false; + } + $this->log(3, "+ rm $data[0]"); + } + break; + case 'rmdir': + if (file_exists($data[0])) { + do { + $testme = opendir($data[0]); + while (false !== ($entry = readdir($testme))) { + if ($entry == '.' || $entry == '..') { + continue; + } + closedir($testme); + break 2; // this directory is not empty and can't be + // deleted + } + + closedir($testme); + if (!@rmdir($data[0])) { + $this->log(1, 'Could not rmdir ' . $data[0] . ' ' . + $php_errormsg); + return false; + } + $this->log(3, "+ rmdir $data[0]"); + } while (false); + } + break; + case 'installed_as': + $this->pkginfo->setInstalledAs($data[0], $data[1]); + if (!isset($this->_dirtree[dirname($data[1])])) { + $this->_dirtree[dirname($data[1])] = true; + $this->pkginfo->setDirtree(dirname($data[1])); + + while(!empty($data[3]) && dirname($data[3]) != $data[3] && + $data[3] != '/' && $data[3] != '\\') { + $this->pkginfo->setDirtree($pp = + $this->_prependPath($data[3], $data[2])); + $this->_dirtree[$pp] = true; + $data[3] = dirname($data[3]); + } + } + break; + } + } + // }}} + $this->log(2, "successfully committed $n file operations"); + $this->file_operations = array(); + return true; + } + + // }}} + // {{{ rollbackFileTransaction() + + function rollbackFileTransaction() + { + $n = count($this->file_operations); + $this->log(2, "rolling back $n file operations"); + foreach ($this->file_operations as $tr) { + list($type, $data) = $tr; + switch ($type) { + case 'backup': + if (file_exists($data[0] . '.bak')) { + if (file_exists($data[0] && is_writable($data[0]))) { + unlink($data[0]); + } + @copy($data[0] . '.bak', $data[0]); + $this->log(3, "+ restore $data[0] from $data[0].bak"); + } + break; + case 'removebackup': + if (file_exists($data[0] . '.bak') && is_writable($data[0] . '.bak')) { + unlink($data[0] . '.bak'); + $this->log(3, "+ rm backup of $data[0] ($data[0].bak)"); + } + break; + case 'rename': + @unlink($data[0]); + $this->log(3, "+ rm $data[0]"); + break; + case 'mkdir': + @rmdir($data[0]); + $this->log(3, "+ rmdir $data[0]"); + break; + case 'chmod': + break; + case 'delete': + break; + case 'installed_as': + $this->pkginfo->setInstalledAs($data[0], false); + break; + } + } + $this->pkginfo->resetDirtree(); + $this->file_operations = array(); + } + + // }}} + // {{{ mkDirHier($dir) + + function mkDirHier($dir) + { + $this->addFileOperation('mkdir', array($dir)); + return parent::mkDirHier($dir); + } + + // }}} + // {{{ download() + + /** + * Download any files and their dependencies, if necessary + * + * @param array a mixed list of package names, local files, or package.xml + * @param PEAR_Config + * @param array options from the command line + * @param array this is the array that will be populated with packages to + * install. Format of each entry: + * + * + * array('pkg' => 'package_name', 'file' => '/path/to/local/file', + * 'info' => array() // parsed package.xml + * ); + * + * @param array this will be populated with any error messages + * @param false private recursion variable + * @param false private recursion variable + * @param false private recursion variable + * @deprecated in favor of PEAR_Downloader + */ + function download($packages, $options, &$config, &$installpackages, + &$errors, $installed = false, $willinstall = false, $state = false) + { + // trickiness: initialize here + parent::PEAR_Downloader($this->ui, $options, $config); + $ret = parent::download($packages); + $errors = $this->getErrorMsgs(); + $installpackages = $this->getDownloadedPackages(); + trigger_error("PEAR Warning: PEAR_Installer::download() is deprecated " . + "in favor of PEAR_Downloader class", E_USER_WARNING); + return $ret; + } + + // }}} + // {{{ _parsePackageXml() + + function _parsePackageXml(&$descfile) + { + // Parse xml file ----------------------------------------------- + $pkg = new PEAR_PackageFile($this->config, $this->debug); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $p = &$pkg->fromAnyFile($descfile, PEAR_VALIDATE_INSTALLING); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($p)) { + if (is_array($p->getUserInfo())) { + foreach ($p->getUserInfo() as $err) { + $loglevel = $err['level'] == 'error' ? 0 : 1; + if (!isset($this->_options['soft'])) { + $this->log($loglevel, ucfirst($err['level']) . ': ' . $err['message']); + } + } + } + return $this->raiseError('Installation failed: invalid package file'); + } + + $descfile = $p->getPackageFile(); + return $p; + } + + // }}} + /** + * Set the list of PEAR_Downloader_Package objects to allow more sane + * dependency validation + * @param array + */ + function setDownloadedPackages(&$pkgs) + { + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $err = $this->analyzeDependencies($pkgs); + PEAR::popErrorHandling(); + if (PEAR::isError($err)) { + return $err; + } + $this->_downloadedPackages = &$pkgs; + } + + /** + * Set the list of PEAR_Downloader_Package objects to allow more sane + * dependency validation + * @param array + */ + function setUninstallPackages(&$pkgs) + { + $this->_downloadedPackages = &$pkgs; + } + + function getInstallPackages() + { + return $this->_downloadedPackages; + } + + // {{{ install() + + /** + * Installs the files within the package file specified. + * + * @param string|PEAR_Downloader_Package $pkgfile path to the package file, + * or a pre-initialized packagefile object + * @param array $options + * recognized options: + * - installroot : optional prefix directory for installation + * - force : force installation + * - register-only : update registry but don't install files + * - upgrade : upgrade existing install + * - soft : fail silently + * - nodeps : ignore dependency conflicts/missing dependencies + * - alldeps : install all dependencies + * - onlyreqdeps : install only required dependencies + * + * @return array|PEAR_Error package info if successful + */ + function install($pkgfile, $options = array()) + { + $this->_options = $options; + $this->_registry = &$this->config->getRegistry(); + if (is_object($pkgfile)) { + $dlpkg = &$pkgfile; + $pkg = $pkgfile->getPackageFile(); + $pkgfile = $pkg->getArchiveFile(); + $descfile = $pkg->getPackageFile(); + } else { + $descfile = $pkgfile; + $pkg = $this->_parsePackageXml($descfile); + if (PEAR::isError($pkg)) { + return $pkg; + } + } + + $tmpdir = dirname($descfile); + if (realpath($descfile) != realpath($pkgfile)) { + // Use the temp_dir since $descfile can contain the download dir path + $tmpdir = $this->config->get('temp_dir', null, 'pear.php.net'); + $tmpdir = System::mktemp('-d -t "' . $tmpdir . '"'); + + $tar = new Archive_Tar($pkgfile); + if (!$tar->extract($tmpdir)) { + return $this->raiseError("unable to unpack $pkgfile"); + } + } + + $pkgname = $pkg->getName(); + $channel = $pkg->getChannel(); + if (isset($this->_options['packagingroot'])) { + $regdir = $this->_prependPath( + $this->config->get('php_dir', null, 'pear.php.net'), + $this->_options['packagingroot']); + + $packrootphp_dir = $this->_prependPath( + $this->config->get('php_dir', null, $channel), + $this->_options['packagingroot']); + } + + if (isset($options['installroot'])) { + $this->config->setInstallRoot($options['installroot']); + $this->_registry = &$this->config->getRegistry(); + $installregistry = &$this->_registry; + $this->installroot = ''; // all done automagically now + $php_dir = $this->config->get('php_dir', null, $channel); + } else { + $this->config->setInstallRoot(false); + $this->_registry = &$this->config->getRegistry(); + if (isset($this->_options['packagingroot'])) { + $installregistry = &new PEAR_Registry($regdir); + if (!$installregistry->channelExists($channel, true)) { + // we need to fake a channel-discover of this channel + $chanobj = $this->_registry->getChannel($channel, true); + $installregistry->addChannel($chanobj); + } + $php_dir = $packrootphp_dir; + } else { + $installregistry = &$this->_registry; + $php_dir = $this->config->get('php_dir', null, $channel); + } + $this->installroot = ''; + } + + // {{{ checks to do when not in "force" mode + if (empty($options['force']) && + (file_exists($this->config->get('php_dir')) && + is_dir($this->config->get('php_dir')))) { + $testp = $channel == 'pear.php.net' ? $pkgname : array($channel, $pkgname); + $instfilelist = $pkg->getInstallationFileList(true); + if (PEAR::isError($instfilelist)) { + return $instfilelist; + } + + // ensure we have the most accurate registry + $installregistry->flushFileMap(); + $test = $installregistry->checkFileMap($instfilelist, $testp, '1.1'); + if (PEAR::isError($test)) { + return $test; + } + + if (sizeof($test)) { + $pkgs = $this->getInstallPackages(); + $found = false; + foreach ($pkgs as $param) { + if ($pkg->isSubpackageOf($param)) { + $found = true; + break; + } + } + + if ($found) { + // subpackages can conflict with earlier versions of parent packages + $parentreg = $installregistry->packageInfo($param->getPackage(), null, $param->getChannel()); + $tmp = $test; + foreach ($tmp as $file => $info) { + if (is_array($info)) { + if (strtolower($info[1]) == strtolower($param->getPackage()) && + strtolower($info[0]) == strtolower($param->getChannel()) + ) { + if (isset($parentreg['filelist'][$file])) { + unset($parentreg['filelist'][$file]); + } else{ + $pos = strpos($file, '/'); + $basedir = substr($file, 0, $pos); + $file2 = substr($file, $pos + 1); + if (isset($parentreg['filelist'][$file2]['baseinstalldir']) + && $parentreg['filelist'][$file2]['baseinstalldir'] === $basedir + ) { + unset($parentreg['filelist'][$file2]); + } + } + + unset($test[$file]); + } + } else { + if (strtolower($param->getChannel()) != 'pear.php.net') { + continue; + } + + if (strtolower($info) == strtolower($param->getPackage())) { + if (isset($parentreg['filelist'][$file])) { + unset($parentreg['filelist'][$file]); + } else{ + $pos = strpos($file, '/'); + $basedir = substr($file, 0, $pos); + $file2 = substr($file, $pos + 1); + if (isset($parentreg['filelist'][$file2]['baseinstalldir']) + && $parentreg['filelist'][$file2]['baseinstalldir'] === $basedir + ) { + unset($parentreg['filelist'][$file2]); + } + } + + unset($test[$file]); + } + } + } + + $pfk = &new PEAR_PackageFile($this->config); + $parentpkg = &$pfk->fromArray($parentreg); + $installregistry->updatePackage2($parentpkg); + } + + if ($param->getChannel() == 'pecl.php.net' && isset($options['upgrade'])) { + $tmp = $test; + foreach ($tmp as $file => $info) { + if (is_string($info)) { + // pear.php.net packages are always stored as strings + if (strtolower($info) == strtolower($param->getPackage())) { + // upgrading existing package + unset($test[$file]); + } + } + } + } + + if (count($test)) { + $msg = "$channel/$pkgname: conflicting files found:\n"; + $longest = max(array_map("strlen", array_keys($test))); + $fmt = "%${longest}s (%s)\n"; + foreach ($test as $file => $info) { + if (!is_array($info)) { + $info = array('pear.php.net', $info); + } + $info = $info[0] . '/' . $info[1]; + $msg .= sprintf($fmt, $file, $info); + } + + if (!isset($options['ignore-errors'])) { + return $this->raiseError($msg); + } + + if (!isset($options['soft'])) { + $this->log(0, "WARNING: $msg"); + } + } + } + } + // }}} + + $this->startFileTransaction(); + + $usechannel = $channel; + if ($channel == 'pecl.php.net') { + $test = $installregistry->packageExists($pkgname, $channel); + if (!$test) { + $test = $installregistry->packageExists($pkgname, 'pear.php.net'); + $usechannel = 'pear.php.net'; + } + } else { + $test = $installregistry->packageExists($pkgname, $channel); + } + + if (empty($options['upgrade']) && empty($options['soft'])) { + // checks to do only when installing new packages + if (empty($options['force']) && $test) { + return $this->raiseError("$channel/$pkgname is already installed"); + } + } else { + // Upgrade + if ($test) { + $v1 = $installregistry->packageInfo($pkgname, 'version', $usechannel); + $v2 = $pkg->getVersion(); + $cmp = version_compare("$v1", "$v2", 'gt'); + if (empty($options['force']) && !version_compare("$v2", "$v1", 'gt')) { + return $this->raiseError("upgrade to a newer version ($v2 is not newer than $v1)"); + } + } + } + + // Do cleanups for upgrade and install, remove old release's files first + if ($test && empty($options['register-only'])) { + // when upgrading, remove old release's files first: + if (PEAR::isError($err = $this->_deletePackageFiles($pkgname, $usechannel, + true))) { + if (!isset($options['ignore-errors'])) { + return $this->raiseError($err); + } + + if (!isset($options['soft'])) { + $this->log(0, 'WARNING: ' . $err->getMessage()); + } + } else { + $backedup = $err; + } + } + + // {{{ Copy files to dest dir --------------------------------------- + + // info from the package it self we want to access from _installFile + $this->pkginfo = &$pkg; + // used to determine whether we should build any C code + $this->source_files = 0; + + $savechannel = $this->config->get('default_channel'); + if (empty($options['register-only']) && !is_dir($php_dir)) { + if (PEAR::isError(System::mkdir(array('-p'), $php_dir))) { + return $this->raiseError("no installation destination directory '$php_dir'\n"); + } + } + + if (substr($pkgfile, -4) != '.xml') { + $tmpdir .= DIRECTORY_SEPARATOR . $pkgname . '-' . $pkg->getVersion(); + } + + $this->configSet('default_channel', $channel); + // {{{ install files + + $ver = $pkg->getPackagexmlVersion(); + if (version_compare($ver, '2.0', '>=')) { + $filelist = $pkg->getInstallationFilelist(); + } else { + $filelist = $pkg->getFileList(); + } + + if (PEAR::isError($filelist)) { + return $filelist; + } + + $p = &$installregistry->getPackage($pkgname, $channel); + $dirtree = (empty($options['register-only']) && $p) ? $p->getDirTree() : false; + + $pkg->resetFilelist(); + $pkg->setLastInstalledVersion($installregistry->packageInfo($pkg->getPackage(), + 'version', $pkg->getChannel())); + foreach ($filelist as $file => $atts) { + $this->expectError(PEAR_INSTALLER_FAILED); + if ($pkg->getPackagexmlVersion() == '1.0') { + $res = $this->_installFile($file, $atts, $tmpdir, $options); + } else { + $res = $this->_installFile2($pkg, $file, $atts, $tmpdir, $options); + } + $this->popExpect(); + + if (PEAR::isError($res)) { + if (empty($options['ignore-errors'])) { + $this->rollbackFileTransaction(); + if ($res->getMessage() == "file does not exist") { + $this->raiseError("file $file in package.xml does not exist"); + } + + return $this->raiseError($res); + } + + if (!isset($options['soft'])) { + $this->log(0, "Warning: " . $res->getMessage()); + } + } + + $real = isset($atts['attribs']) ? $atts['attribs'] : $atts; + if ($res == PEAR_INSTALLER_OK && $real['role'] != 'src') { + // Register files that were installed + $pkg->installedFile($file, $atts); + } + } + // }}} + + // {{{ compile and install source files + if ($this->source_files > 0 && empty($options['nobuild'])) { + if (PEAR::isError($err = + $this->_compileSourceFiles($savechannel, $pkg))) { + return $err; + } + } + // }}} + + if (isset($backedup)) { + $this->_removeBackups($backedup); + } + + if (!$this->commitFileTransaction()) { + $this->rollbackFileTransaction(); + $this->configSet('default_channel', $savechannel); + return $this->raiseError("commit failed", PEAR_INSTALLER_FAILED); + } + // }}} + + $ret = false; + $installphase = 'install'; + $oldversion = false; + // {{{ Register that the package is installed ----------------------- + if (empty($options['upgrade'])) { + // if 'force' is used, replace the info in registry + $usechannel = $channel; + if ($channel == 'pecl.php.net') { + $test = $installregistry->packageExists($pkgname, $channel); + if (!$test) { + $test = $installregistry->packageExists($pkgname, 'pear.php.net'); + $usechannel = 'pear.php.net'; + } + } else { + $test = $installregistry->packageExists($pkgname, $channel); + } + + if (!empty($options['force']) && $test) { + $oldversion = $installregistry->packageInfo($pkgname, 'version', $usechannel); + $installregistry->deletePackage($pkgname, $usechannel); + } + $ret = $installregistry->addPackage2($pkg); + } else { + if ($dirtree) { + $this->startFileTransaction(); + // attempt to delete empty directories + uksort($dirtree, array($this, '_sortDirs')); + foreach($dirtree as $dir => $notused) { + $this->addFileOperation('rmdir', array($dir)); + } + $this->commitFileTransaction(); + } + + $usechannel = $channel; + if ($channel == 'pecl.php.net') { + $test = $installregistry->packageExists($pkgname, $channel); + if (!$test) { + $test = $installregistry->packageExists($pkgname, 'pear.php.net'); + $usechannel = 'pear.php.net'; + } + } else { + $test = $installregistry->packageExists($pkgname, $channel); + } + + // new: upgrade installs a package if it isn't installed + if (!$test) { + $ret = $installregistry->addPackage2($pkg); + } else { + if ($usechannel != $channel) { + $installregistry->deletePackage($pkgname, $usechannel); + $ret = $installregistry->addPackage2($pkg); + } else { + $ret = $installregistry->updatePackage2($pkg); + } + $installphase = 'upgrade'; + } + } + + if (!$ret) { + $this->configSet('default_channel', $savechannel); + return $this->raiseError("Adding package $channel/$pkgname to registry failed"); + } + // }}} + + $this->configSet('default_channel', $savechannel); + if (class_exists('PEAR_Task_Common')) { // this is auto-included if any tasks exist + if (PEAR_Task_Common::hasPostinstallTasks()) { + PEAR_Task_Common::runPostinstallTasks($installphase); + } + } + + return $pkg->toArray(true); + } + + // }}} + + // {{{ _compileSourceFiles() + /** + * @param string + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + */ + function _compileSourceFiles($savechannel, &$filelist) + { + require_once 'PEAR/Builder.php'; + $this->log(1, "$this->source_files source files, building"); + $bob = &new PEAR_Builder($this->ui); + $bob->debug = $this->debug; + $built = $bob->build($filelist, array(&$this, '_buildCallback')); + if (PEAR::isError($built)) { + $this->rollbackFileTransaction(); + $this->configSet('default_channel', $savechannel); + return $built; + } + + $this->log(1, "\nBuild process completed successfully"); + foreach ($built as $ext) { + $bn = basename($ext['file']); + list($_ext_name, $_ext_suff) = explode('.', $bn); + if ($_ext_suff == '.so' || $_ext_suff == '.dll') { + if (extension_loaded($_ext_name)) { + $this->raiseError("Extension '$_ext_name' already loaded. " . + 'Please unload it in your php.ini file ' . + 'prior to install or upgrade'); + } + $role = 'ext'; + } else { + $role = 'src'; + } + + $dest = $ext['dest']; + $packagingroot = ''; + if (isset($this->_options['packagingroot'])) { + $packagingroot = $this->_options['packagingroot']; + } + + $copyto = $this->_prependPath($dest, $packagingroot); + $extra = $copyto != $dest ? " as '$copyto'" : ''; + $this->log(1, "Installing '$dest'$extra"); + + $copydir = dirname($copyto); + // pretty much nothing happens if we are only registering the install + if (empty($this->_options['register-only'])) { + if (!file_exists($copydir) || !is_dir($copydir)) { + if (!$this->mkDirHier($copydir)) { + return $this->raiseError("failed to mkdir $copydir", + PEAR_INSTALLER_FAILED); + } + + $this->log(3, "+ mkdir $copydir"); + } + + if (!@copy($ext['file'], $copyto)) { + return $this->raiseError("failed to write $copyto ($php_errormsg)", PEAR_INSTALLER_FAILED); + } + + $this->log(3, "+ cp $ext[file] $copyto"); + $this->addFileOperation('rename', array($ext['file'], $copyto)); + if (!OS_WINDOWS) { + $mode = 0666 & ~(int)octdec($this->config->get('umask')); + $this->addFileOperation('chmod', array($mode, $copyto)); + if (!@chmod($copyto, $mode)) { + $this->log(0, "failed to change mode of $copyto ($php_errormsg)"); + } + } + } + + + $data = array( + 'role' => $role, + 'name' => $bn, + 'installed_as' => $dest, + 'php_api' => $ext['php_api'], + 'zend_mod_api' => $ext['zend_mod_api'], + 'zend_ext_api' => $ext['zend_ext_api'], + ); + + if ($filelist->getPackageXmlVersion() == '1.0') { + $filelist->installedFile($bn, $data); + } else { + $filelist->installedFile($bn, array('attribs' => $data)); + } + } + } + + // }}} + function &getUninstallPackages() + { + return $this->_downloadedPackages; + } + // {{{ uninstall() + + /** + * Uninstall a package + * + * This method removes all files installed by the application, and then + * removes any empty directories. + * @param string package name + * @param array Command-line options. Possibilities include: + * + * - installroot: base installation dir, if not the default + * - register-only : update registry but don't remove files + * - nodeps: do not process dependencies of other packages to ensure + * uninstallation does not break things + */ + function uninstall($package, $options = array()) + { + $installRoot = isset($options['installroot']) ? $options['installroot'] : ''; + $this->config->setInstallRoot($installRoot); + + $this->installroot = ''; + $this->_registry = &$this->config->getRegistry(); + if (is_object($package)) { + $channel = $package->getChannel(); + $pkg = $package; + $package = $pkg->getPackage(); + } else { + $pkg = false; + $info = $this->_registry->parsePackageName($package, + $this->config->get('default_channel')); + $channel = $info['channel']; + $package = $info['package']; + } + + $savechannel = $this->config->get('default_channel'); + $this->configSet('default_channel', $channel); + if (!is_object($pkg)) { + $pkg = $this->_registry->getPackage($package, $channel); + } + + if (!$pkg) { + $this->configSet('default_channel', $savechannel); + return $this->raiseError($this->_registry->parsedPackageNameToString( + array( + 'channel' => $channel, + 'package' => $package + ), true) . ' not installed'); + } + + if ($pkg->getInstalledBinary()) { + // this is just an alias for a binary package + return $this->_registry->deletePackage($package, $channel); + } + + $filelist = $pkg->getFilelist(); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + if (!class_exists('PEAR_Dependency2')) { + require_once 'PEAR/Dependency2.php'; + } + + $depchecker = &new PEAR_Dependency2($this->config, $options, + array('channel' => $channel, 'package' => $package), + PEAR_VALIDATE_UNINSTALLING); + $e = $depchecker->validatePackageUninstall($this); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($e)) { + if (!isset($options['ignore-errors'])) { + return $this->raiseError($e); + } + + if (!isset($options['soft'])) { + $this->log(0, 'WARNING: ' . $e->getMessage()); + } + } elseif (is_array($e)) { + if (!isset($options['soft'])) { + $this->log(0, $e[0]); + } + } + + $this->pkginfo = &$pkg; + // pretty much nothing happens if we are only registering the uninstall + if (empty($options['register-only'])) { + // {{{ Delete the files + $this->startFileTransaction(); + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + if (PEAR::isError($err = $this->_deletePackageFiles($package, $channel))) { + PEAR::popErrorHandling(); + $this->rollbackFileTransaction(); + $this->configSet('default_channel', $savechannel); + if (!isset($options['ignore-errors'])) { + return $this->raiseError($err); + } + + if (!isset($options['soft'])) { + $this->log(0, 'WARNING: ' . $err->getMessage()); + } + } else { + PEAR::popErrorHandling(); + } + + if (!$this->commitFileTransaction()) { + $this->rollbackFileTransaction(); + if (!isset($options['ignore-errors'])) { + return $this->raiseError("uninstall failed"); + } + + if (!isset($options['soft'])) { + $this->log(0, 'WARNING: uninstall failed'); + } + } else { + $this->startFileTransaction(); + $dirtree = $pkg->getDirTree(); + if ($dirtree === false) { + $this->configSet('default_channel', $savechannel); + return $this->_registry->deletePackage($package, $channel); + } + + // attempt to delete empty directories + uksort($dirtree, array($this, '_sortDirs')); + foreach($dirtree as $dir => $notused) { + $this->addFileOperation('rmdir', array($dir)); + } + + if (!$this->commitFileTransaction()) { + $this->rollbackFileTransaction(); + if (!isset($options['ignore-errors'])) { + return $this->raiseError("uninstall failed"); + } + + if (!isset($options['soft'])) { + $this->log(0, 'WARNING: uninstall failed'); + } + } + } + // }}} + } + + $this->configSet('default_channel', $savechannel); + // Register that the package is no longer installed + return $this->_registry->deletePackage($package, $channel); + } + + /** + * Sort a list of arrays of array(downloaded packagefilename) by dependency. + * + * It also removes duplicate dependencies + * @param array an array of PEAR_PackageFile_v[1/2] objects + * @return array|PEAR_Error array of array(packagefilename, package.xml contents) + */ + function sortPackagesForUninstall(&$packages) + { + $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->config); + if (PEAR::isError($this->_dependencyDB)) { + return $this->_dependencyDB; + } + usort($packages, array(&$this, '_sortUninstall')); + } + + function _sortUninstall($a, $b) + { + if (!$a->getDeps() && !$b->getDeps()) { + return 0; // neither package has dependencies, order is insignificant + } + if ($a->getDeps() && !$b->getDeps()) { + return -1; // $a must be installed after $b because $a has dependencies + } + if (!$a->getDeps() && $b->getDeps()) { + return 1; // $b must be installed after $a because $b has dependencies + } + // both packages have dependencies + if ($this->_dependencyDB->dependsOn($a, $b)) { + return -1; + } + if ($this->_dependencyDB->dependsOn($b, $a)) { + return 1; + } + return 0; + } + + // }}} + // {{{ _sortDirs() + function _sortDirs($a, $b) + { + if (strnatcmp($a, $b) == -1) return 1; + if (strnatcmp($a, $b) == 1) return -1; + return 0; + } + + // }}} + + // {{{ _buildCallback() + + function _buildCallback($what, $data) + { + if (($what == 'cmdoutput' && $this->debug > 1) || + ($what == 'output' && $this->debug > 0)) { + $this->ui->outputData(rtrim($data), 'build'); + } + } + + // }}} +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role.php b/_piecrust/libs/PEAR/Installer/Role.php new file mode 100644 index 0000000..0c50fa7 --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role.php @@ -0,0 +1,276 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Role.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * base class for installer roles + */ +require_once 'PEAR/Installer/Role/Common.php'; +require_once 'PEAR/XMLParser.php'; +/** + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Installer_Role +{ + /** + * Set up any additional configuration variables that file roles require + * + * Never call this directly, it is called by the PEAR_Config constructor + * @param PEAR_Config + * @access private + * @static + */ + function initializeConfig(&$config) + { + if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { + PEAR_Installer_Role::registerRoles(); + } + + foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $class => $info) { + if (!$info['config_vars']) { + continue; + } + + $config->_addConfigVars($class, $info['config_vars']); + } + } + + /** + * @param PEAR_PackageFile_v2 + * @param string role name + * @param PEAR_Config + * @return PEAR_Installer_Role_Common + * @static + */ + function &factory($pkg, $role, &$config) + { + if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { + PEAR_Installer_Role::registerRoles(); + } + + if (!in_array($role, PEAR_Installer_Role::getValidRoles($pkg->getPackageType()))) { + $a = false; + return $a; + } + + $a = 'PEAR_Installer_Role_' . ucfirst($role); + if (!class_exists($a)) { + require_once str_replace('_', '/', $a) . '.php'; + } + + $b = new $a($config); + return $b; + } + + /** + * Get a list of file roles that are valid for the particular release type. + * + * For instance, src files serve no purpose in regular php releases. + * @param string + * @param bool clear cache + * @return array + * @static + */ + function getValidRoles($release, $clear = false) + { + if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { + PEAR_Installer_Role::registerRoles(); + } + + static $ret = array(); + if ($clear) { + $ret = array(); + } + + if (isset($ret[$release])) { + return $ret[$release]; + } + + $ret[$release] = array(); + foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) { + if (in_array($release, $okreleases['releasetypes'])) { + $ret[$release][] = strtolower(str_replace('PEAR_Installer_Role_', '', $role)); + } + } + + return $ret[$release]; + } + + /** + * Get a list of roles that require their files to be installed + * + * Most roles must be installed, but src and package roles, for instance + * are pseudo-roles. src files are compiled into a new extension. Package + * roles are actually fully bundled releases of a package + * @param bool clear cache + * @return array + * @static + */ + function getInstallableRoles($clear = false) + { + if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { + PEAR_Installer_Role::registerRoles(); + } + + static $ret; + if ($clear) { + unset($ret); + } + + if (isset($ret)) { + return $ret; + } + + $ret = array(); + foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) { + if ($okreleases['installable']) { + $ret[] = strtolower(str_replace('PEAR_Installer_Role_', '', $role)); + } + } + + return $ret; + } + + /** + * Return an array of roles that are affected by the baseinstalldir attribute + * + * Most roles ignore this attribute, and instead install directly into: + * PackageName/filepath + * so a tests file tests/file.phpt is installed into PackageName/tests/filepath.php + * @param bool clear cache + * @return array + * @static + */ + function getBaseinstallRoles($clear = false) + { + if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { + PEAR_Installer_Role::registerRoles(); + } + + static $ret; + if ($clear) { + unset($ret); + } + + if (isset($ret)) { + return $ret; + } + + $ret = array(); + foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) { + if ($okreleases['honorsbaseinstall']) { + $ret[] = strtolower(str_replace('PEAR_Installer_Role_', '', $role)); + } + } + + return $ret; + } + + /** + * Return an array of file roles that should be analyzed for PHP content at package time, + * like the "php" role. + * @param bool clear cache + * @return array + * @static + */ + function getPhpRoles($clear = false) + { + if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { + PEAR_Installer_Role::registerRoles(); + } + + static $ret; + if ($clear) { + unset($ret); + } + + if (isset($ret)) { + return $ret; + } + + $ret = array(); + foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) { + if ($okreleases['phpfile']) { + $ret[] = strtolower(str_replace('PEAR_Installer_Role_', '', $role)); + } + } + + return $ret; + } + + /** + * Scan through the Command directory looking for classes + * and see what commands they implement. + * @param string which directory to look for classes, defaults to + * the Installer/Roles subdirectory of + * the directory from where this file (__FILE__) is + * included. + * + * @return bool TRUE on success, a PEAR error on failure + * @access public + * @static + */ + function registerRoles($dir = null) + { + $GLOBALS['_PEAR_INSTALLER_ROLES'] = array(); + $parser = new PEAR_XMLParser; + if ($dir === null) { + $dir = dirname(__FILE__) . '/Role'; + } + + if (!file_exists($dir) || !is_dir($dir)) { + return PEAR::raiseError("registerRoles: opendir($dir) failed: does not exist/is not directory"); + } + + $dp = @opendir($dir); + if (empty($dp)) { + return PEAR::raiseError("registerRoles: opendir($dir) failed: $php_errmsg"); + } + + while ($entry = readdir($dp)) { + if ($entry{0} == '.' || substr($entry, -4) != '.xml') { + continue; + } + + $class = "PEAR_Installer_Role_".substr($entry, 0, -4); + // List of roles + if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'][$class])) { + $file = "$dir/$entry"; + $parser->parse(file_get_contents($file)); + $data = $parser->getData(); + if (!is_array($data['releasetypes'])) { + $data['releasetypes'] = array($data['releasetypes']); + } + + $GLOBALS['_PEAR_INSTALLER_ROLES'][$class] = $data; + } + } + + closedir($dp); + ksort($GLOBALS['_PEAR_INSTALLER_ROLES']); + PEAR_Installer_Role::getBaseinstallRoles(true); + PEAR_Installer_Role::getInstallableRoles(true); + PEAR_Installer_Role::getPhpRoles(true); + PEAR_Installer_Role::getValidRoles('****', true); + return true; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Cfg.php b/_piecrust/libs/PEAR/Installer/Role/Cfg.php new file mode 100644 index 0000000..7620122 --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Cfg.php @@ -0,0 +1,106 @@ + + * @copyright 2007-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Cfg.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.7.0 + */ + +/** + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 2007-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.7.0 + */ +class PEAR_Installer_Role_Cfg extends PEAR_Installer_Role_Common +{ + /** + * @var PEAR_Installer + */ + var $installer; + + /** + * the md5 of the original file + * + * @var unknown_type + */ + var $md5 = null; + + /** + * Do any unusual setup here + * @param PEAR_Installer + * @param PEAR_PackageFile_v2 + * @param array file attributes + * @param string file name + */ + function setup(&$installer, $pkg, $atts, $file) + { + $this->installer = &$installer; + $reg = &$this->installer->config->getRegistry(); + $package = $reg->getPackage($pkg->getPackage(), $pkg->getChannel()); + if ($package) { + $filelist = $package->getFilelist(); + if (isset($filelist[$file]) && isset($filelist[$file]['md5sum'])) { + $this->md5 = $filelist[$file]['md5sum']; + } + } + } + + function processInstallation($pkg, $atts, $file, $tmp_path, $layer = null) + { + $test = parent::processInstallation($pkg, $atts, $file, $tmp_path, $layer); + if (@file_exists($test[2]) && @file_exists($test[3])) { + $md5 = md5_file($test[2]); + // configuration has already been installed, check for mods + if ($md5 !== $this->md5 && $md5 !== md5_file($test[3])) { + // configuration has been modified, so save our version as + // configfile-version + $old = $test[2]; + $test[2] .= '.new-' . $pkg->getVersion(); + // backup original and re-install it + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $tmpcfg = $this->config->get('temp_dir'); + $newloc = System::mkdir(array('-p', $tmpcfg)); + if (!$newloc) { + // try temp_dir + $newloc = System::mktemp(array('-d')); + if (!$newloc || PEAR::isError($newloc)) { + PEAR::popErrorHandling(); + return PEAR::raiseError('Could not save existing configuration file '. + $old . ', unable to install. Please set temp_dir ' . + 'configuration variable to a writeable location and try again'); + } + } else { + $newloc = $tmpcfg; + } + + $temp_file = $newloc . DIRECTORY_SEPARATOR . uniqid('savefile'); + if (!@copy($old, $temp_file)) { + PEAR::popErrorHandling(); + return PEAR::raiseError('Could not save existing configuration file '. + $old . ', unable to install. Please set temp_dir ' . + 'configuration variable to a writeable location and try again'); + } + + PEAR::popErrorHandling(); + $this->installer->log(0, "WARNING: configuration file $old is being installed as $test[2], you should manually merge in changes to the existing configuration file"); + $this->installer->addFileOperation('rename', array($temp_file, $old, false)); + $this->installer->addFileOperation('delete', array($temp_file)); + } + } + + return $test; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Cfg.xml b/_piecrust/libs/PEAR/Installer/Role/Cfg.xml new file mode 100644 index 0000000..7a415dc --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Cfg.xml @@ -0,0 +1,15 @@ + + php + extsrc + extbin + zendextsrc + zendextbin + 1 + cfg_dir + + 1 + + + + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Common.php b/_piecrust/libs/PEAR/Installer/Role/Common.php new file mode 100644 index 0000000..23e7348 --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Common.php @@ -0,0 +1,174 @@ + + * @copyright 1997-2006 The PHP Group + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Common.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ +/** + * Base class for all installation roles. + * + * This class allows extensibility of file roles. Packages with complex + * customization can now provide custom file roles along with the possibility of + * adding configuration values to match. + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2006 The PHP Group + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Installer_Role_Common +{ + /** + * @var PEAR_Config + * @access protected + */ + var $config; + + /** + * @param PEAR_Config + */ + function PEAR_Installer_Role_Common(&$config) + { + $this->config = $config; + } + + /** + * Retrieve configuration information about a file role from its XML info + * + * @param string $role Role Classname, as in "PEAR_Installer_Role_Data" + * @return array + */ + function getInfo($role) + { + if (empty($GLOBALS['_PEAR_INSTALLER_ROLES'][$role])) { + return PEAR::raiseError('Unknown Role class: "' . $role . '"'); + } + return $GLOBALS['_PEAR_INSTALLER_ROLES'][$role]; + } + + /** + * This is called for each file to set up the directories and files + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @param array attributes from the tag + * @param string file name + * @return array an array consisting of: + * + * 1 the original, pre-baseinstalldir installation directory + * 2 the final installation directory + * 3 the full path to the final location of the file + * 4 the location of the pre-installation file + */ + function processInstallation($pkg, $atts, $file, $tmp_path, $layer = null) + { + $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' . + ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this))))); + if (PEAR::isError($roleInfo)) { + return $roleInfo; + } + if (!$roleInfo['locationconfig']) { + return false; + } + if ($roleInfo['honorsbaseinstall']) { + $dest_dir = $save_destdir = $this->config->get($roleInfo['locationconfig'], $layer, + $pkg->getChannel()); + if (!empty($atts['baseinstalldir'])) { + $dest_dir .= DIRECTORY_SEPARATOR . $atts['baseinstalldir']; + } + } elseif ($roleInfo['unusualbaseinstall']) { + $dest_dir = $save_destdir = $this->config->get($roleInfo['locationconfig'], + $layer, $pkg->getChannel()) . DIRECTORY_SEPARATOR . $pkg->getPackage(); + if (!empty($atts['baseinstalldir'])) { + $dest_dir .= DIRECTORY_SEPARATOR . $atts['baseinstalldir']; + } + } else { + $dest_dir = $save_destdir = $this->config->get($roleInfo['locationconfig'], + $layer, $pkg->getChannel()) . DIRECTORY_SEPARATOR . $pkg->getPackage(); + } + if (dirname($file) != '.' && empty($atts['install-as'])) { + $dest_dir .= DIRECTORY_SEPARATOR . dirname($file); + } + if (empty($atts['install-as'])) { + $dest_file = $dest_dir . DIRECTORY_SEPARATOR . basename($file); + } else { + $dest_file = $dest_dir . DIRECTORY_SEPARATOR . $atts['install-as']; + } + $orig_file = $tmp_path . DIRECTORY_SEPARATOR . $file; + + // Clean up the DIRECTORY_SEPARATOR mess + $ds2 = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR; + + list($dest_dir, $dest_file, $orig_file) = preg_replace(array('!\\\\+!', '!/!', "!$ds2+!"), + array(DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, + DIRECTORY_SEPARATOR), + array($dest_dir, $dest_file, $orig_file)); + return array($save_destdir, $dest_dir, $dest_file, $orig_file); + } + + /** + * Get the name of the configuration variable that specifies the location of this file + * @return string|false + */ + function getLocationConfig() + { + $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' . + ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this))))); + if (PEAR::isError($roleInfo)) { + return $roleInfo; + } + return $roleInfo['locationconfig']; + } + + /** + * Do any unusual setup here + * @param PEAR_Installer + * @param PEAR_PackageFile_v2 + * @param array file attributes + * @param string file name + */ + function setup(&$installer, $pkg, $atts, $file) + { + } + + function isExecutable() + { + $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' . + ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this))))); + if (PEAR::isError($roleInfo)) { + return $roleInfo; + } + return $roleInfo['executable']; + } + + function isInstallable() + { + $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' . + ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this))))); + if (PEAR::isError($roleInfo)) { + return $roleInfo; + } + return $roleInfo['installable']; + } + + function isExtension() + { + $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' . + ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this))))); + if (PEAR::isError($roleInfo)) { + return $roleInfo; + } + return $roleInfo['phpextension']; + } +} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Data.php b/_piecrust/libs/PEAR/Installer/Role/Data.php new file mode 100644 index 0000000..e3b7fa2 --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Data.php @@ -0,0 +1,28 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Data.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Data.xml b/_piecrust/libs/PEAR/Installer/Role/Data.xml new file mode 100644 index 0000000..eae6372 --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Data.xml @@ -0,0 +1,15 @@ + + php + extsrc + extbin + zendextsrc + zendextbin + 1 + data_dir + + + + + + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Doc.php b/_piecrust/libs/PEAR/Installer/Role/Doc.php new file mode 100644 index 0000000..d592fff --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Doc.php @@ -0,0 +1,28 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Doc.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Doc.xml b/_piecrust/libs/PEAR/Installer/Role/Doc.xml new file mode 100644 index 0000000..173afba --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Doc.xml @@ -0,0 +1,15 @@ + + php + extsrc + extbin + zendextsrc + zendextbin + 1 + doc_dir + + + + + + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Ext.php b/_piecrust/libs/PEAR/Installer/Role/Ext.php new file mode 100644 index 0000000..eceb027 --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Ext.php @@ -0,0 +1,28 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Ext.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Installer_Role_Ext extends PEAR_Installer_Role_Common {} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Ext.xml b/_piecrust/libs/PEAR/Installer/Role/Ext.xml new file mode 100644 index 0000000..e2940fe --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Ext.xml @@ -0,0 +1,12 @@ + + extbin + zendextbin + 1 + ext_dir + 1 + + + + 1 + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Php.php b/_piecrust/libs/PEAR/Installer/Role/Php.php new file mode 100644 index 0000000..e2abf44 --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Php.php @@ -0,0 +1,28 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Php.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Php.xml b/_piecrust/libs/PEAR/Installer/Role/Php.xml new file mode 100644 index 0000000..6b9a0e6 --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Php.xml @@ -0,0 +1,15 @@ + + php + extsrc + extbin + zendextsrc + zendextbin + 1 + php_dir + 1 + + 1 + + + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Script.php b/_piecrust/libs/PEAR/Installer/Role/Script.php new file mode 100644 index 0000000..b31469e --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Script.php @@ -0,0 +1,28 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Script.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Script.xml b/_piecrust/libs/PEAR/Installer/Role/Script.xml new file mode 100644 index 0000000..e732cf2 --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Script.xml @@ -0,0 +1,15 @@ + + php + extsrc + extbin + zendextsrc + zendextbin + 1 + bin_dir + 1 + + + 1 + + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Src.php b/_piecrust/libs/PEAR/Installer/Role/Src.php new file mode 100644 index 0000000..5037053 --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Src.php @@ -0,0 +1,34 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Src.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Installer_Role_Src extends PEAR_Installer_Role_Common +{ + function setup(&$installer, $pkg, $atts, $file) + { + $installer->source_files++; + } +} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Src.xml b/_piecrust/libs/PEAR/Installer/Role/Src.xml new file mode 100644 index 0000000..1034834 --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Src.xml @@ -0,0 +1,12 @@ + + extsrc + zendextsrc + 1 + temp_dir + + + + + + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Test.php b/_piecrust/libs/PEAR/Installer/Role/Test.php new file mode 100644 index 0000000..14c0e60 --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Test.php @@ -0,0 +1,28 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Test.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Installer_Role_Test extends PEAR_Installer_Role_Common {} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Test.xml b/_piecrust/libs/PEAR/Installer/Role/Test.xml new file mode 100644 index 0000000..51d5b89 --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Test.xml @@ -0,0 +1,15 @@ + + php + extsrc + extbin + zendextsrc + zendextbin + 1 + test_dir + + + + + + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Www.php b/_piecrust/libs/PEAR/Installer/Role/Www.php new file mode 100644 index 0000000..11adeff --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Www.php @@ -0,0 +1,28 @@ + + * @copyright 2007-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Www.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.7.0 + */ + +/** + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 2007-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.7.0 + */ +class PEAR_Installer_Role_Www extends PEAR_Installer_Role_Common {} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Www.xml b/_piecrust/libs/PEAR/Installer/Role/Www.xml new file mode 100644 index 0000000..7598be3 --- /dev/null +++ b/_piecrust/libs/PEAR/Installer/Role/Www.xml @@ -0,0 +1,15 @@ + + php + extsrc + extbin + zendextsrc + zendextbin + 1 + www_dir + 1 + + + + + + \ No newline at end of file diff --git a/_piecrust/libs/PEAR/PackageFile.php b/_piecrust/libs/PEAR/PackageFile.php new file mode 100644 index 0000000..7ae3362 --- /dev/null +++ b/_piecrust/libs/PEAR/PackageFile.php @@ -0,0 +1,492 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: PackageFile.php 313024 2011-07-06 19:51:24Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * needed for PEAR_VALIDATE_* constants + */ +require_once 'PEAR/Validate.php'; +/** + * Error code if the package.xml tag does not contain a valid version + */ +define('PEAR_PACKAGEFILE_ERROR_NO_PACKAGEVERSION', 1); +/** + * Error code if the package.xml tag version is not supported (version 1.0 and 1.1 are the only supported versions, + * currently + */ +define('PEAR_PACKAGEFILE_ERROR_INVALID_PACKAGEVERSION', 2); +/** + * Abstraction for the package.xml package description file + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_PackageFile +{ + /** + * @var PEAR_Config + */ + var $_config; + var $_debug; + + var $_logger = false; + /** + * @var boolean + */ + var $_rawReturn = false; + + /** + * helper for extracting Archive_Tar errors + * @var array + * @access private + */ + var $_extractErrors = array(); + + /** + * + * @param PEAR_Config $config + * @param ? $debug + * @param string @tmpdir Optional temporary directory for uncompressing + * files + */ + function PEAR_PackageFile(&$config, $debug = false) + { + $this->_config = $config; + $this->_debug = $debug; + } + + /** + * Turn off validation - return a parsed package.xml without checking it + * + * This is used by the package-validate command + */ + function rawReturn() + { + $this->_rawReturn = true; + } + + function setLogger(&$l) + { + $this->_logger = &$l; + } + + /** + * Create a PEAR_PackageFile_Parser_v* of a given version. + * @param int $version + * @return PEAR_PackageFile_Parser_v1|PEAR_PackageFile_Parser_v1 + */ + function &parserFactory($version) + { + if (!in_array($version{0}, array('1', '2'))) { + $a = false; + return $a; + } + + include_once 'PEAR/PackageFile/Parser/v' . $version{0} . '.php'; + $version = $version{0}; + $class = "PEAR_PackageFile_Parser_v$version"; + $a = new $class; + return $a; + } + + /** + * For simpler unit-testing + * @return string + */ + function getClassPrefix() + { + return 'PEAR_PackageFile_v'; + } + + /** + * Create a PEAR_PackageFile_v* of a given version. + * @param int $version + * @return PEAR_PackageFile_v1|PEAR_PackageFile_v1 + */ + function &factory($version) + { + if (!in_array($version{0}, array('1', '2'))) { + $a = false; + return $a; + } + + include_once 'PEAR/PackageFile/v' . $version{0} . '.php'; + $version = $version{0}; + $class = $this->getClassPrefix() . $version; + $a = new $class; + return $a; + } + + /** + * Create a PEAR_PackageFile_v* from its toArray() method + * + * WARNING: no validation is performed, the array is assumed to be valid, + * always parse from xml if you want validation. + * @param array $arr + * @return PEAR_PackageFileManager_v1|PEAR_PackageFileManager_v2 + * @uses factory() to construct the returned object. + */ + function &fromArray($arr) + { + if (isset($arr['xsdversion'])) { + $obj = &$this->factory($arr['xsdversion']); + if ($this->_logger) { + $obj->setLogger($this->_logger); + } + + $obj->setConfig($this->_config); + $obj->fromArray($arr); + return $obj; + } + + if (isset($arr['package']['attribs']['version'])) { + $obj = &$this->factory($arr['package']['attribs']['version']); + } else { + $obj = &$this->factory('1.0'); + } + + if ($this->_logger) { + $obj->setLogger($this->_logger); + } + + $obj->setConfig($this->_config); + $obj->fromArray($arr); + return $obj; + } + + /** + * Create a PEAR_PackageFile_v* from an XML string. + * @access public + * @param string $data contents of package.xml file + * @param int $state package state (one of PEAR_VALIDATE_* constants) + * @param string $file full path to the package.xml file (and the files + * it references) + * @param string $archive optional name of the archive that the XML was + * extracted from, if any + * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @uses parserFactory() to construct a parser to load the package. + */ + function &fromXmlString($data, $state, $file, $archive = false) + { + if (preg_match('/]+version=[\'"]([0-9]+\.[0-9]+)[\'"]/', $data, $packageversion)) { + if (!in_array($packageversion[1], array('1.0', '2.0', '2.1'))) { + return PEAR::raiseError('package.xml version "' . $packageversion[1] . + '" is not supported, only 1.0, 2.0, and 2.1 are supported.'); + } + + $object = &$this->parserFactory($packageversion[1]); + if ($this->_logger) { + $object->setLogger($this->_logger); + } + + $object->setConfig($this->_config); + $pf = $object->parse($data, $file, $archive); + if (PEAR::isError($pf)) { + return $pf; + } + + if ($this->_rawReturn) { + return $pf; + } + + if (!$pf->validate($state)) {; + if ($this->_config->get('verbose') > 0 + && $this->_logger && $pf->getValidationWarnings(false) + ) { + foreach ($pf->getValidationWarnings(false) as $warning) { + $this->_logger->log(0, 'ERROR: ' . $warning['message']); + } + } + + $a = PEAR::raiseError('Parsing of package.xml from file "' . $file . '" failed', + 2, null, null, $pf->getValidationWarnings()); + return $a; + } + + if ($this->_logger && $pf->getValidationWarnings(false)) { + foreach ($pf->getValidationWarnings() as $warning) { + $this->_logger->log(0, 'WARNING: ' . $warning['message']); + } + } + + if (method_exists($pf, 'flattenFilelist')) { + $pf->flattenFilelist(); // for v2 + } + + return $pf; + } elseif (preg_match('/]+version=[\'"]([^"\']+)[\'"]/', $data, $packageversion)) { + $a = PEAR::raiseError('package.xml file "' . $file . + '" has unsupported package.xml version "' . $packageversion[1] . '"'); + return $a; + } else { + if (!class_exists('PEAR_ErrorStack')) { + require_once 'PEAR/ErrorStack.php'; + } + + PEAR_ErrorStack::staticPush('PEAR_PackageFile', + PEAR_PACKAGEFILE_ERROR_NO_PACKAGEVERSION, + 'warning', array('xml' => $data), 'package.xml "' . $file . + '" has no package.xml version'); + $object = &$this->parserFactory('1.0'); + $object->setConfig($this->_config); + $pf = $object->parse($data, $file, $archive); + if (PEAR::isError($pf)) { + return $pf; + } + + if ($this->_rawReturn) { + return $pf; + } + + if (!$pf->validate($state)) { + $a = PEAR::raiseError('Parsing of package.xml from file "' . $file . '" failed', + 2, null, null, $pf->getValidationWarnings()); + return $a; + } + + if ($this->_logger && $pf->getValidationWarnings(false)) { + foreach ($pf->getValidationWarnings() as $warning) { + $this->_logger->log(0, 'WARNING: ' . $warning['message']); + } + } + + if (method_exists($pf, 'flattenFilelist')) { + $pf->flattenFilelist(); // for v2 + } + + return $pf; + } + } + + /** + * Register a temporary file or directory. When the destructor is + * executed, all registered temporary files and directories are + * removed. + * + * @param string $file name of file or directory + * @return void + */ + function addTempFile($file) + { + $GLOBALS['_PEAR_Common_tempfiles'][] = $file; + } + + /** + * Create a PEAR_PackageFile_v* from a compresed Tar or Tgz file. + * @access public + * @param string contents of package.xml file + * @param int package state (one of PEAR_VALIDATE_* constants) + * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @using Archive_Tar to extract the files + * @using fromPackageFile() to load the package after the package.xml + * file is extracted. + */ + function &fromTgzFile($file, $state) + { + if (!class_exists('Archive_Tar')) { + require_once 'Archive/Tar.php'; + } + + $tar = new Archive_Tar($file); + if ($this->_debug <= 1) { + $tar->pushErrorHandling(PEAR_ERROR_RETURN); + } + + $content = $tar->listContent(); + if ($this->_debug <= 1) { + $tar->popErrorHandling(); + } + + if (!is_array($content)) { + if (is_string($file) && strlen($file < 255) && + (!file_exists($file) || !@is_file($file))) { + $ret = PEAR::raiseError("could not open file \"$file\""); + return $ret; + } + + $file = realpath($file); + $ret = PEAR::raiseError("Could not get contents of package \"$file\"". + '. Invalid tgz file.'); + return $ret; + } + + if (!count($content) && !@is_file($file)) { + $ret = PEAR::raiseError("could not open file \"$file\""); + return $ret; + } + + $xml = null; + $origfile = $file; + foreach ($content as $file) { + $name = $file['filename']; + if ($name == 'package2.xml') { // allow a .tgz to distribute both versions + $xml = $name; + break; + } + + if ($name == 'package.xml') { + $xml = $name; + break; + } elseif (preg_match('/package.xml$/', $name, $match)) { + $xml = $name; + break; + } + } + + $tmpdir = System::mktemp('-t "' . $this->_config->get('temp_dir') . '" -d pear'); + if ($tmpdir === false) { + $ret = PEAR::raiseError("there was a problem with getting the configured temp directory"); + return $ret; + } + + PEAR_PackageFile::addTempFile($tmpdir); + + $this->_extractErrors(); + PEAR::staticPushErrorHandling(PEAR_ERROR_CALLBACK, array($this, '_extractErrors')); + + if (!$xml || !$tar->extractList(array($xml), $tmpdir)) { + $extra = implode("\n", $this->_extractErrors()); + if ($extra) { + $extra = ' ' . $extra; + } + + PEAR::staticPopErrorHandling(); + $ret = PEAR::raiseError('could not extract the package.xml file from "' . + $origfile . '"' . $extra); + return $ret; + } + + PEAR::staticPopErrorHandling(); + $ret = &PEAR_PackageFile::fromPackageFile("$tmpdir/$xml", $state, $origfile); + return $ret; + } + + /** + * helper callback for extracting Archive_Tar errors + * + * @param PEAR_Error|null $err + * @return array + * @access private + */ + function _extractErrors($err = null) + { + static $errors = array(); + if ($err === null) { + $e = $errors; + $errors = array(); + return $e; + } + $errors[] = $err->getMessage(); + } + + /** + * Create a PEAR_PackageFile_v* from a package.xml file. + * + * @access public + * @param string $descfile name of package xml file + * @param int $state package state (one of PEAR_VALIDATE_* constants) + * @param string|false $archive name of the archive this package.xml came + * from, if any + * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @uses PEAR_PackageFile::fromXmlString to create the oject after the + * XML is loaded from the package.xml file. + */ + function &fromPackageFile($descfile, $state, $archive = false) + { + $fp = false; + if (is_string($descfile) && strlen($descfile) < 255 && + ( + !file_exists($descfile) || !is_file($descfile) || !is_readable($descfile) + || (!$fp = @fopen($descfile, 'r')) + ) + ) { + $a = PEAR::raiseError("Unable to open $descfile"); + return $a; + } + + // read the whole thing so we only get one cdata callback + // for each block of cdata + fclose($fp); + $data = file_get_contents($descfile); + $ret = &PEAR_PackageFile::fromXmlString($data, $state, $descfile, $archive); + return $ret; + } + + /** + * Create a PEAR_PackageFile_v* from a .tgz archive or package.xml file. + * + * This method is able to extract information about a package from a .tgz + * archive or from a XML package definition file. + * + * @access public + * @param string $info file name + * @param int $state package state (one of PEAR_VALIDATE_* constants) + * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @uses fromPackageFile() if the file appears to be XML + * @uses fromTgzFile() to load all non-XML files + */ + function &fromAnyFile($info, $state) + { + if (is_dir($info)) { + $dir_name = realpath($info); + if (file_exists($dir_name . '/package.xml')) { + $info = PEAR_PackageFile::fromPackageFile($dir_name . '/package.xml', $state); + } elseif (file_exists($dir_name . '/package2.xml')) { + $info = PEAR_PackageFile::fromPackageFile($dir_name . '/package2.xml', $state); + } else { + $info = PEAR::raiseError("No package definition found in '$info' directory"); + } + + return $info; + } + + $fp = false; + if (is_string($info) && strlen($info) < 255 && + (file_exists($info) || ($fp = @fopen($info, 'r'))) + ) { + + if ($fp) { + fclose($fp); + } + + $tmp = substr($info, -4); + if ($tmp == '.xml') { + $info = &PEAR_PackageFile::fromPackageFile($info, $state); + } elseif ($tmp == '.tar' || $tmp == '.tgz') { + $info = &PEAR_PackageFile::fromTgzFile($info, $state); + } else { + $fp = fopen($info, 'r'); + $test = fread($fp, 5); + fclose($fp); + if ($test == ' + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: v1.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ +/** + * needed for PEAR_VALIDATE_* constants + */ +require_once 'PEAR/Validate.php'; +require_once 'System.php'; +require_once 'PEAR/PackageFile/v2.php'; +/** + * This class converts a PEAR_PackageFile_v1 object into any output format. + * + * Supported output formats include array, XML string, and a PEAR_PackageFile_v2 + * object, for converting package.xml 1.0 into package.xml 2.0 with no sweat. + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_PackageFile_Generator_v1 +{ + /** + * @var PEAR_PackageFile_v1 + */ + var $_packagefile; + function PEAR_PackageFile_Generator_v1(&$packagefile) + { + $this->_packagefile = &$packagefile; + } + + function getPackagerVersion() + { + return '1.9.4'; + } + + /** + * @param PEAR_Packager + * @param bool if true, a .tgz is written, otherwise a .tar is written + * @param string|null directory in which to save the .tgz + * @return string|PEAR_Error location of package or error object + */ + function toTgz(&$packager, $compress = true, $where = null) + { + require_once 'Archive/Tar.php'; + if ($where === null) { + if (!($where = System::mktemp(array('-d')))) { + return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: mktemp failed'); + } + } elseif (!@System::mkDir(array('-p', $where))) { + return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: "' . $where . '" could' . + ' not be created'); + } + if (file_exists($where . DIRECTORY_SEPARATOR . 'package.xml') && + !is_file($where . DIRECTORY_SEPARATOR . 'package.xml')) { + return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: unable to save package.xml as' . + ' "' . $where . DIRECTORY_SEPARATOR . 'package.xml"'); + } + if (!$this->_packagefile->validate(PEAR_VALIDATE_PACKAGING)) { + return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: invalid package file'); + } + $pkginfo = $this->_packagefile->getArray(); + $ext = $compress ? '.tgz' : '.tar'; + $pkgver = $pkginfo['package'] . '-' . $pkginfo['version']; + $dest_package = getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext; + if (file_exists(getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext) && + !is_file(getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext)) { + return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: cannot create tgz file "' . + getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext . '"'); + } + if ($pkgfile = $this->_packagefile->getPackageFile()) { + $pkgdir = dirname(realpath($pkgfile)); + $pkgfile = basename($pkgfile); + } else { + return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: package file object must ' . + 'be created from a real file'); + } + // {{{ Create the package file list + $filelist = array(); + $i = 0; + + foreach ($this->_packagefile->getFilelist() as $fname => $atts) { + $file = $pkgdir . DIRECTORY_SEPARATOR . $fname; + if (!file_exists($file)) { + return PEAR::raiseError("File does not exist: $fname"); + } else { + $filelist[$i++] = $file; + if (!isset($atts['md5sum'])) { + $this->_packagefile->setFileAttribute($fname, 'md5sum', md5_file($file)); + } + $packager->log(2, "Adding file $fname"); + } + } + // }}} + $packagexml = $this->toPackageFile($where, PEAR_VALIDATE_PACKAGING, 'package.xml', true); + if ($packagexml) { + $tar =& new Archive_Tar($dest_package, $compress); + $tar->setErrorHandling(PEAR_ERROR_RETURN); // XXX Don't print errors + // ----- Creates with the package.xml file + $ok = $tar->createModify(array($packagexml), '', $where); + if (PEAR::isError($ok)) { + return $ok; + } elseif (!$ok) { + return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: tarball creation failed'); + } + // ----- Add the content of the package + if (!$tar->addModify($filelist, $pkgver, $pkgdir)) { + return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: tarball creation failed'); + } + return $dest_package; + } + } + + /** + * @param string|null directory to place the package.xml in, or null for a temporary dir + * @param int one of the PEAR_VALIDATE_* constants + * @param string name of the generated file + * @param bool if true, then no analysis will be performed on role="php" files + * @return string|PEAR_Error path to the created file on success + */ + function toPackageFile($where = null, $state = PEAR_VALIDATE_NORMAL, $name = 'package.xml', + $nofilechecking = false) + { + if (!$this->_packagefile->validate($state, $nofilechecking)) { + return PEAR::raiseError('PEAR_Packagefile_v1::toPackageFile: invalid package.xml', + null, null, null, $this->_packagefile->getValidationWarnings()); + } + if ($where === null) { + if (!($where = System::mktemp(array('-d')))) { + return PEAR::raiseError('PEAR_Packagefile_v1::toPackageFile: mktemp failed'); + } + } elseif (!@System::mkDir(array('-p', $where))) { + return PEAR::raiseError('PEAR_Packagefile_v1::toPackageFile: "' . $where . '" could' . + ' not be created'); + } + $newpkgfile = $where . DIRECTORY_SEPARATOR . $name; + $np = @fopen($newpkgfile, 'wb'); + if (!$np) { + return PEAR::raiseError('PEAR_Packagefile_v1::toPackageFile: unable to save ' . + "$name as $newpkgfile"); + } + fwrite($np, $this->toXml($state, true)); + fclose($np); + return $newpkgfile; + } + + /** + * fix both XML encoding to be UTF8, and replace standard XML entities < > " & ' + * + * @param string $string + * @return string + * @access private + */ + function _fixXmlEncoding($string) + { + if (version_compare(phpversion(), '5.0.0', 'lt')) { + $string = utf8_encode($string); + } + return strtr($string, array( + '&' => '&', + '>' => '>', + '<' => '<', + '"' => '"', + '\'' => ''' )); + } + + /** + * Return an XML document based on the package info (as returned + * by the PEAR_Common::infoFrom* methods). + * + * @return string XML data + */ + function toXml($state = PEAR_VALIDATE_NORMAL, $nofilevalidation = false) + { + $this->_packagefile->setDate(date('Y-m-d')); + if (!$this->_packagefile->validate($state, $nofilevalidation)) { + return false; + } + $pkginfo = $this->_packagefile->getArray(); + static $maint_map = array( + "handle" => "user", + "name" => "name", + "email" => "email", + "role" => "role", + ); + $ret = "\n"; + $ret .= "\n"; + $ret .= "\n" . +" $pkginfo[package]"; + if (isset($pkginfo['extends'])) { + $ret .= "\n$pkginfo[extends]"; + } + $ret .= + "\n ".$this->_fixXmlEncoding($pkginfo['summary'])."\n" . +" ".trim($this->_fixXmlEncoding($pkginfo['description']))."\n \n" . +" \n"; + foreach ($pkginfo['maintainers'] as $maint) { + $ret .= " \n"; + foreach ($maint_map as $idx => $elm) { + $ret .= " <$elm>"; + $ret .= $this->_fixXmlEncoding($maint[$idx]); + $ret .= "\n"; + } + $ret .= " \n"; + } + $ret .= " \n"; + $ret .= $this->_makeReleaseXml($pkginfo, false, $state); + if (isset($pkginfo['changelog']) && count($pkginfo['changelog']) > 0) { + $ret .= " \n"; + foreach ($pkginfo['changelog'] as $oldrelease) { + $ret .= $this->_makeReleaseXml($oldrelease, true); + } + $ret .= " \n"; + } + $ret .= "\n"; + return $ret; + } + + // }}} + // {{{ _makeReleaseXml() + + /** + * Generate part of an XML description with release information. + * + * @param array $pkginfo array with release information + * @param bool $changelog whether the result will be in a changelog element + * + * @return string XML data + * + * @access private + */ + function _makeReleaseXml($pkginfo, $changelog = false, $state = PEAR_VALIDATE_NORMAL) + { + // XXX QUOTE ENTITIES IN PCDATA, OR EMBED IN CDATA BLOCKS!! + $indent = $changelog ? " " : ""; + $ret = "$indent \n"; + if (!empty($pkginfo['version'])) { + $ret .= "$indent $pkginfo[version]\n"; + } + if (!empty($pkginfo['release_date'])) { + $ret .= "$indent $pkginfo[release_date]\n"; + } + if (!empty($pkginfo['release_license'])) { + $ret .= "$indent $pkginfo[release_license]\n"; + } + if (!empty($pkginfo['release_state'])) { + $ret .= "$indent $pkginfo[release_state]\n"; + } + if (!empty($pkginfo['release_notes'])) { + $ret .= "$indent ".trim($this->_fixXmlEncoding($pkginfo['release_notes'])) + ."\n$indent \n"; + } + if (!empty($pkginfo['release_warnings'])) { + $ret .= "$indent ".$this->_fixXmlEncoding($pkginfo['release_warnings'])."\n"; + } + if (isset($pkginfo['release_deps']) && sizeof($pkginfo['release_deps']) > 0) { + $ret .= "$indent \n"; + foreach ($pkginfo['release_deps'] as $dep) { + $ret .= "$indent _fixXmlEncoding($c['name']) . "\""; + if (isset($c['default'])) { + $ret .= " default=\"" . $this->_fixXmlEncoding($c['default']) . "\""; + } + $ret .= " prompt=\"" . $this->_fixXmlEncoding($c['prompt']) . "\""; + $ret .= "/>\n"; + } + $ret .= "$indent \n"; + } + if (isset($pkginfo['provides'])) { + foreach ($pkginfo['provides'] as $key => $what) { + $ret .= "$indent recursiveXmlFilelist($pkginfo['filelist']); + } else { + foreach ($pkginfo['filelist'] as $file => $fa) { + if (!isset($fa['role'])) { + $fa['role'] = ''; + } + $ret .= "$indent _fixXmlEncoding($fa['baseinstalldir']) . '"'; + } + if (isset($fa['md5sum'])) { + $ret .= " md5sum=\"$fa[md5sum]\""; + } + if (isset($fa['platform'])) { + $ret .= " platform=\"$fa[platform]\""; + } + if (!empty($fa['install-as'])) { + $ret .= ' install-as="' . + $this->_fixXmlEncoding($fa['install-as']) . '"'; + } + $ret .= ' name="' . $this->_fixXmlEncoding($file) . '"'; + if (empty($fa['replacements'])) { + $ret .= "/>\n"; + } else { + $ret .= ">\n"; + foreach ($fa['replacements'] as $r) { + $ret .= "$indent $v) { + $ret .= " $k=\"" . $this->_fixXmlEncoding($v) .'"'; + } + $ret .= "/>\n"; + } + $ret .= "$indent \n"; + } + } + } + $ret .= "$indent \n"; + } + $ret .= "$indent \n"; + return $ret; + } + + /** + * @param array + * @access protected + */ + function recursiveXmlFilelist($list) + { + $this->_dirs = array(); + foreach ($list as $file => $attributes) { + $this->_addDir($this->_dirs, explode('/', dirname($file)), $file, $attributes); + } + return $this->_formatDir($this->_dirs); + } + + /** + * @param array + * @param array + * @param string|null + * @param array|null + * @access private + */ + function _addDir(&$dirs, $dir, $file = null, $attributes = null) + { + if ($dir == array() || $dir == array('.')) { + $dirs['files'][basename($file)] = $attributes; + return; + } + $curdir = array_shift($dir); + if (!isset($dirs['dirs'][$curdir])) { + $dirs['dirs'][$curdir] = array(); + } + $this->_addDir($dirs['dirs'][$curdir], $dir, $file, $attributes); + } + + /** + * @param array + * @param string + * @param string + * @access private + */ + function _formatDir($dirs, $indent = '', $curdir = '') + { + $ret = ''; + if (!count($dirs)) { + return ''; + } + if (isset($dirs['dirs'])) { + uksort($dirs['dirs'], 'strnatcasecmp'); + foreach ($dirs['dirs'] as $dir => $contents) { + $usedir = "$curdir/$dir"; + $ret .= "$indent \n"; + $ret .= $this->_formatDir($contents, "$indent ", $usedir); + $ret .= "$indent \n"; + } + } + if (isset($dirs['files'])) { + uksort($dirs['files'], 'strnatcasecmp'); + foreach ($dirs['files'] as $file => $attribs) { + $ret .= $this->_formatFile($file, $attribs, $indent); + } + } + return $ret; + } + + /** + * @param string + * @param array + * @param string + * @access private + */ + function _formatFile($file, $attributes, $indent) + { + $ret = "$indent _fixXmlEncoding($attributes['baseinstalldir']) . '"'; + } + if (isset($attributes['md5sum'])) { + $ret .= " md5sum=\"$attributes[md5sum]\""; + } + if (isset($attributes['platform'])) { + $ret .= " platform=\"$attributes[platform]\""; + } + if (!empty($attributes['install-as'])) { + $ret .= ' install-as="' . + $this->_fixXmlEncoding($attributes['install-as']) . '"'; + } + $ret .= ' name="' . $this->_fixXmlEncoding($file) . '"'; + if (empty($attributes['replacements'])) { + $ret .= "/>\n"; + } else { + $ret .= ">\n"; + foreach ($attributes['replacements'] as $r) { + $ret .= "$indent $v) { + $ret .= " $k=\"" . $this->_fixXmlEncoding($v) .'"'; + } + $ret .= "/>\n"; + } + $ret .= "$indent \n"; + } + return $ret; + } + + // {{{ _unIndent() + + /** + * Unindent given string (?) + * + * @param string $str The string that has to be unindented. + * @return string + * @access private + */ + function _unIndent($str) + { + // remove leading newlines + $str = preg_replace('/^[\r\n]+/', '', $str); + // find whitespace at the beginning of the first line + $indent_len = strspn($str, " \t"); + $indent = substr($str, 0, $indent_len); + $data = ''; + // remove the same amount of whitespace from following lines + foreach (explode("\n", $str) as $line) { + if (substr($line, 0, $indent_len) == $indent) { + $data .= substr($line, $indent_len) . "\n"; + } + } + return $data; + } + + /** + * @return array + */ + function dependenciesToV2() + { + $arr = array(); + $this->_convertDependencies2_0($arr); + return $arr['dependencies']; + } + + /** + * Convert a package.xml version 1.0 into version 2.0 + * + * Note that this does a basic conversion, to allow more advanced + * features like bundles and multiple releases + * @param string the classname to instantiate and return. This must be + * PEAR_PackageFile_v2 or a descendant + * @param boolean if true, only valid, deterministic package.xml 1.0 as defined by the + * strictest parameters will be converted + * @return PEAR_PackageFile_v2|PEAR_Error + */ + function &toV2($class = 'PEAR_PackageFile_v2', $strict = false) + { + if ($strict) { + if (!$this->_packagefile->validate()) { + $a = PEAR::raiseError('invalid package.xml version 1.0 cannot be converted' . + ' to version 2.0', null, null, null, + $this->_packagefile->getValidationWarnings(true)); + return $a; + } + } + + $arr = array( + 'attribs' => array( + 'version' => '2.0', + 'xmlns' => 'http://pear.php.net/dtd/package-2.0', + 'xmlns:tasks' => 'http://pear.php.net/dtd/tasks-1.0', + 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', + 'xsi:schemaLocation' => "http://pear.php.net/dtd/tasks-1.0\n" . +"http://pear.php.net/dtd/tasks-1.0.xsd\n" . +"http://pear.php.net/dtd/package-2.0\n" . +'http://pear.php.net/dtd/package-2.0.xsd', + ), + 'name' => $this->_packagefile->getPackage(), + 'channel' => 'pear.php.net', + ); + $arr['summary'] = $this->_packagefile->getSummary(); + $arr['description'] = $this->_packagefile->getDescription(); + $maintainers = $this->_packagefile->getMaintainers(); + foreach ($maintainers as $maintainer) { + if ($maintainer['role'] != 'lead') { + continue; + } + $new = array( + 'name' => $maintainer['name'], + 'user' => $maintainer['handle'], + 'email' => $maintainer['email'], + 'active' => 'yes', + ); + $arr['lead'][] = $new; + } + + if (!isset($arr['lead'])) { // some people... you know? + $arr['lead'] = array( + 'name' => 'unknown', + 'user' => 'unknown', + 'email' => 'noleadmaintainer@example.com', + 'active' => 'no', + ); + } + + if (count($arr['lead']) == 1) { + $arr['lead'] = $arr['lead'][0]; + } + + foreach ($maintainers as $maintainer) { + if ($maintainer['role'] == 'lead') { + continue; + } + $new = array( + 'name' => $maintainer['name'], + 'user' => $maintainer['handle'], + 'email' => $maintainer['email'], + 'active' => 'yes', + ); + $arr[$maintainer['role']][] = $new; + } + + if (isset($arr['developer']) && count($arr['developer']) == 1) { + $arr['developer'] = $arr['developer'][0]; + } + + if (isset($arr['contributor']) && count($arr['contributor']) == 1) { + $arr['contributor'] = $arr['contributor'][0]; + } + + if (isset($arr['helper']) && count($arr['helper']) == 1) { + $arr['helper'] = $arr['helper'][0]; + } + + $arr['date'] = $this->_packagefile->getDate(); + $arr['version'] = + array( + 'release' => $this->_packagefile->getVersion(), + 'api' => $this->_packagefile->getVersion(), + ); + $arr['stability'] = + array( + 'release' => $this->_packagefile->getState(), + 'api' => $this->_packagefile->getState(), + ); + $licensemap = + array( + 'php' => 'http://www.php.net/license', + 'php license' => 'http://www.php.net/license', + 'lgpl' => 'http://www.gnu.org/copyleft/lesser.html', + 'bsd' => 'http://www.opensource.org/licenses/bsd-license.php', + 'bsd style' => 'http://www.opensource.org/licenses/bsd-license.php', + 'bsd-style' => 'http://www.opensource.org/licenses/bsd-license.php', + 'mit' => 'http://www.opensource.org/licenses/mit-license.php', + 'gpl' => 'http://www.gnu.org/copyleft/gpl.html', + 'apache' => 'http://www.opensource.org/licenses/apache2.0.php' + ); + + if (isset($licensemap[strtolower($this->_packagefile->getLicense())])) { + $arr['license'] = array( + 'attribs' => array('uri' => + $licensemap[strtolower($this->_packagefile->getLicense())]), + '_content' => $this->_packagefile->getLicense() + ); + } else { + // don't use bogus uri + $arr['license'] = $this->_packagefile->getLicense(); + } + + $arr['notes'] = $this->_packagefile->getNotes(); + $temp = array(); + $arr['contents'] = $this->_convertFilelist2_0($temp); + $this->_convertDependencies2_0($arr); + $release = ($this->_packagefile->getConfigureOptions() || $this->_isExtension) ? + 'extsrcrelease' : 'phprelease'; + if ($release == 'extsrcrelease') { + $arr['channel'] = 'pecl.php.net'; + $arr['providesextension'] = $arr['name']; // assumption + } + + $arr[$release] = array(); + if ($this->_packagefile->getConfigureOptions()) { + $arr[$release]['configureoption'] = $this->_packagefile->getConfigureOptions(); + foreach ($arr[$release]['configureoption'] as $i => $opt) { + $arr[$release]['configureoption'][$i] = array('attribs' => $opt); + } + if (count($arr[$release]['configureoption']) == 1) { + $arr[$release]['configureoption'] = $arr[$release]['configureoption'][0]; + } + } + + $this->_convertRelease2_0($arr[$release], $temp); + if ($release == 'extsrcrelease' && count($arr[$release]) > 1) { + // multiple extsrcrelease tags added in PEAR 1.4.1 + $arr['dependencies']['required']['pearinstaller']['min'] = '1.4.1'; + } + + if ($cl = $this->_packagefile->getChangelog()) { + foreach ($cl as $release) { + $rel = array(); + $rel['version'] = + array( + 'release' => $release['version'], + 'api' => $release['version'], + ); + if (!isset($release['release_state'])) { + $release['release_state'] = 'stable'; + } + + $rel['stability'] = + array( + 'release' => $release['release_state'], + 'api' => $release['release_state'], + ); + if (isset($release['release_date'])) { + $rel['date'] = $release['release_date']; + } else { + $rel['date'] = date('Y-m-d'); + } + + if (isset($release['release_license'])) { + if (isset($licensemap[strtolower($release['release_license'])])) { + $uri = $licensemap[strtolower($release['release_license'])]; + } else { + $uri = 'http://www.example.com'; + } + $rel['license'] = array( + 'attribs' => array('uri' => $uri), + '_content' => $release['release_license'] + ); + } else { + $rel['license'] = $arr['license']; + } + + if (!isset($release['release_notes'])) { + $release['release_notes'] = 'no release notes'; + } + + $rel['notes'] = $release['release_notes']; + $arr['changelog']['release'][] = $rel; + } + } + + $ret = new $class; + $ret->setConfig($this->_packagefile->_config); + if (isset($this->_packagefile->_logger) && is_object($this->_packagefile->_logger)) { + $ret->setLogger($this->_packagefile->_logger); + } + + $ret->fromArray($arr); + return $ret; + } + + /** + * @param array + * @param bool + * @access private + */ + function _convertDependencies2_0(&$release, $internal = false) + { + $peardep = array('pearinstaller' => + array('min' => '1.4.0b1')); // this is a lot safer + $required = $optional = array(); + $release['dependencies'] = array('required' => array()); + if ($this->_packagefile->hasDeps()) { + foreach ($this->_packagefile->getDeps() as $dep) { + if (!isset($dep['optional']) || $dep['optional'] == 'no') { + $required[] = $dep; + } else { + $optional[] = $dep; + } + } + foreach (array('required', 'optional') as $arr) { + $deps = array(); + foreach ($$arr as $dep) { + // organize deps by dependency type and name + if (!isset($deps[$dep['type']])) { + $deps[$dep['type']] = array(); + } + if (isset($dep['name'])) { + $deps[$dep['type']][$dep['name']][] = $dep; + } else { + $deps[$dep['type']][] = $dep; + } + } + do { + if (isset($deps['php'])) { + $php = array(); + if (count($deps['php']) > 1) { + $php = $this->_processPhpDeps($deps['php']); + } else { + if (!isset($deps['php'][0])) { + list($key, $blah) = each ($deps['php']); // stupid buggy versions + $deps['php'] = array($blah[0]); + } + $php = $this->_processDep($deps['php'][0]); + if (!$php) { + break; // poor mans throw + } + } + $release['dependencies'][$arr]['php'] = $php; + } + } while (false); + do { + if (isset($deps['pkg'])) { + $pkg = array(); + $pkg = $this->_processMultipleDepsName($deps['pkg']); + if (!$pkg) { + break; // poor mans throw + } + $release['dependencies'][$arr]['package'] = $pkg; + } + } while (false); + do { + if (isset($deps['ext'])) { + $pkg = array(); + $pkg = $this->_processMultipleDepsName($deps['ext']); + $release['dependencies'][$arr]['extension'] = $pkg; + } + } while (false); + // skip sapi - it's not supported so nobody will have used it + // skip os - it's not supported in 1.0 + } + } + if (isset($release['dependencies']['required'])) { + $release['dependencies']['required'] = + array_merge($peardep, $release['dependencies']['required']); + } else { + $release['dependencies']['required'] = $peardep; + } + if (!isset($release['dependencies']['required']['php'])) { + $release['dependencies']['required']['php'] = + array('min' => '4.0.0'); + } + $order = array(); + $bewm = $release['dependencies']['required']; + $order['php'] = $bewm['php']; + $order['pearinstaller'] = $bewm['pearinstaller']; + isset($bewm['package']) ? $order['package'] = $bewm['package'] :0; + isset($bewm['extension']) ? $order['extension'] = $bewm['extension'] :0; + $release['dependencies']['required'] = $order; + } + + /** + * @param array + * @access private + */ + function _convertFilelist2_0(&$package) + { + $ret = array('dir' => + array( + 'attribs' => array('name' => '/'), + 'file' => array() + ) + ); + $package['platform'] = + $package['install-as'] = array(); + $this->_isExtension = false; + foreach ($this->_packagefile->getFilelist() as $name => $file) { + $file['name'] = $name; + if (isset($file['role']) && $file['role'] == 'src') { + $this->_isExtension = true; + } + if (isset($file['replacements'])) { + $repl = $file['replacements']; + unset($file['replacements']); + } else { + unset($repl); + } + if (isset($file['install-as'])) { + $package['install-as'][$name] = $file['install-as']; + unset($file['install-as']); + } + if (isset($file['platform'])) { + $package['platform'][$name] = $file['platform']; + unset($file['platform']); + } + $file = array('attribs' => $file); + if (isset($repl)) { + foreach ($repl as $replace ) { + $file['tasks:replace'][] = array('attribs' => $replace); + } + if (count($repl) == 1) { + $file['tasks:replace'] = $file['tasks:replace'][0]; + } + } + $ret['dir']['file'][] = $file; + } + return $ret; + } + + /** + * Post-process special files with install-as/platform attributes and + * make the release tag. + * + * This complex method follows this work-flow to create the release tags: + * + *
        +     * - if any install-as/platform exist, create a generic release and fill it with
        +     *   o  tags for 
        +     *   o  tags for 
        +     *   o  tags for 
        +     *   o  tags for 
        +     * - create a release for each platform encountered and fill with
        +     *   o  tags for 
        +     *   o  tags for 
        +     *   o  tags for 
        +     *   o  tags for 
        +     *   o  tags for 
        +     *   o  tags for 
        +     *   o  tags for 
        +     * 
        + * + * It does this by accessing the $package parameter, which contains an array with + * indices: + * + * - platform: mapping of file => OS the file should be installed on + * - install-as: mapping of file => installed name + * - osmap: mapping of OS => list of files that should be installed + * on that OS + * - notosmap: mapping of OS => list of files that should not be + * installed on that OS + * + * @param array + * @param array + * @access private + */ + function _convertRelease2_0(&$release, $package) + { + //- if any install-as/platform exist, create a generic release and fill it with + if (count($package['platform']) || count($package['install-as'])) { + $generic = array(); + $genericIgnore = array(); + foreach ($package['install-as'] as $file => $as) { + //o tags for + if (!isset($package['platform'][$file])) { + $generic[] = $file; + continue; + } + //o tags for + if (isset($package['platform'][$file]) && + $package['platform'][$file]{0} == '!') { + $generic[] = $file; + continue; + } + //o tags for + if (isset($package['platform'][$file]) && + $package['platform'][$file]{0} != '!') { + $genericIgnore[] = $file; + continue; + } + } + foreach ($package['platform'] as $file => $platform) { + if (isset($package['install-as'][$file])) { + continue; + } + if ($platform{0} != '!') { + //o tags for + $genericIgnore[] = $file; + } + } + if (count($package['platform'])) { + $oses = $notplatform = $platform = array(); + foreach ($package['platform'] as $file => $os) { + // get a list of oses + if ($os{0} == '!') { + if (isset($oses[substr($os, 1)])) { + continue; + } + $oses[substr($os, 1)] = count($oses); + } else { + if (isset($oses[$os])) { + continue; + } + $oses[$os] = count($oses); + } + } + //- create a release for each platform encountered and fill with + foreach ($oses as $os => $releaseNum) { + $release[$releaseNum]['installconditions']['os']['name'] = $os; + $release[$releaseNum]['filelist'] = array('install' => array(), + 'ignore' => array()); + foreach ($package['install-as'] as $file => $as) { + //o tags for + if (!isset($package['platform'][$file])) { + $release[$releaseNum]['filelist']['install'][] = + array( + 'attribs' => array( + 'name' => $file, + 'as' => $as, + ), + ); + continue; + } + //o tags for + // + if (isset($package['platform'][$file]) && + $package['platform'][$file] == $os) { + $release[$releaseNum]['filelist']['install'][] = + array( + 'attribs' => array( + 'name' => $file, + 'as' => $as, + ), + ); + continue; + } + //o tags for + // + if (isset($package['platform'][$file]) && + $package['platform'][$file] != "!$os" && + $package['platform'][$file]{0} == '!') { + $release[$releaseNum]['filelist']['install'][] = + array( + 'attribs' => array( + 'name' => $file, + 'as' => $as, + ), + ); + continue; + } + //o tags for + // + if (isset($package['platform'][$file]) && + $package['platform'][$file] == "!$os") { + $release[$releaseNum]['filelist']['ignore'][] = + array( + 'attribs' => array( + 'name' => $file, + ), + ); + continue; + } + //o tags for + // + if (isset($package['platform'][$file]) && + $package['platform'][$file]{0} != '!' && + $package['platform'][$file] != $os) { + $release[$releaseNum]['filelist']['ignore'][] = + array( + 'attribs' => array( + 'name' => $file, + ), + ); + continue; + } + } + foreach ($package['platform'] as $file => $platform) { + if (isset($package['install-as'][$file])) { + continue; + } + //o tags for + if ($platform == "!$os") { + $release[$releaseNum]['filelist']['ignore'][] = + array( + 'attribs' => array( + 'name' => $file, + ), + ); + continue; + } + //o tags for + if ($platform{0} != '!' && $platform != $os) { + $release[$releaseNum]['filelist']['ignore'][] = + array( + 'attribs' => array( + 'name' => $file, + ), + ); + } + } + if (!count($release[$releaseNum]['filelist']['install'])) { + unset($release[$releaseNum]['filelist']['install']); + } + if (!count($release[$releaseNum]['filelist']['ignore'])) { + unset($release[$releaseNum]['filelist']['ignore']); + } + } + if (count($generic) || count($genericIgnore)) { + $release[count($oses)] = array(); + if (count($generic)) { + foreach ($generic as $file) { + if (isset($package['install-as'][$file])) { + $installas = $package['install-as'][$file]; + } else { + $installas = $file; + } + $release[count($oses)]['filelist']['install'][] = + array( + 'attribs' => array( + 'name' => $file, + 'as' => $installas, + ) + ); + } + } + if (count($genericIgnore)) { + foreach ($genericIgnore as $file) { + $release[count($oses)]['filelist']['ignore'][] = + array( + 'attribs' => array( + 'name' => $file, + ) + ); + } + } + } + // cleanup + foreach ($release as $i => $rel) { + if (isset($rel['filelist']['install']) && + count($rel['filelist']['install']) == 1) { + $release[$i]['filelist']['install'] = + $release[$i]['filelist']['install'][0]; + } + if (isset($rel['filelist']['ignore']) && + count($rel['filelist']['ignore']) == 1) { + $release[$i]['filelist']['ignore'] = + $release[$i]['filelist']['ignore'][0]; + } + } + if (count($release) == 1) { + $release = $release[0]; + } + } else { + // no platform atts, but some install-as atts + foreach ($package['install-as'] as $file => $value) { + $release['filelist']['install'][] = + array( + 'attribs' => array( + 'name' => $file, + 'as' => $value + ) + ); + } + if (count($release['filelist']['install']) == 1) { + $release['filelist']['install'] = $release['filelist']['install'][0]; + } + } + } + } + + /** + * @param array + * @return array + * @access private + */ + function _processDep($dep) + { + if ($dep['type'] == 'php') { + if ($dep['rel'] == 'has') { + // come on - everyone has php! + return false; + } + } + $php = array(); + if ($dep['type'] != 'php') { + $php['name'] = $dep['name']; + if ($dep['type'] == 'pkg') { + $php['channel'] = 'pear.php.net'; + } + } + switch ($dep['rel']) { + case 'gt' : + $php['min'] = $dep['version']; + $php['exclude'] = $dep['version']; + break; + case 'ge' : + if (!isset($dep['version'])) { + if ($dep['type'] == 'php') { + if (isset($dep['name'])) { + $dep['version'] = $dep['name']; + } + } + } + $php['min'] = $dep['version']; + break; + case 'lt' : + $php['max'] = $dep['version']; + $php['exclude'] = $dep['version']; + break; + case 'le' : + $php['max'] = $dep['version']; + break; + case 'eq' : + $php['min'] = $dep['version']; + $php['max'] = $dep['version']; + break; + case 'ne' : + $php['exclude'] = $dep['version']; + break; + case 'not' : + $php['conflicts'] = 'yes'; + break; + } + return $php; + } + + /** + * @param array + * @return array + */ + function _processPhpDeps($deps) + { + $test = array(); + foreach ($deps as $dep) { + $test[] = $this->_processDep($dep); + } + $min = array(); + $max = array(); + foreach ($test as $dep) { + if (!$dep) { + continue; + } + if (isset($dep['min'])) { + $min[$dep['min']] = count($min); + } + if (isset($dep['max'])) { + $max[$dep['max']] = count($max); + } + } + if (count($min) > 0) { + uksort($min, 'version_compare'); + } + if (count($max) > 0) { + uksort($max, 'version_compare'); + } + if (count($min)) { + // get the highest minimum + $min = array_pop($a = array_flip($min)); + } else { + $min = false; + } + if (count($max)) { + // get the lowest maximum + $max = array_shift($a = array_flip($max)); + } else { + $max = false; + } + if ($min) { + $php['min'] = $min; + } + if ($max) { + $php['max'] = $max; + } + $exclude = array(); + foreach ($test as $dep) { + if (!isset($dep['exclude'])) { + continue; + } + $exclude[] = $dep['exclude']; + } + if (count($exclude)) { + $php['exclude'] = $exclude; + } + return $php; + } + + /** + * process multiple dependencies that have a name, like package deps + * @param array + * @return array + * @access private + */ + function _processMultipleDepsName($deps) + { + $ret = $tests = array(); + foreach ($deps as $name => $dep) { + foreach ($dep as $d) { + $tests[$name][] = $this->_processDep($d); + } + } + + foreach ($tests as $name => $test) { + $max = $min = $php = array(); + $php['name'] = $name; + foreach ($test as $dep) { + if (!$dep) { + continue; + } + if (isset($dep['channel'])) { + $php['channel'] = 'pear.php.net'; + } + if (isset($dep['conflicts']) && $dep['conflicts'] == 'yes') { + $php['conflicts'] = 'yes'; + } + if (isset($dep['min'])) { + $min[$dep['min']] = count($min); + } + if (isset($dep['max'])) { + $max[$dep['max']] = count($max); + } + } + if (count($min) > 0) { + uksort($min, 'version_compare'); + } + if (count($max) > 0) { + uksort($max, 'version_compare'); + } + if (count($min)) { + // get the highest minimum + $min = array_pop($a = array_flip($min)); + } else { + $min = false; + } + if (count($max)) { + // get the lowest maximum + $max = array_shift($a = array_flip($max)); + } else { + $max = false; + } + if ($min) { + $php['min'] = $min; + } + if ($max) { + $php['max'] = $max; + } + $exclude = array(); + foreach ($test as $dep) { + if (!isset($dep['exclude'])) { + continue; + } + $exclude[] = $dep['exclude']; + } + if (count($exclude)) { + $php['exclude'] = $exclude; + } + $ret[] = $php; + } + return $ret; + } +} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/PackageFile/Generator/v2.php b/_piecrust/libs/PEAR/PackageFile/Generator/v2.php new file mode 100644 index 0000000..4d202df --- /dev/null +++ b/_piecrust/libs/PEAR/PackageFile/Generator/v2.php @@ -0,0 +1,893 @@ + + * @author Stephan Schmidt (original XML_Serializer code) + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: v2.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ +/** + * file/dir manipulation routines + */ +require_once 'System.php'; +require_once 'XML/Util.php'; + +/** + * This class converts a PEAR_PackageFile_v2 object into any output format. + * + * Supported output formats include array, XML string (using S. Schmidt's + * XML_Serializer, slightly customized) + * @category pear + * @package PEAR + * @author Greg Beaver + * @author Stephan Schmidt (original XML_Serializer code) + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_PackageFile_Generator_v2 +{ + /** + * default options for the serialization + * @access private + * @var array $_defaultOptions + */ + var $_defaultOptions = array( + 'indent' => ' ', // string used for indentation + 'linebreak' => "\n", // string used for newlines + 'typeHints' => false, // automatically add type hin attributes + 'addDecl' => true, // add an XML declaration + 'defaultTagName' => 'XML_Serializer_Tag', // tag used for indexed arrays or invalid names + 'classAsTagName' => false, // use classname for objects in indexed arrays + 'keyAttribute' => '_originalKey', // attribute where original key is stored + 'typeAttribute' => '_type', // attribute for type (only if typeHints => true) + 'classAttribute' => '_class', // attribute for class of objects (only if typeHints => true) + 'scalarAsAttributes' => false, // scalar values (strings, ints,..) will be serialized as attribute + 'prependAttributes' => '', // prepend string for attributes + 'indentAttributes' => false, // indent the attributes, if set to '_auto', it will indent attributes so they all start at the same column + 'mode' => 'simplexml', // use 'simplexml' to use parent name as tagname if transforming an indexed array + 'addDoctype' => false, // add a doctype declaration + 'doctype' => null, // supply a string or an array with id and uri ({@see XML_Util::getDoctypeDeclaration()} + 'rootName' => 'package', // name of the root tag + 'rootAttributes' => array( + 'version' => '2.0', + 'xmlns' => 'http://pear.php.net/dtd/package-2.0', + 'xmlns:tasks' => 'http://pear.php.net/dtd/tasks-1.0', + 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', + 'xsi:schemaLocation' => 'http://pear.php.net/dtd/tasks-1.0 +http://pear.php.net/dtd/tasks-1.0.xsd +http://pear.php.net/dtd/package-2.0 +http://pear.php.net/dtd/package-2.0.xsd', + ), // attributes of the root tag + 'attributesArray' => 'attribs', // all values in this key will be treated as attributes + 'contentName' => '_content', // this value will be used directly as content, instead of creating a new tag, may only be used in conjuction with attributesArray + 'beautifyFilelist' => false, + 'encoding' => 'UTF-8', + ); + + /** + * options for the serialization + * @access private + * @var array $options + */ + var $options = array(); + + /** + * current tag depth + * @var integer $_tagDepth + */ + var $_tagDepth = 0; + + /** + * serilialized representation of the data + * @var string $_serializedData + */ + var $_serializedData = null; + /** + * @var PEAR_PackageFile_v2 + */ + var $_packagefile; + /** + * @param PEAR_PackageFile_v2 + */ + function PEAR_PackageFile_Generator_v2(&$packagefile) + { + $this->_packagefile = &$packagefile; + if (isset($this->_packagefile->encoding)) { + $this->_defaultOptions['encoding'] = $this->_packagefile->encoding; + } + } + + /** + * @return string + */ + function getPackagerVersion() + { + return '1.9.4'; + } + + /** + * @param PEAR_Packager + * @param bool generate a .tgz or a .tar + * @param string|null temporary directory to package in + */ + function toTgz(&$packager, $compress = true, $where = null) + { + $a = null; + return $this->toTgz2($packager, $a, $compress, $where); + } + + /** + * Package up both a package.xml and package2.xml for the same release + * @param PEAR_Packager + * @param PEAR_PackageFile_v1 + * @param bool generate a .tgz or a .tar + * @param string|null temporary directory to package in + */ + function toTgz2(&$packager, &$pf1, $compress = true, $where = null) + { + require_once 'Archive/Tar.php'; + if (!$this->_packagefile->isEquivalent($pf1)) { + return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: "' . + basename($pf1->getPackageFile()) . + '" is not equivalent to "' . basename($this->_packagefile->getPackageFile()) + . '"'); + } + + if ($where === null) { + if (!($where = System::mktemp(array('-d')))) { + return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: mktemp failed'); + } + } elseif (!@System::mkDir(array('-p', $where))) { + return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: "' . $where . '" could' . + ' not be created'); + } + + $file = $where . DIRECTORY_SEPARATOR . 'package.xml'; + if (file_exists($file) && !is_file($file)) { + return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: unable to save package.xml as' . + ' "' . $file .'"'); + } + + if (!$this->_packagefile->validate(PEAR_VALIDATE_PACKAGING)) { + return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: invalid package.xml'); + } + + $ext = $compress ? '.tgz' : '.tar'; + $pkgver = $this->_packagefile->getPackage() . '-' . $this->_packagefile->getVersion(); + $dest_package = getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext; + if (file_exists($dest_package) && !is_file($dest_package)) { + return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: cannot create tgz file "' . + $dest_package . '"'); + } + + $pkgfile = $this->_packagefile->getPackageFile(); + if (!$pkgfile) { + return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: package file object must ' . + 'be created from a real file'); + } + + $pkgdir = dirname(realpath($pkgfile)); + $pkgfile = basename($pkgfile); + + // {{{ Create the package file list + $filelist = array(); + $i = 0; + $this->_packagefile->flattenFilelist(); + $contents = $this->_packagefile->getContents(); + if (isset($contents['bundledpackage'])) { // bundles of packages + $contents = $contents['bundledpackage']; + if (!isset($contents[0])) { + $contents = array($contents); + } + + $packageDir = $where; + foreach ($contents as $i => $package) { + $fname = $package; + $file = $pkgdir . DIRECTORY_SEPARATOR . $fname; + if (!file_exists($file)) { + return $packager->raiseError("File does not exist: $fname"); + } + + $tfile = $packageDir . DIRECTORY_SEPARATOR . $fname; + System::mkdir(array('-p', dirname($tfile))); + copy($file, $tfile); + $filelist[$i++] = $tfile; + $packager->log(2, "Adding package $fname"); + } + } else { // normal packages + $contents = $contents['dir']['file']; + if (!isset($contents[0])) { + $contents = array($contents); + } + + $packageDir = $where; + foreach ($contents as $i => $file) { + $fname = $file['attribs']['name']; + $atts = $file['attribs']; + $orig = $file; + $file = $pkgdir . DIRECTORY_SEPARATOR . $fname; + if (!file_exists($file)) { + return $packager->raiseError("File does not exist: $fname"); + } + + $origperms = fileperms($file); + $tfile = $packageDir . DIRECTORY_SEPARATOR . $fname; + unset($orig['attribs']); + if (count($orig)) { // file with tasks + // run any package-time tasks + $contents = file_get_contents($file); + foreach ($orig as $tag => $raw) { + $tag = str_replace( + array($this->_packagefile->getTasksNs() . ':', '-'), + array('', '_'), $tag); + $task = "PEAR_Task_$tag"; + $task = &new $task($this->_packagefile->_config, + $this->_packagefile->_logger, + PEAR_TASK_PACKAGE); + $task->init($raw, $atts, null); + $res = $task->startSession($this->_packagefile, $contents, $tfile); + if (!$res) { + continue; // skip this task + } + + if (PEAR::isError($res)) { + return $res; + } + + $contents = $res; // save changes + System::mkdir(array('-p', dirname($tfile))); + $wp = fopen($tfile, "wb"); + fwrite($wp, $contents); + fclose($wp); + } + } + + if (!file_exists($tfile)) { + System::mkdir(array('-p', dirname($tfile))); + copy($file, $tfile); + } + + chmod($tfile, $origperms); + $filelist[$i++] = $tfile; + $this->_packagefile->setFileAttribute($fname, 'md5sum', md5_file($tfile), $i - 1); + $packager->log(2, "Adding file $fname"); + } + } + // }}} + + $name = $pf1 !== null ? 'package2.xml' : 'package.xml'; + $packagexml = $this->toPackageFile($where, PEAR_VALIDATE_PACKAGING, $name); + if ($packagexml) { + $tar =& new Archive_Tar($dest_package, $compress); + $tar->setErrorHandling(PEAR_ERROR_RETURN); // XXX Don't print errors + // ----- Creates with the package.xml file + $ok = $tar->createModify(array($packagexml), '', $where); + if (PEAR::isError($ok)) { + return $packager->raiseError($ok); + } elseif (!$ok) { + return $packager->raiseError('PEAR_Packagefile_v2::toTgz(): adding ' . $name . + ' failed'); + } + + // ----- Add the content of the package + if (!$tar->addModify($filelist, $pkgver, $where)) { + return $packager->raiseError( + 'PEAR_Packagefile_v2::toTgz(): tarball creation failed'); + } + + // add the package.xml version 1.0 + if ($pf1 !== null) { + $pfgen = &$pf1->getDefaultGenerator(); + $packagexml1 = $pfgen->toPackageFile($where, PEAR_VALIDATE_PACKAGING, 'package.xml', true); + if (!$tar->addModify(array($packagexml1), '', $where)) { + return $packager->raiseError( + 'PEAR_Packagefile_v2::toTgz(): adding package.xml failed'); + } + } + + return $dest_package; + } + } + + function toPackageFile($where = null, $state = PEAR_VALIDATE_NORMAL, $name = 'package.xml') + { + if (!$this->_packagefile->validate($state)) { + return PEAR::raiseError('PEAR_Packagefile_v2::toPackageFile: invalid package.xml', + null, null, null, $this->_packagefile->getValidationWarnings()); + } + + if ($where === null) { + if (!($where = System::mktemp(array('-d')))) { + return PEAR::raiseError('PEAR_Packagefile_v2::toPackageFile: mktemp failed'); + } + } elseif (!@System::mkDir(array('-p', $where))) { + return PEAR::raiseError('PEAR_Packagefile_v2::toPackageFile: "' . $where . '" could' . + ' not be created'); + } + + $newpkgfile = $where . DIRECTORY_SEPARATOR . $name; + $np = @fopen($newpkgfile, 'wb'); + if (!$np) { + return PEAR::raiseError('PEAR_Packagefile_v2::toPackageFile: unable to save ' . + "$name as $newpkgfile"); + } + fwrite($np, $this->toXml($state)); + fclose($np); + return $newpkgfile; + } + + function &toV2() + { + return $this->_packagefile; + } + + /** + * Return an XML document based on the package info (as returned + * by the PEAR_Common::infoFrom* methods). + * + * @return string XML data + */ + function toXml($state = PEAR_VALIDATE_NORMAL, $options = array()) + { + $this->_packagefile->setDate(date('Y-m-d')); + $this->_packagefile->setTime(date('H:i:s')); + if (!$this->_packagefile->validate($state)) { + return false; + } + + if (is_array($options)) { + $this->options = array_merge($this->_defaultOptions, $options); + } else { + $this->options = $this->_defaultOptions; + } + + $arr = $this->_packagefile->getArray(); + if (isset($arr['filelist'])) { + unset($arr['filelist']); + } + + if (isset($arr['_lastversion'])) { + unset($arr['_lastversion']); + } + + // Fix the notes a little bit + if (isset($arr['notes'])) { + // This trims out the indenting, needs fixing + $arr['notes'] = "\n" . trim($arr['notes']) . "\n"; + } + + if (isset($arr['changelog']) && !empty($arr['changelog'])) { + // Fix for inconsistency how the array is filled depending on the changelog release amount + if (!isset($arr['changelog']['release'][0])) { + $release = $arr['changelog']['release']; + unset($arr['changelog']['release']); + + $arr['changelog']['release'] = array(); + $arr['changelog']['release'][0] = $release; + } + + foreach (array_keys($arr['changelog']['release']) as $key) { + $c =& $arr['changelog']['release'][$key]; + if (isset($c['notes'])) { + // This trims out the indenting, needs fixing + $c['notes'] = "\n" . trim($c['notes']) . "\n"; + } + } + } + + if ($state ^ PEAR_VALIDATE_PACKAGING && !isset($arr['bundle'])) { + $use = $this->_recursiveXmlFilelist($arr['contents']['dir']['file']); + unset($arr['contents']['dir']['file']); + if (isset($use['dir'])) { + $arr['contents']['dir']['dir'] = $use['dir']; + } + if (isset($use['file'])) { + $arr['contents']['dir']['file'] = $use['file']; + } + $this->options['beautifyFilelist'] = true; + } + + $arr['attribs']['packagerversion'] = '1.9.4'; + if ($this->serialize($arr, $options)) { + return $this->_serializedData . "\n"; + } + + return false; + } + + + function _recursiveXmlFilelist($list) + { + $dirs = array(); + if (isset($list['attribs'])) { + $file = $list['attribs']['name']; + unset($list['attribs']['name']); + $attributes = $list['attribs']; + $this->_addDir($dirs, explode('/', dirname($file)), $file, $attributes); + } else { + foreach ($list as $a) { + $file = $a['attribs']['name']; + $attributes = $a['attribs']; + unset($a['attribs']); + $this->_addDir($dirs, explode('/', dirname($file)), $file, $attributes, $a); + } + } + $this->_formatDir($dirs); + $this->_deFormat($dirs); + return $dirs; + } + + function _addDir(&$dirs, $dir, $file = null, $attributes = null, $tasks = null) + { + if (!$tasks) { + $tasks = array(); + } + if ($dir == array() || $dir == array('.')) { + $dirs['file'][basename($file)] = $tasks; + $attributes['name'] = basename($file); + $dirs['file'][basename($file)]['attribs'] = $attributes; + return; + } + $curdir = array_shift($dir); + if (!isset($dirs['dir'][$curdir])) { + $dirs['dir'][$curdir] = array(); + } + $this->_addDir($dirs['dir'][$curdir], $dir, $file, $attributes, $tasks); + } + + function _formatDir(&$dirs) + { + if (!count($dirs)) { + return array(); + } + $newdirs = array(); + if (isset($dirs['dir'])) { + $newdirs['dir'] = $dirs['dir']; + } + if (isset($dirs['file'])) { + $newdirs['file'] = $dirs['file']; + } + $dirs = $newdirs; + if (isset($dirs['dir'])) { + uksort($dirs['dir'], 'strnatcasecmp'); + foreach ($dirs['dir'] as $dir => $contents) { + $this->_formatDir($dirs['dir'][$dir]); + } + } + if (isset($dirs['file'])) { + uksort($dirs['file'], 'strnatcasecmp'); + }; + } + + function _deFormat(&$dirs) + { + if (!count($dirs)) { + return array(); + } + $newdirs = array(); + if (isset($dirs['dir'])) { + foreach ($dirs['dir'] as $dir => $contents) { + $newdir = array(); + $newdir['attribs']['name'] = $dir; + $this->_deFormat($contents); + foreach ($contents as $tag => $val) { + $newdir[$tag] = $val; + } + $newdirs['dir'][] = $newdir; + } + if (count($newdirs['dir']) == 1) { + $newdirs['dir'] = $newdirs['dir'][0]; + } + } + if (isset($dirs['file'])) { + foreach ($dirs['file'] as $name => $file) { + $newdirs['file'][] = $file; + } + if (count($newdirs['file']) == 1) { + $newdirs['file'] = $newdirs['file'][0]; + } + } + $dirs = $newdirs; + } + + /** + * reset all options to default options + * + * @access public + * @see setOption(), XML_Unserializer() + */ + function resetOptions() + { + $this->options = $this->_defaultOptions; + } + + /** + * set an option + * + * You can use this method if you do not want to set all options in the constructor + * + * @access public + * @see resetOption(), XML_Serializer() + */ + function setOption($name, $value) + { + $this->options[$name] = $value; + } + + /** + * sets several options at once + * + * You can use this method if you do not want to set all options in the constructor + * + * @access public + * @see resetOption(), XML_Unserializer(), setOption() + */ + function setOptions($options) + { + $this->options = array_merge($this->options, $options); + } + + /** + * serialize data + * + * @access public + * @param mixed $data data to serialize + * @return boolean true on success, pear error on failure + */ + function serialize($data, $options = null) + { + // if options have been specified, use them instead + // of the previously defined ones + if (is_array($options)) { + $optionsBak = $this->options; + if (isset($options['overrideOptions']) && $options['overrideOptions'] == true) { + $this->options = array_merge($this->_defaultOptions, $options); + } else { + $this->options = array_merge($this->options, $options); + } + } else { + $optionsBak = null; + } + + // start depth is zero + $this->_tagDepth = 0; + $this->_serializedData = ''; + // serialize an array + if (is_array($data)) { + $tagName = isset($this->options['rootName']) ? $this->options['rootName'] : 'array'; + $this->_serializedData .= $this->_serializeArray($data, $tagName, $this->options['rootAttributes']); + } + + // add doctype declaration + if ($this->options['addDoctype'] === true) { + $this->_serializedData = XML_Util::getDoctypeDeclaration($tagName, $this->options['doctype']) + . $this->options['linebreak'] + . $this->_serializedData; + } + + // build xml declaration + if ($this->options['addDecl']) { + $atts = array(); + $encoding = isset($this->options['encoding']) ? $this->options['encoding'] : null; + $this->_serializedData = XML_Util::getXMLDeclaration('1.0', $encoding) + . $this->options['linebreak'] + . $this->_serializedData; + } + + + if ($optionsBak !== null) { + $this->options = $optionsBak; + } + + return true; + } + + /** + * get the result of the serialization + * + * @access public + * @return string serialized XML + */ + function getSerializedData() + { + if ($this->_serializedData === null) { + return $this->raiseError('No serialized data available. Use XML_Serializer::serialize() first.', XML_SERIALIZER_ERROR_NO_SERIALIZATION); + } + return $this->_serializedData; + } + + /** + * serialize any value + * + * This method checks for the type of the value and calls the appropriate method + * + * @access private + * @param mixed $value + * @param string $tagName + * @param array $attributes + * @return string + */ + function _serializeValue($value, $tagName = null, $attributes = array()) + { + if (is_array($value)) { + $xml = $this->_serializeArray($value, $tagName, $attributes); + } elseif (is_object($value)) { + $xml = $this->_serializeObject($value, $tagName); + } else { + $tag = array( + 'qname' => $tagName, + 'attributes' => $attributes, + 'content' => $value + ); + $xml = $this->_createXMLTag($tag); + } + return $xml; + } + + /** + * serialize an array + * + * @access private + * @param array $array array to serialize + * @param string $tagName name of the root tag + * @param array $attributes attributes for the root tag + * @return string $string serialized data + * @uses XML_Util::isValidName() to check, whether key has to be substituted + */ + function _serializeArray(&$array, $tagName = null, $attributes = array()) + { + $_content = null; + + /** + * check for special attributes + */ + if ($this->options['attributesArray'] !== null) { + if (isset($array[$this->options['attributesArray']])) { + $attributes = $array[$this->options['attributesArray']]; + unset($array[$this->options['attributesArray']]); + } + /** + * check for special content + */ + if ($this->options['contentName'] !== null) { + if (isset($array[$this->options['contentName']])) { + $_content = $array[$this->options['contentName']]; + unset($array[$this->options['contentName']]); + } + } + } + + /* + * if mode is set to simpleXML, check whether + * the array is associative or indexed + */ + if (is_array($array) && $this->options['mode'] == 'simplexml') { + $indexed = true; + if (!count($array)) { + $indexed = false; + } + foreach ($array as $key => $val) { + if (!is_int($key)) { + $indexed = false; + break; + } + } + + if ($indexed && $this->options['mode'] == 'simplexml') { + $string = ''; + foreach ($array as $key => $val) { + if ($this->options['beautifyFilelist'] && $tagName == 'dir') { + if (!isset($this->_curdir)) { + $this->_curdir = ''; + } + $savedir = $this->_curdir; + if (isset($val['attribs'])) { + if ($val['attribs']['name'] == '/') { + $this->_curdir = '/'; + } else { + if ($this->_curdir == '/') { + $this->_curdir = ''; + } + $this->_curdir .= '/' . $val['attribs']['name']; + } + } + } + $string .= $this->_serializeValue( $val, $tagName, $attributes); + if ($this->options['beautifyFilelist'] && $tagName == 'dir') { + $string .= ' '; + if (empty($savedir)) { + unset($this->_curdir); + } else { + $this->_curdir = $savedir; + } + } + + $string .= $this->options['linebreak']; + // do indentation + if ($this->options['indent'] !== null && $this->_tagDepth > 0) { + $string .= str_repeat($this->options['indent'], $this->_tagDepth); + } + } + return rtrim($string); + } + } + + if ($this->options['scalarAsAttributes'] === true) { + foreach ($array as $key => $value) { + if (is_scalar($value) && (XML_Util::isValidName($key) === true)) { + unset($array[$key]); + $attributes[$this->options['prependAttributes'].$key] = $value; + } + } + } + + // check for empty array => create empty tag + if (empty($array)) { + $tag = array( + 'qname' => $tagName, + 'content' => $_content, + 'attributes' => $attributes + ); + + } else { + $this->_tagDepth++; + $tmp = $this->options['linebreak']; + foreach ($array as $key => $value) { + // do indentation + if ($this->options['indent'] !== null && $this->_tagDepth > 0) { + $tmp .= str_repeat($this->options['indent'], $this->_tagDepth); + } + + // copy key + $origKey = $key; + // key cannot be used as tagname => use default tag + $valid = XML_Util::isValidName($key); + if (PEAR::isError($valid)) { + if ($this->options['classAsTagName'] && is_object($value)) { + $key = get_class($value); + } else { + $key = $this->options['defaultTagName']; + } + } + $atts = array(); + if ($this->options['typeHints'] === true) { + $atts[$this->options['typeAttribute']] = gettype($value); + if ($key !== $origKey) { + $atts[$this->options['keyAttribute']] = (string)$origKey; + } + + } + if ($this->options['beautifyFilelist'] && $key == 'dir') { + if (!isset($this->_curdir)) { + $this->_curdir = ''; + } + $savedir = $this->_curdir; + if (isset($value['attribs'])) { + if ($value['attribs']['name'] == '/') { + $this->_curdir = '/'; + } else { + $this->_curdir .= '/' . $value['attribs']['name']; + } + } + } + + if (is_string($value) && $value && ($value{strlen($value) - 1} == "\n")) { + $value .= str_repeat($this->options['indent'], $this->_tagDepth); + } + $tmp .= $this->_createXMLTag(array( + 'qname' => $key, + 'attributes' => $atts, + 'content' => $value ) + ); + if ($this->options['beautifyFilelist'] && $key == 'dir') { + if (isset($value['attribs'])) { + $tmp .= ' '; + if (empty($savedir)) { + unset($this->_curdir); + } else { + $this->_curdir = $savedir; + } + } + } + $tmp .= $this->options['linebreak']; + } + + $this->_tagDepth--; + if ($this->options['indent']!==null && $this->_tagDepth>0) { + $tmp .= str_repeat($this->options['indent'], $this->_tagDepth); + } + + if (trim($tmp) === '') { + $tmp = null; + } + + $tag = array( + 'qname' => $tagName, + 'content' => $tmp, + 'attributes' => $attributes + ); + } + if ($this->options['typeHints'] === true) { + if (!isset($tag['attributes'][$this->options['typeAttribute']])) { + $tag['attributes'][$this->options['typeAttribute']] = 'array'; + } + } + + $string = $this->_createXMLTag($tag, false); + return $string; + } + + /** + * create a tag from an array + * this method awaits an array in the following format + * array( + * 'qname' => $tagName, + * 'attributes' => array(), + * 'content' => $content, // optional + * 'namespace' => $namespace // optional + * 'namespaceUri' => $namespaceUri // optional + * ) + * + * @access private + * @param array $tag tag definition + * @param boolean $replaceEntities whether to replace XML entities in content or not + * @return string $string XML tag + */ + function _createXMLTag($tag, $replaceEntities = true) + { + if ($this->options['indentAttributes'] !== false) { + $multiline = true; + $indent = str_repeat($this->options['indent'], $this->_tagDepth); + + if ($this->options['indentAttributes'] == '_auto') { + $indent .= str_repeat(' ', (strlen($tag['qname'])+2)); + + } else { + $indent .= $this->options['indentAttributes']; + } + } else { + $indent = $multiline = false; + } + + if (is_array($tag['content'])) { + if (empty($tag['content'])) { + $tag['content'] = ''; + } + } elseif(is_scalar($tag['content']) && (string)$tag['content'] == '') { + $tag['content'] = ''; + } + + if (is_scalar($tag['content']) || is_null($tag['content'])) { + if ($this->options['encoding'] == 'UTF-8' && + version_compare(phpversion(), '5.0.0', 'lt') + ) { + $tag['content'] = utf8_encode($tag['content']); + } + + if ($replaceEntities === true) { + $replaceEntities = XML_UTIL_ENTITIES_XML; + } + + $tag = XML_Util::createTagFromArray($tag, $replaceEntities, $multiline, $indent, $this->options['linebreak']); + } elseif (is_array($tag['content'])) { + $tag = $this->_serializeArray($tag['content'], $tag['qname'], $tag['attributes']); + } elseif (is_object($tag['content'])) { + $tag = $this->_serializeObject($tag['content'], $tag['qname'], $tag['attributes']); + } elseif (is_resource($tag['content'])) { + settype($tag['content'], 'string'); + $tag = XML_Util::createTagFromArray($tag, $replaceEntities); + } + return $tag; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/PackageFile/Parser/v1.php b/_piecrust/libs/PEAR/PackageFile/Parser/v1.php new file mode 100644 index 0000000..23395dc --- /dev/null +++ b/_piecrust/libs/PEAR/PackageFile/Parser/v1.php @@ -0,0 +1,459 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: v1.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ +/** + * package.xml abstraction class + */ +require_once 'PEAR/PackageFile/v1.php'; +/** + * Parser for package.xml version 1.0 + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: @PEAR-VER@ + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_PackageFile_Parser_v1 +{ + var $_registry; + var $_config; + var $_logger; + /** + * BC hack to allow PEAR_Common::infoFromString() to sort of + * work with the version 2.0 format - there's no filelist though + * @param PEAR_PackageFile_v2 + */ + function fromV2($packagefile) + { + $info = $packagefile->getArray(true); + $ret = new PEAR_PackageFile_v1; + $ret->fromArray($info['old']); + } + + function setConfig(&$c) + { + $this->_config = &$c; + $this->_registry = &$c->getRegistry(); + } + + function setLogger(&$l) + { + $this->_logger = &$l; + } + + /** + * @param string contents of package.xml file, version 1.0 + * @return bool success of parsing + */ + function &parse($data, $file, $archive = false) + { + if (!extension_loaded('xml')) { + return PEAR::raiseError('Cannot create xml parser for parsing package.xml, no xml extension'); + } + $xp = xml_parser_create(); + if (!$xp) { + $a = &PEAR::raiseError('Cannot create xml parser for parsing package.xml'); + return $a; + } + xml_set_object($xp, $this); + xml_set_element_handler($xp, '_element_start_1_0', '_element_end_1_0'); + xml_set_character_data_handler($xp, '_pkginfo_cdata_1_0'); + xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, false); + + $this->element_stack = array(); + $this->_packageInfo = array('provides' => array()); + $this->current_element = false; + unset($this->dir_install); + $this->_packageInfo['filelist'] = array(); + $this->filelist =& $this->_packageInfo['filelist']; + $this->dir_names = array(); + $this->in_changelog = false; + $this->d_i = 0; + $this->cdata = ''; + $this->_isValid = true; + + if (!xml_parse($xp, $data, 1)) { + $code = xml_get_error_code($xp); + $line = xml_get_current_line_number($xp); + xml_parser_free($xp); + $a = &PEAR::raiseError(sprintf("XML error: %s at line %d", + $str = xml_error_string($code), $line), 2); + return $a; + } + + xml_parser_free($xp); + + $pf = new PEAR_PackageFile_v1; + $pf->setConfig($this->_config); + if (isset($this->_logger)) { + $pf->setLogger($this->_logger); + } + $pf->setPackagefile($file, $archive); + $pf->fromArray($this->_packageInfo); + return $pf; + } + // {{{ _unIndent() + + /** + * Unindent given string + * + * @param string $str The string that has to be unindented. + * @return string + * @access private + */ + function _unIndent($str) + { + // remove leading newlines + $str = preg_replace('/^[\r\n]+/', '', $str); + // find whitespace at the beginning of the first line + $indent_len = strspn($str, " \t"); + $indent = substr($str, 0, $indent_len); + $data = ''; + // remove the same amount of whitespace from following lines + foreach (explode("\n", $str) as $line) { + if (substr($line, 0, $indent_len) == $indent) { + $data .= substr($line, $indent_len) . "\n"; + } elseif (trim(substr($line, 0, $indent_len))) { + $data .= ltrim($line); + } + } + return $data; + } + + // Support for package DTD v1.0: + // {{{ _element_start_1_0() + + /** + * XML parser callback for ending elements. Used for version 1.0 + * packages. + * + * @param resource $xp XML parser resource + * @param string $name name of ending element + * + * @return void + * + * @access private + */ + function _element_start_1_0($xp, $name, $attribs) + { + array_push($this->element_stack, $name); + $this->current_element = $name; + $spos = sizeof($this->element_stack) - 2; + $this->prev_element = ($spos >= 0) ? $this->element_stack[$spos] : ''; + $this->current_attributes = $attribs; + $this->cdata = ''; + switch ($name) { + case 'dir': + if ($this->in_changelog) { + break; + } + if (array_key_exists('name', $attribs) && $attribs['name'] != '/') { + $attribs['name'] = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'), + $attribs['name']); + if (strrpos($attribs['name'], '/') === strlen($attribs['name']) - 1) { + $attribs['name'] = substr($attribs['name'], 0, + strlen($attribs['name']) - 1); + } + if (strpos($attribs['name'], '/') === 0) { + $attribs['name'] = substr($attribs['name'], 1); + } + $this->dir_names[] = $attribs['name']; + } + if (isset($attribs['baseinstalldir'])) { + $this->dir_install = $attribs['baseinstalldir']; + } + if (isset($attribs['role'])) { + $this->dir_role = $attribs['role']; + } + break; + case 'file': + if ($this->in_changelog) { + break; + } + if (isset($attribs['name'])) { + $path = ''; + if (count($this->dir_names)) { + foreach ($this->dir_names as $dir) { + $path .= $dir . '/'; + } + } + $path .= preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'), + $attribs['name']); + unset($attribs['name']); + $this->current_path = $path; + $this->filelist[$path] = $attribs; + // Set the baseinstalldir only if the file don't have this attrib + if (!isset($this->filelist[$path]['baseinstalldir']) && + isset($this->dir_install)) + { + $this->filelist[$path]['baseinstalldir'] = $this->dir_install; + } + // Set the Role + if (!isset($this->filelist[$path]['role']) && isset($this->dir_role)) { + $this->filelist[$path]['role'] = $this->dir_role; + } + } + break; + case 'replace': + if (!$this->in_changelog) { + $this->filelist[$this->current_path]['replacements'][] = $attribs; + } + break; + case 'maintainers': + $this->_packageInfo['maintainers'] = array(); + $this->m_i = 0; // maintainers array index + break; + case 'maintainer': + // compatibility check + if (!isset($this->_packageInfo['maintainers'])) { + $this->_packageInfo['maintainers'] = array(); + $this->m_i = 0; + } + $this->_packageInfo['maintainers'][$this->m_i] = array(); + $this->current_maintainer =& $this->_packageInfo['maintainers'][$this->m_i]; + break; + case 'changelog': + $this->_packageInfo['changelog'] = array(); + $this->c_i = 0; // changelog array index + $this->in_changelog = true; + break; + case 'release': + if ($this->in_changelog) { + $this->_packageInfo['changelog'][$this->c_i] = array(); + $this->current_release = &$this->_packageInfo['changelog'][$this->c_i]; + } else { + $this->current_release = &$this->_packageInfo; + } + break; + case 'deps': + if (!$this->in_changelog) { + $this->_packageInfo['release_deps'] = array(); + } + break; + case 'dep': + // dependencies array index + if (!$this->in_changelog) { + $this->d_i++; + isset($attribs['type']) ? ($attribs['type'] = strtolower($attribs['type'])) : false; + $this->_packageInfo['release_deps'][$this->d_i] = $attribs; + } + break; + case 'configureoptions': + if (!$this->in_changelog) { + $this->_packageInfo['configure_options'] = array(); + } + break; + case 'configureoption': + if (!$this->in_changelog) { + $this->_packageInfo['configure_options'][] = $attribs; + } + break; + case 'provides': + if (empty($attribs['type']) || empty($attribs['name'])) { + break; + } + $attribs['explicit'] = true; + $this->_packageInfo['provides']["$attribs[type];$attribs[name]"] = $attribs; + break; + case 'package' : + if (isset($attribs['version'])) { + $this->_packageInfo['xsdversion'] = trim($attribs['version']); + } else { + $this->_packageInfo['xsdversion'] = '1.0'; + } + if (isset($attribs['packagerversion'])) { + $this->_packageInfo['packagerversion'] = $attribs['packagerversion']; + } + break; + } + } + + // }}} + // {{{ _element_end_1_0() + + /** + * XML parser callback for ending elements. Used for version 1.0 + * packages. + * + * @param resource $xp XML parser resource + * @param string $name name of ending element + * + * @return void + * + * @access private + */ + function _element_end_1_0($xp, $name) + { + $data = trim($this->cdata); + switch ($name) { + case 'name': + switch ($this->prev_element) { + case 'package': + $this->_packageInfo['package'] = $data; + break; + case 'maintainer': + $this->current_maintainer['name'] = $data; + break; + } + break; + case 'extends' : + $this->_packageInfo['extends'] = $data; + break; + case 'summary': + $this->_packageInfo['summary'] = $data; + break; + case 'description': + $data = $this->_unIndent($this->cdata); + $this->_packageInfo['description'] = $data; + break; + case 'user': + $this->current_maintainer['handle'] = $data; + break; + case 'email': + $this->current_maintainer['email'] = $data; + break; + case 'role': + $this->current_maintainer['role'] = $data; + break; + case 'version': + if ($this->in_changelog) { + $this->current_release['version'] = $data; + } else { + $this->_packageInfo['version'] = $data; + } + break; + case 'date': + if ($this->in_changelog) { + $this->current_release['release_date'] = $data; + } else { + $this->_packageInfo['release_date'] = $data; + } + break; + case 'notes': + // try to "de-indent" release notes in case someone + // has been over-indenting their xml ;-) + // Trim only on the right side + $data = rtrim($this->_unIndent($this->cdata)); + if ($this->in_changelog) { + $this->current_release['release_notes'] = $data; + } else { + $this->_packageInfo['release_notes'] = $data; + } + break; + case 'warnings': + if ($this->in_changelog) { + $this->current_release['release_warnings'] = $data; + } else { + $this->_packageInfo['release_warnings'] = $data; + } + break; + case 'state': + if ($this->in_changelog) { + $this->current_release['release_state'] = $data; + } else { + $this->_packageInfo['release_state'] = $data; + } + break; + case 'license': + if ($this->in_changelog) { + $this->current_release['release_license'] = $data; + } else { + $this->_packageInfo['release_license'] = $data; + } + break; + case 'dep': + if ($data && !$this->in_changelog) { + $this->_packageInfo['release_deps'][$this->d_i]['name'] = $data; + } + break; + case 'dir': + if ($this->in_changelog) { + break; + } + array_pop($this->dir_names); + break; + case 'file': + if ($this->in_changelog) { + break; + } + if ($data) { + $path = ''; + if (count($this->dir_names)) { + foreach ($this->dir_names as $dir) { + $path .= $dir . '/'; + } + } + $path .= $data; + $this->filelist[$path] = $this->current_attributes; + // Set the baseinstalldir only if the file don't have this attrib + if (!isset($this->filelist[$path]['baseinstalldir']) && + isset($this->dir_install)) + { + $this->filelist[$path]['baseinstalldir'] = $this->dir_install; + } + // Set the Role + if (!isset($this->filelist[$path]['role']) && isset($this->dir_role)) { + $this->filelist[$path]['role'] = $this->dir_role; + } + } + break; + case 'maintainer': + if (empty($this->_packageInfo['maintainers'][$this->m_i]['role'])) { + $this->_packageInfo['maintainers'][$this->m_i]['role'] = 'lead'; + } + $this->m_i++; + break; + case 'release': + if ($this->in_changelog) { + $this->c_i++; + } + break; + case 'changelog': + $this->in_changelog = false; + break; + } + array_pop($this->element_stack); + $spos = sizeof($this->element_stack) - 1; + $this->current_element = ($spos > 0) ? $this->element_stack[$spos] : ''; + $this->cdata = ''; + } + + // }}} + // {{{ _pkginfo_cdata_1_0() + + /** + * XML parser callback for character data. Used for version 1.0 + * packages. + * + * @param resource $xp XML parser resource + * @param string $name character data + * + * @return void + * + * @access private + */ + function _pkginfo_cdata_1_0($xp, $data) + { + if (isset($this->cdata)) { + $this->cdata .= $data; + } + } + + // }}} +} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/PackageFile/Parser/v2.php b/_piecrust/libs/PEAR/PackageFile/Parser/v2.php new file mode 100644 index 0000000..a3ba706 --- /dev/null +++ b/_piecrust/libs/PEAR/PackageFile/Parser/v2.php @@ -0,0 +1,113 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: v2.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ +/** + * base xml parser class + */ +require_once 'PEAR/XMLParser.php'; +require_once 'PEAR/PackageFile/v2.php'; +/** + * Parser for package.xml version 2.0 + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: @PEAR-VER@ + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_PackageFile_Parser_v2 extends PEAR_XMLParser +{ + var $_config; + var $_logger; + var $_registry; + + function setConfig(&$c) + { + $this->_config = &$c; + $this->_registry = &$c->getRegistry(); + } + + function setLogger(&$l) + { + $this->_logger = &$l; + } + /** + * Unindent given string + * + * @param string $str The string that has to be unindented. + * @return string + * @access private + */ + function _unIndent($str) + { + // remove leading newlines + $str = preg_replace('/^[\r\n]+/', '', $str); + // find whitespace at the beginning of the first line + $indent_len = strspn($str, " \t"); + $indent = substr($str, 0, $indent_len); + $data = ''; + // remove the same amount of whitespace from following lines + foreach (explode("\n", $str) as $line) { + if (substr($line, 0, $indent_len) == $indent) { + $data .= substr($line, $indent_len) . "\n"; + } else { + $data .= $line . "\n"; + } + } + return $data; + } + + /** + * post-process data + * + * @param string $data + * @param string $element element name + */ + function postProcess($data, $element) + { + if ($element == 'notes') { + return trim($this->_unIndent($data)); + } + return trim($data); + } + + /** + * @param string + * @param string file name of the package.xml + * @param string|false name of the archive this package.xml came from, if any + * @param string class name to instantiate and return. This must be PEAR_PackageFile_v2 or + * a subclass + * @return PEAR_PackageFile_v2 + */ + function &parse($data, $file, $archive = false, $class = 'PEAR_PackageFile_v2') + { + if (PEAR::isError($err = parent::parse($data, $file))) { + return $err; + } + + $ret = new $class; + $ret->encoding = $this->encoding; + $ret->setConfig($this->_config); + if (isset($this->_logger)) { + $ret->setLogger($this->_logger); + } + + $ret->fromArray($this->_unserializedData); + $ret->setPackagefile($file, $archive); + return $ret; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/PackageFile/v1.php b/_piecrust/libs/PEAR/PackageFile/v1.php new file mode 100644 index 0000000..43e346b --- /dev/null +++ b/_piecrust/libs/PEAR/PackageFile/v1.php @@ -0,0 +1,1612 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: v1.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ +/** + * For error handling + */ +require_once 'PEAR/ErrorStack.php'; + +/** + * Error code if parsing is attempted with no xml extension + */ +define('PEAR_PACKAGEFILE_ERROR_NO_XML_EXT', 3); + +/** + * Error code if creating the xml parser resource fails + */ +define('PEAR_PACKAGEFILE_ERROR_CANT_MAKE_PARSER', 4); + +/** + * Error code used for all sax xml parsing errors + */ +define('PEAR_PACKAGEFILE_ERROR_PARSER_ERROR', 5); + +/** + * Error code used when there is no name + */ +define('PEAR_PACKAGEFILE_ERROR_NO_NAME', 6); + +/** + * Error code when a package name is not valid + */ +define('PEAR_PACKAGEFILE_ERROR_INVALID_NAME', 7); + +/** + * Error code used when no summary is parsed + */ +define('PEAR_PACKAGEFILE_ERROR_NO_SUMMARY', 8); + +/** + * Error code for summaries that are more than 1 line + */ +define('PEAR_PACKAGEFILE_ERROR_MULTILINE_SUMMARY', 9); + +/** + * Error code used when no description is present + */ +define('PEAR_PACKAGEFILE_ERROR_NO_DESCRIPTION', 10); + +/** + * Error code used when no license is present + */ +define('PEAR_PACKAGEFILE_ERROR_NO_LICENSE', 11); + +/** + * Error code used when a version number is not present + */ +define('PEAR_PACKAGEFILE_ERROR_NO_VERSION', 12); + +/** + * Error code used when a version number is invalid + */ +define('PEAR_PACKAGEFILE_ERROR_INVALID_VERSION', 13); + +/** + * Error code when release state is missing + */ +define('PEAR_PACKAGEFILE_ERROR_NO_STATE', 14); + +/** + * Error code when release state is invalid + */ +define('PEAR_PACKAGEFILE_ERROR_INVALID_STATE', 15); + +/** + * Error code when release state is missing + */ +define('PEAR_PACKAGEFILE_ERROR_NO_DATE', 16); + +/** + * Error code when release state is invalid + */ +define('PEAR_PACKAGEFILE_ERROR_INVALID_DATE', 17); + +/** + * Error code when no release notes are found + */ +define('PEAR_PACKAGEFILE_ERROR_NO_NOTES', 18); + +/** + * Error code when no maintainers are found + */ +define('PEAR_PACKAGEFILE_ERROR_NO_MAINTAINERS', 19); + +/** + * Error code when a maintainer has no handle + */ +define('PEAR_PACKAGEFILE_ERROR_NO_MAINTHANDLE', 20); + +/** + * Error code when a maintainer has no handle + */ +define('PEAR_PACKAGEFILE_ERROR_NO_MAINTROLE', 21); + +/** + * Error code when a maintainer has no name + */ +define('PEAR_PACKAGEFILE_ERROR_NO_MAINTNAME', 22); + +/** + * Error code when a maintainer has no email + */ +define('PEAR_PACKAGEFILE_ERROR_NO_MAINTEMAIL', 23); + +/** + * Error code when a maintainer has no handle + */ +define('PEAR_PACKAGEFILE_ERROR_INVALID_MAINTROLE', 24); + +/** + * Error code when a dependency is not a PHP dependency, but has no name + */ +define('PEAR_PACKAGEFILE_ERROR_NO_DEPNAME', 25); + +/** + * Error code when a dependency has no type (pkg, php, etc.) + */ +define('PEAR_PACKAGEFILE_ERROR_NO_DEPTYPE', 26); + +/** + * Error code when a dependency has no relation (lt, ge, has, etc.) + */ +define('PEAR_PACKAGEFILE_ERROR_NO_DEPREL', 27); + +/** + * Error code when a dependency is not a 'has' relation, but has no version + */ +define('PEAR_PACKAGEFILE_ERROR_NO_DEPVERSION', 28); + +/** + * Error code when a dependency has an invalid relation + */ +define('PEAR_PACKAGEFILE_ERROR_INVALID_DEPREL', 29); + +/** + * Error code when a dependency has an invalid type + */ +define('PEAR_PACKAGEFILE_ERROR_INVALID_DEPTYPE', 30); + +/** + * Error code when a dependency has an invalid optional option + */ +define('PEAR_PACKAGEFILE_ERROR_INVALID_DEPOPTIONAL', 31); + +/** + * Error code when a dependency is a pkg dependency, and has an invalid package name + */ +define('PEAR_PACKAGEFILE_ERROR_INVALID_DEPNAME', 32); + +/** + * Error code when a dependency has a channel="foo" attribute, and foo is not a registered channel + */ +define('PEAR_PACKAGEFILE_ERROR_UNKNOWN_DEPCHANNEL', 33); + +/** + * Error code when rel="has" and version attribute is present. + */ +define('PEAR_PACKAGEFILE_ERROR_DEPVERSION_IGNORED', 34); + +/** + * Error code when type="php" and dependency name is present + */ +define('PEAR_PACKAGEFILE_ERROR_DEPNAME_IGNORED', 35); + +/** + * Error code when a configure option has no name + */ +define('PEAR_PACKAGEFILE_ERROR_NO_CONFNAME', 36); + +/** + * Error code when a configure option has no name + */ +define('PEAR_PACKAGEFILE_ERROR_NO_CONFPROMPT', 37); + +/** + * Error code when a file in the filelist has an invalid role + */ +define('PEAR_PACKAGEFILE_ERROR_INVALID_FILEROLE', 38); + +/** + * Error code when a file in the filelist has no role + */ +define('PEAR_PACKAGEFILE_ERROR_NO_FILEROLE', 39); + +/** + * Error code when analyzing a php source file that has parse errors + */ +define('PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE', 40); + +/** + * Error code when analyzing a php source file reveals a source element + * without a package name prefix + */ +define('PEAR_PACKAGEFILE_ERROR_NO_PNAME_PREFIX', 41); + +/** + * Error code when an unknown channel is specified + */ +define('PEAR_PACKAGEFILE_ERROR_UNKNOWN_CHANNEL', 42); + +/** + * Error code when no files are found in the filelist + */ +define('PEAR_PACKAGEFILE_ERROR_NO_FILES', 43); + +/** + * Error code when a file is not valid php according to _analyzeSourceCode() + */ +define('PEAR_PACKAGEFILE_ERROR_INVALID_FILE', 44); + +/** + * Error code when the channel validator returns an error or warning + */ +define('PEAR_PACKAGEFILE_ERROR_CHANNELVAL', 45); + +/** + * Error code when a php5 package is packaged in php4 (analysis doesn't work) + */ +define('PEAR_PACKAGEFILE_ERROR_PHP5', 46); + +/** + * Error code when a file is listed in package.xml but does not exist + */ +define('PEAR_PACKAGEFILE_ERROR_FILE_NOTFOUND', 47); + +/** + * Error code when a + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_PackageFile_v1 +{ + /** + * @access private + * @var PEAR_ErrorStack + * @access private + */ + var $_stack; + + /** + * A registry object, used to access the package name validation regex for non-standard channels + * @var PEAR_Registry + * @access private + */ + var $_registry; + + /** + * An object that contains a log method that matches PEAR_Common::log's signature + * @var object + * @access private + */ + var $_logger; + + /** + * Parsed package information + * @var array + * @access private + */ + var $_packageInfo; + + /** + * path to package.xml + * @var string + * @access private + */ + var $_packageFile; + + /** + * path to package .tgz or false if this is a local/extracted package.xml + * @var string + * @access private + */ + var $_archiveFile; + + /** + * @var int + * @access private + */ + var $_isValid = 0; + + /** + * Determines whether this packagefile was initialized only with partial package info + * + * If this package file was constructed via parsing REST, it will only contain + * + * - package name + * - channel name + * - dependencies + * @var boolean + * @access private + */ + var $_incomplete = true; + + /** + * @param bool determines whether to return a PEAR_Error object, or use the PEAR_ErrorStack + * @param string Name of Error Stack class to use. + */ + function PEAR_PackageFile_v1() + { + $this->_stack = &new PEAR_ErrorStack('PEAR_PackageFile_v1'); + $this->_stack->setErrorMessageTemplate($this->_getErrorMessage()); + $this->_isValid = 0; + } + + function installBinary($installer) + { + return false; + } + + function isExtension($name) + { + return false; + } + + function setConfig(&$config) + { + $this->_config = &$config; + $this->_registry = &$config->getRegistry(); + } + + function setRequestedGroup() + { + // placeholder + } + + /** + * For saving in the registry. + * + * Set the last version that was installed + * @param string + */ + function setLastInstalledVersion($version) + { + $this->_packageInfo['_lastversion'] = $version; + } + + /** + * @return string|false + */ + function getLastInstalledVersion() + { + if (isset($this->_packageInfo['_lastversion'])) { + return $this->_packageInfo['_lastversion']; + } + return false; + } + + function getInstalledBinary() + { + return false; + } + + function listPostinstallScripts() + { + return false; + } + + function initPostinstallScripts() + { + return false; + } + + function setLogger(&$logger) + { + if ($logger && (!is_object($logger) || !method_exists($logger, 'log'))) { + return PEAR::raiseError('Logger must be compatible with PEAR_Common::log'); + } + $this->_logger = &$logger; + } + + function setPackagefile($file, $archive = false) + { + $this->_packageFile = $file; + $this->_archiveFile = $archive ? $archive : $file; + } + + function getPackageFile() + { + return isset($this->_packageFile) ? $this->_packageFile : false; + } + + function getPackageType() + { + return 'php'; + } + + function getArchiveFile() + { + return $this->_archiveFile; + } + + function packageInfo($field) + { + if (!is_string($field) || empty($field) || + !isset($this->_packageInfo[$field])) { + return false; + } + return $this->_packageInfo[$field]; + } + + function setDirtree($path) + { + if (!isset($this->_packageInfo['dirtree'])) { + $this->_packageInfo['dirtree'] = array(); + } + $this->_packageInfo['dirtree'][$path] = true; + } + + function getDirtree() + { + if (isset($this->_packageInfo['dirtree']) && count($this->_packageInfo['dirtree'])) { + return $this->_packageInfo['dirtree']; + } + return false; + } + + function resetDirtree() + { + unset($this->_packageInfo['dirtree']); + } + + function fromArray($pinfo) + { + $this->_incomplete = false; + $this->_packageInfo = $pinfo; + } + + function isIncomplete() + { + return $this->_incomplete; + } + + function getChannel() + { + return 'pear.php.net'; + } + + function getUri() + { + return false; + } + + function getTime() + { + return false; + } + + function getExtends() + { + if (isset($this->_packageInfo['extends'])) { + return $this->_packageInfo['extends']; + } + return false; + } + + /** + * @return array + */ + function toArray() + { + if (!$this->validate(PEAR_VALIDATE_NORMAL)) { + return false; + } + return $this->getArray(); + } + + function getArray() + { + return $this->_packageInfo; + } + + function getName() + { + return $this->getPackage(); + } + + function getPackage() + { + if (isset($this->_packageInfo['package'])) { + return $this->_packageInfo['package']; + } + return false; + } + + /** + * WARNING - don't use this unless you know what you are doing + */ + function setRawPackage($package) + { + $this->_packageInfo['package'] = $package; + } + + function setPackage($package) + { + $this->_packageInfo['package'] = $package; + $this->_isValid = false; + } + + function getVersion() + { + if (isset($this->_packageInfo['version'])) { + return $this->_packageInfo['version']; + } + return false; + } + + function setVersion($version) + { + $this->_packageInfo['version'] = $version; + $this->_isValid = false; + } + + function clearMaintainers() + { + unset($this->_packageInfo['maintainers']); + } + + function getMaintainers() + { + if (isset($this->_packageInfo['maintainers'])) { + return $this->_packageInfo['maintainers']; + } + return false; + } + + /** + * Adds a new maintainer - no checking of duplicates is performed, use + * updatemaintainer for that purpose. + */ + function addMaintainer($role, $handle, $name, $email) + { + $this->_packageInfo['maintainers'][] = + array('handle' => $handle, 'role' => $role, 'email' => $email, 'name' => $name); + $this->_isValid = false; + } + + function updateMaintainer($role, $handle, $name, $email) + { + $found = false; + if (!isset($this->_packageInfo['maintainers']) || + !is_array($this->_packageInfo['maintainers'])) { + return $this->addMaintainer($role, $handle, $name, $email); + } + foreach ($this->_packageInfo['maintainers'] as $i => $maintainer) { + if ($maintainer['handle'] == $handle) { + $found = $i; + break; + } + } + if ($found !== false) { + unset($this->_packageInfo['maintainers'][$found]); + $this->_packageInfo['maintainers'] = + array_values($this->_packageInfo['maintainers']); + } + $this->addMaintainer($role, $handle, $name, $email); + } + + function deleteMaintainer($handle) + { + $found = false; + foreach ($this->_packageInfo['maintainers'] as $i => $maintainer) { + if ($maintainer['handle'] == $handle) { + $found = $i; + break; + } + } + if ($found !== false) { + unset($this->_packageInfo['maintainers'][$found]); + $this->_packageInfo['maintainers'] = + array_values($this->_packageInfo['maintainers']); + return true; + } + return false; + } + + function getState() + { + if (isset($this->_packageInfo['release_state'])) { + return $this->_packageInfo['release_state']; + } + return false; + } + + function setRawState($state) + { + $this->_packageInfo['release_state'] = $state; + } + + function setState($state) + { + $this->_packageInfo['release_state'] = $state; + $this->_isValid = false; + } + + function getDate() + { + if (isset($this->_packageInfo['release_date'])) { + return $this->_packageInfo['release_date']; + } + return false; + } + + function setDate($date) + { + $this->_packageInfo['release_date'] = $date; + $this->_isValid = false; + } + + function getLicense() + { + if (isset($this->_packageInfo['release_license'])) { + return $this->_packageInfo['release_license']; + } + return false; + } + + function setLicense($date) + { + $this->_packageInfo['release_license'] = $date; + $this->_isValid = false; + } + + function getSummary() + { + if (isset($this->_packageInfo['summary'])) { + return $this->_packageInfo['summary']; + } + return false; + } + + function setSummary($summary) + { + $this->_packageInfo['summary'] = $summary; + $this->_isValid = false; + } + + function getDescription() + { + if (isset($this->_packageInfo['description'])) { + return $this->_packageInfo['description']; + } + return false; + } + + function setDescription($desc) + { + $this->_packageInfo['description'] = $desc; + $this->_isValid = false; + } + + function getNotes() + { + if (isset($this->_packageInfo['release_notes'])) { + return $this->_packageInfo['release_notes']; + } + return false; + } + + function setNotes($notes) + { + $this->_packageInfo['release_notes'] = $notes; + $this->_isValid = false; + } + + function getDeps() + { + if (isset($this->_packageInfo['release_deps'])) { + return $this->_packageInfo['release_deps']; + } + return false; + } + + /** + * Reset dependencies prior to adding new ones + */ + function clearDeps() + { + unset($this->_packageInfo['release_deps']); + } + + function addPhpDep($version, $rel) + { + $this->_isValid = false; + $this->_packageInfo['release_deps'][] = + array('type' => 'php', + 'rel' => $rel, + 'version' => $version); + } + + function addPackageDep($name, $version, $rel, $optional = 'no') + { + $this->_isValid = false; + $dep = + array('type' => 'pkg', + 'name' => $name, + 'rel' => $rel, + 'optional' => $optional); + if ($rel != 'has' && $rel != 'not') { + $dep['version'] = $version; + } + $this->_packageInfo['release_deps'][] = $dep; + } + + function addExtensionDep($name, $version, $rel, $optional = 'no') + { + $this->_isValid = false; + $this->_packageInfo['release_deps'][] = + array('type' => 'ext', + 'name' => $name, + 'rel' => $rel, + 'version' => $version, + 'optional' => $optional); + } + + /** + * WARNING - do not use this function directly unless you know what you're doing + */ + function setDeps($deps) + { + $this->_packageInfo['release_deps'] = $deps; + } + + function hasDeps() + { + return isset($this->_packageInfo['release_deps']) && + count($this->_packageInfo['release_deps']); + } + + function getDependencyGroup($group) + { + return false; + } + + function isCompatible($pf) + { + return false; + } + + function isSubpackageOf($p) + { + return $p->isSubpackage($this); + } + + function isSubpackage($p) + { + return false; + } + + function dependsOn($package, $channel) + { + if (strtolower($channel) != 'pear.php.net') { + return false; + } + if (!($deps = $this->getDeps())) { + return false; + } + foreach ($deps as $dep) { + if ($dep['type'] != 'pkg') { + continue; + } + if (strtolower($dep['name']) == strtolower($package)) { + return true; + } + } + return false; + } + + function getConfigureOptions() + { + if (isset($this->_packageInfo['configure_options'])) { + return $this->_packageInfo['configure_options']; + } + return false; + } + + function hasConfigureOptions() + { + return isset($this->_packageInfo['configure_options']) && + count($this->_packageInfo['configure_options']); + } + + function addConfigureOption($name, $prompt, $default = false) + { + $o = array('name' => $name, 'prompt' => $prompt); + if ($default !== false) { + $o['default'] = $default; + } + if (!isset($this->_packageInfo['configure_options'])) { + $this->_packageInfo['configure_options'] = array(); + } + $this->_packageInfo['configure_options'][] = $o; + } + + function clearConfigureOptions() + { + unset($this->_packageInfo['configure_options']); + } + + function getProvides() + { + if (isset($this->_packageInfo['provides'])) { + return $this->_packageInfo['provides']; + } + return false; + } + + function getProvidesExtension() + { + return false; + } + + function addFile($dir, $file, $attrs) + { + $dir = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'), $dir); + if ($dir == '/' || $dir == '') { + $dir = ''; + } else { + $dir .= '/'; + } + $file = $dir . $file; + $file = preg_replace('![\\/]+!', '/', $file); + $this->_packageInfo['filelist'][$file] = $attrs; + } + + function getInstallationFilelist() + { + return $this->getFilelist(); + } + + function getFilelist() + { + if (isset($this->_packageInfo['filelist'])) { + return $this->_packageInfo['filelist']; + } + return false; + } + + function setFileAttribute($file, $attr, $value) + { + $this->_packageInfo['filelist'][$file][$attr] = $value; + } + + function resetFilelist() + { + $this->_packageInfo['filelist'] = array(); + } + + function setInstalledAs($file, $path) + { + if ($path) { + return $this->_packageInfo['filelist'][$file]['installed_as'] = $path; + } + unset($this->_packageInfo['filelist'][$file]['installed_as']); + } + + function installedFile($file, $atts) + { + if (isset($this->_packageInfo['filelist'][$file])) { + $this->_packageInfo['filelist'][$file] = + array_merge($this->_packageInfo['filelist'][$file], $atts); + } else { + $this->_packageInfo['filelist'][$file] = $atts; + } + } + + function getChangelog() + { + if (isset($this->_packageInfo['changelog'])) { + return $this->_packageInfo['changelog']; + } + return false; + } + + function getPackagexmlVersion() + { + return '1.0'; + } + + /** + * Wrapper to {@link PEAR_ErrorStack::getErrors()} + * @param boolean determines whether to purge the error stack after retrieving + * @return array + */ + function getValidationWarnings($purge = true) + { + return $this->_stack->getErrors($purge); + } + + // }}} + /** + * Validation error. Also marks the object contents as invalid + * @param error code + * @param array error information + * @access private + */ + function _validateError($code, $params = array()) + { + $this->_stack->push($code, 'error', $params, false, false, debug_backtrace()); + $this->_isValid = false; + } + + /** + * Validation warning. Does not mark the object contents invalid. + * @param error code + * @param array error information + * @access private + */ + function _validateWarning($code, $params = array()) + { + $this->_stack->push($code, 'warning', $params, false, false, debug_backtrace()); + } + + /** + * @param integer error code + * @access protected + */ + function _getErrorMessage() + { + return array( + PEAR_PACKAGEFILE_ERROR_NO_NAME => + 'Missing Package Name', + PEAR_PACKAGEFILE_ERROR_NO_SUMMARY => + 'No summary found', + PEAR_PACKAGEFILE_ERROR_MULTILINE_SUMMARY => + 'Summary should be on one line', + PEAR_PACKAGEFILE_ERROR_NO_DESCRIPTION => + 'Missing description', + PEAR_PACKAGEFILE_ERROR_NO_LICENSE => + 'Missing license', + PEAR_PACKAGEFILE_ERROR_NO_VERSION => + 'No release version found', + PEAR_PACKAGEFILE_ERROR_NO_STATE => + 'No release state found', + PEAR_PACKAGEFILE_ERROR_NO_DATE => + 'No release date found', + PEAR_PACKAGEFILE_ERROR_NO_NOTES => + 'No release notes found', + PEAR_PACKAGEFILE_ERROR_NO_LEAD => + 'Package must have at least one lead maintainer', + PEAR_PACKAGEFILE_ERROR_NO_MAINTAINERS => + 'No maintainers found, at least one must be defined', + PEAR_PACKAGEFILE_ERROR_NO_MAINTHANDLE => + 'Maintainer %index% has no handle (user ID at channel server)', + PEAR_PACKAGEFILE_ERROR_NO_MAINTROLE => + 'Maintainer %index% has no role', + PEAR_PACKAGEFILE_ERROR_NO_MAINTNAME => + 'Maintainer %index% has no name', + PEAR_PACKAGEFILE_ERROR_NO_MAINTEMAIL => + 'Maintainer %index% has no email', + PEAR_PACKAGEFILE_ERROR_NO_DEPNAME => + 'Dependency %index% is not a php dependency, and has no name', + PEAR_PACKAGEFILE_ERROR_NO_DEPREL => + 'Dependency %index% has no relation (rel)', + PEAR_PACKAGEFILE_ERROR_NO_DEPTYPE => + 'Dependency %index% has no type', + PEAR_PACKAGEFILE_ERROR_DEPNAME_IGNORED => + 'PHP Dependency %index% has a name attribute of "%name%" which will be' . + ' ignored!', + PEAR_PACKAGEFILE_ERROR_NO_DEPVERSION => + 'Dependency %index% is not a rel="has" or rel="not" dependency, ' . + 'and has no version', + PEAR_PACKAGEFILE_ERROR_NO_DEPPHPVERSION => + 'Dependency %index% is a type="php" dependency, ' . + 'and has no version', + PEAR_PACKAGEFILE_ERROR_DEPVERSION_IGNORED => + 'Dependency %index% is a rel="%rel%" dependency, versioning is ignored', + PEAR_PACKAGEFILE_ERROR_INVALID_DEPOPTIONAL => + 'Dependency %index% has invalid optional value "%opt%", should be yes or no', + PEAR_PACKAGEFILE_PHP_NO_NOT => + 'Dependency %index%: php dependencies cannot use "not" rel, use "ne"' . + ' to exclude specific versions', + PEAR_PACKAGEFILE_ERROR_NO_CONFNAME => + 'Configure Option %index% has no name', + PEAR_PACKAGEFILE_ERROR_NO_CONFPROMPT => + 'Configure Option %index% has no prompt', + PEAR_PACKAGEFILE_ERROR_NO_FILES => + 'No files in section of package.xml', + PEAR_PACKAGEFILE_ERROR_NO_FILEROLE => + 'File "%file%" has no role, expecting one of "%roles%"', + PEAR_PACKAGEFILE_ERROR_INVALID_FILEROLE => + 'File "%file%" has invalid role "%role%", expecting one of "%roles%"', + PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME => + 'File "%file%" cannot start with ".", cannot package or install', + PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE => + 'Parser error: invalid PHP found in file "%file%"', + PEAR_PACKAGEFILE_ERROR_NO_PNAME_PREFIX => + 'in %file%: %type% "%name%" not prefixed with package name "%package%"', + PEAR_PACKAGEFILE_ERROR_INVALID_FILE => + 'Parser error: invalid PHP file "%file%"', + PEAR_PACKAGEFILE_ERROR_CHANNELVAL => + 'Channel validator error: field "%field%" - %reason%', + PEAR_PACKAGEFILE_ERROR_PHP5 => + 'Error, PHP5 token encountered in %file%, analysis should be in PHP5', + PEAR_PACKAGEFILE_ERROR_FILE_NOTFOUND => + 'File "%file%" in package.xml does not exist', + PEAR_PACKAGEFILE_ERROR_NON_ISO_CHARS => + 'Package.xml contains non-ISO-8859-1 characters, and may not validate', + ); + } + + /** + * Validate XML package definition file. + * + * @access public + * @return boolean + */ + function validate($state = PEAR_VALIDATE_NORMAL, $nofilechecking = false) + { + if (($this->_isValid & $state) == $state) { + return true; + } + $this->_isValid = true; + $info = $this->_packageInfo; + if (empty($info['package'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_NAME); + $this->_packageName = $pn = 'unknown'; + } else { + $this->_packageName = $pn = $info['package']; + } + + if (empty($info['summary'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_SUMMARY); + } elseif (strpos(trim($info['summary']), "\n") !== false) { + $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_MULTILINE_SUMMARY, + array('summary' => $info['summary'])); + } + if (empty($info['description'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DESCRIPTION); + } + if (empty($info['release_license'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_LICENSE); + } + if (empty($info['version'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_VERSION); + } + if (empty($info['release_state'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_STATE); + } + if (empty($info['release_date'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DATE); + } + if (empty($info['release_notes'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_NOTES); + } + if (empty($info['maintainers'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTAINERS); + } else { + $haslead = false; + $i = 1; + foreach ($info['maintainers'] as $m) { + if (empty($m['handle'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTHANDLE, + array('index' => $i)); + } + if (empty($m['role'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTROLE, + array('index' => $i, 'roles' => PEAR_Common::getUserRoles())); + } elseif ($m['role'] == 'lead') { + $haslead = true; + } + if (empty($m['name'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTNAME, + array('index' => $i)); + } + if (empty($m['email'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTEMAIL, + array('index' => $i)); + } + $i++; + } + if (!$haslead) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_LEAD); + } + } + if (!empty($info['release_deps'])) { + $i = 1; + foreach ($info['release_deps'] as $d) { + if (!isset($d['type']) || empty($d['type'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPTYPE, + array('index' => $i, 'types' => PEAR_Common::getDependencyTypes())); + continue; + } + if (!isset($d['rel']) || empty($d['rel'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPREL, + array('index' => $i, 'rels' => PEAR_Common::getDependencyRelations())); + continue; + } + if (!empty($d['optional'])) { + if (!in_array($d['optional'], array('yes', 'no'))) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_DEPOPTIONAL, + array('index' => $i, 'opt' => $d['optional'])); + } + } + if ($d['rel'] != 'has' && $d['rel'] != 'not' && empty($d['version'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPVERSION, + array('index' => $i)); + } elseif (($d['rel'] == 'has' || $d['rel'] == 'not') && !empty($d['version'])) { + $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_DEPVERSION_IGNORED, + array('index' => $i, 'rel' => $d['rel'])); + } + if ($d['type'] == 'php' && !empty($d['name'])) { + $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_DEPNAME_IGNORED, + array('index' => $i, 'name' => $d['name'])); + } elseif ($d['type'] != 'php' && empty($d['name'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPNAME, + array('index' => $i)); + } + if ($d['type'] == 'php' && empty($d['version'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPPHPVERSION, + array('index' => $i)); + } + if (($d['rel'] == 'not') && ($d['type'] == 'php')) { + $this->_validateError(PEAR_PACKAGEFILE_PHP_NO_NOT, + array('index' => $i)); + } + $i++; + } + } + if (!empty($info['configure_options'])) { + $i = 1; + foreach ($info['configure_options'] as $c) { + if (empty($c['name'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_CONFNAME, + array('index' => $i)); + } + if (empty($c['prompt'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_CONFPROMPT, + array('index' => $i)); + } + $i++; + } + } + if (empty($info['filelist'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_FILES); + $errors[] = 'no files'; + } else { + foreach ($info['filelist'] as $file => $fa) { + if (empty($fa['role'])) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_FILEROLE, + array('file' => $file, 'roles' => PEAR_Common::getFileRoles())); + continue; + } elseif (!in_array($fa['role'], PEAR_Common::getFileRoles())) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILEROLE, + array('file' => $file, 'role' => $fa['role'], 'roles' => PEAR_Common::getFileRoles())); + } + if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~', str_replace('\\', '/', $file))) { + // file contains .. parent directory or . cur directory references + $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME, + array('file' => $file)); + } + if (isset($fa['install-as']) && + preg_match('~/\.\.?(/|\\z)|^\.\.?/~', + str_replace('\\', '/', $fa['install-as']))) { + // install-as contains .. parent directory or . cur directory references + $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME, + array('file' => $file . ' [installed as ' . $fa['install-as'] . ']')); + } + if (isset($fa['baseinstalldir']) && + preg_match('~/\.\.?(/|\\z)|^\.\.?/~', + str_replace('\\', '/', $fa['baseinstalldir']))) { + // install-as contains .. parent directory or . cur directory references + $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME, + array('file' => $file . ' [baseinstalldir ' . $fa['baseinstalldir'] . ']')); + } + } + } + if (isset($this->_registry) && $this->_isValid) { + $chan = $this->_registry->getChannel('pear.php.net'); + if (PEAR::isError($chan)) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_CHANNELVAL, $chan->getMessage()); + return $this->_isValid = 0; + } + $validator = $chan->getValidationObject(); + $validator->setPackageFile($this); + $validator->validate($state); + $failures = $validator->getFailures(); + foreach ($failures['errors'] as $error) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_CHANNELVAL, $error); + } + foreach ($failures['warnings'] as $warning) { + $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_CHANNELVAL, $warning); + } + } + if ($this->_isValid && $state == PEAR_VALIDATE_PACKAGING && !$nofilechecking) { + if ($this->_analyzePhpFiles()) { + $this->_isValid = true; + } + } + if ($this->_isValid) { + return $this->_isValid = $state; + } + return $this->_isValid = 0; + } + + function _analyzePhpFiles() + { + if (!$this->_isValid) { + return false; + } + if (!isset($this->_packageFile)) { + return false; + } + $dir_prefix = dirname($this->_packageFile); + $common = new PEAR_Common; + $log = isset($this->_logger) ? array(&$this->_logger, 'log') : + array($common, 'log'); + $info = $this->getFilelist(); + foreach ($info as $file => $fa) { + if (!file_exists($dir_prefix . DIRECTORY_SEPARATOR . $file)) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_FILE_NOTFOUND, + array('file' => realpath($dir_prefix) . DIRECTORY_SEPARATOR . $file)); + continue; + } + if ($fa['role'] == 'php' && $dir_prefix) { + call_user_func_array($log, array(1, "Analyzing $file")); + $srcinfo = $this->_analyzeSourceCode($dir_prefix . DIRECTORY_SEPARATOR . $file); + if ($srcinfo) { + $this->_buildProvidesArray($srcinfo); + } + } + } + $this->_packageName = $pn = $this->getPackage(); + $pnl = strlen($pn); + if (isset($this->_packageInfo['provides'])) { + foreach ((array) $this->_packageInfo['provides'] as $key => $what) { + if (isset($what['explicit'])) { + // skip conformance checks if the provides entry is + // specified in the package.xml file + continue; + } + extract($what); + if ($type == 'class') { + if (!strncasecmp($name, $pn, $pnl)) { + continue; + } + $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_NO_PNAME_PREFIX, + array('file' => $file, 'type' => $type, 'name' => $name, 'package' => $pn)); + } elseif ($type == 'function') { + if (strstr($name, '::') || !strncasecmp($name, $pn, $pnl)) { + continue; + } + $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_NO_PNAME_PREFIX, + array('file' => $file, 'type' => $type, 'name' => $name, 'package' => $pn)); + } + } + } + return $this->_isValid; + } + + /** + * Get the default xml generator object + * + * @return PEAR_PackageFile_Generator_v1 + */ + function &getDefaultGenerator() + { + if (!class_exists('PEAR_PackageFile_Generator_v1')) { + require_once 'PEAR/PackageFile/Generator/v1.php'; + } + $a = &new PEAR_PackageFile_Generator_v1($this); + return $a; + } + + /** + * Get the contents of a file listed within the package.xml + * @param string + * @return string + */ + function getFileContents($file) + { + if ($this->_archiveFile == $this->_packageFile) { // unpacked + $dir = dirname($this->_packageFile); + $file = $dir . DIRECTORY_SEPARATOR . $file; + $file = str_replace(array('/', '\\'), + array(DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR), $file); + if (file_exists($file) && is_readable($file)) { + return implode('', file($file)); + } + } else { // tgz + if (!class_exists('Archive_Tar')) { + require_once 'Archive/Tar.php'; + } + $tar = &new Archive_Tar($this->_archiveFile); + $tar->pushErrorHandling(PEAR_ERROR_RETURN); + if ($file != 'package.xml' && $file != 'package2.xml') { + $file = $this->getPackage() . '-' . $this->getVersion() . '/' . $file; + } + $file = $tar->extractInString($file); + $tar->popErrorHandling(); + if (PEAR::isError($file)) { + return PEAR::raiseError("Cannot locate file '$file' in archive"); + } + return $file; + } + } + + // {{{ analyzeSourceCode() + /** + * Analyze the source code of the given PHP file + * + * @param string Filename of the PHP file + * @return mixed + * @access private + */ + function _analyzeSourceCode($file) + { + if (!function_exists("token_get_all")) { + return false; + } + if (!defined('T_DOC_COMMENT')) { + define('T_DOC_COMMENT', T_COMMENT); + } + if (!defined('T_INTERFACE')) { + define('T_INTERFACE', -1); + } + if (!defined('T_IMPLEMENTS')) { + define('T_IMPLEMENTS', -1); + } + if (!$fp = @fopen($file, "r")) { + return false; + } + fclose($fp); + $contents = file_get_contents($file); + $tokens = token_get_all($contents); +/* + for ($i = 0; $i < sizeof($tokens); $i++) { + @list($token, $data) = $tokens[$i]; + if (is_string($token)) { + var_dump($token); + } else { + print token_name($token) . ' '; + var_dump(rtrim($data)); + } + } +*/ + $look_for = 0; + $paren_level = 0; + $bracket_level = 0; + $brace_level = 0; + $lastphpdoc = ''; + $current_class = ''; + $current_interface = ''; + $current_class_level = -1; + $current_function = ''; + $current_function_level = -1; + $declared_classes = array(); + $declared_interfaces = array(); + $declared_functions = array(); + $declared_methods = array(); + $used_classes = array(); + $used_functions = array(); + $extends = array(); + $implements = array(); + $nodeps = array(); + $inquote = false; + $interface = false; + for ($i = 0; $i < sizeof($tokens); $i++) { + if (is_array($tokens[$i])) { + list($token, $data) = $tokens[$i]; + } else { + $token = $tokens[$i]; + $data = ''; + } + if ($inquote) { + if ($token != '"' && $token != T_END_HEREDOC) { + continue; + } else { + $inquote = false; + continue; + } + } + switch ($token) { + case T_WHITESPACE : + continue; + case ';': + if ($interface) { + $current_function = ''; + $current_function_level = -1; + } + break; + case '"': + case T_START_HEREDOC: + $inquote = true; + break; + case T_CURLY_OPEN: + case T_DOLLAR_OPEN_CURLY_BRACES: + case '{': $brace_level++; continue 2; + case '}': + $brace_level--; + if ($current_class_level == $brace_level) { + $current_class = ''; + $current_class_level = -1; + } + if ($current_function_level == $brace_level) { + $current_function = ''; + $current_function_level = -1; + } + continue 2; + case '[': $bracket_level++; continue 2; + case ']': $bracket_level--; continue 2; + case '(': $paren_level++; continue 2; + case ')': $paren_level--; continue 2; + case T_INTERFACE: + $interface = true; + case T_CLASS: + if (($current_class_level != -1) || ($current_function_level != -1)) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE, + array('file' => $file)); + return false; + } + case T_FUNCTION: + case T_NEW: + case T_EXTENDS: + case T_IMPLEMENTS: + $look_for = $token; + continue 2; + case T_STRING: + if (version_compare(zend_version(), '2.0', '<')) { + if (in_array(strtolower($data), + array('public', 'private', 'protected', 'abstract', + 'interface', 'implements', 'throw') + )) { + $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_PHP5, + array($file)); + } + } + if ($look_for == T_CLASS) { + $current_class = $data; + $current_class_level = $brace_level; + $declared_classes[] = $current_class; + } elseif ($look_for == T_INTERFACE) { + $current_interface = $data; + $current_class_level = $brace_level; + $declared_interfaces[] = $current_interface; + } elseif ($look_for == T_IMPLEMENTS) { + $implements[$current_class] = $data; + } elseif ($look_for == T_EXTENDS) { + $extends[$current_class] = $data; + } elseif ($look_for == T_FUNCTION) { + if ($current_class) { + $current_function = "$current_class::$data"; + $declared_methods[$current_class][] = $data; + } elseif ($current_interface) { + $current_function = "$current_interface::$data"; + $declared_methods[$current_interface][] = $data; + } else { + $current_function = $data; + $declared_functions[] = $current_function; + } + $current_function_level = $brace_level; + $m = array(); + } elseif ($look_for == T_NEW) { + $used_classes[$data] = true; + } + $look_for = 0; + continue 2; + case T_VARIABLE: + $look_for = 0; + continue 2; + case T_DOC_COMMENT: + case T_COMMENT: + if (preg_match('!^/\*\*\s!', $data)) { + $lastphpdoc = $data; + if (preg_match_all('/@nodep\s+(\S+)/', $lastphpdoc, $m)) { + $nodeps = array_merge($nodeps, $m[1]); + } + } + continue 2; + case T_DOUBLE_COLON: + if (!($tokens[$i - 1][0] == T_WHITESPACE || $tokens[$i - 1][0] == T_STRING)) { + $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE, + array('file' => $file)); + return false; + } + $class = $tokens[$i - 1][1]; + if (strtolower($class) != 'parent') { + $used_classes[$class] = true; + } + continue 2; + } + } + return array( + "source_file" => $file, + "declared_classes" => $declared_classes, + "declared_interfaces" => $declared_interfaces, + "declared_methods" => $declared_methods, + "declared_functions" => $declared_functions, + "used_classes" => array_diff(array_keys($used_classes), $nodeps), + "inheritance" => $extends, + "implements" => $implements, + ); + } + + /** + * Build a "provides" array from data returned by + * analyzeSourceCode(). The format of the built array is like + * this: + * + * array( + * 'class;MyClass' => 'array('type' => 'class', 'name' => 'MyClass'), + * ... + * ) + * + * + * @param array $srcinfo array with information about a source file + * as returned by the analyzeSourceCode() method. + * + * @return void + * + * @access private + * + */ + function _buildProvidesArray($srcinfo) + { + if (!$this->_isValid) { + return false; + } + $file = basename($srcinfo['source_file']); + $pn = $this->getPackage(); + $pnl = strlen($pn); + foreach ($srcinfo['declared_classes'] as $class) { + $key = "class;$class"; + if (isset($this->_packageInfo['provides'][$key])) { + continue; + } + $this->_packageInfo['provides'][$key] = + array('file'=> $file, 'type' => 'class', 'name' => $class); + if (isset($srcinfo['inheritance'][$class])) { + $this->_packageInfo['provides'][$key]['extends'] = + $srcinfo['inheritance'][$class]; + } + } + foreach ($srcinfo['declared_methods'] as $class => $methods) { + foreach ($methods as $method) { + $function = "$class::$method"; + $key = "function;$function"; + if ($method{0} == '_' || !strcasecmp($method, $class) || + isset($this->_packageInfo['provides'][$key])) { + continue; + } + $this->_packageInfo['provides'][$key] = + array('file'=> $file, 'type' => 'function', 'name' => $function); + } + } + + foreach ($srcinfo['declared_functions'] as $function) { + $key = "function;$function"; + if ($function{0} == '_' || isset($this->_packageInfo['provides'][$key])) { + continue; + } + if (!strstr($function, '::') && strncasecmp($function, $pn, $pnl)) { + $warnings[] = "in1 " . $file . ": function \"$function\" not prefixed with package name \"$pn\""; + } + $this->_packageInfo['provides'][$key] = + array('file'=> $file, 'type' => 'function', 'name' => $function); + } + } + + // }}} +} +?> diff --git a/_piecrust/libs/PEAR/PackageFile/v2.php b/_piecrust/libs/PEAR/PackageFile/v2.php new file mode 100644 index 0000000..1ca412d --- /dev/null +++ b/_piecrust/libs/PEAR/PackageFile/v2.php @@ -0,0 +1,2049 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: v2.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ +/** + * For error handling + */ +require_once 'PEAR/ErrorStack.php'; +/** + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_PackageFile_v2 +{ + + /** + * Parsed package information + * @var array + * @access private + */ + var $_packageInfo = array(); + + /** + * path to package .tgz or false if this is a local/extracted package.xml + * @var string|false + * @access private + */ + var $_archiveFile; + + /** + * path to package .xml or false if this is an abstract parsed-from-string xml + * @var string|false + * @access private + */ + var $_packageFile; + + /** + * This is used by file analysis routines to log progress information + * @var PEAR_Common + * @access protected + */ + var $_logger; + + /** + * This is set to the highest validation level that has been validated + * + * If the package.xml is invalid or unknown, this is set to 0. If + * normal validation has occurred, this is set to PEAR_VALIDATE_NORMAL. If + * downloading/installation validation has occurred it is set to PEAR_VALIDATE_DOWNLOADING + * or INSTALLING, and so on up to PEAR_VALIDATE_PACKAGING. This allows validation + * "caching" to occur, which is particularly important for package validation, so + * that PHP files are not validated twice + * @var int + * @access private + */ + var $_isValid = 0; + + /** + * True if the filelist has been validated + * @param bool + */ + var $_filesValid = false; + + /** + * @var PEAR_Registry + * @access protected + */ + var $_registry; + + /** + * @var PEAR_Config + * @access protected + */ + var $_config; + + /** + * Optional Dependency group requested for installation + * @var string + * @access private + */ + var $_requestedGroup = false; + + /** + * @var PEAR_ErrorStack + * @access protected + */ + var $_stack; + + /** + * Namespace prefix used for tasks in this package.xml - use tasks: whenever possible + */ + var $_tasksNs; + + /** + * Determines whether this packagefile was initialized only with partial package info + * + * If this package file was constructed via parsing REST, it will only contain + * + * - package name + * - channel name + * - dependencies + * @var boolean + * @access private + */ + var $_incomplete = true; + + /** + * @var PEAR_PackageFile_v2_Validator + */ + var $_v2Validator; + + /** + * The constructor merely sets up the private error stack + */ + function PEAR_PackageFile_v2() + { + $this->_stack = new PEAR_ErrorStack('PEAR_PackageFile_v2', false, null); + $this->_isValid = false; + } + + /** + * To make unit-testing easier + * @param PEAR_Frontend_* + * @param array options + * @param PEAR_Config + * @return PEAR_Downloader + * @access protected + */ + function &getPEARDownloader(&$i, $o, &$c) + { + $z = &new PEAR_Downloader($i, $o, $c); + return $z; + } + + /** + * To make unit-testing easier + * @param PEAR_Config + * @param array options + * @param array package name as returned from {@link PEAR_Registry::parsePackageName()} + * @param int PEAR_VALIDATE_* constant + * @return PEAR_Dependency2 + * @access protected + */ + function &getPEARDependency2(&$c, $o, $p, $s = PEAR_VALIDATE_INSTALLING) + { + if (!class_exists('PEAR_Dependency2')) { + require_once 'PEAR/Dependency2.php'; + } + $z = &new PEAR_Dependency2($c, $o, $p, $s); + return $z; + } + + function getInstalledBinary() + { + return isset($this->_packageInfo['#binarypackage']) ? $this->_packageInfo['#binarypackage'] : + false; + } + + /** + * Installation of source package has failed, attempt to download and install the + * binary version of this package. + * @param PEAR_Installer + * @return array|false + */ + function installBinary(&$installer) + { + if (!OS_WINDOWS) { + $a = false; + return $a; + } + if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') { + $releasetype = $this->getPackageType() . 'release'; + if (!is_array($installer->getInstallPackages())) { + $a = false; + return $a; + } + foreach ($installer->getInstallPackages() as $p) { + if ($p->isExtension($this->_packageInfo['providesextension'])) { + if ($p->getPackageType() != 'extsrc' && $p->getPackageType() != 'zendextsrc') { + $a = false; + return $a; // the user probably downloaded it separately + } + } + } + if (isset($this->_packageInfo[$releasetype]['binarypackage'])) { + $installer->log(0, 'Attempting to download binary version of extension "' . + $this->_packageInfo['providesextension'] . '"'); + $params = $this->_packageInfo[$releasetype]['binarypackage']; + if (!is_array($params) || !isset($params[0])) { + $params = array($params); + } + if (isset($this->_packageInfo['channel'])) { + foreach ($params as $i => $param) { + $params[$i] = array('channel' => $this->_packageInfo['channel'], + 'package' => $param, 'version' => $this->getVersion()); + } + } + $dl = &$this->getPEARDownloader($installer->ui, $installer->getOptions(), + $installer->config); + $verbose = $dl->config->get('verbose'); + $dl->config->set('verbose', -1); + foreach ($params as $param) { + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $ret = $dl->download(array($param)); + PEAR::popErrorHandling(); + if (is_array($ret) && count($ret)) { + break; + } + } + $dl->config->set('verbose', $verbose); + if (is_array($ret)) { + if (count($ret) == 1) { + $pf = $ret[0]->getPackageFile(); + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $err = $installer->install($ret[0]); + PEAR::popErrorHandling(); + if (is_array($err)) { + $this->_packageInfo['#binarypackage'] = $ret[0]->getPackage(); + // "install" self, so all dependencies will work transparently + $this->_registry->addPackage2($this); + $installer->log(0, 'Download and install of binary extension "' . + $this->_registry->parsedPackageNameToString( + array('channel' => $pf->getChannel(), + 'package' => $pf->getPackage()), true) . '" successful'); + $a = array($ret[0], $err); + return $a; + } + $installer->log(0, 'Download and install of binary extension "' . + $this->_registry->parsedPackageNameToString( + array('channel' => $pf->getChannel(), + 'package' => $pf->getPackage()), true) . '" failed'); + } + } + } + } + $a = false; + return $a; + } + + /** + * @return string|false Extension name + */ + function getProvidesExtension() + { + if (in_array($this->getPackageType(), + array('extsrc', 'extbin', 'zendextsrc', 'zendextbin'))) { + if (isset($this->_packageInfo['providesextension'])) { + return $this->_packageInfo['providesextension']; + } + } + return false; + } + + /** + * @param string Extension name + * @return bool + */ + function isExtension($extension) + { + if (in_array($this->getPackageType(), + array('extsrc', 'extbin', 'zendextsrc', 'zendextbin'))) { + return $this->_packageInfo['providesextension'] == $extension; + } + return false; + } + + /** + * Tests whether every part of the package.xml 1.0 is represented in + * this package.xml 2.0 + * @param PEAR_PackageFile_v1 + * @return bool + */ + function isEquivalent($pf1) + { + if (!$pf1) { + return true; + } + if ($this->getPackageType() == 'bundle') { + return false; + } + $this->_stack->getErrors(true); + if (!$pf1->validate(PEAR_VALIDATE_NORMAL)) { + return false; + } + $pass = true; + if ($pf1->getPackage() != $this->getPackage()) { + $this->_differentPackage($pf1->getPackage()); + $pass = false; + } + if ($pf1->getVersion() != $this->getVersion()) { + $this->_differentVersion($pf1->getVersion()); + $pass = false; + } + if (trim($pf1->getSummary()) != $this->getSummary()) { + $this->_differentSummary($pf1->getSummary()); + $pass = false; + } + if (preg_replace('/\s+/', '', $pf1->getDescription()) != + preg_replace('/\s+/', '', $this->getDescription())) { + $this->_differentDescription($pf1->getDescription()); + $pass = false; + } + if ($pf1->getState() != $this->getState()) { + $this->_differentState($pf1->getState()); + $pass = false; + } + if (!strstr(preg_replace('/\s+/', '', $this->getNotes()), + preg_replace('/\s+/', '', $pf1->getNotes()))) { + $this->_differentNotes($pf1->getNotes()); + $pass = false; + } + $mymaintainers = $this->getMaintainers(); + $yourmaintainers = $pf1->getMaintainers(); + for ($i1 = 0; $i1 < count($yourmaintainers); $i1++) { + $reset = false; + for ($i2 = 0; $i2 < count($mymaintainers); $i2++) { + if ($mymaintainers[$i2]['handle'] == $yourmaintainers[$i1]['handle']) { + if ($mymaintainers[$i2]['role'] != $yourmaintainers[$i1]['role']) { + $this->_differentRole($mymaintainers[$i2]['handle'], + $yourmaintainers[$i1]['role'], $mymaintainers[$i2]['role']); + $pass = false; + } + if ($mymaintainers[$i2]['email'] != $yourmaintainers[$i1]['email']) { + $this->_differentEmail($mymaintainers[$i2]['handle'], + $yourmaintainers[$i1]['email'], $mymaintainers[$i2]['email']); + $pass = false; + } + if ($mymaintainers[$i2]['name'] != $yourmaintainers[$i1]['name']) { + $this->_differentName($mymaintainers[$i2]['handle'], + $yourmaintainers[$i1]['name'], $mymaintainers[$i2]['name']); + $pass = false; + } + unset($mymaintainers[$i2]); + $mymaintainers = array_values($mymaintainers); + unset($yourmaintainers[$i1]); + $yourmaintainers = array_values($yourmaintainers); + $reset = true; + break; + } + } + if ($reset) { + $i1 = -1; + } + } + $this->_unmatchedMaintainers($mymaintainers, $yourmaintainers); + $filelist = $this->getFilelist(); + foreach ($pf1->getFilelist() as $file => $atts) { + if (!isset($filelist[$file])) { + $this->_missingFile($file); + $pass = false; + } + } + return $pass; + } + + function _differentPackage($package) + { + $this->_stack->push(__FUNCTION__, 'error', array('package' => $package, + 'self' => $this->getPackage()), + 'package.xml 1.0 package "%package%" does not match "%self%"'); + } + + function _differentVersion($version) + { + $this->_stack->push(__FUNCTION__, 'error', array('version' => $version, + 'self' => $this->getVersion()), + 'package.xml 1.0 version "%version%" does not match "%self%"'); + } + + function _differentState($state) + { + $this->_stack->push(__FUNCTION__, 'error', array('state' => $state, + 'self' => $this->getState()), + 'package.xml 1.0 state "%state%" does not match "%self%"'); + } + + function _differentRole($handle, $role, $selfrole) + { + $this->_stack->push(__FUNCTION__, 'error', array('handle' => $handle, + 'role' => $role, 'self' => $selfrole), + 'package.xml 1.0 maintainer "%handle%" role "%role%" does not match "%self%"'); + } + + function _differentEmail($handle, $email, $selfemail) + { + $this->_stack->push(__FUNCTION__, 'error', array('handle' => $handle, + 'email' => $email, 'self' => $selfemail), + 'package.xml 1.0 maintainer "%handle%" email "%email%" does not match "%self%"'); + } + + function _differentName($handle, $name, $selfname) + { + $this->_stack->push(__FUNCTION__, 'error', array('handle' => $handle, + 'name' => $name, 'self' => $selfname), + 'package.xml 1.0 maintainer "%handle%" name "%name%" does not match "%self%"'); + } + + function _unmatchedMaintainers($my, $yours) + { + if ($my) { + array_walk($my, create_function('&$i, $k', '$i = $i["handle"];')); + $this->_stack->push(__FUNCTION__, 'error', array('handles' => $my), + 'package.xml 2.0 has unmatched extra maintainers "%handles%"'); + } + if ($yours) { + array_walk($yours, create_function('&$i, $k', '$i = $i["handle"];')); + $this->_stack->push(__FUNCTION__, 'error', array('handles' => $yours), + 'package.xml 1.0 has unmatched extra maintainers "%handles%"'); + } + } + + function _differentNotes($notes) + { + $truncnotes = strlen($notes) < 25 ? $notes : substr($notes, 0, 24) . '...'; + $truncmynotes = strlen($this->getNotes()) < 25 ? $this->getNotes() : + substr($this->getNotes(), 0, 24) . '...'; + $this->_stack->push(__FUNCTION__, 'error', array('notes' => $truncnotes, + 'self' => $truncmynotes), + 'package.xml 1.0 release notes "%notes%" do not match "%self%"'); + } + + function _differentSummary($summary) + { + $truncsummary = strlen($summary) < 25 ? $summary : substr($summary, 0, 24) . '...'; + $truncmysummary = strlen($this->getsummary()) < 25 ? $this->getSummary() : + substr($this->getsummary(), 0, 24) . '...'; + $this->_stack->push(__FUNCTION__, 'error', array('summary' => $truncsummary, + 'self' => $truncmysummary), + 'package.xml 1.0 summary "%summary%" does not match "%self%"'); + } + + function _differentDescription($description) + { + $truncdescription = trim(strlen($description) < 25 ? $description : substr($description, 0, 24) . '...'); + $truncmydescription = trim(strlen($this->getDescription()) < 25 ? $this->getDescription() : + substr($this->getdescription(), 0, 24) . '...'); + $this->_stack->push(__FUNCTION__, 'error', array('description' => $truncdescription, + 'self' => $truncmydescription), + 'package.xml 1.0 description "%description%" does not match "%self%"'); + } + + function _missingFile($file) + { + $this->_stack->push(__FUNCTION__, 'error', array('file' => $file), + 'package.xml 1.0 file "%file%" is not present in '); + } + + /** + * WARNING - do not use this function unless you know what you're doing + */ + function setRawState($state) + { + if (!isset($this->_packageInfo['stability'])) { + $this->_packageInfo['stability'] = array(); + } + $this->_packageInfo['stability']['release'] = $state; + } + + /** + * WARNING - do not use this function unless you know what you're doing + */ + function setRawCompatible($compatible) + { + $this->_packageInfo['compatible'] = $compatible; + } + + /** + * WARNING - do not use this function unless you know what you're doing + */ + function setRawPackage($package) + { + $this->_packageInfo['name'] = $package; + } + + /** + * WARNING - do not use this function unless you know what you're doing + */ + function setRawChannel($channel) + { + $this->_packageInfo['channel'] = $channel; + } + + function setRequestedGroup($group) + { + $this->_requestedGroup = $group; + } + + function getRequestedGroup() + { + if (isset($this->_requestedGroup)) { + return $this->_requestedGroup; + } + return false; + } + + /** + * For saving in the registry. + * + * Set the last version that was installed + * @param string + */ + function setLastInstalledVersion($version) + { + $this->_packageInfo['_lastversion'] = $version; + } + + /** + * @return string|false + */ + function getLastInstalledVersion() + { + if (isset($this->_packageInfo['_lastversion'])) { + return $this->_packageInfo['_lastversion']; + } + return false; + } + + /** + * Determines whether this package.xml has post-install scripts or not + * @return array|false + */ + function listPostinstallScripts() + { + $filelist = $this->getFilelist(); + $contents = $this->getContents(); + $contents = $contents['dir']['file']; + if (!is_array($contents) || !isset($contents[0])) { + $contents = array($contents); + } + $taskfiles = array(); + foreach ($contents as $file) { + $atts = $file['attribs']; + unset($file['attribs']); + if (count($file)) { + $taskfiles[$atts['name']] = $file; + } + } + $common = new PEAR_Common; + $common->debug = $this->_config->get('verbose'); + $this->_scripts = array(); + $ret = array(); + foreach ($taskfiles as $name => $tasks) { + if (!isset($filelist[$name])) { + // ignored files will not be in the filelist + continue; + } + $atts = $filelist[$name]; + foreach ($tasks as $tag => $raw) { + $task = $this->getTask($tag); + $task = &new $task($this->_config, $common, PEAR_TASK_INSTALL); + if ($task->isScript()) { + $ret[] = $filelist[$name]['installed_as']; + } + } + } + if (count($ret)) { + return $ret; + } + return false; + } + + /** + * Initialize post-install scripts for running + * + * This method can be used to detect post-install scripts, as the return value + * indicates whether any exist + * @return bool + */ + function initPostinstallScripts() + { + $filelist = $this->getFilelist(); + $contents = $this->getContents(); + $contents = $contents['dir']['file']; + if (!is_array($contents) || !isset($contents[0])) { + $contents = array($contents); + } + $taskfiles = array(); + foreach ($contents as $file) { + $atts = $file['attribs']; + unset($file['attribs']); + if (count($file)) { + $taskfiles[$atts['name']] = $file; + } + } + $common = new PEAR_Common; + $common->debug = $this->_config->get('verbose'); + $this->_scripts = array(); + foreach ($taskfiles as $name => $tasks) { + if (!isset($filelist[$name])) { + // file was not installed due to installconditions + continue; + } + $atts = $filelist[$name]; + foreach ($tasks as $tag => $raw) { + $taskname = $this->getTask($tag); + $task = &new $taskname($this->_config, $common, PEAR_TASK_INSTALL); + if (!$task->isScript()) { + continue; // scripts are only handled after installation + } + $lastversion = isset($this->_packageInfo['_lastversion']) ? + $this->_packageInfo['_lastversion'] : null; + $task->init($raw, $atts, $lastversion); + $res = $task->startSession($this, $atts['installed_as']); + if (!$res) { + continue; // skip this file + } + if (PEAR::isError($res)) { + return $res; + } + $assign = &$task; + $this->_scripts[] = &$assign; + } + } + if (count($this->_scripts)) { + return true; + } + return false; + } + + function runPostinstallScripts() + { + if ($this->initPostinstallScripts()) { + $ui = &PEAR_Frontend::singleton(); + if ($ui) { + $ui->runPostinstallScripts($this->_scripts, $this); + } + } + } + + + /** + * Convert a recursive set of and tags into a single tag with + * tags. + */ + function flattenFilelist() + { + if (isset($this->_packageInfo['bundle'])) { + return; + } + $filelist = array(); + if (isset($this->_packageInfo['contents']['dir']['dir'])) { + $this->_getFlattenedFilelist($filelist, $this->_packageInfo['contents']['dir']); + if (!isset($filelist[1])) { + $filelist = $filelist[0]; + } + $this->_packageInfo['contents']['dir']['file'] = $filelist; + unset($this->_packageInfo['contents']['dir']['dir']); + } else { + // else already flattened but check for baseinstalldir propagation + if (isset($this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'])) { + if (isset($this->_packageInfo['contents']['dir']['file'][0])) { + foreach ($this->_packageInfo['contents']['dir']['file'] as $i => $file) { + if (isset($file['attribs']['baseinstalldir'])) { + continue; + } + $this->_packageInfo['contents']['dir']['file'][$i]['attribs']['baseinstalldir'] + = $this->_packageInfo['contents']['dir']['attribs']['baseinstalldir']; + } + } else { + if (!isset($this->_packageInfo['contents']['dir']['file']['attribs']['baseinstalldir'])) { + $this->_packageInfo['contents']['dir']['file']['attribs']['baseinstalldir'] + = $this->_packageInfo['contents']['dir']['attribs']['baseinstalldir']; + } + } + } + } + } + + /** + * @param array the final flattened file list + * @param array the current directory being processed + * @param string|false any recursively inherited baeinstalldir attribute + * @param string private recursion variable + * @return array + * @access protected + */ + function _getFlattenedFilelist(&$files, $dir, $baseinstall = false, $path = '') + { + if (isset($dir['attribs']) && isset($dir['attribs']['baseinstalldir'])) { + $baseinstall = $dir['attribs']['baseinstalldir']; + } + if (isset($dir['dir'])) { + if (!isset($dir['dir'][0])) { + $dir['dir'] = array($dir['dir']); + } + foreach ($dir['dir'] as $subdir) { + if (!isset($subdir['attribs']) || !isset($subdir['attribs']['name'])) { + $name = '*unknown*'; + } else { + $name = $subdir['attribs']['name']; + } + $newpath = empty($path) ? $name : + $path . '/' . $name; + $this->_getFlattenedFilelist($files, $subdir, + $baseinstall, $newpath); + } + } + if (isset($dir['file'])) { + if (!isset($dir['file'][0])) { + $dir['file'] = array($dir['file']); + } + foreach ($dir['file'] as $file) { + $attrs = $file['attribs']; + $name = $attrs['name']; + if ($baseinstall && !isset($attrs['baseinstalldir'])) { + $attrs['baseinstalldir'] = $baseinstall; + } + $attrs['name'] = empty($path) ? $name : $path . '/' . $name; + $attrs['name'] = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'), + $attrs['name']); + $file['attribs'] = $attrs; + $files[] = $file; + } + } + } + + function setConfig(&$config) + { + $this->_config = &$config; + $this->_registry = &$config->getRegistry(); + } + + function setLogger(&$logger) + { + if (!is_object($logger) || !method_exists($logger, 'log')) { + return PEAR::raiseError('Logger must be compatible with PEAR_Common::log'); + } + $this->_logger = &$logger; + } + + /** + * WARNING - do not use this function directly unless you know what you're doing + */ + function setDeps($deps) + { + $this->_packageInfo['dependencies'] = $deps; + } + + /** + * WARNING - do not use this function directly unless you know what you're doing + */ + function setCompatible($compat) + { + $this->_packageInfo['compatible'] = $compat; + } + + function setPackagefile($file, $archive = false) + { + $this->_packageFile = $file; + $this->_archiveFile = $archive ? $archive : $file; + } + + /** + * Wrapper to {@link PEAR_ErrorStack::getErrors()} + * @param boolean determines whether to purge the error stack after retrieving + * @return array + */ + function getValidationWarnings($purge = true) + { + return $this->_stack->getErrors($purge); + } + + function getPackageFile() + { + return $this->_packageFile; + } + + function getArchiveFile() + { + return $this->_archiveFile; + } + + + /** + * Directly set the array that defines this packagefile + * + * WARNING: no validation. This should only be performed by internal methods + * inside PEAR or by inputting an array saved from an existing PEAR_PackageFile_v2 + * @param array + */ + function fromArray($pinfo) + { + unset($pinfo['old']); + unset($pinfo['xsdversion']); + // If the changelog isn't an array then it was passed in as an empty tag + if (isset($pinfo['changelog']) && !is_array($pinfo['changelog'])) { + unset($pinfo['changelog']); + } + $this->_incomplete = false; + $this->_packageInfo = $pinfo; + } + + function isIncomplete() + { + return $this->_incomplete; + } + + /** + * @return array + */ + function toArray($forreg = false) + { + if (!$this->validate(PEAR_VALIDATE_NORMAL)) { + return false; + } + return $this->getArray($forreg); + } + + function getArray($forReg = false) + { + if ($forReg) { + $arr = $this->_packageInfo; + $arr['old'] = array(); + $arr['old']['version'] = $this->getVersion(); + $arr['old']['release_date'] = $this->getDate(); + $arr['old']['release_state'] = $this->getState(); + $arr['old']['release_license'] = $this->getLicense(); + $arr['old']['release_notes'] = $this->getNotes(); + $arr['old']['release_deps'] = $this->getDeps(); + $arr['old']['maintainers'] = $this->getMaintainers(); + $arr['xsdversion'] = '2.0'; + return $arr; + } else { + $info = $this->_packageInfo; + unset($info['dirtree']); + if (isset($info['_lastversion'])) { + unset($info['_lastversion']); + } + if (isset($info['#binarypackage'])) { + unset($info['#binarypackage']); + } + return $info; + } + } + + function packageInfo($field) + { + $arr = $this->getArray(true); + if ($field == 'state') { + return $arr['stability']['release']; + } + if ($field == 'api-version') { + return $arr['version']['api']; + } + if ($field == 'api-state') { + return $arr['stability']['api']; + } + if (isset($arr['old'][$field])) { + if (!is_string($arr['old'][$field])) { + return null; + } + return $arr['old'][$field]; + } + if (isset($arr[$field])) { + if (!is_string($arr[$field])) { + return null; + } + return $arr[$field]; + } + return null; + } + + function getName() + { + return $this->getPackage(); + } + + function getPackage() + { + if (isset($this->_packageInfo['name'])) { + return $this->_packageInfo['name']; + } + return false; + } + + function getChannel() + { + if (isset($this->_packageInfo['uri'])) { + return '__uri'; + } + if (isset($this->_packageInfo['channel'])) { + return strtolower($this->_packageInfo['channel']); + } + return false; + } + + function getUri() + { + if (isset($this->_packageInfo['uri'])) { + return $this->_packageInfo['uri']; + } + return false; + } + + function getExtends() + { + if (isset($this->_packageInfo['extends'])) { + return $this->_packageInfo['extends']; + } + return false; + } + + function getSummary() + { + if (isset($this->_packageInfo['summary'])) { + return $this->_packageInfo['summary']; + } + return false; + } + + function getDescription() + { + if (isset($this->_packageInfo['description'])) { + return $this->_packageInfo['description']; + } + return false; + } + + function getMaintainers($raw = false) + { + if (!isset($this->_packageInfo['lead'])) { + return false; + } + if ($raw) { + $ret = array('lead' => $this->_packageInfo['lead']); + (isset($this->_packageInfo['developer'])) ? + $ret['developer'] = $this->_packageInfo['developer'] :null; + (isset($this->_packageInfo['contributor'])) ? + $ret['contributor'] = $this->_packageInfo['contributor'] :null; + (isset($this->_packageInfo['helper'])) ? + $ret['helper'] = $this->_packageInfo['helper'] :null; + return $ret; + } else { + $ret = array(); + $leads = isset($this->_packageInfo['lead'][0]) ? $this->_packageInfo['lead'] : + array($this->_packageInfo['lead']); + foreach ($leads as $lead) { + $s = $lead; + $s['handle'] = $s['user']; + unset($s['user']); + $s['role'] = 'lead'; + $ret[] = $s; + } + if (isset($this->_packageInfo['developer'])) { + $leads = isset($this->_packageInfo['developer'][0]) ? + $this->_packageInfo['developer'] : + array($this->_packageInfo['developer']); + foreach ($leads as $maintainer) { + $s = $maintainer; + $s['handle'] = $s['user']; + unset($s['user']); + $s['role'] = 'developer'; + $ret[] = $s; + } + } + if (isset($this->_packageInfo['contributor'])) { + $leads = isset($this->_packageInfo['contributor'][0]) ? + $this->_packageInfo['contributor'] : + array($this->_packageInfo['contributor']); + foreach ($leads as $maintainer) { + $s = $maintainer; + $s['handle'] = $s['user']; + unset($s['user']); + $s['role'] = 'contributor'; + $ret[] = $s; + } + } + if (isset($this->_packageInfo['helper'])) { + $leads = isset($this->_packageInfo['helper'][0]) ? + $this->_packageInfo['helper'] : + array($this->_packageInfo['helper']); + foreach ($leads as $maintainer) { + $s = $maintainer; + $s['handle'] = $s['user']; + unset($s['user']); + $s['role'] = 'helper'; + $ret[] = $s; + } + } + return $ret; + } + return false; + } + + function getLeads() + { + if (isset($this->_packageInfo['lead'])) { + return $this->_packageInfo['lead']; + } + return false; + } + + function getDevelopers() + { + if (isset($this->_packageInfo['developer'])) { + return $this->_packageInfo['developer']; + } + return false; + } + + function getContributors() + { + if (isset($this->_packageInfo['contributor'])) { + return $this->_packageInfo['contributor']; + } + return false; + } + + function getHelpers() + { + if (isset($this->_packageInfo['helper'])) { + return $this->_packageInfo['helper']; + } + return false; + } + + function setDate($date) + { + if (!isset($this->_packageInfo['date'])) { + // ensure that the extends tag is set up in the right location + $this->_packageInfo = $this->_insertBefore($this->_packageInfo, + array('time', 'version', + 'stability', 'license', 'notes', 'contents', 'compatible', + 'dependencies', 'providesextension', 'srcpackage', 'srcuri', + 'phprelease', 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', + 'zendextbinrelease', 'bundle', 'changelog'), array(), 'date'); + } + $this->_packageInfo['date'] = $date; + $this->_isValid = 0; + } + + function setTime($time) + { + $this->_isValid = 0; + if (!isset($this->_packageInfo['time'])) { + // ensure that the time tag is set up in the right location + $this->_packageInfo = $this->_insertBefore($this->_packageInfo, + array('version', + 'stability', 'license', 'notes', 'contents', 'compatible', + 'dependencies', 'providesextension', 'srcpackage', 'srcuri', + 'phprelease', 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', + 'zendextbinrelease', 'bundle', 'changelog'), $time, 'time'); + } + $this->_packageInfo['time'] = $time; + } + + function getDate() + { + if (isset($this->_packageInfo['date'])) { + return $this->_packageInfo['date']; + } + return false; + } + + function getTime() + { + if (isset($this->_packageInfo['time'])) { + return $this->_packageInfo['time']; + } + return false; + } + + /** + * @param package|api version category to return + */ + function getVersion($key = 'release') + { + if (isset($this->_packageInfo['version'][$key])) { + return $this->_packageInfo['version'][$key]; + } + return false; + } + + function getStability() + { + if (isset($this->_packageInfo['stability'])) { + return $this->_packageInfo['stability']; + } + return false; + } + + function getState($key = 'release') + { + if (isset($this->_packageInfo['stability'][$key])) { + return $this->_packageInfo['stability'][$key]; + } + return false; + } + + function getLicense($raw = false) + { + if (isset($this->_packageInfo['license'])) { + if ($raw) { + return $this->_packageInfo['license']; + } + if (is_array($this->_packageInfo['license'])) { + return $this->_packageInfo['license']['_content']; + } else { + return $this->_packageInfo['license']; + } + } + return false; + } + + function getLicenseLocation() + { + if (!isset($this->_packageInfo['license']) || !is_array($this->_packageInfo['license'])) { + return false; + } + return $this->_packageInfo['license']['attribs']; + } + + function getNotes() + { + if (isset($this->_packageInfo['notes'])) { + return $this->_packageInfo['notes']; + } + return false; + } + + /** + * Return the tag contents, if any + * @return array|false + */ + function getUsesrole() + { + if (isset($this->_packageInfo['usesrole'])) { + return $this->_packageInfo['usesrole']; + } + return false; + } + + /** + * Return the tag contents, if any + * @return array|false + */ + function getUsestask() + { + if (isset($this->_packageInfo['usestask'])) { + return $this->_packageInfo['usestask']; + } + return false; + } + + /** + * This should only be used to retrieve filenames and install attributes + */ + function getFilelist($preserve = false) + { + if (isset($this->_packageInfo['filelist']) && !$preserve) { + return $this->_packageInfo['filelist']; + } + $this->flattenFilelist(); + if ($contents = $this->getContents()) { + $ret = array(); + if (!isset($contents['dir'])) { + return false; + } + if (!isset($contents['dir']['file'][0])) { + $contents['dir']['file'] = array($contents['dir']['file']); + } + foreach ($contents['dir']['file'] as $file) { + $name = $file['attribs']['name']; + if (!$preserve) { + $file = $file['attribs']; + } + $ret[$name] = $file; + } + if (!$preserve) { + $this->_packageInfo['filelist'] = $ret; + } + return $ret; + } + return false; + } + + /** + * Return configure options array, if any + * + * @return array|false + */ + function getConfigureOptions() + { + if ($this->getPackageType() != 'extsrc' && $this->getPackageType() != 'zendextsrc') { + return false; + } + + $releases = $this->getReleases(); + if (isset($releases[0])) { + $releases = $releases[0]; + } + + if (isset($releases['configureoption'])) { + if (!isset($releases['configureoption'][0])) { + $releases['configureoption'] = array($releases['configureoption']); + } + + for ($i = 0; $i < count($releases['configureoption']); $i++) { + $releases['configureoption'][$i] = $releases['configureoption'][$i]['attribs']; + } + + return $releases['configureoption']; + } + + return false; + } + + /** + * This is only used at install-time, after all serialization + * is over. + */ + function resetFilelist() + { + $this->_packageInfo['filelist'] = array(); + } + + /** + * Retrieve a list of files that should be installed on this computer + * @return array + */ + function getInstallationFilelist($forfilecheck = false) + { + $contents = $this->getFilelist(true); + if (isset($contents['dir']['attribs']['baseinstalldir'])) { + $base = $contents['dir']['attribs']['baseinstalldir']; + } + if (isset($this->_packageInfo['bundle'])) { + return PEAR::raiseError( + 'Exception: bundles should be handled in download code only'); + } + $release = $this->getReleases(); + if ($release) { + if (!isset($release[0])) { + if (!isset($release['installconditions']) && !isset($release['filelist'])) { + if ($forfilecheck) { + return $this->getFilelist(); + } + return $contents; + } + $release = array($release); + } + $depchecker = &$this->getPEARDependency2($this->_config, array(), + array('channel' => $this->getChannel(), 'package' => $this->getPackage()), + PEAR_VALIDATE_INSTALLING); + foreach ($release as $instance) { + if (isset($instance['installconditions'])) { + $installconditions = $instance['installconditions']; + if (is_array($installconditions)) { + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + foreach ($installconditions as $type => $conditions) { + if (!isset($conditions[0])) { + $conditions = array($conditions); + } + foreach ($conditions as $condition) { + $ret = $depchecker->{"validate{$type}Dependency"}($condition); + if (PEAR::isError($ret)) { + PEAR::popErrorHandling(); + continue 3; // skip this release + } + } + } + PEAR::popErrorHandling(); + } + } + // this is the release to use + if (isset($instance['filelist'])) { + // ignore files + if (isset($instance['filelist']['ignore'])) { + $ignore = isset($instance['filelist']['ignore'][0]) ? + $instance['filelist']['ignore'] : + array($instance['filelist']['ignore']); + foreach ($ignore as $ig) { + unset ($contents[$ig['attribs']['name']]); + } + } + // install files as this name + if (isset($instance['filelist']['install'])) { + $installas = isset($instance['filelist']['install'][0]) ? + $instance['filelist']['install'] : + array($instance['filelist']['install']); + foreach ($installas as $as) { + $contents[$as['attribs']['name']]['attribs']['install-as'] = + $as['attribs']['as']; + } + } + } + if ($forfilecheck) { + foreach ($contents as $file => $attrs) { + $contents[$file] = $attrs['attribs']; + } + } + return $contents; + } + } else { // simple release - no installconditions or install-as + if ($forfilecheck) { + return $this->getFilelist(); + } + return $contents; + } + // no releases matched + return PEAR::raiseError('No releases in package.xml matched the existing operating ' . + 'system, extensions installed, or architecture, cannot install'); + } + + /** + * This is only used at install-time, after all serialization + * is over. + * @param string file name + * @param string installed path + */ + function setInstalledAs($file, $path) + { + if ($path) { + return $this->_packageInfo['filelist'][$file]['installed_as'] = $path; + } + unset($this->_packageInfo['filelist'][$file]['installed_as']); + } + + function getInstalledLocation($file) + { + if (isset($this->_packageInfo['filelist'][$file]['installed_as'])) { + return $this->_packageInfo['filelist'][$file]['installed_as']; + } + return false; + } + + /** + * This is only used at install-time, after all serialization + * is over. + */ + function installedFile($file, $atts) + { + if (isset($this->_packageInfo['filelist'][$file])) { + $this->_packageInfo['filelist'][$file] = + array_merge($this->_packageInfo['filelist'][$file], $atts['attribs']); + } else { + $this->_packageInfo['filelist'][$file] = $atts['attribs']; + } + } + + /** + * Retrieve the contents tag + */ + function getContents() + { + if (isset($this->_packageInfo['contents'])) { + return $this->_packageInfo['contents']; + } + return false; + } + + /** + * @param string full path to file + * @param string attribute name + * @param string attribute value + * @param int risky but fast - use this to choose a file based on its position in the list + * of files. Index is zero-based like PHP arrays. + * @return bool success of operation + */ + function setFileAttribute($filename, $attr, $value, $index = false) + { + $this->_isValid = 0; + if (in_array($attr, array('role', 'name', 'baseinstalldir'))) { + $this->_filesValid = false; + } + if ($index !== false && + isset($this->_packageInfo['contents']['dir']['file'][$index]['attribs'])) { + $this->_packageInfo['contents']['dir']['file'][$index]['attribs'][$attr] = $value; + return true; + } + if (!isset($this->_packageInfo['contents']['dir']['file'])) { + return false; + } + $files = $this->_packageInfo['contents']['dir']['file']; + if (!isset($files[0])) { + $files = array($files); + $ind = false; + } else { + $ind = true; + } + foreach ($files as $i => $file) { + if (isset($file['attribs'])) { + if ($file['attribs']['name'] == $filename) { + if ($ind) { + $this->_packageInfo['contents']['dir']['file'][$i]['attribs'][$attr] = $value; + } else { + $this->_packageInfo['contents']['dir']['file']['attribs'][$attr] = $value; + } + return true; + } + } + } + return false; + } + + function setDirtree($path) + { + if (!isset($this->_packageInfo['dirtree'])) { + $this->_packageInfo['dirtree'] = array(); + } + $this->_packageInfo['dirtree'][$path] = true; + } + + function getDirtree() + { + if (isset($this->_packageInfo['dirtree']) && count($this->_packageInfo['dirtree'])) { + return $this->_packageInfo['dirtree']; + } + return false; + } + + function resetDirtree() + { + unset($this->_packageInfo['dirtree']); + } + + /** + * Determines whether this package claims it is compatible with the version of + * the package that has a recommended version dependency + * @param PEAR_PackageFile_v2|PEAR_PackageFile_v1|PEAR_Downloader_Package + * @return boolean + */ + function isCompatible($pf) + { + if (!isset($this->_packageInfo['compatible'])) { + return false; + } + if (!isset($this->_packageInfo['channel'])) { + return false; + } + $me = $pf->getVersion(); + $compatible = $this->_packageInfo['compatible']; + if (!isset($compatible[0])) { + $compatible = array($compatible); + } + $found = false; + foreach ($compatible as $info) { + if (strtolower($info['name']) == strtolower($pf->getPackage())) { + if (strtolower($info['channel']) == strtolower($pf->getChannel())) { + $found = true; + break; + } + } + } + if (!$found) { + return false; + } + if (isset($info['exclude'])) { + if (!isset($info['exclude'][0])) { + $info['exclude'] = array($info['exclude']); + } + foreach ($info['exclude'] as $exclude) { + if (version_compare($me, $exclude, '==')) { + return false; + } + } + } + if (version_compare($me, $info['min'], '>=') && version_compare($me, $info['max'], '<=')) { + return true; + } + return false; + } + + /** + * @return array|false + */ + function getCompatible() + { + if (isset($this->_packageInfo['compatible'])) { + return $this->_packageInfo['compatible']; + } + return false; + } + + function getDependencies() + { + if (isset($this->_packageInfo['dependencies'])) { + return $this->_packageInfo['dependencies']; + } + return false; + } + + function isSubpackageOf($p) + { + return $p->isSubpackage($this); + } + + /** + * Determines whether the passed in package is a subpackage of this package. + * + * No version checking is done, only name verification. + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @return bool + */ + function isSubpackage($p) + { + $sub = array(); + if (isset($this->_packageInfo['dependencies']['required']['subpackage'])) { + $sub = $this->_packageInfo['dependencies']['required']['subpackage']; + if (!isset($sub[0])) { + $sub = array($sub); + } + } + if (isset($this->_packageInfo['dependencies']['optional']['subpackage'])) { + $sub1 = $this->_packageInfo['dependencies']['optional']['subpackage']; + if (!isset($sub1[0])) { + $sub1 = array($sub1); + } + $sub = array_merge($sub, $sub1); + } + if (isset($this->_packageInfo['dependencies']['group'])) { + $group = $this->_packageInfo['dependencies']['group']; + if (!isset($group[0])) { + $group = array($group); + } + foreach ($group as $deps) { + if (isset($deps['subpackage'])) { + $sub2 = $deps['subpackage']; + if (!isset($sub2[0])) { + $sub2 = array($sub2); + } + $sub = array_merge($sub, $sub2); + } + } + } + foreach ($sub as $dep) { + if (strtolower($dep['name']) == strtolower($p->getPackage())) { + if (isset($dep['channel'])) { + if (strtolower($dep['channel']) == strtolower($p->getChannel())) { + return true; + } + } else { + if ($dep['uri'] == $p->getURI()) { + return true; + } + } + } + } + return false; + } + + function dependsOn($package, $channel) + { + if (!($deps = $this->getDependencies())) { + return false; + } + foreach (array('package', 'subpackage') as $type) { + foreach (array('required', 'optional') as $needed) { + if (isset($deps[$needed][$type])) { + if (!isset($deps[$needed][$type][0])) { + $deps[$needed][$type] = array($deps[$needed][$type]); + } + foreach ($deps[$needed][$type] as $dep) { + $depchannel = isset($dep['channel']) ? $dep['channel'] : '__uri'; + if (strtolower($dep['name']) == strtolower($package) && + $depchannel == $channel) { + return true; + } + } + } + } + if (isset($deps['group'])) { + if (!isset($deps['group'][0])) { + $dep['group'] = array($deps['group']); + } + foreach ($deps['group'] as $group) { + if (isset($group[$type])) { + if (!is_array($group[$type])) { + $group[$type] = array($group[$type]); + } + foreach ($group[$type] as $dep) { + $depchannel = isset($dep['channel']) ? $dep['channel'] : '__uri'; + if (strtolower($dep['name']) == strtolower($package) && + $depchannel == $channel) { + return true; + } + } + } + } + } + } + return false; + } + + /** + * Get the contents of a dependency group + * @param string + * @return array|false + */ + function getDependencyGroup($name) + { + $name = strtolower($name); + if (!isset($this->_packageInfo['dependencies']['group'])) { + return false; + } + $groups = $this->_packageInfo['dependencies']['group']; + if (!isset($groups[0])) { + $groups = array($groups); + } + foreach ($groups as $group) { + if (strtolower($group['attribs']['name']) == $name) { + return $group; + } + } + return false; + } + + /** + * Retrieve a partial package.xml 1.0 representation of dependencies + * + * a very limited representation of dependencies is returned by this method. + * The tag for excluding certain versions of a dependency is + * completely ignored. In addition, dependency groups are ignored, with the + * assumption that all dependencies in dependency groups are also listed in + * the optional group that work with all dependency groups + * @param boolean return package.xml 2.0 tag + * @return array|false + */ + function getDeps($raw = false, $nopearinstaller = false) + { + if (isset($this->_packageInfo['dependencies'])) { + if ($raw) { + return $this->_packageInfo['dependencies']; + } + $ret = array(); + $map = array( + 'php' => 'php', + 'package' => 'pkg', + 'subpackage' => 'pkg', + 'extension' => 'ext', + 'os' => 'os', + 'pearinstaller' => 'pkg', + ); + foreach (array('required', 'optional') as $type) { + $optional = ($type == 'optional') ? 'yes' : 'no'; + if (!isset($this->_packageInfo['dependencies'][$type]) + || empty($this->_packageInfo['dependencies'][$type])) { + continue; + } + foreach ($this->_packageInfo['dependencies'][$type] as $dtype => $deps) { + if ($dtype == 'pearinstaller' && $nopearinstaller) { + continue; + } + if (!isset($deps[0])) { + $deps = array($deps); + } + foreach ($deps as $dep) { + if (!isset($map[$dtype])) { + // no support for arch type + continue; + } + if ($dtype == 'pearinstaller') { + $dep['name'] = 'PEAR'; + $dep['channel'] = 'pear.php.net'; + } + $s = array('type' => $map[$dtype]); + if (isset($dep['channel'])) { + $s['channel'] = $dep['channel']; + } + if (isset($dep['uri'])) { + $s['uri'] = $dep['uri']; + } + if (isset($dep['name'])) { + $s['name'] = $dep['name']; + } + if (isset($dep['conflicts'])) { + $s['rel'] = 'not'; + } else { + if (!isset($dep['min']) && + !isset($dep['max'])) { + $s['rel'] = 'has'; + $s['optional'] = $optional; + } elseif (isset($dep['min']) && + isset($dep['max'])) { + $s['rel'] = 'ge'; + $s1 = $s; + $s1['rel'] = 'le'; + $s['version'] = $dep['min']; + $s1['version'] = $dep['max']; + if (isset($dep['channel'])) { + $s1['channel'] = $dep['channel']; + } + if ($dtype != 'php') { + $s['name'] = $dep['name']; + $s1['name'] = $dep['name']; + } + $s['optional'] = $optional; + $s1['optional'] = $optional; + $ret[] = $s1; + } elseif (isset($dep['min'])) { + if (isset($dep['exclude']) && + $dep['exclude'] == $dep['min']) { + $s['rel'] = 'gt'; + } else { + $s['rel'] = 'ge'; + } + $s['version'] = $dep['min']; + $s['optional'] = $optional; + if ($dtype != 'php') { + $s['name'] = $dep['name']; + } + } elseif (isset($dep['max'])) { + if (isset($dep['exclude']) && + $dep['exclude'] == $dep['max']) { + $s['rel'] = 'lt'; + } else { + $s['rel'] = 'le'; + } + $s['version'] = $dep['max']; + $s['optional'] = $optional; + if ($dtype != 'php') { + $s['name'] = $dep['name']; + } + } + } + $ret[] = $s; + } + } + } + if (count($ret)) { + return $ret; + } + } + return false; + } + + /** + * @return php|extsrc|extbin|zendextsrc|zendextbin|bundle|false + */ + function getPackageType() + { + if (isset($this->_packageInfo['phprelease'])) { + return 'php'; + } + if (isset($this->_packageInfo['extsrcrelease'])) { + return 'extsrc'; + } + if (isset($this->_packageInfo['extbinrelease'])) { + return 'extbin'; + } + if (isset($this->_packageInfo['zendextsrcrelease'])) { + return 'zendextsrc'; + } + if (isset($this->_packageInfo['zendextbinrelease'])) { + return 'zendextbin'; + } + if (isset($this->_packageInfo['bundle'])) { + return 'bundle'; + } + return false; + } + + /** + * @return array|false + */ + function getReleases() + { + $type = $this->getPackageType(); + if ($type != 'bundle') { + $type .= 'release'; + } + if ($this->getPackageType() && isset($this->_packageInfo[$type])) { + return $this->_packageInfo[$type]; + } + return false; + } + + /** + * @return array + */ + function getChangelog() + { + if (isset($this->_packageInfo['changelog'])) { + return $this->_packageInfo['changelog']; + } + return false; + } + + function hasDeps() + { + return isset($this->_packageInfo['dependencies']); + } + + function getPackagexmlVersion() + { + if (isset($this->_packageInfo['zendextsrcrelease'])) { + return '2.1'; + } + if (isset($this->_packageInfo['zendextbinrelease'])) { + return '2.1'; + } + return '2.0'; + } + + /** + * @return array|false + */ + function getSourcePackage() + { + if (isset($this->_packageInfo['extbinrelease']) || + isset($this->_packageInfo['zendextbinrelease'])) { + return array('channel' => $this->_packageInfo['srcchannel'], + 'package' => $this->_packageInfo['srcpackage']); + } + return false; + } + + function getBundledPackages() + { + if (isset($this->_packageInfo['bundle'])) { + return $this->_packageInfo['contents']['bundledpackage']; + } + return false; + } + + function getLastModified() + { + if (isset($this->_packageInfo['_lastmodified'])) { + return $this->_packageInfo['_lastmodified']; + } + return false; + } + + /** + * Get the contents of a file listed within the package.xml + * @param string + * @return string + */ + function getFileContents($file) + { + if ($this->_archiveFile == $this->_packageFile) { // unpacked + $dir = dirname($this->_packageFile); + $file = $dir . DIRECTORY_SEPARATOR . $file; + $file = str_replace(array('/', '\\'), + array(DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR), $file); + if (file_exists($file) && is_readable($file)) { + return implode('', file($file)); + } + } else { // tgz + $tar = &new Archive_Tar($this->_archiveFile); + $tar->pushErrorHandling(PEAR_ERROR_RETURN); + if ($file != 'package.xml' && $file != 'package2.xml') { + $file = $this->getPackage() . '-' . $this->getVersion() . '/' . $file; + } + $file = $tar->extractInString($file); + $tar->popErrorHandling(); + if (PEAR::isError($file)) { + return PEAR::raiseError("Cannot locate file '$file' in archive"); + } + return $file; + } + } + + function &getRW() + { + if (!class_exists('PEAR_PackageFile_v2_rw')) { + require_once 'PEAR/PackageFile/v2/rw.php'; + } + $a = new PEAR_PackageFile_v2_rw; + foreach (get_object_vars($this) as $name => $unused) { + if (!isset($this->$name)) { + continue; + } + if ($name == '_config' || $name == '_logger'|| $name == '_registry' || + $name == '_stack') { + $a->$name = &$this->$name; + } else { + $a->$name = $this->$name; + } + } + return $a; + } + + function &getDefaultGenerator() + { + if (!class_exists('PEAR_PackageFile_Generator_v2')) { + require_once 'PEAR/PackageFile/Generator/v2.php'; + } + $a = &new PEAR_PackageFile_Generator_v2($this); + return $a; + } + + function analyzeSourceCode($file, $string = false) + { + if (!isset($this->_v2Validator) || + !is_a($this->_v2Validator, 'PEAR_PackageFile_v2_Validator')) { + if (!class_exists('PEAR_PackageFile_v2_Validator')) { + require_once 'PEAR/PackageFile/v2/Validator.php'; + } + $this->_v2Validator = new PEAR_PackageFile_v2_Validator; + } + return $this->_v2Validator->analyzeSourceCode($file, $string); + } + + function validate($state = PEAR_VALIDATE_NORMAL) + { + if (!isset($this->_packageInfo) || !is_array($this->_packageInfo)) { + return false; + } + if (!isset($this->_v2Validator) || + !is_a($this->_v2Validator, 'PEAR_PackageFile_v2_Validator')) { + if (!class_exists('PEAR_PackageFile_v2_Validator')) { + require_once 'PEAR/PackageFile/v2/Validator.php'; + } + $this->_v2Validator = new PEAR_PackageFile_v2_Validator; + } + if (isset($this->_packageInfo['xsdversion'])) { + unset($this->_packageInfo['xsdversion']); + } + return $this->_v2Validator->validate($this, $state); + } + + function getTasksNs() + { + if (!isset($this->_tasksNs)) { + if (isset($this->_packageInfo['attribs'])) { + foreach ($this->_packageInfo['attribs'] as $name => $value) { + if ($value == 'http://pear.php.net/dtd/tasks-1.0') { + $this->_tasksNs = str_replace('xmlns:', '', $name); + break; + } + } + } + } + return $this->_tasksNs; + } + + /** + * Determine whether a task name is a valid task. Custom tasks may be defined + * using subdirectories by putting a "-" in the name, as in + * + * Note that this method will auto-load the task class file and test for the existence + * of the name with "-" replaced by "_" as in PEAR/Task/mycustom/task.php makes class + * PEAR_Task_mycustom_task + * @param string + * @return boolean + */ + function getTask($task) + { + $this->getTasksNs(); + // transform all '-' to '/' and 'tasks:' to '' so tasks:replace becomes replace + $task = str_replace(array($this->_tasksNs . ':', '-'), array('', ' '), $task); + $taskfile = str_replace(' ', '/', ucwords($task)); + $task = str_replace(array(' ', '/'), '_', ucwords($task)); + if (class_exists("PEAR_Task_$task")) { + return "PEAR_Task_$task"; + } + $fp = @fopen("PEAR/Task/$taskfile.php", 'r', true); + if ($fp) { + fclose($fp); + require_once "PEAR/Task/$taskfile.php"; + return "PEAR_Task_$task"; + } + return false; + } + + /** + * Key-friendly array_splice + * @param tagname to splice a value in before + * @param mixed the value to splice in + * @param string the new tag name + */ + function _ksplice($array, $key, $value, $newkey) + { + $offset = array_search($key, array_keys($array)); + $after = array_slice($array, $offset); + $before = array_slice($array, 0, $offset); + $before[$newkey] = $value; + return array_merge($before, $after); + } + + /** + * @param array a list of possible keys, in the order they may occur + * @param mixed contents of the new package.xml tag + * @param string tag name + * @access private + */ + function _insertBefore($array, $keys, $contents, $newkey) + { + foreach ($keys as $key) { + if (isset($array[$key])) { + return $array = $this->_ksplice($array, $key, $contents, $newkey); + } + } + $array[$newkey] = $contents; + return $array; + } + + /** + * @param subsection of {@link $_packageInfo} + * @param array|string tag contents + * @param array format: + *
        +     * array(
        +     *   tagname => array(list of tag names that follow this one),
        +     *   childtagname => array(list of child tag names that follow this one),
        +     * )
        +     * 
        + * + * This allows construction of nested tags + * @access private + */ + function _mergeTag($manip, $contents, $order) + { + if (count($order)) { + foreach ($order as $tag => $curorder) { + if (!isset($manip[$tag])) { + // ensure that the tag is set up + $manip = $this->_insertBefore($manip, $curorder, array(), $tag); + } + if (count($order) > 1) { + $manip[$tag] = $this->_mergeTag($manip[$tag], $contents, array_slice($order, 1)); + return $manip; + } + } + } else { + return $manip; + } + if (is_array($manip[$tag]) && !empty($manip[$tag]) && isset($manip[$tag][0])) { + $manip[$tag][] = $contents; + } else { + if (!count($manip[$tag])) { + $manip[$tag] = $contents; + } else { + $manip[$tag] = array($manip[$tag]); + $manip[$tag][] = $contents; + } + } + return $manip; + } +} +?> diff --git a/_piecrust/libs/PEAR/PackageFile/v2/Validator.php b/_piecrust/libs/PEAR/PackageFile/v2/Validator.php new file mode 100644 index 0000000..33c8eee --- /dev/null +++ b/_piecrust/libs/PEAR/PackageFile/v2/Validator.php @@ -0,0 +1,2154 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Validator.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a8 + */ +/** + * Private validation class used by PEAR_PackageFile_v2 - do not use directly, its + * sole purpose is to split up the PEAR/PackageFile/v2.php file to make it smaller + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a8 + * @access private + */ +class PEAR_PackageFile_v2_Validator +{ + /** + * @var array + */ + var $_packageInfo; + /** + * @var PEAR_PackageFile_v2 + */ + var $_pf; + /** + * @var PEAR_ErrorStack + */ + var $_stack; + /** + * @var int + */ + var $_isValid = 0; + /** + * @var int + */ + var $_filesValid = 0; + /** + * @var int + */ + var $_curState = 0; + /** + * @param PEAR_PackageFile_v2 + * @param int + */ + function validate(&$pf, $state = PEAR_VALIDATE_NORMAL) + { + $this->_pf = &$pf; + $this->_curState = $state; + $this->_packageInfo = $this->_pf->getArray(); + $this->_isValid = $this->_pf->_isValid; + $this->_filesValid = $this->_pf->_filesValid; + $this->_stack = &$pf->_stack; + $this->_stack->getErrors(true); + if (($this->_isValid & $state) == $state) { + return true; + } + if (!isset($this->_packageInfo) || !is_array($this->_packageInfo)) { + return false; + } + if (!isset($this->_packageInfo['attribs']['version']) || + ($this->_packageInfo['attribs']['version'] != '2.0' && + $this->_packageInfo['attribs']['version'] != '2.1') + ) { + $this->_noPackageVersion(); + } + $structure = + array( + 'name', + 'channel|uri', + '*extends', // can't be multiple, but this works fine + 'summary', + 'description', + '+lead', // these all need content checks + '*developer', + '*contributor', + '*helper', + 'date', + '*time', + 'version', + 'stability', + 'license->?uri->?filesource', + 'notes', + 'contents', //special validation needed + '*compatible', + 'dependencies', //special validation needed + '*usesrole', + '*usestask', // reserve these for 1.4.0a1 to implement + // this will allow a package.xml to gracefully say it + // needs a certain package installed in order to implement a role or task + '*providesextension', + '*srcpackage|*srcuri', + '+phprelease|+extsrcrelease|+extbinrelease|' . + '+zendextsrcrelease|+zendextbinrelease|bundle', //special validation needed + '*changelog', + ); + $test = $this->_packageInfo; + if (isset($test['dependencies']) && + isset($test['dependencies']['required']) && + isset($test['dependencies']['required']['pearinstaller']) && + isset($test['dependencies']['required']['pearinstaller']['min']) && + version_compare('1.9.4', + $test['dependencies']['required']['pearinstaller']['min'], '<') + ) { + $this->_pearVersionTooLow($test['dependencies']['required']['pearinstaller']['min']); + return false; + } + // ignore post-installation array fields + if (array_key_exists('filelist', $test)) { + unset($test['filelist']); + } + if (array_key_exists('_lastmodified', $test)) { + unset($test['_lastmodified']); + } + if (array_key_exists('#binarypackage', $test)) { + unset($test['#binarypackage']); + } + if (array_key_exists('old', $test)) { + unset($test['old']); + } + if (array_key_exists('_lastversion', $test)) { + unset($test['_lastversion']); + } + if (!$this->_stupidSchemaValidate($structure, $test, '')) { + return false; + } + if (empty($this->_packageInfo['name'])) { + $this->_tagCannotBeEmpty('name'); + } + $test = isset($this->_packageInfo['uri']) ? 'uri' :'channel'; + if (empty($this->_packageInfo[$test])) { + $this->_tagCannotBeEmpty($test); + } + if (is_array($this->_packageInfo['license']) && + (!isset($this->_packageInfo['license']['_content']) || + empty($this->_packageInfo['license']['_content']))) { + $this->_tagCannotBeEmpty('license'); + } elseif (empty($this->_packageInfo['license'])) { + $this->_tagCannotBeEmpty('license'); + } + if (empty($this->_packageInfo['summary'])) { + $this->_tagCannotBeEmpty('summary'); + } + if (empty($this->_packageInfo['description'])) { + $this->_tagCannotBeEmpty('description'); + } + if (empty($this->_packageInfo['date'])) { + $this->_tagCannotBeEmpty('date'); + } + if (empty($this->_packageInfo['notes'])) { + $this->_tagCannotBeEmpty('notes'); + } + if (isset($this->_packageInfo['time']) && empty($this->_packageInfo['time'])) { + $this->_tagCannotBeEmpty('time'); + } + if (isset($this->_packageInfo['dependencies'])) { + $this->_validateDependencies(); + } + if (isset($this->_packageInfo['compatible'])) { + $this->_validateCompatible(); + } + if (!isset($this->_packageInfo['bundle'])) { + if (empty($this->_packageInfo['contents'])) { + $this->_tagCannotBeEmpty('contents'); + } + if (!isset($this->_packageInfo['contents']['dir'])) { + $this->_filelistMustContainDir('contents'); + return false; + } + if (isset($this->_packageInfo['contents']['file'])) { + $this->_filelistCannotContainFile('contents'); + return false; + } + } + $this->_validateMaintainers(); + $this->_validateStabilityVersion(); + $fail = false; + if (array_key_exists('usesrole', $this->_packageInfo)) { + $roles = $this->_packageInfo['usesrole']; + if (!is_array($roles) || !isset($roles[0])) { + $roles = array($roles); + } + foreach ($roles as $role) { + if (!isset($role['role'])) { + $this->_usesroletaskMustHaveRoleTask('usesrole', 'role'); + $fail = true; + } else { + if (!isset($role['channel'])) { + if (!isset($role['uri'])) { + $this->_usesroletaskMustHaveChannelOrUri($role['role'], 'usesrole'); + $fail = true; + } + } elseif (!isset($role['package'])) { + $this->_usesroletaskMustHavePackage($role['role'], 'usesrole'); + $fail = true; + } + } + } + } + if (array_key_exists('usestask', $this->_packageInfo)) { + $roles = $this->_packageInfo['usestask']; + if (!is_array($roles) || !isset($roles[0])) { + $roles = array($roles); + } + foreach ($roles as $role) { + if (!isset($role['task'])) { + $this->_usesroletaskMustHaveRoleTask('usestask', 'task'); + $fail = true; + } else { + if (!isset($role['channel'])) { + if (!isset($role['uri'])) { + $this->_usesroletaskMustHaveChannelOrUri($role['task'], 'usestask'); + $fail = true; + } + } elseif (!isset($role['package'])) { + $this->_usesroletaskMustHavePackage($role['task'], 'usestask'); + $fail = true; + } + } + } + } + + if ($fail) { + return false; + } + + $list = $this->_packageInfo['contents']; + if (isset($list['dir']) && is_array($list['dir']) && isset($list['dir'][0])) { + $this->_multipleToplevelDirNotAllowed(); + return $this->_isValid = 0; + } + + $this->_validateFilelist(); + $this->_validateRelease(); + if (!$this->_stack->hasErrors()) { + $chan = $this->_pf->_registry->getChannel($this->_pf->getChannel(), true); + if (PEAR::isError($chan)) { + $this->_unknownChannel($this->_pf->getChannel()); + } else { + $valpack = $chan->getValidationPackage(); + // for channel validator packages, always use the default PEAR validator. + // otherwise, they can't be installed or packaged + $validator = $chan->getValidationObject($this->_pf->getPackage()); + if (!$validator) { + $this->_stack->push(__FUNCTION__, 'error', + array('channel' => $chan->getName(), + 'package' => $this->_pf->getPackage(), + 'name' => $valpack['_content'], + 'version' => $valpack['attribs']['version']), + 'package "%channel%/%package%" cannot be properly validated without ' . + 'validation package "%channel%/%name%-%version%"'); + return $this->_isValid = 0; + } + $validator->setPackageFile($this->_pf); + $validator->validate($state); + $failures = $validator->getFailures(); + foreach ($failures['errors'] as $error) { + $this->_stack->push(__FUNCTION__, 'error', $error, + 'Channel validator error: field "%field%" - %reason%'); + } + foreach ($failures['warnings'] as $warning) { + $this->_stack->push(__FUNCTION__, 'warning', $warning, + 'Channel validator warning: field "%field%" - %reason%'); + } + } + } + + $this->_pf->_isValid = $this->_isValid = !$this->_stack->hasErrors('error'); + if ($this->_isValid && $state == PEAR_VALIDATE_PACKAGING && !$this->_filesValid) { + if ($this->_pf->getPackageType() == 'bundle') { + if ($this->_analyzeBundledPackages()) { + $this->_filesValid = $this->_pf->_filesValid = true; + } else { + $this->_pf->_isValid = $this->_isValid = 0; + } + } else { + if (!$this->_analyzePhpFiles()) { + $this->_pf->_isValid = $this->_isValid = 0; + } else { + $this->_filesValid = $this->_pf->_filesValid = true; + } + } + } + + if ($this->_isValid) { + return $this->_pf->_isValid = $this->_isValid = $state; + } + + return $this->_pf->_isValid = $this->_isValid = 0; + } + + function _stupidSchemaValidate($structure, $xml, $root) + { + if (!is_array($xml)) { + $xml = array(); + } + $keys = array_keys($xml); + reset($keys); + $key = current($keys); + while ($key == 'attribs' || $key == '_contents') { + $key = next($keys); + } + $unfoundtags = $optionaltags = array(); + $ret = true; + $mismatch = false; + foreach ($structure as $struc) { + if ($key) { + $tag = $xml[$key]; + } + $test = $this->_processStructure($struc); + if (isset($test['choices'])) { + $loose = true; + foreach ($test['choices'] as $choice) { + if ($key == $choice['tag']) { + $key = next($keys); + while ($key == 'attribs' || $key == '_contents') { + $key = next($keys); + } + $unfoundtags = $optionaltags = array(); + $mismatch = false; + if ($key && $key != $choice['tag'] && isset($choice['multiple'])) { + $unfoundtags[] = $choice['tag']; + $optionaltags[] = $choice['tag']; + if ($key) { + $mismatch = true; + } + } + $ret &= $this->_processAttribs($choice, $tag, $root); + continue 2; + } else { + $unfoundtags[] = $choice['tag']; + $mismatch = true; + } + if (!isset($choice['multiple']) || $choice['multiple'] != '*') { + $loose = false; + } else { + $optionaltags[] = $choice['tag']; + } + } + if (!$loose) { + $this->_invalidTagOrder($unfoundtags, $key, $root); + return false; + } + } else { + if ($key != $test['tag']) { + if (isset($test['multiple']) && $test['multiple'] != '*') { + $unfoundtags[] = $test['tag']; + $this->_invalidTagOrder($unfoundtags, $key, $root); + return false; + } else { + if ($key) { + $mismatch = true; + } + $unfoundtags[] = $test['tag']; + $optionaltags[] = $test['tag']; + } + if (!isset($test['multiple'])) { + $this->_invalidTagOrder($unfoundtags, $key, $root); + return false; + } + continue; + } else { + $unfoundtags = $optionaltags = array(); + $mismatch = false; + } + $key = next($keys); + while ($key == 'attribs' || $key == '_contents') { + $key = next($keys); + } + if ($key && $key != $test['tag'] && isset($test['multiple'])) { + $unfoundtags[] = $test['tag']; + $optionaltags[] = $test['tag']; + $mismatch = true; + } + $ret &= $this->_processAttribs($test, $tag, $root); + continue; + } + } + if (!$mismatch && count($optionaltags)) { + // don't error out on any optional tags + $unfoundtags = array_diff($unfoundtags, $optionaltags); + } + if (count($unfoundtags)) { + $this->_invalidTagOrder($unfoundtags, $key, $root); + } elseif ($key) { + // unknown tags + $this->_invalidTagOrder('*no tags allowed here*', $key, $root); + while ($key = next($keys)) { + $this->_invalidTagOrder('*no tags allowed here*', $key, $root); + } + } + return $ret; + } + + function _processAttribs($choice, $tag, $context) + { + if (isset($choice['attribs'])) { + if (!is_array($tag)) { + $tag = array($tag); + } + $tags = $tag; + if (!isset($tags[0])) { + $tags = array($tags); + } + $ret = true; + foreach ($tags as $i => $tag) { + if (!is_array($tag) || !isset($tag['attribs'])) { + foreach ($choice['attribs'] as $attrib) { + if ($attrib{0} != '?') { + $ret &= $this->_tagHasNoAttribs($choice['tag'], + $context); + continue 2; + } + } + } + foreach ($choice['attribs'] as $attrib) { + if ($attrib{0} != '?') { + if (!isset($tag['attribs'][$attrib])) { + $ret &= $this->_tagMissingAttribute($choice['tag'], + $attrib, $context); + } + } + } + } + return $ret; + } + return true; + } + + function _processStructure($key) + { + $ret = array(); + if (count($pieces = explode('|', $key)) > 1) { + $ret['choices'] = array(); + foreach ($pieces as $piece) { + $ret['choices'][] = $this->_processStructure($piece); + } + return $ret; + } + $multi = $key{0}; + if ($multi == '+' || $multi == '*') { + $ret['multiple'] = $key{0}; + $key = substr($key, 1); + } + if (count($attrs = explode('->', $key)) > 1) { + $ret['tag'] = array_shift($attrs); + $ret['attribs'] = $attrs; + } else { + $ret['tag'] = $key; + } + return $ret; + } + + function _validateStabilityVersion() + { + $structure = array('release', 'api'); + $a = $this->_stupidSchemaValidate($structure, $this->_packageInfo['version'], ''); + $a &= $this->_stupidSchemaValidate($structure, $this->_packageInfo['stability'], ''); + if ($a) { + if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', + $this->_packageInfo['version']['release'])) { + $this->_invalidVersion('release', $this->_packageInfo['version']['release']); + } + if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', + $this->_packageInfo['version']['api'])) { + $this->_invalidVersion('api', $this->_packageInfo['version']['api']); + } + if (!in_array($this->_packageInfo['stability']['release'], + array('snapshot', 'devel', 'alpha', 'beta', 'stable'))) { + $this->_invalidState('release', $this->_packageInfo['stability']['release']); + } + if (!in_array($this->_packageInfo['stability']['api'], + array('devel', 'alpha', 'beta', 'stable'))) { + $this->_invalidState('api', $this->_packageInfo['stability']['api']); + } + } + } + + function _validateMaintainers() + { + $structure = + array( + 'name', + 'user', + 'email', + 'active', + ); + foreach (array('lead', 'developer', 'contributor', 'helper') as $type) { + if (!isset($this->_packageInfo[$type])) { + continue; + } + if (isset($this->_packageInfo[$type][0])) { + foreach ($this->_packageInfo[$type] as $lead) { + $this->_stupidSchemaValidate($structure, $lead, '<' . $type . '>'); + } + } else { + $this->_stupidSchemaValidate($structure, $this->_packageInfo[$type], + '<' . $type . '>'); + } + } + } + + function _validatePhpDep($dep, $installcondition = false) + { + $structure = array( + 'min', + '*max', + '*exclude', + ); + $type = $installcondition ? '' : ''; + $this->_stupidSchemaValidate($structure, $dep, $type); + if (isset($dep['min'])) { + if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?(?:-[a-zA-Z0-9]+)?\\z/', + $dep['min'])) { + $this->_invalidVersion($type . '', $dep['min']); + } + } + if (isset($dep['max'])) { + if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?(?:-[a-zA-Z0-9]+)?\\z/', + $dep['max'])) { + $this->_invalidVersion($type . '', $dep['max']); + } + } + if (isset($dep['exclude'])) { + if (!is_array($dep['exclude'])) { + $dep['exclude'] = array($dep['exclude']); + } + foreach ($dep['exclude'] as $exclude) { + if (!preg_match( + '/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?(?:-[a-zA-Z0-9]+)?\\z/', + $exclude)) { + $this->_invalidVersion($type . '', $exclude); + } + } + } + } + + function _validatePearinstallerDep($dep) + { + $structure = array( + 'min', + '*max', + '*recommended', + '*exclude', + ); + $this->_stupidSchemaValidate($structure, $dep, ''); + if (isset($dep['min'])) { + if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', + $dep['min'])) { + $this->_invalidVersion('', + $dep['min']); + } + } + if (isset($dep['max'])) { + if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', + $dep['max'])) { + $this->_invalidVersion('', + $dep['max']); + } + } + if (isset($dep['recommended'])) { + if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', + $dep['recommended'])) { + $this->_invalidVersion('', + $dep['recommended']); + } + } + if (isset($dep['exclude'])) { + if (!is_array($dep['exclude'])) { + $dep['exclude'] = array($dep['exclude']); + } + foreach ($dep['exclude'] as $exclude) { + if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', + $exclude)) { + $this->_invalidVersion('', + $exclude); + } + } + } + } + + function _validatePackageDep($dep, $group, $type = '') + { + if (isset($dep['uri'])) { + if (isset($dep['conflicts'])) { + $structure = array( + 'name', + 'uri', + 'conflicts', + '*providesextension', + ); + } else { + $structure = array( + 'name', + 'uri', + '*providesextension', + ); + } + } else { + if (isset($dep['conflicts'])) { + $structure = array( + 'name', + 'channel', + '*min', + '*max', + '*exclude', + 'conflicts', + '*providesextension', + ); + } else { + $structure = array( + 'name', + 'channel', + '*min', + '*max', + '*recommended', + '*exclude', + '*nodefault', + '*providesextension', + ); + } + } + if (isset($dep['name'])) { + $type .= '' . $dep['name'] . ''; + } + $this->_stupidSchemaValidate($structure, $dep, '' . $group . $type); + if (isset($dep['uri']) && (isset($dep['min']) || isset($dep['max']) || + isset($dep['recommended']) || isset($dep['exclude']))) { + $this->_uriDepsCannotHaveVersioning('' . $group . $type); + } + if (isset($dep['channel']) && strtolower($dep['channel']) == '__uri') { + $this->_DepchannelCannotBeUri('' . $group . $type); + } + if (isset($dep['min'])) { + if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', + $dep['min'])) { + $this->_invalidVersion('' . $group . $type . '', $dep['min']); + } + } + if (isset($dep['max'])) { + if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', + $dep['max'])) { + $this->_invalidVersion('' . $group . $type . '', $dep['max']); + } + } + if (isset($dep['recommended'])) { + if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', + $dep['recommended'])) { + $this->_invalidVersion('' . $group . $type . '', + $dep['recommended']); + } + } + if (isset($dep['exclude'])) { + if (!is_array($dep['exclude'])) { + $dep['exclude'] = array($dep['exclude']); + } + foreach ($dep['exclude'] as $exclude) { + if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', + $exclude)) { + $this->_invalidVersion('' . $group . $type . '', + $exclude); + } + } + } + } + + function _validateSubpackageDep($dep, $group) + { + $this->_validatePackageDep($dep, $group, ''); + if (isset($dep['providesextension'])) { + $this->_subpackageCannotProvideExtension(isset($dep['name']) ? $dep['name'] : ''); + } + if (isset($dep['conflicts'])) { + $this->_subpackagesCannotConflict(isset($dep['name']) ? $dep['name'] : ''); + } + } + + function _validateExtensionDep($dep, $group = false, $installcondition = false) + { + if (isset($dep['conflicts'])) { + $structure = array( + 'name', + '*min', + '*max', + '*exclude', + 'conflicts', + ); + } else { + $structure = array( + 'name', + '*min', + '*max', + '*recommended', + '*exclude', + ); + } + if ($installcondition) { + $type = ''; + } else { + $type = '' . $group . ''; + } + if (isset($dep['name'])) { + $type .= '' . $dep['name'] . ''; + } + $this->_stupidSchemaValidate($structure, $dep, $type); + if (isset($dep['min'])) { + if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', + $dep['min'])) { + $this->_invalidVersion(substr($type, 1) . '_invalidVersion(substr($type, 1) . '_invalidVersion(substr($type, 1) . '_invalidVersion(substr($type, 1) . '' : ''; + if ($this->_stupidSchemaValidate($structure, $dep, $type)) { + if ($dep['name'] == '*') { + if (array_key_exists('conflicts', $dep)) { + $this->_cannotConflictWithAllOs($type); + } + } + } + } + + function _validateArchDep($dep, $installcondition = false) + { + $structure = array( + 'pattern', + '*conflicts', + ); + $type = $installcondition ? '' : ''; + $this->_stupidSchemaValidate($structure, $dep, $type); + } + + function _validateInstallConditions($cond, $release) + { + $structure = array( + '*php', + '*extension', + '*os', + '*arch', + ); + if (!$this->_stupidSchemaValidate($structure, + $cond, $release)) { + return false; + } + foreach (array('php', 'extension', 'os', 'arch') as $type) { + if (isset($cond[$type])) { + $iter = $cond[$type]; + if (!is_array($iter) || !isset($iter[0])) { + $iter = array($iter); + } + foreach ($iter as $package) { + if ($type == 'extension') { + $this->{"_validate{$type}Dep"}($package, false, true); + } else { + $this->{"_validate{$type}Dep"}($package, true); + } + } + } + } + } + + function _validateDependencies() + { + $structure = array( + 'required', + '*optional', + '*group->name->hint' + ); + if (!$this->_stupidSchemaValidate($structure, + $this->_packageInfo['dependencies'], '')) { + return false; + } + foreach (array('required', 'optional') as $simpledep) { + if (isset($this->_packageInfo['dependencies'][$simpledep])) { + if ($simpledep == 'optional') { + $structure = array( + '*package', + '*subpackage', + '*extension', + ); + } else { + $structure = array( + 'php', + 'pearinstaller', + '*package', + '*subpackage', + '*extension', + '*os', + '*arch', + ); + } + if ($this->_stupidSchemaValidate($structure, + $this->_packageInfo['dependencies'][$simpledep], + "<$simpledep>")) { + foreach (array('package', 'subpackage', 'extension') as $type) { + if (isset($this->_packageInfo['dependencies'][$simpledep][$type])) { + $iter = $this->_packageInfo['dependencies'][$simpledep][$type]; + if (!isset($iter[0])) { + $iter = array($iter); + } + foreach ($iter as $package) { + if ($type != 'extension') { + if (isset($package['uri'])) { + if (isset($package['channel'])) { + $this->_UrlOrChannel($type, + $package['name']); + } + } else { + if (!isset($package['channel'])) { + $this->_NoChannel($type, $package['name']); + } + } + } + $this->{"_validate{$type}Dep"}($package, "<$simpledep>"); + } + } + } + if ($simpledep == 'optional') { + continue; + } + foreach (array('php', 'pearinstaller', 'os', 'arch') as $type) { + if (isset($this->_packageInfo['dependencies'][$simpledep][$type])) { + $iter = $this->_packageInfo['dependencies'][$simpledep][$type]; + if (!isset($iter[0])) { + $iter = array($iter); + } + foreach ($iter as $package) { + $this->{"_validate{$type}Dep"}($package); + } + } + } + } + } + } + if (isset($this->_packageInfo['dependencies']['group'])) { + $groups = $this->_packageInfo['dependencies']['group']; + if (!isset($groups[0])) { + $groups = array($groups); + } + $structure = array( + '*package', + '*subpackage', + '*extension', + ); + foreach ($groups as $group) { + if ($this->_stupidSchemaValidate($structure, $group, '')) { + if (!PEAR_Validate::validGroupName($group['attribs']['name'])) { + $this->_invalidDepGroupName($group['attribs']['name']); + } + foreach (array('package', 'subpackage', 'extension') as $type) { + if (isset($group[$type])) { + $iter = $group[$type]; + if (!isset($iter[0])) { + $iter = array($iter); + } + foreach ($iter as $package) { + if ($type != 'extension') { + if (isset($package['uri'])) { + if (isset($package['channel'])) { + $this->_UrlOrChannelGroup($type, + $package['name'], + $group['name']); + } + } else { + if (!isset($package['channel'])) { + $this->_NoChannelGroup($type, + $package['name'], + $group['name']); + } + } + } + $this->{"_validate{$type}Dep"}($package, ''); + } + } + } + } + } + } + } + + function _validateCompatible() + { + $compat = $this->_packageInfo['compatible']; + if (!isset($compat[0])) { + $compat = array($compat); + } + $required = array('name', 'channel', 'min', 'max', '*exclude'); + foreach ($compat as $package) { + $type = ''; + if (is_array($package) && array_key_exists('name', $package)) { + $type .= '' . $package['name'] . ''; + } + $this->_stupidSchemaValidate($required, $package, $type); + if (is_array($package) && array_key_exists('min', $package)) { + if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', + $package['min'])) { + $this->_invalidVersion(substr($type, 1) . '_invalidVersion(substr($type, 1) . '_invalidVersion(substr($type, 1) . '_NoBundledPackages(); + } + if (!is_array($list['bundledpackage']) || !isset($list['bundledpackage'][0])) { + return $this->_AtLeast2BundledPackages(); + } + foreach ($list['bundledpackage'] as $package) { + if (!is_string($package)) { + $this->_bundledPackagesMustBeFilename(); + } + } + } + + function _validateFilelist($list = false, $allowignore = false, $dirs = '') + { + $iscontents = false; + if (!$list) { + $iscontents = true; + $list = $this->_packageInfo['contents']; + if (isset($this->_packageInfo['bundle'])) { + return $this->_validateBundle($list); + } + } + if ($allowignore) { + $struc = array( + '*install->name->as', + '*ignore->name' + ); + } else { + $struc = array( + '*dir->name->?baseinstalldir', + '*file->name->role->?baseinstalldir->?md5sum' + ); + if (isset($list['dir']) && isset($list['file'])) { + // stave off validation errors without requiring a set order. + $_old = $list; + if (isset($list['attribs'])) { + $list = array('attribs' => $_old['attribs']); + } + $list['dir'] = $_old['dir']; + $list['file'] = $_old['file']; + } + } + if (!isset($list['attribs']) || !isset($list['attribs']['name'])) { + $unknown = $allowignore ? '' : ''; + $dirname = $iscontents ? '' : $unknown; + } else { + $dirname = ''; + if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~', + str_replace('\\', '/', $list['attribs']['name']))) { + // file contains .. parent directory or . cur directory + $this->_invalidDirName($list['attribs']['name']); + } + } + $res = $this->_stupidSchemaValidate($struc, $list, $dirname); + if ($allowignore && $res) { + $ignored_or_installed = array(); + $this->_pf->getFilelist(); + $fcontents = $this->_pf->getContents(); + $filelist = array(); + if (!isset($fcontents['dir']['file'][0])) { + $fcontents['dir']['file'] = array($fcontents['dir']['file']); + } + foreach ($fcontents['dir']['file'] as $file) { + $filelist[$file['attribs']['name']] = true; + } + if (isset($list['install'])) { + if (!isset($list['install'][0])) { + $list['install'] = array($list['install']); + } + foreach ($list['install'] as $file) { + if (!isset($filelist[$file['attribs']['name']])) { + $this->_notInContents($file['attribs']['name'], 'install'); + continue; + } + if (array_key_exists($file['attribs']['name'], $ignored_or_installed)) { + $this->_multipleInstallAs($file['attribs']['name']); + } + if (!isset($ignored_or_installed[$file['attribs']['name']])) { + $ignored_or_installed[$file['attribs']['name']] = array(); + } + $ignored_or_installed[$file['attribs']['name']][] = 1; + if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~', + str_replace('\\', '/', $file['attribs']['as']))) { + // file contains .. parent directory or . cur directory references + $this->_invalidFileInstallAs($file['attribs']['name'], + $file['attribs']['as']); + } + } + } + if (isset($list['ignore'])) { + if (!isset($list['ignore'][0])) { + $list['ignore'] = array($list['ignore']); + } + foreach ($list['ignore'] as $file) { + if (!isset($filelist[$file['attribs']['name']])) { + $this->_notInContents($file['attribs']['name'], 'ignore'); + continue; + } + if (array_key_exists($file['attribs']['name'], $ignored_or_installed)) { + $this->_ignoreAndInstallAs($file['attribs']['name']); + } + } + } + } + if (!$allowignore && isset($list['file'])) { + if (is_string($list['file'])) { + $this->_oldStyleFileNotAllowed(); + return false; + } + if (!isset($list['file'][0])) { + // single file + $list['file'] = array($list['file']); + } + foreach ($list['file'] as $i => $file) + { + if (isset($file['attribs']) && isset($file['attribs']['name'])) { + if ($file['attribs']['name']{0} == '.' && + $file['attribs']['name']{1} == '/') { + // name is something like "./doc/whatever.txt" + $this->_invalidFileName($file['attribs']['name'], $dirname); + } + if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~', + str_replace('\\', '/', $file['attribs']['name']))) { + // file contains .. parent directory or . cur directory + $this->_invalidFileName($file['attribs']['name'], $dirname); + } + } + if (isset($file['attribs']) && isset($file['attribs']['role'])) { + if (!$this->_validateRole($file['attribs']['role'])) { + if (isset($this->_packageInfo['usesrole'])) { + $roles = $this->_packageInfo['usesrole']; + if (!isset($roles[0])) { + $roles = array($roles); + } + foreach ($roles as $role) { + if ($role['role'] = $file['attribs']['role']) { + $msg = 'This package contains role "%role%" and requires ' . + 'package "%package%" to be used'; + if (isset($role['uri'])) { + $params = array('role' => $role['role'], + 'package' => $role['uri']); + } else { + $params = array('role' => $role['role'], + 'package' => $this->_pf->_registry-> + parsedPackageNameToString(array('package' => + $role['package'], 'channel' => $role['channel']), + true)); + } + $this->_stack->push('_mustInstallRole', 'error', $params, $msg); + } + } + } + $this->_invalidFileRole($file['attribs']['name'], + $dirname, $file['attribs']['role']); + } + } + if (!isset($file['attribs'])) { + continue; + } + $save = $file['attribs']; + if ($dirs) { + $save['name'] = $dirs . '/' . $save['name']; + } + unset($file['attribs']); + if (count($file) && $this->_curState != PEAR_VALIDATE_DOWNLOADING) { // has tasks + foreach ($file as $task => $value) { + if ($tagClass = $this->_pf->getTask($task)) { + if (!is_array($value) || !isset($value[0])) { + $value = array($value); + } + foreach ($value as $v) { + $ret = call_user_func(array($tagClass, 'validateXml'), + $this->_pf, $v, $this->_pf->_config, $save); + if (is_array($ret)) { + $this->_invalidTask($task, $ret, isset($save['name']) ? + $save['name'] : ''); + } + } + } else { + if (isset($this->_packageInfo['usestask'])) { + $roles = $this->_packageInfo['usestask']; + if (!isset($roles[0])) { + $roles = array($roles); + } + foreach ($roles as $role) { + if ($role['task'] = $task) { + $msg = 'This package contains task "%task%" and requires ' . + 'package "%package%" to be used'; + if (isset($role['uri'])) { + $params = array('task' => $role['task'], + 'package' => $role['uri']); + } else { + $params = array('task' => $role['task'], + 'package' => $this->_pf->_registry-> + parsedPackageNameToString(array('package' => + $role['package'], 'channel' => $role['channel']), + true)); + } + $this->_stack->push('_mustInstallTask', 'error', + $params, $msg); + } + } + } + $this->_unknownTask($task, $save['name']); + } + } + } + } + } + if (isset($list['ignore'])) { + if (!$allowignore) { + $this->_ignoreNotAllowed('ignore'); + } + } + if (isset($list['install'])) { + if (!$allowignore) { + $this->_ignoreNotAllowed('install'); + } + } + if (isset($list['file'])) { + if ($allowignore) { + $this->_fileNotAllowed('file'); + } + } + if (isset($list['dir'])) { + if ($allowignore) { + $this->_fileNotAllowed('dir'); + } else { + if (!isset($list['dir'][0])) { + $list['dir'] = array($list['dir']); + } + foreach ($list['dir'] as $dir) { + if (isset($dir['attribs']) && isset($dir['attribs']['name'])) { + if ($dir['attribs']['name'] == '/' || + !isset($this->_packageInfo['contents']['dir']['dir'])) { + // always use nothing if the filelist has already been flattened + $newdirs = ''; + } elseif ($dirs == '') { + $newdirs = $dir['attribs']['name']; + } else { + $newdirs = $dirs . '/' . $dir['attribs']['name']; + } + } else { + $newdirs = $dirs; + } + $this->_validateFilelist($dir, $allowignore, $newdirs); + } + } + } + } + + function _validateRelease() + { + if (isset($this->_packageInfo['phprelease'])) { + $release = 'phprelease'; + if (isset($this->_packageInfo['providesextension'])) { + $this->_cannotProvideExtension($release); + } + if (isset($this->_packageInfo['srcpackage']) || isset($this->_packageInfo['srcuri'])) { + $this->_cannotHaveSrcpackage($release); + } + $releases = $this->_packageInfo['phprelease']; + if (!is_array($releases)) { + return true; + } + if (!isset($releases[0])) { + $releases = array($releases); + } + foreach ($releases as $rel) { + $this->_stupidSchemaValidate(array( + '*installconditions', + '*filelist', + ), $rel, ''); + } + } + foreach (array('', 'zend') as $prefix) { + $releasetype = $prefix . 'extsrcrelease'; + if (isset($this->_packageInfo[$releasetype])) { + $release = $releasetype; + if (!isset($this->_packageInfo['providesextension'])) { + $this->_mustProvideExtension($release); + } + if (isset($this->_packageInfo['srcpackage']) || isset($this->_packageInfo['srcuri'])) { + $this->_cannotHaveSrcpackage($release); + } + $releases = $this->_packageInfo[$releasetype]; + if (!is_array($releases)) { + return true; + } + if (!isset($releases[0])) { + $releases = array($releases); + } + foreach ($releases as $rel) { + $this->_stupidSchemaValidate(array( + '*installconditions', + '*configureoption->name->prompt->?default', + '*binarypackage', + '*filelist', + ), $rel, '<' . $releasetype . '>'); + if (isset($rel['binarypackage'])) { + if (!is_array($rel['binarypackage']) || !isset($rel['binarypackage'][0])) { + $rel['binarypackage'] = array($rel['binarypackage']); + } + foreach ($rel['binarypackage'] as $bin) { + if (!is_string($bin)) { + $this->_binaryPackageMustBePackagename(); + } + } + } + } + } + $releasetype = 'extbinrelease'; + if (isset($this->_packageInfo[$releasetype])) { + $release = $releasetype; + if (!isset($this->_packageInfo['providesextension'])) { + $this->_mustProvideExtension($release); + } + if (isset($this->_packageInfo['channel']) && + !isset($this->_packageInfo['srcpackage'])) { + $this->_mustSrcPackage($release); + } + if (isset($this->_packageInfo['uri']) && !isset($this->_packageInfo['srcuri'])) { + $this->_mustSrcuri($release); + } + $releases = $this->_packageInfo[$releasetype]; + if (!is_array($releases)) { + return true; + } + if (!isset($releases[0])) { + $releases = array($releases); + } + foreach ($releases as $rel) { + $this->_stupidSchemaValidate(array( + '*installconditions', + '*filelist', + ), $rel, '<' . $releasetype . '>'); + } + } + } + if (isset($this->_packageInfo['bundle'])) { + $release = 'bundle'; + if (isset($this->_packageInfo['providesextension'])) { + $this->_cannotProvideExtension($release); + } + if (isset($this->_packageInfo['srcpackage']) || isset($this->_packageInfo['srcuri'])) { + $this->_cannotHaveSrcpackage($release); + } + $releases = $this->_packageInfo['bundle']; + if (!is_array($releases) || !isset($releases[0])) { + $releases = array($releases); + } + foreach ($releases as $rel) { + $this->_stupidSchemaValidate(array( + '*installconditions', + '*filelist', + ), $rel, ''); + } + } + foreach ($releases as $rel) { + if (is_array($rel) && array_key_exists('installconditions', $rel)) { + $this->_validateInstallConditions($rel['installconditions'], + "<$release>"); + } + if (is_array($rel) && array_key_exists('filelist', $rel)) { + if ($rel['filelist']) { + + $this->_validateFilelist($rel['filelist'], true); + } + } + } + } + + /** + * This is here to allow role extension through plugins + * @param string + */ + function _validateRole($role) + { + return in_array($role, PEAR_Installer_Role::getValidRoles($this->_pf->getPackageType())); + } + + function _pearVersionTooLow($version) + { + $this->_stack->push(__FUNCTION__, 'error', + array('version' => $version), + 'This package.xml requires PEAR version %version% to parse properly, we are ' . + 'version 1.9.4'); + } + + function _invalidTagOrder($oktags, $actual, $root) + { + $this->_stack->push(__FUNCTION__, 'error', + array('oktags' => $oktags, 'actual' => $actual, 'root' => $root), + 'Invalid tag order in %root%, found <%actual%> expected one of "%oktags%"'); + } + + function _ignoreNotAllowed($type) + { + $this->_stack->push(__FUNCTION__, 'error', array('type' => $type), + '<%type%> is not allowed inside global , only inside ' . + '//, use and only'); + } + + function _fileNotAllowed($type) + { + $this->_stack->push(__FUNCTION__, 'error', array('type' => $type), + '<%type%> is not allowed inside release , only inside ' . + ', use and only'); + } + + function _oldStyleFileNotAllowed() + { + $this->_stack->push(__FUNCTION__, 'error', array(), + 'Old-style name is not allowed. Use' . + ''); + } + + function _tagMissingAttribute($tag, $attr, $context) + { + $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag, + 'attribute' => $attr, 'context' => $context), + 'tag <%tag%> in context "%context%" has no attribute "%attribute%"'); + } + + function _tagHasNoAttribs($tag, $context) + { + $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag, + 'context' => $context), + 'tag <%tag%> has no attributes in context "%context%"'); + } + + function _invalidInternalStructure() + { + $this->_stack->push(__FUNCTION__, 'exception', array(), + 'internal array was not generated by compatible parser, or extreme parser error, cannot continue'); + } + + function _invalidFileRole($file, $dir, $role) + { + $this->_stack->push(__FUNCTION__, 'error', array( + 'file' => $file, 'dir' => $dir, 'role' => $role, + 'roles' => PEAR_Installer_Role::getValidRoles($this->_pf->getPackageType())), + 'File "%file%" in directory "%dir%" has invalid role "%role%", should be one of %roles%'); + } + + function _invalidFileName($file, $dir) + { + $this->_stack->push(__FUNCTION__, 'error', array( + 'file' => $file), + 'File "%file%" in directory "%dir%" cannot begin with "./" or contain ".."'); + } + + function _invalidFileInstallAs($file, $as) + { + $this->_stack->push(__FUNCTION__, 'error', array( + 'file' => $file, 'as' => $as), + 'File "%file%" cannot contain "./" or contain ".."'); + } + + function _invalidDirName($dir) + { + $this->_stack->push(__FUNCTION__, 'error', array( + 'dir' => $file), + 'Directory "%dir%" cannot begin with "./" or contain ".."'); + } + + function _filelistCannotContainFile($filelist) + { + $this->_stack->push(__FUNCTION__, 'error', array('tag' => $filelist), + '<%tag%> can only contain , contains . Use ' . + ' as the first dir element'); + } + + function _filelistMustContainDir($filelist) + { + $this->_stack->push(__FUNCTION__, 'error', array('tag' => $filelist), + '<%tag%> must contain . Use as the ' . + 'first dir element'); + } + + function _tagCannotBeEmpty($tag) + { + $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag), + '<%tag%> cannot be empty (<%tag%/>)'); + } + + function _UrlOrChannel($type, $name) + { + $this->_stack->push(__FUNCTION__, 'error', array('type' => $type, + 'name' => $name), + 'Required dependency <%type%> "%name%" can have either url OR ' . + 'channel attributes, and not both'); + } + + function _NoChannel($type, $name) + { + $this->_stack->push(__FUNCTION__, 'error', array('type' => $type, + 'name' => $name), + 'Required dependency <%type%> "%name%" must have either url OR ' . + 'channel attributes'); + } + + function _UrlOrChannelGroup($type, $name, $group) + { + $this->_stack->push(__FUNCTION__, 'error', array('type' => $type, + 'name' => $name, 'group' => $group), + 'Group "%group%" dependency <%type%> "%name%" can have either url OR ' . + 'channel attributes, and not both'); + } + + function _NoChannelGroup($type, $name, $group) + { + $this->_stack->push(__FUNCTION__, 'error', array('type' => $type, + 'name' => $name, 'group' => $group), + 'Group "%group%" dependency <%type%> "%name%" must have either url OR ' . + 'channel attributes'); + } + + function _unknownChannel($channel) + { + $this->_stack->push(__FUNCTION__, 'error', array('channel' => $channel), + 'Unknown channel "%channel%"'); + } + + function _noPackageVersion() + { + $this->_stack->push(__FUNCTION__, 'error', array(), + 'package.xml tag has no version attribute, or version is not 2.0'); + } + + function _NoBundledPackages() + { + $this->_stack->push(__FUNCTION__, 'error', array(), + 'No tag was found in , required for bundle packages'); + } + + function _AtLeast2BundledPackages() + { + $this->_stack->push(__FUNCTION__, 'error', array(), + 'At least 2 packages must be bundled in a bundle package'); + } + + function _ChannelOrUri($name) + { + $this->_stack->push(__FUNCTION__, 'error', array('name' => $name), + 'Bundled package "%name%" can have either a uri or a channel, not both'); + } + + function _noChildTag($child, $tag) + { + $this->_stack->push(__FUNCTION__, 'error', array('child' => $child, 'tag' => $tag), + 'Tag <%tag%> is missing child tag <%child%>'); + } + + function _invalidVersion($type, $value) + { + $this->_stack->push(__FUNCTION__, 'error', array('type' => $type, 'value' => $value), + 'Version type <%type%> is not a valid version (%value%)'); + } + + function _invalidState($type, $value) + { + $states = array('stable', 'beta', 'alpha', 'devel'); + if ($type != 'api') { + $states[] = 'snapshot'; + } + if (strtolower($value) == 'rc') { + $this->_stack->push(__FUNCTION__, 'error', + array('version' => $this->_packageInfo['version']['release']), + 'RC is not a state, it is a version postfix, try %version%RC1, stability beta'); + } + $this->_stack->push(__FUNCTION__, 'error', array('type' => $type, 'value' => $value, + 'types' => $states), + 'Stability type <%type%> is not a valid stability (%value%), must be one of ' . + '%types%'); + } + + function _invalidTask($task, $ret, $file) + { + switch ($ret[0]) { + case PEAR_TASK_ERROR_MISSING_ATTRIB : + $info = array('attrib' => $ret[1], 'task' => $task, 'file' => $file); + $msg = 'task <%task%> is missing attribute "%attrib%" in file %file%'; + break; + case PEAR_TASK_ERROR_NOATTRIBS : + $info = array('task' => $task, 'file' => $file); + $msg = 'task <%task%> has no attributes in file %file%'; + break; + case PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE : + $info = array('attrib' => $ret[1], 'values' => $ret[3], + 'was' => $ret[2], 'task' => $task, 'file' => $file); + $msg = 'task <%task%> attribute "%attrib%" has the wrong value "%was%" '. + 'in file %file%, expecting one of "%values%"'; + break; + case PEAR_TASK_ERROR_INVALID : + $info = array('reason' => $ret[1], 'task' => $task, 'file' => $file); + $msg = 'task <%task%> in file %file% is invalid because of "%reason%"'; + break; + } + $this->_stack->push(__FUNCTION__, 'error', $info, $msg); + } + + function _unknownTask($task, $file) + { + $this->_stack->push(__FUNCTION__, 'error', array('task' => $task, 'file' => $file), + 'Unknown task "%task%" passed in file '); + } + + function _subpackageCannotProvideExtension($name) + { + $this->_stack->push(__FUNCTION__, 'error', array('name' => $name), + 'Subpackage dependency "%name%" cannot use , ' . + 'only package dependencies can use this tag'); + } + + function _subpackagesCannotConflict($name) + { + $this->_stack->push(__FUNCTION__, 'error', array('name' => $name), + 'Subpackage dependency "%name%" cannot use , ' . + 'only package dependencies can use this tag'); + } + + function _cannotProvideExtension($release) + { + $this->_stack->push(__FUNCTION__, 'error', array('release' => $release), + '<%release%> packages cannot use , only extbinrelease, extsrcrelease, zendextsrcrelease, and zendextbinrelease can provide a PHP extension'); + } + + function _mustProvideExtension($release) + { + $this->_stack->push(__FUNCTION__, 'error', array('release' => $release), + '<%release%> packages must use to indicate which PHP extension is provided'); + } + + function _cannotHaveSrcpackage($release) + { + $this->_stack->push(__FUNCTION__, 'error', array('release' => $release), + '<%release%> packages cannot specify a source code package, only extension binaries may use the tag'); + } + + function _mustSrcPackage($release) + { + $this->_stack->push(__FUNCTION__, 'error', array('release' => $release), + '/ packages must specify a source code package with '); + } + + function _mustSrcuri($release) + { + $this->_stack->push(__FUNCTION__, 'error', array('release' => $release), + '/ packages must specify a source code package with '); + } + + function _uriDepsCannotHaveVersioning($type) + { + $this->_stack->push(__FUNCTION__, 'error', array('type' => $type), + '%type%: dependencies with a tag cannot have any versioning information'); + } + + function _conflictingDepsCannotHaveVersioning($type) + { + $this->_stack->push(__FUNCTION__, 'error', array('type' => $type), + '%type%: conflicting dependencies cannot have versioning info, use to ' . + 'exclude specific versions of a dependency'); + } + + function _DepchannelCannotBeUri($type) + { + $this->_stack->push(__FUNCTION__, 'error', array('type' => $type), + '%type%: channel cannot be __uri, this is a pseudo-channel reserved for uri ' . + 'dependencies only'); + } + + function _bundledPackagesMustBeFilename() + { + $this->_stack->push(__FUNCTION__, 'error', array(), + ' tags must contain only the filename of a package release ' . + 'in the bundle'); + } + + function _binaryPackageMustBePackagename() + { + $this->_stack->push(__FUNCTION__, 'error', array(), + ' tags must contain the name of a package that is ' . + 'a compiled version of this extsrc/zendextsrc package'); + } + + function _fileNotFound($file) + { + $this->_stack->push(__FUNCTION__, 'error', array('file' => $file), + 'File "%file%" in package.xml does not exist'); + } + + function _notInContents($file, $tag) + { + $this->_stack->push(__FUNCTION__, 'error', array('file' => $file, 'tag' => $tag), + '<%tag% name="%file%"> is invalid, file is not in '); + } + + function _cannotValidateNoPathSet() + { + $this->_stack->push(__FUNCTION__, 'error', array(), + 'Cannot validate files, no path to package file is set (use setPackageFile())'); + } + + function _usesroletaskMustHaveChannelOrUri($role, $tag) + { + $this->_stack->push(__FUNCTION__, 'error', array('role' => $role, 'tag' => $tag), + '<%tag%> for role "%role%" must contain either , or and '); + } + + function _usesroletaskMustHavePackage($role, $tag) + { + $this->_stack->push(__FUNCTION__, 'error', array('role' => $role, 'tag' => $tag), + '<%tag%> for role "%role%" must contain '); + } + + function _usesroletaskMustHaveRoleTask($tag, $type) + { + $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag, 'type' => $type), + '<%tag%> must contain <%type%> defining the %type% to be used'); + } + + function _cannotConflictWithAllOs($type) + { + $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag), + '%tag% cannot conflict with all OSes'); + } + + function _invalidDepGroupName($name) + { + $this->_stack->push(__FUNCTION__, 'error', array('name' => $name), + 'Invalid dependency group name "%name%"'); + } + + function _multipleToplevelDirNotAllowed() + { + $this->_stack->push(__FUNCTION__, 'error', array(), + 'Multiple top-level tags are not allowed. Enclose them ' . + 'in a '); + } + + function _multipleInstallAs($file) + { + $this->_stack->push(__FUNCTION__, 'error', array('file' => $file), + 'Only one tag is allowed for file "%file%"'); + } + + function _ignoreAndInstallAs($file) + { + $this->_stack->push(__FUNCTION__, 'error', array('file' => $file), + 'Cannot have both and tags for file "%file%"'); + } + + function _analyzeBundledPackages() + { + if (!$this->_isValid) { + return false; + } + if (!$this->_pf->getPackageType() == 'bundle') { + return false; + } + if (!isset($this->_pf->_packageFile)) { + return false; + } + $dir_prefix = dirname($this->_pf->_packageFile); + $common = new PEAR_Common; + $log = isset($this->_pf->_logger) ? array(&$this->_pf->_logger, 'log') : + array($common, 'log'); + $info = $this->_pf->getContents(); + $info = $info['bundledpackage']; + if (!is_array($info)) { + $info = array($info); + } + $pkg = &new PEAR_PackageFile($this->_pf->_config); + foreach ($info as $package) { + if (!file_exists($dir_prefix . DIRECTORY_SEPARATOR . $package)) { + $this->_fileNotFound($dir_prefix . DIRECTORY_SEPARATOR . $package); + $this->_isValid = 0; + continue; + } + call_user_func_array($log, array(1, "Analyzing bundled package $package")); + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $ret = $pkg->fromAnyFile($dir_prefix . DIRECTORY_SEPARATOR . $package, + PEAR_VALIDATE_NORMAL); + PEAR::popErrorHandling(); + if (PEAR::isError($ret)) { + call_user_func_array($log, array(0, "ERROR: package $package is not a valid " . + 'package')); + $inf = $ret->getUserInfo(); + if (is_array($inf)) { + foreach ($inf as $err) { + call_user_func_array($log, array(1, $err['message'])); + } + } + return false; + } + } + return true; + } + + function _analyzePhpFiles() + { + if (!$this->_isValid) { + return false; + } + if (!isset($this->_pf->_packageFile)) { + $this->_cannotValidateNoPathSet(); + return false; + } + $dir_prefix = dirname($this->_pf->_packageFile); + $common = new PEAR_Common; + $log = isset($this->_pf->_logger) ? array(&$this->_pf->_logger, 'log') : + array(&$common, 'log'); + $info = $this->_pf->getContents(); + if (!$info || !isset($info['dir']['file'])) { + $this->_tagCannotBeEmpty('contents>_fileNotFound($dir_prefix . DIRECTORY_SEPARATOR . $file); + $this->_isValid = 0; + continue; + } + if (in_array($fa['role'], PEAR_Installer_Role::getPhpRoles()) && $dir_prefix) { + call_user_func_array($log, array(1, "Analyzing $file")); + $srcinfo = $this->analyzeSourceCode($dir_prefix . DIRECTORY_SEPARATOR . $file); + if ($srcinfo) { + $provides = array_merge($provides, $this->_buildProvidesArray($srcinfo)); + } + } + } + $this->_packageName = $pn = $this->_pf->getPackage(); + $pnl = strlen($pn); + foreach ($provides as $key => $what) { + if (isset($what['explicit']) || !$what) { + // skip conformance checks if the provides entry is + // specified in the package.xml file + continue; + } + extract($what); + if ($type == 'class') { + if (!strncasecmp($name, $pn, $pnl)) { + continue; + } + $this->_stack->push(__FUNCTION__, 'warning', + array('file' => $file, 'type' => $type, 'name' => $name, 'package' => $pn), + 'in %file%: %type% "%name%" not prefixed with package name "%package%"'); + } elseif ($type == 'function') { + if (strstr($name, '::') || !strncasecmp($name, $pn, $pnl)) { + continue; + } + $this->_stack->push(__FUNCTION__, 'warning', + array('file' => $file, 'type' => $type, 'name' => $name, 'package' => $pn), + 'in %file%: %type% "%name%" not prefixed with package name "%package%"'); + } + } + return $this->_isValid; + } + + /** + * Analyze the source code of the given PHP file + * + * @param string Filename of the PHP file + * @param boolean whether to analyze $file as the file contents + * @return mixed + */ + function analyzeSourceCode($file, $string = false) + { + if (!function_exists("token_get_all")) { + $this->_stack->push(__FUNCTION__, 'error', array('file' => $file), + 'Parser error: token_get_all() function must exist to analyze source code, PHP may have been compiled with --disable-tokenizer'); + return false; + } + + if (!defined('T_DOC_COMMENT')) { + define('T_DOC_COMMENT', T_COMMENT); + } + + if (!defined('T_INTERFACE')) { + define('T_INTERFACE', -1); + } + + if (!defined('T_IMPLEMENTS')) { + define('T_IMPLEMENTS', -1); + } + + if ($string) { + $contents = $file; + } else { + if (!$fp = @fopen($file, "r")) { + return false; + } + fclose($fp); + $contents = file_get_contents($file); + } + + // Silence this function so we can catch PHP Warnings and show our own custom message + $tokens = @token_get_all($contents); + if (isset($php_errormsg)) { + if (isset($this->_stack)) { + $pn = $this->_pf->getPackage(); + $this->_stack->push(__FUNCTION__, 'warning', + array('file' => $file, 'package' => $pn), + 'in %file%: Could not process file for unkown reasons,' . + ' possibly a PHP parse error in %file% from %package%'); + } + } +/* + for ($i = 0; $i < sizeof($tokens); $i++) { + @list($token, $data) = $tokens[$i]; + if (is_string($token)) { + var_dump($token); + } else { + print token_name($token) . ' '; + var_dump(rtrim($data)); + } + } +*/ + $look_for = 0; + $paren_level = 0; + $bracket_level = 0; + $brace_level = 0; + $lastphpdoc = ''; + $current_class = ''; + $current_interface = ''; + $current_class_level = -1; + $current_function = ''; + $current_function_level = -1; + $declared_classes = array(); + $declared_interfaces = array(); + $declared_functions = array(); + $declared_methods = array(); + $used_classes = array(); + $used_functions = array(); + $extends = array(); + $implements = array(); + $nodeps = array(); + $inquote = false; + $interface = false; + for ($i = 0; $i < sizeof($tokens); $i++) { + if (is_array($tokens[$i])) { + list($token, $data) = $tokens[$i]; + } else { + $token = $tokens[$i]; + $data = ''; + } + + if ($inquote) { + if ($token != '"' && $token != T_END_HEREDOC) { + continue; + } else { + $inquote = false; + continue; + } + } + + switch ($token) { + case T_WHITESPACE : + continue; + case ';': + if ($interface) { + $current_function = ''; + $current_function_level = -1; + } + break; + case '"': + case T_START_HEREDOC: + $inquote = true; + break; + case T_CURLY_OPEN: + case T_DOLLAR_OPEN_CURLY_BRACES: + case '{': $brace_level++; continue 2; + case '}': + $brace_level--; + if ($current_class_level == $brace_level) { + $current_class = ''; + $current_class_level = -1; + } + if ($current_function_level == $brace_level) { + $current_function = ''; + $current_function_level = -1; + } + continue 2; + case '[': $bracket_level++; continue 2; + case ']': $bracket_level--; continue 2; + case '(': $paren_level++; continue 2; + case ')': $paren_level--; continue 2; + case T_INTERFACE: + $interface = true; + case T_CLASS: + if (($current_class_level != -1) || ($current_function_level != -1)) { + if (isset($this->_stack)) { + $this->_stack->push(__FUNCTION__, 'error', array('file' => $file), + 'Parser error: invalid PHP found in file "%file%"'); + } else { + PEAR::raiseError("Parser error: invalid PHP found in file \"$file\"", + PEAR_COMMON_ERROR_INVALIDPHP); + } + + return false; + } + case T_FUNCTION: + case T_NEW: + case T_EXTENDS: + case T_IMPLEMENTS: + $look_for = $token; + continue 2; + case T_STRING: + if (version_compare(zend_version(), '2.0', '<')) { + if (in_array(strtolower($data), + array('public', 'private', 'protected', 'abstract', + 'interface', 'implements', 'throw') + ) + ) { + if (isset($this->_stack)) { + $this->_stack->push(__FUNCTION__, 'warning', array( + 'file' => $file), + 'Error, PHP5 token encountered in %file%,' . + ' analysis should be in PHP5'); + } else { + PEAR::raiseError('Error: PHP5 token encountered in ' . $file . + 'packaging should be done in PHP 5'); + return false; + } + } + } + + if ($look_for == T_CLASS) { + $current_class = $data; + $current_class_level = $brace_level; + $declared_classes[] = $current_class; + } elseif ($look_for == T_INTERFACE) { + $current_interface = $data; + $current_class_level = $brace_level; + $declared_interfaces[] = $current_interface; + } elseif ($look_for == T_IMPLEMENTS) { + $implements[$current_class] = $data; + } elseif ($look_for == T_EXTENDS) { + $extends[$current_class] = $data; + } elseif ($look_for == T_FUNCTION) { + if ($current_class) { + $current_function = "$current_class::$data"; + $declared_methods[$current_class][] = $data; + } elseif ($current_interface) { + $current_function = "$current_interface::$data"; + $declared_methods[$current_interface][] = $data; + } else { + $current_function = $data; + $declared_functions[] = $current_function; + } + + $current_function_level = $brace_level; + $m = array(); + } elseif ($look_for == T_NEW) { + $used_classes[$data] = true; + } + + $look_for = 0; + continue 2; + case T_VARIABLE: + $look_for = 0; + continue 2; + case T_DOC_COMMENT: + case T_COMMENT: + if (preg_match('!^/\*\*\s!', $data)) { + $lastphpdoc = $data; + if (preg_match_all('/@nodep\s+(\S+)/', $lastphpdoc, $m)) { + $nodeps = array_merge($nodeps, $m[1]); + } + } + continue 2; + case T_DOUBLE_COLON: + $token = $tokens[$i - 1][0]; + if (!($token == T_WHITESPACE || $token == T_STRING || $token == T_STATIC)) { + if (isset($this->_stack)) { + $this->_stack->push(__FUNCTION__, 'warning', array('file' => $file), + 'Parser error: invalid PHP found in file "%file%"'); + } else { + PEAR::raiseError("Parser error: invalid PHP found in file \"$file\"", + PEAR_COMMON_ERROR_INVALIDPHP); + } + + return false; + } + + $class = $tokens[$i - 1][1]; + if (strtolower($class) != 'parent') { + $used_classes[$class] = true; + } + + continue 2; + } + } + + return array( + "source_file" => $file, + "declared_classes" => $declared_classes, + "declared_interfaces" => $declared_interfaces, + "declared_methods" => $declared_methods, + "declared_functions" => $declared_functions, + "used_classes" => array_diff(array_keys($used_classes), $nodeps), + "inheritance" => $extends, + "implements" => $implements, + ); + } + + /** + * Build a "provides" array from data returned by + * analyzeSourceCode(). The format of the built array is like + * this: + * + * array( + * 'class;MyClass' => 'array('type' => 'class', 'name' => 'MyClass'), + * ... + * ) + * + * + * @param array $srcinfo array with information about a source file + * as returned by the analyzeSourceCode() method. + * + * @return void + * + * @access private + * + */ + function _buildProvidesArray($srcinfo) + { + if (!$this->_isValid) { + return array(); + } + + $providesret = array(); + $file = basename($srcinfo['source_file']); + $pn = isset($this->_pf) ? $this->_pf->getPackage() : ''; + $pnl = strlen($pn); + foreach ($srcinfo['declared_classes'] as $class) { + $key = "class;$class"; + if (isset($providesret[$key])) { + continue; + } + + $providesret[$key] = + array('file'=> $file, 'type' => 'class', 'name' => $class); + if (isset($srcinfo['inheritance'][$class])) { + $providesret[$key]['extends'] = + $srcinfo['inheritance'][$class]; + } + } + + foreach ($srcinfo['declared_methods'] as $class => $methods) { + foreach ($methods as $method) { + $function = "$class::$method"; + $key = "function;$function"; + if ($method{0} == '_' || !strcasecmp($method, $class) || + isset($providesret[$key])) { + continue; + } + + $providesret[$key] = + array('file'=> $file, 'type' => 'function', 'name' => $function); + } + } + + foreach ($srcinfo['declared_functions'] as $function) { + $key = "function;$function"; + if ($function{0} == '_' || isset($providesret[$key])) { + continue; + } + + if (!strstr($function, '::') && strncasecmp($function, $pn, $pnl)) { + $warnings[] = "in1 " . $file . ": function \"$function\" not prefixed with package name \"$pn\""; + } + + $providesret[$key] = + array('file'=> $file, 'type' => 'function', 'name' => $function); + } + + return $providesret; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/PackageFile/v2/rw.php b/_piecrust/libs/PEAR/PackageFile/v2/rw.php new file mode 100644 index 0000000..58f76c5 --- /dev/null +++ b/_piecrust/libs/PEAR/PackageFile/v2/rw.php @@ -0,0 +1,1604 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: rw.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a8 + */ +/** + * For base class + */ +require_once 'PEAR/PackageFile/v2.php'; +/** + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a8 + */ +class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2 +{ + /** + * @param string Extension name + * @return bool success of operation + */ + function setProvidesExtension($extension) + { + if (in_array($this->getPackageType(), + array('extsrc', 'extbin', 'zendextsrc', 'zendextbin'))) { + if (!isset($this->_packageInfo['providesextension'])) { + // ensure that the channel tag is set up in the right location + $this->_packageInfo = $this->_insertBefore($this->_packageInfo, + array('usesrole', 'usestask', 'srcpackage', 'srcuri', 'phprelease', + 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease', + 'bundle', 'changelog'), + $extension, 'providesextension'); + } + $this->_packageInfo['providesextension'] = $extension; + return true; + } + return false; + } + + function setPackage($package) + { + $this->_isValid = 0; + if (!isset($this->_packageInfo['attribs'])) { + $this->_packageInfo = array_merge(array('attribs' => array( + 'version' => '2.0', + 'xmlns' => 'http://pear.php.net/dtd/package-2.0', + 'xmlns:tasks' => 'http://pear.php.net/dtd/tasks-1.0', + 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', + 'xsi:schemaLocation' => 'http://pear.php.net/dtd/tasks-1.0 + http://pear.php.net/dtd/tasks-1.0.xsd + http://pear.php.net/dtd/package-2.0 + http://pear.php.net/dtd/package-2.0.xsd', + )), $this->_packageInfo); + } + if (!isset($this->_packageInfo['name'])) { + return $this->_packageInfo = array_merge(array('name' => $package), + $this->_packageInfo); + } + $this->_packageInfo['name'] = $package; + } + + /** + * set this as a package.xml version 2.1 + * @access private + */ + function _setPackageVersion2_1() + { + $info = array( + 'version' => '2.1', + 'xmlns' => 'http://pear.php.net/dtd/package-2.1', + 'xmlns:tasks' => 'http://pear.php.net/dtd/tasks-1.0', + 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', + 'xsi:schemaLocation' => 'http://pear.php.net/dtd/tasks-1.0 + http://pear.php.net/dtd/tasks-1.0.xsd + http://pear.php.net/dtd/package-2.1 + http://pear.php.net/dtd/package-2.1.xsd', + ); + if (!isset($this->_packageInfo['attribs'])) { + $this->_packageInfo = array_merge(array('attribs' => $info), $this->_packageInfo); + } else { + $this->_packageInfo['attribs'] = $info; + } + } + + function setUri($uri) + { + unset($this->_packageInfo['channel']); + $this->_isValid = 0; + if (!isset($this->_packageInfo['uri'])) { + // ensure that the uri tag is set up in the right location + $this->_packageInfo = $this->_insertBefore($this->_packageInfo, + array('extends', 'summary', 'description', 'lead', + 'developer', 'contributor', 'helper', 'date', 'time', 'version', + 'stability', 'license', 'notes', 'contents', 'compatible', + 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', + 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', + 'extbinrelease', 'bundle', 'changelog'), $uri, 'uri'); + } + $this->_packageInfo['uri'] = $uri; + } + + function setChannel($channel) + { + unset($this->_packageInfo['uri']); + $this->_isValid = 0; + if (!isset($this->_packageInfo['channel'])) { + // ensure that the channel tag is set up in the right location + $this->_packageInfo = $this->_insertBefore($this->_packageInfo, + array('extends', 'summary', 'description', 'lead', + 'developer', 'contributor', 'helper', 'date', 'time', 'version', + 'stability', 'license', 'notes', 'contents', 'compatible', + 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', + 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', + 'extbinrelease', 'bundle', 'changelog'), $channel, 'channel'); + } + $this->_packageInfo['channel'] = $channel; + } + + function setExtends($extends) + { + $this->_isValid = 0; + if (!isset($this->_packageInfo['extends'])) { + // ensure that the extends tag is set up in the right location + $this->_packageInfo = $this->_insertBefore($this->_packageInfo, + array('summary', 'description', 'lead', + 'developer', 'contributor', 'helper', 'date', 'time', 'version', + 'stability', 'license', 'notes', 'contents', 'compatible', + 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', + 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', + 'extbinrelease', 'bundle', 'changelog'), $extends, 'extends'); + } + $this->_packageInfo['extends'] = $extends; + } + + function setSummary($summary) + { + $this->_isValid = 0; + if (!isset($this->_packageInfo['summary'])) { + // ensure that the summary tag is set up in the right location + $this->_packageInfo = $this->_insertBefore($this->_packageInfo, + array('description', 'lead', + 'developer', 'contributor', 'helper', 'date', 'time', 'version', + 'stability', 'license', 'notes', 'contents', 'compatible', + 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', + 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', + 'extbinrelease', 'bundle', 'changelog'), $summary, 'summary'); + } + $this->_packageInfo['summary'] = $summary; + } + + function setDescription($desc) + { + $this->_isValid = 0; + if (!isset($this->_packageInfo['description'])) { + // ensure that the description tag is set up in the right location + $this->_packageInfo = $this->_insertBefore($this->_packageInfo, + array('lead', + 'developer', 'contributor', 'helper', 'date', 'time', 'version', + 'stability', 'license', 'notes', 'contents', 'compatible', + 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', + 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', + 'extbinrelease', 'bundle', 'changelog'), $desc, 'description'); + } + $this->_packageInfo['description'] = $desc; + } + + /** + * Adds a new maintainer - no checking of duplicates is performed, use + * updatemaintainer for that purpose. + */ + function addMaintainer($role, $handle, $name, $email, $active = 'yes') + { + if (!in_array($role, array('lead', 'developer', 'contributor', 'helper'))) { + return false; + } + if (isset($this->_packageInfo[$role])) { + if (!isset($this->_packageInfo[$role][0])) { + $this->_packageInfo[$role] = array($this->_packageInfo[$role]); + } + $this->_packageInfo[$role][] = + array( + 'name' => $name, + 'user' => $handle, + 'email' => $email, + 'active' => $active, + ); + } else { + $testarr = array('lead', + 'developer', 'contributor', 'helper', 'date', 'time', 'version', + 'stability', 'license', 'notes', 'contents', 'compatible', + 'dependencies', 'providesextension', 'usesrole', 'usestask', + 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', + 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'); + foreach (array('lead', 'developer', 'contributor', 'helper') as $testrole) { + array_shift($testarr); + if ($role == $testrole) { + break; + } + } + if (!isset($this->_packageInfo[$role])) { + // ensure that the extends tag is set up in the right location + $this->_packageInfo = $this->_insertBefore($this->_packageInfo, $testarr, + array(), $role); + } + $this->_packageInfo[$role] = + array( + 'name' => $name, + 'user' => $handle, + 'email' => $email, + 'active' => $active, + ); + } + $this->_isValid = 0; + } + + function updateMaintainer($newrole, $handle, $name, $email, $active = 'yes') + { + $found = false; + foreach (array('lead', 'developer', 'contributor', 'helper') as $role) { + if (!isset($this->_packageInfo[$role])) { + continue; + } + $info = $this->_packageInfo[$role]; + if (!isset($info[0])) { + if ($info['user'] == $handle) { + $found = true; + break; + } + } + foreach ($info as $i => $maintainer) { + if ($maintainer['user'] == $handle) { + $found = $i; + break 2; + } + } + } + if ($found === false) { + return $this->addMaintainer($newrole, $handle, $name, $email, $active); + } + if ($found !== false) { + if ($found === true) { + unset($this->_packageInfo[$role]); + } else { + unset($this->_packageInfo[$role][$found]); + $this->_packageInfo[$role] = array_values($this->_packageInfo[$role]); + } + } + $this->addMaintainer($newrole, $handle, $name, $email, $active); + $this->_isValid = 0; + } + + function deleteMaintainer($handle) + { + $found = false; + foreach (array('lead', 'developer', 'contributor', 'helper') as $role) { + if (!isset($this->_packageInfo[$role])) { + continue; + } + if (!isset($this->_packageInfo[$role][0])) { + $this->_packageInfo[$role] = array($this->_packageInfo[$role]); + } + foreach ($this->_packageInfo[$role] as $i => $maintainer) { + if ($maintainer['user'] == $handle) { + $found = $i; + break; + } + } + if ($found !== false) { + unset($this->_packageInfo[$role][$found]); + if (!count($this->_packageInfo[$role]) && $role == 'lead') { + $this->_isValid = 0; + } + if (!count($this->_packageInfo[$role])) { + unset($this->_packageInfo[$role]); + return true; + } + $this->_packageInfo[$role] = + array_values($this->_packageInfo[$role]); + if (count($this->_packageInfo[$role]) == 1) { + $this->_packageInfo[$role] = $this->_packageInfo[$role][0]; + } + return true; + } + if (count($this->_packageInfo[$role]) == 1) { + $this->_packageInfo[$role] = $this->_packageInfo[$role][0]; + } + } + return false; + } + + function setReleaseVersion($version) + { + if (isset($this->_packageInfo['version']) && + isset($this->_packageInfo['version']['release'])) { + unset($this->_packageInfo['version']['release']); + } + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $version, array( + 'version' => array('stability', 'license', 'notes', 'contents', 'compatible', + 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', + 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', + 'extbinrelease', 'bundle', 'changelog'), + 'release' => array('api'))); + $this->_isValid = 0; + } + + function setAPIVersion($version) + { + if (isset($this->_packageInfo['version']) && + isset($this->_packageInfo['version']['api'])) { + unset($this->_packageInfo['version']['api']); + } + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $version, array( + 'version' => array('stability', 'license', 'notes', 'contents', 'compatible', + 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', + 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', + 'extbinrelease', 'bundle', 'changelog'), + 'api' => array())); + $this->_isValid = 0; + } + + /** + * snapshot|devel|alpha|beta|stable + */ + function setReleaseStability($state) + { + if (isset($this->_packageInfo['stability']) && + isset($this->_packageInfo['stability']['release'])) { + unset($this->_packageInfo['stability']['release']); + } + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $state, array( + 'stability' => array('license', 'notes', 'contents', 'compatible', + 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', + 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', + 'extbinrelease', 'bundle', 'changelog'), + 'release' => array('api'))); + $this->_isValid = 0; + } + + /** + * @param devel|alpha|beta|stable + */ + function setAPIStability($state) + { + if (isset($this->_packageInfo['stability']) && + isset($this->_packageInfo['stability']['api'])) { + unset($this->_packageInfo['stability']['api']); + } + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $state, array( + 'stability' => array('license', 'notes', 'contents', 'compatible', + 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', + 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', + 'extbinrelease', 'bundle', 'changelog'), + 'api' => array())); + $this->_isValid = 0; + } + + function setLicense($license, $uri = false, $filesource = false) + { + if (!isset($this->_packageInfo['license'])) { + // ensure that the license tag is set up in the right location + $this->_packageInfo = $this->_insertBefore($this->_packageInfo, + array('notes', 'contents', 'compatible', + 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', + 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', + 'extbinrelease', 'bundle', 'changelog'), 0, 'license'); + } + if ($uri || $filesource) { + $attribs = array(); + if ($uri) { + $attribs['uri'] = $uri; + } + $uri = true; // for test below + if ($filesource) { + $attribs['filesource'] = $filesource; + } + } + $license = $uri ? array('attribs' => $attribs, '_content' => $license) : $license; + $this->_packageInfo['license'] = $license; + $this->_isValid = 0; + } + + function setNotes($notes) + { + $this->_isValid = 0; + if (!isset($this->_packageInfo['notes'])) { + // ensure that the notes tag is set up in the right location + $this->_packageInfo = $this->_insertBefore($this->_packageInfo, + array('contents', 'compatible', + 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', + 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', + 'extbinrelease', 'bundle', 'changelog'), $notes, 'notes'); + } + $this->_packageInfo['notes'] = $notes; + } + + /** + * This is only used at install-time, after all serialization + * is over. + * @param string file name + * @param string installed path + */ + function setInstalledAs($file, $path) + { + if ($path) { + return $this->_packageInfo['filelist'][$file]['installed_as'] = $path; + } + unset($this->_packageInfo['filelist'][$file]['installed_as']); + } + + /** + * This is only used at install-time, after all serialization + * is over. + */ + function installedFile($file, $atts) + { + if (isset($this->_packageInfo['filelist'][$file])) { + $this->_packageInfo['filelist'][$file] = + array_merge($this->_packageInfo['filelist'][$file], $atts['attribs']); + } else { + $this->_packageInfo['filelist'][$file] = $atts['attribs']; + } + } + + /** + * Reset the listing of package contents + * @param string base installation dir for the whole package, if any + */ + function clearContents($baseinstall = false) + { + $this->_filesValid = false; + $this->_isValid = 0; + if (!isset($this->_packageInfo['contents'])) { + $this->_packageInfo = $this->_insertBefore($this->_packageInfo, + array('compatible', + 'dependencies', 'providesextension', 'usesrole', 'usestask', + 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', + 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease', + 'bundle', 'changelog'), array(), 'contents'); + } + if ($this->getPackageType() != 'bundle') { + $this->_packageInfo['contents'] = + array('dir' => array('attribs' => array('name' => '/'))); + if ($baseinstall) { + $this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'] = $baseinstall; + } + } else { + $this->_packageInfo['contents'] = array('bundledpackage' => array()); + } + } + + /** + * @param string relative path of the bundled package. + */ + function addBundledPackage($path) + { + if ($this->getPackageType() != 'bundle') { + return false; + } + $this->_filesValid = false; + $this->_isValid = 0; + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $path, array( + 'contents' => array('compatible', 'dependencies', 'providesextension', + 'usesrole', 'usestask', 'srcpackage', 'srcuri', 'phprelease', + 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease', + 'bundle', 'changelog'), + 'bundledpackage' => array())); + } + + /** + * @param string file name + * @param PEAR_Task_Common a read/write task + */ + function addTaskToFile($filename, $task) + { + if (!method_exists($task, 'getXml')) { + return false; + } + if (!method_exists($task, 'getName')) { + return false; + } + if (!method_exists($task, 'validate')) { + return false; + } + if (!$task->validate()) { + return false; + } + if (!isset($this->_packageInfo['contents']['dir']['file'])) { + return false; + } + $this->getTasksNs(); // discover the tasks namespace if not done already + $files = $this->_packageInfo['contents']['dir']['file']; + if (!isset($files[0])) { + $files = array($files); + $ind = false; + } else { + $ind = true; + } + foreach ($files as $i => $file) { + if (isset($file['attribs'])) { + if ($file['attribs']['name'] == $filename) { + if ($ind) { + $t = isset($this->_packageInfo['contents']['dir']['file'][$i] + ['attribs'][$this->_tasksNs . + ':' . $task->getName()]) ? + $this->_packageInfo['contents']['dir']['file'][$i] + ['attribs'][$this->_tasksNs . + ':' . $task->getName()] : false; + if ($t && !isset($t[0])) { + $this->_packageInfo['contents']['dir']['file'][$i] + [$this->_tasksNs . ':' . $task->getName()] = array($t); + } + $this->_packageInfo['contents']['dir']['file'][$i][$this->_tasksNs . + ':' . $task->getName()][] = $task->getXml(); + } else { + $t = isset($this->_packageInfo['contents']['dir']['file'] + ['attribs'][$this->_tasksNs . + ':' . $task->getName()]) ? $this->_packageInfo['contents']['dir']['file'] + ['attribs'][$this->_tasksNs . + ':' . $task->getName()] : false; + if ($t && !isset($t[0])) { + $this->_packageInfo['contents']['dir']['file'] + [$this->_tasksNs . ':' . $task->getName()] = array($t); + } + $this->_packageInfo['contents']['dir']['file'][$this->_tasksNs . + ':' . $task->getName()][] = $task->getXml(); + } + return true; + } + } + } + return false; + } + + /** + * @param string path to the file + * @param string filename + * @param array extra attributes + */ + function addFile($dir, $file, $attrs) + { + if ($this->getPackageType() == 'bundle') { + return false; + } + $this->_filesValid = false; + $this->_isValid = 0; + $dir = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'), $dir); + if ($dir == '/' || $dir == '') { + $dir = ''; + } else { + $dir .= '/'; + } + $attrs['name'] = $dir . $file; + if (!isset($this->_packageInfo['contents'])) { + // ensure that the contents tag is set up + $this->_packageInfo = $this->_insertBefore($this->_packageInfo, + array('compatible', 'dependencies', 'providesextension', 'usesrole', 'usestask', + 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', + 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease', + 'bundle', 'changelog'), array(), 'contents'); + } + if (isset($this->_packageInfo['contents']['dir']['file'])) { + if (!isset($this->_packageInfo['contents']['dir']['file'][0])) { + $this->_packageInfo['contents']['dir']['file'] = + array($this->_packageInfo['contents']['dir']['file']); + } + $this->_packageInfo['contents']['dir']['file'][]['attribs'] = $attrs; + } else { + $this->_packageInfo['contents']['dir']['file']['attribs'] = $attrs; + } + } + + /** + * @param string Dependent package name + * @param string Dependent package's channel name + * @param string minimum version of specified package that this release is guaranteed to be + * compatible with + * @param string maximum version of specified package that this release is guaranteed to be + * compatible with + * @param string versions of specified package that this release is not compatible with + */ + function addCompatiblePackage($name, $channel, $min, $max, $exclude = false) + { + $this->_isValid = 0; + $set = array( + 'name' => $name, + 'channel' => $channel, + 'min' => $min, + 'max' => $max, + ); + if ($exclude) { + $set['exclude'] = $exclude; + } + $this->_isValid = 0; + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $set, array( + 'compatible' => array('dependencies', 'providesextension', 'usesrole', 'usestask', + 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', + 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog') + )); + } + + /** + * Removes the tag entirely + */ + function resetUsesrole() + { + if (isset($this->_packageInfo['usesrole'])) { + unset($this->_packageInfo['usesrole']); + } + } + + /** + * @param string + * @param string package name or uri + * @param string channel name if non-uri + */ + function addUsesrole($role, $packageOrUri, $channel = false) { + $set = array('role' => $role); + if ($channel) { + $set['package'] = $packageOrUri; + $set['channel'] = $channel; + } else { + $set['uri'] = $packageOrUri; + } + $this->_isValid = 0; + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $set, array( + 'usesrole' => array('usestask', 'srcpackage', 'srcuri', + 'phprelease', 'extsrcrelease', 'extbinrelease', + 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog') + )); + } + + /** + * Removes the tag entirely + */ + function resetUsestask() + { + if (isset($this->_packageInfo['usestask'])) { + unset($this->_packageInfo['usestask']); + } + } + + + /** + * @param string + * @param string package name or uri + * @param string channel name if non-uri + */ + function addUsestask($task, $packageOrUri, $channel = false) { + $set = array('task' => $task); + if ($channel) { + $set['package'] = $packageOrUri; + $set['channel'] = $channel; + } else { + $set['uri'] = $packageOrUri; + } + $this->_isValid = 0; + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $set, array( + 'usestask' => array('srcpackage', 'srcuri', + 'phprelease', 'extsrcrelease', 'extbinrelease', + 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog') + )); + } + + /** + * Remove all compatible tags + */ + function clearCompatible() + { + unset($this->_packageInfo['compatible']); + } + + /** + * Reset dependencies prior to adding new ones + */ + function clearDeps() + { + if (!isset($this->_packageInfo['dependencies'])) { + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, array(), + array( + 'dependencies' => array('providesextension', 'usesrole', 'usestask', + 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', + 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'))); + } + $this->_packageInfo['dependencies'] = array(); + } + + /** + * @param string minimum PHP version allowed + * @param string maximum PHP version allowed + * @param array $exclude incompatible PHP versions + */ + function setPhpDep($min, $max = false, $exclude = false) + { + $this->_isValid = 0; + $dep = + array( + 'min' => $min, + ); + if ($max) { + $dep['max'] = $max; + } + if ($exclude) { + if (count($exclude) == 1) { + $exclude = $exclude[0]; + } + $dep['exclude'] = $exclude; + } + if (isset($this->_packageInfo['dependencies']['required']['php'])) { + $this->_stack->push(__FUNCTION__, 'warning', array('dep' => + $this->_packageInfo['dependencies']['required']['php']), + 'warning: PHP dependency already exists, overwriting'); + unset($this->_packageInfo['dependencies']['required']['php']); + } + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, + array( + 'dependencies' => array('providesextension', 'usesrole', 'usestask', + 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', + 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), + 'required' => array('optional', 'group'), + 'php' => array('pearinstaller', 'package', 'subpackage', 'extension', 'os', 'arch') + )); + return true; + } + + /** + * @param string minimum allowed PEAR installer version + * @param string maximum allowed PEAR installer version + * @param string recommended PEAR installer version + * @param array incompatible version of the PEAR installer + */ + function setPearinstallerDep($min, $max = false, $recommended = false, $exclude = false) + { + $this->_isValid = 0; + $dep = + array( + 'min' => $min, + ); + if ($max) { + $dep['max'] = $max; + } + if ($recommended) { + $dep['recommended'] = $recommended; + } + if ($exclude) { + if (count($exclude) == 1) { + $exclude = $exclude[0]; + } + $dep['exclude'] = $exclude; + } + if (isset($this->_packageInfo['dependencies']['required']['pearinstaller'])) { + $this->_stack->push(__FUNCTION__, 'warning', array('dep' => + $this->_packageInfo['dependencies']['required']['pearinstaller']), + 'warning: PEAR Installer dependency already exists, overwriting'); + unset($this->_packageInfo['dependencies']['required']['pearinstaller']); + } + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, + array( + 'dependencies' => array('providesextension', 'usesrole', 'usestask', + 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', + 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), + 'required' => array('optional', 'group'), + 'pearinstaller' => array('package', 'subpackage', 'extension', 'os', 'arch') + )); + } + + /** + * Mark a package as conflicting with this package + * @param string package name + * @param string package channel + * @param string extension this package provides, if any + * @param string|false minimum version required + * @param string|false maximum version allowed + * @param array|false versions to exclude from installation + */ + function addConflictingPackageDepWithChannel($name, $channel, + $providesextension = false, $min = false, $max = false, $exclude = false) + { + $this->_isValid = 0; + $dep = $this->_constructDep($name, $channel, false, $min, $max, false, + $exclude, $providesextension, false, true); + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, + array( + 'dependencies' => array('providesextension', 'usesrole', 'usestask', + 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', + 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), + 'required' => array('optional', 'group'), + 'package' => array('subpackage', 'extension', 'os', 'arch') + )); + } + + /** + * Mark a package as conflicting with this package + * @param string package name + * @param string package channel + * @param string extension this package provides, if any + */ + function addConflictingPackageDepWithUri($name, $uri, $providesextension = false) + { + $this->_isValid = 0; + $dep = + array( + 'name' => $name, + 'uri' => $uri, + 'conflicts' => '', + ); + if ($providesextension) { + $dep['providesextension'] = $providesextension; + } + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, + array( + 'dependencies' => array('providesextension', 'usesrole', 'usestask', + 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', + 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), + 'required' => array('optional', 'group'), + 'package' => array('subpackage', 'extension', 'os', 'arch') + )); + } + + function addDependencyGroup($name, $hint) + { + $this->_isValid = 0; + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, + array('attribs' => array('name' => $name, 'hint' => $hint)), + array( + 'dependencies' => array('providesextension', 'usesrole', 'usestask', + 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', + 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), + 'group' => array(), + )); + } + + /** + * @param string package name + * @param string|false channel name, false if this is a uri + * @param string|false uri name, false if this is a channel + * @param string|false minimum version required + * @param string|false maximum version allowed + * @param string|false recommended installation version + * @param array|false versions to exclude from installation + * @param string extension this package provides, if any + * @param bool if true, tells the installer to ignore the default optional dependency group + * when installing this package + * @param bool if true, tells the installer to negate this dependency (conflicts) + * @return array + * @access private + */ + function _constructDep($name, $channel, $uri, $min, $max, $recommended, $exclude, + $providesextension = false, $nodefault = false, + $conflicts = false) + { + $dep = + array( + 'name' => $name, + ); + if ($channel) { + $dep['channel'] = $channel; + } elseif ($uri) { + $dep['uri'] = $uri; + } + if ($min) { + $dep['min'] = $min; + } + if ($max) { + $dep['max'] = $max; + } + if ($recommended) { + $dep['recommended'] = $recommended; + } + if ($exclude) { + if (is_array($exclude) && count($exclude) == 1) { + $exclude = $exclude[0]; + } + $dep['exclude'] = $exclude; + } + if ($conflicts) { + $dep['conflicts'] = ''; + } + if ($nodefault) { + $dep['nodefault'] = ''; + } + if ($providesextension) { + $dep['providesextension'] = $providesextension; + } + return $dep; + } + + /** + * @param package|subpackage + * @param string group name + * @param string package name + * @param string package channel + * @param string minimum version + * @param string maximum version + * @param string recommended version + * @param array|false optional excluded versions + * @param string extension this package provides, if any + * @param bool if true, tells the installer to ignore the default optional dependency group + * when installing this package + * @return bool false if the dependency group has not been initialized with + * {@link addDependencyGroup()}, or a subpackage is added with + * a providesextension + */ + function addGroupPackageDepWithChannel($type, $groupname, $name, $channel, $min = false, + $max = false, $recommended = false, $exclude = false, + $providesextension = false, $nodefault = false) + { + if ($type == 'subpackage' && $providesextension) { + return false; // subpackages must be php packages + } + $dep = $this->_constructDep($name, $channel, false, $min, $max, $recommended, $exclude, + $providesextension, $nodefault); + return $this->_addGroupDependency($type, $dep, $groupname); + } + + /** + * @param package|subpackage + * @param string group name + * @param string package name + * @param string package uri + * @param string extension this package provides, if any + * @param bool if true, tells the installer to ignore the default optional dependency group + * when installing this package + * @return bool false if the dependency group has not been initialized with + * {@link addDependencyGroup()} + */ + function addGroupPackageDepWithURI($type, $groupname, $name, $uri, $providesextension = false, + $nodefault = false) + { + if ($type == 'subpackage' && $providesextension) { + return false; // subpackages must be php packages + } + $dep = $this->_constructDep($name, false, $uri, false, false, false, false, + $providesextension, $nodefault); + return $this->_addGroupDependency($type, $dep, $groupname); + } + + /** + * @param string group name (must be pre-existing) + * @param string extension name + * @param string minimum version allowed + * @param string maximum version allowed + * @param string recommended version + * @param array incompatible versions + */ + function addGroupExtensionDep($groupname, $name, $min = false, $max = false, + $recommended = false, $exclude = false) + { + $this->_isValid = 0; + $dep = $this->_constructDep($name, false, false, $min, $max, $recommended, $exclude); + return $this->_addGroupDependency('extension', $dep, $groupname); + } + + /** + * @param package|subpackage|extension + * @param array dependency contents + * @param string name of the dependency group to add this to + * @return boolean + * @access private + */ + function _addGroupDependency($type, $dep, $groupname) + { + $arr = array('subpackage', 'extension'); + if ($type != 'package') { + array_shift($arr); + } + if ($type == 'extension') { + array_shift($arr); + } + if (!isset($this->_packageInfo['dependencies']['group'])) { + return false; + } else { + if (!isset($this->_packageInfo['dependencies']['group'][0])) { + if ($this->_packageInfo['dependencies']['group']['attribs']['name'] == $groupname) { + $this->_packageInfo['dependencies']['group'] = $this->_mergeTag( + $this->_packageInfo['dependencies']['group'], $dep, + array( + $type => $arr + )); + $this->_isValid = 0; + return true; + } else { + return false; + } + } else { + foreach ($this->_packageInfo['dependencies']['group'] as $i => $group) { + if ($group['attribs']['name'] == $groupname) { + $this->_packageInfo['dependencies']['group'][$i] = $this->_mergeTag( + $this->_packageInfo['dependencies']['group'][$i], $dep, + array( + $type => $arr + )); + $this->_isValid = 0; + return true; + } + } + return false; + } + } + } + + /** + * @param optional|required + * @param string package name + * @param string package channel + * @param string minimum version + * @param string maximum version + * @param string recommended version + * @param string extension this package provides, if any + * @param bool if true, tells the installer to ignore the default optional dependency group + * when installing this package + * @param array|false optional excluded versions + */ + function addPackageDepWithChannel($type, $name, $channel, $min = false, $max = false, + $recommended = false, $exclude = false, + $providesextension = false, $nodefault = false) + { + if (!in_array($type, array('optional', 'required'), true)) { + $type = 'required'; + } + $this->_isValid = 0; + $arr = array('optional', 'group'); + if ($type != 'required') { + array_shift($arr); + } + $dep = $this->_constructDep($name, $channel, false, $min, $max, $recommended, $exclude, + $providesextension, $nodefault); + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, + array( + 'dependencies' => array('providesextension', 'usesrole', 'usestask', + 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', + 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), + $type => $arr, + 'package' => array('subpackage', 'extension', 'os', 'arch') + )); + } + + /** + * @param optional|required + * @param string name of the package + * @param string uri of the package + * @param string extension this package provides, if any + * @param bool if true, tells the installer to ignore the default optional dependency group + * when installing this package + */ + function addPackageDepWithUri($type, $name, $uri, $providesextension = false, + $nodefault = false) + { + $this->_isValid = 0; + $arr = array('optional', 'group'); + if ($type != 'required') { + array_shift($arr); + } + $dep = $this->_constructDep($name, false, $uri, false, false, false, false, + $providesextension, $nodefault); + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, + array( + 'dependencies' => array('providesextension', 'usesrole', 'usestask', + 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', + 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), + $type => $arr, + 'package' => array('subpackage', 'extension', 'os', 'arch') + )); + } + + /** + * @param optional|required optional, required + * @param string package name + * @param string package channel + * @param string minimum version + * @param string maximum version + * @param string recommended version + * @param array incompatible versions + * @param bool if true, tells the installer to ignore the default optional dependency group + * when installing this package + */ + function addSubpackageDepWithChannel($type, $name, $channel, $min = false, $max = false, + $recommended = false, $exclude = false, + $nodefault = false) + { + $this->_isValid = 0; + $arr = array('optional', 'group'); + if ($type != 'required') { + array_shift($arr); + } + $dep = $this->_constructDep($name, $channel, false, $min, $max, $recommended, $exclude, + $nodefault); + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, + array( + 'dependencies' => array('providesextension', 'usesrole', 'usestask', + 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', + 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), + $type => $arr, + 'subpackage' => array('extension', 'os', 'arch') + )); + } + + /** + * @param optional|required optional, required + * @param string package name + * @param string package uri for download + * @param bool if true, tells the installer to ignore the default optional dependency group + * when installing this package + */ + function addSubpackageDepWithUri($type, $name, $uri, $nodefault = false) + { + $this->_isValid = 0; + $arr = array('optional', 'group'); + if ($type != 'required') { + array_shift($arr); + } + $dep = $this->_constructDep($name, false, $uri, false, false, false, false, $nodefault); + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, + array( + 'dependencies' => array('providesextension', 'usesrole', 'usestask', + 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', + 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), + $type => $arr, + 'subpackage' => array('extension', 'os', 'arch') + )); + } + + /** + * @param optional|required optional, required + * @param string extension name + * @param string minimum version + * @param string maximum version + * @param string recommended version + * @param array incompatible versions + */ + function addExtensionDep($type, $name, $min = false, $max = false, $recommended = false, + $exclude = false) + { + $this->_isValid = 0; + $arr = array('optional', 'group'); + if ($type != 'required') { + array_shift($arr); + } + $dep = $this->_constructDep($name, false, false, $min, $max, $recommended, $exclude); + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, + array( + 'dependencies' => array('providesextension', 'usesrole', 'usestask', + 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', + 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), + $type => $arr, + 'extension' => array('os', 'arch') + )); + } + + /** + * @param string Operating system name + * @param boolean true if this package cannot be installed on this OS + */ + function addOsDep($name, $conflicts = false) + { + $this->_isValid = 0; + $dep = array('name' => $name); + if ($conflicts) { + $dep['conflicts'] = ''; + } + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, + array( + 'dependencies' => array('providesextension', 'usesrole', 'usestask', + 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', + 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), + 'required' => array('optional', 'group'), + 'os' => array('arch') + )); + } + + /** + * @param string Architecture matching pattern + * @param boolean true if this package cannot be installed on this architecture + */ + function addArchDep($pattern, $conflicts = false) + { + $this->_isValid = 0; + $dep = array('pattern' => $pattern); + if ($conflicts) { + $dep['conflicts'] = ''; + } + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, + array( + 'dependencies' => array('providesextension', 'usesrole', 'usestask', + 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', + 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), + 'required' => array('optional', 'group'), + 'arch' => array() + )); + } + + /** + * Set the kind of package, and erase all release tags + * + * - a php package is a PEAR-style package + * - an extbin package is a PECL-style extension binary + * - an extsrc package is a PECL-style source for a binary + * - an zendextbin package is a PECL-style zend extension binary + * - an zendextsrc package is a PECL-style source for a zend extension binary + * - a bundle package is a collection of other pre-packaged packages + * @param php|extbin|extsrc|zendextsrc|zendextbin|bundle + * @return bool success + */ + function setPackageType($type) + { + $this->_isValid = 0; + if (!in_array($type, array('php', 'extbin', 'extsrc', 'zendextsrc', + 'zendextbin', 'bundle'))) { + return false; + } + + if (in_array($type, array('zendextsrc', 'zendextbin'))) { + $this->_setPackageVersion2_1(); + } + + if ($type != 'bundle') { + $type .= 'release'; + } + + foreach (array('phprelease', 'extbinrelease', 'extsrcrelease', + 'zendextsrcrelease', 'zendextbinrelease', 'bundle') as $test) { + unset($this->_packageInfo[$test]); + } + + if (!isset($this->_packageInfo[$type])) { + // ensure that the release tag is set up + $this->_packageInfo = $this->_insertBefore($this->_packageInfo, array('changelog'), + array(), $type); + } + + $this->_packageInfo[$type] = array(); + return true; + } + + /** + * @return bool true if package type is set up + */ + function addRelease() + { + if ($type = $this->getPackageType()) { + if ($type != 'bundle') { + $type .= 'release'; + } + $this->_packageInfo = $this->_mergeTag($this->_packageInfo, array(), + array($type => array('changelog'))); + return true; + } + return false; + } + + /** + * Get the current release tag in order to add to it + * @param bool returns only releases that have installcondition if true + * @return array|null + */ + function &_getCurrentRelease($strict = true) + { + if ($p = $this->getPackageType()) { + if ($strict) { + if ($p == 'extsrc' || $p == 'zendextsrc') { + $a = null; + return $a; + } + } + if ($p != 'bundle') { + $p .= 'release'; + } + if (isset($this->_packageInfo[$p][0])) { + return $this->_packageInfo[$p][count($this->_packageInfo[$p]) - 1]; + } else { + return $this->_packageInfo[$p]; + } + } else { + $a = null; + return $a; + } + } + + /** + * Add a file to the current release that should be installed under a different name + * @param string path to file + * @param string name the file should be installed as + */ + function addInstallAs($path, $as) + { + $r = &$this->_getCurrentRelease(); + if ($r === null) { + return false; + } + $this->_isValid = 0; + $r = $this->_mergeTag($r, array('attribs' => array('name' => $path, 'as' => $as)), + array( + 'filelist' => array(), + 'install' => array('ignore') + )); + } + + /** + * Add a file to the current release that should be ignored + * @param string path to file + * @return bool success of operation + */ + function addIgnore($path) + { + $r = &$this->_getCurrentRelease(); + if ($r === null) { + return false; + } + $this->_isValid = 0; + $r = $this->_mergeTag($r, array('attribs' => array('name' => $path)), + array( + 'filelist' => array(), + 'ignore' => array() + )); + } + + /** + * Add an extension binary package for this extension source code release + * + * Note that the package must be from the same channel as the extension source package + * @param string + */ + function addBinarypackage($package) + { + if ($this->getPackageType() != 'extsrc' && $this->getPackageType() != 'zendextsrc') { + return false; + } + $r = &$this->_getCurrentRelease(false); + if ($r === null) { + return false; + } + $this->_isValid = 0; + $r = $this->_mergeTag($r, $package, + array( + 'binarypackage' => array('filelist'), + )); + } + + /** + * Add a configureoption to an extension source package + * @param string + * @param string + * @param string + */ + function addConfigureOption($name, $prompt, $default = null) + { + if ($this->getPackageType() != 'extsrc' && $this->getPackageType() != 'zendextsrc') { + return false; + } + + $r = &$this->_getCurrentRelease(false); + if ($r === null) { + return false; + } + + $opt = array('attribs' => array('name' => $name, 'prompt' => $prompt)); + if ($default !== null) { + $opt['attribs']['default'] = $default; + } + + $this->_isValid = 0; + $r = $this->_mergeTag($r, $opt, + array( + 'configureoption' => array('binarypackage', 'filelist'), + )); + } + + /** + * Set an installation condition based on php version for the current release set + * @param string minimum version + * @param string maximum version + * @param false|array incompatible versions of PHP + */ + function setPhpInstallCondition($min, $max, $exclude = false) + { + $r = &$this->_getCurrentRelease(); + if ($r === null) { + return false; + } + $this->_isValid = 0; + if (isset($r['installconditions']['php'])) { + unset($r['installconditions']['php']); + } + $dep = array('min' => $min, 'max' => $max); + if ($exclude) { + if (is_array($exclude) && count($exclude) == 1) { + $exclude = $exclude[0]; + } + $dep['exclude'] = $exclude; + } + if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') { + $r = $this->_mergeTag($r, $dep, + array( + 'installconditions' => array('configureoption', 'binarypackage', + 'filelist'), + 'php' => array('extension', 'os', 'arch') + )); + } else { + $r = $this->_mergeTag($r, $dep, + array( + 'installconditions' => array('filelist'), + 'php' => array('extension', 'os', 'arch') + )); + } + } + + /** + * @param optional|required optional, required + * @param string extension name + * @param string minimum version + * @param string maximum version + * @param string recommended version + * @param array incompatible versions + */ + function addExtensionInstallCondition($name, $min = false, $max = false, $recommended = false, + $exclude = false) + { + $r = &$this->_getCurrentRelease(); + if ($r === null) { + return false; + } + $this->_isValid = 0; + $dep = $this->_constructDep($name, false, false, $min, $max, $recommended, $exclude); + if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') { + $r = $this->_mergeTag($r, $dep, + array( + 'installconditions' => array('configureoption', 'binarypackage', + 'filelist'), + 'extension' => array('os', 'arch') + )); + } else { + $r = $this->_mergeTag($r, $dep, + array( + 'installconditions' => array('filelist'), + 'extension' => array('os', 'arch') + )); + } + } + + /** + * Set an installation condition based on operating system for the current release set + * @param string OS name + * @param bool whether this OS is incompatible with the current release + */ + function setOsInstallCondition($name, $conflicts = false) + { + $r = &$this->_getCurrentRelease(); + if ($r === null) { + return false; + } + $this->_isValid = 0; + if (isset($r['installconditions']['os'])) { + unset($r['installconditions']['os']); + } + $dep = array('name' => $name); + if ($conflicts) { + $dep['conflicts'] = ''; + } + if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') { + $r = $this->_mergeTag($r, $dep, + array( + 'installconditions' => array('configureoption', 'binarypackage', + 'filelist'), + 'os' => array('arch') + )); + } else { + $r = $this->_mergeTag($r, $dep, + array( + 'installconditions' => array('filelist'), + 'os' => array('arch') + )); + } + } + + /** + * Set an installation condition based on architecture for the current release set + * @param string architecture pattern + * @param bool whether this arch is incompatible with the current release + */ + function setArchInstallCondition($pattern, $conflicts = false) + { + $r = &$this->_getCurrentRelease(); + if ($r === null) { + return false; + } + $this->_isValid = 0; + if (isset($r['installconditions']['arch'])) { + unset($r['installconditions']['arch']); + } + $dep = array('pattern' => $pattern); + if ($conflicts) { + $dep['conflicts'] = ''; + } + if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') { + $r = $this->_mergeTag($r, $dep, + array( + 'installconditions' => array('configureoption', 'binarypackage', + 'filelist'), + 'arch' => array() + )); + } else { + $r = $this->_mergeTag($r, $dep, + array( + 'installconditions' => array('filelist'), + 'arch' => array() + )); + } + } + + /** + * For extension binary releases, this is used to specify either the + * static URI to a source package, or the package name and channel of the extsrc/zendextsrc + * package it is based on. + * @param string Package name, or full URI to source package (extsrc/zendextsrc type) + */ + function setSourcePackage($packageOrUri) + { + $this->_isValid = 0; + if (isset($this->_packageInfo['channel'])) { + $this->_packageInfo = $this->_insertBefore($this->_packageInfo, array('phprelease', + 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease', + 'bundle', 'changelog'), + $packageOrUri, 'srcpackage'); + } else { + $this->_packageInfo = $this->_insertBefore($this->_packageInfo, array('phprelease', + 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease', + 'bundle', 'changelog'), $packageOrUri, 'srcuri'); + } + } + + /** + * Generate a valid change log entry from the current package.xml + * @param string|false + */ + function generateChangeLogEntry($notes = false) + { + return array( + 'version' => + array( + 'release' => $this->getVersion('release'), + 'api' => $this->getVersion('api'), + ), + 'stability' => + $this->getStability(), + 'date' => $this->getDate(), + 'license' => $this->getLicense(true), + 'notes' => $notes ? $notes : $this->getNotes() + ); + } + + /** + * @param string release version to set change log notes for + * @param array output of {@link generateChangeLogEntry()} + */ + function setChangelogEntry($releaseversion, $contents) + { + if (!isset($this->_packageInfo['changelog'])) { + $this->_packageInfo['changelog']['release'] = $contents; + return; + } + if (!isset($this->_packageInfo['changelog']['release'][0])) { + if ($this->_packageInfo['changelog']['release']['version']['release'] == $releaseversion) { + $this->_packageInfo['changelog']['release'] = array( + $this->_packageInfo['changelog']['release']); + } else { + $this->_packageInfo['changelog']['release'] = array( + $this->_packageInfo['changelog']['release']); + return $this->_packageInfo['changelog']['release'][] = $contents; + } + } + foreach($this->_packageInfo['changelog']['release'] as $index => $changelog) { + if (isset($changelog['version']) && + strnatcasecmp($changelog['version']['release'], $releaseversion) == 0) { + $curlog = $index; + } + } + if (isset($curlog)) { + $this->_packageInfo['changelog']['release'][$curlog] = $contents; + } else { + $this->_packageInfo['changelog']['release'][] = $contents; + } + } + + /** + * Remove the changelog entirely + */ + function clearChangeLog() + { + unset($this->_packageInfo['changelog']); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Packager.php b/_piecrust/libs/PEAR/Packager.php new file mode 100644 index 0000000..8995a16 --- /dev/null +++ b/_piecrust/libs/PEAR/Packager.php @@ -0,0 +1,201 @@ + + * @author Tomas V. V. Cox + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Packager.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ + +/** + * base class + */ +require_once 'PEAR/Common.php'; +require_once 'PEAR/PackageFile.php'; +require_once 'System.php'; + +/** + * Administration class used to make a PEAR release tarball. + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 0.1 + */ +class PEAR_Packager extends PEAR_Common +{ + /** + * @var PEAR_Registry + */ + var $_registry; + + function package($pkgfile = null, $compress = true, $pkg2 = null) + { + // {{{ validate supplied package.xml file + if (empty($pkgfile)) { + $pkgfile = 'package.xml'; + } + + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $pkg = &new PEAR_PackageFile($this->config, $this->debug); + $pf = &$pkg->fromPackageFile($pkgfile, PEAR_VALIDATE_NORMAL); + $main = &$pf; + PEAR::staticPopErrorHandling(); + if (PEAR::isError($pf)) { + if (is_array($pf->getUserInfo())) { + foreach ($pf->getUserInfo() as $error) { + $this->log(0, 'Error: ' . $error['message']); + } + } + + $this->log(0, $pf->getMessage()); + return $this->raiseError("Cannot package, errors in package file"); + } + + foreach ($pf->getValidationWarnings() as $warning) { + $this->log(1, 'Warning: ' . $warning['message']); + } + + // }}} + if ($pkg2) { + $this->log(0, 'Attempting to process the second package file'); + PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); + $pf2 = &$pkg->fromPackageFile($pkg2, PEAR_VALIDATE_NORMAL); + PEAR::staticPopErrorHandling(); + if (PEAR::isError($pf2)) { + if (is_array($pf2->getUserInfo())) { + foreach ($pf2->getUserInfo() as $error) { + $this->log(0, 'Error: ' . $error['message']); + } + } + $this->log(0, $pf2->getMessage()); + return $this->raiseError("Cannot package, errors in second package file"); + } + + foreach ($pf2->getValidationWarnings() as $warning) { + $this->log(1, 'Warning: ' . $warning['message']); + } + + if ($pf2->getPackagexmlVersion() == '2.0' || + $pf2->getPackagexmlVersion() == '2.1' + ) { + $main = &$pf2; + $other = &$pf; + } else { + $main = &$pf; + $other = &$pf2; + } + + if ($main->getPackagexmlVersion() != '2.0' && + $main->getPackagexmlVersion() != '2.1') { + return PEAR::raiseError('Error: cannot package two package.xml version 1.0, can ' . + 'only package together a package.xml 1.0 and package.xml 2.0'); + } + + if ($other->getPackagexmlVersion() != '1.0') { + return PEAR::raiseError('Error: cannot package two package.xml version 2.0, can ' . + 'only package together a package.xml 1.0 and package.xml 2.0'); + } + } + + $main->setLogger($this); + if (!$main->validate(PEAR_VALIDATE_PACKAGING)) { + foreach ($main->getValidationWarnings() as $warning) { + $this->log(0, 'Error: ' . $warning['message']); + } + return $this->raiseError("Cannot package, errors in package"); + } + + foreach ($main->getValidationWarnings() as $warning) { + $this->log(1, 'Warning: ' . $warning['message']); + } + + if ($pkg2) { + $other->setLogger($this); + $a = false; + if (!$other->validate(PEAR_VALIDATE_NORMAL) || $a = !$main->isEquivalent($other)) { + foreach ($other->getValidationWarnings() as $warning) { + $this->log(0, 'Error: ' . $warning['message']); + } + + foreach ($main->getValidationWarnings() as $warning) { + $this->log(0, 'Error: ' . $warning['message']); + } + + if ($a) { + return $this->raiseError('The two package.xml files are not equivalent!'); + } + + return $this->raiseError("Cannot package, errors in package"); + } + + foreach ($other->getValidationWarnings() as $warning) { + $this->log(1, 'Warning: ' . $warning['message']); + } + + $gen = &$main->getDefaultGenerator(); + $tgzfile = $gen->toTgz2($this, $other, $compress); + if (PEAR::isError($tgzfile)) { + return $tgzfile; + } + + $dest_package = basename($tgzfile); + $pkgdir = dirname($pkgfile); + + // TAR the Package ------------------------------------------- + $this->log(1, "Package $dest_package done"); + if (file_exists("$pkgdir/CVS/Root")) { + $cvsversion = preg_replace('/[^a-z0-9]/i', '_', $pf->getVersion()); + $cvstag = "RELEASE_$cvsversion"; + $this->log(1, 'Tag the released code with "pear cvstag ' . + $main->getPackageFile() . '"'); + $this->log(1, "(or set the CVS tag $cvstag by hand)"); + } elseif (file_exists("$pkgdir/.svn")) { + $svnversion = preg_replace('/[^a-z0-9]/i', '.', $pf->getVersion()); + $svntag = $pf->getName() . "-$svnversion"; + $this->log(1, 'Tag the released code with "pear svntag ' . + $main->getPackageFile() . '"'); + $this->log(1, "(or set the SVN tag $svntag by hand)"); + } + } else { // this branch is executed for single packagefile packaging + $gen = &$pf->getDefaultGenerator(); + $tgzfile = $gen->toTgz($this, $compress); + if (PEAR::isError($tgzfile)) { + $this->log(0, $tgzfile->getMessage()); + return $this->raiseError("Cannot package, errors in package"); + } + + $dest_package = basename($tgzfile); + $pkgdir = dirname($pkgfile); + + // TAR the Package ------------------------------------------- + $this->log(1, "Package $dest_package done"); + if (file_exists("$pkgdir/CVS/Root")) { + $cvsversion = preg_replace('/[^a-z0-9]/i', '_', $pf->getVersion()); + $cvstag = "RELEASE_$cvsversion"; + $this->log(1, "Tag the released code with `pear cvstag $pkgfile'"); + $this->log(1, "(or set the CVS tag $cvstag by hand)"); + } elseif (file_exists("$pkgdir/.svn")) { + $svnversion = preg_replace('/[^a-z0-9]/i', '.', $pf->getVersion()); + $svntag = $pf->getName() . "-$svnversion"; + $this->log(1, "Tag the released code with `pear svntag $pkgfile'"); + $this->log(1, "(or set the SVN tag $svntag by hand)"); + } + } + + return $dest_package; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/REST.php b/_piecrust/libs/PEAR/REST.php new file mode 100644 index 0000000..34a804f --- /dev/null +++ b/_piecrust/libs/PEAR/REST.php @@ -0,0 +1,483 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: REST.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * For downloading xml files + */ +require_once 'PEAR.php'; +require_once 'PEAR/XMLParser.php'; + +/** + * Intelligently retrieve data, following hyperlinks if necessary, and re-directing + * as well + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_REST +{ + var $config; + var $_options; + + function PEAR_REST(&$config, $options = array()) + { + $this->config = &$config; + $this->_options = $options; + } + + /** + * Retrieve REST data, but always retrieve the local cache if it is available. + * + * This is useful for elements that should never change, such as information on a particular + * release + * @param string full URL to this resource + * @param array|false contents of the accept-encoding header + * @param boolean if true, xml will be returned as a string, otherwise, xml will be + * parsed using PEAR_XMLParser + * @return string|array + */ + function retrieveCacheFirst($url, $accept = false, $forcestring = false, $channel = false) + { + $cachefile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR . + md5($url) . 'rest.cachefile'; + + if (file_exists($cachefile)) { + return unserialize(implode('', file($cachefile))); + } + + return $this->retrieveData($url, $accept, $forcestring, $channel); + } + + /** + * Retrieve a remote REST resource + * @param string full URL to this resource + * @param array|false contents of the accept-encoding header + * @param boolean if true, xml will be returned as a string, otherwise, xml will be + * parsed using PEAR_XMLParser + * @return string|array + */ + function retrieveData($url, $accept = false, $forcestring = false, $channel = false) + { + $cacheId = $this->getCacheId($url); + if ($ret = $this->useLocalCache($url, $cacheId)) { + return $ret; + } + + $file = $trieddownload = false; + if (!isset($this->_options['offline'])) { + $trieddownload = true; + $file = $this->downloadHttp($url, $cacheId ? $cacheId['lastChange'] : false, $accept, $channel); + } + + if (PEAR::isError($file)) { + if ($file->getCode() !== -9276) { + return $file; + } + + $trieddownload = false; + $file = false; // use local copy if available on socket connect error + } + + if (!$file) { + $ret = $this->getCache($url); + if (!PEAR::isError($ret) && $trieddownload) { + // reset the age of the cache if the server says it was unmodified + $result = $this->saveCache($url, $ret, null, true, $cacheId); + if (PEAR::isError($result)) { + return PEAR::raiseError($result->getMessage()); + } + } + + return $ret; + } + + if (is_array($file)) { + $headers = $file[2]; + $lastmodified = $file[1]; + $content = $file[0]; + } else { + $headers = array(); + $lastmodified = false; + $content = $file; + } + + if ($forcestring) { + $result = $this->saveCache($url, $content, $lastmodified, false, $cacheId); + if (PEAR::isError($result)) { + return PEAR::raiseError($result->getMessage()); + } + + return $content; + } + + if (isset($headers['content-type'])) { + switch ($headers['content-type']) { + case 'text/xml' : + case 'application/xml' : + case 'text/plain' : + if ($headers['content-type'] === 'text/plain') { + $check = substr($content, 0, 5); + if ($check !== 'parse($content); + PEAR::popErrorHandling(); + if (PEAR::isError($err)) { + return PEAR::raiseError('Invalid xml downloaded from "' . $url . '": ' . + $err->getMessage()); + } + $content = $parser->getData(); + case 'text/html' : + default : + // use it as a string + } + } else { + // assume XML + $parser = new PEAR_XMLParser; + $parser->parse($content); + $content = $parser->getData(); + } + + $result = $this->saveCache($url, $content, $lastmodified, false, $cacheId); + if (PEAR::isError($result)) { + return PEAR::raiseError($result->getMessage()); + } + + return $content; + } + + function useLocalCache($url, $cacheid = null) + { + if ($cacheid === null) { + $cacheidfile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR . + md5($url) . 'rest.cacheid'; + if (!file_exists($cacheidfile)) { + return false; + } + + $cacheid = unserialize(implode('', file($cacheidfile))); + } + + $cachettl = $this->config->get('cache_ttl'); + // If cache is newer than $cachettl seconds, we use the cache! + if (time() - $cacheid['age'] < $cachettl) { + return $this->getCache($url); + } + + return false; + } + + function getCacheId($url) + { + $cacheidfile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR . + md5($url) . 'rest.cacheid'; + + if (!file_exists($cacheidfile)) { + return false; + } + + $ret = unserialize(implode('', file($cacheidfile))); + return $ret; + } + + function getCache($url) + { + $cachefile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR . + md5($url) . 'rest.cachefile'; + + if (!file_exists($cachefile)) { + return PEAR::raiseError('No cached content available for "' . $url . '"'); + } + + return unserialize(implode('', file($cachefile))); + } + + /** + * @param string full URL to REST resource + * @param string original contents of the REST resource + * @param array HTTP Last-Modified and ETag headers + * @param bool if true, then the cache id file should be regenerated to + * trigger a new time-to-live value + */ + function saveCache($url, $contents, $lastmodified, $nochange = false, $cacheid = null) + { + $cache_dir = $this->config->get('cache_dir'); + $d = $cache_dir . DIRECTORY_SEPARATOR . md5($url); + $cacheidfile = $d . 'rest.cacheid'; + $cachefile = $d . 'rest.cachefile'; + + if (!is_dir($cache_dir)) { + if (System::mkdir(array('-p', $cache_dir)) === false) { + return PEAR::raiseError("The value of config option cache_dir ($cache_dir) is not a directory and attempts to create the directory failed."); + } + } + + if ($cacheid === null && $nochange) { + $cacheid = unserialize(implode('', file($cacheidfile))); + } + + $idData = serialize(array( + 'age' => time(), + 'lastChange' => ($nochange ? $cacheid['lastChange'] : $lastmodified), + )); + + $result = $this->saveCacheFile($cacheidfile, $idData); + if (PEAR::isError($result)) { + return $result; + } elseif ($nochange) { + return true; + } + + $result = $this->saveCacheFile($cachefile, serialize($contents)); + if (PEAR::isError($result)) { + if (file_exists($cacheidfile)) { + @unlink($cacheidfile); + } + + return $result; + } + + return true; + } + + function saveCacheFile($file, $contents) + { + $len = strlen($contents); + + $cachefile_fp = @fopen($file, 'xb'); // x is the O_CREAT|O_EXCL mode + if ($cachefile_fp !== false) { // create file + if (fwrite($cachefile_fp, $contents, $len) < $len) { + fclose($cachefile_fp); + return PEAR::raiseError("Could not write $file."); + } + } else { // update file + $cachefile_lstat = lstat($file); + $cachefile_fp = @fopen($file, 'wb'); + if (!$cachefile_fp) { + return PEAR::raiseError("Could not open $file for writing."); + } + + $cachefile_fstat = fstat($cachefile_fp); + if ( + $cachefile_lstat['mode'] == $cachefile_fstat['mode'] && + $cachefile_lstat['ino'] == $cachefile_fstat['ino'] && + $cachefile_lstat['dev'] == $cachefile_fstat['dev'] && + $cachefile_fstat['nlink'] === 1 + ) { + if (fwrite($cachefile_fp, $contents, $len) < $len) { + fclose($cachefile_fp); + return PEAR::raiseError("Could not write $file."); + } + } else { + fclose($cachefile_fp); + $link = function_exists('readlink') ? readlink($file) : $file; + return PEAR::raiseError('SECURITY ERROR: Will not write to ' . $file . ' as it is symlinked to ' . $link . ' - Possible symlink attack'); + } + } + + fclose($cachefile_fp); + return true; + } + + /** + * Efficiently Download a file through HTTP. Returns downloaded file as a string in-memory + * This is best used for small files + * + * If an HTTP proxy has been configured (http_proxy PEAR_Config + * setting), the proxy will be used. + * + * @param string $url the URL to download + * @param string $save_dir directory to save file in + * @param false|string|array $lastmodified header values to check against for caching + * use false to return the header values from this download + * @param false|array $accept Accept headers to send + * @return string|array Returns the contents of the downloaded file or a PEAR + * error on failure. If the error is caused by + * socket-related errors, the error object will + * have the fsockopen error code available through + * getCode(). If caching is requested, then return the header + * values. + * + * @access public + */ + function downloadHttp($url, $lastmodified = null, $accept = false, $channel = false) + { + static $redirect = 0; + // always reset , so we are clean case of error + $wasredirect = $redirect; + $redirect = 0; + + $info = parse_url($url); + if (!isset($info['scheme']) || !in_array($info['scheme'], array('http', 'https'))) { + return PEAR::raiseError('Cannot download non-http URL "' . $url . '"'); + } + + if (!isset($info['host'])) { + return PEAR::raiseError('Cannot download from non-URL "' . $url . '"'); + } + + $host = isset($info['host']) ? $info['host'] : null; + $port = isset($info['port']) ? $info['port'] : null; + $path = isset($info['path']) ? $info['path'] : null; + $schema = (isset($info['scheme']) && $info['scheme'] == 'https') ? 'https' : 'http'; + + $proxy_host = $proxy_port = $proxy_user = $proxy_pass = ''; + if ($this->config->get('http_proxy')&& + $proxy = parse_url($this->config->get('http_proxy')) + ) { + $proxy_host = isset($proxy['host']) ? $proxy['host'] : null; + if ($schema === 'https') { + $proxy_host = 'ssl://' . $proxy_host; + } + + $proxy_port = isset($proxy['port']) ? $proxy['port'] : 8080; + $proxy_user = isset($proxy['user']) ? urldecode($proxy['user']) : null; + $proxy_pass = isset($proxy['pass']) ? urldecode($proxy['pass']) : null; + $proxy_schema = (isset($proxy['scheme']) && $proxy['scheme'] == 'https') ? 'https' : 'http'; + } + + if (empty($port)) { + $port = (isset($info['scheme']) && $info['scheme'] == 'https') ? 443 : 80; + } + + if (isset($proxy['host'])) { + $request = "GET $url HTTP/1.1\r\n"; + } else { + $request = "GET $path HTTP/1.1\r\n"; + } + + $request .= "Host: $host\r\n"; + $ifmodifiedsince = ''; + if (is_array($lastmodified)) { + if (isset($lastmodified['Last-Modified'])) { + $ifmodifiedsince = 'If-Modified-Since: ' . $lastmodified['Last-Modified'] . "\r\n"; + } + + if (isset($lastmodified['ETag'])) { + $ifmodifiedsince .= "If-None-Match: $lastmodified[ETag]\r\n"; + } + } else { + $ifmodifiedsince = ($lastmodified ? "If-Modified-Since: $lastmodified\r\n" : ''); + } + + $request .= $ifmodifiedsince . + "User-Agent: PEAR/1.9.4/PHP/" . PHP_VERSION . "\r\n"; + + $username = $this->config->get('username', null, $channel); + $password = $this->config->get('password', null, $channel); + + if ($username && $password) { + $tmp = base64_encode("$username:$password"); + $request .= "Authorization: Basic $tmp\r\n"; + } + + if ($proxy_host != '' && $proxy_user != '') { + $request .= 'Proxy-Authorization: Basic ' . + base64_encode($proxy_user . ':' . $proxy_pass) . "\r\n"; + } + + if ($accept) { + $request .= 'Accept: ' . implode(', ', $accept) . "\r\n"; + } + + $request .= "Accept-Encoding:\r\n"; + $request .= "Connection: close\r\n"; + $request .= "\r\n"; + + if ($proxy_host != '') { + $fp = @fsockopen($proxy_host, $proxy_port, $errno, $errstr, 15); + if (!$fp) { + return PEAR::raiseError("Connection to `$proxy_host:$proxy_port' failed: $errstr", -9276); + } + } else { + if ($schema === 'https') { + $host = 'ssl://' . $host; + } + + $fp = @fsockopen($host, $port, $errno, $errstr); + if (!$fp) { + return PEAR::raiseError("Connection to `$host:$port' failed: $errstr", $errno); + } + } + + fwrite($fp, $request); + + $headers = array(); + $reply = 0; + while ($line = trim(fgets($fp, 1024))) { + if (preg_match('/^([^:]+):\s+(.*)\s*\\z/', $line, $matches)) { + $headers[strtolower($matches[1])] = trim($matches[2]); + } elseif (preg_match('|^HTTP/1.[01] ([0-9]{3}) |', $line, $matches)) { + $reply = (int)$matches[1]; + if ($reply == 304 && ($lastmodified || ($lastmodified === false))) { + return false; + } + + if (!in_array($reply, array(200, 301, 302, 303, 305, 307))) { + return PEAR::raiseError("File $schema://$host:$port$path not valid (received: $line)"); + } + } + } + + if ($reply != 200) { + if (!isset($headers['location'])) { + return PEAR::raiseError("File $schema://$host:$port$path not valid (redirected but no location)"); + } + + if ($wasredirect > 4) { + return PEAR::raiseError("File $schema://$host:$port$path not valid (redirection looped more than 5 times)"); + } + + $redirect = $wasredirect + 1; + return $this->downloadHttp($headers['location'], $lastmodified, $accept, $channel); + } + + $length = isset($headers['content-length']) ? $headers['content-length'] : -1; + + $data = ''; + while ($chunk = @fread($fp, 8192)) { + $data .= $chunk; + } + fclose($fp); + + if ($lastmodified === false || $lastmodified) { + if (isset($headers['etag'])) { + $lastmodified = array('ETag' => $headers['etag']); + } + + if (isset($headers['last-modified'])) { + if (is_array($lastmodified)) { + $lastmodified['Last-Modified'] = $headers['last-modified']; + } else { + $lastmodified = $headers['last-modified']; + } + } + + return array($data, $lastmodified, $headers); + } + + return $data; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/REST/10.php b/_piecrust/libs/PEAR/REST/10.php new file mode 100644 index 0000000..6ded7ae --- /dev/null +++ b/_piecrust/libs/PEAR/REST/10.php @@ -0,0 +1,871 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: 10.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a12 + */ + +/** + * For downloading REST xml/txt files + */ +require_once 'PEAR/REST.php'; + +/** + * Implement REST 1.0 + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a12 + */ +class PEAR_REST_10 +{ + /** + * @var PEAR_REST + */ + var $_rest; + function PEAR_REST_10($config, $options = array()) + { + $this->_rest = &new PEAR_REST($config, $options); + } + + /** + * Retrieve information about a remote package to be downloaded from a REST server + * + * @param string $base The uri to prepend to all REST calls + * @param array $packageinfo an array of format: + *
        +     *  array(
        +     *   'package' => 'packagename',
        +     *   'channel' => 'channelname',
        +     *  ['state' => 'alpha' (or valid state),]
        +     *  -or-
        +     *  ['version' => '1.whatever']
        +     * 
        + * @param string $prefstate Current preferred_state config variable value + * @param bool $installed the installed version of this package to compare against + * @return array|false|PEAR_Error see {@link _returnDownloadURL()} + */ + function getDownloadURL($base, $packageinfo, $prefstate, $installed, $channel = false) + { + $states = $this->betterStates($prefstate, true); + if (!$states) { + return PEAR::raiseError('"' . $prefstate . '" is not a valid state'); + } + + $channel = $packageinfo['channel']; + $package = $packageinfo['package']; + $state = isset($packageinfo['state']) ? $packageinfo['state'] : null; + $version = isset($packageinfo['version']) ? $packageinfo['version'] : null; + $restFile = $base . 'r/' . strtolower($package) . '/allreleases.xml'; + + $info = $this->_rest->retrieveData($restFile, false, false, $channel); + if (PEAR::isError($info)) { + return PEAR::raiseError('No releases available for package "' . + $channel . '/' . $package . '"'); + } + + if (!isset($info['r'])) { + return false; + } + + $release = $found = false; + if (!is_array($info['r']) || !isset($info['r'][0])) { + $info['r'] = array($info['r']); + } + + foreach ($info['r'] as $release) { + if (!isset($this->_rest->_options['force']) && ($installed && + version_compare($release['v'], $installed, '<'))) { + continue; + } + + if (isset($state)) { + // try our preferred state first + if ($release['s'] == $state) { + $found = true; + break; + } + // see if there is something newer and more stable + // bug #7221 + if (in_array($release['s'], $this->betterStates($state), true)) { + $found = true; + break; + } + } elseif (isset($version)) { + if ($release['v'] == $version) { + $found = true; + break; + } + } else { + if (in_array($release['s'], $states)) { + $found = true; + break; + } + } + } + + return $this->_returnDownloadURL($base, $package, $release, $info, $found, false, $channel); + } + + function getDepDownloadURL($base, $xsdversion, $dependency, $deppackage, + $prefstate = 'stable', $installed = false, $channel = false) + { + $states = $this->betterStates($prefstate, true); + if (!$states) { + return PEAR::raiseError('"' . $prefstate . '" is not a valid state'); + } + + $channel = $dependency['channel']; + $package = $dependency['name']; + $state = isset($dependency['state']) ? $dependency['state'] : null; + $version = isset($dependency['version']) ? $dependency['version'] : null; + $restFile = $base . 'r/' . strtolower($package) . '/allreleases.xml'; + + $info = $this->_rest->retrieveData($restFile, false, false, $channel); + if (PEAR::isError($info)) { + return PEAR::raiseError('Package "' . $deppackage['channel'] . '/' . $deppackage['package'] + . '" dependency "' . $channel . '/' . $package . '" has no releases'); + } + + if (!is_array($info) || !isset($info['r'])) { + return false; + } + + $exclude = array(); + $min = $max = $recommended = false; + if ($xsdversion == '1.0') { + switch ($dependency['rel']) { + case 'ge' : + $min = $dependency['version']; + break; + case 'gt' : + $min = $dependency['version']; + $exclude = array($dependency['version']); + break; + case 'eq' : + $recommended = $dependency['version']; + break; + case 'lt' : + $max = $dependency['version']; + $exclude = array($dependency['version']); + break; + case 'le' : + $max = $dependency['version']; + break; + case 'ne' : + $exclude = array($dependency['version']); + break; + } + } else { + $min = isset($dependency['min']) ? $dependency['min'] : false; + $max = isset($dependency['max']) ? $dependency['max'] : false; + $recommended = isset($dependency['recommended']) ? + $dependency['recommended'] : false; + if (isset($dependency['exclude'])) { + if (!isset($dependency['exclude'][0])) { + $exclude = array($dependency['exclude']); + } + } + } + $release = $found = false; + if (!is_array($info['r']) || !isset($info['r'][0])) { + $info['r'] = array($info['r']); + } + foreach ($info['r'] as $release) { + if (!isset($this->_rest->_options['force']) && ($installed && + version_compare($release['v'], $installed, '<'))) { + continue; + } + if (in_array($release['v'], $exclude)) { // skip excluded versions + continue; + } + // allow newer releases to say "I'm OK with the dependent package" + if ($xsdversion == '2.0' && isset($release['co'])) { + if (!is_array($release['co']) || !isset($release['co'][0])) { + $release['co'] = array($release['co']); + } + foreach ($release['co'] as $entry) { + if (isset($entry['x']) && !is_array($entry['x'])) { + $entry['x'] = array($entry['x']); + } elseif (!isset($entry['x'])) { + $entry['x'] = array(); + } + if ($entry['c'] == $deppackage['channel'] && + strtolower($entry['p']) == strtolower($deppackage['package']) && + version_compare($deppackage['version'], $entry['min'], '>=') && + version_compare($deppackage['version'], $entry['max'], '<=') && + !in_array($release['v'], $entry['x'])) { + $recommended = $release['v']; + break; + } + } + } + if ($recommended) { + if ($release['v'] != $recommended) { // if we want a specific + // version, then skip all others + continue; + } else { + if (!in_array($release['s'], $states)) { + // the stability is too low, but we must return the + // recommended version if possible + return $this->_returnDownloadURL($base, $package, $release, $info, true, false, $channel); + } + } + } + if ($min && version_compare($release['v'], $min, 'lt')) { // skip too old versions + continue; + } + if ($max && version_compare($release['v'], $max, 'gt')) { // skip too new versions + continue; + } + if ($installed && version_compare($release['v'], $installed, '<')) { + continue; + } + if (in_array($release['s'], $states)) { // if in the preferred state... + $found = true; // ... then use it + break; + } + } + return $this->_returnDownloadURL($base, $package, $release, $info, $found, false, $channel); + } + + /** + * Take raw data and return the array needed for processing a download URL + * + * @param string $base REST base uri + * @param string $package Package name + * @param array $release an array of format array('v' => version, 's' => state) + * describing the release to download + * @param array $info list of all releases as defined by allreleases.xml + * @param bool|null $found determines whether the release was found or this is the next + * best alternative. If null, then versions were skipped because + * of PHP dependency + * @return array|PEAR_Error + * @access private + */ + function _returnDownloadURL($base, $package, $release, $info, $found, $phpversion = false, $channel = false) + { + if (!$found) { + $release = $info['r'][0]; + } + + $packageLower = strtolower($package); + $pinfo = $this->_rest->retrieveCacheFirst($base . 'p/' . $packageLower . '/' . + 'info.xml', false, false, $channel); + if (PEAR::isError($pinfo)) { + return PEAR::raiseError('Package "' . $package . + '" does not have REST info xml available'); + } + + $releaseinfo = $this->_rest->retrieveCacheFirst($base . 'r/' . $packageLower . '/' . + $release['v'] . '.xml', false, false, $channel); + if (PEAR::isError($releaseinfo)) { + return PEAR::raiseError('Package "' . $package . '" Version "' . $release['v'] . + '" does not have REST xml available'); + } + + $packagexml = $this->_rest->retrieveCacheFirst($base . 'r/' . $packageLower . '/' . + 'deps.' . $release['v'] . '.txt', false, true, $channel); + if (PEAR::isError($packagexml)) { + return PEAR::raiseError('Package "' . $package . '" Version "' . $release['v'] . + '" does not have REST dependency information available'); + } + + $packagexml = unserialize($packagexml); + if (!$packagexml) { + $packagexml = array(); + } + + $allinfo = $this->_rest->retrieveData($base . 'r/' . $packageLower . + '/allreleases.xml', false, false, $channel); + if (PEAR::isError($allinfo)) { + return $allinfo; + } + + if (!is_array($allinfo['r']) || !isset($allinfo['r'][0])) { + $allinfo['r'] = array($allinfo['r']); + } + + $compatible = false; + foreach ($allinfo['r'] as $release) { + if ($release['v'] != $releaseinfo['v']) { + continue; + } + + if (!isset($release['co'])) { + break; + } + + $compatible = array(); + if (!is_array($release['co']) || !isset($release['co'][0])) { + $release['co'] = array($release['co']); + } + + foreach ($release['co'] as $entry) { + $comp = array(); + $comp['name'] = $entry['p']; + $comp['channel'] = $entry['c']; + $comp['min'] = $entry['min']; + $comp['max'] = $entry['max']; + if (isset($entry['x']) && !is_array($entry['x'])) { + $comp['exclude'] = $entry['x']; + } + + $compatible[] = $comp; + } + + if (count($compatible) == 1) { + $compatible = $compatible[0]; + } + + break; + } + + $deprecated = false; + if (isset($pinfo['dc']) && isset($pinfo['dp'])) { + if (is_array($pinfo['dp'])) { + $deprecated = array('channel' => (string) $pinfo['dc'], + 'package' => trim($pinfo['dp']['_content'])); + } else { + $deprecated = array('channel' => (string) $pinfo['dc'], + 'package' => trim($pinfo['dp'])); + } + } + + $return = array( + 'version' => $releaseinfo['v'], + 'info' => $packagexml, + 'package' => $releaseinfo['p']['_content'], + 'stability' => $releaseinfo['st'], + 'compatible' => $compatible, + 'deprecated' => $deprecated, + ); + + if ($found) { + $return['url'] = $releaseinfo['g']; + return $return; + } + + $return['php'] = $phpversion; + return $return; + } + + function listPackages($base, $channel = false) + { + $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel); + if (PEAR::isError($packagelist)) { + return $packagelist; + } + + if (!is_array($packagelist) || !isset($packagelist['p'])) { + return array(); + } + + if (!is_array($packagelist['p'])) { + $packagelist['p'] = array($packagelist['p']); + } + + return $packagelist['p']; + } + + /** + * List all categories of a REST server + * + * @param string $base base URL of the server + * @return array of categorynames + */ + function listCategories($base, $channel = false) + { + $categories = array(); + + // c/categories.xml does not exist; + // check for every package its category manually + // This is SLOOOWWWW : /// + $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel); + if (PEAR::isError($packagelist)) { + return $packagelist; + } + + if (!is_array($packagelist) || !isset($packagelist['p'])) { + $ret = array(); + return $ret; + } + + if (!is_array($packagelist['p'])) { + $packagelist['p'] = array($packagelist['p']); + } + + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + foreach ($packagelist['p'] as $package) { + $inf = $this->_rest->retrieveData($base . 'p/' . strtolower($package) . '/info.xml', false, false, $channel); + if (PEAR::isError($inf)) { + PEAR::popErrorHandling(); + return $inf; + } + $cat = $inf['ca']['_content']; + if (!isset($categories[$cat])) { + $categories[$cat] = $inf['ca']; + } + } + + return array_values($categories); + } + + /** + * List a category of a REST server + * + * @param string $base base URL of the server + * @param string $category name of the category + * @param boolean $info also download full package info + * @return array of packagenames + */ + function listCategory($base, $category, $info = false, $channel = false) + { + // gives '404 Not Found' error when category doesn't exist + $packagelist = $this->_rest->retrieveData($base.'c/'.urlencode($category).'/packages.xml', false, false, $channel); + if (PEAR::isError($packagelist)) { + return $packagelist; + } + + if (!is_array($packagelist) || !isset($packagelist['p'])) { + return array(); + } + + if (!is_array($packagelist['p']) || + !isset($packagelist['p'][0])) { // only 1 pkg + $packagelist = array($packagelist['p']); + } else { + $packagelist = $packagelist['p']; + } + + if ($info == true) { + // get individual package info + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + foreach ($packagelist as $i => $packageitem) { + $url = sprintf('%s'.'r/%s/latest.txt', + $base, + strtolower($packageitem['_content'])); + $version = $this->_rest->retrieveData($url, false, false, $channel); + if (PEAR::isError($version)) { + break; // skipit + } + $url = sprintf('%s'.'r/%s/%s.xml', + $base, + strtolower($packageitem['_content']), + $version); + $info = $this->_rest->retrieveData($url, false, false, $channel); + if (PEAR::isError($info)) { + break; // skipit + } + $packagelist[$i]['info'] = $info; + } + PEAR::popErrorHandling(); + } + + return $packagelist; + } + + + function listAll($base, $dostable, $basic = true, $searchpackage = false, $searchsummary = false, $channel = false) + { + $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel); + if (PEAR::isError($packagelist)) { + return $packagelist; + } + if ($this->_rest->config->get('verbose') > 0) { + $ui = &PEAR_Frontend::singleton(); + $ui->log('Retrieving data...0%', true); + } + $ret = array(); + if (!is_array($packagelist) || !isset($packagelist['p'])) { + return $ret; + } + if (!is_array($packagelist['p'])) { + $packagelist['p'] = array($packagelist['p']); + } + + // only search-packagename = quicksearch ! + if ($searchpackage && (!$searchsummary || empty($searchpackage))) { + $newpackagelist = array(); + foreach ($packagelist['p'] as $package) { + if (!empty($searchpackage) && stristr($package, $searchpackage) !== false) { + $newpackagelist[] = $package; + } + } + $packagelist['p'] = $newpackagelist; + } + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $next = .1; + foreach ($packagelist['p'] as $progress => $package) { + if ($this->_rest->config->get('verbose') > 0) { + if ($progress / count($packagelist['p']) >= $next) { + if ($next == .5) { + $ui->log('50%', false); + } else { + $ui->log('.', false); + } + $next += .1; + } + } + + if ($basic) { // remote-list command + if ($dostable) { + $latest = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . + '/stable.txt', false, false, $channel); + } else { + $latest = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . + '/latest.txt', false, false, $channel); + } + if (PEAR::isError($latest)) { + $latest = false; + } + $info = array('stable' => $latest); + } else { // list-all command + $inf = $this->_rest->retrieveData($base . 'p/' . strtolower($package) . '/info.xml', false, false, $channel); + if (PEAR::isError($inf)) { + PEAR::popErrorHandling(); + return $inf; + } + if ($searchpackage) { + $found = (!empty($searchpackage) && stristr($package, $searchpackage) !== false); + if (!$found && !(isset($searchsummary) && !empty($searchsummary) + && (stristr($inf['s'], $searchsummary) !== false + || stristr($inf['d'], $searchsummary) !== false))) + { + continue; + }; + } + $releases = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . + '/allreleases.xml', false, false, $channel); + if (PEAR::isError($releases)) { + continue; + } + if (!isset($releases['r'][0])) { + $releases['r'] = array($releases['r']); + } + unset($latest); + unset($unstable); + unset($stable); + unset($state); + foreach ($releases['r'] as $release) { + if (!isset($latest)) { + if ($dostable && $release['s'] == 'stable') { + $latest = $release['v']; + $state = 'stable'; + } + if (!$dostable) { + $latest = $release['v']; + $state = $release['s']; + } + } + if (!isset($stable) && $release['s'] == 'stable') { + $stable = $release['v']; + if (!isset($unstable)) { + $unstable = $stable; + } + } + if (!isset($unstable) && $release['s'] != 'stable') { + $latest = $unstable = $release['v']; + $state = $release['s']; + } + if (isset($latest) && !isset($state)) { + $state = $release['s']; + } + if (isset($latest) && isset($stable) && isset($unstable)) { + break; + } + } + $deps = array(); + if (!isset($unstable)) { + $unstable = false; + $state = 'stable'; + if (isset($stable)) { + $latest = $unstable = $stable; + } + } else { + $latest = $unstable; + } + if (!isset($latest)) { + $latest = false; + } + if ($latest) { + $d = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/deps.' . + $latest . '.txt', false, false, $channel); + if (!PEAR::isError($d)) { + $d = unserialize($d); + if ($d) { + if (isset($d['required'])) { + if (!class_exists('PEAR_PackageFile_v2')) { + require_once 'PEAR/PackageFile/v2.php'; + } + if (!isset($pf)) { + $pf = new PEAR_PackageFile_v2; + } + $pf->setDeps($d); + $tdeps = $pf->getDeps(); + } else { + $tdeps = $d; + } + foreach ($tdeps as $dep) { + if ($dep['type'] !== 'pkg') { + continue; + } + $deps[] = $dep; + } + } + } + } + if (!isset($stable)) { + $stable = '-n/a-'; + } + if (!$searchpackage) { + $info = array('stable' => $latest, 'summary' => $inf['s'], 'description' => + $inf['d'], 'deps' => $deps, 'category' => $inf['ca']['_content'], + 'unstable' => $unstable, 'state' => $state); + } else { + $info = array('stable' => $stable, 'summary' => $inf['s'], 'description' => + $inf['d'], 'deps' => $deps, 'category' => $inf['ca']['_content'], + 'unstable' => $unstable, 'state' => $state); + } + } + $ret[$package] = $info; + } + PEAR::popErrorHandling(); + return $ret; + } + + function listLatestUpgrades($base, $pref_state, $installed, $channel, &$reg) + { + $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel); + if (PEAR::isError($packagelist)) { + return $packagelist; + } + + $ret = array(); + if (!is_array($packagelist) || !isset($packagelist['p'])) { + return $ret; + } + + if (!is_array($packagelist['p'])) { + $packagelist['p'] = array($packagelist['p']); + } + + foreach ($packagelist['p'] as $package) { + if (!isset($installed[strtolower($package)])) { + continue; + } + + $inst_version = $reg->packageInfo($package, 'version', $channel); + $inst_state = $reg->packageInfo($package, 'release_state', $channel); + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $info = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . + '/allreleases.xml', false, false, $channel); + PEAR::popErrorHandling(); + if (PEAR::isError($info)) { + continue; // no remote releases + } + + if (!isset($info['r'])) { + continue; + } + + $release = $found = false; + if (!is_array($info['r']) || !isset($info['r'][0])) { + $info['r'] = array($info['r']); + } + + // $info['r'] is sorted by version number + usort($info['r'], array($this, '_sortReleasesByVersionNumber')); + foreach ($info['r'] as $release) { + if ($inst_version && version_compare($release['v'], $inst_version, '<=')) { + // not newer than the one installed + break; + } + + // new version > installed version + if (!$pref_state) { + // every state is a good state + $found = true; + break; + } else { + $new_state = $release['s']; + // if new state >= installed state: go + if (in_array($new_state, $this->betterStates($inst_state, true))) { + $found = true; + break; + } else { + // only allow to lower the state of package, + // if new state >= preferred state: go + if (in_array($new_state, $this->betterStates($pref_state, true))) { + $found = true; + break; + } + } + } + } + + if (!$found) { + continue; + } + + $relinfo = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/' . + $release['v'] . '.xml', false, false, $channel); + if (PEAR::isError($relinfo)) { + return $relinfo; + } + + $ret[$package] = array( + 'version' => $release['v'], + 'state' => $release['s'], + 'filesize' => $relinfo['f'], + ); + } + + return $ret; + } + + function packageInfo($base, $package, $channel = false) + { + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $pinfo = $this->_rest->retrieveData($base . 'p/' . strtolower($package) . '/info.xml', false, false, $channel); + if (PEAR::isError($pinfo)) { + PEAR::popErrorHandling(); + return PEAR::raiseError('Unknown package: "' . $package . '" in channel "' . $channel . '"' . "\n". 'Debug: ' . + $pinfo->getMessage()); + } + + $releases = array(); + $allreleases = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . + '/allreleases.xml', false, false, $channel); + if (!PEAR::isError($allreleases)) { + if (!class_exists('PEAR_PackageFile_v2')) { + require_once 'PEAR/PackageFile/v2.php'; + } + + if (!is_array($allreleases['r']) || !isset($allreleases['r'][0])) { + $allreleases['r'] = array($allreleases['r']); + } + + $pf = new PEAR_PackageFile_v2; + foreach ($allreleases['r'] as $release) { + $ds = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/deps.' . + $release['v'] . '.txt', false, false, $channel); + if (PEAR::isError($ds)) { + continue; + } + + if (!isset($latest)) { + $latest = $release['v']; + } + + $pf->setDeps(unserialize($ds)); + $ds = $pf->getDeps(); + $info = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) + . '/' . $release['v'] . '.xml', false, false, $channel); + + if (PEAR::isError($info)) { + continue; + } + + $releases[$release['v']] = array( + 'doneby' => $info['m'], + 'license' => $info['l'], + 'summary' => $info['s'], + 'description' => $info['d'], + 'releasedate' => $info['da'], + 'releasenotes' => $info['n'], + 'state' => $release['s'], + 'deps' => $ds ? $ds : array(), + ); + } + } else { + $latest = ''; + } + + PEAR::popErrorHandling(); + if (isset($pinfo['dc']) && isset($pinfo['dp'])) { + if (is_array($pinfo['dp'])) { + $deprecated = array('channel' => (string) $pinfo['dc'], + 'package' => trim($pinfo['dp']['_content'])); + } else { + $deprecated = array('channel' => (string) $pinfo['dc'], + 'package' => trim($pinfo['dp'])); + } + } else { + $deprecated = false; + } + + if (!isset($latest)) { + $latest = ''; + } + + return array( + 'name' => $pinfo['n'], + 'channel' => $pinfo['c'], + 'category' => $pinfo['ca']['_content'], + 'stable' => $latest, + 'license' => $pinfo['l'], + 'summary' => $pinfo['s'], + 'description' => $pinfo['d'], + 'releases' => $releases, + 'deprecated' => $deprecated, + ); + } + + /** + * Return an array containing all of the states that are more stable than + * or equal to the passed in state + * + * @param string Release state + * @param boolean Determines whether to include $state in the list + * @return false|array False if $state is not a valid release state + */ + function betterStates($state, $include = false) + { + static $states = array('snapshot', 'devel', 'alpha', 'beta', 'stable'); + $i = array_search($state, $states); + if ($i === false) { + return false; + } + + if ($include) { + $i--; + } + + return array_slice($states, $i + 1); + } + + /** + * Sort releases by version number + * + * @access private + */ + function _sortReleasesByVersionNumber($a, $b) + { + if (version_compare($a['v'], $b['v'], '=')) { + return 0; + } + + if (version_compare($a['v'], $b['v'], '>')) { + return -1; + } + + if (version_compare($a['v'], $b['v'], '<')) { + return 1; + } + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/REST/11.php b/_piecrust/libs/PEAR/REST/11.php new file mode 100644 index 0000000..831cfcc --- /dev/null +++ b/_piecrust/libs/PEAR/REST/11.php @@ -0,0 +1,341 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: 11.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.3 + */ + +/** + * For downloading REST xml/txt files + */ +require_once 'PEAR/REST.php'; + +/** + * Implement REST 1.1 + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.3 + */ +class PEAR_REST_11 +{ + /** + * @var PEAR_REST + */ + var $_rest; + + function PEAR_REST_11($config, $options = array()) + { + $this->_rest = &new PEAR_REST($config, $options); + } + + function listAll($base, $dostable, $basic = true, $searchpackage = false, $searchsummary = false, $channel = false) + { + $categorylist = $this->_rest->retrieveData($base . 'c/categories.xml', false, false, $channel); + if (PEAR::isError($categorylist)) { + return $categorylist; + } + + $ret = array(); + if (!is_array($categorylist['c']) || !isset($categorylist['c'][0])) { + $categorylist['c'] = array($categorylist['c']); + } + + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + + foreach ($categorylist['c'] as $progress => $category) { + $category = $category['_content']; + $packagesinfo = $this->_rest->retrieveData($base . + 'c/' . urlencode($category) . '/packagesinfo.xml', false, false, $channel); + + if (PEAR::isError($packagesinfo)) { + continue; + } + + if (!is_array($packagesinfo) || !isset($packagesinfo['pi'])) { + continue; + } + + if (!is_array($packagesinfo['pi']) || !isset($packagesinfo['pi'][0])) { + $packagesinfo['pi'] = array($packagesinfo['pi']); + } + + foreach ($packagesinfo['pi'] as $packageinfo) { + if (empty($packageinfo)) { + continue; + } + + $info = $packageinfo['p']; + $package = $info['n']; + $releases = isset($packageinfo['a']) ? $packageinfo['a'] : false; + unset($latest); + unset($unstable); + unset($stable); + unset($state); + + if ($releases) { + if (!isset($releases['r'][0])) { + $releases['r'] = array($releases['r']); + } + + foreach ($releases['r'] as $release) { + if (!isset($latest)) { + if ($dostable && $release['s'] == 'stable') { + $latest = $release['v']; + $state = 'stable'; + } + if (!$dostable) { + $latest = $release['v']; + $state = $release['s']; + } + } + + if (!isset($stable) && $release['s'] == 'stable') { + $stable = $release['v']; + if (!isset($unstable)) { + $unstable = $stable; + } + } + + if (!isset($unstable) && $release['s'] != 'stable') { + $unstable = $release['v']; + $state = $release['s']; + } + + if (isset($latest) && !isset($state)) { + $state = $release['s']; + } + + if (isset($latest) && isset($stable) && isset($unstable)) { + break; + } + } + } + + if ($basic) { // remote-list command + if (!isset($latest)) { + $latest = false; + } + + if ($dostable) { + // $state is not set if there are no releases + if (isset($state) && $state == 'stable') { + $ret[$package] = array('stable' => $latest); + } else { + $ret[$package] = array('stable' => '-n/a-'); + } + } else { + $ret[$package] = array('stable' => $latest); + } + + continue; + } + + // list-all command + if (!isset($unstable)) { + $unstable = false; + $state = 'stable'; + if (isset($stable)) { + $latest = $unstable = $stable; + } + } else { + $latest = $unstable; + } + + if (!isset($latest)) { + $latest = false; + } + + $deps = array(); + if ($latest && isset($packageinfo['deps'])) { + if (!is_array($packageinfo['deps']) || + !isset($packageinfo['deps'][0]) + ) { + $packageinfo['deps'] = array($packageinfo['deps']); + } + + $d = false; + foreach ($packageinfo['deps'] as $dep) { + if ($dep['v'] == $latest) { + $d = unserialize($dep['d']); + } + } + + if ($d) { + if (isset($d['required'])) { + if (!class_exists('PEAR_PackageFile_v2')) { + require_once 'PEAR/PackageFile/v2.php'; + } + + if (!isset($pf)) { + $pf = new PEAR_PackageFile_v2; + } + + $pf->setDeps($d); + $tdeps = $pf->getDeps(); + } else { + $tdeps = $d; + } + + foreach ($tdeps as $dep) { + if ($dep['type'] !== 'pkg') { + continue; + } + + $deps[] = $dep; + } + } + } + + $info = array( + 'stable' => $latest, + 'summary' => $info['s'], + 'description' => $info['d'], + 'deps' => $deps, + 'category' => $info['ca']['_content'], + 'unstable' => $unstable, + 'state' => $state + ); + $ret[$package] = $info; + } + } + + PEAR::popErrorHandling(); + return $ret; + } + + /** + * List all categories of a REST server + * + * @param string $base base URL of the server + * @return array of categorynames + */ + function listCategories($base, $channel = false) + { + $categorylist = $this->_rest->retrieveData($base . 'c/categories.xml', false, false, $channel); + if (PEAR::isError($categorylist)) { + return $categorylist; + } + + if (!is_array($categorylist) || !isset($categorylist['c'])) { + return array(); + } + + if (isset($categorylist['c']['_content'])) { + // only 1 category + $categorylist['c'] = array($categorylist['c']); + } + + return $categorylist['c']; + } + + /** + * List packages in a category of a REST server + * + * @param string $base base URL of the server + * @param string $category name of the category + * @param boolean $info also download full package info + * @return array of packagenames + */ + function listCategory($base, $category, $info = false, $channel = false) + { + if ($info == false) { + $url = '%s'.'c/%s/packages.xml'; + } else { + $url = '%s'.'c/%s/packagesinfo.xml'; + } + $url = sprintf($url, + $base, + urlencode($category)); + + // gives '404 Not Found' error when category doesn't exist + $packagelist = $this->_rest->retrieveData($url, false, false, $channel); + if (PEAR::isError($packagelist)) { + return $packagelist; + } + if (!is_array($packagelist)) { + return array(); + } + + if ($info == false) { + if (!isset($packagelist['p'])) { + return array(); + } + if (!is_array($packagelist['p']) || + !isset($packagelist['p'][0])) { // only 1 pkg + $packagelist = array($packagelist['p']); + } else { + $packagelist = $packagelist['p']; + } + return $packagelist; + } + + // info == true + if (!isset($packagelist['pi'])) { + return array(); + } + + if (!is_array($packagelist['pi']) || + !isset($packagelist['pi'][0])) { // only 1 pkg + $packagelist_pre = array($packagelist['pi']); + } else { + $packagelist_pre = $packagelist['pi']; + } + + $packagelist = array(); + foreach ($packagelist_pre as $i => $item) { + // compatibility with r/.xml + if (isset($item['a']['r'][0])) { + // multiple releases + $item['p']['v'] = $item['a']['r'][0]['v']; + $item['p']['st'] = $item['a']['r'][0]['s']; + } elseif (isset($item['a'])) { + // first and only release + $item['p']['v'] = $item['a']['r']['v']; + $item['p']['st'] = $item['a']['r']['s']; + } + + $packagelist[$i] = array('attribs' => $item['p']['r'], + '_content' => $item['p']['n'], + 'info' => $item['p']); + } + + return $packagelist; + } + + /** + * Return an array containing all of the states that are more stable than + * or equal to the passed in state + * + * @param string Release state + * @param boolean Determines whether to include $state in the list + * @return false|array False if $state is not a valid release state + */ + function betterStates($state, $include = false) + { + static $states = array('snapshot', 'devel', 'alpha', 'beta', 'stable'); + $i = array_search($state, $states); + if ($i === false) { + return false; + } + if ($include) { + $i--; + } + return array_slice($states, $i + 1); + } +} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/REST/13.php b/_piecrust/libs/PEAR/REST/13.php new file mode 100644 index 0000000..722ae0d --- /dev/null +++ b/_piecrust/libs/PEAR/REST/13.php @@ -0,0 +1,299 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: 13.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a12 + */ + +/** + * For downloading REST xml/txt files + */ +require_once 'PEAR/REST.php'; +require_once 'PEAR/REST/10.php'; + +/** + * Implement REST 1.3 + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a12 + */ +class PEAR_REST_13 extends PEAR_REST_10 +{ + /** + * Retrieve information about a remote package to be downloaded from a REST server + * + * This is smart enough to resolve the minimum PHP version dependency prior to download + * @param string $base The uri to prepend to all REST calls + * @param array $packageinfo an array of format: + *
        +     *  array(
        +     *   'package' => 'packagename',
        +     *   'channel' => 'channelname',
        +     *  ['state' => 'alpha' (or valid state),]
        +     *  -or-
        +     *  ['version' => '1.whatever']
        +     * 
        + * @param string $prefstate Current preferred_state config variable value + * @param bool $installed the installed version of this package to compare against + * @return array|false|PEAR_Error see {@link _returnDownloadURL()} + */ + function getDownloadURL($base, $packageinfo, $prefstate, $installed, $channel = false) + { + $states = $this->betterStates($prefstate, true); + if (!$states) { + return PEAR::raiseError('"' . $prefstate . '" is not a valid state'); + } + + $channel = $packageinfo['channel']; + $package = $packageinfo['package']; + $state = isset($packageinfo['state']) ? $packageinfo['state'] : null; + $version = isset($packageinfo['version']) ? $packageinfo['version'] : null; + $restFile = $base . 'r/' . strtolower($package) . '/allreleases2.xml'; + + $info = $this->_rest->retrieveData($restFile, false, false, $channel); + if (PEAR::isError($info)) { + return PEAR::raiseError('No releases available for package "' . + $channel . '/' . $package . '"'); + } + + if (!isset($info['r'])) { + return false; + } + + $release = $found = false; + if (!is_array($info['r']) || !isset($info['r'][0])) { + $info['r'] = array($info['r']); + } + + $skippedphp = false; + foreach ($info['r'] as $release) { + if (!isset($this->_rest->_options['force']) && ($installed && + version_compare($release['v'], $installed, '<'))) { + continue; + } + + if (isset($state)) { + // try our preferred state first + if ($release['s'] == $state) { + if (!isset($version) && version_compare($release['m'], phpversion(), '>')) { + // skip releases that require a PHP version newer than our PHP version + $skippedphp = $release; + continue; + } + $found = true; + break; + } + + // see if there is something newer and more stable + // bug #7221 + if (in_array($release['s'], $this->betterStates($state), true)) { + if (!isset($version) && version_compare($release['m'], phpversion(), '>')) { + // skip releases that require a PHP version newer than our PHP version + $skippedphp = $release; + continue; + } + $found = true; + break; + } + } elseif (isset($version)) { + if ($release['v'] == $version) { + if (!isset($this->_rest->_options['force']) && + !isset($version) && + version_compare($release['m'], phpversion(), '>')) { + // skip releases that require a PHP version newer than our PHP version + $skippedphp = $release; + continue; + } + $found = true; + break; + } + } else { + if (in_array($release['s'], $states)) { + if (version_compare($release['m'], phpversion(), '>')) { + // skip releases that require a PHP version newer than our PHP version + $skippedphp = $release; + continue; + } + $found = true; + break; + } + } + } + + if (!$found && $skippedphp) { + $found = null; + } + + return $this->_returnDownloadURL($base, $package, $release, $info, $found, $skippedphp, $channel); + } + + function getDepDownloadURL($base, $xsdversion, $dependency, $deppackage, + $prefstate = 'stable', $installed = false, $channel = false) + { + $states = $this->betterStates($prefstate, true); + if (!$states) { + return PEAR::raiseError('"' . $prefstate . '" is not a valid state'); + } + + $channel = $dependency['channel']; + $package = $dependency['name']; + $state = isset($dependency['state']) ? $dependency['state'] : null; + $version = isset($dependency['version']) ? $dependency['version'] : null; + $restFile = $base . 'r/' . strtolower($package) .'/allreleases2.xml'; + + $info = $this->_rest->retrieveData($restFile, false, false, $channel); + if (PEAR::isError($info)) { + return PEAR::raiseError('Package "' . $deppackage['channel'] . '/' . $deppackage['package'] + . '" dependency "' . $channel . '/' . $package . '" has no releases'); + } + + if (!is_array($info) || !isset($info['r'])) { + return false; + } + + $exclude = array(); + $min = $max = $recommended = false; + if ($xsdversion == '1.0') { + $pinfo['package'] = $dependency['name']; + $pinfo['channel'] = 'pear.php.net'; // this is always true - don't change this + switch ($dependency['rel']) { + case 'ge' : + $min = $dependency['version']; + break; + case 'gt' : + $min = $dependency['version']; + $exclude = array($dependency['version']); + break; + case 'eq' : + $recommended = $dependency['version']; + break; + case 'lt' : + $max = $dependency['version']; + $exclude = array($dependency['version']); + break; + case 'le' : + $max = $dependency['version']; + break; + case 'ne' : + $exclude = array($dependency['version']); + break; + } + } else { + $pinfo['package'] = $dependency['name']; + $min = isset($dependency['min']) ? $dependency['min'] : false; + $max = isset($dependency['max']) ? $dependency['max'] : false; + $recommended = isset($dependency['recommended']) ? + $dependency['recommended'] : false; + if (isset($dependency['exclude'])) { + if (!isset($dependency['exclude'][0])) { + $exclude = array($dependency['exclude']); + } + } + } + + $skippedphp = $found = $release = false; + if (!is_array($info['r']) || !isset($info['r'][0])) { + $info['r'] = array($info['r']); + } + + foreach ($info['r'] as $release) { + if (!isset($this->_rest->_options['force']) && ($installed && + version_compare($release['v'], $installed, '<'))) { + continue; + } + + if (in_array($release['v'], $exclude)) { // skip excluded versions + continue; + } + + // allow newer releases to say "I'm OK with the dependent package" + if ($xsdversion == '2.0' && isset($release['co'])) { + if (!is_array($release['co']) || !isset($release['co'][0])) { + $release['co'] = array($release['co']); + } + + foreach ($release['co'] as $entry) { + if (isset($entry['x']) && !is_array($entry['x'])) { + $entry['x'] = array($entry['x']); + } elseif (!isset($entry['x'])) { + $entry['x'] = array(); + } + + if ($entry['c'] == $deppackage['channel'] && + strtolower($entry['p']) == strtolower($deppackage['package']) && + version_compare($deppackage['version'], $entry['min'], '>=') && + version_compare($deppackage['version'], $entry['max'], '<=') && + !in_array($release['v'], $entry['x'])) { + if (version_compare($release['m'], phpversion(), '>')) { + // skip dependency releases that require a PHP version + // newer than our PHP version + $skippedphp = $release; + continue; + } + + $recommended = $release['v']; + break; + } + } + } + + if ($recommended) { + if ($release['v'] != $recommended) { // if we want a specific + // version, then skip all others + continue; + } + + if (!in_array($release['s'], $states)) { + // the stability is too low, but we must return the + // recommended version if possible + return $this->_returnDownloadURL($base, $package, $release, $info, true, false, $channel); + } + } + + if ($min && version_compare($release['v'], $min, 'lt')) { // skip too old versions + continue; + } + + if ($max && version_compare($release['v'], $max, 'gt')) { // skip too new versions + continue; + } + + if ($installed && version_compare($release['v'], $installed, '<')) { + continue; + } + + if (in_array($release['s'], $states)) { // if in the preferred state... + if (version_compare($release['m'], phpversion(), '>')) { + // skip dependency releases that require a PHP version + // newer than our PHP version + $skippedphp = $release; + continue; + } + + $found = true; // ... then use it + break; + } + } + + if (!$found && $skippedphp) { + $found = null; + } + + return $this->_returnDownloadURL($base, $package, $release, $info, $found, $skippedphp, $channel); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Registry.php b/_piecrust/libs/PEAR/Registry.php new file mode 100644 index 0000000..35e17db --- /dev/null +++ b/_piecrust/libs/PEAR/Registry.php @@ -0,0 +1,2395 @@ + + * @author Tomas V. V. Cox + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Registry.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 0.1 + */ + +/** + * for PEAR_Error + */ +require_once 'PEAR.php'; +require_once 'PEAR/DependencyDB.php'; + +define('PEAR_REGISTRY_ERROR_LOCK', -2); +define('PEAR_REGISTRY_ERROR_FORMAT', -3); +define('PEAR_REGISTRY_ERROR_FILE', -4); +define('PEAR_REGISTRY_ERROR_CONFLICT', -5); +define('PEAR_REGISTRY_ERROR_CHANNEL_FILE', -6); + +/** + * Administration class used to maintain the installed package database. + * @category pear + * @package PEAR + * @author Stig Bakken + * @author Tomas V. V. Cox + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Registry extends PEAR +{ + /** + * File containing all channel information. + * @var string + */ + var $channels = ''; + + /** Directory where registry files are stored. + * @var string + */ + var $statedir = ''; + + /** File where the file map is stored + * @var string + */ + var $filemap = ''; + + /** Directory where registry files for channels are stored. + * @var string + */ + var $channelsdir = ''; + + /** Name of file used for locking the registry + * @var string + */ + var $lockfile = ''; + + /** File descriptor used during locking + * @var resource + */ + var $lock_fp = null; + + /** Mode used during locking + * @var int + */ + var $lock_mode = 0; // XXX UNUSED + + /** Cache of package information. Structure: + * array( + * 'package' => array('id' => ... ), + * ... ) + * @var array + */ + var $pkginfo_cache = array(); + + /** Cache of file map. Structure: + * array( '/path/to/file' => 'package', ... ) + * @var array + */ + var $filemap_cache = array(); + + /** + * @var false|PEAR_ChannelFile + */ + var $_pearChannel; + + /** + * @var false|PEAR_ChannelFile + */ + var $_peclChannel; + + /** + * @var false|PEAR_ChannelFile + */ + var $_docChannel; + + /** + * @var PEAR_DependencyDB + */ + var $_dependencyDB; + + /** + * @var PEAR_Config + */ + var $_config; + + /** + * PEAR_Registry constructor. + * + * @param string (optional) PEAR install directory (for .php files) + * @param PEAR_ChannelFile PEAR_ChannelFile object representing the PEAR channel, if + * default values are not desired. Only used the very first time a PEAR + * repository is initialized + * @param PEAR_ChannelFile PEAR_ChannelFile object representing the PECL channel, if + * default values are not desired. Only used the very first time a PEAR + * repository is initialized + * + * @access public + */ + function PEAR_Registry($pear_install_dir = PEAR_INSTALL_DIR, $pear_channel = false, + $pecl_channel = false) + { + parent::PEAR(); + $this->setInstallDir($pear_install_dir); + $this->_pearChannel = $pear_channel; + $this->_peclChannel = $pecl_channel; + $this->_config = false; + } + + function setInstallDir($pear_install_dir = PEAR_INSTALL_DIR) + { + $ds = DIRECTORY_SEPARATOR; + $this->install_dir = $pear_install_dir; + $this->channelsdir = $pear_install_dir.$ds.'.channels'; + $this->statedir = $pear_install_dir.$ds.'.registry'; + $this->filemap = $pear_install_dir.$ds.'.filemap'; + $this->lockfile = $pear_install_dir.$ds.'.lock'; + } + + function hasWriteAccess() + { + if (!file_exists($this->install_dir)) { + $dir = $this->install_dir; + while ($dir && $dir != '.') { + $olddir = $dir; + $dir = dirname($dir); + if ($dir != '.' && file_exists($dir)) { + if (is_writeable($dir)) { + return true; + } + + return false; + } + + if ($dir == $olddir) { // this can happen in safe mode + return @is_writable($dir); + } + } + + return false; + } + + return is_writeable($this->install_dir); + } + + function setConfig(&$config, $resetInstallDir = true) + { + $this->_config = &$config; + if ($resetInstallDir) { + $this->setInstallDir($config->get('php_dir')); + } + } + + function _initializeChannelDirs() + { + static $running = false; + if (!$running) { + $running = true; + $ds = DIRECTORY_SEPARATOR; + if (!is_dir($this->channelsdir) || + !file_exists($this->channelsdir . $ds . 'pear.php.net.reg') || + !file_exists($this->channelsdir . $ds . 'pecl.php.net.reg') || + !file_exists($this->channelsdir . $ds . 'doc.php.net.reg') || + !file_exists($this->channelsdir . $ds . '__uri.reg')) { + if (!file_exists($this->channelsdir . $ds . 'pear.php.net.reg')) { + $pear_channel = $this->_pearChannel; + if (!is_a($pear_channel, 'PEAR_ChannelFile') || !$pear_channel->validate()) { + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } + + $pear_channel = new PEAR_ChannelFile; + $pear_channel->setAlias('pear'); + $pear_channel->setServer('pear.php.net'); + $pear_channel->setSummary('PHP Extension and Application Repository'); + $pear_channel->setDefaultPEARProtocols(); + $pear_channel->setBaseURL('REST1.0', 'http://pear.php.net/rest/'); + $pear_channel->setBaseURL('REST1.1', 'http://pear.php.net/rest/'); + $pear_channel->setBaseURL('REST1.3', 'http://pear.php.net/rest/'); + //$pear_channel->setBaseURL('REST1.4', 'http://pear.php.net/rest/'); + } else { + $pear_channel->setServer('pear.php.net'); + $pear_channel->setAlias('pear'); + } + + $pear_channel->validate(); + $this->_addChannel($pear_channel); + } + + if (!file_exists($this->channelsdir . $ds . 'pecl.php.net.reg')) { + $pecl_channel = $this->_peclChannel; + if (!is_a($pecl_channel, 'PEAR_ChannelFile') || !$pecl_channel->validate()) { + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } + + $pecl_channel = new PEAR_ChannelFile; + $pecl_channel->setAlias('pecl'); + $pecl_channel->setServer('pecl.php.net'); + $pecl_channel->setSummary('PHP Extension Community Library'); + $pecl_channel->setDefaultPEARProtocols(); + $pecl_channel->setBaseURL('REST1.0', 'http://pecl.php.net/rest/'); + $pecl_channel->setBaseURL('REST1.1', 'http://pecl.php.net/rest/'); + $pecl_channel->setValidationPackage('PEAR_Validator_PECL', '1.0'); + } else { + $pecl_channel->setServer('pecl.php.net'); + $pecl_channel->setAlias('pecl'); + } + + $pecl_channel->validate(); + $this->_addChannel($pecl_channel); + } + + if (!file_exists($this->channelsdir . $ds . 'doc.php.net.reg')) { + $doc_channel = $this->_docChannel; + if (!is_a($doc_channel, 'PEAR_ChannelFile') || !$doc_channel->validate()) { + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } + + $doc_channel = new PEAR_ChannelFile; + $doc_channel->setAlias('phpdocs'); + $doc_channel->setServer('doc.php.net'); + $doc_channel->setSummary('PHP Documentation Team'); + $doc_channel->setDefaultPEARProtocols(); + $doc_channel->setBaseURL('REST1.0', 'http://doc.php.net/rest/'); + $doc_channel->setBaseURL('REST1.1', 'http://doc.php.net/rest/'); + $doc_channel->setBaseURL('REST1.3', 'http://doc.php.net/rest/'); + } else { + $doc_channel->setServer('doc.php.net'); + $doc_channel->setAlias('doc'); + } + + $doc_channel->validate(); + $this->_addChannel($doc_channel); + } + + if (!file_exists($this->channelsdir . $ds . '__uri.reg')) { + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } + + $private = new PEAR_ChannelFile; + $private->setName('__uri'); + $private->setDefaultPEARProtocols(); + $private->setBaseURL('REST1.0', '****'); + $private->setSummary('Pseudo-channel for static packages'); + $this->_addChannel($private); + } + $this->_rebuildFileMap(); + } + + $running = false; + } + } + + function _initializeDirs() + { + $ds = DIRECTORY_SEPARATOR; + // XXX Compatibility code should be removed in the future + // rename all registry files if any to lowercase + if (!OS_WINDOWS && file_exists($this->statedir) && is_dir($this->statedir) && + $handle = opendir($this->statedir)) { + $dest = $this->statedir . $ds; + while (false !== ($file = readdir($handle))) { + if (preg_match('/^.*[A-Z].*\.reg\\z/', $file)) { + rename($dest . $file, $dest . strtolower($file)); + } + } + closedir($handle); + } + + $this->_initializeChannelDirs(); + if (!file_exists($this->filemap)) { + $this->_rebuildFileMap(); + } + $this->_initializeDepDB(); + } + + function _initializeDepDB() + { + if (!isset($this->_dependencyDB)) { + static $initializing = false; + if (!$initializing) { + $initializing = true; + if (!$this->_config) { // never used? + $file = OS_WINDOWS ? 'pear.ini' : '.pearrc'; + $this->_config = &new PEAR_Config($this->statedir . DIRECTORY_SEPARATOR . + $file); + $this->_config->setRegistry($this); + $this->_config->set('php_dir', $this->install_dir); + } + + $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->_config); + if (PEAR::isError($this->_dependencyDB)) { + // attempt to recover by removing the dep db + if (file_exists($this->_config->get('php_dir', null, 'pear.php.net') . + DIRECTORY_SEPARATOR . '.depdb')) { + @unlink($this->_config->get('php_dir', null, 'pear.php.net') . + DIRECTORY_SEPARATOR . '.depdb'); + } + + $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->_config); + if (PEAR::isError($this->_dependencyDB)) { + echo $this->_dependencyDB->getMessage(); + echo 'Unrecoverable error'; + exit(1); + } + } + + $initializing = false; + } + } + } + + /** + * PEAR_Registry destructor. Makes sure no locks are forgotten. + * + * @access private + */ + function _PEAR_Registry() + { + parent::_PEAR(); + if (is_resource($this->lock_fp)) { + $this->_unlock(); + } + } + + /** + * Make sure the directory where we keep registry files exists. + * + * @return bool TRUE if directory exists, FALSE if it could not be + * created + * + * @access private + */ + function _assertStateDir($channel = false) + { + if ($channel && $this->_getChannelFromAlias($channel) != 'pear.php.net') { + return $this->_assertChannelStateDir($channel); + } + + static $init = false; + if (!file_exists($this->statedir)) { + if (!$this->hasWriteAccess()) { + return false; + } + + require_once 'System.php'; + if (!System::mkdir(array('-p', $this->statedir))) { + return $this->raiseError("could not create directory '{$this->statedir}'"); + } + $init = true; + } elseif (!is_dir($this->statedir)) { + return $this->raiseError('Cannot create directory ' . $this->statedir . ', ' . + 'it already exists and is not a directory'); + } + + $ds = DIRECTORY_SEPARATOR; + if (!file_exists($this->channelsdir)) { + if (!file_exists($this->channelsdir . $ds . 'pear.php.net.reg') || + !file_exists($this->channelsdir . $ds . 'pecl.php.net.reg') || + !file_exists($this->channelsdir . $ds . 'doc.php.net.reg') || + !file_exists($this->channelsdir . $ds . '__uri.reg')) { + $init = true; + } + } elseif (!is_dir($this->channelsdir)) { + return $this->raiseError('Cannot create directory ' . $this->channelsdir . ', ' . + 'it already exists and is not a directory'); + } + + if ($init) { + static $running = false; + if (!$running) { + $running = true; + $this->_initializeDirs(); + $running = false; + $init = false; + } + } else { + $this->_initializeDepDB(); + } + + return true; + } + + /** + * Make sure the directory where we keep registry files exists for a non-standard channel. + * + * @param string channel name + * @return bool TRUE if directory exists, FALSE if it could not be + * created + * + * @access private + */ + function _assertChannelStateDir($channel) + { + $ds = DIRECTORY_SEPARATOR; + if (!$channel || $this->_getChannelFromAlias($channel) == 'pear.php.net') { + if (!file_exists($this->channelsdir . $ds . 'pear.php.net.reg')) { + $this->_initializeChannelDirs(); + } + return $this->_assertStateDir($channel); + } + + $channelDir = $this->_channelDirectoryName($channel); + if (!is_dir($this->channelsdir) || + !file_exists($this->channelsdir . $ds . 'pear.php.net.reg')) { + $this->_initializeChannelDirs(); + } + + if (!file_exists($channelDir)) { + if (!$this->hasWriteAccess()) { + return false; + } + + require_once 'System.php'; + if (!System::mkdir(array('-p', $channelDir))) { + return $this->raiseError("could not create directory '" . $channelDir . + "'"); + } + } elseif (!is_dir($channelDir)) { + return $this->raiseError("could not create directory '" . $channelDir . + "', already exists and is not a directory"); + } + + return true; + } + + /** + * Make sure the directory where we keep registry files for channels exists + * + * @return bool TRUE if directory exists, FALSE if it could not be + * created + * + * @access private + */ + function _assertChannelDir() + { + if (!file_exists($this->channelsdir)) { + if (!$this->hasWriteAccess()) { + return false; + } + + require_once 'System.php'; + if (!System::mkdir(array('-p', $this->channelsdir))) { + return $this->raiseError("could not create directory '{$this->channelsdir}'"); + } + } elseif (!is_dir($this->channelsdir)) { + return $this->raiseError("could not create directory '{$this->channelsdir}" . + "', it already exists and is not a directory"); + } + + if (!file_exists($this->channelsdir . DIRECTORY_SEPARATOR . '.alias')) { + if (!$this->hasWriteAccess()) { + return false; + } + + require_once 'System.php'; + if (!System::mkdir(array('-p', $this->channelsdir . DIRECTORY_SEPARATOR . '.alias'))) { + return $this->raiseError("could not create directory '{$this->channelsdir}/.alias'"); + } + } elseif (!is_dir($this->channelsdir . DIRECTORY_SEPARATOR . '.alias')) { + return $this->raiseError("could not create directory '{$this->channelsdir}" . + "/.alias', it already exists and is not a directory"); + } + + return true; + } + + /** + * Get the name of the file where data for a given package is stored. + * + * @param string channel name, or false if this is a PEAR package + * @param string package name + * + * @return string registry file name + * + * @access public + */ + function _packageFileName($package, $channel = false) + { + if ($channel && $this->_getChannelFromAlias($channel) != 'pear.php.net') { + return $this->_channelDirectoryName($channel) . DIRECTORY_SEPARATOR . + strtolower($package) . '.reg'; + } + + return $this->statedir . DIRECTORY_SEPARATOR . strtolower($package) . '.reg'; + } + + /** + * Get the name of the file where data for a given channel is stored. + * @param string channel name + * @return string registry file name + */ + function _channelFileName($channel, $noaliases = false) + { + if (!$noaliases) { + if (file_exists($this->_getChannelAliasFileName($channel))) { + $channel = implode('', file($this->_getChannelAliasFileName($channel))); + } + } + return $this->channelsdir . DIRECTORY_SEPARATOR . str_replace('/', '_', + strtolower($channel)) . '.reg'; + } + + /** + * @param string + * @return string + */ + function _getChannelAliasFileName($alias) + { + return $this->channelsdir . DIRECTORY_SEPARATOR . '.alias' . + DIRECTORY_SEPARATOR . str_replace('/', '_', strtolower($alias)) . '.txt'; + } + + /** + * Get the name of a channel from its alias + */ + function _getChannelFromAlias($channel) + { + if (!$this->_channelExists($channel)) { + if ($channel == 'pear.php.net') { + return 'pear.php.net'; + } + + if ($channel == 'pecl.php.net') { + return 'pecl.php.net'; + } + + if ($channel == 'doc.php.net') { + return 'doc.php.net'; + } + + if ($channel == '__uri') { + return '__uri'; + } + + return false; + } + + $channel = strtolower($channel); + if (file_exists($this->_getChannelAliasFileName($channel))) { + // translate an alias to an actual channel + return implode('', file($this->_getChannelAliasFileName($channel))); + } + + return $channel; + } + + /** + * Get the alias of a channel from its alias or its name + */ + function _getAlias($channel) + { + if (!$this->_channelExists($channel)) { + if ($channel == 'pear.php.net') { + return 'pear'; + } + + if ($channel == 'pecl.php.net') { + return 'pecl'; + } + + if ($channel == 'doc.php.net') { + return 'phpdocs'; + } + + return false; + } + + $channel = $this->_getChannel($channel); + if (PEAR::isError($channel)) { + return $channel; + } + + return $channel->getAlias(); + } + + /** + * Get the name of the file where data for a given package is stored. + * + * @param string channel name, or false if this is a PEAR package + * @param string package name + * + * @return string registry file name + * + * @access public + */ + function _channelDirectoryName($channel) + { + if (!$channel || $this->_getChannelFromAlias($channel) == 'pear.php.net') { + return $this->statedir; + } + + $ch = $this->_getChannelFromAlias($channel); + if (!$ch) { + $ch = $channel; + } + + return $this->statedir . DIRECTORY_SEPARATOR . strtolower('.channel.' . + str_replace('/', '_', $ch)); + } + + function _openPackageFile($package, $mode, $channel = false) + { + if (!$this->_assertStateDir($channel)) { + return null; + } + + if (!in_array($mode, array('r', 'rb')) && !$this->hasWriteAccess()) { + return null; + } + + $file = $this->_packageFileName($package, $channel); + if (!file_exists($file) && $mode == 'r' || $mode == 'rb') { + return null; + } + + $fp = @fopen($file, $mode); + if (!$fp) { + return null; + } + + return $fp; + } + + function _closePackageFile($fp) + { + fclose($fp); + } + + function _openChannelFile($channel, $mode) + { + if (!$this->_assertChannelDir()) { + return null; + } + + if (!in_array($mode, array('r', 'rb')) && !$this->hasWriteAccess()) { + return null; + } + + $file = $this->_channelFileName($channel); + if (!file_exists($file) && $mode == 'r' || $mode == 'rb') { + return null; + } + + $fp = @fopen($file, $mode); + if (!$fp) { + return null; + } + + return $fp; + } + + function _closeChannelFile($fp) + { + fclose($fp); + } + + function _rebuildFileMap() + { + if (!class_exists('PEAR_Installer_Role')) { + require_once 'PEAR/Installer/Role.php'; + } + + $channels = $this->_listAllPackages(); + $files = array(); + foreach ($channels as $channel => $packages) { + foreach ($packages as $package) { + $version = $this->_packageInfo($package, 'version', $channel); + $filelist = $this->_packageInfo($package, 'filelist', $channel); + if (!is_array($filelist)) { + continue; + } + + foreach ($filelist as $name => $attrs) { + if (isset($attrs['attribs'])) { + $attrs = $attrs['attribs']; + } + + // it is possible for conflicting packages in different channels to + // conflict with data files/doc files + if ($name == 'dirtree') { + continue; + } + + if (isset($attrs['role']) && !in_array($attrs['role'], + PEAR_Installer_Role::getInstallableRoles())) { + // these are not installed + continue; + } + + if (isset($attrs['role']) && !in_array($attrs['role'], + PEAR_Installer_Role::getBaseinstallRoles())) { + $attrs['baseinstalldir'] = $package; + } + + if (isset($attrs['baseinstalldir'])) { + $file = $attrs['baseinstalldir'].DIRECTORY_SEPARATOR.$name; + } else { + $file = $name; + } + + $file = preg_replace(',^/+,', '', $file); + if ($channel != 'pear.php.net') { + if (!isset($files[$attrs['role']])) { + $files[$attrs['role']] = array(); + } + $files[$attrs['role']][$file] = array(strtolower($channel), + strtolower($package)); + } else { + if (!isset($files[$attrs['role']])) { + $files[$attrs['role']] = array(); + } + $files[$attrs['role']][$file] = strtolower($package); + } + } + } + } + + + $this->_assertStateDir(); + if (!$this->hasWriteAccess()) { + return false; + } + + $fp = @fopen($this->filemap, 'wb'); + if (!$fp) { + return false; + } + + $this->filemap_cache = $files; + fwrite($fp, serialize($files)); + fclose($fp); + return true; + } + + function _readFileMap() + { + if (!file_exists($this->filemap)) { + return array(); + } + + $fp = @fopen($this->filemap, 'r'); + if (!$fp) { + return $this->raiseError('PEAR_Registry: could not open filemap "' . $this->filemap . '"', PEAR_REGISTRY_ERROR_FILE, null, null, $php_errormsg); + } + + clearstatcache(); + $rt = get_magic_quotes_runtime(); + set_magic_quotes_runtime(0); + $fsize = filesize($this->filemap); + fclose($fp); + $data = file_get_contents($this->filemap); + set_magic_quotes_runtime($rt); + $tmp = unserialize($data); + if (!$tmp && $fsize > 7) { + return $this->raiseError('PEAR_Registry: invalid filemap data', PEAR_REGISTRY_ERROR_FORMAT, null, null, $data); + } + + $this->filemap_cache = $tmp; + return true; + } + + /** + * Lock the registry. + * + * @param integer lock mode, one of LOCK_EX, LOCK_SH or LOCK_UN. + * See flock manual for more information. + * + * @return bool TRUE on success, FALSE if locking failed, or a + * PEAR error if some other error occurs (such as the + * lock file not being writable). + * + * @access private + */ + function _lock($mode = LOCK_EX) + { + if (stristr(php_uname(), 'Windows 9')) { + return true; + } + + if ($mode != LOCK_UN && is_resource($this->lock_fp)) { + // XXX does not check type of lock (LOCK_SH/LOCK_EX) + return true; + } + + if (!$this->_assertStateDir()) { + if ($mode == LOCK_EX) { + return $this->raiseError('Registry directory is not writeable by the current user'); + } + + return true; + } + + $open_mode = 'w'; + // XXX People reported problems with LOCK_SH and 'w' + if ($mode === LOCK_SH || $mode === LOCK_UN) { + if (!file_exists($this->lockfile)) { + touch($this->lockfile); + } + $open_mode = 'r'; + } + + if (!is_resource($this->lock_fp)) { + $this->lock_fp = @fopen($this->lockfile, $open_mode); + } + + if (!is_resource($this->lock_fp)) { + $this->lock_fp = null; + return $this->raiseError("could not create lock file" . + (isset($php_errormsg) ? ": " . $php_errormsg : "")); + } + + if (!(int)flock($this->lock_fp, $mode)) { + switch ($mode) { + case LOCK_SH: $str = 'shared'; break; + case LOCK_EX: $str = 'exclusive'; break; + case LOCK_UN: $str = 'unlock'; break; + default: $str = 'unknown'; break; + } + + //is resource at this point, close it on error. + fclose($this->lock_fp); + $this->lock_fp = null; + return $this->raiseError("could not acquire $str lock ($this->lockfile)", + PEAR_REGISTRY_ERROR_LOCK); + } + + return true; + } + + function _unlock() + { + $ret = $this->_lock(LOCK_UN); + if (is_resource($this->lock_fp)) { + fclose($this->lock_fp); + } + + $this->lock_fp = null; + return $ret; + } + + function _packageExists($package, $channel = false) + { + return file_exists($this->_packageFileName($package, $channel)); + } + + /** + * Determine whether a channel exists in the registry + * + * @param string Channel name + * @param bool if true, then aliases will be ignored + * @return boolean + */ + function _channelExists($channel, $noaliases = false) + { + $a = file_exists($this->_channelFileName($channel, $noaliases)); + if (!$a && $channel == 'pear.php.net') { + return true; + } + + if (!$a && $channel == 'pecl.php.net') { + return true; + } + + if (!$a && $channel == 'doc.php.net') { + return true; + } + + return $a; + } + + /** + * Determine whether a mirror exists within the deafult channel in the registry + * + * @param string Channel name + * @param string Mirror name + * + * @return boolean + */ + function _mirrorExists($channel, $mirror) + { + $data = $this->_channelInfo($channel); + if (!isset($data['servers']['mirror'])) { + return false; + } + + foreach ($data['servers']['mirror'] as $m) { + if ($m['attribs']['host'] == $mirror) { + return true; + } + } + + return false; + } + + /** + * @param PEAR_ChannelFile Channel object + * @param donotuse + * @param string Last-Modified HTTP tag from remote request + * @return boolean|PEAR_Error True on creation, false if it already exists + */ + function _addChannel($channel, $update = false, $lastmodified = false) + { + if (!is_a($channel, 'PEAR_ChannelFile')) { + return false; + } + + if (!$channel->validate()) { + return false; + } + + if (file_exists($this->_channelFileName($channel->getName()))) { + if (!$update) { + return false; + } + + $checker = $this->_getChannel($channel->getName()); + if (PEAR::isError($checker)) { + return $checker; + } + + if ($channel->getAlias() != $checker->getAlias()) { + if (file_exists($this->_getChannelAliasFileName($checker->getAlias()))) { + @unlink($this->_getChannelAliasFileName($checker->getAlias())); + } + } + } else { + if ($update && !in_array($channel->getName(), array('pear.php.net', 'pecl.php.net', 'doc.php.net'))) { + return false; + } + } + + $ret = $this->_assertChannelDir(); + if (PEAR::isError($ret)) { + return $ret; + } + + $ret = $this->_assertChannelStateDir($channel->getName()); + if (PEAR::isError($ret)) { + return $ret; + } + + if ($channel->getAlias() != $channel->getName()) { + if (file_exists($this->_getChannelAliasFileName($channel->getAlias())) && + $this->_getChannelFromAlias($channel->getAlias()) != $channel->getName()) { + $channel->setAlias($channel->getName()); + } + + if (!$this->hasWriteAccess()) { + return false; + } + + $fp = @fopen($this->_getChannelAliasFileName($channel->getAlias()), 'w'); + if (!$fp) { + return false; + } + + fwrite($fp, $channel->getName()); + fclose($fp); + } + + if (!$this->hasWriteAccess()) { + return false; + } + + $fp = @fopen($this->_channelFileName($channel->getName()), 'wb'); + if (!$fp) { + return false; + } + + $info = $channel->toArray(); + if ($lastmodified) { + $info['_lastmodified'] = $lastmodified; + } else { + $info['_lastmodified'] = date('r'); + } + + fwrite($fp, serialize($info)); + fclose($fp); + return true; + } + + /** + * Deletion fails if there are any packages installed from the channel + * @param string|PEAR_ChannelFile channel name + * @return boolean|PEAR_Error True on deletion, false if it doesn't exist + */ + function _deleteChannel($channel) + { + if (!is_string($channel)) { + if (!is_a($channel, 'PEAR_ChannelFile')) { + return false; + } + + if (!$channel->validate()) { + return false; + } + $channel = $channel->getName(); + } + + if ($this->_getChannelFromAlias($channel) == '__uri') { + return false; + } + + if ($this->_getChannelFromAlias($channel) == 'pecl.php.net') { + return false; + } + + if ($this->_getChannelFromAlias($channel) == 'doc.php.net') { + return false; + } + + if (!$this->_channelExists($channel)) { + return false; + } + + if (!$channel || $this->_getChannelFromAlias($channel) == 'pear.php.net') { + return false; + } + + $channel = $this->_getChannelFromAlias($channel); + if ($channel == 'pear.php.net') { + return false; + } + + $test = $this->_listChannelPackages($channel); + if (count($test)) { + return false; + } + + $test = @rmdir($this->_channelDirectoryName($channel)); + if (!$test) { + return false; + } + + $file = $this->_getChannelAliasFileName($this->_getAlias($channel)); + if (file_exists($file)) { + $test = @unlink($file); + if (!$test) { + return false; + } + } + + $file = $this->_channelFileName($channel); + $ret = true; + if (file_exists($file)) { + $ret = @unlink($file); + } + + return $ret; + } + + /** + * Determine whether a channel exists in the registry + * @param string Channel Alias + * @return boolean + */ + function _isChannelAlias($alias) + { + return file_exists($this->_getChannelAliasFileName($alias)); + } + + /** + * @param string|null + * @param string|null + * @param string|null + * @return array|null + * @access private + */ + function _packageInfo($package = null, $key = null, $channel = 'pear.php.net') + { + if ($package === null) { + if ($channel === null) { + $channels = $this->_listChannels(); + $ret = array(); + foreach ($channels as $channel) { + $channel = strtolower($channel); + $ret[$channel] = array(); + $packages = $this->_listPackages($channel); + foreach ($packages as $package) { + $ret[$channel][] = $this->_packageInfo($package, null, $channel); + } + } + + return $ret; + } + + $ps = $this->_listPackages($channel); + if (!count($ps)) { + return array(); + } + return array_map(array(&$this, '_packageInfo'), + $ps, array_fill(0, count($ps), null), + array_fill(0, count($ps), $channel)); + } + + $fp = $this->_openPackageFile($package, 'r', $channel); + if ($fp === null) { + return null; + } + + $rt = get_magic_quotes_runtime(); + set_magic_quotes_runtime(0); + clearstatcache(); + $this->_closePackageFile($fp); + $data = file_get_contents($this->_packageFileName($package, $channel)); + set_magic_quotes_runtime($rt); + $data = unserialize($data); + if ($key === null) { + return $data; + } + + // compatibility for package.xml version 2.0 + if (isset($data['old'][$key])) { + return $data['old'][$key]; + } + + if (isset($data[$key])) { + return $data[$key]; + } + + return null; + } + + /** + * @param string Channel name + * @param bool whether to strictly retrieve info of channels, not just aliases + * @return array|null + */ + function _channelInfo($channel, $noaliases = false) + { + if (!$this->_channelExists($channel, $noaliases)) { + return null; + } + + $fp = $this->_openChannelFile($channel, 'r'); + if ($fp === null) { + return null; + } + + $rt = get_magic_quotes_runtime(); + set_magic_quotes_runtime(0); + clearstatcache(); + $this->_closeChannelFile($fp); + $data = file_get_contents($this->_channelFileName($channel)); + set_magic_quotes_runtime($rt); + $data = unserialize($data); + return $data; + } + + function _listChannels() + { + $channellist = array(); + if (!file_exists($this->channelsdir) || !is_dir($this->channelsdir)) { + return array('pear.php.net', 'pecl.php.net', 'doc.php.net', '__uri'); + } + + $dp = opendir($this->channelsdir); + while ($ent = readdir($dp)) { + if ($ent{0} == '.' || substr($ent, -4) != '.reg') { + continue; + } + + if ($ent == '__uri.reg') { + $channellist[] = '__uri'; + continue; + } + + $channellist[] = str_replace('_', '/', substr($ent, 0, -4)); + } + + closedir($dp); + if (!in_array('pear.php.net', $channellist)) { + $channellist[] = 'pear.php.net'; + } + + if (!in_array('pecl.php.net', $channellist)) { + $channellist[] = 'pecl.php.net'; + } + + if (!in_array('doc.php.net', $channellist)) { + $channellist[] = 'doc.php.net'; + } + + + if (!in_array('__uri', $channellist)) { + $channellist[] = '__uri'; + } + + natsort($channellist); + return $channellist; + } + + function _listPackages($channel = false) + { + if ($channel && $this->_getChannelFromAlias($channel) != 'pear.php.net') { + return $this->_listChannelPackages($channel); + } + + if (!file_exists($this->statedir) || !is_dir($this->statedir)) { + return array(); + } + + $pkglist = array(); + $dp = opendir($this->statedir); + if (!$dp) { + return $pkglist; + } + + while ($ent = readdir($dp)) { + if ($ent{0} == '.' || substr($ent, -4) != '.reg') { + continue; + } + + $pkglist[] = substr($ent, 0, -4); + } + closedir($dp); + return $pkglist; + } + + function _listChannelPackages($channel) + { + $pkglist = array(); + if (!file_exists($this->_channelDirectoryName($channel)) || + !is_dir($this->_channelDirectoryName($channel))) { + return array(); + } + + $dp = opendir($this->_channelDirectoryName($channel)); + if (!$dp) { + return $pkglist; + } + + while ($ent = readdir($dp)) { + if ($ent{0} == '.' || substr($ent, -4) != '.reg') { + continue; + } + $pkglist[] = substr($ent, 0, -4); + } + + closedir($dp); + return $pkglist; + } + + function _listAllPackages() + { + $ret = array(); + foreach ($this->_listChannels() as $channel) { + $ret[$channel] = $this->_listPackages($channel); + } + + return $ret; + } + + /** + * Add an installed package to the registry + * @param string package name + * @param array package info (parsed by PEAR_Common::infoFrom*() methods) + * @return bool success of saving + * @access private + */ + function _addPackage($package, $info) + { + if ($this->_packageExists($package)) { + return false; + } + + $fp = $this->_openPackageFile($package, 'wb'); + if ($fp === null) { + return false; + } + + $info['_lastmodified'] = time(); + fwrite($fp, serialize($info)); + $this->_closePackageFile($fp); + if (isset($info['filelist'])) { + $this->_rebuildFileMap(); + } + + return true; + } + + /** + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @return bool + * @access private + */ + function _addPackage2($info) + { + if (!is_a($info, 'PEAR_PackageFile_v1') && !is_a($info, 'PEAR_PackageFile_v2')) { + return false; + } + + if (!$info->validate()) { + if (class_exists('PEAR_Common')) { + $ui = PEAR_Frontend::singleton(); + if ($ui) { + foreach ($info->getValidationWarnings() as $err) { + $ui->log($err['message'], true); + } + } + } + return false; + } + + $channel = $info->getChannel(); + $package = $info->getPackage(); + $save = $info; + if ($this->_packageExists($package, $channel)) { + return false; + } + + if (!$this->_channelExists($channel, true)) { + return false; + } + + $info = $info->toArray(true); + if (!$info) { + return false; + } + + $fp = $this->_openPackageFile($package, 'wb', $channel); + if ($fp === null) { + return false; + } + + $info['_lastmodified'] = time(); + fwrite($fp, serialize($info)); + $this->_closePackageFile($fp); + $this->_rebuildFileMap(); + return true; + } + + /** + * @param string Package name + * @param array parsed package.xml 1.0 + * @param bool this parameter is only here for BC. Don't use it. + * @access private + */ + function _updatePackage($package, $info, $merge = true) + { + $oldinfo = $this->_packageInfo($package); + if (empty($oldinfo)) { + return false; + } + + $fp = $this->_openPackageFile($package, 'w'); + if ($fp === null) { + return false; + } + + if (is_object($info)) { + $info = $info->toArray(); + } + $info['_lastmodified'] = time(); + + $newinfo = $info; + if ($merge) { + $info = array_merge($oldinfo, $info); + } else { + $diff = $info; + } + + fwrite($fp, serialize($info)); + $this->_closePackageFile($fp); + if (isset($newinfo['filelist'])) { + $this->_rebuildFileMap(); + } + + return true; + } + + /** + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @return bool + * @access private + */ + function _updatePackage2($info) + { + if (!$this->_packageExists($info->getPackage(), $info->getChannel())) { + return false; + } + + $fp = $this->_openPackageFile($info->getPackage(), 'w', $info->getChannel()); + if ($fp === null) { + return false; + } + + $save = $info; + $info = $save->getArray(true); + $info['_lastmodified'] = time(); + fwrite($fp, serialize($info)); + $this->_closePackageFile($fp); + $this->_rebuildFileMap(); + return true; + } + + /** + * @param string Package name + * @param string Channel name + * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2|null + * @access private + */ + function &_getPackage($package, $channel = 'pear.php.net') + { + $info = $this->_packageInfo($package, null, $channel); + if ($info === null) { + return $info; + } + + $a = $this->_config; + if (!$a) { + $this->_config = &new PEAR_Config; + $this->_config->set('php_dir', $this->statedir); + } + + if (!class_exists('PEAR_PackageFile')) { + require_once 'PEAR/PackageFile.php'; + } + + $pkg = &new PEAR_PackageFile($this->_config); + $pf = &$pkg->fromArray($info); + return $pf; + } + + /** + * @param string channel name + * @param bool whether to strictly retrieve channel names + * @return PEAR_ChannelFile|PEAR_Error + * @access private + */ + function &_getChannel($channel, $noaliases = false) + { + $ch = false; + if ($this->_channelExists($channel, $noaliases)) { + $chinfo = $this->_channelInfo($channel, $noaliases); + if ($chinfo) { + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } + + $ch = &PEAR_ChannelFile::fromArrayWithErrors($chinfo); + } + } + + if ($ch) { + if ($ch->validate()) { + return $ch; + } + + foreach ($ch->getErrors(true) as $err) { + $message = $err['message'] . "\n"; + } + + $ch = PEAR::raiseError($message); + return $ch; + } + + if ($this->_getChannelFromAlias($channel) == 'pear.php.net') { + // the registry is not properly set up, so use defaults + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } + + $pear_channel = new PEAR_ChannelFile; + $pear_channel->setServer('pear.php.net'); + $pear_channel->setAlias('pear'); + $pear_channel->setSummary('PHP Extension and Application Repository'); + $pear_channel->setDefaultPEARProtocols(); + $pear_channel->setBaseURL('REST1.0', 'http://pear.php.net/rest/'); + $pear_channel->setBaseURL('REST1.1', 'http://pear.php.net/rest/'); + $pear_channel->setBaseURL('REST1.3', 'http://pear.php.net/rest/'); + return $pear_channel; + } + + if ($this->_getChannelFromAlias($channel) == 'pecl.php.net') { + // the registry is not properly set up, so use defaults + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } + $pear_channel = new PEAR_ChannelFile; + $pear_channel->setServer('pecl.php.net'); + $pear_channel->setAlias('pecl'); + $pear_channel->setSummary('PHP Extension Community Library'); + $pear_channel->setDefaultPEARProtocols(); + $pear_channel->setBaseURL('REST1.0', 'http://pecl.php.net/rest/'); + $pear_channel->setBaseURL('REST1.1', 'http://pecl.php.net/rest/'); + $pear_channel->setValidationPackage('PEAR_Validator_PECL', '1.0'); + return $pear_channel; + } + + if ($this->_getChannelFromAlias($channel) == 'doc.php.net') { + // the registry is not properly set up, so use defaults + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } + + $doc_channel = new PEAR_ChannelFile; + $doc_channel->setServer('doc.php.net'); + $doc_channel->setAlias('phpdocs'); + $doc_channel->setSummary('PHP Documentation Team'); + $doc_channel->setDefaultPEARProtocols(); + $doc_channel->setBaseURL('REST1.0', 'http://doc.php.net/rest/'); + $doc_channel->setBaseURL('REST1.1', 'http://doc.php.net/rest/'); + $doc_channel->setBaseURL('REST1.3', 'http://doc.php.net/rest/'); + return $doc_channel; + } + + + if ($this->_getChannelFromAlias($channel) == '__uri') { + // the registry is not properly set up, so use defaults + if (!class_exists('PEAR_ChannelFile')) { + require_once 'PEAR/ChannelFile.php'; + } + + $private = new PEAR_ChannelFile; + $private->setName('__uri'); + $private->setDefaultPEARProtocols(); + $private->setBaseURL('REST1.0', '****'); + $private->setSummary('Pseudo-channel for static packages'); + return $private; + } + + return $ch; + } + + /** + * @param string Package name + * @param string Channel name + * @return bool + */ + function packageExists($package, $channel = 'pear.php.net') + { + if (PEAR::isError($e = $this->_lock(LOCK_SH))) { + return $e; + } + $ret = $this->_packageExists($package, $channel); + $this->_unlock(); + return $ret; + } + + // }}} + + // {{{ channelExists() + + /** + * @param string channel name + * @param bool if true, then aliases will be ignored + * @return bool + */ + function channelExists($channel, $noaliases = false) + { + if (PEAR::isError($e = $this->_lock(LOCK_SH))) { + return $e; + } + $ret = $this->_channelExists($channel, $noaliases); + $this->_unlock(); + return $ret; + } + + // }}} + + /** + * @param string channel name mirror is in + * @param string mirror name + * + * @return bool + */ + function mirrorExists($channel, $mirror) + { + if (PEAR::isError($e = $this->_lock(LOCK_SH))) { + return $e; + } + + $ret = $this->_mirrorExists($channel, $mirror); + $this->_unlock(); + return $ret; + } + + // {{{ isAlias() + + /** + * Determines whether the parameter is an alias of a channel + * @param string + * @return bool + */ + function isAlias($alias) + { + if (PEAR::isError($e = $this->_lock(LOCK_SH))) { + return $e; + } + $ret = $this->_isChannelAlias($alias); + $this->_unlock(); + return $ret; + } + + // }}} + // {{{ packageInfo() + + /** + * @param string|null + * @param string|null + * @param string + * @return array|null + */ + function packageInfo($package = null, $key = null, $channel = 'pear.php.net') + { + if (PEAR::isError($e = $this->_lock(LOCK_SH))) { + return $e; + } + $ret = $this->_packageInfo($package, $key, $channel); + $this->_unlock(); + return $ret; + } + + // }}} + // {{{ channelInfo() + + /** + * Retrieve a raw array of channel data. + * + * Do not use this, instead use {@link getChannel()} for normal + * operations. Array structure is undefined in this method + * @param string channel name + * @param bool whether to strictly retrieve information only on non-aliases + * @return array|null|PEAR_Error + */ + function channelInfo($channel = null, $noaliases = false) + { + if (PEAR::isError($e = $this->_lock(LOCK_SH))) { + return $e; + } + $ret = $this->_channelInfo($channel, $noaliases); + $this->_unlock(); + return $ret; + } + + // }}} + + /** + * @param string + */ + function channelName($channel) + { + if (PEAR::isError($e = $this->_lock(LOCK_SH))) { + return $e; + } + $ret = $this->_getChannelFromAlias($channel); + $this->_unlock(); + return $ret; + } + + /** + * @param string + */ + function channelAlias($channel) + { + if (PEAR::isError($e = $this->_lock(LOCK_SH))) { + return $e; + } + $ret = $this->_getAlias($channel); + $this->_unlock(); + return $ret; + } + // {{{ listPackages() + + function listPackages($channel = false) + { + if (PEAR::isError($e = $this->_lock(LOCK_SH))) { + return $e; + } + $ret = $this->_listPackages($channel); + $this->_unlock(); + return $ret; + } + + // }}} + // {{{ listAllPackages() + + function listAllPackages() + { + if (PEAR::isError($e = $this->_lock(LOCK_SH))) { + return $e; + } + $ret = $this->_listAllPackages(); + $this->_unlock(); + return $ret; + } + + // }}} + // {{{ listChannel() + + function listChannels() + { + if (PEAR::isError($e = $this->_lock(LOCK_SH))) { + return $e; + } + $ret = $this->_listChannels(); + $this->_unlock(); + return $ret; + } + + // }}} + // {{{ addPackage() + + /** + * Add an installed package to the registry + * @param string|PEAR_PackageFile_v1|PEAR_PackageFile_v2 package name or object + * that will be passed to {@link addPackage2()} + * @param array package info (parsed by PEAR_Common::infoFrom*() methods) + * @return bool success of saving + */ + function addPackage($package, $info) + { + if (is_object($info)) { + return $this->addPackage2($info); + } + if (PEAR::isError($e = $this->_lock(LOCK_EX))) { + return $e; + } + $ret = $this->_addPackage($package, $info); + $this->_unlock(); + if ($ret) { + if (!class_exists('PEAR_PackageFile_v1')) { + require_once 'PEAR/PackageFile/v1.php'; + } + $pf = new PEAR_PackageFile_v1; + $pf->setConfig($this->_config); + $pf->fromArray($info); + $this->_dependencyDB->uninstallPackage($pf); + $this->_dependencyDB->installPackage($pf); + } + return $ret; + } + + // }}} + // {{{ addPackage2() + + function addPackage2($info) + { + if (!is_object($info)) { + return $this->addPackage($info['package'], $info); + } + if (PEAR::isError($e = $this->_lock(LOCK_EX))) { + return $e; + } + $ret = $this->_addPackage2($info); + $this->_unlock(); + if ($ret) { + $this->_dependencyDB->uninstallPackage($info); + $this->_dependencyDB->installPackage($info); + } + return $ret; + } + + // }}} + // {{{ updateChannel() + + /** + * For future expandibility purposes, separate this + * @param PEAR_ChannelFile + */ + function updateChannel($channel, $lastmodified = null) + { + if ($channel->getName() == '__uri') { + return false; + } + return $this->addChannel($channel, $lastmodified, true); + } + + // }}} + // {{{ deleteChannel() + + /** + * Deletion fails if there are any packages installed from the channel + * @param string|PEAR_ChannelFile channel name + * @return boolean|PEAR_Error True on deletion, false if it doesn't exist + */ + function deleteChannel($channel) + { + if (PEAR::isError($e = $this->_lock(LOCK_EX))) { + return $e; + } + + $ret = $this->_deleteChannel($channel); + $this->_unlock(); + if ($ret && is_a($this->_config, 'PEAR_Config')) { + $this->_config->setChannels($this->listChannels()); + } + + return $ret; + } + + // }}} + // {{{ addChannel() + + /** + * @param PEAR_ChannelFile Channel object + * @param string Last-Modified header from HTTP for caching + * @return boolean|PEAR_Error True on creation, false if it already exists + */ + function addChannel($channel, $lastmodified = false, $update = false) + { + if (!is_a($channel, 'PEAR_ChannelFile') || !$channel->validate()) { + return false; + } + + if (PEAR::isError($e = $this->_lock(LOCK_EX))) { + return $e; + } + + $ret = $this->_addChannel($channel, $update, $lastmodified); + $this->_unlock(); + if (!$update && $ret && is_a($this->_config, 'PEAR_Config')) { + $this->_config->setChannels($this->listChannels()); + } + + return $ret; + } + + // }}} + // {{{ deletePackage() + + function deletePackage($package, $channel = 'pear.php.net') + { + if (PEAR::isError($e = $this->_lock(LOCK_EX))) { + return $e; + } + + $file = $this->_packageFileName($package, $channel); + $ret = file_exists($file) ? @unlink($file) : false; + $this->_rebuildFileMap(); + $this->_unlock(); + $p = array('channel' => $channel, 'package' => $package); + $this->_dependencyDB->uninstallPackage($p); + return $ret; + } + + // }}} + // {{{ updatePackage() + + function updatePackage($package, $info, $merge = true) + { + if (is_object($info)) { + return $this->updatePackage2($info, $merge); + } + if (PEAR::isError($e = $this->_lock(LOCK_EX))) { + return $e; + } + $ret = $this->_updatePackage($package, $info, $merge); + $this->_unlock(); + if ($ret) { + if (!class_exists('PEAR_PackageFile_v1')) { + require_once 'PEAR/PackageFile/v1.php'; + } + $pf = new PEAR_PackageFile_v1; + $pf->setConfig($this->_config); + $pf->fromArray($this->packageInfo($package)); + $this->_dependencyDB->uninstallPackage($pf); + $this->_dependencyDB->installPackage($pf); + } + return $ret; + } + + // }}} + // {{{ updatePackage2() + + function updatePackage2($info) + { + + if (!is_object($info)) { + return $this->updatePackage($info['package'], $info, $merge); + } + + if (!$info->validate(PEAR_VALIDATE_DOWNLOADING)) { + return false; + } + + if (PEAR::isError($e = $this->_lock(LOCK_EX))) { + return $e; + } + + $ret = $this->_updatePackage2($info); + $this->_unlock(); + if ($ret) { + $this->_dependencyDB->uninstallPackage($info); + $this->_dependencyDB->installPackage($info); + } + + return $ret; + } + + // }}} + // {{{ getChannel() + /** + * @param string channel name + * @param bool whether to strictly return raw channels (no aliases) + * @return PEAR_ChannelFile|PEAR_Error + */ + function &getChannel($channel, $noaliases = false) + { + if (PEAR::isError($e = $this->_lock(LOCK_SH))) { + return $e; + } + $ret = &$this->_getChannel($channel, $noaliases); + $this->_unlock(); + if (!$ret) { + return PEAR::raiseError('Unknown channel: ' . $channel); + } + return $ret; + } + + // }}} + // {{{ getPackage() + /** + * @param string package name + * @param string channel name + * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2|null + */ + function &getPackage($package, $channel = 'pear.php.net') + { + if (PEAR::isError($e = $this->_lock(LOCK_SH))) { + return $e; + } + $pf = &$this->_getPackage($package, $channel); + $this->_unlock(); + return $pf; + } + + // }}} + + /** + * Get PEAR_PackageFile_v[1/2] objects representing the contents of + * a dependency group that are installed. + * + * This is used at uninstall-time + * @param array + * @return array|false + */ + function getInstalledGroup($group) + { + $ret = array(); + if (isset($group['package'])) { + if (!isset($group['package'][0])) { + $group['package'] = array($group['package']); + } + foreach ($group['package'] as $package) { + $depchannel = isset($package['channel']) ? $package['channel'] : '__uri'; + $p = &$this->getPackage($package['name'], $depchannel); + if ($p) { + $save = &$p; + $ret[] = &$save; + } + } + } + if (isset($group['subpackage'])) { + if (!isset($group['subpackage'][0])) { + $group['subpackage'] = array($group['subpackage']); + } + foreach ($group['subpackage'] as $package) { + $depchannel = isset($package['channel']) ? $package['channel'] : '__uri'; + $p = &$this->getPackage($package['name'], $depchannel); + if ($p) { + $save = &$p; + $ret[] = &$save; + } + } + } + if (!count($ret)) { + return false; + } + return $ret; + } + + // {{{ getChannelValidator() + /** + * @param string channel name + * @return PEAR_Validate|false + */ + function &getChannelValidator($channel) + { + $chan = $this->getChannel($channel); + if (PEAR::isError($chan)) { + return $chan; + } + $val = $chan->getValidationObject(); + return $val; + } + // }}} + // {{{ getChannels() + /** + * @param string channel name + * @return array an array of PEAR_ChannelFile objects representing every installed channel + */ + function &getChannels() + { + $ret = array(); + if (PEAR::isError($e = $this->_lock(LOCK_SH))) { + return $e; + } + foreach ($this->_listChannels() as $channel) { + $e = &$this->_getChannel($channel); + if (!$e || PEAR::isError($e)) { + continue; + } + $ret[] = $e; + } + $this->_unlock(); + return $ret; + } + + // }}} + // {{{ checkFileMap() + + /** + * Test whether a file or set of files belongs to a package. + * + * If an array is passed in + * @param string|array file path, absolute or relative to the pear + * install dir + * @param string|array name of PEAR package or array('package' => name, 'channel' => + * channel) of a package that will be ignored + * @param string API version - 1.1 will exclude any files belonging to a package + * @param array private recursion variable + * @return array|false which package and channel the file belongs to, or an empty + * string if the file does not belong to an installed package, + * or belongs to the second parameter's package + */ + function checkFileMap($path, $package = false, $api = '1.0', $attrs = false) + { + if (is_array($path)) { + static $notempty; + if (empty($notempty)) { + if (!class_exists('PEAR_Installer_Role')) { + require_once 'PEAR/Installer/Role.php'; + } + $notempty = create_function('$a','return !empty($a);'); + } + $package = is_array($package) ? array(strtolower($package[0]), strtolower($package[1])) + : strtolower($package); + $pkgs = array(); + foreach ($path as $name => $attrs) { + if (is_array($attrs)) { + if (isset($attrs['install-as'])) { + $name = $attrs['install-as']; + } + if (!in_array($attrs['role'], PEAR_Installer_Role::getInstallableRoles())) { + // these are not installed + continue; + } + if (!in_array($attrs['role'], PEAR_Installer_Role::getBaseinstallRoles())) { + $attrs['baseinstalldir'] = is_array($package) ? $package[1] : $package; + } + if (isset($attrs['baseinstalldir'])) { + $name = $attrs['baseinstalldir'] . DIRECTORY_SEPARATOR . $name; + } + } + $pkgs[$name] = $this->checkFileMap($name, $package, $api, $attrs); + if (PEAR::isError($pkgs[$name])) { + return $pkgs[$name]; + } + } + return array_filter($pkgs, $notempty); + } + if (empty($this->filemap_cache)) { + if (PEAR::isError($e = $this->_lock(LOCK_SH))) { + return $e; + } + $err = $this->_readFileMap(); + $this->_unlock(); + if (PEAR::isError($err)) { + return $err; + } + } + if (!$attrs) { + $attrs = array('role' => 'php'); // any old call would be for PHP role only + } + if (isset($this->filemap_cache[$attrs['role']][$path])) { + if ($api >= '1.1' && $this->filemap_cache[$attrs['role']][$path] == $package) { + return false; + } + return $this->filemap_cache[$attrs['role']][$path]; + } + $l = strlen($this->install_dir); + if (substr($path, 0, $l) == $this->install_dir) { + $path = preg_replace('!^'.DIRECTORY_SEPARATOR.'+!', '', substr($path, $l)); + } + if (isset($this->filemap_cache[$attrs['role']][$path])) { + if ($api >= '1.1' && $this->filemap_cache[$attrs['role']][$path] == $package) { + return false; + } + return $this->filemap_cache[$attrs['role']][$path]; + } + return false; + } + + // }}} + // {{{ flush() + /** + * Force a reload of the filemap + * @since 1.5.0RC3 + */ + function flushFileMap() + { + $this->filemap_cache = null; + clearstatcache(); // ensure that the next read gets the full, current filemap + } + + // }}} + // {{{ apiVersion() + /** + * Get the expected API version. Channels API is version 1.1, as it is backwards + * compatible with 1.0 + * @return string + */ + function apiVersion() + { + return '1.1'; + } + // }}} + + + /** + * Parse a package name, or validate a parsed package name array + * @param string|array pass in an array of format + * array( + * 'package' => 'pname', + * ['channel' => 'channame',] + * ['version' => 'version',] + * ['state' => 'state',] + * ['group' => 'groupname']) + * or a string of format + * [channel://][channame/]pname[-version|-state][/group=groupname] + * @return array|PEAR_Error + */ + function parsePackageName($param, $defaultchannel = 'pear.php.net') + { + $saveparam = $param; + if (is_array($param)) { + // convert to string for error messages + $saveparam = $this->parsedPackageNameToString($param); + // process the array + if (!isset($param['package'])) { + return PEAR::raiseError('parsePackageName(): array $param ' . + 'must contain a valid package name in index "param"', + 'package', null, null, $param); + } + if (!isset($param['uri'])) { + if (!isset($param['channel'])) { + $param['channel'] = $defaultchannel; + } + } else { + $param['channel'] = '__uri'; + } + } else { + $components = @parse_url((string) $param); + if (isset($components['scheme'])) { + if ($components['scheme'] == 'http') { + // uri package + $param = array('uri' => $param, 'channel' => '__uri'); + } elseif($components['scheme'] != 'channel') { + return PEAR::raiseError('parsePackageName(): only channel:// uris may ' . + 'be downloaded, not "' . $param . '"', 'invalid', null, null, $param); + } + } + if (!isset($components['path'])) { + return PEAR::raiseError('parsePackageName(): array $param ' . + 'must contain a valid package name in "' . $param . '"', + 'package', null, null, $param); + } + if (isset($components['host'])) { + // remove the leading "/" + $components['path'] = substr($components['path'], 1); + } + if (!isset($components['scheme'])) { + if (strpos($components['path'], '/') !== false) { + if ($components['path']{0} == '/') { + return PEAR::raiseError('parsePackageName(): this is not ' . + 'a package name, it begins with "/" in "' . $param . '"', + 'invalid', null, null, $param); + } + $parts = explode('/', $components['path']); + $components['host'] = array_shift($parts); + if (count($parts) > 1) { + $components['path'] = array_pop($parts); + $components['host'] .= '/' . implode('/', $parts); + } else { + $components['path'] = implode('/', $parts); + } + } else { + $components['host'] = $defaultchannel; + } + } else { + if (strpos($components['path'], '/')) { + $parts = explode('/', $components['path']); + $components['path'] = array_pop($parts); + $components['host'] .= '/' . implode('/', $parts); + } + } + + if (is_array($param)) { + $param['package'] = $components['path']; + } else { + $param = array( + 'package' => $components['path'] + ); + if (isset($components['host'])) { + $param['channel'] = $components['host']; + } + } + if (isset($components['fragment'])) { + $param['group'] = $components['fragment']; + } + if (isset($components['user'])) { + $param['user'] = $components['user']; + } + if (isset($components['pass'])) { + $param['pass'] = $components['pass']; + } + if (isset($components['query'])) { + parse_str($components['query'], $param['opts']); + } + // check for extension + $pathinfo = pathinfo($param['package']); + if (isset($pathinfo['extension']) && + in_array(strtolower($pathinfo['extension']), array('tgz', 'tar'))) { + $param['extension'] = $pathinfo['extension']; + $param['package'] = substr($pathinfo['basename'], 0, + strlen($pathinfo['basename']) - 4); + } + // check for version + if (strpos($param['package'], '-')) { + $test = explode('-', $param['package']); + if (count($test) != 2) { + return PEAR::raiseError('parsePackageName(): only one version/state ' . + 'delimiter "-" is allowed in "' . $saveparam . '"', + 'version', null, null, $param); + } + list($param['package'], $param['version']) = $test; + } + } + // validation + $info = $this->channelExists($param['channel']); + if (PEAR::isError($info)) { + return $info; + } + if (!$info) { + return PEAR::raiseError('unknown channel "' . $param['channel'] . + '" in "' . $saveparam . '"', 'channel', null, null, $param); + } + $chan = $this->getChannel($param['channel']); + if (PEAR::isError($chan)) { + return $chan; + } + if (!$chan) { + return PEAR::raiseError("Exception: corrupt registry, could not " . + "retrieve channel " . $param['channel'] . " information", + 'registry', null, null, $param); + } + $param['channel'] = $chan->getName(); + $validate = $chan->getValidationObject(); + $vpackage = $chan->getValidationPackage(); + // validate package name + if (!$validate->validPackageName($param['package'], $vpackage['_content'])) { + return PEAR::raiseError('parsePackageName(): invalid package name "' . + $param['package'] . '" in "' . $saveparam . '"', + 'package', null, null, $param); + } + if (isset($param['group'])) { + if (!PEAR_Validate::validGroupName($param['group'])) { + return PEAR::raiseError('parsePackageName(): dependency group "' . $param['group'] . + '" is not a valid group name in "' . $saveparam . '"', 'group', null, null, + $param); + } + } + if (isset($param['state'])) { + if (!in_array(strtolower($param['state']), $validate->getValidStates())) { + return PEAR::raiseError('parsePackageName(): state "' . $param['state'] + . '" is not a valid state in "' . $saveparam . '"', + 'state', null, null, $param); + } + } + if (isset($param['version'])) { + if (isset($param['state'])) { + return PEAR::raiseError('parsePackageName(): cannot contain both ' . + 'a version and a stability (state) in "' . $saveparam . '"', + 'version/state', null, null, $param); + } + // check whether version is actually a state + if (in_array(strtolower($param['version']), $validate->getValidStates())) { + $param['state'] = strtolower($param['version']); + unset($param['version']); + } else { + if (!$validate->validVersion($param['version'])) { + return PEAR::raiseError('parsePackageName(): "' . $param['version'] . + '" is neither a valid version nor a valid state in "' . + $saveparam . '"', 'version/state', null, null, $param); + } + } + } + return $param; + } + + /** + * @param array + * @return string + */ + function parsedPackageNameToString($parsed, $brief = false) + { + if (is_string($parsed)) { + return $parsed; + } + if (is_object($parsed)) { + $p = $parsed; + $parsed = array( + 'package' => $p->getPackage(), + 'channel' => $p->getChannel(), + 'version' => $p->getVersion(), + ); + } + if (isset($parsed['uri'])) { + return $parsed['uri']; + } + if ($brief) { + if ($channel = $this->channelAlias($parsed['channel'])) { + return $channel . '/' . $parsed['package']; + } + } + $upass = ''; + if (isset($parsed['user'])) { + $upass = $parsed['user']; + if (isset($parsed['pass'])) { + $upass .= ':' . $parsed['pass']; + } + $upass = "$upass@"; + } + $ret = 'channel://' . $upass . $parsed['channel'] . '/' . $parsed['package']; + if (isset($parsed['version']) || isset($parsed['state'])) { + $ver = isset($parsed['version']) ? $parsed['version'] : ''; + $ver .= isset($parsed['state']) ? $parsed['state'] : ''; + $ret .= '-' . $ver; + } + if (isset($parsed['extension'])) { + $ret .= '.' . $parsed['extension']; + } + if (isset($parsed['opts'])) { + $ret .= '?'; + foreach ($parsed['opts'] as $name => $value) { + $parsed['opts'][$name] = "$name=$value"; + } + $ret .= implode('&', $parsed['opts']); + } + if (isset($parsed['group'])) { + $ret .= '#' . $parsed['group']; + } + return $ret; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/RunTest.php b/_piecrust/libs/PEAR/RunTest.php new file mode 100644 index 0000000..5182490 --- /dev/null +++ b/_piecrust/libs/PEAR/RunTest.php @@ -0,0 +1,968 @@ + + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: RunTest.php 313024 2011-07-06 19:51:24Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.3.3 + */ + +/** + * for error handling + */ +require_once 'PEAR.php'; +require_once 'PEAR/Config.php'; + +define('DETAILED', 1); +putenv("PHP_PEAR_RUNTESTS=1"); + +/** + * Simplified version of PHP's test suite + * + * Try it with: + * + * $ php -r 'include "../PEAR/RunTest.php"; $t=new PEAR_RunTest; $o=$t->run("./pear_system.phpt");print_r($o);' + * + * + * @category pear + * @package PEAR + * @author Tomas V.V.Cox + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.3.3 + */ +class PEAR_RunTest +{ + var $_headers = array(); + var $_logger; + var $_options; + var $_php; + var $tests_count; + var $xdebug_loaded; + /** + * Saved value of php executable, used to reset $_php when we + * have a test that uses cgi + * + * @var unknown_type + */ + var $_savephp; + var $ini_overwrites = array( + 'output_handler=', + 'open_basedir=', + 'safe_mode=0', + 'disable_functions=', + 'output_buffering=Off', + 'display_errors=1', + 'log_errors=0', + 'html_errors=0', + 'track_errors=1', + 'report_memleaks=0', + 'report_zend_debug=0', + 'docref_root=', + 'docref_ext=.html', + 'error_prepend_string=', + 'error_append_string=', + 'auto_prepend_file=', + 'auto_append_file=', + 'magic_quotes_runtime=0', + 'xdebug.default_enable=0', + 'allow_url_fopen=1', + ); + + /** + * An object that supports the PEAR_Common->log() signature, or null + * @param PEAR_Common|null + */ + function PEAR_RunTest($logger = null, $options = array()) + { + if (!defined('E_DEPRECATED')) { + define('E_DEPRECATED', 0); + } + if (!defined('E_STRICT')) { + define('E_STRICT', 0); + } + $this->ini_overwrites[] = 'error_reporting=' . (E_ALL & ~(E_DEPRECATED | E_STRICT)); + if (is_null($logger)) { + require_once 'PEAR/Common.php'; + $logger = new PEAR_Common; + } + $this->_logger = $logger; + $this->_options = $options; + + $conf = &PEAR_Config::singleton(); + $this->_php = $conf->get('php_bin'); + } + + /** + * Taken from php-src/run-tests.php + * + * @param string $commandline command name + * @param array $env + * @param string $stdin standard input to pass to the command + * @return unknown + */ + function system_with_timeout($commandline, $env = null, $stdin = null) + { + $data = ''; + if (version_compare(phpversion(), '5.0.0', '<')) { + $proc = proc_open($commandline, array( + 0 => array('pipe', 'r'), + 1 => array('pipe', 'w'), + 2 => array('pipe', 'w') + ), $pipes); + } else { + $proc = proc_open($commandline, array( + 0 => array('pipe', 'r'), + 1 => array('pipe', 'w'), + 2 => array('pipe', 'w') + ), $pipes, null, $env, array('suppress_errors' => true)); + } + + if (!$proc) { + return false; + } + + if (is_string($stdin)) { + fwrite($pipes[0], $stdin); + } + fclose($pipes[0]); + + while (true) { + /* hide errors from interrupted syscalls */ + $r = $pipes; + $e = $w = null; + $n = @stream_select($r, $w, $e, 60); + + if ($n === 0) { + /* timed out */ + $data .= "\n ** ERROR: process timed out **\n"; + proc_terminate($proc); + return array(1234567890, $data); + } else if ($n > 0) { + $line = fread($pipes[1], 8192); + if (strlen($line) == 0) { + /* EOF */ + break; + } + $data .= $line; + } + } + if (function_exists('proc_get_status')) { + $stat = proc_get_status($proc); + if ($stat['signaled']) { + $data .= "\nTermsig=".$stat['stopsig']; + } + } + $code = proc_close($proc); + if (function_exists('proc_get_status')) { + $code = $stat['exitcode']; + } + return array($code, $data); + } + + /** + * Turns a PHP INI string into an array + * + * Turns -d "include_path=/foo/bar" into this: + * array( + * 'include_path' => array( + * 'operator' => '-d', + * 'value' => '/foo/bar', + * ) + * ) + * Works both with quotes and without + * + * @param string an PHP INI string, -d "include_path=/foo/bar" + * @return array + */ + function iniString2array($ini_string) + { + if (!$ini_string) { + return array(); + } + $split = preg_split('/[\s]|=/', $ini_string, -1, PREG_SPLIT_NO_EMPTY); + $key = $split[1][0] == '"' ? substr($split[1], 1) : $split[1]; + $value = $split[2][strlen($split[2]) - 1] == '"' ? substr($split[2], 0, -1) : $split[2]; + // FIXME review if this is really the struct to go with + $array = array($key => array('operator' => $split[0], 'value' => $value)); + return $array; + } + + function settings2array($settings, $ini_settings) + { + foreach ($settings as $setting) { + if (strpos($setting, '=') !== false) { + $setting = explode('=', $setting, 2); + $name = trim(strtolower($setting[0])); + $value = trim($setting[1]); + $ini_settings[$name] = $value; + } + } + return $ini_settings; + } + + function settings2params($ini_settings) + { + $settings = ''; + foreach ($ini_settings as $name => $value) { + if (is_array($value)) { + $operator = $value['operator']; + $value = $value['value']; + } else { + $operator = '-d'; + } + $value = addslashes($value); + $settings .= " $operator \"$name=$value\""; + } + return $settings; + } + + function _preparePhpBin($php, $file, $ini_settings) + { + $file = escapeshellarg($file); + // This was fixed in php 5.3 and is not needed after that + if (OS_WINDOWS && version_compare(PHP_VERSION, '5.3', '<')) { + $cmd = '"'.escapeshellarg($php).' '.$ini_settings.' -f ' . $file .'"'; + } else { + $cmd = $php . $ini_settings . ' -f ' . $file; + } + + return $cmd; + } + + function runPHPUnit($file, $ini_settings = '') + { + if (!file_exists($file) && file_exists(getcwd() . DIRECTORY_SEPARATOR . $file)) { + $file = realpath(getcwd() . DIRECTORY_SEPARATOR . $file); + } elseif (file_exists($file)) { + $file = realpath($file); + } + + $cmd = $this->_preparePhpBin($this->_php, $file, $ini_settings); + if (isset($this->_logger)) { + $this->_logger->log(2, 'Running command "' . $cmd . '"'); + } + + $savedir = getcwd(); // in case the test moves us around + chdir(dirname($file)); + echo `$cmd`; + chdir($savedir); + return 'PASSED'; // we have no way of knowing this information so assume passing + } + + /** + * Runs an individual test case. + * + * @param string The filename of the test + * @param array|string INI settings to be applied to the test run + * @param integer Number what the current running test is of the + * whole test suite being runned. + * + * @return string|object Returns PASSED, WARNED, FAILED depending on how the + * test came out. + * PEAR Error when the tester it self fails + */ + function run($file, $ini_settings = array(), $test_number = 1) + { + if (isset($this->_savephp)) { + $this->_php = $this->_savephp; + unset($this->_savephp); + } + if (empty($this->_options['cgi'])) { + // try to see if php-cgi is in the path + $res = $this->system_with_timeout('php-cgi -v'); + if (false !== $res && !(is_array($res) && in_array($res[0], array(-1, 127)))) { + $this->_options['cgi'] = 'php-cgi'; + } + } + if (1 < $len = strlen($this->tests_count)) { + $test_number = str_pad($test_number, $len, ' ', STR_PAD_LEFT); + $test_nr = "[$test_number/$this->tests_count] "; + } else { + $test_nr = ''; + } + + $file = realpath($file); + $section_text = $this->_readFile($file); + if (PEAR::isError($section_text)) { + return $section_text; + } + + if (isset($section_text['POST_RAW']) && isset($section_text['UPLOAD'])) { + return PEAR::raiseError("Cannot contain both POST_RAW and UPLOAD in test file: $file"); + } + + $cwd = getcwd(); + + $pass_options = ''; + if (!empty($this->_options['ini'])) { + $pass_options = $this->_options['ini']; + } + + if (is_string($ini_settings)) { + $ini_settings = $this->iniString2array($ini_settings); + } + + $ini_settings = $this->settings2array($this->ini_overwrites, $ini_settings); + if ($section_text['INI']) { + if (strpos($section_text['INI'], '{PWD}') !== false) { + $section_text['INI'] = str_replace('{PWD}', dirname($file), $section_text['INI']); + } + $ini = preg_split( "/[\n\r]+/", $section_text['INI']); + $ini_settings = $this->settings2array($ini, $ini_settings); + } + $ini_settings = $this->settings2params($ini_settings); + $shortname = str_replace($cwd . DIRECTORY_SEPARATOR, '', $file); + + $tested = trim($section_text['TEST']); + $tested.= !isset($this->_options['simple']) ? "[$shortname]" : ' '; + + if (!empty($section_text['POST']) || !empty($section_text['POST_RAW']) || + !empty($section_text['UPLOAD']) || !empty($section_text['GET']) || + !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) { + if (empty($this->_options['cgi'])) { + if (!isset($this->_options['quiet'])) { + $this->_logger->log(0, "SKIP $test_nr$tested (reason: --cgi option needed for this test, type 'pear help run-tests')"); + } + if (isset($this->_options['tapoutput'])) { + return array('ok', ' # skip --cgi option needed for this test, "pear help run-tests" for info'); + } + return 'SKIPPED'; + } + $this->_savephp = $this->_php; + $this->_php = $this->_options['cgi']; + } + + $temp_dir = realpath(dirname($file)); + $main_file_name = basename($file, 'phpt'); + $diff_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'diff'; + $log_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'log'; + $exp_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'exp'; + $output_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'out'; + $memcheck_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'mem'; + $temp_file = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'php'; + $temp_skipif = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'skip.php'; + $temp_clean = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'clean.php'; + $tmp_post = $temp_dir . DIRECTORY_SEPARATOR . uniqid('phpt.'); + + // unlink old test results + $this->_cleanupOldFiles($file); + + // Check if test should be skipped. + $res = $this->_runSkipIf($section_text, $temp_skipif, $tested, $ini_settings); + if (count($res) != 2) { + return $res; + } + $info = $res['info']; + $warn = $res['warn']; + + // We've satisfied the preconditions - run the test! + if (isset($this->_options['coverage']) && $this->xdebug_loaded) { + $xdebug_file = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name . 'xdebug'; + $text = "\n" . 'function coverage_shutdown() {' . + "\n" . ' $xdebug = var_export(xdebug_get_code_coverage(), true);'; + if (!function_exists('file_put_contents')) { + $text .= "\n" . ' $fh = fopen(\'' . $xdebug_file . '\', "wb");' . + "\n" . ' if ($fh !== false) {' . + "\n" . ' fwrite($fh, $xdebug);' . + "\n" . ' fclose($fh);' . + "\n" . ' }'; + } else { + $text .= "\n" . ' file_put_contents(\'' . $xdebug_file . '\', $xdebug);'; + } + + // Workaround for http://pear.php.net/bugs/bug.php?id=17292 + $lines = explode("\n", $section_text['FILE']); + $numLines = count($lines); + $namespace = ''; + $coverage_shutdown = 'coverage_shutdown'; + + if ( + substr($lines[0], 0, 2) == 'save_text($temp_file, "save_text($temp_file, $section_text['FILE']); + } + + $args = $section_text['ARGS'] ? ' -- '.$section_text['ARGS'] : ''; + $cmd = $this->_preparePhpBin($this->_php, $temp_file, $ini_settings); + $cmd.= "$args 2>&1"; + if (isset($this->_logger)) { + $this->_logger->log(2, 'Running command "' . $cmd . '"'); + } + + // Reset environment from any previous test. + $env = $this->_resetEnv($section_text, $temp_file); + + $section_text = $this->_processUpload($section_text, $file); + if (PEAR::isError($section_text)) { + return $section_text; + } + + if (array_key_exists('POST_RAW', $section_text) && !empty($section_text['POST_RAW'])) { + $post = trim($section_text['POST_RAW']); + $raw_lines = explode("\n", $post); + + $request = ''; + $started = false; + foreach ($raw_lines as $i => $line) { + if (empty($env['CONTENT_TYPE']) && + preg_match('/^Content-Type:(.*)/i', $line, $res)) { + $env['CONTENT_TYPE'] = trim(str_replace("\r", '', $res[1])); + continue; + } + if ($started) { + $request .= "\n"; + } + $started = true; + $request .= $line; + } + + $env['CONTENT_LENGTH'] = strlen($request); + $env['REQUEST_METHOD'] = 'POST'; + + $this->save_text($tmp_post, $request); + $cmd = "$this->_php$pass_options$ini_settings \"$temp_file\" 2>&1 < $tmp_post"; + } elseif (array_key_exists('POST', $section_text) && !empty($section_text['POST'])) { + $post = trim($section_text['POST']); + $this->save_text($tmp_post, $post); + $content_length = strlen($post); + + $env['REQUEST_METHOD'] = 'POST'; + $env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'; + $env['CONTENT_LENGTH'] = $content_length; + + $cmd = "$this->_php$pass_options$ini_settings \"$temp_file\" 2>&1 < $tmp_post"; + } else { + $env['REQUEST_METHOD'] = 'GET'; + $env['CONTENT_TYPE'] = ''; + $env['CONTENT_LENGTH'] = ''; + } + + if (OS_WINDOWS && isset($section_text['RETURNS'])) { + ob_start(); + system($cmd, $return_value); + $out = ob_get_contents(); + ob_end_clean(); + $section_text['RETURNS'] = (int) trim($section_text['RETURNS']); + $returnfail = ($return_value != $section_text['RETURNS']); + } else { + $returnfail = false; + $stdin = isset($section_text['STDIN']) ? $section_text['STDIN'] : null; + $out = $this->system_with_timeout($cmd, $env, $stdin); + $return_value = $out[0]; + $out = $out[1]; + } + + $output = preg_replace('/\r\n/', "\n", trim($out)); + + if (isset($tmp_post) && realpath($tmp_post) && file_exists($tmp_post)) { + @unlink(realpath($tmp_post)); + } + chdir($cwd); // in case the test moves us around + + $this->_testCleanup($section_text, $temp_clean); + + /* when using CGI, strip the headers from the output */ + $output = $this->_stripHeadersCGI($output); + + if (isset($section_text['EXPECTHEADERS'])) { + $testheaders = $this->_processHeaders($section_text['EXPECTHEADERS']); + $missing = array_diff_assoc($testheaders, $this->_headers); + $changed = ''; + foreach ($missing as $header => $value) { + if (isset($this->_headers[$header])) { + $changed .= "-$header: $value\n+$header: "; + $changed .= $this->_headers[$header]; + } else { + $changed .= "-$header: $value\n"; + } + } + if ($missing) { + // tack on failed headers to output: + $output .= "\n====EXPECTHEADERS FAILURE====:\n$changed"; + } + } + // Does the output match what is expected? + do { + if (isset($section_text['EXPECTF']) || isset($section_text['EXPECTREGEX'])) { + if (isset($section_text['EXPECTF'])) { + $wanted = trim($section_text['EXPECTF']); + } else { + $wanted = trim($section_text['EXPECTREGEX']); + } + $wanted_re = preg_replace('/\r\n/', "\n", $wanted); + if (isset($section_text['EXPECTF'])) { + $wanted_re = preg_quote($wanted_re, '/'); + // Stick to basics + $wanted_re = str_replace("%s", ".+?", $wanted_re); //not greedy + $wanted_re = str_replace("%i", "[+\-]?[0-9]+", $wanted_re); + $wanted_re = str_replace("%d", "[0-9]+", $wanted_re); + $wanted_re = str_replace("%x", "[0-9a-fA-F]+", $wanted_re); + $wanted_re = str_replace("%f", "[+\-]?\.?[0-9]+\.?[0-9]*(E-?[0-9]+)?", $wanted_re); + $wanted_re = str_replace("%c", ".", $wanted_re); + // %f allows two points "-.0.0" but that is the best *simple* expression + } + + /* DEBUG YOUR REGEX HERE + var_dump($wanted_re); + print(str_repeat('=', 80) . "\n"); + var_dump($output); + */ + if (!$returnfail && preg_match("/^$wanted_re\$/s", $output)) { + if (file_exists($temp_file)) { + unlink($temp_file); + } + if (array_key_exists('FAIL', $section_text)) { + break; + } + if (!isset($this->_options['quiet'])) { + $this->_logger->log(0, "PASS $test_nr$tested$info"); + } + if (isset($this->_options['tapoutput'])) { + return array('ok', ' - ' . $tested); + } + return 'PASSED'; + } + } else { + if (isset($section_text['EXPECTFILE'])) { + $f = $temp_dir . '/' . trim($section_text['EXPECTFILE']); + if (!($fp = @fopen($f, 'rb'))) { + return PEAR::raiseError('--EXPECTFILE-- section file ' . + $f . ' not found'); + } + fclose($fp); + $section_text['EXPECT'] = file_get_contents($f); + } + + if (isset($section_text['EXPECT'])) { + $wanted = preg_replace('/\r\n/', "\n", trim($section_text['EXPECT'])); + } else { + $wanted = ''; + } + + // compare and leave on success + if (!$returnfail && 0 == strcmp($output, $wanted)) { + if (file_exists($temp_file)) { + unlink($temp_file); + } + if (array_key_exists('FAIL', $section_text)) { + break; + } + if (!isset($this->_options['quiet'])) { + $this->_logger->log(0, "PASS $test_nr$tested$info"); + } + if (isset($this->_options['tapoutput'])) { + return array('ok', ' - ' . $tested); + } + return 'PASSED'; + } + } + } while (false); + + if (array_key_exists('FAIL', $section_text)) { + // we expect a particular failure + // this is only used for testing PEAR_RunTest + $expectf = isset($section_text['EXPECTF']) ? $wanted_re : null; + $faildiff = $this->generate_diff($wanted, $output, null, $expectf); + $faildiff = preg_replace('/\r/', '', $faildiff); + $wanted = preg_replace('/\r/', '', trim($section_text['FAIL'])); + if ($faildiff == $wanted) { + if (!isset($this->_options['quiet'])) { + $this->_logger->log(0, "PASS $test_nr$tested$info"); + } + if (isset($this->_options['tapoutput'])) { + return array('ok', ' - ' . $tested); + } + return 'PASSED'; + } + unset($section_text['EXPECTF']); + $output = $faildiff; + if (isset($section_text['RETURNS'])) { + return PEAR::raiseError('Cannot have both RETURNS and FAIL in the same test: ' . + $file); + } + } + + // Test failed so we need to report details. + $txt = $warn ? 'WARN ' : 'FAIL '; + $this->_logger->log(0, $txt . $test_nr . $tested . $info); + + // write .exp + $res = $this->_writeLog($exp_filename, $wanted); + if (PEAR::isError($res)) { + return $res; + } + + // write .out + $res = $this->_writeLog($output_filename, $output); + if (PEAR::isError($res)) { + return $res; + } + + // write .diff + $returns = isset($section_text['RETURNS']) ? + array(trim($section_text['RETURNS']), $return_value) : null; + $expectf = isset($section_text['EXPECTF']) ? $wanted_re : null; + $data = $this->generate_diff($wanted, $output, $returns, $expectf); + $res = $this->_writeLog($diff_filename, $data); + if (PEAR::isError($res)) { + return $res; + } + + // write .log + $data = " +---- EXPECTED OUTPUT +$wanted +---- ACTUAL OUTPUT +$output +---- FAILED +"; + + if ($returnfail) { + $data .= " +---- EXPECTED RETURN +$section_text[RETURNS] +---- ACTUAL RETURN +$return_value +"; + } + + $res = $this->_writeLog($log_filename, $data); + if (PEAR::isError($res)) { + return $res; + } + + if (isset($this->_options['tapoutput'])) { + $wanted = explode("\n", $wanted); + $wanted = "# Expected output:\n#\n#" . implode("\n#", $wanted); + $output = explode("\n", $output); + $output = "#\n#\n# Actual output:\n#\n#" . implode("\n#", $output); + return array($wanted . $output . 'not ok', ' - ' . $tested); + } + return $warn ? 'WARNED' : 'FAILED'; + } + + function generate_diff($wanted, $output, $rvalue, $wanted_re) + { + $w = explode("\n", $wanted); + $o = explode("\n", $output); + $wr = explode("\n", $wanted_re); + $w1 = array_diff_assoc($w, $o); + $o1 = array_diff_assoc($o, $w); + $o2 = $w2 = array(); + foreach ($w1 as $idx => $val) { + if (!$wanted_re || !isset($wr[$idx]) || !isset($o1[$idx]) || + !preg_match('/^' . $wr[$idx] . '\\z/', $o1[$idx])) { + $w2[sprintf("%03d<", $idx)] = sprintf("%03d- ", $idx + 1) . $val; + } + } + foreach ($o1 as $idx => $val) { + if (!$wanted_re || !isset($wr[$idx]) || + !preg_match('/^' . $wr[$idx] . '\\z/', $val)) { + $o2[sprintf("%03d>", $idx)] = sprintf("%03d+ ", $idx + 1) . $val; + } + } + $diff = array_merge($w2, $o2); + ksort($diff); + $extra = $rvalue ? "##EXPECTED: $rvalue[0]\r\n##RETURNED: $rvalue[1]" : ''; + return implode("\r\n", $diff) . $extra; + } + + // Write the given text to a temporary file, and return the filename. + function save_text($filename, $text) + { + if (!$fp = fopen($filename, 'w')) { + return PEAR::raiseError("Cannot open file '" . $filename . "' (save_text)"); + } + fwrite($fp, $text); + fclose($fp); + if (1 < DETAILED) echo " +FILE $filename {{{ +$text +}}} +"; + } + + function _cleanupOldFiles($file) + { + $temp_dir = realpath(dirname($file)); + $mainFileName = basename($file, 'phpt'); + $diff_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'diff'; + $log_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'log'; + $exp_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'exp'; + $output_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'out'; + $memcheck_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'mem'; + $temp_file = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'php'; + $temp_skipif = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'skip.php'; + $temp_clean = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'clean.php'; + $tmp_post = $temp_dir . DIRECTORY_SEPARATOR . uniqid('phpt.'); + + // unlink old test results + @unlink($diff_filename); + @unlink($log_filename); + @unlink($exp_filename); + @unlink($output_filename); + @unlink($memcheck_filename); + @unlink($temp_file); + @unlink($temp_skipif); + @unlink($tmp_post); + @unlink($temp_clean); + } + + function _runSkipIf($section_text, $temp_skipif, $tested, $ini_settings) + { + $info = ''; + $warn = false; + if (array_key_exists('SKIPIF', $section_text) && trim($section_text['SKIPIF'])) { + $this->save_text($temp_skipif, $section_text['SKIPIF']); + $output = $this->system_with_timeout("$this->_php$ini_settings -f \"$temp_skipif\""); + $output = $output[1]; + $loutput = ltrim($output); + unlink($temp_skipif); + if (!strncasecmp('skip', $loutput, 4)) { + $skipreason = "SKIP $tested"; + if (preg_match('/^\s*skip\s*(.+)\s*/i', $output, $m)) { + $skipreason .= '(reason: ' . $m[1] . ')'; + } + if (!isset($this->_options['quiet'])) { + $this->_logger->log(0, $skipreason); + } + if (isset($this->_options['tapoutput'])) { + return array('ok', ' # skip ' . $reason); + } + return 'SKIPPED'; + } + + if (!strncasecmp('info', $loutput, 4) + && preg_match('/^\s*info\s*(.+)\s*/i', $output, $m)) { + $info = " (info: $m[1])"; + } + + if (!strncasecmp('warn', $loutput, 4) + && preg_match('/^\s*warn\s*(.+)\s*/i', $output, $m)) { + $warn = true; /* only if there is a reason */ + $info = " (warn: $m[1])"; + } + } + + return array('warn' => $warn, 'info' => $info); + } + + function _stripHeadersCGI($output) + { + $this->headers = array(); + if (!empty($this->_options['cgi']) && + $this->_php == $this->_options['cgi'] && + preg_match("/^(.*?)(?:\n\n(.*)|\\z)/s", $output, $match)) { + $output = isset($match[2]) ? trim($match[2]) : ''; + $this->_headers = $this->_processHeaders($match[1]); + } + + return $output; + } + + /** + * Return an array that can be used with array_diff() to compare headers + * + * @param string $text + */ + function _processHeaders($text) + { + $headers = array(); + $rh = preg_split("/[\n\r]+/", $text); + foreach ($rh as $line) { + if (strpos($line, ':')!== false) { + $line = explode(':', $line, 2); + $headers[trim($line[0])] = trim($line[1]); + } + } + return $headers; + } + + function _readFile($file) + { + // Load the sections of the test file. + $section_text = array( + 'TEST' => '(unnamed test)', + 'SKIPIF' => '', + 'GET' => '', + 'COOKIE' => '', + 'POST' => '', + 'ARGS' => '', + 'INI' => '', + 'CLEAN' => '', + ); + + if (!is_file($file) || !$fp = fopen($file, "r")) { + return PEAR::raiseError("Cannot open test file: $file"); + } + + $section = ''; + while (!feof($fp)) { + $line = fgets($fp); + + // Match the beginning of a section. + if (preg_match('/^--([_A-Z]+)--/', $line, $r)) { + $section = $r[1]; + $section_text[$section] = ''; + continue; + } elseif (empty($section)) { + fclose($fp); + return PEAR::raiseError("Invalid sections formats in test file: $file"); + } + + // Add to the section text. + $section_text[$section] .= $line; + } + fclose($fp); + + return $section_text; + } + + function _writeLog($logname, $data) + { + if (!$log = fopen($logname, 'w')) { + return PEAR::raiseError("Cannot create test log - $logname"); + } + fwrite($log, $data); + fclose($log); + } + + function _resetEnv($section_text, $temp_file) + { + $env = $_ENV; + $env['REDIRECT_STATUS'] = ''; + $env['QUERY_STRING'] = ''; + $env['PATH_TRANSLATED'] = ''; + $env['SCRIPT_FILENAME'] = ''; + $env['REQUEST_METHOD'] = ''; + $env['CONTENT_TYPE'] = ''; + $env['CONTENT_LENGTH'] = ''; + if (!empty($section_text['ENV'])) { + if (strpos($section_text['ENV'], '{PWD}') !== false) { + $section_text['ENV'] = str_replace('{PWD}', dirname($temp_file), $section_text['ENV']); + } + foreach (explode("\n", trim($section_text['ENV'])) as $e) { + $e = explode('=', trim($e), 2); + if (!empty($e[0]) && isset($e[1])) { + $env[$e[0]] = $e[1]; + } + } + } + if (array_key_exists('GET', $section_text)) { + $env['QUERY_STRING'] = trim($section_text['GET']); + } else { + $env['QUERY_STRING'] = ''; + } + if (array_key_exists('COOKIE', $section_text)) { + $env['HTTP_COOKIE'] = trim($section_text['COOKIE']); + } else { + $env['HTTP_COOKIE'] = ''; + } + $env['REDIRECT_STATUS'] = '1'; + $env['PATH_TRANSLATED'] = $temp_file; + $env['SCRIPT_FILENAME'] = $temp_file; + + return $env; + } + + function _processUpload($section_text, $file) + { + if (array_key_exists('UPLOAD', $section_text) && !empty($section_text['UPLOAD'])) { + $upload_files = trim($section_text['UPLOAD']); + $upload_files = explode("\n", $upload_files); + + $request = "Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737\n" . + "-----------------------------20896060251896012921717172737\n"; + foreach ($upload_files as $fileinfo) { + $fileinfo = explode('=', $fileinfo); + if (count($fileinfo) != 2) { + return PEAR::raiseError("Invalid UPLOAD section in test file: $file"); + } + if (!realpath(dirname($file) . '/' . $fileinfo[1])) { + return PEAR::raiseError("File for upload does not exist: $fileinfo[1] " . + "in test file: $file"); + } + $file_contents = file_get_contents(dirname($file) . '/' . $fileinfo[1]); + $fileinfo[1] = basename($fileinfo[1]); + $request .= "Content-Disposition: form-data; name=\"$fileinfo[0]\"; filename=\"$fileinfo[1]\"\n"; + $request .= "Content-Type: text/plain\n\n"; + $request .= $file_contents . "\n" . + "-----------------------------20896060251896012921717172737\n"; + } + + if (array_key_exists('POST', $section_text) && !empty($section_text['POST'])) { + // encode POST raw + $post = trim($section_text['POST']); + $post = explode('&', $post); + foreach ($post as $i => $post_info) { + $post_info = explode('=', $post_info); + if (count($post_info) != 2) { + return PEAR::raiseError("Invalid POST data in test file: $file"); + } + $post_info[0] = rawurldecode($post_info[0]); + $post_info[1] = rawurldecode($post_info[1]); + $post[$i] = $post_info; + } + foreach ($post as $post_info) { + $request .= "Content-Disposition: form-data; name=\"$post_info[0]\"\n\n"; + $request .= $post_info[1] . "\n" . + "-----------------------------20896060251896012921717172737\n"; + } + unset($section_text['POST']); + } + $section_text['POST_RAW'] = $request; + } + + return $section_text; + } + + function _testCleanup($section_text, $temp_clean) + { + if ($section_text['CLEAN']) { + // perform test cleanup + $this->save_text($temp_clean, $section_text['CLEAN']); + $output = $this->system_with_timeout("$this->_php $temp_clean 2>&1"); + if (strlen($output[1])) { + echo "BORKED --CLEAN-- section! output:\n", $output[1]; + } + if (file_exists($temp_clean)) { + unlink($temp_clean); + } + } + } +} diff --git a/_piecrust/libs/PEAR/Task/Common.php b/_piecrust/libs/PEAR/Task/Common.php new file mode 100644 index 0000000..5b99c2e --- /dev/null +++ b/_piecrust/libs/PEAR/Task/Common.php @@ -0,0 +1,202 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Common.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ +/**#@+ + * Error codes for task validation routines + */ +define('PEAR_TASK_ERROR_NOATTRIBS', 1); +define('PEAR_TASK_ERROR_MISSING_ATTRIB', 2); +define('PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE', 3); +define('PEAR_TASK_ERROR_INVALID', 4); +/**#@-*/ +define('PEAR_TASK_PACKAGE', 1); +define('PEAR_TASK_INSTALL', 2); +define('PEAR_TASK_PACKAGEANDINSTALL', 3); +/** + * A task is an operation that manipulates the contents of a file. + * + * Simple tasks operate on 1 file. Multiple tasks are executed after all files have been + * processed and installed, and are designed to operate on all files containing the task. + * The Post-install script task simply takes advantage of the fact that it will be run + * after installation, replace is a simple task. + * + * Combining tasks is possible, but ordering is significant. + * + * + * + * + * + * + * This will first replace any instance of @data-dir@ in the test.php file + * with the path to the current data directory. Then, it will include the + * test.php file and run the script it contains to configure the package post-installation. + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + * @abstract + */ +class PEAR_Task_Common +{ + /** + * Valid types for this version are 'simple' and 'multiple' + * + * - simple tasks operate on the contents of a file and write out changes to disk + * - multiple tasks operate on the contents of many files and write out the + * changes directly to disk + * + * Child task classes must override this property. + * @access protected + */ + var $type = 'simple'; + /** + * Determines which install phase this task is executed under + */ + var $phase = PEAR_TASK_INSTALL; + /** + * @access protected + */ + var $config; + /** + * @access protected + */ + var $registry; + /** + * @access protected + */ + var $logger; + /** + * @access protected + */ + var $installphase; + /** + * @param PEAR_Config + * @param PEAR_Common + */ + function PEAR_Task_Common(&$config, &$logger, $phase) + { + $this->config = &$config; + $this->registry = &$config->getRegistry(); + $this->logger = &$logger; + $this->installphase = $phase; + if ($this->type == 'multiple') { + $GLOBALS['_PEAR_TASK_POSTINSTANCES'][get_class($this)][] = &$this; + } + } + + /** + * Validate the basic contents of a task tag. + * @param PEAR_PackageFile_v2 + * @param array + * @param PEAR_Config + * @param array the entire parsed tag + * @return true|array On error, return an array in format: + * array(PEAR_TASK_ERROR_???[, param1][, param2][, ...]) + * + * For PEAR_TASK_ERROR_MISSING_ATTRIB, pass the attribute name in + * For PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, pass the attribute name and an array + * of legal values in + * @static + * @abstract + */ + function validateXml($pkg, $xml, $config, $fileXml) + { + } + + /** + * Initialize a task instance with the parameters + * @param array raw, parsed xml + * @param array attributes from the tag containing this task + * @param string|null last installed version of this package + * @abstract + */ + function init($xml, $fileAttributes, $lastVersion) + { + } + + /** + * Begin a task processing session. All multiple tasks will be processed after each file + * has been successfully installed, all simple tasks should perform their task here and + * return any errors using the custom throwError() method to allow forward compatibility + * + * This method MUST NOT write out any changes to disk + * @param PEAR_PackageFile_v2 + * @param string file contents + * @param string the eventual final file location (informational only) + * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail + * (use $this->throwError), otherwise return the new contents + * @abstract + */ + function startSession($pkg, $contents, $dest) + { + } + + /** + * This method is used to process each of the tasks for a particular multiple class + * type. Simple tasks need not implement this method. + * @param array an array of tasks + * @access protected + * @static + * @abstract + */ + function run($tasks) + { + } + + /** + * @static + * @final + */ + function hasPostinstallTasks() + { + return isset($GLOBALS['_PEAR_TASK_POSTINSTANCES']); + } + + /** + * @static + * @final + */ + function runPostinstallTasks() + { + foreach ($GLOBALS['_PEAR_TASK_POSTINSTANCES'] as $class => $tasks) { + $err = call_user_func(array($class, 'run'), + $GLOBALS['_PEAR_TASK_POSTINSTANCES'][$class]); + if ($err) { + return PEAR_Task_Common::throwError($err); + } + } + unset($GLOBALS['_PEAR_TASK_POSTINSTANCES']); + } + + /** + * Determines whether a role is a script + * @return bool + */ + function isScript() + { + return $this->type == 'script'; + } + + function throwError($msg, $code = -1) + { + include_once 'PEAR.php'; + return PEAR::raiseError($msg, $code); + } +} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Task/Postinstallscript.php b/_piecrust/libs/PEAR/Task/Postinstallscript.php new file mode 100644 index 0000000..e43ecca --- /dev/null +++ b/_piecrust/libs/PEAR/Task/Postinstallscript.php @@ -0,0 +1,323 @@ + + * + * PHP versions 4 and 5 + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Postinstallscript.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ +/** + * Base class + */ +require_once 'PEAR/Task/Common.php'; +/** + * Implements the postinstallscript file task. + * + * Note that post-install scripts are handled separately from installation, by the + * "pear run-scripts" command + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Task_Postinstallscript extends PEAR_Task_Common +{ + var $type = 'script'; + var $_class; + var $_params; + var $_obj; + /** + * + * @var PEAR_PackageFile_v2 + */ + var $_pkg; + var $_contents; + var $phase = PEAR_TASK_INSTALL; + + /** + * Validate the raw xml at parsing-time. + * + * This also attempts to validate the script to make sure it meets the criteria + * for a post-install script + * @param PEAR_PackageFile_v2 + * @param array The XML contents of the tag + * @param PEAR_Config + * @param array the entire parsed tag + * @static + */ + function validateXml($pkg, $xml, $config, $fileXml) + { + if ($fileXml['role'] != 'php') { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . + $fileXml['name'] . '" must be role="php"'); + } + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $file = $pkg->getFileContents($fileXml['name']); + if (PEAR::isError($file)) { + PEAR::popErrorHandling(); + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . + $fileXml['name'] . '" is not valid: ' . + $file->getMessage()); + } elseif ($file === null) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . + $fileXml['name'] . '" could not be retrieved for processing!'); + } else { + $analysis = $pkg->analyzeSourceCode($file, true); + if (!$analysis) { + PEAR::popErrorHandling(); + $warnings = ''; + foreach ($pkg->getValidationWarnings() as $warn) { + $warnings .= $warn['message'] . "\n"; + } + return array(PEAR_TASK_ERROR_INVALID, 'Analysis of post-install script "' . + $fileXml['name'] . '" failed: ' . $warnings); + } + if (count($analysis['declared_classes']) != 1) { + PEAR::popErrorHandling(); + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . + $fileXml['name'] . '" must declare exactly 1 class'); + } + $class = $analysis['declared_classes'][0]; + if ($class != str_replace(array('/', '.php'), array('_', ''), + $fileXml['name']) . '_postinstall') { + PEAR::popErrorHandling(); + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . + $fileXml['name'] . '" class "' . $class . '" must be named "' . + str_replace(array('/', '.php'), array('_', ''), + $fileXml['name']) . '_postinstall"'); + } + if (!isset($analysis['declared_methods'][$class])) { + PEAR::popErrorHandling(); + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . + $fileXml['name'] . '" must declare methods init() and run()'); + } + $methods = array('init' => 0, 'run' => 1); + foreach ($analysis['declared_methods'][$class] as $method) { + if (isset($methods[$method])) { + unset($methods[$method]); + } + } + if (count($methods)) { + PEAR::popErrorHandling(); + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . + $fileXml['name'] . '" must declare methods init() and run()'); + } + } + PEAR::popErrorHandling(); + $definedparams = array(); + $tasksNamespace = $pkg->getTasksNs() . ':'; + if (!isset($xml[$tasksNamespace . 'paramgroup']) && isset($xml['paramgroup'])) { + // in order to support the older betas, which did not expect internal tags + // to also use the namespace + $tasksNamespace = ''; + } + if (isset($xml[$tasksNamespace . 'paramgroup'])) { + $params = $xml[$tasksNamespace . 'paramgroup']; + if (!is_array($params) || !isset($params[0])) { + $params = array($params); + } + foreach ($params as $param) { + if (!isset($param[$tasksNamespace . 'id'])) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . + $fileXml['name'] . '" must have ' . + 'an ' . $tasksNamespace . 'id> tag'); + } + if (isset($param[$tasksNamespace . 'name'])) { + if (!in_array($param[$tasksNamespace . 'name'], $definedparams)) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . + $fileXml['name'] . '" ' . $tasksNamespace . + 'paramgroup> id "' . $param[$tasksNamespace . 'id'] . + '" parameter "' . $param[$tasksNamespace . 'name'] . + '" has not been previously defined'); + } + if (!isset($param[$tasksNamespace . 'conditiontype'])) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . + $fileXml['name'] . '" ' . $tasksNamespace . + 'paramgroup> id "' . $param[$tasksNamespace . 'id'] . + '" must have a ' . $tasksNamespace . + 'conditiontype> tag containing either "=", ' . + '"!=", or "preg_match"'); + } + if (!in_array($param[$tasksNamespace . 'conditiontype'], + array('=', '!=', 'preg_match'))) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . + $fileXml['name'] . '" ' . $tasksNamespace . + 'paramgroup> id "' . $param[$tasksNamespace . 'id'] . + '" must have a ' . $tasksNamespace . + 'conditiontype> tag containing either "=", ' . + '"!=", or "preg_match"'); + } + if (!isset($param[$tasksNamespace . 'value'])) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . + $fileXml['name'] . '" ' . $tasksNamespace . + 'paramgroup> id "' . $param[$tasksNamespace . 'id'] . + '" must have a ' . $tasksNamespace . + 'value> tag containing expected parameter value'); + } + } + if (isset($param[$tasksNamespace . 'instructions'])) { + if (!is_string($param[$tasksNamespace . 'instructions'])) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . + $fileXml['name'] . '" ' . $tasksNamespace . + 'paramgroup> id "' . $param[$tasksNamespace . 'id'] . + '" ' . $tasksNamespace . 'instructions> must be simple text'); + } + } + if (!isset($param[$tasksNamespace . 'param'])) { + continue; // is no longer required + } + $subparams = $param[$tasksNamespace . 'param']; + if (!is_array($subparams) || !isset($subparams[0])) { + $subparams = array($subparams); + } + foreach ($subparams as $subparam) { + if (!isset($subparam[$tasksNamespace . 'name'])) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . + $fileXml['name'] . '" parameter for ' . + $tasksNamespace . 'paramgroup> id "' . + $param[$tasksNamespace . 'id'] . '" must have ' . + 'a ' . $tasksNamespace . 'name> tag'); + } + if (!preg_match('/[a-zA-Z0-9]+/', + $subparam[$tasksNamespace . 'name'])) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . + $fileXml['name'] . '" parameter "' . + $subparam[$tasksNamespace . 'name'] . + '" for ' . $tasksNamespace . 'paramgroup> id "' . + $param[$tasksNamespace . 'id'] . + '" is not a valid name. Must contain only alphanumeric characters'); + } + if (!isset($subparam[$tasksNamespace . 'prompt'])) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . + $fileXml['name'] . '" parameter "' . + $subparam[$tasksNamespace . 'name'] . + '" for ' . $tasksNamespace . 'paramgroup> id "' . + $param[$tasksNamespace . 'id'] . + '" must have a ' . $tasksNamespace . 'prompt> tag'); + } + if (!isset($subparam[$tasksNamespace . 'type'])) { + return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . + $fileXml['name'] . '" parameter "' . + $subparam[$tasksNamespace . 'name'] . + '" for ' . $tasksNamespace . 'paramgroup> id "' . + $param[$tasksNamespace . 'id'] . + '" must have a ' . $tasksNamespace . 'type> tag'); + } + $definedparams[] = $param[$tasksNamespace . 'id'] . '::' . + $subparam[$tasksNamespace . 'name']; + } + } + } + return true; + } + + /** + * Initialize a task instance with the parameters + * @param array raw, parsed xml + * @param array attributes from the tag containing this task + * @param string|null last installed version of this package, if any (useful for upgrades) + */ + function init($xml, $fileattribs, $lastversion) + { + $this->_class = str_replace('/', '_', $fileattribs['name']); + $this->_filename = $fileattribs['name']; + $this->_class = str_replace ('.php', '', $this->_class) . '_postinstall'; + $this->_params = $xml; + $this->_lastversion = $lastversion; + } + + /** + * Strip the tasks: namespace from internal params + * + * @access private + */ + function _stripNamespace($params = null) + { + if ($params === null) { + $params = array(); + if (!is_array($this->_params)) { + return; + } + foreach ($this->_params as $i => $param) { + if (is_array($param)) { + $param = $this->_stripNamespace($param); + } + $params[str_replace($this->_pkg->getTasksNs() . ':', '', $i)] = $param; + } + $this->_params = $params; + } else { + $newparams = array(); + foreach ($params as $i => $param) { + if (is_array($param)) { + $param = $this->_stripNamespace($param); + } + $newparams[str_replace($this->_pkg->getTasksNs() . ':', '', $i)] = $param; + } + return $newparams; + } + } + + /** + * Unlike other tasks, the installed file name is passed in instead of the file contents, + * because this task is handled post-installation + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @param string file name + * @return bool|PEAR_Error false to skip this file, PEAR_Error to fail + * (use $this->throwError) + */ + function startSession($pkg, $contents) + { + if ($this->installphase != PEAR_TASK_INSTALL) { + return false; + } + // remove the tasks: namespace if present + $this->_pkg = $pkg; + $this->_stripNamespace(); + $this->logger->log(0, 'Including external post-installation script "' . + $contents . '" - any errors are in this script'); + include_once $contents; + if (class_exists($this->_class)) { + $this->logger->log(0, 'Inclusion succeeded'); + } else { + return $this->throwError('init of post-install script class "' . $this->_class + . '" failed'); + } + $this->_obj = new $this->_class; + $this->logger->log(1, 'running post-install script "' . $this->_class . '->init()"'); + PEAR::pushErrorHandling(PEAR_ERROR_RETURN); + $res = $this->_obj->init($this->config, $pkg, $this->_lastversion); + PEAR::popErrorHandling(); + if ($res) { + $this->logger->log(0, 'init succeeded'); + } else { + return $this->throwError('init of post-install script "' . $this->_class . + '->init()" failed'); + } + $this->_contents = $contents; + return true; + } + + /** + * No longer used + * @see PEAR_PackageFile_v2::runPostinstallScripts() + * @param array an array of tasks + * @param string install or upgrade + * @access protected + * @static + */ + function run() + { + } +} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Task/Postinstallscript/rw.php b/_piecrust/libs/PEAR/Task/Postinstallscript/rw.php new file mode 100644 index 0000000..8f358bf --- /dev/null +++ b/_piecrust/libs/PEAR/Task/Postinstallscript/rw.php @@ -0,0 +1,169 @@ + - read/write version + * + * PHP versions 4 and 5 + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: rw.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a10 + */ +/** + * Base class + */ +require_once 'PEAR/Task/Postinstallscript.php'; +/** + * Abstracts the postinstallscript file task xml. + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a10 + */ +class PEAR_Task_Postinstallscript_rw extends PEAR_Task_Postinstallscript +{ + /** + * parent package file object + * + * @var PEAR_PackageFile_v2_rw + */ + var $_pkg; + /** + * Enter description here... + * + * @param PEAR_PackageFile_v2_rw $pkg + * @param PEAR_Config $config + * @param PEAR_Frontend $logger + * @param array $fileXml + * @return PEAR_Task_Postinstallscript_rw + */ + function PEAR_Task_Postinstallscript_rw(&$pkg, &$config, &$logger, $fileXml) + { + parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE); + $this->_contents = $fileXml; + $this->_pkg = &$pkg; + $this->_params = array(); + } + + function validate() + { + return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents); + } + + function getName() + { + return 'postinstallscript'; + } + + /** + * add a simple to the post-install script + * + * Order is significant, so call this method in the same + * sequence the users should see the paramgroups. The $params + * parameter should either be the result of a call to {@link getParam()} + * or an array of calls to getParam(). + * + * Use {@link addConditionTypeGroup()} to add a containing + * a tag + * @param string $id id as seen by the script + * @param array|false $params array of getParam() calls, or false for no params + * @param string|false $instructions + */ + function addParamGroup($id, $params = false, $instructions = false) + { + if ($params && isset($params[0]) && !isset($params[1])) { + $params = $params[0]; + } + $stuff = + array( + $this->_pkg->getTasksNs() . ':id' => $id, + ); + if ($instructions) { + $stuff[$this->_pkg->getTasksNs() . ':instructions'] = $instructions; + } + if ($params) { + $stuff[$this->_pkg->getTasksNs() . ':param'] = $params; + } + $this->_params[$this->_pkg->getTasksNs() . ':paramgroup'][] = $stuff; + } + + /** + * add a complex to the post-install script with conditions + * + * This inserts a with + * + * Order is significant, so call this method in the same + * sequence the users should see the paramgroups. The $params + * parameter should either be the result of a call to {@link getParam()} + * or an array of calls to getParam(). + * + * Use {@link addParamGroup()} to add a simple + * + * @param string $id id as seen by the script + * @param string $oldgroup id of the section referenced by + * + * @param string $param name of the from the older section referenced + * by + * @param string $value value to match of the parameter + * @param string $conditiontype one of '=', '!=', 'preg_match' + * @param array|false $params array of getParam() calls, or false for no params + * @param string|false $instructions + */ + function addConditionTypeGroup($id, $oldgroup, $param, $value, $conditiontype = '=', + $params = false, $instructions = false) + { + if ($params && isset($params[0]) && !isset($params[1])) { + $params = $params[0]; + } + $stuff = array( + $this->_pkg->getTasksNs() . ':id' => $id, + ); + if ($instructions) { + $stuff[$this->_pkg->getTasksNs() . ':instructions'] = $instructions; + } + $stuff[$this->_pkg->getTasksNs() . ':name'] = $oldgroup . '::' . $param; + $stuff[$this->_pkg->getTasksNs() . ':conditiontype'] = $conditiontype; + $stuff[$this->_pkg->getTasksNs() . ':value'] = $value; + if ($params) { + $stuff[$this->_pkg->getTasksNs() . ':param'] = $params; + } + $this->_params[$this->_pkg->getTasksNs() . ':paramgroup'][] = $stuff; + } + + function getXml() + { + return $this->_params; + } + + /** + * Use to set up a param tag for use in creating a paramgroup + * @static + */ + function getParam($name, $prompt, $type = 'string', $default = null) + { + if ($default !== null) { + return + array( + $this->_pkg->getTasksNs() . ':name' => $name, + $this->_pkg->getTasksNs() . ':prompt' => $prompt, + $this->_pkg->getTasksNs() . ':type' => $type, + $this->_pkg->getTasksNs() . ':default' => $default + ); + } + return + array( + $this->_pkg->getTasksNs() . ':name' => $name, + $this->_pkg->getTasksNs() . ':prompt' => $prompt, + $this->_pkg->getTasksNs() . ':type' => $type, + ); + } +} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Task/Replace.php b/_piecrust/libs/PEAR/Task/Replace.php new file mode 100644 index 0000000..376df64 --- /dev/null +++ b/_piecrust/libs/PEAR/Task/Replace.php @@ -0,0 +1,176 @@ + + * + * PHP versions 4 and 5 + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Replace.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ +/** + * Base class + */ +require_once 'PEAR/Task/Common.php'; +/** + * Implements the replace file task. + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Task_Replace extends PEAR_Task_Common +{ + var $type = 'simple'; + var $phase = PEAR_TASK_PACKAGEANDINSTALL; + var $_replacements; + + /** + * Validate the raw xml at parsing-time. + * @param PEAR_PackageFile_v2 + * @param array raw, parsed xml + * @param PEAR_Config + * @static + */ + function validateXml($pkg, $xml, $config, $fileXml) + { + if (!isset($xml['attribs'])) { + return array(PEAR_TASK_ERROR_NOATTRIBS); + } + if (!isset($xml['attribs']['type'])) { + return array(PEAR_TASK_ERROR_MISSING_ATTRIB, 'type'); + } + if (!isset($xml['attribs']['to'])) { + return array(PEAR_TASK_ERROR_MISSING_ATTRIB, 'to'); + } + if (!isset($xml['attribs']['from'])) { + return array(PEAR_TASK_ERROR_MISSING_ATTRIB, 'from'); + } + if ($xml['attribs']['type'] == 'pear-config') { + if (!in_array($xml['attribs']['to'], $config->getKeys())) { + return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'], + $config->getKeys()); + } + } elseif ($xml['attribs']['type'] == 'php-const') { + if (defined($xml['attribs']['to'])) { + return true; + } else { + return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'], + array('valid PHP constant')); + } + } elseif ($xml['attribs']['type'] == 'package-info') { + if (in_array($xml['attribs']['to'], + array('name', 'summary', 'channel', 'notes', 'extends', 'description', + 'release_notes', 'license', 'release-license', 'license-uri', + 'version', 'api-version', 'state', 'api-state', 'release_date', + 'date', 'time'))) { + return true; + } else { + return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'], + array('name', 'summary', 'channel', 'notes', 'extends', 'description', + 'release_notes', 'license', 'release-license', 'license-uri', + 'version', 'api-version', 'state', 'api-state', 'release_date', + 'date', 'time')); + } + } else { + return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'type', $xml['attribs']['type'], + array('pear-config', 'package-info', 'php-const')); + } + return true; + } + + /** + * Initialize a task instance with the parameters + * @param array raw, parsed xml + * @param unused + */ + function init($xml, $attribs) + { + $this->_replacements = isset($xml['attribs']) ? array($xml) : $xml; + } + + /** + * Do a package.xml 1.0 replacement, with additional package-info fields available + * + * See validateXml() source for the complete list of allowed fields + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @param string file contents + * @param string the eventual final file location (informational only) + * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail + * (use $this->throwError), otherwise return the new contents + */ + function startSession($pkg, $contents, $dest) + { + $subst_from = $subst_to = array(); + foreach ($this->_replacements as $a) { + $a = $a['attribs']; + $to = ''; + if ($a['type'] == 'pear-config') { + if ($this->installphase == PEAR_TASK_PACKAGE) { + return false; + } + if ($a['to'] == 'master_server') { + $chan = $this->registry->getChannel($pkg->getChannel()); + if (!PEAR::isError($chan)) { + $to = $chan->getServer(); + } else { + $this->logger->log(0, "$dest: invalid pear-config replacement: $a[to]"); + return false; + } + } else { + if ($this->config->isDefinedLayer('ftp')) { + // try the remote config file first + $to = $this->config->get($a['to'], 'ftp', $pkg->getChannel()); + if (is_null($to)) { + // then default to local + $to = $this->config->get($a['to'], null, $pkg->getChannel()); + } + } else { + $to = $this->config->get($a['to'], null, $pkg->getChannel()); + } + } + if (is_null($to)) { + $this->logger->log(0, "$dest: invalid pear-config replacement: $a[to]"); + return false; + } + } elseif ($a['type'] == 'php-const') { + if ($this->installphase == PEAR_TASK_PACKAGE) { + return false; + } + if (defined($a['to'])) { + $to = constant($a['to']); + } else { + $this->logger->log(0, "$dest: invalid php-const replacement: $a[to]"); + return false; + } + } else { + if ($t = $pkg->packageInfo($a['to'])) { + $to = $t; + } else { + $this->logger->log(0, "$dest: invalid package-info replacement: $a[to]"); + return false; + } + } + if (!is_null($to)) { + $subst_from[] = $a['from']; + $subst_to[] = $to; + } + } + $this->logger->log(3, "doing " . sizeof($subst_from) . + " substitution(s) for $dest"); + if (sizeof($subst_from)) { + $contents = str_replace($subst_from, $subst_to, $contents); + } + return $contents; + } +} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Task/Replace/rw.php b/_piecrust/libs/PEAR/Task/Replace/rw.php new file mode 100644 index 0000000..32dad58 --- /dev/null +++ b/_piecrust/libs/PEAR/Task/Replace/rw.php @@ -0,0 +1,61 @@ + - read/write version + * + * PHP versions 4 and 5 + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: rw.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a10 + */ +/** + * Base class + */ +require_once 'PEAR/Task/Replace.php'; +/** + * Abstracts the replace task xml. + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a10 + */ +class PEAR_Task_Replace_rw extends PEAR_Task_Replace +{ + function PEAR_Task_Replace_rw(&$pkg, &$config, &$logger, $fileXml) + { + parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE); + $this->_contents = $fileXml; + $this->_pkg = &$pkg; + $this->_params = array(); + } + + function validate() + { + return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents); + } + + function setInfo($from, $to, $type) + { + $this->_params = array('attribs' => array('from' => $from, 'to' => $to, 'type' => $type)); + } + + function getName() + { + return 'replace'; + } + + function getXml() + { + return $this->_params; + } +} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Task/Unixeol.php b/_piecrust/libs/PEAR/Task/Unixeol.php new file mode 100644 index 0000000..89ca81b --- /dev/null +++ b/_piecrust/libs/PEAR/Task/Unixeol.php @@ -0,0 +1,77 @@ + + * + * PHP versions 4 and 5 + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Unixeol.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ +/** + * Base class + */ +require_once 'PEAR/Task/Common.php'; +/** + * Implements the unix line endings file task. + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Task_Unixeol extends PEAR_Task_Common +{ + var $type = 'simple'; + var $phase = PEAR_TASK_PACKAGE; + var $_replacements; + + /** + * Validate the raw xml at parsing-time. + * @param PEAR_PackageFile_v2 + * @param array raw, parsed xml + * @param PEAR_Config + * @static + */ + function validateXml($pkg, $xml, $config, $fileXml) + { + if ($xml != '') { + return array(PEAR_TASK_ERROR_INVALID, 'no attributes allowed'); + } + return true; + } + + /** + * Initialize a task instance with the parameters + * @param array raw, parsed xml + * @param unused + */ + function init($xml, $attribs) + { + } + + /** + * Replace all line endings with line endings customized for the current OS + * + * See validateXml() source for the complete list of allowed fields + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @param string file contents + * @param string the eventual final file location (informational only) + * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail + * (use $this->throwError), otherwise return the new contents + */ + function startSession($pkg, $contents, $dest) + { + $this->logger->log(3, "replacing all line endings with \\n in $dest"); + return preg_replace("/\r\n|\n\r|\r|\n/", "\n", $contents); + } +} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Task/Unixeol/rw.php b/_piecrust/libs/PEAR/Task/Unixeol/rw.php new file mode 100644 index 0000000..b2ae5fa --- /dev/null +++ b/_piecrust/libs/PEAR/Task/Unixeol/rw.php @@ -0,0 +1,56 @@ + - read/write version + * + * PHP versions 4 and 5 + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: rw.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a10 + */ +/** + * Base class + */ +require_once 'PEAR/Task/Unixeol.php'; +/** + * Abstracts the unixeol task xml. + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a10 + */ +class PEAR_Task_Unixeol_rw extends PEAR_Task_Unixeol +{ + function PEAR_Task_Unixeol_rw(&$pkg, &$config, &$logger, $fileXml) + { + parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE); + $this->_contents = $fileXml; + $this->_pkg = &$pkg; + $this->_params = array(); + } + + function validate() + { + return true; + } + + function getName() + { + return 'unixeol'; + } + + function getXml() + { + return ''; + } +} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Task/Windowseol.php b/_piecrust/libs/PEAR/Task/Windowseol.php new file mode 100644 index 0000000..8ba4171 --- /dev/null +++ b/_piecrust/libs/PEAR/Task/Windowseol.php @@ -0,0 +1,77 @@ + + * + * PHP versions 4 and 5 + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Windowseol.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ +/** + * Base class + */ +require_once 'PEAR/Task/Common.php'; +/** + * Implements the windows line endsings file task. + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Task_Windowseol extends PEAR_Task_Common +{ + var $type = 'simple'; + var $phase = PEAR_TASK_PACKAGE; + var $_replacements; + + /** + * Validate the raw xml at parsing-time. + * @param PEAR_PackageFile_v2 + * @param array raw, parsed xml + * @param PEAR_Config + * @static + */ + function validateXml($pkg, $xml, $config, $fileXml) + { + if ($xml != '') { + return array(PEAR_TASK_ERROR_INVALID, 'no attributes allowed'); + } + return true; + } + + /** + * Initialize a task instance with the parameters + * @param array raw, parsed xml + * @param unused + */ + function init($xml, $attribs) + { + } + + /** + * Replace all line endings with windows line endings + * + * See validateXml() source for the complete list of allowed fields + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + * @param string file contents + * @param string the eventual final file location (informational only) + * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail + * (use $this->throwError), otherwise return the new contents + */ + function startSession($pkg, $contents, $dest) + { + $this->logger->log(3, "replacing all line endings with \\r\\n in $dest"); + return preg_replace("/\r\n|\n\r|\r|\n/", "\r\n", $contents); + } +} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Task/Windowseol/rw.php b/_piecrust/libs/PEAR/Task/Windowseol/rw.php new file mode 100644 index 0000000..f0f1149 --- /dev/null +++ b/_piecrust/libs/PEAR/Task/Windowseol/rw.php @@ -0,0 +1,56 @@ + - read/write version + * + * PHP versions 4 and 5 + * + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: rw.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a10 + */ +/** + * Base class + */ +require_once 'PEAR/Task/Windowseol.php'; +/** + * Abstracts the windowseol task xml. + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a10 + */ +class PEAR_Task_Windowseol_rw extends PEAR_Task_Windowseol +{ + function PEAR_Task_Windowseol_rw(&$pkg, &$config, &$logger, $fileXml) + { + parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE); + $this->_contents = $fileXml; + $this->_pkg = &$pkg; + $this->_params = array(); + } + + function validate() + { + return true; + } + + function getName() + { + return 'windowseol'; + } + + function getXml() + { + return ''; + } +} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Validate.php b/_piecrust/libs/PEAR/Validate.php new file mode 100644 index 0000000..176560b --- /dev/null +++ b/_piecrust/libs/PEAR/Validate.php @@ -0,0 +1,629 @@ + + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: Validate.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ +/**#@+ + * Constants for install stage + */ +define('PEAR_VALIDATE_INSTALLING', 1); +define('PEAR_VALIDATE_UNINSTALLING', 2); // this is not bit-mapped like the others +define('PEAR_VALIDATE_NORMAL', 3); +define('PEAR_VALIDATE_DOWNLOADING', 4); // this is not bit-mapped like the others +define('PEAR_VALIDATE_PACKAGING', 7); +/**#@-*/ +require_once 'PEAR/Common.php'; +require_once 'PEAR/Validator/PECL.php'; + +/** + * Validation class for package.xml - channel-level advanced validation + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_Validate +{ + var $packageregex = _PEAR_COMMON_PACKAGE_NAME_PREG; + /** + * @var PEAR_PackageFile_v1|PEAR_PackageFile_v2 + */ + var $_packagexml; + /** + * @var int one of the PEAR_VALIDATE_* constants + */ + var $_state = PEAR_VALIDATE_NORMAL; + /** + * Format: ('error' => array('field' => name, 'reason' => reason), 'warning' => same) + * @var array + * @access private + */ + var $_failures = array('error' => array(), 'warning' => array()); + + /** + * Override this method to handle validation of normal package names + * @param string + * @return bool + * @access protected + */ + function _validPackageName($name) + { + return (bool) preg_match('/^' . $this->packageregex . '\\z/', $name); + } + + /** + * @param string package name to validate + * @param string name of channel-specific validation package + * @final + */ + function validPackageName($name, $validatepackagename = false) + { + if ($validatepackagename) { + if (strtolower($name) == strtolower($validatepackagename)) { + return (bool) preg_match('/^[a-zA-Z0-9_]+(?:\.[a-zA-Z0-9_]+)*\\z/', $name); + } + } + return $this->_validPackageName($name); + } + + /** + * This validates a bundle name, and bundle names must conform + * to the PEAR naming convention, so the method is final and static. + * @param string + * @final + * @static + */ + function validGroupName($name) + { + return (bool) preg_match('/^' . _PEAR_COMMON_PACKAGE_NAME_PREG . '\\z/', $name); + } + + /** + * Determine whether $state represents a valid stability level + * @param string + * @return bool + * @static + * @final + */ + function validState($state) + { + return in_array($state, array('snapshot', 'devel', 'alpha', 'beta', 'stable')); + } + + /** + * Get a list of valid stability levels + * @return array + * @static + * @final + */ + function getValidStates() + { + return array('snapshot', 'devel', 'alpha', 'beta', 'stable'); + } + + /** + * Determine whether a version is a properly formatted version number that can be used + * by version_compare + * @param string + * @return bool + * @static + * @final + */ + function validVersion($ver) + { + return (bool) preg_match(PEAR_COMMON_PACKAGE_VERSION_PREG, $ver); + } + + /** + * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 + */ + function setPackageFile(&$pf) + { + $this->_packagexml = &$pf; + } + + /** + * @access private + */ + function _addFailure($field, $reason) + { + $this->_failures['errors'][] = array('field' => $field, 'reason' => $reason); + } + + /** + * @access private + */ + function _addWarning($field, $reason) + { + $this->_failures['warnings'][] = array('field' => $field, 'reason' => $reason); + } + + function getFailures() + { + $failures = $this->_failures; + $this->_failures = array('warnings' => array(), 'errors' => array()); + return $failures; + } + + /** + * @param int one of the PEAR_VALIDATE_* constants + */ + function validate($state = null) + { + if (!isset($this->_packagexml)) { + return false; + } + if ($state !== null) { + $this->_state = $state; + } + $this->_failures = array('warnings' => array(), 'errors' => array()); + $this->validatePackageName(); + $this->validateVersion(); + $this->validateMaintainers(); + $this->validateDate(); + $this->validateSummary(); + $this->validateDescription(); + $this->validateLicense(); + $this->validateNotes(); + if ($this->_packagexml->getPackagexmlVersion() == '1.0') { + $this->validateState(); + $this->validateFilelist(); + } elseif ($this->_packagexml->getPackagexmlVersion() == '2.0' || + $this->_packagexml->getPackagexmlVersion() == '2.1') { + $this->validateTime(); + $this->validateStability(); + $this->validateDeps(); + $this->validateMainFilelist(); + $this->validateReleaseFilelist(); + //$this->validateGlobalTasks(); + $this->validateChangelog(); + } + return !((bool) count($this->_failures['errors'])); + } + + /** + * @access protected + */ + function validatePackageName() + { + if ($this->_state == PEAR_VALIDATE_PACKAGING || + $this->_state == PEAR_VALIDATE_NORMAL) { + if (($this->_packagexml->getPackagexmlVersion() == '2.0' || + $this->_packagexml->getPackagexmlVersion() == '2.1') && + $this->_packagexml->getExtends()) { + $version = $this->_packagexml->getVersion() . ''; + $name = $this->_packagexml->getPackage(); + $test = array_shift($a = explode('.', $version)); + if ($test == '0') { + return true; + } + $vlen = strlen($test); + $majver = substr($name, strlen($name) - $vlen); + while ($majver && !is_numeric($majver{0})) { + $majver = substr($majver, 1); + } + if ($majver != $test) { + $this->_addWarning('package', "package $name extends package " . + $this->_packagexml->getExtends() . ' and so the name should ' . + 'have a postfix equal to the major version like "' . + $this->_packagexml->getExtends() . $test . '"'); + return true; + } elseif (substr($name, 0, strlen($name) - $vlen) != + $this->_packagexml->getExtends()) { + $this->_addWarning('package', "package $name extends package " . + $this->_packagexml->getExtends() . ' and so the name must ' . + 'be an extension like "' . $this->_packagexml->getExtends() . + $test . '"'); + return true; + } + } + } + if (!$this->validPackageName($this->_packagexml->getPackage())) { + $this->_addFailure('name', 'package name "' . + $this->_packagexml->getPackage() . '" is invalid'); + return false; + } + } + + /** + * @access protected + */ + function validateVersion() + { + if ($this->_state != PEAR_VALIDATE_PACKAGING) { + if (!$this->validVersion($this->_packagexml->getVersion())) { + $this->_addFailure('version', + 'Invalid version number "' . $this->_packagexml->getVersion() . '"'); + } + return false; + } + $version = $this->_packagexml->getVersion(); + $versioncomponents = explode('.', $version); + if (count($versioncomponents) != 3) { + $this->_addWarning('version', + 'A version number should have 3 decimals (x.y.z)'); + return true; + } + $name = $this->_packagexml->getPackage(); + // version must be based upon state + switch ($this->_packagexml->getState()) { + case 'snapshot' : + return true; + case 'devel' : + if ($versioncomponents[0] . 'a' == '0a') { + return true; + } + if ($versioncomponents[0] == 0) { + $versioncomponents[0] = '0'; + $this->_addWarning('version', + 'version "' . $version . '" should be "' . + implode('.' ,$versioncomponents) . '"'); + } else { + $this->_addWarning('version', + 'packages with devel stability must be < version 1.0.0'); + } + return true; + break; + case 'alpha' : + case 'beta' : + // check for a package that extends a package, + // like Foo and Foo2 + if ($this->_state == PEAR_VALIDATE_PACKAGING) { + if (substr($versioncomponents[2], 1, 2) == 'rc') { + $this->_addFailure('version', 'Release Candidate versions ' . + 'must have capital RC, not lower-case rc'); + return false; + } + } + if (!$this->_packagexml->getExtends()) { + if ($versioncomponents[0] == '1') { + if ($versioncomponents[2]{0} == '0') { + if ($versioncomponents[2] == '0') { + // version 1.*.0000 + $this->_addWarning('version', + 'version 1.' . $versioncomponents[1] . + '.0 probably should not be alpha or beta'); + return true; + } elseif (strlen($versioncomponents[2]) > 1) { + // version 1.*.0RC1 or 1.*.0beta24 etc. + return true; + } else { + // version 1.*.0 + $this->_addWarning('version', + 'version 1.' . $versioncomponents[1] . + '.0 probably should not be alpha or beta'); + return true; + } + } else { + $this->_addWarning('version', + 'bugfix versions (1.3.x where x > 0) probably should ' . + 'not be alpha or beta'); + return true; + } + } elseif ($versioncomponents[0] != '0') { + $this->_addWarning('version', + 'major versions greater than 1 are not allowed for packages ' . + 'without an tag or an identical postfix (foo2 v2.0.0)'); + return true; + } + if ($versioncomponents[0] . 'a' == '0a') { + return true; + } + if ($versioncomponents[0] == 0) { + $versioncomponents[0] = '0'; + $this->_addWarning('version', + 'version "' . $version . '" should be "' . + implode('.' ,$versioncomponents) . '"'); + } + } else { + $vlen = strlen($versioncomponents[0] . ''); + $majver = substr($name, strlen($name) - $vlen); + while ($majver && !is_numeric($majver{0})) { + $majver = substr($majver, 1); + } + if (($versioncomponents[0] != 0) && $majver != $versioncomponents[0]) { + $this->_addWarning('version', 'first version number "' . + $versioncomponents[0] . '" must match the postfix of ' . + 'package name "' . $name . '" (' . + $majver . ')'); + return true; + } + if ($versioncomponents[0] == $majver) { + if ($versioncomponents[2]{0} == '0') { + if ($versioncomponents[2] == '0') { + // version 2.*.0000 + $this->_addWarning('version', + "version $majver." . $versioncomponents[1] . + '.0 probably should not be alpha or beta'); + return false; + } elseif (strlen($versioncomponents[2]) > 1) { + // version 2.*.0RC1 or 2.*.0beta24 etc. + return true; + } else { + // version 2.*.0 + $this->_addWarning('version', + "version $majver." . $versioncomponents[1] . + '.0 cannot be alpha or beta'); + return true; + } + } else { + $this->_addWarning('version', + "bugfix versions ($majver.x.y where y > 0) should " . + 'not be alpha or beta'); + return true; + } + } elseif ($versioncomponents[0] != '0') { + $this->_addWarning('version', + "only versions 0.x.y and $majver.x.y are allowed for alpha/beta releases"); + return true; + } + if ($versioncomponents[0] . 'a' == '0a') { + return true; + } + if ($versioncomponents[0] == 0) { + $versioncomponents[0] = '0'; + $this->_addWarning('version', + 'version "' . $version . '" should be "' . + implode('.' ,$versioncomponents) . '"'); + } + } + return true; + break; + case 'stable' : + if ($versioncomponents[0] == '0') { + $this->_addWarning('version', 'versions less than 1.0.0 cannot ' . + 'be stable'); + return true; + } + if (!is_numeric($versioncomponents[2])) { + if (preg_match('/\d+(rc|a|alpha|b|beta)\d*/i', + $versioncomponents[2])) { + $this->_addWarning('version', 'version "' . $version . '" or any ' . + 'RC/beta/alpha version cannot be stable'); + return true; + } + } + // check for a package that extends a package, + // like Foo and Foo2 + if ($this->_packagexml->getExtends()) { + $vlen = strlen($versioncomponents[0] . ''); + $majver = substr($name, strlen($name) - $vlen); + while ($majver && !is_numeric($majver{0})) { + $majver = substr($majver, 1); + } + if (($versioncomponents[0] != 0) && $majver != $versioncomponents[0]) { + $this->_addWarning('version', 'first version number "' . + $versioncomponents[0] . '" must match the postfix of ' . + 'package name "' . $name . '" (' . + $majver . ')'); + return true; + } + } elseif ($versioncomponents[0] > 1) { + $this->_addWarning('version', 'major version x in x.y.z may not be greater than ' . + '1 for any package that does not have an tag'); + } + return true; + break; + default : + return false; + break; + } + } + + /** + * @access protected + */ + function validateMaintainers() + { + // maintainers can only be truly validated server-side for most channels + // but allow this customization for those who wish it + return true; + } + + /** + * @access protected + */ + function validateDate() + { + if ($this->_state == PEAR_VALIDATE_NORMAL || + $this->_state == PEAR_VALIDATE_PACKAGING) { + + if (!preg_match('/(\d\d\d\d)\-(\d\d)\-(\d\d)/', + $this->_packagexml->getDate(), $res) || + count($res) < 4 + || !checkdate($res[2], $res[3], $res[1]) + ) { + $this->_addFailure('date', 'invalid release date "' . + $this->_packagexml->getDate() . '"'); + return false; + } + + if ($this->_state == PEAR_VALIDATE_PACKAGING && + $this->_packagexml->getDate() != date('Y-m-d')) { + $this->_addWarning('date', 'Release Date "' . + $this->_packagexml->getDate() . '" is not today'); + } + } + return true; + } + + /** + * @access protected + */ + function validateTime() + { + if (!$this->_packagexml->getTime()) { + // default of no time value set + return true; + } + + // packager automatically sets time, so only validate if pear validate is called + if ($this->_state = PEAR_VALIDATE_NORMAL) { + if (!preg_match('/\d\d:\d\d:\d\d/', + $this->_packagexml->getTime())) { + $this->_addFailure('time', 'invalid release time "' . + $this->_packagexml->getTime() . '"'); + return false; + } + + $result = preg_match('|\d{2}\:\d{2}\:\d{2}|', $this->_packagexml->getTime(), $matches); + if ($result === false || empty($matches)) { + $this->_addFailure('time', 'invalid release time "' . + $this->_packagexml->getTime() . '"'); + return false; + } + } + + return true; + } + + /** + * @access protected + */ + function validateState() + { + // this is the closest to "final" php4 can get + if (!PEAR_Validate::validState($this->_packagexml->getState())) { + if (strtolower($this->_packagexml->getState() == 'rc')) { + $this->_addFailure('state', 'RC is not a state, it is a version ' . + 'postfix, use ' . $this->_packagexml->getVersion() . 'RC1, state beta'); + } + $this->_addFailure('state', 'invalid release state "' . + $this->_packagexml->getState() . '", must be one of: ' . + implode(', ', PEAR_Validate::getValidStates())); + return false; + } + return true; + } + + /** + * @access protected + */ + function validateStability() + { + $ret = true; + $packagestability = $this->_packagexml->getState(); + $apistability = $this->_packagexml->getState('api'); + if (!PEAR_Validate::validState($packagestability)) { + $this->_addFailure('state', 'invalid release stability "' . + $this->_packagexml->getState() . '", must be one of: ' . + implode(', ', PEAR_Validate::getValidStates())); + $ret = false; + } + $apistates = PEAR_Validate::getValidStates(); + array_shift($apistates); // snapshot is not allowed + if (!in_array($apistability, $apistates)) { + $this->_addFailure('state', 'invalid API stability "' . + $this->_packagexml->getState('api') . '", must be one of: ' . + implode(', ', $apistates)); + $ret = false; + } + return $ret; + } + + /** + * @access protected + */ + function validateSummary() + { + return true; + } + + /** + * @access protected + */ + function validateDescription() + { + return true; + } + + /** + * @access protected + */ + function validateLicense() + { + return true; + } + + /** + * @access protected + */ + function validateNotes() + { + return true; + } + + /** + * for package.xml 2.0 only - channels can't use package.xml 1.0 + * @access protected + */ + function validateDependencies() + { + return true; + } + + /** + * for package.xml 1.0 only + * @access private + */ + function _validateFilelist() + { + return true; // placeholder for now + } + + /** + * for package.xml 2.0 only + * @access protected + */ + function validateMainFilelist() + { + return true; // placeholder for now + } + + /** + * for package.xml 2.0 only + * @access protected + */ + function validateReleaseFilelist() + { + return true; // placeholder for now + } + + /** + * @access protected + */ + function validateChangelog() + { + return true; + } + + /** + * @access protected + */ + function validateFilelist() + { + return true; + } + + /** + * @access protected + */ + function validateDeps() + { + return true; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Validator/PECL.php b/_piecrust/libs/PEAR/Validator/PECL.php new file mode 100644 index 0000000..89b951f --- /dev/null +++ b/_piecrust/libs/PEAR/Validator/PECL.php @@ -0,0 +1,63 @@ + + * @copyright 1997-2006 The PHP Group + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version CVS: $Id: PECL.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a5 + */ +/** + * This is the parent class for all validators + */ +require_once 'PEAR/Validate.php'; +/** + * Channel Validator for the pecl.php.net channel + * @category pear + * @package PEAR + * @author Greg Beaver + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a5 + */ +class PEAR_Validator_PECL extends PEAR_Validate +{ + function validateVersion() + { + if ($this->_state == PEAR_VALIDATE_PACKAGING) { + $version = $this->_packagexml->getVersion(); + $versioncomponents = explode('.', $version); + $last = array_pop($versioncomponents); + if (substr($last, 1, 2) == 'rc') { + $this->_addFailure('version', 'Release Candidate versions must have ' . + 'upper-case RC, not lower-case rc'); + return false; + } + } + return true; + } + + function validatePackageName() + { + $ret = parent::validatePackageName(); + if ($this->_packagexml->getPackageType() == 'extsrc' || + $this->_packagexml->getPackageType() == 'zendextsrc') { + if (strtolower($this->_packagexml->getPackage()) != + strtolower($this->_packagexml->getProvidesExtension())) { + $this->_addWarning('providesextension', 'package name "' . + $this->_packagexml->getPackage() . '" is different from extension name "' . + $this->_packagexml->getProvidesExtension() . '"'); + } + } + return $ret; + } +} +?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/XMLParser.php b/_piecrust/libs/PEAR/XMLParser.php new file mode 100644 index 0000000..7f091c1 --- /dev/null +++ b/_piecrust/libs/PEAR/XMLParser.php @@ -0,0 +1,253 @@ + + * @author Stephan Schmidt (original XML_Unserializer code) + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license New BSD License + * @version CVS: $Id: XMLParser.php 313023 2011-07-06 19:17:11Z dufuz $ + * @link http://pear.php.net/package/PEAR + * @since File available since Release 1.4.0a1 + */ + +/** + * Parser for any xml file + * @category pear + * @package PEAR + * @author Greg Beaver + * @author Stephan Schmidt (original XML_Unserializer code) + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license New BSD License + * @version Release: 1.9.4 + * @link http://pear.php.net/package/PEAR + * @since Class available since Release 1.4.0a1 + */ +class PEAR_XMLParser +{ + /** + * unserilialized data + * @var string $_serializedData + */ + var $_unserializedData = null; + + /** + * name of the root tag + * @var string $_root + */ + var $_root = null; + + /** + * stack for all data that is found + * @var array $_dataStack + */ + var $_dataStack = array(); + + /** + * stack for all values that are generated + * @var array $_valStack + */ + var $_valStack = array(); + + /** + * current tag depth + * @var int $_depth + */ + var $_depth = 0; + + /** + * The XML encoding to use + * @var string $encoding + */ + var $encoding = 'ISO-8859-1'; + + /** + * @return array + */ + function getData() + { + return $this->_unserializedData; + } + + /** + * @param string xml content + * @return true|PEAR_Error + */ + function parse($data) + { + if (!extension_loaded('xml')) { + include_once 'PEAR.php'; + return PEAR::raiseError("XML Extension not found", 1); + } + $this->_dataStack = $this->_valStack = array(); + $this->_depth = 0; + + if ( + strpos($data, 'encoding="UTF-8"') + || strpos($data, 'encoding="utf-8"') + || strpos($data, "encoding='UTF-8'") + || strpos($data, "encoding='utf-8'") + ) { + $this->encoding = 'UTF-8'; + } + + if (version_compare(phpversion(), '5.0.0', 'lt') && $this->encoding == 'UTF-8') { + $data = utf8_decode($data); + $this->encoding = 'ISO-8859-1'; + } + + $xp = xml_parser_create($this->encoding); + xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, 0); + xml_set_object($xp, $this); + xml_set_element_handler($xp, 'startHandler', 'endHandler'); + xml_set_character_data_handler($xp, 'cdataHandler'); + if (!xml_parse($xp, $data)) { + $msg = xml_error_string(xml_get_error_code($xp)); + $line = xml_get_current_line_number($xp); + xml_parser_free($xp); + include_once 'PEAR.php'; + return PEAR::raiseError("XML Error: '$msg' on line '$line'", 2); + } + xml_parser_free($xp); + return true; + } + + /** + * Start element handler for XML parser + * + * @access private + * @param object $parser XML parser object + * @param string $element XML element + * @param array $attribs attributes of XML tag + * @return void + */ + function startHandler($parser, $element, $attribs) + { + $this->_depth++; + $this->_dataStack[$this->_depth] = null; + + $val = array( + 'name' => $element, + 'value' => null, + 'type' => 'string', + 'childrenKeys' => array(), + 'aggregKeys' => array() + ); + + if (count($attribs) > 0) { + $val['children'] = array(); + $val['type'] = 'array'; + $val['children']['attribs'] = $attribs; + } + + array_push($this->_valStack, $val); + } + + /** + * post-process data + * + * @param string $data + * @param string $element element name + */ + function postProcess($data, $element) + { + return trim($data); + } + + /** + * End element handler for XML parser + * + * @access private + * @param object XML parser object + * @param string + * @return void + */ + function endHandler($parser, $element) + { + $value = array_pop($this->_valStack); + $data = $this->postProcess($this->_dataStack[$this->_depth], $element); + + // adjust type of the value + switch (strtolower($value['type'])) { + // unserialize an array + case 'array': + if ($data !== '') { + $value['children']['_content'] = $data; + } + + $value['value'] = isset($value['children']) ? $value['children'] : array(); + break; + + /* + * unserialize a null value + */ + case 'null': + $data = null; + break; + + /* + * unserialize any scalar value + */ + default: + settype($data, $value['type']); + $value['value'] = $data; + break; + } + + $parent = array_pop($this->_valStack); + if ($parent === null) { + $this->_unserializedData = &$value['value']; + $this->_root = &$value['name']; + return true; + } + + // parent has to be an array + if (!isset($parent['children']) || !is_array($parent['children'])) { + $parent['children'] = array(); + if ($parent['type'] != 'array') { + $parent['type'] = 'array'; + } + } + + if (!empty($value['name'])) { + // there already has been a tag with this name + if (in_array($value['name'], $parent['childrenKeys'])) { + // no aggregate has been created for this tag + if (!in_array($value['name'], $parent['aggregKeys'])) { + if (isset($parent['children'][$value['name']])) { + $parent['children'][$value['name']] = array($parent['children'][$value['name']]); + } else { + $parent['children'][$value['name']] = array(); + } + array_push($parent['aggregKeys'], $value['name']); + } + array_push($parent['children'][$value['name']], $value['value']); + } else { + $parent['children'][$value['name']] = &$value['value']; + array_push($parent['childrenKeys'], $value['name']); + } + } else { + array_push($parent['children'],$value['value']); + } + array_push($this->_valStack, $parent); + + $this->_depth--; + } + + /** + * Handler for character data + * + * @access private + * @param object XML parser object + * @param string CDATA + * @return void + */ + function cdataHandler($parser, $cdata) + { + $this->_dataStack[$this->_depth] .= $cdata; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/Phamlp.php b/_piecrust/libs/PhamlP/Phamlp.php new file mode 100755 index 0000000..7bec175 --- /dev/null +++ b/_piecrust/libs/PhamlP/Phamlp.php @@ -0,0 +1,72 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + */ +/** + * Phamlp class. + * Static support classes. + * @package PHamlP + */ +class Phamlp { + /** + * @var string Language used to translate messages + */ + public static $language; + /** + * @var array Messages used for translation + */ + public static $messages; + + /** + * Translates a message to the specified language. + * @param string message category. + * @param string the original message + * @param array parameters to be applied to the message using strtr. + * @return string the translated message + */ + public static function t($category, $message, $params = array()) { + if (!empty(self::$language)) { + $message = self::translate($category, $message); + } + return $params!==array() ? strtr($message,$params) : $message; + } + + /** + * Translates a message to the specified language. + * If the language or the message in the specified language is not defined the + * original message is returned. + * @param string message category + * @param string the original message + * @return string the translated message + */ + private static function translate($category, $message) { + if (empty(self::$messages[$category])) self::loadMessages($category); + return (empty(self::$messages[$category][$message]) ? $message : self::$messages[$category][$message]); + } + + /** + * Loads the specified language message file for translation. + * Message files are PHP files in the "category/messages" directory and named + * "language.php", where category is either haml or sass, and language is the + * specified language. + * The message file returns an array of (source, translation) pairs; for example: + *
        +	 * return array(
        +	 *   'original message 1' => 'translated message 1',
        +	 *   'original message 2' => 'translated message 2',
        +	 * );
        +	 * 
        + * @param string message category + */ + private static function loadMessages($category) { + $messageFile = dirname(__FILE__).DIRECTORY_SEPARATOR.$category.DIRECTORY_SEPARATOR.'messages'.DIRECTORY_SEPARATOR.self::$language.'.php'; + if (file_exists($messageFile)) { + self::$messages[$category] = require_once($messageFile); + } + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/PhamlpException.php b/_piecrust/libs/PhamlP/PhamlpException.php new file mode 100755 index 0000000..1dc3203 --- /dev/null +++ b/_piecrust/libs/PhamlP/PhamlpException.php @@ -0,0 +1,31 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + */ + +require_once('Phamlp.php'); + +/** + * Phamlp exception class. + * Base class for PHamlP::Haml and PHamlP::Sass exceptions. + * Translates exception messages. + * @package PHamlP + */ +class PhamlpException extends Exception { + /** + * Phamlp Exception. + * @param string Category (haml|sass) + * @param string Exception message + * @param array parameters to be applied to the message using strtr. + */ + public function __construct($category, $message, $params, $object) { + parent::__construct(Phamlp::t($category, $message, $params) . + (is_object($object) ? ": {$object->filename}::{$object->line}\nSource: {$object->source}" : '') + ); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/HamlException.php b/_piecrust/libs/PhamlP/haml/HamlException.php new file mode 100755 index 0000000..6410c76 --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/HamlException.php @@ -0,0 +1,29 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml + */ + +require_once(dirname(__FILE__).'/../PhamlpException.php'); + +/** + * Haml exception class. + * @package PHamlP + * @subpackage Haml + */ +class HamlException extends PhamlpException { + /** + * Haml Exception. + * @param string Exception message + * @param array parameters to be applied to the message using strtr. + * @param object object with source code and meta data + */ + public function __construct($message, $params = array(), $object = null) { + parent::__construct('haml', $message, $params, $object); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/HamlHelpers.php b/_piecrust/libs/PhamlP/haml/HamlHelpers.php new file mode 100755 index 0000000..d42a9f8 --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/HamlHelpers.php @@ -0,0 +1,199 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml + */ + +/** + * HamlHelpers class. + * Contains methods to make it easier to do various tasks. + * + * The class can be extended to provide user defined helper methods. The + * signature for user defined helper methods is ($block, $other, $arguments); + * $block is the string generated by the Haml block being operated on. + * + * Tthe path to the extended class is provided to HamlParser in the config + * array; class name == file name. + * + * HamlHelpers and any extended class are automatically included in the context + * that a Haml template is parsed in, so all the methods are at your disposal + * from within the template. + * + * @package PHamlP + * @subpackage Haml + */ +class HamlHelpers { + const XMLNS = 'http://www.w3.org/1999/xhtml'; + + /** + * Returns the block with string appended. + * @see succeed + * @param string Haml block + * @param string string to append + * @return string the block with string appended. + */ + public static function append($block, $string) { + return $block.$string; + } + + /** + * Escapes HTML entities in text, but without escaping an ampersand that is + * already part of an escaped entity. + * @param string Haml block + * @return string the block with HTML entities escaped. + */ + public static function escape_once($block) { + return htmlentities(html_entity_decode($block)); + } + + /** + * Returns an array containing default assignments for the xmlns, lang, and + * xml:lang attributes of the html element. + * This helper method is for use in the html element only. + * + * Examples:
        + * %html(html_attrs())
        + * produces
        + * + * + * %html(html_attrs('en-gb'))
        + * produces
        + * + * + * %html(html_attrs('en-gb', false))
        + * produces
        + * + * + * Although handled in HamlParser, the notes below are here for completeness.
        + * Other attributes are defined as normal. e.g.
        + * %html(xmlns:me="http://www.example.com/me" html_attrs('en-gb', false))
        + * produces
        + * + * + * PHamlP also allows for the language to be defined using PHP code that can + * be eval'd; the code must end with a semi-colon (;). e.g.
        + * %html(html_attrs("FW::app()->language);", false))
        + * produces (assuming FW::app()->language returns 'en-gb')
        + * + * + * @param string document language. Default = en-us + * @param boolean whether the html element has the lang attribute. Default: true + * Should be set false for XHTML 1.1 or greater documents + * @return string the block with string appended. + */ + public static function html_attrs($language = 'en-us', $lang = true) { + return ($lang ? + array('xmlns'=>self::XMLNS, 'xml:lang'=>$language, 'lang'=>$language) : + array('xmlns'=>self::XMLNS, 'xml:lang'=>$language)); + } + + /** + * Returns a copy of text with ampersands, angle brackets and quotes escaped + * into HTML entities. + * @param string Haml block + * @return string the block with HTML entities escaped. + */ + public static function html_escape($block) { + return htmlspecialchars($block); + } + + /** + * Iterates an array and using the block to generate a
      7. element for each + * array element. + * Examples:
        + * = list_of(array('red', 'orange', ...., 'violet'), 'colour')
        + * = colour
        + * Produces:
        + *
      8. red

      9. + *
      10. orange

      11. + * |
        + * |
        + *
      12. violet>

      13. + * + * = list_of(array('Fly Fishing' => 'JR Hartley', 'Lord of the Rings' => 'JRR Tolkien'), 'title', 'author')
        + * %h3= title
        + * %p= author
        + * Produces:
        + *

      14. + *

        Fly Fishing


        + *

        JR Hartley


        + *

      15. + *

      16. + *

        Lord of the Rings


        + *

        JRR Tolkien


        + *

      17. + * + * @param string Haml block + * @param array items + * @param string string in block to replace with item key or item value + * @param string string in block to replace with item value + * @return string list items. + */ + public static function list_of($block, $items, $key, $value = null) { + $output = ''; + foreach ($items as $_key=>$_value) { + $output .= '
      18. ' . strtr($block, (empty($value) ? array($key=>$_value) : + array($key=>$_key, $value=>$_value))) . '
      19. '; + } // foreach + return $output; + } + + /** + * Alias for prepend. + * @see prepend + * @param string Haml block + * @param string string to prepend + * @return string the block with string prepended + */ + public static function preceed($block, $string) { + return self::prepend($block, $string); + } + + /** + * Returns the block with string prepended. + * @param string Haml block + * @param string string to prepend + * @return string the block with string prepended + */ + public static function prepend($block, $string) { + return $string.$block; + } + + /** + * Converts newlines in the block to HTML entities. + * @param string Haml block + * @return string the block with newlines converted to HTML entities + */ + public static function preserve($block) { + return str_replace("\n", ' ', $block); + } + + /** + * Alias for append. + * @see append + * @param string Haml block + * @param string string to apppend + * @return string the block with string apppended + */ + public static function succeed($block, $string) { + return self::append($block, $string); + } + + /** + * Surrounds a block of Haml code with strings. + * If $back is not given it defaults to $front. + * @param string Haml block + * @param string string to prepend + * @param string string to apppend + * @return string the block surrounded by the strings + */ + public static function surround($block, $front, $back=null) { + return $front.$block.(is_null($back) ? $front : $back); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/HamlParser.php b/_piecrust/libs/PhamlP/haml/HamlParser.php new file mode 100755 index 0000000..9f9fa9b --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/HamlParser.php @@ -0,0 +1,1263 @@ + + *
      20. Debug (addition)
          + *
        • Source debug - adds comments to the output showing each source line above + * the result - ?#s+ to turn on, ?#s- to turn off, ?#s! to toggle
        • + *
        • Output debug - shows the output directly in the browser - ?#o+ to turn on, ?#o- to turn off, ?#o! to toggle
        • + *
        • Control both at once - ?#so+ to turn on, ?#so- to turn off, ?#so! to toggle
        • + *
        • Ugly mode can be controlled by the template
        • + * + *
        • Ugly mode is turned off when in debug
      21. + *
      22. "-" command (notes)
          + *
        • PHP does not require ending ";"
        • + *
        • PHP control blocks are automatically bracketed
        • + *
        • Switch Case statements do not end with ":" + *
        • do-while control blocks are written as "do (expression)"
      23. + * + * Comes with filters that run "out of the box": + * + plain: useful for large chunks of text to ensure Haml doesn't do anything. + * + escaped: like plain but the output is (x)html escaped. + * + preserve: like plain but preserves the whitespace. + * + cdata: wraps the content in CDATA tags. + * + javascript: wraps the content in \n"; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/filters/HamlPhpFilter.php b/_piecrust/libs/PhamlP/haml/filters/HamlPhpFilter.php new file mode 100755 index 0000000..b16abf3 --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/filters/HamlPhpFilter.php @@ -0,0 +1,27 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.filters + */ + +/** + * PHP Filter for {@link http://haml-lang.com/ Haml} class. + * The text will be parsed with the PHP interpreter. + * @package PHamlP + * @subpackage Haml.filters + */ +class HamlPhpFilter extends HamlBaseFilter { + /** + * Run the filter + * @param string text to filter + * @return string filtered text + */ + public function run($text) { + return "\n"; + } +} diff --git a/_piecrust/libs/PhamlP/haml/filters/HamlPlainFilter.php b/_piecrust/libs/PhamlP/haml/filters/HamlPlainFilter.php new file mode 100755 index 0000000..f9c3266 --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/filters/HamlPlainFilter.php @@ -0,0 +1,28 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.filters + */ + +/** + * Plain Filter for {@link http://haml-lang.com/ Haml} class. + * Does not parse the filtered text. This is useful for large blocks of text + * without HTML tags when lines are not to be parsed. + * @package PHamlP + * @subpackage Haml.filters + */ +class HamlPlainFilter extends HamlBaseFilter { + /** + * Run the filter + * @param string text to filter + * @return string filtered text + */ + public function run($text) { + return preg_replace(HamlParser::MATCH_INTERPOLATION, '', $text). "\n"; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/filters/HamlPreserveFilter.php b/_piecrust/libs/PhamlP/haml/filters/HamlPreserveFilter.php new file mode 100755 index 0000000..4e9d3ba --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/filters/HamlPreserveFilter.php @@ -0,0 +1,29 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.filters + */ + +/** + * Preserve Filter for {@link http://haml-lang.com/ Haml} class. + * Does not parse the filtered text and preserves line breaks. + * @package PHamlP + * @subpackage Haml.filters + */ +class HamlPreserveFilter extends HamlBaseFilter { + /** + * Run the filter + * @param string text to filter + * @return string filtered text + */ + public function run($text) { + return str_replace("\n", ' ', + preg_replace(HamlParser::MATCH_INTERPOLATION, '', $text) + ) . "\n"; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/filters/HamlSassFilter.php b/_piecrust/libs/PhamlP/haml/filters/HamlSassFilter.php new file mode 100755 index 0000000..95b0036 --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/filters/HamlSassFilter.php @@ -0,0 +1,37 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.filters + */ + +require_once('HamlCssFilter.php'); +require_once(dirname(__FILE__).'/../../sass/SassParser.php'); + +/** + * {@link Sass http://sass-lang.com/} Filter for + * {@link http://haml-lang.com/ Haml} class. + * Parses the text as Sass then calls the CSS filter. + * Useful for including inline Sass. + * @package PHamlP + * @subpackage Haml.filters + */ +class HamlSassFilter extends HamlBaseFilter { + /** + * Run the filter + * @param string text to filter + * @return string filtered text + */ + public function run($text) { + $sass = new SassParser(); + $css = new HamlCssFilter(); + $css->init(); + + return $css->run($sass->toCss(preg_replace(HamlParser::MATCH_INTERPOLATION, '', $text), false)); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/filters/HamlScssFilter.php b/_piecrust/libs/PhamlP/haml/filters/HamlScssFilter.php new file mode 100755 index 0000000..7c78310 --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/filters/HamlScssFilter.php @@ -0,0 +1,37 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.filters + */ + +require_once('HamlCssFilter.php'); +require_once(dirname(__FILE__).'/../../sass/SassParser.php'); + +/** + * {@link Sass http://sass-lang.com/} Filter for + * {@link http://haml-lang.com/ Haml} class. + * Parses the text as Sass then calls the CSS filter. + * Useful for including inline Sass. + * @package PHamlP + * @subpackage Haml.filters + */ +class HamlScssFilter extends HamlBaseFilter { + /** + * Run the filter + * @param string text to filter + * @return string filtered text + */ + public function run($text) { + $sass = new SassParser(array('syntax'=>'scss')); + $css = new HamlCssFilter(); + $css->init(); + + return $css->run($sass->toCss(preg_replace(HamlParser::MATCH_INTERPOLATION, '', $text), false)); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/filters/_HamlMarkdownFilter.php b/_piecrust/libs/PhamlP/haml/filters/_HamlMarkdownFilter.php new file mode 100755 index 0000000..2af5002 --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/filters/_HamlMarkdownFilter.php @@ -0,0 +1,50 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.filters + */ + +/** + * Markdown Filter for {@link http://haml-lang.com/ Haml} class. + * Parses the text with Markdown. + * + * This is an abstract class that must be extended and the init() method + * implemented to provide the vendorPath if the vendor class is not imported + * elsewhere in the application (e.g. by a framework) and vendorClass if the + * default class name is not correct. + * @package PHamlP + * @subpackage Haml.filters + */ +abstract class _HamlMarkdownFilter extends HamlBaseFilter { + /** + * @var string Path to Markdown Parser + */ + protected $vendorPath; + /** + * @var string Markdown class + * Override this value if the class name is different in your environment + */ + protected $vendorClass = 'MarkdownExtra_Parser'; + + /** + * Child classes must implement this method. + * Typically the child class will set $vendorPath and $vendorClass + */ + public function init() {} + + /** + * Run the filter + * @param string text to filter + * @return string filtered text + */ + public function run($text) { + return 'vendorPath)?'require_once "'.$this->vendorPath.'";':'').'$markdown___=new '.$this->vendorClass.'();echo $markdown___->safeTransform("'.preg_replace(HamlParser::MATCH_INTERPOLATION, '".\1."', $text).'");?>'; + } +} diff --git a/_piecrust/libs/PhamlP/haml/filters/_HamlTextileFilter.php b/_piecrust/libs/PhamlP/haml/filters/_HamlTextileFilter.php new file mode 100755 index 0000000..5bec13a --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/filters/_HamlTextileFilter.php @@ -0,0 +1,50 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.filters + */ + +/** + * Textile Filter for {@link http://haml-lang.com/ Haml} class. + * Parses the text with Textile. + * + * This is an abstract class that must be extended and the init() method + * implemented to provide the vendorPath if the vendor class is not imported + * elsewhere in the application (e.g. by a framework) and vendorClass if the + * default class name is not correct. + * @package PHamlP + * @subpackage Haml.filters + */ +abstract class _HamlTextileFilter extends HamlBaseFilter { + /** + * @var string Path to Textile Parser + */ + protected $vendorPath; + /** + * @var string Textile class + * Override this value if the class name is different in your environment + */ + protected $vendorClass = 'Textile'; + + /** + * Child classes must implement this method. + * Typically the child class will set $vendorPath and $vendorClass + */ + public function init() {} + + /** + * Run the filter + * @param string text to filter + * @return string filtered text + */ + public function run($text) { + return 'vendorPath)?'require_once "'.$this->vendorPath.'";':'').'$textile___=new '.$this->vendorClass.'();echo $textile___->TextileThis("'.preg_replace(HamlParser::MATCH_INTERPOLATION, '".\1."', $text).'");?>'; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/messages/_i18n.php b/_piecrust/libs/PhamlP/haml/messages/_i18n.php new file mode 100755 index 0000000..c878297 --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/messages/_i18n.php @@ -0,0 +1,32 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.messages + */ + return array ( + 'Attribute must be "class" or "id" with array value'=>'', + 'Illegal indentation level ({indentLevel}); indentation level can only increase by one'=>'', + 'Invalid indentation'=>'', + 'Invalid {what} ({value})'=>'', + 'Invalid {what} ({value}); must be one of "{options}"'=>'', + 'Mixed indentation not allowed'=>'', + 'No getter function for {what}'=>'', + 'No setter function for {what}'=>'', + 'Unable to find {what}: {filename}'=>'', + '{what} must extend {base} class'=>'', + ); \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/messages/de.php b/_piecrust/libs/PhamlP/haml/messages/de.php new file mode 100755 index 0000000..84f41fd --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/messages/de.php @@ -0,0 +1,32 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.messages + */ + return array ( + 'Attribute must be "class" or "id" with array value'=>'Attribute müssen "class" oder "id" mit array-wert', + 'Illegal indentation level ({indentLevel}); indentation level can only increase by one'=>'Illegale einrückungsebene ({indentLevel}); einrückungsebene kann nur von einem anstieg', + 'Invalid indentation'=>'Ungültige einrückung', + 'Invalid {what}'=>'Ungültige {what}', + 'Invalid {what} ({value}); must be one of "{options}"'=>'Ungültige {what} ({value}); muss einer der "{options}"', + 'Mixed indentation not allowed'=>'Mixed einzug nicht erlaubt', + 'No getter function for {what}'=>'Kein getter-funktion für {what}', + 'No setter function for {what}'=>'Kein setter-funktion für {what}', + 'Unable to find {what}: {filename}'=>'Kann zu finden {what}: {filename}', + '{what} must extend {base} class'=>'{what} muss {base} klasse erweitern', + ); \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/messages/fr.php b/_piecrust/libs/PhamlP/haml/messages/fr.php new file mode 100755 index 0000000..ebb0485 --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/messages/fr.php @@ -0,0 +1,32 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.messages + */ + return array ( + 'Attribute must be "class" or "id" with array value'=>"D'attributs doivent être \"class\" ou \"id\" avec valeur de array", + 'Illegal indentation level ({indentLevel}); indentation level can only increase by one: {file}::{line}'=>"Niveau niveau d'indentation illégale ({indentLevel}); ne peut augmenter d'un: {file}::{line}", + 'Invalid indentation: {line}::{file}'=>'Indentation blancs: {line}::{file}', + 'Invalid {what} ({value}): {file}::{line}'=>'Invalide {what} ({value}): {file}::{line}', + 'Invalid {what} ({value}); must be one of "{options}".'=>"Invalide {what} ({value}); doit être l'un des \"{options}\"", + 'Mixed indentation not allowed: {file}::{line}'=>'Indentation mixte pas autorisé: {file}::{line}', + 'No getter function for {what}'=>'Pas de fonction getter pour {what}', + 'No setter function for {what}'=>'Pas de fonction setter pour {what}', + 'Unable to find {what}: {filename}.'=>'Impossible de trouver {what}: {filename}.', + '{what} must extend {base} class.'=>"{what} doit s'étendre classe {base}", + ); \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/renderers/HamlCompactRenderer.php b/_piecrust/libs/PhamlP/haml/renderers/HamlCompactRenderer.php new file mode 100755 index 0000000..59d555f --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/renderers/HamlCompactRenderer.php @@ -0,0 +1,32 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.renderers + */ + +/** + * HamlCompactRenderer class. + * Renders blocks on single lines. + * @package PHamlP + * @subpackage Haml.renderers + */ +class HamlCompactRenderer extends HamlRenderer { + /** + * Renders the opening tag of an element + */ + public function renderOpeningTag($node) { + return ($node->isBlock ? '' : ' ') . parent::renderOpeningTag($node); + } + + /** + * Renders the closing tag of an element + */ + public function renderClosingTag($node) { + return parent::renderClosingTag($node) . ($node->isBlock ? "\n" : ' '); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/renderers/HamlCompressedRenderer.php b/_piecrust/libs/PhamlP/haml/renderers/HamlCompressedRenderer.php new file mode 100755 index 0000000..f9059e2 --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/renderers/HamlCompressedRenderer.php @@ -0,0 +1,48 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.renderers + */ + +/** + * HamlCompressedRenderer class. + * Output has minimal whitespace. + * @package PHamlP + * @subpackage Haml.renderers + */ +class HamlCompressedRenderer extends HamlRenderer { + /** + * Renders the opening of a comment. + * Only conditional comments are rendered + */ + public function renderOpenComment($node) { + if ($node->isConditional) return parent::renderOpenComment($node); + } + + /** + * Renders the closing of a comment. + * Only conditional comments are rendered + */ + public function renderCloseComment($node) { + if ($node->isConditional) return parent::renderCloseComment($node); + } + + /** + * Renders the opening tag of an element + */ + public function renderOpeningTag($node) { + return ($node->isBlock ? '' : ' ') . parent::renderOpeningTag($node); + } + + /** + * Renders the closing tag of an element + */ + public function renderClosingTag($node) { + return parent::renderClosingTag($node) . ($node->isBlock ? '' : ' '); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/renderers/HamlExpandedRenderer.php b/_piecrust/libs/PhamlP/haml/renderers/HamlExpandedRenderer.php new file mode 100755 index 0000000..f6849fe --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/renderers/HamlExpandedRenderer.php @@ -0,0 +1,58 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.renderers + */ + +/** + * HamlExpandedRenderer class. + * Blocks are on single lines and content indented. + * @package PHamlP + * @subpackage Haml.renderers + */ +class HamlExpandedRenderer extends HamlRenderer { + /** + * Renders the opening tag of an element + */ + public function renderOpeningTag($node) { + return parent::renderOpeningTag($node) . + ($node->whitespaceControl['inner'] ? '' : + ($node->isSelfClosing && $node->whitespaceControl['outer'] ? '' : "\n")); + } + + /** + * Renders the closing tag of an element + */ + public function renderClosingTag($node) { + return ($node->isSelfClosing ? '' : parent::renderClosingTag($node) . + ($node->whitespaceControl['outer'] ? '' : "\n")); + } + + /** + * Renders content. + * @param HamlNode the node being rendered + * @return string the rendered content + */ + public function renderContent($node) { + return self::INDENT . parent::renderContent($node) . "\n"; + } + + /** + * Renders the start of a code block + */ + public function renderStartCodeBlock($node) { + return parent::renderStartCodeBlock($node) . "\n"; + } + + /** + * Renders the end of a code block + */ + public function renderEndCodeBlock($node) { + return parent::renderEndCodeBlock($node) . "\n"; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/renderers/HamlNestedRenderer.php b/_piecrust/libs/PhamlP/haml/renderers/HamlNestedRenderer.php new file mode 100755 index 0000000..1221100 --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/renderers/HamlNestedRenderer.php @@ -0,0 +1,77 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.renderers + */ + +/** + * HamlNestedRenderer class. + * Blocks and content are indented according to their nesting level. + * @package PHamlP + * @subpackage Haml.renderers + */ +class HamlNestedRenderer extends HamlRenderer { + /** + * Renders the opening tag of an element + */ + public function renderOpeningTag($node) { + return ($node->whitespaceControl['outer'] ? '' : $this->getIndent($node)) . + parent::renderOpeningTag($node) . ($node->whitespaceControl['inner'] ? '' : + ($node->isSelfClosing && $node->whitespaceControl['outer'] ? '' : "\n")); + } + + /** + * Renders the closing tag of an element + */ + public function renderClosingTag($node) { + return ($node->isSelfClosing ? '' : ($node->whitespaceControl['inner'] ? '' : + $this->getIndent($node)) . parent::renderClosingTag($node) . + ($node->whitespaceControl['outer'] ? '' : "\n")); + } + + /** + * Renders content. + * @param HamlNode the node being rendered + * @return string the rendered content + */ + public function renderContent($node) { + return $this->getIndent($node) . parent::renderContent($node) . "\n"; + } + + /** + * Renders the opening of a comment + */ + public function renderOpenComment($node) { + return parent::renderOpenComment($node) . (empty($node->content) ? "\n" : ''); + } + + /** + * Renders the closing of a comment + */ + public function renderCloseComment($node) { + return parent::renderCloseComment($node) . "\n"; + } + + /** + * Renders the start of a code block + */ + public function renderStartCodeBlock($node) { + return $this->getIndent($node) . parent::renderStartCodeBlock($node) . "\n"; + } + + /** + * Renders the end of a code block + */ + public function renderEndCodeBlock($node) { + return $this->getIndent($node) . parent::renderEndCodeBlock($node) . "\n"; + } + + private function getIndent($node) { + return str_repeat(' ', 2 * $node->level); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/renderers/HamlRenderer.php b/_piecrust/libs/PhamlP/haml/renderers/HamlRenderer.php new file mode 100755 index 0000000..3ce06fe --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/renderers/HamlRenderer.php @@ -0,0 +1,152 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.renderers + */ + +require_once('HamlCompressedRenderer.php'); +require_once('HamlCompactRenderer.php'); +require_once('HamlExpandedRenderer.php'); +require_once('HamlNestedRenderer.php'); + +/** + * HamlRenderer class. + * Provides the most common version of each method. Child classs override + * methods to provide style specific rendering. + * @package PHamlP + * @subpackage Haml.renderers + */ +class HamlRenderer { + /**#@+ + * Output Styles + */ + const STYLE_COMPRESSED = 'compressed'; + const STYLE_COMPACT = 'compact'; + const STYLE_EXPANDED = 'expanded'; + const STYLE_NESTED = 'nested'; + /**#@-*/ + + const INDENT = ' '; + + private $format; + private $attrWrapper; + private $minimizedAttributes; + + /** + * Returns the renderer for the required render style. + * @param string render style + * @return HamlRenderer + */ + static public function getRenderer($style, $options) { + switch ($style) { + case self::STYLE_COMPACT: + return new HamlCompactRenderer($options); + case self::STYLE_COMPRESSED: + return new HamlCompressedRenderer($options); + case self::STYLE_EXPANDED: + return new HamlExpandedRenderer($options); + case self::STYLE_NESTED: + return new HamlNestedRenderer($options); + } // switch + } + + public function __construct($options) { + foreach ($options as $name => $value) { + $this->$name = $value; + } // foreach + } + + /** + * Renders element attributes + */ + private function renderAttributes($attributes) { + $output = ''; + foreach ($attributes as $name => $value) { + if (is_integer($name)) { // attribute function + $output .= " $value"; + } + elseif ($name == $value && in_array($name, $this->minimizedAttributes) && + ($this->format === 'html4' || $this->format === 'html5')) { + $output .= " $name"; + } + elseif(in_array($name, $this->minimizedAttributes)) + { + // $value is a variable, isset is called to make sure E_NOTICE is not thrown + if(preg_match("/^\\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/", trim($value))) + { + $output .= "<"."?php if(isset($value) && !empty($value)): ?"."> $name={$this->attrWrapper}<"."?php echo $value; ?".">{$this->attrWrapper};<"."?php endif; ?".">"; + } + + // $value is either a method, a constant or a ternary operator + else + { + $output .= "<"."?php if($value): ?"."> $name={$this->attrWrapper}<"."?php echo $value; ?".">{$this->attrWrapper};<"."?php endif; ?".">"; + } + } + else + { + $output .= " $name={$this->attrWrapper}$value{$this->attrWrapper}"; + } + } + return $output; + } + + /** + * Renders the opening tag of an element + */ + public function renderOpeningTag($node) { + $output = "<{$node->content}"; + $output .= $this->renderAttributes($node->attributes); + $output .= ($node->isSelfClosing ? ' /' : '') . '>'; + return $output; + } + + /** + * Renders the closing tag of an element + */ + public function renderClosingTag($node) { + return ($node->isSelfClosing ? '' : "content}>"); + } + + /** + * Renders the opening of a comment + */ + public function renderOpenComment($node) { + return ($node->isConditional ? "\n\n" : '') . "' . ($node->isConditional ? "\n" : ''); + } + + /** + * Renders the start of a code block + */ + public function renderStartCodeBlock($node) { + return $this->renderContent($node); + } + + /** + * Renders the end of a code block + */ + public function renderEndCodeBlock($node) { + return 'doWhile) ? " {$node->doWhile}" : '') . ' ?>'; + } + + /** + * Renders content. + * @param HamlNode the node being rendered + * @return string the rendered content + */ + public function renderContent($node) { + return $node->content; + } +} diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlCodeBlockNode.php b/_piecrust/libs/PhamlP/haml/tree/HamlCodeBlockNode.php new file mode 100755 index 0000000..f824f89 --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/tree/HamlCodeBlockNode.php @@ -0,0 +1,58 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.tree + */ + +require_once('HamlRootNode.php'); +require_once('HamlNodeExceptions.php'); + +/** + * HamlCodeBlockNode class. + * Represents a code block - if, elseif, else, foreach, do, and while. + * @package PHamlP + * @subpackage Haml.tree + */ +class HamlCodeBlockNode extends HamlNode { + /** + * @var HamlCodeBlockNode else nodes for if statements + */ + public $else; + /** + * @var string while clause for do-while loops + */ + public $doWhile; + + /** + * Adds an "else" statement to this node. + * @param SassIfNode "else" statement node to add + * @return SassIfNode this node + */ + public function addElse($node) { + if (is_null($this->else)) { + $node->root = $this->root; + $node->parent = $this->parent; + $this->else = $node; + } + else { + $this->else->addElse($node); + } + return $this; + } + + public function render() { + $output = $this->renderer->renderStartCodeBlock($this); + foreach ($this->children as $child) { + $output .= $child->render(); + } // foreach + $output .= (empty($this->else) ? + $this->renderer->renderEndCodeBlock($this) : $this->else->render()); + + return $this->debug($output); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlCommentNode.php b/_piecrust/libs/PhamlP/haml/tree/HamlCommentNode.php new file mode 100755 index 0000000..227ab07 --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/tree/HamlCommentNode.php @@ -0,0 +1,41 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.tree + */ + +/** + * HamlCommentNode class. + * Represents a comment, including MSIE conditional comments. + * @package PHamlP + * @subpackage Haml.tree + */ +class HamlCommentNode extends HamlNode { + private $isConditional; + + public function __construct($content, $parent) { + $this->content = $content; + $this->isConditional = (bool)preg_match('/^\[.+\]$/', $content, $matches); + $this->parent = $parent; + $this->root = $parent->root; + $parent->children[] = $this; + } + + public function getIsConditional() { + return $this->isConditional; + } + + public function render() { + $output = $this->renderer->renderOpenComment($this); + foreach ($this->children as $child) { + $output .= $child->render(); + } // foreach + $output .= $this->renderer->renderCloseComment($this); + return $this->debug($output); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlDoctypeNode.php b/_piecrust/libs/PhamlP/haml/tree/HamlDoctypeNode.php new file mode 100755 index 0000000..0fc73fd --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/tree/HamlDoctypeNode.php @@ -0,0 +1,27 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.tree + */ + +/** + * HamlDoctypeNode class. + * Represents a Doctype. + * Doctypes are always rendered on a single line with a newline. + * @package PHamlP + * @subpackage Haml.tree + */ +class HamlDoctypeNode extends HamlNode { + /** + * Render this node. + * @return string the rendered node + */ + public function render() { + return $this->debug($this->content . "\n"); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlElementNode.php b/_piecrust/libs/PhamlP/haml/tree/HamlElementNode.php new file mode 100755 index 0000000..8bf93bc --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/tree/HamlElementNode.php @@ -0,0 +1,52 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.tree + */ + +require_once('HamlRootNode.php'); +require_once('HamlNodeExceptions.php'); + +/** + * HamlElementNode class. + * Represents an element. + * @package PHamlP + * @subpackage Haml.tree + */ +class HamlElementNode extends HamlNode { + public $isBlock; + public $isSelfClosing; + public $attributes; + public $whitespaceControl; + public $escapeHTML; + + public function render() { + $renderer = $this->renderer; + $this->output = $renderer->renderOpeningTag($this); + $close = $renderer->renderClosingTag($this); + + if ($this->whitespaceControl['outer']['left']) { + $this->output = ltrim($this->output); + $close = rtrim($close); + $this->parent->output = rtrim($this->parent->output); + } + + foreach ($this->children as $index=>$child) { + $output = $child->render(); + $output = ($this->whitespaceControl['inner'] ? trim($output) : $output); + if ($index && $this->children[$index-1] instanceof HamlElementNode && $this->children[$index-1]->whitespaceControl['outer']['right']) { + $output = ltrim($output); + } + $this->output .= $output; + } // foreach + + return $this->debug($this->output . (isset($child) && + $child instanceof HamlElementNode && + $child->whitespaceControl['outer']['right'] ? ltrim($close) : $close)); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlFilterNode.php b/_piecrust/libs/PhamlP/haml/tree/HamlFilterNode.php new file mode 100755 index 0000000..36145ac --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/tree/HamlFilterNode.php @@ -0,0 +1,50 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.tree + */ + +/** + * HamlFilterNode class. + * Represent a filter in the Haml source. + * The filter is run on the output from child nodes when the node is rendered. + * @package PHamlP + * @subpackage Haml.tree + */ +class HamlFilterNode extends HamlNode { + /** + * @var HamlBaseFilter the filter to run + */ + private $filter; + + /** + * HamlFilterNode constructor. + * Sets the filter. + * @param HamlBaseFilter the filter to run + * @return HamlFilterNode + */ + public function __construct($filter, $parent) { + $this->filter = $filter; + $this->parent = $parent; + $this->root = $parent->root; + $parent->children[] = $this; + } + + /** + * Render this node. + * The filter is run on the content of child nodes before being returned. + * @return string the rendered node + */ + public function render() { + $output = ''; + foreach ($this->children as $child) { + $output .= $child->getContent(); + } // foreach + return $this->debug($this->filter->run($output)); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlHelperNode.php b/_piecrust/libs/PhamlP/haml/tree/HamlHelperNode.php new file mode 100755 index 0000000..2484589 --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/tree/HamlHelperNode.php @@ -0,0 +1,73 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.tree + */ + +/** + * HamlHelperNode class. + * Represent a helper in the Haml source. + * The helper is run on the output from child nodes when the node is rendered. + * @package PHamlP + * @subpackage Haml.tree + */ +class HamlHelperNode extends HamlNode { + const MATCH = '/(.*?)(\w+)\((.+?)\)(?:\s+(.*))?$/'; + const PRE = 1; + const NAME = 2; + const ARGS = 3; + const BLOCK = 4; + + /** + * @var string the helper class name + */ + private $class; + /** + * @var string helper method name + */ + private $pre; + /** + * @var string helper method name + */ + private $name; + /** + * @var string helper method arguments + */ + private $args; + + /** + * HamlFilterNode constructor. + * Sets the filter. + * @param string helper class. + * @param string helper call. + * @return HamlHelperNode + */ + public function __construct($class, $pre, $name, $args, $parent) { + $this->class = $class; + $this->pre = $pre; + $this->name = $name; + $this->args = $args; + $this->parent = $parent; + $this->root = $parent->root; + $parent->children[] = $this; + } + + /** + * Render this node. + * The filter is run on the content of child nodes before being returned. + * @return string the rendered node + */ + public function render() { + $children = ''; + foreach ($this->children as $child) { + $children .= trim($child->render()); + } // foreach + $output = 'pre) ? 'echo' : $this->pre)." {$this->class}::{$this->name}('$children',{$this->args}); ?>"; + return $this->debug($output); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlNode.php b/_piecrust/libs/PhamlP/haml/tree/HamlNode.php new file mode 100755 index 0000000..6e661d2 --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/tree/HamlNode.php @@ -0,0 +1,253 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.tree + */ + +require_once('HamlRootNode.php'); +require_once('HamlCommentNode.php'); +require_once('HamlDoctypeNode.php'); +require_once('HamlElementNode.php'); +require_once('HamlFilterNode.php'); +require_once('HamlHelperNode.php'); +require_once('HamlCodeBlockNode.php'); +require_once('HamlNodeExceptions.php'); + +/** + * HamlNode class. + * Base class for all Haml nodes. + * @package PHamlP + * @subpackage Haml.tree + */ +class HamlNode { + /** + * @var HamlNode root node of this node + */ + protected $root; + /** + * @var HamlNode parent of this node + */ + protected $parent; + /** + * @var array children of this node + */ + protected $children = array(); + /** + * @var array source line token + */ + public $token; + /** + * @var boolean whether to show the output in the browser for debug + */ + public $showOutput; + /** + * @var boolean whether to show the source in the browser for debug + */ + public $showSource; + /** + * @var string content to render + */ + public $content; + /** + * @var string output buffer + */ + protected $output; + /** + * @var HamlRenderer Renderer object + */ + private $_r; + /** + * @var array Options + */ + private $_o; + + public function __construct($content, $parent) { + $this->content = $content; + if (!is_null($parent)) { // $parent === null for "else" code blocks + $this->parent = $parent; + $this->root = $parent->root; + $parent->children[] = $this; + } + + } + + /** + * Getter. + * @param string name of property to get + * @return mixed return value of getter function + */ + public function __get($name) { + $getter = 'get' . ucfirst($name); + if (method_exists($this, $getter)) { + return $this->$getter(); + } + throw new HamlNodeException('No getter function for {what}', array('{what}'=>$name)); + } + + /** + * Setter. + * @param string name of property to set + * @return mixed value of property + * @return HamlNode this node + */ + public function __set($name, $value) { + $setter = 'set' . ucfirst($name); + if (method_exists($this, $setter)) { + $this->$setter($value); + return $this; + } + throw new HamlNodeException('No setter function for {what}', array('{what}'=>$name)); + } + + /** + * Return a value indicating if this node has a parent + * @return array the node's parent + */ + public function hasParent() { + return !empty($this->parent); + } + + /** + * Returns the node's content and that of its child nodes + * @param integer the indent level. This is to allow properly indented output + * that filters (e.g. Sass) may need. + * @return string the node's content and that of its child nodes + */ + public function getContent($indentLevel = 0) { + $output = str_repeat(' ', 2 * $indentLevel++) . $this->content . "\n"; + foreach ($this->children as $child) { + $output .= $child->getContent($indentLevel); + } // foreach + return $output; + } + + /** + * Returns the node's parent + * @return array the node's parent + */ + public function getParent() { + return $this->parent; + } + + /** + * Returns a value indicating if this node has children + * @return boolean true if the node has children, false if not + */ + public function hasChildren() { + return !empty($this->children); + } + + /** + * Returns the node's children + * @return array the node's children + */ + public function getChildren() { + return $this->children; + } + + /** + * Returns the last child node of this node. + * @return HamlNode the last child node of this node + */ + public function getLastChild() { + return $this->children[count($this->children) - 1]; + } + + /** + * Returns the indent level of this node. + * @return integer the indent level of this node + */ + private function getLevel() { + return $this->token['level']; + } + + /** + * Sets the indent level of this node. + * Used during rendering to give correct indentation. + * @param integer the indent level of this node + * @return HamlNode this node + */ + private function setLevel($level) { + $this->token['level'] = $level; + return $this; + } + + /** + * Returns the source for this node + * @return string the source for this node + */ + private function getSource() { + return $this->token[HamlParser::HAML_SOURCE]; + } + + /** + * Returns the source for this node + * @return string the source for this node + */ + private function getLine() { + return $this->token['line']; + } + + /** + * Returns the filename for this node + * @return string the filename for this node + */ + private function getFilename() { + return $this->token['filename']; + } + + /** + * Returns the options. + * @return array the options + */ + public function getOptions() { + if (empty($this->_o)) { + $this->_r = $this->root->options; + } + return $this->_o; + } + + /** + * Returns the renderer. + * @return HamlRenderer the rendered + */ + public function getRenderer() { + if (empty($this->_r)) { + $this->_r = $this->root->renderer; + } + return $this->_r; + } + + public function render() { + $output = $this->renderer->renderContent($this); + foreach ($this->children as $child) { + $output .= $child->render(); + } // foreach + return $this->debug($output); + } + + protected function debug($output) { + $output = ($this->showSource ? $this->showSource($output) : $output); + return ($this->showOutput && $this->line['indentLevel'] == 0 ? + nl2br(str_replace(' ', ' ', htmlspecialchars($output))) : + $output); + } + + /** + * Adds a comment with source debug information for the current line to the output. + * The debug information is: + * + source file (relative to the application path) + * + line number + * + indent level + * + source code + * @param array source line(s) that generated the ouput + */ + protected function showSource($output) { + return "\n$output"; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlNodeExceptions.php b/_piecrust/libs/PhamlP/haml/tree/HamlNodeExceptions.php new file mode 100755 index 0000000..9c0c264 --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/tree/HamlNodeExceptions.php @@ -0,0 +1,19 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.tree + */ + +require_once(dirname(__FILE__).'/../HamlException.php'); + +/** + * HamlNodeException class. + * @package PHamlP + * @subpackage Haml.tree + */ +class HamlNodeException extends HamlException {} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlRootNode.php b/_piecrust/libs/PhamlP/haml/tree/HamlRootNode.php new file mode 100755 index 0000000..02f2e1f --- /dev/null +++ b/_piecrust/libs/PhamlP/haml/tree/HamlRootNode.php @@ -0,0 +1,58 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Haml.tree + */ + +require_once(dirname(__FILE__).'/../renderers/HamlRenderer.php'); + +/** + * HamlRootNode class. + * Also the root node of a document. + * @package PHamlP + * @subpackage Haml.tree + */ +class HamlRootNode extends HamlNode { + /** + * @var HamlRenderer the renderer for this node + */ + protected $renderer; + /** + * @var array options + */ + protected $options; + + /** + * Root HamlNode constructor. + * @param array options for the tree + * @return HamlNode + */ + public function __construct($options) { + $this->root = $this; + $this->options = $options; + $this->renderer = HamlRenderer::getRenderer($this->options['style'], + array( + 'format' => $this->options['format'], + 'attrWrapper' => $this->options['attrWrapper'], + 'minimizedAttributes' => $this->options['minimizedAttributes'], + ) + ); + $this->token = array('level' => -1); + } + + /** + * Render this node. + * @return string the rendered node + */ + public function render() { + foreach ($this->children as $child) { + $this->output .= $child->render(); + } // foreach + return $this->output; + } +} diff --git a/_piecrust/libs/PhamlP/readme.txt b/_piecrust/libs/PhamlP/readme.txt new file mode 100644 index 0000000..e6f93cb --- /dev/null +++ b/_piecrust/libs/PhamlP/readme.txt @@ -0,0 +1,4 @@ + +This copy of phamlp is from https://github.com/goncaloesteves/phamlp instead of +the "official" http://code.google.com/p/phamlp/ since that last one seems to be +more or less abandoned. diff --git a/_piecrust/libs/PhamlP/sass/SassException.php b/_piecrust/libs/PhamlP/sass/SassException.php new file mode 100755 index 0000000..9c3a3d9 --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/SassException.php @@ -0,0 +1,29 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Sass + */ + +require_once(dirname(__FILE__).'/../PhamlpException.php'); + +/** + * Sass exception class. + * @package PHamlP + * @subpackage Sass + */ +class SassException extends PhamlpException { + /** + * Sass Exception. + * @param string Exception message + * @param array parameters to be applied to the message using strtr. + * @param object object with source code and meta data + */ + public function __construct($message, $params = array(), $object = null) { + parent::__construct('sass', $message, $params, $object); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/sass/SassFile.php b/_piecrust/libs/PhamlP/sass/SassFile.php new file mode 100755 index 0000000..5df7b9a --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/SassFile.php @@ -0,0 +1,167 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Sass + */ + +/** + * SassFile class. + * @package PHamlP + * @subpackage Sass + */ +class SassFile { + const SASS = 'sass'; + const SCSS = 'scss'; + const SASSC = 'sassc'; + + private static $extensions = array(self::SASS, self::SCSS); + + /** + * Returns the parse tree for a file. + * If caching is enabled a cached version will be used if possible; if not the + * parsed file will be cached. + * @param string filename to parse + * @param SassParser Sass parser + * @return SassRootNode + */ + public static function getTree($filename, $parser) { + if ($parser->cache) { + $cached = self::getCachedFile($filename, $parser->cache_location); + if ($cached !== false) { + return $cached; + } + } + + $sassParser = new SassParser(array_merge($parser->options, array('line'=>1))); + $tree = $sassParser->parse($filename); + if ($parser->cache) { + self::setCachedFile($tree, $filename, $parser->cache_location); + } + return $tree; + } + + /** + * Returns the full path to a file to parse. + * The file is looked for recursively under the load_paths directories and + * the template_location directory. + * If the filename does not end in .sass or .scss try the current syntax first + * then, if a file is not found, try the other syntax. + * @param string filename to find + * @param SassParser Sass parser + * @return string path to file + * @throws SassException if file not found + */ + public static function getFile($filename, $parser) { + $ext = substr($filename, -5); + + foreach (self::$extensions as $i=>$extension) { + if ($ext !== '.'.self::SASS && $ext !== '.'.self::SCSS) { + if ($i===0) { + $_filename = "$filename.{$parser->syntax}"; + } + else { + $_filename = $filename.'.'.($parser->syntax === self::SASS ? self::SCSS : self::SASS); + } + } + else { + $_filename = $filename; + } + + if (file_exists($_filename)) { + return $_filename; + } + + $paths = $parser->load_paths; + if(!empty($parser->filename)) + $paths[] = dirname($parser->filename); + foreach($paths as $loadPath) { + $path = self::findFile($_filename, realpath($loadPath)); + if ($path !== false) { + return $path; + } + } // foreach + + if (!empty($parser->template_location)) { + $path = self::findFile($_filename, realpath($parser->template_location)); + if ($path !== false) { + return $path; + } + } + } + + throw new SassException('Unable to find {what}: {filename}', array('{what}'=>'import file', '{filename}'=>$filename)); + } + + /** + * Looks for the file recursively in the specified directory. + * This will also look for _filename to handle Sass partials. + * @param string filename to look for + * @param string path to directory to look in and under + * @return mixed string: full path to file if found, false if not + */ + public static function findFile($filename, $dir) { + $partialname = dirname($filename).DIRECTORY_SEPARATOR.'_'.basename($filename); + + foreach (array($filename, $partialname) as $file) { + if (file_exists($dir . DIRECTORY_SEPARATOR . $file)) { + return realpath($dir . DIRECTORY_SEPARATOR . $file); + } + } + + $files = array_slice(scandir($dir), 2); + + foreach ($files as $file) { + if (is_dir($dir . DIRECTORY_SEPARATOR . $file)) { + $path = self::findFile($filename, $dir . DIRECTORY_SEPARATOR . $file); + if ($path !== false) { + return $path; + } + } + } // foreach + return false; + } + + /** + * Returns a cached version of the file if available. + * @param string filename to fetch + * @param string path to cache location + * @return mixed the cached file if available or false if it is not + */ + public static function getCachedFile($filename, $cacheLocation) { + $cached = realpath($cacheLocation) . DIRECTORY_SEPARATOR . + md5($filename) . '.'.self::SASSC; + + if ($cached && file_exists($cached) && + filemtime($cached) >= filemtime($filename)) { + return unserialize(file_get_contents($cached)); + } + return false; + } + + /** + * Saves a cached version of the file. + * @param SassRootNode Sass tree to save + * @param string filename to save + * @param string path to cache location + * @return mixed the cached file if available or false if it is not + */ + public static function setCachedFile($sassc, $filename, $cacheLocation) { + $cacheDir = realpath($cacheLocation); + + if (!$cacheDir) { + mkdir($cacheLocation); + @chmod($cacheLocation, 0777); + $cacheDir = realpath($cacheLocation); + } + + $cached = $cacheDir . DIRECTORY_SEPARATOR . md5($filename) . '.'.self::SASSC; + + return file_put_contents($cached, serialize($sassc)); + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/sass/SassParser.php b/_piecrust/libs/PhamlP/sass/SassParser.php new file mode 100755 index 0000000..03060f6 --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/SassParser.php @@ -0,0 +1,849 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Sass + */ + +require_once('SassFile.php'); +require_once('SassException.php'); +require_once('tree/SassNode.php'); + +/** + * SassParser class. + * Parses {@link http://sass-lang.com/ .sass and .sccs} files. + * @package PHamlP + * @subpackage Sass + */ +class SassParser { + /**#@+ + * Default option values + */ + const CACHE = true; + const CACHE_LOCATION = './sass-cache'; + const CSS_LOCATION = './css'; + const TEMPLATE_LOCATION = './sass-templates'; + const BEGIN_COMMENT = '/'; + const BEGIN_CSS_COMMENT = '/*'; + const END_CSS_COMMENT = '*/'; + const BEGIN_SASS_COMMENT= '//'; + const BEGIN_INTERPOLATION = '#'; + const BEGIN_INTERPOLATION_BLOCK = '#{'; + const BEGIN_BLOCK = '{'; + const END_BLOCK = '}'; + const END_STATEMENT = ';'; + const DOUBLE_QUOTE = '"'; + const SINGLE_QUOTE = "'"; + + /** + * @var string the character used for indenting + * @see indentChars + * @see indentSpaces + */ + private $indentChar; + /** + * @var array allowable characters for indenting + */ + private $indentChars = array(' ', "\t"); + /** + * @var integer number of spaces for indentation. + * Used to calculate {@link Level} if {@link indentChar} is space. + */ + private $indentSpaces = 2; + + /** + * @var string source + */ + private $source; + + /**#@+ + * Option + */ + /** + * cache: + * @var boolean Whether parsed Sass files should be cached, allowing greater + * speed. + * + * Defaults to true. + */ + private $cache; + + /** + * cache_location: + * @var string The path where the cached sassc files should be written to. + * + * Defaults to './sass-cache'. + */ + private $cache_location; + + /** + * css_location: + * @var string The path where CSS output should be written to. + * + * Defaults to './css'. + */ + private $css_location; + + /** + * debug_info: + * @var boolean When true the line number and file where a selector is defined + * is emitted into the compiled CSS in a format that can be understood by the + * {@link https://addons.mozilla.org/en-US/firefox/addon/103988/ + * FireSass Firebug extension}. + * Disabled when using the compressed output style. + * + * Defaults to false. + * @see style + */ + private $debug_info; + + /** + * extensions: + * @var array Sass extensions, e.g. Compass. An associative array of the form + * $name => $options where $name is the name of the extension and $options + * is an array of name=>value options pairs. + */ + protected $extensions; + + /** + * filename: + * @var string The filename of the file being rendered. + * This is used solely for reporting errors. + */ + protected $filename; + + /** + * function_paths: + * @var array An array of filesystem paths which should be searched for + * SassScript functions. + */ + private $function_paths; + + /** + * line: + * @var integer The number of the first line of the Sass template. Used for + * reporting line numbers for errors. This is useful to set if the Sass + * template is embedded. + * + * Defaults to 1. + */ + private $line; + + /** + * line_numbers: + * @var boolean When true the line number and filename where a selector is + * defined is emitted into the compiled CSS as a comment. Useful for debugging + * especially when using imports and mixins. + * Disabled when using the compressed output style or the debug_info option. + * + * Defaults to false. + * @see debug_info + * @see style + */ + private $line_numbers; + + /** + * load_paths: + * @var array An array of filesystem paths which should be searched for + * Sass templates imported with the @import directive. + * + * Defaults to './sass-templates'. + */ + private $load_paths; + + /** + * property_syntax: + * @var string Forces the document to use one syntax for + * properties. If the correct syntax isn't used, an error is thrown. + * Value can be: + * + new - forces the use of a colon or equals sign after the property name. + * For example color: #0f3 or width: $main_width. + * + old - forces the use of a colon before the property name. + * For example: :color #0f3 or :width = $main_width. + * + * By default, either syntax is valid. + * + * Ignored for SCSS files which alaways use the new style. + */ + private $property_syntax; + + /** + * quiet: + * @var boolean When set to true, causes warnings to be disabled. + * Defaults to false. + */ + private $quiet; + + /** + * style: + * @var string the style of the CSS output. + * Value can be: + * + nested - Nested is the default Sass style, because it reflects the + * structure of the document in much the same way Sass does. Each selector + * and rule has its own line with indentation is based on how deeply the rule + * is nested. Nested style is very useful when looking at large CSS files as + * it allows you to very easily grasp the structure of the file without + * actually reading anything. + * + expanded - Expanded is the typical human-made CSS style, with each selector + * and property taking up one line. Selectors are not indented; properties are + * indented within the rules. + * + compact - Each CSS rule takes up only one line, with every property defined + * on that line. Nested rules are placed with each other while groups of rules + * are separated by a blank line. + * + compressed - Compressed has no whitespace except that necessary to separate + * selectors and properties. It's not meant to be human-readable. + * + * Defaults to 'nested'. + */ + private $style; + + /** + * syntax: + * @var string The syntax of the input file. + * 'sass' for the indented syntax and 'scss' for the CSS-extension syntax. + * + * This is set automatically when parsing a file, else defaults to 'sass'. + */ + private $syntax; + + /** + * template_location: + * @var string Path to the root sass template directory for your + * application. + */ + private $template_location; + + /** + * vendor_properties: + * If enabled a property need only be written in the standard form and vendor + * specific versions will be added to the style sheet. + * @var mixed array: vendor properties, merged with the built-in vendor + * properties, to automatically apply. + * Boolean true: use built in vendor properties. + * + * Defaults to vendor_properties disabled. + * @see _vendorProperties + */ + private $vendor_properties = array(); + + /**#@-*/ + /** + * Defines the build-in vendor properties + * @var array built-in vendor properties + * @see vendor_properties + */ + private $_vendorProperties = array( + 'border-radius' => array( + '-moz-border-radius', + '-webkit-border-radius', + '-khtml-border-radius' + ), + 'border-top-right-radius' => array( + '-moz-border-radius-topright', + '-webkit-border-top-right-radius', + '-khtml-border-top-right-radius' + ), + 'border-bottom-right-radius' => array( + '-moz-border-radius-bottomright', + '-webkit-border-bottom-right-radius', + '-khtml-border-bottom-right-radius' + ), + 'border-bottom-left-radius' => array( + '-moz-border-radius-bottomleft', + '-webkit-border-bottom-left-radius', + '-khtml-border-bottom-left-radius' + ), + 'border-top-left-radius' => array( + '-moz-border-radius-topleft', + '-webkit-border-top-left-radius', + '-khtml-border-top-left-radius' + ), + 'box-shadow' => array('-moz-box-shadow', '-webkit-box-shadow'), + 'box-sizing' => array('-moz-box-sizing', '-webkit-box-sizing'), + 'opacity' => array('-moz-opacity', '-webkit-opacity', '-khtml-opacity'), + ); + + /** + * Constructor. + * Sets parser options + * @param array $options + * @return SassParser + */ + public function __construct($options = array()) { + if (!is_array($options)) { + throw new SassException('{what} must be a {type}', array('{what}'=>'options', '{type}'=>'array')); + } + if (!empty($options['language'])) { + Phamlp::$language = $options['language']; + } + + if (!empty($options['extensions'])) { + foreach ($options['extensions'] as $extension=>$extOptions) { + include dirname(__FILE__).DIRECTORY_SEPARATOR.'extensions'.DIRECTORY_SEPARATOR.$extension.DIRECTORY_SEPARATOR.'config.php'; + $configClass = 'SassExtentions'.$extension.'Config'; + $config = new $configClass; + $config->config($extOptions); + + $lp = dirname(__FILE__).DIRECTORY_SEPARATOR.'extensions'.DIRECTORY_SEPARATOR.$extension.DIRECTORY_SEPARATOR.'frameworks'; + $fp = dirname(__FILE__).DIRECTORY_SEPARATOR.'extensions'.DIRECTORY_SEPARATOR.$extension.DIRECTORY_SEPARATOR.'functions'; + $options['load_paths'] = (empty($options['load_paths']) ? + array($lp) : array_merge($options['load_paths'], $lp)); + $options['function_paths'] = (empty($options['function_paths']) ? + array($fp) : array_merge($options['function_paths'], $fp)); + } + } + + if (!empty($options['vendor_properties'])) { + if ($options['vendor_properties'] === true) { + $this->vendor_properties = $this->_vendorProperties; + } + elseif (is_array($options['vendor_properties'])) { + $this->vendor_properties = array_merge($this->_vendorProperties, $options['vendor_properties']); + } + } + unset($options['language'], $options['vendor_properties']); + + $defaultOptions = array( + 'cache' => self::CACHE, + 'cache_location' => dirname(__FILE__) . DIRECTORY_SEPARATOR . self::CACHE_LOCATION, + 'css_location' => dirname(__FILE__) . DIRECTORY_SEPARATOR . self::CSS_LOCATION, + 'debug_info' => false, + 'filename' => array('dirname' => '', 'basename' => ''), + 'function_paths' => array(), + 'load_paths' => array(dirname(__FILE__) . DIRECTORY_SEPARATOR . self::TEMPLATE_LOCATION), + 'line' => 1, + 'line_numbers' => false, + 'style' => SassRenderer::STYLE_NESTED, + 'syntax' => SassFile::SASS + ); + + foreach (array_merge($defaultOptions, $options) as $name=>$value) { + if (property_exists($this, $name)) { + $this->$name = $value; + } + } + } + + /** + * Getter. + * @param string name of property to get + * @return mixed return value of getter function + */ + public function __get($name) { + $getter = 'get' . ucfirst($name); + if (method_exists($this, $getter)) { + return $this->$getter(); + } + throw new SassException('No getter function for {what}', array('{what}'=>$name)); + } + + public function getCache() { + return $this->cache; + } + + public function getCache_location() { + return $this->cache_location; + } + + public function getCss_location() { + return $this->css_location; + } + + public function getDebug_info() { + return $this->debug_info; + } + + public function getFilename() { + return $this->filename; + } + + public function getLine() { + return $this->line; + } + + public function getSource() { + return $this->source; + } + + public function getLine_numbers() { + return $this->line_numbers; + } + + public function getFunction_paths() { + return $this->function_paths; + } + + public function getLoad_paths() { + return $this->load_paths; + } + + public function getProperty_syntax() { + return $this->property_syntax; + } + + public function getQuiet() { + return $this->quiet; + } + + public function getStyle() { + return $this->style; + } + + public function getSyntax() { + return $this->syntax; + } + + public function getTemplate_location() { + return $this->template_location; + } + + public function getVendor_properties() { + return $this->vendor_properties; + } + + public function getOptions() { + return array( + 'cache' => $this->cache, + 'cache_location' => $this->cache_location, + 'css_location' => $this->css_location, + 'filename' => $this->filename, + 'function_paths' => $this->function_paths, + 'line' => $this->line, + 'line_numbers' => $this->line_numbers, + 'load_paths' => $this->load_paths, + 'property_syntax' => $this->property_syntax, + 'quiet' => $this->quiet, + 'style' => $this->style, + 'syntax' => $this->syntax, + 'template_location' => $this->template_location, + 'vendor_properties' => $this->vendor_properties + ); + } + + /** + * Parse a sass file or Sass source code and returns the CSS. + * @param string name of source file or Sass source + * @return string CSS + */ + public function toCss($source, $isFile = true) { + return $this->parse($source, $isFile)->render(); + } + + /** + * Parse a sass file or Sass source code and + * returns the document tree that can then be rendered. + * The file will be searched for in the directories specified by the + * load_paths option. + * If caching is enabled a cached version will be used if possible or the + * compiled version cached if not. + * @param string name of source file or Sass source + * @return SassRootNode Root node of document tree + */ + public function parse($source, $isFile = true) { + if ($isFile) { + $this->filename = SassFile::getFile($source, $this); + + if ($isFile) { + $this->syntax = substr($this->filename, -4); + } + elseif ($this->syntax !== SassFile::SASS && $this->syntax !== SassFile::SCSS) { + throw new SassException('Invalid {what}', array('{what}'=>'syntax option')); + } + + if ($this->cache) { + $cached = SassFile::getCachedFile($this->filename, $this->cache_location); + if ($cached !== false) { + return $cached; + } + } + + $tree = $this->toTree(file_get_contents($this->filename)); + + if ($this->cache) { + SassFile::setCachedFile($tree, $this->filename, $this->cache_location); + } + + return $tree; + } + else { + return $this->toTree($source); + } + } + + /** + * Parse Sass source into a document tree. + * If the tree is already created return that. + * @param string Sass source + * @return SassRootNode the root of this document tree + */ + private function toTree($source) { + if ($this->syntax === SassFile::SASS) { + $source = str_replace(array("\r\n", "\n\r", "\r"), "\n", $source); + $this->source = explode("\n", $source); + $this->setIndentChar(); + } + else { + $this->source = $source; + } + unset($source); + $root = new SassRootNode($this); + $this->buildTree($root); + return $root; + } + + /** + * Builds a parse tree under the parent node. + * Called recursivly until the source is parsed. + * @param SassNode the node + */ + private function buildTree($parent) { + $node = $this->getNode($parent); + while (is_object($node) && $node->isChildOf($parent)) { + $parent->addChild($node); + $node = $this->buildTree($node); + } + return $node; + } + + /** + * Creates and returns the next SassNode. + * The tpye of SassNode depends on the content of the SassToken. + * @return SassNode a SassNode of the appropriate type. Null when no more + * source to parse. + */ + private function getNode($node) { + $token = $this->getToken(); + if (empty($token)) return null; + switch (true) { + case SassDirectiveNode::isa($token): + return $this->parseDirective($token, $node); + break; + case SassCommentNode::isa($token): + return new SassCommentNode($token); + break; + case SassVariableNode::isa($token): + return new SassVariableNode($token); + break; + case SassPropertyNode::isa(array('token' => $token, 'syntax' => $this->property_syntax)): + return new SassPropertyNode($token, $this->property_syntax); + break; + case SassMixinDefinitionNode::isa($token): + if ($this->syntax === SassFile::SCSS) { + throw new SassException('Mixin {which} shortcut not allowed in SCSS', array('{which}'=>'definition'), $this); + } + return new SassMixinDefinitionNode($token); + break; + case SassMixinNode::isa($token): + if ($this->syntax === SassFile::SCSS) { + throw new SassException('Mixin {which} shortcut not allowed in SCSS', array('{which}'=>'include'), $this); + } + return new SassMixinNode($token); + break; + default: + return new SassRuleNode($token); + break; + } // switch + } + + /** + * Returns a token object that contains the next source statement and + * meta data about it. + * @return object + */ + private function getToken() { + return ($this->syntax === SassFile::SASS ? $this->sass2Token() : $this->scss2Token()); + } + + /** + * Returns an object that contains the next source statement and meta data + * about it from SASS source. + * Sass statements are passed over. Statements spanning multiple lines, e.g. + * CSS comments and selectors, are assembled into a single statement. + * @return object Statement token. Null if end of source. + */ + private function sass2Token() { + $statement = ''; // source line being tokenised + $token = null; + + while (is_null($token) && !empty($this->source)) { + while (empty($statement) && !empty($this->source)) { + $source = array_shift($this->source); + $statement = trim($source); + $this->line++; + } + + if (empty($statement)) { + break; + } + + $level = $this->getLevel($source); + + // Comment statements can span multiple lines + if ($statement[0] === self::BEGIN_COMMENT) { + // Consume Sass comments + if (substr($statement, 0, strlen(self::BEGIN_SASS_COMMENT)) + === self::BEGIN_SASS_COMMENT) { + unset($statement); + while($this->getLevel($this->source[0]) > $level) { + array_shift($this->source); + $this->line++; + } + continue; + } + // Build CSS comments + elseif (substr($statement, 0, strlen(self::BEGIN_CSS_COMMENT)) + === self::BEGIN_CSS_COMMENT) { + while($this->getLevel($this->source[0]) > $level) { + $statement .= "\n" . ltrim(array_shift($this->source)); + $this->line++; + } + } + else { + $this->source = $statement; + throw new SassException('Illegal comment type', array(), $this); + } + } + // Selector statements can span multiple lines + elseif (substr($statement, -1) === SassRuleNode::CONTINUED) { + // Build the selector statement + while($this->getLevel($this->source[0]) === $level) { + $statement .= ltrim(array_shift($this->source)); + $this->line++; + } + } + + $token = (object) array( + 'source' => $statement, + 'level' => $level, + 'filename' => $this->filename, + 'line' => $this->line - 1, + ); + } + return $token; + } + + /** + * Returns the level of the line. + * Used for .sass source + * @param string the source + * @return integer the level of the source + * @throws Exception if the source indentation is invalid + */ + private function getLevel($source) { + $indent = strlen($source) - strlen(ltrim($source)); + $level = $indent/$this->indentSpaces; + if (!is_int($level) || + preg_match("/[^{$this->indentChar}]/", substr($source, 0, $indent))) { + $this->source = $source; + throw new SassException('Invalid indentation', array(), $this); + } + return $level; + } + + /** + * Returns an object that contains the next source statement and meta data + * about it from SCSS source. + * @return object Statement token. Null if end of source. + */ + private function scss2Token() { + static $srcpos = 0; // current position in the source stream + static $srclen; // the length of the source stream + + $statement = ''; + $token = null; + if (empty($srclen)) { + $srclen = strlen($this->source); + } + while (is_null($token) && $srcpos < $srclen) { + $c = $this->source[$srcpos++]; + switch ($c) { + case self::BEGIN_COMMENT: + if (substr($this->source, $srcpos-1, strlen(self::BEGIN_SASS_COMMENT)) + === self::BEGIN_SASS_COMMENT) { + while ($this->source[$srcpos++] !== "\n"); + $statement .= "\n"; + } + elseif (substr($this->source, $srcpos-1, strlen(self::BEGIN_CSS_COMMENT)) + === self::BEGIN_CSS_COMMENT) { + if (ltrim($statement)) { + throw new SassException('Invalid {what}', array('{what}'=>'comment'), (object) array( + 'source' => $statement, + 'filename' => $this->filename, + 'line' => $this->line, + )); + } + $statement .= $c.$this->source[$srcpos++]; + while (substr($this->source, $srcpos, strlen(self::END_CSS_COMMENT)) + !== self::END_CSS_COMMENT) { + $statement .= $this->source[$srcpos++]; + } + $srcpos += strlen(self::END_CSS_COMMENT); + $token = $this->createToken($statement.self::END_CSS_COMMENT); + } + else { + $statement .= $c; + } + break; + case self::DOUBLE_QUOTE: + case self::SINGLE_QUOTE: + $statement .= $c; + while ($this->source[$srcpos] !== $c) { + $statement .= $this->source[$srcpos++]; + } + $statement .= $this->source[$srcpos++]; + break; + case self::BEGIN_INTERPOLATION: + $statement .= $c; + if (substr($this->source, $srcpos-1, strlen(self::BEGIN_INTERPOLATION_BLOCK)) + === self::BEGIN_INTERPOLATION_BLOCK) { + while ($this->source[$srcpos] !== self::END_BLOCK) { + $statement .= $this->source[$srcpos++]; + } + $statement .= $this->source[$srcpos++]; + } + break; + case self::BEGIN_BLOCK: + case self::END_BLOCK: + case self::END_STATEMENT: + $token = $this->createToken($statement . $c); + if (is_null($token)) $statement = ''; + break; + default: + $statement .= $c; + break; + } + } + + if (is_null($token)) + $srclen = $srcpos = 0; + + return $token; + } + + /** + * Returns an object that contains the source statement and meta data about + * it. + * If the statement is just and end block we update the meta data and return null. + * @param string source statement + * @return SassToken + */ + private function createToken($statement) { + static $level = 0; + + $this->line += substr_count($statement, "\n"); + $statement = trim($statement); + if (substr($statement, 0, strlen(self::BEGIN_CSS_COMMENT)) !== self::BEGIN_CSS_COMMENT) { + $statement = str_replace(array("\n","\r"), '', $statement); + } + $last = substr($statement, -1); + // Trim the statement removing whitespace, end statement (;), begin block ({), and (unless the statement ends in an interpolation block) end block (}) + $statement = rtrim($statement, ' '.self::BEGIN_BLOCK.self::END_STATEMENT); + $statement = (preg_match('/#\{.+?\}$/i', $statement) ? $statement : rtrim($statement, self::END_BLOCK)); + $token = ($statement ? (object) array( + 'source' => $statement, + 'level' => $level, + 'filename' => $this->filename, + 'line' => $this->line, + ) : null); + $level += ($last === self::BEGIN_BLOCK ? 1 : ($last === self::END_BLOCK ? -1 : 0)); + return $token; + } + + /** + * Parses a directive + * @param SassToken token to parse + * @param SassNode parent node + * @return SassNode a Sass directive node + */ + private function parseDirective($token, $parent) { + switch (SassDirectiveNode::extractDirective($token)) { + case '@extend': + return new SassExtendNode($token); + break; + case '@mixin': + return new SassMixinDefinitionNode($token); + break; + case '@include': + return new SassMixinNode($token); + break; + case '@import': + if ($this->syntax == SassFile::SASS) { + $i = 0; + $source = ''; + while (!empty($this->source) && empty($source)) { + $source = $this->source[$i++]; + } + if (!empty($source) && $this->getLevel($source) > $token->level) { + throw new SassException('Nesting not allowed beneath {what}', array('{what}'=>'@import directive'), $token); + } + } + return new SassImportNode($token); + break; + case '@for': + return new SassForNode($token); + break; + case '@if': + return new SassIfNode($token); + break; + case '@else': // handles else and else if directives + return new SassElseNode($token); + break; + case '@do': + case '@while': + return new SassWhileNode($token); + break; + case '@debug': + return new SassDebugNode($token); + break; + case '@warn': + return new SassDebugNode($token, true); + break; + default: + return new SassDirectiveNode($token); + break; + } + } + + /** + * Determine the indent character and indent spaces. + * The first character of the first indented line determines the character. + * If this is a space the number of spaces determines the indentSpaces; this + * is always 1 if the indent character is a tab. + * Only used for .sass files. + * @throws SassException if the indent is mixed or + * the indent character can not be determined + */ + private function setIndentChar() { + foreach ($this->source as $l=>$source) { + if (!empty($source) && in_array($source[0], $this->indentChars)) { + $this->indentChar = $source[0]; + for ($i = 0, $len = strlen($source); $i < $len && $source[$i] == $this->indentChar; $i++); + if ($i < $len && in_array($source[$i], $this->indentChars)) { + $this->line = ++$l; + $this->source = $source; + throw new SassException('Mixed indentation not allowed', array(), $this); + } + $this->indentSpaces = ($this->indentChar == ' ' ? $i : 1); + return; + } + } // foreach + $this->indentChar = ' '; + $this->indentSpaces = 2; + } +} diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/config.php b/_piecrust/libs/PhamlP/sass/extensions/compass/config.php new file mode 100755 index 0000000..0ae79f1 --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/config.php @@ -0,0 +1,65 @@ + + * @copyright Copyright (c) 2010 PBM Web Development + * @license http://phamlp.googlecode.com/files/license.txt + * @package PHamlP + * @subpackage Sass.extensions.compass + */ + +/** + * Compass extension configuration class. + * @package PHamlP + * @subpackage Sass.extensions.compass + */ +class SassExtentionsCompassConfig { + public static $config; + private static $defaultConfig = array( + 'project_path' => '', + 'http_path' => '/', + 'css_dir' => 'css', + 'css_path' => '', + 'http_css_path' => '', + 'fonts_dir' => 'fonts', + 'fonts_path' => '', + 'http_fonts_path' => '', + 'images_dir' => 'images', + 'images_path' => '', + 'http_images_path' => '', + 'javascripts_dir' => 'javascripts', + 'javascripts_path' => '', + 'http_javascripts_path' => '', + 'relative_assets' => true, + ); + + /** + * Sets configuration settings or returns a configuration setting. + * @param mixed array: configuration settings; string: configuration setting to return + * @return string configuration setting. Null if setting does not exist. + */ + public function config($config) { + if (is_array($config)) { + self::$config = array_merge(self::$defaultConfig, $config); + self::setDefaults(); + } + elseif (is_string($config) && isset(self::$config[$config])) { + return self::$config[$config]; + } + } + + /** + * Sets default values for paths not specified + */ + private static function setDefaults() { + foreach (array('css', 'images', 'fonts', 'javascripts') as $asset) { + if (empty(self::$config[$asset.'_path'])) { + self::$config[$asset.'_path'] = self::$config['project_path'].DIRECTORY_SEPARATOR.self::$config[$asset.'_dir']; + } + if (empty(self::$config['http_'.$asset.'_path'])) { + self::$config['http_'.$asset.'_path'] = self::$config['http_path'].self::$config[$asset.'_dir']; + } + } + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/_blueprint.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/_blueprint.scss new file mode 100755 index 0000000..067f84e --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/_blueprint.scss @@ -0,0 +1,47 @@ +@import "blueprint/colors"; +@import "blueprint/grid"; +@import "blueprint/typography"; +@import "blueprint/utilities"; +@import "blueprint/form"; +@import "blueprint/interaction"; +@import "blueprint/debug"; +@import "blueprint/print"; +@import "blueprint/ie"; + +// ### Usage examples: +// +// As a top-level mixin, apply to any page that includes the stylesheet: +//
        +// +blueprint
        +// 
        +// +// Scoped by a presentational class: +//
        +// body.blueprint
        +//   +blueprint(true)
        +// 
        +// +// Scoped by semantic selectors: +//
        +// body#page-1, body#page-2, body.a-special-page-type
        +//   +blueprint(true)
        +// 
        +// +// #### Deprecated: +// You use to be able to pass the body selector as the first argument when used as a top-level mixin +//
        +// +blueprint("body#page-1, body#page-2, body.a-special-page-type")
        +// 
        + +@mixin blueprint($body_selector: body) { + //@doc off + @if not ($body_selector == "body" or $body_selector == true) { + @warn "[DEPRECATED] To specify a the selector \"#{$body_selector}\" to +blueprint, pass true as the first argument and mix it into #{$body_selector}."; } + //@doc on + @include blueprint-typography($body_selector); + @include blueprint-utilities; + @include blueprint-grid; + @include blueprint-debug; + @include blueprint-interaction; + @include blueprint-form; +} diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_buttons.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_buttons.scss new file mode 100755 index 0000000..14af822 --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_buttons.scss @@ -0,0 +1,101 @@ +@import "compass/css3/inline-block"; +@import "compass/utilities/general/float"; + +// Button Font +$blueprint_button_font_family: unquote('"Lucida Grande", Tahoma, Arial, Verdana, sans-serif') !default; + +// Default Button Colors +$blueprint_button_border_color: #dedede !default; +$blueprint_button_background_color: #f5f5f5 !default; +$blueprint_button_font_color: #565656 !default; + +// Default Button Hover Colors +$blueprint_button_hover_border_color: #c2e1ef !default; +$blueprint_button_hover_background_color: #dff4ff !default; +$blueprint_button_hover_font_color: #336699 !default; + +// Default Button Active Colors +$blueprint_button_active_border_color: #6299c5 !default; +$blueprint_button_active_background_color: #6299c5 !default; +$blueprint_button_active_font_color: white !default; + +//** +// Sets the colors for a button +// @param border_highlight_color +// The highlight color defaults to whatever is the value of the border_color but it's one shade lighter. +@mixin button-colors( + $font_color: $blueprint_button_font_color, + $bg_color: $blueprint_button_background_color, + $border_color: $blueprint_button_border_color, + $border_highlight_color: $border_color + #101010 +) { + background-color: $bg_color; + border-color: $border_highlight_color $border_color $border_color $border_highlight_color; + color: $font_color; +} + +//** +// Sets the colors for a button in the active state +// @param border_highlight_color +// The highlight color defaults to whatever is the value of the border_color but it's one shade lighter. +@mixin button-active-colors( + $font_color: $blueprint_button_active_font_color, + $bg_color: $blueprint_button_active_background_color, + $border_color: $blueprint_button_active_border_color, + $border_highlight_color: $border_color + #101010 +) { + &:active { + @include button-colors($font_color, $bg_color, $border_color, $border_highlight_color); + } +} + +//** +// Sets the colors for a button in the hover state. +// @param border_highlight_color +// The highlight color defaults to whatever is the value of the border_color but it's one shade lighter. +@mixin button-hover-colors( + $font_color: $blueprint_button_hover_font_color, + $bg_color: $blueprint_button_hover_background_color, + $border_color: $blueprint_button_hover_border_color, + $border_highlight_color: $border_color + #101010 +) { + &:hover { + @include button-colors($font_color, $bg_color, $border_color, $border_highlight_color); + } +} + +@mixin button-base($float: false) { + @if $float { @include float($float); display: block; } + @else { @include inline-block; } + margin: 0.7em 0.5em 0.7em 0; + border-width: 1px; border-style: solid; + font-family: $blueprint_button_font_family; font-size: 100%; line-height: 130%; font-weight: bold; + text-decoration: none; + cursor: pointer; + img { + margin: 0 3px -3px 0 !important; + padding: 0; + border: none; + width: 16px; + height: 16px; + float: none; + } +} + +@mixin anchor-button($float: false) { + @include button-base($float); + padding: 5px 10px 5px 7px; +} + +@mixin button-button($float: false) { + @include button-base($float); + width: auto; + overflow: visible; + padding: 4px 10px 3px 7px; + &[type] { + padding: 4px 10px 4px 7px; + line-height: 17px; } + *:first-child+html &[type] { + padding: 4px 10px 3px 7px; + } +} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_colors.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_colors.scss new file mode 100755 index 0000000..6817a2d --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_colors.scss @@ -0,0 +1,32 @@ +$font_color: #333333 !default; +$quiet_color: $font_color + #333333 !default; +$loud_color: $font_color - #222222 !default; +$header_color: $font_color - #111111 !default; +$alt_text_color: #666666 !default; +$blueprint_background_color: #eeeeee !default; + +$link_color: #000099 !default; +$link_hover_color: black !default; +$link_focus_color: $link_hover_color !default; +$link_active_color: $link_color + #cc0000 !default; +$link_visited_color: $link_color - #333333 !default; + +$feedback_border_color: #dddddd !default; +$success_color: #264409 !default; +$success_bg_color: #e6efc2 !default; +$success_border_color: #c6d880 !default; +$notice_color: #514721 !default; +$notice_bg_color: #fff6bf !default; +$notice_border_color: #ffd324 !default; +$error_color: #8a1f11 !default; +$error_bg_color: #fbe3e4 !default; +$error_border_color: #fbc2c4 !default; + +$highlight_color: yellow !default; +$added_color: white !default; +$added_bg_color: #006600 !default; +$removed_color: white !default; +$removed_bg_color: #990000 !default; + +$blueprint_table_header_color: #c3d9ff !default; +$blueprint_table_stripe_color: #e5ecf9 !default; diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_debug.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_debug.scss new file mode 100755 index 0000000..b37a89c --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_debug.scss @@ -0,0 +1,11 @@ +@mixin showgrid($image: "grid.png") { + background: image_url($image); +} + +@mixin blueprint-debug($grid_image: unquote("grid.png")) { + // Use this class on any column or container to see the grid. + // TODO: prefix this with the project path. + .showgrid { + @include showgrid($grid_image); + } +} diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_fancy-type.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_fancy-type.scss new file mode 100755 index 0000000..b6bf33c --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_fancy-type.scss @@ -0,0 +1,86 @@ +@import "typography"; + +$alternate-text-font : "Warnock Pro", "Goudy Old Style", "Palatino", "Book Antiqua", Georgia, serif !default; +// To install the fancy type plugin: +// 1. import the fancy_type module: @import blueprint/fancy_type +// 2. mixin +fancy-type to your project's body or at the top level of your stylesheet: +// body +// +fancy-type + +@mixin fancy-type { + @include fancy-paragraphs; + .caps { @include caps; } + .dquo { @include dquo; } + .alt { @include alt; } +} + +// Indentation instead of line shifts for sibling paragraphs. Mixin to a style like p + p +@mixin sibling-indentation { + text-indent: 2em; + margin-top: -1.5em; + /* Don't want this in forms. */ + form & { text-indent: 0; } +} + +// For great looking type, use this code instead of asdf: +// asdf +// Best used on prepositions and ampersands. + +@mixin alt { + color: $alt-text-color; + font-family: $alternate-text-font; + font-style: italic; + font-weight: normal; +} + +// For great looking quote marks in titles, replace "asdf" with: +// asdf” +// (That is, when the title starts with a quote mark). +// (You may have to change this value depending on your font size). + +@mixin dquo($offset: 0.5em) { + margin-left: -$offset; +} + +// Reduced size type with incremental leading +// (http://www.markboulton.co.uk/journal/comments/incremental_leading/) +// +// This could be used for side notes. For smaller type, you don't necessarily want to +// follow the 1.5x vertical rhythm -- the line-height is too much. +// +// Using this mixin, reduces your font size and line-height so that for +// every four lines of normal sized type, there is five lines of the sidenote. eg: +// +// Arguments: +// `$font-size` - The desired font size in pixels. This will be converted to ems for you. Defaults to 10px. +// `$base-font-size` - The base font size in pixels. Defaults to 12px +// `$old-line-height` - The old line height. Defaults to 1.5 times the base-font-size + +@mixin incr( + $font-size: 10px, + $base-font-size: $blueprint-font-size, + $old-line-height: $base-font-size * 1.5 +) { + font-size: 1em * $font-size / $base-font-size; + line-height: 1em * $old-line-height / $font-size * 4 / 5; + margin-bottom: 1.5em; +} + +// Surround uppercase words and abbreviations with this class. +// Based on work by Jørgen Arnor Gårdsø Lom [http://twistedintellect.com/] + +@mixin caps { + font-variant: small-caps; + letter-spacing: 1px; + text-transform: lowercase; + font-size: 1.2em; + line-height: 1%; + font-weight: bold; + padding: 0 2px; +} + +@mixin fancy-paragraphs { + p + p { @include sibling-indentation; } + p.incr, + .incr p { @include incr; } +} diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_form.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_form.scss new file mode 100755 index 0000000..fe4afe3 --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_form.scss @@ -0,0 +1,68 @@ +@import "colors"; + +// Mixin for producing Blueprint "inline" forms. Should be used with the blueprint-form mixin. +@mixin blueprint-inline-form { + line-height: 3; + p { + margin-bottom: 0; + } +} + +@mixin blueprint-form { + @include blueprint-form-layout; + @include blueprint-form-borders; + @include blueprint-form-sizes; +} + +@mixin blueprint-form-layout { + label { font-weight: bold; } + fieldset { padding: 1.4em; margin: 0 0 1.5em 0; } + legend { font-weight: bold; font-size: 1.2em; } + input { + &.text, + &.title, + &[type=email], + &[type=text], + &[type=password] { margin: 0.5em 0; background-color: white; padding: 5px; } + &.title { font-size: 1.5em; } + &[type=checkbox], + &.checkbox, + &[type=radio], + &.radio { position: relative; top: 0.25em; } + } + textarea { margin: 0.5em 0; padding: 5px; } + select { margin: 0.5em 0; } +} + +@mixin blueprint-form-sizes +( + $input_width: 300px, + $textarea_width: 390px, + $textarea_height: 250px +) { + input { + &.text, + &.title, + &[type=email], + &[type=text], + &[type=password] { width: $input_width; } + } + textarea { width: $textarea_width; height: $textarea_height; } +} + +@mixin blueprint-form-borders +( + $unfocused_border_color: #bbbbbb, + $focus_border_color: #666666, + $fieldset_border_color: #cccccc +) { + fieldset { + border: 1px solid $fieldset_border_color; } + input.text, input.title, input[type=email], input[type=text], input[type=password], + textarea, select { + border: 1px solid $unfocused_border_color; + &:focus { + border: 1px solid $focus_border_color; + } + } +} diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_grid.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_grid.scss new file mode 100755 index 0000000..78f509e --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_grid.scss @@ -0,0 +1,249 @@ +// -------------------------------------------------------------- +// SASS Gridification +// * Author: Chris Eppstein +// A SASS adaptation of Blueprint CSS +// * Version: 0.7.1 (2008-02-25) +// * Website: http://code.google.com/p/blueprintcss/ +// Based on work by: +// * Lorin Tackett [lorintackett.com] +// * Olav Bjorkoy [bjorkoy.com] +// * Nathan Borror [playgroundblues.com] +// * Jeff Croft [jeffcroft.com] +// * Christian Metts [mintchaos.com] +// * Khoi Vinh [subtraction.com] +// Read more about using a grid here: +// * http://www.subtraction.com/2007/03/18/oh-yeeaahh +// -------------------------------------------------------------- + +@import "compass/utilities/general/float"; +@import "compass/utilities/general/clearfix"; + +// The number of columns in the grid. +$blueprint_grid_columns: 24 !default; + +// The width of a column +$blueprint_grid_width: 30px !default; + +// The amount of margin between columns +$blueprint_grid_margin: 10px !default; + +// The width of a column including the margin. With default settings this is `40px`. +$blueprint_grid_outer_width: $blueprint_grid_width + $blueprint_grid_margin; + +// The width of the container. With default settings this is `950px`. +$blueprint_container_size: $blueprint_grid_outer_width * $blueprint_grid_columns - $blueprint_grid_margin; + +// Generates presentational class names that you can use +// in your html to layout your pages. +// +// #### Note: +// Best practices discourage using this mixin, +// but it is provided to support legacy websites +// and to test the sass port against blueprint's example pages. + +@mixin blueprint-grid { + // A container should group all your columns + .container { + @include container; } + .column, #{enumerate("div.span", 1, $blueprint_grid_columns)} { + @include column-base; } + // The last column in a row needs this class (or mixin) or it will end up on the next row. + .last, div.last { + @include last; } + // Use these classes (or mixins) to set the width of a column. + @for $n from 1 to $blueprint_grid_columns { + .span-#{$n} { + @include span($n); } } + .span-#{$blueprint_grid_columns}, div.span-#{$blueprint_grid_columns} { + @include span($blueprint_grid_columns); + margin: 0; } + input, textarea, select { + @for $n from 1 through $blueprint_grid_columns { + &.span-#{$n} { + @include span($n, true); } } } + // Add these to a column to append empty cols. + @for $n from 1 to $blueprint_grid_columns { + .append-#{$n} { + @include append($n); } } + // Add these to a column to prepend empty cols. + @for $n from 1 to $blueprint_grid_columns { + .prepend-#{$n} { + @include prepend($n); } } + // Use these classes on an element to push it into the + // next column, or to pull it into the previous column. + #{enumerate(".pull", 1, $blueprint_grid_columns)} { + @include pull-base; } + @for $n from 1 through $blueprint_grid_columns { + .pull-#{$n} { + @include pull-margins($n); } } + #{enumerate(".push", 1, $blueprint_grid_columns)} { + @include push-base; } + @for $n from 1 through $blueprint_grid_columns { + .push-#{$n} { + @include push-margins($n); } } + .prepend-top { + @include prepend-top; } + .append-bottom { + @include append-bottom; } } + +// A container for your columns. +// +// #### Note: +// If you use this mixin without the class and want to support ie6 +// you must set text-align left on your container element in an IE stylesheet. +@mixin container { + width: $blueprint_container_size; + margin: 0 auto; + @include clearfix; } + +// The last column in a row needs this mixin or it will end up +// on the next row in some browsers. +@mixin last { + margin-right: 0; } + +// Use this mixins to set the width of n columns. +@mixin column($n, $last: false) { + @include column-base($last); + @include span($n); } + +// Set only the width of an element to align it with the grid. +// Most of the time you'll want to use `+column` instead. +// +// This mixin is especially useful for aligning tables to the grid. +@mixin span($n, $override: false) { + $width: $blueprint_grid_width * $n + $blueprint_grid_margin * ($n - 1); + @if $override { + width: $width !important; } + @else { + width: $width; } } + +// The basic set of styles needed to make an element +// behave like a column: +// +// * floated to left +// * gutter margin on the right (unless the last column) +// * Some IE fixes +// +// #### Note: +// This mixin gets applied automatically when using `+column` +// so you probably don't need to use it directly unless +// you need to deviate from the grid or are trying +// to reduce the amount of generated CSS. +@mixin column-base($last: false) { + @include float-left; + @if $last { + @include last; } + @else { + margin-right: $blueprint_grid_margin; } + * html & { + overflow-x: hidden; } } + +// Mixin to a column to append n empty columns to the right +// by adding right padding to the column. +@mixin append($n) { + padding-right: $blueprint_grid_outer_width * $n; } + +// Mixin to a column to append n empty columns to the left +// by adding left padding to the column. +@mixin prepend($n) { + padding-left: $blueprint_grid_outer_width * $n; } + +// Adds trailing margin. +@mixin append-bottom($amount: 1.5em) { + margin-bottom: $amount; } + +// Adds leading margin. +@mixin prepend-top($amount: 1.5em) { + margin-top: $amount; } + +// Base styles that make it possible to pull an element to the left. +// #### Note: +// This mixin gets applied automatically when using `+pull` +// so you probably don't need to use it directly unless +// you need to deviate from the grid or are trying +// to reduce the amount of generated CSS. +@mixin pull-base { + @include float-left; + position: relative; } + +// The amount of pulling for element to the left. +// #### Note: +// This mixin gets applied automatically when using `+pull` +// so you probably don't need to use it directly unless +// you need to deviate from the grid or are trying +// to reduce the amount of generated CSS. +@mixin pull-margins($n, $last: false) { + @if $last { + margin-left: -$blueprint_grid_outer_width * $n + $blueprint_grid_margin; } + @else { + margin-left: -$blueprint_grid_outer_width * $n; } } + +// Moves a column `n` columns to the left. +// +// This mixin can also be used to change the display order of columns. +// +// If pulling past the last (visually) element in a row, +// pass `true` as the second argument so the calculations can adjust +// accordingly. + +// For example: +// +// HTML: +//
        +// 
        One
        +//
        Two
        +//
        +// Sass: +//
        +// #one
        +//   +column(18, true)
        +//   +prepend(6)
        +// #two
        +//   +column(6)
        +//   +pull(18, true)
        +// 
        +@mixin pull($n, $last: false) { + @include pull-base; + @include pull-margins($n, $last); } + +@mixin push-base { + @include float-right; + position: relative; } + +@mixin push-margins($n) { + margin: 0 (-$blueprint_grid_outer_width * $n) 1.5em $blueprint_grid_outer_width * $n; } + +// mixin to a column to push it n columns to the right +@mixin push($n) { + @include push-base; + @include push-margins($n); } + +// Border on right hand side of a column. +@mixin border($border_color: #eeeeee, $border_width: 1px) { + padding-right: $blueprint_grid_margin / 2 - $border_width; + margin-right: $blueprint_grid_margin / 2; + border-right: #{$border_width} solid #{$border_color}; } + +// Border with more whitespace, spans one column. +@mixin colborder($border_color: #eeeeee, $border_width: 1px) { + padding-right: floor(($blueprint_grid_width + 2 * $blueprint_grid_margin - $border_width) / 2); + margin-right: ceil(($blueprint_grid_width + 2 * $blueprint_grid_margin - $border_width) / 2); + border-right: #{$border_width} solid #{$border_color}; } + +// Mixin this to an hr to make a horizontal ruler across a column. +@mixin colruler($border_color: #dddddd) { + background: $border_color; + color: $border_color; + clear: both; + float: none; + width: 100%; + height: 0.1em; + margin: 0 0 1.45em; + border: none; } + +// Mixin this to an hr to make a horizontal spacer across a column. +@mixin colspacer { + @include colruler; + background: white; + color: white; + visibility: hidden; } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_ie.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_ie.scss new file mode 100755 index 0000000..fb3fe5f --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_ie.scss @@ -0,0 +1,109 @@ +// @doc off +// The blueprint IE mixins should be mixed into a stylesheet that gets conditionally included +// into IE like so: +// +// @doc on + +//| Usage Examples +//| -------------- +//| +//| As a top-level mixin, apply to any page that includes the stylesheet: +//|
        +//| +blueprint-ie
        +//| 
        +//| Scoped by a presentational class: +//|
        +//| body.blueprint
        +//|  +blueprint-ie(true)
        +//| 
        +//| Scoped by semantic selectors: +//|
        +//| body#page-1, body#page-2, body.a-special-page-type
        +//|   +blueprint-ie(true)
        +//| 
        +//| **Deprecated:** You can pass the body selector as the first argument when used as a top-level mixin +//|
        +//| +blueprint-ie("body#page-1, body#page-2, body.a-special-page-type")
        +//| 
        +@mixin blueprint-ie($body_selector: body) { + @if $body_selector == true { + @include blueprint-ie-body; + @include blueprint-ie-defaults; } + @else { + #{$body_selector} { + @include blueprint-ie-body; + @if $body_selector != "body" { + @warn "[DEPRECATED] To specify a the selector \"#{$body_selector}\" to +blueprint-ie, pass true as the first argument and mix it into #{$body_selector}."; + @include blueprint-ie-defaults; } } + @if $body_selector == "body" { + @include blueprint-ie-defaults; } } } + +@mixin blueprint-ie-body { + text-align: center; + @include blueprint-ie-hacks; } + +@mixin blueprint-ie-hacks { + * html & { + legend { + margin: 0px -8px 16px 0; + padding: 0; } } + html>& { + p code { + *white-space: normal; } } } + +// Fixes for Blueprint "inline" forms in IE +@mixin blueprint-inline-form-ie { + div, p { + vertical-align: middle; } + label { + position: relative; + top: -0.25em; } + input { + &.checkbox, &.radio, &.button, button { + margin: 0.5em 0; } } } + +@mixin blueprint-ie-defaults { + .container { + text-align: left; } + sup { + vertical-align: text-top; } + sub { + vertical-align: text-bottom; } + hr { + margin: -8px auto 11px; } + img { + -ms-interpolation-mode: bicubic; } + fieldset { + padding-top: 0; } + textarea { + overflow: auto; } + input { + &.text { + margin: 0.5em 0; + background-color: white; + border: 1px solid #bbbbbb; + &:focus { + border: 1px solid #666666; } } + &.title { + margin: 0.5em 0; + background-color: white; + border: 1px solid #bbbbbb; + &:focus { + border: 1px solid #666666; } } + &.checkbox { + position: relative; + top: 0.25em; } + &.radio { + position: relative; + top: 0.25em; } + &.button { + position: relative; + top: 0.25em; } } + textarea { + margin: 0.5em 0; } + select { + margin: 0.5em 0; } + button { + position: relative; + top: 0.25em; } } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_interaction.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_interaction.scss new file mode 100755 index 0000000..00a4760 --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_interaction.scss @@ -0,0 +1,57 @@ +@import "colors"; + +@mixin blueprint-interaction { + .error { + @include error; } + .notice { + @include notice; } + .success { + @include success; } + .hide { + display: none; } + .highlight { + @include highlight; } + .added { + @include added; } + .removed { + @include removed; } } + +@mixin feedback-base { + padding: 0.8em; + margin-bottom: 1em; + border: 2px solid $feedback_border_color; } + +@mixin error { + @include feedback-base; + background: $error_bg_color; + color: $error_color; + border-color: $error_border_color; + a { + color: $error_color; } } + +@mixin notice { + @include feedback-base; + background: $notice_bg_color; + color: $notice_color; + border-color: $notice_border_color; + a { + color: $notice_color; } } + +@mixin success { + @include feedback-base; + background: $success_bg_color; + color: $success_color; + border-color: $success_border_color; + a { + color: $success_color; } } + +@mixin highlight { + background: $highlight_color; } + +@mixin added { + background: $added_bg_color; + color: $added_color; } + +@mixin removed { + background: $removed_bg_color; + color: $removed_color; } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_link-icons.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_link-icons.scss new file mode 100755 index 0000000..d81159d --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_link-icons.scss @@ -0,0 +1,37 @@ +@mixin no-link-icon { + background: transparent none !important; + padding: 0 !important; + margin: 0 !important; +} + +@mixin link-icon-base { + padding: 2px 22px 2px 0; + margin: -2px 0; + background-repeat: no-repeat; + background-position: right center; +} + +@mixin link-icon($name, $include-base: true) { + @if $include-base { @include link-icon-base; } + background-image: image-url("link_icons/#{$name}"); } + +@mixin link-icons { + a[href^="http:"], + a[href^="mailto:"], + a[href^="http:"]:visited, + a[href$=".pdf"], + a[href$=".doc"], + a[href$=".xls"], + a[href$=".rss"], + a[href$=".rdf"], + a[href^="aim:"] { @include link-icon-base; } + a[href^="http:"] { @include link-icon("external.png", false); } + a[href^="mailto:"] { @include link-icon("email.png", false); } + a[href^="http:"]:visited { @include link-icon("visited.png", false); } + a[href$=".pdf"] { @include link-icon("pdf.png", false); } + a[href$=".doc"] { @include link-icon("doc.png", false); } + a[href$=".xls"] { @include link-icon("xls.png", false); } + a[href$=".rss"], + a[href$=".rdf"] { @include link-icon("feed.png", false); } + a[href^="aim:"] { @include link-icon("im.png", false); } +} diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_liquid.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_liquid.scss new file mode 100755 index 0000000..03bb02e --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_liquid.scss @@ -0,0 +1,147 @@ +// -------------------------------------------------------------- +// SASS Gridification +// * Author: Geoff Garside +// A SASS adaptation of Blueprint CSS +// * Version: 0.7.1 (2008-02-25) +// * Website: http://code.google.com/p/blueprintcss/ +// Based on work by: +// * Chris Eppstein [eppsteins.net] +// * Lorin Tacket [lorintackett.com] +// * Olav Bjorkoy [bjorkoy.com] +// * Nathan Borror [playgroundblues.com] +// * Jeff Croft [jeffcroft.com] +// * Christian Metts [mintchaos.com] +// * Khoi Vinh [subtraction.com] +// Liquid grid work by: +// * Ben Listwon +// * David Bedingfield +// * Andrei Michael Herasimchuk +// Involution Studios, http://www.involutionstudios.com +// Read more about using a grid here: +// * subtraction.com/archives/2007/0318_oh_yeeaahh.php +// ----- +// By default, the grid is 80% of window width, with 24 columns. +// +// To make the grid fixed, simply change the .container width +// property to a pixel value. e.g., 960px. +// ----- +// To use: +// This module is a REPLACEMENT for the grid module. Simply import it: +// @import blueprint +// @import blueprint/liquid +// ------------------------------------------------------------------- + +@import "compass/utilities/general/clearfix"; +@import "compass/utilities/general/float"; + +// Main layout grid, override these constants to build your grid and container sizes. +// The width shown gives the right floored percentage values. +$blueprint_liquid_grid_columns: 24 !default; + +$blueprint_liquid_grid_width: 3.167% !default; + +$blueprint_liquid_grid_margin: 1.042% !default; + +// Do not edit below this line unless you really know what you're doing. +$blueprint_liquid_container_width: 80% !default; + +$blueprint_liquid_container_min_width: 950px !default; + +$blueprint_liquid_grid_push_pull: -($blueprint_liquid_grid_margin + $blueprint_liquid_grid_width) !default; + +@mixin blueprint-liquid-grid { + // A container should group all your columns + .container { + @include container; } + // Use these classes (or mixins) to set the width of a column. + @for $n from 1 to $blueprint_liquid_grid_columns + 1 { + .span-#{$n} { + @include span($n); } + div { + &.span-#{$n} { + @include column($n, $n == $blueprint_liquid_grid_columns); } } } + // The last column in a row needs this class (or mixin) or it will end up on the next row. + div.last { + @include last; } + // Add these to a column to append empty cols. + @for $n from 1 to $blueprint_liquid_grid_columns { + .append-#{$n} { + @include append($n); } } + // Add these to a column to prepend empty cols. + @for $n from 1 to $blueprint_liquid_grid_columns { + .prepend-#{$n} { + @include prepend($n); } } + // Use these classes on an element to push it into the + // next column, or to pull it into the previous column. + @for $n from 1 to $blueprint_liquid_grid_columns + 1 { + .pull-#{$n} { + @include pull($n); } } + @for $n from 1 to $blueprint_liquid_grid_columns + 1 { + .push-#{$n} { + @include push($n); } } } + +@mixin container { + min-width: $blueprint_liquid_container_min_width; + width: $blueprint_liquid_container_width; + margin: 0 auto; + @include clearfix; } + +@mixin span($n, $override: false) { + $width: $blueprint_liquid_grid_width * $n + $blueprint_liquid_grid_margin * ($n - 1); + @if $override { + width: $width !important; } + @else { + width: $width; } } + +@mixin last { + margin-right: 0; } + +@mixin column($n, $last: false) { + @include float-left; + overflow: hidden; + @include span($n); + @if $last { + @include last; } + @else { + margin-right: $blueprint_liquid_grid_margin; } } + +@mixin append($n) { + padding-right: ($blueprint_liquid_grid_width + $blueprint_liquid_grid_margin) * $n; } + +@mixin prepend($n) { + padding-left: ($blueprint_liquid_grid_width + $blueprint_liquid_grid_margin) * $n; } + +@mixin pull($n, $last: false) { + margin-left: $blueprint_liquid_grid_push_pull * $n; } + +@mixin push($n) { + @include float-right; + margin: { + top: 0; + left: $blueprint_liquid_grid_margin; + right: $blueprint_liquid_grid_push_pull * $n; + bottom: 0; }; } + +@mixin border { + border-right: 1px solid #eeeeee; } + +@mixin colborder { + padding-right: $blueprint_liquid_grid_margin * 2; + margin-right: $blueprint_liquid_grid_margin * 2; + @include border; } + +@mixin colruler { + background: #dddddd; + color: #dddddd; + clear: both; + width: 100%; + height: 0.083em; + margin: 0; + margin-left: $blueprint_liquid_grid_margin * 2; + margin-right: $blueprint_liquid_grid_margin * 2; + border: none; } + +@mixin colspacer { + @include colruler; + background: white; + color: white; } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_print.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_print.scss new file mode 100755 index 0000000..9dd020e --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_print.scss @@ -0,0 +1,93 @@ +@import "typography"; +@import "compass/utilities/general/float"; + +// Usage examples: +// As a top-level mixin, apply to any page that includes the stylesheet: +//
        +// +blueprint-print
        +// 
        +// Scoped by a presentational class: +//
        +// body.blueprint
        +//  +blueprint-print(true)
        +// 
        +// Scoped by semantic selectors: +//
        +// body#page-1, body#page-2, body.a-special-page-type
        +//   +blueprint-print(true)
        +// 
        +// Deprecated: +// You can pass the body selector as the first argument when used as a top-level mixin +//
        +// +blueprint-print("body#page-1, body#page-2, body.a-special-page-type")
        +// 
        +@mixin blueprint-print($body_selector: body) { + @if $body_selector == true { + @include blueprint-print-body; + @include blueprint-print-defaults; } + @else { + #{$body_selector} { + @include blueprint-print-body; + @if $body_selector != "body" { + @warn "[DEPRECATED] To specify a the selector \"#{$body_selector}\" to +blueprint-print, pass true as the first argument and mix it into #{$body_selector}."; + @include blueprint-print-defaults; } } + @if $body_selector == "body" { + @include blueprint-print-defaults; } } } + +// This style is in blueprint, but I think it's annoying and it doesn't work in all browsers. +// Feel free to mix it into anchors where you want it. +@mixin blueprint-show-link-urls { + &:after { + content: " (" attr(href) ")"; + font-size: 90%; } } + +@mixin blueprint-print-body { + line-height: 1.5; + font-family: $blueprint_font_family; + color: black; + background: none; + font-size: 10pt; } + +@mixin blueprint-print-defaults { + .container { + background: none; } + hr { + background: #cccccc; + color: #cccccc; + width: 100%; + height: 2px; + margin: 2em 0; + padding: 0; + border: none; + &.space { + background: white; + color: white; } } + h1, h2, h3, h4, h5, h6 { + font-family: $blueprint_font_family; } + code { + font: { + size: 0.9em; + family: $blueprint_fixed_font_family; }; } + a { + img { + border: none; } + &:link, + &:visited { + background: transparent; + font-weight: 700; + text-decoration: underline; } } + p img.top { + margin-top: 0; } + blockquote { + margin: 1.5em; + padding: 1em; + font-style: italic; + font-size: 0.9em; } + .small { + font-size: 0.9em; } + .large { + font-size: 1.1em; } + .quiet { + color: #999999; } + .hide { + display: none; } } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_reset.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_reset.scss new file mode 100755 index 0000000..934a63e --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_reset.scss @@ -0,0 +1,3 @@ +@import "reset/utilities"; + +@include blueprint-global-reset; \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_rtl.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_rtl.scss new file mode 100755 index 0000000..4cf281d --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_rtl.scss @@ -0,0 +1,133 @@ +@import "grid"; +@import "compass/utilities/general/float"; + +// Main layout grid, override these constants to build your grid and container sizes. +$blueprint_grid_columns: 24 !default; + +$blueprint_grid_width: 30px !default; + +$blueprint_grid_margin: 10px !default; + +$blueprint_grid_outer_width: $blueprint_grid_width + $blueprint_grid_margin; + +$blueprint_container_size: $blueprint_grid_outer_width * $blueprint_grid_columns - $blueprint_grid_margin; + +// Columns +// Note: If you use this mixin without the class and want to support ie6 +// you must set text-align left on your container element in an IE stylesheet. +@mixin container { + width: $blueprint_container_size; + margin: 0 auto; + direction: rtl; + @include clearfix; } + +// The last column in a row needs this mixin or it will end up on the next row. +// TODO add this to span mixin when we have optional arguments +@mixin last { + margin-left: 0; } + +@mixin column-base($last: false) { + @include float-right; + @if $last { + @include last; } + @else { + margin-left: $blueprint_grid_margin; } + text-align: right; + * html & { + overflow-x: hidden; } } + +// Mixin to a column to append n empty cols. +@mixin append($n) { + padding-left: $blueprint_grid_outer_width * $n; } + +// Mixin to a column to prepend n empty cols. +@mixin prepend($n) { + padding-right: $blueprint_grid_outer_width * $n; } + +// mixin to a column to move it n columns to the left +@mixin pull($n, $last: false) { + position: relative; + @if $last { + margin-right: -$blueprint_grid_outer_width * $n + $blueprint_grid_margin; } + @else { + margin-right: -$blueprint_grid_outer_width * $n; } } + +// mixin to a column to push it n columns to the right +@mixin push($n) { + @include float-right; + position: relative; + margin: { + top: 0; + left: -$blueprint_grid_outer_width * $n; + bottom: 1.5em; + right: $blueprint_grid_outer_width * $n; }; } + +// Border on left hand side of a column. +@mixin border { + padding-left: $blueprint_grid_margin / 2 - 1; + margin-left: $blueprint_grid_margin / 2; + border-left: 1px solid #eeeeee; } + +// Border with more whitespace, spans one column. +@mixin colborder { + padding-left: ($blueprint_grid_width - 2 * $blueprint_grid_margin - 1) / 2; + margin-left: ($blueprint_grid_width - 2 * $blueprint_grid_margin) / 2; + border-left: 1px solid #eeeeee; } + +// Usage examples: +// As a top-level mixin, apply to any page that includes the stylesheet: +//
        +// +rtl-typography
        +// 
        +// +// Scoped by a presentational class: +//
        +// body.blueprint
        +//  +rtl-typography(true)
        +// 
        +// +// Scoped by semantic selectors: +//
        +// body#page-1, body#page-2, body.a-special-page-type
        +//   +rtl-typography(true)
        +// 
        +// +// **Deprecated**: +// You can pass the body selector as the first argument when used as a top-level mixin +//
        +// +rtl-typography("body#page-1, body#page-2, body.a-special-page-type")
        +// 
        +@mixin rtl-typography($body_selector: body) { + @if $body_selector == true { + html & { + font-family: Arial, sans-serif; } + @include rtl-typography-defaults; } + @else { + html #{$body_selector} { + font-family: Arial, sans-serif; + @if $body_selector != "body" { + @warn "[DEPRECATED] To specify a the selector \"#{$body_selector}\" to +rtl-typography, pass true as the first argument and mix it into #{$body_selector}."; + @include rtl-typography-defaults; } } + @if $body_selector == "body" { + body { + @include rtl-typography-defaults; } } } } + +@mixin rtl-typography-defaults { + h1, h2, h3, h4, h5, h6 { + font-family: Arial, sans-serif; } + pre, code, tt { + font-family: monospace; } + p { + img.right { + @include float-left; + margin: 1.5em 1.5em 1.5em 0; + padding: 0; } + img.left { + @include float-right; + margin: 1.5em 0 1.5em 1.5em; + padding: 0; } } + dd, ul, ol { + margin-left: 0; + margin-right: 1.5em; } + td, th { + text-align: right; } } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_scaffolding.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_scaffolding.scss new file mode 100755 index 0000000..57cf887 --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_scaffolding.scss @@ -0,0 +1,54 @@ +@import "grid"; +@import "form"; + +// The styles contained here are meant to provide for an attractive experience out of the box +// and are expected to be removed once custom visual design begins. + +// The +blueprint-scaffolding mixin must be mixed into the top level of your stylesheet. +// However, you can customize the body selector if you wish to control the scope +// of this mixin. Examples: +// Apply to any page including the stylesheet: +// +blueprint-scaffolding +// Scoped by a single presentational body class: +// +blueprint-scaffolding("body.blueprint") +// Semantically: +// +blueprint-scaffolding("body#page-1, body#page-2, body.a-special-page-type") +// Alternatively, you can use the +blueprint-scaffolding-body and +blueprint-scaffolding-defaults +// mixins to construct your own semantic style rules. + +@mixin blueprint-scaffolding($body_selector: body) { + @if $body_selector != body { + #{$body_selector} { + @include blueprint-scaffolding-defaults; + } + } @else { + @include blueprint-scaffolding-defaults; + } +} + +// The styles this mixin provides were deprecated in Blueprint 0.9 and is no longer part of the +// main scaffolding, but the mixin is still available if you want to use it. +@mixin blueprint-scaffolding-body { + margin: 1.5em 0; } + +// Mixin +box to create a padded box inside a column. +@mixin box { + padding: 1.5em; + margin-bottom: 1.5em; + background: #e5ecf9; } + +@mixin blueprint-scaffolding-defaults { + .box { + @include box; } + // Border on right hand side of a column. You can comment this out if you don't plan to use it. + div.border { + @include border; } + // Border with more whitespace, spans one column. + div.colborder { + @include colborder; } + hr { + @include colruler; } + hr.space { + @include colspacer; } + form.inline { + @include blueprint-inline-form; } } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_typography.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_typography.scss new file mode 100755 index 0000000..ec095fc --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_typography.scss @@ -0,0 +1,104 @@ +@import "colors"; +@import "compass/utilities/links/link-colors"; +@import "compass/utilities/general/float"; + +$blueprint-font-family: "Helvetica Neue", Arial, Helvetica, sans-serif !default; + +$blueprint-fixed-font-family: "andale mono", "lucida console", monospace !default; + +$blueprint-font-size: 12px !default; + +// Usage examples: +// As a top-level mixin, apply to any page that includes the stylesheet: +//
        +// +blueprint-typography
        +// 
        +// +// Scoped by a presentational class: +//
        +// body.blueprint
        +//  +blueprint-typography(true)
        +// 
        +// +// Scoped by semantic selectors: +//
        +// body#page-1, body#page-2, body.a-special-page-type
        +//   +blueprint-typography(true)
        +// 
        +// +// **Deprecated**: +// You can pass the body selector as the first argument when used as a top-level mixin +//
        +// +blueprint-typography("body#page-1, body#page-2, body.a-special-page-type")
        +// 
        +@mixin blueprint-typography($body-selector: body) { + @if $body-selector == true { + @include blueprint-typography-body; + @include blueprint-typography-defaults; + } @else { + #{$body-selector} { + @include blueprint-typography-body; + @if $body-selector != body { + @warn "[DEPRECATED] To specify the selector \"#{$body-selector}\" to +blueprint-typography, pass true as the first argument and mix it into #{$body-selector}."; + @include blueprint-typography-defaults; + } + } + @if $body-selector == body { + @include blueprint-typography-defaults; + } + } +} + +@mixin normal-text { font-family: $blueprint-font-family; color: $font-color; } +@mixin fixed-width-text { font: 1em $blueprint-fixed-font-family; line-height: 1.5; } +@mixin header-text { font-weight: normal; color: $header-color; } +@mixin quiet { color: $quiet-color; } +@mixin loud { color: $loud-color; } + +@mixin blueprint-typography-body($font-size: $blueprint-font-size) { + line-height: 1.5; + @include normal-text; + font-size: 100% * $font-size / 16px; +} + +@mixin blueprint-typography-defaults { + #{headers(all)} { @include header-text; + img { margin: 0; } } + h1 { font-size: 3em; line-height: 1; margin-bottom: 0.50em; } + h2 { font-size: 2em; margin-bottom: 0.75em; } + h3 { font-size: 1.5em; line-height: 1; margin-bottom: 1.00em; } + h4 { font-size: 1.2em; line-height: 1.25; margin-bottom: 1.25em; } + h5 { font-size: 1em; font-weight: bold; margin-bottom: 1.50em; } + h6 { font-size: 1em; font-weight: bold; } + p { margin: 0 0 1.5em; + img.left { @include float-left; margin: 1.5em 1.5em 1.5em 0; padding: 0; } + img.right { @include float-right; margin: 1.5em 0 1.5em 1.5em; padding: 0; } + } + a { text-decoration: underline; @include link-colors($link-color, $link-hover-color, $link-active-color, $link-visited-color, $link-focus-color); } + blockquote { margin: 1.5em; color: $alt_text_color; font-style: italic; } + strong { font-weight: bold; } + em { font-style: italic; } + dfn { font-style: italic; font-weight: bold; } + sup, sub { line-height: 0; } + abbr, acronym { border-bottom: 1px dotted #666666; } + address { margin: 0 0 1.5em; font-style: italic; } + del { color: $alt_text_color; } + pre { margin: 1.5em 0; white-space: pre; } + pre, code, tt { @include fixed-width-text; } + li ul, li ol { margin: 0; } + ul, ol { margin: 0 1.5em 1.5em 0; padding-left: 3.333em; } + ul { list-style-type: disc; } + ol { list-style-type: decimal; } + dl { margin: 0 0 1.5em 0; + dt { font-weight: bold; } } + dd { margin-left: 1.5em; } + table { margin-bottom: 1.4em; width: 100%; } + th { font-weight: bold; } + thead th { background: $blueprint-table-header-color; } + th, td, caption { padding: 4px 10px 4px 5px; } + tr.even td { background: $blueprint-table-stripe-color; } + tfoot { font-style: italic; } + caption { background: $blueprint_background_color; } + .quiet { @include quiet; } + .loud { @include loud; } +} diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_utilities.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_utilities.scss new file mode 100755 index 0000000..12b8987 --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_utilities.scss @@ -0,0 +1,37 @@ +@import "compass/utilities/text/nowrap"; +@import "compass/utilities/general/clearfix"; + +// Most of these utility classes are not "semantic". If you use them, +// you are mixing your content and presentation. For shame! + +@mixin blueprint-utilities { + // Regular clearing apply to column that should drop below previous ones. + .clear { + clear: both; } + // turn off text wrapping for the element. + .nowrap { + @include nowrap; } + // Apply to an element that has floated children to make the bottom + // of the element fall _below_ the floated children. + .clearfix { + @include clearfix; } + .small { + font-size: 0.8em; + margin-bottom: 1.875em; + line-height: 1.875em; } + .large { + font-size: 1.2em; + line-height: 2.5em; + margin-bottom: 1.25em; } + .first { + margin-left: 0; + padding-left: 0; } + .last { + margin-right: 0; + padding-right: 0; } + .top { + margin-top: 0; + padding-top: 0; } + .bottom { + margin-bottom: 0; + padding-bottom: 0; } } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss new file mode 100755 index 0000000..620d68b --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss @@ -0,0 +1,58 @@ +// Global reset rules. +// For more specific resets, use the reset mixins provided below +@mixin blueprint-global-reset { + html, body { + @include blueprint-reset; } + html { + font-size: 100.01%; } + @include blueprint-nested-reset; } + +// Reset all elements within some selector scope.To reset the selector itself, +// mixin the appropriate reset mixin for that element type as well. This could be +// useful if you want to style a part of your page in a dramatically different way. +@mixin blueprint-nested-reset { + div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, + pre, a, abbr, acronym, address, code, del, dfn, em, img, + dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr { + @include blueprint-reset; } + blockquote, q { + @include blueprint-reset-quotation; } + th, td, caption { + @include blueprint-reset-table-cell; } + table { + @include blueprint-reset-table; } + a img { + border: none; } } + +@mixin blueprint-reset-box-model { + margin: 0; + padding: 0; + border: 0; } + +@mixin blueprint-reset { + @include blueprint-reset-box-model; + font: { + weight: inherit; + style: inherit; + size: 100%; + family: inherit; }; + vertical-align: baseline; } + +@mixin blueprint-reset-quotation { + @include blueprint-reset; + quotes: "" ""; + &:before, + &:after { + content: ""; } } + +@mixin blueprint-reset-table-cell { + @include blueprint-reset; + text-align: left; + font-weight: normal; + vertical-align: middle; } + +@mixin blueprint-reset-table { + @include blueprint-reset; + border-collapse: separate; + border-spacing: 0; + vertical-align: middle; } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/grid.png b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/grid.png new file mode 100755 index 0000000000000000000000000000000000000000..129d4a29fbe92688aabed5638e0c4f73a7bca818 GIT binary patch literal 206 zcmeAS@N?(olHy`uVBq!ia0vp^8bB<>!3HEX<>xE|QY^(zo*^7SP{WbZ0pxQQctjR6 zFmQbUVMeDlCNqG7G9|7NCBgY=CFO}lsSJ)O`AMk?Zka`?<@rU~#R|^B#xt(DF$2|k zc)B=-cyuP$eEj#lzKxOL5tEL~%H%~Gtu@#d^DPnSv6>KM@XEpK;0k6FVdQ&MBb@06Zo?vj6}9 literal 0 HcmV?d00001 diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/ie.sass b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/ie.sass new file mode 100755 index 0000000..9423f80 --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/ie.sass @@ -0,0 +1,4 @@ +@import blueprint + +// Generate the blueprint IE-specific customizations: ++blueprint-ie diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/manifest.rb b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/manifest.rb new file mode 100755 index 0000000..8ab1251 --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/manifest.rb @@ -0,0 +1,30 @@ +description "A basic blueprint install that mimics the actual blueprint css." + +stylesheet 'screen.sass', :media => 'screen, projection' +stylesheet 'partials/_base.sass' +stylesheet 'print.sass', :media => 'print' +stylesheet 'ie.sass', :media => 'screen, projection', :condition => "lt IE 8" + +image 'grid.png' + +help %Q{ +Please see the blueprint website for documentation on how blueprint works: + + http://blueprintcss.org/ + +Docs on the compass port of blueprint can be found on the wiki: + + http://wiki.github.com/chriseppstein/compass/blueprint-documentation +} + +welcome_message %Q{ +Please see the blueprint website for documentation on how blueprint works: + + http://blueprintcss.org/ + +Docs on the compass port of blueprint can be found on the wiki: + + http://wiki.github.com/chriseppstein/compass/blueprint-documentation + +To get started, edit the screen.sass file and read the comments and code there. +} diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/partials/_base.sass b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/partials/_base.sass new file mode 100755 index 0000000..cb437bf --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/partials/_base.sass @@ -0,0 +1,10 @@ +// Here is where you can define your constants for your application and to configure the blueprint framework. +// Feel free to delete these if you want keep the defaults: + +$blueprint-grid-columns : 24 +$blueprint-grid-width : 30px +$blueprint-grid-margin : 10px + +// If you change your grid column dimensions +// you can make a new grid background image from the command line like this: +// compass grid-img 30+10x16 diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/print.sass b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/print.sass new file mode 100755 index 0000000..e92c463 --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/print.sass @@ -0,0 +1,4 @@ +@import blueprint + +// Generate the blueprint print styles: ++blueprint-print diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/screen.sass b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/screen.sass new file mode 100755 index 0000000..aa72486 --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/screen.sass @@ -0,0 +1,12 @@ +// This import applies a global reset to any page that imports this stylesheet. +@import blueprint/reset +// To configure blueprint, edit the partials/_base.sass file. +@import partials/base +// Import all the default blueprint modules so that we can access their mixins. +@import blueprint +// Import the non-default scaffolding module. +@import blueprint/scaffolding + +// Generate the blueprint framework according to your configuration: ++blueprint ++blueprint-scaffolding diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/buttons/buttons.sass b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/buttons/buttons.sass new file mode 100755 index 0000000..b03736a --- /dev/null +++ b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/buttons/buttons.sass @@ -0,0 +1,49 @@ +@import compass/utilities/general/float +@import blueprint/buttons + +// + Use the following HTML code to place the buttons on your site: + + + + + Change Password + + + + Cancel + + +a.button + // you can pass "left" or "right" to +anchor-button to float it in that direction + // or you can pass no argument to leave it inline-block (cross browser safe!) within + // the flow of your page. + +anchor-button(left) + // All the button color mixins take 4 optional arguments: + // font color, background color, border color, border highlight color + // the first three default to constants set in blueprint/buttons.sass + // the last one defaults to a shade lighter than the border color. + +button-colors + +button-hover-colors + +button-active-colors + +button + // The +button-button mixin is just like the +anchor-button mixin, but for
        - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.1.0 - * @date 2009-07-18 - * @package Dwoo - */ -class Dwoo -{ - /** - * current version number - * - * @var string - */ - const VERSION = '1.1.1'; - - /** - * unique number of this dwoo release - * - * this can be used by templates classes to check whether the compiled template - * has been compiled before this release or not, so that old templates are - * recompiled automatically when Dwoo is updated - */ - const RELEASE_TAG = 17; - - /**#@+ - * constants that represents all plugin types - * - * these are bitwise-operation-safe values to allow multiple types - * on a single plugin - * - * @var int - */ - const CLASS_PLUGIN = 1; - const FUNC_PLUGIN = 2; - const NATIVE_PLUGIN = 4; - const BLOCK_PLUGIN = 8; - const COMPILABLE_PLUGIN = 16; - const CUSTOM_PLUGIN = 32; - const SMARTY_MODIFIER = 64; - const SMARTY_BLOCK = 128; - const SMARTY_FUNCTION = 256; - const PROXY_PLUGIN = 512; - const TEMPLATE_PLUGIN = 1024; - /**#@-*/ - - /** - * character set of the template, used by string manipulation plugins - * - * it must be lowercase, but setCharset() will take care of that - * - * @see setCharset - * @see getCharset - * @var string - */ - protected $charset = 'utf-8'; - - /** - * global variables that are accessible through $dwoo.* in the templates - * - * default values include: - * - * $dwoo.version - current version number - * $dwoo.ad - a Powered by Dwoo link pointing to dwoo.org - * $dwoo.now - the current time - * $dwoo.template - the current template filename - * $dwoo.charset - the character set used by the template - * - * on top of that, foreach and other plugins can store special values in there, - * see their documentation for more details. - * - * @private - * @var array - */ - public $globals; - - /** - * directory where the compiled templates are stored - * - * defaults to DWOO_COMPILEDIR (= dwoo_dir/compiled by default) - * - * @var string - */ - protected $compileDir; - - /** - * directory where the cached templates are stored - * - * defaults to DWOO_CACHEDIR (= dwoo_dir/cache by default) - * - * @var string - */ - protected $cacheDir; - - /** - * defines how long (in seconds) the cached files must remain valid - * - * can be overriden on a per-template basis - * - * -1 = never delete - * 0 = disabled - * >0 = duration in seconds - * - * @var int - */ - protected $cacheTime = 0; - - /** - * security policy object - * - * @var Dwoo_Security_Policy - */ - protected $securityPolicy = null; - - /** - * stores the custom plugins callbacks - * - * @see addPlugin - * @see removePlugin - * @var array - */ - protected $plugins = array(); - - /** - * stores the filter callbacks - * - * @see addFilter - * @see removeFilter - * @var array - */ - protected $filters = array(); - - /** - * stores the resource types and associated - * classes / compiler classes - * - * @var array - */ - protected $resources = array - ( - 'file' => array - ( - 'class' => 'Dwoo_Template_File', - 'compiler' => null - ), - 'string' => array - ( - 'class' => 'Dwoo_Template_String', - 'compiler' => null - ) - ); - - /** - * the dwoo loader object used to load plugins by this dwoo instance - * - * @var Dwoo_ILoader - */ - protected $loader = null; - - /** - * currently rendered template, set to null when not-rendering - * - * @var Dwoo_ITemplate - */ - protected $template = null; - - /** - * stores the instances of the class plugins during template runtime - * - * @var array - */ - protected $runtimePlugins; - - /** - * stores the data during template runtime - * - * @var array - * @private - */ - public $data; - - /** - * stores the current scope during template runtime - * - * this should ideally not be accessed directly from outside template code - * - * @var mixed - * @private - */ - public $scope; - - /** - * stores the scope tree during template runtime - * - * @var array - */ - protected $scopeTree; - - /** - * stores the block plugins stack during template runtime - * - * @var array - */ - protected $stack; - - /** - * stores the current block plugin at the top of the stack during template runtime - * - * @var Dwoo_Block_Plugin - */ - protected $curBlock; - - /** - * stores the output buffer during template runtime - * - * @var string - */ - protected $buffer; - - /** - * stores plugin proxy - * - * @var Dwoo_IPluginProxy - */ - protected $pluginProxy; - - /** - * constructor, sets the cache and compile dir to the default values if not provided - * - * @param string $compileDir path to the compiled directory, defaults to lib/compiled - * @param string $cacheDir path to the cache directory, defaults to lib/cache - */ - public function __construct($compileDir = null, $cacheDir = null) - { - if ($compileDir !== null) { - $this->setCompileDir($compileDir); - } - if ($cacheDir !== null) { - $this->setCacheDir($cacheDir); - } - $this->initGlobals(); - } - - /** - * resets some runtime variables to allow a cloned object to be used to render sub-templates - */ - public function __clone() - { - $this->template = null; - unset($this->data); - } - - /** - * outputs the template instead of returning it, this is basically a shortcut for get(*, *, *, true) - * - * @see get - * @param mixed $tpl template, can either be a Dwoo_ITemplate object (i.e. Dwoo_Template_File), a valid path to a template, or - * a template as a string it is recommended to provide a Dwoo_ITemplate as it will probably make things faster, - * especially if you render a template multiple times - * @param mixed $data the data to use, can either be a Dwoo_IDataProvider object (i.e. Dwoo_Data) or an associative array. if you're - * rendering the template from cache, it can be left null - * @param Dwoo_ICompiler $compiler the compiler that must be used to compile the template, if left empty a default - * Dwoo_Compiler will be used. - * @return string nothing or the template output if $output is true - */ - public function output($tpl, $data = array(), Dwoo_ICompiler $compiler = null) - { - return $this->get($tpl, $data, $compiler, true); - } - - /** - * returns the given template rendered using the provided data and optional compiler - * - * @param mixed $tpl template, can either be a Dwoo_ITemplate object (i.e. Dwoo_Template_File), a valid path to a template, or - * a template as a string it is recommended to provide a Dwoo_ITemplate as it will probably make things faster, - * especially if you render a template multiple times - * @param mixed $data the data to use, can either be a Dwoo_IDataProvider object (i.e. Dwoo_Data) or an associative array. if you're - * rendering the template from cache, it can be left null - * @param Dwoo_ICompiler $compiler the compiler that must be used to compile the template, if left empty a default - * Dwoo_Compiler will be used. - * @param bool $output flag that defines whether the function returns the output of the template (false, default) or echoes it directly (true) - * @return string nothing or the template output if $output is true - */ - public function get($_tpl, $data = array(), $_compiler = null, $_output = false) - { - // a render call came from within a template, so we need a new dwoo instance in order to avoid breaking this one - if ($this->template instanceof Dwoo_ITemplate) { - $proxy = clone $this; - return $proxy->get($_tpl, $data, $_compiler, $_output); - } - - // auto-create template if required - if ($_tpl instanceof Dwoo_ITemplate) { - // valid, skip - } elseif (is_string($_tpl) && file_exists($_tpl)) { - $_tpl = new Dwoo_Template_File($_tpl); - } else { - throw new Dwoo_Exception('Dwoo->get/Dwoo->output\'s first argument must be a Dwoo_ITemplate (i.e. Dwoo_Template_File) or a valid path to a template file', E_USER_NOTICE); - } - - // save the current template, enters render mode at the same time - // if another rendering is requested it will be proxied to a new Dwoo instance - $this->template = $_tpl; - - // load data - if ($data instanceof Dwoo_IDataProvider) { - $this->data = $data->getData(); - } elseif (is_array($data)) { - $this->data = $data; - } else { - throw new Dwoo_Exception('Dwoo->get/Dwoo->output\'s data argument must be a Dwoo_IDataProvider object (i.e. Dwoo_Data) or an associative array', E_USER_NOTICE); - } - - $this->globals['template'] = $_tpl->getName(); - $this->initRuntimeVars($_tpl); - - // try to get cached template - $file = $_tpl->getCachedTemplate($this); - $doCache = $file === true; - $cacheLoaded = is_string($file); - - if ($cacheLoaded === true) { - // cache is present, run it - if ($_output === true) { - include $file; - $this->template = null; - } else { - ob_start(); - include $file; - $this->template = null; - return ob_get_clean(); - } - } else { - // no cache present - if ($doCache === true) { - $dynamicId = uniqid(); - } - - // render template - $compiledTemplate = $_tpl->getCompiledTemplate($this, $_compiler); - $out = include $compiledTemplate; - - // template returned false so it needs to be recompiled - if ($out === false) { - $_tpl->forceCompilation(); - $compiledTemplate = $_tpl->getCompiledTemplate($this, $_compiler); - $out = include $compiledTemplate; - } - - if ($doCache === true) { - $out = preg_replace('/(<%|%>|<\?php|<\?|\?>)/', '', $out); - if (!class_exists('Dwoo_plugin_dynamic', false)) { - $this->getLoader()->loadPlugin('dynamic'); - } - $out = Dwoo_Plugin_dynamic::unescape($out, $dynamicId, $compiledTemplate); - } - - // process filters - foreach ($this->filters as $filter) { - if (is_array($filter) && $filter[0] instanceof Dwoo_Filter) { - $out = call_user_func($filter, $out); - } else { - $out = call_user_func($filter, $this, $out); - } - } - - if ($doCache === true) { - // building cache - $file = $_tpl->cache($this, $out); - - // run it from the cache to be sure dynamics are rendered - if ($_output === true) { - include $file; - // exit render mode - $this->template = null; - } else { - ob_start(); - include $file; - // exit render mode - $this->template = null; - return ob_get_clean(); - } - } else { - // no need to build cache - // exit render mode - $this->template = null; - // output - if ($_output === true) { - echo $out; - } - return $out; - } - } - } - - /** - * re-initializes the globals array before each template run - * - * this method is only callede once when the Dwoo object is created - */ - protected function initGlobals() - { - $this->globals = array - ( - 'version' => self::VERSION, - 'ad' => 'Powered by Dwoo', - 'now' => $_SERVER['REQUEST_TIME'], - 'charset' => $this->charset, - ); - } - - /** - * re-initializes the runtime variables before each template run - * - * override this method to inject data in the globals array if needed, this - * method is called before each template execution - * - * @param Dwoo_ITemplate $tpl the template that is going to be rendered - */ - protected function initRuntimeVars(Dwoo_ITemplate $tpl) - { - $this->runtimePlugins = array(); - $this->scope =& $this->data; - $this->scopeTree = array(); - $this->stack = array(); - $this->curBlock = null; - $this->buffer = ''; - } - - /* - * --------- settings functions --------- - */ - - /** - * adds a custom plugin that is not in one of the plugin directories - * - * @param string $name the plugin name to be used in the templates - * @param callback $callback the plugin callback, either a function name, - * a class name or an array containing an object - * or class name and a method name - * @param bool $compilable if set to true, the plugin is assumed to be compilable - */ - public function addPlugin($name, $callback, $compilable = false) - { - $compilable = $compilable ? self::COMPILABLE_PLUGIN : 0; - if (is_array($callback)) { - if (is_subclass_of(is_object($callback[0]) ? get_class($callback[0]) : $callback[0], 'Dwoo_Block_Plugin')) { - $this->plugins[$name] = array('type'=>self::BLOCK_PLUGIN | $compilable, 'callback'=>$callback, 'class'=>(is_object($callback[0]) ? get_class($callback[0]) : $callback[0])); - } else { - $this->plugins[$name] = array('type'=>self::CLASS_PLUGIN | $compilable, 'callback'=>$callback, 'class'=>(is_object($callback[0]) ? get_class($callback[0]) : $callback[0]), 'function'=>$callback[1]); - } - } elseif (class_exists($callback, false)) { - if (is_subclass_of($callback, 'Dwoo_Block_Plugin')) { - $this->plugins[$name] = array('type'=>self::BLOCK_PLUGIN | $compilable, 'callback'=>$callback, 'class'=>$callback); - } else { - $this->plugins[$name] = array('type'=>self::CLASS_PLUGIN | $compilable, 'callback'=>$callback, 'class'=>$callback, 'function'=>'process'); - } - } elseif (function_exists($callback)) { - $this->plugins[$name] = array('type'=>self::FUNC_PLUGIN | $compilable, 'callback'=>$callback); - } else { - throw new Dwoo_Exception('Callback could not be processed correctly, please check that the function/class you used exists'); - } - } - - /** - * removes a custom plugin - * - * @param string $name the plugin name - */ - public function removePlugin($name) - { - if (isset($this->plugins[$name])) { - unset($this->plugins[$name]); - } - } - - /** - * adds a filter to this Dwoo instance, it will be used to filter the output of all the templates rendered by this instance - * - * @param mixed $callback a callback or a filter name if it is autoloaded from a plugin directory - * @param bool $autoload if true, the first parameter must be a filter name from one of the plugin directories - */ - public function addFilter($callback, $autoload = false) - { - if ($autoload) { - $class = 'Dwoo_Filter_'.$callback; - - if (!class_exists($class, false) && !function_exists($class)) { - try { - $this->getLoader()->loadPlugin($callback); - } catch (Dwoo_Exception $e) { - if (strstr($callback, 'Dwoo_Filter_')) { - throw new Dwoo_Exception('Wrong filter name : '.$callback.', the "Dwoo_Filter_" prefix should not be used, please only use "'.str_replace('Dwoo_Filter_', '', $callback).'"'); - } else { - throw new Dwoo_Exception('Wrong filter name : '.$callback.', when using autoload the filter must be in one of your plugin dir as "name.php" containg a class or function named "Dwoo_Filter_name"'); - } - } - } - - if (class_exists($class, false)) { - $callback = array(new $class($this), 'process'); - } elseif (function_exists($class)) { - $callback = $class; - } else { - throw new Dwoo_Exception('Wrong filter name : '.$callback.', when using autoload the filter must be in one of your plugin dir as "name.php" containg a class or function named "Dwoo_Filter_name"'); - } - - $this->filters[] = $callback; - } else { - $this->filters[] = $callback; - } - } - - /** - * removes a filter - * - * @param mixed $callback callback or filter name if it was autoloaded - */ - public function removeFilter($callback) - { - if (($index = array_search('Dwoo_Filter_'.$callback, $this->filters, true)) !== false) { - unset($this->filters[$index]); - } elseif (($index = array_search($callback, $this->filters, true)) !== false) { - unset($this->filters[$index]); - } else { - $class = 'Dwoo_Filter_' . $callback; - foreach ($this->filters as $index=>$filter) { - if (is_array($filter) && $filter[0] instanceof $class) { - unset($this->filters[$index]); - break; - } - } - } - } - - /** - * adds a resource or overrides a default one - * - * @param string $name the resource name - * @param string $class the resource class (which must implement Dwoo_ITemplate) - * @param callback $compilerFactory the compiler factory callback, a function that must return a compiler instance used to compile this resource, if none is provided. by default it will produce a Dwoo_Compiler object - */ - public function addResource($name, $class, $compilerFactory = null) - { - if (strlen($name) < 2) { - throw new Dwoo_Exception('Resource names must be at least two-character long to avoid conflicts with Windows paths'); - } - - if (!class_exists($class)) { - throw new Dwoo_Exception('Resource class does not exist'); - } - - $interfaces = class_implements($class); - if (in_array('Dwoo_ITemplate', $interfaces) === false) { - throw new Dwoo_Exception('Resource class must implement Dwoo_ITemplate'); - } - - $this->resources[$name] = array('class'=>$class, 'compiler'=>$compilerFactory); - } - - /** - * removes a custom resource - * - * @param string $name the resource name - */ - public function removeResource($name) - { - unset($this->resources[$name]); - if ($name==='file') { - $this->resources['file'] = array('class'=>'Dwoo_Template_File', 'compiler'=>null); - } - } - - /* - * --------- getters and setters --------- - */ - - /** - * sets the loader object to use to load plugins - * - * @param Dwoo_ILoader $loader loader object - */ - public function setLoader(Dwoo_ILoader $loader) - { - $this->loader = $loader; - } - - /** - * returns the current loader object or a default one if none is currently found - * - * @param Dwoo_ILoader - */ - public function getLoader() - { - if ($this->loader === null) { - $this->loader = new Dwoo_Loader($this->getCompileDir()); - } - - return $this->loader; - } - - /** - * returns the custom plugins loaded - * - * used by the Dwoo_ITemplate classes to pass the custom plugins to their Dwoo_ICompiler instance - * - * @return array - */ - public function getCustomPlugins() - { - return $this->plugins; - } - - /** - * returns the cache directory with a trailing DIRECTORY_SEPARATOR - * - * @return string - */ - public function getCacheDir() - { - if ($this->cacheDir === null) { - $this->setCacheDir(dirname(__FILE__).DIRECTORY_SEPARATOR.'cache'.DIRECTORY_SEPARATOR); - } - - return $this->cacheDir; - } - - /** - * sets the cache directory and automatically appends a DIRECTORY_SEPARATOR - * - * @param string $dir the cache directory - */ - public function setCacheDir($dir) - { - $this->cacheDir = rtrim($dir, '/\\').DIRECTORY_SEPARATOR; - if (is_writable($this->cacheDir) === false) { - throw new Dwoo_Exception('The cache directory must be writable, chmod "'.$this->cacheDir.'" to make it writable'); - } - } - - /** - * returns the compile directory with a trailing DIRECTORY_SEPARATOR - * - * @return string - */ - public function getCompileDir() - { - if ($this->compileDir === null) { - $this->setCompileDir(dirname(__FILE__).DIRECTORY_SEPARATOR.'compiled'.DIRECTORY_SEPARATOR); - } - - return $this->compileDir; - } - - /** - * sets the compile directory and automatically appends a DIRECTORY_SEPARATOR - * - * @param string $dir the compile directory - */ - public function setCompileDir($dir) - { - $this->compileDir = rtrim($dir, '/\\').DIRECTORY_SEPARATOR; - if (is_writable($this->compileDir) === false) { - throw new Dwoo_Exception('The compile directory must be writable, chmod "'.$this->compileDir.'" to make it writable'); - } - } - - /** - * returns the default cache time that is used with templates that do not have a cache time set - * - * @return int the duration in seconds - */ - public function getCacheTime() - { - return $this->cacheTime; - } - - /** - * sets the default cache time to use with templates that do not have a cache time set - * - * @param int $seconds the duration in seconds - */ - public function setCacheTime($seconds) - { - $this->cacheTime = (int) $seconds; - } - - /** - * returns the character set used by the string manipulation plugins - * - * the charset is automatically lowercased - * - * @return string - */ - public function getCharset() - { - return $this->charset; - } - - /** - * sets the character set used by the string manipulation plugins - * - * the charset will be automatically lowercased - * - * @param string $charset the character set - */ - public function setCharset($charset) - { - $this->charset = strtolower((string) $charset); - } - - /** - * returns the current template being rendered, when applicable, or null - * - * @return Dwoo_ITemplate|null - */ - public function getTemplate() - { - return $this->template; - } - - /** - * sets the current template being rendered - * - * @param Dwoo_ITemplate $tpl template object - */ - public function setTemplate(Dwoo_ITemplate $tpl) - { - $this->template = $tpl; - } - - /** - * sets the default compiler factory function for the given resource name - * - * a compiler factory must return a Dwoo_ICompiler object pre-configured to fit your needs - * - * @param string $resourceName the resource name (i.e. file, string) - * @param callback $compilerFactory the compiler factory callback - */ - public function setDefaultCompilerFactory($resourceName, $compilerFactory) - { - $this->resources[$resourceName]['compiler'] = $compilerFactory; - } - - /** - * returns the default compiler factory function for the given resource name - * - * @param string $resourceName the resource name - * @return callback the compiler factory callback - */ - public function getDefaultCompilerFactory($resourceName) - { - return $this->resources[$resourceName]['compiler']; - } - - /** - * sets the security policy object to enforce some php security settings - * - * use this if untrusted persons can modify templates - * - * @param Dwoo_Security_Policy $policy the security policy object - */ - public function setSecurityPolicy(Dwoo_Security_Policy $policy = null) - { - $this->securityPolicy = $policy; - } - - /** - * returns the current security policy object or null by default - * - * @return Dwoo_Security_Policy|null the security policy object if any - */ - public function getSecurityPolicy() - { - return $this->securityPolicy; - } - - /** - * sets the object that must be used as a plugin proxy when plugin can't be found - * by dwoo's loader - * - * @param Dwoo_IPluginProxy $pluginProxy the proxy object - */ - public function setPluginProxy(Dwoo_IPluginProxy $pluginProxy) { - $this->pluginProxy = $pluginProxy; - } - - /** - * returns the current plugin proxy object or null by default - * - * @param Dwoo_IPluginProxy|null the proxy object if any - */ - public function getPluginProxy() { - return $this->pluginProxy; - } - - /* - * --------- util functions --------- - */ - - /** - * [util function] checks whether the given template is cached or not - * - * @param Dwoo_ITemplate $tpl the template object - * @return bool - */ - public function isCached(Dwoo_ITemplate $tpl) - { - return is_string($tpl->getCachedTemplate($this)); - } - - /** - * [util function] clears the cached templates if they are older than the given time - * - * @param int $olderThan minimum time (in seconds) required for a cached template to be cleared - * @return int the amount of templates cleared - */ - public function clearCache($olderThan=-1) - { - $cacheDirs = new RecursiveDirectoryIterator($this->getCacheDir()); - $cache = new RecursiveIteratorIterator($cacheDirs); - $expired = time() - $olderThan; - $count = 0; - foreach ($cache as $file) { - if ($cache->isDot() || $cache->isDir() || substr($file, -5) !== '.html') { - continue; - } - if ($cache->getCTime() < $expired) { - $count += unlink((string) $file) ? 1 : 0; - } - } - return $count; - } - - /** - * [util function] fetches a template object of the given resource - * - * @param string $resourceName the resource name (i.e. file, string) - * @param string $resourceId the resource identifier (i.e. file path) - * @param int $cacheTime the cache time setting for this resource - * @param string $cacheId the unique cache identifier - * @param string $compileId the unique compiler identifier - * @return Dwoo_ITemplate - */ - public function templateFactory($resourceName, $resourceId, $cacheTime = null, $cacheId = null, $compileId = null, Dwoo_ITemplate $parentTemplate = null) - { - if (isset($this->resources[$resourceName])) { - // TODO could be changed to $this->resources[$resourceName]['class']::templateFactory(..) in 5.3 maybe - return call_user_func(array($this->resources[$resourceName]['class'], 'templateFactory'), $this, $resourceId, $cacheTime, $cacheId, $compileId, $parentTemplate); - } else { - throw new Dwoo_Exception('Unknown resource type : '.$resourceName); - } - } - - /** - * [util function] checks if the input is an array or an iterator object, optionally it can also check if it's empty - * - * @param mixed $value the variable to check - * @param bool $checkIsEmpty if true, the function will also check if the array is empty, - * and return true only if it's not empty - * @return bool true if it's an array (and not empty) or false if it's not an array (or if it's empty) - */ - public function isArray($value, $checkIsEmpty=false) - { - if (is_array($value) === true) { - if ($checkIsEmpty === false) { - return true; - } else { - return count($value) > 0; - } - } elseif ($value instanceof Iterator) { - if ($checkIsEmpty === false) { - return true; - } elseif ($value instanceof Countable) { - return count($value) > 0; - } else { - $value->rewind(); - return $value->valid(); - } - } elseif ($value instanceof ArrayAccess) { - if ($checkIsEmpty === false) { - return true; - } elseif ($value instanceof Countable) { - return count($value) > 0; - } else { - return $value->offsetExists(0); - } - } - return false; - } - - /** - * [util function] triggers a dwoo error - * - * @param string $message the error message - * @param int $level the error level, one of the PHP's E_* constants - */ - public function triggerError($message, $level=E_USER_NOTICE) - { - if (!($tplIdentifier = $this->template->getResourceIdentifier())) { - $tplIdentifier = $this->template->getResourceName(); - } - trigger_error('Dwoo error (in '.$tplIdentifier.') : '.$message, $level); - } - - /* - * --------- runtime functions --------- - */ - - /** - * [runtime function] adds a block to the block stack - * - * @param string $blockName the block name (without Dwoo_Plugin_ prefix) - * @param array $args the arguments to be passed to the block's init() function - * @return Dwoo_Block_Plugin the newly created block - */ - public function addStack($blockName, array $args=array()) - { - if (isset($this->plugins[$blockName])) { - $class = $this->plugins[$blockName]['class']; - } else { - $class = 'Dwoo_Plugin_'.$blockName; - } - - if ($this->curBlock !== null) { - $this->curBlock->buffer(ob_get_contents()); - ob_clean(); - } else { - $this->buffer .= ob_get_contents(); - ob_clean(); - } - - $block = new $class($this); - - $cnt = count($args); - if ($cnt===0) { - $block->init(); - } elseif ($cnt===1) { - $block->init($args[0]); - } elseif ($cnt===2) { - $block->init($args[0], $args[1]); - } elseif ($cnt===3) { - $block->init($args[0], $args[1], $args[2]); - } elseif ($cnt===4) { - $block->init($args[0], $args[1], $args[2], $args[3]); - } else { - call_user_func_array(array($block,'init'), $args); - } - - $this->stack[] = $this->curBlock = $block; - return $block; - } - - /** - * [runtime function] removes the plugin at the top of the block stack - * - * calls the block buffer() function, followed by a call to end() - * and finally a call to process() - */ - public function delStack() - { - $args = func_get_args(); - - $this->curBlock->buffer(ob_get_contents()); - ob_clean(); - - $cnt = count($args); - if ($cnt===0) { - $this->curBlock->end(); - } elseif ($cnt===1) { - $this->curBlock->end($args[0]); - } elseif ($cnt===2) { - $this->curBlock->end($args[0], $args[1]); - } elseif ($cnt===3) { - $this->curBlock->end($args[0], $args[1], $args[2]); - } elseif ($cnt===4) { - $this->curBlock->end($args[0], $args[1], $args[2], $args[3]); - } else { - call_user_func_array(array($this->curBlock, 'end'), $args); - } - - $tmp = array_pop($this->stack); - - if (count($this->stack) > 0) { - $this->curBlock = end($this->stack); - $this->curBlock->buffer($tmp->process()); - } else { - $this->curBlock = null; - echo $tmp->process(); - } - - unset($tmp); - } - - /** - * [runtime function] returns the parent block of the given block - * - * @param Dwoo_Block_Plugin $block - * @return Dwoo_Block_Plugin or false if the given block isn't in the stack - */ - public function getParentBlock(Dwoo_Block_Plugin $block) - { - $index = array_search($block, $this->stack, true); - if ($index !== false && $index > 0) { - return $this->stack[$index-1]; - } - return false; - } - - /** - * [runtime function] finds the closest block of the given type, starting at the top of the stack - * - * @param string $type the type of plugin you want to find - * @return Dwoo_Block_Plugin or false if no plugin of such type is in the stack - */ - public function findBlock($type) - { - if (isset($this->plugins[$type])) { - $type = $this->plugins[$type]['class']; - } else { - $type = 'Dwoo_Plugin_'.str_replace('Dwoo_Plugin_', '', $type); - } - - $keys = array_keys($this->stack); - while (($key = array_pop($keys)) !== false) { - if ($this->stack[$key] instanceof $type) { - return $this->stack[$key]; - } - } - return false; - } - - /** - * [runtime function] returns a Dwoo_Plugin of the given class - * - * this is so a single instance of every class plugin is created at each template run, - * allowing class plugins to have "per-template-run" static variables - * - * @private - * @param string $class the class name - * @return mixed an object of the given class - */ - public function getObjectPlugin($class) - { - if (isset($this->runtimePlugins[$class])) { - return $this->runtimePlugins[$class]; - } - return $this->runtimePlugins[$class] = new $class($this); - } - - /** - * [runtime function] calls the process() method of the given class-plugin name - * - * @param string $plugName the class plugin name (without Dwoo_Plugin_ prefix) - * @param array $params an array of parameters to send to the process() method - * @return string the process() return value - */ - public function classCall($plugName, array $params = array()) - { - $class = 'Dwoo_Plugin_'.$plugName; - - $plugin = $this->getObjectPlugin($class); - - $cnt = count($params); - if ($cnt===0) { - return $plugin->process(); - } elseif ($cnt===1) { - return $plugin->process($params[0]); - } elseif ($cnt===2) { - return $plugin->process($params[0], $params[1]); - } elseif ($cnt===3) { - return $plugin->process($params[0], $params[1], $params[2]); - } elseif ($cnt===4) { - return $plugin->process($params[0], $params[1], $params[2], $params[3]); - } else { - return call_user_func_array(array($plugin, 'process'), $params); - } - } - - /** - * [runtime function] calls a php function - * - * @param string $callback the function to call - * @param array $params an array of parameters to send to the function - * @return mixed the return value of the called function - */ - public function arrayMap($callback, array $params) - { - if ($params[0] === $this) { - $addThis = true; - array_shift($params); - } - if ((is_array($params[0]) || ($params[0] instanceof Iterator && $params[0] instanceof ArrayAccess))) { - if (empty($params[0])) { - return $params[0]; - } - - // array map - $out = array(); - $cnt = count($params); - - if (isset($addThis)) { - array_unshift($params, $this); - $items = $params[1]; - $keys = array_keys($items); - - if (is_string($callback) === false) { - while (($i = array_shift($keys)) !== null) { - $out[] = call_user_func_array($callback, array(1=>$items[$i]) + $params); - } - } elseif ($cnt===1) { - while (($i = array_shift($keys)) !== null) { - $out[] = $callback($this, $items[$i]); - } - } elseif ($cnt===2) { - while (($i = array_shift($keys)) !== null) { - $out[] = $callback($this, $items[$i], $params[2]); - } - } elseif ($cnt===3) { - while (($i = array_shift($keys)) !== null) { - $out[] = $callback($this, $items[$i], $params[2], $params[3]); - } - } else { - while (($i = array_shift($keys)) !== null) { - $out[] = call_user_func_array($callback, array(1=>$items[$i]) + $params); - } - } - } else { - $items = $params[0]; - $keys = array_keys($items); - - if (is_string($callback) === false) { - while (($i = array_shift($keys)) !== null) { - $out[] = call_user_func_array($callback, array($items[$i]) + $params); - } - } elseif ($cnt===1) { - while (($i = array_shift($keys)) !== null) { - $out[] = $callback($items[$i]); - } - } elseif ($cnt===2) { - while (($i = array_shift($keys)) !== null) { - $out[] = $callback($items[$i], $params[1]); - } - } elseif ($cnt===3) { - while (($i = array_shift($keys)) !== null) { - $out[] = $callback($items[$i], $params[1], $params[2]); - } - } elseif ($cnt===4) { - while (($i = array_shift($keys)) !== null) { - $out[] = $callback($items[$i], $params[1], $params[2], $params[3]); - } - } else { - while (($i = array_shift($keys)) !== null) { - $out[] = call_user_func_array($callback, array($items[$i]) + $params); - } - } - } - return $out; - } else { - return $params[0]; - } - } - - /** - * [runtime function] reads a variable into the given data array - * - * @param string $varstr the variable string, using dwoo variable syntax (i.e. "var.subvar[subsubvar]->property") - * @param mixed $data the data array or object to read from - * @param bool $safeRead if true, the function will check whether the index exists to prevent any notices from being output - * @return mixed - */ - public function readVarInto($varstr, $data, $safeRead = false) - { - if ($data === null) { - return null; - } - - if (is_array($varstr) === false) { - preg_match_all('#(\[|->|\.)?((?:[^.[\]-]|-(?!>))+)\]?#i', $varstr, $m); - } else { - $m = $varstr; - } - unset($varstr); - - while (list($k, $sep) = each($m[1])) { - if ($sep === '.' || $sep === '[' || $sep === '') { - if ((is_array($data) || $data instanceof ArrayAccess) && ($safeRead === false || isset($data[$m[2][$k]]))) { - $data = $data[$m[2][$k]]; - } else { - return null; - } - } else { - if (is_object($data) && ($safeRead === false || isset($data->$m[2][$k]) || is_callable(array($data, '__get')))) { - $data = $data->$m[2][$k]; - } else { - return null; - } - } - } - - return $data; - } - - /** - * [runtime function] reads a variable into the parent scope - * - * @param int $parentLevels the amount of parent levels to go from the current scope - * @param string $varstr the variable string, using dwoo variable syntax (i.e. "var.subvar[subsubvar]->property") - * @return mixed - */ - public function readParentVar($parentLevels, $varstr = null) - { - $tree = $this->scopeTree; - $cur = $this->data; - - while ($parentLevels--!==0) { - array_pop($tree); - } - - while (($i = array_shift($tree)) !== null) { - if (is_object($cur)) { - $cur = $cur->$i; - } else { - $cur = $cur[$i]; - } - } - - if ($varstr!==null) { - return $this->readVarInto($varstr, $cur); - } else { - return $cur; - } - } - - /** - * [runtime function] reads a variable into the current scope - * - * @param string $varstr the variable string, using dwoo variable syntax (i.e. "var.subvar[subsubvar]->property") - * @return mixed - */ - public function readVar($varstr) - { - if (is_array($varstr)===true) { - $m = $varstr; - unset($varstr); - } else { - if (strstr($varstr, '.') === false && strstr($varstr, '[') === false && strstr($varstr, '->') === false) { - if ($varstr === 'dwoo') { - return $this->globals; - } elseif ($varstr === '__' || $varstr === '_root' ) { - return $this->data; - $varstr = substr($varstr, 6); - } elseif ($varstr === '_' || $varstr === '_parent') { - $varstr = '.'.$varstr; - $tree = $this->scopeTree; - $cur = $this->data; - array_pop($tree); - - while (($i = array_shift($tree)) !== null) { - if (is_object($cur)) { - $cur = $cur->$i; - } else { - $cur = $cur[$i]; - } - } - - return $cur; - } - - $cur = $this->scope; - - if (isset($cur[$varstr])) { - return $cur[$varstr]; - } else { - return null; - } - } - - if (substr($varstr, 0, 1) === '.') { - $varstr = 'dwoo'.$varstr; - } - - preg_match_all('#(\[|->|\.)?((?:[^.[\]-]|-(?!>))+)\]?#i', $varstr, $m); - } - - $i = $m[2][0]; - if ($i === 'dwoo') { - $cur = $this->globals; - array_shift($m[2]); - array_shift($m[1]); - switch ($m[2][0]) { - - case 'get': - $cur = $_GET; - break; - case 'post': - $cur = $_POST; - break; - case 'session': - $cur = $_SESSION; - break; - case 'cookies': - case 'cookie': - $cur = $_COOKIE; - break; - case 'server': - $cur = $_SERVER; - break; - case 'env': - $cur = $_ENV; - break; - case 'request': - $cur = $_REQUEST; - break; - case 'const': - array_shift($m[2]); - if (defined($m[2][0])) { - return constant($m[2][0]); - } else { - return null; - } - - } - if ($cur !== $this->globals) { - array_shift($m[2]); - array_shift($m[1]); - } - } elseif ($i === '__' || $i === '_root') { - $cur = $this->data; - array_shift($m[2]); - array_shift($m[1]); - } elseif ($i === '_' || $i === '_parent') { - $tree = $this->scopeTree; - $cur = $this->data; - - while (true) { - array_pop($tree); - array_shift($m[2]); - array_shift($m[1]); - if (current($m[2]) === '_' || current($m[2]) === '_parent') { - continue; - } - - while (($i = array_shift($tree)) !== null) { - if (is_object($cur)) { - $cur = $cur->$i; - } else { - $cur = $cur[$i]; - } - } - break; - } - } else { - $cur = $this->scope; - } - - while (list($k, $sep) = each($m[1])) { - if ($sep === '.' || $sep === '[' || $sep === '') { - if ((is_array($cur) || $cur instanceof ArrayAccess) && isset($cur[$m[2][$k]])) { - $cur = $cur[$m[2][$k]]; - } else { - return null; - } - } elseif ($sep === '->') { - if (is_object($cur)) { - $cur = $cur->$m[2][$k]; - } else { - return null; - } - } else { - return null; - } - } - - return $cur; - } - - /** - * [runtime function] assign the value to the given variable - * - * @param mixed $value the value to assign - * @param string $scope the variable string, using dwoo variable syntax (i.e. "var.subvar[subsubvar]->property") - * @return bool true if assigned correctly or false if a problem occured while parsing the var string - */ - public function assignInScope($value, $scope) - { - $tree =& $this->scopeTree; - $data =& $this->data; - - if (!is_string($scope)) { - return $this->triggerError('Assignments must be done into strings, ('.gettype($scope).') '.var_export($scope, true).' given', E_USER_ERROR); - } - if (strstr($scope, '.') === false && strstr($scope, '->') === false) { - $this->scope[$scope] = $value; - } else { - // TODO handle _root/_parent scopes ? - preg_match_all('#(\[|->|\.)?([^.[\]-]+)\]?#i', $scope, $m); - - $cur =& $this->scope; - $last = array(array_pop($m[1]), array_pop($m[2])); - - while (list($k, $sep) = each($m[1])) { - if ($sep === '.' || $sep === '[' || $sep === '') { - if (is_array($cur) === false) { - $cur = array(); - } - $cur =& $cur[$m[2][$k]]; - } elseif ($sep === '->') { - if (is_object($cur) === false) { - $cur = new stdClass; - } - $cur =& $cur->$m[2][$k]; - } else { - return false; - } - } - - if ($last[0] === '.' || $last[0] === '[' || $last[0] === '') { - if (is_array($cur) === false) { - $cur = array(); - } - $cur[$last[1]] = $value; - } elseif ($last[0] === '->') { - if (is_object($cur) === false) { - $cur = new stdClass; - } - $cur->$last[1] = $value; - } else { - return false; - } - } - } - - /** - * [runtime function] sets the scope to the given scope string or array - * - * @param mixed $scope a string i.e. "level1.level2" or an array i.e. array("level1", "level2") - * @param bool $absolute if true, the scope is set from the top level scope and not from the current scope - * @return array the current scope tree - */ - public function setScope($scope, $absolute = false) - { - $old = $this->scopeTree; - - if (is_string($scope)===true) { - $scope = explode('.', $scope); - } - - if ($absolute===true) { - $this->scope =& $this->data; - $this->scopeTree = array(); - } - - while (($bit = array_shift($scope)) !== null) { - if ($bit === '_' || $bit === '_parent') { - array_pop($this->scopeTree); - $this->scope =& $this->data; - $cnt = count($this->scopeTree); - for ($i=0;$i<$cnt;$i++) - $this->scope =& $this->scope[$this->scopeTree[$i]]; - } elseif ($bit === '__' || $bit === '_root') { - $this->scope =& $this->data; - $this->scopeTree = array(); - } elseif (isset($this->scope[$bit])) { - $this->scope =& $this->scope[$bit]; - $this->scopeTree[] = $bit; - } else { - unset($this->scope); - $this->scope = null; - } - } - - return $old; - } - - /** - * [runtime function] returns the entire data array - * - * @return array - */ - public function getData() - { - return $this->data; - } - - /** - * [runtime function] returns a reference to the current scope - * - * @return &mixed - */ - public function &getScope() - { - return $this->scope; - } - - /** - * Redirects all calls to unexisting to plugin proxy. - * - * @param string Method name - * @param array List of arguments - * @return mixed - */ - public function __call($method, $args) { - $proxy = $this->getPluginProxy(); - if (!$proxy) { - throw new Dwoo_Exception('Call to undefined method '.__CLASS__.'::'.$method.'()'); - } - return call_user_func_array($proxy->getCallback($method), $args); - } -} diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/DwooRenderer.php b/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/DwooRenderer.php deleted file mode 100644 index e46a01d..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/DwooRenderer.php +++ /dev/null @@ -1,196 +0,0 @@ - - * - * ro - * rq - * ct - * us - * tm - * rd - * - * true - * %core.lib_dir%/dwoo_plugins - * - * - * - add dwoo's directory to your include path or include dwooAutoload.php yourself - * either through agavi's autoload.xml (with name="Dwoo") or through your index.php - * - * Notes: - * - you can copy the /Dwoo/Adapters/Agavi/dwoo_plugins directory to your agavi app's - * lib directory, or change the plugin_dir parameter in the output_types.xml file. - * these plugins are agavi-specific helpers that shortens the syntax to call common - * agavi helpers (i18n, routing, ..) - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the - * use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.1.0 - * @date 2009-07-18 - * @package Dwoo - */ -class DwooRenderer extends AgaviRenderer implements AgaviIReusableRenderer -{ - /** - * @constant string The directory inside the cache dir where templates will - * be stored in compiled form. - */ - const COMPILE_DIR = 'templates'; - - /** - * @constant string The subdirectory inside the compile dir where templates - * will be stored in compiled form. - */ - const COMPILE_SUBDIR = 'dwoo'; - - /** - * @constant string The directory inside the cache dir where cached content - * will be stored. - */ - const CACHE_DIR = 'dwoo'; - - /** - * @var Dwoo Dwoo template engine. - */ - protected $dwoo = null; - - /** - * @var string A string with the default template file extension, - * including the dot. - */ - protected $defaultExtension = '.html'; - - /** - * stores the (optional) plugin directory to add to the Dwoo_Loader - */ - protected $plugin_dir = null; - - /** - * Pre-serialization callback. - * - * Excludes the Dwoo instance to prevent excessive serialization load. - */ - public function __sleep() - { - $keys = parent::__sleep(); - unset($keys[array_search('dwoo', $keys)]); - return $keys; - } - - /** - * Initialize this Renderer. - * - * @param AgaviContext The current application context. - * @param array An associative array of initialization parameters. - */ - public function initialize(AgaviContext $context, array $parameters = array()) - { - parent::initialize($context, $parameters); - - $this->plugin_dir = $this->getParameter('plugin_dir', $this->plugin_dir); - } - - /** - * provides a custom compiler to the dwoo renderer with optional settings - * you can set in the agavi output_types.xml config file - * - * @return Dwoo_Compiler - */ - public function compilerFactory() - { - if (class_exists('Dwoo_Compiler', false) === false) { - include DWOO_DIRECTORY . 'Dwoo/Compiler.php'; - } - $compiler = Dwoo_Compiler::compilerFactory(); - $compiler->setAutoEscape((bool) $this->getParameter('auto_escape', false)); - return $compiler; - } - - /** - * Grab a cleaned up dwoo instance. - * - * @return Dwoo A Dwoo instance. - */ - protected function getEngine() - { - if($this->dwoo) { - return $this->dwoo; - } - - if(!class_exists('Dwoo')) { - if (file_exists(dirname(__FILE__).'/../../../dwooAutoload.php')) { - // file was dropped with the entire dwoo package - require dirname(__FILE__).'/../../../dwooAutoload.php'; - } else { - // assume the dwoo package is in the include path - require 'dwooAutoload.php'; - } - } - - $parentMode = fileperms(AgaviConfig::get('core.cache_dir')); - - $compileDir = AgaviConfig::get('core.cache_dir') . DIRECTORY_SEPARATOR . self::COMPILE_DIR . DIRECTORY_SEPARATOR . self::COMPILE_SUBDIR; - AgaviToolkit::mkdir($compileDir, $parentMode, true); - - $cacheDir = AgaviConfig::get('core.cache_dir') . DIRECTORY_SEPARATOR . self::CACHE_DIR; - AgaviToolkit::mkdir($cacheDir, $parentMode, true); - - $this->dwoo = new Dwoo($compileDir, $cacheDir); - - if (!empty($this->plugin_dir)) { - $this->dwoo->getLoader()->addDirectory($this->plugin_dir); - } - - $this->dwoo->setDefaultCompilerFactory('file', array($this, 'compilerFactory')); - - return $this->dwoo; - } - - /** - * Render the presentation and return the result. - * - * @param AgaviTemplateLayer The template layer to render. - * @param array The template variables. - * @param array The slots. - * @param array Associative array of additional assigns. - * - * @return string A rendered result. - */ - public function render(AgaviTemplateLayer $layer, array &$attributes = array(), array &$slots = array(), array &$moreAssigns = array()) - { - $engine = $this->getEngine(); - - $data = array(); - if($this->extractVars) { - $data = $attributes; - } else { - $data[$this->varName] = &$attributes; - } - - $data[$this->slotsVarName] =& $slots; - - foreach($this->assigns as $key => $getter) { - $data[$key] = $this->context->$getter(); - } - - foreach($moreAssigns as $key => &$value) { - if(isset($this->moreAssignNames[$key])) { - $key = $this->moreAssignNames[$key]; - } - $data[$key] =& $value; - } - - return $engine->get($layer->getResourceStreamIdentifier(), $data); - } -} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/README b/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/README deleted file mode 100644 index a82547c..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/README +++ /dev/null @@ -1,27 +0,0 @@ -// ------------------------ -// Install notes : -// ------------------------ - - - drop dwoo's directory in app/lib/renderer (create if needed) - - - add a renderer to app/config/output_types.xml as such : - - - ro - rq - ct - us - tm - rd - - true - %core.lib_dir%/dwoo_plugins - - - - add the renderer to app/config/autoload.xml as such : - %core.lib_dir%/renderer/dwoo/Dwoo/Adapter/Agavi/DwooRenderer.php - - - you can copy the /Dwoo/Adapters/Agavi/dwoo_plugins directory to your agavi app's - lib directory, or change the plugin_dir parameter in the output_types.xml file. - these plugins are agavi-specific helpers that shortens the syntax to call common - agavi helpers (i18n, routing, ..) diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/t.php b/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/t.php deleted file mode 100644 index 45b9eb6..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/t.php +++ /dev/null @@ -1,32 +0,0 @@ -Agavi specific plugin - * - * uses AgaviTranslationManager to localize a string - * - *
        - *  * string : the string to localize
        - * 
        - * - * Examples: - * - * {t "Hello"} - * {t $header} - * - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -function Dwoo_Plugin_t_compile(Dwoo_Compiler $compiler, $string) -{ - return '$this->data[\'tm\']->_('.$string.')'; -} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/url.php b/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/url.php deleted file mode 100644 index f9bd9b0..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Adapters/Agavi/dwoo_plugins/url.php +++ /dev/null @@ -1,54 +0,0 @@ -Agavi specific plugin - * - * uses AgaviRouting to create an url - * - *
        - *  * route : the route name, optional (by default the current url is returned)
        - *  * params : an array with variables to build the route, optional
        - *  * options : an array of options to pass to the routing object, optional
        - *  * rest : for convenience, you can just pass named parameters that will be used as
        - *           the params array, but you must not provide the params array in this case
        - * 
        - * - * Examples: - * - * {a url("route.name" array(param="Value", param2=$otherVal))}Here is a link{/a} - *
        {* without any parameter it just returns the current url *} - * - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -function Dwoo_Plugin_url_compile(Dwoo_Compiler $compiler, $route = null, $params = null, $options = null, array $rest = array()) -{ - if ($params == 'null') { - if (count($rest)) { - $params = array(); - foreach ($rest as $k=>$v) { - if (is_numeric($k)) { - $params[] = $k.'=>'.$v; - } else { - $params[] = '"'.$k.'"=>'.$v; - } - } - $params = 'array('.implode(', ', $params).')'; - } else { - $params = 'array()'; - } - } - if ($options == 'null') { - $options = 'array()'; - } - return '$this->data[\'ro\']->gen('.$route.', '.$params.', '.$options.')'; -} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/CakePHP/README b/_piecrust/libs/Dwoo/Dwoo/Adapters/CakePHP/README deleted file mode 100644 index a689b30..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Adapters/CakePHP/README +++ /dev/null @@ -1,33 +0,0 @@ -// CakePHP Dwoo bridge - v0.2 -// ------------------------ -// Installation : -// ------------------------ -// 1. Download and install the dwoo library, preferably on the -// 'vendors' directory of CakePHP. However you can place it -// anywhere you want; if you do, make sure to change the App::import -// line in dwoo.php to include the dwoo library properly. -// -// 2. Place this file in the app/views directory, or on cake/libs/view. -// -// 3. Create the app/tmp/dwoo/cache and app/tmp/dwoo/compile directories -// and make sure they are writable. -// ------------------------ -// Usage example : -// ------------------------ - -// In your controller class you need to change the view property to -// use Dwoo at some point in the execution using : - -$this->view = 'Dwoo'; - -// Or you can also override the view property in your AppController class as such : - -class AppController extends Controller { - public $view = 'Dwoo'; -} - -// If you want another template extension (default is .tpl) you must -// edit the dwoo.php file at line 44 and change it to : -$this->ext = ".html"; - -//{include $templatedir."index.tpl"} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/CakePHP/dwoo.php b/_piecrust/libs/Dwoo/Dwoo/Adapters/CakePHP/dwoo.php deleted file mode 100644 index b986fec..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Adapters/CakePHP/dwoo.php +++ /dev/null @@ -1,143 +0,0 @@ - 'dwoo/dwooAutoload.php')); - -/** - * Dwoo adapter for CakePHP - * - * Based on SmartyView by Mark John S. Buenconsejo - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * This file is released under the LGPL - * "GNU Lesser General Public License" - * More information can be found here: - * {@link http://www.gnu.org/copyleft/lesser.html} - * - * @author Mark John S. Buenconsejo - * @author Giangi - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License - * @link http://dwoo.org/ - * @version 1.1.0 - * @date 2009-07-18 - * @package Dwoo - */ -class DwooView extends View -{ - protected $_sv_template_dir; - protected $_sv_layout_dir; - protected $_sv_compile_dir; - protected $_sv_cache_dir; - protected $_sv_compile_id; - - protected $_dwoo; - - public $sv_processedTpl; - - public function __construct(&$controller) - { - parent::__construct($controller); - - $this->ext = '.tpl'; - - $this->_sv_template_dir = array - ( - VIEWS . $this->viewPath . DS . $this->subDir, - VIEWS . $this->viewPath, - VIEWS - ); - - $this->_sv_layout_dir = array - ( - LAYOUTS . $this->subDir, - VIEWS - ); - - $this->_sv_compile_dir = TMP . 'dwoo' . DS . 'compile'; - $this->_sv_cache_dir = TMP . 'dwoo' . DS . 'cache'; - - $this->_dwoo = new Dwoo($this->_sv_compile_dir, $this->_sv_cache_dir); - - $this->_sv_compile_id = $controller->name; - - $this->_dwoo->sv_this = $this; - $this->_dwoo->setSecurityPolicy(); - - return; - } - - /** - * changes the template directory - */ - public function setTemplateDir($path = VIEW) { - $old = $this->_sv_template_dir; - $this->_sv_template_dir = $path; - - return $old; - } - - public function getTemplateDir() { - return $this->_sv_template_dir ; - } - - public function _render($___viewFn, $___data_for_view, $___play_safe = true, $loadHelpers = true) - { - // let's determine if this is a layout call or a template call - // and change the template dir accordingly - $layout = false; - if(isset($___data_for_view['content_for_layout'])) { - $this->_sv_template_dir = $this->_sv_layout_dir; - $layout = true; - } - - $tpl = new Dwoo_Template_File($___viewFn); - $data = $___data_for_view; - - $data['view'] = $this; - - if ($this->helpers != false && $loadHelpers === true) { - $loadedHelpers = array(); - $loadedHelpers = $this->_loadHelpers($loadedHelpers, $this->helpers); - - foreach (array_keys($loadedHelpers) as $helper) { - $camelBackedHelper = strtolower(substr($helper, 0, 1)) . substr($helper, 1); - - ${$camelBackedHelper} = $loadedHelpers[$helper]; - - if (is_array(${$camelBackedHelper}->helpers) && !empty(${$camelBackedHelper}->helpers)) { - $subHelpers = ${$camelBackedHelper}->helpers; - foreach ($subHelpers as $subHelper) { - ${$camelBackedHelper}->{$subHelper} = $loadedHelpers[$subHelper]; - } - } - - if(isset($this->passedArgs)) { - ${$camelBackedHelper}->passedArgs = $this->passedArgs; - } - - $this->loaded[$camelBackedHelper] = ${$camelBackedHelper}; - - $data[$camelBackedHelper] = ${$camelBackedHelper}; - } - } - - if ($this->helpers != false && $loadHelpers === true) { - foreach ($loadedHelpers as $helper) { - if (is_object($helper)) { - if (is_subclass_of($helper, 'Helper') || is_subclass_of($helper, 'helper')) { - $helper->beforeRender(); - } - } - } - } - - return $this->_dwoo->get($tpl, $data); - } - - public function get(){ - return $this->_dwoo; - } -} diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/README b/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/README deleted file mode 100644 index 8207568..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/README +++ /dev/null @@ -1,36 +0,0 @@ -CodeIgniter/Dwoo adapater -------------------------- -Integration of Dwoo into Codeigniter (1.7.0 >) - -Links: -Dwoo - http://dwoo.org -CodeIgniter - http://codeigniter.com - -Installation: -1) Extract package into your application directory (i.e. $webroot/application or - $webroot/system/application) -2) Change the parameters in config/dwootemplate.php -3) Create the compile and cache directory you set in your config file in step 2 - and give it the correct rights (chmod 777 when on *nix) -4) Extract/copy the Dwoo package into application/libraries/dwoo -5) Browse to : http://[yoururl]/dwoowelcome - - -Version info -1.0.2 [11-03-2009] Fixed a problem with $data attribute (which Dwoo also used) -1.0.1 [12-11-2008] Removed some & in the dwootemplate - Changed licencse - Changed 'output' in 'get' in the dwootemplate (line 122) -1.0.0 [11-11-2008] Initial release - - -Questions/Remarks? -mail to: stefan.verstege@newmedia.nl -IM me on GTALK: verstege@gmail.com -Contact me on the Dwoo forums: stefanv - ----------[ copyright notice ]----------------------------------------------------------------------- -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. - -License http://dwoo.org/LICENSE Modified BSD License \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/config/dwootemplate.php b/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/config/dwootemplate.php deleted file mode 100644 index d7257e0..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/config/dwootemplate.php +++ /dev/null @@ -1,12 +0,0 @@ -load->library('Dwootemplate'); - $this->dwootemplate->assign('itshowlate', date('H:i:s')); - $this->dwootemplate->display('dwoowelcome.tpl'); - } -} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/libraries/Dwootemplate.php b/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/libraries/Dwootemplate.php deleted file mode 100644 index 875e6cf..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/libraries/Dwootemplate.php +++ /dev/null @@ -1,172 +0,0 @@ - - * @copyright Copyright (c) 2008, Stefan Verstege - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://www.newmedia.nl/ - * @version 1.1.0 - * @date 2009-07-18 - * @package Dwoo - * - * @uses the dwoo package from http://dwoo.org - */ -class Dwootemplate extends Dwoo { - protected $dwoo_data = array(); - - /** - * Constructor for the DwooTemplate engine - * - */ - public function __construct() { - // Call parents constructor - parent::__construct(); - - // Set the config settings - $this->initialize(); - - // Assign some defaults to dwoo - $CI = get_instance(); - $this->dwoo_data = new Dwoo_Data(); - $this->dwoo_data->js_files = array(); - $this->dwoo_data->css_files = array(); - $this->dwoo_data->CI = $CI; - $this->dwoo_data->site_url = $CI->config->site_url(); // so we can get the full path to CI easily - $this->dwoo_data->uniqid = uniqid(); - $this->dwoo_data->timestamp = mktime(); - - log_message('debug', "Dwoo Template Class Initialized"); - } - - - /** - * Assign data to dwoo data object - * - * @param string $key - * @param mixed $value - */ - public function assign($key, $value) { - $this->dwoo_data->$key = $value; - } - - - /** - * Add Javascript files to template - * - * @param string $js - */ - public function add_js($js) { - $current = $this->dwoo_data->js_files; - $current[] = $js; - $this->dwoo_data->js_files = $current; - } - - - /** - * Add Css stylesheets to template - * - * @param string $css - */ - public function add_css($css) { - $current = $this->dwoo_data->css_files; - $current[] = $css; - $this->dwoo_data->css_files = $current; - } - - - /** - * Display or return the compiled template - * Since we assign the results to the standard CI output module - * you can also use the helper from CI in your templates!! - * - * @param string $sTemplate - * @param boolean $return - * @return mixed - */ - public function display($sTemplate, $return = FALSE) { - // Start benchmark - $CI = get_instance(); - $CI->benchmark->mark('dwoo_parse_start'); - - // Check if file exists - if ( !file_exists($this->template_dir . $sTemplate ) ) { - $message = sprintf('Template file \'%s\' not found.', $sTemplate); - show_error($message); - log_message('error', $message); - } - - // Create new template - $tpl = new Dwoo_Template_File($this->template_dir . $sTemplate); - - // render the template - $template = $this->get($tpl, $this->dwoo_data); - - // Finish benchmark - $CI->benchmark->mark('dwoo_parse_end'); - - // Return results or not ? - if ($return == FALSE) { - $CI->output->final_output = $template; - } else { - return $template; - } - } - - - /** - * Toggle Codeigniter profiler on/off - * - */ - public function enable_profiler($toggle = TRUE) { - $CI = get_instance(); - $CI->output->enable_profiler($toggle); - } - - - /** - * Set http header - * - * @example $this->output->set_header("HTTP/1.1 200 OK"); - * @example $this->output->set_header('Last-Modified: '.gmdate('D, d M Y H:i:s', $last_update).' GMT'); - * @param string $header - */ - public function set_header($header) { - $CI = get_instance(); - $CI->output->set_header($header); - } - - - /** - * Set status header - * - * @example $this->output->set_status_header('401'); - * @example // Sets the header as: Unauthorized - * @param string $header - */ - public function set_status_header($header) { - $CI = get_instance(); - $CI->output->set_status_header($header); - } - - - /** - * Assign the dwootemplate config items to the instance - * - */ - private function initialize() { - $CI = get_instance(); - $CI->config->load('dwootemplate', TRUE); - $config = $CI->config->item('dwootemplate'); - foreach ($config as $key => $val) { - $this->$key = $val; - } - } -} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/views/dwoowelcome.tpl b/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/views/dwoowelcome.tpl deleted file mode 100644 index 53da956..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/views/dwoowelcome.tpl +++ /dev/null @@ -1,31 +0,0 @@ -{extends "page.tpl"} - -{block "title"} -Welcome to Dwoo-ed CodeIgniter -{/block} - -{block "content"} -

        Welcome to Dwoo-ed CodeIgniter!

        - -

        The page you are looking at is being generated dynamically by CodeIgniter in combination with the 'Smarty-killer' Dwoo template engine. -The page is rendered at {$itshowlate} by the Dwoo_compiler.

        - -

        If you would like to edit this page you'll find it located at:

        -application/views/dwoowelcome.tpl - -

        The corresponding controller for this page is found at:

        -application/controllers/dwoowelcome.php - -

        The library for Dwoo integration can be found at:

        -application/libraries/Dwootemplate.php - -

        If you are exploring Dwoo for the very first time, you should start by reading the {anchor uri='http://dwoo.org/' title='Dwoo website'}.

        -

        If you are exploring CodeIgniter for the very first time, you should start by reading the {anchor uri='http://codeigniter.com/user_guide/' title='User Guide'}.

        - -
        -Usage:
        -$this->load->library('Dwootemplate');
        -$this->dwootemplate->assign('test', 'test');
        -$this->dwootemplate->display('dwoowelcome.tpl');
        -
        -{/block} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/views/page.tpl b/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/views/page.tpl deleted file mode 100644 index ffbae8a..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Adapters/CodeIgniter/views/page.tpl +++ /dev/null @@ -1,57 +0,0 @@ - - -{block "title"}Here come the title{/block} - - - - -{block "content"}Here comes the content{/block} - - \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/PluginProxy.php b/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/PluginProxy.php deleted file mode 100644 index 261fe3c..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/PluginProxy.php +++ /dev/null @@ -1,96 +0,0 @@ - - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Denis Arh, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Adapters_ZendFramework_PluginProxy implements Dwoo_IPluginProxy -{ - /** - * reference to the zend view owning this proxy - * - * @var Zend_View_Interface - */ - public $view; - - /** - * Dwoo_Adapters_ZendFramework_PluginProxy's constructor. - * - * @param Zend_View_Interface $view - */ - public function __construct(Zend_View_Interface $view) { - $this->view = $view; - } - - /** - * Called from Dwoo_Compiler to check if the requested plugin is available - * - * @param string $name - * @return bool - */ - public function handles($name) { - try { - $this->view->getHelper($name); - } catch (Zend_Loader_PluginLoader_Exception $e) { - return false; - } - - return true; - } - - /** - * returns the code (as a string) to call the plugin - * (this will be executed at runtime inside the Dwoo class) - * - * @param string $name the plugin name - * @param array $params a parameter array, array key "*" is the rest array - * @return string - */ - public function getCode($name, $params) { - return '$this->getPluginProxy()->view->'. $name .'('.Dwoo_Compiler::implode_r($params).')'; - } - - /** - * returns a callback to the plugin, this is used with the reflection API to - * find out about the plugin's parameter names etc. - * - * should you need a rest array (i.e. for ZendFramework helpers) without the - * possibility to edit the plugin's code, you can provide a callback to some - * other function with the correct parameter signature, i.e. : - * - * return array($this, "callbackHelper"); - * // and callbackHelper would be as such: - * public function callbackHelper(array $rest=array()){} - * - * - * @param string $name the plugin name - * @return callback - */ - public function getCallback($name) { - return array($this->view->getHelper($name), $name); - } - - /** - * returns some code that will check if the plugin is loaded and if not load it - * this is optional, if your plugins are autoloaded or whatever, just return an - * empty string - * - * @param string $name the plugin name - * @return string - */ - public function getLoader($name) { - return ''; - } -} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/README b/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/README deleted file mode 100644 index 3d7e8d2..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/README +++ /dev/null @@ -1,32 +0,0 @@ -// ------------------------ -// Usage example : -// ------------------------ -// Note that you might need to manually include 'lib/Dwoo.php', -// 'lib/Dwoo/Adapters/ZendFramework/View.php' and -// 'lib/Dwoo/Adapters/ZendFramework/PluginProxy.php' for this to -// work as expected, depending on your ZF setup -// -// If anyone writes a more advanced how-to please let me know -// ------------------------ - -$view = new Dwoo_Adapters_ZendFramework_View(array( - 'compileDir' => 'path/to/compile_dir' // set to null or remove this line to use defaults - 'cacheDir' => 'path/to/cache_dir' // set to null or remove this line to use defaults -)); - -// This allows you to use ZF's helpers as if they were Dwoo plugins (i.e. {doctype} will call the doctype helper) - -$view->setPluginProxy(new Dwoo_Adapters_ZendFramework_PluginProxy(new Zend_View())); - - -// 1. example - used with the Zend Controller - -$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer($view); - -Zend_Controller_Action_HelperBroker::addHelper($viewRenderer); - - -// 2. example - used manually - -$view->assign('foo', 'bar'); -$view->display('foobar.phtml'); \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/View.php b/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/View.php deleted file mode 100644 index 098a143..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Adapters/ZendFramework/View.php +++ /dev/null @@ -1,512 +0,0 @@ - - * @author Stephan Wentz - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.1.0 - * @date 2009-07-18 - * @package Dwoo - */ -class Dwoo_Adapters_ZendFramework_View extends Zend_View_Abstract -{ - /** - * @var Dwoo - */ - protected $_engine = null; - - /** - * @var Dwoo_Data - */ - protected $_dataProvider = null; - - /** - * @var Dwoo_Compiler - */ - protected $_compiler = null; - - /** - * Changing Filter's scope to play nicely - * - * @var array - */ - protected $_filter = array(); - - - /** - * @var string - */ - protected $_templateFileClass = 'Dwoo_Template_File'; - - /** - * @var array - */ - protected $_templateFileSettings = array(); - - /** - * @var Dwoo_IPluginProxy - */ - protected $_pluginProxy = null; - - /** - * Constructor method. - * See setOptions for $opt details - * - * @see setOptions - * @param array|Zend_Config List of options or Zend_Config instance - */ - public function __construct($opt = array()) - { - - if (is_array($opt)) { - $this->setOptions($opt); - } elseif ($opt instanceof Zend_Config) { - $this->setConfig($opt); - } - - $this->init(); - } - - /** - * Set object state from options array - * - engine = engine class name|engine object|array of options for engine - * - dataProvider = data provider class name|data provider object|array of options for data provider - * - compiler = compiler class name|compiler object|array of options for compiler - * - templateFile = - * - * Array of options: - * - type class name or object for engine, dataProvider or compiler - * - any set* method (compileDir for setCompileDir ...) - * - * @param array $options - * @return Dwoo_Adapters_ZendFramework_View - */ - public function setOptions(array $opt = array()) - { - // BC checks - // TODO remove in 1.1 - if (isset($opt['compileDir']) || isset($opt['compile_dir'])) { - trigger_error('Dwoo ZF Adapter: the compile dir should be set in the $options[\'engine\'][\'compileDir\'] value the adapter settings', E_USER_WARNING); - } - - if (isset($opt['cacheDir']) || isset($opt['cache_dir'])) { - trigger_error('Dwoo ZF Adapter: the cache dir should be set in the $options[\'engine\'][\'cacheDir\'] value the adapter settings', E_USER_WARNING); - } - // end BC - - // Making sure that everything is loaded. - $classes = array('engine', 'dataProvider', 'compiler'); - - // Setting options to Dwoo objects... - foreach ($opt as $type => $settings) { - if (!method_exists($this, 'set' . $type)) { - throw new Dwoo_Exception("Unknown type $type"); - } - - if (is_string($settings) || is_object($settings)) { - call_user_func(array($this, 'set' . $type), $settings); - } elseif (is_array($settings)) { - // Set requested class - if (array_key_exists('type', $settings)) { - call_user_func(array($this, 'set' . $type), $settings['type']); - } - - if (in_array($type, $classes)) { - // Call get so that the class is initialized - $rel = call_user_func(array($this, 'get' . $type)); - - // Call set*() methods so that all the settings are set. - foreach ($settings as $method => $value) { - if (method_exists($rel, 'set' . $method)) { - call_user_func(array($rel, 'set' . $method), $value); - } - } - } elseif ('templateFile' == $type) { - // Remember the settings for the templateFile - $this->_templateFileSettings = $settings; - } - } - } - } - - /** - * Set object state from Zend_Config object - * - * @param Zend_Config $config - * @return Dwoo_Adapters_ZendFramework_View - */ - public function setConfig(Zend_Config $config) - { - return $this->setOptions($config->toArray()); - } - - /** - * Called before template rendering - * - * Binds plugin proxy to the Dwoo. - * - * @see Dwoo_Adapters_ZendFramework_View::getPluginProxy(); - * @see Dwoo::setPluginProxy(); - */ - protected function preRender() - { - $this->getEngine()->setPluginProxy($this->getPluginProxy()); - } - - /** - * Wraper for Dwoo_Data::__set() - * allows to assign variables using the object syntax - * - * @see Dwoo_Data::__set() - * @param string $name the variable name - * @param string $value the value to assign to it - */ - public function __set($name, $value) - { - $this->getDataProvider()->__set($name, $value); - } - - /** - * Sraper for Dwoo_Data::__get() allows to read variables using the object - * syntax - * - * @see Dwoo_Data::__get() - * @param string $name the variable name - * @return mixed - */ - public function __get($name) - { - return $this->getDataProvider()->__get($name); - } - - /** - * Wraper for Dwoo_Data::__isset() - * supports calls to isset($dwooData->var) - * - * @see Dwoo_Data::__isset() - * @param string $name the variable name - */ - public function __isset($name) - { - return $this->getDataProvider()->__isset($name); - } - - /** - * Wraper for Dwoo_Data::_unset() - * supports unsetting variables using the object syntax - * - * @see Dwoo_Data::__unset() - * @param string $name the variable name - */ - public function __unset($name) - { - $this->getDataProvider()->__unset($name); - } - - /** - * Catches clone request and clones data provider - */ - public function __clone() { - $this->setDataProvider(clone $this->getDataProvider()); - } - - /** - * Returns plugin proxy interface - * - * @return Dwoo_IPluginProxy - */ - public function getPluginProxy() - { - if (!$this->_pluginProxy) { - $this->_pluginProxy = new Dwoo_Adapters_ZendFramework_PluginProxy($this); - } - - return $this->_pluginProxy; - } - - /** - * Sets plugin proxy - * - * @param Dwoo_IPluginProxy - * @return Dwoo_Adapters_ZendFramework_View - */ - public function setPluginProxy(Dwoo_IPluginProxy $pluginProxy) - { - $this->_pluginProxy = $pluginProxy; - return $this; - } - - /** - * Sets template engine - * - * @param string|Dwoo Object or name of the class - */ - public function setEngine($engine) - { - // if param given as an object - if ($engine instanceof Dwoo) { - $this->_engine = $engine; - } - // - elseif (is_subclass_of($engine, 'Dwoo') || 'Dwoo' === $engine) { - $this->_engine = new $engine(); - } - else { - throw new Dwoo_Exception("Custom engine must be a subclass of Dwoo"); - } - } - - /** - * Return the Dwoo template engine object - * - * @return Dwoo - */ - public function getEngine() - { - if (null === $this->_engine) { - $this->_engine = new Dwoo(); - } - - return $this->_engine; - } - - /** - * Sets Dwoo data object - * - * @param string|Dwoo_Data Object or name of the class - */ - public function setDataProvider($data) - { - if ($data instanceof Dwoo_IDataProvider) { - $this->_dataProvider = $data; - } - elseif (is_subclass_of($data, 'Dwoo_Data') || 'Dwoo_Data' == $data) { - $this->_dataProvider = new $data(); - } - else { - throw new Dwoo_Exception("Custom data provider must be a subclass of Dwoo_Data or instance of Dwoo_IDataProvider"); - } - } - - /** - * Return the Dwoo data object - * - * @return Dwoo_Data - */ - public function getDataProvider() - { - if (null === $this->_dataProvider) { - $this->_dataProvider = new Dwoo_Data; - } - - return $this->_dataProvider; - } - - - /** - * Sets Dwoo compiler - * - * @param string|Dwoo_Compiler Object or name of the class - */ - public function setCompiler($compiler) - { - - // if param given as an object - if ($compiler instanceof Dwoo_ICompiler) { - $this->_compiler = $compiler; - } - // if param given as a string - elseif (is_subclass_of($compiler, 'Dwoo_Compiler') || 'Dwoo_Compiler' == $compiler) { - $this->_compiler = new $compiler; - } - else { - throw new Dwoo_Exception("Custom compiler must be a subclass of Dwoo_Compiler or instance of Dwoo_ICompiler"); - } - } - - /** - * Return the Dwoo compiler object - * - * @return Dwoo_Data - */ - public function getCompiler() - { - if (null === $this->_compiler) { - $this->_compiler = Dwoo_Compiler::compilerFactory(); - } - - return $this->_compiler; - } - - /** - * Initializes Dwoo_ITemplate type of class and sets properties from _templateFileSettings - * - * @param string Template location - * @return Dwoo_ITemplate - */ - public function getTemplateFile($template) { - $templateFileClass = $this->_templateFileClass; - - $dwooTemplateFile = new $templateFileClass($template); - - if (!($dwooTemplateFile instanceof Dwoo_ITemplate)) { - throw new Dwoo_Exception("Custom templateFile class must be a subclass of Dwoo_ITemplate"); - } - - foreach ($this->_templateFileSettings as $method => $value) { - if (method_exists($dwooTemplateFile, 'set' . $method)) { - call_user_func(array($dwooTemplateFile, 'set' . $method), $value); - } - } - - return $dwooTemplateFile; - } - - /** - * Dwoo_ITemplate type of class - * - * @param string Name of the class - * @return void - */ - public function setTemplateFile($tempateFileClass) { - $this->_templateFileClass = $tempateFileClass; - } - - /** - * Passes data to Dwoo_Data object - * - * @see Dwoo_Data::assign() - * @param array|string $name - * @param mixed $val - * @return Dwoo_Adapters_ZendFramework_View - */ - public function assign($name, $val = null) - { - $this->getDataProvider()->assign($name, $val); - return $this; - } - - /** - * Return list of all assigned variables - * - * @return array - */ - public function getVars() - { - return $this->_dataProvider->getData(); - } - - /** - * Clear all assigned variables - * - * Clears all variables assigned to Zend_View either via {@link assign()} or - * property overloading ({@link __get()}/{@link __set()}). - * - * @return void - * @return Dwoo_Adapters_ZendFramework_View - */ - public function clearVars() - { - $this->getDataProvider()->clear(); - return $this; - } - - /** - * Wraper for parent's render method so preRender method - * can be called (that will bind the plugin proxy to the - * engine. - * - * @see Zend_View_Abstract::render - * @return string The script output. - */ - public function render($name) - { - $this->preRender(); - return parent::render($name); - } - - /** - * Processes a view script and outputs it. Output is then - * passed through filters. - * - * @param string $name The script script name to process. - * @return string The script output. - */ - public function _run() - { - echo $this->_engine->get( - $this->getTemplateFile(func_get_arg(0)), - $this->getDataProvider(), - $this->getCompiler() - ); - } - - /** - * Add plugin path - * - * @param string $dir Directory - * @return Dwoo_Adapters_ZendFramework_View - */ - public function addPluginDir($dir) - { - $this->getEngine()->getLoader()->addDirectory($dir); - return $this; - } - - /** - * Set compile path - * - * @param string $dir Directory - * @return Dwoo_Adapters_ZendFramework_View - */ - public function setCompileDir($dir) - { - $this->getEngine()->setCompileDir($dir); - return $this; - } - - /** - * Set cache path - * - * @param string $dir Directory - * @return Dwoo_Adapters_ZendFramework_View - */ - public function setCacheDir($dir) - { - $this->getEngine()->setCacheDir($dir); - return $this; - } - - /** - * Set cache lifetime - * - * @param string $seconds Lifetime in seconds - * @return Dwoo_Adapters_ZendFramework_View - */ - public function setCacheLifetime($seconds) - { - $this->getEngine()->setCacheTime($seconds); - return $this; - } - - /** - * Set charset - * - * @param string $charset - * @return Dwoo_Adapters_ZendFramework_View - */ - public function setCharset($charset) - { - $this->_engine->setCharset($charset); - return $this; - } -} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/Block/Plugin.php b/_piecrust/libs/Dwoo/Dwoo/Block/Plugin.php deleted file mode 100644 index fe98ef9..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Block/Plugin.php +++ /dev/null @@ -1,103 +0,0 @@ -init() method, it will receive the parameters that - * are in the template code and is called when the block starts - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -abstract class Dwoo_Block_Plugin extends Dwoo_Plugin -{ - /** - * stores the contents of the block while it runs - * - * @var string - */ - protected $buffer = ''; - - /** - * buffers input, override only if necessary - * - * @var string $input the content that must be buffered - */ - public function buffer($input) - { - $this->buffer .= $input; - } - - // initialization code, receives the parameters from {block param1 param2} - // public function init($arg, $arg, ...); - - /** - * called when the block ends, this is most of the time followed right away by a call - * of process() but not always, so this should be used to do any shutdown operations on the - * block object, if required. - */ - public function end() - { - } - - /** - * called when the block output is required by a parent block - * - * this must read $this->buffer and return it processed - * - * @return string - */ - public function process() - { - return $this->buffer; - } - - /** - * called at compile time to define what the block should output in the compiled template code, happens when the block is declared - * - * basically this will replace the {block arg arg arg} tag in the template - * - * @param Dwoo_Compiler $compiler the compiler instance that calls this function - * @param array $params an array containing original and compiled parameters - * @param string $prepend that is just meant to allow a child class to call - * parent::postProcessing($compiler, $params, "foo();") to add a command before the - * default commands are executed - * @param string $append that is just meant to allow a child class to call - * parent::postProcessing($compiler, $params, null, "foo();") to add a command after the - * default commands are executed - * @param string $type the type is the plugin class name used - */ - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - return Dwoo_Compiler::PHP_OPEN.$prepend.'$this->addStack("'.$type.'", array('.Dwoo_Compiler::implode_r($compiler->getCompiledParams($params)).'));'.$append.Dwoo_Compiler::PHP_CLOSE; - } - - /** - * called at compile time to define what the block should output in the compiled template code, happens when the block is ended - * - * basically this will replace the {/block} tag in the template - * - * @see preProcessing - * @param Dwoo_Compiler $compiler the compiler instance that calls this function - * @param array $params an array containing original and compiled parameters, see preProcessing() for more details - * @param string $prepend that is just meant to allow a child class to call - * parent::postProcessing($compiler, $params, "foo();") to add a command before the - * default commands are executed - * @param string $append that is just meant to allow a child class to call - * parent::postProcessing($compiler, $params, null, "foo();") to add a command after the - * default commands are executed - * @param string $content the entire content of the block being closed - */ - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - return $content . Dwoo_Compiler::PHP_OPEN.$prepend.'$this->delStack();'.$append.Dwoo_Compiler::PHP_CLOSE; - } -} diff --git a/_piecrust/libs/Dwoo/Dwoo/Compilation/Exception.php b/_piecrust/libs/Dwoo/Dwoo/Compilation/Exception.php deleted file mode 100644 index dd4e29e..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Compilation/Exception.php +++ /dev/null @@ -1,38 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Compilation_Exception extends Dwoo_Exception -{ - protected $compiler; - protected $template; - - public function __construct(Dwoo_Compiler $compiler, $message) - { - $this->compiler = $compiler; - $this->template = $compiler->getDwoo()->getTemplate(); - parent::__construct('Compilation error at line '.$compiler->getLine().' in "'.$this->template->getResourceName().':'.$this->template->getResourceIdentifier().'" : '.$message); - } - - public function getCompiler() - { - return $this->compiler; - } - - public function getTemplate() - { - return $this->template; - } -} diff --git a/_piecrust/libs/Dwoo/Dwoo/Compiler.php b/_piecrust/libs/Dwoo/Dwoo/Compiler.php deleted file mode 100644 index adff9d4..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Compiler.php +++ /dev/null @@ -1,3086 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.1.0 - * @date 2009-07-18 - * @package Dwoo - */ -class Dwoo_Compiler implements Dwoo_ICompiler -{ - /** - * constant that represents a php opening tag - * - * use it in case it needs to be adjusted - * - * @var string - */ - const PHP_OPEN = ""; - - /** - * boolean flag to enable or disable debugging output - * - * @var bool - */ - public $debug = false; - - /** - * left script delimiter - * - * @var string - */ - protected $ld = '{'; - - /** - * left script delimiter with escaped regex meta characters - * - * @var string - */ - protected $ldr = '\\{'; - - /** - * right script delimiter - * - * @var string - */ - protected $rd = '}'; - - /** - * right script delimiter with escaped regex meta characters - * - * @var string - */ - protected $rdr = '\\}'; - - /** - * defines whether the nested comments should be parsed as nested or not - * - * defaults to false (classic block comment parsing as in all languages) - * - * @var bool - */ - protected $allowNestedComments = false; - - /** - * defines whether opening and closing tags can contain spaces before valid data or not - * - * turn to true if you want to be sloppy with the syntax, but when set to false it allows - * to skip javascript and css tags as long as they are in the form "{ something", which is - * nice. default is false. - * - * @var bool - */ - protected $allowLooseOpenings = false; - - /** - * defines whether the compiler will automatically html-escape variables or not - * - * default is false - * - * @var bool - */ - protected $autoEscape = false; - - /** - * security policy object - * - * @var Dwoo_Security_Policy - */ - protected $securityPolicy; - - /** - * stores the custom plugins registered with this compiler - * - * @var array - */ - protected $customPlugins = array(); - - /** - * stores the template plugins registered with this compiler - * - * @var array - */ - protected $templatePlugins = array(); - - /** - * stores the pre- and post-processors callbacks - * - * @var array - */ - protected $processors = array('pre'=>array(), 'post'=>array()); - - /** - * stores a list of plugins that are used in the currently compiled - * template, and that are not compilable. these plugins will be loaded - * during the template's runtime if required. - * - * it is a 1D array formatted as key:pluginName value:pluginType - * - * @var array - */ - protected $usedPlugins; - - /** - * stores the template undergoing compilation - * - * @var string - */ - protected $template; - - /** - * stores the current pointer position inside the template - * - * @var int - */ - protected $pointer; - - /** - * stores the current line count inside the template for debugging purposes - * - * @var int - */ - protected $line; - - /** - * stores the current template source while compiling it - * - * @var string - */ - protected $templateSource; - - /** - * stores the data within which the scope moves - * - * @var array - */ - protected $data; - - /** - * variable scope of the compiler, set to null if - * it can not be resolved to a static string (i.e. if some - * plugin defines a new scope based on a variable array key) - * - * @var mixed - */ - protected $scope; - - /** - * variable scope tree, that allows to rebuild the current - * scope if required, i.e. when going to a parent level - * - * @var array - */ - protected $scopeTree; - - /** - * block plugins stack, accessible through some methods - * - * @see findBlock - * @see getCurrentBlock - * @see addBlock - * @see addCustomBlock - * @see injectBlock - * @see removeBlock - * @see removeTopBlock - * - * @var array - */ - protected $stack = array(); - - /** - * current block at the top of the block plugins stack, - * accessible through getCurrentBlock - * - * @see getCurrentBlock - * - * @var Dwoo_Block_Plugin - */ - protected $curBlock; - - /** - * current dwoo object that uses this compiler, or null - * - * @var Dwoo - */ - protected $dwoo; - - /** - * holds an instance of this class, used by getInstance when you don't - * provide a custom compiler in order to save resources - * - * @var Dwoo_Compiler - */ - protected static $instance; - - /** - * constructor - * - * saves the created instance so that child templates get the same one - */ - public function __construct() - { - self::$instance = $this; - } - - /** - * sets the delimiters to use in the templates - * - * delimiters can be multi-character strings but should not be one of those as they will - * make it very hard to work with templates or might even break the compiler entirely : "\", "$", "|", ":" and finally "#" only if you intend to use config-vars with the #var# syntax. - * - * @param string $left left delimiter - * @param string $right right delimiter - */ - public function setDelimiters($left, $right) - { - $this->ld = $left; - $this->rd = $right; - $this->ldr = preg_quote($left, '/'); - $this->rdr = preg_quote($right, '/'); - } - - /** - * returns the left and right template delimiters - * - * @return array containing the left and the right delimiters - */ - public function getDelimiters() - { - return array($this->ld, $this->rd); - } - - /** - * sets the way to handle nested comments, if set to true - * {* foo {* some other *} comment *} will be stripped correctly. - * - * if false it will remove {* foo {* some other *} and leave "comment *}" alone, - * this is the default behavior - * - * @param bool $allow allow nested comments or not, defaults to true (but the default internal value is false) - */ - public function setNestedCommentsHandling($allow = true) { - $this->allowNestedComments = (bool) $allow; - } - - /** - * returns the nested comments handling setting - * - * @see setNestedCommentsHandling - * @return bool true if nested comments are allowed - */ - public function getNestedCommentsHandling() { - return $this->allowNestedComments; - } - - /** - * sets the tag openings handling strictness, if set to true, template tags can - * contain spaces before the first function/string/variable such as { $foo} is valid. - * - * if set to false (default setting), { $foo} is invalid but that is however a good thing - * as it allows css (i.e. #foo { color:red; }) to be parsed silently without triggering - * an error, same goes for javascript. - * - * @param bool $allow true to allow loose handling, false to restore default setting - */ - public function setLooseOpeningHandling($allow = false) - { - $this->allowLooseOpenings = (bool) $allow; - } - - /** - * returns the tag openings handling strictness setting - * - * @see setLooseOpeningHandling - * @return bool true if loose tags are allowed - */ - public function getLooseOpeningHandling() - { - return $this->allowLooseOpenings; - } - - /** - * changes the auto escape setting - * - * if enabled, the compiler will automatically html-escape variables, - * unless they are passed through the safe function such as {$var|safe} - * or {safe $var} - * - * default setting is disabled/false - * - * @param bool $enabled set to true to enable, false to disable - */ - public function setAutoEscape($enabled) - { - $this->autoEscape = (bool) $enabled; - } - - /** - * returns the auto escape setting - * - * default setting is disabled/false - * - * @return bool - */ - public function getAutoEscape() - { - return $this->autoEscape; - } - - /** - * adds a preprocessor to the compiler, it will be called - * before the template is compiled - * - * @param mixed $callback either a valid callback to the preprocessor or a simple name if the autoload is set to true - * @param bool $autoload if set to true, the preprocessor is auto-loaded from one of the plugin directories, else you must provide a valid callback - */ - public function addPreProcessor($callback, $autoload = false) - { - if ($autoload) { - $name = str_replace('Dwoo_Processor_', '', $callback); - $class = 'Dwoo_Processor_'.$name; - - if (class_exists($class, false)) { - $callback = array(new $class($this), 'process'); - } elseif (function_exists($class)) { - $callback = $class; - } else { - $callback = array('autoload'=>true, 'class'=>$class, 'name'=>$name); - } - - $this->processors['pre'][] = $callback; - } else { - $this->processors['pre'][] = $callback; - } - } - - /** - * removes a preprocessor from the compiler - * - * @param mixed $callback either a valid callback to the preprocessor or a simple name if it was autoloaded - */ - public function removePreProcessor($callback) - { - if (($index = array_search($callback, $this->processors['pre'], true)) !== false) { - unset($this->processors['pre'][$index]); - } elseif (($index = array_search('Dwoo_Processor_'.str_replace('Dwoo_Processor_', '', $callback), $this->processors['pre'], true)) !== false) { - unset($this->processors['pre'][$index]); - } else { - $class = 'Dwoo_Processor_' . str_replace('Dwoo_Processor_', '', $callback); - foreach ($this->processors['pre'] as $index=>$proc) { - if (is_array($proc) && ($proc[0] instanceof $class) || (isset($proc['class']) && $proc['class'] == $class)) { - unset($this->processors['pre'][$index]); - break; - } - } - } - } - - /** - * adds a postprocessor to the compiler, it will be called - * before the template is compiled - * - * @param mixed $callback either a valid callback to the postprocessor or a simple name if the autoload is set to true - * @param bool $autoload if set to true, the postprocessor is auto-loaded from one of the plugin directories, else you must provide a valid callback - */ - public function addPostProcessor($callback, $autoload = false) - { - if ($autoload) { - $name = str_replace('Dwoo_Processor_', '', $callback); - $class = 'Dwoo_Processor_'.$name; - - if (class_exists($class, false)) { - $callback = array(new $class($this), 'process'); - } elseif (function_exists($class)) { - $callback = $class; - } else { - $callback = array('autoload'=>true, 'class'=>$class, 'name'=>$name); - } - - $this->processors['post'][] = $callback; - } else { - $this->processors['post'][] = $callback; - } - } - - /** - * removes a postprocessor from the compiler - * - * @param mixed $callback either a valid callback to the postprocessor or a simple name if it was autoloaded - */ - public function removePostProcessor($callback) - { - if (($index = array_search($callback, $this->processors['post'], true)) !== false) { - unset($this->processors['post'][$index]); - } elseif (($index = array_search('Dwoo_Processor_'.str_replace('Dwoo_Processor_', '', $callback), $this->processors['post'], true)) !== false) { - unset($this->processors['post'][$index]); - } else { - $class = 'Dwoo_Processor_' . str_replace('Dwoo_Processor_', '', $callback); - foreach ($this->processors['post'] as $index=>$proc) { - if (is_array($proc) && ($proc[0] instanceof $class) || (isset($proc['class']) && $proc['class'] == $class)) { - unset($this->processors['post'][$index]); - break; - } - } - } - } - - /** - * internal function to autoload processors at runtime if required - * - * @param string $class the class/function name - * @param string $name the plugin name (without Dwoo_Plugin_ prefix) - */ - protected function loadProcessor($class, $name) - { - if (!class_exists($class, false) && !function_exists($class)) { - try { - $this->dwoo->getLoader()->loadPlugin($name); - } catch (Dwoo_Exception $e) { - throw new Dwoo_Exception('Processor '.$name.' could not be found in your plugin directories, please ensure it is in a file named '.$name.'.php in the plugin directory'); - } - } - - if (class_exists($class, false)) { - return array(new $class($this), 'process'); - } - - if (function_exists($class)) { - return $class; - } - - throw new Dwoo_Exception('Wrong processor name, when using autoload the processor must be in one of your plugin dir as "name.php" containg a class or function named "Dwoo_Processor_name"'); - } - - /** - * adds an used plugin, this is reserved for use by the {template} plugin - * - * this is required so that plugin loading bubbles up from loaded - * template files to the current one - * - * @private - * @param string $name function name - * @param int $type plugin type (Dwoo::*_PLUGIN) - */ - public function addUsedPlugin($name, $type) - { - $this->usedPlugins[$name] = $type; - } - - /** - * returns all the plugins this template uses - * - * @private - * @return array the list of used plugins in the parsed template - */ - public function getUsedPlugins() - { - return $this->usedPlugins; - } - - /** - * adds a template plugin, this is reserved for use by the {template} plugin - * - * this is required because the template functions are not declared yet - * during compilation, so we must have a way of validating their argument - * signature without using the reflection api - * - * @private - * @param string $name function name - * @param array $params parameter array to help validate the function call - * @param string $uuid unique id of the function - * @param string $body function php code - */ - public function addTemplatePlugin($name, array $params, $uuid, $body = null) - { - $this->templatePlugins[$name] = array('params'=> $params, 'body' => $body, 'uuid' => $uuid); - } - - /** - * returns all the parsed sub-templates - * - * @private - * @return array the parsed sub-templates - */ - public function getTemplatePlugins() - { - return $this->templatePlugins; - } - - /** - * marks a template plugin as being called, which means its source must be included in the compiled template - * - * @param string $name function name - */ - public function useTemplatePlugin($name) - { - $this->templatePlugins[$name]['called'] = true; - } - - /** - * adds the custom plugins loaded into Dwoo to the compiler so it can load them - * - * @see Dwoo::addPlugin - * @param array $customPlugins an array of custom plugins - */ - public function setCustomPlugins(array $customPlugins) - { - $this->customPlugins = $customPlugins; - } - - /** - * sets the security policy object to enforce some php security settings - * - * use this if untrusted persons can modify templates, - * set it on the Dwoo object as it will be passed onto the compiler automatically - * - * @param Dwoo_Security_Policy $policy the security policy object - */ - public function setSecurityPolicy(Dwoo_Security_Policy $policy = null) - { - $this->securityPolicy = $policy; - } - - /** - * returns the current security policy object or null by default - * - * @return Dwoo_Security_Policy|null the security policy object if any - */ - public function getSecurityPolicy() - { - return $this->securityPolicy; - } - - /** - * sets the pointer position - * - * @param int $position the new pointer position - * @param bool $isOffset if set to true, the position acts as an offset and not an absolute position - */ - public function setPointer($position, $isOffset = false) - { - if ($isOffset) { - $this->pointer += $position; - } else { - $this->pointer = $position; - } - } - - /** - * returns the current pointer position, only available during compilation of a template - * - * @return int - */ - public function getPointer() - { - return $this->pointer; - } - - /** - * sets the line number - * - * @param int $number the new line number - * @param bool $isOffset if set to true, the position acts as an offset and not an absolute position - */ - public function setLine($number, $isOffset = false) - { - if ($isOffset) { - $this->line += $number; - } else { - $this->line = $number; - } - } - - /** - * returns the current line number, only available during compilation of a template - * - * @return int - */ - public function getLine() - { - return $this->line; - } - - /** - * returns the dwoo object that initiated this template compilation, only available during compilation of a template - * - * @return Dwoo - */ - public function getDwoo() - { - return $this->dwoo; - } - - /** - * overwrites the template that is being compiled - * - * @param string $newSource the template source that must replace the current one - * @param bool $fromPointer if set to true, only the source from the current pointer position is replaced - * @return string the template or partial template - */ - public function setTemplateSource($newSource, $fromPointer = false) - { - if ($fromPointer === true) { - $this->templateSource = substr($this->templateSource, 0, $this->pointer) . $newSource; - } else { - $this->templateSource = $newSource; - } - } - - /** - * returns the template that is being compiled - * - * @param mixed $fromPointer if set to true, only the source from the current pointer - * position is returned, if a number is given it overrides the current pointer - * @return string the template or partial template - */ - public function getTemplateSource($fromPointer = false) - { - if ($fromPointer === true) { - return substr($this->templateSource, $this->pointer); - } elseif (is_numeric($fromPointer)) { - return substr($this->templateSource, $fromPointer); - } else { - return $this->templateSource; - } - } - - /** - * resets the compilation pointer, effectively restarting the compilation process - * - * this is useful if a plugin modifies the template source since it might need to be recompiled - */ - public function recompile() - { - $this->setPointer(0); - } - - /** - * compiles the provided string down to php code - * - * @param string $tpl the template to compile - * @return string a compiled php string - */ - public function compile(Dwoo $dwoo, Dwoo_ITemplate $template) - { - // init vars - $tpl = $template->getSource(); - $ptr = 0; - $this->dwoo = $dwoo; - $this->template = $template; - $this->templateSource =& $tpl; - $this->pointer =& $ptr; - - while (true) { - // if pointer is at the beginning, reset everything, that allows a plugin to externally reset the compiler if everything must be reparsed - if ($ptr===0) { - // resets variables - $this->usedPlugins = array(); - $this->data = array(); - $this->scope =& $this->data; - $this->scopeTree = array(); - $this->stack = array(); - $this->line = 1; - $this->templatePlugins = array(); - // add top level block - $compiled = $this->addBlock('topLevelBlock', array(), 0); - $this->stack[0]['buffer'] = ''; - - if ($this->debug) echo 'COMPILER INIT
        '; - - if ($this->debug) echo 'PROCESSING PREPROCESSORS ('.count($this->processors['pre']).')
        '; - - // runs preprocessors - foreach ($this->processors['pre'] as $preProc) { - if (is_array($preProc) && isset($preProc['autoload'])) { - $preProc = $this->loadProcessor($preProc['class'], $preProc['name']); - } - if (is_array($preProc) && $preProc[0] instanceof Dwoo_Processor) { - $tpl = call_user_func($preProc, $tpl); - } else { - $tpl = call_user_func($preProc, $this, $tpl); - } - } - unset($preProc); - - // show template source if debug - if ($this->debug) echo '
        '.print_r(htmlentities($tpl), true).'

        '; - - // strips php tags if required by the security policy - if ($this->securityPolicy !== null) { - $search = array('{<\?php.*?\?>}'); - if (ini_get('short_open_tags')) { - $search = array('{<\?.*?\?>}', '{<%.*?%>}'); - } - switch($this->securityPolicy->getPhpHandling()) { - - case Dwoo_Security_Policy::PHP_ALLOW: - break; - case Dwoo_Security_Policy::PHP_ENCODE: - $tpl = preg_replace_callback($search, array($this, 'phpTagEncodingHelper'), $tpl); - break; - case Dwoo_Security_Policy::PHP_REMOVE: - $tpl = preg_replace($search, '', $tpl); - - } - } - } - - $pos = strpos($tpl, $this->ld, $ptr); - - if ($pos === false) { - $this->push(substr($tpl, $ptr), 0); - break; - } elseif (substr($tpl, $pos-1, 1) === '\\' && substr($tpl, $pos-2, 1) !== '\\') { - $this->push(substr($tpl, $ptr, $pos-$ptr-1) . $this->ld); - $ptr = $pos+strlen($this->ld); - } elseif (preg_match('/^'.$this->ldr . ($this->allowLooseOpenings ? '\s*' : '') . 'literal' . ($this->allowLooseOpenings ? '\s*' : '') . $this->rdr.'/s', substr($tpl, $pos), $litOpen)) { - if (!preg_match('/'.$this->ldr . ($this->allowLooseOpenings ? '\s*' : '') . '\/literal' . ($this->allowLooseOpenings ? '\s*' : '') . $this->rdr.'/s', $tpl, $litClose, PREG_OFFSET_CAPTURE, $pos)) { - throw new Dwoo_Compilation_Exception($this, 'The {literal} blocks must be closed explicitly with {/literal}'); - } - $endpos = $litClose[0][1]; - $this->push(substr($tpl, $ptr, $pos-$ptr) . substr($tpl, $pos + strlen($litOpen[0]), $endpos-$pos-strlen($litOpen[0]))); - $ptr = $endpos+strlen($litClose[0][0]); - } else { - if (substr($tpl, $pos-2, 1) === '\\' && substr($tpl, $pos-1, 1) === '\\') { - $this->push(substr($tpl, $ptr, $pos-$ptr-1)); - $ptr = $pos; - } - - $this->push(substr($tpl, $ptr, $pos-$ptr)); - $ptr = $pos; - - $pos += strlen($this->ld); - if ($this->allowLooseOpenings) { - while (substr($tpl, $pos, 1) === ' ') { - $pos+=1; - } - } else { - if (substr($tpl, $pos, 1) === ' ' || substr($tpl, $pos, 1) === "\r" || substr($tpl, $pos, 1) === "\n" || substr($tpl, $pos, 1) === "\t") { - $ptr = $pos; - $this->push($this->ld); - continue; - } - } - - // check that there is an end tag present - if (strpos($tpl, $this->rd, $pos) === false) { - throw new Dwoo_Compilation_Exception($this, 'A template tag was not closed, started with "'.substr($tpl, $ptr, 30).'"'); - } - - - $ptr += strlen($this->ld); - $subptr = $ptr; - - while (true) { - $parsed = $this->parse($tpl, $subptr, null, false, 'root', $subptr); - - // reload loop if the compiler was reset - if ($ptr === 0) { - continue 2; - } - - $len = $subptr - $ptr; - $this->push($parsed, substr_count(substr($tpl, $ptr, $len), "\n")); - $ptr += $len; - - if ($parsed === false) { - break; - } - } - - // adds additional line breaks between php closing and opening tags because the php parser removes those if there is just a single line break - if (substr($this->curBlock['buffer'], -2) === '?>' && preg_match('{^(([\r\n])([\r\n]?))}', substr($tpl, $ptr, 3), $m)) { - if ($m[3] === '') { - $ptr+=1; - $this->push($m[1].$m[1], 1); - } else { - $ptr+=2; - $this->push($m[1]."\n", 2); - } - } - } - } - - $compiled .= $this->removeBlock('topLevelBlock'); - - if ($this->debug) echo 'PROCESSING POSTPROCESSORS
        '; - - foreach ($this->processors['post'] as $postProc) { - if (is_array($postProc) && isset($postProc['autoload'])) { - $postProc = $this->loadProcessor($postProc['class'], $postProc['name']); - } - if (is_array($postProc) && $postProc[0] instanceof Dwoo_Processor) { - $compiled = call_user_func($postProc, $compiled); - } else { - $compiled = call_user_func($postProc, $this, $compiled); - } - } - unset($postProc); - - if ($this->debug) echo 'COMPILATION COMPLETE : MEM USAGE : '.memory_get_usage().'
        '; - - $output = "usedPlugins as $plugin=>$type) { - if ($type & Dwoo::CUSTOM_PLUGIN) { - continue; - } - - switch($type) { - - case Dwoo::BLOCK_PLUGIN: - case Dwoo::CLASS_PLUGIN: - $output .= "if (class_exists('Dwoo_Plugin_$plugin', false)===false)\n\t\$this->getLoader()->loadPlugin('$plugin');\n"; - break; - case Dwoo::FUNC_PLUGIN: - $output .= "if (function_exists('Dwoo_Plugin_$plugin')===false)\n\t\$this->getLoader()->loadPlugin('$plugin');\n"; - break; - case Dwoo::SMARTY_MODIFIER: - $output .= "if (function_exists('smarty_modifier_$plugin')===false)\n\t\$this->getLoader()->loadPlugin('$plugin');\n"; - break; - case Dwoo::SMARTY_FUNCTION: - $output .= "if (function_exists('smarty_function_$plugin')===false)\n\t\$this->getLoader()->loadPlugin('$plugin');\n"; - break; - case Dwoo::SMARTY_BLOCK: - $output .= "if (function_exists('smarty_block_$plugin')===false)\n\t\$this->getLoader()->loadPlugin('$plugin');\n"; - break; - case Dwoo::PROXY_PLUGIN: - $output .= $this->getDwoo()->getPluginProxy()->getPreloader($plugin); - break; - default: - throw new Dwoo_Compilation_Exception($this, 'Type error for '.$plugin.' with type'.$type); - - } - } - - foreach ($this->templatePlugins as $function => $attr) { - if (isset($attr['called']) && $attr['called'] === true && !isset($attr['checked'])) { - $this->resolveSubTemplateDependencies($function); - } - } - foreach ($this->templatePlugins as $function) { - if (isset($function['called']) && $function['called'] === true) { - $output .= $function['body'].PHP_EOL; - } - } - - $output .= $compiled."\n?>"; - - $output = preg_replace('/(?\s*)<\?xml#is', '$1', $output); - - if ($this->debug) { - echo '
        ';
        -			$lines = preg_split('{\r\n|\n|
        }', highlight_string(($output), true)); - array_shift($lines); - foreach ($lines as $i=>$line) { - echo ($i+1).'. '.$line."\r\n"; - } - } - if ($this->debug) echo '
        '; - - $this->template = $this->dwoo = null; - $tpl = null; - - return $output; - } - - /** - * checks what sub-templates are used in every sub-template so that we're sure they are all compiled - * - * @param string $function the sub-template name - */ - protected function resolveSubTemplateDependencies($function) - { - $body = $this->templatePlugins[$function]['body']; - foreach ($this->templatePlugins as $func => $attr) { - if ($func !== $function && !isset($attr['called']) && strpos($body, 'Dwoo_Plugin_'.$func) !== false) { - $this->templatePlugins[$func]['called'] = true; - $this->resolveSubTemplateDependencies($func); - } - } - $this->templatePlugins[$function]['checked'] = true; - } - - /** - * adds compiled content to the current block - * - * @param string $content the content to push - * @param int $lineCount newlines count in content, optional - */ - public function push($content, $lineCount = null) - { - if ($lineCount === null) { - $lineCount = substr_count($content, "\n"); - } - - if ($this->curBlock['buffer'] === null && count($this->stack) > 1) { - // buffer is not initialized yet (the block has just been created) - $this->stack[count($this->stack)-2]['buffer'] .= (string) $content; - $this->curBlock['buffer'] = ''; - } else { - if (!isset($this->curBlock['buffer'])) { - throw new Dwoo_Compilation_Exception($this, 'The template has been closed too early, you probably have an extra block-closing tag somewhere'); - } - // append current content to current block's buffer - $this->curBlock['buffer'] .= (string) $content; - } - $this->line += $lineCount; - } - - /** - * sets the scope - * - * set to null if the scope becomes "unstable" (i.e. too variable or unknown) so that - * variables are compiled in a more evaluative way than just $this->scope['key'] - * - * @param mixed $scope a string i.e. "level1.level2" or an array i.e. array("level1", "level2") - * @param bool $absolute if true, the scope is set from the top level scope and not from the current scope - * @return array the current scope tree - */ - public function setScope($scope, $absolute = false) - { - $old = $this->scopeTree; - - if ($scope===null) { - unset($this->scope); - $this->scope = null; - } - - if (is_array($scope)===false) { - $scope = explode('.', $scope); - } - - if ($absolute===true) { - $this->scope =& $this->data; - $this->scopeTree = array(); - } - - while (($bit = array_shift($scope)) !== null) { - if ($bit === '_parent' || $bit === '_') { - array_pop($this->scopeTree); - reset($this->scopeTree); - $this->scope =& $this->data; - $cnt = count($this->scopeTree); - for ($i=0;$i<$cnt;$i++) - $this->scope =& $this->scope[$this->scopeTree[$i]]; - } elseif ($bit === '_root' || $bit === '__') { - $this->scope =& $this->data; - $this->scopeTree = array(); - } elseif (isset($this->scope[$bit])) { - $this->scope =& $this->scope[$bit]; - $this->scopeTree[] = $bit; - } else { - $this->scope[$bit] = array(); - $this->scope =& $this->scope[$bit]; - $this->scopeTree[] = $bit; - } - } - - return $old; - } - - /** - * adds a block to the top of the block stack - * - * @param string $type block type (name) - * @param array $params the parameters array - * @param int $paramtype the parameters type (see mapParams), 0, 1 or 2 - * @return string the preProcessing() method's output - */ - public function addBlock($type, array $params, $paramtype) - { - $class = 'Dwoo_Plugin_'.$type; - if (class_exists($class, false) === false) { - $this->dwoo->getLoader()->loadPlugin($type); - } - - $params = $this->mapParams($params, array($class, 'init'), $paramtype); - - $this->stack[] = array('type' => $type, 'params' => $params, 'custom' => false, 'class' => $class, 'buffer' => null); - $this->curBlock =& $this->stack[count($this->stack)-1]; - return call_user_func(array($class,'preProcessing'), $this, $params, '', '', $type); - } - - /** - * adds a custom block to the top of the block stack - * - * @param string $type block type (name) - * @param array $params the parameters array - * @param int $paramtype the parameters type (see mapParams), 0, 1 or 2 - * @return string the preProcessing() method's output - */ - public function addCustomBlock($type, array $params, $paramtype) - { - $callback = $this->customPlugins[$type]['callback']; - if (is_array($callback)) { - $class = is_object($callback[0]) ? get_class($callback[0]) : $callback[0]; - } else { - $class = $callback; - } - - $params = $this->mapParams($params, array($class, 'init'), $paramtype); - - $this->stack[] = array('type' => $type, 'params' => $params, 'custom' => true, 'class' => $class, 'buffer' => null); - $this->curBlock =& $this->stack[count($this->stack)-1]; - return call_user_func(array($class,'preProcessing'), $this, $params, '', '', $type); - } - - /** - * injects a block at the top of the plugin stack without calling its preProcessing method - * - * used by {else} blocks to re-add themselves after having closed everything up to their parent - * - * @param string $type block type (name) - * @param array $params parameters array - */ - public function injectBlock($type, array $params) - { - $class = 'Dwoo_Plugin_'.$type; - if (class_exists($class, false) === false) { - $this->dwoo->getLoader()->loadPlugin($type); - } - $this->stack[] = array('type' => $type, 'params' => $params, 'custom' => false, 'class' => $class, 'buffer' => null); - $this->curBlock =& $this->stack[count($this->stack)-1]; - } - - /** - * removes the closest-to-top block of the given type and all other - * blocks encountered while going down the block stack - * - * @param string $type block type (name) - * @return string the output of all postProcessing() method's return values of the closed blocks - */ - public function removeBlock($type) - { - $output = ''; - - $pluginType = $this->getPluginType($type); - if ($pluginType & Dwoo::SMARTY_BLOCK) { - $type = 'smartyinterface'; - } - while (true) { - while ($top = array_pop($this->stack)) { - if ($top['custom']) { - $class = $top['class']; - } else { - $class = 'Dwoo_Plugin_'.$top['type']; - } - if (count($this->stack)) { - $this->curBlock =& $this->stack[count($this->stack)-1]; - $this->push(call_user_func(array($class, 'postProcessing'), $this, $top['params'], '', '', $top['buffer']), 0); - } else { - $null = null; - $this->curBlock =& $null; - $output = call_user_func(array($class, 'postProcessing'), $this, $top['params'], '', '', $top['buffer']); - } - - if ($top['type'] === $type) { - break 2; - } - } - - throw new Dwoo_Compilation_Exception($this, 'Syntax malformation, a block of type "'.$type.'" was closed but was not opened'); - break; - } - - return $output; - } - - /** - * returns a reference to the first block of the given type encountered and - * optionally closes all blocks until it finds it - * - * this is mainly used by {else} plugins to close everything that was opened - * between their parent and themselves - * - * @param string $type the block type (name) - * @param bool $closeAlong whether to close all blocks encountered while going down the block stack or not - * @return &array the array is as such: array('type'=>pluginName, 'params'=>parameter array, - * 'custom'=>bool defining whether it's a custom plugin or not, for internal use) - */ - public function &findBlock($type, $closeAlong = false) - { - if ($closeAlong===true) { - while ($b = end($this->stack)) { - if ($b['type']===$type) { - return $this->stack[key($this->stack)]; - } - $this->push($this->removeTopBlock(), 0); - } - } else { - end($this->stack); - while ($b = current($this->stack)) { - if ($b['type']===$type) { - return $this->stack[key($this->stack)]; - } - prev($this->stack); - } - } - - throw new Dwoo_Compilation_Exception($this, 'A parent block of type "'.$type.'" is required and can not be found'); - } - - /** - * returns a reference to the current block array - * - * @return &array the array is as such: array('type'=>pluginName, 'params'=>parameter array, - * 'custom'=>bool defining whether it's a custom plugin or not, for internal use) - */ - public function &getCurrentBlock() - { - return $this->curBlock; - } - - /** - * removes the block at the top of the stack and calls its postProcessing() method - * - * @return string the postProcessing() method's output - */ - public function removeTopBlock() - { - $o = array_pop($this->stack); - if ($o === null) { - throw new Dwoo_Compilation_Exception($this, 'Syntax malformation, a block of unknown type was closed but was not opened.'); - } - if ($o['custom']) { - $class = $o['class']; - } else { - $class = 'Dwoo_Plugin_'.$o['type']; - } - - $this->curBlock =& $this->stack[count($this->stack)-1]; - - return call_user_func(array($class, 'postProcessing'), $this, $o['params'], '', '', $o['buffer']); - } - - /** - * returns the compiled parameters (for example a variable's compiled parameter will be "$this->scope['key']") out of the given parameter array - * - * @param array $params parameter array - * @return array filtered parameters - */ - public function getCompiledParams(array $params) - { - foreach ($params as $k=>$p) { - if (is_array($p)) { - $params[$k] = $p[0]; - } - } - return $params; - } - - /** - * returns the real parameters (for example a variable's real parameter will be its key, etc) out of the given parameter array - * - * @param array $params parameter array - * @return array filtered parameters - */ - public function getRealParams(array $params) - { - foreach ($params as $k=>$p) { - if (is_array($p)) { - $params[$k] = $p[1]; - } - } - return $params; - } - - /** - * entry point of the parser, it redirects calls to other parse* functions - * - * @param string $in the string within which we must parse something - * @param int $from the starting offset of the parsed area - * @param int $to the ending offset of the parsed area - * @param mixed $parsingParams must be an array if we are parsing a function or modifier's parameters, or false by default - * @param string $curBlock the current parser-block being processed - * @param mixed $pointer a reference to a pointer that will be increased by the amount of characters parsed, or null by default - * @return string parsed values - */ - protected function parse($in, $from, $to, $parsingParams = false, $curBlock='', &$pointer = null) - { - if ($to === null) { - $to = strlen($in); - } - $first = substr($in, $from, 1); - - if ($first === false) { - throw new Dwoo_Compilation_Exception($this, 'Unexpected EOF, a template tag was not closed'); - } - - while ($first===" " || $first==="\n" || $first==="\t" || $first==="\r") { - if ($curBlock === 'root' && substr($in, $from, strlen($this->rd)) === $this->rd) { - // end template tag - $pointer += strlen($this->rd); - if ($this->debug) echo 'TEMPLATE PARSING ENDED
        '; - return false; - } - $from++; - if ($pointer !== null) { - $pointer++; - } - if ($from >= $to) { - if (is_array($parsingParams)) { - return $parsingParams; - } else { - return ''; - } - } - $first = $in[$from]; - } - - $substr = substr($in, $from, $to-$from); - - if ($this->debug) echo '
        PARSE CALL : PARSING "'.htmlentities(substr($in, $from, min($to-$from, 50))).(($to-$from) > 50 ? '...':'').'" @ '.$from.':'.$to.' in '.$curBlock.' : pointer='.$pointer.'
        '; - $parsed = ""; - - if ($curBlock === 'root' && $first === '*') { - $src = $this->getTemplateSource(); - $startpos = $this->getPointer() - strlen($this->ld); - if (substr($src, $startpos, strlen($this->ld)) === $this->ld) { - if ($startpos > 0) { - do { - $char = substr($src, --$startpos, 1); - if ($char == "\n") { - $startpos++; - $whitespaceStart = true; - break; - } - } while ($startpos > 0 && ($char == ' ' || $char == "\t")); - } - - if (!isset($whitespaceStart)) { - $startpos = $this->getPointer(); - } else { - $pointer -= $this->getPointer() - $startpos; - } - - if ($this->allowNestedComments && strpos($src, $this->ld.'*', $this->getPointer()) !== false) { - $comOpen = $this->ld.'*'; - $comClose = '*'.$this->rd; - $level = 1; - $start = $startpos; - $ptr = $this->getPointer() + '*'; - - while ($level > 0 && $ptr < strlen($src)) { - $open = strpos($src, $comOpen, $ptr); - $close = strpos($src, $comClose, $ptr); - - if ($open !== false && $close !== false) { - if ($open < $close) { - $ptr = $open + strlen($comOpen); - $level++; - } else { - $ptr = $close + strlen($comClose); - $level--; - } - } elseif ($open !== false) { - $ptr = $open + strlen($comOpen); - $level++; - } elseif ($close !== false) { - $ptr = $close + strlen($comClose); - $level--; - } else { - $ptr = strlen($src); - } - } - $endpos = $ptr - strlen('*'.$this->rd); - } else { - $endpos = strpos($src, '*'.$this->rd, $startpos); - if ($endpos == false) { - throw new Dwoo_Compilation_Exception($this, 'Un-ended comment'); - } - } - $pointer += $endpos - $startpos + strlen('*'.$this->rd); - if (isset($whitespaceStart) && preg_match('#^[\t ]*\r?\n#', substr($src, $endpos+strlen('*'.$this->rd)), $m)) { - $pointer += strlen($m[0]); - $this->curBlock['buffer'] = substr($this->curBlock['buffer'], 0, strlen($this->curBlock['buffer']) - ($this->getPointer() - $startpos - strlen($this->ld))); - } - return false; - } - } - - if ($first==='$') { - // var - $out = $this->parseVar($in, $from, $to, $parsingParams, $curBlock, $pointer); - $parsed = 'var'; - } elseif ($first==='%' && preg_match('#^%[a-z]#i', $substr)) { - // const - $out = $this->parseConst($in, $from, $to, $parsingParams, $curBlock, $pointer); - } elseif ($first==='"' || $first==="'") { - // string - $out = $this->parseString($in, $from, $to, $parsingParams, $curBlock, $pointer); - } elseif (preg_match('/^[a-z][a-z0-9_]*(?:::[a-z][a-z0-9_]*)?('.(is_array($parsingParams)||$curBlock!='root'?'':'\s+[^(]|').'\s*\(|\s*'.$this->rdr.'|\s*;)/i', $substr)) { - // func - $out = $this->parseFunction($in, $from, $to, $parsingParams, $curBlock, $pointer); - $parsed = 'func'; - } elseif ($first === ';') { - // instruction end - if ($this->debug) echo 'END OF INSTRUCTION
        '; - if ($pointer !== null) { - $pointer++; - } - return $this->parse($in, $from+1, $to, false, 'root', $pointer); - } elseif ($curBlock === 'root' && preg_match('#^/([a-z][a-z0-9_]*)?#i', $substr, $match)) { - // close block - if (!empty($match[1]) && $match[1] == 'else') { - throw new Dwoo_Compilation_Exception($this, 'Else blocks must not be closed explicitly, they are automatically closed when their parent block is closed'); - } - if (!empty($match[1]) && $match[1] == 'elseif') { - throw new Dwoo_Compilation_Exception($this, 'Elseif blocks must not be closed explicitly, they are automatically closed when their parent block is closed or a new else/elseif block is declared after them'); - } - if ($pointer !== null) { - $pointer += strlen($match[0]); - } - if (empty($match[1])) { - if ($this->curBlock['type'] == 'else' || $this->curBlock['type'] == 'elseif') { - $pointer -= strlen($match[0]); - } - if ($this->debug) echo 'TOP BLOCK CLOSED
        '; - return $this->removeTopBlock(); - } else { - if ($this->debug) echo 'BLOCK OF TYPE '.$match[1].' CLOSED
        '; - return $this->removeBlock($match[1]); - } - } elseif ($curBlock === 'root' && substr($substr, 0, strlen($this->rd)) === $this->rd) { - // end template tag - if ($this->debug) echo 'TAG PARSING ENDED
        '; - $pointer += strlen($this->rd); - return false; - } elseif (is_array($parsingParams) && preg_match('#^([a-z0-9_]+\s*=)(?:\s+|[^=]).*#i', $substr, $match)) { - // named parameter - if ($this->debug) echo 'NAMED PARAM FOUND
        '; - $len = strlen($match[1]); - while (substr($in, $from+$len, 1)===' ') { - $len++; - } - if ($pointer !== null) { - $pointer += $len; - } - - $output = array(trim(substr(trim($match[1]), 0, -1)), $this->parse($in, $from+$len, $to, false, 'namedparam', $pointer)); - - $parsingParams[] = $output; - return $parsingParams; - } elseif (preg_match('#^([a-z0-9_]+::\$[a-z0-9_]+)#i', $substr, $match)) { - // static member access - $parsed = 'var'; - if (is_array($parsingParams)) { - $parsingParams[] = array($match[1], $match[1]); - $out = $parsingParams; - } else { - $out = $match[1]; - } - $pointer += strlen($match[1]); - } elseif ($substr!=='' && (is_array($parsingParams) || $curBlock === 'namedparam' || $curBlock === 'condition' || $curBlock === 'expression')) { - // unquoted string, bool or number - $out = $this->parseOthers($in, $from, $to, $parsingParams, $curBlock, $pointer); - } else { - // parse error - throw new Dwoo_Compilation_Exception($this, 'Parse error in "'.substr($in, $from, $to-$from).'"'); - } - - if (empty($out)) { - return ''; - } - - $substr = substr($in, $pointer, $to-$pointer); - - // var parsed, check if any var-extension applies - if ($parsed==='var') { - if (preg_match('#^\s*([/%+*-])\s*([a-z0-9]|\$)#i', $substr, $match)) { - if($this->debug) echo 'PARSING POST-VAR EXPRESSION '.$substr.'
        '; - // parse expressions - $pointer += strlen($match[0]) - 1; - if (is_array($parsingParams)) { - if ($match[2] == '$') { - $expr = $this->parseVar($in, $pointer, $to, array(), $curBlock, $pointer); - } else { - $expr = $this->parse($in, $pointer, $to, array(), 'expression', $pointer); - } - $out[count($out)-1][0] .= $match[1] . $expr[0][0]; - $out[count($out)-1][1] .= $match[1] . $expr[0][1]; - } else { - if ($match[2] == '$') { - $expr = $this->parseVar($in, $pointer, $to, false, $curBlock, $pointer); - } else { - $expr = $this->parse($in, $pointer, $to, false, 'expression', $pointer); - } - if (is_array($out) && is_array($expr)) { - $out[0] .= $match[1] . $expr[0]; - $out[1] .= $match[1] . $expr[1]; - } elseif (is_array($out)) { - $out[0] .= $match[1] . $expr; - $out[1] .= $match[1] . $expr; - } elseif (is_array($expr)) { - $out .= $match[1] . $expr[0]; - } else { - $out .= $match[1] . $expr; - } - } - } else if ($curBlock === 'root' && preg_match('#^(\s*(?:[+/*%-.]=|=|\+\+|--)\s*)(.*)#s', $substr, $match)) { - if($this->debug) echo 'PARSING POST-VAR ASSIGNMENT '.$substr.'
        '; - // parse assignment - $value = $match[2]; - $operator = trim($match[1]); - if (substr($value, 0, 1) == '=') { - throw new Dwoo_Compilation_Exception($this, 'Unexpected "=" in '.$substr.''); - } - - if ($pointer !== null) { - $pointer += strlen($match[1]); - } - - if ($operator !== '++' && $operator !== '--') { - $parts = array(); - $ptr = 0; - $parts = $this->parse($value, 0, strlen($value), $parts, 'condition', $ptr); - $pointer += $ptr; - - // load if plugin - try { - $this->getPluginType('if'); - } catch (Dwoo_Exception $e) { - throw new Dwoo_Compilation_Exception($this, 'Assignments require the "if" plugin to be accessible'); - } - - $parts = $this->mapParams($parts, array('Dwoo_Plugin_if', 'init'), 1); - $parts = $this->getCompiledParams($parts); - - $value = Dwoo_Plugin_if::replaceKeywords($parts['*'], $this); - $echo = ''; - } else { - $value = array(); - $echo = 'echo '; - } - - if ($this->autoEscape) { - $out = preg_replace('#\(is_string\(\$tmp=(.+?)\) \? htmlspecialchars\(\$tmp, ENT_QUOTES, \$this->charset\) : \$tmp\)#', '$1', $out); - } - $out = Dwoo_Compiler::PHP_OPEN. $echo . $out . $operator . implode(' ', $value) . Dwoo_Compiler::PHP_CLOSE; - } - } - - if ($curBlock !== 'modifier' && ($parsed === 'func' || $parsed === 'var') && preg_match('#^\|@?[a-z0-9_]+(:.*)?#i', $substr, $match)) { - // parse modifier on funcs or vars - $srcPointer = $pointer; - if (is_array($parsingParams)) { - $tmp = $this->replaceModifiers(array(null, null, $out[count($out)-1][0], $match[0]), 'var', $pointer); - $out[count($out)-1][0] = $tmp; - $out[count($out)-1][1] .= substr($substr, $srcPointer, $srcPointer - $pointer); - } else { - $out = $this->replaceModifiers(array(null, null, $out, $match[0]), 'var', $pointer); - } - } - - // func parsed, check if any func-extension applies - if ($parsed==='func' && preg_match('#^->[a-z0-9_]+(\s*\(.+|->[a-z].*)?#is', $substr, $match)) { - // parse method call or property read - $ptr = 0; - - if (is_array($parsingParams)) { - $output = $this->parseMethodCall($out[count($out)-1][1], $match[0], $curBlock, $ptr); - - $out[count($out)-1][0] = $output; - $out[count($out)-1][1] .= substr($match[0], 0, $ptr); - } else { - $out = $this->parseMethodCall($out, $match[0], $curBlock, $ptr); - } - - $pointer += $ptr; - } - - if ($curBlock === 'root' && substr($out, 0, strlen(self::PHP_OPEN)) !== self::PHP_OPEN) { - return self::PHP_OPEN .'echo '.$out.';'. self::PHP_CLOSE; - } else { - return $out; - } - } - - /** - * parses a function call - * - * @param string $in the string within which we must parse something - * @param int $from the starting offset of the parsed area - * @param int $to the ending offset of the parsed area - * @param mixed $parsingParams must be an array if we are parsing a function or modifier's parameters, or false by default - * @param string $curBlock the current parser-block being processed - * @param mixed $pointer a reference to a pointer that will be increased by the amount of characters parsed, or null by default - * @return string parsed values - */ - protected function parseFunction($in, $from, $to, $parsingParams = false, $curBlock='', &$pointer = null) - { - $cmdstr = substr($in, $from, $to-$from); - preg_match('/^([a-z][a-z0-9_]*(?:::[a-z][a-z0-9_]*)?)(\s*'.$this->rdr.'|\s*;)?/i', $cmdstr, $match); - - if (empty($match[1])) { - throw new Dwoo_Compilation_Exception($this, 'Parse error, invalid function name : '.substr($cmdstr, 0, 15)); - } - - $func = $match[1]; - - if (!empty($match[2])) { - $cmdstr = $match[1]; - } - - if ($this->debug) echo 'FUNC FOUND ('.$func.')
        '; - - $paramsep = ''; - - if (is_array($parsingParams) || $curBlock != 'root') { - $paramspos = strpos($cmdstr, '('); - $paramsep = ')'; - } elseif(preg_match_all('#[a-z0-9_]+(\s*\(|\s+[^(])#i', $cmdstr, $match, PREG_OFFSET_CAPTURE)) { - $paramspos = $match[1][0][1]; - $paramsep = substr($match[1][0][0], -1) === '(' ? ')':''; - if($paramsep === ')') { - $paramspos += strlen($match[1][0][0]) - 1; - if(substr($cmdstr, 0, 2) === 'if' || substr($cmdstr, 0, 6) === 'elseif') { - $paramsep = ''; - if(strlen($match[1][0][0]) > 1) { - $paramspos--; - } - } - } - } else { - $paramspos = false; - } - - $state = 0; - - if ($paramspos === false) { - $params = array(); - - if ($curBlock !== 'root') { - return $this->parseOthers($in, $from, $to, $parsingParams, $curBlock, $pointer); - } - } else { - if ($curBlock === 'condition') { - // load if plugin - $this->getPluginType('if'); - if (Dwoo_Plugin_if::replaceKeywords(array($func), $this) !== array($func)) { - return $this->parseOthers($in, $from, $to, $parsingParams, $curBlock, $pointer); - } - } - $whitespace = strlen(substr($cmdstr, strlen($func), $paramspos-strlen($func))); - $paramstr = substr($cmdstr, $paramspos+1); - if (substr($paramstr, -1, 1) === $paramsep) { - $paramstr = substr($paramstr, 0, -1); - } - - if (strlen($paramstr)===0) { - $params = array(); - $paramstr = ''; - } else { - $ptr = 0; - $params = array(); - if ($func === 'empty') { - $params = $this->parseVar($paramstr, $ptr, strlen($paramstr), $params, 'root', $ptr); - } else { - while ($ptr < strlen($paramstr)) { - while (true) { - if ($ptr >= strlen($paramstr)) { - break 2; - } - - if ($func !== 'if' && $func !== 'elseif' && $paramstr[$ptr] === ')') { - if ($this->debug) echo 'PARAM PARSING ENDED, ")" FOUND, POINTER AT '.$ptr.'
        '; - break 2; - } elseif ($paramstr[$ptr] === ';') { - $ptr++; - if ($this->debug) echo 'PARAM PARSING ENDED, ";" FOUND, POINTER AT '.$ptr.'
        '; - break 2; - } elseif ($func !== 'if' && $func !== 'elseif' && $paramstr[$ptr] === '/') { - if ($this->debug) echo 'PARAM PARSING ENDED, "/" FOUND, POINTER AT '.$ptr.'
        '; - break 2; - } elseif (substr($paramstr, $ptr, strlen($this->rd)) === $this->rd) { - if ($this->debug) echo 'PARAM PARSING ENDED, RIGHT DELIMITER FOUND, POINTER AT '.$ptr.'
        '; - break 2; - } - - if ($paramstr[$ptr] === ' ' || $paramstr[$ptr] === ',' || $paramstr[$ptr] === "\r" || $paramstr[$ptr] === "\n" || $paramstr[$ptr] === "\t") { - $ptr++; - } else { - break; - } - } - - if ($this->debug) echo 'FUNC START PARAM PARSING WITH POINTER AT '.$ptr.'
        '; - - if ($func === 'if' || $func === 'elseif' || $func === 'tif') { - $params = $this->parse($paramstr, $ptr, strlen($paramstr), $params, 'condition', $ptr); - } else { - $params = $this->parse($paramstr, $ptr, strlen($paramstr), $params, 'function', $ptr); - } - - if ($this->debug) echo 'PARAM PARSED, POINTER AT '.$ptr.' ('.substr($paramstr, $ptr-1, 3).')
        '; - } - } - $paramstr = substr($paramstr, 0, $ptr); - $state = 0; - foreach ($params as $k=>$p) { - if (is_array($p) && is_array($p[1])) { - $state |= 2; - } else { - if (($state & 2) && preg_match('#^(["\'])(.+?)\1$#', $p[0], $m)) { - $params[$k] = array($m[2], array('true', 'true')); - } else { - if ($state & 2) { - throw new Dwoo_Compilation_Exception($this, 'You can not use an unnamed parameter after a named one'); - } - $state |= 1; - } - } - } - } - } - - if ($pointer !== null) { - $pointer += (isset($paramstr) ? strlen($paramstr) : 0) + (')' === $paramsep ? 2 : ($paramspos === false ? 0 : 1)) + strlen($func) + (isset($whitespace) ? $whitespace : 0); - if ($this->debug) echo 'FUNC ADDS '.((isset($paramstr) ? strlen($paramstr) : 0) + (')' === $paramsep ? 2 : ($paramspos === false ? 0 : 1)) + strlen($func)).' TO POINTER
        '; - } - - if ($curBlock === 'method' || $func === 'do' || strstr($func, '::') !== false) { - $pluginType = Dwoo::NATIVE_PLUGIN; - } else { - $pluginType = $this->getPluginType($func); - } - - // blocks - if ($pluginType & Dwoo::BLOCK_PLUGIN) { - if ($curBlock !== 'root' || is_array($parsingParams)) { - throw new Dwoo_Compilation_Exception($this, 'Block plugins can not be used as other plugin\'s arguments'); - } - if ($pluginType & Dwoo::CUSTOM_PLUGIN) { - return $this->addCustomBlock($func, $params, $state); - } else { - return $this->addBlock($func, $params, $state); - } - } elseif ($pluginType & Dwoo::SMARTY_BLOCK) { - if ($curBlock !== 'root' || is_array($parsingParams)) { - throw new Dwoo_Compilation_Exception($this, 'Block plugins can not be used as other plugin\'s arguments'); - } - - if ($state & 2) { - array_unshift($params, array('__functype', array($pluginType, $pluginType))); - array_unshift($params, array('__funcname', array($func, $func))); - } else { - array_unshift($params, array($pluginType, $pluginType)); - array_unshift($params, array($func, $func)); - } - - return $this->addBlock('smartyinterface', $params, $state); - } - - // funcs - if ($pluginType & Dwoo::NATIVE_PLUGIN || $pluginType & Dwoo::SMARTY_FUNCTION || $pluginType & Dwoo::SMARTY_BLOCK) { - $params = $this->mapParams($params, null, $state); - } elseif ($pluginType & Dwoo::CLASS_PLUGIN) { - if ($pluginType & Dwoo::CUSTOM_PLUGIN) { - $params = $this->mapParams($params, array($this->customPlugins[$func]['class'], $this->customPlugins[$func]['function']), $state); - } else { - $params = $this->mapParams($params, array('Dwoo_Plugin_'.$func, ($pluginType & Dwoo::COMPILABLE_PLUGIN) ? 'compile' : 'process'), $state); - } - } elseif ($pluginType & Dwoo::FUNC_PLUGIN) { - if ($pluginType & Dwoo::CUSTOM_PLUGIN) { - $params = $this->mapParams($params, $this->customPlugins[$func]['callback'], $state); - } else { - $params = $this->mapParams($params, 'Dwoo_Plugin_'.$func.(($pluginType & Dwoo::COMPILABLE_PLUGIN) ? '_compile' : ''), $state); - } - } elseif ($pluginType & Dwoo::SMARTY_MODIFIER) { - $output = 'smarty_modifier_'.$func.'('.implode(', ', $params).')'; - } elseif ($pluginType & Dwoo::PROXY_PLUGIN) { - $params = $this->mapParams($params, $this->getDwoo()->getPluginProxy()->getCallback($func), $state); - } elseif ($pluginType & Dwoo::TEMPLATE_PLUGIN) { - // transforms the parameter array from (x=>array('paramname'=>array(values))) to (paramname=>array(values)) - $map = array(); - foreach ($this->templatePlugins[$func]['params'] as $param=>$defValue) { - if ($param == 'rest') { - $param = '*'; - } - $hasDefault = $defValue !== null; - if ($defValue === 'null') { - $defValue = null; - } elseif ($defValue === 'false') { - $defValue = false; - } elseif ($defValue === 'true') { - $defValue = true; - } elseif (preg_match('#^([\'"]).*?\1$#', $defValue)) { - $defValue = substr($defValue, 1, -1); - } - $map[] = array($param, $hasDefault, $defValue); - } - - $params = $this->mapParams($params, null, $state, $map); - } - - // only keep php-syntax-safe values for non-block plugins - foreach ($params as &$p) { - $p = $p[0]; - } - if ($pluginType & Dwoo::NATIVE_PLUGIN) { - if ($func === 'do') { - if (isset($params['*'])) { - $output = implode(';', $params['*']).';'; - } else { - $output = ''; - } - - if (is_array($parsingParams) || $curBlock !== 'root') { - throw new Dwoo_Compilation_Exception($this, 'Do can not be used inside another function or block'); - } else { - return self::PHP_OPEN.$output.self::PHP_CLOSE; - } - } else { - if (isset($params['*'])) { - $output = $func.'('.implode(', ', $params['*']).')'; - } else { - $output = $func.'()'; - } - } - } elseif ($pluginType & Dwoo::FUNC_PLUGIN) { - if ($pluginType & Dwoo::COMPILABLE_PLUGIN) { - if ($pluginType & Dwoo::CUSTOM_PLUGIN) { - $funcCompiler = $this->customPlugins[$func]['callback']; - } else { - $funcCompiler = 'Dwoo_Plugin_'.$func.'_compile'; - } - array_unshift($params, $this); - $output = call_user_func_array($funcCompiler, $params); - } else { - array_unshift($params, '$this'); - $params = self::implode_r($params); - - if ($pluginType & Dwoo::CUSTOM_PLUGIN) { - $callback = $this->customPlugins[$func]['callback']; - $output = 'call_user_func(\''.$callback.'\', '.$params.')'; - } else { - $output = 'Dwoo_Plugin_'.$func.'('.$params.')'; - } - } - } elseif ($pluginType & Dwoo::CLASS_PLUGIN) { - if ($pluginType & Dwoo::COMPILABLE_PLUGIN) { - if ($pluginType & Dwoo::CUSTOM_PLUGIN) { - $callback = $this->customPlugins[$func]['callback']; - if (!is_array($callback)) { - if (!method_exists($callback, 'compile')) { - throw new Dwoo_Exception('Custom plugin '.$func.' must implement the "compile" method to be compilable, or you should provide a full callback to the method to use'); - } - if (($ref = new ReflectionMethod($callback, 'compile')) && $ref->isStatic()) { - $funcCompiler = array($callback, 'compile'); - } else { - $funcCompiler = array(new $callback, 'compile'); - } - } else { - $funcCompiler = $callback; - } - } else { - $funcCompiler = array('Dwoo_Plugin_'.$func, 'compile'); - array_unshift($params, $this); - } - $output = call_user_func_array($funcCompiler, $params); - } else { - $params = self::implode_r($params); - if ($pluginType & Dwoo::CUSTOM_PLUGIN) { - $callback = $this->customPlugins[$func]['callback']; - if (!is_array($callback)) { - if (!method_exists($callback, 'process')) { - throw new Dwoo_Exception('Custom plugin '.$func.' must implement the "process" method to be usable, or you should provide a full callback to the method to use'); - } - if (($ref = new ReflectionMethod($callback, 'process')) && $ref->isStatic()) { - $output = 'call_user_func(array(\''.$callback.'\', \'process\'), '.$params.')'; - } else { - $output = 'call_user_func(array($this->getObjectPlugin(\''.$callback.'\'), \'process\'), '.$params.')'; - } - } elseif (is_object($callback[0])) { - $output = 'call_user_func(array($this->plugins[\''.$func.'\'][\'callback\'][0], \''.$callback[1].'\'), '.$params.')'; - } elseif (($ref = new ReflectionMethod($callback[0], $callback[1])) && $ref->isStatic()) { - $output = 'call_user_func(array(\''.$callback[0].'\', \''.$callback[1].'\'), '.$params.')'; - } else { - $output = 'call_user_func(array($this->getObjectPlugin(\''.$callback[0].'\'), \''.$callback[1].'\'), '.$params.')'; - } - if (empty($params)) { - $output = substr($output, 0, -3).')'; - } - } else { - $output = '$this->classCall(\''.$func.'\', array('.$params.'))'; - } - } - } elseif ($pluginType & Dwoo::PROXY_PLUGIN) { - $output = call_user_func(array($this->dwoo->getPluginProxy(), 'getCode'), $func, $params); - } elseif ($pluginType & Dwoo::SMARTY_FUNCTION) { - if (isset($params['*'])) { - $params = self::implode_r($params['*'], true); - } else { - $params = ''; - } - - if ($pluginType & Dwoo::CUSTOM_PLUGIN) { - $callback = $this->customPlugins[$func]['callback']; - if (is_array($callback)) { - if (is_object($callback[0])) { - $output = 'call_user_func_array(array($this->plugins[\''.$func.'\'][\'callback\'][0], \''.$callback[1].'\'), array(array('.$params.'), $this))'; - } else { - $output = 'call_user_func_array(array(\''.$callback[0].'\', \''.$callback[1].'\'), array(array('.$params.'), $this))'; - } - } else { - $output = $callback.'(array('.$params.'), $this)'; - } - } else { - $output = 'smarty_function_'.$func.'(array('.$params.'), $this)'; - } - } elseif ($pluginType & Dwoo::TEMPLATE_PLUGIN) { - array_unshift($params, '$this'); - $params = self::implode_r($params); - $output = 'Dwoo_Plugin_'.$func.'_'.$this->templatePlugins[$func]['uuid'].'('.$params.')'; - $this->templatePlugins[$func]['called'] = true; - } - - if (is_array($parsingParams)) { - $parsingParams[] = array($output, $output); - return $parsingParams; - } elseif ($curBlock === 'namedparam') { - return array($output, $output); - } else { - return $output; - } - } - - /** - * parses a string - * - * @param string $in the string within which we must parse something - * @param int $from the starting offset of the parsed area - * @param int $to the ending offset of the parsed area - * @param mixed $parsingParams must be an array if we are parsing a function or modifier's parameters, or false by default - * @param string $curBlock the current parser-block being processed - * @param mixed $pointer a reference to a pointer that will be increased by the amount of characters parsed, or null by default - * @return string parsed values - */ - protected function parseString($in, $from, $to, $parsingParams = false, $curBlock='', &$pointer = null) - { - $substr = substr($in, $from, $to-$from); - $first = $substr[0]; - - if ($this->debug) echo 'STRING FOUND (in '.htmlentities(substr($in, $from, min($to-$from, 50))).(($to-$from) > 50 ? '...':'').')
        '; - $strend = false; - $o = $from+1; - while ($strend === false) { - $strend = strpos($in, $first, $o); - if ($strend === false) { - throw new Dwoo_Compilation_Exception($this, 'Unfinished string, started with '.substr($in, $from, $to-$from)); - } - if (substr($in, $strend-1, 1) === '\\') { - $o = $strend+1; - $strend = false; - } - } - if ($this->debug) echo 'STRING DELIMITED: '.substr($in, $from, $strend+1-$from).'
        '; - - $srcOutput = substr($in, $from, $strend+1-$from); - - if ($pointer !== null) { - $pointer += strlen($srcOutput); - } - - $output = $this->replaceStringVars($srcOutput, $first); - - // handle modifiers - if ($curBlock !== 'modifier' && preg_match('#^((?:\|(?:@?[a-z0-9_]+(?::.*)*))+)#i', substr($substr, $strend+1-$from), $match)) { - $modstr = $match[1]; - - if ($curBlock === 'root' && substr($modstr, -1) === '}') { - $modstr = substr($modstr, 0, -1); - } - $modstr = str_replace('\\'.$first, $first, $modstr); - $ptr = 0; - $output = $this->replaceModifiers(array(null, null, $output, $modstr), 'string', $ptr); - - $strend += $ptr; - if ($pointer !== null) { - $pointer += $ptr; - } - $srcOutput .= substr($substr, $strend+1-$from, $ptr); - } - - if (is_array($parsingParams)) { - $parsingParams[] = array($output, substr($srcOutput, 1, -1)); - return $parsingParams; - } elseif ($curBlock === 'namedparam') { - return array($output, substr($srcOutput, 1, -1)); - } else { - return $output; - } - } - - /** - * parses a constant - * - * @param string $in the string within which we must parse something - * @param int $from the starting offset of the parsed area - * @param int $to the ending offset of the parsed area - * @param mixed $parsingParams must be an array if we are parsing a function or modifier's parameters, or false by default - * @param string $curBlock the current parser-block being processed - * @param mixed $pointer a reference to a pointer that will be increased by the amount of characters parsed, or null by default - * @return string parsed values - */ - protected function parseConst($in, $from, $to, $parsingParams = false, $curBlock='', &$pointer = null) - { - $substr = substr($in, $from, $to-$from); - - if ($this->debug) { - echo 'CONST FOUND : '.$substr.'
        '; - } - - if (!preg_match('#^%([a-z0-9_:]+)#i', $substr, $m)) { - throw new Dwoo_Compilation_Exception($this, 'Invalid constant'); - } - - if ($pointer !== null) { - $pointer += strlen($m[0]); - } - - $output = $this->parseConstKey($m[1], $curBlock); - - if (is_array($parsingParams)) { - $parsingParams[] = array($output, $m[1]); - return $parsingParams; - } elseif ($curBlock === 'namedparam') { - return array($output, $m[1]); - } else { - return $output; - } - } - - /** - * parses a constant - * - * @param string $key the constant to parse - * @param string $curBlock the current parser-block being processed - * @return string parsed constant - */ - protected function parseConstKey($key, $curBlock) - { - if ($this->securityPolicy !== null && $this->securityPolicy->getConstantHandling() === Dwoo_Security_Policy::CONST_DISALLOW) { - return 'null'; - } - - if ($curBlock !== 'root') { - $output = '(defined("'.$key.'") ? '.$key.' : null)'; - } else { - $output = $key; - } - - return $output; - } - - /** - * parses a variable - * - * @param string $in the string within which we must parse something - * @param int $from the starting offset of the parsed area - * @param int $to the ending offset of the parsed area - * @param mixed $parsingParams must be an array if we are parsing a function or modifier's parameters, or false by default - * @param string $curBlock the current parser-block being processed - * @param mixed $pointer a reference to a pointer that will be increased by the amount of characters parsed, or null by default - * @return string parsed values - */ - protected function parseVar($in, $from, $to, $parsingParams = false, $curBlock='', &$pointer = null) - { - $substr = substr($in, $from, $to-$from); - - if (preg_match('#(\$?\.?[a-z0-9_:]*(?:(?:(?:\.|->)(?:[a-z0-9_:]+|(?R))|\[(?:[a-z0-9_:]+|(?R)|(["\'])[^\2]*?\2)\]))*)' . // var key - ($curBlock==='root' || $curBlock==='function' || $curBlock==='namedparam' || $curBlock==='condition' || $curBlock==='variable' || $curBlock==='expression' ? '(\(.*)?' : '()') . // method call - ($curBlock==='root' || $curBlock==='function' || $curBlock==='namedparam' || $curBlock==='condition' || $curBlock==='variable' || $curBlock==='delimited_string' ? '((?:(?:[+/*%=-])(?:(?_:-]+(?:\([^)]*\))?|(?'))); - $key = substr($match[1], 1, strrpos($match[1], '->')-1); - $methodCall = substr($match[1], strrpos($match[1], '->')) . $match[3]; - } - - if ($hasModifiers) { - $matchedLength -= strlen($match[5]); - } - - if ($pointer !== null) { - $pointer += $matchedLength; - } - - // replace useless brackets by dot accessed vars - $key = preg_replace('#\[([^$%\[.>-]+)\]#', '.$1', $key); - - // prevent $foo->$bar calls because it doesn't seem worth the trouble - if (strpos($key, '->$') !== false) { - throw new Dwoo_Compilation_Exception($this, 'You can not access an object\'s property using a variable name.'); - } - - if ($this->debug) { - if ($hasMethodCall) { - echo 'METHOD CALL FOUND : $'.$key.substr($methodCall, 0, 30).'
        '; - } else { - echo 'VAR FOUND : $'.$key.'
        '; - } - } - - $key = str_replace('"', '\\"', $key); - - $cnt=substr_count($key, '$'); - if ($cnt > 0) { - $uid = 0; - $parsed = array($uid => ''); - $current =& $parsed; - $curTxt =& $parsed[$uid++]; - $tree = array(); - $chars = str_split($key, 1); - $inSplittedVar = false; - $bracketCount = 0; - - while (($char = array_shift($chars)) !== null) { - if ($char === '[') { - if (count($tree) > 0) { - $bracketCount++; - } else { - $tree[] =& $current; - $current[$uid] = array($uid+1 => ''); - $current =& $current[$uid++]; - $curTxt =& $current[$uid++]; - continue; - } - } elseif ($char === ']') { - if ($bracketCount > 0) { - $bracketCount--; - } else { - $current =& $tree[count($tree)-1]; - array_pop($tree); - if (current($chars) !== '[' && current($chars) !== false && current($chars) !== ']') { - $current[$uid] = ''; - $curTxt =& $current[$uid++]; - } - continue; - } - } elseif ($char === '$') { - if (count($tree) == 0) { - $curTxt =& $current[$uid++]; - $inSplittedVar = true; - } - } elseif (($char === '.' || $char === '-') && count($tree) == 0 && $inSplittedVar) { - $curTxt =& $current[$uid++]; - $inSplittedVar = false; - } - - $curTxt .= $char; - } - unset($uid, $current, $curTxt, $tree, $chars); - - if ($this->debug) echo 'RECURSIVE VAR REPLACEMENT : '.$key.'
        '; - - $key = $this->flattenVarTree($parsed); - - if ($this->debug) echo 'RECURSIVE VAR REPLACEMENT DONE : '.$key.'
        '; - - $output = preg_replace('#(^""\.|""\.|\.""$|(\()""\.|\.""(\)))#', '$2$3', '$this->readVar("'.$key.'")'); - } else { - $output = $this->parseVarKey($key, $hasModifiers ? 'modifier' : $curBlock); - } - - // methods - if ($hasMethodCall) { - $ptr = 0; - - $output = $this->parseMethodCall($output, $methodCall, $curBlock, $ptr); - - if ($pointer !== null) { - $pointer += $ptr; - } - $matchedLength += $ptr; - } - - if ($hasExpression) { - // expressions - preg_match_all('#(?:([+/*%=-])(=?-?[%$][a-z0-9.[\]>_:-]+(?:\([^)]*\))?|=?-?[0-9.,]+|\1))#i', $match[4], $expMatch); - - foreach ($expMatch[1] as $k=>$operator) { - if (substr($expMatch[2][$k], 0, 1)==='=') { - $assign = true; - if ($operator === '=') { - throw new Dwoo_Compilation_Exception($this, 'Invalid expression '.$substr.', can not use "==" in expressions'); - } - if ($curBlock !== 'root') { - throw new Dwoo_Compilation_Exception($this, 'Invalid expression '.$substr.', assignments can only be used in top level expressions like {$foo+=3} or {$foo="bar"}'); - } - $operator .= '='; - $expMatch[2][$k] = substr($expMatch[2][$k], 1); - } - - if (substr($expMatch[2][$k], 0, 1)==='-' && strlen($expMatch[2][$k]) > 1) { - $operator .= '-'; - $expMatch[2][$k] = substr($expMatch[2][$k], 1); - } - if (($operator==='+'||$operator==='-') && $expMatch[2][$k]===$operator) { - $output = '('.$output.$operator.$operator.')'; - break; - } elseif (substr($expMatch[2][$k], 0, 1) === '$') { - $output = '('.$output.' '.$operator.' '.$this->parseVar($expMatch[2][$k], 0, strlen($expMatch[2][$k]), false, 'expression').')'; - } elseif (substr($expMatch[2][$k], 0, 1) === '%') { - $output = '('.$output.' '.$operator.' '.$this->parseConst($expMatch[2][$k], 0, strlen($expMatch[2][$k]), false, 'expression').')'; - } elseif (!empty($expMatch[2][$k])) { - $output = '('.$output.' '.$operator.' '.str_replace(',', '.', $expMatch[2][$k]).')'; - } else { - throw new Dwoo_Compilation_Exception($this, 'Unfinished expression '.$substr.', missing var or number after math operator'); - } - } - } - - if ($this->autoEscape === true) { - $output = '(is_string($tmp='.$output.') ? htmlspecialchars($tmp, ENT_QUOTES, $this->charset) : $tmp)'; - } - - // handle modifiers - if ($curBlock !== 'modifier' && $hasModifiers) { - $ptr = 0; - $output = $this->replaceModifiers(array(null, null, $output, $match[5]), 'var', $ptr); - if ($pointer !== null) { - $pointer += $ptr; - } - $matchedLength += $ptr; - } - - if (is_array($parsingParams)) { - $parsingParams[] = array($output, $key); - return $parsingParams; - } elseif ($curBlock === 'namedparam') { - return array($output, $key); - } elseif ($curBlock === 'string' || $curBlock === 'delimited_string') { - return array($matchedLength, $output); - } elseif ($curBlock === 'expression' || $curBlock === 'variable') { - return $output; - } elseif (isset($assign)) { - return self::PHP_OPEN.$output.';'.self::PHP_CLOSE; - } else { - return $output; - } - } else { - if ($curBlock === 'string' || $curBlock === 'delimited_string') { - return array(0, ''); - } else { - throw new Dwoo_Compilation_Exception($this, 'Invalid variable name '.$substr.''); - } - } - } - - /** - * parses any number of chained method calls/property reads - * - * @param string $output the variable or whatever upon which the method are called - * @param string $methodCall method call source, starting at "->" - * @param string $curBlock the current parser-block being processed - * @param int $pointer a reference to a pointer that will be increased by the amount of characters parsed - * @return string parsed call(s)/read(s) - */ - protected function parseMethodCall($output, $methodCall, $curBlock, &$pointer) - { - $ptr = 0; - $len = strlen($methodCall); - - while ($ptr < $len) { - if (strpos($methodCall, '->', $ptr) === $ptr) { - $ptr += 2; - } - - if (in_array($methodCall[$ptr], array(';', '/', ' ', "\t", "\r", "\n", ')', '+', '*', '%', '=', '-', '|')) || substr($methodCall, $ptr, strlen($this->rd)) === $this->rd) { - // break char found - break; - } - - if(!preg_match('/^([a-z0-9_]+)(\(.*?\))?/i', substr($methodCall, $ptr), $methMatch)) { - throw new Dwoo_Compilation_Exception($this, 'Invalid method name : '.substr($methodCall, $ptr, 20)); - } - - if (empty($methMatch[2])) { - // property - if ($curBlock === 'root') { - $output .= '->'.$methMatch[1]; - } else { - $output = '(($tmp = '.$output.') ? $tmp->'.$methMatch[1].' : null)'; - } - $ptr += strlen($methMatch[1]); - } else { - // method - if (substr($methMatch[2], 0, 2) === '()') { - $parsedCall = '->'.$methMatch[1].'()'; - $ptr += strlen($methMatch[1]) + 2; - } else { - $parsedCall = '->'.$this->parseFunction($methodCall, $ptr, strlen($methodCall), false, 'method', $ptr); - } - if ($curBlock === 'root') { - $output .= $parsedCall; - } else { - $output = '(($tmp = '.$output.') ? $tmp'.$parsedCall.' : null)'; - } - } - } - - $pointer += $ptr; - return $output; - } - - /** - * parses a constant variable (a variable that doesn't contain another variable) and preprocesses it to save runtime processing time - * - * @param string $key the variable to parse - * @param string $curBlock the current parser-block being processed - * @return string parsed variable - */ - protected function parseVarKey($key, $curBlock) - { - if ($key === '') { - return '$this->scope'; - } - if (substr($key, 0, 1) === '.') { - $key = 'dwoo'.$key; - } - if (preg_match('#dwoo\.(get|post|server|cookies|session|env|request)((?:\.[a-z0-9_-]+)+)#i', $key, $m)) { - $global = strtoupper($m[1]); - if ($global === 'COOKIES') { - $global = 'COOKIE'; - } - $key = '$_'.$global; - foreach (explode('.', ltrim($m[2], '.')) as $part) - $key .= '['.var_export($part, true).']'; - if ($curBlock === 'root') { - $output = $key; - } else { - $output = '(isset('.$key.')?'.$key.':null)'; - } - } elseif (preg_match('#dwoo\.const\.([a-z0-9_:]+)#i', $key, $m)) { - return $this->parseConstKey($m[1], $curBlock); - } elseif ($this->scope !== null) { - if (strstr($key, '.') === false && strstr($key, '[') === false && strstr($key, '->') === false) { - if ($key === 'dwoo') { - $output = '$this->globals'; - } elseif ($key === '_root' || $key === '__') { - $output = '$this->data'; - } elseif ($key === '_parent' || $key === '_') { - $output = '$this->readParentVar(1)'; - } elseif ($key === '_key') { - $output = '$tmp_key'; - } else { - if ($curBlock === 'root') { - $output = '$this->scope["'.$key.'"]'; - } else { - $output = '(isset($this->scope["'.$key.'"]) ? $this->scope["'.$key.'"] : null)'; - } - } - } else { - preg_match_all('#(\[|->|\.)?((?:[a-z0-9_]|-(?!>))+|(\\\?[\'"])[^\3]*?\3)\]?#i', $key, $m); - - $i = $m[2][0]; - if ($i === '_parent' || $i === '_') { - $parentCnt = 0; - - while (true) { - $parentCnt++; - array_shift($m[2]); - array_shift($m[1]); - if (current($m[2]) === '_parent') { - continue; - } - break; - } - - $output = '$this->readParentVar('.$parentCnt.')'; - } else { - if ($i === 'dwoo') { - $output = '$this->globals'; - array_shift($m[2]); - array_shift($m[1]); - } elseif ($i === '_root' || $i === '__') { - $output = '$this->data'; - array_shift($m[2]); - array_shift($m[1]); - } elseif ($i === '_key') { - $output = '$tmp_key'; - } else { - $output = '$this->scope'; - } - - while (count($m[1]) && $m[1][0] !== '->') { - $m[2][0] = preg_replace('/(^\\\([\'"])|\\\([\'"])$)/x', '$2$3', $m[2][0]); - if(substr($m[2][0], 0, 1) == '"' || substr($m[2][0], 0, 1) == "'") { - $output .= '['.$m[2][0].']'; - } else { - $output .= '["'.$m[2][0].'"]'; - } - array_shift($m[2]); - array_shift($m[1]); - } - - if ($curBlock !== 'root') { - $output = '(isset('.$output.') ? '.$output.':null)'; - } - } - - if (count($m[2])) { - unset($m[0]); - $output = '$this->readVarInto('.str_replace("\n", '', var_export($m, true)).', '.$output.', '.($curBlock == 'root' ? 'false': 'true').')'; - } - } - } else { - preg_match_all('#(\[|->|\.)?((?:[a-z0-9_]|-(?!>))+)\]?#i', $key, $m); - unset($m[0]); - $output = '$this->readVar('.str_replace("\n", '', var_export($m, true)).')'; - } - - return $output; - } - - /** - * flattens a variable tree, this helps in parsing very complex variables such as $var.foo[$foo.bar->baz].baz, - * it computes the contents of the brackets first and works out from there - * - * @param array $tree the variable tree parsed by he parseVar() method that must be flattened - * @param bool $recursed leave that to false by default, it is only for internal use - * @return string flattened tree - */ - protected function flattenVarTree(array $tree, $recursed=false) - { - $out = $recursed ? '".$this->readVarInto(' : ''; - foreach ($tree as $bit) { - if (is_array($bit)) { - $out.='.'.$this->flattenVarTree($bit, false); - } else { - $key = str_replace('"', '\\"', $bit); - - if (substr($key, 0, 1)==='$') { - $out .= '".'.$this->parseVar($key, 0, strlen($key), false, 'variable').'."'; - } else { - $cnt = substr_count($key, '$'); - - if ($this->debug) echo 'PARSING SUBVARS IN : '.$key.'
        '; - if ($cnt > 0) { - while (--$cnt >= 0) { - if (isset($last)) { - $last = strrpos($key, '$', - (strlen($key) - $last + 1)); - } else { - $last = strrpos($key, '$'); - } - preg_match('#\$[a-z0-9_]+((?:(?:\.|->)(?:[a-z0-9_]+|(?R))|\[(?:[a-z0-9_]+|(?R))\]))*'. - '((?:(?:[+/*%-])(?:\$[a-z0-9.[\]>_:-]+(?:\([^)]*\))?|[0-9.,]*))*)#i', substr($key, $last), $submatch); - - $len = strlen($submatch[0]); - $key = substr_replace( - $key, - preg_replace_callback( - '#(\$[a-z0-9_]+((?:(?:\.|->)(?:[a-z0-9_]+|(?R))|\[(?:[a-z0-9_]+|(?R))\]))*)'. - '((?:(?:[+/*%-])(?:\$[a-z0-9.[\]>_:-]+(?:\([^)]*\))?|[0-9.,]*))*)#i', - array($this, 'replaceVarKeyHelper'), substr($key, $last, $len) - ), - $last, - $len - ); - if ($this->debug) echo 'RECURSIVE VAR REPLACEMENT DONE : '.$key.'
        '; - } - unset($last); - - $out .= $key; - } else { - $out .= $key; - } - } - } - } - $out .= $recursed ? ', true)."' : ''; - return $out; - } - - /** - * helper function that parses a variable - * - * @param array $match the matched variable, array(1=>"string match") - * @return string parsed variable - */ - protected function replaceVarKeyHelper($match) - { - return '".'.$this->parseVar($match[0], 0, strlen($match[0]), false, 'variable').'."'; - } - - /** - * parses various constants, operators or non-quoted strings - * - * @param string $in the string within which we must parse something - * @param int $from the starting offset of the parsed area - * @param int $to the ending offset of the parsed area - * @param mixed $parsingParams must be an array if we are parsing a function or modifier's parameters, or false by default - * @param string $curBlock the current parser-block being processed - * @param mixed $pointer a reference to a pointer that will be increased by the amount of characters parsed, or null by default - * @return string parsed values - */ - protected function parseOthers($in, $from, $to, $parsingParams = false, $curBlock='', &$pointer = null) - { - $first = $in[$from]; - $substr = substr($in, $from, $to-$from); - - $end = strlen($substr); - - if ($curBlock === 'condition') { - $breakChars = array('(', ')', ' ', '||', '&&', '|', '&', '>=', '<=', '===', '==', '=', '!==', '!=', '<<', '<', '>>', '>', '^', '~', ',', '+', '-', '*', '/', '%', '!', '?', ':', $this->rd, ';'); - } elseif ($curBlock === 'modifier') { - $breakChars = array(' ', ',', ')', ':', '|', "\r", "\n", "\t", ";", $this->rd); - } elseif ($curBlock === 'expression') { - $breakChars = array('/', '%', '+', '-', '*', ' ', ',', ')', "\r", "\n", "\t", ";", $this->rd); - } else { - $breakChars = array(' ', ',', ')', "\r", "\n", "\t", ";", $this->rd); - } - - $breaker = false; - while (list($k,$char) = each($breakChars)) { - $test = strpos($substr, $char); - if ($test !== false && $test < $end) { - $end = $test; - $breaker = $k; - } - } - - if ($curBlock === 'condition') { - if ($end === 0 && $breaker !== false) { - $end = strlen($breakChars[$breaker]); - } - } - - if ($end !== false) { - $substr = substr($substr, 0, $end); - } - - if ($pointer !== null) { - $pointer += strlen($substr); - } - - $src = $substr; - $substr = trim($substr); - - if (strtolower($substr) === 'false' || strtolower($substr) === 'no' || strtolower($substr) === 'off') { - if ($this->debug) echo 'BOOLEAN(FALSE) PARSED
        '; - $substr = 'false'; - } elseif (strtolower($substr) === 'true' || strtolower($substr) === 'yes' || strtolower($substr) === 'on') { - if ($this->debug) echo 'BOOLEAN(TRUE) PARSED
        '; - $substr = 'true'; - } elseif ($substr === 'null' || $substr === 'NULL') { - if ($this->debug) echo 'NULL PARSED
        '; - $substr = 'null'; - } elseif (is_numeric($substr)) { - $substr = (float) $substr; - if ((int) $substr == $substr) { - $substr = (int) $substr; - } - if ($this->debug) echo 'NUMBER ('.$substr.') PARSED
        '; - } elseif (preg_match('{^-?(\d+|\d*(\.\d+))\s*([/*%+-]\s*-?(\d+|\d*(\.\d+)))+$}', $substr)) { - if ($this->debug) echo 'SIMPLE MATH PARSED
        '; - $substr = '('.$substr.')'; - } elseif ($curBlock === 'condition' && array_search($substr, $breakChars, true) !== false) { - if ($this->debug) echo 'BREAKCHAR ('.$substr.') PARSED
        '; - //$substr = '"'.$substr.'"'; - } else { - $substr = $this->replaceStringVars('\''.str_replace('\'', '\\\'', $substr).'\'', '\'', $curBlock); - - if ($this->debug) echo 'BLABBER ('.$substr.') CASTED AS STRING
        '; - } - - if (is_array($parsingParams)) { - $parsingParams[] = array($substr, $src); - return $parsingParams; - } elseif ($curBlock === 'namedparam') { - return array($substr, $src); - } elseif ($curBlock === 'expression') { - return $substr; - } else { - throw new Exception('Something went wrong'); - } - } - - /** - * replaces variables within a parsed string - * - * @param string $string the parsed string - * @param string $first the first character parsed in the string, which is the string delimiter (' or ") - * @param string $curBlock the current parser-block being processed - * @return string the original string with variables replaced - */ - protected function replaceStringVars($string, $first, $curBlock='') - { - $pos = 0; - if ($this->debug) echo 'STRING VAR REPLACEMENT : '.$string.'
        '; - // replace vars - while (($pos = strpos($string, '$', $pos)) !== false) { - $prev = substr($string, $pos-1, 1); - if ($prev === '\\') { - $pos++; - continue; - } - - $var = $this->parse($string, $pos, null, false, ($curBlock === 'modifier' ? 'modifier' : ($prev === '`' ? 'delimited_string':'string'))); - $len = $var[0]; - $var = $this->parse(str_replace('\\'.$first, $first, $string), $pos, null, false, ($curBlock === 'modifier' ? 'modifier' : ($prev === '`' ? 'delimited_string':'string'))); - - if ($prev === '`' && substr($string, $pos+$len, 1) === '`') { - $string = substr_replace($string, $first.'.'.$var[1].'.'.$first, $pos-1, $len+2); - } else { - $string = substr_replace($string, $first.'.'.$var[1].'.'.$first, $pos, $len); - } - $pos += strlen($var[1]) + 2; - if ($this->debug) echo 'STRING VAR REPLACEMENT DONE : '.$string.'
        '; - } - - // handle modifiers - // TODO Obsolete? - $string = preg_replace_callback('#("|\')\.(.+?)\.\1((?:\|(?:@?[a-z0-9_]+(?:(?::("|\').+?\4|:[^`]*))*))+)#i', array($this, 'replaceModifiers'), $string); - - // replace escaped dollar operators by unescaped ones if required - if ($first==="'") { - $string = str_replace('\\$', '$', $string); - } - - return $string; - } - - /** - * replaces the modifiers applied to a string or a variable - * - * @param array $m the regex matches that must be array(1=>"double or single quotes enclosing a string, when applicable", 2=>"the string or var", 3=>"the modifiers matched") - * @param string $curBlock the current parser-block being processed - * @return string the input enclosed with various function calls according to the modifiers found - */ - protected function replaceModifiers(array $m, $curBlock = null, &$pointer = null) - { - if ($this->debug) echo 'PARSING MODIFIERS : '.$m[3].'
        '; - - if ($pointer !== null) { - $pointer += strlen($m[3]); - } - // remove first pipe - $cmdstrsrc = substr($m[3], 1); - // remove last quote if present - if (substr($cmdstrsrc, -1, 1) === $m[1]) { - $cmdstrsrc = substr($cmdstrsrc, 0, -1); - $add = $m[1]; - } - - $output = $m[2]; - - $continue = true; - while (strlen($cmdstrsrc) > 0 && $continue) { - if ($cmdstrsrc[0] === '|') { - $cmdstrsrc = substr($cmdstrsrc, 1); - continue; - } - if ($cmdstrsrc[0] === ' ' || $cmdstrsrc[0] === ';' || substr($cmdstrsrc, 0, strlen($this->rd)) === $this->rd) { - if ($this->debug) echo 'MODIFIER PARSING ENDED, RIGHT DELIMITER or ";" FOUND
        '; - $continue = false; - if ($pointer !== null) { - $pointer -= strlen($cmdstrsrc); - } - break; - } - $cmdstr = $cmdstrsrc; - $paramsep = ':'; - if (!preg_match('/^(@{0,2}[a-z][a-z0-9_]*)(:)?/i', $cmdstr, $match)) { - throw new Dwoo_Compilation_Exception($this, 'Invalid modifier name, started with : '.substr($cmdstr, 0, 10)); - } - $paramspos = !empty($match[2]) ? strlen($match[1]) : false; - $func = $match[1]; - - $state = 0; - if ($paramspos === false) { - $cmdstrsrc = substr($cmdstrsrc, strlen($func)); - $params = array(); - if ($this->debug) echo 'MODIFIER ('.$func.') CALLED WITH NO PARAMS
        '; - } else { - $paramstr = substr($cmdstr, $paramspos+1); - if (substr($paramstr, -1, 1) === $paramsep) { - $paramstr = substr($paramstr, 0, -1); - } - - $ptr = 0; - $params = array(); - while ($ptr < strlen($paramstr)) { - if ($this->debug) echo 'MODIFIER ('.$func.') START PARAM PARSING WITH POINTER AT '.$ptr.'
        '; - if ($this->debug) echo $paramstr.'--'.$ptr.'--'.strlen($paramstr).'--modifier
        '; - $params = $this->parse($paramstr, $ptr, strlen($paramstr), $params, 'modifier', $ptr); - if ($this->debug) echo 'PARAM PARSED, POINTER AT '.$ptr.'
        '; - - if ($ptr >= strlen($paramstr)) { - if ($this->debug) echo 'PARAM PARSING ENDED, PARAM STRING CONSUMED
        '; - break; - } - - if ($paramstr[$ptr] === ' ' || $paramstr[$ptr] === '|' || $paramstr[$ptr] === ';' || substr($paramstr, $ptr, strlen($this->rd)) === $this->rd) { - if ($this->debug) echo 'PARAM PARSING ENDED, " ", "|", RIGHT DELIMITER or ";" FOUND, POINTER AT '.$ptr.'
        '; - if ($paramstr[$ptr] !== '|') { - $continue = false; - if ($pointer !== null) { - $pointer -= strlen($paramstr) - $ptr; - } - } - $ptr++; - break; - } - if ($ptr < strlen($paramstr) && $paramstr[$ptr] === ':') { - $ptr++; - } - } - $cmdstrsrc = substr($cmdstrsrc, strlen($func)+1+$ptr); - $paramstr = substr($paramstr, 0, $ptr); - foreach ($params as $k=>$p) { - if (is_array($p) && is_array($p[1])) { - $state |= 2; - } else { - if (($state & 2) && preg_match('#^(["\'])(.+?)\1$#', $p[0], $m)) { - $params[$k] = array($m[2], array('true', 'true')); - } else { - if ($state & 2) { - throw new Dwoo_Compilation_Exception($this, 'You can not use an unnamed parameter after a named one'); - } - $state |= 1; - } - } - } - } - - // check if we must use array_map with this plugin or not - $mapped = false; - if (substr($func, 0, 1) === '@') { - $func = substr($func, 1); - $mapped = true; - } - - $pluginType = $this->getPluginType($func); - - if ($state & 2) { - array_unshift($params, array('value', array($output, $output))); - } else { - array_unshift($params, array($output, $output)); - } - - if ($pluginType & Dwoo::NATIVE_PLUGIN) { - $params = $this->mapParams($params, null, $state); - - $params = $params['*'][0]; - - $params = self::implode_r($params); - - if ($mapped) { - $output = '$this->arrayMap(\''.$func.'\', array('.$params.'))'; - } else { - $output = $func.'('.$params.')'; - } - } elseif ($pluginType & Dwoo::PROXY_PLUGIN) { - $params = $this->mapParams($params, $this->getDwoo()->getPluginProxy()->getCallback($func), $state); - foreach ($params as &$p) - $p = $p[0]; - $output = call_user_func(array($this->dwoo->getPluginProxy(), 'getCode'), $func, $params); - } elseif ($pluginType & Dwoo::SMARTY_MODIFIER) { - $params = $this->mapParams($params, null, $state); - $params = $params['*'][0]; - - $params = self::implode_r($params); - - if ($pluginType & Dwoo::CUSTOM_PLUGIN) { - $callback = $this->customPlugins[$func]['callback']; - if (is_array($callback)) { - if (is_object($callback[0])) { - $output = ($mapped ? '$this->arrayMap' : 'call_user_func_array').'(array($this->plugins[\''.$func.'\'][\'callback\'][0], \''.$callback[1].'\'), array('.$params.'))'; - } else { - $output = ($mapped ? '$this->arrayMap' : 'call_user_func_array').'(array(\''.$callback[0].'\', \''.$callback[1].'\'), array('.$params.'))'; - } - } elseif ($mapped) { - $output = '$this->arrayMap(\''.$callback.'\', array('.$params.'))'; - } else { - $output = $callback.'('.$params.')'; - } - } elseif ($mapped) { - $output = '$this->arrayMap(\'smarty_modifier_'.$func.'\', array('.$params.'))'; - } else { - $output = 'smarty_modifier_'.$func.'('.$params.')'; - } - } else { - if ($pluginType & Dwoo::CUSTOM_PLUGIN) { - $callback = $this->customPlugins[$func]['callback']; - $pluginName = $callback; - } else { - $pluginName = 'Dwoo_Plugin_'.$func; - - if ($pluginType & Dwoo::CLASS_PLUGIN) { - $callback = array($pluginName, ($pluginType & Dwoo::COMPILABLE_PLUGIN) ? 'compile' : 'process'); - } else { - $callback = $pluginName . (($pluginType & Dwoo::COMPILABLE_PLUGIN) ? '_compile' : ''); - } - } - - $params = $this->mapParams($params, $callback, $state); - - foreach ($params as &$p) - $p = $p[0]; - - if ($pluginType & Dwoo::FUNC_PLUGIN) { - if ($pluginType & Dwoo::COMPILABLE_PLUGIN) { - if ($mapped) { - throw new Dwoo_Compilation_Exception($this, 'The @ operator can not be used on compiled plugins.'); - } - if ($pluginType & Dwoo::CUSTOM_PLUGIN) { - $funcCompiler = $this->customPlugins[$func]['callback']; - } else { - $funcCompiler = 'Dwoo_Plugin_'.$func.'_compile'; - } - array_unshift($params, $this); - $output = call_user_func_array($funcCompiler, $params); - } else { - array_unshift($params, '$this'); - - $params = self::implode_r($params); - if ($mapped) { - $output = '$this->arrayMap(\''.$pluginName.'\', array('.$params.'))'; - } else { - $output = $pluginName.'('.$params.')'; - } - } - } else { - if ($pluginType & Dwoo::COMPILABLE_PLUGIN) { - if ($mapped) { - throw new Dwoo_Compilation_Exception($this, 'The @ operator can not be used on compiled plugins.'); - } - if ($pluginType & Dwoo::CUSTOM_PLUGIN) { - $callback = $this->customPlugins[$func]['callback']; - if (!is_array($callback)) { - if (!method_exists($callback, 'compile')) { - throw new Dwoo_Exception('Custom plugin '.$func.' must implement the "compile" method to be compilable, or you should provide a full callback to the method to use'); - } - if (($ref = new ReflectionMethod($callback, 'compile')) && $ref->isStatic()) { - $funcCompiler = array($callback, 'compile'); - } else { - $funcCompiler = array(new $callback, 'compile'); - } - } else { - $funcCompiler = $callback; - } - } else { - $funcCompiler = array('Dwoo_Plugin_'.$func, 'compile'); - array_unshift($params, $this); - } - $output = call_user_func_array($funcCompiler, $params); - } else { - $params = self::implode_r($params); - - if ($pluginType & Dwoo::CUSTOM_PLUGIN) { - if (is_object($callback[0])) { - $output = ($mapped ? '$this->arrayMap' : 'call_user_func_array').'(array($this->plugins[\''.$func.'\'][\'callback\'][0], \''.$callback[1].'\'), array('.$params.'))'; - } else { - $output = ($mapped ? '$this->arrayMap' : 'call_user_func_array').'(array(\''.$callback[0].'\', \''.$callback[1].'\'), array('.$params.'))'; - } - } elseif ($mapped) { - $output = '$this->arrayMap(array($this->getObjectPlugin(\'Dwoo_Plugin_'.$func.'\'), \'process\'), array('.$params.'))'; - } else { - $output = '$this->classCall(\''.$func.'\', array('.$params.'))'; - } - } - } - } - } - - if ($curBlock === 'var' || $m[1] === null) { - return $output; - } elseif ($curBlock === 'string' || $curBlock === 'root') { - return $m[1].'.'.$output.'.'.$m[1].(isset($add)?$add:null); - } - } - - /** - * recursively implodes an array in a similar manner as var_export() does but with some tweaks - * to handle pre-compiled values and the fact that we do not need to enclose everything with - * "array" and do not require top-level keys to be displayed - * - * @param array $params the array to implode - * @param bool $recursiveCall if set to true, the function outputs key names for the top level - * @return string the imploded array - */ - public static function implode_r(array $params, $recursiveCall = false) - { - $out = ''; - foreach ($params as $k=>$p) { - if (is_array($p)) { - $out2 = 'array('; - foreach ($p as $k2=>$v) - $out2 .= var_export($k2, true).' => '.(is_array($v) ? 'array('.self::implode_r($v, true).')' : $v).', '; - $p = rtrim($out2, ', ').')'; - } - if ($recursiveCall) { - $out .= var_export($k, true).' => '.$p.', '; - } else { - $out .= $p.', '; - } - } - return rtrim($out, ', '); - } - - /** - * returns the plugin type of a plugin and adds it to the used plugins array if required - * - * @param string $name plugin name, as found in the template - * @return int type as a multi bit flag composed of the Dwoo plugin types constants - */ - protected function getPluginType($name) - { - $pluginType = -1; - - if (($this->securityPolicy === null && (function_exists($name) || strtolower($name) === 'isset' || strtolower($name) === 'empty')) || - ($this->securityPolicy !== null && in_array(strtolower($name), $this->securityPolicy->getAllowedPhpFunctions()) !== false)) { - $phpFunc = true; - } - - while ($pluginType <= 0) { - if (isset($this->templatePlugins[$name])) { - $pluginType = Dwoo::TEMPLATE_PLUGIN | Dwoo::COMPILABLE_PLUGIN; - } elseif (isset($this->customPlugins[$name])) { - $pluginType = $this->customPlugins[$name]['type'] | Dwoo::CUSTOM_PLUGIN; - } elseif (class_exists('Dwoo_Plugin_'.$name, false) !== false) { - if (is_subclass_of('Dwoo_Plugin_'.$name, 'Dwoo_Block_Plugin')) { - $pluginType = Dwoo::BLOCK_PLUGIN; - } else { - $pluginType = Dwoo::CLASS_PLUGIN; - } - $interfaces = class_implements('Dwoo_Plugin_'.$name, false); - if (in_array('Dwoo_ICompilable', $interfaces) !== false || in_array('Dwoo_ICompilable_Block', $interfaces) !== false) { - $pluginType |= Dwoo::COMPILABLE_PLUGIN; - } - } elseif (function_exists('Dwoo_Plugin_'.$name) !== false) { - $pluginType = Dwoo::FUNC_PLUGIN; - } elseif (function_exists('Dwoo_Plugin_'.$name.'_compile')) { - $pluginType = Dwoo::FUNC_PLUGIN | Dwoo::COMPILABLE_PLUGIN; - } elseif (function_exists('smarty_modifier_'.$name) !== false) { - $pluginType = Dwoo::SMARTY_MODIFIER; - } elseif (function_exists('smarty_function_'.$name) !== false) { - $pluginType = Dwoo::SMARTY_FUNCTION; - } elseif (function_exists('smarty_block_'.$name) !== false) { - $pluginType = Dwoo::SMARTY_BLOCK; - } else { - if ($pluginType===-1) { - try { - $this->dwoo->getLoader()->loadPlugin($name, isset($phpFunc)===false); - } catch (Exception $e) { - if (isset($phpFunc)) { - $pluginType = Dwoo::NATIVE_PLUGIN; - } elseif (is_object($this->dwoo->getPluginProxy()) && $this->dwoo->getPluginProxy()->handles($name)) { - $pluginType = Dwoo::PROXY_PLUGIN; - break; - } else { - throw $e; - } - } - } else { - throw new Dwoo_Exception('Plugin "'.$name.'" could not be found'); - } - $pluginType++; - } - } - - if (($pluginType & Dwoo::COMPILABLE_PLUGIN) === 0 && ($pluginType & Dwoo::NATIVE_PLUGIN) === 0 && ($pluginType & Dwoo::PROXY_PLUGIN) === 0) { - $this->addUsedPlugin($name, $pluginType); - } - - return $pluginType; - } - - /** - * allows a plugin to load another one at compile time, this will also mark - * it as used by this template so it will be loaded at runtime (which can be - * useful for compiled plugins that rely on another plugin when their compiled - * code runs) - * - * @param string $name the plugin name - */ - public function loadPlugin($name) { - $this->getPluginType($name); - } - - /** - * runs htmlentities over the matched blocks when the security policy enforces that - * - * @param array $match matched php block - * @return string the htmlentities-converted string - */ - protected function phpTagEncodingHelper($match) - { - return htmlspecialchars($match[0]); - } - - /** - * maps the parameters received from the template onto the parameters required by the given callback - * - * @param array $params the array of parameters - * @param callback $callback the function or method to reflect on to find out the required parameters - * @param int $callType the type of call in the template, 0 = no params, 1 = php-style call, 2 = named parameters call - * @param array $map the parameter map to use, if not provided it will be built from the callback - * @return array parameters sorted in the correct order with missing optional parameters filled - */ - protected function mapParams(array $params, $callback, $callType=2, $map = null) - { - if (!$map) { - $map = $this->getParamMap($callback); - } - - $paramlist = array(); - - // transforms the parameter array from (x=>array('paramname'=>array(values))) to (paramname=>array(values)) - $ps = array(); - foreach ($params as $p) { - if (is_array($p[1])) { - $ps[$p[0]] = $p[1]; - } else { - $ps[] = $p; - } - } - - // loops over the param map and assigns values from the template or default value for unset optional params - while (list($k,$v) = each($map)) { - if ($v[0] === '*') { - // "rest" array parameter, fill every remaining params in it and then break - if (count($ps) === 0) { - if ($v[1]===false) { - throw new Dwoo_Compilation_Exception($this, 'Rest argument missing for '.str_replace(array('Dwoo_Plugin_', '_compile'), '', (is_array($callback) ? $callback[0] : $callback))); - } else { - break; - } - } - $tmp = array(); - $tmp2 = array(); - foreach ($ps as $i=>$p) { - $tmp[$i] = $p[0]; - $tmp2[$i] = $p[1]; - unset($ps[$i]); - } - $paramlist[$v[0]] = array($tmp, $tmp2); - unset($tmp, $tmp2, $i, $p); - break; - } elseif (isset($ps[$v[0]])) { - // parameter is defined as named param - $paramlist[$v[0]] = $ps[$v[0]]; - unset($ps[$v[0]]); - } elseif (isset($ps[$k])) { - // parameter is defined as ordered param - $paramlist[$v[0]] = $ps[$k]; - unset($ps[$k]); - } elseif ($v[1]===false) { - // parameter is not defined and not optional, throw error - if (is_array($callback)) { - if (is_object($callback[0])) { - $name = get_class($callback[0]) . '::' . $callback[1]; - } else { - $name = $callback[0]; - } - } else { - $name = $callback; - } - - throw new Dwoo_Compilation_Exception($this, 'Argument '.$k.'/'.$v[0].' missing for '.str_replace(array('Dwoo_Plugin_', '_compile'), '', $name)); - } elseif ($v[2]===null) { - // enforce lowercased null if default value is null (php outputs NULL with var export) - $paramlist[$v[0]] = array('null', null); - } else { - // outputs default value with var_export - $paramlist[$v[0]] = array(var_export($v[2], true), $v[2]); - } - } - - if (count($ps)) { - foreach ($ps as $i=>$p) { - array_push($paramlist, $p); - } - } - - return $paramlist; - } - - /** - * returns the parameter map of the given callback, it filters out entries typed as Dwoo and Dwoo_Compiler and turns the rest parameter into a "*" - * - * @param callback $callback the function/method to reflect on - * @return array processed parameter map - */ - protected function getParamMap($callback) - { - if (is_null($callback)) { - return array(array('*', true)); - } - if (is_array($callback)) { - $ref = new ReflectionMethod($callback[0], $callback[1]); - } else { - $ref = new ReflectionFunction($callback); - } - - $out = array(); - foreach ($ref->getParameters() as $param) { - if (($class = $param->getClass()) !== null && $class->name === 'Dwoo') { - continue; - } - if (($class = $param->getClass()) !== null && $class->name === 'Dwoo_Compiler') { - continue; - } - if ($param->getName() === 'rest' && $param->isArray() === true) { - $out[] = array('*', $param->isOptional(), null); - } - $out[] = array($param->getName(), $param->isOptional(), $param->isOptional() ? $param->getDefaultValue() : null); - } - - return $out; - } - - /** - * returns a default instance of this compiler, used by default by all Dwoo templates that do not have a - * specific compiler assigned and when you do not override the default compiler factory function - * - * @see Dwoo::setDefaultCompilerFactory() - * @return Dwoo_Compiler - */ - public static function compilerFactory() - { - if (self::$instance === null) { - new self; - } - return self::$instance; - } -} diff --git a/_piecrust/libs/Dwoo/Dwoo/Data.php b/_piecrust/libs/Dwoo/Dwoo/Data.php deleted file mode 100644 index d6c8789..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Data.php +++ /dev/null @@ -1,250 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Data implements Dwoo_IDataProvider -{ - /** - * data array - * - * @var array - */ - protected $data = array(); - - /** - * returns the data array - * - * @return array - */ - public function getData() - { - return $this->data; - } - - /** - * clears a the entire data or only the given key - * - * @param array|string $name clears only one value if you give a name, multiple values if - * you give an array of names, or the entire data if left null - */ - public function clear($name = null) - { - if ($name === null) { - $this->data = array(); - } elseif (is_array($name)) { - foreach ($name as $index) - unset($this->data[$index]); - } else { - unset($this->data[$name]); - } - } - - /** - * overwrites the entire data with the given array - * - * @param array $data the new data array to use - */ - public function setData(array $data) - { - $this->data = $data; - } - - /** - * merges the given array(s) with the current data with array_merge - * - * @param array $data the array to merge - * @param array $data2 $data3 ... other arrays to merge, optional, etc. - */ - public function mergeData(array $data) - { - $args = func_get_args(); - while (list(,$v) = each($args)) { - if (is_array($v)) { - $this->data = array_merge($this->data, $v); - } - } - } - - /** - * assigns a value or an array of values to the data object - * - * @param array|string $name an associative array of multiple (index=>value) or a string - * that is the index to use, i.e. a value assigned to "foo" will be - * accessible in the template through {$foo} - * @param mixed $val the value to assign, or null if $name was an array - */ - public function assign($name, $val = null) - { - if (is_array($name)) { - reset($name); - while (list($k,$v) = each($name)) - $this->data[$k] = $v; - } else { - $this->data[$name] = $val; - } - } - - /** - * allows to assign variables using the object syntax - * - * @param string $name the variable name - * @param string $value the value to assign to it - */ - public function __set($name, $value) - { - $this->assign($name, $value); - } - - /** - * assigns a value by reference to the data object - * - * @param string $name the index to use, i.e. a value assigned to "foo" will be - * accessible in the template through {$foo} - * @param mixed $val the value to assign by reference - */ - public function assignByRef($name, &$val) - { - $this->data[$name] =& $val; - } - - /** - * appends values or an array of values to the data object - * - * @param array|string $name an associative array of multiple (index=>value) or a string - * that is the index to use, i.e. a value assigned to "foo" will be - * accessible in the template through {$foo} - * @param mixed $val the value to assign, or null if $name was an array - * @param bool $merge true to merge data or false to append, defaults to false - */ - public function append($name, $val = null, $merge = false) - { - if (is_array($name)) { - foreach ($name as $key=>$val) { - if (isset($this->data[$key]) && !is_array($this->data[$key])) { - settype($this->data[$key], 'array'); - } - - if ($merge === true && is_array($val)) { - $this->data[$key] = $val + $this->data[$key]; - } else { - $this->data[$key][] = $val; - } - } - } elseif ($val !== null) { - if (isset($this->data[$name]) && !is_array($this->data[$name])) { - settype($this->data[$name], 'array'); - } elseif (!isset($this->data[$name])) { - $this->data[$name] = array(); - } - - if ($merge === true && is_array($val)) { - $this->data[$name] = $val + $this->data[$name]; - } else { - $this->data[$name][] = $val; - } - } - } - - /** - * appends a value by reference to the data object - * - * @param string $name the index to use, i.e. a value assigned to "foo" will be - * accessible in the template through {$foo} - * @param mixed $val the value to append by reference - * @param bool $merge true to merge data or false to append, defaults to false - */ - public function appendByRef($name, &$val, $merge = false) - { - if (isset($this->data[$name]) && !is_array($this->data[$name])) { - settype($this->data[$name], 'array'); - } - - if ($merge === true && is_array($val)) { - foreach ($val as $key => &$val) { - $this->data[$name][$key] =& $val; - } - } else { - $this->data[$name][] =& $val; - } - } - - /** - * returns true if the variable has been assigned already, false otherwise - * - * @param string $name the variable name - * @return bool - */ - public function isAssigned($name) - { - return isset($this->data[$name]); - } - - /** - * supports calls to isset($dwooData->var) - * - * @param string $name the variable name - */ - public function __isset($name) - { - return isset($this->data[$name]); - } - - /** - * unassigns/removes a variable - * - * @param string $name the variable name - */ - public function unassign($name) - { - unset($this->data[$name]); - } - - /** - * supports unsetting variables using the object syntax - * - * @param string $name the variable name - */ - public function __unset($name) - { - unset($this->data[$name]); - } - - /** - * returns a variable if it was assigned - * - * @param string $name the variable name - * @return mixed - */ - public function get($name) - { - return $this->__get($name); - } - - /** - * allows to read variables using the object syntax - * - * @param string $name the variable name - * @return mixed - */ - public function __get($name) - { - if (isset($this->data[$name])) { - return $this->data[$name]; - } else { - throw new Dwoo_Exception('Tried to read a value that was not assigned yet : "'.$name.'"'); - } - } -} diff --git a/_piecrust/libs/Dwoo/Dwoo/Exception.php b/_piecrust/libs/Dwoo/Dwoo/Exception.php deleted file mode 100644 index c2bd797..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Exception.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Exception extends Exception -{ -} diff --git a/_piecrust/libs/Dwoo/Dwoo/Filter.php b/_piecrust/libs/Dwoo/Dwoo/Filter.php deleted file mode 100644 index 937c945..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Filter.php +++ /dev/null @@ -1,44 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -abstract class Dwoo_Filter -{ - /** - * the dwoo instance that runs this filter - * - * @var Dwoo - */ - protected $dwoo; - - /** - * constructor, if you override it, call parent::__construct($dwoo); or assign - * the dwoo instance yourself if you need it - * - * @param Dwoo $dwoo the dwoo instance that runs this plugin - */ - public function __construct(Dwoo $dwoo) - { - $this->dwoo = $dwoo; - } - - /** - * processes the input and returns it filtered - * - * @param string $input the template to process - * @return string - */ - abstract public function process($input); -} diff --git a/_piecrust/libs/Dwoo/Dwoo/ICompilable.php b/_piecrust/libs/Dwoo/Dwoo/ICompilable.php deleted file mode 100644 index f196ef3..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/ICompilable.php +++ /dev/null @@ -1,26 +0,0 @@ -public static function compile(Dwoo_Compiler $compiler, $arg, $arg, ...), - * which replaces the process() method (that means compile() should have all arguments it requires). - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -interface Dwoo_ICompilable -{ - // this replaces the process function - //public static function compile(Dwoo_Compiler $compiler, $arg, $arg, ...); -} diff --git a/_piecrust/libs/Dwoo/Dwoo/ICompilable/Block.php b/_piecrust/libs/Dwoo/Dwoo/ICompilable/Block.php deleted file mode 100644 index 25ca631..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/ICompilable/Block.php +++ /dev/null @@ -1,21 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -interface Dwoo_ICompilable_Block -{ -} diff --git a/_piecrust/libs/Dwoo/Dwoo/ICompiler.php b/_piecrust/libs/Dwoo/Dwoo/ICompiler.php deleted file mode 100644 index 74e599e..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/ICompiler.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -interface Dwoo_ICompiler -{ - /** - * compiles the provided string down to php code - * - * @param string $templateStr the template to compile - * @return string a compiled php code string - */ - public function compile(Dwoo $dwoo, Dwoo_ITemplate $template); - - /** - * adds the custom plugins loaded into Dwoo to the compiler so it can load them - * - * @see Dwoo::addPlugin - * @param array $customPlugins an array of custom plugins - */ - public function setCustomPlugins(array $customPlugins); - - /** - * sets the security policy object to enforce some php security settings - * - * use this if untrusted persons can modify templates, - * set it on the Dwoo object as it will be passed onto the compiler automatically - * - * @param Dwoo_Security_Policy $policy the security policy object - */ - public function setSecurityPolicy(Dwoo_Security_Policy $policy = null); -} diff --git a/_piecrust/libs/Dwoo/Dwoo/IDataProvider.php b/_piecrust/libs/Dwoo/Dwoo/IDataProvider.php deleted file mode 100644 index 90fe450..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/IDataProvider.php +++ /dev/null @@ -1,25 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -interface Dwoo_IDataProvider -{ - /** - * returns the data as an associative array that will be used in the template - * - * @return array - */ - public function getData(); -} diff --git a/_piecrust/libs/Dwoo/Dwoo/IElseable.php b/_piecrust/libs/Dwoo/Dwoo/IElseable.php deleted file mode 100644 index 6f5afb5..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/IElseable.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -interface Dwoo_IElseable -{ -} diff --git a/_piecrust/libs/Dwoo/Dwoo/ILoader.php b/_piecrust/libs/Dwoo/Dwoo/ILoader.php deleted file mode 100644 index a0a8a4f..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/ILoader.php +++ /dev/null @@ -1,30 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -interface Dwoo_ILoader -{ - /** - * loads a plugin file - * - * the second parameter is used to avoid permanent rehashing when using php functions, - * however this means that if you have add a plugin that overrides a php function you have - * to delete the classpath.cache file(s) by hand to force a rehash of the plugins - * - * @param string $class the plugin name, without the Dwoo_Plugin_ prefix - * @param bool $forceRehash if true, the class path caches will be rebuilt if the plugin is not found, in case it has just been added, defaults to true - */ - public function loadPlugin($class, $forceRehash = true); -} diff --git a/_piecrust/libs/Dwoo/Dwoo/IPluginProxy.php b/_piecrust/libs/Dwoo/Dwoo/IPluginProxy.php deleted file mode 100644 index 21a79fd..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/IPluginProxy.php +++ /dev/null @@ -1,65 +0,0 @@ - - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Denis Arh, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -interface Dwoo_IPluginProxy -{ - /** - * returns true or false to say whether the given plugin is handled by this proxy or not - * - * @param string $name the plugin name - * @return bool true if the plugin is known and usable, otherwise false - */ - public function handles($name); - - /** - * returns the code (as a string) to call the plugin - * (this will be executed at runtime inside the Dwoo class) - * - * @param string $name the plugin name - * @param array $params a parameter array, array key "*" is the rest array - * @return string - */ - public function getCode($name, $params); - - /** - * returns a callback to the plugin, this is used with the reflection API to - * find out about the plugin's parameter names etc. - * - * should you need a rest array without the possibility to edit the - * plugin's code, you can provide a callback to some - * other function with the correct parameter signature, i.e. : - * - * return array($this, "callbackHelper"); - * // and callbackHelper would be as such: - * public function callbackHelper(array $rest=array()){} - * - * - * @param string $name the plugin name - * @return callback - */ - public function getCallback($name); - - /** - * returns some code that will check if the plugin is loaded and if not load it - * this is optional, if your plugins are autoloaded or whatever, just return an - * empty string - * - * @param string $name the plugin name - * @return string - */ - public function getLoader($name); -} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/Dwoo/ITemplate.php b/_piecrust/libs/Dwoo/Dwoo/ITemplate.php deleted file mode 100644 index 7a855a4..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/ITemplate.php +++ /dev/null @@ -1,150 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.1.0 - * @date 2009-07-18 - * @package Dwoo - */ -interface Dwoo_ITemplate -{ - /** - * returns the cache duration for this template - * - * defaults to null if it was not provided - * - * @return int|null - */ - public function getCacheTime(); - - /** - * sets the cache duration for this template - * - * can be used to set it after the object is created if you did not provide - * it in the constructor - * - * @param int $seconds duration of the cache validity for this template, if - * null it defaults to the Dwoo instance's cache time. 0 = disable and - * -1 = infinite cache - */ - public function setCacheTime($seconds = null); - - /** - * returns the cached template output file name, true if it's cache-able but not cached - * or false if it's not cached - * - * @param Dwoo $dwoo the dwoo instance that requests it - * @return string|bool - */ - public function getCachedTemplate(Dwoo $dwoo); - - /** - * caches the provided output into the cache file - * - * @param Dwoo $dwoo the dwoo instance that requests it - * @param string $output the template output - * @return mixed full path of the cached file or false upon failure - */ - public function cache(Dwoo $dwoo, $output); - - /** - * clears the cached template if it's older than the given time - * - * @param Dwoo $dwoo the dwoo instance that was used to cache that template - * @param int $olderThan minimum time (in seconds) required for the cache to be cleared - * @return bool true if the cache was not present or if it was deleted, false if it remains there - */ - public function clearCache(Dwoo $dwoo, $olderThan = -1); - - /** - * returns the compiled template file name - * - * @param Dwoo $dwoo the dwoo instance that requests it - * @param Dwoo_ICompiler $compiler the compiler that must be used - * @return string - */ - public function getCompiledTemplate(Dwoo $dwoo, Dwoo_ICompiler $compiler = null); - - /** - * returns the template name - * - * @return string - */ - public function getName(); - - /** - * returns the resource name for this template class - * - * @return string - */ - public function getResourceName(); - - /** - * returns the resource identifier for this template or false if it has no identifier - * - * @return string|false - */ - public function getResourceIdentifier(); - - /** - * returns the template source of this template - * - * @return string - */ - public function getSource(); - - /** - * returns an unique string identifying the current version of this template, - * for example a timestamp of the last modified date or a hash of the template source - * - * @return string - */ - public function getUid(); - - /** - * returns the compiler used by this template, if it was just compiled, or null - * - * @return Dwoo_ICompiler - */ - public function getCompiler(); - - /** - * returns some php code that will check if this template has been modified or not - * - * if the function returns null, the template will be instanciated and then the Uid checked - * - * @return string - */ - public function getIsModifiedCode(); - - /** - * returns a new template object from the given resource identifier, null if no include is - * possible (resource not found), or false if include is not permitted by this resource type - * - * this method should also check if $dwoo->getSecurityPolicy() is null or not and do the - * necessary permission checks if required, if the security policy prevents the template - * generation it should throw a new Dwoo_Security_Exception with a relevant message - * - * @param mixed $resourceId the resource identifier - * @param int $cacheTime duration of the cache validity for this template, - * if null it defaults to the Dwoo instance that will - * render this template - * @param string $cacheId the unique cache identifier of this page or anything else that - * makes this template's content unique, if null it defaults - * to the current url - * @param string $compileId the unique compiled identifier, which is used to distinguish this - * template from others, if null it defaults to the filename+bits of the path - * @param Dwoo_ITemplate $parentTemplate the template that is requesting a new template object (through - * an include, extends or any other plugin) - * @return Dwoo_ITemplate|null|false - */ - public static function templateFactory(Dwoo $dwoo, $resourceId, $cacheTime = null, $cacheId = null, $compileId = null, Dwoo_ITemplate $parentTemplate = null); -} diff --git a/_piecrust/libs/Dwoo/Dwoo/Loader.php b/_piecrust/libs/Dwoo/Dwoo/Loader.php deleted file mode 100644 index 807693b..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Loader.php +++ /dev/null @@ -1,147 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.1.0 - * @date 2009-07-18 - * @package Dwoo - */ -class Dwoo_Loader implements Dwoo_ILoader -{ - /** - * stores the plugin directories - * - * @see addDirectory - * @var array - */ - protected $paths = array(); - - /** - * stores the plugins names/paths relationships - * don't edit this on your own, use addDirectory - * - * @see addDirectory - * @var array - */ - protected $classPath = array(); - - /** - * path where class paths cache files are written - * - * @var string - */ - protected $cacheDir; - - protected $corePluginDir; - - public function __construct($cacheDir) - { - $this->corePluginDir = DWOO_DIRECTORY . 'plugins'; - $this->cacheDir = rtrim($cacheDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; - - // include class paths or rebuild paths if the cache file isn't there - $cacheFile = $this->cacheDir.'classpath.cache.d'.Dwoo::RELEASE_TAG.'.php'; - if (file_exists($cacheFile)) { - $classpath = file_get_contents($cacheFile); - $this->classPath = unserialize($classpath) + $this->classPath; - } else { - $this->rebuildClassPathCache($this->corePluginDir, $cacheFile); - } - } - - /** - * rebuilds class paths, scans the given directory recursively and saves all paths in the given file - * - * @param string $path the plugin path to scan - * @param string $cacheFile the file where to store the plugin paths cache, it will be overwritten - */ - protected function rebuildClassPathCache($path, $cacheFile) - { - if ($cacheFile!==false) { - $tmp = $this->classPath; - $this->classPath = array(); - } - - // iterates over all files/folders - $list = glob(rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . '*'); - if (is_array($list)) { - foreach ($list as $f) { - if (is_dir($f)) { - $this->rebuildClassPathCache($f, false); - } else { - $this->classPath[str_replace(array('function.','block.','modifier.','outputfilter.','filter.','prefilter.','postfilter.','pre.','post.','output.','shared.','helper.'), '', basename($f, '.php'))] = $f; - } - } - } - - // save in file if it's the first call (not recursed) - if ($cacheFile!==false) { - if (!file_put_contents($cacheFile, serialize($this->classPath))) { - throw new Dwoo_Exception('Could not write into '.$cacheFile.', either because the folder is not there (create it) or because of the chmod configuration (please ensure this directory is writable by php), alternatively you can change the directory used with $dwoo->setCompileDir() or provide a custom loader object with $dwoo->setLoader()'); - } - $this->classPath += $tmp; - } - } - - /** - * loads a plugin file - * - * @param string $class the plugin name, without the Dwoo_Plugin_ prefix - * @param bool $forceRehash if true, the class path caches will be rebuilt if the plugin is not found, in case it has just been added, defaults to true - */ - public function loadPlugin($class, $forceRehash = true) - { - // a new class was added or the include failed so we rebuild the cache - if (!isset($this->classPath[$class]) || !(include $this->classPath[$class])) { - if ($forceRehash) { - $this->rebuildClassPathCache($this->corePluginDir, $this->cacheDir . 'classpath.cache.d'.Dwoo::RELEASE_TAG.'.php'); - foreach ($this->paths as $path=>$file) { - $this->rebuildClassPathCache($path, $file); - } - if (isset($this->classPath[$class])) { - include $this->classPath[$class]; - } else { - throw new Dwoo_Exception('Plugin '.$class.' can not be found, maybe you forgot to bind it if it\'s a custom plugin ?', E_USER_NOTICE); - } - } else { - throw new Dwoo_Exception('Plugin '.$class.' can not be found, maybe you forgot to bind it if it\'s a custom plugin ?', E_USER_NOTICE); - } - } - } - - /** - * adds a plugin directory, the plugins found in the new plugin directory - * will take precedence over the other directories (including the default - * dwoo plugin directory), you can use this for example to override plugins - * in a specific directory for a specific application while keeping all your - * usual plugins in the same place for all applications. - * - * TOCOM don't forget that php functions overrides are not rehashed so you - * need to clear the classpath caches by hand when adding those - * - * @param string $pluginDirectory the plugin path to scan - */ - public function addDirectory($pluginDirectory) - { - $pluginDir = realpath($pluginDirectory); - if (!$pluginDir) { - throw new Dwoo_Exception('Plugin directory does not exist or can not be read : '.$pluginDirectory); - } - $cacheFile = $this->cacheDir . 'classpath-'.substr(strtr($pluginDir, '/\\:'.PATH_SEPARATOR, '----'), strlen($pluginDir) > 80 ? -80 : 0).'.d'.Dwoo::RELEASE_TAG.'.php'; - $this->paths[$pluginDir] = $cacheFile; - if (file_exists($cacheFile)) { - $classpath = file_get_contents($cacheFile); - $this->classPath = unserialize($classpath) + $this->classPath; - } else { - $this->rebuildClassPathCache($pluginDir, $cacheFile); - } - } -} diff --git a/_piecrust/libs/Dwoo/Dwoo/Plugin.php b/_piecrust/libs/Dwoo/Dwoo/Plugin.php deleted file mode 100644 index 68dc56a..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Plugin.php +++ /dev/null @@ -1,85 +0,0 @@ -process() method, it will receive the parameters that - * are in the template code - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -abstract class Dwoo_Plugin -{ - /** - * the dwoo instance that runs this plugin - * - * @var Dwoo - */ - protected $dwoo; - - /** - * constructor, if you override it, call parent::__construct($dwoo); or assign - * the dwoo instance yourself if you need it - * - * @param Dwoo $dwoo the dwoo instance that runs this plugin - */ - public function __construct(Dwoo $dwoo) - { - $this->dwoo = $dwoo; - } - - // plugins should always implement : - // public function process($arg, $arg, ...) - // or for block plugins : - // public function init($arg, $arg, ...) - - // this could be enforced with : - // abstract public function process(...); - // if my feature request gets enough interest one day - // see => http://bugs.php.net/bug.php?id=44043 - - /** - * utility function that converts an array of compiled parameters (or rest array) to a string of xml/html tag attributes - * - * this is to be used in preProcessing or postProcessing functions, example : - * $p = $compiler->getCompiledParams($params); - * // get only the rest array as attributes - * $attributes = Dwoo_Plugin::paramsToAttributes($p['*']); - * // get all the parameters as attributes (if there is a rest array, it will be included) - * $attributes = Dwoo_Plugin::paramsToAttributes($p); - * - * @param array $params an array of attributeName=>value items that will be compiled to be ready for inclusion in a php string - * @param string $delim the string delimiter you want to use (defaults to ') - * @return string - */ - public static function paramsToAttributes(array $params, $delim = '\'') - { - if (isset($params['*'])) { - $params = array_merge($params, $params['*']); - unset($params['*']); - } - - $out = ''; - foreach ($params as $attr=>$val) { - $out .= ' '.$attr.'='; - if (trim($val, '"\'')=='' || $val=='null') { - $out .= str_replace($delim, '\\'.$delim, '""'); - } elseif (substr($val, 0, 1) === $delim && substr($val, -1) === $delim) { - $out .= str_replace($delim, '\\'.$delim, '"'.substr($val, 1, -1).'"'); - } else { - $out .= str_replace($delim, '\\'.$delim, '"') . $delim . '.'.$val.'.' . $delim . str_replace($delim, '\\'.$delim, '"'); - } - } - - return ltrim($out); - } -} diff --git a/_piecrust/libs/Dwoo/Dwoo/Processor.php b/_piecrust/libs/Dwoo/Dwoo/Processor.php deleted file mode 100644 index b220bd8..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Processor.php +++ /dev/null @@ -1,44 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -abstract class Dwoo_Processor -{ - /** - * the compiler instance that runs this processor - * - * @var Dwoo - */ - protected $compiler; - - /** - * constructor, if you override it, call parent::__construct($dwoo); or assign - * the dwoo instance yourself if you need it - * - * @param Dwoo $dwoo the dwoo instance that runs this plugin - */ - public function __construct(Dwoo_Compiler $compiler) - { - $this->compiler = $compiler; - } - - /** - * processes the input and returns it filtered - * - * @param string $input the template to process - * @return string - */ - abstract public function process($input); -} diff --git a/_piecrust/libs/Dwoo/Dwoo/Security/Exception.php b/_piecrust/libs/Dwoo/Dwoo/Security/Exception.php deleted file mode 100644 index 5d70ab2..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Security/Exception.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Security_Exception extends Dwoo_Exception -{ -} diff --git a/_piecrust/libs/Dwoo/Dwoo/Security/Policy.php b/_piecrust/libs/Dwoo/Dwoo/Security/Policy.php deleted file mode 100644 index 6fecf51..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Security/Policy.php +++ /dev/null @@ -1,199 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Security_Policy -{ - /**#@+ - * php handling constants, defaults to PHP_REMOVE - * - * PHP_REMOVE : remove all (+ short tags if your short tags option is on) from the input template - * PHP_ALLOW : leave them as they are - * PHP_ENCODE : run htmlentities over them - * - * @var int - */ - const PHP_ENCODE = 1; - const PHP_REMOVE = 2; - const PHP_ALLOW = 3; - /**#@-*/ - - /**#@+ - * constant handling constants, defaults to CONST_DISALLOW - * - * CONST_DISALLOW : throw an error if {$dwoo.const.*} is used in the template - * CONST_ALLOW : allow {$dwoo.const.*} calls - */ - const CONST_DISALLOW = false; - const CONST_ALLOW = true; - /**#@-*/ - - /** - * php functions that are allowed to be used within the template - * - * @var array - */ - protected $allowedPhpFunctions = array - ( - 'str_repeat', 'number_format', 'htmlentities', 'htmlspecialchars', - 'long2ip', 'strlen', 'list', 'empty', 'count', 'sizeof', 'in_array', 'is_array', - ); - - /** - * paths that are safe to use with include or other file-access plugins - * - * @var array - */ - protected $allowedDirectories = array(); - - /** - * stores the php handling level - * - * defaults to Dwoo_Security_Policy::PHP_REMOVE - * - * @var int - */ - protected $phpHandling = self::PHP_REMOVE; - - /** - * stores the constant handling level - * - * defaults to Dwoo_Security_Policy::CONST_DISALLOW - * - * @var bool - */ - protected $constHandling = self::CONST_DISALLOW; - - /** - * adds a php function to the allowed list - * - * @param mixed $func function name or array of function names - */ - public function allowPhpFunction($func) - { - if (is_array($func)) - foreach ($func as $fname) - $this->allowedPhpFunctions[strtolower($fname)] = true; - else - $this->allowedPhpFunctions[strtolower($func)] = true; - } - - /** - * removes a php function from the allowed list - * - * @param mixed $func function name or array of function names - */ - public function disallowPhpFunction($func) - { - if (is_array($func)) - foreach ($func as $fname) - unset($this->allowedPhpFunctions[strtolower($fname)]); - else - unset($this->allowedPhpFunctions[strtolower($func)]); - } - - /** - * returns the list of php functions allowed to run, note that the function names - * are stored in the array keys and not values - * - * @return array - */ - public function getAllowedPhpFunctions() - { - return $this->allowedPhpFunctions; - } - - /** - * adds a directory to the safelist for includes and other file-access plugins - * - * note that all the includePath directories you provide to the Dwoo_Template_File class - * are automatically marked as safe - * - * @param mixed $path a path name or an array of paths - */ - public function allowDirectory($path) - { - if (is_array($path)) - foreach ($path as $dir) - $this->allowedDirectories[realpath($dir)] = true; - else - $this->allowedDirectories[realpath($path)] = true; - } - - /** - * removes a directory from the safelist - * - * @param mixed $path a path name or an array of paths - */ - public function disallowDirectory($path) - { - if (is_array($path)) - foreach ($path as $dir) - unset($this->allowedDirectories[realpath($dir)]); - else - unset($this->allowedDirectories[realpath($path)]); - } - - /** - * returns the list of safe paths, note that the paths are stored in the array - * keys and not values - * - * @return array - */ - public function getAllowedDirectories() - { - return $this->allowedDirectories; - } - - /** - * sets the php handling level, defaults to REMOVE - * - * @param int $level one of the Dwoo_Security_Policy::PHP_* constants - */ - public function setPhpHandling($level = self::PHP_REMOVE) - { - $this->phpHandling = $level; - } - - /** - * returns the php handling level - * - * @return int the current level, one of the Dwoo_Security_Policy::PHP_* constants - */ - public function getPhpHandling() - { - return $this->phpHandling; - } - - /** - * sets the constant handling level, defaults to CONST_DISALLOW - * - * @param bool $level one of the Dwoo_Security_Policy::CONST_* constants - */ - public function setConstantHandling($level = self::CONST_DISALLOW) - { - $this->constHandling = $level; - } - - /** - * returns the constant handling level - * - * @return bool the current level, one of the Dwoo_Security_Policy::CONST_* constants - */ - public function getConstantHandling() - { - return $this->constHandling; - } -} diff --git a/_piecrust/libs/Dwoo/Dwoo/Smarty/Adapter.php b/_piecrust/libs/Dwoo/Dwoo/Smarty/Adapter.php deleted file mode 100644 index 9f64c74..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Smarty/Adapter.php +++ /dev/null @@ -1,518 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.1.0 - * @date 2009-07-18 - * @package Dwoo - */ -class Dwoo_Smarty__Adapter extends Dwoo -{ - // magic get/set/call functions that handle unsupported features - public function __set($p, $v) - { - if ($p==='scope') { - $this->scope = $v; - return; - } - if ($p==='data') { - $this->data = $v; - return; - } - if (array_key_exists($p, $this->compat['properties']) !== false) { - if ($this->show_compat_errors) { - $this->triggerError('Property '.$p.' is not available in the Dwoo_Smarty_Adapter, however it might be implemented in the future, check out http://wiki.dwoo.org/index.php/SmartySupport for more details.', E_USER_NOTICE); - } - $this->compat['properties'][$p] = $v; - } else { - if ($this->show_compat_errors) { - $this->triggerError('Property '.$p.' is not available in the Dwoo_Smarty_Adapter, but it is not listed as such, so you might want to tell me about it at j.boggiano@seld.be', E_USER_NOTICE); - } - } - } - - public function __get($p) - { - if (array_key_exists($p, $this->compat['properties']) !== false) { - if ($this->show_compat_errors) { - $this->triggerError('Property '.$p.' is not available in the Dwoo_Smarty_Adapter, however it might be implemented in the future, check out http://wiki.dwoo.org/index.php/SmartySupport for more details.', E_USER_NOTICE); - } - return $this->compat['properties'][$p]; - } else { - if ($this->show_compat_errors) { - $this->triggerError('Property '.$p.' is not available in the Dwoo_Smarty_Adapter, but it is not listed as such, so you might want to tell me about it at j.boggiano@seld.be', E_USER_NOTICE); - } - } - } - - public function __call($m, $a) - { - if (method_exists($this->dataProvider, $m)) { - call_user_func_array(array($this->dataProvider, $m), $a); - } elseif ($this->show_compat_errors) { - if (array_search($m, $this->compat['methods']) !== false) { - $this->triggerError('Method '.$m.' is not available in the Dwoo_Smarty_Adapter, however it might be implemented in the future, check out http://wiki.dwoo.org/index.php/SmartySupport for more details.', E_USER_NOTICE); - } else { - $this->triggerError('Method '.$m.' is not available in the Dwoo_Smarty_Adapter, but it is not listed as such, so you might want to tell me about it at j.boggiano@seld.be', E_USER_NOTICE); - } - } - } - - // list of unsupported properties and methods - protected $compat = array - ( - 'methods' => array - ( - 'register_resource', 'unregister_resource', 'load_filter', 'clear_compiled_tpl', - 'clear_config', 'get_config_vars', 'config_load' - ), - 'properties' => array - ( - 'cache_handler_func' => null, - 'debugging' => false, - 'error_reporting' => null, - 'debugging_ctrl' => 'NONE', - 'request_vars_order' => 'EGPCS', - 'request_use_auto_globals' => true, - 'use_sub_dirs' => false, - 'autoload_filters' => array(), - 'default_template_handler_func' => '', - 'debug_tpl' => '', - 'cache_modified_check' => false, - 'default_modifiers' => array(), - 'default_resource_type' => 'file', - 'config_overwrite' => true, - 'config_booleanize' => true, - 'config_read_hidden' => false, - 'config_fix_newlines' => true, - 'config_class' => 'Config_File', - ), - ); - - // security vars - public $security = false; - public $trusted_dir = array(); - public $secure_dir = array(); - public $php_handling = SMARTY_PHP_PASSTHRU; - public $security_settings = array - ( - 'PHP_HANDLING' => false, - 'IF_FUNCS' => array - ( - 'list', 'empty', 'count', 'sizeof', - 'in_array', 'is_array', - ), - 'INCLUDE_ANY' => false, - 'PHP_TAGS' => false, - 'MODIFIER_FUNCS' => array(), - 'ALLOW_CONSTANTS' => false - ); - - // paths - public $template_dir = 'templates'; - public $compile_dir = 'templates_c'; - public $config_dir = 'configs'; - public $cache_dir = 'cache'; - public $plugins_dir = array(); - - // misc options - public $left_delimiter = '{'; - public $right_delimiter = '}'; - public $compile_check = true; - public $force_compile = false; - public $caching = 0; - public $cache_lifetime = 3600; - public $compile_id = null; - public $compiler_file = null; - public $compiler_class = null; - - // dwoo/smarty compat layer - public $show_compat_errors = false; - protected $dataProvider; - protected $_filters = array('pre'=>array(), 'post'=>array(), 'output'=>array()); - protected static $tplCache = array(); - protected $compiler = null; - - public function __construct() - { - parent::__construct(); - $this->charset = 'iso-8859-1'; - $this->dataProvider = new Dwoo_Data(); - $this->compiler = new Dwoo_Compiler(); - } - - public function display($filename, $cacheId=null, $compileId=null) - { - $this->fetch($filename, $cacheId, $compileId, true); - } - - public function fetch($filename, $cacheId=null, $compileId=null, $display=false) - { - $this->setCacheDir($this->cache_dir); - $this->setCompileDir($this->compile_dir); - - if ($this->security) { - $policy = new Dwoo_Security_Policy(); - $policy->addPhpFunction(array_merge($this->security_settings['IF_FUNCS'], $this->security_settings['MODIFIER_FUNCS'])); - - $phpTags = $this->security_settings['PHP_HANDLING'] ? SMARTY_PHP_ALLOW : $this->php_handling; - if ($this->security_settings['PHP_TAGS']) { - $phpTags = SMARTY_PHP_ALLOW; - } - switch($phpTags) { - case SMARTY_PHP_ALLOW: - case SMARTY_PHP_PASSTHRU: - $phpTags = Dwoo_Security_Policy::PHP_ALLOW; - break; - case SMARTY_PHP_QUOTE: - $phpTags = Dwoo_Security_Policy::PHP_ENCODE; - break; - case SMARTY_PHP_REMOVE: - default: - $phpTags = Dwoo_Security_Policy::PHP_REMOVE; - break; - } - $policy->setPhpHandling($phpTags); - - $policy->setConstantHandling($this->security_settings['ALLOW_CONSTANTS']); - - if ($this->security_settings['INCLUDE_ANY']) { - $policy->allowDirectory(preg_replace('{^((?:[a-z]:)?[\\\\/]).*}i', '$1', __FILE__)); - } else { - $policy->allowDirectory($this->secure_dir); - } - - $this->setSecurityPolicy($policy); - } - - if (!empty($this->plugins_dir)) { - foreach ($this->plugins_dir as $dir) { - $this->getLoader()->addDirectory(rtrim($dir, '\\/')); - } - } - - $tpl = $this->makeTemplate($filename, $cacheId, $compileId); - if ($this->force_compile) { - $tpl->forceCompilation(); - } - - if ($this->caching > 0) { - $this->cacheTime = $this->cache_lifetime; - } else { - $this->cacheTime = 0; - } - - if ($this->compiler_class !== null) { - if ($this->compiler_file !== null && !class_exists($this->compiler_class, false)) { - include $this->compiler_file; - } - $this->compiler = new $this->compiler_class; - } else { - $this->compiler->addPreProcessor('smarty_compat', true); - $this->compiler->setLooseOpeningHandling(true); - } - - $this->compiler->setDelimiters($this->left_delimiter, $this->right_delimiter); - - return $this->get($tpl, $this->dataProvider, $this->compiler, $display===true); - } - - public function get($_tpl, $data = array(), $_compiler = null, $_output = false) - { - if ($_compiler === null) { - $_compiler = $this->compiler; - } - return parent::get($_tpl, $data, $_compiler, $_output); - } - - public function register_function($name, $callback, $cacheable=true, $cache_attrs=null) - { - if (isset($this->plugins[$name]) && $this->plugins[$name][0] !== self::SMARTY_FUNCTION) { - throw new Dwoo_Exception('Multiple plugins of different types can not share the same name'); - } - $this->plugins[$name] = array('type'=>self::SMARTY_FUNCTION, 'callback'=>$callback); - } - - public function unregister_function($name) - { - unset($this->plugins[$name]); - } - - public function register_block($name, $callback, $cacheable=true, $cache_attrs=null) - { - if (isset($this->plugins[$name]) && $this->plugins[$name][0] !== self::SMARTY_BLOCK) { - throw new Dwoo_Exception('Multiple plugins of different types can not share the same name'); - } - $this->plugins[$name] = array('type'=>self::SMARTY_BLOCK, 'callback'=>$callback); - } - - public function unregister_block($name) - { - unset($this->plugins[$name]); - } - - public function register_modifier($name, $callback) - { - if (isset($this->plugins[$name]) && $this->plugins[$name][0] !== self::SMARTY_MODIFIER) { - throw new Dwoo_Exception('Multiple plugins of different types can not share the same name'); - } - $this->plugins[$name] = array('type'=>self::SMARTY_MODIFIER, 'callback'=>$callback); - } - - public function unregister_modifier($name) - { - unset($this->plugins[$name]); - } - - public function register_prefilter($callback) - { - $processor = new Dwoo_SmartyProcessorAdapter($this->compiler); - $processor->registerCallback($callback); - $this->_filters['pre'][] = $processor; - $this->compiler->addPreProcessor($processor); - } - - public function unregister_prefilter($callback) - { - foreach ($this->_filters['pre'] as $index => $processor) - if ($processor->callback === $callback) { - $this->compiler->removePostProcessor($processor); - unset($this->_filters['pre'][$index]); - } - } - - public function register_postfilter($callback) - { - $processor = new Dwoo_SmartyProcessorAdapter($this->compiler); - $processor->registerCallback($callback); - $this->_filters['post'][] = $processor; - $this->compiler->addPostProcessor($processor); - } - - public function unregister_postfilter($callback) - { - foreach ($this->_filters['post'] as $index => $processor) - if ($processor->callback === $callback) { - $this->compiler->removePostProcessor($processor); - unset($this->_filters['post'][$index]); - } - } - - public function register_outputfilter($callback) - { - $filter = new Dwoo_SmartyFilterAdapter($this); - $filter->registerCallback($callback); - $this->_filters['output'][] = $filter; - $this->addFilter($filter); - } - - public function unregister_outputfilter($callback) - { - foreach ($this->_filters['output'] as $index => $filter) - if ($filter->callback === $callback) { - $this->removeOutputFilter($filter); - unset($this->_filters['output'][$index]); - } - } - - function register_object($object, $object_impl, $allowed = array(), $smarty_args = false, $block_methods = array()) - { - settype($allowed, 'array'); - settype($block_methods, 'array'); - settype($smarty_args, 'boolean'); - - if (!empty($allowed) && $this->show_compat_errors) { - $this->triggerError('You can register objects but can not restrict the method/properties used, this is PHP5, you have proper OOP access restrictions so use them.', E_USER_NOTICE); - } - - if ($smarty_args) { - $this->triggerError('You can register objects but methods will be called using method($arg1, $arg2, $arg3), not as an argument array like smarty did.', E_USER_NOTICE); - } - - if (!empty($block_methods)) { - $this->triggerError('You can register objects but can not use methods as being block methods, you have to build a plugin for that.', E_USER_NOTICE); - } - - $this->dataProvider->assign($object, $object_impl); - } - - function unregister_object($object) - { - $this->dataProvider->clear($object); - } - - function get_registered_object($name) { - $data = $this->dataProvider->getData(); - if (isset($data[$name]) && is_object($data[$name])) { - return $data[$name]; - } else { - trigger_error('Dwoo_Compiler: object "'.$name.'" was not registered or is not an object', E_USER_ERROR); - } - } - - public function template_exists($filename) - { - if (!is_array($this->template_dir)) { - return file_exists($this->template_dir.DIRECTORY_SEPARATOR.$filename); - } else { - foreach ($this->template_dir as $tpl_dir) { - if (file_exists($tpl_dir.DIRECTORY_SEPARATOR.$filename)) { - return true; - } - } - return false; - } - } - - public function is_cached($tpl, $cacheId = null, $compileId = null) - { - return $this->isCached($this->makeTemplate($tpl, $cacheId, $compileId)); - } - - public function append_by_ref($var, &$value, $merge=false) - { - $this->dataProvider->appendByRef($var, $value, $merge); - } - - public function assign_by_ref($name, &$val) - { - $this->dataProvider->assignByRef($name, $val); - } - - public function clear_assign($var) - { - $this->dataProvider->clear($var); - } - - public function clear_all_assign() - { - $this->dataProvider->clear(); - } - - public function get_template_vars($name=null) - { - if ($this->show_compat_errors) { - trigger_error('get_template_vars does not return values by reference, if you try to modify the data that way you should modify your code.', E_USER_NOTICE); - } - - $data = $this->dataProvider->getData(); - if ($name === null) - return $data; - elseif (isset($data[$name])) - return $data[$name]; - return null; - } - - public function clear_all_cache($olderThan = 0) - { - $this->clearCache($olderThan); - } - - public function clear_cache($template, $cacheId = null, $compileId = null, $olderThan = 0) - { - $this->makeTemplate($template, $cacheId, $compileId)->clearCache($olderThan); - } - - public function trigger_error($error_msg, $error_type = E_USER_WARNING) - { - $this->triggerError($error_msg, $error_type); - } - - protected function initGlobals() - { - parent::initGlobals(); - $this->globals['ldelim'] = '{'; - $this->globals['rdelim'] = '}'; - } - - protected function makeTemplate($file, $cacheId, $compileId) - { - if ($compileId === null) - $compileId = $this->compile_id; - - $hash = bin2hex(md5($file.$cacheId.$compileId, true)); - if (!isset(self::$tplCache[$hash])) { - // abs path - if (substr($file, 0, 1) === '/' || substr($file, 1, 1) === ':') { - self::$tplCache[$hash] = new Dwoo_Template_File($file, null, $cacheId, $compileId); - } elseif (is_string($this->template_dir) || is_array($this->template_dir)) { - self::$tplCache[$hash] = new Dwoo_Template_File($file, null, $cacheId, $compileId, $this->template_dir); - } else { - throw new Exception('Unable to load "'.$file.'", check the template_dir'); - } - } - return self::$tplCache[$hash]; - } - - public function triggerError($message, $level=E_USER_NOTICE) - { - if (is_object($this->template)) { - return parent::triggerError($message, $level); - } - trigger_error('Dwoo error : '.$message, $level); - } -} - -class Dwoo_Smarty_Filter_Adapter extends Dwoo_Filter -{ - public $callback; - - public function process($input) - { - return call_user_func($this->callback, $input); - } - - public function registerCallback($callback) - { - $this->callback = $callback; - } -} - -class Dwoo_Smarty_Processor_Adapter extends Dwoo_Processor -{ - public $callback; - - public function process($input) - { - return call_user_func($this->callback, $input); - } - - public function registerCallback($callback) - { - $this->callback = $callback; - } -} - -// cloaks the adapter if possible with the smarty name to fool type-hinted plugins -if (class_exists('Smarty', false) === false) -{ - interface Smarty {} - class Dwoo_Smarty_Adapter extends Dwoo_Smarty__Adapter implements Smarty {} -} -else -{ - class Dwoo_Smarty_Adapter extends Dwoo_Smarty__Adapter {} -} diff --git a/_piecrust/libs/Dwoo/Dwoo/Template/File.php b/_piecrust/libs/Dwoo/Dwoo/Template/File.php deleted file mode 100644 index a71dae6..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Template/File.php +++ /dev/null @@ -1,270 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.1.0 - * @date 2009-07-18 - * @package Dwoo - */ -class Dwoo_Template_File extends Dwoo_Template_String -{ - /** - * template filename - * - * @var string - */ - protected $file; - - /** - * include path(s) to look into to find this template - * - * @var array - */ - protected $includePath = null; - - /** - * resolved path cache when looking for a file in multiple include paths - * - * this is reset when the include path is changed - * - * @var string - */ - protected $resolvedPath = null; - - /** - * creates a template from a file - * - * @param string $file the path to the template file, make sure it exists - * @param int $cacheTime duration of the cache validity for this template, - * if null it defaults to the Dwoo instance that will - * render this template - * @param string $cacheId the unique cache identifier of this page or anything else that - * makes this template's content unique, if null it defaults - * to the current url - * @param string $compileId the unique compiled identifier, which is used to distinguish this - * template from others, if null it defaults to the filename+bits of the path - * @param mixed $includePath a string for a single path to look into for the given file, or an array of paths - */ - public function __construct($file, $cacheTime = null, $cacheId = null, $compileId = null, $includePath = null) - { - $this->file = $file; - $this->name = basename($file); - $this->cacheTime = $cacheTime; - - if ($compileId !== null) { - $this->compileId = str_replace('../', '__', strtr($compileId, '\\%?=!:;'.PATH_SEPARATOR, '/-------')); - } - - if ($cacheId !== null) { - $this->cacheId = str_replace('../', '__', strtr($cacheId, '\\%?=!:;'.PATH_SEPARATOR, '/-------')); - } - - if (is_string($includePath)) { - $this->includePath = array($includePath); - } elseif (is_array($includePath)) { - $this->includePath = $includePath; - } - } - - /** - * sets the include path(s) to where the given template filename must be looked up - * - * @param mixed $paths the path to look into, can be string for a single path or an array of paths - */ - public function setIncludePath($paths) - { - if (is_array($paths) === false) { - $paths = array($paths); - } - - $this->includePath = $paths; - $this->resolvedPath = null; - } - - /** - * return the current include path(s) - * - * @return array - */ - public function getIncludePath() - { - return $this->includePath; - } - - /** - * Checks if compiled file is valid (exists and it's the modification is greater or - * equal to the modification time of the template file) - * - * @param string file - * @return boolean True cache file existance and it's modification time - */ - protected function isValidCompiledFile($file) { - return parent::isValidCompiledFile($file) && (int)$this->getUid() <= filemtime($file); - } - - /** - * returns the template source of this template - * - * @return string - */ - public function getSource() - { - return file_get_contents($this->getResourceIdentifier()); - } - - /** - * returns the resource name for this template class - * - * @return string - */ - public function getResourceName() - { - return 'file'; - } - - /** - * returns this template's source filename - * - * @return string - */ - public function getResourceIdentifier() - { - if ($this->resolvedPath !== null) { - return $this->resolvedPath; - } elseif ($this->includePath === null) { - return $this->file; - } else { - foreach ($this->includePath as $path) { - $path = rtrim($path, DIRECTORY_SEPARATOR); - if (file_exists($path.DIRECTORY_SEPARATOR.$this->file) === true) { - $this->resolvedPath = $path . DIRECTORY_SEPARATOR . $this->file; - return $this->resolvedPath; - } - } - - throw new Dwoo_Exception('Template "'.$this->file.'" could not be found in any of your include path(s)'); - } - } - - /** - * returns an unique value identifying the current version of this template, - * in this case it's the unix timestamp of the last modification - * - * @return string - */ - public function getUid() - { - return (string) filemtime($this->getResourceIdentifier()); - } - - /** - * returns a new template object from the given include name, null if no include is - * possible (resource not found), or false if include is not permitted by this resource type - * - * @param Dwoo $dwoo the dwoo instance requiring it - * @param mixed $resourceId the filename (relative to this template's dir) of the template to include - * @param int $cacheTime duration of the cache validity for this template, - * if null it defaults to the Dwoo instance that will - * render this template - * @param string $cacheId the unique cache identifier of this page or anything else that - * makes this template's content unique, if null it defaults - * to the current url - * @param string $compileId the unique compiled identifier, which is used to distinguish this - * template from others, if null it defaults to the filename+bits of the path - * @param Dwoo_ITemplate $parentTemplate the template that is requesting a new template object (through - * an include, extends or any other plugin) - * @return Dwoo_Template_File|null - */ - public static function templateFactory(Dwoo $dwoo, $resourceId, $cacheTime = null, $cacheId = null, $compileId = null, Dwoo_ITemplate $parentTemplate = null) - { - if (DIRECTORY_SEPARATOR === '\\') { - $resourceId = str_replace(array("\t", "\n", "\r", "\f", "\v"), array('\\t', '\\n', '\\r', '\\f', '\\v'), $resourceId); - } - $resourceId = strtr($resourceId, '\\', '/'); - - $includePath = null; - - if (file_exists($resourceId) === false) { - if ($parentTemplate === null) { - $parentTemplate = $dwoo->getTemplate(); - } - if ($parentTemplate instanceof Dwoo_Template_File) { - if ($includePath = $parentTemplate->getIncludePath()) { - if (strstr($resourceId, '../')) { - throw new Dwoo_Exception('When using an include path you can not reference a template into a parent directory (using ../)'); - } - } else { - $resourceId = dirname($parentTemplate->getResourceIdentifier()).DIRECTORY_SEPARATOR.$resourceId; - if (file_exists($resourceId) === false) { - return null; - } - } - } else { - return null; - } - } - - if ($policy = $dwoo->getSecurityPolicy()) { - while (true) { - if (preg_match('{^([a-z]+?)://}i', $resourceId)) { - throw new Dwoo_Security_Exception('The security policy prevents you to read files from external sources : '.$resourceId.'.'); - } - - if ($includePath) { - break; - } - - $resourceId = realpath($resourceId); - $dirs = $policy->getAllowedDirectories(); - foreach ($dirs as $dir=>$dummy) { - if (strpos($resourceId, $dir) === 0) { - break 2; - } - } - throw new Dwoo_Security_Exception('The security policy prevents you to read '.$resourceId.''); - } - } - - $class = 'Dwoo_Template_File'; - if ($parentTemplate) { - $class = get_class($parentTemplate); - } - return new $class($resourceId, $cacheTime, $cacheId, $compileId, $includePath); - } - - /** - * returns the full compiled file name and assigns a default value to it if - * required - * - * @param Dwoo $dwoo the dwoo instance that requests the file name - * @return string the full path to the compiled file - */ - protected function getCompiledFilename(Dwoo $dwoo) - { - // no compile id was provided, set default - if ($this->compileId===null) { - $this->compileId = str_replace('../', '__', strtr($this->getResourceIdentifier(), '\\:', '/-')); - } - return $dwoo->getCompileDir() . $this->compileId.'.d'.Dwoo::RELEASE_TAG.'.php'; - } - - /** - * returns some php code that will check if this template has been modified or not - * - * if the function returns null, the template will be instanciated and then the Uid checked - * - * @return string - */ - public function getIsModifiedCode() - { - return '"'.$this->getUid().'" == filemtime('.var_export($this->getResourceIdentifier(), true).')'; - } -} diff --git a/_piecrust/libs/Dwoo/Dwoo/Template/String.php b/_piecrust/libs/Dwoo/Dwoo/Template/String.php deleted file mode 100644 index 1274027..0000000 --- a/_piecrust/libs/Dwoo/Dwoo/Template/String.php +++ /dev/null @@ -1,497 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.1.0 - * @date 2009-07-18 - * @package Dwoo - */ -class Dwoo_Template_String implements Dwoo_ITemplate -{ - /** - * template name - * - * @var string - */ - protected $name; - - /** - * template compilation id - * - * @var string - */ - protected $compileId; - - /** - * template cache id, if not provided in the constructor, it is set to - * the md4 hash of the request_uri. it is however highly recommended to - * provide one that will fit your needs. - * - * in all cases, the compilation id is prepended to the cache id to separate - * templates with similar cache ids from one another - * - * @var string - */ - protected $cacheId; - - /** - * validity duration of the generated cache file (in seconds) - * - * set to -1 for infinite cache, 0 to disable and null to inherit the Dwoo instance's cache time - * - * @var int - */ - protected $cacheTime; - - /** - * boolean flag that defines whether the compilation should be enforced (once) or - * not use this if you have issues with the compiled templates not being updated - * but if you do need this it's most likely that you should file a bug report - * - * @var bool - */ - protected $compilationEnforced; - - /** - * caches the results of the file checks to save some time when the same - * templates is rendered several times - * - * @var array - */ - protected static $cache = array('cached'=>array(), 'compiled'=>array()); - - /** - * holds the compiler that built this template - * - * @var Dwoo_ICompiler - */ - protected $compiler; - - /** - * chmod value for all files written (cached or compiled ones) - * - * set to null if you don't want any chmod operation to happen - * - * @var int - */ - protected $chmod = 0777; - - /** - * creates a template from a string - * - * @param string $templateString the template to use - * @param int $cacheTime duration of the cache validity for this template, - * if null it defaults to the Dwoo instance that will - * render this template, set to -1 for infinite cache or 0 to disable - * @param string $cacheId the unique cache identifier of this page or anything else that - * makes this template's content unique, if null it defaults - * to the current url - * @param string $compileId the unique compiled identifier, which is used to distinguish this - * template from others, if null it defaults to the md4 hash of the template - */ - public function __construct($templateString, $cacheTime = null, $cacheId = null, $compileId = null) - { - $this->template = $templateString; - if (function_exists('hash')) { - $this->name = hash('md4', $templateString); - } else { - $this->name = md5($templateString); - } - $this->cacheTime = $cacheTime; - - if ($compileId !== null) { - $this->compileId = str_replace('../', '__', strtr($compileId, '\\%?=!:;'.PATH_SEPARATOR, '/-------')); - } - - if ($cacheId !== null) { - $this->cacheId = str_replace('../', '__', strtr($cacheId, '\\%?=!:;'.PATH_SEPARATOR, '/-------')); - } - } - - /** - * returns the cache duration for this template - * - * defaults to null if it was not provided - * - * @return int|null - */ - public function getCacheTime() - { - return $this->cacheTime; - } - - /** - * sets the cache duration for this template - * - * can be used to set it after the object is created if you did not provide - * it in the constructor - * - * @param int $seconds duration of the cache validity for this template, if - * null it defaults to the Dwoo instance's cache time. 0 = disable and - * -1 = infinite cache - */ - public function setCacheTime($seconds = null) - { - $this->cacheTime = $seconds; - } - - /** - * returns the chmod value for all files written (cached or compiled ones) - * - * defaults to 0777 - * - * @return int|null - */ - public function getChmod() - { - return $this->chmod; - } - - /** - * set the chmod value for all files written (cached or compiled ones) - * - * set to null if you don't want to do any chmod() operation - * - * @param int $mask new bitmask to use for all files - */ - public function setChmod($mask = null) - { - $this->chmod = $mask; - } - - /** - * returns the template name - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * returns the resource name for this template class - * - * @return string - */ - public function getResourceName() - { - return 'string'; - } - - /** - * returns the resource identifier for this template, false here as strings don't have identifiers - * - * @return false - */ - public function getResourceIdentifier() - { - return false; - } - - /** - * returns the template source of this template - * - * @return string - */ - public function getSource() - { - return $this->template; - } - - /** - * returns an unique value identifying the current version of this template, - * in this case it's the md4 hash of the content - * - * @return string - */ - public function getUid() - { - return $this->name; - } - - /** - * returns the compiler used by this template, if it was just compiled, or null - * - * @return Dwoo_ICompiler - */ - public function getCompiler() - { - return $this->compiler; - } - - /** - * marks this template as compile-forced, which means it will be recompiled even if it - * was already saved and wasn't modified since the last compilation. do not use this in production, - * it's only meant to be used in development (and the development of dwoo particularly) - */ - public function forceCompilation() - { - $this->compilationEnforced = true; - } - - /** - * returns the cached template output file name, true if it's cache-able but not cached - * or false if it's not cached - * - * @param Dwoo $dwoo the dwoo instance that requests it - * @return string|bool - */ - public function getCachedTemplate(Dwoo $dwoo) - { - if ($this->cacheTime !== null) { - $cacheLength = $this->cacheTime; - } else { - $cacheLength = $dwoo->getCacheTime(); - } - - // file is not cacheable - if ($cacheLength === 0) { - return false; - } - - $cachedFile = $this->getCacheFilename($dwoo); - - if (isset(self::$cache['cached'][$this->cacheId]) === true && file_exists($cachedFile)) { - // already checked, return cache file - return $cachedFile; - } elseif ($this->compilationEnforced !== true && file_exists($cachedFile) && ($cacheLength === -1 || filemtime($cachedFile) > ($_SERVER['REQUEST_TIME'] - $cacheLength)) && $this->isValidCompiledFile($this->getCompiledFilename($dwoo))) { - // cache is still valid and can be loaded - self::$cache['cached'][$this->cacheId] = true; - return $cachedFile; - } else { - // file is cacheable - return true; - } - } - - /** - * caches the provided output into the cache file - * - * @param Dwoo $dwoo the dwoo instance that requests it - * @param string $output the template output - * @return mixed full path of the cached file or false upon failure - */ - public function cache(Dwoo $dwoo, $output) - { - $cacheDir = $dwoo->getCacheDir(); - $cachedFile = $this->getCacheFilename($dwoo); - - // the code below is courtesy of Rasmus Schultz, - // thanks for his help on avoiding concurency issues - $temp = tempnam($cacheDir, 'temp'); - if (!($file = @fopen($temp, 'wb'))) { - $temp = $cacheDir . uniqid('temp'); - if (!($file = @fopen($temp, 'wb'))) { - trigger_error('Error writing temporary file \''.$temp.'\'', E_USER_WARNING); - return false; - } - } - - fwrite($file, $output); - fclose($file); - - $this->makeDirectory(dirname($cachedFile), $cacheDir); - if (!@rename($temp, $cachedFile)) { - @unlink($cachedFile); - @rename($temp, $cachedFile); - } - - if ($this->chmod !== null) { - chmod($cachedFile, $this->chmod); - } - - self::$cache['cached'][$this->cacheId] = true; - - return $cachedFile; - } - - /** - * clears the cached template if it's older than the given time - * - * @param Dwoo $dwoo the dwoo instance that was used to cache that template - * @param int $olderThan minimum time (in seconds) required for the cache to be cleared - * @return bool true if the cache was not present or if it was deleted, false if it remains there - */ - public function clearCache(Dwoo $dwoo, $olderThan = -1) - { - $cachedFile = $this->getCacheFilename($dwoo); - - return !file_exists($cachedFile) || (filectime($cachedFile) < (time() - $olderThan) && unlink($cachedFile)); - } - - /** - * returns the compiled template file name - * - * @param Dwoo $dwoo the dwoo instance that requests it - * @param Dwoo_ICompiler $compiler the compiler that must be used - * @return string - */ - public function getCompiledTemplate(Dwoo $dwoo, Dwoo_ICompiler $compiler = null) - { - $compiledFile = $this->getCompiledFilename($dwoo); - - if ($this->compilationEnforced !== true && isset(self::$cache['compiled'][$this->compileId]) === true) { - // already checked, return compiled file - } elseif ($this->compilationEnforced !== true && $this->isValidCompiledFile($compiledFile)) { - // template is compiled - self::$cache['compiled'][$this->compileId] = true; - } else { - // compiles the template - $this->compilationEnforced = false; - - if ($compiler === null) { - $compiler = $dwoo->getDefaultCompilerFactory($this->getResourceName()); - - if ($compiler === null || $compiler === array('Dwoo_Compiler', 'compilerFactory')) { - if (class_exists('Dwoo_Compiler', false) === false) { - include DWOO_DIRECTORY . 'Dwoo/Compiler.php'; - } - $compiler = Dwoo_Compiler::compilerFactory(); - } else { - $compiler = call_user_func($compiler); - } - } - - $this->compiler = $compiler; - - $compiler->setCustomPlugins($dwoo->getCustomPlugins()); - $compiler->setSecurityPolicy($dwoo->getSecurityPolicy()); - $this->makeDirectory(dirname($compiledFile), $dwoo->getCompileDir()); - file_put_contents($compiledFile, $compiler->compile($dwoo, $this)); - if ($this->chmod !== null) { - chmod($compiledFile, $this->chmod); - } - - self::$cache['compiled'][$this->compileId] = true; - } - - return $compiledFile; - } - - /** - * Checks if compiled file is valid (it exists) - * - * @param string file - * @return boolean True cache file existance - */ - protected function isValidCompiledFile($file) { - return file_exists($file); - } - - /** - * returns a new template string object with the resource id being the template source code - * - * @param Dwoo $dwoo the dwoo instance requiring it - * @param mixed $resourceId the filename (relative to this template's dir) of the template to include - * @param int $cacheTime duration of the cache validity for this template, - * if null it defaults to the Dwoo instance that will - * render this template - * @param string $cacheId the unique cache identifier of this page or anything else that - * makes this template's content unique, if null it defaults - * to the current url - * @param string $compileId the unique compiled identifier, which is used to distinguish this - * template from others, if null it defaults to the filename+bits of the path - * @param Dwoo_ITemplate $parentTemplate the template that is requesting a new template object (through - * an include, extends or any other plugin) - * @return Dwoo_Template_String - */ - public static function templateFactory(Dwoo $dwoo, $resourceId, $cacheTime = null, $cacheId = null, $compileId = null, Dwoo_ITemplate $parentTemplate = null) - { - return new self($resourceId, $cacheTime, $cacheId, $compileId); - } - - /** - * returns the full compiled file name and assigns a default value to it if - * required - * - * @param Dwoo $dwoo the dwoo instance that requests the file name - * @return string the full path to the compiled file - */ - protected function getCompiledFilename(Dwoo $dwoo) - { - // no compile id was provided, set default - if ($this->compileId===null) { - $this->compileId = $this->name; - } - return $dwoo->getCompileDir() . $this->compileId.'.d'.Dwoo::RELEASE_TAG.'.php'; - } - - /** - * returns the full cached file name and assigns a default value to it if - * required - * - * @param Dwoo $dwoo the dwoo instance that requests the file name - * @return string the full path to the cached file - */ - protected function getCacheFilename(Dwoo $dwoo) - { - // no cache id provided, use request_uri as default - if ($this->cacheId === null) { - if (isset($_SERVER['REQUEST_URI']) === true) { - $cacheId = $_SERVER['REQUEST_URI']; - } elseif (isset($_SERVER['SCRIPT_FILENAME']) && isset($_SERVER['argv'])) { - $cacheId = $_SERVER['SCRIPT_FILENAME'].'-'.implode('-', $_SERVER['argv']); - } else { - $cacheId = ''; - } - // force compiled id generation - $this->getCompiledFilename($dwoo); - - $this->cacheId = str_replace('../', '__', $this->compileId . strtr($cacheId, '\\%?=!:;'.PATH_SEPARATOR, '/-------')); - } - return $dwoo->getCacheDir() . $this->cacheId.'.html'; - } - - /** - * returns some php code that will check if this template has been modified or not - * - * if the function returns null, the template will be instanciated and then the Uid checked - * - * @return string - */ - public function getIsModifiedCode() - { - return null; - } - - /** - * ensures the given path exists - * - * @param string $path any path - * @param string $baseDir the base directory where the directory is created - * ($path must still contain the full path, $baseDir - * is only used for unix permissions) - */ - protected function makeDirectory($path, $baseDir = null) - { - if (is_dir($path) === true) { - return; - } - - if ($this->chmod === null) { - $chmod = 0777; - } else { - $chmod = $this->chmod; - } - mkdir($path, $chmod, true); - - // enforce the correct mode for all directories created - if (strpos(PHP_OS, 'WIN') !== 0 && $baseDir !== null) { - $path = strtr(str_replace($baseDir, '', $path), '\\', '/'); - $folders = explode('/', trim($path, '/')); - foreach ($folders as $folder) { - $baseDir .= $folder . DIRECTORY_SEPARATOR; - chmod($baseDir, $chmod); - } - } - } -} diff --git a/_piecrust/libs/Dwoo/LICENSE b/_piecrust/libs/Dwoo/LICENSE deleted file mode 100644 index 55dd4a4..0000000 --- a/_piecrust/libs/Dwoo/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2008, Dwoo / Jordi Boggiano -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Dwoo nor the names of its contributors may be - used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY JORDI BOGGIANO ''AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL JORDI BOGGIANO BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/README b/_piecrust/libs/Dwoo/README deleted file mode 100644 index 317179a..0000000 --- a/_piecrust/libs/Dwoo/README +++ /dev/null @@ -1,79 +0,0 @@ ------------------------------------------------------------------------------ --- WHAT IS DWOO? readme - version 1.0.0 ------------------------------------------------------------------------------ -Dwoo is a PHP5 Template Engine that was started in early 2008. The idea came -from the fact that Smarty, a well known template engine, is getting older and -older. It carries the weight of it's age, having old features that are -inconsistent compared to newer ones, being written for PHP4 its Object -Oriented aspect doesn't take advantage of PHP5's more advanced features in -the area, etc. Hence Dwoo was born, hoping to provide a more up to date and -stronger engine. - -So far it has proven to be faster than Smarty in many areas, and it provides -a compatibility layer to allow developers that have been using Smarty for -years to switch their application over to Dwoo progressively. - ------------------------------------------------------------------------------ --- DOCUMENTATION ------------------------------------------------------------------------------ -Dwoo's website to get the latest version is at http://dwoo.org/ - -The wiki/documentation pages are available at http://wiki.dwoo.org/ - ------------------------------------------------------------------------------ --- LICENSE ------------------------------------------------------------------------------ -Dwoo is released under the Modified BSD license. -See the LICENSE file included in the archive or go to the URL below to obtain -a copy. - -http://dwoo.org/LICENSE - ------------------------------------------------------------------------------ --- QUICK START - RUNNING DWOO ------------------------------------------------------------------------------ -/***************************** Basic Example *******************************/ -// Include the main class (it should handle the rest on its own) -include 'path/to/dwooAutoload.php'; - -// Create the controller, this is reusable -$dwoo = new Dwoo(); - -// Load a template file (name it as you please), this is reusable -// if you want to render multiple times the same template with different data -$tpl = new Dwoo_Template_File('path/to/index.tpl'); - -// Create a data set, if you don't like this you can directly input an -// associative array in $dwoo->output() -$data = new Dwoo_Data(); -// Fill it with some data -$data->assign('foo', 'BAR'); -$data->assign('bar', 'BAZ'); - -// Outputs the result ... -$dwoo->output($tpl, $data); -// ... or get it to use it somewhere else -$dwoo->get($tpl, $data); - -/***************************** Loop Example *******************************/ -// To loop over multiple articles of a blog for instance, if you have a -// template file representing an article, you could do the following : - -include 'path/to/dwooAutoload.php'; - -$dwoo = new Dwoo(); -$tpl = new Dwoo_Template_File('path/to/article.tpl'); - -$pageContent = ''; - -// Loop over articles that have been retrieved from the DB -foreach($articles as $article) { - // Either associate variables one by one - $data = new Dwoo_Data(); - $data->assign('title', $article['title']; - $data->assign('content', $article['content']); - $pageContent .= $dwoo->get($tpl, $data); - - // Or use the article directly (which is a lot easier in this case) - $pageContent .= $dwoo->get($tpl, $article); -} \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/UPGRADE_NOTES b/_piecrust/libs/Dwoo/UPGRADE_NOTES deleted file mode 100644 index 5f01896..0000000 --- a/_piecrust/libs/Dwoo/UPGRADE_NOTES +++ /dev/null @@ -1,65 +0,0 @@ ------------------------------------------------------------------------------ --- Upgrading to Dwoo v1.0.0beta ------------------------------------------------------------------------------ - -1. Dwoo classes loading ------------------------ - -While everything was previously included by Dwoo.php, this version introduces -an autoload function (dwooAutoload) that handles this automatically. This -means your choices are now : - -a) change your : include 'path/to/Dwoo.php'; - into : include 'path/to/dwooAutoload.php'; - this is the recommended setting, especially during development, so that if you - are seeing a Dwoo error and want to report a bug, you get proper line numbers - with the error and not just "error in Dwoo.compiled.php at line 2" - -b) use the compiled version of Dwoo, this is "experimental" and seems to provide better - performances mostly under windows, with a linux server it might imrpove performances - slightly if you have an opcode cache (APC, xcache, ..) : - include 'path/to/Dwoo.compiled.php'; - -c) load Dwoo classes yourself somehow, as part of your autoload function or - whatever suits you best - ------------------------------------------------------------------------------ --- Upgrading to Dwoo v0.9.2 ------------------------------------------------------------------------------ - -1. Block plugins ----------------- - -This version introduced a backward compatibility break with block plugins, this -was needed to allow compile-time access to the block's (parsed) content, be -very careful if you manipulate this content since it is php code and should remain -so if you don't want syntax errors (which are fatal) during template run. - -Error message : - - Strict Standards: Declaration of Dwoo_Plugin_*::postProcessing() should be compatible with that of Dwoo_Block_Plugin::postProcessing() - -Solution : - - * Change your block plugins postProcessing method declaration to the following : - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - - * Then add "$content" to the beginning of your return value, or modify it if required - -2. Strip modifier ------------------ - -The strip modifier had the same name as the strip block, this worked when the block -was hard coded within the compiler, but with the API change (see above) I was able -to move it to a plugin. Since both plugins don't have the same purpose, there was -a real problem and I had to rename it. The renaming will be handled by the smarty compatibility -layer, but if you used it without smarty compatibility, you should edit your templates. - -3. DWOO_COMPILE_DIRECTORY and DWOO_CACHE_DIRECTORY constants ------------------------------------------------------------- - -If you used those before, you will now get an exception when loading Dwoo. This is done -on purpose to help people to make the transition to the new method of doing it : - - $dwoo = new Dwoo('myCompileDir', 'myCacheDir'); \ No newline at end of file diff --git a/_piecrust/libs/Dwoo/dwooAutoload.php b/_piecrust/libs/Dwoo/dwooAutoload.php deleted file mode 100644 index da93f91..0000000 --- a/_piecrust/libs/Dwoo/dwooAutoload.php +++ /dev/null @@ -1,12 +0,0 @@ - - * * href : the target URI where the link must point - * * rest : any other attributes you want to add to the tag can be added as named parameters - *
        - * - * Example : - * - * - * {* Create a simple link out of an url variable and add a special class attribute: *} - * - * {a $url class="external" /} - * - * {* Mark a link as active depending on some other variable : *} - * - * {a $link.url class=tif($link.active "active"); $link.title /} - * - * {* This is similar to: {$link.title} *} - * - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Plugin_a extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block -{ - public function init($href, array $rest=array()) - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - $p = $compiler->getCompiledParams($params); - - $out = Dwoo_Compiler::PHP_OPEN . 'echo \'\';' . Dwoo_Compiler::PHP_CLOSE; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - $p = $compiler->getCompiledParams($params); - - // no content was provided so use the url as display text - if ($content == "") { - // merge into the href if href is a string - if (substr($p['href'], -1) === '"' || substr($p['href'], -1) === '\'') { - return Dwoo_Compiler::PHP_OPEN . 'echo '.substr($p['href'], 0, -1).''.substr($p['href'], -1).';'.Dwoo_Compiler::PHP_CLOSE; - } - // otherwise append - return Dwoo_Compiler::PHP_OPEN . 'echo '.$p['href'].'.\'\';'.Dwoo_Compiler::PHP_CLOSE; - } - - // return content - return $content . ''; - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/auto_escape.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/auto_escape.php deleted file mode 100644 index 2a3d67c..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/auto_escape.php +++ /dev/null @@ -1,61 +0,0 @@ - - * * enabled : if set to "on", "enable", true or 1 then the compiler autoescaping is enabled inside this block. set to "off", "disable", false or 0 to disable it - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Plugin_auto_escape extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block -{ - protected static $stack = array(); - - public function init($enabled) - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - $params = $compiler->getCompiledParams($params); - switch(strtolower(trim((string) $params['enabled'], '"\''))) { - - case 'on': - case 'true': - case 'enabled': - case 'enable': - case '1': - $enable = true; - break; - case 'off': - case 'false': - case 'disabled': - case 'disable': - case '0': - $enable = false; - break; - default: - throw new Dwoo_Compilation_Exception($compiler, 'Auto_Escape : Invalid parameter ('.$params['enabled'].'), valid parameters are "enable"/true or "disable"/false'); - - } - - self::$stack[] = $compiler->getAutoEscape(); - $compiler->setAutoEscape($enable); - return ''; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - $compiler->setAutoEscape(array_pop(self::$stack)); - return $content; - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/block.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/block.php deleted file mode 100644 index 1cf981a..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/block.php +++ /dev/null @@ -1,34 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Plugin_block extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block -{ - public function init($name='') - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - return ''; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - return $content; - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/capture.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/capture.php deleted file mode 100644 index 7e15f44..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/capture.php +++ /dev/null @@ -1,61 +0,0 @@ - - * * name : capture name, used to read the value afterwards - * * assign : if set, the value is also saved in the given variable - * * cat : if true, the value is appended to the previous one (if any) instead of overwriting it - * - * If the cat parameter is true, the content - * will be appended to the existing content - * - * Example : - * - * - * {capture "foo"} - * Anything in here won't show, it will be saved for later use.. - * {/capture} - * Output was : {$.capture.foo} - * - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Plugin_capture extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block -{ - public function init($name = 'default', $assign = null, $cat = false, $trim = false) - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - return Dwoo_Compiler::PHP_OPEN.$prepend.'ob_start();'.$append.Dwoo_Compiler::PHP_CLOSE; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - $params = $compiler->getCompiledParams($params); - - $out = $content . Dwoo_Compiler::PHP_OPEN.$prepend."\n".'$tmp = ob_get_clean();'; - if ($params['trim'] !== 'false' && $params['trim'] !== 0) { - $out .= "\n".'$tmp = trim($tmp);'; - } - if ($params['cat'] === 'true' || $params['cat'] === 1) { - $out .= "\n".'$tmp = $this->readVar(\'dwoo.capture.\'.'.$params['name'].') . $tmp;'; - } - if ($params['assign'] !== 'null') { - $out .= "\n".'$this->scope['.$params['assign'].'] = $tmp;'; - } - return $out . "\n".'$this->globals[\'capture\']['.$params['name'].'] = $tmp;'.$append.Dwoo_Compiler::PHP_CLOSE; - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/dynamic.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/dynamic.php deleted file mode 100644 index e8251bc..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/dynamic.php +++ /dev/null @@ -1,65 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Plugin_dynamic extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block -{ - public function init() - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - return ''; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - $output = Dwoo_Compiler::PHP_OPEN . - 'if($doCache) {'."\n\t". - 'echo \''. - str_replace('\'', '\\\'', $content) . - '\';'. - "\n} else {\n\t"; - if(substr($content, 0, strlen(Dwoo_Compiler::PHP_OPEN)) == Dwoo_Compiler::PHP_OPEN) { - $output .= substr($content, strlen(Dwoo_Compiler::PHP_OPEN)); - } else { - $output .= Dwoo_Compiler::PHP_CLOSE . $content; - } - if(substr($output, -strlen(Dwoo_Compiler::PHP_CLOSE)) == Dwoo_Compiler::PHP_CLOSE) { - $output = substr($output, 0, -strlen(Dwoo_Compiler::PHP_CLOSE)); - } else { - $output .= Dwoo_Compiler::PHP_OPEN; - } - $output .= "\n}". Dwoo_Compiler::PHP_CLOSE; - - return $output; - } - - public static function unescape($output, $dynamicId, $compiledFile) - { - $output = preg_replace_callback('/(.+?)<\/dwoo:dynamic_'.$dynamicId.'>/s', array('self', 'unescapePhp'), $output, -1, $count); - // re-add the includes on top of the file - if ($count && preg_match('#/\* template head \*/(.+?)/\* end template head \*/#s', file_get_contents($compiledFile), $m)) { - $output = ''.$output; - } - return $output; - } - - public static function unescapePhp($match) - { - return preg_replace('{<\?php /\*'.$match[1].'\*/ echo \'(.+?)\'; \?>}s', '$1', $match[2]); - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/else.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/else.php deleted file mode 100644 index 2dd493c..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/else.php +++ /dev/null @@ -1,63 +0,0 @@ - - * {foreach $array val} - * $array is not empty so we display it's values : {$val} - * {else} - * if this shows, it means that $array is empty or doesn't exist. - * {/foreach} - * - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Plugin_else extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block -{ - public function init() - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - $preContent = ''; - while (true) { - $preContent .= $compiler->removeTopBlock(); - $block =& $compiler->getCurrentBlock(); - $interfaces = class_implements($block['class'], false); - if (in_array('Dwoo_IElseable', $interfaces) !== false) { - break; - } - } - - $params['initialized'] = true; - $compiler->injectBlock($type, $params); - return $preContent; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - if (!isset($params['initialized'])) { - return ''; - } - - $block =& $compiler->getCurrentBlock(); - $block['params']['hasElse'] = Dwoo_Compiler::PHP_OPEN."else {\n".Dwoo_Compiler::PHP_CLOSE . $content . Dwoo_Compiler::PHP_OPEN."\n}".Dwoo_Compiler::PHP_CLOSE; - return ''; - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/elseif.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/elseif.php deleted file mode 100644 index b7d0585..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/elseif.php +++ /dev/null @@ -1,60 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Plugin_elseif extends Dwoo_Plugin_if implements Dwoo_ICompilable_Block, Dwoo_IElseable -{ - public function init(array $rest) - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - $preContent = ''; - while (true) { - $preContent .= $compiler->removeTopBlock(); - $block =& $compiler->getCurrentBlock(); - $interfaces = class_implements($block['class'], false); - if (in_array('Dwoo_IElseable', $interfaces) !== false) { - break; - } - } - - $params['initialized'] = true; - $compiler->injectBlock($type, $params); - return $preContent; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - if (!isset($params['initialized'])) { - return ''; - } - - $params = $compiler->getCompiledParams($params); - - $pre = Dwoo_Compiler::PHP_OPEN."elseif (".implode(' ', self::replaceKeywords($params['*'], $compiler)).") {\n" . Dwoo_Compiler::PHP_CLOSE; - $post = Dwoo_Compiler::PHP_OPEN."\n}".Dwoo_Compiler::PHP_CLOSE; - - if (isset($params['hasElse'])) { - $post .= $params['hasElse']; - } - - $block =& $compiler->getCurrentBlock(); - $block['params']['hasElse'] = $pre . $content . $post; - return ''; - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/for.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/for.php deleted file mode 100644 index 01a75e8..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/for.php +++ /dev/null @@ -1,147 +0,0 @@ - - * * name : for name to access it's iterator variables through {$.for.name.var} see {@link http://wiki.dwoo.org/index.php/IteratorVariables} for details - * * from : array to iterate from (which equals 0) or a number as a start value - * * to : value to stop iterating at (equals count($array) by default if you set an array in from) - * * step : defines the incrementation of the pointer at each iteration - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.1.0 - * @date 2009-07-18 - * @package Dwoo - */ -class Dwoo_Plugin_for extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block, Dwoo_IElseable -{ - public static $cnt=0; - - public function init($name, $from, $to=null, $step=1, $skip=0) - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - // get block params and save the current template pointer to use it in the postProcessing method - $currentBlock =& $compiler->getCurrentBlock(); - $currentBlock['params']['tplPointer'] = $compiler->getPointer(); - - return ''; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - $params = $compiler->getCompiledParams($params); - $tpl = $compiler->getTemplateSource($params['tplPointer']); - - // assigns params - $from = $params['from']; - $name = $params['name']; - $step = $params['step']; - $to = $params['to']; - - // evaluates which global variables have to be computed - $varName = '$dwoo.for.'.trim($name, '"\'').'.'; - $shortVarName = '$.for.'.trim($name, '"\'').'.'; - $usesAny = strpos($tpl, $varName) !== false || strpos($tpl, $shortVarName) !== false; - $usesFirst = strpos($tpl, $varName.'first') !== false || strpos($tpl, $shortVarName.'first') !== false; - $usesLast = strpos($tpl, $varName.'last') !== false || strpos($tpl, $shortVarName.'last') !== false; - $usesIndex = strpos($tpl, $varName.'index') !== false || strpos($tpl, $shortVarName.'index') !== false; - $usesIteration = $usesFirst || $usesLast || strpos($tpl, $varName.'iteration') !== false || strpos($tpl, $shortVarName.'iteration') !== false; - $usesShow = strpos($tpl, $varName.'show') !== false || strpos($tpl, $shortVarName.'show') !== false; - $usesTotal = $usesLast || strpos($tpl, $varName.'total') !== false || strpos($tpl, $shortVarName.'total') !== false; - - if (strpos($name, '$this->scope[') !== false) { - $usesAny = $usesFirst = $usesLast = $usesIndex = $usesIteration = $usesShow = $usesTotal = true; - } - - // gets foreach id - $cnt = self::$cnt++; - - // builds pre processing output for - $out = Dwoo_Compiler::PHP_OPEN . "\n".'$_for'.$cnt.'_from = '.$from.';'. - "\n".'$_for'.$cnt.'_to = '.$to.';'. - "\n".'$_for'.$cnt.'_step = abs('.$step.');'. - "\n".'if (is_numeric($_for'.$cnt.'_from) && !is_numeric($_for'.$cnt.'_to)) { $this->triggerError(\'For requires the to parameter when using a numerical from\'); }'. - "\n".'$tmp_shows = $this->isArray($_for'.$cnt.'_from, true) || (is_numeric($_for'.$cnt.'_from) && (abs(($_for'.$cnt.'_from - $_for'.$cnt.'_to)/$_for'.$cnt.'_step) !== 0 || $_for'.$cnt.'_from == $_for'.$cnt.'_to));'; - // adds foreach properties - if ($usesAny) { - $out .= "\n".'$this->globals["for"]['.$name.'] = array'."\n("; - if ($usesIndex) $out .="\n\t".'"index" => 0,'; - if ($usesIteration) $out .="\n\t".'"iteration" => 1,'; - if ($usesFirst) $out .="\n\t".'"first" => null,'; - if ($usesLast) $out .="\n\t".'"last" => null,'; - if ($usesShow) $out .="\n\t".'"show" => $tmp_shows,'; - if ($usesTotal) $out .="\n\t".'"total" => $this->isArray($_for'.$cnt.'_from) ? floor(count($_for'.$cnt.'_from) / $_for'.$cnt.'_step) : (is_numeric($_for'.$cnt.'_from) ? abs(($_for'.$cnt.'_to + 1 - $_for'.$cnt.'_from)/$_for'.$cnt.'_step) : 0),'; - $out.="\n);\n".'$_for'.$cnt.'_glob =& $this->globals["for"]['.$name.'];'; - } - // checks if for must be looped - $out .= "\n".'if ($tmp_shows)'."\n{"; - // set from/to to correct values if an array was given - $out .= "\n\t".'if ($this->isArray($_for'.$cnt.'_from, true)) { - $_for'.$cnt.'_to = is_numeric($_for'.$cnt.'_to) ? $_for'.$cnt.'_to - $_for'.$cnt.'_step : count($_for'.$cnt.'_from) - 1; - $_for'.$cnt.'_from = 0; - }'; - - // if input are pure numbers it shouldn't reorder them, if it's variables it gets too messy though so in that case a counter should be used - $reverse = false; - $condition = '<='; - $incrementer = '+'; - - if (preg_match('{^(["\']?)([0-9]+)\1$}', $from, $mN1) && preg_match('{^(["\']?)([0-9]+)\1$}', $to, $mN2)) { - $from = (int) $mN1[2]; - $to = (int) $mN2[2]; - if ($from > $to) { - $reverse = true; - $condition = '>='; - $incrementer = '-'; - } - } - - // reverse from and to if needed - if (!$reverse) { - $out .= "\n\t".'if ($_for'.$cnt.'_from > $_for'.$cnt.'_to) { - $tmp = $_for'.$cnt.'_from; - $_for'.$cnt.'_from = $_for'.$cnt.'_to; - $_for'.$cnt.'_to = $tmp; - }'; - } - - $out .= ' - for ($this->scope['.$name.'] = $_for'.$cnt.'_from; $this->scope['.$name.'] '.$condition.' $_for'.$cnt.'_to; $this->scope['.$name.'] '.$incrementer.'= $_for'.$cnt.'_step)'."\n\t{"; - // updates properties - if ($usesIndex) { - $out .="\n\t\t".'$_for'.$cnt.'_glob["index"] = $this->scope['.$name.'];'; - } - if ($usesFirst) { - $out .= "\n\t\t".'$_for'.$cnt.'_glob["first"] = (string) ($_for'.$cnt.'_glob["iteration"] === 1);'; - } - if ($usesLast) { - $out .= "\n\t\t".'$_for'.$cnt.'_glob["last"] = (string) ($_for'.$cnt.'_glob["iteration"] === $_for'.$cnt.'_glob["total"]);'; - } - $out .= "\n/* -- for start output */\n".Dwoo_Compiler::PHP_CLOSE; - - - // build post processing output and cache it - $postOut = Dwoo_Compiler::PHP_OPEN . '/* -- for end output */'; - // update properties - if ($usesIteration) { - $postOut .= "\n\t\t".'$_for'.$cnt.'_glob["iteration"]+=1;'; - } - // end loop - $postOut .= "\n\t}\n}\n".Dwoo_Compiler::PHP_CLOSE; - - if (isset($params['hasElse'])) { - $postOut .= $params['hasElse']; - } - - return $out . $content . $postOut; - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/foreach.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/foreach.php deleted file mode 100644 index 75f45d6..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/foreach.php +++ /dev/null @@ -1,152 +0,0 @@ - - * * from : the array that you want to iterate over - * * key : variable name for the key (or for the item if item is not defined) - * * item : variable name for each item - * * name : foreach name to access it's iterator variables through {$.foreach.name.var} see {@link http://wiki.dwoo.org/index.php/IteratorVariables} for details - * - * Example : - * - * - * {foreach $array val} - * {$val.something} - * {/foreach} - * - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.1.0 - * @date 2009-07-18 - * @package Dwoo - */ -class Dwoo_Plugin_foreach extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block, Dwoo_IElseable -{ - public static $cnt=0; - - public function init($from, $key=null, $item=null, $name='default', $implode=null) - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - // get block params and save the current template pointer to use it in the postProcessing method - $currentBlock =& $compiler->getCurrentBlock(); - $currentBlock['params']['tplPointer'] = $compiler->getPointer(); - - return ''; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - $params = $compiler->getCompiledParams($params); - $tpl = $compiler->getTemplateSource($params['tplPointer']); - - // assigns params - $src = $params['from']; - - if ($params['item'] !== 'null') { - if ($params['key'] !== 'null') { - $key = $params['key']; - } - $val = $params['item']; - } elseif ($params['key'] !== 'null') { - $val = $params['key']; - } else { - throw new Dwoo_Compilation_Exception($compiler, 'Foreach item parameter missing'); - } - $name = $params['name']; - - if (substr($val, 0, 1) !== '"' && substr($val, 0, 1) !== '\'') { - throw new Dwoo_Compilation_Exception($compiler, 'Foreach item parameter must be of type string'); - } - if (isset($key) && substr($val, 0, 1) !== '"' && substr($val, 0, 1) !== '\'') { - throw new Dwoo_Compilation_Exception($compiler, 'Foreach key parameter must be of type string'); - } - - // evaluates which global variables have to be computed - $varName = '$dwoo.foreach.'.trim($name, '"\'').'.'; - $shortVarName = '$.foreach.'.trim($name, '"\'').'.'; - $usesAny = strpos($tpl, $varName) !== false || strpos($tpl, $shortVarName) !== false; - $usesFirst = strpos($tpl, $varName.'first') !== false || strpos($tpl, $shortVarName.'first') !== false; - $usesLast = strpos($tpl, $varName.'last') !== false || strpos($tpl, $shortVarName.'last') !== false; - $usesIndex = $usesFirst || strpos($tpl, $varName.'index') !== false || strpos($tpl, $shortVarName.'index') !== false; - $usesIteration = $usesLast || strpos($tpl, $varName.'iteration') !== false || strpos($tpl, $shortVarName.'iteration') !== false; - $usesShow = strpos($tpl, $varName.'show') !== false || strpos($tpl, $shortVarName.'show') !== false; - $usesTotal = $usesLast || strpos($tpl, $varName.'total') !== false || strpos($tpl, $shortVarName.'total') !== false; - - if (strpos($name, '$this->scope[') !== false) { - $usesAny = $usesFirst = $usesLast = $usesIndex = $usesIteration = $usesShow = $usesTotal = true; - } - - // override globals vars if implode is used - if ($params['implode'] !== 'null') { - $implode = $params['implode']; - $usesAny = true; - $usesLast = true; - $usesIteration = true; - $usesTotal = true; - } - - // gets foreach id - $cnt = self::$cnt++; - - // build pre content output - $pre = Dwoo_Compiler::PHP_OPEN . "\n".'$_fh'.$cnt.'_data = '.$src.';'; - // adds foreach properties - if ($usesAny) { - $pre .= "\n".'$this->globals["foreach"]['.$name.'] = array'."\n("; - if ($usesIndex) $pre .="\n\t".'"index" => 0,'; - if ($usesIteration) $pre .="\n\t".'"iteration" => 1,'; - if ($usesFirst) $pre .="\n\t".'"first" => null,'; - if ($usesLast) $pre .="\n\t".'"last" => null,'; - if ($usesShow) $pre .="\n\t".'"show" => $this->isArray($_fh'.$cnt.'_data, true),'; - if ($usesTotal) $pre .="\n\t".'"total" => $this->isArray($_fh'.$cnt.'_data) ? count($_fh'.$cnt.'_data) : 0,'; - $pre.="\n);\n".'$_fh'.$cnt.'_glob =& $this->globals["foreach"]['.$name.'];'; - } - // checks if foreach must be looped - $pre .= "\n".'if ($this->isArray($_fh'.$cnt.'_data'.(isset($params['hasElse']) ? ', true' : '').') === true)'."\n{"; - // iterates over keys - $pre .= "\n\t".'foreach ($_fh'.$cnt.'_data as '.(isset($key)?'$this->scope['.$key.']=>':'').'$this->scope['.$val.'])'."\n\t{"; - // updates properties - if ($usesFirst) { - $pre .= "\n\t\t".'$_fh'.$cnt.'_glob["first"] = (string) ($_fh'.$cnt.'_glob["index"] === 0);'; - } - if ($usesLast) { - $pre .= "\n\t\t".'$_fh'.$cnt.'_glob["last"] = (string) ($_fh'.$cnt.'_glob["iteration"] === $_fh'.$cnt.'_glob["total"]);'; - } - $pre .= "\n/* -- foreach start output */\n".Dwoo_Compiler::PHP_CLOSE; - - // build post content output - $post = Dwoo_Compiler::PHP_OPEN . "\n"; - - if (isset($implode)) { - $post .= '/* -- implode */'."\n".'if (!$_fh'.$cnt.'_glob["last"]) {'. - "\n\t".'echo '.$implode.";\n}\n"; - } - $post .= '/* -- foreach end output */'; - // update properties - if ($usesIndex) { - $post.="\n\t\t".'$_fh'.$cnt.'_glob["index"]+=1;'; - } - if ($usesIteration) { - $post.="\n\t\t".'$_fh'.$cnt.'_glob["iteration"]+=1;'; - } - // end loop - $post .= "\n\t}\n}".Dwoo_Compiler::PHP_CLOSE; - if (isset($params['hasElse'])) { - $post .= $params['hasElse']; - } - - return $pre . $content . $post; - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/foreachelse.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/foreachelse.php deleted file mode 100644 index b8792e9..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/foreachelse.php +++ /dev/null @@ -1,43 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Plugin_foreachelse extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block -{ - public function init() - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - $with =& $compiler->findBlock('foreach', true); - - $params['initialized'] = true; - $compiler->injectBlock($type, $params); - - return ''; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - if (!isset($params['initialized'])) { - return ''; - } - - $block =& $compiler->getCurrentBlock(); - $block['params']['hasElse'] = Dwoo_Compiler::PHP_OPEN."else {\n".Dwoo_Compiler::PHP_CLOSE . $content . Dwoo_Compiler::PHP_OPEN."\n}".Dwoo_Compiler::PHP_CLOSE; - return ''; - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/forelse.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/forelse.php deleted file mode 100644 index 96db9c7..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/forelse.php +++ /dev/null @@ -1,43 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Plugin_forelse extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block -{ - public function init() - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - $with =& $compiler->findBlock('for', true); - - $params['initialized'] = true; - $compiler->injectBlock($type, $params); - - return ''; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - if (!isset($params['initialized'])) { - return ''; - } - - $block =& $compiler->getCurrentBlock(); - $block['params']['hasElse'] = Dwoo_Compiler::PHP_OPEN."else {\n".Dwoo_Compiler::PHP_CLOSE . $content . Dwoo_Compiler::PHP_OPEN."\n}".Dwoo_Compiler::PHP_CLOSE; - return ''; - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/if.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/if.php deleted file mode 100644 index 7587c3a..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/if.php +++ /dev/null @@ -1,180 +0,0 @@ - == - * neq or ne -> != - * gte or ge -> >= - * lte or le -> <= - * gt -> > - * lt -> < - * mod -> % - * not -> ! - * X is [not] div by Y -> (X % Y) == 0 - * X is [not] even [by Y] -> (X % 2) == 0 or ((X/Y) % 2) == 0 - * X is [not] odd [by Y] -> (X % 2) != 0 or ((X/Y) % 2) != 0 - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Plugin_if extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block, Dwoo_IElseable -{ - public function init(array $rest) - { - } - - public static function replaceKeywords(array $params, Dwoo_Compiler $compiler) - { - $p = array(); - - reset($params); - while (list($k,$v) = each($params)) { - $v = (string) $v; - if(substr($v, 0, 1) === '"' || substr($v, 0, 1) === '\'') { - $vmod = strtolower(substr($v, 1, -1)); - } else { - $vmod = strtolower($v); - } - switch($vmod) { - - case 'and': - $p[] = '&&'; - break; - case 'or': - $p[] = '||'; - break; - case '==': - case 'eq': - $p[] = '=='; - break; - case '<>': - case '!=': - case 'ne': - case 'neq': - $p[] = '!='; - break; - case '>=': - case 'gte': - case 'ge': - $p[] = '>='; - break; - case '<=': - case 'lte': - case 'le': - $p[] = '<='; - break; - case '>': - case 'gt': - $p[] = '>'; - break; - case '<': - case 'lt': - $p[] = '<'; - break; - case '===': - $p[] = '==='; - break; - case '!==': - $p[] = '!=='; - break; - case 'is': - if (isset($params[$k+1]) && strtolower(trim($params[$k+1], '"\'')) === 'not') { - $negate = true; - next($params); - } else { - $negate = false; - } - $ptr = 1+(int)$negate; - if (!isset($params[$k+$ptr])) { - $params[$k+$ptr] = ''; - } else { - $params[$k+$ptr] = trim($params[$k+$ptr], '"\''); - } - switch($params[$k+$ptr]) { - - case 'div': - if (isset($params[$k+$ptr+1]) && strtolower(trim($params[$k+$ptr+1], '"\'')) === 'by') { - $p[] = ' % '.$params[$k+$ptr+2].' '.($negate?'!':'=').'== 0'; - next($params); - next($params); - next($params); - } else { - throw new Dwoo_Compilation_Exception($compiler, 'If : Syntax error : syntax should be "if $a is [not] div by $b", found '.$params[$k-1].' is '.($negate?'not ':'').'div '.$params[$k+$ptr+1].' '.$params[$k+$ptr+2]); - } - break; - case 'even': - $a = array_pop($p); - if (isset($params[$k+$ptr+1]) && strtolower(trim($params[$k+$ptr+1], '"\'')) === 'by') { - $b = $params[$k+$ptr+2]; - $p[] = '('.$a .' / '.$b.') % 2 '.($negate?'!':'=').'== 0'; - next($params); - next($params); - } else { - $p[] = $a.' % 2 '.($negate?'!':'=').'== 0'; - } - next($params); - break; - case 'odd': - $a = array_pop($p); - if (isset($params[$k+$ptr+1]) && strtolower(trim($params[$k+$ptr+1], '"\'')) === 'by') { - $b = $params[$k+$ptr+2]; - $p[] = '('.$a .' / '.$b.') % 2 '.($negate?'=':'!').'== 0'; - next($params); - next($params); - } else { - $p[] = $a.' % 2 '.($negate?'=':'!').'== 0'; - } - next($params); - break; - default: - throw new Dwoo_Compilation_Exception($compiler, 'If : Syntax error : syntax should be "if $a is [not] (div|even|odd) [by $b]", found '.$params[$k-1].' is '.$params[$k+$ptr+1]); - - } - break; - case '%': - case 'mod': - $p[] = '%'; - break; - case '!': - case 'not': - $p[] = '!'; - break; - default: - $p[] = $v; - - } - } - - return $p; - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - return ''; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - $params = $compiler->getCompiledParams($params); - - $pre = Dwoo_Compiler::PHP_OPEN.'if ('.implode(' ', self::replaceKeywords($params['*'], $compiler)).") {\n".Dwoo_Compiler::PHP_CLOSE; - - $post = Dwoo_Compiler::PHP_OPEN."\n}".Dwoo_Compiler::PHP_CLOSE; - - if (isset($params['hasElse'])) { - $post .= $params['hasElse']; - } - - return $pre . $content . $post; - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/loop.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/loop.php deleted file mode 100644 index 651f722..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/loop.php +++ /dev/null @@ -1,128 +0,0 @@ - - * * from : the array that you want to iterate over - * * name : loop name to access it's iterator variables through {$.loop.name.var} see {@link http://wiki.dwoo.org/index.php/IteratorVariables} for details - * - * Example : - * - * instead of a foreach block such as : - * - * - * {foreach $variable value} - * {$value.foo} {$value.bar} - * {/foreach} - * - * - * you can do : - * - * - * {loop $variable} - * {$foo} {$bar} - * {/loop} - * - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.1.0 - * @date 2009-07-18 - * @package Dwoo - */ -class Dwoo_Plugin_loop extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block, Dwoo_IElseable -{ - public static $cnt=0; - - public function init($from, $name='default') - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - // get block params and save the current template pointer to use it in the postProcessing method - $currentBlock =& $compiler->getCurrentBlock(); - $currentBlock['params']['tplPointer'] = $compiler->getPointer(); - - return ''; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - $params = $compiler->getCompiledParams($params); - $tpl = $compiler->getTemplateSource($params['tplPointer']); - - // assigns params - $src = $params['from']; - $name = $params['name']; - - // evaluates which global variables have to be computed - $varName = '$dwoo.loop.'.trim($name, '"\'').'.'; - $shortVarName = '$.loop.'.trim($name, '"\'').'.'; - $usesAny = strpos($tpl, $varName) !== false || strpos($tpl, $shortVarName) !== false; - $usesFirst = strpos($tpl, $varName.'first') !== false || strpos($tpl, $shortVarName.'first') !== false; - $usesLast = strpos($tpl, $varName.'last') !== false || strpos($tpl, $shortVarName.'last') !== false; - $usesIndex = $usesFirst || strpos($tpl, $varName.'index') !== false || strpos($tpl, $shortVarName.'index') !== false; - $usesIteration = $usesLast || strpos($tpl, $varName.'iteration') !== false || strpos($tpl, $shortVarName.'iteration') !== false; - $usesShow = strpos($tpl, $varName.'show') !== false || strpos($tpl, $shortVarName.'show') !== false; - $usesTotal = $usesLast || strpos($tpl, $varName.'total') !== false || strpos($tpl, $shortVarName.'total') !== false; - - if (strpos($name, '$this->scope[') !== false) { - $usesAny = $usesFirst = $usesLast = $usesIndex = $usesIteration = $usesShow = $usesTotal = true; - } - - // gets foreach id - $cnt = self::$cnt++; - - // builds pre processing output - $pre = Dwoo_Compiler::PHP_OPEN . "\n".'$_loop'.$cnt.'_data = '.$src.';'; - // adds foreach properties - if ($usesAny) { - $pre .= "\n".'$this->globals["loop"]['.$name.'] = array'."\n("; - if ($usesIndex) $pre .="\n\t".'"index" => 0,'; - if ($usesIteration) $pre .="\n\t".'"iteration" => 1,'; - if ($usesFirst) $pre .="\n\t".'"first" => null,'; - if ($usesLast) $pre .="\n\t".'"last" => null,'; - if ($usesShow) $pre .="\n\t".'"show" => $this->isArray($_loop'.$cnt.'_data, true),'; - if ($usesTotal) $pre .="\n\t".'"total" => $this->isArray($_loop'.$cnt.'_data) ? count($_loop'.$cnt.'_data) : 0,'; - $pre.="\n);\n".'$_loop'.$cnt.'_glob =& $this->globals["loop"]['.$name.'];'; - } - // checks if the loop must be looped - $pre .= "\n".'if ($this->isArray($_loop'.$cnt.'_data'.(isset($params['hasElse']) ? ', true' : '').') === true)'."\n{"; - // iterates over keys - $pre .= "\n\t".'foreach ($_loop'.$cnt.'_data as $tmp_key => $this->scope["-loop-"])'."\n\t{"; - // updates properties - if ($usesFirst) { - $pre .= "\n\t\t".'$_loop'.$cnt.'_glob["first"] = (string) ($_loop'.$cnt.'_glob["index"] === 0);'; - } - if ($usesLast) { - $pre .= "\n\t\t".'$_loop'.$cnt.'_glob["last"] = (string) ($_loop'.$cnt.'_glob["iteration"] === $_loop'.$cnt.'_glob["total"]);'; - } - $pre .= "\n\t\t".'$_loop'.$cnt.'_scope = $this->setScope(array("-loop-"));' . "\n/* -- loop start output */\n".Dwoo_Compiler::PHP_CLOSE; - - // build post processing output and cache it - $post = Dwoo_Compiler::PHP_OPEN . "\n".'/* -- loop end output */'."\n\t\t".'$this->setScope($_loop'.$cnt.'_scope, true);'; - // update properties - if ($usesIndex) { - $post.="\n\t\t".'$_loop'.$cnt.'_glob["index"]+=1;'; - } - if ($usesIteration) { - $post.="\n\t\t".'$_loop'.$cnt.'_glob["iteration"]+=1;'; - } - // end loop - $post .= "\n\t}\n}\n" . Dwoo_Compiler::PHP_CLOSE; - if (isset($params['hasElse'])) { - $post .= $params['hasElse']; - } - - return $pre . $content . $post; - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/section.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/section.php deleted file mode 100644 index a1cda0d..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/section.php +++ /dev/null @@ -1,131 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Plugin_section extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block, Dwoo_IElseable -{ - public static $cnt=0; - - public function init($name, $loop, $start = null, $step = null, $max = null, $show = true) - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - return ''; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - $output = Dwoo_Compiler::PHP_OPEN; - $params = $compiler->getCompiledParams($params); - - // assigns params - $loop = $params['loop']; - $start = $params['start']; - $max = $params['max']; - $name = $params['name']; - $step = $params['step']; - $show = $params['show']; - - // gets unique id - $cnt = self::$cnt++; - - $output .= '$this->globals[\'section\']['.$name.'] = array();'."\n". - '$_section'.$cnt.' =& $this->globals[\'section\']['.$name.'];'."\n"; - - if ($loop !== 'null') { - $output .= '$_section'.$cnt.'[\'loop\'] = is_array($tmp = '.$loop.') ? count($tmp) : max(0, (int) $tmp);'."\n"; - } else { - $output .= '$_section'.$cnt.'[\'loop\'] = 1;'."\n"; - } - - if ($show !== 'null') { - $output .= '$_section'.$cnt.'[\'show\'] = '.$show.";\n"; - } else { - $output .= '$_section'.$cnt.'[\'show\'] = true;'."\n"; - } - - if ($name !== 'null') { - $output .= '$_section'.$cnt.'[\'name\'] = '.$name.";\n"; - } else { - $output .= '$_section'.$cnt.'[\'name\'] = true;'."\n"; - } - - if ($max !== 'null') { - $output .= '$_section'.$cnt.'[\'max\'] = (int)'.$max.";\n". - 'if($_section'.$cnt.'[\'max\'] < 0) { $_section'.$cnt.'[\'max\'] = $_section'.$cnt.'[\'loop\']; }'."\n"; - } else { - $output .= '$_section'.$cnt.'[\'max\'] = $_section'.$cnt.'[\'loop\'];'."\n"; - } - - if ($step !== 'null') { - $output .= '$_section'.$cnt.'[\'step\'] = (int)'.$step.' == 0 ? 1 : (int) '.$step.";\n"; - } else { - $output .= '$_section'.$cnt.'[\'step\'] = 1;'."\n"; - } - - if ($start !== 'null') { - $output .= '$_section'.$cnt.'[\'start\'] = (int)'.$start.";\n"; - } else { - $output .= '$_section'.$cnt.'[\'start\'] = $_section'.$cnt.'[\'step\'] > 0 ? 0 : $_section'.$cnt.'[\'loop\'] - 1;'."\n". - 'if ($_section'.$cnt.'[\'start\'] < 0) { $_section'.$cnt.'[\'start\'] = max($_section'.$cnt.'[\'step\'] > 0 ? 0 : -1, $_section'.$cnt.'[\'loop\'] + $_section'.$cnt.'[\'start\']); } '."\n". - 'else { $_section'.$cnt.'[\'start\'] = min($_section'.$cnt.'[\'start\'], $_section'.$cnt.'[\'step\'] > 0 ? $_section'.$cnt.'[\'loop\'] : $_section'.$cnt.'[\'loop\'] -1); }'."\n"; - } - -/* if ($usesAny) { - $output .= "\n".'$this->globals["section"]['.$name.'] = array'."\n("; - if ($usesIndex) $output .="\n\t".'"index" => 0,'; - if ($usesIteration) $output .="\n\t".'"iteration" => 1,'; - if ($usesFirst) $output .="\n\t".'"first" => null,'; - if ($usesLast) $output .="\n\t".'"last" => null,'; - if ($usesShow) $output .="\n\t".'"show" => ($this->isArray($_for'.$cnt.'_from, true)) || (is_numeric($_for'.$cnt.'_from) && $_for'.$cnt.'_from != $_for'.$cnt.'_to),'; - if ($usesTotal) $output .="\n\t".'"total" => $this->isArray($_for'.$cnt.'_from) ? count($_for'.$cnt.'_from) - $_for'.$cnt.'_skip : (is_numeric($_for'.$cnt.'_from) ? abs(($_for'.$cnt.'_to + 1 - $_for'.$cnt.'_from)/$_for'.$cnt.'_step) : 0),'; - $out.="\n);\n".'$_section'.$cnt.'[\'glob\'] =& $this->globals["section"]['.$name.'];'."\n\n"; - } -*/ - - $output .= 'if ($_section'.$cnt.'[\'show\']) {'."\n"; - if ($start === 'null' && $step === 'null' && $max === 'null') { - $output .= ' $_section'.$cnt.'[\'total\'] = $_section'.$cnt.'[\'loop\'];'."\n"; - } else { - $output .= ' $_section'.$cnt.'[\'total\'] = min(ceil(($_section'.$cnt.'[\'step\'] > 0 ? $_section'.$cnt.'[\'loop\'] - $_section'.$cnt.'[\'start\'] : $_section'.$cnt.'[\'start\'] + 1) / abs($_section'.$cnt.'[\'step\'])), $_section'.$cnt.'[\'max\']);'."\n"; - } - $output .= ' if ($_section'.$cnt.'[\'total\'] == 0) {'."\n". - ' $_section'.$cnt.'[\'show\'] = false;'."\n". - ' }'."\n". - '} else {'."\n". - ' $_section'.$cnt.'[\'total\'] = 0;'."\n}\n"; - $output .= 'if ($_section'.$cnt.'[\'show\']) {'."\n"; - $output .= "\t".'for ($this->scope['.$name.'] = $_section'.$cnt.'[\'start\'], $_section'.$cnt.'[\'iteration\'] = 1; '. - '$_section'.$cnt.'[\'iteration\'] <= $_section'.$cnt.'[\'total\']; '. - '$this->scope['.$name.'] += $_section'.$cnt.'[\'step\'], $_section'.$cnt.'[\'iteration\']++) {'."\n"; - $output .= "\t\t".'$_section'.$cnt.'[\'rownum\'] = $_section'.$cnt.'[\'iteration\'];'."\n"; - $output .= "\t\t".'$_section'.$cnt.'[\'index_prev\'] = $this->scope['.$name.'] - $_section'.$cnt.'[\'step\'];'."\n"; - $output .= "\t\t".'$_section'.$cnt.'[\'index_next\'] = $this->scope['.$name.'] + $_section'.$cnt.'[\'step\'];'."\n"; - $output .= "\t\t".'$_section'.$cnt.'[\'first\'] = ($_section'.$cnt.'[\'iteration\'] == 1);'."\n"; - $output .= "\t\t".'$_section'.$cnt.'[\'last\'] = ($_section'.$cnt.'[\'iteration\'] == $_section'.$cnt.'[\'total\']);'."\n"; - - $output .= Dwoo_Compiler::PHP_CLOSE . $content . Dwoo_Compiler::PHP_OPEN; - - $output .= "\n\t}\n} " . Dwoo_Compiler::PHP_CLOSE; - - if (isset($params['hasElse'])) { - $output .= $params['hasElse']; - } - - return $output; - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/smartyinterface.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/smartyinterface.php deleted file mode 100644 index dffe6a9..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/smartyinterface.php +++ /dev/null @@ -1,59 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Plugin_smartyinterface extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block -{ - public function init($__funcname, $__functype, array $rest=array()) {} - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - $params = $compiler->getCompiledParams($params); - $func = $params['__funcname']; - $pluginType = $params['__functype']; - $params = $params['*']; - - if ($pluginType & Dwoo::CUSTOM_PLUGIN) { - $customPlugins = $compiler->getDwoo()->getCustomPlugins(); - $callback = $customPlugins[$func]['callback']; - if (is_array($callback)) { - if (is_object($callback[0])) { - $callback = '$this->customPlugins[\''.$func.'\'][0]->'.$callback[1].'('; - } else { - $callback = ''.$callback[0].'::'.$callback[1].'('; - } - } else { - $callback = $callback.'('; - } - } else { - $callback = 'smarty_block_'.$func.'('; - } - - $paramsOut = ''; - foreach ($params as $i=>$p) { - $paramsOut .= var_export($i, true).' => '.$p.','; - } - - $curBlock =& $compiler->getCurrentBlock(); - $curBlock['params']['postOut'] = Dwoo_Compiler::PHP_OPEN.' $_block_content = ob_get_clean(); $_block_repeat=false; echo '.$callback.'$_tag_stack[count($_tag_stack)-1], $_block_content, $this, $_block_repeat); } array_pop($_tag_stack);'.Dwoo_Compiler::PHP_CLOSE; - - return Dwoo_Compiler::PHP_OPEN.$prepend.' if (!isset($_tag_stack)){ $_tag_stack = array(); } $_tag_stack[] = array('.$paramsOut.'); $_block_repeat=true; '.$callback.'$_tag_stack[count($_tag_stack)-1], null, $this, $_block_repeat); while ($_block_repeat) { ob_start();'.Dwoo_Compiler::PHP_CLOSE; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - return $content . $params['postOut']; - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/strip.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/strip.php deleted file mode 100644 index 2c983db..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/strip.php +++ /dev/null @@ -1,50 +0,0 @@ - - * * mode : sets the content being stripped, available mode are 'default' or 'js' - * for javascript, which strips the comments to prevent syntax errors - * - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.1.0 - * @date 2009-07-18 - * @package Dwoo - */ -class Dwoo_Plugin_strip extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block -{ - public function init($mode = "default") - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - return ''; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - $params = $compiler->getCompiledParams($params); - - $mode = trim($params['mode'], '"\''); - switch ($mode) { - case 'js': - case 'javascript': - $content = preg_replace('#(? - * * name : template name - * * rest : list of arguments and optional default values - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.1.0 - * @date 2009-07-18 - * @package Dwoo - */ -class Dwoo_Plugin_template extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block -{ - public function init($name, array $rest = array()) - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - $params = $compiler->getCompiledParams($params); - $parsedParams = array(); - if (!isset($params['*'])) - $params['*'] = array(); - foreach ($params['*'] as $param=>$defValue) { - if (is_numeric($param)) { - $param = $defValue; - $defValue = null; - } - $param = trim($param, '\'"'); - if (!preg_match('#^[a-z0-9_]+$#i', $param)) { - throw new Dwoo_Compilation_Exception($compiler, 'Function : parameter names must contain only A-Z, 0-9 or _'); - } - $parsedParams[$param] = $defValue; - } - $params['name'] = substr($params['name'], 1, -1); - $params['*'] = $parsedParams; - $params['uuid'] = uniqid(); - $compiler->addTemplatePlugin($params['name'], $parsedParams, $params['uuid']); - $currentBlock =& $compiler->getCurrentBlock(); - $currentBlock['params'] = $params; - return ''; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - $paramstr = 'Dwoo $dwoo'; - $init = 'static $_callCnt = 0;'."\n". - '$dwoo->scope[\' '.$params['uuid'].'\'.$_callCnt] = array();'."\n". - '$_scope = $dwoo->setScope(array(\' '.$params['uuid'].'\'.($_callCnt++)));'."\n"; - $cleanup = '/* -- template end output */ $dwoo->setScope($_scope, true);'; - foreach ($params['*'] as $param=>$defValue) { - if ($defValue === null) { - $paramstr.=', $'.$param; - } else { - $paramstr.=', $'.$param.' = '.$defValue; - } - $init .= '$dwoo->scope[\''.$param.'\'] = $'.$param.";\n"; - } - $init .= '/* -- template start output */'; - - $funcName = 'Dwoo_Plugin_'.$params['name'].'_'.$params['uuid']; - - $search = array( - '$this->charset', - '$this->', - '$this,', - ); - $replacement = array( - '$dwoo->getCharset()', - '$dwoo->', - '$dwoo,', - ); - $content = str_replace($search, $replacement, $content); - - $body = 'if (!function_exists(\''.$funcName."')) {\nfunction ".$funcName.'('.$paramstr.') {'."\n$init".Dwoo_Compiler::PHP_CLOSE. - $prepend.$content.$append. - Dwoo_Compiler::PHP_OPEN.$cleanup."\n}\n}"; - $compiler->addTemplatePlugin($params['name'], $params['*'], $params['uuid'], $body); - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/textformat.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/textformat.php deleted file mode 100644 index da18033..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/textformat.php +++ /dev/null @@ -1,94 +0,0 @@ - - * * wrap : maximum line length - * * wrap_char : the character(s) to use to break the line - * * wrap_cut : if true, the words that are longer than $wrap are cut instead of overflowing - * * indent : amount of $indent_char to insert before every line - * * indent_char : character(s) to insert before every line - * * indent_first : amount of additional $indent_char to insert before the first line of each paragraphs - * * style : some predefined formatting styles that set up every required variables, can be "email" or "html" - * * assign : if set, the formatted text is assigned to that variable instead of being output - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Plugin_textformat extends Dwoo_Block_Plugin -{ - protected $wrap; - protected $wrapChar; - protected $wrapCut; - protected $indent; - protected $indChar; - protected $indFirst; - protected $assign; - - public function init($wrap=80, $wrap_char="\r\n", $wrap_cut=false, $indent=0, $indent_char=" ", $indent_first=0, $style="", $assign="") - { - if ($indent_char === 'tab') { - $indent_char = "\t"; - } - - switch($style) { - - case 'email': - $wrap = 72; - $indent_first = 0; - break; - case 'html': - $wrap_char = '
        '; - $indent_char = $indent_char == "\t" ? '    ':' '; - break; - - } - - $this->wrap = (int) $wrap; - $this->wrapChar = (string) $wrap_char; - $this->wrapCut = (bool) $wrap_cut; - $this->indent = (int) $indent; - $this->indChar = (string) $indent_char; - $this->indFirst = (int) $indent_first + $this->indent; - $this->assign = (string) $assign; - } - - public function process() - { - // gets paragraphs - $pgs = explode("\n", str_replace(array("\r\n", "\r"), "\n", $this->buffer)); - - while (list($i,) = each($pgs)) { - if (empty($pgs[$i])) { - continue; - } - - // removes line breaks and extensive white space - $pgs[$i] = preg_replace(array('#\s+#', '#^\s*(.+?)\s*$#m'), array(' ', '$1'), str_replace("\n", '', $pgs[$i])); - - // wordwraps + indents lines - $pgs[$i] = str_repeat($this->indChar, $this->indFirst) . - wordwrap( - $pgs[$i], - max($this->wrap - $this->indent, 1), - $this->wrapChar . str_repeat($this->indChar, $this->indent), - $this->wrapCut - ); - } - - if ($this->assign !== '') { - $this->dwoo->assignInScope(implode($this->wrapChar . $this->wrapChar, $pgs), $this->assign); - } else { - return implode($this->wrapChar . $this->wrapChar, $pgs); - } - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/topLevelBlock.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/topLevelBlock.php deleted file mode 100644 index 3d923ee..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/topLevelBlock.php +++ /dev/null @@ -1,32 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -final class Dwoo_Plugin_topLevelBlock extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block -{ - public function init() - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - return '/* end template head */ ob_start(); /* template body */ '.Dwoo_Compiler::PHP_CLOSE; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - return $content . Dwoo_Compiler::PHP_OPEN.' /* end template body */'."\n".'return $this->buffer . ob_get_clean();'; - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/with.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/with.php deleted file mode 100644 index e210089..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/with.php +++ /dev/null @@ -1,76 +0,0 @@ - - * * var : the variable name to move into - * - * Example : - * - * instead of the following : - * - * - * {if $long.boring.prefix} - * {$long.boring.prefix.val} - {$long.boring.prefix.secondVal} - {$long.boring.prefix.thirdVal} - * {/if} - * - * - * you can use : - * - * - * {with $long.boring.prefix} - * {$val} - {$secondVal} - {$thirdVal} - * {/with} - * - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from the use of this software. - * - * @author Jordi Boggiano - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Plugin_with extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block, Dwoo_IElseable -{ - protected static $cnt=0; - - public function init($var) - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - return ''; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - $rparams = $compiler->getRealParams($params); - $cparams = $compiler->getCompiledParams($params); - - $compiler->setScope($rparams['var']); - - - $pre = Dwoo_Compiler::PHP_OPEN. 'if ('.$cparams['var'].')'."\n{\n". - '$_with'.(self::$cnt).' = $this->setScope("'.$rparams['var'].'");'. - "\n/* -- start with output */\n".Dwoo_Compiler::PHP_CLOSE; - - $post = Dwoo_Compiler::PHP_OPEN. "\n/* -- end with output */\n". - '$this->setScope($_with'.(self::$cnt++).', true);'. - "\n}\n".Dwoo_Compiler::PHP_CLOSE; - - if (isset($params['hasElse'])) { - $post .= $params['hasElse']; - } - - return $pre . $content . $post; - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/blocks/withelse.php b/_piecrust/libs/Dwoo/plugins/builtin/blocks/withelse.php deleted file mode 100644 index 8d4684d..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/blocks/withelse.php +++ /dev/null @@ -1,43 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Plugin_withelse extends Dwoo_Block_Plugin implements Dwoo_ICompilable_Block -{ - public function init() - { - } - - public static function preProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $type) - { - $with =& $compiler->findBlock('with', true); - - $params['initialized'] = true; - $compiler->injectBlock($type, $params); - - return ''; - } - - public static function postProcessing(Dwoo_Compiler $compiler, array $params, $prepend, $append, $content) - { - if (!isset($params['initialized'])) { - return ''; - } - - $block =& $compiler->getCurrentBlock(); - $block['params']['hasElse'] = Dwoo_Compiler::PHP_OPEN."else {\n".Dwoo_Compiler::PHP_CLOSE . $content . Dwoo_Compiler::PHP_OPEN."\n}".Dwoo_Compiler::PHP_CLOSE; - return ''; - } -} diff --git a/_piecrust/libs/Dwoo/plugins/builtin/filters/html_format.php b/_piecrust/libs/Dwoo/plugins/builtin/filters/html_format.php deleted file mode 100644 index 59530c5..0000000 --- a/_piecrust/libs/Dwoo/plugins/builtin/filters/html_format.php +++ /dev/null @@ -1,175 +0,0 @@ - - * @copyright Copyright (c) 2008, Jordi Boggiano - * @license http://dwoo.org/LICENSE Modified BSD License - * @link http://dwoo.org/ - * @version 1.0.0 - * @date 2008-10-23 - * @package Dwoo - */ -class Dwoo_Filter_html_format extends Dwoo_Filter -{ - /** - * tab count to auto-indent the source - * - * @var int - */ - protected static $tabCount = -1; - - /** - * stores the additional data (following a tag) of the last call to open/close/singleTag - * - * @var string - */ - protected static $lastCallAdd = ''; - - /** - * formats the input using the singleTag/closeTag/openTag functions - * - * It is auto indenting the whole code, excluding
        -'; - - echo '
        Styles: - - - - - - - - - - - - - - -
        Style for the overall code block:
        Default Styles
        Keywords I (if, do, while etc)
        Keywords II (null, true, false etc)
        Inbuilt Functions (echo, print etc)
        Data Types (int, boolean etc)
        Comments (//, etc)
        Escaped Characters (\n, \t etc)
        Brackets ( ([{}]) etc)
        Strings ("foo" etc)
        Numbers (1, -54, 2.5 etc)
        Methods (Foo.bar() etc)
        '; - - echo ' -'; - - make_footer(); -} -// Step 3 -elseif ( $step == 3 ) -{ - make_header('Step 3'); - echo '

        Here is your completed stylesheet. Note that it may not be perfect - no regular expression styles are included for one thing, -you\'ll have to add those yourself (php and xml are just two languages that use them), and line numbers are not included, however -it includes most of the basic information.

        '; - - // Make the stylesheet - $part_selector_1 = ''; - $part_selector_2 = ''; - $part_selector_3 = ''; - - $langs = get_var('langs'); - $extra_langs = trim(get_var('extra-langs')); - if ( $extra_langs != '' ) - { - $l = explode("\r\n", $extra_langs); - foreach ( $l as $lng ) - { - $langs[$lng] = true; - } - } - - - foreach ( $langs as $lang => $dummy ) - { - $part_selector_1 .= ".$lang {PART}, "; - $part_selector_2 .= ".$lang {PART1}, .$lang {PART2}, "; - $part_selector_3 .= ".$lang {PART1}, .$lang {PART2}, .$lang {PART3}, "; - } - $part_selector_1 = substr($part_selector_1, 0, -2); - $part_selector_2 = substr($part_selector_2, 0, -2); - $part_selector_3 = substr($part_selector_3, 0, -2); - - - $default_styles = get_var('default-styles'); - $ol_selector = str_replace('{PART}', 'ol', $part_selector_1); - $overall_styles = get_var('overall'); - $overall_selector = str_replace('{PART}', '', $part_selector_1); - - $stylesheet = "/* GeSHi (c) Nigel McNie 2004 (http://qbnz.com/highlighter) */"; - - if ( $overall != '' ) - { - $stylesheet .= "\n$overall_selector {{$overall_styles}}"; - } - if ( $default_styles != '' ) - { - $default_selector = str_replace(array('{PART1}', '{PART2}'), array('.de1', '.de2'), $part_selector_2); - $stylesheet .= "\n$default_selector {{$default_styles}}"; - } - - // Do keywords - $keywords_1 = get_var('keywords-1'); - $keyword_selector_1 = str_replace('{PART}', '.kw1', $part_selector_1); - if ( $keywords_1 != '' ) - { - $stylesheet .= "\n$keyword_selector_1 {{$keywords_1}}"; - } - - $keywords_2 = get_var('keywords-2'); - $keyword_selector_2 = str_replace('{PART}', '.kw2', $part_selector_1); - if ( $keywords_2 != '' ) - { - $stylesheet .= "\n$keyword_selector_2 {{$keywords_2}}"; - } - - $keywords_3 = get_var('keywords-3'); - $keyword_selector_3 = str_replace('{PART}', '.kw3', $part_selector_1); - if ( $keywords_3 != '' ) - { - $stylesheet .= "\n$keyword_selector_3 {{$keywords_3}}"; - } - - $keywords_4 = get_var('keywords-4'); - $keyword_selector_4 = str_replace('{PART}', '.kw4', $part_selector_1); - if ( $keywords_4 != '' ) - { - $stylesheet .= "\n$keyword_selector_4 {{$keywords_4}}"; - } - - // Do other lexics - $comments = get_var('comments'); - $comment_selector = str_replace(array('{PART1}', '{PART2}', '{PART3}'), array('.co1', '.co2', '.coMULTI'), $part_selector_3); - if ( $comments != '' ) - { - $stylesheet .= "\n$comment_selector {{$comments}}"; - } - - $esc = get_var('escaped-chars'); - $esc_selector = str_replace('{PART}', '.es0', $part_selector_1); - if ( $esc != '' ) - { - $stylesheet .= "\n$esc_selector {{$esc}}"; - } - - $brackets = get_var('brackets'); - $brk_selector = str_replace('{PART}', '.br0', $part_selector_1); - if ( $brackets != '' ) - { - $stylesheet .= "\n$brk_selector {{$brackets}}"; - } - - $strings = get_var('strings'); - $string_selector = str_replace('{PART}', '.st0', $part_selector_1); - if ( $strings != '' ) - { - $stylesheet .= "\n$string_selector {{$strings}}"; - } - - $numbers = get_var('numbers'); - $num_selector = str_replace('{PART}', '.nu0', $part_selector_1); - if ( $numbers != '' ) - { - $stylesheet .= "\n$num_selector {{$numbers}}"; - } - - $methods = get_var('methods'); - $method_selector = str_replace('{PART}', '.me0', $part_selector_1); - if ( $methods != '' ) - { - $stylesheet .= "\n$method_selector {{$methods}}"; - } - - echo "
        $stylesheet
        "; - - make_footer(); -} - -?> diff --git a/_piecrust/libs/Geshi/contrib/cssgen2.php b/_piecrust/libs/Geshi/contrib/cssgen2.php deleted file mode 100644 index cc3c39c..0000000 --- a/_piecrust/libs/Geshi/contrib/cssgen2.php +++ /dev/null @@ -1,59 +0,0 @@ - geshi.css`. - * - * This file is part of GeSHi. - * - * GeSHi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GeSHi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeSHi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * @package geshi - * @subpackage contrib - * @author revulo - * @copyright 2008 revulo - * @license http://gnu.org/copyleft/gpl.html GNU GPL - * - */ - -require dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'geshi.php'; -$geshi = new GeSHi; - -$languages = array(); -if ($handle = opendir($geshi->language_path)) { - while (($file = readdir($handle)) !== false) { - $pos = strpos($file, '.'); - if ($pos > 0 && substr($file, $pos) == '.php') { - $languages[] = substr($file, 0, $pos); - } - } - closedir($handle); -} -sort($languages); - -header('Content-Type: application/octet-stream'); -header('Content-Disposition: attachment; filename="geshi.css"'); - -echo "/**\n". - " * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann\n" . - " * (http://qbnz.com/highlighter/ and http://geshi.org/)\n". - " */\n"; - -foreach ($languages as $language) { - $geshi->set_language($language); - // note: the false argument is required for stylesheet generators, see API documentation - $css = $geshi->get_stylesheet(false); - echo preg_replace('/^\/\*\*.*?\*\//s', '', $css); -} diff --git a/_piecrust/libs/Geshi/contrib/example.php b/_piecrust/libs/Geshi/contrib/example.php deleted file mode 100644 index 32e6f0c..0000000 --- a/_piecrust/libs/Geshi/contrib/example.php +++ /dev/null @@ -1,217 +0,0 @@ - tag inside the list items (
      24. ) thus producing valid HTML markup. - // HEADER_PRE puts the
         tag around the list (
          ) which is invalid in HTML 4 and XHTML 1 - // HEADER_DIV puts a
          tag arount the list (valid!) but needs to replace whitespaces with   - // thus producing much larger overhead. You can set the tab width though. - $geshi->set_header_type(GESHI_HEADER_PRE_VALID); - - // Enable CSS classes. You can use get_stylesheet() to output a stylesheet for your code. Using - // CSS classes results in much less output source. - $geshi->enable_classes(); - - // Enable line numbers. We want fancy line numbers, and we want every 5th line number to be fancy - $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 5); - - // Set the style for the PRE around the code. The line numbers are contained within this box (not - // XHTML compliant btw, but if you are liberally minded about these things then you'll appreciate - // the reduced source output). - $geshi->set_overall_style('font: normal normal 90% monospace; color: #000066; border: 1px solid #d0d0d0; background-color: #f0f0f0;', false); - - // Set the style for line numbers. In order to get style for line numbers working, the
        1. element - // is being styled. This means that the code on the line will also be styled, and most of the time - // you don't want this. So the set_code_style reverts styles for the line (by using a
          on the line). - // So the source output looks like this: - // - //
            - //
          1. - - - GeSHi examples - - - -

            GeSHi Example Script

            -

            To use this script, make sure that geshi.php is in the parent directory or in your -include_path, and that the language files are in a subdirectory of GeSHi's directory called geshi/.

            -

            Enter your source and a language to highlight the source in and submit, or just choose a language to -have that language file highlighted in PHP.

            -parse_code(); - echo '
            '; -} -?> -
            -

            Source to highlight

            -

            - -

            -

            Choose a language

            -

            - -

            -

            - - -

            -
            - - - diff --git a/_piecrust/libs/Geshi/contrib/langcheck.php b/_piecrust/libs/Geshi/contrib/langcheck.php deleted file mode 100644 index a4ee4f6..0000000 --- a/_piecrust/libs/Geshi/contrib/langcheck.php +++ /dev/null @@ -1,766 +0,0 @@ -'; - $colors = array( - TYPE_NOTICE => '', - TYPE_WARNING => '', - TYPE_ERROR => '', - TYPE_OK => '' - ); - } else { - $end = chr(27).'[0m'; - $colors = array( - TYPE_NOTICE => chr(27).'[1m', - TYPE_WARNING => chr(27).'[1;33m', - TYPE_ERROR => chr(27).'[1;31m', - TYPE_OK => chr(27).'[1;32m' - ); - } - } - - if ( !isset($colors[$level]) ) { - trigger_error("no colors for level $level", E_USER_ERROR); - } - - return $colors[$level].$string.$end; -} - -define ('TYPE_NOTICE', 0); -define ('TYPE_WARNING', 1); -define ('TYPE_ERROR', 2); -define ('TYPE_OK', 3); - -$error_abort = false; -$error_cache = array(); -function output_error_cache(){ - global $error_cache, $error_abort; - - if(count($error_cache)) { - echo colorize(TYPE_ERROR, "Failed"); - if ( PHP_SAPI == 'cli' ) { - echo "\n\n"; - } else { - echo "
              \n"; - } - foreach($error_cache as $error_msg) { - if ( PHP_SAPI == 'cli' ) { - echo "\n"; - } else { - echo "
            1. "; - } - switch($error_msg['t']) { - case TYPE_NOTICE: - $msg = 'NOTICE'; - break; - case TYPE_WARNING: - $msg = 'WARNING'; - break; - case TYPE_ERROR: - $msg = 'ERROR'; - break; - } - echo colorize($error_msg['t'], $msg); - if ( PHP_SAPI == 'cli' ) { - echo "\t" . $error_msg['m']; - } else { - echo " " . $error_msg['m'] . "
            2. "; - } - } - if ( PHP_SAPI == 'cli' ) { - echo "\n"; - } else { - echo "
            \n"; - } - } else { - echo colorize(TYPE_OK, "OK"); - if ( PHP_SAPI == 'cli' ) { - echo "\n"; - } else { - echo "\n
            "; - } - } - echo "\n"; - - $error_cache = array(); -} - -function report_error($type, $message) { - global $error_cache, $error_abort; - - $error_cache[] = array('t' => $type, 'm' => $message); - if(TYPE_ERROR == $type) { - $error_abort = true; - } -} - -function dupfind_strtolower(&$value){ - $value = strtolower($value); -} - -if ( PHP_SAPI != 'cli' ) { ?> - - - - GeSHi Language File Validation Script - - - -

            GeSHi Language File Validation Script

            -

            To use this script, make sure that geshi.php is in the -parent directory or in your include_path, and that the language files are in a -subdirectory of GeSHi's directory called geshi/.

            -

            Everything else will be done by this script automatically. After the script -finished you should see messages of what could cause trouble with GeSHi or where -your language files can be improved. Please be patient, as this might take some time.

            - -
              -
            1. Checking where to find GeSHi installation ... - - - -To use this script, make sure that is in the -parent directory or in your include_path, and that the language files are in a -subdirectory of GeSHi's directory called . - -Everything else will be done by this script automatically. After the script -finished you should see messages of what could cause trouble with GeSHi or where -your language files can be improved. Please be patient, as this might take some time. - - -Checking where to find GeSHi installation ...\n
            2. Listing available language files ... "; - } - - if (!($dir = @opendir(GESHI_LANG_ROOT))) { - report_error(TYPE_ERROR, 'Error requesting listing for available language files!'); - } - - $languages = array(); - - if(!$error_abort) { - while ($file = readdir($dir)) { - if (!$file || $file[0] == '.' || strpos($file, '.') === false) { - continue; - } - $lang = substr($file, 0, strpos($file, '.')); - $languages[] = $lang; - } - closedir($dir); - } - - $languages = array_unique($languages); - sort($languages); - - if(!count($languages)) { - report_error(TYPE_WARNING, 'Unable to locate any usable language files in "'.GESHI_LANG_ROOT.'"!'); - } - - output_error_cache(); -} - -if ( PHP_SAPI == 'cli' ) { - if (isset($_SERVER['argv'][1]) && in_array($_SERVER['argv'][1], $languages)) { - $languages = array($_SERVER['argv'][1]); - } -} else { - if (isset($_REQUEST['show']) && in_array($_REQUEST['show'], $languages)) { - $languages = array($_REQUEST['show']); - } -} - -if(!$error_abort) { - foreach ($languages as $lang) { - - if ( PHP_SAPI == 'cli' ) { - echo "Validating language file for '$lang' ...\t\t"; - } else { - echo "
            3. \n
            4. Validating language file for '$lang' ... "; - } - - $langfile = GESHI_LANG_ROOT . $lang . '.php'; - - $language_data = array(); - - if(!is_file($langfile)) { - report_error(TYPE_ERROR, 'The path "' .$langfile. '" does not ressemble a regular file!'); - } else if(!is_readable($langfile)) { - report_error(TYPE_ERROR, 'Cannot read file "' .$langfile. '"!'); - } else { - $langfile_content = file_get_contents($langfile); - if(preg_match("/\?>(?:\r?\n|\r(?!\n)){2,}\Z/", $langfile_content)) { - report_error(TYPE_ERROR, 'Language file contains trailing empty lines at EOF!'); - } - if(!preg_match("/\?>(?:\r?\n|\r(?!\n))?\Z/", $langfile_content)) { - report_error(TYPE_ERROR, 'Language file contains no PHP end marker at EOF!'); - } - if(preg_match("/\t/", $langfile_content)) { - report_error(TYPE_NOTICE, 'Language file contains unescaped tabulator chars (probably for indentation)!'); - } - if(preg_match('/^(?: )*(?! )(?! \*) /m', $langfile_content)) { - report_error(TYPE_NOTICE, 'Language file contains irregular indentation (other than 4 spaces per indentation level)!'); - } - - if(!preg_match("/\/\*\*((?!\*\/).)*?Author:((?!\*\/).)*?\*\//s", $langfile_content)) { - report_error(TYPE_WARNING, 'Language file does not contain a specification of an author!'); - } - if(!preg_match("/\/\*\*((?!\*\/).)*?Copyright:((?!\*\/).)*?\*\//s", $langfile_content)) { - report_error(TYPE_WARNING, 'Language file does not contain a specification of the copyright!'); - } - if(!preg_match("/\/\*\*((?!\*\/).)*?Release Version:((?!\*\/).)*?\*\//s", $langfile_content)) { - report_error(TYPE_WARNING, 'Language file does not contain a specification of the release version!'); - } - if(!preg_match("/\/\*\*((?!\*\/).)*?Date Started:((?!\*\/).)*?\*\//s", $langfile_content)) { - report_error(TYPE_WARNING, 'Language file does not contain a specification of the date it was started!'); - } - if(!preg_match("/\/\*\*((?!\*\/).)*?This file is part of GeSHi\.((?!\*\/).)*?\*\//s", $langfile_content)) { - report_error(TYPE_WARNING, 'Language file does not state that it belongs to GeSHi!'); - } - if(!preg_match("/\/\*\*((?!\*\/).)*?language file for GeSHi\.((?!\*\/).)*?\*\//s", $langfile_content)) { - report_error(TYPE_WARNING, 'Language file does not state that it is a language file for GeSHi!'); - } - if(!preg_match("/\/\*\*((?!\*\/).)*?GNU General Public License((?!\*\/).)*?\*\//s", $langfile_content)) { - report_error(TYPE_WARNING, 'Language file does not state that it is provided under the terms of the GNU GPL!'); - } - - unset($langfile_content); - - include $langfile; - - if(!isset($language_data)) { - report_error(TYPE_ERROR, 'Language file does not contain a $language_data structure to check!'); - } else if (!is_array($language_data)) { - report_error(TYPE_ERROR, 'Language file contains a $language_data structure which is not an array!'); - } - } - - if(!$error_abort) { - if(!isset($language_data['LANG_NAME'])) { - report_error(TYPE_ERROR, 'Language file contains no $language_data[\'LANG_NAME\'] specification!'); - } else if (!is_string($language_data['LANG_NAME'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'LANG_NAME\'] specification which is not a string!'); - } - - if(!isset($language_data['COMMENT_SINGLE'])) { - report_error(TYPE_ERROR, 'Language file contains no $language_data[\'COMMENT_SIGNLE\'] structure to check!'); - } else if (!is_array($language_data['COMMENT_SINGLE'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'COMMENT_SINGLE\'] structure which is not an array!'); - } - - if(!isset($language_data['COMMENT_MULTI'])) { - report_error(TYPE_ERROR, 'Language file contains no $language_data[\'COMMENT_MULTI\'] structure to check!'); - } else if (!is_array($language_data['COMMENT_MULTI'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'COMMENT_MULTI\'] structure which is not an array!'); - } - - if(isset($language_data['COMMENT_REGEXP'])) { - if (!is_array($language_data['COMMENT_REGEXP'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'COMMENT_REGEXP\'] structure which is not an array!'); - } - } - - if(!isset($language_data['QUOTEMARKS'])) { - report_error(TYPE_ERROR, 'Language file contains no $language_data[\'QUOTEMARKS\'] structure to check!'); - } else if (!is_array($language_data['QUOTEMARKS'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'QUOTEMARKS\'] structure which is not an array!'); - } - - if(isset($language_data['HARDQUOTE'])) { - if (!is_array($language_data['HARDQUOTE'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'HARDQUOTE\'] structure which is not an array!'); - } - } - - if(!isset($language_data['ESCAPE_CHAR'])) { - report_error(TYPE_ERROR, 'Language file contains no $language_data[\'ESCAPE_CHAR\'] specification to check!'); - } else if (!is_string($language_data['ESCAPE_CHAR'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'ESCAPE_CHAR\'] specification which is not a string!'); - } else if (1 < strlen($language_data['ESCAPE_CHAR'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'ESCAPE_CHAR\'] specification is not empty or exactly one char!'); - } - - if(!isset($language_data['CASE_KEYWORDS'])) { - report_error(TYPE_ERROR, 'Language file contains no $language_data[\'CASE_KEYWORDS\'] specification!'); - } else if (!is_int($language_data['CASE_KEYWORDS'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'CASE_KEYWORDS\'] specification which is not an integer!'); - } else if (GESHI_CAPS_NO_CHANGE != $language_data['CASE_KEYWORDS'] && - GESHI_CAPS_LOWER != $language_data['CASE_KEYWORDS'] && - GESHI_CAPS_UPPER != $language_data['CASE_KEYWORDS']) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'CASE_KEYWORDS\'] specification which is neither of GESHI_CAPS_NO_CHANGE, GESHI_CAPS_LOWER nor GESHI_CAPS_UPPER!'); - } - - if(!isset($language_data['KEYWORDS'])) { - report_error(TYPE_ERROR, 'Language file contains no $language_data[\'KEYWORDS\'] structure to check!'); - } else if (!is_array($language_data['KEYWORDS'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'KEYWORDS\'] structure which is not an array!'); - } else { - foreach($language_data['KEYWORDS'] as $kw_key => $kw_value) { - if(!is_integer($kw_key)) { - report_error(TYPE_WARNING, "Language file contains an key '$kw_key' in \$language_data['KEYWORDS'] that is not integer!"); - } else if (!is_array($kw_value)) { - report_error(TYPE_ERROR, "Language file contains a \$language_data['CASE_SENSITIVE']['$kw_value'] structure which is not an array!"); - } - } - } - - if(!isset($language_data['SYMBOLS'])) { - report_error(TYPE_ERROR, 'Language file contains no $language_data[\'SYMBOLS\'] structure to check!'); - } else if (!is_array($language_data['SYMBOLS'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'SYMBOLS\'] structure which is not an array!'); - } - - if(!isset($language_data['CASE_SENSITIVE'])) { - report_error(TYPE_ERROR, 'Language file contains no $language_data[\'CASE_SENSITIVE\'] structure to check!'); - } else if (!is_array($language_data['CASE_SENSITIVE'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'CASE_SENSITIVE\'] structure which is not an array!'); - } else { - foreach($language_data['CASE_SENSITIVE'] as $cs_key => $cs_value) { - if(!is_integer($cs_key)) { - report_error(TYPE_WARNING, "Language file contains an key '$cs_key' in \$language_data['CASE_SENSITIVE'] that is not integer!"); - } else if (!is_bool($cs_value)) { - report_error(TYPE_ERROR, "Language file contains a Case Sensitivity specification for \$language_data['CASE_SENSITIVE']['$cs_value'] which is not a boolean!"); - } - } - } - - if(!isset($language_data['URLS'])) { - report_error(TYPE_ERROR, 'Language file contains no $language_data[\'URLS\'] structure to check!'); - } else if (!is_array($language_data['URLS'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'URLS\'] structure which is not an array!'); - } else { - foreach($language_data['URLS'] as $url_key => $url_value) { - if(!is_integer($url_key)) { - report_error(TYPE_WARNING, "Language file contains an key '$url_key' in \$language_data['URLS'] that is not integer!"); - } else if (!is_string($url_value)) { - report_error(TYPE_ERROR, "Language file contains a Documentation URL specification for \$language_data['URLS']['$url_value'] which is not a string!"); - } else if (preg_match('#&([^;]*(=|$))#U', $url_value)) { - report_error(TYPE_ERROR, "Language file contains unescaped ampersands (&) in \$language_data['URLS']!"); - } - } - } - - if(!isset($language_data['OOLANG'])) { - report_error(TYPE_ERROR, 'Language file contains no $language_data[\'OOLANG\'] specification!'); - } else if (!is_int($language_data['OOLANG']) && !is_bool($language_data['OOLANG'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'OOLANG\'] specification which is neither boolean nor integer!'); - } else if (false !== $language_data['OOLANG'] && - true !== $language_data['OOLANG'] && - 2 !== $language_data['OOLANG']) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'OOLANG\'] specification which is neither of false, true or 2!'); - } - - if(!isset($language_data['OBJECT_SPLITTERS'])) { - report_error(TYPE_ERROR, 'Language file contains no $language_data[\'OBJECT_SPLITTERS\'] structure to check!'); - } else if (!is_array($language_data['OBJECT_SPLITTERS'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'OBJECT_SPLITTERS\'] structure which is not an array!'); - } - - if(!isset($language_data['REGEXPS'])) { - report_error(TYPE_ERROR, 'Language file contains no $language_data[\'REGEXPS\'] structure to check!'); - } else if (!is_array($language_data['REGEXPS'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'REGEXPS\'] structure which is not an array!'); - } - - if(!isset($language_data['STRICT_MODE_APPLIES'])) { - report_error(TYPE_ERROR, 'Language file contains no $language_data[\'STRICT_MODE_APPLIES\'] specification!'); - } else if (!is_int($language_data['STRICT_MODE_APPLIES'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'STRICT_MODE_APPLIES\'] specification which is not an integer!'); - } else if (GESHI_MAYBE != $language_data['STRICT_MODE_APPLIES'] && - GESHI_ALWAYS != $language_data['STRICT_MODE_APPLIES'] && - GESHI_NEVER != $language_data['STRICT_MODE_APPLIES']) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'STRICT_MODE_APPLIES\'] specification which is neither of GESHI_MAYBE, GESHI_ALWAYS nor GESHI_NEVER!'); - } - - if(!isset($language_data['SCRIPT_DELIMITERS'])) { - report_error(TYPE_ERROR, 'Language file contains no $language_data[\'SCRIPT_DELIMITERS\'] structure to check!'); - } else if (!is_array($language_data['SCRIPT_DELIMITERS'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'SCRIPT_DELIMITERS\'] structure which is not an array!'); - } - - if(!isset($language_data['HIGHLIGHT_STRICT_BLOCK'])) { - report_error(TYPE_ERROR, 'Language file contains no $language_data[\'HIGHLIGHT_STRICT_BLOCK\'] structure to check!'); - } else if (!is_array($language_data['HIGHLIGHT_STRICT_BLOCK'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'HIGHLIGHT_STRICT_BLOCK\'] structure which is not an array!'); - } - - if(isset($language_data['TAB_WIDTH'])) { - if (!is_int($language_data['TAB_WIDTH'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'TAB_WIDTH\'] specification which is not an integer!'); - } else if (1 > $language_data['TAB_WIDTH']) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'TAB_WIDTH\'] specification which is less than 1!'); - } - } - - if(isset($language_data['PARSER_CONTROL'])) { - if (!is_array($language_data['PARSER_CONTROL'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'PARSER_CONTROL\'] structure which is not an array!'); - } - } - - if(!isset($language_data['STYLES'])) { - report_error(TYPE_ERROR, 'Language file contains no $language_data[\'STYLES\'] structure to check!'); - } else if (!is_array($language_data['STYLES'])) { - report_error(TYPE_ERROR, 'Language file contains a $language_data[\'STYLES\'] structure which is not an array!'); - } else { - $style_arrays = array('KEYWORDS', 'COMMENTS', 'ESCAPE_CHAR', - 'BRACKETS', 'STRINGS', 'NUMBERS', 'METHODS', 'SYMBOLS', - 'REGEXPS', 'SCRIPT'); - foreach($style_arrays as $style_kind) { - if(!isset($language_data['STYLES'][$style_kind])) { - report_error(TYPE_ERROR, "Language file contains no \$language_data['STYLES']['$style_kind'] structure to check!"); - } else if (!is_array($language_data['STYLES'][$style_kind])) { - report_error(TYPE_ERROR, "Language file contains a \$language_data['STYLES\']['$style_kind'] structure which is not an array!"); - } else { - foreach($language_data['STYLES'][$style_kind] as $sk_key => $sk_value) { - if(!is_int($sk_key) && ('COMMENTS' != $style_kind && 'MULTI' != $sk_key) - && !(('STRINGS' == $style_kind || 'ESCAPE_CHAR' == $style_kind) && 'HARD' == $sk_key)) { - report_error(TYPE_WARNING, "Language file contains an key '$sk_key' in \$language_data['STYLES']['$style_kind'] that is not integer!"); - } else if (!is_string($sk_value)) { - report_error(TYPE_WARNING, "Language file contains a CSS specification for \$language_data['STYLES']['$style_kind'][$key] which is not a string!"); - } - } - } - } - - unset($style_arrays); - } - } - - if(!$error_abort) { - //Initial sanity checks survived? --> Let's dig deeper! - foreach($language_data['KEYWORDS'] as $key => $keywords) { - if(!isset($language_data['CASE_SENSITIVE'][$key])) { - report_error(TYPE_ERROR, "Language file contains no \$language_data['CASE_SENSITIVE'] specification for keyword group $key!"); - } - if(!isset($language_data['URLS'][$key])) { - report_error(TYPE_ERROR, "Language file contains no \$language_data['URLS'] specification for keyword group $key!"); - } - if(empty($keywords)) { - report_error(TYPE_WARNING, "Language file contains an empty keyword list in \$language_data['KEYWORDS'] for group $key!"); - } - foreach($keywords as $id => $kw) { - if(!is_string($kw)) { - report_error(TYPE_WARNING, "Language file contains an non-string entry at \$language_data['KEYWORDS'][$key][$id]!"); - } else if (!strlen($kw)) { - report_error(TYPE_ERROR, "Language file contains an empty string entry at \$language_data['KEYWORDS'][$key][$id]!"); - } else if (preg_match('/^([\(\)\{\}\[\]\^=.,:;\-+\*\/%\$\"\'\?]|&[\w#]\w*;)+$/i', $kw)) { - report_error(TYPE_NOTICE, "Language file contains an keyword ('$kw') at \$language_data['KEYWORDS'][$key][$id] which seems to be better suited for the symbols section!"); - } - } - if(isset($language_data['CASE_SENSITIVE'][$key]) && !$language_data['CASE_SENSITIVE'][$key]) { - array_walk($keywords, 'dupfind_strtolower'); - } - if(count($keywords) != count(array_unique($keywords))) { - $kw_diffs = array_count_values($keywords); - foreach($kw_diffs as $kw => $kw_count) { - if($kw_count > 1) { - report_error(TYPE_WARNING, "Language file contains per-group duplicate keyword '$kw' in \$language_data['KEYWORDS'][$key]!"); - } - } - } - } - - $disallowed_before = "(?|^&"; - $disallowed_after = "(?![a-zA-Z0-9_\|%\\-&;"; - - foreach($language_data['KEYWORDS'] as $key => $keywords) { - foreach($language_data['KEYWORDS'] as $key2 => $keywords2) { - if($key2 <= $key) { - continue; - } - $kw_diffs = array_intersect($keywords, $keywords2); - foreach($kw_diffs as $kw) { - if(isset($language_data['PARSER_CONTROL']['KEYWORDS'])) { - //Check the precondition\post-cindition for the involved keyword groups - $g1_pre = $disallowed_before; - $g2_pre = $disallowed_before; - $g1_post = $disallowed_after; - $g2_post = $disallowed_after; - if(isset($language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE'])) { - $g1_pre = $language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE']; - $g2_pre = $language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE']; - } - if(isset($language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER'])) { - $g1_post = $language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER']; - $g2_post = $language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER']; - } - - if(isset($language_data['PARSER_CONTROL']['KEYWORDS'][$key]['DISALLOWED_BEFORE'])) { - $g1_pre = $language_data['PARSER_CONTROL']['KEYWORDS'][$key]['DISALLOWED_BEFORE']; - } - if(isset($language_data['PARSER_CONTROL']['KEYWORDS'][$key]['DISALLOWED_AFTER'])) { - $g1_post = $language_data['PARSER_CONTROL']['KEYWORDS'][$key]['DISALLOWED_AFTER']; - } - - if(isset($language_data['PARSER_CONTROL']['KEYWORDS'][$key2]['DISALLOWED_BEFORE'])) { - $g2_pre = $language_data['PARSER_CONTROL']['KEYWORDS'][$key2]['DISALLOWED_BEFORE']; - } - if(isset($language_data['PARSER_CONTROL']['KEYWORDS'][$key2]['DISALLOWED_AFTER'])) { - $g2_post = $language_data['PARSER_CONTROL']['KEYWORDS'][$key2]['DISALLOWED_AFTER']; - } - - if($g1_pre != $g2_pre || $g1_post != $g2_post) { - continue; - } - } - report_error(TYPE_WARNING, "Language file contains cross-group duplicate keyword '$kw' in \$language_data['KEYWORDS'][$key] and \$language_data['KEYWORDS'][$key2]!"); - } - } - } - foreach($language_data['CASE_SENSITIVE'] as $key => $keywords) { - if(!isset($language_data['KEYWORDS'][$key]) && $key != GESHI_COMMENTS) { - report_error(TYPE_WARNING, "Language file contains an superfluous \$language_data['CASE_SENSITIVE'] specification for non-existing keyword group $key!"); - } - } - foreach($language_data['URLS'] as $key => $keywords) { - if(!isset($language_data['KEYWORDS'][$key])) { - report_error(TYPE_WARNING, "Language file contains an superfluous \$language_data['URLS'] specification for non-existing keyword group $key!"); - } - } - foreach($language_data['STYLES']['KEYWORDS'] as $key => $keywords) { - if(!isset($language_data['KEYWORDS'][$key])) { - report_error(TYPE_WARNING, "Language file contains an superfluous \$language_data['STYLES']['KEYWORDS'] specification for non-existing keyword group $key!"); - } - } - - foreach($language_data['COMMENT_SINGLE'] as $ck => $cv) { - if(!is_int($ck)) { - report_error(TYPE_WARNING, "Language file contains an key '$ck' in \$language_data['COMMENT_SINGLE'] that is not integer!"); - } - if(!is_string($cv)) { - report_error(TYPE_WARNING, "Language file contains an non-string entry at \$language_data['COMMENT_SINGLE'][$ck]!"); - } - if(!isset($language_data['STYLES']['COMMENTS'][$ck])) { - report_error(TYPE_WARNING, "Language file contains no \$language_data['STYLES']['COMMENTS'] specification for comment group $ck!"); - } - } - if(isset($language_data['COMMENT_REGEXP'])) { - foreach($language_data['COMMENT_REGEXP'] as $ck => $cv) { - if(!is_int($ck)) { - report_error(TYPE_WARNING, "Language file contains an key '$ck' in \$language_data['COMMENT_REGEXP'] that is not integer!"); - } - if(!is_string($cv)) { - report_error(TYPE_WARNING, "Language file contains an non-string entry at \$language_data['COMMENT_REGEXP'][$ck]!"); - } - if(!isset($language_data['STYLES']['COMMENTS'][$ck])) { - report_error(TYPE_WARNING, "Language file contains no \$language_data['STYLES']['COMMENTS'] specification for comment group $ck!"); - } - } - } - foreach($language_data['STYLES']['COMMENTS'] as $ck => $cv) { - if($ck != 'MULTI' && !isset($language_data['COMMENT_SINGLE'][$ck]) && - !isset($language_data['COMMENT_REGEXP'][$ck])) { - report_error(TYPE_NOTICE, "Language file contains an superfluous \$language_data['STYLES']['COMMENTS'] specification for Single Line or Regular-Expression Comment key $ck!"); - } - } - if (isset($language_data['STYLES']['STRINGS']['HARD'])) { - if (empty($language_data['HARDQUOTE'])) { - report_error(TYPE_NOTICE, "Language file contains superfluous \$language_data['STYLES']['STRINGS'] specification for key 'HARD', but no 'HARDQUOTE's are defined!"); - } - unset($language_data['STYLES']['STRINGS']['HARD']); - } - foreach($language_data['STYLES']['STRINGS'] as $sk => $sv) { - if($sk && !isset($language_data['QUOTEMARKS'][$sk])) { - report_error(TYPE_NOTICE, "Language file contains an superfluous \$language_data['STYLES']['STRINGS'] specification for non-existing quotemark key $sk!"); - } - } - - foreach($language_data['REGEXPS'] as $rk => $rv) { - if(!is_int($rk)) { - report_error(TYPE_WARNING, "Language file contains an key '$rk' in \$language_data['REGEXPS'] that is not integer!"); - } - if(is_string($rv)) { - //Check for unmasked / in regular expressions ... - if(empty($rv)) { - report_error(TYPE_WARNING, "Language file contains an empty regular expression at \$language_data['REGEXPS'][$rk]!"); - } else { - if(preg_match("/(?)/s", $rv)) { - report_error(TYPE_WARNING, "Language file contains a regular expression with an unescaped match for a pipe character '|' which needs escaping as '<PIPE>' instead at \$language_data['REGEXPS'][$rk]!"); - } - } - } elseif(is_array($rv)) { - if(!isset($rv[GESHI_SEARCH])) { - report_error(TYPE_ERROR, "Language file contains no GESHI_SEARCH entry in extended regular expression at \$language_data['REGEXPS'][$rk]!"); - } elseif(!is_string($rv[GESHI_SEARCH])) { - report_error(TYPE_ERROR, "Language file contains a GESHI_SEARCH entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!"); - } else { - if(preg_match("/(?)/s", $rv[GESHI_SEARCH])) { - report_error(TYPE_WARNING, "Language file contains a regular expression with an unescaped match for a pipe character '|' which needs escaping as '<PIPE>' instead at \$language_data['REGEXPS'][$rk]!"); - } - } - if(!isset($rv[GESHI_REPLACE])) { - report_error(TYPE_WARNING, "Language file contains no GESHI_REPLACE entry in extended regular expression at \$language_data['REGEXPS'][$rk]!"); - } elseif(!is_string($rv[GESHI_REPLACE])) { - report_error(TYPE_ERROR, "Language file contains a GESHI_REPLACE entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!"); - } - if(!isset($rv[GESHI_MODIFIERS])) { - report_error(TYPE_WARNING, "Language file contains no GESHI_MODIFIERS entry in extended regular expression at \$language_data['REGEXPS'][$rk]!"); - } elseif(!is_string($rv[GESHI_MODIFIERS])) { - report_error(TYPE_ERROR, "Language file contains a GESHI_MODIFIERS entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!"); - } - if(!isset($rv[GESHI_BEFORE])) { - report_error(TYPE_WARNING, "Language file contains no GESHI_BEFORE entry in extended regular expression at \$language_data['REGEXPS'][$rk]!"); - } elseif(!is_string($rv[GESHI_BEFORE])) { - report_error(TYPE_ERROR, "Language file contains a GESHI_BEFORE entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!"); - } - if(!isset($rv[GESHI_AFTER])) { - report_error(TYPE_WARNING, "Language file contains no GESHI_AFTER entry in extended regular expression at \$language_data['REGEXPS'][$rk]!"); - } elseif(!is_string($rv[GESHI_AFTER])) { - report_error(TYPE_ERROR, "Language file contains a GESHI_AFTER entry in extended regular expression at \$language_data['REGEXPS'][$rk] which is not a string!"); - } - } else { - report_error(TYPE_WARNING, "Language file contains an non-string and non-array entry at \$language_data['REGEXPS'][$rk]!"); - } - if(!isset($language_data['STYLES']['REGEXPS'][$rk])) { - report_error(TYPE_WARNING, "Language file contains no \$language_data['STYLES']['REGEXPS'] specification for regexp group $rk!"); - } - } - foreach($language_data['STYLES']['REGEXPS'] as $rk => $rv) { - if(!isset($language_data['REGEXPS'][$rk])) { - report_error(TYPE_NOTICE, "Language file contains an superfluous \$language_data['STYLES']['REGEXPS'] specification for regexp key $rk!"); - } - } - - - } - - output_error_cache(); - - flush(); - - if($error_abort) { - break; - } - } -} - -$time_end = explode(' ', microtime()); -$time_diff = $time_end[0] + $time_end[1] - $time_start[0] - $time_start[1]; - -if ( PHP_SAPI != 'cli' ) { -?>
            5. -
            - -

            Validation process completed in seconds.

            - - - - - - - -Validation process completed in seconds. - -GeSHi © 2004-2007 Nigel McNie, 2007-2008 Benny Baumann, released under the GNU GPL - - \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi.php b/_piecrust/libs/Geshi/geshi.php deleted file mode 100644 index 8a6e653..0000000 --- a/_piecrust/libs/Geshi/geshi.php +++ /dev/null @@ -1,4755 +0,0 @@ -, Benny Baumann - * @copyright (C) 2004 - 2007 Nigel McNie, (C) 2007 - 2008 Benny Baumann - * @license http://gnu.org/copyleft/gpl.html GNU GPL - * - */ - -// -// GeSHi Constants -// You should use these constant names in your programs instead of -// their values - you never know when a value may change in a future -// version -// - -/** The version of this GeSHi file */ -define('GESHI_VERSION', '1.0.8.9'); - -// Define the root directory for the GeSHi code tree -if (!defined('GESHI_ROOT')) { - /** The root directory for GeSHi */ - define('GESHI_ROOT', dirname(__FILE__) . DIRECTORY_SEPARATOR); -} -/** The language file directory for GeSHi - @access private */ -define('GESHI_LANG_ROOT', GESHI_ROOT . 'geshi' . DIRECTORY_SEPARATOR); - -// Define if GeSHi should be paranoid about security -if (!defined('GESHI_SECURITY_PARANOID')) { - /** Tells GeSHi to be paranoid about security settings */ - define('GESHI_SECURITY_PARANOID', false); -} - -// Line numbers - use with enable_line_numbers() -/** Use no line numbers when building the result */ -define('GESHI_NO_LINE_NUMBERS', 0); -/** Use normal line numbers when building the result */ -define('GESHI_NORMAL_LINE_NUMBERS', 1); -/** Use fancy line numbers when building the result */ -define('GESHI_FANCY_LINE_NUMBERS', 2); - -// Container HTML type -/** Use nothing to surround the source */ -define('GESHI_HEADER_NONE', 0); -/** Use a "div" to surround the source */ -define('GESHI_HEADER_DIV', 1); -/** Use a "pre" to surround the source */ -define('GESHI_HEADER_PRE', 2); -/** Use a pre to wrap lines when line numbers are enabled or to wrap the whole code. */ -define('GESHI_HEADER_PRE_VALID', 3); -/** - * Use a "table" to surround the source: - * - * - * - * - * - *
            $header
            $linenumbers
            $code>
            $footer
            - * - * this is essentially only a workaround for Firefox, see sf#1651996 or take a look at - * https://bugzilla.mozilla.org/show_bug.cgi?id=365805 - * @note when linenumbers are disabled this is essentially the same as GESHI_HEADER_PRE - */ -define('GESHI_HEADER_PRE_TABLE', 4); - -// Capatalisation constants -/** Lowercase keywords found */ -define('GESHI_CAPS_NO_CHANGE', 0); -/** Uppercase keywords found */ -define('GESHI_CAPS_UPPER', 1); -/** Leave keywords found as the case that they are */ -define('GESHI_CAPS_LOWER', 2); - -// Link style constants -/** Links in the source in the :link state */ -define('GESHI_LINK', 0); -/** Links in the source in the :hover state */ -define('GESHI_HOVER', 1); -/** Links in the source in the :active state */ -define('GESHI_ACTIVE', 2); -/** Links in the source in the :visited state */ -define('GESHI_VISITED', 3); - -// Important string starter/finisher -// Note that if you change these, they should be as-is: i.e., don't -// write them as if they had been run through htmlentities() -/** The starter for important parts of the source */ -define('GESHI_START_IMPORTANT', ''); -/** The ender for important parts of the source */ -define('GESHI_END_IMPORTANT', ''); - -/**#@+ - * @access private - */ -// When strict mode applies for a language -/** Strict mode never applies (this is the most common) */ -define('GESHI_NEVER', 0); -/** Strict mode *might* apply, and can be enabled or - disabled by {@link GeSHi->enable_strict_mode()} */ -define('GESHI_MAYBE', 1); -/** Strict mode always applies */ -define('GESHI_ALWAYS', 2); - -// Advanced regexp handling constants, used in language files -/** The key of the regex array defining what to search for */ -define('GESHI_SEARCH', 0); -/** The key of the regex array defining what bracket group in a - matched search to use as a replacement */ -define('GESHI_REPLACE', 1); -/** The key of the regex array defining any modifiers to the regular expression */ -define('GESHI_MODIFIERS', 2); -/** The key of the regex array defining what bracket group in a - matched search to put before the replacement */ -define('GESHI_BEFORE', 3); -/** The key of the regex array defining what bracket group in a - matched search to put after the replacement */ -define('GESHI_AFTER', 4); -/** The key of the regex array defining a custom keyword to use - for this regexp's html tag class */ -define('GESHI_CLASS', 5); - -/** Used in language files to mark comments */ -define('GESHI_COMMENTS', 0); - -/** Used to work around missing PHP features **/ -define('GESHI_PHP_PRE_433', !(version_compare(PHP_VERSION, '4.3.3') === 1)); - -/** make sure we can call stripos **/ -if (!function_exists('stripos')) { - // the offset param of preg_match is not supported below PHP 4.3.3 - if (GESHI_PHP_PRE_433) { - /** - * @ignore - */ - function stripos($haystack, $needle, $offset = null) { - if (!is_null($offset)) { - $haystack = substr($haystack, $offset); - } - if (preg_match('/'. preg_quote($needle, '/') . '/', $haystack, $match, PREG_OFFSET_CAPTURE)) { - return $match[0][1]; - } - return false; - } - } - else { - /** - * @ignore - */ - function stripos($haystack, $needle, $offset = null) { - if (preg_match('/'. preg_quote($needle, '/') . '/', $haystack, $match, PREG_OFFSET_CAPTURE, $offset)) { - return $match[0][1]; - } - return false; - } - } -} - -/** some old PHP / PCRE subpatterns only support up to xxx subpatterns in - regular expressions. Set this to false if your PCRE lib is up to date - @see GeSHi->optimize_regexp_list() - **/ -define('GESHI_MAX_PCRE_SUBPATTERNS', 500); -/** it's also important not to generate too long regular expressions - be generous here... but keep in mind, that when reaching this limit we - still have to close open patterns. 12k should do just fine on a 16k limit. - @see GeSHi->optimize_regexp_list() - **/ -define('GESHI_MAX_PCRE_LENGTH', 12288); - -//Number format specification -/** Basic number format for integers */ -define('GESHI_NUMBER_INT_BASIC', 1); //Default integers \d+ -/** Enhanced number format for integers like seen in C */ -define('GESHI_NUMBER_INT_CSTYLE', 2); //Default C-Style \d+[lL]? -/** Number format to highlight binary numbers with a suffix "b" */ -define('GESHI_NUMBER_BIN_SUFFIX', 16); //[01]+[bB] -/** Number format to highlight binary numbers with a prefix % */ -define('GESHI_NUMBER_BIN_PREFIX_PERCENT', 32); //%[01]+ -/** Number format to highlight binary numbers with a prefix 0b (C) */ -define('GESHI_NUMBER_BIN_PREFIX_0B', 64); //0b[01]+ -/** Number format to highlight octal numbers with a leading zero */ -define('GESHI_NUMBER_OCT_PREFIX', 256); //0[0-7]+ -/** Number format to highlight octal numbers with a prefix 0o (logtalk) */ -define('GESHI_NUMBER_OCT_PREFIX_0O', 512); //0[0-7]+ -/** Number format to highlight octal numbers with a leading @ (Used in HiSofts Devpac series). */ -define('GESHI_NUMBER_OCT_PREFIX_AT', 1024); //@[0-7]+ -/** Number format to highlight octal numbers with a suffix of o */ -define('GESHI_NUMBER_OCT_SUFFIX', 2048); //[0-7]+[oO] -/** Number format to highlight hex numbers with a prefix 0x */ -define('GESHI_NUMBER_HEX_PREFIX', 4096); //0x[0-9a-fA-F]+ -/** Number format to highlight hex numbers with a prefix $ */ -define('GESHI_NUMBER_HEX_PREFIX_DOLLAR', 8192); //$[0-9a-fA-F]+ -/** Number format to highlight hex numbers with a suffix of h */ -define('GESHI_NUMBER_HEX_SUFFIX', 16384); //[0-9][0-9a-fA-F]*h -/** Number format to highlight floating-point numbers without support for scientific notation */ -define('GESHI_NUMBER_FLT_NONSCI', 65536); //\d+\.\d+ -/** Number format to highlight floating-point numbers without support for scientific notation */ -define('GESHI_NUMBER_FLT_NONSCI_F', 131072); //\d+(\.\d+)?f -/** Number format to highlight floating-point numbers with support for scientific notation (E) and optional leading zero */ -define('GESHI_NUMBER_FLT_SCI_SHORT', 262144); //\.\d+e\d+ -/** Number format to highlight floating-point numbers with support for scientific notation (E) and required leading digit */ -define('GESHI_NUMBER_FLT_SCI_ZERO', 524288); //\d+(\.\d+)?e\d+ -//Custom formats are passed by RX array - -// Error detection - use these to analyse faults -/** No sourcecode to highlight was specified - * @deprecated - */ -define('GESHI_ERROR_NO_INPUT', 1); -/** The language specified does not exist */ -define('GESHI_ERROR_NO_SUCH_LANG', 2); -/** GeSHi could not open a file for reading (generally a language file) */ -define('GESHI_ERROR_FILE_NOT_READABLE', 3); -/** The header type passed to {@link GeSHi->set_header_type()} was invalid */ -define('GESHI_ERROR_INVALID_HEADER_TYPE', 4); -/** The line number type passed to {@link GeSHi->enable_line_numbers()} was invalid */ -define('GESHI_ERROR_INVALID_LINE_NUMBER_TYPE', 5); -/**#@-*/ - - -/** - * The GeSHi Class. - * - * Please refer to the documentation for GeSHi 1.0.X that is available - * at http://qbnz.com/highlighter/documentation.php for more information - * about how to use this class. - * - * @package geshi - * @author Nigel McNie , Benny Baumann - * @copyright (C) 2004 - 2007 Nigel McNie, (C) 2007 - 2008 Benny Baumann - */ -class GeSHi { - /**#@+ - * @access private - */ - /** - * The source code to highlight - * @var string - */ - var $source = ''; - - /** - * The language to use when highlighting - * @var string - */ - var $language = ''; - - /** - * The data for the language used - * @var array - */ - var $language_data = array(); - - /** - * The path to the language files - * @var string - */ - var $language_path = GESHI_LANG_ROOT; - - /** - * The error message associated with an error - * @var string - * @todo check err reporting works - */ - var $error = false; - - /** - * Possible error messages - * @var array - */ - var $error_messages = array( - GESHI_ERROR_NO_SUCH_LANG => 'GeSHi could not find the language {LANGUAGE} (using path {PATH})', - GESHI_ERROR_FILE_NOT_READABLE => 'The file specified for load_from_file was not readable', - GESHI_ERROR_INVALID_HEADER_TYPE => 'The header type specified is invalid', - GESHI_ERROR_INVALID_LINE_NUMBER_TYPE => 'The line number type specified is invalid' - ); - - /** - * Whether highlighting is strict or not - * @var boolean - */ - var $strict_mode = false; - - /** - * Whether to use CSS classes in output - * @var boolean - */ - var $use_classes = false; - - /** - * The type of header to use. Can be one of the following - * values: - * - * - GESHI_HEADER_PRE: Source is outputted in a "pre" HTML element. - * - GESHI_HEADER_DIV: Source is outputted in a "div" HTML element. - * - GESHI_HEADER_NONE: No header is outputted. - * - * @var int - */ - var $header_type = GESHI_HEADER_PRE; - - /** - * Array of permissions for which lexics should be highlighted - * @var array - */ - var $lexic_permissions = array( - 'KEYWORDS' => array(), - 'COMMENTS' => array('MULTI' => true), - 'REGEXPS' => array(), - 'ESCAPE_CHAR' => true, - 'BRACKETS' => true, - 'SYMBOLS' => false, - 'STRINGS' => true, - 'NUMBERS' => true, - 'METHODS' => true, - 'SCRIPT' => true - ); - - /** - * The time it took to parse the code - * @var double - */ - var $time = 0; - - /** - * The content of the header block - * @var string - */ - var $header_content = ''; - - /** - * The content of the footer block - * @var string - */ - var $footer_content = ''; - - /** - * The style of the header block - * @var string - */ - var $header_content_style = ''; - - /** - * The style of the footer block - * @var string - */ - var $footer_content_style = ''; - - /** - * Tells if a block around the highlighted source should be forced - * if not using line numbering - * @var boolean - */ - var $force_code_block = false; - - /** - * The styles for hyperlinks in the code - * @var array - */ - var $link_styles = array(); - - /** - * Whether important blocks should be recognised or not - * @var boolean - * @deprecated - * @todo REMOVE THIS FUNCTIONALITY! - */ - var $enable_important_blocks = false; - - /** - * Styles for important parts of the code - * @var string - * @deprecated - * @todo As above - rethink the whole idea of important blocks as it is buggy and - * will be hard to implement in 1.2 - */ - var $important_styles = 'font-weight: bold; color: red;'; // Styles for important parts of the code - - /** - * Whether CSS IDs should be added to the code - * @var boolean - */ - var $add_ids = false; - - /** - * Lines that should be highlighted extra - * @var array - */ - var $highlight_extra_lines = array(); - - /** - * Styles of lines that should be highlighted extra - * @var array - */ - var $highlight_extra_lines_styles = array(); - - /** - * Styles of extra-highlighted lines - * @var string - */ - var $highlight_extra_lines_style = 'background-color: #ffc;'; - - /** - * The line ending - * If null, nl2br() will be used on the result string. - * Otherwise, all instances of \n will be replaced with $line_ending - * @var string - */ - var $line_ending = null; - - /** - * Number at which line numbers should start at - * @var int - */ - var $line_numbers_start = 1; - - /** - * The overall style for this code block - * @var string - */ - var $overall_style = 'font-family:monospace;'; - - /** - * The style for the actual code - * @var string - */ - var $code_style = 'font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;'; - - /** - * The overall class for this code block - * @var string - */ - var $overall_class = ''; - - /** - * The overall ID for this code block - * @var string - */ - var $overall_id = ''; - - /** - * Line number styles - * @var string - */ - var $line_style1 = 'font-weight: normal; vertical-align:top;'; - - /** - * Line number styles for fancy lines - * @var string - */ - var $line_style2 = 'font-weight: bold; vertical-align:top;'; - - /** - * Style for line numbers when GESHI_HEADER_PRE_TABLE is chosen - * @var string - */ - var $table_linenumber_style = 'width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;'; - - /** - * Flag for how line numbers are displayed - * @var boolean - */ - var $line_numbers = GESHI_NO_LINE_NUMBERS; - - /** - * Flag to decide if multi line spans are allowed. Set it to false to make sure - * each tag is closed before and reopened after each linefeed. - * @var boolean - */ - var $allow_multiline_span = true; - - /** - * The "nth" value for fancy line highlighting - * @var int - */ - var $line_nth_row = 0; - - /** - * The size of tab stops - * @var int - */ - var $tab_width = 8; - - /** - * Should we use language-defined tab stop widths? - * @var int - */ - var $use_language_tab_width = false; - - /** - * Default target for keyword links - * @var string - */ - var $link_target = ''; - - /** - * The encoding to use for entity encoding - * NOTE: Used with Escape Char Sequences to fix UTF-8 handling (cf. SF#2037598) - * @var string - */ - var $encoding = 'utf-8'; - - /** - * Should keywords be linked? - * @var boolean - */ - var $keyword_links = true; - - /** - * Currently loaded language file - * @var string - * @since 1.0.7.22 - */ - var $loaded_language = ''; - - /** - * Wether the caches needed for parsing are built or not - * - * @var bool - * @since 1.0.8 - */ - var $parse_cache_built = false; - - /** - * Work around for Suhosin Patch with disabled /e modifier - * - * Note from suhosins author in config file: - *
            - * The /e modifier inside preg_replace() allows code execution. - * Often it is the cause for remote code execution exploits. It is wise to - * deactivate this feature and test where in the application it is used. - * The developer using the /e modifier should be made aware that he should - * use preg_replace_callback() instead - *
            - * - * @var array - * @since 1.0.8 - */ - var $_kw_replace_group = 0; - var $_rx_key = 0; - - /** - * some "callback parameters" for handle_multiline_regexps - * - * @since 1.0.8 - * @access private - * @var string - */ - var $_hmr_before = ''; - var $_hmr_replace = ''; - var $_hmr_after = ''; - var $_hmr_key = 0; - - /**#@-*/ - - /** - * Creates a new GeSHi object, with source and language - * - * @param string The source code to highlight - * @param string The language to highlight the source with - * @param string The path to the language file directory. This - * is deprecated! I've backported the auto path - * detection from the 1.1.X dev branch, so now it - * should be automatically set correctly. If you have - * renamed the language directory however, you will - * still need to set the path using this parameter or - * {@link GeSHi->set_language_path()} - * @since 1.0.0 - */ - function GeSHi($source = '', $language = '', $path = '') { - if (!empty($source)) { - $this->set_source($source); - } - if (!empty($language)) { - $this->set_language($language); - } - $this->set_language_path($path); - } - - /** - * Returns an error message associated with the last GeSHi operation, - * or false if no error has occured - * - * @return string|false An error message if there has been an error, else false - * @since 1.0.0 - */ - function error() { - if ($this->error) { - //Put some template variables for debugging here ... - $debug_tpl_vars = array( - '{LANGUAGE}' => $this->language, - '{PATH}' => $this->language_path - ); - $msg = str_replace( - array_keys($debug_tpl_vars), - array_values($debug_tpl_vars), - $this->error_messages[$this->error]); - - return "
            GeSHi Error: $msg (code {$this->error})
            "; - } - return false; - } - - /** - * Gets a human-readable language name (thanks to Simon Patterson - * for the idea :)) - * - * @return string The name for the current language - * @since 1.0.2 - */ - function get_language_name() { - if (GESHI_ERROR_NO_SUCH_LANG == $this->error) { - return $this->language_data['LANG_NAME'] . ' (Unknown Language)'; - } - return $this->language_data['LANG_NAME']; - } - - /** - * Sets the source code for this object - * - * @param string The source code to highlight - * @since 1.0.0 - */ - function set_source($source) { - $this->source = $source; - $this->highlight_extra_lines = array(); - } - - /** - * Sets the language for this object - * - * @note since 1.0.8 this function won't reset language-settings by default anymore! - * if you need this set $force_reset = true - * - * @param string The name of the language to use - * @since 1.0.0 - */ - function set_language($language, $force_reset = false) { - if ($force_reset) { - $this->loaded_language = false; - } - - //Clean up the language name to prevent malicious code injection - $language = preg_replace('#[^a-zA-Z0-9\-_]#', '', $language); - - $language = strtolower($language); - - //Retreive the full filename - $file_name = $this->language_path . $language . '.php'; - if ($file_name == $this->loaded_language) { - // this language is already loaded! - return; - } - - $this->language = $language; - - $this->error = false; - $this->strict_mode = GESHI_NEVER; - - //Check if we can read the desired file - if (!is_readable($file_name)) { - $this->error = GESHI_ERROR_NO_SUCH_LANG; - return; - } - - // Load the language for parsing - $this->load_language($file_name); - } - - /** - * Sets the path to the directory containing the language files. Note - * that this path is relative to the directory of the script that included - * geshi.php, NOT geshi.php itself. - * - * @param string The path to the language directory - * @since 1.0.0 - * @deprecated The path to the language files should now be automatically - * detected, so this method should no longer be needed. The - * 1.1.X branch handles manual setting of the path differently - * so this method will disappear in 1.2.0. - */ - function set_language_path($path) { - if(strpos($path,':')) { - //Security Fix to prevent external directories using fopen wrappers. - if(DIRECTORY_SEPARATOR == "\\") { - if(!preg_match('#^[a-zA-Z]:#', $path) || false !== strpos($path, ':', 2)) { - return; - } - } else { - return; - } - } - if(preg_match('#[^/a-zA-Z0-9_\.\-\\\s:]#', $path)) { - //Security Fix to prevent external directories using fopen wrappers. - return; - } - if(GESHI_SECURITY_PARANOID && false !== strpos($path, '/.')) { - //Security Fix to prevent external directories using fopen wrappers. - return; - } - if(GESHI_SECURITY_PARANOID && false !== strpos($path, '..')) { - //Security Fix to prevent external directories using fopen wrappers. - return; - } - if ($path) { - $this->language_path = ('/' == $path[strlen($path) - 1]) ? $path : $path . '/'; - $this->set_language($this->language); // otherwise set_language_path has no effect - } - } - - /** - * Get supported langs or an associative array lang=>full_name. - * @param boolean $longnames - * @return array - */ - function get_supported_languages($full_names=false) - { - // return array - $back = array(); - - // we walk the lang root - $dir = dir($this->language_path); - - // foreach entry - while (false !== ($entry = $dir->read())) - { - $full_path = $this->language_path.$entry; - - // Skip all dirs - if (is_dir($full_path)) { - continue; - } - - // we only want lang.php files - if (!preg_match('/^([^.]+)\.php$/', $entry, $matches)) { - continue; - } - - // Raw lang name is here - $langname = $matches[1]; - - // We want the fullname too? - if ($full_names === true) - { - if (false !== ($fullname = $this->get_language_fullname($langname))) - { - $back[$langname] = $fullname; // we go associative - } - } - else - { - // just store raw langname - $back[] = $langname; - } - } - - $dir->close(); - - return $back; - } - - /** - * Get full_name for a lang or false. - * @param string $language short langname (html4strict for example) - * @return mixed - */ - function get_language_fullname($language) - { - //Clean up the language name to prevent malicious code injection - $language = preg_replace('#[^a-zA-Z0-9\-_]#', '', $language); - - $language = strtolower($language); - - // get fullpath-filename for a langname - $fullpath = $this->language_path.$language.'.php'; - - // we need to get contents :S - if (false === ($data = file_get_contents($fullpath))) { - $this->error = sprintf('Geshi::get_lang_fullname() Unknown Language: %s', $language); - return false; - } - - // match the langname - if (!preg_match('/\'LANG_NAME\'\s*=>\s*\'((?:[^\']|\\\')+)\'/', $data, $matches)) { - $this->error = sprintf('Geshi::get_lang_fullname(%s): Regex can not detect language', $language); - return false; - } - - // return fullname for langname - return stripcslashes($matches[1]); - } - - /** - * Sets the type of header to be used. - * - * If GESHI_HEADER_DIV is used, the code is surrounded in a "div".This - * means more source code but more control over tab width and line-wrapping. - * GESHI_HEADER_PRE means that a "pre" is used - less source, but less - * control. Default is GESHI_HEADER_PRE. - * - * From 1.0.7.2, you can use GESHI_HEADER_NONE to specify that no header code - * should be outputted. - * - * @param int The type of header to be used - * @since 1.0.0 - */ - function set_header_type($type) { - //Check if we got a valid header type - if (!in_array($type, array(GESHI_HEADER_NONE, GESHI_HEADER_DIV, - GESHI_HEADER_PRE, GESHI_HEADER_PRE_VALID, GESHI_HEADER_PRE_TABLE))) { - $this->error = GESHI_ERROR_INVALID_HEADER_TYPE; - return; - } - - //Set that new header type - $this->header_type = $type; - } - - /** - * Sets the styles for the code that will be outputted - * when this object is parsed. The style should be a - * string of valid stylesheet declarations - * - * @param string The overall style for the outputted code block - * @param boolean Whether to merge the styles with the current styles or not - * @since 1.0.0 - */ - function set_overall_style($style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->overall_style = $style; - } else { - $this->overall_style .= $style; - } - } - - /** - * Sets the overall classname for this block of code. This - * class can then be used in a stylesheet to style this object's - * output - * - * @param string The class name to use for this block of code - * @since 1.0.0 - */ - function set_overall_class($class) { - $this->overall_class = $class; - } - - /** - * Sets the overall id for this block of code. This id can then - * be used in a stylesheet to style this object's output - * - * @param string The ID to use for this block of code - * @since 1.0.0 - */ - function set_overall_id($id) { - $this->overall_id = $id; - } - - /** - * Sets whether CSS classes should be used to highlight the source. Default - * is off, calling this method with no arguments will turn it on - * - * @param boolean Whether to turn classes on or not - * @since 1.0.0 - */ - function enable_classes($flag = true) { - $this->use_classes = ($flag) ? true : false; - } - - /** - * Sets the style for the actual code. This should be a string - * containing valid stylesheet declarations. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * Note: Use this method to override any style changes you made to - * the line numbers if you are using line numbers, else the line of - * code will have the same style as the line number! Consult the - * GeSHi documentation for more information about this. - * - * @param string The style to use for actual code - * @param boolean Whether to merge the current styles with the new styles - * @since 1.0.2 - */ - function set_code_style($style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->code_style = $style; - } else { - $this->code_style .= $style; - } - } - - /** - * Sets the styles for the line numbers. - * - * @param string The style for the line numbers that are "normal" - * @param string|boolean If a string, this is the style of the line - * numbers that are "fancy", otherwise if boolean then this - * defines whether the normal styles should be merged with the - * new normal styles or not - * @param boolean If set, is the flag for whether to merge the "fancy" - * styles with the current styles or not - * @since 1.0.2 - */ - function set_line_style($style1, $style2 = '', $preserve_defaults = false) { - //Check if we got 2 or three parameters - if (is_bool($style2)) { - $preserve_defaults = $style2; - $style2 = ''; - } - - //Actually set the new styles - if (!$preserve_defaults) { - $this->line_style1 = $style1; - $this->line_style2 = $style2; - } else { - $this->line_style1 .= $style1; - $this->line_style2 .= $style2; - } - } - - /** - * Sets whether line numbers should be displayed. - * - * Valid values for the first parameter are: - * - * - GESHI_NO_LINE_NUMBERS: Line numbers will not be displayed - * - GESHI_NORMAL_LINE_NUMBERS: Line numbers will be displayed - * - GESHI_FANCY_LINE_NUMBERS: Fancy line numbers will be displayed - * - * For fancy line numbers, the second parameter is used to signal which lines - * are to be fancy. For example, if the value of this parameter is 5 then every - * 5th line will be fancy. - * - * @param int How line numbers should be displayed - * @param int Defines which lines are fancy - * @since 1.0.0 - */ - function enable_line_numbers($flag, $nth_row = 5) { - if (GESHI_NO_LINE_NUMBERS != $flag && GESHI_NORMAL_LINE_NUMBERS != $flag - && GESHI_FANCY_LINE_NUMBERS != $flag) { - $this->error = GESHI_ERROR_INVALID_LINE_NUMBER_TYPE; - } - $this->line_numbers = $flag; - $this->line_nth_row = $nth_row; - } - - /** - * Sets wether spans and other HTML markup generated by GeSHi can - * span over multiple lines or not. Defaults to true to reduce overhead. - * Set it to false if you want to manipulate the output or manually display - * the code in an ordered list. - * - * @param boolean Wether multiline spans are allowed or not - * @since 1.0.7.22 - */ - function enable_multiline_span($flag) { - $this->allow_multiline_span = (bool) $flag; - } - - /** - * Get current setting for multiline spans, see GeSHi->enable_multiline_span(). - * - * @see enable_multiline_span - * @return bool - */ - function get_multiline_span() { - return $this->allow_multiline_span; - } - - /** - * Sets the style for a keyword group. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param int The key of the keyword group to change the styles of - * @param string The style to make the keywords - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - */ - function set_keyword_group_style($key, $style, $preserve_defaults = false) { - //Set the style for this keyword group - if (!$preserve_defaults) { - $this->language_data['STYLES']['KEYWORDS'][$key] = $style; - } else { - $this->language_data['STYLES']['KEYWORDS'][$key] .= $style; - } - - //Update the lexic permissions - if (!isset($this->lexic_permissions['KEYWORDS'][$key])) { - $this->lexic_permissions['KEYWORDS'][$key] = true; - } - } - - /** - * Turns highlighting on/off for a keyword group - * - * @param int The key of the keyword group to turn on or off - * @param boolean Whether to turn highlighting for that group on or off - * @since 1.0.0 - */ - function set_keyword_group_highlighting($key, $flag = true) { - $this->lexic_permissions['KEYWORDS'][$key] = ($flag) ? true : false; - } - - /** - * Sets the styles for comment groups. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param int The key of the comment group to change the styles of - * @param string The style to make the comments - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - */ - function set_comments_style($key, $style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['COMMENTS'][$key] = $style; - } else { - $this->language_data['STYLES']['COMMENTS'][$key] .= $style; - } - } - - /** - * Turns highlighting on/off for comment groups - * - * @param int The key of the comment group to turn on or off - * @param boolean Whether to turn highlighting for that group on or off - * @since 1.0.0 - */ - function set_comments_highlighting($key, $flag = true) { - $this->lexic_permissions['COMMENTS'][$key] = ($flag) ? true : false; - } - - /** - * Sets the styles for escaped characters. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param string The style to make the escape characters - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - */ - function set_escape_characters_style($style, $preserve_defaults = false, $group = 0) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['ESCAPE_CHAR'][$group] = $style; - } else { - $this->language_data['STYLES']['ESCAPE_CHAR'][$group] .= $style; - } - } - - /** - * Turns highlighting on/off for escaped characters - * - * @param boolean Whether to turn highlighting for escape characters on or off - * @since 1.0.0 - */ - function set_escape_characters_highlighting($flag = true) { - $this->lexic_permissions['ESCAPE_CHAR'] = ($flag) ? true : false; - } - - /** - * Sets the styles for brackets. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * This method is DEPRECATED: use set_symbols_style instead. - * This method will be removed in 1.2.X - * - * @param string The style to make the brackets - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - * @deprecated In favour of set_symbols_style - */ - function set_brackets_style($style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['BRACKETS'][0] = $style; - } else { - $this->language_data['STYLES']['BRACKETS'][0] .= $style; - } - } - - /** - * Turns highlighting on/off for brackets - * - * This method is DEPRECATED: use set_symbols_highlighting instead. - * This method will be remove in 1.2.X - * - * @param boolean Whether to turn highlighting for brackets on or off - * @since 1.0.0 - * @deprecated In favour of set_symbols_highlighting - */ - function set_brackets_highlighting($flag) { - $this->lexic_permissions['BRACKETS'] = ($flag) ? true : false; - } - - /** - * Sets the styles for symbols. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param string The style to make the symbols - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @param int Tells the group of symbols for which style should be set. - * @since 1.0.1 - */ - function set_symbols_style($style, $preserve_defaults = false, $group = 0) { - // Update the style of symbols - if (!$preserve_defaults) { - $this->language_data['STYLES']['SYMBOLS'][$group] = $style; - } else { - $this->language_data['STYLES']['SYMBOLS'][$group] .= $style; - } - - // For backward compatibility - if (0 == $group) { - $this->set_brackets_style ($style, $preserve_defaults); - } - } - - /** - * Turns highlighting on/off for symbols - * - * @param boolean Whether to turn highlighting for symbols on or off - * @since 1.0.0 - */ - function set_symbols_highlighting($flag) { - // Update lexic permissions for this symbol group - $this->lexic_permissions['SYMBOLS'] = ($flag) ? true : false; - - // For backward compatibility - $this->set_brackets_highlighting ($flag); - } - - /** - * Sets the styles for strings. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param string The style to make the escape characters - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @param int Tells the group of strings for which style should be set. - * @since 1.0.0 - */ - function set_strings_style($style, $preserve_defaults = false, $group = 0) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['STRINGS'][$group] = $style; - } else { - $this->language_data['STYLES']['STRINGS'][$group] .= $style; - } - } - - /** - * Turns highlighting on/off for strings - * - * @param boolean Whether to turn highlighting for strings on or off - * @since 1.0.0 - */ - function set_strings_highlighting($flag) { - $this->lexic_permissions['STRINGS'] = ($flag) ? true : false; - } - - /** - * Sets the styles for strict code blocks. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param string The style to make the script blocks - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @param int Tells the group of script blocks for which style should be set. - * @since 1.0.8.4 - */ - function set_script_style($style, $preserve_defaults = false, $group = 0) { - // Update the style of symbols - if (!$preserve_defaults) { - $this->language_data['STYLES']['SCRIPT'][$group] = $style; - } else { - $this->language_data['STYLES']['SCRIPT'][$group] .= $style; - } - } - - /** - * Sets the styles for numbers. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param string The style to make the numbers - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @param int Tells the group of numbers for which style should be set. - * @since 1.0.0 - */ - function set_numbers_style($style, $preserve_defaults = false, $group = 0) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['NUMBERS'][$group] = $style; - } else { - $this->language_data['STYLES']['NUMBERS'][$group] .= $style; - } - } - - /** - * Turns highlighting on/off for numbers - * - * @param boolean Whether to turn highlighting for numbers on or off - * @since 1.0.0 - */ - function set_numbers_highlighting($flag) { - $this->lexic_permissions['NUMBERS'] = ($flag) ? true : false; - } - - /** - * Sets the styles for methods. $key is a number that references the - * appropriate "object splitter" - see the language file for the language - * you are highlighting to get this number. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param int The key of the object splitter to change the styles of - * @param string The style to make the methods - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - */ - function set_methods_style($key, $style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['METHODS'][$key] = $style; - } else { - $this->language_data['STYLES']['METHODS'][$key] .= $style; - } - } - - /** - * Turns highlighting on/off for methods - * - * @param boolean Whether to turn highlighting for methods on or off - * @since 1.0.0 - */ - function set_methods_highlighting($flag) { - $this->lexic_permissions['METHODS'] = ($flag) ? true : false; - } - - /** - * Sets the styles for regexps. If $preserve_defaults is - * true, then styles are merged with the default styles, with the - * user defined styles having priority - * - * @param string The style to make the regular expression matches - * @param boolean Whether to merge the new styles with the old or just - * to overwrite them - * @since 1.0.0 - */ - function set_regexps_style($key, $style, $preserve_defaults = false) { - if (!$preserve_defaults) { - $this->language_data['STYLES']['REGEXPS'][$key] = $style; - } else { - $this->language_data['STYLES']['REGEXPS'][$key] .= $style; - } - } - - /** - * Turns highlighting on/off for regexps - * - * @param int The key of the regular expression group to turn on or off - * @param boolean Whether to turn highlighting for the regular expression group on or off - * @since 1.0.0 - */ - function set_regexps_highlighting($key, $flag) { - $this->lexic_permissions['REGEXPS'][$key] = ($flag) ? true : false; - } - - /** - * Sets whether a set of keywords are checked for in a case sensitive manner - * - * @param int The key of the keyword group to change the case sensitivity of - * @param boolean Whether to check in a case sensitive manner or not - * @since 1.0.0 - */ - function set_case_sensitivity($key, $case) { - $this->language_data['CASE_SENSITIVE'][$key] = ($case) ? true : false; - } - - /** - * Sets the case that keywords should use when found. Use the constants: - * - * - GESHI_CAPS_NO_CHANGE: leave keywords as-is - * - GESHI_CAPS_UPPER: convert all keywords to uppercase where found - * - GESHI_CAPS_LOWER: convert all keywords to lowercase where found - * - * @param int A constant specifying what to do with matched keywords - * @since 1.0.1 - */ - function set_case_keywords($case) { - if (in_array($case, array( - GESHI_CAPS_NO_CHANGE, GESHI_CAPS_UPPER, GESHI_CAPS_LOWER))) { - $this->language_data['CASE_KEYWORDS'] = $case; - } - } - - /** - * Sets how many spaces a tab is substituted for - * - * Widths below zero are ignored - * - * @param int The tab width - * @since 1.0.0 - */ - function set_tab_width($width) { - $this->tab_width = intval($width); - - //Check if it fit's the constraints: - if ($this->tab_width < 1) { - //Return it to the default - $this->tab_width = 8; - } - } - - /** - * Sets whether or not to use tab-stop width specifed by language - * - * @param boolean Whether to use language-specific tab-stop widths - * @since 1.0.7.20 - */ - function set_use_language_tab_width($use) { - $this->use_language_tab_width = (bool) $use; - } - - /** - * Returns the tab width to use, based on the current language and user - * preference - * - * @return int Tab width - * @since 1.0.7.20 - */ - function get_real_tab_width() { - if (!$this->use_language_tab_width || - !isset($this->language_data['TAB_WIDTH'])) { - return $this->tab_width; - } else { - return $this->language_data['TAB_WIDTH']; - } - } - - /** - * Enables/disables strict highlighting. Default is off, calling this - * method without parameters will turn it on. See documentation - * for more details on strict mode and where to use it. - * - * @param boolean Whether to enable strict mode or not - * @since 1.0.0 - */ - function enable_strict_mode($mode = true) { - if (GESHI_MAYBE == $this->language_data['STRICT_MODE_APPLIES']) { - $this->strict_mode = ($mode) ? GESHI_ALWAYS : GESHI_NEVER; - } - } - - /** - * Disables all highlighting - * - * @since 1.0.0 - * @todo Rewrite with array traversal - * @deprecated In favour of enable_highlighting - */ - function disable_highlighting() { - $this->enable_highlighting(false); - } - - /** - * Enables all highlighting - * - * The optional flag parameter was added in version 1.0.7.21 and can be used - * to enable (true) or disable (false) all highlighting. - * - * @since 1.0.0 - * @param boolean A flag specifying whether to enable or disable all highlighting - * @todo Rewrite with array traversal - */ - function enable_highlighting($flag = true) { - $flag = $flag ? true : false; - foreach ($this->lexic_permissions as $key => $value) { - if (is_array($value)) { - foreach ($value as $k => $v) { - $this->lexic_permissions[$key][$k] = $flag; - } - } else { - $this->lexic_permissions[$key] = $flag; - } - } - - // Context blocks - $this->enable_important_blocks = $flag; - } - - /** - * Given a file extension, this method returns either a valid geshi language - * name, or the empty string if it couldn't be found - * - * @param string The extension to get a language name for - * @param array A lookup array to use instead of the default one - * @since 1.0.5 - * @todo Re-think about how this method works (maybe make it private and/or make it - * a extension->lang lookup?) - * @todo static? - */ - function get_language_name_from_extension( $extension, $lookup = array() ) { - if ( !is_array($lookup) || empty($lookup)) { - $lookup = array( - '6502acme' => array( 'a', 's', 'asm', 'inc' ), - '6502tasm' => array( 'a', 's', 'asm', 'inc' ), - '6502kickass' => array( 'a', 's', 'asm', 'inc' ), - '68000devpac' => array( 'a', 's', 'asm', 'inc' ), - 'abap' => array('abap'), - 'actionscript' => array('as'), - 'ada' => array('a', 'ada', 'adb', 'ads'), - 'apache' => array('conf'), - 'asm' => array('ash', 'asm', 'inc'), - 'asp' => array('asp'), - 'bash' => array('sh'), - 'bf' => array('bf'), - 'c' => array('c', 'h'), - 'c_mac' => array('c', 'h'), - 'caddcl' => array(), - 'cadlisp' => array(), - 'cdfg' => array('cdfg'), - 'cobol' => array('cbl'), - 'cpp' => array('cpp', 'hpp', 'C', 'H', 'CPP', 'HPP'), - 'csharp' => array('cs'), - 'css' => array('css'), - 'd' => array('d'), - 'delphi' => array('dpk', 'dpr', 'pp', 'pas'), - 'diff' => array('diff', 'patch'), - 'dos' => array('bat', 'cmd'), - 'gdb' => array('kcrash', 'crash', 'bt'), - 'gettext' => array('po', 'pot'), - 'gml' => array('gml'), - 'gnuplot' => array('plt'), - 'groovy' => array('groovy'), - 'haskell' => array('hs'), - 'html4strict' => array('html', 'htm'), - 'ini' => array('ini', 'desktop'), - 'java' => array('java'), - 'javascript' => array('js'), - 'klonec' => array('kl1'), - 'klonecpp' => array('klx'), - 'latex' => array('tex'), - 'lisp' => array('lisp'), - 'lua' => array('lua'), - 'matlab' => array('m'), - 'mpasm' => array(), - 'mysql' => array('sql'), - 'nsis' => array(), - 'objc' => array(), - 'oobas' => array(), - 'oracle8' => array(), - 'oracle10' => array(), - 'pascal' => array('pas'), - 'perl' => array('pl', 'pm'), - 'php' => array('php', 'php5', 'phtml', 'phps'), - 'povray' => array('pov'), - 'providex' => array('pvc', 'pvx'), - 'prolog' => array('pl'), - 'python' => array('py'), - 'qbasic' => array('bi'), - 'reg' => array('reg'), - 'ruby' => array('rb'), - 'sas' => array('sas'), - 'scala' => array('scala'), - 'scheme' => array('scm'), - 'scilab' => array('sci'), - 'smalltalk' => array('st'), - 'smarty' => array(), - 'tcl' => array('tcl'), - 'vb' => array('bas'), - 'vbnet' => array(), - 'visualfoxpro' => array(), - 'whitespace' => array('ws'), - 'xml' => array('xml', 'svg', 'xrc'), - 'z80' => array('z80', 'asm', 'inc') - ); - } - - foreach ($lookup as $lang => $extensions) { - if (in_array($extension, $extensions)) { - return $lang; - } - } - return ''; - } - - /** - * Given a file name, this method loads its contents in, and attempts - * to set the language automatically. An optional lookup table can be - * passed for looking up the language name. If not specified a default - * table is used - * - * The language table is in the form - *
            array(
            -     *   'lang_name' => array('extension', 'extension', ...),
            -     *   'lang_name' ...
            -     * );
            - * - * @param string The filename to load the source from - * @param array A lookup array to use instead of the default one - * @todo Complete rethink of this and above method - * @since 1.0.5 - */ - function load_from_file($file_name, $lookup = array()) { - if (is_readable($file_name)) { - $this->set_source(file_get_contents($file_name)); - $this->set_language($this->get_language_name_from_extension(substr(strrchr($file_name, '.'), 1), $lookup)); - } else { - $this->error = GESHI_ERROR_FILE_NOT_READABLE; - } - } - - /** - * Adds a keyword to a keyword group for highlighting - * - * @param int The key of the keyword group to add the keyword to - * @param string The word to add to the keyword group - * @since 1.0.0 - */ - function add_keyword($key, $word) { - if (!in_array($word, $this->language_data['KEYWORDS'][$key])) { - $this->language_data['KEYWORDS'][$key][] = $word; - - //NEW in 1.0.8 don't recompile the whole optimized regexp, simply append it - if ($this->parse_cache_built) { - $subkey = count($this->language_data['CACHED_KEYWORD_LISTS'][$key]) - 1; - $this->language_data['CACHED_KEYWORD_LISTS'][$key][$subkey] .= '|' . preg_quote($word, '/'); - } - } - } - - /** - * Removes a keyword from a keyword group - * - * @param int The key of the keyword group to remove the keyword from - * @param string The word to remove from the keyword group - * @param bool Wether to automatically recompile the optimized regexp list or not. - * Note: if you set this to false and @see GeSHi->parse_code() was already called once, - * for the current language, you have to manually call @see GeSHi->optimize_keyword_group() - * or the removed keyword will stay in cache and still be highlighted! On the other hand - * it might be too expensive to recompile the regexp list for every removal if you want to - * remove a lot of keywords. - * @since 1.0.0 - */ - function remove_keyword($key, $word, $recompile = true) { - $key_to_remove = array_search($word, $this->language_data['KEYWORDS'][$key]); - if ($key_to_remove !== false) { - unset($this->language_data['KEYWORDS'][$key][$key_to_remove]); - - //NEW in 1.0.8, optionally recompile keyword group - if ($recompile && $this->parse_cache_built) { - $this->optimize_keyword_group($key); - } - } - } - - /** - * Creates a new keyword group - * - * @param int The key of the keyword group to create - * @param string The styles for the keyword group - * @param boolean Whether the keyword group is case sensitive ornot - * @param array The words to use for the keyword group - * @since 1.0.0 - */ - function add_keyword_group($key, $styles, $case_sensitive = true, $words = array()) { - $words = (array) $words; - if (empty($words)) { - // empty word lists mess up highlighting - return false; - } - - //Add the new keyword group internally - $this->language_data['KEYWORDS'][$key] = $words; - $this->lexic_permissions['KEYWORDS'][$key] = true; - $this->language_data['CASE_SENSITIVE'][$key] = $case_sensitive; - $this->language_data['STYLES']['KEYWORDS'][$key] = $styles; - - //NEW in 1.0.8, cache keyword regexp - if ($this->parse_cache_built) { - $this->optimize_keyword_group($key); - } - } - - /** - * Removes a keyword group - * - * @param int The key of the keyword group to remove - * @since 1.0.0 - */ - function remove_keyword_group ($key) { - //Remove the keyword group internally - unset($this->language_data['KEYWORDS'][$key]); - unset($this->lexic_permissions['KEYWORDS'][$key]); - unset($this->language_data['CASE_SENSITIVE'][$key]); - unset($this->language_data['STYLES']['KEYWORDS'][$key]); - - //NEW in 1.0.8 - unset($this->language_data['CACHED_KEYWORD_LISTS'][$key]); - } - - /** - * compile optimized regexp list for keyword group - * - * @param int The key of the keyword group to compile & optimize - * @since 1.0.8 - */ - function optimize_keyword_group($key) { - $this->language_data['CACHED_KEYWORD_LISTS'][$key] = - $this->optimize_regexp_list($this->language_data['KEYWORDS'][$key]); - $space_as_whitespace = false; - if(isset($this->language_data['PARSER_CONTROL'])) { - if(isset($this->language_data['PARSER_CONTROL']['KEYWORDS'])) { - if(isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['SPACE_AS_WHITESPACE'])) { - $space_as_whitespace = $this->language_data['PARSER_CONTROL']['KEYWORDS']['SPACE_AS_WHITESPACE']; - } - if(isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$key]['SPACE_AS_WHITESPACE'])) { - if(isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$key]['SPACE_AS_WHITESPACE'])) { - $space_as_whitespace = $this->language_data['PARSER_CONTROL']['KEYWORDS'][$key]['SPACE_AS_WHITESPACE']; - } - } - } - } - if($space_as_whitespace) { - foreach($this->language_data['CACHED_KEYWORD_LISTS'][$key] as $rxk => $rxv) { - $this->language_data['CACHED_KEYWORD_LISTS'][$key][$rxk] = - str_replace(" ", "\\s+", $rxv); - } - } - } - - /** - * Sets the content of the header block - * - * @param string The content of the header block - * @since 1.0.2 - */ - function set_header_content($content) { - $this->header_content = $content; - } - - /** - * Sets the content of the footer block - * - * @param string The content of the footer block - * @since 1.0.2 - */ - function set_footer_content($content) { - $this->footer_content = $content; - } - - /** - * Sets the style for the header content - * - * @param string The style for the header content - * @since 1.0.2 - */ - function set_header_content_style($style) { - $this->header_content_style = $style; - } - - /** - * Sets the style for the footer content - * - * @param string The style for the footer content - * @since 1.0.2 - */ - function set_footer_content_style($style) { - $this->footer_content_style = $style; - } - - /** - * Sets whether to force a surrounding block around - * the highlighted code or not - * - * @param boolean Tells whether to enable or disable this feature - * @since 1.0.7.20 - */ - function enable_inner_code_block($flag) { - $this->force_code_block = (bool)$flag; - } - - /** - * Sets the base URL to be used for keywords - * - * @param int The key of the keyword group to set the URL for - * @param string The URL to set for the group. If {FNAME} is in - * the url somewhere, it is replaced by the keyword - * that the URL is being made for - * @since 1.0.2 - */ - function set_url_for_keyword_group($group, $url) { - $this->language_data['URLS'][$group] = $url; - } - - /** - * Sets styles for links in code - * - * @param int A constant that specifies what state the style is being - * set for - e.g. :hover or :visited - * @param string The styles to use for that state - * @since 1.0.2 - */ - function set_link_styles($type, $styles) { - $this->link_styles[$type] = $styles; - } - - /** - * Sets the target for links in code - * - * @param string The target for links in the code, e.g. _blank - * @since 1.0.3 - */ - function set_link_target($target) { - if (!$target) { - $this->link_target = ''; - } else { - $this->link_target = ' target="' . $target . '"'; - } - } - - /** - * Sets styles for important parts of the code - * - * @param string The styles to use on important parts of the code - * @since 1.0.2 - */ - function set_important_styles($styles) { - $this->important_styles = $styles; - } - - /** - * Sets whether context-important blocks are highlighted - * - * @param boolean Tells whether to enable or disable highlighting of important blocks - * @todo REMOVE THIS SHIZ FROM GESHI! - * @deprecated - * @since 1.0.2 - */ - function enable_important_blocks($flag) { - $this->enable_important_blocks = ( $flag ) ? true : false; - } - - /** - * Whether CSS IDs should be added to each line - * - * @param boolean If true, IDs will be added to each line. - * @since 1.0.2 - */ - function enable_ids($flag = true) { - $this->add_ids = ($flag) ? true : false; - } - - /** - * Specifies which lines to highlight extra - * - * The extra style parameter was added in 1.0.7.21. - * - * @param mixed An array of line numbers to highlight, or just a line - * number on its own. - * @param string A string specifying the style to use for this line. - * If null is specified, the default style is used. - * If false is specified, the line will be removed from - * special highlighting - * @since 1.0.2 - * @todo Some data replication here that could be cut down on - */ - function highlight_lines_extra($lines, $style = null) { - if (is_array($lines)) { - //Split up the job using single lines at a time - foreach ($lines as $line) { - $this->highlight_lines_extra($line, $style); - } - } else { - //Mark the line as being highlighted specially - $lines = intval($lines); - $this->highlight_extra_lines[$lines] = $lines; - - //Decide on which style to use - if ($style === null) { //Check if we should use default style - unset($this->highlight_extra_lines_styles[$lines]); - } else if ($style === false) { //Check if to remove this line - unset($this->highlight_extra_lines[$lines]); - unset($this->highlight_extra_lines_styles[$lines]); - } else { - $this->highlight_extra_lines_styles[$lines] = $style; - } - } - } - - /** - * Sets the style for extra-highlighted lines - * - * @param string The style for extra-highlighted lines - * @since 1.0.2 - */ - function set_highlight_lines_extra_style($styles) { - $this->highlight_extra_lines_style = $styles; - } - - /** - * Sets the line-ending - * - * @param string The new line-ending - * @since 1.0.2 - */ - function set_line_ending($line_ending) { - $this->line_ending = (string)$line_ending; - } - - /** - * Sets what number line numbers should start at. Should - * be a positive integer, and will be converted to one. - * - * Warning: Using this method will add the "start" - * attribute to the <ol> that is used for line numbering. - * This is not valid XHTML strict, so if that's what you - * care about then don't use this method. Firefox is getting - * support for the CSS method of doing this in 1.1 and Opera - * has support for the CSS method, but (of course) IE doesn't - * so it's not worth doing it the CSS way yet. - * - * @param int The number to start line numbers at - * @since 1.0.2 - */ - function start_line_numbers_at($number) { - $this->line_numbers_start = abs(intval($number)); - } - - /** - * Sets the encoding used for htmlspecialchars(), for international - * support. - * - * NOTE: This is not needed for now because htmlspecialchars() is not - * being used (it has a security hole in PHP4 that has not been patched). - * Maybe in a future version it may make a return for speed reasons, but - * I doubt it. - * - * @param string The encoding to use for the source - * @since 1.0.3 - */ - function set_encoding($encoding) { - if ($encoding) { - $this->encoding = strtolower($encoding); - } - } - - /** - * Turns linking of keywords on or off. - * - * @param boolean If true, links will be added to keywords - * @since 1.0.2 - */ - function enable_keyword_links($enable = true) { - $this->keyword_links = (bool) $enable; - } - - /** - * Setup caches needed for styling. This is automatically called in - * parse_code() and get_stylesheet() when appropriate. This function helps - * stylesheet generators as they rely on some style information being - * preprocessed - * - * @since 1.0.8 - * @access private - */ - function build_style_cache() { - //Build the style cache needed to highlight numbers appropriate - if($this->lexic_permissions['NUMBERS']) { - //First check what way highlighting information for numbers are given - if(!isset($this->language_data['NUMBERS'])) { - $this->language_data['NUMBERS'] = 0; - } - - if(is_array($this->language_data['NUMBERS'])) { - $this->language_data['NUMBERS_CACHE'] = $this->language_data['NUMBERS']; - } else { - $this->language_data['NUMBERS_CACHE'] = array(); - if(!$this->language_data['NUMBERS']) { - $this->language_data['NUMBERS'] = - GESHI_NUMBER_INT_BASIC | - GESHI_NUMBER_FLT_NONSCI; - } - - for($i = 0, $j = $this->language_data['NUMBERS']; $j > 0; ++$i, $j>>=1) { - //Rearrange style indices if required ... - if(isset($this->language_data['STYLES']['NUMBERS'][1<<$i])) { - $this->language_data['STYLES']['NUMBERS'][$i] = - $this->language_data['STYLES']['NUMBERS'][1<<$i]; - unset($this->language_data['STYLES']['NUMBERS'][1<<$i]); - } - - //Check if this bit is set for highlighting - if($j&1) { - //So this bit is set ... - //Check if it belongs to group 0 or the actual stylegroup - if(isset($this->language_data['STYLES']['NUMBERS'][$i])) { - $this->language_data['NUMBERS_CACHE'][$i] = 1 << $i; - } else { - if(!isset($this->language_data['NUMBERS_CACHE'][0])) { - $this->language_data['NUMBERS_CACHE'][0] = 0; - } - $this->language_data['NUMBERS_CACHE'][0] |= 1 << $i; - } - } - } - } - } - } - - /** - * Setup caches needed for parsing. This is automatically called in parse_code() when appropriate. - * This function makes stylesheet generators much faster as they do not need these caches. - * - * @since 1.0.8 - * @access private - */ - function build_parse_cache() { - // cache symbol regexp - //As this is a costy operation, we avoid doing it for multiple groups ... - //Instead we perform it for all symbols at once. - // - //For this to work, we need to reorganize the data arrays. - if ($this->lexic_permissions['SYMBOLS'] && !empty($this->language_data['SYMBOLS'])) { - $this->language_data['MULTIPLE_SYMBOL_GROUPS'] = count($this->language_data['STYLES']['SYMBOLS']) > 1; - - $this->language_data['SYMBOL_DATA'] = array(); - $symbol_preg_multi = array(); // multi char symbols - $symbol_preg_single = array(); // single char symbols - foreach ($this->language_data['SYMBOLS'] as $key => $symbols) { - if (is_array($symbols)) { - foreach ($symbols as $sym) { - $sym = $this->hsc($sym); - if (!isset($this->language_data['SYMBOL_DATA'][$sym])) { - $this->language_data['SYMBOL_DATA'][$sym] = $key; - if (isset($sym[1])) { // multiple chars - $symbol_preg_multi[] = preg_quote($sym, '/'); - } else { // single char - if ($sym == '-') { - // don't trigger range out of order error - $symbol_preg_single[] = '\-'; - } else { - $symbol_preg_single[] = preg_quote($sym, '/'); - } - } - } - } - } else { - $symbols = $this->hsc($symbols); - if (!isset($this->language_data['SYMBOL_DATA'][$symbols])) { - $this->language_data['SYMBOL_DATA'][$symbols] = 0; - if (isset($symbols[1])) { // multiple chars - $symbol_preg_multi[] = preg_quote($symbols, '/'); - } else if ($symbols == '-') { - // don't trigger range out of order error - $symbol_preg_single[] = '\-'; - } else { // single char - $symbol_preg_single[] = preg_quote($symbols, '/'); - } - } - } - } - - //Now we have an array with each possible symbol as the key and the style as the actual data. - //This way we can set the correct style just the moment we highlight ... - // - //Now we need to rewrite our array to get a search string that - $symbol_preg = array(); - if (!empty($symbol_preg_multi)) { - rsort($symbol_preg_multi); - $symbol_preg[] = implode('|', $symbol_preg_multi); - } - if (!empty($symbol_preg_single)) { - rsort($symbol_preg_single); - $symbol_preg[] = '[' . implode('', $symbol_preg_single) . ']'; - } - $this->language_data['SYMBOL_SEARCH'] = implode("|", $symbol_preg); - } - - // cache optimized regexp for keyword matching - // remove old cache - $this->language_data['CACHED_KEYWORD_LISTS'] = array(); - foreach (array_keys($this->language_data['KEYWORDS']) as $key) { - if (!isset($this->lexic_permissions['KEYWORDS'][$key]) || - $this->lexic_permissions['KEYWORDS'][$key]) { - $this->optimize_keyword_group($key); - } - } - - // brackets - if ($this->lexic_permissions['BRACKETS']) { - $this->language_data['CACHE_BRACKET_MATCH'] = array('[', ']', '(', ')', '{', '}'); - if (!$this->use_classes && isset($this->language_data['STYLES']['BRACKETS'][0])) { - $this->language_data['CACHE_BRACKET_REPLACE'] = array( - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">[|>', - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">]|>', - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">(|>', - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">)|>', - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">{|>', - '<| style="' . $this->language_data['STYLES']['BRACKETS'][0] . '">}|>', - ); - } - else { - $this->language_data['CACHE_BRACKET_REPLACE'] = array( - '<| class="br0">[|>', - '<| class="br0">]|>', - '<| class="br0">(|>', - '<| class="br0">)|>', - '<| class="br0">{|>', - '<| class="br0">}|>', - ); - } - } - - //Build the parse cache needed to highlight numbers appropriate - if($this->lexic_permissions['NUMBERS']) { - //Check if the style rearrangements have been processed ... - //This also does some preprocessing to check which style groups are useable ... - if(!isset($this->language_data['NUMBERS_CACHE'])) { - $this->build_style_cache(); - } - - //Number format specification - //All this formats are matched case-insensitively! - static $numbers_format = array( - GESHI_NUMBER_INT_BASIC => - '(?:(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(? - '(?language_data['NUMBERS_RXCACHE'] = array(); - foreach($this->language_data['NUMBERS_CACHE'] as $key => $rxdata) { - if(is_string($rxdata)) { - $regexp = $rxdata; - } else { - //This is a bitfield of number flags to highlight: - //Build an array, implode them together and make this the actual RX - $rxuse = array(); - for($i = 1; $i <= $rxdata; $i<<=1) { - if($rxdata & $i) { - $rxuse[] = $numbers_format[$i]; - } - } - $regexp = implode("|", $rxuse); - } - - $this->language_data['NUMBERS_RXCACHE'][$key] = - "/(?)($regexp)(?!(?:|(?>[^\<]))+>)(?![^<]*>)(?!\|>)(?!\/>)/i"; // - } - - if(!isset($this->language_data['PARSER_CONTROL']['NUMBERS']['PRECHECK_RX'])) { - $this->language_data['PARSER_CONTROL']['NUMBERS']['PRECHECK_RX'] = '#\d#'; - } - } - - $this->parse_cache_built = true; - } - - /** - * Returns the code in $this->source, highlighted and surrounded by the - * nessecary HTML. - * - * This should only be called ONCE, cos it's SLOW! If you want to highlight - * the same source multiple times, you're better off doing a whole lot of - * str_replaces to replace the <span>s - * - * @since 1.0.0 - */ - function parse_code () { - // Start the timer - $start_time = microtime(); - - // Replace all newlines to a common form. - $code = str_replace("\r\n", "\n", $this->source); - $code = str_replace("\r", "\n", $code); - - // Firstly, if there is an error, we won't highlight - if ($this->error) { - //Escape the source for output - $result = $this->hsc($this->source); - - //This fix is related to SF#1923020, but has to be applied regardless of - //actually highlighting symbols. - $result = str_replace(array('', ''), array(';', '|'), $result); - - // Timing is irrelevant - $this->set_time($start_time, $start_time); - $this->finalise($result); - return $result; - } - - // make sure the parse cache is up2date - if (!$this->parse_cache_built) { - $this->build_parse_cache(); - } - - // Initialise various stuff - $length = strlen($code); - $COMMENT_MATCHED = false; - $stuff_to_parse = ''; - $endresult = ''; - - // "Important" selections are handled like multiline comments - // @todo GET RID OF THIS SHIZ - if ($this->enable_important_blocks) { - $this->language_data['COMMENT_MULTI'][GESHI_START_IMPORTANT] = GESHI_END_IMPORTANT; - } - - if ($this->strict_mode) { - // Break the source into bits. Each bit will be a portion of the code - // within script delimiters - for example, HTML between < and > - $k = 0; - $parts = array(); - $matches = array(); - $next_match_pointer = null; - // we use a copy to unset delimiters on demand (when they are not found) - $delim_copy = $this->language_data['SCRIPT_DELIMITERS']; - $i = 0; - while ($i < $length) { - $next_match_pos = $length + 1; // never true - foreach ($delim_copy as $dk => $delimiters) { - if(is_array($delimiters)) { - foreach ($delimiters as $open => $close) { - // make sure the cache is setup properly - if (!isset($matches[$dk][$open])) { - $matches[$dk][$open] = array( - 'next_match' => -1, - 'dk' => $dk, - - 'open' => $open, // needed for grouping of adjacent code blocks (see below) - 'open_strlen' => strlen($open), - - 'close' => $close, - 'close_strlen' => strlen($close), - ); - } - // Get the next little bit for this opening string - if ($matches[$dk][$open]['next_match'] < $i) { - // only find the next pos if it was not already cached - $open_pos = strpos($code, $open, $i); - if ($open_pos === false) { - // no match for this delimiter ever - unset($delim_copy[$dk][$open]); - continue; - } - $matches[$dk][$open]['next_match'] = $open_pos; - } - if ($matches[$dk][$open]['next_match'] < $next_match_pos) { - //So we got a new match, update the close_pos - $matches[$dk][$open]['close_pos'] = - strpos($code, $close, $matches[$dk][$open]['next_match']+1); - - $next_match_pointer =& $matches[$dk][$open]; - $next_match_pos = $matches[$dk][$open]['next_match']; - } - } - } else { - //So we should match an RegExp as Strict Block ... - /** - * The value in $delimiters is expected to be an RegExp - * containing exactly 2 matching groups: - * - Group 1 is the opener - * - Group 2 is the closer - */ - if(!GESHI_PHP_PRE_433 && //Needs proper rewrite to work with PHP >=4.3.0; 4.3.3 is guaranteed to work. - preg_match($delimiters, $code, $matches_rx, PREG_OFFSET_CAPTURE, $i)) { - //We got a match ... - if(isset($matches_rx['start']) && isset($matches_rx['end'])) - { - $matches[$dk] = array( - 'next_match' => $matches_rx['start'][1], - 'dk' => $dk, - - 'close_strlen' => strlen($matches_rx['end'][0]), - 'close_pos' => $matches_rx['end'][1], - ); - } else { - $matches[$dk] = array( - 'next_match' => $matches_rx[1][1], - 'dk' => $dk, - - 'close_strlen' => strlen($matches_rx[2][0]), - 'close_pos' => $matches_rx[2][1], - ); - } - } else { - // no match for this delimiter ever - unset($delim_copy[$dk]); - continue; - } - - if ($matches[$dk]['next_match'] <= $next_match_pos) { - $next_match_pointer =& $matches[$dk]; - $next_match_pos = $matches[$dk]['next_match']; - } - } - } - - // non-highlightable text - $parts[$k] = array( - 1 => substr($code, $i, $next_match_pos - $i) - ); - ++$k; - - if ($next_match_pos > $length) { - // out of bounds means no next match was found - break; - } - - // highlightable code - $parts[$k][0] = $next_match_pointer['dk']; - - //Only combine for non-rx script blocks - if(is_array($delim_copy[$next_match_pointer['dk']])) { - // group adjacent script blocks, e.g. should be one block, not three! - $i = $next_match_pos + $next_match_pointer['open_strlen']; - while (true) { - $close_pos = strpos($code, $next_match_pointer['close'], $i); - if ($close_pos == false) { - break; - } - $i = $close_pos + $next_match_pointer['close_strlen']; - if ($i == $length) { - break; - } - if ($code[$i] == $next_match_pointer['open'][0] && ($next_match_pointer['open_strlen'] == 1 || - substr($code, $i, $next_match_pointer['open_strlen']) == $next_match_pointer['open'])) { - // merge adjacent but make sure we don't merge things like - foreach ($matches as $submatches) { - foreach ($submatches as $match) { - if ($match['next_match'] == $i) { - // a different block already matches here! - break 3; - } - } - } - } else { - break; - } - } - } else { - $close_pos = $next_match_pointer['close_pos'] + $next_match_pointer['close_strlen']; - $i = $close_pos; - } - - if ($close_pos === false) { - // no closing delimiter found! - $parts[$k][1] = substr($code, $next_match_pos); - ++$k; - break; - } else { - $parts[$k][1] = substr($code, $next_match_pos, $i - $next_match_pos); - ++$k; - } - } - unset($delim_copy, $next_match_pointer, $next_match_pos, $matches); - $num_parts = $k; - - if ($num_parts == 1 && $this->strict_mode == GESHI_MAYBE) { - // when we have only one part, we don't have anything to highlight at all. - // if we have a "maybe" strict language, this should be handled as highlightable code - $parts = array( - 0 => array( - 0 => '', - 1 => '' - ), - 1 => array( - 0 => null, - 1 => $parts[0][1] - ) - ); - $num_parts = 2; - } - - } else { - // Not strict mode - simply dump the source into - // the array at index 1 (the first highlightable block) - $parts = array( - 0 => array( - 0 => '', - 1 => '' - ), - 1 => array( - 0 => null, - 1 => $code - ) - ); - $num_parts = 2; - } - - //Unset variables we won't need any longer - unset($code); - - //Preload some repeatedly used values regarding hardquotes ... - $hq = isset($this->language_data['HARDQUOTE']) ? $this->language_data['HARDQUOTE'][0] : false; - $hq_strlen = strlen($hq); - - //Preload if line numbers are to be generated afterwards - //Added a check if line breaks should be forced even without line numbers, fixes SF#1727398 - $check_linenumbers = $this->line_numbers != GESHI_NO_LINE_NUMBERS || - !empty($this->highlight_extra_lines) || !$this->allow_multiline_span; - - //preload the escape char for faster checking ... - $escaped_escape_char = $this->hsc($this->language_data['ESCAPE_CHAR']); - - // this is used for single-line comments - $sc_disallowed_before = ""; - $sc_disallowed_after = ""; - - if (isset($this->language_data['PARSER_CONTROL'])) { - if (isset($this->language_data['PARSER_CONTROL']['COMMENTS'])) { - if (isset($this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_BEFORE'])) { - $sc_disallowed_before = $this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_BEFORE']; - } - if (isset($this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_AFTER'])) { - $sc_disallowed_after = $this->language_data['PARSER_CONTROL']['COMMENTS']['DISALLOWED_AFTER']; - } - } - } - - //Fix for SF#1932083: Multichar Quotemarks unsupported - $is_string_starter = array(); - if ($this->lexic_permissions['STRINGS']) { - foreach ($this->language_data['QUOTEMARKS'] as $quotemark) { - if (!isset($is_string_starter[$quotemark[0]])) { - $is_string_starter[$quotemark[0]] = (string)$quotemark; - } else if (is_string($is_string_starter[$quotemark[0]])) { - $is_string_starter[$quotemark[0]] = array( - $is_string_starter[$quotemark[0]], - $quotemark); - } else { - $is_string_starter[$quotemark[0]][] = $quotemark; - } - } - } - - // Now we go through each part. We know that even-indexed parts are - // code that shouldn't be highlighted, and odd-indexed parts should - // be highlighted - for ($key = 0; $key < $num_parts; ++$key) { - $STRICTATTRS = ''; - - // If this block should be highlighted... - if (!($key & 1)) { - // Else not a block to highlight - $endresult .= $this->hsc($parts[$key][1]); - unset($parts[$key]); - continue; - } - - $result = ''; - $part = $parts[$key][1]; - - $highlight_part = true; - if ($this->strict_mode && !is_null($parts[$key][0])) { - // get the class key for this block of code - $script_key = $parts[$key][0]; - $highlight_part = $this->language_data['HIGHLIGHT_STRICT_BLOCK'][$script_key]; - if ($this->language_data['STYLES']['SCRIPT'][$script_key] != '' && - $this->lexic_permissions['SCRIPT']) { - // Add a span element around the source to - // highlight the overall source block - if (!$this->use_classes && - $this->language_data['STYLES']['SCRIPT'][$script_key] != '') { - $attributes = ' style="' . $this->language_data['STYLES']['SCRIPT'][$script_key] . '"'; - } else { - $attributes = ' class="sc' . $script_key . '"'; - } - $result .= ""; - $STRICTATTRS = $attributes; - } - } - - if ($highlight_part) { - // Now, highlight the code in this block. This code - // is really the engine of GeSHi (along with the method - // parse_non_string_part). - - // cache comment regexps incrementally - $next_comment_regexp_key = ''; - $next_comment_regexp_pos = -1; - $next_comment_multi_pos = -1; - $next_comment_single_pos = -1; - $comment_regexp_cache_per_key = array(); - $comment_multi_cache_per_key = array(); - $comment_single_cache_per_key = array(); - $next_open_comment_multi = ''; - $next_comment_single_key = ''; - $escape_regexp_cache_per_key = array(); - $next_escape_regexp_key = ''; - $next_escape_regexp_pos = -1; - - $length = strlen($part); - for ($i = 0; $i < $length; ++$i) { - // Get the next char - $char = $part[$i]; - $char_len = 1; - - // update regexp comment cache if needed - if (isset($this->language_data['COMMENT_REGEXP']) && $next_comment_regexp_pos < $i) { - $next_comment_regexp_pos = $length; - foreach ($this->language_data['COMMENT_REGEXP'] as $comment_key => $regexp) { - $match_i = false; - if (isset($comment_regexp_cache_per_key[$comment_key]) && - ($comment_regexp_cache_per_key[$comment_key]['pos'] >= $i || - $comment_regexp_cache_per_key[$comment_key]['pos'] === false)) { - // we have already matched something - if ($comment_regexp_cache_per_key[$comment_key]['pos'] === false) { - // this comment is never matched - continue; - } - $match_i = $comment_regexp_cache_per_key[$comment_key]['pos']; - } else if ( - //This is to allow use of the offset parameter in preg_match and stay as compatible with older PHP versions as possible - (GESHI_PHP_PRE_433 && preg_match($regexp, substr($part, $i), $match, PREG_OFFSET_CAPTURE)) || - (!GESHI_PHP_PRE_433 && preg_match($regexp, $part, $match, PREG_OFFSET_CAPTURE, $i)) - ) { - $match_i = $match[0][1]; - if (GESHI_PHP_PRE_433) { - $match_i += $i; - } - - $comment_regexp_cache_per_key[$comment_key] = array( - 'key' => $comment_key, - 'length' => strlen($match[0][0]), - 'pos' => $match_i - ); - } else { - $comment_regexp_cache_per_key[$comment_key]['pos'] = false; - continue; - } - - if ($match_i !== false && $match_i < $next_comment_regexp_pos) { - $next_comment_regexp_pos = $match_i; - $next_comment_regexp_key = $comment_key; - if ($match_i === $i) { - break; - } - } - } - } - - $string_started = false; - - if (isset($is_string_starter[$char])) { - // Possibly the start of a new string ... - - //Check which starter it was ... - //Fix for SF#1932083: Multichar Quotemarks unsupported - if (is_array($is_string_starter[$char])) { - $char_new = ''; - foreach ($is_string_starter[$char] as $testchar) { - if ($testchar === substr($part, $i, strlen($testchar)) && - strlen($testchar) > strlen($char_new)) { - $char_new = $testchar; - $string_started = true; - } - } - if ($string_started) { - $char = $char_new; - } - } else { - $testchar = $is_string_starter[$char]; - if ($testchar === substr($part, $i, strlen($testchar))) { - $char = $testchar; - $string_started = true; - } - } - $char_len = strlen($char); - } - - if ($string_started && ($i != $next_comment_regexp_pos)) { - // Hand out the correct style information for this string - $string_key = array_search($char, $this->language_data['QUOTEMARKS']); - if (!isset($this->language_data['STYLES']['STRINGS'][$string_key]) || - !isset($this->language_data['STYLES']['ESCAPE_CHAR'][$string_key])) { - $string_key = 0; - } - - // parse the stuff before this - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - - if (!$this->use_classes) { - $string_attributes = ' style="' . $this->language_data['STYLES']['STRINGS'][$string_key] . '"'; - } else { - $string_attributes = ' class="st'.$string_key.'"'; - } - - // now handle the string - $string = "" . GeSHi::hsc($char); - $start = $i + $char_len; - $string_open = true; - - if(empty($this->language_data['ESCAPE_REGEXP'])) { - $next_escape_regexp_pos = $length; - } - - do { - //Get the regular ending pos ... - $close_pos = strpos($part, $char, $start); - if(false === $close_pos) { - $close_pos = $length; - } - - if($this->lexic_permissions['ESCAPE_CHAR']) { - // update escape regexp cache if needed - if (isset($this->language_data['ESCAPE_REGEXP']) && $next_escape_regexp_pos < $start) { - $next_escape_regexp_pos = $length; - foreach ($this->language_data['ESCAPE_REGEXP'] as $escape_key => $regexp) { - $match_i = false; - if (isset($escape_regexp_cache_per_key[$escape_key]) && - ($escape_regexp_cache_per_key[$escape_key]['pos'] >= $start || - $escape_regexp_cache_per_key[$escape_key]['pos'] === false)) { - // we have already matched something - if ($escape_regexp_cache_per_key[$escape_key]['pos'] === false) { - // this comment is never matched - continue; - } - $match_i = $escape_regexp_cache_per_key[$escape_key]['pos']; - } else if ( - //This is to allow use of the offset parameter in preg_match and stay as compatible with older PHP versions as possible - (GESHI_PHP_PRE_433 && preg_match($regexp, substr($part, $start), $match, PREG_OFFSET_CAPTURE)) || - (!GESHI_PHP_PRE_433 && preg_match($regexp, $part, $match, PREG_OFFSET_CAPTURE, $start)) - ) { - $match_i = $match[0][1]; - if (GESHI_PHP_PRE_433) { - $match_i += $start; - } - - $escape_regexp_cache_per_key[$escape_key] = array( - 'key' => $escape_key, - 'length' => strlen($match[0][0]), - 'pos' => $match_i - ); - } else { - $escape_regexp_cache_per_key[$escape_key]['pos'] = false; - continue; - } - - if ($match_i !== false && $match_i < $next_escape_regexp_pos) { - $next_escape_regexp_pos = $match_i; - $next_escape_regexp_key = $escape_key; - if ($match_i === $start) { - break; - } - } - } - } - - //Find the next simple escape position - if('' != $this->language_data['ESCAPE_CHAR']) { - $simple_escape = strpos($part, $this->language_data['ESCAPE_CHAR'], $start); - if(false === $simple_escape) { - $simple_escape = $length; - } - } else { - $simple_escape = $length; - } - } else { - $next_escape_regexp_pos = $length; - $simple_escape = $length; - } - - if($simple_escape < $next_escape_regexp_pos && - $simple_escape < $length && - $simple_escape < $close_pos) { - //The nexxt escape sequence is a simple one ... - $es_pos = $simple_escape; - - //Add the stuff not in the string yet ... - $string .= $this->hsc(substr($part, $start, $es_pos - $start)); - - //Get the style for this escaped char ... - if (!$this->use_classes) { - $escape_char_attributes = ' style="' . $this->language_data['STYLES']['ESCAPE_CHAR'][0] . '"'; - } else { - $escape_char_attributes = ' class="es0"'; - } - - //Add the style for the escape char ... - $string .= "" . - GeSHi::hsc($this->language_data['ESCAPE_CHAR']); - - //Get the byte AFTER the ESCAPE_CHAR we just found - $es_char = $part[$es_pos + 1]; - if ($es_char == "\n") { - // don't put a newline around newlines - $string .= "
            \n"; - $start = $es_pos + 2; - } else if (ord($es_char) >= 128) { - //This is an non-ASCII char (UTF8 or single byte) - //This code tries to work around SF#2037598 ... - if(function_exists('mb_substr')) { - $es_char_m = mb_substr(substr($part, $es_pos+1, 16), 0, 1, $this->encoding); - $string .= $es_char_m . '
            '; - } else if (!GESHI_PHP_PRE_433 && 'utf-8' == $this->encoding) { - if(preg_match("/[\xC2-\xDF][\x80-\xBF]". - "|\xE0[\xA0-\xBF][\x80-\xBF]". - "|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}". - "|\xED[\x80-\x9F][\x80-\xBF]". - "|\xF0[\x90-\xBF][\x80-\xBF]{2}". - "|[\xF1-\xF3][\x80-\xBF]{3}". - "|\xF4[\x80-\x8F][\x80-\xBF]{2}/s", - $part, $es_char_m, null, $es_pos + 1)) { - $es_char_m = $es_char_m[0]; - } else { - $es_char_m = $es_char; - } - $string .= $this->hsc($es_char_m) . '
            '; - } else { - $es_char_m = $this->hsc($es_char); - } - $start = $es_pos + strlen($es_char_m) + 1; - } else { - $string .= $this->hsc($es_char) . '
            '; - $start = $es_pos + 2; - } - } else if ($next_escape_regexp_pos < $length && - $next_escape_regexp_pos < $close_pos) { - $es_pos = $next_escape_regexp_pos; - //Add the stuff not in the string yet ... - $string .= $this->hsc(substr($part, $start, $es_pos - $start)); - - //Get the key and length of this match ... - $escape = $escape_regexp_cache_per_key[$next_escape_regexp_key]; - $escape_str = substr($part, $es_pos, $escape['length']); - $escape_key = $escape['key']; - - //Get the style for this escaped char ... - if (!$this->use_classes) { - $escape_char_attributes = ' style="' . $this->language_data['STYLES']['ESCAPE_CHAR'][$escape_key] . '"'; - } else { - $escape_char_attributes = ' class="es' . $escape_key . '"'; - } - - //Add the style for the escape char ... - $string .= "" . - $this->hsc($escape_str) . ''; - - $start = $es_pos + $escape['length']; - } else { - //Copy the remainder of the string ... - $string .= $this->hsc(substr($part, $start, $close_pos - $start + $char_len)) . ''; - $start = $close_pos + $char_len; - $string_open = false; - } - } while($string_open); - - if ($check_linenumbers) { - // Are line numbers used? If, we should end the string before - // the newline and begin it again (so when
          2. s are put in the source - // remains XHTML compliant) - // note to self: This opens up possibility of config files specifying - // that languages can/cannot have multiline strings??? - $string = str_replace("\n", "\n", $string); - } - - $result .= $string; - $string = ''; - $i = $start - 1; - continue; - } else if ($this->lexic_permissions['STRINGS'] && $hq && $hq[0] == $char && - substr($part, $i, $hq_strlen) == $hq && ($i != $next_comment_regexp_pos)) { - // The start of a hard quoted string - if (!$this->use_classes) { - $string_attributes = ' style="' . $this->language_data['STYLES']['STRINGS']['HARD'] . '"'; - $escape_char_attributes = ' style="' . $this->language_data['STYLES']['ESCAPE_CHAR']['HARD'] . '"'; - } else { - $string_attributes = ' class="st_h"'; - $escape_char_attributes = ' class="es_h"'; - } - // parse the stuff before this - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - - // now handle the string - $string = ''; - - // look for closing quote - $start = $i + $hq_strlen; - while ($close_pos = strpos($part, $this->language_data['HARDQUOTE'][1], $start)) { - $start = $close_pos + 1; - if ($this->lexic_permissions['ESCAPE_CHAR'] && $part[$close_pos - 1] == $this->language_data['HARDCHAR'] && - (($i + $hq_strlen) != ($close_pos))) { //Support empty string for HQ escapes if Starter = Escape - // make sure this quote is not escaped - foreach ($this->language_data['HARDESCAPE'] as $hardescape) { - if (substr($part, $close_pos - 1, strlen($hardescape)) == $hardescape) { - // check wether this quote is escaped or if it is something like '\\' - $escape_char_pos = $close_pos - 1; - while ($escape_char_pos > 0 - && $part[$escape_char_pos - 1] == $this->language_data['HARDCHAR']) { - --$escape_char_pos; - } - if (($close_pos - $escape_char_pos) & 1) { - // uneven number of escape chars => this quote is escaped - continue 2; - } - } - } - } - - // found closing quote - break; - } - - //Found the closing delimiter? - if (!$close_pos) { - // span till the end of this $part when no closing delimiter is found - $close_pos = $length; - } - - //Get the actual string - $string = substr($part, $i, $close_pos - $i + 1); - $i = $close_pos; - - // handle escape chars and encode html chars - // (special because when we have escape chars within our string they may not be escaped) - if ($this->lexic_permissions['ESCAPE_CHAR'] && $this->language_data['ESCAPE_CHAR']) { - $start = 0; - $new_string = ''; - while ($es_pos = strpos($string, $this->language_data['ESCAPE_CHAR'], $start)) { - // hmtl escape stuff before - $new_string .= $this->hsc(substr($string, $start, $es_pos - $start)); - // check if this is a hard escape - foreach ($this->language_data['HARDESCAPE'] as $hardescape) { - if (substr($string, $es_pos, strlen($hardescape)) == $hardescape) { - // indeed, this is a hardescape - $new_string .= "" . - $this->hsc($hardescape) . ''; - $start = $es_pos + strlen($hardescape); - continue 2; - } - } - // not a hard escape, but a normal escape - // they come in pairs of two - $c = 0; - while (isset($string[$es_pos + $c]) && isset($string[$es_pos + $c + 1]) - && $string[$es_pos + $c] == $this->language_data['ESCAPE_CHAR'] - && $string[$es_pos + $c + 1] == $this->language_data['ESCAPE_CHAR']) { - $c += 2; - } - if ($c) { - $new_string .= "" . - str_repeat($escaped_escape_char, $c) . - ''; - $start = $es_pos + $c; - } else { - // this is just a single lonely escape char... - $new_string .= $escaped_escape_char; - $start = $es_pos + 1; - } - } - $string = $new_string . $this->hsc(substr($string, $start)); - } else { - $string = $this->hsc($string); - } - - if ($check_linenumbers) { - // Are line numbers used? If, we should end the string before - // the newline and begin it again (so when
          3. s are put in the source - // remains XHTML compliant) - // note to self: This opens up possibility of config files specifying - // that languages can/cannot have multiline strings??? - $string = str_replace("\n", "\n", $string); - } - - $result .= "" . $string . ''; - $string = ''; - continue; - } else { - //Have a look for regexp comments - if ($i == $next_comment_regexp_pos) { - $COMMENT_MATCHED = true; - $comment = $comment_regexp_cache_per_key[$next_comment_regexp_key]; - $test_str = $this->hsc(substr($part, $i, $comment['length'])); - - //@todo If remove important do remove here - if ($this->lexic_permissions['COMMENTS']['MULTI']) { - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS'][$comment['key']] . '"'; - } else { - $attributes = ' class="co' . $comment['key'] . '"'; - } - - $test_str = "" . $test_str . ""; - - // Short-cut through all the multiline code - if ($check_linenumbers) { - // strreplace to put close span and open span around multiline newlines - $test_str = str_replace( - "\n", "\n", - str_replace("\n ", "\n ", $test_str) - ); - } - } - - $i += $comment['length'] - 1; - - // parse the rest - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - } - - // If we haven't matched a regexp comment, try multi-line comments - if (!$COMMENT_MATCHED) { - // Is this a multiline comment? - if (!empty($this->language_data['COMMENT_MULTI']) && $next_comment_multi_pos < $i) { - $next_comment_multi_pos = $length; - foreach ($this->language_data['COMMENT_MULTI'] as $open => $close) { - $match_i = false; - if (isset($comment_multi_cache_per_key[$open]) && - ($comment_multi_cache_per_key[$open] >= $i || - $comment_multi_cache_per_key[$open] === false)) { - // we have already matched something - if ($comment_multi_cache_per_key[$open] === false) { - // this comment is never matched - continue; - } - $match_i = $comment_multi_cache_per_key[$open]; - } else if (($match_i = stripos($part, $open, $i)) !== false) { - $comment_multi_cache_per_key[$open] = $match_i; - } else { - $comment_multi_cache_per_key[$open] = false; - continue; - } - if ($match_i !== false && $match_i < $next_comment_multi_pos) { - $next_comment_multi_pos = $match_i; - $next_open_comment_multi = $open; - if ($match_i === $i) { - break; - } - } - } - } - if ($i == $next_comment_multi_pos) { - $open = $next_open_comment_multi; - $close = $this->language_data['COMMENT_MULTI'][$open]; - $open_strlen = strlen($open); - $close_strlen = strlen($close); - $COMMENT_MATCHED = true; - $test_str_match = $open; - //@todo If remove important do remove here - if ($this->lexic_permissions['COMMENTS']['MULTI'] || - $open == GESHI_START_IMPORTANT) { - if ($open != GESHI_START_IMPORTANT) { - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS']['MULTI'] . '"'; - } else { - $attributes = ' class="coMULTI"'; - } - $test_str = "" . $this->hsc($open); - } else { - if (!$this->use_classes) { - $attributes = ' style="' . $this->important_styles . '"'; - } else { - $attributes = ' class="imp"'; - } - - // We don't include the start of the comment if it's an - // "important" part - $test_str = ""; - } - } else { - $test_str = $this->hsc($open); - } - - $close_pos = strpos( $part, $close, $i + $open_strlen ); - - if ($close_pos === false) { - $close_pos = $length; - } - - // Short-cut through all the multiline code - $rest_of_comment = $this->hsc(substr($part, $i + $open_strlen, $close_pos - $i - $open_strlen + $close_strlen)); - if (($this->lexic_permissions['COMMENTS']['MULTI'] || - $test_str_match == GESHI_START_IMPORTANT) && - $check_linenumbers) { - - // strreplace to put close span and open span around multiline newlines - $test_str .= str_replace( - "\n", "\n", - str_replace("\n ", "\n ", $rest_of_comment) - ); - } else { - $test_str .= $rest_of_comment; - } - - if ($this->lexic_permissions['COMMENTS']['MULTI'] || - $test_str_match == GESHI_START_IMPORTANT) { - $test_str .= ''; - } - - $i = $close_pos + $close_strlen - 1; - - // parse the rest - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - } - } - - // If we haven't matched a multiline comment, try single-line comments - if (!$COMMENT_MATCHED) { - // cache potential single line comment occurances - if (!empty($this->language_data['COMMENT_SINGLE']) && $next_comment_single_pos < $i) { - $next_comment_single_pos = $length; - foreach ($this->language_data['COMMENT_SINGLE'] as $comment_key => $comment_mark) { - $match_i = false; - if (isset($comment_single_cache_per_key[$comment_key]) && - ($comment_single_cache_per_key[$comment_key] >= $i || - $comment_single_cache_per_key[$comment_key] === false)) { - // we have already matched something - if ($comment_single_cache_per_key[$comment_key] === false) { - // this comment is never matched - continue; - } - $match_i = $comment_single_cache_per_key[$comment_key]; - } else if ( - // case sensitive comments - ($this->language_data['CASE_SENSITIVE'][GESHI_COMMENTS] && - ($match_i = stripos($part, $comment_mark, $i)) !== false) || - // non case sensitive - (!$this->language_data['CASE_SENSITIVE'][GESHI_COMMENTS] && - (($match_i = strpos($part, $comment_mark, $i)) !== false))) { - $comment_single_cache_per_key[$comment_key] = $match_i; - } else { - $comment_single_cache_per_key[$comment_key] = false; - continue; - } - if ($match_i !== false && $match_i < $next_comment_single_pos) { - $next_comment_single_pos = $match_i; - $next_comment_single_key = $comment_key; - if ($match_i === $i) { - break; - } - } - } - } - if ($next_comment_single_pos == $i) { - $comment_key = $next_comment_single_key; - $comment_mark = $this->language_data['COMMENT_SINGLE'][$comment_key]; - $com_len = strlen($comment_mark); - - // This check will find special variables like $# in bash - // or compiler directives of Delphi beginning {$ - if ((empty($sc_disallowed_before) || ($i == 0) || - (false === strpos($sc_disallowed_before, $part[$i-1]))) && - (empty($sc_disallowed_after) || ($length <= $i + $com_len) || - (false === strpos($sc_disallowed_after, $part[$i + $com_len])))) - { - // this is a valid comment - $COMMENT_MATCHED = true; - if ($this->lexic_permissions['COMMENTS'][$comment_key]) { - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['COMMENTS'][$comment_key] . '"'; - } else { - $attributes = ' class="co' . $comment_key . '"'; - } - $test_str = "" . $this->hsc($this->change_case($comment_mark)); - } else { - $test_str = $this->hsc($comment_mark); - } - - //Check if this comment is the last in the source - $close_pos = strpos($part, "\n", $i); - $oops = false; - if ($close_pos === false) { - $close_pos = $length; - $oops = true; - } - $test_str .= $this->hsc(substr($part, $i + $com_len, $close_pos - $i - $com_len)); - if ($this->lexic_permissions['COMMENTS'][$comment_key]) { - $test_str .= ""; - } - - // Take into account that the comment might be the last in the source - if (!$oops) { - $test_str .= "\n"; - } - - $i = $close_pos; - - // parse the rest - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - } - } - } - } - - // Where are we adding this char? - if (!$COMMENT_MATCHED) { - $stuff_to_parse .= $char; - } else { - $result .= $test_str; - unset($test_str); - $COMMENT_MATCHED = false; - } - } - // Parse the last bit - $result .= $this->parse_non_string_part($stuff_to_parse); - $stuff_to_parse = ''; - } else { - $result .= $this->hsc($part); - } - // Close the that surrounds the block - if ($STRICTATTRS != '') { - $result = str_replace("\n", "\n", $result); - $result .= ''; - } - - $endresult .= $result; - unset($part, $parts[$key], $result); - } - - //This fix is related to SF#1923020, but has to be applied regardless of - //actually highlighting symbols. - /** NOTE: memorypeak #3 */ - $endresult = str_replace(array('', ''), array(';', '|'), $endresult); - -// // Parse the last stuff (redundant?) -// $result .= $this->parse_non_string_part($stuff_to_parse); - - // Lop off the very first and last spaces -// $result = substr($result, 1, -1); - - // We're finished: stop timing - $this->set_time($start_time, microtime()); - - $this->finalise($endresult); - return $endresult; - } - - /** - * Swaps out spaces and tabs for HTML indentation. Not needed if - * the code is in a pre block... - * - * @param string The source to indent (reference!) - * @since 1.0.0 - * @access private - */ - function indent(&$result) { - /// Replace tabs with the correct number of spaces - if (false !== strpos($result, "\t")) { - $lines = explode("\n", $result); - $result = null;//Save memory while we process the lines individually - $tab_width = $this->get_real_tab_width(); - $tab_string = ' ' . str_repeat(' ', $tab_width); - - for ($key = 0, $n = count($lines); $key < $n; $key++) { - $line = $lines[$key]; - if (false === strpos($line, "\t")) { - continue; - } - - $pos = 0; - $length = strlen($line); - $lines[$key] = ''; // reduce memory - - $IN_TAG = false; - for ($i = 0; $i < $length; ++$i) { - $char = $line[$i]; - // Simple engine to work out whether we're in a tag. - // If we are we modify $pos. This is so we ignore HTML - // in the line and only workout the tab replacement - // via the actual content of the string - // This test could be improved to include strings in the - // html so that < or > would be allowed in user's styles - // (e.g. quotes: '<' '>'; or similar) - if ($IN_TAG) { - if ('>' == $char) { - $IN_TAG = false; - } - $lines[$key] .= $char; - } else if ('<' == $char) { - $IN_TAG = true; - $lines[$key] .= '<'; - } else if ('&' == $char) { - $substr = substr($line, $i + 3, 5); - $posi = strpos($substr, ';'); - if (false === $posi) { - ++$pos; - } else { - $pos -= $posi+2; - } - $lines[$key] .= $char; - } else if ("\t" == $char) { - $str = ''; - // OPTIMISE - move $strs out. Make an array: - // $tabs = array( - // 1 => ' ', - // 2 => '  ', - // 3 => '   ' etc etc - // to use instead of building a string every time - $tab_end_width = $tab_width - ($pos % $tab_width); //Moved out of the look as it doesn't change within the loop - if (($pos & 1) || 1 == $tab_end_width) { - $str .= substr($tab_string, 6, $tab_end_width); - } else { - $str .= substr($tab_string, 0, $tab_end_width+5); - } - $lines[$key] .= $str; - $pos += $tab_end_width; - - if (false === strpos($line, "\t", $i + 1)) { - $lines[$key] .= substr($line, $i + 1); - break; - } - } else if (0 == $pos && ' ' == $char) { - $lines[$key] .= ' '; - ++$pos; - } else { - $lines[$key] .= $char; - ++$pos; - } - } - } - $result = implode("\n", $lines); - unset($lines);//We don't need the lines separated beyond this --- free them! - } - // Other whitespace - // BenBE: Fix to reduce the number of replacements to be done - $result = preg_replace('/^ /m', ' ', $result); - $result = str_replace(' ', '  ', $result); - - if ($this->line_numbers == GESHI_NO_LINE_NUMBERS && $this->header_type != GESHI_HEADER_PRE_TABLE) { - if ($this->line_ending === null) { - $result = nl2br($result); - } else { - $result = str_replace("\n", $this->line_ending, $result); - } - } - } - - /** - * Changes the case of a keyword for those languages where a change is asked for - * - * @param string The keyword to change the case of - * @return string The keyword with its case changed - * @since 1.0.0 - * @access private - */ - function change_case($instr) { - switch ($this->language_data['CASE_KEYWORDS']) { - case GESHI_CAPS_UPPER: - return strtoupper($instr); - case GESHI_CAPS_LOWER: - return strtolower($instr); - default: - return $instr; - } - } - - /** - * Handles replacements of keywords to include markup and links if requested - * - * @param string The keyword to add the Markup to - * @return The HTML for the match found - * @since 1.0.8 - * @access private - * - * @todo Get rid of ender in keyword links - */ - function handle_keyword_replace($match) { - $k = $this->_kw_replace_group; - $keyword = $match[0]; - - $before = ''; - $after = ''; - - if ($this->keyword_links) { - // Keyword links have been ebabled - - if (isset($this->language_data['URLS'][$k]) && - $this->language_data['URLS'][$k] != '') { - // There is a base group for this keyword - - // Old system: strtolower - //$keyword = ( $this->language_data['CASE_SENSITIVE'][$group] ) ? $keyword : strtolower($keyword); - // New system: get keyword from language file to get correct case - if (!$this->language_data['CASE_SENSITIVE'][$k] && - strpos($this->language_data['URLS'][$k], '{FNAME}') !== false) { - foreach ($this->language_data['KEYWORDS'][$k] as $word) { - if (strcasecmp($word, $keyword) == 0) { - break; - } - } - } else { - $word = $keyword; - } - - $before = '<|UR1|"' . - str_replace( - array( - '{FNAME}', - '{FNAMEL}', - '{FNAMEU}', - '.'), - array( - str_replace('+', '%20', urlencode($this->hsc($word))), - str_replace('+', '%20', urlencode($this->hsc(strtolower($word)))), - str_replace('+', '%20', urlencode($this->hsc(strtoupper($word)))), - ''), - $this->language_data['URLS'][$k] - ) . '">'; - $after = ''; - } - } - - return $before . '<|/'. $k .'/>' . $this->change_case($keyword) . '|>' . $after; - } - - /** - * handles regular expressions highlighting-definitions with callback functions - * - * @note this is a callback, don't use it directly - * - * @param array the matches array - * @return The highlighted string - * @since 1.0.8 - * @access private - */ - function handle_regexps_callback($matches) { - // before: "' style=\"' . call_user_func(\"$func\", '\\1') . '\"\\1|>'", - return ' style="' . call_user_func($this->language_data['STYLES']['REGEXPS'][$this->_rx_key], $matches[1]) . '"'. $matches[1] . '|>'; - } - - /** - * handles newlines in REGEXPS matches. Set the _hmr_* vars before calling this - * - * @note this is a callback, don't use it directly - * - * @param array the matches array - * @return string - * @since 1.0.8 - * @access private - */ - function handle_multiline_regexps($matches) { - $before = $this->_hmr_before; - $after = $this->_hmr_after; - if ($this->_hmr_replace) { - $replace = $this->_hmr_replace; - $search = array(); - - foreach (array_keys($matches) as $k) { - $search[] = '\\' . $k; - } - - $before = str_replace($search, $matches, $before); - $after = str_replace($search, $matches, $after); - $replace = str_replace($search, $matches, $replace); - } else { - $replace = $matches[0]; - } - return $before - . '<|!REG3XP' . $this->_hmr_key .'!>' - . str_replace("\n", "|>\n<|!REG3XP" . $this->_hmr_key . '!>', $replace) - . '|>' - . $after; - } - - /** - * Takes a string that has no strings or comments in it, and highlights - * stuff like keywords, numbers and methods. - * - * @param string The string to parse for keyword, numbers etc. - * @since 1.0.0 - * @access private - * @todo BUGGY! Why? Why not build string and return? - */ - function parse_non_string_part($stuff_to_parse) { - $stuff_to_parse = ' ' . $this->hsc($stuff_to_parse); - - // Highlight keywords - $disallowed_before = "(?|^&"; - $disallowed_after = "(?![a-zA-Z0-9_\|%\\-&;"; - if ($this->lexic_permissions['STRINGS']) { - $quotemarks = preg_quote(implode($this->language_data['QUOTEMARKS']), '/'); - $disallowed_before .= $quotemarks; - $disallowed_after .= $quotemarks; - } - $disallowed_before .= "])"; - $disallowed_after .= "])"; - - $parser_control_pergroup = false; - if (isset($this->language_data['PARSER_CONTROL'])) { - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'])) { - $x = 0; // check wether per-keyword-group parser_control is enabled - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE'])) { - $disallowed_before = $this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_BEFORE']; - ++$x; - } - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER'])) { - $disallowed_after = $this->language_data['PARSER_CONTROL']['KEYWORDS']['DISALLOWED_AFTER']; - ++$x; - } - $parser_control_pergroup = (count($this->language_data['PARSER_CONTROL']['KEYWORDS']) - $x) > 0; - } - } - - foreach (array_keys($this->language_data['KEYWORDS']) as $k) { - if (!isset($this->lexic_permissions['KEYWORDS'][$k]) || - $this->lexic_permissions['KEYWORDS'][$k]) { - - $case_sensitive = $this->language_data['CASE_SENSITIVE'][$k]; - $modifiers = $case_sensitive ? '' : 'i'; - - // NEW in 1.0.8 - per-keyword-group parser control - $disallowed_before_local = $disallowed_before; - $disallowed_after_local = $disallowed_after; - if ($parser_control_pergroup && isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$k])) { - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$k]['DISALLOWED_BEFORE'])) { - $disallowed_before_local = - $this->language_data['PARSER_CONTROL']['KEYWORDS'][$k]['DISALLOWED_BEFORE']; - } - - if (isset($this->language_data['PARSER_CONTROL']['KEYWORDS'][$k]['DISALLOWED_AFTER'])) { - $disallowed_after_local = - $this->language_data['PARSER_CONTROL']['KEYWORDS'][$k]['DISALLOWED_AFTER']; - } - } - - $this->_kw_replace_group = $k; - - //NEW in 1.0.8, the cached regexp list - // since we don't want PHP / PCRE to crash due to too large patterns we split them into smaller chunks - for ($set = 0, $set_length = count($this->language_data['CACHED_KEYWORD_LISTS'][$k]); $set < $set_length; ++$set) { - $keywordset =& $this->language_data['CACHED_KEYWORD_LISTS'][$k][$set]; - // Might make a more unique string for putting the number in soon - // Basically, we don't put the styles in yet because then the styles themselves will - // get highlighted if the language has a CSS keyword in it (like CSS, for example ;)) - $stuff_to_parse = preg_replace_callback( - "/$disallowed_before_local({$keywordset})(?!\(?:htm|php))$disallowed_after_local/$modifiers", - array($this, 'handle_keyword_replace'), - $stuff_to_parse - ); - } - } - } - - // Regular expressions - foreach ($this->language_data['REGEXPS'] as $key => $regexp) { - if ($this->lexic_permissions['REGEXPS'][$key]) { - if (is_array($regexp)) { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - // produce valid HTML when we match multiple lines - $this->_hmr_replace = $regexp[GESHI_REPLACE]; - $this->_hmr_before = $regexp[GESHI_BEFORE]; - $this->_hmr_key = $key; - $this->_hmr_after = $regexp[GESHI_AFTER]; - $stuff_to_parse = preg_replace_callback( - "/" . $regexp[GESHI_SEARCH] . "/{$regexp[GESHI_MODIFIERS]}", - array($this, 'handle_multiline_regexps'), - $stuff_to_parse); - $this->_hmr_replace = false; - $this->_hmr_before = ''; - $this->_hmr_after = ''; - } else { - $stuff_to_parse = preg_replace( - '/' . $regexp[GESHI_SEARCH] . '/' . $regexp[GESHI_MODIFIERS], - $regexp[GESHI_BEFORE] . '<|!REG3XP'. $key .'!>' . $regexp[GESHI_REPLACE] . '|>' . $regexp[GESHI_AFTER], - $stuff_to_parse); - } - } else { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - // produce valid HTML when we match multiple lines - $this->_hmr_key = $key; - $stuff_to_parse = preg_replace_callback( "/(" . $regexp . ")/", - array($this, 'handle_multiline_regexps'), $stuff_to_parse); - $this->_hmr_key = ''; - } else { - $stuff_to_parse = preg_replace( "/(" . $regexp . ")/", "<|!REG3XP$key!>\\1|>", $stuff_to_parse); - } - } - } - } - - // Highlight numbers. As of 1.0.8 we support different types of numbers - $numbers_found = false; - - if ($this->lexic_permissions['NUMBERS'] && preg_match($this->language_data['PARSER_CONTROL']['NUMBERS']['PRECHECK_RX'], $stuff_to_parse )) { - $numbers_found = true; - - //For each of the formats ... - foreach($this->language_data['NUMBERS_RXCACHE'] as $id => $regexp) { - //Check if it should be highlighted ... - $stuff_to_parse = preg_replace($regexp, "<|/NUM!$id/>\\1|>", $stuff_to_parse); - } - } - - // - // Now that's all done, replace /[number]/ with the correct styles - // - foreach (array_keys($this->language_data['KEYWORDS']) as $k) { - if (!$this->use_classes) { - $attributes = ' style="' . - (isset($this->language_data['STYLES']['KEYWORDS'][$k]) ? - $this->language_data['STYLES']['KEYWORDS'][$k] : "") . '"'; - } else { - $attributes = ' class="kw' . $k . '"'; - } - $stuff_to_parse = str_replace("<|/$k/>", "<|$attributes>", $stuff_to_parse); - } - - if ($numbers_found) { - // Put number styles in - foreach($this->language_data['NUMBERS_RXCACHE'] as $id => $regexp) { - //Commented out for now, as this needs some review ... - // if ($numbers_permissions & $id) { - //Get the appropriate style ... - //Checking for unset styles is done by the style cache builder ... - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['NUMBERS'][$id] . '"'; - } else { - $attributes = ' class="nu'.$id.'"'; - } - - //Set in the correct styles ... - $stuff_to_parse = str_replace("/NUM!$id/", $attributes, $stuff_to_parse); - // } - } - } - - // Highlight methods and fields in objects - if ($this->lexic_permissions['METHODS'] && $this->language_data['OOLANG']) { - $oolang_spaces = "[\s]*"; - $oolang_before = ""; - $oolang_after = "[a-zA-Z][a-zA-Z0-9_]*"; - if (isset($this->language_data['PARSER_CONTROL'])) { - if (isset($this->language_data['PARSER_CONTROL']['OOLANG'])) { - if (isset($this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_BEFORE'])) { - $oolang_before = $this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_BEFORE']; - } - if (isset($this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_AFTER'])) { - $oolang_after = $this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_AFTER']; - } - if (isset($this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_SPACES'])) { - $oolang_spaces = $this->language_data['PARSER_CONTROL']['OOLANG']['MATCH_SPACES']; - } - } - } - - foreach ($this->language_data['OBJECT_SPLITTERS'] as $key => $splitter) { - if (false !== strpos($stuff_to_parse, $splitter)) { - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['METHODS'][$key] . '"'; - } else { - $attributes = ' class="me' . $key . '"'; - } - $stuff_to_parse = preg_replace("/($oolang_before)(" . preg_quote($this->language_data['OBJECT_SPLITTERS'][$key], '/') . ")($oolang_spaces)($oolang_after)/", "\\1\\2\\3<|$attributes>\\4|>", $stuff_to_parse); - } - } - } - - // - // Highlight brackets. Yes, I've tried adding a semi-colon to this list. - // You try it, and see what happens ;) - // TODO: Fix lexic permissions not converting entities if shouldn't - // be highlighting regardless - // - if ($this->lexic_permissions['BRACKETS']) { - $stuff_to_parse = str_replace( $this->language_data['CACHE_BRACKET_MATCH'], - $this->language_data['CACHE_BRACKET_REPLACE'], $stuff_to_parse ); - } - - - //FIX for symbol highlighting ... - if ($this->lexic_permissions['SYMBOLS'] && !empty($this->language_data['SYMBOLS'])) { - //Get all matches and throw away those witin a block that is already highlighted... (i.e. matched by a regexp) - $n_symbols = preg_match_all("/<\|(?:|[^>])+>(?:(?!\|>).*?)\|>|<\/a>|(?:" . $this->language_data['SYMBOL_SEARCH'] . ")+(?![^<]+?>)/", $stuff_to_parse, $pot_symbols, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); - $global_offset = 0; - for ($s_id = 0; $s_id < $n_symbols; ++$s_id) { - $symbol_match = $pot_symbols[$s_id][0][0]; - if (strpos($symbol_match, '<') !== false || strpos($symbol_match, '>') !== false) { - // already highlighted blocks _must_ include either < or > - // so if this conditional applies, we have to skip this match - // BenBE: UNLESS the block contains or - if(strpos($symbol_match, '') === false && - strpos($symbol_match, '') === false) { - continue; - } - } - - // if we reach this point, we have a valid match which needs to be highlighted - - $symbol_length = strlen($symbol_match); - $symbol_offset = $pot_symbols[$s_id][0][1]; - unset($pot_symbols[$s_id]); - $symbol_end = $symbol_length + $symbol_offset; - $symbol_hl = ""; - - // if we have multiple styles, we have to handle them properly - if ($this->language_data['MULTIPLE_SYMBOL_GROUPS']) { - $old_sym = -1; - // Split the current stuff to replace into its atomic symbols ... - preg_match_all("/" . $this->language_data['SYMBOL_SEARCH'] . "/", $symbol_match, $sym_match_syms, PREG_PATTERN_ORDER); - foreach ($sym_match_syms[0] as $sym_ms) { - //Check if consequtive symbols belong to the same group to save output ... - if (isset($this->language_data['SYMBOL_DATA'][$sym_ms]) - && ($this->language_data['SYMBOL_DATA'][$sym_ms] != $old_sym)) { - if (-1 != $old_sym) { - $symbol_hl .= "|>"; - } - $old_sym = $this->language_data['SYMBOL_DATA'][$sym_ms]; - if (!$this->use_classes) { - $symbol_hl .= '<| style="' . $this->language_data['STYLES']['SYMBOLS'][$old_sym] . '">'; - } else { - $symbol_hl .= '<| class="sy' . $old_sym . '">'; - } - } - $symbol_hl .= $sym_ms; - } - unset($sym_match_syms); - - //Close remaining tags and insert the replacement at the right position ... - //Take caution if symbol_hl is empty to avoid doubled closing spans. - if (-1 != $old_sym) { - $symbol_hl .= "|>"; - } - } else { - if (!$this->use_classes) { - $symbol_hl = '<| style="' . $this->language_data['STYLES']['SYMBOLS'][0] . '">'; - } else { - $symbol_hl = '<| class="sy0">'; - } - $symbol_hl .= $symbol_match . '|>'; - } - - $stuff_to_parse = substr_replace($stuff_to_parse, $symbol_hl, $symbol_offset + $global_offset, $symbol_length); - - // since we replace old text with something of different size, - // we'll have to keep track of the differences - $global_offset += strlen($symbol_hl) - $symbol_length; - } - } - //FIX for symbol highlighting ... - - // Add class/style for regexps - foreach (array_keys($this->language_data['REGEXPS']) as $key) { - if ($this->lexic_permissions['REGEXPS'][$key]) { - if (is_callable($this->language_data['STYLES']['REGEXPS'][$key])) { - $this->_rx_key = $key; - $stuff_to_parse = preg_replace_callback("/!REG3XP$key!(.*)\|>/U", - array($this, 'handle_regexps_callback'), - $stuff_to_parse); - } else { - if (!$this->use_classes) { - $attributes = ' style="' . $this->language_data['STYLES']['REGEXPS'][$key] . '"'; - } else { - if (is_array($this->language_data['REGEXPS'][$key]) && - array_key_exists(GESHI_CLASS, $this->language_data['REGEXPS'][$key])) { - $attributes = ' class="' . - $this->language_data['REGEXPS'][$key][GESHI_CLASS] . '"'; - } else { - $attributes = ' class="re' . $key . '"'; - } - } - $stuff_to_parse = str_replace("!REG3XP$key!", "$attributes", $stuff_to_parse); - } - } - } - - // Replace with . for urls - $stuff_to_parse = str_replace('', '.', $stuff_to_parse); - // Replace <|UR1| with link_styles[GESHI_LINK])) { - if ($this->use_classes) { - $stuff_to_parse = str_replace('<|UR1|', 'link_target . ' href=', $stuff_to_parse); - } else { - $stuff_to_parse = str_replace('<|UR1|', 'link_target . ' style="' . $this->link_styles[GESHI_LINK] . '" href=', $stuff_to_parse); - } - } else { - $stuff_to_parse = str_replace('<|UR1|', 'link_target . ' href=', $stuff_to_parse); - } - - // - // NOW we add the span thingy ;) - // - - $stuff_to_parse = str_replace('<|', '', '', $stuff_to_parse ); - return substr($stuff_to_parse, 1); - } - - /** - * Sets the time taken to parse the code - * - * @param microtime The time when parsing started - * @param microtime The time when parsing ended - * @since 1.0.2 - * @access private - */ - function set_time($start_time, $end_time) { - $start = explode(' ', $start_time); - $end = explode(' ', $end_time); - $this->time = $end[0] + $end[1] - $start[0] - $start[1]; - } - - /** - * Gets the time taken to parse the code - * - * @return double The time taken to parse the code - * @since 1.0.2 - */ - function get_time() { - return $this->time; - } - - /** - * Merges arrays recursively, overwriting values of the first array with values of later arrays - * - * @since 1.0.8 - * @access private - */ - function merge_arrays() { - $arrays = func_get_args(); - $narrays = count($arrays); - - // check arguments - // comment out if more performance is necessary (in this case the foreach loop will trigger a warning if the argument is not an array) - for ($i = 0; $i < $narrays; $i ++) { - if (!is_array($arrays[$i])) { - // also array_merge_recursive returns nothing in this case - trigger_error('Argument #' . ($i+1) . ' is not an array - trying to merge array with scalar! Returning false!', E_USER_WARNING); - return false; - } - } - - // the first array is in the output set in every case - $ret = $arrays[0]; - - // merege $ret with the remaining arrays - for ($i = 1; $i < $narrays; $i ++) { - foreach ($arrays[$i] as $key => $value) { - if (is_array($value) && isset($ret[$key])) { - // if $ret[$key] is not an array you try to merge an scalar value with an array - the result is not defined (incompatible arrays) - // in this case the call will trigger an E_USER_WARNING and the $ret[$key] will be false. - $ret[$key] = $this->merge_arrays($ret[$key], $value); - } else { - $ret[$key] = $value; - } - } - } - - return $ret; - } - - /** - * Gets language information and stores it for later use - * - * @param string The filename of the language file you want to load - * @since 1.0.0 - * @access private - * @todo Needs to load keys for lexic permissions for keywords, regexps etc - */ - function load_language($file_name) { - if ($file_name == $this->loaded_language) { - // this file is already loaded! - return; - } - - //Prepare some stuff before actually loading the language file - $this->loaded_language = $file_name; - $this->parse_cache_built = false; - $this->enable_highlighting(); - $language_data = array(); - - //Load the language file - require $file_name; - - // Perhaps some checking might be added here later to check that - // $language data is a valid thing but maybe not - $this->language_data = $language_data; - - // Set strict mode if should be set - $this->strict_mode = $this->language_data['STRICT_MODE_APPLIES']; - - // Set permissions for all lexics to true - // so they'll be highlighted by default - foreach (array_keys($this->language_data['KEYWORDS']) as $key) { - if (!empty($this->language_data['KEYWORDS'][$key])) { - $this->lexic_permissions['KEYWORDS'][$key] = true; - } else { - $this->lexic_permissions['KEYWORDS'][$key] = false; - } - } - - foreach (array_keys($this->language_data['COMMENT_SINGLE']) as $key) { - $this->lexic_permissions['COMMENTS'][$key] = true; - } - foreach (array_keys($this->language_data['REGEXPS']) as $key) { - $this->lexic_permissions['REGEXPS'][$key] = true; - } - - // for BenBE and future code reviews: - // we can use empty here since we only check for existance and emptiness of an array - // if it is not an array at all but rather false or null this will work as intended as well - // even if $this->language_data['PARSER_CONTROL'] is undefined this won't trigger a notice - if (!empty($this->language_data['PARSER_CONTROL']['ENABLE_FLAGS'])) { - foreach ($this->language_data['PARSER_CONTROL']['ENABLE_FLAGS'] as $flag => $value) { - // it's either true or false and maybe is true as well - $perm = $value !== GESHI_NEVER; - if ($flag == 'ALL') { - $this->enable_highlighting($perm); - continue; - } - if (!isset($this->lexic_permissions[$flag])) { - // unknown lexic permission - continue; - } - if (is_array($this->lexic_permissions[$flag])) { - foreach ($this->lexic_permissions[$flag] as $key => $val) { - $this->lexic_permissions[$flag][$key] = $perm; - } - } else { - $this->lexic_permissions[$flag] = $perm; - } - } - unset($this->language_data['PARSER_CONTROL']['ENABLE_FLAGS']); - } - - //Fix: Problem where hardescapes weren't handled if no ESCAPE_CHAR was given - //You need to set one for HARDESCAPES only in this case. - if(!isset($this->language_data['HARDCHAR'])) { - $this->language_data['HARDCHAR'] = $this->language_data['ESCAPE_CHAR']; - } - - //NEW in 1.0.8: Allow styles to be loaded from a separate file to override defaults - $style_filename = substr($file_name, 0, -4) . '.style.php'; - if (is_readable($style_filename)) { - //Clear any style_data that could have been set before ... - if (isset($style_data)) { - unset($style_data); - } - - //Read the Style Information from the style file - include $style_filename; - - //Apply the new styles to our current language styles - if (isset($style_data) && is_array($style_data)) { - $this->language_data['STYLES'] = - $this->merge_arrays($this->language_data['STYLES'], $style_data); - } - } - } - - /** - * Takes the parsed code and various options, and creates the HTML - * surrounding it to make it look nice. - * - * @param string The code already parsed (reference!) - * @since 1.0.0 - * @access private - */ - function finalise(&$parsed_code) { - // Remove end parts of important declarations - // This is BUGGY!! My fault for bad code: fix coming in 1.2 - // @todo Remove this crap - if ($this->enable_important_blocks && - (strpos($parsed_code, $this->hsc(GESHI_START_IMPORTANT)) === false)) { - $parsed_code = str_replace($this->hsc(GESHI_END_IMPORTANT), '', $parsed_code); - } - - // Add HTML whitespace stuff if we're using the
            header - if ($this->header_type != GESHI_HEADER_PRE && $this->header_type != GESHI_HEADER_PRE_VALID) { - $this->indent($parsed_code); - } - - // purge some unnecessary stuff - /** NOTE: memorypeak #1 */ - $parsed_code = preg_replace('#]+>(\s*)#', '\\1', $parsed_code); - - // If we are using IDs for line numbers, there needs to be an overall - // ID set to prevent collisions. - if ($this->add_ids && !$this->overall_id) { - $this->overall_id = 'geshi-' . substr(md5(microtime()), 0, 4); - } - - // Get code into lines - /** NOTE: memorypeak #2 */ - $code = explode("\n", $parsed_code); - $parsed_code = $this->header(); - - // If we're using line numbers, we insert
          4. s and appropriate - // markup to style them (otherwise we don't need to do anything) - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS && $this->header_type != GESHI_HEADER_PRE_TABLE) { - // If we're using the
             header, we shouldn't add newlines because
            -            // the 
             will line-break them (and the 
          5. s already do this for us) - $ls = ($this->header_type != GESHI_HEADER_PRE && $this->header_type != GESHI_HEADER_PRE_VALID) ? "\n" : ''; - - // Set vars to defaults for following loop - $i = 0; - - // Foreach line... - for ($i = 0, $n = count($code); $i < $n;) { - //Reset the attributes for a new line ... - $attrs = array(); - - // Make lines have at least one space in them if they're empty - // BenBE: Checking emptiness using trim instead of relying on blanks - if ('' == trim($code[$i])) { - $code[$i] = ' '; - } - - // If this is a "special line"... - if ($this->line_numbers == GESHI_FANCY_LINE_NUMBERS && - $i % $this->line_nth_row == ($this->line_nth_row - 1)) { - // Set the attributes to style the line - if ($this->use_classes) { - //$attr = ' class="li2"'; - $attrs['class'][] = 'li2'; - $def_attr = ' class="de2"'; - } else { - //$attr = ' style="' . $this->line_style2 . '"'; - $attrs['style'][] = $this->line_style2; - // This style "covers up" the special styles set for special lines - // so that styles applied to special lines don't apply to the actual - // code on that line - $def_attr = ' style="' . $this->code_style . '"'; - } - } else { - if ($this->use_classes) { - //$attr = ' class="li1"'; - $attrs['class'][] = 'li1'; - $def_attr = ' class="de1"'; - } else { - //$attr = ' style="' . $this->line_style1 . '"'; - $attrs['style'][] = $this->line_style1; - $def_attr = ' style="' . $this->code_style . '"'; - } - } - - //Check which type of tag to insert for this line - if ($this->header_type == GESHI_HEADER_PRE_VALID) { - $start = ""; - $end = '
          6. '; - } else { - // Span or div? - $start = ""; - $end = '
          '; - } - - ++$i; - - // Are we supposed to use ids? If so, add them - if ($this->add_ids) { - $attrs['id'][] = "$this->overall_id-$i"; - } - - //Is this some line with extra styles??? - if (in_array($i, $this->highlight_extra_lines)) { - if ($this->use_classes) { - if (isset($this->highlight_extra_lines_styles[$i])) { - $attrs['class'][] = "lx$i"; - } else { - $attrs['class'][] = "ln-xtra"; - } - } else { - array_push($attrs['style'], $this->get_line_style($i)); - } - } - - // Add in the line surrounded by appropriate list HTML - $attr_string = ''; - foreach ($attrs as $key => $attr) { - $attr_string .= ' ' . $key . '="' . implode(' ', $attr) . '"'; - } - - $parsed_code .= "$start{$code[$i-1]}$end
        2. $ls"; - unset($code[$i - 1]); - } - } else { - $n = count($code); - if ($this->use_classes) { - $attributes = ' class="de1"'; - } else { - $attributes = ' style="'. $this->code_style .'"'; - } - if ($this->header_type == GESHI_HEADER_PRE_VALID) { - $parsed_code .= ''; - } elseif ($this->header_type == GESHI_HEADER_PRE_TABLE) { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - if ($this->use_classes) { - $attrs = ' class="ln"'; - } else { - $attrs = ' style="'. $this->table_linenumber_style .'"'; - } - $parsed_code .= ''; - // get linenumbers - // we don't merge it with the for below, since it should be better for - // memory consumption this way - // @todo: but... actually it would still be somewhat nice to merge the two loops - // the mem peaks are at different positions - for ($i = 0; $i < $n; ++$i) { - $close = 0; - // fancy lines - if ($this->line_numbers == GESHI_FANCY_LINE_NUMBERS && - $i % $this->line_nth_row == ($this->line_nth_row - 1)) { - // Set the attributes to style the line - if ($this->use_classes) { - $parsed_code .= ''; - } else { - // This style "covers up" the special styles set for special lines - // so that styles applied to special lines don't apply to the actual - // code on that line - $parsed_code .= '' - .''; - } - $close += 2; - } - //Is this some line with extra styles??? - if (in_array($i + 1, $this->highlight_extra_lines)) { - if ($this->use_classes) { - if (isset($this->highlight_extra_lines_styles[$i])) { - $parsed_code .= ""; - } else { - $parsed_code .= ""; - } - } else { - $parsed_code .= "get_line_style($i) . "\">"; - } - ++$close; - } - $parsed_code .= $this->line_numbers_start + $i; - if ($close) { - $parsed_code .= str_repeat('', $close); - } else if ($i != $n) { - $parsed_code .= "\n"; - } - } - $parsed_code .= '
        '; - } - $parsed_code .= ''; - } - // No line numbers, but still need to handle highlighting lines extra. - // Have to use divs so the full width of the code is highlighted - $close = 0; - for ($i = 0; $i < $n; ++$i) { - // Make lines have at least one space in them if they're empty - // BenBE: Checking emptiness using trim instead of relying on blanks - if ('' == trim($code[$i])) { - $code[$i] = ' '; - } - // fancy lines - if ($this->line_numbers == GESHI_FANCY_LINE_NUMBERS && - $i % $this->line_nth_row == ($this->line_nth_row - 1)) { - // Set the attributes to style the line - if ($this->use_classes) { - $parsed_code .= ''; - } else { - // This style "covers up" the special styles set for special lines - // so that styles applied to special lines don't apply to the actual - // code on that line - $parsed_code .= '' - .''; - } - $close += 2; - } - //Is this some line with extra styles??? - if (in_array($i + 1, $this->highlight_extra_lines)) { - if ($this->use_classes) { - if (isset($this->highlight_extra_lines_styles[$i])) { - $parsed_code .= ""; - } else { - $parsed_code .= ""; - } - } else { - $parsed_code .= "get_line_style($i) . "\">"; - } - ++$close; - } - - $parsed_code .= $code[$i]; - - if ($close) { - $parsed_code .= str_repeat('', $close); - $close = 0; - } - elseif ($i + 1 < $n) { - $parsed_code .= "\n"; - } - unset($code[$i]); - } - - if ($this->header_type == GESHI_HEADER_PRE_VALID || $this->header_type == GESHI_HEADER_PRE_TABLE) { - $parsed_code .= ''; - } - if ($this->header_type == GESHI_HEADER_PRE_TABLE && $this->line_numbers != GESHI_NO_LINE_NUMBERS) { - $parsed_code .= ''; - } - } - - $parsed_code .= $this->footer(); - } - - /** - * Creates the header for the code block (with correct attributes) - * - * @return string The header for the code block - * @since 1.0.0 - * @access private - */ - function header() { - // Get attributes needed - /** - * @todo Document behaviour change - class is outputted regardless of whether - * we're using classes or not. Same with style - */ - $attributes = ' class="' . $this->_genCSSName($this->language); - if ($this->overall_class != '') { - $attributes .= " ".$this->_genCSSName($this->overall_class); - } - $attributes .= '"'; - - if ($this->overall_id != '') { - $attributes .= " id=\"{$this->overall_id}\""; - } - if ($this->overall_style != '' && !$this->use_classes) { - $attributes .= ' style="' . $this->overall_style . '"'; - } - - $ol_attributes = ''; - - if ($this->line_numbers_start != 1) { - $ol_attributes .= ' start="' . $this->line_numbers_start . '"'; - } - - // Get the header HTML - $header = $this->header_content; - if ($header) { - if ($this->header_type == GESHI_HEADER_PRE || $this->header_type == GESHI_HEADER_PRE_VALID) { - $header = str_replace("\n", '', $header); - } - $header = $this->replace_keywords($header); - - if ($this->use_classes) { - $attr = ' class="head"'; - } else { - $attr = " style=\"{$this->header_content_style}\""; - } - if ($this->header_type == GESHI_HEADER_PRE_TABLE && $this->line_numbers != GESHI_NO_LINE_NUMBERS) { - $header = "$header"; - } else { - $header = "$header"; - } - } - - if (GESHI_HEADER_NONE == $this->header_type) { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - return "$header"; - } - return $header . ($this->force_code_block ? '
        ' : ''); - } - - // Work out what to return and do it - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - if ($this->header_type == GESHI_HEADER_PRE) { - return "$header"; - } else if ($this->header_type == GESHI_HEADER_DIV || - $this->header_type == GESHI_HEADER_PRE_VALID) { - return "$header"; - } else if ($this->header_type == GESHI_HEADER_PRE_TABLE) { - return "$header"; - } - } else { - if ($this->header_type == GESHI_HEADER_PRE) { - return "$header" . - ($this->force_code_block ? '
        ' : ''); - } else { - return "$header" . - ($this->force_code_block ? '
        ' : ''); - } - } - } - - /** - * Returns the footer for the code block. - * - * @return string The footer for the code block - * @since 1.0.0 - * @access private - */ - function footer() { - $footer = $this->footer_content; - if ($footer) { - if ($this->header_type == GESHI_HEADER_PRE) { - $footer = str_replace("\n", '', $footer);; - } - $footer = $this->replace_keywords($footer); - - if ($this->use_classes) { - $attr = ' class="foot"'; - } else { - $attr = " style=\"{$this->footer_content_style}\""; - } - if ($this->header_type == GESHI_HEADER_PRE_TABLE && $this->line_numbers != GESHI_NO_LINE_NUMBERS) { - $footer = "$footer"; - } else { - $footer = "$footer
        "; - } - } - - if (GESHI_HEADER_NONE == $this->header_type) { - return ($this->line_numbers != GESHI_NO_LINE_NUMBERS) ? '
      ' . $footer : $footer; - } - - if ($this->header_type == GESHI_HEADER_DIV || $this->header_type == GESHI_HEADER_PRE_VALID) { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - return "
    $footer"; - } - return ($this->force_code_block ? '' : '') . - "$footer"; - } - elseif ($this->header_type == GESHI_HEADER_PRE_TABLE) { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - return "$footer"; - } - return ($this->force_code_block ? '' : '') . - "$footer"; - } - else { - if ($this->line_numbers != GESHI_NO_LINE_NUMBERS) { - return "$footer"; - } - return ($this->force_code_block ? '' : '') . - "$footer"; - } - } - - /** - * Replaces certain keywords in the header and footer with - * certain configuration values - * - * @param string The header or footer content to do replacement on - * @return string The header or footer with replaced keywords - * @since 1.0.2 - * @access private - */ - function replace_keywords($instr) { - $keywords = $replacements = array(); - - $keywords[] = '
      to have no effect at all if there are line numbers - // (
        s have margins that should be destroyed so all layout is - // controlled by the set_overall_style method, which works on the - //
         or 
        container). Additionally, set default styles for lines - if (!$economy_mode || $this->line_numbers != GESHI_NO_LINE_NUMBERS) { - //$stylesheet .= "$selector, {$selector}ol, {$selector}ol li {margin: 0;}\n"; - $stylesheet .= "$selector.de1, $selector.de2 {{$this->code_style}}\n"; - } - - // Add overall styles - // note: neglect economy_mode, empty styles are meaningless - if ($this->overall_style != '') { - $stylesheet .= "$selector {{$this->overall_style}}\n"; - } - - // Add styles for links - // note: economy mode does not make _any_ sense here - // either the style is empty and thus no selector is needed - // or the appropriate key is given. - foreach ($this->link_styles as $key => $style) { - if ($style != '') { - switch ($key) { - case GESHI_LINK: - $stylesheet .= "{$selector}a:link {{$style}}\n"; - break; - case GESHI_HOVER: - $stylesheet .= "{$selector}a:hover {{$style}}\n"; - break; - case GESHI_ACTIVE: - $stylesheet .= "{$selector}a:active {{$style}}\n"; - break; - case GESHI_VISITED: - $stylesheet .= "{$selector}a:visited {{$style}}\n"; - break; - } - } - } - - // Header and footer - // note: neglect economy_mode, empty styles are meaningless - if ($this->header_content_style != '') { - $stylesheet .= "$selector.head {{$this->header_content_style}}\n"; - } - if ($this->footer_content_style != '') { - $stylesheet .= "$selector.foot {{$this->footer_content_style}}\n"; - } - - // Styles for important stuff - // note: neglect economy_mode, empty styles are meaningless - if ($this->important_styles != '') { - $stylesheet .= "$selector.imp {{$this->important_styles}}\n"; - } - - // Simple line number styles - if ((!$economy_mode || $this->line_numbers != GESHI_NO_LINE_NUMBERS) && $this->line_style1 != '') { - $stylesheet .= "{$selector}li, {$selector}.li1 {{$this->line_style1}}\n"; - } - if ((!$economy_mode || $this->line_numbers != GESHI_NO_LINE_NUMBERS) && $this->table_linenumber_style != '') { - $stylesheet .= "{$selector}.ln {{$this->table_linenumber_style}}\n"; - } - // If there is a style set for fancy line numbers, echo it out - if ((!$economy_mode || $this->line_numbers == GESHI_FANCY_LINE_NUMBERS) && $this->line_style2 != '') { - $stylesheet .= "{$selector}.li2 {{$this->line_style2}}\n"; - } - - // note: empty styles are meaningless - foreach ($this->language_data['STYLES']['KEYWORDS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || - (isset($this->lexic_permissions['KEYWORDS'][$group]) && - $this->lexic_permissions['KEYWORDS'][$group]))) { - $stylesheet .= "$selector.kw$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['COMMENTS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || - (isset($this->lexic_permissions['COMMENTS'][$group]) && - $this->lexic_permissions['COMMENTS'][$group]) || - (!empty($this->language_data['COMMENT_REGEXP']) && - !empty($this->language_data['COMMENT_REGEXP'][$group])))) { - $stylesheet .= "$selector.co$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['ESCAPE_CHAR'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['ESCAPE_CHAR'])) { - // NEW: since 1.0.8 we have to handle hardescapes - if ($group === 'HARD') { - $group = '_h'; - } - $stylesheet .= "$selector.es$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['BRACKETS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['BRACKETS'])) { - $stylesheet .= "$selector.br$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['SYMBOLS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['SYMBOLS'])) { - $stylesheet .= "$selector.sy$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['STRINGS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['STRINGS'])) { - // NEW: since 1.0.8 we have to handle hardquotes - if ($group === 'HARD') { - $group = '_h'; - } - $stylesheet .= "$selector.st$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['NUMBERS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['NUMBERS'])) { - $stylesheet .= "$selector.nu$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['METHODS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || $this->lexic_permissions['METHODS'])) { - $stylesheet .= "$selector.me$group {{$styles}}\n"; - } - } - // note: neglect economy_mode, empty styles are meaningless - foreach ($this->language_data['STYLES']['SCRIPT'] as $group => $styles) { - if ($styles != '') { - $stylesheet .= "$selector.sc$group {{$styles}}\n"; - } - } - foreach ($this->language_data['STYLES']['REGEXPS'] as $group => $styles) { - if ($styles != '' && (!$economy_mode || - (isset($this->lexic_permissions['REGEXPS'][$group]) && - $this->lexic_permissions['REGEXPS'][$group]))) { - if (is_array($this->language_data['REGEXPS'][$group]) && - array_key_exists(GESHI_CLASS, $this->language_data['REGEXPS'][$group])) { - $stylesheet .= "$selector."; - $stylesheet .= $this->language_data['REGEXPS'][$group][GESHI_CLASS]; - $stylesheet .= " {{$styles}}\n"; - } else { - $stylesheet .= "$selector.re$group {{$styles}}\n"; - } - } - } - // Styles for lines being highlighted extra - if (!$economy_mode || (count($this->highlight_extra_lines)!=count($this->highlight_extra_lines_styles))) { - $stylesheet .= "{$selector}.ln-xtra, {$selector}li.ln-xtra, {$selector}div.ln-xtra {{$this->highlight_extra_lines_style}}\n"; - } - $stylesheet .= "{$selector}span.xtra { display:block; }\n"; - foreach ($this->highlight_extra_lines_styles as $lineid => $linestyle) { - $stylesheet .= "{$selector}.lx$lineid, {$selector}li.lx$lineid, {$selector}div.lx$lineid {{$linestyle}}\n"; - } - - return $stylesheet; - } - - /** - * Get's the style that is used for the specified line - * - * @param int The line number information is requested for - * @access private - * @since 1.0.7.21 - */ - function get_line_style($line) { - //$style = null; - $style = null; - if (isset($this->highlight_extra_lines_styles[$line])) { - $style = $this->highlight_extra_lines_styles[$line]; - } else { // if no "extra" style assigned - $style = $this->highlight_extra_lines_style; - } - - return $style; - } - - /** - * this functions creates an optimized regular expression list - * of an array of strings. - * - * Example: - * $list = array('faa', 'foo', 'foobar'); - * => string 'f(aa|oo(bar)?)' - * - * @param $list array of (unquoted) strings - * @param $regexp_delimiter your regular expression delimiter, @see preg_quote() - * @return string for regular expression - * @author Milian Wolff - * @since 1.0.8 - * @access private - */ - function optimize_regexp_list($list, $regexp_delimiter = '/') { - $regex_chars = array('.', '\\', '+', '*', '?', '[', '^', ']', '$', - '(', ')', '{', '}', '=', '!', '<', '>', '|', ':', $regexp_delimiter); - sort($list); - $regexp_list = array(''); - $num_subpatterns = 0; - $list_key = 0; - - // the tokens which we will use to generate the regexp list - $tokens = array(); - $prev_keys = array(); - // go through all entries of the list and generate the token list - $cur_len = 0; - for ($i = 0, $i_max = count($list); $i < $i_max; ++$i) { - if ($cur_len > GESHI_MAX_PCRE_LENGTH) { - // seems like the length of this pcre is growing exorbitantly - $regexp_list[++$list_key] = $this->_optimize_regexp_list_tokens_to_string($tokens); - $num_subpatterns = substr_count($regexp_list[$list_key], '(?:'); - $tokens = array(); - $cur_len = 0; - } - $level = 0; - $entry = preg_quote((string) $list[$i], $regexp_delimiter); - $pointer = &$tokens; - // properly assign the new entry to the correct position in the token array - // possibly generate smaller common denominator keys - while (true) { - // get the common denominator - if (isset($prev_keys[$level])) { - if ($prev_keys[$level] == $entry) { - // this is a duplicate entry, skip it - continue 2; - } - $char = 0; - while (isset($entry[$char]) && isset($prev_keys[$level][$char]) - && $entry[$char] == $prev_keys[$level][$char]) { - ++$char; - } - if ($char > 0) { - // this entry has at least some chars in common with the current key - if ($char == strlen($prev_keys[$level])) { - // current key is totally matched, i.e. this entry has just some bits appended - $pointer = &$pointer[$prev_keys[$level]]; - } else { - // only part of the keys match - $new_key_part1 = substr($prev_keys[$level], 0, $char); - $new_key_part2 = substr($prev_keys[$level], $char); - - if (in_array($new_key_part1[0], $regex_chars) - || in_array($new_key_part2[0], $regex_chars)) { - // this is bad, a regex char as first character - $pointer[$entry] = array('' => true); - array_splice($prev_keys, $level, count($prev_keys), $entry); - $cur_len += strlen($entry); - continue; - } else { - // relocate previous tokens - $pointer[$new_key_part1] = array($new_key_part2 => $pointer[$prev_keys[$level]]); - unset($pointer[$prev_keys[$level]]); - $pointer = &$pointer[$new_key_part1]; - // recreate key index - array_splice($prev_keys, $level, count($prev_keys), array($new_key_part1, $new_key_part2)); - $cur_len += strlen($new_key_part2); - } - } - ++$level; - $entry = substr($entry, $char); - continue; - } - // else: fall trough, i.e. no common denominator was found - } - if ($level == 0 && !empty($tokens)) { - // we can dump current tokens into the string and throw them away afterwards - $new_entry = $this->_optimize_regexp_list_tokens_to_string($tokens); - $new_subpatterns = substr_count($new_entry, '(?:'); - if (GESHI_MAX_PCRE_SUBPATTERNS && $num_subpatterns + $new_subpatterns > GESHI_MAX_PCRE_SUBPATTERNS) { - $regexp_list[++$list_key] = $new_entry; - $num_subpatterns = $new_subpatterns; - } else { - if (!empty($regexp_list[$list_key])) { - $new_entry = '|' . $new_entry; - } - $regexp_list[$list_key] .= $new_entry; - $num_subpatterns += $new_subpatterns; - } - $tokens = array(); - $cur_len = 0; - } - // no further common denominator found - $pointer[$entry] = array('' => true); - array_splice($prev_keys, $level, count($prev_keys), $entry); - - $cur_len += strlen($entry); - break; - } - unset($list[$i]); - } - // make sure the last tokens get converted as well - $new_entry = $this->_optimize_regexp_list_tokens_to_string($tokens); - if (GESHI_MAX_PCRE_SUBPATTERNS && $num_subpatterns + substr_count($new_entry, '(?:') > GESHI_MAX_PCRE_SUBPATTERNS) { - if ( !empty($regexp_list[$list_key]) ) { - ++$list_key; - } - $regexp_list[$list_key] = $new_entry; - } else { - if (!empty($regexp_list[$list_key])) { - $new_entry = '|' . $new_entry; - } - $regexp_list[$list_key] .= $new_entry; - } - return $regexp_list; - } - /** - * this function creates the appropriate regexp string of an token array - * you should not call this function directly, @see $this->optimize_regexp_list(). - * - * @param &$tokens array of tokens - * @param $recursed bool to know wether we recursed or not - * @return string - * @author Milian Wolff - * @since 1.0.8 - * @access private - */ - function _optimize_regexp_list_tokens_to_string(&$tokens, $recursed = false) { - $list = ''; - foreach ($tokens as $token => $sub_tokens) { - $list .= $token; - $close_entry = isset($sub_tokens['']); - unset($sub_tokens['']); - if (!empty($sub_tokens)) { - $list .= '(?:' . $this->_optimize_regexp_list_tokens_to_string($sub_tokens, true) . ')'; - if ($close_entry) { - // make sub_tokens optional - $list .= '?'; - } - } - $list .= '|'; - } - if (!$recursed) { - // do some optimizations - // common trailing strings - // BUGGY! - //$list = preg_replace_callback('#(?<=^|\:|\|)\w+?(\w+)(?:\|.+\1)+(?=\|)#', create_function( - // '$matches', 'return "(?:" . preg_replace("#" . preg_quote($matches[1], "#") . "(?=\||$)#", "", $matches[0]) . ")" . $matches[1];'), $list); - // (?:p)? => p? - $list = preg_replace('#\(\?\:(.)\)\?#', '\1?', $list); - // (?:a|b|c|d|...)? => [abcd...]? - // TODO: a|bb|c => [ac]|bb - static $callback_2; - if (!isset($callback_2)) { - $callback_2 = create_function('$matches', 'return "[" . str_replace("|", "", $matches[1]) . "]";'); - } - $list = preg_replace_callback('#\(\?\:((?:.\|)+.)\)#', $callback_2, $list); - } - // return $list without trailing pipe - return substr($list, 0, -1); - } -} // End Class GeSHi - - -if (!function_exists('geshi_highlight')) { - /** - * Easy way to highlight stuff. Behaves just like highlight_string - * - * @param string The code to highlight - * @param string The language to highlight the code in - * @param string The path to the language files. You can leave this blank if you need - * as from version 1.0.7 the path should be automatically detected - * @param boolean Whether to return the result or to echo - * @return string The code highlighted (if $return is true) - * @since 1.0.2 - */ - function geshi_highlight($string, $language, $path = null, $return = false) { - $geshi = new GeSHi($string, $language, $path); - $geshi->set_header_type(GESHI_HEADER_NONE); - - if ($return) { - return '' . $geshi->parse_code() . ''; - } - - echo '' . $geshi->parse_code() . ''; - - if ($geshi->error()) { - return false; - } - return true; - } -} - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/4cs.php b/_piecrust/libs/Geshi/geshi/4cs.php deleted file mode 100644 index c00792e..0000000 --- a/_piecrust/libs/Geshi/geshi/4cs.php +++ /dev/null @@ -1,139 +0,0 @@ - 'GADV 4CS', - 'COMMENT_SINGLE' => array(1 => "//"), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'All', 'AllMatches', 'And', 'And_Filters', 'As', 'Asc', 'BasedOn', - 'BestMatch', 'Block', 'Buffer', 'ByRef', 'ByVal', 'Call', 'Channel', - 'Chr', 'Clear', 'Close', 'Confirm', 'Const', 'Continue', 'Cos', - 'Critical', 'Declare', 'Default', 'DefaultChannel', 'DefaultDelayTime', - 'DefaultReceiveMode', 'DefaultResponseTime', '#Define', 'DelayTime', - 'Delete', 'Div', 'Else', '#Else', 'ElseIf', '#ElseIf', 'End', 'EndCritical', - 'EndInlineC', 'EndFunction', 'EndIf', '#EndIf', 'EndInputList', - 'EndLocalChannel', 'EndScenario', 'EndSub', 'EndWhile', 'Error', - 'ErrorLevelOff', 'ErrorLevelOn', 'ErrorLevelSet', 'ErrorLevelSetRaw', - 'Event', 'EventMode', 'EventOff', 'EventOn', 'EventSet', 'EventSetRaw', - 'Execute', 'Exit', 'Exp', 'FileClose', 'FilterClear', 'FileEOF', 'FileOpen', - 'FileRead', 'FileSize', 'FileWrite', 'FilterAdd', 'FilterMode', - 'FilterOff', 'FilterOn', 'For', 'Format', 'Function', 'GoOnline', 'GoTo', - 'Handle', 'Hide', 'If', '#If', '#IfDef', '#IfNDef', 'Ignore', '#Include', - 'InlineC', 'Input', 'InputItem', 'InputList', 'Kill', 'LBound', 'LocalChannel', - 'Local', 'Log', 'Log10', 'LogOff', 'LogOn', 'Loop', 'Message', 'Mod', - 'MonitorChannel', 'MostFormat', 'MostMessage', 'Named', 'Never', 'Next', - 'NoOrder', 'Not', 'Nothing', 'NoWait', 'Numeric', 'OnError', 'OnEvent', - 'Or', 'Or_Filters', 'Order', 'Pass', 'Pow', 'Prototype', 'Quit', 'Raise', - 'Random', 'Receive', 'ReceiveMode', 'ReceiveRaw', 'Redim', 'Remote', 'Repeat', - 'Repeated', 'ResponseTime', 'Resume', 'ResumeCritical', 'RT_Common', - 'RT_Dll_Call', 'RT_FILEIO', 'RT_General', 'RT_HardwareAccess', - 'RT_MessageVariableAccess', 'RT_Scenario', 'RT_VariableAccess', 'Runtime', - 'Scenario', 'ScenarioEnd', 'ScenarioStart', 'ScenarioStatus', 'ScenarioTerminate', - 'Send', 'SendRaw', 'Set', 'SetError', 'Sin', 'Single', 'Show', 'Start', - 'StartCritical', 'Starts', 'Static', 'Step', 'Stop', 'String', 'Sub', - 'System_Error', 'TerminateAllChilds', 'Terminates', 'Then', 'Throw', 'TimeOut', - 'To', 'TooLate', 'Trunc', 'UBound', 'Unexpected', 'Until', 'User_Error', - 'View', 'Wait', 'Warning', 'While', 'XOr' - ), - 2 => array( - 'alias', 'winapi', 'long', 'char', 'double', 'float', 'int', 'short', 'lib' - ) - ), - 'SYMBOLS' => array( - '=', ':=', '<', '>', '<>' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000C0; font-weight: bold;', - 2 => 'color: #808080;' - ), - 'COMMENTS' => array( - 1 => 'color: #008000;' - ), - 'BRACKETS' => array( - 0 => 'color: #000080;' - ), - 'STRINGS' => array( - 0 => 'color: #800080;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #66cc66;' - ), - 'SYMBOLS' => array( - 0 => 'color: #000080;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/6502acme.php b/_piecrust/libs/Geshi/geshi/6502acme.php deleted file mode 100644 index 07f9eaf..0000000 --- a/_piecrust/libs/Geshi/geshi/6502acme.php +++ /dev/null @@ -1,230 +0,0 @@ - 'MOS 6502 (6510) ACME Cross Assembler format', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - /* 6502/6510 Opcodes. */ - 1 => array( - 'adc', 'and', 'asl', 'bcc', 'bcs', 'beq', 'bit', 'bmi', - 'bne', 'bpl', 'brk', 'bvc', 'bvs', 'clc', 'cld', 'cli', - 'clv', 'cmp', 'cpx', 'cpy', 'dec', 'dex', 'dey', 'eor', - 'inc', 'inx', 'iny', 'jmp', 'jsr', 'lda', 'ldx', 'ldy', - 'lsr', 'nop', 'ora', 'pha', 'php', 'pla', 'plp', 'rol', - 'ror', 'rti', 'rts', 'sbc', 'sec', 'sed', 'sei', 'sta', - 'stx', 'sty', 'tax', 'tay', 'tsx', 'txa', 'txs', 'tya', - ), - /* Index Registers, yes the 6502 has other registers by they are only - * accessable by specific opcodes. The 65816 also has access to the stack pointer S. */ - 2 => array( - 'x', 'y', 's' - ), - /* Directives or "pseudo opcodes" as defined by ACME 0.93 file AllPOs.txt. */ - 3 => array( - '!8', '!08', '!by', '!byte', - '!16', '!wo', '!word', - '!24', '!32', - '!fi', '!fill', - '!align', - '!ct', '!convtab', - '!tx', '!text', - '!pet', - '!raw', - '!scrxor', - '!to', - '!source', - '!bin', '!binary', - '!zn', '!zone', - '!sl', - '!svl', - '!sal', - '!if', '!ifdef', - '!for', - '!set', - '!do', 'while', 'until', - '!eof', '!endoffile', - '!warn', '!error', '!serious', - '!macro', -// , '*=' // Not a valid keyword (uses both * and = signs) moved to symbols instead. - '!initmem', - '!pseudopc', - '!cpu', - '!al', '!as', '!rl', '!rs', - ), - - /* 6502/6510 undocumented opcodes (often referred to as illegal instructions). - * These are present in the 6502/6510 but NOT in the newer CMOS revisions of the 65C02 or 65816. - * As they are undocumented instructions there are no "official" names for them, there are also - * several more that mainly perform various forms of crash and are not supported by ACME 0.93. - */ - 4 => array( - 'anc', 'arr', 'asr', 'dcp', 'dop', 'isc', 'jam', 'lax', - 'rla', 'rra', 'sax', 'sbx', 'slo', 'sre', 'top', - ), - /* 65c02 instructions, MOS added a few (much needed) instructions in the CMOS version of the 6502, but stupidly removed the undocumented/illegal opcodes. - * ACME 0.93 does not support the rmb0-7 and smb0-7 instructions (they are currently rem'ed out). */ - 5 => array( - 'bra', 'phx', 'phy', 'plx', 'ply', 'stz', 'trb', 'tsb' - ), - /* 65816 instructions. */ - 6 => array( - 'brl', 'cop', 'jml', 'jsl', 'mvn', 'mvp', 'pea', 'pei', - 'per', 'phb', 'phd', 'phk', 'plb', 'pld', 'rep', 'rtl', - 'sep', 'tcd', 'tcs', 'tdc', 'tsc', 'txy', 'tyx', 'wdm', - 'xba', 'xce', - ), - /* Deprecated directives or "pseudo opcodes" as defined by ACME 0.93 file AllPOs.txt. */ - 7 => array( - '!cbm', - '!sz', '!subzone', - '!realpc', - ), - /* Math functions, some are aliases for the symbols. */ - 8 => array( - 'not', 'div', 'mod', 'xor', 'or', 'sin', 'cos', 'tan', - 'arcsin', 'arccos', 'arctan', 'int', 'float', - - ), - - ), - 'SYMBOLS' => array( -// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. - '*=', '#', '!', '^', '-', '*', '/', - '%', '+', '-', '<<', '>>', '>>>', - '<', '>', '^', '<=', '<', '>=', '>', '!=', - '=', '&', '|', '<>', - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false, - 7 => false, - 8 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #00f; font-weight:bold;', - 2 => 'color: #00f; font-weight:bold;', - 3 => 'color: #080; font-weight:bold;', - 4 => 'color: #f00; font-weight:bold;', - 5 => 'color: #80f; font-weight:bold;', - 6 => 'color: #f08; font-weight:bold;', - 7 => 'color: #a04; font-weight:bold; font-style: italic;', - 8 => 'color: #000;', - ), - 'COMMENTS' => array( - 1 => 'color: #999; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #009; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000;' - ), - 'STRINGS' => array( - 0 => 'color: #080;' - ), - 'NUMBERS' => array( - GESHI_NUMBER_INT_BASIC => 'color: #f00;', - GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', - GESHI_NUMBER_HEX_PREFIX => 'color: #f00;', - GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', - GESHI_NUMBER_FLT_NONSCI => 'color: #f00;', - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #080;' - ), - 'REGEXPS' => array( - 0 => 'color: #f00;' - , 1 => 'color: #933;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '', - 8 => '', - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | - GESHI_NUMBER_FLT_NONSCI | - GESHI_NUMBER_HEX_PREFIX_DOLLAR | - GESHI_NUMBER_HEX_PREFIX | - GESHI_NUMBER_BIN_PREFIX_PERCENT, - // AMCE Octal format not support and gets picked up as Decimal unfortunately. - 'REGEXPS' => array( - //ACME .# Binary number format. e.g. %..##..##..## - 0 => '\%[\.\#]{1,64}', - //ACME Local Labels - 1 => '\.[_a-zA-Z][_a-zA-Z0-9]*', - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 8, - 'PARSER_CONTROL' => array( - 'NUMBERS' => array( - 'PRECHECK_RX' => '/[\da-fA-F\.\$\%]/' - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/6502kickass.php b/_piecrust/libs/Geshi/geshi/6502kickass.php deleted file mode 100644 index f4a4bd8..0000000 --- a/_piecrust/libs/Geshi/geshi/6502kickass.php +++ /dev/null @@ -1,241 +0,0 @@ - 'MOS 6502 (6510) Kick Assembler format', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - /* 6502/6510 Opcodes including undocumented opcodes as Kick Assembler 3.13 does not make a distinction - they are ALL valid. */ - 1 => array( - 'adc', 'ahx', 'alr', 'anc', 'anc2', 'and', 'arr', 'asl', - 'axs', 'bcc', 'bcs', 'beq', 'bit', 'bmi', 'bne', 'bpl', - 'brk', 'bvc', 'bvs', 'clc', 'cld', 'cli', 'clv', 'cmp', - 'cpx', 'cpy', 'dcp', 'dec', 'dex', 'dey', 'eor', 'inc', - 'inx', 'iny', 'isc', 'jmp', 'jsr', 'las', 'lax', 'lda', - 'ldx', 'ldy', 'lsr', 'nop', 'ora', 'pha', 'php', 'pla', - 'plp', 'rla', 'rol', 'ror', 'rra', 'rti', 'rts', 'sax', - 'sbc', 'sbc2', 'sec', 'sed', 'sei', 'shx', 'shy', 'slo', - 'sre', 'sta', 'stx', 'sty', 'tas', 'tax', 'tay', 'tsx', - 'txa', 'txs', 'tya', 'xaa', - ), - /* DTV additional Opcodes. */ - 2 => array( - 'bra', 'sac', 'sir' - ), - /* Index Registers, yes the 6502 has other registers by they are only - * accessable by specific opcodes. */ - 3 => array( - 'x', 'y' - ), - /* Directives. */ - 4 => array( - '.pc', '.pseudopc', 'virtual', '.align', '.byte', '.word', '.text', '.fill', - '.import source', '.import binary', '.import c64', '.import text', '.import', '.print', '.printnow', - '.error', '.var', '.eval', '.const', '.eval const', '.enum', '.label', '.define', '.struct', - 'if', '.for', '.macro', '.function', '.return', '.pseudocommand', '.namespace', '.filenamespace', - '.assert', '.asserterror', - ), - /* Kick Assembler 3.13 Functions/Operators. */ - 5 => array( - 'size', 'charAt', 'substring', 'asNumber', 'asBoolean', 'toIntString', 'toBinaryString', 'toOctalString', - 'toHexString', 'lock', // String functions/operators. - 'get', 'set', 'add', 'remove', 'shuffle', // List functions. - 'put', 'keys', // Hashtable functions. - 'getType', 'getValue', 'CmdArgument', // Pseudo Commands functions. - 'asmCommandSize', // Opcode Constants functions. - 'LoadBinary', 'getSize', - 'LoadSid', 'getData', - 'LoadPicture', 'width', 'height', 'getPixel', 'getSinglecolorByte', 'getMulticolorByte', - 'createFile', 'writeln', - 'cmdLineVars', - 'getX', 'getY', 'getZ', // Vector functions. - 'RotationMatrix', 'ScaleMatrix', 'MoveMatrix', 'PerspectiveMatrix', // Matrix functions. - - ), - - /* Kick Assembler 3.13 Math Functions. */ - 6 => array( - 'abs', 'acos', 'asin', 'atan', 'atan2', 'cbrt', 'ceil', 'cos', 'cosh', - 'exp', 'expm1', 'floor', 'hypot', 'IEEEremainder', 'log', 'log10', - 'log1p', 'max', 'min', 'pow', 'mod', 'random', 'round', 'signum', - 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'toDegrees', 'toRadians', - ), - - /* Kick Assembler 3.13 Objects/Data Types. */ - 7 => array( - 'List', // List() Object. - 'Hashtable', // Hashtable() Object. - 'Vector', // Vector() Object. - 'Matrix', // Matrix() Object. - ), - - /* Kick Assembler 3.13 Constants. */ - 8 => array( - 'PI', 'E', // Math Constants. - 'AT_ABSOLUTE' , 'AT_ABSOLUTEX' , 'AT_ABSOLUTEY' , 'AT_IMMEDIATE', // Pseudo Commands Constants. - 'AT_INDIRECT' , 'AT_IZEROPAGEX' , 'AT_IZEROPAGEY' , 'AT_NONE', - 'BLACK', 'WHITE', 'RED', 'CYAN', 'PURPLE', 'GREEN', 'BLUE', // Colour Constants. - 'YELLOW', 'ORANGE', 'BROWN', 'LIGHT_RED', 'DARK_GRAY', 'GRAY', - 'LIGHT_GREEN', 'LIGHT_BLUE', 'LIGHT_GRAY', - 'C64FILE', // Template Tag names. - 'BF_C64FILE', 'BF_BITMAP_SINGLECOLOR', 'BF_KOALA' , 'BF_FLI', // Binary format constant - ), - - ), - 'SYMBOLS' => array( -// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. - '-', '+', '-', '*', '/', '>', '<', '<<', '>>', '&', '|', '^', '=', '==', - '!=', '>=', '<=', '!', '&&', '||', '#', - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => true, - 5 => true, - 6 => true, - 7 => true, - 8 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #00f; font-weight:bold;', - 2 => 'color: #00f; font-weight:bold;', - 3 => 'color: #00f; font-weight:bold;', - 4 => 'color: #080; font-weight:bold;', - 5 => 'color: #80f; font-weight:bold;', - 6 => 'color: #f08; font-weight:bold;', - 7 => 'color: #a04; font-weight:bold; font-style: italic;', - 8 => 'color: #f08; font-weight:bold;', - ), - 'COMMENTS' => array( - 1 => 'color: #999; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #009; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000;' - ), - 'STRINGS' => array( - 0 => 'color: #080;' - ), - 'NUMBERS' => array( - GESHI_NUMBER_INT_BASIC => 'color: #f00;', - GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', - GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', - GESHI_NUMBER_FLT_NONSCI => 'color: #f00;', - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #080;' - ), - 'REGEXPS' => array( - 0 => 'color: #933;', - 1 => 'color: #933;', - 2 => 'color: #933;', - 3 => 'color: #00f; font-weight:bold;', - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '', - 8 => '', - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | - GESHI_NUMBER_FLT_NONSCI | - GESHI_NUMBER_HEX_PREFIX_DOLLAR | - GESHI_NUMBER_BIN_PREFIX_PERCENT, - // AMCE Octal format not support and gets picked up as Decimal unfortunately. - 'REGEXPS' => array( - //Labels end with a collon. - 0 => '[!]{0,1}[_a-zA-Z][_a-zA-Z0-9]*\:', - //Multi Labels (local labels) references start with ! and end with + or - for forward/backward reference. - 1 => '![_a-zA-Z][_a-zA-Z0-9]*[+-]', - //Macros start with a colon :Macro. - 2 => ':[_a-zA-Z][_a-zA-Z0-9]*', - // Opcode Constants, such as LDA_IMM, STA_IZPY are basically all 6502 opcodes - // in UPPER case followed by _underscore_ and the ADDRESS MODE. - // As you might imagine that is rather a lot ( 78 supported Opcodes * 12 Addressing modes = 936 variations) - // So I thought it better and easier to maintain as a regular expression. - // NOTE: The order of the Address Modes must be maintained or it wont work properly (eg. place ZP first and find out!) - 3 => '[A-Z]{3}[2]?_(?:IMM|IND|IZPX|IZPY|ZPX|ZPY|ABSX|ABSY|REL|ABS|ZP)', - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 8, - 'PARSER_CONTROL' => array( - 'NUMBERS' => array( - 'PRECHECK_RX' => '/[\da-fA-F\.\$\%]/' - ), - 'KEYWORDS' => array( - 5 => array ( - 'DISALLOWED_BEFORE' => "(?|^&'\"])" - ), - 6 => array ( - 'DISALLOWED_BEFORE' => "(?|^&'\"])" - ), - 8 => array ( - 'DISALLOWED_BEFORE' => "(?|^&'\"])" - ) - ) - ), -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/6502tasm.php b/_piecrust/libs/Geshi/geshi/6502tasm.php deleted file mode 100644 index 391e017..0000000 --- a/_piecrust/libs/Geshi/geshi/6502tasm.php +++ /dev/null @@ -1,189 +0,0 @@ - 'MOS 6502 (6510) TASM/64TASS 1.46 Assembler format', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - /* 6502/6510 Opcodes. */ - 1 => array( - 'adc', 'and', 'asl', 'bcc', 'bcs', 'beq', 'bit', 'bmi', - 'bne', 'bpl', 'brk', 'bvc', 'bvs', 'clc', 'cld', 'cli', - 'clv', 'cmp', 'cpx', 'cpy', 'dec', 'dex', 'dey', 'eor', - 'inc', 'inx', 'iny', 'jmp', 'jsr', 'lda', 'ldx', 'ldy', - 'lsr', 'nop', 'ora', 'pha', 'php', 'pla', 'plp', 'rol', - 'ror', 'rti', 'rts', 'sbc', 'sec', 'sed', 'sei', 'sta', - 'stx', 'sty', 'tax', 'tay', 'tsx', 'txa', 'txs', 'tya', - ), - /* Index Registers, yes the 6502 has other registers by they are only - * accessable by specific opcodes. The 65816 also has access to the stack pointer S. */ - 2 => array( - 'x', 'y', 's' - ), - /* Directives. */ - 3 => array( - '.al', '.align', '.as', '.assert', '.binary', '.byte', '.cerror', '.char', - '.comment', '.cpu', '.cwarn', '.databank', '.dpage', '.else', '.elsif', - '.enc', '.endc', '.endif', '.endm', '.endp', '.error', '.fi', '.fill', - '.for', '.here', '.if', '.ifeq', '.ifmi', '.ifne', '.ifpl', - '.include', '.int', '.logical', '.long', '.macro', '.next', '.null', '.offs', - '.page', '.pend', '.proc', '.rept', '.rta', '.shift', '.text', '.warn', '.word', - '.xl', '.xs', -// , '*=' // Not a valid keyword (uses both * and = signs) moved to symbols instead. - ), - - /* 6502/6510 undocumented opcodes (often referred to as illegal instructions). - * These are present in the 6502/6510 but NOT in the newer CMOS revisions of the 65C02 or 65816. - * As they are undocumented instructions there are no "official" names for them, these are the names - * used by 64TASS V1.46. - */ - 4 => array( - 'ahx', 'alr', 'anc', 'ane', 'arr', 'asr', 'axs', 'dcm', - 'dcp', 'ins', 'isb', 'isc', 'jam', 'lae', 'las', 'lax', - 'lds', 'lxa', 'rla', 'rra', 'sax', 'sbx', 'sha', 'shs', - 'shx', 'shy', 'slo', 'sre', 'tas', 'xaa', - ), - /* 65c02 instructions, MOS added a few (much needed) instructions in the - * CMOS version of the 6502, but stupidly removed the undocumented/illegal opcodes. */ - 5 => array( - 'bra', 'dea', 'gra', 'ina', 'phx', 'phy', 'plx', 'ply', - 'stz', 'trb', 'tsb', - ), - /* 65816 instructions. */ - 6 => array( - 'brl', 'cop', 'jml', 'jsl', 'mvn', 'mvp', 'pea', 'pei', - 'per', 'phb', 'phd', 'phk', 'plb', 'pld', 'rep', 'rtl', - 'sep', 'stp', 'swa', 'tad', 'tcd', 'tcs', 'tda', - 'tdc', 'tsa', 'tsc', 'txy', 'tyx', 'wai', 'xba', 'xce', - ), - /* Deprecated directives (or yet to be implemented). */ - 7 => array( - '.global', '.check' - ), - ), - 'SYMBOLS' => array( -// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. - '*=', '#', '<', '>', '`', '=', '<', '>', - '!=', '>=', '<=', '+', '-', '*', '/', '//', '|', - '^', '&', '<<', '>>', '-', '~', '!', - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false, - 7 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #00f; font-weight:bold;', - 2 => 'color: #00f; font-weight:bold;', - 3 => 'color: #080; font-weight:bold;', - 4 => 'color: #f00; font-weight:bold;', - 5 => 'color: #80f; font-weight:bold;', - 6 => 'color: #f08; font-weight:bold;', - 7 => 'color: #a04; font-weight:bold; font-style: italic;', - ), - 'COMMENTS' => array( - 1 => 'color: #999; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #009; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000;' - ), - 'STRINGS' => array( - 0 => 'color: #080;' - ), - 'NUMBERS' => array( - GESHI_NUMBER_INT_BASIC => 'color: #f00;', - GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', - GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #080;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '', - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | - GESHI_NUMBER_HEX_PREFIX_DOLLAR | - GESHI_NUMBER_BIN_PREFIX_PERCENT, - // AMCE Octal format not support and gets picked up as Decimal unfortunately. - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 8, - 'PARSER_CONTROL' => array( - 'NUMBERS' => array( - 'PRECHECK_RX' => '/[\da-fA-F\.\$\%]/' - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/68000devpac.php b/_piecrust/libs/Geshi/geshi/68000devpac.php deleted file mode 100644 index d0f3a50..0000000 --- a/_piecrust/libs/Geshi/geshi/68000devpac.php +++ /dev/null @@ -1,168 +0,0 @@ - 'Motorola 68000 - HiSoft Devpac ST 2 Assembler format', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - /* Directives. */ - 1 => array( - 'end', 'include', 'incbin', 'opt', 'even', 'cnop', 'dc.b', 'dc.w', - 'dc.l', 'ds.b', 'ds.w', 'ds.l', 'dcb.b', 'dcb.w', 'dcb.l', - 'fail', 'output', '__g2', 'rept', 'endr', 'list', 'nolist', 'plen', - 'llen', 'ttl', 'subttl', 'spc', 'page', 'listchar', 'format', - 'equ', 'equr', 'set', 'reg', 'rs.b', 'rs.w', 'rs.l', 'rsreset', - 'rsset', '__rs', 'ifeq', 'ifne', 'ifgt', 'ifge', 'iflt', 'ifle', 'endc', - 'ifd', 'ifnd', 'ifc', 'ifnc', 'elseif', 'iif', 'macro', 'endm', 'mexit', - 'narg', '\@', 'section', 'text', 'data', 'bss', 'xdef', 'xref', 'org', - 'offset', '__lk', 'comment', - ), - /* 68000 Opcodes. */ - 2 => array( - 'abcd', 'add', 'adda', 'addi', 'addq', 'addx', 'and', 'andi', - 'asl', 'asr', 'bcc', 'bchg', 'bclr', 'bcs', 'beq', 'bge', - 'bgt', 'bhi', 'ble', 'bls', 'blt', 'bmi', 'bne', 'bpl', - 'bra', 'bset', 'bsr', 'btst', 'bvc', 'bvs', 'chk', 'clr', - 'cmp', 'cmpa', 'cmpi', 'cmpm', 'dbcc', 'dbcs', 'dbeq', 'dbf', - 'dbge', 'dbgt', 'dbhi', 'dble', 'dbls', 'dblt', 'dbmi', 'dbne', - 'dbpl', 'dbra', 'dbt', 'dbvc', 'dbvs', 'divs', 'divu', 'eor', - 'eori', 'exg', 'ext','illegal','jmp', 'jsr', 'lea', 'link', - 'lsl', 'lsr', 'move','movea','movem','movep','moveq', 'muls', - 'mulu', 'nbcd', 'neg', 'negx', 'nop', 'not', 'or', 'ori', - 'pea', 'reset', 'rol', 'ror', 'roxl', 'roxr', 'rte', 'rtr', - 'rts', 'sbcd', 'scc', 'scs', 'seq', 'sf', 'sge', 'sgt', - 'shi', 'sle', 'sls', 'slt', 'smi', 'sne', 'spl', 'st', - 'stop', 'sub', 'suba', 'subi', 'subq', 'subx', 'svc', 'svs', - 'swap', 'tas', 'trap','trapv', 'tst', 'unlk', - ), - /* oprand sizes. */ - 3 => array( - 'b', 'w', 'l' , 's' - ), - /* 68000 Registers. */ - 4 => array( - 'd0', 'd1', 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', - 'a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'sp', 'usp', 'ssp', - 'pc', 'ccr', 'sr', - ), - ), - 'SYMBOLS' => array( -// '[', ']', '(', ')', '{', '}', // These are already defined by GeSHi as BRACKETS. - '+', '-', '~', '<<', '>>', '&', - '!', '^', '*', '/', '=', '<', '>', - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #f08; font-weight:bold;', - 2 => 'color: #00f; font-weight:bold;', - 3 => 'color: #00f; font-weight:bold;', - 4 => 'color: #080; font-weight:bold;', - ), - 'COMMENTS' => array( - 1 => 'color: #999; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #009; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000;' - ), - 'STRINGS' => array( - 0 => 'color: #080;' - ), - 'NUMBERS' => array( - GESHI_NUMBER_INT_BASIC => 'color: #f00;', - GESHI_NUMBER_HEX_PREFIX_DOLLAR => 'color: #f00;', - GESHI_NUMBER_BIN_PREFIX_PERCENT => 'color: #f00;', - GESHI_NUMBER_OCT_PREFIX_AT => 'color: #f00;', - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #080;' - ), - 'REGEXPS' => array( - 0 => 'color: #933;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | - GESHI_NUMBER_HEX_PREFIX_DOLLAR | - GESHI_NUMBER_OCT_PREFIX_AT | - GESHI_NUMBER_BIN_PREFIX_PERCENT, - 'REGEXPS' => array( - //Labels may end in a colon. - 0 => '(?<=\A\x20|\r|\n|^)[\._a-zA-Z][\._a-zA-Z0-9]*[\:]?[\s]' - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 8, - 'PARSER_CONTROL' => array( - 'NUMBERS' => array( - 'PRECHECK_RX' => '/[\da-fA-F\.\$\%\@]/' - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/abap.php b/_piecrust/libs/Geshi/geshi/abap.php deleted file mode 100644 index 8b510df..0000000 --- a/_piecrust/libs/Geshi/geshi/abap.php +++ /dev/null @@ -1,1409 +0,0 @@ -.htm - * - * CHANGES - * ------- - * 2009/02/25 (1.0.8.3) - * - Some more rework of the language file - * 2009/01/04 (1.0.8.2) - * - Major Release, more than 1000 statements and keywords added = whole abap 7.1 (Sandra Rossi) - * 2007/06/27 (1.0.0) - * - First Release - * - * TODO - * ---- - * - in DATA data TYPE type, 2nd "data" and 2nd "type" are highlighted with data - * style, but should be ignored. Same problem for all words!!! This is quite impossible to - * solve it as we should define syntaxes of all statements (huge effort!) and use a lex - * or something like that instead of regexp I guess. - * - Some words are considered as being statement names (report, tables, etc.) though they - * are used as keyword in some statements. For example: FORM xxxx TABLES itab. It was - * arbitrary decided to define them as statement instead of keyword, because it may be - * useful to have the URL to SAP help for some of them. - * - if a comment is between 2 words of a keyword (for example SEPARATED "comment \n BY), - * it is not considered as a keyword, but it should! - * - for statements like "READ DATASET", GeSHi does not allow to set URLs because these - * statements are determined by REGEXPS. For "READ DATASET", the URL should be - * ABAPREAD_DATASET.htm. If a technical solution is found, be careful : URLs - * are sometimes not valid because the URL does not exist. For example, for "AT NEW" - * statement, the URL should be ABAPAT_ITAB.htm (not ABAPAT_NEW.htm). - * There are many other exceptions. - * Note: for adding this functionality within your php program, you can execute this code: - * function add_urls_to_multi_tokens( $matches ) { - * $url = preg_replace( "/[ \n]+/" , "_" , $matches[3] ); - * if( $url == $matches[3] ) return $matches[0] ; - * else return $matches[1]."".$matches[3]."".$matches[4]; - * } - * $html = $geshi->parse_code(); - * $html = preg_replace_callback( "£(zzz:(control|statement|data);\">)(.+?)()£s", "add_urls_to_multi_tokens", $html ); - * echo $html; - * - Numbers followed by a dot terminating the statement are not properly recognized - * - ************************************************************************************* - * - * This file is part of GeSHi. - * - * GeSHi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GeSHi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeSHi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - ************************************************************************************/ - -$language_data = array( - 'LANG_NAME' => 'ABAP', - 'COMMENT_SINGLE' => array( - 1 => '"' - ), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array( - // lines beginning with star at 1st position are comments - // (star anywhere else is not a comment, especially be careful with - // "assign dref->* to " statement) - 2 => '/^\*.*?$/m' - ), - 'CASE_KEYWORDS' => 0, - 'QUOTEMARKS' => array( - 1 => "'", - 2 => "`" - ), - 'ESCAPE_CHAR' => '', - - 'KEYWORDS' => array( - //*********************************************** - // Section 2 : process sequences of several tokens - //*********************************************** - - 7 => array( - 'at new', - 'at end of', - 'at first', - 'at last', - 'loop at', - 'loop at screen', - ), - - 8 => array( - 'private section', - 'protected section', - 'public section', - 'at line-selection', - 'at selection-screen', - 'at user-command', - 'assign component', - 'assign table field', - 'call badi', - 'call customer-function', - 'call customer subscreen', - 'call dialog', - 'call function', - 'call method', - 'call screen', - 'call selection-screen', - 'call transaction', - 'call transformation', - 'close cursor', - 'close dataset', - 'commit work', - 'convert date', - 'convert text', - 'convert time stamp', - 'create data', - 'create object', - 'delete dataset', - 'delete from', - 'describe distance', - 'describe field', - 'describe list', - 'describe table', - 'exec sql', - 'exit from sql', - 'exit from step-loop', - 'export dynpro', - 'export nametab', - 'free memory', - 'generate subroutine-pool', - 'get badi', - 'get bit', - 'get cursor', - 'get dataset', - 'get locale', - 'get parameter', - 'get pf-status', - 'get property', - 'get reference', - 'get run time', - 'get time', - 'get time stamp', - 'import directory', - 'insert report', - 'insert text-pool', - 'leave list-processing', - 'leave program', - 'leave screen', - 'leave to list-processing', - 'leave to transaction', - 'modify line', - 'modify screen', - 'move percentage', - 'open cursor', - 'open dataset', - 'raise event', - 'raise exception', - 'read dataset', - 'read line', - 'read report', - 'read table', - 'read textpool', - 'receive results from function', - 'refresh control', - 'rollback work', - 'set bit', - 'set blank lines', - 'set country', - 'set cursor', - 'set dataset', - 'set extended check', - 'set handler', - 'set hold data', - 'set language', - 'set left scroll-boundary', - 'set locale', - 'set margin', - 'set parameter', - 'set pf-status', - 'set property', - 'set run time analyzer', - 'set run time clock', - 'set screen', - 'set titlebar', - 'set update task', - 'set user-command', - 'suppress dialog', - 'truncate dataset', - 'wait until', - 'wait up to', - ), - - 9 => array( - 'accepting duplicate keys', - 'accepting padding', - 'accepting truncation', - 'according to', - 'actual length', - 'adjacent duplicates', - 'after input', - 'all blob columns', - 'all clob columns', - 'all fields', - 'all methods', - 'all other columns', - 'and mark', - 'and return to screen', - 'and return', - 'and skip first screen', - 'and wait', - 'any table', - 'appendage type', - 'archive mode', - 'archiving parameters', - 'area handle', - 'as checkbox', - 'as icon', - 'as line', - 'as listbox', - 'as person table', - 'as search patterns', - 'as separate unit', - 'as subscreen', - 'as symbol', - 'as text', - 'as window', - 'at cursor-selection', - 'at exit-command', - 'at next application statement', - 'at position', - - 'backup into', - 'before output', - 'before unwind', - 'begin of block', - 'begin of common part', - 'begin of line', - 'begin of screen', - 'begin of tabbed block', - 'begin of version', - 'begin of', - 'big endian', - 'binary mode', - 'binary search', - 'by kernel module', - 'bypassing buffer', - - 'client specified', - 'code page', - 'code page hint', - 'code page into', - 'color black', - 'color blue', - 'color green', - 'color pink', - 'color red', - 'color yellow', - 'compression off', - 'compression on', - 'connect to', - 'corresponding fields of table', - 'corresponding fields of', - 'cover page', - 'cover text', - 'create package', - 'create private', - 'create protected', - 'create public', - 'current position', - - 'data buffer', - 'data values', - 'dataset expiration', - 'daylight saving time', - 'default key', - 'default program', - 'default screen', - 'defining database', - 'deleting leading', - 'deleting trailing', - 'directory entry', - 'display like', - 'display offset', - 'during line-selection', - 'dynamic selections', - - 'edit mask', - 'end of block', - 'end of common part', - 'end of file', - 'end of line', - 'end of screen', - 'end of tabbed block', - 'end of version', - 'end of', - 'endian into', - 'ending at', - 'enhancement options into', - 'enhancement into', - 'environment time format', - 'execute procedure', - 'exporting list to memory', - 'extension type', - - 'field format', - 'field selection', - 'field value into', - 'final methods', - 'first occurrence of', - 'fixed-point arithmetic', - 'for all entries', - 'for all instances', - 'for appending', - 'for columns', - 'for event of', - 'for field', - 'for high', - 'for input', - 'for lines', - 'for low', - 'for node', - 'for output', - 'for select', - 'for table', - 'for testing', - 'for update', - 'for user', - 'frame entry', - 'frame program from', - 'from code page', - 'from context', - 'from database', - 'from logfile id', - 'from number format', - 'from screen', - 'from table', - 'function key', - - 'get connection', - 'global friends', - 'group by', - - 'hashed table of', - 'hashed table', - - 'if found', - 'ignoring case', - 'ignoring conversion errors', - 'ignoring structure boundaries', - 'implementations from', - 'in background', - 'in background task', - 'in background unit', - 'in binary mode', - 'in byte mode', - 'in char-to-hex mode', - 'in character mode', - 'in group', - 'in legacy binary mode', - 'in legacy text mode', - 'in program', - 'in remote task', - 'in text mode', - 'in table', - 'in update task', - 'include bound', - 'include into', - 'include program from', - 'include structure', - 'include type', - 'including gaps', - 'index table', - 'inheriting from', - 'init destination', - 'initial line of', - 'initial line', - 'initial size', - 'internal table', - 'into sortable code', - - 'keep in spool', - 'keeping directory entry', - 'keeping logical unit of work', - 'keeping task', - 'keywords from', - - 'left margin', - 'left outer', - 'levels into', - 'line format', - 'line into', - 'line of', - 'line page', - 'line value from', - 'line value into', - 'lines of', - 'list authority', - 'list dataset', - 'list name', - 'little endian', - 'lob handle for', - 'local friends', - 'locator for', - 'lower case', - - 'main table field', - 'match count', - 'match length', - 'match line', - 'match offset', - 'matchcode object', - 'maximum length', - 'maximum width into', - 'memory id', - 'message into', - 'messages into', - 'modif id', - - 'nesting level', - 'new list identification', - 'next cursor', - 'no database selection', - 'no dialog', - 'no end of line', - 'no fields', - 'no flush', - 'no intervals', - 'no intervals off', - 'no standard page heading', - 'no-extension off', - 'non-unique key', - 'non-unique sorted key', - 'not at end of mode', - 'number of lines', - 'number of pages', - - 'object key', - 'obligatory off', - 'of current page', - 'of page', - 'of program', - 'offset into', - 'on block', - 'on commit', - 'on end of task', - 'on end of', - 'on exit-command', - 'on help-request for', - 'on radiobutton group', - 'on rollback', - 'on value-request for', - 'open for package', - 'option class-coding', - 'option class', - 'option coding', - 'option expand', - 'option syncpoints', - 'options from', - 'order by', - 'overflow into', - - 'package section', - 'package size', - 'preferred parameter', - 'preserving identifier escaping', - 'primary key', - 'print off', - 'print on', - 'program from', - 'program type', - - 'radiobutton groups', - 'radiobutton group', - 'range of', - 'reader for', - 'receive buffer', - 'reduced functionality', - 'ref to data', - 'ref to object', - 'ref to', - - 'reference into', - 'renaming with suffix', - 'replacement character', - 'replacement count', - 'replacement length', - 'replacement line', - 'replacement offset', - 'respecting blanks', - 'respecting case', - 'result into', - 'risk level', - - 'sap cover page', - 'search fkeq', - 'search fkge', - 'search gkeq', - 'search gkge', - 'section of', - 'send buffer', - 'separated by', - 'shared buffer', - 'shared memory', - 'shared memory enabled', - 'skipping byte-order mark', - 'sorted by', - 'sorted table of', - 'sorted table', - 'spool parameters', - 'standard table of', - 'standard table', - 'starting at', - 'starting new task', - 'statements into', - 'structure default', - 'structures into', - - 'table field', - 'table of', - 'text mode', - 'time stamp', - 'time zone', - 'to code page', - 'to column', - 'to context', - 'to first page', - 'to last page', - 'to last line', - 'to line', - 'to lower case', - 'to number format', - 'to page', - 'to sap spool', - 'to upper case', - 'tokens into', - 'transporting no fields', - 'type tableview', - 'type tabstrip', - - 'unicode enabling', - 'up to', - 'upper case', - 'using edit mask', - 'using key', - 'using no edit mask', - 'using screen', - 'using selection-screen', - 'using selection-set', - 'using selection-sets of program', - - 'valid between', - 'valid from', - 'value check', - 'via job', - 'via selection-screen', - 'visible length', - - 'whenever found', - 'with analysis', - 'with byte-order mark', - 'with comments', - 'with current switchstates', - 'with explicit enhancements', - 'with frame', - 'with free selections', - 'with further secondary keys', - 'with header line', - 'with hold', - 'with implicit enhancements', - 'with inactive enhancements', - 'with includes', - 'with key', - 'with linefeed', - 'with list tokenization', - 'with native linefeed', - 'with non-unique key', - 'with null', - 'with pragmas', - 'with precompiled headers', - 'with selection-table', - 'with smart linefeed', - 'with table key', - 'with test code', - 'with type-pools', - 'with unique key', - 'with unix linefeed', - 'with windows linefeed', - 'without further secondary keys', - 'without selection-screen', - 'without spool dynpro', - 'without trmac', - 'word into', - 'writer for' - ), - - //********************************************************** - // Other abap statements - //********************************************************** - 3 => array( - 'add', - 'add-corresponding', - 'aliases', - 'append', - 'assign', - 'at', - 'authority-check', - - 'break-point', - - 'clear', - 'collect', - 'compute', - 'concatenate', - 'condense', - 'class', - 'class-events', - 'class-methods', - 'class-pool', - - 'define', - 'delete', - 'demand', - 'detail', - 'divide', - 'divide-corresponding', - - 'editor-call', - 'end-of-file', - 'end-enhancement-section', - 'end-of-definition', - 'end-of-page', - 'end-of-selection', - 'endclass', - 'endenhancement', - 'endexec', - 'endform', - 'endfunction', - 'endinterface', - 'endmethod', - 'endmodule', - 'endon', - 'endprovide', - 'endselect', - 'enhancement', - 'enhancement-point', - 'enhancement-section', - 'export', - 'extract', - 'events', - - 'fetch', - 'field-groups', - 'find', - 'format', - 'form', - 'free', - 'function-pool', - 'function', - - 'get', - - 'hide', - - 'import', - 'infotypes', - 'input', - 'insert', - 'include', - 'initialization', - 'interface', - 'interface-pool', - 'interfaces', - - 'leave', - 'load-of-program', - 'log-point', - - 'maximum', - 'message', - 'methods', - 'method', - 'minimum', - 'modify', - 'move', - 'move-corresponding', - 'multiply', - 'multiply-corresponding', - - 'new-line', - 'new-page', - 'new-section', - - 'overlay', - - 'pack', - 'perform', - 'position', - 'print-control', - 'program', - 'provide', - 'put', - - 'raise', - 'refresh', - 'reject', - 'replace', - 'report', - 'reserve', - - 'scroll', - 'search', - 'select', - 'selection-screen', - 'shift', - 'skip', - 'sort', - 'split', - 'start-of-selection', - 'submit', - 'subtract', - 'subtract-corresponding', - 'sum', - 'summary', - 'summing', - 'supply', - 'syntax-check', - - 'top-of-page', - 'transfer', - 'translate', - 'type-pool', - - 'uline', - 'unpack', - 'update', - - 'window', - 'write' - - ), - - //********************************************************** - // keywords - //********************************************************** - - 4 => array( - 'abbreviated', - 'abstract', - 'accept', - 'acos', - 'activation', - 'alias', - 'align', - 'all', - 'allocate', - 'and', - 'assigned', - 'any', - 'appending', - 'area', - 'as', - 'ascending', - 'asin', - 'assigning', - 'atan', - 'attributes', - 'avg', - - 'backward', - 'between', - 'bit-and', - 'bit-not', - 'bit-or', - 'bit-set', - 'bit-xor', - 'boolc', - 'boolx', - 'bound', - 'bt', - 'blocks', - 'bounds', - 'boxed', - 'by', - 'byte-ca', - 'byte-cn', - 'byte-co', - 'byte-cs', - 'byte-na', - 'byte-ns', - - 'ca', - 'calling', - 'casting', - 'ceil', - 'center', - 'centered', - 'changing', - 'char_off', - 'charlen', - 'circular', - 'class_constructor', - 'client', - 'clike', - 'close', - 'cmax', - 'cmin', - 'cn', - 'cnt', - 'co', - 'col_background', - 'col_group', - 'col_heading', - 'col_key', - 'col_negative', - 'col_normal', - 'col_positive', - 'col_total', - 'color', - 'column', - 'comment', - 'comparing', - 'components', - 'condition', - 'context', - 'copies', - 'count', - 'country', - 'cpi', - 'creating', - 'critical', - 'concat_lines_of', - 'cos', - 'cosh', - 'count_any_not_of', - 'count_any_of', - 'cp', - 'cs', - 'csequence', - 'currency', - 'current', - 'cx_static_check', - 'cx_root', - 'cx_dynamic_check', - - 'dangerous', - 'database', - 'datainfo', - 'date', - 'dbmaxlen', - 'dd/mm/yy', - 'dd/mm/yyyy', - 'ddmmyy', - 'deallocate', - 'decfloat', - 'decfloat16', - 'decfloat34', - 'decimals', - 'default', - 'deferred', - 'definition', - 'department', - 'descending', - 'destination', - 'disconnect', - 'display-mode', - 'distance', - 'distinct', - 'div', - 'dummy', - - 'encoding', - 'end-lines', - 'engineering', - 'environment', - 'eq', - 'equiv', - 'error_message', - 'errormessage', - 'escape', - 'exact', - 'exception-table', - 'exceptions', - 'exclude', - 'excluding', - 'exists', - 'exp', - 'exponent', - 'exporting', - 'extended_monetary', - - 'field', - 'filter-table', - 'filters', - 'filter', - 'final', - 'find_any_not_of', - 'find_any_of', - 'find_end', - 'floor', - 'first-line', - 'font', - 'forward', - 'for', - 'frac', - 'from_mixed', - 'friends', - 'from', - - 'giving', - 'ge', - 'gt', - - 'handle', - 'harmless', - 'having', - 'head-lines', - 'help-id', - 'help-request', - 'high', - 'hold', - 'hotspot', - - 'id', - 'ids', - 'immediately', - 'implementation', - 'importing', - 'in', - 'initial', - 'incl', - 'including', - 'increment', - 'index', - 'index-line', - 'inner', - 'inout', - 'intensified', - 'into', - 'inverse', - 'is', - 'iso', - - 'join', - - 'key', - 'kind', - - 'log10', - 'language', - 'late', - 'layout', - 'le', - 'lt', - 'left-justified', - 'leftplus', - 'leftspace', - 'left', - 'length', - 'level', - 'like', - 'line-count', - 'line-size', - 'lines', - 'line', - 'load', - 'long', - 'lower', - 'low', - 'lpi', - - 'matches', - 'match', - 'mail', - 'major-id', - 'max', - 'medium', - 'memory', - 'message-id', - 'module', - 'minor-id', - 'min', - 'mm/dd/yyyy', - 'mm/dd/yy', - 'mmddyy', - 'mode', - 'modifier', - 'mod', - 'monetary', - - 'name', - 'nb', - 'ne', - 'next', - 'no-display', - 'no-extension', - 'no-gap', - 'no-gaps', - 'no-grouping', - 'no-heading', - 'no-scrolling', - 'no-sign', - 'no-title', - 'no-topofpage', - 'no-zero', - 'nodes', - 'non-unicode', - 'no', - 'number', - 'nmax', - 'nmin', - 'not', - 'null', - 'numeric', - 'numofchar', - - 'o', - 'objects', - 'obligatory', - 'occurs', - 'offset', - 'off', - 'of', - 'only', - 'open', - 'option', - 'optional', - 'options', - 'output-length', - 'output', - 'out', - 'on change of', - 'or', - 'others', - - 'pad', - 'page', - 'pages', - 'parameter-table', - 'part', - 'performing', - 'pos_high', - 'pos_low', - 'priority', - 'public', - 'pushbutton', - - 'queue-only', - 'quickinfo', - - 'raising', - 'range', - 'read-only', - 'received', - 'receiver', - 'receiving', - 'redefinition', - 'reference', - 'regex', - 'replacing', - 'reset', - 'responsible', - 'result', - 'results', - 'resumable', - 'returncode', - 'returning', - 'right', - 'right-specified', - 'rightplus', - 'rightspace', - 'round', - 'rows', - 'repeat', - 'requested', - 'rescale', - 'reverse', - - 'scale_preserving', - 'scale_preserving_scientific', - 'scientific', - 'scientific_with_leading_zero', - 'screen', - 'scrolling', - 'seconds', - 'segment', - 'shift_left', - 'shift_right', - 'sign', - 'simple', - 'sin', - 'sinh', - 'short', - 'shortdump-id', - 'sign_as_postfix', - 'single', - 'size', - 'some', - 'source', - 'space', - 'spots', - 'stable', - 'state', - 'static', - 'statusinfo', - 'sqrt', - 'string', - 'strlen', - 'structure', - 'style', - 'subkey', - 'submatches', - 'substring', - 'substring_after', - 'substring_before', - 'substring_from', - 'substring_to', - 'super', - 'supplied', - 'switch', - - 'tan', - 'tanh', - 'table_line', - 'table', - 'tab', - 'then', - 'timestamp', - 'times', - 'time', - 'timezone', - 'title-lines', - 'title', - 'top-lines', - 'to', - 'to_lower', - 'to_mixed', - 'to_upper', - 'trace-file', - 'trace-table', - 'transporting', - 'trunc', - 'type', - - 'under', - 'unique', - 'unit', - 'user-command', - 'using', - 'utf-8', - - 'valid', - 'value', - 'value-request', - 'values', - 'vary', - 'varying', - 'version', - - 'warning', - 'where', - 'width', - 'with', - 'word', - 'with-heading', - 'with-title', - - 'xsequence', - 'xstring', - 'xstrlen', - - 'yes', - 'yymmdd', - - 'z', - 'zero' - - ), - - //********************************************************** - // screen statements - //********************************************************** - - 5 => array( - 'call subscreen', - 'chain', - 'endchain', - 'on chain-input', - 'on chain-request', - 'on help-request', - 'on input', - 'on request', - 'on value-request', - 'process' - ), - - //********************************************************** - // internal statements - //********************************************************** - - 6 => array( - 'generate dynpro', - 'generate report', - 'import dynpro', - 'import nametab', - 'include methods', - 'load report', - 'scan abap-source', - 'scan and check abap-source', - 'syntax-check for dynpro', - 'syntax-check for program', - 'syntax-trace', - 'system-call', - 'system-exit', - 'verification-message' - ), - - //********************************************************** - // Control statements - //********************************************************** - - 1 => array( - 'assert', - 'case', - 'catch', - 'check', - 'cleanup', - 'continue', - 'do', - 'else', - 'elseif', - 'endat', - 'endcase', - 'endcatch', - 'endif', - 'enddo', - 'endloop', - 'endtry', - 'endwhile', - 'exit', - 'if', - 'loop', - 'resume', - 'retry', - 'return', - 'stop', - 'try', - 'when', - 'while' - - ), - - //********************************************************** - // variable declaration statements - //********************************************************** - - 2 => array( - 'class-data', - 'controls', - 'constants', - 'data', - 'field-symbols', - 'fields', - 'local', - 'parameters', - 'ranges', - 'select-options', - 'statics', - 'tables', - 'type-pools', - 'types' - ) - ), - 'SYMBOLS' => array( - 0 => array( - '->*', '->', '=>', - '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '!', '%', '^', '&', ':', ',', '.' - ), - 1 => array( - '>=', '<=', '<', '>', '=' - ), - 2 => array( - '?=' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false, - 7 => false, - 8 => false, - 9 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000066; text-transform: uppercase; font-weight: bold; zzz:control;', //control statements - 2 => 'color: #cc4050; text-transform: uppercase; font-weight: bold; zzz:data;', //data statements - 3 => 'color: #005066; text-transform: uppercase; font-weight: bold; zzz:statement;', //first token of other statements - 4 => 'color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;', // next tokens of other statements ("keywords") - 5 => 'color: #005066; text-transform: uppercase; font-weight: bold; zzz:statement;', - 6 => 'color: #000066; text-transform: uppercase; font-weight: bold; zzz:control;', - 7 => 'color: #000066; text-transform: uppercase; font-weight: bold; zzz:control;', - 8 => 'color: #005066; text-transform: uppercase; font-weight: bold; zzz:statement;', - 9 => 'color: #500066; text-transform: uppercase; font-weight: bold; zzz:keyword;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 2 => 'color: #339933;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #808080;' - ), - 'STRINGS' => array( - 0 => 'color: #4da619;' - ), - 'NUMBERS' => array( - 0 => 'color: #3399ff;' - ), - 'METHODS' => array( - 1 => 'color: #202020;', - 2 => 'color: #202020;' - ), - 'SYMBOLS' => array( - 0 => 'color: #808080;', - 1 => 'color: #800080;', - 2 => 'color: #0000ff;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => 'http://help.sap.com/abapdocu/en/ABAP{FNAMEU}.htm', - 2 => 'http://help.sap.com/abapdocu/en/ABAP{FNAMEU}.htm', - 3 => 'http://help.sap.com/abapdocu/en/ABAP{FNAMEU}.htm', - 4 => '', - 5 => '', - 6 => '', - 7 => '', - 8 => '', - 9 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '->', - 2 => '=>' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 7 => array( - 'SPACE_AS_WHITESPACE' => true - ), - 8 => array( - 'SPACE_AS_WHITESPACE' => true - ), - 9 => array( - 'SPACE_AS_WHITESPACE' => true - ) - ) - ), - 'TAB_WIDTH' => 4 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/actionscript.php b/_piecrust/libs/Geshi/geshi/actionscript.php deleted file mode 100644 index 276cf4f..0000000 --- a/_piecrust/libs/Geshi/geshi/actionscript.php +++ /dev/null @@ -1,197 +0,0 @@ - 'ActionScript', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - '#include', 'for', 'foreach', 'each', 'if', 'elseif', 'else', 'while', 'do', 'dowhile', - 'endwhile', 'endif', 'switch', 'case', 'endswitch', 'return', 'break', 'continue', 'in' - ), - 2 => array( - 'null', 'false', 'true', 'var', - 'default', 'function', 'class', - 'new', '_global' - ), - 3 => array( - '#endinitclip', '#initclip', '__proto__', '_accProps', '_alpha', '_currentframe', - '_droptarget', '_focusrect', '_framesloaded', '_height', '_highquality', '_lockroot', - '_name', '_parent', '_quality', '_root', '_rotation', '_soundbuftime', '_target', '_totalframes', - '_url', '_visible', '_width', '_x', '_xmouse', '_xscale', '_y', '_ymouse', '_yscale', 'abs', - 'Accessibility', 'acos', 'activityLevel', 'add', 'addListener', 'addPage', 'addProperty', - 'addRequestHeader', 'align', 'allowDomain', 'allowInsecureDomain', 'and', 'appendChild', - 'apply', 'Arguments', 'Array', 'asfunction', 'asin', 'atan', 'atan2', 'attachAudio', 'attachMovie', - 'attachSound', 'attachVideo', 'attributes', 'autosize', 'avHardwareDisable', 'background', - 'backgroundColor', 'BACKSPACE', 'bandwidth', 'beginFill', 'beginGradientFill', 'blockIndent', - 'bold', 'Boolean', 'border', 'borderColor', 'bottomScroll', 'bufferLength', 'bufferTime', - 'builtInItems', 'bullet', 'Button', 'bytesLoaded', 'bytesTotal', 'call', 'callee', 'caller', - 'Camera', 'capabilities', 'CAPSLOCK', 'caption', 'catch', 'ceil', 'charAt', 'charCodeAt', - 'childNodes', 'chr', 'clear', 'clearInterval', 'cloneNode', 'close', 'Color', 'concat', - 'connect', 'condenseWhite', 'constructor', 'contentType', 'ContextMenu', 'ContextMenuItem', - 'CONTROL', 'copy', 'cos', 'createElement', 'createEmptyMovieClip', 'createTextField', - 'createTextNode', 'currentFps', 'curveTo', 'CustomActions', 'customItems', 'data', 'Date', - 'deblocking', 'delete', 'DELETEKEY', 'docTypeDecl', 'domain', 'DOWN', - 'duplicateMovieClip', 'duration', 'dynamic', 'E', 'embedFonts', 'enabled', - 'END', 'endFill', 'ENTER', 'eq', 'Error', 'ESCAPE(Konstante)', 'escape(Funktion)', 'eval', - 'exactSettings', 'exp', 'extends', 'finally', 'findText', 'firstChild', 'floor', - 'flush', 'focusEnabled', 'font', 'fps', 'fromCharCode', 'fscommand', - 'gain', 'ge', 'get', 'getAscii', 'getBeginIndex', 'getBounds', 'getBytesLoaded', 'getBytesTotal', - 'getCaretIndex', 'getCode', 'getCount', 'getDate', 'getDay', 'getDepth', 'getEndIndex', 'getFocus', - 'getFontList', 'getFullYear', 'getHours', 'getInstanceAtDepth', 'getLocal', 'getMilliseconds', - 'getMinutes', 'getMonth', 'getNewTextFormat', 'getNextHighestDepth', 'getPan', 'getProgress', - 'getProperty', 'getRGB', 'getSeconds', 'getSelected', 'getSelectedText', 'getSize', 'getStyle', - 'getStyleNames', 'getSWFVersion', 'getText', 'getTextExtent', 'getTextFormat', 'getTextSnapshot', - 'getTime', 'getTimer', 'getTimezoneOffset', 'getTransform', 'getURL', 'getUTCDate', 'getUTCDay', - 'getUTCFullYear', 'getUTCHours', 'getUTCMilliseconds', 'getUTCMinutes', 'getUTCMonth', 'getUTCSeconds', - 'getVersion', 'getVolume', 'getYear', 'globalToLocal', 'goto', 'gotoAndPlay', 'gotoAndStop', - 'hasAccessibility', 'hasAudio', 'hasAudioEncoder', 'hasChildNodes', 'hasEmbeddedVideo', 'hasMP3', - 'hasPrinting', 'hasScreenBroadcast', 'hasScreenPlayback', 'hasStreamingAudio', 'hasStreamingVideo', - 'hasVideoEncoder', 'height', 'hide', 'hideBuiltInItems', 'hitArea', 'hitTest', 'hitTestTextNearPos', - 'HOME', 'hscroll', 'html', 'htmlText', 'ID3', 'ifFrameLoaded', 'ignoreWhite', 'implements', - 'import', 'indent', 'index', 'indexOf', 'Infinity', '-Infinity', 'INSERT', 'insertBefore', 'install', - 'instanceof', 'int', 'interface', 'isActive', 'isDebugger', 'isDown', 'isFinite', 'isNaN', 'isToggled', - 'italic', 'join', 'Key', 'language', 'lastChild', 'lastIndexOf', 'le', 'leading', 'LEFT', 'leftMargin', - 'length', 'level', 'lineStyle', 'lineTo', 'list', 'LN10', 'LN2', 'load', 'loadClip', 'loaded', 'loadMovie', - 'loadMovieNum', 'loadSound', 'loadVariables', 'loadVariablesNum', 'LoadVars', 'LocalConnection', - 'localFileReadDisable', 'localToGlobal', 'log', 'LOG10E', 'LOG2E', 'manufacturer', 'Math', 'max', - 'MAX_VALUE', 'maxChars', 'maxhscroll', 'maxscroll', 'mbchr', 'mblength', 'mbord', 'mbsubstring', 'menu', - 'message', 'Microphone', 'min', 'MIN_VALUE', 'MMExecute', 'motionLevel', 'motionTimeOut', 'Mouse', - 'mouseWheelEnabled', 'moveTo', 'Movieclip', 'MovieClipLoader', 'multiline', 'muted', 'name', 'names', 'NaN', - 'ne', 'NEGATIVE_INFINITY', 'NetConnection', 'NetStream', 'newline', 'nextFrame', - 'nextScene', 'nextSibling', 'nodeName', 'nodeType', 'nodeValue', 'not', 'Number', 'Object', - 'on', 'onActivity', 'onChanged', 'onClipEvent', 'onClose', 'onConnect', 'onData', 'onDragOut', - 'onDragOver', 'onEnterFrame', 'onID3', 'onKeyDown', 'onKeyUp', 'onKillFocus', 'onLoad', 'onLoadComplete', - 'onLoadError', 'onLoadInit', 'onLoadProgress', 'onLoadStart', 'onMouseDown', 'onMouseMove', 'onMouseUp', - 'onMouseWheel', 'onPress', 'onRelease', 'onReleaseOutside', 'onResize', 'onRollOut', 'onRollOver', - 'onScroller', 'onSelect', 'onSetFocus', 'onSoundComplete', 'onStatus', 'onUnload', 'onUpdate', 'onXML', - 'or(logischesOR)', 'ord', 'os', 'parentNode', 'parseCSS', 'parseFloat', 'parseInt', 'parseXML', 'password', - 'pause', 'PGDN', 'PGUP', 'PI', 'pixelAspectRatio', 'play', 'playerType', 'pop', 'position', - 'POSITIVE_INFINITY', 'pow', 'prevFrame', 'previousSibling', 'prevScene', 'print', 'printAsBitmap', - 'printAsBitmapNum', 'PrintJob', 'printNum', 'private', 'prototype', 'public', 'push', 'quality', - 'random', 'rate', 'registerClass', 'removeListener', 'removeMovieClip', 'removeNode', 'removeTextField', - 'replaceSel', 'replaceText', 'resolutionX', 'resolutionY', 'restrict', 'reverse', 'RIGHT', - 'rightMargin', 'round', 'scaleMode', 'screenColor', 'screenDPI', 'screenResolutionX', 'screenResolutionY', - 'scroll', 'seek', 'selectable', 'Selection', 'send', 'sendAndLoad', 'separatorBefore', 'serverString', - 'set', 'setvariable', 'setBufferTime', 'setClipboard', 'setDate', 'setFocus', 'setFullYear', 'setGain', - 'setHours', 'setInterval', 'setMask', 'setMilliseconds', 'setMinutes', 'setMode', 'setMonth', - 'setMotionLevel', 'setNewTextFormat', 'setPan', 'setProperty', 'setQuality', 'setRate', 'setRGB', - 'setSeconds', 'setSelectColor', 'setSelected', 'setSelection', 'setSilenceLevel', 'setStyle', - 'setTextFormat', 'setTime', 'setTransform', 'setUseEchoSuppression', 'setUTCDate', 'setUTCFullYear', - 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', 'setVolume', - 'setYear', 'SharedObject', 'SHIFT(Konstante)', 'shift(Methode)', 'show', 'showMenu', 'showSettings', - 'silenceLevel', 'silenceTimeout', 'sin', 'size', 'slice', 'smoothing', 'sort', 'sortOn', 'Sound', 'SPACE', - 'splice', 'split', 'sqrt', 'SQRT1_2', 'SQRT2', 'Stage', 'start', 'startDrag', 'static', 'status', 'stop', - 'stopAllSounds', 'stopDrag', 'String', 'StyleSheet(Klasse)', 'styleSheet(Eigenschaft)', 'substr', - 'substring', 'super', 'swapDepths', 'System', 'TAB', 'tabChildren', 'tabEnabled', 'tabIndex', - 'tabStops', 'tan', 'target', 'targetPath', 'tellTarget', 'text', 'textColor', 'TextField', 'TextFormat', - 'textHeight', 'TextSnapshot', 'textWidth', 'this', 'throw', 'time', 'toggleHighQuality', 'toLowerCase', - 'toString', 'toUpperCase', 'trace', 'trackAsMenu', 'try', 'type', 'typeof', 'undefined', - 'underline', 'unescape', 'uninstall', 'unloadClip', 'unloadMovie', 'unLoadMovieNum', 'unshift', 'unwatch', - 'UP', 'updateAfterEvent', 'updateProperties', 'url', 'useCodePage', 'useEchoSuppression', 'useHandCursor', - 'UTC', 'valueOf', 'variable', 'version', 'Video', 'visible', 'void', 'watch', 'width', - 'with', 'wordwrap', 'XML', 'xmlDecl', 'XMLNode', 'XMLSocket' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #0066CC;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 2 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array() -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/actionscript3.php b/_piecrust/libs/Geshi/geshi/actionscript3.php deleted file mode 100644 index ceaa61d..0000000 --- a/_piecrust/libs/Geshi/geshi/actionscript3.php +++ /dev/null @@ -1,473 +0,0 @@ - 'ActionScript 3', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - //Regular expressions - 2 => "/(?<=[\\s^])(s|tr|y)\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])*\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU", - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'with', 'while', 'void', 'undefined', 'typeof', 'try', 'true', - 'throw', 'this', 'switch', 'super', 'set', 'return', 'public', 'protected', - 'private', 'null', 'new', 'is', 'internal', 'instanceof', 'in', - 'import', 'if', 'get', 'for', 'false', 'else', 'each', 'do', - 'delete', 'default', 'continue', 'catch', 'case', 'break', 'as', - 'extends' - ), - 2 => array( - 'var' - ), - 3 => array( - 'function' - ), - 4 => array( - 'class', 'package' - ), - 6 => array( - 'flash.xml', 'flash.utils', 'flash.ui', 'flash.text', - 'flash.system', 'flash.profiler', 'flash.printing', 'flash.net', - 'flash.media', 'flash.geom', 'flash.filters', 'flash.external', - 'flash.events', 'flash.errors', 'flash.display', - 'flash.accessibility' - ), - 7 => array( - 'zoom', 'year', 'y', 'xmlDecl', 'x', 'writeUnsignedInt', - 'writeUTFBytes', 'writeUTF', 'writeShort', 'writeObject', - 'writeMultiByte', 'writeInt', 'writeFloat', 'writeExternal', - 'writeDynamicProperty', 'writeDynamicProperties', 'writeDouble', - 'writeBytes', 'writeByte', 'writeBoolean', 'wordWrap', - 'willTrigger', 'width', 'volume', 'visible', 'videoWidth', - 'videoHeight', 'version', 'valueOf', 'value', 'usingTLS', - 'useRichTextClipboard', 'useHandCursor', 'useEchoSuppression', - 'useCodePage', 'url', 'uri', 'uploadCompleteData', 'upload', - 'updateProperties', 'updateAfterEvent', 'upState', 'unshift', - 'unlock', 'unload', 'union', 'unescapeMultiByte', 'unescape', - 'underline', 'uncompress', 'type', 'ty', 'tx', 'transparent', - 'translate', 'transformPoint', 'transform', 'trackAsMenu', 'track', - 'trace', 'totalMemory', 'totalFrames', 'topLeft', 'top', - 'togglePause', 'toXMLString', 'toUpperCase', 'toUTCString', - 'toTimeString', 'toString', 'toPrecision', 'toLowerCase', - 'toLocaleUpperCase', 'toLocaleTimeString', 'toLocaleString', - 'toLocaleLowerCase', 'toLocaleDateString', 'toFixed', - 'toExponential', 'toDateString', 'timezoneOffset', 'timerComplete', - 'timer', 'time', 'threshold', 'thickness', 'textWidth', - 'textSnapshot', 'textInput', 'textHeight', 'textColor', 'text', - 'test', 'target', 'tan', 'tabStops', 'tabIndexChange', 'tabIndex', - 'tabEnabledChange', 'tabEnabled', 'tabChildrenChange', - 'tabChildren', 'sync', 'swfVersion', 'swapChildrenAt', - 'swapChildren', 'subtract', 'substring', 'substr', 'styleSheet', - 'styleNames', 'strength', 'stopPropagation', - 'stopImmediatePropagation', 'stopDrag', 'stopAll', 'stop', 'status', - 'startDrag', 'start', 'stageY', 'stageX', 'stageWidth', - 'stageHeight', 'stageFocusRect', 'stage', 'sqrt', 'split', 'splice', - 'source', 'soundTransform', 'soundComplete', 'sortOn', 'sort', - 'songName', 'some', 'socketData', 'smoothing', 'slice', 'size', - 'sin', 'silent', 'silenceTimeout', 'silenceLevel', 'showSettings', - 'showRedrawRegions', 'showDefaultContextMenu', 'show', 'shortcut', - 'shiftKey', 'shift', 'sharpness', 'sharedEvents', 'shadowColor', - 'shadowAlpha', 'settings', 'setUseEchoSuppression', 'setUTCSeconds', - 'setUTCMonth', 'setUTCMinutes', 'setUTCMilliseconds', 'setUTCHours', - 'setUTCFullYear', 'setUTCDate', 'setTimeout', 'setTime', - 'setTextFormat', 'setStyle', 'setSilenceLevel', 'setSettings', - 'setSelection', 'setSelected', 'setSelectColor', 'setSeconds', - 'setQuality', 'setPropertyIsEnumerable', 'setProperty', 'setPixels', - 'setPixel32', 'setPixel', 'setNamespace', 'setName', - 'setMotionLevel', 'setMonth', 'setMode', 'setMinutes', - 'setMilliseconds', 'setLoopback', 'setLoopBack', 'setLocalName', - 'setKeyFrameInterval', 'setInterval', 'setHours', 'setFullYear', - 'setEmpty', 'setDirty', 'setDate', 'setCompositionString', - 'setClipboard', 'setChildren', 'setChildIndex', - 'setAdvancedAntiAliasingTable', 'serverString', 'separatorBefore', - 'sendToURL', 'send', 'selectionEndIndex', 'selectionBeginIndex', - 'selectable', 'select', 'seek', 'securityError', 'securityDomain', - 'secondsUTC', 'seconds', 'search', 'scrollV', 'scrollRect', - 'scrollH', 'scroll', 'screenResolutionY', 'screenResolutionX', - 'screenDPI', 'screenColor', 'scenes', 'scaleY', 'scaleX', - 'scaleMode', 'scale9Grid', 'scale', 'save', 'sandboxType', - 'sameDomain', 'running', 'round', 'rotation', 'rotate', 'root', - 'rollOver', 'rollOut', 'rightToRight', 'rightToLeft', 'rightPeak', - 'rightMargin', 'right', 'rewind', 'reverse', 'resume', 'restrict', - 'resize', 'reset', 'requestHeaders', 'replaceText', - 'replaceSelectedText', 'replace', 'repeatCount', 'render', - 'removedFromStage', 'removed', 'removeNode', 'removeNamespace', - 'removeEventListener', 'removeChildAt', 'removeChild', - 'relatedObject', 'registerFont', 'registerClassAlias', 'redOffset', - 'redMultiplier', 'rect', 'receiveVideo', 'receiveAudio', - 'readUnsignedShort', 'readUnsignedInt', 'readUnsignedByte', - 'readUTFBytes', 'readUTF', 'readShort', 'readObject', - 'readMultiByte', 'readInt', 'readFloat', 'readExternal', - 'readDouble', 'readBytes', 'readByte', 'readBoolean', 'ratios', - 'rate', 'random', 'quality', 'push', 'publish', 'proxyType', - 'prototype', 'propertyIsEnumerable', 'progress', - 'processingInstructions', 'printAsBitmap', 'print', - 'previousSibling', 'preventDefault', 'prevScene', 'prevFrame', - 'prettyPrinting', 'prettyIndent', 'preserveAlpha', 'prependChild', - 'prefix', 'pow', 'position', 'pop', 'polar', 'playerType', 'play', - 'pixelSnapping', 'pixelDissolve', 'pixelBounds', 'pixelAspectRatio', - 'perlinNoise', 'pause', 'parseXML', 'parseInt', 'parseFloat', - 'parseCSS', 'parse', 'parentNode', 'parentDomain', - 'parentAllowsChild', 'parent', 'parameters', 'paperWidth', - 'paperHeight', 'pan', 'paletteMap', 'pageWidth', 'pageHeight', - 'overState', 'outsideCutoff', 'os', 'orientation', 'open', - 'opaqueBackground', 'onPlayStatus', 'onMetaData', 'onCuePoint', - 'offsetPoint', 'offset', 'objectID', 'objectEncoding', 'numLock', - 'numLines', 'numFrames', 'numChildren', 'normalize', 'noise', - 'nodeValue', 'nodeType', 'nodeName', 'nodeKind', 'noAutoLabeling', - 'nextValue', 'nextSibling', 'nextScene', 'nextNameIndex', - 'nextName', 'nextFrame', 'netStatus', 'navigateToURL', - 'namespaceURI', 'namespaceDeclarations', 'namespace', 'names', - 'name', 'muted', 'multiline', 'moveTo', 'mouseY', 'mouseX', - 'mouseWheelEnabled', 'mouseWheel', 'mouseUp', 'mouseTarget', - 'mouseOver', 'mouseOut', 'mouseMove', 'mouseLeave', - 'mouseFocusChange', 'mouseEnabled', 'mouseDown', 'mouseChildren', - 'motionTimeout', 'motionLevel', 'monthUTC', 'month', - 'modificationDate', 'mode', 'minutesUTC', 'minutes', 'min', - 'millisecondsUTC', 'milliseconds', 'method', 'message', 'merge', - 'menuSelect', 'menuItemSelect', 'maxScrollV', 'maxScrollH', - 'maxLevel', 'maxChars', 'max', 'matrixY', 'matrixX', 'matrix', - 'match', 'mask', 'mapPoint', 'mapBitmap', 'map', 'manufacturer', - 'macType', 'loopback', 'loop', 'log', 'lock', 'localeCompare', - 'localY', 'localX', 'localToGlobal', 'localName', - 'localFileReadDisable', 'loaderURL', 'loaderInfo', 'loader', - 'loadPolicyFile', 'loadBytes', 'load', 'liveDelay', 'link', - 'lineTo', 'lineStyle', 'lineGradientStyle', 'level', - 'letterSpacing', 'length', 'leftToRight', 'leftToLeft', 'leftPeak', - 'leftMargin', 'left', 'leading', 'lastIndexOf', 'lastIndex', - 'lastChild', 'language', 'labels', 'knockout', 'keyUp', - 'keyLocation', 'keyFrameInterval', 'keyFocusChange', 'keyDown', - 'keyCode', 'kerning', 'join', 'italic', 'isXMLName', - 'isPrototypeOf', 'isNaN', 'isFocusInaccessible', 'isFinite', - 'isEmpty', 'isDefaultPrevented', 'isDebugger', 'isBuffering', - 'isAttribute', 'isAccessible', 'ioError', 'invert', 'invalidate', - 'intersects', 'intersection', 'interpolate', 'insideCutoff', - 'insertChildBefore', 'insertChildAfter', 'insertBefore', 'inner', - 'init', 'info', 'inflatePoint', 'inflate', 'indexOf', 'index', - 'indent', 'inScopeNamespaces', 'imeComposition', 'ime', - 'ignoreWhitespace', 'ignoreWhite', 'ignoreProcessingInstructions', - 'ignoreComments', 'ignoreCase', 'identity', 'idMap', 'id3', - 'httpStatus', 'htmlText', 'hoursUTC', 'hours', 'hitTestTextNearPos', - 'hitTestState', 'hitTestPoint', 'hitTestObject', 'hitTest', - 'hitArea', 'highlightColor', 'highlightAlpha', 'hideObject', - 'hideBuiltInItems', 'hide', 'height', 'hasVideoEncoder', 'hasTLS', - 'hasStreamingVideo', 'hasStreamingAudio', 'hasSimpleContent', - 'hasScreenPlayback', 'hasScreenBroadcast', 'hasProperty', - 'hasPrinting', 'hasOwnProperty', 'hasMP3', 'hasIME', 'hasGlyphs', - 'hasEventListener', 'hasEmbeddedVideo', 'hasDefinition', - 'hasComplexContent', 'hasChildNodes', 'hasAudioEncoder', 'hasAudio', - 'hasAccessibility', 'gridFitType', 'greenOffset', 'greenMultiplier', - 'graphics', 'gotoAndStop', 'gotoAndPlay', 'globalToLocal', 'global', - 'getUTCSeconds', 'getUTCMonth', 'getUTCMinutes', - 'getUTCMilliseconds', 'getUTCHours', 'getUTCFullYear', 'getUTCDay', - 'getUTCDate', 'getTimezoneOffset', 'getTimer', 'getTime', - 'getTextRunInfo', 'getTextFormat', 'getText', 'getStyle', - 'getStackTrace', 'getSelectedText', 'getSelected', 'getSeconds', - 'getRemote', 'getRect', 'getQualifiedSuperclassName', - 'getQualifiedClassName', 'getProperty', 'getPrefixForNamespace', - 'getPixels', 'getPixel32', 'getPixel', 'getParagraphLength', - 'getObjectsUnderPoint', 'getNamespaceForPrefix', 'getMonth', - 'getMinutes', 'getMilliseconds', 'getMicrophone', 'getLocal', - 'getLineText', 'getLineOffset', 'getLineMetrics', 'getLineLength', - 'getLineIndexOfChar', 'getLineIndexAtPoint', 'getImageReference', - 'getHours', 'getFullYear', 'getFirstCharInParagraph', - 'getDescendants', 'getDefinitionByName', 'getDefinition', 'getDay', - 'getDate', 'getColorBoundsRect', 'getClassByAlias', 'getChildIndex', - 'getChildByName', 'getChildAt', 'getCharIndexAtPoint', - 'getCharBoundaries', 'getCamera', 'getBounds', 'genre', - 'generateFilterRect', 'gain', 'fullYearUTC', 'fullYear', - 'fullScreen', 'fscommand', 'fromCharCode', 'framesLoaded', - 'frameRate', 'frame', 'fps', 'forwardAndBack', 'formatToString', - 'forceSimple', 'forEach', 'fontType', 'fontStyle', 'fontSize', - 'fontName', 'font', 'focusRect', 'focusOut', 'focusIn', 'focus', - 'flush', 'floor', 'floodFill', 'firstChild', 'findText', 'filters', - 'filter', 'fillRect', 'fileList', 'extension', 'extended', 'exp', - 'exec', 'exactSettings', 'every', 'eventPhase', 'escapeMultiByte', - 'escape', 'errorID', 'error', 'equals', 'enumerateFonts', - 'enterFrame', 'endian', 'endFill', 'encodeURIComponent', - 'encodeURI', 'enabled', 'embedFonts', 'elements', - 'dynamicPropertyWriter', 'dropTarget', 'drawRoundRect', 'drawRect', - 'drawEllipse', 'drawCircle', 'draw', 'download', 'downState', - 'doubleClickEnabled', 'doubleClick', 'dotall', 'domain', - 'docTypeDecl', 'doConversion', 'divisor', 'distance', 'dispose', - 'displayState', 'displayMode', 'displayAsPassword', 'dispatchEvent', - 'description', 'describeType', 'descent', 'descendants', - 'deltaTransformPoint', 'delta', 'deleteProperty', 'delay', - 'defaultTextFormat', 'defaultSettings', 'defaultObjectEncoding', - 'decodeURIComponent', 'decodeURI', 'decode', 'deblocking', - 'deactivate', 'dayUTC', 'day', 'dateUTC', 'date', 'dataFormat', - 'data', 'd', 'customItems', 'curveTo', 'currentTarget', - 'currentScene', 'currentLabels', 'currentLabel', 'currentFrame', - 'currentFPS', 'currentDomain', 'currentCount', 'ctrlKey', 'creator', - 'creationDate', 'createTextNode', 'createGradientBox', - 'createElement', 'createBox', 'cos', 'copyPixels', 'copyChannel', - 'copy', 'conversionMode', 'contextMenuOwner', 'contextMenu', - 'contentType', 'contentLoaderInfo', 'content', 'containsRect', - 'containsPoint', 'contains', 'constructor', 'connectedProxyType', - 'connected', 'connect', 'condenseWhite', 'concatenatedMatrix', - 'concatenatedColorTransform', 'concat', 'computeSpectrum', - 'compress', 'componentY', 'componentX', 'complete', 'compare', - 'comments', 'comment', 'colors', 'colorTransform', 'color', 'code', - 'close', 'cloneNode', 'clone', 'client', 'click', 'clearTimeout', - 'clearInterval', 'clear', 'clamp', 'children', 'childNodes', - 'childIndex', 'childAllowsParent', 'child', 'checkPolicyFile', - 'charCount', 'charCodeAt', 'charCode', 'charAt', 'changeList', - 'change', 'ceil', 'caretIndex', 'caption', 'capsLock', 'cancelable', - 'cancel', 'callee', 'callProperty', 'call', 'cacheAsBitmap', 'c', - 'bytesTotal', 'bytesLoaded', 'bytesAvailable', 'buttonMode', - 'buttonDown', 'bullet', 'builtInItems', 'bufferTime', - 'bufferLength', 'bubbles', 'browse', 'bottomScrollV', 'bottomRight', - 'bottom', 'borderColor', 'border', 'bold', 'blurY', 'blurX', - 'blueOffset', 'blueMultiplier', 'blockIndent', 'blendMode', - 'bitmapData', 'bias', 'beginGradientFill', 'beginFill', - 'beginBitmapFill', 'bandwidth', 'backgroundColor', 'background', - 'b', 'available', 'avHardwareDisable', 'autoSize', 'attributes', - 'attribute', 'attachNetStream', 'attachCamera', 'attachAudio', - 'atan2', 'atan', 'asyncError', 'asin', 'ascent', 'artist', - 'areSoundsInaccessible', 'areInaccessibleObjectsUnderPoint', - 'applyFilter', 'apply', 'applicationDomain', 'appendText', - 'appendChild', 'antiAliasType', 'angle', 'alwaysShowSelection', - 'altKey', 'alphas', 'alphaOffset', 'alphaMultiplier', 'alpha', - 'allowInsecureDomain', 'allowDomain', 'align', 'album', - 'addedToStage', 'added', 'addPage', 'addNamespace', 'addHeader', - 'addEventListener', 'addChildAt', 'addChild', 'addCallback', 'add', - 'activityLevel', 'activity', 'active', 'activating', 'activate', - 'actionScriptVersion', 'acos', 'accessibilityProperties', 'abs' - ), - 8 => array( - 'WRAP', 'VERTICAL', 'VARIABLES', - 'UTC', 'UPLOAD_COMPLETE_DATA', 'UP', 'UNLOAD', 'UNKNOWN', - 'UNIQUESORT', 'TOP_RIGHT', 'TOP_LEFT', 'TOP', 'TIMER_COMPLETE', - 'TIMER', 'TEXT_NODE', 'TEXT_INPUT', 'TEXT', 'TAB_INDEX_CHANGE', - 'TAB_ENABLED_CHANGE', 'TAB_CHILDREN_CHANGE', 'TAB', 'SYNC', - 'SUBTRACT', 'SUBPIXEL', 'STATUS', 'STANDARD', 'SQUARE', 'SQRT2', - 'SQRT1_2', 'SPACE', 'SOUND_COMPLETE', 'SOCKET_DATA', 'SHOW_ALL', - 'SHIFT', 'SETTINGS_MANAGER', 'SELECT', 'SECURITY_ERROR', 'SCROLL', - 'SCREEN', 'ROUND', 'ROLL_OVER', 'ROLL_OUT', 'RIGHT', 'RGB', - 'RETURNINDEXEDARRAY', 'RESIZE', 'REPEAT', 'RENDER', - 'REMOVED_FROM_STAGE', 'REMOVED', 'REMOTE', 'REGULAR', 'REFLECT', - 'RED', 'RADIAL', 'PROGRESS', 'PRIVACY', 'POST', 'POSITIVE_INFINITY', - 'PORTRAIT', 'PIXEL', 'PI', 'PENDING', 'PAGE_UP', 'PAGE_DOWN', 'PAD', - 'OVERLAY', 'OUTER', 'OPEN', 'NaN', 'NUM_PAD', 'NUMPAD_SUBTRACT', - 'NUMPAD_MULTIPLY', 'NUMPAD_ENTER', 'NUMPAD_DIVIDE', - 'NUMPAD_DECIMAL', 'NUMPAD_ADD', 'NUMPAD_9', 'NUMPAD_8', 'NUMPAD_7', - 'NUMPAD_6', 'NUMPAD_5', 'NUMPAD_4', 'NUMPAD_3', 'NUMPAD_2', - 'NUMPAD_1', 'NUMPAD_0', 'NUMERIC', 'NO_SCALE', 'NO_BORDER', - 'NORMAL', 'NONE', 'NEVER', 'NET_STATUS', 'NEGATIVE_INFINITY', - 'MULTIPLY', 'MOUSE_WHEEL', 'MOUSE_UP', 'MOUSE_OVER', 'MOUSE_OUT', - 'MOUSE_MOVE', 'MOUSE_LEAVE', 'MOUSE_FOCUS_CHANGE', 'MOUSE_DOWN', - 'MITER', 'MIN_VALUE', 'MICROPHONE', 'MENU_SELECT', - 'MENU_ITEM_SELECT', 'MEDIUM', 'MAX_VALUE', 'LOW', 'LOG2E', 'LOG10E', - 'LOCAL_WITH_NETWORK', 'LOCAL_WITH_FILE', 'LOCAL_TRUSTED', - 'LOCAL_STORAGE', 'LN2', 'LN10', 'LITTLE_ENDIAN', 'LINK', - 'LINEAR_RGB', 'LINEAR', 'LIGHT_COLOR', 'LIGHTEN', 'LEFT', 'LCD', - 'LAYER', 'LANDSCAPE', 'KOREAN', 'KEY_UP', 'KEY_FOCUS_CHANGE', - 'KEY_DOWN', 'JUSTIFY', 'JAPANESE_KATAKANA_HALF', - 'JAPANESE_KATAKANA_FULL', 'JAPANESE_HIRAGANA', 'Infinity', 'ITALIC', - 'IO_ERROR', 'INVERT', 'INSERT', 'INPUT', 'INNER', 'INIT', - 'IME_COMPOSITION', 'IGNORE', 'ID3', 'HTTP_STATUS', 'HORIZONTAL', - 'HOME', 'HIGH', 'HARDLIGHT', 'GREEN', 'GET', 'FULLSCREEN', 'FULL', - 'FOCUS_OUT', 'FOCUS_IN', 'FLUSHED', 'FLASH9', 'FLASH8', 'FLASH7', - 'FLASH6', 'FLASH5', 'FLASH4', 'FLASH3', 'FLASH2', 'FLASH1', 'F9', - 'F8', 'F7', 'F6', 'F5', 'F4', 'F3', 'F2', 'F15', 'F14', 'F13', - 'F12', 'F11', 'F10', 'F1', 'EXACT_FIT', 'ESCAPE', 'ERROR', 'ERASE', - 'ENTER_FRAME', 'ENTER', 'END', 'EMBEDDED', 'ELEMENT_NODE', 'E', - 'DYNAMIC', 'DOWN', 'DOUBLE_CLICK', 'DIFFERENCE', 'DEVICE', - 'DESCENDING', 'DELETE', 'DEFAULT', 'DEACTIVATE', 'DATA', - 'DARK_COLOR', 'DARKEN', 'CRT', 'CONTROL', 'CONNECT', 'COMPLETE', - 'COLOR', 'CLOSE', 'CLICK', 'CLAMP', 'CHINESE', 'CHANGE', 'CENTER', - 'CASEINSENSITIVE', 'CAPTURING_PHASE', 'CAPS_LOCK', 'CANCEL', - 'CAMERA', 'BUBBLING_PHASE', 'BOTTOM_RIGHT', 'BOTTOM_LEFT', 'BOTTOM', - 'BOLD_ITALIC', 'BOLD', 'BLUE', 'BINARY', 'BIG_ENDIAN', 'BEVEL', - 'BEST', 'BACKSPACE', 'AUTO', 'AT_TARGET', 'ASYNC_ERROR', 'AMF3', - 'AMF0', 'ALWAYS', 'ALPHANUMERIC_HALF', 'ALPHANUMERIC_FULL', 'ALPHA', - 'ADVANCED', 'ADDED_TO_STAGE', 'ADDED', 'ADD', 'ACTIVITY', - 'ACTIONSCRIPT3', 'ACTIONSCRIPT2' - ), - //FIX: Must be last in order to avoid conflicts with keywords present - //in other keyword groups, that might get highlighted as part of the URL. - //I know this is not a proper work-around, but should do just fine. - 5 => array( - 'uint', 'int', 'arguments', 'XMLSocket', 'XMLNodeType', 'XMLNode', - 'XMLList', 'XMLDocument', 'XML', 'Video', 'VerifyError', - 'URLVariables', 'URLStream', 'URLRequestMethod', 'URLRequestHeader', - 'URLRequest', 'URLLoaderDataFormat', 'URLLoader', 'URIError', - 'TypeError', 'Transform', 'TimerEvent', 'Timer', 'TextSnapshot', - 'TextRenderer', 'TextLineMetrics', 'TextFormatAlign', 'TextFormat', - 'TextFieldType', 'TextFieldAutoSize', 'TextField', 'TextEvent', - 'TextDisplayMode', 'TextColorType', 'System', 'SyntaxError', - 'SyncEvent', 'StyleSheet', 'String', 'StatusEvent', 'StaticText', - 'StageScaleMode', 'StageQuality', 'StageAlign', 'Stage', - 'StackOverflowError', 'Sprite', 'SpreadMethod', 'SoundTransform', - 'SoundMixer', 'SoundLoaderContext', 'SoundChannel', 'Sound', - 'Socket', 'SimpleButton', 'SharedObjectFlushStatus', 'SharedObject', - 'Shape', 'SecurityPanel', 'SecurityErrorEvent', 'SecurityError', - 'SecurityDomain', 'Security', 'ScriptTimeoutError', 'Scene', - 'SWFVersion', 'Responder', 'RegExp', 'ReferenceError', 'Rectangle', - 'RangeError', 'QName', 'Proxy', 'ProgressEvent', - 'PrintJobOrientation', 'PrintJobOptions', 'PrintJob', 'Point', - 'PixelSnapping', 'ObjectEncoding', 'Object', 'Number', 'NetStream', - 'NetStatusEvent', 'NetConnection', 'Namespace', 'MovieClip', - 'MouseEvent', 'Mouse', 'MorphShape', 'Microphone', 'MemoryError', - 'Matrix', 'Math', 'LocalConnection', 'LoaderInfo', 'LoaderContext', - 'Loader', 'LineScaleMode', 'KeyboardEvent', 'Keyboard', - 'KeyLocation', 'JointStyle', 'InvalidSWFError', - 'InterpolationMethod', 'InteractiveObject', 'IllegalOperationError', - 'IOErrorEvent', 'IOError', 'IMEEvent', 'IMEConversionMode', 'IME', - 'IExternalizable', 'IEventDispatcher', 'IDynamicPropertyWriter', - 'IDynamicPropertyOutput', 'IDataOutput', 'IDataInput', 'ID3Info', - 'IBitmapDrawable', 'HTTPStatusEvent', 'GridFitType', 'Graphics', - 'GradientType', 'GradientGlowFilter', 'GradientBevelFilter', - 'GlowFilter', 'Function', 'FrameLabel', 'FontType', 'FontStyle', - 'Font', 'FocusEvent', 'FileReferenceList', 'FileReference', - 'FileFilter', 'ExternalInterface', 'EventPhase', 'EventDispatcher', - 'Event', 'EvalError', 'ErrorEvent', 'Error', 'Endian', 'EOFError', - 'DropShadowFilter', 'DisplayObjectContainer', 'DisplayObject', - 'DisplacementMapFilterMode', 'DisplacementMapFilter', 'Dictionary', - 'DefinitionError', 'Date', 'DataEvent', 'ConvolutionFilter', - 'ContextMenuItem', 'ContextMenuEvent', 'ContextMenuBuiltInItems', - 'ContextMenu', 'ColorTransform', 'ColorMatrixFilter', 'Class', - 'CapsStyle', 'Capabilities', 'Camera', 'CSMSettings', 'ByteArray', - 'Boolean', 'BlurFilter', 'BlendMode', 'BitmapFilterType', - 'BitmapFilterQuality', 'BitmapFilter', 'BitmapDataChannel', - 'BitmapData', 'Bitmap', 'BevelFilter', 'AsyncErrorEvent', 'Array', - 'ArgumentError', 'ApplicationDomain', 'AntiAliasType', - 'ActivityEvent', 'ActionScriptVersion', 'AccessibilityProperties', - 'Accessibility', 'AVM1Movie' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '!', '%', '&', '*', '|', '/', '<', '>', '^', '-', '+', '~', '?', ':', ';', '.', ',' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true, - 8 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0033ff; font-weight: bold;', - 2 => 'color: #6699cc; font-weight: bold;', - 3 => 'color: #339966; font-weight: bold;', - 4 => 'color: #9900cc; font-weight: bold;', - 5 => 'color: #004993;', - 6 => 'color: #004993;', - 7 => 'color: #004993;', - 8 => 'color: #004993;' - ), - 'COMMENTS' => array( - 1 => 'color: #009900; font-style: italic;', - 2 => 'color: #009966; font-style: italic;', - 'MULTI' => 'color: #3f5fbf;' - ), - 'ESCAPE_CHAR' => array( - 0 => '' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #990000;' - ), - 'NUMBERS' => array( - 0 => 'color: #000000; font-weight:bold;' - ), - 'METHODS' => array( - 0 => 'color: #000000;', - ), - 'SYMBOLS' => array( - 0 => 'color: #000066; font-weight: bold;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => 'http://www.google.com/search?q={FNAMEL}%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:{FNAMEL}.html', - 6 => '', - 7 => '', - 8 => '' - ), - 'OOLANG' => false,//Save some time as OO identifiers aren't used - 'OBJECT_SPLITTERS' => array( - // commented out because it's not very relevant for AS, as all properties, methods and constants are dot-accessed. - // I believe it's preferable to have package highlighting for example, which is not possible with this enabled. - // 0 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array() -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/ada.php b/_piecrust/libs/Geshi/geshi/ada.php deleted file mode 100644 index eb98c97..0000000 --- a/_piecrust/libs/Geshi/geshi/ada.php +++ /dev/null @@ -1,135 +0,0 @@ - 'Ada', - 'COMMENT_SINGLE' => array(1 => '--'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'begin', 'declare', 'do', 'else', 'elsif', 'exception', 'for', 'if', - 'is', 'loop', 'while', 'then', 'end', 'select', 'case', 'until', - 'goto', 'return' - ), - 2 => array( - 'abs', 'and', 'at', 'mod', 'not', 'or', 'rem', 'xor' - ), - 3 => array( - 'abort', 'abstract', 'accept', 'access', 'aliased', 'all', 'array', - 'body', 'constant', 'delay', 'delta', 'digits', 'entry', 'exit', - 'function', 'generic', 'in', 'interface', 'limited', 'new', 'null', - 'of', 'others', 'out', 'overriding', 'package', 'pragma', 'private', - 'procedure', 'protected', 'raise', 'range', 'record', 'renames', - 'requeue', 'reverse', 'separate', 'subtype', 'synchronized', - 'tagged', 'task', 'terminate', 'type', 'use', 'when', 'with' - ) - ), - 'SYMBOLS' => array( - '(', ')' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #00007f;', - 2 => 'color: #0000ff;', - 3 => 'color: #46aa03; font-weight:bold;', - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'COMMENTS' => array( - 1 => 'color: #adadad; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #7f007f;' - ), - 'NUMBERS' => array( - 0 => 'color: #ff0000;' - ), - 'METHODS' => array( - 1 => 'color: #202020;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/algol68.php b/_piecrust/libs/Geshi/geshi/algol68.php deleted file mode 100644 index e9f19da..0000000 --- a/_piecrust/libs/Geshi/geshi/algol68.php +++ /dev/null @@ -1,226 +0,0 @@ - 'ALGOL 68', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array( - '#' => '#', - '¢' => '¢', - '£' => '£', - ), - 'COMMENT_REGEXP' => array( - 1 => '/\bCO((?:MMENT)?)\b.*?\bCO\\1\b/i', - 2 => '/\bPR((?:AGMAT)?)\b.*?\bPR\\1\b/i', - 3 => '/\bQUOTE\b.*?\bQUOTE\b/i' - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '"', - 'KEYWORDS' => array( - 1 => array('KEEP', 'FINISH', 'USE', 'SYSPROCS', 'IOSTATE', 'USING', 'ENVIRON'), - 2 => array('CASE', 'IN', 'OUSE', 'IN', 'OUT', 'ESAC', '(', '|', '|:', ')', 'FOR', 'FROM', 'TO', 'BY', 'WHILE', 'DO', 'OD', 'IF', 'THEN', 'ELIF', 'THEN', 'ELSE', 'FI', 'PAR', 'BEGIN', 'EXIT', 'END', 'GO', 'GOTO', 'FORALL', 'UPTO', 'DOWNTO', 'FOREACH', 'ASSERT'), - 3 => array('BITS', 'BOOL', 'BYTES', 'CHAR', 'COMPL', 'INT', 'REAL', 'SEMA', 'STRING', 'VOID', 'COMPLEX', 'VECTOR'), - 4 => array('MODE', 'OP', 'PRIO', 'PROC'), - 5 => array('FLEX', 'HEAP', 'LOC', 'LONG', 'REF', 'SHORT', 'EITHER'), - 6 => array('CHANNEL', 'FILE', 'FORMAT', 'STRUCT', 'UNION'), - 7 => array('OF', 'AT', '@', 'IS', ':=:', 'ISNT', ':/=:', ':≠:', 'CTB', 'CT', '::', 'CTAB', '::=', 'TRUE', 'FALSE', 'EMPTY', 'NIL', '○', 'SKIP', '~'), - 8 => array('NOT', 'UP', 'DOWN', 'LWB', 'UPB', '-', 'ABS', 'ARG', 'BIN', 'ENTIER', 'LENG', 'LEVEL', 'ODD', 'REPR', 'ROUND', 'SHORTEN', 'CONJ', 'SIGN'), - 9 => array('¬', '↑', '↓', '⌊', '⌈', '~', '⎩', '⎧'), - 10 => array('+*', 'I', '+×', '⊥', '!', '⏨'), - 11 => array('SHL', 'SHR', '**', 'UP', 'DOWN', 'LWB', 'UPB', '↑', '↓', '⌊', '⌈', '⎩', '⎧'), - 12 => array('*', '/', '%', 'OVER', '%*', 'MOD', 'ELEM', '×', '÷', '÷×', '÷*', '%×', '□', '÷:'), - 13 => array('-', '+'), - 14 => array('<', 'LT', '<=', 'LE', '>=', 'GE', '>', 'GT', '≤', '≥'), - 15 => array('=', 'EQ', '/=', 'NE', '≠', '~='), - 16 => array('&', 'AND', '∧', 'OR', '∨'), - 17 => array('MINUSAB', 'PLUSAB', 'TIMESAB', 'DIVAB', 'OVERAB', 'MODAB', 'PLUSTO'), - 18 => array('-:=', '+:=', '*:=', '/:=', '%:=', '%*:=', '+=:', '×:=', '÷:=', '÷×:=', '÷*:=', '%×:=', '÷::=', 'MINUS', 'PLUS', 'DIV', 'MOD', 'PRUS'), - 19 => array('THEF', 'ANDF', 'ORF', 'ANDTH', 'OREL', 'ANDTHEN', 'ORELSE'), - 20 => array('int_lengths', 'intlengths', 'int_shorths', 'intshorths', 'max_int', 'maxint', 'real_lengths', 'reallengths', 'real_shorths', 'realshorths', 'bits_lengths', 'bitslengths', 'bits_shorths', 'bitsshorths', 'bytes_lengths', 'byteslengths', 'bytes_shorths', 'bytesshorths', 'max_abs_char', 'maxabschar', 'int_width', 'intwidth', 'long_int_width', 'longintwidth', 'long_long_int_width', 'longlongintwidth', 'real_width', 'realwidth', 'long_real_width', 'longrealwidth', 'long_long_real_width', 'longlongrealwidth', 'exp_width', 'expwidth', 'long_exp_width', 'longexpwidth', 'long_long_exp_width', 'longlongexpwidth', 'bits_width', 'bitswidth', 'long_bits_width', 'longbitswidth', 'long_long_bits_width', 'longlongbitswidth', 'bytes_width', 'byteswidth', 'long_bytes_width', 'longbyteswidth', 'max_real', 'maxreal', 'small_real', 'smallreal', 'long_max_int', 'longmaxint', 'long_long_max_int', 'longlongmaxint', 'long_max_real', 'longmaxreal', 'long_small_real', 'longsmallreal', 'long_long_max_real', 'longlongmaxreal', 'long_long_small_real', 'longlongsmallreal', 'long_max_bits', 'longmaxbits', 'long_long_max_bits', 'longlongmaxbits', 'null_character', 'nullcharacter', 'blank', 'flip', 'flop', 'error_char', 'errorchar', 'exp_char', 'expchar', 'newline_char', 'newlinechar', 'formfeed_char', 'formfeedchar', 'tab_char', 'tabchar'), - 21 => array('stand_in_channel', 'standinchannel', 'stand_out_channel', 'standoutchannel', 'stand_back_channel', 'standbackchannel', 'stand_draw_channel', 'standdrawchannel', 'stand_error_channel', 'standerrorchannel'), - 22 => array('put_possible', 'putpossible', 'get_possible', 'getpossible', 'bin_possible', 'binpossible', 'set_possible', 'setpossible', 'reset_possible', 'resetpossible', 'reidf_possible', 'reidfpossible', 'draw_possible', 'drawpossible', 'compressible', 'on_logical_file_end', 'onlogicalfileend', 'on_physical_file_end', 'onphysicalfileend', 'on_line_end', 'onlineend', 'on_page_end', 'onpageend', 'on_format_end', 'onformatend', 'on_value_error', 'onvalueerror', 'on_open_error', 'onopenerror', 'on_transput_error', 'ontransputerror', 'on_format_error', 'onformaterror', 'open', 'establish', 'create', 'associate', 'close', 'lock', 'scratch', 'space', 'new_line', 'newline', 'print', 'write_f', 'writef', 'print_f', 'printf', 'write_bin', 'writebin', 'print_bin', 'printbin', 'read_f', 'readf', 'read_bin', 'readbin', 'put_f', 'putf', 'get_f', 'getf', 'make_term', 'maketerm', 'make_device', 'makedevice', 'idf', 'term', 'read_int', 'readint', 'read_long_int', 'readlongint', 'read_long_long_int', 'readlonglongint', 'read_real', 'readreal', 'read_long_real', 'readlongreal', 'read_long_long_real', 'readlonglongreal', 'read_complex', 'readcomplex', 'read_long_complex', 'readlongcomplex', 'read_long_long_complex', 'readlonglongcomplex', 'read_bool', 'readbool', 'read_bits', 'readbits', 'read_long_bits', 'readlongbits', 'read_long_long_bits', 'readlonglongbits', 'read_char', 'readchar', 'read_string', 'readstring', 'print_int', 'printint', 'print_long_int', 'printlongint', 'print_long_long_int', 'printlonglongint', 'print_real', 'printreal', 'print_long_real', 'printlongreal', 'print_long_long_real', 'printlonglongreal', 'print_complex', 'printcomplex', 'print_long_complex', 'printlongcomplex', 'print_long_long_complex', 'printlonglongcomplex', 'print_bool', 'printbool', 'print_bits', 'printbits', 'print_long_bits', 'printlongbits', 'print_long_long_bits', 'printlonglongbits', 'print_char', 'printchar', 'print_string', 'printstring', 'whole', 'fixed', 'float'), - 23 => array('pi', 'long_pi', 'longpi', 'long_long_pi', 'longlongpi'), - 24 => array('sqrt', 'curt', 'cbrt', 'exp', 'ln', 'log', 'sin', 'arc_sin', 'arcsin', 'cos', 'arc_cos', 'arccos', 'tan', 'arc_tan', 'arctan', 'long_sqrt', 'longsqrt', 'long_curt', 'longcurt', 'long_cbrt', 'longcbrt', 'long_exp', 'longexp', 'long_ln', 'longln', 'long_log', 'longlog', 'long_sin', 'longsin', 'long_arc_sin', 'longarcsin', 'long_cos', 'longcos', 'long_arc_cos', 'longarccos', 'long_tan', 'longtan', 'long_arc_tan', 'longarctan', 'long_long_sqrt', 'longlongsqrt', 'long_long_curt', 'longlongcurt', 'long_long_cbrt', 'longlongcbrt', 'long_long_exp', 'longlongexp', 'long_long_ln', 'longlongln', 'long_long_log', 'longlonglog', 'long_long_sin', 'longlongsin', 'long_long_arc_sin', 'longlongarcsin', 'long_long_cos', 'longlongcos', 'long_long_arc_cos', 'longlongarccos', 'long_long_tan', 'longlongtan', 'long_long_arc_tan', 'longlongarctan'), - 25 => array('first_random', 'firstrandom', 'next_random', 'nextrandom', 'long_next_random', 'longnextrandom', 'long_long_next_random', 'longlongnextrandom'), - 26 => array('real', 'bits_pack', 'bitspack', 'long_bits_pack', 'longbitspack', 'long_long_bits_pack', 'longlongbitspack', 'bytes_pack', 'bytespack', 'long_bytes_pack', 'longbytespack', 'char_in_string', 'charinstring', 'last_char_in_string', 'lastcharinstring', 'string_in_string', 'stringinstring'), - 27 => array('utc_time', 'utctime', 'local_time', 'localtime', 'argc', 'argv', 'get_env', 'getenv', 'reset_errno', 'reseterrno', 'errno', 'strerror'), - 28 => array('sinh', 'long_sinh', 'longsinh', 'long_long_sinh', 'longlongsinh', 'arc_sinh', 'arcsinh', 'long_arc_sinh', 'longarcsinh', 'long_long_arc_sinh', 'longlongarcsinh', 'cosh', 'long_cosh', 'longcosh', 'long_long_cosh', 'longlongcosh', 'arc_cosh', 'arccosh', 'long_arc_cosh', 'longarccosh', 'long_long_arc_cosh', 'longlongarccosh', 'tanh', 'long_tanh', 'longtanh', 'long_long_tanh', 'longlongtanh', 'arc_tanh', 'arctanh', 'long_arc_tanh', 'longarctanh', 'long_long_arc_tanh', 'longlongarctanh', 'arc_tan2', 'arctan2', 'long_arc_tan2', 'longarctan2', 'long_long_arc_tan2', 'longlongarctan2'), - 29 => array('complex_sqrt', 'complexsqrt', 'long_complex_sqrt', 'longcomplexsqrt', 'long_long_complex_sqrt', 'longlongcomplexsqrt', 'complex_exp', 'complexexp', 'long_complex_exp', 'longcomplexexp', 'long_long_complex_exp', 'longlongcomplexexp', 'complex_ln', 'complexln', 'long_complex_ln', 'longcomplexln', 'long_long_complex_ln', 'longlongcomplexln', 'complex_sin', 'complexsin', 'long_complex_sin', 'longcomplexsin', 'long_long_complex_sin', 'longlongcomplexsin', 'complex_arc_sin', 'complexarcsin', 'long_complex_arc_sin', 'longcomplexarcsin', 'long_long_complex_arc_sin', 'longlongcomplexarcsin', 'complex_cos', 'complexcos', 'long_complex_cos', 'longcomplexcos', 'long_long_complex_cos', 'longlongcomplexcos', 'complex_arc_cos', 'complexarccos', 'long_complex_arc_cos', 'longcomplexarccos', 'long_long_complex_arc_cos', 'longlongcomplexarccos', 'complex_tan', 'complextan', 'long_complex_tan', 'longcomplextan', 'long_long_complex_tan', 'longlongcomplextan', 'complex_arc_tan', 'complexarctan', 'long_complex_arc_tan', 'longcomplexarctan', 'long_long_complex_arc_tan', 'longlongcomplexarctan', 'complex_sinh', 'complexsinh', 'complex_arc_sinh', 'complexarcsinh', 'complex_cosh', 'complexcosh', 'complex_arc_cosh', 'complexarccosh', 'complex_tanh', 'complextanh', 'complex_arc_tanh', 'complexarctanh') - ), - 'SYMBOLS' => array( - 1 => array( - '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', '!', '^', '&', '|', '?', ':', ';', ',' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true, - 8 => true, - 9 => true, - 10 => true, - 11 => true, - 12 => true, - 13 => true, - 14 => true, - 15 => true, - 16 => true, - 17 => true, - 18 => true, - 19 => true, - 20 => true, - 21 => true, - 22 => true, - 23 => true, - 24 => true, - 25 => true, - 26 => true, - 27 => true, - 28 => true, - 29 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100; font-weight: bold;', - 2 => 'color: #b1b100; font-weight: bold;', - 3 => 'color: #b1b100; font-weight: bold;', - 4 => 'color: #b1b100; font-weight: bold;', - 5 => 'color: #b1b100; font-weight: bold;', - 6 => 'color: #b1b100; font-weight: bold;', - 7 => 'color: #b1b100; font-weight: bold;', - 8 => 'color: #b1b100; font-weight: bold;', - 9 => 'color: #b1b100; font-weight: bold;', - 10 => 'color: #b1b100; font-weight: bold;', - 11 => 'color: #b1b100; font-weight: bold;', - 12 => 'color: #b1b100; font-weight: bold;', - 13 => 'color: #b1b100; font-weight: bold;', - 14 => 'color: #b1b100; font-weight: bold;', - 15 => 'color: #b1b100; font-weight: bold;', - 16 => 'color: #b1b100; font-weight: bold;', - 17 => 'color: #b1b100; font-weight: bold;', - 18 => 'color: #b1b100; font-weight: bold;', - 19 => 'color: #b1b100; font-weight: bold;', - 20 => 'color: #b1b100;', - 21 => 'color: #b1b100;', - 22 => 'color: #b1b100;', - 23 => 'color: #b1b100;', - 24 => 'color: #b1b100;', - 25 => 'color: #b1b100;', - 26 => 'color: #b1b100;', - 27 => 'color: #b1b100;', - 28 => 'color: #b1b100;', - 29 => 'color: #b1b100;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #666666; font-style: italic;', - 3 => 'color: #666666; font-style: italic;', - 4 => 'color: #666666; font-style: italic;', - 5 => 'color: #666666; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;', - ), - 'METHODS' => array( - 0 => 'color: #004000;' - ), - 'SYMBOLS' => array( - 1 => 'color: #339933;' - ), - 'REGEXPS' => array(), - 'SCRIPT' => array() - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '', - 8 => '', - 9 => '', - 10 => '', - 11 => '', - 12 => '', - 13 => '', - 14 => '', - 15 => '', - 16 => '', - 17 => '', - 18 => '', - 19 => '', - 20 => '', - 21 => '', - 22 => '', - 23 => '', - 24 => '', - 25 => '', - 26 => '', - 27 => '', - 28 => '', - 29 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => 'OF' - ), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array() -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/apache.php b/_piecrust/libs/Geshi/geshi/apache.php deleted file mode 100644 index ddd4d6a..0000000 --- a/_piecrust/libs/Geshi/geshi/apache.php +++ /dev/null @@ -1,480 +0,0 @@ - 'Apache configuration', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - /*keywords*/ - 1 => array( - //core.c - 'AcceptFilter','AcceptPathInfo','AccessConfig','AccessFileName', - 'AddDefaultCharset','AddOutputFilterByType','AllowEncodedSlashes', - 'AllowOverride','AuthName','AuthType','ContentDigest', - 'CoreDumpDirectory','DefaultType','DocumentRoot','EnableMMAP', - 'EnableSendfile','ErrorDocument','ErrorLog','FileETag','ForceType', - 'HostnameLookups','Include','LimitInternalRecursion', - 'LimitRequestBody','LimitRequestFields','LimitRequestFieldsize', - 'LimitRequestLine','LimitXMLRequestBody','LogLevel','MaxMemFree', - 'MaxRequestsPerChild','NameVirtualHost','Options','PidFile','Port', - 'Protocol','Require','RLimitCPU','RLimitMEM','RLimitNPROC', - 'Satisfy','ScoreBoardFile','ServerAdmin','ServerAlias','ServerName', - 'ServerPath','ServerRoot','ServerSignature','ServerTokens', - 'SetHandler','SetInputFilter','SetOutputFilter','ThreadStackSize', - 'Timeout','TraceEnable','UseCanonicalName', - 'UseCanonicalPhysicalPort', - - //http_core.c - 'KeepAlive','KeepAliveTimeout','MaxKeepAliveRequests', - - //mod_actions.c - 'Action','Script', - - //mod_alias.c - 'Alias','AliasMatch','Redirect','RedirectMatch','RedirectPermanent', - 'RedirectTemp','ScriptAlias','ScriptAliasMatch', - - //mod_asis.c - - //mod_auth_basic.c - 'AuthBasicAuthoritative','AuthBasicProvider', - - //mod_auth_digest.c - 'AuthDigestAlgorithm','AuthDigestDomain','AuthDigestNcCheck', - 'AuthDigestNonceFormat','AuthDigestNonceLifetime', - 'AuthDigestProvider','AuthDigestQop','AuthDigestShmemSize', - - //mod_authn_alias.c - - //mod_authn_anon.c - 'Anonymous','Anonymous_LogEmail','Anonymous_MustGiveEmail', - 'Anonymous_NoUserId','Anonymous_VerifyEmail', - - //mod_authn_dbd.c - 'AuthDBDUserPWQuery','AuthDBDUserRealmQuery', - - //mod_authn_dbm.c - 'AuthDBMType','AuthDBMUserFile', - - //mod_authn_default.c - 'AuthDefaultAuthoritative', - - //mod_authn_file.c - 'AuthUserFile', - - //mod_authnz_ldap.c - 'AuthLDAPBindDN','AuthLDAPBindPassword','AuthLDAPCharsetConfig', - 'AuthLDAPCompareDNOnServer','AuthLDAPDereferenceAliases', - 'AuthLDAPGroupAttribute','AuthLDAPGroupAttributeIsDN', - 'AuthLDAPRemoteUserAttribute','AuthLDAPRemoteUserIsDN', - 'AuthLDAPURL','AuthzLDAPAuthoritative', - - //mod_authz_dbm.c - 'AuthDBMGroupFile','AuthzDBMAuthoritative','AuthzDBMType', - - //mod_authz_default.c - 'AuthzDefaultAuthoritative', - - //mod_authz_groupfile.c - 'AuthGroupFile','AuthzGroupFileAuthoritative', - - //mod_authz_host.c - 'Allow','Deny','Order', - - //mod_authz_owner.c - 'AuthzOwnerAuthoritative', - - //mod_authz_svn.c - 'AuthzForceUsernameCase','AuthzSVNAccessFile','AuthzSVNAnonymous', - 'AuthzSVNAuthoritative','AuthzSVNNoAuthWhenAnonymousAllowed', - - //mod_authz_user.c - 'AuthzUserAuthoritative', - - //mod_autoindex.c - 'AddAlt','AddAltByEncoding','AddAltByType','AddDescription', - 'AddIcon','AddIconByEncoding','AddIconByType','DefaultIcon', - 'FancyIndexing','HeaderName','IndexHeadInsert','IndexIgnore', - 'IndexOptions','IndexOrderDefault','IndexStyleSheet','ReadmeName', - - //mod_bt.c - 'Tracker','TrackerDetailURL','TrackerFlags','TrackerHashMaxAge', - 'TrackerHashMinAge','TrackerHashWatermark','TrackerHome', - 'TrackerReturnInterval','TrackerReturnMax', - 'TrackerReturnPeerFactor','TrackerReturnPeers','TrackerRootInclude', - 'TrackerStyleSheet', - - //mod_bw.c - 'BandWidth','BandWidthError','BandWidthModule','BandWidthPacket', - 'ForceBandWidthModule','LargeFileLimit','MaxConnection', - 'MinBandWidth', - - //mod_cache.c - 'CacheDefaultExpire','CacheDisable','CacheEnable', - 'CacheIgnoreCacheControl','CacheIgnoreHeaders', - 'CacheIgnoreNoLastMod','CacheIgnoreQueryString', - 'CacheLastModifiedFactor','CacheMaxExpire','CacheStoreNoStore', - 'CacheStorePrivate', - - //mod_cern_meta.c - 'MetaDir','MetaFiles','MetaSuffix', - - //mod_cgi.c - 'ScriptLog','ScriptLogBuffer','ScriptLogLength', - - //mod_charset_lite.c - 'CharsetDefault','CharsetOptions','CharsetSourceEnc', - - //mod_dav.c - 'DAV','DAVDepthInfinity','DAVMinTimeout', - - //mod_dav_fs.c - 'DAVLockDB', - - //mod_dav_lock.c - 'DAVGenericLockDB', - - //mod_dav_svn.c - 'SVNActivitiesDB','SVNAllowBulkUpdates','SVNAutoversioning', - 'SVNIndexXSLT','SVNListParentPath','SVNMasterURI','SVNParentPath', - 'SVNPath','SVNPathAuthz','SVNReposName','SVNSpecialURI', - - //mod_dbd.c - 'DBDExptime','DBDKeep','DBDMax','DBDMin','DBDParams','DBDPersist', - 'DBDPrepareSQL','DBDriver', - - //mod_deflate.c - 'DeflateBufferSize','DeflateCompressionLevel','DeflateFilterNote', - 'DeflateMemLevel','DeflateWindowSize', - - //mod_dir.c - 'DirectoryIndex','DirectorySlash', - - //mod_disk_cache.c - 'CacheDirLength','CacheDirLevels','CacheMaxFileSize', - 'CacheMinFileSize','CacheRoot', - - //mod_dumpio.c - 'DumpIOInput','DumpIOLogLevel','DumpIOOutput', - - //mod_env.c - 'PassEnv','SetEnv','UnsetEnv', - - //mod_expires.c - 'ExpiresActive','ExpiresByType','ExpiresDefault', - - //mod_ext_filter.c - 'ExtFilterDefine','ExtFilterOptions', - - //mod_file_cache.c - 'cachefile','mmapfile', - - //mod_filter.c - 'FilterChain','FilterDeclare','FilterProtocol','FilterProvider', - 'FilterTrace', - - //mod_gnutls.c - 'GnuTLSCache','GnuTLSCacheTimeout','GnuTLSCertificateFile', - 'GnuTLSKeyFile','GnuTLSPGPCertificateFile','GnuTLSPGPKeyFile', - 'GnuTLSClientVerify','GnuTLSClientCAFile','GnuTLSPGPKeyringFile', - 'GnuTLSEnable','GnuTLSDHFile','GnuTLSRSAFile','GnuTLSSRPPasswdFile', - 'GnuTLSSRPPasswdConfFile','GnuTLSPriorities', - 'GnuTLSExportCertificates', - - //mod_headers.c - 'Header','RequestHeader', - - //mod_imagemap.c - 'ImapBase','ImapDefault','ImapMenu', - - //mod_include.c - 'SSIAccessEnable','SSIEndTag','SSIErrorMsg','SSIStartTag', - 'SSITimeFormat','SSIUndefinedEcho','XBitHack', - - //mod_ident.c - 'IdentityCheck','IdentityCheckTimeout', - - //mod_info.c - 'AddModuleInfo', - - //mod_isapi.c - 'ISAPIAppendLogToErrors','ISAPIAppendLogToQuery','ISAPICacheFile', - 'ISAPIFakeAsync','ISAPILogNotSupported','ISAPIReadAheadBuffer', - - //mod_log_config.c - 'BufferedLogs','CookieLog','CustomLog','LogFormat','TransferLog', - - //mod_log_forensic.c - 'ForensicLog', - - //mod_log_rotate.c - 'RotateInterval','RotateLogs','RotateLogsLocalTime', - - //mod_logio.c - - //mod_mem_cache.c - 'MCacheMaxObjectCount','MCacheMaxObjectSize', - 'MCacheMaxStreamingBuffer','MCacheMinObjectSize', - 'MCacheRemovalAlgorithm','MCacheSize', - - //mod_mime.c - 'AddCharset','AddEncoding','AddHandler','AddInputFilter', - 'AddLanguage','AddOutputFilter','AddType','DefaultLanguage', - 'ModMimeUsePathInfo','MultiviewsMatch','RemoveCharset', - 'RemoveEncoding','RemoveHandler','RemoveInputFilter', - 'RemoveLanguage','RemoveOutputFilter','RemoveType','TypesConfig', - - //mod_mime_magic.c - 'MimeMagicFile', - - //mod_negotiation.c - 'CacheNegotiatedDocs','ForceLanguagePriority','LanguagePriority', - - //mod_php5.c - 'php_admin_flag','php_admin_value','php_flag','php_value', - 'PHPINIDir', - - //mod_proxy.c - 'AllowCONNECT','BalancerMember','NoProxy','ProxyBadHeader', - 'ProxyBlock','ProxyDomain','ProxyErrorOverride', - 'ProxyFtpDirCharset','ProxyIOBufferSize','ProxyMaxForwards', - 'ProxyPass','ProxyPassInterpolateEnv','ProxyPassMatch', - 'ProxyPassReverse','ProxyPassReverseCookieDomain', - 'ProxyPassReverseCookiePath','ProxyPreserveHost', - 'ProxyReceiveBufferSize','ProxyRemote','ProxyRemoteMatch', - 'ProxyRequests','ProxySet','ProxyStatus','ProxyTimeout','ProxyVia', - - //mod_proxy_ajp.c - - //mod_proxy_balancer.c - - //mod_proxy_connect.c - - //mod_proxy_ftp.c - - //mod_proxy_http.c - - //mod_rewrite.c - 'RewriteBase','RewriteCond','RewriteEngine','RewriteLock', - 'RewriteLog','RewriteLogLevel','RewriteMap','RewriteOptions', - 'RewriteRule', - - //mod_setenvif.c - 'BrowserMatch','BrowserMatchNoCase','SetEnvIf','SetEnvIfNoCase', - - //mod_so.c - 'LoadFile','LoadModule', - - //mod_speling.c - 'CheckCaseOnly','CheckSpelling', - - //mod_ssl.c - 'SSLCACertificateFile','SSLCACertificatePath','SSLCADNRequestFile', - 'SSLCADNRequestPath','SSLCARevocationFile','SSLCARevocationPath', - 'SSLCertificateChainFile','SSLCertificateFile', - 'SSLCertificateKeyFile','SSLCipherSuite','SSLCryptoDevice', - 'SSLEngine','SSLHonorCipherOrder','SSLMutex','SSLOptions', - 'SSLPassPhraseDialog','SSLProtocol','SSLProxyCACertificateFile', - 'SSLProxyCACertificatePath','SSLProxyCARevocationFile', - 'SSLProxyCARevocationPath','SSLProxyCipherSuite','SSLProxyEngine', - 'SSLProxyMachineCertificateFile','SSLProxyMachineCertificatePath', - 'SSLProxyProtocol','SSLProxyVerify','SSLProxyVerifyDepth', - 'SSLRandomSeed','SSLRenegBufferSize','SSLRequire','SSLRequireSSL', - 'SSLSessionCache','SSLSessionCacheTimeout','SSLUserName', - 'SSLVerifyClient','SSLVerifyDepth', - - //mod_status.c - 'ExtendedStatus','SeeRequestTail', - - //mod_substitute.c - 'Substitute', - - //mod_suexec.c - 'SuexecUserGroup', - - //mod_unique_id.c - - //mod_userdir.c - 'UserDir', - - //mod_usertrack.c - 'CookieDomain','CookieExpires','CookieName','CookieStyle', - 'CookieTracking', - - //mod_version.c - - //mod_vhost_alias.c - 'VirtualDocumentRoot','VirtualDocumentRootIP', - 'VirtualScriptAlias','VirtualScriptAliasIP', - - //mod_view.c - 'ViewEnable', - - //mod_win32.c - 'ScriptInterpreterSource', - - //mpm_winnt.c - 'Listen','ListenBacklog','ReceiveBufferSize','SendBufferSize', - 'ThreadLimit','ThreadsPerChild','Win32DisableAcceptEx', - - //mpm_common.c - 'AcceptMutex','AddModule','ClearModuleList','EnableExceptionHook', - 'Group','LockFile','MaxClients','MaxSpareServers','MaxSpareThreads', - 'MinSpareServers','MinSpareThreads','ServerLimit','StartServers', - 'StartThreads','User', - - //util_ldap.c - 'LDAPCacheEntries','LDAPCacheTTL','LDAPConnectionTimeout', - 'LDAPOpCacheEntries','LDAPOpCacheTTL','LDAPSharedCacheFile', - 'LDAPSharedCacheSize','LDAPTrustedClientCert', - 'LDAPTrustedGlobalCert','LDAPTrustedMode','LDAPVerifyServerCert', - - //Unknown Mods ... - 'AgentLog','BindAddress','bs2000account','CacheForceCompletion', - 'CacheGCInterval','CacheSize','NoCache','qsc','RefererIgnore', - 'RefererLog','Resourceconfig','ServerType','SingleListen' - ), - /*keywords 2*/ - 2 => array( - 'all','on','off','standalone','inetd','indexes', - 'force-response-1.0','downgrade-1.0','nokeepalive', - 'includes','followsymlinks','none', - 'x-compress','x-gzip' - ), - /*keywords 3*/ - 3 => array( - //core.c - 'Directory','DirectoryMatch','Files','FilesMatch','IfDefine', - 'IfModule','Limit','LimitExcept','Location','LocationMatch', - 'VirtualHost', - - //mod_authn_alias.c - 'AuthnProviderAlias', - - //mod_proxy.c - 'Proxy','ProxyMatch', - - //mod_version.c - 'IfVersion' - ) - ), - 'SYMBOLS' => array( - '+', '-' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #00007f;', - 2 => 'color: #0000ff;', - 3 => 'color: #000000; font-weight:bold;', - ), - 'COMMENTS' => array( - 1 => 'color: #adadad; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #339933;' - ), - 'STRINGS' => array( - 0 => 'color: #7f007f;' - ), - 'NUMBERS' => array( - 0 => 'color: #ff0000;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #008000;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'BRACKETS' => GESHI_NEVER, - 'SYMBOLS' => GESHI_NEVER - ), - 'KEYWORDS' => array( - 3 => array( - 'DISALLOWED_BEFORE' => '(?<=<|<\/)', - 'DISALLOWED_AFTER' => '(?=\s|\/|>)', - ) - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/applescript.php b/_piecrust/libs/Geshi/geshi/applescript.php deleted file mode 100644 index 870ac0f..0000000 --- a/_piecrust/libs/Geshi/geshi/applescript.php +++ /dev/null @@ -1,157 +0,0 @@ - 'AppleScript', - 'COMMENT_SINGLE' => array(1 => '--'), - 'COMMENT_MULTI' => array( '(*' => '*)'), - 'COMMENT_REGEXP' => array( - 2 => '/(?<=[a-z])\'/i', - 3 => '/(? GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'application','close','count','delete','duplicate','exists','launch','make','move','open', - 'print','quit','reopen','run','save','saving', 'idle', 'path to', 'number', 'alias', 'list', 'text', 'string', - 'integer', 'it','me','version','pi','result','space','tab','anything','case','diacriticals','expansion', - 'hyphens','punctuation','bold','condensed','expanded','hidden','italic','outline','plain', - 'shadow','strikethrough','subscript','superscript','underline','ask','no','yes','false', 'id', - 'true','weekday','monday','mon','tuesday','tue','wednesday','wed','thursday','thu','friday', - 'fri','saturday','sat','sunday','sun','month','january','jan','february','feb','march', - 'mar','april','apr','may','june','jun','july','jul','august','aug','september', 'quote', 'do JavaScript', - 'sep','october','oct','november','nov','december','dec','minutes','hours', 'name', 'default answer', - 'days','weeks', 'folder', 'folders', 'file', 'files', 'window', 'eject', 'disk', 'reveal', 'sleep', - 'shut down', 'restart', 'display dialog', 'buttons', 'invisibles', 'item', 'items', 'delimiters', 'offset of', - 'AppleScript\'s', 'choose file', 'choose folder', 'choose from list', 'beep', 'contents', 'do shell script', - 'paragraph', 'paragraphs', 'missing value', 'quoted form', 'desktop', 'POSIX path', 'POSIX file', - 'activate', 'document', 'adding', 'receiving', 'content', 'new', 'properties', 'info for', 'bounds', - 'selection', 'extension', 'into', 'onto', 'by', 'between', 'against', 'set the clipboard to', 'the clipboard' - ), - 2 => array( - 'each','some','every','whose','where','index','first','second','third','fourth', - 'fifth','sixth','seventh','eighth','ninth','tenth','last','front','back','st','nd', - 'rd','th','middle','named','through','thru','before','after','beginning','the', 'as', - 'div','mod','and','not','or','contains','equal','equals','isnt', 'less', 'greater' - ), - 3 => array( - 'script','property','prop','end','to','set','global','local','on','of', - 'in','given','with','without','return','continue','tell','if','then','else','repeat', - 'times','while','until','from','exit','try','error','considering','ignoring','timeout', - 'transaction','my','get','put','is', 'copy' - ) - ), - 'SYMBOLS' => array( - ')','+','-','^','*','/','&','<','>=','<','<=','=','�' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0066ff;', - 2 => 'color: #ff0033;', - 3 => 'color: #ff0033; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 2 => '', - 3 => 'color: #ff0000;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000000; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #009900;' - ), - 'NUMBERS' => array( - 0 => 'color: #000000;' - ), - 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #000000;' - ), - 'REGEXPS' => array( - 0 => 'color: #339933;', - 4 => 'color: #0066ff;', - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => ',+-=<>/?^&*' - ), - 'REGEXPS' => array( - //Variables - 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*', - //File descriptors - 4 => '<[a-zA-Z_][a-zA-Z0-9_]*>', - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'SPACE_AS_WHITESPACE' => true - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/apt_sources.php b/_piecrust/libs/Geshi/geshi/apt_sources.php deleted file mode 100644 index 0512380..0000000 --- a/_piecrust/libs/Geshi/geshi/apt_sources.php +++ /dev/null @@ -1,144 +0,0 @@ - 'Apt sources', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - /*keywords*/ - 1 => array( - 'deb-src', 'deb' - ), - 2 => array( - //Generic - 'stable', 'old-stable', 'testing', 'testing-proposed-updates', - 'unstable', 'unstable-proposed-updates', 'experimental', - 'non-US', 'security', 'volatile', 'volatile-sloppy', - 'apt-build', - 'stable/updates', - //Debian - 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', 'woody', 'sarge', - 'etch', 'lenny', 'sid', - //Ubuntu - 'warty', 'warty-updates', 'warty-security', 'warty-proposed', 'warty-backports', - 'hoary', 'hoary-updates', 'hoary-security', 'hoary-proposed', 'hoary-backports', - 'breezy', 'breezy-updates', 'breezy-security', 'breezy-proposed', 'breezy-backports', - 'dapper', 'dapper-updates', 'dapper-security', 'dapper-proposed', 'dapper-backports', - 'edgy', 'edgy-updates', 'edgy-security', 'edgy-proposed', 'edgy-backports', - 'feisty', 'feisty-updates', 'feisty-security', 'feisty-proposed', 'feisty-backports', - 'gutsy', 'gutsy-updates', 'gutsy-security', 'gutsy-proposed', 'gutsy-backports', - 'hardy', 'hardy-updates', 'hardy-security', 'hardy-proposed', 'hardy-backports', - 'intrepid', 'intrepid-updates', 'intrepid-security', 'intrepid-proposed', 'intrepid-backports' - ), - 3 => array( - 'main', 'restricted', 'preview', 'contrib', 'non-free', - 'commercial', 'universe', 'multiverse' - ) - ), - 'REGEXPS' => array( - 0 => "(((http|ftp):\/\/|file:\/)[^\s]+)|(cdrom:\[[^\]]*\][^\s]*)", - ), - 'SYMBOLS' => array( - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => true, - 3 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #00007f;', - 2 => 'color: #b1b100;', - 3 => 'color: #b16000;' - ), - 'COMMENTS' => array( - 1 => 'color: #adadad; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - ), - 'BRACKETS' => array( - ), - 'STRINGS' => array( - ), - 'NUMBERS' => array( - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - ), - 'REGEXPS' => array( - 0 => 'color: #009900;', - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'NUMBERS' => GESHI_NEVER, - 'METHODS' => GESHI_NEVER, - 'SCRIPT' => GESHI_NEVER, - 'SYMBOLS' => GESHI_NEVER, - 'ESCAPE_CHAR' => GESHI_NEVER, - 'BRACKETS' => GESHI_NEVER, - 'STRINGS' => GESHI_NEVER, - ), - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => '(?|^\/])', - 'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-&\.])' - ) - ), - 'TAB_WIDTH' => 4 -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/asm.php b/_piecrust/libs/Geshi/geshi/asm.php deleted file mode 100644 index aebfa35..0000000 --- a/_piecrust/libs/Geshi/geshi/asm.php +++ /dev/null @@ -1,225 +0,0 @@ - 'ASM', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array(), - //Line address prefix suppression - 'COMMENT_REGEXP' => array(2 => "/^(?:[0-9a-f]{0,4}:)?[0-9a-f]{4}(?:[0-9a-f]{4})?/mi"), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - /*CPU*/ - 1 => array( - 'aaa','aad','aam','aas','adc','add','and','call','cbw','clc','cld','cli','cmc','cmp', - 'cmps','cmpsb','cmpsw','cwd','daa','das','dec','div','esc','hlt','idiv','imul','in','inc', - 'int','into','iret','ja','jae','jb','jbe','jc','jcxz','je','jg','jge','jl','jle','jmp', - 'jna','jnae','jnb','jnbe','jnc','jne','jng','jnge','jnl','jnle','jno','jnp','jns','jnz', - 'jo','jp','jpe','jpo','js','jz','lahf','lds','lea','les','lods','lodsb','lodsw','loop', - 'loope','loopew','loopne','loopnew','loopnz','loopnzw','loopw','loopz','loopzw','mov', - 'movs','movsb','movsw','mul','neg','nop','not','or','out','pop','popf','push','pushf', - 'rcl','rcr','ret','retf','retn','rol','ror','sahf','sal','sar','sbb','scas','scasb','scasw', - 'shl','shr','stc','std','sti','stos','stosb','stosw','sub','test','wait','xchg','xlat', - 'xlatb','xor','bound','enter','ins','insb','insw','leave','outs','outsb','outsw','popa','pusha','pushw', - 'arpl','lar','lsl','sgdt','sidt','sldt','smsw','str','verr','verw','clts','lgdt','lidt','lldt','lmsw','ltr', - 'bsf','bsr','bt','btc','btr','bts','cdq','cmpsd','cwde','insd','iretd','iretdf','iretf', - 'jecxz','lfs','lgs','lodsd','loopd','looped','loopned','loopnzd','loopzd','lss','movsd', - 'movsx','movzx','outsd','popad','popfd','pushad','pushd','pushfd','scasd','seta','setae', - 'setb','setbe','setc','sete','setg','setge','setl','setle','setna','setnae','setnb','setnbe', - 'setnc','setne','setng','setnge','setnl','setnle','setno','setnp','setns','setnz','seto','setp', - 'setpe','setpo','sets','setz','shld','shrd','stosd','bswap','cmpxchg','invd','invlpg','wbinvd','xadd','lock', - 'rep','repe','repne','repnz','repz' - ), - /*FPU*/ - 2 => array( - 'f2xm1','fabs','fadd','faddp','fbld','fbstp','fchs','fclex','fcom','fcomp','fcompp','fdecstp', - 'fdisi','fdiv','fdivp','fdivr','fdivrp','feni','ffree','fiadd','ficom','ficomp','fidiv', - 'fidivr','fild','fimul','fincstp','finit','fist','fistp','fisub','fisubr','fld','fld1', - 'fldcw','fldenv','fldenvw','fldl2e','fldl2t','fldlg2','fldln2','fldpi','fldz','fmul', - 'fmulp','fnclex','fndisi','fneni','fninit','fnop','fnsave','fnsavew','fnstcw','fnstenv', - 'fnstenvw','fnstsw','fpatan','fprem','fptan','frndint','frstor','frstorw','fsave', - 'fsavew','fscale','fsqrt','fst','fstcw','fstenv','fstenvw','fstp','fstsw','fsub','fsubp', - 'fsubr','fsubrp','ftst','fwait','fxam','fxch','fxtract','fyl2x','fyl2xp1', - 'fsetpm','fcos','fldenvd','fnsaved','fnstenvd','fprem1','frstord','fsaved','fsin','fsincos', - 'fstenvd','fucom','fucomp','fucompp' - ), - /*registers*/ - 3 => array( - 'ah','al','ax','bh','bl','bp','bx','ch','cl','cr0','cr2','cr3','cs','cx','dh','di','dl', - 'dr0','dr1','dr2','dr3','dr6','dr7','ds','dx','eax','ebp','ebx','ecx','edi','edx', - 'es','esi','esp','fs','gs','si','sp','ss','st','tr3','tr4','tr5','tr6','tr7' - ), - /*Directive*/ - 4 => array( - '186','286','286c','286p','287','386','386c','386p','387','486','486p', - '8086','8087','alpha','break','code','const','continue','cref','data','data?', - 'dosseg','else','elseif','endif','endw','err','err1','err2','errb', - 'errdef','errdif','errdifi','erre','erridn','erridni','errnb','errndef', - 'errnz','exit','fardata','fardata?','if','lall','lfcond','list','listall', - 'listif','listmacro','listmacroall',' model','no87','nocref','nolist', - 'nolistif','nolistmacro','radix','repeat','sall','seq','sfcond','stack', - 'startup','tfcond','type','until','untilcxz','while','xall','xcref', - 'xlist','alias','align','assume','catstr','comm','comment','db','dd','df','dq', - 'dt','dup','dw','echo','elseif1','elseif2','elseifb','elseifdef','elseifdif', - 'elseifdifi','elseife','elseifidn','elseifidni','elseifnb','elseifndef','end', - 'endm','endp','ends','eq',' equ','even','exitm','extern','externdef','extrn','for', - 'forc','ge','goto','group','high','highword','if1','if2','ifb','ifdef','ifdif', - 'ifdifi','ife',' ifidn','ifidni','ifnb','ifndef','include','includelib','instr','invoke', - 'irp','irpc','label','le','length','lengthof','local','low','lowword','lroffset', - 'macro','mask','mod','msfloat','name','ne','offset','opattr','option','org','%out', - 'page','popcontext','private','proc','proto','ptr','public','purge','pushcontext','record', - 'rept','seg','segment','short','size','sizeof','sizestr','struc','struct', - 'substr','subtitle','subttl','textequ','this','title','typedef','union','width', - '.model', '.stack', '.code', '.data' - ), - /*Operands*/ - 5 => array( - '@b','@f','addr','basic','byte','c','carry?','dword', - 'far','far16','fortran','fword','near','near16','overflow?','parity?','pascal','qword', - 'real4',' real8','real10','sbyte','sdword','sign?','stdcall','sword','syscall','tbyte', - 'vararg','word','zero?','flat','near32','far32', - 'abs','all','assumes','at','casemap','common','compact', - 'cpu','dotname','emulator','epilogue','error','export','expr16','expr32','farstack', - 'forceframe','huge','language','large','listing','ljmp','loadds','m510','medium','memory', - 'nearstack','nodotname','noemulator','nokeyword','noljmp','nom510','none','nonunique', - 'nooldmacros','nooldstructs','noreadonly','noscoped','nosignextend','nothing', - 'notpublic','oldmacros','oldstructs','os_dos','para','prologue', - 'readonly','req','scoped','setif2','smallstack','tiny','use16','use32','uses' - ) - ), - 'SYMBOLS' => array( - '[', ']', '(', ')', - '+', '-', '*', '/', '%', - '.', ',', ';', ':' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #00007f; font-weight: bold;', - 2 => 'color: #0000ff; font-weight: bold;', - 3 => 'color: #00007f;', - 4 => 'color: #000000; font-weight: bold;', - 5 => 'color: #000000; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #adadad; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900; font-weight: bold;' - ), - 'STRINGS' => array( - 0 => 'color: #7f007f;' - ), - 'NUMBERS' => array( - 0 => 'color: #0000ff;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'REGEXPS' => array( -// 0 => 'color: #0000ff;', -// 1 => 'color: #0000ff;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '' - ), - 'NUMBERS' => - GESHI_NUMBER_BIN_PREFIX_PERCENT | - GESHI_NUMBER_BIN_SUFFIX | - GESHI_NUMBER_HEX_PREFIX | - GESHI_NUMBER_HEX_SUFFIX | - GESHI_NUMBER_OCT_SUFFIX | - GESHI_NUMBER_INT_BASIC | - GESHI_NUMBER_FLT_NONSCI | - GESHI_NUMBER_FLT_NONSCI_F | - GESHI_NUMBER_FLT_SCI_ZERO, - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - //Hex numbers -// 0 => /* */ "(?<=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))(?:[0-9][0-9a-fA-F]{0,31}[hH]|0x[0-9a-fA-F]{1,32})(?=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))", - //Binary numbers -// 1 => "(?<=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))[01]{1,64}[bB](?=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))" - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 8, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "(?|^])", - 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%])" - ) - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/asp.php b/_piecrust/libs/Geshi/geshi/asp.php deleted file mode 100644 index 5f48f11..0000000 --- a/_piecrust/libs/Geshi/geshi/asp.php +++ /dev/null @@ -1,164 +0,0 @@ - 'ASP', - 'COMMENT_SINGLE' => array(1 => "'", 2 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'include', 'file', 'Const', 'Dim', 'Option', 'Explicit', 'Implicit', 'Set', 'Select', 'ReDim', 'Preserve', - 'ByVal', 'ByRef', 'End', 'Private', 'Public', 'If', 'Then', 'Else', 'ElseIf', 'Case', 'With', 'NOT', - 'While', 'Wend', 'For', 'Loop', 'Do', 'Request', 'Response', 'Server', 'ADODB', 'Session', 'Application', - 'Each', 'In', 'Get', 'Next', 'INT', 'CINT', 'CBOOL', 'CDATE', 'CBYTE', 'CCUR', 'CDBL', 'CLNG', 'CSNG', - 'CSTR', 'Fix', 'Is', 'Sgn', 'String', 'Boolean', 'Currency', 'Me', 'Single', 'Long', 'Integer', 'Byte', - 'Variant', 'Double', 'To', 'Let', 'Xor', 'Resume', 'On', 'Error', 'Imp', 'GoTo', 'Call', 'Global' - ), - 2 => array( - 'Null', 'Nothing', 'And', - 'False', - 'True', 'var', 'Or', 'BOF', 'EOF', 'xor', - 'Function', 'Class', 'New', 'Sub' - ), - 3 => array( - 'CreateObject', 'Write', 'Redirect', 'Cookies', 'BinaryRead', 'ClientCertificate', 'Form', 'QueryString', - 'ServerVariables', 'TotalBytes', 'AddHeader', 'AppendToLog', 'BinaryWrite', 'Buffer', 'CacheControl', - 'Charset', 'Clear', 'ContentType', 'End()', 'Expires', 'ExpiresAbsolute', 'Flush()', 'IsClientConnected', - 'PICS', 'Status', 'Connection', 'Recordset', 'Execute', 'Abandon', 'Lock', 'UnLock', 'Command', 'Fields', - 'Properties', 'Property', 'Send', 'Replace', 'InStr', 'TRIM', 'NOW', 'Day', 'Month', 'Hour', 'Minute', 'Second', - 'Year', 'MonthName', 'LCase', 'UCase', 'Abs', 'Array', 'As', 'LEN', 'MoveFirst', 'MoveLast', 'MovePrevious', - 'MoveNext', 'LBound', 'UBound', 'Transfer', 'Open', 'Close', 'MapPath', 'FileExists', 'OpenTextFile', 'ReadAll' - ) - ), - 'SYMBOLS' => array( - 1 => array( - '<%', '%>' - ), - 0 => array( - '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', - ';', ':', '?', '='), - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #990099; font-weight: bold;', - 2 => 'color: #0000ff; font-weight: bold;', - 3 => 'color: #330066;' - ), - 'COMMENTS' => array( - 1 => 'color: #008000;', - 2 => 'color: #ff6600;', - 'MULTI' => 'color: #008000;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #006600; font-weight:bold;' - ), - 'STRINGS' => array( - 0 => 'color: #cc0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #800000;' - ), - 'METHODS' => array( - 1 => 'color: #9900cc;' - ), - 'SYMBOLS' => array( - 0 => 'color: #006600; font-weight: bold;', - 1 => 'color: #000000; font-weight: bold;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - 3 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - 0 => array( - '<%' => '%>' - ), - 1 => array( - '' - ), - 2 => array( - '' - ), - 3 => "/(?P<%=?)(?:\"[^\"]*?\"|\/\*(?!\*\/).*?\*\/|.)*?(?P%>|\Z)/sm" - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - 1 => true, - 2 => true, - 3 => true - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/autoconf.php b/_piecrust/libs/Geshi/geshi/autoconf.php deleted file mode 100644 index 3f35e8a..0000000 --- a/_piecrust/libs/Geshi/geshi/autoconf.php +++ /dev/null @@ -1,512 +0,0 @@ - 'Autoconf', - 'COMMENT_SINGLE' => array(2 => '#'), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array( - //Multiline-continued single-line comments - 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', - //Multiline-continued preprocessor define - 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m', - //Single Line comment started by dnl - 3 => '/(? GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array(), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | - GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | - GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - 1 => array( - 'AC_ACT_IFELSE', - 'AC_AIX', - 'AC_ALLOCA', - 'AC_ARG_ARRAY', - 'AC_ARG_ENABLE', - 'AC_ARG_PROGRAM', - 'AC_ARG_VAR', - 'AC_ARG_WITH', - 'AC_AUTOCONF_VERSION', - 'AC_BEFORE', - 'AC_C_BACKSLASH_A', - 'AC_C_BIGENDIAN', - 'AC_C_CHAR_UNSIGNED', - 'AC_C_CONST', - 'AC_C_CROSS', - 'AC_C_FLEXIBLE_ARRAY_MEMBER', - 'AC_C_INLINE', - 'AC_C_LONG_DOUBLE', - 'AC_C_PROTOTYPES', - 'AC_C_RESTRICT', - 'AC_C_STRINGIZE', - 'AC_C_TYPEOF', - 'AC_C_VARARRAYS', - 'AC_C_VOLATILE', - 'AC_CACHE_CHECK', - 'AC_CACHE_LOAD', - 'AC_CACHE_SAVE', - 'AC_CACHE_VAL', - 'AC_CANONICAL_BUILD', - 'AC_CANONICAL_HOST', - 'AC_CANONICAL_SYSTEM', - 'AC_CANONICAL_TARGET', - 'AC_CHAR_UNSIGNED', - 'AC_CHECK_ALIGNOF', - 'AC_CHECK_DECL', - 'AC_CHECK_DECLS', - 'AC_CHECK_DECLS_ONCE', - 'AC_CHECK_FILE', - 'AC_CHECK_FILES', - 'AC_CHECK_FUNC', - 'AC_CHECK_FUNCS', - 'AC_CHECK_FUNCS_ONCE', - 'AC_CHECK_HEADER', - 'AC_CHECK_HEADERS', - 'AC_CHECK_HEADERS_ONCE', - 'AC_CHECK_LIB', - 'AC_CHECK_MEMBER', - 'AC_CHECK_MEMBERS', - 'AC_CHECK_PROG', - 'AC_CHECK_PROGS', - 'AC_CHECK_SIZEOF', - 'AC_CHECK_TARGET_TOOL', - 'AC_CHECK_TARGET_TOOLS', - 'AC_CHECK_TOOL', - 'AC_CHECK_TOOLS', - 'AC_CHECK_TYPE', - 'AC_CHECK_TYPES', - 'AC_CHECKING', - 'AC_COMPILE_CHECK', - 'AC_COMPILE_IFELSE', - 'AC_COMPUTE_INT', - 'AC_CONFIG_AUX_DIR', - 'AC_CONFIG_COMMANDS', - 'AC_CONFIG_COMMANDS_POST', - 'AC_CONFIG_COMMANDS_PRE', - 'AC_CONFIG_FILES', - 'AC_CONFIG_HEADERS', - 'AC_CONFIG_ITEMS', - 'AC_CONFIG_LIBOBJ_DIR', - 'AC_CONFIG_LINKS', - 'AC_CONFIG_MACRO_DIR', - 'AC_CONFIG_SRCDIR', - 'AC_CONFIG_SUBDIRS', - 'AC_CONFIG_TESTDIR', - 'AC_CONST', - 'AC_COPYRIGHT', - 'AC_CROSS_CHECK', - 'AC_CYGWIN', - 'AC_DATAROOTDIR_CHECKED', - 'AC_DECL_SYS_SIGLIST', - 'AC_DECL_YYTEXT', - 'AC_DEFINE', - 'AC_DEFINE_UNQUOTED', - 'AC_DEFUN', - 'AC_DEFUN_ONCE', - 'AC_DIAGNOSE', - 'AC_DIR_HEADER', - 'AC_DISABLE_OPTION_CHECKING', - 'AC_DYNIX_SEQ', - 'AC_EGREP_CPP', - 'AC_EGREP_HEADER', - 'AC_EMXOS2', - 'AC_ENABLE', - 'AC_ERLANG_CHECK_LIB', - 'AC_ERLANG_NEED_ERL', - 'AC_ERLANG_NEED_ERLC', - 'AC_ERLANG_PATH_ERL', - 'AC_ERLANG_PATH_ERLC', - 'AC_ERLANG_SUBST_ERTS_VER', - 'AC_ERLANG_SUBST_INSTALL_LIB_DIR', - 'AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR', - 'AC_ERLANG_SUBST_LIB_DIR', - 'AC_ERLANG_SUBST_ROOT_DIR', - 'AC_ERROR', - 'AC_EXEEXT', - 'AC_F77_DUMMY_MAIN', - 'AC_F77_FUNC', - 'AC_F77_LIBRARY_LDFLAGS', - 'AC_F77_MAIN', - 'AC_F77_WRAPPERS', - 'AC_FATAL', - 'AC_FC_FREEFORM', - 'AC_FC_FUNC', - 'AC_FC_LIBRARY_LDFLAGS', - 'AC_FC_MAIN', - 'AC_FC_SRCEXT', - 'AC_FC_WRAPPERS', - 'AC_FIND_X', - 'AC_FIND_XTRA', - 'AC_FOREACH', - 'AC_FUNC_ALLOCA', - 'AC_FUNC_CHECK', - 'AC_FUNC_CHOWN', - 'AC_FUNC_CLOSEDIR_VOID', - 'AC_FUNC_ERROR_AT_LINE', - 'AC_FUNC_FNMATCH', - 'AC_FUNC_FNMATCH_GNU', - 'AC_FUNC_FORK', - 'AC_FUNC_FSEEKO', - 'AC_FUNC_GETGROUPS', - 'AC_FUNC_GETLOADAVG', - 'AC_FUNC_GETMNTENT', - 'AC_FUNC_GETPGRP', - 'AC_FUNC_LSTAT', - 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK', - 'AC_FUNC_MALLOC', - 'AC_FUNC_MBRTOWC', - 'AC_FUNC_MEMCMP', - 'AC_FUNC_MKTIME', - 'AC_FUNC_MMAP', - 'AC_FUNC_OBSTACK', - 'AC_FUNC_REALLOC', - 'AC_FUNC_SELECT_ARGTYPES', - 'AC_FUNC_SETPGRP', - 'AC_FUNC_SETVBUF_REVERSED', - 'AC_FUNC_STAT', - 'AC_FUNC_STRCOLL', - 'AC_FUNC_STRERROR_R', - 'AC_FUNC_STRFTIME', - 'AC_FUNC_STRNLEN', - 'AC_FUNC_STRTOD', - 'AC_FUNC_STRTOLD', - 'AC_FUNC_UTIME_NULL', - 'AC_FUNC_VPRINTF', - 'AC_FUNC_WAIT3', - 'AC_GCC_TRADITIONAL', - 'AC_GETGROUPS_T', - 'AC_GETLOADAVG', - 'AC_GNU_SOURCE', - 'AC_HAVE_FUNCS', - 'AC_HAVE_HEADERS', - 'AC_HAVE_LIBRARY', - 'AC_HAVE_POUNDBANG', - 'AC_HEADER_ASSERT', - 'AC_HEADER_CHECK', - 'AC_HEADER_DIRENT', - 'AC_HEADER_EGREP', - 'AC_HEADER_MAJOR', - 'AC_HEADER_RESOLV', - 'AC_HEADER_STAT', - 'AC_HEADER_STDBOOL', - 'AC_HEADER_STDC', - 'AC_HEADER_SYS_WAIT', - 'AC_HEADER_TIME', - 'AC_HEADER_TIOCGWINSZ', - 'AC_HELP_STRING', - 'AC_INCLUDES_DEFAULT', - 'AC_INIT', - 'AC_INLINE', - 'AC_INT_16_BITS', - 'AC_IRIX_SUN', - 'AC_ISC_POSIX', - 'AC_LANG_ASSERT', - 'AC_LANG_C', - 'AC_LANG_CALL', - 'AC_LANG_CONFTEST', - 'AC_LANG_CPLUSPLUS', - 'AC_LANG_FORTRAN77', - 'AC_LANG_FUNC_LINK_TRY', - 'AC_LANG_POP', - 'AC_LANG_PROGRAM', - 'AC_LANG_PUSH', - 'AC_LANG_RESTORE', - 'AC_LANG_SAVE', - 'AC_LANG_SOURCE', - 'AC_LANG_WERROR', - 'AC_LIBOBJ', - 'AC_LIBSOURCE', - 'AC_LIBSOURCES', - 'AC_LINK_FILES', - 'AC_LINK_IFELSE', - 'AC_LN_S', - 'AC_LONG_64_BITS', - 'AC_LONG_DOUBLE', - 'AC_LONG_FILE_NAMES', - 'AC_MAJOR_HEADER', - 'AC_MEMORY_H', - 'AC_MINGW32', - 'AC_MINIX', - 'AC_MINUS_C_MINUS_O', - 'AC_MMAP', - 'AC_MODE_T', - 'AC_MSG_CHECKING', - 'AC_MSG_ERROR', - 'AC_MSG_FAILURE', - 'AC_MSG_NOTICE', - 'AC_MSG_RESULT', - 'AC_MSG_WARN', - 'AC_OBJEXT', - 'AC_OBSOLETE', - 'AC_OFF_T', - 'AC_OPENMP', - 'AC_OUTPUT', - 'AC_OUTPUT_COMMANDS', - 'AC_PACKAGE_BUGREPORT', - 'AC_PACKAGE_NAME', - 'AC_PACKAGE_STRING', - 'AC_PACKAGE_TARNAME', - 'AC_PACKAGE_URL', - 'AC_PACKAGE_VERSION', - 'AC_PATH_PROG', - 'AC_PATH_PROGS', - 'AC_PATH_PROGS_FEATURE_CHECK', - 'AC_PATH_TARGET_TOOL', - 'AC_PATH_TOOL', - 'AC_PATH_X', - 'AC_PATH_XTRA', - 'AC_PID_T', - 'AC_PREFIX', - 'AC_PREFIX_DEFAULT', - 'AC_PREFIX_PROGRAM', - 'AC_PREPROC_IFELSE', - 'AC_PREREQ', - 'AC_PRESERVE_HELP_ORDER', - 'AC_PROG_AWK', - 'AC_PROG_CC', - 'AC_PROG_CC_C89', - 'AC_PROG_CC_C99', - 'AC_PROG_CC_C_O', - 'AC_PROG_CC_STDC', - 'AC_PROG_CPP', - 'AC_PROG_CPP_WERROR', - 'AC_PROG_CXX', - 'AC_PROG_CXX_C_O', - 'AC_PROG_CXXCPP', - 'AC_PROG_EGREP', - 'AC_PROG_F77', - 'AC_PROG_F77_C_O', - 'AC_PROG_FC', - 'AC_PROG_FC_C_O', - 'AC_PROG_FGREP', - 'AC_PROG_GCC_TRADITIONAL', - 'AC_PROG_GREP', - 'AC_PROG_INSTALL', - 'AC_PROG_LEX', - 'AC_PROG_LN_S', - 'AC_PROG_MAKE_SET', - 'AC_PROG_MKDIR_P', - 'AC_PROG_OBJC', - 'AC_PROG_OBJCPP', - 'AC_PROG_OBJCXX', - 'AC_PROG_OBJCXXCPP', - 'AC_PROG_RANLIB', - 'AC_PROG_SED', - 'AC_PROG_YACC', - 'AC_PROGRAM_CHECK', - 'AC_PROGRAM_EGREP', - 'AC_PROGRAM_PATH', - 'AC_PROGRAMS_CHECK', - 'AC_PROGRAMS_PATH', - 'AC_REMOTE_TAPE', - 'AC_REPLACE_FNMATCH', - 'AC_REPLACE_FUNCS', - 'AC_REQUIRE', - 'AC_REQUIRE_AUX_FILE', - 'AC_REQUIRE_CPP', - 'AC_RESTARTABLE_SYSCALLS', - 'AC_RETSIGTYPE', - 'AC_REVISION', - 'AC_RSH', - 'AC_RUN_IFELSE', - 'AC_SCO_INTL', - 'AC_SEARCH_LIBS', - 'AC_SET_MAKE', - 'AC_SETVBUF_REVERSED', - 'AC_SIZE_T', - 'AC_SIZEOF_TYPE', - 'AC_ST_BLKSIZE', - 'AC_ST_BLOCKS', - 'AC_ST_RDEV', - 'AC_STAT_MACROS_BROKEN', - 'AC_STDC_HEADERS', - 'AC_STRCOLL', - 'AC_STRUCT_DIRENT_D_INO', - 'AC_STRUCT_DIRENT_D_TYPE', - 'AC_STRUCT_ST_BLKSIZE', - 'AC_STRUCT_ST_BLOCKS', - 'AC_STRUCT_ST_RDEV', - 'AC_STRUCT_TIMEZONE', - 'AC_STRUCT_TM', - 'AC_SUBST', - 'AC_SUBST_FILE', - 'AC_SYS_INTERPRETER', - 'AC_SYS_LARGEFILE', - 'AC_SYS_LONG_FILE_NAMES', - 'AC_SYS_POSIX_TERMIOS', - 'AC_SYS_RESTARTABLE_SYSCALLS', - 'AC_SYS_SIGLIST_DECLARED', - 'AC_TEST_CPP', - 'AC_TEST_PROGRAM', - 'AC_TIME_WITH_SYS_TIME', - 'AC_TIMEZONE', - 'AC_TRY_ACT', - 'AC_TRY_COMPILE', - 'AC_TRY_CPP', - 'AC_TRY_LINK', - 'AC_TRY_LINK_FUNC', - 'AC_TRY_RUN', - 'AC_TYPE_GETGROUPS', - 'AC_TYPE_INT16_T', - 'AC_TYPE_INT32_T', - 'AC_TYPE_INT64_T', - 'AC_TYPE_INT8_T', - 'AC_TYPE_INTMAX_T', - 'AC_TYPE_INTPTR_T', - 'AC_TYPE_LONG_DOUBLE', - 'AC_TYPE_LONG_DOUBLE_WIDER', - 'AC_TYPE_LONG_LONG_INT', - 'AC_TYPE_MBSTATE_T', - 'AC_TYPE_MODE_T', - 'AC_TYPE_OFF_T', - 'AC_TYPE_PID_T', - 'AC_TYPE_SIGNAL', - 'AC_TYPE_SIZE_T', - 'AC_TYPE_SSIZE_T', - 'AC_TYPE_UID_T', - 'AC_TYPE_UINT16_T', - 'AC_TYPE_UINT32_T', - 'AC_TYPE_UINT64_T', - 'AC_TYPE_UINT8_T', - 'AC_TYPE_UINTMAX_T', - 'AC_TYPE_UINTPTR_T', - 'AC_TYPE_UNSIGNED_LONG_LONG_INT', - 'AC_UID_T', - 'AC_UNISTD_H', - 'AC_USE_SYSTEM_EXTENSIONS', - 'AC_USG', - 'AC_UTIME_NULL', - 'AC_VALIDATE_CACHED_SYSTEM_TUPLE', - 'AC_VERBOSE', - 'AC_VFORK', - 'AC_VPRINTF', - 'AC_WAIT3', - 'AC_WARN', - 'AC_WARNING', - 'AC_WITH', - 'AC_WORDS_BIGENDIAN', - 'AC_XENIX_DIR', - 'AC_YYTEXT_POINTER', - 'AH_BOTTOM', - 'AH_HEADER', - 'AH_TEMPLATE', - 'AH_TOP', - 'AH_VERBATIM', - 'AU_ALIAS', - 'AU_DEFUN'), - ), - 'SYMBOLS' => array('(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', ';;', '`'), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #00ffff;', - ), - 'COMMENTS' => array( - 1 => 'color: #666666;', - 2 => 'color: #339900;', - 3 => 'color: #666666;', - 'MULTI' => 'color: #ff0000; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099;', - 1 => 'color: #000099;', - 2 => 'color: #660099;', - 3 => 'color: #660099;', - 4 => 'color: #660099;', - 5 => 'color: #006699;', - 'HARD' => '', - ), - 'BRACKETS' => array( - 0 => 'color: #008000;' - ), - 'STRINGS' => array( - 0 => 'color: #996600;' - ), - 'NUMBERS' => array( - 0 => 'color: #0000dd;', - GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;', - GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', - GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', - GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;', - GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', - GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;', - GESHI_NUMBER_FLT_NONSCI => 'color:#800080;' - ), - 'METHODS' => array( - 1 => 'color: #202020;', - 2 => 'color: #202020;' - ), - 'SYMBOLS' => array( - 0 => 'color: #008000;', - 1 => 'color: #000080;', - 2 => 'color: #000040;', - 3 => 'color: #000040;', - 4 => 'color: #008080;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'COMMENTS' => array( - 'DISALLOWED_BEFORE' => '$' - ), - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "(? "(?![\.\-a-zA-Z0-9_%\\/])" - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/autohotkey.php b/_piecrust/libs/Geshi/geshi/autohotkey.php deleted file mode 100644 index de2ad79..0000000 --- a/_piecrust/libs/Geshi/geshi/autohotkey.php +++ /dev/null @@ -1,373 +0,0 @@ - 'Autohotkey', - 'COMMENT_SINGLE' => array( - 1 => ';' - ), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'while','if','and','or','else','return' - ), - 2 => array( - // built in variables - 'A_AhkPath','A_AhkVersion','A_AppData','A_AppDataCommon', - 'A_AutoTrim','A_BatchLines','A_CaretX','A_CaretY', - 'A_ComputerName','A_ControlDelay','A_Cursor','A_DD', - 'A_DDD','A_DDDD','A_DefaultMouseSpeed','A_Desktop', - 'A_DesktopCommon','A_DetectHiddenText','A_DetectHiddenWindows','A_EndChar', - 'A_EventInfo','A_ExitReason','A_FormatFloat','A_FormatInteger', - 'A_Gui','A_GuiEvent','A_GuiControl','A_GuiControlEvent', - 'A_GuiHeight','A_GuiWidth','A_GuiX','A_GuiY', - 'A_Hour','A_IconFile','A_IconHidden','A_IconNumber', - 'A_IconTip','A_Index','A_IPAddress1','A_IPAddress2', - 'A_IPAddress3','A_IPAddress4','A_ISAdmin','A_IsCompiled', - 'A_IsCritical','A_IsPaused','A_IsSuspended','A_KeyDelay', - 'A_Language','A_LastError','A_LineFile','A_LineNumber', - 'A_LoopField','A_LoopFileAttrib','A_LoopFileDir','A_LoopFileExt', - 'A_LoopFileFullPath','A_LoopFileLongPath','A_LoopFileName','A_LoopFileShortName', - 'A_LoopFileShortPath','A_LoopFileSize','A_LoopFileSizeKB','A_LoopFileSizeMB', - 'A_LoopFileTimeAccessed','A_LoopFileTimeCreated','A_LoopFileTimeModified','A_LoopReadLine', - 'A_LoopRegKey','A_LoopRegName','A_LoopRegSubkey','A_LoopRegTimeModified', - 'A_LoopRegType','A_MDAY','A_Min','A_MM', - 'A_MMM','A_MMMM','A_Mon','A_MouseDelay', - 'A_MSec','A_MyDocuments','A_Now','A_NowUTC', - 'A_NumBatchLines','A_OSType','A_OSVersion','A_PriorHotkey', - 'A_ProgramFiles','A_Programs','A_ProgramsCommon','A_ScreenHeight', - 'A_ScreenWidth','A_ScriptDir','A_ScriptFullPath','A_ScriptName', - 'A_Sec','A_Space','A_StartMenu','A_StartMenuCommon', - 'A_Startup','A_StartupCommon','A_StringCaseSense','A_Tab', - 'A_Temp','A_ThisFunc','A_ThisHotkey','A_ThisLabel', - 'A_ThisMenu','A_ThisMenuItem','A_ThisMenuItemPos','A_TickCount', - 'A_TimeIdle','A_TimeIdlePhysical','A_TimeSincePriorHotkey','A_TimeSinceThisHotkey', - 'A_TitleMatchMode','A_TitleMatchModeSpeed','A_UserName','A_WDay', - 'A_WinDelay','A_WinDir','A_WorkingDir','A_YDay', - 'A_YEAR','A_YWeek','A_YYYY','Clipboard', - 'ClipboardAll','ComSpec','ErrorLevel','ProgramFiles', - ), - 3 => array( - 'AutoTrim', - 'BlockInput','Break','Click', - 'ClipWait','Continue','Control', - 'ControlClick','ControlFocus','ControlGet', - 'ControlGetFocus','ControlGetPos','ControlGetText', - 'ControlMove','ControlSend','ControlSendRaw', - 'ControlSetText','CoordMode','Critical', - 'DetectHiddenText','DetectHiddenWindows','DllCall','Drive', - 'DriveGet','DriveSpaceFree', - 'Else','EnvAdd','EnvDiv', - 'EnvGet','EnvMult','EnvSet', - 'EnvSub','EnvUpdate','Exit', - 'ExitApp','FileAppend','FileCopy', - 'FileCopyDir','FileCreateDir','FileCreateShortcut', - 'FileDelete','FileGetAttrib','FileGetShortcut', - 'FileGetSize','FileGetTime','FileGetVersion', - 'FileInstall','FileMove','FileMoveDir', - 'FileRead','FileReadLine','FileRecycle', - 'FileRecycleEmpty','FileRemoveDir','FileSelectFile', - 'FileSelectFolder','FileSetAttrib','FileSetTime', - 'FormatTime','Gosub', - 'Goto','GroupActivate','GroupAdd', - 'GroupClose','GroupDeactivate','Gui', - 'GuiControl','GuiControlGet','Hotkey', - 'IfExist','IfGreater','IfGreaterOrEqual', - 'IfInString','IfLess','IfLessOrEqual', - 'IfMsgBox','IfNotEqual','IfNotExist', - 'IfNotInString','IfWinActive','IfWinExist', - 'IfWinNotActive','IfWinNotExist','ImageSearch', - 'IniDelete','IniRead','IniWrite', - 'Input','InputBox','KeyHistory', - 'KeyWait','ListHotkeys','ListLines', - 'ListVars','Loop', - 'Menu','MouseClick','MouseClickDrag', - 'MouseGetPos','MouseMove','MsgBox', - 'OnMessage','OnExit','OutputDebug', - 'PixelGetColor','PixelSearch','PostMessage', - 'Process','Progress','Random', - 'RegExMatch','RegExReplace','RegisterCallback', - 'RegDelete','RegRead','RegWrite', - 'Reload','Repeat','Return', - 'Run','RunAs','RunWait', - 'Send','SendEvent','SendInput', - 'SendMessage','SendMode','SendPlay', - 'SendRaw','SetBatchLines','SetCapslockState', - 'SetControlDelay','SetDefaultMouseSpeed','SetEnv', - 'SetFormat','SetKeyDelay','SetMouseDelay', - 'SetNumlockState','SetScrollLockState','SetStoreCapslockMode', - 'SetTimer','SetTitleMatchMode','SetWinDelay', - 'SetWorkingDir','Shutdown','Sleep', - 'Sort','SoundBeep','SoundGet', - 'SoundGetWaveVolume','SoundPlay','SoundSet', - 'SoundSetWaveVolume','SplashImage','SplashTextOff', - 'SplashTextOn','SplitPath','StatusBarGetText', - 'StatusBarWait','StringCaseSense','StringGetPos', - 'StringLeft','StringLen','StringLower', - 'StringMid','StringReplace','StringRight', - 'StringSplit','StringTrimLeft','StringTrimRight', - 'StringUpper','Suspend','SysGet', - 'Thread','ToolTip','Transform', - 'TrayTip','URLDownloadToFile','While', - 'VarSetCapacity', - 'WinActivate','WinActivateBottom','WinClose', - 'WinGet','WinGetActiveStats','WinGetActiveTitle', - 'WinGetClass','WinGetPos','WinGetText', - 'WinGetTitle','WinHide','WinKill', - 'WinMaximize','WinMenuSelectItem','WinMinimize', - 'WinMinimizeAll','WinMinimizeAllUndo','WinMove', - 'WinRestore','WinSet','WinSetTitle', - 'WinShow','WinWait','WinWaitActive', - 'WinWaitClose','WinWaitNotActive' - ), - 4 => array( - 'Abs','ACos','Asc','ASin', - 'ATan','Ceil','Chr','Cos', - 'Exp','FileExist','Floor', - 'GetKeyState','IL_Add','IL_Create','IL_Destroy', - 'InStr','IsFunc','IsLabel','Ln', - 'Log','LV_Add','LV_Delete','LV_DeleteCol', - 'LV_GetCount','LV_GetNext','LV_GetText','LV_Insert', - 'LV_InsertCol','LV_Modify','LV_ModifyCol','LV_SetImageList', - 'Mod','NumGet','NumPut', - 'Round', - 'SB_SetIcon','SB_SetParts','SB_SetText','Sin', - 'Sqrt','StrLen','SubStr','Tan', - 'TV_Add','TV_Delete','TV_GetChild','TV_GetCount', - 'TV_GetNext','TV_Get','TV_GetParent','TV_GetPrev', - 'TV_GetSelection','TV_GetText','TV_Modify', - 'WinActive','WinExist' - ), - 5 => array( - // #Directives - 'AllowSameLineComments','ClipboardTimeout','CommentFlag', - 'ErrorStdOut','EscapeChar','HotkeyInterval', - 'HotkeyModifierTimeout','Hotstring','IfWinActive', - 'IfWinExist','IfWinNotActive','IfWinNotExist', - 'Include','IncludeAgain','InstallKeybdHook', - 'InstallMouseHook','KeyHistory','LTrim', - 'MaxHotkeysPerInterval','MaxMem','MaxThreads', - 'MaxThreadsBuffer','MaxThreadsPerHotkey','NoEnv', - 'NoTrayIcon','Persistent','SingleInstance', - 'UseHook','WinActivateForce' - ), - 6 => array( - 'Shift','LShift','RShift', - 'Alt','LAlt','RAlt', - 'LControl','RControl', - 'Ctrl','LCtrl','RCtrl', - 'LWin','RWin','AppsKey', - 'AltDown','AltUp','ShiftDown', - 'ShiftUp','CtrlDown','CtrlUp', - 'LWinDown','LWinUp','RWinDown', - 'RWinUp','LButton','RButton', - 'MButton','WheelUp','WheelDown', - 'WheelLeft','WheelRight','XButton1', - 'XButton2','Joy1','Joy2', - 'Joy3','Joy4','Joy5', - 'Joy6','Joy7','Joy8', - 'Joy9','Joy10','Joy11', - 'Joy12','Joy13','Joy14', - 'Joy15','Joy16','Joy17', - 'Joy18','Joy19','Joy20', - 'Joy21','Joy22','Joy23', - 'Joy24','Joy25','Joy26', - 'Joy27','Joy28','Joy29', - 'Joy30','Joy31','Joy32', - 'JoyX','JoyY','JoyZ', - 'JoyR','JoyU','JoyV', - 'JoyPOV','JoyName','JoyButtons', - 'JoyAxes','JoyInfo','Space', - 'Tab','Enter', - 'Escape','Esc','BackSpace', - 'BS','Delete','Del', - 'Insert','Ins','PGUP', - 'PGDN','Home','End', - 'Up','Down','Left', - 'Right','PrintScreen','CtrlBreak', - 'Pause','ScrollLock','CapsLock', - 'NumLock','Numpad0','Numpad1', - 'Numpad2','Numpad3','Numpad4', - 'Numpad5','Numpad6','Numpad7', - 'Numpad8','Numpad9','NumpadMult', - 'NumpadAdd','NumpadSub','NumpadDiv', - 'NumpadDot','NumpadDel','NumpadIns', - 'NumpadClear','NumpadUp','NumpadDown', - 'NumpadLeft','NumpadRight','NumpadHome', - 'NumpadEnd','NumpadPgup','NumpadPgdn', - 'NumpadEnter','F1','F2', - 'F3','F4','F5', - 'F6','F7','F8', - 'F9','F10','F11', - 'F12','F13','F14', - 'F15','F16','F17', - 'F18','F19','F20', - 'F21','F22','F23', - 'F24','Browser_Back','Browser_Forward', - 'Browser_Refresh','Browser_Stop','Browser_Search', - 'Browser_Favorites','Browser_Home','Volume_Mute', - 'Volume_Down','Volume_Up','Media_Next', - 'Media_Prev','Media_Stop','Media_Play_Pause', - 'Launch_Mail','Launch_Media','Launch_App1', - 'Launch_App2' - ), - 7 => array( - // Gui commands - 'Add', - 'Show', 'Submit', 'Cancel', 'Destroy', - 'Font', 'Color', 'Margin', 'Flash', 'Default', - 'GuiEscape','GuiClose','GuiSize','GuiContextMenu','GuiDropFilesTabStop', - ), - 8 => array( - // Gui Controls - 'Button', - 'Checkbox','Radio','DropDownList','DDL', - 'ComboBox','ListBox','ListView', - 'Text', 'Edit', 'UpDown', 'Picture', - 'TreeView','DateTime', 'MonthCal', - 'Slider' - ) - ), - 'SYMBOLS' => array( - '(',')','[',']', - '+','-','*','/','&','^', - '=','+=','-=','*=','/=','&=', - '==','<','<=','>','>=',':=', - ',','.' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false, - 7 => false, - 8 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #AAAAFF; font-weight: bold;', // reserved #blue - 2 => 'color: #88FF88;', // BIV yellow - 3 => 'color: #FF00FF; font-style: italic;', // commands purple - 4 => 'color: #888844; font-weight: bold;', // functions #0080FF - 5 => 'color: #000000; font-style: italic;', // directives #black - 6 => 'color: #FF0000; font-style: italic;', // hotkeys #red - 7 => 'color: #000000; font-style: italic;', // gui commands #black - 8 => 'color: #000000; font-style: italic;' // gui controls - ), - 'COMMENTS' => array( - 'MULTI' => 'font-style: italic; color: #669900;', - 1 => 'font-style: italic; color: #009933;' - ), - 'ESCAPE_CHAR' => array( - 0 => '' - ), - 'BRACKETS' => array( - 0 => 'color: #00FF00; font-weight: bold;' - ), - 'STRINGS' => array( - 0 => 'font-weight: bold; color: #008080;' - ), - 'NUMBERS' => array( - 0 => 'color: #0000dd;' - ), - 'METHODS' => array( - 1 => 'color: #0000FF; font-style: italic; font-weight: italic;' - ), - 'SYMBOLS' => array( - 0 => 'color: #000000; font-weight: italic;' - ), - 'REGEXPS' => array( - 0 => 'font-weight: italic; color: #A00A0;', - 1 => 'color: #CC0000; font-style: italic;', - 2 => 'color: #DD0000; font-style: italic;', - 3 => 'color: #88FF88;' - ), - 'SCRIPT' => array( - ) - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - 1 => '_' - ), - 'REGEXPS' => array( - //Variables - 0 => '%[a-zA-Z_][a-zA-Z0-9_]*%', - //hotstrings - 1 => '::[\w\d]+::', - //labels - 2 => '\w[\w\d]+:\s', - //Built-in Variables - 3 => '\bA_\w+\b(?![^<]*>)' - ), - 'URLS' => array( - 1 => '', - 2 => 'http://www.autohotkey.com/docs/Variables.htm#{FNAME}', - 3 => 'http://www.autohotkey.com/docs/commands/{FNAME}.htm', - 4 => 'http://www.autohotkey.com/docs/Functions.htm#BuiltIn', - 5 => 'http://www.autohotkey.com/docs/commands/_{FNAME}.htm', - 6 => '', - 7 => 'http://www.autohotkey.com/docs/commands/Gui.htm#{FNAME}', - 8 => 'http://www.autohotkey.com/docs/commands/GuiControls.htm#{FNAME}' - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - 1 => true, - 2 => true, - 3 => true - ), - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 5 => array( - 'DISALLOWED_BEFORE' => '(? \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/autoit.php b/_piecrust/libs/Geshi/geshi/autoit.php deleted file mode 100644 index b51bd27..0000000 --- a/_piecrust/libs/Geshi/geshi/autoit.php +++ /dev/null @@ -1,1175 +0,0 @@ - 'AutoIt', - 'COMMENT_SINGLE' => array(';'), - 'COMMENT_MULTI' => array( - '#comments-start' => '#comments-end', - '#cs' => '#ce'), - 'COMMENT_REGEXP' => array( - 0 => '/(? '/(?<=include)\s+<.*?>/' - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'And','ByRef','Case','Const','ContinueCase','ContinueLoop', - 'Default','Dim','Do','Else','ElseIf','EndFunc','EndIf','EndSelect', - 'EndSwitch','EndWith','Enum','Exit','ExitLoop','False','For','Func', - 'Global','If','In','Local','Next','Not','Or','ReDim','Return', - 'Select','Step','Switch','Then','To','True','Until','WEnd','While', - 'With' - ), - 2 => array( - '@AppDataCommonDir','@AppDataDir','@AutoItExe','@AutoItPID', - '@AutoItUnicode','@AutoItVersion','@AutoItX64','@COM_EventObj', - '@CommonFilesDir','@Compiled','@ComputerName','@ComSpec','@CR', - '@CRLF','@DesktopCommonDir','@DesktopDepth','@DesktopDir', - '@DesktopHeight','@DesktopRefresh','@DesktopWidth', - '@DocumentsCommonDir','@error','@exitCode','@exitMethod', - '@extended','@FavoritesCommonDir','@FavoritesDir','@GUI_CtrlHandle', - '@GUI_CtrlId','@GUI_DragFile','@GUI_DragId','@GUI_DropId', - '@GUI_WinHandle','@HomeDrive','@HomePath','@HomeShare', - '@HotKeyPressed','@HOUR','@InetGetActive','@InetGetBytesRead', - '@IPAddress1','@IPAddress2','@IPAddress3','@IPAddress4','@KBLayout', - '@LF','@LogonDNSDomain','@LogonDomain','@LogonServer','@MDAY', - '@MIN','@MON','@MyDocumentsDir','@NumParams','@OSBuild','@OSLang', - '@OSServicePack','@OSTYPE','@OSVersion','@ProcessorArch', - '@ProgramFilesDir','@ProgramsCommonDir','@ProgramsDir','@ScriptDir', - '@ScriptFullPath','@ScriptLineNumber','@ScriptName','@SEC', - '@StartMenuCommonDir','@StartMenuDir','@StartupCommonDir', - '@StartupDir','@SW_DISABLE','@SW_ENABLE','@SW_HIDE','@SW_LOCK', - '@SW_MAXIMIZE','@SW_MINIMIZE','@SW_RESTORE','@SW_SHOW', - '@SW_SHOWDEFAULT','@SW_SHOWMAXIMIZED','@SW_SHOWMINIMIZED', - '@SW_SHOWMINNOACTIVE','@SW_SHOWNA','@SW_SHOWNOACTIVATE', - '@SW_SHOWNORMAL','@SW_UNLOCK','@SystemDir','@TAB','@TempDir', - '@TRAY_ID','@TrayIconFlashing','@TrayIconVisible','@UserName', - '@UserProfileDir','@WDAY','@WindowsDir','@WorkingDir','@YDAY', - '@YEAR' - ), - 3 => array( - 'Abs','ACos','AdlibDisable','AdlibEnable','Asc','AscW','ASin', - 'Assign','ATan','AutoItSetOption','AutoItWinGetTitle', - 'AutoItWinSetTitle','Beep','Binary','BinaryLen','BinaryMid', - 'BinaryToString','BitAND','BitNOT','BitOR','BitRotate','BitShift', - 'BitXOR','BlockInput','Break','Call','CDTray','Ceiling','Chr', - 'ChrW','ClipGet','ClipPut','ConsoleRead','ConsoleWrite', - 'ConsoleWriteError','ControlClick','ControlCommand', - 'ControlDisable','ControlEnable','ControlFocus','ControlGetFocus', - 'ControlGetHandle','ControlGetPos','ControlGetText','ControlHide', - 'ControlListView','ControlMove','ControlSend','ControlSetText', - 'ControlShow','ControlTreeView','Cos','Dec','DirCopy','DirCreate', - 'DirGetSize','DirMove','DirRemove','DllCall','DllCallbackFree', - 'DllCallbackGetPtr','DllCallbackRegister','DllClose','DllOpen', - 'DllStructCreate','DllStructGetData','DllStructGetPtr', - 'DllStructGetSize','DllStructSetData','DriveGetDrive', - 'DriveGetFileSystem','DriveGetLabel','DriveGetSerial', - 'DriveGetType','DriveMapAdd','DriveMapDel','DriveMapGet', - 'DriveSetLabel','DriveSpaceFree','DriveSpaceTotal','DriveStatus', - 'EnvGet','EnvSet','EnvUpdate','Eval','Execute','Exp', - 'FileChangeDir','FileClose','FileCopy','FileCreateNTFSLink', - 'FileCreateShortcut','FileDelete','FileExists','FileFindFirstFile', - 'FileFindNextFile','FileGetAttrib','FileGetLongName', - 'FileGetShortcut','FileGetShortName','FileGetSize','FileGetTime', - 'FileGetVersion','FileInstall','FileMove','FileOpen', - 'FileOpenDialog','FileRead','FileReadLine','FileRecycle', - 'FileRecycleEmpty','FileSaveDialog','FileSelectFolder', - 'FileSetAttrib','FileSetTime','FileWrite','FileWriteLine','Floor', - 'FtpSetProxy','GUICreate','GUICtrlCreateAvi','GUICtrlCreateButton', - 'GUICtrlCreateCheckbox','GUICtrlCreateCombo', - 'GUICtrlCreateContextMenu','GUICtrlCreateDate','GUICtrlCreateDummy', - 'GUICtrlCreateEdit','GUICtrlCreateGraphic','GUICtrlCreateGroup', - 'GUICtrlCreateIcon','GUICtrlCreateInput','GUICtrlCreateLabel', - 'GUICtrlCreateList','GUICtrlCreateListView', - 'GUICtrlCreateListViewItem','GUICtrlCreateMenu', - 'GUICtrlCreateMenuItem','GUICtrlCreateMonthCal','GUICtrlCreateObj', - 'GUICtrlCreatePic','GUICtrlCreateProgress','GUICtrlCreateRadio', - 'GUICtrlCreateSlider','GUICtrlCreateTab','GUICtrlCreateTabItem', - 'GUICtrlCreateTreeView','GUICtrlCreateTreeViewItem', - 'GUICtrlCreateUpdown','GUICtrlDelete','GUICtrlGetHandle', - 'GUICtrlGetState','GUICtrlRead','GUICtrlRecvMsg', - 'GUICtrlRegisterListViewSort','GUICtrlSendMsg','GUICtrlSendToDummy', - 'GUICtrlSetBkColor','GUICtrlSetColor','GUICtrlSetCursor', - 'GUICtrlSetData','GUICtrlSetFont','GUICtrlSetDefColor', - 'GUICtrlSetDefBkColor','GUICtrlSetGraphic','GUICtrlSetImage', - 'GUICtrlSetLimit','GUICtrlSetOnEvent','GUICtrlSetPos', - 'GUICtrlSetResizing','GUICtrlSetState','GUICtrlSetStyle', - 'GUICtrlSetTip','GUIDelete','GUIGetCursorInfo','GUIGetMsg', - 'GUIGetStyle','GUIRegisterMsg','GUISetAccelerators()', - 'GUISetBkColor','GUISetCoord','GUISetCursor','GUISetFont', - 'GUISetHelp','GUISetIcon','GUISetOnEvent','GUISetState', - 'GUISetStyle','GUIStartGroup','GUISwitch','Hex','HotKeySet', - 'HttpSetProxy','HWnd','InetGet','InetGetSize','IniDelete','IniRead', - 'IniReadSection','IniReadSectionNames','IniRenameSection', - 'IniWrite','IniWriteSection','InputBox','Int','IsAdmin','IsArray', - 'IsBinary','IsBool','IsDeclared','IsDllStruct','IsFloat','IsHWnd', - 'IsInt','IsKeyword','IsNumber','IsObj','IsPtr','IsString','Log', - 'MemGetStats','Mod','MouseClick','MouseClickDrag','MouseDown', - 'MouseGetCursor','MouseGetPos','MouseMove','MouseUp','MouseWheel', - 'MsgBox','Number','ObjCreate','ObjEvent','ObjGet','ObjName','Opt', - 'Ping','PixelChecksum','PixelGetColor','PixelSearch','PluginClose', - 'PluginOpen','ProcessClose','ProcessExists','ProcessGetStats', - 'ProcessList','ProcessSetPriority','ProcessWait','ProcessWaitClose', - 'ProgressOff','ProgressOn','ProgressSet','Ptr','Random','RegDelete', - 'RegEnumKey','RegEnumVal','RegRead','RegWrite','Round','Run', - 'RunAs','RunAsWait','RunWait','Send','SendKeepActive','SetError', - 'SetExtended','ShellExecute','ShellExecuteWait','Shutdown','Sin', - 'Sleep','SoundPlay','SoundSetWaveVolume','SplashImageOn', - 'SplashOff','SplashTextOn','Sqrt','SRandom','StatusbarGetText', - 'StderrRead','StdinWrite','StdioClose','StdoutRead','String', - 'StringAddCR','StringCompare','StringFormat','StringInStr', - 'StringIsAlNum','StringIsAlpha','StringIsASCII','StringIsDigit', - 'StringIsFloat','StringIsInt','StringIsLower','StringIsSpace', - 'StringIsUpper','StringIsXDigit','StringLeft','StringLen', - 'StringLower','StringMid','StringRegExp','StringRegExpReplace', - 'StringReplace','StringRight','StringSplit','StringStripCR', - 'StringStripWS','StringToBinary','StringTrimLeft','StringTrimRight', - 'StringUpper','Tan','TCPAccept','TCPCloseSocket','TCPConnect', - 'TCPListen','TCPNameToIP','TCPRecv','TCPSend','TCPShutdown', - 'TCPStartup','TimerDiff','TimerInit','ToolTip','TrayCreateItem', - 'TrayCreateMenu','TrayGetMsg','TrayItemDelete','TrayItemGetHandle', - 'TrayItemGetState','TrayItemGetText','TrayItemSetOnEvent', - 'TrayItemSetState','TrayItemSetText','TraySetClick','TraySetIcon', - 'TraySetOnEvent','TraySetPauseIcon','TraySetState','TraySetToolTip', - 'TrayTip','UBound','UDPBind','UDPCloseSocket','UDPOpen','UDPRecv', - 'UDPSend','UDPShutdown','UDPStartup','VarGetType','WinActivate', - 'WinActive','WinClose','WinExists','WinFlash','WinGetCaretPos', - 'WinGetClassList','WinGetClientSize','WinGetHandle','WinGetPos', - 'WinGetProcess','WinGetState','WinGetText','WinGetTitle','WinKill', - 'WinList','WinMenuSelectItem','WinMinimizeAll','WinMinimizeAllUndo', - 'WinMove','WinSetOnTop','WinSetState','WinSetTitle','WinSetTrans', - 'WinWait','WinWaitActive','WinWaitClose','WinWaitNotActive' - ), - 4 => array( - 'ArrayAdd','ArrayBinarySearch','ArrayConcatenate','ArrayDelete', - 'ArrayDisplay','ArrayFindAll','ArrayInsert','ArrayMax', - 'ArrayMaxIndex','ArrayMin','ArrayMinIndex','ArrayPop','ArrayPush', - 'ArrayReverse','ArraySearch','ArraySort','ArraySwap','ArrayToClip', - 'ArrayToString','ArrayTrim','ChooseColor','ChooseFont', - 'ClipBoard_ChangeChain','ClipBoard_Close','ClipBoard_CountFormats', - 'ClipBoard_Empty','ClipBoard_EnumFormats','ClipBoard_FormatStr', - 'ClipBoard_GetData','ClipBoard_GetDataEx','ClipBoard_GetFormatName', - 'ClipBoard_GetOpenWindow','ClipBoard_GetOwner', - 'ClipBoard_GetPriorityFormat','ClipBoard_GetSequenceNumber', - 'ClipBoard_GetViewer','ClipBoard_IsFormatAvailable', - 'ClipBoard_Open','ClipBoard_RegisterFormat','ClipBoard_SetData', - 'ClipBoard_SetDataEx','ClipBoard_SetViewer','ClipPutFile', - 'ColorConvertHSLtoRGB','ColorConvertRGBtoHSL','ColorGetBlue', - 'ColorGetGreen','ColorGetRed','Date_Time_CompareFileTime', - 'Date_Time_DOSDateTimeToArray','Date_Time_DOSDateTimeToFileTime', - 'Date_Time_DOSDateTimeToStr','Date_Time_DOSDateToArray', - 'Date_Time_DOSDateToStr','Date_Time_DOSTimeToArray', - 'Date_Time_DOSTimeToStr','Date_Time_EncodeFileTime', - 'Date_Time_EncodeSystemTime','Date_Time_FileTimeToArray', - 'Date_Time_FileTimeToDOSDateTime', - 'Date_Time_FileTimeToLocalFileTime','Date_Time_FileTimeToStr', - 'Date_Time_FileTimeToSystemTime','Date_Time_GetFileTime', - 'Date_Time_GetLocalTime','Date_Time_GetSystemTime', - 'Date_Time_GetSystemTimeAdjustment', - 'Date_Time_GetSystemTimeAsFileTime', - 'Date_Time_GetSystemTimes','Date_Time_GetTickCount', - 'Date_Time_GetTimeZoneInformation', - 'Date_Time_LocalFileTimeToFileTime','Date_Time_SetFileTime', - 'Date_Time_SetLocalTime','Date_Time_SetSystemTime', - 'Date_Time_SetSystemTimeAdjustment', - 'Date_Time_SetTimeZoneInformation','Date_Time_SystemTimeToArray', - 'Date_Time_SystemTimeToDateStr','Date_Time_SystemTimeToDateTimeStr', - 'Date_Time_SystemTimeToFileTime','Date_Time_SystemTimeToTimeStr', - 'Date_Time_SystemTimeToTzSpecificLocalTime', - 'Date_Time_TzSpecificLocalTimeToSystemTime','DateAdd', - 'DateDayOfWeek','DateDaysInMonth','DateDiff','DateIsLeapYear', - 'DateIsValid','DateTimeFormat','DateTimeSplit','DateToDayOfWeek', - 'DateToDayOfWeekISO','DateToDayValue','DateToMonth', - 'DayValueToDate','DebugBugReportEnv','DebugOut','DebugSetup', - 'Degree','EventLog__Backup','EventLog__Clear','EventLog__Close', - 'EventLog__Count','EventLog__DeregisterSource','EventLog__Full', - 'EventLog__Notify','EventLog__Oldest','EventLog__Open', - 'EventLog__OpenBackup','EventLog__Read','EventLog__RegisterSource', - 'EventLog__Report','FileCountLines','FileCreate','FileListToArray', - 'FilePrint','FileReadToArray','FileWriteFromArray', - 'FileWriteLog','FileWriteToLine','GDIPlus_ArrowCapCreate', - 'GDIPlus_ArrowCapDispose','GDIPlus_ArrowCapGetFillState', - 'GDIPlus_ArrowCapGetHeight','GDIPlus_ArrowCapGetMiddleInset', - 'GDIPlus_ArrowCapGetWidth','GDIPlus_ArrowCapSetFillState', - 'GDIPlus_ArrowCapSetHeight','GDIPlus_ArrowCapSetMiddleInset', - 'GDIPlus_ArrowCapSetWidth','GDIPlus_BitmapCloneArea', - 'GDIPlus_BitmapCreateFromFile','GDIPlus_BitmapCreateFromGraphics', - 'GDIPlus_BitmapCreateFromHBITMAP', - 'GDIPlus_BitmapCreateHBITMAPFromBitmap','GDIPlus_BitmapDispose', - 'GDIPlus_BitmapLockBits','GDIPlus_BitmapUnlockBits', - 'GDIPlus_BrushClone','GDIPlus_BrushCreateSolid', - 'GDIPlus_BrushDispose','GDIPlus_BrushGetType', - 'GDIPlus_CustomLineCapDispose','GDIPlus_Decoders', - 'GDIPlus_DecodersGetCount','GDIPlus_DecodersGetSize', - 'GDIPlus_Encoders','GDIPlus_EncodersGetCLSID', - 'GDIPlus_EncodersGetCount','GDIPlus_EncodersGetParamList', - 'GDIPlus_EncodersGetParamListSize','GDIPlus_EncodersGetSize', - 'GDIPlus_FontCreate','GDIPlus_FontDispose', - 'GDIPlus_FontFamilyCreate','GDIPlus_FontFamilyDispose', - 'GDIPlus_GraphicsClear','GDIPlus_GraphicsCreateFromHDC', - 'GDIPlus_GraphicsCreateFromHWND','GDIPlus_GraphicsDispose', - 'GDIPlus_GraphicsDrawArc','GDIPlus_GraphicsDrawBezier', - 'GDIPlus_GraphicsDrawClosedCurve','GDIPlus_GraphicsDrawCurve', - 'GDIPlus_GraphicsDrawEllipse','GDIPlus_GraphicsDrawImage', - 'GDIPlus_GraphicsDrawImageRect','GDIPlus_GraphicsDrawImageRectRect', - 'GDIPlus_GraphicsDrawLine','GDIPlus_GraphicsDrawPie', - 'GDIPlus_GraphicsDrawPolygon','GDIPlus_GraphicsDrawRect', - 'GDIPlus_GraphicsDrawString','GDIPlus_GraphicsDrawStringEx', - 'GDIPlus_GraphicsFillClosedCurve','GDIPlus_GraphicsFillEllipse', - 'GDIPlus_GraphicsFillPie','GDIPlus_GraphicsFillRect', - 'GDIPlus_GraphicsGetDC','GDIPlus_GraphicsGetSmoothingMode', - 'GDIPlus_GraphicsMeasureString','GDIPlus_GraphicsReleaseDC', - 'GDIPlus_GraphicsSetSmoothingMode','GDIPlus_GraphicsSetTransform', - 'GDIPlus_ImageDispose','GDIPlus_ImageGetGraphicsContext', - 'GDIPlus_ImageGetHeight','GDIPlus_ImageGetWidth', - 'GDIPlus_ImageLoadFromFile','GDIPlus_ImageSaveToFile', - 'GDIPlus_ImageSaveToFileEx','GDIPlus_MatrixCreate', - 'GDIPlus_MatrixDispose','GDIPlus_MatrixRotate','GDIPlus_ParamAdd', - 'GDIPlus_ParamInit','GDIPlus_PenCreate','GDIPlus_PenDispose', - 'GDIPlus_PenGetAlignment','GDIPlus_PenGetColor', - 'GDIPlus_PenGetCustomEndCap','GDIPlus_PenGetDashCap', - 'GDIPlus_PenGetDashStyle','GDIPlus_PenGetEndCap', - 'GDIPlus_PenGetWidth','GDIPlus_PenSetAlignment', - 'GDIPlus_PenSetColor','GDIPlus_PenSetCustomEndCap', - 'GDIPlus_PenSetDashCap','GDIPlus_PenSetDashStyle', - 'GDIPlus_PenSetEndCap','GDIPlus_PenSetWidth','GDIPlus_RectFCreate', - 'GDIPlus_Shutdown','GDIPlus_Startup','GDIPlus_StringFormatCreate', - 'GDIPlus_StringFormatDispose','GetIP','GUICtrlAVI_Close', - 'GUICtrlAVI_Create','GUICtrlAVI_Destroy','GUICtrlAVI_Open', - 'GUICtrlAVI_OpenEx','GUICtrlAVI_Play','GUICtrlAVI_Seek', - 'GUICtrlAVI_Show','GUICtrlAVI_Stop','GUICtrlButton_Click', - 'GUICtrlButton_Create','GUICtrlButton_Destroy', - 'GUICtrlButton_Enable','GUICtrlButton_GetCheck', - 'GUICtrlButton_GetFocus','GUICtrlButton_GetIdealSize', - 'GUICtrlButton_GetImage','GUICtrlButton_GetImageList', - 'GUICtrlButton_GetState','GUICtrlButton_GetText', - 'GUICtrlButton_GetTextMargin','GUICtrlButton_SetCheck', - 'GUICtrlButton_SetFocus','GUICtrlButton_SetImage', - 'GUICtrlButton_SetImageList','GUICtrlButton_SetSize', - 'GUICtrlButton_SetState','GUICtrlButton_SetStyle', - 'GUICtrlButton_SetText','GUICtrlButton_SetTextMargin', - 'GUICtrlButton_Show','GUICtrlComboBox_AddDir', - 'GUICtrlComboBox_AddString','GUICtrlComboBox_AutoComplete', - 'GUICtrlComboBox_BeginUpdate','GUICtrlComboBox_Create', - 'GUICtrlComboBox_DeleteString','GUICtrlComboBox_Destroy', - 'GUICtrlComboBox_EndUpdate','GUICtrlComboBox_FindString', - 'GUICtrlComboBox_FindStringExact','GUICtrlComboBox_GetComboBoxInfo', - 'GUICtrlComboBox_GetCount','GUICtrlComboBox_GetCurSel', - 'GUICtrlComboBox_GetDroppedControlRect', - 'GUICtrlComboBox_GetDroppedControlRectEx', - 'GUICtrlComboBox_GetDroppedState','GUICtrlComboBox_GetDroppedWidth', - 'GUICtrlComboBox_GetEditSel','GUICtrlComboBox_GetEditText', - 'GUICtrlComboBox_GetExtendedUI', - 'GUICtrlComboBox_GetHorizontalExtent', - 'GUICtrlComboBox_GetItemHeight','GUICtrlComboBox_GetLBText', - 'GUICtrlComboBox_GetLBTextLen','GUICtrlComboBox_GetList', - 'GUICtrlComboBox_GetListArray','GUICtrlComboBox_GetLocale', - 'GUICtrlComboBox_GetLocaleCountry','GUICtrlComboBox_GetLocaleLang', - 'GUICtrlComboBox_GetLocalePrimLang', - 'GUICtrlComboBox_GetLocaleSubLang','GUICtrlComboBox_GetMinVisible', - 'GUICtrlComboBox_GetTopIndex','GUICtrlComboBox_InitStorage', - 'GUICtrlComboBox_InsertString','GUICtrlComboBox_LimitText', - 'GUICtrlComboBox_ReplaceEditSel','GUICtrlComboBox_ResetContent', - 'GUICtrlComboBox_SelectString','GUICtrlComboBox_SetCurSel', - 'GUICtrlComboBox_SetDroppedWidth','GUICtrlComboBox_SetEditSel', - 'GUICtrlComboBox_SetEditText','GUICtrlComboBox_SetExtendedUI', - 'GUICtrlComboBox_SetHorizontalExtent', - 'GUICtrlComboBox_SetItemHeight','GUICtrlComboBox_SetMinVisible', - 'GUICtrlComboBox_SetTopIndex','GUICtrlComboBox_ShowDropDown', - 'GUICtrlComboBoxEx_AddDir','GUICtrlComboBoxEx_AddString', - 'GUICtrlComboBoxEx_BeginUpdate','GUICtrlComboBoxEx_Create', - 'GUICtrlComboBoxEx_CreateSolidBitMap', - 'GUICtrlComboBoxEx_DeleteString','GUICtrlComboBoxEx_Destroy', - 'GUICtrlComboBoxEx_EndUpdate','GUICtrlComboBoxEx_FindStringExact', - 'GUICtrlComboBoxEx_GetComboBoxInfo', - 'GUICtrlComboBoxEx_GetComboControl','GUICtrlComboBoxEx_GetCount', - 'GUICtrlComboBoxEx_GetCurSel', - 'GUICtrlComboBoxEx_GetDroppedControlRect', - 'GUICtrlComboBoxEx_GetDroppedControlRectEx', - 'GUICtrlComboBoxEx_GetDroppedState', - 'GUICtrlComboBoxEx_GetDroppedWidth', - 'GUICtrlComboBoxEx_GetEditControl','GUICtrlComboBoxEx_GetEditSel', - 'GUICtrlComboBoxEx_GetEditText', - 'GUICtrlComboBoxEx_GetExtendedStyle', - 'GUICtrlComboBoxEx_GetExtendedUI','GUICtrlComboBoxEx_GetImageList', - 'GUICtrlComboBoxEx_GetItem','GUICtrlComboBoxEx_GetItemEx', - 'GUICtrlComboBoxEx_GetItemHeight','GUICtrlComboBoxEx_GetItemImage', - 'GUICtrlComboBoxEx_GetItemIndent', - 'GUICtrlComboBoxEx_GetItemOverlayImage', - 'GUICtrlComboBoxEx_GetItemParam', - 'GUICtrlComboBoxEx_GetItemSelectedImage', - 'GUICtrlComboBoxEx_GetItemText','GUICtrlComboBoxEx_GetItemTextLen', - 'GUICtrlComboBoxEx_GetList','GUICtrlComboBoxEx_GetListArray', - 'GUICtrlComboBoxEx_GetLocale','GUICtrlComboBoxEx_GetLocaleCountry', - 'GUICtrlComboBoxEx_GetLocaleLang', - 'GUICtrlComboBoxEx_GetLocalePrimLang', - 'GUICtrlComboBoxEx_GetLocaleSubLang', - 'GUICtrlComboBoxEx_GetMinVisible','GUICtrlComboBoxEx_GetTopIndex', - 'GUICtrlComboBoxEx_InitStorage','GUICtrlComboBoxEx_InsertString', - 'GUICtrlComboBoxEx_LimitText','GUICtrlComboBoxEx_ReplaceEditSel', - 'GUICtrlComboBoxEx_ResetContent','GUICtrlComboBoxEx_SetCurSel', - 'GUICtrlComboBoxEx_SetDroppedWidth','GUICtrlComboBoxEx_SetEditSel', - 'GUICtrlComboBoxEx_SetEditText', - 'GUICtrlComboBoxEx_SetExtendedStyle', - 'GUICtrlComboBoxEx_SetExtendedUI','GUICtrlComboBoxEx_SetImageList', - 'GUICtrlComboBoxEx_SetItem','GUICtrlComboBoxEx_SetItemEx', - 'GUICtrlComboBoxEx_SetItemHeight','GUICtrlComboBoxEx_SetItemImage', - 'GUICtrlComboBoxEx_SetItemIndent', - 'GUICtrlComboBoxEx_SetItemOverlayImage', - 'GUICtrlComboBoxEx_SetItemParam', - 'GUICtrlComboBoxEx_SetItemSelectedImage', - 'GUICtrlComboBoxEx_SetMinVisible','GUICtrlComboBoxEx_SetTopIndex', - 'GUICtrlComboBoxEx_ShowDropDown','GUICtrlDTP_Create', - 'GUICtrlDTP_Destroy','GUICtrlDTP_GetMCColor','GUICtrlDTP_GetMCFont', - 'GUICtrlDTP_GetMonthCal','GUICtrlDTP_GetRange', - 'GUICtrlDTP_GetRangeEx','GUICtrlDTP_GetSystemTime', - 'GUICtrlDTP_GetSystemTimeEx','GUICtrlDTP_SetFormat', - 'GUICtrlDTP_SetMCColor','GUICtrlDTP_SetMCFont', - 'GUICtrlDTP_SetRange','GUICtrlDTP_SetRangeEx', - 'GUICtrlDTP_SetSystemTime','GUICtrlDTP_SetSystemTimeEx', - 'GUICtrlEdit_AppendText','GUICtrlEdit_BeginUpdate', - 'GUICtrlEdit_CanUndo','GUICtrlEdit_CharFromPos', - 'GUICtrlEdit_Create','GUICtrlEdit_Destroy', - 'GUICtrlEdit_EmptyUndoBuffer','GUICtrlEdit_EndUpdate', - 'GUICtrlEdit_Find','GUICtrlEdit_FmtLines', - 'GUICtrlEdit_GetFirstVisibleLine','GUICtrlEdit_GetLimitText', - 'GUICtrlEdit_GetLine','GUICtrlEdit_GetLineCount', - 'GUICtrlEdit_GetMargins','GUICtrlEdit_GetModify', - 'GUICtrlEdit_GetPasswordChar','GUICtrlEdit_GetRECT', - 'GUICtrlEdit_GetRECTEx','GUICtrlEdit_GetSel','GUICtrlEdit_GetText', - 'GUICtrlEdit_GetTextLen','GUICtrlEdit_HideBalloonTip', - 'GUICtrlEdit_InsertText','GUICtrlEdit_LineFromChar', - 'GUICtrlEdit_LineIndex','GUICtrlEdit_LineLength', - 'GUICtrlEdit_LineScroll','GUICtrlEdit_PosFromChar', - 'GUICtrlEdit_ReplaceSel','GUICtrlEdit_Scroll', - 'GUICtrlEdit_SetLimitText','GUICtrlEdit_SetMargins', - 'GUICtrlEdit_SetModify','GUICtrlEdit_SetPasswordChar', - 'GUICtrlEdit_SetReadOnly','GUICtrlEdit_SetRECT', - 'GUICtrlEdit_SetRECTEx','GUICtrlEdit_SetRECTNP', - 'GUICtrlEdit_SetRectNPEx','GUICtrlEdit_SetSel', - 'GUICtrlEdit_SetTabStops','GUICtrlEdit_SetText', - 'GUICtrlEdit_ShowBalloonTip','GUICtrlEdit_Undo', - 'GUICtrlHeader_AddItem','GUICtrlHeader_ClearFilter', - 'GUICtrlHeader_ClearFilterAll','GUICtrlHeader_Create', - 'GUICtrlHeader_CreateDragImage','GUICtrlHeader_DeleteItem', - 'GUICtrlHeader_Destroy','GUICtrlHeader_EditFilter', - 'GUICtrlHeader_GetBitmapMargin','GUICtrlHeader_GetImageList', - 'GUICtrlHeader_GetItem','GUICtrlHeader_GetItemAlign', - 'GUICtrlHeader_GetItemBitmap','GUICtrlHeader_GetItemCount', - 'GUICtrlHeader_GetItemDisplay','GUICtrlHeader_GetItemFlags', - 'GUICtrlHeader_GetItemFormat','GUICtrlHeader_GetItemImage', - 'GUICtrlHeader_GetItemOrder','GUICtrlHeader_GetItemParam', - 'GUICtrlHeader_GetItemRect','GUICtrlHeader_GetItemRectEx', - 'GUICtrlHeader_GetItemText','GUICtrlHeader_GetItemWidth', - 'GUICtrlHeader_GetOrderArray','GUICtrlHeader_GetUnicodeFormat', - 'GUICtrlHeader_HitTest','GUICtrlHeader_InsertItem', - 'GUICtrlHeader_Layout','GUICtrlHeader_OrderToIndex', - 'GUICtrlHeader_SetBitmapMargin', - 'GUICtrlHeader_SetFilterChangeTimeout', - 'GUICtrlHeader_SetHotDivider','GUICtrlHeader_SetImageList', - 'GUICtrlHeader_SetItem','GUICtrlHeader_SetItemAlign', - 'GUICtrlHeader_SetItemBitmap','GUICtrlHeader_SetItemDisplay', - 'GUICtrlHeader_SetItemFlags','GUICtrlHeader_SetItemFormat', - 'GUICtrlHeader_SetItemImage','GUICtrlHeader_SetItemOrder', - 'GUICtrlHeader_SetItemParam','GUICtrlHeader_SetItemText', - 'GUICtrlHeader_SetItemWidth','GUICtrlHeader_SetOrderArray', - 'GUICtrlHeader_SetUnicodeFormat','GUICtrlIpAddress_ClearAddress', - 'GUICtrlIpAddress_Create','GUICtrlIpAddress_Destroy', - 'GUICtrlIpAddress_Get','GUICtrlIpAddress_GetArray', - 'GUICtrlIpAddress_GetEx','GUICtrlIpAddress_IsBlank', - 'GUICtrlIpAddress_Set','GUICtrlIpAddress_SetArray', - 'GUICtrlIpAddress_SetEx','GUICtrlIpAddress_SetFocus', - 'GUICtrlIpAddress_SetFont','GUICtrlIpAddress_SetRange', - 'GUICtrlIpAddress_ShowHide','GUICtrlListBox_AddFile', - 'GUICtrlListBox_AddString','GUICtrlListBox_BeginUpdate', - 'GUICtrlListBox_Create','GUICtrlListBox_DeleteString', - 'GUICtrlListBox_Destroy','GUICtrlListBox_Dir', - 'GUICtrlListBox_EndUpdate','GUICtrlListBox_FindInText', - 'GUICtrlListBox_FindString','GUICtrlListBox_GetAnchorIndex', - 'GUICtrlListBox_GetCaretIndex','GUICtrlListBox_GetCount', - 'GUICtrlListBox_GetCurSel','GUICtrlListBox_GetHorizontalExtent', - 'GUICtrlListBox_GetItemData','GUICtrlListBox_GetItemHeight', - 'GUICtrlListBox_GetItemRect','GUICtrlListBox_GetItemRectEx', - 'GUICtrlListBox_GetListBoxInfo','GUICtrlListBox_GetLocale', - 'GUICtrlListBox_GetLocaleCountry','GUICtrlListBox_GetLocaleLang', - 'GUICtrlListBox_GetLocalePrimLang', - 'GUICtrlListBox_GetLocaleSubLang','GUICtrlListBox_GetSel', - 'GUICtrlListBox_GetSelCount','GUICtrlListBox_GetSelItems', - 'GUICtrlListBox_GetSelItemsText','GUICtrlListBox_GetText', - 'GUICtrlListBox_GetTextLen','GUICtrlListBox_GetTopIndex', - 'GUICtrlListBox_InitStorage','GUICtrlListBox_InsertString', - 'GUICtrlListBox_ItemFromPoint','GUICtrlListBox_ReplaceString', - 'GUICtrlListBox_ResetContent','GUICtrlListBox_SelectString', - 'GUICtrlListBox_SelItemRange','GUICtrlListBox_SelItemRangeEx', - 'GUICtrlListBox_SetAnchorIndex','GUICtrlListBox_SetCaretIndex', - 'GUICtrlListBox_SetColumnWidth','GUICtrlListBox_SetCurSel', - 'GUICtrlListBox_SetHorizontalExtent','GUICtrlListBox_SetItemData', - 'GUICtrlListBox_SetItemHeight','GUICtrlListBox_SetLocale', - 'GUICtrlListBox_SetSel','GUICtrlListBox_SetTabStops', - 'GUICtrlListBox_SetTopIndex','GUICtrlListBox_Sort', - 'GUICtrlListBox_SwapString','GUICtrlListBox_UpdateHScroll', - 'GUICtrlListView_AddArray','GUICtrlListView_AddColumn', - 'GUICtrlListView_AddItem','GUICtrlListView_AddSubItem', - 'GUICtrlListView_ApproximateViewHeight', - 'GUICtrlListView_ApproximateViewRect', - 'GUICtrlListView_ApproximateViewWidth','GUICtrlListView_Arrange', - 'GUICtrlListView_BeginUpdate','GUICtrlListView_CancelEditLabel', - 'GUICtrlListView_ClickItem','GUICtrlListView_CopyItems', - 'GUICtrlListView_Create','GUICtrlListView_CreateDragImage', - 'GUICtrlListView_CreateSolidBitMap', - 'GUICtrlListView_DeleteAllItems','GUICtrlListView_DeleteColumn', - 'GUICtrlListView_DeleteItem','GUICtrlListView_DeleteItemsSelected', - 'GUICtrlListView_Destroy','GUICtrlListView_DrawDragImage', - 'GUICtrlListView_EditLabel','GUICtrlListView_EnableGroupView', - 'GUICtrlListView_EndUpdate','GUICtrlListView_EnsureVisible', - 'GUICtrlListView_FindInText','GUICtrlListView_FindItem', - 'GUICtrlListView_FindNearest','GUICtrlListView_FindParam', - 'GUICtrlListView_FindText','GUICtrlListView_GetBkColor', - 'GUICtrlListView_GetBkImage','GUICtrlListView_GetCallbackMask', - 'GUICtrlListView_GetColumn','GUICtrlListView_GetColumnCount', - 'GUICtrlListView_GetColumnOrder', - 'GUICtrlListView_GetColumnOrderArray', - 'GUICtrlListView_GetColumnWidth','GUICtrlListView_GetCounterPage', - 'GUICtrlListView_GetEditControl', - 'GUICtrlListView_GetExtendedListViewStyle', - 'GUICtrlListView_GetGroupInfo', - 'GUICtrlListView_GetGroupViewEnabled','GUICtrlListView_GetHeader', - 'GUICtrlListView_GetHotCursor','GUICtrlListView_GetHotItem', - 'GUICtrlListView_GetHoverTime','GUICtrlListView_GetImageList', - 'GUICtrlListView_GetISearchString','GUICtrlListView_GetItem', - 'GUICtrlListView_GetItemChecked','GUICtrlListView_GetItemCount', - 'GUICtrlListView_GetItemCut','GUICtrlListView_GetItemDropHilited', - 'GUICtrlListView_GetItemEx','GUICtrlListView_GetItemFocused', - 'GUICtrlListView_GetItemGroupID','GUICtrlListView_GetItemImage', - 'GUICtrlListView_GetItemIndent','GUICtrlListView_GetItemParam', - 'GUICtrlListView_GetItemPosition', - 'GUICtrlListView_GetItemPositionX', - 'GUICtrlListView_GetItemPositionY','GUICtrlListView_GetItemRect', - 'GUICtrlListView_GetItemRectEx','GUICtrlListView_GetItemSelected', - 'GUICtrlListView_GetItemSpacing','GUICtrlListView_GetItemSpacingX', - 'GUICtrlListView_GetItemSpacingY','GUICtrlListView_GetItemState', - 'GUICtrlListView_GetItemStateImage','GUICtrlListView_GetItemText', - 'GUICtrlListView_GetItemTextArray', - 'GUICtrlListView_GetItemTextString','GUICtrlListView_GetNextItem', - 'GUICtrlListView_GetNumberOfWorkAreas','GUICtrlListView_GetOrigin', - 'GUICtrlListView_GetOriginX','GUICtrlListView_GetOriginY', - 'GUICtrlListView_GetOutlineColor', - 'GUICtrlListView_GetSelectedColumn', - 'GUICtrlListView_GetSelectedCount', - 'GUICtrlListView_GetSelectedIndices', - 'GUICtrlListView_GetSelectionMark','GUICtrlListView_GetStringWidth', - 'GUICtrlListView_GetSubItemRect','GUICtrlListView_GetTextBkColor', - 'GUICtrlListView_GetTextColor','GUICtrlListView_GetToolTips', - 'GUICtrlListView_GetTopIndex','GUICtrlListView_GetUnicodeFormat', - 'GUICtrlListView_GetView','GUICtrlListView_GetViewDetails', - 'GUICtrlListView_GetViewLarge','GUICtrlListView_GetViewList', - 'GUICtrlListView_GetViewRect','GUICtrlListView_GetViewSmall', - 'GUICtrlListView_GetViewTile','GUICtrlListView_HideColumn', - 'GUICtrlListView_HitTest','GUICtrlListView_InsertColumn', - 'GUICtrlListView_InsertGroup','GUICtrlListView_InsertItem', - 'GUICtrlListView_JustifyColumn','GUICtrlListView_MapIDToIndex', - 'GUICtrlListView_MapIndexToID','GUICtrlListView_RedrawItems', - 'GUICtrlListView_RegisterSortCallBack', - 'GUICtrlListView_RemoveAllGroups','GUICtrlListView_RemoveGroup', - 'GUICtrlListView_Scroll','GUICtrlListView_SetBkColor', - 'GUICtrlListView_SetBkImage','GUICtrlListView_SetCallBackMask', - 'GUICtrlListView_SetColumn','GUICtrlListView_SetColumnOrder', - 'GUICtrlListView_SetColumnOrderArray', - 'GUICtrlListView_SetColumnWidth', - 'GUICtrlListView_SetExtendedListViewStyle', - 'GUICtrlListView_SetGroupInfo','GUICtrlListView_SetHotItem', - 'GUICtrlListView_SetHoverTime','GUICtrlListView_SetIconSpacing', - 'GUICtrlListView_SetImageList','GUICtrlListView_SetItem', - 'GUICtrlListView_SetItemChecked','GUICtrlListView_SetItemCount', - 'GUICtrlListView_SetItemCut','GUICtrlListView_SetItemDropHilited', - 'GUICtrlListView_SetItemEx','GUICtrlListView_SetItemFocused', - 'GUICtrlListView_SetItemGroupID','GUICtrlListView_SetItemImage', - 'GUICtrlListView_SetItemIndent','GUICtrlListView_SetItemParam', - 'GUICtrlListView_SetItemPosition', - 'GUICtrlListView_SetItemPosition32', - 'GUICtrlListView_SetItemSelected','GUICtrlListView_SetItemState', - 'GUICtrlListView_SetItemStateImage','GUICtrlListView_SetItemText', - 'GUICtrlListView_SetOutlineColor', - 'GUICtrlListView_SetSelectedColumn', - 'GUICtrlListView_SetSelectionMark','GUICtrlListView_SetTextBkColor', - 'GUICtrlListView_SetTextColor','GUICtrlListView_SetToolTips', - 'GUICtrlListView_SetUnicodeFormat','GUICtrlListView_SetView', - 'GUICtrlListView_SetWorkAreas','GUICtrlListView_SimpleSort', - 'GUICtrlListView_SortItems','GUICtrlListView_SubItemHitTest', - 'GUICtrlListView_UnRegisterSortCallBack', - 'GUICtrlMenu_AddMenuItem','GUICtrlMenu_AppendMenu', - 'GUICtrlMenu_CheckMenuItem','GUICtrlMenu_CheckRadioItem', - 'GUICtrlMenu_CreateMenu','GUICtrlMenu_CreatePopup', - 'GUICtrlMenu_DeleteMenu','GUICtrlMenu_DestroyMenu', - 'GUICtrlMenu_DrawMenuBar','GUICtrlMenu_EnableMenuItem', - 'GUICtrlMenu_FindItem','GUICtrlMenu_FindParent', - 'GUICtrlMenu_GetItemBmp','GUICtrlMenu_GetItemBmpChecked', - 'GUICtrlMenu_GetItemBmpUnchecked','GUICtrlMenu_GetItemChecked', - 'GUICtrlMenu_GetItemCount','GUICtrlMenu_GetItemData', - 'GUICtrlMenu_GetItemDefault','GUICtrlMenu_GetItemDisabled', - 'GUICtrlMenu_GetItemEnabled','GUICtrlMenu_GetItemGrayed', - 'GUICtrlMenu_GetItemHighlighted','GUICtrlMenu_GetItemID', - 'GUICtrlMenu_GetItemInfo','GUICtrlMenu_GetItemRect', - 'GUICtrlMenu_GetItemRectEx','GUICtrlMenu_GetItemState', - 'GUICtrlMenu_GetItemStateEx','GUICtrlMenu_GetItemSubMenu', - 'GUICtrlMenu_GetItemText','GUICtrlMenu_GetItemType', - 'GUICtrlMenu_GetMenu','GUICtrlMenu_GetMenuBackground', - 'GUICtrlMenu_GetMenuBarInfo','GUICtrlMenu_GetMenuContextHelpID', - 'GUICtrlMenu_GetMenuData','GUICtrlMenu_GetMenuDefaultItem', - 'GUICtrlMenu_GetMenuHeight','GUICtrlMenu_GetMenuInfo', - 'GUICtrlMenu_GetMenuStyle','GUICtrlMenu_GetSystemMenu', - 'GUICtrlMenu_InsertMenuItem','GUICtrlMenu_InsertMenuItemEx', - 'GUICtrlMenu_IsMenu','GUICtrlMenu_LoadMenu', - 'GUICtrlMenu_MapAccelerator','GUICtrlMenu_MenuItemFromPoint', - 'GUICtrlMenu_RemoveMenu','GUICtrlMenu_SetItemBitmaps', - 'GUICtrlMenu_SetItemBmp','GUICtrlMenu_SetItemBmpChecked', - 'GUICtrlMenu_SetItemBmpUnchecked','GUICtrlMenu_SetItemChecked', - 'GUICtrlMenu_SetItemData','GUICtrlMenu_SetItemDefault', - 'GUICtrlMenu_SetItemDisabled','GUICtrlMenu_SetItemEnabled', - 'GUICtrlMenu_SetItemGrayed','GUICtrlMenu_SetItemHighlighted', - 'GUICtrlMenu_SetItemID','GUICtrlMenu_SetItemInfo', - 'GUICtrlMenu_SetItemState','GUICtrlMenu_SetItemSubMenu', - 'GUICtrlMenu_SetItemText','GUICtrlMenu_SetItemType', - 'GUICtrlMenu_SetMenu','GUICtrlMenu_SetMenuBackground', - 'GUICtrlMenu_SetMenuContextHelpID','GUICtrlMenu_SetMenuData', - 'GUICtrlMenu_SetMenuDefaultItem','GUICtrlMenu_SetMenuHeight', - 'GUICtrlMenu_SetMenuInfo','GUICtrlMenu_SetMenuStyle', - 'GUICtrlMenu_TrackPopupMenu','GUICtrlMonthCal_Create', - 'GUICtrlMonthCal_Destroy','GUICtrlMonthCal_GetColor', - 'GUICtrlMonthCal_GetColorArray','GUICtrlMonthCal_GetCurSel', - 'GUICtrlMonthCal_GetCurSelStr','GUICtrlMonthCal_GetFirstDOW', - 'GUICtrlMonthCal_GetFirstDOWStr','GUICtrlMonthCal_GetMaxSelCount', - 'GUICtrlMonthCal_GetMaxTodayWidth', - 'GUICtrlMonthCal_GetMinReqHeight','GUICtrlMonthCal_GetMinReqRect', - 'GUICtrlMonthCal_GetMinReqRectArray', - 'GUICtrlMonthCal_GetMinReqWidth','GUICtrlMonthCal_GetMonthDelta', - 'GUICtrlMonthCal_GetMonthRange','GUICtrlMonthCal_GetMonthRangeMax', - 'GUICtrlMonthCal_GetMonthRangeMaxStr', - 'GUICtrlMonthCal_GetMonthRangeMin', - 'GUICtrlMonthCal_GetMonthRangeMinStr', - 'GUICtrlMonthCal_GetMonthRangeSpan','GUICtrlMonthCal_GetRange', - 'GUICtrlMonthCal_GetRangeMax','GUICtrlMonthCal_GetRangeMaxStr', - 'GUICtrlMonthCal_GetRangeMin','GUICtrlMonthCal_GetRangeMinStr', - 'GUICtrlMonthCal_GetSelRange','GUICtrlMonthCal_GetSelRangeMax', - 'GUICtrlMonthCal_GetSelRangeMaxStr', - 'GUICtrlMonthCal_GetSelRangeMin', - 'GUICtrlMonthCal_GetSelRangeMinStr','GUICtrlMonthCal_GetToday', - 'GUICtrlMonthCal_GetTodayStr','GUICtrlMonthCal_GetUnicodeFormat', - 'GUICtrlMonthCal_HitTest','GUICtrlMonthCal_SetColor', - 'GUICtrlMonthCal_SetCurSel','GUICtrlMonthCal_SetDayState', - 'GUICtrlMonthCal_SetFirstDOW','GUICtrlMonthCal_SetMaxSelCount', - 'GUICtrlMonthCal_SetMonthDelta','GUICtrlMonthCal_SetRange', - 'GUICtrlMonthCal_SetSelRange','GUICtrlMonthCal_SetToday', - 'GUICtrlMonthCal_SetUnicodeFormat','GUICtrlRebar_AddBand', - 'GUICtrlRebar_AddToolBarBand','GUICtrlRebar_BeginDrag', - 'GUICtrlRebar_Create','GUICtrlRebar_DeleteBand', - 'GUICtrlRebar_Destroy','GUICtrlRebar_DragMove', - 'GUICtrlRebar_EndDrag','GUICtrlRebar_GetBandBackColor', - 'GUICtrlRebar_GetBandBorders','GUICtrlRebar_GetBandBordersEx', - 'GUICtrlRebar_GetBandChildHandle','GUICtrlRebar_GetBandChildSize', - 'GUICtrlRebar_GetBandCount','GUICtrlRebar_GetBandForeColor', - 'GUICtrlRebar_GetBandHeaderSize','GUICtrlRebar_GetBandID', - 'GUICtrlRebar_GetBandIdealSize','GUICtrlRebar_GetBandLength', - 'GUICtrlRebar_GetBandLParam','GUICtrlRebar_GetBandMargins', - 'GUICtrlRebar_GetBandMarginsEx','GUICtrlRebar_GetBandRect', - 'GUICtrlRebar_GetBandRectEx','GUICtrlRebar_GetBandStyle', - 'GUICtrlRebar_GetBandStyleBreak', - 'GUICtrlRebar_GetBandStyleChildEdge', - 'GUICtrlRebar_GetBandStyleFixedBMP', - 'GUICtrlRebar_GetBandStyleFixedSize', - 'GUICtrlRebar_GetBandStyleGripperAlways', - 'GUICtrlRebar_GetBandStyleHidden', - 'GUICtrlRebar_GetBandStyleHideTitle', - 'GUICtrlRebar_GetBandStyleNoGripper', - 'GUICtrlRebar_GetBandStyleTopAlign', - 'GUICtrlRebar_GetBandStyleUseChevron', - 'GUICtrlRebar_GetBandStyleVariableHeight', - 'GUICtrlRebar_GetBandText','GUICtrlRebar_GetBarHeight', - 'GUICtrlRebar_GetBKColor','GUICtrlRebar_GetColorScheme', - 'GUICtrlRebar_GetRowCount','GUICtrlRebar_GetRowHeight', - 'GUICtrlRebar_GetTextColor','GUICtrlRebar_GetToolTips', - 'GUICtrlRebar_GetUnicodeFormat','GUICtrlRebar_HitTest', - 'GUICtrlRebar_IDToIndex','GUICtrlRebar_MaximizeBand', - 'GUICtrlRebar_MinimizeBand','GUICtrlRebar_MoveBand', - 'GUICtrlRebar_SetBandBackColor','GUICtrlRebar_SetBandForeColor', - 'GUICtrlRebar_SetBandHeaderSize','GUICtrlRebar_SetBandID', - 'GUICtrlRebar_SetBandIdealSize','GUICtrlRebar_SetBandLength', - 'GUICtrlRebar_SetBandLParam','GUICtrlRebar_SetBandStyle', - 'GUICtrlRebar_SetBandStyleBreak', - 'GUICtrlRebar_SetBandStyleChildEdge', - 'GUICtrlRebar_SetBandStyleFixedBMP', - 'GUICtrlRebar_SetBandStyleFixedSize', - 'GUICtrlRebar_SetBandStyleGripperAlways', - 'GUICtrlRebar_SetBandStyleHidden', - 'GUICtrlRebar_SetBandStyleHideTitle', - 'GUICtrlRebar_SetBandStyleNoGripper', - 'GUICtrlRebar_SetBandStyleTopAlign', - 'GUICtrlRebar_SetBandStyleUseChevron', - 'GUICtrlRebar_SetBandStyleVariableHeight', - 'GUICtrlRebar_SetBandText','GUICtrlRebar_SetBKColor', - 'GUICtrlRebar_SetColorScheme','GUICtrlRebar_SetTextColor', - 'GUICtrlRebar_SetToolTips','GUICtrlRebar_SetUnicodeFormat', - 'GUICtrlRebar_ShowBand','GUICtrlSlider_ClearSel', - 'GUICtrlSlider_ClearTics','GUICtrlSlider_Create', - 'GUICtrlSlider_Destroy','GUICtrlSlider_GetBuddy', - 'GUICtrlSlider_GetChannelRect','GUICtrlSlider_GetLineSize', - 'GUICtrlSlider_GetNumTics','GUICtrlSlider_GetPageSize', - 'GUICtrlSlider_GetPos','GUICtrlSlider_GetPTics', - 'GUICtrlSlider_GetRange','GUICtrlSlider_GetRangeMax', - 'GUICtrlSlider_GetRangeMin','GUICtrlSlider_GetSel', - 'GUICtrlSlider_GetSelEnd','GUICtrlSlider_GetSelStart', - 'GUICtrlSlider_GetThumbLength','GUICtrlSlider_GetThumbRect', - 'GUICtrlSlider_GetThumbRectEx','GUICtrlSlider_GetTic', - 'GUICtrlSlider_GetTicPos','GUICtrlSlider_GetToolTips', - 'GUICtrlSlider_GetUnicodeFormat','GUICtrlSlider_SetBuddy', - 'GUICtrlSlider_SetLineSize','GUICtrlSlider_SetPageSize', - 'GUICtrlSlider_SetPos','GUICtrlSlider_SetRange', - 'GUICtrlSlider_SetRangeMax','GUICtrlSlider_SetRangeMin', - 'GUICtrlSlider_SetSel','GUICtrlSlider_SetSelEnd', - 'GUICtrlSlider_SetSelStart','GUICtrlSlider_SetThumbLength', - 'GUICtrlSlider_SetTic','GUICtrlSlider_SetTicFreq', - 'GUICtrlSlider_SetTipSide','GUICtrlSlider_SetToolTips', - 'GUICtrlSlider_SetUnicodeFormat','GUICtrlStatusBar_Create', - 'GUICtrlStatusBar_Destroy','GUICtrlStatusBar_EmbedControl', - 'GUICtrlStatusBar_GetBorders','GUICtrlStatusBar_GetBordersHorz', - 'GUICtrlStatusBar_GetBordersRect','GUICtrlStatusBar_GetBordersVert', - 'GUICtrlStatusBar_GetCount','GUICtrlStatusBar_GetHeight', - 'GUICtrlStatusBar_GetIcon','GUICtrlStatusBar_GetParts', - 'GUICtrlStatusBar_GetRect','GUICtrlStatusBar_GetRectEx', - 'GUICtrlStatusBar_GetText','GUICtrlStatusBar_GetTextFlags', - 'GUICtrlStatusBar_GetTextLength','GUICtrlStatusBar_GetTextLengthEx', - 'GUICtrlStatusBar_GetTipText','GUICtrlStatusBar_GetUnicodeFormat', - 'GUICtrlStatusBar_GetWidth','GUICtrlStatusBar_IsSimple', - 'GUICtrlStatusBar_Resize','GUICtrlStatusBar_SetBkColor', - 'GUICtrlStatusBar_SetIcon','GUICtrlStatusBar_SetMinHeight', - 'GUICtrlStatusBar_SetParts','GUICtrlStatusBar_SetSimple', - 'GUICtrlStatusBar_SetText','GUICtrlStatusBar_SetTipText', - 'GUICtrlStatusBar_SetUnicodeFormat','GUICtrlStatusBar_ShowHide', - 'GUICtrlTab_Create','GUICtrlTab_DeleteAllItems', - 'GUICtrlTab_DeleteItem','GUICtrlTab_DeselectAll', - 'GUICtrlTab_Destroy','GUICtrlTab_FindTab','GUICtrlTab_GetCurFocus', - 'GUICtrlTab_GetCurSel','GUICtrlTab_GetDisplayRect', - 'GUICtrlTab_GetDisplayRectEx','GUICtrlTab_GetExtendedStyle', - 'GUICtrlTab_GetImageList','GUICtrlTab_GetItem', - 'GUICtrlTab_GetItemCount','GUICtrlTab_GetItemImage', - 'GUICtrlTab_GetItemParam','GUICtrlTab_GetItemRect', - 'GUICtrlTab_GetItemRectEx','GUICtrlTab_GetItemState', - 'GUICtrlTab_GetItemText','GUICtrlTab_GetRowCount', - 'GUICtrlTab_GetToolTips','GUICtrlTab_GetUnicodeFormat', - 'GUICtrlTab_HighlightItem','GUICtrlTab_HitTest', - 'GUICtrlTab_InsertItem','GUICtrlTab_RemoveImage', - 'GUICtrlTab_SetCurFocus','GUICtrlTab_SetCurSel', - 'GUICtrlTab_SetExtendedStyle','GUICtrlTab_SetImageList', - 'GUICtrlTab_SetItem','GUICtrlTab_SetItemImage', - 'GUICtrlTab_SetItemParam','GUICtrlTab_SetItemSize', - 'GUICtrlTab_SetItemState','GUICtrlTab_SetItemText', - 'GUICtrlTab_SetMinTabWidth','GUICtrlTab_SetPadding', - 'GUICtrlTab_SetToolTips','GUICtrlTab_SetUnicodeFormat', - 'GUICtrlToolbar_AddBitmap','GUICtrlToolbar_AddButton', - 'GUICtrlToolbar_AddButtonSep','GUICtrlToolbar_AddString', - 'GUICtrlToolbar_ButtonCount','GUICtrlToolbar_CheckButton', - 'GUICtrlToolbar_ClickAccel','GUICtrlToolbar_ClickButton', - 'GUICtrlToolbar_ClickIndex','GUICtrlToolbar_CommandToIndex', - 'GUICtrlToolbar_Create','GUICtrlToolbar_Customize', - 'GUICtrlToolbar_DeleteButton','GUICtrlToolbar_Destroy', - 'GUICtrlToolbar_EnableButton','GUICtrlToolbar_FindToolbar', - 'GUICtrlToolbar_GetAnchorHighlight','GUICtrlToolbar_GetBitmapFlags', - 'GUICtrlToolbar_GetButtonBitmap','GUICtrlToolbar_GetButtonInfo', - 'GUICtrlToolbar_GetButtonInfoEx','GUICtrlToolbar_GetButtonParam', - 'GUICtrlToolbar_GetButtonRect','GUICtrlToolbar_GetButtonRectEx', - 'GUICtrlToolbar_GetButtonSize','GUICtrlToolbar_GetButtonState', - 'GUICtrlToolbar_GetButtonStyle','GUICtrlToolbar_GetButtonText', - 'GUICtrlToolbar_GetColorScheme', - 'GUICtrlToolbar_GetDisabledImageList', - 'GUICtrlToolbar_GetExtendedStyle','GUICtrlToolbar_GetHotImageList', - 'GUICtrlToolbar_GetHotItem','GUICtrlToolbar_GetImageList', - 'GUICtrlToolbar_GetInsertMark','GUICtrlToolbar_GetInsertMarkColor', - 'GUICtrlToolbar_GetMaxSize','GUICtrlToolbar_GetMetrics', - 'GUICtrlToolbar_GetPadding','GUICtrlToolbar_GetRows', - 'GUICtrlToolbar_GetString','GUICtrlToolbar_GetStyle', - 'GUICtrlToolbar_GetStyleAltDrag', - 'GUICtrlToolbar_GetStyleCustomErase','GUICtrlToolbar_GetStyleFlat', - 'GUICtrlToolbar_GetStyleList','GUICtrlToolbar_GetStyleRegisterDrop', - 'GUICtrlToolbar_GetStyleToolTips', - 'GUICtrlToolbar_GetStyleTransparent', - 'GUICtrlToolbar_GetStyleWrapable','GUICtrlToolbar_GetTextRows', - 'GUICtrlToolbar_GetToolTips','GUICtrlToolbar_GetUnicodeFormat', - 'GUICtrlToolbar_HideButton','GUICtrlToolbar_HighlightButton', - 'GUICtrlToolbar_HitTest','GUICtrlToolbar_IndexToCommand', - 'GUICtrlToolbar_InsertButton','GUICtrlToolbar_InsertMarkHitTest', - 'GUICtrlToolbar_IsButtonChecked','GUICtrlToolbar_IsButtonEnabled', - 'GUICtrlToolbar_IsButtonHidden', - 'GUICtrlToolbar_IsButtonHighlighted', - 'GUICtrlToolbar_IsButtonIndeterminate', - 'GUICtrlToolbar_IsButtonPressed','GUICtrlToolbar_LoadBitmap', - 'GUICtrlToolbar_LoadImages','GUICtrlToolbar_MapAccelerator', - 'GUICtrlToolbar_MoveButton','GUICtrlToolbar_PressButton', - 'GUICtrlToolbar_SetAnchorHighlight','GUICtrlToolbar_SetBitmapSize', - 'GUICtrlToolbar_SetButtonBitMap','GUICtrlToolbar_SetButtonInfo', - 'GUICtrlToolbar_SetButtonInfoEx','GUICtrlToolbar_SetButtonParam', - 'GUICtrlToolbar_SetButtonSize','GUICtrlToolbar_SetButtonState', - 'GUICtrlToolbar_SetButtonStyle','GUICtrlToolbar_SetButtonText', - 'GUICtrlToolbar_SetButtonWidth','GUICtrlToolbar_SetCmdID', - 'GUICtrlToolbar_SetColorScheme', - 'GUICtrlToolbar_SetDisabledImageList', - 'GUICtrlToolbar_SetDrawTextFlags','GUICtrlToolbar_SetExtendedStyle', - 'GUICtrlToolbar_SetHotImageList','GUICtrlToolbar_SetHotItem', - 'GUICtrlToolbar_SetImageList','GUICtrlToolbar_SetIndent', - 'GUICtrlToolbar_SetIndeterminate','GUICtrlToolbar_SetInsertMark', - 'GUICtrlToolbar_SetInsertMarkColor','GUICtrlToolbar_SetMaxTextRows', - 'GUICtrlToolbar_SetMetrics','GUICtrlToolbar_SetPadding', - 'GUICtrlToolbar_SetParent','GUICtrlToolbar_SetRows', - 'GUICtrlToolbar_SetStyle','GUICtrlToolbar_SetStyleAltDrag', - 'GUICtrlToolbar_SetStyleCustomErase','GUICtrlToolbar_SetStyleFlat', - 'GUICtrlToolbar_SetStyleList','GUICtrlToolbar_SetStyleRegisterDrop', - 'GUICtrlToolbar_SetStyleToolTips', - 'GUICtrlToolbar_SetStyleTransparent', - 'GUICtrlToolbar_SetStyleWrapable','GUICtrlToolbar_SetToolTips', - 'GUICtrlToolbar_SetUnicodeFormat','GUICtrlToolbar_SetWindowTheme', - 'GUICtrlTreeView_Add','GUICtrlTreeView_AddChild', - 'GUICtrlTreeView_AddChildFirst','GUICtrlTreeView_AddFirst', - 'GUICtrlTreeView_BeginUpdate','GUICtrlTreeView_ClickItem', - 'GUICtrlTreeView_Create','GUICtrlTreeView_CreateDragImage', - 'GUICtrlTreeView_CreateSolidBitMap','GUICtrlTreeView_Delete', - 'GUICtrlTreeView_DeleteAll','GUICtrlTreeView_DeleteChildren', - 'GUICtrlTreeView_Destroy','GUICtrlTreeView_DisplayRect', - 'GUICtrlTreeView_DisplayRectEx','GUICtrlTreeView_EditText', - 'GUICtrlTreeView_EndEdit','GUICtrlTreeView_EndUpdate', - 'GUICtrlTreeView_EnsureVisible','GUICtrlTreeView_Expand', - 'GUICtrlTreeView_ExpandedOnce','GUICtrlTreeView_FindItem', - 'GUICtrlTreeView_FindItemEx','GUICtrlTreeView_GetBkColor', - 'GUICtrlTreeView_GetBold','GUICtrlTreeView_GetChecked', - 'GUICtrlTreeView_GetChildCount','GUICtrlTreeView_GetChildren', - 'GUICtrlTreeView_GetCount','GUICtrlTreeView_GetCut', - 'GUICtrlTreeView_GetDropTarget','GUICtrlTreeView_GetEditControl', - 'GUICtrlTreeView_GetExpanded','GUICtrlTreeView_GetFirstChild', - 'GUICtrlTreeView_GetFirstItem','GUICtrlTreeView_GetFirstVisible', - 'GUICtrlTreeView_GetFocused','GUICtrlTreeView_GetHeight', - 'GUICtrlTreeView_GetImageIndex', - 'GUICtrlTreeView_GetImageListIconHandle', - 'GUICtrlTreeView_GetIndent','GUICtrlTreeView_GetInsertMarkColor', - 'GUICtrlTreeView_GetISearchString','GUICtrlTreeView_GetItemByIndex', - 'GUICtrlTreeView_GetItemHandle','GUICtrlTreeView_GetItemParam', - 'GUICtrlTreeView_GetLastChild','GUICtrlTreeView_GetLineColor', - 'GUICtrlTreeView_GetNext','GUICtrlTreeView_GetNextChild', - 'GUICtrlTreeView_GetNextSibling','GUICtrlTreeView_GetNextVisible', - 'GUICtrlTreeView_GetNormalImageList', - 'GUICtrlTreeView_GetParentHandle','GUICtrlTreeView_GetParentParam', - 'GUICtrlTreeView_GetPrev','GUICtrlTreeView_GetPrevChild', - 'GUICtrlTreeView_GetPrevSibling','GUICtrlTreeView_GetPrevVisible', - 'GUICtrlTreeView_GetScrollTime','GUICtrlTreeView_GetSelected', - 'GUICtrlTreeView_GetSelectedImageIndex', - 'GUICtrlTreeView_GetSelection','GUICtrlTreeView_GetSiblingCount', - 'GUICtrlTreeView_GetState','GUICtrlTreeView_GetStateImageIndex', - 'GUICtrlTreeView_GetStateImageList','GUICtrlTreeView_GetText', - 'GUICtrlTreeView_GetTextColor','GUICtrlTreeView_GetToolTips', - 'GUICtrlTreeView_GetTree','GUICtrlTreeView_GetUnicodeFormat', - 'GUICtrlTreeView_GetVisible','GUICtrlTreeView_GetVisibleCount', - 'GUICtrlTreeView_HitTest','GUICtrlTreeView_HitTestEx', - 'GUICtrlTreeView_HitTestItem','GUICtrlTreeView_Index', - 'GUICtrlTreeView_InsertItem','GUICtrlTreeView_IsFirstItem', - 'GUICtrlTreeView_IsParent','GUICtrlTreeView_Level', - 'GUICtrlTreeView_SelectItem','GUICtrlTreeView_SelectItemByIndex', - 'GUICtrlTreeView_SetBkColor','GUICtrlTreeView_SetBold', - 'GUICtrlTreeView_SetChecked','GUICtrlTreeView_SetCheckedByIndex', - 'GUICtrlTreeView_SetChildren','GUICtrlTreeView_SetCut', - 'GUICtrlTreeView_SetDropTarget','GUICtrlTreeView_SetFocused', - 'GUICtrlTreeView_SetHeight','GUICtrlTreeView_SetIcon', - 'GUICtrlTreeView_SetImageIndex','GUICtrlTreeView_SetIndent', - 'GUICtrlTreeView_SetInsertMark', - 'GUICtrlTreeView_SetInsertMarkColor', - 'GUICtrlTreeView_SetItemHeight','GUICtrlTreeView_SetItemParam', - 'GUICtrlTreeView_SetLineColor','GUICtrlTreeView_SetNormalImageList', - 'GUICtrlTreeView_SetScrollTime','GUICtrlTreeView_SetSelected', - 'GUICtrlTreeView_SetSelectedImageIndex','GUICtrlTreeView_SetState', - 'GUICtrlTreeView_SetStateImageIndex', - 'GUICtrlTreeView_SetStateImageList','GUICtrlTreeView_SetText', - 'GUICtrlTreeView_SetTextColor','GUICtrlTreeView_SetToolTips', - 'GUICtrlTreeView_SetUnicodeFormat','GUICtrlTreeView_Sort', - 'GUIImageList_Add','GUIImageList_AddBitmap','GUIImageList_AddIcon', - 'GUIImageList_AddMasked','GUIImageList_BeginDrag', - 'GUIImageList_Copy','GUIImageList_Create','GUIImageList_Destroy', - 'GUIImageList_DestroyIcon','GUIImageList_DragEnter', - 'GUIImageList_DragLeave','GUIImageList_DragMove', - 'GUIImageList_Draw','GUIImageList_DrawEx','GUIImageList_Duplicate', - 'GUIImageList_EndDrag','GUIImageList_GetBkColor', - 'GUIImageList_GetIcon','GUIImageList_GetIconHeight', - 'GUIImageList_GetIconSize','GUIImageList_GetIconSizeEx', - 'GUIImageList_GetIconWidth','GUIImageList_GetImageCount', - 'GUIImageList_GetImageInfoEx','GUIImageList_Remove', - 'GUIImageList_ReplaceIcon','GUIImageList_SetBkColor', - 'GUIImageList_SetIconSize','GUIImageList_SetImageCount', - 'GUIImageList_Swap','GUIScrollBars_EnableScrollBar', - 'GUIScrollBars_GetScrollBarInfoEx','GUIScrollBars_GetScrollBarRect', - 'GUIScrollBars_GetScrollBarRGState', - 'GUIScrollBars_GetScrollBarXYLineButton', - 'GUIScrollBars_GetScrollBarXYThumbBottom', - 'GUIScrollBars_GetScrollBarXYThumbTop', - 'GUIScrollBars_GetScrollInfo','GUIScrollBars_GetScrollInfoEx', - 'GUIScrollBars_GetScrollInfoMax','GUIScrollBars_GetScrollInfoMin', - 'GUIScrollBars_GetScrollInfoPage','GUIScrollBars_GetScrollInfoPos', - 'GUIScrollBars_GetScrollInfoTrackPos','GUIScrollBars_GetScrollPos', - 'GUIScrollBars_GetScrollRange','GUIScrollBars_Init', - 'GUIScrollBars_ScrollWindow','GUIScrollBars_SetScrollInfo', - 'GUIScrollBars_SetScrollInfoMax','GUIScrollBars_SetScrollInfoMin', - 'GUIScrollBars_SetScrollInfoPage','GUIScrollBars_SetScrollInfoPos', - 'GUIScrollBars_SetScrollRange','GUIScrollBars_ShowScrollBar', - 'GUIToolTip_Activate','GUIToolTip_AddTool','GUIToolTip_AdjustRect', - 'GUIToolTip_BitsToTTF','GUIToolTip_Create','GUIToolTip_DelTool', - 'GUIToolTip_Destroy','GUIToolTip_EnumTools', - 'GUIToolTip_GetBubbleHeight','GUIToolTip_GetBubbleSize', - 'GUIToolTip_GetBubbleWidth','GUIToolTip_GetCurrentTool', - 'GUIToolTip_GetDelayTime','GUIToolTip_GetMargin', - 'GUIToolTip_GetMarginEx','GUIToolTip_GetMaxTipWidth', - 'GUIToolTip_GetText','GUIToolTip_GetTipBkColor', - 'GUIToolTip_GetTipTextColor','GUIToolTip_GetTitleBitMap', - 'GUIToolTip_GetTitleText','GUIToolTip_GetToolCount', - 'GUIToolTip_GetToolInfo','GUIToolTip_HitTest', - 'GUIToolTip_NewToolRect','GUIToolTip_Pop','GUIToolTip_PopUp', - 'GUIToolTip_SetDelayTime','GUIToolTip_SetMargin', - 'GUIToolTip_SetMaxTipWidth','GUIToolTip_SetTipBkColor', - 'GUIToolTip_SetTipTextColor','GUIToolTip_SetTitle', - 'GUIToolTip_SetToolInfo','GUIToolTip_SetWindowTheme', - 'GUIToolTip_ToolExists','GUIToolTip_ToolToArray', - 'GUIToolTip_TrackActivate','GUIToolTip_TrackPosition', - 'GUIToolTip_TTFToBits','GUIToolTip_Update', - 'GUIToolTip_UpdateTipText','HexToString','IE_Example', - 'IE_Introduction','IE_VersionInfo','IEAction','IEAttach', - 'IEBodyReadHTML','IEBodyReadText','IEBodyWriteHTML','IECreate', - 'IECreateEmbedded','IEDocGetObj','IEDocInsertHTML', - 'IEDocInsertText','IEDocReadHTML','IEDocWriteHTML', - 'IEErrorHandlerDeRegister','IEErrorHandlerRegister','IEErrorNotify', - 'IEFormElementCheckBoxSelect','IEFormElementGetCollection', - 'IEFormElementGetObjByName','IEFormElementGetValue', - 'IEFormElementOptionSelect','IEFormElementRadioSelect', - 'IEFormElementSetValue','IEFormGetCollection','IEFormGetObjByName', - 'IEFormImageClick','IEFormReset','IEFormSubmit', - 'IEFrameGetCollection','IEFrameGetObjByName','IEGetObjById', - 'IEGetObjByName','IEHeadInsertEventScript','IEImgClick', - 'IEImgGetCollection','IEIsFrameSet','IELinkClickByIndex', - 'IELinkClickByText','IELinkGetCollection','IELoadWait', - 'IELoadWaitTimeout','IENavigate','IEPropertyGet','IEPropertySet', - 'IEQuit','IETableGetCollection','IETableWriteToArray', - 'IETagNameAllGetCollection','IETagNameGetCollection','Iif', - 'INetExplorerCapable','INetGetSource','INetMail','INetSmtpMail', - 'IsPressed','MathCheckDiv','Max','MemGlobalAlloc','MemGlobalFree', - 'MemGlobalLock','MemGlobalSize','MemGlobalUnlock','MemMoveMemory', - 'MemMsgBox','MemShowError','MemVirtualAlloc','MemVirtualAllocEx', - 'MemVirtualFree','MemVirtualFreeEx','Min','MouseTrap', - 'NamedPipes_CallNamedPipe','NamedPipes_ConnectNamedPipe', - 'NamedPipes_CreateNamedPipe','NamedPipes_CreatePipe', - 'NamedPipes_DisconnectNamedPipe', - 'NamedPipes_GetNamedPipeHandleState','NamedPipes_GetNamedPipeInfo', - 'NamedPipes_PeekNamedPipe','NamedPipes_SetNamedPipeHandleState', - 'NamedPipes_TransactNamedPipe','NamedPipes_WaitNamedPipe', - 'Net_Share_ConnectionEnum','Net_Share_FileClose', - 'Net_Share_FileEnum','Net_Share_FileGetInfo','Net_Share_PermStr', - 'Net_Share_ResourceStr','Net_Share_SessionDel', - 'Net_Share_SessionEnum','Net_Share_SessionGetInfo', - 'Net_Share_ShareAdd','Net_Share_ShareCheck','Net_Share_ShareDel', - 'Net_Share_ShareEnum','Net_Share_ShareGetInfo', - 'Net_Share_ShareSetInfo','Net_Share_StatisticsGetSvr', - 'Net_Share_StatisticsGetWrk','Now','NowCalc','NowCalcDate', - 'NowDate','NowTime','PathFull','PathMake','PathSplit', - 'ProcessGetName','ProcessGetPriority','Radian', - 'ReplaceStringInFile','RunDOS','ScreenCapture_Capture', - 'ScreenCapture_CaptureWnd','ScreenCapture_SaveImage', - 'ScreenCapture_SetBMPFormat','ScreenCapture_SetJPGQuality', - 'ScreenCapture_SetTIFColorDepth','ScreenCapture_SetTIFCompression', - 'Security__AdjustTokenPrivileges','Security__GetAccountSid', - 'Security__GetLengthSid','Security__GetTokenInformation', - 'Security__ImpersonateSelf','Security__IsValidSid', - 'Security__LookupAccountName','Security__LookupAccountSid', - 'Security__LookupPrivilegeValue','Security__OpenProcessToken', - 'Security__OpenThreadToken','Security__OpenThreadTokenEx', - 'Security__SetPrivilege','Security__SidToStringSid', - 'Security__SidTypeStr','Security__StringSidToSid','SendMessage', - 'SendMessageA','SetDate','SetTime','Singleton','SoundClose', - 'SoundLength','SoundOpen','SoundPause','SoundPlay','SoundPos', - 'SoundResume','SoundSeek','SoundStatus','SoundStop', - 'SQLite_Changes','SQLite_Close','SQLite_Display2DResult', - 'SQLite_Encode','SQLite_ErrCode','SQLite_ErrMsg','SQLite_Escape', - 'SQLite_Exec','SQLite_FetchData','SQLite_FetchNames', - 'SQLite_GetTable','SQLite_GetTable2d','SQLite_LastInsertRowID', - 'SQLite_LibVersion','SQLite_Open','SQLite_Query', - 'SQLite_QueryFinalize','SQLite_QueryReset','SQLite_QuerySingleRow', - 'SQLite_SaveMode','SQLite_SetTimeout','SQLite_Shutdown', - 'SQLite_SQLiteExe','SQLite_Startup','SQLite_TotalChanges', - 'StringAddComma','StringBetween','StringEncrypt','StringInsert', - 'StringProper','StringRepeat','StringReverse','StringSplit', - 'StringToHex','TCPIpToName','TempFile','TicksToTime','Timer_Diff', - 'Timer_GetTimerID','Timer_Init','Timer_KillAllTimers', - 'Timer_KillTimer','Timer_SetTimer','TimeToTicks','VersionCompare', - 'viClose','viExecCommand','viFindGpib','viGpibBusReset','viGTL', - 'viOpen','viSetAttribute','viSetTimeout','WeekNumberISO', - 'WinAPI_AttachConsole','WinAPI_AttachThreadInput','WinAPI_Beep', - 'WinAPI_BitBlt','WinAPI_CallNextHookEx','WinAPI_Check', - 'WinAPI_ClientToScreen','WinAPI_CloseHandle', - 'WinAPI_CommDlgExtendedError','WinAPI_CopyIcon', - 'WinAPI_CreateBitmap','WinAPI_CreateCompatibleBitmap', - 'WinAPI_CreateCompatibleDC','WinAPI_CreateEvent', - 'WinAPI_CreateFile','WinAPI_CreateFont','WinAPI_CreateFontIndirect', - 'WinAPI_CreateProcess','WinAPI_CreateSolidBitmap', - 'WinAPI_CreateSolidBrush','WinAPI_CreateWindowEx', - 'WinAPI_DefWindowProc','WinAPI_DeleteDC','WinAPI_DeleteObject', - 'WinAPI_DestroyIcon','WinAPI_DestroyWindow','WinAPI_DrawEdge', - 'WinAPI_DrawFrameControl','WinAPI_DrawIcon','WinAPI_DrawIconEx', - 'WinAPI_DrawText','WinAPI_EnableWindow','WinAPI_EnumDisplayDevices', - 'WinAPI_EnumWindows','WinAPI_EnumWindowsPopup', - 'WinAPI_EnumWindowsTop','WinAPI_ExpandEnvironmentStrings', - 'WinAPI_ExtractIconEx','WinAPI_FatalAppExit','WinAPI_FillRect', - 'WinAPI_FindExecutable','WinAPI_FindWindow','WinAPI_FlashWindow', - 'WinAPI_FlashWindowEx','WinAPI_FloatToInt', - 'WinAPI_FlushFileBuffers','WinAPI_FormatMessage','WinAPI_FrameRect', - 'WinAPI_FreeLibrary','WinAPI_GetAncestor','WinAPI_GetAsyncKeyState', - 'WinAPI_GetClassName','WinAPI_GetClientHeight', - 'WinAPI_GetClientRect','WinAPI_GetClientWidth', - 'WinAPI_GetCurrentProcess','WinAPI_GetCurrentProcessID', - 'WinAPI_GetCurrentThread','WinAPI_GetCurrentThreadId', - 'WinAPI_GetCursorInfo','WinAPI_GetDC','WinAPI_GetDesktopWindow', - 'WinAPI_GetDeviceCaps','WinAPI_GetDIBits','WinAPI_GetDlgCtrlID', - 'WinAPI_GetDlgItem','WinAPI_GetFileSizeEx','WinAPI_GetFocus', - 'WinAPI_GetForegroundWindow','WinAPI_GetIconInfo', - 'WinAPI_GetLastError','WinAPI_GetLastErrorMessage', - 'WinAPI_GetModuleHandle','WinAPI_GetMousePos','WinAPI_GetMousePosX', - 'WinAPI_GetMousePosY','WinAPI_GetObject','WinAPI_GetOpenFileName', - 'WinAPI_GetOverlappedResult','WinAPI_GetParent', - 'WinAPI_GetProcessAffinityMask','WinAPI_GetSaveFileName', - 'WinAPI_GetStdHandle','WinAPI_GetStockObject','WinAPI_GetSysColor', - 'WinAPI_GetSysColorBrush','WinAPI_GetSystemMetrics', - 'WinAPI_GetTextExtentPoint32','WinAPI_GetWindow', - 'WinAPI_GetWindowDC','WinAPI_GetWindowHeight', - 'WinAPI_GetWindowLong','WinAPI_GetWindowRect', - 'WinAPI_GetWindowText','WinAPI_GetWindowThreadProcessId', - 'WinAPI_GetWindowWidth','WinAPI_GetXYFromPoint', - 'WinAPI_GlobalMemStatus','WinAPI_GUIDFromString', - 'WinAPI_GUIDFromStringEx','WinAPI_HiWord','WinAPI_InProcess', - 'WinAPI_IntToFloat','WinAPI_InvalidateRect','WinAPI_IsClassName', - 'WinAPI_IsWindow','WinAPI_IsWindowVisible','WinAPI_LoadBitmap', - 'WinAPI_LoadImage','WinAPI_LoadLibrary','WinAPI_LoadLibraryEx', - 'WinAPI_LoadShell32Icon','WinAPI_LoadString','WinAPI_LocalFree', - 'WinAPI_LoWord','WinAPI_MakeDWord','WinAPI_MAKELANGID', - 'WinAPI_MAKELCID','WinAPI_MakeLong','WinAPI_MessageBeep', - 'WinAPI_Mouse_Event','WinAPI_MoveWindow','WinAPI_MsgBox', - 'WinAPI_MulDiv','WinAPI_MultiByteToWideChar', - 'WinAPI_MultiByteToWideCharEx','WinAPI_OpenProcess', - 'WinAPI_PointFromRect','WinAPI_PostMessage','WinAPI_PrimaryLangId', - 'WinAPI_PtInRect','WinAPI_ReadFile','WinAPI_ReadProcessMemory', - 'WinAPI_RectIsEmpty','WinAPI_RedrawWindow', - 'WinAPI_RegisterWindowMessage','WinAPI_ReleaseCapture', - 'WinAPI_ReleaseDC','WinAPI_ScreenToClient','WinAPI_SelectObject', - 'WinAPI_SetBkColor','WinAPI_SetCapture','WinAPI_SetCursor', - 'WinAPI_SetDefaultPrinter','WinAPI_SetDIBits','WinAPI_SetEvent', - 'WinAPI_SetFocus','WinAPI_SetFont','WinAPI_SetHandleInformation', - 'WinAPI_SetLastError','WinAPI_SetParent', - 'WinAPI_SetProcessAffinityMask','WinAPI_SetSysColors', - 'WinAPI_SetTextColor','WinAPI_SetWindowLong','WinAPI_SetWindowPos', - 'WinAPI_SetWindowsHookEx','WinAPI_SetWindowText', - 'WinAPI_ShowCursor','WinAPI_ShowError','WinAPI_ShowMsg', - 'WinAPI_ShowWindow','WinAPI_StringFromGUID','WinAPI_SubLangId', - 'WinAPI_SystemParametersInfo','WinAPI_TwipsPerPixelX', - 'WinAPI_TwipsPerPixelY','WinAPI_UnhookWindowsHookEx', - 'WinAPI_UpdateLayeredWindow','WinAPI_UpdateWindow', - 'WinAPI_ValidateClassName','WinAPI_WaitForInputIdle', - 'WinAPI_WaitForMultipleObjects','WinAPI_WaitForSingleObject', - 'WinAPI_WideCharToMultiByte','WinAPI_WindowFromPoint', - 'WinAPI_WriteConsole','WinAPI_WriteFile', - 'WinAPI_WriteProcessMemory','WinNet_AddConnection', - 'WinNet_AddConnection2','WinNet_AddConnection3', - 'WinNet_CancelConnection','WinNet_CancelConnection2', - 'WinNet_CloseEnum','WinNet_ConnectionDialog', - 'WinNet_ConnectionDialog1','WinNet_DisconnectDialog', - 'WinNet_DisconnectDialog1','WinNet_EnumResource', - 'WinNet_GetConnection','WinNet_GetConnectionPerformance', - 'WinNet_GetLastError','WinNet_GetNetworkInformation', - 'WinNet_GetProviderName','WinNet_GetResourceInformation', - 'WinNet_GetResourceParent','WinNet_GetUniversalName', - 'WinNet_GetUser','WinNet_OpenEnum','WinNet_RestoreConnection', - 'WinNet_UseConnection','Word_VersionInfo','WordAttach','WordCreate', - 'WordDocAdd','WordDocAddLink','WordDocAddPicture','WordDocClose', - 'WordDocFindReplace','WordDocGetCollection', - 'WordDocLinkGetCollection','WordDocOpen','WordDocPrint', - 'WordDocPropertyGet','WordDocPropertySet','WordDocSave', - 'WordDocSaveAs','WordErrorHandlerDeRegister', - 'WordErrorHandlerRegister','WordErrorNotify','WordMacroRun', - 'WordPropertyGet','WordPropertySet','WordQuit' - ), - 5 => array( - 'ce','comments-end','comments-start','cs','include','include-once', - 'NoTrayIcon','RequireAdmin' - ), - 6 => array( - 'AutoIt3Wrapper_Au3Check_Parameters', - 'AutoIt3Wrapper_Au3Check_Stop_OnWarning', - 'AutoIt3Wrapper_Change2CUI','AutoIt3Wrapper_Compression', - 'AutoIt3Wrapper_cvsWrapper_Parameters','AutoIt3Wrapper_Icon', - 'AutoIt3Wrapper_Outfile','AutoIt3Wrapper_Outfile_Type', - 'AutoIt3Wrapper_Plugin_Funcs','AutoIt3Wrapper_Res_Comment', - 'AutoIt3Wrapper_Res_Description','AutoIt3Wrapper_Res_Field', - 'AutoIt3Wrapper_Res_File_Add','AutoIt3Wrapper_Res_Fileversion', - 'AutoIt3Wrapper_Res_FileVersion_AutoIncrement', - 'AutoIt3Wrapper_Res_Icon_Add','AutoIt3Wrapper_Res_Language', - 'AutoIt3Wrapper_Res_LegalCopyright', - 'AutoIt3Wrapper_res_requestedExecutionLevel', - 'AutoIt3Wrapper_Res_SaveSource','AutoIt3Wrapper_Run_After', - 'AutoIt3Wrapper_Run_Au3check','AutoIt3Wrapper_Run_Before', - 'AutoIt3Wrapper_Run_cvsWrapper','AutoIt3Wrapper_Run_Debug_Mode', - 'AutoIt3Wrapper_Run_Obfuscator','AutoIt3Wrapper_Run_Tidy', - 'AutoIt3Wrapper_Tidy_Stop_OnError','AutoIt3Wrapper_UseAnsi', - 'AutoIt3Wrapper_UseUpx','AutoIt3Wrapper_UseX64', - 'AutoIt3Wrapper_Version','EndRegion','forceref', - 'Obfuscator_Ignore_Funcs','Obfuscator_Ignore_Variables', - 'Obfuscator_Parameters','Region','Tidy_Parameters' - ) - ), - 'SYMBOLS' => array( - '(',')','[',']', - '+','-','*','/','&','^', - '=','+=','-=','*=','/=','&=', - '==','<','<=','>','>=', - ',','.' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000FF; font-weight: bold;', - 2 => 'color: #800000; font-weight: bold;', - 3 => 'color: #000080; font-style: italic; font-weight: bold;', - 4 => 'color: #0080FF; font-style: italic; font-weight: bold;', - 5 => 'color: #F000FF; font-style: italic;', - 6 => 'color: #A00FF0; font-style: italic;' - ), - 'COMMENTS' => array( - 'MULTI' => 'font-style: italic; color: #669900;', - 0 => 'font-style: italic; color: #009933;', - 1 => 'font-style: italic; color: #9977BB;', - ), - 'ESCAPE_CHAR' => array( - 0 => '' - ), - 'BRACKETS' => array( - 0 => 'color: #FF0000; font-weight: bold;' - ), - 'STRINGS' => array( - 0 => 'font-weight: bold; color: #9977BB;' - ), - 'NUMBERS' => array( - 0 => 'color: #AC00A9; font-style: italic; font-weight: bold;' - ), - 'METHODS' => array( - 1 => 'color: #0000FF; font-style: italic; font-weight: bold;' - ), - 'SYMBOLS' => array( - 0 => 'color: #FF0000; font-weight: bold;' - ), - 'REGEXPS' => array( - 0 => 'font-weight: bold; color: #AA0000;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => 'http://www.autoitscript.com/autoit3/docs/keywords.htm', - 2 => 'http://www.autoitscript.com/autoit3/docs/macros.htm', - 3 => 'http://www.autoitscript.com/autoit3/docs/functions/{FNAME}.htm', - 4 => '', - 5 => '', - 6 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - //Variables - 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*' - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - 1 => true, - 2 => true, - 3 => true - ), - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 4 => array( - 'DISALLOWED_BEFORE' => '(? array( - 'DISALLOWED_BEFORE' => '(? array( - 'DISALLOWED_BEFORE' => '(? \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/avisynth.php b/_piecrust/libs/Geshi/geshi/avisynth.php deleted file mode 100644 index af11e98..0000000 --- a/_piecrust/libs/Geshi/geshi/avisynth.php +++ /dev/null @@ -1,194 +0,0 @@ - 'AviSynth', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/', '[*' => '*]'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - // Reserved words. - 1 => array( - 'try', 'cache', 'function', 'global', 'return' - ), - // Constants / special variables. - 2 => array( - 'true', 'yes', 'false', 'no', '__END__' - ), - // Internal Filters. - 3 => array( - 'AviSource', 'AviFileSource', 'AddBorders', 'AlignedSplice', 'AssumeFPS', 'AssumeScaledFPS', - 'AssumeFrameBased', 'AssumeFieldBased', 'AssumeBFF', 'AssumeTFF', 'Amplify', 'AmplifydB', - 'AssumeSampleRate', 'AudioDub', 'AudioDubEx', 'Animate', 'ApplyRange', - 'BicubicResize', 'BilinearResize', 'BlackmanResize', 'Blur', 'Bob', 'BlankClip', 'Blackness', - 'ColorYUV', 'ConvertBackToYUY2', 'ConvertToRGB', 'ConvertToRGB24', 'ConvertToRGB32', - 'ConvertToYUY2', 'ConvertToY8', 'ConvertToYV411', 'ConvertToYV12', 'ConvertToYV16', 'ConvertToYV24', - 'ColorKeyMask', 'Crop', 'CropBottom', 'ChangeFPS', 'ConvertFPS', 'ComplementParity', 'ConvertAudioTo8bit', - 'ConvertAudioTo16bit', 'ConvertAudioTo24bit', 'ConvertAudioTo32bit', 'ConvertAudioToFloat', 'ConvertToMono', - 'ConditionalFilter', 'ConditionalReader', 'ColorBars', 'Compare', - 'DirectShowSource', 'DeleteFrame', 'Dissolve', 'DuplicateFrame', 'DoubleWeave', 'DelayAudio', - 'EnsureVBRMP3Sync', - 'FixLuminance', 'FlipHorizontal', 'FlipVertical', 'FixBrokenChromaUpsampling', 'FadeIn0', 'FadeIn', - 'FadeIn2', 'FadeOut0', 'FadeOut', 'FadeOut2', 'FadeIO0', 'FadeIO', 'FadeIO2', 'FreezeFrame', 'FrameEvaluate', - 'GreyScale', 'GaussResize', 'GeneralConvolution', 'GetChannel', 'GetLeftChannel', 'GetRightChannel', - 'HorizontalReduceBy2', 'Histogram', - 'ImageReader', 'ImageSource', 'ImageWriter', 'Invert', 'Interleave', 'Info', - 'KillAudio', 'KillVideo', - 'Levels', 'Limiter', 'Layer', 'Letterbox', 'LanczosResize', 'Lanczos4Resize', 'Loop', - 'MergeARGB', 'MergeRGB', 'MergeChroma', 'MergeLuma', 'Merge', 'Mask', 'MaskHS', 'MergeChannels', 'MixAudio', - 'MonoToStereo', 'MessageClip', - 'Normalize', - 'OpenDMLSource', 'Overlay', - 'PointResize', 'PeculiarBlend', 'Pulldown', - 'RGBAdjust', 'ResetMask', 'Reverse', 'ResampleAudio', 'ReduceBy2', - 'SegmentedAviSource', 'SegmentedDirectShowSource', 'SoundOut', 'ShowAlpha', 'ShowRed', 'ShowGreen', - 'ShowBlue', 'SwapUV', 'Subtract', 'SincResize', 'Spline16Resize', 'Spline36Resize', 'Spline64Resize', - 'SelectEven', 'SelectOdd', 'SelectEvery', 'SelectRangeEvery', 'Sharpen', 'SpatialSoften', 'SeparateFields', - 'ShowFiveVersions', 'ShowFrameNumber', 'ShowSMPTE', 'ShowTime', 'StackHorizontal', 'StackVertical', 'Subtitle', - 'SwapFields', 'SuperEQ', 'SSRC', 'ScriptClip', - 'Tweak', 'TurnLeft', 'TurnRight', 'Turn180', 'TemporalSoften', 'TimeStretch', 'TCPServer', 'TCPSource', 'Trim', - 'Tone', - 'UToY', 'UToY8', 'UnalignedSplice', - 'VToY', 'VToY8', 'VerticalReduceBy2', 'Version', - 'WavSource', 'Weave', 'WriteFile', 'WriteFileIf', 'WriteFileStart', 'WriteFileEnd', - 'YToUV' - ), - // Internal functions. - 4 => array( - 'Abs', 'Apply', 'Assert', 'AverageLuma', 'AverageChromaU', 'AverageChromaV', - 'Ceil', 'Cos', 'Chr', 'ChromaUDifference', 'ChromaVDifference', - 'Defined', 'Default', - 'Exp', 'Exist', 'Eval', - 'Floor', 'Frac', 'Float', 'Findstr', 'GetMTMode', - 'HexValue', - 'Int', 'IsBool', 'IsClip', 'IsFloat', 'IsInt', 'IsString', 'Import', - 'LoadPlugin', 'Log', 'LCase', 'LeftStr', 'LumaDifference', 'LoadVirtualDubPlugin', 'LoadVFAPIPlugin', - 'LoadCPlugin', 'Load_Stdcall_Plugin', - 'Max', 'MulDiv', 'MidStr', - 'NOP', - 'OPT_AllowFloatAudio', 'OPT_UseWaveExtensible', - 'Pi', 'Pow', - 'Round', 'Rand', 'RevStr', 'RightStr', 'RGBDifference', 'RGBDifferenceFromPrevious', 'RGBDifferenceToNext', - 'Sin', 'Sqrt', 'Sign', 'Spline', 'StrLen', 'String', 'Select', 'SetMemoryMax', 'SetWorkingDir', 'SetMTMode', - 'SetPlanarLegacyAlignment', - 'Time', - 'UCase', 'UDifferenceFromPrevious', 'UDifferenceToNext', 'UPlaneMax', 'UPlaneMin', 'UPlaneMedian', - 'UPlaneMinMaxDifference', - 'Value', 'VersionNumber', 'VersionString', 'VDifferenceFromPrevious', 'VDifferenceToNext', 'VPlaneMax', - 'VPlaneMin', 'VPlaneMedian', 'VPlaneMinMaxDifference', - 'YDifferenceFromPrevious', 'YDifferenceToNext', 'YPlaneMax', 'YPlaneMin', 'YPlaneMedian', - 'YPlaneMinMaxDifference' - ) - ), - 'SYMBOLS' => array( - '+', '++', '-', '--', '/', '*', '%', - '=', '==', '<', '<=', '>', '>=', '<>', '!=', - '!', '?', ':', - '|', '||', '&&', - '\\', - '(', ')', '{', '}', - '.', ',' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color:#9966CC; font-weight:bold;', - 2 => 'color:#0000FF; font-weight:bold;', - 3 => 'color:#CC3300; font-weight:bold;', - 4 => 'color:#660000; font-weight:bold;' - ), - 'COMMENTS' => array( - 1 => 'color:#008000; font-style:italic;', - 'MULTI' => 'color:#000080; font-style:italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color:#000099;' - ), - 'BRACKETS' => array( - 0 => 'color:#006600; font-weight:bold;' - ), - 'STRINGS' => array( - 0 => 'color:#996600;' - ), - 'NUMBERS' => array( - 0 => 'color:#006666;' - ), - 'METHODS' => array( - 1 => 'color:#9900CC;' - ), - 'SYMBOLS' => array( - 0 => 'color:#006600; font-weight:bold;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://avisynth.org/mediawiki/{FNAME}', - 4 => '' - ), - 'REGEXPS' => array( - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 -); -?> diff --git a/_piecrust/libs/Geshi/geshi/awk.php b/_piecrust/libs/Geshi/geshi/awk.php deleted file mode 100644 index 38d7de1..0000000 --- a/_piecrust/libs/Geshi/geshi/awk.php +++ /dev/null @@ -1,158 +0,0 @@ - 'awk', - 'COMMENT_SINGLE' => array( - 1 => '#' - ), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array ( - 1 => array( - 'for', 'in', 'if', 'else', 'while', 'do', 'continue', 'break' - ), - 2 => array( - 'BEGIN', 'END' - ), - 3 => array( - 'ARGC', 'ARGV', 'CONVFMT', 'ENVIRON', - 'FILENAME', 'FNR', 'FS', 'NF', 'NR', 'OFMT', - 'OFS','ORS','RLENGTH','RS','RSTART','SUBSEP' - ), - 4 => array( - 'gsub','index','length','match','split', - 'sprintf','sub','substr','tolower','toupper', - 'atan2','cos','exp','int','log','rand', - 'sin','sqrt','srand' - ), - 5 => array( - 'print','printf','getline','close','fflush','system' - ), - 6 => array( - 'function', 'return' - ) - ), - 'SYMBOLS' => array ( - 0 => array( - '(',')','[',']','{','}' - ), - 1 => array( - '!','||','&&' - ), - 2 => array( - '<','>','<=','>=','==','!=' - ), - 3 => array( - '+','-','*','/','%','^','++','--' - ), - 4 => array( - '~','!~' - ), - 5 => array( - '?',':' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #C20CB9; font-weight: bold;', - 3 => 'color: #4107D5; font-weight: bold;', - 4 => 'color: #07D589; font-weight: bold;', - 5 => 'color: #0BD507; font-weight: bold;', - 6 => 'color: #078CD5; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color:#808080;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'SYMBOLS' => array( - 0 => 'color:black;', - 1 => 'color:black;', - 2 => 'color:black;', - 3 => 'color:black;', - 4 => 'color:#C4C364;', - 5 => 'color:black;font-weight:bold;'), - 'SCRIPT' => array(), - 'REGEXPS' => array( - 0 => 'color:#000088;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #000000;' - ), - 'BRACKETS' => array( - 0 => 'color: #7a0874; font-weight: bold;' - ), - 'METHODS' => array() - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array (), - 'REGEXPS' => array( - 0 => "\\$[a-zA-Z0-9_]+" - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array (), - 'HIGHLIGHT_STRICT_BLOCK' => array() -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/bash.php b/_piecrust/libs/Geshi/geshi/bash.php deleted file mode 100644 index 658111a..0000000 --- a/_piecrust/libs/Geshi/geshi/bash.php +++ /dev/null @@ -1,327 +0,0 @@ - 'Bash', - // Bash DOES have single line comments with # markers. But bash also has - // the $# variable, so comments need special handling (see sf.net - // 1564839) - 'COMMENT_SINGLE' => array('#'), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array( - //Variables - 1 => "/\\$\\{[^\\n\\}]*?\\}/i", - //BASH-style Heredoc - 2 => '/<<-?\s*?(\'?)([a-zA-Z0-9]+)\1\\n.*\\n\\2(?![a-zA-Z0-9])/siU', - //Escaped String Starters - 3 => "/\\\\['\"]/siU" - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'HARDQUOTE' => array("'", "'"), - 'HARDESCAPE' => array("\'"), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array( - //Simple Single Char Escapes - 1 => "#\\\\[nfrtv\\$\\\"\n]#i", - // $var - 2 => "#\\$[a-z_][a-z0-9_]*#i", - // ${...} - 3 => "/\\$\\{[^\\n\\}]*?\\}/i", - // $(...) - 4 => "/\\$\\([^\\n\\)]*?\\)/i", - // `...` - 5 => "/`[^`]*`/" - ), - 'KEYWORDS' => array( - 1 => array( - 'case', 'do', 'done', 'elif', 'else', 'esac', 'fi', 'for', 'function', - 'if', 'in', 'select', 'set', 'then', 'until', 'while', 'time' - ), - 2 => array( - 'aclocal', 'aconnect', 'aplay', 'apm', 'apmsleep', 'apropos', - 'apt-cache', 'apt-file', 'apt-get', 'apt-key', 'apt-src', 'aptitude', - 'ar', 'arch', 'arecord', 'as', 'as86', 'ash', 'autoconf', - 'autoheader', 'automake', 'awk', - - 'basename', 'bash', 'bc', 'bison', 'bunzip2', 'bzcat', - 'bzcmp', 'bzdiff', 'bzegrep', 'bzfgrep', 'bzgrep', - 'bzip2', 'bzip2recover', 'bzless', 'bzmore', - - 'c++', 'cal', 'cat', 'chattr', 'cc', 'cdda2wav', 'cdparanoia', - 'cdrdao', 'cd-read', 'cdrecord', 'chfn', 'chgrp', 'chmod', - 'chown', 'chroot', 'chsh', 'chvt', 'clear', 'cmp', 'comm', 'co', - 'col', 'cp', 'cpio', 'cpp', 'csh', 'cut', 'cvs', 'cvs-pserver', - - 'dash', 'date', 'dc', 'dch', 'dcop', 'dd', 'ddate', 'ddd', - 'deallocvt', 'debconf', 'defoma', 'depmod', 'df', 'dh', - 'dialog', 'diff', 'diff3', 'dig', 'dir', 'dircolors', 'directomatic', - 'dirname', 'dmesg', 'dnsdomainname', 'domainname', 'dpkg', - 'dselect', 'du', 'dumpkeys', - - 'ed', 'egrep', 'env', 'expr', - - 'false', 'fbset', 'ffmpeg', 'fgconsole','fgrep', 'file', 'find', - 'flex', 'flex++', 'fmt', 'free', 'ftp', 'funzip', 'fuser', - - 'g++', 'gawk', 'gc','gcc', 'gdb', 'getent', 'getkeycodes', - 'getopt', 'gettext', 'gettextize', 'gimp', 'gimp-remote', - 'gimptool', 'gmake', 'gocr', 'grep', 'groups', 'gs', 'gunzip', - 'gzexe', 'gzip', - - 'git', 'gitaction', 'git-add', 'git-add--interactive', 'git-am', - 'git-annotate', 'git-apply', 'git-archive', 'git-bisect', - 'git-bisect--helper', 'git-blame', 'git-branch', 'git-bundle', - 'git-cat-file', 'git-check-attr', 'git-checkout', - 'git-checkout-index', 'git-check-ref-format', 'git-cherry', - 'git-cherry-pick', 'git-clean', 'git-clone', 'git-commit', - 'git-commit-tree', 'git-config', 'git-count-objects', 'git-daemon', - 'git-describe', 'git-diff', 'git-diff-files', 'git-diff-index', - 'git-difftool', 'git-difftool--helper', 'git-diff-tree', - 'gitdpkgname', 'git-fast-export', 'git-fast-import', 'git-fetch', - 'git-fetch-pack', 'git-fetch--tool', 'git-filter-branch', 'gitfm', - 'git-fmt-merge-msg', 'git-for-each-ref', 'git-format-patch', - 'git-fsck', 'git-fsck-objects', 'git-gc', 'git-get-tar-commit-id', - 'git-grep', 'git-hash-object', 'git-help', 'git-http-fetch', - 'git-http-push', 'git-imap-send', 'git-index-pack', 'git-init', - 'git-init-db', 'git-instaweb', 'gitkeys', 'git-log', - 'git-lost-found', 'git-ls-files', 'git-ls-remote', 'git-ls-tree', - 'git-mailinfo', 'git-mailsplit', 'git-merge', 'git-merge-base', - 'git-merge-file', 'git-merge-index', 'git-merge-octopus', - 'git-merge-one-file', 'git-merge-ours', 'git-merge-recursive', - 'git-merge-resolve', 'git-merge-subtree', 'git-mergetool', - 'git-mergetool--lib', 'git-merge-tree', 'gitmkdirs', 'git-mktag', - 'git-mktree', 'gitmount', 'git-mv', 'git-name-rev', - 'git-pack-objects', 'git-pack-redundant', 'git-pack-refs', - 'git-parse-remote', 'git-patch-id', 'git-peek-remote', 'git-prune', - 'git-prune-packed', 'gitps', 'git-pull', 'git-push', - 'git-quiltimport', 'git-read-tree', 'git-rebase', - 'git-rebase--interactive', 'git-receive-pack', 'git-reflog', - 'gitregrep', 'git-relink', 'git-remote', 'git-repack', - 'git-repo-config', 'git-request-pull', 'git-rerere', 'git-reset', - 'git-revert', 'git-rev-list', 'git-rev-parse', 'gitrfgrep', - 'gitrgrep', 'git-rm', 'git-send-pack', 'git-shell', 'git-shortlog', - 'git-show', 'git-show-branch', 'git-show-index', 'git-show-ref', - 'git-sh-setup', 'git-stage', 'git-stash', 'git-status', - 'git-stripspace', 'git-submodule', 'git-svn', 'git-symbolic-ref', - 'git-tag', 'git-tar-tree', 'gitunpack', 'git-unpack-file', - 'git-unpack-objects', 'git-update-index', 'git-update-ref', - 'git-update-server-info', 'git-upload-archive', 'git-upload-pack', - 'git-var', 'git-verify-pack', 'git-verify-tag', 'gitview', - 'git-web--browse', 'git-whatchanged', 'gitwhich', 'gitwipe', - 'git-write-tree', 'gitxgrep', - - 'head', 'hexdump', 'hostname', - - 'id', 'ifconfig', 'ifdown', 'ifup', 'igawk', 'install', - - 'join', - - 'kbd_mode','kbdrate', 'kdialog', 'kfile', 'kill', 'killall', - - 'lame', 'last', 'lastb', 'ld', 'ld86', 'ldd', 'less', 'lex', 'link', - 'ln', 'loadkeys', 'loadunimap', 'locate', 'lockfile', 'login', - 'logname', 'lp', 'lpr', 'ls', 'lsattr', 'lsmod', 'lsmod.old', - 'lspci', 'ltrace', 'lynx', - - 'm4', 'make', 'man', 'mapscrn', 'mesg', 'mkdir', 'mkfifo', - 'mknod', 'mktemp', 'more', 'mount', 'mplayer', 'msgfmt', 'mv', - - 'namei', 'nano', 'nasm', 'nawk', 'netstat', 'nice', - 'nisdomainname', 'nl', 'nm', 'nm86', 'nmap', 'nohup', 'nop', - - 'od', 'openvt', - - 'passwd', 'patch', 'pcregrep', 'pcretest', 'perl', 'perror', - 'pgawk', 'pidof', 'ping', 'pr', 'procmail', 'prune', 'ps', 'pstree', - 'ps2ascii', 'ps2epsi', 'ps2frag', 'ps2pdf', 'ps2ps', 'psbook', - 'psmerge', 'psnup', 'psresize', 'psselect', 'pstops', - - 'rbash', 'rcs', 'rcs2log', 'read', 'readlink', 'red', 'resizecons', - 'rev', 'rm', 'rmdir', 'rsh', 'run-parts', - - 'sash', 'scp', 'screen', 'sed', 'seq', 'sendmail', 'setfont', - 'setkeycodes', 'setleds', 'setmetamode', 'setserial', 'setterm', - 'sh', 'showkey', 'shred', 'size', 'size86', 'skill', 'sleep', - 'slogin', 'snice', 'sort', 'sox', 'split', 'ssed', 'ssh', 'ssh-add', - 'ssh-agent', 'ssh-keygen', 'ssh-keyscan', 'stat', 'strace', - 'strings', 'strip', 'stty', 'su', 'sudo', 'suidperl', 'sum', 'svn', - 'svnadmin', 'svndumpfilter', 'svnlook', 'svnmerge', 'svnmucc', - 'svnserve', 'svnshell', 'svnsync', 'svnversion', 'svnwrap', 'sync', - - 'tac', 'tail', 'tar', 'tee', 'tempfile', 'touch', 'tr', 'tree', - 'true', - - 'umount', 'uname', 'unicode_start', 'unicode_stop', 'uniq', - 'unlink', 'unzip', 'updatedb', 'updmap', 'uptime', 'users', - 'utmpdump', 'uuidgen', - - 'valgrind', 'vdir', 'vi', 'vim', 'vmstat', - - 'w', 'wall', 'watch', 'wc', 'wget', 'whatis', 'whereis', - 'which', 'whiptail', 'who', 'whoami', 'whois', 'wine', 'wineboot', - 'winebuild', 'winecfg', 'wineconsole', 'winedbg', 'winedump', - 'winefile', 'wodim', 'write', - - 'xargs', 'xhost', 'xmodmap', 'xset', - - 'yacc', 'yes', 'ypdomainname', - - 'zcat', 'zcmp', 'zdiff', 'zdump', 'zegrep', 'zfgrep', 'zforce', - 'zgrep', 'zip', 'zipgrep', 'zipinfo', 'zless', 'zmore', 'znew', - 'zsh', 'zsoelim' - ), - 3 => array( - 'alias', 'bg', 'bind', 'break', 'builtin', 'cd', 'command', - 'compgen', 'complete', 'continue', 'declare', 'dirs', 'disown', - 'echo', 'enable', 'eval', 'exec', 'exit', 'export', 'fc', - 'fg', 'getopts', 'hash', 'help', 'history', 'jobs', 'let', - 'local', 'logout', 'popd', 'printf', 'pushd', 'pwd', 'readonly', - 'return', 'shift', 'shopt', 'source', 'suspend', 'test', 'times', - 'trap', 'type', 'typeset', 'ulimit', 'umask', 'unalias', 'unset', - 'wait' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', ';;', '`' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #c20cb9; font-weight: bold;', - 3 => 'color: #7a0874; font-weight: bold;' - ), - 'COMMENTS' => array( - 0 => 'color: #666666; font-style: italic;', - 1 => 'color: #800000;', - 2 => 'color: #cc0000; font-style: italic;', - 3 => 'color: #000000; font-weight: bold;' - ), - 'ESCAPE_CHAR' => array( - 1 => 'color: #000099; font-weight: bold;', - 2 => 'color: #007800;', - 3 => 'color: #007800;', - 4 => 'color: #007800;', - 5 => 'color: #780078;', - 'HARD' => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #7a0874; font-weight: bold;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;', - 'HARD' => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #000000;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #000000; font-weight: bold;' - ), - 'REGEXPS' => array( - 0 => 'color: #007800;', - 1 => 'color: #007800;', - 2 => 'color: #007800;', - 4 => 'color: #007800;', - 5 => 'color: #660033;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - //Variables (will be handled by comment_regexps) - 0 => "\\$\\{[a-zA-Z_][a-zA-Z0-9_]*?\\}", - //Variables without braces - 1 => "\\$[a-zA-Z_][a-zA-Z0-9_]*", - //Variable assignment - 2 => "(? "\\$[*#\$\\-\\?!\d]", - //Parameters of commands - 5 => "(?<=\s)--?[0-9a-zA-Z\-]+(?=[\s=]|<(?:SEMI|PIPE)>|$)" - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'COMMENTS' => array( - 'DISALLOWED_BEFORE' => '$' - ), - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "(? "(?![\.\-a-zA-Z0-9_%=\\/])" - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/basic4gl.php b/_piecrust/libs/Geshi/geshi/basic4gl.php deleted file mode 100644 index ee25ca7..0000000 --- a/_piecrust/libs/Geshi/geshi/basic4gl.php +++ /dev/null @@ -1,341 +0,0 @@ - 'Basic4GL', - 'COMMENT_SINGLE' => array(1 => "'"), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - - // Navy Blue Bold Keywords - - 'true','rnd_max','m_pi','m_e','false','VK_ZOOM','VK_UP','VK_TAB','VK_SUBTRACT','VK_SPACE','VK_SNAPSHOT', - 'VK_SHIFT','VK_SEPARATOR','VK_SELECT','VK_SCROLL','VK_RWIN','VK_RSHIFT','VK_RMENU','VK_RIGHT','VK_RETURN', - 'VK_RCONTROL','VK_RBUTTON','VK_PROCESSKEY','VK_PRIOR','VK_PRINT','VK_PLAY','VK_PAUSE','VK_NUMPAD9','VK_NUMPAD8', - 'VK_NUMPAD7','VK_NUMPAD6','VK_NUMPAD5','VK_NUMPAD4','VK_NUMPAD3','VK_NUMPAD2','VK_NUMPAD1','VK_NUMPAD0', - 'VK_NUMLOCK','VK_NONCONVERT','VK_NEXT','VK_MULTIPLY','VK_MODECHANGE','VK_MENU','VK_MBUTTON','VK_LWIN', - 'VK_LSHIFT','VK_LMENU','VK_LEFT','VK_LCONTROL','VK_LBUTTON','VK_KANJI','VK_KANA','VK_JUNJA','VK_INSERT', - 'VK_HOME','VK_HELP','VK_HANJA','VK_HANGUL','VK_HANGEUL','VK_FINAL','VK_F9','VK_F8','VK_F7','VK_F6','VK_F5', - 'VK_F4','VK_F3','VK_F24','VK_F23','VK_F22','VK_F21','VK_F20','VK_F2','VK_F19','VK_F18','VK_F17','VK_F16', - 'VK_F15','VK_F14','VK_F13','VK_F12','VK_F11','VK_F10','VK_F1','VK_EXSEL','VK_EXECUTE','VK_ESCAPE','VK_EREOF', - 'VK_END','VK_DOWN','VK_DIVIDE','VK_DELETE','VK_DECIMAL','VK_CRSEL','VK_CONVERT','VK_CONTROL','VK_CLEAR', - 'VK_CAPITAL','VK_CANCEL','VK_BACK','VK_ATTN','VK_APPS','VK_ADD','VK_ACCEPT','TEXT_SIMPLE','TEXT_OVERLAID', - 'TEXT_BUFFERED','SPR_TILEMAP','SPR_SPRITE','SPR_INVALID','MOUSE_RBUTTON','MOUSE_MBUTTON','MOUSE_LBUTTON', - 'GL_ZOOM_Y','GL_ZOOM_X','GL_ZERO','GL_XOR','GL_WIN_swap_hint','GL_WIN_draw_range_elements','GL_VIEWPORT_BIT', - 'GL_VIEWPORT','GL_VERTEX_ARRAY_TYPE_EXT','GL_VERTEX_ARRAY_TYPE','GL_VERTEX_ARRAY_STRIDE_EXT','GL_VERTEX_ARRAY_STRIDE', - 'GL_VERTEX_ARRAY_SIZE_EXT','GL_VERTEX_ARRAY_SIZE','GL_VERTEX_ARRAY_POINTER_EXT','GL_VERTEX_ARRAY_POINTER', - 'GL_VERTEX_ARRAY_EXT','GL_VERTEX_ARRAY_COUNT_EXT','GL_VERTEX_ARRAY','GL_VERSION_1_1','GL_VERSION','GL_VENDOR', - 'GL_V3F','GL_V2F','GL_UNSIGNED_SHORT','GL_UNSIGNED_INT','GL_UNSIGNED_BYTE','GL_UNPACK_SWAP_BYTES','GL_UNPACK_SKIP_ROWS', - 'GL_UNPACK_SKIP_PIXELS','GL_UNPACK_ROW_LENGTH','GL_UNPACK_LSB_FIRST','GL_UNPACK_ALIGNMENT','GL_TRUE','GL_TRIANGLE_STRIP', - 'GL_TRIANGLE_FAN','GL_TRIANGLES','GL_TRANSFORM_BIT','GL_TEXTURE_WRAP_T','GL_TEXTURE_WRAP_S','GL_TEXTURE_WIDTH', - 'GL_TEXTURE_STACK_DEPTH','GL_TEXTURE_RESIDENT','GL_TEXTURE_RED_SIZE','GL_TEXTURE_PRIORITY','GL_TEXTURE_MIN_FILTER', - 'GL_TEXTURE_MATRIX','GL_TEXTURE_MAG_FILTER','GL_TEXTURE_LUMINANCE_SIZE','GL_TEXTURE_INTERNAL_FORMAT','GL_TEXTURE_INTENSITY_SIZE', - 'GL_TEXTURE_HEIGHT','GL_TEXTURE_GREEN_SIZE','GL_TEXTURE_GEN_T','GL_TEXTURE_GEN_S','GL_TEXTURE_GEN_R','GL_TEXTURE_GEN_Q', - 'GL_TEXTURE_GEN_MODE','GL_TEXTURE_ENV_MODE','GL_TEXTURE_ENV_COLOR','GL_TEXTURE_ENV','GL_TEXTURE_COORD_ARRAY_TYPE_EXT', - 'GL_TEXTURE_COORD_ARRAY_TYPE','GL_TEXTURE_COORD_ARRAY_STRIDE_EXT','GL_TEXTURE_COORD_ARRAY_STRIDE','GL_TEXTURE_COORD_ARRAY_SIZE_EXT', - 'GL_TEXTURE_COORD_ARRAY_SIZE','GL_TEXTURE_COORD_ARRAY_POINTER_EXT','GL_TEXTURE_COORD_ARRAY_POINTER','GL_TEXTURE_COORD_ARRAY_EXT', - 'GL_TEXTURE_COORD_ARRAY_COUNT_EXT','GL_TEXTURE_COORD_ARRAY','GL_TEXTURE_COMPONENTS','GL_TEXTURE_BORDER_COLOR','GL_TEXTURE_BORDER', - 'GL_TEXTURE_BLUE_SIZE','GL_TEXTURE_BIT','GL_TEXTURE_BINDING_2D','GL_TEXTURE_BINDING_1D','GL_TEXTURE_ALPHA_SIZE', - 'GL_TEXTURE_2D','GL_TEXTURE_1D','GL_TEXTURE9_ARB','GL_TEXTURE9','GL_TEXTURE8_ARB','GL_TEXTURE8','GL_TEXTURE7_ARB', - 'GL_TEXTURE7','GL_TEXTURE6_ARB','GL_TEXTURE6','GL_TEXTURE5_ARB','GL_TEXTURE5','GL_TEXTURE4_ARB','GL_TEXTURE4', - 'GL_TEXTURE3_ARB','GL_TEXTURE31_ARB','GL_TEXTURE31','GL_TEXTURE30_ARB','GL_TEXTURE30','GL_TEXTURE3','GL_TEXTURE2_ARB', - 'GL_TEXTURE29_ARB','GL_TEXTURE29','GL_TEXTURE28_ARB','GL_TEXTURE28','GL_TEXTURE27_ARB','GL_TEXTURE27','GL_TEXTURE26_ARB', - 'GL_TEXTURE26','GL_TEXTURE25_ARB','GL_TEXTURE25','GL_TEXTURE24_ARB','GL_TEXTURE24','GL_TEXTURE23_ARB','GL_TEXTURE23', - 'GL_TEXTURE22_ARB','GL_TEXTURE22','GL_TEXTURE21_ARB','GL_TEXTURE21','GL_TEXTURE20_ARB','GL_TEXTURE20','GL_TEXTURE2', - 'GL_TEXTURE1_ARB','GL_TEXTURE19_ARB','GL_TEXTURE19','GL_TEXTURE18_ARB','GL_TEXTURE18','GL_TEXTURE17_ARB', - 'GL_TEXTURE17','GL_TEXTURE16_ARB','GL_TEXTURE16','GL_TEXTURE15_ARB','GL_TEXTURE15','GL_TEXTURE14_ARB','GL_TEXTURE14', - 'GL_TEXTURE13_ARB','GL_TEXTURE13','GL_TEXTURE12_ARB','GL_TEXTURE12','GL_TEXTURE11_ARB','GL_TEXTURE11','GL_TEXTURE10_ARB', - 'GL_TEXTURE10','GL_TEXTURE1','GL_TEXTURE0_ARB','GL_TEXTURE0','GL_TEXTURE','GL_T4F_V4F','GL_T4F_C4F_N3F_V4F','GL_T2F_V3F', - 'GL_T2F_N3F_V3F','GL_T2F_C4UB_V3F','GL_T2F_C4F_N3F_V3F','GL_T2F_C3F_V3F','GL_T','GL_SUBPIXEL_BITS','GL_STEREO', - 'GL_STENCIL_WRITEMASK','GL_STENCIL_VALUE_MASK','GL_STENCIL_TEST','GL_STENCIL_REF','GL_STENCIL_PASS_DEPTH_PASS', - 'GL_STENCIL_PASS_DEPTH_FAIL','GL_STENCIL_INDEX','GL_STENCIL_FUNC','GL_STENCIL_FAIL','GL_STENCIL_CLEAR_VALUE', - 'GL_STENCIL_BUFFER_BIT','GL_STENCIL_BITS','GL_STENCIL','GL_STACK_UNDERFLOW','GL_STACK_OVERFLOW','GL_SRC_COLOR', - 'GL_SRC_ALPHA_SATURATE','GL_SRC_ALPHA','GL_SPOT_EXPONENT','GL_SPOT_DIRECTION','GL_SPOT_CUTOFF','GL_SPHERE_MAP', - 'GL_SPECULAR','GL_SOURCE2_RGB_EXT','GL_SOURCE2_RGB','GL_SOURCE2_ALPHA_EXT','GL_SOURCE2_ALPHA','GL_SOURCE1_RGB_EXT', - 'GL_SOURCE1_RGB','GL_SOURCE1_ALPHA_EXT','GL_SOURCE1_ALPHA','GL_SOURCE0_RGB_EXT','GL_SOURCE0_RGB','GL_SOURCE0_ALPHA_EXT', - 'GL_SOURCE0_ALPHA','GL_SMOOTH','GL_SHORT','GL_SHININESS','GL_SHADE_MODEL','GL_SET','GL_SELECTION_BUFFER_SIZE', - 'GL_SELECTION_BUFFER_POINTER','GL_SELECT','GL_SCISSOR_TEST','GL_SCISSOR_BOX','GL_SCISSOR_BIT','GL_S','GL_RIGHT', - 'GL_RGB_SCALE_EXT','GL_RGB_SCALE','GL_RGBA_MODE','GL_RGBA8','GL_RGBA4','GL_RGBA2','GL_RGBA16','GL_RGBA12','GL_RGBA', - 'GL_RGB8','GL_RGB5_A1','GL_RGB5','GL_RGB4','GL_RGB16','GL_RGB12','GL_RGB10_A2','GL_RGB10','GL_RGB','GL_RETURN', - 'GL_REPLACE','GL_REPEAT','GL_RENDER_MODE','GL_RENDERER','GL_RENDER','GL_RED_SCALE','GL_RED_BITS','GL_RED_BIAS', - 'GL_RED','GL_READ_BUFFER','GL_R3_G3_B2','GL_R','GL_QUAD_STRIP','GL_QUADS','GL_QUADRATIC_ATTENUATION','GL_Q', - 'GL_PROXY_TEXTURE_2D','GL_PROXY_TEXTURE_1D','GL_PROJECTION_STACK_DEPTH','GL_PROJECTION_MATRIX','GL_PROJECTION', - 'GL_PRIMARY_COLOR_EXT','GL_PRIMARY_COLOR','GL_PREVIOUS_EXT','GL_PREVIOUS','GL_POSITION','GL_POLYGON_TOKEN', - 'GL_POLYGON_STIPPLE_BIT','GL_POLYGON_STIPPLE','GL_POLYGON_SMOOTH_HINT','GL_POLYGON_SMOOTH','GL_POLYGON_OFFSET_UNITS', - 'GL_POLYGON_OFFSET_POINT','GL_POLYGON_OFFSET_LINE','GL_POLYGON_OFFSET_FILL','GL_POLYGON_OFFSET_FACTOR','GL_POLYGON_MODE', - 'GL_POLYGON_BIT','GL_POLYGON','GL_POINT_TOKEN','GL_POINT_SMOOTH_HINT','GL_POINT_SMOOTH','GL_POINT_SIZE_RANGE', - 'GL_POINT_SIZE_GRANULARITY','GL_POINT_SIZE','GL_POINT_BIT','GL_POINTS','GL_POINT','GL_PIXEL_MODE_BIT', - 'GL_PIXEL_MAP_S_TO_S_SIZE','GL_PIXEL_MAP_S_TO_S','GL_PIXEL_MAP_R_TO_R_SIZE','GL_PIXEL_MAP_R_TO_R','GL_PIXEL_MAP_I_TO_R_SIZE', - 'GL_PIXEL_MAP_I_TO_R','GL_PIXEL_MAP_I_TO_I_SIZE','GL_PIXEL_MAP_I_TO_I','GL_PIXEL_MAP_I_TO_G_SIZE','GL_PIXEL_MAP_I_TO_G', - 'GL_PIXEL_MAP_I_TO_B_SIZE','GL_PIXEL_MAP_I_TO_B','GL_PIXEL_MAP_I_TO_A_SIZE','GL_PIXEL_MAP_I_TO_A','GL_PIXEL_MAP_G_TO_G_SIZE', - 'GL_PIXEL_MAP_G_TO_G','GL_PIXEL_MAP_B_TO_B_SIZE','GL_PIXEL_MAP_B_TO_B','GL_PIXEL_MAP_A_TO_A_SIZE','GL_PIXEL_MAP_A_TO_A', - 'GL_PHONG_WIN','GL_PHONG_HINT_WIN','GL_PERSPECTIVE_CORRECTION_HINT','GL_PASS_THROUGH_TOKEN','GL_PACK_SWAP_BYTES', - 'GL_PACK_SKIP_ROWS','GL_PACK_SKIP_PIXELS','GL_PACK_ROW_LENGTH','GL_PACK_LSB_FIRST','GL_PACK_ALIGNMENT','GL_OUT_OF_MEMORY', - 'GL_OR_REVERSE','GL_OR_INVERTED','GL_ORDER','GL_OR','GL_OPERAND2_RGB_EXT','GL_OPERAND2_RGB','GL_OPERAND2_ALPHA_EXT', - 'GL_OPERAND2_ALPHA','GL_OPERAND1_RGB_EXT','GL_OPERAND1_RGB','GL_OPERAND1_ALPHA_EXT','GL_OPERAND1_ALPHA','GL_OPERAND0_RGB_EXT', - 'GL_OPERAND0_RGB','GL_OPERAND0_ALPHA_EXT','GL_OPERAND0_ALPHA','GL_ONE_MINUS_SRC_COLOR','GL_ONE_MINUS_SRC_ALPHA', - 'GL_ONE_MINUS_DST_COLOR','GL_ONE_MINUS_DST_ALPHA','GL_ONE','GL_OBJECT_PLANE','GL_OBJECT_LINEAR','GL_NO_ERROR', - 'GL_NOTEQUAL','GL_NORMAL_ARRAY_TYPE_EXT','GL_NORMAL_ARRAY_TYPE','GL_NORMAL_ARRAY_STRIDE_EXT','GL_NORMAL_ARRAY_STRIDE', - 'GL_NORMAL_ARRAY_POINTER_EXT','GL_NORMAL_ARRAY_POINTER','GL_NORMAL_ARRAY_EXT','GL_NORMAL_ARRAY_COUNT_EXT', - 'GL_NORMAL_ARRAY','GL_NORMALIZE','GL_NOR','GL_NOOP','GL_NONE','GL_NICEST','GL_NEVER','GL_NEAREST_MIPMAP_NEAREST','GL_NEAREST_MIPMAP_LINEAR', - 'GL_NEAREST','GL_NAND','GL_NAME_STACK_DEPTH','GL_N3F_V3F','GL_MULT','GL_MODULATE','GL_MODELVIEW_STACK_DEPTH','GL_MODELVIEW_MATRIX', - 'GL_MODELVIEW','GL_MAX_VIEWPORT_DIMS','GL_MAX_TEXTURE_UNITS_ARB','GL_MAX_TEXTURE_UNITS','GL_MAX_TEXTURE_STACK_DEPTH', - 'GL_MAX_TEXTURE_SIZE','GL_MAX_PROJECTION_STACK_DEPTH','GL_MAX_PIXEL_MAP_TABLE','GL_MAX_NAME_STACK_DEPTH','GL_MAX_MODELVIEW_STACK_DEPTH', - 'GL_MAX_LIST_NESTING','GL_MAX_LIGHTS','GL_MAX_EVAL_ORDER','GL_MAX_ELEMENTS_VERTICES_WIN','GL_MAX_ELEMENTS_INDICES_WIN', - 'GL_MAX_CLIP_PLANES','GL_MAX_CLIENT_ATTRIB_STACK_DEPTH','GL_MAX_ATTRIB_STACK_DEPTH','GL_MATRIX_MODE','GL_MAP_STENCIL', - 'GL_MAP_COLOR','GL_MAP2_VERTEX_4','GL_MAP2_VERTEX_3','GL_MAP2_TEXTURE_COORD_4','GL_MAP2_TEXTURE_COORD_3','GL_MAP2_TEXTURE_COORD_2', - 'GL_MAP2_TEXTURE_COORD_1','GL_MAP2_NORMAL','GL_MAP2_INDEX','GL_MAP2_GRID_SEGMENTS','GL_MAP2_GRID_DOMAIN','GL_MAP2_COLOR_4', - 'GL_MAP1_VERTEX_4','GL_MAP1_VERTEX_3','GL_MAP1_TEXTURE_COORD_4','GL_MAP1_TEXTURE_COORD_3','GL_MAP1_TEXTURE_COORD_2', - 'GL_MAP1_TEXTURE_COORD_1','GL_MAP1_NORMAL','GL_MAP1_INDEX','GL_MAP1_GRID_SEGMENTS','GL_MAP1_GRID_DOMAIN', - 'GL_MAP1_COLOR_4','GL_LUMINANCE_ALPHA','GL_LUMINANCE8_ALPHA8','GL_LUMINANCE8','GL_LUMINANCE6_ALPHA2','GL_LUMINANCE4_ALPHA4', - 'GL_LUMINANCE4','GL_LUMINANCE16_ALPHA16','GL_LUMINANCE16','GL_LUMINANCE12_ALPHA4','GL_LUMINANCE12_ALPHA12','GL_LUMINANCE12', - 'GL_LUMINANCE','GL_LOGIC_OP_MODE','GL_LOGIC_OP','GL_LOAD','GL_LIST_MODE','GL_LIST_INDEX','GL_LIST_BIT', - 'GL_LIST_BASE','GL_LINE_WIDTH_RANGE','GL_LINE_WIDTH_GRANULARITY','GL_LINE_WIDTH','GL_LINE_TOKEN','GL_LINE_STRIP','GL_LINE_STIPPLE_REPEAT', - 'GL_LINE_STIPPLE_PATTERN','GL_LINE_STIPPLE','GL_LINE_SMOOTH_HINT','GL_LINE_SMOOTH','GL_LINE_RESET_TOKEN','GL_LINE_LOOP', - 'GL_LINE_BIT','GL_LINES','GL_LINEAR_MIPMAP_NEAREST','GL_LINEAR_MIPMAP_LINEAR','GL_LINEAR_ATTENUATION','GL_LINEAR', - 'GL_LINE','GL_LIGHT_MODEL_TWO_SIDE','GL_LIGHT_MODEL_LOCAL_VIEWER','GL_LIGHT_MODEL_AMBIENT','GL_LIGHTING_BIT', - 'GL_LIGHTING','GL_LIGHT7','GL_LIGHT6','GL_LIGHT5','GL_LIGHT4','GL_LIGHT3','GL_LIGHT2','GL_LIGHT1','GL_LIGHT0', - 'GL_LESS','GL_LEQUAL','GL_LEFT','GL_KEEP','GL_INVERT','GL_INVALID_VALUE','GL_INVALID_OPERATION','GL_INVALID_ENUM','GL_INTERPOLATE_EXT', - 'GL_INTERPOLATE','GL_INTENSITY8','GL_INTENSITY4','GL_INTENSITY16','GL_INTENSITY12','GL_INTENSITY','GL_INT', - 'GL_INDEX_WRITEMASK','GL_INDEX_SHIFT','GL_INDEX_OFFSET','GL_INDEX_MODE','GL_INDEX_LOGIC_OP','GL_INDEX_CLEAR_VALUE','GL_INDEX_BITS', - 'GL_INDEX_ARRAY_TYPE_EXT','GL_INDEX_ARRAY_TYPE','GL_INDEX_ARRAY_STRIDE_EXT','GL_INDEX_ARRAY_STRIDE','GL_INDEX_ARRAY_POINTER_EXT', - 'GL_INDEX_ARRAY_POINTER','GL_INDEX_ARRAY_EXT','GL_INDEX_ARRAY_COUNT_EXT','GL_INDEX_ARRAY','GL_INCR','GL_HINT_BIT', - 'GL_GREEN_SCALE','GL_GREEN_BITS','GL_GREEN_BIAS','GL_GREEN','GL_GREATER','GL_GEQUAL','GL_FRONT_RIGHT','GL_FRONT_LEFT', - 'GL_FRONT_FACE','GL_FRONT_AND_BACK','GL_FRONT','GL_FOG_START','GL_FOG_SPECULAR_TEXTURE_WIN','GL_FOG_MODE','GL_FOG_INDEX', - 'GL_FOG_HINT','GL_FOG_END','GL_FOG_DENSITY','GL_FOG_COLOR','GL_FOG_BIT','GL_FOG','GL_FLOAT','GL_FLAT','GL_FILL', - 'GL_FEEDBACK_BUFFER_TYPE','GL_FEEDBACK_BUFFER_SIZE','GL_FEEDBACK_BUFFER_POINTER','GL_FEEDBACK','GL_FASTEST','GL_FALSE', - 'GL_EYE_PLANE','GL_EYE_LINEAR','GL_EXT_vertex_array','GL_EXT_paletted_texture','GL_EXT_bgra','GL_EXTENSIONS','GL_EXP2', - 'GL_EXP','GL_EVAL_BIT','GL_EQUIV','GL_EQUAL','GL_ENABLE_BIT','GL_EMISSION','GL_EDGE_FLAG_ARRAY_STRIDE_EXT','GL_EDGE_FLAG_ARRAY_STRIDE', - 'GL_EDGE_FLAG_ARRAY_POINTER_EXT','GL_EDGE_FLAG_ARRAY_POINTER','GL_EDGE_FLAG_ARRAY_EXT','GL_EDGE_FLAG_ARRAY_COUNT_EXT','GL_EDGE_FLAG_ARRAY', - 'GL_EDGE_FLAG','GL_DST_COLOR','GL_DST_ALPHA','GL_DRAW_PIXEL_TOKEN','GL_DRAW_BUFFER','GL_DOUBLE_EXT','GL_DOUBLEBUFFER', - 'GL_DOUBLE','GL_DONT_CARE','GL_DOMAIN','GL_DITHER','GL_DIFFUSE','GL_DEPTH_WRITEMASK','GL_DEPTH_TEST','GL_DEPTH_SCALE', - 'GL_DEPTH_RANGE','GL_DEPTH_FUNC','GL_DEPTH_COMPONENT','GL_DEPTH_CLEAR_VALUE','GL_DEPTH_BUFFER_BIT','GL_DEPTH_BITS', - 'GL_DEPTH_BIAS','GL_DEPTH','GL_DECR','GL_DECAL','GL_CW','GL_CURRENT_TEXTURE_COORDS','GL_CURRENT_RASTER_TEXTURE_COORDS','GL_CURRENT_RASTER_POSITION_VALID', - 'GL_CURRENT_RASTER_POSITION','GL_CURRENT_RASTER_INDEX','GL_CURRENT_RASTER_DISTANCE','GL_CURRENT_RASTER_COLOR','GL_CURRENT_NORMAL', - 'GL_CURRENT_INDEX','GL_CURRENT_COLOR','GL_CURRENT_BIT','GL_CULL_FACE_MODE','GL_CULL_FACE','GL_COPY_PIXEL_TOKEN', - 'GL_COPY_INVERTED','GL_COPY','GL_CONSTANT_EXT','GL_CONSTANT_ATTENUATION','GL_CONSTANT','GL_COMPILE_AND_EXECUTE','GL_COMPILE','GL_COMBINE_RGB_EXT', - 'GL_COMBINE_RGB','GL_COMBINE_EXT','GL_COMBINE_ALPHA_EXT','GL_COMBINE_ALPHA','GL_COMBINE','GL_COLOR_WRITEMASK', - 'GL_COLOR_TABLE_WIDTH_EXT','GL_COLOR_TABLE_RED_SIZE_EXT','GL_COLOR_TABLE_LUMINANCE_SIZE_EXT','GL_COLOR_TABLE_INTENSITY_SIZE_EXT', - 'GL_COLOR_TABLE_GREEN_SIZE_EXT','GL_COLOR_TABLE_FORMAT_EXT','GL_COLOR_TABLE_BLUE_SIZE_EXT','GL_COLOR_TABLE_ALPHA_SIZE_EXT', - 'GL_COLOR_MATERIAL_PARAMETER','GL_COLOR_MATERIAL_FACE','GL_COLOR_MATERIAL','GL_COLOR_LOGIC_OP','GL_COLOR_INDEXES', - 'GL_COLOR_INDEX8_EXT','GL_COLOR_INDEX4_EXT','GL_COLOR_INDEX2_EXT','GL_COLOR_INDEX1_EXT','GL_COLOR_INDEX16_EXT', - 'GL_COLOR_INDEX12_EXT','GL_COLOR_INDEX','GL_COLOR_CLEAR_VALUE','GL_COLOR_BUFFER_BIT','GL_COLOR_ARRAY_TYPE_EXT', - 'GL_COLOR_ARRAY_TYPE','GL_COLOR_ARRAY_STRIDE_EXT','GL_COLOR_ARRAY_STRIDE','GL_COLOR_ARRAY_SIZE_EXT','GL_COLOR_ARRAY_SIZE', - 'GL_COLOR_ARRAY_POINTER_EXT','GL_COLOR_ARRAY_POINTER','GL_COLOR_ARRAY_EXT','GL_COLOR_ARRAY_COUNT_EXT','GL_COLOR_ARRAY', - 'GL_COLOR','GL_COEFF','GL_CLIP_PLANE5','GL_CLIP_PLANE4','GL_CLIP_PLANE3','GL_CLIP_PLANE2','GL_CLIP_PLANE1','GL_CLIP_PLANE0', - 'GL_CLIENT_VERTEX_ARRAY_BIT','GL_CLIENT_PIXEL_STORE_BIT','GL_CLIENT_ATTRIB_STACK_DEPTH','GL_CLIENT_ALL_ATTRIB_BITS', - 'GL_CLIENT_ACTIVE_TEXTURE_ARB','GL_CLIENT_ACTIVE_TEXTURE','GL_CLEAR','GL_CLAMP','GL_CCW','GL_C4UB_V3F','GL_C4UB_V2F', - 'GL_C4F_N3F_V3F','GL_C3F_V3F','GL_BYTE','GL_BLUE_SCALE','GL_BLUE_BITS','GL_BLUE_BIAS','GL_BLUE','GL_BLEND_SRC','GL_BLEND_DST', - 'GL_BLEND','GL_BITMAP_TOKEN','GL_BITMAP','GL_BGR_EXT','GL_BGRA_EXT','GL_BACK_RIGHT','GL_BACK_LEFT','GL_BACK', - 'GL_AUX_BUFFERS','GL_AUX3','GL_AUX2','GL_AUX1','GL_AUX0','GL_AUTO_NORMAL','GL_ATTRIB_STACK_DEPTH','GL_AND_REVERSE', - 'GL_AND_INVERTED','GL_AND','GL_AMBIENT_AND_DIFFUSE','GL_AMBIENT','GL_ALWAYS','GL_ALPHA_TEST_REF','GL_ALPHA_TEST_FUNC', - 'GL_ALPHA_TEST','GL_ALPHA_SCALE','GL_ALPHA_BITS','GL_ALPHA_BIAS','GL_ALPHA8','GL_ALPHA4','GL_ALPHA16','GL_ALPHA12', - 'GL_ALPHA','GL_ALL_ATTRIB_BITS','GL_ADD_SIGNED_EXT','GL_ADD_SIGNED','GL_ADD','GL_ACTIVE_TEXTURE_ARB','GL_ACTIVE_TEXTURE', - 'GL_ACCUM_RED_BITS','GL_ACCUM_GREEN_BITS','GL_ACCUM_CLEAR_VALUE','GL_ACCUM_BUFFER_BIT','GL_ACCUM_BLUE_BITS','GL_ACCUM_ALPHA_BITS', - 'GL_ACCUM','GL_4_BYTES','GL_4D_COLOR_TEXTURE','GL_3_BYTES','GL_3D_COLOR_TEXTURE','GL_3D_COLOR','GL_3D','GL_2_BYTES', - 'GL_2D','GLU_V_STEP','GLU_VERTEX','GLU_VERSION_1_2','GLU_VERSION_1_1','GLU_VERSION','GLU_U_STEP','GLU_UNKNOWN','GLU_TRUE', - 'GLU_TESS_WINDING_RULE','GLU_TESS_WINDING_POSITIVE','GLU_TESS_WINDING_ODD','GLU_TESS_WINDING_NONZERO','GLU_TESS_WINDING_NEGATIVE', - 'GLU_TESS_WINDING_ABS_GEQ_TWO','GLU_TESS_VERTEX_DATA','GLU_TESS_VERTEX','GLU_TESS_TOLERANCE','GLU_TESS_NEED_COMBINE_CALLBACK','GLU_TESS_MISSING_END_POLYGON', - 'GLU_TESS_MISSING_END_CONTOUR','GLU_TESS_MISSING_BEGIN_POLYGON','GLU_TESS_MISSING_BEGIN_CONTOUR','GLU_TESS_ERROR_DATA', - 'GLU_TESS_ERROR8','GLU_TESS_ERROR7','GLU_TESS_ERROR6','GLU_TESS_ERROR5','GLU_TESS_ERROR4','GLU_TESS_ERROR3','GLU_TESS_ERROR2', - 'GLU_TESS_ERROR1','GLU_TESS_ERROR','GLU_TESS_END_DATA','GLU_TESS_END','GLU_TESS_EDGE_FLAG_DATA','GLU_TESS_EDGE_FLAG', - 'GLU_TESS_COORD_TOO_LARGE','GLU_TESS_COMBINE_DATA','GLU_TESS_COMBINE','GLU_TESS_BOUNDARY_ONLY','GLU_TESS_BEGIN_DATA', - 'GLU_TESS_BEGIN','GLU_SMOOTH','GLU_SILHOUETTE','GLU_SAMPLING_TOLERANCE','GLU_SAMPLING_METHOD','GLU_POINT','GLU_PATH_LENGTH', - 'GLU_PARAMETRIC_TOLERANCE','GLU_PARAMETRIC_ERROR','GLU_OUT_OF_MEMORY','GLU_OUTSIDE','GLU_OUTLINE_POLYGON','GLU_OUTLINE_PATCH', - 'GLU_NURBS_ERROR9','GLU_NURBS_ERROR8','GLU_NURBS_ERROR7','GLU_NURBS_ERROR6','GLU_NURBS_ERROR5','GLU_NURBS_ERROR4', - 'GLU_NURBS_ERROR37','GLU_NURBS_ERROR36','GLU_NURBS_ERROR35','GLU_NURBS_ERROR34','GLU_NURBS_ERROR33','GLU_NURBS_ERROR32', - 'GLU_NURBS_ERROR31','GLU_NURBS_ERROR30','GLU_NURBS_ERROR3','GLU_NURBS_ERROR29','GLU_NURBS_ERROR28','GLU_NURBS_ERROR27','GLU_NURBS_ERROR26', - 'GLU_NURBS_ERROR25','GLU_NURBS_ERROR24','GLU_NURBS_ERROR23','GLU_NURBS_ERROR22','GLU_NURBS_ERROR21','GLU_NURBS_ERROR20', - 'GLU_NURBS_ERROR2','GLU_NURBS_ERROR19','GLU_NURBS_ERROR18','GLU_NURBS_ERROR17','GLU_NURBS_ERROR16','GLU_NURBS_ERROR15','GLU_NURBS_ERROR14', - 'GLU_NURBS_ERROR13','GLU_NURBS_ERROR12','GLU_NURBS_ERROR11','GLU_NURBS_ERROR10','GLU_NURBS_ERROR1','GLU_NONE', - 'GLU_MAP1_TRIM_3','GLU_MAP1_TRIM_2','GLU_LINE','GLU_INVALID_VALUE','GLU_INVALID_ENUM','GLU_INTERIOR','GLU_INSIDE','GLU_INCOMPATIBLE_GL_VERSION', - 'GLU_FLAT','GLU_FILL','GLU_FALSE','GLU_EXTERIOR','GLU_EXTENSIONS','GLU_ERROR','GLU_END','GLU_EDGE_FLAG','GLU_DOMAIN_DISTANCE', - 'GLU_DISPLAY_MODE','GLU_CW','GLU_CULLING','GLU_CCW','GLU_BEGIN','GLU_AUTO_LOAD_MATRIX','CHANNEL_UNORDERED','CHANNEL_ORDERED', - 'CHANNEL_MAX' - ), - 2 => array( - - // Red Lowercase Keywords - - 'WriteWord','WriteString','WriteReal','WriteLine','WriteInt','WriteFloat','WriteDouble','WriteChar','WriteByte', - 'windowwidth','windowheight','waittimer','Vec4','Vec3','Vec2','val','UpdateJoystick','ucase$','Transpose','tickcount', - 'textscroll','textrows','textmode','textcols','tanh','tand','tan','synctimercatchup','synctimer','swapbuffers', - 'str$','stopsoundvoice','stopsounds','stopmusic','sqrt','sqr','sprzorder','spryvel','sprytiles','sprysize','spryrepeat', - 'spryflip','sprycentre','spry','sprxvel','sprxtiles','sprxsize','sprxrepeat','sprxflip','sprxcentre','sprx', - 'sprvisible','sprvel','sprtype','sprtop','sprspin','sprsolid','sprsetzorder','sprsetyvel','sprsetysize','sprsetyrepeat', - 'sprsetyflip','sprsetycentre','sprsety','sprsetxvel','sprsetxsize','sprsetxrepeat','sprsetxflip','sprsetxcentre', - 'sprsetx','sprsetvisible','sprsetvel','sprsettiles','sprsettextures','sprsettexture','sprsetspin','sprsetsolid', - 'sprsetsize','sprsetscale','sprsetpos','sprsetparallax','sprsetframe','sprsetcolor','sprsetanimspeed','sprsetanimloop', - 'sprsetangle','sprsetalpha','sprscale','sprright','sprpos','sprparallax','sprleft','spriteareawidth','spriteareaheight', - 'sprframe','sprcolor','sprcameraz','sprcameray','sprcamerax','sprcamerasetz','sprcamerasety','sprcamerasetx', - 'sprcamerasetpos','sprcamerasetfov','sprcamerasetangle','sprcamerapos','sprcamerafov','sprcameraangle', - 'sprbottom','spranimspeed','spranimloop','spranimdone','sprangle','spralpha','spraddtextures','spraddtexture', - 'sounderror','sleep','sind','sin','showcursor','sgn','settextscroll','setmusicvolume','SendMessage','Seek', - 'scankeydown','RTInvert','rnd','right$','resizetext','resizespritearea','RejectConnection','ReceiveMessage','ReadWord', - 'ReadText','ReadReal','ReadLine','ReadInt','ReadFloat','ReadDouble','ReadChar','ReadByte','randomize','printr', - 'print','pow','playsound','playmusic','performancecounter','Orthonormalize','OpenFileWrite','OpenFileRead','Normalize', - 'newtilemap','newsprite','NewServer','NewConnection','musicplaying','mouse_yd','mouse_y','mouse_xd','mouse_x', - 'mouse_wheel','mouse_button','mid$','MessageSmoothed','MessageReliable','MessagePending','MessageChannel','maxtextureunits', - 'MatrixZero','MatrixTranslate','MatrixScale','MatrixRotateZ','MatrixRotateY','MatrixRotateX','MatrixRotate','MatrixIdentity', - 'MatrixCrossProduct','MatrixBasis','log','locate','loadtexture','loadsound','loadmipmaptexture','loadmipmapimagestrip', - 'loadimagestrip','loadimage','Length','len','left$','lcase$','keydown','Joy_Y','Joy_X','Joy_Up','Joy_Right','Joy_Left', - 'Joy_Keys','Joy_Down','Joy_Button','Joy_3','Joy_2','Joy_1','Joy_0','int','inscankey','input$','inkey$','inittimer', - 'imagewidth','imagestripframes','imageheight','imageformat','imagedatatype','hidecursor','glViewport','glVertex4sv', - 'glVertex4s','glVertex4iv','glVertex4i','glVertex4fv','glVertex4f','glVertex4dv','glVertex4d','glVertex3sv','glVertex3s', - 'glVertex3iv','glVertex3i','glVertex3fv','glVertex3f','glVertex3dv','glVertex3d','glVertex2sv','glVertex2s','glVertex2iv', - 'glVertex2i','glVertex2fv','glVertex2f','glVertex2dv','glVertex2d','gluPerspective','gluOrtho2D','gluLookAt', - 'glubuild2dmipmaps','glTranslatef','glTranslated','gltexsubimage2d','glTexParameteriv','glTexParameteri', - 'glTexParameterfv','glTexParameterf','glteximage2d','glTexGeniv','glTexGeni','glTexGenfv','glTexGenf','glTexGendv', - 'glTexGend','glTexEnviv','glTexEnvi','glTexEnvfv','glTexEnvf','glTexCoord4sv','glTexCoord4s','glTexCoord4iv','glTexCoord4i', - 'glTexCoord4fv','glTexCoord4f','glTexCoord4dv','glTexCoord4d','glTexCoord3sv','glTexCoord3s','glTexCoord3iv','glTexCoord3i', - 'glTexCoord3fv','glTexCoord3f','glTexCoord3dv','glTexCoord3d','glTexCoord2sv','glTexCoord2s','glTexCoord2iv','glTexCoord2i', - 'glTexCoord2fv','glTexCoord2f','glTexCoord2dv','glTexCoord2d','glTexCoord1sv','glTexCoord1s','glTexCoord1iv','glTexCoord1i','glTexCoord1fv', - 'glTexCoord1f','glTexCoord1dv','glTexCoord1d','glStencilOp','glStencilMask','glStencilFunc','glShadeModel','glSelectBuffer', - 'glScissor','glScalef','glScaled','glRotatef','glRotated','glRenderMode','glRectsv','glRects','glRectiv','glRecti', - 'glRectfv','glRectf','glRectdv','glRectd','glReadBuffer','glRasterPos4sv','glRasterPos4s','glRasterPos4iv', - 'glRasterPos4i','glRasterPos4fv','glRasterPos4f','glRasterPos4dv','glRasterPos4d','glRasterPos3sv','glRasterPos3s', - 'glRasterPos3iv','glRasterPos3i','glRasterPos3fv','glRasterPos3f','glRasterPos3dv','glRasterPos3d','glRasterPos2sv', - 'glRasterPos2s','glRasterPos2iv','glRasterPos2i','glRasterPos2fv','glRasterPos2f','glRasterPos2dv','glRasterPos2d', - 'glPushName','glPushMatrix','glPushClientAttrib','glPushAttrib','glPrioritizeTextures','glPopName','glPopMatrix', - 'glPopClientAttrib','glPopAttrib','glpolygonstipple','glPolygonOffset','glPolygonMode','glPointSize','glPixelZoom', - 'glPixelTransferi','glPixelTransferf','glPixelStorei','glPixelStoref','glPassThrough','glOrtho','glNormal3sv','glNormal3s', - 'glNormal3iv','glNormal3i','glNormal3fv','glNormal3f','glNormal3dv','glNormal3d','glNormal3bv','glNormal3b','glNewList', - 'glMultMatrixf','glMultMatrixd','glmultitexcoord2f','glmultitexcoord2d','glMatrixMode','glMaterialiv','glMateriali', - 'glMaterialfv','glMaterialf','glMapGrid2f','glMapGrid2d','glMapGrid1f','glMapGrid1d','glLogicOp','glLoadName','glLoadMatrixf', - 'glLoadMatrixd','glLoadIdentity','glListBase','glLineWidth','glLineStipple','glLightModeliv','glLightModeli','glLightModelfv', - 'glLightModelf','glLightiv','glLighti','glLightfv','glLightf','glIsTexture','glIsList','glIsEnabled','glInitNames', - 'glIndexubv','glIndexub','glIndexsv','glIndexs','glIndexMask','glIndexiv','glIndexi','glIndexfv','glIndexf','glIndexdv', - 'glIndexd','glHint','glGetTexParameteriv','glGetTexParameterfv','glGetTexLevelParameteriv','glGetTexLevelParameterfv', - 'glGetTexGeniv','glGetTexGenfv','glGetTexGendv','glGetTexEnviv','glGetTexEnvfv','glgetstring','glgetpolygonstipple','glGetPixelMapuiv', - 'glGetMaterialiv','glGetMaterialfv','glGetLightiv','glGetLightfv','glGetIntegerv','glGetFloatv', - 'glGetError','glGetDoublev','glGetClipPlane','glGetBooleanv','glgentextures','glgentexture', - 'glgenlists','glFrustum','glFrontFace','glFogiv','glFogi','glFogfv','glFogf','glFlush','glFinish','glFeedbackBuffer', - 'glEvalPoint2','glEvalPoint1','glEvalMesh2','glEvalMesh1','glEvalCoord2fv','glEvalCoord2f','glEvalCoord2dv','glEvalCoord2d', - 'glEvalCoord1fv','glEvalCoord1f','glEvalCoord1dv','glEvalCoord1d','glEndList','glEnd','glEnableClientState','glEnable', - 'glEdgeFlagv','glEdgeFlag','glDrawBuffer','glDrawArrays','glDisableClientState','glDisable','glDepthRange','glDepthMask', - 'glDepthFunc','gldeletetextures','gldeletetexture','gldeletelists','glCullFace','glCopyTexSubImage2D','glCopyTexSubImage1D', - 'glCopyTexImage2D','glCopyTexImage1D','glColorMaterial','glColorMask','glColor4usv','glColor4us','glColor4uiv','glColor4ui', - 'glColor4ubv','glColor4ub','glColor4sv','glColor4s','glColor4iv','glColor4i','glColor4fv','glColor4f','glColor4dv', - 'glColor4d','glColor4bv','glColor4b','glColor3usv','glColor3us','glColor3uiv','glColor3ui','glColor3ubv','glColor3ub', - 'glColor3sv','glColor3s','glColor3iv','glColor3i','glColor3fv','glColor3f','glColor3dv','glColor3d','glColor3bv', - 'glColor3b','glClipPlane','glClearStencil','glClearIndex','glClearDepth','glClearColor','glClearAccum','glClear', - 'glcalllists','glCallList','glBlendFunc','glBindTexture','glBegin','glArrayElement','glAreTexturesResident', - 'glAlphaFunc','glactivetexture','glAccum','font','FindNextFile','FindFirstFile','FindClose','FileError', - 'extensionsupported','exp','execute','EndOfFile','drawtext','divbyzero','Determinant','deletesprite','deletesound', - 'DeleteServer','deleteimage','DeleteConnection','defaultfont','CrossProduct','cosd','cos','copysprite','ConnectionPending', - 'ConnectionHandShaking','ConnectionConnected','ConnectionAddress','compilererrorline','compilererrorcol','compilererror', - 'compilefile','compile','color','cls','CloseFile','clearregion','clearline','clearkeys','chr$','charat$','bindsprite', - 'beep','atnd','atn2d','atn2','atn','atand','asc','argcount','arg','animatesprites','AcceptConnection','abs' - ), - 3 => array( - - // Blue Lowercase Keywords - - 'xor','while','wend','until','type','traditional_print','traditional','to','then','struc','string','step','single', - 'run','return','reset','read','or','null','not','next','lor','loop','language','land','integer','input','if', - 'goto','gosub','for','endstruc','endif','end','elseif','else','double','do','dim','data','const','basic4gl','as', - 'and','alloc' - ) - - ), - 'SYMBOLS' => array( - '=', '<', '>', '>=', '<=', '+', '-', '*', '/', '%', '(', ')', '{', '}', '[', ']', '&', ';', ':', '$' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000080; font-weight: bold;', - 2 => 'color: #FF0000;', - 3 => 'color: #0000FF;' - ), - 'COMMENTS' => array( - 1 => 'color: #657CC4; font-style: italic;' - ), - 'BRACKETS' => array( - 0 => 'color: #000080;' - ), - 'STRINGS' => array( - 0 => 'color: #008000;' - ), - 'NUMBERS' => array( - 0 => 'color: #000080; font-weight: bold;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #0000FF;' - ), - 'ESCAPE_CHAR' => array( - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/bf.php b/_piecrust/libs/Geshi/geshi/bf.php deleted file mode 100644 index dd83121..0000000 --- a/_piecrust/libs/Geshi/geshi/bf.php +++ /dev/null @@ -1,114 +0,0 @@ - 'Brainfuck', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array(1 => '/[^\n+\-<>\[\]\.\,Y]+/s'), - 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - ), - 'SYMBOLS' => array( - 0 => array('+', '-'), - 1 => array('[', ']'), - 2 => array('<', '>'), - 3 => array('.', ','), - 4 => array('Y') //Brainfork Extension ;-) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #006600;', - 1 => 'color: #660000;', - 2 => 'color: #000066;', - 3 => 'color: #660066;', - 4 => 'color: #666600;' - ), - 'ESCAPE_CHAR' => array( - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'STRINGS' => GESHI_NEVER, - 'NUMBERS' => GESHI_NEVER - ), - 'KEYWORDS' => array( - 'DISALLOW_BEFORE' => '', - 'DISALLOW_AFTER' => '' - ) - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/bibtex.php b/_piecrust/libs/Geshi/geshi/bibtex.php deleted file mode 100644 index 9a6af63..0000000 --- a/_piecrust/libs/Geshi/geshi/bibtex.php +++ /dev/null @@ -1,183 +0,0 @@ - 'BibTeX', - 'OOLANG' => false, - 'COMMENT_SINGLE' => array( - 1 => '%%' - ), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 0 => array( - '@comment','@preamble','@string' - ), - // Standard entry types - 1 => array( - '@article','@book','@booklet','@conference','@inbook', - '@incollection','@inproceedings','@manual','@mastersthesis', - '@misc','@phdthesis','@proceedings','@techreport','@unpublished' - ), - // Custom entry types - 2 => array( - '@collection','@patent','@webpage' - ), - // Standard entry field names - 3 => array( - 'address','annote','author','booktitle','chapter','crossref', - 'edition','editor','howpublished','institution','journal','key', - 'month','note','number','organization','pages','publisher','school', - 'series','title','type','volume','year' - ), - // Custom entry field names - 4 => array( - 'abstract','affiliation','chaptername','cited-by','cites', - 'contents','copyright','date-added','date-modified','doi','eprint', - 'isbn','issn','keywords','language','lccn','lib-congress', - 'location','price','rating','read','size','source','url' - ) - ), - 'URLS' => array( - 0 => '', - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'SYMBOLS' => array( - '{', '}', '#', '=', ',' - ), - 'CASE_SENSITIVE' => array( - 1 => false, - 2 => false, - 3 => false, - 4 => false, - GESHI_COMMENTS => false, - ), - // Define the colors for the groups listed above - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #C02020;', // Standard entry types - 2 => 'color: #C02020;', // Custom entry types - 3 => 'color: #C08020;', // Standard entry field names - 4 => 'color: #C08020;' // Custom entry field names - ), - 'COMMENTS' => array( - 1 => 'color: #2C922C; font-style: italic;' - ), - 'STRINGS' => array( - 0 => 'color: #2020C0;' - ), - 'SYMBOLS' => array( - 0 => 'color: #E02020;' - ), - 'REGEXPS' => array( - 1 => 'color: #2020C0;', // {...} - 2 => 'color: #C08020;', // BibDesk fields - 3 => 'color: #800000;' // LaTeX commands - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000000; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #E02020;' - ), - 'NUMBERS' => array( - ), - 'METHODS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'REGEXPS' => array( - // {parameters} - 1 => array( - GESHI_SEARCH => "(?<=\\{)(?:\\{(?R)\\}|[^\\{\\}])*(?=\\})", - GESHI_REPLACE => '\0', - GESHI_MODIFIERS => 's', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - 2 => array( - GESHI_SEARCH => "\bBdsk-(File|Url)-\d+", - GESHI_REPLACE => '\0', - GESHI_MODIFIERS => 'Us', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - 3 => array( - GESHI_SEARCH => "\\\\[A-Za-z0-9]*+", - GESHI_REPLACE => '\0', - GESHI_MODIFIERS => 'Us', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'OBJECT_SPLITTERS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'NUMBERS' => GESHI_NEVER - ), - 'KEYWORDS' => array( - 3 => array( - 'DISALLOWED_AFTER' => '(?=\s*=)' - ), - 4 => array( - 'DISALLOWED_AFTER' => '(?=\s*=)' - ), - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/blitzbasic.php b/_piecrust/libs/Geshi/geshi/blitzbasic.php deleted file mode 100644 index e431d3a..0000000 --- a/_piecrust/libs/Geshi/geshi/blitzbasic.php +++ /dev/null @@ -1,185 +0,0 @@ - 'BlitzBasic', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'If','EndIf','ElseIf','Else If','Else','While','Wend','Return','Next','Include','End Type','End Select','End If','End Function','End','Select', - 'Type','Forever','For','Or','And','AppTitle','Case','Goto','Gosub','Step','Stop','Int','Last','False','Then','To','True','Until','Float', - 'String','Before','Not' - ), - 2 => array( - // All Functions - 2D BB and 3D BB - 'Xor','WriteString','WriteShort','WritePixelFast','WritePixel','WriteLine','WriteInt','WriteFloat','WriteFile','WriteBytes', - 'WriteByte','Write','WaitTimer','WaitMouse','WaitKey','WaitJoy','VWait','Viewport', - 'Upper','UpdateGamma','UnlockBuffer','UDPTimeouts','UDPStreamPort','UDPStreamIP','UDPMsgPort','UDPMsgIP', - 'Trim','TotalVidMem','TileImage','TileBlock','TFormImage','TFormFilter','Text', - 'TCPTimeouts','TCPStreamPort','TCPStreamIP','Tan','SystemProperty','StringWidth','StringHeight','Str','StopNetGame', - 'StopChannel','StartNetGame','Sqr','SoundVolume','SoundPitch','SoundPan','Sin','Shr', - 'ShowPointer','Shl','Sgn','SetGfxDriver','SetGamma','SetFont','SetEnv','SetBuffer','SendUDPMsg','SendNetMsg', - 'SeekFile','SeedRnd','ScanLine','ScaleImage','SaveImage','SaveBuffer','Sar','RuntimeError','RSet', - 'RotateImage','RndSeed','Rnd','Right','ResumeChannel','Restore','ResizeImage','ResizeBank','Replace', - 'Repeat','RecvUDPMsg','RecvNetMsg','RectsOverlap','Rect','ReadString','ReadShort','ReadPixelFast','ReadPixel','ReadLine', - 'ReadInt','ReadFloat','ReadFile','ReadDir','ReadBytes','ReadByte','ReadAvail','Read','Rand','Print', - 'PokeShort','PokeInt','PokeFloat','PokeByte','Plot','PlaySound','PlayMusic','PlayCDTrack','Pi','PeekShort', - 'PeekInt','PeekFloat','PeekByte','PauseChannel','Oval','Origin','OpenTCPStream','OpenMovie','OpenFile', - 'Null','NextFile','New','NetPlayerName','NetPlayerLocal','NetMsgType','NetMsgTo','NetMsgFrom', - 'NetMsgData','MovieWidth','MoviePlaying','MovieHeight','MoveMouse','MouseZSpeed','MouseZ','MouseYSpeed','MouseY','MouseXSpeed', - 'MouseX','MouseHit','MouseDown','Mod','Millisecs','MidHandle','Mid','MaskImage','LSet','Lower', - 'LoopSound','Log10','Log','LockBuffer','Locate','Local','LoadSound','LoadImage','LoadFont','LoadBuffer', - 'LoadAnimImage','Line','Len','Left','KeyHit','KeyDown','JoyZDir','JoyZ','JoyYDir', - 'JoyYaw','JoyY','JoyXDir','JoyX','JoyVDir','JoyV','JoyUDir','JoyU','JoyType','JoyRoll', - 'JoyPitch','JoyHit','JoyHat','JoyDown','JoinNetGame','Instr','Insert','Input', - 'ImageYHandle','ImageXHandle','ImageWidth','ImagesOverlap','ImagesCollide','ImageRectOverlap','ImageRectCollide','ImageHeight','ImageBuffer', - 'HostNetGame','HostIP','HidePointer','Hex','HandleImage','GraphicsWidth','GraphicsHeight','GraphicsDepth','GraphicsBuffer','Graphics', - 'GrabImage','Global','GFXModeWidth','GFXModeHeight','GfxModeExists','GFXModeDepth','GfxDriverName','GetMouse', - 'GetKey','GetJoy','GetEnv','GetColor','GammaRed','GammaGreen','GammaBlue','Function','FrontBuffer','FreeTimer', - 'FreeSound','FreeImage','FreeFont','FreeBank','FontWidth','FontHeight','FlushMouse','FlushKeys', - 'FlushJoy','Floor','Flip','First','FileType','FileSize','FilePos','Field', - 'Exp','Exit','ExecFile','Eof','EndGraphics','Each','DrawMovie','DrawImageRect','DrawImage','DrawBlockRect','DrawBlock', - 'DottedIP','Dim','DeleteNetPlayer','DeleteFile','DeleteDir','Delete','Delay','Default','DebugLog','Data', - 'CurrentTime','CurrentDir','CurrentDate','CreateUDPStream','CreateTimer','CreateTCPServer','CreateNetPlayer','CreateImage','CreateDir','CreateBank', - 'CountHostIPs','CountGFXModes','CountGfxDrivers','Cos','CopyStream','CopyRect','CopyPixelFast','CopyPixel','CopyImage','CopyFile', - 'CopyBank','Const','CommandLine','ColorRed','ColorGreen','ColorBlue','Color','ClsColor','Cls','CloseUDPStream', - 'CloseTCPStream','CloseTCPServer','CloseMovie','CloseFile','CloseDir','Chr','ChannelVolume','ChannelPlaying','ChannelPitch','ChannelPan', - 'ChangeDir','Ceil','CallDLL','Bin','BankSize','BackBuffer','AvailVidMem','AutoMidHandle', - 'ATan2','ATan','ASin','Asc','After','ACos','AcceptTCPStream','Abs', - // 3D Commands - 'Wireframe','Windowed3D','WBuffer','VertexZ','VertexY', - 'VertexX','VertexW','VertexV','VertexU','VertexTexCoords','VertexRed','VertexNZ','VertexNY','VertexNX','VertexNormal', - 'VertexGreen','VertexCoords','VertexColor','VertexBlue','VertexAlpha','VectorYaw','VectorPitch','UpdateWorld','UpdateNormals','TurnEntity', - 'TrisRendered','TriangleVertex','TranslateEntity','TFormVector','TFormPoint','TFormNormal','TFormedZ','TFormedY','TFormedX','TextureWidth', - 'TextureName','TextureHeight','TextureFilter','TextureCoords','TextureBuffer','TextureBlend','TerrainZ','TerrainY','TerrainX','TerrainSize', - 'TerrainShading','TerrainHeight','TerrainDetail','SpriteViewMode','ShowEntity','SetCubeFace','SetAnimTime','SetAnimKey','ScaleTexture','ScaleSprite', - 'ScaleMesh','ScaleEntity','RotateTexture','RotateSprite','RotateMesh','RotateEntity','ResetEntity','RenderWorld','ProjectedZ','ProjectedY', - 'ProjectedX','PositionTexture','PositionMesh','PositionEntity','PointEntity','PickedZ','PickedY','PickedX','PickedTriangle','PickedTime', - 'PickedSurface','PickedNZ','PickedNY','PickedNX','PickedEntity','PaintSurface','PaintMesh','PaintEntity','NameEntity','MoveEntity', - 'ModifyTerrain','MeshWidth','MeshHeight','MeshesIntersect','MeshDepth','MD2AnimTime','MD2AnimLength','MD2Animating','LoadTexture','LoadTerrain', - 'LoadSprite','LoadMesh','LoadMD2','LoaderMatrix','LoadBSP','LoadBrush','LoadAnimTexture','LoadAnimSeq','LoadAnimMesh','Load3DSound', - 'LinePick','LightRange','LightMesh','LightConeAngles','LightColor','HWMultiTex','HideEntity','HandleSprite','Graphics3D','GfxMode3DExists', - 'GfxMode3D','GfxDriverCaps3D','GfxDriver3D','GetSurfaceBrush','GetSurface','GetParent','GetMatElement','GetEntityType','GetEntityBrush','GetChild', - 'GetBrushTexture','FreeTexture','FreeEntity','FreeBrush','FlipMesh','FitMesh','FindSurface','FindChild','ExtractAnimSeq','EntityZ', - 'EntityYaw','EntityY','EntityX','EntityVisible','EntityType','EntityTexture','EntityShininess','EntityRoll','EntityRadius','EntityPitch', - 'EntityPickMode','EntityPick','EntityParent','EntityOrder','EntityName','EntityInView','EntityFX','EntityDistance','EntityColor','EntityCollided', - 'EntityBox','EntityBlend','EntityAutoFade','EntityAlpha','EmitSound','Dither','DeltaYaw','DeltaPitch','CreateTexture','CreateTerrain', - 'CreateSurface','CreateSprite','CreateSphere','CreatePlane','CreatePivot','CreateMirror','CreateMesh','CreateListener','CreateLight','CreateCylinder', - 'CreateCube','CreateCone','CreateCamera','CreateBrush','CountVertices','CountTriangles','CountSurfaces','CountGfxModes3D','CountCollisions','CountChildren', - 'CopyMesh','CopyEntity','CollisionZ','CollisionY','CollisionX','CollisionTriangle','CollisionTime','CollisionSurface','Collisions','CollisionNZ', - 'CollisionNY','CollisionNX','CollisionEntity','ClearWorld','ClearTextureFilters','ClearSurface','ClearCollisions','CaptureWorld','CameraZoom','CameraViewport', - 'CameraRange','CameraProjMode','CameraProject','CameraPick','CameraFogRange','CameraFogMode','CameraFogColor','CameraClsMode','CameraClsColor','BSPLighting', - 'BSPAmbientLight','BrushTexture','BrushShininess','BrushFX','BrushColor','BrushBlend','BrushAlpha','AntiAlias','AnimTime','AnimSeq', - 'AnimLength','Animating','AnimateMD2','Animate','AmbientLight','AlignToVector','AddVertex','AddTriangle','AddMesh','AddAnimSeq', - ) - ), - 'SYMBOLS' => array( - '(',')' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000066; font-weight: bold;', - 2 => 'color: #0000ff;' - ), - 'COMMENTS' => array( - 1 => 'color: #D9D100; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000066;' - ), - 'STRINGS' => array( - 0 => 'color: #009900;' - ), - 'NUMBERS' => array( - 0 => 'color: #CC0000;' - ), - 'METHODS' => array( - 1 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #000066;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - ) - ), - 'URLS' => array( - 1 => '', - 2 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - 1 => '\\' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => false, - 1 => false - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/bnf.php b/_piecrust/libs/Geshi/geshi/bnf.php deleted file mode 100644 index 13341f7..0000000 --- a/_piecrust/libs/Geshi/geshi/bnf.php +++ /dev/null @@ -1,119 +0,0 @@ - 'bnf', - 'COMMENT_SINGLE' => array(';'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"', "'"), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array(), - 'SYMBOLS' => array( - 0 => array('(', ')'), - 1 => array('<', '>'), - 2 => array('[', ']'), - 3 => array('{', '}'), - 4 => array('=', '*', '/', '|', ':'), - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false - ), - 'STYLES' => array( - 'KEYWORDS' => array(), - 'COMMENTS' => array( - 0 => 'color: #666666; font-style: italic;', // Single Line comments - ), - 'ESCAPE_CHAR' => array( - 0 => '' - ), - 'BRACKETS' => array( - 0 => '' - ), - 'STRINGS' => array( - 0 => 'color: #a00;', - 1 => 'color: #a00;' - ), - 'NUMBERS' => array( - 0 => '' - ), - 'METHODS' => array( - 0 => '' - ), - 'SYMBOLS' => array( - 0 => 'color: #000066; font-weight: bold;', // Round brackets - 1 => 'color: #000066; font-weight: bold;', // Angel Brackets - 2 => 'color: #000066; font-weight: bold;', // Square Brackets - 3 => 'color: #000066; font-weight: bold;', // BRaces - 4 => 'color: #006600; font-weight: bold;', // Other operator symbols - ), - 'REGEXPS' => array( - 0 => 'color: #007;', - ), - 'SCRIPT' => array( - 0 => '' - ) - ), - 'URLS' => array(), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array( - //terminal symbols - 0 => array( - GESHI_SEARCH => '(<)([^&]+?)(>)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ), - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/boo.php b/_piecrust/libs/Geshi/geshi/boo.php deleted file mode 100644 index 37c6304..0000000 --- a/_piecrust/libs/Geshi/geshi/boo.php +++ /dev/null @@ -1,217 +0,0 @@ - 'Boo', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'''", "'", '"""', '"'), - 'HARDQUOTE' => array('"""', '"""'), - 'HARDESCAPE' => array('\"""'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array(//Namespace - 'namespace', 'import', 'from' - ), - 2 => array(//Jump - 'yield', 'return', 'goto', 'continue', 'break' - ), - 3 => array(//Conditional - 'while', 'unless', 'then', 'in', 'if', 'for', 'else', 'elif' - ), - 4 => array(//Property - 'set', 'get' - ), - 5 => array(//Exception - 'try', 'raise', 'failure', 'except', 'ensure' - ), - 6 => array(//Visibility - 'public', 'private', 'protected', 'internal' - ), - 7 => array(//Define - 'struct', 'ref', 'of', 'interface', 'event', 'enum', 'do', 'destructor', 'def', 'constructor', 'class' - ), - 8 => array(//Cast - 'typeof', 'cast', 'as' - ), - 9 => array(//BiMacro - 'yieldAll', 'using', 'unchecked', 'rawArayIndexing', 'print', 'normalArrayIndexing', 'lock', - 'debug', 'checked', 'assert' - ), - 10 => array(//BiAttr - 'required', 'property', 'meta', 'getter', 'default' - ), - 11 => array(//BiFunc - 'zip', 'shellp', 'shellm', 'shell', 'reversed', 'range', 'prompt', - 'matrix', 'map', 'len', 'join', 'iterator', 'gets', 'enumerate', 'cat', 'array' - ), - 12 => array(//HiFunc - '__switch__', '__initobj__', '__eval__', '__addressof__', 'quack' - ), - 13 => array(//Primitive - 'void', 'ushort', 'ulong', 'uint', 'true', 'timespan', 'string', 'single', - 'short', 'sbyte', 'regex', 'object', 'null', 'long', 'int', 'false', 'duck', - 'double', 'decimal', 'date', 'char', 'callable', 'byte', 'bool' - ), - 14 => array(//Operator - 'not', 'or', 'and', 'is', 'isa', - ), - 15 => array(//Modifier - 'virtual', 'transient', 'static', 'partial', 'override', 'final', 'abstract' - ), - 16 => array(//Access - 'super', 'self' - ), - 17 => array(//Pass - 'pass' - ) - ), - 'SYMBOLS' => array( - '[|', '|]', '${', '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>', '+', '-', ';' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true, - 8 => true, - 9 => true, - 10 => true, - 11 => true, - 12 => true, - 13 => true, - 14 => true, - 15 => true, - 16 => true, - 17 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color:green;font-weight:bold;', - 2 => 'color:navy;', - 3 => 'color:blue;font-weight:bold;', - 4 => 'color:#8B4513;', - 5 => 'color:teal;font-weight:bold;', - 6 => 'color:blue;font-weight:bold;', - 7 => 'color:blue;font-weight:bold;', - 8 => 'color:blue;font-weight:bold;', - 9 => 'color:maroon;', - 10 => 'color:maroon;', - 11 => 'color:purple;', - 12 => 'color:#4B0082;', - 13 => 'color:purple;font-weight:bold;', - 14 => 'color:#008B8B;font-weight:bold;', - 15 => 'color:brown;', - 16 => 'color:black;font-weight:bold;', - 17 => 'color:gray;' - ), - 'COMMENTS' => array( - 1 => 'color: #999999; font-style: italic;', - 2 => 'color: #999999; font-style: italic;', - 'MULTI' => 'color: #008000; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #0000FF; font-weight: bold;', - 'HARD' => 'color: #0000FF; font-weight: bold;', - ), - 'BRACKETS' => array( - 0 => 'color: #006400;' - ), - 'STRINGS' => array( - 0 => 'color: #008000;', - 'HARD' => 'color: #008000;' - ), - 'NUMBERS' => array( - 0 => 'color: #00008B;' - ), - 'METHODS' => array( - 0 => 'color: 000000;', - 1 => 'color: 000000;' - ), - 'SYMBOLS' => array( - 0 => 'color: #006400;' - ), - 'REGEXPS' => array( - #0 => 'color: #0066ff;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '', - 8 => '', - 9 => '', - 10 => '', - 11 => '', - 12 => '', - 13 => '', - 14 => '', - 15 => '', - 16 => '', - 17 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 0 => '.', - 1 => '::' - ), - 'REGEXPS' => array( - #0 => '%(@)?\/(?:(?(1)[^\/\\\\\r\n]+|[^\/\\\\\r\n \t]+)|\\\\[\/\\\\\w+()|.*?$^[\]{}\d])+\/%' - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/c.php b/_piecrust/libs/Geshi/geshi/c.php deleted file mode 100644 index 1cdc24f..0000000 --- a/_piecrust/libs/Geshi/geshi/c.php +++ /dev/null @@ -1,202 +0,0 @@ - 'C', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - //Multiline-continued single-line comments - 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', - //Multiline-continued preprocessor define - 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m' - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array( - //Simple Single Char Escapes - 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i", - //Hexadecimal Char Specs - 2 => "#\\\\x[\da-fA-F]{2}#", - //Hexadecimal Char Specs - 3 => "#\\\\u[\da-fA-F]{4}#", - //Hexadecimal Char Specs - 4 => "#\\\\U[\da-fA-F]{8}#", - //Octal Char Specs - 5 => "#\\\\[0-7]{1,3}#" - ), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | - GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | - GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - 1 => array( - 'if', 'return', 'while', 'case', 'continue', 'default', - 'do', 'else', 'for', 'switch', 'goto' - ), - 2 => array( - 'null', 'false', 'break', 'true', 'function', 'enum', 'extern', 'inline' - ), - 3 => array( - 'printf', 'cout' - ), - 4 => array( - 'auto', 'char', 'const', 'double', 'float', 'int', 'long', - 'register', 'short', 'signed', 'sizeof', 'static', 'struct', - 'typedef', 'union', 'unsigned', 'void', 'volatile', 'wchar_t', - - 'int8', 'int16', 'int32', 'int64', - 'uint8', 'uint16', 'uint32', 'uint64', - - 'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t', - 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t', - - 'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t', - 'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t', - - 'int8_t', 'int16_t', 'int32_t', 'int64_t', - 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', - - 'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t' - ), - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', - '+', '-', '*', '/', '%', - '=', '<', '>', - '!', '^', '&', '|', - '?', ':', - ';', ',' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #000066;', - 4 => 'color: #993333;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #339933;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 1 => 'color: #000099; font-weight: bold;', - 2 => 'color: #660099; font-weight: bold;', - 3 => 'color: #660099; font-weight: bold;', - 4 => 'color: #660099; font-weight: bold;', - 5 => 'color: #006699; font-weight: bold;', - 'HARD' => '', - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #0000dd;', - GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;', - GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', - GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', - GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;', - GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', - GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;', - GESHI_NUMBER_FLT_NONSCI => 'color:#800080;' - ), - 'METHODS' => array( - 1 => 'color: #202020;', - 2 => 'color: #202020;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.', - 2 => '::' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/c_mac.php b/_piecrust/libs/Geshi/geshi/c_mac.php deleted file mode 100644 index 3e73519..0000000 --- a/_piecrust/libs/Geshi/geshi/c_mac.php +++ /dev/null @@ -1,227 +0,0 @@ - 'C (Mac)', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - //Multiline-continued single-line comments - 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', - //Multiline-continued preprocessor define - 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m' - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array( - //Simple Single Char Escapes - 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i", - //Hexadecimal Char Specs - 2 => "#\\\\x[\da-fA-F]{2}#", - //Hexadecimal Char Specs - 3 => "#\\\\u[\da-fA-F]{4}#", - //Hexadecimal Char Specs - 4 => "#\\\\U[\da-fA-F]{8}#", - //Octal Char Specs - 5 => "#\\\\[0-7]{1,3}#" - ), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | - GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | - GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - 1 => array( - 'if', 'return', 'while', 'case', 'continue', 'default', - 'do', 'else', 'for', 'switch', 'goto' - ), - 2 => array( - 'NULL', 'false', 'break', 'true', 'enum', 'errno', 'EDOM', - 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG', - 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG', - 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP', - 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP', - 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN', - 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN', - 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT', - 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR', - 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', - 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr', - 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC', - // Mac-specific constants: - 'kCFAllocatorDefault' - ), - 3 => array( - 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert', - 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint', - 'ispunct', 'isspace', 'isupper', 'isxdigit', 'tolower', 'toupper', - 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp', - 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2', - 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', - 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen', - 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf', - 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf', - 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc', - 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind', - 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs', - 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc', - 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv', - 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat', - 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn', - 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy', - 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime', - 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime' - ), - 4 => array( - 'auto', 'char', 'const', 'double', 'float', 'int', 'long', - 'register', 'short', 'signed', 'static', 'struct', - 'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf', - 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t', - 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', 'wchar_t', - - 'int8', 'int16', 'int32', 'int64', - 'uint8', 'uint16', 'uint32', 'uint64', - - 'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t', - 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t', - - 'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t', - 'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t', - - 'int8_t', 'int16_t', 'int32_t', 'int64_t', - 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', - - 'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t', - - // Mac-specific types: - 'CFArrayRef', 'CFDictionaryRef', 'CFMutableDictionaryRef', 'CFBundleRef', 'CFSetRef', 'CFStringRef', - 'CFURLRef', 'CFLocaleRef', 'CFDateFormatterRef', 'CFNumberFormatterRef', 'CFPropertyListRef', - 'CFTreeRef', 'CFWriteStreamRef', 'CFCharacterSetRef', 'CFMutableStringRef', 'CFNotificationRef', - 'CFReadStreamRef', 'CFNull', 'CFAllocatorRef', 'CFBagRef', 'CFBinaryHeapRef', - 'CFBitVectorRef', 'CFBooleanRef', 'CFDataRef', 'CFDateRef', 'CFMachPortRef', 'CFMessagePortRef', - 'CFMutableArrayRef', 'CFMutableBagRef', 'CFMutableBitVectorRef', 'CFMutableCharacterSetRef', - 'CFMutableDataRef', 'CFMutableSetRef', 'CFNumberRef', 'CFPlugInRef', 'CFPlugInInstanceRef', - 'CFRunLoopRef', 'CFRunLoopObserverRef', 'CFRunLoopSourceRef', 'CFRunLoopTimerRef', 'CFSocketRef', - 'CFTimeZoneRef', 'CFTypeRef', 'CFUserNotificationRef', 'CFUUIDRef', 'CFXMLNodeRef', 'CFXMLParserRef', - 'CFXMLTreeRef' - ), - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000ff;', - 2 => 'color: #0000ff;', - 3 => 'color: #0000dd;', - 4 => 'color: #0000ff;' - ), - 'COMMENTS' => array( - 1 => 'color: #ff0000;', - 2 => 'color: #339900;', - 'MULTI' => 'color: #ff0000; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 1 => 'color: #000099; font-weight: bold;', - 2 => 'color: #660099; font-weight: bold;', - 3 => 'color: #660099; font-weight: bold;', - 4 => 'color: #660099; font-weight: bold;', - 5 => 'color: #006699; font-weight: bold;', - 'HARD' => '', - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #666666;' - ), - 'NUMBERS' => array( - 0 => 'color: #0000dd;', - GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;', - GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', - GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', - GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;', - GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', - GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;', - GESHI_NUMBER_FLT_NONSCI => 'color:#800080;' - ), - 'METHODS' => array( - 1 => 'color: #00eeff;', - 2 => 'color: #00eeff;' - ), - 'SYMBOLS' => array( - 0 => 'color: #000000;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.', - 2 => '::' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/caddcl.php b/_piecrust/libs/Geshi/geshi/caddcl.php deleted file mode 100644 index c09c84a..0000000 --- a/_piecrust/libs/Geshi/geshi/caddcl.php +++ /dev/null @@ -1,126 +0,0 @@ - 'CAD DCL', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'boxed_column','boxed_radio_column','boxed_radio_row','boxed_row', - 'column','concatenation','button','dialog','edit_box','image','image_button', - 'errtile','list_box','ok_cancel','ok_cancel_help','ok_cancel_help_errtile', - 'ok_cancel_help_info','ok_only','paragraph','popup_list','radio_button', - 'radio_column','radio_row','row','slider','spacer','spacer_0','spacer_1','text', - 'text_part','toggle', - 'action','alignment','allow_accept','aspect_ratio','big_increment', - 'children_alignment','children_fixed_height', - 'children_fixed_width','color', - 'edit_limit','edit_width','fixed_height','fixed_width', - 'height','initial_focus','is_cancel','is_default', - 'is_enabled','is_tab_stop','is-bold','key','label','layout','list', - 'max_value','min_value','mnemonic','multiple_select','password_char', - 'small_increment','tabs','tab_truncate','value','width', - 'false','true','left','right','centered','top','bottom', - 'dialog_line','dialog_foreground','dialog_background', - 'graphics_background','black','red','yellow','green','cyan', - 'blue','magenta','whitegraphics_foreground', - 'horizontal','vertical' - ) - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/cadlisp.php b/_piecrust/libs/Geshi/geshi/cadlisp.php deleted file mode 100644 index d56e571..0000000 --- a/_piecrust/libs/Geshi/geshi/cadlisp.php +++ /dev/null @@ -1,186 +0,0 @@ - 'CAD Lisp', - 'COMMENT_SINGLE' => array(1 => ";"), - 'COMMENT_MULTI' => array(";|" => "|;"), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'abs','acad_colordlg','acad_helpdlg','acad_strlsort','action_tile', - 'add_list','alert','alloc','and','angle','angtof','angtos','append','apply', - 'arx','arxload','arxunload','ascii','assoc','atan','atof','atoi','atom', - 'atoms-family','autoarxload','autoload','Boole','boundp','caddr', - 'cadr','car','cdr','chr','client_data_tile','close','command','cond', - 'cons','cos','cvunit','defun','defun-q','defun-q-list-ref', - 'defun-q-list-set','dictadd','dictnext','dictremove','dictrename', - 'dictsearch','dimx_tile','dimy_tile','distance','distof','done_dialog', - 'end_image','end_list','entdel','entget','entlast','entmake', - 'entmakex','entmod','entnext','entsel','entupd','eq','equal','eval','exit', - 'exp','expand','expt','fill_image','findfile','fix','float','foreach','function', - 'gc','gcd','get_attr','get_tile','getangle','getcfg','getcname','getcorner', - 'getdist','getenv','getfiled','getint','getkword','getorient','getpoint', - 'getreal','getstring','getvar','graphscr','grclear','grdraw','grread','grtext', - 'grvecs','handent','help','if','initdia','initget','inters','itoa','lambda','last', - 'layoutlist','length','list','listp','load','load_dialog','log','logand','logior', - 'lsh','mapcar','max','mem','member','menucmd','menugroup','min','minusp','mode_tile', - 'namedobjdict','nentsel','nentselp','new_dialog','nil','not','nth','null', - 'numberp','open','or','osnap','polar','prin1','princ','print','progn','prompt', - 'quit','quote','read','read-char','read-line','redraw','regapp','rem','repeat', - 'reverse','rtos','set','set_tile','setcfg','setenv','setfunhelp','setq','setvar', - 'setview','sin','slide_image','snvalid','sqrt','ssadd','ssdel','ssget','ssgetfirst', - 'sslength','ssmemb','ssname','ssnamex','sssetfirst','start_dialog','start_image', - 'start_list','startapp','strcase','strcat','strlen','subst','substr','t','tablet', - 'tblnext','tblobjname','tblsearch','term_dialog','terpri','textbox','textpage', - 'textscr','trace','trans','type','unload_dialog','untrace','vector_image','ver', - 'vports','wcmatch','while','write-char','write-line','xdroom','xdsize','zerop', - 'vl-acad-defun','vl-acad-undefun','vl-arx-import','vlax-3D-point', - 'vlax-add-cmd','vlax-create-object','vlax-curve-getArea', - 'vlax-curve-getClosestPointTo','vlax-curve-getClosestPointToProjection', - 'vlax-curve-getDistAtParam','vlax-curve-getDistAtPoint', - 'vlax-curve-getEndParam','vlax-curve-getEndPoint', - 'vlax-curve-getFirstDeriv','vlax-curve-getParamAtDist', - 'vlax-curve-getParamAtPoint','vlax-curve-getPointAtDist', - 'vlax-curve-getPointAtParam','vlax-curve-getSecondDeriv', - 'vlax-curve-getStartParam','vlax-curve-getStartPoint', - 'vlax-curve-isClosed','vlax-curve-isPeriodic','vlax-curve-isPlanar', - 'vlax-dump-object','vlax-erased-p','vlax-for','vlax-get-acad-object', - 'vlax-get-object','vlax-get-or-create-object','vlax-get-property', - 'vlax-import-type-library','vlax-invoke-method','vlax-ldata-delete', - 'vlax-ldata-get','vlax-ldata-list','vlax-ldata-put','vlax-ldata-test', - 'vlax-make-safearray','vlax-make-variant','vlax-map-collection', - 'vlax-method-applicable-p','vlax-object-released-p','vlax-product-key', - 'vlax-property-available-p','vlax-put-property','vlax-read-enabled-p', - 'vlax-release-object','vlax-remove-cmd','vlax-safearray-fill', - 'vlax-safearray-get-dim','vlax-safearray-get-element', - 'vlax-safearray-get-l-bound','vlax-safearray-get-u-bound', - 'vlax-safearray-put-element','vlax-safearray-type','vlax-tmatrix', - 'vlax-typeinfo-available-p','vlax-variant-change-type', - 'vlax-variant-type','vlax-variant-value','vlax-write-enabled-p', - 'vl-bb-ref','vl-bb-set','vl-catch-all-apply','vl-catch-all-error-message', - 'vl-catch-all-error-p','vl-cmdf','vl-consp','vl-directory-files','vl-doc-export', - 'vl-doc-import','vl-doc-ref','vl-doc-set','vl-every','vl-exit-with-error', - 'vl-exit-with-value','vl-file-copy','vl-file-delete','vl-file-directory-p', - 'vl-filename-base','vl-filename-directory','vl-filename-extension', - 'vl-filename-mktemp','vl-file-rename','vl-file-size','vl-file-systime', - 'vl-get-resource','vlisp-compile','vl-list-exported-functions', - 'vl-list-length','vl-list-loaded-vlx','vl-load-all','vl-load-com', - 'vl-load-reactors','vl-member-if','vl-member-if-not','vl-position', - 'vl-prin1-to-string','vl-princ-to-string','vl-propagate','vlr-acdb-reactor', - 'vlr-add','vlr-added-p','vlr-beep-reaction','vlr-command-reactor', - 'vlr-current-reaction-name','vlr-data','vlr-data-set', - 'vlr-deepclone-reactor','vlr-docmanager-reactor','vlr-dwg-reactor', - 'vlr-dxf-reactor','vlr-editor-reactor','vl-registry-delete', - 'vl-registry-descendents','vl-registry-read','vl-registry-write', - 'vl-remove','vl-remove-if','vl-remove-if-not','vlr-insert-reactor', - 'vlr-linker-reactor','vlr-lisp-reactor','vlr-miscellaneous-reactor', - 'vlr-mouse-reactor','vlr-notification','vlr-object-reactor', - 'vlr-owner-add','vlr-owner-remove','vlr-owners','vlr-pers','vlr-pers-list', - 'vlr-pers-p','vlr-pers-release','vlr-reaction-names','vlr-reactions', - 'vlr-reaction-set','vlr-reactors','vlr-remove','vlr-remove-all', - 'vlr-set-notification','vlr-sysvar-reactor','vlr-toolbar-reactor', - 'vlr-trace-reaction','vlr-type','vlr-types','vlr-undo-reactor', - 'vlr-wblock-reactor','vlr-window-reactor','vlr-xref-reactor', - 'vl-some','vl-sort','vl-sort-i','vl-string-elt','vl-string-left-trim', - 'vl-string-mismatch','vl-string-position','vl-string-right-trim', - 'vl-string-search','vl-string-subst','vl-string-translate','vl-string-trim', - 'vl-symbol-name','vl-symbolp','vl-symbol-value','vl-unload-vlx','vl-vbaload', - 'vl-vbarun','vl-vlx-loaded-p' - ) - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/cfdg.php b/_piecrust/libs/Geshi/geshi/cfdg.php deleted file mode 100644 index 27ade0c..0000000 --- a/_piecrust/libs/Geshi/geshi/cfdg.php +++ /dev/null @@ -1,124 +0,0 @@ - - * Copyright: (c) 2006 John Horigan http://www.ozonehouse.com/john/ - * Release Version: 1.0.8.9 - * Date Started: 2006/03/11 - * - * CFDG language file for GeSHi. - * - * CHANGES - * ------- - * 2006/03/11 (1.0.0) - * - First Release - * - * TODO (updated 2006/03/11) - * ------------------------- - * - ************************************************************************************* - * - * This file is part of GeSHi. - * - * GeSHi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GeSHi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeSHi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - ************************************************************************************/ - -$language_data = array ( - 'LANG_NAME' => 'CFDG', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'include', 'startshape', 'rule', 'background' - ), - 2 => array( - 'SQUARE', 'CIRCLE', 'TRIANGLE', - ), - 3 => array( - 'b','brightness','h','hue','sat','saturation', - 'a','alpha','x','y','z','s','size', - 'r','rotate','f','flip','skew','xml_set_object' - ) - ), - 'SYMBOLS' => array( - '[', ']', '{', '}', '*', '|' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #717100;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #006666;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 2 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - 3 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/cfm.php b/_piecrust/libs/Geshi/geshi/cfm.php deleted file mode 100644 index 80a7f72..0000000 --- a/_piecrust/libs/Geshi/geshi/cfm.php +++ /dev/null @@ -1,299 +0,0 @@ - 'ColdFusion', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - /* CFM Tags */ - 1 => array( - 'cfabort', 'cfapplet', 'cfapplication', 'cfargument', 'cfassociate', - 'cfbreak', 'cfcache', 'cfcase', 'cfcatch', 'cfchart', 'cfchartdata', - 'cfchartseries', 'cfcol', 'cfcollection', 'cfcomponent', - 'cfcontent', 'cfcookie', 'cfdefaultcase', 'cfdirectory', - 'cfdocument', 'cfdocumentitem', 'cfdocumentsection', 'cfdump', - 'cfelse', 'cfelseif', 'cferror', 'cfexecute', 'cfexit', 'cffile', - 'cfflush', 'cfform', 'cfformgroup', 'cfformitem', 'cfftp', - 'cffunction', 'cfgrid', 'cfgridcolumn', 'cfgridrow', 'cfgridupdate', - 'cfheader', 'cfhtmlhead', 'cfhttp', 'cfhttpparam', 'cfif', - 'cfimport', 'cfinclude', 'cfindex', 'cfinput', 'cfinsert', - 'cfinvoke', 'cfinvokeargument', 'cfldap', 'cflocation', 'cflock', - 'cflog', 'cflogin', 'cfloginuser', 'cflogout', 'cfloop', 'cfmail', - 'cfmailparam', 'cfmailpart', 'cfmodule', 'cfNTauthenticate', - 'cfobject', 'cfobjectcache', 'cfoutput', 'cfparam', 'cfpop', - 'cfprocessingdirective', 'cfprocparam', - 'cfprocresult', 'cfproperty', 'cfquery', 'cfqueryparam', - 'cfregistry', 'cfreport', 'cfreportparam', 'cfrethrow', 'cfreturn', - 'cfsavecontent', 'cfschedule', 'cfscript', 'cfsearch', 'cfselect', - 'cfset', 'cfsetting', 'cfsilent', 'cfstoredproc', - 'cfswitch', 'cftable', 'cftextarea', 'cfthrow', 'cftimer', - 'cftrace', 'cftransaction', 'cftree', 'cftreeitem', 'cftry', - 'cfupdate', 'cfwddx' - ), - /* HTML Tags */ - 2 => array( - 'a', 'abbr', 'acronym', 'address', 'applet', - - 'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b', - - 'caption', 'center', 'cite', 'code', 'colgroup', 'col', - - 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', - - 'em', - - 'fieldset', 'font', 'form', 'frame', 'frameset', - - 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', - - 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i', - - 'kbd', - - 'label', 'legend', 'link', 'li', - - 'map', 'meta', - - 'noframes', 'noscript', - - 'object', 'ol', 'optgroup', 'option', - - 'param', 'pre', 'p', - - 'q', - - 'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's', - - 'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt', - - 'ul', 'u', - - 'var', - ), - /* HTML attributes */ - 3 => array( - 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', - 'background', 'bgcolor', 'border', - 'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', - 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', - 'enctype', - 'face', 'for', 'frame', 'frameborder', - 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', - 'id', 'ismap', - 'label', 'lang', 'language', 'link', 'longdesc', - 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', - 'name', 'nohref', 'noresize', 'noshade', 'nowrap', - 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload', - 'profile', 'prompt', - 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', - 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', - 'tabindex', 'target', 'text', 'title', 'type', - 'usemap', - 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace', - 'width' - ), - /* CFM Script delimeters */ - 4 => array( - 'var', 'function', 'while', 'if','else' - ), - /* CFM Functions */ - 5 => array( - 'Abs', 'GetFunctionList', 'LSTimeFormat','ACos','GetGatewayHelper','LTrim','AddSOAPRequestHeader','GetHttpRequestData', - 'Max','AddSOAPResponseHeader','GetHttpTimeString','Mid','ArrayAppend','GetLocale','Min','ArrayAvg','GetLocaleDisplayName', - 'Minute','ArrayClear','GetMetaData','Month','ArrayDeleteAt','GetMetricData','MonthAsString','ArrayInsertAt','GetPageContext', - 'Now','ArrayIsEmpty','GetProfileSections','NumberFormat','ArrayLen','GetProfileString','ParagraphFormat','ArrayMax', - 'GetLocalHostIP','ParseDateTime','ArrayMin','GetSOAPRequest','Pi','ArrayNew','GetSOAPRequestHeader','PreserveSingleQuotes', - 'ArrayPrepend','GetSOAPResponse','Quarter','ArrayResize','GetSOAPResponseHeader','QueryAddColumn','ArraySet', - 'GetTempDirectory','QueryAddRow','ArraySort','QueryNew','ArraySum','GetTempFile','QuerySetCell', - 'ArraySwap','GetTickCount','QuotedValueList','ArrayToList','GetTimeZoneInfo','Rand','Asc','GetToken','Randomize', - 'ASin','Hash','RandRange','Atn','Hour','REFind','BinaryDecode','HTMLCodeFormat','REFindNoCase','BinaryEncode', - 'HTMLEditFormat','ReleaseComObject','BitAnd','IIf','RemoveChars','BitMaskClear','IncrementValue','RepeatString', - 'BitMaskRead','InputBaseN','Replace','BitMaskSet','Insert','ReplaceList','BitNot','Int','ReplaceNoCase','BitOr', - 'IsArray','REReplace','BitSHLN','IsBinary','REReplaceNoCase','BitSHRN','IsBoolean','Reverse','BitXor','IsCustomFunction', - 'Right','Ceiling','IsDate','RJustify','CharsetDecode','IsDebugMode','Round','CharsetEncode','IsDefined','RTrim', - 'Chr','IsLeapYear','Second','CJustify','IsLocalHost','SendGatewayMessage','Compare','IsNumeric','SetEncoding', - 'CompareNoCase','IsNumericDate','SetLocale','Cos','IsObject','SetProfileString','CreateDate','IsQuery','SetVariable', - 'CreateDateTime','IsSimpleValue','Sgn','CreateObject','IsSOAPRequest','Sin','CreateODBCDate','IsStruct','SpanExcluding', - 'CreateODBCDateTime','IsUserInRole','SpanIncluding','CreateODBCTime','IsValid','Sqr','CreateTime','IsWDDX','StripCR', - 'CreateTimeSpan','IsXML','StructAppend','CreateUUID','IsXmlAttribute','StructClear','DateAdd','IsXmlDoc','StructCopy', - 'DateCompare','IsXmlElem','StructCount','DateConvert','IsXmlNode','StructDelete','DateDiff','IsXmlRoot','StructFind', - 'DateFormat','JavaCast','StructFindKey','DatePart','JSStringFormat','StructFindValue','Day','LCase','StructGet', - 'DayOfWeek','Left','StructInsert','DayOfWeekAsString','Len','StructIsEmpty','DayOfYear','ListAppend','StructKeyArray', - 'DaysInMonth','ListChangeDelims','StructKeyExists','DaysInYear','ListContains','StructKeyList','DE','ListContainsNoCase', - 'StructNew','DecimalFormat','ListDeleteAt','StructSort','DecrementValue','ListFind','StructUpdate','Decrypt','ListFindNoCase', - 'Tan','DecryptBinary','ListFirst','TimeFormat','DeleteClientVariable','ListGetAt','ToBase64','DirectoryExists', - 'ListInsertAt','ToBinary','DollarFormat','ListLast','ToScript','Duplicate','ListLen','ToString','Encrypt','ListPrepend', - 'Trim','EncryptBinary','ListQualify','UCase','Evaluate','ListRest','URLDecode','Exp','ListSetAt','URLEncodedFormat', - 'ExpandPath','ListSort','URLSessionFormat','FileExists','ListToArray','Val','Find','ListValueCount','ValueList', - 'FindNoCase','ListValueCountNoCase','Week','FindOneOf','LJustify','Wrap','FirstDayOfMonth','Log','WriteOutput', - 'Fix','Log10','XmlChildPos','FormatBaseN','LSCurrencyFormat','XmlElemNew','GetAuthUser','LSDateFormat','XmlFormat', - 'GetBaseTagData','LSEuroCurrencyFormat','XmlGetNodeType','GetBaseTagList','LSIsCurrency','XmlNew','GetBaseTemplatePath', - 'LSIsDate','XmlParse','GetClientVariablesList','LSIsNumeric','XmlSearch','GetCurrentTemplatePath','LSNumberFormat', - 'XmlTransform','GetDirectoryFromPath','LSParseCurrency','XmlValidate','GetEncoding','LSParseDateTime','Year', - 'GetException','LSParseEuroCurrency','YesNoFormat','GetFileFromPath','LSParseNumber' - ), - /* CFM Attributes */ - 6 => array( - 'dbtype','connectstring','datasource','username','password','query','delimeter','description','required','hint','default','access','from','to','list','index' - ), - 7 => array( - 'EQ', 'GT', 'LT', 'GTE', 'LTE', 'IS', 'LIKE', 'NEQ' - ) - ), - 'SYMBOLS' => array( - '/', '=', '{', '}', '(', ')', '[', ']', '<', '>', '&' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false, - 7 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #990000; font-weight: bold;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #0000FF;', - 4 => 'color: #000000; font-weight: bold;', - 5 => 'color: #0000FF;', - 6 => 'color: #0000FF;', - 7 => 'color: #0000FF;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #0000FF;' - ), - 'STRINGS' => array( - 0 => 'color: #009900;' - ), - 'NUMBERS' => array( - 0 => 'color: #FF0000;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #0000FF;' - ), - 'SCRIPT' => array( - 0 => 'color: #808080; font-style: italic;', - 1 => 'color: #00bbdd;', - 2 => 'color: #0000FF;', - 3 => 'color: #000099;', - 4 => 'color: #333333;', - 5 => 'color: #333333;' - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => 'http://december.com/html/4/element/{FNAMEL}.html', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, - 'SCRIPT_DELIMITERS' => array( - 0 => array( - '' - ), - 1 => array( - ' '>' - ), - 2 => "/(?!<#)(?:(?:##)*)(#)[a-zA-Z0-9_\.\(\)]+(#)/", - 3 => array( - '' => '' - ), - 4 => array( - '<' => '>' - ), - 5 => '/((?!])+?(>)/si' - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => false, - 1 => false, - 2 => true, - 3 => true, - 4 => true, - 5 => true - ), - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 1 => array( - 'DISALLOWED_BEFORE' => '(?<=<|<\/)', - 'DISALLOWED_AFTER' => '(?=\s|\/|>)', - ), - 2 => array( - 'DISALLOWED_BEFORE' => '(?<=<|<\/)', - 'DISALLOWED_AFTER' => '(?=\s|\/|>)', - ), - 3 => array( - 'DISALLOWED_BEFORE' => '(?|^])', // allow ; before keywords - 'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-])', // allow & after keywords - ), - 7 => array( - 'DISALLOWED_BEFORE' => '(?&|^])', // allow ; before keywords - 'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-])', // allow & after keywords - ) - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/chaiscript.php b/_piecrust/libs/Geshi/geshi/chaiscript.php deleted file mode 100644 index a4dc431..0000000 --- a/_piecrust/libs/Geshi/geshi/chaiscript.php +++ /dev/null @@ -1,140 +0,0 @@ - 'ChaiScript', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - //Regular Expressions - 'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'break', 'else', 'else if', 'eval', 'for', 'if', 'return', 'while', 'try', 'catch', 'finally', - ), - 2 => array( - 'def', 'false', 'fun', 'true', 'var', 'attr', - ), - 3 => array( - // built in functions - 'throw', - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', - '+', '-', '*', '/', '%', - '!', '@', '&', '|', '^', - '<', '>', '=', - ',', ';', '?', ':' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000066; font-weight: bold;', - 2 => 'color: #003366; font-weight: bold;', - 3 => 'color: #000066;' - ), - 'COMMENTS' => array( - 1 => 'color: #006600; font-style: italic;', - 2 => 'color: #009966; font-style: italic;', - 'MULTI' => 'color: #006600; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #3366CC;' - ), - 'NUMBERS' => array( - 0 => 'color: #CC0000;' - ), - 'METHODS' => array( - 1 => 'color: #660066;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - 3 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - 0 => array( - ), - 1 => array( - ) - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - 1 => true - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/cil.php b/_piecrust/libs/Geshi/geshi/cil.php deleted file mode 100644 index 58bd42b..0000000 --- a/_piecrust/libs/Geshi/geshi/cil.php +++ /dev/null @@ -1,196 +0,0 @@ - 'CIL', - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'COMMENT_SINGLE' => array('//'), - 'COMMENT_MULTI' => array(), - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array(//Dotted - '.zeroinit', '.vtfixup', '.vtentry', '.vtable', '.ver', '.try', '.subsystem', '.size', '.set', '.removeon', - '.publickeytoken', '.publickey', '.property', '.permissionset', '.permission', '.pdirect', '.param', '.pack', - '.override', '.other', '.namespace', '.mresource', '.module', '.method', '.maxstack', '.manifestres', '.locals', - '.localized', '.locale', '.line', '.language', '.import', '.imagebase', '.hash', '.get', '.fire', '.file', '.field', - '.export', '.event', '.entrypoint', '.emitbyte', '.data', '.custom', '.culture', '.ctor', '.corflags', '.class', - '.cctor', '.assembly', '.addon' - ), - 2 => array(//Attributes - 'wrapper', 'with', 'winapi', 'virtual', 'vector', 'vararg', 'value', 'userdefined', 'unused', 'unmanagedexp', - 'unmanaged', 'unicode', 'to', 'tls', 'thiscall', 'synchronized', 'struct', 'strict', 'storage', 'stdcall', - 'static', 'specialname', 'special', 'serializable', 'sequential', 'sealed', 'runtime', 'rtspecialname', 'request', - 'reqsecobj', 'reqrefuse', 'reqopt', 'reqmin', 'record', 'public', 'privatescope', 'private', 'preservesig', - 'prejitgrant', 'prejitdeny', 'platformapi', 'pinvokeimpl', 'pinned', 'permitonly', 'out', 'optil', 'opt', - 'notserialized', 'notremotable', 'not_in_gc_heap', 'noprocess', 'noncaslinkdemand', 'noncasinheritance', - 'noncasdemand', 'nometadata', 'nomangle', 'nomachine', 'noinlining', 'noappdomain', 'newslot', 'nested', 'native', - 'modreq', 'modopt', 'marshal', 'managed', 'literal', 'linkcheck', 'lcid', 'lasterr', 'internalcall', 'interface', - 'instance', 'initonly', 'init', 'inheritcheck', 'in', 'import', 'implicitres', 'implicitcom', 'implements', - 'illegal', 'il', 'hidebysig', 'handler', 'fromunmanaged', 'forwardref', 'fixed', 'finally', 'final', 'filter', - 'filetime', 'field', 'fault', 'fastcall', 'famorassem', 'family', 'famandassem', 'extern', 'extends', 'explicit', - 'error', 'enum', 'endmac', 'deny', 'demand', 'default', 'custom', 'compilercontrolled', 'clsid', 'class', 'cil', - 'cf', 'cdecl', 'catch', 'beforefieldinit', 'autochar', 'auto', 'at', 'assert', 'assembly', 'as', 'any', 'ansi', - 'alignment', 'algorithm', 'abstract' - ), - 3 => array(//Types - 'wchar', 'void', 'variant', 'unsigned', 'valuetype', 'typedref', 'tbstr', 'sysstring', 'syschar', 'string', - 'streamed_object', 'stream', 'stored_object', 'safearray', 'objectref', 'object', 'nullref', 'method', 'lpwstr', - 'lpvoid', 'lptstr', 'lpstruct', 'lpstr', 'iunknown', 'int64', 'int32', 'int16', 'int8', 'int', 'idispatch', - 'hresult', 'float64', 'float32', 'float', 'decimal', 'date', 'currency', 'char', 'carray', 'byvalstr', - 'bytearray', 'boxed', 'bool', 'blob_object', 'blob', 'array' - ), - 4 => array(//Prefix - 'volatile', 'unaligned', 'tail', 'readonly', 'no', 'constrained' - ), - 5 => array(//Suffix - 'un', 'u8', 'u4', 'u2', 'u1', 'u', 's', 'ref', 'r8', 'r4', 'm1', 'i8', 'i4', 'i2', 'i1', 'i'#, '.8', '.7', '.6', '.5', '.4', '.3', '.2', '.1', '.0' - ), - 6 => array(//Base - 'xor', 'switch', 'sub', 'stloc', - 'stind', 'starg', - 'shr', 'shl', 'ret', 'rem', 'pop', 'or', 'not', 'nop', 'neg', 'mul', - 'localloc', 'leave', 'ldnull', 'ldloca', - 'ldloc', 'ldind', 'ldftn', 'ldc', 'ldarga', - 'ldarg', 'jmp', 'initblk', 'endfinally', 'endfilter', - 'endfault', 'dup', 'div', 'cpblk', 'conv', 'clt', 'ckfinite', 'cgt', 'ceq', 'calli', - 'call', 'brzero', 'brtrue', 'brnull', 'brinst', - 'brfalse', 'break', 'br', 'bne', 'blt', 'ble', 'bgt', 'bge', 'beq', 'arglist', - 'and', 'add' - ), - 7 => array(//Object - 'unbox.any', 'unbox', 'throw', 'stsfld', 'stobj', 'stfld', 'stelem', 'sizeof', 'rethrow', 'refanyval', 'refanytype', 'newobj', - 'newarr', 'mkrefany', 'ldvirtftn', 'ldtoken', 'ldstr', 'ldsflda', 'ldsfld', 'ldobj', 'ldlen', 'ldflda', 'ldfld', - 'ldelema', 'ldelem', 'isinst', 'initobj', 'cpobj', 'castclass', - 'callvirt', 'callmostderived', 'box' - ), - 8 => array(//Other - 'prefixref', 'prefix7', 'prefix6', 'prefix5', 'prefix4', 'prefix3', 'prefix2', 'prefix1', 'prefix0' - ), - 9 => array(//Literal - 'true', 'null', 'false' - ), - 10 => array(//Comment-like - '#line', '^THE_END^' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '!', '!!' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true, - 8 => true, - 9 => true, - 10 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color:maroon;font-weight:bold;', - 2 => 'color:blue;font-weight:bold;', - 3 => 'color:purple;font-weight:bold;', - 4 => 'color:teal;', - 5 => 'color:blue;', - 6 => 'color:blue;', - 7 => 'color:blue;', - 8 => 'color:blue;', - 9 => 'color:00008B', - 10 => 'color:gray' - ), - 'COMMENTS' => array( - 0 => 'color:gray;font-style:italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #008000; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #006400;' - ), - 'STRINGS' => array( - 0 => 'color: #008000;' - ), - 'NUMBERS' => array( - 0 => 'color: #00008B;' - ), - 'METHODS' => array( - 1 => 'color: #000033;' - ), - 'SYMBOLS' => array( - 0 => 'color: #006400;' - ), - 'REGEXPS' => array( - 0 => 'color:blue;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '', - 8 => '', - 9 => '', - 10 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '::' - ), - 'REGEXPS' => array( - 0 => '(?<=ldc\\.i4\\.)[0-8]|(?<=(?:ldarg|ldloc|stloc)\\.)[0-3]' # Pickup the opcodes that end with integers - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/clojure.php b/_piecrust/libs/Geshi/geshi/clojure.php deleted file mode 100644 index 4494fb2..0000000 --- a/_piecrust/libs/Geshi/geshi/clojure.php +++ /dev/null @@ -1,134 +0,0 @@ - 'Clojure', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array(';|' => '|;'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'defn', 'defn-', 'defmulti', 'defmethod', 'defmacro', 'deftest', - 'defstruct', 'def', 'defonce', 'let', 'letfn', 'do', 'cond', 'condp', - 'for', 'loop', 'recur', 'when', 'when-not', 'when-let', 'when-first', - 'if', 'if-let', 'if-not', 'doto', 'and', 'or','not','aget','aset', - 'dosync', 'doseq', 'dotimes', 'dorun', 'doall', - 'load', 'import', 'unimport', 'ns', 'in-ns', 'refer', 'print', - 'try', 'catch', 'finally', 'throw', 'fn', 'update-in', - 'with-open', 'with-local-vars', 'binding', - 'gen-class', 'gen-and-load-class', 'gen-and-save-class', - 'implement', 'proxy', 'lazy-cons', 'with-meta', - 'struct', 'struct-map', 'delay', 'locking', 'sync', 'time', 'apply', - 'remove', 'merge', 'interleave', 'interpose', 'distinct', - 'cons', 'concat', 'lazy-cat', 'cycle', 'rest', 'frest', 'drop', - 'drop-while', 'nthrest', 'take', 'take-while', 'take-nth', 'butlast', - 'reverse', 'sort', 'sort-by', 'split-at', 'partition', 'split-with', - 'first', 'ffirst', 'rfirst', 'zipmap', 'into', 'set', 'vec', - 'to-array-2d', 'not-empty', 'seq?', 'not-every?', 'every?', 'not-any?', - 'map', 'mapcat', 'vector?', 'list?', 'hash-map', 'reduce', 'filter', - 'vals', 'keys', 'rseq', 'subseq', 'rsubseq', 'count', 'empty?', - 'fnseq', 'repeatedly', 'iterate', 'drop-last', - 'repeat', 'replicate', 'range', 'into-array', - 'line-seq', 'resultset-seq', 're-seq', 're-find', 'tree-seq', 'file-seq', - 'iterator-seq', 'enumeration-seq', 'declare', 'xml-seq', - 'symbol?', 'string?', 'vector', 'conj', 'str', - 'pos?', 'neg?', 'zero?', 'nil?', 'inc', 'dec', 'format', - 'alter', 'commute', 'ref-set', 'floor', 'assoc', 'send', 'send-off' - ) - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>',';','|', '.', '..', '->', - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => true, - 1 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 0 => 'color: #555;', - 1 => 'color: #555;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - '::', ':' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/cmake.php b/_piecrust/libs/Geshi/geshi/cmake.php deleted file mode 100644 index 00143bf..0000000 --- a/_piecrust/libs/Geshi/geshi/cmake.php +++ /dev/null @@ -1,181 +0,0 @@ - () - * - First Release - * - * TODO (updated ) - * ------------------------- - * - ************************************************************************************* - * - * This file is part of GeSHi. - * - * GeSHi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GeSHi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeSHi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - ************************************************************************************/ - -$language_data = array ( - 'LANG_NAME' => 'CMake', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'ESCAPE_REGEXP' => array( - // Quoted variables ${...} - 1 => "/\\$(ENV)?\\{[^\\n\\}]*?\\}/i", - // Quoted registry keys [...] - 2 => "/\\[HKEY[^\n\\]]*?]/i" - ), - 'KEYWORDS' => array( - 1 => array( - 'add_custom_command', 'add_custom_target', 'add_definitions', - 'add_dependencies', 'add_executable', 'add_library', - 'add_subdirectory', 'add_test', 'aux_source_directory', 'break', - 'build_command', 'cmake_minimum_required', 'cmake_policy', - 'configure_file', 'create_test_sourcelist', 'define_property', - 'else', 'elseif', 'enable_language', 'enable_testing', - 'endforeach', 'endfunction', 'endif', 'endmacro', - 'endwhile', 'execute_process', 'export', 'file', 'find_file', - 'find_library', 'find_package', 'find_path', 'find_program', - 'fltk_wrap_ui', 'foreach', 'function', 'get_cmake_property', - 'get_directory_property', 'get_filename_component', 'get_property', - 'get_source_file_property', 'get_target_property', - 'get_test_property', 'if', 'include', 'include_directories', - 'include_external_msproject', 'include_regular_expression', - 'install', 'link_directories', 'list', 'load_cache', - 'load_command', 'macro', 'mark_as_advanced', 'math', 'message', - 'option', 'output_required_files', 'project', 'qt_wrap_cpp', - 'qt_wrap_ui', 'remove_definitions', 'return', 'separate_arguments', - 'set', 'set_directory_properties', 'set_property', - 'set_source_files_properties', 'set_target_properties', - 'set_tests_properties', 'site_name', 'source_group', 'string', - 'target_link_libraries', 'try_compile', 'try_run', 'unset', - 'variable_watch', 'while' - ), - 2 => array( - // Deprecated commands - 'build_name', 'exec_program', 'export_library_dependencies', - 'install_files', 'install_programs', 'install_targets', - 'link_libraries', 'make_directory', 'remove', 'subdir_depends', - 'subdirs', 'use_mangled_mesa', 'utility_source', - 'variable_requires', 'write_file' - ), - 3 => array( - // Special command arguments, this list is not comprehesive. - 'AND', 'APPEND', 'ASCII', 'BOOL', 'CACHE', 'COMMAND', 'COMMENT', - 'COMPARE', 'CONFIGURE', 'DEFINED', 'DEPENDS', 'DIRECTORY', - 'EQUAL', 'EXCLUDE_FROM_ALL', 'EXISTS', 'FALSE', 'FATAL_ERROR', - 'FILEPATH', 'FIND', 'FORCE', 'GET', 'GLOBAL', 'GREATER', - 'IMPLICIT_DEPENDS', 'INSERT', 'INTERNAL', 'IS_ABSOLUTE', - 'IS_DIRECTORY', 'IS_NEWER_THAN', 'LENGTH', 'LESS', - 'MAIN_DEPENDENCY', 'MATCH', 'MATCHALL', 'MATCHES', 'MODULE', 'NOT', - 'NOTFOUND', 'OFF', 'ON', 'OR', 'OUTPUT', 'PARENT_SCOPE', 'PATH', - 'POLICY', 'POST_BUILD', 'PRE_BUILD', 'PRE_LINK', 'PROPERTY', - 'RANDOM', 'REGEX', 'REMOVE_AT', 'REMOVE_DUPLICATES', 'REMOVE_ITEM', - 'REPLACE', 'REVERSE', 'SEND_ERROR', 'SHARED', 'SORT', 'SOURCE', - 'STATIC', 'STATUS', 'STREQUAL', 'STRGREATER', 'STRING', 'STRIP', - 'STRLESS', 'SUBSTRING', 'TARGET', 'TEST', 'TOLOWER', 'TOUPPER', - 'TRUE', 'VERBATIM', 'VERSION', 'VERSION_EQUAL', 'VERSION_GREATOR', - 'VERSION_LESS', 'WORKING_DIRECTORY', - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => true - ), - 'SYMBOLS' => array( - 0 => array('(', ')') - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #1f3f81; font-style: bold;', - 2 => 'color: #1f3f81;', - 3 => 'color: #077807; font-sytle: italic;' - ), - 'BRACKETS' => array(), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 1 => 'color: #b08000;', - 2 => 'color: #0000cd;' - ), - 'STRINGS' => array( - 0 => 'color: #912f11;', - ), - 'SYMBOLS' => array( - 0 => 'color: #197d8b;' - ), - 'NUMBERS' => array(), - 'METHODS' => array(), - 'REGEXPS' => array( - 0 => 'color: #b08000;', - 1 => 'color: #0000cd;' - ), - 'SCRIPT' => array() - ), - 'URLS' => array( - 1 => 'http://www.cmake.org/cmake/help/cmake2.6docs.html#command:{FNAMEL}', - 2 => 'http://www.cmake.org/cmake/help/cmake2.6docs.html#command:{FNAMEL}', - 3 => '', - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array( - // Unquoted variables - 0 => "\\$(ENV)?\\{[^\\n}]*?\\}", - // Unquoted registry keys - 1 => "\\[HKEY[^\n\\]]*?]" - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - // These keywords cannot come after a open paren - 1 => array( - 'DISALLOWED_AFTER' => '(?= *\()' - ), - 2 => array( - 'DISALLOWED_AFTER' => '(?= *\()' - ) - ), - 'ENABLE_FLAGS' => array( - 'BRACKETS' => GESHI_NEVER, - 'METHODS' => GESHI_NEVER, - 'NUMBERS' => GESHI_NEVER - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/cobol.php b/_piecrust/libs/Geshi/geshi/cobol.php deleted file mode 100644 index 9263370..0000000 --- a/_piecrust/libs/Geshi/geshi/cobol.php +++ /dev/null @@ -1,244 +0,0 @@ - 'COBOL', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array(1 => '/^\*.*?$/m'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"', "'"), - 'ESCAPE_CHAR' => '\\', - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | - GESHI_NUMBER_FLT_NONSCI | - GESHI_NUMBER_FLT_SCI_SHORT | - GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - 1 => array( //Compiler Directives - 'ANSI', 'BLANK', 'NOBLANK', 'CALL-SHARED', 'CANCEL', 'NOCANCEL', - 'CHECK', 'CODE', 'NOCODE', 'COLUMNS', 'COMPACT', 'NOCOMPACT', - 'COMPILE', 'CONSULT', 'NOCONSULT', 'CROSSREF', 'NOCROSSREF', - 'DIAGNOSE-74', 'NODIAGNOSE-74', 'DIAGNOSE-85', 'NODIAGNOSE-85', - 'DIAGNOSEALL', 'NODIAGNOSEALL', 'ENDIF', 'ENDUNIT', 'ENV', - 'ERRORFILE', 'ERRORS', 'FIPS', 'NOFIPS', 'FMAP', 'HEADING', 'HEAP', - 'HIGHPIN', 'HIGHREQUESTERS', 'ICODE', 'NOICODE', 'IF', 'IFNOT', - 'INNERLIST', 'NOINNERLIST', 'INSPECT', 'NOINSPECT', 'LARGEDATA', - 'LD', 'LESS-CODE', 'LIBRARY', 'LINES', 'LIST', 'NOLIST', 'LMAP', - 'NOLMAP', 'MAIN', 'MAP', 'NOMAP', 'NLD', 'NONSTOP', 'NON-SHARED', - 'OPTIMIZE', 'PERFORM-TRACE', 'PORT', 'NOPORT', 'RESETTOG', - 'RUNNABLE', 'RUNNAMED', 'SAVE', 'SAVEABEND', 'NOSAVEABEND', - 'SEARCH', 'NOSEARCH', 'SECTION', 'SETTOG', 'SHARED', 'SHOWCOPY', - 'NOSHOWCOPY', 'SHOWFILE', 'NOSHOWFILE', 'SOURCE', 'SQL', 'NOSQL', - 'SQLMEM', 'SUBSET', 'SUBTYPE', 'SUPPRESS', 'NOSUPPRESS', 'SYMBOLS', - 'NOSYMBOLS', 'SYNTAX', 'TANDEM', 'TRAP2', 'NOTRAP2', 'TRAP2-74', - 'NOTRAP2-74', 'UL', 'WARN', 'NOWARN' - ), - 2 => array( //Statement Keywords - 'ACCEPT', 'ADD', 'TO', 'GIVING', 'CORRESPONDING', 'ALTER', 'CALL', - 'CHECKPOINT', 'CLOSE', 'COMPUTE', 'CONTINUE', 'COPY', - 'DELETE', 'DISPLAY', 'DIVIDE', 'INTO', 'REMAINDER', 'ENTER', - 'COBOL', 'EVALUATE', 'EXIT', 'GO', 'INITIALIZE', - 'TALLYING', 'REPLACING', 'CONVERTING', 'LOCKFILE', 'MERGE', 'MOVE', - 'MULTIPLY', 'OPEN', 'PERFORM', 'TIMES', - 'UNTIL', 'VARYING', 'RETURN', - ), - 3 => array( //Reserved in some contexts - 'ACCESS', 'ADDRESS', 'ADVANCING', 'AFTER', 'ALL', - 'ALPHABET', 'ALPHABETIC', 'ALPHABETIC-LOWER', 'ALPHABETIC-UPPER', - 'ALPHANUMERIC', 'ALPHANUMERIC-EDITED', 'ALSO', 'ALTERNATE', - 'AND', 'ANY', 'APPROXIMATE', 'AREA', 'AREAS', 'ASCENDING', 'ASSIGN', - 'AT', 'AUTHOR', 'BEFORE', 'BINARY', 'BLOCK', 'BOTTOM', 'BY', - 'CD', 'CF', 'CH', 'CHARACTER', 'CHARACTERS', - 'CHARACTER-SET', 'CLASS', 'CLOCK-UNITS', - 'CODE-SET', 'COLLATING', 'COLUMN', 'COMMA', - 'COMMON', 'COMMUNICATION', 'COMP', 'COMP-3', 'COMP-5', - 'COMPUTATIONAL', 'COMPUTATIONAL-3', 'COMPUTATIONAL-5', - 'CONFIGURATION', 'CONTAINS', 'CONTENT', 'CONTROL', - 'CONTROLS', 'CORR', 'COUNT', - 'CURRENCY', 'DATA', 'DATE', 'DATE-COMPILED', 'DATE-WRITTEN', 'DAY', - 'DAY-OF-WEEK', 'DE', 'DEBUG-CONTENTS', 'DEBUG-ITEM', 'DEBUG-LINE', - 'DEBUG-SUB-2', 'DEBUG-SUB-3', 'DEBUGGING', 'DECIMAL-POINT', - 'DECLARATIVES', 'DEBUG-NAME', 'DEBUG-SUB-1', 'DELIMITED', - 'DELIMITER', 'DEPENDING', 'DESCENDING', 'DESTINATION', 'DETAIL', - 'DISABLE', 'DIVISION', 'DOWN', 'DUPLICATES', - 'DYNAMIC', 'EGI', 'ELSE', 'EMI', 'ENABLE', 'END', 'END-ADD', - 'END-COMPUTE', 'END-DELETE', 'END-DIVIDE', 'END-EVALUATE', 'END-IF', - 'END-MULTIPLY', 'END-OF-PAGE', 'END-PERFORM', 'END-READ', - 'END-RECEIVE', 'END-RETURN', 'END-REWRITE', 'END-SEARCH', - 'END-START', 'END-STRING', 'END-SUBTRACT', 'END-UNSTRING', - 'END-WRITE', 'EOP', 'EQUAL', 'ERROR', 'ESI', - 'EVERY', 'EXCEPTION', 'EXCLUSIVE', 'EXTEND', - 'EXTENDED-STORAGE', 'EXTERNAL', 'FALSE', 'FD', 'FILE', - 'FILE-CONTROL', 'FILLER', 'FINAL', 'FIRST', 'FOOTING', 'FOR', - 'FROM', 'FUNCTION', 'GENERATE', 'GENERIC', 'GLOBAL', - 'GREATER', 'GROUP', 'GUARDIAN-ERR', 'HIGH-VALUE', - 'HIGH-VALUES', 'I-O', 'I-O-CONTROL', 'IDENTIFICATION', 'IN', - 'INDEX', 'INDEXED', 'INDICATE', 'INITIAL', 'INITIATE', - 'INPUT', 'INPUT-OUTPUT', 'INSTALLATION', - 'INVALID', 'IS', 'JUST', 'JUSTIFIED', 'KEY', 'LABEL', 'LAST', - 'LEADING', 'LEFT', 'LESS', 'LIMIT', 'LIMITS', 'LINAGE', - 'LINAGE-COUNTER', 'LINE', 'LINE-COUNTER', 'LINKAGE', 'LOCK', - 'LOW-VALUE', 'LOW-VALUES', 'MEMORY', 'MESSAGE', - 'MODE', 'MODULES', 'MULTIPLE', 'NATIVE', - 'NEGATIVE', 'NEXT', 'NO', 'NOT', 'NULL', 'NULLS', 'NUMBER', - 'NUMERIC', 'NUMERIC-EDITED', 'OBJECT-COMPUTER', 'OCCURS', 'OF', - 'OFF', 'OMITTED', 'ON', 'OPTIONAL', 'OR', 'ORDER', - 'ORGANIZATION', 'OTHER', 'OUTPUT', 'OVERFLOW', 'PACKED-DECIMAL', - 'PADDING', 'PAGE', 'PAGE-COUNTER', 'PF', 'PH', 'PIC', - 'PICTURE', 'PLUS', 'POINTER', 'POSITION', 'POSITIVE', 'PRINTING', - 'PROCEDURE', 'PROCEDURES', 'PROCEED', 'PROGRAM', 'PROGRAM-ID', - 'PROGRAM-STATUS', 'PROGRAM-STATUS-1', 'PROGRAM-STATUS-2', 'PROMPT', - 'PROTECTED', 'PURGE', 'QUEUE', 'QUOTE', 'QUOTES', 'RD', - 'RECEIVE', 'RECEIVE-CONTROL', 'RECORD', 'RECORDS', - 'REDEFINES', 'REEL', 'REFERENCE', 'REFERENCES', 'RELATIVE', - 'REMOVAL', 'RENAMES', 'REPLACE', - 'REPLY', 'REPORT', 'REPORTING', 'REPORTS', 'RERUN', - 'RESERVE', 'RESET', 'REVERSED', 'REWIND', 'REWRITE', 'RF', - 'RH', 'RIGHT', 'ROUNDED', 'RUN', 'SAME', 'SD', - 'SECURITY', 'SEGMENT', 'SEGMENT-LIMIT', 'SELECT', 'SEND', - 'SENTENCE', 'SEPARATE', 'SEQUENCE', 'SEQUENTIAL', 'SET', - 'SIGN', 'SIZE', 'SORT', 'SORT-MERGE', 'SOURCE-COMPUTER', - 'SPACE', 'SPACES', 'SPECIAL-NAMES', 'STANDARD', 'STANDARD-1', - 'STANDARD-2', 'START', 'STARTBACKUP', 'STATUS', 'STOP', 'STRING', - 'SUB-QUEUE-1', 'SUB-QUEUE-2', 'SUB-QUEUE-3', 'SUBTRACT', - 'SYMBOLIC', 'SYNC', 'SYNCDEPTH', 'SYNCHRONIZED', - 'TABLE', 'TAL', 'TAPE', 'TERMINAL', 'TERMINATE', 'TEST', - 'TEXT', 'THAN', 'THEN', 'THROUGH', 'THRU', 'TIME', - 'TOP', 'TRAILING', 'TRUE', 'TYPE', 'UNIT', 'UNLOCK', 'UNLOCKFILE', - 'UNLOCKRECORD', 'UNSTRING', 'UP', 'UPON', 'USAGE', 'USE', - 'USING', 'VALUE', 'VALUES', 'WHEN', 'WITH', 'WORDS', - 'WORKING-STORAGE', 'WRITE', 'ZERO', 'ZEROES' - ), - 4 => array( //Standard functions - 'ACOS', 'ANNUITY', 'ASIN', 'ATAN', 'CHAR', 'COS', 'CURRENT-DATE', - 'DATE-OF-INTEGER', 'DAY-OF-INTEGER', 'FACTORIAL', 'INTEGER', - 'INTEGER-OF-DATE', 'INTEGER-OF-DAY', 'INTEGER-PART', 'LENGTH', - 'LOG', 'LOG10', 'LOWER-CASE', 'MAX', 'MEAN', 'MEDIAN', 'MIDRANGE', - 'MIN', 'MOD', 'NUMVAL', 'NUMVAL-C', 'ORD', 'ORD-MAX', 'ORD-MIN', - 'PRESENT-VALUE', 'RANDOM', 'RANGE', 'REM', 'REVERSE', 'SIN', 'SQRT', - 'STANDARD-DEVIATION', 'SUM', 'TAN', 'UPPER-CASE', 'VARIANCE', - 'WHEN-COMPILED' - ), - 5 => array( //Privileged Built-in Functions - '#IN', '#OUT', '#TERM', '#TEMP', '#DYNAMIC', 'COBOL85^ARMTRAP', - 'COBOL85^COMPLETION', 'COBOL_COMPLETION_', 'COBOL_CONTROL_', - 'COBOL_GETENV_', 'COBOL_PUTENV_', 'COBOL85^RETURN^SORT^ERRORS', - 'COBOL_RETURN_SORT_ERRORS_', 'COBOL85^REWIND^SEQUENTIAL', - 'COBOL_REWIND_SEQUENTIAL_', 'COBOL85^SET^SORT^PARAM^TEXT', - 'COBOL_SET_SORT_PARAM_TEXT_', 'COBOL85^SET^SORT^PARAM^VALUE', - 'COBOL_SET_SORT_PARAM_VALUE_', 'COBOL_SET_MAX_RECORD_', - 'COBOL_SETMODE_', 'COBOL85^SPECIAL^OPEN', 'COBOL_SPECIAL_OPEN_', - 'COBOLASSIGN', 'COBOL_ASSIGN_', 'COBOLFILEINFO', 'COBOL_FILE_INFO_', - 'COBOLSPOOLOPEN', 'CREATEPROCESS', 'ALTERPARAMTEXT', - 'CHECKLOGICALNAME', 'CHECKMESSAGE', 'DELETEASSIGN', 'DELETEPARAM', - 'DELETESTARTUP', 'GETASSIGNTEXT', 'GETASSIGNVALUE', 'GETBACKUPCPU', - 'GETPARAMTEXT', 'GETSTARTUPTEXT', 'PUTASSIGNTEXT', 'PUTASSIGNVALUE', - 'PUTPARAMTEXT', 'PUTSTARTUPTEXT' - ) - ), - 'SYMBOLS' => array( - //Avoid having - in identifiers marked as symbols - ' + ', ' - ', ' * ', ' / ', ' ** ', - '.', ',', - '=', - '(', ')', '[', ']' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000080; font-weight: bold;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #008000; font-weight: bold;', - 4 => 'color: #000080;', - 5 => 'color: #008000;', - ), - 'COMMENTS' => array( - 1 => 'color: #a0a0a0; font-style: italic;', - 'MULTI' => 'color: #a0a0a0; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #339933;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #993399;' - ), - 'METHODS' => array( - 1 => 'color: #202020;' - ), - 'SYMBOLS' => array( - 0 => 'color: #000066;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 - ); - -?> diff --git a/_piecrust/libs/Geshi/geshi/cpp-qt.php b/_piecrust/libs/Geshi/geshi/cpp-qt.php deleted file mode 100644 index 07f0cf2..0000000 --- a/_piecrust/libs/Geshi/geshi/cpp-qt.php +++ /dev/null @@ -1,564 +0,0 @@ - 'C++ (QT)', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - //Multiline-continued single-line comments - 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', - //Multiline-continued preprocessor define - 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m' - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array( - //Simple Single Char Escapes - 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i", - //Hexadecimal Char Specs - 2 => "#\\\\x[\da-fA-F]{2}#", - //Hexadecimal Char Specs - 3 => "#\\\\u[\da-fA-F]{4}#", - //Hexadecimal Char Specs - 4 => "#\\\\U[\da-fA-F]{8}#", - //Octal Char Specs - 5 => "#\\\\[0-7]{1,3}#" - ), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | - GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | - GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - 1 => array( - 'case', 'continue', 'default', 'do', 'else', 'for', 'goto', 'if', 'return', - 'switch', 'while', 'delete', 'new', 'this' - ), - 2 => array( - 'NULL', 'false', 'break', 'true', 'enum', 'errno', 'EDOM', - 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG', - 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG', - 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP', - 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP', - 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN', - 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN', - 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT', - 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR', - 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', - 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr', - 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC', - 'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace', - 'try', 'catch', 'inline', 'dynamic_cast', 'const_cast', 'reinterpret_cast', - 'static_cast', 'explicit', 'friend', 'typename', 'typeid', 'class' , - 'foreach','connect', 'Q_OBJECT' , 'slots' , 'signals', 'Q_SIGNALS', 'Q_SLOTS', - 'Q_FOREACH', 'QCOMPARE', 'QVERIFY', 'qDebug', 'kDebug', 'QBENCHMARK' - ), - 3 => array( - 'cin', 'cerr', 'clog', 'cout', - 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert', - 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint', - 'ispunct', 'isspace', 'isupper', 'isxdigit', 'tolower', 'toupper', - 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp', - 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2', - 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', - 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen', - 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf', - 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf', - 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc', - 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind', - 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs', - 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc', - 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv', - 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat', - 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn', - 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy', - 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime', - 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime' - ), - 4 => array( - 'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint', - 'register', 'short', 'shortint', 'signed', 'static', 'struct', - 'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf', - 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t', - 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', 'wchar_t', - - 'int8', 'int16', 'int32', 'int64', - 'uint8', 'uint16', 'uint32', 'uint64', - - 'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t', - 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t', - - 'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t', - 'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t', - - 'int8_t', 'int16_t', 'int32_t', 'int64_t', - 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', - - 'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t' - ), - 5 => array( - "Q_UINT16", "Q_UINT32", "Q_UINT64", "Q_UINT8", "Q_ULLONG", - "Q_ULONG", "Q3Accel", "Q3Action", "Q3ActionGroup", "Q3AsciiBucket", - "Q3AsciiCache", "Q3AsciiCacheIterator", "Q3AsciiDict", - "Q3AsciiDictIterator", "Q3BaseBucket", "Q3BoxLayout", "Q3Button", - "Q3ButtonGroup", "Q3Cache", "Q3CacheIterator", "Q3Canvas", - "Q3CanvasEllipse", "Q3CanvasItem", "Q3CanvasItemList", - "Q3CanvasLine", "Q3CanvasPixmap", "Q3CanvasPixmapArray", - "Q3CanvasPolygon", "Q3CanvasPolygonalItem", "Q3CanvasRectangle", - "Q3CanvasSpline", "Q3CanvasSprite", "Q3CanvasText", "Q3CanvasView", - "Q3CheckListItem", "Q3CheckTableItem", "Q3CleanupHandler", - "Q3ColorDrag", "Q3ComboBox", "Q3ComboTableItem", "Q3CString", - "Q3DataBrowser", "Q3DataTable", "Q3DataView", "Q3DateEdit", - "Q3DateTimeEdit", "Q3DateTimeEditBase", "Q3DeepCopy", "Q3Dict", - "Q3DictIterator", "Q3Dns", "Q3DnsSocket", "Q3DockArea", - "Q3DockAreaLayout", "Q3DockWindow", "Q3DragObject", "Q3DropSite", - "Q3EditorFactory", "Q3FileDialog", "Q3FileIconProvider", - "Q3FilePreview", "Q3Frame", "Q3Ftp", "Q3GArray", "Q3GCache", - "Q3GCacheIterator", "Q3GDict", "Q3GDictIterator", "Q3GList", - "Q3GListIterator", "Q3GListStdIterator", "Q3Grid", "Q3GridLayout", - "Q3GridView", "Q3GroupBox", "Q3GVector", "Q3HBox", "Q3HBoxLayout", - "Q3HButtonGroup", "Q3Header", "Q3HGroupBox", "Q3Http", - "Q3HttpHeader", "Q3HttpRequestHeader", "Q3HttpResponseHeader", - "Q3IconDrag", "Q3IconDragItem", "Q3IconView", "Q3IconViewItem", - "Q3ImageDrag", "Q3IntBucket", "Q3IntCache", "Q3IntCacheIterator", - "Q3IntDict", "Q3IntDictIterator", "Q3ListBox", "Q3ListBoxItem", - "Q3ListBoxPixmap", "Q3ListBoxText", "Q3ListView", "Q3ListViewItem", - "Q3ListViewItemIterator", "Q3LNode", "Q3LocalFs", "Q3MainWindow", - "Q3MemArray", "Q3MimeSourceFactory", "Q3MultiLineEdit", - "Q3NetworkOperation", "Q3NetworkProtocol", "Q3NetworkProtocolDict", - "Q3NetworkProtocolFactory", "Q3NetworkProtocolFactoryBase", - "Q3ObjectDictionary", "Q3PaintDeviceMetrics", "Q3Painter", - "Q3Picture", "Q3PointArray", "Q3PolygonScanner", "Q3PopupMenu", - "Q3Process", "Q3ProgressBar", "Q3ProgressDialog", "Q3PtrBucket", - "Q3PtrCollection", "Q3PtrDict", "Q3PtrDictIterator", "Q3PtrList", - "Q3PtrListIterator", "Q3PtrListStdIterator", "Q3PtrQueue", - "Q3PtrStack", "Q3PtrVector", "Q3RangeControl", "Q3ScrollView", - "Q3Semaphore", "Q3ServerSocket", "Q3Shared", "Q3Signal", - "Q3SimpleRichText", "Q3SingleCleanupHandler", "Q3Socket", - "Q3SocketDevice", "Q3SortedList", "Q3SpinWidget", "Q3SqlCursor", - "Q3SqlEditorFactory", "Q3SqlFieldInfo", "Q3SqlFieldInfoList", - "Q3SqlForm", "Q3SqlPropertyMap", "Q3SqlRecordInfo", - "Q3SqlSelectCursor", "Q3StoredDrag", "Q3StrIList", "Q3StringBucket", - "Q3StrIVec", "Q3StrList", "Q3StrListIterator", "Q3StrVec", - "Q3StyleSheet", "Q3StyleSheetItem", "Q3SyntaxHighlighter", - "Q3TabDialog", "Q3Table", "Q3TableItem", "Q3TableSelection", - "Q3TextBrowser", "Q3TextDrag", "Q3TextEdit", - "Q3TextEditOptimPrivate", "Q3TextStream", "Q3TextView", - "Q3TimeEdit", "Q3ToolBar", "Q3TSFUNC", "Q3UriDrag", "Q3Url", - "Q3UrlOperator", "Q3ValueList", "Q3ValueListConstIterator", - "Q3ValueListIterator", "Q3ValueStack", "Q3ValueVector", "Q3VBox", - "Q3VBoxLayout", "Q3VButtonGroup", "Q3VGroupBox", "Q3WhatsThis", - "Q3WidgetStack", "Q3Wizard", "QAbstractButton", - "QAbstractEventDispatcher", "QAbstractExtensionFactory", - "QAbstractExtensionManager", "QAbstractFileEngine", - "QAbstractFileEngineHandler", "QAbstractFileEngineIterator", - "QAbstractFormBuilder", "QAbstractGraphicsShapeItem", - "QAbstractItemDelegate", "QAbstractItemModel", "QAbstractItemView", - "QAbstractListModel", "QAbstractMessageHandler", - "QAbstractNetworkCache", "QAbstractPageSetupDialog", - "QAbstractPrintDialog", "QAbstractProxyModel", - "QAbstractScrollArea", "QAbstractSlider", "QAbstractSocket", - "QAbstractSpinBox", "QAbstractTableModel", - "QAbstractTextDocumentLayout", "QAbstractUndoItem", - "QAbstractUriResolver", "QAbstractXmlNodeModel", - "QAbstractXmlReceiver", "QAccessible", "QAccessible2Interface", - "QAccessibleApplication", "QAccessibleBridge", - "QAccessibleBridgeFactoryInterface", "QAccessibleBridgePlugin", - "QAccessibleEditableTextInterface", "QAccessibleEvent", - "QAccessibleFactoryInterface", "QAccessibleInterface", - "QAccessibleInterfaceEx", "QAccessibleObject", - "QAccessibleObjectEx", "QAccessiblePlugin", - "QAccessibleSimpleEditableTextInterface", - "QAccessibleTableInterface", "QAccessibleTextInterface", - "QAccessibleValueInterface", "QAccessibleWidget", - "QAccessibleWidgetEx", "QAction", "QActionEvent", "QActionGroup", - "QApplication", "QArgument", "QAssistantClient", "QAtomicInt", - "QAtomicPointer", "QAuthenticator", "QBasicAtomicInt", - "QBasicAtomicPointer", "QBasicTimer", "QBitArray", "QBitmap", - "QBitRef", "QBool", "QBoxLayout", "QBrush", "QBrushData", "QBuffer", - "QButtonGroup", "QByteArray", "QByteArrayMatcher", "QByteRef", - "QCache", "QCalendarWidget", "QCDEStyle", "QChar", "QCharRef", - "QCheckBox", "QChildEvent", "QCleanlooksStyle", "QClipboard", - "QClipboardEvent", "QCloseEvent", "QColor", "QColorDialog", - "QColorGroup", "QColormap", "QColumnView", "QComboBox", - "QCommandLinkButton", "QCommonStyle", "QCompleter", - "QConicalGradient", "QConstString", "QContextMenuEvent", "QCOORD", - "QCoreApplication", "QCryptographicHash", "QCursor", "QCursorShape", - "QCustomEvent", "QDataStream", "QDataWidgetMapper", "QDate", - "QDateEdit", "QDateTime", "QDateTimeEdit", "QDB2Driver", - "QDB2Result", "QDBusAbstractAdaptor", "QDBusAbstractInterface", - "QDBusArgument", "QDBusConnection", "QDBusConnectionInterface", - "QDBusContext", "QDBusError", "QDBusInterface", "QDBusMessage", - "QDBusMetaType", "QDBusObjectPath", "QDBusPendingCall", - "QDBusPendingCallWatcher", "QDBusPendingReply", - "QDBusPendingReplyData", "QDBusReply", "QDBusServer", - "QDBusSignature", "QDBusVariant", "QDebug", - "QDesignerActionEditorInterface", "QDesignerBrushManagerInterface", - "QDesignerComponents", "QDesignerContainerExtension", - "QDesignerCustomWidgetCollectionInterface", - "QDesignerCustomWidgetInterface", "QDesignerDnDItemInterface", - "QDesignerDynamicPropertySheetExtension", "QDesignerExportWidget", - "QDesignerExtraInfoExtension", "QDesignerFormEditorInterface", - "QDesignerFormEditorPluginInterface", "QDesignerFormWindowCursorInterface", - "QDesignerFormWindowInterface", "QDesignerFormWindowManagerInterface", - "QDesignerFormWindowToolInterface", - "QDesignerIconCacheInterface", "QDesignerIntegrationInterface", - "QDesignerLanguageExtension", "QDesignerLayoutDecorationExtension", - "QDesignerMemberSheetExtension", "QDesignerMetaDataBaseInterface", - "QDesignerMetaDataBaseItemInterface", - "QDesignerObjectInspectorInterface", "QDesignerPromotionInterface", - "QDesignerPropertyEditorInterface", - "QDesignerPropertySheetExtension", "QDesignerResourceBrowserInterface", - "QDesignerTaskMenuExtension", "QDesignerWidgetBoxInterface", - "QDesignerWidgetDataBaseInterface", "QDesignerWidgetDataBaseItemInterface", - "QDesignerWidgetFactoryInterface", "QDesktopServices", - "QDesktopWidget", "QDial", "QDialog", "QDialogButtonBox", "QDir", - "QDirIterator", "QDirModel", "QDockWidget", "QDomAttr", - "QDomCDATASection", "QDomCharacterData", "QDomComment", - "QDomDocument", "QDomDocumentFragment", "QDomDocumentType", - "QDomElement", "QDomEntity", "QDomEntityReference", - "QDomImplementation", "QDomNamedNodeMap", "QDomNode", - "QDomNodeList", "QDomNotation", "QDomProcessingInstruction", - "QDomText", "QDoubleSpinBox", "QDoubleValidator", "QDrag", - "QDragEnterEvent", "QDragLeaveEvent", "QDragMoveEvent", - "QDragResponseEvent", "QDropEvent", "QDynamicPropertyChangeEvent", - "QErrorMessage", "QEvent", "QEventLoop", "QEventSizeOfChecker", - "QExplicitlySharedDataPointer", "QExtensionFactory", - "QExtensionManager", "QFactoryInterface", "QFile", "QFileDialog", - "QFileIconProvider", "QFileInfo", "QFileInfoList", - "QFileInfoListIterator", "QFileOpenEvent", "QFileSystemModel", - "QFileSystemWatcher", "QFlag", "QFlags", "QFocusEvent", - "QFocusFrame", "QFont", "QFontComboBox", "QFontDatabase", - "QFontDialog", "QFontInfo", "QFontMetrics", "QFontMetricsF", - "QForeachContainer", "QForeachContainerBase", "QFormBuilder", - "QFormLayout", "QFrame", "QFSFileEngine", "QFtp", "QFuture", - "QFutureInterface", "QFutureInterfaceBase", "QFutureIterator", - "QFutureSynchronizer", "QFutureWatcher", "QFutureWatcherBase", - "QGenericArgument", "QGenericReturnArgument", "QGLColormap", - "QGLContext", "QGLFormat", "QGLFramebufferObject", "QGlobalStatic", - "QGlobalStaticDeleter", "QGLPixelBuffer", "QGLWidget", "QGradient", - "QGradientStop", "QGradientStops", "QGraphicsEllipseItem", - "QGraphicsGridLayout", "QGraphicsItem", "QGraphicsItemAnimation", - "QGraphicsItemGroup", "QGraphicsLayout", "QGraphicsLayoutItem", - "QGraphicsLinearLayout", "QGraphicsLineItem", "QGraphicsPathItem", - "QGraphicsPixmapItem", "QGraphicsPolygonItem", - "QGraphicsProxyWidget", "QGraphicsRectItem", "QGraphicsScene", - "QGraphicsSceneContextMenuEvent", "QGraphicsSceneDragDropEvent", - "QGraphicsSceneEvent", "QGraphicsSceneHelpEvent", - "QGraphicsSceneHoverEvent", "QGraphicsSceneMouseEvent", - "QGraphicsSceneMoveEvent", "QGraphicsSceneResizeEvent", - "QGraphicsSceneWheelEvent", "QGraphicsSimpleTextItem", - "QGraphicsSvgItem", "QGraphicsTextItem", "QGraphicsView", - "QGraphicsWidget", "QGridLayout", "QGroupBox", "QGtkStyle", "QHash", - "QHashData", "QHashDummyNode", "QHashDummyValue", "QHashIterator", - "QHashNode", "QHBoxLayout", "QHeaderView", "QHelpContentItem", - "QHelpContentModel", "QHelpContentWidget", "QHelpEngine", - "QHelpEngineCore", "QHelpEvent", "QHelpGlobal", "QHelpIndexModel", - "QHelpIndexWidget", "QHelpSearchEngine", "QHelpSearchQuery", - "QHelpSearchQueryWidget", "QHelpSearchResultWidget", "QHideEvent", - "QHostAddress", "QHostInfo", "QHoverEvent", "QHttp", "QHttpHeader", - "QHttpRequestHeader", "QHttpResponseHeader", "QIBaseDriver", - "QIBaseResult", "QIcon", "QIconDragEvent", "QIconEngine", - "QIconEngineFactoryInterface", "QIconEngineFactoryInterfaceV2", - "QIconEnginePlugin", "QIconEnginePluginV2", "QIconEngineV2", - "QIconSet", "QImage", "QImageIOHandler", - "QImageIOHandlerFactoryInterface", "QImageIOPlugin", "QImageReader", - "QImageTextKeyLang", "QImageWriter", "QIncompatibleFlag", - "QInputContext", "QInputContextFactory", - "QInputContextFactoryInterface", "QInputContextPlugin", - "QInputDialog", "QInputEvent", "QInputMethodEvent", "Q_INT16", - "Q_INT32", "Q_INT64", "Q_INT8", "QInternal", "QIntForSize", - "QIntForType", "QIntValidator", "QIODevice", "Q_IPV6ADDR", - "QIPv6Address", "QItemDelegate", "QItemEditorCreator", - "QItemEditorCreatorBase", "QItemEditorFactory", "QItemSelection", - "QItemSelectionModel", "QItemSelectionRange", "QKeyEvent", - "QKeySequence", "QLabel", "QLatin1Char", "QLatin1String", "QLayout", - "QLayoutItem", "QLayoutIterator", "QLCDNumber", "QLibrary", - "QLibraryInfo", "QLine", "QLinearGradient", "QLineEdit", "QLineF", - "QLinkedList", "QLinkedListData", "QLinkedListIterator", - "QLinkedListNode", "QList", "QListData", "QListIterator", - "QListView", "QListWidget", "QListWidgetItem", "Q_LLONG", "QLocale", - "QLocalServer", "QLocalSocket", "Q_LONG", "QMacCompatGLenum", - "QMacCompatGLint", "QMacCompatGLuint", "QMacGLCompatTypes", - "QMacMime", "QMacPasteboardMime", "QMainWindow", "QMap", "QMapData", - "QMapIterator", "QMapNode", "QMapPayloadNode", "QMatrix", - "QMdiArea", "QMdiSubWindow", "QMenu", "QMenuBar", - "QMenubarUpdatedEvent", "QMenuItem", "QMessageBox", - "QMetaClassInfo", "QMetaEnum", "QMetaMethod", "QMetaObject", - "QMetaObjectExtraData", "QMetaProperty", "QMetaType", "QMetaTypeId", - "QMetaTypeId2", "QMimeData", "QMimeSource", "QModelIndex", - "QModelIndexList", "QMotifStyle", "QMouseEvent", "QMoveEvent", - "QMovie", "QMultiHash", "QMultiMap", "QMutableFutureIterator", - "QMutableHashIterator", "QMutableLinkedListIterator", - "QMutableListIterator", "QMutableMapIterator", - "QMutableSetIterator", "QMutableStringListIterator", - "QMutableVectorIterator", "QMutex", "QMutexLocker", "QMYSQLDriver", - "QMYSQLResult", "QNetworkAccessManager", "QNetworkAddressEntry", - "QNetworkCacheMetaData", "QNetworkCookie", "QNetworkCookieJar", - "QNetworkDiskCache", "QNetworkInterface", "QNetworkProxy", - "QNetworkProxyFactory", "QNetworkProxyQuery", "QNetworkReply", - "QNetworkRequest", "QNoDebug", "QNoImplicitBoolCast", "QObject", - "QObjectCleanupHandler", "QObjectData", "QObjectList", - "QObjectUserData", "QOCIDriver", "QOCIResult", "QODBCDriver", - "QODBCResult", "QPageSetupDialog", "QPaintDevice", "QPaintEngine", - "QPaintEngineState", "QPainter", "QPainterPath", - "QPainterPathPrivate", "QPainterPathStroker", "QPaintEvent", - "QPair", "QPalette", "QPen", "QPersistentModelIndex", "QPicture", - "QPictureFormatInterface", "QPictureFormatPlugin", "QPictureIO", - "Q_PID", "QPixmap", "QPixmapCache", "QPlainTextDocumentLayout", - "QPlainTextEdit", "QPlastiqueStyle", "QPluginLoader", "QPoint", - "QPointer", "QPointF", "QPolygon", "QPolygonF", "QPrintDialog", - "QPrintEngine", "QPrinter", "QPrinterInfo", "QPrintPreviewDialog", - "QPrintPreviewWidget", "QProcess", "QProgressBar", - "QProgressDialog", "QProxyModel", "QPSQLDriver", "QPSQLResult", - "QPushButton", "QQueue", "QRadialGradient", "QRadioButton", - "QReadLocker", "QReadWriteLock", "QRect", "QRectF", "QRegExp", - "QRegExpValidator", "QRegion", "QResizeEvent", "QResource", - "QReturnArgument", "QRgb", "QRubberBand", "QRunnable", - "QScriptable", "QScriptClass", "QScriptClassPropertyIterator", - "QScriptContext", "QScriptContextInfo", "QScriptContextInfoList", - "QScriptEngine", "QScriptEngineAgent", "QScriptEngineDebugger", - "QScriptExtensionInterface", "QScriptExtensionPlugin", - "QScriptString", "QScriptSyntaxCheckResult", "QScriptValue", - "QScriptValueIterator", "QScriptValueList", "QScrollArea", - "QScrollBar", "QSemaphore", "QSessionManager", "QSet", - "QSetIterator", "QSettings", "QSharedData", "QSharedDataPointer", - "QSharedMemory", "QSharedPointer", "QShortcut", "QShortcutEvent", - "QShowEvent", "QSignalMapper", "QSignalSpy", "QSimpleXmlNodeModel", - "QSize", "QSizeF", "QSizeGrip", "QSizePolicy", "QSlider", - "QSocketNotifier", "QSortFilterProxyModel", "QSound", - "QSourceLocation", "QSpacerItem", "QSpinBox", "QSplashScreen", - "QSplitter", "QSplitterHandle", "QSpontaneKeyEvent", "QSqlDatabase", - "QSqlDriver", "QSqlDriverCreator", "QSqlDriverCreatorBase", - "QSqlDriverFactoryInterface", "QSqlDriverPlugin", "QSqlError", - "QSqlField", "QSqlIndex", "QSQLite2Driver", "QSQLite2Result", - "QSQLiteDriver", "QSQLiteResult", "QSqlQuery", "QSqlQueryModel", - "QSqlRecord", "QSqlRelation", "QSqlRelationalDelegate", - "QSqlRelationalTableModel", "QSqlResult", "QSqlTableModel", "QSsl", - "QSslCertificate", "QSslCipher", "QSslConfiguration", "QSslError", - "QSslKey", "QSslSocket", "QStack", "QStackedLayout", - "QStackedWidget", "QStandardItem", "QStandardItemEditorCreator", - "QStandardItemModel", "QStatusBar", "QStatusTipEvent", - "QStdWString", "QString", "QStringList", "QStringListIterator", - "QStringListModel", "QStringMatcher", "QStringRef", "QStyle", - "QStyledItemDelegate", "QStyleFactory", "QStyleFactoryInterface", - "QStyleHintReturn", "QStyleHintReturnMask", - "QStyleHintReturnVariant", "QStyleOption", "QStyleOptionButton", - "QStyleOptionComboBox", "QStyleOptionComplex", - "QStyleOptionDockWidget", "QStyleOptionDockWidgetV2", - "QStyleOptionFocusRect", "QStyleOptionFrame", "QStyleOptionFrameV2", - "QStyleOptionFrameV3", "QStyleOptionGraphicsItem", - "QStyleOptionGroupBox", "QStyleOptionHeader", - "QStyleOptionMenuItem", "QStyleOptionProgressBar", - "QStyleOptionProgressBarV2", "QStyleOptionQ3DockWindow", - "QStyleOptionQ3ListView", "QStyleOptionQ3ListViewItem", - "QStyleOptionRubberBand", "QStyleOptionSizeGrip", - "QStyleOptionSlider", "QStyleOptionSpinBox", "QStyleOptionTab", - "QStyleOptionTabBarBase", "QStyleOptionTabBarBaseV2", - "QStyleOptionTabV2", "QStyleOptionTabV3", - "QStyleOptionTabWidgetFrame", "QStyleOptionTitleBar", - "QStyleOptionToolBar", "QStyleOptionToolBox", - "QStyleOptionToolBoxV2", "QStyleOptionToolButton", - "QStyleOptionViewItem", "QStyleOptionViewItemV2", - "QStyleOptionViewItemV3", "QStyleOptionViewItemV4", "QStylePainter", - "QStylePlugin", "QSvgGenerator", "QSvgRenderer", "QSvgWidget", - "QSyntaxHighlighter", "QSysInfo", "QSystemLocale", - "QSystemSemaphore", "QSystemTrayIcon", "Qt", "Qt3Support", - "QTabBar", "QTabletEvent", "QTableView", "QTableWidget", - "QTableWidgetItem", "QTableWidgetSelectionRange", "QTabWidget", - "QtAlgorithms", "QtAssistant", "QtCleanUpFunction", - "QtConcurrentFilter", "QtConcurrentMap", "QtConcurrentRun", - "QtContainerFwd", "QtCore", "QTcpServer", "QTcpSocket", "QtDBus", - "QtDebug", "QtDesigner", "QTDSDriver", "QTDSResult", - "QTemporaryFile", "QtEndian", "QTest", "QTestAccessibility", - "QTestAccessibilityEvent", "QTestData", "QTestDelayEvent", - "QTestEvent", "QTestEventList", "QTestEventLoop", - "QTestKeyClicksEvent", "QTestKeyEvent", "QTestMouseEvent", - "QtEvents", "QTextBlock", "QTextBlockFormat", "QTextBlockGroup", - "QTextBlockUserData", "QTextBoundaryFinder", "QTextBrowser", - "QTextCharFormat", "QTextCodec", "QTextCodecFactoryInterface", - "QTextCodecPlugin", "QTextCursor", "QTextDecoder", "QTextDocument", - "QTextDocumentFragment", "QTextDocumentWriter", "QTextEdit", - "QTextEncoder", "QTextFormat", "QTextFragment", "QTextFrame", - "QTextFrameFormat", "QTextFrameLayoutData", "QTextImageFormat", - "QTextInlineObject", "QTextIStream", "QTextItem", "QTextLayout", - "QTextLength", "QTextLine", "QTextList", "QTextListFormat", - "QTextObject", "QTextObjectInterface", "QTextOption", - "QTextOStream", "QTextStream", "QTextStreamFunction", - "QTextStreamManipulator", "QTextTable", "QTextTableCell", - "QTextTableCellFormat", "QTextTableFormat", "QtGlobal", "QtGui", - "QtHelp", "QThread", "QThreadPool", "QThreadStorage", - "QThreadStorageData", "QTime", "QTimeEdit", "QTimeLine", "QTimer", - "QTimerEvent", "QtMsgHandler", "QtNetwork", "QToolBar", - "QToolBarChangeEvent", "QToolBox", "QToolButton", "QToolTip", - "QtOpenGL", "QtPlugin", "QtPluginInstanceFunction", "QTransform", - "QTranslator", "QTreeView", "QTreeWidget", "QTreeWidgetItem", - "QTreeWidgetItemIterator", "QTS", "QtScript", "QtScriptTools", - "QtSql", "QtSvg", "QtTest", "QtUiTools", "QtWebKit", "QtXml", - "QtXmlPatterns", "QTypeInfo", "QUdpSocket", "QUiLoader", - "QUintForSize", "QUintForType", "QUndoCommand", "QUndoGroup", - "QUndoStack", "QUndoView", "QUnixPrintWidget", "QUpdateLaterEvent", - "QUrl", "QUrlInfo", "QUuid", "QValidator", "QVariant", - "QVariantComparisonHelper", "QVariantHash", "QVariantList", - "QVariantMap", "QVarLengthArray", "QVBoxLayout", "QVector", - "QVectorData", "QVectorIterator", "QVectorTypedData", - "QWaitCondition", "QWeakPointer", "QWebDatabase", "QWebFrame", - "QWebHistory", "QWebHistoryInterface", "QWebHistoryItem", - "QWebHitTestResult", "QWebPage", "QWebPluginFactory", - "QWebSecurityOrigin", "QWebSettings", "QWebView", "QWhatsThis", - "QWhatsThisClickedEvent", "QWheelEvent", "QWidget", "QWidgetAction", - "QWidgetData", "QWidgetItem", "QWidgetItemV2", "QWidgetList", - "QWidgetMapper", "QWidgetSet", "QWindowsCEStyle", "QWindowsMime", - "QWindowsMobileStyle", "QWindowsStyle", "QWindowStateChangeEvent", - "QWindowsVistaStyle", "QWindowsXPStyle", "QWizard", "QWizardPage", - "QWMatrix", "QWorkspace", "QWriteLocker", "QX11EmbedContainer", - "QX11EmbedWidget", "QX11Info", "QXmlAttributes", - "QXmlContentHandler", "QXmlDeclHandler", "QXmlDefaultHandler", - "QXmlDTDHandler", "QXmlEntityResolver", "QXmlErrorHandler", - "QXmlFormatter", "QXmlInputSource", "QXmlItem", - "QXmlLexicalHandler", "QXmlLocator", "QXmlName", "QXmlNamePool", - "QXmlNamespaceSupport", "QXmlNodeModelIndex", "QXmlParseException", - "QXmlQuery", "QXmlReader", "QXmlResultItems", "QXmlSerializer", - "QXmlSimpleReader", "QXmlStreamAttribute", "QXmlStreamAttributes", - "QXmlStreamEntityDeclaration", "QXmlStreamEntityDeclarations", - "QXmlStreamEntityResolver", "QXmlStreamNamespaceDeclaration", - "QXmlStreamNamespaceDeclarations", "QXmlStreamNotationDeclaration", - "QXmlStreamNotationDeclarations", "QXmlStreamReader", - "QXmlStreamStringRef", "QXmlStreamWriter" - ) - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':', ',', ';', '|', '<', '>' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight:bold;', - 2 => 'color: #0057AE;', - 3 => 'color: #2B74C7;', - 4 => 'color: #0057AE;', - 5 => 'color: #22aadd;' - ), - 'COMMENTS' => array( - 1 => 'color: #888888;', - 2 => 'color: #006E28;', - 'MULTI' => 'color: #888888; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 1 => 'color: #000099; font-weight: bold;', - 2 => 'color: #660099; font-weight: bold;', - 3 => 'color: #660099; font-weight: bold;', - 4 => 'color: #660099; font-weight: bold;', - 5 => 'color: #006699; font-weight: bold;', - 'HARD' => '', - ), - 'BRACKETS' => array( - 0 => 'color: #006E28;' - ), - 'STRINGS' => array( - 0 => 'color: #BF0303;' - ), - 'NUMBERS' => array( - 0 => 'color: #B08000;', - GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;', - GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', - GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', - GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;', - GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', - GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;', - GESHI_NUMBER_FLT_NONSCI => 'color:#800080;' - ), - 'METHODS' => array( - 1 => 'color: #2B74C7;', - 2 => 'color: #2B74C7;', - 3 => 'color: #2B74C7;' - ), - 'SYMBOLS' => array( - 0 => 'color: #006E28;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => 'http://doc.trolltech.com/latest/{FNAMEL}.html' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.', - 2 => '::', - 3 => '->', - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "(?|^])", - 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-])" - ), - 'OOLANG' => array( - 'MATCH_AFTER' => '~?[a-zA-Z][a-zA-Z0-9_]*', - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/cpp.php b/_piecrust/libs/Geshi/geshi/cpp.php deleted file mode 100644 index 48b7726..0000000 --- a/_piecrust/libs/Geshi/geshi/cpp.php +++ /dev/null @@ -1,240 +0,0 @@ - 'C++', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - //Multiline-continued single-line comments - 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', - //Multiline-continued preprocessor define - 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m' - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array( - //Simple Single Char Escapes - 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i", - //Hexadecimal Char Specs - 2 => "#\\\\x[\da-fA-F]{2}#", - //Hexadecimal Char Specs - 3 => "#\\\\u[\da-fA-F]{4}#", - //Hexadecimal Char Specs - 4 => "#\\\\U[\da-fA-F]{8}#", - //Octal Char Specs - 5 => "#\\\\[0-7]{1,3}#" - ), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | - GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | - GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - 1 => array( - 'break', 'case', 'continue', 'default', 'do', 'else', 'for', 'goto', 'if', 'return', - 'switch', 'throw', 'while' - ), - 2 => array( - 'NULL', 'false', 'true', 'enum', 'errno', 'EDOM', - 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG', - 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG', - 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP', - 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP', - 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN', - 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN', - 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT', - 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR', - 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', - 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stdin', 'stdout', 'stderr', - 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC', - 'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace', - 'try', 'catch', 'inline', 'dynamic_cast', 'const_cast', 'reinterpret_cast', - 'static_cast', 'explicit', 'friend', 'typename', 'typeid', 'class' - ), - 3 => array( - 'cin', 'cerr', 'clog', 'cout', 'delete', 'new', 'this', - 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert', - 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint', - 'ispunct', 'isspace', 'isupper', 'isxdigit', 'tolower', 'toupper', - 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp', - 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2', - 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', - 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen', - 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf', - 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf', - 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc', - 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind', - 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs', - 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc', - 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv', - 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat', - 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn', - 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy', - 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime', - 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime' - ), - 4 => array( - 'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint', - 'register', 'short', 'shortint', 'signed', 'static', 'struct', - 'typedef', 'union', 'unsigned', 'void', 'volatile', 'extern', 'jmp_buf', - 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t', - 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', 'wchar_t', - - 'int8', 'int16', 'int32', 'int64', - 'uint8', 'uint16', 'uint32', 'uint64', - - 'int_fast8_t', 'int_fast16_t', 'int_fast32_t', 'int_fast64_t', - 'uint_fast8_t', 'uint_fast16_t', 'uint_fast32_t', 'uint_fast64_t', - - 'int_least8_t', 'int_least16_t', 'int_least32_t', 'int_least64_t', - 'uint_least8_t', 'uint_least16_t', 'uint_least32_t', 'uint_least64_t', - - 'int8_t', 'int16_t', 'int32_t', 'int64_t', - 'uint8_t', 'uint16_t', 'uint32_t', 'uint64_t', - - 'intmax_t', 'uintmax_t', 'intptr_t', 'uintptr_t' - ), - ), - 'SYMBOLS' => array( - 0 => array('(', ')', '{', '}', '[', ']'), - 1 => array('<', '>','='), - 2 => array('+', '-', '*', '/', '%'), - 3 => array('!', '^', '&', '|'), - 4 => array('?', ':', ';') - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000ff;', - 2 => 'color: #0000ff;', - 3 => 'color: #0000dd;', - 4 => 'color: #0000ff;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666;', - 2 => 'color: #339900;', - 'MULTI' => 'color: #ff0000; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 1 => 'color: #000099; font-weight: bold;', - 2 => 'color: #660099; font-weight: bold;', - 3 => 'color: #660099; font-weight: bold;', - 4 => 'color: #660099; font-weight: bold;', - 5 => 'color: #006699; font-weight: bold;', - 'HARD' => '', - ), - 'BRACKETS' => array( - 0 => 'color: #008000;' - ), - 'STRINGS' => array( - 0 => 'color: #FF0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #0000dd;', - GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;', - GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', - GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', - GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;', - GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', - GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;', - GESHI_NUMBER_FLT_NONSCI => 'color:#800080;' - ), - 'METHODS' => array( - 1 => 'color: #007788;', - 2 => 'color: #007788;' - ), - 'SYMBOLS' => array( - 0 => 'color: #008000;', - 1 => 'color: #000080;', - 2 => 'color: #000040;', - 3 => 'color: #000040;', - 4 => 'color: #008080;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.', - 2 => '::' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "(? "(?![a-zA-Z0-9_\|%\\-])" - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/csharp.php b/_piecrust/libs/Geshi/geshi/csharp.php deleted file mode 100644 index 1c7eea0..0000000 --- a/_piecrust/libs/Geshi/geshi/csharp.php +++ /dev/null @@ -1,253 +0,0 @@ - 'C#', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - //Using and Namespace directives (basic support) - //Please note that the alias syntax for using is not supported - 3 => '/(?:(?<=using[\\n\\s])|(?<=namespace[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*[a-zA-Z0-9_]+[\n\s]*(?=[;=])/i'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'HARDQUOTE' => array('@"', '"'), - 'HARDESCAPE' => array('"'), - 'HARDCHAR' => '"', - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'as', 'auto', 'base', 'break', 'case', 'catch', 'const', 'continue', - 'default', 'do', 'else', 'event', 'explicit', 'extern', 'false', - 'finally', 'fixed', 'for', 'foreach', 'from', 'goto', 'if', - 'implicit', 'in', 'internal', 'lock', 'namespace', 'null', - 'operator', 'out', 'override', 'params', 'partial', 'private', - 'protected', 'public', 'readonly', 'ref', 'return', 'sealed', - 'select', 'stackalloc', 'static', 'switch', 'this', 'throw', 'true', - 'try', 'unsafe', 'using', 'virtual', 'where', 'while', 'yield' - ), - 2 => array( - '#elif', '#endif', '#endregion', '#else', '#error', '#define', '#if', - '#line', '#region', '#undef', '#warning' - ), - 3 => array( - 'checked', 'is', 'new', 'sizeof', 'typeof', 'unchecked' - ), - 4 => array( - 'bool', 'byte', 'char', 'class', 'decimal', 'delegate', 'double', - 'enum', 'float', 'int', 'interface', 'long', 'object', 'sbyte', - 'short', 'string', 'struct', 'uint', 'ulong', 'ushort', 'void' - ), - 5 => array( - 'Microsoft.Win32', - 'System', - 'System.CodeDOM', - 'System.CodeDOM.Compiler', - 'System.Collections', - 'System.Collections.Bases', - 'System.ComponentModel', - 'System.ComponentModel.Design', - 'System.ComponentModel.Design.CodeModel', - 'System.Configuration', - 'System.Configuration.Assemblies', - 'System.Configuration.Core', - 'System.Configuration.Install', - 'System.Configuration.Interceptors', - 'System.Configuration.Schema', - 'System.Configuration.Web', - 'System.Core', - 'System.Data', - 'System.Data.ADO', - 'System.Data.Design', - 'System.Data.Internal', - 'System.Data.SQL', - 'System.Data.SQLTypes', - 'System.Data.XML', - 'System.Data.XML.DOM', - 'System.Data.XML.XPath', - 'System.Data.XML.XSLT', - 'System.Diagnostics', - 'System.Diagnostics.SymbolStore', - 'System.DirectoryServices', - 'System.Drawing', - 'System.Drawing.Design', - 'System.Drawing.Drawing2D', - 'System.Drawing.Imaging', - 'System.Drawing.Printing', - 'System.Drawing.Text', - 'System.Globalization', - 'System.IO', - 'System.IO.IsolatedStorage', - 'System.Messaging', - 'System.Net', - 'System.Net.Sockets', - 'System.NewXml', - 'System.NewXml.XPath', - 'System.NewXml.Xsl', - 'System.Reflection', - 'System.Reflection.Emit', - 'System.Resources', - 'System.Runtime.InteropServices', - 'System.Runtime.InteropServices.Expando', - 'System.Runtime.Remoting', - 'System.Runtime.Serialization', - 'System.Runtime.Serialization.Formatters', - 'System.Runtime.Serialization.Formatters.Binary', - 'System.Security', - 'System.Security.Cryptography', - 'System.Security.Cryptography.X509Certificates', - 'System.Security.Permissions', - 'System.Security.Policy', - 'System.Security.Principal', - 'System.ServiceProcess', - 'System.Text', - 'System.Text.RegularExpressions', - 'System.Threading', - 'System.Timers', - 'System.Web', - 'System.Web.Caching', - 'System.Web.Configuration', - 'System.Web.Security', - 'System.Web.Services', - 'System.Web.Services.Description', - 'System.Web.Services.Discovery', - 'System.Web.Services.Protocols', - 'System.Web.UI', - 'System.Web.UI.Design', - 'System.Web.UI.Design.WebControls', - 'System.Web.UI.Design.WebControls.ListControls', - 'System.Web.UI.HtmlControls', - 'System.Web.UI.WebControls', - 'System.WinForms', - 'System.WinForms.ComponentModel', - 'System.WinForms.Design', - 'System.Xml', - 'System.Xml.Serialization', - 'System.Xml.Serialization.Code', - 'System.Xml.Serialization.Schema' - ), - ), - 'SYMBOLS' => array( - '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', ':', ';', - '(', ')', '{', '}', '[', ']', '|', '.' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0600FF; font-weight: bold;', - 2 => 'color: #FF8000; font-weight: bold;', - 3 => 'color: #008000;', - 4 => 'color: #6666cc; font-weight: bold;', - 5 => 'color: #000000;' - ), - 'COMMENTS' => array( - 1 => 'color: #008080; font-style: italic;', - 2 => 'color: #008080;', - 3 => 'color: #008080;', - 'MULTI' => 'color: #008080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #008080; font-weight: bold;', - 'HARD' => 'color: #008080; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #008000;' - ), - 'STRINGS' => array( - 0 => 'color: #666666;', - 'HARD' => 'color: #666666;' - ), - 'NUMBERS' => array( - 0 => 'color: #FF0000;' - ), - 'METHODS' => array( - 1 => 'color: #0000FF;', - 2 => 'color: #0000FF;' - ), - 'SYMBOLS' => array( - 0 => 'color: #008000;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://www.google.com/search?q={FNAMEL}+msdn.microsoft.com', - 4 => '', - 5 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.', - 2 => '::' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "(?|^])", - 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_%\\-])" - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/css.php b/_piecrust/libs/Geshi/geshi/css.php deleted file mode 100644 index 2cb3f34..0000000 --- a/_piecrust/libs/Geshi/geshi/css.php +++ /dev/null @@ -1,212 +0,0 @@ - 'CSS', - 'COMMENT_SINGLE' => array(1 => '@'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - 2 => "/(?<=\\()\\s*(?:(?:[a-z0-9]+?:\\/\\/)?[a-z0-9_\\-\\.\\/:]+?)?[a-z]+?\\.[a-z]+?(\\?[^\)]+?)?\\s*?(?=\\))/i" - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"', "'"), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'aqua', 'azimuth', 'background-attachment', 'background-color', - 'background-image', 'background-position', 'background-repeat', - 'background', 'black', 'blue', 'border-bottom-color', - 'border-bottom-style', 'border-bottom-width', 'border-left-color', - 'border-left-style', 'border-left-width', 'border-right', - 'border-right-color', 'border-right-style', 'border-right-width', - 'border-top-color', 'border-top-style', - 'border-top-width','border-bottom', 'border-collapse', - 'border-left', 'border-width', 'border-color', 'border-spacing', - 'border-style', 'border-top', 'border', 'caption-side', 'clear', - 'clip', 'color', 'content', 'counter-increment', 'counter-reset', - 'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display', - 'elevation', 'empty-cells', 'float', 'font-family', 'font-size', - 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', - 'font-weight', 'font', 'line-height', 'letter-spacing', - 'list-style', 'list-style-image', 'list-style-position', - 'list-style-type', 'margin-bottom', 'margin-left', 'margin-right', - 'margin-top', 'margin', 'marker-offset', 'marks', 'max-height', - 'max-width', 'min-height', 'min-width', 'orphans', 'outline', - 'outline-color', 'outline-style', 'outline-width', 'overflow', - 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', - 'padding', 'page', 'page-break-after', 'page-break-before', - 'page-break-inside', 'pause-after', 'pause-before', 'pause', - 'pitch', 'pitch-range', 'play-during', 'position', 'quotes', - 'richness', 'right', 'size', 'speak-header', 'speak-numeral', - 'speak-punctuation', 'speak', 'speech-rate', 'stress', - 'table-layout', 'text-align', 'text-decoration', 'text-indent', - 'text-shadow', 'text-transform', 'top', 'unicode-bidi', - 'vertical-align', 'visibility', 'voice-family', 'volume', - 'white-space', 'widows', 'width', 'word-spacing', 'z-index', - 'bottom', 'left', 'height' - ), - 2 => array( - 'above', 'absolute', 'always', 'armenian', 'aural', 'auto', - 'avoid', 'baseline', 'behind', 'below', 'bidi-override', 'blink', - 'block', 'bold', 'bolder', 'both', 'capitalize', 'center-left', - 'center-right', 'center', 'circle', 'cjk-ideographic', - 'close-quote', 'collapse', 'condensed', 'continuous', 'crop', - 'crosshair', 'cross', 'cursive', 'dashed', 'decimal-leading-zero', - 'decimal', 'default', 'digits', 'disc', 'dotted', 'double', - 'e-resize', 'embed', 'extra-condensed', 'extra-expanded', - 'expanded', 'fantasy', 'far-left', 'far-right', 'faster', 'fast', - 'fixed', 'fuchsia', 'georgian', 'gray', 'green', 'groove', - 'hebrew', 'help', 'hidden', 'hide', 'higher', 'high', - 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', - 'inline', 'inset', 'inside', 'invert', 'italic', 'justify', - 'katakana-iroha', 'katakana', 'landscape', 'larger', 'large', - 'left-side', 'leftwards', 'level', 'lighter', 'lime', - 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', - 'lower-roman', 'lowercase', 'ltr', 'lower', 'low', 'maroon', - 'medium', 'message-box', 'middle', 'mix', 'monospace', 'n-resize', - 'narrower', 'navy', 'ne-resize', 'no-close-quote', - 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', - 'nw-resize', 'oblique', 'olive', 'once', 'open-quote', 'outset', - 'outside', 'overline', 'pointer', 'portrait', 'purple', 'px', - 'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', - 'ridge', 'right-side', 'rightwards', 's-resize', 'sans-serif', - 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', - 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', - 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', - 'spell-out', 'square', 'static', 'status-bar', 'super', - 'sw-resize', 'table-caption', 'table-cell', 'table-column', - 'table-column-group', 'table-footer-group', 'table-header-group', - 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', - 'text-top', 'thick', 'thin', 'transparent', 'ultra-condensed', - 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', - 'upper-roman', 'uppercase', 'url', 'visible', 'w-resize', 'wait', - 'white', 'wider', 'x-fast', 'x-high', 'x-large', 'x-loud', - 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small', 'yellow', - 'yes' - ) - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', ':', ';', - '>', '+', '*', ',', '^', '=' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #993333;' - ), - 'COMMENTS' => array( - 1 => 'color: #a1a100;', - 2 => 'color: #ff0000; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #00AA00;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #00AA00;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - 0 => 'color: #cc00cc;', - 1 => 'color: #6666ff;', - 2 => 'color: #3333ff;', - 3 => 'color: #933;' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - //DOM Node ID - 0 => '\#[a-zA-Z0-9\-_]+(?:\\\\:[a-zA-Z0-9\-_]+)*', - //CSS classname - 1 => '\.(?!\d)[a-zA-Z0-9\-_]+(?:\\\\:[a-zA-Z0-9\-_]+)*\b(?=[\{\.#\s,:].|<\|)', - //CSS Pseudo classes - //note: & is needed for > (i.e. > ) - 2 => '(? '[+\-]?(\d+|(\d*\.\d+))(em|ex|pt|px|cm|in|%)', - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-&\.])' - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/cuesheet.php b/_piecrust/libs/Geshi/geshi/cuesheet.php deleted file mode 100644 index 2820b04..0000000 --- a/_piecrust/libs/Geshi/geshi/cuesheet.php +++ /dev/null @@ -1,138 +0,0 @@ - 'Cuesheet', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array( - //Single-Line Comments using REM command - 1 => "/(?<=\bREM\b).*?$/im", - ), - 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'CATALOG','CDTEXTFILE','FILE','FLAGS','INDEX','ISRC','PERFORMER', - 'POSTGAP','PREGAP','REM','SONGWRITER','TITLE','TRACK' - ), - 2 => array( - 'AIFF', 'BINARY', 'MOTOROLA', 'MP3', 'WAVE' - ), - 3 => array( - '4CH', 'DCP', 'PRE', 'SCMS' - ), - 4 => array( - 'AUDIO', 'CDG', 'MODE1/2048', 'MODE1/2336', 'MODE2/2336', - 'MODE2/2352', 'CDI/2336', 'CDI/2352' - ) - ), - 'SYMBOLS' => array( - ':' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #000066; font-weight: bold;', - 3 => 'color: #000066; font-weight: bold;', - 4 => 'color: #000066; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080;', - ), - 'BRACKETS' => array( - 0 => 'color: #0000ff;' - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;' - ), - 'NUMBERS' => array( - 0 => 'color: #006600;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #000066;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - 1 => 'color: #000099;', - 2 => 'color: #009900;', - ) - ), - 'URLS' => array( - 1 => 'http://digitalx.org/cuesheetsyntax.php#{FNAMEL}', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - 2 => '\b[A-Za-z0-9]{5}\d{7}\b', - 1 => '(?<=[\s:]|^)\d+(?=[\s:]|$)', - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 2, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => '(? '(?![\w\.])', - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/d.php b/_piecrust/libs/Geshi/geshi/d.php deleted file mode 100644 index af0468a..0000000 --- a/_piecrust/libs/Geshi/geshi/d.php +++ /dev/null @@ -1,272 +0,0 @@ - 'D', - 'COMMENT_SINGLE' => array(2 => '///', 1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - // doxygen comments - 3 => '#/\*\*(?![\*\/]).*\*/#sU', - // raw strings - 4 => '#r"[^"]*"#s', - // Script Style interpreter comment - 5 => "/\A#!(?=\\/).*?$/m" - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"', "'"), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array( - //Simple Single Char Escapes - 1 => "#\\\\[abfnrtv\\'\"?\n\\\\]#i", - //Hexadecimal Char Specs - 2 => "#\\\\x[\da-fA-F]{2}#", - //Hexadecimal Char Specs - 3 => "#\\\\u[\da-fA-F]{4}#", - //Hexadecimal Char Specs - 4 => "#\\\\U[\da-fA-F]{8}#", - //Octal Char Specs - 5 => "#\\\\[0-7]{1,3}#", - //Named entity escapes - /*6 => "#\\\\&(?:quot|amp|lt|gt|OElig|oelig|Scaron|scaron|Yuml|circ|tilde|". - "ensp|emsp|thinsp|zwnj|zwj|lrm|rlm|ndash|mdash|lsquo|rsquo|sbquo|". - "ldquo|rdquo|bdquo|dagger|Dagger|permil|lsaquo|rsaquo|euro|nbsp|". - "iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|". - "shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|". - "sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|". - "Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|". - "Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|". - "times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|". - "aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|". - "euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|". - "otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|". - "yuml|fnof|Alpha|Beta|Gamma|Delta|Epsilon|Zeta|Eta|Theta|Iota|". - "Kappa|Lambda|Mu|Nu|Xi|Omicron|Pi|Rho|Sigma|Tau|Upsilon|Phi|Chi|". - "Psi|Omega|alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|". - "kappa|lambda|mu|nu|xi|omicron|pi|rho|sigmaf|sigma|tau|upsilon|". - "phi|chi|psi|omega|thetasym|upsih|piv|bull|hellip|prime|Prime|". - "oline|frasl|weierp|image|real|trade|alefsym|larr|uarr|rarr|darr|". - "harr|crarr|lArr|uArr|rArr|dArr|hArr|forall|part|exist|empty|". - "nabla|isin|notin|ni|prod|sum|minus|lowast|radic|prop|infin|ang|". - "and|or|cap|cup|int|there4|sim|cong|asymp|ne|equiv|le|ge|sub|sup|". - "nsub|sube|supe|oplus|otimes|perp|sdot|lceil|rceil|lfloor|rfloor|". - "lang|rang|loz|spades|clubs|hearts|diams);#",*/ - // optimized: - 6 => "#\\\\&(?:A(?:Elig|acute|circ|grave|lpha|ring|tilde|uml)|Beta|". - "C(?:cedil|hi)|D(?:agger|elta)|E(?:TH|acute|circ|grave|psilon|ta|uml)|". - "Gamma|I(?:acute|circ|grave|ota|uml)|Kappa|Lambda|Mu|N(?:tilde|u)|". - "O(?:Elig|acute|circ|grave|m(?:ega|icron)|slash|tilde|uml)|". - "P(?:hi|i|rime|si)|Rho|S(?:caron|igma)|T(?:HORN|au|heta)|". - "U(?:acute|circ|grave|psilon|uml)|Xi|Y(?:acute|uml)|Zeta|". - "a(?:acute|c(?:irc|ute)|elig|grave|l(?:efsym|pha)|mp|n[dg]|ring|". - "symp|tilde|uml)|b(?:dquo|eta|rvbar|ull)|c(?:ap|cedil|e(?:dil|nt)|". - "hi|irc|lubs|o(?:ng|py)|rarr|u(?:p|rren))|d(?:Arr|a(?:gger|rr)|". - "e(?:g|lta)|i(?:ams|vide))|e(?:acute|circ|grave|m(?:pty|sp)|nsp|". - "psilon|quiv|t[ah]|u(?:ml|ro)|xist)|f(?:nof|orall|ra(?:c(?:1[24]|34)|sl))|". - "g(?:amma|e|t)|h(?:Arr|arr|e(?:arts|llip))|i(?:acute|circ|excl|grave|mage|". - "n(?:fin|t)|ota|quest|sin|uml)|kappa|l(?:Arr|a(?:mbda|ng|quo|rr)|ceil|". - "dquo|e|floor|o(?:wast|z)|rm|s(?:aquo|quo)|t)|m(?:acr|dash|". - "i(?:cro|ddot|nus)|u)|n(?:abla|bsp|dash|e|i|ot(?:in)?|sub|tilde|u)|". - "o(?:acute|circ|elig|grave|line|m(?:ega|icron)|plus|r(?:d[fm])?|". - "slash|ti(?:lde|mes)|uml)|p(?:ar[at]|er(?:mil|p)|hi|iv?|lusmn|ound|". - "r(?:ime|o[dp])|si)|quot|r(?:Arr|a(?:dic|ng|quo|rr)|ceil|dquo|e(?:al|g)|". - "floor|ho|lm|s(?:aquo|quo))|s(?:bquo|caron|dot|ect|hy|i(?:gmaf?|m)|". - "pades|u(?:be?|m|p[123e]?)|zlig)|t(?:au|h(?:e(?:re4|ta(?:sym)?)|insp|". - "orn)|i(?:lde|mes)|rade)|u(?:Arr|a(?:cute|rr)|circ|grave|ml|". - "psi(?:h|lon)|uml)|weierp|xi|y(?:acute|en|uml)|z(?:eta|w(?:j|nj)));#", - ), - 'HARDQUOTE' => array('`', '`'), - 'HARDESCAPE' => array(), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | - GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | - GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - 1 => array( - 'break', 'case', 'continue', 'do', 'else', - 'for', 'foreach', 'goto', 'if', 'return', - 'switch', 'while' - ), - 2 => array( - 'alias', 'asm', 'assert', 'body', 'cast', - 'catch', 'default', 'delegate', 'delete', - 'extern', 'false', 'finally', 'function', - 'import', 'in', 'inout', 'interface', - 'invariant', 'is', 'mixin', 'module', 'new', - 'null', 'out', 'pragma', 'ref', 'super', 'this', - 'throw', 'true', 'try', 'typedef', 'typeid', - 'typeof', 'union', 'with' - ), - 3 => array( - 'ArrayBoundsError', 'AssertError', - 'ClassInfo', 'Error', 'Exception', - 'Interface', 'ModuleInfo', 'Object', - 'OutOfMemoryException', 'SwitchError', - 'TypeInfo', '_d_arrayappend', - '_d_arrayappendb', '_d_arrayappendc', - '_d_arrayappendcb', '_d_arraycast', - '_d_arraycast_frombit', '_d_arraycat', - '_d_arraycatb', '_d_arraycatn', - '_d_arraycopy', '_d_arraycopybit', - '_d_arraysetbit', '_d_arraysetbit2', - '_d_arraysetlength', '_d_arraysetlengthb', - '_d_callfinalizer', - '_d_create_exception_object', - '_d_criticalenter', '_d_criticalexit', - '_d_delarray', '_d_delclass', - '_d_delinterface', '_d_delmemory', - '_d_dynamic_cast', '_d_exception', - '_d_exception_filter', '_d_framehandler', - '_d_interface_cast', '_d_interface_vtbl', - '_d_invariant', '_d_isbaseof', - '_d_isbaseof2', '_d_local_unwind', - '_d_monitorenter', '_d_monitorexit', - '_d_monitorrelease', '_d_monitor_epilog', - '_d_monitor_handler', '_d_monitor_prolog', - '_d_new', '_d_newarrayi', '_d_newbitarray', - '_d_newclass', '_d_obj_cmp', '_d_obj_eq', - '_d_OutOfMemory', '_d_switch_dstring', - '_d_switch_string', '_d_switch_ustring', - '_d_throw', - ), - 4 => array( - 'abstract', 'align', 'auto', 'bit', 'bool', - 'byte', 'cdouble', 'cent', 'cfloat', 'char', - 'class', 'const', 'creal', 'dchar', 'debug', - 'deprecated', 'double', 'enum', 'export', - 'final', 'float', 'idouble', 'ifloat', 'int', - 'ireal', 'long', 'override', 'package', - 'private', 'protected', 'ptrdiff_t', - 'public', 'real', 'short', 'size_t', - 'static', 'struct', 'synchronized', - 'template', 'ubyte', 'ucent', 'uint', - 'ulong', 'unittest', 'ushort', 'version', - 'void', 'volatile', 'wchar' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '?', '!', ';', ':', ',', '...', '..', - '+', '-', '*', '/', '%', '&', '|', '^', '<', '>', '=', '~', - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #aaaadd; font-weight: bold;', - 4 => 'color: #993333;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 2 => 'color: #009933; font-style: italic;', - 3 => 'color: #009933; font-style: italic;', - 4 => 'color: #ff0000;', - 5 => 'color: #0040ff;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 1 => 'color: #000099; font-weight: bold;', - 2 => 'color: #660099; font-weight: bold;', - 3 => 'color: #660099; font-weight: bold;', - 4 => 'color: #660099; font-weight: bold;', - 5 => 'color: #006699; font-weight: bold;', - 6 => 'color: #666699; font-weight: bold; font-style: italic;', - 'HARD' => '', - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;', - 'HARD' => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #0000dd;', - GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;', - GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', - GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', - GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;', - GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', - GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;', - GESHI_NUMBER_FLT_NONSCI => 'color:#800080;' - ), - 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.', - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/dcs.php b/_piecrust/libs/Geshi/geshi/dcs.php deleted file mode 100644 index 05f2d31..0000000 --- a/_piecrust/libs/Geshi/geshi/dcs.php +++ /dev/null @@ -1,182 +0,0 @@ - 'DCS', - 'COMMENT_SINGLE' => array( - 1 => ';' - ), - 'COMMENT_MULTI' => array( - ), - 'COMMENT_REGEXP' => array( - // Highlight embedded C code in a separate color: - 2 => '/\bINSERT_C_CODE\b.*?\bEND_C_CODE\b/ims' - ), - 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, - 'QUOTEMARKS' => array( - '"' - ), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => '', - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - 1 => array( - 'abs', 'ascii_value', 'bit_value', 'blank_date', 'calc_unit_values', 'cm', - 'complete_months', 'complete_years', 'correct', 'create_input_file', 'cy', - 'date_convert', 'day', 'del_output_separator', - 'delete_existing_output_files', 'div', 'ex', 'exact_years', 'exp', - 'extract_date', 'failed_validation', 'file_number', 'first_record', - 'fract', 'fund_fac_a', 'fund_fac_b', 'fund_fac_c', 'fund_fac_d', - 'fund_fac_e', 'fund_fac_f', 'fund_fac_g', 'fund_fac_h', 'fund_fac_i', - 'fund_fac_j', 'fund_fac_k', 'fund_fac_l', 'fund_fac_m', 'fund_fac_n', - 'fund_fac_o', 'fund_fac_p', 'fund_fac_q', 'fund_fac_r', 'fund_fac_s', - 'fund_fac_t', 'fund_fac_u', 'fund_fac_v', 'fund_fac_w', 'fund_fac_x', - 'fund_fac_y', 'fund_fac_z', 'group', 'group_record', - 'input_file_date_time', 'input_file_extension', 'input_file_location', - 'input_file_name', 'int', 'invalid', 'last_record', 'leap_year', 'len', - 'ln', 'log', 'main_format_name', 'max', 'max_num_subrecords', 'message', - 'min', 'mod', 'month', 'months_add', 'months_sub', 'nearest_months', - 'nearest_years', 'next_record', 'nm', 'no_of_current_records', - 'no_of_records', 'numval', 'ny', 'output', 'output_array_as_constants', - 'output_file_path', 'output_record', 'pmdf_output', 'previous', 'rand', - 're_start', 'read_generic_table', 'read_generic_table_text', - 'read_input_footer', 'read_input_footer_text', 'read_input_header', - 'read_input_header_text', 'record_count', 'record_suppressed', 'round', - 'round_down', 'round_near', 'round_up', 'run_dcs_program', 'run_parameter', - 'run_parameter_text', 'set_main_record', 'set_num_subrecords', - 'sort_array', 'sort_current_records', 'sort_input', 'strval', 'substr', - 'summarise', 'summarise_record', 'summarise_units', - 'summarise_units_record', 'suppress_record', 'table_correct', - 'table_validate', 'terminate', 'time', 'today', 'trim', 'ubound', 'year', - 'years_add', 'years_sub' - ), - 2 => array( - 'and', 'as', 'begin', 'boolean', 'byref', 'byval', 'call', 'case', 'date', - 'default', 'do', 'else', 'elseif', 'end_c_code', 'endfor', 'endfunction', - 'endif', 'endproc', 'endswitch', 'endwhile', 'eq', - 'explicit_declarations', 'false', 'for', 'from', 'function', 'ge', 'gt', - 'if', 'insert_c_code', 'integer', 'le', 'loop', 'lt', 'ne', 'not', - 'number', 'or', 'private', 'proc', 'public', 'quitloop', 'return', - 'short', 'step', 'switch', 'text', 'then', 'to', 'true', 'while' - ), - 3 => array( - // These keywords are not highlighted by the DCS IDE but we may as well - // keep track of them anyway: - 'mp_file', 'odbc_file' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', - '=', '<', '>', - '+', '-', '*', '/', '^', - ':', ',' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: red;', - 2 => 'color: blue;', - 3 => 'color: black;' - ), - 'COMMENTS' => array( - 1 => 'color: black; background-color: silver;', - // Colors for highlighting embedded C code: - 2 => 'color: maroon; background-color: pink;' - ), - 'ESCAPE_CHAR' => array( - ), - 'BRACKETS' => array( - 0 => 'color: black;' - ), - 'STRINGS' => array( - 0 => 'color: green;' - ), - 'NUMBERS' => array( - 0 => 'color: green;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: black;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ), - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/delphi.php b/_piecrust/libs/Geshi/geshi/delphi.php deleted file mode 100644 index 1c252e3..0000000 --- a/_piecrust/libs/Geshi/geshi/delphi.php +++ /dev/null @@ -1,289 +0,0 @@ - 'Delphi', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('(*' => '*)', '{' => '}'), - //Compiler directives - 'COMMENT_REGEXP' => array(2 => '/\\{\\$.*?}|\\(\\*\\$.*?\\*\\)/U'), - 'CASE_KEYWORDS' => 0, - 'QUOTEMARKS' => array("'"), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'Abstract', 'And', 'Array', 'As', 'Asm', 'At', 'Begin', 'Case', - 'Class', 'Const', 'Constructor', 'Contains', 'Destructor', - 'DispInterface', 'Div', 'Do', 'DownTo', 'Else', 'End', 'Except', - 'Export', 'Exports', 'External', 'File', 'Finalization', 'Finally', - 'For', 'Function', 'Goto', 'If', 'Implementation', 'In', 'Inherited', - 'Initialization', 'Inline', 'Interface', 'Is', 'Label', 'Library', - 'Mod', 'Not', 'Object', 'Of', 'On', 'Or', 'Overload', 'Override', - 'Package', 'Packed', 'Private', 'Procedure', 'Program', 'Property', - 'Protected', 'Public', 'Published', 'Raise', 'Record', 'Register', - 'Repeat', 'Requires', 'Resourcestring', 'Set', 'Shl', 'Shr', 'Then', - 'ThreadVar', 'To', 'Try', 'Type', 'Unit', 'Until', 'Uses', 'Var', - 'Virtual', 'While', 'With', 'Xor', 'assembler', 'far', - 'near', 'pascal', 'cdecl', 'safecall', 'stdcall', 'varargs' - ), - 2 => array( - 'nil', 'false', 'self', 'true', 'var', 'type', 'const' - ), - 3 => array( - 'Abs', 'AcquireExceptionObject', 'Addr', 'AnsiToUtf8', 'Append', 'ArcTan', - 'Assert', 'AssignFile', 'Assigned', 'BeginThread', 'BlockRead', - 'BlockWrite', 'Break', 'ChDir', 'Chr', 'Close', 'CloseFile', - 'CompToCurrency', 'CompToDouble', 'Concat', 'Continue', 'Copy', 'Cos', - 'Dec', 'Delete', 'Dispose', 'DoubleToComp', 'EndThread', 'EnumModules', - 'EnumResourceModules', 'Eof', 'Eoln', 'Erase', 'ExceptAddr', - 'ExceptObject', 'Exclude', 'Exit', 'Exp', 'FilePos', 'FileSize', - 'FillChar', 'Finalize', 'FindClassHInstance', 'FindHInstance', - 'FindResourceHInstance', 'Flush', 'Frac', 'FreeMem', 'Get8087CW', - 'GetDir', 'GetLastError', 'GetMem', 'GetMemoryManager', - 'GetModuleFileName', 'GetVariantManager', 'Halt', 'Hi', 'High', - 'IOResult', 'Inc', 'Include', 'Initialize', 'Insert', 'Int', - 'IsMemoryManagerSet', 'IsVariantManagerSet', 'Length', 'Ln', 'Lo', 'Low', - 'MkDir', 'Move', 'New', 'Odd', 'OleStrToStrVar', 'OleStrToString', 'Ord', - 'PUCS4Chars', 'ParamCount', 'ParamStr', 'Pi', 'Pos', 'Pred', 'Ptr', - 'Random', 'Randomize', 'Read', 'ReadLn', 'ReallocMem', - 'ReleaseExceptionObject', 'Rename', 'Reset', 'Rewrite', 'RmDir', 'Round', - 'RunError', 'Seek', 'SeekEof', 'SeekEoln', 'Set8087CW', 'SetLength', - 'SetLineBreakStyle', 'SetMemoryManager', 'SetString', 'SetTextBuf', - 'SetVariantManager', 'Sin', 'SizeOf', 'Slice', 'Sqr', 'Sqrt', 'Str', - 'StringOfChar', 'StringToOleStr', 'StringToWideChar', 'Succ', 'Swap', - 'Trunc', 'Truncate', 'TypeInfo', 'UCS4StringToWideString', 'UTF8Decode', - 'UTF8Encode', 'UnicodeToUtf8', 'UniqueString', 'UpCase', 'Utf8ToAnsi', - 'Utf8ToUnicode', 'Val', 'VarArrayRedim', 'VarClear', - 'WideCharLenToStrVar', 'WideCharLenToString', 'WideCharToStrVar', - 'WideCharToString', 'WideStringToUCS4String', 'Write', 'WriteLn', - - 'Abort', 'AddExitProc', 'AddTerminateProc', 'AdjustLineBreaks', 'AllocMem', - 'AnsiCompareFileName', 'AnsiCompareStr', 'AnsiCompareText', - 'AnsiDequotedStr', 'AnsiExtractQuotedStr', 'AnsiLastChar', - 'AnsiLowerCase', 'AnsiLowerCaseFileName', 'AnsiPos', 'AnsiQuotedStr', - 'AnsiSameStr', 'AnsiSameText', 'AnsiStrComp', 'AnsiStrIComp', - 'AnsiStrLComp', 'AnsiStrLIComp', 'AnsiStrLastChar', 'AnsiStrLower', - 'AnsiStrPos', 'AnsiStrRScan', 'AnsiStrScan', 'AnsiStrUpper', - 'AnsiUpperCase', 'AnsiUpperCaseFileName', 'AppendStr', 'AssignStr', - 'Beep', 'BoolToStr', 'ByteToCharIndex', 'ByteToCharLen', 'ByteType', - 'CallTerminateProcs', 'ChangeFileExt', 'CharLength', 'CharToByteIndex', - 'CharToByteLen', 'CompareMem', 'CompareStr', 'CompareText', 'CreateDir', - 'CreateGUID', 'CurrToStr', 'CurrToStrF', 'CurrentYear', 'Date', - 'DateTimeToFileDate', 'DateTimeToStr', 'DateTimeToString', - 'DateTimeToSystemTime', 'DateTimeToTimeStamp', 'DateToStr', 'DayOfWeek', - 'DecodeDate', 'DecodeDateFully', 'DecodeTime', 'DeleteFile', - 'DirectoryExists', 'DiskFree', 'DiskSize', 'DisposeStr', 'EncodeDate', - 'EncodeTime', 'ExceptionErrorMessage', 'ExcludeTrailingBackslash', - 'ExcludeTrailingPathDelimiter', 'ExpandFileName', 'ExpandFileNameCase', - 'ExpandUNCFileName', 'ExtractFileDir', 'ExtractFileDrive', - 'ExtractFileExt', 'ExtractFileName', 'ExtractFilePath', - 'ExtractRelativePath', 'ExtractShortPathName', 'FileAge', 'FileClose', - 'FileCreate', 'FileDateToDateTime', 'FileExists', 'FileGetAttr', - 'FileGetDate', 'FileIsReadOnly', 'FileOpen', 'FileRead', 'FileSearch', - 'FileSeek', 'FileSetAttr', 'FileSetDate', 'FileSetReadOnly', 'FileWrite', - 'FinalizePackage', 'FindClose', 'FindCmdLineSwitch', 'FindFirst', - 'FindNext', 'FloatToCurr', 'FloatToDateTime', 'FloatToDecimal', - 'FloatToStr', 'FloatToStrF', 'FloatToText', 'FloatToTextFmt', - 'FmtLoadStr', 'FmtStr', 'ForceDirectories', 'Format', 'FormatBuf', - 'FormatCurr', 'FormatDateTime', 'FormatFloat', 'FreeAndNil', - 'GUIDToString', 'GetCurrentDir', 'GetEnvironmentVariable', - 'GetFileVersion', 'GetFormatSettings', 'GetLocaleFormatSettings', - 'GetModuleName', 'GetPackageDescription', 'GetPackageInfo', 'GetTime', - 'IncAMonth', 'IncMonth', 'IncludeTrailingBackslash', - 'IncludeTrailingPathDelimiter', 'InitializePackage', 'IntToHex', - 'IntToStr', 'InterlockedDecrement', 'InterlockedExchange', - 'InterlockedExchangeAdd', 'InterlockedIncrement', 'IsDelimiter', - 'IsEqualGUID', 'IsLeapYear', 'IsPathDelimiter', 'IsValidIdent', - 'Languages', 'LastDelimiter', 'LoadPackage', 'LoadStr', 'LowerCase', - 'MSecsToTimeStamp', 'NewStr', 'NextCharIndex', 'Now', 'OutOfMemoryError', - 'QuotedStr', 'RaiseLastOSError', 'RaiseLastWin32Error', 'RemoveDir', - 'RenameFile', 'ReplaceDate', 'ReplaceTime', 'SafeLoadLibrary', - 'SameFileName', 'SameText', 'SetCurrentDir', 'ShowException', 'Sleep', - 'StrAlloc', 'StrBufSize', 'StrByteType', 'StrCat', 'StrCharLength', - 'StrComp', 'StrCopy', 'StrDispose', 'StrECopy', 'StrEnd', 'StrFmt', - 'StrIComp', 'StrLCat', 'StrLComp', 'StrLCopy', 'StrLFmt', 'StrLIComp', - 'StrLen', 'StrLower', 'StrMove', 'StrNew', 'StrNextChar', 'StrPCopy', - 'StrPLCopy', 'StrPas', 'StrPos', 'StrRScan', 'StrScan', 'StrToBool', - 'StrToBoolDef', 'StrToCurr', 'StrToCurrDef', 'StrToDate', 'StrToDateDef', - 'StrToDateTime', 'StrToDateTimeDef', 'StrToFloat', 'StrToFloatDef', - 'StrToInt', 'StrToInt64', 'StrToInt64Def', 'StrToIntDef', 'StrToTime', - 'StrToTimeDef', 'StrUpper', 'StringReplace', 'StringToGUID', 'Supports', - 'SysErrorMessage', 'SystemTimeToDateTime', 'TextToFloat', 'Time', - 'TimeStampToDateTime', 'TimeStampToMSecs', 'TimeToStr', 'Trim', - 'TrimLeft', 'TrimRight', 'TryEncodeDate', 'TryEncodeTime', - 'TryFloatToCurr', 'TryFloatToDateTime', 'TryStrToBool', 'TryStrToCurr', - 'TryStrToDate', 'TryStrToDateTime', 'TryStrToFloat', 'TryStrToInt', - 'TryStrToInt64', 'TryStrToTime', 'UnloadPackage', 'UpperCase', - 'WideCompareStr', 'WideCompareText', 'WideFmtStr', 'WideFormat', - 'WideFormatBuf', 'WideLowerCase', 'WideSameStr', 'WideSameText', - 'WideUpperCase', 'Win32Check', 'WrapText', - - 'ActivateClassGroup', 'AllocateHwnd', 'BinToHex', 'CheckSynchronize', - 'CollectionsEqual', 'CountGenerations', 'DeallocateHwnd', 'EqualRect', - 'ExtractStrings', 'FindClass', 'FindGlobalComponent', 'GetClass', - 'GroupDescendantsWith', 'HexToBin', 'IdentToInt', - 'InitInheritedComponent', 'IntToIdent', 'InvalidPoint', - 'IsUniqueGlobalComponentName', 'LineStart', 'ObjectBinaryToText', - 'ObjectResourceToText', 'ObjectTextToBinary', 'ObjectTextToResource', - 'PointsEqual', 'ReadComponentRes', 'ReadComponentResEx', - 'ReadComponentResFile', 'Rect', 'RegisterClass', 'RegisterClassAlias', - 'RegisterClasses', 'RegisterComponents', 'RegisterIntegerConsts', - 'RegisterNoIcon', 'RegisterNonActiveX', 'SmallPoint', 'StartClassGroup', - 'TestStreamFormat', 'UnregisterClass', 'UnregisterClasses', - 'UnregisterIntegerConsts', 'UnregisterModuleClasses', - 'WriteComponentResFile', - - 'ArcCos', 'ArcCosh', 'ArcCot', 'ArcCotH', 'ArcCsc', 'ArcCscH', 'ArcSec', - 'ArcSecH', 'ArcSin', 'ArcSinh', 'ArcTan2', 'ArcTanh', 'Ceil', - 'CompareValue', 'Cosecant', 'Cosh', 'Cot', 'CotH', 'Cotan', 'Csc', 'CscH', - 'CycleToDeg', 'CycleToGrad', 'CycleToRad', 'DegToCycle', 'DegToGrad', - 'DegToRad', 'DivMod', 'DoubleDecliningBalance', 'EnsureRange', 'Floor', - 'Frexp', 'FutureValue', 'GetExceptionMask', 'GetPrecisionMode', - 'GetRoundMode', 'GradToCycle', 'GradToDeg', 'GradToRad', 'Hypot', - 'InRange', 'IntPower', 'InterestPayment', 'InterestRate', - 'InternalRateOfReturn', 'IsInfinite', 'IsNan', 'IsZero', 'Ldexp', 'LnXP1', - 'Log10', 'Log2', 'LogN', 'Max', 'MaxIntValue', 'MaxValue', 'Mean', - 'MeanAndStdDev', 'Min', 'MinIntValue', 'MinValue', 'MomentSkewKurtosis', - 'NetPresentValue', 'Norm', 'NumberOfPeriods', 'Payment', 'PeriodPayment', - 'Poly', 'PopnStdDev', 'PopnVariance', 'Power', 'PresentValue', - 'RadToCycle', 'RadToDeg', 'RadToGrad', 'RandG', 'RandomRange', 'RoundTo', - 'SLNDepreciation', 'SYDDepreciation', 'SameValue', 'Sec', 'SecH', - 'Secant', 'SetExceptionMask', 'SetPrecisionMode', 'SetRoundMode', 'Sign', - 'SimpleRoundTo', 'SinCos', 'Sinh', 'StdDev', 'Sum', 'SumInt', - 'SumOfSquares', 'SumsAndSquares', 'Tan', 'Tanh', 'TotalVariance', - 'Variance' - ), - 4 => array( - 'AnsiChar', 'AnsiString', 'Bool', 'Boolean', 'Byte', 'ByteBool', 'Cardinal', 'Char', - 'Comp', 'Currency', 'DWORD', 'Double', 'Extended', 'Int64', 'Integer', 'IUnknown', - 'LongBool', 'LongInt', 'LongWord', 'PAnsiChar', 'PAnsiString', 'PBool', 'PBoolean', 'PByte', - 'PByteArray', 'PCardinal', 'PChar', 'PComp', 'PCurrency', 'PDWORD', 'PDate', 'PDateTime', - 'PDouble', 'PExtended', 'PInt64', 'PInteger', 'PLongInt', 'PLongWord', 'Pointer', 'PPointer', - 'PShortInt', 'PShortString', 'PSingle', 'PSmallInt', 'PString', 'PHandle', 'PVariant', 'PWord', - 'PWordArray', 'PWordBool', 'PWideChar', 'PWideString', 'Real', 'Real48', 'ShortInt', 'ShortString', - 'Single', 'SmallInt', 'String', 'TClass', 'TDate', 'TDateTime', 'TextFile', 'THandle', - 'TObject', 'TTime', 'Variant', 'WideChar', 'WideString', 'Word', 'WordBool' - ), - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - ), - 'SYMBOLS' => array( - 0 => array('(', ')', '[', ']'), - 1 => array('.', ',', ':', ';'), - 2 => array('@', '^'), - 3 => array('=', '+', '-', '*', '/') - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #000066;', - 4 => 'color: #000066; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 2 => 'color: #008000; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #ff0000; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000066;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #0000ff;' - ), - 'METHODS' => array( - 1 => 'color: #006600;' - ), - 'REGEXPS' => array( - 0 => 'color: #9ac;', - 1 => 'color: #ff0000;' - ), - 'SYMBOLS' => array( - 0 => 'color: #000066;', - 1 => 'color: #000066;', - 2 => 'color: #000066;', - 3 => 'color: #000066;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - //Hex numbers - 0 => '\$[0-9a-fA-F]+', - //Characters - 1 => '\#(?:\$[0-9a-fA-F]{1,2}|\d{1,3})' - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 2 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/diff.php b/_piecrust/libs/Geshi/geshi/diff.php deleted file mode 100644 index bcf0c1d..0000000 --- a/_piecrust/libs/Geshi/geshi/diff.php +++ /dev/null @@ -1,196 +0,0 @@ - 'Diff', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => ' ', - 'KEYWORDS' => array( - 1 => array( - '\ No newline at end of file' - ), -// 2 => array( -// '***************' /* This only seems to works in some cases? */ -// ), - ), - 'SYMBOLS' => array( - ), - 'CASE_SENSITIVE' => array( - 1 => false, -// 2 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #aaaaaa; font-style: italic;', -// 2 => 'color: #dd6611;', - ), - 'COMMENTS' => array( - ), - 'ESCAPE_CHAR' => array( - 0 => '' - ), - 'BRACKETS' => array( - 0 => '' - ), - 'STRINGS' => array( - 0 => '' - ), - 'NUMBERS' => array( - 0 => '' - ), - 'METHODS' => array( - 0 => '' - ), - 'SYMBOLS' => array( - 0 => '' - ), - 'SCRIPT' => array( - 0 => '' - ), - 'REGEXPS' => array( - 0 => 'color: #440088;', - 1 => 'color: #991111;', - 2 => 'color: #00b000;', - 3 => 'color: #888822;', - 4 => 'color: #888822;', - 5 => 'color: #0011dd;', - 6 => 'color: #440088;', - 7 => 'color: #991111;', - 8 => 'color: #00b000;', - 9 => 'color: #888822;', - ), - ), - 'URLS' => array( - 1 => '', -// 2 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array( - 0 => "[0-9,]+[acd][0-9,]+", - //Removed lines - 1 => array( - GESHI_SEARCH => '(^|(?<=\A\s))\\<.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //Inserted lines - 2 => array( - GESHI_SEARCH => '(^|(?<=\A\s))\\>.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //Location line - 3 => array( - GESHI_SEARCH => '(^|(?<=\A\s))-{3}\\s.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //Inserted line - 4 => array( - GESHI_SEARCH => '(^|(?<=\A\s))(\\+){3}\\s.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //Modified line - 5 => array( - GESHI_SEARCH => '(^|(?<=\A\s))\\!.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //File specification - 6 => array( - GESHI_SEARCH => '(^|(?<=\A\s))[\\@]{2}.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //Removed line - 7 => array( - GESHI_SEARCH => '(^|(?<=\A\s))\\-.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //Inserted line - 8 => array( - GESHI_SEARCH => '(^|(?<=\A\s))\\+.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //File specification - 9 => array( - GESHI_SEARCH => '(^|(?<=\A\s))(\\*){3}\\s.*$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/div.php b/_piecrust/libs/Geshi/geshi/div.php deleted file mode 100644 index 2bfa24d..0000000 --- a/_piecrust/libs/Geshi/geshi/div.php +++ /dev/null @@ -1,126 +0,0 @@ - 'DIV', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'while','until','to','switch','step','return','repeat','loop','if','from','frame','for','end','elseif', - 'else','default','debug','continue','clone','case','break','begin' - ), - 2 => array( - 'xor','whoami','type','sizeof','pointer','or','offset','not','neg','mod','id','dup','and','_ne','_lt', - '_le','_gt','_ge','_eq' - ), - 3 => array( - 'setup_program','program','process','private','local','import','global','function','const', - 'compiler_options' - ), - 4 => array( - 'word','struct','string','int','byte' - ), - ), - 'SYMBOLS' => array( - '(',')','[',']','=','+','-','*','/','!','%','^','&',':',';',',','<','>' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0040b1;', - 2 => 'color: #000000;', - 3 => 'color: #000066; font-weight: bold;', - 4 => 'color: #993333;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => '' - ), - 'BRACKETS' => array( - 0 => 'color: #44aa44;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 0 => 'color: #202020;', - ), - 'SYMBOLS' => array( - 0 => 'color: #44aa44;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/dos.php b/_piecrust/libs/Geshi/geshi/dos.php deleted file mode 100644 index 75fee1c..0000000 --- a/_piecrust/libs/Geshi/geshi/dos.php +++ /dev/null @@ -1,227 +0,0 @@ - 'DOS', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - //DOS comment lines - 'COMMENT_REGEXP' => array( - 1 => "/^\s*@?REM\b.*$/mi", - 2 => "/^\s*::.*$/m", - 3 => "/\^./" - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - /* Flow control keywords */ - 1 => array( - 'if', 'else', 'goto', 'shift', - 'for', 'in', 'do', - 'call', 'exit' - ), - /* IF statement keywords */ - 2 => array( - 'not', 'exist', 'errorlevel', - 'defined', - 'equ', 'neq', 'lss', 'leq', 'gtr', 'geq' - ), - /* Internal commands */ - 3 => array( - 'cd', 'md', 'rd', 'chdir', 'mkdir', 'rmdir', 'dir', - 'del', 'copy', 'move', 'ren', 'rename', - 'echo', - 'setlocal', 'endlocal', 'set', - 'pause', - 'pushd', 'popd', 'title', 'verify' - ), - /* Special files */ - 4 => array( - 'prn', 'nul', 'lpt3', 'lpt2', 'lpt1', 'con', - 'com4', 'com3', 'com2', 'com1', 'aux' - ) - ), - 'SYMBOLS' => array( - '(', ')', '@', '%', '!', '|', '<', '>', '&' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #00b100; font-weight: bold;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #b1b100; font-weight: bold;', - 4 => 'color: #0000ff; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 2 => 'color: #b100b1; font-style: italic;', - 3 => 'color: #33cc33;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #ff0000; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #33cc33;', - 1 => 'color: #33cc33;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - 0 => 'color: #b100b1; font-weight: bold;', - 1 => 'color: #448844;', - 2 => 'color: #448888;', - 3 => 'color: #448888;' - ) - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'URLS' => array( - 1 => 'http://www.ss64.com/nt/{FNAMEL}.html', - 2 => 'http://www.ss64.com/nt/{FNAMEL}.html', - 3 => 'http://www.ss64.com/nt/{FNAMEL}.html', - 4 => 'http://www.ss64.com/nt/{FNAMEL}.html' - ), - 'REGEXPS' => array( - /* Label */ - 0 => array( -/* GESHI_SEARCH => '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((? '((?si:[@\s]+GOTO\s+|\s+:)[\s]*)((? '\\2', - GESHI_MODIFIERS => 'si', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ), - /* Variable assignement */ - 1 => array( -/* GESHI_SEARCH => '(SET[\s]+(?si:\/A[\s]+|\/P[\s]+|))([^=\s\n]+)([\s]*=)',*/ - GESHI_SEARCH => '(SET[\s]+(?si:\/A[\s]+|\/P[\s]+|))([^=\n]+)([\s]*=)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'si', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ), - /* Arguments or variable evaluation */ - 2 => array( -/* GESHI_SEARCH => '(%)([\d*]|[^%\s]*(?=%))((? '(%(?:%(?=[a-z0-9]))?)([\d*]|(?:~[adfnpstxz]*(?:$\w+:)?)?[a-z0-9](?!\w)|[^%\n]*(?=%))((? '\\2', - GESHI_MODIFIERS => 'si', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ), - /* Arguments or variable evaluation */ - 3 => array( -/* GESHI_SEARCH => '(%)([\d*]|[^%\s]*(?=%))((? '(!(?:!(?=[a-z0-9]))?)([\d*]|(?:~[adfnpstxz]*(?:$\w+:)?)?[a-z0-9](?!\w)|[^!>\n]*(?=!))((?)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'si', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ) - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'BRACKETS' => GESHI_NEVER, - 'NUMBERS' => GESHI_NEVER - ), - 'KEYWORDS' => array( - 1 => array( - 'DISALLOWED_BEFORE' => '(? array( - 'DISALLOWED_BEFORE' => '(? array( - 'DISALLOWED_BEFORE' => '(? array( - 'DISALLOWED_BEFORE' => '(? \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/dot.php b/_piecrust/libs/Geshi/geshi/dot.php deleted file mode 100644 index 698cf13..0000000 --- a/_piecrust/libs/Geshi/geshi/dot.php +++ /dev/null @@ -1,164 +0,0 @@ - 'dot', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'URL', 'arrowhead', 'arrowsize', 'arrowtail', 'bb', 'bgcolor', 'bottomlabel', - 'center', 'clusterrank', 'color', 'comment', 'constraint', 'decorate', - 'dir', 'distortion', 'fillcolor', 'fixedsize', 'fontcolor', - 'fontname', 'fontsize', 'group', 'headclip', 'headlabel', 'headport', - 'height', 'id', 'label', 'labelangle', 'labeldistance', 'labelfontcolor', - 'labelfontname', 'labelfontsize', 'layer', 'layers', 'margin', 'mclimit', - 'minlen', 'nodesep', 'nslimit', 'ordering', 'orientation', 'page', - 'pagedir', 'peripheries', 'port_label_distance', 'quantum', 'rank', 'rankdir', - 'ranksep', 'ratio', 'regular', 'rotate', 'samehead', 'sametail', 'searchsize', - 'shape', 'shapefile', 'showboxes', 'sides', 'size', 'skew', 'style', - 'tailclip', 'taillabel', 'tailport', 'toplabel', 'weight', 'width' - ), - 2 => array( - 'node', 'graph', 'digraph', 'strict', 'edge', 'subgraph' - ), - 3 => array( - 'Mcircle', 'Mdiamond', 'Mrecord', 'Msquare', 'auto', 'back', 'bold', - 'both', 'box', 'circle', 'compress', 'dashed', 'diamond', 'dot', - 'dotted', 'doublecircle', 'doubleoctagon', 'egg', 'ellipse', 'epsf', - 'false', 'fill', 'filled', 'forward', 'global', 'hexagon', 'house', - 'inv', 'invdot', 'invhouse', 'invis', 'invodot', 'invtrapezium', - 'invtriangle', 'local', 'max', 'min', 'none', 'normal', 'octagon', - 'odot', 'out', 'parallelogram', 'plaintext', 'polygon', 'record', - 'same', 'solid', 'trapezium', 'triangle', 'tripleoctagon', 'true' - ), - 4 => array( - 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'black', - 'blanchedalmond', 'blue', 'blueviolet', 'brown', 'burlywood', 'cadetblue', - 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', - 'cyan', 'darkgoldenrod', 'darkgreen', 'darkkhaki', 'darkolivegreen', - 'darkorange', 'darkorchid', 'darksalmon', 'darkseagreen', 'darkslateblue', - 'darkslategray', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', - 'dimgray', 'dodgerblue', 'firebrick', 'forestgreen', 'gainsboro', 'ghostwhite', - 'gold', 'goldenrod', 'gray', 'green', 'greenyellow', 'honeydew', 'hotpink', - 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', - 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcyan', 'lightgoldenrod', - 'lightgoldenrodyellow', 'lightgray', 'lightpink', 'lightsalmon', - 'lightseagreen', 'lightskyblue', 'lightslateblue', 'lightslategray', - 'lightyellow', 'limegreen', 'linen', 'magenta', 'maroon', 'mediumaquamarine', - 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', - 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', - 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'navy', - 'navyblue', 'oldlace', 'olivedrab', 'oralwhite', 'orange', 'orangered', - 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', - 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'purple', - 'red', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'salmon2', 'sandybrown', - 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'snow', - 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', - 'violetred', 'wheat', 'white', 'whitesmoke', 'yellow', 'yellowgreen' - ) - ), - 'SYMBOLS' => array( - '[', ']', '{', '}', '-', '+', '*', '/', '<', '>', '!', '~', '%', '&', '|', '=' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000066;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #993333;', - 4 => 'color: #b1b100;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 2 => 'color: #339933;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #af624d; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'METHODS' => array( - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ), - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - 1 => true, - 2 => true, - 3 => true - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/e.php b/_piecrust/libs/Geshi/geshi/e.php deleted file mode 100644 index fb80fca..0000000 --- a/_piecrust/libs/Geshi/geshi/e.php +++ /dev/null @@ -1,208 +0,0 @@ - 'E', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array('/**' => '*/'), // Note: This is method doc, not a general comment syntax. - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - - // FIXME: The escaping inside ` is actually doubling of any interior `, $, or @ -- backslash is NOT special - 'QUOTEMARKS' => array('\'', '"', '`'), - 'ESCAPE_CHAR' => '\\', - - 'KEYWORDS' => array( - // builtin control structures - 1 => array( - 'accum', 'break', 'try', 'continue', 'if', 'while', 'for', 'switch' - ), - - // control structures subsidiary keywords - 2 => array( - 'catch', 'else', 'finally', 'in', 'exit' - ), - - // named operators - 3 => array( - 'fn', 'via' - ), - - // variable/function/object definers - 4 => array( - 'def', 'bind', 'var' - ), - - // object definition subsidiary keywords - 5 => array( - 'extends', 'as', 'implements', 'guards', 'match', 'to', 'method' - ), - - // builtin nouns in safeEnv - 6 => array( - 'null', 'false', 'true', 'throw', '__loop', '__makeList', - '__makeMap', '__makeProtocolDesc', '__makeMessageDesc', - '__makeParamDesc', 'any', 'void', 'boolean', '__makeOrderedSpace', - 'ValueGuard', '__MatchContext', 'require', '__makeVerbFacet', 'NaN', - 'Infinity', '__identityFunc', '__makeInt', '__makeFinalSlot', - '__makeVarSlot', '__makeGuardedSlot', '__makeGuard', '__makeTwine', - '__makeSourceSpan', '__auditedBy', 'Guard', 'near', 'pbc', - 'PassByCopy', 'DeepPassByCopy', 'Data', 'Persistent', 'DeepFrozen', - 'int', 'float64', 'char', 'String', 'Twine', 'TextWriter', 'List', - 'Map', 'nullOk', 'Tuple', '__Portrayal', 'notNull', 'vow', 'rcvr', - 'SturdyRef', 'simple__quasiParser', 'twine__quasiParser', - 'rx__quasiParser', 'e__quasiParser', 'epatt__quasiParser', - 'sml__quasiParser', 'term__quasiParser', 'traceln', '__equalizer', - '__comparer', 'Ref', 'E', 'promiseAllFulfilled', 'EIO', 'help', - 'safeScope', '__eval', 'resource__uriGetter', 'type__uriGetter', - 'import__uriGetter', 'elib__uriGetter', 'elang__uriGetter', - 'opaque__uriGetter' - ), - - // builtin nouns in privilegedEnv - 7 => array( - 'file__uriGetter', 'fileURL__uriGetter', 'jar__uriGetter', - 'http__uriGetter', 'ftp__uriGetter', 'gopher__uriGetter', - 'news__uriGetter', 'cap__uriGetter', 'makeCommand', 'stdout', - 'stderr', 'stdin', 'print', 'println', 'interp', 'entropy', 'timer', - 'introducer', 'identityMgr', 'makeSturdyRef', 'timeMachine', - 'unsafe__uriGetter', 'currentVat', 'rune', 'awt__uriGetter', - 'swing__uriGetter', 'JPanel__quasiParser', 'swt__uriGetter', - 'currentDisplay', 'swtGrid__quasiParser', 'swtGrid`', - 'privilegedScope' - ), - - // reserved keywords - 8 => array( - 'abstract', 'an', 'assert', 'attribute', 'be', 'begin', 'behalf', - 'belief', 'believe', 'believes', 'case', 'class', 'const', - 'constructor', 'declare', 'default', 'define', 'defmacro', - 'delicate', 'deprecated', 'dispatch', 'do', 'encapsulate', - 'encapsulated', 'encapsulates', 'end', 'ensure', 'enum', 'eventual', - 'eventually', 'export', 'facet', 'forall', 'function', 'given', - 'hidden', 'hides', 'inline', 'is', 'know', 'knows', 'lambda', 'let', - 'methods', 'module', 'namespace', 'native', 'obeys', 'octet', - 'oneway', 'operator', 'package', 'private', 'protected', 'public', - 'raises', 'reliance', 'reliant', 'relies', 'rely', 'reveal', 'sake', - 'signed', 'static', 'struct', 'suchthat', 'supports', 'suspect', - 'suspects', 'synchronized', 'this', 'transient', 'truncatable', - 'typedef', 'unsigned', 'unum', 'uses', 'using', 'utf8', 'utf16', - 'virtual', 'volatile', 'wstring' - ) - ), - 'SYMBOLS' => array( - 1 => array( - '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', '!', '^', '&', '|', '?', ':', ';', ',' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true, - 8 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #b1b100;', - 3 => 'color: #b1b100;', - 4 => 'color: #b1b100;', - 5 => 'color: #b1b100;', - 6 => 'color: #b1b100;', - 7 => 'color: #b1b100;', - 8 => 'color: #b1b100;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;', - ), - 'METHODS' => array( - 0 => 'color: #004000;' - ), - 'SYMBOLS' => array( - 1 => 'color: #339933;' - ), - 'REGEXPS' => array(), - 'SCRIPT' => array() - ), - 'URLS' => array( - 1 => 'http://wiki.erights.org/wiki/{FNAME}', - 2 => 'http://wiki.erights.org/wiki/{FNAME}', - 3 => 'http://wiki.erights.org/wiki/{FNAME}', - 4 => 'http://wiki.erights.org/wiki/{FNAME}', - 5 => 'http://wiki.erights.org/wiki/{FNAME}', - 6 => 'http://wiki.erights.org/wiki/{FNAME}', - 7 => 'http://wiki.erights.org/wiki/{FNAME}', - 8 => 'http://wiki.erights.org/wiki/{FNAME}' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.', - 2 => '<-', - 3 => '::' - ), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array() -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/ecmascript.php b/_piecrust/libs/Geshi/geshi/ecmascript.php deleted file mode 100644 index 2d3f09f..0000000 --- a/_piecrust/libs/Geshi/geshi/ecmascript.php +++ /dev/null @@ -1,210 +0,0 @@ - 'ECMAScript', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - // Regular Expression Literals - 'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\*\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\*\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\*\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array( - //Simple Single Char Escapes - 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i", - //Hexadecimal Char Specs - 2 => "#\\\\x[\da-fA-F]{2}#", - //Hexadecimal Char Specs - 3 => "#\\\\u[\da-fA-F]{4}#", - //Hexadecimal Char Specs - 4 => "#\\\\U[\da-fA-F]{8}#", - //Octal Char Specs - 5 => "#\\\\[0-7]{1,3}#" - ), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | GESHI_NUMBER_BIN_PREFIX_0B | - GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_NONSCI | - GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - 1 => array( // Reserved literals - 'false', 'true', - 'null' - ), - 2 => array( // Main keywords - 'break', 'case', 'catch', 'continue', 'default', 'delete', 'do', 'else', - 'finally', 'for', 'function', 'if', 'in', 'instanceof', 'new', 'return', - 'switch', 'this', 'throw', 'try', 'typeof', 'var', 'void', 'while', - 'with' - ), - 3 => array( // Extra keywords or keywords reserved for future use - 'abstract', 'as', 'boolean', 'byte', 'char', 'class', 'const', 'debugger', - 'double', 'enum', 'export', 'extends', 'final', 'float', 'goto', 'implements', - 'import', 'int', 'interface', 'is', 'long', 'native', 'namespace', 'package', - 'private', 'protected', 'public', 'short', 'static', 'super', 'synchronized', 'throws', - 'transient', 'use', 'volatile' - ), - 4 => array( // Operators - 'get', 'set' - ), - 5 => array( // Built-in object classes - 'Array', 'Boolean', 'Date', 'EvalError', 'Error', 'Function', 'Math', 'Number', - 'Object', 'RangeError', 'ReferenceError', 'RegExp', 'String', 'SyntaxError', 'TypeError', 'URIError' - ), - 6 => array( // Global properties - 'Infinity', 'NaN', 'undefined' - ), - 7 => array( // Global methods - 'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', - 'eval', 'isFinite', 'isNaN', 'parseFloat', 'parseInt', - // The escape and unescape functions do not work properly for non-ASCII characters and have been deprecated. - // In JavaScript 1.5 and later, use encodeURI, decodeURI, encodeURIComponent, and decodeURIComponent. - 'escape', 'unescape' - ), - 8 => array( // Function's arguments - 'arguments' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', - '+', '-', '*', '/', '%', - '!', '.', '&', '|', '^', - '<', '>', '=', '~', - ',', ';', '?', ':' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true, - 8 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #009999;', - 2 => 'color: #1500C8;', - 3 => 'color: #1500C8;', - 4 => 'color: #1500C8;', - 5 => 'color: #1500C8;', - 6 => 'color: #1500C8;', - 7 => 'color: #1500C8;', - 8 => 'color: #1500C8;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #CC0000;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #3366CC;', - 1 => 'color: #3366CC;', - 2 => 'color: #3366CC;', - 3 => 'color: #3366CC;', - 4 => 'color: #3366CC;', - 5 => 'color: #3366CC;', - 'HARD' => '', - ), - 'BRACKETS' => array( - 0 => 'color: #008800;' - ), - 'STRINGS' => array( - 0 => 'color: #9900FF;' - ), - 'NUMBERS' => array( - 0 => 'color: #FF00FF;', - GESHI_NUMBER_BIN_PREFIX_0B => 'color: #FF00FF;', - GESHI_NUMBER_OCT_PREFIX => 'color: #FF00FF;', - GESHI_NUMBER_HEX_PREFIX => 'color: #FF00FF;', - GESHI_NUMBER_FLT_SCI_SHORT => 'color: #FF00FF;', - GESHI_NUMBER_FLT_SCI_ZERO => 'color: #FF00FF;', - GESHI_NUMBER_FLT_NONSCI_F => 'color: #FF00FF;', - GESHI_NUMBER_FLT_NONSCI => 'color: #FF00FF;' - ), - 'METHODS' => array( - 1 => 'color: #660066;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - 3 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '', - 8 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/eiffel.php b/_piecrust/libs/Geshi/geshi/eiffel.php deleted file mode 100644 index 57e00b9..0000000 --- a/_piecrust/libs/Geshi/geshi/eiffel.php +++ /dev/null @@ -1,395 +0,0 @@ - 'Eiffel', - 'COMMENT_SINGLE' => array(1 => '--'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '%', - 'KEYWORDS' => array( - 1 => array( - 'separate', - 'invariant', - 'inherit', - 'indexing', - 'feature', - 'expanded', - 'deferred', - 'class' - ), - 2 => array( - 'xor', - 'when', - 'variant', - 'until', - 'unique', - 'undefine', - 'then', - 'strip', - 'select', - 'retry', - 'rescue', - 'require', - 'rename', - 'reference', - 'redefine', - 'prefix', - 'or', - 'once', - 'old', - 'obsolete', - 'not', - 'loop', - 'local', - 'like', - 'is', - 'inspect', - 'infix', - 'include', - 'implies', - 'if', - 'frozen', - 'from', - 'external', - 'export', - 'ensure', - 'end', - 'elseif', - 'else', - 'do', - 'creation', - 'create', - 'check', - 'as', - 'and', - 'alias', - 'agent' - ), - 3 => array( - 'Void', - 'True', - 'Result', - 'Precursor', - 'False', - 'Current' - ), - 4 => array( - 'UNIX_SIGNALS', - 'UNIX_FILE_INFO', - 'UNBOUNDED', - 'TWO_WAY_TREE_CURSOR', - 'TWO_WAY_TREE', - 'TWO_WAY_SORTED_SET', - 'TWO_WAY_LIST', - 'TWO_WAY_CURSOR_TREE', - 'TWO_WAY_CIRCULAR', - 'TWO_WAY_CHAIN_ITERATOR', - 'TUPLE', - 'TREE', - 'TRAVERSABLE', - 'TO_SPECIAL', - 'THREAD_CONTROL', - 'THREAD_ATTRIBUTES', - 'THREAD', - 'TABLE', - 'SUBSET', - 'STRING_HANDLER', - 'STRING', - 'STREAM', - 'STORABLE', - 'STD_FILES', - 'STACK', - 'SPECIAL', - 'SORTED_TWO_WAY_LIST', - 'SORTED_STRUCT', - 'SORTED_LIST', - 'SINGLE_MATH', - 'SET', - 'SEQUENCE', - 'SEQ_STRING', - 'SEMAPHORE', - 'ROUTINE', - 'RESIZABLE', - 'RECURSIVE_TREE_CURSOR', - 'RECURSIVE_CURSOR_TREE', - 'REAL_REF', - 'REAL', - 'RAW_FILE', - 'RANDOM', - 'QUEUE', - 'PROXY', - 'PROFILING_SETTING', - 'PROCEDURE', - 'PRIORITY_QUEUE', - 'PRIMES', - 'PRECOMP', - 'POINTER_REF', - 'POINTER', - 'PLATFORM', - 'PLAIN_TEXT_FILE', - 'PATH_NAME', - 'PART_SORTED_TWO_WAY_LIST', - 'PART_SORTED_SET', - 'PART_SORTED_LIST', - 'PART_COMPARABLE', - 'OPERATING_ENVIRONMENT', - 'ONCE_CONTROL', - 'OBJECT_OWNER', - 'OBJECT_CONTROL', - 'NUMERIC', - 'NONE', - 'MUTEX', - 'MULTI_ARRAY_LIST', - 'MULTAR_LIST_CURSOR', - 'MEMORY', - 'MEM_INFO', - 'MEM_CONST', - 'MATH_CONST', - 'LIST', - 'LINKED_TREE_CURSOR', - 'LINKED_TREE', - 'LINKED_STACK', - 'LINKED_SET', - 'LINKED_QUEUE', - 'LINKED_PRIORITY_QUEUE', - 'LINKED_LIST_CURSOR', - 'LINKED_LIST', - 'LINKED_CURSOR_TREE', - 'LINKED_CIRCULAR', - 'LINKABLE', - 'LINEAR_ITERATOR', - 'LINEAR', - 'ITERATOR', - 'IO_MEDIUM', - 'INTERNAL', - 'INTEGER_REF', - 'INTEGER_INTERVAL', - 'INTEGER', - 'INFINITE', - 'INDEXABLE', - 'IDENTIFIED_CONTROLLER', - 'IDENTIFIED', - 'HIERARCHICAL', - 'HEAP_PRIORITY_QUEUE', - 'HASHABLE', - 'HASH_TABLE_CURSOR', - 'HASH_TABLE', - 'GENERAL', - 'GC_INFO', - 'FUNCTION', - 'FORMAT_INTEGER', - 'FORMAT_DOUBLE', - 'FIXED_TREE', - 'FIXED_LIST', - 'FIXED', - 'FINITE', - 'FILE_NAME', - 'FILE', - 'FIBONACCI', - 'EXECUTION_ENVIRONMENT', - 'EXCEPTIONS', - 'EXCEP_CONST', - 'DYNAMIC_TREE', - 'DYNAMIC_LIST', - 'DYNAMIC_CIRCULAR', - 'DYNAMIC_CHAIN', - 'DOUBLE_REF', - 'DOUBLE_MATH', - 'DOUBLE', - 'DISPENSER', - 'DIRECTORY_NAME', - 'DIRECTORY', - 'DECLARATOR', - 'DEBUG_OUTPUT', - 'CURSOR_TREE_ITERATOR', - 'CURSOR_TREE', - 'CURSOR_STRUCTURE', - 'CURSOR', - 'COUNTABLE_SEQUENCE', - 'COUNTABLE', - 'CONTAINER', - 'CONSOLE', - 'CONDITION_VARIABLE', - 'COMPARABLE_STRUCT', - 'COMPARABLE_SET', - 'COMPARABLE', - 'COMPACT_TREE_CURSOR', - 'COMPACT_CURSOR_TREE', - 'COLLECTION', - 'CIRCULAR_CURSOR', - 'CIRCULAR', - 'CHARACTER_REF', - 'CHARACTER', - 'CHAIN', - 'CELL', - 'BOX', - 'BOUNDED_STACK', - 'BOUNDED_QUEUE', - 'BOUNDED', - 'BOOLEAN_REF', - 'BOOLEAN', - 'BOOL_STRING', - 'BIT_REF', - 'BINARY_TREE', - 'BINARY_SEARCH_TREE_SET', - 'BINARY_SEARCH_TREE', - 'BILINEAR', - 'BI_LINKABLE', - 'BASIC_ROUTINES', - 'BAG', - 'ASCII', - 'ARRAYED_TREE', - 'ARRAYED_STACK', - 'ARRAYED_QUEUE', - 'ARRAYED_LIST_CURSOR', - 'ARRAYED_LIST', - 'ARRAYED_CIRCULAR', - 'ARRAY2', - 'ARRAY', - 'ARGUMENTS', - 'ANY', - 'ACTIVE' - ), - 5 => array( - 'yes', - 'visible', - 'trace', - 'system', - 'root', - 'profile', - 'override_cluster', - 'object', - 'no', - 'multithreaded', - 'msil_generation_type', - 'line_generation', - 'library', - 'inlining_size', - 'inlining', - 'include_path', - 'il_verifiable', - 'exclude', - 'exception_trace', - 'dynamic_runtime', - 'dotnet_naming_convention', - 'disabled_debug', - 'default', - 'debug', - 'dead_code_removal', - 'console_application', - 'cluster', - 'cls_compliant', - 'check_vape', - 'assertion', - 'array_optimization', - 'all', - 'address_expression' - ), - ), - 'SYMBOLS' => array( - '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', '|', ':', - '(', ')', '{', '}', '[', ']', '#' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => true, - 5 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0600FF; font-weight: bold;', - 2 => 'color: #0600FF; font-weight: bold;', - 3 => 'color: #800080;', - 4 => 'color: #800000', - 5 => 'color: #603000;' - ), - 'COMMENTS' => array( - 1 => 'color: #008000; font-style: italic;', - 'MULTI' => '' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #005070; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #FF0000;' - ), - 'STRINGS' => array( - 0 => 'color: #0080A0;' - ), - 'NUMBERS' => array( - 0 => 'color: #FF0000;' - ), - 'METHODS' => array( - 1 => 'color: #000060;', - 2 => 'color: #000050;' - ), - 'SYMBOLS' => array( - 0 => 'color: #600000;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => 'http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fdocs.eiffel.com%2Feiffelstudio%2Flibraries+{FNAMEL}&btnI=I%27m+Feeling+Lucky', - 5 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/email.php b/_piecrust/libs/Geshi/geshi/email.php deleted file mode 100644 index 6becb1f..0000000 --- a/_piecrust/libs/Geshi/geshi/email.php +++ /dev/null @@ -1,210 +0,0 @@ - 'eMail (mbox)', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'HTTP', 'SMTP', 'ASMTP', 'ESMTP' - ), - 2 => array( - 'Authentication-Results','Content-Description','Content-Type', - 'Content-Disposition','Content-Transfer-Encoding','Delivered-To', - 'Dkim-Signature','Domainkey-Signature','In-Reply-To','Message-Id', - 'MIME-Version','OpenPGP','Received','Received-SPF','References', - 'Resend-From','Resend-To','Return-Path','User-Agent' - ), - 3 => array( - 'Date','From','Subject','To', - ), - 4 => array( - 'by', 'for', 'from', 'id', 'with' - ) - ), - 'SYMBOLS' => array( - ':', ';', '<', '>', '[', ']' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => false, - 3 => false, - 4 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000FF; font-weight: bold;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #800000; font-weight: bold;', - 4 => 'font-weight: bold;', - ), - 'COMMENTS' => array( - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'SCRIPT' => array( - 0 => 'color: #000040;', - ), - 'REGEXPS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #0000FF;', - 3 => 'color: #008000;', - 4 => 'color: #0000FF; font-weight: bold;', - 5 => 'font-weight: bold;', - 6 => 'color: #400080;' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - // Non-Standard-Header - 1 => array( - GESHI_SEARCH => "(?<=\A\x20|\n)x-[a-z0-9\-]*(?=\s*:|\s*<)", - GESHI_REPLACE => "\\0", - GESHI_MODIFIERS => "smi", - GESHI_BEFORE => "", - GESHI_AFTER => "" - ), - //Email-Adresses or Mail-IDs - 2 => array( - GESHI_SEARCH => "\b[\w\.\-]+@\w+(?:(?:\.\w+)*\.\w{2,4})?", - GESHI_REPLACE => "\\0", - GESHI_MODIFIERS => "mi", - GESHI_BEFORE => "", - GESHI_AFTER => "" - ), - //Date values in RFC format - 3 => array( - GESHI_SEARCH => "\b(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s+\d\d?\s+" . - "(?:Jan|Feb|Mar|apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+" . - "\d{4}\s+\d\d?:\d\d:\d\d\s+[+\-]\d{4}(?:\s+\(\w+\))?", - GESHI_REPLACE => "\\0", - GESHI_MODIFIERS => "mi", - GESHI_BEFORE => "", - GESHI_AFTER => "" - ), - //IP addresses - 4 => array( - GESHI_SEARCH => "(?<=\s)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?=\s)|". - "(?<=\[)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?=\])|". - "(?<==)\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(?=<)", - GESHI_REPLACE => "\\0", - GESHI_MODIFIERS => "i", - GESHI_BEFORE => "", - GESHI_AFTER => "" - ), - //Field-Assignments - 5 => array( - GESHI_SEARCH => "(?<=\s)[A-Z0-9\-\.]+(?==(?:$|\s$|[^\s=]))", - GESHI_REPLACE => "\\0", - GESHI_MODIFIERS => "mi", - GESHI_BEFORE => "", - GESHI_AFTER => "" - ), - //MIME type - 6 => array( - GESHI_SEARCH => "(?<=\s)(?:audio|application|image|multipart|text|". - "video|x-[a-z0-9\-]+)\/[a-z0-9][a-z0-9\-]*(?=\s|<|$)", - GESHI_REPLACE => "\\0", - GESHI_MODIFIERS => "m", - GESHI_BEFORE => "", - GESHI_AFTER => "" - ) - ), - 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, - 'SCRIPT_DELIMITERS' => array( - 0 => "/(?P^)[A-Z][a-zA-Z0-9\-]*\s*:\s*(?:.|(?=\n\s)\n)*(?P$)/m" - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 2 => array( - 'DISALLOWED_BEFORE' => '(?<=\A\x20|\n)', - 'DISALLOWED_AFTER' => '(?=\s*:)', - ), - 3 => array( - 'DISALLOWED_BEFORE' => '(?<=\A\x20|\n)', - 'DISALLOWED_AFTER' => '(?=\s*:)', - ), - 4 => array( - 'DISALLOWED_BEFORE' => '(?<=\s)', - 'DISALLOWED_AFTER' => '(?=\s|\b)', - ) - ), - 'ENABLE_FLAGS' => array( - 'BRACKETS' => GESHI_NEVER, - 'COMMENTS' => GESHI_NEVER, - 'NUMBERS' => GESHI_NEVER - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/erlang.php b/_piecrust/libs/Geshi/geshi/erlang.php deleted file mode 100644 index 1d4bccf..0000000 --- a/_piecrust/libs/Geshi/geshi/erlang.php +++ /dev/null @@ -1,441 +0,0 @@ -' - * - ************************************************************************************* - * - * This file is part of GeSHi. - * - * GeSHi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GeSHi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeSHi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - ************************************************************************************/ - -$language_data = array( - 'LANG_NAME' => 'Erlang', - 'COMMENT_SINGLE' => array(1 => '%'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'HARDQUOTE' => array("'", "'"), - 'HARDESCAPE' => array("'", "\\"), - 'HARDCHAR' => "\\", - 'ESCAPE_CHAR' => '\\', - 'NUMBERS' => GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - //Control flow keywrods - 1 => array( - 'after', 'andalso', 'begin', 'case', 'catch', 'end', 'fun', 'if', - 'of', 'orelse', 'receive', 'try', 'when', 'query' - ), - //Binary operators - 2 => array( - 'and', 'band', 'bnot', 'bor', 'bsl', 'bsr', 'bxor', 'div', 'not', - 'or', 'rem', 'xor' - ), - 3 => array( - 'abs', 'alive', 'apply', 'atom_to_list', 'binary_to_list', - 'binary_to_term', 'concat_binary', 'date', 'disconnect_node', - 'element', 'erase', 'exit', 'float', 'float_to_list', 'get', - 'get_keys', 'group_leader', 'halt', 'hd', 'integer_to_list', - 'is_alive', 'length', 'link', 'list_to_atom', 'list_to_binary', - 'list_to_float', 'list_to_integer', 'list_to_pid', 'list_to_tuple', - 'load_module', 'make_ref', 'monitor_node', 'node', 'nodes', 'now', - 'open_port', 'pid_to_list', 'process_flag', 'process_info', - 'process', 'put', 'register', 'registered', 'round', 'self', - 'setelement', 'size', 'spawn', 'spawn_link', 'split_binary', - 'statistics', 'term_to_binary', 'throw', 'time', 'tl', 'trunc', - 'tuple_to_list', 'unlink', 'unregister', 'whereis' - ), - // Built-In Functions - 4 => array( - 'atom', 'binary', 'constant', 'function', 'integer', 'is_atom', - 'is_binary', 'is_constant', 'is_function', 'is_integer', 'is_list', - 'is_number', 'is_pid', 'is_reference', 'is_record', 'list', - 'number', 'pid', 'ports', 'port_close', 'port_info', 'reference' - ), - // Erlang/OTP internal modules (scary one) - 5 => array( - 'alarm_handler', 'any', 'app', 'application', 'appmon', 'appup', - 'array', 'asn1ct', 'asn1rt', 'auth', 'base64', 'beam_lib', 'c', - 'calendar', 'code', 'common_test_app', 'compile', 'config', - 'corba', 'corba_object', 'cosEventApp', 'CosEventChannelAdmin', - 'CosEventChannelAdmin_ConsumerAdmin', - 'CosEventChannelAdmin_EventChannel', - 'CosEventChannelAdmin_ProxyPullConsumer', - 'CosEventChannelAdmin_ProxyPullSupplier', - 'CosEventChannelAdmin_ProxyPushConsumer', - 'CosEventChannelAdmin_ProxyPushSupplier', - 'CosEventChannelAdmin_SupplierAdmin', 'CosEventDomainAdmin', - 'CosEventDomainAdmin_EventDomain', - 'CosEventDomainAdmin_EventDomainFactory', - 'cosEventDomainApp', 'CosFileTransfer_Directory', - 'CosFileTransfer_File', 'CosFileTransfer_FileIterator', - 'CosFileTransfer_FileTransferSession', - 'CosFileTransfer_VirtualFileSystem', - 'cosFileTransferApp', 'CosNaming', 'CosNaming_BindingIterator', - 'CosNaming_NamingContext', 'CosNaming_NamingContextExt', - 'CosNotification', 'CosNotification_AdminPropertiesAdmin', - 'CosNotification_QoSAdmin', 'cosNotificationApp', - 'CosNotifyChannelAdmin_ConsumerAdmin', - 'CosNotifyChannelAdmin_EventChannel', - 'CosNotifyChannelAdmin_EventChannelFactory', - 'CosNotifyChannelAdmin_ProxyConsumer', - 'CosNotifyChannelAdmin_ProxyPullConsumer', - 'CosNotifyChannelAdmin_ProxyPullSupplier', - 'CosNotifyChannelAdmin_ProxyPushConsumer', - 'CosNotifyChannelAdmin_ProxyPushSupplier', - 'CosNotifyChannelAdmin_ProxySupplier', - 'CosNotifyChannelAdmin_SequenceProxyPullConsumer', - 'CosNotifyChannelAdmin_SequenceProxyPullSupplier', - 'CosNotifyChannelAdmin_SequenceProxyPushConsumer', - 'CosNotifyChannelAdmin_SequenceProxyPushSupplier', - 'CosNotifyChannelAdmin_StructuredProxyPullConsumer', - 'CosNotifyChannelAdmin_StructuredProxyPullSupplier', - 'CosNotifyChannelAdmin_StructuredProxyPushConsumer', - 'CosNotifyChannelAdmin_StructuredProxyPushSupplier', - 'CosNotifyChannelAdmin_SupplierAdmin', - 'CosNotifyComm_NotifyPublish', 'CosNotifyComm_NotifySubscribe', - 'CosNotifyFilter_Filter', 'CosNotifyFilter_FilterAdmin', - 'CosNotifyFilter_FilterFactory', 'CosNotifyFilter_MappingFilter', - 'cosProperty', 'CosPropertyService_PropertiesIterator', - 'CosPropertyService_PropertyNamesIterator', - 'CosPropertyService_PropertySet', - 'CosPropertyService_PropertySetDef', - 'CosPropertyService_PropertySetDefFactory', - 'CosPropertyService_PropertySetFactory', 'cosTime', - 'CosTime_TimeService', 'CosTime_TIO', 'CosTime_UTO', - 'CosTimerEvent_TimerEventHandler', - 'CosTimerEvent_TimerEventService', 'cosTransactions', - 'CosTransactions_Control', 'CosTransactions_Coordinator', - 'CosTransactions_RecoveryCoordinator', 'CosTransactions_Resource', - 'CosTransactions_SubtransactionAwareResource', - 'CosTransactions_Terminator', 'CosTransactions_TransactionFactory', - 'cover', 'cprof', 'cpu_sup', 'crashdump', 'crypto', 'crypto_app', - 'ct', 'ct_cover', 'ct_ftp', 'ct_master', 'ct_rpc', 'ct_snmp', - 'ct_ssh', 'ct_telnet', 'dbg', 'debugger', 'dets', 'dialyzer', - 'dict', 'digraph', 'digraph_utils', 'disk_log', 'disksup', - 'docb_gen', 'docb_transform', 'docb_xml_check', 'docbuilder_app', - 'driver_entry', 'edoc', 'edoc_doclet', 'edoc_extract', - 'edoc_layout', 'edoc_lib', 'edoc_run', 'egd', 'ei', 'ei_connect', - 'epmd', 'epp', 'epp_dodger', 'eprof', 'erl', 'erl_boot_server', - 'erl_call', 'erl_comment_scan', 'erl_connect', 'erl_ddll', - 'erl_driver', 'erl_error', 'erl_eterm', 'erl_eval', - 'erl_expand_records', 'erl_format', 'erl_global', 'erl_id_trans', - 'erl_internal', 'erl_lint', 'erl_malloc', 'erl_marshal', - 'erl_parse', 'erl_pp', 'erl_prettypr', 'erl_prim_loader', - 'erl_prim_loader_stub', 'erl_recomment', 'erl_scan', - 'erl_set_memory_block', 'erl_syntax', 'erl_syntax_lib', 'erl_tar', - 'erl_tidy', 'erlang', 'erlang_mode', 'erlang_stub', 'erlc', - 'erlsrv', 'error_handler', 'error_logger', 'erts_alloc', - 'erts_alloc_config', 'escript', 'et', 'et_collector', - 'et_selector', 'et_viewer', 'etop', 'ets', 'eunit', 'file', - 'file_sorter', 'filelib', 'filename', 'fixed', 'fprof', 'ftp', - 'gb_sets', 'gb_trees', 'gen_event', 'gen_fsm', 'gen_sctp', - 'gen_server', 'gen_tcp', 'gen_udp', 'gl', 'global', 'global_group', - 'glu', 'gs', 'heart', 'http', 'httpd', 'httpd_conf', - 'httpd_socket', 'httpd_util', 'i', 'ic', 'ic_c_protocol', - 'ic_clib', 'igor', 'inet', 'inets', 'init', 'init_stub', - 'instrument', 'int', 'interceptors', 'inviso', 'inviso_as_lib', - 'inviso_lfm', 'inviso_lfm_tpfreader', 'inviso_rt', - 'inviso_rt_meta', 'io', 'io_lib', 'kernel_app', 'lib', 'lists', - 'lname', 'lname_component', 'log_mf_h', 'make', 'math', 'megaco', - 'megaco_codec_meas', 'megaco_codec_transform', - 'megaco_edist_compress', 'megaco_encoder', 'megaco_flex_scanner', - 'megaco_tcp', 'megaco_transport', 'megaco_udp', 'megaco_user', - 'memsup', 'mnesia', 'mnesia_frag_hash', 'mnesia_registry', - 'mod_alias', 'mod_auth', 'mod_esi', 'mod_security', - 'Module_Interface', 'ms_transform', 'net_adm', 'net_kernel', - 'new_ssl', 'nteventlog', 'observer_app', 'odbc', 'orber', - 'orber_acl', 'orber_diagnostics', 'orber_ifr', 'orber_tc', - 'orddict', 'ordsets', 'os', 'os_mon', 'os_mon_mib', 'os_sup', - 'otp_mib', 'overload', 'packages', 'percept', 'percept_profile', - 'pg', 'pg2', 'pman', 'pool', 'prettypr', 'proc_lib', 'proplists', - 'public_key', 'qlc', 'queue', 'random', 'rb', 're', 'regexp', - 'registry', 'rel', 'release_handler', 'reltool', 'relup', 'rpc', - 'run_erl', 'run_test', 'runtime_tools_app', 'sasl_app', 'script', - 'seq_trace', 'sets', 'shell', 'shell_default', 'slave', 'snmp', - 'snmp_app', 'snmp_community_mib', 'snmp_framework_mib', - 'snmp_generic', 'snmp_index', 'snmp_notification_mib', 'snmp_pdus', - 'snmp_standard_mib', 'snmp_target_mib', 'snmp_user_based_sm_mib', - 'snmp_view_based_acm_mib', 'snmpa', 'snmpa_conf', 'snmpa_error', - 'snmpa_error_io', 'snmpa_error_logger', 'snmpa_error_report', - 'snmpa_local_db', 'snmpa_mpd', 'snmpa_network_interface', - 'snmpa_network_interface_filter', - 'snmpa_notification_delivery_info_receiver', - 'snmpa_notification_filter', 'snmpa_supervisor', 'snmpc', 'snmpm', - 'snmpm_conf', 'snmpm_mpd', 'snmpm_network_interface', 'snmpm_user', - 'sofs', 'ssh', 'ssh_channel', 'ssh_connection', 'ssh_sftp', - 'ssh_sftpd', 'ssl', 'ssl_app', 'ssl_pkix', 'start', 'start_erl', - 'start_webtool', 'stdlib_app', 'string', 'supervisor', - 'supervisor_bridge', 'sys', 'systools', 'tags', 'test_server', - 'test_server_app', 'test_server_ctrl', 'tftp', 'timer', 'toolbar', - 'ttb', 'tv', 'unicode', 'unix_telnet', 'user', 'webtool', 'werl', - 'win32reg', 'wrap_log_reader', 'wx', 'wx_misc', 'wx_object', - 'wxAcceleratorEntry', 'wxAcceleratorTable', 'wxArtProvider', - 'wxAuiDockArt', 'wxAuiManager', 'wxAuiNotebook', 'wxAuiPaneInfo', - 'wxAuiTabArt', 'wxBitmap', 'wxBitmapButton', 'wxBitmapDataObject', - 'wxBoxSizer', 'wxBrush', 'wxBufferedDC', 'wxBufferedPaintDC', - 'wxButton', 'wxCalendarCtrl', 'wxCalendarDateAttr', - 'wxCalendarEvent', 'wxCaret', 'wxCheckBox', 'wxCheckListBox', - 'wxChildFocusEvent', 'wxChoice', 'wxClientDC', 'wxClipboard', - 'wxCloseEvent', 'wxColourData', 'wxColourDialog', - 'wxColourPickerCtrl', 'wxColourPickerEvent', 'wxComboBox', - 'wxCommandEvent', 'wxContextMenuEvent', 'wxControl', - 'wxControlWithItems', 'wxCursor', 'wxDataObject', 'wxDateEvent', - 'wxDatePickerCtrl', 'wxDC', 'wxDialog', 'wxDirDialog', - 'wxDirPickerCtrl', 'wxDisplayChangedEvent', 'wxEraseEvent', - 'wxEvent', 'wxEvtHandler', 'wxFileDataObject', 'wxFileDialog', - 'wxFileDirPickerEvent', 'wxFilePickerCtrl', 'wxFindReplaceData', - 'wxFindReplaceDialog', 'wxFlexGridSizer', 'wxFocusEvent', 'wxFont', - 'wxFontData', 'wxFontDialog', 'wxFontPickerCtrl', - 'wxFontPickerEvent', 'wxFrame', 'wxGauge', 'wxGBSizerItem', - 'wxGenericDirCtrl', 'wxGLCanvas', 'wxGraphicsBrush', - 'wxGraphicsContext', 'wxGraphicsFont', 'wxGraphicsMatrix', - 'wxGraphicsObject', 'wxGraphicsPath', 'wxGraphicsPen', - 'wxGraphicsRenderer', 'wxGrid', 'wxGridBagSizer', 'wxGridCellAttr', - 'wxGridCellEditor', 'wxGridCellRenderer', 'wxGridEvent', - 'wxGridSizer', 'wxHelpEvent', 'wxHtmlEasyPrinting', 'wxIcon', - 'wxIconBundle', 'wxIconizeEvent', 'wxIdleEvent', 'wxImage', - 'wxImageList', 'wxJoystickEvent', 'wxKeyEvent', - 'wxLayoutAlgorithm', 'wxListBox', 'wxListCtrl', 'wxListEvent', - 'wxListItem', 'wxListView', 'wxMask', 'wxMaximizeEvent', - 'wxMDIChildFrame', 'wxMDIClientWindow', 'wxMDIParentFrame', - 'wxMemoryDC', 'wxMenu', 'wxMenuBar', 'wxMenuEvent', 'wxMenuItem', - 'wxMessageDialog', 'wxMiniFrame', 'wxMirrorDC', - 'wxMouseCaptureChangedEvent', 'wxMouseEvent', 'wxMoveEvent', - 'wxMultiChoiceDialog', 'wxNavigationKeyEvent', 'wxNcPaintEvent', - 'wxNotebook', 'wxNotebookEvent', 'wxNotifyEvent', - 'wxPageSetupDialog', 'wxPageSetupDialogData', 'wxPaintDC', - 'wxPaintEvent', 'wxPalette', 'wxPaletteChangedEvent', 'wxPanel', - 'wxPasswordEntryDialog', 'wxPen', 'wxPickerBase', 'wxPostScriptDC', - 'wxPreviewCanvas', 'wxPreviewControlBar', 'wxPreviewFrame', - 'wxPrintData', 'wxPrintDialog', 'wxPrintDialogData', 'wxPrinter', - 'wxPrintout', 'wxPrintPreview', 'wxProgressDialog', - 'wxQueryNewPaletteEvent', 'wxRadioBox', 'wxRadioButton', - 'wxRegion', 'wxSashEvent', 'wxSashLayoutWindow', 'wxSashWindow', - 'wxScreenDC', 'wxScrollBar', 'wxScrolledWindow', 'wxScrollEvent', - 'wxScrollWinEvent', 'wxSetCursorEvent', 'wxShowEvent', - 'wxSingleChoiceDialog', 'wxSizeEvent', 'wxSizer', 'wxSizerFlags', - 'wxSizerItem', 'wxSlider', 'wxSpinButton', 'wxSpinCtrl', - 'wxSpinEvent', 'wxSplashScreen', 'wxSplitterEvent', - 'wxSplitterWindow', 'wxStaticBitmap', 'wxStaticBox', - 'wxStaticBoxSizer', 'wxStaticLine', 'wxStaticText', 'wxStatusBar', - 'wxStdDialogButtonSizer', 'wxStyledTextCtrl', 'wxStyledTextEvent', - 'wxSysColourChangedEvent', 'wxTextAttr', 'wxTextCtrl', - 'wxTextDataObject', 'wxTextEntryDialog', 'wxToggleButton', - 'wxToolBar', 'wxToolTip', 'wxTopLevelWindow', 'wxTreeCtrl', - 'wxTreeEvent', 'wxUpdateUIEvent', 'wxWindow', 'wxWindowCreateEvent', - 'wxWindowDC', 'wxWindowDestroyEvent', 'wxXmlResource', 'xmerl', - 'xmerl_eventp', 'xmerl_scan', 'xmerl_xpath', 'xmerl_xs', - 'xmerl_xsd', 'xref', 'yecc', 'zip', 'zlib', 'zlib_stub' - ), - // Binary modifiers - 6 => array( - 'big', 'binary', 'float', 'integer', 'little', 'signed', 'unit', 'unsigned' - ) - ), - 'SYMBOLS' => array( - 0 => array('(', ')', '[', ']', '{', '}'), - 1 => array('->', ',', ';', '.'), - 2 => array('<<', '>>'), - 3 => array('=', '||', '-', '+', '*', '/', '++', '--', '!', '<', '>', '>=', - '=<', '==', '/=', '=:=', '=/=') - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #186895;', - 2 => 'color: #014ea4;', - 3 => 'color: #fa6fff;', - 4 => 'color: #fa6fff;', - 5 => 'color: #ff4e18;', - 6 => 'color: #9d4f37;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 'HARD' => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #109ab8;' - ), - 'STRINGS' => array( - 0 => 'color: #ff7800;' - ), - 'NUMBERS' => array( - 0 => 'color: #ff9600;' - ), - 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #004866;', - 1 => 'color: #6bb810;', - 2 => 'color: #ee3800;', - 3 => 'color: #014ea4;' - ), - 'REGEXPS' => array( - 0 => 'color: #6941fd;', - 1 => 'color: #d400ed;', - 2 => 'color: #5400b3;', - 3 => 'color: #ff3c00;', - 4 => 'color: #6941fd;', - 5 => 'color: #45b3e6;', - 6 => 'color: #ff9600;', - 7 => 'color: #d400ed;', - 8 => 'color: #ff9600;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => 'http://erlang.org/doc/man/{FNAME}.html', - 6 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '->', - 2 => ':' - ), - 'REGEXPS' => array( - //Macro definitions - 0 => array( - GESHI_SEARCH => '(-define\s*\()([a-zA-Z0-9_]+)(\(|,)', - GESHI_REPLACE => '\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\1', - GESHI_AFTER => '\3' - ), - // Record definitions - 1 => array( - GESHI_SEARCH => '(-record\s*\()([a-zA-Z0-9_]+)(,)', - GESHI_REPLACE => '\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\1', - GESHI_AFTER => '\3' - ), - // Precompiler directives - 2 => array( - GESHI_SEARCH => '(-)([a-z][a-zA-Z0-9_]*)(\()', - GESHI_REPLACE => '\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\1', - GESHI_AFTER => '\3' - ), - // Functions - 3 => array( - GESHI_SEARCH => '([a-z]\w*|\'\w*\')(\s*\()', - GESHI_REPLACE => '\1', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '\2' - ), - // Macros - 4 => array( - GESHI_SEARCH => '(\?)([a-zA-Z0-9_]+)', - GESHI_REPLACE => '\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\1', - GESHI_AFTER => '' - ), - // Variables - With hack to avoid interfering wish GeSHi internals - 5 => array( - GESHI_SEARCH => '([([{,<+*-\/=\s!]|<)(?!(?:PIPE|SEMI|DOT|NUM|REG3XP\d*)\W)([A-Z_]\w*)(?!\w)', - GESHI_REPLACE => '\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\1', - GESHI_AFTER => '' - ), - // ASCIIcodes - 6 => '(\$[a-zA-Z0-9_])', - // Records - 7 => array( - GESHI_SEARCH => '(#)([a-z][a-zA-Z0-9_]*)(\.|\{)', - GESHI_REPLACE => '\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\1', - GESHI_AFTER => '\3' - ), - // Numbers with a different radix - 8 => '(?<=>)(#[a-zA-Z0-9]*)' - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 3 => array( - 'DISALLOWED_BEFORE' => '', - 'DISALLOWED_AFTER' => '(?=\s*\()' - ), - 5 => array( - 'DISALLOWED_BEFORE' => '(?<=\'|)', - 'DISALLOWED_AFTER' => '(?=(\'|):)' - ), - 6 => array( - 'DISALLOWED_BEFORE' => '(?<=\/|-)', - 'DISALLOWED_AFTER' => '' - ) - ) - ), -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/f1.php b/_piecrust/libs/Geshi/geshi/f1.php deleted file mode 100644 index dd3a812..0000000 --- a/_piecrust/libs/Geshi/geshi/f1.php +++ /dev/null @@ -1,151 +0,0 @@ - 'Formula One', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('{' => '}'), - 'COMMENT_REGEXP' => array( - //Nested Comments - 2 => "/(\{(?:\{.*\}|[^\{])*\})/m" - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'",'"'), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array( - //Simple Single Char Escapes - 1 => "#\\\\[\\\\nrt\'\"?\n]#i", - //Hexadecimal Char Specs (Utf16 codes, Unicode versions only) - 2 => "#\\\\u[\da-fA-F]{4}#", - ), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_INT_CSTYLE | - GESHI_NUMBER_BIN_PREFIX_0B | - GESHI_NUMBER_OCT_PREFIX_0O | - GESHI_NUMBER_HEX_PREFIX | - GESHI_NUMBER_FLT_NONSCI | - GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - 1 => array( - 'pred','proc','subr','else','elsif','iff','if','then','false','true', - 'case','of','use','local','mod','end','list','file','all','one','max','min','rel', - 'external','Nil','_stdcall','_cdecl','_addressof','_pred','_file','_line' - ), - 2 => array( - 'Ascii','Bin','I','L','P','R','S','U' - ), - 3 => array( - 'Append','in','Dupl','Len','Print','_AllDifferent','_AllAscending', - '_AllDescending','_Ascending','_Descending' - ) - ), - 'SYMBOLS' => array( - 0 => array('(', ')', '[', ']'), - 1 => array('<', '>','='), - 2 => array('+', '-', '*', '/'), - 3 => array('&', '|'), - 4 => array(':', ';') - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000ff;', - 2 => 'color: #000080;', - 3 => 'color: #000080;', - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'COMMENTS' => array( - 1 => 'color: #008000; font-style: italic;', - 2 => 'color: #008000; font-style: italic;', - 'MULTI' => 'color: #008000; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 1 => 'color: #000099; font-weight: bold;', - 2 => 'color: #009999; font-weight: bold;', - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #800000;' - ), - 'METHODS' => array( - 1 => 'color: #202020;' - ), - 'SYMBOLS' => array( - 0 => 'color: #000000;', - 1 => 'color: #000000;', - 2 => 'color: #000000;', - 3 => 'color: #000000;', - 4 => 'color: #000000;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://www.f1compiler.com/f1helponline/f1_runtime_library.html#{FNAME}' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/fo.php b/_piecrust/libs/Geshi/geshi/fo.php deleted file mode 100644 index 9e08b9c..0000000 --- a/_piecrust/libs/Geshi/geshi/fo.php +++ /dev/null @@ -1,327 +0,0 @@ - 'FO (abas-ERP)', - 'COMMENT_SINGLE' => array(1 => '..'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - //Control Flow - 1 => array( - /* see http://www.abas.de/sub_de/kunden/help/hd/html/9.html */ - - /* fo keywords, part 1: control flow */ - '.weiter', '.continue' - - /* this language works with goto's only*/ - ), - - //FO Keywords - 2 => array( - /* fo keywords, part 2 */ - '.fo', '.formel', '.formula', - '.zuweisen', '.assign', - '.fehler', '.error', - '.ende', '.end' - ), - - //Java Keywords - 3 => array( - /* Java keywords, part 3: primitive data types */ - '.art', '.type', - 'integer', 'real', 'bool', 'text', 'datum', 'woche', 'termin', 'zeit', - 'mehr', 'MEHR' - ), - - //Reserved words in fo literals - 4 => array( - /* other reserved words in fo literals */ - /* should be styled to look similar to numbers and Strings */ - 'false', 'null', 'true', - 'OBJEKT', - 'VORGANG', 'PROCESS', - 'OFFEN', 'OPEN', - 'ABORT', - 'AN', 'ADDEDTO', - 'AUF', 'NEW', - 'BILDSCHIRM', 'TERMINAL', - 'PC', - 'MASKE', 'SCREEN', - 'ZEILE', 'LINE' - ), - - // interpreter settings - 5 => array ( - '..!INTERPRETER', 'DEBUG' - ), - - // database commands - 6 => array ( - '.hole', '.hol', '.select', - '.lade', '.load', - '.aktion', '.action', - '.belegen', '.occupy', - '.bringe', '.rewrite', - '.dazu', '.add', - '.löschen', '.delete', - '.mache', '.make', - '.merke', '.reserve', - '.setze', '.set', - 'SPERREN', 'LOCK', - 'TEIL', 'PART', - 'KEINESPERRE', - 'AMASKE', 'ASCREEN', - 'BETRIEB', 'WORK-ORDER', - 'NUMERISCH', 'NUMERICAL', - 'VORSCHLAG', 'SUGGESTION', - 'OBLIGO', 'OUTSTANDING', - 'LISTE', 'LIST', - 'DRUCK', 'PRINT', - 'ÜBERNAHME', 'TAGEOVER', - 'ABLAGE', 'FILINGSYSTEM', - 'BDE', 'PDC', - 'BINDUNG', 'ALLOCATION', - 'BUCHUNG', 'ENTRY', - 'COLLI', 'SERIAL', - 'DATEI', 'FILE', - 'VERKAUF', 'SALES', - 'EINKAUF', 'PURCHASING', - 'EXEMPLAR', 'EXAMPLE', - 'FERTIGUNG', 'PRODUCTION', - 'FIFO', - 'GRUPPE', 'GROUP', - 'JAHR', 'YEAR', - 'JOURNAL', - 'KOPF', 'HEADER', - 'KOSTEN', - 'LIFO', - 'LMENGE', 'SQUANTITY', - 'LOHNFERTIGUNG', 'SUBCONTRACTING', - 'LPLATZ', 'LOCATION', - 'MBELEGUNG', 'MACHLOADING', - 'MONAT', 'MONTH', 'MZ', - 'NACHRICHT', 'MESSAGE', - 'PLAN', 'TARGET', - 'REGIONEN', 'REGIONS', - 'SERVICEANFRAGE', 'SERVICEREQUEST', - 'VERWENDUNG', 'APPLICATION', - 'WEITER', 'CONTINUE', - 'ABBRUCH', 'CANCEL', - 'ABLAGEKENNZEICHEN', 'FILLINGCODE', - 'ALLEIN', 'SINGLEUSER', - 'AUFZAEHLTYP', 'ENUMERATION-TYPE', - 'AUSGABE', 'OUTPUT', - 'DEZPUNKT', 'DECPOINT' - ), - - // output settings - 7 => array ( - '.absatz', '.para', - '.blocksatz', '.justified', - '.flattersatz', '.unjustified', - '.format', - '.box', - '.drucken', '.print', - '.gedruckt', '.printed', - '.länge', '.length', - '.links', '.left', - '.rechts', '.right', - '.oben', '.up', - '.unten', '.down', - '.seite', '.page', - '.tabellensatz', '.tablerecord', - '.trenner', '.separator', - 'ARCHIV' - ), - - // text commands - 8 => array ( - '.text', - '.atext', - '.println', - '.uebersetzen', '.translate' - ), - - // I/O commands - 9 => array ( - '.aus', '.ausgabe', '.output', - '.ein', '.eingabe', '.input', - '.datei', '.file', - '.lesen', '.read', - '.sortiere', '.sort', - '-ÖFFNEN', '-OPEN', - '-TEST', - '-LESEN', '-READ', - 'VON', 'FROM' - ), - - //system - 10 => array ( - '.browser', - '.kommando', '.command', - '.system', '.dde', - '.editiere', '.edit', - '.hilfe', '.help', - '.kopieren', '.copy', - '.pc.clip', - '.pc.copy', - '.pc.dll', - '.pc.exec', - '.pc.open', - 'DIAGNOSE', 'ERRORREPORT', - 'DOPPELPUNKT', 'COLON', - 'ERSETZUNG', 'REPLACEMENT', - 'WARTEN', 'PARALLEL' - ), - - //fibu/accounting specific commands - 11 => array ( - '.budget', - '.chart', - 'VKZ', - 'KONTO', 'ACCOUNT', - 'AUSZUG', 'STATEMENT', - 'WAEHRUNG', 'CURRENCY', - 'WAEHRUNGSKURS', 'EXCHANGERATE', - 'AUSWAEHR', 'FORCURR', - 'BUCHUNGSKREIS', 'SET OF BOOKS' - ), - - // efop - extended flexible surface - 12 => array ( - '.cursor', - '.farbe', '.colour', - '.fenster', '.window', - '.hinweis', '.note', - '.menue', '.menu', - '.schutz', '.protection', - '.zeigen', '.view', - '.zeile', '.line', - 'VORDERGRUND', 'FOREGROUND', - 'HINTERGRUND', 'BACKGROUND', - 'SOFORT', 'IMMEDIATELY', - 'AKTUALISIEREN', 'UPDATE', - 'FENSTERSCHLIESSEN', 'CLOSEWINDOWS' - ), - ), - 'SYMBOLS' => array( - 0 => array('(', ')', '[', ']', '{', '}', '*', '&', '%', ';', '<', '>'), - 1 => array('?', '!') - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - /* all fo keywords are case sensitive, don't have to but I like this type of coding */ - 1 => true, 2 => true, 3 => true, 4 => true, - 5 => true, 6 => true, 7 => true, 8 => true, 9 => true, - 10 => true, 11 => true, 12 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #006600; font-weight: bold;', - 4 => 'color: #006600; font-weight: bold;', - 5 => 'color: #003399; font-weight: bold;', - 6 => 'color: #003399; font-weight: bold;', - 7 => 'color: #003399; font-weight: bold;', - 8 => 'color: #003399; font-weight: bold;', - 9 => 'color: #003399; font-weight: bold;', - 10 => 'color: #003399; font-weight: bold;', - 11 => 'color: #003399; font-weight: bold;', - 12 => 'color: #003399; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - //2 => 'color: #006699;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006633;', - 2 => 'color: #006633;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;', - 1 => 'color: #000000; font-weight: bold;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '', - 8 => '', - 9 => '', - 10 => '', - 11 => '', - 12 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/fortran.php b/_piecrust/libs/Geshi/geshi/fortran.php deleted file mode 100644 index d8b104a..0000000 --- a/_piecrust/libs/Geshi/geshi/fortran.php +++ /dev/null @@ -1,160 +0,0 @@ -'Fortran', - 'COMMENT_SINGLE'=> array(1 =>'!',2=>'Cf2py'), - 'COMMENT_MULTI'=> array(), - //Fortran Comments - 'COMMENT_REGEXP' => array(1 => '/^C.*?$/mi'), - 'CASE_KEYWORDS'=> GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS'=> array("'",'"'), - 'ESCAPE_CHAR'=>'\\', - 'KEYWORDS'=> array( - 1 => array( - 'allocate','block','call','case','contains','continue','cycle','deallocate', - 'default','do','else','elseif','elsewhere','end','enddo','endif','endwhere', - 'entry','exit','function','go','goto','if','interface','module','nullify','only', - 'operator','procedure','program','recursive','return','select','stop', - 'subroutine','then','to','where','while', - 'access','action','advance','blank','blocksize','carriagecontrol', - 'delim','direct','eor','err','exist','file','flen','fmt','form','formatted', - 'iostat','name','named','nextrec','nml','number','opened','pad','position', - 'readwrite','recl','sequential','status','unformatted','unit' - ), - 2 => array( - '.AND.','.EQ.','.EQV.','.GE.','.GT.','.LE.','.LT.','.NE.','.NEQV.','.NOT.', - '.OR.','.TRUE.','.FALSE.' - ), - 3 => array( - 'allocatable','character','common','complex','data','dimension','double', - 'equivalence','external','implicit','in','inout','integer','intent','intrinsic', - 'kind','logical','namelist','none','optional','out','parameter','pointer', - 'private','public','real','result','save','sequence','target','type','use' - ), - 4 => array( - 'abs','achar','acos','adjustl','adjustr','aimag','aint','all','allocated', - 'anint','any','asin','atan','atan2','bit_size','break','btest','carg', - 'ceiling','char','cmplx','conjg','cos','cosh','cpu_time','count','cshift', - 'date_and_time','dble','digits','dim','dot_product','dprod dvchk', - 'eoshift','epsilon','error','exp','exponent','floor','flush','fraction', - 'getcl','huge','iachar','iand','ibclr','ibits','ibset','ichar','ieor','index', - 'int','intrup','invalop','ior','iostat_msg','ishft','ishftc','lbound', - 'len','len_trim','lge','lgt','lle','llt','log','log10','matmul','max','maxexponent', - 'maxloc','maxval','merge','min','minexponent','minloc','minval','mod','modulo', - 'mvbits','nbreak','ndperr','ndpexc','nearest','nint','not','offset','ovefl', - 'pack','precfill','precision','present','product','prompt','radix', - 'random_number','random_seed','range','repeat','reshape','rrspacing', - 'scale','scan','segment','selected_int_kind','selected_real_kind', - 'set_exponent','shape','sign','sin','sinh','size','spacing','spread','sqrt', - 'sum system','system_clock','tan','tanh','timer','tiny','transfer','transpose', - 'trim','ubound','undfl','unpack','val','verify' - ), - ), - 'SYMBOLS'=> array( - '(',')','{','}','[',']','=','+','-','*','/','!','%','^','&',':' - ), - 'CASE_SENSITIVE'=> array( - GESHI_COMMENTS => true, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - ), - 'STYLES'=> array( - 'KEYWORDS'=> array( - 1 =>'color: #b1b100;', - 2 =>'color: #000000; font-weight: bold;', - 3 =>'color: #000066;', - 4 =>'color: #993333;' - ), - 'COMMENTS'=> array( - 1 =>'color: #666666; font-style: italic;', - 2 =>'color: #339933;', - 'MULTI'=>'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR'=> array( - 0 =>'color: #000099; font-weight: bold;' - ), - 'BRACKETS'=> array( - 0 =>'color: #009900;' - ), - 'STRINGS'=> array( - 0 =>'color: #ff0000;' - ), - 'NUMBERS'=> array( - 0 =>'color: #cc66cc;' - ), - 'METHODS'=> array( - 1 =>'color: #202020;', - 2 =>'color: #202020;' - ), - 'SYMBOLS'=> array( - 0 =>'color: #339933;' - ), - 'REGEXPS'=> array( - ), - 'SCRIPT'=> array( - ) - ), - 'URLS'=> array( - 1 =>'', - 2 =>'', - 3 =>'', - 4 =>'' - ), - 'OOLANG'=> true, - 'OBJECT_SPLITTERS'=> array( - 1 =>'.', - 2 =>'::' - ), - 'REGEXPS'=> array( - ), - 'STRICT_MODE_APPLIES'=> GESHI_NEVER, - 'SCRIPT_DELIMITERS'=> array( - ), - 'HIGHLIGHT_STRICT_BLOCK'=> array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/freebasic.php b/_piecrust/libs/Geshi/geshi/freebasic.php deleted file mode 100644 index 77f75b5..0000000 --- a/_piecrust/libs/Geshi/geshi/freebasic.php +++ /dev/null @@ -1,141 +0,0 @@ - 'FreeBasic', - 'COMMENT_SINGLE' => array(1 => "'", 2 => '#'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - "append", "as", "asc", "asin", "asm", "atan2", "atn", "beep", "bin", "binary", "bit", - "bitreset", "bitset", "bload", "bsave", "byref", "byte", "byval", "call", - "callocate", "case", "cbyte", "cdbl", "cdecl", "chain", "chdir", "chr", "cint", - "circle", "clear", "clng", "clngint", "close", "cls", "color", "command", - "common", "cons", "const", "continue", "cos", "cshort", "csign", "csng", - "csrlin", "cubyte", "cuint", "culngint", "cunsg", "curdir", "cushort", "custom", - "cvd", "cvi", "cvl", "cvlongint", "cvs", "cvshort", "data", "date", - "deallocate", "declare", "defbyte", "defdbl", "defined", "defint", "deflng", - "deflngint", "defshort", "defsng", "defstr", "defubyte", "defuint", - "defulngint", "defushort", "dim", "dir", "do", "double", "draw", "dylibload", - "dylibsymbol", "else", "elseif", "end", "enum", "environ", 'environ$', "eof", - "eqv", "erase", "err", "error", "exec", "exepath", "exit", "exp", "export", - "extern", "field", "fix", "flip", "for", "fre", "freefile", "function", "get", - "getjoystick", "getkey", "getmouse", "gosub", "goto", "hex", "hibyte", "hiword", - "if", "iif", "imagecreate", "imagedestroy", "imp", "inkey", "inp", "input", - "instr", "int", "integer", "is", "kill", "lbound", "lcase", "left", "len", - "let", "lib", "line", "lobyte", "loc", "local", "locate", "lock", "lof", "log", - "long", "longint", "loop", "loword", "lset", "ltrim", "mid", "mkd", "mkdir", - "mki", "mkl", "mklongint", "mks", "mkshort", "mod", "multikey", "mutexcreate", - "mutexdestroy", "mutexlock", "mutexunlock", "name", "next", "not", "oct", "on", - "once", "open", "option", "or", "out", "output", "overload", "paint", "palette", - "pascal", "pcopy", "peek", "peeki", "peeks", "pipe", "pmap", "point", "pointer", - "poke", "pokei", "pokes", "pos", "preserve", "preset", "print", "private", - "procptr", "pset", "ptr", "public", "put", "random", "randomize", "read", - "reallocate", "redim", "rem", "reset", "restore", "resume", - "return", "rgb", "rgba", "right", "rmdir", "rnd", "rset", "rtrim", "run", - "sadd", "screen", "screencopy", "screeninfo", "screenlock", "screenptr", - "screenres", "screenset", "screensync", "screenunlock", "seek", "statement", - "selectcase", "setdate", "setenviron", "setmouse", - "settime", "sgn", "shared", "shell", "shl", "short", "shr", "sin", "single", - "sizeof", "sleep", "space", "spc", "sqr", "static", "stdcall", "step", "stop", - "str", "string", "strptr", "sub", "swap", "system", "tab", "tan", - "then", "threadcreate", "threadwait", "time", "timer", "to", "trans", - "trim", "type", "ubound", "ubyte", "ucase", "uinteger", "ulongint", "union", - "unlock", "unsigned", "until", "ushort", "using", "va_arg", "va_first", - "va_next", "val", "val64", "valint", "varptr", "view", "viewprint", "wait", - "wend", "while", "width", "window", "windowtitle", "with", "write", "xor", - "zstring", "explicit", "escape", "true", "false" - ) - ), - 'SYMBOLS' => array( - '(', ')' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080;', - 2 => 'color: #339933;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 0 => 'color: #66cc66;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/fsharp.php b/_piecrust/libs/Geshi/geshi/fsharp.php deleted file mode 100644 index afff9dc..0000000 --- a/_piecrust/libs/Geshi/geshi/fsharp.php +++ /dev/null @@ -1,211 +0,0 @@ - 'F#', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), - 'COMMENT_MULTI' => array('(*' => '*)', '/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'HARDQUOTE' => array('@"', '"'), - 'HARDESCAPE' => array('"'), - 'HARDCHAR' => '"', - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - /* main F# keywords */ - /* section 3.4 */ - 1 => array( - 'abstract', 'and', 'as', 'assert', 'base', 'begin', 'class', 'default', 'delegate', 'do', 'done', - 'downcast', 'downto', 'elif', 'else', 'end', 'exception', 'extern', 'false', 'finally', 'for', - 'fun', 'function', 'if', 'in', 'inherit', 'inline', 'interface', 'internal', 'lazy', 'let', - 'match', 'member', 'module', 'mutable', 'namespace', 'new', 'not', 'null', 'of', 'open', 'or', - 'override', 'private', 'public', 'rec', 'return', 'sig', 'static', 'struct', 'then', 'to', - 'true', 'try', 'type', 'upcast', 'use', 'val', 'void', 'when', 'while', 'with', 'yield', - 'asr', 'land', 'lor', 'lsl', 'lsr', 'lxor', 'mod', - /* identifiers are reserved for future use by F# */ - 'atomic', 'break', 'checked', 'component', 'const', 'constraint', 'constructor', - 'continue', 'eager', 'fixed', 'fori', 'functor', 'global', 'include', 'method', 'mixin', - 'object', 'parallel', 'params', 'process', 'protected', 'pure', 'sealed', 'tailcall', - 'trait', 'virtual', 'volatile', - /* take monads into account */ - 'let!', 'yield!' - ), - /* define names of main libraries in F# Core, so we can link to it - * http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/namespaces.html - */ - 2 => array( - 'Array', 'Array2D', 'Array3D', 'Array4D', 'ComparisonIdentity', 'HashIdentity', 'List', - 'Map', 'Seq', 'SequenceExpressionHelpers', 'Set', 'CommonExtensions', 'Event', - 'ExtraTopLevelOperators', 'LanguagePrimitives', 'NumericLiterals', 'Operators', - 'OptimizedClosures', 'Option', 'String', 'NativePtr', 'Printf' - ), - /* 17.2 & 17.3 */ - 3 => array( - 'abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'cosh', 'exp', - 'floor', 'log', 'log10', 'pown', 'round', 'sign', 'sin', 'sinh', 'sqrt', - 'tan', 'tanh', - 'ignore', - 'fst', 'snd', - 'stdin', 'stdout', 'stderr', - 'KeyValue', - 'max', 'min' - ), - /* Pervasives Types & Overloaded Conversion Functions */ - 4 => array( - 'bool', 'byref', 'byte', 'char', 'decimal', 'double', 'exn', 'float', 'float32', - 'FuncConvert', 'ilsigptr', 'int', 'int16', 'int32', 'int64', 'int8', - 'nativeint', 'nativeptr', 'obj', 'option', 'ref', 'sbyte', 'single', 'string', 'uint16', - 'uint32', 'uint64', 'uint8', 'unativeint', 'unit', - 'enum', - 'async', 'seq', 'dict' - ), - /* 17.2 Exceptions */ - 5 => array ( - 'failwith', 'invalidArg', 'raise', 'rethrow' - ), - /* 3.3 Conditional compilation & 13.3 Compiler Directives + light / light off */ - 6 => array( - '(*IF-FSHARP', 'ENDIF-FSHARP*)', '(*F#', 'F#*)', '(*IF-OCAML', 'ENDIF-OCAML*)', - '#light', - '#if', '#else', '#endif', '#indent', '#nowarn', '#r', '#reference', - '#I', '#Include', '#load', '#time', '#help', '#q', '#quit', - ), - /* 3.11 Pre-processor Declarations / Identifier Replacements */ - 7 => array( - '__SOURCE_DIRECTORY__', '__SOURCE_FILE__', '__LINE__' - ), - /* 17.2 Object Transformation Operators */ - 8 => array( - 'box', 'hash', 'sizeof', 'typeof', 'typedefof', 'unbox' - ) - ), - /* 17.2 basic operators + the yield and yield! arrows */ - 'SYMBOLS' => array( - 1 => array('+', '-', '/', '*', '**', '%', '~-'), - 2 => array('<', '<=', '>', '<=', '=', '<>'), - 3 => array('<<<', '>>>', '^^^', '&&&', '|||', '~~~'), - 4 => array('|>', '>>', '<|', '<<'), - 5 => array('!', '->', '->>'), - 6 => array('[',']','(',')','{','}', '[|', '|]', '(|', '|)'), - 7 => array(':=', ';', ';;') - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, /* keywords */ - 2 => true, /* modules */ - 3 => true, /* pervasives functions */ - 4 => true, /* types and overloaded conversion operators */ - 5 => true, /* exceptions */ - 6 => true, /* conditional compilation & compiler Directives */ - 7 => true, /* pre-processor declarations / identifier replacements */ - 8 => true /* object transformation operators */ - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #06c; font-weight: bold;', /* nice blue */ - 2 => 'color: #06c; font-weight: bold;', /* nice blue */ - 3 => 'color: #06c; font-weight: bold;', /* nice blue */ - 4 => 'color: #06c; font-weight: bold;', /* nice blue */ - 5 => 'color: #06c; font-weight: bold;', /* nice blue */ - 6 => 'color: #06c; font-weight: bold;', /* nice blue */ - 7 => 'color: #06c; font-weight: bold;', /* nice blue */ - 8 => 'color: #06c; font-weight: bold;' /* nice blue */ - ), - 'COMMENTS' => array( - 'MULTI' => 'color: #5d478b; font-style: italic;', /* light purple */ - 1 => 'color: #5d478b; font-style: italic;', - 2 => 'color: #5d478b; font-style: italic;' /* light purple */ - ), - 'ESCAPE_CHAR' => array( - ), - 'BRACKETS' => array( - 0 => 'color: #6c6;' - ), - 'STRINGS' => array( - 0 => 'color: #3cb371;' /* nice green */ - ), - 'NUMBERS' => array( - 0 => 'color: #c6c;' /* pink */ - ), - 'METHODS' => array( - 1 => 'color: #060;' /* dark green */ - ), - 'REGEXPS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #a52a2a;' /* maroon */ - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - /* some of keywords are Pervasives functions (land, lxor, asr, ...) */ - 1 => '', - 2 => 'http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/namespaces.html', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '', - 8 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "(?|^])", - 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-])" - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/gambas.php b/_piecrust/libs/Geshi/geshi/gambas.php deleted file mode 100644 index a4dd43f..0000000 --- a/_piecrust/libs/Geshi/geshi/gambas.php +++ /dev/null @@ -1,214 +0,0 @@ - 'GAMBAS', - 'COMMENT_SINGLE' => array(1 => "'"), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | - GESHI_NUMBER_FLT_NONSCI_F | GESHI_NUMBER_FLT_SCI_SHORT | GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - //keywords - 1 => array( - 'APPEND', 'AS', 'BREAK', 'BYREF', 'CASE', 'CATCH', 'CLASS', 'CLOSE', 'CONST', 'CONTINUE', 'COPY', - 'CREATE', 'DEBUG', 'DEC', 'DEFAULT', 'DIM', 'DO', 'EACH', 'ELSE', 'END', 'ENDIF', 'ERROR', 'EVENT', 'EXEC', - 'EXPORT', 'EXTERN', 'FALSE', 'FINALLY', 'FLUSH', 'FOR', 'FUNCTION', 'GOTO', 'IF', 'IN', 'INC', 'INHERITS', - 'INPUT', 'FROM', 'IS', 'KILL', 'LAST', 'LIBRARY', 'LIKE', 'LINE INPUT', 'LINK', 'LOCK', 'LOOP', 'ME', - 'MKDIR', 'MOVE', 'NEW', 'NEXT', 'NULL', 'OPEN', 'OPTIONAL', 'OUTPUT', 'PIPE', 'PRINT', 'PRIVATE', - 'PROCEDURE', 'PROPERTY', 'PUBLIC', 'QUIT', 'RAISE', 'RANDOMIZE', 'READ', 'REPEAT', 'RETURN', 'RMDIR', - 'SEEK', 'SELECT', 'SHELL', 'SLEEP', 'STATIC', 'STEP', 'STOP', 'SUB', 'SUPER', 'SWAP', 'THEN', 'TO', - 'TRUE', 'TRY', 'UNLOCK', 'UNTIL', 'WAIT', 'WATCH', 'WEND', 'WHILE', 'WITH', 'WRITE' - ), - //functions - 2 => array( - 'Abs', 'Access', 'Acos', 'Acosh', 'Alloc', 'Ang', 'Asc', 'ASin', 'ASinh', 'Asl', 'Asr', 'Assign', 'Atan', - 'ATan2', 'ATanh', - 'BChg', 'BClr', 'Bin', 'BSet', 'BTst', - 'CBool', 'Cbr', 'CByte', 'CDate', 'CFloat', 'Choose', 'Chr', 'CInt', 'CLong', 'Comp', 'Conv', 'Cos', - 'Cosh', 'CShort', 'CSng', 'CStr', - 'DateAdd', 'DateDiff', 'Day', 'DConv', 'Deg', 'DFree', 'Dir', - 'Eof', 'Eval', 'Exist', 'Exp', 'Exp10', 'Exp2', 'Expm', - 'Fix', 'Format', 'Frac', 'Free', - 'Hex', 'Hour', 'Hyp', - 'Iif', 'InStr', 'Int', 'IsAscii', 'IsBlank', 'IsBoolean', 'IsByte', 'IsDate', 'IsDigit', 'IsDir', - 'IsFloat', 'IsHexa', 'IsInteger', 'IsLCase', 'IsLetter', 'IsLong', 'IsNull', 'IsNumber', 'IsObject', - 'IsPunct', 'IsShort', 'IsSingle', 'IsSpace', 'IsString', 'IsUCase', 'IsVariant', - 'LCase', 'Left', 'Len', 'Lof', 'Log', 'Log10', 'Log2', 'Logp', 'Lsl', 'Lsr', 'LTrim', - 'Mag', 'Max', 'Mid', 'Min', 'Minute', 'Month', 'Now', 'Quote', - 'Rad', 'RDir', 'Realloc', 'Replace', 'Right', 'RInStr', 'Rnd', 'Rol', 'Ror', 'Round', 'RTrim', - 'Scan', 'SConv', 'Second', 'Seek', 'Sgn', 'Shl', 'Shr', 'Sin', 'Sinh', 'Space', 'Split', 'Sqr', - 'Stat', 'Str', 'StrPtr', 'Subst', - 'Tan', 'Tanh', 'Temp$', 'Time', 'Timer', 'Tr', 'Trim', 'TypeOf', - 'UCase', 'Unquote', 'Val', 'VarPtr', 'Week', 'WeekDay', 'Year' - ), - //string functions - 3 => array( - 'Bin$', 'Chr$', 'Conv$', 'DConv$', 'Format$', 'Hex$', 'LCase$', 'Left$', 'LTrim$', 'Mid$', 'Quote$', - 'Replace$', 'Right$', 'SConv$', 'Space$', 'Str$', 'String$', 'Subst$', 'Tr$', 'Trim$', 'UCase$', - 'Unquote$' - ), - //datatypes - 4 => array( - 'Boolean', 'Byte', 'Short', 'Integer', 'Long', 'Single', 'Float', 'Date', 'String', 'Variant', 'Object', - 'Pointer', 'File' - ), - //operators - 5 => array( - 'AND', 'DIV', 'MOD', 'NOT', 'OR', 'XOR' - ), - //objects/classes - 6 => array( - 'Application', 'Array', 'Byte[]', 'Collection', 'Component', 'Enum', 'Observer', 'Param', 'Process', - 'Stream', 'System', 'User', 'Chart', 'Compress', 'Crypt', 'Blob', 'Connection', 'DB', 'Database', - 'DatabaseUser', 'Field', 'Index', 'Result', 'ResultField', 'Table', 'DataBrowser', 'DataCombo', - 'DataControl', 'DataSource', 'DataView', 'Desktop', 'DesktopFile', 'Balloon', 'ColorButton', - 'ColorChooser', 'DateChooser', 'DirChooser', 'DirView', 'Expander', 'FileChooser', 'FileView', - 'FontChooser', 'InputBox', 'ListContainer', 'SidePanel', 'Stock', 'TableView', 'ToolPanel', 'ValueBox', - 'Wizard', 'Dialog', 'ToolBar', 'WorkSpace', 'DnsClient', 'SerialPort', 'ServerSocket', 'Socket', - 'UdpSocket', 'FtpClient', 'HttpClient', 'SmtpClient', 'Regexp', 'Action', 'Button', 'CheckBox', - 'ColumnView', 'ComboBox', 'Draw', 'Container', 'Control', 'Cursor', 'DrawingArea', 'Embedder', - 'Font', 'Form', 'Frame', 'GridView', 'HBox', 'HPanel', 'HSplit', 'IconView', 'Image', 'Key', 'Label', - 'Line', 'ListBox', 'ListView', 'Menu', 'Message', 'Mouse', 'MovieBox', 'Panel', 'Picture', 'PictureBox', - 'ProgressBar', 'RadioButton', 'ScrollBar', 'ScrollView', 'Separator', 'Slider', 'SpinBox', 'TabStrip', - 'TextArea', 'TextBox', 'TextLabel', 'ToggleButton', 'TrayIcon', 'TreeView', 'VBox', 'VPanel', 'VSplit', - 'Watcher', 'Window', 'Dial', 'Editor', 'LCDNumber', 'Printer', 'TextEdit', 'WebBrowser', 'GLarea', - 'Report', 'ReportCloner', 'ReportContainer', 'ReportControl', 'ReportDrawing', 'ReportField', 'ReportHBox', - 'ReportImage', 'ReportLabel', 'ReportSection', 'ReportSpecialField', 'ReportTextLabel', 'ReportVBox', - 'CDRom', 'Channel', 'Music', 'Sound', 'Settings', 'VideoDevice', 'Vb', 'CGI', 'HTML', 'Request', 'Response', - 'Session', 'XmlDocument', 'XmlNode', 'XmlReader', 'XmlReaderNodeType', 'XmlWriter', 'RpcArray', 'RpcClient', - 'RpcFunction', 'RpcServer', 'RpcStruct', 'RpcType', 'XmlRpc', 'Xslt' - ), - //constants - 7 => array( - 'Pi' - ), - ), - 'SYMBOLS' => array( - '&', '&=', '&/', '*', '*=', '+', '+=', '-', '-=', '//', '/', '/=', '=', '==', '\\', '\\=', - '^', '^=', '[', ']', '{', '}', '<', '>', '<>', '<=', '>=' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false, - 7 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0600FF; font-weight: bold;', // Keywords - 2 => 'color: #8B1433;', // Functions - 3 => 'color: #8B1433;', // String Functions - 4 => 'color: #0600FF;', // Data Types - 5 => 'color: #1E90FF;', // Operators - 6 => 'color: #0600FF;', // Objects/Components - 7 => 'color: #0600FF;' // Constants - ), - 'COMMENTS' => array( - 1 => 'color: #1A5B1A; font-style: italic;', - 'MULTI' => 'color: #1A5B1A; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #008080;' - ), - 'BRACKETS' => array( - 0 => 'color: #612188;' - ), - 'STRINGS' => array( - 0 => 'color: #7E4B05;' - ), - 'NUMBERS' => array( - 0 => 'color: #FF0000;', - GESHI_NUMBER_INT_BASIC => 'color: #FF0000;' - ), - 'METHODS' => array( - 1 => 'color: #0000FF;' - ), - 'SYMBOLS' => array( - 0 => 'color: #6132B2;' - ), - 'REGEXPS' => array( - //3 => 'color: #8B1433;' //fakes '$' colour matched by REGEXP - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => 'http://gambasdoc.org/help/lang/{FNAMEL}', - 2 => 'http://gambasdoc.org/help/lang/{FNAMEL}', - 3 => 'http://www.google.com/search?hl=en&q={FNAMEL}+site:http://gambasdoc.org/help/lang/&btnI=I%27m%20Feeling%20Lucky', - 4 => 'http://gambasdoc.org/help/lang/type/{FNAMEL}', - 5 => 'http://gambasdoc.org/help/lang/{FNAMEL}', - 6 => 'http://www.google.com/search?hl=en&q={FNAMEL}+site:http://gambasdoc.org/&btnI=I%27m%20Feeling%20Lucky', - 7 => 'http://gambasdoc.org/help/lang/{FNAMEL}' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 =>'.' - ), - 'REGEXPS' => array( - //3 => "\\$(?!\\w)" //matches '$' at the end of Keyword - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 2 => array( - 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_\|%\\-&;\$])" - ) - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/gdb.php b/_piecrust/libs/Geshi/geshi/gdb.php deleted file mode 100644 index be94fa8..0000000 --- a/_piecrust/libs/Geshi/geshi/gdb.php +++ /dev/null @@ -1,175 +0,0 @@ - 'GDB', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 0 => array( - 'Application', - 'signal', - ), - 1 => array( - 'Segmentation fault', - '[KCrash Handler]', - ), - ), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC, - 'SYMBOLS' => array( - ), - 'CASE_SENSITIVE' => array( - 0 => true, - 1 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 0 => 'font-weight:bold;', - 1 => 'font-weight:bold; color: #ff0000;' - ), - 'COMMENTS' => array( - ), - 'ESCAPE_CHAR' => array( - 0 => '' - ), - 'BRACKETS' => array( - 0 => 'font-weight:bold;' - ), - 'STRINGS' => array( - 0 => 'color: #933;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;', - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - ), - 'REGEXPS' => array( - 0 => 'color: #000066; font-weight:bold;', - 1 => 'color: #006600;', - 2 => 'color: #000066;', - 3 => 'color: #0066FF; text-style:italic;', - 4 => 'color: #80B5FF; text-style:italic;', - 5 => 'color: #A3007D;', - 6 => 'color: #FF00BF;', - 7 => 'font-weight: bold;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 0 => '', - 1 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - //[Current Thread...], [KCrash Handler] etc. - 0 => array( - GESHI_SEARCH => '^\[.+\]', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //stack number - 1 => array( - GESHI_SEARCH => '^#\d+', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //Thread X (Thread...) - 2 => array( - GESHI_SEARCH => '^Thread \d.+$', - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - //Files with linenumbers - 3 => array( - GESHI_SEARCH => '(at )(.+)(:\d+\s*)$', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ), - //Libs without linenumbers - 4 => array( - GESHI_SEARCH => '(from )(.+)(\s*)$', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ), - //Hex mem address - 5 => '0x[a-f0-9]+', - //Line numbers - 6 => array( - GESHI_SEARCH => '(:)(\d+)(\s*)$', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ), - //Location - 7 => array( - GESHI_SEARCH => '( in )([^ \(\)]+)( \()', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ), - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/genero.php b/_piecrust/libs/Geshi/geshi/genero.php deleted file mode 100644 index 5f752b8..0000000 --- a/_piecrust/libs/Geshi/geshi/genero.php +++ /dev/null @@ -1,463 +0,0 @@ - 'genero', - 'COMMENT_SINGLE' => array(1 => '--', 2 => '#'), - 'COMMENT_MULTI' => array('{' => '}'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - "ABSOLUTE", - "ACCEPT", - "ACTION", - "ADD", - "AFTER", - "ALL", - "ALTER", - "AND", - "ANY", - "APPEND", - "APPLICATION", - "AS", - "AT", - "ATTRIBUTE", - "ATTRIBUTES", - "AUDIT", - "AVG", - "BEFORE", - "BEGIN", - "BETWEEN", - "BORDER", - "BOTTOM", - "BREAKPOINT", - "BUFFER", - "BUFFERED", - "BY", - "CALL", - "CANCEL", - "CASE", - "CENTURY", - "CHANGE", - "CHECK", - "CLEAR", - "CLIPPED", - "CLOSE", - "CLUSTER", - "COLUMN", - "COLUMNS", - "COMMAND", - "COMMENT", - "COMMIT", - "COMMITTED", - "CONCURRENT ", - "CONNECT", - "CONNECTION", - "CONSTANT", - "CONSTRAINED", - "CONSTRAINT", - "CONSTRUCT", - "CONTINUE", - "CONTROL", - "COUNT", - "CREATE", - "CROSS", - "CURRENT", - "DATABASE", - "DBA", - "DEC", - "DECLARE", - "DEFAULT", - "DEFAULTS", - "DEFER", - "DEFINE", - "DELETE", - "DELIMITER", - "DESCRIBE", - "DESTINATION", - "DIM", - "DIALOG", - "DIMENSION", - "DIRTY", - "DISCONNECT", - "DISPLAY", - "DISTINCT", - "DORMANT", - "DOWN", - "DROP", - "DYNAMIC", - "ELSE", - "END", - "ERROR", - "ESCAPE", - "EVERY", - "EXCLUSIVE", - "EXECUTE", - "EXISTS", - "EXIT", - "EXPLAIN", - "EXTEND", - "EXTENT", - "EXTERNAL", - "FETCH", - "FGL_DRAWBOX", - "FIELD", - "FIELD_TOUCHED", - "FILE", - "FILL", - "FINISH", - "FIRST", - "FLOAT", - "FLUSH", - "FOR", - "FOREACH", - "FORM", - "FORMAT", - "FOUND", - "FRACTION", - "FREE", - "FROM", - "FULL", - "FUNCTION", - "GET_FLDBUF", - "GLOBALS", - "GO", - "GOTO", - "GRANT", - "GROUP", - "HAVING", - "HEADER", - "HELP", - "HIDE", - "HOLD", - "HOUR", - "IDLE", - "IF", - "IMAGE", - "IMMEDIATE", - "IN", - "INDEX", - "INFIELD", - "INITIALIZE", - "INNER", - "INPUT", - "INSERT", - "INTERRUPT", - "INTERVAL", - "INTO", - "INVISIBLE", - "IS", - "ISOLATION", - "JOIN", - "KEEP", - "KEY", - "LABEL", - "LAST", - "LEFT", - "LENGTH", - "LET", - "LIKE", - "LINE", - "LINENO", - "LINES", - "LOAD", - "LOCATE", - "LOCK", - "LOG", - "LSTR", - "MAIN", - "MARGIN", - "MATCHES", - "MAX", - "MAXCOUNT", - "MDY", - "MEMORY", - "MENU", - "MESSAGE", - "MIN", - "MINUTE", - "MOD", - "MODE", - "MODIFY", - "MONEY", - "NAME", - "NEED", - "NEXT", - "NO", - "NORMAL", - "NOT", - "NOTFOUND", - "NULL", - "NUMERIC", - "OF", - "ON", - "OPEN", - "OPTION", - "OPTIONS", - "OR", - "ORDER", - "OTHERWISE", - "OUTER", - "OUTPUT", - "PAGE", - "PAGENO", - "PAUSE", - "PERCENT", - "PICTURE", - "PIPE", - "PRECISION", - "PREPARE", - "PREVIOUS", - "PRINT", - "PRINTER", - "PRINTX", - "PRIOR", - "PRIVILEGES", - "PROCEDURE", - "PROGRAM", - "PROMPT", - "PUBLIC", - "PUT", - "QUIT", - "READ", - "REAL", - "RECORD", - "RECOVER", - "RED ", - "RELATIVE", - "RENAME", - "REOPTIMIZATION", - "REPEATABLE", - "REPORT", - "RESOURCE", - "RETURN", - "RETURNING", - "REVERSE", - "REVOKE", - "RIGHT", - "ROLLBACK", - "ROLLFORWARD", - "ROW", - "ROWS", - "RUN", - "SCHEMA", - "SCREEN", - "SCROLL", - "SECOND", - "SELECT", - "SERIAL", - "SET", - "SFMT", - "SHARE", - "SHIFT", - "SHOW", - "SIGNAL ", - "SIZE", - "SKIP", - "SLEEP", - "SOME", - "SPACE", - "SPACES", - "SQL", - "SQLERRMESSAGE", - "SQLERROR", - "SQLSTATE", - "STABILITY", - "START", - "STATISTICS", - "STEP", - "STOP", - "STYLE", - "SUM", - "SYNONYM", - "TABLE", - "TEMP", - "TERMINATE", - "TEXT", - "THEN", - "THROUGH", - "THRU", - "TO", - "TODAY", - "TOP", - "TRAILER", - "TRANSACTION ", - "UNBUFFERED", - "UNCONSTRAINED", - "UNDERLINE", - "UNION", - "UNIQUE", - "UNITS", - "UNLOAD", - "UNLOCK", - "UP", - "UPDATE", - "USE", - "USER", - "USING", - "VALIDATE", - "VALUE", - "VALUES", - "VARCHAR", - "VIEW", - "WAIT", - "WAITING", - "WARNING", - "WHEN", - "WHENEVER", - "WHERE", - "WHILE", - "WINDOW", - "WITH", - "WITHOUT", - "WORDWRAP", - "WORK", - "WRAP" - ), - 2 => array( - '&IFDEF', '&ENDIF' - ), - 3 => array( - "ARRAY", - "BYTE", - "CHAR", - "CHARACTER", - "CURSOR", - "DATE", - "DATETIME", - "DECIMAL", - "DOUBLE", - "FALSE", - "INT", - "INTEGER", - "SMALLFLOAT", - "SMALLINT", - "STRING", - "TIME", - "TRUE" - ), - 4 => array( - "BLACK", - "BLINK", - "BLUE", - "BOLD", - "ANSI", - "ASC", - "ASCENDING", - "ASCII", - "CYAN", - "DESC", - "DESCENDING", - "GREEN", - "MAGENTA", - "OFF", - "WHITE", - "YELLOW", - "YEAR", - "DAY", - "MONTH", - "WEEKDAY" - ), - ), - 'SYMBOLS' => array( - '+', '-', '*', '?', '=', '/', '%', '>', '<', '^', '!', '|', ':', - '(', ')', '[', ']' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0600FF;', - 2 => 'color: #0000FF; font-weight: bold;', - 3 => 'color: #008000;', - 4 => 'color: #FF0000;', - ), - 'COMMENTS' => array( - 1 => 'color: #008080; font-style: italic;', - 2 => 'color: #008080;', - 'MULTI' => 'color: #008080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #008080; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #808080;' - ), - 'NUMBERS' => array( - 0 => 'color: #FF0000;' - ), - 'METHODS' => array( - 1 => 'color: #0000FF;', - 2 => 'color: #0000FF;' - ), - 'SYMBOLS' => array( - 0 => 'color: #008000;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/genie.php b/_piecrust/libs/Geshi/geshi/genie.php deleted file mode 100644 index 3c354ad..0000000 --- a/_piecrust/libs/Geshi/geshi/genie.php +++ /dev/null @@ -1,157 +0,0 @@ - 'Genie', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - //Using and Namespace directives (basic support) - //Please note that the alias syntax for using is not supported - 3 => '/(?:(?<=using[\\n\\s])|(?<=namespace[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*[a-zA-Z0-9_]+[\n\s]*(?=[;=])/i'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'HARDQUOTE' => array('@"', '"'), - 'HARDESCAPE' => array('""'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'and', 'as', 'abstract', 'break', 'case', 'cast', 'catch', 'const', - 'construct', 'continue', 'default', 'def', 'delete', 'div', - 'dynamic', 'do', 'downto', 'else', 'ensures', 'except', 'extern', - 'false', 'final', 'finally', 'for', 'foreach', 'get', 'if', 'in', - 'init', 'inline', 'internal', 'implements', 'lock', 'not', 'null', - 'of', 'or', 'otherwise', 'out', 'override', 'pass', 'raise', - 'raises', 'readonly', 'ref', 'requires', 'self', 'set', 'static', - 'super', 'switch', 'to', 'true', 'try', 'unless', 'uses', 'var', 'virtual', - 'volatile', 'void', 'when', 'while' - ), -// 2 => array( -// ), - 3 => array( - 'is', 'isa', 'new', 'owned', 'sizeof', 'typeof', 'unchecked', - 'unowned', 'weak' - ), - 4 => array( - 'bool', 'byte', 'class', 'char', 'date', 'datetime', 'decimal', 'delegate', - 'double', 'enum', 'event', 'exception', 'float', 'int', 'interface', - 'long', 'object', 'prop', 'sbyte', 'short', 'single', 'string', - 'struct', 'ulong', 'ushort' - ), -// 5 => array( -// ), - ), - 'SYMBOLS' => array( - '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', ':', ';', - '(', ')', '{', '}', '[', ']', '|' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, -// 2 => false, - 3 => false, - 4 => false, -// 5 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0600FF;', -// 2 => 'color: #FF8000; font-weight: bold;', - 3 => 'color: #008000;', - 4 => 'color: #FF0000;', -// 5 => 'color: #000000;' - ), - 'COMMENTS' => array( - 1 => 'color: #008080; font-style: italic;', -// 2 => 'color: #008080;', - 3 => 'color: #008080;', - 'MULTI' => 'color: #008080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #008080; font-weight: bold;', - 'HARD' => 'color: #008080; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #666666;', - 'HARD' => 'color: #666666;' - ), - 'NUMBERS' => array( - 0 => 'color: #FF0000;' - ), - 'METHODS' => array( - 1 => 'color: #0000FF;', - 2 => 'color: #0000FF;' - ), - 'SYMBOLS' => array( - 0 => 'color: #008000;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', -// 2 => '', - 3 => '', - 4 => '', -// 5 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "(?|^])", - 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-])" - ) - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/gettext.php b/_piecrust/libs/Geshi/geshi/gettext.php deleted file mode 100644 index 90c34a8..0000000 --- a/_piecrust/libs/Geshi/geshi/gettext.php +++ /dev/null @@ -1,97 +0,0 @@ - 'GNU Gettext', - 'COMMENT_SINGLE' => array('#:', '#.', '#,', '#|', '#'), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array('msgctxt', 'msgid_plural', 'msgid', 'msgstr'), - ), - 'SYMBOLS' => array(), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;' - ), - 'COMMENTS' => array( - 0 => 'color: #000099;', - 1 => 'color: #000099;', - 2 => 'color: #000099;', - 3 => 'color: #006666;', - 4 => 'color: #666666; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'REGEXPS' => array(), - 'SYMBOLS' => array(), - 'NUMBERS' => array( - 0 => 'color: #000099;' - ), - 'METHODS' => array(), - 'SCRIPT' => array(), - 'BRACKETS' => array( - 0 => 'color: #000099;' - ), - ), - 'URLS' => array( - 1 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/glsl.php b/_piecrust/libs/Geshi/geshi/glsl.php deleted file mode 100644 index dbb7ff6..0000000 --- a/_piecrust/libs/Geshi/geshi/glsl.php +++ /dev/null @@ -1,205 +0,0 @@ - 'glSlang', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - //Multiline-continued single-line comments - 1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', - //Multiline-continued preprocessor define - 2 => '/#(?:\\\\\\\\|\\\\\\n|.)*$/m' - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'if', 'else', 'for', 'while', 'do', 'break', 'continue', 'asm', - 'switch', 'case', 'default', 'return', 'discard', - 'namespace', 'using', 'sizeof', 'cast' - ), - 2 => array( - 'const', 'uniform', 'attribute', 'centroid', 'varying', 'invariant', - 'in', 'out', 'inout', 'input', 'output', 'typedef', 'volatile', - 'public', 'static', 'extern', 'external', 'packed', - 'inline', 'noinline', 'noperspective', 'flat' - ), - 3 => array( - 'void', 'bool', 'int', 'long', 'short', 'float', 'half', 'fixed', - 'unsigned', 'lowp', 'mediump', 'highp', 'precision', - 'vec2', 'vec3', 'vec4', 'bvec2', 'bvec3', 'bvec4', - 'dvec2', 'dvec3', 'dvec4', 'fvec2', 'fvec3', 'fvec4', - 'hvec2', 'hvec3', 'hvec4', 'ivec2', 'ivec3', 'ivec4', - 'mat2', 'mat3', 'mat4', 'mat2x2', 'mat3x2', 'mat4x2', - 'mat2x3', 'mat3x3', 'mat4x3', 'mat2x4', 'mat3x4', 'mat4x4', - 'sampler1D', 'sampler2D', 'sampler3D', 'samplerCube', - 'sampler1DShadow', 'sampler2DShadow', - 'struct', 'class', 'union', 'enum', 'interface', 'template' - ), - 4 => array( - 'this', 'false', 'true' - ), - 5 => array( - 'radians', 'degrees', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', - 'pow', 'exp2', 'log2', 'sqrt', 'inversesqrt', 'abs', 'sign', 'ceil', - 'floor', 'fract', 'mod', 'min', 'max', 'clamp', 'mix', 'step', - 'smoothstep', 'length', 'distance', 'dot', 'cross', 'normalize', - 'ftransform', 'faceforward', 'reflect', 'matrixCompMult', 'equal', - 'lessThan', 'lessThanEqual', 'greaterThan', 'greaterThanEqual', - 'notEqual', 'any', 'all', 'not', 'texture1D', 'texture1DProj', - 'texture1DLod', 'texture1DProjLod', 'texture2D', 'texture2DProj', - 'texture2DLod', 'texture2DProjLod', 'texture3D', 'texture3DProj', - 'texture3DLod', 'texture3DProjLod', 'textureCube', 'textureCubeLod', - 'shadow1D', 'shadow1DProj', 'shadow1DLod', 'shadow1DProjLod', - 'shadow2D', 'shadow2DProj', 'shadow2DLod', 'shadow2DProjLod', - 'noise1', 'noise2', 'noise3', 'noise4' - ), - 6 => array( - 'gl_Position', 'gl_PointSize', 'gl_ClipVertex', 'gl_FragColor', - 'gl_FragData', 'gl_FragDepth', 'gl_FragCoord', 'gl_FrontFacing', - 'gl_Color', 'gl_SecondaryColor', 'gl_Normal', 'gl_Vertex', - 'gl_MultiTexCoord0', 'gl_MultiTexCoord1', 'gl_MultiTexCoord2', - 'gl_MultiTexCoord3', 'gl_MultiTexCoord4', 'gl_MultiTexCoord5', - 'gl_MultiTexCoord6', 'gl_MultiTexCoord7', 'gl_FogCoord', - 'gl_MaxLights', 'gl_MaxClipPlanes', 'gl_MaxTextureUnits', - 'gl_MaxTextureCoords', 'gl_MaxVertexAttribs', 'gl_MaxVaryingFloats', - 'gl_MaxVertexUniformComponents', 'gl_MaxVertexTextureImageUnits', - 'gl_MaxCombinedTextureImageUnits', 'gl_MaxTextureImageUnits', - 'gl_MaxFragmentUniformComponents', 'gl_MaxDrawBuffers', 'gl_Point', - 'gl_ModelViewMatrix', 'gl_ProjectionMatrix', 'gl_FrontMaterial', - 'gl_ModelViewProjectionMatrix', 'gl_TextureMatrix', 'gl_ClipPlane', - 'gl_NormalMatrix', 'gl_ModelViewMatrixInverse', 'gl_BackMaterial', - 'gl_ProjectionMatrixInverse', 'gl_ModelViewProjectionMatrixInverse', - 'gl_TextureMatrixInverse', 'gl_ModelViewMatrixTranspose', 'gl_Fog', - 'gl_ProjectionMatrixTranspose', 'gl_NormalScale', 'gl_DepthRange', - 'gl_odelViewProjectionMatrixTranspose', 'gl_TextureMatrixTranspose', - 'gl_ModelViewMatrixInverseTranspose', 'gl_LightSource', - 'gl_ProjectionMatrixInverseTranspose', 'gl_LightModel', - 'gl_ModelViewProjectionMatrixInverseTranspose', 'gl_TexCoord', - 'gl_TextureMatrixInverseTranspose', 'gl_TextureEnvColor', - 'gl_FrontLightModelProduct', 'gl_BackLightModelProduct', - 'gl_FrontLightProduct', 'gl_BackLightProduct', 'gl_ObjectPlaneS', - 'gl_ObjectPlaneT', 'gl_ObjectPlaneR', 'gl_ObjectPlaneQ', - 'gl_EyePlaneS', 'gl_EyePlaneT', 'gl_EyePlaneR', 'gl_EyePlaneQ', - 'gl_FrontColor', 'gl_BackColor', 'gl_FrontSecondaryColor', - 'gl_BackSecondaryColor', 'gl_FogFragCoord', 'gl_PointCoord' - ) - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', - '&', '?', ':', '.', '|', ';', ',', '<', '>' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #333399; font-weight: bold;', - 3 => 'color: #000066; font-weight: bold;', - 4 => 'color: #333399; font-weight: bold;', - 5 => 'color: #993333; font-weight: bold;', - 6 => 'color: #551111;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #009900;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000066;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #0000ff;' - ), - 'METHODS' => array( - 1 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #000066;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'OOLANG' => array( - 'MATCH_BEFORE' => '', - 'MATCH_AFTER' => '[a-zA-Z_][a-zA-Z0-9_]*', - 'MATCH_SPACES' => '[\s]*' - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/gml.php b/_piecrust/libs/Geshi/geshi/gml.php deleted file mode 100644 index 9d0d88d..0000000 --- a/_piecrust/libs/Geshi/geshi/gml.php +++ /dev/null @@ -1,506 +0,0 @@ -5 and KEYWORDS=>6 sections (actually, they were empty). - * I was planning of using those for the GML functions available only in the - * registered version of the program, but not anymore. - * - * 2005/06/26 (1.0.3) - * - First Release. - * - * TODO (updated 2005/11/11) - * ------------------------- - * - Test it for a while and make the appropiate corrections. - * - ************************************************************************************* - * - * This file is part of GeSHi. - * - * GeSHi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GeSHi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeSHi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - ************************************************************************************/ - -$language_data = array ( - 'LANG_NAME' => 'GML', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'"), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - // language keywords - 1 => array( - 'break', 'continue', 'do', 'until', 'if', 'else', - 'exit', 'for', 'repeat', 'return', 'switch', - 'case', 'default', 'var', 'while', 'with', 'div', 'mod', - // GML Language overview - 'self', 'other', 'all', 'noone', 'global', - ), - // modifiers and built-in variables - 2 => array( - // Game play - 'x','y','xprevious','yprevious','xstart','ystart','hspeed','vspeed','direction','speed', - 'friction','gravity','gravity_direction', - 'path_index','path_position','path_positionprevious','path_speed','path_orientation', - 'path_endaction', - 'object_index','id','mask_index','solid','persistent','instance_count','instance_id', - 'room_speed','fps','current_time','current_year','current_month','current_day','current_weekday', - 'current_hour','current_minute','current_second','alarm','timeline_index','timeline_position', - 'timeline_speed', - 'room','room_first','room_last','room_width','room_height','room_caption','room_persistent', - 'score','lives','health','show_score','show_lives','show_health','caption_score','caption_lives', - 'caption_health', - 'event_type','event_number','event_object','event_action', - 'error_occurred','error_last', - // User interaction - 'keyboard_lastkey','keyboard_key','keyboard_lastchar','keyboard_string', - 'mouse_x','mouse_y','mouse_button','mouse_lastbutton', - // Game Graphics - 'sprite_index','sprite_width','sprite_height','sprite_xoffset','sprite_yoffset', - 'image_number','image_index','image_speed','image_xscale','image_yscale','image_angle', - 'image_alpha','image_blend','bbox_left','bbox_right','bbox_top','bbox_bottom', - 'background_color','background_showcolor','background_visible','background_foreground', - 'background_index','background_x','background_y','background_width','background_height', - 'background_htiled','background_vtiled','background_xscale','background_yscale', - 'background_hspeed','background_vspeed','background_blend','background_alpha', - 'background','left, top, width, height','depth','visible','xscale','yscale','blend','alpha', - 'view_enabled','view_current','view_visible','view_yview','view_wview','view_hview','view_xport', - 'view_yport','view_wport','view_hport','view_angle','view_hborder','view_vborder','view_hspeed', - 'view_vspeed','view_object', - 'transition_kind', - // Files, registry and executing programs - 'game_id','working_directory','temp_directory', - 'secure_mode', - // Creating particles - 'xmin', 'xmax', 'ymin', 'ymax','shape','distribution','particle type','number', - 'force','dist','kind','additive', 'parttype1', 'parttype2' - ), - // functions - 3 => array( - // Computing things - 'random','choose','abs','sign','round','floor','ceil','frac','sqrt','sqr','power','exp','ln', - 'log2','log10','logn','sin','cos','tan','arcsin','arccos','arctan','arctan2','degtorad', - 'radtodeg','min','max','mean','median','point_distance','point_direction','lengthdir_x', - 'lengthdir_y','is_real','is_string', - 'chr','ord','real','string','string_format','string_length','string_pos','string_copy', - 'string_char_at','string_delete','string_insert','string_replace','string_replace_all', - 'string_count','string_lower','string_upper','string_repeat','string_letters','string_digits', - 'string_lettersdigits','clipboard_has_text','clipboard_get_text','clipboard_set_text', - 'date_current_datetime','date_current_date','date_current_time','date_create_datetime', - 'date_create_date','date_create_time','date_valid_datetime','date_valid_date','date_valid_time', - 'date_inc_year','date_inc_month','date_inc_week','date_inc_day','date_inc_hour', - 'date_inc_minute','date_inc_second','date_get_year','date_get_month','date_get_week', - 'date_get_day','date_get_hour', 'date_get_minute','date_get_second','date_get_weekday', - 'date_get_day_of_year','date_get_hour_of_year','date_get_minute_of_year', - 'date_get_second_of_year','date_year_span','date_month_span','date_week_span','date_day_span', - 'date_hour_span','date_minute_span','date_second_span','date_compare_datetime', - 'date_compare_date','date_compare_time','date_date_of','date_time_of','date_datetime_string', - 'date_date_string','date_time_string','date_days_in_month','date_days_in_year','date_leap_year', - 'date_is_today', - // Game play - 'motion_set','motion_add','place_free','place_empty','place_meeting','place_snapped', - 'move_random','move_snap','move_wrap','move_towards_point','move_bounce_solid','move_bounce_all', - 'move_contact_solid','move_contact_all','move_outside_solid','move_outside_all', - 'distance_to_point','distance_to_object','position_empty','position_meeting', - 'path_start','path_end', - 'mp_linear_step','mp_linear_step_object','mp_potential_step','mp_potential_step_object', - 'mp_potential_settings','mp_linear_path','mp_linear_path_object', 'mp_potential_path', - 'mp_potential_path_object','mp_grid_create','mp_grid_destroy','mp_grid_clear_all', - 'mp_grid_clear_cell','mp_grid_clear_rectangle','mp_grid_add_cell','mp_grid_add_rectangle', - 'mp_grid_add_instances','mp_grid_path','mp_grid_draw', - 'collision_point','collision_rectangle','collision_circle','collision_ellipse','collision_line', - 'instance_find','instance_exists','instance_number','instance_position','instance_nearest', - 'instance_furthest','instance_place','instance_create','instance_copy','instance_destroy', - 'instance_change','position_destroy','position_change', - 'instance_deactivate_all','instance_deactivate_object','instance_deactivate_region', - 'instance_activate_all','instance_activate_object','instance_activate_region', - 'sleep', - 'room_goto','room_goto_previous','room_goto_next','room_restart','room_previous','room_next', - 'game_end','game_restart','game_save','game_load', - 'event_perform', 'event_perform_object','event_user','event_inherited', - 'show_debug_message','variable_global_exists','variable_local_exists','variable_global_get', - 'variable_global_array_get','variable_global_array2_get','variable_local_get', - 'variable_local_array_get','variable_local_array2_get','variable_global_set', - 'variable_global_array_set','variable_global_array2_set','variable_local_set', - 'variable_local_array_set','variable_local_array2_set','set_program_priority', - // User interaction - 'keyboard_set_map','keyboard_get_map','keyboard_unset_map','keyboard_check', - 'keyboard_check_pressed','keyboard_check_released','keyboard_check_direct', - 'keyboard_get_numlock','keyboard_set_numlock','keyboard_key_press','keyboard_key_release', - 'keyboard_clear','io_clear','io_handle','keyboard_wait', - 'mouse_check_button','mouse_check_button_pressed','mouse_check_button_released','mouse_clear', - 'mouse_wait', - 'joystick_exists','joystick_name','joystick_axes','joystick_buttons','joystick_has_pov', - 'joystick_direction','joystick_check_button','joystick_xpos','joystick_ypos','joystick_zpos', - 'joystick_rpos','joystick_upos','joystick_vpos','joystick_pov', - // Game Graphics - 'draw_sprite','draw_sprite_stretched','draw_sprite_tiled','draw_sprite_part','draw_background', - 'draw_background_stretched','draw_background_tiled','draw_background_part','draw_sprite_ext', - 'draw_sprite_stretched_ext','draw_sprite_tiled_ext','draw_sprite_part_ext','draw_sprite_general', - 'draw_background_ext','draw_background_stretched_ext','draw_background_tiled_ext', - 'draw_background_part_ext','draw_background_general', - 'draw_clear','draw_clear_alpha','draw_point','draw_line','draw_rectangle','draw_roundrect', - 'draw_triangle','draw_circle','draw_ellipse','draw_arrow','draw_button','draw_path', - 'draw_healthbar','draw_set_color','draw_set_alpha','draw_get_color','draw_get_alpha', - 'make_color_rgb','make_color_hsv','color_get_red','color_get_green','color_get_blue', - 'color_get_hue','color_get_saturation','color_get_value','merge_color','draw_getpixel', - 'screen_save','screen_save_part', - 'draw_set_font','draw_set_halign','draw_set_valign','draw_text','draw_text_ext','string_width', - 'string_height','string_width_ext','string_height_ext','draw_text_transformed', - 'draw_text_ext_transformed','draw_text_color','draw_text_ext_color', - 'draw_text_transformed_color','draw_text_ext_transformed_color', - 'draw_point_color','draw_line_color','draw_rectangle_color','draw_roundrect_color', - 'draw_triangle_color','draw_circle_color','draw_ellipse_color','draw_primitive_begin', - 'draw_vertex','draw_vertex_color','draw_primitive_end','sprite_get_texture', - 'background_get_texture','texture_preload','texture_set_priority', - 'texture_get_width','texture_get_height','draw_primitive_begin_texture','draw_vertex_texture', - 'draw_vertex_texture_color','texture_set_interpolation', - 'texture_set_blending','texture_set_repeat','draw_set_blend_mode','draw_set_blend_mode_ext', - 'surface_create','surface_free','surface_exists','surface_get_width','surface_get_height', - 'surface_get_texture','surface_set_target','surface_reset_target','surface_getpixel', - 'surface_save','surface_save_part','draw_surface','draw_surface_stretched','draw_surface_tiled', - 'draw_surface_part','draw_surface_ext','draw_surface_stretched_ext','draw_surface_tiled_ext', - 'draw_surface_part_ext','draw_surface_general','surface_copy','surface_copy_part', - 'tile_add','tile_delete','tile_exists','tile_get_x','tile_get_y','tile_get_left','tile_get_top', - 'tile_get_width','tile_get_height','tile_get_depth','tile_get_visible','tile_get_xscale', - 'tile_get_yscale','tile_get_background','tile_get_blend','tile_get_alpha','tile_set_position', - 'tile_set_region','tile_set_background','tile_set_visible','tile_set_depth','tile_set_scale', - 'tile_set_blend','tile_set_alpha','tile_layer_hide','tile_layer_show','tile_layer_delete', - 'tile_layer_shift','tile_layer_find','tile_layer_delete_at','tile_layer_depth', - 'display_get_width','display_get_height','display_get_colordepth','display_get_frequency', - 'display_set_size','display_set_colordepth','display_set_frequency','display_set_all', - 'display_test_all','display_reset','display_mouse_get_x','display_mouse_get_y','display_mouse_set', - 'window_set_visible','window_get_visible','window_set_fullscreen','window_get_fullscreen', - 'window_set_showborder','window_get_showborder','window_set_showicons','window_get_showicons', - 'window_set_stayontop','window_get_stayontop','window_set_sizeable','window_get_sizeable', - 'window_set_caption','window_get_caption','window_set_cursor', 'window_get_cursor', - 'window_set_color','window_get_color','window_set_region_scale','window_get_region_scale', - 'window_set_position','window_set_size','window_set_rectangle','window_center','window_default', - 'window_get_x','window_get_y','window_get_width','window_get_height','window_mouse_get_x', - 'window_mouse_get_y','window_mouse_set', - 'window_set_region_size','window_get_region_width','window_get_region_height', - 'window_view_mouse_get_x','window_view_mouse_get_y','window_view_mouse_set', - 'window_views_mouse_get_x','window_views_mouse_get_y','window_views_mouse_set', - 'screen_redraw','screen_refresh','set_automatic_draw','set_synchronization','screen_wait_vsync', - // Sound and music) - 'sound_play','sound_loop','sound_stop','sound_stop_all','sound_isplaying','sound_volume', - 'sound_global_volume','sound_fade','sound_pan','sound_background_tempo','sound_set_search_directory', - 'sound_effect_set','sound_effect_chorus','sound_effect_echo', 'sound_effect_flanger', - 'sound_effect_gargle','sound_effect_reverb','sound_effect_compressor','sound_effect_equalizer', - 'sound_3d_set_sound_position','sound_3d_set_sound_velocity','sound_3d_set_sound_distance', - 'sound_3d_set_sound_cone', - 'cd_init','cd_present','cd_number','cd_playing','cd_paused','cd_track','cd_length', - 'cd_track_length','cd_position','cd_track_position','cd_play','cd_stop','cd_pause','cd_resume', - 'cd_set_position','cd_set_track_position','cd_open_door','cd_close_door','MCI_command', - // Splash screens, highscores, and other pop-ups - 'show_text','show_image','show_video','show_info','load_info', - 'show_message','show_message_ext','show_question','get_integer','get_string', - 'message_background','message_alpha','message_button','message_text_font','message_button_font', - 'message_input_font','message_mouse_color','message_input_color','message_caption', - 'message_position','message_size','show_menu','show_menu_pos','get_color','get_open_filename', - 'get_save_filename','get_directory','get_directory_alt','show_error', - 'highscore_show','highscore_set_background','highscore_set_border','highscore_set_font', - 'highscore_set_colors','highscore_set_strings','highscore_show_ext','highscore_clear', - 'highscore_add','highscore_add_current','highscore_value','highscore_name','draw_highscore', - // Resources - 'sprite_exists','sprite_get_name','sprite_get_number','sprite_get_width','sprite_get_height', - 'sprite_get_transparent','sprite_get_smooth','sprite_get_preload','sprite_get_xoffset', - 'sprite_get_yoffset','sprite_get_bbox_left','sprite_get_bbox_right','sprite_get_bbox_top', - 'sprite_get_bbox_bottom','sprite_get_bbox_mode','sprite_get_precise', - 'sound_exists','sound_get_name','sound_get_kind','sound_get_preload','sound_discard', - 'sound_restore', - 'background_exists','background_get_name','background_get_width','background_get_height', - 'background_get_transparent','background_get_smooth','background_get_preload', - 'font_exists','font_get_name','font_get_fontname','font_get_bold','font_get_italic', - 'font_get_first','font_get_last', - 'path_exists','path_get_name','path_get_length','path_get_kind','path_get_closed', - 'path_get_precision','path_get_number','path_get_point_x','path_get_point_y', - 'path_get_point_speed','path_get_x','path_get_y','path_get_speed', - 'script_exists','script_get_name','script_get_text', - 'timeline_exists','timeline_get_name', - 'object_exists','object_get_name','object_get_sprite','object_get_solid','object_get_visible', - 'object_get_depth','object_get_persistent','object_get_mask','object_get_parent', - 'object_is_ancestor', - 'room_exists','room_get_name', - // Changing resources - 'sprite_set_offset','sprite_set_bbox_mode','sprite_set_bbox','sprite_set_precise', - 'sprite_duplicate','sprite_assign','sprite_merge','sprite_add','sprite_replace', - 'sprite_create_from_screen','sprite_add_from_screen','sprite_create_from_surface', - 'sprite_add_from_surface','sprite_delete','sprite_set_alpha_from_sprite', - 'sound_add','sound_replace','sound_delete', - 'background_duplicate','background_assign','background_add','background_replace', - 'background_create_color','background_create_gradient','background_create_from_screen', - 'background_create_from_surface','background_delete','background_set_alpha_from_background', - 'font_add','font_add_sprite','font_replace_sprite','font_delete', - 'path_set_kind','path_set_closed','path_set_precision','path_add','path_delete','path_duplicate', - 'path_assign','path_append','path_add_point','path_insert_point','path_change_point', - 'path_delete_point','path_clear_points','path_reverse','path_mirror','path_flip','path_rotate', - 'path_scale','path_shift', - 'execute_string','execute_file','script_execute', - 'timeline_add','timeline_delete','timeline_moment_add','timeline_moment_clear', - 'object_set_sprite','object_set_solid','object_set_visible','object_set_depth', - 'object_set_persistent','object_set_mask','object_set_parent','object_add','object_delete', - 'object_event_add','object_event_clear', - 'room_set_width','room_set_height','room_set_caption','room_set_persistent','room_set_code', - 'room_set_background_color','room_set_background','room_set_view','room_set_view_enabled', - 'room_add','room_duplicate','room_assign','room_instance_add','room_instance_clear', - 'room_tile_add','room_tile_add_ext','room_tile_clear', - // Files, registry and executing programs - 'file_text_open_read','file_text_open_write','file_text_open_append','file_text_close', - 'file_text_write_string','file_text_write_real','file_text_writeln','file_text_read_string', - 'file_text_read_real','file_text_readln','file_text_eof','file_exists','file_delete', - 'file_rename','file_copy','directory_exists','directory_create','file_find_first', - 'file_find_next','file_find_close','file_attributes', 'filename_name','filename_path', - 'filename_dir','filename_drive','filename_ext','filename_change_ext','file_bin_open', - 'file_bin_rewrite','file_bin_close','file_bin_size','file_bin_position','file_bin_seek', - 'file_bin_write_byte','file_bin_read_byte','parameter_count','parameter_string', - 'environment_get_variable', - 'registry_write_string','registry_write_real','registry_read_string','registry_read_real', - 'registry_exists','registry_write_string_ext','registry_write_real_ext', - 'registry_read_string_ext','registry_read_real_ext','registry_exists_ext','registry_set_root', - 'ini_open','ini_close','ini_read_string','ini_read_real','ini_write_string','ini_write_real', - 'ini_key_exists','ini_section_exists','ini_key_delete','ini_section_delete', - 'execute_program','execute_shell', - // Data structures - 'ds_stack_create','ds_stack_destroy','ds_stack_clear','ds_stack_size','ds_stack_empty', - 'ds_stack_push','ds_stack_pop','ds_stack_top', - 'ds_queue_create','ds_queue_destroy','ds_queue_clear','ds_queue_size','ds_queue_empty', - 'ds_queue_enqueue','ds_queue_dequeue','ds_queue_head','ds_queue_tail', - 'ds_list_create','ds_list_destroy','ds_list_clear','ds_list_size','ds_list_empty','ds_list_add', - 'ds_list_insert','ds_list_replace','ds_list_delete','ds_list_find_index','ds_list_find_value', - 'ds_list_sort', - 'ds_map_create','ds_map_destroy','ds_map_clear','ds_map_size','ds_map_empty','ds_map_add', - 'ds_map_replace','ds_map_delete','ds_map_exists','ds_map_find_value','ds_map_find_previous', - 'ds_map_find_next','ds_map_find_first','ds_map_find_last', - 'ds_priority_create','ds_priority_destroy','ds_priority_clear','ds_priority_size', - 'ds_priority_empty','ds_priority_add','ds_priority_change_priority','ds_priority_find_priority', - 'ds_priority_delete_value','ds_priority_delete_min','ds_priority_find_min', - 'ds_priority_delete_max','ds_priority_find_max', - 'ds_grid_create','ds_grid_destroy','ds_grid_resize','ds_grid_width','ds_grid_height', - 'ds_grid_clear','ds_grid_set','ds_grid_add','ds_grid_multiply','ds_grid_set_region', - 'ds_grid_add_region','ds_grid_multiply_region','ds_grid_set_disk','ds_grid_add_disk', - 'ds_grid_multiply_disk','ds_grid_get','ds_grid_get_sum','ds_grid_get_max','ds_grid_get_min', - 'ds_grid_get_mean','ds_grid_get_disk_sum','ds_grid_get_disk_min','ds_grid_get_disk_max', - 'ds_grid_get_disk_mean','ds_grid_value_exists','ds_grid_value_x','ds_grid_value_y', - 'ds_grid_value_disk_exists','ds_grid_value_disk_x','ds_grid_value_disk_y', - // Creating particles - 'effect_create_below','effect_create_above','effect_clear', - 'part_type_create','part_type_destroy','part_type_exists','part_type_clear','part_type_shape', - 'part_type_sprite','part_type_size','part_type_scale', - 'part_type_orientation','part_type_color1','part_type_color2','part_type_color3', - 'part_type_color_mix','part_type_color_rgb','part_type_color_hsv', - 'part_type_alpha1','part_type_alpha2','part_type_alpha3','part_type_blend','part_type_life', - 'part_type_step','part_type_death','part_type_speed','part_type_direction','part_type_gravity', - 'part_system_create','part_system_destroy','part_system_exists','part_system_clear', - 'part_system_draw_order','part_system_depth','part_system_position', - 'part_system_automatic_update','part_system_automatic_draw','part_system_update', - 'part_system_drawit','part_particles_create','part_particles_create_color', - 'part_particles_clear','part_particles_count', - 'part_emitter_create','part_emitter_destroy','part_emitter_destroy_all','part_emitter_exists', - 'part_emitter_clear','part_emitter_region','part_emitter_burst','part_emitter_stream', - 'part_attractor_create','part_attractor_destroy','part_attractor_destroy_all', - 'part_attractor_exists','part_attractor_clear','part_attractor_position','part_attractor_force', - 'part_destroyer_create','part_destroyer_destroy','part_destroyer_destroy_all', - 'part_destroyer_exists','part_destroyer_clear','part_destroyer_region', - 'part_deflector_create','part_deflector_destroy','part_deflector_destroy_all', - 'part_deflector_exists','part_deflector_clear','part_deflector_region','part_deflector_kind', - 'part_deflector_friction', - 'part_changer_create','part_changer_destroy','part_changer_destroy_all','part_changer_exists', - 'part_changer_clear','part_changer_region','part_changer_types','part_changer_kind', - // Multiplayer games - 'mplay_init_ipx','mplay_init_tcpip','mplay_init_modem','mplay_init_serial', - 'mplay_connect_status','mplay_end','mplay_ipaddress', - 'mplay_session_create','mplay_session_find','mplay_session_name','mplay_session_join', - 'mplay_session_mode','mplay_session_status','mplay_session_end', - 'mplay_player_find','mplay_player_name','mplay_player_id', - 'mplay_data_write','mplay_data_read','mplay_data_mode', - 'mplay_message_send','mplay_message_send_guaranteed','mplay_message_receive','mplay_message_id', - 'mplay_message_value','mplay_message_player','mplay_message_name','mplay_message_count', - 'mplay_message_clear', - // Using DLL's - 'external_define','external_call','external_free','window_handle', - // 3D Graphics - 'd3d_start','d3d_end','d3d_set_hidden','d3d_set_perspective', - 'd3d_set_depth', - 'd3d_primitive_begin','d3d_vertex','d3d_vertex_color','d3d_primitive_end', - 'd3d_primitive_begin_texture','d3d_vertex_texture','d3d_vertex_texture_color','d3d_set_culling', - 'd3d_draw_block','d3d_draw_cylinder','d3d_draw_cone','d3d_draw_ellipsoid','d3d_draw_wall', - 'd3d_draw_floor', - 'd3d_set_projection','d3d_set_projection_ext','d3d_set_projection_ortho', - 'd3d_set_projection_perspective', - 'd3d_transform_set_identity','d3d_transform_set_translation','d3d_transform_set_scaling', - 'd3d_transform_set_rotation_x','d3d_transform_set_rotation_y','d3d_transform_set_rotation_z', - 'd3d_transform_set_rotation_axis','d3d_transform_add_translation','d3d_transform_add_scaling', - 'd3d_transform_add_rotation_x','d3d_transform_add_rotation_y','d3d_transform_add_rotation_z', - 'd3d_transform_add_rotation_axis','d3d_transform_stack_clear','d3d_transform_stack_empty', - 'd3d_transform_stack_push','d3d_transform_stack_pop','d3d_transform_stack_top', - 'd3d_transform_stack_discard', - 'd3d_set_fog', - 'd3d_set_lighting','d3d_set_shading','d3d_light_define_direction','d3d_light_define_point', - 'd3d_light_enable','d3d_vertex_normal','d3d_vertex_normal_color','d3d_vertex_normal_texture', - 'd3d_vertex_normal_texture_color', - 'd3d_model_create','d3d_model_destroy','d3d_model_clear','d3d_model_save','d3d_model_load', - 'd3d_model_draw','d3d_model_primitive_begin','d3d_model_vertex','d3d_model_vertex_color', - 'd3d_model_vertex_texture','d3d_model_vertex_texture_color','d3d_model_vertex_normal', - 'd3d_model_vertex_normal_color','d3d_model_vertex_normal_texture', - 'd3d_model_vertex_normal_texture_color','d3d_model_primitive_end','d3d_model_block', - 'd3d_model_cylinder','d3d_model_cone','d3d_model_ellipsoid','d3d_model_wall','d3d_model_floor' - ), - // constants - 4 => array( - 'true', 'false', 'pi', - 'ev_destroy','ev_step','ev_alarm','ev_keyboard','ev_mouse','ev_collision','ev_other','ev_draw', - 'ev_keypress','ev_keyrelease','ev_left_button','ev_right_button','ev_middle_button', - 'ev_no_button','ev_left_press','ev_right_press','ev_middle_press','ev_left_release', - 'ev_right_release','ev_middle_release','ev_mouse_enter','ev_mouse_leave','ev_mouse_wheel_up', - 'ev_mouse_wheel_down','ev_global_left_button','ev_global_right_button','ev_global_middle_button', - 'ev_global_left_press','ev_global_right_press','ev_global_middle_press','ev_global_left_release', - 'ev_global_right_release','ev_global_middle_release','ev_joystick1_left','ev_joystick1_right', - 'ev_joystick1_up','ev_joystick1_down','ev_joystick1_button1','ev_joystick1_button2', - 'ev_joystick1_button3','ev_joystick1_button4','ev_joystick1_button5','ev_joystick1_button6', - 'ev_joystick1_button7','ev_joystick1_button8','ev_joystick2_left','ev_joystick2_right', - 'ev_joystick2_up','ev_joystick2_down','ev_joystick2_button1','ev_joystick2_button2', - 'ev_joystick2_button3','ev_joystick2_button4','ev_joystick2_button5','ev_joystick2_button6', - 'ev_joystick2_button7','ev_joystick2_button8', - 'ev_outside','ev_boundary','ev_game_start','ev_game_end','ev_room_start','ev_room_end', - 'ev_no_more_lives','ev_no_more_health','ev_animation_end','ev_end_of_path','ev_user0','ev_user1', - 'ev_user2','ev_user3','ev_user4','ev_user5','ev_user6','ev_user7','ev_user8','ev_user9', - 'ev_user10','ev_user11','ev_user12','ev_user13','ev_user14','ev_user15','ev_step_normal', - 'ev_step_begin','ev_step_end', - 'vk_nokey','vk_anykey','vk_left','vk_right','vk_up','vk_down','vk_enter','vk_escape','vk_space', - 'vk_shift','vk_control','vk_alt','vk_backspace','vk_tab','vk_home','vk_end','vk_delete', - 'vk_insert','vk_pageup','vk_pagedown','vk_pause','vk_printscreen', - 'vk_f1','vk_f2','vk_f3','vk_f4','vk_f5','vk_f6','vk_f7','vk_f8','vk_f9','vk_f10','vk_f11','vk_f12', - 'vk_numpad0','vk_numpad1','vk_numpad2','vk_numpad3','vk_numpad4','vk_numpad5','vk_numpad6', - 'vk_numpad7','vk_numpad8','vk_numpad9', 'vk_multiply','vk_divide','vk_add','vk_subtract', - 'vk_decimal','vk_lshift','vk_lcontrol','vk_lalt','vk_rshift','vk_rcontrol','vk_ralt', - 'c_aqua','c_black','c_blue','c_dkgray','c_fuchsia','c_gray','c_green','c_lime','c_ltgray', - 'c_maroon','c_navy','c_olive','c_purple','c_red','c_silver','c_teal','c_white','c_yellow', - 'fa_left', 'fa_center','fa_right','fa_top','fa_middle','fa_bottom', - 'pr_pointlist','pr_linelist','pr_linestrip','pr_trianglelist','pr_trianglestrip', - 'pr_trianglefan', - 'cr_none','cr_arrow','cr_cross','cr_beam','cr_size_nesw','cr_size_ns','cr_size_nwse', - 'cr_size_we','cr_uparrow','cr_hourglass','cr_drag','cr_nodrop','cr_hsplit','cr_vsplit', - 'cr_multidrag','cr_sqlwait','cr_no','cr_appstart','cr_help','cr_handpoint','cr_size_all', - 'se_chorus','se_echo','se_flanger','se_gargle','se_reverb','se_compressor','se_equalizer', - 'fa_readonly','fa_hidden','fa_sysfile','fa_volumeid','fa_directory','fa_archive', - 'pt_shape_pixel','pt_shape_disk','pt_shape_square','pt_shape_line','pt_shape_star', - 'pt_shape_circle','pt_shape_ring','pt_shape_sphere','pt_shape_flare','pt_shape_spark', - 'pt_shape_explosion','pt_shape_cloud','pt_shape_smoke','pt_shape_snow', - 'ps_shape_rectangle','ps_shape_ellipse ','ps_shape_diamond','ps_shape_line', - 'ps_distr_linear','ps_distr_gaussian','ps_force_constant','ps_force_linear','ps_force_quadratic', - 'ps_deflect_horizontal', 'ps_deflect_vertical', - 'ps_change_motion','ps_change_shape','ps_change_all' - ), - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', - '&&', '||', '^^', '&', '|', '^', - '<', '<=', '==', '!=', '>', '>=', '=', - '<<', '>>', - '+=', '-=', '*=', '/=', - '+', '-', '*', '/', - '!', '~', ',', ';' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'font-weight: bold; color: #000000;', - 2 => 'font-weight: bold; color: #000000;', - 3 => 'color: navy;', - 4 => 'color: #663300;', - ), - 'COMMENTS' => array( - 1 => 'font-style: italic; color: green;', - 'MULTI' => 'font-style: italic; color: green;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' //'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #202020;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66; font-weight: bold;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/gnuplot.php b/_piecrust/libs/Geshi/geshi/gnuplot.php deleted file mode 100644 index 05e2601..0000000 --- a/_piecrust/libs/Geshi/geshi/gnuplot.php +++ /dev/null @@ -1,296 +0,0 @@ - 'Gnuplot', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('`', '"', "'"), - 'ESCAPE_CHAR' => '\\', - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | - GESHI_NUMBER_FLT_NONSCI | - GESHI_NUMBER_FLT_SCI_SHORT | - GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - // copy output of help command, indent properly and use this replace regexp: - // ([a-z0-9_\-]+)(( )+|$) => '\1',\3 - - // commands as found in `help commands` - 1 => array( - 'bind', 'call', 'cd', 'clear', - 'exit', 'fit', 'help', 'history', - 'if', 'load', 'lower', 'pause', - 'plot', 'print', 'pwd', 'quit', - 'raise', 'replot', 'reread', 'reset', - 'save', 'set', 'shell', 'show', - 'splot', 'system', 'test', 'unset', - 'update' - ), - 2 => array( - // set commands as returned by `help set` - 'angles', 'arrow', 'autoscale', 'bars', - 'bmargin', 'border', 'boxwidth', 'cbdata', - 'cbdtics', 'cblabel', 'cbmtics', 'cbrange', - 'cbtics', 'clabel', 'clip', 'cntrparam', - 'colorbox', 'contour', 'datafile', 'date_specifiers', - 'decimalsign', 'dgrid3d', 'dummy', 'encoding', - 'fontpath', 'format', 'grid', - 'hidden3d', 'historysize', 'isosamples', 'key', - 'label', 'lmargin', 'loadpath', 'locale', - 'log', 'logscale', 'macros', 'mapping', - 'margin', 'missing', 'mouse', 'multiplot', - 'mx2tics', 'mxtics', 'my2tics', 'mytics', - 'mztics', 'object', 'offsets', 'origin', - 'output', 'palette', 'parametric', 'pm3d', - 'pointsize', 'polar', 'rmargin', - 'rrange', 'samples', 'size', 'style', - 'surface', 'table', 'term', 'terminal', - 'termoption', 'tics', 'ticscale', 'ticslevel', - 'time_specifiers', 'timefmt', 'timestamp', 'title', - 'trange', 'urange', 'view', - 'vrange', 'x2data', 'x2dtics', 'x2label', - 'x2mtics', 'x2range', 'x2tics', 'x2zeroaxis', - 'xdata', 'xdtics', 'xlabel', 'xmtics', - 'xrange', 'xtics', 'xyplane', 'xzeroaxis', - 'y2data', 'y2dtics', 'y2label', 'y2mtics', - 'y2range', 'y2tics', 'y2zeroaxis', 'ydata', - 'ydtics', 'ylabel', 'ymtics', 'yrange', - 'ytics', 'yzeroaxis', 'zdata', 'zdtics', - 'zero', 'zeroaxis', 'zlabel', 'zmtics', - 'zrange', 'ztics', 'zzeroaxis', - // same but with leading no - 'noangles', 'noarrow', 'noautoscale', 'nobars', - 'nobmargin', 'noborder', 'noboxwidth', 'nocbdata', - 'nocbdtics', 'nocblabel', 'nocbmtics', 'nocbrange', - 'nocbtics', 'noclabel', 'noclip', 'nocntrparam', - 'nocolorbox', 'nocontour', 'nodatafile', 'nodate_specifiers', - 'nodecimalsign', 'nodgrid3d', 'nodummy', 'noencoding', - 'nofit', 'nofontpath', 'noformat', 'nogrid', - 'nohidden3d', 'nohistorysize', 'noisosamples', 'nokey', - 'nolabel', 'nolmargin', 'noloadpath', 'nolocale', - 'nolog', 'nologscale', 'nomacros', 'nomapping', - 'nomargin', 'nomissing', 'nomouse', 'nomultiplot', - 'nomx2tics', 'nomxtics', 'nomy2tics', 'nomytics', - 'nomztics', 'noobject', 'nooffsets', 'noorigin', - 'nooutput', 'nopalette', 'noparametric', 'nopm3d', - 'nopointsize', 'nopolar', 'noprint', 'normargin', - 'norrange', 'nosamples', 'nosize', 'nostyle', - 'nosurface', 'notable', 'noterm', 'noterminal', - 'notermoption', 'notics', 'noticscale', 'noticslevel', - 'notime_specifiers', 'notimefmt', 'notimestamp', 'notitle', - 'notmargin', 'notrange', 'nourange', 'noview', - 'novrange', 'nox2data', 'nox2dtics', 'nox2label', - 'nox2mtics', 'nox2range', 'nox2tics', 'nox2zeroaxis', - 'noxdata', 'noxdtics', 'noxlabel', 'noxmtics', - 'noxrange', 'noxtics', 'noxyplane', 'noxzeroaxis', - 'noy2data', 'noy2dtics', 'noy2label', 'noy2mtics', - 'noy2range', 'noy2tics', 'noy2zeroaxis', 'noydata', - 'noydtics', 'noylabel', 'noymtics', 'noyrange', - 'noytics', 'noyzeroaxis', 'nozdata', 'nozdtics', - 'nozero', 'nozeroaxis', 'nozlabel', 'nozmtics', - 'nozrange', 'noztics', 'nozzeroaxis', - ), - 3 => array( - // predefined variables - 'pi', 'NaN', 'GNUTERM', - 'GPVAL_X_MIN', 'GPVAL_X_MAX', 'GPVAL_Y_MIN', 'GPVAL_Y_MAX', - 'GPVAL_TERM', 'GPVAL_TERMOPTIONS', 'GPVAL_OUTPUT', - 'GPVAL_VERSION', 'GPVAL_PATcHLEVEL', 'GPVAL_COMPILE_OPTIONS', - 'MOUSE_KEY', 'MOUSE_X', 'MOUSE_X2', 'MOUSE_Y', 'MOUSE_Y2', - 'MOUSE_BUTTON', 'MOUSE_SHIFT', 'MOUSE_ALT', 'MOUSE_CTRL' - ), - 4 => array( - // predefined functions `help functions` - 'abs', 'acos', 'acosh', 'arg', - 'asin', 'asinh', 'atan', 'atan2', - 'atanh', 'besj0', 'besj1', 'besy0', - 'besy1', 'ceil', 'column', 'cos', - 'cosh', 'defined', 'erf', 'erfc', - 'exists', 'exp', 'floor', 'gamma', - 'gprintf', 'ibeta', 'igamma', 'imag', - 'int', 'inverf', 'invnorm', 'lambertw', - 'lgamma', 'log10', 'norm', - 'rand', 'random', 'real', 'sgn', - 'sin', 'sinh', 'sprintf', 'sqrt', - 'stringcolumn', 'strlen', 'strstrt', 'substr', - 'tan', 'tanh', 'timecolumn', - 'tm_hour', 'tm_mday', 'tm_min', 'tm_mon', - 'tm_sec', 'tm_wday', 'tm_yday', 'tm_year', - 'valid', 'word', 'words', - ), - 5 => array( - // mixed arguments - // there is no sane way to get these ones easily... - 'autofreq', 'x', 'y', 'z', - 'lt', 'linetype', 'lw', 'linewidth', 'ls', 'linestyle', - 'out', 'rotate by', 'screen', - 'enhanced', 'via', - // `help set key` - 'on', 'off', 'default', 'inside', 'outside', 'tmargin', - 'at', 'left', 'right', 'center', 'top', 'bottom', 'vertical', 'horizontal', 'Left', 'Right', - 'noreverse', 'reverse', 'noinvert', 'invert', 'samplen', 'spacing', 'width', 'height', - 'noautotitle', 'autotitle', 'noenhanced', 'nobox', 'box', - - // help set terminal postscript - 'landscape', 'portrait', 'eps', 'defaultplex', 'simplex', 'duplex', - 'fontfile', 'add', 'delete', 'nofontfiles', 'level1', 'leveldefault', - 'color', 'colour', 'monochrome', 'solid', 'dashed', 'dashlength', 'dl', - 'rounded', 'butt', 'palfuncparam', 'blacktext', 'colortext', 'colourtext', - 'font', - - // help set terminal png - 'notransparent', 'transparent', 'nointerlace', 'interlace', - 'notruecolor', 'truecolor', 'tiny', 'small', 'medium', 'large', 'giant', - 'nocrop', 'crop', - - // `help plot` - 'acsplines', 'bezier', 'binary', 'csplines', - 'every', - 'example', 'frequency', 'index', 'matrix', - 'ranges', 'sbezier', 'smooth', - 'special-filenames', 'thru', - 'unique', 'using', 'with', - - // `help plotting styles` - 'boxerrorbars', 'boxes', 'boxxyerrorbars', 'candlesticks', - 'dots', 'errorbars', 'errorlines', 'filledcurves', - 'financebars', 'fsteps', 'histeps', 'histograms', - 'image', 'impulses', 'labels', 'lines', - 'linespoints', 'points', 'rgbimage', 'steps', - 'vectors', 'xerrorbars', 'xerrorlines', 'xyerrorbars', - 'xyerrorlines', 'yerrorbars', 'yerrorlines', - - - // terminals `help terminals` - 'aed512', 'aed767', 'aifm', 'bitgraph', - 'cgm', 'corel', 'dumb', 'dxf', - 'eepic', 'emf', 'emtex', 'epslatex', - 'epson-180dpi', 'epson-60dpi', 'epson-lx800', 'fig', - 'gif', 'gpic', 'hp2623a', 'hp2648', - 'hp500c', 'hpdj', 'hpgl', 'hpljii', - 'hppj', 'imagen', 'jpeg', 'kc-tek40xx', - 'km-tek40xx', 'latex', 'mf', 'mif', - 'mp', 'nec-cp6', 'okidata', 'pbm', - 'pcl5', 'png', 'pop', 'postscript', - 'pslatex', 'pstex', 'pstricks', 'push', - 'qms', 'regis', 'selanar', 'starc', - 'svg', 'tandy-60dpi', 'tek40xx', 'tek410x', - 'texdraw', 'tgif', 'tkcanvas', 'tpic', - 'vttek', 'x11', 'xlib', - ) - ), - 'REGEXPS' => array( - //Variable assignment - 0 => "(?\w])([a-zA-Z_][a-zA-Z0-9_]*)\s*=", - //Numbers with unit - 1 => "(?<=^|\s)([0-9]*\.?[0-9]+\s*cm)" - ), - 'SYMBOLS' => array( - '-', '+', '~', '!', '$', - '*', '/', '%', '=', '<', '>', '&', - '^', '|', '.', 'eq', 'ne', '?:', ':', '`', ',' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #990000;', - 3 => 'color: #550000;', - 4 => 'color: #7a0874;', - 5 => 'color: #448888;' - ), - 'COMMENTS' => array( - 1 => 'color: #adadad; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight:bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000099; font-weight:bold;' - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;', - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #000; font-weight: bold;' - ), - 'REGEXPS' => array( - 0 => 'color: #007800;', - 1 => 'color: #cc66cc;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => 'http://www.google.com/search?q=%22set+{FNAME}%22+site%3Ahttp%3A%2F%2Fwww.gnuplot.info%2Fdocs%2F&btnI=lucky', - 3 => '', - 4 => '', - 5 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 4 => array( - 'DISALLOWED_AFTER' => "(?![\.\-a-zA-Z0-9_%])" - ) - ) - ), - 'TAB_WIDTH' => 4 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/go.php b/_piecrust/libs/Geshi/geshi/go.php deleted file mode 100644 index 941b74a..0000000 --- a/_piecrust/libs/Geshi/geshi/go.php +++ /dev/null @@ -1,396 +0,0 @@ - 'Go', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - # Raw strings (escapes and linebreaks ignored) - 2 => "#`[^`]*`#" - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"', "'"), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array( - 1 => "#\\\\[abfnrtv\\\\\'\"]#", - 2 => "#\\\\[0-7]{3}#", - 3 => "#\\\\x[0-9a-fA-F]{2}#", - 4 => "#\\\\u[0-9a-fA-F]{4}#", - 5 => "#\\\\U[0-9a-fA-F]{8}#" - ), - 'KEYWORDS' => array( - # statements - 1 => array( - 'break', 'case', 'const', 'continue', 'default', 'defer', 'else', - 'fallthrough', 'for', 'go', 'goto', 'if', 'import', 'package', - 'range', 'return', 'select', 'switch', 'type', 'var' - ), - # literals - 2 => array( - 'nil', 'true', 'false' - ), - # built-in functions - 3 => array( - 'close', 'closed', 'len', 'cap', 'new', 'make', 'copy', 'cmplx', - 'real', 'imag', 'panic', 'recover', 'print', 'println' - ), - # built-in types - 4 => array( - 'chan', 'func', 'interface', 'map', 'struct', 'bool', 'uint8', - 'uint16', 'uint32', 'uint64', 'int8', 'int16', 'int32', 'int64', - 'float32', 'float64', 'complex64', 'complex128', 'byte', 'uint', - 'int', 'float', 'complex', 'uintptr', 'string' - ), - # library types - 5 => array( - 'aes.Cipher', 'aes.KeySizeError', 'ascii85.CorruptInputError', 'asn1.BitString', - 'asn1.RawValue', 'asn1.StructuralError', 'asn1.SyntaxError', 'ast.ChanDir', - 'ast.Comment', 'ast.CommentGroup', 'ast.Decl', 'ast.Expr', 'ast.Field', - 'ast.FieldList', 'ast.File', 'ast.Filter', 'ast.MergeMode', 'ast.Node', - 'ast.ObjKind', 'ast.Object', 'ast.Package', 'ast.Scope', 'ast.Stmt', - 'ast.Visitor', 'av.Color', 'av.Image', 'av.Window', 'base64.CorruptInputError', - 'base64.Encoding', 'big.Int', 'big.Word', 'bignum.Integer', 'bignum.Rational', - 'binary.ByteOrder', 'block.Cipher', 'block.EAXTagError', 'blowfish.Cipher', - 'blowfish.KeySizeError', 'bufio.BufSizeError', 'bufio.Error', 'bufio.ReadWriter', - 'bufio.Reader', 'bufio.Writer', 'bytes.Buffer', 'datafmt.Environment', - 'datafmt.Format', 'datafmt.Formatter', 'datafmt.FormatterMap', 'datafmt.State', - 'doc.Filter', 'doc.FuncDoc', 'doc.PackageDoc', 'doc.TypeDoc', 'doc.ValueDoc', - 'draw.Color', 'draw.Context', 'draw.Image', 'draw.Mouse', 'draw.Op', - 'draw.Point', 'draw.Rectangle', 'dwarf.AddrType', 'dwarf.ArrayType', - 'dwarf.Attr', 'dwarf.BasicType', 'dwarf.BoolType', 'dwarf.CharType', - 'dwarf.CommonType', 'dwarf.ComplexType', 'dwarf.Data', 'dwarf.DecodeError', - 'dwarf.DotDotDotType', 'dwarf.Entry', 'dwarf.EnumType', 'dwarf.EnumValue', - 'dwarf.Field', 'dwarf.FloatType', 'dwarf.FuncType', 'dwarf.IntType', - 'dwarf.Offset', 'dwarf.PtrType', 'dwarf.QualType', 'dwarf.Reader', - 'dwarf.StructField', 'dwarf.StructType', 'dwarf.Tag', 'dwarf.Type', - 'dwarf.TypedefType', 'dwarf.UcharType', 'dwarf.UintType', 'dwarf.VoidType', - 'elf.Class', 'elf.Data', 'elf.Dyn32', 'elf.Dyn64', 'elf.DynFlag', 'elf.DynTag', - 'elf.File', 'elf.FileHeader', 'elf.FormatError', 'elf.Header32', 'elf.Header64', - 'elf.Machine', 'elf.NType', 'elf.OSABI', 'elf.Prog', 'elf.Prog32', 'elf.Prog64', - 'elf.ProgFlag', 'elf.ProgHeader', 'elf.ProgType', 'elf.R_386', 'elf.R_ALPHA', - 'elf.R_ARM', 'elf.R_PPC', 'elf.R_SPARC', 'elf.R_X86_64', 'elf.Rel32', - 'elf.Rel64', 'elf.Rela32', 'elf.Rela64', 'elf.Section', 'elf.Section32', - 'elf.Section64', 'elf.SectionFlag', 'elf.SectionHeader', 'elf.SectionIndex', - 'elf.SectionType', 'elf.Sym32', 'elf.Sym64', 'elf.SymBind', 'elf.SymType', - 'elf.SymVis', 'elf.Symbol', 'elf.Type', 'elf.Version', 'eval.ArrayType', - 'eval.ArrayValue', 'eval.BoolValue', 'eval.BoundedType', 'eval.ChanType', - 'eval.Code', 'eval.Constant', 'eval.Def', 'eval.DivByZeroError', - 'eval.FloatValue', 'eval.Frame', 'eval.Func', 'eval.FuncDecl', 'eval.FuncType', - 'eval.FuncValue', 'eval.IMethod', 'eval.IdealFloatValue', 'eval.IdealIntValue', - 'eval.IndexError', 'eval.IntValue', 'eval.Interface', 'eval.InterfaceType', - 'eval.InterfaceValue', 'eval.KeyError', 'eval.Map', 'eval.MapType', - 'eval.MapValue', 'eval.Method', 'eval.MultiType', 'eval.NamedType', - 'eval.NegativeCapacityError', 'eval.NegativeLengthError', 'eval.NilPointerError', - 'eval.PtrType', 'eval.PtrValue', 'eval.RedefinitionError', 'eval.Scope', - 'eval.Slice', 'eval.SliceError', 'eval.SliceType', 'eval.SliceValue', - 'eval.StringValue', 'eval.StructField', 'eval.StructType', 'eval.StructValue', - 'eval.Thread', 'eval.Type', 'eval.UintValue', 'eval.Value', 'eval.Variable', - 'eval.World', 'exec.Cmd', 'expvar.Int', 'expvar.IntFunc', 'expvar.KeyValue', - 'expvar.Map', 'expvar.String', 'expvar.StringFunc', 'expvar.Var', 'flag.Flag', - 'flag.Value', 'flate.CorruptInputError', 'flate.InternalError', - 'flate.ReadError', 'flate.Reader', 'flate.WriteError', 'flate.WrongValueError', - 'fmt.Formatter', 'fmt.GoStringer', 'fmt.State', 'fmt.Stringer', - 'git85.CorruptInputError', 'gob.Decoder', 'gob.Encoder', 'gosym.DecodingError', - 'gosym.Func', 'gosym.LineTable', 'gosym.Obj', 'gosym.Sym', 'gosym.Table', - 'gosym.UnknownFileError', 'gosym.UnknownLineError', 'gzip.Deflater', - 'gzip.Header', 'gzip.Inflater', 'hash.Hash', 'hash.Hash32', 'hash.Hash64', - 'heap.Interface', 'hex.InvalidHexCharError', 'hex.OddLengthInputError', - 'http.ClientConn', 'http.Conn', 'http.Handler', 'http.HandlerFunc', - 'http.ProtocolError', 'http.Request', 'http.Response', 'http.ServeMux', - 'http.ServerConn', 'http.URL', 'http.URLError', 'http.URLEscapeError', - 'image.Alpha', 'image.AlphaColor', 'image.Color', 'image.ColorImage', - 'image.ColorModel', 'image.ColorModelFunc', 'image.Image', 'image.NRGBA', - 'image.NRGBA64', 'image.NRGBA64Color', 'image.NRGBAColor', 'image.Paletted', - 'image.RGBA', 'image.RGBA64', 'image.RGBA64Color', 'image.RGBAColor', - 'io.Closer', 'io.Error', 'io.PipeReader', 'io.PipeWriter', 'io.ReadByter', - 'io.ReadCloser', 'io.ReadSeeker', 'io.ReadWriteCloser', 'io.ReadWriteSeeker', - 'io.ReadWriter', 'io.Reader', 'io.ReaderAt', 'io.ReaderFrom', 'io.SectionReader', - 'io.Seeker', 'io.WriteCloser', 'io.WriteSeeker', 'io.Writer', 'io.WriterAt', - 'io.WriterTo', 'iterable.Func', 'iterable.Group', 'iterable.Grouper', - 'iterable.Injector', 'iterable.Iterable', 'jpeg.FormatError', 'jpeg.Reader', - 'jpeg.UnsupportedError', 'json.Decoder', 'json.Encoder', - 'json.InvalidUnmarshalError', 'json.Marshaler', 'json.MarshalerError', - 'json.SyntaxError', 'json.UnmarshalTypeError', 'json.Unmarshaler', - 'json.UnsupportedTypeError', 'list.Element', 'list.List', 'log.Logger', - 'macho.Cpu', 'macho.File', 'macho.FileHeader', 'macho.FormatError', 'macho.Load', - 'macho.LoadCmd', 'macho.Regs386', 'macho.RegsAMD64', 'macho.Section', - 'macho.Section32', 'macho.Section64', 'macho.SectionHeader', 'macho.Segment', - 'macho.Segment32', 'macho.Segment64', 'macho.SegmentHeader', 'macho.Thread', - 'macho.Type', 'net.Addr', 'net.AddrError', 'net.Conn', 'net.DNSConfigError', - 'net.DNSError', 'net.Error', 'net.InvalidAddrError', 'net.InvalidConnError', - 'net.Listener', 'net.OpError', 'net.PacketConn', 'net.TCPAddr', 'net.TCPConn', - 'net.TCPListener', 'net.UDPAddr', 'net.UDPConn', 'net.UnixAddr', 'net.UnixConn', - 'net.UnixListener', 'net.UnknownNetworkError', 'net.UnknownSocketError', - 'netchan.Dir', 'netchan.Exporter', 'netchan.Importer', 'nntp.Article', - 'nntp.Conn', 'nntp.Error', 'nntp.Group', 'nntp.ProtocolError', 'ogle.Arch', - 'ogle.ArchAlignedMultiple', 'ogle.ArchLSB', 'ogle.Breakpoint', 'ogle.Event', - 'ogle.EventAction', 'ogle.EventHandler', 'ogle.EventHook', 'ogle.FormatError', - 'ogle.Frame', 'ogle.Goroutine', 'ogle.GoroutineCreate', 'ogle.GoroutineExit', - 'ogle.NoCurrentGoroutine', 'ogle.NotOnStack', 'ogle.Process', - 'ogle.ProcessNotStopped', 'ogle.ReadOnlyError', 'ogle.RemoteMismatchError', - 'ogle.UnknownArchitecture', 'ogle.UnknownGoroutine', 'ogle.UsageError', - 'os.Errno', 'os.Error', 'os.ErrorString', 'os.File', 'os.FileInfo', - 'os.LinkError', 'os.PathError', 'os.SyscallError', 'os.Waitmsg', 'patch.Diff', - 'patch.File', 'patch.GitBinaryLiteral', 'patch.Op', 'patch.Set', - 'patch.SyntaxError', 'patch.TextChunk', 'patch.Verb', 'path.Visitor', - 'pdp1.HaltError', 'pdp1.LoopError', 'pdp1.Trapper', 'pdp1.UnknownInstrError', - 'pdp1.Word', 'pem.Block', 'png.FormatError', 'png.IDATDecodingError', - 'png.UnsupportedError', 'printer.Config', 'printer.HTMLTag', 'printer.Styler', - 'proc.Breakpoint', 'proc.Cause', 'proc.Process', 'proc.ProcessExited', - 'proc.Regs', 'proc.Signal', 'proc.Stopped', 'proc.Thread', 'proc.ThreadCreate', - 'proc.ThreadExit', 'proc.Word', 'quick.CheckEqualError', 'quick.CheckError', - 'quick.Config', 'quick.Generator', 'quick.SetupError', 'rand.Rand', - 'rand.Source', 'rand.Zipf', 'rc4.Cipher', 'rc4.KeySizeError', - 'reflect.ArrayOrSliceType', 'reflect.ArrayOrSliceValue', 'reflect.ArrayType', - 'reflect.ArrayValue', 'reflect.BoolType', 'reflect.BoolValue', 'reflect.ChanDir', - 'reflect.ChanType', 'reflect.ChanValue', 'reflect.Complex128Type', - 'reflect.Complex128Value', 'reflect.Complex64Type', 'reflect.Complex64Value', - 'reflect.ComplexType', 'reflect.ComplexValue', 'reflect.Float32Type', - 'reflect.Float32Value', 'reflect.Float64Type', 'reflect.Float64Value', - 'reflect.FloatType', 'reflect.FloatValue', 'reflect.FuncType', - 'reflect.FuncValue', 'reflect.Int16Type', 'reflect.Int16Value', - 'reflect.Int32Type', 'reflect.Int32Value', 'reflect.Int64Type', - 'reflect.Int64Value', 'reflect.Int8Type', 'reflect.Int8Value', 'reflect.IntType', - 'reflect.IntValue', 'reflect.InterfaceType', 'reflect.InterfaceValue', - 'reflect.MapType', 'reflect.MapValue', 'reflect.Method', 'reflect.PtrType', - 'reflect.PtrValue', 'reflect.SliceHeader', 'reflect.SliceType', - 'reflect.SliceValue', 'reflect.StringHeader', 'reflect.StringType', - 'reflect.StringValue', 'reflect.StructField', 'reflect.StructType', - 'reflect.StructValue', 'reflect.Type', 'reflect.Uint16Type', - 'reflect.Uint16Value', 'reflect.Uint32Type', 'reflect.Uint32Value', - 'reflect.Uint64Type', 'reflect.Uint64Value', 'reflect.Uint8Type', - 'reflect.Uint8Value', 'reflect.UintType', 'reflect.UintValue', - 'reflect.UintptrType', 'reflect.UintptrValue', 'reflect.UnsafePointerType', - 'reflect.UnsafePointerValue', 'reflect.Value', 'regexp.Error', 'regexp.Regexp', - 'ring.Ring', 'rpc.Call', 'rpc.Client', 'rpc.ClientCodec', 'rpc.InvalidRequest', - 'rpc.Request', 'rpc.Response', 'rpc.ServerCodec', 'rsa.DecryptionError', - 'rsa.MessageTooLongError', 'rsa.PKCS1v15Hash', 'rsa.PrivateKey', 'rsa.PublicKey', - 'rsa.VerificationError', 'runtime.ArrayType', 'runtime.BoolType', - 'runtime.ChanDir', 'runtime.ChanType', 'runtime.Complex128Type', - 'runtime.Complex64Type', 'runtime.ComplexType', 'runtime.Error', - 'runtime.Float32Type', 'runtime.Float64Type', 'runtime.FloatType', - 'runtime.Func', 'runtime.FuncType', 'runtime.Int16Type', 'runtime.Int32Type', - 'runtime.Int64Type', 'runtime.Int8Type', 'runtime.IntType', - 'runtime.InterfaceType', 'runtime.Itable', 'runtime.MapType', - 'runtime.MemProfileRecord', 'runtime.MemStatsType', 'runtime.PtrType', - 'runtime.SliceType', 'runtime.StringType', 'runtime.StructType', 'runtime.Type', - 'runtime.TypeAssertionError', 'runtime.Uint16Type', 'runtime.Uint32Type', - 'runtime.Uint64Type', 'runtime.Uint8Type', 'runtime.UintType', - 'runtime.UintptrType', 'runtime.UnsafePointerType', 'scanner.Error', - 'scanner.ErrorHandler', 'scanner.ErrorVector', 'scanner.Position', - 'scanner.Scanner', 'script.Close', 'script.Closed', 'script.Event', - 'script.ReceivedUnexpected', 'script.Recv', 'script.RecvMatch', 'script.Send', - 'script.SetupError', 'signal.Signal', 'signal.UnixSignal', 'sort.Interface', - 'srpc.Client', 'srpc.Errno', 'srpc.Handler', 'srpc.RPC', 'strconv.NumError', - 'strings.Reader', 'sync.Mutex', 'sync.RWMutex', - 'syscall.ByHandleFileInformation', 'syscall.Cmsghdr', 'syscall.Dirent', - 'syscall.EpollEvent', 'syscall.Fbootstraptransfer_t', 'syscall.FdSet', - 'syscall.Filetime', 'syscall.Flock_t', 'syscall.Fstore_t', 'syscall.Iovec', - 'syscall.Kevent_t', 'syscall.Linger', 'syscall.Log2phys_t', 'syscall.Msghdr', - 'syscall.Overlapped', 'syscall.PtraceRegs', 'syscall.Radvisory_t', - 'syscall.RawSockaddr', 'syscall.RawSockaddrAny', 'syscall.RawSockaddrInet4', - 'syscall.RawSockaddrInet6', 'syscall.RawSockaddrUnix', 'syscall.Rlimit', - 'syscall.Rusage', 'syscall.Sockaddr', 'syscall.SockaddrInet4', - 'syscall.SockaddrInet6', 'syscall.SockaddrUnix', 'syscall.Stat_t', - 'syscall.Statfs_t', 'syscall.Sysinfo_t', 'syscall.Time_t', 'syscall.Timespec', - 'syscall.Timeval', 'syscall.Timex', 'syscall.Tms', 'syscall.Ustat_t', - 'syscall.Utimbuf', 'syscall.Utsname', 'syscall.WaitStatus', - 'syscall.Win32finddata', 'syslog.Priority', 'syslog.Writer', 'tabwriter.Writer', - 'tar.Header', 'tar.Reader', 'tar.Writer', 'template.Error', - 'template.FormatterMap', 'template.Template', 'testing.Benchmark', - 'testing.Regexp', 'testing.Test', 'time.ParseError', 'time.Ticker', 'time.Time', - 'tls.CASet', 'tls.Certificate', 'tls.Config', 'tls.Conn', 'tls.ConnectionState', - 'tls.Listener', 'token.Position', 'token.Token', 'unicode.CaseRange', - 'unicode.Range', 'unsafe.ArbitraryType', 'vector.LessInterface', - 'websocket.Conn', 'websocket.Draft75Handler', 'websocket.Handler', - 'websocket.ProtocolError', 'websocket.WebSocketAddr', 'x509.Certificate', - 'x509.ConstraintViolationError', 'x509.KeyUsage', 'x509.Name', - 'x509.PublicKeyAlgorithm', 'x509.SignatureAlgorithm', - 'x509.UnhandledCriticalExtension', 'x509.UnsupportedAlgorithmError', 'xml.Attr', - 'xml.EndElement', 'xml.Name', 'xml.Parser', 'xml.ProcInst', 'xml.StartElement', - 'xml.SyntaxError', 'xml.Token', 'xml.UnmarshalError', 'xtea.Cipher', - 'xtea.KeySizeError' - ) - ), - 'SYMBOLS' => array( - # delimiters - 1 => array( - '(', ')', '{', '}', '[', ']', ',', ':', ';' - ), - # assignments - 2 => array( - '<<=', '!=', '%=', '&=', '&^=', '*=', '+=', '-=', '/=', ':=', '>>=', - '^=', '|=', '=', '++', '--' - ), - # operators - 3 => array( - '<=', '<', '==', '>', '>=', '&&', '!', '||', '&', '&^', '|', '^', - '>>', '<<', '*', '%', '+', '-', '.', '/', '<-'), - # vararg - 4 => array( - '...' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - # statements - 1 => 'color: #b1b100; font-weight: bold;', - # literals - 2 => 'color: #000000; font-weight: bold;', - # built-in functions - 3 => 'color: #000066;', - # built-in types - 4 => 'color: #993333;', - # library types - 5 => 'color: #003399;' - ), - 'COMMENTS' => array( - # single-line comments - 1 => 'color: #666666; font-style: italic;', - # raw strings - 2 => 'color: #0000ff;', - # multi-line comments - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - # simple escape - 1 => 'color: #000099; font-weight: bold;', - # octal escape - 2 => 'color: #000099;', - # hex escape - 3 => 'color: #000099;', - # unicode escape - 4 => 'color: #000099;', - # long unicode escape - 5 => 'color: #000099;' - ), - 'BRACKETS' => array( - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;', - 0 => 'color: #cc66cc;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 0 => 'color: #004000;' - ), - 'SYMBOLS' => array( - # delimiters - 1 => 'color: #339933;', - # assignments - 2 => 'color: #339933;', - # operators - 3 => 'color: #339933;', - # vararg (highlighted as a keyword) - 4 => 'color: #000000; font-weight: bold;' - ), - 'REGEXPS' => array( - # If CSS classes are enabled, these would be highlighted as numbers (nu0) - # integer literals (possibly imaginary) - 0 => 'color: #cc66cc;', - # real floating point literals - 1 => 'color: #cc66cc;', - # imaginary floating point literals - 2 => 'color: #cc66cc;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => 'http://golang.org/search?q={FNAME}' - ), - 'REGEXPS' => array( - # integer literals (possibly imaginary) - 0 => array( - GESHI_SEARCH => '\b([1-9][0-9]+i?|0[0-7]*|0[xX][0-9a-f]+|0[0-9]*i)\b', - GESHI_REPLACE => '\0', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '', - GESHI_CLASS => 'nu0' - ), - # real floating point literals - 1 => array( - GESHI_SEARCH => '((?:\b\d+\.\d*(?:[Ee][+-]?\d+\b)?|\.\d+(?:[Ee][+-]?\d+)?\b|\b\d+[Ee][+-]?\d+\b)?)', - GESHI_REPLACE => '\0', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '', - GESHI_CLASS => 'nu0' - ), - # imaginary floating point literals - 2 => array( - GESHI_SEARCH => '((?:\b\d+\.\d*(?:[Ee][+-]?\d+)?|\.\d+(?:[Ee][+-]?\d+)?|\b\d+[Ee][+-]?\d+)?i\b)', - GESHI_REPLACE => '\0', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '', - GESHI_CLASS => 'nu0' - ) - # NB. "08" is an invalid number (octal), but "08i" is valid (complex). - ), -'OOLANG' => true, - 'OBJECT_SPLITTERS' => array(1 => '.'), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'BRACKETS' => GESHI_NEVER, # handled by symbols - 'NUMBERS' => GESHI_NEVER, # handled by regexp - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/groovy.php b/_piecrust/libs/Geshi/geshi/groovy.php deleted file mode 100644 index e6f8ae0..0000000 --- a/_piecrust/libs/Geshi/geshi/groovy.php +++ /dev/null @@ -1,1011 +0,0 @@ - 'Groovy', - 'COMMENT_SINGLE' => array(1 => '//', 3 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - //Import and Package directives (Basic Support only) - 2 => '/(?:(?<=import[\\n\\s])|(?<=package[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*([a-zA-Z0-9_]+|\*)(?=[\n\s;])/i', - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'''", '"""', "'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'case', 'do', 'else', 'for', 'foreach', 'if', 'in', 'switch', - 'while', - ), - 2 => array( - 'abstract', 'as', 'assert', 'break', 'catch', 'class', 'const', - 'continue', 'def', 'default', 'enum', 'extends', - 'false', 'final', 'finally', 'goto', 'implements', 'import', - 'instanceof', 'interface', 'native', 'new', 'null', - 'package', 'private', 'property', 'protected', - 'public', 'return', 'static', 'strictfp', 'super', - 'synchronized', 'this', 'throw', 'throws', - 'transient', 'true', 'try', 'volatile' - ), - 3 => array( - 'AbstractAction', 'AbstractBorder', 'AbstractButton', - 'AbstractCellEditor', 'AbstractCollection', - 'AbstractColorChooserPanel', 'AbstractDocument', - 'AbstractDocument.AttributeContext', - 'AbstractDocument.Content', - 'AbstractDocument.ElementEdit', - 'AbstractLayoutCache', - 'AbstractLayoutCache.NodeDimensions', 'AbstractList', - 'AbstractListModel', 'AbstractMap', - 'AbstractMethodError', 'AbstractSequentialList', - 'AbstractSet', 'AbstractTableModel', - 'AbstractUndoableEdit', 'AbstractWriter', - 'AccessControlContext', 'AccessControlException', - 'AccessController', 'AccessException', 'Accessible', - 'AccessibleAction', 'AccessibleBundle', - 'AccessibleComponent', 'AccessibleContext', - 'AccessibleHyperlink', 'AccessibleHypertext', - 'AccessibleIcon', 'AccessibleObject', - 'AccessibleRelation', 'AccessibleRelationSet', - 'AccessibleResourceBundle', 'AccessibleRole', - 'AccessibleSelection', 'AccessibleState', - 'AccessibleStateSet', 'AccessibleTable', - 'AccessibleTableModelChange', 'AccessibleText', - 'AccessibleValue', 'Acl', 'AclEntry', - 'AclNotFoundException', 'Action', 'ActionEvent', - 'ActionListener', 'ActionMap', 'ActionMapUIResource', - 'Activatable', 'ActivateFailedException', - 'ActivationDesc', 'ActivationException', - 'ActivationGroup', 'ActivationGroupDesc', - 'ActivationGroupDesc.CommandEnvironment', - 'ActivationGroupID', 'ActivationID', - 'ActivationInstantiator', 'ActivationMonitor', - 'ActivationSystem', 'Activator', 'ActiveEvent', - 'Adjustable', 'AdjustmentEvent', - 'AdjustmentListener', 'Adler32', 'AffineTransform', - 'AffineTransformOp', 'AlgorithmParameterGenerator', - 'AlgorithmParameterGeneratorSpi', - 'AlgorithmParameters', 'AlgorithmParameterSpec', - 'AlgorithmParametersSpi', 'AllPermission', - 'AlphaComposite', 'AlreadyBound', - 'AlreadyBoundException', 'AlreadyBoundHelper', - 'AlreadyBoundHolder', 'AncestorEvent', - 'AncestorListener', 'Annotation', 'Any', 'AnyHolder', - 'AnySeqHelper', 'AnySeqHolder', 'Applet', - 'AppletContext', 'AppletInitializer', 'AppletStub', - 'ApplicationException', 'Arc2D', 'Arc2D.Double', - 'Arc2D.Float', 'Area', 'AreaAveragingScaleFilter', - 'ARG_IN', 'ARG_INOUT', 'ARG_OUT', - 'ArithmeticException', 'Array', - 'ArrayIndexOutOfBoundsException', 'ArrayList', - 'Arrays', 'ArrayStoreException', 'AsyncBoxView', - 'Attribute', 'AttributedCharacterIterator', - 'AttributedCharacterIterator.Attribute', - 'AttributedString', 'AttributeInUseException', - 'AttributeList', 'AttributeModificationException', - 'Attributes', 'Attributes.Name', 'AttributeSet', - 'AttributeSet.CharacterAttribute', - 'AttributeSet.ColorAttribute', - 'AttributeSet.FontAttribute', - 'AttributeSet.ParagraphAttribute', 'AudioClip', - 'AudioFileFormat', 'AudioFileFormat.Type', - 'AudioFileReader', 'AudioFileWriter', 'AudioFormat', - 'AudioFormat.Encoding', 'AudioInputStream', - 'AudioPermission', 'AudioSystem', - 'AuthenticationException', - 'AuthenticationNotSupportedException', - 'Authenticator', 'Autoscroll', 'AWTError', - 'AWTEvent', 'AWTEventListener', - 'AWTEventMulticaster', 'AWTException', - 'AWTPermission', 'BadKind', 'BadLocationException', - 'BAD_CONTEXT', 'BAD_INV_ORDER', 'BAD_OPERATION', - 'BAD_PARAM', 'BAD_POLICY', 'BAD_POLICY_TYPE', - 'BAD_POLICY_VALUE', 'BAD_TYPECODE', 'BandCombineOp', - 'BandedSampleModel', 'BasicArrowButton', - 'BasicAttribute', 'BasicAttributes', 'BasicBorders', - 'BasicBorders.ButtonBorder', - 'BasicBorders.FieldBorder', - 'BasicBorders.MarginBorder', - 'BasicBorders.MenuBarBorder', - 'BasicBorders.RadioButtonBorder', - 'BasicBorders.SplitPaneBorder', - 'BasicBorders.ToggleButtonBorder', - 'BasicButtonListener', 'BasicButtonUI', - 'BasicCheckBoxMenuItemUI', 'BasicCheckBoxUI', - 'BasicColorChooserUI', 'BasicComboBoxEditor', - 'BasicComboBoxEditor.UIResource', - 'BasicComboBoxRenderer', - 'BasicComboBoxRenderer.UIResource', - 'BasicComboBoxUI', 'BasicComboPopup', - 'BasicDesktopIconUI', 'BasicDesktopPaneUI', - 'BasicDirectoryModel', 'BasicEditorPaneUI', - 'BasicFileChooserUI', 'BasicGraphicsUtils', - 'BasicHTML', 'BasicIconFactory', - 'BasicInternalFrameTitlePane', - 'BasicInternalFrameUI', 'BasicLabelUI', - 'BasicListUI', 'BasicLookAndFeel', 'BasicMenuBarUI', - 'BasicMenuItemUI', 'BasicMenuUI', - 'BasicOptionPaneUI', - 'BasicOptionPaneUI.ButtonAreaLayout', 'BasicPanelUI', - 'BasicPasswordFieldUI', 'BasicPermission', - 'BasicPopupMenuSeparatorUI', 'BasicPopupMenuUI', - 'BasicProgressBarUI', 'BasicRadioButtonMenuItemUI', - 'BasicRadioButtonUI', 'BasicRootPaneUI', - 'BasicScrollBarUI', 'BasicScrollPaneUI', - 'BasicSeparatorUI', 'BasicSliderUI', - 'BasicSplitPaneDivider', 'BasicSplitPaneUI', - 'BasicStroke', 'BasicTabbedPaneUI', - 'BasicTableHeaderUI', 'BasicTableUI', - 'BasicTextAreaUI', 'BasicTextFieldUI', - 'BasicTextPaneUI', 'BasicTextUI', - 'BasicTextUI.BasicCaret', - 'BasicTextUI.BasicHighlighter', - 'BasicToggleButtonUI', 'BasicToolBarSeparatorUI', - 'BasicToolBarUI', 'BasicToolTipUI', 'BasicTreeUI', - 'BasicViewportUI', 'BatchUpdateException', - 'BeanContext', 'BeanContextChild', - 'BeanContextChildComponentProxy', - 'BeanContextChildSupport', - 'BeanContextContainerProxy', 'BeanContextEvent', - 'BeanContextMembershipEvent', - 'BeanContextMembershipListener', 'BeanContextProxy', - 'BeanContextServiceAvailableEvent', - 'BeanContextServiceProvider', - 'BeanContextServiceProviderBeanInfo', - 'BeanContextServiceRevokedEvent', - 'BeanContextServiceRevokedListener', - 'BeanContextServices', 'BeanContextServicesListener', - 'BeanContextServicesSupport', - 'BeanContextServicesSupport.BCSSServiceProvider', - 'BeanContextSupport', - 'BeanContextSupport.BCSIterator', 'BeanDescriptor', - 'BeanInfo', 'Beans', 'BevelBorder', 'BigDecimal', - 'BigInteger', 'BinaryRefAddr', 'BindException', - 'Binding', 'BindingHelper', 'BindingHolder', - 'BindingIterator', 'BindingIteratorHelper', - 'BindingIteratorHolder', 'BindingIteratorOperations', - 'BindingListHelper', 'BindingListHolder', - 'BindingType', 'BindingTypeHelper', - 'BindingTypeHolder', 'BitSet', 'Blob', 'BlockView', - 'Book', 'Boolean', 'BooleanControl', - 'BooleanControl.Type', 'BooleanHolder', - 'BooleanSeqHelper', 'BooleanSeqHolder', 'Border', - 'BorderFactory', 'BorderLayout', 'BorderUIResource', - 'BorderUIResource.BevelBorderUIResource', - 'BorderUIResource.CompoundBorderUIResource', - 'BorderUIResource.EmptyBorderUIResource', - 'BorderUIResource.EtchedBorderUIResource', - 'BorderUIResource.LineBorderUIResource', - 'BorderUIResource.MatteBorderUIResource', - 'BorderUIResource.TitledBorderUIResource', - 'BoundedRangeModel', 'Bounds', 'Box', 'Box.Filler', - 'BoxedValueHelper', 'BoxLayout', 'BoxView', - 'BreakIterator', 'BufferedImage', - 'BufferedImageFilter', 'BufferedImageOp', - 'BufferedInputStream', 'BufferedOutputStream', - 'BufferedReader', 'BufferedWriter', 'Button', - 'ButtonGroup', 'ButtonModel', 'ButtonUI', 'Byte', - 'ByteArrayInputStream', 'ByteArrayOutputStream', - 'ByteHolder', 'ByteLookupTable', 'Calendar', - 'CallableStatement', 'CannotProceed', - 'CannotProceedException', 'CannotProceedHelper', - 'CannotProceedHolder', 'CannotRedoException', - 'CannotUndoException', 'Canvas', 'CardLayout', - 'Caret', 'CaretEvent', 'CaretListener', 'CellEditor', - 'CellEditorListener', 'CellRendererPane', - 'Certificate', 'Certificate.CertificateRep', - 'CertificateEncodingException', - 'CertificateException', - 'CertificateExpiredException', 'CertificateFactory', - 'CertificateFactorySpi', - 'CertificateNotYetValidException', - 'CertificateParsingException', - 'ChangedCharSetException', 'ChangeEvent', - 'ChangeListener', 'Character', 'Character.Subset', - 'Character.UnicodeBlock', 'CharacterIterator', - 'CharArrayReader', 'CharArrayWriter', - 'CharConversionException', 'CharHolder', - 'CharSeqHelper', 'CharSeqHolder', 'Checkbox', - 'CheckboxGroup', 'CheckboxMenuItem', - 'CheckedInputStream', 'CheckedOutputStream', - 'Checksum', 'Choice', 'ChoiceFormat', 'Class', - 'ClassCastException', 'ClassCircularityError', - 'ClassDesc', 'ClassFormatError', 'ClassLoader', - 'ClassNotFoundException', 'Clip', 'Clipboard', - 'ClipboardOwner', 'Clob', 'Cloneable', - 'CloneNotSupportedException', 'CMMException', - 'CodeSource', 'CollationElementIterator', - 'CollationKey', 'Collator', 'Collection', - 'Collections', 'Color', - 'ColorChooserComponentFactory', 'ColorChooserUI', - 'ColorConvertOp', 'ColorModel', - 'ColorSelectionModel', 'ColorSpace', - 'ColorUIResource', 'ComboBoxEditor', 'ComboBoxModel', - 'ComboBoxUI', 'ComboPopup', 'CommunicationException', - 'COMM_FAILURE', 'Comparable', 'Comparator', - 'Compiler', 'CompletionStatus', - 'CompletionStatusHelper', 'Component', - 'ComponentAdapter', 'ComponentColorModel', - 'ComponentEvent', 'ComponentInputMap', - 'ComponentInputMapUIResource', 'ComponentListener', - 'ComponentOrientation', 'ComponentSampleModel', - 'ComponentUI', 'ComponentView', 'Composite', - 'CompositeContext', 'CompositeName', 'CompositeView', - 'CompoundBorder', 'CompoundControl', - 'CompoundControl.Type', 'CompoundEdit', - 'CompoundName', 'ConcurrentModificationException', - 'ConfigurationException', 'ConnectException', - 'ConnectIOException', 'Connection', 'Constructor', - 'Container', 'ContainerAdapter', 'ContainerEvent', - 'ContainerListener', 'ContentHandler', - 'ContentHandlerFactory', 'ContentModel', 'Context', - 'ContextList', 'ContextNotEmptyException', - 'ContextualRenderedImageFactory', 'Control', - 'Control.Type', 'ControlFactory', - 'ControllerEventListener', 'ConvolveOp', 'CRC32', - 'CRL', 'CRLException', 'CropImageFilter', 'CSS', - 'CSS.Attribute', 'CTX_RESTRICT_SCOPE', - 'CubicCurve2D', 'CubicCurve2D.Double', - 'CubicCurve2D.Float', 'Current', 'CurrentHelper', - 'CurrentHolder', 'CurrentOperations', 'Cursor', - 'Customizer', 'CustomMarshal', 'CustomValue', - 'DatabaseMetaData', 'DataBuffer', 'DataBufferByte', - 'DataBufferInt', 'DataBufferShort', - 'DataBufferUShort', 'DataFlavor', - 'DataFormatException', 'DatagramPacket', - 'DatagramSocket', 'DatagramSocketImpl', - 'DatagramSocketImplFactory', 'DataInput', - 'DataInputStream', 'DataLine', 'DataLine.Info', - 'DataOutput', 'DataOutputStream', 'DataTruncation', - 'DATA_CONVERSION', 'Date', 'DateFormat', - 'DateFormatSymbols', 'DebugGraphics', - 'DecimalFormat', 'DecimalFormatSymbols', - 'DefaultBoundedRangeModel', 'DefaultButtonModel', - 'DefaultCaret', 'DefaultCellEditor', - 'DefaultColorSelectionModel', 'DefaultComboBoxModel', - 'DefaultDesktopManager', 'DefaultEditorKit', - 'DefaultEditorKit.BeepAction', - 'DefaultEditorKit.CopyAction', - 'DefaultEditorKit.CutAction', - 'DefaultEditorKit.DefaultKeyTypedAction', - 'DefaultEditorKit.InsertBreakAction', - 'DefaultEditorKit.InsertContentAction', - 'DefaultEditorKit.InsertTabAction', - 'DefaultEditorKit.PasteAction,', - 'DefaultFocusManager', 'DefaultHighlighter', - 'DefaultHighlighter.DefaultHighlightPainter', - 'DefaultListCellRenderer', - 'DefaultListCellRenderer.UIResource', - 'DefaultListModel', 'DefaultListSelectionModel', - 'DefaultMenuLayout', 'DefaultMetalTheme', - 'DefaultMutableTreeNode', - 'DefaultSingleSelectionModel', - 'DefaultStyledDocument', - 'DefaultStyledDocument.AttributeUndoableEdit', - 'DefaultStyledDocument.ElementSpec', - 'DefaultTableCellRenderer', - 'DefaultTableCellRenderer.UIResource', - 'DefaultTableColumnModel', 'DefaultTableModel', - 'DefaultTextUI', 'DefaultTreeCellEditor', - 'DefaultTreeCellRenderer', 'DefaultTreeModel', - 'DefaultTreeSelectionModel', 'DefinitionKind', - 'DefinitionKindHelper', 'Deflater', - 'DeflaterOutputStream', 'Delegate', 'DesignMode', - 'DesktopIconUI', 'DesktopManager', 'DesktopPaneUI', - 'DGC', 'Dialog', 'Dictionary', 'DigestException', - 'DigestInputStream', 'DigestOutputStream', - 'Dimension', 'Dimension2D', 'DimensionUIResource', - 'DirContext', 'DirectColorModel', 'DirectoryManager', - 'DirObjectFactory', 'DirStateFactory', - 'DirStateFactory.Result', 'DnDConstants', 'Document', - 'DocumentEvent', 'DocumentEvent.ElementChange', - 'DocumentEvent.EventType', 'DocumentListener', - 'DocumentParser', 'DomainCombiner', 'DomainManager', - 'DomainManagerOperations', 'Double', 'DoubleHolder', - 'DoubleSeqHelper', 'DoubleSeqHolder', - 'DragGestureEvent', 'DragGestureListener', - 'DragGestureRecognizer', 'DragSource', - 'DragSourceContext', 'DragSourceDragEvent', - 'DragSourceDropEvent', 'DragSourceEvent', - 'DragSourceListener', 'Driver', 'DriverManager', - 'DriverPropertyInfo', 'DropTarget', - 'DropTarget.DropTargetAutoScroller', - 'DropTargetContext', 'DropTargetDragEvent', - 'DropTargetDropEvent', 'DropTargetEvent', - 'DropTargetListener', 'DSAKey', - 'DSAKeyPairGenerator', 'DSAParameterSpec', - 'DSAParams', 'DSAPrivateKey', 'DSAPrivateKeySpec', - 'DSAPublicKey', 'DSAPublicKeySpec', 'DTD', - 'DTDConstants', 'DynamicImplementation', 'DynAny', - 'DynArray', 'DynEnum', 'DynFixed', 'DynSequence', - 'DynStruct', 'DynUnion', 'DynValue', 'EditorKit', - 'Element', 'ElementIterator', 'Ellipse2D', - 'Ellipse2D.Double', 'Ellipse2D.Float', 'EmptyBorder', - 'EmptyStackException', 'EncodedKeySpec', 'Entity', - 'EnumControl', 'EnumControl.Type', 'Enumeration', - 'Environment', 'EOFException', 'Error', - 'EtchedBorder', 'Event', 'EventContext', - 'EventDirContext', 'EventListener', - 'EventListenerList', 'EventObject', 'EventQueue', - 'EventSetDescriptor', 'Exception', - 'ExceptionInInitializerError', 'ExceptionList', - 'ExpandVetoException', 'ExportException', - 'ExtendedRequest', 'ExtendedResponse', - 'Externalizable', 'FeatureDescriptor', 'Field', - 'FieldNameHelper', 'FieldPosition', 'FieldView', - 'File', 'FileChooserUI', 'FileDescriptor', - 'FileDialog', 'FileFilter', 'FileInputStream', - 'FilenameFilter', 'FileNameMap', - 'FileNotFoundException', 'FileOutputStream', - 'FilePermission', 'FileReader', 'FileSystemView', - 'FileView', 'FileWriter', 'FilteredImageSource', - 'FilterInputStream', 'FilterOutputStream', - 'FilterReader', 'FilterWriter', - 'FixedHeightLayoutCache', 'FixedHolder', - 'FlatteningPathIterator', 'FlavorMap', 'Float', - 'FloatControl', 'FloatControl.Type', 'FloatHolder', - 'FloatSeqHelper', 'FloatSeqHolder', 'FlowLayout', - 'FlowView', 'FlowView.FlowStrategy', 'FocusAdapter', - 'FocusEvent', 'FocusListener', 'FocusManager', - 'Font', 'FontFormatException', 'FontMetrics', - 'FontRenderContext', 'FontUIResource', 'Format', - 'FormatConversionProvider', 'FormView', 'Frame', - 'FREE_MEM', 'GapContent', 'GeneralPath', - 'GeneralSecurityException', 'GlyphJustificationInfo', - 'GlyphMetrics', 'GlyphVector', 'GlyphView', - 'GlyphView.GlyphPainter', 'GradientPaint', - 'GraphicAttribute', 'Graphics', 'Graphics2D', - 'GraphicsConfigTemplate', 'GraphicsConfiguration', - 'GraphicsDevice', 'GraphicsEnvironment', - 'GrayFilter', 'GregorianCalendar', - 'GridBagConstraints', 'GridBagLayout', 'GridLayout', - 'Group', 'Guard', 'GuardedObject', 'GZIPInputStream', - 'GZIPOutputStream', 'HasControls', 'HashMap', - 'HashSet', 'Hashtable', 'HierarchyBoundsAdapter', - 'HierarchyBoundsListener', 'HierarchyEvent', - 'HierarchyListener', 'Highlighter', - 'Highlighter.Highlight', - 'Highlighter.HighlightPainter', 'HTML', - 'HTML.Attribute', 'HTML.Tag', 'HTML.UnknownTag', - 'HTMLDocument', 'HTMLDocument.Iterator', - 'HTMLEditorKit', 'HTMLEditorKit.HTMLFactory', - 'HTMLEditorKit.HTMLTextAction', - 'HTMLEditorKit.InsertHTMLTextAction', - 'HTMLEditorKit.LinkController', - 'HTMLEditorKit.Parser', - 'HTMLEditorKit.ParserCallback', - 'HTMLFrameHyperlinkEvent', 'HTMLWriter', - 'HttpURLConnection', 'HyperlinkEvent', - 'HyperlinkEvent.EventType', 'HyperlinkListener', - 'ICC_ColorSpace', 'ICC_Profile', 'ICC_ProfileGray', - 'ICC_ProfileRGB', 'Icon', 'IconUIResource', - 'IconView', 'IdentifierHelper', 'Identity', - 'IdentityScope', 'IDLEntity', 'IDLType', - 'IDLTypeHelper', 'IDLTypeOperations', - 'IllegalAccessError', 'IllegalAccessException', - 'IllegalArgumentException', - 'IllegalComponentStateException', - 'IllegalMonitorStateException', - 'IllegalPathStateException', 'IllegalStateException', - 'IllegalThreadStateException', 'Image', - 'ImageConsumer', 'ImageFilter', - 'ImageGraphicAttribute', 'ImageIcon', - 'ImageObserver', 'ImageProducer', - 'ImagingOpException', 'IMP_LIMIT', - 'IncompatibleClassChangeError', - 'InconsistentTypeCode', 'IndexColorModel', - 'IndexedPropertyDescriptor', - 'IndexOutOfBoundsException', 'IndirectionException', - 'InetAddress', 'Inflater', 'InflaterInputStream', - 'InheritableThreadLocal', 'InitialContext', - 'InitialContextFactory', - 'InitialContextFactoryBuilder', 'InitialDirContext', - 'INITIALIZE', 'Initializer', 'InitialLdapContext', - 'InlineView', 'InputContext', 'InputEvent', - 'InputMap', 'InputMapUIResource', 'InputMethod', - 'InputMethodContext', 'InputMethodDescriptor', - 'InputMethodEvent', 'InputMethodHighlight', - 'InputMethodListener', 'InputMethodRequests', - 'InputStream', 'InputStreamReader', 'InputSubset', - 'InputVerifier', 'Insets', 'InsetsUIResource', - 'InstantiationError', 'InstantiationException', - 'Instrument', 'InsufficientResourcesException', - 'Integer', 'INTERNAL', 'InternalError', - 'InternalFrameAdapter', 'InternalFrameEvent', - 'InternalFrameListener', 'InternalFrameUI', - 'InterruptedException', 'InterruptedIOException', - 'InterruptedNamingException', 'INTF_REPOS', - 'IntHolder', 'IntrospectionException', - 'Introspector', 'Invalid', - 'InvalidAlgorithmParameterException', - 'InvalidAttributeIdentifierException', - 'InvalidAttributesException', - 'InvalidAttributeValueException', - 'InvalidClassException', - 'InvalidDnDOperationException', - 'InvalidKeyException', 'InvalidKeySpecException', - 'InvalidMidiDataException', 'InvalidName', - 'InvalidNameException', 'InvalidNameHelper', - 'InvalidNameHolder', 'InvalidObjectException', - 'InvalidParameterException', - 'InvalidParameterSpecException', - 'InvalidSearchControlsException', - 'InvalidSearchFilterException', 'InvalidSeq', - 'InvalidTransactionException', 'InvalidValue', - 'INVALID_TRANSACTION', 'InvocationEvent', - 'InvocationHandler', 'InvocationTargetException', - 'InvokeHandler', 'INV_FLAG', 'INV_IDENT', - 'INV_OBJREF', 'INV_POLICY', 'IOException', - 'IRObject', 'IRObjectOperations', 'IstringHelper', - 'ItemEvent', 'ItemListener', 'ItemSelectable', - 'Iterator', 'JApplet', 'JarEntry', 'JarException', - 'JarFile', 'JarInputStream', 'JarOutputStream', - 'JarURLConnection', 'JButton', 'JCheckBox', - 'JCheckBoxMenuItem', 'JColorChooser', 'JComboBox', - 'JComboBox.KeySelectionManager', 'JComponent', - 'JDesktopPane', 'JDialog', 'JEditorPane', - 'JFileChooser', 'JFrame', 'JInternalFrame', - 'JInternalFrame.JDesktopIcon', 'JLabel', - 'JLayeredPane', 'JList', 'JMenu', 'JMenuBar', - 'JMenuItem', 'JobAttributes', - 'JobAttributes.DefaultSelectionType', - 'JobAttributes.DestinationType', - 'JobAttributes.DialogType', - 'JobAttributes.MultipleDocumentHandlingType', - 'JobAttributes.SidesType', 'JOptionPane', 'JPanel', - 'JPasswordField', 'JPopupMenu', - 'JPopupMenu.Separator', 'JProgressBar', - 'JRadioButton', 'JRadioButtonMenuItem', 'JRootPane', - 'JScrollBar', 'JScrollPane', 'JSeparator', 'JSlider', - 'JSplitPane', 'JTabbedPane', 'JTable', - 'JTableHeader', 'JTextArea', 'JTextComponent', - 'JTextComponent.KeyBinding', 'JTextField', - 'JTextPane', 'JToggleButton', - 'JToggleButton.ToggleButtonModel', 'JToolBar', - 'JToolBar.Separator', 'JToolTip', 'JTree', - 'JTree.DynamicUtilTreeNode', - 'JTree.EmptySelectionModel', 'JViewport', 'JWindow', - 'Kernel', 'Key', 'KeyAdapter', 'KeyEvent', - 'KeyException', 'KeyFactory', 'KeyFactorySpi', - 'KeyListener', 'KeyManagementException', 'Keymap', - 'KeyPair', 'KeyPairGenerator', 'KeyPairGeneratorSpi', - 'KeySpec', 'KeyStore', 'KeyStoreException', - 'KeyStoreSpi', 'KeyStroke', 'Label', 'LabelUI', - 'LabelView', 'LastOwnerException', - 'LayeredHighlighter', - 'LayeredHighlighter.LayerPainter', 'LayoutManager', - 'LayoutManager2', 'LayoutQueue', 'LdapContext', - 'LdapReferralException', 'Lease', - 'LimitExceededException', 'Line', 'Line.Info', - 'Line2D', 'Line2D.Double', 'Line2D.Float', - 'LineBorder', 'LineBreakMeasurer', 'LineEvent', - 'LineEvent.Type', 'LineListener', 'LineMetrics', - 'LineNumberInputStream', 'LineNumberReader', - 'LineUnavailableException', 'LinkageError', - 'LinkedList', 'LinkException', 'LinkLoopException', - 'LinkRef', 'List', 'ListCellRenderer', - 'ListDataEvent', 'ListDataListener', 'ListIterator', - 'ListModel', 'ListResourceBundle', - 'ListSelectionEvent', 'ListSelectionListener', - 'ListSelectionModel', 'ListUI', 'ListView', - 'LoaderHandler', 'Locale', 'LocateRegistry', - 'LogStream', 'Long', 'LongHolder', - 'LongLongSeqHelper', 'LongLongSeqHolder', - 'LongSeqHelper', 'LongSeqHolder', 'LookAndFeel', - 'LookupOp', 'LookupTable', 'MalformedLinkException', - 'MalformedURLException', 'Manifest', 'Map', - 'Map.Entry', 'MARSHAL', 'MarshalException', - 'MarshalledObject', 'Math', 'MatteBorder', - 'MediaTracker', 'Member', 'MemoryImageSource', - 'Menu', 'MenuBar', 'MenuBarUI', 'MenuComponent', - 'MenuContainer', 'MenuDragMouseEvent', - 'MenuDragMouseListener', 'MenuElement', 'MenuEvent', - 'MenuItem', 'MenuItemUI', 'MenuKeyEvent', - 'MenuKeyListener', 'MenuListener', - 'MenuSelectionManager', 'MenuShortcut', - 'MessageDigest', 'MessageDigestSpi', 'MessageFormat', - 'MetaEventListener', 'MetalBorders', - 'MetalBorders.ButtonBorder', - 'MetalBorders.Flush3DBorder', - 'MetalBorders.InternalFrameBorder', - 'MetalBorders.MenuBarBorder', - 'MetalBorders.MenuItemBorder', - 'MetalBorders.OptionDialogBorder', - 'MetalBorders.PaletteBorder', - 'MetalBorders.PopupMenuBorder', - 'MetalBorders.RolloverButtonBorder', - 'MetalBorders.ScrollPaneBorder', - 'MetalBorders.TableHeaderBorder', - 'MetalBorders.TextFieldBorder', - 'MetalBorders.ToggleButtonBorder', - 'MetalBorders.ToolBarBorder', 'MetalButtonUI', - 'MetalCheckBoxIcon', 'MetalCheckBoxUI', - 'MetalComboBoxButton', 'MetalComboBoxEditor', - 'MetalComboBoxEditor.UIResource', - 'MetalComboBoxIcon', 'MetalComboBoxUI', - 'MetalDesktopIconUI', 'MetalFileChooserUI', - 'MetalIconFactory', 'MetalIconFactory.FileIcon16', - 'MetalIconFactory.FolderIcon16', - 'MetalIconFactory.PaletteCloseIcon', - 'MetalIconFactory.TreeControlIcon', - 'MetalIconFactory.TreeFolderIcon', - 'MetalIconFactory.TreeLeafIcon', - 'MetalInternalFrameTitlePane', - 'MetalInternalFrameUI', 'MetalLabelUI', - 'MetalLookAndFeel', 'MetalPopupMenuSeparatorUI', - 'MetalProgressBarUI', 'MetalRadioButtonUI', - 'MetalScrollBarUI', 'MetalScrollButton', - 'MetalScrollPaneUI', 'MetalSeparatorUI', - 'MetalSliderUI', 'MetalSplitPaneUI', - 'MetalTabbedPaneUI', 'MetalTextFieldUI', - 'MetalTheme', 'MetalToggleButtonUI', - 'MetalToolBarUI', 'MetalToolTipUI', 'MetalTreeUI', - 'MetaMessage', 'Method', 'MethodDescriptor', - 'MidiChannel', 'MidiDevice', 'MidiDevice.Info', - 'MidiDeviceProvider', 'MidiEvent', 'MidiFileFormat', - 'MidiFileReader', 'MidiFileWriter', 'MidiMessage', - 'MidiSystem', 'MidiUnavailableException', - 'MimeTypeParseException', 'MinimalHTMLWriter', - 'MissingResourceException', 'Mixer', 'Mixer.Info', - 'MixerProvider', 'ModificationItem', 'Modifier', - 'MouseAdapter', 'MouseDragGestureRecognizer', - 'MouseEvent', 'MouseInputAdapter', - 'MouseInputListener', 'MouseListener', - 'MouseMotionAdapter', 'MouseMotionListener', - 'MultiButtonUI', 'MulticastSocket', - 'MultiColorChooserUI', 'MultiComboBoxUI', - 'MultiDesktopIconUI', 'MultiDesktopPaneUI', - 'MultiFileChooserUI', 'MultiInternalFrameUI', - 'MultiLabelUI', 'MultiListUI', 'MultiLookAndFeel', - 'MultiMenuBarUI', 'MultiMenuItemUI', - 'MultiOptionPaneUI', 'MultiPanelUI', - 'MultiPixelPackedSampleModel', 'MultipleMaster', - 'MultiPopupMenuUI', 'MultiProgressBarUI', - 'MultiScrollBarUI', 'MultiScrollPaneUI', - 'MultiSeparatorUI', 'MultiSliderUI', - 'MultiSplitPaneUI', 'MultiTabbedPaneUI', - 'MultiTableHeaderUI', 'MultiTableUI', 'MultiTextUI', - 'MultiToolBarUI', 'MultiToolTipUI', 'MultiTreeUI', - 'MultiViewportUI', 'MutableAttributeSet', - 'MutableComboBoxModel', 'MutableTreeNode', 'Name', - 'NameAlreadyBoundException', 'NameClassPair', - 'NameComponent', 'NameComponentHelper', - 'NameComponentHolder', 'NamedValue', 'NameHelper', - 'NameHolder', 'NameNotFoundException', 'NameParser', - 'NamespaceChangeListener', 'NameValuePair', - 'NameValuePairHelper', 'Naming', 'NamingContext', - 'NamingContextHelper', 'NamingContextHolder', - 'NamingContextOperations', 'NamingEnumeration', - 'NamingEvent', 'NamingException', - 'NamingExceptionEvent', 'NamingListener', - 'NamingManager', 'NamingSecurityException', - 'NegativeArraySizeException', 'NetPermission', - 'NoClassDefFoundError', 'NoInitialContextException', - 'NoninvertibleTransformException', - 'NoPermissionException', 'NoRouteToHostException', - 'NoSuchAlgorithmException', - 'NoSuchAttributeException', 'NoSuchElementException', - 'NoSuchFieldError', 'NoSuchFieldException', - 'NoSuchMethodError', 'NoSuchMethodException', - 'NoSuchObjectException', 'NoSuchProviderException', - 'NotActiveException', 'NotBoundException', - 'NotContextException', 'NotEmpty', 'NotEmptyHelper', - 'NotEmptyHolder', 'NotFound', 'NotFoundHelper', - 'NotFoundHolder', 'NotFoundReason', - 'NotFoundReasonHelper', 'NotFoundReasonHolder', - 'NotOwnerException', 'NotSerializableException', - 'NO_IMPLEMENT', 'NO_MEMORY', 'NO_PERMISSION', - 'NO_RESOURCES', 'NO_RESPONSE', - 'NullPointerException', 'Number', 'NumberFormat', - 'NumberFormatException', 'NVList', 'Object', - 'ObjectChangeListener', 'ObjectFactory', - 'ObjectFactoryBuilder', 'ObjectHelper', - 'ObjectHolder', 'ObjectImpl', 'ObjectInput', - 'ObjectInputStream', 'ObjectInputStream.GetField', - 'ObjectInputValidation', 'ObjectOutput', - 'ObjectOutputStream', 'ObjectOutputStream.PutField', - 'ObjectStreamClass', 'ObjectStreamConstants', - 'ObjectStreamException', 'ObjectStreamField', - 'ObjectView', 'OBJECT_NOT_EXIST', 'ObjID', - 'OBJ_ADAPTER', 'Observable', 'Observer', - 'OctetSeqHelper', 'OctetSeqHolder', 'OMGVMCID', - 'OpenType', 'Operation', - 'OperationNotSupportedException', 'Option', - 'OptionalDataException', 'OptionPaneUI', 'ORB', - 'OutOfMemoryError', 'OutputStream', - 'OutputStreamWriter', 'OverlayLayout', 'Owner', - 'Package', 'PackedColorModel', 'Pageable', - 'PageAttributes', 'PageAttributes.ColorType', - 'PageAttributes.MediaType', - 'PageAttributes.OrientationRequestedType', - 'PageAttributes.OriginType', - 'PageAttributes.PrintQualityType', 'PageFormat', - 'Paint', 'PaintContext', 'PaintEvent', 'Panel', - 'PanelUI', 'Paper', 'ParagraphView', - 'ParameterBlock', 'ParameterDescriptor', - 'ParseException', 'ParsePosition', 'Parser', - 'ParserDelegator', 'PartialResultException', - 'PasswordAuthentication', 'PasswordView', 'Patch', - 'PathIterator', 'Permission', 'PermissionCollection', - 'Permissions', 'PERSIST_STORE', 'PhantomReference', - 'PipedInputStream', 'PipedOutputStream', - 'PipedReader', 'PipedWriter', 'PixelGrabber', - 'PixelInterleavedSampleModel', 'PKCS8EncodedKeySpec', - 'PlainDocument', 'PlainView', 'Point', 'Point2D', - 'Point2D.Double', 'Point2D.Float', 'Policy', - 'PolicyError', 'PolicyHelper', 'PolicyHolder', - 'PolicyListHelper', 'PolicyListHolder', - 'PolicyOperations', 'PolicyTypeHelper', 'Polygon', - 'PopupMenu', 'PopupMenuEvent', 'PopupMenuListener', - 'PopupMenuUI', 'Port', 'Port.Info', - 'PortableRemoteObject', - 'PortableRemoteObjectDelegate', 'Position', - 'Position.Bias', 'PreparedStatement', 'Principal', - 'PrincipalHolder', 'Printable', - 'PrinterAbortException', 'PrinterException', - 'PrinterGraphics', 'PrinterIOException', - 'PrinterJob', 'PrintGraphics', 'PrintJob', - 'PrintStream', 'PrintWriter', 'PrivateKey', - 'PRIVATE_MEMBER', 'PrivilegedAction', - 'PrivilegedActionException', - 'PrivilegedExceptionAction', 'Process', - 'ProfileDataException', 'ProgressBarUI', - 'ProgressMonitor', 'ProgressMonitorInputStream', - 'Properties', 'PropertyChangeEvent', - 'PropertyChangeListener', 'PropertyChangeSupport', - 'PropertyDescriptor', 'PropertyEditor', - 'PropertyEditorManager', 'PropertyEditorSupport', - 'PropertyPermission', 'PropertyResourceBundle', - 'PropertyVetoException', 'ProtectionDomain', - 'ProtocolException', 'Provider', 'ProviderException', - 'Proxy', 'PublicKey', 'PUBLIC_MEMBER', - 'PushbackInputStream', 'PushbackReader', - 'QuadCurve2D', 'QuadCurve2D.Double', - 'QuadCurve2D.Float', 'Random', 'RandomAccessFile', - 'Raster', 'RasterFormatException', 'RasterOp', - 'Reader', 'Receiver', 'Rectangle', 'Rectangle2D', - 'Rectangle2D.Double', 'Rectangle2D.Float', - 'RectangularShape', 'Ref', 'RefAddr', 'Reference', - 'Referenceable', 'ReferenceQueue', - 'ReferralException', 'ReflectPermission', 'Registry', - 'RegistryHandler', 'RemarshalException', 'Remote', - 'RemoteCall', 'RemoteException', 'RemoteObject', - 'RemoteRef', 'RemoteServer', 'RemoteStub', - 'RenderableImage', 'RenderableImageOp', - 'RenderableImageProducer', 'RenderContext', - 'RenderedImage', 'RenderedImageFactory', 'Renderer', - 'RenderingHints', 'RenderingHints.Key', - 'RepaintManager', 'ReplicateScaleFilter', - 'Repository', 'RepositoryIdHelper', 'Request', - 'RescaleOp', 'Resolver', 'ResolveResult', - 'ResourceBundle', 'ResponseHandler', 'ResultSet', - 'ResultSetMetaData', 'ReverbType', 'RGBImageFilter', - 'RMIClassLoader', 'RMIClientSocketFactory', - 'RMIFailureHandler', 'RMISecurityException', - 'RMISecurityManager', 'RMIServerSocketFactory', - 'RMISocketFactory', 'Robot', 'RootPaneContainer', - 'RootPaneUI', 'RoundRectangle2D', - 'RoundRectangle2D.Double', 'RoundRectangle2D.Float', - 'RowMapper', 'RSAKey', 'RSAKeyGenParameterSpec', - 'RSAPrivateCrtKey', 'RSAPrivateCrtKeySpec', - 'RSAPrivateKey', 'RSAPrivateKeySpec', 'RSAPublicKey', - 'RSAPublicKeySpec', 'RTFEditorKit', - 'RuleBasedCollator', 'Runnable', 'Runtime', - 'RunTime', 'RuntimeException', 'RunTimeOperations', - 'RuntimePermission', 'SampleModel', - 'SchemaViolationException', 'Scrollable', - 'Scrollbar', 'ScrollBarUI', 'ScrollPane', - 'ScrollPaneConstants', 'ScrollPaneLayout', - 'ScrollPaneLayout.UIResource', 'ScrollPaneUI', - 'SearchControls', 'SearchResult', - 'SecureClassLoader', 'SecureRandom', - 'SecureRandomSpi', 'Security', 'SecurityException', - 'SecurityManager', 'SecurityPermission', 'Segment', - 'SeparatorUI', 'Sequence', 'SequenceInputStream', - 'Sequencer', 'Sequencer.SyncMode', 'Serializable', - 'SerializablePermission', 'ServantObject', - 'ServerCloneException', 'ServerError', - 'ServerException', 'ServerNotActiveException', - 'ServerRef', 'ServerRequest', - 'ServerRuntimeException', 'ServerSocket', - 'ServiceDetail', 'ServiceDetailHelper', - 'ServiceInformation', 'ServiceInformationHelper', - 'ServiceInformationHolder', - 'ServiceUnavailableException', 'Set', - 'SetOverrideType', 'SetOverrideTypeHelper', 'Shape', - 'ShapeGraphicAttribute', 'Short', 'ShortHolder', - 'ShortLookupTable', 'ShortMessage', 'ShortSeqHelper', - 'ShortSeqHolder', 'Signature', 'SignatureException', - 'SignatureSpi', 'SignedObject', 'Signer', - 'SimpleAttributeSet', 'SimpleBeanInfo', - 'SimpleDateFormat', 'SimpleTimeZone', - 'SinglePixelPackedSampleModel', - 'SingleSelectionModel', 'SizeLimitExceededException', - 'SizeRequirements', 'SizeSequence', 'Skeleton', - 'SkeletonMismatchException', - 'SkeletonNotFoundException', 'SliderUI', 'Socket', - 'SocketException', 'SocketImpl', 'SocketImplFactory', - 'SocketOptions', 'SocketPermission', - 'SocketSecurityException', 'SoftBevelBorder', - 'SoftReference', 'SortedMap', 'SortedSet', - 'Soundbank', 'SoundbankReader', 'SoundbankResource', - 'SourceDataLine', 'SplitPaneUI', 'SQLData', - 'SQLException', 'SQLInput', 'SQLOutput', - 'SQLPermission', 'SQLWarning', 'Stack', - 'StackOverflowError', 'StateEdit', 'StateEditable', - 'StateFactory', 'Statement', 'Streamable', - 'StreamableValue', 'StreamCorruptedException', - 'StreamTokenizer', 'StrictMath', 'String', - 'StringBuffer', 'StringBufferInputStream', - 'StringCharacterIterator', 'StringContent', - 'StringHolder', 'StringIndexOutOfBoundsException', - 'StringReader', 'StringRefAddr', 'StringSelection', - 'StringTokenizer', 'StringValueHelper', - 'StringWriter', 'Stroke', 'Struct', 'StructMember', - 'StructMemberHelper', 'Stub', 'StubDelegate', - 'StubNotFoundException', 'Style', 'StyleConstants', - 'StyleConstants.CharacterConstants', - 'StyleConstants.ColorConstants', - 'StyleConstants.FontConstants', - 'StyleConstants.ParagraphConstants', 'StyleContext', - 'StyledDocument', 'StyledEditorKit', - 'StyledEditorKit.AlignmentAction', - 'StyledEditorKit.BoldAction', - 'StyledEditorKit.FontFamilyAction', - 'StyledEditorKit.FontSizeAction', - 'StyledEditorKit.ForegroundAction', - 'StyledEditorKit.ItalicAction', - 'StyledEditorKit.StyledTextAction', - 'StyledEditorKit.UnderlineAction', 'StyleSheet', - 'StyleSheet.BoxPainter', 'StyleSheet.ListPainter', - 'SwingConstants', 'SwingPropertyChangeSupport', - 'SwingUtilities', 'SyncFailedException', - 'Synthesizer', 'SysexMessage', 'System', - 'SystemColor', 'SystemException', 'SystemFlavorMap', - 'TabableView', 'TabbedPaneUI', 'TabExpander', - 'TableCellEditor', 'TableCellRenderer', - 'TableColumn', 'TableColumnModel', - 'TableColumnModelEvent', 'TableColumnModelListener', - 'TableHeaderUI', 'TableModel', 'TableModelEvent', - 'TableModelListener', 'TableUI', 'TableView', - 'TabSet', 'TabStop', 'TagElement', 'TargetDataLine', - 'TCKind', 'TextAction', 'TextArea', 'TextAttribute', - 'TextComponent', 'TextEvent', 'TextField', - 'TextHitInfo', 'TextLayout', - 'TextLayout.CaretPolicy', 'TextListener', - 'TextMeasurer', 'TextUI', 'TexturePaint', 'Thread', - 'ThreadDeath', 'ThreadGroup', 'ThreadLocal', - 'Throwable', 'Tie', 'TileObserver', 'Time', - 'TimeLimitExceededException', 'Timer', 'TimerTask', - 'Timestamp', 'TimeZone', 'TitledBorder', 'ToolBarUI', - 'Toolkit', 'ToolTipManager', 'ToolTipUI', - 'TooManyListenersException', 'Track', - 'TransactionRequiredException', - 'TransactionRolledbackException', - 'TRANSACTION_REQUIRED', 'TRANSACTION_ROLLEDBACK', - 'Transferable', 'TransformAttribute', 'TRANSIENT', - 'Transmitter', 'Transparency', 'TreeCellEditor', - 'TreeCellRenderer', 'TreeExpansionEvent', - 'TreeExpansionListener', 'TreeMap', 'TreeModel', - 'TreeModelEvent', 'TreeModelListener', 'TreeNode', - 'TreePath', 'TreeSelectionEvent', - 'TreeSelectionListener', 'TreeSelectionModel', - 'TreeSet', 'TreeUI', 'TreeWillExpandListener', - 'TypeCode', 'TypeCodeHolder', 'TypeMismatch', - 'Types', 'UID', 'UIDefaults', - 'UIDefaults.ActiveValue', 'UIDefaults.LazyInputMap', - 'UIDefaults.LazyValue', 'UIDefaults.ProxyLazyValue', - 'UIManager', 'UIManager.LookAndFeelInfo', - 'UIResource', 'ULongLongSeqHelper', - 'ULongLongSeqHolder', 'ULongSeqHelper', - 'ULongSeqHolder', 'UndeclaredThrowableException', - 'UndoableEdit', 'UndoableEditEvent', - 'UndoableEditListener', 'UndoableEditSupport', - 'UndoManager', 'UnexpectedException', - 'UnicastRemoteObject', 'UnionMember', - 'UnionMemberHelper', 'UNKNOWN', 'UnknownError', - 'UnknownException', 'UnknownGroupException', - 'UnknownHostException', 'UnknownObjectException', - 'UnknownServiceException', 'UnknownUserException', - 'UnmarshalException', 'UnrecoverableKeyException', - 'Unreferenced', 'UnresolvedPermission', - 'UnsatisfiedLinkError', 'UnsolicitedNotification', - 'UnsolicitedNotificationEvent', - 'UnsolicitedNotificationListener', - 'UnsupportedAudioFileException', - 'UnsupportedClassVersionError', - 'UnsupportedEncodingException', - 'UnsupportedFlavorException', - 'UnsupportedLookAndFeelException', - 'UnsupportedOperationException', - 'UNSUPPORTED_POLICY', 'UNSUPPORTED_POLICY_VALUE', - 'URL', 'URLClassLoader', 'URLConnection', - 'URLDecoder', 'URLEncoder', 'URLStreamHandler', - 'URLStreamHandlerFactory', 'UserException', - 'UShortSeqHelper', 'UShortSeqHolder', - 'UTFDataFormatException', 'Util', 'UtilDelegate', - 'Utilities', 'ValueBase', 'ValueBaseHelper', - 'ValueBaseHolder', 'ValueFactory', 'ValueHandler', - 'ValueMember', 'ValueMemberHelper', - 'VariableHeightLayoutCache', 'Vector', 'VerifyError', - 'VersionSpecHelper', 'VetoableChangeListener', - 'VetoableChangeSupport', 'View', 'ViewFactory', - 'ViewportLayout', 'ViewportUI', - 'VirtualMachineError', 'Visibility', - 'VisibilityHelper', 'VMID', 'VM_ABSTRACT', - 'VM_CUSTOM', 'VM_NONE', 'VM_TRUNCATABLE', - 'VoiceStatus', 'Void', 'WCharSeqHelper', - 'WCharSeqHolder', 'WeakHashMap', 'WeakReference', - 'Window', 'WindowAdapter', 'WindowConstants', - 'WindowEvent', 'WindowListener', 'WrappedPlainView', - 'WritableRaster', 'WritableRenderedImage', - 'WriteAbortedException', 'Writer', - 'WrongTransaction', 'WStringValueHelper', - 'X509Certificate', 'X509CRL', 'X509CRLEntry', - 'X509EncodedKeySpec', 'X509Extension', 'ZipEntry', - 'ZipException', 'ZipFile', 'ZipInputStream', - 'ZipOutputStream', 'ZoneView', - '_BindingIteratorImplBase', '_BindingIteratorStub', - '_IDLTypeStub', '_NamingContextImplBase', - '_NamingContextStub', '_PolicyStub', '_Remote_Stub' - ), - 4 => array( - 'boolean', 'byte', 'char', 'double', 'float', 'int', 'long', - 'short', 'void' - ), - 5 => array( - 'allProperties', 'asImmutable', 'asSynchronized', 'collect', - 'count', 'each', 'eachProperty', 'eachPropertyName', - 'eachWithIndex', 'find', 'findAll', 'findIndexOf', - 'flatten', 'get', 'grep', 'inject', 'intersect', - 'join', 'max', 'min', 'pop', 'reverse', - 'reverseEach', 'size', 'sort', 'subMap', 'toList' - ), - 6 => array( - 'center', 'contains', 'eachMatch', 'padLeft', 'padRight', - 'toCharacter', 'tokenize', 'toLong', 'toURL' - ), - 7 => array( - 'append', 'eachByte', 'eachFile', 'eachFileRecurse', 'eachLine', - 'eachLines', 'encodeBase64', 'filterLine', 'getText', - 'splitEachLine', 'transformChar', 'transformLine', - 'withOutputStream', 'withPrintWriter', 'withReader', - 'withStream', 'withStreams', 'withWriter', - 'withWriterAppend', 'write', 'writeLine' - ), - 8 => array( - 'dump', 'getLastMatcher', 'inspect', 'invokeMethod', 'print', - 'println', 'start', 'startDaemon', 'step', 'times', - 'upto', 'use' - ), - 9 => array( - 'call', 'close', 'eachRow', 'execute', 'executeUpdate', 'Sql' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?', '|', '=', - '=>', '||', '-', '+', '<<', '<<<', '&&' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => true, - 1 => false, - 2 => false, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true, - 8 => true, - 9 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #aaaadd; font-weight: bold;', - 4 => 'color: #993333;', - 5 => 'color: #663399;', - 6 => 'color: #CC0099;', - 7 => 'color: #FFCC33;', - 8 => 'color: #993399;', - 9 => 'color: #993399; font-weight: bold;' - ), - 'COMMENTS' => array( - 1=> 'color: #808080; font-style: italic;', - 2=> 'color: #a1a100;', - 3=> 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - 0 => 'color: #0000ff;' - ) - ), - 'URLS' => array( - 1 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAMEL}', - 2 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAMEL}', - 3 => 'http://www.google.de/search?as_q={FNAME}&num=100&hl=en&as_occt=url&as_sitesearch=java.sun.com%2Fj2se%2F1%2E5%2E0%2Fdocs%2Fapi%2F', - 4 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', - 5 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', - 6 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', - 7 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', - 8 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}', - 9 => 'http://www.google.de/search?q=site%3Adocs.codehaus.org/%20{FNAME}' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - //Variables - 0 => '\\$\\{[a-zA-Z_][a-zA-Z0-9_]*\\}' - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/gwbasic.php b/_piecrust/libs/Geshi/geshi/gwbasic.php deleted file mode 100644 index 4b2b272..0000000 --- a/_piecrust/libs/Geshi/geshi/gwbasic.php +++ /dev/null @@ -1,153 +0,0 @@ - 'GwBasic', - 'COMMENT_SINGLE' => array(1 => "'", 2=> "REM"), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - /* Statements */ - 1 => array('END','FOR','NEXT','DATA','INPUT','DIM','READ','LET', - 'GOTO','RUN','IF','RESTORE','GOSUB','RETURN','REM', - 'STOP','PRINT','CLEAR','LIST','NEW','ON','WAIT','DEF', - 'POKE','CONT','OUT','LPRINT','LLIST','WIDTH','ELSE', - 'TRON','TROFF','SWAP','ERASE','EDIT','ERROR','RESUME', - 'DELETE','AUTO','RENUM','DEFSTR','DEFINT','DEFSNG', - 'DEFDBL','LINE','WHILE','WEND','CALL','WRITE','OPTION', - 'RANDOMIZE','OPEN','CLOSE','LOAD','MERGE','SAVE', - 'COLOR','CLS','MOTOR','BSAVE','BLOAD','SOUND','BEEP', - 'PSET','PRESET','SCREEN','KEY','LOCATE','TO','THEN', - 'STEP','USR','FN','SPC','NOT','ERL','ERR','STRING', - 'USING','INSTR','VARPTR','CSRLIN','POINT','OFF', - 'FILES','FIELD','SYSTEM','NAME','LSET','RSET','KILL', - 'PUT','GET','RESET','COMMON','CHAIN','PAINT','COM', - 'CIRCLE','DRAW','PLAY','TIMER','IOCTL','CHDIR','MKDIR', - 'RMDIR','SHELL','VIEW','WINDOW','PMAP','PALETTE','LCOPY', - 'CALLS','PCOPY','LOCK','UNLOCK','RANDOM','APPEND', - ), - 2 => array( - /* Functions */ - 'CVI','CVS','CVD','MKI','MKS','MKD','ENVIRON', - 'LEFT','RIGHT','MID','SGN','INT','ABS', - 'SQR','SIN','LOG','EXP','COS','TAN','ATN', - 'FRE','INP','POS','LEN','STR','VAL','ASC', - 'CHR','PEEK','SPACE','OCT','HEX','LPOS', - 'CINT','CSNG','CDBL','FIX','PEN','STICK', - 'STRIG','EOF','LOC','LOF' - ), - 3 => array( - /* alpha Operators */ - 'AND','OR','XOR','EQV','IMP','MOD' - ), - 4 => array( - /* parameterless functions */ - 'INKEY','DATE','TIME','ERDEV','RND' - ) - ), - 'SYMBOLS' => array( - 0 => array( - '>','=','<','+','-','*','/','^','\\' - ), - 1 => array( - '?' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #00a1a1;font-weight: bold', - 2 => 'color: #000066;font-weight: bold', - 3 => 'color: #00a166;font-weight: bold', - 4 => 'color: #0066a1;font-weight: bold' - ), - 'COMMENTS' => array( - 1 => 'color: #808080;', - 2 => 'color: #808080;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - /* Same as KEYWORDS[3] (and, or, not...) */ - 0 => 'color: #00a166;font-weight: bold', - 1 => 'color: #00a1a1;font-weight: bold', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - 1 => 'color: #708090' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - 1 => '^[0-9]+ ' - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/haskell.php b/_piecrust/libs/Geshi/geshi/haskell.php deleted file mode 100644 index d459470..0000000 --- a/_piecrust/libs/Geshi/geshi/haskell.php +++ /dev/null @@ -1,202 +0,0 @@ - 'Haskell', - 'COMMENT_SINGLE' => array( 1 => '--'), - 'COMMENT_MULTI' => array('{-' => '-}'), - 'COMMENT_REGEXP' => array( - 2 => "/-->/", - 3 => "/{-(?:(?R)|.)-}/s", //Nested Comments - ), - 'CASE_KEYWORDS' => 0, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => "\\", - 'KEYWORDS' => array( - /* main haskell keywords */ - 1 => array( - 'as', - 'case', 'of', 'class', 'data', 'default', - 'deriving', 'do', 'forall', 'hiding', 'if', 'then', - 'else', 'import', 'infix', 'infixl', 'infixr', - 'instance', 'let', 'in', 'module', 'newtype', - 'qualified', 'type', 'where' - ), - /* define names of main librarys, so we can link to it */ - 2 => array( - 'Foreign', 'Numeric', 'Prelude' - ), - /* just link to Prelude functions, cause it's the default opened library when starting Haskell */ - 3 => array( - 'not', 'otherwise', 'maybe', - 'either', 'fst', 'snd', 'curry', 'uncurry', - 'compare', - 'max', 'min', 'succ', 'pred', 'toEnum', 'fromEnum', - 'enumFrom', 'enumFromThen', 'enumFromTo', - 'enumFromThenTo', 'minBound', 'maxBound', - 'negate', 'abs', 'signum', - 'fromInteger', 'toRational', 'quot', 'rem', - 'div', 'mod', 'quotRem', 'divMod', 'toInteger', - 'recip', 'fromRational', 'pi', 'exp', - 'log', 'sqrt', 'logBase', 'sin', 'cos', - 'tan', 'asin', 'acos', 'atan', 'sinh', 'cosh', - 'tanh', 'asinh', 'acosh', 'atanh', - 'properFraction', 'truncate', 'round', 'ceiling', - 'floor', 'floatRadix', 'floatDigits', 'floatRange', - 'decodeFloat', 'encodeFloat', 'exponent', - 'significand', 'scaleFloat', 'isNaN', 'isInfinite', - 'isDenomalized', 'isNegativeZero', 'isIEEE', - 'atan2', 'subtract', 'even', 'odd', 'gcd', - 'lcm', 'fromIntegral', 'realToFrac', - 'return', 'fail', 'fmap', - 'mapM', 'mapM_', 'sequence', 'sequence_', - 'id', 'const','flip', - 'until', 'asTypeOf', 'error', 'undefined', - 'seq','map','filter', 'head', - 'last', 'tail', 'init', 'null', 'length', - 'reverse', 'foldl', 'foldl1', 'foldr', - 'foldr1', 'and', 'or', 'any', 'all', 'sum', - 'product', 'concat', 'concatMap', 'maximum', - 'minimum', 'scanl', 'scanl1', 'scanr', 'scanr1', - 'iterate', 'repeat', 'cycle', 'take', 'drop', - 'splitAt', 'teakWhile', 'dropWhile', 'span', - 'break', 'elem', 'notElem', 'lookup', 'zip', - 'zip3', 'zipWith', 'zipWith3', 'unzip', 'unzip3', - 'lines', 'words', 'unlines', - 'unwords', 'showPrec', 'show', 'showList', - 'shows', 'showChar', 'showString', 'showParen', - 'readsPrec', 'readList', 'reads', 'readParen', - 'read', 'lex', 'putChar', 'putStr', 'putStrLn', - 'print', 'getChar', 'getLine', 'getContents', - 'interact', 'readFile', 'writeFile', 'appendFile', - 'readIO', 'readLn', 'ioError', 'userError', 'catch' - ), - /* here Prelude Types */ - 4 => array ( - 'Bool', 'Maybe', 'Either', 'Ord', 'Ordering', - 'Char', 'String', 'Eq', 'Enum', 'Bounded', - 'Int', 'Integer', 'Float', 'Double', 'Rational', - 'Num', 'Real', 'Integral', 'Fractional', - 'Floating', 'RealFrac', 'RealFloat', 'Monad', - 'Functor', 'Show', 'ShowS', 'Read', 'ReadS', - 'IO' - ), - /* finally Prelude Exceptions */ - 5 => array ( - 'IOError', 'IOException' - ) - ), - /* highlighting symbols is really important in Haskell */ - 'SYMBOLS' => array( - '|', '->', '<-', '@', '!', '::', '_', '~', '=', '?', - '&&', '||', '==', '/=', '<', '<=', '>', - '>=','+', '-', '*','/', '%', '**', '^', '^^', - '>>=', '>>', '=<<', '$', '.', ',', '$!', - '++', '!!' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, /* functions name are case seinsitive */ - 3 => true, /* types name too */ - 4 => true, /* finally exceptions too */ - 5 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #06c; font-weight: bold;', /* nice blue */ - 2 => 'color: #06c; font-weight: bold;', /* blue as well */ - 3 => 'font-weight: bold;', /* make the preduled functions bold */ - 4 => 'color: #cccc00; font-weight: bold;', /* give types a different bg */ - 5 => 'color: maroon;' - ), - 'COMMENTS' => array( - 1 => 'color: #5d478b; font-style: italic;', - 2 => 'color: #339933; font-weight: bold;', - 3 => 'color: #5d478b; font-style: italic;', /* light purple */ - 'MULTI' => 'color: #5d478b; font-style: italic;' /* light purple */ - ), - 'ESCAPE_CHAR' => array( - 0 => 'background-color: #3cb371; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: green;' - ), - 'STRINGS' => array( - 0 => 'background-color: #3cb371;' /* nice green */ - ), - 'NUMBERS' => array( - 0 => 'color: red;' /* pink */ - ), - 'METHODS' => array( - 1 => 'color: #060;' /* dark green */ - ), - 'REGEXPS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #339933; font-weight: bold;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - /* some of keywords are Prelude functions */ - 1 => '', - /* link to the wanted library */ - 2 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/{FNAME}.html', - /* link to Prelude functions */ - 3 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:{FNAME}', - /* link to Prelude types */ - 4 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:{FNAME}', - /* link to Prelude exceptions */ - 5 => 'http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t:{FNAME}', - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/hicest.php b/_piecrust/libs/Geshi/geshi/hicest.php deleted file mode 100644 index 532c83a..0000000 --- a/_piecrust/libs/Geshi/geshi/hicest.php +++ /dev/null @@ -1,108 +0,0 @@ - 'HicEst', - 'COMMENT_SINGLE' => array(1 => '!'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"', '\''), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - '$cmd_line', 'abs', 'acos', 'alarm', 'alias', 'allocate', 'appendix', 'asin', 'atan', 'axis', 'beep', - 'call', 'ceiling', 'char', 'character', 'com', 'continue', 'cos', 'cosh', 'data', 'diffeq', 'dimension', 'dlg', 'dll', - 'do', 'edit', 'else', 'elseif', 'end', 'enddo', 'endif', 'exp', 'floor', 'function', 'fuz', 'goto', 'iand', 'ichar', - 'ieor', 'if', 'index', 'init', 'int', 'intpol', 'ior', 'key', 'len', 'len_trim', 'line', 'lock', 'log', 'max', 'maxloc', - 'min', 'minloc', 'mod', 'nint', 'not', 'open', 'pop', 'ran', 'read', 'real', 'return', 'rgb', 'roots', 'sign', 'sin', - 'sinh', 'solve', 'sort', 'subroutine', 'sum', 'system', 'tan', 'tanh', 'then', 'time', 'use', 'window', 'write', 'xeq' - ) - ), - 'SYMBOLS' => array( - 1 => array( - '(', ')', '+', '-', '*', '/', '=', '<', '>', '!', '^', ':', ',' - ), - 2 => array( - '$', '$$' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #ff0000;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;', - ), - 'METHODS' => array( - 0 => 'color: #004000;' - ), - 'SYMBOLS' => array( - 1 => 'color: #339933;', - 2 => 'color: #ff0000;' - ), - 'REGEXPS' => array(), - 'SCRIPT' => array() - ), - 'URLS' => array(1 => ''), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array() -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/hq9plus.php b/_piecrust/libs/Geshi/geshi/hq9plus.php deleted file mode 100644 index a06fdc8..0000000 --- a/_piecrust/libs/Geshi/geshi/hq9plus.php +++ /dev/null @@ -1,104 +0,0 @@ - 'HQ9+', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - ), - 'SYMBOLS' => array( - 'H', 'Q', '9', '+', 'h', 'q' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - ), - 'COMMENTS' => array( - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #a16000;' - ), - 'ESCAPE_CHAR' => array( - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'KEYWORDS' => GESHI_NEVER, - 'COMMENTS' => GESHI_NEVER, - 'STRINGS' => GESHI_NEVER, - 'REGEXPS' => GESHI_NEVER, - 'NUMBERS' => GESHI_NEVER - ) - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/html4strict.php b/_piecrust/libs/Geshi/geshi/html4strict.php deleted file mode 100644 index 6e0e2f0..0000000 --- a/_piecrust/libs/Geshi/geshi/html4strict.php +++ /dev/null @@ -1,203 +0,0 @@ - 'HTML', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 2 => array( - 'a', 'abbr', 'acronym', 'address', 'applet', - - 'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b', - - 'caption', 'center', 'cite', 'code', 'colgroup', 'col', - - 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', - - 'em', - - 'fieldset', 'font', 'form', 'frame', 'frameset', - - 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', - - 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i', - - 'kbd', - - 'label', 'legend', 'link', 'li', - - 'map', 'meta', - - 'noframes', 'noscript', - - 'object', 'ol', 'optgroup', 'option', - - 'param', 'pre', 'p', - - 'q', - - 'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's', - - 'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt', - - 'ul', 'u', - - 'var', - ), - 3 => array( - 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', - 'background', 'bgcolor', 'border', - 'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', - 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', - 'enctype', - 'face', 'for', 'frame', 'frameborder', - 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', - 'id', 'ismap', - 'label', 'lang', 'language', 'link', 'longdesc', - 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', - 'name', 'nohref', 'noresize', 'noshade', 'nowrap', - 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload', - 'profile', 'prompt', - 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', - 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', - 'tabindex', 'target', 'text', 'title', 'type', - 'usemap', - 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace', - 'width' - ) - ), - 'SYMBOLS' => array( - '/', '=' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #000066;' - ), - 'COMMENTS' => array( - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'SCRIPT' => array( - -1 => 'color: #808080; font-style: italic;', // comments - 0 => 'color: #00bbdd;', - 1 => 'color: #ddbb00;', - 2 => 'color: #009900;' - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 2 => 'http://december.com/html/4/element/{FNAMEL}.html', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, - 'SCRIPT_DELIMITERS' => array( - -1 => array( - '' - ), - 0 => array( - ' '>' - ), - 1 => array( - '&' => ';' - ), - 2 => array( - '<' => '>' - ) - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - -1 => false, - 0 => false, - 1 => false, - 2 => true - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 2 => array( - 'DISALLOWED_BEFORE' => '(?<=<|<\/)', - 'DISALLOWED_AFTER' => '(?=\s|\/|>)', - ) - ) - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/icon.php b/_piecrust/libs/Geshi/geshi/icon.php deleted file mode 100644 index 8852e77..0000000 --- a/_piecrust/libs/Geshi/geshi/icon.php +++ /dev/null @@ -1,212 +0,0 @@ - 'Icon', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"', '\''), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'break', 'case', 'continue', 'create', 'default', 'do', 'else', - 'end', 'every', 'fail', 'for', 'if', 'import', 'initial', - 'initially', 'invocable', 'link', 'next', 'not', 'of', 'package', - 'procedure', 'record', 'repeat', 'return', 'switch', 'suspend', - 'then', 'to', 'until', 'while' - ), - 2 => array( - 'global', 'local', 'static' - ), - 3 => array( - 'allocated', 'ascii', 'clock', 'collections', - 'column', 'cset', 'current', 'date', 'dateline', 'digits', - 'dump', 'e', 'error', 'errornumber', 'errortext', - 'errorvalue', 'errout', 'eventcode', 'eventsource', 'eventvalue', - 'fail', 'features', 'file', 'host', 'input', 'lcase', - 'letters', 'level', 'line', 'main', 'now', 'null', - 'output', 'phi', 'pi', 'pos', 'progname', 'random', - 'regions', 'source', 'storage', 'subject', 'syserr', 'time', - 'trace', 'ucase', 'version', 'col', 'control', 'interval', - 'ldrag', 'lpress', 'lrelease', 'mdrag', 'meta', 'mpress', - 'mrelease', 'rdrag', 'resize', 'row', 'rpress', 'rrelease', - 'shift', 'window', 'x', 'y' - ), - 4 => array( - 'abs', 'acos', 'any', 'args', 'asin', 'atan', 'bal', 'center', 'char', - 'chmod', 'close', 'cofail', 'collect', 'copy', 'cos', 'cset', 'ctime', 'delay', 'delete', - 'detab', 'display', 'dtor', 'entab', 'errorclear', 'event', 'eventmask', 'EvGet', 'exit', - 'exp', 'fetch', 'fieldnames', 'find', 'flock', 'flush', 'function', 'get', 'getch', - 'getche', 'getenv', 'gettimeofday', 'globalnames', 'gtime', 'iand', 'icom', 'image', - 'insert', 'integer', 'ior', 'ishift', 'ixor', 'key', 'left', 'list', 'load', 'loadfunc', - 'localnames', 'log', 'many', 'map', 'match', 'member', 'mkdir', 'move', 'name', 'numeric', - 'open', 'opmask', 'ord', 'paramnames', 'parent', 'pipe', 'pop', 'pos', 'proc', 'pull', - 'push', 'put', 'read', 'reads', 'real', 'receive', 'remove', 'rename', 'repl', 'reverse', - 'right', 'rmdir', 'rtod', 'runerr', 'seek', 'select', 'send', 'seq', 'serial', 'set', - 'setenv', 'sort', 'sortf', 'sql', 'sqrt', 'stat', 'stop', 'string', 'system', 'tab', - 'table', 'tan', 'trap', 'trim', 'truncate', 'type', 'upto', 'utime', 'variable', 'where', - 'write', 'writes' - ), - 5 => array( - 'Active', 'Alert', 'Bg', 'Clip', 'Clone', 'Color', 'ColorValue', - 'CopyArea', 'Couple', 'DrawArc', 'DrawCircle', 'DrawCurve', 'DrawCylinder', 'DrawDisk', - 'DrawImage', 'DrawLine', 'DrawPoint', 'DrawPolygon', 'DrawRectangle', 'DrawSegment', - 'DrawSphere', 'DrawString', 'DrawTorus', 'EraseArea', 'Event', 'Fg', 'FillArc', - 'FillCircle', 'FillPolygon', 'FillRectangle', 'Font', 'FreeColor', 'GotoRC', 'GotoXY', - 'IdentifyMatrix', 'Lower', 'MatrixMode', 'NewColor', 'PaletteChars', 'PaletteColor', - 'PaletteKey', 'Pattern', 'Pending', 'Pixel', 'PopMatrix', 'PushMatrix', 'PushRotate', - 'PushScale', 'PushTranslate', 'QueryPointer', 'Raise', 'ReadImage', 'Refresh', 'Rotate', - 'Scale', 'Texcoord', 'TextWidth', 'Texture', 'Translate', 'Uncouple', 'WAttrib', - 'WDefault', 'WFlush', 'WindowContents', 'WriteImage', 'WSync' - ), - 6 => array( - 'define', 'include', 'ifdef', 'ifndef', 'else', 'endif', 'error', - 'line', 'undef' - ), - 7 => array( - '_V9', '_AMIGA', '_ACORN', '_CMS', '_MACINTOSH', '_MSDOS_386', - '_MS_WINDOWS_NT', '_MSDOS', '_MVS', '_OS2', '_POR', 'T', '_UNIX', '_POSIX', '_DBM', - '_VMS', '_ASCII', '_EBCDIC', '_CO_EXPRESSIONS', '_CONSOLE_WINDOW', '_DYNAMIC_LOADING', - '_EVENT_MONITOR', '_EXTERNAL_FUNCTIONS', '_KEYBOARD_FUNCTIONS', '_LARGE_INTEGERS', - '_MULTITASKING', '_PIPES', '_RECORD_IO', '_SYSTEM_FUNCTION', '_MESSAGING', '_GRAPHICS', - '_X_WINDOW_SYSTEM', '_MS_WINDOWS', '_WIN32', '_PRESENTATION_MGR', '_ARM_FUNCTIONS', - '_DOS_FUNCTIONS' - ), - 8 => array( - 'line' - ) - ), - 'SYMBOLS' => array( - 1 => array( - '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '\\', '%', '=', '<', '>', '!', '^', - '&', '|', '?', ':', ';', ',', '.', '~', '@' - ), - 2 => array( - '$(', '$)', '$<', '$>', '$' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true, - 8 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #b1b100;', - 3 => 'color: #b1b100;', - 4 => 'color: #b1b100;', - 5 => 'color: #b1b100;', - 6 => 'color: #b1b100;', - 7 => 'color: #b1b100;', - 8 => 'color: #b1b100;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;', - ), - 'METHODS' => array( - 0 => 'color: #004000;' - ), - 'SYMBOLS' => array( - 1 => 'color: #339933;', - 2 => 'color: #b1b100;' - ), - 'REGEXPS' => array(), - 'SCRIPT' => array() - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '', - 8 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array(1 => '.'), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 3 => array( - 'DISALLOWED_BEFORE' => '(?<=&)' - ), - 4 => array( - 'DISALLOWED_BEFORE' => "(? "(?![a-zA-Z0-9_\"\'])" - ), - 6 => array( - 'DISALLOWED_BEFORE' => '(?<=\$)' - ), - 8 => array( - 'DISALLOWED_BEFORE' => '(?<=#)' - ) - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/idl.php b/_piecrust/libs/Geshi/geshi/idl.php deleted file mode 100644 index 5e73027..0000000 --- a/_piecrust/libs/Geshi/geshi/idl.php +++ /dev/null @@ -1,123 +0,0 @@ - 'Uno Idl', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'published', 'get', 'set', 'service', 'singleton', 'type', 'module', 'interface', 'struct', - 'const', 'constants', 'exception', 'enum', 'raises', 'typedef' - ), - 2 => array( - 'bound', 'maybeambiguous', 'maybedefault', 'maybevoid', 'oneway', 'optional', - 'readonly', 'in', 'out', 'inout', 'attribute', 'transient', 'removable' - ), - 3 => array( - 'True', 'False', 'TRUE', 'FALSE' - ), - 4 => array( - 'string', 'long', 'byte', 'hyper', 'boolean', 'any', 'char', 'double', - 'void', 'sequence', 'unsigned' - ), - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':', ';', '...' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #990078; font-weight: bold', - 2 => 'color: #36dd1c;', - 3 => 'color: #990078; font-weight: bold', - 4 => 'color: #0000ec;' - ), - 'COMMENTS' => array( - 1 => 'color: #3f7f5f;', - 2 => 'color: #808080;', - 'MULTI' => 'color: #4080ff; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #666666; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #808080;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #0000dd;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - 1 => '::' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/ini.php b/_piecrust/libs/Geshi/geshi/ini.php deleted file mode 100644 index 692a1aa..0000000 --- a/_piecrust/libs/Geshi/geshi/ini.php +++ /dev/null @@ -1,128 +0,0 @@ - 'INI', - 'COMMENT_SINGLE' => array(0 => ';'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - ), - 'SYMBOLS' => array( - '[', ']', '=' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - ), - 'COMMENTS' => array( - 0 => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => '' - ), - 'BRACKETS' => array( - 0 => '' - ), - 'STRINGS' => array( - 0 => 'color: #933;' - ), - 'NUMBERS' => array( - 0 => '' - ), - 'METHODS' => array( - 0 => '' - ), - 'SYMBOLS' => array( - 0 => 'color: #000066; font-weight:bold;' - ), - 'REGEXPS' => array( - 0 => 'color: #000066; font-weight:bold;', - 1 => 'color: #000099;', - 2 => 'color: #660066;' - ), - 'SCRIPT' => array( - 0 => '' - ) - ), - 'URLS' => array( - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - //Section names - 0 => '\[.+\]', - //Entry names - 1 => array( - GESHI_SEARCH => '^(\s*)([a-zA-Z0-9_\-]+)(\s*=)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ), - //Entry values - 2 => array( - // Evil hackery to get around GeSHi bug: <>" and ; are added so s can be matched - // Explicit match on variable names because if a comment is before the first < of the span - // gets chewed up... - GESHI_SEARCH => '([<>";a-zA-Z0-9_]+\s*)=(.*)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1=', - GESHI_AFTER => '' - ) - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/inno.php b/_piecrust/libs/Geshi/geshi/inno.php deleted file mode 100644 index af2aab5..0000000 --- a/_piecrust/libs/Geshi/geshi/inno.php +++ /dev/null @@ -1,212 +0,0 @@ - 'Inno', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('(*' => '*)'), - 'CASE_KEYWORDS' => 0, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'Setup','Types','Components','Tasks','Dirs','Files','Icons','INI', - 'InstallDelete','Languages','Messages','CustomMessage', - 'LangOptions','Registry','RUN','UninstallDelete','UninstallRun', - 'app','win','sys','syswow64','src','sd','pf','pf32','pf64','cf', - 'cf32','cf64','tmp','fonts','dao','group','localappdata','sendto', - 'userappdata','commonappdata','userdesktop','commondesktop', - 'userdocs','commondocs','userfavorites','commonfavorites', - 'userprograms','commonprograms','userstartmenu','commonstartmenu', - 'userstartup','commonstartup','usertemplates','commontemplates' - ), - 2 => array( - 'nil', 'false', 'true', 'var', 'type', 'const','And', 'Array', 'As', 'Begin', 'Case', 'Class', 'Constructor', 'Destructor', 'Div', 'Do', 'DownTo', 'Else', - 'End', 'Except', 'File', 'Finally', 'For', 'Function', 'Goto', 'If', 'Implementation', 'In', 'Inherited', 'Interface', - 'Is', 'Mod', 'Not', 'Object', 'Of', 'On', 'Or', 'Packed', 'Procedure', 'Property', 'Raise', 'Record', - 'Repeat', 'Set', 'Shl', 'Shr', 'Then', 'ThreadVar', 'To', 'Try', 'Unit', 'Until', 'Uses', 'While', 'With', 'Xor', - - 'HKCC','HKCR','HKCU','HKLM','HKU','alwaysoverwrite','alwaysskipifsameorolder','append', - 'binary','classic','closeonexit','comparetimestamp','confirmoverwrite', - 'createkeyifdoesntexist','createonlyiffileexists','createvalueifdoesntexist', - 'deleteafterinstall','deletekey','deletevalue','dirifempty','dontcloseonexit', - 'dontcopy','dontcreatekey','disablenouninstallwarning','dword','exclusive','expandsz', - 'external','files','filesandordirs','fixed','fontisnttruetype','ignoreversion','iscustom','isreadme', - 'modern','multisz','new','noerror','none','normal','nowait','onlyifdestfileexists', - 'onlyifdoesntexist','onlyifnewer','overwrite','overwritereadonly','postinstall', - 'preservestringtype','promptifolder','regserver','regtypelib','restart','restartreplace', - 'runhidden','runmaximized','runminimized','sharedfile','shellexec','showcheckbox', - 'skipifnotsilent','skipifsilent','silent','skipifdoesntexist', - 'skipifsourcedoesntexist','sortfilesbyextension','unchecked','uninsalwaysuninstall', - 'uninsclearvalue','uninsdeleteentry','uninsdeletekey','uninsdeletekeyifempty', - 'uninsdeletesection','uninsdeletesectionifempty','uninsdeletevalue', - 'uninsneveruninstall','useapppaths','verysilent','waituntilidle' - ), - 3 => array( - 'Abs', 'Addr', 'AnsiCompareStr', 'AnsiCompareText', 'AnsiContainsStr', 'AnsiEndsStr', 'AnsiIndexStr', 'AnsiLeftStr', - 'AnsiLowerCase', 'AnsiMatchStr', 'AnsiMidStr', 'AnsiPos', 'AnsiReplaceStr', 'AnsiReverseString', 'AnsiRightStr', - 'AnsiStartsStr', 'AnsiUpperCase', 'ArcCos', 'ArcSin', 'ArcTan', 'Assigned', 'BeginThread', 'Bounds', 'CelsiusToFahrenheit', - 'ChangeFileExt', 'Chr', 'CompareStr', 'CompareText', 'Concat', 'Convert', 'Copy', 'Cos', 'CreateDir', 'CurrToStr', - 'CurrToStrF', 'Date', 'DateTimeToFileDate', 'DateTimeToStr', 'DateToStr', 'DayOfTheMonth', 'DayOfTheWeek', 'DayOfTheYear', - 'DayOfWeek', 'DaysBetween', 'DaysInAMonth', 'DaysInAYear', 'DaySpan', 'DegToRad', 'DeleteFile', 'DiskFree', 'DiskSize', - 'DupeString', 'EncodeDate', 'EncodeDateTime', 'EncodeTime', 'EndOfADay', 'EndOfAMonth', 'Eof', 'Eoln', 'Exp', 'ExtractFileDir', - 'ExtractFileDrive', 'ExtractFileExt', 'ExtractFileName', 'ExtractFilePath', 'FahrenheitToCelsius', 'FileAge', - 'FileDateToDateTime', 'FileExists', 'FilePos', 'FileSearch', 'FileSetDate', 'FileSize', 'FindClose', 'FindCmdLineSwitch', - 'FindFirst', 'FindNext', 'FloatToStr', 'FloatToStrF', 'Format', 'FormatCurr', 'FormatDateTime', 'FormatFloat', 'Frac', - 'GetCurrentDir', 'GetLastError', 'GetMem', 'High', 'IncDay', 'IncMinute', 'IncMonth', 'IncYear', 'InputBox', - 'InputQuery', 'Int', 'IntToHex', 'IntToStr', 'IOResult', 'IsInfinite', 'IsLeapYear', 'IsMultiThread', 'IsNaN', - 'LastDelimiter', 'Length', 'Ln', 'Lo', 'Log10', 'Low', 'LowerCase', 'Max', 'Mean', 'MessageDlg', 'MessageDlgPos', - 'MonthOfTheYear', 'Now', 'Odd', 'Ord', 'ParamCount', 'ParamStr', 'Pi', 'Point', 'PointsEqual', 'Pos', 'Pred', - 'Printer', 'PromptForFileName', 'PtInRect', 'RadToDeg', 'Random', 'RandomRange', 'RecodeDate', 'RecodeTime', 'Rect', - 'RemoveDir', 'RenameFile', 'Round', 'SeekEof', 'SeekEoln', 'SelectDirectory', 'SetCurrentDir', 'Sin', 'SizeOf', - 'Slice', 'Sqr', 'Sqrt', 'StringOfChar', 'StringReplace', 'StringToWideChar', 'StrToCurr', 'StrToDate', 'StrToDateTime', - 'StrToFloat', 'StrToInt', 'StrToInt64', 'StrToInt64Def', 'StrToIntDef', 'StrToTime', 'StuffString', 'Succ', 'Sum', 'Tan', - 'Time', 'TimeToStr', 'Tomorrow', 'Trunc', 'UpCase', 'UpperCase', 'VarType', 'WideCharToString', 'WrapText', 'Yesterday', - 'Append', 'AppendStr', 'Assign', 'AssignFile', 'AssignPrn', 'Beep', 'BlockRead', 'BlockWrite', 'Break', - 'ChDir', 'Close', 'CloseFile', 'Continue', 'DateTimeToString', 'Dec', 'DecodeDate', 'DecodeDateTime', - 'DecodeTime', 'Delete', 'Dispose', 'EndThread', 'Erase', 'Exclude', 'Exit', 'FillChar', 'Flush', 'FreeAndNil', - 'FreeMem', 'GetDir', 'GetLocaleFormatSettings', 'Halt', 'Inc', 'Include', 'Insert', 'MkDir', 'Move', 'New', - 'ProcessPath', 'Randomize', 'Read', 'ReadLn', 'ReallocMem', 'Rename', 'ReplaceDate', 'ReplaceTime', - 'Reset', 'ReWrite', 'RmDir', 'RunError', 'Seek', 'SetLength', 'SetString', 'ShowMessage', 'ShowMessageFmt', - 'ShowMessagePos', 'Str', 'Truncate', 'Val', 'Write', 'WriteLn', - - 'AdminPrivilegesRequired','AfterInstall','AllowCancelDuringInstall','AllowNoIcons','AllowRootDirectory','AllowUNCPath','AlwaysRestart','AlwaysShowComponentsList','AlwaysShowDirOnReadyPage','AlwaysShowGroupOnReadyPage ','AlwaysUsePersonalGroup','AppComments','AppContact','AppCopyright','AppendDefaultDirName', - 'AppendDefaultGroupName','AppId','AppModifyPath','AppMutex','AppName','AppPublisher', - 'AppPublisherURL','AppReadmeFile','AppSupportURL','AppUpdatesURL','AppVerName','AppVersion', - 'Attribs','BackColor','BackColor2','BackColorDirection','BackSolid','BeforeInstall', - 'ChangesAssociations','ChangesEnvironment','Check','CodeFile','Comment','Compression','CopyMode', - 'CreateAppDir','CreateUninstallRegKey','DefaultDirName','DefaultGroupName', - 'DefaultUserInfoName','DefaultUserInfoOrg','DefaultUserInfoSerial', - 'Description','DestDir','DestName','DirExistsWarning', - 'DisableDirPage','DisableFinishedPage', - 'DisableProgramGroupPage','DisableReadyMemo','DisableReadyPage', - 'DisableStartupPrompt','DiskClusterSize','DiskSliceSize','DiskSpaceMBLabel', - 'DiskSpanning','DontMergeDuplicateFiles','EnableDirDoesntExistWarning','Encryption', - 'Excludes','ExtraDiskSpaceRequired','Filename','Flags','FlatComponentsList','FontInstall', - 'GroupDescription','HotKey','IconFilename','IconIndex','InfoAfterFile','InfoBeforeFile', - 'InternalCompressLevel','Key','LanguageDetectionMethod', - 'LicenseFile','MergeDuplicateFiles','MessagesFile','MinVersion','Name', - 'OnlyBelowVersion','OutputBaseFilename','OutputManifestFile','OutputDir', - 'Parameters','Password','Permissions','PrivilegesRequired','ReserveBytes', - 'RestartIfNeededByRun','Root','RunOnceId','Section','SetupIconFile', - 'ShowComponentSizes','ShowLanguageDialog','ShowTasksTreeLines','SlicesPerDisk', - 'SolidCompression','Source','SourceDir','StatusMsg','Subkey', - 'TimeStampRounding','TimeStampsInUTC','TouchDate','TouchTime','Type', - 'UninstallDisplayIcon','UninstallDisplayName','UninstallFilesDir','UninstallIconFile', - 'UninstallLogMode','UninstallRestartComputer','UninstallStyle','Uninstallable', - 'UpdateUninstallLogAppName','UsePreviousAppDir','UsePreviousGroup', - 'UsePreviousTasks','UsePreviousSetupType','UsePreviousUserInfo', - 'UserInfoPage','UseSetupLdr','ValueData','ValueName','ValueType', - 'VersionInfoVersion','VersionInfoCompany','VersionInfoDescription','VersionInfoTextVersion', - 'WindowResizable','WindowShowCaption','WindowStartMaximized', - 'WindowVisible','WizardImageBackColor','WizardImageFile','WizardImageStretch','WizardSmallImageBackColor','WizardSmallImageFile','WizardStyle','WorkingDir' - ), - 4 => array( - 'AnsiChar', 'AnsiString', 'Boolean', 'Byte', 'Cardinal', 'Char', 'Comp', 'Currency', 'Double', 'Extended', - 'Int64', 'Integer', 'LongInt', 'LongWord', 'PAnsiChar', 'PAnsiString', 'PChar', 'PCurrency', 'PDateTime', - 'PExtended', 'PInt64', 'Pointer', 'PShortString', 'PString', 'PVariant', 'PWideChar', 'PWideString', - 'Real', 'Real48', 'ShortInt', 'ShortString', 'Single', 'SmallInt', 'String', 'TBits', 'TConvType', 'TDateTime', - 'Text', 'TextFile', 'TFloatFormat', 'TFormatSettings', 'TList', 'TObject', 'TOpenDialog', 'TPoint', - 'TPrintDialog', 'TRect', 'TReplaceFlags', 'TSaveDialog', 'TSearchRec', 'TStringList', 'TSysCharSet', - 'TThreadFunc', 'Variant', 'WideChar', 'WideString', 'Word' - ), - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '@', '%', '&', '*', '|', '/', '<', '>' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;',/*bold Black*/ - 2 => 'color: #000000;font-style: italic;',/*Black*/ - 3 => 'color: #0000FF;',/*blue*/ - 4 => 'color: #CC0000;'/*red*/ - ), - 'COMMENTS' => array( - 1 => 'color: #33FF00; font-style: italic;', - 'MULTI' => 'color: #33FF00; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006600;' - ), - 'REGEXPS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #000000; font-weight: bold;', - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/intercal.php b/_piecrust/libs/Geshi/geshi/intercal.php deleted file mode 100644 index e123dae..0000000 --- a/_piecrust/libs/Geshi/geshi/intercal.php +++ /dev/null @@ -1,122 +0,0 @@ - 'INTERCAL', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - //Politeness - 1 => array( - 'DO', 'DOES', 'DONT', 'DON\'T', 'NOT', 'PLEASE', 'PLEASENT', 'PLEASEN\'T', 'MAYBE' - ), - //Statements - 2 => array( - 'STASH', 'RETRIEVE', 'NEXT', 'RESUME', 'FORGET', 'ABSTAIN', 'ABSTAINING', - 'COME', 'FROM', 'CALCULATING', 'REINSTATE', 'IGNORE', 'REMEMBER', - 'WRITE', 'IN', 'READ', 'OUT', 'GIVE', 'UP' - ) - ), - 'SYMBOLS' => array( - '.', ',', ':', ';', '#', - '~', '$', '&', '?', - '\'', '"', '<-' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000080; font-weight: bold;', - 2 => 'color: #000080; font-weight: bold;' - ), - 'COMMENTS' => array( - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'ESCAPE_CHAR' => array( - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - 1 => 'color: #808080; font-style: italic;' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - 1 => '^\(\d+\)' - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'COMMENTS' => GESHI_NEVER, - 'STRINGS' => GESHI_NEVER, - 'NUMBERS' => GESHI_NEVER - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/io.php b/_piecrust/libs/Geshi/geshi/io.php deleted file mode 100644 index b6fcb81..0000000 --- a/_piecrust/libs/Geshi/geshi/io.php +++ /dev/null @@ -1,138 +0,0 @@ - 'Io', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'and', 'break', 'else', 'elseif', 'exit', 'for', 'foreach', 'if', 'ifFalse', 'ifNil', - 'ifTrue', 'or', 'pass', 'raise', 'return', 'then', 'try', 'wait', 'while', 'yield' - ), - 2 => array( - 'activate', 'activeCoroCount', 'asString', 'block', 'catch', 'clone', 'collectGarbage', - 'compileString', 'continue', 'do', 'doFile', 'doMessage', 'doString', 'forward', - 'getSlot', 'getenv', 'hasSlot', 'isActive', 'isNil', 'isResumable', 'list', 'message', - 'method', 'parent', 'pause', 'perform', 'performWithArgList', 'print', 'proto', - 'raiseResumable', 'removeSlot', 'resend', 'resume', 'schedulerSleepSeconds', 'self', - 'sender', 'setSchedulerSleepSeconds', 'setSlot', 'shallowCopy', 'slotNames', 'super', - 'system', 'thisBlock', 'thisContext', 'thisMessage', 'type', 'uniqueId', 'updateSlot', - 'write' - ), - 3 => array( - 'Array', 'AudioDevice', 'AudioMixer', 'Block', 'Box', 'Buffer', 'CFunction', 'CGI', - 'Color', 'Curses', 'DBM', 'DNSResolver', 'DOConnection', 'DOProxy', 'DOServer', - 'Date', 'Directory', 'Duration', 'DynLib', 'Error', 'Exception', 'FFT', 'File', - 'Fnmatch', 'Font', 'Future', 'GL', 'GLE', 'GLScissor', 'GLU', 'GLUCylinder', - 'GLUQuadric', 'GLUSphere', 'GLUT', 'Host', 'Image', 'Importer', 'LinkList', 'List', - 'Lobby', 'Locals', 'MD5', 'MP3Decoder', 'MP3Encoder', 'Map', 'Message', 'Movie', - 'NULL', 'Nil', 'Nop', 'Notifiction', 'Number', 'Object', 'OpenGL', 'Point', 'Protos', - 'Regex', 'SGMLTag', 'SQLite', 'Server', 'ShowMessage', 'SleepyCat', 'SleepyCatCursor', - 'Socket', 'SocketManager', 'Sound', 'Soup', 'Store', 'String', 'Tree', 'UDPSender', - 'UDPReceiver', 'URL', 'User', 'Warning', 'WeakLink' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #000066;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 2 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - 0 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/j.php b/_piecrust/libs/Geshi/geshi/j.php deleted file mode 100644 index 184385b..0000000 --- a/_piecrust/libs/Geshi/geshi/j.php +++ /dev/null @@ -1,227 +0,0 @@ - 'J', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array( - 1 => '/(? '/(?<=\bNote\b).*?$\s+\)(?:(?!\n)\s)*$/sm', //multiline comments in Note - 3 => "/'[^']*?$/m" //incomplete strings/open quotes - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'HARDQUOTE' => array("'", "'"), - 'HARDESCAPE' => array("'"), - 'HARDCHAR' => "'", - 'NUMBERS' => array( - //Some instances of infinity are not correctly handled by GeSHi NUMBERS currently - //There are two solutions labelled "infinity Method A" and "infinity Method B" - //infinity Method B - requires following adjustment to line 3349 of geshi.php - // preg_match('#\d#' becomes preg_match('#[\d_]#' - 0 => '\b(?:_?\d+(?:\.\d+)?(?:x|[bejprx]_?[\da-z]+(?:\.[\da-z]+)?)?)(?![\w\.\:])', //infinity Method A - //0 => '\b(?:_?\d+(?:\.\d+)?(?:x|[bejprx]_?[\da-z]+(?:\.[\da-z]+)?)?|__?)(?![\w\.\:])', //infinity Method B - ), - 'KEYWORDS' => array( - //Control words - 1 => array( - 'assert.', 'break.', 'case.', 'catch.', 'catcht.', 'continue.', 'do.', - 'else.', 'elseif.', 'end.', 'fcase.', 'for.', 'goto.', 'if.', 'label.', - 'return.', 'select.', 'throw.', 'trap.', 'try.', 'while.', 'whilst.' - ), - //Arguments - 2 => array( - 'm', 'n', 'u', 'v', 'x', 'y' - ), -/* -Commented out for now due to conflicts with Lang Check - //Primitives beginning with a symbol (except . or :) - 6 => array( - '=', '<', '<.', '<:', //verbs - '_:','>', '>.', '>:', - '+', '+.', '+:', '*', '*.', '*:', '-', '-.', '-:', '%', '%.', '%:', - '^', '^.', '$', '$.', '$:', '~.', '~:', '\|', '|.', '|:', - ',', ',.', ',:', ';', ';:', '#', '#.', '#:', '!', '/:', '\:', - '[', '[:', ']', '{', '{.', '{:', '{::', '}.', '}:', - '".', '":', '?', '?.', - '~', '\/;', '\\', '/.', '\\.', '}', //adverbs - '^:', ';.', '!.', '!:', //conj - '"', '`', '`:', '@', '@.', '@:', - '&', '&.', '&:', '&.:', - '_.', //nouns - '=.', '=:', //other - ), - //Primitives beginning with a letter or number - 7 => array( - 'A.', 'c.', 'C.', 'e.', 'E.', //verbs - 'i.', 'i:', 'I.', 'j.', 'L.', 'o.', - 'p.', 'p..', 'p:', 'q:', 'r.', 's:', 'u:', 'x:', - '_9:', '_8:', '_7:', '_6:', '_5:', '_4:', '_3:', '_2:', '_1:', - '0:', '1:', '2:', '3:', '4:', '5:', '6:', '7:', '8:', '9:', - 'b.', 'f.', 'M.', 't.', 't:', //adverbs - 'd.', 'D.', 'D:', 'H.', 'L:', 'S:', 'T.', //conj - 'a.', 'a:', //nouns - ), - //Primitives beginning with symbol . or : - 8 => array( - '..', '.:', '.', ':.', '::', ':', //conj - ), -*/ - ), - 'SYMBOLS' => array( - //Punctuation - 0 => array( - '(', ')' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, -// 6 => true, -// 7 => true, -// 8 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000ff; font-weight: bold;', - 2 => 'color: #0000cc; font-weight: bold;', -// 6 => 'color: #000000; font-weight: bold;', -// 7 => 'color: #000000; font-weight: bold;', -// 8 => 'color: #000000; font-weight: bold;', - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #666666; font-style: italic; font-weight: bold;', - 3 => 'color: #ff00ff; ', //open quote - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 'HARD' => 'font-weight: bold;', - 0 => '', - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 'HARD' => 'color: #ff0000;', - 0 => 'color: #ff0000;', - ), - 'NUMBERS' => array( - 0 => 'color: #009999; font-weight: bold;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #009900; font-weight: bold;' - ), - 'REGEXPS' => array( - 0 => 'color: #0000ff; font-weight: bold;', //for_xyz. - same as kw1 - 1 => 'color: #009999; font-weight: bold;' //infinity - same as nu0 - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', //'http://www.jsoftware.com/help/dictionary/ctrl.htm', - 2 => '', -// 6 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', -// 7 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', -// 8 => '', //'http://www.jsoftware.com/jwiki/Vocabulary', - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - 0 => '\b(for|goto|label)_[a-zA-Z]\w*\.', //for_xyz. - should be kw1 - 1 => '\b__?(?![\w\.\:])' //infinity - should be nu0 - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'BRACKETS' => GESHI_NEVER, - ), - 'KEYWORDS' => array( - //Control words - 2 => array( - 'DISALLOWED_BEFORE' => '(? '(?![\w\.\:])', - ), - //Primtives starting with a symbol (except . or :) - 6 => array( - 'DISALLOWED_BEFORE' => '(?!K)', // effect should be to allow anything - 'DISALLOWED_AFTER' => '(?=.*)', - ), - //Primtives starting with a letter - 7 => array( - 'DISALLOWED_BEFORE' => '(? '(?=.*)', - ), - //Primtives starting with symbol . or : - 8 => array( - 'DISALLOWED_BEFORE' => '(?<=\s)', - 'DISALLOWED_AFTER' => '(?=.*)', - ), - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/java.php b/_piecrust/libs/Geshi/geshi/java.php deleted file mode 100644 index 7fcc2e8..0000000 --- a/_piecrust/libs/Geshi/geshi/java.php +++ /dev/null @@ -1,983 +0,0 @@ - 'Java', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - //Import and Package directives (Basic Support only) - 2 => '/(?:(?<=import[\\n\\s])|(?<=package[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*([a-zA-Z0-9_]+|\*)(?=[\n\s;])/i', - // javadoc comments - 3 => '#/\*\*(?![\*\/]).*\*/#sU' - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'for', 'foreach', 'if', 'else', 'while', 'do', - 'switch', 'case', 'return', 'public', - 'private', 'protected', 'extends', 'break', 'class', - 'new', 'try', 'catch', 'throws', 'finally', 'implements', - 'interface', 'throw', 'final', 'native', 'synchronized', 'this', - 'abstract', 'transient', 'instanceof', 'assert', 'continue', - 'default', 'enum', 'package', 'static', 'strictfp', 'super', - 'volatile', 'const', 'goto', 'import' - ), - 2 => array( - 'null', 'false', 'true' - ), - 3 => array( - 'AbstractAction', 'AbstractBorder', 'AbstractButton', - 'AbstractCellEditor', 'AbstractCollection', - 'AbstractColorChooserPanel', 'AbstractDocument', - 'AbstractDocument.AttributeContext', - 'AbstractDocument.Content', - 'AbstractDocument.ElementEdit', - 'AbstractLayoutCache', - 'AbstractLayoutCache.NodeDimensions', 'AbstractList', - 'AbstractListModel', 'AbstractMap', - 'AbstractMethodError', 'AbstractSequentialList', - 'AbstractSet', 'AbstractTableModel', - 'AbstractUndoableEdit', 'AbstractWriter', - 'AccessControlContext', 'AccessControlException', - 'AccessController', 'AccessException', 'Accessible', - 'AccessibleAction', 'AccessibleBundle', - 'AccessibleComponent', 'AccessibleContext', - 'AccessibleHyperlink', 'AccessibleHypertext', - 'AccessibleIcon', 'AccessibleObject', - 'AccessibleRelation', 'AccessibleRelationSet', - 'AccessibleResourceBundle', 'AccessibleRole', - 'AccessibleSelection', 'AccessibleState', - 'AccessibleStateSet', 'AccessibleTable', - 'AccessibleTableModelChange', 'AccessibleText', - 'AccessibleValue', 'Acl', 'AclEntry', - 'AclNotFoundException', 'Action', 'ActionEvent', - 'ActionListener', 'ActionMap', 'ActionMapUIResource', - 'Activatable', 'ActivateFailedException', - 'ActivationDesc', 'ActivationException', - 'ActivationGroup', 'ActivationGroupDesc', - 'ActivationGroupDesc.CommandEnvironment', - 'ActivationGroupID', 'ActivationID', - 'ActivationInstantiator', 'ActivationMonitor', - 'ActivationSystem', 'Activator', 'ActiveEvent', - 'Adjustable', 'AdjustmentEvent', - 'AdjustmentListener', 'Adler32', 'AffineTransform', - 'AffineTransformOp', 'AlgorithmParameterGenerator', - 'AlgorithmParameterGeneratorSpi', - 'AlgorithmParameters', 'AlgorithmParameterSpec', - 'AlgorithmParametersSpi', 'AllPermission', - 'AlphaComposite', 'AlreadyBound', - 'AlreadyBoundException', 'AlreadyBoundHelper', - 'AlreadyBoundHolder', 'AncestorEvent', - 'AncestorListener', 'Annotation', 'Any', 'AnyHolder', - 'AnySeqHelper', 'AnySeqHolder', 'Applet', - 'AppletContext', 'AppletInitializer', 'AppletStub', - 'ApplicationException', 'Arc2D', 'Arc2D.Double', - 'Arc2D.Float', 'Area', 'AreaAveragingScaleFilter', - 'ARG_IN', 'ARG_INOUT', 'ARG_OUT', - 'ArithmeticException', 'Array', - 'ArrayIndexOutOfBoundsException', 'ArrayList', - 'Arrays', 'ArrayStoreException', 'AsyncBoxView', - 'Attribute', 'AttributedCharacterIterator', - 'AttributedCharacterIterator.Attribute', - 'AttributedString', 'AttributeInUseException', - 'AttributeList', 'AttributeModificationException', - 'Attributes', 'Attributes.Name', 'AttributeSet', - 'AttributeSet.CharacterAttribute', - 'AttributeSet.ColorAttribute', - 'AttributeSet.FontAttribute', - 'AttributeSet.ParagraphAttribute', 'AudioClip', - 'AudioFileFormat', 'AudioFileFormat.Type', - 'AudioFileReader', 'AudioFileWriter', 'AudioFormat', - 'AudioFormat.Encoding', 'AudioInputStream', - 'AudioPermission', 'AudioSystem', - 'AuthenticationException', - 'AuthenticationNotSupportedException', - 'Authenticator', 'Autoscroll', 'AWTError', - 'AWTEvent', 'AWTEventListener', - 'AWTEventMulticaster', 'AWTException', - 'AWTPermission', 'BadKind', 'BadLocationException', - 'BAD_CONTEXT', 'BAD_INV_ORDER', 'BAD_OPERATION', - 'BAD_PARAM', 'BAD_POLICY', 'BAD_POLICY_TYPE', - 'BAD_POLICY_VALUE', 'BAD_TYPECODE', 'BandCombineOp', - 'BandedSampleModel', 'BasicArrowButton', - 'BasicAttribute', 'BasicAttributes', 'BasicBorders', - 'BasicBorders.ButtonBorder', - 'BasicBorders.FieldBorder', - 'BasicBorders.MarginBorder', - 'BasicBorders.MenuBarBorder', - 'BasicBorders.RadioButtonBorder', - 'BasicBorders.SplitPaneBorder', - 'BasicBorders.ToggleButtonBorder', - 'BasicButtonListener', 'BasicButtonUI', - 'BasicCheckBoxMenuItemUI', 'BasicCheckBoxUI', - 'BasicColorChooserUI', 'BasicComboBoxEditor', - 'BasicComboBoxEditor.UIResource', - 'BasicComboBoxRenderer', - 'BasicComboBoxRenderer.UIResource', - 'BasicComboBoxUI', 'BasicComboPopup', - 'BasicDesktopIconUI', 'BasicDesktopPaneUI', - 'BasicDirectoryModel', 'BasicEditorPaneUI', - 'BasicFileChooserUI', 'BasicGraphicsUtils', - 'BasicHTML', 'BasicIconFactory', - 'BasicInternalFrameTitlePane', - 'BasicInternalFrameUI', 'BasicLabelUI', - 'BasicListUI', 'BasicLookAndFeel', 'BasicMenuBarUI', - 'BasicMenuItemUI', 'BasicMenuUI', - 'BasicOptionPaneUI', - 'BasicOptionPaneUI.ButtonAreaLayout', 'BasicPanelUI', - 'BasicPasswordFieldUI', 'BasicPermission', - 'BasicPopupMenuSeparatorUI', 'BasicPopupMenuUI', - 'BasicProgressBarUI', 'BasicRadioButtonMenuItemUI', - 'BasicRadioButtonUI', 'BasicRootPaneUI', - 'BasicScrollBarUI', 'BasicScrollPaneUI', - 'BasicSeparatorUI', 'BasicSliderUI', - 'BasicSplitPaneDivider', 'BasicSplitPaneUI', - 'BasicStroke', 'BasicTabbedPaneUI', - 'BasicTableHeaderUI', 'BasicTableUI', - 'BasicTextAreaUI', 'BasicTextFieldUI', - 'BasicTextPaneUI', 'BasicTextUI', - 'BasicTextUI.BasicCaret', - 'BasicTextUI.BasicHighlighter', - 'BasicToggleButtonUI', 'BasicToolBarSeparatorUI', - 'BasicToolBarUI', 'BasicToolTipUI', 'BasicTreeUI', - 'BasicViewportUI', 'BatchUpdateException', - 'BeanContext', 'BeanContextChild', - 'BeanContextChildComponentProxy', - 'BeanContextChildSupport', - 'BeanContextContainerProxy', 'BeanContextEvent', - 'BeanContextMembershipEvent', - 'BeanContextMembershipListener', 'BeanContextProxy', - 'BeanContextServiceAvailableEvent', - 'BeanContextServiceProvider', - 'BeanContextServiceProviderBeanInfo', - 'BeanContextServiceRevokedEvent', - 'BeanContextServiceRevokedListener', - 'BeanContextServices', 'BeanContextServicesListener', - 'BeanContextServicesSupport', - 'BeanContextServicesSupport.BCSSServiceProvider', - 'BeanContextSupport', - 'BeanContextSupport.BCSIterator', 'BeanDescriptor', - 'BeanInfo', 'Beans', 'BevelBorder', 'BigDecimal', - 'BigInteger', 'BinaryRefAddr', 'BindException', - 'Binding', 'BindingHelper', 'BindingHolder', - 'BindingIterator', 'BindingIteratorHelper', - 'BindingIteratorHolder', 'BindingIteratorOperations', - 'BindingListHelper', 'BindingListHolder', - 'BindingType', 'BindingTypeHelper', - 'BindingTypeHolder', 'BitSet', 'Blob', 'BlockView', - 'Book', 'Boolean', 'BooleanControl', - 'BooleanControl.Type', 'BooleanHolder', - 'BooleanSeqHelper', 'BooleanSeqHolder', 'Border', - 'BorderFactory', 'BorderLayout', 'BorderUIResource', - 'BorderUIResource.BevelBorderUIResource', - 'BorderUIResource.CompoundBorderUIResource', - 'BorderUIResource.EmptyBorderUIResource', - 'BorderUIResource.EtchedBorderUIResource', - 'BorderUIResource.LineBorderUIResource', - 'BorderUIResource.MatteBorderUIResource', - 'BorderUIResource.TitledBorderUIResource', - 'BoundedRangeModel', 'Bounds', 'Box', 'Box.Filler', - 'BoxedValueHelper', 'BoxLayout', 'BoxView', - 'BreakIterator', 'BufferedImage', - 'BufferedImageFilter', 'BufferedImageOp', - 'BufferedInputStream', 'BufferedOutputStream', - 'BufferedReader', 'BufferedWriter', 'Button', - 'ButtonGroup', 'ButtonModel', 'ButtonUI', 'Byte', - 'ByteArrayInputStream', 'ByteArrayOutputStream', - 'ByteHolder', 'ByteLookupTable', 'Calendar', - 'CallableStatement', 'CannotProceed', - 'CannotProceedException', 'CannotProceedHelper', - 'CannotProceedHolder', 'CannotRedoException', - 'CannotUndoException', 'Canvas', 'CardLayout', - 'Caret', 'CaretEvent', 'CaretListener', 'CellEditor', - 'CellEditorListener', 'CellRendererPane', - 'Certificate', 'Certificate.CertificateRep', - 'CertificateEncodingException', - 'CertificateException', - 'CertificateExpiredException', 'CertificateFactory', - 'CertificateFactorySpi', - 'CertificateNotYetValidException', - 'CertificateParsingException', - 'ChangedCharSetException', 'ChangeEvent', - 'ChangeListener', 'Character', 'Character.Subset', - 'Character.UnicodeBlock', 'CharacterIterator', - 'CharArrayReader', 'CharArrayWriter', - 'CharConversionException', 'CharHolder', - 'CharSeqHelper', 'CharSeqHolder', 'Checkbox', - 'CheckboxGroup', 'CheckboxMenuItem', - 'CheckedInputStream', 'CheckedOutputStream', - 'Checksum', 'Choice', 'ChoiceFormat', 'Class', - 'ClassCastException', 'ClassCircularityError', - 'ClassDesc', 'ClassFormatError', 'ClassLoader', - 'ClassNotFoundException', 'Clip', 'Clipboard', - 'ClipboardOwner', 'Clob', 'Cloneable', - 'CloneNotSupportedException', 'CMMException', - 'CodeSource', 'CollationElementIterator', - 'CollationKey', 'Collator', 'Collection', - 'Collections', 'Color', - 'ColorChooserComponentFactory', 'ColorChooserUI', - 'ColorConvertOp', 'ColorModel', - 'ColorSelectionModel', 'ColorSpace', - 'ColorUIResource', 'ComboBoxEditor', 'ComboBoxModel', - 'ComboBoxUI', 'ComboPopup', 'CommunicationException', - 'COMM_FAILURE', 'Comparable', 'Comparator', - 'Compiler', 'CompletionStatus', - 'CompletionStatusHelper', 'Component', - 'ComponentAdapter', 'ComponentColorModel', - 'ComponentEvent', 'ComponentInputMap', - 'ComponentInputMapUIResource', 'ComponentListener', - 'ComponentOrientation', 'ComponentSampleModel', - 'ComponentUI', 'ComponentView', 'Composite', - 'CompositeContext', 'CompositeName', 'CompositeView', - 'CompoundBorder', 'CompoundControl', - 'CompoundControl.Type', 'CompoundEdit', - 'CompoundName', 'ConcurrentModificationException', - 'ConfigurationException', 'ConnectException', - 'ConnectIOException', 'Connection', 'Constructor', 'Container', - 'ContainerAdapter', 'ContainerEvent', - 'ContainerListener', 'ContentHandler', - 'ContentHandlerFactory', 'ContentModel', 'Context', - 'ContextList', 'ContextNotEmptyException', - 'ContextualRenderedImageFactory', 'Control', - 'Control.Type', 'ControlFactory', - 'ControllerEventListener', 'ConvolveOp', 'CRC32', - 'CRL', 'CRLException', 'CropImageFilter', 'CSS', - 'CSS.Attribute', 'CTX_RESTRICT_SCOPE', - 'CubicCurve2D', 'CubicCurve2D.Double', - 'CubicCurve2D.Float', 'Current', 'CurrentHelper', - 'CurrentHolder', 'CurrentOperations', 'Cursor', - 'Customizer', 'CustomMarshal', 'CustomValue', - 'DatabaseMetaData', 'DataBuffer', 'DataBufferByte', - 'DataBufferInt', 'DataBufferShort', - 'DataBufferUShort', 'DataFlavor', - 'DataFormatException', 'DatagramPacket', - 'DatagramSocket', 'DatagramSocketImpl', - 'DatagramSocketImplFactory', 'DataInput', - 'DataInputStream', 'DataLine', 'DataLine.Info', - 'DataOutput', 'DataOutputStream', - 'DataTruncation', 'DATA_CONVERSION', 'Date', - 'DateFormat', 'DateFormatSymbols', 'DebugGraphics', - 'DecimalFormat', 'DecimalFormatSymbols', - 'DefaultBoundedRangeModel', 'DefaultButtonModel', - 'DefaultCaret', 'DefaultCellEditor', - 'DefaultColorSelectionModel', 'DefaultComboBoxModel', - 'DefaultDesktopManager', 'DefaultEditorKit', - 'DefaultEditorKit.BeepAction', - 'DefaultEditorKit.CopyAction', - 'DefaultEditorKit.CutAction', - 'DefaultEditorKit.DefaultKeyTypedAction', - 'DefaultEditorKit.InsertBreakAction', - 'DefaultEditorKit.InsertContentAction', - 'DefaultEditorKit.InsertTabAction', - 'DefaultEditorKit.PasteAction,', - 'DefaultFocusManager', 'DefaultHighlighter', - 'DefaultHighlighter.DefaultHighlightPainter', - 'DefaultListCellRenderer', - 'DefaultListCellRenderer.UIResource', - 'DefaultListModel', 'DefaultListSelectionModel', - 'DefaultMenuLayout', 'DefaultMetalTheme', - 'DefaultMutableTreeNode', - 'DefaultSingleSelectionModel', - 'DefaultStyledDocument', - 'DefaultStyledDocument.AttributeUndoableEdit', - 'DefaultStyledDocument.ElementSpec', - 'DefaultTableCellRenderer', - 'DefaultTableCellRenderer.UIResource', - 'DefaultTableColumnModel', 'DefaultTableModel', - 'DefaultTextUI', 'DefaultTreeCellEditor', - 'DefaultTreeCellRenderer', 'DefaultTreeModel', - 'DefaultTreeSelectionModel', 'DefinitionKind', - 'DefinitionKindHelper', 'Deflater', - 'DeflaterOutputStream', 'Delegate', 'DesignMode', - 'DesktopIconUI', 'DesktopManager', 'DesktopPaneUI', - 'DGC', 'Dialog', 'Dictionary', 'DigestException', - 'DigestInputStream', 'DigestOutputStream', - 'Dimension', 'Dimension2D', 'DimensionUIResource', - 'DirContext', 'DirectColorModel', 'DirectoryManager', - 'DirObjectFactory', 'DirStateFactory', - 'DirStateFactory.Result', 'DnDConstants', 'Document', - 'DocumentEvent', 'DocumentEvent.ElementChange', - 'DocumentEvent.EventType', 'DocumentListener', - 'DocumentParser', 'DomainCombiner', 'DomainManager', - 'DomainManagerOperations', 'Double', 'DoubleHolder', - 'DoubleSeqHelper', 'DoubleSeqHolder', - 'DragGestureEvent', 'DragGestureListener', - 'DragGestureRecognizer', 'DragSource', - 'DragSourceContext', 'DragSourceDragEvent', - 'DragSourceDropEvent', 'DragSourceEvent', - 'DragSourceListener', 'Driver', 'DriverManager', - 'DriverPropertyInfo', 'DropTarget', - 'DropTarget.DropTargetAutoScroller', - 'DropTargetContext', 'DropTargetDragEvent', - 'DropTargetDropEvent', 'DropTargetEvent', - 'DropTargetListener', 'DSAKey', - 'DSAKeyPairGenerator', 'DSAParameterSpec', - 'DSAParams', 'DSAPrivateKey', 'DSAPrivateKeySpec', - 'DSAPublicKey', 'DSAPublicKeySpec', 'DTD', - 'DTDConstants', 'DynamicImplementation', 'DynAny', - 'DynArray', 'DynEnum', 'DynFixed', 'DynSequence', - 'DynStruct', 'DynUnion', 'DynValue', 'EditorKit', - 'Element', 'ElementIterator', 'Ellipse2D', - 'Ellipse2D.Double', 'Ellipse2D.Float', 'EmptyBorder', - 'EmptyStackException', 'EncodedKeySpec', 'Entity', - 'EnumControl', 'EnumControl.Type', 'Enumeration', - 'Environment', 'EOFException', 'Error', - 'EtchedBorder', 'Event', 'EventContext', - 'EventDirContext', 'EventListener', - 'EventListenerList', 'EventObject', 'EventQueue', - 'EventSetDescriptor', 'Exception', - 'ExceptionInInitializerError', 'ExceptionList', - 'ExpandVetoException', 'ExportException', - 'ExtendedRequest', 'ExtendedResponse', - 'Externalizable', 'FeatureDescriptor', 'Field', - 'FieldNameHelper', 'FieldPosition', 'FieldView', - 'File', 'FileChooserUI', 'FileDescriptor', - 'FileDialog', 'FileFilter', - 'FileInputStream', 'FilenameFilter', 'FileNameMap', - 'FileNotFoundException', 'FileOutputStream', - 'FilePermission', 'FileReader', 'FileSystemView', - 'FileView', 'FileWriter', 'FilteredImageSource', - 'FilterInputStream', 'FilterOutputStream', - 'FilterReader', 'FilterWriter', - 'FixedHeightLayoutCache', 'FixedHolder', - 'FlatteningPathIterator', 'FlavorMap', 'Float', - 'FloatControl', 'FloatControl.Type', 'FloatHolder', - 'FloatSeqHelper', 'FloatSeqHolder', 'FlowLayout', - 'FlowView', 'FlowView.FlowStrategy', 'FocusAdapter', - 'FocusEvent', 'FocusListener', 'FocusManager', - 'Font', 'FontFormatException', 'FontMetrics', - 'FontRenderContext', 'FontUIResource', 'Format', - 'FormatConversionProvider', 'FormView', 'Frame', - 'FREE_MEM', 'GapContent', 'GeneralPath', - 'GeneralSecurityException', 'GlyphJustificationInfo', - 'GlyphMetrics', 'GlyphVector', 'GlyphView', - 'GlyphView.GlyphPainter', 'GradientPaint', - 'GraphicAttribute', 'Graphics', 'Graphics2D', - 'GraphicsConfigTemplate', 'GraphicsConfiguration', - 'GraphicsDevice', 'GraphicsEnvironment', - 'GrayFilter', 'GregorianCalendar', - 'GridBagConstraints', 'GridBagLayout', 'GridLayout', - 'Group', 'Guard', 'GuardedObject', 'GZIPInputStream', - 'GZIPOutputStream', 'HasControls', 'HashMap', - 'HashSet', 'Hashtable', 'HierarchyBoundsAdapter', - 'HierarchyBoundsListener', 'HierarchyEvent', - 'HierarchyListener', 'Highlighter', - 'Highlighter.Highlight', - 'Highlighter.HighlightPainter', 'HTML', - 'HTML.Attribute', 'HTML.Tag', 'HTML.UnknownTag', - 'HTMLDocument', 'HTMLDocument.Iterator', - 'HTMLEditorKit', 'HTMLEditorKit.HTMLFactory', - 'HTMLEditorKit.HTMLTextAction', - 'HTMLEditorKit.InsertHTMLTextAction', - 'HTMLEditorKit.LinkController', - 'HTMLEditorKit.Parser', - 'HTMLEditorKit.ParserCallback', - 'HTMLFrameHyperlinkEvent', 'HTMLWriter', - 'HttpURLConnection', 'HyperlinkEvent', - 'HyperlinkEvent.EventType', 'HyperlinkListener', - 'ICC_ColorSpace', 'ICC_Profile', 'ICC_ProfileGray', - 'ICC_ProfileRGB', 'Icon', 'IconUIResource', - 'IconView', 'IdentifierHelper', 'Identity', - 'IdentityScope', 'IDLEntity', 'IDLType', - 'IDLTypeHelper', 'IDLTypeOperations', - 'IllegalAccessError', 'IllegalAccessException', - 'IllegalArgumentException', - 'IllegalComponentStateException', - 'IllegalMonitorStateException', - 'IllegalPathStateException', 'IllegalStateException', - 'IllegalThreadStateException', 'Image', - 'ImageConsumer', 'ImageFilter', - 'ImageGraphicAttribute', 'ImageIcon', - 'ImageObserver', 'ImageProducer', - 'ImagingOpException', 'IMP_LIMIT', - 'IncompatibleClassChangeError', - 'InconsistentTypeCode', 'IndexColorModel', - 'IndexedPropertyDescriptor', - 'IndexOutOfBoundsException', 'IndirectionException', - 'InetAddress', 'Inflater', 'InflaterInputStream', - 'InheritableThreadLocal', 'InitialContext', - 'InitialContextFactory', - 'InitialContextFactoryBuilder', 'InitialDirContext', - 'INITIALIZE', 'Initializer', 'InitialLdapContext', - 'InlineView', 'InputContext', 'InputEvent', - 'InputMap', 'InputMapUIResource', 'InputMethod', - 'InputMethodContext', 'InputMethodDescriptor', - 'InputMethodEvent', 'InputMethodHighlight', - 'InputMethodListener', 'InputMethodRequests', - 'InputStream', - 'InputStreamReader', 'InputSubset', 'InputVerifier', - 'Insets', 'InsetsUIResource', 'InstantiationError', - 'InstantiationException', 'Instrument', - 'InsufficientResourcesException', 'Integer', - 'INTERNAL', 'InternalError', 'InternalFrameAdapter', - 'InternalFrameEvent', 'InternalFrameListener', - 'InternalFrameUI', 'InterruptedException', - 'InterruptedIOException', - 'InterruptedNamingException', 'INTF_REPOS', - 'IntHolder', 'IntrospectionException', - 'Introspector', 'Invalid', - 'InvalidAlgorithmParameterException', - 'InvalidAttributeIdentifierException', - 'InvalidAttributesException', - 'InvalidAttributeValueException', - 'InvalidClassException', - 'InvalidDnDOperationException', - 'InvalidKeyException', 'InvalidKeySpecException', - 'InvalidMidiDataException', 'InvalidName', - 'InvalidNameException', - 'InvalidNameHelper', 'InvalidNameHolder', - 'InvalidObjectException', - 'InvalidParameterException', - 'InvalidParameterSpecException', - 'InvalidSearchControlsException', - 'InvalidSearchFilterException', 'InvalidSeq', - 'InvalidTransactionException', 'InvalidValue', - 'INVALID_TRANSACTION', 'InvocationEvent', - 'InvocationHandler', 'InvocationTargetException', - 'InvokeHandler', 'INV_FLAG', 'INV_IDENT', - 'INV_OBJREF', 'INV_POLICY', 'IOException', - 'IRObject', 'IRObjectOperations', 'IstringHelper', - 'ItemEvent', 'ItemListener', 'ItemSelectable', - 'Iterator', 'JApplet', 'JarEntry', 'JarException', - 'JarFile', 'JarInputStream', 'JarOutputStream', - 'JarURLConnection', 'JButton', 'JCheckBox', - 'JCheckBoxMenuItem', 'JColorChooser', 'JComboBox', - 'JComboBox.KeySelectionManager', 'JComponent', - 'JDesktopPane', 'JDialog', 'JEditorPane', - 'JFileChooser', 'JFrame', 'JInternalFrame', - 'JInternalFrame.JDesktopIcon', 'JLabel', - 'JLayeredPane', 'JList', 'JMenu', 'JMenuBar', - 'JMenuItem', 'JobAttributes', - 'JobAttributes.DefaultSelectionType', - 'JobAttributes.DestinationType', - 'JobAttributes.DialogType', - 'JobAttributes.MultipleDocumentHandlingType', - 'JobAttributes.SidesType', 'JOptionPane', 'JPanel', - 'JPasswordField', 'JPopupMenu', - 'JPopupMenu.Separator', 'JProgressBar', - 'JRadioButton', 'JRadioButtonMenuItem', 'JRootPane', - 'JScrollBar', 'JScrollPane', 'JSeparator', 'JSlider', - 'JSplitPane', 'JTabbedPane', 'JTable', - 'JTableHeader', 'JTextArea', 'JTextComponent', - 'JTextComponent.KeyBinding', 'JTextField', - 'JTextPane', 'JToggleButton', - 'JToggleButton.ToggleButtonModel', 'JToolBar', - 'JToolBar.Separator', 'JToolTip', 'JTree', - 'JTree.DynamicUtilTreeNode', - 'JTree.EmptySelectionModel', 'JViewport', 'JWindow', - 'Kernel', 'Key', 'KeyAdapter', 'KeyEvent', - 'KeyException', 'KeyFactory', 'KeyFactorySpi', - 'KeyListener', 'KeyManagementException', 'Keymap', - 'KeyPair', 'KeyPairGenerator', 'KeyPairGeneratorSpi', - 'KeySpec', 'KeyStore', 'KeyStoreException', - 'KeyStoreSpi', 'KeyStroke', 'Label', 'LabelUI', - 'LabelView', 'LastOwnerException', - 'LayeredHighlighter', - 'LayeredHighlighter.LayerPainter', 'LayoutManager', - 'LayoutManager2', 'LayoutQueue', 'LdapContext', - 'LdapReferralException', 'Lease', - 'LimitExceededException', 'Line', 'Line.Info', - 'Line2D', 'Line2D.Double', 'Line2D.Float', - 'LineBorder', 'LineBreakMeasurer', 'LineEvent', - 'LineEvent.Type', 'LineListener', 'LineMetrics', - 'LineNumberInputStream', 'LineNumberReader', - 'LineUnavailableException', 'LinkageError', - 'LinkedList', 'LinkException', 'LinkLoopException', - 'LinkRef', 'List', 'ListCellRenderer', - 'ListDataEvent', 'ListDataListener', 'ListIterator', - 'ListModel', 'ListResourceBundle', - 'ListSelectionEvent', 'ListSelectionListener', - 'ListSelectionModel', 'ListUI', 'ListView', - 'LoaderHandler', 'Locale', 'LocateRegistry', - 'LogStream', 'Long', 'LongHolder', - 'LongLongSeqHelper', 'LongLongSeqHolder', - 'LongSeqHelper', 'LongSeqHolder', 'LookAndFeel', - 'LookupOp', 'LookupTable', 'MalformedLinkException', - 'MalformedURLException', 'Manifest', 'Map', - 'Map.Entry', 'MARSHAL', 'MarshalException', - 'MarshalledObject', 'Math', 'MatteBorder', - 'MediaTracker', 'Member', 'MemoryImageSource', - 'Menu', 'MenuBar', 'MenuBarUI', 'MenuComponent', - 'MenuContainer', 'MenuDragMouseEvent', - 'MenuDragMouseListener', 'MenuElement', 'MenuEvent', - 'MenuItem', 'MenuItemUI', 'MenuKeyEvent', - 'MenuKeyListener', 'MenuListener', - 'MenuSelectionManager', 'MenuShortcut', - 'MessageDigest', 'MessageDigestSpi', 'MessageFormat', - 'MetaEventListener', 'MetalBorders', - 'MetalBorders.ButtonBorder', - 'MetalBorders.Flush3DBorder', - 'MetalBorders.InternalFrameBorder', - 'MetalBorders.MenuBarBorder', - 'MetalBorders.MenuItemBorder', - 'MetalBorders.OptionDialogBorder', - 'MetalBorders.PaletteBorder', - 'MetalBorders.PopupMenuBorder', - 'MetalBorders.RolloverButtonBorder', - 'MetalBorders.ScrollPaneBorder', - 'MetalBorders.TableHeaderBorder', - 'MetalBorders.TextFieldBorder', - 'MetalBorders.ToggleButtonBorder', - 'MetalBorders.ToolBarBorder', 'MetalButtonUI', - 'MetalCheckBoxIcon', 'MetalCheckBoxUI', - 'MetalComboBoxButton', 'MetalComboBoxEditor', - 'MetalComboBoxEditor.UIResource', - 'MetalComboBoxIcon', 'MetalComboBoxUI', - 'MetalDesktopIconUI', 'MetalFileChooserUI', - 'MetalIconFactory', 'MetalIconFactory.FileIcon16', - 'MetalIconFactory.FolderIcon16', - 'MetalIconFactory.PaletteCloseIcon', - 'MetalIconFactory.TreeControlIcon', - 'MetalIconFactory.TreeFolderIcon', - 'MetalIconFactory.TreeLeafIcon', - 'MetalInternalFrameTitlePane', - 'MetalInternalFrameUI', 'MetalLabelUI', - 'MetalLookAndFeel', 'MetalPopupMenuSeparatorUI', - 'MetalProgressBarUI', 'MetalRadioButtonUI', - 'MetalScrollBarUI', 'MetalScrollButton', - 'MetalScrollPaneUI', 'MetalSeparatorUI', - 'MetalSliderUI', 'MetalSplitPaneUI', - 'MetalTabbedPaneUI', 'MetalTextFieldUI', - 'MetalTheme', 'MetalToggleButtonUI', - 'MetalToolBarUI', 'MetalToolTipUI', 'MetalTreeUI', - 'MetaMessage', 'Method', 'MethodDescriptor', - 'MidiChannel', 'MidiDevice', 'MidiDevice.Info', - 'MidiDeviceProvider', 'MidiEvent', 'MidiFileFormat', - 'MidiFileReader', 'MidiFileWriter', 'MidiMessage', - 'MidiSystem', 'MidiUnavailableException', - 'MimeTypeParseException', 'MinimalHTMLWriter', - 'MissingResourceException', 'Mixer', 'Mixer.Info', - 'MixerProvider', 'ModificationItem', 'Modifier', - 'MouseAdapter', 'MouseDragGestureRecognizer', - 'MouseEvent', 'MouseInputAdapter', - 'MouseInputListener', 'MouseListener', - 'MouseMotionAdapter', 'MouseMotionListener', - 'MultiButtonUI', 'MulticastSocket', - 'MultiColorChooserUI', 'MultiComboBoxUI', - 'MultiDesktopIconUI', 'MultiDesktopPaneUI', - 'MultiFileChooserUI', 'MultiInternalFrameUI', - 'MultiLabelUI', 'MultiListUI', 'MultiLookAndFeel', - 'MultiMenuBarUI', 'MultiMenuItemUI', - 'MultiOptionPaneUI', 'MultiPanelUI', - 'MultiPixelPackedSampleModel', 'MultipleMaster', - 'MultiPopupMenuUI', 'MultiProgressBarUI', - 'MultiScrollBarUI', 'MultiScrollPaneUI', - 'MultiSeparatorUI', 'MultiSliderUI', - 'MultiSplitPaneUI', 'MultiTabbedPaneUI', - 'MultiTableHeaderUI', 'MultiTableUI', 'MultiTextUI', - 'MultiToolBarUI', 'MultiToolTipUI', 'MultiTreeUI', - 'MultiViewportUI', 'MutableAttributeSet', - 'MutableComboBoxModel', 'MutableTreeNode', 'Name', - 'NameAlreadyBoundException', 'NameClassPair', - 'NameComponent', 'NameComponentHelper', - 'NameComponentHolder', 'NamedValue', 'NameHelper', - 'NameHolder', 'NameNotFoundException', 'NameParser', - 'NamespaceChangeListener', 'NameValuePair', - 'NameValuePairHelper', 'Naming', 'NamingContext', - 'NamingContextHelper', 'NamingContextHolder', - 'NamingContextOperations', 'NamingEnumeration', - 'NamingEvent', 'NamingException', - 'NamingExceptionEvent', 'NamingListener', - 'NamingManager', 'NamingSecurityException', - 'NegativeArraySizeException', 'NetPermission', - 'NoClassDefFoundError', 'NoInitialContextException', - 'NoninvertibleTransformException', - 'NoPermissionException', 'NoRouteToHostException', - 'NoSuchAlgorithmException', - 'NoSuchAttributeException', 'NoSuchElementException', - 'NoSuchFieldError', 'NoSuchFieldException', - 'NoSuchMethodError', 'NoSuchMethodException', - 'NoSuchObjectException', 'NoSuchProviderException', - 'NotActiveException', 'NotBoundException', - 'NotContextException', 'NotEmpty', 'NotEmptyHelper', - 'NotEmptyHolder', 'NotFound', 'NotFoundHelper', - 'NotFoundHolder', 'NotFoundReason', - 'NotFoundReasonHelper', 'NotFoundReasonHolder', - 'NotOwnerException', 'NotSerializableException', - 'NO_IMPLEMENT', 'NO_MEMORY', 'NO_PERMISSION', - 'NO_RESOURCES', 'NO_RESPONSE', - 'NullPointerException', 'Number', 'NumberFormat', - 'NumberFormatException', 'NVList', 'Object', - 'ObjectChangeListener', 'ObjectFactory', - 'ObjectFactoryBuilder', 'ObjectHelper', - 'ObjectHolder', 'ObjectImpl', - 'ObjectInput', 'ObjectInputStream', - 'ObjectInputStream.GetField', - 'ObjectInputValidation', 'ObjectOutput', - 'ObjectOutputStream', 'ObjectOutputStream.PutField', - 'ObjectStreamClass', 'ObjectStreamConstants', - 'ObjectStreamException', 'ObjectStreamField', - 'ObjectView', 'OBJECT_NOT_EXIST', 'ObjID', - 'OBJ_ADAPTER', 'Observable', 'Observer', - 'OctetSeqHelper', 'OctetSeqHolder', 'OMGVMCID', - 'OpenType', 'Operation', - 'OperationNotSupportedException', 'Option', - 'OptionalDataException', 'OptionPaneUI', 'ORB', - 'OutOfMemoryError', 'OutputStream', - 'OutputStreamWriter', 'OverlayLayout', 'Owner', - 'Package', 'PackedColorModel', 'Pageable', - 'PageAttributes', 'PageAttributes.ColorType', - 'PageAttributes.MediaType', - 'PageAttributes.OrientationRequestedType', - 'PageAttributes.OriginType', - 'PageAttributes.PrintQualityType', 'PageFormat', - 'Paint', 'PaintContext', 'PaintEvent', 'Panel', - 'PanelUI', 'Paper', 'ParagraphView', - 'ParameterBlock', 'ParameterDescriptor', - 'ParseException', 'ParsePosition', 'Parser', - 'ParserDelegator', 'PartialResultException', - 'PasswordAuthentication', 'PasswordView', 'Patch', - 'PathIterator', 'Permission', - 'PermissionCollection', 'Permissions', - 'PERSIST_STORE', 'PhantomReference', - 'PipedInputStream', 'PipedOutputStream', - 'PipedReader', 'PipedWriter', 'PixelGrabber', - 'PixelInterleavedSampleModel', 'PKCS8EncodedKeySpec', - 'PlainDocument', 'PlainView', 'Point', 'Point2D', - 'Point2D.Double', 'Point2D.Float', 'Policy', - 'PolicyError', 'PolicyHelper', - 'PolicyHolder', 'PolicyListHelper', - 'PolicyListHolder', 'PolicyOperations', - 'PolicyTypeHelper', 'Polygon', 'PopupMenu', - 'PopupMenuEvent', 'PopupMenuListener', 'PopupMenuUI', - 'Port', 'Port.Info', 'PortableRemoteObject', - 'PortableRemoteObjectDelegate', 'Position', - 'Position.Bias', 'PreparedStatement', 'Principal', - 'PrincipalHolder', 'Printable', - 'PrinterAbortException', 'PrinterException', - 'PrinterGraphics', 'PrinterIOException', - 'PrinterJob', 'PrintGraphics', 'PrintJob', - 'PrintStream', 'PrintWriter', 'PrivateKey', - 'PRIVATE_MEMBER', 'PrivilegedAction', - 'PrivilegedActionException', - 'PrivilegedExceptionAction', 'Process', - 'ProfileDataException', 'ProgressBarUI', - 'ProgressMonitor', 'ProgressMonitorInputStream', - 'Properties', 'PropertyChangeEvent', - 'PropertyChangeListener', 'PropertyChangeSupport', - 'PropertyDescriptor', 'PropertyEditor', - 'PropertyEditorManager', 'PropertyEditorSupport', - 'PropertyPermission', 'PropertyResourceBundle', - 'PropertyVetoException', 'ProtectionDomain', - 'ProtocolException', 'Provider', 'ProviderException', - 'Proxy', 'PublicKey', 'PUBLIC_MEMBER', - 'PushbackInputStream', 'PushbackReader', - 'QuadCurve2D', 'QuadCurve2D.Double', - 'QuadCurve2D.Float', 'Random', 'RandomAccessFile', - 'Raster', 'RasterFormatException', 'RasterOp', - 'Reader', 'Receiver', 'Rectangle', 'Rectangle2D', - 'Rectangle2D.Double', 'Rectangle2D.Float', - 'RectangularShape', 'Ref', 'RefAddr', 'Reference', - 'Referenceable', 'ReferenceQueue', - 'ReferralException', 'ReflectPermission', 'Registry', - 'RegistryHandler', 'RemarshalException', 'Remote', - 'RemoteCall', 'RemoteException', 'RemoteObject', - 'RemoteRef', 'RemoteServer', 'RemoteStub', - 'RenderableImage', 'RenderableImageOp', - 'RenderableImageProducer', 'RenderContext', - 'RenderedImage', 'RenderedImageFactory', 'Renderer', - 'RenderingHints', 'RenderingHints.Key', - 'RepaintManager', 'ReplicateScaleFilter', - 'Repository', 'RepositoryIdHelper', 'Request', - 'RescaleOp', 'Resolver', 'ResolveResult', - 'ResourceBundle', 'ResponseHandler', 'ResultSet', - 'ResultSetMetaData', 'ReverbType', 'RGBImageFilter', - 'RMIClassLoader', 'RMIClientSocketFactory', - 'RMIFailureHandler', 'RMISecurityException', - 'RMISecurityManager', 'RMIServerSocketFactory', - 'RMISocketFactory', 'Robot', 'RootPaneContainer', - 'RootPaneUI', 'RoundRectangle2D', - 'RoundRectangle2D.Double', 'RoundRectangle2D.Float', - 'RowMapper', 'RSAKey', 'RSAKeyGenParameterSpec', - 'RSAPrivateCrtKey', 'RSAPrivateCrtKeySpec', - 'RSAPrivateKey', 'RSAPrivateKeySpec', 'RSAPublicKey', - 'RSAPublicKeySpec', 'RTFEditorKit', - 'RuleBasedCollator', 'Runnable', 'RunTime', - 'Runtime', 'RuntimeException', 'RunTimeOperations', - 'RuntimePermission', 'SampleModel', - 'SchemaViolationException', 'Scrollable', - 'Scrollbar', 'ScrollBarUI', 'ScrollPane', - 'ScrollPaneConstants', 'ScrollPaneLayout', - 'ScrollPaneLayout.UIResource', 'ScrollPaneUI', - 'SearchControls', 'SearchResult', - 'SecureClassLoader', 'SecureRandom', - 'SecureRandomSpi', 'Security', 'SecurityException', - 'SecurityManager', 'SecurityPermission', 'Segment', - 'SeparatorUI', 'Sequence', 'SequenceInputStream', - 'Sequencer', 'Sequencer.SyncMode', 'Serializable', - 'SerializablePermission', 'ServantObject', - 'ServerCloneException', 'ServerError', - 'ServerException', 'ServerNotActiveException', - 'ServerRef', 'ServerRequest', - 'ServerRuntimeException', 'ServerSocket', - 'ServiceDetail', 'ServiceDetailHelper', - 'ServiceInformation', 'ServiceInformationHelper', - 'ServiceInformationHolder', - 'ServiceUnavailableException', 'Set', - 'SetOverrideType', 'SetOverrideTypeHelper', 'Shape', - 'ShapeGraphicAttribute', 'Short', 'ShortHolder', - 'ShortLookupTable', 'ShortMessage', 'ShortSeqHelper', - 'ShortSeqHolder', 'Signature', 'SignatureException', - 'SignatureSpi', 'SignedObject', 'Signer', - 'SimpleAttributeSet', 'SimpleBeanInfo', - 'SimpleDateFormat', 'SimpleTimeZone', - 'SinglePixelPackedSampleModel', - 'SingleSelectionModel', 'SizeLimitExceededException', - 'SizeRequirements', 'SizeSequence', 'Skeleton', - 'SkeletonMismatchException', - 'SkeletonNotFoundException', 'SliderUI', 'Socket', - 'SocketException', 'SocketImpl', 'SocketImplFactory', - 'SocketOptions', 'SocketPermission', - 'SocketSecurityException', 'SoftBevelBorder', - 'SoftReference', 'SortedMap', 'SortedSet', - 'Soundbank', 'SoundbankReader', 'SoundbankResource', - 'SourceDataLine', 'SplitPaneUI', 'SQLData', - 'SQLException', 'SQLInput', 'SQLOutput', - 'SQLPermission', 'SQLWarning', 'Stack', - 'StackOverflowError', 'StateEdit', 'StateEditable', - 'StateFactory', 'Statement', 'Streamable', - 'StreamableValue', 'StreamCorruptedException', - 'StreamTokenizer', 'StrictMath', 'String', - 'StringBuffer', 'StringBufferInputStream', - 'StringCharacterIterator', 'StringContent', - 'StringHolder', 'StringIndexOutOfBoundsException', - 'StringReader', 'StringRefAddr', 'StringSelection', - 'StringTokenizer', 'StringValueHelper', - 'StringWriter', 'Stroke', 'Struct', 'StructMember', - 'StructMemberHelper', 'Stub', 'StubDelegate', - 'StubNotFoundException', 'Style', 'StyleConstants', - 'StyleConstants.CharacterConstants', - 'StyleConstants.ColorConstants', - 'StyleConstants.FontConstants', - 'StyleConstants.ParagraphConstants', 'StyleContext', - 'StyledDocument', 'StyledEditorKit', - 'StyledEditorKit.AlignmentAction', - 'StyledEditorKit.BoldAction', - 'StyledEditorKit.FontFamilyAction', - 'StyledEditorKit.FontSizeAction', - 'StyledEditorKit.ForegroundAction', - 'StyledEditorKit.ItalicAction', - 'StyledEditorKit.StyledTextAction', - 'StyledEditorKit.UnderlineAction', 'StyleSheet', - 'StyleSheet.BoxPainter', 'StyleSheet.ListPainter', - 'SwingConstants', 'SwingPropertyChangeSupport', - 'SwingUtilities', 'SyncFailedException', - 'Synthesizer', 'SysexMessage', 'System', - 'SystemColor', 'SystemException', 'SystemFlavorMap', - 'TabableView', 'TabbedPaneUI', 'TabExpander', - 'TableCellEditor', 'TableCellRenderer', - 'TableColumn', 'TableColumnModel', - 'TableColumnModelEvent', 'TableColumnModelListener', - 'TableHeaderUI', 'TableModel', 'TableModelEvent', - 'TableModelListener', 'TableUI', 'TableView', - 'TabSet', 'TabStop', 'TagElement', 'TargetDataLine', - 'TCKind', 'TextAction', 'TextArea', 'TextAttribute', - 'TextComponent', 'TextEvent', 'TextField', - 'TextHitInfo', 'TextLayout', - 'TextLayout.CaretPolicy', 'TextListener', - 'TextMeasurer', 'TextUI', 'TexturePaint', 'Thread', - 'ThreadDeath', 'ThreadGroup', 'ThreadLocal', - 'Throwable', 'Tie', 'TileObserver', 'Time', - 'TimeLimitExceededException', 'Timer', - 'TimerTask', 'Timestamp', 'TimeZone', 'TitledBorder', - 'ToolBarUI', 'Toolkit', 'ToolTipManager', - 'ToolTipUI', 'TooManyListenersException', 'Track', - 'TransactionRequiredException', - 'TransactionRolledbackException', - 'TRANSACTION_REQUIRED', 'TRANSACTION_ROLLEDBACK', - 'Transferable', 'TransformAttribute', 'TRANSIENT', - 'Transmitter', 'Transparency', 'TreeCellEditor', - 'TreeCellRenderer', 'TreeExpansionEvent', - 'TreeExpansionListener', 'TreeMap', 'TreeModel', - 'TreeModelEvent', 'TreeModelListener', 'TreeNode', - 'TreePath', 'TreeSelectionEvent', - 'TreeSelectionListener', 'TreeSelectionModel', - 'TreeSet', 'TreeUI', 'TreeWillExpandListener', - 'TypeCode', 'TypeCodeHolder', 'TypeMismatch', - 'Types', 'UID', 'UIDefaults', - 'UIDefaults.ActiveValue', 'UIDefaults.LazyInputMap', - 'UIDefaults.LazyValue', 'UIDefaults.ProxyLazyValue', - 'UIManager', 'UIManager.LookAndFeelInfo', - 'UIResource', 'ULongLongSeqHelper', - 'ULongLongSeqHolder', 'ULongSeqHelper', - 'ULongSeqHolder', 'UndeclaredThrowableException', - 'UndoableEdit', 'UndoableEditEvent', - 'UndoableEditListener', 'UndoableEditSupport', - 'UndoManager', 'UnexpectedException', - 'UnicastRemoteObject', 'UnionMember', - 'UnionMemberHelper', 'UNKNOWN', 'UnknownError', - 'UnknownException', 'UnknownGroupException', - 'UnknownHostException', - 'UnknownObjectException', 'UnknownServiceException', - 'UnknownUserException', 'UnmarshalException', - 'UnrecoverableKeyException', 'Unreferenced', - 'UnresolvedPermission', 'UnsatisfiedLinkError', - 'UnsolicitedNotification', - 'UnsolicitedNotificationEvent', - 'UnsolicitedNotificationListener', - 'UnsupportedAudioFileException', - 'UnsupportedClassVersionError', - 'UnsupportedEncodingException', - 'UnsupportedFlavorException', - 'UnsupportedLookAndFeelException', - 'UnsupportedOperationException', - 'UNSUPPORTED_POLICY', 'UNSUPPORTED_POLICY_VALUE', - 'URL', 'URLClassLoader', 'URLConnection', - 'URLDecoder', 'URLEncoder', 'URLStreamHandler', - 'URLStreamHandlerFactory', 'UserException', - 'UShortSeqHelper', 'UShortSeqHolder', - 'UTFDataFormatException', 'Util', 'UtilDelegate', - 'Utilities', 'ValueBase', 'ValueBaseHelper', - 'ValueBaseHolder', 'ValueFactory', 'ValueHandler', - 'ValueMember', 'ValueMemberHelper', - 'VariableHeightLayoutCache', 'Vector', 'VerifyError', - 'VersionSpecHelper', 'VetoableChangeListener', - 'VetoableChangeSupport', 'View', 'ViewFactory', - 'ViewportLayout', 'ViewportUI', - 'VirtualMachineError', 'Visibility', - 'VisibilityHelper', 'VMID', 'VM_ABSTRACT', - 'VM_CUSTOM', 'VM_NONE', 'VM_TRUNCATABLE', - 'VoiceStatus', 'Void', 'WCharSeqHelper', - 'WCharSeqHolder', 'WeakHashMap', 'WeakReference', - 'Window', 'WindowAdapter', 'WindowConstants', - 'WindowEvent', 'WindowListener', 'WrappedPlainView', - 'WritableRaster', 'WritableRenderedImage', - 'WriteAbortedException', 'Writer', - 'WrongTransaction', 'WStringValueHelper', - 'X509Certificate', 'X509CRL', 'X509CRLEntry', - 'X509EncodedKeySpec', 'X509Extension', 'ZipEntry', - 'ZipException', 'ZipFile', 'ZipInputStream', - 'ZipOutputStream', 'ZoneView', - '_BindingIteratorImplBase', '_BindingIteratorStub', - '_IDLTypeStub', '_NamingContextImplBase', - '_NamingContextStub', '_PolicyStub', '_Remote_Stub' - ), - 4 => array( - 'void', 'double', 'int', 'boolean', 'byte', 'short', 'long', 'char', 'float' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', - '+', '-', '*', '/', '%', - '!', '&', '|', '^', - '<', '>', '=', - '?', ':', ';', - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => true, - 4 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #000066; font-weight: bold;', - 3 => 'color: #003399;', - 4 => 'color: #000066; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #006699;', - 3 => 'color: #008000; font-style: italic; font-weight: bold;', - 3 => 'color: #008000; font-style: italic; font-weight: bold;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006633;', - 2 => 'color: #006633;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://www.google.com/search?hl=en&q=allinurl%3A{FNAMEL}+java.sun.com&btnI=I%27m%20Feeling%20Lucky', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/java5.php b/_piecrust/libs/Geshi/geshi/java5.php deleted file mode 100644 index b51edab..0000000 --- a/_piecrust/libs/Geshi/geshi/java5.php +++ /dev/null @@ -1,1037 +0,0 @@ - 'Java(TM) 2 Platform Standard Edition 5.0', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - //Import and Package directives (Basic Support only) - 2 => '/(?:(?<=import[\\n\\s](?!static))|(?<=import[\\n\\s]static[\\n\\s])|(?<=package[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*([a-zA-Z0-9_]+|\*)(?=[\n\s;])/i', - // javadoc comments - 3 => '#/\*\*(?![\*\/]).*\*/#sU' - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - /* see the authoritative list of all 50 Java keywords at */ - /* http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#229308 */ - - /* java keywords, part 1: control flow */ - 'case', 'default', 'do', 'else', 'for', - 'goto', 'if', 'switch', 'while' - - /* IMO 'break', 'continue', 'return' and 'throw' */ - /* should also be added to this group, as they */ - /* also manage the control flow, */ - /* arguably 'try'/'catch'/'finally' as well */ - ), - 2 => array( - /* java keywords, part 2 */ - - 'break', 'continue', 'return', 'throw', - 'try', 'catch', 'finally', - - 'abstract', 'assert', 'class', 'const', 'enum', 'extends', - 'final', 'implements', 'import', 'instanceof', 'interface', - 'native', 'new', 'package', 'private', 'protected', - 'public', 'static', 'strictfp', 'super', 'synchronized', - 'this', 'throws', 'transient', 'volatile' - ), - 3 => array( - /* Java keywords, part 3: primitive data types and 'void' */ - 'boolean', 'byte', 'char', 'double', - 'float', 'int', 'long', 'short', 'void' - ), - 4 => array( - /* other reserved words in Java: literals */ - /* should be styled to look similar to numbers and Strings */ - 'false', 'null', 'true' - ), - 5 => array ( - 'Applet', 'AppletContext', 'AppletStub', 'AudioClip' - ), - 6 => array ( - 'AWTError', 'AWTEvent', 'AWTEventMulticaster', 'AWTException', 'AWTKeyStroke', 'AWTPermission', 'ActiveEvent', 'Adjustable', 'AlphaComposite', 'BasicStroke', 'BorderLayout', 'BufferCapabilities', 'BufferCapabilities.FlipContents', 'Button', 'Canvas', 'CardLayout', 'Checkbox', 'CheckboxGroup', 'CheckboxMenuItem', 'Choice', 'Color', 'Component', 'ComponentOrientation', 'Composite', 'CompositeContext', 'Container', 'ContainerOrderFocusTraversalPolicy', 'Cursor', 'DefaultFocusTraversalPolicy', 'DefaultKeyboardFocusManager', 'Dialog', 'Dimension', 'DisplayMode', 'EventQueue', 'FileDialog', 'FlowLayout', 'FocusTraversalPolicy', 'Font', 'FontFormatException', 'FontMetrics', 'Frame', 'GradientPaint', 'Graphics', 'Graphics2D', 'GraphicsConfigTemplate', 'GraphicsConfiguration', 'GraphicsDevice', 'GraphicsEnvironment', 'GridBagConstraints', 'GridBagLayout', 'GridLayout', 'HeadlessException', 'IllegalComponentStateException', 'Image', 'ImageCapabilities', 'Insets', 'ItemSelectable', 'JobAttributes', - 'JobAttributes.DefaultSelectionType', 'JobAttributes.DestinationType', 'JobAttributes.DialogType', 'JobAttributes.MultipleDocumentHandlingType', 'JobAttributes.SidesType', 'KeyEventDispatcher', 'KeyEventPostProcessor', 'KeyboardFocusManager', 'Label', 'LayoutManager', 'LayoutManager2', 'MediaTracker', 'Menu', 'MenuBar', 'MenuComponent', 'MenuContainer', 'MenuItem', 'MenuShortcut', 'MouseInfo', 'PageAttributes', 'PageAttributes.ColorType', 'PageAttributes.MediaType', 'PageAttributes.OrientationRequestedType', 'PageAttributes.OriginType', 'PageAttributes.PrintQualityType', 'Paint', 'PaintContext', 'Panel', 'Point', 'PointerInfo', 'Polygon', 'PopupMenu', 'PrintGraphics', 'PrintJob', 'Rectangle', 'RenderingHints', 'RenderingHints.Key', 'Robot', 'ScrollPane', 'ScrollPaneAdjustable', 'Scrollbar', 'Shape', 'Stroke', 'SystemColor', 'TextArea', 'TextComponent', 'TextField', 'TexturePaint', 'Toolkit', 'Transparency', 'Window' - ), - 7 => array ( - 'CMMException', 'ColorSpace', 'ICC_ColorSpace', 'ICC_Profile', 'ICC_ProfileGray', 'ICC_ProfileRGB', 'ProfileDataException' - ), - 8 => array ( - 'Clipboard', 'ClipboardOwner', 'DataFlavor', 'FlavorEvent', 'FlavorListener', 'FlavorMap', 'FlavorTable', 'MimeTypeParseException', 'StringSelection', 'SystemFlavorMap', 'Transferable', 'UnsupportedFlavorException' - ), - 9 => array ( - 'Autoscroll', 'DnDConstants', 'DragGestureEvent', 'DragGestureListener', 'DragGestureRecognizer', 'DragSource', 'DragSourceAdapter', 'DragSourceContext', 'DragSourceDragEvent', 'DragSourceDropEvent', 'DragSourceEvent', 'DragSourceListener', 'DragSourceMotionListener', 'DropTarget', 'DropTarget.DropTargetAutoScroller', 'DropTargetAdapter', 'DropTargetContext', 'DropTargetDragEvent', 'DropTargetDropEvent', 'DropTargetEvent', 'DropTargetListener', 'InvalidDnDOperationException', 'MouseDragGestureRecognizer' - ), - 10 => array ( - 'AWTEventListener', 'AWTEventListenerProxy', 'ActionEvent', 'ActionListener', 'AdjustmentEvent', 'AdjustmentListener', 'ComponentAdapter', 'ComponentEvent', 'ComponentListener', 'ContainerAdapter', 'ContainerEvent', 'ContainerListener', 'FocusAdapter', 'FocusEvent', 'FocusListener', 'HierarchyBoundsAdapter', 'HierarchyBoundsListener', 'HierarchyEvent', 'HierarchyListener', 'InputEvent', 'InputMethodEvent', 'InputMethodListener', 'InvocationEvent', 'ItemEvent', 'ItemListener', 'KeyAdapter', 'KeyEvent', 'KeyListener', 'MouseAdapter', 'MouseListener', 'MouseMotionAdapter', 'MouseMotionListener', 'MouseWheelEvent', 'MouseWheelListener', 'PaintEvent', 'TextEvent', 'TextListener', 'WindowAdapter', 'WindowEvent', 'WindowFocusListener', 'WindowListener', 'WindowStateListener' - ), - 11 => array ( - 'FontRenderContext', 'GlyphJustificationInfo', 'GlyphMetrics', 'GlyphVector', 'GraphicAttribute', 'ImageGraphicAttribute', 'LineBreakMeasurer', 'LineMetrics', 'MultipleMaster', 'NumericShaper', 'ShapeGraphicAttribute', 'TextAttribute', 'TextHitInfo', 'TextLayout', 'TextLayout.CaretPolicy', 'TextMeasurer', 'TransformAttribute' - ), - 12 => array ( - 'AffineTransform', 'Arc2D', 'Arc2D.Double', 'Arc2D.Float', 'Area', 'CubicCurve2D', 'CubicCurve2D.Double', 'CubicCurve2D.Float', 'Dimension2D', 'Ellipse2D', 'Ellipse2D.Double', 'Ellipse2D.Float', 'FlatteningPathIterator', 'GeneralPath', 'IllegalPathStateException', 'Line2D', 'Line2D.Double', 'Line2D.Float', 'NoninvertibleTransformException', 'PathIterator', 'Point2D', 'Point2D.Double', 'Point2D.Float', 'QuadCurve2D', 'QuadCurve2D.Double', 'QuadCurve2D.Float', 'Rectangle2D', 'Rectangle2D.Double', 'Rectangle2D.Float', 'RectangularShape', 'RoundRectangle2D', 'RoundRectangle2D.Double', 'RoundRectangle2D.Float' - ), - 13 => array ( - 'InputContext', 'InputMethodHighlight', 'InputMethodRequests', 'InputSubset' - ), - 14 => array ( - 'InputMethod', 'InputMethodContext', 'InputMethodDescriptor' - ), - 15 => array ( - 'AffineTransformOp', 'AreaAveragingScaleFilter', 'BandCombineOp', 'BandedSampleModel', 'BufferStrategy', 'BufferedImage', 'BufferedImageFilter', 'BufferedImageOp', 'ByteLookupTable', 'ColorConvertOp', 'ColorModel', 'ComponentColorModel', 'ComponentSampleModel', 'ConvolveOp', 'CropImageFilter', 'DataBuffer', 'DataBufferByte', 'DataBufferDouble', 'DataBufferFloat', 'DataBufferInt', 'DataBufferShort', 'DataBufferUShort', 'DirectColorModel', 'FilteredImageSource', 'ImageConsumer', 'ImageFilter', 'ImageObserver', 'ImageProducer', 'ImagingOpException', 'IndexColorModel', 'Kernel', 'LookupOp', 'LookupTable', 'MemoryImageSource', 'MultiPixelPackedSampleModel', 'PackedColorModel', 'PixelGrabber', 'PixelInterleavedSampleModel', 'RGBImageFilter', 'Raster', 'RasterFormatException', 'RasterOp', 'RenderedImage', 'ReplicateScaleFilter', 'RescaleOp', 'SampleModel', 'ShortLookupTable', 'SinglePixelPackedSampleModel', 'TileObserver', 'VolatileImage', 'WritableRaster', 'WritableRenderedImage' - ), - 16 => array ( - 'ContextualRenderedImageFactory', 'ParameterBlock', 'RenderContext', 'RenderableImage', 'RenderableImageOp', 'RenderableImageProducer', 'RenderedImageFactory' - ), - 17 => array ( - 'Book', 'PageFormat', 'Pageable', 'Paper', 'Printable', 'PrinterAbortException', 'PrinterException', 'PrinterGraphics', 'PrinterIOException', 'PrinterJob' - ), - 18 => array ( - 'AppletInitializer', 'BeanDescriptor', 'BeanInfo', 'Beans', 'Customizer', 'DefaultPersistenceDelegate', 'DesignMode', 'Encoder', 'EventHandler', 'EventSetDescriptor', 'ExceptionListener', 'Expression', 'FeatureDescriptor', 'IndexedPropertyChangeEvent', 'IndexedPropertyDescriptor', 'Introspector', 'MethodDescriptor', 'ParameterDescriptor', 'PersistenceDelegate', 'PropertyChangeEvent', 'PropertyChangeListener', 'PropertyChangeListenerProxy', 'PropertyChangeSupport', 'PropertyDescriptor', 'PropertyEditor', 'PropertyEditorManager', 'PropertyEditorSupport', 'PropertyVetoException', 'SimpleBeanInfo', 'VetoableChangeListener', 'VetoableChangeListenerProxy', 'VetoableChangeSupport', 'Visibility', 'XMLDecoder', 'XMLEncoder' - ), - 19 => array ( - 'BeanContext', 'BeanContextChild', 'BeanContextChildComponentProxy', 'BeanContextChildSupport', 'BeanContextContainerProxy', 'BeanContextEvent', 'BeanContextMembershipEvent', 'BeanContextMembershipListener', 'BeanContextProxy', 'BeanContextServiceAvailableEvent', 'BeanContextServiceProvider', 'BeanContextServiceProviderBeanInfo', 'BeanContextServiceRevokedEvent', 'BeanContextServiceRevokedListener', 'BeanContextServices', 'BeanContextServicesListener', 'BeanContextServicesSupport', 'BeanContextServicesSupport.BCSSServiceProvider', 'BeanContextSupport', 'BeanContextSupport.BCSIterator' - ), - 20 => array ( - 'BufferedInputStream', 'BufferedOutputStream', 'BufferedReader', 'BufferedWriter', 'ByteArrayInputStream', 'ByteArrayOutputStream', 'CharArrayReader', 'CharArrayWriter', 'CharConversionException', 'Closeable', 'DataInput', 'DataOutput', 'EOFException', 'Externalizable', 'File', 'FileDescriptor', 'FileInputStream', 'FileNotFoundException', 'FileOutputStream', 'FilePermission', 'FileReader', 'FileWriter', 'FilenameFilter', 'FilterInputStream', 'FilterOutputStream', 'FilterReader', 'FilterWriter', 'Flushable', 'IOException', 'InputStreamReader', 'InterruptedIOException', 'InvalidClassException', 'InvalidObjectException', 'LineNumberInputStream', 'LineNumberReader', 'NotActiveException', 'NotSerializableException', 'ObjectInput', 'ObjectInputStream', 'ObjectInputStream.GetField', 'ObjectInputValidation', 'ObjectOutput', 'ObjectOutputStream', 'ObjectOutputStream.PutField', 'ObjectStreamClass', 'ObjectStreamConstants', 'ObjectStreamException', 'ObjectStreamField', 'OptionalDataException', 'OutputStreamWriter', - 'PipedInputStream', 'PipedOutputStream', 'PipedReader', 'PipedWriter', 'PrintStream', 'PrintWriter', 'PushbackInputStream', 'PushbackReader', 'RandomAccessFile', 'Reader', 'SequenceInputStream', 'Serializable', 'SerializablePermission', 'StreamCorruptedException', 'StreamTokenizer', 'StringBufferInputStream', 'StringReader', 'StringWriter', 'SyncFailedException', 'UTFDataFormatException', 'UnsupportedEncodingException', 'WriteAbortedException', 'Writer' - ), - 21 => array ( - 'AbstractMethodError', 'Appendable', 'ArithmeticException', 'ArrayIndexOutOfBoundsException', 'ArrayStoreException', 'AssertionError', 'Boolean', 'Byte', 'CharSequence', 'Character', 'Character.Subset', 'Character.UnicodeBlock', 'Class', 'ClassCastException', 'ClassCircularityError', 'ClassFormatError', 'ClassLoader', 'ClassNotFoundException', 'CloneNotSupportedException', 'Cloneable', 'Comparable', 'Compiler', 'Deprecated', 'Double', 'Enum', 'EnumConstantNotPresentException', 'Error', 'Exception', 'ExceptionInInitializerError', 'Float', 'IllegalAccessError', 'IllegalAccessException', 'IllegalArgumentException', 'IllegalMonitorStateException', 'IllegalStateException', 'IllegalThreadStateException', 'IncompatibleClassChangeError', 'IndexOutOfBoundsException', 'InheritableThreadLocal', 'InstantiationError', 'InstantiationException', 'Integer', 'InternalError', 'InterruptedException', 'Iterable', 'LinkageError', 'Long', 'Math', 'NegativeArraySizeException', 'NoClassDefFoundError', 'NoSuchFieldError', - 'NoSuchFieldException', 'NoSuchMethodError', 'NoSuchMethodException', 'NullPointerException', 'Number', 'NumberFormatException', 'OutOfMemoryError', 'Override', 'Package', 'Process', 'ProcessBuilder', 'Readable', 'Runnable', 'Runtime', 'RuntimeException', 'RuntimePermission', 'SecurityException', 'SecurityManager', 'Short', 'StackOverflowError', 'StackTraceElement', 'StrictMath', 'String', 'StringBuffer', 'StringBuilder', 'StringIndexOutOfBoundsException', 'SuppressWarnings', 'System', 'Thread', 'Thread.State', 'Thread.UncaughtExceptionHandler', 'ThreadDeath', 'ThreadGroup', 'ThreadLocal', 'Throwable', 'TypeNotPresentException', 'UnknownError', 'UnsatisfiedLinkError', 'UnsupportedClassVersionError', 'UnsupportedOperationException', 'VerifyError', 'VirtualMachineError', 'Void' - ), - 22 => array ( - 'AnnotationFormatError', 'AnnotationTypeMismatchException', 'Documented', 'ElementType', 'IncompleteAnnotationException', 'Inherited', 'Retention', 'RetentionPolicy', 'Target' - ), - 23 => array ( - 'ClassDefinition', 'ClassFileTransformer', 'IllegalClassFormatException', 'Instrumentation', 'UnmodifiableClassException' - ), - 24 => array ( - 'ClassLoadingMXBean', 'CompilationMXBean', 'GarbageCollectorMXBean', 'ManagementFactory', 'ManagementPermission', 'MemoryMXBean', 'MemoryManagerMXBean', 'MemoryNotificationInfo', 'MemoryPoolMXBean', 'MemoryType', 'MemoryUsage', 'OperatingSystemMXBean', 'RuntimeMXBean', 'ThreadInfo', 'ThreadMXBean' - ), - 25 => array ( - 'PhantomReference', 'ReferenceQueue', 'SoftReference', 'WeakReference' - ), - 26 => array ( - 'AccessibleObject', 'AnnotatedElement', 'Constructor', 'Field', 'GenericArrayType', 'GenericDeclaration', 'GenericSignatureFormatError', 'InvocationHandler', 'InvocationTargetException', 'MalformedParameterizedTypeException', 'Member', 'Method', 'Modifier', 'ParameterizedType', 'ReflectPermission', 'Type', 'TypeVariable', 'UndeclaredThrowableException', 'WildcardType' - ), - 27 => array ( - 'BigDecimal', 'BigInteger', 'MathContext', 'RoundingMode' - ), - 28 => array ( - 'Authenticator', 'Authenticator.RequestorType', 'BindException', 'CacheRequest', 'CacheResponse', 'ContentHandlerFactory', 'CookieHandler', 'DatagramPacket', 'DatagramSocket', 'DatagramSocketImpl', 'DatagramSocketImplFactory', 'FileNameMap', 'HttpRetryException', 'HttpURLConnection', 'Inet4Address', 'Inet6Address', 'InetAddress', 'InetSocketAddress', 'JarURLConnection', 'MalformedURLException', 'MulticastSocket', 'NetPermission', 'NetworkInterface', 'NoRouteToHostException', 'PasswordAuthentication', 'PortUnreachableException', 'ProtocolException', 'Proxy.Type', 'ProxySelector', 'ResponseCache', 'SecureCacheResponse', 'ServerSocket', 'Socket', 'SocketAddress', 'SocketException', 'SocketImpl', 'SocketImplFactory', 'SocketOptions', 'SocketPermission', 'SocketTimeoutException', 'URI', 'URISyntaxException', 'URL', 'URLClassLoader', 'URLConnection', 'URLDecoder', 'URLEncoder', 'URLStreamHandler', 'URLStreamHandlerFactory', 'UnknownServiceException' - ), - 29 => array ( - 'Buffer', 'BufferOverflowException', 'BufferUnderflowException', 'ByteBuffer', 'ByteOrder', 'CharBuffer', 'DoubleBuffer', 'FloatBuffer', 'IntBuffer', 'InvalidMarkException', 'LongBuffer', 'MappedByteBuffer', 'ReadOnlyBufferException', 'ShortBuffer' - ), - 30 => array ( - 'AlreadyConnectedException', 'AsynchronousCloseException', 'ByteChannel', 'CancelledKeyException', 'Channel', 'Channels', 'ClosedByInterruptException', 'ClosedChannelException', 'ClosedSelectorException', 'ConnectionPendingException', 'DatagramChannel', 'FileChannel', 'FileChannel.MapMode', 'FileLock', 'FileLockInterruptionException', 'GatheringByteChannel', 'IllegalBlockingModeException', 'IllegalSelectorException', 'InterruptibleChannel', 'NoConnectionPendingException', 'NonReadableChannelException', 'NonWritableChannelException', 'NotYetBoundException', 'NotYetConnectedException', 'OverlappingFileLockException', 'Pipe', 'Pipe.SinkChannel', 'Pipe.SourceChannel', 'ReadableByteChannel', 'ScatteringByteChannel', 'SelectableChannel', 'SelectionKey', 'Selector', 'ServerSocketChannel', 'SocketChannel', 'UnresolvedAddressException', 'UnsupportedAddressTypeException', 'WritableByteChannel' - ), - 31 => array ( - 'AbstractInterruptibleChannel', 'AbstractSelectableChannel', 'AbstractSelectionKey', 'AbstractSelector', 'SelectorProvider' - ), - 32 => array ( - 'CharacterCodingException', 'Charset', 'CharsetDecoder', 'CharsetEncoder', 'CoderMalfunctionError', 'CoderResult', 'CodingErrorAction', 'IllegalCharsetNameException', 'MalformedInputException', 'UnmappableCharacterException', 'UnsupportedCharsetException' - ), - 33 => array ( - 'CharsetProvider' - ), - 34 => array ( - 'AccessException', 'AlreadyBoundException', 'ConnectIOException', 'MarshalException', 'MarshalledObject', 'Naming', 'NoSuchObjectException', 'NotBoundException', 'RMISecurityException', 'RMISecurityManager', 'Remote', 'RemoteException', 'ServerError', 'ServerException', 'ServerRuntimeException', 'StubNotFoundException', 'UnexpectedException', 'UnmarshalException' - ), - 35 => array ( - 'Activatable', 'ActivateFailedException', 'ActivationDesc', 'ActivationException', 'ActivationGroup', 'ActivationGroupDesc', 'ActivationGroupDesc.CommandEnvironment', 'ActivationGroupID', 'ActivationGroup_Stub', 'ActivationID', 'ActivationInstantiator', 'ActivationMonitor', 'ActivationSystem', 'Activator', 'UnknownGroupException', 'UnknownObjectException' - ), - 36 => array ( - 'DGC', 'Lease', 'VMID' - ), - 37 => array ( - 'LocateRegistry', 'Registry', 'RegistryHandler' - ), - 38 => array ( - 'ExportException', 'LoaderHandler', 'LogStream', 'ObjID', 'Operation', 'RMIClassLoader', 'RMIClassLoaderSpi', 'RMIClientSocketFactory', 'RMIFailureHandler', 'RMIServerSocketFactory', 'RMISocketFactory', 'RemoteCall', 'RemoteObject', 'RemoteObjectInvocationHandler', 'RemoteRef', 'RemoteServer', 'RemoteStub', 'ServerCloneException', 'ServerNotActiveException', 'ServerRef', 'Skeleton', 'SkeletonMismatchException', 'SkeletonNotFoundException', 'SocketSecurityException', 'UID', 'UnicastRemoteObject', 'Unreferenced' - ), - 39 => array ( - 'AccessControlContext', 'AccessControlException', 'AccessController', 'AlgorithmParameterGenerator', 'AlgorithmParameterGeneratorSpi', 'AlgorithmParameters', 'AlgorithmParametersSpi', 'AllPermission', 'AuthProvider', 'BasicPermission', 'CodeSigner', 'CodeSource', 'DigestException', 'DigestInputStream', 'DigestOutputStream', 'DomainCombiner', 'GeneralSecurityException', 'Guard', 'GuardedObject', 'Identity', 'IdentityScope', 'InvalidAlgorithmParameterException', 'InvalidParameterException', 'Key', 'KeyException', 'KeyFactory', 'KeyFactorySpi', 'KeyManagementException', 'KeyPair', 'KeyPairGenerator', 'KeyPairGeneratorSpi', 'KeyRep', 'KeyRep.Type', 'KeyStore', 'KeyStore.Builder', 'KeyStore.CallbackHandlerProtection', 'KeyStore.Entry', 'KeyStore.LoadStoreParameter', 'KeyStore.PasswordProtection', 'KeyStore.PrivateKeyEntry', 'KeyStore.ProtectionParameter', 'KeyStore.SecretKeyEntry', 'KeyStore.TrustedCertificateEntry', 'KeyStoreException', 'KeyStoreSpi', 'MessageDigest', 'MessageDigestSpi', - 'NoSuchAlgorithmException', 'NoSuchProviderException', 'PermissionCollection', 'Permissions', 'PrivateKey', 'PrivilegedAction', 'PrivilegedActionException', 'PrivilegedExceptionAction', 'ProtectionDomain', 'Provider', 'Provider.Service', 'ProviderException', 'PublicKey', 'SecureClassLoader', 'SecureRandom', 'SecureRandomSpi', 'Security', 'SecurityPermission', 'Signature', 'SignatureException', 'SignatureSpi', 'SignedObject', 'Signer', 'UnrecoverableEntryException', 'UnrecoverableKeyException', 'UnresolvedPermission' - ), - 40 => array ( - 'Acl', 'AclEntry', 'AclNotFoundException', 'Group', 'LastOwnerException', 'NotOwnerException', 'Owner' - ), - 41 => array ( - 'CRL', 'CRLException', 'CRLSelector', 'CertPath', 'CertPath.CertPathRep', 'CertPathBuilder', 'CertPathBuilderException', 'CertPathBuilderResult', 'CertPathBuilderSpi', 'CertPathParameters', 'CertPathValidator', 'CertPathValidatorException', 'CertPathValidatorResult', 'CertPathValidatorSpi', 'CertSelector', 'CertStore', 'CertStoreException', 'CertStoreParameters', 'CertStoreSpi', 'Certificate.CertificateRep', 'CertificateFactory', 'CertificateFactorySpi', 'CollectionCertStoreParameters', 'LDAPCertStoreParameters', 'PKIXBuilderParameters', 'PKIXCertPathBuilderResult', 'PKIXCertPathChecker', 'PKIXCertPathValidatorResult', 'PKIXParameters', 'PolicyNode', 'PolicyQualifierInfo', 'TrustAnchor', 'X509CRL', 'X509CRLEntry', 'X509CRLSelector', 'X509CertSelector', 'X509Extension' - ), - 42 => array ( - 'DSAKey', 'DSAKeyPairGenerator', 'DSAParams', 'DSAPrivateKey', 'DSAPublicKey', 'ECKey', 'ECPrivateKey', 'ECPublicKey', 'RSAKey', 'RSAMultiPrimePrivateCrtKey', 'RSAPrivateCrtKey', 'RSAPrivateKey', 'RSAPublicKey' - ), - 43 => array ( - 'AlgorithmParameterSpec', 'DSAParameterSpec', 'DSAPrivateKeySpec', 'DSAPublicKeySpec', 'ECField', 'ECFieldF2m', 'ECFieldFp', 'ECGenParameterSpec', 'ECParameterSpec', 'ECPoint', 'ECPrivateKeySpec', 'ECPublicKeySpec', 'EllipticCurve', 'EncodedKeySpec', 'InvalidKeySpecException', 'InvalidParameterSpecException', 'KeySpec', 'MGF1ParameterSpec', 'PKCS8EncodedKeySpec', 'PSSParameterSpec', 'RSAKeyGenParameterSpec', 'RSAMultiPrimePrivateCrtKeySpec', 'RSAOtherPrimeInfo', 'RSAPrivateCrtKeySpec', 'RSAPrivateKeySpec', 'RSAPublicKeySpec', 'X509EncodedKeySpec' - ), - 44 => array ( - 'BatchUpdateException', 'Blob', 'CallableStatement', 'Clob', 'Connection', 'DataTruncation', 'DatabaseMetaData', 'Driver', 'DriverManager', 'DriverPropertyInfo', 'ParameterMetaData', 'PreparedStatement', 'Ref', 'ResultSet', 'ResultSetMetaData', 'SQLData', 'SQLException', 'SQLInput', 'SQLOutput', 'SQLPermission', 'SQLWarning', 'Savepoint', 'Struct', 'Time', 'Types' - ), - 45 => array ( - 'AttributedCharacterIterator', 'AttributedCharacterIterator.Attribute', 'AttributedString', 'Bidi', 'BreakIterator', 'CharacterIterator', 'ChoiceFormat', 'CollationElementIterator', 'CollationKey', 'Collator', 'DateFormat', 'DateFormat.Field', 'DateFormatSymbols', 'DecimalFormat', 'DecimalFormatSymbols', 'FieldPosition', 'Format', 'Format.Field', 'MessageFormat', 'MessageFormat.Field', 'NumberFormat', 'NumberFormat.Field', 'ParseException', 'ParsePosition', 'RuleBasedCollator', 'SimpleDateFormat', 'StringCharacterIterator' - ), - 46 => array ( - 'AbstractCollection', 'AbstractList', 'AbstractMap', 'AbstractQueue', 'AbstractSequentialList', 'AbstractSet', 'ArrayList', 'Arrays', 'BitSet', 'Calendar', 'Collection', 'Collections', 'Comparator', 'ConcurrentModificationException', 'Currency', 'Dictionary', 'DuplicateFormatFlagsException', 'EmptyStackException', 'EnumMap', 'EnumSet', 'Enumeration', 'EventListenerProxy', 'EventObject', 'FormatFlagsConversionMismatchException', 'Formattable', 'FormattableFlags', 'Formatter.BigDecimalLayoutForm', 'FormatterClosedException', 'GregorianCalendar', 'HashMap', 'HashSet', 'Hashtable', 'IdentityHashMap', 'IllegalFormatCodePointException', 'IllegalFormatConversionException', 'IllegalFormatException', 'IllegalFormatFlagsException', 'IllegalFormatPrecisionException', 'IllegalFormatWidthException', 'InputMismatchException', 'InvalidPropertiesFormatException', 'Iterator', 'LinkedHashMap', 'LinkedHashSet', 'LinkedList', 'ListIterator', 'ListResourceBundle', 'Locale', 'Map', 'Map.Entry', 'MissingFormatArgumentException', - 'MissingFormatWidthException', 'MissingResourceException', 'NoSuchElementException', 'Observable', 'Observer', 'PriorityQueue', 'Properties', 'PropertyPermission', 'PropertyResourceBundle', 'Queue', 'Random', 'RandomAccess', 'ResourceBundle', 'Scanner', 'Set', 'SimpleTimeZone', 'SortedMap', 'SortedSet', 'Stack', 'StringTokenizer', 'TimeZone', 'TimerTask', 'TooManyListenersException', 'TreeMap', 'TreeSet', 'UUID', 'UnknownFormatConversionException', 'UnknownFormatFlagsException', 'Vector', 'WeakHashMap' - ), - 47 => array ( - 'AbstractExecutorService', 'ArrayBlockingQueue', 'BlockingQueue', 'BrokenBarrierException', 'Callable', 'CancellationException', 'CompletionService', 'ConcurrentHashMap', 'ConcurrentLinkedQueue', 'ConcurrentMap', 'CopyOnWriteArrayList', 'CopyOnWriteArraySet', 'CountDownLatch', 'CyclicBarrier', 'DelayQueue', 'Delayed', 'Exchanger', 'ExecutionException', 'Executor', 'ExecutorCompletionService', 'ExecutorService', 'Executors', 'Future', 'FutureTask', 'LinkedBlockingQueue', 'PriorityBlockingQueue', 'RejectedExecutionException', 'RejectedExecutionHandler', 'ScheduledExecutorService', 'ScheduledFuture', 'ScheduledThreadPoolExecutor', 'Semaphore', 'SynchronousQueue', 'ThreadFactory', 'ThreadPoolExecutor', 'ThreadPoolExecutor.AbortPolicy', 'ThreadPoolExecutor.CallerRunsPolicy', 'ThreadPoolExecutor.DiscardOldestPolicy', 'ThreadPoolExecutor.DiscardPolicy', 'TimeUnit', 'TimeoutException' - ), - 48 => array ( - 'AtomicBoolean', 'AtomicInteger', 'AtomicIntegerArray', 'AtomicIntegerFieldUpdater', 'AtomicLong', 'AtomicLongArray', 'AtomicLongFieldUpdater', 'AtomicMarkableReference', 'AtomicReference', 'AtomicReferenceArray', 'AtomicReferenceFieldUpdater', 'AtomicStampedReference' - ), - 49 => array ( - 'AbstractQueuedSynchronizer', 'Condition', 'Lock', 'LockSupport', 'ReadWriteLock', 'ReentrantLock', 'ReentrantReadWriteLock', 'ReentrantReadWriteLock.ReadLock', 'ReentrantReadWriteLock.WriteLock' - ), - 50 => array ( - 'Attributes.Name', 'JarEntry', 'JarException', 'JarFile', 'JarInputStream', 'JarOutputStream', 'Manifest', 'Pack200', 'Pack200.Packer', 'Pack200.Unpacker' - ), - 51 => array ( - 'ConsoleHandler', 'ErrorManager', 'FileHandler', 'Filter', 'Handler', 'Level', 'LogManager', 'LogRecord', 'Logger', 'LoggingMXBean', 'LoggingPermission', 'MemoryHandler', 'SimpleFormatter', 'SocketHandler', 'StreamHandler', 'XMLFormatter' - ), - 52 => array ( - 'AbstractPreferences', 'BackingStoreException', 'InvalidPreferencesFormatException', 'NodeChangeEvent', 'NodeChangeListener', 'PreferenceChangeEvent', 'PreferenceChangeListener', 'Preferences', 'PreferencesFactory' - ), - 53 => array ( - 'MatchResult', 'Matcher', 'Pattern', 'PatternSyntaxException' - ), - 54 => array ( - 'Adler32', 'CRC32', 'CheckedInputStream', 'CheckedOutputStream', 'Checksum', 'DataFormatException', 'Deflater', 'DeflaterOutputStream', 'GZIPInputStream', 'GZIPOutputStream', 'Inflater', 'InflaterInputStream', 'ZipEntry', 'ZipException', 'ZipFile', 'ZipInputStream', 'ZipOutputStream' - ), - 55 => array ( - 'Accessible', 'AccessibleAction', 'AccessibleAttributeSequence', 'AccessibleBundle', 'AccessibleComponent', 'AccessibleContext', 'AccessibleEditableText', 'AccessibleExtendedComponent', 'AccessibleExtendedTable', 'AccessibleExtendedText', 'AccessibleHyperlink', 'AccessibleHypertext', 'AccessibleIcon', 'AccessibleKeyBinding', 'AccessibleRelation', 'AccessibleRelationSet', 'AccessibleResourceBundle', 'AccessibleRole', 'AccessibleSelection', 'AccessibleState', 'AccessibleStateSet', 'AccessibleStreamable', 'AccessibleTable', 'AccessibleTableModelChange', 'AccessibleText', 'AccessibleTextSequence', 'AccessibleValue' - ), - 56 => array ( - 'ActivityCompletedException', 'ActivityRequiredException', 'InvalidActivityException' - ), - 57 => array ( - 'BadPaddingException', 'Cipher', 'CipherInputStream', 'CipherOutputStream', 'CipherSpi', 'EncryptedPrivateKeyInfo', 'ExemptionMechanism', 'ExemptionMechanismException', 'ExemptionMechanismSpi', 'IllegalBlockSizeException', 'KeyAgreement', 'KeyAgreementSpi', 'KeyGenerator', 'KeyGeneratorSpi', 'Mac', 'MacSpi', 'NoSuchPaddingException', 'NullCipher', 'SealedObject', 'SecretKey', 'SecretKeyFactory', 'SecretKeyFactorySpi', 'ShortBufferException' - ), - 58 => array ( - 'DHKey', 'DHPrivateKey', 'DHPublicKey', 'PBEKey' - ), - 59 => array ( - 'DESKeySpec', 'DESedeKeySpec', 'DHGenParameterSpec', 'DHParameterSpec', 'DHPrivateKeySpec', 'DHPublicKeySpec', 'IvParameterSpec', 'OAEPParameterSpec', 'PBEKeySpec', 'PBEParameterSpec', 'PSource', 'PSource.PSpecified', 'RC2ParameterSpec', 'RC5ParameterSpec', 'SecretKeySpec' - ), - 60 => array ( - 'IIOException', 'IIOImage', 'IIOParam', 'IIOParamController', 'ImageIO', 'ImageReadParam', 'ImageReader', 'ImageTranscoder', 'ImageTypeSpecifier', 'ImageWriteParam', 'ImageWriter' - ), - 61 => array ( - 'IIOReadProgressListener', 'IIOReadUpdateListener', 'IIOReadWarningListener', 'IIOWriteProgressListener', 'IIOWriteWarningListener' - ), - 62 => array ( - 'IIOInvalidTreeException', 'IIOMetadata', 'IIOMetadataController', 'IIOMetadataFormat', 'IIOMetadataFormatImpl', 'IIOMetadataNode' - ), - 63 => array ( - 'BMPImageWriteParam' - ), - 64 => array ( - 'JPEGHuffmanTable', 'JPEGImageReadParam', 'JPEGImageWriteParam', 'JPEGQTable' - ), - 65 => array ( - 'IIORegistry', 'IIOServiceProvider', 'ImageInputStreamSpi', 'ImageOutputStreamSpi', 'ImageReaderSpi', 'ImageReaderWriterSpi', 'ImageTranscoderSpi', 'ImageWriterSpi', 'RegisterableService', 'ServiceRegistry', 'ServiceRegistry.Filter' - ), - 66 => array ( - 'FileCacheImageInputStream', 'FileCacheImageOutputStream', 'FileImageInputStream', 'FileImageOutputStream', 'IIOByteBuffer', 'ImageInputStream', 'ImageInputStreamImpl', 'ImageOutputStream', 'ImageOutputStreamImpl', 'MemoryCacheImageInputStream', 'MemoryCacheImageOutputStream' - ), - 67 => array ( - 'AttributeChangeNotification', 'AttributeChangeNotificationFilter', 'AttributeNotFoundException', 'AttributeValueExp', 'BadAttributeValueExpException', 'BadBinaryOpValueExpException', 'BadStringOperationException', 'Descriptor', 'DescriptorAccess', 'DynamicMBean', 'InstanceAlreadyExistsException', 'InstanceNotFoundException', 'InvalidApplicationException', 'JMException', 'JMRuntimeException', 'ListenerNotFoundException', 'MBeanAttributeInfo', 'MBeanConstructorInfo', 'MBeanException', 'MBeanFeatureInfo', 'MBeanInfo', 'MBeanNotificationInfo', 'MBeanOperationInfo', 'MBeanParameterInfo', 'MBeanPermission', 'MBeanRegistration', 'MBeanRegistrationException', 'MBeanServer', 'MBeanServerBuilder', 'MBeanServerConnection', 'MBeanServerDelegate', 'MBeanServerDelegateMBean', 'MBeanServerFactory', 'MBeanServerInvocationHandler', 'MBeanServerNotification', 'MBeanServerPermission', 'MBeanTrustPermission', 'MalformedObjectNameException', 'NotCompliantMBeanException', 'Notification', 'NotificationBroadcaster', - 'NotificationBroadcasterSupport', 'NotificationEmitter', 'NotificationFilter', 'NotificationFilterSupport', 'NotificationListener', 'ObjectInstance', 'ObjectName', 'OperationsException', 'PersistentMBean', 'Query', 'QueryEval', 'QueryExp', 'ReflectionException', 'RuntimeErrorException', 'RuntimeMBeanException', 'RuntimeOperationsException', 'ServiceNotFoundException', 'StandardMBean', 'StringValueExp', 'ValueExp' - ), - 68 => array ( - 'ClassLoaderRepository', 'MLet', 'MLetMBean', 'PrivateClassLoader', 'PrivateMLet' - ), - 69 => array ( - 'DescriptorSupport', 'InvalidTargetObjectTypeException', 'ModelMBean', 'ModelMBeanAttributeInfo', 'ModelMBeanConstructorInfo', 'ModelMBeanInfo', 'ModelMBeanInfoSupport', 'ModelMBeanNotificationBroadcaster', 'ModelMBeanNotificationInfo', 'ModelMBeanOperationInfo', 'RequiredModelMBean', 'XMLParseException' - ), - 70 => array ( - 'CounterMonitor', 'CounterMonitorMBean', 'GaugeMonitor', 'GaugeMonitorMBean', 'Monitor', 'MonitorMBean', 'MonitorNotification', 'MonitorSettingException', 'StringMonitor', 'StringMonitorMBean' - ), - 71 => array ( - 'ArrayType', 'CompositeData', 'CompositeDataSupport', 'CompositeType', 'InvalidOpenTypeException', 'KeyAlreadyExistsException', 'OpenDataException', 'OpenMBeanAttributeInfo', 'OpenMBeanAttributeInfoSupport', 'OpenMBeanConstructorInfo', 'OpenMBeanConstructorInfoSupport', 'OpenMBeanInfo', 'OpenMBeanInfoSupport', 'OpenMBeanOperationInfo', 'OpenMBeanOperationInfoSupport', 'OpenMBeanParameterInfo', 'OpenMBeanParameterInfoSupport', 'SimpleType', 'TabularData', 'TabularDataSupport', 'TabularType' - ), - 72 => array ( - 'InvalidRelationIdException', 'InvalidRelationServiceException', 'InvalidRelationTypeException', 'InvalidRoleInfoException', 'InvalidRoleValueException', 'MBeanServerNotificationFilter', 'Relation', 'RelationException', 'RelationNotFoundException', 'RelationNotification', 'RelationService', 'RelationServiceMBean', 'RelationServiceNotRegisteredException', 'RelationSupport', 'RelationSupportMBean', 'RelationType', 'RelationTypeNotFoundException', 'RelationTypeSupport', 'Role', 'RoleInfo', 'RoleInfoNotFoundException', 'RoleList', 'RoleNotFoundException', 'RoleResult', 'RoleStatus', 'RoleUnresolved', 'RoleUnresolvedList' - ), - 73 => array ( - 'JMXAuthenticator', 'JMXConnectionNotification', 'JMXConnector', 'JMXConnectorFactory', 'JMXConnectorProvider', 'JMXConnectorServer', 'JMXConnectorServerFactory', 'JMXConnectorServerMBean', 'JMXConnectorServerProvider', 'JMXPrincipal', 'JMXProviderException', 'JMXServerErrorException', 'JMXServiceURL', 'MBeanServerForwarder', 'NotificationResult', 'SubjectDelegationPermission', 'TargetedNotification' - ), - 74 => array ( - 'RMIConnection', 'RMIConnectionImpl', 'RMIConnectionImpl_Stub', 'RMIConnector', 'RMIConnectorServer', 'RMIIIOPServerImpl', 'RMIJRMPServerImpl', 'RMIServer', 'RMIServerImpl', 'RMIServerImpl_Stub' - ), - 75 => array ( - 'TimerAlarmClockNotification', 'TimerMBean', 'TimerNotification' - ), - 76 => array ( - 'AuthenticationNotSupportedException', 'BinaryRefAddr', 'CannotProceedException', 'CommunicationException', 'CompositeName', 'CompoundName', 'ConfigurationException', 'ContextNotEmptyException', 'InitialContext', 'InsufficientResourcesException', 'InterruptedNamingException', 'InvalidNameException', 'LimitExceededException', 'LinkException', 'LinkLoopException', 'LinkRef', 'MalformedLinkException', 'Name', 'NameAlreadyBoundException', 'NameClassPair', 'NameNotFoundException', 'NameParser', 'NamingEnumeration', 'NamingException', 'NamingSecurityException', 'NoInitialContextException', 'NoPermissionException', 'NotContextException', 'OperationNotSupportedException', 'PartialResultException', 'RefAddr', 'Referenceable', 'ReferralException', 'ServiceUnavailableException', 'SizeLimitExceededException', 'StringRefAddr', 'TimeLimitExceededException' - ), - 77 => array ( - 'AttributeInUseException', 'AttributeModificationException', 'BasicAttribute', 'BasicAttributes', 'DirContext', 'InitialDirContext', 'InvalidAttributeIdentifierException', 'InvalidAttributesException', 'InvalidSearchControlsException', 'InvalidSearchFilterException', 'ModificationItem', 'NoSuchAttributeException', 'SchemaViolationException', 'SearchControls', 'SearchResult' - ), - 78 => array ( - 'EventContext', 'EventDirContext', 'NamespaceChangeListener', 'NamingEvent', 'NamingExceptionEvent', 'NamingListener', 'ObjectChangeListener' - ), - 79 => array ( - 'BasicControl', 'ControlFactory', 'ExtendedRequest', 'ExtendedResponse', 'HasControls', 'InitialLdapContext', 'LdapContext', 'LdapName', 'LdapReferralException', 'ManageReferralControl', 'PagedResultsControl', 'PagedResultsResponseControl', 'Rdn', 'SortControl', 'SortKey', 'SortResponseControl', 'StartTlsRequest', 'StartTlsResponse', 'UnsolicitedNotification', 'UnsolicitedNotificationEvent', 'UnsolicitedNotificationListener' - ), - 80 => array ( - 'DirObjectFactory', 'DirStateFactory', 'DirStateFactory.Result', 'DirectoryManager', 'InitialContextFactory', 'InitialContextFactoryBuilder', 'NamingManager', 'ObjectFactory', 'ObjectFactoryBuilder', 'ResolveResult', 'Resolver', 'StateFactory' - ), - 81 => array ( - 'ServerSocketFactory', 'SocketFactory' - ), - 82 => array ( - 'CertPathTrustManagerParameters', 'HandshakeCompletedEvent', 'HandshakeCompletedListener', 'HostnameVerifier', 'HttpsURLConnection', 'KeyManager', 'KeyManagerFactory', 'KeyManagerFactorySpi', 'KeyStoreBuilderParameters', 'ManagerFactoryParameters', 'SSLContext', 'SSLContextSpi', 'SSLEngine', 'SSLEngineResult', 'SSLEngineResult.HandshakeStatus', 'SSLEngineResult.Status', 'SSLException', 'SSLHandshakeException', 'SSLKeyException', 'SSLPeerUnverifiedException', 'SSLPermission', 'SSLProtocolException', 'SSLServerSocket', 'SSLServerSocketFactory', 'SSLSession', 'SSLSessionBindingEvent', 'SSLSessionBindingListener', 'SSLSessionContext', 'SSLSocket', 'SSLSocketFactory', 'TrustManager', 'TrustManagerFactory', 'TrustManagerFactorySpi', 'X509ExtendedKeyManager', 'X509KeyManager', 'X509TrustManager' - ), - 83 => array ( - 'AttributeException', 'CancelablePrintJob', 'Doc', 'DocFlavor', 'DocFlavor.BYTE_ARRAY', 'DocFlavor.CHAR_ARRAY', 'DocFlavor.INPUT_STREAM', 'DocFlavor.READER', 'DocFlavor.SERVICE_FORMATTED', 'DocFlavor.STRING', 'DocFlavor.URL', 'DocPrintJob', 'FlavorException', 'MultiDoc', 'MultiDocPrintJob', 'MultiDocPrintService', 'PrintException', 'PrintService', 'PrintServiceLookup', 'ServiceUI', 'ServiceUIFactory', 'SimpleDoc', 'StreamPrintService', 'StreamPrintServiceFactory', 'URIException' - ), - 84 => array ( - 'AttributeSetUtilities', 'DateTimeSyntax', 'DocAttribute', 'DocAttributeSet', 'EnumSyntax', 'HashAttributeSet', 'HashDocAttributeSet', 'HashPrintJobAttributeSet', 'HashPrintRequestAttributeSet', 'HashPrintServiceAttributeSet', 'IntegerSyntax', 'PrintJobAttribute', 'PrintJobAttributeSet', 'PrintRequestAttribute', 'PrintRequestAttributeSet', 'PrintServiceAttribute', 'PrintServiceAttributeSet', 'ResolutionSyntax', 'SetOfIntegerSyntax', 'Size2DSyntax', 'SupportedValuesAttribute', 'TextSyntax', 'URISyntax', 'UnmodifiableSetException' - ), - 85 => array ( - 'Chromaticity', 'ColorSupported', 'Compression', 'Copies', 'CopiesSupported', 'DateTimeAtCompleted', 'DateTimeAtCreation', 'DateTimeAtProcessing', 'Destination', 'DocumentName', 'Fidelity', 'Finishings', 'JobHoldUntil', 'JobImpressions', 'JobImpressionsCompleted', 'JobImpressionsSupported', 'JobKOctets', 'JobKOctetsProcessed', 'JobKOctetsSupported', 'JobMediaSheets', 'JobMediaSheetsCompleted', 'JobMediaSheetsSupported', 'JobMessageFromOperator', 'JobName', 'JobOriginatingUserName', 'JobPriority', 'JobPrioritySupported', 'JobSheets', 'JobState', 'JobStateReason', 'JobStateReasons', 'Media', 'MediaName', 'MediaPrintableArea', 'MediaSize', 'MediaSize.Engineering', 'MediaSize.ISO', 'MediaSize.JIS', 'MediaSize.NA', 'MediaSize.Other', 'MediaSizeName', 'MediaTray', 'MultipleDocumentHandling', 'NumberOfDocuments', 'NumberOfInterveningJobs', 'NumberUp', 'NumberUpSupported', 'OrientationRequested', 'OutputDeviceAssigned', 'PDLOverrideSupported', 'PageRanges', 'PagesPerMinute', 'PagesPerMinuteColor', - 'PresentationDirection', 'PrintQuality', 'PrinterInfo', 'PrinterIsAcceptingJobs', 'PrinterLocation', 'PrinterMakeAndModel', 'PrinterMessageFromOperator', 'PrinterMoreInfo', 'PrinterMoreInfoManufacturer', 'PrinterName', 'PrinterResolution', 'PrinterState', 'PrinterStateReason', 'PrinterStateReasons', 'PrinterURI', 'QueuedJobCount', 'ReferenceUriSchemesSupported', 'RequestingUserName', 'Severity', 'SheetCollate', 'Sides' - ), - 86 => array ( - 'PrintEvent', 'PrintJobAdapter', 'PrintJobAttributeEvent', 'PrintJobAttributeListener', 'PrintJobEvent', 'PrintJobListener', 'PrintServiceAttributeEvent', 'PrintServiceAttributeListener' - ), - 87 => array ( - 'PortableRemoteObject' - ), - 88 => array ( - 'ClassDesc', 'PortableRemoteObjectDelegate', 'Stub', 'StubDelegate', 'Tie', 'Util', 'UtilDelegate', 'ValueHandler', 'ValueHandlerMultiFormat' - ), - 89 => array ( - 'SslRMIClientSocketFactory', 'SslRMIServerSocketFactory' - ), - 90 => array ( - 'AuthPermission', 'DestroyFailedException', 'Destroyable', 'PrivateCredentialPermission', 'RefreshFailedException', 'Refreshable', 'Subject', 'SubjectDomainCombiner' - ), - 91 => array ( - 'Callback', 'CallbackHandler', 'ChoiceCallback', 'ConfirmationCallback', 'LanguageCallback', 'NameCallback', 'PasswordCallback', 'TextInputCallback', 'TextOutputCallback', 'UnsupportedCallbackException' - ), - 92 => array ( - 'DelegationPermission', 'KerberosKey', 'KerberosPrincipal', 'KerberosTicket', 'ServicePermission' - ), - 93 => array ( - 'AccountException', 'AccountExpiredException', 'AccountLockedException', 'AccountNotFoundException', 'AppConfigurationEntry', 'AppConfigurationEntry.LoginModuleControlFlag', 'Configuration', 'CredentialException', 'CredentialExpiredException', 'CredentialNotFoundException', 'FailedLoginException', 'LoginContext', 'LoginException' - ), - 94 => array ( - 'LoginModule' - ), - 95 => array ( - 'X500Principal', 'X500PrivateCredential' - ), - 96 => array ( - 'AuthorizeCallback', 'RealmCallback', 'RealmChoiceCallback', 'Sasl', 'SaslClient', 'SaslClientFactory', 'SaslException', 'SaslServer', 'SaslServerFactory' - ), - 97 => array ( - 'ControllerEventListener', 'Instrument', 'InvalidMidiDataException', 'MetaEventListener', 'MetaMessage', 'MidiChannel', 'MidiDevice', 'MidiDevice.Info', 'MidiEvent', 'MidiFileFormat', 'MidiMessage', 'MidiSystem', 'MidiUnavailableException', 'Patch', 'Receiver', 'Sequence', 'Sequencer', 'Sequencer.SyncMode', 'ShortMessage', 'Soundbank', 'SoundbankResource', 'Synthesizer', 'SysexMessage', 'Track', 'Transmitter', 'VoiceStatus' - ), - 98 => array ( - 'MidiDeviceProvider', 'MidiFileReader', 'MidiFileWriter', 'SoundbankReader' - ), - 99 => array ( - 'AudioFileFormat', 'AudioFileFormat.Type', 'AudioFormat', 'AudioFormat.Encoding', 'AudioInputStream', 'AudioPermission', 'AudioSystem', 'BooleanControl', 'BooleanControl.Type', 'Clip', 'CompoundControl', 'CompoundControl.Type', 'Control.Type', 'DataLine', 'DataLine.Info', 'EnumControl', 'EnumControl.Type', 'FloatControl', 'FloatControl.Type', 'Line', 'Line.Info', 'LineEvent', 'LineEvent.Type', 'LineListener', 'LineUnavailableException', 'Mixer', 'Mixer.Info', 'Port', 'Port.Info', 'ReverbType', 'SourceDataLine', 'TargetDataLine', 'UnsupportedAudioFileException' - ), - 100 => array ( - 'AudioFileReader', 'AudioFileWriter', 'FormatConversionProvider', 'MixerProvider' - ), - 101 => array ( - 'ConnectionEvent', 'ConnectionEventListener', 'ConnectionPoolDataSource', 'DataSource', 'PooledConnection', 'RowSet', 'RowSetEvent', 'RowSetInternal', 'RowSetListener', 'RowSetMetaData', 'RowSetReader', 'RowSetWriter', 'XAConnection', 'XADataSource' - ), - 102 => array ( - 'BaseRowSet', 'CachedRowSet', 'FilteredRowSet', 'JdbcRowSet', 'JoinRowSet', 'Joinable', 'Predicate', 'RowSetMetaDataImpl', 'RowSetWarning', 'WebRowSet' - ), - 103 => array ( - 'SQLInputImpl', 'SQLOutputImpl', 'SerialArray', 'SerialBlob', 'SerialClob', 'SerialDatalink', 'SerialException', 'SerialJavaObject', 'SerialRef', 'SerialStruct' - ), - 104 => array ( - 'SyncFactory', 'SyncFactoryException', 'SyncProvider', 'SyncProviderException', 'SyncResolver', 'TransactionalWriter', 'XmlReader', 'XmlWriter' - ), - 105 => array ( - 'AbstractAction', 'AbstractButton', 'AbstractCellEditor', 'AbstractListModel', 'AbstractSpinnerModel', 'Action', 'ActionMap', 'BorderFactory', 'BoundedRangeModel', 'Box', 'Box.Filler', 'BoxLayout', 'ButtonGroup', 'ButtonModel', 'CellEditor', 'CellRendererPane', 'ComboBoxEditor', 'ComboBoxModel', 'ComponentInputMap', 'DebugGraphics', 'DefaultBoundedRangeModel', 'DefaultButtonModel', 'DefaultCellEditor', 'DefaultComboBoxModel', 'DefaultDesktopManager', 'DefaultFocusManager', 'DefaultListCellRenderer', 'DefaultListCellRenderer.UIResource', 'DefaultListModel', 'DefaultListSelectionModel', 'DefaultSingleSelectionModel', 'DesktopManager', 'FocusManager', 'GrayFilter', 'Icon', 'ImageIcon', 'InputMap', 'InputVerifier', 'InternalFrameFocusTraversalPolicy', 'JApplet', 'JButton', 'JCheckBox', 'JCheckBoxMenuItem', 'JColorChooser', 'JComboBox', 'JComboBox.KeySelectionManager', 'JComponent', 'JDesktopPane', 'JDialog', 'JEditorPane', 'JFileChooser', 'JFormattedTextField', 'JFormattedTextField.AbstractFormatter', - 'JFormattedTextField.AbstractFormatterFactory', 'JFrame', 'JInternalFrame', 'JInternalFrame.JDesktopIcon', 'JLabel', 'JLayeredPane', 'JList', 'JMenu', 'JMenuBar', 'JMenuItem', 'JOptionPane', 'JPanel', 'JPasswordField', 'JPopupMenu', 'JPopupMenu.Separator', 'JProgressBar', 'JRadioButton', 'JRadioButtonMenuItem', 'JRootPane', 'JScrollBar', 'JScrollPane', 'JSeparator', 'JSlider', 'JSpinner', 'JSpinner.DateEditor', 'JSpinner.DefaultEditor', 'JSpinner.ListEditor', 'JSpinner.NumberEditor', 'JSplitPane', 'JTabbedPane', 'JTable', 'JTable.PrintMode', 'JTextArea', 'JTextField', 'JTextPane', 'JToggleButton', 'JToggleButton.ToggleButtonModel', 'JToolBar', 'JToolBar.Separator', 'JToolTip', 'JTree', 'JTree.DynamicUtilTreeNode', 'JTree.EmptySelectionModel', 'JViewport', 'JWindow', 'KeyStroke', 'LayoutFocusTraversalPolicy', 'ListCellRenderer', 'ListModel', 'ListSelectionModel', 'LookAndFeel', 'MenuElement', 'MenuSelectionManager', 'MutableComboBoxModel', 'OverlayLayout', 'Popup', 'PopupFactory', 'ProgressMonitor', - 'ProgressMonitorInputStream', 'Renderer', 'RepaintManager', 'RootPaneContainer', 'ScrollPaneConstants', 'ScrollPaneLayout', 'ScrollPaneLayout.UIResource', 'Scrollable', 'SingleSelectionModel', 'SizeRequirements', 'SizeSequence', 'SortingFocusTraversalPolicy', 'SpinnerDateModel', 'SpinnerListModel', 'SpinnerModel', 'SpinnerNumberModel', 'Spring', 'SpringLayout', 'SpringLayout.Constraints', 'SwingConstants', 'SwingUtilities', 'ToolTipManager', 'TransferHandler', 'UIDefaults', 'UIDefaults.ActiveValue', 'UIDefaults.LazyInputMap', 'UIDefaults.LazyValue', 'UIDefaults.ProxyLazyValue', 'UIManager', 'UIManager.LookAndFeelInfo', 'UnsupportedLookAndFeelException', 'ViewportLayout', 'WindowConstants' - ), - 106 => array ( - 'AbstractBorder', 'BevelBorder', 'Border', 'CompoundBorder', 'EmptyBorder', 'EtchedBorder', 'LineBorder', 'MatteBorder', 'SoftBevelBorder', 'TitledBorder' - ), - 107 => array ( - 'AbstractColorChooserPanel', 'ColorChooserComponentFactory', 'ColorSelectionModel', 'DefaultColorSelectionModel' - ), - 108 => array ( - 'AncestorEvent', 'AncestorListener', 'CaretEvent', 'CaretListener', 'CellEditorListener', 'ChangeEvent', 'ChangeListener', 'DocumentEvent.ElementChange', 'DocumentEvent.EventType', 'DocumentListener', 'EventListenerList', 'HyperlinkEvent', 'HyperlinkEvent.EventType', 'HyperlinkListener', 'InternalFrameAdapter', 'InternalFrameEvent', 'InternalFrameListener', 'ListDataEvent', 'ListDataListener', 'ListSelectionEvent', 'ListSelectionListener', 'MenuDragMouseEvent', 'MenuDragMouseListener', 'MenuEvent', 'MenuKeyEvent', 'MenuKeyListener', 'MenuListener', 'MouseInputAdapter', 'MouseInputListener', 'PopupMenuEvent', 'PopupMenuListener', 'SwingPropertyChangeSupport', 'TableColumnModelEvent', 'TableColumnModelListener', 'TableModelEvent', 'TableModelListener', 'TreeExpansionEvent', 'TreeExpansionListener', 'TreeModelEvent', 'TreeModelListener', 'TreeSelectionEvent', 'TreeSelectionListener', 'TreeWillExpandListener', 'UndoableEditEvent', 'UndoableEditListener' - ), - 109 => array ( - 'FileSystemView', 'FileView' - ), - 110 => array ( - 'ActionMapUIResource', 'BorderUIResource', 'BorderUIResource.BevelBorderUIResource', 'BorderUIResource.CompoundBorderUIResource', 'BorderUIResource.EmptyBorderUIResource', 'BorderUIResource.EtchedBorderUIResource', 'BorderUIResource.LineBorderUIResource', 'BorderUIResource.MatteBorderUIResource', 'BorderUIResource.TitledBorderUIResource', 'ButtonUI', 'ColorChooserUI', 'ColorUIResource', 'ComboBoxUI', 'ComponentInputMapUIResource', 'ComponentUI', 'DesktopIconUI', 'DesktopPaneUI', 'DimensionUIResource', 'FileChooserUI', 'FontUIResource', 'IconUIResource', 'InputMapUIResource', 'InsetsUIResource', 'InternalFrameUI', 'LabelUI', 'ListUI', 'MenuBarUI', 'MenuItemUI', 'OptionPaneUI', 'PanelUI', 'PopupMenuUI', 'ProgressBarUI', 'RootPaneUI', 'ScrollBarUI', 'ScrollPaneUI', 'SeparatorUI', 'SliderUI', 'SpinnerUI', 'SplitPaneUI', 'TabbedPaneUI', 'TableHeaderUI', 'TableUI', 'TextUI', 'ToolBarUI', 'ToolTipUI', 'TreeUI', 'UIResource', 'ViewportUI' - ), - 111 => array ( - 'BasicArrowButton', 'BasicBorders', 'BasicBorders.ButtonBorder', 'BasicBorders.FieldBorder', 'BasicBorders.MarginBorder', 'BasicBorders.MenuBarBorder', 'BasicBorders.RadioButtonBorder', 'BasicBorders.RolloverButtonBorder', 'BasicBorders.SplitPaneBorder', 'BasicBorders.ToggleButtonBorder', 'BasicButtonListener', 'BasicButtonUI', 'BasicCheckBoxMenuItemUI', 'BasicCheckBoxUI', 'BasicColorChooserUI', 'BasicComboBoxEditor', 'BasicComboBoxEditor.UIResource', 'BasicComboBoxRenderer', 'BasicComboBoxRenderer.UIResource', 'BasicComboBoxUI', 'BasicComboPopup', 'BasicDesktopIconUI', 'BasicDesktopPaneUI', 'BasicDirectoryModel', 'BasicEditorPaneUI', 'BasicFileChooserUI', 'BasicFormattedTextFieldUI', 'BasicGraphicsUtils', 'BasicHTML', 'BasicIconFactory', 'BasicInternalFrameTitlePane', 'BasicInternalFrameUI', 'BasicLabelUI', 'BasicListUI', 'BasicLookAndFeel', 'BasicMenuBarUI', 'BasicMenuItemUI', 'BasicMenuUI', 'BasicOptionPaneUI', 'BasicOptionPaneUI.ButtonAreaLayout', 'BasicPanelUI', 'BasicPasswordFieldUI', - 'BasicPopupMenuSeparatorUI', 'BasicPopupMenuUI', 'BasicProgressBarUI', 'BasicRadioButtonMenuItemUI', 'BasicRadioButtonUI', 'BasicRootPaneUI', 'BasicScrollBarUI', 'BasicScrollPaneUI', 'BasicSeparatorUI', 'BasicSliderUI', 'BasicSpinnerUI', 'BasicSplitPaneDivider', 'BasicSplitPaneUI', 'BasicTabbedPaneUI', 'BasicTableHeaderUI', 'BasicTableUI', 'BasicTextAreaUI', 'BasicTextFieldUI', 'BasicTextPaneUI', 'BasicTextUI', 'BasicTextUI.BasicCaret', 'BasicTextUI.BasicHighlighter', 'BasicToggleButtonUI', 'BasicToolBarSeparatorUI', 'BasicToolBarUI', 'BasicToolTipUI', 'BasicTreeUI', 'BasicViewportUI', 'ComboPopup', 'DefaultMenuLayout' - ), - 112 => array ( - 'DefaultMetalTheme', 'MetalBorders', 'MetalBorders.ButtonBorder', 'MetalBorders.Flush3DBorder', 'MetalBorders.InternalFrameBorder', 'MetalBorders.MenuBarBorder', 'MetalBorders.MenuItemBorder', 'MetalBorders.OptionDialogBorder', 'MetalBorders.PaletteBorder', 'MetalBorders.PopupMenuBorder', 'MetalBorders.RolloverButtonBorder', 'MetalBorders.ScrollPaneBorder', 'MetalBorders.TableHeaderBorder', 'MetalBorders.TextFieldBorder', 'MetalBorders.ToggleButtonBorder', 'MetalBorders.ToolBarBorder', 'MetalButtonUI', 'MetalCheckBoxIcon', 'MetalCheckBoxUI', 'MetalComboBoxButton', 'MetalComboBoxEditor', 'MetalComboBoxEditor.UIResource', 'MetalComboBoxIcon', 'MetalComboBoxUI', 'MetalDesktopIconUI', 'MetalFileChooserUI', 'MetalIconFactory', 'MetalIconFactory.FileIcon16', 'MetalIconFactory.FolderIcon16', 'MetalIconFactory.PaletteCloseIcon', 'MetalIconFactory.TreeControlIcon', 'MetalIconFactory.TreeFolderIcon', 'MetalIconFactory.TreeLeafIcon', 'MetalInternalFrameTitlePane', 'MetalInternalFrameUI', 'MetalLabelUI', - 'MetalLookAndFeel', 'MetalMenuBarUI', 'MetalPopupMenuSeparatorUI', 'MetalProgressBarUI', 'MetalRadioButtonUI', 'MetalRootPaneUI', 'MetalScrollBarUI', 'MetalScrollButton', 'MetalScrollPaneUI', 'MetalSeparatorUI', 'MetalSliderUI', 'MetalSplitPaneUI', 'MetalTabbedPaneUI', 'MetalTextFieldUI', 'MetalTheme', 'MetalToggleButtonUI', 'MetalToolBarUI', 'MetalToolTipUI', 'MetalTreeUI', 'OceanTheme' - ), - 113 => array ( - 'MultiButtonUI', 'MultiColorChooserUI', 'MultiComboBoxUI', 'MultiDesktopIconUI', 'MultiDesktopPaneUI', 'MultiFileChooserUI', 'MultiInternalFrameUI', 'MultiLabelUI', 'MultiListUI', 'MultiLookAndFeel', 'MultiMenuBarUI', 'MultiMenuItemUI', 'MultiOptionPaneUI', 'MultiPanelUI', 'MultiPopupMenuUI', 'MultiProgressBarUI', 'MultiRootPaneUI', 'MultiScrollBarUI', 'MultiScrollPaneUI', 'MultiSeparatorUI', 'MultiSliderUI', 'MultiSpinnerUI', 'MultiSplitPaneUI', 'MultiTabbedPaneUI', 'MultiTableHeaderUI', 'MultiTableUI', 'MultiTextUI', 'MultiToolBarUI', 'MultiToolTipUI', 'MultiTreeUI', 'MultiViewportUI' - ), - 114 => array ( - 'ColorType', 'Region', 'SynthConstants', 'SynthContext', 'SynthGraphicsUtils', 'SynthLookAndFeel', 'SynthPainter', 'SynthStyle', 'SynthStyleFactory' - ), - 115 => array ( - 'AbstractTableModel', 'DefaultTableCellRenderer', 'DefaultTableCellRenderer.UIResource', 'DefaultTableColumnModel', 'DefaultTableModel', 'JTableHeader', 'TableCellEditor', 'TableCellRenderer', 'TableColumn', 'TableColumnModel', 'TableModel' - ), - 116 => array ( - 'AbstractDocument', 'AbstractDocument.AttributeContext', 'AbstractDocument.Content', 'AbstractDocument.ElementEdit', 'AbstractWriter', 'AsyncBoxView', 'AttributeSet.CharacterAttribute', 'AttributeSet.ColorAttribute', 'AttributeSet.FontAttribute', 'AttributeSet.ParagraphAttribute', 'BadLocationException', 'BoxView', 'Caret', 'ChangedCharSetException', 'ComponentView', 'CompositeView', 'DateFormatter', 'DefaultCaret', 'DefaultEditorKit', 'DefaultEditorKit.BeepAction', 'DefaultEditorKit.CopyAction', 'DefaultEditorKit.CutAction', 'DefaultEditorKit.DefaultKeyTypedAction', 'DefaultEditorKit.InsertBreakAction', 'DefaultEditorKit.InsertContentAction', 'DefaultEditorKit.InsertTabAction', 'DefaultEditorKit.PasteAction', 'DefaultFormatter', 'DefaultFormatterFactory', 'DefaultHighlighter', 'DefaultHighlighter.DefaultHighlightPainter', 'DefaultStyledDocument', 'DefaultStyledDocument.AttributeUndoableEdit', 'DefaultStyledDocument.ElementSpec', 'DefaultTextUI', 'DocumentFilter', 'DocumentFilter.FilterBypass', - 'EditorKit', 'ElementIterator', 'FieldView', 'FlowView', 'FlowView.FlowStrategy', 'GapContent', 'GlyphView', 'GlyphView.GlyphPainter', 'Highlighter', 'Highlighter.Highlight', 'Highlighter.HighlightPainter', 'IconView', 'InternationalFormatter', 'JTextComponent', 'JTextComponent.KeyBinding', 'Keymap', 'LabelView', 'LayeredHighlighter', 'LayeredHighlighter.LayerPainter', 'LayoutQueue', 'MaskFormatter', 'MutableAttributeSet', 'NavigationFilter', 'NavigationFilter.FilterBypass', 'NumberFormatter', 'PasswordView', 'PlainDocument', 'PlainView', 'Position', 'Position.Bias', 'Segment', 'SimpleAttributeSet', 'StringContent', 'Style', 'StyleConstants', 'StyleConstants.CharacterConstants', 'StyleConstants.ColorConstants', 'StyleConstants.FontConstants', 'StyleConstants.ParagraphConstants', 'StyleContext', 'StyledDocument', 'StyledEditorKit', 'StyledEditorKit.AlignmentAction', 'StyledEditorKit.BoldAction', 'StyledEditorKit.FontFamilyAction', 'StyledEditorKit.FontSizeAction', 'StyledEditorKit.ForegroundAction', - 'StyledEditorKit.ItalicAction', 'StyledEditorKit.StyledTextAction', 'StyledEditorKit.UnderlineAction', 'TabExpander', 'TabSet', 'TabStop', 'TabableView', 'TableView', 'TextAction', 'Utilities', 'View', 'ViewFactory', 'WrappedPlainView', 'ZoneView' - ), - 117 => array ( - 'BlockView', 'CSS', 'CSS.Attribute', 'FormSubmitEvent', 'FormSubmitEvent.MethodType', 'FormView', 'HTML', 'HTML.Attribute', 'HTML.Tag', 'HTML.UnknownTag', 'HTMLDocument', 'HTMLDocument.Iterator', 'HTMLEditorKit', 'HTMLEditorKit.HTMLFactory', 'HTMLEditorKit.HTMLTextAction', 'HTMLEditorKit.InsertHTMLTextAction', 'HTMLEditorKit.LinkController', 'HTMLEditorKit.Parser', 'HTMLEditorKit.ParserCallback', 'HTMLFrameHyperlinkEvent', 'HTMLWriter', 'ImageView', 'InlineView', 'ListView', 'MinimalHTMLWriter', 'ObjectView', 'Option', 'StyleSheet', 'StyleSheet.BoxPainter', 'StyleSheet.ListPainter' - ), - 118 => array ( - 'ContentModel', 'DTD', 'DTDConstants', 'DocumentParser', 'ParserDelegator', 'TagElement' - ), - 119 => array ( - 'RTFEditorKit' - ), - 120 => array ( - 'AbstractLayoutCache', 'AbstractLayoutCache.NodeDimensions', 'DefaultMutableTreeNode', 'DefaultTreeCellEditor', 'DefaultTreeCellRenderer', 'DefaultTreeModel', 'DefaultTreeSelectionModel', 'ExpandVetoException', 'FixedHeightLayoutCache', 'MutableTreeNode', 'RowMapper', 'TreeCellEditor', 'TreeCellRenderer', 'TreeModel', 'TreeNode', 'TreePath', 'TreeSelectionModel', 'VariableHeightLayoutCache' - ), - 121 => array ( - 'AbstractUndoableEdit', 'CannotRedoException', 'CannotUndoException', 'CompoundEdit', 'StateEdit', 'StateEditable', 'UndoManager', 'UndoableEdit', 'UndoableEditSupport' - ), - 122 => array ( - 'InvalidTransactionException', 'TransactionRequiredException', 'TransactionRolledbackException' - ), - 123 => array ( - 'XAException', 'XAResource', 'Xid' - ), - 124 => array ( - 'XMLConstants' - ), - 125 => array ( - 'DatatypeConfigurationException', 'DatatypeConstants', 'DatatypeConstants.Field', 'DatatypeFactory', 'Duration', 'XMLGregorianCalendar' - ), - 126 => array ( - 'NamespaceContext', 'QName' - ), - 127 => array ( - 'DocumentBuilder', 'DocumentBuilderFactory', 'FactoryConfigurationError', 'ParserConfigurationException', 'SAXParser', 'SAXParserFactory' - ), - 128 => array ( - 'ErrorListener', 'OutputKeys', 'Result', 'Source', 'SourceLocator', 'Templates', 'Transformer', 'TransformerConfigurationException', 'TransformerException', 'TransformerFactory', 'TransformerFactoryConfigurationError', 'URIResolver' - ), - 129 => array ( - 'DOMResult', 'DOMSource' - ), - 130 => array ( - 'SAXResult', 'SAXSource', 'SAXTransformerFactory', 'TemplatesHandler', 'TransformerHandler' - ), - 131 => array ( - 'StreamResult', 'StreamSource' - ), - 132 => array ( - 'Schema', 'SchemaFactory', 'SchemaFactoryLoader', 'TypeInfoProvider', 'Validator', 'ValidatorHandler' - ), - 133 => array ( - 'XPath', 'XPathConstants', 'XPathException', 'XPathExpression', 'XPathExpressionException', 'XPathFactory', 'XPathFactoryConfigurationException', 'XPathFunction', 'XPathFunctionException', 'XPathFunctionResolver', 'XPathVariableResolver' - ), - 134 => array ( - 'ChannelBinding', 'GSSContext', 'GSSCredential', 'GSSException', 'GSSManager', 'GSSName', 'MessageProp', 'Oid' - ), - 135 => array ( - 'ACTIVITY_COMPLETED', 'ACTIVITY_REQUIRED', 'ARG_IN', 'ARG_INOUT', 'ARG_OUT', 'Any', 'AnyHolder', 'AnySeqHolder', 'BAD_CONTEXT', 'BAD_INV_ORDER', 'BAD_OPERATION', 'BAD_PARAM', 'BAD_POLICY', 'BAD_POLICY_TYPE', 'BAD_POLICY_VALUE', 'BAD_QOS', 'BAD_TYPECODE', 'BooleanHolder', 'BooleanSeqHelper', 'BooleanSeqHolder', 'ByteHolder', 'CODESET_INCOMPATIBLE', 'COMM_FAILURE', 'CTX_RESTRICT_SCOPE', 'CharHolder', 'CharSeqHelper', 'CharSeqHolder', 'CompletionStatus', 'CompletionStatusHelper', 'ContextList', 'CurrentHolder', 'CustomMarshal', 'DATA_CONVERSION', 'DefinitionKind', 'DefinitionKindHelper', 'DomainManager', 'DomainManagerOperations', 'DoubleHolder', 'DoubleSeqHelper', 'DoubleSeqHolder', 'Environment', 'ExceptionList', 'FREE_MEM', 'FixedHolder', 'FloatHolder', 'FloatSeqHelper', 'FloatSeqHolder', 'IDLType', 'IDLTypeHelper', 'IDLTypeOperations', 'IMP_LIMIT', 'INITIALIZE', 'INTERNAL', 'INTF_REPOS', 'INVALID_ACTIVITY', 'INVALID_TRANSACTION', 'INV_FLAG', 'INV_IDENT', 'INV_OBJREF', 'INV_POLICY', 'IRObject', - 'IRObjectOperations', 'IdentifierHelper', 'IntHolder', 'LocalObject', 'LongHolder', 'LongLongSeqHelper', 'LongLongSeqHolder', 'LongSeqHelper', 'LongSeqHolder', 'MARSHAL', 'NO_IMPLEMENT', 'NO_MEMORY', 'NO_PERMISSION', 'NO_RESOURCES', 'NO_RESPONSE', 'NVList', 'NamedValue', 'OBJECT_NOT_EXIST', 'OBJ_ADAPTER', 'OMGVMCID', 'ObjectHelper', 'ObjectHolder', 'OctetSeqHelper', 'OctetSeqHolder', 'PERSIST_STORE', 'PRIVATE_MEMBER', 'PUBLIC_MEMBER', 'ParameterMode', 'ParameterModeHelper', 'ParameterModeHolder', 'PolicyError', 'PolicyErrorCodeHelper', 'PolicyErrorHelper', 'PolicyErrorHolder', 'PolicyHelper', 'PolicyHolder', 'PolicyListHelper', 'PolicyListHolder', 'PolicyOperations', 'PolicyTypeHelper', 'PrincipalHolder', 'REBIND', 'RepositoryIdHelper', 'Request', 'ServerRequest', 'ServiceDetail', 'ServiceDetailHelper', 'ServiceInformation', 'ServiceInformationHelper', 'ServiceInformationHolder', 'SetOverrideType', 'SetOverrideTypeHelper', 'ShortHolder', 'ShortSeqHelper', 'ShortSeqHolder', 'StringHolder', - 'StringSeqHelper', 'StringSeqHolder', 'StringValueHelper', 'StructMember', 'StructMemberHelper', 'SystemException', 'TCKind', 'TIMEOUT', 'TRANSACTION_MODE', 'TRANSACTION_REQUIRED', 'TRANSACTION_ROLLEDBACK', 'TRANSACTION_UNAVAILABLE', 'TRANSIENT', 'TypeCode', 'TypeCodeHolder', 'ULongLongSeqHelper', 'ULongLongSeqHolder', 'ULongSeqHelper', 'ULongSeqHolder', 'UNSUPPORTED_POLICY', 'UNSUPPORTED_POLICY_VALUE', 'UShortSeqHelper', 'UShortSeqHolder', 'UnionMember', 'UnionMemberHelper', 'UnknownUserException', 'UnknownUserExceptionHelper', 'UnknownUserExceptionHolder', 'UserException', 'VM_ABSTRACT', 'VM_CUSTOM', 'VM_NONE', 'VM_TRUNCATABLE', 'ValueBaseHelper', 'ValueBaseHolder', 'ValueMember', 'ValueMemberHelper', 'VersionSpecHelper', 'VisibilityHelper', 'WCharSeqHelper', 'WCharSeqHolder', 'WStringSeqHelper', 'WStringSeqHolder', 'WStringValueHelper', 'WrongTransaction', 'WrongTransactionHelper', 'WrongTransactionHolder', '_IDLTypeStub', '_PolicyStub' - ), - 136 => array ( - 'Invalid', 'InvalidSeq' - ), - 137 => array ( - 'BadKind' - ), - 138 => array ( - 'ApplicationException', 'BoxedValueHelper', 'CustomValue', 'IDLEntity', 'IndirectionException', 'InvokeHandler', 'RemarshalException', 'ResponseHandler', 'ServantObject', 'Streamable', 'StreamableValue', 'UnknownException', 'ValueBase', 'ValueFactory', 'ValueInputStream', 'ValueOutputStream' - ), - 139 => array ( - 'BindingHelper', 'BindingHolder', 'BindingIterator', 'BindingIteratorHelper', 'BindingIteratorHolder', 'BindingIteratorOperations', 'BindingIteratorPOA', 'BindingListHelper', 'BindingListHolder', 'BindingType', 'BindingTypeHelper', 'BindingTypeHolder', 'IstringHelper', 'NameComponent', 'NameComponentHelper', 'NameComponentHolder', 'NameHelper', 'NameHolder', 'NamingContext', 'NamingContextExt', 'NamingContextExtHelper', 'NamingContextExtHolder', 'NamingContextExtOperations', 'NamingContextExtPOA', 'NamingContextHelper', 'NamingContextHolder', 'NamingContextOperations', 'NamingContextPOA', '_BindingIteratorImplBase', '_BindingIteratorStub', '_NamingContextExtStub', '_NamingContextImplBase', '_NamingContextStub' - ), - 140 => array ( - 'AddressHelper', 'InvalidAddress', 'InvalidAddressHelper', 'InvalidAddressHolder', 'StringNameHelper', 'URLStringHelper' - ), - 141 => array ( - 'AlreadyBound', 'AlreadyBoundHelper', 'AlreadyBoundHolder', 'CannotProceed', 'CannotProceedHelper', 'CannotProceedHolder', 'InvalidNameHolder', 'NotEmpty', 'NotEmptyHelper', 'NotEmptyHolder', 'NotFound', 'NotFoundHelper', 'NotFoundHolder', 'NotFoundReason', 'NotFoundReasonHelper', 'NotFoundReasonHolder' - ), - 142 => array ( - 'Parameter' - ), - 143 => array ( - 'DynAnyFactory', 'DynAnyFactoryHelper', 'DynAnyFactoryOperations', 'DynAnyHelper', 'DynAnyOperations', 'DynAnySeqHelper', 'DynArrayHelper', 'DynArrayOperations', 'DynEnumHelper', 'DynEnumOperations', 'DynFixedHelper', 'DynFixedOperations', 'DynSequenceHelper', 'DynSequenceOperations', 'DynStructHelper', 'DynStructOperations', 'DynUnionHelper', 'DynUnionOperations', 'DynValueBox', 'DynValueBoxOperations', 'DynValueCommon', 'DynValueCommonOperations', 'DynValueHelper', 'DynValueOperations', 'NameDynAnyPair', 'NameDynAnyPairHelper', 'NameDynAnyPairSeqHelper', 'NameValuePairSeqHelper', '_DynAnyFactoryStub', '_DynAnyStub', '_DynArrayStub', '_DynEnumStub', '_DynFixedStub', '_DynSequenceStub', '_DynStructStub', '_DynUnionStub', '_DynValueStub' - ), - 144 => array ( - 'InconsistentTypeCodeHelper' - ), - 145 => array ( - 'InvalidValueHelper' - ), - 146 => array ( - 'CodeSets', 'Codec', 'CodecFactory', 'CodecFactoryHelper', 'CodecFactoryOperations', 'CodecOperations', 'ComponentIdHelper', 'ENCODING_CDR_ENCAPS', 'Encoding', 'ExceptionDetailMessage', 'IOR', 'IORHelper', 'IORHolder', 'MultipleComponentProfileHelper', 'MultipleComponentProfileHolder', 'ProfileIdHelper', 'RMICustomMaxStreamFormat', 'ServiceContext', 'ServiceContextHelper', 'ServiceContextHolder', 'ServiceContextListHelper', 'ServiceContextListHolder', 'ServiceIdHelper', 'TAG_ALTERNATE_IIOP_ADDRESS', 'TAG_CODE_SETS', 'TAG_INTERNET_IOP', 'TAG_JAVA_CODEBASE', 'TAG_MULTIPLE_COMPONENTS', 'TAG_ORB_TYPE', 'TAG_POLICIES', 'TAG_RMI_CUSTOM_MAX_STREAM_FORMAT', 'TaggedComponent', 'TaggedComponentHelper', 'TaggedComponentHolder', 'TaggedProfile', 'TaggedProfileHelper', 'TaggedProfileHolder', 'TransactionService' - ), - 147 => array ( - 'UnknownEncoding', 'UnknownEncodingHelper' - ), - 148 => array ( - 'FormatMismatch', 'FormatMismatchHelper', 'InvalidTypeForEncoding', 'InvalidTypeForEncodingHelper' - ), - 149 => array ( - 'SYNC_WITH_TRANSPORT', 'SyncScopeHelper' - ), - 150 => array ( - 'ACTIVE', 'AdapterManagerIdHelper', 'AdapterNameHelper', 'AdapterStateHelper', 'ClientRequestInfo', 'ClientRequestInfoOperations', 'ClientRequestInterceptor', 'ClientRequestInterceptorOperations', 'DISCARDING', 'HOLDING', 'INACTIVE', 'IORInfo', 'IORInfoOperations', 'IORInterceptor', 'IORInterceptorOperations', 'IORInterceptor_3_0', 'IORInterceptor_3_0Helper', 'IORInterceptor_3_0Holder', 'IORInterceptor_3_0Operations', 'Interceptor', 'InterceptorOperations', 'InvalidSlot', 'InvalidSlotHelper', 'LOCATION_FORWARD', 'NON_EXISTENT', 'ORBIdHelper', 'ORBInitInfo', 'ORBInitInfoOperations', 'ORBInitializer', 'ORBInitializerOperations', 'ObjectReferenceFactory', 'ObjectReferenceFactoryHelper', 'ObjectReferenceFactoryHolder', 'ObjectReferenceTemplate', 'ObjectReferenceTemplateHelper', 'ObjectReferenceTemplateHolder', 'ObjectReferenceTemplateSeqHelper', 'ObjectReferenceTemplateSeqHolder', 'PolicyFactory', 'PolicyFactoryOperations', 'RequestInfo', 'RequestInfoOperations', 'SUCCESSFUL', 'SYSTEM_EXCEPTION', - 'ServerIdHelper', 'ServerRequestInfo', 'ServerRequestInfoOperations', 'ServerRequestInterceptor', 'ServerRequestInterceptorOperations', 'TRANSPORT_RETRY', 'USER_EXCEPTION' - ), - 151 => array ( - 'DuplicateName', 'DuplicateNameHelper' - ), - 152 => array ( - 'AdapterActivator', 'AdapterActivatorOperations', 'ID_ASSIGNMENT_POLICY_ID', 'ID_UNIQUENESS_POLICY_ID', 'IMPLICIT_ACTIVATION_POLICY_ID', 'IdAssignmentPolicy', 'IdAssignmentPolicyOperations', 'IdAssignmentPolicyValue', 'IdUniquenessPolicy', 'IdUniquenessPolicyOperations', 'IdUniquenessPolicyValue', 'ImplicitActivationPolicy', 'ImplicitActivationPolicyOperations', 'ImplicitActivationPolicyValue', 'LIFESPAN_POLICY_ID', 'LifespanPolicy', 'LifespanPolicyOperations', 'LifespanPolicyValue', 'POA', 'POAHelper', 'POAManager', 'POAManagerOperations', 'POAOperations', 'REQUEST_PROCESSING_POLICY_ID', 'RequestProcessingPolicy', 'RequestProcessingPolicyOperations', 'RequestProcessingPolicyValue', 'SERVANT_RETENTION_POLICY_ID', 'Servant', 'ServantActivator', 'ServantActivatorHelper', 'ServantActivatorOperations', 'ServantActivatorPOA', 'ServantLocator', 'ServantLocatorHelper', 'ServantLocatorOperations', 'ServantLocatorPOA', 'ServantManager', 'ServantManagerOperations', 'ServantRetentionPolicy', - 'ServantRetentionPolicyOperations', 'ServantRetentionPolicyValue', 'THREAD_POLICY_ID', 'ThreadPolicy', 'ThreadPolicyOperations', 'ThreadPolicyValue', '_ServantActivatorStub', '_ServantLocatorStub' - ), - 153 => array ( - 'NoContext', 'NoContextHelper' - ), - 154 => array ( - 'AdapterInactive', 'AdapterInactiveHelper', 'State' - ), - 155 => array ( - 'AdapterAlreadyExists', 'AdapterAlreadyExistsHelper', 'AdapterNonExistent', 'AdapterNonExistentHelper', 'InvalidPolicy', 'InvalidPolicyHelper', 'NoServant', 'NoServantHelper', 'ObjectAlreadyActive', 'ObjectAlreadyActiveHelper', 'ObjectNotActive', 'ObjectNotActiveHelper', 'ServantAlreadyActive', 'ServantAlreadyActiveHelper', 'ServantNotActive', 'ServantNotActiveHelper', 'WrongAdapter', 'WrongAdapterHelper', 'WrongPolicy', 'WrongPolicyHelper' - ), - 156 => array ( - 'CookieHolder' - ), - 157 => array ( - 'RunTime', 'RunTimeOperations' - ), - 158 => array ( - '_Remote_Stub' - ), - 159 => array ( - 'Attr', 'CDATASection', 'CharacterData', 'Comment', 'DOMConfiguration', 'DOMError', 'DOMErrorHandler', 'DOMException', 'DOMImplementation', 'DOMImplementationList', 'DOMImplementationSource', 'DOMStringList', 'DocumentFragment', 'DocumentType', 'EntityReference', 'NameList', 'NamedNodeMap', 'Node', 'NodeList', 'Notation', 'ProcessingInstruction', 'Text', 'TypeInfo', 'UserDataHandler' - ), - 160 => array ( - 'DOMImplementationRegistry' - ), - 161 => array ( - 'EventException', 'EventTarget', 'MutationEvent', 'UIEvent' - ), - 162 => array ( - 'DOMImplementationLS', 'LSException', 'LSInput', 'LSLoadEvent', 'LSOutput', 'LSParser', 'LSParserFilter', 'LSProgressEvent', 'LSResourceResolver', 'LSSerializer', 'LSSerializerFilter' - ), - 163 => array ( - 'DTDHandler', 'DocumentHandler', 'EntityResolver', 'ErrorHandler', 'HandlerBase', 'InputSource', 'Locator', 'SAXException', 'SAXNotRecognizedException', 'SAXNotSupportedException', 'SAXParseException', 'XMLFilter', 'XMLReader' - ), - 164 => array ( - 'Attributes2', 'Attributes2Impl', 'DeclHandler', 'DefaultHandler2', 'EntityResolver2', 'LexicalHandler', 'Locator2', 'Locator2Impl' - ), - 165 => array ( - 'AttributeListImpl', 'AttributesImpl', 'DefaultHandler', 'LocatorImpl', 'NamespaceSupport', 'ParserAdapter', 'ParserFactory', 'XMLFilterImpl', 'XMLReaderAdapter', 'XMLReaderFactory' - ), - /* ambiguous class names (appear in more than one package) */ - 166 => array ( - 'Annotation', 'AnySeqHelper', 'Array', 'Attribute', 'AttributeList', 'AttributeSet', 'Attributes', 'AuthenticationException', 'Binding', 'Bounds', 'Certificate', 'CertificateEncodingException', 'CertificateException', 'CertificateExpiredException', 'CertificateNotYetValidException', 'CertificateParsingException', 'ConnectException', 'ContentHandler', 'Context', 'Control', 'Current', 'CurrentHelper', 'CurrentOperations', 'DOMLocator', 'DataInputStream', 'DataOutputStream', 'Date', 'DefaultLoaderRepository', 'Delegate', 'Document', 'DocumentEvent', 'DynAny', 'DynArray', 'DynEnum', 'DynFixed', 'DynSequence', 'DynStruct', 'DynUnion', 'DynValue', 'DynamicImplementation', 'Element', 'Entity', 'Event', 'EventListener', 'FieldNameHelper', 'FileFilter', 'Formatter', 'ForwardRequest', 'ForwardRequestHelper', 'InconsistentTypeCode', 'InputStream', 'IntrospectionException', 'InvalidAttributeValueException', 'InvalidKeyException', 'InvalidName', 'InvalidNameHelper', 'InvalidValue', 'List', 'MouseEvent', - 'NameValuePair', 'NameValuePairHelper', 'ORB', 'Object', 'ObjectIdHelper', 'ObjectImpl', 'OpenType', 'OutputStream', 'ParagraphView', 'Parser', 'Permission', 'Policy', 'Principal', 'Proxy', 'Reference', 'Statement', 'Timer', 'Timestamp', 'TypeMismatch', 'TypeMismatchHelper', 'UNKNOWN', 'UnknownHostException', 'X509Certificate' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - /* all Java keywords are case sensitive */ - 1 => true, 2 => true, 3 => true, 4 => true, - 5 => true, 6 => true, 7 => true, 8 => true, 9 => true, - 10 => true, 11 => true, 12 => true, 13 => true, 14 => true, - 15 => true, 16 => true, 17 => true, 18 => true, 19 => true, - 20 => true, 21 => true, 22 => true, 23 => true, 24 => true, - 25 => true, 26 => true, 27 => true, 28 => true, 29 => true, - 30 => true, 31 => true, 32 => true, 33 => true, 34 => true, - 35 => true, 36 => true, 37 => true, 38 => true, 39 => true, - 40 => true, 41 => true, 42 => true, 43 => true, 44 => true, - 45 => true, 46 => true, 47 => true, 48 => true, 49 => true, - 50 => true, 51 => true, 52 => true, 53 => true, 54 => true, - 55 => true, 56 => true, 57 => true, 58 => true, 59 => true, - 60 => true, 61 => true, 62 => true, 63 => true, 64 => true, - 65 => true, 66 => true, 67 => true, 68 => true, 69 => true, - 70 => true, 71 => true, 72 => true, 73 => true, 74 => true, - 75 => true, 76 => true, 77 => true, 78 => true, 79 => true, - 80 => true, 81 => true, 82 => true, 83 => true, 84 => true, - 85 => true, 86 => true, 87 => true, 88 => true, 89 => true, - 90 => true, 91 => true, 92 => true, 93 => true, 94 => true, - 95 => true, 96 => true, 97 => true, 98 => true, 99 => true, - 100 => true, 101 => true, 102 => true, 103 => true, 104 => true, - 105 => true, 106 => true, 107 => true, 108 => true, 109 => true, - 110 => true, 111 => true, 112 => true, 113 => true, 114 => true, - 115 => true, 116 => true, 117 => true, 118 => true, 119 => true, - 120 => true, 121 => true, 122 => true, 123 => true, 124 => true, - 125 => true, 126 => true, 127 => true, 128 => true, 129 => true, - 130 => true, 131 => true, 132 => true, 133 => true, 134 => true, - 135 => true, 136 => true, 137 => true, 138 => true, 139 => true, - 140 => true, 141 => true, 142 => true, 143 => true, 144 => true, - 145 => true, 146 => true, 147 => true, 148 => true, 149 => true, - 150 => true, 151 => true, 152 => true, 153 => true, 154 => true, - 155 => true, 156 => true, 157 => true, 158 => true, 159 => true, - 160 => true, 161 => true, 162 => true, 163 => true, 164 => true, - 165 => true, 166 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #006600; font-weight: bold;', - 4 => 'color: #006600; font-weight: bold;', - 5 => 'color: #003399; font-weight: bold;', - 6 => 'color: #003399; font-weight: bold;', - 7 => 'color: #003399; font-weight: bold;', - 8 => 'color: #003399; font-weight: bold;', - 9 => 'color: #003399; font-weight: bold;', - 10 => 'color: #003399; font-weight: bold;', - 11 => 'color: #003399; font-weight: bold;', - 12 => 'color: #003399; font-weight: bold;', - 13 => 'color: #003399; font-weight: bold;', - 14 => 'color: #003399; font-weight: bold;', - 15 => 'color: #003399; font-weight: bold;', - 16 => 'color: #003399; font-weight: bold;', - 17 => 'color: #003399; font-weight: bold;', - 18 => 'color: #003399; font-weight: bold;', - 19 => 'color: #003399; font-weight: bold;', - 20 => 'color: #003399; font-weight: bold;', - 21 => 'color: #003399; font-weight: bold;', - 22 => 'color: #003399; font-weight: bold;', - 23 => 'color: #003399; font-weight: bold;', - 24 => 'color: #003399; font-weight: bold;', - 25 => 'color: #003399; font-weight: bold;', - 26 => 'color: #003399; font-weight: bold;', - 27 => 'color: #003399; font-weight: bold;', - 28 => 'color: #003399; font-weight: bold;', - 29 => 'color: #003399; font-weight: bold;', - 30 => 'color: #003399; font-weight: bold;', - 31 => 'color: #003399; font-weight: bold;', - 32 => 'color: #003399; font-weight: bold;', - 33 => 'color: #003399; font-weight: bold;', - 34 => 'color: #003399; font-weight: bold;', - 35 => 'color: #003399; font-weight: bold;', - 36 => 'color: #003399; font-weight: bold;', - 37 => 'color: #003399; font-weight: bold;', - 38 => 'color: #003399; font-weight: bold;', - 39 => 'color: #003399; font-weight: bold;', - 40 => 'color: #003399; font-weight: bold;', - 41 => 'color: #003399; font-weight: bold;', - 42 => 'color: #003399; font-weight: bold;', - 43 => 'color: #003399; font-weight: bold;', - 44 => 'color: #003399; font-weight: bold;', - 45 => 'color: #003399; font-weight: bold;', - 46 => 'color: #003399; font-weight: bold;', - 47 => 'color: #003399; font-weight: bold;', - 48 => 'color: #003399; font-weight: bold;', - 49 => 'color: #003399; font-weight: bold;', - 50 => 'color: #003399; font-weight: bold;', - 51 => 'color: #003399; font-weight: bold;', - 52 => 'color: #003399; font-weight: bold;', - 53 => 'color: #003399; font-weight: bold;', - 54 => 'color: #003399; font-weight: bold;', - 55 => 'color: #003399; font-weight: bold;', - 56 => 'color: #003399; font-weight: bold;', - 57 => 'color: #003399; font-weight: bold;', - 58 => 'color: #003399; font-weight: bold;', - 59 => 'color: #003399; font-weight: bold;', - 60 => 'color: #003399; font-weight: bold;', - 61 => 'color: #003399; font-weight: bold;', - 62 => 'color: #003399; font-weight: bold;', - 63 => 'color: #003399; font-weight: bold;', - 64 => 'color: #003399; font-weight: bold;', - 65 => 'color: #003399; font-weight: bold;', - 66 => 'color: #003399; font-weight: bold;', - 67 => 'color: #003399; font-weight: bold;', - 68 => 'color: #003399; font-weight: bold;', - 69 => 'color: #003399; font-weight: bold;', - 70 => 'color: #003399; font-weight: bold;', - 71 => 'color: #003399; font-weight: bold;', - 72 => 'color: #003399; font-weight: bold;', - 73 => 'color: #003399; font-weight: bold;', - 74 => 'color: #003399; font-weight: bold;', - 75 => 'color: #003399; font-weight: bold;', - 76 => 'color: #003399; font-weight: bold;', - 77 => 'color: #003399; font-weight: bold;', - 78 => 'color: #003399; font-weight: bold;', - 79 => 'color: #003399; font-weight: bold;', - 80 => 'color: #003399; font-weight: bold;', - 81 => 'color: #003399; font-weight: bold;', - 82 => 'color: #003399; font-weight: bold;', - 83 => 'color: #003399; font-weight: bold;', - 84 => 'color: #003399; font-weight: bold;', - 85 => 'color: #003399; font-weight: bold;', - 86 => 'color: #003399; font-weight: bold;', - 87 => 'color: #003399; font-weight: bold;', - 88 => 'color: #003399; font-weight: bold;', - 89 => 'color: #003399; font-weight: bold;', - 90 => 'color: #003399; font-weight: bold;', - 91 => 'color: #003399; font-weight: bold;', - 92 => 'color: #003399; font-weight: bold;', - 93 => 'color: #003399; font-weight: bold;', - 94 => 'color: #003399; font-weight: bold;', - 95 => 'color: #003399; font-weight: bold;', - 96 => 'color: #003399; font-weight: bold;', - 97 => 'color: #003399; font-weight: bold;', - 98 => 'color: #003399; font-weight: bold;', - 99 => 'color: #003399; font-weight: bold;', - 100 => 'color: #003399; font-weight: bold;', - 101 => 'color: #003399; font-weight: bold;', - 102 => 'color: #003399; font-weight: bold;', - 103 => 'color: #003399; font-weight: bold;', - 104 => 'color: #003399; font-weight: bold;', - 105 => 'color: #003399; font-weight: bold;', - 106 => 'color: #003399; font-weight: bold;', - 107 => 'color: #003399; font-weight: bold;', - 108 => 'color: #003399; font-weight: bold;', - 109 => 'color: #003399; font-weight: bold;', - 110 => 'color: #003399; font-weight: bold;', - 111 => 'color: #003399; font-weight: bold;', - 112 => 'color: #003399; font-weight: bold;', - 113 => 'color: #003399; font-weight: bold;', - 114 => 'color: #003399; font-weight: bold;', - 115 => 'color: #003399; font-weight: bold;', - 116 => 'color: #003399; font-weight: bold;', - 117 => 'color: #003399; font-weight: bold;', - 118 => 'color: #003399; font-weight: bold;', - 119 => 'color: #003399; font-weight: bold;', - 120 => 'color: #003399; font-weight: bold;', - 121 => 'color: #003399; font-weight: bold;', - 122 => 'color: #003399; font-weight: bold;', - 123 => 'color: #003399; font-weight: bold;', - 124 => 'color: #003399; font-weight: bold;', - 125 => 'color: #003399; font-weight: bold;', - 126 => 'color: #003399; font-weight: bold;', - 127 => 'color: #003399; font-weight: bold;', - 128 => 'color: #003399; font-weight: bold;', - 129 => 'color: #003399; font-weight: bold;', - 130 => 'color: #003399; font-weight: bold;', - 131 => 'color: #003399; font-weight: bold;', - 132 => 'color: #003399; font-weight: bold;', - 133 => 'color: #003399; font-weight: bold;', - 134 => 'color: #003399; font-weight: bold;', - 135 => 'color: #003399; font-weight: bold;', - 136 => 'color: #003399; font-weight: bold;', - 137 => 'color: #003399; font-weight: bold;', - 138 => 'color: #003399; font-weight: bold;', - 139 => 'color: #003399; font-weight: bold;', - 140 => 'color: #003399; font-weight: bold;', - 141 => 'color: #003399; font-weight: bold;', - 142 => 'color: #003399; font-weight: bold;', - 143 => 'color: #003399; font-weight: bold;', - 144 => 'color: #003399; font-weight: bold;', - 145 => 'color: #003399; font-weight: bold;', - 146 => 'color: #003399; font-weight: bold;', - 147 => 'color: #003399; font-weight: bold;', - 148 => 'color: #003399; font-weight: bold;', - 149 => 'color: #003399; font-weight: bold;', - 150 => 'color: #003399; font-weight: bold;', - 151 => 'color: #003399; font-weight: bold;', - 152 => 'color: #003399; font-weight: bold;', - 153 => 'color: #003399; font-weight: bold;', - 154 => 'color: #003399; font-weight: bold;', - 155 => 'color: #003399; font-weight: bold;', - 156 => 'color: #003399; font-weight: bold;', - 157 => 'color: #003399; font-weight: bold;', - 158 => 'color: #003399; font-weight: bold;', - 159 => 'color: #003399; font-weight: bold;', - 160 => 'color: #003399; font-weight: bold;', - 161 => 'color: #003399; font-weight: bold;', - 162 => 'color: #003399; font-weight: bold;', - 163 => 'color: #003399; font-weight: bold;', - 164 => 'color: #003399; font-weight: bold;', - 165 => 'color: #003399; font-weight: bold;', - 166 => 'color: #003399; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #006699;', - 3 => 'color: #008000; font-style: italic; font-weight: bold;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006633;', - 2 => 'color: #006633;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/applet/{FNAME}.html', - 6 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/{FNAME}.html', - 7 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/color/{FNAME}.html', - 8 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/datatransfer/{FNAME}.html', - 9 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/dnd/{FNAME}.html', - 10 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/event/{FNAME}.html', - 11 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/font/{FNAME}.html', - 12 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/geom/{FNAME}.html', - 13 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/im/{FNAME}.html', - 14 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/im/spi/{FNAME}.html', - 15 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/image/{FNAME}.html', - 16 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/image/renderable/{FNAME}.html', - 17 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/awt/print/{FNAME}.html', - 18 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/beans/{FNAME}.html', - 19 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/beans/beancontext/{FNAME}.html', - 20 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/io/{FNAME}.html', - 21 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/{FNAME}.html', - 22 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/annotation/{FNAME}.html', - 23 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/instrument/{FNAME}.html', - 24 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/management/{FNAME}.html', - 25 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/ref/{FNAME}.html', - 26 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/lang/reflect/{FNAME}.html', - 27 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/math/{FNAME}.html', - 28 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/net/{FNAME}.html', - 29 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/nio/{FNAME}.html', - 30 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/nio/channels/{FNAME}.html', - 31 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/nio/channels/spi/{FNAME}.html', - 32 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/nio/charset/{FNAME}.html', - 33 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/nio/charset/spi/{FNAME}.html', - 34 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/rmi/{FNAME}.html', - 35 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/rmi/activation/{FNAME}.html', - 36 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/rmi/dgc/{FNAME}.html', - 37 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/rmi/registry/{FNAME}.html', - 38 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/rmi/server/{FNAME}.html', - 39 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/security/{FNAME}.html', - 40 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/security/acl/{FNAME}.html', - 41 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/security/cert/{FNAME}.html', - 42 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/security/interfaces/{FNAME}.html', - 43 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/security/spec/{FNAME}.html', - 44 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/sql/{FNAME}.html', - 45 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/text/{FNAME}.html', - 46 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/{FNAME}.html', - 47 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/concurrent/{FNAME}.html', - 48 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/concurrent/atomic/{FNAME}.html', - 49 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/concurrent/locks/{FNAME}.html', - 50 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/jar/{FNAME}.html', - 51 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/logging/{FNAME}.html', - 52 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/prefs/{FNAME}.html', - 53 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/regex/{FNAME}.html', - 54 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/java/util/zip/{FNAME}.html', - 55 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/accessibility/{FNAME}.html', - 56 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/activity/{FNAME}.html', - 57 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/crypto/{FNAME}.html', - 58 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/crypto/interfaces/{FNAME}.html', - 59 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/crypto/spec/{FNAME}.html', - 60 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/imageio/{FNAME}.html', - 61 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/imageio/event/{FNAME}.html', - 62 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/imageio/metadata/{FNAME}.html', - 63 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/imageio/plugins/bmp/{FNAME}.html', - 64 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/imageio/plugins/jpeg/{FNAME}.html', - 65 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/imageio/spi/{FNAME}.html', - 66 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/imageio/stream/{FNAME}.html', - 67 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/{FNAME}.html', - 68 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/loading/{FNAME}.html', - 69 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/modelmbean/{FNAME}.html', - 70 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/monitor/{FNAME}.html', - 71 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/openmbean/{FNAME}.html', - 72 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/relation/{FNAME}.html', - 73 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/remote/{FNAME}.html', - 74 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/remote/rmi/{FNAME}.html', - 75 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/management/timer/{FNAME}.html', - 76 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/naming/{FNAME}.html', - 77 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/naming/directory/{FNAME}.html', - 78 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/naming/event/{FNAME}.html', - 79 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/naming/ldap/{FNAME}.html', - 80 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/naming/spi/{FNAME}.html', - 81 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/net/{FNAME}.html', - 82 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/net/ssl/{FNAME}.html', - 83 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/print/{FNAME}.html', - 84 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/print/attribute/{FNAME}.html', - 85 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/print/attribute/standard/{FNAME}.html', - 86 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/print/event/{FNAME}.html', - 87 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/rmi/{FNAME}.html', - 88 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/rmi/CORBA/{FNAME}.html', - 89 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/rmi/ssl/{FNAME}.html', - 90 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/security/auth/{FNAME}.html', - 91 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/security/auth/callback/{FNAME}.html', - 92 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/security/auth/kerberos/{FNAME}.html', - 93 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/security/auth/login/{FNAME}.html', - 94 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/security/auth/spi/{FNAME}.html', - 95 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/security/auth/x500/{FNAME}.html', - 96 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/security/sasl/{FNAME}.html', - 97 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/sound/midi/{FNAME}.html', - 98 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/sound/midi/spi/{FNAME}.html', - 99 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/sound/sampled/{FNAME}.html', - 100 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/sound/sampled/spi/{FNAME}.html', - 101 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/sql/{FNAME}.html', - 102 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/sql/rowset/{FNAME}.html', - 103 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/sql/rowset/serial/{FNAME}.html', - 104 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/sql/rowset/spi/{FNAME}.html', - 105 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/{FNAME}.html', - 106 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/border/{FNAME}.html', - 107 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/colorchooser/{FNAME}.html', - 108 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/event/{FNAME}.html', - 109 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/filechooser/{FNAME}.html', - 110 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/plaf/{FNAME}.html', - 111 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/plaf/basic/{FNAME}.html', - 112 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/plaf/metal/{FNAME}.html', - 113 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/plaf/multi/{FNAME}.html', - 114 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/plaf/synth/{FNAME}.html', - 115 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/table/{FNAME}.html', - 116 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/text/{FNAME}.html', - 117 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/text/html/{FNAME}.html', - 118 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/text/html/parser/{FNAME}.html', - 119 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/text/rtf/{FNAME}.html', - 120 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/tree/{FNAME}.html', - 121 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/swing/undo/{FNAME}.html', - 122 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/transaction/{FNAME}.html', - 123 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/transaction/xa/{FNAME}.html', - 124 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/{FNAME}.html', - 125 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/datatype/{FNAME}.html', - 126 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/namespace/{FNAME}.html', - 127 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/parsers/{FNAME}.html', - 128 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/transform/{FNAME}.html', - 129 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/transform/dom/{FNAME}.html', - 130 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/transform/sax/{FNAME}.html', - 131 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/transform/stream/{FNAME}.html', - 132 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/validation/{FNAME}.html', - 133 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/javax/xml/xpath/{FNAME}.html', - 134 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/ietf/jgss/{FNAME}.html', - 135 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/CORBA/{FNAME}.html', - 136 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/CORBA/DynAnyPackage/{FNAME}.html', - 137 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/CORBA/TypeCodePackage/{FNAME}.html', - 138 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/CORBA/portable/{FNAME}.html', - 139 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/CosNaming/{FNAME}.html', - 140 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/CosNaming/NamingContextExtPackage/{FNAME}.html', - 141 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/CosNaming/NamingContextPackage/{FNAME}.html', - 142 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/Dynamic/{FNAME}.html', - 143 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/DynamicAny/{FNAME}.html', - 144 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/DynamicAny/DynAnyFactoryPackage/{FNAME}.html', - 145 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/DynamicAny/DynAnyPackage/{FNAME}.html', - 146 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/IOP/{FNAME}.html', - 147 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/IOP/CodecFactoryPackage/{FNAME}.html', - 148 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/IOP/CodecPackage/{FNAME}.html', - 149 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/Messaging/{FNAME}.html', - 150 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/PortableInterceptor/{FNAME}.html', - 151 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/PortableInterceptor/ORBInitInfoPackage/{FNAME}.html', - 152 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/PortableServer/{FNAME}.html', - 153 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/PortableServer/CurrentPackage/{FNAME}.html', - 154 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/PortableServer/POAManagerPackage/{FNAME}.html', - 155 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/PortableServer/POAPackage/{FNAME}.html', - 156 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/PortableServer/ServantLocatorPackage/{FNAME}.html', - 157 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/SendingContext/{FNAME}.html', - 158 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/omg/stub/java/rmi/{FNAME}.html', - 159 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/w3c/dom/{FNAME}.html', - 160 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/w3c/dom/bootstrap/{FNAME}.html', - 161 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/w3c/dom/events/{FNAME}.html', - 162 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/w3c/dom/ls/{FNAME}.html', - 163 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/xml/sax/{FNAME}.html', - 164 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/xml/sax/ext/{FNAME}.html', - 165 => 'http://java.sun.com/j2se/1%2E5%2E0/docs/api/org/xml/sax/helpers/{FNAME}.html', - /* ambiguous class names (appear in more than one package) */ - 166 => 'http://www.google.com/search?sitesearch=java.sun.com&q=allinurl%3Aj2se%2F1+5+0%2Fdocs%2Fapi+{FNAME}' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - /* Java does not use '::' */ - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => '(?|^&"\'])', - 'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-;"\'])' - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/javascript.php b/_piecrust/libs/Geshi/geshi/javascript.php deleted file mode 100644 index f250e50..0000000 --- a/_piecrust/libs/Geshi/geshi/javascript.php +++ /dev/null @@ -1,150 +0,0 @@ - 'Javascript', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - //Regular Expressions - 'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do', - 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item', - 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void', - 'while', 'write', 'with' - ), - 2 => array( - 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false', - 'function', 'import', 'namespace', 'new', 'null', 'package', 'private', - 'protected', 'public', 'super', 'true', 'use', 'var' - ), - 3 => array( - // common functions for Window object - 'alert', 'back', 'blur', 'close', 'confirm', 'focus', 'forward', 'home', - 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove', - 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'status', - 'stop', - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', - '+', '-', '*', '/', '%', - '!', '@', '&', '|', '^', - '<', '>', '=', - ',', ';', '?', ':' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000066; font-weight: bold;', - 2 => 'color: #003366; font-weight: bold;', - 3 => 'color: #000066;' - ), - 'COMMENTS' => array( - 1 => 'color: #006600; font-style: italic;', - 2 => 'color: #009966; font-style: italic;', - 'MULTI' => 'color: #006600; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #3366CC;' - ), - 'NUMBERS' => array( - 0 => 'color: #CC0000;' - ), - 'METHODS' => array( - 1 => 'color: #660066;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - 3 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - 0 => array( - '' - ), - 1 => array( - '' - ) - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - 1 => true - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/jquery.php b/_piecrust/libs/Geshi/geshi/jquery.php deleted file mode 100644 index bd7cd5c..0000000 --- a/_piecrust/libs/Geshi/geshi/jquery.php +++ /dev/null @@ -1,238 +0,0 @@ - 'jQuery', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - //Regular Expressions - 'COMMENT_REGEXP' => array(2 => "/(?<=[\\s^])s\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])m?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[gimsu]*(?=[\\s$\\.\\,\\;\\)])/iU"), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do', - 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item', - 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void', - 'while', 'write', 'with' - ), - 2 => array( - 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false', - 'function', 'import', 'namespace', 'new', 'null', 'package', 'private', - 'protected', 'public', 'super', 'true', 'use', 'var' - ), - 3 => array( - // common functions for Window object - 'alert', 'back', 'close', 'confirm', 'forward', 'home', - 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove', - 'onresize', 'onunload', 'open', 'print', 'prompt', 'status', - //'blur', 'focus', 'scroll', // Duplicate with kw9 - //'stop', //Duplicate with kw10 - ), - 4 => array( - // jQuery Core Functions - 'jQuery', 'each', 'size', 'length', 'selector', 'context', 'eq', - 'index', 'data', 'removeData', 'queue', 'dequeue', 'noConflict' - //'get', //Duplicate with kw11 - ), - 5 => array( - // jQuery Attribute Functions - 'attr', 'removeAttr', 'addClass', 'hasClass', 'removeClass', 'toggleClass', - 'html', 'text', 'val', - ), - 6 => array( - // jQuery Traversing Functions - 'filter', 'not', 'slice', 'add', 'children', 'closest', - 'contents', 'find', 'next', 'nextAll', 'parent', 'parents', - 'prev', 'prevAll', 'siblings', 'andSelf', 'end', - //'is', //Dup with kw1 - //'offsetParent', //Duplicate with kw8 - //'map', //Duplicate with kw12 - ), - 7 => array( - // jQuery Manipulation Functions - 'append', 'appendTo', 'prepend', 'prependTo', 'after', 'before', 'insertAfter', - 'insertBefore', 'wrap', 'wrapAll', 'wrapInner', 'replaceWith', 'replaceAll', - 'empty', 'remove', 'clone', - ), - 8 => array( - // jQuery CSS Functions - 'css', 'offset', 'offsetParent', 'position', 'scrollTop', 'scrollLeft', - 'height', 'width', 'innerHeight', 'innerWidth', 'outerHeight', 'outerWidth', - ), - 9 => array( - // jQuery Events Functions - 'ready', 'bind', 'one', 'trigger', 'triggerHandler', 'unbind', 'live', - 'die', 'hover', 'blur', 'change', 'click', 'dblclick', 'error', - 'focus', 'keydown', 'keypress', 'keyup', 'mousedown', 'mouseenter', - 'mouseleave', 'mousemove', 'mouseout', 'mouseover', 'mouseup', 'resize', - 'scroll', 'select', 'submit', 'unload', - //'toggle', //Duplicate with kw10 - //'load', //Duplicate with kw11 - ), - 10 => array( - // jQuery Effects Functions - 'show', 'hide', 'toggle', 'slideDown', 'slideUp', 'slideToggle', 'fadeIn', - 'fadeOut', 'fadeTo', 'animate', 'stop', - ), - 11 => array( - // jQuery Ajax Functions - 'ajax', 'load', 'get', 'getJSON', 'getScript', 'post', 'ajaxComplete', - 'ajaxError', 'ajaxSend', 'ajaxStart', 'ajaxStop', 'ajaxSuccess', 'ajaxSetup', - 'serialize', 'serializeArray', - ), - 12 => array( - // jQuery Utility Functions - 'support', 'browser', 'version', 'boxModal', 'extend', 'grep', 'makeArray', - 'map', 'inArray', 'merge', 'unique', 'isArray', 'isFunction', 'trim', - 'param', - ), - ), - 'SYMBOLS' => array( - 0 => array( - '(', ')', '[', ']', '{', '}', - '+', '-', '*', '/', '%', - '!', '@', '&', '|', '^', - '<', '>', '=', - ',', ';', '?', ':' - ), - 1 => array( - '$' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false, - 7 => false, - 8 => false, - 9 => false, - 10 => false, - 11 => false, - 12 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000066; font-weight: bold;', - 2 => 'color: #003366; font-weight: bold;', - 3 => 'color: #000066;', - 4 => 'color: #000066;', - 5 => 'color: #000066;', - 6 => 'color: #000066;', - 7 => 'color: #000066;', - 8 => 'color: #000066;', - 9 => 'color: #000066;', - 10 => 'color: #000066;', - 11 => 'color: #000066;', - 12 => 'color: #000066;' - ), - 'COMMENTS' => array( - 1 => 'color: #006600; font-style: italic;', - 2 => 'color: #009966; font-style: italic;', - 'MULTI' => 'color: #006600; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #3366CC;' - ), - 'NUMBERS' => array( - 0 => 'color: #CC0000;' - ), - 'METHODS' => array( - 1 => 'color: #660066;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;', - 1 => 'color: #000066;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - 3 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => 'http://docs.jquery.com/Core/{FNAME}', - 5 => 'http://docs.jquery.com/Attributes/{FNAME}', - 6 => 'http://docs.jquery.com/Traversing/{FNAME}', - 7 => 'http://docs.jquery.com/Manipulation/{FNAME}', - 8 => 'http://docs.jquery.com/CSS/{FNAME}', - 9 => 'http://docs.jquery.com/Events/{FNAME}', - 10 => 'http://docs.jquery.com/Effects/{FNAME}', - 11 => 'http://docs.jquery.com/Ajax/{FNAME}', - 12 => 'http://docs.jquery.com/Utilities/{FNAME}' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - 0 => array( - '' - ), - 1 => array( - '' - ) - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - 1 => true - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/kixtart.php b/_piecrust/libs/Geshi/geshi/kixtart.php deleted file mode 100644 index e2d7174..0000000 --- a/_piecrust/libs/Geshi/geshi/kixtart.php +++ /dev/null @@ -1,329 +0,0 @@ - 'KiXtart', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'While', 'Loop', - 'Use', - 'Small', - 'Sleep', - 'Shell', - 'SetTime', - 'SetM', - 'SetL', - 'Set', - 'Select', 'Case', - 'Run', - 'Return', - 'Redim', - 'RD', - 'Quit', - 'Play', - 'Move', - 'MD', - 'Include', - 'If', 'Else', 'Endif', - 'GoTo', - 'GoSub', - 'Go', - 'Global', - 'GetS', - 'Get', - 'Function', 'Endfunction', - 'For', 'Next', - 'Each', - 'FlushKb', - 'Exit', - 'Do', 'Until', - 'Display', - 'Dim', - 'Del', - 'Debug', - 'Copy', - 'Cookie1', - 'Color', - 'CLS', - 'CD', - 'Call', - 'Break', - 'Big', - 'Beep', - ), - 2 => array( - '@Address', - '@Build', - '@Color', - '@Comment', - '@CPU', - '@CRLF', - '@CSD', - '@CurDir', - '@Date', - '@Day', - '@Domain', - '@DOS', - '@Error', - '@FullName', - '@HomeDir', - '@HomeDrive', - '@HomeShr', - '@HostName', - '@InWin', - '@IPaddressX', - '@KiX', - '@LanRoot', - '@LDomain', - '@LDrive', - '@LM', - '@LogonMode', - '@LongHomeDir', - '@LServer', - '@MaxPWAge', - '@MDayNo', - '@MHz', - '@MonthNo', - '@Month', - '@MSecs', - '@OnWoW64', - '@PID', - '@PrimaryGroup', - '@Priv', - '@ProductSuite', - '@ProductType', - '@PWAge', - '@RAS', - '@Result', - '@RServer', - '@ScriptDir', - '@ScriptExe', - '@ScriptName', - '@SError', - '@SID', - '@Site', - '@StartDir', - '@SysLang', - '@Ticks', - '@Time', - '@TsSession', - '@UserID', - '@UserLang', - '@WDayNo', - '@Wksta', - '@WUserID', - '@YDayNo', - '@Year', - ), - 3 => array( - 'WriteValue', - 'WriteProfileString', - 'WriteLine', - 'VarTypeName', - 'VarType', - 'Val', - 'UnloadHive', - 'UCase', - 'Ubound', - 'Trim', - 'Substr', - 'SRnd', - 'Split', - 'SidToName', - 'ShutDown', - 'ShowProgramGroup', - 'SetWallpaper', - 'SetTitle', - 'SetSystemState', - 'SetOption', - 'SetFocus', - 'SetFileAttr', - 'SetDefaultPrinter', - 'SetConsole', - 'SetAscii', - 'SendMessage', - 'SendKeys', - 'SaveKey', - 'RTrim', - 'Round', - 'Rnd', - 'Right', - 'RedirectOutput', - 'ReadValue', - 'ReadType', - 'ReadProfileString', - 'ReadLine', - 'Open', - 'MessageBox', - 'MemorySize', - 'LTrim', - 'Logoff', - 'LogEvent', - 'LoadKey', - 'LoadHive', - 'Len', - 'Left', - 'LCase', - 'KeyExist', - 'KbHit', - 'Join', - 'IsDeclared', - 'Int', - 'InStrRev', - 'InStr', - 'InGroup', - 'IIF', - 'GetObject', - 'GetFileVersion', - 'GetFileTime', - 'GetFileSize', - 'GetFileAttr', - 'GetDiskSpace', - 'FreeFileHandle', - 'FormatNumber', - 'Fix', - 'ExpandEnvironmentVars', - 'Exist', - 'Execute', - 'EnumValue', - 'EnumLocalGroup', - 'EnumKey', - 'EnumIpInfo', - 'EnumGroup', - 'Dir', - 'DelValue', - 'DelTree', - 'DelProgramItem', - 'DelProgramGroup', - 'DelPrinterConnection', - 'DelKey', - 'DecToHex', - 'CStr', - 'CreateObject', - 'CompareFileTimes', - 'Close', - 'ClearEventLog', - 'CInt', - 'Chr', - 'CDbl', - 'Box', - 'BackupEventLog', - 'At', - 'AScan', - 'Asc', - 'AddProgramItem', - 'AddProgramGroup', - 'AddPrinterConnection', - 'AddKey', - 'Abs' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '?', ':', '+', '-', '*', '/', '&', '|', '^', '~', '<', '>', '=' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #000066;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => 'http://www.kixtart.org/manual/Commands/{FNAMEL}.htm', - 2 => '', - 3 => 'http://www.kixtart.org/manual/Functions/{FNAMEL}.htm' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - 1 => true, - 2 => true, - 3 => true - ), - 'TAB_WIDTH' => 4 -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/klonec.php b/_piecrust/libs/Geshi/geshi/klonec.php deleted file mode 100644 index 9a33499..0000000 --- a/_piecrust/libs/Geshi/geshi/klonec.php +++ /dev/null @@ -1,282 +0,0 @@ - 'KLone C', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),//#pour precede les include de C - 'COMMENT_MULTI' => array('/*' => '*/', '' ),//comentaires C et KLone suivi de ceux pour HTML - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array(//mots-cles C - 'if', 'return', 'while', 'case', 'class', 'continue', 'default', - 'do', 'else', 'for', 'switch', 'goto', - 'null', 'break', 'true', 'enum', 'extern', 'inline', 'false' - ), - 2 => array(//mots-cles KLone - 'out', 'request', 'response', - ), - 3 => array(//fonctions C usuelles - 'printf', 'malloc', 'fopen', 'fclose', 'free', 'fputs', 'fgets', 'feof', 'fwrite', - 'perror', 'ferror', 'qsort', 'stats', 'sscanf', 'scanf', - 'strdup', 'strcpy', 'strcmp', 'strncpy', 'strcasecmp', 'cat', 'strcat', 'strstr', - 'strlen', 'strtof', 'strtod', 'strtok', 'towlower', 'towupper', - 'cd', 'system', 'exit', 'exec', 'fork', 'vfork', 'kill', 'signal', 'syslog', - 'usleep', 'utime', 'wait', 'waitpid', 'waitid', - 'ceil', 'eval', 'round', 'floor', - 'atoi', 'atol', 'abs', 'cos', 'sin', 'tan', 'acos', 'asin', 'atan', 'exp', - 'time', 'ctime', 'localtime', 'asctime', 'gmtime', 'difftime', 'date' - ), - 4 => array(//fonctions KLone usuelles - 'request_get_cookies', 'request_get_cookie', 'request_get_args', 'request_get_arg', - 'request_io', 'request_get_uri', 'request_get_filename', 'request_get_query_string', 'request_get_path_info', - 'request_get_if_modified_since', 'request_get_http', 'request_get_client_request', - 'request_get_content_length', 'request_get_uploads', 'request_get_uploaded_file', - 'request_get_method', 'request_get_protocol', 'request_get_resolved_filename', - 'request_get_resolved_path_info', 'request_get_addr', 'request_get_peer_addr', - 'request_get_header', 'request_get_field', 'request_get_field_value', - 'response_set_content_encoding', 'response_disable_caching', 'response_enable_caching', - 'response_set_cookie', 'response_set_method', 'response_get_method', - 'response_print_header', 'response_set_field', 'response_del_field', - 'response_set_content_type', 'response_set_date', 'response_set_last_modified', - 'response_set_content_length', 'response_get_status', 'response_get_header', - 'response_io', 'response_redirect', 'response_set_status', - 'session_get_vars', 'session_get', 'session_set', 'session_age', 'session_clean', 'session_del', - 'io_type', 'io_pipe', 'io_dup', 'io_copy', 'io_seek', 'io_tell', 'io_close', - 'io_free', 'io_read', 'io_printf', 'io_flush', 'io_write', 'io_putc', 'io_getc', - 'io_get_until', 'io_gets', 'io_codec_add_head', 'io_codec_add_tail', - 'io_codecs_remove', 'io_name_set', 'io_name_get' - ), - 5 => array(//types C - 'auto', 'char', 'const', 'double', 'float', 'int', 'long', - 'register', 'short', 'signed', 'sizeof', 'static', 'string', 'struct', - 'typedef', 'union', 'unsigned', 'void', 'volatile', - 'wchar_t', 'time_t', 'FILE' - ), - 6 => array(//mots-cles HTML - 'a', 'abbr', 'acronym', 'address', 'applet', - - 'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b', - - 'caption', 'center', 'cite', 'code', 'colgroup', 'col', - - 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', - - 'em', - - 'fieldset', 'font', 'form', 'frame', 'frameset', - - 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', - - 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i', - - 'kbd', - - 'label', 'legend', 'link', 'li', - - 'map', 'meta', - - 'noframes', 'noscript', - - 'object', 'ol', 'optgroup', 'option', - - 'param', 'pre', 'p', - - 'q', - - 'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's', - - 'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt', - - 'ul', 'u', - - 'var', - ), - 7 => array(//autres mots-cles HTML - 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', - 'background', 'bgcolor', 'border', - 'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', - 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', - 'enctype', - 'face', 'for', 'frame', 'frameborder', - 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', - 'id', 'ismap', - 'label', 'lang', 'language', 'link', 'longdesc', - 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', - 'name', 'nohref', 'noresize', 'noshade', 'nowrap', - 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload', - 'profile', 'prompt', - 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', - 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', - 'tabindex', 'target', 'text', 'title', 'type', - 'usemap', - 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace', - 'width' - ) - ), - 'SYMBOLS' => array( - 1 => array( - '<%=', '<%!', '<%', '%>' - ), - 0 => array( - '(', ')', '[', ']', '{', '}', - '!', '%', '&', '|', '/', - '<', '>', - '=', '-', '+', '*', - '.', ':', ',', ';', '^' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false, - 7 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100; font-weight: bold;',//pour les mots-cles C - 2 => 'color: #000000; font-weight: bold;',//pour les mots-cles KLone - 3 => 'color: #6600FF;',//pour les fonctions C - 4 => 'color: #6600FF;',//pour les fonctions Klone - 5 => 'color: #0099FF; font-weight: bold;',//pour les types C - 6 => 'color: #990099; font-weight: bold;',//pour les mots-cles HTML - 7 => 'color: #000066;'//pour les autres mots-cles HTML - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;',//commentaire sur une ligne C et KLone - 2 => 'color: #339933;',//pour les #... en C - 'MULTI' => 'color: #808080; font-style: italic;'//commentaire sur plusieurs lignes C et KLone - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #000000;', - 1 => 'color: #000000; font-weight: bold;' - ), - 'REGEXPS' => array(), - 'SCRIPT' => array( - 0 => 'background-color:#ffccff; font-weight: bold; color:#000000;', - 1 => '', - 2 => '', - 3 => 'color: #00bbdd; font-weight: bold;', - 4 => 'color: #ddbb00;', - 5 => 'color: #009900;' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html', - 4 => 'http://www.koanlogic.com/klone/api/html/globals.html', - 5 => '', - 6 => 'http://december.com/html/4/element/{FNAMEL}.html', - 7 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.', - 2 => '::' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, - 'SCRIPT_DELIMITERS' => array( - //delimiteurs pour KLone - 0 => array( - '<%=' => '%>' - ), - 1 => array( - '<%!' => '%>' - ), - 2 => array( - '<%' => '%>' - ), - //delimiteur pour HTML - 3 => array( - ' '>' - ), - 4 => array( - '&' => ';' - ), - 5 => array( - '<' => '>' - ) - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => false, - 1 => true, - 2 => true, - 3 => false, - 4 => false, - 5 => true - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 6 => array( - 'DISALLOWED_BEFORE' => '(?<=<|<\/)', - 'DISALLOWED_AFTER' => '(?=\s|\/|>)', - ), - 7 => array( - 'DISALLOWED_AFTER' => '(?=\s*=)', - ) - ) - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/klonecpp.php b/_piecrust/libs/Geshi/geshi/klonecpp.php deleted file mode 100644 index 9018b78..0000000 --- a/_piecrust/libs/Geshi/geshi/klonecpp.php +++ /dev/null @@ -1,310 +0,0 @@ - 'KLone C++', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),//#pour precede les include de C - 'COMMENT_MULTI' => array('/*' => '*/', '' ),//comentaires C et KLone suivi de ceux pour HTML - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array(//mots-cles C++ - 'if', 'return', 'while', 'case', 'continue', 'default', - 'do', 'else', 'for', 'switch', 'goto', - 'break', 'true', 'enum', 'extern', 'inline', 'false', - 'errno', 'stdin', 'stdout', 'stderr', - 'virtual', 'public', 'private', 'protected', 'template', 'using', 'namespace', - 'try', 'catch', 'dynamic_cast', 'const_cast', 'reinterpret_cast', - 'static_cast', 'explicit', 'friend', 'typename', 'typeid', 'class', - 'EDOM', 'ERANGE', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_DIG', 'DBL_DIG', 'LDBL_DIG', - 'FLT_EPSILON', 'DBL_EPSILON', 'LDBL_EPSILON', 'FLT_MANT_DIG', 'DBL_MANT_DIG', - 'LDBL_MANT_DIG', 'FLT_MAX', 'DBL_MAX', 'LDBL_MAX', 'FLT_MAX_EXP', 'DBL_MAX_EXP', - 'LDBL_MAX_EXP', 'FLT_MIN', 'DBL_MIN', 'LDBL_MIN', 'FLT_MIN_EXP', 'DBL_MIN_EXP', - 'LDBL_MIN_EXP', 'CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'SCHAR_MAX', 'SCHAR_MIN', - 'UCHAR_MAX', 'SHRT_MAX', 'SHRT_MIN', 'USHRT_MAX', 'INT_MAX', 'INT_MIN', - 'UINT_MAX', 'LONG_MAX', 'LONG_MIN', 'ULONG_MAX', 'HUGE_VAL', 'SIGABRT', - 'SIGFPE', 'SIGILL', 'SIGINT', 'SIGSEGV', 'SIGTERM', 'SIG_DFL', 'SIG_ERR', - 'SIG_IGN', 'BUFSIZ', 'EOF', 'FILENAME_MAX', 'FOPEN_MAX', 'L_tmpnam', 'NULL', - 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', - 'EXIT_FAILURE', 'EXIT_SUCCESS', 'RAND_MAX', 'CLOCKS_PER_SEC' - ), - 2 => array(//mots-cles KLone - 'out', 'request', 'response', - ), - 3 => array(//fonctions C++ usuelles - 'cin', 'cerr', 'clog', 'cout', 'delete', 'new', 'this', - 'printf', 'fprintf', 'snprintf', 'sprintf', 'assert', - 'isalnum', 'isalpha', 'isdigit', 'iscntrl', 'isgraph', 'islower', 'isprint', - 'ispunct', 'isspace', 'isupper', 'isxdigit', 'tolower', 'toupper', - 'exp', 'log', 'log10', 'pow', 'sqrt', 'ceil', 'floor', 'fabs', 'ldexp', - 'frexp', 'modf', 'fmod', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2', - 'sinh', 'cosh', 'tanh', 'setjmp', 'longjmp', - 'va_start', 'va_arg', 'va_end', 'offsetof', 'sizeof', 'fopen', 'freopen', - 'fflush', 'fclose', 'remove', 'rename', 'tmpfile', 'tmpname', 'setvbuf', - 'setbuf', 'vfprintf', 'vprintf', 'vsprintf', 'fscanf', 'scanf', 'sscanf', - 'fgetc', 'fgets', 'fputc', 'fputs', 'getc', 'getchar', 'gets', 'putc', - 'putchar', 'puts', 'ungetc', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind', - 'fgetpos', 'fsetpos', 'clearerr', 'feof', 'ferror', 'perror', 'abs', 'labs', - 'div', 'ldiv', 'atof', 'atoi', 'atol', 'strtod', 'strtol', 'strtoul', 'calloc', - 'malloc', 'realloc', 'free', 'abort', 'exit', 'atexit', 'system', 'getenv', - 'bsearch', 'qsort', 'rand', 'srand', 'strcpy', 'strncpy', 'strcat', 'strncat', - 'strcmp', 'strncmp', 'strcoll', 'strchr', 'strrchr', 'strspn', 'strcspn', - 'strpbrk', 'strstr', 'strlen', 'strerror', 'strtok', 'strxfrm', 'memcpy', - 'memmove', 'memcmp', 'memchr', 'memset', 'clock', 'time', 'difftime', 'mktime', - 'asctime', 'ctime', 'gmtime', 'localtime', 'strftime' - ), - 4 => array(//fonctions KLone usuelles - 'request_get_cookies', 'request_get_cookie', 'request_get_args', 'request_get_arg', - 'request_io', 'request_get_uri', 'request_get_filename', 'request_get_query_string', 'request_get_path_info', - 'request_get_if_modified_since', 'request_get_http', 'request_get_client_request', - 'request_get_content_length', 'request_get_uploads', 'request_get_uploaded_file', - 'request_get_method', 'request_get_protocol', 'request_get_resolved_filename', - 'request_get_resolved_path_info', 'request_get_addr', 'request_get_peer_addr', - 'request_get_header', 'request_get_field', 'request_get_field_value', - 'response_set_content_encoding', 'response_disable_caching', 'response_enable_caching', - 'response_set_cookie', 'response_set_method', 'response_get_method', - 'response_print_header', 'response_set_field', 'response_del_field', - 'response_set_content_type', 'response_set_date', 'response_set_last_modified', - 'response_set_content_length', 'response_get_status', 'response_get_header', - 'response_io', 'response_redirect', 'response_set_status', - 'session_get_vars', 'session_get', 'session_set', 'session_age', 'session_clean', 'session_del', - 'io_type', 'io_pipe', 'io_dup', 'io_copy', 'io_seek', 'io_tell', 'io_close', - 'io_free', 'io_read', 'io_printf', 'io_flush', 'io_write', 'io_putc', 'io_getc', - 'io_get_until', 'io_gets', 'io_codec_add_head', 'io_codec_add_tail', - 'io_codecs_remove', 'io_name_set', 'io_name_get' - ), - 5 => array(//types C++ - 'auto', 'bool', 'char', 'const', 'double', 'float', 'int', 'long', 'longint', - 'register', 'short', 'shortint', 'signed', 'static', 'struct', - 'typedef', 'union', 'unsigned', 'void', 'volatile', 'jmp_buf', - 'signal', 'raise', 'va_list', 'ptrdiff_t', 'size_t', 'FILE', 'fpos_t', - 'div_t', 'ldiv_t', 'clock_t', 'time_t', 'tm', - 'string', 'wchar_t' - ), - 6 => array(//mots-cles HTML - 'a', 'abbr', 'acronym', 'address', 'applet', - - 'base', 'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'b', - - 'caption', 'center', 'cite', 'code', 'colgroup', 'col', - - 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', - - 'em', - - 'fieldset', 'font', 'form', 'frame', 'frameset', - - 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', - - 'iframe', 'ilayer', 'img', 'input', 'ins', 'isindex', 'i', - - 'kbd', - - 'label', 'legend', 'link', 'li', - - 'map', 'meta', - - 'noframes', 'noscript', - - 'object', 'ol', 'optgroup', 'option', - - 'param', 'pre', 'p', - - 'q', - - 'samp', 'script', 'select', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 's', - - 'table', 'tbody', 'td', 'textarea', 'text', 'tfoot', 'thead', 'th', 'title', 'tr', 'tt', - - 'ul', 'u', - - 'var', - ), - 7 => array(//autres mots-cles HTML - 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis', - 'background', 'bgcolor', 'border', - 'cellpadding', 'cellspacing', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords', - 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled', - 'enctype', - 'face', 'for', 'frame', 'frameborder', - 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv', - 'id', 'ismap', - 'label', 'lang', 'language', 'link', 'longdesc', - 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple', - 'name', 'nohref', 'noresize', 'noshade', 'nowrap', - 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload', - 'profile', 'prompt', - 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules', - 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary', - 'tabindex', 'target', 'text', 'title', 'type', - 'usemap', - 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace', - 'width' - ) - ), - 'SYMBOLS' => array( - 1 => array( - '<%=', '<%!', '<%', '%>' - ), - 0 => array( - '(', ')', '[', ']', '{', '}', - '!', '%', '&', '|', '/', - '<', '>', - '=', '-', '+', '*', - '.', ':', ',', ';', '^' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false, - 7 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100; font-weight: bold;',//pour les mots-cles C++ - 2 => 'color: #000000; font-weight: bold;',//pour les mots-cles KLone - 3 => 'color: #6600FF;',//pour les fonctions C++ - 4 => 'color: #6600FF;',//pour les fonctions Klone - 5 => 'color: #0099FF; font-weight: bold;',//pour les types C++ - 6 => 'color: #990099; font-weight: bold;',//pour les mots-cles HTML - 7 => 'color: #000066;'//pour les autres mots-cles HTML - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;',//commentaire sur une ligne C++ et KLone - 2 => 'color: #339933;',//pour les #... en C++ - 'MULTI' => 'color: #808080; font-style: italic;'//commentaire sur plusieurs lignes C++ et KLone - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #000000;', - 1 => 'color: #000000; font-weight: bold;' - ), - 'REGEXPS' => array(), - 'SCRIPT' => array( - 0 => 'background-color:#ffccff; font-weight: bold; color:#000000;', - 1 => '', - 2 => '', - 3 => 'color: #00bbdd; font-weight: bold;', - 4 => 'color: #ddbb00;', - 5 => 'color: #009900;' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAMEL}.html', - 4 => 'http://www.koanlogic.com/klone/api/html/globals.html', - 5 => '', - 6 => 'http://december.com/html/4/element/{FNAMEL}.html', - 7 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.', - 2 => '::' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, - 'SCRIPT_DELIMITERS' => array( - //delimiteurs pour KLone - 0 => array( - '<%=' => '%>' - ), - 1 => array( - '<%!' => '%>' - ), - 2 => array( - '<%' => '%>' - ), - //delimiteur pour HTML - 3 => array( - ' '>' - ), - 4 => array( - '&' => ';' - ), - 5 => array( - '<' => '>' - ) - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => false, - 1 => true, - 2 => true, - 3 => false, - 4 => false, - 5 => true - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 6 => array( - 'DISALLOWED_BEFORE' => '(?<=<|<\/)', - 'DISALLOWED_AFTER' => '(?=\s|\/|>)', - ), - 7 => array( - 'DISALLOWED_AFTER' => '(?=\s*=)', - ) - ) - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/latex.php b/_piecrust/libs/Geshi/geshi/latex.php deleted file mode 100644 index 51ca73f..0000000 --- a/_piecrust/libs/Geshi/geshi/latex.php +++ /dev/null @@ -1,223 +0,0 @@ - 'LaTeX', - 'COMMENT_SINGLE' => array( - 1 => '%' - ), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'addlinespace','and','address','appendix','author','backmatter', - 'bfseries','bibitem','bigskip','blindtext','caption','captionabove', - 'captionbelow','cdot','centering','chapter','cite','color', - 'colorbox','date','dedication','def','definecolor','documentclass', - 'edef','else','email','emph','eqref','extratitle','fbox','fi', - 'flushleft','flushright','footnote','frac','frontmatter', - 'graphicspath','hfill','hline','hspace','huge','ifx','include', - 'includegraphics','infty','input','int','item','itemsep', - 'KOMAoption','KOMAoptions','label','LaTeX','left','let','limits', - 'listfiles','listoffigures','listoftables','lowertitleback', - 'mainmatter','makeatletter','makeatother','makebox','makeindex', - 'maketitle','mbox','mediumskip','newcommand','newenvironment', - 'newpage','nocite','nonumber','pagestyle','par','paragraph', - 'parbox','parident','parskip','partial','publishers','raggedleft', - 'raggedright','raisebox','ref','renewcommand','renewenvironment', - 'right','rule','section','setlength','sffamily','subject', - 'subparagraph','subsection','subsubsection','subtitle','sum', - 'table','tableofcontents','textbf','textcolor','textit', - 'textnormal','textsuperscript','texttt','textwidth','thanks','title', - 'titlehead','today','ttfamily','uppertitleback','urlstyle', - 'usepackage','vspace' - ) - ), - 'SYMBOLS' => array( - "&", "\\", "{", "}", "[", "]" - ), - 'CASE_SENSITIVE' => array( - 1 => true, - GESHI_COMMENTS => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #800000;', - ), - 'COMMENTS' => array( - 1 => 'color: #2C922C; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000000; font-weight: bold;' - ), - 'BRACKETS' => array( - ), - 'STRINGS' => array( - 0 => 'color: #000000;' - ), - 'NUMBERS' => array( - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #E02020; ' - ), - 'REGEXPS' => array( - 1 => 'color: #8020E0; font-weight: normal;', // Math inner - 2 => 'color: #C08020; font-weight: normal;', // [Option] - 3 => 'color: #8020E0; font-weight: normal;', // Maths - 4 => 'color: #800000; font-weight: normal;', // Structure: Labels - 5 => 'color: #00008B; font-weight: bold;', // Structure (\section{->x<-}) - 6 => 'color: #800000; font-weight: normal;', // Structure (\section) - 7 => 'color: #0000D0; font-weight: normal;', // Environment \end or \begin{->x<-} (brighter blue) - 8 => 'color: #C00000; font-weight: normal;', // Structure \end or \begin - 9 => 'color: #2020C0; font-weight: normal;', // {...} - 10 => 'color: #800000; font-weight: normal;', // \%, \& etc. - 11 => 'color: #E00000; font-weight: normal;', // \@keyword - 12 => 'color: #800000; font-weight: normal;', // \keyword - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => 'http://www.golatex.de/wiki/index.php?title=%5C{FNAME}', - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - // Math inner - 1 => array( - GESHI_SEARCH => "(\\\\begin\\{(equation|displaymath|eqnarray|subeqnarray|math|multline|gather|align|alignat|flalign)\\})(.*)(\\\\end\\{\\2\\})", - GESHI_REPLACE => '\3', - GESHI_MODIFIERS => 'Us', - GESHI_BEFORE => '\1', - GESHI_AFTER => '\4' - ), - // [options] - 2 => array( - GESHI_SEARCH => "(?<=\[).*(?=\])", - GESHI_REPLACE => '\0', - GESHI_MODIFIERS => 'Us', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - // Math mode with $ ... $ - 3 => array( - GESHI_SEARCH => "\\$.+\\$", - GESHI_REPLACE => '\0', - GESHI_MODIFIERS => 'Us', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - // Structure: Label - 4 => "\\\\(?:label|pageref|ref|cite)(?=[^a-zA-Z])", - // Structure: sections - 5 => array( - GESHI_SEARCH => "(\\\\(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph|addpart|addchap|addsec)\*?\\{)(.*)(?=\\})", - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'U', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ), - // Structure: sections - 6 => "\\\\(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph|addpart|addchap|addsec)\*?(?=[^a-zA-Z])", - // environment \begin{} and \end{} (i.e. the things inside the {}) - 7 => array( - GESHI_SEARCH => "(\\\\(?:begin|end)\\{)(.*)(?=\\})", - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'U', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ), - // Structure \begin and \end - 8 => "\\\\(?:end|begin)(?=[^a-zA-Z])", - // {parameters} - 9 => array( - GESHI_SEARCH => "(?<=\\{)(?!<\|!REG3XP5!>).*(?=\\})", - GESHI_REPLACE => '\0', - GESHI_MODIFIERS => 'Us', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - // \%, \& usw. - 10 => "\\\\(?:[_$%]|&)", - // \@keywords - 11 => "(?)\\\\@[a-zA-Z]+\*?", - // \keywords - 12 => "(?)\\\\[a-zA-Z]+\*?", - -// --------------------------------------------- - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'COMMENTS' => array( - 'DISALLOWED_BEFORE' => '\\' - ), - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "(?<=\\\\)", - 'DISALLOWED_AFTER' => "(?![A-Za-z0-9])" - ), - 'ENABLE_FLAGS' => array( - 'NUMBERS' => GESHI_NEVER, - 'BRACKETS' => GESHI_NEVER - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/lb.php b/_piecrust/libs/Geshi/geshi/lb.php deleted file mode 100644 index 6c93268..0000000 --- a/_piecrust/libs/Geshi/geshi/lb.php +++ /dev/null @@ -1,158 +0,0 @@ - 'Liberty BASIC', - 'COMMENT_SINGLE' => array(1 => '\''), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'and', 'append', 'as', 'beep', 'bmpbutton', 'bmpsave', 'boolean', - 'button', 'byref', 'call', 'callback', 'calldll', 'callfn', 'case', - 'checkbox', 'close', 'cls', 'colordialog', 'combobox', 'confirm', - 'cursor', 'data', 'dialog', 'dim', 'dll', 'do', 'double', 'dump', - 'dword', 'else', 'end', 'error', 'exit', 'field', 'filedialog', - 'files', 'fontdialog', 'for', 'function', 'get', 'gettrim', - 'global', 'gosub', 'goto', 'graphicbox', 'graphics', 'groupbox', - 'if', 'input', 'kill', 'let', 'line', 'listbox', 'loadbmp', - 'locate', 'long', 'loop', 'lprint', 'mainwin', 'maphandle', 'menu', - 'mod', 'name', 'next', 'nomainwin', 'none', 'notice', 'on', - 'oncomerror', 'or', 'open', 'out', 'output', 'password', 'playmidi', - 'playwave', 'popupmenu', 'print', 'printerdialog', 'prompt', 'ptr', - 'put', 'radiobutton', 'random', 'randomize', 'read', 'readjoystick', - 'redim', 'rem', 'restore', 'resume', 'return', 'run', 'scan', - 'seek', 'select', 'short', 'sort', 'statictext', 'stop', 'stopmidi', - 'struct', 'stylebits', 'sub', 'text', 'textbox', 'texteditor', - 'then', 'timer', 'titlebar', 'to', 'trace', 'ulong', 'unloadbmp', - 'until', 'ushort', 'void', 'wait', 'window', 'wend', 'while', - 'word', 'xor' - ), - 2 => array( - 'abs', 'acs', 'asc', 'asn', 'atn', 'chr$', 'cos', 'date$', - 'dechex$', 'eof', 'eval', 'eval$', 'exp', 'hbmp', 'hexdec', 'hwnd', - 'inp', 'input$', 'inputto$', 'instr', 'int', 'left$', 'len', 'lof', - 'log', 'lower$', 'max', 'midipos', 'mid$', 'min', 'mkdir', 'not', - 'right$', 'rmdir', 'rnd', 'sin', 'space$', 'sqr', 'str$', 'tab', - 'tan', 'time$', 'trim$', 'txcount', 'upper$', 'using', 'val', - 'winstring', 'word$' - ), - 3 => array( - 'BackgroundColor$', 'ComboboxColor$', 'CommandLine$', 'DefaultDir$', - 'DisplayHeight', 'DisplayWidth', 'Drives$', 'Err', 'Err$', - 'ForegroundColor$', 'Inkey$', 'Joy1x', 'Joy1y', 'Joy1z', - 'Joy1button1', 'Joy1button2', 'Joy2x', 'Joy2y', 'Joy2z', - 'Joy2button1', 'Joy2button2', 'ListboxColor$', 'Platform$', - 'PrintCollate', 'PrintCopies', 'PrinterFont$', 'PrinterName$', - 'TextboxColor$', 'TexteditorColor$', 'Version$', 'WindowHeight', - 'WindowWidth', 'UpperLeftX', 'UpperLeftY' - ) - ), - 'SYMBOLS' => array( - 1 => array( - '(', ')', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', ':', ',', '#' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000FF;', - 2 => 'color: #AD0080;', - 3 => 'color: #008080;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #008000;' - ), - 'NUMBERS' => array( - 0 => 'color: #FF0000;', - ), - 'METHODS' => array( - 0 => 'color: #004000;' - ), - 'SYMBOLS' => array( - 1 => 'color: #339933;' - ), - 'REGEXPS' => array(), - 'SCRIPT' => array() - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 2 => array( - //In LB, the second keyword list is a list of built-in functions, - //and their names should not be highlighted unless being used - //as a function name. - 'DISALLOWED_AFTER' => '(?=\s*\()' - ) - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/lisp.php b/_piecrust/libs/Geshi/geshi/lisp.php deleted file mode 100644 index c80ce23..0000000 --- a/_piecrust/libs/Geshi/geshi/lisp.php +++ /dev/null @@ -1,144 +0,0 @@ - 'Lisp', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array(';|' => '|;'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'not','defun','princ','when', - 'eval','apply','funcall','quote','identity','function', - 'complement','backquote','lambda','set','setq','setf', - 'defmacro','gensym','make','symbol','intern', - 'name','value','plist','get', - 'getf','putprop','remprop','hash','array','aref', - 'car','cdr','caar','cadr','cdar','cddr','caaar','caadr','cadar', - 'caddr','cdaar','cdadr','cddar','cdddr','caaaar','caaadr', - 'caadar','caaddr','cadaar','cadadr','caddar','cadddr', - 'cdaaar','cdaadr','cdadar','cdaddr','cddaar','cddadr', - 'cdddar','cddddr','cons','list','append','reverse','last','nth', - 'nthcdr','member','assoc','subst','sublis','nsubst', - 'nsublis','remove','length', - 'mapc','mapcar','mapl','maplist','mapcan','mapcon','rplaca', - 'rplacd','nconc','delete','atom','symbolp','numberp', - 'boundp','null','listp','consp','minusp','zerop','plusp', - 'evenp','oddp','eq','eql','equal','cond','case','and','or', - 'let','l','if','prog','prog1','prog2','progn','go','return', - 'do','dolist','dotimes','catch','throw','error','cerror','break', - 'continue','errset','baktrace','evalhook','truncate','float', - 'rem','min','max','abs','sin','cos','tan','expt','exp','sqrt', - 'random','logand','logior','logxor','lognot','bignums','logeqv', - 'lognand','lognor','logorc2','logtest','logbitp','logcount', - 'integer','nil','parse-integer','make-list','print','write' - ) - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', - '!', '%', '^', '&', - ' + ',' - ',' * ',' / ', - '=','<','>', - '.',':',',',';', - '|' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 0 => 'color: #555;', - 1 => 'color: #555;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - '::', ':' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'OOLANG' => array( - 'MATCH_AFTER' => '[a-zA-Z][a-zA-Z0-9_\-]*' - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/locobasic.php b/_piecrust/libs/Geshi/geshi/locobasic.php deleted file mode 100644 index 1bc88c8..0000000 --- a/_piecrust/libs/Geshi/geshi/locobasic.php +++ /dev/null @@ -1,130 +0,0 @@ - 'Locomotive Basic', - 'COMMENT_SINGLE' => array(1 => "'", 2 => 'REM'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - "AFTER", "AND", "AUTO", "BORDER", "BREAK", "CALL", "CAT", "CHAIN", - "CLEAR", "CLG", "CLS", "CLOSEIN", "CLOSEOUT", "CONT", "CURSOR", - "DATA", "DEF", "DEFINT", "DEFREAL", "DEFSTR", "DEG", "DELETE", - "DERR", "DI", "DIM", "DRAW", "DRAWR", "EDIT", "EI", "ELSE", "END", - "ENV", "ENT", "EOF", "ERASE", "ERL", "ERR", "ERROR", "EVERY", - "FILL", "FN", "FOR", "FRAME", "GOSUB", "GOTO", "GRAPHICS", "HIMEM", - "IF", "INK", "INPUT", "KEY", "LET", "LINE", "LIST", "LOAD", - "LOCATE", "MASK", "MEMORY", "MERGE", "MODE", "MOVE", "MOVER", "NEW", - "NEXT", "NOT", "ON", "OPENIN", "OPENOUT", "OR", "ORIGIN", "PAPER", - "PEEK", "PEN", "PLOT", "PLOTR", "POKE", "PRINT", "RAD", "RANDOMIZE", - "READ", "RELEASE", "REMAIN", "RENUM", "RESTORE", "RESUME", "RETURN", - "RUN", "SAVE", "SPEED", "SOUND", "SPC", "SQ", "STEP", "STOP", "SWAP", - "SYMBOL", "TAB", "TAG", "TAGOFF", "TEST", "TESTR", "TIME", "TO", - "THEN", "TRON", "TROFF", "USING", "WAIT", "WEND", "WHILE", "WIDTH", - "WINDOW", "WRITE", "XOR", "ZONE" - ), - 2 => array( - "ABS", "ASC", "ATN", "BIN", "CHR", "CINT", "COPYCHR", "COS", - "CREAL", "DEC", "FIX", "FRE", "EXP", "HEX", "INKEY", "INP", "INSTR", - "INT", "JOY", "LEFT", "LEN", "LOG", "LOG10", "LOWER", "MAX", "MID", - "MIN", "MOD", "OUT", "PI", "POS", "RIGHT", "RND", "ROUND", "SGN", - "SIN", "SPACE", "SQR", "STR", "STRING", "TAN", "UNT", "UPPER", - "VAL", "VPOS", "XPOS", "YPOS" - ) - ), - 'SYMBOLS' => array( - '(', ')' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000088; font-weight: bold;', - 2 => 'color: #AA00AA; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080;', - 2 => 'color: #808080;' - ), - 'BRACKETS' => array( - 0 => 'color: #ff0000;' - ), - 'STRINGS' => array( - 0 => 'color: #008800;' - ), - 'NUMBERS' => array( - 0 => 'color: #0044ff;' - ), - 'METHODS' => array( - 0 => 'color: #66cc66;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/logtalk.php b/_piecrust/libs/Geshi/geshi/logtalk.php deleted file mode 100644 index 90355ff..0000000 --- a/_piecrust/libs/Geshi/geshi/logtalk.php +++ /dev/null @@ -1,330 +0,0 @@ - 'Logtalk', - 'COMMENT_SINGLE' => array(1 => '%'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array(2 => "/0'./sim"), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'"), - 'HARDQUOTE' => array('"', '"'), - 'HARDESCAPE' => array(), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array( - //Simple Single Char Escapes - 1 => "#\\\\[\\\\abfnrtv\'\"?\n]#i", - //Hexadecimal Char Specs - 2 => "#\\\\x[\da-fA-F]+\\\\#", - //Octal Char Specs - 3 => "#\\\\[0-7]+\\\\#" - ), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | - GESHI_NUMBER_BIN_PREFIX_0B | - GESHI_NUMBER_OCT_PREFIX_0O | - GESHI_NUMBER_HEX_PREFIX | - GESHI_NUMBER_FLT_NONSCI | - GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - // Directives (with arguments) - 1 => array( - // file directives - 'encoding', 'ensure_loaded', - // flag directives - 'set_logtalk_flag', 'set_prolog_flag', - // entity opening directives - 'category', 'object', 'protocol', - // predicate scope directives - 'private', 'protected', 'public', - // conditional compilation directives - 'elif', 'if', - // entity directives - 'calls', 'initialization', 'op', 'uses', - // predicate directives - 'alias', 'discontiguous', 'dynamic', 'mode', 'info', 'meta_predicate', 'multifile', 'synchronized', - // module directives - 'export', 'module', 'reexport', 'use_module' - ), - // Directives (no arguments) - 2 => array( - // entity directives - 'dynamic', - // multi-threading directives - 'synchronized', 'threaded', - // entity closing directives - 'end_category', 'end_object', 'end_protocol', - // conditional compilation directives - 'else', 'endif' - ), - // Entity relations - 3 => array( - 'complements', 'extends', 'imports', 'implements','instantiates', 'specializes' - ), - // Built-in predicates (with arguments) - 4 => array( - // event handlers - 'after', 'before', - // execution-context methods - 'parameter', 'self', 'sender', 'this', - // predicate reflection - 'current_predicate', 'predicate_property', - // DCGs and term expansion - 'expand_goal', 'expand_term', 'goal_expansion', 'phrase', 'term_expansion', - // entity - 'abolish_category', 'abolish_object', 'abolish_protocol', - 'create_category', 'create_object', 'create_protocol', - 'current_category', 'current_object', 'current_protocol', - 'category_property', 'object_property', 'protocol_property', - // entity relations - 'complements_object', - 'extends_category', 'extends_object', 'extends_protocol', - 'implements_protocol', 'imports_category', - 'instantiates_class', 'specializes_class', - // events - 'abolish_events', 'current_event', 'define_events', - // flags - 'current_logtalk_flag', 'set_logtalk_flag', - 'current_prolog_flag', 'set_prolog_flag', - // compiling, loading, and library path - 'logtalk_compile', 'logtalk_library_path', 'logtalk_load', - // database - 'abolish', 'asserta', 'assertz', 'clause', 'retract', 'retractall', - // control - 'call', 'catch', 'once', 'throw', - // all solutions predicates - 'bagof', 'findall', 'forall', 'setof', - // multi-threading meta-predicates - 'threaded', - 'threaded_call', 'threaded_once', 'threaded_ignore', 'threaded_exit', 'threaded_peek', - 'threaded_wait', 'threaded_notify', - // term unification - 'unify_with_occurs_check', - // atomic term processing - 'atom_chars', 'atom_codes', 'atom_concat', 'atom_length', - 'number_chars', 'number_codes', - 'char_code', - // term creation and decomposition - 'arg', 'copy_term', 'functor', - // term testing - 'atom', 'atomic', 'compound', 'float', 'integer', 'nonvar', 'number', 'sub_atom', 'var', - // stream selection and control - 'current_input', 'current_output', 'set_input', 'set_output', - 'open', 'close', 'flush_output', 'stream_property', - 'at_end_of_stream', 'set_stream_position', - // character and byte input/output predicates - 'get_byte', 'get_char', 'get_code', - 'peek_byte', 'peek_char', 'peek_code', - 'put_byte', 'put_char', 'put_code', - 'nl', - // term input/output predicates - 'current_op', 'op', - 'write', 'writeq', 'write_canonical', 'write_term', - 'read', 'read_term', - 'char_conversion', 'current_char_conversion', - // - 'halt' - ), - // Built-in predicates (no arguments) - 5 => array( - // control - 'fail', 'repeat', 'true', - // character and byte input/output predicates - 'nl', - // implementation defined hooks functions - 'halt', - // arithemtic evaluation - 'is', - // stream selection and control - 'at_end_of_stream', 'flush_output' - ), - // Evaluable functors (with arguments) - 6 => array( - 'float_integer_part', 'float_fractional_part', - 'rem', 'mod', 'abs', 'sign', 'floor', 'truncate', 'round', 'ceiling', - 'cos', 'atan', 'exp', 'log', 'sin', 'sqrt' - ), - // Evaluable functors (no arguments) - 7 => array( - 'mod', 'rem' - ), - ), - 'SYMBOLS' => array( - 0 => array( - // external call - '{', '}' - ), - 1 => array( - // arithemtic comparison - '=:=', '=\=', '<', '=<', '>=', '>', - // term comparison - '<<', '>>', '/\\', '\\/', '\\', - // bitwise functors - '==', '\==', '@<', '@=<', '@>=', '@>', - // evaluable functors - '+', '-', '*', '/', '**', - // logic and control - '!', '\\+', ';', - // message sending operators - '::', '^^', ':', - // grammar rule and conditional functors - '-->', '->', - // mode operators - '@', '?', - // term to list predicate - '=..', - // unification - '=', '\\=' - ), - 2 => array( - // clause and directive functors - ':-' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #2e4dc9;', - 2 => 'color: #2e4dc9;', - 3 => 'color: #2e4dc9;', - 4 => 'color: #9d4f37;', - 5 => 'color: #9d4f37;', - 6 => 'color: #9d4f37;', - 7 => 'color: #9d4f37;' - ), - 'NUMBERS' => array( - 0 => 'color: #430000;' - ), - 'COMMENTS' => array( - 1 => 'color: #60a0b0; font-style: italic;', - 2 => 'color: #430000;', - 'MULTI' => 'color: #60a0b0; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #9f0000; font-weight: bold;', - 1 => 'color: #9f0000; font-weight: bold;', - 2 => 'color: #9f0000; font-weight: bold;', - 3 => 'color: #9f0000; font-weight: bold;', - 'HARD' => '', - ), - 'SYMBOLS' => array( - 0 => 'color: #666666;font-weight: bold;', - 1 => 'color: #666666;font-weight: bold;', - 2 => 'color: #000000;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #9f0000;', - 'HARD' => 'color: #9f0000;' - ), - 'METHODS' => array( - ), - 'REGEXPS' => array( - 0 => 'color: #848484;' - ), - 'SCRIPT' => array() - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - 1 => '::' - ), - 'REGEXPS' => array( - // variables - 0 => '\b(?!(?:PIPE|SEMI|REG3XP\d*)[^a-zA-Z0-9_])[A-Z_][a-zA-Z0-9_]*(?![a-zA-Z0-9_])' - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'BRACKETS' => GESHI_NEVER - ), - 'KEYWORDS' => array( - 1 => array( - 'DISALLOWED_BEFORE' => '(?<=:-\s)', - 'DISALLOWED_AFTER' => '(?=\()' - ), - 2 => array( - 'DISALLOWED_BEFORE' => '(?<=:-\s)', - 'DISALLOWED_AFTER' => '(?=\.)' - ), - 3 => array( - 'DISALLOWED_BEFORE' => '(?|^&\'"])', - 'DISALLOWED_AFTER' => '(?=\()' - ), - 4 => array( - 'DISALLOWED_BEFORE' => '(?|^&\'"])', - 'DISALLOWED_AFTER' => '(?=\()' - ), - 5 => array( - 'DISALLOWED_BEFORE' => '(?|^&\'"])', - 'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-&\'"])' - ), - 6 => array( - 'DISALLOWED_BEFORE' => '(?|^&\'"])', - 'DISALLOWED_AFTER' => '(?=\()' - ), - 7 => array( - 'DISALLOWED_BEFORE' => '(?|^&\'"])', - 'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-&\'"])' - ) - ) - ), -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/lolcode.php b/_piecrust/libs/Geshi/geshi/lolcode.php deleted file mode 100644 index f161ff3..0000000 --- a/_piecrust/libs/Geshi/geshi/lolcode.php +++ /dev/null @@ -1,152 +0,0 @@ - 'LOLcode', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array( - 1 => "/\bBTW\b.*$/im", - 2 => "/(^|\b)(?:OBTW\b.+?\bTLDR|LOL\b.+?\/LOL)(\b|$)/si" - ), - 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array( - 1 => '/:[)>o":]/', - 2 => '/:\([\da-f]+\)/i', - 3 => '/:\{\w+\}/i', - 4 => '/:\[\w+\]/i', - ), - 'KEYWORDS' => array( - //Statements - 1 => array( - 'VISIBLE', 'HAI', 'KTHX', 'KTHXBYE', 'SMOOSH', 'GIMMEH', 'PLZ', - 'ON', 'INVISIBLE', 'R', 'ITZ', 'GTFO', 'COMPLAIN', 'GIMME', - - 'OPEN', 'FILE', 'I HAS A', 'AWSUM THX', 'O NOES', 'CAN', 'HAS', 'HAZ', - 'HOW DOES I', 'IF U SAY SO', 'FOUND YR', 'BORROW', 'OWN', 'ALONG', - 'WITH', 'WIT', 'LOOK', 'AT', 'AWSUM', 'THX' - ), - //Conditionals - 2 => array( - 'IZ', 'YARLY', 'NOWAI', 'WTF?', 'MEBBE', 'OMG', 'OMGWTF', - 'ORLY?', 'OF', 'NOPE', 'SO', 'IM', 'MAI', - - 'O RLY?', 'SUM', 'BOTH SAEM', 'DIFFRINT', 'BOTH', 'EITHER', 'WON', - 'DIFF', 'PRODUKT', 'QUOSHUNT', 'MOD', 'MKAY', 'OK', 'THING', - 'BIGNESS' - ), - //Repetition - 3 => array( - 'IN', 'OUTTA', 'LOOP', 'WHILE' - ), - //Operators \Math - 4 => array( - 'AN', 'AND', 'NOT', 'UP', 'YR', 'UPPIN', 'NERF', 'NERFIN', 'NERFZ', - 'SMASHING', 'UR', 'KINDA', 'LIKE', 'SAEM', 'BIG', 'SMALL', - 'BIGGR', 'SMALLR', 'BIGGER', 'SMALLER', 'GOOD', 'CUTE', 'THAN' - ) - ), - 'SYMBOLS' => array( - '.', ',', '?', - '!!' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #008000;', - 2 => 'color: #000080;', - 3 => 'color: #000080;', - 4 => 'color: #800000;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; style: italic;', - 2 => 'color: #666666; style: italic;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'ESCAPE_CHAR' => array( - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'SPACE_AS_WHITESPACE' => true - ) - ), - 'TAB_WIDTH' => 4 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/lotusformulas.php b/_piecrust/libs/Geshi/geshi/lotusformulas.php deleted file mode 100644 index 6542375..0000000 --- a/_piecrust/libs/Geshi/geshi/lotusformulas.php +++ /dev/null @@ -1,318 +0,0 @@ - 'Lotus Notes @Formulas', - 'COMMENT_SINGLE' => array(1 => "'"), - 'COMMENT_MULTI' => array('REM' => ';'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array ( - '[ZoomPreview]', '[WorkspaceStackReplicaIcons]', - '[WorkspaceProperties]', '[WindowWorkspace]', - '[WindowTile]', '[WindowRestore]', '[WindowNext]', - '[WindowMinimizeAll]', '[WindowMinimize]', '[WindowMaximizeAll]', - '[WindowMaximize]', '[WindowCascade]', '[ViewSwitchForm]', - '[ViewShowUnread]', '[ViewShowServerNames]', '[ViewShowSearchBar]', - '[ViewShowRuler]', '[ViewShowPageBreaks]', '[ViewShowOnlyUnread]', - '[ViewShowOnlySelected]', '[ViewShowOnlySearchResults]', - '[ViewShowOnlyCategories]', '[ViewShowObject]', - '[ViewShowFieldHelp]', '[ViewRenamePerson]', '[ViewRefreshUnread]', - '[ViewRefreshFields]', '[ViewNavigatorsNone]', - '[ViewNavigatorsFolders]', '[ViewMoveName]', '[ViewHorizScrollbar]', - '[ViewExpandWithChildren]', '[ViewExpandAll]', '[ViewExpand]', - '[ViewCollapseAll]', '[ViewCollapse]', '[ViewChange]', - '[ViewCertify]', '[ViewBesideFolders]', '[ViewBelowFolders]', - '[ViewArrangeIcons]', '[V3EditPrevField]', '[V3EditNextField]', - '[UserIDSwitch]', '[UserIDSetPassword]', '[UserIDMergeCopy]', - '[UserIDInfo]', '[UserIDEncryptionKeys]', '[UserIDCreateSafeCopy]', - '[UserIDClearPassword]', '[UserIDCertificates]', - '[ToolsUserLogoff]', '[ToolsSpellCheck]', '[ToolsSmartIcons]', - '[ToolsSetupUserSetup]', '[ToolsSetupPorts]', '[ToolsSetupMail]', - '[ToolsSetupLocation]', '[ToolsScanUnreadSelected]', - '[ToolsScanUnreadPreferred]', '[ToolsScanUnreadChoose]', - '[ToolsRunMacro]', '[ToolsRunBackgroundMacros]', '[ToolsReplicate]', - '[ToolsRefreshSelectedDocs]', '[ToolsRefreshAllDocs]', - '[ToolsMarkSelectedUnread]', '[ToolsMarkSelectedRead]', - '[ToolsMarkAllUnread]', '[ToolsMarkAllRead]', '[ToolsHangUp]', - '[ToolsCategorize]', '[ToolsCall]', '[TextUnderline]', - '[TextSpacingSingle]', '[TextSpacingOneAndaHalf]', - '[TextSpacingDouble]', '[TextSetFontSize]', '[TextSetFontFace]', - '[TextSetFontColor]', '[TextReduceFont]', '[TextPermanentPen]', - '[TextParagraphStyles]', '[TextParagraph]', '[TextOutdent]', - '[TextNumbers]', '[TextNormal]', '[TextItalic]', '[TextFont]', - '[TextEnlargeFont]', '[TextCycleSpacing]', '[TextBullet]', - '[TextBold]', '[TextAlignRight]', '[TextAlignNone]', - '[TextAlignLeft]', '[TextAlignFull]', '[TextAlignCenter]', - '[SwitchView]', '[SwitchForm]', '[StyleCycleKey]', - '[SmartIconsNextSet]', '[SmartIconsFloating]', '[ShowProperties]', - '[ShowHidePreviewPane]', '[ShowHideParentPreview]', - '[ShowHideLinkPreview]', '[ShowHideIMContactList]', - '[SetCurrentLocation]', '[SendInstantMessage]', - '[SectionRemoveHeader]', '[SectionProperties]', - '[SectionExpandAll]', '[SectionExpand]', '[SectionDefineEditors]', - '[SectionCollapseAll]', '[SectionCollapse]', '[RunScheduledAgents]', - '[RunAgent]', '[ReplicatorStop]', '[ReplicatorStart]', - '[ReplicatorSendReceiveMail]', '[ReplicatorSendMail]', - '[ReplicatorReplicateWithServer]', '[ReplicatorReplicateSelected]', - '[ReplicatorReplicateNext]', '[ReplicatorReplicateHigh]', - '[Replicator]', '[RenameDatabase]', '[RemoveFromFolder]', - '[RemoteDebugLotusScript]', '[ReloadWindow]', '[RefreshWindow]', - '[RefreshParentNote]', '[RefreshHideFormulas]', '[RefreshFrame]', - '[PublishDatabase]', '[PictureProperties]', '[PasteBitmapAsObject]', - '[PasteBitmapAsBackground]', '[OpenView]', '[OpenPage]', - '[OpenNavigator]', '[OpenInNewWindow]', '[OpenHelpDocument]', - '[OpenFrameset]', '[OpenDocument]', '[OpenCalendar]', - '[ObjectProperties]', '[ObjectOpen]', '[ObjectDisplayAs]', - '[NavPrevUnread]', '[NavPrevSelected]', '[NavPrevMain]', - '[NavPrev]', '[NavNextUnread]', '[NavNextSelected]', - '[NavNextMain]', '[NavNext]', '[NavigatorTest]', - '[NavigatorProperties]', '[NavigateToBacklink]', - '[NavigatePrevUnread]', '[NavigatePrevSelected]', - '[NavigatePrevMain]', '[NavigatePrevHighlight]', '[NavigatePrev]', - '[NavigateNextUnread]', '[NavigateNextSelected]', - '[NavigateNextMain]', '[NavigateNextHighlight]', '[NavigateNext]', - '[MoveToTrash]', '[MailSendPublicKey]', '[MailSendEncryptionKey]', - '[MailSendCertificateRequest]', '[MailSend]', '[MailScanUnread]', - '[MailRequestNewPublicKey]', '[MailRequestNewName]', - '[MailRequestCrossCert]', '[MailOpen]', '[MailForwardAsAttachment]', - '[MailForward]', '[MailComposeMemo]', '[MailAddress]', - '[LayoutProperties]', '[LayoutElementSendToBack]', - '[LayoutElementProperties]', '[LayoutElementBringToFront]', - '[LayoutAddText]', '[LayoutAddGraphic]', '[InsertSubform]', - '[HotspotProperties]', '[HotspotClear]', '[HelpUsingDatabase]', - '[HelpAboutNotes]', '[HelpAboutDatabase]', '[GoUpLevel]', - '[FormTestDocument]', '[FormActions]', '[FolderRename]', - '[FolderProperties]', '[FolderMove]', '[FolderExpandWithChildren]', - '[FolderExpandAll]', '[FolderExpand]', '[FolderDocuments]', - '[FolderCustomize]', '[FolderCollapse]', '[Folder]', - '[FindFreeTimeDialog]', '[FileSaveNewVersion]', '[FileSave]', - '[FilePrintSetup]', '[FilePrint]', '[FilePageSetup]', - '[FileOpenDBRepID]', '[FileOpenDatabase]', '[FileNewReplica]', - '[FileNewDatabase]', '[FileImport]', '[FileFullTextUpdate]', - '[FileFullTextInfo]', '[FileFullTextDelete]', - '[FileFullTextCreate]', '[FileExport]', '[FileExit]', - '[FileDatabaseUseServer]', '[FileDatabaseRemove]', - '[FileDatabaseInfo]', '[FileDatabaseDelete]', '[FileDatabaseCopy]', - '[FileDatabaseCompact]', '[FileDatabaseACL]', '[FileCloseWindow]', - '[ExitNotes]', '[Execute]', '[ExchangeUnreadMarks]', '[EmptyTrash]', - '[EditUp]', '[EditUntruncate]', '[EditUndo]', '[EditTop]', - '[EditTableInsertRowColumn]', '[EditTableFormat]', - '[EditTableDeleteRowColumn]', '[EditShowHideHiddenChars]', - '[EditSelectByDate]', '[EditSelectAll]', '[EditRight]', - '[EditRestoreDocument]', '[EditResizePicture]', - '[EditQuoteSelection]', '[EditProfileDocument]', '[EditProfile]', - '[EditPrevField]', '[EditPhoneNumbers]', '[EditPasteSpecial]', - '[EditPaste]', '[EditOpenLink]', '[EditNextField]', - '[EditMakeDocLink]', '[EditLocations]', '[EditLinks]', '[EditLeft]', - '[EditInsertText]', '[EditInsertTable]', '[EditInsertPopup]', - '[EditInsertPageBreak]', '[EditInsertObject]', - '[EditInsertFileAttachment]', '[EditInsertButton]', - '[EditIndentFirstLine]', '[EditIndent]', '[EditHorizScrollbar]', - '[EditHeaderFooter]', '[EditGotoField]', '[EditFindNext]', - '[EditFindInPreview]', '[EditFind]', '[EditEncryptionKeys]', - '[EditDown]', '[EditDocument]', '[EditDetach]', '[EditDeselectAll]', - '[EditCut]', '[EditCopy]', '[EditClear]', '[EditButton]', - '[EditBottom]', '[DiscoverFolders]', '[Directories]', - '[DialingRules]', '[DesignViewSelectFormula]', '[DesignViews]', - '[DesignViewNewColumn]', '[DesignViewFormFormula]', - '[DesignViewEditActions]', '[DesignViewColumnDef]', - '[DesignViewAttributes]', '[DesignViewAppendColumn]', - '[DesignSynopsis]', '[DesignSharedFields]', '[DesignReplace]', - '[DesignRefresh]', '[DesignMacros]', '[DesignIcon]', - '[DesignHelpUsingDocument]', '[DesignHelpAboutDocument]', - '[DesignFormWindowTitle]', '[DesignFormUseField]', - '[DesignFormShareField]', '[DesignForms]', '[DesignFormNewField]', - '[DesignFormFieldDef]', '[DesignFormAttributes]', - '[DesignDocumentInfo]', '[DebugLotusScript]', - '[DatabaseReplSettings]', '[DatabaseDelete]', '[CreateView]', - '[CreateTextbox]', '[CreateSubForm]', '[CreateSection]', - '[CreateRectangularHotspot]', '[CreateRectangle]', - '[CreatePolyline]', '[CreatePolygon]', '[CreateNavigator]', - '[CreateLayoutRegion]', '[CreateForm]', '[CreateFolder]', - '[CreateEllipse]', '[CreateControlledAccessSection]', - '[CreateAgent]', '[CreateAction]', '[CopySelectedAsTable]', - '[ComposeWithReference]', '[Compose]', '[CloseWindow]', '[Clear]', - '[ChooseFolders]', '[CalendarGoTo]', '[CalendarFormat]', - '[AttachmentView]', '[AttachmentProperties]', '[AttachmentLaunch]', - '[AttachmentDetachAll]', '[AgentTestRun]', '[AgentSetServerName]', - '[AgentRun]', '[AgentLog]', '[AgentEnableDisable]', '[AgentEdit]', - '[AdminTraceConnection]', '[AdminStatisticsConfig]', - '[AdminSendMailTrace]', '[AdminRemoteConsole]', - '[AdminRegisterUser]', '[AdminRegisterServer]', - '[AdminRegisterFromFile]', '[AdminOutgoingMail]', - '[AdminOpenUsersView]', '[AdminOpenStatistics]', - '[AdminOpenServersView]', '[AdminOpenServerLog]', - '[AdminOpenGroupsView]', '[AdminOpenCertLog]', '[AdminOpenCatalog]', - '[AdminOpenAddressBook]', '[AdminNewOrgUnit]', - '[AdminNewOrganization]', '[Administration]', - '[AdminIDFileSetPassword]', '[AdminIDFileExamine]', - '[AdminIDFileClearPassword]', '[AdminDatabaseQuotas]', - '[AdminDatabaseAnalysis]', '[AdminCrossCertifyKey]', - '[AdminCrossCertifyIDFile]', '[AdminCreateGroup]', '[AdminCertify]', - '[AddToIMContactList]', '[AddDatabaseRepID]', '[AddDatabase]', - '[AddBookmark]' - ), - 2 => array( - 'SELECT', 'FIELD', 'ENVIRONMENT', 'DEFAULT', '@Zone ', '@Yesterday', - '@Yes', '@Year', '@Word', '@Wide', '@While', '@Weekday', - '@WebDbName', '@ViewTitle', '@ViewShowThisUnread', '@Version', - '@VerifyPassword', '@ValidateInternetAddress', '@V4UserAccess', - '@V3UserName', '@V2If', '@UserRoles', '@UserPrivileges', - '@UserNamesList', '@UserNameLanguage', '@UserName', '@UserAccess', - '@UrlQueryString', '@URLOpen', '@URLHistory', '@URLGetHeader', - '@URLEncode', '@URLDecode', '@UpperCase', '@UpdateFormulaContext', - '@Unique', '@UndeleteDocument', '@Unavailable', '@True', '@Trim', - '@Transform', '@ToTime', '@ToNumber', '@Tomorrow', '@Today', - '@TimeZoneToText', '@TimeToTextInZone', '@TimeMerge', '@Time', - '@ThisValue', '@ThisName', '@TextToTime', '@TextToNumber', '@Text', - '@TemplateVersion', '@Tan', '@Sum', '@Success', '@Subset', - '@StatusBar', '@Sqrt', '@Soundex', '@Sort', '@Sin', '@Sign', - '@SetViewInfo', '@SetTargetFrame', '@SetProfileField', - '@SetHTTPHeader', '@SetField', '@SetEnvironment', '@SetDocField', - '@Set', '@ServerName', '@ServerAccess', '@Select', '@Second', - '@Round', '@RightBack', '@Right', '@Return', '@Responses', - '@ReplicaID', '@ReplaceSubstring', '@Replace', '@Repeat', - '@RegQueryValue', '@RefreshECL', '@Random', '@ProperCase', - '@Prompt', '@Power', '@PostedCommand', '@PolicyIsFieldLocked', - '@Platform', '@PickList', '@Pi', '@PasswordQuality', '@Password', - '@OrgDir', '@OptimizeMailAddress', '@OpenInNewWindow', '@Now', - '@Nothing', '@NoteID', '@No', '@NewLine', '@Narrow', '@NameLookup', - '@Name', '@Month', '@Modulo', '@Modified', '@Minute', '@Min', - '@MiddleBack', '@Middle', '@Member', '@Max', '@Matches', - '@MailSignPreference', '@MailSend', '@MailSavePreference', - '@MailEncryptSentPreference', '@MailEncryptSavedPreference', - '@MailDbName', '@LowerCase', '@Log', '@Locale', '@Ln', '@Like', - '@Length', '@LeftBack', '@Left', '@LDAPServer', '@LaunchApp', - '@LanguagePreference', '@Keywords', '@IsVirtualizedDirectory', - '@IsValid', '@IsUsingJavaElement', '@IsUnavailable', '@IsTime', - '@IsText', '@IsResponseDoc', '@IsNumber', '@IsNull', '@IsNotMember', - '@IsNewDoc', '@IsModalHelp', '@IsMember', '@IsExpandable', - '@IsError', '@IsEmbeddedInsideWCT', '@IsDocTruncated', - '@IsDocBeingSaved', '@IsDocBeingRecalculated', '@IsDocBeingMailed', - '@IsDocBeingLoaded', '@IsDocBeingEdited', '@IsDB2', '@IsCategory', - '@IsAvailable', '@IsAppInstalled', '@IsAgentEnabled', '@Integer', - '@InheritedDocumentUniqueID', '@Implode', '@IfError', '@If', - '@Hour', '@HashPassword', '@HardDeleteDocument', '@GetViewInfo', - '@GetProfileField', '@GetPortsList', '@GetIMContactListGroupNames', - '@GetHTTPHeader', '@GetFocusTable', '@GetField', '@GetDocField', - '@GetCurrentTimeZone', '@GetAddressBooks', '@FormLanguage', '@For', - '@FontList', '@FloatEq', '@FileDir', '@False', '@Failure', - '@Explode', '@Exp', '@Eval', '@Error', '@Environment', '@Ends', - '@EnableAlarms', '@Elements', '@EditUserECL', '@EditECL', - '@DoWhile', '@Domain', '@DocumentUniqueID', '@DocSiblings', - '@DocParentNumber', '@DocOmmittedLength', '@DocNumber', '@DocMark', - '@DocLock', '@DocLevel', '@DocLength', '@DocFields', - '@DocDescendants', '@DocChildren', '@Do', '@DialogBox', - '@DeleteField', '@DeleteDocument', '@DDETerminate', '@DDEPoke', - '@DDEInitiate', '@DDEExecute', '@DbTitle', '@DbName', '@DbManager', - '@DbLookup', '@DbExists', '@DbCommand', '@DbColumn', '@DB2Schema', - '@Day', '@Date', '@Created', '@Count', '@Cos', '@Contains', - '@ConfigFile', '@Compare', '@Command', '@ClientType', - '@CheckFormulaSyntax', '@CheckAlarms', '@Char', '@Certificate', - '@BusinessDays', '@BrowserInfo', '@Begins', '@Author', - '@Attachments', '@AttachmentNames', '@AttachmentModifiedTimes', - '@AttachmentLengths', '@ATan2', '@ATan', '@ASin', '@Ascii', - '@AllDescendants', '@AllChildren', '@All', '@AdminECLIsLocked', - '@Adjust', '@AddToFolder', '@ACos', '@Accessed', '@AbstractSimple', - '@Abstract', '@Abs' - ) - ), - 'SYMBOLS' => array( - '(', ')' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #800000;', - 2 => 'color: #0000FF;' - ), - 'COMMENTS' => array( - 1 => 'color: #008000;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #FF00FF;' - ), - 'NUMBERS' => array( - 0 => 'color: #FF00FF;' - ), - 'METHODS' => array( - 1 => 'color: #0000AA;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 2 - ); - -?> diff --git a/_piecrust/libs/Geshi/geshi/lotusscript.php b/_piecrust/libs/Geshi/geshi/lotusscript.php deleted file mode 100644 index 412e6e4..0000000 --- a/_piecrust/libs/Geshi/geshi/lotusscript.php +++ /dev/null @@ -1,191 +0,0 @@ - 'LotusScript', - 'COMMENT_SINGLE' => array(1 => "'"), - 'COMMENT_MULTI' => array('%REM' => '%END REM'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"' , "|"), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array ( - 'Yield', 'Year', 'Xor', 'Write', 'With', 'Width', 'While', 'Wend', - 'Weekday', 'VarType', 'Variant', 'Val', 'UString', 'UString$', - 'UseLSX', 'Use', 'Until', 'Unlock', 'Unicode', 'Uni', 'UChr', - 'UChr$', 'UCase', 'UCase$', 'UBound', 'TypeName', 'Type', 'TRUE', - 'Trim', 'Trim$', 'Today', 'To', 'TimeValue', 'TimeSerial', 'Timer', - 'TimeNumber', 'Time', 'Time$', 'Then', 'Text', 'Tan', 'Tab', 'Sub', - 'StrToken', 'StrToken$', 'StrRightBack', 'StrRightBack$', - 'StrRight', 'StrRight$', 'StrLeftBack', 'StrLeftBack$', 'StrLeft', - 'StrLeft$', 'String', 'String$', 'StrConv', 'StrCompare', 'StrComp', - 'Str', 'Str$', 'Stop', 'Step', 'Static', 'Sqr', 'Split', 'Spc', - 'Space', 'Space$', 'Sleep', 'Single', 'Sin', 'Shell', 'Shared', - 'Sgn', 'SetFileAttr', 'SetAttr', 'Set', 'SendKeys', 'Select', - 'Seek', 'Second', 'RTrim', 'RTrim$', 'RSet', 'Round', 'Rnd', - 'RmDir', 'RightC', 'RightC$', 'RightBP', 'RightBP$', 'RightB', - 'RightB$', 'Right', 'Right$', 'Return', 'Resume', 'Reset', - 'Replace', 'Remove', 'Rem', 'ReDim', 'Read', 'Randomize', - 'Random', 'Put', 'Public', 'Property', 'Private', 'Print', - 'Preserve', 'Pitch', 'PI', 'Output', 'Or', 'Option', 'Open', 'On', - 'Oct', 'Oct$', 'NULL', 'Now', 'NOTHING', 'Not', 'NoPitch', 'NoCase', - 'Next', 'New', 'Name', 'MsgBox', 'Month', 'Mod', 'MkDir', 'Minute', - 'MidC', 'MidC$', 'MidBP', 'MidBP$', 'MidB', 'MidB$', 'Mid', 'Mid$', - 'MessageBox', 'Me', 'LTrim', 'LTrim$', 'LSServer', 'LSI_Info', - 'LSet', 'Loop', 'Long', 'Log', 'LOF', 'Lock', 'LOC', 'LMBCS', - 'ListTag', 'List', 'Line', 'Like', 'Lib', 'Let', 'LenC', 'LenBP', - 'LenB', 'Len', 'LeftC', 'LeftC$', 'LeftBP', 'LeftBP$', 'LeftB', - 'LeftB$', 'Left', 'Left$', 'LCase', 'LCase$', 'LBound', 'Kill', - 'Join', 'IsUnknown', 'IsScalar', 'IsObject', 'IsNumeric', 'IsNull', - 'IsList', 'IsEmpty', 'IsElement', 'IsDate', 'IsArray', 'IsA', 'Is', - 'Integer', 'Int', 'InStrC', 'InStrBP', 'InStrB', 'InStr', 'InputBP', - 'InputBP$', 'InputBox', 'InputBox$', 'InputB', 'InputB$', 'Input', - 'Input$', 'In', 'IMSetMode', 'Implode', 'Implode$', 'Imp', - 'IMEStatus', 'If', 'Hour', 'Hex', 'Hex$', 'Goto', 'GoSub', - 'GetThreadInfo', 'GetFileAttr', 'GetAttr', 'Get', 'Function', - 'FullTrim', 'From', 'FreeFile', 'Fraction', 'Format', 'Format$', - 'ForAll', 'For', 'Fix', 'FileLen', 'FileDateTime', 'FileCopy', - 'FileAttr', 'FALSE', 'Explicit', 'Exp', 'Exit', 'Execute', 'Event', - 'Evaluate', 'Error', 'Error$', 'Err', 'Erl', 'Erase', 'Eqv', 'EOF', - 'Environ', 'Environ$', 'End', 'ElseIf', 'Else', 'Double', 'DoEvents', - 'Do', 'Dir', 'Dir$', 'Dim', 'DestroyLock', 'Delete', 'DefVar', - 'DefStr', 'DefSng', 'DefLng', 'DefInt', 'DefDbl', 'DefCur', - 'DefByte', 'DefBool', 'Declare', 'Day', 'DateValue', 'DateSerial', - 'DateNumber', 'Date', 'Date$', 'DataType', 'CVDate', 'CVar', - 'Currency', 'CurDrive', 'CurDrive$', 'CurDir', 'CurDir$', 'CStr', - 'CSng', 'CreateLock', 'Cos', 'Const', 'Compare', 'Command', - 'Command$', 'CodeUnlock', 'CodeLockCheck', 'CodeLock', 'Close', - 'CLng', 'Class', 'CInt', 'Chr', 'Chr$', 'ChDrive', 'ChDir', 'CDbl', - 'CDat', 'CCur', 'CByte', 'CBool', 'Case', 'Call', 'ByVal', 'Byte', - 'Boolean', 'Bind', 'Binary', 'Bin', 'Bin$', 'Beep', 'Base', 'Atn2', - 'Atn', 'ASin', 'Asc', 'As', 'ArrayUnique', 'ArrayReplace', - 'ArrayGetIndex', 'ArrayAppend', 'Append', 'AppActivate', 'Any', - 'And', 'Alias', 'ActivateApp', 'ACos', 'Access', 'Abs', '%Include', - '%If', '%END', '%ElseIf', '%Else' - ), - 2 => array ( - 'NotesXSLTransformer', 'NotesXMLProcessor', 'NotesViewNavigator', - 'NotesViewEntryCollection', 'NotesViewEntry', 'NotesViewColumn', - 'NotesView', 'NotesUIWorkspace', 'NotesUIView', 'NotesUIScheduler', - 'NotesUIDocument', 'NotesUIDatabase', 'NotesTimer', 'NotesStream', - 'NotesSession', 'NotesSAXParser', 'NotesSAXException', - 'NotesSAXAttributeList', 'NotesRichTextTable', 'NotesRichTextTab', - 'NotesRichTextStyle', 'NotesRichTextSection', 'NotesRichTextRange', - 'NotesRichTextParagraphStyle', 'NotesRichTextNavigator', - 'NotesRichTextItem', 'NotesRichTextDocLink', - 'NotesReplicationEntry', 'NotesReplication', 'NotesRegistration', - 'NotesOutlineEntry', 'NotesOutline', 'NotesNoteCollection', - 'NotesNewsLetter', 'NotesName', 'NotesMIMEHeader', - 'NotesMIMEEntity', 'NotesLog', 'NotesItem', 'NotesInternational', - 'NotesForm', 'NotesEmbeddedObject', 'NotesDXLImporter', - 'NotesDXLExporter', 'NotesDOMXMLDeclNode', 'NotesDOMTextNode', - 'NotesDOMProcessingInstructionNode', 'NotesDOMParser', - 'NotesDOMNotationNode', 'NotesDOMNodeList', 'NotesDOMNode', - 'NotesDOMNamedNodeMap', 'NotesDOMEntityReferenceNode', - 'NotesDOMEntityNode', 'NotesDOMElementNode', - 'NotesDOMDocumentTypeNode', 'NotesDOMDocumentNode', - 'NotesDOMDocumentFragmentNode', 'NotesDOMCommentNode', - 'NotesDOMCharacterDataNote', 'NotesDOMCDATASectionNode', - 'NotesDOMAttributeNode', 'NotesDocumentCollection', 'NotesDocument', - 'NotesDbDirectory', 'NotesDateTime', 'NotesDateRange', - 'NotesDatabase', 'NotesColorObject', 'NotesAgent', - 'NotesAdministrationProcess', 'NotesACLEntry', 'NotesACL', - 'Navigator', 'Field', 'Button' - ) - ) , - 'SYMBOLS' => array( - '(', ')' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000FF;', - 2 => 'color: #0000EE;' - ), - 'COMMENTS' => array( - 1 => 'color: #008000;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #000000;' - ), - 'NUMBERS' => array( - 0 => 'color: #FF00FF;' - ), - 'METHODS' => array( - 1 => 'color: #0000AA;' - ), - 'SYMBOLS' => array( - 0 => 'color: #006600;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 2 -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/lscript.php b/_piecrust/libs/Geshi/geshi/lscript.php deleted file mode 100644 index fb16d35..0000000 --- a/_piecrust/libs/Geshi/geshi/lscript.php +++ /dev/null @@ -1,387 +0,0 @@ - 'LScript', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - //Yes, I'm aware these are out of order, - //I had to rearrange and couldn't be bothered changing the numbers... - 7 => array( - '@data', '@define', '@else', '@end', '@fpdepth', '@if', '@include', - '@insert', '@library', '@localipc', '@name', '@save', '@script', - '@sequence', '@version', '@warnings' - ), - 1 => array( - 'break', 'case', 'continue', 'else', 'end', 'false', 'for', - 'foreach', 'if', 'return', 'switch', 'true', 'while', - ), - 3 => array( - 'active', 'alertlevel', 'alpha', 'alphaprefix', 'animfilename', 'autokeycreate', - 'backdroptype', 'blue', 'boxthreshold', 'button', - 'channelsvisible', 'childrenvisible', 'compfg', 'compbg', 'compfgalpha', - 'coneangles', 'cosine', 'count', 'ctl', 'curFilename', 'curFrame', - 'currenttime', 'curTime', 'curType', - 'depth', 'diffshade', 'diffuse', 'dimensions', 'displayopts', 'dynamicupdate', - 'end', 'eta', - 'filename', 'flags', 'fogtype', 'fps', 'frame', 'frameend', 'frameheight', - 'framestart', 'framestep', 'framewidth', - 'generalopts', 'genus', 'geometry', 'gNorm', 'goal', 'green', - 'h', 'hasAlpha', 'height', - 'id', 'innerlimit', 'isColor', - 'keyCount', 'keys', - 'limiteregion', 'locked', 'luminous', - 'maxsamplesperpixel', 'minsamplesperpixel', 'mirror', 'motionx', 'motiony', - 'name', 'newFilename', 'newFrame', 'newTime', 'newType', 'null', 'numthreads', - 'objID', 'oPos', 'outerlimit', 'oXfrm', - 'parent', 'pixel', 'pixelaspect', 'point', 'points', 'pointcount', 'polNum', - 'polycount', 'polygon', 'polygons', 'postBehavior', 'preBehavior', 'previewend', - 'previewstart', 'previewstep', - 'range', 'rawblue', 'rawgreen', 'rawred', 'rayLength', 'raySource', 'red', - 'reflectblue', 'reflectgreen', 'reflectred', 'recursiondepth', 'renderend', - 'renderopts', 'renderstart', 'renderstep', 'rendertype', 'restlength', - 'rgbprefix', 'roughness', - 'selected', 'setColor', 'setPattern', 'shading', 'shadow', 'shadows', - 'shadowtype', 'size', 'source', 'special', 'specshade', 'specular', - 'spotsize', 'start', 'sx', 'sy', 'sz', - 'target', 'totallayers', 'totalpoints', 'totalpolygons', 'trans', 'transparency', - 'type', - 'value', 'view', 'visible', 'visibility', - 'w', 'width', 'wNorm', 'wPos', 'wXfrm', - 'x', 'xoffset', - 'y', 'yoffset', - 'z' - ), - 4 => array( - 'addLayer', 'addParticle', 'alphaspot', 'ambient', 'asAsc', 'asBin', - 'asInt', 'asNum', 'asStr', 'asVec', 'attach', 'axislocks', - 'backdropColor', 'backdropRay', 'backdropSqueeze', 'bone', 'blurLength', - 'close', 'color', 'contains', 'copy', 'createKey', - 'deleteKey', 'detach', 'drawCircle', 'drawLine', 'drawPoint', 'drawText', - 'drawTriangle', - 'edit', 'eof', 'event', - 'firstChannel', 'firstLayer', 'firstSelect', 'focalLength', 'fogColor', - 'fogMaxAmount', 'fogMaxDist', 'fogMinAmount', 'fogMinDist', - 'fovAngles', 'fStop', 'firstChild', 'focalDistance', - 'get', 'getChannelGroup', 'getEnvelope', 'getForward', 'getKeyBias', - 'getKeyContinuity', 'getKeyCurve', 'getKeyHermite', 'getKeyTension', - 'getKeyTime', 'getKeyValue', 'getParticle', 'getPivot', 'getPosition', - 'getRight', 'getRotation', 'getSelect', 'getScaling', 'getTag', 'getTexture', - 'getUp', 'getValue', 'getWorldPosition', 'getWorldForward', 'getWorldRight', - 'getWorldRotation', 'getWorldUp', 'globalBlur', 'globalMask', 'globalResolution', - 'hasCCEnd', 'hasCCStart', - 'illuminate', 'indexOf', 'isAscii', 'isAlnum', 'isAlpha', 'isBone', - 'isCamera', 'isChannel', 'isChannelGroup', 'isCntrl', 'isCurve', 'isDigit', - 'isEnvelope', 'isImage', 'isInt', 'isLight', 'isLower', 'isMapped', 'isMesh', - 'isNil', 'isNum', 'IsOpen', 'isOriginal', 'isPrint', 'isPunct', 'isScene', - 'isSpace', 'isStr', 'isUpper', 'isValid', 'isVMap', 'isVec', 'isXDigit', - 'keyExists', - 'layer', 'layerName', 'layerVisible', 'limits', 'line', 'linecount', 'load', 'luma', - 'next', 'nextLayer', 'nextSelect', 'nextChannel', 'nextChild', 'nl', - 'offset', 'open', - 'pack', 'param', 'parse', 'paste', 'persist', 'polygonCount', 'position', - 'rayCast', 'rayTrace', 'read', 'readByte', 'readInt', 'readNumber', - 'readDouble', 'readShort', 'readString', 'readVector', 'reduce', - 'remParticle', 'renderCamera', 'reopen', 'replace', 'reset', 'restParam', - 'rewind', 'rgb', 'rgbambient', 'rgbcolor', 'rgbspot', - 'save', 'schemaPosition', 'select', 'set', 'setChannelGroup', 'setKeyBias', - 'setKeyContinuity', 'setKeyCurve', - 'setKeyHermite', 'setKeyTension', 'setKeyValue', 'setParticle', 'setPoints', - 'setTag', 'setValue', 'server', 'serverFlags', 'sortA', 'sortD', 'surface', - 'trunc', - 'write', 'writeln', 'writeByte', 'writeData', 'writeNumber', 'writeDouble', - 'writeShort', 'writeString', 'writeVector', - 'vertex', 'vertexCount', - 'zoomFactor' - ), - 2 => array( - 'abs', 'acos', 'angle', 'append', 'ascii', 'asin', 'atan', - 'binary', - 'ceil', 'center', 'chdir', 'clearimage', 'cloned', 'comringattach', - 'comringdecode', 'comringdetach', 'comringencode', 'comringmsg', 'cos', - 'cosh', 'cot', 'cross2d', 'cross3d', 'csc', 'ctlstring', 'ctlinteger', - 'ctlnumber', 'ctlvector', 'ctldistance', 'ctlchoice', 'ctltext', - 'ctlcolor', 'ctlsurface', 'ctlfont', 'ctlpopup', 'ctledit', 'ctlpercent', - 'ctlangle', 'ctlrgb', 'ctlhsv', 'ctlcheckbox', 'ctlstate', 'ctlfilename', - 'ctlbutton', 'ctllistbox', 'ctlslider', 'ctlminislider', 'ctlsep', 'ctlimage', - 'ctltab', 'ctlallitems', 'ctlmeshitems', 'ctlcameraitems', 'ctllightitems', - 'ctlboneitems', 'ctlimageitems', 'ctlchannel', 'ctlviewport', 'Control_Management', - 'ctlpage', 'ctlgroup', 'ctlposition', 'ctlactive', 'ctlvisible', 'ctlalign', - 'ctlrefresh', 'ctlmenu', 'ctlinfo', - 'date', 'debug', 'deg', 'dot2d', 'dot3d', 'drawborder', 'drawbox', 'drawcircle', - 'drawelipse', 'drawerase', 'drawfillcircle', 'drawfillelipse', 'drawline', - 'drawpixel', 'drawtext', 'drawtextwidth', 'drawtextheight', 'dump', - 'error', 'exp', 'expose', 'extent', - 'fac', 'filecrc', 'filedelete', 'fileexists', 'filefind', 'filerename', - 'filestat', 'floor', 'format', 'frac', 'fullpath', - 'gamma', 'getdir', 'getenv', 'getfile', 'getfirstitem', 'getsep', 'getvalue', - 'globalrecall', 'globalstore', - 'hash', 'hex', 'hostBuild', 'hostVersion', 'hypot', - 'info', 'integer', - 'library', 'licenseId', 'lscriptVersion', 'load', 'loadimage', 'log', 'log10', - 'matchdirs', 'matchfiles', 'max', 'min', 'mkdir', 'mod', 'monend', 'moninit', 'monstep', - 'nil', 'normalize', 'number', - 'octal', 'overlayglyph', - 'parse', 'platform', 'pow', - 'rad', 'random', 'randu', 'range', 'read', 'readdouble', 'readInt', 'readNumber', - 'readShort', 'recall', 'regexp', 'reqabort', 'reqbegin', 'reqend', 'reqisopen', - 'reqkeyboard', 'reqopen', 'reqposition', 'reqpost', 'reqredraw', - 'reqsize', 'reqresize', 'requpdate', 'rmdir', 'round', 'runningUnder', - 'save', 'sec', 'select', 'selector', 'setdesc', 'setvalue', 'sin', 'sinh', 'size', - 'sizeof', 'sleep', 'spawn', 'split', 'sqrt', 'step', 'store', 'string', 'strleft', - 'strlower', 'strright', 'strsub', 'strupper', - 'tan', 'tanh', 'targetobject', 'terminate', 'text', 'time', - 'wait', 'warn', 'when', 'write', 'writeDouble', 'writeInt', 'writeNumber', 'writeShort', - 'var', 'vector', 'visitnodes', 'vmag', - ), - 5 => array( - 'addcurve', 'addpoint', 'addpolygon', 'addquad', 'addtriangle', 'alignpols', - 'autoflex', 'axisdrill', - 'bend', 'bevel', 'boolean', 'boundingbox', - 'changepart', 'changesurface', 'close', 'closeall', 'cmdseq', 'copy', 'copysurface', - 'createsurface', 'cut', - 'deformregion', 'delete', - 'editbegin', 'editend', 'exit', 'extrude', - 'fixedflex', 'flip', 'fontclear', 'fontcount', 'fontindex', 'fontload', - 'fontname', 'fracsubdivide', 'freezecurves', - 'getdefaultsurface', - 'jitter', - 'lathe', 'layerName', 'layerVisible', 'lyrbg', 'lyrdata', 'lyrempty', 'lyremptybg', - 'lyremptyfg', 'lyrfg', 'lyrsetbg', 'lyrsetfg', 'lyrswap', - 'magnet', 'make4patch', 'makeball', 'makebox', 'makecone', 'makedisc', - 'maketesball', 'maketext', 'mergepoints', 'mergepols', 'meshedit', 'mirror', - 'morphpols', 'move', - 'new', 'nextsurface', - 'paste', 'pathclone', 'pathextrude', 'pixel', 'pointcount', 'pointinfo', - 'pointmove', 'pole', 'polycount', 'polyinfo', 'polynormal', 'polypointcount', - 'polypoints', 'polysurface', - 'quantize', - 'railclone', 'railextrude', 'redo', 'removepols', 'rempoint', 'rempoly', - 'renamesurface', 'revert', 'rotate', - 'scale', 'selhide', 'selinvert', 'selmode', 'selpoint', 'selpolygon', 'selunhide', - 'selectvmap', 'setlayername', 'setobject', 'setpivot', 'setsurface', 'shapebevel', - 'shear', 'skinpols', 'smooth', 'smoothcurves', 'smoothscale', 'smoothshift', - 'soliddrill', 'splitpols', 'subdivide', 'swaphidden', - 'taper', 'triple', 'toggleCCend', 'toggleCCstart', 'togglepatches', 'twist', - 'undo', 'undogroupend', 'undogroupbegin', 'unifypols', 'unweld', - 'vortex', - 'weldaverage', 'weldpoints' - ), - 6 => array( - 'About', 'AboutOpenGL', 'AdaptiveSampling', 'AdaptiveThreshold', - 'AddAreaLight', 'AddBone', 'AddButton', 'AddCamera', 'AddChildBone', - 'AddDistantLight', 'AddEnvelope', 'AddLinearLight', 'AddNull', - 'AddPartigon', 'AddPlugins', 'AddPointLight', 'AddPosition', - 'AddRotation', 'AddScale', 'AddSpotlight', 'AddToSelection', - 'AdjustRegionTool', 'AffectCaustics', 'AffectDiffuse', 'AffectOpenGL', - 'AffectSpecular', 'AlertLevel', 'AmbientColor', 'AmbientIntensity', - 'Antialiasing', 'ApertureHeight', 'ApplyServer', 'AreaLight', - 'AutoConfirm', 'AutoFrameAdvance', 'AutoKey', - 'BackdropColor', 'BackView', 'BController', 'BLimits', 'BLurLength', 'BoneActive', - 'BoneFalloffType', 'BoneJointComp', 'BoneJointCompAmounts', 'BoneJointCompParent', - 'BoneLimitedRange', 'BoneMaxRange', 'BoneMinRange', 'BoneMuscleFlex', - 'BoneMuscleFlexAmounts', 'BoneMuscleFlexParent', 'BoneNormalization', - 'BoneRestLength', 'BoneRestPosition', 'BoneRestRotation', 'BoneSource', - 'BoneStrength', 'BoneStrengthMultiply', 'BoneWeightMapName', 'BoneWeightMapOnly', - 'BoneWeightShade', 'BoneXRay', 'BottomView', 'BoundingBoxThreshold', - 'BStiffness', - 'CacheCaustics', 'CacheRadiosity', 'CacheShadowMap', - 'CameraMask', 'CameraView', 'CameraZoomTool', 'CastShadow', 'CausticIntensity', - 'CenterItem', 'CenterMouse', 'ChangeTool', 'ClearAllBones', 'ClearAllCameras', - 'ClearAllLights', 'ClearAllObjects', 'ClearAudio', 'ClearScene', 'ClearSelected', - 'Clone', 'CommandHistory', 'CommandInput', 'Compositing', 'ConeAngleTool', - 'ContentDirectory', 'CreateKey', - 'DecreaseGrid', 'DeleteKey', 'DepthBufferAA', 'DepthOfField', 'DisplayOptions', - 'DistantLight', 'DrawAntialiasing', 'DrawBones', 'DrawChildBones', 'DynamicUpdate', - 'EditBones', 'EditCameras', 'EditKeys', 'EditLights', - 'EditMenus', 'EditObjects', 'EditPlugins', 'EditServer', 'EnableCaustics', - 'EnableDeformations', 'EnableIK', 'EnableLensFlares', 'EnableRadiosity', 'EnableServer', - 'EnableShadowMaps', 'EnableVIPER', 'EnableVolumetricLights', 'EnableXH', - 'EnableYP', 'EnableZB', 'EnahancedAA', 'ExcludeLight', 'ExcludeObject', - 'EyeSeparation', - 'FasterBones', 'FirstFrame', 'FirstItem', 'FitAll', 'FitSelected', - 'FlareIntensity', 'FlareOptions', 'FocalDistance', 'FogColor', 'FogMaxAmount', - 'FogMaxDistance', 'FogMinAmount', 'FogMinDistance', 'FogType', 'FractionalFrames', - 'FrameSize', 'FramesPerSecond', 'FrameStep', 'FreePreview', 'FrontView', 'FullTimeIK', - 'GeneralOptions', 'Generics', 'GlobalApertureHeight', 'GlobalBlurLength', - 'GlobalFrameSize', 'GlobalIllumination', 'GlobalMaskPosition', 'GlobalMotionBlur', - 'GlobalParticleBlur', 'GlobalPixelAspect', 'GlobalResolutionMulitplier', 'GoalItem', - 'GoalStrength', 'GoToFrame', 'GradientBackdrop', 'GraphEditor', 'GridSize', 'GroundColor', - 'HController', 'HideToolbar', 'HideWindows', 'HLimits', 'HStiffness', - 'ImageEditor', 'ImageProcessing', 'IncludeLight', 'IncludeObject', 'IncreaseGrid', - 'IndirectBounces', 'Item_SetWindowPos', 'ItemActive', 'ItemColor', 'ItemLock', - 'ItemProperties', 'ItemVisibilty', - 'KeepGoalWithinReach', - 'LastFrame', 'LastItem', 'LastPluginInterface', 'Layout_SetWindowPos', - 'Layout_SetWindowSize', 'LeftView', 'LensFlare', 'LensFStop', 'LightColor', - 'LightConeAngle', 'LightEdgeAngle', 'LightFalloffType', 'LightIntensity', - 'LightIntensityTool', 'LightQuality', 'LightRange', 'LightView', 'LimitB', - 'LimitDynamicRange', 'LimitedRegion', 'LimitH', 'LimitP', 'LinearLight', - 'LoadAudio', 'LoadFromScene', 'LoadMotion', 'LoadObject', 'LoadObjectLayer', - 'LoadPreview', 'LoadScene', 'LocalCoordinateSystem', - 'MakePreview', 'MaskColor', 'MaskPosition', 'MasterPlugins', 'MatchGoalOrientation', - 'MatteColor', 'MatteObject', 'MetaballResolution', 'Model', 'MorphAmount', - 'MorphAmountTool', 'MorphMTSE', 'MorphSurfaces', 'MorphTarget', 'MotionBlur', - 'MotionBlurDOFPreview', 'MotionOptions', 'MovePathTool', 'MovePivotTool', 'MoveTool', - 'NadirColor', 'NetRender', 'NextFrame', 'NextItem', 'NextKey', 'NextSibling', - 'NextViewLayout', 'NoiseReduction', 'Numeric', - 'ObjectDissolve', - 'ParentCoordinateSystem', 'ParentInPlace', 'ParentItem', - 'ParticleBlur', 'PathAlignLookAhead', 'PathAlignMaxLookSteps', 'PathAlignReliableDist', - 'Pause', 'PController', 'PerspectiveView', - 'PivotPosition', 'PivotRotation', 'PixelAspect', 'PlayAudio', 'PlayBackward', - 'PlayForward', 'PlayPreview', 'PLimits', 'PointLight', 'PolygonEdgeColor', - 'PolygonEdgeFlags', 'PolygonEdgeThickness', 'PolygonEdgeZScale', 'PolygonSize', - 'Position', 'Presets', 'PreviewFirstFrame', 'PreviewFrameStep', 'PreviewLastFrame', - 'PreviewOptions', 'PreviousFrame', 'PreviousItem', 'PreviousKey', 'PreviousSibling', - 'PreviousViewLayout', 'PStiffness', - 'Quit', - 'RadiosityIntensity', 'RadiosityTolerance', 'RadiosityType', 'RayRecursionLimit', - 'RayTraceReflection', 'RayTraceShadows', - 'RayTraceTransparency', 'ReceiveShadow', 'RecentContentDirs', 'RecentScenes', - 'ReconstructionFilter', 'RecordMaxAngles', 'RecordMinAngles', 'RecordPivotRotation', - 'RecordRestPosition', 'Redraw', 'RedrawNow', 'Refresh', 'RefreshNow', 'RegionPosition', - 'RemoveEnvelope', 'RemoveFromSelection', 'RemoveServer', 'Rename', 'RenderFrame', - 'RenderOptions', 'RenderScene', 'RenderSelected', 'RenderThreads', - 'ReplaceObjectLayer', 'ReplaceWithNull', 'ReplaceWithObject', 'Reset', - 'ResolutionMultiplier', 'RestLengthTool', 'RightView', 'RotatePivotTool', - 'RotateTool', 'Rotation', - 'SaveAllObjects', 'SaveCommandList', 'SaveCommandMessages', - 'SaveEndomorph', 'SaveLight', 'SaveLWSC1', 'SaveMotion', 'SaveObject', 'SaveObjectCopy', - 'SavePreview', 'SaveScene', 'SaveSceneAs', 'SaveSceneCopy', 'SaveTransformed', - 'SaveViewLayout', 'Scale', 'Scene_SetWindowPos', 'Scene_SetWindowSize', - 'SceneEditor', 'SchematicPosition', 'SchematicView', 'SelectAllBones', - 'SelectAllCameras', 'SelectAllLights', 'SelectAllObjects', 'SelectByName', - 'SelectChild', 'SelectItem', 'SelectParent', 'SelfShadow', 'ShadowColor', - 'ShadowExclusion', 'ShadowMapAngle', 'ShadowMapFitCone', 'ShadowMapFuzziness', - 'ShadowMapSize', 'ShadowType', 'ShowCages', 'ShowFieldChart', 'ShowHandles', - 'ShowIKChains', 'ShowMotionPaths', 'ShowSafeAreas', 'ShowTargetLines', - 'ShrinkEdgesWithDistance', 'SingleView', 'SizeTool', 'SkelegonsToBones', 'SkyColor', - 'Spotlight', 'SquashTool', 'Statistics', 'StatusMsg', 'Stereoscopic', 'StretchTool', - 'SubdivisionOrder', 'SubPatchLevel', 'SurfaceEditor', 'Synchronize', - 'TargetItem', 'TopView', - 'UnaffectedByFog', 'UnaffectedByIK', 'Undo', 'UnseenByAlphaChannel', 'UnseenByCamera', - 'UnseenByRays', 'UseGlobalResolution', 'UseGlobalBlur', 'UseGlobalMask', - 'UseMorphedPositions', - 'ViewLayout', 'VIPER', 'VolumetricLighting', - 'VolumetricLightingOptions', 'VolumetricRadiosity', 'Volumetrics', - 'WorldCoordinateSystem', - 'XYView', 'XZView', - 'ZenithColor', 'ZoomFactor', 'ZoomIn', 'ZoomInX2', 'ZoomOut', 'ZoomOutX2', 'ZYView', - 'Camera', 'Channel', 'ChannelGroup', 'Envelope', 'File', 'Glyph', 'Icon', 'Image', - 'Light', 'Mesh', 'Scene', 'Surface', 'VMap' - ), - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', '=', '<', '>', '+', '-', '*', '/', '!', '%', '&', '@' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => true, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false, - 7 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #FF6820; font-weight: bold;', //LS_COMMANDS - 3 => 'color: #007F7F; font-weight: bold;', //LS_MEMBERS - 4 => 'color: #800080; font-weight: bold;', //LS_METHODS - 5 => 'color: #51BD95; font-weight: bold;', //LS_MODELER - 6 => 'color: #416F85; font-weight: bold;', //LS_GENERAL - 7 => 'color: #C92929; font-weight: bold;' //LS_COMMANDS (cont) - ), - 'COMMENTS' => array( - 1 => 'color: #7F7F7F;', - 'MULTI' => 'color: #7F7F7F;' - ), - 'BRACKETS' => array( - 0 => 'color: #0040A0;' - ), - 'STRINGS' => array( - 0 => 'color: #00C800;' - ), - 'NUMBERS' => array( - 0 => 'color: #6953AC;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #0040A0;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ), - 'ESCAPE_CHAR' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 3 => array( - 'DISALLOWED_BEFORE' => '(?<=\.)' - ), - 4 => array( - 'DISALLOWED_BEFORE' => '(?<=\.)' - ) - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/lsl2.php b/_piecrust/libs/Geshi/geshi/lsl2.php deleted file mode 100644 index 5e50d1f..0000000 --- a/_piecrust/libs/Geshi/geshi/lsl2.php +++ /dev/null @@ -1,898 +0,0 @@ - 'LSL2', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( // flow control - 'do', - 'else', - 'for', - 'if', - 'jump', - 'return', - 'state', - 'while', - ), - 2 => array( // manifest constants - 'ACTIVE', - 'AGENT', - 'AGENT_ALWAYS_RUN', - 'AGENT_ATTACHMENTS', - 'AGENT_AWAY', - 'AGENT_BUSY', - 'AGENT_CROUCHING', - 'AGENT_FLYING', - 'AGENT_IN_AIR', - 'AGENT_MOUSELOOK', - 'AGENT_ON_OBJECT', - 'AGENT_SCRIPTED', - 'AGENT_SITTING', - 'AGENT_TYPING', - 'AGENT_WALKING', - 'ALL_SIDES', - 'ANIM_ON', - 'ATTACH_BACK', - 'ATTACH_BELLY', - 'ATTACH_CHEST', - 'ATTACH_CHIN', - 'ATTACH_HEAD', - 'ATTACH_HUD_BOTTOM', - 'ATTACH_HUD_BOTTOM_LEFT', - 'ATTACH_HUD_BOTTOM_RIGHT', - 'ATTACH_HUD_CENTER_1', - 'ATTACH_HUD_CENTER_2', - 'ATTACH_HUD_TOP_CENTER', - 'ATTACH_HUD_TOP_LEFT', - 'ATTACH_HUD_TOP_RIGHT', - 'ATTACH_LEAR', - 'ATTACH_LEYE', - 'ATTACH_LFOOT', - 'ATTACH_LHAND', - 'ATTACH_LHIP', - 'ATTACH_LLARM', - 'ATTACH_LLLEG', - 'ATTACH_LPEC', - 'ATTACH_LSHOULDER', - 'ATTACH_LUARM', - 'ATTACH_LULEG', - 'ATTACH_MOUTH', - 'ATTACH_NOSE', - 'ATTACH_PELVIS', - 'ATTACH_REAR', - 'ATTACH_REYE', - 'ATTACH_RFOOT', - 'ATTACH_RHAND', - 'ATTACH_RHIP', - 'ATTACH_RLARM', - 'ATTACH_RLLEG', - 'ATTACH_RPEC', - 'ATTACH_RSHOULDER', - 'ATTACH_RUARM', - 'ATTACH_RULEG', - 'CAMERA_ACTIVE', - 'CAMERA_BEHINDNESS_ANGLE', - 'CAMERA_BEHINDNESS_LAG', - 'CAMERA_DISTANCE', - 'CAMERA_FOCUS', - 'CAMERA_FOCUS_LAG', - 'CAMERA_FOCUS_LOCKED', - 'CAMERA_FOCUS_OFFSET', - 'CAMERA_FOCUS_THRESHOLD', - 'CAMERA_PITCH', - 'CAMERA_POSITION', - 'CAMERA_POSITION_LAG', - 'CAMERA_POSITION_LOCKED', - 'CAMERA_POSITION_THRESHOLD', - 'CHANGED_ALLOWED_DROP', - 'CHANGED_COLOR', - 'CHANGED_INVENTORY', - 'CHANGED_LINK', - 'CHANGED_OWNER', - 'CHANGED_REGION', - 'CHANGED_SCALE', - 'CHANGED_SHAPE', - 'CHANGED_TELEPORT', - 'CHANGED_TEXTURE', - 'CLICK_ACTION_NONE', - 'CLICK_ACTION_OPEN', - 'CLICK_ACTION_OPEN_MEDIA', - 'CLICK_ACTION_PAY', - 'CLICK_ACTION_SIT', - 'CLICK_ACTION_TOUCH', - 'CONTROL_BACK', - 'CONTROL_DOWN', - 'CONTROL_FWD', - 'CONTROL_LBUTTON', - 'CONTROL_LEFT', - 'CONTROL_ML_LBUTTON', - 'CONTROL_RIGHT', - 'CONTROL_ROT_LEFT', - 'CONTROL_ROT_RIGHT', - 'CONTROL_UP', - 'DATA_BORN', - 'DATA_NAME', - 'DATA_ONLINE', - 'DATA_PAYINFO', - 'DATA_RATING', - 'DATA_SIM_POS', - 'DATA_SIM_RATING', - 'DATA_SIM_STATUS', - 'DEBUG_CHANNEL', - 'DEG_TO_RAD', - 'EOF', - 'FALSE', - 'HTTP_BODY_MAXLENGTH', - 'HTTP_BODY_TRUNCATED', - 'HTTP_METHOD', - 'HTTP_MIMETYPE', - 'HTTP_VERIFY_CERT', - 'INVENTORY_ALL', - 'INVENTORY_ANIMATION', - 'INVENTORY_BODYPART', - 'INVENTORY_CLOTHING', - 'INVENTORY_GESTURE', - 'INVENTORY_LANDMARK', - 'INVENTORY_NONE', - 'INVENTORY_NOTECARD', - 'INVENTORY_OBJECT', - 'INVENTORY_SCRIPT', - 'INVENTORY_SOUND', - 'INVENTORY_TEXTURE', - 'LAND_LEVEL', - 'LAND_LOWER', - 'LAND_NOISE', - 'LAND_RAISE', - 'LAND_REVERT', - 'LAND_SMOOTH', - 'LINK_ALL_CHILDREN', - 'LINK_ALL_OTHERS', - 'LINK_ROOT', - 'LINK_SET', - 'LINK_THIS', - 'LIST_STAT_GEOMETRIC_MEAN', - 'LIST_STAT_MAX', - 'LIST_STAT_MEAN', - 'LIST_STAT_MEDIAN', - 'LIST_STAT_MIN', - 'LIST_STAT_NUM_COUNT', - 'LIST_STAT_RANGE', - 'LIST_STAT_STD_DEV', - 'LIST_STAT_SUM', - 'LIST_STAT_SUM_SQUARES', - 'LOOP', - 'MASK_BASE', - 'MASK_EVERYONE', - 'MASK_GROUP', - 'MASK_NEXT', - 'MASK_OWNER', - 'NULL_KEY', - 'OBJECT_CREATOR', - 'OBJECT_DESC', - 'OBJECT_GROUP', - 'OBJECT_NAME', - 'OBJECT_OWNER', - 'OBJECT_POS', - 'OBJECT_ROT', - 'OBJECT_UNKNOWN_DETAIL', - 'OBJECT_VELOCITY', - 'PARCEL_DETAILS_AREA', - 'PARCEL_DETAILS_DESC', - 'PARCEL_DETAILS_GROUP', - 'PARCEL_DETAILS_NAME', - 'PARCEL_DETAILS_OWNER', - 'PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY', - 'PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS', - 'PARCEL_FLAG_ALLOW_CREATE_OBJECTS', - 'PARCEL_FLAG_ALLOW_DAMAGE', - 'PARCEL_FLAG_ALLOW_FLY', - 'PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY', - 'PARCEL_FLAG_ALLOW_GROUP_SCRIPTS', - 'PARCEL_FLAG_ALLOW_LANDMARK', - 'PARCEL_FLAG_ALLOW_SCRIPTS', - 'PARCEL_FLAG_ALLOW_TERRAFORM', - 'PARCEL_FLAG_LOCAL_SOUND_ONLY', - 'PARCEL_FLAG_RESTRICT_PUSHOBJECT', - 'PARCEL_FLAG_USE_ACCESS_GROUP', - 'PARCEL_FLAG_USE_ACCESS_LIST', - 'PARCEL_FLAG_USE_BAN_LIST', - 'PARCEL_FLAG_USE_LAND_PASS_LIST', - 'PARCEL_MEDIA_COMMAND_AGENT', - 'PARCEL_MEDIA_COMMAND_AUTO_ALIGN', - 'PARCEL_MEDIA_COMMAND_DESC', - 'PARCEL_MEDIA_COMMAND_LOOP_SET', - 'PARCEL_MEDIA_COMMAND_PAUSE', - 'PARCEL_MEDIA_COMMAND_PLAY', - 'PARCEL_MEDIA_COMMAND_SIZE', - 'PARCEL_MEDIA_COMMAND_STOP', - 'PARCEL_MEDIA_COMMAND_TEXTURE', - 'PARCEL_MEDIA_COMMAND_TIME', - 'PARCEL_MEDIA_COMMAND_TYPE', - 'PARCEL_MEDIA_COMMAND_URL', - 'PASSIVE', - 'PAYMENT_INFO_ON_FILE', - 'PAYMENT_INFO_USED', - 'PAY_DEFAULT', - 'PAY_HIDE', - 'PERMISSION_ATTACH', - 'PERMISSION_CHANGE_LINKS', - 'PERMISSION_CONTROL_CAMERA', - 'PERMISSION_DEBIT', - 'PERMISSION_TAKE_CONTROLS', - 'PERMISSION_TRACK_CAMERA', - 'PERMISSION_TRIGGER_ANIMATION', - 'PERM_ALL', - 'PERM_COPY', - 'PERM_MODIFY', - 'PERM_MOVE', - 'PERM_TRANSFER', - 'PI', - 'PI_BY_TWO', - 'PRIM_BUMP_BARK', - 'PRIM_BUMP_BLOBS', - 'PRIM_BUMP_BRICKS', - 'PRIM_BUMP_BRIGHT', - 'PRIM_BUMP_CHECKER', - 'PRIM_BUMP_CONCRETE', - 'PRIM_BUMP_DARK', - 'PRIM_BUMP_DISKS', - 'PRIM_BUMP_GRAVEL', - 'PRIM_BUMP_LARGETILE', - 'PRIM_BUMP_NONE', - 'PRIM_BUMP_SHINY', - 'PRIM_BUMP_SIDING', - 'PRIM_BUMP_STONE', - 'PRIM_BUMP_STUCCO', - 'PRIM_BUMP_SUCTION', - 'PRIM_BUMP_TILE', - 'PRIM_BUMP_WEAVE', - 'PRIM_BUMP_WOOD', - 'PRIM_COLOR', - 'PRIM_FULLBRIGHT', - 'PRIM_HOLE_CIRCLE', - 'PRIM_HOLE_DEFAULT', - 'PRIM_HOLE_SQUARE', - 'PRIM_HOLE_TRIANGLE', - 'PRIM_MATERIAL', - 'PRIM_MATERIAL_FLESH', - 'PRIM_MATERIAL_GLASS', - 'PRIM_MATERIAL_LIGHT', - 'PRIM_MATERIAL_METAL', - 'PRIM_MATERIAL_PLASTIC', - 'PRIM_MATERIAL_RUBBER', - 'PRIM_MATERIAL_STONE', - 'PRIM_MATERIAL_WOOD', - 'PRIM_PHANTOM', - 'PRIM_PHYSICS', - 'PRIM_POSITION', - 'PRIM_ROTATION', - 'PRIM_SHINY_HIGH', - 'PRIM_SHINY_LOW', - 'PRIM_SHINY_MEDIUM', - 'PRIM_SHINY_NONE', - 'PRIM_SIZE', - 'PRIM_TEMP_ON_REZ', - 'PRIM_TEXTURE', - 'PRIM_TYPE', - 'PRIM_TYPE_BOX', - 'PRIM_TYPE_CYLINDER', - 'PRIM_TYPE_PRISM', - 'PRIM_TYPE_RING', - 'PRIM_TYPE_SPHERE', - 'PRIM_TYPE_TORUS', - 'PRIM_TYPE_TUBE', - 'PSYS_PART_BOUNCE_MASK', - 'PSYS_PART_EMISSIVE_MASK', - 'PSYS_PART_END_ALPHA', - 'PSYS_PART_END_COLOR', - 'PSYS_PART_END_SCALE', - 'PSYS_PART_FLAGS', - 'PSYS_PART_FOLLOW_SRC_MASK', - 'PSYS_PART_FOLLOW_VELOCITY_MASK', - 'PSYS_PART_INTERP_COLOR_MASK', - 'PSYS_PART_INTERP_SCALE_MASK', - 'PSYS_PART_MAX_AGE', - 'PSYS_PART_START_ALPHA', - 'PSYS_PART_START_COLOR', - 'PSYS_PART_START_SCALE', - 'PSYS_PART_TARGET_LINEAR_MASK', - 'PSYS_PART_TARGET_POS_MASK', - 'PSYS_PART_WIND_MASK', - 'PSYS_SRC_ACCEL', - 'PSYS_SRC_ANGLE_BEGIN', - 'PSYS_SRC_ANGLE_END', - 'PSYS_SRC_BURST_PART_COUNT', - 'PSYS_SRC_BURST_RADIUS', - 'PSYS_SRC_BURST_RATE', - 'PSYS_SRC_BURST_SPEED_MAX', - 'PSYS_SRC_BURST_SPEED_MIN', - 'PSYS_SRC_INNERANGLE', - 'PSYS_SRC_MAX_AGE', - 'PSYS_SRC_OMEGA', - 'PSYS_SRC_OUTERANGLE', - 'PSYS_SRC_PATTERN', - 'PSYS_SRC_PATTERN_ANGLE', - 'PSYS_SRC_PATTERN_ANGLE_CONE', - 'PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY', - 'PSYS_SRC_PATTERN_DROP', - 'PSYS_SRC_PATTERN_EXPLODE', - 'PSYS_SRC_TARGET_KEY', - 'PSYS_SRC_TEXTURE', - 'RAD_TO_DEG', - 'REMOTE_DATA_CHANNEL', - 'REMOTE_DATA_REQUEST', - 'SCRIPTED', - 'SQRT2', - 'STATUS_BLOCK_GRAB', - 'STATUS_DIE_AT_EDGE', - 'STATUS_PHANTOM', - 'STATUS_PHYSICS', - 'STATUS_RETURN_AT_EDGE', - 'STATUS_ROTATE_X', - 'STATUS_ROTATE_Y', - 'STATUS_ROTATE_Z', - 'STATUS_SANDBOX', - 'TRUE', - 'TWO_PI', - 'VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY', - 'VEHICLE_ANGULAR_DEFLECTION_TIMESCALE', - 'VEHICLE_ANGULAR_FRICTION_TIMESCALE', - 'VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE', - 'VEHICLE_ANGULAR_MOTOR_DIRECTION', - 'VEHICLE_ANGULAR_MOTOR_TIMESCALE', - 'VEHICLE_BANKING_EFFICIENCY', - 'VEHICLE_BANKING_MIX', - 'VEHICLE_BANKING_TIMESCALE', - 'VEHICLE_BUOYANCY', - 'VEHICLE_FLAG_CAMERA_DECOUPLED', - 'VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT', - 'VEHICLE_FLAG_HOVER_TERRAIN_ONLY', - 'VEHICLE_FLAG_HOVER_UP_ONLY', - 'VEHICLE_FLAG_HOVER_WATER_ONLY', - 'VEHICLE_FLAG_LIMIT_MOTOR_UP', - 'VEHICLE_FLAG_LIMIT_ROLL_ONLY', - 'VEHICLE_FLAG_MOUSELOOK_BANK', - 'VEHICLE_FLAG_MOUSELOOK_STEER', - 'VEHICLE_FLAG_NO_DEFLECTION_UP', - 'VEHICLE_HOVER_EFFICIENCY', - 'VEHICLE_HOVER_HEIGHT', - 'VEHICLE_HOVER_TIMESCALE', - 'VEHICLE_LINEAR_DEFLECTION_EFFICIENCY', - 'VEHICLE_LINEAR_DEFLECTION_TIMESCALE', - 'VEHICLE_LINEAR_FRICTION_TIMESCALE', - 'VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE', - 'VEHICLE_LINEAR_MOTOR_DIRECTION', - 'VEHICLE_LINEAR_MOTOR_OFFSET', - 'VEHICLE_LINEAR_MOTOR_TIMESCALE', - 'VEHICLE_REFERENCE_FRAME', - 'VEHICLE_TYPE_AIRPLANE', - 'VEHICLE_TYPE_BALLOON', - 'VEHICLE_TYPE_BOAT', - 'VEHICLE_TYPE_CAR', - 'VEHICLE_TYPE_NONE', - 'VEHICLE_TYPE_SLED', - 'VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY', - 'VEHICLE_VERTICAL_ATTRACTION_TIMESCALE', - 'ZERO_ROTATION', - 'ZERO_VECTOR', - ), - 3 => array( // handlers - 'at_rot_target', - 'at_target', - 'attached', - 'changed', - 'collision', - 'collision_end', - 'collision_start', - 'control', - 'dataserver', - 'email', - 'http_response', - 'land_collision', - 'land_collision_end', - 'land_collision_start', - 'link_message', - 'listen', - 'money', - 'moving_end', - 'moving_start', - 'no_sensor', - 'not_at_rot_target', - 'not_at_target', - 'object_rez', - 'on_rez', - 'remote_data', - 'run_time_permissions', - 'sensor', - 'state_entry', - 'state_exit', - 'timer', - 'touch', - 'touch_end', - 'touch_start', - ), - 4 => array( // data types - 'float', - 'integer', - 'key', - 'list', - 'rotation', - 'string', - 'vector', - ), - 5 => array( // library - 'default', - 'llAbs', - 'llAcos', - 'llAddToLandBanList', - 'llAddToLandPassList', - 'llAdjustSoundVolume', - 'llAllowInventoryDrop', - 'llAngleBetween', - 'llApplyImpulse', - 'llApplyRotationalImpulse', - 'llAsin', - 'llAtan2', - 'llAttachToAvatar', - 'llAvatarOnSitTarget', - 'llAxes2Rot', - 'llAxisAngle2Rot', - 'llBase64ToInteger', - 'llBase64ToString', - 'llBreakAllLinks', - 'llBreakLink', - 'llCeil', - 'llClearCameraParams', - 'llCloseRemoteDataChannel', - 'llCloud', - 'llCollisionFilter', - 'llCollisionSound', - 'llCollisionSprite', - 'llCos', - 'llCreateLink', - 'llCSV2List', - 'llDeleteSubList', - 'llDeleteSubString', - 'llDetachFromAvatar', - 'llDetectedGrab', - 'llDetectedGroup', - 'llDetectedKey', - 'llDetectedLinkNumber', - 'llDetectedName', - 'llDetectedOwner', - 'llDetectedPos', - 'llDetectedRot', - 'llDetectedTouchBinormal', - 'llDetectedTouchFace', - 'llDetectedTouchNormal', - 'llDetectedTouchPos', - 'llDetectedTouchST', - 'llDetectedTouchUV', - 'llDetectedType', - 'llDetectedVel', - 'llDialog', - 'llDie', - 'llDumpList2String', - 'llEdgeOfWorld', - 'llEjectFromLand', - 'llEmail', - 'llEscapeURL', - 'llEuler2Rot', - 'llFabs', - 'llFloor', - 'llForceMouselook', - 'llFrand', - 'llGetAccel', - 'llGetAgentInfo', - 'llGetAgentLanguage', - 'llGetAgentSize', - 'llGetAlpha', - 'llGetAndResetTime', - 'llGetAnimation', - 'llGetAnimationList', - 'llGetAttached', - 'llGetBoundingBox', - 'llGetCameraPos', - 'llGetCameraRot', - 'llGetCenterOfMass', - 'llGetColor', - 'llGetCreator', - 'llGetDate', - 'llGetEnergy', - 'llGetForce', - 'llGetFreeMemory', - 'llGetGeometricCenter', - 'llGetGMTclock', - 'llGetInventoryCreator', - 'llGetInventoryKey', - 'llGetInventoryName', - 'llGetInventoryNumber', - 'llGetInventoryPermMask', - 'llGetInventoryType', - 'llGetKey', - 'llGetLandOwnerAt', - 'llGetLinkKey', - 'llGetLinkName', - 'llGetLinkNumber', - 'llGetListEntryType', - 'llGetListLength', - 'llGetLocalPos', - 'llGetLocalRot', - 'llGetMass', - 'llGetNextEmail', - 'llGetNotecardLine', - 'llGetNumberOfNotecardLines', - 'llGetNumberOfPrims', - 'llGetNumberOfSides', - 'llGetObjectDesc', - 'llGetObjectDetails', - 'llGetObjectMass', - 'llGetObjectName', - 'llGetObjectPermMask', - 'llGetObjectPrimCount', - 'llGetOmega', - 'llGetOwner', - 'llGetOwnerKey', - 'llGetParcelDetails', - 'llGetParcelFlags', - 'llGetParcelMaxPrims', - 'llGetParcelPrimCount', - 'llGetParcelPrimOwners', - 'llGetPermissions', - 'llGetPermissionsKey', - 'llGetPos', - 'llGetPrimitiveParams', - 'llGetRegionAgentCount', - 'llGetRegionCorner', - 'llGetRegionFlags', - 'llGetRegionFPS', - 'llGetRegionName', - 'llGetRegionTimeDilation', - 'llGetRootPosition', - 'llGetRootRotation', - 'llGetRot', - 'llGetScale', - 'llGetScriptName', - 'llGetScriptState', - 'llGetSimulatorHostname', - 'llGetStartParameter', - 'llGetStatus', - 'llGetSubString', - 'llGetSunDirection', - 'llGetTexture', - 'llGetTextureOffset', - 'llGetTextureRot', - 'llGetTextureScale', - 'llGetTime', - 'llGetTimeOfDay', - 'llGetTimestamp', - 'llGetTorque', - 'llGetUnixTime', - 'llGetVel', - 'llGetWallclock', - 'llGiveInventory', - 'llGiveInventoryList', - 'llGiveMoney', - 'llGround', - 'llGroundContour', - 'llGroundNormal', - 'llGroundRepel', - 'llGroundSlope', - 'llHTTPRequest', - 'llInsertString', - 'llInstantMessage', - 'llIntegerToBase64', - 'llKey2Name', - 'llList2CSV', - 'llList2Float', - 'llList2Integer', - 'llList2Key', - 'llList2List', - 'llList2ListStrided', - 'llList2Rot', - 'llList2String', - 'llList2Vector', - 'llListen', - 'llListenControl', - 'llListenRemove', - 'llListFindList', - 'llListInsertList', - 'llListRandomize', - 'llListReplaceList', - 'llListSort', - 'llListStatistics', - 'llLoadURL', - 'llLog', - 'llLog10', - 'llLookAt', - 'llLoopSound', - 'llLoopSoundMaster', - 'llLoopSoundSlave', - 'llMapDestination', - 'llMD5String', - 'llMessageLinked', - 'llMinEventDelay', - 'llModifyLand', - 'llModPow', - 'llMoveToTarget', - 'llOffsetTexture', - 'llOpenRemoteDataChannel', - 'llOverMyLand', - 'llOwnerSay', - 'llParcelMediaCommandList', - 'llParcelMediaQuery', - 'llParseString2List', - 'llParseStringKeepNulls', - 'llParticleSystem', - 'llPassCollisions', - 'llPassTouches', - 'llPlaySound', - 'llPlaySoundSlave', - 'llPow', - 'llPreloadSound', - 'llPushObject', - 'llRegionSay', - 'llReleaseControls', - 'llRemoteDataReply', - 'llRemoteDataSetRegion', - 'llRemoteLoadScriptPin', - 'llRemoveFromLandBanList', - 'llRemoveFromLandPassList', - 'llRemoveInventory', - 'llRemoveVehicleFlags', - 'llRequestAgentData', - 'llRequestInventoryData', - 'llRequestPermissions', - 'llRequestSimulatorData', - 'llResetLandBanList', - 'llResetLandPassList', - 'llResetOtherScript', - 'llResetScript', - 'llResetTime', - 'llRezAtRoot', - 'llRezObject', - 'llRot2Angle', - 'llRot2Axis', - 'llRot2Euler', - 'llRot2Fwd', - 'llRot2Left', - 'llRot2Up', - 'llRotateTexture', - 'llRotBetween', - 'llRotLookAt', - 'llRotTarget', - 'llRotTargetRemove', - 'llRound', - 'llSameGroup', - 'llSay', - 'llScaleTexture', - 'llScriptDanger', - 'llSendRemoteData', - 'llSensor', - 'llSensorRemove', - 'llSensorRepeat', - 'llSetAlpha', - 'llSetBuoyancy', - 'llSetCameraAtOffset', - 'llSetCameraEyeOffset', - 'llSetCameraParams', - 'llSetClickAction', - 'llSetColor', - 'llSetDamage', - 'llSetForce', - 'llSetForceAndTorque', - 'llSetHoverHeight', - 'llSetLinkAlpha', - 'llSetLinkColor', - 'llSetLinkPrimitiveParams', - 'llSetLinkTexture', - 'llSetLocalRot', - 'llSetObjectDesc', - 'llSetObjectName', - 'llSetParcelMusicURL', - 'llSetPayPrice', - 'llSetPos', - 'llSetPrimitiveParams', - 'llSetRemoteScriptAccessPin', - 'llSetRot', - 'llSetScale', - 'llSetScriptState', - 'llSetSitText', - 'llSetSoundQueueing', - 'llSetSoundRadius', - 'llSetStatus', - 'llSetText', - 'llSetTexture', - 'llSetTextureAnim', - 'llSetTimerEvent', - 'llSetTorque', - 'llSetTouchText', - 'llSetVehicleFlags', - 'llSetVehicleFloatParam', - 'llSetVehicleRotationParam', - 'llSetVehicleType', - 'llSetVehicleVectorParam', - 'llSHA1String', - 'llShout', - 'llSin', - 'llSitTarget', - 'llSleep', - 'llSqrt', - 'llStartAnimation', - 'llStopAnimation', - 'llStopHover', - 'llStopLookAt', - 'llStopMoveToTarget', - 'llStopSound', - 'llStringLength', - 'llStringToBase64', - 'llStringTrim', - 'llSubStringIndex', - 'llTakeControls', - 'llTan', - 'llTarget', - 'llTargetOmega', - 'llTargetRemove', - 'llTeleportAgentHome', - 'llToLower', - 'llToUpper', - 'llTriggerSound', - 'llTriggerSoundLimited', - 'llUnescapeURL', - 'llUnSit', - 'llVecDist', - 'llVecMag', - 'llVecNorm', - 'llVolumeDetect', - 'llWater', - 'llWhisper', - 'llWind', - 'llXorBase64StringsCorrect', - ), - 6 => array( // deprecated - 'llMakeExplosion', - 'llMakeFire', - 'llMakeFountain', - 'llMakeSmoke', - 'llSound', - 'llSoundPreload', - 'llXorBase64Strings', - ), - 7 => array( // unimplemented - 'llPointAt', - 'llRefreshPrimURL', - 'llReleaseCamera', - 'llRemoteLoadScript', - 'llSetPrimURL', - 'llStopPointAt', - 'llTakeCamera', - 'llTextBox', - ), - 8 => array( // God mode - 'llGodLikeRezObject', - 'llSetInventoryPermMask', - 'llSetObjectPermMask', - ), - ), - 'SYMBOLS' => array( - '{', '}', '(', ')', '[', ']', - '=', '+', '-', '*', '/', - '+=', '-=', '*=', '/=', '++', '--', - '!', '%', '&', '|', '&&', '||', - '==', '!=', '<', '>', '<=', '>=', - '~', '<<', '>>', '^', ':', - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => true, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true, - 8 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000ff;', - 2 => 'color: #000080;', - 3 => 'color: #008080;', - 4 => 'color: #228b22;', - 5 => 'color: #b22222;', - 6 => 'color: #8b0000; background-color: #ffff00;', - 7 => 'color: #8b0000; background-color: #fa8072;', - 8 => 'color: #000000; background-color: #ba55d3;', - ), - 'COMMENTS' => array( - 1 => 'color: #ff7f50; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #006400;' - ), - 'NUMBERS' => array( - 0 => 'color: #000000;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #000000;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://www.lslwiki.net/lslwiki/wakka.php?wakka={FNAME}', // http://wiki.secondlife.com/wiki/{FNAME} - 4 => 'http://www.lslwiki.net/lslwiki/wakka.php?wakka={FNAME}', // http://wiki.secondlife.com/wiki/{FNAME} - 5 => 'http://www.lslwiki.net/lslwiki/wakka.php?wakka={FNAME}', // http://wiki.secondlife.com/wiki/{FNAME} - 6 => 'http://www.lslwiki.net/lslwiki/wakka.php?wakka={FNAME}', // http://wiki.secondlife.com/wiki/{FNAME} - 7 => 'http://www.lslwiki.net/lslwiki/wakka.php?wakka={FNAME}', // http://wiki.secondlife.com/wiki/{FNAME} - 8 => 'http://www.lslwiki.net/lslwiki/wakka.php?wakka={FNAME}', // http://wiki.secondlife.com/wiki/{FNAME} - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/lua.php b/_piecrust/libs/Geshi/geshi/lua.php deleted file mode 100644 index 2d43b84..0000000 --- a/_piecrust/libs/Geshi/geshi/lua.php +++ /dev/null @@ -1,137 +0,0 @@ - 'Lua', - 'COMMENT_SINGLE' => array(1 => "--"), - 'COMMENT_MULTI' => array('--[[' => ']]'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'and','break','do','else','elseif','end','false','for','function','if', - 'in','local','nil','not','or','repeat','return','then','true','until','while', - '_VERSION','assert','collectgarbage','dofile','error','gcinfo','loadfile','loadstring', - 'print','tonumber','tostring','type','unpack', - '_ALERT','_ERRORMESSAGE','_INPUT','_PROMPT','_OUTPUT', - '_STDERR','_STDIN','_STDOUT','call','dostring','foreach','foreachi','getn','globals','newtype', - 'rawget','rawset','require','sort','tinsert','tremove', - 'abs','acos','asin','atan','atan2','ceil','cos','deg','exp', - 'floor','format','frexp','gsub','ldexp','log','log10','max','min','mod','rad','random','randomseed', - 'sin','sqrt','strbyte','strchar','strfind','strlen','strlower','strrep','strsub','strupper','tan', - 'openfile','closefile','readfrom','writeto','appendto', - 'remove','rename','flush','seek','tmpfile','tmpname','read','write', - 'clock','date','difftime','execute','exit','getenv','setlocale','time', - '_G','getfenv','getmetatable','ipairs','loadlib','next','pairs','pcall', - 'rawegal','setfenv','setmetatable','xpcall', - 'string.byte','string.char','string.dump','string.find','string.len', - 'string.lower','string.rep','string.sub','string.upper','string.format','string.gfind','string.gsub', - 'table.concat','table.foreach','table.foreachi','table.getn','table.sort','table.insert','table.remove','table.setn', - 'math.abs','math.acos','math.asin','math.atan','math.atan2','math.ceil','math.cos','math.deg','math.exp', - 'math.floor','math.frexp','math.ldexp','math.log','math.log10','math.max','math.min','math.mod', - 'math.pi','math.rad','math.random','math.randomseed','math.sin','math.sqrt','math.tan', - 'coroutine.create','coroutine.resume','coroutine.status', - 'coroutine.wrap','coroutine.yield', - 'io.close','io.flush','io.input','io.lines','io.open','io.output','io.read','io.tmpfile','io.type','io.write', - 'io.stdin','io.stdout','io.stderr', - 'os.clock','os.date','os.difftime','os.execute','os.exit','os.getenv','os.remove','os.rename', - 'os.setlocale','os.time','os.tmpname', - 'string','table','math','coroutine','io','os','debug' - ) - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>', '=', ';' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 0 => 'color: #b1b100;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/m68k.php b/_piecrust/libs/Geshi/geshi/m68k.php deleted file mode 100644 index 3c0dfc2..0000000 --- a/_piecrust/libs/Geshi/geshi/m68k.php +++ /dev/null @@ -1,143 +0,0 @@ - 'Motorola 68000 Assembler', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - /*CPU*/ - 1 => array( - 'adc','add','ais','aix','and','asl','asr','bcc','bclr','bcs','beq', - 'bge','bgt','bhcc','bhcs','bhi','bhs','bih','bil','bit','ble','blo', - 'bls','blt','bmc','bmi','bms','bne','bpl','bra','brclr','brn', - 'brset','bset','bsr','cbeq','clc','cli','clr','cmp','com','cphx', - 'cpx','daa','dbnz','dec','div','eor','inc','jmp','jsr','lda','ldhx', - 'ldx','lsl','lsr','mov','mul','neg','nop','nsa','ora','psha','pshh', - 'pshx','pula','pulh','pulx','rol','ror','rsp','rti','rts','sbc', - 'sec','sei','sta','sthx','stop','stx','sub','swi','tap','tax','tpa', - 'tst','tsx','txa','txs','wait' - ), - /*registers*/ - 2 => array( - 'a','h','x', - 'hx','sp' - ), - /*Directive*/ - 3 => array( - '#define','#endif','#else','#ifdef','#ifndef','#include','#undef', - '.db','.dd','.df','.dq','.dt','.dw','.end','.org','equ' - ), - ), - 'SYMBOLS' => array( - ',' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000ff; font-weight:bold;', - 2 => 'color: #0000ff;', - 3 => 'color: #46aa03; font-weight:bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #adadad; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #0000ff;' - ), - 'STRINGS' => array( - 0 => 'color: #7f007f;' - ), - 'NUMBERS' => array( - 0 => 'color: #dd22dd;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #008000;' - ), - 'REGEXPS' => array( - 0 => 'color: #22bbff;', - 1 => 'color: #22bbff;', - 2 => 'color: #993333;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - //Hex numbers - 0 => '#?0[0-9a-fA-F]{1,32}[hH]', - //Binary numbers - 1 => '\%[01]{1,64}[bB]', - //Labels - 2 => '^[_a-zA-Z][_a-zA-Z0-9]*?\:' - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 8 -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/magiksf.php b/_piecrust/libs/Geshi/geshi/magiksf.php deleted file mode 100644 index 5cb21af..0000000 --- a/_piecrust/libs/Geshi/geshi/magiksf.php +++ /dev/null @@ -1,193 +0,0 @@ - null, - 'LANG_NAME' => 'MagikSF', - 'COMMENT_SINGLE' => array(1 => '##', 2 => '#%', 3 => '#'), - 'COMMENT_MULTI' => array("_pragma(" => ")"), - //Multiline-continued single-line comments - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - '_block', '_endblock', '_proc', '_endproc', '_loop', '_endloop', - '_method', '_endmethod', - '_protect', '_endprotect', '_protection', '_locking', - '_continue', - ), - 2 => array( - '_self', '_thisthread', '_pragma', '_private', '_abstract', - '_local', '_global', '_dynamic', '_package', '_constant', - '_import', '_iter', '_lock', '_optional', '_recursive', '_super' - ), - 3 => array( - '_if', '_endif', '_then', '_else', '_elif', '_orif', '_andif', '_for', '_over', - '_try', '_endtry', '_when', '_throw', '_catch', '_endcatch', '_handling', - '_finally', '_loopbody', '_return', '_leave', '_with' - ), - 4 => array( - '_false', '_true', '_maybe', '_unset', '_no_way' - ), - 5 => array( - '_mod', '_div', '_or', '_and', '_cf', '_is', '_isnt', '_not', '_gather', '_scatter', - '_allresults', '_clone', '_xor' - ), - 6 => array( - 'def_slotted_exemplar', 'write_string', 'write', 'condition', - 'record_transaction', 'gis_program_manager', 'perform', 'define_shared_constant', - 'property_list', 'rope', 'def_property', 'def_mixin' - ), - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', - '+', '-', '*', '/', '**', - '=', '<', '>', '<<', '>>', - ',', '$', - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #ff3f3f;', - 3 => 'color: #3f7f3f; font-weight: bold;', - 4 => 'color: #cc66cc;', - 5 => 'color: #ff3fff; font-weight: bold;', - 6 => 'font-weight: bold;', - ), - 'COMMENTS' => array( - 1 => 'color: #339933; font-weight: bold;', - 2 => 'color: #993333;', - 3 => 'color: #339933;', - 'MULTI' => 'color: #7f7f7f; font-style: italic', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #ff3f3f;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #202020;', - 2 => 'color: #202020;' - ), - 'SYMBOLS' => array( - 0 => 'color: #ff3f3f;' - ), - 'REGEXPS' => array( - 1 => 'color: #3f3fff;', - 2 => 'color: #3f3fff;', - 3 => 'color: #cc66cc;', - 4 => 'color: #7f3f7f; font-style: italic;', - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - 1 => array( - GESHI_SEARCH => '\b[a-zA-Z0-9_]+:', // package identifiers - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - 2 => array( - GESHI_SEARCH => ':(?:[a-zA-Z0-9!?_]+|(?:[].*?[]))*', //symbols - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - 3 => array( - GESHI_SEARCH => '%space|%tab|%newline|%.', //characters - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - 4 => array( - GESHI_SEARCH => '@(?:[a-zA-Z0-9!?_]+|(?:[].*?[]))*', //symbols - GESHI_REPLACE => '\\0', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/make.php b/_piecrust/libs/Geshi/geshi/make.php deleted file mode 100644 index fe49583..0000000 --- a/_piecrust/libs/Geshi/geshi/make.php +++ /dev/null @@ -1,151 +0,0 @@ - - * Copyright: (c) 2008 Neil Bird - * Release Version: 1.0.8.9 - * Date Started: 2008/08/26 - * - * make language file for GeSHi. - * - * (GNU make specific) - * - * CHANGES - * ------- - * 2008/09/05 (1.0.0) - * - First Release - * - ************************************************************************************* - * - * This file is part of GeSHi. - * - * GeSHi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GeSHi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeSHi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - ************************************************************************************/ - -$language_data = array ( - 'LANG_NAME' => 'GNU make', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_REGEXP' => array( - //Escaped String Starters - 2 => "/\\\\['\"]/siU" - ), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - // core - 'ifeq', 'else', 'endif', 'ifneq', 'ifdef', 'ifndef', - 'include', 'vpath', 'export', 'unexport', 'override', - 'info', 'warning', 'error' - ), - 2 => array( - // macros, literals - '.SUFFIXES', '.PHONY', '.DEFAULT', '.PRECIOUS', '.IGNORE', '.SILENT', '.EXPORT_ALL_VARIABLES', '.KEEP_STATE', - '.LIBPATTERNS', '.NOTPARALLEL', '.DELETE_ON_ERROR', '.INTERMEDIATE', '.POSIX', '.SECONDARY' - ), - /* - 3 => array( - // funcs - see regex - //'subst', 'addprefix', 'addsuffix', 'basename', 'call', 'dir', 'error', 'eval', 'filter-out', 'filter', - //'findstring', 'firstword', 'foreach', 'if', 'join', 'notdir', 'origin', 'patsubst', 'shell', 'sort', 'strip', - //'suffix', 'warning', 'wildcard', 'word', 'wordlist', 'words' - )*/ - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', - '!', '@', '%', '&', '|', '/', - '<', '>', - '=', '-', '+', '*', - '.', ':', ',', ';', - '$' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - //3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #666622; font-weight: bold;', - 2 => 'color: #990000;', - //3 => 'color: #000000; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #339900; font-style: italic;', - 2 => 'color: #000099; font-weight: bold;', - 'MULTI' => '' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( # keep same as symbols so as to make ${} and $() equiv. - 0 => 'color: #004400;' - ), - 'STRINGS' => array( - 0 => 'color: #CC2200;' - ), - 'NUMBERS' => array( - 0 => 'color: #CC2200;' - ), - 'SYMBOLS' => array( - 0 => 'color: #004400;' - ), - 'REGEXPS' => array( - 0 => 'color: #000088; font-weight: bold;', - 1 => 'color: #0000CC; font-weight: bold;', - 2 => 'color: #000088;' - ), - 'SCRIPT' => array(), - 'METHODS' => array() - ), - 'URLS' => array( - 1 => '', - 2 => '', - //3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array( - //Simple variables - 0 => "\\$(?:[^{(&]|&(?:amp|lt|gt);)", - //Complex variables/functions [built-ins] - 1 => array( - GESHI_SEARCH => '(\\$[({])(subst|addprefix|addsuffix|basename|call|dir|error|eval|filter-out|filter,|findstring|firstword|foreach|if|join|notdir|origin|patsubst|shell|sort|strip,|suffix|warning|wildcard|word|wordlist|words)([ })])', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ), - //Complex variables/functions [others] - 2 => array( - GESHI_SEARCH => '(\\$[({])([A-Za-z_][A-Za-z_0-9]*)([ })])', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ), - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'TAB_WIDTH' => 8 -// vim: set sw=4 sts=4 : -); -?> diff --git a/_piecrust/libs/Geshi/geshi/mapbasic.php b/_piecrust/libs/Geshi/geshi/mapbasic.php deleted file mode 100644 index c8cf0e1..0000000 --- a/_piecrust/libs/Geshi/geshi/mapbasic.php +++ /dev/null @@ -1,908 +0,0 @@ - 'MapBasic', - 'COMMENT_SINGLE' => array(1 => "'"), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( -/* - 1 - Statements + Clauses + Data Types + Logical Operators, Geographical Operators + SQL - 2 - Special Procedures - 3 - Functions - 4 - Constants - 5 - Extended keywords (case sensitive) -*/ - 1 => array( - 'Add', 'Alias', 'All', 'Alter', 'And', 'Any', 'Application', 'Arc', - 'Area', 'As', 'AutoLabel', 'Bar', 'Beep', 'Begin', 'Bind', - 'Browse', 'Brush', 'BrushPicker', 'Button', 'ButtonPad', - 'ButtonPads', 'BY', 'Call', 'CancelButton', 'Cartographic', 'Case', - 'CharSet', 'Check', 'CheckBox', 'Clean', 'Close', 'Collection', - 'Column', 'Combine', 'Command', 'Commit', 'Connection', - 'ConnectionNumber', 'Contains', 'Continue', 'Control', 'CoordSys', - 'Create', 'Cutter', 'Date', 'Datum', 'DDEExecute', 'DDEPoke', - 'DDETerminate', 'DDETerminateAll', 'Declare', 'Default', 'Define', - 'Delete', 'Dialog', 'Digitizer', 'Dim', 'Disaggregate', - 'Disconnect', 'Distance', 'Do', 'Document', 'DocumentWindow', - 'Drag', 'Drop', 'EditText', 'Ellipse', 'Enclose', 'End', 'Entire', - 'Entirely', 'Erase', 'Error', 'Event', 'Exit', 'Export', - 'Farthest', 'Fetch', 'File', 'Find', 'Float', 'FME', 'Font', - 'FontPicker', 'For', 'Format', 'Frame', 'From', 'Function', - 'Geocode', 'Get', 'Global', 'Goto', 'Graph', 'Grid', 'GROUP', - 'GroupBox', 'Handler', 'If', 'Import', 'In', 'Include', 'Index', - 'Info', 'Input', 'Insert', 'Integer', 'Intersect', 'Intersects', - 'INTO', 'Isogram', 'Item', 'Kill', 'Layout', 'Legend', 'Line', - 'Link', 'ListBox', 'Logical', 'Loop', 'Map', 'Map3D', 'MapInfo', - 'MapInfoDialog', 'Menu', 'Merge', 'Metadata', 'Method', 'Mod', - 'Move', 'MultiListBox', 'MultiPoint', 'MWS', 'Nearest', 'Next', - 'NOSELECT', 'Not', 'Note', 'Object', 'Objects', 'Offset', - 'OKButton', 'OnError', 'Open', 'Or', 'ORDER', 'Overlay', 'Pack', - 'Paper', 'Part', 'Partly', 'Pen', 'PenPicker', 'Pline', 'Point', - 'PopupMenu', 'Preserve', 'Print', 'PrintWin', 'PrismMap', - 'Processing', 'Program', 'ProgressBar', 'ProgressBars', 'Put', - 'RadioGroup', 'Randomize', 'Ranges', 'Rect', 'ReDim', - 'Redistricter', 'Refresh', 'Region', 'Register', 'Relief', - 'Reload', 'Remove', 'Rename', 'Report', 'Reproject', 'Resolution', - 'Resume', 'Rollback', 'RoundRect', 'RowID', 'Run', 'Save', 'Seek', - 'Select', 'Selection', 'Server', 'Set', 'Shade', 'SmallInt', - 'Snap', 'Split', 'StaticText', 'StatusBar', 'Stop', 'String', - 'Style', 'Styles', 'Sub', 'Symbol', 'SymbolPicker', 'Symbols', - 'Table', 'Target', 'Terminate', 'Text', 'Then', 'Threshold', - 'Timeout', 'To', 'Transaction', 'Transform', 'Type', 'UnDim', - 'Units', 'Unlink', 'Update', 'Using', 'VALUES', 'Version', - 'Versioning', 'Wend', 'WFS', 'WHERE', 'While', 'Window', 'Within', - 'Workspace', 'Write' - ), - 2 => array( - 'EndHandler', 'ForegroundTaskSwitchHandler', 'Main', - 'RemoteMapGenHandler', 'RemoteMsgHandler', 'SelChangedHandler', - 'ToolHandler', 'WinChangedHandler', 'WinClosedHandler', - 'WinFocusChangedHandler' - ), - 3 => array( - 'Abs', 'Acos', 'ApplicationDirectory$', 'AreaOverlap', 'Asc', - 'Asin', 'Ask', 'Atn', 'Avg', 'Buffer', 'ButtonPadInfo', - 'CartesianArea', 'CartesianBuffer', 'CartesianConnectObjects', - 'CartesianDistance', 'CartesianObjectDistance', - 'CartesianObjectLen', 'CartesianOffset', 'CartesianOffsetXY', - 'CartesianPerimeter', 'Centroid', 'CentroidX', 'CentroidY', - 'ChooseProjection$', 'Chr$', 'ColumnInfo', 'CommandInfo', - 'ConnectObjects', 'ControlPointInfo', 'ConvertToPline', - 'ConvertToRegion', 'ConvexHull', 'CoordSysName$', 'Cos', 'Count', - 'CreateCircle', 'CreateLine', 'CreatePoint', 'CreateText', - 'CurDate', 'CurrentBorderPen', 'CurrentBrush', 'CurrentFont', - 'CurrentLinePen', 'CurrentPen', 'CurrentSymbol', 'DateWindow', - 'Day', 'DDEInitiate', 'DDERequest$', 'DeformatNumber$', 'EOF', - 'EOT', 'EPSGToCoordSysString$', 'Err', 'Error$', 'Exp', - 'ExtractNodes', 'FileAttr', 'FileExists', 'FileOpenDlg', - 'FileSaveAsDlg', 'Fix', 'Format$', 'FormatDate$', 'FormatNumber$', - 'FrontWindow', 'GeocodeInfo', 'GetFolderPath$', 'GetGridCellValue', - 'GetMetadata$', 'GetSeamlessSheet', 'GridTableInfo', - 'HomeDirectory$', 'InStr', 'Int', 'IntersectNodes', - 'IsGridCellNull', 'IsogramInfo', 'IsPenWidthPixels', - 'LabelFindByID', 'LabelFindFirst', 'LabelFindNext', 'LabelInfo', - 'LayerInfo', 'LCase$', 'Left$', 'LegendFrameInfo', 'LegendInfo', - 'LegendStyleInfo', 'Len', 'Like', 'LocateFile$', 'LOF', 'Log', - 'LTrim$', 'MakeBrush', 'MakeCustomSymbol', 'MakeFont', - 'MakeFontSymbol', 'MakePen', 'MakeSymbol', 'Map3DInfo', - 'MapperInfo', 'Max', 'Maximum', 'MBR', 'MenuItemInfoByHandler', - 'MenuItemInfoByID', 'MGRSToPoint', 'MICloseContent', - 'MICloseFtpConnection', 'MICloseFtpFileFind', - 'MICloseHttpConnection', 'MICloseHttpFile', 'MICloseSession', - 'MICreateSession', 'MICreateSessionFull', 'Mid$', 'MidByte$', - 'MIErrorDlg', 'MIFindFtpFile', 'MIFindNextFtpFile', 'MIGetContent', - 'MIGetContentBuffer', 'MIGetContentLen', 'MIGetContentString', - 'MIGetContentToFile', 'MIGetContentType', - 'MIGetCurrentFtpDirectory', 'MIGetErrorCode', 'MIGetErrorMessage', - 'MIGetFileURL', 'MIGetFtpConnection', 'MIGetFtpFile', - 'MIGetFtpFileFind', 'MIGetFtpFileName', 'MIGetHttpConnection', - 'MIIsFtpDirectory', 'MIIsFtpDots', 'Min', 'Minimum', - 'MIOpenRequest', 'MIOpenRequestFull', 'MIParseURL', 'MIPutFtpFile', - 'MIQueryInfo', 'MIQueryInfoStatusCode', 'MISaveContent', - 'MISendRequest', 'MISendSimpleRequest', 'MISetCurrentFtpDirectory', - 'MISetSessionTimeout', 'MIXmlAttributeListDestroy', - 'MIXmlDocumentCreate', 'MIXmlDocumentDestroy', - 'MIXmlDocumentGetNamespaces', 'MIXmlDocumentGetRootNode', - 'MIXmlDocumentLoad', 'MIXmlDocumentLoadXML', - 'MIXmlDocumentLoadXMLString', 'MIXmlDocumentSetProperty', - 'MIXmlGetAttributeList', 'MIXmlGetChildList', - 'MIXmlGetNextAttribute', 'MIXmlGetNextNode', 'MIXmlNodeDestroy', - 'MIXmlNodeGetAttributeValue', 'MIXmlNodeGetFirstChild', - 'MIXmlNodeGetName', 'MIXmlNodeGetParent', 'MIXmlNodeGetText', - 'MIXmlNodeGetValue', 'MIXmlNodeListDestroy', 'MIXmlSCDestroy', - 'MIXmlSCGetLength', 'MIXmlSCGetNamespace', 'MIXmlSelectNodes', - 'MIXmlSelectSingleNode', 'Month', 'NumAllWindows', 'NumberToDate', - 'NumCols', 'NumTables', 'NumWindows', 'ObjectDistance', - 'ObjectGeography', 'ObjectInfo', 'ObjectLen', 'ObjectNodeHasM', - 'ObjectNodeHasZ', 'ObjectNodeM', 'ObjectNodeX', 'ObjectNodeY', - 'ObjectNodeZ', 'OffsetXY', 'Overlap', 'OverlayNodes', - 'PathToDirectory$', 'PathToFileName$', 'PathToTableName$', - 'PenWidthToPoints', 'Perimeter', 'PointsToPenWidth', - 'PointToMGRS$', 'PrismMapInfo', 'ProgramDirectory$', 'Proper$', - 'ProportionOverlap', 'RasterTableInfo', 'ReadControlValue', - 'RegionInfo', 'RemoteQueryHandler', 'RGB', 'Right$', 'Rnd', - 'Rotate', 'RotateAtPoint', 'Round', 'RTrim$', 'SearchInfo', - 'SearchPoint', 'SearchRect', 'SelectionInfo', 'Server_ColumnInfo', - 'Server_Connect', 'Server_ConnectInfo', 'Server_DriverInfo', - 'Server_EOT', 'Server_Execute', 'Server_GetODBCHConn', - 'Server_GetODBCHStmt', 'Server_NumCols', 'Server_NumDrivers', - 'SessionInfo', 'Sgn', 'Sin', 'Space$', 'SphericalArea', - 'SphericalConnectObjects', 'SphericalDistance', - 'SphericalObjectDistance', 'SphericalObjectLen', 'SphericalOffset', - 'SphericalOffsetXY', 'SphericalPerimeter', 'Sqr', 'Str$', - 'String$', 'StringCompare', 'StringCompareIntl', 'StringToDate', - 'StyleAttr', 'Sum', 'SystemInfo', 'TableInfo', 'Tan', - 'TempFileName$', 'TextSize', 'Time', 'Timer', 'TriggerControl', - 'TrueFileName$', 'UBound', 'UCase$', 'UnitAbbr$', 'UnitName$', - 'Val', 'Weekday', 'WindowID', 'WindowInfo', 'WtAvg', 'Year' - ), - 4 => array( - 'BLACK', 'BLUE', 'BRUSH_BACKCOLOR', 'BRUSH_FORECOLOR', - 'BRUSH_PATTERN', 'BTNPAD_INFO_FLOATING', 'BTNPAD_INFO_NBTNS', - 'BTNPAD_INFO_WIDTH', 'BTNPAD_INFO_WINID', 'BTNPAD_INFO_X', - 'BTNPAD_INFO_Y', 'CLS', 'CMD_INFO_CTRL', 'CMD_INFO_CUSTOM_OBJ', - 'CMD_INFO_DLG_DBL', 'CMD_INFO_DLG_OK', 'CMD_INFO_EDIT_ASK', - 'CMD_INFO_EDIT_DISCARD', 'CMD_INFO_EDIT_SAVE', - 'CMD_INFO_EDIT_STATUS', 'CMD_INFO_EDIT_TABLE', 'CMD_INFO_FIND_RC', - 'CMD_INFO_FIND_ROWID', 'CMD_INFO_HL_FILE_NAME', - 'CMD_INFO_HL_LAYER_ID', 'CMD_INFO_HL_ROWID', - 'CMD_INFO_HL_TABLE_NAME', 'CMD_INFO_HL_WINDOW_ID', - 'CMD_INFO_INTERRUPT', 'CMD_INFO_MENUITEM', 'CMD_INFO_MSG', - 'CMD_INFO_ROWID', 'CMD_INFO_SELTYPE', 'CMD_INFO_SHIFT', - 'CMD_INFO_STATUS', 'CMD_INFO_TASK_SWITCH', 'CMD_INFO_TOOLBTN', - 'CMD_INFO_WIN', 'CMD_INFO_X', 'CMD_INFO_X2', 'CMD_INFO_XCMD', - 'CMD_INFO_Y', 'CMD_INFO_Y2', 'COL_INFO_DECPLACES', - 'COL_INFO_EDITABLE', 'COL_INFO_INDEXED', 'COL_INFO_NAME', - 'COL_INFO_NUM', 'COL_INFO_TYPE', 'COL_INFO_WIDTH', 'COL_TYPE_CHAR', - 'COL_TYPE_DATE', 'COL_TYPE_DATETIME', 'COL_TYPE_DECIMAL', - 'COL_TYPE_FLOAT', 'COL_TYPE_GRAPHIC', 'COL_TYPE_INTEGER', - 'COL_TYPE_LOGICAL', 'COL_TYPE_SMALLINT', 'COL_TYPE_TIME', 'CYAN', - 'DATE_WIN_CURPROG', 'DATE_WIN_SESSION', 'DEG_2_RAD', - 'DICTIONARY_ADDRESS_ONLY', 'DICTIONARY_ALL', - 'DICTIONARY_PREFER_ADDRESS', 'DICTIONARY_PREFER_USER', - 'DICTIONARY_USER_ONLY', 'DM_CUSTOM_CIRCLE', 'DM_CUSTOM_ELLIPSE', - 'DM_CUSTOM_LINE', 'DM_CUSTOM_POINT', 'DM_CUSTOM_POLYGON', - 'DM_CUSTOM_POLYLINE', 'DM_CUSTOM_RECT', 'DMPAPER_10X11', - 'DMPAPER_10X14', 'DMPAPER_11X17', 'DMPAPER_12X11', 'DMPAPER_15X11', - 'DMPAPER_9X11', 'DMPAPER_A_PLUS', 'DMPAPER_A2', 'DMPAPER_A3', - 'DMPAPER_A3_EXTRA', 'DMPAPER_A3_EXTRA_TRANSVERSE', - 'DMPAPER_A3_ROTATED', 'DMPAPER_A3_TRANSVERSE', 'DMPAPER_A4', - 'DMPAPER_A4_EXTRA', 'DMPAPER_A4_PLUS', 'DMPAPER_A4_ROTATED', - 'DMPAPER_A4_TRANSVERSE', 'DMPAPER_A4SMALL', 'DMPAPER_A5', - 'DMPAPER_A5_EXTRA', 'DMPAPER_A5_ROTATED', 'DMPAPER_A5_TRANSVERSE', - 'DMPAPER_A6', 'DMPAPER_A6_ROTATED', 'DMPAPER_B_PLUS', 'DMPAPER_B4', - 'DMPAPER_B4_JIS_ROTATED', 'DMPAPER_B5', 'DMPAPER_B5_EXTRA', - 'DMPAPER_B5_JIS_ROTATED', 'DMPAPER_B5_TRANSVERSE', - 'DMPAPER_B6_JIS', 'DMPAPER_B6_JIS_ROTATED', 'DMPAPER_CSHEET', - 'DMPAPER_DBL_JAPANESE_POSTCARD', - 'DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED', 'DMPAPER_DSHEET', - 'DMPAPER_ENV_10', 'DMPAPER_ENV_11', 'DMPAPER_ENV_12', - 'DMPAPER_ENV_14', 'DMPAPER_ENV_9', 'DMPAPER_ENV_B4', - 'DMPAPER_ENV_B5', 'DMPAPER_ENV_B6', 'DMPAPER_ENV_C3', - 'DMPAPER_ENV_C4', 'DMPAPER_ENV_C5', 'DMPAPER_ENV_C6', - 'DMPAPER_ENV_C65', 'DMPAPER_ENV_DL', 'DMPAPER_ENV_INVITE', - 'DMPAPER_ENV_ITALY', 'DMPAPER_ENV_MONARCH', 'DMPAPER_ENV_PERSONAL', - 'DMPAPER_ESHEET', 'DMPAPER_EXECUTIVE', - 'DMPAPER_FANFOLD_LGL_GERMAN', 'DMPAPER_FANFOLD_STD_GERMAN', - 'DMPAPER_FANFOLD_US', 'DMPAPER_FIRST', 'DMPAPER_FOLIO', - 'DMPAPER_ISO_B4', 'DMPAPER_JAPANESE_POSTCARD', - 'DMPAPER_JAPANESE_POSTCARD_ROTATED', 'DMPAPER_JENV_CHOU3', - 'DMPAPER_JENV_CHOU3_ROTATED', 'DMPAPER_JENV_CHOU4', - 'DMPAPER_JENV_CHOU4_ROTATED', 'DMPAPER_JENV_KAKU2', - 'DMPAPER_JENV_KAKU2_ROTATED', 'DMPAPER_JENV_KAKU3', - 'DMPAPER_JENV_KAKU3_ROTATED', 'DMPAPER_JENV_YOU4', - 'DMPAPER_JENV_YOU4_ROTATED', 'DMPAPER_LEDGER', 'DMPAPER_LEGAL', - 'DMPAPER_LEGAL_EXTRA', 'DMPAPER_LETTER', 'DMPAPER_LETTER_EXTRA', - 'DMPAPER_LETTER_EXTRA_TRANSVERSE', 'DMPAPER_LETTER_PLUS', - 'DMPAPER_LETTER_ROTATED', 'DMPAPER_LETTER_TRANSVERSE', - 'DMPAPER_LETTERSMALL', 'DMPAPER_NOTE', 'DMPAPER_P16K', - 'DMPAPER_P16K_ROTATED', 'DMPAPER_P32K', 'DMPAPER_P32K_ROTATED', - 'DMPAPER_P32KBIG', 'DMPAPER_P32KBIG_ROTATED', 'DMPAPER_PENV_1', - 'DMPAPER_PENV_1_ROTATED', 'DMPAPER_PENV_10', - 'DMPAPER_PENV_10_ROTATED', 'DMPAPER_PENV_2', - 'DMPAPER_PENV_2_ROTATED', 'DMPAPER_PENV_3', - 'DMPAPER_PENV_3_ROTATED', 'DMPAPER_PENV_4', - 'DMPAPER_PENV_4_ROTATED', 'DMPAPER_PENV_5', - 'DMPAPER_PENV_5_ROTATED', 'DMPAPER_PENV_6', - 'DMPAPER_PENV_6_ROTATED', 'DMPAPER_PENV_7', - 'DMPAPER_PENV_7_ROTATED', 'DMPAPER_PENV_8', - 'DMPAPER_PENV_8_ROTATED', 'DMPAPER_PENV_9', - 'DMPAPER_PENV_9_ROTATED', 'DMPAPER_QUARTO', 'DMPAPER_RESERVED_48', - 'DMPAPER_RESERVED_49', 'DMPAPER_STATEMENT', 'DMPAPER_TABLOID', - 'DMPAPER_TABLOID_EXTRA', 'DMPAPER_USER', 'ERR_BAD_WINDOW', - 'ERR_BAD_WINDOW_NUM', 'ERR_CANT_ACCESS_FILE', - 'ERR_CANT_INITIATE_LINK', 'ERR_CMD_NOT_SUPPORTED', - 'ERR_FCN_ARG_RANGE', 'ERR_FCN_INVALID_FMT', - 'ERR_FCN_OBJ_FETCH_FAILED', 'ERR_FILEMGR_NOTOPEN', - 'ERR_FP_MATH_LIB_DOMAIN', 'ERR_FP_MATH_LIB_RANGE', - 'ERR_INVALID_CHANNEL', 'ERR_INVALID_READ_CONTROL', - 'ERR_INVALID_TRIG_CONTROL', 'ERR_NO_FIELD', - 'ERR_NO_RESPONSE_FROM_APP', 'ERR_NULL_SELECTION', - 'ERR_PROCESS_FAILED_IN_APP', 'ERR_TABLE_NOT_FOUND', - 'ERR_WANT_MAPPER_WIN', 'FALSE', 'FILE_ATTR_FILESIZE', - 'FILE_ATTR_MODE', 'FILTER_ALL_DIRECTIONS_1', - 'FILTER_ALL_DIRECTIONS_2', 'FILTER_DIAGONALLY', - 'FILTER_HORIZONTALLY', 'FILTER_VERTICALLY', - 'FILTER_VERTICALLY_AND_HORIZONTALLY', 'FOLDER_APPDATA', - 'FOLDER_COMMON_APPDATA', 'FOLDER_COMMON_DOCS', - 'FOLDER_LOCAL_APPDATA', 'FOLDER_MI_APPDATA', - 'FOLDER_MI_COMMON_APPDATA', 'FOLDER_MI_LOCAL_APPDATA', - 'FOLDER_MI_PREFERENCE', 'FOLDER_MYDOCS', 'FOLDER_MYPICS', - 'FONT_BACKCOLOR', 'FONT_FORECOLOR', 'FONT_NAME', 'FONT_POINTSIZE', - 'FONT_STYLE', 'FRAME_INFO_BORDER_PEN', 'FRAME_INFO_COLUMN', - 'FRAME_INFO_HEIGHT', 'FRAME_INFO_LABEL', 'FRAME_INFO_MAP_LAYER_ID', - 'FRAME_INFO_NUM_STYLES', 'FRAME_INFO_POS_X', 'FRAME_INFO_POS_Y', - 'FRAME_INFO_REFRESHABLE', 'FRAME_INFO_SUBTITLE', - 'FRAME_INFO_SUBTITLE_FONT', 'FRAME_INFO_TITLE', - 'FRAME_INFO_TITLE_FONT', 'FRAME_INFO_TYPE', 'FRAME_INFO_VISIBLE', - 'FRAME_INFO_WIDTH', 'FRAME_TYPE_STYLE', 'FRAME_TYPE_THEME', - 'GEO_CONTROL_POINT_X', 'GEO_CONTROL_POINT_Y', 'GEOCODE_BATCH_SIZE', - 'GEOCODE_COUNT_GEOCODED', 'GEOCODE_COUNT_NOTGEOCODED', - 'GEOCODE_COUNTRY_SUBDIVISION', 'GEOCODE_COUNTRY_SUBDIVISION2', - 'GEOCODE_DICTIONARY', 'GEOCODE_FALLBACK_GEOGRAPHIC', - 'GEOCODE_FALLBACK_POSTAL', 'GEOCODE_MAX_BATCH_SIZE', - 'GEOCODE_MIXED_CASE', 'GEOCODE_MUNICIPALITY', - 'GEOCODE_MUNICIPALITY2', 'GEOCODE_OFFSET_CENTER', - 'GEOCODE_OFFSET_CENTER_UNITS', 'GEOCODE_OFFSET_END', - 'GEOCODE_OFFSET_END_UNITS', 'GEOCODE_PASSTHROUGH', - 'GEOCODE_POSTAL_CODE', 'GEOCODE_RESULT_MARK_MULTIPLE', - 'GEOCODE_STREET_NAME', 'GEOCODE_STREET_NUMBER', - 'GEOCODE_UNABLE_TO_CONVERT_DATA', 'GREEN', - 'GRID_TAB_INFO_HAS_HILLSHADE', 'GRID_TAB_INFO_MAX_VALUE', - 'GRID_TAB_INFO_MIN_VALUE', 'HOTLINK_INFO_ENABLED', - 'HOTLINK_INFO_EXPR', 'HOTLINK_INFO_MODE', 'HOTLINK_INFO_RELATIVE', - 'HOTLINK_MODE_BOTH', 'HOTLINK_MODE_LABEL', 'HOTLINK_MODE_OBJ', - 'IMAGE_CLASS_BILEVEL', 'IMAGE_CLASS_GREYSCALE', - 'IMAGE_CLASS_PALETTE', 'IMAGE_CLASS_RGB', 'IMAGE_TYPE_GRID', - 'IMAGE_TYPE_RASTER', 'INCL_ALL', 'INCL_COMMON', 'INCL_CROSSINGS', - 'ISOGRAM_AMBIENT_SPEED_DIST_UNIT', - 'ISOGRAM_AMBIENT_SPEED_TIME_UNIT', 'ISOGRAM_BANDING', - 'ISOGRAM_BATCH_SIZE', 'ISOGRAM_DEFAULT_AMBIENT_SPEED', - 'ISOGRAM_MAJOR_POLYGON_ONLY', 'ISOGRAM_MAJOR_ROADS_ONLY', - 'ISOGRAM_MAX_BANDS', 'ISOGRAM_MAX_BATCH_SIZE', - 'ISOGRAM_MAX_DISTANCE', 'ISOGRAM_MAX_DISTANCE_UNITS', - 'ISOGRAM_MAX_OFFROAD_DIST', 'ISOGRAM_MAX_OFFROAD_DIST_UNITS', - 'ISOGRAM_MAX_TIME', 'ISOGRAM_MAX_TIME_UNITS', - 'ISOGRAM_POINTS_ONLY', 'ISOGRAM_PROPAGATION_FACTOR', - 'ISOGRAM_RECORDS_INSERTED', 'ISOGRAM_RECORDS_NOTINSERTED', - 'ISOGRAM_RETURN_HOLES', 'ISOGRAM_SIMPLIFICATION_FACTOR', - 'LABEL_INFO_ANCHORX', 'LABEL_INFO_ANCHORY', 'LABEL_INFO_DRAWN', - 'LABEL_INFO_EDIT', 'LABEL_INFO_EDIT_ANCHOR', - 'LABEL_INFO_EDIT_ANGLE', 'LABEL_INFO_EDIT_FONT', - 'LABEL_INFO_EDIT_OFFSET', 'LABEL_INFO_EDIT_PEN', - 'LABEL_INFO_EDIT_POSITION', 'LABEL_INFO_EDIT_TEXT', - 'LABEL_INFO_EDIT_TEXTARROW', 'LABEL_INFO_EDIT_TEXTLINE', - 'LABEL_INFO_EDIT_VISIBILITY', 'LABEL_INFO_OBJECT', - 'LABEL_INFO_OFFSET', 'LABEL_INFO_ORIENTATION', - 'LABEL_INFO_POSITION', 'LABEL_INFO_ROWID', 'LABEL_INFO_SELECT', - 'LABEL_INFO_TABLE', 'LAYER_INFO_ARROWS', 'LAYER_INFO_CENTROIDS', - 'LAYER_INFO_COSMETIC', 'LAYER_INFO_DISPLAY', - 'LAYER_INFO_DISPLAY_GLOBAL', 'LAYER_INFO_DISPLAY_GRAPHIC', - 'LAYER_INFO_DISPLAY_OFF', 'LAYER_INFO_DISPLAY_VALUE', - 'LAYER_INFO_EDITABLE', 'LAYER_INFO_HOTLINK_COUNT', - 'LAYER_INFO_HOTLINK_EXPR', 'LAYER_INFO_HOTLINK_MODE', - 'LAYER_INFO_HOTLINK_RELATIVE', 'LAYER_INFO_LABEL_ALPHA', - 'LAYER_INFO_LABEL_ORIENT_CURVED', - 'LAYER_INFO_LABEL_ORIENT_HORIZONTAL', - 'LAYER_INFO_LABEL_ORIENT_PARALLEL', 'LAYER_INFO_LAYER_ALPHA', - 'LAYER_INFO_LAYER_TRANSLUCENCY', 'LAYER_INFO_LBL_AUTODISPLAY', - 'LAYER_INFO_LBL_CURFONT', 'LAYER_INFO_LBL_DUPLICATES', - 'LAYER_INFO_LBL_EXPR', 'LAYER_INFO_LBL_FONT', 'LAYER_INFO_LBL_LT', - 'LAYER_INFO_LBL_LT_ARROW', 'LAYER_INFO_LBL_LT_NONE', - 'LAYER_INFO_LBL_LT_SIMPLE', 'LAYER_INFO_LBL_MAX', - 'LAYER_INFO_LBL_OFFSET', 'LAYER_INFO_LBL_ORIENTATION', - 'LAYER_INFO_LBL_OVERLAP', 'LAYER_INFO_LBL_PARALLEL', - 'LAYER_INFO_LBL_PARTIALSEGS', 'LAYER_INFO_LBL_POS', - 'LAYER_INFO_LBL_POS_BC', 'LAYER_INFO_LBL_POS_BL', - 'LAYER_INFO_LBL_POS_BR', 'LAYER_INFO_LBL_POS_CC', - 'LAYER_INFO_LBL_POS_CL', 'LAYER_INFO_LBL_POS_CR', - 'LAYER_INFO_LBL_POS_TC', 'LAYER_INFO_LBL_POS_TL', - 'LAYER_INFO_LBL_POS_TR', 'LAYER_INFO_LBL_VIS_OFF', - 'LAYER_INFO_LBL_VIS_ON', 'LAYER_INFO_LBL_VIS_ZOOM', - 'LAYER_INFO_LBL_VISIBILITY', 'LAYER_INFO_LBL_ZOOM_MAX', - 'LAYER_INFO_LBL_ZOOM_MIN', 'LAYER_INFO_NAME', 'LAYER_INFO_NODES', - 'LAYER_INFO_OVR_BRUSH', 'LAYER_INFO_OVR_FONT', - 'LAYER_INFO_OVR_LINE', 'LAYER_INFO_OVR_PEN', - 'LAYER_INFO_OVR_SYMBOL', 'LAYER_INFO_PATH', - 'LAYER_INFO_SELECTABLE', 'LAYER_INFO_TYPE', - 'LAYER_INFO_TYPE_COSMETIC', 'LAYER_INFO_TYPE_GRID', - 'LAYER_INFO_TYPE_IMAGE', 'LAYER_INFO_TYPE_NORMAL', - 'LAYER_INFO_TYPE_THEMATIC', 'LAYER_INFO_TYPE_WMS', - 'LAYER_INFO_ZOOM_LAYERED', 'LAYER_INFO_ZOOM_MAX', - 'LAYER_INFO_ZOOM_MIN', 'LEGEND_INFO_MAP_ID', - 'LEGEND_INFO_NUM_FRAMES', 'LEGEND_INFO_ORIENTATION', - 'LEGEND_INFO_STYLE_SAMPLE_SIZE', 'LEGEND_STYLE_INFO_FONT', - 'LEGEND_STYLE_INFO_OBJ', 'LEGEND_STYLE_INFO_TEXT', - 'LOCATE_ABB_FILE', 'LOCATE_CLR_FILE', 'LOCATE_CUSTSYMB_DIR', - 'LOCATE_DEF_WOR', 'LOCATE_FNT_FILE', 'LOCATE_GEOCODE_SERVERLIST', - 'LOCATE_GRAPH_DIR', 'LOCATE_LAYOUT_TEMPLATE_DIR', - 'LOCATE_MNU_FILE', 'LOCATE_PEN_FILE', 'LOCATE_PREF_FILE', - 'LOCATE_PRJ_FILE', 'LOCATE_ROUTING_SERVERLIST', - 'LOCATE_THMTMPLT_DIR', 'LOCATE_WFS_SERVERLIST', - 'LOCATE_WMS_SERVERLIST', 'M_3DMAP_CLONE_VIEW', - 'M_3DMAP_PREVIOUS_VIEW', 'M_3DMAP_PROPERTIES', - 'M_3DMAP_REFRESH_GRID_TEXTURE', 'M_3DMAP_VIEW_ENTIRE_GRID', - 'M_3DMAP_VIEWPOINT_CONTROL', 'M_3DMAP_WIREFRAME', - 'M_ANALYZE_CALC_STATISTICS', 'M_ANALYZE_CUSTOMIZE_LEGEND', - 'M_ANALYZE_FIND', 'M_ANALYZE_FIND_SELECTION', - 'M_ANALYZE_INVERTSELECT', 'M_ANALYZE_SELECT', - 'M_ANALYZE_SELECTALL', 'M_ANALYZE_SHADE', 'M_ANALYZE_SQLQUERY', - 'M_ANALYZE_UNSELECT', 'M_BROWSE_EDIT', 'M_BROWSE_GRID', - 'M_BROWSE_NEW_RECORD', 'M_BROWSE_OPTIONS', 'M_BROWSE_PICK_FIELDS', - 'M_DBMS_OPEN_ODBC', 'M_EDIT_CLEAR', 'M_EDIT_CLEAROBJ', - 'M_EDIT_COPY', 'M_EDIT_CUT', 'M_EDIT_GETINFO', 'M_EDIT_NEW_ROW', - 'M_EDIT_PASTE', 'M_EDIT_PREFERENCES', 'M_EDIT_PREFERENCES_COUNTRY', - 'M_EDIT_PREFERENCES_FILE', 'M_EDIT_PREFERENCES_IMAGE_PROC', - 'M_EDIT_PREFERENCES_LAYOUT', 'M_EDIT_PREFERENCES_LEGEND', - 'M_EDIT_PREFERENCES_MAP', 'M_EDIT_PREFERENCES_OUTPUT', - 'M_EDIT_PREFERENCES_PATH', 'M_EDIT_PREFERENCES_PRINTER', - 'M_EDIT_PREFERENCES_STYLES', 'M_EDIT_PREFERENCES_SYSTEM', - 'M_EDIT_PREFERENCES_WEBSERVICES', 'M_EDIT_RESHAPE', 'M_EDIT_UNDO', - 'M_FILE_ABOUT', 'M_FILE_ADD_WORKSPACE', 'M_FILE_CLOSE', - 'M_FILE_CLOSE_ALL', 'M_FILE_CLOSE_ODBC', 'M_FILE_EXIT', - 'M_FILE_HELP', 'M_FILE_NEW', 'M_FILE_OPEN', 'M_FILE_OPEN_ODBC', - 'M_FILE_OPEN_ODBC_CONN', 'M_FILE_OPEN_UNIVERSAL_DATA', - 'M_FILE_OPEN_WFS', 'M_FILE_OPEN_WMS', 'M_FILE_PAGE_SETUP', - 'M_FILE_PRINT', 'M_FILE_PRINT_SETUP', 'M_FILE_REVERT', - 'M_FILE_RUN', 'M_FILE_SAVE', 'M_FILE_SAVE_COPY_AS', - 'M_FILE_SAVE_QUERY', 'M_FILE_SAVE_WINDOW_AS', - 'M_FILE_SAVE_WORKSPACE', 'M_FORMAT_CUSTOM_COLORS', - 'M_FORMAT_PICK_FILL', 'M_FORMAT_PICK_FONT', 'M_FORMAT_PICK_LINE', - 'M_FORMAT_PICK_SYMBOL', 'M_GRAPH_3D_VIEWING_ANGLE', - 'M_GRAPH_FORMATING', 'M_GRAPH_GENERAL_OPTIONS', - 'M_GRAPH_GRID_SCALES', 'M_GRAPH_LABEL_AXIS', - 'M_GRAPH_SAVE_AS_TEMPLATE', 'M_GRAPH_SERIES', - 'M_GRAPH_SERIES_OPTIONS', 'M_GRAPH_TITLES', 'M_GRAPH_TYPE', - 'M_GRAPH_VALUE_AXIS', 'M_HELP_ABOUT', 'M_HELP_CHECK_FOR_UPDATE', - 'M_HELP_CONNECT_MIFORUM', 'M_HELP_CONTENTS', - 'M_HELP_CONTEXTSENSITIVE', 'M_HELP_HELPMODE', - 'M_HELP_MAPINFO_3DGRAPH_HELP', 'M_HELP_MAPINFO_CONNECT_SERVICES', - 'M_HELP_MAPINFO_WWW', 'M_HELP_MAPINFO_WWW_STORE', - 'M_HELP_MAPINFO_WWW_TUTORIAL', 'M_HELP_SEARCH', - 'M_HELP_TECHSUPPORT', 'M_HELP_USE_HELP', 'M_LAYOUT_ACTUAL', - 'M_LAYOUT_ALIGN', 'M_LAYOUT_AUTOSCROLL_ONOFF', - 'M_LAYOUT_BRING2FRONT', 'M_LAYOUT_CHANGE_VIEW', - 'M_LAYOUT_DISPLAYOPTIONS', 'M_LAYOUT_DROPSHADOWS', - 'M_LAYOUT_ENTIRE', 'M_LAYOUT_LAYOUT_SIZE', 'M_LAYOUT_PREVIOUS', - 'M_LAYOUT_SEND2BACK', 'M_LEGEND_ADD_FRAMES', 'M_LEGEND_DELETE', - 'M_LEGEND_PROPERTIES', 'M_LEGEND_REFRESH', 'M_MAP_AUTOLABEL', - 'M_MAP_AUTOSCROLL_ONOFF', 'M_MAP_CHANGE_VIEW', - 'M_MAP_CLEAR_COSMETIC', 'M_MAP_CLEAR_CUSTOM_LABELS', - 'M_MAP_CLIP_REGION_ONOFF', 'M_MAP_CLONE_MAPPER', - 'M_MAP_CREATE_3DMAP', 'M_MAP_CREATE_LEGEND', - 'M_MAP_CREATE_PRISMMAP', 'M_MAP_ENTIRE_LAYER', - 'M_MAP_LAYER_CONTROL', 'M_MAP_MODIFY_THEMATIC', 'M_MAP_OPTIONS', - 'M_MAP_PREVIOUS', 'M_MAP_PROJECTION', 'M_MAP_SAVE_COSMETIC', - 'M_MAP_SET_CLIP_REGION', 'M_MAP_SETUNITS', 'M_MAP_SETUPDIGITIZER', - 'M_MAP_THEMATIC', 'M_MAPBASIC_CLEAR', 'M_MAPBASIC_SAVECONTENTS', - 'M_OBJECTS_BREAKPOLY', 'M_OBJECTS_BUFFER', - 'M_OBJECTS_CHECK_REGIONS', 'M_OBJECTS_CLEAN', - 'M_OBJECTS_CLEAR_TARGET', 'M_OBJECTS_COMBINE', - 'M_OBJECTS_CONVEX_HULL', 'M_OBJECTS_CVT_PGON', - 'M_OBJECTS_CVT_PLINE', 'M_OBJECTS_DISAGG', - 'M_OBJECTS_DRIVE_REGION', 'M_OBJECTS_ENCLOSE', 'M_OBJECTS_ERASE', - 'M_OBJECTS_ERASE_OUT', 'M_OBJECTS_MERGE', 'M_OBJECTS_OFFSET', - 'M_OBJECTS_OVERLAY', 'M_OBJECTS_POLYLINE_SPLIT', - 'M_OBJECTS_POLYLINE_SPLIT_AT_NODE', 'M_OBJECTS_RESHAPE', - 'M_OBJECTS_ROTATE', 'M_OBJECTS_SET_TARGET', 'M_OBJECTS_SMOOTH', - 'M_OBJECTS_SNAP', 'M_OBJECTS_SPLIT', 'M_OBJECTS_UNSMOOTH', - 'M_OBJECTS_VORONOI', 'M_ORACLE_CREATE_WORKSPACE', - 'M_ORACLE_DELETE_WORKSPACE', 'M_ORACLE_MERGE_PARENT', - 'M_ORACLE_REFRESH_FROM_PARENT', 'M_ORACLE_VERSION_ENABLE_OFF', - 'M_ORACLE_VERSION_ENABLE_ON', 'M_QUERY_CALC_STATISTICS', - 'M_QUERY_FIND', 'M_QUERY_FIND_ADDRESS', 'M_QUERY_FIND_SELECTION', - 'M_QUERY_FIND_SELECTION_CURRENT_MAP', 'M_QUERY_INVERTSELECT', - 'M_QUERY_SELECT', 'M_QUERY_SELECTALL', 'M_QUERY_SQLQUERY', - 'M_QUERY_UNSELECT', 'M_REDISTRICT_ADD', 'M_REDISTRICT_ASSIGN', - 'M_REDISTRICT_DELETE', 'M_REDISTRICT_OPTIONS', - 'M_REDISTRICT_TARGET', 'M_SENDMAIL_CURRENTWINDOW', - 'M_SENDMAIL_WORKSPACE', 'M_TABLE_APPEND', 'M_TABLE_BUFFER', - 'M_TABLE_CHANGESYMBOL', 'M_TABLE_CREATE_POINTS', 'M_TABLE_DELETE', - 'M_TABLE_DRIVE_REGION', 'M_TABLE_EXPORT', 'M_TABLE_GEOCODE', - 'M_TABLE_IMPORT', 'M_TABLE_MAKEMAPPABLE', - 'M_TABLE_MERGE_USING_COLUMN', 'M_TABLE_MODIFY_STRUCTURE', - 'M_TABLE_PACK', 'M_TABLE_RASTER_REG', 'M_TABLE_RASTER_STYLE', - 'M_TABLE_REFRESH', 'M_TABLE_RENAME', - 'M_TABLE_UNIVERSAL_DATA_REFRESH', 'M_TABLE_UNLINK', - 'M_TABLE_UPDATE_COLUMN', 'M_TABLE_VORONOI', 'M_TABLE_WEB_GEOCODE', - 'M_TABLE_WFS_PROPS', 'M_TABLE_WFS_REFRESH', 'M_TABLE_WMS_PROPS', - 'M_TOOLS_ADD_NODE', 'M_TOOLS_ARC', 'M_TOOLS_CRYSTAL_REPORTS_NEW', - 'M_TOOLS_CRYSTAL_REPORTS_OPEN', 'M_TOOLS_DRAGWINDOW', - 'M_TOOLS_ELLIPSE', 'M_TOOLS_EXPAND', 'M_TOOLS_FRAME', - 'M_TOOLS_HOTLINK', 'M_TOOLS_LABELER', 'M_TOOLS_LINE', - 'M_TOOLS_MAPBASIC', 'M_TOOLS_PNT_QUERY', 'M_TOOLS_POINT', - 'M_TOOLS_POLYGON', 'M_TOOLS_POLYLINE', 'M_TOOLS_RASTER_REG', - 'M_TOOLS_RECENTER', 'M_TOOLS_RECTANGLE', 'M_TOOLS_ROUNDEDRECT', - 'M_TOOLS_RULER', 'M_TOOLS_RUN', 'M_TOOLS_SEARCH_BOUNDARY', - 'M_TOOLS_SEARCH_POLYGON', 'M_TOOLS_SEARCH_RADIUS', - 'M_TOOLS_SEARCH_RECT', 'M_TOOLS_SELECTOR', 'M_TOOLS_SHRINK', - 'M_TOOLS_TEXT', 'M_TOOLS_TOOL_MANAGER', 'M_WINDOW_ARRANGEICONS', - 'M_WINDOW_BROWSE', 'M_WINDOW_BUTTONPAD', 'M_WINDOW_CASCADE', - 'M_WINDOW_EXPORT_WINDOW', 'M_WINDOW_FIRST', 'M_WINDOW_GRAPH', - 'M_WINDOW_LAYOUT', 'M_WINDOW_LEGEND', 'M_WINDOW_MAP', - 'M_WINDOW_MAPBASIC', 'M_WINDOW_MORE', 'M_WINDOW_REDISTRICT', - 'M_WINDOW_REDRAW', 'M_WINDOW_STATISTICS', 'M_WINDOW_STATUSBAR', - 'M_WINDOW_TILE', 'M_WINDOW_TOOL_PALETTE', 'MAGENTA', - 'MAP3D_INFO_BACKGROUND', 'MAP3D_INFO_CAMERA_CLIP_FAR', - 'MAP3D_INFO_CAMERA_CLIP_NEAR', 'MAP3D_INFO_CAMERA_FOCAL_X', - 'MAP3D_INFO_CAMERA_FOCAL_Y', 'MAP3D_INFO_CAMERA_FOCAL_Z', - 'MAP3D_INFO_CAMERA_VPN_1', 'MAP3D_INFO_CAMERA_VPN_2', - 'MAP3D_INFO_CAMERA_VPN_3', 'MAP3D_INFO_CAMERA_VU_1', - 'MAP3D_INFO_CAMERA_VU_2', 'MAP3D_INFO_CAMERA_VU_3', - 'MAP3D_INFO_CAMERA_X', 'MAP3D_INFO_CAMERA_Y', - 'MAP3D_INFO_CAMERA_Z', 'MAP3D_INFO_LIGHT_COLOR', - 'MAP3D_INFO_LIGHT_X', 'MAP3D_INFO_LIGHT_Y', 'MAP3D_INFO_LIGHT_Z', - 'MAP3D_INFO_RESOLUTION_X', 'MAP3D_INFO_RESOLUTION_Y', - 'MAP3D_INFO_SCALE', 'MAP3D_INFO_UNITS', 'MAPPER_INFO_AREAUNITS', - 'MAPPER_INFO_CENTERX', 'MAPPER_INFO_CENTERY', - 'MAPPER_INFO_CLIP_DISPLAY_ALL', 'MAPPER_INFO_CLIP_DISPLAY_POLYOBJ', - 'MAPPER_INFO_CLIP_OVERLAY', 'MAPPER_INFO_CLIP_REGION', - 'MAPPER_INFO_CLIP_TYPE', 'MAPPER_INFO_COORDSYS_CLAUSE', - 'MAPPER_INFO_COORDSYS_CLAUSE_WITH_BOUNDS', - 'MAPPER_INFO_COORDSYS_NAME', 'MAPPER_INFO_DISPLAY', - 'MAPPER_INFO_DISPLAY_DECIMAL', 'MAPPER_INFO_DISPLAY_DEGMINSEC', - 'MAPPER_INFO_DISPLAY_DMS', 'MAPPER_INFO_DISPLAY_MGRS', - 'MAPPER_INFO_DISPLAY_POSITION', 'MAPPER_INFO_DISPLAY_SCALE', - 'MAPPER_INFO_DISPLAY_ZOOM', 'MAPPER_INFO_DIST_CALC_TYPE', - 'MAPPER_INFO_DIST_CARTESIAN', 'MAPPER_INFO_DIST_SPHERICAL', - 'MAPPER_INFO_DISTUNITS', 'MAPPER_INFO_EDIT_LAYER', - 'MAPPER_INFO_LAYERS', 'MAPPER_INFO_MAXX', 'MAPPER_INFO_MAXY', - 'MAPPER_INFO_MERGE_MAP', 'MAPPER_INFO_MINX', 'MAPPER_INFO_MINY', - 'MAPPER_INFO_MOVE_DUPLICATE_NODES', 'MAPPER_INFO_NUM_THEMATIC', - 'MAPPER_INFO_REPROJECTION', 'MAPPER_INFO_RESAMPLING', - 'MAPPER_INFO_SCALE', 'MAPPER_INFO_SCROLLBARS', - 'MAPPER_INFO_XYUNITS', 'MAPPER_INFO_ZOOM', 'MAX_STRING_LENGTH', - 'MENUITEM_INFO_ACCELERATOR', 'MENUITEM_INFO_CHECKABLE', - 'MENUITEM_INFO_CHECKED', 'MENUITEM_INFO_ENABLED', - 'MENUITEM_INFO_HANDLER', 'MENUITEM_INFO_HELPMSG', - 'MENUITEM_INFO_ID', 'MENUITEM_INFO_SHOWHIDEABLE', - 'MENUITEM_INFO_TEXT', 'MI_CURSOR_ARROW', 'MI_CURSOR_CHANGE_WIDTH', - 'MI_CURSOR_CROSSHAIR', 'MI_CURSOR_DRAG_OBJ', - 'MI_CURSOR_FINGER_LEFT', 'MI_CURSOR_FINGER_UP', - 'MI_CURSOR_GRABBER', 'MI_CURSOR_IBEAM', 'MI_CURSOR_IBEAM_CROSS', - 'MI_CURSOR_ZOOM_IN', 'MI_CURSOR_ZOOM_OUT', 'MI_ICON_ADD_NODE', - 'MI_ICON_ARC', 'MI_ICON_ARROW', 'MI_ICON_ARROW_1', - 'MI_ICON_ARROW_10', 'MI_ICON_ARROW_11', 'MI_ICON_ARROW_12', - 'MI_ICON_ARROW_13', 'MI_ICON_ARROW_14', 'MI_ICON_ARROW_15', - 'MI_ICON_ARROW_16', 'MI_ICON_ARROW_17', 'MI_ICON_ARROW_18', - 'MI_ICON_ARROW_19', 'MI_ICON_ARROW_2', 'MI_ICON_ARROW_20', - 'MI_ICON_ARROW_21', 'MI_ICON_ARROW_3', 'MI_ICON_ARROW_4', - 'MI_ICON_ARROW_5', 'MI_ICON_ARROW_6', 'MI_ICON_ARROW_7', - 'MI_ICON_ARROW_8', 'MI_ICON_ARROW_9', 'MI_ICON_CLIP_MODE', - 'MI_ICON_CLIP_REGION', 'MI_ICON_CLOSE_ALL', - 'MI_ICON_COMMUNICATION_1', 'MI_ICON_COMMUNICATION_10', - 'MI_ICON_COMMUNICATION_11', 'MI_ICON_COMMUNICATION_12', - 'MI_ICON_COMMUNICATION_2', 'MI_ICON_COMMUNICATION_3', - 'MI_ICON_COMMUNICATION_4', 'MI_ICON_COMMUNICATION_5', - 'MI_ICON_COMMUNICATION_6', 'MI_ICON_COMMUNICATION_7', - 'MI_ICON_COMMUNICATION_8', 'MI_ICON_COMMUNICATION_9', - 'MI_ICON_COMPASS_CIRCLE_TA', 'MI_ICON_COMPASS_CONTRACT', - 'MI_ICON_COMPASS_EXPAND', 'MI_ICON_COMPASS_POLY_TA', - 'MI_ICON_COMPASS_TAG', 'MI_ICON_COMPASS_UNTAG', 'MI_ICON_COPY', - 'MI_ICON_CROSSHAIR', 'MI_ICON_CUT', 'MI_ICON_DISTRICT_MANY', - 'MI_ICON_DISTRICT_SAME', 'MI_ICON_DRAG_HANDLE', 'MI_ICON_ELLIPSE', - 'MI_ICON_EMERGENCY_1', 'MI_ICON_EMERGENCY_10', - 'MI_ICON_EMERGENCY_11', 'MI_ICON_EMERGENCY_12', - 'MI_ICON_EMERGENCY_13', 'MI_ICON_EMERGENCY_14', - 'MI_ICON_EMERGENCY_15', 'MI_ICON_EMERGENCY_16', - 'MI_ICON_EMERGENCY_17', 'MI_ICON_EMERGENCY_18', - 'MI_ICON_EMERGENCY_2', 'MI_ICON_EMERGENCY_3', - 'MI_ICON_EMERGENCY_4', 'MI_ICON_EMERGENCY_5', - 'MI_ICON_EMERGENCY_6', 'MI_ICON_EMERGENCY_7', - 'MI_ICON_EMERGENCY_8', 'MI_ICON_EMERGENCY_9', 'MI_ICON_GRABBER', - 'MI_ICON_GRAPH_SELECT', 'MI_ICON_HELP', 'MI_ICON_HOT_LINK', - 'MI_ICON_INFO', 'MI_ICON_INVERTSELECT', 'MI_ICON_LABEL', - 'MI_ICON_LAYERS', 'MI_ICON_LEGEND', 'MI_ICON_LETTERS_A', - 'MI_ICON_LETTERS_B', 'MI_ICON_LETTERS_C', 'MI_ICON_LETTERS_D', - 'MI_ICON_LETTERS_E', 'MI_ICON_LETTERS_F', 'MI_ICON_LETTERS_G', - 'MI_ICON_LETTERS_H', 'MI_ICON_LETTERS_I', 'MI_ICON_LETTERS_J', - 'MI_ICON_LETTERS_K', 'MI_ICON_LETTERS_L', 'MI_ICON_LETTERS_M', - 'MI_ICON_LETTERS_N', 'MI_ICON_LETTERS_O', 'MI_ICON_LETTERS_P', - 'MI_ICON_LETTERS_Q', 'MI_ICON_LETTERS_R', 'MI_ICON_LETTERS_S', - 'MI_ICON_LETTERS_T', 'MI_ICON_LETTERS_U', 'MI_ICON_LETTERS_V', - 'MI_ICON_LETTERS_W', 'MI_ICON_LETTERS_X', 'MI_ICON_LETTERS_Y', - 'MI_ICON_LETTERS_Z', 'MI_ICON_LINE', 'MI_ICON_LINE_STYLE', - 'MI_ICON_MAPSYMB_1', 'MI_ICON_MAPSYMB_10', 'MI_ICON_MAPSYMB_11', - 'MI_ICON_MAPSYMB_12', 'MI_ICON_MAPSYMB_13', 'MI_ICON_MAPSYMB_14', - 'MI_ICON_MAPSYMB_15', 'MI_ICON_MAPSYMB_16', 'MI_ICON_MAPSYMB_17', - 'MI_ICON_MAPSYMB_18', 'MI_ICON_MAPSYMB_19', 'MI_ICON_MAPSYMB_2', - 'MI_ICON_MAPSYMB_20', 'MI_ICON_MAPSYMB_21', 'MI_ICON_MAPSYMB_22', - 'MI_ICON_MAPSYMB_23', 'MI_ICON_MAPSYMB_24', 'MI_ICON_MAPSYMB_25', - 'MI_ICON_MAPSYMB_26', 'MI_ICON_MAPSYMB_3', 'MI_ICON_MAPSYMB_4', - 'MI_ICON_MAPSYMB_5', 'MI_ICON_MAPSYMB_6', 'MI_ICON_MAPSYMB_7', - 'MI_ICON_MAPSYMB_8', 'MI_ICON_MAPSYMB_9', 'MI_ICON_MARITIME_1', - 'MI_ICON_MARITIME_10', 'MI_ICON_MARITIME_2', 'MI_ICON_MARITIME_3', - 'MI_ICON_MARITIME_4', 'MI_ICON_MARITIME_5', 'MI_ICON_MARITIME_6', - 'MI_ICON_MARITIME_7', 'MI_ICON_MARITIME_8', 'MI_ICON_MARITIME_9', - 'MI_ICON_MB_1', 'MI_ICON_MB_10', 'MI_ICON_MB_11', 'MI_ICON_MB_12', - 'MI_ICON_MB_13', 'MI_ICON_MB_14', 'MI_ICON_MB_2', 'MI_ICON_MB_3', - 'MI_ICON_MB_4', 'MI_ICON_MB_5', 'MI_ICON_MB_6', 'MI_ICON_MB_7', - 'MI_ICON_MB_8', 'MI_ICON_MB_9', 'MI_ICON_MISC_1', - 'MI_ICON_MISC_10', 'MI_ICON_MISC_11', 'MI_ICON_MISC_12', - 'MI_ICON_MISC_13', 'MI_ICON_MISC_14', 'MI_ICON_MISC_15', - 'MI_ICON_MISC_16', 'MI_ICON_MISC_17', 'MI_ICON_MISC_18', - 'MI_ICON_MISC_19', 'MI_ICON_MISC_2', 'MI_ICON_MISC_20', - 'MI_ICON_MISC_21', 'MI_ICON_MISC_22', 'MI_ICON_MISC_23', - 'MI_ICON_MISC_24', 'MI_ICON_MISC_25', 'MI_ICON_MISC_26', - 'MI_ICON_MISC_27', 'MI_ICON_MISC_28', 'MI_ICON_MISC_29', - 'MI_ICON_MISC_3', 'MI_ICON_MISC_30', 'MI_ICON_MISC_31', - 'MI_ICON_MISC_4', 'MI_ICON_MISC_5', 'MI_ICON_MISC_6', - 'MI_ICON_MISC_7', 'MI_ICON_MISC_8', 'MI_ICON_MISC_9', - 'MI_ICON_NEW_DOC', 'MI_ICON_NUMBERS_1', 'MI_ICON_NUMBERS_10', - 'MI_ICON_NUMBERS_11', 'MI_ICON_NUMBERS_12', 'MI_ICON_NUMBERS_13', - 'MI_ICON_NUMBERS_14', 'MI_ICON_NUMBERS_15', 'MI_ICON_NUMBERS_16', - 'MI_ICON_NUMBERS_17', 'MI_ICON_NUMBERS_18', 'MI_ICON_NUMBERS_19', - 'MI_ICON_NUMBERS_2', 'MI_ICON_NUMBERS_20', 'MI_ICON_NUMBERS_21', - 'MI_ICON_NUMBERS_22', 'MI_ICON_NUMBERS_23', 'MI_ICON_NUMBERS_24', - 'MI_ICON_NUMBERS_25', 'MI_ICON_NUMBERS_26', 'MI_ICON_NUMBERS_27', - 'MI_ICON_NUMBERS_28', 'MI_ICON_NUMBERS_29', 'MI_ICON_NUMBERS_3', - 'MI_ICON_NUMBERS_30', 'MI_ICON_NUMBERS_31', 'MI_ICON_NUMBERS_32', - 'MI_ICON_NUMBERS_4', 'MI_ICON_NUMBERS_5', 'MI_ICON_NUMBERS_6', - 'MI_ICON_NUMBERS_7', 'MI_ICON_NUMBERS_8', 'MI_ICON_NUMBERS_9', - 'MI_ICON_ODBC_DISCONNECT', 'MI_ICON_ODBC_MAPPABLE', - 'MI_ICON_ODBC_OPEN', 'MI_ICON_ODBC_REFRESH', 'MI_ICON_ODBC_SYMBOL', - 'MI_ICON_ODBC_UNLINK', 'MI_ICON_OPEN_FILE', 'MI_ICON_OPEN_WOR', - 'MI_ICON_OPENWFS', 'MI_ICON_OPENWMS', 'MI_ICON_PASTE', - 'MI_ICON_POLYGON', 'MI_ICON_POLYLINE', 'MI_ICON_PRINT', - 'MI_ICON_REALESTATE_1', 'MI_ICON_REALESTATE_10', - 'MI_ICON_REALESTATE_11', 'MI_ICON_REALESTATE_12', - 'MI_ICON_REALESTATE_13', 'MI_ICON_REALESTATE_14', - 'MI_ICON_REALESTATE_15', 'MI_ICON_REALESTATE_16', - 'MI_ICON_REALESTATE_17', 'MI_ICON_REALESTATE_18', - 'MI_ICON_REALESTATE_19', 'MI_ICON_REALESTATE_2', - 'MI_ICON_REALESTATE_20', 'MI_ICON_REALESTATE_21', - 'MI_ICON_REALESTATE_22', 'MI_ICON_REALESTATE_23', - 'MI_ICON_REALESTATE_3', 'MI_ICON_REALESTATE_4', - 'MI_ICON_REALESTATE_5', 'MI_ICON_REALESTATE_6', - 'MI_ICON_REALESTATE_7', 'MI_ICON_REALESTATE_8', - 'MI_ICON_REALESTATE_9', 'MI_ICON_RECT', 'MI_ICON_REGION_STYLE', - 'MI_ICON_RESHAPE', 'MI_ICON_ROUND_RECT', 'MI_ICON_RULER', - 'MI_ICON_RUN', 'MI_ICON_SAVE_FILE', 'MI_ICON_SAVE_WIN', - 'MI_ICON_SAVE_WOR', 'MI_ICON_SEARCH_BDY', 'MI_ICON_SEARCH_POLYGON', - 'MI_ICON_SEARCH_RADIUS', 'MI_ICON_SEARCH_RECT', 'MI_ICON_SIGNS_1', - 'MI_ICON_SIGNS_10', 'MI_ICON_SIGNS_11', 'MI_ICON_SIGNS_12', - 'MI_ICON_SIGNS_13', 'MI_ICON_SIGNS_14', 'MI_ICON_SIGNS_15', - 'MI_ICON_SIGNS_16', 'MI_ICON_SIGNS_17', 'MI_ICON_SIGNS_18', - 'MI_ICON_SIGNS_19', 'MI_ICON_SIGNS_2', 'MI_ICON_SIGNS_3', - 'MI_ICON_SIGNS_4', 'MI_ICON_SIGNS_5', 'MI_ICON_SIGNS_6', - 'MI_ICON_SIGNS_7', 'MI_ICON_SIGNS_8', 'MI_ICON_SIGNS_9', - 'MI_ICON_STATISTICS', 'MI_ICON_SYMBOL', 'MI_ICON_SYMBOL_STYLE', - 'MI_ICON_TEXT', 'MI_ICON_TEXT_STYLE', 'MI_ICON_TRANSPORT_1', - 'MI_ICON_TRANSPORT_10', 'MI_ICON_TRANSPORT_11', - 'MI_ICON_TRANSPORT_12', 'MI_ICON_TRANSPORT_13', - 'MI_ICON_TRANSPORT_14', 'MI_ICON_TRANSPORT_15', - 'MI_ICON_TRANSPORT_16', 'MI_ICON_TRANSPORT_17', - 'MI_ICON_TRANSPORT_18', 'MI_ICON_TRANSPORT_19', - 'MI_ICON_TRANSPORT_2', 'MI_ICON_TRANSPORT_20', - 'MI_ICON_TRANSPORT_21', 'MI_ICON_TRANSPORT_22', - 'MI_ICON_TRANSPORT_23', 'MI_ICON_TRANSPORT_24', - 'MI_ICON_TRANSPORT_25', 'MI_ICON_TRANSPORT_26', - 'MI_ICON_TRANSPORT_27', 'MI_ICON_TRANSPORT_3', - 'MI_ICON_TRANSPORT_4', 'MI_ICON_TRANSPORT_5', - 'MI_ICON_TRANSPORT_6', 'MI_ICON_TRANSPORT_7', - 'MI_ICON_TRANSPORT_8', 'MI_ICON_TRANSPORT_9', 'MI_ICON_UNDO', - 'MI_ICON_UNSELECT_ALL', 'MI_ICON_WINDOW_FRAME', 'MI_ICON_WRENCH', - 'MI_ICON_ZOOM_IN', 'MI_ICON_ZOOM_OUT', 'MI_ICON_ZOOM_QUESTION', - 'MI_ICONS_MAPS_1', 'MI_ICONS_MAPS_10', 'MI_ICONS_MAPS_11', - 'MI_ICONS_MAPS_12', 'MI_ICONS_MAPS_13', 'MI_ICONS_MAPS_14', - 'MI_ICONS_MAPS_15', 'MI_ICONS_MAPS_2', 'MI_ICONS_MAPS_3', - 'MI_ICONS_MAPS_4', 'MI_ICONS_MAPS_5', 'MI_ICONS_MAPS_6', - 'MI_ICONS_MAPS_7', 'MI_ICONS_MAPS_8', 'MI_ICONS_MAPS_9', - 'MIPLATFORM_HP', 'MIPLATFORM_MAC68K', 'MIPLATFORM_POWERMAC', - 'MIPLATFORM_SPECIAL', 'MIPLATFORM_SUN', 'MIPLATFORM_WIN16', - 'MIPLATFORM_WIN32', 'MODE_APPEND', 'MODE_BINARY', 'MODE_INPUT', - 'MODE_OUTPUT', 'MODE_RANDOM', 'OBJ_ARC', 'OBJ_ELLIPSE', - 'OBJ_FRAME', 'OBJ_GEO_ARCBEGANGLE', 'OBJ_GEO_ARCENDANGLE', - 'OBJ_GEO_CENTROID', 'OBJ_GEO_LINEBEGX', 'OBJ_GEO_LINEBEGY', - 'OBJ_GEO_LINEENDX', 'OBJ_GEO_LINEENDY', 'OBJ_GEO_MAXX', - 'OBJ_GEO_MAXY', 'OBJ_GEO_MINX', 'OBJ_GEO_MINY', 'OBJ_GEO_POINTM', - 'OBJ_GEO_POINTX', 'OBJ_GEO_POINTY', 'OBJ_GEO_POINTZ', - 'OBJ_GEO_ROUNDRADIUS', 'OBJ_GEO_TEXTANGLE', 'OBJ_GEO_TEXTLINEX', - 'OBJ_GEO_TEXTLINEY', 'OBJ_INFO_BRUSH', 'OBJ_INFO_FILLFRAME', - 'OBJ_INFO_FRAMETITLE', 'OBJ_INFO_FRAMEWIN', 'OBJ_INFO_HAS_M', - 'OBJ_INFO_HAS_Z', 'OBJ_INFO_MPOINT', 'OBJ_INFO_NONEMPTY', - 'OBJ_INFO_NPNTS', 'OBJ_INFO_NPOLYGONS', 'OBJ_INFO_PEN', - 'OBJ_INFO_PLINE', 'OBJ_INFO_REGION', 'OBJ_INFO_SMOOTH', - 'OBJ_INFO_SYMBOL', 'OBJ_INFO_TEXTARROW', 'OBJ_INFO_TEXTFONT', - 'OBJ_INFO_TEXTJUSTIFY', 'OBJ_INFO_TEXTSPACING', - 'OBJ_INFO_TEXTSTRING', 'OBJ_INFO_TYPE', 'OBJ_INFO_Z_UNIT', - 'OBJ_INFO_Z_UNIT_SET', 'OBJ_LINE', 'OBJ_PLINE', 'OBJ_POINT', - 'OBJ_RECT', 'OBJ_REGION', 'OBJ_ROUNDRECT', 'OBJ_TEXT', - 'OBJ_TYPE_ARC', 'OBJ_TYPE_COLLECTION', 'OBJ_TYPE_ELLIPSE', - 'OBJ_TYPE_FRAME', 'OBJ_TYPE_LINE', 'OBJ_TYPE_MPOINT', - 'OBJ_TYPE_PLINE', 'OBJ_TYPE_POINT', 'OBJ_TYPE_RECT', - 'OBJ_TYPE_REGION', 'OBJ_TYPE_ROUNDRECT', 'OBJ_TYPE_TEXT', - 'ORIENTATION_CUSTOM', 'ORIENTATION_LANDSCAPE', - 'ORIENTATION_PORTRAIT', 'PEN_COLOR', 'PEN_INDEX', - 'PEN_INTERLEAVED', 'PEN_PATTERN', 'PEN_WIDTH', 'PLATFORM_MAC', - 'PLATFORM_MOTIF', 'PLATFORM_SPECIAL', 'PLATFORM_WIN', - 'PLATFORM_X11', 'PLATFORM_XOL', 'PRISMMAP_INFO_BACKGROUND', - 'PRISMMAP_INFO_CAMERA_CLIP_FAR', 'PRISMMAP_INFO_CAMERA_CLIP_NEAR', - 'PRISMMAP_INFO_CAMERA_FOCAL_X', 'PRISMMAP_INFO_CAMERA_FOCAL_Y', - 'PRISMMAP_INFO_CAMERA_FOCAL_Z', 'PRISMMAP_INFO_CAMERA_VPN_1', - 'PRISMMAP_INFO_CAMERA_VPN_2', 'PRISMMAP_INFO_CAMERA_VPN_3', - 'PRISMMAP_INFO_CAMERA_VU_1', 'PRISMMAP_INFO_CAMERA_VU_2', - 'PRISMMAP_INFO_CAMERA_VU_3', 'PRISMMAP_INFO_CAMERA_X', - 'PRISMMAP_INFO_CAMERA_Y', 'PRISMMAP_INFO_CAMERA_Z', - 'PRISMMAP_INFO_INFOTIP_EXPR', 'PRISMMAP_INFO_LIGHT_COLOR', - 'PRISMMAP_INFO_LIGHT_X', 'PRISMMAP_INFO_LIGHT_Y', - 'PRISMMAP_INFO_LIGHT_Z', 'PRISMMAP_INFO_SCALE', 'RAD_2_DEG', - 'RASTER_CONTROL_POINT_X', 'RASTER_CONTROL_POINT_Y', - 'RASTER_TAB_INFO_ALPHA', 'RASTER_TAB_INFO_BITS_PER_PIXEL', - 'RASTER_TAB_INFO_BRIGHTNESS', 'RASTER_TAB_INFO_CONTRAST', - 'RASTER_TAB_INFO_DISPLAY_TRANSPARENT', 'RASTER_TAB_INFO_GREYSCALE', - 'RASTER_TAB_INFO_HEIGHT', 'RASTER_TAB_INFO_IMAGE_CLASS', - 'RASTER_TAB_INFO_IMAGE_NAME', 'RASTER_TAB_INFO_IMAGE_TYPE', - 'RASTER_TAB_INFO_NUM_CONTROL_POINTS', - 'RASTER_TAB_INFO_TRANSPARENT_COLOR', 'RASTER_TAB_INFO_WIDTH', - 'RED', 'REGION_INFO_IS_CLOCKWISE', 'SEARCH_INFO_ROW', - 'SEARCH_INFO_TABLE', 'SECONDS_PER_DAY', 'SEL_INFO_NROWS', - 'SEL_INFO_SELNAME', 'SEL_INFO_TABLENAME', - 'SESSION_INFO_AREA_UNITS', 'SESSION_INFO_COORDSYS_CLAUSE', - 'SESSION_INFO_DISTANCE_UNITS', 'SESSION_INFO_PAPER_UNITS', - 'SRV_COL_INFO_ALIAS', 'SRV_COL_INFO_NAME', - 'SRV_COL_INFO_PRECISION', 'SRV_COL_INFO_SCALE', - 'SRV_COL_INFO_STATUS', 'SRV_COL_INFO_TYPE', 'SRV_COL_INFO_VALUE', - 'SRV_COL_INFO_WIDTH', 'SRV_COL_TYPE_BIN_STRING', - 'SRV_COL_TYPE_CHAR', 'SRV_COL_TYPE_DATE', 'SRV_COL_TYPE_DECIMAL', - 'SRV_COL_TYPE_FIXED_LEN_STRING', 'SRV_COL_TYPE_FLOAT', - 'SRV_COL_TYPE_INTEGER', 'SRV_COL_TYPE_LOGICAL', - 'SRV_COL_TYPE_NONE', 'SRV_COL_TYPE_SMALLINT', - 'SRV_CONNECT_INFO_DB_NAME', 'SRV_CONNECT_INFO_DRIVER_NAME', - 'SRV_CONNECT_INFO_DS_NAME', 'SRV_CONNECT_INFO_QUOTE_CHAR', - 'SRV_CONNECT_INFO_SQL_USER_ID', 'SRV_DRV_DATA_SOURCE', - 'SRV_DRV_INFO_NAME', 'SRV_DRV_INFO_NAME_LIST', 'SRV_ERROR', - 'SRV_FETCH_FIRST', 'SRV_FETCH_LAST', 'SRV_FETCH_NEXT', - 'SRV_FETCH_PREV', 'SRV_INVALID_HANDLE', 'SRV_NEED_DATA', - 'SRV_NO_MORE_DATA', 'SRV_NULL_DATA', 'SRV_SUCCESS', - 'SRV_SUCCESS_WITH_INFO', 'SRV_TRUNCATED_DATA', - 'SRV_WM_HIST_NO_OVERWRITE', 'SRV_WM_HIST_NONE', - 'SRV_WM_HIST_OVERWRITE', 'STR_EQ', 'STR_GT', 'STR_LT', - 'STYLE_SAMPLE_SIZE_LARGE', 'STYLE_SAMPLE_SIZE_SMALL', - 'SWITCHING_INTO_MAPINFO', 'SWITCHING_OUT_OF_MAPINFO', - 'SYMBOL_ANGLE', 'SYMBOL_CODE', 'SYMBOL_COLOR', - 'SYMBOL_CUSTOM_NAME', 'SYMBOL_CUSTOM_STYLE', 'SYMBOL_FONT_NAME', - 'SYMBOL_FONT_STYLE', 'SYMBOL_KIND', 'SYMBOL_KIND_CUSTOM', - 'SYMBOL_KIND_FONT', 'SYMBOL_KIND_VECTOR', 'SYMBOL_POINTSIZE', - 'SYS_INFO_APPIDISPATCH', 'SYS_INFO_APPLICATIONWND', - 'SYS_INFO_APPVERSION', 'SYS_INFO_CHARSET', - 'SYS_INFO_COPYPROTECTED', 'SYS_INFO_DATE_FORMAT', - 'SYS_INFO_DDESTATUS', 'SYS_INFO_DIG_INSTALLED', - 'SYS_INFO_DIG_MODE', 'SYS_INFO_MAPINFOWND', - 'SYS_INFO_MDICLIENTWND', 'SYS_INFO_MIBUILD_NUMBER', - 'SYS_INFO_MIPLATFORM', 'SYS_INFO_MIVERSION', - 'SYS_INFO_NUMBER_FORMAT', 'SYS_INFO_PLATFORM', - 'SYS_INFO_PRODUCTLEVEL', 'SYS_INFO_RUNTIME', - 'TAB_GEO_CONTROL_POINT_X', 'TAB_GEO_CONTROL_POINT_Y', - 'TAB_INFO_BROWSER_LIST', 'TAB_INFO_COORDSYS_CLAUSE', - 'TAB_INFO_COORDSYS_CLAUSE_WITHOUT_BOUNDS', - 'TAB_INFO_COORDSYS_MAXX', 'TAB_INFO_COORDSYS_MAXY', - 'TAB_INFO_COORDSYS_MINX', 'TAB_INFO_COORDSYS_MINY', - 'TAB_INFO_COORDSYS_NAME', 'TAB_INFO_EDITED', 'TAB_INFO_FASTEDIT', - 'TAB_INFO_MAPPABLE', 'TAB_INFO_MAPPABLE_TABLE', 'TAB_INFO_MAXX', - 'TAB_INFO_MAXY', 'TAB_INFO_MINX', 'TAB_INFO_MINY', 'TAB_INFO_NAME', - 'TAB_INFO_NCOLS', 'TAB_INFO_NREFS', 'TAB_INFO_NROWS', - 'TAB_INFO_NUM', 'TAB_INFO_READONLY', 'TAB_INFO_SEAMLESS', - 'TAB_INFO_SUPPORT_MZ', 'TAB_INFO_TABFILE', 'TAB_INFO_TEMP', - 'TAB_INFO_THEME_METADATA', 'TAB_INFO_TYPE', 'TAB_INFO_UNDO', - 'TAB_INFO_USERBROWSE', 'TAB_INFO_USERCLOSE', - 'TAB_INFO_USERDISPLAYMAP', 'TAB_INFO_USEREDITABLE', - 'TAB_INFO_USERMAP', 'TAB_INFO_USERREMOVEMAP', 'TAB_INFO_Z_UNIT', - 'TAB_INFO_Z_UNIT_SET', 'TAB_TYPE_BASE', 'TAB_TYPE_FME', - 'TAB_TYPE_IMAGE', 'TAB_TYPE_LINKED', 'TAB_TYPE_RESULT', - 'TAB_TYPE_VIEW', 'TAB_TYPE_WFS', 'TAB_TYPE_WMS', 'TRUE', 'WHITE', - 'WIN_3DMAP', 'WIN_BROWSER', 'WIN_BUTTONPAD', 'WIN_CART_LEGEND', - 'WIN_GRAPH', 'WIN_HELP', 'WIN_INFO', 'WIN_INFO_AUTOSCROLL', - 'WIN_INFO_CLONEWINDOW', 'WIN_INFO_ENHANCED_RENDERING', - 'WIN_INFO_EXPORT_ANTIALIASING', 'WIN_INFO_EXPORT_BORDER', - 'WIN_INFO_EXPORT_DITHER', 'WIN_INFO_EXPORT_FILTER', - 'WIN_INFO_EXPORT_MASKSIZE', 'WIN_INFO_EXPORT_THRESHOLD', - 'WIN_INFO_EXPORT_TRANSPRASTER', 'WIN_INFO_EXPORT_TRANSPVECTOR', - 'WIN_INFO_EXPORT_TRUECOLOR', 'WIN_INFO_HEIGHT', - 'WIN_INFO_LEGENDS_MAP', 'WIN_INFO_NAME', 'WIN_INFO_OPEN', - 'WIN_INFO_PRINTER_BORDER', 'WIN_INFO_PRINTER_BOTTOMMARGIN', - 'WIN_INFO_PRINTER_COPIES', 'WIN_INFO_PRINTER_DITHER', - 'WIN_INFO_PRINTER_LEFTMARGIN', 'WIN_INFO_PRINTER_METHOD', - 'WIN_INFO_PRINTER_NAME', 'WIN_INFO_PRINTER_ORIENT', - 'WIN_INFO_PRINTER_PAPERSIZE', 'WIN_INFO_PRINTER_RIGHTMARGIN', - 'WIN_INFO_PRINTER_SCALE_PATTERNS', 'WIN_INFO_PRINTER_TOPMARGIN', - 'WIN_INFO_PRINTER_TRANSPRASTER', 'WIN_INFO_PRINTER_TRANSPVECTOR', - 'WIN_INFO_PRINTER_TRUECOLOR', 'WIN_INFO_SMARTPAN', - 'WIN_INFO_SMOOTH_IMAGE', 'WIN_INFO_SMOOTH_TEXT', - 'WIN_INFO_SMOOTH_VECTOR', 'WIN_INFO_SNAPMODE', - 'WIN_INFO_SNAPTHRESHOLD', 'WIN_INFO_STATE', - 'WIN_INFO_SYSMENUCLOSE', 'WIN_INFO_TABLE', 'WIN_INFO_TOPMOST', - 'WIN_INFO_TYPE', 'WIN_INFO_WIDTH', 'WIN_INFO_WINDOWID', - 'WIN_INFO_WND', 'WIN_INFO_WORKSPACE', 'WIN_INFO_X', 'WIN_INFO_Y', - 'WIN_LAYOUT', 'WIN_LEGEND', 'WIN_MAPBASIC', 'WIN_MAPINFO', - 'WIN_MAPPER', 'WIN_MESSAGE', 'WIN_PENPICKER', - 'WIN_PRINTER_LANDSCAPE', 'WIN_PRINTER_PORTRAIT', 'WIN_RULER', - 'WIN_STATE_MAXIMIZED', 'WIN_STATE_MINIMIZED', 'WIN_STATE_NORMAL', - 'WIN_STATISTICS', 'WIN_STYLE_CHILD', 'WIN_STYLE_POPUP', - 'WIN_STYLE_POPUP_FULLCAPTION', 'WIN_STYLE_STANDARD', - 'WIN_SYMBOLPICKER', 'WIN_TOOLBAR', 'WIN_TOOLPICKER', 'YELLOW' - ), - 5 => array( - 'Abbrs', 'Above', 'Access', 'Active', 'Address', 'Advanced', - 'Affine', 'Align', 'Alpha', 'alpha_value', 'Always', 'Angle', - 'Animate', 'Antialiasing', 'Append', 'Apply', 'ApplyUpdates', - 'Arrow', 'Ascending', 'ASCII', 'At', 'AttributeData', 'Auto', - 'Autoflip', 'Autokey', 'Automatic', 'Autoscroll', 'Axis', - 'Background', 'Banding', 'Batch', 'Behind', 'Below', 'Bend', - 'Binary', 'Blocks', 'Border', 'BorderPen', 'Bottom', 'Bounds', - 'ByteOrder', 'ByVal', 'Calling', 'Camera', 'Candidates', - 'Cartesian', 'Cell', 'Center', 'Change', 'Char', 'Circle', - 'Clipping', 'CloseMatchesOnly', 'ClosestAddr', 'Color', 'Columns', - 'Contents', 'ControlPoints', 'Copies', 'Copyright', 'Counter', - 'Country', 'CountrySecondarySubdivision', 'CountrySubdivision', - 'Cross', 'CubicConvolution', 'Cull', 'Cursor', 'Custom', 'Data', - 'DBF', 'DDE', 'Decimal', 'DecimalPlaces', 'DefaultAmbientSpeed', - 'DefaultPropagationFactor', 'DeformatNumber', 'Delimiter', - 'Density', 'DenyWrite', 'Descending', 'Destroy', 'Device', - 'Dictionary', 'DInfo', 'Disable', 'DiscardUpdates', 'Display', - 'Dither', 'DrawMode', 'DropKey', 'Droplines', 'Duplicates', - 'Dynamic', 'Earth', 'East', 'EditLayerPopup', 'Elevation', 'Else', - 'ElseIf', 'Emf', 'Enable', 'Envinsa', 'ErrorDiffusion', 'Extents', - 'Fallback', 'FastEdit', 'FillFrame', 'Filter', 'First', 'Fit', - 'Fixed', 'FocalPoint', 'Footnote', 'Force', 'FromMapCatalog', - 'Front', 'Gap', 'Geographic', 'Geography', 'Graduated', 'Graphic', - 'Gutter', 'Half', 'Halftone', 'Handles', 'Height', 'Help', - 'HelpMsg', 'Hide', 'Hierarchical', 'HIGHLOW', 'History', 'Icon', - 'ID', 'Ignore', 'Image', 'Inflect', 'Inset', 'Inside', - 'Interactive', 'Internal', 'Interpolate', 'IntersectingStreet', - 'Justify', 'Key', 'Label', 'Labels', 'Landscape', 'Large', 'Last', - 'Layer', 'Left', 'Lib', 'Light', 'LinePen', 'Lines', 'Linestyle', - 'Longitude', 'LOWHIGH', 'Major', 'MajorPolygonOnly', - 'MajorRoadsOnly', 'MapBounds', 'MapMarker', 'MapString', 'Margins', - 'MarkMultiple', 'MaskSize', 'Match', 'MaxOffRoadDistance', - 'Message', 'MICODE', 'Minor', 'MixedCase', 'Mode', 'ModifierKeys', - 'Modify', 'Multiple', 'MultiPolygonRgns', 'Municipality', - 'MunicipalitySubdivision', 'Name', 'NATIVE', 'NearestNeighbor', - 'NoCollision', 'Node', 'Nodes', 'NoIndex', 'None', 'Nonearth', - 'NoRefresh', 'Normalized', 'North', 'Number', 'ObjectType', 'ODBC', - 'Off', 'OK', 'OLE', 'On', 'Options', 'Orientation', 'OtherBdy', - 'Output', 'Outside', 'Overlapped', 'Overwrite', 'Pagebreaks', - 'Pan', 'Papersize', 'Parent', 'PassThrough', 'Password', - 'Patterns', 'Per', 'Percent', 'Percentage', 'Permanent', - 'PersistentCache', 'Pie', 'Pitch', 'Placename', 'PointsOnly', - 'PolyObj', 'Portrait', 'Position', 'PostalCode', 'Prefer', - 'Preferences', 'Prev', 'Printer', 'Projection', 'PushButton', - 'Quantile', 'Query', 'Random', 'Range', 'Raster', 'Read', - 'ReadOnly', 'Rec', 'Redraw', 'Refine', 'Regionstyle', 'RemoveData', - 'Replace', 'Reprojection', 'Resampling', 'Restore', 'ResultCode', - 'ReturnHoles', 'Right', 'Roll', 'ROP', 'Rotated', 'Row', 'Ruler', - 'Scale', 'ScrollBars', 'Seamless', 'SecondaryPostalCode', - 'SelfInt', 'Separator', 'Series', 'Service', 'SetKey', - 'SetTraverse', 'Shades', 'Show', 'Simple', 'SimplificationFactor', - 'Size', 'Small', 'Smart', 'Smooth', 'South', 'Spacing', - 'SPATIALWARE', 'Spherical', 'Square', 'Stacked', 'Step', 'Store', - 'Street', 'StreetName', 'StreetNumber', 'StyleType', 'Subtitle', - 'SysMenuClose', 'Thin', 'Tick', 'Title', 'TitleAxisY', - 'TitleGroup', 'Titles', 'TitleSeries', 'ToggleButton', 'Tolerance', - 'ToolbarPosition', 'ToolButton', 'Toolkit', 'Top', 'Translucency', - 'translucency_percent', 'Transparency', 'Transparent', 'Traverse', - 'TrueColor', 'Uncheck', 'Undo', 'Union', 'Unit', 'Until', 'URL', - 'Use', 'User', 'UserBrowse', 'UserClose', 'UserDisplayMap', - 'UserEdit', 'UserMap', 'UserRemoveMap', 'Value', 'Variable', - 'Vary', 'Vector', 'Versioned', 'View', 'ViewDisplayPopup', - 'VisibleOnly', 'VMDefault', 'VMGrid', 'VMRaster', 'Voronoi', - 'Warnings', 'Wedge', 'West', 'Width', 'With', 'XY', 'XYINDEX', - 'Yaw', 'Zoom' - ) - ), - 'SYMBOLS' => array( - //Numeric/String Operators + Comparison Operators - '(', ')', '[', ']', '+', '-', '*', '/', '\\', '^', '&', - '=', '<', '>' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000ff;', //Statements + Clauses + Data Types + Logical Operators, Geographical Operators + SQL - 2 => 'color: #2391af;', //Special Procedures - 3 => 'color: #2391af;', //Functions - 4 => 'color: #c635cb;', //Constants - 5 => 'color: #0000ff;' //Extended keywords (case sensitive) - ), - 'COMMENTS' => array( - 1 => 'color: #008000;', - 'MULTI' => 'color: #008000;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #a31515;' - ), - 'NUMBERS' => array( - 0 => 'color: #000000;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #000000;' - ), - 'ESCAPE_CHAR' => array( - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - 0 => 'color: #12198b;', //Table Attributes - 1 => 'color: #2391af;' //Data Types - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - //Table Attribute - 0 => "[\\.]{1}[a-zA-Z0-9_]+", - //Data Type - 1 => "(?xi) \\s+ as \\s+ (Alias|Brush|Date|Float|Font|Integer|Logical|Object|Pen|SmallInt|String|Symbol)" - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/matlab.php b/_piecrust/libs/Geshi/geshi/matlab.php deleted file mode 100644 index 3922f50..0000000 --- a/_piecrust/libs/Geshi/geshi/matlab.php +++ /dev/null @@ -1,227 +0,0 @@ - 'Matlab M', - 'COMMENT_SINGLE' => array(1 => '%'), - 'COMMENT_MULTI' => array(), - //Matlab Strings - 'COMMENT_REGEXP' => array( - 2 => "/(? GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'break', 'case', 'catch', 'continue', 'elseif', 'else', 'end', 'for', - 'function', 'global', 'if', 'otherwise', 'persistent', 'return', - 'switch', 'try', 'while' - ), - 2 => array( - 'all','any','exist','is','logical','mislocked', - - 'abs','acos','acosh','acot','acoth','acsc','acsch','airy','angle', - 'ans','area','asec','asech','asin','asinh','atan','atan2','atanh', - 'auread','autumn','auwrite','axes','axis','balance','bar','bar3', - 'bar3h','barh','besselh','besseli','besselj','besselk','Bessely', - 'beta','betainc','betaln','bicg','bicgstab','bin2dec','bitand', - 'bitcmp','bitget','bitmax','bitor','bitset','bitshift','bitxor', - 'blkdiag','bone','box','brighten','builtin','bwcontr','calendar', - 'camdolly','camlight','camlookat','camorbit','campan','campos', - 'camproj','camroll','camtarget','camup','camva','camzoom','capture', - 'cart2pol','cart2sph','cat','caxis','cdf2rdf','ceil','cell', - 'cell2struct','celldisp','cellfun','cellplot','cellstr','cgs', - 'char','chol','cholinc','cholupdate','cla','clabel','class','clc', - 'clf','clg','clock','close','colmmd','colorbar','colorcube', - 'colordef','colormap','colperm','comet','comet3','compan','compass', - 'complex','computer','cond','condeig','condest','coneplot','conj', - 'contour','contourc','contourf','contourslice','contrast','conv', - 'conv2','convhull','cool','copper','copyobj','corrcoef','cos', - 'cosh','cot','coth','cov','cplxpair','cputime','cross','csc','csch', - 'cumprod','cumsum','cumtrapz','cylinder','daspect','date','datenum', - 'datestr','datetick','datevec','dbclear','dbcont','dbdown', - 'dblquad','dbmex','dbquit','dbstack','dbstatus','dbstep','dbstop', - 'dbtype','dbup','deblank','dec2bin','dec2hex','deconv','del2', - 'delaunay','det','diag','dialog','diff','diffuse','dlmread', - 'dlmwrite','dmperm','double','dragrect','drawnow','dsearch','eig', - 'eigs','ellipj','ellipke','eomday','eps','erf','erfc','erfcx', - 'erfiny','error','errorbar','errordlg','etime','eval','evalc', - 'evalin','exp','expint','expm','eye','ezcontour','ezcontourf', - 'ezmesh','ezmeshc','ezplot','ezplot3','ezpolar','ezsurf','ezsurfc', - 'factor','factorial','fclose','feather','feof','ferror','feval', - 'fft','fft2','fftshift','fgetl','fgets','fieldnames','figure', - 'fill','fill3','filter','filter2','find','findfigs','findobj', - 'findstr','fix','flag','flipdim','fliplr','flipud','floor','flops', - 'fmin','fmins','fopen','fplot','fprintf','fread','frewind','fscanf', - 'fseek','ftell','full','funm','fwrite','fzero','gallery','gamma', - 'gammainc','gammaln','gca','gcbo','gcd','gcf','gco','get', - 'getfield','ginput','gmres','gradient','gray','graymon','grid', - 'griddata','gsvd','gtext','hadamard','hankel','hdf','helpdlg', - 'hess','hex2dec','hex2num','hidden','hilb','hist','hold','hot', - 'hsv','hsv2rgb','i','ifft','ifft2','ifftn','ifftshift','imag', - 'image','imfinfo','imread','imwrite','ind2sub','Inf','inferiorto', - 'inline','inpolygon','input','inputdlg','inputname','int16', - 'int2str','int32','int8','interp1','interp2','interp3','interpft', - 'interpn','intersect','inv','invhilb','ipermute','isa','ishandle', - 'ismember','isocaps','isonormals','isosurface','j','jet','keyboard', - 'lcm','legend','legendre','light','lighting','lightingangle', - 'lin2mu','line','lines','linspace','listdlg','loadobj','log', - 'log10','log2','loglog','logm','logspace','lower','lscov','lu', - 'luinc','magic','mat2str','material','max','mean','median','menu', - 'menuedit','mesh','meshc','meshgrid','min','mod','msgbox','mu2lin', - 'NaN','nargchk','nargin','nargout','nchoosek','ndgrid','ndims', - 'newplot','nextpow2','nnls','nnz','nonzeros','norm','normest','now', - 'null','num2cell','num2str','nzmax','ode113,','ode15s,','ode23s,', - 'ode23t,','ode23tb','ode45,','odefile','odeget','odeset','ones', - 'orient','orth','pagedlg','pareto','pascal','patch','pause', - 'pbaspect','pcg','pcolor','peaks','perms','permute','pi','pie', - 'pie3','pinv','plot','plot3','plotmatrix','plotyy','pol2cart', - 'polar','poly','polyarea','polyder','polyeig','polyfit','polyval', - 'polyvalm','pow2','primes','print','printdlg','printopt','prism', - 'prod','propedit','qmr','qr','qrdelete','qrinsert','qrupdate', - 'quad','questdlg','quiver','quiver3','qz','rand','randn','randperm', - 'rank','rat','rats','rbbox','rcond','real','realmax','realmin', - 'rectangle','reducepatch','reducevolume','refresh','rem','repmat', - 'reset','reshape','residue','rgb2hsv','rgbplot','ribbon','rmfield', - 'roots','rose','rot90','rotate','rotate3d','round','rref', - 'rrefmovie','rsf2csf','saveobj','scatter','scatter3','schur', - 'script','sec','sech','selectmoveresize','semilogx','semilogy', - 'set','setdiff','setfield','setxor','shading','shg','shiftdim', - 'shrinkfaces','sign','sin','single','sinh','slice','smooth3','sort', - 'sortrows','sound','soundsc','spalloc','sparse','spconvert', - 'spdiags','specular','speye','spfun','sph2cart','sphere','spinmap', - 'spline','spones','spparms','sprand','sprandn','sprandsym','spring', - 'sprintf','sqrt','sqrtm','squeeze','sscanf','stairs','std','stem', - 'stem3','str2double','str2num','strcat','strcmp','strcmpi', - 'stream2','stream3','streamline','strings','strjust','strmatch', - 'strncmp','strrep','strtok','struct','struct2cell','strvcat', - 'sub2ind','subplot','subspace','subvolume','sum','summer', - 'superiorto','surf','surf2patch','surface','surfc','surfl', - 'surfnorm','svd','svds','symmmd','symrcm','symvar','tan','tanh', - 'texlabel','text Create','textread','textwrap','tic','title','toc', - 'toeplitz','trace','trapz','tril','trimesh','trisurf','triu', - 'tsearch','uicontext Create','uicontextmenu','uicontrol', - 'uigetfile','uimenu','uint32','uint8','uiputfile','uiresume', - 'uisetcolor','uisetfont','uiwait Used','union','unique','unwrap', - 'upper','var','varargin','varargout','vectorize','view','viewmtx', - 'voronoi','waitbar','waitforbuttonpress','warndlg','warning', - 'waterfall','wavread','wavwrite','weekday','whitebg','wilkinson', - 'winter','wk1read','wk1write','xlabel','xlim','ylabel','ylim', - 'zeros','zlabel','zlim','zoom', - //'[Keywords 6]', - 'addpath','cd','clear','copyfile','delete','diary','dir','disp', - 'doc','docopt','echo','edit','fileparts','format','fullfile','help', - 'helpdesk','helpwin','home','inmem','lasterr','lastwarn','length', - 'load','lookfor','ls','matlabrc','matlabroot','mkdir','mlock', - 'more','munlock','open','openvar','pack','partialpath','path', - 'pathtool','profile','profreport','pwd','quit','rmpath','save', - 'saveas','size','tempdir','tempname','type','ver','version','web', - 'what','whatsnew','which','who','whos','workspace' - ) - ), - 'SYMBOLS' => array( - '...' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - //3 => false, - //4 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000FF;', - 2 => 'color: #0000FF;' - ), - 'COMMENTS' => array( - 1 => 'color: #228B22;', - 2 => 'color:#A020F0;' - ), - 'ESCAPE_CHAR' => array( - 0 => '' - ), - 'BRACKETS' => array( - 0 => 'color: #080;' - ), - 'STRINGS' => array( - //0 => 'color: #A020F0;' - ), - 'NUMBERS' => array( - 0 => 'color: #33f;' - ), - 'METHODS' => array( - 1 => '', - 2 => '' - ), - 'SYMBOLS' => array( - 0 => 'color: #080;' - ), - 'REGEXPS' => array( - 0 => 'color: #33f;' - ), - 'SCRIPT' => array( - 0 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => 'http://www.mathworks.com/access/helpdesk/help/techdoc/ref/{FNAMEL}.html' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.', - 2 => '::' - ), - 'REGEXPS' => array( - //Complex numbers - 0 => '(?html)' - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/mirc.php b/_piecrust/libs/Geshi/geshi/mirc.php deleted file mode 100644 index d6d8e29..0000000 --- a/_piecrust/libs/Geshi/geshi/mirc.php +++ /dev/null @@ -1,171 +0,0 @@ - 'mIRC Scripting', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'alias', 'menu', 'dialog', - ), - 2 => array( - 'if', 'elseif', 'else', 'while', 'return', 'goto', 'var' - ), - 3 => array( - 'action','ajinvite','amsg','ame','anick','aop','auser', - 'avoice','auto','autojoin','away','background','ban','beep', - 'channel','clear','clearall','clipboard','close','closemsg','color', - 'copy','creq','ctcp','ctcpreply','ctcps','dcc','dde','ddeserver', - 'debug','describe','disable','disconnect','dlevel','dll','dns', - 'dqwindow','ebeeps','echo','editbox','emailaddr','enable','events', - 'exit','filter','findtext','finger','flash','flood','flush', - 'flushini','font','fsend','fserve','fullname','ghide','gload', - 'gmove','gopts','gplay','gpoint','gqreq','groups','gshow','gsize', - 'gstop','gtalk','gunload','guser','help','hop','ignore','invite', - 'join','kick','linesep','links','list','load','loadbuf','localinfo', - 'log','me','mdi','mkdir','mnick','mode','msg','names','nick','noop', - 'notice','notify','omsg','onotice','part','partall','pdcc', - 'perform','ping','play','pop','protect','pvoice','qmsg','qme', - 'query','queryrn','quit','raw','remini','remote','remove','rename', - 'enwin','resetidle','rlevel','rmdir','run','ruser','save','savebuf', - 'saveini','say','server','showmirc','sline','sound','speak','splay', - 'sreq','strip','time', - //'timer[N/name]', //Handled as a regular expression below ... - 'timers','timestamp','titlebar','tnick','tokenize','topic','ulist', - 'unload','updatenl','url','uwho','window','winhelp','write', - 'writeini','who','whois','whowas' - ) - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', '/' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #994444;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #990000; font-weight: bold;', - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - ), - 'BRACKETS' => array( - 0 => 'color: #FF0000;', - ), - 'STRINGS' => array( - ), - 'NUMBERS' => array( - 0 => '', - ), - 'METHODS' => array( - 0 => 'color: #008000;' - ), - 'SYMBOLS' => array( - 0 => 'color: #FF0000;', - ), - 'REGEXPS' => array( - 0 => 'color: #000099;', - 1 => 'color: #990000;', - 2 => 'color: #000099;', - 3 => 'color: #888800;', - 4 => 'color: #888800;', - 5 => 'color: #000099;', - 6 => 'color: #990000; font-weight: bold;', - 7 => 'color: #990000; font-weight: bold;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://www.mirc.com/{FNAMEL}' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array('.'), - 'REGEXPS' => array( - //Variable names - 0 => '\$[a-zA-Z0-9]+', - //Variable names - 1 => '(%|&)[\w\x80-\xFE]+', - //Client to Client Protocol handling - 2 => '(on|ctcp) (!|@|&)?(\d|\*):[a-zA-Z]+:', - /*4 => array( - GESHI_SEARCH => '((on|ctcp) (!|@|&)?(\d|\*):(Action|Active|Agent|AppActive|Ban|Chat|Close|Connect|Ctcp|CtcpReply|DccServer|DeHelp|DeOp|DeVoice|Dialog|Dns|Error|Exit|FileRcvd|FileSent|GetFail|Help|Hotlink|Input|Invite|Join|KeyDown|KeyUp|Kick|Load|Logon|MidiEnd|Mode|Mp3End|Nick|NoSound|Notice|Notify|Op|Open|Part|Ping|Pong|PlayEnd|Quit|Raw|RawMode|SendFail|Serv|ServerMode|ServerOp|Signal|Snotice|Start|Text|Topic|UnBan|Unload|Unotify|User|Mode|Voice|Wallops|WaveEnd):)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => 'i', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ),*/ - //Channel names - 3 => '(#|@)[a-zA-Z0-9]+', - 4 => '-[a-z\d]+', - //Raw protocol handling - 5 => 'raw (\d|\*):', - //Timer handling - 6 => '(?|:|\/)\/timer(?!s\b)[0-9a-zA-Z_]+', - // /... - 7 => '(?|:|\/|\w)\/[a-zA-Z][a-zA-Z0-9]*(?!>)' - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'NUMBERS' => GESHI_NEVER - ), - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => '(? \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/mmix.php b/_piecrust/libs/Geshi/geshi/mmix.php deleted file mode 100644 index 75b69c2..0000000 --- a/_piecrust/libs/Geshi/geshi/mmix.php +++ /dev/null @@ -1,173 +0,0 @@ - 'MMIX', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array(), - //Line address prefix suppression - 'COMMENT_REGEXP' => array(2 => "/^\s*[0-9a-f]{12,16}+(?:\s+[0-9a-f]+(?:\.{3}[0-9a-f]{2,})?)?:/mi"), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - /*CPU*/ - 1 => array( - '16ADDU','2ADDU','4ADDU','8ADDU','ADD','ADDU','AND','ANDN','ANDNH', - 'ANDNL','ANDNMH','ANDNML','BDIF','BEV','BN','BNN','BNP','BNZ','BOD', - 'BP','BZ','CMP','CMPU','CSEV','CSN','CSNN','CSNP','CSNZ','CSOD', - 'CSP','CSWAP','CSZ','DIV','DIVU','FADD','FCMP','FCMPE','FDIV', - 'FEQL','FEQLE','FINT','FIX','FIXU','FLOT','FLOTU','FMUL','FREM', - 'FSQRT','FSUB','FUN','FUNE','GET','GETA','GO','INCH','INCL','INCMH', - 'INCML','JMP','LDB','LDBU','LDHT','LDO','LDOU','LDSF','LDT','LDTU', - 'LDUNC','LDVTS','LDW','LDWU','MOR','MUL','MULU','MUX','MXOR','NAND', - 'NEG','NEGU','NOR','NXOR','ODIF','OR','ORH','ORL','ORMH','ORML', - 'ORN','PBEV','PBN','PBNN','PBNP','PBNZ','PBOD','PBP','PBZ','POP', - 'PREGO','PRELD','PREST','PUSHGO','PUSHJ','PUT','RESUME','SADD', - 'SAVE','SETH','SETL','SETMH','SETML','SFLOT','SFLOTU','SL','SLU', - 'SR','SRU','STB','STBU','STCO','STHT','STO','STOU','STSF','STT', - 'STTU','STUNC','STW','STWU','SUB','SUBU','SWYM','SYNC','SYNCD', - 'SYNCID','TDIF','TRAP','TRIP','UNSAVE','WDIF','XOR','ZSEV','ZSN', - 'ZSNN','ZSNP','ZSNZ','ZSOD','ZSP','ZSZ' - ), - /*registers*/ - 3 => array( - 'rA','rB','rC','rD','rE','rF','rG','rH','rI','rJ','rK','rL','rM', - 'rN','rO','rP','rQ','rR','rS','rT','rU','rV','rW','rX','rY','rZ', - 'rBB','rTT','rWW','rXX','rYY','rZZ' - ), - /*Directive*/ - 4 => array( - ), - /*Operands*/ - 5 => array( - ) - ), - 'SYMBOLS' => array( - '[', ']', '(', ')', - '+', '-', '*', '/', '%', - '.', ',', ';', ':' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => false, - 3 => true, - 4 => false, - 5 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #00007f; font-weight: bold;', - 2 => 'color: #0000ff; font-weight: bold;', - 3 => 'color: #00007f;', - 4 => 'color: #000000; font-weight: bold;', - 5 => 'color: #000000; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #adadad; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900; font-weight: bold;' - ), - 'STRINGS' => array( - 0 => 'color: #7f007f;' - ), - 'NUMBERS' => array( - 0 => 'color: #0000ff;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'REGEXPS' => array( -// 0 => 'color: #0000ff;', -// 1 => 'color: #0000ff;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '' - ), - 'NUMBERS' => - GESHI_NUMBER_BIN_PREFIX_PERCENT | - GESHI_NUMBER_BIN_SUFFIX | - GESHI_NUMBER_HEX_PREFIX | - GESHI_NUMBER_HEX_SUFFIX | - GESHI_NUMBER_OCT_SUFFIX | - GESHI_NUMBER_INT_BASIC | - GESHI_NUMBER_FLT_NONSCI | - GESHI_NUMBER_FLT_NONSCI_F | - GESHI_NUMBER_FLT_SCI_ZERO, - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - //Hex numbers -// 0 => /* */ "(?<=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))(?:[0-9][0-9a-fA-F]{0,31}[hH]|0x[0-9a-fA-F]{1,32})(?=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))", - //Binary numbers -// 1 => "(?<=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))[01]{1,64}[bB](?=([\\s\\(\\)\\[\\],;.:+\\-\\/*]))" - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 8, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "(?|^])", - 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%])" - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/modula2.php b/_piecrust/libs/Geshi/geshi/modula2.php deleted file mode 100644 index 0e3a9ae..0000000 --- a/_piecrust/libs/Geshi/geshi/modula2.php +++ /dev/null @@ -1,136 +0,0 @@ - 'Modula-2', - 'COMMENT_MULTI' => array('(*' => '*)'), - 'COMMENT_SINGLE' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'HARDQUOTE' => array("'", "'"), - 'HARDESCAPE' => array("''"), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( /* reserved words */ - 'AND', 'ARRAY', 'BEGIN', 'BY', 'CASE', 'CONST', 'DEFINITION', - 'DIV', 'DO', 'ELSE', 'ELSIF', 'END', 'EXIT', 'EXPORT', 'FOR', - 'FROM', 'IF', 'IMPLEMENTATION', 'IMPORT', 'IN', 'LOOP', 'MOD', - 'MODULE', 'NOT', 'OF', 'OR', 'POINTER', 'PROCEDURE', 'QUALIFIED', - 'RECORD', 'REPEAT', 'RETURN', 'SET', 'THEN', 'TO', 'TYPE', - 'UNTIL', 'VAR', 'WHILE', 'WITH' - ), - 2 => array( /* pervasive constants */ - 'NIL', 'FALSE', 'TRUE', - ), - 3 => array( /* pervasive types */ - 'BITSET', 'CAP', 'CHR', 'DEC', 'DISPOSE', 'EXCL', 'FLOAT', - 'HALT', 'HIGH', 'INC', 'INCL', 'MAX', 'MIN', 'NEW', 'ODD', 'ORD', - 'SIZE', 'TRUNC', 'VAL' - ), - 4 => array( /* pervasive functions and macros */ - 'ABS', 'BOOLEAN', 'CARDINAL', 'CHAR', 'INTEGER', - 'LONGCARD', 'LONGINT', 'LONGREAL', 'PROC', 'REAL' - ), - ), - 'SYMBOLS' => array( - ',', ':', '=', '+', '-', '*', '/', '#', '~' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #000066;', - 4 => 'color: #000066; font-weight: bold;' - ), - 'COMMENTS' => array( - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 'HARD' => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;', - 'HARD' => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #0066ee;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - 1 => '' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/modula3.php b/_piecrust/libs/Geshi/geshi/modula3.php deleted file mode 100644 index e6a9a07..0000000 --- a/_piecrust/libs/Geshi/geshi/modula3.php +++ /dev/null @@ -1,135 +0,0 @@ - 'Modula-3', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array('(*' => '*)'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'HARDQUOTE' => array("'", "'"), - 'HARDESCAPE' => array("''"), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'AND', 'ANY', 'ARRAY', 'AS', 'BEGIN', 'BITS', 'BRANDED', 'BY', 'CASE', - 'CONST', 'DIV', 'DO', 'ELSE', 'ELSIF', 'END', 'EVAL', 'EXCEPT', 'EXCEPTION', - 'EXIT', 'EXPORTS', 'FINALLY', 'FOR', 'FROM', 'GENERIC', 'IF', 'IMPORT', 'IN', - 'INTERFACE', 'LOCK', 'LOOP', 'METHODS', 'MOD', 'MODULE', 'NOT', 'OBJECT', 'OF', - 'OR', 'OVERRIDE', 'PROCEDURE', 'RAISE', 'RAISES', 'READONLY', 'RECORD', 'REF', - 'REPEAT', 'RETURN', 'REVEAL', 'ROOT', 'SET', 'THEN', 'TO', 'TRY', 'TYPE', 'TYPECASE', - 'UNSAFE', 'UNTIL', 'UNTRACED', 'VALUE', 'VAR', 'WHILE', 'WITH' - ), - 2 => array( - 'NIL', 'NULL', 'FALSE', 'TRUE', - ), - 3 => array( - 'ABS','ADR','ADRSIZE','BITSIZE','BYTESIZE','CEILING','DEC','DISPOSE', - 'EXTENDED','FIRST','FLOAT','FLOOR','INC','ISTYPE','LAST','LOOPHOLE','MAX','MIN', - 'NARROW','NEW','NUMBER','ORD','ROUND','SUBARRAY','TRUNC','TYPECODE', 'VAL' - ), - 4 => array( - 'ADDRESS', 'BOOLEAN', 'CARDINAL', 'CHAR', 'INTEGER', - 'LONGREAL', 'MUTEX', 'REAL', 'REFANY', 'TEXT' - ), - ), - 'SYMBOLS' => array( - ',', ':', '=', '+', '-', '*', '/', '#' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #000066;', - 4 => 'color: #000066; font-weight: bold;' - ), - 'COMMENTS' => array( - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 'HARD' => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;', - 'HARD' => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #0066ee;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/mpasm.php b/_piecrust/libs/Geshi/geshi/mpasm.php deleted file mode 100644 index e57f2c3..0000000 --- a/_piecrust/libs/Geshi/geshi/mpasm.php +++ /dev/null @@ -1,164 +0,0 @@ - 'Microchip Assembler', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - /*Directive Language*/ - 4 => array( - 'CONSTANT', '#DEFINE', 'END', 'EQU', 'ERROR', 'ERROR-LEVEL', '#INCLUDE', 'LIST', - 'MESSG', 'NOLIST', 'ORG', 'PAGE', 'PROCESSOR', 'RADIX', 'SET', 'SPACE', 'SUBTITLE', - 'TITLE', '#UNDEFINE', 'VARIABLE', 'ELSE', 'ENDIF', 'ENDW', 'IF', 'IFDEF', 'IFNDEF', - 'WHILE', '__BADRAM', 'CBLOCK', '__CONFIG', 'DA', 'DATA', 'DB', 'DE', 'DT', 'DW', - 'ENDC', 'FILL', '__IDLOCS', '__MAXRAM', 'RES', 'ENDM', 'EXITM', 'EXPAND', 'LOCAL', - 'MACRO', 'NOEXPAND', 'BANKISEL', 'BANKSEL', 'CODE', 'EXTERN', 'GLOBAL', 'IDATA', - 'PAGESEL', 'UDATA', 'UDATA_ACS', 'UDATA_OVR', 'UDATA_SHR' - ), - /* 12&14-bit Specific Instruction Set*/ - 1 => array( - 'andlw', 'call', 'clrwdt', 'goto', 'iorlw', 'movlw', 'option', 'retlw', 'sleep', - 'tris', 'xorlw', 'addwf', 'andwf', 'clrf', 'clrw', 'comf', 'decf', 'decfsz', 'incf', - 'incfsz', 'iorwf', 'movf', 'nop', 'rlf', 'rrf', 'subwf', 'swapf', 'xorwf', - 'bcf', 'bsf', 'btfsc', 'btfss', - 'addlw', 'retfie', 'return', 'sublw', 'addcf', 'adddcf', 'b', 'bc', 'bdc', - 'bnc', 'bndc', 'bnz', 'bz', 'clrc', 'clrdc', 'clrz', 'lcall', 'lgoto', 'movfw', - 'negf', 'setc', 'setdc', 'setz', 'skpc', 'skpdc', 'skpnc', 'skpndc', 'skpnz', 'skpz', - 'subcf', 'subdcf', 'tstf' - ), - /* 16-bit Specific Instructiob Set */ - 2 => array ( - 'movfp', 'movlb', 'movlp', 'movpf', 'movwf', 'tablrd', 'tablwt', 'tlrd', 'tlwt', - 'addwfc', 'daw', 'mullw', 'negw', 'rlcf', 'rlncf', 'rrcf', 'rrncf', 'setf', 'subwfb', - 'btg', 'cpfseq', 'cpfsgt', 'cpfslt', 'dcfsnz', 'infsnz', 'tstfsz', 'lfsr', 'bnn', - 'bnov', 'bra', 'pop', 'push', 'rcall', 'reset' - ), - /* Registers */ - 3 => array( - 'INDF', 'TMR0', 'PCL', 'STATUS', 'FSR', 'PORTA', 'PORTB', 'PORTC', 'PORTD', 'PORTE', - 'PCLATH', 'INTCON', 'PIR1', 'PIR2', 'TMR1L', 'TMR1H', 'T1CON', 'TMR2', 'T2CON', 'TMR2L', - 'TMR2H', 'TMR0H', 'TMR0L', 'SSPBUF', 'SSPCON', 'CCPR1L', 'CCPR1H', 'CCP1CON', 'RCSTA', - 'TXREG', 'RCREG', 'CCPR2L', 'CCPR2H', 'CCP2CON', 'OPTION', 'TRISA', 'TRISB', 'TRISC', - 'TRISD', 'TRISE', 'PIE2', 'PIE1', 'PR2', 'SSPADD', 'SSPSTAT', 'TXSTA', 'SPBRG' - ), - /*Operands*/ - 5 => array( - 'high','low' - ) - ), - 'SYMBOLS' => array( - '[', ']', '(', ')' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #00007f;', - 2 => 'color: #0000ff;', - 3 => 'color: #007f00;', - 4 => 'color: #46aa03; font-weight:bold;', - 5 => 'color: #7f0000;' - ), - 'COMMENTS' => array( - 1 => 'color: #adadad; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #7f007f;' - ), - 'NUMBERS' => array( - 0 => 'color: #ff0000;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - 0 => 'color: #ff0000;', - 1 => 'color: #ff0000;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - //Hex numbers - 0 => '[0-9a-fA-F]{1,32}[hH]', - //Binary numbers - 1 => '[01]{1,64}[bB]' - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/mxml.php b/_piecrust/libs/Geshi/geshi/mxml.php deleted file mode 100644 index fc1c424..0000000 --- a/_piecrust/libs/Geshi/geshi/mxml.php +++ /dev/null @@ -1,145 +0,0 @@ - 'MXML', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(''), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - ), - 'SYMBOLS' => array( - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - ), - 'COMMENTS' => array( - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'SCRIPT' => array( - 0 => 'color: #00bbdd;', - 1 => 'color: #ddbb00;', - 2 => 'color: #339933;', - 3 => 'color: #000000;' - ), - 'REGEXPS' => array( - 0 => 'font-weight: bold; color: black;', - 1 => 'color: #7400FF;', - 2 => 'color: #7400FF;' - ) - ), - 'URLS' => array( - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - // xml declaration - 0 => array( - GESHI_SEARCH => '(<[\/?|(\?xml)]?[a-z0-9_\-:]*(\?>))', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => 'i', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - // opening tags - 1 => array( - GESHI_SEARCH => '(<\/?[a-z]+:[a-z]+)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => 'i', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - // closing tags - 2 => array( - GESHI_SEARCH => '(\/?>)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => 'i', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ) - ), - 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, - 'SCRIPT_DELIMITERS' => array( - 0 => array( - ' '>' - ), - 1 => array( - '&' => ';' - ), - 2 => array( - //' ']]>' - '' => '' - ), - 3 => array( - '<' => '>' - ) - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => false, - 1 => false, - 2 => false, - 3 => true - ), - 'TAB_WIDTH' => 4 -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/mysql.php b/_piecrust/libs/Geshi/geshi/mysql.php deleted file mode 100644 index 873cff3..0000000 --- a/_piecrust/libs/Geshi/geshi/mysql.php +++ /dev/null @@ -1,475 +0,0 @@ - 'MySQL', - //'COMMENT_SINGLE' => array(1 =>'--', 2 => '#'), // '--' MUST be folowed by whitespace,not necessarily a space - 'COMMENT_SINGLE' => array( - 1 =>'-- ', - 2 => '#' - ), - 'COMMENT_REGEXP' => array( - 1 => "/(?:--\s).*?$/", // double dash followed by any whitespace - ), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, // @@@ would be nice if this could be defined per group! - 'QUOTEMARKS' => array("'", '"', '`'), - 'ESCAPE_CHAR' => '\\', // by default only, can be specified - 'ESCAPE_REGEXP' => array( - 1 => "/[_%]/", // search wildcards - ), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | - GESHI_NUMBER_OCT_PREFIX | - GESHI_NUMBER_HEX_PREFIX | - GESHI_NUMBER_FLT_NONSCI | - GESHI_NUMBER_FLT_SCI_SHORT | - GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - 1 => array( - // Mix: statement keywords and keywords that don't fit in any other - // category, or have multiple usage/meanings - 'ACTION','ADD','AFTER','ALGORITHM','ALL','ALTER','ANALYZE','ANY', - 'ASC','AS','BDB','BEGIN','BERKELEYDB','BINARY','BTREE','CALL', - 'CASCADED','CASCADE','CHAIN','CHECK','COLUMNS','COLUMN','COMMENT', - 'COMMIT','COMMITTED','CONSTRAINT','CONTAINS SQL','CONSISTENT', - 'CONVERT','CREATE','CROSS','DATA','DATABASES', - 'DECLARE','DEFINER','DELAYED','DELETE','DESCRIBE','DESC', - 'DETERMINISTIC','DISABLE','DISCARD','DISTINCTROW','DISTINCT','DO', - 'DROP','DUMPFILE','DUPLICATE KEY','ENABLE','ENCLOSED BY','ENGINE', - 'ERRORS','ESCAPED BY','EXISTS','EXPLAIN','EXTENDED','FIELDS', - 'FIRST','FOR EACH ROW','FORCE','FOREIGN KEY','FROM','FULL', - 'FUNCTION','GLOBAL','GRANT','GROUP BY','HANDLER','HASH','HAVING', - 'HELP','HIGH_PRIORITY','IF NOT EXISTS','IGNORE','IMPORT','INDEX', - 'INFILE','INNER','INNODB','INOUT','INTO','INVOKER', - 'ISOLATION LEVEL','JOIN','KEYS','KEY','KILL','LANGUAGE SQL','LAST', - 'LIMIT','LINES','LOAD','LOCAL','LOCK','LOW_PRIORITY', - 'MASTER_SERVER_ID','MATCH','MERGE','MIDDLEINT','MODIFIES SQL DATA', - 'MODIFY','MRG_MYISAM','NATURAL','NEXT','NO SQL','NO','ON', - 'OPTIMIZE','OPTIONALLY','OPTION','ORDER BY','OUTER','OUTFILE','OUT', - 'PARTIAL','PREV','PRIMARY KEY','PRIVILEGES','PROCEDURE','PURGE', - 'QUICK','READS SQL DATA','READ','REFERENCES','RELEASE','RENAME', - 'REPEATABLE','REQUIRE','RESTRICT','RETURNS','REVOKE', - 'ROLLBACK','ROUTINE','RTREE','SAVEPOINT','SELECT', - 'SERIALIZABLE','SESSION','SET','SHARE MODE','SHOW','SIMPLE', - 'SNAPSHOT','SOME','SONAME','SQL SECURITY','SQL_BIG_RESULT', - 'SQL_BUFFER_RESULT','SQL_CACHE','SQL_CALC_FOUND_ROWS', - 'SQL_NO_CACHE','SQL_SMALL_RESULT','SSL','START','STARTING BY', - 'STATUS','STRAIGHT_JOIN','STRIPED','TABLESPACE','TABLES','TABLE', - 'TEMPORARY','TEMPTABLE','TERMINATED BY','TO','TRANSACTIONS', - 'TRANSACTION','TRIGGER','TYPES','TYPE','UNCOMMITTED','UNDEFINED', - 'UNION','UNLOCK_TABLES','UPDATE','USAGE','USE','USER_RESOURCES', - 'USING','VALUES','VALUE','VIEW','WARNINGS','WHERE','WITH ROLLUP', - 'WITH','WORK','WRITE', - ), - 2 => array( //No ( must follow - // Mix: statement keywords distinguished from functions by the same name - "CURRENT_USER", "DATABASE", "IN", "INSERT", "DEFAULT", "REPLACE", "SCHEMA", "TRUNCATE" - ), - 3 => array( - // Values (Constants) - 'FALSE','NULL','TRUE', - ), - 4 => array( - // Column Data Types - 'BIGINT','BIT','BLOB','BOOLEAN','BOOL','CHARACTER VARYING', - 'CHAR VARYING','DATETIME','DECIMAL','DEC','DOUBLE PRECISION', - 'DOUBLE','ENUM','FIXED','FLOAT','GEOMETRYCOLLECTION','GEOMETRY', - 'INTEGER','INT','LINESTRING','LONGBLOB','LONGTEXT','MEDIUMBLOB', - 'MEDIUMINT','MEDIUMTEXT','MULTIPOINT','MULTILINESTRING', - 'MULTIPOLYGON','NATIONAL CHARACTER','NATIONAL CHARACTER VARYING', - 'NATIONAL CHAR VARYING','NATIONAL VARCHAR','NCHAR VARCHAR','NCHAR', - 'NUMERIC','POINT','POLYGON','REAL','SERIAL', - 'SMALLINT','TEXT','TIMESTAMP','TINYBLOB','TINYINT', - 'TINYTEXT','VARBINARY','VARCHARACTER','VARCHAR', - ), - 5 => array( //No ( must follow - // Column data types distinguished from functions by the same name - "CHAR", "DATE", "TIME" - ), - 6 => array( - // Table, Column & Index Attributes - 'AUTO_INCREMENT','AVG_ROW_LENGTH','BOTH','CHECKSUM','CONNECTION', - 'DATA DIRECTORY','DEFAULT NULL','DELAY_KEY_WRITE','FULLTEXT', - 'INDEX DIRECTORY','INSERT_METHOD','LEADING','MAX_ROWS','MIN_ROWS', - 'NOT NULL','PACK_KEYS','ROW_FORMAT','SERIAL DEFAULT VALUE','SIGNED', - 'SPATIAL','TRAILING','UNIQUE','UNSIGNED','ZEROFILL' - ), - 7 => array( //No ( must follow - // Column attribute distinguished from function by the same name - "CHARSET" - ), - 8 => array( - // Date and Time Unit Specifiers - 'DAY_HOUR','DAY_MICROSECOND','DAY_MINUTE','DAY_SECOND', - 'HOUR_MICROSECOND','HOUR_MINUTE','HOUR_SECOND', - 'MINUTE_MICROSECOND','MINUTE_SECOND', - 'SECOND_MICROSECOND','YEAR_MONTH' - ), - 9 => array( //No ( must follow - // Date-time unit specifiers distinguished from functions by the same name - "DAY", "HOUR", "MICROSECOND", "MINUTE", "MONTH", "QUARTER", "SECOND", "WEEK", "YEAR" - ), - 10 => array( - // Operators (see also Symbols) - 'AND','BETWEEN','CHARACTER SET','COLLATE','DIV','IS NOT NULL', - 'IS NOT','IS NULL','IS','LIKE','NOT','OFFSET','OR','REGEXP','RLIKE', - 'SOUNDS LIKE','XOR' - ), - 11 => array( //No ( must follow - // Operator distinghuished from function by the same name - "INTERVAL" - ), - 12 => array( - // Control Flow (functions) - 'CASE','ELSE','END','IFNULL','IF','NULLIF','THEN','WHEN', - ), - 13 => array( - // String Functions - 'ASCII','BIN','BIT_LENGTH','CHAR_LENGTH','CHARACTER_LENGTH', - 'CONCAT_WS','CONCAT','ELT','EXPORT_SET','FIELD', - 'FIND_IN_SET','FORMAT','HEX','INSTR','LCASE','LEFT','LENGTH', - 'LOAD_FILE','LOCATE','LOWER','LPAD','LTRIM','MAKE_SET','MID', - 'OCTET_LENGTH','ORD','POSITION','QUOTE','REPEAT','REVERSE', - 'RIGHT','RPAD','RTRIM','SOUNDEX','SPACE','STRCMP','SUBSTRING_INDEX', - 'SUBSTRING','TRIM','UCASE','UNHEX','UPPER', - ), - 14 => array( //A ( must follow - // String functions distinguished from other keywords by the same name - "INSERT", "REPLACE", "CHAR" - ), - 15 => array( - // Numeric Functions - 'ABS','ACOS','ASIN','ATAN2','ATAN','CEILING','CEIL', - 'CONV','COS','COT','CRC32','DEGREES','EXP','FLOOR','LN','LOG10', - 'LOG2','LOG','MOD','OCT','PI','POWER','POW','RADIANS','RAND', - 'ROUND','SIGN','SIN','SQRT','TAN', - ), - 16 => array( //A ( must follow - // Numeric function distinguished from other keyword by the same name - "TRUNCATE" - ), - 17 => array( - // Date and Time Functions - 'ADDDATE','ADDTIME','CONVERT_TZ','CURDATE','CURRENT_DATE', - 'CURRENT_TIME','CURRENT_TIMESTAMP','CURTIME','DATE_ADD', - 'DATE_FORMAT','DATE_SUB','DATEDIFF','DAYNAME','DAYOFMONTH', - 'DAYOFWEEK','DAYOFYEAR','EXTRACT','FROM_DAYS','FROM_UNIXTIME', - 'GET_FORMAT','LAST_DAY','LOCALTIME','LOCALTIMESTAMP','MAKEDATE', - 'MAKETIME','MONTHNAME','NOW','PERIOD_ADD', - 'PERIOD_DIFF','SEC_TO_TIME','STR_TO_DATE','SUBDATE','SUBTIME', - 'SYSDATE','TIME_FORMAT','TIME_TO_SEC', - 'TIMESTAMPADD','TIMESTAMPDIFF','TO_DAYS', - 'UNIX_TIMESTAMP','UTC_DATE','UTC_TIME','UTC_TIMESTAMP','WEEKDAY', - 'WEEKOFYEAR','YEARWEEK', - ), - 18 => array( //A ( must follow - // Date-time functions distinguished from other keywords by the same name - "DATE", "DAY", "HOUR", "MICROSECOND", "MINUTE", "MONTH", "QUARTER", - "SECOND", "TIME", "WEEK", "YEAR" - ), - 19 => array( - // Comparison Functions - 'COALESCE','GREATEST','ISNULL','LEAST', - ), - 20 => array( //A ( must follow - // Comparison functions distinguished from other keywords by the same name - "IN", "INTERVAL" - ), - 21 => array( - // Encryption and Compression Functions - 'AES_DECRYPT','AES_ENCRYPT','COMPRESS','DECODE','DES_DECRYPT', - 'DES_ENCRYPT','ENCODE','ENCRYPT','MD5','OLD_PASSWORD','PASSWORD', - 'SHA1','SHA','UNCOMPRESS','UNCOMPRESSED_LENGTH', - ), - 22 => array( - // GROUP BY (aggregate) Functions - 'AVG','BIT_AND','BIT_OR','BIT_XOR','COUNT','GROUP_CONCAT', - 'MAX','MIN','STDDEV_POP','STDDEV_SAMP','STDDEV','STD','SUM', - 'VAR_POP','VAR_SAMP','VARIANCE', - ), - 23 => array( - // Information Functions - 'BENCHMARK','COERCIBILITY','COLLATION','CONNECTION_ID', - 'FOUND_ROWS','LAST_INSERT_ID','ROW_COUNT', - 'SESSION_USER','SYSTEM_USER','USER','VERSION', - ), - 24 => array( //A ( must follow - // Information functions distinguished from other keywords by the same name - "CURRENT_USER", "DATABASE", "SCHEMA", "CHARSET" - ), - 25 => array( - // Miscellaneous Functions - 'ExtractValue','BIT_COUNT','GET_LOCK','INET_ATON','INET_NTOA', - 'IS_FREE_LOCK','IS_USED_LOCK','MASTER_POS_WAIT','NAME_CONST', - 'RELEASE_LOCK','SLEEP','UpdateXML','UUID', - ), - 26 => array( //A ( must follow - // Miscellaneous function distinguished from other keyword by the same name - "DEFAULT" - ), - 27 => array( - // Geometry Functions - 'Area','AsBinary','AsText','AsWKB','AsWKT','Boundary','Buffer', - 'Centroid','Contains','ConvexHull','Crosses', - 'Difference','Dimension','Disjoint','Distance', - 'EndPoint','Envelope','Equals','ExteriorRing', - 'GLength','GeomCollFromText','GeomCollFromWKB','GeomFromText', - 'GeomFromWKB','GeometryCollectionFromText', - 'GeometryCollectionFromWKB','GeometryFromText','GeometryFromWKB', - 'GeometryN','GeometryType', - 'InteriorRingN','Intersection','Intersects','IsClosed','IsEmpty', - 'IsRing','IsSimple', - 'LineFromText','LineFromWKB','LineStringFromText', - 'LineStringFromWKB', - 'MBRContains','MBRDisjoint','MBREqual','MBRIntersects', - 'MBROverlaps','MBRTouches','MBRWithin','MLineFromText', - 'MLineFromWKB','MPointFromText','MPointFromWKB','MPolyFromText', - 'MPolyFromWKB','MultiLineStringFromText','MultiLineStringFromWKB', - 'MultiPointFromText','MultiPointFromWKB','MultiPolygonFromText', - 'MultiPolygonFromWKB', - 'NumGeometries','NumInteriorRings','NumPoints', - 'Overlaps', - 'PointFromText','PointFromWKB','PointN','PointOnSurface', - 'PolyFromText','PolyFromWKB','PolygonFromText','PolygonFromWKB', - 'Related','SRID','StartPoint','SymDifference', - 'Touches', - 'Union', - 'Within', - 'X', - 'Y', - ), - ), - 'SYMBOLS' => array( - 1 => array( - /* Operators */ - '=', ':=', // assignment operators - '||', '&&', '!', // locical operators - '=', '<=>', '>=', '>', '<=', '<', '<>', '!=', // comparison operators - '|', '&', '^', '~', '<<', '>>', // bitwise operators - '-', '+', '*', '/', '%', // numerical operators - ), - 2 => array( - /* Other syntactical symbols */ - '(', ')', - ',', ';', - ), - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false, - 7 => false, - 8 => false, - 9 => false, - 10 => false, - 11 => false, - 12 => false, - 13 => false, - 13 => false, - 14 => false, - 15 => false, - 16 => false, - 17 => false, - 18 => false, - 19 => false, - 20 => false, - 21 => false, - 22 => false, - 23 => false, - 24 => false, - 25 => false, - 26 => false, - 27 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #990099; font-weight: bold;', // mix - 2 => 'color: #990099; font-weight: bold;', // mix - 3 => 'color: #9900FF; font-weight: bold;', // constants - 4 => 'color: #999900; font-weight: bold;', // column data types - 5 => 'color: #999900; font-weight: bold;', // column data types - 6 => 'color: #FF9900; font-weight: bold;', // attributes - 7 => 'color: #FF9900; font-weight: bold;', // attributes - 8 => 'color: #9900FF; font-weight: bold;', // date-time units - 9 => 'color: #9900FF; font-weight: bold;', // date-time units - - 10 => 'color: #CC0099; font-weight: bold;', // operators - 11 => 'color: #CC0099; font-weight: bold;', // operators - - 12 => 'color: #009900;', // control flow (functions) - 13 => 'color: #000099;', // string functions - 14 => 'color: #000099;', // string functions - 15 => 'color: #000099;', // numeric functions - 16 => 'color: #000099;', // numeric functions - 17 => 'color: #000099;', // date-time functions - 18 => 'color: #000099;', // date-time functions - 19 => 'color: #000099;', // comparison functions - 20 => 'color: #000099;', // comparison functions - 21 => 'color: #000099;', // encryption functions - 22 => 'color: #000099;', // aggregate functions - 23 => 'color: #000099;', // information functions - 24 => 'color: #000099;', // information functions - 25 => 'color: #000099;', // miscellaneous functions - 26 => 'color: #000099;', // miscellaneous functions - 27 => 'color: #00CC00;', // geometry functions - ), - 'COMMENTS' => array( - 'MULTI' => 'color: #808000; font-style: italic;', - 1 => 'color: #808080; font-style: italic;', - 2 => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #004000; font-weight: bold;', - 1 => 'color: #008080; font-weight: bold;' // search wildcards - ), - 'BRACKETS' => array( - 0 => 'color: #FF00FF;' - ), - 'STRINGS' => array( - 0 => 'color: #008000;' - ), - 'NUMBERS' => array( - 0 => 'color: #008080;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 1 => 'color: #CC0099;', // operators - 2 => 'color: #000033;', // syntax - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', - 2 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', - 3 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', - 4 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', - 5 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', - 6 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', - 7 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', - 8 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', - 9 => 'http://search.mysql.com/search?site=refman-%35%31&q={FNAME}', - - 10 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/non-typed-operators.html', - 11 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/non-typed-operators.html', - - 12 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/control-flow-functions.html', - 13 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/string-functions.html', - 14 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/string-functions.html', - 15 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/numeric-functions.html', - 16 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/numeric-functions.html', - 17 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/date-and-time-functions.html', - 18 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/date-and-time-functions.html', - 19 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/comparison-operators.html', - 20 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/comparison-operators.html', - 21 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/encryption-functions.html', - 22 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/group-by-functions-and-modifiers.html', - 23 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/information-functions.html', - 24 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/information-functions.html', - 25 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/func-op-summary-ref.html', - 26 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/func-op-summary-ref.html', - 27 => 'http://dev.mysql.com/doc/refman/%35%2E%31/en/analysing-spatial-information.html', - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 2 => array( - 'DISALLOWED_AFTER' => '(?![\(\w])' - ), - 5 => array( - 'DISALLOWED_AFTER' => '(?![\(\w])' - ), - 7 => array( - 'DISALLOWED_AFTER' => '(?![\(\w])' - ), - 9 => array( - 'DISALLOWED_AFTER' => '(?![\(\w])' - ), - 11 => array( - 'DISALLOWED_AFTER' => '(?![\(\w])' - ), - - 14 => array( - 'DISALLOWED_AFTER' => '(?=\()' - ), - 16 => array( - 'DISALLOWED_AFTER' => '(?=\()' - ), - 18 => array( - 'DISALLOWED_AFTER' => '(?=\()' - ), - 20 => array( - 'DISALLOWED_AFTER' => '(?=\()' - ), - 24 => array( - 'DISALLOWED_AFTER' => '(?=\()' - ), - 26 => array( - 'DISALLOWED_AFTER' => '(?=\()' - ) - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/newlisp.php b/_piecrust/libs/Geshi/geshi/newlisp.php deleted file mode 100644 index b2e0f60..0000000 --- a/_piecrust/libs/Geshi/geshi/newlisp.php +++ /dev/null @@ -1,191 +0,0 @@ - 'newlisp', - 'COMMENT_SINGLE' => array(1 => ';', 2 => '#'), - 'COMMENT_MULTI' => array('[text]' => '[/text]', '{' => '}'), // also used for strings - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'NUMBERS' => GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_SCI_ZERO, - 'TAB_WIDTH' => 2, - 'KEYWORDS' => array( - 1 => array( - 'NaN?','abort','abs','acos','acosh','add','address','amb','and', - 'append','append-file','apply','args','array','array-list','array?', - 'asin','asinh','assoc','atan','atan2','atanh','atom?','base64-dec', - 'base64-enc','bayes-query','bayes-train','begin','beta','betai', - 'bind','binomial','bits','callback','case','catch','ceil', - 'change-dir','char','chop','clean','close','command-event','cond', - 'cons','constant','context','context?','copy','copy-file','cos', - 'cosh','count','cpymem','crc32','crit-chi2','crit-z','current-line', - 'curry','date','date-value','debug','dec','def-new','default', - 'define','define-macro','delete','delete-file','delete-url', - 'destroy','det','device','difference','directory','directory?', - 'div','do-until','do-while','doargs','dolist','dostring','dotimes', - 'dotree','dump','dup','empty?','encrypt','ends-with','env','erf', - 'error-event','estack','eval','eval-string','exec','exists','exit', - 'exp','expand','explode','factor','fft','file-info','file?', - 'filter','find','find-all','first','flat','float','float?','floor', - 'flt','for','for-all','fork','format','fv','gammai','gammaln','gcd', - 'get-char','get-float','get-int','get-long','get-string','get-url', - 'global','global?','if','if-not','ifft','import','inc','index', - 'inf?','int','integer','integer?','intersect','invert','irr','join', - 'lambda','lambda?','last','last-error','legal?','length','let', - 'letex','letn','list','list?','load','local','log','lookup', - 'lower-case','macro?','main-args','make-dir','map','mat','match', - 'max','member','min','mod','mul','multiply','name','net-accept', - 'net-close','net-connect','net-error','net-eval','net-interface', - 'net-listen','net-local','net-lookup','net-peek','net-peer', - 'net-ping','net-receive','net-receive-from','net-receive-udp', - 'net-select','net-send','net-send-to','net-send-udp','net-service', - 'net-sessions','new','nil','nil?','normal','not','now','nper','npv', - 'nth','null?','number?','open','or','pack','parse','parse-date', - 'peek','pipe','pmt','pop','pop-assoc','post-url','pow', - 'pretty-print','primitive?','print','println','prob-chi2','prob-z', - 'process','prompt-event','protected?','push','put-url','pv','quote', - 'quote?','rand','random','randomize','read-buffer','read-char', - 'read-expr','read-file','read-key','read-line','read-utf8', - 'real-path','receive','ref','ref-all','regex','regex-comp', - 'remove-dir','rename-file','replace','reset','rest','reverse', - 'rotate','round','save','search','seed','seek','select','semaphore', - 'send','sequence','series','set','set-locale','set-ref', - 'set-ref-all','setf','setq','sgn','share','signal','silent','sin', - 'sinh','sleep','slice','sort','source','spawn','sqrt','starts-with', - 'string','string?','sub','swap','sym','symbol?','symbols','sync', - 'sys-error','sys-info','tan','tanh','throw','throw-error','time', - 'time-of-day','timer','title-case','trace','trace-highlight', - 'transpose','trim','true','true?','unicode','unify','unique', - 'unless','unpack','until','upper-case','utf8','utf8len','uuid', - 'wait-pid','when','while','write-buffer','write-char','write-file', - 'write-line','xfer-event','xml-error','xml-parse','xml-type-tags', - 'zero?' - ) - ), - 'SYMBOLS' => array( - 0 => array( - '(', ')','\'' - ), - 1 => array( - '!','!=','$','%','&','*','+','-','/',':', - '<','<<','<=','=','>','>=','>>','^','|' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000AA;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 2 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #00aa00; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #009900;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #009900;' - ), - 'NUMBERS' => array( - 0 => 'color: #777700;' - ), - 'METHODS' => array( - 0 => 'color: #000099;' - ), - 'SYMBOLS' => array( - 0 => 'color: #AA0000;', - 1 => 'color: #0000AA;' - ), - 'REGEXPS' => array( - 0 => 'color: #00aa00;', - 1 => 'color: #00aa00;', - 2 => 'color: #00aa00;', - 3 => 'color: #00aa00;', - 4 => 'color: #00aa00;', - 5 => 'color: #AA0000;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => 'http://www.newlisp.org/downloads/newlisp_manual.html#{FNAME}' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array(':'), - 'REGEXPS' => array( - // tags in newlispdoc - 0 => "\s+@\S*?\s+", - // dollar sign symbols - 1 => "[\\$]\w*", - // curly-braced string literals - 2 => "{[^{}]*?}", - // [text] multi-line strings - 3 => "(?s)\[text\].*\[\/text\](?-s)", - // [code] multi-line blocks - 4 => "(?s)\[code\].*\[\/code\](?-s)", - // variable references - 5 => "'[\w\-]+" - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'OOLANG' => array( - 'MATCH_AFTER' => '[a-zA-Z][a-zA-Z0-9_\-]*' - ), - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => '(?<=[^\w\-])', - ) - ), - -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/nsis.php b/_piecrust/libs/Geshi/geshi/nsis.php deleted file mode 100644 index 2079169..0000000 --- a/_piecrust/libs/Geshi/geshi/nsis.php +++ /dev/null @@ -1,351 +0,0 @@ - 'NSIS', - 'COMMENT_SINGLE' => array(1 => ';', 2 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'",'"','`'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - '!appendfile', '!addIncludeDir', '!addplugindir', '!cd', '!define', '!delfile', '!echo', '!else', - '!endif', '!error', '!execute', '!ifdef', '!ifmacrodef', '!ifmacrondef', '!ifndef', '!include', - '!insertmacro', '!macro', '!macroend', '!packhdr', '!tempfile', '!system', '!undef', '!verbose', - '!warning' - ), - 2 => array( - 'AddBrandingImage', 'AllowRootDirInstall', 'AutoCloseWindow', 'BGFont', - 'BGGradient', 'BrandingText', 'Caption', 'ChangeUI', 'CheckBitmap', 'CompletedText', 'ComponentText', - 'CRCCheck', 'DetailsButtonText', 'DirShow', 'DirText', 'DirVar', 'DirVerify', 'FileErrorText', - 'Function', 'FunctionEnd', 'Icon', 'InstallButtonText', 'InstallColors', 'InstallDir', - 'InstallDirRegKey', 'InstProgressFlags', 'InstType', 'LangString', 'LangStringUP', 'LicenseBkColor', - 'LicenseData', 'LicenseForceSelection', 'LicenseLangString', 'LicenseText', 'LoadLanguageFile', - 'MiscButtonText', 'Name', 'OutFile', 'Page', 'PageEx', 'PageExEnd', 'Section', - 'SectionEnd', 'SectionGroup', 'SectionGroupEnd', 'SetCompressor', 'SetFont', 'ShowInstDetails', - 'ShowUninstDetails', 'SilentInstall', 'SilentUnInstall', 'SpaceTexts', 'SubCaption', 'SubSection', - 'SubSectionEnd', 'UninstallButtonText', 'UninstallCaption', 'UninstallIcon', 'UninstallSubCaption', - 'UninstallText', 'UninstPage', 'Var', 'VIAddVersionKey', 'VIProductVersion', 'WindowIcon', 'XPStyle' - ), - 3 => array( - 'AddSize', 'AllowSkipFiles', 'FileBufSize', 'GetInstDirError', 'PageCallbacks', - 'SectionIn', 'SetCompress', 'SetCompressionLevel', 'SetCompressorDictSize', - 'SetDatablockOptimize', 'SetDateSave', 'SetOverwrite', 'SetPluginUnload' - ), - 4 => array( - 'Abort', 'BringToFront', 'Call', 'CallInstDLL', 'ClearErrors', 'CopyFiles','CreateDirectory', - 'CreateFont', 'CreateShortCut', 'Delete', 'DeleteINISec', 'DeleteINIStr', 'DeleteRegKey', - 'DeleteRegValue', 'DetailPrint', 'EnableWindow', 'EnumRegKey', 'EnumRegValue', 'Exch', 'Exec', - 'ExecShell', 'ExecWait', 'ExpandEnvStrings', 'File', 'FileClose', 'FileOpen', 'FileRead', - 'FileReadByte', 'FileSeek', 'FileWrite', 'FileWriteByte', 'FindClose', 'FindFirst', 'FindNext', - 'FindWindow', 'FlushINI', 'GetCurInstType', 'GetCurrentAddress', 'GetDlgItem', 'GetDLLVersion', - 'GetDLLVersionLocal', 'GetErrorLevel', 'GetFileTime', 'GetFileTimeLocal', 'GetFullPathName', - 'GetFunctionAddress', 'GetLabelAddress', 'GetTempFileName', 'GetWindowText', 'Goto', 'HideWindow', - 'IfAbort', 'IfErrors', 'IfFileExists', 'IfRebootFlag', 'IfSilent', 'InitPluginsDir', 'InstTypeGetText', - 'InstTypeSetText', 'IntCmp', 'IntCmpU', 'IntFmt', 'IntOp', 'IsWindow', 'LockWindow', 'LogSet', 'LogText', - 'MessageBox', 'Nop', 'Pop', 'Push', 'Quit', 'ReadEnvStr', 'ReadIniStr', 'ReadRegDWORD', 'ReadRegStr', - 'Reboot', 'RegDLL', 'Rename', 'ReserveFile', 'Return', 'RMDir', 'SearchPath', 'SectionGetFlags', - 'SectionGetInstTypes', 'SectionGetSize', 'SectionGetText', 'SectionSetFlags', 'SectionSetInstTypes', - 'SectionSetSize', 'SectionSetText', 'SendMessage', 'SetAutoClose', 'SetBrandingImage', 'SetCtlColors', - 'SetCurInstType', 'SetDetailsPrint', 'SetDetailsView', 'SetErrorLevel', 'SetErrors', 'SetFileAttributes', - 'SetOutPath', 'SetRebootFlag', 'SetShellVarContext', 'SetSilent', 'ShowWindow', 'Sleep', 'StrCmp', - 'StrCpy', 'StrLen', 'UnRegDLL', 'WriteINIStr', 'WriteRegBin', 'WriteRegDWORD', 'WriteRegExpandStr', - 'WriteRegStr', 'WriteUninstaller' - ), - 5 => array( - 'all', 'alwaysoff', 'ARCHIVE', 'auto', 'both', 'bzip2', 'checkbox', 'components', 'current', - 'custom', 'directory', 'false', 'FILE_ATTRIBUTE_ARCHIVE', 'FILE_ATTRIBUTE_HIDDEN', 'FILE_ATTRIBUTE_NORMAL', - 'FILE_ATTRIBUTE_OFFLINE', 'FILE_ATTRIBUTE_READONLY', 'FILE_ATTRIBUTE_SYSTEM,TEMPORARY', - 'FILE_ATTRIBUTE_TEMPORARY', 'force', 'HIDDEN', 'hide', 'HKCC', 'HKCR', 'HKCU', 'HKDD', 'HKEY_CLASSES_ROOT', - 'HKEY_CURRENT_CONFIG', 'HKEY_CURRENT_USER', 'HKEY_DYN_DATA', 'HKEY_LOCAL_MACHINE', 'HKEY_PERFORMANCE_DATA', - 'HKEY_USERS', 'HKLM', 'HKPD', 'HKU', 'IDABORT', 'IDCANCEL', 'IDIGNORE', 'IDNO', 'IDOK', 'IDRETRY', 'IDYES', - 'ifdiff', 'ifnewer', 'instfiles', 'lastused', 'leave', 'license', 'listonly', 'lzma', 'manual', - 'MB_ABORTRETRYIGNORE', 'MB_DEFBUTTON1', 'MB_DEFBUTTON2', 'MB_DEFBUTTON3', 'MB_DEFBUTTON4', - 'MB_ICONEXCLAMATION', 'MB_ICONINFORMATION', 'MB_ICONQUESTION', 'MB_ICONSTOP', 'MB_OK', 'MB_OKCANCEL', - 'MB_RETRYCANCEL', 'MB_RIGHT', 'MB_SETFOREGROUND', 'MB_TOPMOST', 'MB_YESNO', 'MB_YESNOCANCEL', 'nevershow', - 'none', 'normal', 'off', 'OFFLINE', 'on', 'radiobuttons', 'READONLY', 'RO', 'SHCTX', 'SHELL_CONTEXT', 'show', - 'silent', 'silentlog', 'SW_HIDE', 'SW_SHOWMAXIMIZED', 'SW_SHOWMINIMIZED', 'SW_SHOWNORMAL', 'SYSTEM', - 'textonly', 'true', 'try', 'uninstConfirm', 'zlib' - ), - 6 => array( - '/a', '/components', '/COMPONENTSONLYONCUSTOM', '/CUSTOMSTRING', '/e', '/FILESONLY', '/FINAL', '/gray', '/GLOBAL', - '/ifempty', '/IMGID', '/ITALIC', '/lang', '/NOCUSTOM', '/nonfatal', '/NOUNLOAD', '/oname', '/r', '/REBOOTOK', - '/RESIZETOFIT', '/SOLID', '/SD', '/SHORT', '/silent', '/STRIKE', '/TIMEOUT', '/TRIMCENTER', '/TRIMLEFT', - '/TRIMRIGHT', '/UNDERLINE', '/windows', '/x' - ), - 7 => array( - '.onGUIEnd', '.onGUIInit', '.onInit', '.onInstFailed', '.onInstSuccess', '.onMouseOverSection', - '.onRebootFailed', '.onSelChange', '.onUserAbort', '.onVerifyInstDir', 'un.onGUIEnd', 'un.onGUIInit', - 'un.onInit', 'un.onRebootFailed', 'un.onUninstFailed', 'un.onUninstSuccess', 'un.onUserAbort' - ), - 8 => array( - 'MUI.nsh', '"${NSISDIR}\Contrib\Modern UI\System.nsh"', 'MUI_SYSVERSION', 'MUI_ICON', 'MUI_UNICON', - 'MUI_HEADERIMAGE', 'MUI_HEADERIMAGE_BITMAP', 'MUI_HEADERIMAGE_BITMAP_NOSTRETCH', 'MUI_HEADERIMAGE_BITMAP_RTL', - 'MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH', 'MUI_HEADERIMAGE_UNBITMAP', 'MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH', - 'MUI_HEADERIMAGE_UNBITMAP_RTL', 'MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH', 'MUI_HEADERIMAGE_RIGHT', 'MUI_BGCOLOR', - 'MUI_UI', 'MUI_UI_HEADERIMAGE', 'MUI_UI_HEADERIMAGE_RIGHT', 'MUI_UI_COMPONENTSPAGE_SMALLDESC', - 'MUI_UI_COMPONENTSPAGE_NODESC', 'MUI_WELCOMEFINISHPAGE_BITMAP', 'MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH', - 'MUI_WELCOMEFINISHPAGE_INI', 'MUI_UNWELCOMEFINISHPAGE_BITMAP', 'MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH', - 'MUI_UNWELCOMEFINISHPAGE_INI', 'MUI_LICENSEPAGE_BGCOLOR', 'MUI_COMPONENTSPAGE_CHECKBITMAP', - 'MUI_COMPONENTSPAGE_SMALLDESC', 'MUI_COMPONENTSPAGE_NODESC', 'MUI_INSTFILESPAGE_COLORS', - 'MUI_INSTFILESPAGE_PROGRESSBAR', 'MUI_FINISHPAGE_NOAUTOCLOSE', 'MUI_UNFINISHPAGE_NOAUTOCLOSE', - 'MUI_ABORTWARNING', 'MUI_ABORTWARNING_TEXT', 'MUI_UNABORTWARNING', 'MUI_UNABORTWARNING_TEXT', - 'MUI_PAGE_WELCOME', 'MUI_PAGE_LICENSE', 'MUI_PAGE_COMPONENTS', 'MUI_PAGE_DIRECTORY', - 'MUI_PAGE_STARTMENU', 'MUI_PAGE_INSTFILES', 'MUI_PAGE_FINISH', 'MUI_UNPAGE_WELCOME', - 'MUI_UNPAGE_CONFIRM', 'MUI_UNPAGE_LICENSE', 'MUI_UNPAGE_COMPONENTS', 'MUI_UNPAGE_DIRECTORY', - 'MUI_UNPAGE_INSTFILES', 'MUI_UNPAGE_FINISH', 'MUI_PAGE_HEADER_TEXT', 'MUI_PAGE_HEADER_SUBTEXT', - 'MUI_WELCOMEPAGE_TITLE', 'MUI_WELCOMEPAGE_TITLE_3LINES', 'MUI_WELCOMEPAGE_TEXT', - 'MUI_LICENSEPAGE_TEXT_TOP', 'MUI_LICENSEPAGE_TEXT_BOTTOM', 'MUI_LICENSEPAGE_BUTTON', - 'MUI_LICENSEPAGE_CHECKBOX', 'MUI_LICENSEPAGE_CHECKBOX_TEXT', 'MUI_LICENSEPAGE_RADIOBUTTONS', - 'MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT', 'MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE', - 'MUI_COMPONENTSPAGE_TEXT_TOP', 'MUI_COMPONENTSPAGE_TEXT_COMPLIST', 'MUI_COMPONENTSPAGE_TEXT_INSTTYPE', - 'MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE', 'MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO', - 'MUI_DIRECTORYPAGE_TEXT_TOP', 'MUI_DIRECTORYPAGE_TEXT_DESTINATION', 'MUI_DIRECTORYPAGE_VARIABLE', - 'MUI_DIRECTORYPAGE_VERIFYONLEAVE', 'MUI_STARTMENU_WRITE_BEGIN', 'MUI_STARTMENU_WRITE_END', - 'MUI_STARTMENUPAGE_TEXT_TOP', 'MUI_STARTMENUPAGE_TEXT_CHECKBOX', 'MUI_STARTMENUPAGE_DEFAULTFOLDER', - 'MUI_STARTMENUPAGE_NODISABLE', 'MUI_STARTMENUPAGE_REGISTRY_ROOT', 'MUI_STARTMENUPAGE_REGISTRY_KEY', - 'MUI_STARTMENUPAGE_REGISTRY_VALUENAME', 'MUI_INSTFILESPAGE_FINISHHEADER_TEXT', - 'MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT', 'MUI_INSTFILESPAGE_ABORTHEADER_TEXT', - 'MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT', 'MUI_FINISHPAGE_TITLE', 'MUI_FINISHPAGE_TITLE_3LINES', - 'MUI_FINISHPAGE_TEXT', 'MUI_FINISHPAGE_TEXT_LARGE', 'MUI_FINISHPAGE_BUTTON', - 'MUI_FINISHPAGE_TEXT_REBOOT', 'MUI_FINISHPAGE_TEXT_REBOOTNOW', 'MUI_FINISHPAGE_TEXT_REBOOTLATER', - 'MUI_FINISHPAGE_RUN', 'MUI_FINISHPAGE_RUN_TEXT', 'MUI_FINISHPAGE_RUN_PARAMETERS', - 'MUI_FINISHPAGE_RUN_NOTCHECKED', 'MUI_FINISHPAGE_RUN_FUNCTION', 'MUI_FINISHPAGE_SHOWREADME', - 'MUI_FINISHPAGE_SHOWREADME_TEXT', 'MUI_FINISHPAGE_SHOWREADME_NOTCHECKED', - 'MUI_FINISHPAGE_SHOWREADME_FUNCTION', 'MUI_FINISHPAGE_LINK', 'MUI_FINISHPAGE_LINK_LOCATION', - 'MUI_FINISHPAGE_LINK_COLOR', 'MUI_FINISHPAGE_NOREBOOTSUPPORT', 'MUI_UNCONFIRMPAGE_TEXT_TOP', - 'MUI_UNCONFIRMPAGE_TEXT_LOCATION', 'MUI_LANGUAGE', 'MUI_LANGDLL_DISPLAY', - 'MUI_LANGDLL_REGISTRY_ROOT', 'MUI_LANGDLL_REGISTRY_KEY', 'MUI_LANGDLL_REGISTRY_VALUENAME', - 'MUI_LANGDLL_WINDOWTITLE', 'MUI_LANGDLL_INFO', 'MUI_LANGDLL_ALWAYSSHOW', - 'MUI_RESERVEFILE_INSTALLOPTIONS', 'MUI_RESERVEFILE_LANGDLL', 'MUI_FUNCTION_DESCRIPTION_BEGIN', - 'MUI_DESCRIPTION_TEXT', 'MUI_FUNCTION_DESCRIPTION_END', 'MUI_INSTALLOPTIONS_EXTRACT', - 'MUI_INSTALLOPTIONS_EXTRACT_AS', 'MUI_HEADER_TEXT', 'MUI_INSTALLOPTIONS_DISPLAY', - 'MUI_INSTALLOPTIONS_INITDIALOG', 'MUI_INSTALLOPTIONS_SHOW', - 'MUI_INSTALLOPTIONS_DISPLAY_RETURN', 'MUI_INSTALLOPTIONS_SHOW_RETURN', - 'MUI_INSTALLOPTIONS_READ', 'MUI_INSTALLOPTIONS_WRITE', - 'MUI_CUSTOMFUNCTION_GUIINIT', 'MUI_CUSTOMFUNCTION_UNGUIINIT', - 'MUI_CUSTOMFUNCTION_ABORT', 'MUI_CUSTOMFUNCTION_UNABORT', - 'MUI_PAGE_CUSTOMFUNCTION_PRE', 'MUI_PAGE_CUSTOMFUNCTION_SHOW', 'MUI_PAGE_CUSTOMFUNCTION_LEAVE', - 'MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT' - ), - 9 => array( - 'LogicLib.nsh', '${LOGICLIB}', 'LOGICLIB_STRCMP', 'LOGICLIB_INT64CMP', 'LOGICLIB_SECTIONCMP', '${If}', '${Unless}', - '${ElseIf}', '${ElseUnless}', '${Else}', '${EndIf}', '${EndUnless}', '${AndIf}', '${AndUnless}', - '${OrIf}', '${OrUnless}', '${IfThen}', '${IfCmd}', '${Select}', '${Case2}', '${Case3}', - '${Case4}', '${Case5}', '${CaseElse}', '${Default}', '${EndSelect}', '${Switch}', - '${Case}', '${EndSwitch}', '${Do}', '${DoWhile}', '${UntilWhile}', '${Continue}', '${Break}', - '${Loop}', '${LoopWhile}', '${LoopUntil}', '${While}', '${ExitWhile}', '${EndWhile}', '${For}', - '${ForEach}', '${ExitFor}', '${Next}', '${Abort}', '${Errors}', '${RebootFlag}', '${Silent}', - '${FileExists}', '${Cmd}', '${SectionIsSelected}', '${SectionIsSectionGroup}', - '${SectionIsSectionGroupEnd}', '${SectionIsBold}', '${SectionIsReadOnly}', - '${SectionIsExpanded}', '${SectionIsPartiallySelected}' - ), - 10 => array( - 'StrFunc.nsh', '${STRFUNC}', '${StrCase}', '${StrClb}', '${StrIOToNSIS}', '${StrLoc}', '${StrNSISToIO}', '${StrRep}', - '${StrSort}', '${StrStr}', '${StrStrAdv}', '${StrTok}', '${StrTrimNewLines}' - ), - 11 => array( - 'UpgradeDLL.nsh', 'UPGRADEDLL_INCLUDED', 'UpgradeDLL' - ), - 12 => array( - 'Sections.nsh', 'SECTIONS_INCLUDED', '${SF_SELECTED}', '${SF_SECGRP}', '${SF_SUBSEC}', '${SF_SECGRPEND}', - '${SF_SUBSECEND}', '${SF_BOLD}', '${SF_RO}', '${SF_EXPAND}', '${SF_PSELECTED}', '${SF_TOGGLED}', - '${SF_NAMECHG}', '${SECTION_OFF}', 'SelectSection', 'UnselectSection', 'ReverseSection', - 'StartRadioButtons', 'RadioButton', 'EndRadioButtons', '${INSTTYPE_0}', '${INSTTYPE_1}', '${INSTTYPE_2}', - '${INSTTYPE_3}', '${INSTTYPE_4}', '${INSTTYPE_5}', '${INSTTYPE_6}', '${INSTTYPE_7}', '${INSTTYPE_8}', - '${INSTTYPE_9}', '${INSTTYPE_10}', '${INSTTYPE_11}', '${INSTTYPE_12}', '${INSTTYPE_13}', '${INSTTYPE_14}', - '${INSTTYPE_15}', '${INSTTYPE_16}', '${INSTTYPE_17}', '${INSTTYPE_18}', '${INSTTYPE_19}', '${INSTTYPE_20}', - '${INSTTYPE_21}', '${INSTTYPE_22}', '${INSTTYPE_23}', '${INSTTYPE_24}', '${INSTTYPE_25}', '${INSTTYPE_26}', - '${INSTTYPE_27}', '${INSTTYPE_28}', '${INSTTYPE_29}', '${INSTTYPE_30}', '${INSTTYPE_31}', '${INSTTYPE_32}', - 'SetSectionInInstType', 'ClearSectionInInstType', 'SetSectionFlag', 'ClearSectionFlag', 'SectionFlagIsSet' - ), - 13 => array( - 'Colors.nsh', 'WHITE', 'BLACK', 'YELLOW', 'RED', 'GREEN', 'BLUE', 'MAGENTA', 'CYAN', 'rgb2hex' - ), - 14 => array( - 'FileFunc.nsh', '${Locate}', '${GetSize}', '${DriveSpace}', '${GetDrives}', '${GetTime}', '${GetFileAttributes}', '${GetFileVersion}', '${GetExeName}', '${GetExePath}', '${GetParameters}', '${GetOptions}', '${GetRoot}', '${GetParent}', '${GetFileName}', '${GetBaseName}', '${GetFileExt}', '${BannerTrimPath}', '${DirState}', '${RefreshShellIcons}' - ), - 15 => array( - 'TextFunc.nsh', '${LineFind}', '${LineRead}', '${FileReadFromEnd}', '${LineSum}', '${FileJoin}', '${TextCompare}', '${ConfigRead}', '${ConfigWrite}', '${FileRecode}', '${TrimNewLines}' - ), - 16 => array( - 'WordFunc.nsh', '${WordFind}', '${WordFind2X}', '${WordFind3X}', '${WordReplace}', '${WordAdd}', '${WordInsert}', '${StrFilter}', '${VersionCompare}', '${VersionConvert}' - ) - ), - 'SYMBOLS' => array( - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false, - 7 => false, - 8 => false, - 9 => false, - 10 => false, - 11 => false, - 12 => false, - 13 => false, - 14 => false, - 15 => false, - 16 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000066; font-weight:bold;', - 2 => 'color: #000066;', - 3 => 'color: #003366;', - 4 => 'color: #000099;', - 5 => 'color: #ff6600;', - 6 => 'color: #ff6600;', - 7 => 'color: #006600;', - 8 => 'color: #006600;', - 9 => 'color: #006600;', - 10 => 'color: #006600;', - 11 => 'color: #006600;', - 12 => 'color: #006600;', - 13 => 'color: #006600;', - 14 => 'color: #006600;', - 15 => 'color: #006600;', - 16 => 'color: #006600;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #666666; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #660066; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => '' - ), - 'STRINGS' => array( - 0 => 'color: #660066;' - ), - 'NUMBERS' => array( - 0 => '' - ), - 'METHODS' => array( - 0 => '' - ), - 'SYMBOLS' => array( - 0 => '' - ), - 'REGEXPS' => array( - 0 => 'color: #660000;', - 1 => 'color: #660000;', - 2 => 'color: #660000;', - 3 => 'color: #660000;', - 4 => 'color: #660000;', - 5 => 'color: #660000;', - 6 => 'color: #660000;', - 7 => 'color: #000099;', - 8 => 'color: #003399;' - ), - 'SCRIPT' => array( - 0 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '', - 8 => '', - 9 => '', - 10 => '', - 11 => '', - 12 => '', - 13 => '', - 14 => '', - 15 => '', - 16 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - 0 => '\$\$', - 1 => '\$\\r', - 2 => '\$\\n', - 3 => '\$\\t', - 4 => '\$[a-zA-Z0-9_]+', - 5 => '\$\{.{1,256}\}', - 6 => '\$\\\(.{1,256}\\\)', - 7 => array( - GESHI_SEARCH => '([^:\/\\\*\?\"\<\>(?:)\s]*?)(::)([^:\/\\\*\?\"\<\>(?:)\s]*?)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '\\2\\3' - ), - 8 => array( - GESHI_SEARCH => '([^:\/\\\*\?\"\<\>(?:)\s]*?)(::)([^:\/\\\*\?\"\<\>(?:)]*?\s)', - GESHI_REPLACE => '\\3', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1\\2', - GESHI_AFTER => '' - ) - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/oberon2.php b/_piecrust/libs/Geshi/geshi/oberon2.php deleted file mode 100644 index 1fd99e2..0000000 --- a/_piecrust/libs/Geshi/geshi/oberon2.php +++ /dev/null @@ -1,135 +0,0 @@ - 'Oberon-2', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array('(*' => '*)'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'HARDQUOTE' => array("'", "'"), - 'HARDESCAPE' => array("''"), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'ARRAY', 'BEGIN', 'BY', 'CASE', - 'CONST', 'DIV', 'DO', 'ELSE', 'ELSIF', 'END', - 'EXIT', 'FOR', 'IF', 'IMPORT', 'IN', 'IS', - 'LOOP', 'MOD', 'MODULE', 'OF', - 'OR', 'POINTER', 'PROCEDURE', 'RECORD', - 'REPEAT', 'RETURN', 'THEN', 'TO', - 'TYPE', 'UNTIL', 'VAR', 'WHILE', 'WITH' - ), - 2 => array( - 'NIL', 'FALSE', 'TRUE', - ), - 3 => array( - 'ABS', 'ASH', 'ASSERT', 'CAP', 'CHR', 'COPY', 'DEC', - 'ENTIER', 'EXCL', 'HALT', 'INC', 'INCL', 'LEN', - 'LONG', 'MAX', 'MIN', 'NEW', 'ODD', 'ORD', 'SHORT', 'SIZE' - ), - 4 => array( - 'BOOLEAN', 'CHAR', 'SHORTINT', 'LONGINT', - 'INTEGER', 'LONGREAL', 'REAL', 'SET', 'PTR' - ), - ), - 'SYMBOLS' => array( - ',', ':', '=', '+', '-', '*', '/', '#', '~' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #000066;', - 4 => 'color: #000066; font-weight: bold;' - ), - 'COMMENTS' => array( - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 'HARD' => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;', - 'HARD' => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #0066ee;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/objc.php b/_piecrust/libs/Geshi/geshi/objc.php deleted file mode 100644 index a6a8b23..0000000 --- a/_piecrust/libs/Geshi/geshi/objc.php +++ /dev/null @@ -1,358 +0,0 @@ - 'Objective-C', - 'COMMENT_SINGLE' => array( - //Compiler directives - 1 => '#', - //Single line C-Comments - 2 => '//' - ), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - //Multiline Continuation for single-line comment - 2 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m', - //Pseudo-Highlighting of the @-sign before strings - 3 => "/@(?=\")/" - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"', "'"), - 'ESCAPE_CHAR' => '\\', - - 'KEYWORDS' => array( - // Objective-C keywords - 1 => array( - 'while', 'switch', 'return', 'in', 'if', 'goto', 'foreach', 'for', - 'else', 'do', 'default', 'continue', 'case', '@try', '@throw', - '@synthesize', '@synchronized', '@selector', '@public', '@protocol', - '@protected', '@property', '@private', '@interface', - '@implementation', '@finally', '@end', '@encode', '@defs', '@class', - '@catch' - ), - // Macros and constants - 2 => array( - 'YES', 'USHRT_MAX', 'ULONG_MAX', 'UINT_MAX', 'UCHAR_MAX', 'true', - 'TMP_MAX', 'stdout', 'stdin', 'stderr', 'SIGTERM', 'SIGSEGV', - 'SIGINT', 'SIGILL', 'SIG_IGN', 'SIGFPE', 'SIG_ERR', 'SIG_DFL', - 'SIGABRT', 'SHRT_MIN', 'SHRT_MAX', 'SEEK_SET', 'SEEK_END', - 'SEEK_CUR', 'SCHAR_MIN', 'SCHAR_MAX', 'RAND_MAX', 'NULL', - 'NO', 'nil', 'Nil', 'L_tmpnam', 'LONG_MIN', 'LONG_MAX', - 'LDBL_MIN_EXP', 'LDBL_MIN', 'LDBL_MAX_EXP', 'LDBL_MAX', - 'LDBL_MANT_DIG', 'LDBL_EPSILON', 'LDBL_DIG', 'INT_MIN', 'INT_MAX', - 'HUGE_VAL', 'FOPEN_MAX', 'FLT_ROUNDS', 'FLT_RADIX', 'FLT_MIN_EXP', - 'FLT_MIN', 'FLT_MAX_EXP', 'FLT_MAX', 'FLT_MANT_DIG', 'FLT_EPSILON', - 'FLT_DIG', 'FILENAME_MAX', 'false', 'EXIT_SUCCESS', 'EXIT_FAILURE', - 'errno', 'ERANGE', 'EOF', 'enum', 'EDOM', 'DBL_MIN_EXP', 'DBL_MIN', - 'DBL_MAX_EXP', 'DBL_MAX', 'DBL_MANT_DIG', 'DBL_EPSILON', 'DBL_DIG', - 'CLOCKS_PER_SEC', 'CHAR_MIN', 'CHAR_MAX', 'CHAR_BIT', 'BUFSIZ', - 'break' - ), - // C standard library functions - 3 => array( - 'vsprintf', 'vprintf', 'vfprintf', 'va_start', 'va_end', 'va_arg', - 'ungetc', 'toupper', 'tolower', 'tmpname', 'tmpfile', 'time', - 'tanh', 'tan', 'system', 'strxfrm', 'strtoul', 'strtol', 'strtok', - 'strtod', 'strstr', 'strspn', 'strrchr', 'strpbrk', 'strncpy', - 'strncmp', 'strncat', 'strlen', 'strftime', 'strerror', 'strcspn', - 'strcpy', 'strcoll', 'strcmp', 'strchr', 'strcat', 'sscanf', - 'srand', 'sqrt', 'sprintf', 'snprintf', 'sizeof', 'sinh', 'sin', - 'setvbuf', 'setjmp', 'setbuf', 'scanf', 'rewind', 'rename', - 'remove', 'realloc', 'rand', 'qsort', 'puts', 'putchar', 'putc', - 'printf', 'pow', 'perror', 'offsetof', 'modf', 'mktime', 'memset', - 'memmove', 'memcpy', 'memcmp', 'memchr', 'malloc', 'longjmp', - 'log10', 'log', 'localtime', 'ldiv', 'ldexp', 'labs', 'isxdigit', - 'isupper', 'isspace', 'ispunct', 'isprint', 'islower', - 'isgraph', 'isdigit', 'iscntrl', 'isalpha', 'isalnum', 'gmtime', - 'gets', 'getenv', 'getchar', 'getc', 'fwrite', 'ftell', 'fsetpos', - 'fseek', 'fscanf', 'frexp', 'freopen', 'free', 'fread', 'fputs', - 'fputc', 'fprintf', 'fopen', 'fmod', 'floor', 'fgets', 'fgetpos', - 'fgetc', 'fflush', 'ferror', 'feof', 'fclose', 'fabs', 'exp', - 'exit', 'div', 'difftime', 'ctime', 'cosh', 'cos', 'clock', - 'clearerr', 'ceil', 'calloc', 'bsearch', 'atol', 'atoi', 'atof', - 'atexit', 'atan2', 'atan', 'assert', 'asin', 'asctime', 'acos', - 'abs', 'abort' - ), - // Data types (C, Objective-C, Cocoa) - 4 => array( - 'volatile', 'void', 'va_list', 'unsigned', 'union', 'typedef', 'tm', - 'time_t', 'struct', 'string', 'static', 'size_t', - 'signed', 'signal', 'short', 'SEL', 'register', 'raise', - 'ptrdiff_t', 'NSZone', 'NSRect', 'NSRange', 'NSPoint', 'long', - 'ldiv_t', 'jmp_buf', 'int', 'IMP', 'id', 'fpos_t', 'float', 'FILE', - 'extern', 'double', 'div_t', 'const', 'clock_t', 'Class', 'char', - 'BOOL', 'auto' - ), - // Foundation classes - 5 => array( - 'NSXMLParser', 'NSXMLNode', 'NSXMLElement', 'NSXMLDTDNode', - 'NSXMLDTD', 'NSXMLDocument', 'NSWhoseSpecifier', - 'NSValueTransformer', 'NSValue', 'NSUserDefaults', 'NSURLResponse', - 'NSURLRequest', 'NSURLProtocol', 'NSURLProtectionSpace', - 'NSURLHandle', 'NSURLDownload', 'NSURLCredentialStorage', - 'NSURLCredential', 'NSURLConnection', 'NSURLCache', - 'NSURLAuthenticationChallenge', 'NSURL', 'NSUniqueIDSpecifier', - 'NSUndoManager', 'NSUnarchiver', 'NSTimeZone', 'NSTimer', - 'NSThread', 'NSTask', 'NSString', 'NSStream', 'NSSpellServer', - 'NSSpecifierTest', 'NSSortDescriptor', 'NSSocketPortNameServer', - 'NSSocketPort', 'NSSetCommand', 'NSSet', 'NSSerializer', - 'NSScriptWhoseTest', 'NSScriptSuiteRegistry', - 'NSScriptObjectSpecifier', 'NSScriptExecutionContext', - 'NSScriptCommandDescription', 'NSScriptCommand', - 'NSScriptCoercionHandler', 'NSScriptClassDescription', 'NSScanner', - 'NSRunLoop', 'NSRelativeSpecifier', 'NSRecursiveLock', - 'NSRangeSpecifier', 'NSRandomSpecifier', 'NSQuitCommand', 'NSProxy', - 'NSProtocolChecker', 'NSPropertySpecifier', - 'NSPropertyListSerialization', 'NSProcessInfo', 'NSPredicate', - 'NSPositionalSpecifier', 'NSPortNameServer', 'NSPortMessage', - 'NSPortCoder', 'NSPort', 'NSPointerFunctions', 'NSPointerArray', - 'NSPipe', 'NSOutputStream', 'NSOperationQueue', 'NSOperation', - 'NSObject', 'NSNumberFormatter', 'NSNumber', 'NSNull', - 'NSNotificationQueue', 'NSNotificationCenter', 'NSNotification', - 'NSNetServiceBrowser', 'NSNetService', 'NSNameSpecifier', - 'NSMutableURLRequest', 'NSMutableString', 'NSMutableSet', - 'NSMutableIndexSet', 'NSMutableDictionary', 'NSMutableData', - 'NSMutableCharacterSet', 'NSMutableAttributedString', - 'NSMutableArray', 'NSMoveCommand', 'NSMiddleSpecifier', - 'NSMethodSignature', 'NSMetadataQueryResultGroup', - 'NSMetadataQueryAttributeValueTuple', 'NSMetadataQuery', - 'NSMetadataItem', 'NSMessagePortNameServer', 'NSMessagePort', - 'NSMapTable', 'NSMachPort', 'NSMachBootstrapServer', - 'NSLogicalTest', 'NSLock', 'NSLocale', 'NSKeyedUnarchiver', - 'NSKeyedArchiver', 'NSInvocationOperation', 'NSInvocation', - 'NSInputStream', 'NSIndexSpecifier', 'NSIndexSet', 'NSIndexPath', - 'NSHTTPURLResponse', 'NSHTTPCookieStorage', 'NSHTTPCookie', - 'NSHost', 'NSHashTable', 'NSGetCommand', 'NSGarbageCollector', - 'NSFormatter', 'NSFileManager', 'NSFileHandle', 'NSExpression', - 'NSExistsCommand', 'NSException', 'NSError', 'NSEnumerator', - 'NSDistributedNotificationCenter', 'NSDistributedLock', - 'NSDistantObjectRequest', 'NSDistantObject', - 'NSDirectoryEnumerator', 'NSDictionary', 'NSDeserializer', - 'NSDeleteCommand', 'NSDecimalNumberHandler', 'NSDecimalNumber', - 'NSDateFormatter', 'NSDateComponents', 'NSDate', 'NSData', - 'NSCreateCommand', 'NSCountedSet', 'NSCountCommand', 'NSConnection', - 'NSConditionLock', 'NSCondition', 'NSCompoundPredicate', - 'NSComparisonPredicate', 'NSCoder', 'NSCloseCommand', - 'NSCloneCommand', 'NSClassDescription', 'NSCharacterSet', - 'NSCalendarDate', 'NSCalendar', 'NSCachedURLResponse', 'NSBundle', - 'NSAutoreleasePool', 'NSAttributedString', 'NSAssertionHandler', - 'NSArray', 'NSArchiver', 'NSAppleScript', 'NSAppleEventManager', - 'NSAppleEventDescriptor', 'NSAffineTransform' - ), - // Foundation protocols - 6 => array( - 'NSURLProtocolClient', 'NSURLHandleClient', 'NSURLClient', - 'NSURLAuthenticationChallengeSender', 'NSScriptObjectSpecifiers', - 'NSScriptKeyValueCoding', 'NSScriptingComparisonMethods', - 'NSObjCTypeSerializationCallBack', 'NSMutableCopying', - 'NSLocking', 'NSKeyValueObserving', 'NSKeyValueCoding', - 'NSFastEnumeration', 'NSErrorRecoveryAttempting', - 'NSDecimalNumberBehaviors', 'NSCopying', 'NSComparisonMethods', - 'NSCoding' - ), - // AppKit classes - 7 => array( - 'NSWorkspace', 'NSWindowController', 'NSWindow', 'NSViewController', - 'NSViewAnimation', 'NSView', 'NSUserDefaultsController', - 'NSTypesetter', 'NSTreeNode', 'NSTreeController', 'NSTrackingArea', - 'NSToolbarItemGroup', 'NSToolbarItem', 'NSToolbar', - 'NSTokenFieldCell', 'NSTokenField', 'NSTextView', - 'NSTextTableBlock', 'NSTextTable', 'NSTextTab', 'NSTextStorage', - 'NSTextList', 'NSTextFieldCell', 'NSTextField', 'NSTextContainer', - 'NSTextBlock', 'NSTextAttachmentCell', 'NSTextAttachment', 'NSText', - 'NSTabViewItem', 'NSTabView', 'NSTableView', 'NSTableHeaderView', - 'NSTableHeaderCell', 'NSTableColumn', 'NSStepperCell', 'NSStepper', - 'NSStatusItem', 'NSStatusBar', 'NSSplitView', 'NSSpellChecker', - 'NSSpeechSynthesizer', 'NSSpeechRecognizer', 'NSSound', - 'NSSliderCell', 'NSSlider', 'NSSimpleHorizontalTypesetter', - 'NSShadow', 'NSSegmentedControl', 'NSSegmentedCell', - 'NSSecureTextFieldCell', 'NSSecureTextField', 'NSSearchFieldCell', - 'NSSearchField', 'NSScrollView', 'NSScroller', 'NSScreen', - 'NSSavePanel', 'NSRulerView', 'NSRulerMarker', 'NSRuleEditor', - 'NSResponder', 'NSQuickDrawView', 'NSProgressIndicator', - 'NSPrintPanel', 'NSPrintOperation', 'NSPrintInfo', 'NSPrinter', - 'NSPredicateEditorRowTemplate', 'NSPredicateEditor', - 'NSPopUpButtonCell', 'NSPopUpButton', 'NSPICTImageRep', - 'NSPersistentDocument', 'NSPDFImageRep', 'NSPathControl', - 'NSPathComponentCell', 'NSPathCell', 'NSPasteboard', - 'NSParagraphStyle', 'NSPanel', 'NSPageLayout', 'NSOutlineView', - 'NSOpenPanel', 'NSOpenGLView', 'NSOpenGLPixelFormat', - 'NSOpenGLPixelBuffer', 'NSOpenGLContext', 'NSObjectController', - 'NSNibOutletConnector', 'NSNibControlConnector', 'NSNibConnector', - 'NSNib', 'NSMutableParagraphStyle', 'NSMovieView', 'NSMovie', - 'NSMenuView', 'NSMenuItemCell', 'NSMenuItem', 'NSMenu', 'NSMatrix', - 'NSLevelIndicatorCell', 'NSLevelIndicator', 'NSLayoutManager', - 'NSInputServer', 'NSInputManager', 'NSImageView', 'NSImageRep', - 'NSImageCell', 'NSImage', 'NSHelpManager', 'NSGraphicsContext', - 'NSGradient', 'NSGlyphInfo', 'NSGlyphGenerator', 'NSFormCell', - 'NSForm', 'NSFontPanel', 'NSFontManager', 'NSFontDescriptor', - 'NSFont', 'NSFileWrapper', 'NSEvent', 'NSEPSImageRep', 'NSDrawer', - 'NSDocumentController', 'NSDocument', 'NSDockTile', - 'NSDictionaryController', 'NSDatePickerCell', 'NSDatePicker', - 'NSCustomImageRep', 'NSCursor', 'NSController', 'NSControl', - 'NSComboBoxCell', 'NSComboBox', 'NSColorWell', 'NSColorSpace', - 'NSColorPicker', 'NSColorPanel', 'NSColorList', 'NSColor', - 'NSCollectionViewItem', 'NSCollectionView', 'NSClipView', - 'NSCIImageRep', 'NSCell', 'NSCachedImageRep', 'NSButtonCell', - 'NSButton', 'NSBrowserCell', 'NSBrowser', 'NSBox', - 'NSBitmapImageRep', 'NSBezierPath', 'NSATSTypesetter', - 'NSArrayController', 'NSApplication', 'NSAnimationContext', - 'NSAnimation', 'NSAlert', 'NSActionCell' - ), - // AppKit protocols - 8 => array( - 'NSWindowScripting', 'NSValidatedUserInterfaceItem', - 'NSUserInterfaceValidations', 'NSToolTipOwner', - 'NSToolbarItemValidation', 'NSTextInput', - 'NSTableDataSource', 'NSServicesRequests', - 'NSPrintPanelAccessorizing', 'NSPlaceholders', - 'NSPathControlDelegate', 'NSPathCellDelegate', - 'NSOutlineViewDataSource', 'NSNibAwaking', 'NSMenuValidation', - 'NSKeyValueBindingCreation', 'NSInputServiceProvider', - 'NSInputServerMouseTracker', 'NSIgnoreMisspelledWords', - 'NSGlyphStorage', 'NSFontPanelValidation', 'NSEditorRegistration', - 'NSEditor', 'NSDraggingSource', 'NSDraggingInfo', - 'NSDraggingDestination', 'NSDictionaryControllerKeyValuePair', - 'NSComboBoxDataSource', 'NSComboBoxCellDataSource', - 'NSColorPickingDefault', 'NSColorPickingCustom', 'NSChangeSpelling', - 'NSAnimatablePropertyContainer', 'NSAccessibility' - ), - // CoreData classes - 9 => array( - 'NSRelationshipDescription', 'NSPropertyMapping', - 'NSPropertyDescription', 'NSPersistentStoreCoordinator', - 'NSPersistentStore', 'NSMigrationManager', 'NSMappingModel', - 'NSManagedObjectModel', 'NSManagedObjectID', - 'NSManagedObjectContext', 'NSManagedObject', - 'NSFetchRequestExpression', 'NSFetchRequest', - 'NSFetchedPropertyDescription', 'NSEntityMigrationPolicy', - 'NSEntityMapping', 'NSEntityDescription', 'NSAttributeDescription', - 'NSAtomicStoreCacheNode', 'NSAtomicStore' - ) - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => true, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true, - 8 => true, - 9 => true - ), - // Define the colors for the groups listed above - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #a61390;', // Objective-C keywords - 2 => 'color: #a61390;', // Macros and constants - 3 => 'color: #a61390;', // C standard library functions - 4 => 'color: #a61390;', // data types - 5 => 'color: #400080;', // Foundation classes - 6 => 'color: #2a6f76;', // Foundation protocols - 7 => 'color: #400080;', // AppKit classes - 8 => 'color: #2a6f76;', // AppKit protocols - 9 => 'color: #400080;' // CoreData classes - ), - 'COMMENTS' => array( - 1 => 'color: #6e371a;', // Preprocessor directives - 2 => 'color: #11740a; font-style: italic;', // Normal C single-line comments - 3 => 'color: #bf1d1a;', // Q-sign in front of Strings - 'MULTI' => 'color: #11740a; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #2400d9;' - ), - 'BRACKETS' => array( - 0 => 'color: #002200;' - ), - 'STRINGS' => array( - 0 => 'color: #bf1d1a;' - ), - 'NUMBERS' => array( - 0 => 'color: #2400d9;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #002200;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://www.opengroup.org/onlinepubs/009695399/functions/{FNAME}.html', - 4 => '', - 5 => 'http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/{FNAME}_Class/', - 6 => 'http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Protocols/{FNAME}_Protocol/', - 7 => 'http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/{FNAME}_Class/', - 8 => 'http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Protocols/{FNAME}_Protocol/', - 9 => 'http://developer.apple.com/documentation/Cocoa/Reference/CoreDataFramework/Classes/{FNAME}_Class/' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/objeck.php b/_piecrust/libs/Geshi/geshi/objeck.php deleted file mode 100644 index 6bf17de..0000000 --- a/_piecrust/libs/Geshi/geshi/objeck.php +++ /dev/null @@ -1,114 +0,0 @@ - 'Objeck Programming Language', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array('#~' => '~#'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'virtual', 'if', 'else', 'do', 'while', 'use', 'bundle', 'native', - 'static', 'public', 'private', 'class', 'function', 'method', - 'select', 'other', 'enum', 'for', 'label', 'return', 'from' - ), - 2 => array( - 'Byte', 'Int', 'Nil', 'Float', 'Char', 'Bool' - ), - 3 => array( - 'true', 'false' - ) - ), - 'SYMBOLS' => array( - 1 => array( - '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '%', '=', '<', '>', '&', '|', ':', ';', ',' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #b1b100;', - 3 => 'color: #b1b100;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;', - ), - 'METHODS' => array( - 0 => 'color: #004000;' - ), - 'SYMBOLS' => array( - 1 => 'color: #339933;' - ), - 'REGEXPS' => array(), - 'SCRIPT' => array() - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '->' - ), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array() -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/ocaml-brief.php b/_piecrust/libs/Geshi/geshi/ocaml-brief.php deleted file mode 100644 index f450342..0000000 --- a/_piecrust/libs/Geshi/geshi/ocaml-brief.php +++ /dev/null @@ -1,112 +0,0 @@ - 'OCaml (brief)', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array('(*' => '*)'), - 'CASE_KEYWORDS' => 0, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => "", - 'KEYWORDS' => array( - /* main OCaml keywords */ - 1 => array( - 'and', 'as', 'asr', 'begin', 'class', 'closed', 'constraint', 'do', 'done', 'downto', 'else', - 'end', 'exception', 'external', 'failwith', 'false', 'flush', 'for', 'fun', 'function', 'functor', - 'if', 'in', 'include', 'inherit', 'incr', 'land', 'let', 'load', 'los', 'lsl', 'lsr', 'lxor', - 'match', 'method', 'mod', 'module', 'mutable', 'new', 'not', 'of', 'open', 'option', 'or', 'parser', - 'private', 'ref', 'rec', 'raise', 'regexp', 'sig', 'struct', 'stdout', 'stdin', 'stderr', 'then', - 'to', 'true', 'try', 'type', 'val', 'virtual', 'when', 'while', 'with' - ) - ), - /* highlighting symbols is really important in OCaml */ - 'SYMBOLS' => array( - ';', '!', ':', '.', '=', '%', '^', '*', '-', '/', '+', - '>', '<', '(', ')', '[', ']', '&', '|', '#', "'" - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #06c; font-weight: bold;' /* nice blue */ - ), - 'COMMENTS' => array( - 'MULTI' => 'color: #5d478b; font-style: italic;' /* light purple */ - ), - 'ESCAPE_CHAR' => array( - ), - 'BRACKETS' => array( - 0 => 'color: #6c6;' - ), - 'STRINGS' => array( - 0 => 'color: #3cb371;' /* nice green */ - ), - 'NUMBERS' => array( - 0 => 'color: #c6c;' /* pink */ - ), - 'METHODS' => array( - 1 => 'color: #060;' /* dark green */ - ), - 'REGEXPS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #a52a2a;' /* maroon */ - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/ocaml.php b/_piecrust/libs/Geshi/geshi/ocaml.php deleted file mode 100644 index 67d8a76..0000000 --- a/_piecrust/libs/Geshi/geshi/ocaml.php +++ /dev/null @@ -1,187 +0,0 @@ - 'OCaml', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array('(*' => '*)'), - 'COMMENT_REGEXP' => array(1 => '/\(\*(?:(?R)|.)+?\*\)/s'), - 'CASE_KEYWORDS' => 0, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => "", - 'KEYWORDS' => array( - /* main OCaml keywords */ - 1 => array( - 'and', 'as', 'asr', 'begin', 'class', 'closed', 'constraint', 'do', 'done', 'downto', 'else', - 'end', 'exception', 'external', 'failwith', 'false', 'for', 'fun', 'function', 'functor', - 'if', 'in', 'include', 'inherit', 'incr', 'land', 'let', 'load', 'los', 'lsl', 'lsr', 'lxor', - 'match', 'method', 'mod', 'module', 'mutable', 'new', 'not', 'of', 'open', 'option', 'or', 'parser', - 'private', 'ref', 'rec', 'raise', 'regexp', 'sig', 'struct', 'stdout', 'stdin', 'stderr', 'then', - 'to', 'true', 'try', 'type', 'val', 'virtual', 'when', 'while', 'with' - ), - /* define names of main librarys, so we can link to it */ - 2 => array( - 'Arg', 'Arith_status', 'Array', //'Array1', 'Array2', 'Array3', - 'ArrayLabels', 'Big_int', 'Bigarray', 'Buffer', 'Callback', - 'CamlinternalLazy', 'CamlinternalMod', 'CamlinternalOO', 'Char', - 'Complex', 'Condition', 'Dbm', 'Digest', 'Dynlink', 'Event', - 'Filename', 'Format', 'Gc', 'Genlex', 'Graphics', 'GraphicsX11', - 'Hashtbl', 'Int32', 'Int64', 'Lazy', 'Lexing', 'List', 'ListLabels', - 'Map', 'Marshal', 'MoreLabels', 'Mutex', 'Nativeint', 'Num', 'Obj', - 'Oo', 'Parsing', 'Pervasives', 'Printexc', 'Printf', 'Queue', - 'Random', 'Scanf', 'Set', 'Sort', 'Stack', 'StdLabels', 'Str', - 'Stream', 'String', 'StringLabels', 'Sys', 'Thread', 'ThreadUnix', - 'Tk', 'Unix', 'UnixLabels', 'Weak' - ), - /* just link to the Pervasives functions library, cause it's the default opened library when starting OCaml */ - 3 => array( - 'abs', 'abs_float', 'acos', 'asin', 'at_exit', 'atan', 'atan2', - 'bool_of_string', 'ceil', 'char_of_int', 'classify_float', - 'close_in', 'close_in_noerr', 'close_out', 'close_out_noerr', - 'compare', 'cos', 'cosh', 'decr', 'epsilon_float', 'exit', 'exp', - 'float', 'float_of_int', 'float_of_string', 'floor', 'flush', - 'flush_all', 'format_of_string', 'frexp', 'fst', 'ignore', - 'in_channel_length', 'infinity', 'input', 'input_binary_int', - 'input_byte', 'input_char', 'input_line', 'input_value', - 'int_of_char', 'int_of_float', 'int_of_string', 'invalid_arg', - 'ldexp', 'log', 'log10', 'max', 'max_float', 'max_int', 'min', - 'min_float', 'min_int', 'mod_float', 'modf', 'nan', 'open_in', - 'open_in_bin', 'open_in_gen', 'open_out', 'open_out_bin', - 'open_out_gen', 'out_channel_length', 'output', 'output_binary_int', - 'output_byte', 'output_char', 'output_string', 'output_value', - 'pos_in', 'pos_out', 'pred', 'prerr_char', 'prerr_endline', - 'prerr_float', 'prerr_int', 'prerr_newline', 'prerr_string', - 'print_char', 'print_endline', 'print_float', 'print_int', - 'print_newline', 'print_string', 'read_float', 'read_int', - 'read_line', 'really_input', 'seek_in', 'seek_out', - 'set_binary_mode_in', 'set_binary_mode_out', 'sin', 'sinh', 'snd', - 'sqrt', 'string_of_bool', 'string_of_float', 'string_of_format', - 'string_of_int', 'succ', 'tan', 'tanh', 'truncate' - ), - /* here Pervasives Types */ - 4 => array ( - 'array','bool','char','exn','file_descr','format','fpclass', - 'in_channel','int','int32','int64','list','nativeint','open_flag', - 'out_channel','string','Sys_error','unit' - ), - /* finally Pervasives Exceptions */ - 5 => array ( - 'Exit', 'Invalid_Argument', 'Failure', 'Division_by_zero' - ) - ), - /* highlighting symbols is really important in OCaml */ - 'SYMBOLS' => array( - '+.', '-.', '*.', '/.', '[<', '>]', - ';', '!', ':', '.', '=', '%', '^', '*', '-', '/', '+', - '>', '<', '(', ')', '[', ']', '&', '|', '#', "'", - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => true, /* functions name are case sensitive */ - 3 => true, /* types name too */ - 4 => true, /* pervasives types */ - 5 => true /* pervasives exceptions */ - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #06c; font-weight: bold;', /* nice blue */ - 2 => 'color: #06c; font-weight: bold;', /* nice blue */ - 3 => 'color: #06c; font-weight: bold;', /* nice blue */ - 4 => 'color: #06c; font-weight: bold;', /* nice blue */ - 5 => 'color: #06c; font-weight: bold;' /* nice blue */ - ), - 'COMMENTS' => array( - 'MULTI' => 'color: #5d478b; font-style: italic;', /* light purple */ - 1 => 'color: #5d478b; font-style: italic;' /* light purple */ - ), - 'ESCAPE_CHAR' => array( - ), - 'BRACKETS' => array( - 0 => 'color: #a52a2a;' - ), - 'STRINGS' => array( - 0 => 'color: #3cb371;' /* nice green */ - ), - 'NUMBERS' => array( - 0 => 'color: #c6c;' /* pink */ - ), - 'METHODS' => array( - 1 => 'color: #060;' /* dark green */ - ), - 'REGEXPS' => array( - 1 => 'font-weight:bold; color:#339933;', - 2 => 'font-weight:bold; color:#993399;' - ), - 'SYMBOLS' => array( - 0 => 'color: #a52a2a;' /* maroon */ - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - /* some of keywords are Pervasives functions (land, lxor, asr, ...) */ - 1 => '', - /* link to the wanted library */ - 2 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/{FNAME}.html', - /* link to Pervasives functions */ - 3 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#VAL{FNAME}', - /* link to Pervasives type */ - 4 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#TYPE{FNAME}', - /* link to Pervasives exceptions */ - 5 => 'http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#EXCEPTION{FNAME}' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - 1 => '~\w+', - 2 => '`(?=(?-i:[a-z]))\w*', - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/oobas.php b/_piecrust/libs/Geshi/geshi/oobas.php deleted file mode 100644 index 6418059..0000000 --- a/_piecrust/libs/Geshi/geshi/oobas.php +++ /dev/null @@ -1,135 +0,0 @@ - 'OpenOffice.org Basic', - 'COMMENT_SINGLE' => array(1 => "'"), - 'COMMENT_MULTI' => array(), - //Single-Line comments using REM keyword - 'COMMENT_REGEXP' => array(2 => '/\bREM.*?$/i'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'dim','private','public','global','as','if','redim','true','set','byval', - 'false','bool','double','integer','long','object','single','variant', - 'msgbox','print','inputbox','green','blue','red','qbcolor', - 'rgb','open','close','reset','freefile','get','input','line', - 'put','write','loc','seek','eof','lof','chdir','chdrive', - 'curdir','dir','fileattr','filecopy','filedatetime','fileexists', - 'filelen','getattr','kill','mkdir','name','rmdir','setattr', - 'dateserial','datevalue','day','month','weekday','year','cdatetoiso', - 'cdatefromiso','hour','minute','second','timeserial','timevalue', - 'date','now','time','timer','erl','err','error','on','goto','resume', - 'and','eqv','imp','not','or','xor','mod','atn','cos','sin','tan','log', - 'exp','rnd','randomize','sqr','fix','int','abs','sgn','hex','oct', - 'it','then','else','select','case','iif','do','loop','for','next','to', - 'while','wend','gosub','return','call','choose','declare', - 'end','exit','freelibrary','function','rem','stop','sub','switch','with', - 'cbool','cdate','cdbl','cint','clng','const','csng','cstr','defbool', - 'defdate','defdbl','defint','deflng','asc','chr','str','val','cbyte', - 'space','string','format','lcase','left','lset','ltrim','mid','right', - 'rset','rtrim','trim','ucase','split','join','converttourl','convertfromurl', - 'instr','len','strcomp','beep','shell','wait','getsystemticks','environ', - 'getsolarversion','getguitype','twipsperpixelx','twipsperpixely', - 'createunostruct','createunoservice','getprocessservicemanager', - 'createunodialog','createunolistener','createunovalue','thiscomponent', - 'globalscope' - ) - ), - 'SYMBOLS' => array( - '(', ')', '=' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080;', - 2 => 'color: #808080;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/oracle11.php b/_piecrust/libs/Geshi/geshi/oracle11.php deleted file mode 100644 index 8444d00..0000000 --- a/_piecrust/libs/Geshi/geshi/oracle11.php +++ /dev/null @@ -1,614 +0,0 @@ - 'Oracle 11 SQL', - 'COMMENT_SINGLE' => array(1 => '--'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, - 'QUOTEMARKS' => array("'", '"', '`'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( -//Put your package names here - e.g. select distinct ''''|| lower(name) || ''',' from user_source; -// 6 => array( -// ), - -//Put your table names here - e.g. select distinct ''''|| lower(table_name) || ''',' from user_tables; -// 5 => array( -// ), - -//Put your view names here - e.g. select distinct ''''|| lower(view_name) || ''',' from user_views; -// 4 => array( -// ), - -//Put your table field names here - e.g. select distinct ''''|| lower(column_name) || ''',' from user_tab_columns; -// 3 => array( -// ), - - //Put ORACLE reserved keywords here (11i). I like mine uppercase. - 1 => array( - 'ABS', - 'ACCESS', - 'ACOS', - 'ADD', - 'ADD_MONTHS', - 'ALL', - 'ALTER', - 'ANALYZE', - 'AND', - 'ANY', - 'APPENDCHILDXML', - 'ARRAY', - 'AS', - 'ASC', - 'ASCII', - 'ASCIISTR', - 'ASIN', - 'ASSOCIATE', - 'AT', - 'ATAN', - 'ATAN2', - 'AUDIT', - 'AUTHID', - 'AVG', - 'BEGIN', - 'BETWEEN', - 'BFILENAME', - 'BIN_TO_NUM', - 'BINARY_INTEGER', - 'BITAND', - 'BODY', - 'BOOLEAN', - 'BULK', - 'BY', - 'CALL', - 'CARDINALITY', - 'CASCADE', - 'CASE', - 'CAST', - 'CEIL', - 'CHAR', - 'CHAR_BASE', - 'CHARTOROWID', - 'CHECK', - 'CHR', - 'CLOSE', - 'CLUSTER', - 'CLUSTER_ID', - 'CLUSTER_PROBABILITY', - 'CLUSTER_SET', - 'COALESCE', - 'COLLECT', - 'COLUMN', - 'COMMENT', - 'COMMIT', - 'COMPOSE', - 'COMPRESS', - 'CONCAT', - 'CONNECT', - 'CONSTANT', - 'CONSTRAINT', - 'CONSTRAINTS', - 'CONTEXT', - 'CONTROLFILE', - 'CONVERT', - 'CORR', - 'CORR_K', - 'CORR_S', - 'COS', - 'COSH', - 'COST', - 'COUNT', - 'COVAR_POP', - 'COVAR_SAMP', - 'CREATE', - 'CUBE_TABLE', - 'CUME_DIST', - 'CURRENT', - 'CURRENT_DATE', - 'CURRENT_TIMESTAMP', - 'CURRVAL', - 'CURSOR', - 'CV', - 'DATABASE', - 'DATAOBJ_TO_PARTITION', - 'DATE', - 'DAY', - 'DBTIMEZONE', - 'DECIMAL', - 'DECLARE', - 'DECODE', - 'DECOMPOSE', - 'DEFAULT', - 'DELETE', - 'DELETEXML', - 'DENSE_RANK', - 'DEPTH', - 'DEREF', - 'DESC', - 'DIMENSION', - 'DIRECTORY', - 'DISASSOCIATE', - 'DISTINCT', - 'DO', - 'DROP', - 'DUMP', - 'ELSE', - 'ELSIF', - 'EMPTY_BLOB', - 'EMPTY_CLOB', - 'END', - 'EXCEPTION', - 'EXCLUSIVE', - 'EXEC', - 'EXECUTE', - 'EXISTS', - 'EXISTSNODE', - 'EXIT', - 'EXP', - 'EXPLAIN', - 'EXTENDS', - 'EXTRACT', - 'EXTRACTVALUE', - 'FALSE', - 'FEATURE_ID', - 'FEATURE_SET', - 'FEATURE_VALUE', - 'FETCH', - 'FILE', - 'FIRST', - 'FIRST_VALUE', - 'FLOAT', - 'FLOOR', - 'FOR', - 'FORALL', - 'FROM', - 'FROM_TZ', - 'FUNCTION', - 'GOTO', - 'GRANT', - 'GREATEST', - 'GROUP', - 'GROUP_ID', - 'GROUPING', - 'GROUPING_ID', - 'HAVING', - 'HEAP', - 'HEXTORAW', - 'HOUR', - 'IDENTIFIED', - 'IF', - 'IMMEDIATE', - 'IN', - 'INCREMENT', - 'INDEX', - 'INDEXTYPE', - 'INDICATOR', - 'INITCAP', - 'INITIAL', - 'INSERT', - 'INSERTCHILDXML', - 'INSERTXMLBEFORE', - 'INSTR', - 'INSTRB', - 'INTEGER', - 'INTERFACE', - 'INTERSECT', - 'INTERVAL', - 'INTO', - 'IS', - 'ISOLATION', - 'ITERATION_NUMBER', - 'JAVA', - 'KEY', - 'LAG', - 'LAST', - 'LAST_DAY', - 'LAST_VALUE', - 'LEAD', - 'LEAST', - 'LENGTH', - 'LENGTHB', - 'LEVEL', - 'LIBRARY', - 'LIKE', - 'LIMITED', - 'LINK', - 'LN', - 'LNNVL', - 'LOCALTIMESTAMP', - 'LOCK', - 'LOG', - 'LONG', - 'LOOP', - 'LOWER', - 'LPAD', - 'LTRIM', - 'MAKE_REF', - 'MATERIALIZED', - 'MAX', - 'MAXEXTENTS', - 'MEDIAN', - 'MIN', - 'MINUS', - 'MINUTE', - 'MLSLABEL', - 'MOD', - 'MODE', - 'MODIFY', - 'MONTH', - 'MONTHS_BETWEEN', - 'NANVL', - 'NATURAL', - 'NATURALN', - 'NCHR', - 'NEW', - 'NEW_TIME', - 'NEXT_DAY', - 'NEXTVAL', - 'NLS_CHARSET_DECL_LEN', - 'NLS_CHARSET_ID', - 'NLS_CHARSET_NAME', - 'NLS_INITCAP', - 'NLS_LOWER', - 'NLS_UPPER', - 'NLSSORT', - 'NOAUDIT', - 'NOCOMPRESS', - 'NOCOPY', - 'NOT', - 'NOWAIT', - 'NTILE', - 'NULL', - 'NULLIF', - 'NUMBER', - 'NUMBER_BASE', - 'NUMTODSINTERVAL', - 'NUMTOYMINTERVAL', - 'NVL', - 'NVL2', - 'OCIROWID', - 'OF', - 'OFFLINE', - 'ON', - 'ONLINE', - 'OPAQUE', - 'OPEN', - 'OPERATOR', - 'OPTION', - 'OR', - 'ORA_HASH', - 'ORDER', - 'ORGANIZATION', - 'OTHERS', - 'OUT', - 'OUTLINE', - 'PACKAGE', - 'PARTITION', - 'PATH', - 'PCTFREE', - 'PERCENT_RANK', - 'PERCENTILE_CONT', - 'PERCENTILE_DISC', - 'PLAN', - 'PLS_INTEGER', - 'POSITIVE', - 'POSITIVEN', - 'POWER', - 'POWERMULTISET', - 'POWERMULTISET_BY_CARDINALITY', - 'PRAGMA', - 'PREDICTION', - 'PREDICTION_BOUNDS', - 'PREDICTION_COST', - 'PREDICTION_DETAILS', - 'PREDICTION_PROBABILITY', - 'PREDICTION_SET', - 'PRESENTNNV', - 'PRESENTV', - 'PREVIOUS', - 'PRIMARY', - 'PRIOR', - 'PRIVATE', - 'PRIVILEGES', - 'PROCEDURE', - 'PROFILE', - 'PUBLIC', - 'RAISE', - 'RANGE', - 'RANK', - 'RATIO_TO_REPORT', - 'RAW', - 'RAWTOHEX', - 'RAWTONHEX', - 'REAL', - 'RECORD', - 'REF', - 'REFTOHEX', - 'REGEXP_COUNT', - 'REGEXP_INSTR', - 'REGEXP_REPLACE', - 'REGEXP_SUBSTR', - 'REGR_AVGX', - 'REGR_AVGY', - 'REGR_COUNT', - 'REGR_INTERCEPT', - 'REGR_R2', - 'REGR_SLOPE', - 'REGR_SXX', - 'REGR_SXY', - 'REGR_SYY', - 'RELEASE', - 'REMAINDER', - 'RENAME', - 'REPLACE', - 'RESOURCE', - 'RETURN', - 'RETURNING', - 'REVERSE', - 'REVOKE', - 'ROLE', - 'ROLLBACK', - 'ROUND', - 'ROW', - 'ROW_NUMBER', - 'ROWID', - 'ROWIDTOCHAR', - 'ROWIDTONCHAR', - 'ROWNUM', - 'ROWS', - 'ROWTYPE', - 'RPAD', - 'RTRIM', - 'SAVEPOINT', - 'SCHEMA', - 'SCN_TO_TIMESTAMP', - 'SECOND', - 'SEGMENT', - 'SELECT', - 'SEPERATE', - 'SEQUENCE', - 'SESSION', - 'SESSIONTIMEZONE', - 'SET', - 'SHARE', - 'SIGN', - 'SIN', - 'SINH', - 'SIZE', - 'SMALLINT', - 'SOUNDEX', - 'SPACE', - 'SQL', - 'SQLCODE', - 'SQLERRM', - 'SQRT', - 'START', - 'STATISTICS', - 'STATS_BINOMIAL_TEST', - 'STATS_CROSSTAB', - 'STATS_F_TEST', - 'STATS_KS_TEST', - 'STATS_MODE', - 'STATS_MW_TEST', - 'STATS_ONE_WAY_ANOVA', - 'STATS_T_TEST_INDEP', - 'STATS_T_TEST_INDEPU', - 'STATS_T_TEST_ONE', - 'STATS_T_TEST_PAIRED', - 'STATS_WSR_TEST', - 'STDDEV', - 'STDDEV_POP', - 'STDDEV_SAMP', - 'STOP', - 'SUBSTR', - 'SUBSTRB', - 'SUBTYPE', - 'SUCCESSFUL', - 'SUM', - 'SYNONYM', - 'SYS_CONNECT_BY_PATH', - 'SYS_CONTEXT', - 'SYS_DBURIGEN', - 'SYS_EXTRACT_UTC', - 'SYS_GUID', - 'SYS_TYPEID', - 'SYS_XMLAGG', - 'SYS_XMLGEN', - 'SYSDATE', - 'SYSTEM', - 'SYSTIMESTAMP', - 'TABLE', - 'TABLESPACE', - 'TAN', - 'TANH', - 'TEMPORARY', - 'THEN', - 'TIME', - 'TIMESTAMP', - 'TIMESTAMP_TO_SCN', - 'TIMEZONE_ABBR', - 'TIMEZONE_HOUR', - 'TIMEZONE_MINUTE', - 'TIMEZONE_REGION', - 'TIMING', - 'TO', - 'TO_BINARY_DOUBLE', - 'TO_BINARY_FLOAT', - 'TO_CHAR', - 'TO_CLOB', - 'TO_DATE', - 'TO_DSINTERVAL', - 'TO_LOB', - 'TO_MULTI_BYTE', - 'TO_NCHAR', - 'TO_NCLOB', - 'TO_NUMBER', - 'TO_SINGLE_BYTE', - 'TO_TIMESTAMP', - 'TO_TIMESTAMP_TZ', - 'TO_YMINTERVAL', - 'TRANSACTION', - 'TRANSLATE', - 'TREAT', - 'TRIGGER', - 'TRIM', - 'TRUE', - 'TRUNC', - 'TRUNCATE', - 'TYPE', - 'TZ_OFFSET', - 'UI', - 'UID', - 'UNION', - 'UNIQUE', - 'UNISTR', - 'UPDATE', - 'UPDATEXML', - 'UPPER', - 'USE', - 'USER', - 'USERENV', - 'USING', - 'VALIDATE', - 'VALUE', - 'VALUES', - 'VAR_POP', - 'VAR_SAMP', - 'VARCHAR', - 'VARCHAR2', - 'VARIANCE', - 'VIEW', - 'VSIZE', - 'WHEN', - 'WHENEVER', - 'WHERE', - 'WHILE', - 'WIDTH_BUCKET', - 'WITH', - 'WORK', - 'WRITE', - 'XMLAGG', - 'XMLCAST', - 'XMLCDATA', - 'XMLCOLATTVAL', - 'XMLCOMMENT', - 'XMLCONCAT', - 'XMLDIFF', - 'XMLELEMENT', - 'XMLEXISTS', - 'XMLFOREST', - 'XMLPARSE', - 'XMLPATCH', - 'XMLPI', - 'XMLQUERY', - 'XMLROOT', - 'XMLSEQUENCE', - 'XMLSERIALIZE', - 'XMLTABLE', - 'XMLTRANSFORM', - 'YEAR', - 'ZONE' - ) - ), - 'SYMBOLS' => array( - '(', ')', '=', '<', '>', '|', '+', '-', '*', '/', ',' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, -// 3 => false, -// 4 => false, -// 5 => false, -// 6 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #993333; font-weight: bold; text-transform: uppercase;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #ff0000;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', -// 3 => '', -// 4 => '', -// 5 => '', -// 6 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/oracle8.php b/_piecrust/libs/Geshi/geshi/oracle8.php deleted file mode 100644 index 7bd1343..0000000 --- a/_piecrust/libs/Geshi/geshi/oracle8.php +++ /dev/null @@ -1,496 +0,0 @@ - 'Oracle 8 SQL', - 'COMMENT_SINGLE' => array(1 => '--'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, - 'QUOTEMARKS' => array("'", '"', '`'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( -//Put your package names here - e.g. select distinct ''''|| lower(name) || ''',' from user_source; -// 6 => array( -// ), - -//Put your table names here - e.g. select distinct ''''|| lower(table_name) || ''',' from user_tables; -// 5 => array( -// ), - -//Put your view names here - e.g. select distinct ''''|| lower(view_name) || ''',' from user_views; -// 4 => array( -// ), - -//Put your table field names here - e.g. select distinct ''''|| lower(column_name) || ''',' from user_tab_columns; -// 3 => array( -// ), - -//Put ORACLE reserved keywords here (8.1.7). I like mine uppercase. - 1 => array( - 'ABS', - 'ACCESS', - 'ACOS', - 'ADD', - 'ADD_MONTHS', - 'ALL', - 'ALTER', - 'ANALYZE', - 'AND', - 'ANY', - 'ARRAY', - 'AS', - 'ASC', - 'ASCII', - 'ASIN', - 'ASSOCIATE', - 'AT', - 'ATAN', - 'ATAN2', - 'AUDIT', - 'AUTHID', - 'AVG', - 'BEGIN', - 'BETWEEN', - 'BFILENAME', - 'BINARY_INTEGER', - 'BITAND', - 'BODY', - 'BOOLEAN', - 'BULK', - 'BY', - 'CALL', - 'CASCADE', - 'CASE', - 'CEIL', - 'CHAR', - 'CHAR_BASE', - 'CHARTOROWID', - 'CHECK', - 'CHR', - 'CLOSE', - 'CLUSTER', - 'COALESCE', - 'COLLECT', - 'COLUMN', - 'COMMENT', - 'COMMIT', - 'COMPRESS', - 'CONCAT', - 'CONNECT', - 'CONSTANT', - 'CONSTRAINT', - 'CONSTRAINTS', - 'CONTEXT', - 'CONTROLFILE', - 'CONVERT', - 'CORR', - 'COS', - 'COSH', - 'COST', - 'COUNT', - 'COVAR_POP', - 'COVAR_SAMP', - 'CREATE', - 'CUME_DIST', - 'CURRENT', - 'CURRVAL', - 'CURSOR', - 'DATABASE', - 'DATE', - 'DAY', - 'DECIMAL', - 'DECLARE', - 'DECODE', - 'DEFAULT', - 'DELETE', - 'DENSE_RANK', - 'DEREF', - 'DESC', - 'DIMENSION', - 'DIRECTORY', - 'DISASSOCIATE', - 'DISTINCT', - 'DO', - 'DROP', - 'DUMP', - 'ELSE', - 'ELSIF', - 'EMPTY_BLOB', - 'EMPTY_CLOB', - 'END', - 'EXCEPTION', - 'EXCLUSIVE', - 'EXEC', - 'EXECUTE', - 'EXISTS', - 'EXIT', - 'EXP', - 'EXPLAIN', - 'EXTENDS', - 'EXTRACT', - 'FALSE', - 'FETCH', - 'FILE', - 'FIRST_VALUE', - 'FLOAT', - 'FLOOR', - 'FOR', - 'FORALL', - 'FROM', - 'FUNCTION', - 'GOTO', - 'GRANT', - 'GREATEST', - 'GROUP', - 'GROUPING', - 'HAVING', - 'HEAP', - 'HEXTORAW', - 'HOUR', - 'IDENTIFIED', - 'IF', - 'IMMEDIATE', - 'IN', - 'INCREMENT', - 'INDEX', - 'INDEXTYPE', - 'INDICATOR', - 'INITCAP', - 'INITIAL', - 'INSERT', - 'INSTR', - 'INSTRB', - 'INTEGER', - 'INTERFACE', - 'INTERSECT', - 'INTERVAL', - 'INTO', - 'IS', - 'ISOLATION', - 'JAVA', - 'KEY', - 'LAG', - 'LAST_DAY', - 'LAST_VALUE', - 'LEAD', - 'LEAST', - 'LENGTH', - 'LENGTHB', - 'LEVEL', - 'LIBRARY', - 'LIKE', - 'LIMITED', - 'LINK', - 'LN', - 'LOCK', - 'LOG', - 'LONG', - 'LOOP', - 'LOWER', - 'LPAD', - 'LTRIM', - 'MAKE_REF', - 'MATERIALIZED', - 'MAX', - 'MAXEXTENTS', - 'MIN', - 'MINUS', - 'MINUTE', - 'MLSLABEL', - 'MOD', - 'MODE', - 'MODIFY', - 'MONTH', - 'MONTHS_BETWEEN', - 'NATURAL', - 'NATURALN', - 'NEW', - 'NEW_TIME', - 'NEXT_DAY', - 'NEXTVAL', - 'NLS_CHARSET_DECL_LEN', - 'NLS_CHARSET_ID', - 'NLS_CHARSET_NAME', - 'NLS_INITCAP', - 'NLS_LOWER', - 'NLS_UPPER', - 'NLSSORT', - 'NOAUDIT', - 'NOCOMPRESS', - 'NOCOPY', - 'NOT', - 'NOWAIT', - 'NTILE', - 'NULL', - 'NULLIF', - 'NUMBER', - 'NUMBER_BASE', - 'NUMTODSINTERVAL', - 'NUMTOYMINTERVAL', - 'NVL', - 'NVL2', - 'OCIROWID', - 'OF', - 'OFFLINE', - 'ON', - 'ONLINE', - 'OPAQUE', - 'OPEN', - 'OPERATOR', - 'OPTION', - 'OR', - 'ORDER', - 'ORGANIZATION', - 'OTHERS', - 'OUT', - 'OUTLINE', - 'PACKAGE', - 'PARTITION', - 'PCTFREE', - 'PERCENT_RANK', - 'PLAN', - 'PLS_INTEGER', - 'POSITIVE', - 'POSITIVEN', - 'POWER', - 'PRAGMA', - 'PRIMARY', - 'PRIOR', - 'PRIVATE', - 'PRIVILEGES', - 'PROCEDURE', - 'PROFILE', - 'PUBLIC', - 'RAISE', - 'RANGE', - 'RANK', - 'RATIO_TO_REPORT', - 'RAW', - 'RAWTOHEX', - 'REAL', - 'RECORD', - 'REF', - 'REFTOHEX', - 'REGR_AVGX', - 'REGR_AVGY', - 'REGR_COUNT', - 'REGR_INTERCEPT', - 'REGR_R2', - 'REGR_SLOPE', - 'REGR_SXX', - 'REGR_SXY', - 'REGR_SYY', - 'RELEASE', - 'RENAME', - 'REPLACE', - 'RESOURCE', - 'RETURN', - 'RETURNING', - 'REVERSE', - 'REVOKE', - 'ROLE', - 'ROLLBACK', - 'ROUND', - 'ROW', - 'ROW_NUMBER', - 'ROWID', - 'ROWIDTOCHAR', - 'ROWNUM', - 'ROWS', - 'ROWTYPE', - 'RPAD', - 'RTRIM', - 'SAVEPOINT', - 'SCHEMA', - 'SECOND', - 'SEGMENT', - 'SELECT', - 'SEPERATE', - 'SEQUENCE', - 'SESSION', - 'SET', - 'SHARE', - 'SIGN', - 'SIN', - 'SINH', - 'SIZE', - 'SMALLINT', - 'SOUNDEX', - 'SPACE', - 'SQL', - 'SQLCODE', - 'SQLERRM', - 'SQRT', - 'START', - 'STATISTICS', - 'STDDEV', - 'STDDEV_POP', - 'STDDEV_SAMP', - 'STOP', - 'SUBSTR', - 'SUBSTRB', - 'SUBTYPE', - 'SUCCESSFUL', - 'SUM', - 'SYNONYM', - 'SYS_CONTEXT', - 'SYS_GUID', - 'SYSDATE', - 'SYSTEM', - 'TABLE', - 'TABLESPACE', - 'TAN', - 'TANH', - 'TEMPORARY', - 'THEN', - 'TIME', - 'TIMESTAMP', - 'TIMEZONE_ABBR', - 'TIMEZONE_HOUR', - 'TIMEZONE_MINUTE', - 'TIMEZONE_REGION', - 'TIMING', - 'TO', - 'TO_CHAR', - 'TO_DATE', - 'TO_LOB', - 'TO_MULTI_BYTE', - 'TO_NUMBER', - 'TO_SINGLE_BYTE', - 'TRANSACTION', - 'TRANSLATE', - 'TRIGGER', - 'TRIM', - 'TRUE', - 'TRUNC', - 'TRUNCATE', - 'TYPE', - 'UI', - 'UID', - 'UNION', - 'UNIQUE', - 'UPDATE', - 'UPPER', - 'USE', - 'USER', - 'USERENV', - 'USING', - 'VALIDATE', - 'VALUE', - 'VALUES', - 'VAR_POP', - 'VAR_SAMP', - 'VARCHAR', - 'VARCHAR2', - 'VARIANCE', - 'VIEW', - 'VSIZE', - 'WHEN', - 'WHENEVER', - 'WHERE', - 'WHILE', - 'WITH', - 'WORK', - 'WRITE', - 'YEAR', - 'ZONE' - ) - ), - 'SYMBOLS' => array( - '(', ')', '=', '<', '>', '|', '+', '-', '*', '/', ',' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, -// 3 => false, -// 4 => false, -// 5 => false, -// 6 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #993333; font-weight: bold; text-transform: uppercase;' -//Add the styles for groups 3-6 here when used - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #ff0000;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', -// 3 => '', -// 4 => '', -// 5 => '', -// 6 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/oxygene.php b/_piecrust/libs/Geshi/geshi/oxygene.php deleted file mode 100644 index a079c84..0000000 --- a/_piecrust/libs/Geshi/geshi/oxygene.php +++ /dev/null @@ -1,152 +0,0 @@ - 'Oxygene (Delphi Prism)', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('(*' => '*)', '{' => '}'), - //Compiler directives - 'COMMENT_REGEXP' => array(2 => '/{\\$.*?}|\\(\\*\\$.*?\\*\\)/U'), - 'CASE_KEYWORDS' => 0, - 'QUOTEMARKS' => array("'"), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'and', 'begin', 'case', 'const', 'div', 'do', 'downto', 'else', - 'end', 'for', 'function', 'if', 'in', 'mod', 'not', 'of', 'or', - 'procedure', 'repeat', 'record', 'set', 'shl', 'shr', 'then', 'to', - 'type', 'until', 'uses', 'var','while', 'with', 'xor', 'exit', 'break', - 'class', 'constructor', 'inherited', 'private', 'public', 'protected', - 'property', 'As', 'Is', 'Unit', 'Continue', 'Try', 'Except', 'Forward', - 'Interface','Implementation', 'nil', 'out', 'loop', 'namespace', 'true', - 'false', 'new', 'ensure', 'require', 'on', 'event', 'delegate', 'method', - 'raise', 'assembly', 'module', 'using','locking', 'old', 'invariants', 'operator', - 'self', 'async', 'finalizer', 'where', 'yield', 'nullable', 'Future', - 'From', 'Finally', 'dynamic' - ), - 2 => array( - 'override', 'virtual', 'External', 'read', 'add', 'remove','final', 'abstract', - 'empty', 'global', 'locked', 'sealed', 'reintroduce', 'implements', 'each', - 'default', 'partial', 'finalize', 'enum', 'flags', 'result', 'readonly', 'unsafe', - 'pinned', 'matching', 'static', 'has', 'step', 'iterator', 'inline', 'nested', - 'Implies', 'Select', 'Order', 'By', 'Desc', 'Asc', 'Group', 'Join', 'Take', - 'Skip', 'Concat', 'Union', 'Reverse', 'Distinct', 'Into', 'Equals', 'params', - 'sequence', 'index', 'notify', 'Parallel', 'create', 'array', 'Queryable', 'Aspect', - 'volatile' - ), - 3 => array( - 'chr', 'ord', 'inc', 'dec', 'assert', 'iff', 'assigned','futureAssigned', 'length', 'low', 'high', 'typeOf', 'sizeOf', 'disposeAndNil', 'Coalesce', 'unquote' - ), - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, -// 4 => false, - ), - 'SYMBOLS' => array( - 0 => array('(', ')', '[', ']'), - 1 => array('.', ',', ':', ';'), - 2 => array('@', '^'), - 3 => array('=', '+', '-', '*', '/') - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #000066;', -// 4 => 'color: #000066; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 2 => 'color: #008000; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #ff0000; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000066;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #0000ff;' - ), - 'METHODS' => array( - 1 => 'color: #000000;' - ), - 'REGEXPS' => array( - 0 => 'color: #9ac;', - 1 => 'color: #ff0000;' - ), - 'SYMBOLS' => array( - 0 => 'color: #000066;', - 1 => 'color: #000066;', - 2 => 'color: #000066;', - 3 => 'color: #000066;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', -// 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - //Hex numbers - 0 => '\$[0-9a-fA-F]+', - //Characters - 1 => '\#\$?[0-9]{1,3}' - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 2 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/oz.php b/_piecrust/libs/Geshi/geshi/oz.php deleted file mode 100644 index 23be8d6..0000000 --- a/_piecrust/libs/Geshi/geshi/oz.php +++ /dev/null @@ -1,144 +0,0 @@ - 'OZ', - 'COMMENT_SINGLE' => array(1 => '%'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"','\''), - 'ESCAPE_CHAR' => '\\', - 'NUMBERS' => array(), - 'KEYWORDS' => array( - 1 => array( - 'declare','local','in','end','proc','fun','functor','require','prepare', - 'import','export','define','at','case','then','else','of','elseof', - 'elsecase','if','elseif','class','from','prop','attr','feat','meth', - 'self','true','false','unit','div','mod','andthen','orelse','cond','or', - 'dis','choice','not','thread','try','catch','finally','raise','lock', - 'skip','fail','for','do' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true - ), - 'SYMBOLS' => array( - '@', '!', '|', '<-', ':=', '<', '>', '=<', '>=', '<=', '#', '~', '.', - '*', '-', '+', '/', '<:', '>:', '=:', '=<:', '>=:', '\\=', '\\=:', ',', - '!!', '...', '==', '::', ':::' - ), - 'STYLES' => array( - 'REGEXPS' => array( - 1 => 'color: #0000ff;', - 2 => 'color: #00a030;', - 3 => 'color: #bc8f8f;', - 4 => 'color: #0000ff;', - 5 => 'color: #a020f0;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #bc8f8f;' - ), - 'KEYWORDS' => array( - 1 => 'color: #a020f0;' - ), - 'COMMENTS' => array( - 1 => 'color: #B22222;', - 'MULTI' => 'color: #B22222;' - ), - 'STRINGS' => array( - 0 => 'color: #bc8f8f;' - ), - 'SYMBOLS' => array( - 0 => 'color: #a020f0;' - ), - 'BRACKETS' => array(), - 'NUMBERS' => array(), - 'METHODS' => array(), - 'SCRIPT' => array() - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'URLS' => array( - 1 => '' - ), - 'REGEXPS' => array( - // function and procedure definition - 1 => array( - GESHI_SEARCH => "(proc|fun)([^{}\n\)]*)(\\{)([\$A-Z\300-\326\330-\336][A-Z\300-\326\330-\336a-z\337-\366\370-\3770-9_.]*)", - GESHI_REPLACE => '\4', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\1\2\3', - GESHI_AFTER => '' - ), - // class definition - 2 => array( - GESHI_SEARCH => "(class)([^A-Z\$]*)([\$A-Z\300-\326\330-\336][A-Z\300-\326\330-\336a-z\337-\366\370-\3770-9_.]*)", - GESHI_REPLACE => '\3\4', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\1\2', - GESHI_AFTER => '' - ), - // single character - 3 => array( - GESHI_SEARCH => "&.", - GESHI_REPLACE => '\0', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - // method definition - 4 => array( - GESHI_SEARCH => "(meth)([^a-zA-Z]+)([a-zA-Z\300-\326\330-\336][A-Z\300-\326\330-\336a-z\337-\366\370-\3770-9]*)", - GESHI_REPLACE => '\3', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\1\2', - GESHI_AFTER => '' - ), - // highlight "[]" - // ([] is actually a keyword, but that causes problems in validation; putting it into symbols doesn't work.) - 5 => array( - GESHI_SEARCH => "\[\]", - GESHI_REPLACE => '\0', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/pascal.php b/_piecrust/libs/Geshi/geshi/pascal.php deleted file mode 100644 index 769566f..0000000 --- a/_piecrust/libs/Geshi/geshi/pascal.php +++ /dev/null @@ -1,152 +0,0 @@ - 'Pascal', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('{' => '}','(*' => '*)'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'HARDQUOTE' => array("'", "'"), - 'HARDESCAPE' => array("''"), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'absolute','asm','assembler','begin','break','case','catch','cdecl', - 'const','constructor','default','destructor','div','do','downto', - 'else','end','except','export','exports','external','far', - 'finalization','finally','for','forward','function','goto','if', - 'implementation','in','index','inherited','initialization','inline', - 'interface','interrupt','label','library','mod','name','not','of', - 'or','overload','override','private','procedure','program', - 'property','protected','public','published','raise','repeat', - 'resourcestring','shl','shr','stdcall','stored','switch','then', - 'to','try','type','unit','until','uses','var','while','xor' - ), - 2 => array( - 'nil', 'false', 'true', - ), - 3 => array( - 'abs','and','arc','arctan','blockread','blockwrite','chr','dispose', - 'cos','eof','eoln','exp','get','ln','new','odd','ord','ordinal', - 'pred','read','readln','sin','sqrt','succ','write','writeln' - ), - 4 => array( - 'ansistring','array','boolean','byte','bytebool','char','file', - 'integer','longbool','longint','object','packed','pointer','real', - 'record','set','shortint','smallint','string','union','word' - ), - ), - 'SYMBOLS' => array( - ',', ':', '=', '+', '-', '*', '/' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #000066;', - 4 => 'color: #000066; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 'HARD' => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;', - 'HARD' => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #0066ee;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/pcre.php b/_piecrust/libs/Geshi/geshi/pcre.php deleted file mode 100644 index b0bd297..0000000 --- a/_piecrust/libs/Geshi/geshi/pcre.php +++ /dev/null @@ -1,188 +0,0 @@ - 'PCRE', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array( - ), - 'COMMENT_REGEXP' => array( - // Non-matching groups - 1 => "/(?<=\()\?(?::|(?=\())/", - - // Modifier groups - 2 => "/(?<=\()\?[cdegimopsuxUX\-]+(?::|(?=\)))/", - - // Look-Aheads - 3 => "/(?<=\()\?[!=]/", - - // Look-Behinds - 4 => "/(?<=\()\?<[!=]/", - - // Forward Matching - 5 => "/(?<=\()\?>/", - - // Recursive Matching - 6 => "/(?<=\()\?R(?=\))/", - - // Named Subpattern - 7 => "/(?<=\()\?(?:P?<\w+>|\d+(?=\))|P[=>]\w+(?=\)))/", - - // Back Reference - 8 => "/\\\\(?:[1-9]\d?|g\d+|g\{(?:-?\d+|\w+)\}|k<\w+>|k'\w+'|k\{\w+\})/", - - // Byte sequence: Octal - 9 => "/\\\\[0-7]{2,3}/", - - // Byte sequence: Hex - 10 => "/\\\\x[0-9a-fA-F]{2}/", - - // Byte sequence: Hex - 11 => "/\\\\u[0-9a-fA-F]{4}/", - - // Byte sequence: Hex - 12 => "/\\\\U[0-9a-fA-F]{8}/", - - // Byte sequence: Unicode - 13 => "/\\\\[pP]\{[^}\n]+\}/", - - // One-Char Escapes - 14 => "/\\\\[abdefnrstvwzABCDGSWXZ\\\\\\.\[\]\(\)\{\}\^\\\$\?\+\*]/", - - // Byte sequence: Control-X sequence - 15 => "/\\\\c./", - - // Quantifier - 16 => "/\{(?:\d+,?|\d*,\d+)\}/", - - // Comment Subpattern - 17 => "/(?<=\()\?#[^\)]*/", - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - ), - 'SYMBOLS' => array( - 0 => array('.'), - 1 => array('(', ')'), - 2 => array('[', ']', '|'), - 3 => array('^', '$'), - 4 => array('?', '+', '*'), - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - ), - 'COMMENTS' => array( - 1 => 'color: #993333; font-weight: bold;', - 2 => 'color: #cc3300; font-weight: bold;', - 3 => 'color: #cc0066; font-weight: bold;', - 4 => 'color: #cc0066; font-weight: bold;', - 5 => 'color: #cc6600; font-weight: bold;', - 6 => 'color: #cc00cc; font-weight: bold;', - 7 => 'color: #cc9900; font-weight: bold; font-style: italic;', - 8 => 'color: #cc9900; font-style: italic;', - 9 => 'color: #669933; font-style: italic;', - 10 => 'color: #339933; font-style: italic;', - 11 => 'color: #339966; font-style: italic;', - 12 => 'color: #339999; font-style: italic;', - 13 => 'color: #663399; font-style: italic;', - 14 => 'color: #999933; font-style: italic;', - 15 => 'color: #993399; font-style: italic;', - 16 => 'color: #333399; font-style: italic;', - 17 => 'color: #666666; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 'HARD' => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;', - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #333399; font-weight: bold;', - 1 => 'color: #993333; font-weight: bold;', - 2 => 'color: #339933; font-weight: bold;', - 3 => 'color: #333399; font-weight: bold;', - 4 => 'color: #333399; font-style: italic;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'BRACKETS' => GESHI_NEVER, - 'NUMBERS' => GESHI_NEVER - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/per.php b/_piecrust/libs/Geshi/geshi/per.php deleted file mode 100644 index 797bcab..0000000 --- a/_piecrust/libs/Geshi/geshi/per.php +++ /dev/null @@ -1,302 +0,0 @@ - 'per', - 'COMMENT_SINGLE' => array(1 => '--', 2 => '#'), - 'COMMENT_MULTI' => array('{' => '}'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - "ACCELERATOR", - "ACCELERATOR2", - "ACTION", - "ALT", - "AND", - "AUTO", - "AUTONEXT", - "AUTOSCALE", - "BETWEEN", - "BOTH", - "BUTTON", - "BUTTONEDIT", - "BUTTONTEXTHIDDEN", - "BY", - "BYTE", - "CANVAS", - "CENTER", - "CHECKBOX", - "CLASS", - "COLOR", - "COLUMNS", - "COMBOBOX", - "COMMAND", - "COMMENT", - "COMMENTS", - "COMPACT", - "COMPRESS", - "CONFIG", - "CONTROL", - "CURRENT", - "DATABASE", - "DATEEDIT", - "DEC", - "DEFAULT", - "DEFAULTS", - "DELIMITERS", - "DISPLAY", - "DISPLAYONLY", - "DOWNSHIFT", - "DYNAMIC", - "EDIT", - "FIXED", - "FOLDER", - "FONTPITCH", - "FORMAT", - "FORMONLY", - "GRID", - "GRIDCHILDRENINPARENT", - "GROUP", - "HBOX", - "HEIGHT", - "HIDDEN", - "HORIZONTAL", - "INCLUDE", - "INITIAL", - "INITIALIZER", - "INPUT", - "INSTRUCTIONS", - "INTERVAL", - "INVISIBLE", - "IS", - "ITEM", - "ITEMS", - "JUSTIFY", - "KEY", - "KEYS", - "LABEL", - "LEFT", - "LIKE", - "LINES", - "MATCHES", - "NAME", - "NOENTRY", - "NONCOMPRESS", - "NORMAL", - "NOT", - "NOUPDATE", - "OPTIONS", - "OR", - "ORIENTATION", - "PACKED", - "PAGE", - "PICTURE", - "PIXELHEIGHT", - "PIXELS", - "PIXELWIDTH", - "POINTS", - "PROGRAM", - "PROGRESSBAR", - "QUERYCLEAR", - "QUERYEDITABLE", - "RADIOGROUP", - "RECORD", - "REQUIRED", - "REVERSE", - "RIGHT", - "SAMPLE", - "SCREEN", - "SCROLL", - "SCROLLBARS", - "SCROLLGRID", - "SECOND", - "SEPARATOR", - "SHIFT", - "SIZE", - "SIZEPOLICY", - "SMALLFLOAT", - "SMALLINT", - "SPACING", - "STRETCH", - "STYLE", - "TABINDEX", - "TABLE", - "TAG", - "TEXT", - "TEXTEDIT", - "THROUGH", - "THRU", - "TITLE", - "TO", - "TOOLBAR", - "TOPMENU", - "TYPE", - "UNHIDABLE", - "UNHIDABLECOLUMNS", - "UNMOVABLE", - "UNMOVABLECOLUMNS", - "UNSIZABLE", - "UNSIZABLECOLUMNS", - "UNSORTABLE", - "UNSORTABLECOLUMNS", - "UPSHIFT", - "USER", - "VALIDATE", - "VALUECHECKED", - "VALUEMAX", - "VALUEMIN", - "VALUEUNCHECKED", - "VARCHAR", - "VARIABLE", - "VBOX", - "VERIFY", - "VERSION", - "VERTICAL", - "TIMESTAMP", - "WANTCOLUMNSANCHORED", /* to be removed! */ - "WANTFIXEDPAGESIZE", - "WANTNORETURNS", - "WANTTABS", - "WHERE", - "WIDGET", - "WIDTH", - "WINDOWSTYLE", - "WITHOUT", - "WORDWRAP", - "X", - "Y", - "ZEROFILL", - "SCHEMA", - "ATTRIBUTES", - "TABLES", - "LAYOUT", - "END" - ), - 2 => array( - "YEAR", - "BLACK", - "BLINK", - "BLUE", - "YELLOW", - "WHITE", - "UNDERLINE", - "CENTURY", - "FRACTION", - "CHAR", - "CHARACTER", - "CHARACTERS", - "CYAN", - "DATE", - "DATETIME", - "DAY", - "DECIMAL", - "FALSE", - "FLOAT", - "GREEN", - "HOUR", - "INT", - "INTEGER", - "MAGENTA", - "MINUTE", - "MONEY", - "NONE", - "NULL", - "REAL", - "RED", - "TRUE", - "TODAY", - "MONTH", - "IMAGE" - ), - ), - 'SYMBOLS' => array( - '+', '-', '*', '?', '=', '/', '%', '>', '<', '^', '!', '|', ':', - '(', ')', '[', ']' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0600FF;', - 2 => 'color: #0000FF; font-weight: bold;', - ), - 'COMMENTS' => array( - 1 => 'color: #008080; font-style: italic;', - 2 => 'color: #008080;', - 'MULTI' => 'color: green' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #008080; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #808080;' - ), - 'NUMBERS' => array( - 0 => 'color: #FF0000;' - ), - 'METHODS' => array( - 1 => 'color: #0000FF;', - 2 => 'color: #0000FF;' - ), - 'SYMBOLS' => array( - 0 => 'color: #008000;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/perl.php b/_piecrust/libs/Geshi/geshi/perl.php deleted file mode 100644 index e66b52f..0000000 --- a/_piecrust/libs/Geshi/geshi/perl.php +++ /dev/null @@ -1,213 +0,0 @@ - 'Perl', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array( - '=back' => '=cut', - '=head' => '=cut', - '=item' => '=cut', - '=over' => '=cut', - '=begin' => '=cut', - '=end' => '=cut', - '=for' => '=cut', - '=encoding' => '=cut', - '=pod' => '=cut' - ), - 'COMMENT_REGEXP' => array( - //Regular expressions - 2 => "/(?<=[\\s^])(s|tr|y)\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])*\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU", - //Regular expression match variables - 3 => '/\$\d+/', - //Heredoc - 4 => '/<<\s*?([\'"]?)([a-zA-Z0-9]+)\1;[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU', - //Predefined variables - 5 => '/\$(\^[a-zA-Z]?|[\*\$`\'&_\.,+\-~:;\\\\\/"\|%=\?!@#<>\(\)\[\]])(?!\w)|@[_+\-]|%[!]|\$(?=\{)/', - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"','`'), - 'HARDQUOTE' => array("'", "'"), // An optional 2-element array defining the beginning and end of a hard-quoted string - 'HARDESCAPE' => array('\\\'',), - // Things that must still be escaped inside a hard-quoted string - // If HARDQUOTE is defined, HARDESCAPE must be defined - // This will not work unless the first character of each element is either in the - // QUOTEMARKS array or is the ESCAPE_CHAR - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'case', 'do', 'else', 'elsif', 'for', 'if', 'then', 'until', 'while', 'foreach', 'my', - 'xor', 'or', 'and', 'unless', 'next', 'last', 'redo', 'not', 'our', - 'reset', 'continue', 'cmp', 'ne', 'eq', 'lt', 'gt', 'le', 'ge', - ), - 2 => array( - 'use', 'sub', 'new', '__END__', '__DATA__', '__DIE__', '__WARN__', 'BEGIN', - 'STDIN', 'STDOUT', 'STDERR', 'ARGV', 'ARGVOUT' - ), - 3 => array( - 'abs', 'accept', 'alarm', 'atan2', 'bind', 'binmode', 'bless', - 'caller', 'chdir', 'chmod', 'chomp', 'chop', 'chown', 'chr', - 'chroot', 'close', 'closedir', 'connect', 'cos', - 'crypt', 'dbmclose', 'dbmopen', 'defined', 'delete', 'die', - 'dump', 'each', 'endgrent', 'endhostent', 'endnetent', 'endprotoent', - 'endpwent', 'endservent', 'eof', 'eval', 'exec', 'exists', 'exit', - 'exp', 'fcntl', 'fileno', 'flock', 'fork', 'format', 'formline', - 'getc', 'getgrent', 'getgrgid', 'getgrnam', 'gethostbyaddr', - 'gethostbyname', 'gethostent', 'getlogin', 'getnetbyaddr', 'getnetbyname', - 'getnetent', 'getpeername', 'getpgrp', 'getppid', 'getpriority', - 'getprotobyname', 'getprotobynumber', 'getprotoent', 'getpwent', - 'getpwnam', 'getpwuid', 'getservbyname', 'getservbyport', 'getservent', - 'getsockname', 'getsockopt', 'glob', 'gmtime', 'goto', 'grep', - 'hex', 'import', 'index', 'int', 'ioctl', 'join', 'keys', 'kill', - 'lc', 'lcfirst', 'length', 'link', 'listen', 'local', - 'localtime', 'log', 'lstat', 'm', 'map', 'mkdir', 'msgctl', 'msgget', - 'msgrcv', 'msgsnd', 'no', 'oct', 'open', 'opendir', - 'ord', 'pack', 'package', 'pipe', 'pop', 'pos', 'print', - 'printf', 'prototype', 'push', 'qq', 'qr', 'quotemeta', 'qw', - 'qx', 'q', 'rand', 'read', 'readdir', 'readline', 'readlink', 'readpipe', - 'recv', 'ref', 'rename', 'require', 'return', - 'reverse', 'rewinddir', 'rindex', 'rmdir', 's', 'scalar', 'seek', - 'seekdir', 'select', 'semctl', 'semget', 'semop', 'send', 'setgrent', - 'sethostent', 'setnetent', 'setpgrp', 'setpriority', 'setprotoent', - 'setpwent', 'setservent', 'setsockopt', 'shift', 'shmctl', 'shmget', - 'shmread', 'shmwrite', 'shutdown', 'sin', 'sleep', 'socket', 'socketpair', - 'sort', 'splice', 'split', 'sprintf', 'sqrt', 'srand', 'stat', - 'study', 'substr', 'symlink', 'syscall', 'sysopen', 'sysread', - 'sysseek', 'system', 'syswrite', 'tell', 'telldir', 'tie', 'tied', - 'time', 'times', 'tr', 'truncate', 'uc', 'ucfirst', 'umask', 'undef', - 'unlink', 'unpack', 'unshift', 'untie', 'utime', 'values', - 'vec', 'wait', 'waitpid', 'wantarray', 'warn', 'write', 'y' - ) - ), - 'SYMBOLS' => array( - '<', '>', '=', - '!', '@', '~', '&', '|', '^', - '+','-', '*', '/', '%', - ',', ';', '?', '.', ':' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #000066;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #009966; font-style: italic;', - 3 => 'color: #0000ff;', - 4 => 'color: #cc0000; font-style: italic;', - 5 => 'color: #0000ff;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 'HARD' => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;', - 'HARD' => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'REGEXPS' => array( - 0 => 'color: #0000ff;', - 4 => 'color: #009999;', - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://perldoc.perl.org/functions/{FNAMEL}.html' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '->', - 2 => '::' - ), - 'REGEXPS' => array( - //Variable - 0 => '(?:\$[\$#]?|\\\\(?:[@%*]?|\\\\*\$|&)|%[$]?|@[$]?|\*[$]?|&[$]?)[a-zA-Z_][a-zA-Z0-9_]*', - //File Descriptor - 4 => '<[a-zA-Z_][a-zA-Z0-9_]*>', - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'COMMENTS' => array( - 'DISALLOWED_BEFORE' => '$' - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/perl6.php b/_piecrust/libs/Geshi/geshi/perl6.php deleted file mode 100644 index 57b8514..0000000 --- a/_piecrust/libs/Geshi/geshi/perl6.php +++ /dev/null @@ -1,197 +0,0 @@ - 'Perl 6', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array('=begin' => '=end'), - 'COMMENT_REGEXP' => array( - //Regular expressions - 2 => "/(?<=[\\s^])(s|tr|y)\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])*\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU", - //Regular expression match variables - 3 => '/\$\d+/', - //Heredoc - 4 => '/<<\s*?([\'"]?)([a-zA-Z0-9]+)\1;[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU', - //Beastly hack to finish highlighting each POD block - 5 => '((?<==end) .+)' - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'HARDQUOTE' => array("'", "'"), // An optional 2-element array defining the beginning and end of a hard-quoted string - 'HARDESCAPE' => array('\\\''), - // Things that must still be escaped inside a hard-quoted string - // If HARDQUOTE is defined, HARDESCAPE must be defined - // This will not work unless the first character of each element is either in the - // QUOTEMARKS array or is the ESCAPE_CHAR - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'do', 'else', 'elsif', 'for', 'if', 'then', 'until', - 'while', 'loop', 'repeat', 'my', 'xor', 'or', 'and', - 'unless', 'next', 'last', 'redo', 'not', 'our', 'let', - 'temp', 'state', 'enum', 'constant', 'continue', 'cmp', - 'ne', 'eq', 'lt', 'gt', 'le', 'ge', 'leg', 'div', 'X', - 'Z', 'x', 'xx', 'given', 'when', 'default', 'has', - 'returns', 'of', 'is', 'does', 'where', 'subset', 'but', - 'True', 'False', 'return', 'die', 'fail' - ), - 2 => array( - 'use', 'sub', 'multi', 'method', 'submethod', 'proto', - 'class', 'role', 'grammar', 'regex', 'token', 'rule', - 'new', 'BEGIN', 'END', 'CHECK', 'INIT', 'START', 'FIRST', - 'ENTER', 'LEAVE', 'KEEP', 'UNDO', 'NEXT', 'LAST', 'PRE', - 'POST', 'CATCH', 'CONTROL', 'BUILD' - ), - 3 => array( - 'all', 'any', 'cat', 'classify', 'defined', 'grep', 'first', - 'keys', 'kv', 'join', 'map', 'max', 'min', 'none', 'one', 'pairs', - 'print', 'printf', 'roundrobin', 'pick', 'reduce', 'reverse', 'say', - 'shape', 'sort', 'srand', 'undefine', 'uri', 'values', 'warn', 'zip', - - # Container - 'rotate', 'comb', 'end', 'elems', 'delete', - 'exists', 'pop', 'push', 'shift', 'splice', - 'unshift', 'invert', 'decode', - - # Numeric - 'succ', 'pred', 'abs', 'exp', 'log', - 'log10', 'rand', 'roots', 'cis', 'unpolar', 'i', 'floor', - 'ceiling', 'round', 'truncate', 'sign', 'sqrt', - 'polar', 're', 'im', 'I', 'atan2', 'nude', - 'denominator', 'numerator', - - # Str - 'p5chop', 'chop', 'p5chomp', 'chomp', 'lc', 'lcfirst', - 'uc', 'ucfirst', 'normalize', 'samecase', 'sameaccent', - 'capitalize', 'length', 'chars', 'graphs', 'codes', - 'bytes', 'encode', 'index', 'pack', 'quotemeta', 'rindex', - 'split', 'words', 'flip', 'sprintf', 'fmt', - 'substr', 'trim', 'unpack', 'match', 'subst', 'trans' - ) - ), - 'SYMBOLS' => array( - '<', '>', '=', - '!', '@', '~', '&', '|', '^', - '+','-', '*', '/', '%', - ',', ';', '?', '.', ':', - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #000066;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #009966; font-style: italic;', - 3 => 'color: #0000ff;', - 4 => 'color: #cc0000; font-style: italic;', - 5 => 'color: #666666; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 'HARD' => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;', - 'HARD' => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'REGEXPS' => array( - 0 => 'color: #0000ff;', - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.', - 2 => '::' - ), - 'REGEXPS' => array( - //Variable - 0 => '(?:[$@%]|&)(?:(?:[\^:*?!~]|<)?[a-zA-Z_][a-zA-Z0-9_]*|(?=\.))' - # We treat the . twigil specially so the name can be highlighted as an - # object field (via OBJECT_SPLITTERS). - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'COMMENTS' => array( - 'DISALLOWED_BEFORE' => '$' - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/pf.php b/_piecrust/libs/Geshi/geshi/pf.php deleted file mode 100644 index 26cfdcf..0000000 --- a/_piecrust/libs/Geshi/geshi/pf.php +++ /dev/null @@ -1,178 +0,0 @@ - 'OpenBSD Packet Filter', - 'COMMENT_SINGLE' => array('#'), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array( - 1 => "/\\$\\{[^\\n\\}]*?\\}/i", - 2 => '/<<-?\s*?(\'?)([a-zA-Z0-9]+)\1\\n.*\\n\\2(?![a-zA-Z0-9])/siU', - 3 => "/\\\\['\"]/siU" - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'HARDQUOTE' => array("'", "'"), - 'HARDESCAPE' => array("\'"), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array( - 1 => "#\\\\[nfrtv\\$\\\"\n]#i", - 2 => "#\\$[a-z_][a-z0-9_]*#i", - 3 => "/\\$\\{[^\\n\\}]*?\\}/i", - 4 => "/\\$\\([^\\n\\)]*?\\)/i", - 5 => "/`[^`]*`/" - ), - 'KEYWORDS' => array( - 1 => array( - 'pass' - ), - 2 => array( - 'block' - ), - 3 => array( - 'quick','keep','state','antispoof','table','persist','file','scrub', - 'set','skip','flags','on' - ), - 4 => array( - 'in','out','proto' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', ';;', '`','=' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #009900; font-weight: bold;', - 2 => 'color: #990000; font-weight: bold;', - 3 => 'color: #7a0874;', - 4 => 'color: #336699;' - ), - 'COMMENTS' => array( - 0 => 'color: #666666; font-style: italic;', - 1 => 'color: #800000;', - 2 => 'color: #cc0000; font-style: italic;', - 3 => 'color: #000000; font-weight: bold;' - ), - 'ESCAPE_CHAR' => array( - 1 => 'color: #000099; font-weight: bold;', - 2 => 'color: #007800;', - 3 => 'color: #007800;', - 4 => 'color: #007800;', - 5 => 'color: #780078;', - 'HARD' => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #7a0874; font-weight: bold;' - ), - 'STRINGS' => array( - 0 => 'color: #CC0000;', - 'HARD' => 'color: #CC0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #ff00cc;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #000000; font-weight: bold;' - ), - 'REGEXPS' => array( - 0 => 'color: #007800;', - 1 => 'color: #007800;', - 2 => 'color: #007800;', - 4 => 'color: #007800;', - 5 => 'color: #660033;', - 6 => 'color: #000099; font-weight: bold;', - 7 => 'color: #0000ff;', - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - //Variables (will be handled by comment_regexps) - 0 => "\\$\\{[a-zA-Z_][a-zA-Z0-9_]*?\\}", - //Variables without braces - 1 => "\\$[a-zA-Z_][a-zA-Z0-9_]*", - //Variable assignment - 2 => "(? "\\$[*#\$\\-\\?!]", - //Parameters of commands - 5 => "(?<=\s)--?[0-9a-zA-Z\-]+(?=[\s=]|$)", - //IPs - 6 => "([0-9]{1,3}\.){3}[0-9]{1,3}", - //Tables - 7 => "(<(.*)>)" - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'COMMENTS' => array( - 'DISALLOWED_BEFORE' => '$' - ), - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "(? "(?![\.\-a-zA-Z0-9_%\\/])" - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/php-brief.php b/_piecrust/libs/Geshi/geshi/php-brief.php deleted file mode 100644 index 945ea8b..0000000 --- a/_piecrust/libs/Geshi/geshi/php-brief.php +++ /dev/null @@ -1,222 +0,0 @@ - 'PHP (brief)', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - //Heredoc and Nowdoc syntax - 'COMMENT_REGEXP' => array(3 => '/<<<\s*?(\'?)([a-zA-Z0-9]+)\1[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'HARDQUOTE' => array("'", "'"), - 'HARDESCAPE' => array("\'"), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | - GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - 1 => array( - 'include', 'require', 'include_once', 'require_once', - 'for', 'as', 'foreach', 'if', 'elseif', 'else', 'while', 'do', 'endwhile', 'endif', 'switch', 'case', 'endswitch', - 'return', 'break' - ), - 2 => array( - 'null', '__LINE__', '__FILE__', - 'false', '<?php', - 'true', 'var', 'default', - 'function', 'class', 'new', '&new', 'public', 'private', 'interface', 'extends', - 'const', 'self' - ), - 3 => array( - 'func_num_args', 'func_get_arg', 'func_get_args', 'strlen', 'strcmp', 'strncmp', 'strcasecmp', 'strncasecmp', 'each', 'error_reporting', 'define', 'defined', - 'trigger_error', 'user_error', 'set_error_handler', 'restore_error_handler', 'get_declared_classes', 'get_loaded_extensions', - 'extension_loaded', 'get_extension_funcs', 'debug_backtrace', - 'constant', 'bin2hex', 'sleep', 'usleep', 'time', 'mktime', 'gmmktime', 'strftime', 'gmstrftime', 'strtotime', 'date', 'gmdate', 'getdate', 'localtime', 'checkdate', 'flush', 'wordwrap', 'htmlspecialchars', 'htmlentities', 'html_entity_decode', 'md5', 'md5_file', 'crc32', 'getimagesize', 'image_type_to_mime_type', 'phpinfo', 'phpversion', 'phpcredits', 'strnatcmp', 'strnatcasecmp', 'substr_count', 'strspn', 'strcspn', 'strtok', 'strtoupper', 'strtolower', 'strpos', 'strrpos', 'strrev', 'hebrev', 'hebrevc', 'nl2br', 'basename', 'dirname', 'pathinfo', 'stripslashes', 'stripcslashes', 'strstr', 'stristr', 'strrchr', 'str_shuffle', 'str_word_count', 'strcoll', 'substr', 'substr_replace', 'quotemeta', 'ucfirst', 'ucwords', 'strtr', 'addslashes', 'addcslashes', 'rtrim', 'str_replace', 'str_repeat', 'count_chars', 'chunk_split', 'trim', 'ltrim', 'strip_tags', 'similar_text', 'explode', 'implode', 'setlocale', 'localeconv', - 'parse_str', 'str_pad', 'chop', 'strchr', 'sprintf', 'printf', 'vprintf', 'vsprintf', 'sscanf', 'fscanf', 'parse_url', 'urlencode', 'urldecode', 'rawurlencode', 'rawurldecode', 'readlink', 'linkinfo', 'link', 'unlink', 'exec', 'system', 'escapeshellcmd', 'escapeshellarg', 'passthru', 'shell_exec', 'proc_open', 'proc_close', 'rand', 'srand', 'getrandmax', 'mt_rand', 'mt_srand', 'mt_getrandmax', 'base64_decode', 'base64_encode', 'abs', 'ceil', 'floor', 'round', 'is_finite', 'is_nan', 'is_infinite', 'bindec', 'hexdec', 'octdec', 'decbin', 'decoct', 'dechex', 'base_convert', 'number_format', 'fmod', 'ip2long', 'long2ip', 'getenv', 'putenv', 'getopt', 'microtime', 'gettimeofday', 'getrusage', 'uniqid', 'quoted_printable_decode', 'set_time_limit', 'get_cfg_var', 'magic_quotes_runtime', 'set_magic_quotes_runtime', 'get_magic_quotes_gpc', 'get_magic_quotes_runtime', - 'import_request_variables', 'error_log', 'serialize', 'unserialize', 'memory_get_usage', 'var_dump', 'var_export', 'debug_zval_dump', 'print_r','highlight_file', 'show_source', 'highlight_string', 'ini_get', 'ini_get_all', 'ini_set', 'ini_alter', 'ini_restore', 'get_include_path', 'set_include_path', 'restore_include_path', 'setcookie', 'header', 'headers_sent', 'connection_aborted', 'connection_status', 'ignore_user_abort', 'parse_ini_file', 'is_uploaded_file', 'move_uploaded_file', 'intval', 'floatval', 'doubleval', 'strval', 'gettype', 'settype', 'is_null', 'is_resource', 'is_bool', 'is_long', 'is_float', 'is_int', 'is_integer', 'is_double', 'is_real', 'is_numeric', 'is_string', 'is_array', 'is_object', 'is_scalar', - 'ereg', 'ereg_replace', 'eregi', 'eregi_replace', 'split', 'spliti', 'join', 'sql_regcase', 'dl', 'pclose', 'popen', 'readfile', 'rewind', 'rmdir', 'umask', 'fclose', 'feof', 'fgetc', 'fgets', 'fgetss', 'fread', 'fopen', 'fpassthru', 'ftruncate', 'fstat', 'fseek', 'ftell', 'fflush', 'fwrite', 'fputs', 'mkdir', 'rename', 'copy', 'tempnam', 'tmpfile', 'file', 'file_get_contents', 'stream_select', 'stream_context_create', 'stream_context_set_params', 'stream_context_set_option', 'stream_context_get_options', 'stream_filter_prepend', 'stream_filter_append', 'fgetcsv', 'flock', 'get_meta_tags', 'stream_set_write_buffer', 'set_file_buffer', 'set_socket_blocking', 'stream_set_blocking', 'socket_set_blocking', 'stream_get_meta_data', 'stream_register_wrapper', 'stream_wrapper_register', 'stream_set_timeout', 'socket_set_timeout', 'socket_get_status', 'realpath', 'fnmatch', 'fsockopen', 'pfsockopen', 'pack', 'unpack', 'get_browser', 'crypt', 'opendir', 'closedir', 'chdir', 'getcwd', 'rewinddir', 'readdir', 'dir', 'glob', 'fileatime', 'filectime', 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', 'filesize', 'filetype', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'stat', 'lstat', 'chown', - 'touch', 'clearstatcache', 'mail', 'ob_start', 'ob_flush', 'ob_clean', 'ob_end_flush', 'ob_end_clean', 'ob_get_flush', 'ob_get_clean', 'ob_get_length', 'ob_get_level', 'ob_get_status', 'ob_get_contents', 'ob_implicit_flush', 'ob_list_handlers', 'ksort', 'krsort', 'natsort', 'natcasesort', 'asort', 'arsort', 'sort', 'rsort', 'usort', 'uasort', 'uksort', 'shuffle', 'array_walk', 'count', 'end', 'prev', 'next', 'reset', 'current', 'key', 'min', 'max', 'in_array', 'array_search', 'extract', 'compact', 'array_fill', 'range', 'array_multisort', 'array_push', 'array_pop', 'array_shift', 'array_unshift', 'array_splice', 'array_slice', 'array_merge', 'array_merge_recursive', 'array_keys', 'array_values', 'array_count_values', 'array_reverse', 'array_reduce', 'array_pad', 'array_flip', 'array_change_key_case', 'array_rand', 'array_unique', 'array_intersect', 'array_intersect_assoc', 'array_diff', 'array_diff_assoc', 'array_sum', 'array_filter', 'array_map', 'array_chunk', 'array_key_exists', 'pos', 'sizeof', 'key_exists', 'assert', 'assert_options', 'version_compare', 'ftok', 'str_rot13', 'aggregate', - 'session_name', 'session_module_name', 'session_save_path', 'session_id', 'session_regenerate_id', 'session_decode', 'session_register', 'session_unregister', 'session_is_registered', 'session_encode', - 'session_start', 'session_destroy', 'session_unset', 'session_set_save_handler', 'session_cache_limiter', 'session_cache_expire', 'session_set_cookie_params', 'session_get_cookie_params', 'session_write_close', 'preg_match', 'preg_match_all', 'preg_replace', 'preg_replace_callback', 'preg_split', 'preg_quote', 'preg_grep', 'overload', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', 'ctype_lower', 'ctype_graph', 'ctype_print', 'ctype_punct', 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'virtual', 'apache_request_headers', 'apache_note', 'apache_lookup_uri', 'apache_child_terminate', 'apache_setenv', 'apache_response_headers', 'apache_get_version', 'getallheaders', 'mysql_connect', 'mysql_pconnect', 'mysql_close', 'mysql_select_db', 'mysql_create_db', 'mysql_drop_db', 'mysql_query', 'mysql_unbuffered_query', 'mysql_db_query', 'mysql_list_dbs', 'mysql_list_tables', 'mysql_list_fields', 'mysql_list_processes', 'mysql_error', 'mysql_errno', 'mysql_affected_rows', 'mysql_insert_id', 'mysql_result', 'mysql_num_rows', 'mysql_num_fields', 'mysql_fetch_row', 'mysql_fetch_array', 'mysql_fetch_assoc', 'mysql_fetch_object', 'mysql_data_seek', 'mysql_fetch_lengths', 'mysql_fetch_field', 'mysql_field_seek', 'mysql_free_result', 'mysql_field_name', 'mysql_field_table', 'mysql_field_len', 'mysql_field_type', 'mysql_field_flags', 'mysql_escape_string', 'mysql_real_escape_string', 'mysql_stat', - 'mysql_thread_id', 'mysql_client_encoding', 'mysql_get_client_info', 'mysql_get_host_info', 'mysql_get_proto_info', 'mysql_get_server_info', 'mysql_info', 'mysql', 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldlen', 'mysql_fieldtype', 'mysql_fieldflags', 'mysql_selectdb', 'mysql_createdb', 'mysql_dropdb', 'mysql_freeresult', 'mysql_numfields', 'mysql_numrows', 'mysql_listdbs', 'mysql_listtables', 'mysql_listfields', 'mysql_db_name', 'mysql_dbname', 'mysql_tablename', 'mysql_table_name', 'pg_connect', 'pg_pconnect', 'pg_close', 'pg_connection_status', 'pg_connection_busy', 'pg_connection_reset', 'pg_host', 'pg_dbname', 'pg_port', 'pg_tty', 'pg_options', 'pg_ping', 'pg_query', 'pg_send_query', 'pg_cancel_query', 'pg_fetch_result', 'pg_fetch_row', 'pg_fetch_assoc', 'pg_fetch_array', 'pg_fetch_object', 'pg_fetch_all', 'pg_affected_rows', 'pg_get_result', 'pg_result_seek', 'pg_result_status', 'pg_free_result', 'pg_last_oid', 'pg_num_rows', 'pg_num_fields', 'pg_field_name', 'pg_field_num', 'pg_field_size', 'pg_field_type', 'pg_field_prtlen', 'pg_field_is_null', 'pg_get_notify', 'pg_get_pid', 'pg_result_error', 'pg_last_error', 'pg_last_notice', 'pg_put_line', 'pg_end_copy', 'pg_copy_to', 'pg_copy_from', - 'pg_trace', 'pg_untrace', 'pg_lo_create', 'pg_lo_unlink', 'pg_lo_open', 'pg_lo_close', 'pg_lo_read', 'pg_lo_write', 'pg_lo_read_all', 'pg_lo_import', 'pg_lo_export', 'pg_lo_seek', 'pg_lo_tell', 'pg_escape_string', 'pg_escape_bytea', 'pg_unescape_bytea', 'pg_client_encoding', 'pg_set_client_encoding', 'pg_meta_data', 'pg_convert', 'pg_insert', 'pg_update', 'pg_delete', 'pg_select', 'pg_exec', 'pg_getlastoid', 'pg_cmdtuples', 'pg_errormessage', 'pg_numrows', 'pg_numfields', 'pg_fieldname', 'pg_fieldsize', 'pg_fieldtype', 'pg_fieldnum', 'pg_fieldprtlen', 'pg_fieldisnull', 'pg_freeresult', 'pg_result', 'pg_loreadall', 'pg_locreate', 'pg_lounlink', 'pg_loopen', 'pg_loclose', 'pg_loread', 'pg_lowrite', 'pg_loimport', 'pg_loexport', - 'echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die' - ) - ), - 'SYMBOLS' => array( - 1 => array( - '<%', '<%=', '%>', '' - ), - 0 => array( - '(', ')', '[', ']', '{', '}', - '!', '@', '%', '&', '|', '/', - '<', '>', - '=', '-', '+', '*', - '.', ':', ',', ';' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #990000;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #666666; font-style: italic;', - 3 => 'color: #0000cc; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 'HARD' => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;', - 'HARD' => 'color: #0000ff;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;', - GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', - GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', - GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', - ), - 'METHODS' => array( - 1 => 'color: #004000;', - 2 => 'color: #004000;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;', - 1 => 'color: #000000; font-weight: bold;' - ), - 'REGEXPS' => array( - 0 => 'color: #0000ff;' - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://www.php.net/{FNAMEL}' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '->', - 2 => '::' - ), - 'REGEXPS' => array( - //Variables - 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*" - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - 0 => array( - ' '?>' - ), - 1 => array( - ' '?>' - ), - 2 => array( - '<%' => '%>' - ), - 3 => array( - '' - ), - 4 => "/(?P<\\?(?>php\b)?)(?:". - "(?>[^\"'?\\/<]+)|". - "\\?(?!>)|". - "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|". - "(?>\"(?>[^\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|". - "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|". - "\\/\\/(?>.*?$)|". - "\\/(?=[^*\\/])|". - "<(?!<<)|". - "<<<(?P\w+)\s.*?\s\k". - ")*(?P\\?>|\Z)/sm", - 5 => "/(?P<%)(?:". - "(?>[^\"'%\\/<]+)|". - "%(?!>)|". - "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|". - "(?>\"(?>[^\\\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|". - "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|". - "\\/\\/(?>.*?$)|". - "\\/(?=[^*\\/])|". - "<(?!<<)|". - "<<<(?P\w+)\s.*?\s\k". - ")*(?P%>)/sm" - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true - ), - 'TAB_WIDTH' => 4 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/php.php b/_piecrust/libs/Geshi/geshi/php.php deleted file mode 100644 index a7e8a58..0000000 --- a/_piecrust/libs/Geshi/geshi/php.php +++ /dev/null @@ -1,1114 +0,0 @@ - 'PHP', - 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - //Heredoc and Nowdoc syntax - 3 => '/<<<\s*?(\'?)([a-zA-Z0-9]+?)\1[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU', - // phpdoc comments - 4 => '#/\*\*(?![\*\/]).*\*/#sU', - // Advanced # handling - 2 => "/#.*?(?:(?=\?\>)|^)/smi" - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'ESCAPE_REGEXP' => array( - //Simple Single Char Escapes - 1 => "#\\\\[nfrtv\$\"\n\\\\]#i", - //Hexadecimal Char Specs - 2 => "#\\\\x[\da-fA-F]{1,2}#i", - //Octal Char Specs - 3 => "#\\\\[0-7]{1,3}#", - //String Parsing of Variable Names - 4 => "#\\$[a-z0-9_]+(?:\\[[a-z0-9_]+\\]|->[a-z0-9_]+)?|(?:\\{\\$|\\$\\{)[a-z0-9_]+(?:\\[('?)[a-z0-9_]*\\1\\]|->[a-z0-9_]+)*\\}#i", - //Experimental extension supporting cascaded {${$var}} syntax - 5 => "#\$[a-z0-9_]+(?:\[[a-z0-9_]+\]|->[a-z0-9_]+)?|(?:\{\$|\$\{)[a-z0-9_]+(?:\[('?)[a-z0-9_]*\\1\]|->[a-z0-9_]+)*\}|\{\$(?R)\}#i", - //Format String support in ""-Strings - 6 => "#%(?:%|(?:\d+\\\\\\\$)?\\+?(?:\x20|0|'.)?-?(?:\d+|\\*)?(?:\.\d+)?[bcdefFosuxX])#" - ), - 'HARDQUOTE' => array("'", "'"), - 'HARDESCAPE' => array("'", "\\"), - 'HARDCHAR' => "\\", - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | - GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - 1 => array( - 'as','break','case','continue','default','do','else','elseif', - 'endfor','endforeach','endif','endswitch','endwhile','for', - 'foreach','if','include','include_once','require','require_once', - 'return','switch','throw','while', - - 'echo','print' - ), - 2 => array( - '&new','</script>','<?php','<script language', - 'class','const','declare','extends','function','global','interface', - 'namespace','new','private','protected','public','self','use','var' - ), - 3 => array( - 'abs','acos','acosh','addcslashes','addslashes','aggregate', - 'aggregate_methods','aggregate_methods_by_list', - 'aggregate_methods_by_regexp','aggregate_properties', - 'aggregate_properties_by_list','aggregate_properties_by_regexp', - 'aggregation_info','apache_child_terminate','apache_get_modules', - 'apache_get_version','apache_getenv','apache_lookup_uri', - 'apache_note','apache_request_headers','apache_response_headers', - 'apache_setenv','array','array_change_key_case','array_chunk', - 'array_combine','array_count_values','array_diff', - 'array_diff_assoc','array_diff_key','array_diff_uassoc', - 'array_diff_ukey','array_fill','array_fill_keys','array_filter', - 'array_flip','array_intersect','array_intersect_assoc', - 'array_intersect_key','array_intersect_uassoc', - 'array_intersect_ukey','array_key_exists','array_keys','array_map', - 'array_merge','array_merge_recursive','array_multisort','array_pad', - 'array_pop','array_product','array_push','array_rand', - 'array_reduce','array_reverse','array_search','array_shift', - 'array_slice','array_splice','array_sum','array_udiff', - 'array_udiff_assoc','array_udiff_uassoc','array_uintersect', - 'array_uintersect_assoc','array_uintersect_uassoc','array_unique', - 'array_unshift','array_values','array_walk','array_walk_recursive', - 'arsort','asin','asinh','asort','assert','assert_options','atan', - 'atan2','atanh','base_convert','base64_decode','base64_encode', - 'basename','bcadd','bccomp','bcdiv','bcmod','bcmul', - 'bcompiler_load','bcompiler_load_exe','bcompiler_parse_class', - 'bcompiler_read','bcompiler_write_class','bcompiler_write_constant', - 'bcompiler_write_exe_footer','bcompiler_write_file', - 'bcompiler_write_footer','bcompiler_write_function', - 'bcompiler_write_functions_from_file','bcompiler_write_header', - 'bcompiler_write_included_filename','bcpow','bcpowmod','bcscale', - 'bcsqrt','bcsub','bin2hex','bindec','bindtextdomain', - 'bind_textdomain_codeset','bitset_empty','bitset_equal', - 'bitset_excl','bitset_fill','bitset_from_array','bitset_from_hash', - 'bitset_from_string','bitset_in','bitset_incl', - 'bitset_intersection','bitset_invert','bitset_is_empty', - 'bitset_subset','bitset_to_array','bitset_to_hash', - 'bitset_to_string','bitset_union','blenc_encrypt','bzclose', - 'bzcompress','bzdecompress','bzerrno','bzerror','bzerrstr', - 'bzflush','bzopen','bzread','bzwrite','cal_days_in_month', - 'cal_from_jd','cal_info','cal_to_jd','call_user_func', - 'call_user_func_array','call_user_method','call_user_method_array', - 'ceil','chdir','checkdate','checkdnsrr','chgrp','chmod','chop', - 'chown','chr','chunk_split','class_exists','class_implements', - 'class_parents','classkit_aggregate_methods', - 'classkit_doc_comments','classkit_import','classkit_method_add', - 'classkit_method_copy','classkit_method_redefine', - 'classkit_method_remove','classkit_method_rename','clearstatcache', - 'closedir','closelog','com_create_guid','com_event_sink', - 'com_get_active_object','com_load_typelib','com_message_pump', - 'com_print_typeinfo','compact','confirm_phpdoc_compiled', - 'connection_aborted','connection_status','constant', - 'convert_cyr_string','convert_uudecode','convert_uuencode','copy', - 'cos','cosh','count','count_chars','cpdf_add_annotation', - 'cpdf_add_outline','cpdf_arc','cpdf_begin_text','cpdf_circle', - 'cpdf_clip','cpdf_close','cpdf_closepath', - 'cpdf_closepath_fill_stroke','cpdf_closepath_stroke', - 'cpdf_continue_text','cpdf_curveto','cpdf_end_text','cpdf_fill', - 'cpdf_fill_stroke','cpdf_finalize','cpdf_finalize_page', - 'cpdf_global_set_document_limits','cpdf_import_jpeg','cpdf_lineto', - 'cpdf_moveto','cpdf_newpath','cpdf_open','cpdf_output_buffer', - 'cpdf_page_init','cpdf_rect','cpdf_restore','cpdf_rlineto', - 'cpdf_rmoveto','cpdf_rotate','cpdf_rotate_text','cpdf_save', - 'cpdf_save_to_file','cpdf_scale','cpdf_set_action_url', - 'cpdf_set_char_spacing','cpdf_set_creator','cpdf_set_current_page', - 'cpdf_set_font','cpdf_set_font_directories', - 'cpdf_set_font_map_file','cpdf_set_horiz_scaling', - 'cpdf_set_keywords','cpdf_set_leading','cpdf_set_page_animation', - 'cpdf_set_subject','cpdf_set_text_matrix','cpdf_set_text_pos', - 'cpdf_set_text_rendering','cpdf_set_text_rise','cpdf_set_title', - 'cpdf_set_viewer_preferences','cpdf_set_word_spacing', - 'cpdf_setdash','cpdf_setflat','cpdf_setgray','cpdf_setgray_fill', - 'cpdf_setgray_stroke','cpdf_setlinecap','cpdf_setlinejoin', - 'cpdf_setlinewidth','cpdf_setmiterlimit','cpdf_setrgbcolor', - 'cpdf_setrgbcolor_fill','cpdf_setrgbcolor_stroke','cpdf_show', - 'cpdf_show_xy','cpdf_stringwidth','cpdf_stroke','cpdf_text', - 'cpdf_translate','crack_check','crack_closedict', - 'crack_getlastmessage','crack_opendict','crc32','create_function', - 'crypt','ctype_alnum','ctype_alpha','ctype_cntrl','ctype_digit', - 'ctype_graph','ctype_lower','ctype_print','ctype_punct', - 'ctype_space','ctype_upper','ctype_xdigit','curl_close', - 'curl_copy_handle','curl_errno','curl_error','curl_exec', - 'curl_getinfo','curl_init','curl_multi_add_handle', - 'curl_multi_close','curl_multi_exec','curl_multi_getcontent', - 'curl_multi_info_read','curl_multi_init','curl_multi_remove_handle', - 'curl_multi_select','curl_setopt','curl_setopt_array', - 'curl_version','current','cvsclient_connect','cvsclient_log', - 'cvsclient_login','cvsclient_retrieve','date','date_create', - 'date_date_set','date_default_timezone_get', - 'date_default_timezone_set','date_format','date_isodate_set', - 'date_modify','date_offset_get','date_parse','date_sun_info', - 'date_sunrise','date_sunset','date_time_set','date_timezone_get', - 'date_timezone_set','db_id_list','dba_close','dba_delete', - 'dba_exists','dba_fetch','dba_firstkey','dba_handlers','dba_insert', - 'dba_key_split','dba_list','dba_nextkey','dba_open','dba_optimize', - 'dba_popen','dba_replace','dba_sync','dbase_add_record', - 'dbase_close','dbase_create','dbase_delete_record', - 'dbase_get_header_info','dbase_get_record', - 'dbase_get_record_with_names','dbase_numfields','dbase_numrecords', - 'dbase_open','dbase_pack','dbase_replace_record', - 'dbg_get_all_contexts','dbg_get_all_module_names', - 'dbg_get_all_source_lines','dbg_get_context_name', - 'dbg_get_module_name','dbg_get_profiler_results', - 'dbg_get_source_context','dblist','dbmclose','dbmdelete', - 'dbmexists','dbmfetch','dbmfirstkey','dbminsert','dbmnextkey', - 'dbmopen','dbmreplace','dbx_close','dbx_compare','dbx_connect', - 'dbx_error','dbx_escape_string','dbx_fetch_row','dbx_query', - 'dbx_sort','dcgettext','dcngettext','deaggregate','debug_backtrace', - 'debug_zval_dump','debugbreak','decbin','dechex','decoct','define', - 'defined','define_syslog_variables','deg2rad','dgettext','die', - 'dio_close','dio_open','dio_read','dio_seek','dio_stat','dio_write', - 'dir','dirname','disk_free_space','disk_total_space', - 'diskfreespace','dl','dngettext','docblock_token_name', - 'docblock_tokenize','dom_import_simplexml','domxml_add_root', - 'domxml_attributes','domxml_children','domxml_doc_add_root', - 'domxml_doc_document_element','domxml_doc_get_element_by_id', - 'domxml_doc_get_elements_by_tagname','domxml_doc_get_root', - 'domxml_doc_set_root','domxml_doc_validate','domxml_doc_xinclude', - 'domxml_dump_mem','domxml_dump_mem_file','domxml_dump_node', - 'domxml_dumpmem','domxml_elem_get_attribute', - 'domxml_elem_set_attribute','domxml_get_attribute','domxml_getattr', - 'domxml_html_dump_mem','domxml_new_child','domxml_new_doc', - 'domxml_new_xmldoc','domxml_node','domxml_node_add_namespace', - 'domxml_node_attributes','domxml_node_children', - 'domxml_node_get_content','domxml_node_has_attributes', - 'domxml_node_new_child','domxml_node_set_content', - 'domxml_node_set_namespace','domxml_node_unlink_node', - 'domxml_open_file','domxml_open_mem','domxml_parser', - 'domxml_parser_add_chunk','domxml_parser_cdata_section', - 'domxml_parser_characters','domxml_parser_comment', - 'domxml_parser_end','domxml_parser_end_document', - 'domxml_parser_end_element','domxml_parser_entity_reference', - 'domxml_parser_get_document','domxml_parser_namespace_decl', - 'domxml_parser_processing_instruction', - 'domxml_parser_start_document','domxml_parser_start_element', - 'domxml_root','domxml_set_attribute','domxml_setattr', - 'domxml_substitute_entities_default','domxml_unlink_node', - 'domxml_version','domxml_xmltree','doubleval','each','easter_date', - 'easter_days','empty','end','ereg','ereg_replace','eregi', - 'eregi_replace','error_get_last','error_log','error_reporting', - 'escapeshellarg','escapeshellcmd','eval','event_deschedule', - 'event_dispatch','event_free','event_handle_signal', - 'event_have_events','event_init','event_new','event_pending', - 'event_priority_set','event_schedule','event_set','event_timeout', - 'exec','exif_imagetype','exif_read_data','exif_tagname', - 'exif_thumbnail','exit','exp','explode','expm1','extension_loaded', - 'extract','ezmlm_hash','fbird_add_user','fbird_affected_rows', - 'fbird_backup','fbird_blob_add','fbird_blob_cancel', - 'fbird_blob_close','fbird_blob_create','fbird_blob_echo', - 'fbird_blob_get','fbird_blob_import','fbird_blob_info', - 'fbird_blob_open','fbird_close','fbird_commit','fbird_commit_ret', - 'fbird_connect','fbird_db_info','fbird_delete_user','fbird_drop_db', - 'fbird_errcode','fbird_errmsg','fbird_execute','fbird_fetch_assoc', - 'fbird_fetch_object','fbird_fetch_row','fbird_field_info', - 'fbird_free_event_handler','fbird_free_query','fbird_free_result', - 'fbird_gen_id','fbird_maintain_db','fbird_modify_user', - 'fbird_name_result','fbird_num_fields','fbird_num_params', - 'fbird_param_info','fbird_pconnect','fbird_prepare','fbird_query', - 'fbird_restore','fbird_rollback','fbird_rollback_ret', - 'fbird_server_info','fbird_service_attach','fbird_service_detach', - 'fbird_set_event_handler','fbird_trans','fbird_wait_event','fclose', - 'fdf_add_doc_javascript','fdf_add_template','fdf_close', - 'fdf_create','fdf_enum_values','fdf_errno','fdf_error','fdf_get_ap', - 'fdf_get_attachment','fdf_get_encoding','fdf_get_file', - 'fdf_get_flags','fdf_get_opt','fdf_get_status','fdf_get_value', - 'fdf_get_version','fdf_header','fdf_next_field_name','fdf_open', - 'fdf_open_string','fdf_remove_item','fdf_save','fdf_save_string', - 'fdf_set_ap','fdf_set_encoding','fdf_set_file','fdf_set_flags', - 'fdf_set_javascript_action','fdf_set_on_import_javascript', - 'fdf_set_opt','fdf_set_status','fdf_set_submit_form_action', - 'fdf_set_target_frame','fdf_set_value','fdf_set_version','feof', - 'fflush','fgetc','fgetcsv','fgets','fgetss','file','file_exists', - 'file_get_contents','file_put_contents','fileatime','filectime', - 'filegroup','fileinode','filemtime','fileowner','fileperms', - 'filepro','filepro_fieldcount','filepro_fieldname', - 'filepro_fieldtype','filepro_fieldwidth','filepro_retrieve', - 'filepro_rowcount','filesize','filetype','filter_has_var', - 'filter_id','filter_input','filter_input_array','filter_list', - 'filter_var','filter_var_array','finfo_buffer','finfo_close', - 'finfo_file','finfo_open','finfo_set_flags','floatval','flock', - 'floor','flush','fmod','fnmatch','fopen','fpassthru','fprintf', - 'fputcsv','fputs','fread','frenchtojd','fribidi_charset_info', - 'fribidi_get_charsets','fribidi_log2vis','fscanf','fseek', - 'fsockopen','fstat','ftell','ftok','ftp_alloc','ftp_cdup', - 'ftp_chdir','ftp_chmod','ftp_close','ftp_connect','ftp_delete', - 'ftp_exec','ftp_fget','ftp_fput','ftp_get','ftp_get_option', - 'ftp_login','ftp_mdtm','ftp_mkdir','ftp_nb_continue','ftp_nb_fget', - 'ftp_nb_fput','ftp_nb_get','ftp_nb_put','ftp_nlist','ftp_pasv', - 'ftp_put','ftp_pwd','ftp_quit','ftp_raw','ftp_rawlist','ftp_rename', - 'ftp_rmdir','ftp_set_option','ftp_site','ftp_size', - 'ftp_ssl_connect','ftp_systype','ftruncate','function_exists', - 'func_get_arg','func_get_args','func_num_args','fwrite','gd_info', - 'getallheaders','getcwd','getdate','getenv','gethostbyaddr', - 'gethostbyname','gethostbynamel','getimagesize','getlastmod', - 'getmxrr','getmygid','getmyinode','getmypid','getmyuid','getopt', - 'getprotobyname','getprotobynumber','getrandmax','getrusage', - 'getservbyname','getservbyport','gettext','gettimeofday','gettype', - 'get_browser','get_cfg_var','get_class','get_class_methods', - 'get_class_vars','get_current_user','get_declared_classes', - 'get_defined_constants','get_defined_functions','get_defined_vars', - 'get_extension_funcs','get_headers','get_html_translation_table', - 'get_included_files','get_include_path','get_loaded_extensions', - 'get_magic_quotes_gpc','get_magic_quotes_runtime','get_meta_tags', - 'get_object_vars','get_parent_class','get_required_files', - 'get_resource_type','glob','gmdate','gmmktime','gmp_abs','gmp_add', - 'gmp_and','gmp_clrbit','gmp_cmp','gmp_com','gmp_div','gmp_div_q', - 'gmp_div_qr','gmp_div_r','gmp_divexact','gmp_fact','gmp_gcd', - 'gmp_gcdext','gmp_hamdist','gmp_init','gmp_intval','gmp_invert', - 'gmp_jacobi','gmp_legendre','gmp_mod','gmp_mul','gmp_neg', - 'gmp_nextprime','gmp_or','gmp_perfect_square','gmp_popcount', - 'gmp_pow','gmp_powm','gmp_prob_prime','gmp_random','gmp_scan0', - 'gmp_scan1','gmp_setbit','gmp_sign','gmp_sqrt','gmp_sqrtrem', - 'gmp_strval','gmp_sub','gmp_xor','gmstrftime','gopher_parsedir', - 'gregoriantojd','gzclose','gzcompress','gzdeflate','gzencode', - 'gzeof','gzfile','gzgetc','gzgets','gzgetss','gzinflate','gzopen', - 'gzpassthru','gzputs','gzread','gzrewind','gzseek','gztell', - 'gzuncompress','gzwrite','hash','hash_algos','hash_file', - 'hash_final','hash_hmac','hash_hmac_file','hash_init','hash_update', - 'hash_update_file','hash_update_stream','header','headers_list', - 'headers_sent','hebrev','hebrevc','hexdec','highlight_file', - 'highlight_string','html_doc','html_doc_file','html_entity_decode', - 'htmlentities','htmlspecialchars','htmlspecialchars_decode', - 'http_build_cookie','http_build_query','http_build_str', - 'http_build_url','http_cache_etag','http_cache_last_modified', - 'http_chunked_decode','http_date','http_deflate','http_get', - 'http_get_request_body','http_get_request_body_stream', - 'http_get_request_headers','http_head','http_inflate', - 'http_match_etag','http_match_modified','http_match_request_header', - 'http_negotiate_charset','http_negotiate_content_type', - 'http_negotiate_language','http_parse_cookie','http_parse_headers', - 'http_parse_message','http_parse_params', - 'http_persistent_handles_clean','http_persistent_handles_count', - 'http_persistent_handles_ident','http_post_data','http_post_fields', - 'http_put_data','http_put_file','http_put_stream','http_redirect', - 'http_request','http_request_body_encode', - 'http_request_method_exists','http_request_method_name', - 'http_request_method_register','http_request_method_unregister', - 'http_send_content_disposition','http_send_content_type', - 'http_send_data','http_send_file','http_send_last_modified', - 'http_send_status','http_send_stream','http_support', - 'http_throttle','hypot','i18n_convert','i18n_discover_encoding', - 'i18n_http_input','i18n_http_output','i18n_internal_encoding', - 'i18n_ja_jp_hantozen','i18n_mime_header_decode', - 'i18n_mime_header_encode','ibase_add_user','ibase_affected_rows', - 'ibase_backup','ibase_blob_add','ibase_blob_cancel', - 'ibase_blob_close','ibase_blob_create','ibase_blob_echo', - 'ibase_blob_get','ibase_blob_import','ibase_blob_info', - 'ibase_blob_open','ibase_close','ibase_commit','ibase_commit_ret', - 'ibase_connect','ibase_db_info','ibase_delete_user','ibase_drop_db', - 'ibase_errcode','ibase_errmsg','ibase_execute','ibase_fetch_assoc', - 'ibase_fetch_object','ibase_fetch_row','ibase_field_info', - 'ibase_free_event_handler','ibase_free_query','ibase_free_result', - 'ibase_gen_id','ibase_maintain_db','ibase_modify_user', - 'ibase_name_result','ibase_num_fields','ibase_num_params', - 'ibase_param_info','ibase_pconnect','ibase_prepare','ibase_query', - 'ibase_restore','ibase_rollback','ibase_rollback_ret', - 'ibase_server_info','ibase_service_attach','ibase_service_detach', - 'ibase_set_event_handler','ibase_trans','ibase_wait_event','iconv', - 'iconv_get_encoding','iconv_mime_decode', - 'iconv_mime_decode_headers','iconv_mime_encode', - 'iconv_set_encoding','iconv_strlen','iconv_strpos','iconv_strrpos', - 'iconv_substr','id3_get_frame_long_name','id3_get_frame_short_name', - 'id3_get_genre_id','id3_get_genre_list','id3_get_genre_name', - 'id3_get_tag','id3_get_version','id3_remove_tag','id3_set_tag', - 'idate','ignore_user_abort','image_type_to_extension', - 'image_type_to_mime_type','image2wbmp','imagealphablending', - 'imageantialias','imagearc','imagechar','imagecharup', - 'imagecolorallocate','imagecolorallocatealpha','imagecolorat', - 'imagecolorclosest','imagecolorclosestalpha','imagecolordeallocate', - 'imagecolorexact','imagecolorexactalpha','imagecolormatch', - 'imagecolorresolve','imagecolorresolvealpha','imagecolorset', - 'imagecolorsforindex','imagecolorstotal','imagecolortransparent', - 'imageconvolution','imagecopy','imagecopymerge', - 'imagecopymergegray','imagecopyresampled','imagecopyresized', - 'imagecreate','imagecreatefromgd','imagecreatefromgd2', - 'imagecreatefromgd2part','imagecreatefromgif','imagecreatefromjpeg', - 'imagecreatefrompng','imagecreatefromstring','imagecreatefromwbmp', - 'imagecreatefromxbm','imagecreatetruecolor','imagedashedline', - 'imagedestroy','imageellipse','imagefill','imagefilledarc', - 'imagefilledellipse','imagefilledpolygon','imagefilledrectangle', - 'imagefilltoborder','imagefilter','imagefontheight', - 'imagefontwidth','imageftbbox','imagefttext','imagegammacorrect', - 'imagegd','imagegd2','imagegif','imagegrabscreen','imagegrabwindow', - 'imageinterlace','imageistruecolor','imagejpeg','imagelayereffect', - 'imageline','imageloadfont','imagepalettecopy','imagepng', - 'imagepolygon','imagepsbbox','imagepsencodefont', - 'imagepsextendfont','imagepsfreefont','imagepsloadfont', - 'imagepsslantfont','imagepstext','imagerectangle','imagerotate', - 'imagesavealpha','imagesetbrush','imagesetpixel','imagesetstyle', - 'imagesetthickness','imagesettile','imagestring','imagestringup', - 'imagesx','imagesy','imagetruecolortopalette','imagettfbbox', - 'imagettftext','imagetypes','imagewbmp','imagexbm','imap_8bit', - 'imap_alerts','imap_append','imap_base64','imap_binary','imap_body', - 'imap_bodystruct','imap_check','imap_clearflag_full','imap_close', - 'imap_create','imap_createmailbox','imap_delete', - 'imap_deletemailbox','imap_errors','imap_expunge', - 'imap_fetch_overview','imap_fetchbody','imap_fetchheader', - 'imap_fetchstructure','imap_fetchtext','imap_get_quota', - 'imap_get_quotaroot','imap_getacl','imap_getmailboxes', - 'imap_getsubscribed','imap_header','imap_headerinfo','imap_headers', - 'imap_last_error','imap_list','imap_listmailbox', - 'imap_listsubscribed','imap_lsub','imap_mail','imap_mail_compose', - 'imap_mail_copy','imap_mail_move','imap_mailboxmsginfo', - 'imap_mime_header_decode','imap_msgno','imap_num_msg', - 'imap_num_recent','imap_open','imap_ping','imap_qprint', - 'imap_rename','imap_renamemailbox','imap_reopen', - 'imap_rfc822_parse_adrlist','imap_rfc822_parse_headers', - 'imap_rfc822_write_address','imap_savebody','imap_scan', - 'imap_scanmailbox','imap_search','imap_set_quota','imap_setacl', - 'imap_setflag_full','imap_sort','imap_status','imap_subscribe', - 'imap_thread','imap_timeout','imap_uid','imap_undelete', - 'imap_unsubscribe','imap_utf7_decode','imap_utf7_encode', - 'imap_utf8','implode','import_request_variables','in_array', - 'ini_alter','ini_get','ini_get_all','ini_restore','ini_set', - 'intval','ip2long','iptcembed','iptcparse','isset','is_a', - 'is_array','is_bool','is_callable','is_dir','is_double', - 'is_executable','is_file','is_finite','is_float','is_infinite', - 'is_int','is_integer','is_link','is_long','is_nan','is_null', - 'is_numeric','is_object','is_readable','is_real','is_resource', - 'is_scalar','is_soap_fault','is_string','is_subclass_of', - 'is_uploaded_file','is_writable','is_writeable','iterator_apply', - 'iterator_count','iterator_to_array','java_last_exception_clear', - 'java_last_exception_get','jddayofweek','jdmonthname','jdtofrench', - 'jdtogregorian','jdtojewish','jdtojulian','jdtounix','jewishtojd', - 'join','jpeg2wbmp','json_decode','json_encode','juliantojd','key', - 'key_exists','krsort','ksort','lcg_value','ldap_add','ldap_bind', - 'ldap_close','ldap_compare','ldap_connect','ldap_count_entries', - 'ldap_delete','ldap_dn2ufn','ldap_err2str','ldap_errno', - 'ldap_error','ldap_explode_dn','ldap_first_attribute', - 'ldap_first_entry','ldap_first_reference','ldap_free_result', - 'ldap_get_attributes','ldap_get_dn','ldap_get_entries', - 'ldap_get_option','ldap_get_values','ldap_get_values_len', - 'ldap_list','ldap_mod_add','ldap_mod_del','ldap_mod_replace', - 'ldap_modify','ldap_next_attribute','ldap_next_entry', - 'ldap_next_reference','ldap_parse_reference','ldap_parse_result', - 'ldap_read','ldap_rename','ldap_search','ldap_set_option', - 'ldap_sort','ldap_start_tls','ldap_unbind','levenshtein', - 'libxml_clear_errors','libxml_get_errors','libxml_get_last_error', - 'libxml_set_streams_context','libxml_use_internal_errors','link', - 'linkinfo','list','localeconv','localtime','log','log1p','log10', - 'long2ip','lstat','ltrim','lzf_compress','lzf_decompress', - 'lzf_optimized_for','magic_quotes_runtime','mail','max','mbereg', - 'mberegi','mberegi_replace','mbereg_match','mbereg_replace', - 'mbereg_search','mbereg_search_getpos','mbereg_search_getregs', - 'mbereg_search_init','mbereg_search_pos','mbereg_search_regs', - 'mbereg_search_setpos','mbregex_encoding','mbsplit','mbstrcut', - 'mbstrlen','mbstrpos','mbstrrpos','mbsubstr','mb_check_encoding', - 'mb_convert_case','mb_convert_encoding','mb_convert_kana', - 'mb_convert_variables','mb_decode_mimeheader', - 'mb_decode_numericentity','mb_detect_encoding','mb_detect_order', - 'mb_encode_mimeheader','mb_encode_numericentity','mb_ereg', - 'mb_eregi','mb_eregi_replace','mb_ereg_match','mb_ereg_replace', - 'mb_ereg_search','mb_ereg_search_getpos','mb_ereg_search_getregs', - 'mb_ereg_search_init','mb_ereg_search_pos','mb_ereg_search_regs', - 'mb_ereg_search_setpos','mb_get_info','mb_http_input', - 'mb_http_output','mb_internal_encoding','mb_language', - 'mb_list_encodings','mb_output_handler','mb_parse_str', - 'mb_preferred_mime_name','mb_regex_encoding','mb_regex_set_options', - 'mb_send_mail','mb_split','mb_strcut','mb_strimwidth','mb_stripos', - 'mb_stristr','mb_strlen','mb_strpos','mb_strrchr','mb_strrichr', - 'mb_strripos','mb_strrpos','mb_strstr','mb_strtolower', - 'mb_strtoupper','mb_strwidth','mb_substitute_character','mb_substr', - 'mb_substr_count','mcrypt_cbc','mcrypt_cfb','mcrypt_create_iv', - 'mcrypt_decrypt','mcrypt_ecb','mcrypt_enc_get_algorithms_name', - 'mcrypt_enc_get_block_size','mcrypt_enc_get_iv_size', - 'mcrypt_enc_get_key_size','mcrypt_enc_get_modes_name', - 'mcrypt_enc_get_supported_key_sizes', - 'mcrypt_enc_is_block_algorithm', - 'mcrypt_enc_is_block_algorithm_mode','mcrypt_enc_is_block_mode', - 'mcrypt_enc_self_test','mcrypt_encrypt','mcrypt_generic', - 'mcrypt_generic_deinit','mcrypt_generic_end','mcrypt_generic_init', - 'mcrypt_get_block_size','mcrypt_get_cipher_name', - 'mcrypt_get_iv_size','mcrypt_get_key_size','mcrypt_list_algorithms', - 'mcrypt_list_modes','mcrypt_module_close', - 'mcrypt_module_get_algo_block_size', - 'mcrypt_module_get_algo_key_size', - 'mcrypt_module_get_supported_key_sizes', - 'mcrypt_module_is_block_algorithm', - 'mcrypt_module_is_block_algorithm_mode', - 'mcrypt_module_is_block_mode','mcrypt_module_open', - 'mcrypt_module_self_test','mcrypt_ofb','md5','md5_file', - 'mdecrypt_generic','memcache_add','memcache_add_server', - 'memcache_close','memcache_connect','memcache_debug', - 'memcache_decrement','memcache_delete','memcache_flush', - 'memcache_get','memcache_get_extended_stats', - 'memcache_get_server_status','memcache_get_stats', - 'memcache_get_version','memcache_increment','memcache_pconnect', - 'memcache_replace','memcache_set','memcache_set_compress_threshold', - 'memcache_set_server_params','memory_get_peak_usage', - 'memory_get_usage','metaphone','mhash','mhash_count', - 'mhash_get_block_size','mhash_get_hash_name','mhash_keygen_s2k', - 'method_exists','microtime','mime_content_type','min', - 'ming_keypress','ming_setcubicthreshold','ming_setscale', - 'ming_useconstants','ming_useswfversion','mkdir','mktime', - 'money_format','move_uploaded_file','msql','msql_affected_rows', - 'msql_close','msql_connect','msql_create_db','msql_createdb', - 'msql_data_seek','msql_db_query','msql_dbname','msql_drop_db', - 'msql_dropdb','msql_error','msql_fetch_array','msql_fetch_field', - 'msql_fetch_object','msql_fetch_row','msql_field_flags', - 'msql_field_len','msql_field_name','msql_field_seek', - 'msql_field_table','msql_field_type','msql_fieldflags', - 'msql_fieldlen','msql_fieldname','msql_fieldtable','msql_fieldtype', - 'msql_free_result','msql_freeresult','msql_list_dbs', - 'msql_list_fields','msql_list_tables','msql_listdbs', - 'msql_listfields','msql_listtables','msql_num_fields', - 'msql_num_rows','msql_numfields','msql_numrows','msql_pconnect', - 'msql_query','msql_regcase','msql_result','msql_select_db', - 'msql_selectdb','msql_tablename','mssql_bind','mssql_close', - 'mssql_connect','mssql_data_seek','mssql_execute', - 'mssql_fetch_array','mssql_fetch_assoc','mssql_fetch_batch', - 'mssql_fetch_field','mssql_fetch_object','mssql_fetch_row', - 'mssql_field_length','mssql_field_name','mssql_field_seek', - 'mssql_field_type','mssql_free_result','mssql_free_statement', - 'mssql_get_last_message','mssql_guid_string','mssql_init', - 'mssql_min_error_severity','mssql_min_message_severity', - 'mssql_next_result','mssql_num_fields','mssql_num_rows', - 'mssql_pconnect','mssql_query','mssql_result','mssql_rows_affected', - 'mssql_select_db','mt_getrandmax','mt_rand','mt_srand','mysql', - 'mysql_affected_rows','mysql_client_encoding','mysql_close', - 'mysql_connect','mysql_createdb','mysql_create_db', - 'mysql_data_seek','mysql_dbname','mysql_db_name','mysql_db_query', - 'mysql_dropdb','mysql_drop_db','mysql_errno','mysql_error', - 'mysql_escape_string','mysql_fetch_array','mysql_fetch_assoc', - 'mysql_fetch_field','mysql_fetch_lengths','mysql_fetch_object', - 'mysql_fetch_row','mysql_fieldflags','mysql_fieldlen', - 'mysql_fieldname','mysql_fieldtable','mysql_fieldtype', - 'mysql_field_flags','mysql_field_len','mysql_field_name', - 'mysql_field_seek','mysql_field_table','mysql_field_type', - 'mysql_freeresult','mysql_free_result','mysql_get_client_info', - 'mysql_get_host_info','mysql_get_proto_info', - 'mysql_get_server_info','mysql_info','mysql_insert_id', - 'mysql_listdbs','mysql_listfields','mysql_listtables', - 'mysql_list_dbs','mysql_list_fields','mysql_list_processes', - 'mysql_list_tables','mysql_numfields','mysql_numrows', - 'mysql_num_fields','mysql_num_rows','mysql_pconnect','mysql_ping', - 'mysql_query','mysql_real_escape_string','mysql_result', - 'mysql_selectdb','mysql_select_db','mysql_set_charset','mysql_stat', - 'mysql_tablename','mysql_table_name','mysql_thread_id', - 'mysql_unbuffered_query','mysqli_affected_rows','mysqli_autocommit', - 'mysqli_bind_param','mysqli_bind_result','mysqli_change_user', - 'mysqli_character_set_name','mysqli_client_encoding','mysqli_close', - 'mysqli_commit','mysqli_connect','mysqli_connect_errno', - 'mysqli_connect_error','mysqli_data_seek','mysqli_debug', - 'mysqli_disable_reads_from_master','mysqli_disable_rpl_parse', - 'mysqli_dump_debug_info','mysqli_embedded_server_end', - 'mysqli_embedded_server_start','mysqli_enable_reads_from_master', - 'mysqli_enable_rpl_parse','mysqli_errno','mysqli_error', - 'mysqli_escape_string','mysqli_execute','mysqli_fetch', - 'mysqli_fetch_array','mysqli_fetch_assoc','mysqli_fetch_field', - 'mysqli_fetch_field_direct','mysqli_fetch_fields', - 'mysqli_fetch_lengths','mysqli_fetch_object','mysqli_fetch_row', - 'mysqli_field_count','mysqli_field_seek','mysqli_field_tell', - 'mysqli_free_result','mysqli_get_charset','mysqli_get_client_info', - 'mysqli_get_client_version','mysqli_get_host_info', - 'mysqli_get_metadata','mysqli_get_proto_info', - 'mysqli_get_server_info','mysqli_get_server_version', - 'mysqli_get_warnings','mysqli_info','mysqli_init', - 'mysqli_insert_id','mysqli_kill','mysqli_master_query', - 'mysqli_more_results','mysqli_multi_query','mysqli_next_result', - 'mysqli_num_fields','mysqli_num_rows','mysqli_options', - 'mysqli_param_count','mysqli_ping','mysqli_prepare','mysqli_query', - 'mysqli_real_connect','mysqli_real_escape_string', - 'mysqli_real_query','mysqli_report','mysqli_rollback', - 'mysqli_rpl_parse_enabled','mysqli_rpl_probe', - 'mysqli_rpl_query_type','mysqli_select_db','mysqli_send_long_data', - 'mysqli_send_query','mysqli_set_charset', - 'mysqli_set_local_infile_default','mysqli_set_local_infile_handler', - 'mysqli_set_opt','mysqli_slave_query','mysqli_sqlstate', - 'mysqli_ssl_set','mysqli_stat','mysqli_stmt_affected_rows', - 'mysqli_stmt_attr_get','mysqli_stmt_attr_set', - 'mysqli_stmt_bind_param','mysqli_stmt_bind_result', - 'mysqli_stmt_close','mysqli_stmt_data_seek','mysqli_stmt_errno', - 'mysqli_stmt_error','mysqli_stmt_execute','mysqli_stmt_fetch', - 'mysqli_stmt_field_count','mysqli_stmt_free_result', - 'mysqli_stmt_get_warnings','mysqli_stmt_init', - 'mysqli_stmt_insert_id','mysqli_stmt_num_rows', - 'mysqli_stmt_param_count','mysqli_stmt_prepare','mysqli_stmt_reset', - 'mysqli_stmt_result_metadata','mysqli_stmt_send_long_data', - 'mysqli_stmt_sqlstate','mysqli_stmt_store_result', - 'mysqli_store_result','mysqli_thread_id','mysqli_thread_safe', - 'mysqli_use_result','mysqli_warning_count','natcasesort','natsort', - 'new_xmldoc','next','ngettext','nl2br','nl_langinfo', - 'ntuser_getdomaincontroller','ntuser_getusergroups', - 'ntuser_getuserinfo','ntuser_getuserlist','number_format', - 'ob_clean','ob_deflatehandler','ob_end_clean','ob_end_flush', - 'ob_etaghandler','ob_flush','ob_get_clean','ob_get_contents', - 'ob_get_flush','ob_get_length','ob_get_level','ob_get_status', - 'ob_gzhandler','ob_iconv_handler','ob_implicit_flush', - 'ob_inflatehandler','ob_list_handlers','ob_start','ob_tidyhandler', - 'octdec','odbc_autocommit','odbc_binmode','odbc_close', - 'odbc_close_all','odbc_columnprivileges','odbc_columns', - 'odbc_commit','odbc_connect','odbc_cursor','odbc_data_source', - 'odbc_do','odbc_error','odbc_errormsg','odbc_exec','odbc_execute', - 'odbc_fetch_array','odbc_fetch_into','odbc_fetch_object', - 'odbc_fetch_row','odbc_field_len','odbc_field_name', - 'odbc_field_num','odbc_field_precision','odbc_field_scale', - 'odbc_field_type','odbc_foreignkeys','odbc_free_result', - 'odbc_gettypeinfo','odbc_longreadlen','odbc_next_result', - 'odbc_num_fields','odbc_num_rows','odbc_pconnect','odbc_prepare', - 'odbc_primarykeys','odbc_procedurecolumns','odbc_procedures', - 'odbc_result','odbc_result_all','odbc_rollback','odbc_setoption', - 'odbc_specialcolumns','odbc_statistics','odbc_tableprivileges', - 'odbc_tables','opendir','openlog','openssl_csr_export', - 'openssl_csr_export_to_file','openssl_csr_get_public_key', - 'openssl_csr_get_subject','openssl_csr_new','openssl_csr_sign', - 'openssl_error_string','openssl_free_key','openssl_get_privatekey', - 'openssl_get_publickey','openssl_open','openssl_pkcs12_export', - 'openssl_pkcs12_export_to_file','openssl_pkcs12_read', - 'openssl_pkcs7_decrypt','openssl_pkcs7_encrypt', - 'openssl_pkcs7_sign','openssl_pkcs7_verify','openssl_pkey_export', - 'openssl_pkey_export_to_file','openssl_pkey_free', - 'openssl_pkey_get_details','openssl_pkey_get_private', - 'openssl_pkey_get_public','openssl_pkey_new', - 'openssl_private_decrypt','openssl_private_encrypt', - 'openssl_public_decrypt','openssl_public_encrypt','openssl_seal', - 'openssl_sign','openssl_verify','openssl_x509_checkpurpose', - 'openssl_x509_check_private_key','openssl_x509_export', - 'openssl_x509_export_to_file','openssl_x509_free', - 'openssl_x509_parse','openssl_x509_read','ord', - 'output_add_rewrite_var','output_reset_rewrite_vars','overload', - 'outputdebugstring','pack','parse_ini_file','parse_str','parse_url', - 'parsekit_compile_file','parsekit_compile_string', - 'parsekit_func_arginfo','parsekit_opcode_flags', - 'parsekit_opcode_name','passthru','pathinfo','pclose', - 'pdf_add_bookmark','pdf_add_launchlink','pdf_add_locallink', - 'pdf_add_nameddest','pdf_add_note','pdf_add_pdflink', - 'pdf_add_thumbnail','pdf_add_weblink','pdf_arc','pdf_arcn', - 'pdf_attach_file','pdf_begin_font','pdf_begin_glyph', - 'pdf_begin_page','pdf_begin_pattern','pdf_begin_template', - 'pdf_circle','pdf_clip','pdf_close','pdf_close_image', - 'pdf_close_pdi','pdf_close_pdi_page','pdf_closepath', - 'pdf_closepath_fill_stroke','pdf_closepath_stroke','pdf_concat', - 'pdf_continue_text','pdf_create_gstate','pdf_create_pvf', - 'pdf_curveto','pdf_delete','pdf_delete_pvf','pdf_encoding_set_char', - 'pdf_end_font','pdf_end_glyph','pdf_end_page','pdf_end_pattern', - 'pdf_end_template','pdf_endpath','pdf_fill','pdf_fill_imageblock', - 'pdf_fill_pdfblock','pdf_fill_stroke','pdf_fill_textblock', - 'pdf_findfont','pdf_fit_image','pdf_fit_pdi_page', - 'pdf_fit_textline','pdf_get_apiname','pdf_get_buffer', - 'pdf_get_errmsg','pdf_get_errnum','pdf_get_parameter', - 'pdf_get_pdi_parameter','pdf_get_pdi_value','pdf_get_value', - 'pdf_initgraphics','pdf_lineto','pdf_load_font', - 'pdf_load_iccprofile','pdf_load_image','pdf_makespotcolor', - 'pdf_moveto','pdf_new','pdf_open_ccitt','pdf_open_file', - 'pdf_open_image','pdf_open_image_file','pdf_open_pdi', - 'pdf_open_pdi_page','pdf_place_image','pdf_place_pdi_page', - 'pdf_process_pdi','pdf_rect','pdf_restore','pdf_rotate','pdf_save', - 'pdf_scale','pdf_set_border_color','pdf_set_border_dash', - 'pdf_set_border_style','pdf_set_gstate','pdf_set_info', - 'pdf_set_parameter','pdf_set_text_pos','pdf_set_value', - 'pdf_setcolor','pdf_setdash','pdf_setdashpattern','pdf_setflat', - 'pdf_setfont','pdf_setlinecap','pdf_setlinejoin','pdf_setlinewidth', - 'pdf_setmatrix','pdf_setmiterlimit','pdf_setpolydash','pdf_shading', - 'pdf_shading_pattern','pdf_shfill','pdf_show','pdf_show_boxed', - 'pdf_show_xy','pdf_skew','pdf_stringwidth','pdf_stroke', - 'pdf_translate','pdo_drivers','pfsockopen','pg_affected_rows', - 'pg_cancel_query','pg_clientencoding','pg_client_encoding', - 'pg_close','pg_cmdtuples','pg_connect','pg_connection_busy', - 'pg_connection_reset','pg_connection_status','pg_convert', - 'pg_copy_from','pg_copy_to','pg_dbname','pg_delete','pg_end_copy', - 'pg_errormessage','pg_escape_bytea','pg_escape_string','pg_exec', - 'pg_execute','pg_fetch_all','pg_fetch_all_columns','pg_fetch_array', - 'pg_fetch_assoc','pg_fetch_object','pg_fetch_result','pg_fetch_row', - 'pg_fieldisnull','pg_fieldname','pg_fieldnum','pg_fieldprtlen', - 'pg_fieldsize','pg_fieldtype','pg_field_is_null','pg_field_name', - 'pg_field_num','pg_field_prtlen','pg_field_size','pg_field_table', - 'pg_field_type','pg_field_type_oid','pg_free_result', - 'pg_freeresult','pg_get_notify','pg_get_pid','pg_get_result', - 'pg_getlastoid','pg_host','pg_insert','pg_last_error', - 'pg_last_notice','pg_last_oid','pg_loclose','pg_locreate', - 'pg_loexport','pg_loimport','pg_loopen','pg_loread','pg_loreadall', - 'pg_lounlink','pg_lowrite','pg_lo_close','pg_lo_create', - 'pg_lo_export','pg_lo_import','pg_lo_open','pg_lo_read', - 'pg_lo_read_all','pg_lo_seek','pg_lo_tell','pg_lo_unlink', - 'pg_lo_write','pg_meta_data','pg_numfields','pg_numrows', - 'pg_num_fields','pg_num_rows','pg_options','pg_parameter_status', - 'pg_pconnect','pg_ping','pg_port','pg_prepare','pg_put_line', - 'pg_query','pg_query_params','pg_result','pg_result_error', - 'pg_result_error_field','pg_result_seek','pg_result_status', - 'pg_select','pg_send_execute','pg_send_prepare','pg_send_query', - 'pg_send_query_params','pg_set_client_encoding', - 'pg_set_error_verbosity','pg_setclientencoding','pg_trace', - 'pg_transaction_status','pg_tty','pg_unescape_bytea','pg_untrace', - 'pg_update','pg_version','php_egg_logo_guid','php_ini_loaded_file', - 'php_ini_scanned_files','php_logo_guid','php_real_logo_guid', - 'php_sapi_name','php_strip_whitespace','php_uname','phpcredits', - 'phpdoc_xml_from_string','phpinfo','phpversion','pi','png2wbmp', - 'pop3_close','pop3_delete_message','pop3_get_account_size', - 'pop3_get_message','pop3_get_message_count', - 'pop3_get_message_header','pop3_get_message_ids', - 'pop3_get_message_size','pop3_get_message_sizes','pop3_open', - 'pop3_undelete','popen','pos','posix_ctermid','posix_errno', - 'posix_getcwd','posix_getegid','posix_geteuid','posix_getgid', - 'posix_getgrgid','posix_getgrnam','posix_getgroups', - 'posix_getlogin','posix_getpgid','posix_getpgrp','posix_getpid', - 'posix_getppid','posix_getpwnam','posix_getpwuid','posix_getrlimit', - 'posix_getsid','posix_getuid','posix_get_last_error','posix_isatty', - 'posix_kill','posix_mkfifo','posix_setegid','posix_seteuid', - 'posix_setgid','posix_setpgid','posix_setsid','posix_setuid', - 'posix_strerror','posix_times','posix_ttyname','posix_uname','pow', - 'preg_grep','preg_last_error','preg_match','preg_match_all', - 'preg_quote','preg_replace','preg_replace_callback','preg_split', - 'prev','print_r','printf','proc_close','proc_get_status', - 'proc_open','proc_terminate','putenv','quoted_printable_decode', - 'quotemeta','rad2deg','radius_acct_open','radius_add_server', - 'radius_auth_open','radius_close','radius_config', - 'radius_create_request','radius_cvt_addr','radius_cvt_int', - 'radius_cvt_string','radius_demangle','radius_demangle_mppe_key', - 'radius_get_attr','radius_get_vendor_attr','radius_put_addr', - 'radius_put_attr','radius_put_int','radius_put_string', - 'radius_put_vendor_addr','radius_put_vendor_attr', - 'radius_put_vendor_int','radius_put_vendor_string', - 'radius_request_authenticator','radius_send_request', - 'radius_server_secret','radius_strerror','rand','range', - 'rawurldecode','rawurlencode','read_exif_data','readdir','readfile', - 'readgzfile','readlink','realpath','reg_close_key','reg_create_key', - 'reg_enum_key','reg_enum_value','reg_get_value','reg_open_key', - 'reg_set_value','register_shutdown_function', - 'register_tick_function','rename','res_close','res_get','res_list', - 'res_list_type','res_open','res_set','reset', - 'restore_error_handler','restore_include_path','rewind','rewinddir', - 'rmdir','round','rsort','rtrim','runkit_class_adopt', - 'runkit_class_emancipate','runkit_constant_add', - 'runkit_constant_redefine','runkit_constant_remove', - 'runkit_default_property_add','runkit_function_add', - 'runkit_function_copy','runkit_function_redefine', - 'runkit_function_remove','runkit_function_rename','runkit_import', - 'runkit_lint','runkit_lint_file','runkit_method_add', - 'runkit_method_copy','runkit_method_redefine', - 'runkit_method_remove','runkit_method_rename','runkit_object_id', - 'runkit_return_value_used','runkit_sandbox_output_handler', - 'runkit_superglobals','runkit_zval_inspect','scandir','sem_acquire', - 'sem_get','sem_release','sem_remove','serialize', - 'session_cache_expire','session_cache_limiter','session_commit', - 'session_decode','session_destroy','session_encode', - 'session_get_cookie_params','session_id','session_is_registered', - 'session_module_name','session_name','session_regenerate_id', - 'session_register','session_save_path','session_set_cookie_params', - 'session_set_save_handler','session_start','session_unregister', - 'session_unset','session_write_close','set_content', - 'set_error_handler','set_file_buffer','set_include_path', - 'set_magic_quotes_runtime','set_socket_blocking','set_time_limit', - 'setcookie','setlocale','setrawcookie','settype','sha1','sha1_file', - 'shell_exec','shmop_close','shmop_delete','shmop_open','shmop_read', - 'shmop_size','shmop_write','shm_attach','shm_detach','shm_get_var', - 'shm_put_var','shm_remove','shm_remove_var','show_source','shuffle', - 'similar_text','simplexml_import_dom','simplexml_load_file', - 'simplexml_load_string','sin','sinh','sizeof','sleep','smtp_close', - 'smtp_cmd_data','smtp_cmd_mail','smtp_cmd_rcpt','smtp_connect', - 'snmp_get_quick_print','snmp_get_valueretrieval','snmp_read_mib', - 'snmp_set_quick_print','snmp_set_valueretrieval','snmp2_get', - 'snmp2_getnext','snmp2_real_walk','snmp2_set','snmp2_walk', - 'snmp3_get','snmp3_getnext','snmp3_real_walk','snmp3_set', - 'snmp3_walk','snmpget','snmpgetnext','snmprealwalk','snmpset', - 'snmpwalk','snmpwalkoid','socket_accept','socket_bind', - 'socket_clear_error','socket_close','socket_connect', - 'socket_create','socket_create_listen','socket_create_pair', - 'socket_getopt','socket_getpeername','socket_getsockname', - 'socket_get_option','socket_get_status','socket_iovec_add', - 'socket_iovec_alloc','socket_iovec_delete','socket_iovec_fetch', - 'socket_iovec_free','socket_iovec_set','socket_last_error', - 'socket_listen','socket_read','socket_readv','socket_recv', - 'socket_recvfrom','socket_recvmsg','socket_select','socket_send', - 'socket_sendmsg','socket_sendto','socket_setopt','socket_set_block', - 'socket_set_blocking','socket_set_nonblock','socket_set_option', - 'socket_set_timeout','socket_shutdown','socket_strerror', - 'socket_write','socket_writev','sort','soundex','spl_autoload', - 'spl_autoload_call','spl_autoload_extensions', - 'spl_autoload_functions','spl_autoload_register', - 'spl_autoload_unregister','spl_classes','spl_object_hash','split', - 'spliti','sprintf','sql_regcase','sqlite_array_query', - 'sqlite_busy_timeout','sqlite_changes','sqlite_close', - 'sqlite_column','sqlite_create_aggregate','sqlite_create_function', - 'sqlite_current','sqlite_error_string','sqlite_escape_string', - 'sqlite_exec','sqlite_factory','sqlite_fetch_all', - 'sqlite_fetch_array','sqlite_fetch_column_types', - 'sqlite_fetch_object','sqlite_fetch_single','sqlite_fetch_string', - 'sqlite_field_name','sqlite_has_more','sqlite_has_prev', - 'sqlite_last_error','sqlite_last_insert_rowid','sqlite_libencoding', - 'sqlite_libversion','sqlite_next','sqlite_num_fields', - 'sqlite_num_rows','sqlite_open','sqlite_popen','sqlite_prev', - 'sqlite_query','sqlite_rewind','sqlite_seek','sqlite_single_query', - 'sqlite_udf_decode_binary','sqlite_udf_encode_binary', - 'sqlite_unbuffered_query','sqlite_valid','sqrt','srand','sscanf', - 'ssh2_auth_hostbased_file','ssh2_auth_none','ssh2_auth_password', - 'ssh2_auth_pubkey_file','ssh2_connect','ssh2_exec', - 'ssh2_fetch_stream','ssh2_fingerprint','ssh2_forward_accept', - 'ssh2_forward_listen','ssh2_methods_negotiated','ssh2_poll', - 'ssh2_publickey_add','ssh2_publickey_init','ssh2_publickey_list', - 'ssh2_publickey_remove','ssh2_scp_recv','ssh2_scp_send','ssh2_sftp', - 'ssh2_sftp_lstat','ssh2_sftp_mkdir','ssh2_sftp_readlink', - 'ssh2_sftp_realpath','ssh2_sftp_rename','ssh2_sftp_rmdir', - 'ssh2_sftp_stat','ssh2_sftp_symlink','ssh2_sftp_unlink', - 'ssh2_shell','ssh2_tunnel','stat','stats_absolute_deviation', - 'stats_cdf_beta','stats_cdf_binomial','stats_cdf_cauchy', - 'stats_cdf_chisquare','stats_cdf_exponential','stats_cdf_f', - 'stats_cdf_gamma','stats_cdf_laplace','stats_cdf_logistic', - 'stats_cdf_negative_binomial','stats_cdf_noncentral_chisquare', - 'stats_cdf_noncentral_f','stats_cdf_noncentral_t', - 'stats_cdf_normal','stats_cdf_poisson','stats_cdf_t', - 'stats_cdf_uniform','stats_cdf_weibull','stats_covariance', - 'stats_dens_beta','stats_dens_cauchy','stats_dens_chisquare', - 'stats_dens_exponential','stats_dens_f','stats_dens_gamma', - 'stats_dens_laplace','stats_dens_logistic','stats_dens_normal', - 'stats_dens_pmf_binomial','stats_dens_pmf_hypergeometric', - 'stats_dens_pmf_negative_binomial','stats_dens_pmf_poisson', - 'stats_dens_t','stats_dens_uniform','stats_dens_weibull', - 'stats_harmonic_mean','stats_kurtosis','stats_rand_gen_beta', - 'stats_rand_gen_chisquare','stats_rand_gen_exponential', - 'stats_rand_gen_f','stats_rand_gen_funiform','stats_rand_gen_gamma', - 'stats_rand_gen_ipoisson','stats_rand_gen_iuniform', - 'stats_rand_gen_noncenral_f','stats_rand_gen_noncentral_chisquare', - 'stats_rand_gen_noncentral_t','stats_rand_gen_normal', - 'stats_rand_gen_t','stats_rand_getsd','stats_rand_ibinomial', - 'stats_rand_ibinomial_negative','stats_rand_ignlgi', - 'stats_rand_phrase_to_seeds','stats_rand_ranf','stats_rand_setall', - 'stats_skew','stats_standard_deviation','stats_stat_binomial_coef', - 'stats_stat_correlation','stats_stat_factorial', - 'stats_stat_independent_t','stats_stat_innerproduct', - 'stats_stat_paired_t','stats_stat_percentile','stats_stat_powersum', - 'stats_variance','strcasecmp','strchr','strcmp','strcoll','strcspn', - 'stream_bucket_append','stream_bucket_make_writeable', - 'stream_bucket_new','stream_bucket_prepend','stream_context_create', - 'stream_context_get_default','stream_context_get_options', - 'stream_context_set_default','stream_context_set_option', - 'stream_context_set_params','stream_copy_to_stream', - 'stream_encoding','stream_filter_append','stream_filter_prepend', - 'stream_filter_register','stream_filter_remove', - 'stream_get_contents','stream_get_filters','stream_get_line', - 'stream_get_meta_data','stream_get_transports', - 'stream_get_wrappers','stream_is_local', - 'stream_notification_callback','stream_register_wrapper', - 'stream_resolve_include_path','stream_select','stream_set_blocking', - 'stream_set_timeout','stream_set_write_buffer', - 'stream_socket_accept','stream_socket_client', - 'stream_socket_enable_crypto','stream_socket_get_name', - 'stream_socket_pair','stream_socket_recvfrom', - 'stream_socket_sendto','stream_socket_server', - 'stream_socket_shutdown','stream_supports_lock', - 'stream_wrapper_register','stream_wrapper_restore', - 'stream_wrapper_unregister','strftime','stripcslashes','stripos', - 'stripslashes','strip_tags','stristr','strlen','strnatcasecmp', - 'strnatcmp','strpbrk','strncasecmp','strncmp','strpos','strrchr', - 'strrev','strripos','strrpos','strspn','strstr','strtok', - 'strtolower','strtotime','strtoupper','strtr','strval', - 'str_ireplace','str_pad','str_repeat','str_replace','str_rot13', - 'str_split','str_shuffle','str_word_count','substr', - 'substr_compare','substr_count','substr_replace','svn_add', - 'svn_auth_get_parameter','svn_auth_set_parameter','svn_cat', - 'svn_checkout','svn_cleanup','svn_client_version','svn_commit', - 'svn_diff','svn_export','svn_fs_abort_txn','svn_fs_apply_text', - 'svn_fs_begin_txn2','svn_fs_change_node_prop','svn_fs_check_path', - 'svn_fs_contents_changed','svn_fs_copy','svn_fs_delete', - 'svn_fs_dir_entries','svn_fs_file_contents','svn_fs_file_length', - 'svn_fs_is_dir','svn_fs_is_file','svn_fs_make_dir', - 'svn_fs_make_file','svn_fs_node_created_rev','svn_fs_node_prop', - 'svn_fs_props_changed','svn_fs_revision_prop', - 'svn_fs_revision_root','svn_fs_txn_root','svn_fs_youngest_rev', - 'svn_import','svn_info','svn_log','svn_ls','svn_repos_create', - 'svn_repos_fs','svn_repos_fs_begin_txn_for_commit', - 'svn_repos_fs_commit_txn','svn_repos_hotcopy','svn_repos_open', - 'svn_repos_recover','svn_status','svn_update','symlink', - 'sys_get_temp_dir','syslog','system','tan','tanh','tempnam', - 'textdomain','thread_get','thread_include','thread_lock', - 'thread_lock_try','thread_mutex_destroy','thread_mutex_init', - 'thread_set','thread_start','thread_unlock','tidy_access_count', - 'tidy_clean_repair','tidy_config_count','tidy_diagnose', - 'tidy_error_count','tidy_get_body','tidy_get_config', - 'tidy_get_error_buffer','tidy_get_head','tidy_get_html', - 'tidy_get_html_ver','tidy_get_output','tidy_get_release', - 'tidy_get_root','tidy_get_status','tidy_getopt','tidy_is_xhtml', - 'tidy_is_xml','tidy_parse_file','tidy_parse_string', - 'tidy_repair_file','tidy_repair_string','tidy_warning_count','time', - 'timezone_abbreviations_list','timezone_identifiers_list', - 'timezone_name_from_abbr','timezone_name_get','timezone_offset_get', - 'timezone_open','timezone_transitions_get','tmpfile', - 'token_get_all','token_name','touch','trigger_error', - 'transliterate','transliterate_filters_get','trim','uasort', - 'ucfirst','ucwords','uksort','umask','uniqid','unixtojd','unlink', - 'unpack','unregister_tick_function','unserialize','unset', - 'urldecode','urlencode','user_error','use_soap_error_handler', - 'usleep','usort','utf8_decode','utf8_encode','var_dump', - 'var_export','variant_abs','variant_add','variant_and', - 'variant_cast','variant_cat','variant_cmp', - 'variant_date_from_timestamp','variant_date_to_timestamp', - 'variant_div','variant_eqv','variant_fix','variant_get_type', - 'variant_idiv','variant_imp','variant_int','variant_mod', - 'variant_mul','variant_neg','variant_not','variant_or', - 'variant_pow','variant_round','variant_set','variant_set_type', - 'variant_sub','variant_xor','version_compare','virtual','vfprintf', - 'vprintf','vsprintf','wddx_add_vars','wddx_deserialize', - 'wddx_packet_end','wddx_packet_start','wddx_serialize_value', - 'wddx_serialize_vars','win_beep','win_browse_file', - 'win_browse_folder','win_create_link','win_message_box', - 'win_play_wav','win_shell_execute','win32_create_service', - 'win32_delete_service','win32_get_last_control_message', - 'win32_ps_list_procs','win32_ps_stat_mem','win32_ps_stat_proc', - 'win32_query_service_status','win32_scheduler_delete_task', - 'win32_scheduler_enum_tasks','win32_scheduler_get_task_info', - 'win32_scheduler_run','win32_scheduler_set_task_info', - 'win32_set_service_status','win32_start_service', - 'win32_start_service_ctrl_dispatcher','win32_stop_service', - 'wordwrap','xml_error_string','xml_get_current_byte_index', - 'xml_get_current_column_number','xml_get_current_line_number', - 'xml_get_error_code','xml_parse','xml_parser_create', - 'xml_parser_create_ns','xml_parser_free','xml_parser_get_option', - 'xml_parser_set_option','xml_parse_into_struct', - 'xml_set_character_data_handler','xml_set_default_handler', - 'xml_set_element_handler','xml_set_end_namespace_decl_handler', - 'xml_set_external_entity_ref_handler', - 'xml_set_notation_decl_handler','xml_set_object', - 'xml_set_processing_instruction_handler', - 'xml_set_start_namespace_decl_handler', - 'xml_set_unparsed_entity_decl_handler','xmldoc','xmldocfile', - 'xmlrpc_decode','xmlrpc_decode_request','xmlrpc_encode', - 'xmlrpc_encode_request','xmlrpc_get_type','xmlrpc_is_fault', - 'xmlrpc_parse_method_descriptions', - 'xmlrpc_server_add_introspection_data','xmlrpc_server_call_method', - 'xmlrpc_server_create','xmlrpc_server_destroy', - 'xmlrpc_server_register_introspection_callback', - 'xmlrpc_server_register_method','xmlrpc_set_type','xmltree', - 'xmlwriter_end_attribute','xmlwriter_end_cdata', - 'xmlwriter_end_comment','xmlwriter_end_document', - 'xmlwriter_end_dtd','xmlwriter_end_dtd_attlist', - 'xmlwriter_end_dtd_element','xmlwriter_end_dtd_entity', - 'xmlwriter_end_element','xmlwriter_end_pi','xmlwriter_flush', - 'xmlwriter_full_end_element','xmlwriter_open_memory', - 'xmlwriter_open_uri','xmlwriter_output_memory', - 'xmlwriter_set_indent','xmlwriter_set_indent_string', - 'xmlwriter_start_attribute','xmlwriter_start_attribute_ns', - 'xmlwriter_start_cdata','xmlwriter_start_comment', - 'xmlwriter_start_document','xmlwriter_start_dtd', - 'xmlwriter_start_dtd_attlist','xmlwriter_start_dtd_element', - 'xmlwriter_start_dtd_entity','xmlwriter_start_element', - 'xmlwriter_start_element_ns','xmlwriter_start_pi','xmlwriter_text', - 'xmlwriter_write_attribute','xmlwriter_write_attribute_ns', - 'xmlwriter_write_cdata','xmlwriter_write_comment', - 'xmlwriter_write_dtd','xmlwriter_write_dtd_attlist', - 'xmlwriter_write_dtd_element','xmlwriter_write_dtd_entity', - 'xmlwriter_write_element','xmlwriter_write_element_ns', - 'xmlwriter_write_pi','xmlwriter_write_raw','xpath_eval', - 'xpath_eval_expression','xpath_new_context','xpath_register_ns', - 'xpath_register_ns_auto','xptr_eval','xptr_new_context','yp_all', - 'yp_cat','yp_errno','yp_err_string','yp_first', - 'yp_get_default_domain','yp_master','yp_match','yp_next','yp_order', - 'zend_current_obfuscation_level','zend_get_cfg_var','zend_get_id', - 'zend_loader_current_file','zend_loader_enabled', - 'zend_loader_file_encoded','zend_loader_file_licensed', - 'zend_loader_install_license','zend_loader_version', - 'zend_logo_guid','zend_match_hostmasks','zend_obfuscate_class_name', - 'zend_obfuscate_function_name','zend_optimizer_version', - 'zend_runtime_obfuscate','zend_version','zip_close', - 'zip_entry_close','zip_entry_compressedsize', - 'zip_entry_compressionmethod','zip_entry_filesize','zip_entry_name', - 'zip_entry_open','zip_entry_read','zip_open','zip_read', - 'zlib_get_coding_type' - ), - 4 => array( - 'DEFAULT_INCLUDE_PATH', 'DIRECTORY_SEPARATOR', 'E_ALL', - 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_CORE_ERROR', - 'E_CORE_WARNING', 'E_ERROR', 'E_NOTICE', 'E_PARSE', 'E_STRICT', - 'E_USER_ERROR', 'E_USER_NOTICE', 'E_USER_WARNING', 'E_WARNING', - 'ENT_COMPAT','ENT_QUOTES','ENT_NOQUOTES', - 'false', 'null', 'PEAR_EXTENSION_DIR', 'PEAR_INSTALL_DIR', - 'PHP_BINDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_DATADIR', - 'PHP_EXTENSION_DIR', 'PHP_LIBDIR', - 'PHP_LOCALSTATEDIR', 'PHP_OS', - 'PHP_OUTPUT_HANDLER_CONT', 'PHP_OUTPUT_HANDLER_END', - 'PHP_OUTPUT_HANDLER_START', 'PHP_SYSCONFDIR', - 'PHP_VERSION', 'true', '__CLASS__', '__FILE__', '__FUNCTION__', - '__LINE__', '__METHOD__' - ) - ), - 'SYMBOLS' => array( - 1 => array( - '<'.'%', '<'.'%=', '%'.'>', '<'.'?', '<'.'?=', '?'.'>' - ), - 0 => array( - '(', ')', '[', ']', '{', '}', - '!', '@', '%', '&', '|', '/', - '<', '>', - '=', '-', '+', '*', - '.', ':', ',', ';' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #990000;', - 4 => 'color: #009900; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #666666; font-style: italic;', - 3 => 'color: #0000cc; font-style: italic;', - 4 => 'color: #009933; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 1 => 'color: #000099; font-weight: bold;', - 2 => 'color: #660099; font-weight: bold;', - 3 => 'color: #660099; font-weight: bold;', - 4 => 'color: #006699; font-weight: bold;', - 5 => 'color: #006699; font-weight: bold; font-style: italic;', - 6 => 'color: #009933; font-weight: bold;', - 'HARD' => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;', - 'HARD' => 'color: #0000ff;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;', - GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', - GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', - GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', - ), - 'METHODS' => array( - 1 => 'color: #004000;', - 2 => 'color: #004000;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;', - 1 => 'color: #000000; font-weight: bold;' - ), - 'REGEXPS' => array( - 0 => 'color: #000088;' - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://www.php.net/{FNAMEL}', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '->', - 2 => '::' - ), - 'REGEXPS' => array( - //Variables - 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*" - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - 0 => array( - '<'.'?php' => '?'.'>' - ), - 1 => array( - '<'.'?' => '?'.'>' - ), - 2 => array( - '<'.'%' => '%'.'>' - ), - 3 => array( - '' - ), - 4 => "/(?P<\\?(?>php\b)?)(?:". - "(?>[^\"'?\\/<]+)|". - "\\?(?!>)|". - "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|". - "(?>\"(?>[^\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|". - "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|". - "\\/\\/(?>.*?$)|". - "\\/(?=[^*\\/])|". - "<(?!<<)|". - "<<<(?P\w+)\s.*?\s\k". - ")*(?P\\?>|\Z)/sm", - 5 => "/(?P<%)(?:". - "(?>[^\"'%\\/<]+)|". - "%(?!>)|". - "(?>'(?>[^'\\\\]|\\\\'|\\\\\\\|\\\\)*')|". - "(?>\"(?>[^\\\"\\\\]|\\\\\"|\\\\\\\\|\\\\)*\")|". - "(?>\\/\\*(?>[^\\*]|(?!\\*\\/)\\*)*\\*\\/)|". - "\\/\\/(?>.*?$)|". - "\\/(?=[^*\\/])|". - "<(?!<<)|". - "<<<(?P\w+)\s.*?\s\k". - ")*(?P%>)/sm", - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true - ), - 'TAB_WIDTH' => 4 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/pic16.php b/_piecrust/libs/Geshi/geshi/pic16.php deleted file mode 100644 index 776a86d..0000000 --- a/_piecrust/libs/Geshi/geshi/pic16.php +++ /dev/null @@ -1,141 +0,0 @@ - 'PIC16', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - /*Instructions*/ - 1 => array( - 'addcf','adddcf','addlw','addwf','andlw','andwf','bc','bcf','bdc', - 'bnc','bndc','bnz','bsf','btfsc','btfss','bz','call','clrc','clrdc', - 'clrf','clrw','clrwdt','clrz','comf','decf','goto','incf','incfsz', - 'iorlw','iorwf','lcall','lgoto','movf','movfw','movlw','movwf', - 'option','negf','nop','retfie','retlw','return','rlf','rrf','setc', - 'setdc','setz','skpc','skpdc','skpnc','skpndc','skpnz','skpz', - 'sleep','subcf','subdcf','sublw','subwf','swapf','tris','tstf', - 'xorlw','xorwf' - ), - /*Registers*/ - 2 => array( - 'INDF','TMR0','OPTION','PCL','STATUS','FSR','PORTA','PORTB','PORTC', - 'PORTD','PORTE','PORTF','TRISA','TRISB','TRISC','TRISD','TRISE', - 'TRISF','PCLATH','INTCON','PIR1','PIE1','PCON','CMCON','VRCON', - 'F','W' - ), - /*Directives*/ - 3 => array( - '_BADRAM','BANKISEL','BANKSEL','CBLOCK','CODE','_CONFIG','CONSTANT', - 'DA','DATA','DB','DE','#DEFINE','DT','DW','ELSE','END','ENDC', - 'ENDIF','ENDM','ENDW','EQU','ERROR','ERRORLEVEL','EXITM','EXPAND', - 'EXTERN','FILL','GLOBAL','IDATA','_IDLOCS','IF','IFDEF','IFNDEF', - 'INCLUDE','#INCLUDE','LIST','LOCAL','MACRO','_MAXRAM','MESSG', - 'NOEXPAND','NOLIST','ORG','PAGE','PAGESEL','PROCESSOR','RADIX', - 'RES','SET','SPACE','SUBTITLE','TITLE','UDATA','UDATA_ACS', - 'UDATA_OVR','UDATA_SHR','#UNDEFINE','VARIABLE','WHILE', - 'D','H','O','B','A' - ), - ), - 'SYMBOLS' => array('=','.',',',':'), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000a0; font-weight: bold;', - 2 => 'color: #aa3300; font-weight: bold;', - 3 => 'color: #0000ff;', - ), - 'COMMENTS' => array( - 1 => 'color: #00a000;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #ff0000;' - ), - 'BRACKETS' => array( - 0 => 'color: #0000ff;' - ), - 'STRINGS' => array( - 0 => 'color: #ff7700;' - ), - 'NUMBERS' => array( - 0 => 'color: #ff7700;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #7777ff;' - ), - 'REGEXPS' => array(), - 'SCRIPT' => array() - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | - GESHI_NUMBER_BIN_SUFFIX | - GESHI_NUMBER_HEX_PREFIX | - GESHI_NUMBER_HEX_SUFFIX, - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "a-zA-Z0-9\$_\|\#>|^", - 'DISALLOWED_AFTER' => "a-zA-Z0-9_<\|%" - ) - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/pike.php b/_piecrust/libs/Geshi/geshi/pike.php deleted file mode 100644 index bc2843b..0000000 --- a/_piecrust/libs/Geshi/geshi/pike.php +++ /dev/null @@ -1,103 +0,0 @@ - 'Pike', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'goto', 'break', 'continue', 'return', 'case', 'default', 'if', - 'else', 'switch', 'while', 'foreach', 'do', 'for', 'gauge', - 'destruct', 'lambda', 'inherit', 'import', 'typeof', 'catch', - 'inline', 'nomask', 'private', 'protected', 'public', 'static' - ) - ), - 'SYMBOLS' => array( - 1 => array( - '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '%', '=', '!', '&', '|', '?', ';' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;', - ), - 'METHODS' => array( - 0 => 'color: #004000;' - ), - 'SYMBOLS' => array( - 1 => 'color: #339933;' - ), - 'REGEXPS' => array(), - 'SCRIPT' => array() - ), - 'URLS' => array(1 => ''), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array(1 => '.'), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array() -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/pixelbender.php b/_piecrust/libs/Geshi/geshi/pixelbender.php deleted file mode 100644 index 8cf0529..0000000 --- a/_piecrust/libs/Geshi/geshi/pixelbender.php +++ /dev/null @@ -1,176 +0,0 @@ - 'Pixel Bender 1.0', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'languageVersion', 'kernel' - ), - 2 => array( - 'import', 'parameter', 'dependent', 'const', 'input', 'output', - 'evaluatePixel', 'evaluateDependents', 'needed', 'changed', 'generated' - ), - 3 => array( - 'bool', 'bool2', 'bool3', 'bool4', 'int', 'int2', 'int3', 'int4', - 'float', 'float2', 'float3', 'float4', 'float2x2', 'float3x3', 'float4x4', - 'pixel2', 'pixel3', 'pixel4', 'region', 'image1', 'image2', 'image3', 'image4', - 'imageRef', 'void' - ), - 4 => array( - 'in', 'out', 'inout', 'if', 'else', 'for', 'while', 'do', 'break', - 'continue', 'return' - ), - 5 => array( - 'radians', 'degrees', 'sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'pow', - 'exp', 'exp2', 'log', 'log2', 'sqrt', 'inverseSqrt', 'abs', 'sign', 'floor', - 'ceil', 'fract', 'mod', 'min', 'max', 'step', 'clamp', 'mix', 'smoothStep', - 'length', 'distance', 'dot', 'cross', 'normalize', 'matrixCompMult', 'lessThan', - 'lessThanEqual', 'greaterThan', 'greaterThanEqual', 'equal', 'notEqual', 'any', - 'all', 'not', 'nowhere', 'everywhere', 'transform', 'union', 'intersect', - 'outset', 'inset', 'bounds', 'isEmpty', 'sample', 'sampleLinear', 'sampleNearest', - 'outCoord', 'dod', 'pixelSize', 'pixelAspectRatio' - ), - 6 => array( - 'namespace', 'vendor', 'version', 'minValue', 'maxValue', 'defaultValue', 'description' - ), - 7 => array( - '#if', '#endif', '#ifdef', '#elif', 'defined', '#define', - 'AIF_ATI', 'AIF_NVIDIA', 'AIF_FLASH_TARGET' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '!', '%', '&', '|', '+', '-', '*', '/', '=', '<', '>', '?', ':' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0033ff;', - 2 => 'color: #0033ff; font-weight: bold;', - 3 => 'color: #0033ff;', - 4 => 'color: #9900cc; font-weight: bold;', - 5 => 'color: #333333;', - 6 => 'color: #666666;', - 7 => 'color: #990000;', - ), - 'COMMENTS' => array( - 1 => 'color: #009900;', - 'MULTI' => 'color: #3f5fbf;' - ), - 'ESCAPE_CHAR' => array( - 0 => '' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #990000;' - ), - 'NUMBERS' => array( - 0 => 'color: #000000; font-weight:bold;' - ), - 'METHODS' => array( - 0 => 'color: #000000;', - ), - 'SYMBOLS' => array( - 0 => 'color: #000000; font-weight: bold;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array('.'), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array() -); - - -?> diff --git a/_piecrust/libs/Geshi/geshi/plsql.php b/_piecrust/libs/Geshi/geshi/plsql.php deleted file mode 100644 index 1a9378c..0000000 --- a/_piecrust/libs/Geshi/geshi/plsql.php +++ /dev/null @@ -1,256 +0,0 @@ - - * Copyright: (c) 2006 Victor Engmark (http://l0b0.net/) - * Release Version: 1.0.8.9 - * Date Started: 2006/10/26 - * - * Oracle 9.2 PL/SQL language file for GeSHi. - * Formatting is based on the default setup of TOAD 8.6. - * - * CHANGES - * ------- - * 2006/10/27 (1.0.0) - * - First Release - * - * TODO (updated 2006/10/27) - * ------------------------- - * * Add < and > to brackets - * * Remove symbols which are also comment delimiters / quote marks? - * - ************************************************************************************* - * - * This file is part of GeSHi. - * - * GeSHi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GeSHi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeSHi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - ************************************************************************************/ - -$language_data = array ( - 'LANG_NAME' => 'PL/SQL', - 'COMMENT_SINGLE' => array(1 =>'--'), //http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#2930 - 'COMMENT_MULTI' => array('/*' => '*/'), //http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#2950 - 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, - 'QUOTEMARKS' => array("'", '"'), //http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - //PL/SQL reserved keywords (http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/f_words.htm#LNPLS019) - 1 => array('ZONE', 'YEAR', 'WRITE', 'WORK', 'WITH', 'WHILE', 'WHERE', - 'WHENEVER', 'WHEN', 'VIEW', 'VARCHAR2', 'VARCHAR', 'VALUES', - 'VALIDATE', 'USE', 'UPDATE', 'UNIQUE', 'UNION', 'TYPE', 'TRUE', - 'TRIGGER', 'TO', 'TIMEZONE_REGION', 'TIMEZONE_MINUTE', 'TIMEZONE_HOUR', - 'TIMEZONE_ABBR', 'TIMESTAMP', 'TIME', 'THEN', 'TABLE', 'SYNONYM', - 'SUCCESSFUL', 'SUBTYPE', 'START', 'SQLERRM', 'SQLCODE', 'SQL', 'SPACE', - 'SMALLINT', 'SHARE', 'SET', 'SEPARATE', 'SELECT', 'SECOND', - 'SAVEPOINT', 'ROWTYPE', 'ROWNUM', 'ROWID', 'ROW', 'ROLLBACK', - 'REVERSE', 'RETURN', 'RELEASE', 'RECORD', 'REAL', 'RAW', 'RANGE', - 'RAISE', 'PUBLIC', 'PROCEDURE', 'PRIVATE', 'PRIOR', 'PRAGMA', - 'POSITIVEN', 'POSITIVE', 'PLS_INTEGER', 'PCTFREE', 'PARTITION', - 'PACKAGE', 'OUT', 'OTHERS', 'ORGANIZATION', 'ORDER', 'OR', 'OPTION', - 'OPERATOR', 'OPEN', 'OPAQUE', 'ON', 'OF', 'OCIROWID', 'NUMBER_BASE', - 'NUMBER', 'NULL', 'NOWAIT', 'NOT', 'NOCOPY', 'NEXTVAL', 'NEW', - 'NATURALN', 'NATURAL', 'MONTH', 'MODE', 'MLSLABEL', 'MINUTE', 'MINUS', - 'LOOP', 'LONG', 'LOCK', 'LIMITED', 'LIKE', 'LEVEL', 'JAVA', - 'ISOLATION', 'IS', 'INTO', 'INTERVAL', 'INTERSECT', 'INTERFACE', - 'INTEGER', 'INSERT', 'INDICATOR', 'INDEX', 'IN', 'IMMEDIATE', 'IF', - 'HOUR', 'HEAP', 'HAVING', 'GROUP', 'GOTO', 'FUNCTION', 'FROM', - 'FORALL', 'FOR', 'FLOAT', 'FETCH', 'FALSE', 'EXTENDS', 'EXIT', - 'EXISTS', 'EXECUTE', 'EXCLUSIVE', 'EXCEPTION', 'END', 'ELSIF', 'ELSE', - 'DROP', 'DO', 'DISTINCT', 'DESC', 'DELETE', 'DEFAULT', 'DECLARE', - 'DECIMAL', 'DAY', 'DATE', 'CURSOR', 'CURRVAL', 'CURRENT', 'CREATE', - 'CONSTANT', 'CONNECT', 'COMPRESS', 'COMMIT', 'COMMENT', 'COLLECT', - 'CLUSTER', 'CLOSE', 'CHECK', 'CHAR_BASE', 'CHAR', 'CASE', 'BY', 'BULK', - 'BOOLEAN', 'BODY', 'BINARY_INTEGER', 'BETWEEN', 'BEGIN', 'AUTHID', - 'AT', 'ASC', 'AS', 'ARRAY', 'ANY', 'AND', 'ALTER', 'ALL'), - //SQL functions (http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/toc.htm & http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/functions101a.htm#85925) - 2 => array('XMLTRANSFORM', 'XMLSEQUENCE', 'XMLFOREST', 'XMLELEMENT', - 'XMLCONCAT', 'XMLCOLATTVAL', 'XMLAGG', 'WIDTH_BUCKET', 'VSIZE', - 'VARIANCE', 'VAR_SAMP', 'VAR_POP', 'VALUE', 'USERENV', 'USER', 'UPPER', - 'UPDATEXML', 'UNISTR', 'UID', 'TZ_OFFSET', 'TRUNC', 'TRIM', 'TREAT', - 'TRANSLATE', 'TO_YMINTERVAL', 'TO_TIMESTAMP_TZ', 'TO_TIMESTAMP', - 'TO_SINGLE_BYTE', 'TO_NUMBER', 'TO_NCLOB', 'TO_NCHAR', 'TO_MULTI_BYTE', - 'TO_LOB', 'TO_DSINTERVAL', 'TO_DATE', 'TO_CLOB', 'TO_CHAR', 'TANH', - 'TAN', 'SYSTIMESTAMP', 'SYSDATE', 'SYS_XMLGEN', 'SYS_XMLAGG', - 'SYS_TYPEID', 'SYS_GUID', 'SYS_EXTRACT_UTC', 'SYS_DBURIGEN', - 'SYS_CONTEXT', 'SYS_CONNECT_BY_PATH', 'SUM', 'SUBSTR', 'STDDEV_SAMP', - 'STDDEV_POP', 'STDDEV', 'SQRT', 'SOUNDEX', 'SINH', 'SIN', 'SIGN', - 'SESSIONTIMEZONE', 'RTRIM', 'RPAD', 'ROWIDTONCHAR', 'ROWIDTOCHAR', - 'ROW_NUMBER', 'ROUND', 'REPLACE', 'REGR_SYY', 'REGR_SXY', 'REGR_SXX', - 'REGR_SLOPE', 'REGR_R2', 'REGR_INTERCEPT', 'REGR_COUNT', 'REGR_AVGY', - 'REGR_AVGX', 'REFTOHEX', 'REF', 'RAWTONHEX', 'RAWTOHEX', - 'RATIO_TO_REPORT', 'RANK', 'POWER', 'PERCENTILE_DISC', - 'PERCENTILE_CONT', 'PERCENT_RANK', 'PATH', 'NVL2', 'NVL', - 'NUMTOYMINTERVAL', 'NUMTODSINTERVAL', 'NULLIF', 'NTILE', 'NLSSORT', - 'NLS_UPPER', 'NLS_LOWER', 'NLS_INITCAP', 'NLS_CHARSET_NAME', - 'NLS_CHARSET_ID', 'NLS_CHARSET_DECL_LEN', 'NEXT_DAY', 'NEW_TIME', - 'NCHR', 'MONTHS_BETWEEN', 'MOD', 'MIN', 'MAX', 'MAKE_REF', 'LTRIM', - 'LPAD', 'LOWER', 'LOG', 'LOCALTIMESTAMP', 'LN', 'LENGTH', 'LEAST', - 'LEAD', 'LAST_VALUE', 'LAST_DAY', 'LAST', 'LAG', 'INSTR', 'INITCAP', - 'HEXTORAW', 'GROUPING_ID', 'GROUPING', 'GROUP_ID', 'GREATEST', - 'FROM_TZ', 'FLOOR', 'FIRST_VALUE', 'FIRST', 'EXTRACTVALUE', 'EXTRACT', - 'EXP', 'EXISTSNODE', 'EMPTY_CLOB', 'EMPTY_BLOB', 'DUMP', 'DEREF', - 'DEPTH', 'DENSE_RANK', 'DECOMPOSE', 'DECODE', 'DBTIMEZONE', - 'CURRENT_TIMESTAMP', 'CURRENT_DATE', 'CUME_DIST', 'COVAR_SAMP', - 'COVAR_POP', 'COUNT', 'COSH', 'COS', 'CORR', 'CONVERT', 'CONCAT', - 'COMPOSE', 'COALESCE', 'CHR', 'CHARTOROWID', 'CEIL', 'CAST', 'BITAND', - 'BIN_TO_NUM', 'BFILENAME', 'AVG', 'ATAN2', 'ATAN', 'ASIN', 'ASCIISTR', - 'ASCII', 'ADD_MONTHS', 'ACOS', 'ABS'), - //PL/SQL packages (http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96612/intro2.htm#1025672) - 3 => array('UTL_URL', 'UTL_TCP', 'UTL_SMTP', 'UTL_REF', 'UTL_RAW', - 'UTL_PG', 'UTL_INADDR', 'UTL_HTTP', 'UTL_FILE', 'UTL_ENCODE', - 'UTL_COLL', 'SDO_UTIL', 'SDO_TUNE', 'SDO_MIGRATE', 'SDO_LRS', - 'SDO_GEOM', 'SDO_CS', 'DMBS_XMLQUERY', 'DMBS_FLASHBACK', - 'DMBS_DEFER_SYS', 'DEBUG_EXTPROC', 'DBMS_XSLPROCESSOR', 'DBMS_XPLAN', - 'DBMS_XMLSCHEMA', 'DBMS_XMLSAVE', 'DBMS_XMLPARSER', 'DBMS_XMLGEN', - 'DBMS_XMLDOM', 'DBMS_XDBT', 'DBMS_XDB_VERSION', 'DBMS_XDB', 'DBMS_WM', - 'DBMS_UTILITY', 'DBMS_TYPES', 'DBMS_TTS', 'DBMS_TRANSFORM', - 'DBMS_TRANSACTION', 'DBMS_TRACE', 'DBMS_STRM_A', 'DBMS_STRM', - 'DBMS_STORAGE_MAP', 'DBMS_STATS', 'DBMS_SQL', 'DBMS_SPACE_ADMIN', - 'DBMS_SPACE', 'DBMS_SHARED_POOL', 'DBMS_SESSION', 'DBMS_RULE_ADM', - 'DBMS_RULE', 'DBMS_ROWID', 'DBMS_RLS', 'DBMS_RESUMABLE', - 'DBMS_RESOURCE_MANAGER_PRIVS', 'DBMS_RESOURCE_MANAGER', 'DBMS_REPUTIL', - 'DBMS_REPCAT_RGT', 'DBMS_REPCAT_INSTATIATE', 'DBMS_REPCAT_ADMIN', - 'DBMS_REPCAT', 'DBMS_REPAIR', 'DBMS_REFRESH', 'DBMS_REDEFINITION', - 'DBMS_RECTIFIER_DIFF', 'DBMS_RANDOM', 'DBMS_PROPAGATION_ADM', - 'DBMS_PROFILER', 'DBMS_PIPE', 'DBMS_PCLXUTIL', 'DBMS_OUTPUT', - 'DBMS_OUTLN_EDIT', 'DBMS_OUTLN', 'DBMS_ORACLE_TRACE_USER', - 'DBMS_ORACLE_TRACE_AGENT', 'DBMS_OLAP', 'DBMS_OFFLINE_SNAPSHOT', - 'DBMS_OFFLINE_OG', 'DBMS_ODCI', 'DBMS_OBFUSCATION_TOOLKIT', - 'DBMS_MVIEW', 'DBMS_MGWMSG', 'DBMS_MGWADM', 'DBMS_METADATA', - 'DBMS_LOGSTDBY', 'DBMS_LOGMNR_D', 'DBMS_LOGMNR_CDC_SUBSCRIBE', - 'DBMS_LOGMNR_CDC_PUBLISH', 'DBMS_LOGMNR', 'DBMS_LOCK', 'DBMS_LOB', - 'DBMS_LIBCACHE', 'DBMS_LDAP', 'DBMS_JOB', 'DBMS_IOT', - 'DBMS_HS_PASSTHROUGH', 'DBMS_FGA', 'DBMS_DISTRIBUTED_TRUST_ADMIN', - 'DBMS_DESCRIBE', 'DBMS_DEFER_QUERY', 'DBMS_DEFER', 'DBMS_DEBUG', - 'DBMS_DDL', 'DBMS_CAPTURE_ADM', 'DBMS_AW', 'DBMS_AQELM', 'DBMS_AQADM', - 'DBMS_AQ', 'DBMS_APPLY_ADM', 'DBMS_APPLICATION_INFO', 'DBMS_ALERT', - 'CWM2_OLAP_AW_ACCESS'), - //PL/SQL predefined exceptions (http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/07_errs.htm#784) - 4 => array('ZERO_DIVIDE', 'VALUE_ERROR', 'TOO_MANY_ROWS', - 'TIMEOUT_ON_RESOURCE', 'SYS_INVALID_ROWID', 'SUBSCRIPT_OUTSIDE_LIMIT', - 'SUBSCRIPT_BEYOND_COUNT', 'STORAGE_ERROR', 'SELF_IS_NULL', - 'ROWTYPE_MISMATCH', 'PROGRAM_ERROR', 'NOT_LOGGED_ON', 'NO_DATA_FOUND', - 'LOGIN_DENIED', 'INVALID_NUMBER', 'INVALID_CURSOR', 'DUP_VAL_ON_INDEX', - 'CURSOR_ALREADY_OPEN', 'COLLECTION_IS_NULL', 'CASE_NOT_FOUND', - 'ACCESS_INTO_NULL'), - //Static data dictionary views (http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96536/ch2.htm) - 5 => array('USER_REPSITES', 'USER_REPSCHEMA', - 'USER_REPRESOLUTION_STATISTICS', 'USER_REPRESOLUTION_METHOD', - 'USER_REPRESOLUTION', 'USER_REPRESOL_STATS_CONTROL', 'USER_REPPROP', - 'USER_REPPRIORITY_GROUP', 'USER_REPPRIORITY', - 'USER_REPPARAMETER_COLUMN', 'USER_REPOBJECT', 'USER_REPKEY_COLUMNS', - 'USER_REPGROUPED_COLUMN', 'USER_REPGROUP_PRIVILEGES', 'USER_REPGROUP', - 'USER_REPGENOBJECTS', 'USER_REPGENERATED', 'USER_REPFLAVORS', - 'USER_REPFLAVOR_OBJECTS', 'USER_REPFLAVOR_COLUMNS', 'USER_REPDDL', - 'USER_REPCONFLICT', 'USER_REPCOLUMN_GROUP', 'USER_REPCOLUMN', - 'USER_REPCATLOG', 'USER_REPCAT_USER_PARM_VALUES', - 'USER_REPCAT_USER_AUTHORIZATIONS', 'USER_REPCAT_TEMPLATE_SITES', - 'USER_REPCAT_TEMPLATE_PARMS', 'USER_REPCAT_TEMPLATE_OBJECTS', - 'USER_REPCAT_REFRESH_TEMPLATES', 'USER_REPCAT', 'USER_REPAUDIT_COLUMN', - 'USER_REPAUDIT_ATTRIBUTE', 'DBA_REPSITES_NEW', 'DBA_REPSITES', - 'DBA_REPSCHEMA', 'DBA_REPRESOLUTION_STATISTICS', - 'DBA_REPRESOLUTION_METHOD', 'DBA_REPRESOLUTION', - 'DBA_REPRESOL_STATS_CONTROL', 'DBA_REPPROP', 'DBA_REPPRIORITY_GROUP', - 'DBA_REPPRIORITY', 'DBA_REPPARAMETER_COLUMN', 'DBA_REPOBJECT', - 'DBA_REPKEY_COLUMNS', 'DBA_REPGROUPED_COLUMN', - 'DBA_REPGROUP_PRIVILEGES', 'DBA_REPGROUP', 'DBA_REPGENOBJECTS', - 'DBA_REPGENERATED', 'DBA_REPFLAVORS', 'DBA_REPFLAVOR_OBJECTS', - 'DBA_REPFLAVOR_COLUMNS', 'DBA_REPEXTENSIONS', 'DBA_REPDDL', - 'DBA_REPCONFLICT', 'DBA_REPCOLUMN_GROUP', 'DBA_REPCOLUMN', - 'DBA_REPCATLOG', 'DBA_REPCAT_USER_PARM_VALUES', - 'DBA_REPCAT_USER_AUTHORIZATIONS', 'DBA_REPCAT_TEMPLATE_SITES', - 'DBA_REPCAT_TEMPLATE_PARMS', 'DBA_REPCAT_TEMPLATE_OBJECTS', - 'DBA_REPCAT_REFRESH_TEMPLATES', 'DBA_REPCAT_EXCEPTIONS', 'DBA_REPCAT', - 'DBA_REPAUDIT_COLUMN', 'DBA_REPAUDIT_ATTRIBUTE', 'ALL_REPSITES', - 'ALL_REPSCHEMA', 'ALL_REPRESOLUTION_STATISTICS', - 'ALL_REPRESOLUTION_METHOD', 'ALL_REPRESOLUTION', - 'ALL_REPRESOL_STATS_CONTROL', 'ALL_REPPROP', 'ALL_REPPRIORITY_GROUP', - 'ALL_REPPRIORITY', 'ALL_REPPARAMETER_COLUMN', 'ALL_REPOBJECT', - 'ALL_REPKEY_COLUMNS', 'ALL_REPGROUPED_COLUMN', - 'ALL_REPGROUP_PRIVILEGES', 'ALL_REPGROUP', 'ALL_REPGENOBJECTS', - 'ALL_REPGENERATED', 'ALL_REPFLAVORS', 'ALL_REPFLAVOR_OBJECTS', - 'ALL_REPFLAVOR_COLUMNS', 'ALL_REPDDL', 'ALL_REPCONFLICT', - 'ALL_REPCOLUMN_GROUP', 'ALL_REPCOLUMN', 'ALL_REPCATLOG', - 'ALL_REPCAT_USER_PARM_VALUES', 'ALL_REPCAT_USER_AUTHORIZATIONS', - 'ALL_REPCAT_TEMPLATE_SITES', 'ALL_REPCAT_TEMPLATE_PARMS', - 'ALL_REPCAT_TEMPLATE_OBJECTS', 'ALL_REPCAT_REFRESH_TEMPLATES', - 'ALL_REPCAT', 'ALL_REPAUDIT_COLUMN', 'ALL_REPAUDIT_ATTRIBUTE') - ), - 'SYMBOLS' => array( - //PL/SQL delimiters (http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#2732) - '+', '%', "'", '.', '/', '(', ')', ':', ',', '*', '"', '=', '<', '>', '@', ';', '-', ':=', '=>', '||', '**', '<<', '>>', '/*', '*/', '..', '<>', '!=', '~=', '^=', '<=', '>=' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #00F;', - 2 => 'color: #000;', - 3 => 'color: #00F;', - 4 => 'color: #F00;', - 5 => 'color: #800;' - ), - 'COMMENTS' => array( - 1 => 'color: #080; font-style: italic;', - 'MULTI' => 'color: #080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #00F;' - ), - 'STRINGS' => array( - 0 => 'color: #F00;' - ), - 'NUMBERS' => array( - 0 => 'color: #800;' - ), - 'METHODS' => array( - 0 => 'color: #0F0;' - ), - 'SYMBOLS' => array( - 0 => 'color: #00F;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - 0 => 'color: #0F0;' - ) - ), - 'URLS' => array( - 1 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAMEU}', - 2 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAMEU}', - 3 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAMEU}', - 4 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAMEU}', - 5 => 'http://www.oracle.com/pls/db92/db92.drilldown?word={FNAMEU}' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array() -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/postgresql.php b/_piecrust/libs/Geshi/geshi/postgresql.php deleted file mode 100644 index c0decd0..0000000 --- a/_piecrust/libs/Geshi/geshi/postgresql.php +++ /dev/null @@ -1,288 +0,0 @@ - 2010-05-03 - * Copyright: (c) 2007 Christophe Chauvet (http://kryskool.org/), Nigel McNie (http://qbnz.com/highlighter) - * Release Version: 1.0.8.9 - * Date Started: 2007/07/20 - * - * PostgreSQL language file for GeSHi. - * - * CHANGES - * ------- - * 2007/07/20 (1.0.0) - * - First Release - * - * TODO (updated 2007/07/20) - * ------------------------- - * - ************************************************************************************* - * - * This file is part of GeSHi. - * - * GeSHi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GeSHi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeSHi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - ************************************************************************************/ - -$language_data = array ( - 'LANG_NAME' => 'PostgreSQL', - 'COMMENT_SINGLE' => array(1 => '--'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"', '`'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - //Put PostgreSQL reserved keywords here. I like mine uppercase. - 1 => array( - 'ABORT','ABSOLUTE','ACCESS','ACTION','ADD','ADMIN','AFTER', - 'AGGREGATE','ALL','ALSO','ALTER','ALWAYS','ANALYSE','ANALYZE','AND', - 'ANY','AS','ASC,','ASSERTION','ASSIGNMENT','ASYMMETRIC','AT', - 'AUTHORIZATION','BACKWARD','BEFORE','BEGIN','BETWEEN','BOTH','BY', - 'CACHE','CALLED','CASCADE','CASCADED','CASE','CAST','CATALOG', - 'CHAIN','CHARACTERISTICS','CHECK','CHECKPOINT','CLASS','CLOSE', - 'CLUSTER','COALESCE','COLLATE','COLUMN','COMMENT','COMMIT', - 'COMMITTED','CONCURRENTLY','CONFIGURATION','CONNECTION', - 'CONSTRAINT','CONSTRAINTS','CONTENT','CONTINUE','CONVERSION','COPY', - 'COST','CREATE','CREATEDB','CREATEROLE','CREATEUSER','CROSS','CSV', - 'CURRENT','CURRENT_CATALOG','CURRENT_DATE','CURRENT_ROLE', - 'CURRENT_SCHEMA','CURRENT_TIME','CURRENT_TIMESTAMP','CURRENT_USER', - 'CURSOR','CYCLE','DATA','DATABASE','DAY','DEALLOCATE','DEC', - 'DECLARE','DEFAULT','DEFAULTS','DEFERRABLE','DEFERRED','DEFINER', - 'DELETE','DELIMITER','DELIMITERS','DESC','DICTIONARY','DISABLE', - 'DISCARD','DISTINCT','DO','DOCUMENT','DOMAIN','DOUBLE','DROP', - 'EACH','ELSE','ENABLE','ENCODING','ENCRYPTED','END','ESCAPE', - 'EXCEPT','EXCLUDING','EXCLUSIVE','EXECUTE','EXISTS','EXPLAIN', - 'EXTERNAL','EXTRACT','FALSE','FAMILY','FETCH','FIRST','FOLLOWING', - 'FOR','FORCE','FOREIGN','FORWARD','FREEZE','FROM','FULL','FUNCTION', - 'GLOBAL','GRANT','GRANTED','GREATEST','GROUP','HANDLER','HAVING', - 'HEADER','HOLD','HOUR','IDENTITY','IF','ILIKE','IMMEDIATE', - 'IMMUTABLE','IMPLICIT','IN','INCLUDING','INCREMENT','INDEX', - 'INDEXES','INHERIT','INHERITS','INITIALLY','INNER','INOUT','INPUT', - 'INSENSITIVE','INSERT','INSTEAD','INTERSECT','INTO','INVOKER','IS', - 'ISNULL','ISOLATION','JOIN','KEY','LANCOMPILER','LANGUAGE','LARGE', - 'LAST','LC_COLLATE','LC_CTYPE','LEADING','LEAST','LEFT','LEVEL', - 'LIKE','LIMIT','LISTEN','LOAD','LOCAL','LOCALTIME','LOCALTIMESTAMP', - 'LOCATION','LOCK','LOGIN','LOOP','MAPPING','MATCH','MAXVALUE', - 'MINUTE','MINVALUE','MODE','MONTH','MOVE','NAME','NAMES','NATIONAL', - 'NATURAL','NEW','NEXT','NO','NOCREATEDB','NOCREATEROLE', - 'NOCREATEUSER','NOINHERIT','NOLOGIN','NONE','NOSUPERUSER','NOT', - 'NOTHING','NOTIFY','NOTNULL','NOWAIT','NULL','NULLIF','NULLS', - 'NUMERIC','OBJECT','OF','OFF','OFFSET','OIDS','OLD','ON','ONLY', - 'OPERATOR','OPTION','OPTIONS','OR','ORDER','OUT','OUTER','OVER', - 'OVERLAPS','OVERLAY','OWNED','OWNER','PARSER','PARTIAL','PARTITION', - 'PASSWORD','PLACING','PLANS','POSITION','PRECEDING','PRECISION', - 'PREPARE','PREPARED','PRESERVE','PRIMARY','PRIOR','PRIVILEGES', - 'PROCEDURAL','PROCEDURE','QUOTE','RANGE','READ','REASSIGN', - 'RECHECK','RECURSIVE','REFERENCES','REINDEX','RELATIVE','RELEASE', - 'RENAME','REPEATABLE','REPLACE','REPLICA','RESET','RESTART', - 'RESTRICT','RETURN','RETURNING','RETURNS','REVOKE','RIGHT','ROLE', - 'ROLLBACK','ROW','ROWS','RULE','SAVEPOINT','SCHEMA','SCROLL', - 'SEARCH','SECOND', - 'SECURITY','SELECT','SEQUENCE','SERIALIZABLE','SERVER','SESSION', - 'SESSION_USER','SET','SETOF','SHARE','SHOW','SIMILAR','SIMPLE', - 'SOME','STABLE','STANDALONE','START','STATEMENT','STATISTICS', - 'STDIN','STDOUT','STORAGE','STRICT','STRIP','SUPERUSER', - 'SYMMETRIC','SYSID','SYSTEM','TABLE','TABLESPACE','TEMP','TEMPLATE', - 'TEMPORARY','THEN','TO','TRAILING','TRANSACTION','TREAT','TRIGGER', - 'TRUE','TRUNCATE','TRUSTED','TYPE','UNBOUNDED','UNCOMMITTED', - 'UNENCRYPTED','UNION','UNIQUE','UNKNOWN','UNLISTEN','UNTIL', - 'UPDATE','USER','USING','VACUUM','VALID','VALIDATOR','VALUE', - 'VALUES','VARIADIC','VERBOSE','VERSION','VIEW','VOLATILE','WHEN', - 'WHERE','WHILE','WHITESPACE','WINDOW','WITH','WITHOUT','WORK','WRAPPER', - 'WRITE','XMLATTRIBUTES','XMLCONCAT','XMLELEMENT','XMLFOREST', - 'XMLPARSE','XMLPI','XMLROOT','XMLSERIALIZE','YEAR','YES','ZONE' - ), - - //Put functions here - 3 => array( - // mathematical functions - 'ABS','CBRT','CEIL','CEILING','DEGREES','DIV','EXP','FLOOR','LN', - 'LOG','MOD','PI','POWER','RADIANS','RANDOM','ROUND','SETSEED', - 'SIGN','SQRT','TRUNC','WIDTH_BUCKET', - // trigonometric functions - 'ACOS','ASIN','ATAN','ATAN2','COS','COT','SIN','TAN', - // string functions - 'BIT_LENGTH','CHAR_LENGTH','CHARACTER_LENGTH','LOWER', - 'OCTET_LENGTH','POSITION','SUBSTRING','TRIM','UPPER', - // other string functions - 'ASCII','BTRIM','CHR','CONVERT','CONVERT_FROM','CONVERT_TO', - 'DECODE','ENCODE','INITCAP','LENGTH','LPAD','LTRIM','MD5', - 'PG_CLIENT_ENCODING','QUOTE_IDENT','QUOTE_LITERAL','QUOTE_NULLABLE', - 'REGEXP_MATCHES','REGEXP_REPLACE','REGEXP_SPLIT_TO_ARRAY', - 'REGEXP_SPLIT_TO_TABLE','REPEAT','RPAD','RTRIM','SPLIT_PART', - 'STRPOS','SUBSTR','TO_ASCII','TO_HEX','TRANSLATE', - // binary string functions - 'GET_BIT','GET_BYTE','SET_BIT','SET_BYTE', - // data type formatting functions - 'TO_CHAR','TO_DATE','TO_NUMBER','TO_TIMESTAMP', - // date/time functions - 'AGE','CLOCK_TIMESTAMP','DATE_PART','DATE_TRUNC','EXTRACT', - 'ISFINITE','JUSTIFY_DAYS','JUSTIFY_HOURS','JUSTIFY_INTERVAL','NOW', - 'STATEMENT_TIMESTAMP','TIMEOFDAY','TRANSACTION_TIMESTAMP', - // enum support functions - 'ENUM_FIRST','ENUM_LAST','ENUM_RANGE', - // geometric functions - 'AREA','CENTER','DIAMETER','HEIGHT','ISCLOSED','ISOPEN','NPOINTS', - 'PCLOSE','POPEN','RADIUS','WIDTH', - 'BOX','CIRCLE','LSEG','PATH','POINT','POLYGON', - // cidr and inet functions - 'ABBREV','BROADCAST','FAMILY','HOST','HOSTMASK','MASKLEN','NETMASK', - 'NETWORK','SET_MASKLEN', - // text search functions - 'TO_TSVECTOR','SETWEIGHT','STRIP','TO_TSQUERY','PLAINTO_TSQUERY', - 'NUMNODE','QUERYTREE','TS_RANK','TS_RANK_CD','TS_HEADLINE', - 'TS_REWRITE','GET_CURRENT_TS_CONFIG','TSVECTOR_UPDATE_TRIGGER', - 'TSVECTOR_UPDATE_TRIGGER_COLUMN', - 'TS_DEBUG','TS_LEXISE','TS_PARSE','TS_TOKEN_TYPE','TS_STAT', - // XML functions - 'XMLCOMMENT','XMLCONCAT','XMLELEMENT','XMLFOREST','XMLPI','XMLROOT', - 'XMLAGG','XPATH','TABLE_TO_XMLSCHEMA','QUERY_TO_XMLSCHEMA', - 'CURSOR_TO_XMLSCHEMA','TABLE_TO_XML_AND_XMLSCHEMA', - 'QUERY_TO_XML_AND_XMLSCHEMA','SCHEMA_TO_XML','SCHEMA_TO_XMLSCHEMA', - 'SCHEMA_TO_XML_AND_XMLSCHEMA','DATABASE_TO_XML', - 'DATABASE_TO_XMLSCHEMA','DATABASE_TO_XML_AND_XMLSCHEMA', - // sequence manipulating functions - 'CURRVAL','LASTVAL','NEXTVAL','SETVAL', - // conditional expressions - 'COALESCE','NULLIF','GREATEST','LEAST', - // array functions - 'ARRAY_APPEND','ARRAY_CAT','ARRAY_NDIMS','ARRAY_DIMS','ARRAY_FILL', - 'ARRAY_LENGTH','ARRAY_LOWER','ARRAY_PREPEND','ARRAY_TO_STRING', - 'ARRAY_UPPER','STRING_TO_ARRAY','UNNEST', - // aggregate functions - 'ARRAY_AGG','AVG','BIT_AND','BIT_OR','BOOL_AND','BOOL_OR','COUNT', - 'EVERY','MAX','MIN','STRING_AGG','SUM', - // statistic aggregate functions - 'CORR','COVAR_POP','COVAR_SAMP','REGR_AVGX','REGR_AVGY', - 'REGR_COUNT','REGR_INTERCEPT','REGR_R2','REGR_SLOPE','REGR_SXX', - 'REGR_SXY','REGR_SYY','STDDEV','STDDEV_POP','STDDEV_SAMP', - 'VARIANCE','VAR_POP','VAR_SAMP', - // window functions - 'ROW_NUMBER','RANK','DENSE_RANK','PERCENT_RANK','CUME_DIST','NTILE', - 'LAG','LEAD','FIRST_VALUE','LAST_VALUE','NTH_VALUE', - // set returning functions - 'GENERATE_SERIES','GENERATE_SUBSCRIPTS' - // system information functions not currently included - ), - - //Put your postgresql var - 4 => array( - 'client_encoding', - 'standard_conforming_strings' - ), - - //Put your data types here - 5 => array( - 'ARRAY','ABSTIME','BIGINT','BIGSERIAL','BINARY','BIT','BIT VARYING', - 'BOOLEAN','BOX','BYTEA','CHAR','CHARACTER','CHARACTER VARYING', - 'CIDR','CIRCLE','DATE','DECIMAL','DOUBLE PRECISION','ENUM','FLOAT', - 'INET','INT','INTEGER','INTERVAL','NCHAR','REAL','SMALLINT','TEXT', - 'TIME','TIMESTAMP','VARCHAR','XML', - ), - - // //Put your package names here - // 6 => array( - // ), - - ), - 'SYMBOLS' => array( - '(', ')', '=', '<', '>', '|' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 3 => false, - 4 => false, - 5 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - // regular keywords - 1 => 'color: #000000; font-weight: bold; text-transform: uppercase;', - // inbuilt functions - 3 => 'color: #333399; font-weight: bold; text-transform: uppercase;', - // postgresql var(?) - 4 => 'color: #993333; font-weight: bold; text-transform: uppercase;', - // data types - 5 => 'color: #993333; font-weight: bold; text-transform: uppercase;', - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #ff0000;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', - 3 => '', - 4 => 'http://paste.postgresql.fr/wiki/desc.php?def={FNAME}', - 5 => '', - ), - - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 1 => array( - 'DISALLOWED_AFTER' => '(?![\(\w])' - ), - - 3 => array( - 'DISALLOWED_AFTER' => '(?=\()' - ), - - 4 => array( - 'DISALLOWED_AFTER' => '(?![\(\w])' - ), - - 5 => array( - 'DISALLOWED_AFTER' => '(?![\(\w])' - ), - ) - ) - -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/povray.php b/_piecrust/libs/Geshi/geshi/povray.php deleted file mode 100644 index a0939bb..0000000 --- a/_piecrust/libs/Geshi/geshi/povray.php +++ /dev/null @@ -1,199 +0,0 @@ - 'POVRAY', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'yes', 'wrinkles', 'wood', 'width', 'waves', 'water_level', 'warp', 'vturbulence', - 'vstr', 'vrotate', 'vnormalize', 'vlength', 'vcross', 'vaxis_rotate', 'variance', 'v_steps', - 'uv_mapping', 'utf8', 'use_index', 'use_colour', 'use_color', 'use_alpha', 'up', 'undef', - 'ultra_wide_angle', 'u_steps', 'type', 'turbulence', 'turb_depth', 'ttf', 'true', 'triangle_wave', - 'translate', 'transform', 'trace', 'toroidal', 'tolerance', 'tiles', 'tile2', 'tightness', - 'tiff', 'threshold', 'thickness', 'tga', 'texture_map', 'target', 'sys', 'sum', - 'substr', 'sturm', 'strupr', 'strlwr', 'strength', 'str', 'statistics', 'sqr', - 'spotted', 'spotlight', 'split_union', 'spline', 'spiral2', 'spiral1', 'spherical', 'specular', - 'spacing', 'solid', 'smooth', 'slope', 'slice', 'sky', 'size', 'sine_wave', - 'shadowless', 'scattering', 'scallop_wave', 'scale', 'save_file', 'samples', 'roughness', 'rotate', - 'ripples', 'right', 'rgbt', 'rgbft', 'rgbf', 'rgb', 'repeat', 'render', - 'refraction', 'reflection_exponent', 'recursion_limit', 'reciprocal', 'ratio', 'ramp_wave', 'radius', 'radial', - 'quilted', 'quick_colour', 'quick_color', 'quaternion', 'quadratic_spline', 'pwr', 'projected_through', 'prod', - 'pretrace_start', 'pretrace_end', 'precompute', 'precision', 'ppm', 'pow', 'pot', 'poly_wave', - 'point_at', 'png', 'planar', 'pigment_pattern', 'pi', 'phong_size', 'phong', 'phase', - 'pgm', 'perspective', 'pattern', 'pass_through', 'parallel', 'panoramic', 'orthographic', 'orientation', - 'orient', 'open', 'onion', 'once', 'on', 'omnimax', 'omega', 'offset', - 'off', 'octaves', 'number_of_waves', 'noise_generator', 'no_shadow', 'no_reflection', 'no_image', 'no_bump_scale', - 'no', 'nearest_count', 'natural_spline', 'mortar', 'minimum_reuse', 'min_extent', 'metric', 'method', - 'metallic', 'media_interaction', 'media_attenuation', 'media', 'max_trace_level', 'max_trace', 'max_sample', 'max_iteration', - 'max_intersections', 'max_gradient', 'max_extent', 'matrix', 'material_map', 'marble', 'map_type', 'mandel', - 'major_radius', 'magnet', 'low_error_factor', 'look_at', 'location', 'load_file', 'linear_sweep', 'linear_spline', - 'leopard', 'lambda', 'julia', 'jpeg', 'jitter', 'irid_wavelength', 'ior', 'inverse', - 'intervals', 'interpolate', 'internal', 'inside_vector', 'inside', 'initial_frame', 'initial_clock', 'image_width', - 'image_pattern', 'image_height', 'iff', 'hypercomplex', 'hollow', 'hierarchy', 'hf_gray_16', 'hexagon', - 'gray_threshold', 'granite', 'gradient', 'global_lights', 'gif', 'gather', 'fresnel', 'frequency', - 'frame_number', 'form', 'fog_type', 'fog_offset', 'fog_alt', 'focal_point', 'flip', 'flatness', - 'fisheye', 'final_frame', 'final_clock', 'false', 'falloff_angle', 'falloff', 'fade_power', 'fade_distance', - 'fade_colour', 'fade_color', 'facets', 'extinction', 'exterior', 'exponent', 'expand_thresholds', 'evaluate', - 'error_bound', 'emission', 'eccentricity', 'double_illuminate', 'distance', 'dist_exp', 'dispersion_samples', 'dispersion', - 'direction', 'diffuse', 'df3', 'dents', 'density_map', 'density_file', 'density', 'cylindrical', - 'cutaway_textures', 'cubic_wave', 'cubic_spline', 'cube', 'crand', 'crackle', 'count', 'coords', - 'control1', 'control0', 'conserve_energy', 'conic_sweep', 'confidence', 'concat', 'composite', 'component', - 'colour_map', 'colour', 'color', 'collect', 'clock_on', 'clock_delta', 'clock', 'circular', - 'chr', 'checker', 'charset', 'cells', 'caustics', 'bumps', 'bump_size', 'brilliance', - 'brightness', 'brick_size', 'brick', 'bozo', 'boxed', 'blur_samples', 'black_hole', 'bezier_spline', - 'b_spline', 'average', 'autostop', 'assumed_gamma', 'ascii', 'array', 'area_light', 'arc_angle', - 'append', 'aperture', 'angle', 'ambient_light', 'ambient', 'always_sample', 'altitude', 'alpha', - 'all_intersections', 'all', 'agate_turb', 'agate', 'adc_bailout', 'adaptive', 'accuracy', 'absorption', - 'aa_threshold', 'aa_level', 'reflection' - ), - 2 => array( - 'abs', 'acos', 'acosh', 'asc', 'asin', 'asinh', 'atan', 'atanh', - 'atan2', 'ceil', 'cos', 'cosh', 'defined', 'degrees', 'dimensions', 'dimension_size', - 'div', 'exp', 'file_exists', 'floor', 'int', 'ln', 'log', 'max', - 'min', 'mod', 'pov', 'radians', 'rand', 'seed', 'select', 'sin', - 'sinh', 'sqrt', 'strcmp', 'strlen', 'tan', 'tanh', 'val', 'vdot', - 'vlenght', - ), - 3 => array ( - 'x', 'y', 'z', 't', 'u', 'v', 'red', 'blue', - 'green', 'filter', 'transmit', 'gray', 'e', - ), - 4 => array ( - 'camera', 'background', 'fog', 'sky_sphere', 'rainbow', 'global_settings', 'radiosity', 'photon', - 'object', 'blob', 'sphere', 'cylinder', 'box', 'cone', 'height_field', 'julia_fractal', - 'lathe', 'prism', 'sphere_sweep', 'superellipsoid', 'sor', 'text', 'torus', 'bicubic_patch', - 'disc', 'mesh', 'triangle', 'smooth_triangle', 'mesh2', 'vertex_vectors', 'normal_vectors', 'uv_vectors', - 'texture_list', 'face_indices', 'normal_indices', 'uv_indices', 'texture', 'polygon', 'plane', 'poly', - 'cubic', 'quartic', 'quadric', 'isosurface', 'function', 'contained_by', 'parametric', 'pigment', - 'union', 'intersection', 'difference', 'merge', 'light_source', 'looks_like', 'light_group', 'clipped_by', - 'bounded_by', 'interior', 'material', 'interior_texture', 'normal', 'finish', 'color_map', 'pigment_map', - 'image_map', 'bump_map', 'slope_map', 'normal_map', 'irid', 'photons', - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '!', - '@', '%', '&', '*', '|', '/', '<', - '>', '+', '-', '.', '=', '<=', '>=', - '!=', - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #a63123;', - 2 => 'color: #2312bc;', - 3 => 'color: #cc1122; font-weight: bold;', - 4 => 'color: #116688; font-weight: bold;', - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', -// 2 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66aa;' - ), - 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - 0 => 'color: #6666cc; font-weight: bold;', - 1 => 'color: #66cc66; font-weight: bold;', - 2 => 'color: #66cc66; font-weight: bold;' - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - 3 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - # normal hash lines - 0 => '\#(?!(include|declare|local|fopen|fclose|read|write|default|version|if|else|end|ifdef|ifndef|switch|case|range|break|while|debug|error|warning|macro) )[[:word:]]*', - # syntax functions hash thingis - 1 => "\#(include|declare|local|fopen|fclose|read|write|default|version|if|else|end|ifdef|ifndef|switch|case|range|break|while|debug|error|warning|macro)", - 2 => array( - GESHI_SEARCH => "([a-zA-Z]+)(\n)(.*)(\n)(\\1;?)", - GESHI_REPLACE => '\3', - GESHI_BEFORE => '\1\2', - GESHI_AFTER => '\4\5', - GESHI_MODIFIERS => 'siU' - ) - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - 1 => true, - 2 => true, - 3 => true - ), - 'TAB_WIDTH' => 4 -); -?> diff --git a/_piecrust/libs/Geshi/geshi/powerbuilder.php b/_piecrust/libs/Geshi/geshi/powerbuilder.php deleted file mode 100644 index c694bdb..0000000 --- a/_piecrust/libs/Geshi/geshi/powerbuilder.php +++ /dev/null @@ -1,418 +0,0 @@ - 'PowerBuilder', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '~', - 'KEYWORDS' => array( - 1 => array( - 'alias', 'and', 'autoinstantiate', 'call', - 'case', 'catch', 'choose', 'close', 'commit', 'connect', - 'constant', 'continue', 'create', 'cursor', 'declare', - 'delete', 'describe', 'descriptor', 'destroy', 'disconnect', - 'do', 'dynamic', 'else', 'elseif', 'end', 'enumerated', - 'event', 'execute', 'exit', 'external', 'false', 'fetch', - 'first', 'for', 'forward', 'from', 'function', 'global', - 'goto', 'halt', 'if', 'immediate', 'indirect', 'insert', - 'into', 'intrinsic', 'is', 'last', 'library', 'loop', 'next', - 'not', 'of', 'on', 'open', 'or', 'parent', 'post', 'prepare', - 'prior', 'private', 'privateread', 'privatewrite', 'procedure', - 'protected', 'protectedread', 'protectedwrite', 'prototypes', - 'public', 'readonly', 'ref', 'return', 'rollback', 'rpcfunc', - 'select', 'selectblob', 'shared', 'static', 'step', 'subroutine', - 'super', 'system', 'systemread', 'systemwrite', 'then', 'this', - 'to', 'trigger', 'true', 'try', 'type', 'until', 'update', 'updateblob', - 'using', 'variables', 'where', 'while', 'with', 'within' - ), - 2 => array ( - 'blob', 'boolean', 'char', 'character', 'date', 'datetime', - 'dec', 'decimal', - 'double', 'int', 'integer', 'long', 'real', 'string', 'time', - 'uint', 'ulong', 'unsignedint', 'unsignedinteger', 'unsignedlong' - ), - 3 => array ( - 'abortretryignore!', 'actbegin!', 'acterror!', 'actesql!', - 'actgarbagecollect!', 'activate!', 'activatemanually!', - 'activateondoubleclick!', - 'activateongetfocus!', 'actline!', 'actobjectcreate!', 'actobjectdestroy!', - 'actprofile!', 'actroutine!', 'acttrace!', 'actual!', - 'actuser!', 'adoresultset!', 'adtdate!', 'adtdatetime!', - 'adtdefault!', 'adtdouble!', 'adttext!', 'adttime!', - 'aix!', 'alignatbottom!', 'alignatleft!', 'alignatright!', - 'alignattop!', 'all!', 'allowpartialchanges!', 'alpha!', - 'ansi!', 'any!', 'anycase!', 'anyfont!', - 'append!', 'application!', 'arabiccharset!', 'area3d!', - 'areagraph!', 'arraybounds!', 'arrow!', 'ascending!', - 'asstatement!', 'atbottom!', 'atleft!', 'atright!', - 'attop!', 'autosize!', 'background!', 'balticcharset!', - 'bar3dgraph!', 'bar3dobjgraph!', 'bargraph!', 'barstack3dobjgraph!', - 'barstackgraph!', 'bdiagonal!', 'beam!', 'begin!', - 'begindrag!', 'beginlabeledit!', 'beginrightdrag!', 'behind!', - 'blob!', 'bold!', 'boolean!', 'bottom!', - 'boundedarray!', 'box!', 'byreferenceargument!', 'byvalueargument!', - 'cancel!', 'cascade!', 'cascaded!', 'category!', - 'center!', 'character!', 'charsetansi!', 'charsetansiarabic!', - 'charsetansihebrew!', 'charsetdbcsjapanese!', 'charsetunicode!', 'checkbox!', - 'child!', 'childtreeitem!', 'chinesebig5!', 'classdefinition!', - 'classdefinitionobject!', 'classorstructuretype!', 'clicked!', 'clip!', - 'clipboard!', 'clipformatbitmap!', 'clipformatdib!', 'clipformatdif!', - 'clipformatenhmetafile!', 'clipformathdrop!', 'clipformatlocale!', - 'clipformatmetafilepict!', - 'clipformatoemtext!', 'clipformatpalette!', 'clipformatpendata!', 'clipformatriff!', - 'clipformatsylk!', 'clipformattext!', 'clipformattiff!', 'clipformatunicodetext!', - 'clipformatwave!', 'clock!', 'close!', 'closequery!', - 'col3dgraph!', 'col3dobjgraph!', 'colgraph!', - 'colstack3dobjgraph!', 'colstackgraph!', 'columnclick!', 'commandbutton!', - 'connection!', 'connectioninfo!', 'connectobject!', 'connectprivilege!', - 'connectwithadminprivilege!', 'constructor!', 'containsany!', 'containsembeddedonly!', - 'containslinkedonly!', 'contextinformation!', 'contextkeyword!', 'continuous!', - 'corbaobject!', 'corbaunion!', 'cplusplus!', 'cross!', - 'csv!', 'cumulative!', 'cumulativepercent!', 'currenttreeitem!', - 'customvisual!', 'dash!', 'dashdot!', 'dashdotdot!', - 'data!', 'datachange!', 'datamodified!', 'datastore!', - 'datawindow!', 'datawindowchild!', 'date!', 'datemask!', - 'datetime!', 'datetimemask!', 'dbase2!', 'dbase3!', - 'dberror!', 'deactivate!', 'decimal!', 'decimalmask!', - 'decorative!', 'default!', 'defaultcharset!', 'delete!', - 'deleteallitems!', 'deleteitem!', 'descending!', 'desktop!', - 'destructor!', 'detail!', 'diamond!', 'dif!', - 'dirall!', 'dirapplication!', 'dirdatawindow!', 'directionall!', - 'directiondown!', 'directionleft!', 'directionright!', 'directionup!', - 'dirfunction!', 'dirmenu!', 'dirpipeline!', 'dirproject!', - 'dirquery!', 'dirstructure!', 'diruserobject!', 'dirwindow!', - 'displayasactivexdocument!', 'displayascontent!', 'displayasicon!', 'dot!', - 'double!', 'doubleclicked!', 'dragdrop!', 'dragenter!', - 'dragleave!', 'dragobject!', 'dragwithin!', 'drawobject!', - 'dropdownlistbox!', 'dropdownpicturelistbox!', 'drophighlighttreeitem!', 'dwobject!', - 'dynamicdescriptionarea!', 'dynamicstagingarea!', 'easteuropecharset!', 'editchanged!', - 'editmask!', 'editmenu!', 'end!', 'endlabeledit!', - 'enterprise!', 'enterpriseonlyfeature!', 'enumeratedtype!', 'enumerationdefinition!', - 'enumerationitemdefinition!', 'environment!', 'error!', 'errorlogging!', - 'eventnotexisterror!', 'eventwrongprototypeerror!', 'excel!', 'excel5!', - 'exceptionfail!', 'exceptionignore!', 'exceptionretry!', - 'exceptionsubstitutereturnvalue!', - 'exclamation!', 'exclude!', 'exportapplication!', 'exportdatawindow!', - 'exportfunction!', 'exportmenu!', 'exportpipeline!', 'exportproject!', - 'exportquery!', 'exportstructure!', 'exportuserobject!', 'exportwindow!', - 'externalvisual!', 'extobject!', 'failonanyconflict!', 'fdiagonal!', - 'featurenotsupportederror!', 'filealreadyopenerror!', 'filecloseerror!', - 'fileexists!', - 'fileinvalidformaterror!', 'filemenu!', 'filenotopenerror!', 'filenotseterror!', - 'filereaderror!', 'filetyperichtext!', 'filetypetext!', 'filewriteerror!', - 'filter!', 'first!', 'firstvisibletreeitem!', 'fixed!', - 'floating!', 'focusrect!', 'footer!', 'foreground!', - 'frombeginning!', 'fromcurrent!', 'fromend!', 'functionobject!', - 'gb231charset!', 'getfocus!', 'graph!', 'graphicobject!', - 'graxis!', 'grdispattr!', 'greekcharset!', 'groupbox!', - 'hand!', 'hangeul!', 'header!', 'hebrewcharset!', - 'helpmenu!', 'hide!', 'horizontal!', 'hotlinkalarm!', - 'hourglass!', 'hppa!', 'hprogressbar!', 'hpux!', - 'hscrollbar!', 'hticksonboth!', 'hticksonbottom!', 'hticksonneither!', - 'hticksontop!', 'htmltable!', 'htrackbar!', 'i286!', - 'i386!', 'i486!', 'icon!', 'icons!', - 'idle!', 'importdatawindow!', 'indent!', 'index!', - 'inet!', 'information!', 'inplace!', 'inputfieldselected!', - 'insertitem!', 'inside!', 'integer!', 'internetresult!', - 'italic!', 'itemchanged!', 'itemchanging!', 'itemcollapsed!', - 'itemcollapsing!', 'itemerror!', 'itemexpanded!', 'itemexpanding!', - 'itemfocuschanged!', 'itempopulate!', 'jaguarorb!', 'johabcharset!', - 'justify!', 'key!', 'key0!', 'key1!', - 'key2!', 'key3!', 'key4!', 'key5!', - 'key6!', 'key7!', 'key8!', 'key9!', - 'keya!', 'keyadd!', 'keyalt!', 'keyapps!', - 'keyb!', 'keyback!', 'keybackquote!', 'keybackslash!', - 'keyc!', 'keycapslock!', 'keycomma!', 'keycontrol!', - 'keyd!', 'keydash!', 'keydecimal!', 'keydelete!', - 'keydivide!', 'keydownarrow!', 'keye!', 'keyend!', - 'keyenter!', 'keyequal!', 'keyescape!', 'keyf!', - 'keyf1!', 'keyf10!', 'keyf11!', 'keyf12!', - 'keyf2!', 'keyf3!', 'keyf4!', 'keyf5!', - 'keyf6!', 'keyf7!', 'keyf8!', 'keyf9!', - 'keyg!', 'keyh!', 'keyhome!', 'keyi!', - 'keyinsert!', 'keyj!', 'keyk!', 'keyl!', - 'keyleftarrow!', 'keyleftbracket!', 'keyleftbutton!', 'keyleftwindows!', - 'keym!', 'keymiddlebutton!', 'keymultiply!', 'keyn!', - 'keynull!', 'keynumlock!', 'keynumpad0!', 'keynumpad1!', - 'keynumpad2!', 'keynumpad3!', 'keynumpad4!', 'keynumpad5!', - 'keynumpad6!', 'keynumpad7!', 'keynumpad8!', 'keynumpad9!', - 'keyo!', 'keyp!', 'keypagedown!', 'keypageup!', - 'keypause!', 'keyperiod!', 'keyprintscreen!', 'keyq!', - 'keyquote!', 'keyr!', 'keyrightarrow!', 'keyrightbracket!', - 'keyrightbutton!', 'keyrightwindows!', 'keys!', 'keyscrolllock!', - 'keysemicolon!', 'keyshift!', 'keyslash!', 'keyspacebar!', - 'keysubtract!', 'keyt!', 'keytab!', 'keyu!', - 'keyuparrow!', 'keyv!', 'keyw!', 'keyword!', - 'keyx!', 'keyy!', 'keyz!', 'languageafrikaans!', - 'languagealbanian!', 'languagearabicalgeria!', 'languagearabicbahrain!', - 'languagearabicegypt!', - 'languagearabiciraq!', 'languagearabicjordan!', 'languagearabickuwait!', - 'languagearabiclebanon!', - 'languagearabiclibya!', 'languagearabicmorocco!', 'languagearabicoman!', - 'languagearabicqatar!', - 'languagearabicsaudiarabia!', 'languagearabicsyria!', 'languagearabictunisia!', - 'languagearabicuae!', - 'languagearabicyemen!', 'languagebasque!', 'languagebulgarian!', 'languagebyelorussian!', - 'languagecatalan!', 'languagechinese!', 'languagechinesehongkong!', 'languagechinesesimplified!', - 'languagechinesesingapore!', 'languagechinesetraditional!', 'languagecroatian!', 'languageczech!', - 'languagedanish!', 'languagedutch!', 'languagedutchbelgian!', 'languagedutchneutral!', - 'languageenglish!', 'languageenglishaustralian!', 'languageenglishcanadian!', - 'languageenglishirish!', - 'languageenglishnewzealand!', 'languageenglishsouthafrica!', 'languageenglishuk!', - 'languageenglishus!', - 'languageestonian!', 'languagefaeroese!', 'languagefarsi!', 'languagefinnish!', - 'languagefrench!', 'languagefrenchbelgian!', 'languagefrenchcanadian!', 'languagefrenchluxembourg!', - 'languagefrenchneutral!', 'languagefrenchswiss!', 'languagegerman!', 'languagegermanaustrian!', - 'languagegermanliechtenstein!', 'languagegermanluxembourg!', 'languagegermanneutral!', - 'languagegermanswiss!', - 'languagegreek!', 'languagehebrew!', 'languagehindi!', 'languagehungarian!', - 'languageicelandic!', 'languageindonesian!', 'languageitalian!', 'languageitalianneutral!', - 'languageitalianswiss!', 'languagejapanese!', 'languagekorean!', 'languagekoreanjohab!', - 'languagelatvian!', 'languagelithuanian!', 'languagemacedonian!', 'languagemaltese!', - 'languageneutral!', 'languagenorwegian!', 'languagenorwegianbokmal!', 'languagenorwegiannynorsk!', - 'languagepolish!', 'languageportuguese!', 'languageportuguese_brazilian!', - 'languageportugueseneutral!', - 'languagerhaetoromanic!', 'languageromanian!', 'languageromanianmoldavia!', 'languagerussian!', - 'languagerussianmoldavia!', 'languagesami!', 'languageserbian!', 'languageslovak!', - 'languageslovenian!', 'languagesorbian!', 'languagesortnative!', 'languagesortunicode!', - 'languagespanish!', 'languagespanishcastilian!', 'languagespanishmexican!', 'languagespanishmodern!', - 'languagesutu!', 'languageswedish!', 'languagesystemdefault!', 'languagethai!', - 'languagetsonga!', 'languagetswana!', 'languageturkish!', 'languageukrainian!', - 'languageurdu!', 'languageuserdefault!', 'languagevenda!', 'languagexhosa!', - 'languagezulu!', 'last!', 'layer!', 'layered!', - 'Left!', 'leftmargin!', 'line!', 'line3d!', - 'linear!', 'linecolor!', 'linedown!', 'linegraph!', - 'lineleft!', 'linemode!', 'lineright!', 'lineup!', - 'linkupdateautomatic!', 'linkupdatemanual!', 'listbox!', 'listview!', - 'listviewitem!', 'listviewlargeicon!', 'listviewlist!', 'listviewreport!', - 'listviewsmallicon!', 'lockread!', 'lockreadwrite!', 'lockwrite!', - 'log10!', 'loge!', 'long!', 'losefocus!', - 'lower!', 'lowered!', 'm68000!', 'm68020!', - 'm68030!', 'm68040!', 'maccharset!', 'macintosh!', - 'mailattach!', 'mailbcc!', 'mailbodyasfile!', 'mailcc!', - 'maildownload!', 'mailentiremessage!', 'mailenvelopeonly!', 'mailfiledescription!', - 'mailmessage!', 'mailnewsession!', 'mailnewsessionwithdownload!', 'mailole!', - 'mailolestatic!', 'mailoriginator!', 'mailrecipient!', 'mailreturnaccessdenied!', - 'mailreturnattachmentnotfound!', 'mailreturnattachmentopenfailure!', - 'mailreturnattachmentwritefailure!', 'mailreturndiskfull!', - 'mailreturnfailure!', 'mailreturninsufficientmemory!', 'mailreturninvalidmessage!', - 'mailreturnloginfailure!', - 'mailreturnmessageinuse!', 'mailreturnnomessages!', 'mailreturnsuccess!', 'mailreturntexttoolarge!', - 'mailreturntoomanyfiles!', 'mailreturntoomanyrecipients!', 'mailreturntoomanysessions!', - 'mailreturnunknownrecipient!', - 'mailreturnuserabort!', 'mailsession!', 'mailsuppressattachments!', 'mailto!', - 'main!', 'maximized!', 'mdi!', 'mdiclient!', - 'mdihelp!', 'menu!', 'menucascade!', 'menuitemtypeabout!', - 'menuitemtypeexit!', 'menuitemtypehelp!', 'menuitemtypenormal!', 'merge!', - 'message!', 'minimized!', 'mips!', 'modelexistserror!', - 'modelnotexistserror!', 'modern!', 'modified!', 'mousedown!', - 'mousemove!', 'mouseup!', 'moved!', 'multiline!', - 'multilineedit!', 'mutexcreateerror!', 'new!', 'newmodified!', - 'next!', 'nexttreeitem!', 'nextvisibletreeitem!', 'noborder!', - 'noconnectprivilege!', 'nolegend!', 'none!', 'nonvisualobject!', - 'normal!', 'nosymbol!', 'notic!', 'notmodified!', - 'notopmost!', 'notype!', 'numericmask!', 'objhandle!', - 'oem!', 'off!', 'offsite!', 'ok!', - 'okcancel!', 'olecontrol!', 'olecustomcontrol!', 'oleobject!', - 'olestorage!', 'olestream!', 'oletxnobject!', 'omcontrol!', - 'omcustomcontrol!', 'omembeddedcontrol!', 'omobject!', 'omstorage!', - 'omstream!', 'open!', 'orb!', 'original!', - 'osf1!', 'other!', 'outside!', 'oval!', - 'pagedown!', 'pageleft!', 'pageright!', 'pageup!', - 'parenttreeitem!', 'pbtocppobject!', 'pentium!', 'percentage!', - 'picture!', 'picturebutton!', 'picturehyperlink!', 'picturelistbox!', - 'pictureselected!', 'pie3d!', 'piegraph!', 'pipeend!', - 'pipeline!', 'pipemeter!', 'pipestart!', 'popup!', - 'powerobject!', 'powerpc!', 'powerrs!', 'ppc601!', - 'ppc603!', 'ppc604!', 'previewdelete!', 'previewfunctionreselectrow!', - 'previewfunctionretrieve!', 'previewfunctionupdate!', 'previewinsert!', 'previewselect!', - 'previewupdate!', 'previoustreeitem!', 'previousvisibletreeitem!', 'primary!', - 'printend!', 'printfooter!', 'printheader!', 'printpage!', - 'printstart!', 'prior!', 'private!', 'process!', - 'profilecall!', 'profileclass!', 'profileline!', 'profileroutine!', - 'profiling!', 'protected!', 'psreport!', 'public!', - 'question!', 'radiobutton!', 'raised!', 'rbuttondown!', - 'rbuttonup!', 'read!', 'readonlyargument!', 'real!', - 'rectangle!', 'regbinary!', 'regexpandstring!', 'reglink!', - 'regmultistring!', 'regstring!', 'regulong!', 'regulongbigendian!', - 'remoteexec!', 'remotehotlinkstart!', 'remotehotlinkstop!', 'remoteobject!', - 'remoterequest!', 'remotesend!', 'rename!', 'replace!', - 'resize!', 'resizeborder!', 'response!', 'resultset!', - 'resultsets!', 'retrieveend!', 'retrieverow!', 'retrievestart!', - 'retrycancel!', 'richtextedit!', 'Right!', 'rightclicked!', - 'rightdoubleclicked!', 'rightmargin!', 'rnddays!', 'rnddefault!', - 'rndhours!', 'rndmicroseconds!', 'rndminutes!', 'rndmonths!', - 'rndnumber!', 'rndseconds!', 'rndyears!', 'roman!', - 'roottreeitem!', 'roundrectangle!', 'routineesql!', 'routineevent!', - 'routinefunction!', 'routinegarbagecollection!', 'routineobjectcreation!', - 'routineobjectdestruction!', - 'routineroot!', 'rowfocuschanged!', 'russiancharset!', 'save!', - 'scalartype!', 'scattergraph!', 'script!', 'scriptdefinition!', - 'scriptevent!', 'scriptfunction!', 'scrollhorizontal!', 'scrollvertical!', - 'selected!', 'selectionchanged!', 'selectionchanging!', 'series!', - 'service!', 'shade!', 'shadowbox!', 'shared!', - 'sharedobjectcreateinstanceerror!', 'sharedobjectcreatepbsessionerror!', - 'sharedobjectexistserror!', 'sharedobjectnotexistserror!', - 'shiftjis!', 'show!', 'simpletype!', 'simpletypedefinition!', - 'singlelineedit!', 'size!', 'sizenesw!', 'sizens!', - 'sizenwse!', 'sizewe!', 'sol2!', 'solid!', - 'sort!', 'sourcepblerror!', 'spacing1!', 'spacing15!', - 'spacing2!', 'sparc!', 'sqlinsert!', 'sqlpreview!', - 'square!', 'sslcallback!', 'sslserviceprovider!', 'statichyperlink!', - 'statictext!', 'stgdenynone!', 'stgdenyread!', 'stgdenywrite!', - 'stgexclusive!', 'stgread!', 'stgreadwrite!', 'stgwrite!', - 'stopsign!', 'straddle!', 'streammode!', 'stretch!', - 'strikeout!', 'string!', 'stringmask!', 'structure!', - 'stylebox!', 'stylelowered!', 'styleraised!', 'styleshadowbox!', - 'subscript!', 'success!', 'superscript!', 'swiss!', - 'sylk!', 'symbol!', 'symbolhollowbox!', 'symbolhollowcircle!', - 'symbolhollowdiamond!', 'symbolhollowdownarrow!', 'symbolhollowuparrow!', 'symbolplus!', - 'symbolsolidbox!', 'symbolsolidcircle!', 'symbolsoliddiamond!', 'symbolsoliddownarrow!', - 'symbolsoliduparrow!', 'symbolstar!', 'symbolx!', 'system!', - 'systemerror!', 'systemfunctions!', 'systemkey!', 'tab!', - 'tabsonbottom!', 'tabsonbottomandtop!', 'tabsonleft!', 'tabsonleftandright!', - 'tabsonright!', 'tabsonrightandleft!', 'tabsontop!', 'tabsontopandbottom!', - 'text!', 'thaicharset!', 'thread!', 'tile!', - 'tilehorizontal!', 'time!', 'timemask!', 'timer!', - 'timernone!', 'timing!', 'tobottom!', 'toolbarmoved!', - 'top!', 'topic!', 'topmost!', 'totop!', - 'traceactivitynode!', 'traceatomic!', 'tracebeginend!', 'traceerror!', - 'traceesql!', 'tracefile!', 'tracegarbagecollect!', 'tracegeneralerror!', - 'tracein!', 'traceline!', 'tracenomorenodes!', 'tracenotstartederror!', - 'traceobject!', 'traceout!', 'traceroutine!', 'tracestartederror!', - 'tracetree!', 'tracetreeerror!', 'tracetreeesql!', 'tracetreegarbagecollect!', - 'tracetreeline!', 'tracetreenode!', 'tracetreeobject!', 'tracetreeroutine!', - 'tracetreeuser!', 'traceuser!', 'transaction!', 'transactionserver!', - 'transparent!', 'transport!', 'treeview!', 'treeviewitem!', - 'turkishcharset!', 'typeboolean!', 'typecategory!', 'typecategoryaxis!', - 'typecategorylabel!', 'typedata!', 'typedate!', 'typedatetime!', - 'typedecimal!', 'typedefinition!', 'typedouble!', 'typegraph!', - 'typeinteger!', 'typelegend!', 'typelong!', 'typereal!', - 'typeseries!', 'typeseriesaxis!', 'typeserieslabel!', 'typestring!', - 'typetime!', 'typetitle!', 'typeuint!', 'typeulong!', - 'typeunknown!', 'typevalueaxis!', 'typevaluelabel!', 'ultrasparc!', - 'unboundedarray!', 'underline!', 'underlined!', 'unsignedinteger!', - 'unsignedlong!', 'unsorted!', 'uparrow!', 'updateend!', - 'updatestart!', 'upper!', 'userdefinedsort!', 'userobject!', - 'variable!', 'variableargument!', 'variablecardinalitydefinition!', 'variabledefinition!', - 'variableglobal!', 'variableinstance!', 'variablelocal!', 'variableshared!', - 'varlistargument!', 'vbxvisual!', 'vcenter!', 'vertical!', - 'vietnamesecharset!', 'viewchange!', 'vprogressbar!', 'vscrollbar!', - 'vticksonboth!', 'vticksonleft!', 'vticksonneither!', 'vticksonright!', - 'vtrackbar!', 'window!', 'windowmenu!', 'windowobject!', - 'windows!', 'windowsnt!', 'wk1!', 'wks!', - 'wmf!', 'write!', 'xpixelstounits!', 'xunitstopixels!', - 'xvalue!', 'yesno!', 'yesnocancel!', 'ypixelstounits!', - 'yunitstopixels!', - 'yvalue!', - 'zoom!' - ) - ), - 'SYMBOLS' => array( - 0 => array('(', ')', '[', ']', '{', '}'), - 1 => array('|'), - 2 => array('+', '-', '*', '/'), - 3 => array('=', '<', '>', '^') - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #008000; font-weight: bold;', - 2 => 'color: #990099; font-weight: bold;', - 3 => 'color: #330099; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #0000ff; font-weight: bold;', - 'MULTI' => 'color: #0000ff; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #800000;' - ), - 'NUMBERS' => array( - 0 => 'color: #330099; font-weight: bold;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #000000;', - 1 => 'color: #ffff00; background-color:#993300; font-weight: bold', - 2 => 'color: #000000;', - 3 => 'color: #000000;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #800000; font-weight: bold;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/powershell.php b/_piecrust/libs/Geshi/geshi/powershell.php deleted file mode 100644 index 37747af..0000000 --- a/_piecrust/libs/Geshi/geshi/powershell.php +++ /dev/null @@ -1,277 +0,0 @@ - 'PowerShell', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array('<#' => '#>'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '`', - 'KEYWORDS' => array( - 1 => array( - // Cmdlets - 'Add-Content', 'Add-History', 'Add-Member', 'Add-PSSnapin', 'Clear-Content', 'Clear-Item', - 'Clear-ItemProperty', 'Clear-Variable', 'Compare-Object', 'ConvertFrom-SecureString', - 'Convert-Path', 'ConvertTo-Html', 'ConvertTo-SecureString', 'Copy-Item', 'Copy-ItemProperty', - 'Export-Alias', 'Export-Clixml', 'Export-Console', 'Export-Csv', 'ForEach-Object', - 'Format-Custom', 'Format-List', 'Format-Table', 'Format-Wide', 'Get-Acl', 'Get-Alias', - 'Get-AuthenticodeSignature', 'Get-ChildItem', 'Get-Command', 'Get-Content', 'Get-Credential', - 'Get-Culture', 'Get-Date', 'Get-EventLog', 'Get-ExecutionPolicy', 'Get-Help', 'Get-History', - 'Get-Host', 'Get-Item', 'Get-ItemProperty', 'Get-Location', 'Get-Member', - 'Get-PfxCertificate', 'Get-Process', 'Get-PSDrive', 'Get-PSProvider', 'Get-PSSnapin', - 'Get-Service', 'Get-TraceSource', 'Get-UICulture', 'Get-Unique', 'Get-Variable', - 'Get-WmiObject', 'Group-Object', 'Import-Alias', 'Import-Clixml', 'Import-Csv', - 'Invoke-Expression', 'Invoke-History', 'Invoke-Item', 'Join-Path', 'Measure-Command', - 'Measure-Object', 'Move-Item', 'Move-ItemProperty', 'New-Alias', 'New-Item', - 'New-ItemProperty', 'New-Object', 'New-PSDrive', 'New-Service', 'New-TimeSpan', - 'New-Variable', 'Out-Default', 'Out-File', 'Out-Host', 'Out-Null', 'Out-Printer', - 'Out-String', 'Pop-Location', 'Push-Location', 'Read-Host', 'Remove-Item', - 'Remove-ItemProperty', 'Remove-PSDrive', 'Remove-PSSnapin', 'Remove-Variable', 'Rename-Item', - 'Rename-ItemProperty', 'Resolve-Path', 'Restart-Service', 'Resume-Service', 'Select-Object', - 'Select-String', 'Set-Acl', 'Set-Alias', 'Set-AuthenticodeSignature', 'Set-Content', - 'Set-Date', 'Set-ExecutionPolicy', 'Set-Item', 'Set-ItemProperty', 'Set-Location', - 'Set-PSDebug', 'Set-Service', 'Set-TraceSource', 'Set-Variable', 'Sort-Object', 'Split-Path', - 'Start-Service', 'Start-Sleep', 'Start-Transcript', 'Stop-Process', 'Stop-Service', - 'Stop-Transcript', 'Suspend-Service', 'Tee-Object', 'Test-Path', 'Trace-Command', - 'Update-FormatData', 'Update-TypeData', 'Where-Object', 'Write-Debug', 'Write-Error', - 'Write-Host', 'Write-Output', 'Write-Progress', 'Write-Verbose', 'Write-Warning' - ), - 2 => array( - // Aliases - 'ac', 'asnp', 'clc', 'cli', 'clp', 'clv', 'cpi', 'cpp', 'cvpa', 'diff', 'epal', 'epcsv', 'fc', - 'fl', 'ft', 'fw', 'gal', 'gc', 'gci', 'gcm', 'gdr', 'ghy', 'gi', 'gl', 'gm', - 'gp', 'gps', 'group', 'gsv', 'gsnp', 'gu', 'gv', 'gwmi', 'iex', 'ihy', 'ii', 'ipal', 'ipcsv', - 'mi', 'mp', 'nal', 'ndr', 'ni', 'nv', 'oh', 'rdr', 'ri', 'rni', 'rnp', 'rp', 'rsnp', 'rv', - 'rvpa', 'sal', 'sasv', 'sc', 'select', 'si', 'sl', 'sleep', 'sort', 'sp', 'spps', 'spsv', 'sv', - 'tee', 'write', 'cat', 'cd', 'clear', 'cp', 'h', 'history', 'kill', 'lp', 'ls', - 'mount', 'mv', 'popd', 'ps', 'pushd', 'pwd', 'r', 'rm', 'rmdir', 'echo', 'cls', 'chdir', - 'copy', 'del', 'dir', 'erase', 'move', 'rd', 'ren', 'set', 'type' - ), - 3 => array( - // Reserved words - 'break', 'continue', 'do', 'for', 'foreach', 'while', 'if', 'switch', 'until', 'where', - 'function', 'filter', 'else', 'elseif', 'in', 'return', 'param', 'throw', 'trap' - ), - 4 => array( - // Operators - '-eq', '-ne', '-gt', '-ge', '-lt', '-le', '-ieq', '-ine', '-igt', '-ige', '-ilt', '-ile', - '-ceq', '-cne', '-cgt', '-cge', '-clt', '-cle', '-like', '-notlike', '-match', '-notmatch', - '-ilike', '-inotlike', '-imatch', '-inotmatch', '-clike', '-cnotlike', '-cmatch', '-cnotmatch', - '-contains', '-notcontains', '-icontains', '-inotcontains', '-ccontains', '-cnotcontains', - '-isnot', '-is', '-as', '-replace', '-ireplace', '-creplace', '-and', '-or', '-band', '-bor', - '-not', '-bnot', '-f', '-casesensitive', '-exact', '-file', '-regex', '-wildcard' - ), - 5 => array( - // Options - '-Year', '-Wrap', '-Word', '-Width', '-WhatIf', '-Wait', '-View', '-Verbose', '-Verb', - '-Variable', '-ValueOnly', '-Value', '-Unique', '-UFormat', '-TypeName', '-Trace', '-TotalCount', - '-Title', '-TimestampServer', '-TargetObject', '-Syntax', '-SyncWindow', '-Sum', '-String', - '-Strict', '-Stream', '-Step', '-Status', '-Static', '-StartupType', '-Start', '-StackName', - '-Stack', '-SourceId', '-SimpleMatch', '-ShowError', '-Separator', '-SecureString', '-SecureKey', - '-SecondValue', '-SecondsRemaining', '-Seconds', '-Second', '-Scope', '-Root', '-Role', - '-Resolve', '-RemoveListener', '-RemoveFileListener', '-Registered', '-ReferenceObject', - '-Recurse', '-RecommendedAction', '-ReadCount', '-Quiet', '-Query', '-Qualifier', '-PSSnapin', - '-PSProvider', '-PSHost', '-PSDrive', '-PropertyType', '-Property', '-Prompt', '-Process', - '-PrependPath', '-PercentComplete', '-Pattern', '-PathType', '-Path', '-PassThru', '-ParentId', - '-Parent', '-Parameter', '-Paging', '-OutVariable', '-OutBuffer', '-Option', '-OnType', '-Off', - '-Object', '-Noun', '-NoTypeInformation', '-NoQualifier', '-NoNewline', '-NoElement', - '-NoClobber', '-NewName', '-Newest', '-Namespace', '-Name', '-Month', '-Minutes', '-Minute', - '-Minimum', '-Milliseconds', '-Message', '-MemberType', '-Maximum', '-LogName', '-LiteralPath', - '-LiteralName', '-ListenerOption', '-List', '-Line', '-Leaf', '-Last', '-Key', '-ItemType', - '-IsValid', '-IsAbsolute', '-InputObject', '-IncludeEqual', '-IncludeChain', '-Include', - '-IgnoreWhiteSpace', '-Id', '-Hours', '-Hour', '-HideTableHeaders', '-Head', '-GroupBy', - '-Functionality', '-Full', '-Format', '-ForegroundColor', '-Force', '-First', '-FilterScript', - '-Filter', '-FilePath', '-Expression', '-ExpandProperty', '-Expand', '-ExecutionPolicy', - '-ExcludeProperty', '-ExcludeDifferent', '-Exclude', '-Exception', '-Examples', '-ErrorVariable', - '-ErrorRecord', '-ErrorId', '-ErrorAction', '-End', '-Encoding', '-DisplayName', '-DisplayHint', - '-DisplayError', '-DifferenceObject', '-Detailed', '-Destination', '-Description', '-Descending', - '-Depth', '-DependsOn', '-Delimiter', '-Debugger', '-Debug', '-Days', '-Day', '-Date', - '-CurrentOperation', '-Culture', '-Credential', '-Count', '-Container', '-Confirm', - '-ComputerName', '-Component', '-Completed', '-ComObject', '-CommandType', '-Command', - '-Column', '-Class', '-ChildPath', '-Character', '-Certificate', '-CategoryTargetType', - '-CategoryTargetName', '-CategoryReason', '-CategoryActivity', '-Category', '-CaseSensitive', - '-Body', '-BinaryPathName', '-Begin', '-BackgroundColor', '-Average', '-AutoSize', '-Audit', - '-AsString', '-AsSecureString', '-AsPlainText', '-As', '-ArgumentList', '-AppendPath', '-Append', - '-Adjust', '-Activity', '-AclObject' - ), - 6 => array( - '_','args','DebugPreference','Error','ErrorActionPreference', - 'foreach','Home','Host','Input','LASTEXITCODE','MaximumAliasCount', - 'MaximumDriveCount','MaximumFunctionCount','MaximumHistoryCount', - 'MaximumVariableCount','OFS','PsHome', - 'ReportErrorShowExceptionClass','ReportErrorShowInnerException', - 'ReportErrorShowSource','ReportErrorShowStackTrace', - 'ShouldProcessPreference','ShouldProcessReturnPreference', - 'StackTrace','VerbosePreference','WarningPreference','PWD' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '=', '<', '>', '@', '|', '&', ',', '?', - '+=', '-=', '*=', '/=', '%=', '*', '/', '%', '!', '+', '-', '++', '--' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #008080; font-weight: bold;', - 2 => 'color: #008080; font-weight: bold;', - 3 => 'color: #0000FF;', - 4 => 'color: #FF0000;', - 5 => 'color: #008080; font-style: italic;', - 6 => 'color: #000080;' - ), - 'COMMENTS' => array( - 1 => 'color: #008000;', - 'MULTI' => 'color: #008000;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #008080; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #800000;' - ), - 'NUMBERS' => array( - 0 => 'color: #804000;' - ), - 'METHODS' => array( - 0 => 'color: pink;' - ), - 'SYMBOLS' => array( - 0 => 'color: pink;' - ), - 'REGEXPS' => array( - 0 => 'color: #800080;', - 3 => 'color: #008080;', - 4 => 'color: #008080;', - 5 => 'color: #800000;', - 6 => 'color: #000080;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => 'about:blank', - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - // special after pipe - 3 => array( - GESHI_SEARCH => '(\[)(int|long|string|char|bool|byte|double|decimal|float|single|regex|array|xml|scriptblock|switch|hashtable|type|ref|psobject|wmi|wmisearcher|wmiclass|object)((\[.*\])?\])', - GESHI_REPLACE => '\2', - GESHI_MODIFIERS => 'si', - GESHI_BEFORE => '\1', - GESHI_AFTER => '\3' - ), - // Classes - 4 => array( - GESHI_SEARCH => '(\[)(System\.Reflection\.Assembly|System\.Net\.CredentialCache|Microsoft\.SharePoint\.SPFileLevel|Microsoft\.SharePoint\.Publishing\.PublishingWeb|Microsoft\.SharePoint\.Publishing|Microsoft\.SharePoint\.SPWeb)(\])', - GESHI_REPLACE => '\2', - GESHI_MODIFIERS => 'i', - GESHI_BEFORE => '\1', - GESHI_AFTER => '\3' - ), - // Members - // There's about a hundred million of these, add the ones you need as you need them - 5 => array ( - GESHI_SEARCH => '(::)(ReflectionOnlyLoadFrom|ReflectionOnlyLoad|ReferenceEquals|LoadWithPartialName|LoadFrom|LoadFile|Load|GetExecutingAssembly|GetEntryAssembly|GetCallingAssembly|GetAssembly|Equals|DefaultNetworkCredentials|DefaultCredentials|CreateQualifiedName|Checkout|Draft|Published|IsPublishingWeb)', - GESHI_REPLACE => '\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\1', - GESHI_AFTER => '' - ), - // Special variables - 6 => array( - GESHI_SEARCH => '(\$)(\$[_\^]?|\?)(?!\w)', - GESHI_REPLACE => '\1\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - // variables - //BenBE: Please note that changes here and in Keyword group 6 have to be synchronized in order to work properly. - //This Regexp must only match, if keyword group 6 doesn't. If this assumption fails - //Highlighting of the keywords will be incomplete or incorrect! - 0 => "(?)[\\\$](\w+)(?=[^|\w])", - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 4 => array( - 'DISALLOWED_AFTER' => '(?![a-zA-Z])', - 'DISALLOWED_BEFORE' => '' - ), - 6 => array( - 'DISALLOWED_BEFORE' => '(?)\$' - ) - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/progress.php b/_piecrust/libs/Geshi/geshi/progress.php deleted file mode 100644 index 3816e58..0000000 --- a/_piecrust/libs/Geshi/geshi/progress.php +++ /dev/null @@ -1,485 +0,0 @@ - 'Progress', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array ( - 1 => array( - 'ACCUMULATE','APPLY','ASSIGN','BELL','QUERY', - 'BUFFER-COMPARE','BUFFER-COPY','CALL','CASE', - 'CHOOSE','CLASS','CLOSE QUERY','each','WHERE', - 'CLOSE STORED-PROCEDURE','COLOR','COMPILE','CONNECT', - 'CONSTRUCTOR','COPY-LOB','CREATE','CREATE ALIAS', - 'CREATE BROWSE','CREATE BUFFER','CREATE CALL','CREATE CLIENT-PRINCIPAL', - 'CREATE DATABASE','CREATE DATASET','CREATE DATA-SOURCE','CREATE QUERY', - 'CREATE SAX-attributeS','CREATE SAX-READER','CREATE SAX-WRITER','CREATE SERVER', - 'CREATE SERVER-SOCKET','CREATE SOAP-HEADER','CREATE SOAP-HEADER-ENTRYREF','CREATE SOCKET', - 'CREATE TEMP-TABLE','CREATE WIDGET','CREATE widget-POOL','CREATE X-DOCUMENT', - 'CREATE X-NODEREF','CURRENT-LANGUAGE','CURRENT-VALUE','DDE ADVISE', - 'DDE EXECUTE','DDE GET','DDE INITIATE','DDE REQUEST', - 'DDE SEND','DDE TERMINATE','DEFINE BROWSE','DEFINE BUFFER','DEFINE', - 'DEFINE BUTTON','DEFINE DATASET','DEFINE DATA-SOURCE','DEFINE FRAME','DEF','VAR', - 'DEFINE IMAGE','DEFINE MENU','DEFINE PARAMETER','DEFINE property','PARAM', - 'DEFINE QUERY','DEFINE RECTANGLE','DEFINE STREAM','DEFINE SUB-MENU', - 'DEFINE TEMP-TABLE','DEFINE WORKFILE','DEFINE WORK-TABLE', - 'DELETE','DELETE ALIAS','DELETE object','DELETE PROCEDURE', - 'DELETE widget','DELETE widget-POOL','DESTRUCTOR','DICTIONARY', - 'DISABLE','DISABLE TRIGGERS','DISCONNECT','DISPLAY', - 'DO','DOS','DOWN','DYNAMIC-CURRENT-VALUE', - 'ELSE','EMPTY TEMP-TABLE','ENABLE','END', - 'ENTRY','FIND','AND', - 'FIX-CODEPAGE','FOR','FORM','FRAME-VALUE', - 'GET','GET-KEY-VALUE','HIDE','IF', - 'IMPORT','INPUT CLEAR','INPUT CLOSE','INPUT FROM','input', - 'INPUT THROUGH','INPUT-OUTPUT CLOSE','INPUT-OUTPUT THROUGH', - 'INTERFACE','LEAVE','BREAK', - 'LOAD-PICTURE','MESSAGE','method','NEXT','prev', - 'NEXT-PROMPT','ON','OPEN QUERY','OS-APPEND', - 'OS-COMMAND','OS-COPY','OS-CREATE-DIR','OS-DELETE', - 'OS-RENAME','OUTPUT CLOSE','OUTPUT THROUGH','OUTPUT TO', - 'OVERLAY','PAGE','PAUSE','PROCEDURE', - 'PROCESS EVENTS','PROMPT-FOR','PROMSGS','PROPATH', - 'PUBLISH','PUT','PUT CURSOR','PUT SCREEN', - 'PUT-BITS','PUT-BYTE','PUT-BYTES','PUT-DOUBLE', - 'PUT-FLOAT','PUT-INT64','PUT-KEY-VALUE','PUT-LONG', - 'PUT-SHORT','PUT-STRING','PUT-UNSIGNED-LONG','PUT-UNSIGNED-SHORT', - 'QUIT','RAW-TRANSFER','READKEY','RELEASE', - 'RELEASE EXTERNAL','RELEASE object','REPEAT','REPOSITION', - 'RUN','RUN STORED-PROCEDURE','RUN SUPER', - 'SAVE CACHE','SCROLL','SEEK','SET', - 'SET-BYTE-ORDER','SET-POINTER-VALUE','SET-SIZE','SHOW-STATS', - 'STATUS','STOP','SUBSCRIBE','SUBSTRING', - 'system-DIALOG COLOR','system-DIALOG FONT','system-DIALOG GET-DIR','system-DIALOG GET-FILE', - 'system-DIALOG PRINTER-SETUP','system-HELP','THEN','THIS-object', - 'TRANSACTION-MODE AUTOMATIC','TRIGGER PROCEDURE','UNDERLINE','UNDO', - 'UNIX','UNLOAD','UNSUBSCRIBE','UP','STRING', - 'UPDATE','USE','USING','substr','SKIP','CLOSE', - 'VIEW','WAIT-FOR','MODULO','NE','AVAIL', - 'NOT','OR','&GLOBAL-DEFINE','&IF','UNFORMATTED','NO-PAUSE', - '&THEN','&ELSEIF','&ELSE','&ENDIF','OPEN','NO-WAIT', - '&MESSAGE','&SCOPED-DEFINE','&UNDEFINE','DEFINED', - 'BROWSE','BUTTON','COMBO-BOX','CONTROL-FRAME', - 'DIALOG-BOX','EDITOR','FIELD-GROUP','FILL-IN', - 'FRAME','IMAGE','LITERAL','MENU', - 'MENU-ITEM','RADIO-SET','RECTANGLE','SELECTION-LIST', - 'SLIDER','SUB-MENU','TEXT','TOGGLE-BOX', - 'WINDOW','WITH','AT','OF','EDITING','ON ENDKEY','output', - 'ON ERROR','ON QUIT','ON STOP','PRESELECT', - 'QUERY-TUNING','SIZE','Trigger','VIEW-AS','ALERT-BOX', - 'Buffer','Data-relation','ProDataSet','SAX-attributes', - 'SAX-reader','SAX-writer','Server socket','SOAP-fault', - 'SOAP-header','SOAP-header-entryref','Socket','Temp-table', - 'X-noderef','Height','Left','Top','TO', - 'Width','ACTIVE-WINDOW','AUDIT-CONTROL','FIRST','LAST', - 'AUDIT-POLICY','CLIPBOARD','CODEBASE-LOCATOR','COLOR-TABLE', - 'COMPILER','COM-SELF','DEBUGGER','DEFAULT-WINDOW', - 'ERROR-STATUS','FILE-INFO','FOCUS','FONT-TABLE', - 'LAST-EVENT','LOG-MANAGER','RCODE-INFO','SECURITY-POLICY', - 'SELF','SESSION','SOURCE-PROCEDURE','TARGET-PROCEDURE','NO-LOCK','NO-error', - 'THIS-PROCEDURE','WEB-CONTEXT','FUNCTION','RETURNS','NO-UNDO' - ), - 2 => array( - 'ACCEPT-CHANGES','ACCEPT-ROW-CHANGES','ADD-BUFFER','ADD-CALC-COLUMN', - 'ADD-COLUMNS-FROM','ADD-EVENTS-PROCEDURE','ADD-FIELDS-FROM','ADD-FIRST', - 'ADD-HEADER-ENTRY','ADD-INDEX-FIELD','ADD-LAST','ADD-LIKE-COLUMN', - 'ADD-LIKE-FIELD','ADD-LIKE-INDEX','ADD-NEW-FIELD','ADD-NEW-INDEX', - 'ADD-RELATION','ADD-SCHEMA-LOCATION','ADD-SOURCE-BUFFER','ADD-SUPER-PROCEDURE', - 'APPEND-CHILD','APPLY-CALLBACK','ATTACH-DATA-SOURCE','AUTHENTICATION-FAILED', - 'BEGIN-EVENT-GROUP','BUFFER-CREATE', - 'BUFFER-DELETE','BUFFER-RELEASE','BUFFER-VALIDATE', - 'CANCEL-BREAK','CANCEL-REQUESTS','CLEAR','CLEAR-APPL-CONTEXT', - 'CLEAR-LOG','CLEAR-SELECTION','CLEAR-SORT-ARROWS','CLONE-NODE', - 'CLOSE-LOG','CONNECTED','CONVERT-TO-OFFSET', - 'COPY-DATASET','COPY-SAX-attributeS','COPY-TEMP-TABLE','CREATE-LIKE', - 'CREATE-NODE','CREATE-NODE-NAMESPACE','CREATE-RESULT-LIST-ENTRY','DEBUG', - 'DECLARE-NAMESPACE','DELETE-CHAR','DELETE-CURRENT-ROW', - 'DELETE-HEADER-ENTRY','DELETE-LINE','DELETE-NODE','DELETE-RESULT-LIST-ENTRY', - 'DELETE-SELECTED-ROW','DELETE-SELECTED-ROWS','DESELECT-FOCUSED-ROW','DESELECT-ROWS', - 'DESELECT-SELECTED-ROW','DETACH-DATA-SOURCE','DISABLE-CONNECTIONS', - 'DISABLE-DUMP-TRIGGERS','DISABLE-LOAD-TRIGGERS','DISPLAY-MESSAGE', - 'DUMP-LOGGING-NOW','EDIT-CLEAR','EDIT-COPY','EDIT-CUT', - 'EDIT-PASTE','EDIT-UNDO','EMPTY-DATASET','EMPTY-TEMP-TABLE', - 'ENABLE-CONNECTIONS','ENABLE-EVENTS','ENCRYPT-AUDIT-MAC-KEY', - 'END-DOCUMENT','END-ELEMENT','END-EVENT-GROUP','END-FILE-DROP', - 'EXPORT','EXPORT-PRINCIPAL','FETCH-SELECTED-ROW', - 'FILL','FIND-BY-ROWID','FIND-CURRENT','FIND-FIRST', - 'FIND-LAST','FIND-UNIQUE','GET-attribute','GET-attribute-NODE', - 'GET-BINARY-DATA','GET-BLUE-VALUE','GET-BROWSE-COLUMN','GET-BUFFER-HANDLE', - 'GET-BYTES-AVAILABLE','GET-CALLBACK-PROC-CONTEXT','GET-CALLBACK-PROC-NAME','GET-CGI-LIST', - 'GET-CGI-LONG-VALUE','GET-CGI-VALUE','GET-CHANGES','GET-CHILD', - 'GET-CHILD-RELATION','GET-CONFIG-VALUE','GET-CURRENT','GET-DATASET-BUFFER', - 'GET-DOCUMENT-ELEMENT','GET-DROPPED-FILE','GET-DYNAMIC','GET-ERROR-COLUMN ', - 'GET-ERROR-ROW ','GET-FILE-NAME ','GET-FILE-OFFSET ','GET-FIRST', - 'GET-GREEN-VALUE','GET-HEADER-ENTRY','GET-INDEX-BY-NAMESPACE-NAME','GET-INDEX-BY-QNAME', - 'GET-ITERATION','GET-LAST','GET-LOCALNAME-BY-INDEX','GET-MESSAGE', - 'GET-NEXT','GET-NODE','GET-NUMBER','GET-PARENT', - 'GET-PREV','GET-PRINTERS','GET-property','GET-QNAME-BY-INDEX', - 'GET-RED-VALUE','GET-RELATION','GET-REPOSITIONED-ROW','GET-RGB-VALUE', - 'GET-SELECTED-widget','GET-SERIALIZED','GET-SIGNATURE','GET-SOCKET-OPTION', - 'GET-SOURCE-BUFFER','GET-TAB-ITEM','GET-TEXT-HEIGHT-CHARS','GET-TEXT-HEIGHT-PIXELS', - 'GET-TEXT-WIDTH-CHARS','GET-TEXT-WIDTH-PIXELS','GET-TOP-BUFFER','GET-TYPE-BY-INDEX', - 'GET-TYPE-BY-NAMESPACE-NAME','GET-TYPE-BY-QNAME','GET-URI-BY-INDEX','GET-VALUE-BY-INDEX', - 'GET-VALUE-BY-NAMESPACE-NAME','GET-VALUE-BY-QNAME','GET-WAIT-STATE','IMPORT-NODE', - 'IMPORT-PRINCIPAL','INCREMENT-EXCLUSIVE-ID','INITIALIZE-DOCUMENT-TYPE', - 'INITIATE','INSERT','INSERT-attribute','INSERT-BACKTAB', - 'INSERT-BEFORE','INSERT-FILE','INSERT-ROW','INSERT-STRING', - 'INSERT-TAB','INVOKE','IS-ROW-SELECTED','IS-SELECTED', - 'LIST-property-NAMES','LOAD','LoadControls','LOAD-DOMAINS', - 'LOAD-ICON','LOAD-IMAGE','LOAD-IMAGE-DOWN','LOAD-IMAGE-INSENSITIVE', - 'LOAD-IMAGE-UP','LOAD-MOUSE-POINTER','LOAD-SMALL-ICON','LOCK-REGISTRATION', - 'LOG-AUDIT-EVENT','LOGOUT','LONGCHAR-TO-NODE-VALUE','LOOKUP', - 'MEMPTR-TO-NODE-VALUE','MERGE-CHANGES','MERGE-ROW-CHANGES','MOVE-AFTER-TAB-ITEM', - 'MOVE-BEFORE-TAB-ITEM','MOVE-COLUMN','MOVE-TO-BOTTOM','MOVE-TO-EOF', - 'MOVE-TO-TOP','NODE-VALUE-TO-LONGCHAR','NODE-VALUE-TO-MEMPTR','NORMALIZE', - 'QUERY-CLOSE','QUERY-OPEN','QUERY-PREPARE', - 'READ','READ-FILE','READ-XML','READ-XMLSCHEMA', - 'REFRESH','REFRESH-AUDIT-POLICY','REGISTER-DOMAIN','REJECT-CHANGES', - 'REJECT-ROW-CHANGES','REMOVE-attribute','REMOVE-CHILD','REMOVE-EVENTS-PROCEDURE', - 'REMOVE-SUPER-PROCEDURE','REPLACE','REPLACE-CHILD','REPLACE-SELECTION-TEXT', - 'REPOSITION-BACKWARD','REPOSITION-FORWARD','REPOSITION-TO-ROW','REPOSITION-TO-ROWID', - 'RESET','SAVE','SAVE-FILE','SAVE-ROW-CHANGES', - 'SAX-PARSE','SAX-PARSE-FIRST','SAX-PARSE-NEXT','SCROLL-TO-CURRENT-ROW', - 'SCROLL-TO-ITEM','SCROLL-TO-SELECTED-ROW','SEAL','SEARCH', - 'SELECT-ALL','SELECT-FOCUSED-ROW','SELECT-NEXT-ROW','SELECT-PREV-ROW', - 'SELECT-ROW','SET-ACTOR','SET-APPL-CONTEXT','SET-attribute', - 'SET-attribute-NODE','SET-BLUE-VALUE','SET-BREAK','SET-BUFFERS', - 'SET-CALLBACK','SET-CALLBACK-PROCEDURE','SET-CLIENT','SET-COMMIT', - 'SET-CONNECT-PROCEDURE','SET-DYNAMIC','SET-GREEN-VALUE','SET-INPUT-SOURCE', - 'SET-MUST-UNDERSTAND','SET-NODE','SET-NUMERIC-FORMAT','SET-OUTPUT-DESTINATION', - 'SET-PARAMETER','SET-property','SET-READ-RESPONSE-PROCEDURE','SET-RED-VALUE', - 'SET-REPOSITIONED-ROW','SET-RGB-VALUE','SET-ROLLBACK','SET-SELECTION', - 'SET-SERIALIZED','SET-SOCKET-OPTION','SET-SORT-ARROW','SET-WAIT-STATE', - 'START-DOCUMENT','START-ELEMENT','STOP-PARSING','SYNCHRONIZE', - 'TEMP-TABLE-PREPARE','UPDATE-attribute','URL-DECODE','URL-ENCODE', - 'VALIDATE','VALIDATE-SEAL','WRITE','WRITE-CDATA','USE-INDEX', - 'WRITE-CHARACTERS','WRITE-COMMENT','WRITE-DATA-ELEMENT','WRITE-EMPTY-ELEMENT', - 'WRITE-ENTITY-REF','WRITE-EXTERNAL-DTD','WRITE-FRAGMENT','WRITE-MESSAGE', - 'WRITE-PROCESSING-INSTRUCTION','WRITE-XML','WRITE-XMLSCHEMA','FALSE','true' - ), - 3 => array( - 'ABSOLUTE','ACCUM','ADD-INTERVAL','ALIAS','mod', - 'AMBIGUOUS','ASC','AUDIT-ENABLED','AVAILABLE', - 'BASE64-DECODE','BASE64-ENCODE','CAN-DO','CAN-FIND', - 'CAN-QUERY','CAN-SET','CAPS','CAST','OS-DIR', - 'CHR','CODEPAGE-CONVERT','COMPARE', - 'COUNT-OF','CURRENT-CHANGED','CURRENT-RESULT-ROW','DATASERVERS', - 'DATA-SOURCE-MODIFIED','DATETIME','DATETIME-TZ', - 'DAY','DBCODEPAGE','DBCOLLATION','DBNAME', - 'DBPARAM','DBRESTRICTIONS','DBTASKID','DBTYPE', - 'DBVERSION','DECIMAL','DECRYPT','DYNAMIC-function', - 'DYNAMIC-NEXT-VALUE','ENCODE','ENCRYPT','ENTERED', - 'ERROR','ETIME','EXP','ENDKEY','END-error', - 'FIRST-OF','FRAME-DB','FRAME-DOWN', - 'FRAME-FIELD','FRAME-FILE','FRAME-INDEX','FRAME-LINE', - 'GATEWAYS','GENERATE-PBE-KEY','GENERATE-PBE-SALT','GENERATE-RANDOM-KEY', - 'GENERATE-UUID','GET-BITS','GET-BYTE','GET-BYTE-ORDER', - 'GET-BYTES','GET-CODEPAGE','GET-CODEPAGES','GET-COLLATION', - 'GET-COLLATIONS','GET-DOUBLE','GET-FLOAT','GET-INT64', - 'GET-LONG','GET-POINTER-VALUE','GET-SHORT','GET-SIZE', - 'GET-STRING','GET-UNSIGNED-LONG','GET-UNSIGNED-SHORT','GO-PENDING', - 'GUID','HEX-DECODE','INDEX', - 'INT64','INTEGER','INTERVAL','IS-ATTR-SPACE', - 'IS-CODEPAGE-FIXED','IS-COLUMN-CODEPAGE','IS-LEAD-BYTE','ISO-DATE', - 'KBLABEL','KEYCODE','KEYFUNCTION','KEYLABEL', - 'KEYWORD','KEYWORD-ALL','LASTKEY', - 'LAST-OF','LC','LDBNAME','LEFT-TRIM', - 'LIBRARY','LINE-COUNTER','LIST-EVENTS','LIST-QUERY-ATTRS', - 'LIST-SET-ATTRS','LIST-widgetS','LOCKED', - 'LOGICAL','MAXIMUM','MD5-DIGEST', - 'MEMBER','MESSAGE-LINES','MINIMUM','MONTH', - 'MTIME','NEW','NEXT-VALUE','SHARED', - 'NOT ENTERED','NOW','NUM-ALIASES','NUM-DBS', - 'NUM-ENTRIES','NUM-RESULTS','OPSYS','OS-DRIVES', - 'OS-ERROR','OS-GETENV','PAGE-NUMBER','PAGE-SIZE', - 'PDBNAME','PROC-HANDLE','PROC-STATUS','PROGRAM-NAME', - 'PROGRESS','PROVERSION','QUERY-OFF-END','QUOTER', - 'RANDOM','RAW','RECID','REJECTED', - 'RETRY','RETURN-VALUE','RGB-VALUE', - 'RIGHT-TRIM','R-INDEX','ROUND','ROWID','LENGTH', - 'SDBNAME','SET-DB-CLIENT','SETUSERID', - 'SHA1-DIGEST','SQRT','SUBSTITUTE','VARIABLE', - 'SUPER','TERMINAL','TIME','TIMEZONE','external', - 'TODAY','TO-ROWID','TRIM','TRUNCATE','return', - 'TYPE-OF','USERID','VALID-EVENT','VALID-HANDLE', - 'VALID-object','WEEKDAY','YEAR','BEGINS','VALUE', - 'EQ','GE','GT','LE','LT','MATCHES','AS','BY','LIKE' - ), - 4 => array( - 'ACCELERATOR','ACTIVE','ACTOR','ADM-DATA', - 'AFTER-BUFFER','AFTER-ROWID','AFTER-TABLE','ALLOW-COLUMN-SEARCHING', - 'ALWAYS-ON-TOP','APPL-ALERT-BOXES','APPL-CONTEXT-ID','APPSERVER-INFO', - 'APPSERVER-PASSWORD','APPSERVER-USERID','ASYNCHRONOUS','ASYNC-REQUEST-COUNT', - 'ASYNC-REQUEST-HANDLE','ATTACHED-PAIRLIST','attribute-NAMES','ATTR-SPACE', - 'AUDIT-EVENT-CONTEXT','AUTO-COMPLETION','AUTO-DELETE','AUTO-DELETE-XML', - 'AUTO-END-KEY','AUTO-GO','AUTO-INDENT','AUTO-RESIZE', - 'AUTO-RETURN','AUTO-SYNCHRONIZE','AUTO-VALIDATE','AUTO-ZAP', - 'AVAILABLE-FORMATS','BACKGROUND','BASE-ADE','BASIC-LOGGING', - 'BATCH-MODE','BATCH-SIZE','BEFORE-BUFFER','BEFORE-ROWID', - 'BEFORE-TABLE','BGCOLOR','BLANK','BLOCK-ITERATION-DISPLAY', - 'BORDER-BOTTOM-CHARS','BORDER-BOTTOM-PIXELS','BORDER-LEFT-CHARS','BORDER-LEFT-PIXELS', - 'BORDER-RIGHT-CHARS','BORDER-RIGHT-PIXELS','BORDER-TOP-CHARS','BORDER-TOP-PIXELS', - 'BOX','BOX-SELECTABLE','BUFFER-CHARS','BUFFER-FIELD', - 'BUFFER-HANDLE','BUFFER-LINES','BUFFER-NAME','BUFFER-VALUE', - 'BYTES-READ','BYTES-WRITTEN','CACHE','CALL-NAME', - 'CALL-TYPE','CANCEL-BUTTON','CANCELLED','CAN-CREATE', - 'CAN-DELETE','CAN-READ','CAN-WRITE','CAREFUL-PAINT', - 'CASE-SENSITIVE','CENTERED','CHARSET','CHECKED', - 'CHILD-BUFFER','CHILD-NUM','CLASS-TYPE','CLIENT-CONNECTION-ID', - 'CLIENT-TTY','CLIENT-TYPE','CLIENT-WORKSTATION','CODE', - 'CODEPAGE','COLUMN','COLUMN-BGCOLOR','COLUMN-DCOLOR', - 'COLUMN-FGCOLOR','COLUMN-FONT','COLUMN-LABEL','COLUMN-MOVABLE', - 'COLUMN-PFCOLOR','COLUMN-READ-ONLY','COLUMN-RESIZABLE','COLUMN-SCROLLING', - 'COM-HANDLE','COMPLETE','CONFIG-NAME','CONTEXT-HELP', - 'CONTEXT-HELP-FILE','CONTEXT-HELP-ID','CONTROL-BOX','CONVERT-3D-COLORS', - 'CPCASE','CPCOLL','CPINTERNAL','CPLOG', - 'CPPRINT','CPRCODEIN','CPRCODEOUT','CPSTREAM', - 'CPTERM','CRC-VALUE','CURRENT-COLUMN','CURRENT-ENVIRONMENT', - 'CURRENT-ITERATION','CURRENT-ROW-MODIFIED','CURRENT-WINDOW','CURSOR-CHAR', - 'CURSOR-LINE','CURSOR-OFFSET','DATA-ENTRY-RETURN','DATASET', - 'DATA-SOURCE','DATA-SOURCE-COMPLETE-MAP','DATA-TYPE','DATE-FORMAT', - 'DB-REFERENCES','DCOLOR','DDE-ERROR','DDE-ID', - 'DDE-ITEM','DDE-NAME','DDE-TOPIC','DEBLANK', - 'DEBUG-ALERT','DECIMALS','DEFAULT','DEFAULT-BUFFER-HANDLE', - 'DEFAULT-BUTTON','DEFAULT-COMMIT','DELIMITER','DISABLE-AUTO-ZAP', - 'DISPLAY-TIMEZONE','DISPLAY-TYPE','DOMAIN-DESCRIPTION','DOMAIN-NAME', - 'DOMAIN-TYPE','DRAG-ENABLED','DROP-TARGET','DYNAMIC', - 'EDGE-CHARS','EDGE-PIXELS','EDIT-CAN-PASTE','EDIT-CAN-UNDO', - 'EMPTY','ENCODING','ENCRYPTION-SALT','END-USER-PROMPT', - 'ENTRY-TYPES-LIST','ERROR-COLUMN','ERROR-object-DETAIL','ERROR-ROW', - 'ERROR-STRING','EVENT-GROUP-ID','EVENT-PROCEDURE','EVENT-PROCEDURE-CONTEXT', - 'EVENT-TYPE','EXCLUSIVE-ID','EXECUTION-LOG','EXPAND', - 'EXPANDABLE','FGCOLOR','FILE-CREATE-DATE','FILE-CREATE-TIME', - 'FILE-MOD-DATE','FILE-MOD-TIME','FILE-NAME','FILE-OFFSET', - 'FILE-SIZE','FILE-TYPE','FILLED','FILL-MODE', - 'FILL-WHERE-STRING','FIRST-ASYNC-REQUEST','FIRST-BUFFER','FIRST-CHILD', - 'FIRST-COLUMN','FIRST-DATASET','FIRST-DATA-SOURCE','FIRST-object', - 'FIRST-PROCEDURE','FIRST-QUERY','FIRST-SERVER','FIRST-SERVER-SOCKET', - 'FIRST-SOCKET','FIRST-TAB-ITEM','FIT-LAST-COLUMN','FLAT-BUTTON', - 'FOCUSED-ROW','FOCUSED-ROW-SELECTED','FONT','FOREGROUND', - 'FORMAT','FORMATTED','FORM-INPUT','FORM-LONG-INPUT', - 'FORWARD-ONLY','FRAGMENT','FRAME-COL','FRAME-NAME', - 'FRAME-ROW','FRAME-SPACING','FRAME-X','FRAME-Y', - 'FREQUENCY','FULL-HEIGHT-CHARS','FULL-HEIGHT-PIXELS','FULL-PATHNAME', - 'FULL-WIDTH-CHARS','FULL-WIDTH-PIXELS','GRAPHIC-EDGE', - 'GRID-FACTOR-HORIZONTAL','GRID-FACTOR-VERTICAL','GRID-SNAP','GRID-UNIT-HEIGHT-CHARS', - 'GRID-UNIT-HEIGHT-PIXELS','GRID-UNIT-WIDTH-CHARS','GRID-UNIT-WIDTH-PIXELS','GRID-VISIBLE', - 'GROUP-BOX','HANDLE','HANDLER','HAS-LOBS', - 'HAS-RECORDS','HEIGHT-CHARS','HEIGHT-PIXELS','HELP', - 'HIDDEN','HORIZONTAL','HTML-CHARSET','HTML-END-OF-LINE', - 'HTML-END-OF-PAGE','HTML-FRAME-BEGIN','HTML-FRAME-END','HTML-HEADER-BEGIN', - 'HTML-HEADER-END','HTML-TITLE-BEGIN','HTML-TITLE-END','HWND', - 'ICFPARAMETER','ICON','IGNORE-CURRENT-MODIFIED','IMAGE-DOWN', - 'IMAGE-INSENSITIVE','IMAGE-UP','IMMEDIATE-DISPLAY','INDEX-INFORMATION', - 'IN-HANDLE','INHERIT-BGCOLOR','INHERIT-FGCOLOR','INITIAL','INIT', - 'INNER-CHARS','INNER-LINES','INPUT-VALUE','INSTANTIATING-PROCEDURE', - 'INTERNAL-ENTRIES','IS-CLASS','IS-OPEN','IS-PARAMETER-SET', - 'IS-XML','ITEMS-PER-ROW','KEEP-CONNECTION-OPEN','KEEP-FRAME-Z-ORDER', - 'KEEP-SECURITY-CACHE','KEY','KEYS','LABEL', - 'LABEL-BGCOLOR','LABEL-DCOLOR','LABEL-FGCOLOR','LABEL-FONT', - 'LABELS','LANGUAGES','LARGE','LARGE-TO-SMALL', - 'LAST-ASYNC-REQUEST','LAST-BATCH','LAST-CHILD','LAST-object', - 'LAST-PROCEDURE','LAST-SERVER','LAST-SERVER-SOCKET','LAST-SOCKET', - 'LAST-TAB-ITEM','LINE','LIST-ITEM-PAIRS','LIST-ITEMS', - 'LITERAL-QUESTION','LOCAL-HOST','LOCAL-NAME','LOCAL-PORT', - 'LOCATOR-COLUMN-NUMBER','LOCATOR-LINE-NUMBER','LOCATOR-PUBLIC-ID','LOCATOR-system-ID', - 'LOCATOR-TYPE','LOG-ENTRY-TYPES','LOGFILE-NAME','LOGGING-LEVEL', - 'LOGIN-EXPIRATION-TIMESTAMP','LOGIN-HOST','LOGIN-STATE','LOG-THRESHOLD', - 'MANDATORY','MANUAL-HIGHLIGHT','MAX-BUTTON','MAX-CHARS', - 'MAX-DATA-GUESS','MAX-HEIGHT-CHARS','MAX-HEIGHT-PIXELS','MAX-VALUE', - 'MAX-WIDTH-CHARS','MAX-WIDTH-PIXELS','MD5-VALUE','MENU-BAR', - 'MENU-KEY','MENU-MOUSE','MERGE-BY-FIELD','MESSAGE-AREA', - 'MESSAGE-AREA-FONT','MIN-BUTTON','MIN-COLUMN-WIDTH-CHARS','MIN-COLUMN-WIDTH-PIXELS', - 'MIN-HEIGHT-CHARS','MIN-HEIGHT-PIXELS','MIN-SCHEMA-MARSHAL','MIN-VALUE', - 'MIN-WIDTH-CHARS','MIN-WIDTH-PIXELS','MODIFIED','MOUSE-POINTER', - 'MOVABLE','MULTI-COMPILE','MULTIPLE','MULTITASKING-INTERVAL', - 'MUST-UNDERSTAND','NAME','NAMESPACE-PREFIX','NAMESPACE-URI', - 'NEEDS-APPSERVER-PROMPT','NEEDS-PROMPT','NESTED','NEW-ROW', - 'NEXT-COLUMN','NEXT-ROWID','NEXT-SIBLING','NEXT-TAB-ITEM', 'NO-BOX', - 'NO-CURRENT-VALUE','NODE-VALUE','NO-EMPTY-SPACE','NO-FOCUS', - 'NONAMESPACE-SCHEMA-LOCATION','NO-SCHEMA-MARSHAL','NO-VALIDATE','NUM-BUFFERS', - 'NUM-BUTTONS','NUM-CHILD-RELATIONS','NUM-CHILDREN','NUM-COLUMNS', - 'NUM-DROPPED-FILES','NUMERIC-DECIMAL-POINT','NUMERIC-FORMAT','NUMERIC-SEPARATOR', - 'NUM-FIELDS','NUM-FORMATS','NUM-HEADER-ENTRIES','NUM-ITEMS', - 'NUM-ITERATIONS','NUM-LINES','NUM-LOCKED-COLUMNS','NUM-LOG-FILES', - 'NUM-MESSAGES','NUM-PARAMETERS','NUM-REFERENCES','NUM-RELATIONS', - 'NUM-REPLACED','NUM-SELECTED-ROWS','NUM-SELECTED-WIDGETS','NUM-SOURCE-BUFFERS', - 'NUM-TABS','NUM-TOP-BUFFERS','NUM-TO-RETAIN','NUM-VISIBLE-COLUMNS', - 'ON-FRAME-BORDER','ORIGIN-HANDLE','ORIGIN-ROWID','OWNER', - 'OWNER-DOCUMENT','PAGE-BOTTOM','PAGE-TOP','PARAMETER', - 'PARENT','PARENT-BUFFER','PARENT-RELATION','PARSE-STATUS', - 'PASSWORD-FIELD','PATHNAME','PBE-HASH-ALGORITHM','PBE-KEY-ROUNDS', - 'PERSISTENT','PERSISTENT-CACHE-DISABLED','PERSISTENT-PROCEDURE','PFCOLOR', - 'PIXELS-PER-COLUMN','PIXELS-PER-ROW','POPUP-MENU','POPUP-ONLY', - 'POSITION','PREFER-DATASET','PREPARED','PREPARE-STRING', - 'PREV-COLUMN','PREV-SIBLING','PREV-TAB-ITEM','PRIMARY', - 'PRINTER-CONTROL-HANDLE','PRINTER-HDC','PRINTER-NAME','PRINTER-PORT', - 'PRIVATE-DATA','PROCEDURE-NAME','PROGRESS-SOURCE','PROXY', - 'PROXY-PASSWORD','PROXY-USERID','PUBLIC-ID','PUBLISHED-EVENTS', - 'RADIO-BUTTONS','READ-ONLY','RECORD-LENGTH', - 'REFRESHABLE','RELATION-FIELDS','RELATIONS-ACTIVE','REMOTE', - 'REMOTE-HOST','REMOTE-PORT','RESIZABLE','RESIZE', - 'RESTART-ROWID','RETAIN-SHAPE','RETURN-INSERTED','RETURN-VALUE-DATA-TYPE', - 'ROLES','ROUNDED','COL','ROW','ROW-HEIGHT-CHARS', - 'ROW-HEIGHT-PIXELS','ROW-MARKERS','ROW-RESIZABLE','ROW-STATE', - 'SAVE-WHERE-STRING','SCHEMA-CHANGE','SCHEMA-LOCATION','SCHEMA-MARSHAL', - 'SCHEMA-PATH','SCREEN-LINES','SCREEN-VALUE','SCROLLABLE', - 'SCROLLBAR-HORIZONTAL','SCROLL-BARS','SCROLLBAR-VERTICAL','SEAL-TIMESTAMP', - 'SELECTABLE','SELECTED','SELECTION-END','SELECTION-START', - 'SELECTION-TEXT','SENSITIVE','SEPARATOR-FGCOLOR','SEPARATORS', - 'SERVER','SERVER-CONNECTION-BOUND','SERVER-CONNECTION-BOUND-REQUEST','SERVER-CONNECTION-CONTEXT', - 'SERVER-CONNECTION-ID','SERVER-OPERATING-MODE','SESSION-END','SESSION-ID', - 'SHOW-IN-TASKBAR','SIDE-LABEL-HANDLE','SIDE-LABELS','SKIP-DELETED-RECORD', - 'SMALL-ICON','SMALL-TITLE','SOAP-FAULT-ACTOR','SOAP-FAULT-CODE', - 'SOAP-FAULT-DETAIL','SOAP-FAULT-STRING','SORT','SORT-ASCENDING', - 'SORT-NUMBER','SSL-SERVER-NAME','STANDALONE','STARTUP-PARAMETERS', - 'STATE-DETAIL','STATUS-AREA','STATUS-AREA-FONT','STOPPED', - 'STREAM','STRETCH-TO-FIT','STRICT','STRING-VALUE', - 'SUBTYPE','SUPER-PROCEDURES','SUPPRESS-NAMESPACE-PROCESSING','SUPPRESS-WARNINGS', - 'SYMMETRIC-ENCRYPTION-ALGORITHM','SYMMETRIC-ENCRYPTION-IV','SYMMETRIC-ENCRYPTION-KEY','SYMMETRIC-SUPPORT', - 'system-ALERT-BOXES','system-ID','TABLE','TABLE-CRC-LIST', - 'TABLE-HANDLE','TABLE-LIST','TABLE-NUMBER','TAB-POSITION', - 'TAB-STOP','TEMP-DIRECTORY','TEXT-SELECTED','THREE-D', - 'TIC-MARKS','TIME-SOURCE','TITLE','TITLE-BGCOLOR','FIELD', - 'TITLE-DCOLOR','TITLE-FGCOLOR','TITLE-FONT','TOOLTIP', - 'TOOLTIPS','TOP-ONLY','TRACKING-CHANGES','TRANSACTION', - 'TRANS-INIT-PROCEDURE','TRANSPARENT','TYPE','UNIQUE-ID', - 'UNIQUE-MATCH','URL','URL-PASSWORD','URL-USERID','EXTENT', - 'USER-ID','V6DISPLAY','VALIDATE-EXPRESSION','VALIDATE-MESSAGE', - 'VALIDATE-XML','VALIDATION-ENABLED','VIEW-FIRST-COLUMN-ON-REOPEN', - 'VIRTUAL-HEIGHT-CHARS','VIRTUAL-HEIGHT-PIXELS','VIRTUAL-WIDTH-CHARS','VIRTUAL-WIDTH-PIXELS', - 'VISIBLE','WARNING','WHERE-STRING','widget-ENTER','DATE', - 'widget-LEAVE','WIDTH-CHARS','WIDTH-PIXELS','WINDOW-STATE', - 'WINDOW-system','WORD-WRAP','WORK-AREA-HEIGHT-PIXELS','WORK-AREA-WIDTH-PIXELS', - 'WORK-AREA-X','WORK-AREA-Y','WRITE-STATUS','X','widget-Handle', - 'X-DOCUMENT','XML-DATA-TYPE','XML-NODE-TYPE','XML-SCHEMA-PATH', - 'XML-SUPPRESS-NAMESPACE-PROCESSING','Y','YEAR-OFFSET','CHARACTER', - 'LONGCHAR','MEMPTR','CHAR','DEC','INT','LOG','DECI','INTE','LOGI','long' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', - '<', '>', '=', - '+', '-', '*', '/', - '!', '@', '%', '|', '$', - ':', '.', ';', ',', - '?', '<=','<>','>=', '\\' - ), - 'CASE_SENSITIVE' => array ( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false - ), - 'STYLES' => array ( - 'KEYWORDS' => array ( - 1 => 'color: #0000ff; font-weight: bold;', - 2 => 'color: #1D16B2;', - 3 => 'color: #993333;', - 4 => 'color: #0000ff;' - ), - 'COMMENTS' => array ( -// 1 => 'color: #808080; font-style: italic;', -// 2 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array ( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array ( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array ( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array ( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array ( - 0 => 'color: #006600;' - ), - 'SYMBOLS' => array ( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array ( - ), - 'SCRIPT' => array ( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 0 => ':' - ), - 'REGEXPS' => array ( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array ( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array ( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "(? "(?![\-a-zA-Z0-9_%])", - 1 => array( - 'SPACE_AS_WHITESPACE' => true - ), - 2 => array( - 'SPACE_AS_WHITESPACE' => true - ) - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/prolog.php b/_piecrust/libs/Geshi/geshi/prolog.php deleted file mode 100644 index 7488497..0000000 --- a/_piecrust/libs/Geshi/geshi/prolog.php +++ /dev/null @@ -1,143 +0,0 @@ - 'Prolog', - 'COMMENT_SINGLE' => array(1 => '%'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'HARDQUOTE' => array("'", "'"), - 'HARDESCAPE' => array("\'"), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'NUMBERS' => - GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_FLT_SCI_ZERO, - 'KEYWORDS' => array( - 1 => array( - 'abolish','abs','arg','asserta','assertz','at_end_of_stream','atan', - 'atom','atom_chars','atom_codes','atom_concat','atom_length', - 'atomic','bagof','call','catch','ceiling','char_code', - 'char_conversion','clause','close','compound','consult','copy_term', - 'cos','current_char_conversion','current_input','current_op', - 'current_output','current_predicate','current_prolog_flag', - 'discontiguous','dynamic','ensure_loaded','exp','fail','findall', - 'float','float_fractional_part','float_integer_part','floor', - 'flush_output','functor','get_byte','get_char','get_code','halt', - 'include','initialization','integer','is','listing','log','mod', - 'multifile','nl','nonvar','notrace','number','number_chars', - 'number_codes','once','op','open','peek_byte','peek_char', - 'peek_code','put_byte','put_char','put_code','read','read_term', - 'rem','repeat','retract','round','set_input','set_output', - 'set_prolog_flag','set_stream_position','setof','sign','sin','sqrt', - 'stream_property','sub_atom','throw','trace','true','truncate', - 'unify_with_occurs_check','univ','var','write','write_canonical', - 'write_term','writeq' - ) - ), - 'SYMBOLS' => array( - 0 => array('(', ')', '[', ']', '{', '}',), - 1 => array('?-', ':-', '=:='), - 2 => array('\-', '\+', '\*', '\/'), - 3 => array('-', '+', '*', '/'), - 4 => array('.', ':', ',', ';'), - 5 => array('!', '@', '&', '|'), - 6 => array('<', '>', '=') - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #990000;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 'HARD' => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;', - 'HARD' => 'color: #0000ff;' - ), - 'NUMBERS' => array( - 0 => 'color: #800080;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;', - 1 => 'color: #339933;', - 2 => 'color: #339933;', - 3 => 'color: #339933;', - 4 => 'color: #339933;', - 5 => 'color: #339933;', - 6 => 'color: #339933;' - ), - 'REGEXPS' => array( - 0 => 'color: #008080;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => 'http://pauillac.inria.fr/~deransar/prolog/bips.html' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - //Variables - 0 => "(? GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/properties.php b/_piecrust/libs/Geshi/geshi/properties.php deleted file mode 100644 index ba91639..0000000 --- a/_piecrust/libs/Geshi/geshi/properties.php +++ /dev/null @@ -1,127 +0,0 @@ - 'PROPERTIES', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - /* Common used variables */ - 1 => array( - '${user.home}' - ), - ), - 'SYMBOLS' => array( - '[', ']', '=' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'font-weight: bold;', - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => '' - ), - 'BRACKETS' => array( - 0 => '' - ), - 'STRINGS' => array( - 0 => 'color: #933;' - ), - 'NUMBERS' => array( - 0 => '' - ), - 'METHODS' => array( - 0 => '' - ), - 'SYMBOLS' => array( - 0 => 'color: #000000;' - ), - 'REGEXPS' => array( - 0 => 'color: #000080; font-weight:bold;', - 1 => 'color: #008000; font-weight:bold;' - ), - 'SCRIPT' => array( - 0 => '' - ) - ), - 'URLS' => array( - 1 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - //Entry names - 0 => array( - GESHI_SEARCH => '^(\s*)([.a-zA-Z0-9_\-]+)(\s*=)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ), - //Entry values - 1 => array( - // Evil hackery to get around GeSHi bug: <>" and ; are added so s can be matched - // Explicit match on variable names because if a comment is before the first < of the span - // gets chewed up... - GESHI_SEARCH => '([<>";a-zA-Z0-9_]+\s*)=(.*)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1=', - GESHI_AFTER => '' - ) - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/providex.php b/_piecrust/libs/Geshi/geshi/providex.php deleted file mode 100644 index d6aab00..0000000 --- a/_piecrust/libs/Geshi/geshi/providex.php +++ /dev/null @@ -1,299 +0,0 @@ - 'ProvideX', - 'COMMENT_SINGLE' => array(1 => '!'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - // Single-Line Comments using REM command - 2 => "/\bREM\b.*?$/i" - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - // Directives - '*break', '*continue', '*end', '*escape', '*next', '*proceed', - '*retry', '*return', '*same', 'accept', 'add index', 'addr', - 'auto', 'begin', 'break', 'button', 'bye', 'call', 'case', - 'chart', 'check_box', 'class', 'clear', 'clip_board', 'close', - 'continue', 'control', 'create required', 'create table', - 'cwdir', 'data', 'day_format', 'def', 'default', 'defctl', - 'defprt', 'deftty', 'delete required', 'dictionary', 'dim', 'direct', - 'directory', 'disable', 'drop', 'drop_box', 'dump', 'edit', - 'else', 'enable', 'end switch', 'end', 'end_if', 'endtrace', - 'enter', 'erase', 'error_handler', 'escape', 'event', 'execute', - 'exit', 'exitto', 'extract', 'file', 'find', 'floating point', - 'for', 'function', 'get_file_box', 'gosub', 'goto', 'grid', - 'h_scrollbar', 'hide', 'if', 'index', 'indexed', 'input', - 'insert', 'invoke', 'iolist', 'keyed', 'let', 'like', - 'line_switch', 'list', 'list_box', 'load', 'local', 'lock', - 'long_form', 'menu_bar', 'merge', 'message_lib', 'mnemonic', - 'msgbox', 'multi_line', 'multi_media', 'next', 'object', 'obtain', - 'on', 'open', 'password', 'perform', 'pop', 'popup_menu', - 'precision', 'prefix', 'preinput', 'print', 'process', 'program', - 'property', 'purge', 'quit', 'radio_button', 'randomize', - 'read', 'record', 'redim', 'refile', 'release', 'rem', 'remove', - 'rename', 'renumber', 'repeat', 'reset', 'restore', 'retry', - 'return', 'round', 'run', 'save', 'select', 'serial', 'server', - 'set_focus', 'set_nbf', 'set_param', 'setctl', 'setday', 'setdev', - 'setdrive', 'seterr', 'setesc', 'setfid', 'setmouse', 'settime', - 'settrace', 'short_form', 'show', 'sort', 'start', 'static', - 'step', 'stop', 'switch', 'system_help', 'system_jrnl', 'table', - 'then', 'to', 'translate', 'tristate_box', 'unlock', 'until', - 'update', 'user_lex', 'v_scrollbar', 'vardrop_box', 'varlist_box', - 'via', 'video_palette', 'wait', 'wend', 'while', 'winprt_setup', - 'with', 'write' - ), - 2 => array( - // System Functions - '@x', '@y', 'abs', 'acs', 'and', 'arg', 'asc', 'asn', 'ath', - 'atn', 'bin', 'bsz', 'chg', 'chr', 'cmp', 'cos', 'cpl', - 'crc', 'cse', 'ctl', 'cvs', 'dec', 'dir', 'dll', 'dsk', - 'dte', 'env', 'ept', 'err', 'evn', 'evs', 'exp', 'ffn', - 'fib', 'fid', 'fin', 'fpt', 'gap', 'gbl', 'gep', 'hsa', - 'hsh', 'hta', 'hwn', 'i3e', 'ind', 'int', 'iol', 'ior', - 'jul', 'jst', 'kec', 'kef', 'kel', 'ken', 'kep', 'key', - 'kgn', 'lcs', 'len', 'lno', 'log', 'lrc', 'lst', 'max', - 'mem', 'mid', 'min', 'mnm', 'mod', 'msg', 'msk', 'mxc', - 'mxl', 'new', 'not', 'nul', 'num', 'obj', 'opt', 'pad', - 'pck', 'pfx', 'pgm', 'pos', 'prc', 'prm', 'pth', 'pub', - 'rcd', 'rdx', 'rec', 'ref', 'rnd', 'rno', 'sep', 'sgn', - 'sin', 'sqr', 'srt', 'ssz', 'stk', 'stp', 'str', 'sub', - 'swp', 'sys', 'tan', 'tbl', 'tcb', 'tmr', 'trx', 'tsk', - 'txh', 'txw', 'ucp', 'ucs', 'upk', 'vin', 'vis', 'xeq', - 'xfa', 'xor', '_obj' - ), - 3 => array( - // System Variables - // Vars that are duplicates of functions - // 'ctl', 'err', 'pfx', 'prm', 'rnd', 'sep', 'sys', - 'bkg', 'chn', 'day', 'dlm', 'dsz', 'eom', 'ers', 'esc', - 'gfn', 'gid', 'hfn', 'hlp', 'hwd', 'lfa', 'lfo', 'lip', - 'lpg', 'lwd', 'mse', 'msl', 'nar', 'nid', 'pgn', 'psz', - 'quo', 'ret', 'sid', 'ssn', 'tim', 'tme', 'tms', 'tsm', - 'uid', 'unt', 'who' - - ), - 4 => array( - // Nomads Variables - '%Flmaint_Lib$', '%Flmaint_Msg$', '%Nomads_Activation_Ok', - '%Nomads_Auto_Qry', '%Nomads_Disable_Debug', - '%Nomads_Disable_Trace', '%Nomads_Fkey_Handler$', - '%Nomads_Fkey_Tbl$', '%Nomads_Notest', '%Nomads_Onexit$', - '%Nomads_Post_Display', '%Nomads_Pre_Display$', - '%Nomads_Process$', '%Nomads_Trace_File$', - '%Nomad_Actv_Folder_Colors$', '%Nomad_Automation_Enabled', - '%Nomad_Auto_Close', '%Nomad_Center_Wdw', '%Nomad_Concurrent_Wdw', - '%Nomad_Custom_Define', '%Nomad_Custom_Dir$', - '%Nomad_Custom_Genmtc', '%Nomad_Custom_Skip_Definition', - '%Nomad_Def_Sfx$', '%Nomad_Enter_Tab', '%Nomad_Esc_Sel', - '%Nomad_Isjavx', '%Nomad_Iswindx', '%Nomad_Iswindx$', - '%Nomad_Menu$', '%Nomad_Menu_Leftedge_Clr$', - '%Nomad_Menu_Textbackground_Clr$', '%Nomad_Mln_Sep$', - '%Nomad_Msgmnt$', '%Nomad_Noplusw', '%Nomad_No_Customize', - '%Nomad_Object_Persistence', '%Nomad_Object_Resize', - '%Nomad_Open_Load', '%Nomad_Override_Font$', - '%Nomad_Palette_Loaded', '%Nomad_Panel_Info_Force', - '%Nomad_Panel_Info_Prog$', '%Nomad_Pnl_Def_Colour$', - '%Nomad_Pnl_Def_Font$', '%Nomad_Prg_Cache', '%Nomad_Qry_Attr$', - '%Nomad_Qry_Btn$', '%Nomad_Qry_Clear_Start', '%Nomad_Qry_Tip$', - '%Nomad_Qry_Wide', '%Nomad_Query_Clear_Status', '%Nomad_Query_Kno', - '%Nomad_Query_No_Gray', '%Nomad_Query_Odb_Ignore', - '%Nomad_Query_Retkno', '%Nomad_Query_Sbar_Max', - '%Nomad_Relative_Wdw', '%Nomad_Save_Qry_Path', '%Nomad_Script_Fn', - '%Nomad_Script_Log', '%Nomad_Script_Wdw', - '%Nomad_Skip_Change_Logic', '%Nomad_Skip_Onselect_Logic', - '%Nomad_Stk$', '%Nomad_Tab_Dir', '%Nomad_Timeout', - '%Nomad_Turbo_Off', '%Nomad_Visual_Effect', - '%Nomad_Visual_Override', '%Nomad_Win_Ver', '%Nomad_Xchar', - '%Nomad_Xmax', '%Nomad_Ychar', '%Nomad_Ymax', '%Scr_Def_Attr$', - '%Scr_Def_H_Fl$', '%Scr_Def_H_Id$', '%Scr_Lib', '%Scr_Lib$', - '%Z__Usr_Sec$', 'Alternate_Panel$', 'Alternate_Panel_Type$', - 'Arg_1$', 'Arg_10$', 'Arg_11$', 'Arg_12$', 'Arg_13$', 'Arg_14$', - 'Arg_15$', 'Arg_16$', 'Arg_17$', 'Arg_18$', 'Arg_19$', 'Arg_2$', - 'Arg_20$', 'Arg_3$', 'Arg_4$', 'Arg_5$', 'Arg_6$', 'Arg_7$', - 'Arg_8$', 'Arg_9$', 'Change_Flg', 'Cmd_Str$', 'Default_Prog$', - 'Disp_Cmd$', 'Entire_Record$', 'Exit_Cmd$', 'Fldr_Default_Prog$', - 'Folder_Id$', 'Id', 'Id$', 'Ignore_Exit', 'Initialize_Flg', - 'Init_Text$', 'Init_Val$', 'Main_Scrn_K$', 'Mnu_Ln$', - 'Next_Folder', 'Next_Id', 'Next_Id$', 'No_Flush', 'Prime_Key$', - 'Prior_Val', 'Prior_Val$', 'Qry_Val$', 'Refresh_Flg', - 'Replacement_Folder$', 'Replacement_Lib$', 'Replacement_Scrn$', - 'Scrn_Id$', 'Scrn_K$', 'Scrn_Lib$', 'Tab_Table$', '_Eom$' - ), - 5 => array( - // Mnemonics - "'!w'", "'*c'", "'*h'", "'*i'", "'*o'", "'*r'", "'*x'", - "'+b'", "'+d'", "'+e'", "'+f'", "'+i'", "'+n'", - "'+p'", "'+s'", "'+t'", "'+u'", "'+v'", "'+w'", "'+x'", - "'+z'", "'-b'", "'-d'", "'-e'", "'-f'", "'-i'", - "'-n'", "'-p'", "'-s'", "'-t'", "'-u'", "'-v'", "'-w'", - "'-x'", "'-z'", "'2d'", "'3d'", "'4d'", "'@@'", "'ab'", - "'arc'", "'at'", "'backgr'", "'bb'", "'be'", "'beep'", - "'bg'", "'bi'", "'bj'", "'bk'", "'black'", "'blue'", - "'bm'", "'bo'", "'box'", "'br'", "'bs'", "'bt'", "'bu'", - "'bw'", "'bx'", "'caption'", "'ce'", "'cf'", "'ch'", - "'ci'", "'circle'", "'cl'", "'colour'", "'cp'", "'cpi'", - "'cr'", "'cs'", "'cursor'", "'cyan''_cyan'", "'dc'", - "'default'", "'df'", "'dialogue'", "'dn'", "'do'", - "'drop'", "'eb'", "'ee'", "'ef'", "'eg'", "'ei'", "'ej'", - "'el'", "'em'", "'eo'", "'ep'", "'er'", "'es'", "'et'", - "'eu'", "'ew'", "'ff'", "'fill'", "'fl'", "'font'", - "'frame'", "'gd'", "'ge'", "'gf'", "'goto'", "'green'", - "'gs'", "'hide'", "'ic'", "'image'", "'jc'", - "'jd'", "'jl'", "'jn'", "'jr'", "'js'", "'l6'", "'l8'", - "'lc'", "'ld'", "'lf'", "'li'", "'line'", "'lm'", - "'lpi'", "'lt'", "'magenta'", "'maxsize'", "'me'", - "'message'", "'minsize'", "'mn'", "'mode'", - "'move'", "'mp'", "'ms'", "'ni'", "'offset'", "'option'", - "'pe'", "'pen'", "'picture'", "'pie'", "'pm'", "'polygon'", - "'pop'", "'ps'", "'push'", "'rb'", "'rc'", "'rectangle'", - "'red'", "'rl'", "'rm'", "'rp'", "'rs'", "'rt'", "'sb'", - "'scroll'", "'sd'", "'se'", "'sf'", "'show'", "'size'", - "'sl'", "'sn'", "'sp'", "'sr'", "'swap'", "'sx'", "'text'", - "'textwdw'", "'tr'", "'tw'", "'uc'", "'up'", "'vt'", "'wa'", - "'wc'", "'wd'", "'wg'", "'white'", "'window'", "'wm'", - "'wp'", "'wr'", "'wrap'", "'ws'", "'wx'", "'xp'", "'yellow'", - "'zx'", "'_black'", "'_blue'", "'_colour'", "'_green'", - "'_magenta'", "'_red'", "'_white'", "'_yellow'" - ), - ), - 'SYMBOLS' => array( - 0 => array('+', '-', '*', '/', '^', '|'), - 1 => array('++', '--', '+=', '-=', '*=', '/=', '^=', '|='), - 2 => array('<', '>', '='), - 3 => array('(', ')', '[', ']', '{', '}'), - 4 => array(',', '@', ';', '\\') - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: navy;', // Directives - 2 => 'color: blue;', // System Functions - 3 => 'color: blue;', // System Variables - 4 => 'color: #6A5ACD; font-style: italic;', // Nomads Global Variables - 5 => 'color: #BDB76B;', // Mnemonics - ), - 'COMMENTS' => array( - 1 => 'color: #008080; font-style: italic;', - 2 => 'color: #008080;', - 'MULTI' => 'color: #008080; font-style: italic;' - ), - 'BRACKETS' => array( - 0 => 'color: #000066;' - ), - 'STRINGS' => array( - 0 => 'color: green;' - ), - 'NUMBERS' => array( - 0 => 'color: #00008B;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #008000;', - 1 => 'color: #000099;', - 2 => 'color: #000099;', - 3 => 'color: #0000C9;', - 4 => 'color: #000099;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - 1 => 'color: #006400; font-weight: bold', - 2 => 'color: #6A5ACD;' - ) - ), - 'URLS' => array( - 1 => 'http://www.allbasic.info./wiki/index.php/PX:Directive_{FNAME}', - 2 => 'http://www.allbasic.info./wiki/index.php/PX:System_function_{FNAME}', - 3 => 'http://www.allbasic.info./wiki/index.php/PX:System_variable_{FNAME}', - 4 => 'http://www.allbasic.info./wiki/index.php/PX:Nomads_{FNAME}', - 5 => 'http://www.allbasic.info./wiki/index.php/PX:Mnemonic_{FNAMEU}' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => "'" - ), - 'REGEXPS' => array( - 1 => array( - // Line Labels - GESHI_SEARCH => '([[:space:]])([a-zA-Z_][a-zA-Z0-9_]+)(:)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ), - 2 => array( - // Global String Variables - GESHI_SEARCH => '(\%)([a-zA-Z_][a-zA-Z0-9_]+)(\$)', - GESHI_REPLACE => '\\1\\2\\3', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ) - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'NUMBERS' => GESHI_NEVER - ) - ), - 'TAB_WIDTH' => 4 -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/purebasic.php b/_piecrust/libs/Geshi/geshi/purebasic.php deleted file mode 100644 index c3cfc08..0000000 --- a/_piecrust/libs/Geshi/geshi/purebasic.php +++ /dev/null @@ -1,303 +0,0 @@ - 'PureBasic', - 'COMMENT_SINGLE' => array( 1 => ";" ), - 'COMMENT_MULTI' => array( ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - // Keywords - 'And', 'As', 'Break', 'CallDebugger', 'Case', 'CompilerCase', 'CompilerDefault', 'CompilerElse', 'CompilerEndIf', 'CompilerEndSelect', - 'CompilerError', 'CompilerIf', 'CompilerSelect', 'Continue', 'Data', 'DataSection', 'EndDataSection', 'Debug', 'DebugLevel', 'Declare', - 'DeclareCDLL', 'DeclareDLL', 'Default', 'Define', 'Dim', 'DisableASM', 'DisableDebugger', 'DisableExplicit', 'Else', 'ElseIf', 'EnableASM', - 'EnableDebugger', 'EnableExplicit', 'End', 'EndEnumeration', 'EndIf', 'EndImport', 'EndInterface', 'EndMacro', 'EndProcedure', - 'EndSelect', 'EndStructure', 'EndStructureUnion', 'EndWith', 'Enumeration', 'Extends', 'FakeReturn', 'For', 'Next', 'ForEach', - 'ForEver', 'Global', 'Gosub', 'Goto', 'If', 'Import', 'ImportC', 'IncludeBinary', 'IncludeFile', 'IncludePath', 'Interface', 'Macro', - 'NewList', 'Not', 'Or', 'Procedure', 'ProcedureC', 'ProcedureCDLL', 'ProcedureDLL', 'ProcedureReturn', 'Protected', 'Prototype', - 'PrototypeC', 'Read', 'ReDim', 'Repeat', 'Until', 'Restore', 'Return', 'Select', 'Shared', 'Static', 'Step', 'Structure', 'StructureUnion', - 'Swap', 'To', 'Wend', 'While', 'With', 'XIncludeFile', 'XOr' - ), - 2 => array( - // All Functions - 'Abs', 'ACos', 'Add3DArchive', 'AddBillboard', 'AddDate', 'AddElement', 'AddGadgetColumn', 'AddGadgetItem', - 'AddKeyboardShortcut', 'AddMaterialLayer', 'AddPackFile', 'AddPackMemory', 'AddStatusBarField', 'AddSysTrayIcon', - 'AllocateMemory', 'AmbientColor', 'AnimateEntity', 'Asc', 'ASin', 'ATan', 'AudioCDLength', 'AudioCDName', 'AudioCDStatus', - 'AudioCDTrackLength', 'AudioCDTracks', 'AudioCDTrackSeconds', 'AvailableProgramOutput', 'AvailableScreenMemory', - 'BackColor', 'Base64Decoder', 'Base64Encoder', 'BillboardGroupLocate', 'BillboardGroupMaterial', 'BillboardGroupX', - 'BillboardGroupY', 'BillboardGroupZ', 'BillboardHeight', 'BillboardLocate', 'BillboardWidth', 'BillboardX', 'BillboardY', 'BillboardZ', - 'Bin', 'BinQ', 'Blue', 'Box', 'ButtonGadget', 'ButtonImageGadget', 'CalendarGadget', 'CallCFunction', 'CallCFunctionFast', - 'CallFunction', 'CallFunctionFast', 'CameraBackColor', 'CameraFOV', 'CameraLocate', 'CameraLookAt', 'CameraProjection', - 'CameraRange', 'CameraRenderMode', 'CameraX', 'CameraY', 'CameraZ', 'CatchImage', 'CatchSound', 'CatchSprite', - 'CatchXML', 'ChangeAlphaIntensity', 'ChangeCurrentElement', 'ChangeGamma', 'ChangeListIconGadgetDisplay', - 'ChangeSysTrayIcon', 'CheckBoxGadget', 'CheckEntityCollision', 'CheckFilename', 'ChildXMLNode', 'Chr', 'Circle', - 'ClearBillboards', 'ClearClipboard', 'ClearConsole', 'ClearError', 'ClearGadgetItemList', 'ClearList', 'ClearScreen', 'ClipSprite', - 'CloseConsole', 'CloseDatabase', 'CloseFile', 'CloseGadgetList', 'CloseHelp', 'CloseLibrary', 'CloseNetworkConnection', - 'CloseNetworkServer', 'ClosePack', 'ClosePreferences', 'CloseProgram', 'CloseScreen', 'CloseSubMenu', 'CloseWindow', - 'ColorRequester', 'ComboBoxGadget', 'CompareMemory', 'CompareMemoryString', 'ConnectionID', 'ConsoleColor', - 'ConsoleCursor', 'ConsoleError', 'ConsoleLocate', 'ConsoleTitle', 'ContainerGadget', 'CopyDirectory', 'CopyEntity', - 'CopyFile', 'CopyImage', 'CopyLight', 'CopyMaterial', 'CopyMemory', 'CopyMemoryString', 'CopyMesh', 'CopySprite', - 'CopyTexture', 'CopyXMLNode', 'Cos', 'CountBillboards', 'CountGadgetItems', 'CountLibraryFunctions', 'CountList', - 'CountMaterialLayers', 'CountProgramParameters', 'CountRenderedTriangles', 'CountString', 'CRC32Fingerprint', - 'CreateBillboardGroup', 'CreateCamera', 'CreateDirectory', 'CreateEntity', 'CreateFile', 'CreateGadgetList', - 'CreateImage', 'CreateLight', 'CreateMaterial', 'CreateMenu', 'CreateMesh', 'CreateMutex', 'CreateNetworkServer', - 'CreatePack', 'CreatePalette', 'CreateParticleEmitter', 'CreatePopupMenu', 'CreatePreferences', 'CreateSprite', - 'CreateSprite3D', 'CreateStatusBar', 'CreateTerrain', 'CreateTexture', 'CreateThread', 'CreateToolBar', 'CreateXML', - 'CreateXMLNode', 'DatabaseColumnName', 'DatabaseColumns', 'DatabaseColumnType', 'DatabaseDriverDescription', - 'DatabaseDriverName', 'DatabaseError', 'DatabaseQuery', 'DatabaseUpdate', 'Date', 'DateGadget', 'Day', 'DayOfWeek', - 'DayOfYear', 'DefaultPrinter', 'Defined', 'Delay', 'DeleteDirectory', 'DeleteElement', 'DeleteFile', 'DeleteXMLNode', - 'DESFingerprint', 'DesktopDepth', 'DesktopFrequency', 'DesktopHeight', 'DesktopMouseX', 'DesktopMouseY', 'DesktopName', - 'DesktopWidth', 'DirectoryEntryAttributes', 'DirectoryEntryDate', 'DirectoryEntryName', 'DirectoryEntrySize', - 'DirectoryEntryType', 'DisableGadget', 'DisableMaterialLighting', 'DisableMenuItem', 'DisableToolBarButton', 'DisableWindow', - 'DisASMCommand', 'DisplayAlphaSprite', 'DisplayPalette', 'DisplayPopupMenu', 'DisplayRGBFilter', 'DisplayShadowSprite', - 'DisplaySolidSprite', 'DisplaySprite', 'DisplaySprite3D', 'DisplayTranslucentSprite', 'DisplayTransparentSprite', 'DragFiles', - 'DragImage', 'DragOSFormats', 'DragPrivate', 'DragText', 'DrawAlphaImage', 'DrawImage', 'DrawingBuffer', - 'DrawingBufferPitch', 'DrawingBufferPixelFormat', 'DrawingFont', 'DrawingMode', 'DrawText', 'EditorGadget', - 'egrid_AddColumn', 'egrid_AddRows', 'egrid_AppendCells', 'egrid_ClearRows', 'egrid_CopyCells', - 'egrid_CreateCellCallback', 'egrid_CreateGrid', 'egrid_DeleteCells', 'egrid_FastDeleteCells', 'egrid_FreeGrid', - 'egrid_GetCellSelection', 'egrid_GetCellText', 'egrid_GetColumnOrderArray', 'egrid_HasSelectedCellChanged', 'egrid_Height', - 'egrid_HideEdit', 'egrid_HideGrid', 'egrid_MakeCellVisible', 'egrid_NumberOfColumns', 'egrid_NumberOfRows', - 'egrid_PasteCells', 'egrid_Register', 'egrid_RemoveCellCallback', 'egrid_RemoveColumn', 'egrid_RemoveRow', 'egrid_Resize', - 'egrid_SelectCell', 'egrid_SelectedColumn', 'egrid_SelectedRow', 'egrid_SetCellSelection', 'egrid_SetCellText', - 'egrid_SetColumnOrderArray', 'egrid_SetHeaderFont', 'egrid_SetHeaderHeight', 'egrid_SetOption', 'egrid_Width', 'egrid_x', - 'egrid_y', 'EjectAudioCD', 'ElapsedMilliseconds', 'Ellipse', 'EnableGadgetDrop', 'EnableGraphicalConsole', - 'EnableWindowDrop', 'EnableWorldCollisions', 'EnableWorldPhysics', 'Engine3DFrameRate', 'EntityAngleX', - 'EntityAnimationLength', 'EntityLocate', 'EntityMaterial', 'EntityMesh', 'EntityPhysicBody', 'EntityRenderMode', - 'EntityX', 'EntityY', 'EntityZ', 'EnvironmentVariableName', 'EnvironmentVariableValue', 'Eof', 'EventClient', - 'EventDropAction', 'EventDropBuffer', 'EventDropFiles', 'EventDropImage', 'EventDropPrivate', 'EventDropSize', - 'EventDropText', 'EventDropType', 'EventDropX', 'EventDropY', 'EventGadget', 'EventlParam', 'EventMenu', 'EventServer', - 'EventType', 'EventWindow', 'EventwParam', 'ExamineDatabaseDrivers', 'ExamineDesktops', 'ExamineDirectory', - 'ExamineEnvironmentVariables', 'ExamineIPAddresses', 'ExamineJoystick', 'ExamineKeyboard', 'ExamineLibraryFunctions', - 'ExamineMouse', 'ExaminePreferenceGroups', 'ExaminePreferenceKeys', 'ExamineScreenModes', 'ExamineWorldCollisions', - 'ExamineXMLAttributes', 'ExplorerComboGadget', 'ExplorerListGadget', 'ExplorerTreeGadget', 'ExportXML', - 'ExportXMLSize', 'FileBuffersSize', 'FileID', 'FileSeek', 'FileSize', 'FillArea', 'FindString', 'FinishDirectory', - 'FirstDatabaseRow', 'FirstElement', 'FirstWorldCollisionEntity', 'FlipBuffers', 'FlushFileBuffers', 'Fog', 'FontID', - 'FontRequester', 'FormatDate', 'FormatXML', 'Frame3DGadget', 'FreeBillboardGroup', 'FreeCamera', 'FreeEntity', - 'FreeFont', 'FreeGadget', 'FreeImage', 'FreeLight', 'FreeMaterial', 'FreeMemory', 'FreeMenu', 'FreeMesh', - 'FreeModule', 'FreeMovie', 'FreeMutex', 'FreePalette', 'FreeParticleEmitter', 'FreeSound', 'FreeSprite', - 'FreeSprite3D', 'FreeStatusBar', 'FreeTexture', 'FreeToolBar', 'FreeXML', 'FrontColor', 'GadgetHeight', 'GadgetID', - 'GadgetItemID', 'GadgetToolTip', 'GadgetType', 'GadgetWidth', 'GadgetX', 'GadgetY', 'GetActiveGadget', - 'GetActiveWindow', 'GetClientIP', 'GetClientPort', 'GetClipboardImage', 'GetClipboardText', 'GetCurrentDirectory', - 'GetCurrentEIP', 'GetDatabaseDouble', 'GetDatabaseFloat', 'GetDatabaseLong', 'GetDatabaseQuad', 'GetDatabaseString', - 'GetDisASMString', 'GetEntityAnimationTime', 'GetEntityFriction', 'GetEntityMass', 'GetEnvironmentVariable', - 'GetErrorAddress', 'GetErrorCounter', 'GetErrorDescription', 'GetErrorDLL', 'GetErrorLineNR', 'GetErrorModuleName', - 'GetErrorNumber', 'GetErrorRegister', 'GetExtensionPart', 'GetFileAttributes', 'GetFileDate', 'GetFilePart', 'GetFunction', - 'GetFunctionEntry', 'GetGadgetAttribute', 'GetGadgetColor', 'GetGadgetData', 'GetGadgetFont', - 'GetGadgetItemAttribute', 'GetGadgetItemColor', 'GetGadgetItemData', 'GetGadgetItemState', 'GetGadgetItemText', - 'GetGadgetState', 'GetGadgetText', 'GetHomeDirectory', 'GetMenuItemState', 'GetMenuItemText', 'GetMenuTitleText', - 'GetModulePosition', 'GetModuleRow', 'GetPaletteColor', 'GetPathPart', 'GetTemporaryDirectory', - 'GetToolBarButtonState', 'GetWindowColor', 'GetWindowState', 'GetWindowTitle', 'GetXMLAttribute', 'GetXMLEncoding', - 'GetXMLNodeName', 'GetXMLNodeOffset', 'GetXMLNodeText', 'GetXMLStandalone', 'GoToEIP', 'GrabImage', 'GrabSprite', - 'Green', 'Hex', 'HexQ', 'HideBillboardGroup', 'HideEntity', 'HideGadget', 'HideLight', 'HideMenu', 'HideParticleEmitter', - 'HideWindow', 'Hostname', 'Hour', 'HyperLinkGadget', 'ImageDepth', 'ImageGadget', 'ImageHeight', 'ImageID', - 'ImageOutput', 'ImageWidth', 'InitAudioCD', 'InitEngine3D', 'InitJoystick', 'InitKeyboard', 'InitMouse', 'InitMovie', - 'InitNetwork', 'InitPalette', 'InitScintilla', 'InitSound', 'InitSprite', 'InitSprite3D', 'Inkey', 'Input', 'InputRequester', - 'InsertElement', 'Int', 'IntQ', 'IPAddressField', 'IPAddressGadget', 'IPString', 'IsBillboardGroup', 'IsCamera', 'IsDatabase', - 'IsDirectory', 'IsEntity', 'IsFile', 'IsFont', 'IsGadget', 'IsImage', 'IsLibrary', 'IsLight', 'IsMaterial', 'IsMenu', 'IsMesh', - 'IsModule', 'IsMovie', 'IsPalette', 'IsParticleEmitter', 'IsProgram', 'IsScreenActive', 'IsSound', 'IsSprite', 'IsSprite3D', - 'IsStatusBar', 'IsSysTrayIcon', 'IsTexture', 'IsThread', 'IsToolBar', 'IsWindow', 'IsXML', 'JoystickAxisX', 'JoystickAxisY', - 'JoystickButton', 'KeyboardInkey', 'KeyboardMode', 'KeyboardPushed', 'KeyboardReleased', 'KillProgram', 'KillThread', - 'LastElement', 'LCase', 'Left', 'Len', 'LibraryFunctionAddress', 'LibraryFunctionName', 'LibraryID', 'LightColor', - 'LightLocate', 'LightSpecularColor', 'Line', 'LineXY', 'ListIconGadget', 'ListIndex', 'ListViewGadget', 'LoadFont', - 'LoadImage', 'LoadMesh', 'LoadModule', 'LoadMovie', 'LoadPalette', 'LoadSound', 'LoadSprite', 'LoadTexture', - 'LoadWorld', 'LoadXML', 'Loc', 'LockMutex', 'Lof', 'Log', 'Log10', 'LSet', 'LTrim', 'MainXMLNode', 'MakeIPAddress', - 'MaterialAmbientColor', 'MaterialBlendingMode', 'MaterialDiffuseColor', 'MaterialFilteringMode', 'MaterialID', - 'MaterialShadingMode', 'MaterialSpecularColor', 'MD5FileFingerprint', 'MD5Fingerprint', 'MDIGadget', 'MemorySize', - 'MemoryStringLength', 'MenuBar', 'MenuHeight', 'MenuID', 'MenuItem', 'MenuTitle', 'MeshID', 'MessageRequester', - 'Mid', 'Minute', 'ModuleVolume', 'Month', 'MouseButton', 'MouseDeltaX', 'MouseDeltaY', 'MouseLocate', 'MouseWheel', - 'MouseX', 'MouseY', 'MoveBillboard', 'MoveBillboardGroup', 'MoveCamera', 'MoveEntity', 'MoveLight', 'MoveMemory', - 'MoveParticleEmitter', 'MoveXMLNode', 'MovieAudio', 'MovieHeight', 'MovieInfo', 'MovieLength', 'MovieSeek', - 'MovieStatus', 'MovieWidth', 'NetworkClientEvent', 'NetworkServerEvent', 'NewPrinterPage', 'NextDatabaseDriver', - 'NextDatabaseRow', 'NextDirectoryEntry', 'NextElement', 'NextEnvironmentVariable', 'NextIPAddress', - 'NextLibraryFunction', 'NextPackFile', 'NextPreferenceGroup', 'NextPreferenceKey', 'NextScreenMode', - 'NextSelectedFileName', 'NextWorldCollision', 'NextXMLAttribute', 'NextXMLNode', 'OffsetOf', 'OnErrorExit', - 'OnErrorGosub', 'OnErrorGoto', 'OnErrorResume', 'OpenComPort', 'OpenConsole', 'OpenDatabase', - 'OpenDatabaseRequester', 'OpenFile', 'OpenFileRequester', 'OpenGadgetList', 'OpenHelp', 'OpenLibrary', - 'OpenNetworkConnection', 'OpenPack', 'OpenPreferences', 'OpenScreen', 'OpenSubMenu', 'OpenWindow', - 'OpenWindowedScreen', 'OptionGadget', 'OSVersion', 'PackerCallback', 'PackFileSize', 'PackMemory', 'PanelGadget', - 'ParentXMLNode', 'Parse3DScripts', 'ParseDate', 'ParticleColorFader', 'ParticleColorRange', 'ParticleEmissionRate', - 'ParticleEmitterDirection', 'ParticleEmitterLocate', 'ParticleEmitterX', 'ParticleEmitterY', 'ParticleEmitterZ', - 'ParticleMaterial', 'ParticleSize', 'ParticleTimeToLive', 'ParticleVelocity', 'PathRequester', 'PauseAudioCD', - 'PauseMovie', 'PauseThread', 'PeekB', 'PeekC', 'PeekD', 'PeekF', 'PeekL', 'PeekQ', 'PeekS', 'PeekW', 'PlayAudioCD', - 'PlayModule', 'PlayMovie', 'PlaySound', 'Plot', 'Point', 'PokeB', 'PokeC', 'PokeD', 'PokeF', 'PokeL', 'PokeQ', 'PokeS', - 'PokeW', 'Pow', 'PreferenceComment', 'PreferenceGroup', 'PreferenceGroupName', 'PreferenceKeyName', - 'PreferenceKeyValue', 'PreviousDatabaseRow', 'PreviousElement', 'PreviousXMLNode', 'Print', 'PrinterOutput', - 'PrinterPageHeight', 'PrinterPageWidth', 'PrintN', 'PrintRequester', 'ProgramExitCode', 'ProgramFilename', - 'ProgramID', 'ProgramParameter', 'ProgramRunning', 'ProgressBarGadget', 'Random', 'RandomSeed', 'RawKey', - 'ReadByte', 'ReadCharacter', 'ReadConsoleData', 'ReadData', 'ReadDouble', 'ReadFile', 'ReadFloat', 'ReadLong', - 'ReadPreferenceDouble', 'ReadPreferenceFloat', 'ReadPreferenceLong', 'ReadPreferenceQuad', - 'ReadPreferenceString', 'ReadProgramData', 'ReadProgramError', 'ReadProgramString', 'ReadQuad', 'ReadString', - 'ReadStringFormat', 'ReadWord', 'ReAllocateMemory', 'ReceiveNetworkData', 'ReceiveNetworkFile', 'Red', - 'Reg_DeleteEmptyKey', 'Reg_DeleteKey', 'Reg_DeleteValue', 'Reg_GetErrorMsg', 'Reg_GetErrorNr', - 'Reg_GetValueTyp', 'Reg_ListSubKey', 'Reg_ListSubValue', 'Reg_ReadBinary', 'Reg_ReadExpandString', - 'Reg_ReadLong', 'Reg_ReadMultiLineString', 'Reg_ReadQuad', 'Reg_ReadString', 'Reg_WriteBinary', - 'Reg_WriteExpandString', 'Reg_WriteLong', 'Reg_WriteMultiLineString', 'Reg_WriteQuad', 'Reg_WriteString', - 'ReleaseMouse', 'RemoveBillboard', 'RemoveEnvironmentVariable', 'RemoveGadgetColumn', 'RemoveGadgetItem', - 'RemoveKeyboardShortcut', 'RemoveMaterialLayer', 'RemovePreferenceGroup', 'RemovePreferenceKey', - 'RemoveString', 'RemoveSysTrayIcon', 'RemoveXMLAttribute', 'RenameFile', 'RenderMovieFrame', 'RenderWorld', - 'ReplaceString', 'ResetList', 'ResizeBillboard', 'ResizeEntity', 'ResizeGadget', 'ResizeImage', 'ResizeMovie', - 'ResizeParticleEmitter', 'ResizeWindow', 'ResolveXMLAttributeName', 'ResolveXMLNodeName', 'ResumeAudioCD', - 'ResumeMovie', 'ResumeThread', 'RGB', 'Right', 'RootXMLNode', 'RotateBillboardGroup', 'RotateCamera', - 'RotateEntity', 'RotateMaterial', 'RotateSprite3D', 'Round', 'RSet', 'RTrim', 'RunProgram', 'SaveFileRequester', - 'SaveImage', 'SaveSprite', 'SaveXML', 'ScaleEntity', 'ScaleMaterial', 'ScintillaGadget', 'ScintillaSendMessage', - 'ScreenID', 'ScreenModeDepth', 'ScreenModeHeight', 'ScreenModeRefreshRate', 'ScreenModeWidth', - 'ScreenOutput', 'ScrollAreaGadget', 'ScrollBarGadget', 'ScrollMaterial', 'Second', 'SecondWorldCollisionEntity', - 'SelectedFilePattern', 'SelectedFontColor', 'SelectedFontName', 'SelectedFontSize', 'SelectedFontStyle', - 'SelectElement', 'SendNetworkData', 'SendNetworkFile', 'SendNetworkString', 'SetActiveGadget', - 'SetActiveWindow', 'SetClipboardImage', 'SetClipboardText', 'SetCurrentDirectory', 'SetDragCallback', - 'SetDropCallback', 'SetEntityAnimationTime', 'SetEntityFriction', 'SetEntityMass', 'SetEnvironmentVariable', - 'SetErrorNumber', 'SetFileAttributes', 'SetFileDate', 'SetFrameRate', 'SetGadgetAttribute', 'SetGadgetColor', - 'SetGadgetData', 'SetGadgetFont', 'SetGadgetItemAttribute', 'SetGadgetItemColor', 'SetGadgetItemData', - 'SetGadgetItemState', 'SetGadgetItemText', 'SetGadgetState', 'SetGadgetText', 'SetMenuItemState', - 'SetMenuItemText', 'SetMenuTitleText', 'SetMeshData', 'SetModulePosition', 'SetPaletteColor', 'SetRefreshRate', - 'SetToolBarButtonState', 'SetWindowCallback', 'SetWindowColor', 'SetWindowState', 'SetWindowTitle', - 'SetXMLAttribute', 'SetXMLEncoding', 'SetXMLNodeName', 'SetXMLNodeOffset', 'SetXMLNodeText', - 'SetXMLStandalone', 'Sin', 'SizeOf', 'SkyBox', 'SkyDome', 'SmartWindowRefresh', 'SortArray', 'SortList', - 'SortStructuredArray', 'SortStructuredList', 'SoundFrequency', 'SoundPan', 'SoundVolume', 'Space', - 'SpinGadget', 'SplitterGadget', 'Sprite3DBlendingMode', 'Sprite3DQuality', 'SpriteCollision', 'SpriteDepth', - 'SpriteHeight', 'SpriteID', 'SpriteOutput', 'SpritePixelCollision', 'SpriteWidth', 'Sqr', 'Start3D', 'StartDrawing', - 'StartPrinting', 'StartSpecialFX', 'StatusBarHeight', 'StatusBarIcon', 'StatusBarID', 'StatusBarText', - 'StickyWindow', 'Stop3D', 'StopAudioCD', 'StopDrawing', 'StopModule', 'StopMovie', 'StopPrinting', - 'StopSound', 'StopSpecialFX', 'Str', 'StrD', 'StrF', 'StringByteLength', 'StringField', 'StringGadget', 'StrQ', - 'StrU', 'Subsystem', 'SwapElements', 'SysTrayIconToolTip', 'Tan', 'TerrainHeight', 'TextGadget', 'TextHeight', - 'TextureHeight', 'TextureID', 'TextureOutput', 'TextureWidth', 'TextWidth', 'ThreadID', 'ThreadPriority', - 'ToolBarHeight', 'ToolBarID', 'ToolBarImageButton', 'ToolBarSeparator', 'ToolBarStandardButton', - 'ToolBarToolTip', 'TrackBarGadget', 'TransformSprite3D', 'TransparentSpriteColor', 'TreeGadget', 'Trim', - 'TruncateFile', 'TryLockMutex', 'UCase', 'UnlockMutex', 'UnpackMemory', 'UseAudioCD', 'UseBuffer', - 'UseGadgetList', 'UseJPEGImageDecoder', 'UseJPEGImageEncoder', 'UseODBCDatabase', 'UseOGGSoundDecoder', - 'UsePNGImageDecoder', 'UsePNGImageEncoder', 'UseTGAImageDecoder', 'UseTIFFImageDecoder', 'Val', 'ValD', - 'ValF', 'ValQ', 'WaitProgram', 'WaitThread', 'WaitWindowEvent', 'WebGadget', 'WebGadgetPath', 'WindowEvent', - 'WindowHeight', 'WindowID', 'WindowMouseX', 'WindowMouseY', 'WindowOutput', 'WindowWidth', 'WindowX', - 'WindowY', 'WorldGravity', 'WorldShadows', 'WriteByte', 'WriteCharacter', 'WriteConsoleData', 'WriteData', - 'WriteDouble', 'WriteFloat', 'WriteLong', 'WritePreferenceDouble', 'WritePreferenceFloat', 'WritePreferenceLong', - 'WritePreferenceQuad', 'WritePreferenceString', 'WriteProgramData', 'WriteProgramString', 'WriteProgramStringN', - 'WriteQuad', 'WriteString', 'WriteStringFormat', 'WriteStringN', 'WriteWord', 'XMLAttributeName', 'XMLAttributeValue', - 'XMLChildCount', 'XMLError', 'XMLErrorLine', 'XMLErrorPosition', 'XMLNodeFromID', 'XMLNodeFromPath', 'XMLNodePath', - 'XMLNodeType', 'XMLStatus', 'Year', 'ZoomSprite3D' - ), - 3 => array( - // some ASM instructions - 'AAA', 'AAD', 'AAM', 'AAS', 'ADC', 'ADD', 'AND', 'ARPL', 'BOUND', 'BSF', 'BSR', 'BSWAP', 'BT', 'BTC', 'BTR', - 'BTS', 'CALL', 'CBW', 'CDQ', 'CLC', 'CLD', 'CLI', 'CLTS', 'CMC', 'CMP', 'CMPS', 'CMPXCHG', 'CWD', 'CWDE', - 'DAA', 'DAS', 'DB', 'DD', 'DEC', 'DIV', 'DW', 'ENTER', 'ESC', 'F2XM1', 'FABS', 'FADD', 'FCHS', 'FCLEX', - 'FCOM', 'FDIV', 'FDIVR', 'FFREE', 'FINCSTP', 'FINIT', 'FLD', 'FLD1', 'FLDCW', 'FMUL', 'FNOP', 'FPATAN', - 'FPREM', 'FRNDINT', 'FSAVE', 'FSCALE', 'FSETPM', 'FSIN', 'FSQRT', 'FST', 'FSTENV', 'FSTSW', 'FSUB', - 'FSUBR', 'FTST', 'FUCOM', 'FWAIT', 'FXAM', 'FXCH', 'FXTRACT', 'FYL2X', 'FYL2XP1', 'HLT', 'IDIV', 'IMUL', - 'IN', 'INC', 'INS', 'INT', 'INTO', 'INVLPG', 'IRET', 'IRETD', 'JA', 'JAE', 'JB', 'JBE', 'JC', 'JCXZ', 'JE', 'JECXZ', - 'JG', 'JGE', 'JL', 'JLE', 'JMP', 'JNA', 'JNAE', 'JNB', 'JNBE', 'JNC', 'JNE', 'JNG', 'JNGE', 'JNL', 'JNLE', 'JNO', 'JNP', - 'JNS', 'JNZ', 'JO', 'JP', 'JPE', 'JPO', 'JS', 'JZ', 'LAHF', 'LAR', 'LDS', 'LEA', 'LEAVE', 'LES', 'LFS', 'LGDT', 'LGS', - 'LIDT', 'LLDT', 'LMSW', 'LOCK', 'LODS', 'LOOP', 'LOOPE', 'LOOPNE', 'LOOPNZ', 'LOOPZ', 'LSL', 'LSS', 'LTR', - 'MOV', 'MOVS', 'MOVSX', 'MOVZX', 'MUL', 'NEG', 'NOP', 'NOT', 'OR', 'OUT', 'OUTS', 'POP', 'POPA', 'POPAD', - 'POPF', 'POPFD', 'PUSH', 'PUSHA', 'PUSHAD', 'PUSHF', 'PUSHFD', 'RCL', 'RCR', 'REP', 'REPE', 'REPNE', - 'REPNZ', 'REPZ', 'RET', 'RETF', 'ROL', 'ROR', 'SAHF', 'SAL', 'SAR', 'SBB', 'SCAS', 'SETAE', 'SETB', 'SETBE', - 'SETC', 'SETE', 'SETG', 'SETGE', 'SETL', 'SETLE', 'SETNA', 'SETNAE', 'SETNB', 'SETNC', 'SETNE', 'SETNG', - 'SETNGE', 'SETNL', 'SETNLE', 'SETNO', 'SETNP', 'SETNS', 'SETNZ', 'SETO', 'SETP', 'SETPE', 'SETPO', - 'SETS', 'SETZ', 'SGDT', 'SHL', 'SHLD', 'SHR', 'SHRD', 'SIDT', 'SLDT', 'SMSW', 'STC', 'STD', 'STI', - 'STOS', 'STR', 'SUB', 'TEST', 'VERR', 'VERW', 'WAIT', 'WBINVD', 'XCHG', 'XLAT', 'XLATB', 'XOR' - ) - ), - 'SYMBOLS' => array( - '(', ')', '+', '-', '*', '/', '\\', '>', '<', '=', '<=', '>=', '&', '|', '!', '~', '<>', '>>', '<<', '%' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000066; font-weight: bold;', - 2 => 'color: #0000ff;', - 3 => 'color: #000fff;' - ), - 'COMMENTS' => array( - 1 => 'color: #ff0000; font-style: italic;', - 'MULTI' => 'color: #ff0000; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000066;' - ), - 'STRINGS' => array( - 0 => 'color: #009900;' - ), - 'NUMBERS' => array( - 0 => 'color: #CC0000;' - ), - 'METHODS' => array( - 1 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #000066;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - 1 => '\\' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => false, - 1 => false - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/python.php b/_piecrust/libs/Geshi/geshi/python.php deleted file mode 100644 index 0db4632..0000000 --- a/_piecrust/libs/Geshi/geshi/python.php +++ /dev/null @@ -1,237 +0,0 @@ - 'Python', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - //Longest quotemarks ALWAYS first - 'QUOTEMARKS' => array('"""', '"', "'"), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - - /* - ** Set 1: reserved words - ** http://python.org/doc/current/ref/keywords.html - */ - 1 => array( - 'and', 'del', 'for', 'is', 'raise', 'assert', 'elif', 'from', 'lambda', 'return', 'break', - 'else', 'global', 'not', 'try', 'class', 'except', 'if', 'or', 'while', 'continue', 'exec', - 'import', 'pass', 'yield', 'def', 'finally', 'in', 'print', 'with', 'as' - ), - - /* - ** Set 2: builtins - ** http://python.org/doc/current/lib/built-in-funcs.html - */ - 2 => array( - '__import__', 'abs', 'basestring', 'bool', 'callable', 'chr', 'classmethod', 'cmp', - 'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile', - 'file', 'filter', 'float', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', - 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'list', 'locals', - 'long', 'map', 'max', 'min', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'range', - 'raw_input', 'reduce', 'reload', 'reversed', 'round', 'set', 'setattr', 'slice', - 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode', - 'vars', 'xrange', 'zip', - // Built-in constants: http://python.org/doc/current/lib/node35.html - 'False', 'True', 'None', 'NotImplemented', 'Ellipsis', - // Built-in Exceptions: http://python.org/doc/current/lib/module-exceptions.html - 'Exception', 'StandardError', 'ArithmeticError', 'LookupError', 'EnvironmentError', - 'AssertionError', 'AttributeError', 'EOFError', 'FloatingPointError', 'IOError', - 'ImportError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'MemoryError', 'NameError', - 'NotImplementedError', 'OSError', 'OverflowError', 'ReferenceError', 'RuntimeError', - 'StopIteration', 'SyntaxError', 'SystemError', 'SystemExit', 'TypeError', - 'UnboundlocalError', 'UnicodeError', 'UnicodeEncodeError', 'UnicodeDecodeError', - 'UnicodeTranslateError', 'ValueError', 'WindowsError', 'ZeroDivisionError', 'Warning', - 'UserWarning', 'DeprecationWarning', 'PendingDeprecationWarning', 'SyntaxWarning', - 'RuntimeWarning', 'FutureWarning', - // self: this is a common python convention (but not a reserved word) - 'self', - // other - 'any', 'all' - ), - - /* - ** Set 3: standard library - ** http://python.org/doc/current/lib/modindex.html - */ - 3 => array( - '__builtin__', '__future__', '__main__', '_winreg', 'aifc', 'AL', 'al', 'anydbm', - 'array', 'asynchat', 'asyncore', 'atexit', 'audioop', 'base64', 'BaseHTTPServer', - 'Bastion', 'binascii', 'binhex', 'bisect', 'bsddb', 'bz2', 'calendar', 'cd', 'cgi', - 'CGIHTTPServer', 'cgitb', 'chunk', 'cmath', 'cmd', 'code', 'codecs', 'codeop', - 'collections', 'colorsys', 'commands', 'compileall', 'compiler', - 'ConfigParser', 'Cookie', 'cookielib', 'copy', 'copy_reg', 'cPickle', 'crypt', - 'cStringIO', 'csv', 'curses', 'datetime', 'dbhash', 'dbm', 'decimal', 'DEVICE', - 'difflib', 'dircache', 'dis', 'distutils', 'dl', 'doctest', 'DocXMLRPCServer', 'dumbdbm', - 'dummy_thread', 'dummy_threading', 'email', 'encodings', 'errno', 'exceptions', 'fcntl', - 'filecmp', 'fileinput', 'FL', 'fl', 'flp', 'fm', 'fnmatch', 'formatter', 'fpectl', - 'fpformat', 'ftplib', 'gc', 'gdbm', 'getopt', 'getpass', 'gettext', 'GL', 'gl', 'glob', - 'gopherlib', 'grp', 'gzip', 'heapq', 'hmac', 'hotshot', 'htmlentitydefs', 'htmllib', - 'HTMLParser', 'httplib', 'imageop', 'imaplib', 'imgfile', 'imghdr', 'imp', 'inspect', - 'itertools', 'jpeg', 'keyword', 'linecache', 'locale', 'logging', 'mailbox', 'mailcap', - 'marshal', 'math', 'md5', 'mhlib', 'mimetools', 'mimetypes', 'MimeWriter', 'mimify', - 'mmap', 'msvcrt', 'multifile', 'mutex', 'netrc', 'new', 'nis', 'nntplib', 'operator', - 'optparse', 'os', 'ossaudiodev', 'parser', 'pdb', 'pickle', 'pickletools', 'pipes', - 'pkgutil', 'platform', 'popen2', 'poplib', 'posix', 'posixfile', 'pprint', 'profile', - 'pstats', 'pty', 'pwd', 'py_compile', 'pyclbr', 'pydoc', 'Queue', 'quopri', 'random', - 're', 'readline', 'repr', 'resource', 'rexec', 'rfc822', 'rgbimg', 'rlcompleter', - 'robotparser', 'sched', 'ScrolledText', 'select', 'sets', 'sgmllib', 'sha', 'shelve', - 'shlex', 'shutil', 'signal', 'SimpleHTTPServer', 'SimpleXMLRPCServer', 'site', 'smtpd', - 'smtplib', 'sndhdr', 'socket', 'SocketServer', 'stat', 'statcache', 'statvfs', 'string', - 'StringIO', 'stringprep', 'struct', 'subprocess', 'sunau', 'SUNAUDIODEV', 'sunaudiodev', - 'symbol', 'sys', 'syslog', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'termios', - 'test', 'textwrap', 'thread', 'threading', 'time', 'timeit', 'Tix', 'Tkinter', 'token', - 'tokenize', 'traceback', 'tty', 'turtle', 'types', 'unicodedata', 'unittest', 'urllib2', - 'urllib', 'urlparse', 'user', 'UserDict', 'UserList', 'UserString', 'uu', 'warnings', - 'wave', 'weakref', 'webbrowser', 'whichdb', 'whrandom', 'winsound', 'xdrlib', 'xml', - 'xmllib', 'xmlrpclib', 'zipfile', 'zipimport', 'zlib', - // Python 3.0 - 'bytes', 'bytearray' - ), - - /* - ** Set 4: special methods - ** http://python.org/doc/current/ref/specialnames.html - */ - 4 => array( - /* - // Iterator types: http://python.org/doc/current/lib/typeiter.html - '__iter__', 'next', - // String types: http://python.org/doc/current/lib/string-methods.html - 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', - 'find', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower', 'isspace', 'istitle', - 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rjust', - 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', - 'translate', 'upper', 'zfill', - */ - // Basic customization: http://python.org/doc/current/ref/customization.html - '__new__', '__init__', '__del__', '__repr__', '__str__', - '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__cmp__', '__rcmp__', - '__hash__', '__nonzero__', '__unicode__', '__dict__', - // Attribute access: http://python.org/doc/current/ref/attribute-access.html - '__setattr__', '__delattr__', '__getattr__', '__getattribute__', '__get__', '__set__', - '__delete__', '__slots__', - // Class creation, callable objects - '__metaclass__', '__call__', - // Container types: http://python.org/doc/current/ref/sequence-types.html - '__len__', '__getitem__', '__setitem__', '__delitem__', '__iter__', '__contains__', - '__getslice__', '__setslice__', '__delslice__', - // Numeric types: http://python.org/doc/current/ref/numeric-types.html - '__abs__','__add__','__and__','__coerce__','__div__','__divmod__','__float__', - '__hex__','__iadd__','__isub__','__imod__','__idiv__','__ipow__','__iand__', - '__ior__','__ixor__', '__ilshift__','__irshift__','__invert__','__int__', - '__long__','__lshift__', - '__mod__','__mul__','__neg__','__oct__','__or__','__pos__','__pow__', - '__radd__','__rdiv__','__rdivmod__','__rmod__','__rpow__','__rlshift__','__rrshift__', - '__rshift__','__rsub__','__rmul__','__rand__','__rxor__','__ror__', - '__sub__','__xor__' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?', '`' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #ff7700;font-weight:bold;', // Reserved - 2 => 'color: #008000;', // Built-ins + self - 3 => 'color: #dc143c;', // Standard lib - 4 => 'color: #0000cd;' // Special methods - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: black;' - ), - 'STRINGS' => array( - 0 => 'color: #483d8b;' - ), - 'NUMBERS' => array( - 0 => 'color: #ff4500;' - ), - 'METHODS' => array( - 1 => 'color: black;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/q.php b/_piecrust/libs/Geshi/geshi/q.php deleted file mode 100644 index fa3717c..0000000 --- a/_piecrust/libs/Geshi/geshi/q.php +++ /dev/null @@ -1,149 +0,0 @@ -) - * ------------------------- - * - Fix the handling of single line comments - * - ************************************************************************************* - * - * This file is part of GeSHi. - * - * GeSHi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GeSHi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeSHi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - ************************************************************************************/ - -$language_data = array ( - 'LANG_NAME' => 'q/kdb+', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array( - 2 => '/ \s\/.*/', # This needs to get fixed up, since it won't catch some instances - # Multi line comments (Moved from REGEXPS) - 3 => '/^\/\s*?\n.*?\n\\\s*?\n/smi' - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'TAB_WIDTH' => 4, - 'KEYWORDS' => array( - 1 => array( - 'abs', 'acos', 'all', 'and', 'any', 'asc', 'asin', 'asof', 'atan', 'attr', 'avg', 'avgs', 'bin', 'ceiling', - 'cols', 'cor', 'cos', 'count', 'cov', 'cross', 'cut', 'deltas', 'desc', 'dev', 'differ', 'distinct', - 'div', 'each', 'enlist', 'eval', 'except', 'exec', 'exit', 'exp', 'fills', 'first', 'flip', 'floor', - 'fkeys', 'get', 'getenv', 'group', 'gtime', 'hclose', 'hcount', 'hdel', 'hopen', 'hsym', 'iasc', 'idesc', - 'in', 'insert', 'inter', 'inv', 'joins', 'key', 'keys', 'last', 'like', 'load', 'log', 'lower', - 'lsq', 'ltime', 'ltrim', 'mavg', 'max', 'maxs', 'mcount', 'md5', 'mdev', 'med', 'meta', 'min', 'mins', - 'mmax', 'mmin', 'mmu', 'mod', 'msum', 'neg', 'next', 'not', 'null', 'or', 'over', 'parse', 'peach', - 'plist', 'prd', 'prds', 'prev', 'rand', 'rank', 'ratios', 'raze', 'read0', 'read1', 'reciprocal', - 'reverse', 'rload', 'rotate', 'rsave', 'rtrim', 'save', 'scan', 'set', 'setenv', 'show', 'signum', - 'sin', 'sqrt', 'ss', 'ssr', 'string', 'sublist', 'sum', 'sums', 'sv', 'system', 'tables', 'tan', 'til', 'trim', - 'txf', 'type', 'ungroup', 'union', 'upper', 'upsert', 'value', 'var', 'view', 'views', 'vs', - 'wavg', 'within', 'wsum', 'xasc', 'xbar', 'xcol', 'xcols', 'xdesc', 'xexp', 'xgroup', 'xkey', - 'xlog', 'xprev', 'xrank' - ), - # kdb database template keywords - 2 => array( - 'aj', 'by', 'delete', 'fby', 'from', 'ij', 'lj', 'pj', 'select', 'uj', 'update', 'where', 'wj', - ), - ), - 'SYMBOLS' => array( - '?', '#', ',', '_', '@', '.', '^', '~', '$', '!', '\\', '\\', '/:', '\:', "'", "':", '::', '+', '-', '%', '*' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000099; font-weight: bold;', - 2 => 'color: #009900; font-weight: bold;', - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #666666; font-style: italic;', - 3 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 1 => 'color: #000099; font-weight: bold;', - 2 => 'color: #660099; font-weight: bold;', - 3 => 'color: #660099; font-weight: bold;', - 4 => 'color: #660099; font-weight: bold;', - 5 => 'color: #006699; font-weight: bold;', - 'HARD' => '', - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #990000;' - ), - 'NUMBERS' => array( - 0 => 'color: #0000dd;', - GESHI_NUMBER_BIN_PREFIX_0B => 'color: #208080;', - GESHI_NUMBER_OCT_PREFIX => 'color: #208080;', - GESHI_NUMBER_HEX_PREFIX => 'color: #208080;', - GESHI_NUMBER_FLT_SCI_SHORT => 'color:#800080;', - GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;', - GESHI_NUMBER_FLT_NONSCI_F => 'color:#800080;', - GESHI_NUMBER_FLT_NONSCI => 'color:#800080;' - ), - 'METHODS' => array( - 1 => 'color: #202020;', - 2 => 'color: #202020;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'REGEXPS' => array( - 2 => 'color: #999900;', - ), - 'SCRIPT' => array( - ) - ), - 'REGEXPS' => array( - # Symbols - 2 => '`[^\s"]*', - ), - 'URLS' => array( - 1 => '', - 2 => '', - ), -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/qbasic.php b/_piecrust/libs/Geshi/geshi/qbasic.php deleted file mode 100644 index e7d12ff..0000000 --- a/_piecrust/libs/Geshi/geshi/qbasic.php +++ /dev/null @@ -1,158 +0,0 @@ - 'QBasic/QuickBASIC', - 'COMMENT_SINGLE' => array(1 => "'"), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array( - //Single-Line Comments using REM command - 2 => "/\bREM.*?$/i", - //Line numbers - 3 => "/^\s*\d+/im" - ), - 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'DO', 'LOOP', 'WHILE', 'WEND', 'THEN', 'ELSE', 'ELSEIF', 'IF', - 'FOR', 'TO', 'NEXT', 'STEP', 'GOTO', 'GOSUB', 'CALL', 'CALLS', - 'SUB', 'FUNCTION', 'RETURN', 'RESUME', 'SELECT', 'CASE', 'UNTIL' - ), - 3 => array( - 'ABS', 'ABSOLUTE', 'ACCESS', 'ALIAS', 'AND', 'ANY', 'APPEND', 'AS', 'ASC', 'ATN', - 'BASE', 'BEEP', 'BINARY', 'BLOAD', 'BSAVE', 'BYVAL', - 'CDBL', 'CDECL', 'CHAIN', 'CHDIR', 'CHR$', 'CINT', 'CIRCLE', 'CLEAR', - 'CLNG', 'CLOSE', 'CLS', 'COM', 'COMMAND$', 'COMMON', 'CONST', 'COS', 'CSNG', - 'CSRLIN', 'CVD', 'CVDMBF', 'CVI', 'CVL', 'CVS', 'CVSMDF', 'DATA', 'DATE$', - 'DECLARE', 'DEF', 'FN', 'SEG', 'DEFDBL', 'DEFINT', 'DEFLNG', 'DEFSNG', 'DEFSTR', - 'DIM', 'DOUBLE', 'DRAW', 'END', 'ENVIRON', 'ENVIRON$', 'EOF', 'EQV', 'ERASE', - 'ERDEV', 'ERDEV$', 'ERL', 'ERR', 'ERROR', 'EXIT', 'EXP', 'FIELD', 'FILEATTR', - 'FILES', 'FIX', 'FRE', 'FREEFILE', 'GET', 'HEX$', 'IMP', 'INKEY$', - 'INP', 'INPUT', 'INPUT$', 'INSTR', 'INT', 'INTEGER', 'IOCTL', 'IOCTL$', 'IS', - 'KEY', 'KILL', 'LBOUND', 'LCASE$', 'LEFT$', 'LEN', 'LET', 'LINE', 'LIST', 'LOC', - 'LOCAL', 'LOCATE', 'LOCK', 'LOF', 'LOG', 'LONG', 'LPOS', 'LPRINT', - 'LSET', 'LTRIM$', 'MID$', 'MKD$', 'MKDIR', 'MKDMBF$', 'MKI$', 'MKL$', - 'MKS$', 'MKSMBF$', 'MOD', 'NAME', 'NOT', 'OCT$', 'OFF', 'ON', 'PEN', 'PLAY', - 'OPEN', 'OPTION', 'OR', 'OUT', 'OUTPUT', - 'PAINT', 'PALETTE', 'PCOPY', 'PEEK', 'PMAP', 'POINT', 'POKE', 'POS', 'PRESET', - 'PRINT', 'PSET', 'PUT', 'RANDOM', 'RANDOMIZE', 'READ', 'REDIM', 'RESET', - 'RESTORE', 'RIGHT$', 'RMDIR', 'RND', 'RSET', 'RTRIM$', 'RUN', 'SADD', 'SCREEN', - 'SEEK', 'SETMEM', 'SGN', 'SHARED', 'SHELL', 'SIGNAL', 'SIN', 'SINGLE', 'SLEEP', - 'SOUND', 'SPACE$', 'SPC', 'SQR', 'STATIC', 'STICK', 'STOP', 'STR$', 'STRIG', - 'STRING', 'STRING$', 'SWAP', 'SYSTEM', 'TAB', 'TAN', 'TIME$', 'TIMER', - 'TROFF', 'TRON', 'TYPE', 'UBOUND', 'UCASE$', 'UEVENT', 'UNLOCK', 'USING', 'VAL', - 'VARPTR', 'VARPTR$', 'VARSEG', 'VIEW', 'WAIT', 'WIDTH', 'WINDOW', 'WRITE', 'XOR' - ) - ), - 'SYMBOLS' => array( - '(', ')', ',', '+', '-', '*', '/', '=', '<', '>', '^' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 3 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #a1a100;', - 3 => 'color: #000066;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080;', - 2 => 'color: #808080;', - 3 => 'color: #8080C0;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - 1 => 'color: #cc66cc;', - 2 => 'color: #339933;' - ) - ), - 'URLS' => array( - 1 => '', - 3 => 'http://www.qbasicnews.com/qboho/qck{FNAMEL}.shtml' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - 1 => '&(?:H[0-9a-fA-F]+|O[0-7]+)(?!\w)', - 2 => '#[0-9]+(?!\w)' - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 8 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/rails.php b/_piecrust/libs/Geshi/geshi/rails.php deleted file mode 100644 index 1982c67..0000000 --- a/_piecrust/libs/Geshi/geshi/rails.php +++ /dev/null @@ -1,406 +0,0 @@ - 'Rails', - 'COMMENT_SINGLE' => array(1 => "#"), - 'COMMENT_MULTI' => array("=begin" => "=end"), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"', '`','\''), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'alias', 'and', 'begin', 'break', 'case', 'class', - 'def', 'defined', 'do', 'else', 'elsif', 'end', - 'ensure', 'for', 'if', 'in', 'module', 'while', - 'next', 'not', 'or', 'redo', 'rescue', 'yield', - 'retry', 'super', 'then', 'undef', 'unless', - 'until', 'when', 'BEGIN', 'END', 'include' - ), - 2 => array( - '__FILE__', '__LINE__', 'false', 'nil', 'self', 'true', - 'return' - ), - 3 => array( - 'Array', 'Float', 'Integer', 'String', 'at_exit', - 'autoload', 'binding', 'caller', 'catch', 'chop', 'chop!', - 'chomp', 'chomp!', 'eval', 'exec', 'exit', 'exit!', 'fail', - 'fork', 'format', 'gets', 'global_variables', 'gsub', 'gsub!', - 'iterator?', 'lambda', 'load', 'local_variables', 'loop', - 'open', 'p', 'print', 'printf', 'proc', 'putc', 'puts', - 'raise', 'rand', 'readline', 'readlines', 'require', 'select', - 'sleep', 'split', 'sprintf', 'srand', 'sub', 'sub!', 'syscall', - 'system', 'trace_var', 'trap', 'untrace_var' - ), - 4 => array( - 'Abbrev', 'ArgumentError', 'Base64', 'Benchmark', - 'Benchmark::Tms', 'Bignum', 'Binding', 'CGI', 'CGI::Cookie', - 'CGI::HtmlExtension', 'CGI::QueryExtension', - 'CGI::Session', 'CGI::Session::FileStore', - 'CGI::Session::MemoryStore', 'Class', 'Comparable', 'Complex', - 'ConditionVariable', 'Continuation', 'Data', - 'Date', 'DateTime', 'Delegator', 'Dir', 'EOFError', 'ERB', - 'ERB::Util', 'Enumerable', 'Enumerable::Enumerator', 'Errno', - 'Exception', 'FalseClass', 'File', - 'File::Constants', 'File::Stat', 'FileTest', 'FileUtils', - 'FileUtils::DryRun', 'FileUtils::NoWrite', - 'FileUtils::StreamUtils_', 'FileUtils::Verbose', 'Find', - 'Fixnum', 'FloatDomainError', 'Forwardable', 'GC', 'Generator', - 'Hash', 'IO', 'IOError', 'Iconv', 'Iconv::BrokenLibrary', - 'Iconv::Failure', 'Iconv::IllegalSequence', - 'Iconv::InvalidCharacter', 'Iconv::InvalidEncoding', - 'Iconv::OutOfRange', 'IndexError', 'Interrupt', 'Kernel', - 'LoadError', 'LocalJumpError', 'Logger', 'Logger::Application', - 'Logger::Error', 'Logger::Formatter', 'Logger::LogDevice', - 'Logger::LogDevice::LogDeviceMutex', 'Logger::Severity', - 'Logger::ShiftingError', 'Marshal', 'MatchData', - 'Math', 'Matrix', 'Method', 'Module', 'Mutex', 'NameError', - 'NameError::message', 'NilClass', 'NoMemoryError', - 'NoMethodError', 'NotImplementedError', 'Numeric', 'Object', - 'ObjectSpace', 'Observable', 'PStore', 'PStore::Error', - 'Pathname', 'Precision', 'Proc', 'Process', 'Process::GID', - 'Process::Status', 'Process::Sys', 'Process::UID', 'Queue', - 'Range', 'RangeError', 'Rational', 'Regexp', 'RegexpError', - 'RuntimeError', 'ScriptError', 'SecurityError', 'Set', - 'Shellwords', 'Signal', 'SignalException', 'SimpleDelegator', - 'SingleForwardable', 'Singleton', 'SingletonClassMethods', - 'SizedQueue', 'SortedSet', 'StandardError', 'StringIO', - 'StringScanner', 'StringScanner::Error', 'Struct', 'Symbol', - 'SyncEnumerator', 'SyntaxError', 'SystemCallError', - 'SystemExit', 'SystemStackError', 'Tempfile', - 'Test::Unit::TestCase', 'Test::Unit', 'Test', 'Thread', - 'ThreadError', 'ThreadGroup', - 'ThreadsWait', 'Time', 'TrueClass', 'TypeError', 'URI', - 'URI::BadURIError', 'URI::Error', 'URI::Escape', 'URI::FTP', - 'URI::Generic', 'URI::HTTP', 'URI::HTTPS', - 'URI::InvalidComponentError', 'URI::InvalidURIError', - 'URI::LDAP', 'URI::MailTo', 'URI::REGEXP', - 'URI::REGEXP::PATTERN', 'UnboundMethod', 'Vector', 'YAML', - 'ZeroDivisionError', 'Zlib', - 'Zlib::BufError', 'Zlib::DataError', 'Zlib::Deflate', - 'Zlib::Error', 'Zlib::GzipFile', 'Zlib::GzipFile::CRCError', - 'Zlib::GzipFile::Error', 'Zlib::GzipFile::LengthError', - 'Zlib::GzipFile::NoFooter', 'Zlib::GzipReader', - 'Zlib::GzipWriter', 'Zlib::Inflate', 'Zlib::MemError', - 'Zlib::NeedDict', 'Zlib::StreamEnd', 'Zlib::StreamError', - 'Zlib::VersionError', - 'Zlib::ZStream', - 'ActionController::AbstractRequest', - 'ActionController::Assertions::DomAssertions', - 'ActionController::Assertions::ModelAssertions', - 'ActionController::Assertions::ResponseAssertions', - 'ActionController::Assertions::RoutingAssertions', - 'ActionController::Assertions::SelectorAssertions', - 'ActionController::Assertions::TagAssertions', - 'ActionController::Base', - 'ActionController::Benchmarking::ClassMethods', - 'ActionController::Caching', - 'ActionController::Caching::Actions', - 'ActionController::Caching::Actions::ActionCachePath', - 'ActionController::Caching::Fragments', - 'ActionController::Caching::Pages', - 'ActionController::Caching::Pages::ClassMethods', - 'ActionController::Caching::Sweeping', - 'ActionController::Components', - 'ActionController::Components::ClassMethods', - 'ActionController::Components::InstanceMethods', - 'ActionController::Cookies', - 'ActionController::Filters::ClassMethods', - 'ActionController::Flash', - 'ActionController::Flash::FlashHash', - 'ActionController::Helpers::ClassMethods', - 'ActionController::Integration::Session', - 'ActionController::IntegrationTest', - 'ActionController::Layout::ClassMethods', - 'ActionController::Macros', - 'ActionController::Macros::AutoComplete::ClassMethods', - 'ActionController::Macros::InPlaceEditing::ClassMethods', - 'ActionController::MimeResponds::InstanceMethods', - 'ActionController::Pagination', - 'ActionController::Pagination::ClassMethods', - 'ActionController::Pagination::Paginator', - 'ActionController::Pagination::Paginator::Page', - 'ActionController::Pagination::Paginator::Window', - 'ActionController::Rescue', 'ActionController::Resources', - 'ActionController::Routing', - 'ActionController::Scaffolding::ClassMethods', - 'ActionController::SessionManagement::ClassMethods', - 'ActionController::Streaming', 'ActionController::TestProcess', - 'ActionController::TestUploadedFile', - 'ActionController::UrlWriter', - 'ActionController::Verification::ClassMethods', - 'ActionMailer::Base', 'ActionView::Base', - 'ActionView::Helpers::ActiveRecordHelper', - 'ActionView::Helpers::AssetTagHelper', - 'ActionView::Helpers::BenchmarkHelper', - 'ActionView::Helpers::CacheHelper', - 'ActionView::Helpers::CaptureHelper', - 'ActionView::Helpers::DateHelper', - 'ActionView::Helpers::DebugHelper', - 'ActionView::Helpers::FormHelper', - 'ActionView::Helpers::FormOptionsHelper', - 'ActionView::Helpers::FormTagHelper', - 'ActionView::Helpers::JavaScriptHelper', - 'ActionView::Helpers::JavaScriptMacrosHelper', - 'ActionView::Helpers::NumberHelper', - 'ActionView::Helpers::PaginationHelper', - 'ActionView::Helpers::PrototypeHelper', - 'ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods', - 'ActionView::Helpers::ScriptaculousHelper', - 'ActionView::Helpers::TagHelper', - 'ActionView::Helpers::TextHelper', - 'ActionView::Helpers::UrlHelper', 'ActionView::Partials', - 'ActionWebService::API::Method', 'ActionWebService::Base', - 'ActionWebService::Client::Soap', - 'ActionWebService::Client::XmlRpc', - 'ActionWebService::Container::ActionController::ClassMethods', - 'ActionWebService::Container::Delegated::ClassMethods', - 'ActionWebService::Container::Direct::ClassMethods', - 'ActionWebService::Invocation::ClassMethods', - 'ActionWebService::Scaffolding::ClassMethods', - 'ActionWebService::SignatureTypes', 'ActionWebService::Struct', - 'ActiveRecord::Acts::List::ClassMethods', - 'ActiveRecord::Acts::List::InstanceMethods', - 'ActiveRecord::Acts::NestedSet::ClassMethods', - 'ActiveRecord::Acts::NestedSet::InstanceMethods', - 'ActiveRecord::Acts::Tree::ClassMethods', - 'ActiveRecord::Acts::Tree::InstanceMethods', - 'ActiveRecord::Aggregations::ClassMethods', - 'ActiveRecord::Associations::ClassMethods', - 'ActiveRecord::AttributeMethods::ClassMethods', - 'ActiveRecord::Base', - 'ActiveRecord::Calculations::ClassMethods', - 'ActiveRecord::Callbacks', - 'ActiveRecord::ConnectionAdapters::AbstractAdapter', - 'ActiveRecord::ConnectionAdapters::Column', - 'ActiveRecord::ConnectionAdapters::DB2Adapter', - 'ActiveRecord::ConnectionAdapters::DatabaseStatements', - 'ActiveRecord::ConnectionAdapters::FirebirdAdapter', - 'ActiveRecord::ConnectionAdapters::FrontBaseAdapter', - 'ActiveRecord::ConnectionAdapters::MysqlAdapter', - 'ActiveRecord::ConnectionAdapters::OpenBaseAdapter', - 'ActiveRecord::ConnectionAdapters::OracleAdapter', - 'ActiveRecord::ConnectionAdapters::PostgreSQLAdapter', - 'ActiveRecord::ConnectionAdapters::Quoting', - 'ActiveRecord::ConnectionAdapters::SQLServerAdapter', - 'ActiveRecord::ConnectionAdapters::SQLiteAdapter', - 'ActiveRecord::ConnectionAdapters::SchemaStatements', - 'ActiveRecord::ConnectionAdapters::SybaseAdapter::ColumnWithIdentity', - 'ActiveRecord::ConnectionAdapters::SybaseAdapterContext', - 'ActiveRecord::ConnectionAdapters::TableDefinition', - 'ActiveRecord::Errors', 'ActiveRecord::Locking', - 'ActiveRecord::Locking::Optimistic', - 'ActiveRecord::Locking::Optimistic::ClassMethods', - 'ActiveRecord::Locking::Pessimistic', - 'ActiveRecord::Migration', 'ActiveRecord::Observer', - 'ActiveRecord::Observing::ClassMethods', - 'ActiveRecord::Reflection::ClassMethods', - 'ActiveRecord::Reflection::MacroReflection', - 'ActiveRecord::Schema', 'ActiveRecord::Timestamp', - 'ActiveRecord::Transactions::ClassMethods', - 'ActiveRecord::Validations', - 'ActiveRecord::Validations::ClassMethods', - 'ActiveRecord::XmlSerialization', - 'ActiveSupport::CachingTools::HashCaching', - 'ActiveSupport::CoreExtensions::Array::Conversions', - 'ActiveSupport::CoreExtensions::Array::Grouping', - 'ActiveSupport::CoreExtensions::Date::Conversions', - 'ActiveSupport::CoreExtensions::Hash::Conversions', - 'ActiveSupport::CoreExtensions::Hash::Conversions::ClassMethods', - 'ActiveSupport::CoreExtensions::Hash::Diff', - 'ActiveSupport::CoreExtensions::Hash::Keys', - 'ActiveSupport::CoreExtensions::Hash::ReverseMerge', - 'ActiveSupport::CoreExtensions::Integer::EvenOdd', - 'ActiveSupport::CoreExtensions::Integer::Inflections', - 'ActiveSupport::CoreExtensions::Numeric::Bytes', - 'ActiveSupport::CoreExtensions::Numeric::Time', - 'ActiveSupport::CoreExtensions::Pathname::CleanWithin', - 'ActiveSupport::CoreExtensions::Range::Conversions', - 'ActiveSupport::CoreExtensions::String::Access', - 'ActiveSupport::CoreExtensions::String::Conversions', - 'ActiveSupport::CoreExtensions::String::Inflections', - 'ActiveSupport::CoreExtensions::String::Iterators', - 'ActiveSupport::CoreExtensions::String::StartsEndsWith', - 'ActiveSupport::CoreExtensions::String::Unicode', - 'ActiveSupport::CoreExtensions::Time::Calculations', - 'ActiveSupport::CoreExtensions::Time::Calculations::ClassMethods', - 'ActiveSupport::CoreExtensions::Time::Conversions', - 'ActiveSupport::Multibyte::Chars', - 'ActiveSupport::Multibyte::Handlers::UTF8Handler', - 'Breakpoint', 'Builder::BlankSlate', 'Builder::XmlMarkup', - 'Fixtures', - 'HTML::Selector', 'HashWithIndifferentAccess', 'Inflector', - 'Inflector::Inflections', 'Mime', 'Mime::Type', - 'OCI8AutoRecover', 'TimeZone', 'XmlSimple' - ), - 5 => array( - 'image_tag', 'link_to', 'link_to_remote', 'javascript_include_tag', - 'assert_equal', 'assert_not_equal', 'before_filter', - 'after_filter', 'render', 'redirect_to', 'hide_action', - 'render_to_string', 'url_for', 'controller_name', - 'controller_class_name', 'controller_path', 'session', - 'render_component', 'render_component_as_string', 'cookie', - 'layout', 'flash', 'auto_complete_for', 'in_place_editor_for', - 'respond_to', 'paginate', 'current_page', 'each', 'first', - 'first_page', 'last_page', 'last', 'length', 'new', 'page_count', - 'previous', 'scaffold', 'send_data', - 'send_file', 'deliver', 'receive', 'error_messages_for', - 'error_message_on', 'form', 'input', 'stylesheet_link_tag', - 'stylesheet_path', 'content_for', 'select_date', 'ago', - 'month', 'day', 'check_box', 'fields_for', 'file_field', - 'form_for', 'hidden_field', 'text_area', 'password_field', - 'collection_select', 'options_for_select', - 'options_from_collection_for_select', 'file_field_tag', - 'form_for_tag', 'hidden_field_tag', 'text_area_tag', - 'password_field_tag', 'link_to_function', 'javascript_tag', - 'human_size', 'number_to_currency', 'pagination_links', - 'form_remote_tag', 'form_remote_for', - 'submit_to_remote', 'remote_function', 'observe_form', - 'observe_field', 'remote_form_for', 'options_for_ajax', 'alert', - 'call', 'assign', 'show', 'hide', 'insert_html', 'sortable', - 'toggle', 'visual_effect', 'replace', 'replace_html', 'remove', - 'save', 'save!', 'draggable', 'drop_receiving', 'literal', - 'draggable_element', 'drop_receiving_element', 'sortable_element', - 'content_tag', 'tag', 'link_to_image', 'link_to_if', - 'link_to_unless', 'mail_to', 'link_image_to', 'button_to', - 'current_page?', 'act_as_list', 'act_as_nested', 'act_as_tree', - 'has_many', 'has_one', 'belongs_to', 'has_many_and_belogns_to', - 'delete', 'destroy', 'destroy_all', 'clone', 'deep_clone', 'copy', - 'update', 'table_name', 'primary_key', 'sum', 'maximun', 'minimum', - 'count', 'size', 'after_save', 'after_create', 'before_save', - 'before_create', 'add_to_base', 'errors', 'add', 'validate', - 'validates_presence_of', 'validates_numericality_of', - 'validates_uniqueness_of', 'validates_length_of', - 'validates_format_of', 'validates_size_of', 'to_a', 'to_s', - 'to_xml', 'to_i' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '%', '&', '*', '|', '/', '<', '>', - '+', '-', '=>', '<<' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color:#9966CC; font-weight:bold;', - 2 => 'color:#0000FF; font-weight:bold;', - 3 => 'color:#CC0066; font-weight:bold;', - 4 => 'color:#CC00FF; font-weight:bold;', - 5 => 'color:#5A0A0A; font-weight:bold;' - ), - 'COMMENTS' => array( - 1 => 'color:#008000; font-style:italic;', - 'MULTI' => 'color:#000080; font-style:italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color:#000099;' - ), - 'BRACKETS' => array( - 0 => 'color:#006600; font-weight:bold;' - ), - 'STRINGS' => array( - 0 => 'color:#996600;' - ), - 'NUMBERS' => array( - 0 => 'color:#006666;' - ), - 'METHODS' => array( - 1 => 'color:#9900CC;' - ), - 'SYMBOLS' => array( - 0 => 'color:#006600; font-weight:bold;' - ), - 'REGEXPS' => array( - 0 => 'color:#ff6633; font-weight:bold;', - 1 => 'color:#0066ff; font-weight:bold;', - 2 => 'color:#6666ff; font-weight:bold;', - 3 => 'color:#ff3333; font-weight:bold;' - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - 0 => array( - GESHI_SEARCH => "([[:space:]])(\\$[a-zA-Z_][a-zA-Z0-9_]*)", - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ), - 1 => array( - GESHI_SEARCH => "([[:space:]])(@[a-zA-Z_][a-zA-Z0-9_]*)", - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ), - 2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*", //Static OOP References - 3 => array( - GESHI_SEARCH => "([[:space:]]|\[|\()(:[a-zA-Z_][a-zA-Z0-9_]*)", - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ) - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - 0 => array( - '<%' => '%>' - ) - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/rebol.php b/_piecrust/libs/Geshi/geshi/rebol.php deleted file mode 100644 index 02ec8de..0000000 --- a/_piecrust/libs/Geshi/geshi/rebol.php +++ /dev/null @@ -1,196 +0,0 @@ - 'REBOL', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array('rebol [' => ']', 'comment [' => ']'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'binary!','block!','char!','date!','decimal!','email!','file!', - 'hash!','integer!','issue!','list!','logic!','money!','none!', - 'object!','paren!','pair!','path!','string!','tag!','time!', - 'tuple!','url!', - ), - 2 => array( - 'all','any','attempt','break','catch','compose','disarm','dispatch', - 'do','do-events','does','either','else','exit','for','forall', - 'foreach','forever','forskip','func','function','halt','has','if', - 'launch','loop','next','quit','reduce','remove-each','repeat', - 'return','secure','switch','throw','try','until','wait','while', - ), - 3 => array( - 'about','abs','absolute','add','alert','alias','alter','and', - 'any-block?','any-function?','any-string?','any-type?','any-word?', - 'append','arccosine','arcsine','arctangent','array','as-pair', - 'ask','at','back','binary?','bind','bitset?','block?','brightness?', - 'browse','build-tag','caret-to-offset','center-face','change', - 'change-dir','char?','charset','checksum','choose','clean-path', - 'clear','clear-fields','close','comment','complement','component?', - 'compress','confirm','connected?','construct','context','copy', - 'cosine','datatype?','date?','debase','decimal?','decode-cgi', - 'decompress','dehex','delete','detab','difference','dir?','dirize', - 'divide','dump-face','dump-obj','echo','email?','empty?','enbase', - 'entab','equal?','error?','even?','event?','exclude','exists?', - 'exp','extract','fifth','file?','find','first','flash','focus', - 'form','found?','fourth','free','function?','get','get-modes', - 'get-word?','greater-or-equal?','greater?','hash?','head','head?', - 'help','hide','hide-popup','image?','import-email','in', - 'in-window?','index?','info?','inform','input','input?','insert', - 'integer?','intersect','issue?','join','last','layout','length?', - 'lesser-or-equal?','lesser?','library?','license','link?', - 'list-dir','list?','lit-path?','lit-word?','load','load-image', - 'log-10','log-2','log-e','logic?','lowercase','make','make-dir', - 'make-face','max','maximum','maximum-of','min','minimum', - 'minimum-of','modified?','mold','money?','multiply','native?', - 'negate','negative?','none?','not','not-equal?','now','number?', - 'object?','odd?','offset-to-caret','offset?','op?','open','or', - 'pair?','paren?','parse','parse-xml','path?','pick','poke','port?', - 'positive?','power','prin','print','probe','protect', - 'protect-system','query','random','read','read-io','recycle', - 'refinement?','reform','rejoin','remainder','remold','remove', - 'rename', - //'repeat', - 'repend','replace','request','request-color','request-date', - 'request-download','request-file','request-list','request-pass', - 'request-text','resend','reverse','routine?','same?','save', - 'script?','second','select','send','series?','set','set-modes', - 'set-net','set-path?','set-word?','show','show-popup','sign?', - 'sine','size-text','size?','skip','sort','source','span?', - 'split-path','square-root','strict-equal?','strict-not-equal?', - 'string?','struct?','stylize','subtract','suffix?','tag?','tail', - 'tail?','tangent','third','time?','to','to-binary','to-bitset', - 'to-block','to-char','to-date','to-decimal','to-email','to-file', - 'to-get-word','to-hash','to-hex','to-idate','to-image','to-integer', - 'to-issue','to-list','to-lit-path','to-lit-word','to-local-file', - 'to-logic','to-money','to-pair','to-paren','to-path', - 'to-rebol-file','to-refinement','to-set-path','to-set-word', - 'to-string','to-tag','to-time','to-tuple','to-url','to-word', - 'trace','trim','tuple?','type?','unfocus','union','unique', - 'unprotect','unset','unset?','unview','update','upgrade', - 'uppercase','url?','usage','use','value?','view','viewed?','what', - 'what-dir','within?','word?','write','write-io','xor','zero?', - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '!', '@', '%', '&', '*', '|', '/', '<', '>' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #000066;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', -// 2 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - 0 => 'color: #0000ff;' - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - 3 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' -// 2 => 'includes/dico_rebol.php?word={FNAME}', -// 3 => 'includes/dico_rebol.php?word={FNAME}' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*", - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/reg.php b/_piecrust/libs/Geshi/geshi/reg.php deleted file mode 100644 index 2e0dd33..0000000 --- a/_piecrust/libs/Geshi/geshi/reg.php +++ /dev/null @@ -1,233 +0,0 @@ - 'Microsoft Registry', - 'COMMENT_SINGLE' => array(1 =>';'), - 'COMMENT_MULTI' => array( ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( -// 1 => array(), -// 2 => array(), - /* Registry Key Constants Not Used */ - 3 => array( - 'HKEY_LOCAL_MACHINE', - 'HKEY_CLASSES_ROOT', - 'HKEY_CURRENT_USER', - 'HKEY_USERS', - 'HKEY_CURRENT_CONFIG', - 'HKEY_DYN_DATA', - 'HKLM', 'HKCR', 'HKCU', 'HKU', 'HKCC', 'HKDD' - ) - ), - 'SYMBOLS' => array( - '=' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, -// 1 => false, -// 2 => false, - 3 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( -// 1 => 'color: #00CCFF;', -// 2 => 'color: #0000FF;', - 3 => 'color: #800000;' - ), - 'COMMENTS' => array( - 1 => 'color: #009900;' - ), - 'ESCAPE_CHAR' => array( - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #009900;' - ), - 'NUMBERS' => array( - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #000000;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - 0 => 'color: #00CCFF;', - 1 => 'color: #0000FF;', - 2 => '', - 3 => 'color: #0000FF;', - 4 => 'color: #0000FF;', - 5 => '', - 6 => '', - 7 => '', - 8 => 'color: #FF6600;', - ) - ), - 'URLS' => array( -// 1 => '', -// 2 => '', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - // Highlight Key Delimiters - 0 => array( - GESHI_SEARCH => '((^|\\n)\\s*)(\\\\\\[(.*)\\\\\\])(\\s*(\\n|$))', - GESHI_REPLACE => '\\3', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\5' -// GESHI_CLASS => 'kw1' - ), - // Highlight File Format Header Version 5 - 1 => array( - GESHI_SEARCH => '(^\s*)(Windows Registry Editor Version \d+\.\d+)(\s*$)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3', - GESHI_CLASS => 'geshi_registry_header' - ), - // Highlight File Format Header Version 4 - 2 => array( - GESHI_SEARCH => '(^\\s*)(REGEDIT\s?\d+)(\s*$)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3', - GESHI_CLASS => 'geshi_registry_header' - ), - // Highlight dword: 32 bit integer values - 3 => array( - GESHI_SEARCH => '(=\s*)(dword:[0-9a-fA-F]{8})(\s*$)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' -// GESHI_CLASS => 'kw2' - ), - // Highlight variable names - 4 => array( - GESHI_SEARCH => '(^\s*)(\".*?\")(\s*=)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3', - GESHI_CLASS => 'geshi_variable' - ), - // Highlight String Values - 5 => array( - GESHI_SEARCH => '(=\s*)(\".*?\")(\s*$)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3', - GESHI_CLASS => 'st0' - ), - // Highlight Hexadecimal Values (Single-Line and Multi-Line) - 6 => array( - GESHI_SEARCH => '(=\s*\n?\s*)(hex:[0-9a-fA-F]{2}(,(\\\s*\n\s*)?[0-9a-fA-F]{2})*)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '', - GESHI_CLASS => 'kw2' - ), - // Highlight Default Variable - 7 => array( - GESHI_SEARCH => '(^\s*)(@)(\s*=)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'm', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3', - GESHI_CLASS => 'geshi_variable' - ), - // Highlight GUID's found anywhere. - 8 => array( - GESHI_SEARCH => '(\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\})', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => 'i', - GESHI_BEFORE => '', - GESHI_AFTER => '', - GESHI_CLASS => 'geshi_guid' - ) - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'NUMBERS' => GESHI_NEVER, - ) - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/robots.php b/_piecrust/libs/Geshi/geshi/robots.php deleted file mode 100644 index 838eddb..0000000 --- a/_piecrust/libs/Geshi/geshi/robots.php +++ /dev/null @@ -1,100 +0,0 @@ - 'robots.txt', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array(1 => "/^Comment:.*?/m"), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'Allow', 'Crawl-delay', 'Disallow', 'Request-rate', 'Robot-version', - 'Sitemap', 'User-agent', 'Visit-time' - ) - ), - 'SYMBOLS' => array( - ':' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => 'http://www.robotstxt.org/wc/norobots.html' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/rpmspec.php b/_piecrust/libs/Geshi/geshi/rpmspec.php deleted file mode 100644 index 7f2a8e5..0000000 --- a/_piecrust/libs/Geshi/geshi/rpmspec.php +++ /dev/null @@ -1,133 +0,0 @@ - 'RPM Specification File', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array(), - 'QUOTEMARKS' => array('"','`'), - 'ESCAPE_CHAR' => '\\', - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - ), - 'KEYWORDS' => array( - ), - 'SYMBOLS' => array( - '<', '>', '=', - '!', '@', '~', '&', '|', '^', - '+','-', '*', '/', '%', - ',', ';', '?', '.', ':' - ), - 'STYLES' => array( - 'KEYWORDS' => array( - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 'HARD' => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;', - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'REGEXPS' => array( - 1 => 'color: #0000ff;', - 2 => 'color: #009999;', - 3 => 'color: #000000; font-weight: bold;', - 4 => 'color: #ff6600; font-style: italic;', - ), - 'SCRIPT' => array( - ) - ), - 'REGEXPS' => array( - 1 => array( - // search for generic macros - GESHI_SEARCH => '(%{?[a-zA-Z0-9_]+}?)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '', - ), - 2 => array( - // search for special macros - GESHI_SEARCH => '(%(?:define|patch\d*|mklibname|mkrel|configure\S+|makeinstall\S+|make_session|make|defattr|config|doc|setup))', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => 'i', - GESHI_BEFORE => '', - GESHI_AFTER => '', - ), - 3 => array ( - // special definitions - GESHI_SEARCH => '((?:summary|license|buildroot|buildrequires|provides|version|release|source\d*|group|buildarch|autoreqprov|provides|obsoletes|vendor|distribution|suggests|autoreq|autoprov|conflicts|name|url|requires|patch\d*):)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => 'i', - GESHI_BEFORE => '', - GESHI_AFTER => '', - ), - 4 => array ( - // section delimiting words - GESHI_SEARCH => '(%(?:description|package|prep|build|install|clean|postun|preun|post|pre|files|changelog))', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => 'i', - GESHI_BEFORE => '', - GESHI_AFTER => '', - ), - ), - 'URLS' => array(), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/rsplus.php b/_piecrust/libs/Geshi/geshi/rsplus.php deleted file mode 100644 index ef09b23..0000000 --- a/_piecrust/libs/Geshi/geshi/rsplus.php +++ /dev/null @@ -1,483 +0,0 @@ - 'R / S+', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"', "'"), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'else','global','in', 'otherwise','persistent', - ), - 2 => array( // base package - '$.package_version', '$<-', '$<-.data.frame', 'abbreviate', 'abs', 'acos', 'acosh', 'addNA', 'addTaskCallback', - 'agrep', 'alist', 'all', 'all.equal', 'all.equal.character', 'all.equal.default', 'all.equal.factor', - 'all.equal.formula', 'all.equal.language', 'all.equal.list', 'all.equal.numeric', 'all.equal.POSIXct', - 'all.equal.raw', 'all.names', 'all.vars', 'any', 'aperm', 'append', 'apply', 'Arg', 'args', 'array', 'as.array', - 'as.array.default', 'as.call', 'as.character', 'as.character.condition', 'as.character.Date', 'as.character.default', - 'as.character.error', 'as.character.factor', 'as.character.hexmode', 'as.character.numeric_version', 'as.character.octmode', - 'as.character.POSIXt', 'as.character.srcref', 'as.complex', 'as.data.frame', 'as.data.frame.array', 'as.data.frame.AsIs', - 'as.data.frame.character', 'as.data.frame.complex', 'as.data.frame.data.frame', 'as.data.frame.Date', 'as.data.frame.default', - 'as.data.frame.difftime', 'as.data.frame.factor', 'as.data.frame.integer', 'as.data.frame.list', 'as.data.frame.logical', - 'as.data.frame.matrix', 'as.data.frame.model.matrix', 'as.data.frame.numeric', 'as.data.frame.numeric_version', - 'as.data.frame.ordered', 'as.data.frame.POSIXct', 'as.data.frame.POSIXlt', 'as.data.frame.raw', 'as.data.frame.table', - 'as.data.frame.ts', 'as.data.frame.vector', 'as.Date', 'as.Date.character', 'as.Date.date', 'as.Date.dates', - 'as.Date.default', 'as.Date.factor', 'as.Date.numeric', 'as.Date.POSIXct', 'as.Date.POSIXlt', 'as.difftime', 'as.double', - 'as.double.difftime', 'as.double.POSIXlt', 'as.environment', 'as.expression', 'as.expression.default', 'as.factor', - 'as.function', 'as.function.default', 'as.hexmode', 'as.integer', 'as.list', 'as.list.data.frame', 'as.list.default', - 'as.list.environment', 'as.list.factor', 'as.list.function', 'as.list.numeric_version', 'as.logical', 'as.matrix', - 'as.matrix.data.frame', 'as.matrix.default', 'as.matrix.noquote', 'as.matrix.POSIXlt', 'as.name', 'as.null', 'as.null.default', - 'as.numeric', 'as.numeric_version', 'as.octmode', 'as.ordered', 'as.package_version', 'as.pairlist', 'as.POSIXct', - 'as.POSIXct.date', 'as.POSIXct.Date', 'as.POSIXct.dates', 'as.POSIXct.default', 'as.POSIXct.numeric', 'as.POSIXct.POSIXlt', - 'as.POSIXlt', 'as.POSIXlt.character', 'as.POSIXlt.date', 'as.POSIXlt.Date', 'as.POSIXlt.dates', 'as.POSIXlt.default', - 'as.POSIXlt.factor', 'as.POSIXlt.numeric', 'as.POSIXlt.POSIXct', 'as.qr', 'as.raw', 'as.real', 'as.single', - 'as.single.default', 'as.symbol', 'as.table', 'as.table.default', 'as.vector', 'as.vector.factor', 'asin', 'asinh', - 'asNamespace', 'asS4', 'assign', 'atan', 'atan2', 'atanh', 'attach', 'attachNamespace', 'attr', 'attr.all.equal', - 'attr<-', 'attributes', 'attributes<-', 'autoload', 'autoloader', 'backsolve', 'baseenv', 'basename', 'besselI', - 'besselJ', 'besselK', 'besselY', 'beta', 'bindingIsActive', 'bindingIsLocked', 'bindtextdomain', 'body', 'body<-', - 'bquote', 'break', 'browser', 'builtins', 'by', 'by.data.frame', 'by.default', 'bzfile', 'c', 'c.Date', 'c.noquote', - 'c.numeric_version', 'c.POSIXct', 'c.POSIXlt', 'call', 'callCC', 'capabilities', 'casefold', 'cat', 'category', - 'cbind', 'cbind.data.frame', 'ceiling', 'char.expand', 'character', 'charmatch', 'charToRaw', 'chartr', 'check_tzones', - 'chol', 'chol.default', 'chol2inv', 'choose', 'class', 'class<-', 'close', 'close.connection', 'close.srcfile', - 'closeAllConnections', 'codes', 'codes.factor', 'codes.ordered', 'codes<-', 'col', 'colMeans', 'colnames', - 'colnames<-', 'colSums', 'commandArgs', 'comment', 'comment<-', 'complex', 'computeRestarts', 'conditionCall', - 'conditionCall.condition', 'conditionMessage', 'conditionMessage.condition', 'conflicts', 'Conj', 'contributors', - 'cos', 'cosh', 'crossprod', 'Cstack_info', 'cummax', 'cummin', 'cumprod', 'cumsum', 'cut', 'cut.Date', 'cut.default', - 'cut.POSIXt', 'data.class', 'data.frame', 'data.matrix', 'date', 'debug', 'default.stringsAsFactors', 'delay', - 'delayedAssign', 'deparse', 'det', 'detach', 'determinant', 'determinant.matrix', 'dget', 'diag', 'diag<-', 'diff', - 'diff.Date', 'diff.default', 'diff.POSIXt', 'difftime', 'digamma', 'dim', 'dim.data.frame', 'dim<-', 'dimnames', - 'dimnames.data.frame', 'dimnames<-', 'dimnames<-.data.frame', 'dir', 'dir.create', 'dirname', 'do.call', 'double', - 'dput', 'dQuote', 'drop', 'dump', 'duplicated', 'duplicated.array', 'duplicated.data.frame', 'duplicated.default', - 'duplicated.matrix', 'duplicated.numeric_version', 'duplicated.POSIXlt', 'dyn.load', 'dyn.unload', 'eapply', 'eigen', - 'emptyenv', 'encodeString', 'Encoding', 'Encoding<-', 'env.profile', 'environment', 'environment<-', 'environmentIsLocked', - 'environmentName', 'eval', 'eval.parent', 'evalq', 'exists', 'exp', 'expand.grid', 'expm1', 'expression', 'F', 'factor', - 'factorial', 'fifo', 'file', 'file.access', 'file.append', 'file.choose', 'file.copy', 'file.create', 'file.exists', - 'file.info', 'file.path', 'file.remove', 'file.rename', 'file.show', 'file.symlink', 'Filter', 'Find', 'findInterval', - 'findPackageEnv', 'findRestart', 'floor', 'flush', 'flush.connection', 'for', 'force', 'formals', 'formals<-', - 'format', 'format.AsIs', 'format.char', 'format.data.frame', 'format.Date', 'format.default', 'format.difftime', - 'format.factor', 'format.hexmode', 'format.info', 'format.octmode', 'format.POSIXct', 'format.POSIXlt', - 'format.pval', 'formatC', 'formatDL', 'forwardsolve', 'function', 'gamma', 'gammaCody', 'gc', 'gc.time', - 'gcinfo', 'gctorture', 'get', 'getAllConnections', 'getCallingDLL', 'getCallingDLLe', 'getCConverterDescriptions', - 'getCConverterStatus', 'getConnection', 'getDLLRegisteredRoutines', 'getDLLRegisteredRoutines.character', - 'getDLLRegisteredRoutines.DLLInfo', 'getenv', 'geterrmessage', 'getExportedValue', 'getHook', 'getLoadedDLLs', - 'getNamespace', 'getNamespaceExports', 'getNamespaceImports', 'getNamespaceInfo', 'getNamespaceName', - 'getNamespaceUsers', 'getNamespaceVersion', 'getNativeSymbolInfo', 'getNumCConverters', 'getOption', 'getRversion', - 'getSrcLines', 'getTaskCallbackNames', 'gettext', 'gettextf', 'getwd', 'gl', 'globalenv', 'gregexpr', 'grep', - 'grepl', 'gsub', 'gzcon', 'gzfile', 'httpclient', 'I', 'iconv', 'iconvlist', 'icuSetCollate', 'identical', 'identity', - 'if', 'ifelse', 'Im', 'importIntoEnv', 'inherits', 'integer', 'interaction', 'interactive', 'intersect', 'intToBits', - 'intToUtf8', 'inverse.rle', 'invisible', 'invokeRestart', 'invokeRestartInteractively', 'is.array', 'is.atomic', - 'is.call', 'is.character', 'is.complex', 'is.data.frame', 'is.double', 'is.element', 'is.environment', - 'is.expression', 'is.factor', 'is.finite', 'is.function', 'is.infinite', 'is.integer', 'is.language', - 'is.list', 'is.loaded', 'is.logical', 'is.matrix', 'is.na', 'is.na.data.frame', 'is.na.POSIXlt', 'is.na<-', - 'is.na<-.default', 'is.na<-.factor', 'is.name', 'is.nan', 'is.null', 'is.numeric', 'is.numeric_version', - 'is.numeric.Date', 'is.numeric.POSIXt', 'is.object', 'is.ordered', 'is.package_version', 'is.pairlist', 'is.primitive', - 'is.qr', 'is.R', 'is.raw', 'is.real', 'is.recursive', 'is.single', 'is.symbol', 'is.table', 'is.unsorted', 'is.vector', - 'isBaseNamespace', 'isdebugged', 'isIncomplete', 'isNamespace', 'ISOdate', 'ISOdatetime', 'isOpen', 'isRestart', 'isS4', - 'isSeekable', 'isSymmetric', 'isSymmetric.matrix', 'isTRUE', 'jitter', 'julian', 'julian.Date', 'julian.POSIXt', 'kappa', - 'kappa.default', 'kappa.lm', 'kappa.qr', 'kappa.tri', 'kronecker', 'l10n_info', 'La.chol', 'La.chol2inv', 'La.eigen', - 'La.svd', 'labels', 'labels.default', 'lapply', 'lazyLoad', 'lazyLoadDBfetch', 'lbeta', 'lchoose', 'length', 'length<-', - 'length<-.factor', 'letters', 'LETTERS', 'levels', 'levels.default', 'levels<-', 'levels<-.factor', 'lfactorial', 'lgamma', - 'library', 'library.dynam', 'library.dynam.unload', 'licence', 'license', 'list', 'list.files', 'load', 'loadedNamespaces', - 'loadingNamespaceInfo', 'loadNamespace', 'loadURL', 'local', 'lockBinding', 'lockEnvironment', 'log', 'log10', 'log1p', 'log2', - 'logb', 'logical', 'lower.tri', 'ls', 'machine', 'Machine', 'make.names', 'make.unique', 'makeActiveBinding', 'manglePackageName', - 'Map', 'mapply', 'margin.table', 'mat.or.vec', 'match', 'match.arg', 'match.call', 'match.fun', 'Math.data.frame', 'Math.Date', - 'Math.difftime', 'Math.factor', 'Math.POSIXt', 'matrix', 'max', 'max.col', 'mean', 'mean.data.frame', 'mean.Date', 'mean.default', - 'mean.difftime', 'mean.POSIXct', 'mean.POSIXlt', 'mem.limits', 'memory.profile', 'merge', 'merge.data.frame', 'merge.default', - 'message', 'mget', 'min', 'missing', 'Mod', 'mode', 'mode<-', 'month.abb', 'month.name', 'months', 'months.Date', - 'months.POSIXt', 'mostattributes<-', 'names', 'names<-', 'namespaceExport', 'namespaceImport', 'namespaceImportClasses', - 'namespaceImportFrom', 'namespaceImportMethods', 'nargs', 'nchar', 'ncol', 'NCOL', 'Negate', 'new.env', 'next', 'NextMethod', - 'ngettext', 'nlevels', 'noquote', 'nrow', 'NROW', 'numeric', 'numeric_version', 'nzchar', 'objects', 'oldClass', - 'oldClass<-', 'on.exit', 'open', 'open.connection', 'open.srcfile', 'open.srcfilecopy', 'Ops.data.frame', 'Ops.Date', - 'Ops.difftime', 'Ops.factor', 'Ops.numeric_version', 'Ops.ordered', 'Ops.POSIXt', 'options', 'order', 'ordered', - 'outer', 'package_version', 'package.description', 'packageEvent', 'packageHasNamespace', 'packageStartupMessage', - 'packBits', 'pairlist', 'parent.env', 'parent.env<-', 'parent.frame', 'parse', 'parse.dcf', 'parseNamespaceFile', - 'paste', 'path.expand', 'pentagamma', 'pi', 'pipe', 'Platform', 'pmatch', 'pmax', 'pmax.int', 'pmin', 'pmin.int', - 'polyroot', 'pos.to.env', 'Position', 'pretty', 'prettyNum', 'print', 'print.AsIs', 'print.atomic', 'print.by', - 'print.condition', 'print.connection', 'print.data.frame', 'print.Date', 'print.default', 'print.difftime', - 'print.DLLInfo', 'print.DLLInfoList', 'print.DLLRegisteredRoutines', 'print.factor', 'print.hexmode', 'print.libraryIQR', - 'print.listof', 'print.NativeRoutineList', 'print.noquote', 'print.numeric_version', 'print.octmode', 'print.packageInfo', - 'print.POSIXct', 'print.POSIXlt', 'print.proc_time', 'print.restart', 'print.rle', 'print.simple.list', - 'print.srcfile', 'print.srcref', 'print.summary.table', 'print.table', 'print.warnings', 'printNoClass', - 'prmatrix', 'proc.time', 'prod', 'prop.table', 'provide', 'psigamma', 'pushBack', 'pushBackLength', 'q', 'qr', - 'qr.coef', 'qr.default', 'qr.fitted', 'qr.Q', 'qr.qty', 'qr.qy', 'qr.R', 'qr.resid', 'qr.solve', 'qr.X', 'quarters', - 'quarters.Date', 'quarters.POSIXt', 'quit', 'quote', 'R_system_version', 'R.home', 'R.version', 'R.Version', - 'R.version.string', 'range', 'range.default', 'rank', 'rapply', 'raw', 'rawConnection', 'rawConnectionValue', - 'rawShift', 'rawToBits', 'rawToChar', 'rbind', 'rbind.data.frame', 'rcond', 'Re', 'read.dcf', 'read.table.url', - 'readBin', 'readChar', 'readline', 'readLines', 'real', 'Recall', 'Reduce', 'reg.finalizer', 'regexpr', - 'registerS3method', 'registerS3methods', 'remove', 'removeCConverter', 'removeTaskCallback', 'rep', 'rep.Date', - 'rep.factor', 'rep.int', 'rep.numeric_version', 'rep.POSIXct', 'rep.POSIXlt', 'repeat', 'replace', 'replicate', - 'require', 'restart', 'restartDescription', 'restartFormals', 'retracemem', 'return', 'rev', 'rev.default', 'rle', - 'rm', 'RNGkind', 'RNGversion', 'round', 'round.Date', 'round.difftime', 'round.POSIXt', 'row', 'row.names', - 'row.names.data.frame', 'row.names.default', 'row.names<-', 'row.names<-.data.frame', 'row.names<-.default', - 'rowMeans', 'rownames', 'rownames<-', 'rowsum', 'rowsum.data.frame', 'rowsum.default', 'rowSums', 'sample', - 'sample.int', 'sapply', 'save', 'save.image', 'saveNamespaceImage', 'scale', 'scale.default', 'scan', 'scan.url', - 'search', 'searchpaths', 'seek', 'seek.connection', 'seq', 'seq_along', 'seq_len', 'seq.Date', 'seq.default', - 'seq.int', 'seq.POSIXt', 'sequence', 'serialize', 'set.seed', 'setCConverterStatus', 'setdiff', 'setequal', - 'setHook', 'setNamespaceInfo', 'setSessionTimeLimit', 'setTimeLimit', 'setwd', 'showConnections', 'shQuote', - 'sign', 'signalCondition', 'signif', 'simpleCondition', 'simpleError', 'simpleMessage', 'simpleWarning', 'sin', - 'single', 'sinh', 'sink', 'sink.number', 'slice.index', 'socketConnection', 'socketSelect', 'solve', 'solve.default', - 'solve.qr', 'sort', 'sort.default', 'sort.int', 'sort.list', 'sort.POSIXlt', 'source', 'source.url', 'split', - 'split.data.frame', 'split.Date', 'split.default', 'split.POSIXct', 'split<-', 'split<-.data.frame', 'split<-.default', - 'sprintf', 'sqrt', 'sQuote', 'srcfile', 'srcfilecopy', 'srcref', 'standardGeneric', 'stderr', 'stdin', 'stdout', - 'stop', 'stopifnot', 'storage.mode', 'storage.mode<-', 'strftime', 'strptime', 'strsplit', 'strtrim', 'structure', - 'strwrap', 'sub', 'subset', 'subset.data.frame', 'subset.default', 'subset.matrix', 'substitute', 'substr', - 'substr<-', 'substring', 'substring<-', 'sum', 'summary', 'summary.connection', 'summary.data.frame', - 'Summary.data.frame', 'summary.Date', 'Summary.Date', 'summary.default', 'Summary.difftime', - 'summary.factor', 'Summary.factor', 'summary.matrix', 'Summary.numeric_version', 'summary.POSIXct', - 'Summary.POSIXct', 'summary.POSIXlt', 'Summary.POSIXlt', 'summary.table', 'suppressMessages', - 'suppressPackageStartupMessages', 'suppressWarnings', 'svd', 'sweep', 'switch', 'symbol.C', - 'symbol.For', 'sys.call', 'sys.calls', 'Sys.chmod', 'Sys.Date', 'sys.frame', 'sys.frames', - 'sys.function', 'Sys.getenv', 'Sys.getlocale', 'Sys.getpid', 'Sys.glob', 'Sys.info', 'sys.load.image', - 'Sys.localeconv', 'sys.nframe', 'sys.on.exit', 'sys.parent', 'sys.parents', 'Sys.putenv', - 'sys.save.image', 'Sys.setenv', 'Sys.setlocale', 'Sys.sleep', 'sys.source', 'sys.status', - 'Sys.time', 'Sys.timezone', 'Sys.umask', 'Sys.unsetenv', 'Sys.which', 'system', 'system.file', - 'system.time', 't', 'T', 't.data.frame', 't.default', 'table', 'tabulate', 'tan', 'tanh', 'tapply', - 'taskCallbackManager', 'tcrossprod', 'tempdir', 'tempfile', 'testPlatformEquivalence', 'tetragamma', - 'textConnection', 'textConnectionValue', 'tolower', 'topenv', 'toString', 'toString.default', 'toupper', - 'trace', 'traceback', 'tracemem', 'tracingState', 'transform', 'transform.data.frame', 'transform.default', - 'trigamma', 'trunc', 'trunc.Date', 'trunc.POSIXt', 'truncate', 'truncate.connection', 'try', 'tryCatch', - 'typeof', 'unclass', 'undebug', 'union', 'unique', 'unique.array', 'unique.data.frame', 'unique.default', - 'unique.matrix', 'unique.numeric_version', 'unique.POSIXlt', 'units', 'units.difftime', 'units<-', - 'units<-.difftime', 'unix', 'unix.time', 'unlink', 'unlist', 'unloadNamespace', 'unlockBinding', - 'unname', 'unserialize', 'unsplit', 'untrace', 'untracemem', 'unz', 'upper.tri', 'url', 'UseMethod', - 'utf8ToInt', 'vector', 'Vectorize', 'version', 'Version', 'warning', 'warnings', 'weekdays', - 'weekdays.Date', 'weekdays.POSIXt', 'which', 'which.max', 'which.min', 'while', 'with', - 'with.default', 'withCallingHandlers', 'within', 'within.data.frame', 'within.list', 'withRestarts', - 'withVisible', 'write', 'write.dcf', 'write.table0', 'writeBin', 'writeChar', 'writeLines', 'xor', - 'xpdrows.data.frame', 'xtfrm', 'xtfrm.Date', 'xtfrm.default', 'xtfrm.factor', 'xtfrm.numeric_version', - 'xtfrm.POSIXct', 'xtfrm.POSIXlt', 'xtfrm.Surv', 'zapsmall', - ), - 3 => array( // Datasets - 'ability.cov', 'airmiles', 'AirPassengers', 'airquality', - 'anscombe', 'attenu', 'attitude', 'austres', 'beaver1', - 'beaver2', 'BJsales', 'BJsales.lead', 'BOD', 'cars', - 'ChickWeight', 'chickwts', 'co2', 'crimtab', - 'discoveries', 'DNase', 'esoph', 'euro', 'euro.cross', - 'eurodist', 'EuStockMarkets', 'faithful', 'fdeaths', - 'Formaldehyde', 'freeny', 'freeny.x', 'freeny.y', - 'HairEyeColor', 'Harman23.cor', 'Harman74.cor', 'Indometh', - 'infert', 'InsectSprays', 'iris', 'iris3', 'islands', - 'JohnsonJohnson', 'LakeHuron', 'ldeaths', 'lh', 'LifeCycleSavings', - 'Loblolly', 'longley', 'lynx', 'mdeaths', 'morley', 'mtcars', - 'nhtemp', 'Nile', 'nottem', 'occupationalStatus', 'Orange', - 'OrchardSprays', 'PlantGrowth', 'precip', 'presidents', - 'pressure', 'Puromycin', 'quakes', 'randu', 'rivers', 'rock', - 'Seatbelts', 'sleep', 'stack.loss', 'stack.x', 'stackloss', - 'state.abb', 'state.area', 'state.center', 'state.division', - 'state.name', 'state.region', 'state.x77', 'sunspot.month', - 'sunspot.year', 'sunspots', 'swiss', 'Theoph', 'Titanic', 'ToothGrowth', - 'treering', 'trees', 'UCBAdmissions', 'UKDriverDeaths', 'UKgas', - 'USAccDeaths', 'USArrests', 'USJudgeRatings', 'USPersonalExpenditure', - 'uspop', 'VADeaths', 'volcano', 'warpbreaks', 'women', 'WorldPhones', - 'WWWusage', - ), - 4 => array( // graphics package - 'abline', 'arrows', 'assocplot', 'axis', 'Axis', 'axis.Date', 'axis.POSIXct', - 'axTicks', 'barplot', 'barplot.default', 'box', 'boxplot', 'boxplot.default', - 'boxplot.matrix', 'bxp', 'cdplot', 'clip', 'close.screen', 'co.intervals', - 'contour', 'contour.default', 'coplot', 'curve', 'dotchart', 'erase.screen', - 'filled.contour', 'fourfoldplot', 'frame', 'grconvertX', 'grconvertY', 'grid', - 'hist', 'hist.default', 'identify', 'image', 'image.default', 'layout', - 'layout.show', 'lcm', 'legend', 'lines', 'lines.default', 'locator', 'matlines', - 'matplot', 'matpoints', 'mosaicplot', 'mtext', 'pairs', 'pairs.default', - 'panel.smooth', 'par', 'persp', 'pie', 'piechart', 'plot', 'plot.default', - 'plot.design', 'plot.new', 'plot.window', 'plot.xy', 'points', 'points.default', - 'polygon', 'rect', 'rug', 'screen', 'segments', 'smoothScatter', 'spineplot', - 'split.screen', 'stars', 'stem', 'strheight', 'stripchart', 'strwidth', 'sunflowerplot', - 'symbols', 'text', 'text.default', 'title', 'xinch', 'xspline', 'xyinch', 'yinch', - ), - 5 => array( // grDevices pkg - 'as.graphicsAnnot', 'bitmap', 'blues9', 'bmp', 'boxplot.stats', 'cairo_pdf', 'cairo_ps', 'check.options', - 'chull', 'CIDFont', 'cm', 'cm.colors', 'col2rgb', 'colorConverter', 'colorRamp', 'colorRampPalette', - 'colors', 'colorspaces', 'colours', 'contourLines', 'convertColor', 'densCols', 'dev.control', 'dev.copy', - 'dev.copy2eps', 'dev.copy2pdf', 'dev.cur', 'dev.interactive', 'dev.list', 'dev.new', 'dev.next', 'dev.off', - 'dev.prev', 'dev.print', 'dev.set', 'dev.size', 'dev2bitmap', 'devAskNewPage', 'deviceIsInteractive', - 'embedFonts', 'extendrange', 'getGraphicsEvent', 'graphics.off', 'gray', 'gray.colors', 'grey', 'grey.colors', - 'hcl', 'heat.colors', 'Hershey', 'hsv', 'jpeg', 'make.rgb', 'n2mfrow', 'nclass.FD', 'nclass.scott', - 'nclass.Sturges', 'palette', 'pdf', 'pdf.options', 'pdfFonts', 'pictex', 'png', 'postscript', 'postscriptFont', - 'postscriptFonts', 'ps.options', 'quartz', 'quartz.options', 'quartzFont', 'quartzFonts', 'rainbow', - 'recordGraphics', 'recordPlot', 'replayPlot', 'rgb', 'rgb2hsv', 'savePlot', 'setEPS', 'setPS', 'svg', - 'terrain.colors', 'tiff', 'topo.colors', 'trans3d', 'Type1Font', 'x11', 'X11', 'X11.options', 'X11Font', - 'X11Fonts', 'xfig', 'xy.coords', 'xyTable', 'xyz.coords', - ), - 6 => array( // methods package - 'addNextMethod', 'allGenerics', 'allNames', 'Arith', 'as', 'as<-', - 'asMethodDefinition', 'assignClassDef', 'assignMethodsMetaData', 'balanceMethodsList', - 'cacheGenericsMetaData', 'cacheMetaData', 'cacheMethod', 'callGeneric', - 'callNextMethod', 'canCoerce', 'cbind2', 'checkSlotAssignment', 'classesToAM', - 'classMetaName', 'coerce', 'coerce<-', 'Compare', 'completeClassDefinition', - 'completeExtends', 'completeSubclasses', 'Complex', 'conformMethod', 'defaultDumpName', - 'defaultPrototype', 'doPrimitiveMethod', 'dumpMethod', 'dumpMethods', 'el', 'el<-', - 'elNamed', 'elNamed<-', 'empty.dump', 'emptyMethodsList', 'existsFunction', 'existsMethod', - 'extends', 'finalDefaultMethod', 'findClass', 'findFunction', 'findMethod', 'findMethods', - 'findMethodSignatures', 'findUnique', 'fixPre1.8', 'formalArgs', 'functionBody', - 'functionBody<-', 'generic.skeleton', 'getAccess', 'getAllMethods', 'getAllSuperClasses', - 'getClass', 'getClassDef', 'getClasses', 'getClassName', 'getClassPackage', 'getDataPart', - 'getExtends', 'getFunction', 'getGeneric', 'getGenerics', 'getGroup', 'getGroupMembers', - 'getMethod', 'getMethods', 'getMethodsForDispatch', 'getMethodsMetaData', 'getPackageName', - 'getProperties', 'getPrototype', 'getSlots', 'getSubclasses', 'getValidity', 'getVirtual', - 'hasArg', 'hasMethod', 'hasMethods', 'implicitGeneric', 'initialize', 'insertMethod', 'is', - 'isClass', 'isClassDef', 'isClassUnion', 'isGeneric', 'isGrammarSymbol', 'isGroup', - 'isSealedClass', 'isSealedMethod', 'isVirtualClass', 'isXS3Class', 'languageEl', 'languageEl<-', - 'linearizeMlist', 'listFromMethods', 'listFromMlist', 'loadMethod', 'Logic', - 'makeClassRepresentation', 'makeExtends', 'makeGeneric', 'makeMethodsList', - 'makePrototypeFromClassDef', 'makeStandardGeneric', 'matchSignature', 'Math', 'Math2', 'mergeMethods', - 'metaNameUndo', 'method.skeleton', 'MethodAddCoerce', 'methodSignatureMatrix', 'MethodsList', - 'MethodsListSelect', 'methodsPackageMetaName', 'missingArg', 'mlistMetaName', 'new', 'newBasic', - 'newClassRepresentation', 'newEmptyObject', 'Ops', 'packageSlot', 'packageSlot<-', 'possibleExtends', - 'prohibitGeneric', 'promptClass', 'promptMethods', 'prototype', 'Quote', 'rbind2', - 'reconcilePropertiesAndPrototype', 'registerImplicitGenerics', 'rematchDefinition', - 'removeClass', 'removeGeneric', 'removeMethod', 'removeMethods', 'removeMethodsObject', 'representation', - 'requireMethods', 'resetClass', 'resetGeneric', 'S3Class', 'S3Class<-', 'S3Part', 'S3Part<-', 'sealClass', - 'seemsS4Object', 'selectMethod', 'selectSuperClasses', 'sessionData', 'setAs', 'setClass', 'setClassUnion', - 'setDataPart', 'setGeneric', 'setGenericImplicit', 'setGroupGeneric', 'setIs', 'setMethod', 'setOldClass', - 'setPackageName', 'setPrimitiveMethods', 'setReplaceMethod', 'setValidity', 'show', 'showClass', 'showDefault', - 'showExtends', 'showMethods', 'showMlist', 'signature', 'SignatureMethod', 'sigToEnv', 'slot', 'slot<-', - 'slotNames', 'slotsFromS3', 'substituteDirect', 'substituteFunctionArgs', 'Summary', 'superClassDepth', - 'testInheritedMethods', 'testVirtual', 'traceOff', 'traceOn', 'tryNew', 'trySilent', 'unRematchDefinition', - 'validObject', 'validSlotNames', - ), - 7 => array( // stats pkg - 'acf', 'acf2AR', 'add.scope', 'add1', 'addmargins', 'aggregate', - 'aggregate.data.frame', 'aggregate.default', 'aggregate.ts', 'AIC', - 'alias', 'anova', 'anova.glm', 'anova.glmlist', 'anova.lm', 'anova.lmlist', - 'anova.mlm', 'anovalist.lm', 'ansari.test', 'aov', 'approx', 'approxfun', - 'ar', 'ar.burg', 'ar.mle', 'ar.ols', 'ar.yw', 'arima', 'arima.sim', - 'arima0', 'arima0.diag', 'ARMAacf', 'ARMAtoMA', 'as.dendrogram', 'as.dist', - 'as.formula', 'as.hclust', 'as.stepfun', 'as.ts', 'asOneSidedFormula', 'ave', - 'bandwidth.kernel', 'bartlett.test', 'binom.test', 'binomial', 'biplot', - 'Box.test', 'bw.bcv', 'bw.nrd', 'bw.nrd0', 'bw.SJ', 'bw.ucv', 'C', 'cancor', - 'case.names', 'ccf', 'chisq.test', 'clearNames', 'cmdscale', 'coef', 'coefficients', - 'complete.cases', 'confint', 'confint.default', 'constrOptim', 'contr.helmert', - 'contr.poly', 'contr.SAS', 'contr.sum', 'contr.treatment', 'contrasts', 'contrasts<-', - 'convolve', 'cooks.distance', 'cophenetic', 'cor', 'cor.test', 'cov', 'cov.wt', - 'cov2cor', 'covratio', 'cpgram', 'cutree', 'cycle', 'D', 'dbeta', 'dbinom', 'dcauchy', - 'dchisq', 'decompose', 'delete.response', 'deltat', 'dendrapply', 'density', 'density.default', - 'deriv', 'deriv.default', 'deriv.formula', 'deriv3', 'deriv3.default', 'deriv3.formula', - 'deviance', 'dexp', 'df', 'df.kernel', 'df.residual', 'dfbeta', 'dfbetas', 'dffits', - 'dgamma', 'dgeom', 'dhyper', 'diff.ts', 'diffinv', 'dist', 'dlnorm', 'dlogis', - 'dmultinom', 'dnbinom', 'dnorm', 'dpois', 'drop.scope', 'drop.terms', 'drop1', - 'dsignrank', 'dt', 'dummy.coef', 'dunif', 'dweibull', 'dwilcox', 'ecdf', 'eff.aovlist', - 'effects', 'embed', 'end', 'estVar', 'expand.model.frame', 'extractAIC', 'factanal', - 'factor.scope', 'family', 'fft', 'filter', 'fisher.test', 'fitted', 'fitted.values', - 'fivenum', 'fligner.test', 'formula', 'frequency', 'friedman.test', 'ftable', 'Gamma', - 'gaussian', 'get_all_vars', 'getInitial', 'glm', 'glm.control', 'glm.fit', 'glm.fit.null', - 'hasTsp', 'hat', 'hatvalues', 'hatvalues.lm', 'hclust', 'heatmap', 'HoltWinters', 'influence', - 'influence.measures', 'integrate', 'interaction.plot', 'inverse.gaussian', 'IQR', - 'is.empty.model', 'is.leaf', 'is.mts', 'is.stepfun', 'is.ts', 'is.tskernel', 'isoreg', - 'KalmanForecast', 'KalmanLike', 'KalmanRun', 'KalmanSmooth', 'kernapply', 'kernel', 'kmeans', - 'knots', 'kruskal.test', 'ks.test', 'ksmooth', 'lag', 'lag.plot', 'line', 'lines.ts', 'lm', - 'lm.fit', 'lm.fit.null', 'lm.influence', 'lm.wfit', 'lm.wfit.null', 'loadings', 'loess', - 'loess.control', 'loess.smooth', 'logLik', 'loglin', 'lowess', 'ls.diag', 'ls.print', 'lsfit', - 'mad', 'mahalanobis', 'make.link', 'makeARIMA', 'makepredictcall', 'manova', 'mantelhaen.test', - 'mauchley.test', 'mauchly.test', 'mcnemar.test', 'median', 'median.default', 'medpolish', - 'model.extract', 'model.frame', 'model.frame.aovlist', 'model.frame.default', 'model.frame.glm', - 'model.frame.lm', 'model.matrix', 'model.matrix.default', 'model.matrix.lm', 'model.offset', - 'model.response', 'model.tables', 'model.weights', 'monthplot', 'mood.test', 'mvfft', 'na.action', - 'na.contiguous', 'na.exclude', 'na.fail', 'na.omit', 'na.pass', 'napredict', 'naprint', 'naresid', - 'nextn', 'nlm', 'nlminb', 'nls', 'nls.control', 'NLSstAsymptotic', 'NLSstClosestX', 'NLSstLfAsymptote', - 'NLSstRtAsymptote', 'numericDeriv', 'offset', 'oneway.test', 'optim', 'optimise', 'optimize', - 'order.dendrogram', 'p.adjust', 'p.adjust.methods', 'pacf', 'pairwise.prop.test', 'pairwise.t.test', - 'pairwise.table', 'pairwise.wilcox.test', 'pbeta', 'pbinom', 'pbirthday', 'pcauchy', 'pchisq', 'pexp', - 'pf', 'pgamma', 'pgeom', 'phyper', 'plclust', 'plnorm', 'plogis', 'plot.density', 'plot.ecdf', 'plot.lm', - 'plot.mlm', 'plot.spec', 'plot.spec.coherency', 'plot.spec.phase', 'plot.stepfun', 'plot.ts', 'plot.TukeyHSD', - 'pnbinom', 'pnorm', 'poisson', 'poisson.test', 'poly', 'polym', 'power', 'power.anova.test', 'power.prop.test', - 'power.t.test', 'PP.test', 'ppoints', 'ppois', 'ppr', 'prcomp', 'predict', 'predict.glm', 'predict.lm', - 'predict.mlm', 'predict.poly', 'preplot', 'princomp', 'print.anova', 'print.coefmat', 'print.density', - 'print.family', 'print.formula', 'print.ftable', 'print.glm', 'print.infl', 'print.integrate', 'print.lm', - 'print.logLik', 'print.terms', 'print.ts', 'printCoefmat', 'profile', 'proj', 'promax', 'prop.test', - 'prop.trend.test', 'psignrank', 'pt', 'ptukey', 'punif', 'pweibull', 'pwilcox', 'qbeta', 'qbinom', - 'qbirthday', 'qcauchy', 'qchisq', 'qexp', 'qf', 'qgamma', 'qgeom', 'qhyper', 'qlnorm', 'qlogis', - 'qnbinom', 'qnorm', 'qpois', 'qqline', 'qqnorm', 'qqnorm.default', 'qqplot', 'qsignrank', 'qt', - 'qtukey', 'quade.test', 'quantile', 'quantile.default', 'quasi', 'quasibinomial', 'quasipoisson', - 'qunif', 'qweibull', 'qwilcox', 'r2dtable', 'rbeta', 'rbinom', 'rcauchy', 'rchisq', 'read.ftable', - 'rect.hclust', 'reformulate', 'relevel', 'reorder', 'replications', 'reshape', 'reshapeLong', 'reshapeWide', - 'resid', 'residuals', 'residuals.default', 'residuals.glm', 'residuals.lm', 'rexp', 'rf', 'rgamma', 'rgeom', - 'rhyper', 'rlnorm', 'rlogis', 'rmultinom', 'rnbinom', 'rnorm', 'rpois', 'rsignrank', 'rstandard', 'rstandard.glm', - 'rstandard.lm', 'rstudent', 'rstudent.glm', 'rstudent.lm', 'rt', 'runif', 'runmed', 'rweibull', 'rwilcox', - 'scatter.smooth', 'screeplot', 'sd', 'se.contrast', 'selfStart', 'setNames', 'shapiro.test', 'simulate', - 'smooth', 'smooth.spline', 'smoothEnds', 'sortedXyData', 'spec.ar', 'spec.pgram', 'spec.taper', 'spectrum', - 'spline', 'splinefun', 'splinefunH', 'SSasymp', 'SSasympOff', 'SSasympOrig', 'SSbiexp', 'SSD', 'SSfol', - 'SSfpl', 'SSgompertz', 'SSlogis', 'SSmicmen', 'SSweibull', 'start', 'stat.anova', 'step', 'stepfun', 'stl', - 'StructTS', 'summary.aov', 'summary.aovlist', 'summary.glm', 'summary.infl', 'summary.lm', 'summary.manova', - 'summary.mlm', 'summary.stepfun', 'supsmu', 'symnum', 't.test', 'termplot', 'terms', 'terms.aovlist', - 'terms.default', 'terms.formula', 'terms.terms', 'time', 'toeplitz', 'ts', 'ts.intersect', 'ts.plot', - 'ts.union', 'tsdiag', 'tsp', 'tsp<-', 'tsSmooth', 'TukeyHSD', 'TukeyHSD.aov', 'uniroot', 'update', - 'update.default', 'update.formula', 'var', 'var.test', 'variable.names', 'varimax', 'vcov', 'weighted.mean', - 'weighted.residuals', 'weights', 'wilcox.test', 'window', 'window<-', 'write.ftable', 'xtabs', - ), - 8 => array( // utils pkg - 'alarm', 'apropos', 'argsAnywhere', 'as.person', 'as.personList', 'as.relistable', 'as.roman', - 'assignInNamespace', 'available.packages', 'browseEnv', 'browseURL', 'browseVignettes', 'bug.report', - 'capture.output', 'checkCRAN', 'chooseCRANmirror', 'citation', 'citEntry', 'citFooter', 'citHeader', - 'close.socket', 'combn', 'compareVersion', 'contrib.url', 'count.fields', 'CRAN.packages', 'data', - 'data.entry', 'dataentry', 'de', 'de.ncols', 'de.restore', 'de.setup', 'debugger', 'demo', 'download.file', - 'download.packages', 'dump.frames', 'edit', 'emacs', 'example', 'file_test', 'file.edit', 'find', 'fix', - 'fixInNamespace', 'flush.console', 'formatOL', 'formatUL', 'getAnywhere', 'getCRANmirrors', 'getFromNamespace', - 'getS3method', 'getTxtProgressBar', 'glob2rx', 'head', 'head.matrix', 'help', 'help.request', 'help.search', - 'help.start', 'history', 'index.search', 'install.packages', 'installed.packages', 'is.relistable', - 'limitedLabels', 'loadhistory', 'localeToCharset', 'ls.str', 'lsf.str', 'make.packages.html', 'make.socket', - 'makeRweaveLatexCodeRunner', 'memory.limit', 'memory.size', 'menu', 'methods', 'mirror2html', 'modifyList', - 'new.packages', 'normalizePath', 'nsl', 'object.size', 'old.packages', 'package.contents', 'package.skeleton', - 'packageDescription', 'packageStatus', 'page', 'person', 'personList', 'pico', 'prompt', 'promptData', - 'promptPackage', 'rc.getOption', 'rc.options', 'rc.settings', 'rc.status', 'read.csv', 'read.csv2', 'read.delim', - 'read.delim2', 'read.DIF', 'read.fortran', 'read.fwf', 'read.socket', 'read.table', 'readCitationFile', 'recover', - 'relist', 'remove.packages', 'Rprof', 'Rprofmem', 'RShowDoc', 'RSiteSearch', 'rtags', 'Rtangle', 'RtangleSetup', - 'RtangleWritedoc', 'RweaveChunkPrefix', 'RweaveEvalWithOpt', 'RweaveLatex', 'RweaveLatexFinish', 'RweaveLatexOptions', - 'RweaveLatexSetup', 'RweaveLatexWritedoc', 'RweaveTryStop', 'savehistory', 'select.list', 'sessionInfo', - 'setRepositories', 'setTxtProgressBar', 'stack', 'Stangle', 'str', 'strOptions', 'summaryRprof', 'Sweave', - 'SweaveHooks', 'SweaveSyntaxLatex', 'SweaveSyntaxNoweb', 'SweaveSyntConv', 'tail', 'tail.matrix', 'timestamp', - 'toBibtex', 'toLatex', 'txtProgressBar', 'type.convert', 'unstack', 'unzip', 'update.packages', 'update.packageStatus', - 'upgrade', 'url.show', 'URLdecode', 'URLencode', 'vi', 'View', 'vignette', 'write.csv', 'write.csv2', 'write.socket', - 'write.table', 'wsbrowser', 'xedit', 'xemacs', 'zip.file.extract', - ), - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>',';','|','<-','->', - '^', '-', ':', '::', ':::', '!', '!=', '*', '?', - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => true, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true, - 8 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000FF; font-weight: bold;', - 2 => 'color: #0000FF; font-weight: bold;', - 3 => 'color: #CC9900; font-weight: bold;', - 4 => 'color: #0000FF; font-weight: bold;', - 5 => 'color: #0000FF; font-weight: bold;', - 6 => 'color: #0000FF; font-weight: bold;', - 7 => 'color: #0000FF; font-weight: bold;', - 8 => 'color: #0000FF; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #228B22;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - ), - 'BRACKETS' => array( - 0 => 'color: #080;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #ff0000;' - ), - 'METHODS' => array( - 1 => '', - 2 => '' - ), - 'SYMBOLS' => array( - 0 => 'color: #080;' - ), - 'REGEXPS' => array( - 0 => 'color:#A020F0;' - ), - 'SCRIPT' => array( - 0 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => 'http://astrostatistics.psu.edu/su07/R/html/graphics/html/{FNAME}.html', // http://sekhon.berkeley.edu/library/graphics/html/{FNAME}.html - 3 => 'http://astrostatistics.psu.edu/su07/R/html/stats/html/Normal.html', // http://sekhon.berkeley.edu/library/stats/html/Normal.html - 4 => 'http://astrostatistics.psu.edu/su07/R/html/stats/html/{FNAME}.html', // http://sekhon.berkeley.edu/library/stats/html/{FNAME}.html - 5 => 'http://astrostatistics.psu.edu/su07/R/html/stats/html/summary.lm.html', // http://sekhon.berkeley.edu/library/stats/html/summary.lm.html - 6 => 'http://astrostatistics.psu.edu/su07/R/html/base/html/Log.html', // http://sekhon.berkeley.edu/library/base/html/Log.html - 7 => '', - 8 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.', - 2 => '::' - ), - 'REGEXPS' => array( - 0 => array( - GESHI_SEARCH => "([^\w])'([^\\n\\r']*)'", - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => "\\1'", - GESHI_AFTER => "'" - ) - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "(?|^&\\.])(? "(?![a-zA-Z0-9_\|%\\-&;\\.])" - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/ruby.php b/_piecrust/libs/Geshi/geshi/ruby.php deleted file mode 100644 index 69e395e..0000000 --- a/_piecrust/libs/Geshi/geshi/ruby.php +++ /dev/null @@ -1,231 +0,0 @@ - 'Ruby', - 'COMMENT_SINGLE' => array(1 => "#"), - 'COMMENT_MULTI' => array("=begin" => "=end"), - 'COMMENT_REGEXP' => array( - //Heredoc - 4 => '/<<\s*?(\w+)\\n.*?\\n\\1(?![a-zA-Z0-9])/si', - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"', '`','\''), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'alias', 'and', 'begin', 'break', 'case', 'class', - 'def', 'defined', 'do', 'else', 'elsif', 'end', - 'ensure', 'for', 'if', 'in', 'module', 'while', - 'next', 'not', 'or', 'redo', 'rescue', 'yield', - 'retry', 'super', 'then', 'undef', 'unless', - 'until', 'when', 'include' - ), - 2 => array( - '__FILE__', '__LINE__', 'false', 'nil', 'self', 'true', - 'return' - ), - 3 => array( - 'Array', 'Float', 'Integer', 'String', 'at_exit', - 'autoload', 'binding', 'caller', 'catch', 'chop', 'chop!', - 'chomp', 'chomp!', 'eval', 'exec', 'exit', 'exit!', 'fail', - 'fork', 'format', 'gets', 'global_variables', 'gsub', 'gsub!', - 'iterator?', 'lambda', 'load', 'local_variables', 'loop', - 'open', 'p', 'print', 'printf', 'proc', 'putc', 'puts', - 'raise', 'rand', 'readline', 'readlines', 'require', 'select', - 'sleep', 'split', 'sprintf', 'srand', 'sub', 'sub!', 'syscall', - 'system', 'trace_var', 'trap', 'untrace_var' - ), - 4 => array( - 'Abbrev', 'ArgumentError', 'Base64', 'Benchmark', - 'Benchmark::Tms', 'Bignum', 'Binding', 'CGI', 'CGI::Cookie', - 'CGI::HtmlExtension', 'CGI::QueryExtension', - 'CGI::Session', 'CGI::Session::FileStore', - 'CGI::Session::MemoryStore', 'Class', 'Comparable', 'Complex', - 'ConditionVariable', 'Continuation', 'Data', - 'Date', 'DateTime', 'Delegator', 'Dir', 'EOFError', 'ERB', - 'ERB::Util', 'Enumerable', 'Enumerable::Enumerator', 'Errno', - 'Exception', 'FalseClass', 'File', - 'File::Constants', 'File::Stat', 'FileTest', 'FileUtils', - 'FileUtils::DryRun', 'FileUtils::NoWrite', - 'FileUtils::StreamUtils_', 'FileUtils::Verbose', 'Find', - 'Fixnum', 'FloatDomainError', 'Forwardable', 'GC', 'Generator', - 'Hash', 'IO', 'IOError', 'Iconv', 'Iconv::BrokenLibrary', - 'Iconv::Failure', 'Iconv::IllegalSequence', - 'Iconv::InvalidCharacter', 'Iconv::InvalidEncoding', - 'Iconv::OutOfRange', 'IndexError', 'Interrupt', 'Kernel', - 'LoadError', 'LocalJumpError', 'Logger', 'Logger::Application', - 'Logger::Error', 'Logger::Formatter', 'Logger::LogDevice', - 'Logger::LogDevice::LogDeviceMutex', 'Logger::Severity', - 'Logger::ShiftingError', 'Marshal', 'MatchData', - 'Math', 'Matrix', 'Method', 'Module', 'Mutex', 'NameError', - 'NameError::message', 'NilClass', 'NoMemoryError', - 'NoMethodError', 'NotImplementedError', 'Numeric', 'Object', - 'ObjectSpace', 'Observable', 'PStore', 'PStore::Error', - 'Pathname', 'Precision', 'Proc', 'Process', 'Process::GID', - 'Process::Status', 'Process::Sys', 'Process::UID', 'Queue', - 'Range', 'RangeError', 'Rational', 'Regexp', 'RegexpError', - 'RuntimeError', 'ScriptError', 'SecurityError', 'Set', - 'Shellwords', 'Signal', 'SignalException', 'SimpleDelegator', - 'SingleForwardable', 'Singleton', 'SingletonClassMethods', - 'SizedQueue', 'SortedSet', 'StandardError', 'StringIO', - 'StringScanner', 'StringScanner::Error', 'Struct', 'Symbol', - 'SyncEnumerator', 'SyntaxError', 'SystemCallError', - 'SystemExit', 'SystemStackError', 'Tempfile', - 'Test::Unit::TestCase', 'Test::Unit', 'Test', 'Thread', - 'ThreadError', 'ThreadGroup', - 'ThreadsWait', 'Time', 'TrueClass', 'TypeError', 'URI', - 'URI::BadURIError', 'URI::Error', 'URI::Escape', 'URI::FTP', - 'URI::Generic', 'URI::HTTP', 'URI::HTTPS', - 'URI::InvalidComponentError', 'URI::InvalidURIError', - 'URI::LDAP', 'URI::MailTo', 'URI::REGEXP', - 'URI::REGEXP::PATTERN', 'UnboundMethod', 'Vector', 'YAML', - 'ZeroDivisionError', 'Zlib', - 'Zlib::BufError', 'Zlib::DataError', 'Zlib::Deflate', - 'Zlib::Error', 'Zlib::GzipFile', 'Zlib::GzipFile::CRCError', - 'Zlib::GzipFile::Error', 'Zlib::GzipFile::LengthError', - 'Zlib::GzipFile::NoFooter', 'Zlib::GzipReader', - 'Zlib::GzipWriter', 'Zlib::Inflate', 'Zlib::MemError', - 'Zlib::NeedDict', 'Zlib::StreamEnd', 'Zlib::StreamError', - 'Zlib::VersionError', - 'Zlib::ZStream', - 'HTML::Selector', 'HashWithIndifferentAccess', 'Inflector', - 'Inflector::Inflections', 'Mime', 'Mime::Type', - 'OCI8AutoRecover', 'TimeZone', 'XmlSimple' - ), - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '%', '&', '*', '|', '/', '<', '>', - '+', '-', '=>', '<<' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color:#9966CC; font-weight:bold;', - 2 => 'color:#0000FF; font-weight:bold;', - 3 => 'color:#CC0066; font-weight:bold;', - 4 => 'color:#CC00FF; font-weight:bold;', - ), - 'COMMENTS' => array( - 1 => 'color:#008000; font-style:italic;', - 4 => 'color: #cc0000; font-style: italic;', - 'MULTI' => 'color:#000080; font-style:italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color:#000099;' - ), - 'BRACKETS' => array( - 0 => 'color:#006600; font-weight:bold;' - ), - 'STRINGS' => array( - 0 => 'color:#996600;' - ), - 'NUMBERS' => array( - 0 => 'color:#006666;' - ), - 'METHODS' => array( - 1 => 'color:#9900CC;' - ), - 'SYMBOLS' => array( - 0 => 'color:#006600; font-weight:bold;' - ), - 'REGEXPS' => array( - 0 => 'color:#ff6633; font-weight:bold;', - 1 => 'color:#0066ff; font-weight:bold;', - 2 => 'color:#6666ff; font-weight:bold;', - 3 => 'color:#ff3333; font-weight:bold;' - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - 0 => array(//Variables - GESHI_SEARCH => "([[:space:]])(\\$[a-zA-Z_][a-zA-Z0-9_]*)", - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ), - 1 => array(//Arrays - GESHI_SEARCH => "([[:space:]])(@[a-zA-Z_][a-zA-Z0-9_]*)", - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ), - 2 => "([A-Z][a-zA-Z0-9_]*::)+[A-Z][a-zA-Z0-9_]*",//Static OOP symbols - 3 => array( - GESHI_SEARCH => "([[:space:]]|\[|\()(:[a-zA-Z_][a-zA-Z0-9_]*)", - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ) - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - 0 => array( - '<%' => '%>' - ) - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - ), - 'TAB_WIDTH' => 2 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/sas.php b/_piecrust/libs/Geshi/geshi/sas.php deleted file mode 100644 index ba1f85a..0000000 --- a/_piecrust/libs/Geshi/geshi/sas.php +++ /dev/null @@ -1,290 +0,0 @@ - 'SAS', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - '_ALL_','_CHARACTER_','_INFILE_','_N_','_NULL_','_NUMERIC_', - '_WEBOUT_' - ), - 2 => array( - '%BQUOTE','%CMPRES','%COMPSTOR','%DATATYP','%DISPLAY','%DO','%ELSE', - '%END','%EVAL','%GLOBAL','%GOTO','%IF','%INDEX','%INPUT','%KEYDEF', - '%LABEL','%LEFT','%LENGTH','%LET','%LOCAL','%LOWCASE','%MACRO', - '%MEND','%NRBQUOTE','%NRQUOTE','%NRSTR','%PUT','%QCMPRES','%QLEFT', - '%QLOWCASE','%QSCAN','%QSUBSTR','%QSYSFUNC','%QTRIM','%QUOTE', - '%QUPCASE','%SCAN','%STR','%SUBSTR','%SUPERQ','%SYSCALL', - '%SYSEVALF','%SYSEXEC','%SYSFUNC','%SYSGET','%SYSLPUT','%SYSPROD', - '%SYSRC','%SYSRPUT','%THEN','%TO','%TRIM','%UNQUOTE','%UNTIL', - '%UPCASE','%VERIFY','%WHILE','%WINDOW' - ), - 3 => array( - 'ABS','ADDR','AIRY','ARCOS','ARSIN','ATAN','ATTRC','ATTRN','BAND', - 'BETAINV','BLSHIFT','BNOT','BOR','BRSHIFT','BXOR','BYTE','CDF', - 'CEIL','CEXIST','CINV','CLOSE','CNONCT','COLLATE','COMPBL', - 'COMPOUND','COMPRESS','COSH','COS','CSS','CUROBS','CV','DACCDBSL', - 'DACCDB','DACCSL','DACCSYD','DACCTAB','DAIRY','DATETIME','DATEJUL', - 'DATEPART','DATE','DAY','DCLOSE','DEPDBSL','DEPDB','DEPSL','DEPSYD', - 'DEPTAB','DEQUOTE','DHMS','DIF','DIGAMMA','DIM','DINFO','DNUM', - 'DOPEN','DOPTNAME','DOPTNUM','DREAD','DROPNOTE','DSNAME','ERFC', - 'ERF','EXIST','EXP','FAPPEND','FCLOSE','FCOL','FDELETE','FETCHOBS', - 'FETCH','FEXIST','FGET','FILEEXIST','FILENAME','FILEREF','FINFO', - 'FINV','FIPNAMEL','FIPNAME','FIPSTATE','FLOOR','FNONCT','FNOTE', - 'FOPEN','FOPTNAME','FOPTNUM','FPOINT','FPOS','FPUT','FREAD', - 'FREWIND','FRLEN','FSEP','FUZZ','FWRITE','GAMINV','GAMMA', - 'GETOPTION','GETVARC','GETVARN','HBOUND','HMS','HOSTHELP','HOUR', - 'IBESSEL','INDEXW','INDEXC','INDEX','INPUTN','INPUTC','INPUT', - 'INTRR','INTCK','INTNX','INT','IRR','JBESSEL','JULDATE','KURTOSIS', - 'LAG','LBOUND','LEFT','LENGTH','LGAMMA','LIBNAME','LIBREF','LOG10', - 'LOG2','LOGPDF','LOGPMF','LOGSDF','LOG','LOWCASE','MAX','MDY', - 'MEAN','MINUTE','MIN','MOD','MONTH','MOPEN','MORT','NETPV','NMISS', - 'NORMAL','NPV','N','OPEN','ORDINAL','PATHNAME','PDF','PEEKC','PEEK', - 'PMF','POINT','POISSON','POKE','PROBBETA','PROBBNML','PROBCHI', - 'PROBF','PROBGAM','PROBHYPR','PROBIT','PROBNEGB','PROBNORM','PROBT', - 'PUTN','PUTC','PUT','QTR','QUOTE','RANBIN','RANCAU','RANEXP', - 'RANGAM','RANGE','RANK','RANNOR','RANPOI','RANTBL','RANTRI', - 'RANUNI','REPEAT','RESOLVE','REVERSE','REWIND','RIGHT','ROUND', - 'SAVING','SCAN','SDF','SECOND','SIGN','SINH','SIN','SKEWNESS', - 'SOUNDEX','SPEDIS','SQRT','STDERR','STD','STFIPS','STNAME', - 'STNAMEL','SUBSTR','SUM','SYMGET','SYSGET','SYSMSG','SYSPROD', - 'SYSRC','SYSTEM','TANH','TAN','TIMEPART','TIME','TINV','TNONCT', - 'TODAY','TRANSLATE','TRANWRD','TRIGAMMA','TRIMN','TRIM','TRUNC', - 'UNIFORM','UPCASE','USS','VARFMT','VARINFMT','VARLABEL','VARLEN', - 'VARNAME','VARNUM','VARRAYX','VARRAY','VARTYPE','VAR','VERIFY', - 'VFORMATX','VFORMATDX','VFORMATD','VFORMATNX','VFORMATN', - 'VFORMATWX','VFORMATW','VFORMAT','VINARRAYX','VINARRAY', - 'VINFORMATX','VINFORMATDX','VINFORMATD','VINFORMATNX','VINFORMATN', - 'VINFORMATWX','VINFORMATW','VINFORMAT','VLABELX','VLABEL', - 'VLENGTHX','VLENGTH','VNAMEX','VNAME','VTYPEX','VTYPE','WEEKDAY', - 'YEAR','YYQ','ZIPFIPS','ZIPNAME','ZIPNAMEL','ZIPSTATE' - ), - 4 => array( - 'ABORT','ADD','ALTER','AND','ARRAY','AS','ATTRIB','BY','CALL', - 'CARDS4','CASCADE','CATNAME','CHECK','CONTINUE','CREATE', - 'DATALINES4','DELETE','DESCRIBE','DISPLAY','DISTINCT','DM','DROP', - 'ENDSAS','FILE','FOOTNOTE','FOREIGN','FORMAT','FROM', - 'GOTO','GROUP','HAVING','IN','INFILE','INFORMAT', - 'INSERT','INTO','KEEP','KEY','LABEL','LEAVE', - 'LIKE','LINK','LIST','LOSTCARD','MERGE','MESSAGE','MISSING', - 'MODIFY','MSGTYPE','NOT','NULL','ON','OPTIONS','OR','ORDER', - 'OUTPUT','PAGE','PRIMARY','REDIRECT','REFERENCES','REMOVE', - 'RENAME','REPLACE','RESET','RESTRICT','RETAIN','RETURN','SELECT', - 'SET','SKIP','STARTSAS','STOP','SYSTASK','TABLE','TITLE','UNIQUE', - 'UPDATE','VALIDATE','VIEW','WAITSAS','WHERE','WINDOW','X' - ), - 5 => array( - 'DO','ELSE','END','IF','THEN','UNTIL','WHILE' - ), - 6 => array( - 'RUN','QUIT','DATA' - ), - 7 => array( - 'ERROR' - ), - 8 => array( - 'WARNING' - ), - 9 => array( - 'NOTE' - ) - ), - 'SYMBOLS' => array( - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false, - 7 => false, - 8 => false, - 9 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000ff;', - 2 => 'color: #0000ff;', - 3 => 'color: #0000ff;', - 4 => 'color: #0000ff;', - 5 => 'color: #0000ff;', - 6 => 'color: #000080; font-weight: bold;', - 7 => 'color: #ff0000;', - 8 => 'color: #00ff00;', - 9 => 'color: #0000ff;' - ), - 'COMMENTS' => array( -// 1 => 'color: #006400; font-style: italic;', - 'MULTI' => 'color: #006400; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #a020f0;' - ), - 'NUMBERS' => array( - 0 => 'color: #2e8b57; font-weight: bold;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - 3 => '' - ), - 'REGEXPS' => array( - 0 => 'color: #0000ff; font-weight: bold;', - 1 => 'color: #000080; font-weight: bold;', - 2 => 'color: #006400; font-style: italic;', - 3 => 'color: #006400; font-style: italic;', - 4 => 'color: #006400; font-style: italic;', - 5 => 'color: #ff0000; font-weight: bold;', - 6 => 'color: #00ff00; font-style: italic;', - 7 => 'color: #0000ff; font-style: normal;', - 8 => 'color: #b218b2; font-weight: bold;', - 9 => 'color: #b218b2; font-weight: bold;' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '', - 8 => '', - 9 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - 0 => "&[a-zA-Z_][a-zA-Z0-9_]*", - 1 => array(//Procedures - GESHI_SEARCH => '(^\\s*)(PROC \\w+)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'im', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ), - 2 => array( - GESHI_SEARCH => '(^\\s*)(\\*.*;)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'im', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ), - 3 => array( - GESHI_SEARCH => '(.*;\\s*)(\\*.*;)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'im', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ), - 4 => array( - GESHI_SEARCH => '(^\\s*)(%\\*.*;)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'im', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ), - 5 => array(//Error messages - GESHI_SEARCH => '(^ERROR.*)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => 'im', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - 6 => array(//Warning messages - GESHI_SEARCH => '(^WARNING.*)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => 'im', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - 7 => array(//Notice messages - GESHI_SEARCH => '(^NOTE.*)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => 'im', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - 8 => array( - GESHI_SEARCH => '(^\\s*)(CARDS.*)(^\\s*;\\s*$)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'sim', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ), - 9 => array( - GESHI_SEARCH => '(^\\s*)(DATALINES.*)(^\\s*;\\s*$)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'sim', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ) - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/scala.php b/_piecrust/libs/Geshi/geshi/scala.php deleted file mode 100644 index 58e7d23..0000000 --- a/_piecrust/libs/Geshi/geshi/scala.php +++ /dev/null @@ -1,122 +0,0 @@ - 'Scala', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'abstract', 'case', 'catch', 'class', 'def', - 'do', 'else', 'extends', 'false', 'final', - 'finally', 'for', 'forSome', 'if', 'implicit', - 'import', 'match', 'new', 'null', 'object', - 'override', 'package', 'private', 'protected', 'requires', - 'return', 'sealed', 'super', 'this', 'throw', - 'trait', 'try', 'true', 'type', 'val', - 'var', 'while', 'with', 'yield' - ), - 2 => array( - 'void', 'double', 'int', 'boolean', 'byte', 'short', 'long', 'char', 'float' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '*', '&', '%', '!', ';', '<', '>', '?', - '_', ':', '=', '=>', '<<:', - '<%', '>:', '#', '@' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000ff; font-weight: bold;', - 2 => 'color: #9999cc; font-weight: bold;', - ), - 'COMMENTS' => array( - 1=> 'color: #008000; font-style: italic;', - 'MULTI' => 'color: #00ff00; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #0000ff; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #F78811;' - ), - 'STRINGS' => array( - 0 => 'color: #6666FF;' - ), - 'NUMBERS' => array( - 0 => 'color: #F78811;' - ), - 'METHODS' => array( - 1 => 'color: #000000;', - 2 => 'color: #000000;' - ), - 'SYMBOLS' => array( - 0 => 'color: #000080;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => 'http://scala-lang.org', - 2 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/scheme.php b/_piecrust/libs/Geshi/geshi/scheme.php deleted file mode 100644 index 7258914..0000000 --- a/_piecrust/libs/Geshi/geshi/scheme.php +++ /dev/null @@ -1,170 +0,0 @@ - 'Scheme', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array('#|' => '|#'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'abs', 'acos', 'and', 'angle', 'append', 'appply', 'approximate', - 'asin', 'assoc', 'assq', 'assv', 'atan', - - 'begin', 'boolean?', 'bound-identifier=?', - - 'caar', 'caddr', 'cadr', 'call-with-current-continuation', - 'call-with-input-file', 'call-with-output-file', 'call/cc', 'car', - 'case', 'catch', 'cdddar', 'cddddr', 'cdr', 'ceiling', 'char->integer', - 'char-alphabetic?', 'char-ci<=?', 'char-ci=?', - 'char-ci>?', 'char-ci=?', 'char-downcase', 'char-lower-case?', - 'char-numeric', 'char-ready', 'char-ready?', 'char-upcase', - 'char-upper-case?', 'char-whitespace?', 'char<=?', 'char=?', 'char>?', 'char?', 'close-input-port', 'close-output-port', - 'complex?', 'cond', 'cons', 'construct-identifier', 'cos', - 'current-input-port', 'current-output-port', - - 'd', 'define', 'define-syntax', 'delay', 'denominator', 'display', 'do', - - 'e', 'eof-object?', 'eq?', 'equal?', 'eqv?', 'even?', 'exact->inexact', - 'exact?', 'exp', 'expt', 'else', - - 'f', 'floor', 'for-each', 'force', 'free-identifer=?', - - 'gcd', 'gen-counter', 'gen-loser', 'generate-identifier', - - 'identifier->symbol', 'identifier', 'if', 'imag-part', 'inexact->exact', - 'inexact?', 'input-port?', 'integer->char', 'integer?', 'integrate-system', - - 'l', 'lambda', 'last-pair', 'lcm', 'length', 'let', 'let*', 'letrec', - 'list', 'list->string', 'list->vector', 'list-ref', 'list-tail', 'list?', - 'load', 'log', - - 'magnitude', 'make-polar', 'make-promise', 'make-rectangular', - 'make-string', 'make-vector', 'map', 'map-streams', 'max', 'member', - 'memq', 'memv', 'min', 'modulo', - - 'negative', 'newline', 'nil', 'not', 'null?', 'number->string', 'number?', - 'numerator', - - 'odd?', 'open-input-file', 'open-output-file', 'or', 'output-port', - - 'pair?', 'peek-char', 'positive?', 'procedure?', - - 'quasiquote', 'quote', 'quotient', - - 'rational', 'rationalize', 'read', 'read-char', 'real-part', 'real?', - 'remainder', 'return', 'reverse', - - 's', 'sequence', 'set!', 'set-char!', 'set-cdr!', 'sin', 'sqrt', 'string', - 'string->list', 'string->number', 'string->symbol', 'string-append', - 'string-ci<=?', 'string-ci=?', - 'string-ci>?', 'string-copy', 'string-fill!', 'string-length', - 'string-ref', 'string-set!', 'string<=?', 'string=?', 'string>?', 'string?', 'substring', 'symbol->string', - 'symbol?', 'syntax', 'syntax-rules', - - 't', 'tan', 'template', 'transcript-off', 'transcript-on', 'truncate', - - 'unquote', 'unquote-splicing', 'unwrap-syntax', - - 'vector', 'vector->list', 'vector-fill!', 'vector-length', 'vector-ref', - 'vector-set!', 'vector?', - - 'with-input-from-file', 'with-output-to-file', 'write', 'write-char', - - 'zero?' - ) - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', '!', '%', '^', '&', '/','+','-','*','=','<','>',';','|' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 0 => 'color: #202020;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/scilab.php b/_piecrust/libs/Geshi/geshi/scilab.php deleted file mode 100644 index b2636c7..0000000 --- a/_piecrust/libs/Geshi/geshi/scilab.php +++ /dev/null @@ -1,295 +0,0 @@ - 'SciLab', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array( - 2 => "/(?<=\)|\]|\w)'/" - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'HARDQUOTE' => array("'", "'"), - 'HARDESCAPE' => array(), - 'KEYWORDS' => array( - 1 => array( - 'if', 'else', 'elseif', 'end', 'select', 'case', 'for', 'while', 'break' - ), - 2 => array( - 'STDIN', 'STDOUT', 'STDERR', - '%i', '%pi', '%e', '%eps', '%nan', '%inf', '%s', '%t', '%f', - 'usual', 'polynomial', 'boolean', 'character', 'function', 'rational', 'state-space', - 'sparse', 'boolean sparse', 'list', 'tlist', 'library', 'endfunction' - ), - 3 => array( - '%asn', '%helps', '%k', '%sn', 'abcd', 'abinv', 'abort', 'about', 'About_M2SCI_tools', - 'abs', 'acos', 'acosh', 'acoshm', 'acosm', 'AdCommunications', 'add_demo', 'add_edge', - 'add_help_chapter', 'add_node', 'add_palette', 'addcolor', 'addf', 'addinter', 'addmenu', - 'adj_lists', 'adj2sp', 'aff2ab', 'alufunctions', 'amell', 'analpf', 'analyze', 'and', - 'ans', 'apropos', 'arc_graph', 'arc_number', 'arc_properties', 'argn', 'arhnk', 'arl2', - 'arma', 'arma2p', 'armac', 'armax', 'armax1', 'arsimul', 'artest', 'articul', 'ascii', - 'asciimat', 'asin', 'asinh', 'asinhm', 'asinm', 'assignation', 'atan', 'atanh', 'atanhm', - 'atanm', 'augment', 'auread', 'auwrite', 'axes_properties', 'axis_properties', 'backslash', - 'balanc', 'balreal', 'bandwr', 'banner','bar', 'barh', 'barhomogenize', 'basename', 'bdiag', - 'beep', 'besselh', 'besseli', 'besselj', 'besselk', 'bessely', 'best_match', 'beta','bezout', - 'bifish', 'bilin', 'binomial', 'black', 'bloc2exp', 'bloc2ss', 'bode', 'bool2s', - 'boucle', 'brackets', 'browsevar', 'bsplin3val', 'bstap', 'buttmag', 'buttondialog', - 'bvode', 'bvodeS', 'c_link', 'cainv', 'calendar', 'calerf', 'calfrq', 'call', 'canon', 'casc', - 'cat', 'catch', 'ccontrg', 'cd', 'cdfbet', 'cdfbin', 'cdfchi', 'cdfchn', 'cdff', 'cdffnc', - 'cdfgam', 'cdfnbn', 'cdfnor', 'cdfpoi', 'cdft', 'ceil', 'cell', 'cell2mat', 'cellstr', 'center', - 'cepstrum', 'chain_struct', 'chaintest', 'champ', 'champ_properties', 'champ1', 'char', 'chart', - 'chartooem', 'chdir', 'cheb1mag', 'cheb2mag', 'check_graph', 'chepol', 'chfact', 'chol', 'chsolve', - 'circuit', 'classmarkov', 'clc', 'clean', 'clear', 'clear_pixmap', 'clearfun', 'clearglobal','clf', - 'clipboard', 'close', 'cls2dls', 'cmb_lin', 'cmndred', 'cmoment', 'code2str', 'coeff', 'coff', 'coffg', - 'colcomp', 'colcompr', 'colinout', 'colon', 'color', 'color_list', 'colorbar', 'colordef', 'colormap', - 'colregul', 'comma', 'comments', 'comp', 'companion', 'comparison', 'Compound_properties', 'con_nodes', - 'cond', 'config', 'configure_msvc', 'conj', 'connex', 'console', 'cont_frm', 'cont_mat', 'Contents', - 'continue', 'contour', 'contour2d', 'contour2di', 'contourf', 'contr', 'contract_edge', 'contrss', - 'convex_hull', 'convol', 'convstr', 'copfac', 'copy', 'corr', 'correl', 'cos', 'cosh', 'coshm', - 'cosm', 'cotg', 'coth', 'cothm', 'covar', 'create_palette', 'cshep2d', 'csim', 'cspect', 'Cste', - 'ctr_gram', 'cumprod', 'cumsum', 'cycle_basis', 'czt', 'dasrt', 'dassl', 'datafit', 'date', 'datenum', - 'datevec', 'dbphi', 'dcf', 'ddp', 'debug', 'dec2hex', 'deff', 'definedfields', 'degree', 'delbpt', - 'delete', 'delete_arcs', 'delete_nodes', 'delip', 'delmenu', 'demoplay', 'denom', 'derivat', 'derivative', - 'des2ss', 'des2tf', 'det', 'determ', 'detr', 'detrend', 'dft', 'dhinf', 'dhnorm', 'diag', 'diary', - 'diff', 'diophant', 'dir', 'dirname', 'disp', 'dispbpt', 'dispfiles', 'dlgamma', 'dnaupd', 'do', 'dot', - 'double', 'dragrect', 'draw', 'drawaxis', 'drawlater', 'drawnow', 'driver', 'dsaupd', 'dscr', - 'dsearch', 'dsimul', 'dt_ility', 'dtsi', 'edge_number', 'edit', 'edit_curv', 'edit_error', - 'edit_graph', 'edit_graph_menus', 'editvar', 'eigenmarkov', 'ell1mag', - 'empty', 'emptystr', 'eqfir', 'eqiir', 'equal', 'Equal', 'equil', 'equil1', - 'ereduc', 'erf', 'erfc', 'erfcx', 'errbar', 'errcatch', 'errclear', 'error', 'error_table', 'etime', - 'eval', 'eval_cshep2d', 'eval3d', 'eval3dp', 'evans', 'evstr', 'excel2sci', 'exec', 'execstr', 'exists', - 'exit', 'exp', 'expm', 'external', 'extraction', 'eye', 'fac3d', 'factorial', 'factors', 'faurre', 'fchamp', - 'fcontour', 'fcontour2d', 'fec', 'fec_properties', 'feedback', 'feval', 'ffilt', 'fft', 'fft2', 'fftshift', - 'fgrayplot', 'figure', 'figure_properties', 'figure_style', 'file', 'fileinfo', 'fileparts', 'filter', 'find', - 'find_freq', 'find_path', 'findABCD', 'findAC', 'findBD', 'findBDK', 'findm', 'findmsvccompiler', 'findobj', - 'findR', 'findx0BD', 'firstnonsingleton', 'fit_dat', 'fix', 'floor', 'flts', 'foo', 'format', - 'formatman', 'fort', 'fourplan', 'fplot2d', 'fplot3d', 'fplot3d1', 'fprintf', 'fprintfMat', 'frep2tf', - 'freq', 'freson', 'frexp', 'frfit', 'frmag', 'fscanf', 'fscanfMat', 'fsfirlin', 'fsolve', 'fspecg', - 'fstabst', 'fstair', 'ftest', 'ftuneq', 'full', 'fullfile', 'fullrf', 'fullrfk', 'fun2string', 'Funcall', - 'funcprot', 'functions', 'funptr', 'fusee', 'G_make', 'g_margin', 'gainplot', 'gamitg', - 'gamma', 'gammaln', 'gca', 'gcare', 'gcd', 'gce', 'gcf', 'gda', 'gdf', 'gen_net', 'genfac3d', 'genlib', - 'genmarkov', 'geom3d', 'geomean', 'get', 'get_contents_infer', 'get_function_path', 'getcolor', 'getcwd', - 'getd', 'getdate', 'getenv', 'getf', 'getfield', 'getfont', 'gethistory', 'getio', 'getlinestyle', - 'getlongpathname', 'getmark', 'getmemory', 'getos', 'getpid', 'getscilabkeywords', 'getshell', - 'getshortpathname', 'getsymbol', 'getvalue', 'getversion', 'gfare', 'gfrancis', 'girth', 'givens', - 'glever', 'glist', 'global', 'GlobalProperty', 'glue', 'gmres', 'gpeche', 'gr_menu', 'graduate', 'grand', - 'graph_2_mat', 'graph_center', 'graph_complement', 'graph_diameter', 'graph_power', 'graph_simp', 'graph_sum', - 'graph_union', 'graphic', 'Graphics', 'graphics_entities', 'graph-list', 'graycolormap', 'grayplot', - 'grayplot_properties', 'graypolarplot', 'great', 'grep', 'group', 'gschur', 'gsort', 'gspec', 'gstacksize', - 'gtild', 'h_cl', 'h_inf', 'h_inf_st', 'h_norm', 'h2norm', 'halt', 'hamilton', 'hank', 'hankelsv', 'harmean', - 'hat', 'havewindow', 'head_comments', 'help', 'help_skeleton', 'hermit', 'hess', 'hex2dec', 'hilb', 'hinf', - 'hist3d', 'histplot', 'horner', 'host', 'hotcolormap', 'householder', 'hrmt', 'hsv2rgb', 'hsvcolormap', - 'htrianr', 'hypermat', 'hypermatrices', 'iconvert', 'ieee', 'ifft', 'iir', 'iirgroup', 'iirlp', - 'ilib_build', 'ilib_compile', 'ilib_for_link', 'ilib_gen_gateway', 'ilib_gen_loader', 'ilib_gen_Make', - 'im_inv', 'imag', 'impl', 'imrep2ss', 'imult', 'ind2sub', 'Infer', 'inistate', 'input', 'insertion', 'int', - 'int16', 'int2d', 'int32', 'int3d', 'int8', 'intc', 'intdec', 'integrate', 'interp', 'interp1', 'interp2d', - 'interp3d', 'interpln', 'intersci', 'intersect', 'intg', 'intl', 'intppty', 'intsplin', 'inttrap', 'inttype', - 'inv', 'inv_coeff', 'invr', 'invsyslin', 'iqr', 'is_connex', 'iscellstr', 'isdef', 'isdir', 'isempty', - 'isequal', 'isequalbitwise', 'iserror', 'isglobal', 'isinf', 'isnan', 'isoview', 'isreal', 'javasci', - 'jetcolormap', 'jmat', 'justify', 'kalm', 'karmarkar', 'kernel', 'keyboard', 'knapsack', 'kpure', 'krac2', - 'kron', 'kroneck', 'label_properties', 'labostat', 'LANGUAGE', 'lasterror', 'lattn', 'lattp', 'lcf', 'lcm', - 'lcmdiag', 'ldiv', 'ldivf', 'leastsq', 'left', 'legend', 'legend_properties', 'legendre', 'legends', 'length', - 'leqr', 'less', 'lev', 'levin', 'lex_sort', 'lft', 'lgfft', 'lib', 'lin', 'lin2mu', 'lindquist', - 'line_graph', 'linear_interpn', 'lines', 'LineSpec', 'linf', 'linfn', 'link', 'linmeq', 'linpro', 'linsolve', - 'linspace', 'listfiles', 'listvarinfile', 'lmisolver', 'lmitool', 'load', 'load_graph', 'loadhistory', - 'loadmatfile', 'loadplots', 'loadwave', 'locate', 'log', 'log10', 'log1p', 'log2', 'logm', 'logspace', - 'lotest', 'lqe', 'lqg', 'lqg_ltr', 'lqg2stan', 'lqr', 'ls', 'lsq', 'lsq_splin', 'lsqrsolve', 'lsslist', - 'lstcat', 'lstsize', 'ltitr', 'lu', 'ludel', 'lufact', 'luget', 'lusolve', 'lyap', 'm_circle', 'm2scideclare', - 'macglov', 'macr2lst', 'macr2tree', 'macro', 'macrovar', 'mad', 'make_graph', 'make_index', 'makecell', 'man', - 'manedit', 'mapsound', 'markp2ss', 'mat_2_graph', 'matfile2sci', 'Matlab-Scilab_character_strings', 'Matplot', - 'Matplot_properties', 'Matplot1', 'matrices', 'matrix', 'max', 'max_cap_path', 'max_clique', 'max_flow', - 'maxi', 'mcisendstring', 'mclearerr', 'mclose', 'mdelete', 'mean', 'meanf', 'median', 'menus', 'meof', - 'merror', 'mese', 'mesh', 'mesh2d', 'meshgrid', 'mfft', 'mfile2sci', 'mfprintf', 'mfscanf', 'mget', 'mgeti', - 'mgetl', 'mgetstr', 'milk_drop', 'min', 'min_lcost_cflow', 'min_lcost_flow1', 'min_lcost_flow2', - 'min_qcost_flow', 'min_weight_tree', 'mine', 'mini', 'minreal', 'minss', 'minus', 'mkdir', 'mlist', 'mode', - 'modulo', 'moment', 'mopen', 'move', 'mprintf', 'mps2linpro', 'mput', 'mputl', 'mputstr', 'mrfit', 'mscanf', - 'msd', 'mseek', 'msprintf', 'msscanf', 'mstr2sci', 'mtell', 'mtlb_0', 'mtlb_a', 'mtlb_all', 'mtlb_any', - 'mtlb_axis', 'mtlb_beta', 'mtlb_box', 'mtlb_close', 'mtlb_colordef', 'mtlb_conv', 'mtlb_cumprod', 'mtlb_cumsum', - 'mtlb_dec2hex', 'mtlb_delete', 'mtlb_diag', 'mtlb_diff', 'mtlb_dir', 'mtlb_double', 'mtlb_e', 'mtlb_echo', - 'mtlb_eig', 'mtlb_eval', 'mtlb_exist', 'mtlb_eye', 'mtlb_false', 'mtlb_fft', 'mtlb_fftshift', 'mtlb_find', - 'mtlb_findstr', 'mtlb_fliplr', 'mtlb_fopen', 'mtlb_format', 'mtlb_fprintf', 'mtlb_fread', 'mtlb_fscanf', - 'mtlb_full', 'mtlb_fwrite', 'mtlb_grid', 'mtlb_hold', 'mtlb_i', 'mtlb_ifft', 'mtlb_imp', 'mtlb_int16', - 'mtlb_int32', 'mtlb_int8', 'mtlb_is', 'mtlb_isa', 'mtlb_isfield', 'mtlb_isletter', 'mtlb_isspace', 'mtlb_l', - 'mtlb_legendre', 'mtlb_linspace', 'mtlb_load', 'mtlb_logic', 'mtlb_logical', 'mtlb_lower', 'mtlb_max', - 'mtlb_min', 'mtlb_mode', 'mtlb_more', 'mtlb_num2str', 'mtlb_ones', 'mtlb_plot', 'mtlb_prod', 'mtlb_rand', - 'mtlb_randn', 'mtlb_rcond', 'mtlb_realmax', 'mtlb_realmin', 'mtlb_repmat', 'mtlb_s', 'mtlb_save', - 'mtlb_setstr', 'mtlb_size', 'mtlb_sort', 'mtlb_sparse', 'mtlb_strcmp', 'mtlb_strcmpi', 'mtlb_strfind', - 'mtlb_strrep', 'mtlb_sum', 'mtlb_t', 'mtlb_toeplitz', 'mtlb_tril', 'mtlb_triu', 'mtlb_true', 'mtlb_uint16', - 'mtlb_uint32', 'mtlb_uint8', 'mtlb_upper', 'mtlb_zeros', 'mu2lin', 'mucomp', 'mulf', 'mvvacov', 'name2rgb', - 'names', 'nancumsum', 'nand2mean', 'nanmax', 'nanmean', 'nanmeanf', 'nanmedian', 'nanmin', 'nanstdev', - 'nansum', 'narsimul', 'NDcost', 'ndgrid', 'ndims', 'nearfloat', 'nehari', 'neighbors', 'netclose', 'netwindow', - 'netwindows', 'new', 'newaxes', 'newest', 'newfun', 'nextpow2', 'nf3d', 'nfreq', 'nlev', 'nnz', 'node_number', - 'nodes_2_path', 'nodes_degrees', 'noisegen', 'norm', 'not', 'null', 'number_properties', 'numdiff', 'numer', - 'nyquist', 'object_editor', 'obs_gram', 'obscont', 'obscont1', 'observer', 'obsv_mat', 'obsvss', 'ode', - 'ode_discrete', 'ode_optional_output', 'ode_root', 'odedc', 'odeoptions', 'oemtochar', 'old_style', - 'oldbesseli', 'oldbesselj', 'oldbesselk', 'oldbessely', 'oldload', 'oldplot', 'oldsave', 'ones', - 'Operation', 'optim', 'or', 'orth', 'overloading', 'p_margin', 'param3d', 'param3d_properties', - 'param3d1', 'paramfplot2d', 'parents', 'parrot', 'part', 'path_2_nodes', 'pathconvert', 'pause', 'pbig', - 'pca', 'pcg', 'pdiv', 'pen2ea', 'pencan', 'penlaur', 'percent', 'perctl', 'perfect_match', 'perl', - 'perms', 'permute', 'pertrans', 'pfss', 'phasemag', 'phc', 'pie', 'pinv', 'pipe_network', 'playsnd', 'plot', - 'plot_graph', 'plot2d', 'plot2d_old_version', 'plot2d1', 'plot2d2', 'plot2d3', 'plot2d4', 'plot3d', - 'plot3d_old_version', 'plot3d1', 'plot3d2', 'plot3d3', 'plotframe', 'plotprofile', 'plus', 'plzr', - 'pmodulo', 'pol2des', 'pol2str', 'pol2tex', 'polar', 'polarplot', 'polfact', 'poly', 'polyline_properties', - 'portr3d', 'portrait', 'power', 'ppol', 'prbs_a', 'predecessors', 'predef', 'print', 'printf', - 'printf_conversion', 'printing', 'printsetupbox', 'prod', 'profile', 'progressionbar', 'proj', 'projsl', - 'projspec', 'psmall', 'pspect', 'pvm', 'pvm_addhosts', 'pvm_barrier', 'pvm_bcast', 'pvm_bufinfo', 'pvm_config', - 'pvm_delhosts', 'pvm_error', 'pvm_exit', 'pvm_f772sci', 'pvm_get_timer', 'pvm_getinst', 'pvm_gettid', - 'pvm_gsize', 'pvm_halt', 'pvm_joingroup', 'pvm_kill', 'pvm_lvgroup', 'pvm_mytid', 'pvm_parent', 'pvm_probe', - 'pvm_recv', 'pvm_reduce', 'pvm_sci2f77', 'pvm_send', 'pvm_set_timer', 'pvm_spawn', 'pvm_spawn_independent', - 'pvm_start', 'pvm_tasks', 'pvm_tidtohost', 'pvmd3', 'pwd', 'qassign', 'qld', 'qmr', 'qr', 'quapro', 'quart', - 'quaskro', 'quit', 'quote', 'rand', 'randpencil', 'range', 'rank', 'rankqr', 'rat', 'rcond', - 'rdivf', 'read', 'read4b', 'readb', 'readc_', 'readmps', 'readxls', 'real', 'realtime', 'realtimeinit', - 'rectangle_properties', 'recur', 'reglin', 'regress', 'remez', 'remezb', 'repfreq', 'replot', 'resethistory', - 'residu', 'resume', 'return', 'rgb2name', 'ric_desc', 'ricc', 'riccati', 'rlist', 'rmdir', 'roots', 'rotate', - 'round', 'routh_t', 'rowcomp', 'rowcompr', 'rowinout', 'rowregul', 'rowshuff', 'rpem', 'rref', 'rtitr', - 'rubberbox', 'salesman', 'sample', 'samplef', 'samwr', 'save', 'save_format', 'save_graph', 'savehistory', - 'savematfile', 'savewave', 'sca', 'scaling', 'scanf', 'scanf_conversion', 'scf', 'schur', 'sci_files', - 'sci2exp', 'sci2for', 'sci2map', 'sciargs', 'SciComplex', 'SciComplexArray', 'SciDouble', 'SciDoubleArray', - 'scilab', 'Scilab', 'ScilabEval', 'scilink', 'scipad', 'SciString', 'SciStringArray', 'sd2sci', 'sda', 'sdf', - 'secto3d', 'segs_properties', 'semi', 'semicolon', 'semidef', 'sensi', 'set', 'set_posfig_dim', - 'setbpt', 'setdiff', 'setenv', 'seteventhandler', 'setfield', 'sethomedirectory', 'setlanguage', 'setmenu', - 'sfact', 'Sfgrayplot', 'Sgrayplot', 'sgrid', 'shortest_path', 'show_arcs', 'show_graph', 'show_nodes', - 'show_pixmap', 'showprofile', 'sident', 'sign', 'Signal', 'signm', 'simp', 'simp_mode', 'sin', 'sinc', - 'sincd', 'sinh', 'sinhm', 'sinm', 'size', 'slash', 'sleep', 'sm2des', 'sm2ss', 'smooth', 'solve', - 'sorder', 'sort', 'sound', 'soundsec', 'sp2adj', 'spaninter', 'spanplus', 'spantwo', 'spchol', - 'spcompack', 'spec', 'specfact', 'speye', 'spget', 'splin', 'splin2d', 'splin3d', 'split_edge', 'spones', - 'sprand', 'sprintf', 'spzeros', 'sqroot', 'sqrt', 'sqrtm', 'square', 'squarewave', 'srfaur', 'srkf', 'ss2des', - 'ss2ss', 'ss2tf', 'sscanf', 'sskf', 'ssprint', 'ssrand', 'st_deviation', 'st_ility', 'stabil', 'stacksize', - 'star', 'startup', 'stdev', 'stdevf', 'str2code', 'strange', 'strcat', 'strindex', 'string', 'stringbox', - 'strings', 'stripblanks', 'strong_con_nodes', 'strong_connex', 'strsplit', 'strsubst', 'struct', 'sub2ind', - 'subf', 'subgraph', 'subplot', 'successors', 'sum', 'supernode', 'surf', 'surface_properties', 'sva', - 'svd', 'svplot', 'sylm', 'sylv', 'symbols', 'sysconv', 'sysdiag', 'sysfact', 'syslin', 'syssize', 'system', - 'systems', 'systmat', 'tabul', 'tan', 'tangent', 'tanh', 'tanhm', 'tanm', 'TCL_CreateSlave', 'TCL_DeleteInterp', - 'TCL_EvalFile', 'TCL_EvalStr', 'TCL_ExistInterp', 'TCL_ExistVar', 'TCL_GetVar', 'TCL_GetVersion', 'TCL_SetVar', - 'TCL_UnsetVar', 'TCL_UpVar', 'tdinit', 'testmatrix', 'texprint', 'text_properties', 'tf2des', 'tf2ss', 'then', - 'thrownan', 'tic', 'tilda', 'time_id', 'timer', 'title', 'titlepage', 'TK_EvalFile', 'TK_EvalStr', 'tk_getdir', - 'tk_getfile', 'TK_GetVar', 'tk_savefile', 'TK_SetVar', 'toc', 'toeplitz', 'tohome', 'tokenpos', - 'tokens', 'toolbar', 'toprint', 'trace', 'trans', 'trans_closure', 'translatepaths', 'tree2code', 'trfmod', - 'trianfml', 'tril', 'trimmean', 'trisolve', 'triu', 'try', 'trzeros', 'twinkle', 'type', 'Type', 'typename', - 'typeof', 'ui_observer', 'uicontrol', 'uimenu', 'uint16', 'uint32', 'uint8', 'ulink', 'unglue', 'union', - 'unique', 'unix', 'unix_g', 'unix_s', 'unix_w', 'unix_x', 'unobs', 'unsetmenu', 'unzoom', 'user', 'varargin', - 'varargout', 'Variable', 'variance', 'variancef', 'varn', 'vectorfind', 'waitbar', 'warning', 'wavread', - 'wavwrite', 'wcenter', 'wfir', 'what', 'where', 'whereami', 'whereis', 'who', 'who_user', 'whos', - 'wiener', 'wigner', 'winclose', 'window', 'winlist', 'winopen', 'winqueryreg', 'winsid', 'with_atlas', - 'with_gtk', 'with_javasci', 'with_pvm', 'with_texmacs', 'with_tk', 'writb', 'write', 'write4b', 'x_choices', - 'x_choose', 'x_dialog', 'x_matrix', 'x_mdialog', 'x_message', 'x_message_modeless', 'xarc', 'xarcs', 'xarrows', - 'xaxis', 'xbasc', 'xbasimp', 'xbasr', 'xchange', 'xclea', 'xclear', 'xclick', 'xclip', 'xdel', 'xend', - 'xfarc', 'xfarcs', 'xfpoly', 'xfpolys', 'xfrect', 'xget', 'xgetech', 'xgetfile', 'xgetmouse', 'xgraduate', - 'xgrid', 'xinfo', 'xinit', 'xlfont', 'xload', 'xls_open', 'xls_read', 'xmltohtml', 'xname', 'xnumb', 'xpause', - 'xpoly', 'xpolys', 'xrect', 'xrects', 'xrpoly', 'xs2bmp', 'xs2emf', 'xs2eps', 'xs2fig', 'xs2gif', 'xs2ppm', - 'xs2ps', 'xsave', 'xsegs', 'xselect', 'xset', 'xsetech', 'xsetm', 'xstring', 'xstringb', 'xstringl', 'xtape', - 'xtitle', 'yulewalk', 'zeropen', 'zeros', 'zgrid', 'zoom_rect', 'zpbutt', 'zpch1', 'zpch2', 'zpell' - ) - ), - 'SYMBOLS' => array( - '<', '>', '=', - '!', '@', '~', '&', '|', - '+','-', '*', '/', '%', - ',', ';', '?', ':', "'" - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => true, - 1 => true, - 2 => true, - 3 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #000000; font-weight: bold;', - 3 => 'color: #000066;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => '', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 'HARD' => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;', - 'HARD' => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006600;', - 2 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933;' - ), - 'REGEXPS' => array( - 0 => 'color: #0000ff;', - 4 => 'color: #009999;', - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => 'http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm', - 2 => 'http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm', - 3 => 'http://www.scilab.org/product/dic-mat-sci/M2SCI_doc.htm' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '->', - 2 => '::' - ), - 'REGEXPS' => array( - //Variable - 0 => '[\\$%@]+[a-zA-Z_][a-zA-Z0-9_]*', - //File Descriptor - 4 => '<[a-zA-Z_][a-zA-Z0-9_]*>', - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/sdlbasic.php b/_piecrust/libs/Geshi/geshi/sdlbasic.php deleted file mode 100644 index 9bb8058..0000000 --- a/_piecrust/libs/Geshi/geshi/sdlbasic.php +++ /dev/null @@ -1,165 +0,0 @@ - 'sdlBasic', - 'COMMENT_SINGLE' => array(1 => "'", 2 => "rem", 3 => "!", 4 => "#"), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'const', 'option', 'explicit', 'qbasic', 'include', 'argc', - 'argv', 'command', 'command$', 'run', 'shell', 'os', 'declare', - 'sub', 'function', 'return', 'while', 'wend', 'exit', 'end', - 'continue', 'if', 'then', 'else', 'elseif', - 'select', 'case', 'for', 'each', 'step', - 'next', 'to', 'dim', 'shared', 'common', 'lbound', 'bound', - 'erase', 'asc', 'chr', 'chr$', 'insert', 'insert$', 'instr', 'lcase', - 'lcase$', 'left', 'left$', 'len', 'length', 'ltrim', 'ltrim$', 'mid', - 'mid$', 'replace', 'replace$', 'replacesubstr', 'replacesubstr$', - 'reverse', 'reverse$', 'right', 'right$', 'rinstr', 'rtrim', 'rtrim$', - 'space', 'space$', 'str', 'str$', 'strf', 'strf$', 'string', 'string$', - 'tally', 'trim', 'trim$', 'typeof', 'typeof$', 'ucase', 'ucase$', 'val', - 'abs', 'acos', 'andbit', 'asin', 'atan', 'bitwiseand', 'bitwiseor', - 'bitwisexor', 'cos', 'exp', 'fix', 'floor', 'frac', 'hex', 'hex$', 'int', - 'log', 'min', 'max', 'orbit', 'randomize', 'rnd', 'round', 'sgn', 'sin', - 'sqr', 'tan', 'xorbit', 'open', 'as', 'file', 'input', 'close', 'output', - 'append', 'eof', 'fileexists', 'filecopy', 'filemove', 'filerename', - 'freefile', 'kill', 'loc', 'lof', 'readbyte', 'rename', 'seek', - 'writebyte', 'chdir', 'dir', 'dir$', 'direxists', 'dirfirst', 'dirnext', - 'mkdir', 'rmdir', 'print', 'date', 'date$', 'time', 'time$', 'ticks', - 'data', 'read', 'reservebank', 'freebank', 'copybank', 'loadbank', - 'savebank', 'setbank', 'sizebank', 'poke', 'doke', 'loke', 'peek', 'deek', - 'leek', 'memcopy', 'setdisplay', 'setcaption', 'caption', 'displaywidth', - 'displayheight', 'displaybpp', 'screen', 'directscreen', 'screenopen', - 'screenclose', 'screenclone', 'screencopy', 'screenfade', 'screenfadein', - 'screencrossfade', 'screenalpha', 'screenlock', 'screenunlock', - 'screenrect', 'xscreenrect', 'yscreenrect', 'wscreenrect', 'hscreenrect', - 'flagscreenrect', 'screenwidth', 'screenheight', 'offset', 'xoffset', - 'yoffset', 'cls', 'screenswap', 'autoback', 'setautoback', - 'dualplayfield', 'waitvbl', 'fps', 'rgb', 'enablepalette', 'color', - 'palette', 'colorcycling', 'ink', 'point', 'dot', 'plot', 'line', 'box', - 'bar', 'circle', 'fillcircle', 'ellipse', 'fillellipse', 'paint', - 'loadimage', 'saveimage', 'loadsound', 'savesound', 'loadmusic', - 'hotspot', 'setcolorkey', 'imageexists', 'imagewidth', 'imageheight', - 'deleteimage', 'copyimage', 'setalpha', 'zoomimage', 'rotateimage', - 'rotozoomimage', 'blt', 'pastebob', 'pasteicon', 'grab', 'spriteclip', - 'sprite', 'deletesprite', 'xsprite', 'ysprite', 'spritewidth', - 'spriteheight', 'frsprite', 'livesprite', 'spritehit', 'autoupdatesprite', - 'updatesprite', 'setbob', 'bob', 'deletebob', 'xbob', 'ybob', 'bobwidth', - 'bobheight', 'frbob', 'livebob', 'bobhit', 'autoupdatebob', 'updatebob', - 'text', 'setfont', 'textrender', 'pen', 'paper', 'prints', 'locate', - 'atx', 'aty', 'curson', 'cursoff', 'inputs', 'zoneinputs', - 'isenabledsound', 'soundexists', 'deletesound', 'copysound', - 'musicexists', 'playsound', 'volumesound', 'stopsound', 'pausesound', - 'resumesound', 'vumetersound', 'positionsound', 'soundchannels', - 'playmusic', 'positionmusic', 'stopmusic', 'fademusic', 'pausemusic', - 'resumemusic', 'rewindmusic', 'volumemusic', 'speedmusic', 'numdrivescd', - 'namecd', 'getfreecd', 'opencd', 'indrivecd', 'trackscd', 'curtrackcd', - 'curframecd', 'playcd', 'playtrackscd', - 'pausecd', 'resumecd', 'stopcd', 'ejectcd', 'closecd', 'tracktypecd', - 'tracklengthcd', 'trackoffsetcd', 'key', 'inkey', 'waitkey', 'xmouse', - 'ymouse', 'xmousescreen', 'ymousescreen', 'bmouse', 'changemouse', - 'locatemouse', 'mouseshow', 'mousehide', 'mousezone', 'numjoysticks', - 'namejoystick', 'numaxesjoystick', 'numballsjoystick', 'numhatsjoystick', - 'numbuttonsjoystick', 'getaxisjoystick', 'gethatjoystick', - 'getbuttonjoystick', 'xgetballjoystick', 'ygetballjoystick', 'joy', - 'bjoy', 'wait', 'timer', 'isenabledsock', 'getfreesock', 'opensock', - 'acceptsock', 'isserverready', 'connectsock', 'connectionreadysock', - 'isclientready', 'losesock', 'peeksock', 'readsock', 'readbytesock', - 'readlinesock', 'writesock', 'writebytesock', 'writelinesock', - 'getremoteip', 'getremoteport', 'getlocalip' - ) - ), - 'SYMBOLS' => array( - '(', ')' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080;', - 2 => 'color: #808080;', - 3 => 'color: #808080;', - 4 => 'color: #808080;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 0 => 'color: #66cc66;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/smalltalk.php b/_piecrust/libs/Geshi/geshi/smalltalk.php deleted file mode 100644 index f8b3016..0000000 --- a/_piecrust/libs/Geshi/geshi/smalltalk.php +++ /dev/null @@ -1,154 +0,0 @@ - 'Smalltalk', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array('"' => '"'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'"), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'self','super','true','false','nil' - ) - ), - 'SYMBOLS' => array( - '[', ']', '=' , ':=', '(', ')', '#' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #7f007f;' - ), - 'COMMENTS' => array( - 'MULTI' => 'color: #007f00; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => '' - ), - 'BRACKETS' => array( - 0 => '' - ), - 'STRINGS' => array( - 0 => 'color: #7f0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #7f0000;' - ), - 'METHODS' => array( - 0 => '' - ), - 'SYMBOLS' => array( - 0 => 'color: #000066; font-weight:bold;' - ), - 'REGEXPS' => array( - 0 => 'color: #0000ff;', - 1 => 'color: #7f0000;', - 2 => 'color: #7f0000;', - 3 => 'color: #00007f;', - 5 => 'color: #00007f;', - 6 => 'color: #00007f;' - ), - 'SCRIPT' => array( - 0 => '' - ) - ), - 'URLS' => array( - 1 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - 0 => array( - GESHI_SEARCH => '([^a-zA-Z0-9_#<])([A-Z]+[a-zA-Z0-9_]*)(?!>)', //class names - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ), - 1 => array( - GESHI_SEARCH => '(#+)([a-zA-Z0-9_]+)', //symbols - GESHI_REPLACE => '\\1\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - 2 => array( - GESHI_SEARCH => '(#\s*\([^)]*\))', //array symbols - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - 3 => array( - GESHI_SEARCH => '([a-zA-Z0-9_\s]+)', //temporary variables - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '|', - GESHI_AFTER => '|' - ), - 5 => array( - GESHI_SEARCH => '([:(,=[.*\/+-]\s*(?!\d+\/))([a-zA-Z0-9_]+)', //message parameters, message receivers - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 's', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ), - 6 => array( - GESHI_SEARCH => '([a-zA-Z0-9_]+)(\s*:=)', //assignment targets - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '\\2' - ) - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/smarty.php b/_piecrust/libs/Geshi/geshi/smarty.php deleted file mode 100644 index 1f9f021..0000000 --- a/_piecrust/libs/Geshi/geshi/smarty.php +++ /dev/null @@ -1,192 +0,0 @@ - 'Smarty', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array('{*' => '*}'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - '$smarty', 'now', 'const', 'capture', 'config', 'section', 'foreach', 'template', 'version', 'ldelim', 'rdelim', - 'foreachelse', 'include', 'include_php', 'insert', 'if', 'elseif', 'else', 'php', - 'sectionelse', 'is_cached', - ), - 2 => array( - 'capitalize', 'count_characters', 'cat', 'count_paragraphs', 'count_sentences', 'count_words', 'date_format', - 'default', 'escape', 'indent', 'lower', 'nl2br', 'regex_replace', 'replace', 'spacify', 'string_format', - 'strip', 'strip_tags', 'truncate', 'upper', 'wordwrap', - ), - 3 => array( - 'counter', 'cycle', 'debug', 'eval', 'html_checkboxes', 'html_image', 'html_options', - 'html_radios', 'html_select_date', 'html_select_time', 'html_table', 'math', 'mailto', 'popup_init', - 'popup', 'textformat' - ), - 4 => array( - '$template_dir', '$compile_dir', '$config_dir', '$plugins_dir', '$debugging', '$debug_tpl', - '$debugging_ctrl', '$autoload_filters', '$compile_check', '$force_compile', '$caching', '$cache_dir', - '$cache_lifetime', '$cache_handler_func', '$cache_modified_check', '$config_overwrite', - '$config_booleanize', '$config_read_hidden', '$config_fix_newlines', '$default_template_handler_func', - '$php_handling', '$security', '$secure_dir', '$security_settings', '$trusted_dir', '$left_delimiter', - '$right_delimiter', '$compiler_class', '$request_vars_order', '$request_use_auto_globals', - '$error_reporting', '$compile_id', '$use_sub_dirs', '$default_modifiers', '$default_resource_type' - ), - 5 => array( - 'append', 'append_by_ref', 'assign', 'assign_by_ref', 'clear_all_assign', 'clear_all_cache', - 'clear_assign', 'clear_cache', 'clear_compiled_tpl', 'clear_config', 'config_load', 'display', - 'fetch', 'get_config_vars', 'get_registered_object', 'get_template_vars', - 'load_filter', 'register_block', 'register_compiler_function', 'register_function', - 'register_modifier', 'register_object', 'register_outputfilter', 'register_postfilter', - 'register_prefilter', 'register_resource', 'trigger_error', 'template_exists', 'unregister_block', - 'unregister_compiler_function', 'unregister_function', 'unregister_modifier', 'unregister_object', - 'unregister_outputfilter', 'unregister_postfilter', 'unregister_prefilter', 'unregister_resource' - ), - 6 => array( - 'name', 'file', 'scope', 'global', 'key', 'once', 'script', - 'loop', 'start', 'step', 'max', 'show', 'values', 'value', 'from', 'item' - ), - 7 => array( - 'eq', 'neq', 'ne', 'lte', 'gte', 'ge', 'le', 'not', 'mod' - ), - 8 => array( - // some common php functions - 'isset', 'is_array', 'empty', 'count', 'sizeof' - ) - ), - 'SYMBOLS' => array( - '/', '=', '==', '!=', '>', '<', '>=', '<=', '!', '%' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false, - 7 => false, - 8 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0600FF;', //Functions - 2 => 'color: #008000;', //Modifiers - 3 => 'color: #0600FF;', //Custom Functions - 4 => 'color: #804040;', //Variables - 5 => 'color: #008000;', //Methods - 6 => 'color: #6A0A0A;', //Attributes - 7 => 'color: #D36900;', //Text-based symbols - 8 => 'color: #0600FF;' //php functions - ), - 'COMMENTS' => array( - 'MULTI' => 'color: #008080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #D36900;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #D36900;' - ), - 'SCRIPT' => array( - 0 => '', - 1 => 'color: #808080; font-style: italic;', - 2 => 'color: #009000;' - ), - 'REGEXPS' => array( - 0 => 'color: #00aaff;' - ) - ), - 'URLS' => array( - 1 => 'http://smarty.php.net/{FNAMEL}', - 2 => 'http://smarty.php.net/{FNAMEL}', - 3 => 'http://smarty.php.net/{FNAMEL}', - 4 => 'http://smarty.php.net/{FNAMEL}', - 5 => 'http://smarty.php.net/{FNAMEL}', - 6 => '', - 7 => 'http://smarty.php.net/{FNAMEL}', - 8 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - // variables - 0 => '\$[a-zA-Z][a-zA-Z0-9_]*' - ), - 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, - 'SCRIPT_DELIMITERS' => array( - 0 => array( - '{' => '}' - ), - 1 => array( - '', - ), - 2 => array( - '<' => '>' - ) - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - 1 => false, - 2 => false - ), - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "(?|^])", - 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-&])" - ) - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/sql.php b/_piecrust/libs/Geshi/geshi/sql.php deleted file mode 100644 index 4d1d519..0000000 --- a/_piecrust/libs/Geshi/geshi/sql.php +++ /dev/null @@ -1,165 +0,0 @@ - 'SQL', - 'COMMENT_SINGLE' => array(1 =>'--'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => 1, - 'QUOTEMARKS' => array("'", '"', '`'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'ADD', 'ALL', 'ALTER', 'AND', 'AS', 'ASC', 'AUTO_INCREMENT', - 'BEFORE', 'BEGIN', 'BETWEEN', 'BIGINT', 'BINARY', 'BLOB', 'BOOLEAN', 'BOTH', 'BY', - 'CALL', 'CASE', 'CAST', 'CEIL', 'CEILING', 'CHANGE', 'CHAR', 'CHAR_LENGTH', 'CHARACTER', - 'CHARACTER_LENGTH', 'CHECK', 'CLOB', 'COALESCE', 'COLLATE', 'COLUMN', 'COLUMNS', - 'CONNECT', 'CONSTRAINT', 'CONVERT', 'COUNT', 'CREATE', 'CROSS', 'CURRENT', - 'CURRENT_DATE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER', - 'DATA', 'DATABASE', 'DATABASES', 'DATE', 'DAY', 'DEC', 'DECIMAL', 'DECLARE', - 'DEFAULT', 'DELAYED', 'DELETE', 'DESC', 'DESCRIBE', 'DISTINCT', 'DOUBLE', - 'DOMAIN', 'DROP', - 'ELSE', 'ENCLOSED', 'END', 'ESCAPED', 'EXCEPT', 'EXEC', 'EXECUTE', 'EXISTS', 'EXP', - 'EXPLAIN', 'EXTRACT', - 'FALSE', 'FIELD', 'FIELDS', 'FILTER', 'FIRST', 'FLOAT', 'FLOOR', 'FLUSH', 'FOR', - 'FOREIGN', 'FROM', 'FULL', 'FUNCTION', - 'GET', 'GROUP', 'GROUPING', 'GO', 'GOTO', 'GRANT', 'GRANTED', - 'HAVING', 'HOUR', - 'IDENTIFIED', 'IDENTITY', 'IF', 'IGNORE', 'IN', 'INCREMENT', 'INDEX', 'INFILE', 'INNER', - 'INOUT', 'INPUT', 'INSERT', 'INT', 'INTEGER', 'INTERSECT', 'INTERSECTION', 'INTERVAL', - 'INTO', 'IS', - 'JOIN', - 'KEY', 'KEYS', 'KILL', - 'LANGUAGE', 'LARGE', 'LAST', 'LEADING', 'LEFT', 'LENGTH', 'LIKE', 'LIMIT', 'LINES', 'LOAD', - 'LOCAL', 'LOCK', 'LOW_PRIORITY', 'LOWER', - 'MATCH', 'MAX', 'MERGE', 'MIN', 'MINUTE', 'MOD', 'MODIFIES', 'MODIFY', 'MONTH', - 'NATIONAL', 'NATURAL', 'NCHAR', 'NEW', 'NEXT', 'NEXTVAL', 'NONE', 'NOT', - 'NULL', 'NULLABLE', 'NULLIF', 'NULLS', 'NUMBER', 'NUMERIC', - 'OF', 'OLD', 'ON', 'ONLY', 'OPEN', 'OPTIMIZE', 'OPTION', - 'OPTIONALLY', 'OR', 'ORDER', 'OUT', 'OUTER', 'OUTFILE', 'OVER', - 'POSITION', 'POWER', 'PRECISION', 'PREPARE', 'PRIMARY', 'PROCEDURAL', 'PROCEDURE', - 'READ', 'REAL', 'REF', 'REFERENCES', 'REFERENCING', 'REGEXP', 'RENAME', 'REPLACE', - 'RESULT', 'RETURN', 'RETURNS', 'REVOKE', 'RIGHT', 'RLIKE', 'ROLLBACK', 'ROW', - 'ROW_NUMBER', 'ROWS', 'RESTRICT', 'ROLE', 'ROUTINE', 'ROW_COUNT', - 'SAVEPOINT', 'SEARCH', 'SECOND', 'SECTION', 'SELECT', 'SELF', 'SEQUENCE', - 'SESSION', 'SET', 'SETVAL', 'SHOW', 'SIMILAR', 'SIZE', 'SMALLINT', 'SOME', - 'SONAME', 'SOURCE', 'SPACE', 'SQL', 'SQRT', 'START', 'STATUS', - 'STRAIGHT_JOIN', 'STRUCTURE', 'STYLE', 'SUBSTRING', 'SUM', - 'TABLE', 'TABLE_NAME', 'TABLES', 'TERMINATED', 'TEMPORARY', 'THEN', 'TIME', - 'TIMESTAMP', 'TO', 'TRAILING', 'TRANSACTION', 'TRIGGER', 'TRIM', 'TRUE', 'TRUNCATE', - 'TRUSTED', 'TYPE', - 'UNDER', 'UNION', 'UNIQUE', 'UNKNOWN', 'UNLOCK', 'UNSIGNED', - 'UPDATE', 'UPPER', 'USE', 'USER', 'USING', - 'VALUE', 'VALUES', 'VARCHAR', 'VARIABLES', 'VARYING', 'VIEW', - 'WHEN', 'WHERE', 'WITH', 'WITHIN', 'WITHOUT', 'WORK', 'WRITE', - 'XOR', - 'YEAR', - 'ZEROFILL' - ) - ), - 'SYMBOLS' => array( - '(', ')', '=', '<', '>', '|', ',', '.', '+', '-', '*', '/' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #993333; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - //2 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/systemverilog.php b/_piecrust/libs/Geshi/geshi/systemverilog.php deleted file mode 100644 index c30b976..0000000 --- a/_piecrust/libs/Geshi/geshi/systemverilog.php +++ /dev/null @@ -1,317 +0,0 @@ -. - * - ************************************************************************ - * Title: SystemVerilog Language Keywords File for GeSHi - * Description: This file contains the SV keywords defined in the - * IEEE1800-2009 Draft Standard in the format expected by - * GeSHi. - * - * Original Author: Sean O'Boyle - * Contact: seanoboyle@intelligentdv.com - * Company: Intelligent Design Verification - * Company URL: http://intelligentdv.com - * - * Download the most recent version here: - * http://intelligentdv.com/downloads - * - * File Bugs Here: http://bugs.intelligentdv.com - * Project: SyntaxFiles - * - * File: systemverilog.php - * $LastChangedBy: seanoboyle $ - * $LastChangedDate: 2009-07-22 22:20:25 -0700 (Wed, 22 Jul 2009) $ - * $LastChangedRevision: 17 $ - * - ************************************************************************/ - -$language_data = array ( - 'LANG_NAME' => 'SystemVerilog', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array(1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - // system tasks - 1 => array( - 'acos','acosh','asin','asinh','assertfailoff','assertfailon', - 'assertkill','assertnonvacuouson','assertoff','asserton', - 'assertpassoff','assertpasson','assertvacuousoff','async$and$array', - 'async$and$plane','async$nand$array','async$nand$plane', - 'async$nor$array','async$nor$plane','async$or$array', - 'async$or$plane','atan','atan2','atanh','bits','bitstoreal', - 'bitstoshortreal','cast','ceil','changed','changed_gclk', - 'changing_gclk','clog2','cos','cosh','countones','coverage_control', - 'coverage_get','coverage_get_max','coverage_merge','coverage_save', - 'dimensions','display','displayb','displayh','displayo', - 'dist_chi_square','dist_erlang','dist_exponential','dist_normal', - 'dist_poisson','dist_t','dist_uniform','dumpall','dumpfile', - 'dumpflush','dumplimit','dumpoff','dumpon','dumpports', - 'dumpportsall','dumpportsflush','dumpportslimit','dumpportsoff', - 'dumpportson','dumpvars','error','exit','exp','falling_gclk', - 'fclose','fdisplay','fdisplayb','fdisplayh','fdisplayo','fell', - 'fell_gclk','feof','ferror','fflush','fgetc','fgets','finish', - 'floor','fmonitor','fmonitorb','fmonitorh','fmonitoro','fopen', - 'fread','fscanf','fseek','fstrobe','fstrobeb','fstrobeh','fstrobeo', - 'ftell','future_gclk','fwrite','fwriteb','fwriteh','fwriteo', - 'get_coverage','high','hypot','increment','info','isunbounded', - 'isunknown','itor','left','ln','load_coverage_db','log10','low', - 'monitor','monitorb','monitorh','monitoro','monitoroff','monitoron', - 'onehot','onehot0','past','past_gclk','pow','printtimescale', - 'q_add','q_exam','q_full','q_initialize','q_remove','random', - 'readmemb','readmemh','realtime','realtobits','rewind','right', - 'rising_gclk','rose','rose_gclk','rtoi','sampled', - 'set_coverage_db_name','sformat','sformatf','shortrealtobits', - 'signed','sin','sinh','size','sqrt','sscanf','stable','stable_gclk', - 'steady_gclk','stime','stop','strobe','strobeb','strobeh','strobeo', - 'swrite','swriteb','swriteh','swriteo','sync$and$array', - 'sync$and$plane','sync$nand$array','sync$nand$plane', - 'sync$nor$array','sync$nor$plane','sync$or$array','sync$or$plane', - 'system','tan','tanh','test$plusargs','time','timeformat', - 'typename','ungetc','unpacked_dimensions','unsigned', - 'value$plusargs','warning','write','writeb','writeh','writememb', - 'writememh','writeo', - ), - // compiler directives - 2 => array( - '`__FILE__', '`__LINE__', '`begin_keywords', '`case', '`celldefine', - '`endcelldefine', '`default_nettype', '`define', '`default', '`else', - '`elsif', '`end_keywords', '`endfor', '`endif', - '`endprotect', '`endswitch', '`endwhile', '`for', '`format', - '`if', '`ifdef', '`ifndef', '`include', '`let', - '`line', '`nounconnected_drive', '`pragma', '`protect', '`resetall', - '`switch', '`timescale', '`unconnected_drive', '`undef', '`undefineall', - '`while' - ), - // keywords - 3 => array( - 'assert', 'assume', 'cover', 'expect', 'disable', - 'iff', 'binsof', 'intersect', 'first_match', 'throughout', - 'within', 'coverpoint', 'cross', 'wildcard', 'bins', - 'ignore_bins', 'illegal_bins', 'genvar', 'if', 'else', - 'unique', 'priority', 'matches', 'default', 'forever', - 'repeat', 'while', 'for', 'do', 'foreach', - 'break', 'continue', 'return', 'pulsestyle_onevent', 'pulsestyle_ondetect', - 'noshowcancelled', 'showcancelled', 'ifnone', 'posedge', 'negedge', - 'edge', 'wait', 'wait_order', 'timeunit', 'timeprecision', - 's', 'ms', 'us', 'ns', - 'ps', 'fs', 'step', 'new', 'extends', - 'this', 'super', 'protected', 'local', 'rand', - 'randc', 'bind', 'constraint', 'solve', 'before', - 'dist', 'inside', 'with', 'virtual', 'extern', - 'pure', 'forkjoin', 'design', 'instance', 'cell', - 'liblist', 'use', 'library', 'incdir', 'include', - 'modport', 'sync_accept_on', 'reject_on', 'accept_on', - 'sync_reject_on', 'restrict', 'let', 'until', 'until_with', - 'unique0', 'eventually', 's_until', 's_always', 's_eventually', - 's_nexttime', 's_until_with', 'global', 'untyped', 'implies', - 'weak', 'strong', 'nexttime' - ), - // block keywords - 4 => array( - 'begin', 'end', 'package', 'endpackage', 'macromodule', - 'module', 'endmodule', 'generate', 'endgenerate', 'program', - 'endprogram', 'class', 'endclass', 'function', 'endfunction', - 'case', 'casex', 'casez', 'randcase', 'endcase', - 'interface', 'endinterface', 'clocking', 'endclocking', 'task', - 'endtask', 'primitive', 'endprimitive', 'fork', 'join', - 'join_any', 'join_none', 'covergroup', 'endgroup', 'checker', - 'endchecker', 'property', 'endproperty', 'randsequence', 'sequence', - 'endsequence', 'specify', 'endspecify', 'config', 'endconfig', - 'table', 'endtable', 'initial', 'final', 'always', - 'always_comb', 'always_ff', 'always_latch', 'alias', 'assign', - 'force', 'release' - ), - - // types - 5 => array( - 'parameter', 'localparam', 'specparam', 'input', 'output', - 'inout', 'ref', 'byte', 'shortint', 'int', - 'integer', 'longint', 'time', 'bit', 'logic', - 'reg', 'supply0', 'supply1', 'tri', 'triand', - 'trior', 'trireg', 'tri0', 'tri1', 'wire', - 'uwire', 'wand', 'wor', 'signed', 'unsigned', - 'shortreal', 'real', 'realtime', 'type', 'void', - 'struct', 'union', 'tagged', 'const', 'var', - 'automatic', 'static', 'packed', 'vectored', 'scalared', - 'typedef', 'enum', 'string', 'chandle', 'event', - 'null', 'pullup', 'pulldown', 'cmos', 'rcmos', - 'nmos', 'pmos', 'rnmos', 'rpmos', 'and', - 'nand', 'or', 'nor', 'xor', 'xnor', - 'not', 'buf', 'tran', 'rtran', 'tranif0', - 'tranif1', 'rtranif0', 'rtranif1', 'bufif0', 'bufif1', - 'notif0', 'notif1', 'strong0', 'strong1', 'pull0', - 'pull1', 'weak0', 'weak1', 'highz0', 'highz1', - 'small', 'medium', 'large' - ), - - // DPI - 6 => array( - 'DPI', 'DPI-C', 'import', 'export', 'context' - ), - - // stdlib - 7 => array( - 'randomize', 'mailbox', 'semaphore', 'put', 'get', - 'try_put', 'try_get', 'peek', 'try_peek', 'process', - 'state', 'self', 'status', 'kill', 'await', - 'suspend', 'resume', 'size', 'delete', 'insert', - 'num', 'first', 'last', 'next', 'prev', - 'pop_front', 'pop_back', 'push_front', 'push_back', 'find', - 'find_index', 'find_first', 'find_last', 'find_last_index', 'min', - 'max', 'unique_index', 'reverse', 'sort', 'rsort', - 'shuffle', 'sum', 'product', 'List', 'List_Iterator', - 'neq', 'eq', 'data', 'empty', 'front', - 'back', 'start', 'finish', 'insert_range', 'erase', - 'erase_range', 'set', 'swap', 'clear', 'purge' - ), - - // key_deprecated - 8 => array( - 'defparam', 'deassign', 'TODO' - ), - - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', - '^', '&', '|', '~', - '?', ':', - '#', '<<', '<<<', - '>', '<', '>=', '<=', - '@', ';', ',' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true, - 8 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #996666; font-weight: bold;', - 2 => 'color: #336600; font-weight: bold;', - 3 => 'color: #996600; font-weight: bold;', - 4 => 'color: #000033; font-weight: bold;', - 5 => 'color: #330033; font-weight: bold;', - 6 => 'color: #996600; font-weight: bold;', - 7 => 'color: #CC9900; font-weight: bold;', - 8 => 'color: #990000; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #00008B; font-style: italic;', - 'MULTI' => 'color: #00008B; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #9F79EE' - ), - 'BRACKETS' => array( - 0 => 'color: #9F79EE;' - ), - 'STRINGS' => array( - 0 => 'color: #FF00FF;' - ), - 'NUMBERS' => array( - 0 => 'color: #ff0055;' - ), - 'METHODS' => array( - 1 => 'color: #202020;', - 2 => 'color: #202020;' - ), - 'SYMBOLS' => array( - 0 => 'color: #5D478B;' - ), - 'REGEXPS' => array( - 0 => 'color: #ff0055;', - 1 => 'color: #ff0055;', - 2 => 'color: #ff0055;', - 3 => 'color: #ff0055;' - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - 3 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '', - 8 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - 1 => '' - ), - 'REGEXPS' => array( - // integer - 0 => "\d'[bdh][0-9_a-fA-FxXzZ]+", - // realtime - 1 => "\d*\.\d+[munpf]?s", - // time s, ms, us, ns, ps, of fs - 2 => "\d+[munpf]?s", - // real - 3 => "\d*\.\d+" - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - 0 => '' - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true - ), - 'TAB_WIDTH' => 3, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 1 => array( - 'DISALLOWED_BEFORE' => '(?<=$)' - ) - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/tcl.php b/_piecrust/libs/Geshi/geshi/tcl.php deleted file mode 100644 index 64da1fe..0000000 --- a/_piecrust/libs/Geshi/geshi/tcl.php +++ /dev/null @@ -1,194 +0,0 @@ - 'TCL', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array( - 1 => '/(? '/{[^}\n]+}/' - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"', "'"), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - /* - * Set 1: reserved words - * http://python.org/doc/current/ref/keywords.html - */ - 1 => array( - 'proc', 'global', 'upvar', 'if', 'then', 'else', 'elseif', 'for', 'foreach', - 'break', 'continue', 'while', 'set', 'eval', 'case', 'in', 'switch', - 'default', 'exit', 'error', 'return', 'uplevel', 'loop', - 'for_array_keys', 'for_recursive_glob', 'for_file', 'unwind_protect', - 'expr', 'catch', 'namespace', 'rename', 'variable', - // itcl - 'method', 'itcl_class', 'public', 'protected'), - - /* - * Set 2: builtins - * http://asps.activatestate.com/ASPN/docs/ActiveTcl/8.4/tcl/tcl_2_contents.htm - */ - 2 => array( - // string handling - 'append', 'binary', 'format', 're_syntax', 'regexp', 'regsub', - 'scan', 'string', 'subst', - // list handling - 'concat', 'join', 'lappend', 'lindex', 'list', 'llength', 'lrange', - 'lreplace', 'lsearch', 'lset', 'lsort', 'split', - // procedures and output - 'incr', 'close', 'eof', 'fblocked', 'fconfigure', 'fcopy', 'file', - 'fileevent', 'flush', 'gets', 'open', 'puts', 'read', 'seek', - 'socket', 'tell', - // packages and source files - 'load', 'loadTk', 'package', 'pgk::create', 'pgk_mkIndex', 'source', - // interpreter routines - 'bgerror', 'history', 'info', 'interp', 'memory', 'unknown', - // library routines - 'enconding', 'http', 'msgcat', - // system related - 'cd', 'clock', 'exec', 'glob', 'pid', 'pwd', 'time', - // platform specified - 'dde', 'registry', 'resource', - // special variables - '$argc', '$argv', '$errorCode', '$errorInfo', '$argv0', - '$auto_index', '$auto_oldpath', '$auto_path', '$env', - '$tcl_interactive', '$tcl_libpath', '$tcl_library', - '$tcl_pkgPath', '$tcl_platform', '$tcl_precision', '$tcl_traceExec', - ), - - /* - * Set 3: standard library - */ - 3 => array( - 'comment', 'filename', 'library', 'packagens', 'tcltest', 'tclvars', - ), - - /* - * Set 4: special methods - */ -// 4 => array( -// ) - - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '$', '*', '&', '%', '!', ';', '<', '>', '?' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, -// 4 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #ff7700;font-weight:bold;', // Reserved - 2 => 'color: #008000;', // Built-ins + self - 3 => 'color: #dc143c;', // Standard lib -// 4 => 'color: #0000cd;' // Special methods - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', -// 2 => 'color: #483d8b;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: black;' - ), - 'STRINGS' => array( - 0 => 'color: #483d8b;' - ), - 'NUMBERS' => array( - 0 => 'color: #ff4500;' - ), - 'METHODS' => array( - 1 => 'color: black;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - 0 => 'color: #ff3333;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', -// 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '::' - ), - 'REGEXPS' => array( - //Special variables - 0 => '[\\$]+[a-zA-Z_][a-zA-Z0-9_]*', - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'COMMENTS' => array( - 'DISALLOWED_BEFORE' => '\\' - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/teraterm.php b/_piecrust/libs/Geshi/geshi/teraterm.php deleted file mode 100644 index 5b29c1e..0000000 --- a/_piecrust/libs/Geshi/geshi/teraterm.php +++ /dev/null @@ -1,317 +0,0 @@ - 'Tera Term Macro', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - /* Commands */ - 1 => array( - 'Beep', - 'BplusRecv', - 'BplusSend', - 'Break', // (version 4.53 or later) - 'Call', - 'CallMenu', // (version 4.56 or later) - 'ChangeDir', - 'ClearScreen', - 'Clipb2Var', //(version 4.46 or later) - 'ClosesBox', - 'CloseTT', - 'Code2Str', - 'Connect', - 'CRC32', // (version 4.60 or later) - 'CRC32File', // (version 4.60 or later) - 'CygConnect', // (version 4.57 or later) - 'DelPassword', - 'Disconnect', - 'Do', // (version 4.56 or later) - 'Else', - 'EnableKeyb', - 'End', - 'EndIf', - 'EndUntil', // (version 4.56 or later) - 'EndWhile', - 'Exec', - 'ExecCmnd', - 'Exit', - 'FileClose', - 'FileConcat', - 'FileCopy', - 'FileCreate', - 'FileDelete', - 'FileMarkPtr', - 'FilenameBox', //(version 4.54 or later) - 'FileOpen', - 'FileRead', - 'FileReadln', // (version 4.48 or later) - 'FileRename', - 'FileSearch', - 'FileSeek', - 'FileSeekBack', - 'FileStrSeek', - 'FileStrSeek2', - 'FileWrite', - 'FileWriteln', - 'FindOperations', - 'FlushRecv', - 'ForNext', - 'GetDate', - 'GetDir', //(version 4.46 or later) - 'GetEnv', - 'GetPassword', - 'GetTime', - 'GetTitle', - 'GetVer', //(version 4.58 or later) - 'GoTo', - 'If', - 'IfDefined', // (version 4.46 or later) - 'IfThenElseIf', - 'Include', - 'InputBox', - 'Int2Str', - 'KmtFinish', - 'KmtGet', - 'KmtRecv', - 'KmtSend', - 'LoadKeyMap', - 'LogClose', - 'LogOpen', - 'LogPause', - 'LogStart', - 'LogWrite', - 'Loop', // (version 4.56 or later) - 'MakePath', - 'MessageBox', - 'MPause', // (version 4.27 or later) - 'PasswordBox', - 'Pause', - 'QuickvanRecv', - 'QuickvanSend', - 'Random', //(version 4.27 or later) - 'Recvln', - 'RestoreSetup', - 'Return', - 'RotateLeft', //(version 4.54 or later) - 'RotateRight', //(version 4.54 or later) - 'ScpRecv', // (version 4.57 or later) - 'ScpSend', // (version 4.57 or later) - 'Send', - 'SendBreak', - 'SendFile', - 'SendKcode', - 'Sendln', - 'SetBaud', // (version 4.58 or later) - 'SetDate', - 'SetDir', - 'SetDlgPos', - 'SetDTR', // (version 4.59 or later) - 'SetRTS', // (version 4.59 or later) - 'SetEnv', // (version 4.54 or later) - 'SetEcho', - 'SetExitCode', - 'SetSync', - 'SetTime', - 'SetTitle', - 'Show', - 'ShowTT', - 'Sprintf', // (version 4.52 or later) - 'StatusBox', - 'Str2Code', - 'Str2Int', - 'StrCompare', - 'StrConcat', - 'StrCopy', - 'StrLen', - 'StrMatch', // (version 4.59 or later) - 'StrScan', - 'Testlink', - 'Then', - 'ToLower', //(version 4.53 or later) - 'ToUpper', //(version 4.53 or later) - 'Unlink', - 'Until', // (version 4.56 or later) - 'Var2Clipb', //(version 4.46 or later) - 'Wait', - 'WaitEvent', - 'Waitln', - 'WaitRecv', - 'WaitRegex', // (version 4.21 or later) - 'While', - 'XmodemRecv', - 'XmodemSend', - 'YesNoBox', - 'ZmodemRecv', - 'ZmodemSend' - ), - /* System Variables */ - 2 => array( - 'groupmatchstr1', - 'groupmatchstr2', - 'groupmatchstr3', - 'groupmatchstr4', - 'groupmatchstr5', - 'groupmatchstr6', - 'groupmatchstr7', - 'groupmatchstr8', - 'groupmatchstr9', - 'inputstr', - 'matchstr', - 'param2', - 'param3', - 'param4', - 'param5', - 'param6', - 'param7', - 'param8', - 'param9', - 'result', - 'timeout' - ), - /* LogMeTT Key Words */ - 3 => array( - '$[1]', - '$[2]', - '$[3]', - '$[4]', - '$[5]', - '$[6]', - '$[7]', - '$[8]', - '$connection$', - '$email$', - '$logdir$', - '$logfilename$', - '$logit$', - '$mobile$', - '$name$', - '$pager$', - '$parent$', - '$phone$', - '$snippet$', - '$ttdir$', - '$user$', - '$windir$', - ), - /* Keyword Symbols */ - 4 => array( - 'and', - 'not', - 'or', - 'xor' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', - '~', '!', '+', '-', '*', '/', '%', '>>', '<<', '<<<', '>>>', '&', '^', '|', - '<>', '<=', '>=', '=', '==', '<>', '!=', '&&', '||' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000080; font-weight: bold!important;', - 2 => 'color: #808000; font-weight: bold;', // System Variables - 3 => 'color: #ff0000; font-weight: bold;', // LogMeTT Key Words - 4 => 'color: #ff00ff; font-weight: bold;' // Keyword Symbols - ), - 'COMMENTS' => array( - 1 => 'color: #008000; font-style: italic;', - ), - 'ESCAPE_CHAR' => array(), - 'BRACKETS' => array( - 0 => 'color: #ff00ff; font-weight: bold;' - ), - 'STRINGS' => array( - 0 => 'color: #800080;' - ), - 'NUMBERS' => array( - 0 => 'color: #008080;' - ), - 'SCRIPT' => array( - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #ff00ff; font-weight: bold;' - ), - 'REGEXPS' => array( - 0 => 'color: #0000ff; font-weight: bold;' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array( - 0 => array ( - GESHI_SEARCH => '(\:[_a-zA-Z][_a-zA-Z0-9]+)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ) - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'TAB_WIDTH' => 4 -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/text.php b/_piecrust/libs/Geshi/geshi/text.php deleted file mode 100644 index 259af41..0000000 --- a/_piecrust/libs/Geshi/geshi/text.php +++ /dev/null @@ -1,84 +0,0 @@ - 'Text', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array(), - 'SYMBOLS' => array(), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false - ), - 'STYLES' => array( - 'KEYWORDS' => array(), - 'COMMENTS' => array(), - 'ESCAPE_CHAR' => array(), - 'BRACKETS' => array(), - 'STRINGS' => array(), - 'NUMBERS' => array(), - 'METHODS' => array(), - 'SYMBOLS' => array(), - 'SCRIPT' => array(), - 'REGEXPS' => array() - ), - 'URLS' => array(), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'ALL' => GESHI_NEVER - ), - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/thinbasic.php b/_piecrust/libs/Geshi/geshi/thinbasic.php deleted file mode 100644 index b41471b..0000000 --- a/_piecrust/libs/Geshi/geshi/thinbasic.php +++ /dev/null @@ -1,868 +0,0 @@ - 'thinBasic', - 'COMMENT_SINGLE' => array(1 => "'"), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'XOR','XML_TREETOSTRING','XML_PARSEFILE','XML_PARSE','XML_PARENT','XML_NODETYPE','XML_NODETOSTRING','XML_NEXTSIBLING', - 'XML_LASTERROR','XML_GETTAG','XML_FREE','XML_FINDNODE','XML_DECODEPARAM','XML_CHILDDATA','XML_CHILD','XML_ATTRIBVALUE', - 'XML_ATTRIBNAME','XML_ATTRIBCOUNT','WORD','WITH','WIN_SHOW','WIN_SETTITLE','WIN_SETFOREGROUND','WIN_ISZOOMED', - 'WIN_ISVISIBLE','WIN_ISICONIC','WIN_GETTITLE','WIN_GETFOREGROUND','WIN_GETCLASS','WIN_GETACTIVE','WIN_FLASH','WIN_FINDBYTITLE', - 'WIN_FINDBYCLASS','WHILE','WEND','VERIFY','VARPTR','VARIANTVT$','VARIANTVT','VARIANT', - 'VARIABLE_GETINFO','VARIABLE_EXISTS','VARIABLE_EXIST','VALUE','VAL','USING$','USING','USES', - 'USER','UNTIL','UNITS','UNION','UNICODE2ASCII','UDP_SEND','UDP_RECV','UDP_OPENSERVER', - 'UDP_OPEN','UDP_FREEFILE','UDP_CLOSE','UCODE$','UCASE$','UBOUND','TYPE','TRIMFULL$', - 'TRIM$','TOOLTIP','TOKENIZER_MOVETOEOL','TOKENIZER_KEYSETUSERSTRING','TOKENIZER_KEYSETUSERNUMBER','TOKENIZER_KEYGETUSERSTRING','TOKENIZER_KEYGETUSERNUMBER','TOKENIZER_KEYGETSUBTYPE', - 'TOKENIZER_KEYGETNAME','TOKENIZER_KEYGETMAINTYPE','TOKENIZER_KEYFIND','TOKENIZER_KEYADD','TOKENIZER_GETNEXTTOKEN','TOKENIZER_DEFAULT_SET','TOKENIZER_DEFAULT_GET','TOKENIZER_DEFAULT_CODE', - 'TOKENIZER_DEFAULT_CHAR','TO','TIMER','TIME$','THEN','TEXTBOX','TEXT','TCP_SEND', - 'TCP_RECV','TCP_PRINT','TCP_OPEN','TCP_LINEINPUT','TCP_FREEFILE','TCP_CLOSE','TB_IMGCTX_SETIMAGEADJUSTMENT','TB_IMGCTX_LOADIMAGE', - 'TB_IMGCTX_GETIMAGEADJUSTMENT','TBGL_VIEWPORT','TBGL_VERTEX','TBGL_USETEXTUREFLAG','TBGL_USETEXTURE','TBGL_USELINESTIPPLEFLAG','TBGL_USELINESTIPPLE','TBGL_USELIGHTSOURCEFLAG', - 'TBGL_USELIGHTSOURCE','TBGL_USELIGHTINGFLAG','TBGL_USELIGHTING','TBGL_USEFOGFLAG','TBGL_USEFOG','TBGL_USEDEPTHMASK','TBGL_USEDEPTHFLAG','TBGL_USEDEPTH', - 'TBGL_USECLIPPLANEFLAG','TBGL_USECLIPPLANE','TBGL_USEBLENDFLAG','TBGL_USEBLEND','TBGL_USEALPHATEST','TBGL_TRANSLATE','TBGL_TORUS','TBGL_TEXCOORD2D', - 'TBGL_SPHERE','TBGL_SHOWWINDOW','TBGL_SHOWCURSOR','TBGL_SETWINDOWTITLE','TBGL_SETUPLIGHTSOURCE','TBGL_SETUPFOG','TBGL_SETUPCLIPPLANE','TBGL_SETPRIMITIVEQUALITY', - 'TBGL_SETLIGHTPARAMETER','TBGL_SETDRAWDISTANCE','TBGL_SCALE','TBGL_SAVESCREENSHOT','TBGL_ROTATEXYZ','TBGL_ROTATE','TBGL_RESETMATRIX','TBGL_RENDERTOTEXTURE', - 'TBGL_RENDERMATRIX3D','TBGL_RENDERMATRIX2D','TBGL_PUSHMATRIX','TBGL_PRINTFONT','TBGL_PRINTBMP','TBGL_PRINT','TBGL_POS3DTOPOS2D','TBGL_POPMATRIX', - 'TBGL_POLYGONLOOK','TBGL_POINTSIZE','TBGL_POINTINSIDE3D','TBGL_NORMAL','TBGL_NEWLIST','TBGL_MOUSEGETWHEELDELTA','TBGL_MOUSEGETRBUTTON','TBGL_MOUSEGETPOSY', - 'TBGL_MOUSEGETPOSX','TBGL_MOUSEGETMBUTTON','TBGL_MOUSEGETLBUTTON','TBGL_M15SETVERTEXZ','TBGL_M15SETVERTEXY','TBGL_M15SETVERTEXXYZ','TBGL_M15SETVERTEXX','TBGL_M15SETVERTEXTEXY', - 'TBGL_M15SETVERTEXTEXXY','TBGL_M15SETVERTEXTEXX','TBGL_M15SETVERTEXTEXN','TBGL_M15SETVERTEXRGB','TBGL_M15SETVERTEXR','TBGL_M15SETVERTEXPSTOP','TBGL_M15SETVERTEXPARAM','TBGL_M15SETVERTEXLAYER', - 'TBGL_M15SETVERTEXG','TBGL_M15SETVERTEXB','TBGL_M15SETMODELVERTEXCOUNT','TBGL_M15SETBONECHILD','TBGL_M15ROTBONEZ','TBGL_M15ROTBONEY','TBGL_M15ROTBONEX','TBGL_M15ROTBONE', - 'TBGL_M15RESETBONES','TBGL_M15RECALCNORMALS','TBGL_M15LOADMODEL','TBGL_M15INITMODELBUFFERS','TBGL_M15GETVERTEXZ','TBGL_M15GETVERTEXY','TBGL_M15GETVERTEXXYZ','TBGL_M15GETVERTEXX', - 'TBGL_M15GETVERTEXTEXY','TBGL_M15GETVERTEXTEXXY','TBGL_M15GETVERTEXTEXX','TBGL_M15GETVERTEXTEXN','TBGL_M15GETVERTEXRGB','TBGL_M15GETVERTEXR','TBGL_M15GETVERTEXPSTOP','TBGL_M15GETVERTEXPARAM', - 'TBGL_M15GETVERTEXLAYER','TBGL_M15GETVERTEXG','TBGL_M15GETVERTEXB','TBGL_M15GETMODELVERTEXCOUNT','TBGL_M15GETMODELPOLYCOUNT','TBGL_M15ERASECHILDBONES','TBGL_M15DRAWMODEL','TBGL_M15DEFBONERESET', - 'TBGL_M15DEFBONELAYER','TBGL_M15DEFBONEBOX','TBGL_M15DEFBONEANCHOR','TBGL_M15DEFBONEADDVERTEX','TBGL_M15CLEARMODEL','TBGL_M15APPLYBONES','TBGL_M15ADDBONETREEITEM','TBGL_LOADTEXTURE', - 'TBGL_LOADFONT','TBGL_LOADBMPFONT','TBGL_LINEWIDTH','TBGL_LINESTIPPLE','TBGL_KILLFONT','TBGL_ISWINDOW','TBGL_ISPOINTVISIBLE','TBGL_ISPOINTBEHINDVIEW', - 'TBGL_GETWINDOWMULTIKEYSTATE','TBGL_GETWINDOWKEYSTATE','TBGL_GETWINDOWKEYONCE','TBGL_GETWINDOWCLIENT','TBGL_GETTEXTURENAME','TBGL_GETTEXTURELIST','TBGL_GETPIXELINFO','TBGL_GETMULTIASYNCKEYSTATE', - 'TBGL_GETLASTGLERROR','TBGL_GETFRAMERATE','TBGL_GETDESKTOPINFO','TBGL_GETASYNCKEYSTATE','TBGL_ERRORMESSAGES','TBGL_ENDPOLY','TBGL_ENDLIST','TBGL_DRAWFRAME', - 'TBGL_DESTROYWINDOW','TBGL_DELETELIST','TBGL_CYLINDER','TBGL_CREATEWINDOWEX','TBGL_CREATEWINDOW','TBGL_COLORALPHA','TBGL_COLOR','TBGL_CLEARFRAME', - 'TBGL_CAMERA','TBGL_CALLLIST','TBGL_BUILDFONT','TBGL_BOX','TBGL_BLENDFUNC','TBGL_BINDTEXTURE','TBGL_BEGINPOLY','TBGL_BACKCOLOR', - 'TBGL_ALPHAFUNC','TBDI_JOYZ','TBDI_JOYY','TBDI_JOYX','TBDI_JOYSTOPEFFECT','TBDI_JOYSLIDER','TBDI_JOYSETRANGEZ','TBDI_JOYSETRANGEY', - 'TBDI_JOYSETRANGEXYZ','TBDI_JOYSETRANGEX','TBDI_JOYSETDEADZONEZ','TBDI_JOYSETDEADZONEY','TBDI_JOYSETDEADZONEXYZ','TBDI_JOYSETDEADZONEX','TBDI_JOYSETAUTOCENTER','TBDI_JOYRZ', - 'TBDI_JOYRY','TBDI_JOYRX','TBDI_JOYPOV','TBDI_JOYPLAYEFFECT','TBDI_JOYLOADEFFECT','TBDI_JOYHASFF','TBDI_JOYHASEFFECT','TBDI_JOYGETEFFECTNAME', - 'TBDI_JOYGETEFFECTGUID','TBDI_JOYCREATEEFFECT','TBDI_JOYCOUNTPOV','TBDI_JOYCOUNTEFFECTS','TBDI_JOYCOUNTBTN','TBDI_JOYCOUNTAXES','TBDI_JOYBUTTON','TBDI_JOYAVAIL', - 'TBDI_INIT','TBASS_STREAMFREE','TBASS_STREAMCREATEFILE','TBASS_SETVOLUME','TBASS_SETEAXPRESET','TBASS_SETEAXPARAMETERS','TBASS_SETCONFIG','TBASS_SET3DPOSITION', - 'TBASS_SET3DFACTORS','TBASS_SAMPLELOAD','TBASS_SAMPLEGETCHANNEL','TBASS_MUSICLOAD','TBASS_MUSICFREE','TBASS_INIT','TBASS_GETVOLUME','TBASS_GETVERSION', - 'TBASS_GETCONFIG','TBASS_FREE','TBASS_ERRORGETCODE','TBASS_CHANNELSTOP','TBASS_CHANNELSETPOSITION','TBASS_CHANNELSETATTRIBUTES','TBASS_CHANNELSET3DPOSITION','TBASS_CHANNELPLAY', - 'TBASS_CHANNELPAUSE','TBASS_CHANNELISACTIVE','TBASS_CHANNELGETPOSITION','TBASS_CHANNELGETLENGTH','TBASS_CHANNELGETATTRIBUTES','TBASS_APPLY3D','TANH','TANGENT', - 'TAN','TALLY','TABCTRL_ONNOTIFY','TABCTRL_INSERTITEM','TABCTRL_GETCURSEL','SWAP','SUB','STRZIP$', - 'STRUNZIP$','STRREVERSE$','STRPTRLEN','STRPTR','STRINSERT$','STRING$','STRING','STRDELETE$', - 'STR$','STOP','STEP','STDOUT','STDIN','STAT_SUM','STAT_STDERROR','STAT_STDDEVIATION', - 'STAT_RANDOM','STAT_PRODUCT','STAT_MIN','STAT_MEDIAN','STAT_MEANHARMONIC','STAT_MEANGEOMETRIC','STAT_MEANARITHMETIC','STAT_MAX', - 'STAT_INVERSESUM','STAT_HISTOGRAM','STAT_FILLARRAY','STAT_COUNT','STAT_COPYARRAY','STAT_CLONEARRAY','STAT_CHISQUARE','STATIC', - 'STATE','SQR','SPLIT','SORT','SMTP_STATISTICS','SMTP_SETOPTION','SMTP_SETLOGFILE','SMTP_SENDHTML', - 'SMTP_SENDEMAIL','SMTP_GETERROR','SMTP_FINISHED','SMTP_DEBUG','SMTP_CONNECT','SMTP_CLOSE','SLEEP','SIZEOF', - 'SIZE','SINH','SINGLE','SIN','SIGNED','SHOW','SHIFT','SHAPETOBMP', - 'SGN','SETAT','SET','SENDMESSAGE','SENDKEYSBULK','SENDKEYS','SEND','SELECTEXPRESSION', - 'SELECT','SECH','SEC','SCAN','SAPI_SPEAK','SAPI_SETVOLUME','SAPI_SETRATE','SAPI_MODULELOADED', - 'SAPI_GETVOLUME','SAPI_GETRATE','RTRIM$','RTF_SETTEXT','RTF_SETFONTSIZE','RTF_SETFONTNAME','RTF_SETFGCOLOR','RTF_SETEFFECT', - 'RTF_SETBGCOLOR','RTF_SETALIGN','RTF_SAVETOFILE','RTF_LOADFROMFILE','RTF_GETTEXT','RTF_GETFONTSIZE','RTF_GETFONTNAME','RTF_GETEFFECT', - 'RTF_GETCLASS','RTF_APPENDTEXT','RSET$','ROUND','RNDF','RND','RIGHT$','RIGHT', - 'RGB','RESOURCE','RESIZE','RESET','REPLACE$','REPEAT$','REMOVE$','REM', - 'REGISTRY_SETVALUE','REGISTRY_SETTXTNUM','REGISTRY_SETTXTBOOL','REGISTRY_SETDWORD','REGISTRY_GETVALUE','REGISTRY_GETTXTNUM','REGISTRY_GETTXTBOOL','REGISTRY_GETDWORD', - 'REGISTRY_GETALLKEYS','REGISTRY_DELVALUE','REGISTRY_DELKEY','REFERENCE','REF','REDRAW','REDIM','RAS_SETPARAMS', - 'RAS_OPENDIALUPDIALOG','RAS_LOADENTRIES','RAS_HANGUPALL','RAS_HANGUP','RAS_GETENTRY','RAS_BEGINDIAL','RANDOMIZE','RADTODEG', - 'QUERYPERFORMANCEFREQUENCY','QUERYPERFORMANCECOUNTER','QUAD','PTR','PRESERVE','POST','POPUP','POKE$', - 'POKE','PIXELS','PI','PERMUTATIONS','PEEKMESSAGE','PEEK$','PEEK','PC_SYSTEMUPFROM', - 'PC_SUSPENDSTATE','PC_SHUTDOWN','PC_SHOWCARET','PC_SETCARETBLINKTIME','PC_RESTARTDIALOG','PC_PREVENTSHUTDOWN','PC_LOCK','PC_INSERTCD', - 'PC_HIDECARET','PC_GETSTATEONOFF','PC_GETSCROLLLOCKKEYSTATE','PC_GETNUMLOCKKEYSTATE','PC_GETCARETBLINKTIME','PC_GETCAPSLOCKKEYSTATE','PC_EMPTYBIN','PC_EJECTCD', - 'PC_DECODECDERROR','PCT','PARSESET$','PARSECOUNT','PARSE$','PARSE','PARAMETERS','OUTSIDE', - 'OS_WINVERSIONTEXT','OS_WINGETVERSIONTIMELINE','OS_SHELLEXECUTE','OS_SHELLABOUT','OS_SHELL','OS_SETLASTCALLDLLERROR','OS_SERVICESTOP','OS_SERVICESTATUSDESCRIPTION', - 'OS_SERVICESTARTTYPEDESCRIPTION','OS_SERVICESTART','OS_SERVICESETSTARTTYPE','OS_SERVICEQUERY','OS_SERVICEGETSTARTTYPE','OS_SERVICEGETLIST','OS_PROCESSKILLBYNAME','OS_PROCESSKILLBYID', - 'OS_PROCESSISRUNNING','OS_PROCESSGETLIST','OS_PROCESSGETID','OS_PROCESSARERUNNING','OS_MESSAGEBEEP','OS_ISWOW64','OS_ISFEATUREPRESENT','OS_IEVERSION', - 'OS_GETWINDOWSDIR','OS_GETUSERNAME','OS_GETTEMPDIR','OS_GETSYSTEMDIR','OS_GETSPECIALFOLDER','OS_GETLASTCALLDLLSTATUS','OS_GETLASTCALLDLLERROR','OS_GETCURRENTTHREADID', - 'OS_GETCURRENTPROCESSID','OS_GETCOMPUTERNAME','OS_GETCOMMANDS','OS_GETCOMMAND','OS_FLASHWINDOW','OS_FATALAPPEXIT','OS_ENVIRON','OS_CALLDLL', - 'OR','OPTIONAL','OPTION','OPT','ONCE','ON','OFF','NUMBER', - 'NOT','NEXT','NEW','MSGBOX','MOUSEPTR','MODULE','MODELESS','MODAL', - 'MOD','MKWRD$','MKS$','MKQ$','MKL$','MKI$','MKE$','MKDWD$', - 'MKD$','MKCUX$','MKCUR$','MKBYT$','MIN$','MIN','MID$','MENU', - 'MDI_CREATE','MCASE$','MAX$','MAX','MAKWRD','MAKLNG','MAKINT','MAKDWR', - 'LTRIM$','LSET$','LOWRD','LOOP','LONG','LOINT','LOG_WRITE','LOGB', - 'LOG2','LOG10','LOG','LOCAL','LOC','LL_UPDATEBYNAME','LL_UPDATE','LL_TOSTRING', - 'LL_TOFILE','LL_NAME','LL_GETITEM','LL_GETBYNUMBER','LL_FROMFILE','LL_FREE','LL_FINDLAST','LL_FINDBYNAME', - 'LL_FINDBYDATA','LL_DELETELIKE','LL_DELETEBYNAME','LL_DELETE','LL_DATABYNAME','LL_DATA','LL_COUNT','LL_ADD', - 'LISTBOX','LINE','LIBRARY_EXISTS','LIB','LEN','LEFT$','LEFT','LCASE$', - 'LBOUND','LABEL','KILL','JOIN$','ITERATE','ISWINDOW','ISUNICODE','ISTRUE', - 'ISODD','ISLIKE','ISFALSE','ISEVEN','IP_TOSTRING','IP_ADDR','INTERNALINFO','INTEGER', - 'INT','INSTR','INSIDE','INPUTBOX$','INI_SETKEY','INI_GETSECTIONSLIST','INI_GETSECTIONKEYLIST','INI_GETKEY', - 'INET_URLDOWNLOAD','INET_PING','INET_OPENDIALUPDIALOG','INET_GETSTATE','INET_GETREMOTEMACADDRESS','INET_GETIP','INET_GETCONNECTIONMODE','INCR', - 'IN','IMAGE','IIF$','IIF','IF','ICRYPTO_TESTSHA1','ICRYPTO_TESTMD5','ICRYPTO_TESTCRC32', - 'ICRYPTO_TESTCRC16','ICRYPTO_STRING2ASCII','ICRYPTO_SHA1','ICRYPTO_MD5','ICRYPTO_ENCRYPTRIJNDAEL','ICRYPTO_ENCRYPTRC4','ICRYPTO_DECRYPTRIJNDAEL','ICRYPTO_DECRYPTRC4', - 'ICRYPTO_CRC32','ICRYPTO_CRC16','ICRYPTO_BYTEXOR','ICRYPTO_BIN2ASCII','ICRYPTO_ASCII2STRING','ICRYPTO_ASCII2BIN','HOST_ADDR','HOSTNAME_TOIP', - 'HOSTIP_TONAME','HIWRD','HIINT','HEX$','HASH','HANDLE','GUIDTXT$','GUID$', - 'GRAPHIC','GLVOID','GLUSHORT','GLUINT','GLUBYTE','GLSIZEI','GLSHORT','GLOBAL', - 'GLINT','GLFLOAT','GLENUM','GLDOUBLE','GLCLAMPF','GLCLAMPD','GLBYTE','GLBOOLEAN', - 'GLBITFIELD','GETWINDOWMULTIKEYSTATE','GETWINDOWKEYSTATE','GETTICKCOUNT','GETS','GETMULTIASYNCKEYSTATE','GETMESSAGE','GETCURRENTINSTANCE', - 'GETAT','GETASYNCKEYSTATE','GET','FUNCTION_NPARAMS','FUNCTION_EXISTS','FUNCTION_CPARAMS','FUNCTION','FTP_SETSTRING', - 'FTP_SETSERVERDIR','FTP_SETNUMBER','FTP_SETMODE','FTP_SETLOGFILE','FTP_SETLOCALDIR','FTP_QUIT','FTP_PUTFILE','FTP_GETSTRING', - 'FTP_GETSERVERDIR','FTP_GETNUMBER','FTP_GETLOCALDIR','FTP_GETLIST','FTP_GETFILE','FTP_GETERRORSTRING','FTP_GETERRORNUMBER','FTP_FINISHED', - 'FTP_EXTRACT','FTP_DELFILE','FTP_CONNECT','FTP_COMMAND','FRAME','FRAC','FORMAT$','FOR', - 'FONT_LIST','FONT_CREATE','FONT','FOCUS','FLUSH','FIX','FILE_SIZE','FILE_SHELLDELETE', - 'FILE_SHELLCOPY','FILE_SETDATETIME','FILE_SEEK','FILE_SAVE','FILE_RENAME','FILE_PUT','FILE_PATHSPLIT','FILE_OPEN', - 'FILE_LOF','FILE_LOAD','FILE_LINEPRINT','FILE_LINEINPUT','FILE_KILL','FILE_GETVERSIONSTRING','FILE_GETVERSION','FILE_GETTIME', - 'FILE_GETDATETIMESTAMP','FILE_GETDATETIME','FILE_GETDATE','FILE_GET','FILE_EXISTS','FILE_EOF','FILE_COPY','FILE_CLOSE', - 'FILE_CHANGED','FILE_APPEND','FACTORIAL','EXTRACT$','EXT','EXPORT','EXP2','EXP10', - 'EXP','EXIT','EVAL_STRING','EVAL_SETSTRING','EVAL_SETNUMBER','EVAL_MATH','EVAL_LINKEXT','EVAL_GETSTRING', - 'EVAL_GETNUMBER','EVAL_ERRORGETTOKEN','EVAL_ERRORDESCRIPTION','EVAL_ERRORCLEAR','EVAL','ERRCLEAR','ERR','ENGINE_GETCURRENTTOKEN', - 'ENDIF','END','ENABLE','ELSEIF','ELSE','ECHO','DWORD','DT_YEAR', - 'DT_TIMETOSEC','DT_TIMESUBSECONDS','DT_TIMEFORMAT','DT_TIMEADDSECONDS','DT_SETTIMESEPARATOR','DT_SETDATESEPARATOR','DT_SETDATECENTURY','DT_SECTOTIME', - 'DT_SECTODATE','DT_SECOND','DT_MONTH','DT_MINUTE','DT_LASTDAYOFMONTH','DT_ISVALIDDATE','DT_ISLEAPYEAR','DT_HOUR', - 'DT_GETWEEKDAYNAME','DT_GETWEEKDAY','DT_GETTIMESTAMP','DT_GETTIMESEPARATOR','DT_GETMONTHNAME','DT_GETDATESEPARATOR','DT_GETDATECENTURY','DT_DAY', - 'DT_DATETOSEC','DT_DATETIMESUBSECONDS','DT_DATETIMEADDSECONDS','DT_DATESUBDAYS','DT_DATEFORMAT','DT_DATEDIFF','DT_DATEADDDAYS','DT_COOKIEDATE', - 'DRAW','DOUBLE','DOEVENTS','DO','DISABLE','DIR_REMOVE','DIR_MAKEALL','DIR_MAKE', - 'DIR_LISTARRAY','DIR_LIST','DIR_ISEMPTY','DIR_ISDIR','DIR_GETCURRENT','DIR_EXISTS','DIR_CHANGEDRIVE','DIR_CHANGE', - 'DIM','DICTIONARY_MEMINFO','DICTIONARY_LISTKEYS','DICTIONARY_FREE','DICTIONARY_FIND','DICTIONARY_EXISTS','DICTIONARY_CREATE','DICTIONARY_COUNT', - 'DICTIONARY_ADD','DIALOG_STOPEVENTS','DIALOG_SAVEFILE','DIALOG_OPENFILE','DIALOG_GETCONTROL','DIALOG_CHOOSECOLOR','DIALOG_BROWSEFORFOLDER','DIALOG', - 'DESKTOP','DESCENDING','DESCEND','DELETEOBJECT','DELETE','DEGTORAD','DECR','DECLARE', - 'DATE$','CVWRD','CVS','CVQ','CVL','CVI','CVE','CVDWD', - 'CVD','CVCUX','CVCUR','CVBYT','CURRENCY','CUR','CSET$','CSCH', - 'CSC','CRYPTO_GETPROVIDERTYPESCOUNT','CRYPTO_GETPROVIDERSCOUNT','CRYPTO_GETDEFAULTPROVIDER','CRYPTO_GENRANDOMSTRING','CRYPTO_ENUMPROVIDERTYPES','CRYPTO_ENUMPROVIDERS','CRYPTO_ENCRYPT', - 'CRYPTO_DECRYPT','CREATEFONT','COTH','COTAN','COSH','COS','CONTROL_SETTEXT','CONTROL_GETTEXT', - 'CONTROL_GETNUMBER','CONTROL','CONST','CONSOLE_WRITELINE','CONSOLE_WRITE','CONSOLE_WAITKEY','CONSOLE_SHOWWINDOW','CONSOLE_SHOWCURSOR', - 'CONSOLE_SETTITLE','CONSOLE_SETTEXTATTRIBUTE','CONSOLE_SETSTDHANDLE','CONSOLE_SETSCREENBUFFERSIZE','CONSOLE_SETPROGRESSBARCHAR','CONSOLE_SETOUTPUTMODE','CONSOLE_SETOUTPUTCP','CONSOLE_SETINPUTMODE', - 'CONSOLE_SETFILEAPISTOOEM','CONSOLE_SETFILEAPISTOANSI','CONSOLE_SETCURSORSIZE','CONSOLE_SETCURSORPOSITION','CONSOLE_SETCP','CONSOLE_SETACTIVESCREENBUFFER','CONSOLE_SCROLLWINDOW','CONSOLE_SCROLLBUFFERONEROW', - 'CONSOLE_SCROLLBUFFER','CONSOLE_SAVESCREEN','CONSOLE_RESTORESCREEN','CONSOLE_READLINE','CONSOLE_READ','CONSOLE_PROGRESSBAR','CONSOLE_PRINTLINE','CONSOLE_PRINTAT', - 'CONSOLE_PRINT','CONSOLE_NORMALSCREEN','CONSOLE_LINE','CONSOLE_INKEYB','CONSOLE_INKEY','CONSOLE_HIDECURSOR','CONSOLE_GETTITLE','CONSOLE_GETTEXTATTRIBUTE', - 'CONSOLE_GETSTDHANDLE','CONSOLE_GETSIZEY','CONSOLE_GETSIZEX','CONSOLE_GETPROGRESSBARCHAR','CONSOLE_GETOUTPUTMODE','CONSOLE_GETOUTPUTCP','CONSOLE_GETNUMBEROFMOUSEBUTTONS','CONSOLE_GETINPUTMODE', - 'CONSOLE_GETCURSORY','CONSOLE_GETCURSORX','CONSOLE_GETCURSORSIZE','CONSOLE_GETCURRENTFONTINDEX','CONSOLE_GETCP','CONSOLE_GENERATECTRLEVENT','CONSOLE_FULLSCREEN','CONSOLE_FREE', - 'CONSOLE_FOREGROUNDRGB','CONSOLE_ENABLECTRLC','CONSOLE_DISABLECTRLC','CONSOLE_CREATESCREENBUFFER','CONSOLE_COLORAT','CONSOLE_CLS','CONSOLE_BOX','CONSOLE_BACKGROUNDRGB', - 'CONSOLE_ATTACH','CONSOLE_AREFILEAPISANSI','CONSOLE_ALLOC','COM_VARIANTINIT','COM_VARIANTCOPY','COM_VARIANTCLEAR','COM_SUCCEEDED','COM_STRINGFROMCLSID', - 'COM_RELEASE','COM_QUERYINTERFACE','COM_PROGIDFROMCLSID','COM_ISEQUALIID','COM_ISEQUALGUID','COM_ISEQUALCLSID','COM_GETOBJECT','COM_GETENGINEGUID', - 'COM_EXECUTE','COM_DISPLAYERROR','COM_CREATEOBJECT','COM_CLSIDFROMSTRING','COM_CLSIDFROMPROGID','COM_BUILDVARIANT','COMBOBOX','COMBINATIONS', - 'COLOR','CLIPBOARD_SETTEXT','CLIPBOARD_GETTEXT','CLIENT','CLEARMESSAGES','CHR$','CHOOSE$','CHOOSE', - 'CHECKBOX','CHECK3STATE','CHECK','CGI_WRITELOGFILE','CGI_WRITE','CGI_URLDECODESTRING','CGI_UPLOADFILESTIME','CGI_UPLOADFILESNUMBER', - 'CGI_UPLOADFILESIZE','CGI_STARTSESSION','CGI_SETSESSIONVARIABLE','CGI_RESETDEFAULTSETTINGS','CGI_REMOVESPECIALCHARSPREFIX','CGI_REMOVEQUOTE','CGI_READ','CGI_LOADCONFIGFILE', - 'CGI_HEADER','CGI_GETSESSIONVARIABLE','CGI_GETREQUESTMETHOD','CGI_GETQUERYVALUE','CGI_GETCURRENTSESSION','CGI_GETCURRENTGUID','CGI_ENVIRON','CGI_CFGSETOPTION', - 'CGI_CFGGETOPTION','CGI_ADDSPECIALCHARSPREFIX','CGI_ADDQUOTE','CEIL','CASE','CALL','BYVAL','BYTE', - 'BYREF','BYCMD','BUTTON','BUNDLE_SETSCRIPTPARAMETERS','BUNDLE_SETSCRIPTNAME','BUNDLE_SETFLAGOBFUSCATEMAINSCRIPT','BUNDLE_SETFLAGDELETEAFTERRUN','BUNDLE_SETFLAGCOMPRESSALLFILES', - 'BUNDLE_SETFLAGASKBEFOREEXTRACT','BUNDLE_SETEXTRACTIONFOLDER','BUNDLE_SETCREATIONFOLDER','BUNDLE_SETBUNDLENAME','BUNDLE_RESET','BUNDLE_MAKE','BUNDLE_BUILDER','BUNDLE_ADDFOLDER', - 'BUNDLE_ADDFILE','BOUNDCHECK','BIN$','BIFF_WRITETEXT','BIFF_WRITENUMBER','BIFF_WRITEDATE','BIFF_SETROWHEIGHT','BIFF_SETCOLWIDTH', - 'BIFF_SETBUFFER','BIFF_CREATEFILE','BIFF_CLOSEFILE','BETWEEN','BEEP','BAR','ATTACH','ATN', - 'AT','ASSIGN','ASCIZ','ASCIIZ','ASCII2UNICODE','ASCENDING','ASCEND','ASC', - 'AS','ARRAY','ARCTANH','ARCSINH','ARCSIN','ARCSECH','ARCSEC','ARCCSCH', - 'ARCCSC','ARCCOTH','ARCCOT','ARCCOSH','ARCCOS','APP_TIMER','APP_SOURCEPATH','APP_SOURCENAME', - 'APP_SOURCEFULLNAME','APP_PATH','APP_NAME','APP_LISTVARIABLES','APP_LISTKEYWORDS','APP_LISTFUNCTIONS','APP_LISTEQUATES','APP_INCLUDEPATH', - 'APP_GETMODULEFULLPATH','APP_COUNTER','APPEND','ANY','ANIMATE_STOP','ANIMATE_PLAY','ANIMATE_OPEN','AND', - 'ALIAS','ALERT','ADD','ACODE$','ABS','%DEF','#MINVERSION','#IF', - '#ENDIF','#ELSEIF','#ELSE','#DEFAULT','#DEF','SQLWRITEPRIVATEPROFILESTRING','SQLWRITEFILEDSN','SQLWRITEDSNTOINI', - 'SQLVALIDDSN','SQLTRANSACT','SQLTABLES','SQLTABLEPRIVILEGES','SQLSTATISTICS','SQLSPECIALCOLUMNS','SQLSETSTMTOPTION','SQLSETSTMTATTR', - 'SQLSETSCROLLOPTIONS','SQLSETPOS','SQLSETPARAM','SQLSETENVATTR','SQLSETDESCREC','SQLSETDESCFIELD','SQLSETCURSORNAME','SQLSETCONNECTOPTION', - 'SQLSETCONNECTATTR','SQLSETCONFIGMODE','SQLROWCOUNT','SQLREMOVETRANSLATOR','SQLREMOVEDSNFROMINI','SQLREMOVEDRIVERMANAGER','SQLREMOVEDRIVER','SQLREADFILEDSN', - 'SQLPUTDATA','SQLPROCEDURES','SQLPROCEDURECOLUMNS','SQLPRIMARYKEYS','SQLPREPARE','SQLPOSTINSTALLERERROR','SQLPARAMOPTIONS','SQLPARAMDATA', - 'SQLNUMRESULTCOLS','SQLNUMPARAMS','SQLNATIVESQL','SQLMORERESULTS','SQLMANAGEDATASOURCES','SQLINSTALLTRANSLATOREX','SQLINSTALLERERROR','SQLINSTALLDRIVERMANAGER', - 'SQLINSTALLDRIVEREX','SQLGETTYPEINFO','SQLGETTRANSLATOR','SQLGETSTMTOPTION','SQLGETSTMTATTR','SQLGETPRIVATEPROFILESTRING','SQLGETINSTALLEDDRIVERS','SQLGETINFO', - 'SQLGETFUNCTIONS','SQLGETENVATTR','SQLGETDIAGREC','SQLGETDIAGFIELD','SQLGETDESCREC','SQLGETDESCFIELD','SQLGETDATA','SQLGETCURSORNAME', - 'SQLGETCONNECTOPTION','SQLGETCONNECTATTR','SQLGETCONFIGMODE','SQLFREESTMT','SQLFREEHANDLE','SQLFREEENV','SQLFREECONNECT','SQLFOREIGNKEYS', - 'SQLFETCHSCROLL','SQLFETCH','SQLEXTENDEDFETCH','SQLEXECUTE','SQLEXECDIRECT','SQLERROR','SQLENDTRAN','SQLDRIVERS', - 'SQLDRIVERCONNECT','SQLDISCONNECT','SQLDESCRIBEPARAM','SQLDESCRIBECOL','SQLDATASOURCES','SQLCREATEDATASOURCE','SQLCOPYDESC','SQLCONNECT', - 'SQLCONFIGDRIVER','SQLCONFIGDATASOURCE','SQLCOLUMNS','SQLCOLUMNPRIVILEGES','SQLCOLATTRIBUTES','SQLCOLATTRIBUTE','SQLCLOSECURSOR','SQLCANCEL', - 'SQLBULKOPERATIONS','SQLBROWSECONNECT','SQLBINDPARAMETER','SQLBINDPARAM','SQLBINDCOL','SQLALLOCSTMT','SQLALLOCHANDLE','SQLALLOCENV', - 'SQLALLOCCONNECT','ODBCWRONGDRIVER','ODBCWRITEPRIVATEPROFILESTRING','ODBCWRITEFILEDSN','ODBCWRITEDSNTOINI','ODBCVALIDDSN','ODBCUPDATERECORD','ODBCUPDATEBYBOOKMARK', - 'ODBCUNLOCKRECORD','ODBCUNBINDCOLUMNS','ODBCUNBINDCOL','ODBCTABLESCOUNT','ODBCTABLES','ODBCTABLEPRIVILEGESCOUNT','ODBCTABLEPRIVILEGES','ODBCSUPPORTS', - 'ODBCSTATTABLESCHEMANAME','ODBCSTATTABLEPAGES','ODBCSTATTABLECATALOGNAME','ODBCSTATTABLECARDINALITY','ODBCSTATISTICSCOUNT','ODBCSTATISTICS','ODBCSTATINDEXSORTSEQUENCE','ODBCSTATINDEXSCHEMANAME', - 'ODBCSTATINDEXQUALIFIER','ODBCSTATINDEXPAGES','ODBCSTATINDEXFILTERCONDITION','ODBCSTATINDEXCOLUMNORDINALPOSITION','ODBCSTATINDEXCOLUMNNAME','ODBCSTATINDEXCATALOGNAME','ODBCSTATINDEXCARDINALITY','ODBCSTATINDEXALLOWDUPLICATES', - 'ODBCSPECIALCOLUMNSCOUNT','ODBCSPECIALCOLUMNS','ODBCSETTXNISOLATION','ODBCSETTRANSLATELIB','ODBCSETTRACEFILE','ODBCSETTRACE','ODBCSETSTMTUSEBOOKMARKS','ODBCSETSTMTSIMULATECURSOR', - 'ODBCSETSTMTROWSTATUSPTR','ODBCSETSTMTROWSFETCHEDPTR','ODBCSETSTMTROWOPERATIONPTR','ODBCSETSTMTROWBINDTYPE','ODBCSETSTMTROWBINDOFFSETPTR','ODBCSETSTMTROWARRAYSIZE','ODBCSETSTMTRETRIEVEDATA','ODBCSETSTMTQUERYTIMEOUT', - 'ODBCSETSTMTPARAMSTATUSPTR','ODBCSETSTMTPARAMSPROCESSEDPTR','ODBCSETSTMTPARAMSETSIZE','ODBCSETSTMTPARAMOPERATIONPTR','ODBCSETSTMTPARAMBINDTYPE','ODBCSETSTMTPARAMBINDOFFSETPTR','ODBCSETSTMTNOSCAN','ODBCSETSTMTMETADATAID', - 'ODBCSETSTMTMAXROWS','ODBCSETSTMTMAXLENGTH','ODBCSETSTMTKEYSETSIZE','ODBCSETSTMTFETCHBOOKMARKPTR','ODBCSETSTMTENABLEAUTOIPD','ODBCSETSTMTCURSORTYPE','ODBCSETSTMTCURSORSENSITIVITY','ODBCSETSTMTCURSORSCROLLABLE', - 'ODBCSETSTMTCONCURRENCY','ODBCSETSTMTATTR','ODBCSETSTMTASYNCENABLE','ODBCSETSTMTAPPROWDESC','ODBCSETSTMTAPPPARAMDESC','ODBCSETSTATICCURSOR','ODBCSETROWVERCONCURRENCY','ODBCSETRESULT', - 'ODBCSETRELATIVEPOSITION','ODBCSETREADONLYCONCURRENCY','ODBCSETQUIETMODE','ODBCSETPOSITION','ODBCSETPOS','ODBCSETPACKETMODE','ODBCSETOPTIMISTICCONCURRENCY','ODBCSETODBCCURSORS', - 'ODBCSETMULTIUSERKEYSETCURSOR','ODBCSETMETADATAID','ODBCSETLOGINTIMEOUT','ODBCSETLOCKCONCURRENCY','ODBCSETKEYSETDRIVENCURSOR','ODBCSETFORWARDONLYCURSOR','ODBCSETENVOUTPUTNTS','ODBCSETENVODBCVERSION', - 'ODBCSETENVCPMATCH','ODBCSETENVCONNECTIONPOOLING','ODBCSETENVATTR','ODBCSETDYNAMICCURSOR','ODBCSETDESCREC','ODBCSETDESCFIELD','ODBCSETCURSORTYPE','ODBCSETCURSORSENSITIVITY', - 'ODBCSETCURSORSCROLLABILITY','ODBCSETCURSORNAME','ODBCSETCURSORLOCKTYPE','ODBCSETCURSORKEYSETSIZE','ODBCSETCURSORCONCURRENCY','ODBCSETCURRENTCATALOG','ODBCSETCONNECTIONTIMEOUT','ODBCSETCONNECTATTR', - 'ODBCSETCONFIGMODE','ODBCSETCONCURVALUESCONCURRENCY','ODBCSETAUTOCOMMITON','ODBCSETAUTOCOMMITOFF','ODBCSETAUTOCOMMIT','ODBCSETASYNCENABLE','ODBCSETACCESSMODE','ODBCSETABSOLUTEPOSITION', - 'ODBCROWCOUNT','ODBCROLLBACKTRAN','ODBCROLLBACKENVTRAN','ODBCROLLBACKDBCTRAN','ODBCRESULT','ODBCRESETPARAMS','ODBCREMOVETRANSLATOR','ODBCREMOVEDSNFROMINI', - 'ODBCREMOVEDRIVERMANAGER','ODBCREMOVEDRIVER','ODBCREFRESHRECORD','ODBCRECORDCOUNT','ODBCREADFILEDSN','ODBCQUOTEDIDENTIFIERCASE','ODBCPUTDATA','ODBCPROCEDURESCOUNT', - 'ODBCPROCEDURES','ODBCPROCEDURECOLUMNSCOUNT','ODBCPROCEDURECOLUMNS','ODBCPRIMARYKEYSCOUNT','ODBCPRIMARYKEYS','ODBCPREPARE','ODBCPOSTINSTALLERERROR','ODBCPARAMDATA', - 'ODBCOPENSTMT','ODBCOPENCONNECTION','ODBCNUMRESULTCOLS','ODBCNUMPARAMS','ODBCNATIVESQL','ODBCMOVEPREVIOUS','ODBCMOVENEXT','ODBCMOVELAST', - 'ODBCMOVEFIRST','ODBCMOVE','ODBCMORERESULTS','ODBCMANAGEDATASOURCES','ODBCLOCKRECORD','ODBCINSTALLTRANSLATOREX','ODBCINSTALLERERROR','ODBCINSTALLDRIVERMANAGER', - 'ODBCINSTALLDRIVEREX','ODBCGETXOPENCLIYEAR','ODBCGETUSERNAME','ODBCGETUNION','ODBCGETTYPEINFOCOUNT','ODBCGETTYPEINFO','ODBCGETTXNISOLATIONOPTION','ODBCGETTXNISOLATION', - 'ODBCGETTXNCAPABLE','ODBCGETTRANSLATOR','ODBCGETTRANSLATELIB','ODBCGETTRACEFILE','ODBCGETTRACE','ODBCGETTIMEDATEFUNCTIONS','ODBCGETTIMEDATEDIFFINTERVALS','ODBCGETTIMEDATEADDINTERVALS', - 'ODBCGETTABLETERM','ODBCGETSYSTEMFUNCTIONS','ODBCGETSUBQUERIES','ODBCGETSTRINGFUNCTIONS','ODBCGETSTMTUSEBOOKMARKS','ODBCGETSTMTSQLSTATE','ODBCGETSTMTSIMULATECURSOR','ODBCGETSTMTROWSTATUSPTR', - 'ODBCGETSTMTROWSFETCHEDPTR','ODBCGETSTMTROWOPERATIONPTR','ODBCGETSTMTROWNUMBER','ODBCGETSTMTROWBINDTYPE','ODBCGETSTMTROWBINDOFFSETPTR','ODBCGETSTMTROWARRAYSIZE','ODBCGETSTMTRETRIEVEDATA','ODBCGETSTMTQUERYTIMEOUT', - 'ODBCGETSTMTPARAMSTATUSPTR','ODBCGETSTMTPARAMSPROCESSEDPTR','ODBCGETSTMTPARAMSETSIZE','ODBCGETSTMTPARAMOPERATIONPTR','ODBCGETSTMTPARAMBINDTYPE','ODBCGETSTMTPARAMBINDOFFSETPTR','ODBCGETSTMTNOSCAN','ODBCGETSTMTMETADATAID', - 'ODBCGETSTMTMAXROWS','ODBCGETSTMTMAXLENGTH','ODBCGETSTMTKEYSETSIZE','ODBCGETSTMTIMPROWDESC','ODBCGETSTMTIMPPARAMDESC','ODBCGETSTMTFETCHBOOKMARKPTR','ODBCGETSTMTERRORINFO','ODBCGETSTMTENABLEAUTOIPD', - 'ODBCGETSTMTCURSORTYPE','ODBCGETSTMTCURSORSENSITIVITY','ODBCGETSTMTCURSORSCROLLABLE','ODBCGETSTMTCONCURRENCY','ODBCGETSTMTATTR','ODBCGETSTMTASYNCENABLE','ODBCGETSTMTAPPROWDESC','ODBCGETSTMTAPPPARAMDESC', - 'ODBCGETSTATICCURSORATTRIBUTES2','ODBCGETSTATICCURSORATTRIBUTES1','ODBCGETSTATEMENTSQLSTATE','ODBCGETSTATEMENTERRORINFO','ODBCGETSTANDARDCLICONFORMANCE','ODBCGETSQLSTATE','ODBCGETSQLCONFORMANCE','ODBCGETSQL92VALUEEXPRESSIONS', - 'ODBCGETSQL92STRINGFUNCTIONS','ODBCGETSQL92ROWVALUECONSTRUCTOR','ODBCGETSQL92REVOKE','ODBCGETSQL92RELATIONALJOINOPERATORS','ODBCGETSQL92PREDICATES','ODBCGETSQL92NUMERICVALUEFUNCTIONS','ODBCGETSQL92GRANT','ODBCGETSQL92FOREIGNKEYUPDATERULE', - 'ODBCGETSQL92FOREIGNKEYDELETERULE','ODBCGETSQL92DATETIMEFUNCTIONS','ODBCGETSPECIALCHARACTERS','ODBCGETSERVERNAME','ODBCGETSEARCHPATTERNESCAPE','ODBCGETSCROLLOPTIONS','ODBCGETSCHEMAUSAGE','ODBCGETSCHEMATERM', - 'ODBCGETROWUPDATES','ODBCGETQUIETMODE','ODBCGETPROCEDURETERM','ODBCGETPROCEDURESSUPPORT','ODBCGETPRIVATEPROFILESTRING','ODBCGETPOSOPERATIONS','ODBCGETPARAMARRAYSELECTS','ODBCGETPARAMARRAYROWCOUNTS', - 'ODBCGETPACKETMODE','ODBCGETOUTERJOINS','ODBCGETORDERBYCOLUMNSINSELECT','ODBCGETOJCAPABILITIES','ODBCGETODBCVER','ODBCGETODBCINTERFACECONFORMANCE','ODBCGETODBCCURSORS','ODBCGETNUMERICFUNCTIONS', - 'ODBCGETNULLCOLLATION','ODBCGETNONNULLABLECOLUMNS','ODBCGETNEEDLONGDATALEN','ODBCGETMULTRESULTSETS','ODBCGETMULTIPLEACTIVETXN','ODBCGETMETADATAID','ODBCGETMAXUSERNAMELEN','ODBCGETMAXTABLESINSELECT', - 'ODBCGETMAXTABLENAMELEN','ODBCGETMAXSTATEMENTLEN','ODBCGETMAXSCHEMANAMELEN','ODBCGETMAXROWSIZEINCLUDESLONG','ODBCGETMAXROWSIZE','ODBCGETMAXPROCEDURENAMELEN','ODBCGETMAXINDEXSIZE','ODBCGETMAXIDENTIFIERLEN', - 'ODBCGETMAXDRIVERCONNECTIONS','ODBCGETMAXCURSORNAMELEN','ODBCGETMAXCONCURRENTACTIVITIES','ODBCGETMAXCOLUMNSINTABLE','ODBCGETMAXCOLUMNSINSELECT','ODBCGETMAXCOLUMNSINORDERBY','ODBCGETMAXCOLUMNSININDEX','ODBCGETMAXCOLUMNSINGROUPBY', - 'ODBCGETMAXCOLUMNNAMELEN','ODBCGETMAXCHARLITERALLEN','ODBCGETMAXCATALOGNAMELEN','ODBCGETMAXBINARYLITERALLEN','ODBCGETMAXASYNCCONCURRENTSTATEMENTS','ODBCGETLONGVARCHARDATABYCOLNAME','ODBCGETLONGVARCHARDATA','ODBCGETLOGINTIMEOUT', - 'ODBCGETLIKEESCAPECLAUSE','ODBCGETKEYWORDS','ODBCGETKEYSETCURSORATTRIBUTES2','ODBCGETKEYSETCURSORATTRIBUTES1','ODBCGETINTEGRITY','ODBCGETINSTALLERERRORMESSAGE','ODBCGETINSTALLERERRORCODE','ODBCGETINSTALLEDDRIVERS', - 'ODBCGETINSERTSTATEMENT','ODBCGETINFOSTR','ODBCGETINFOSCHEMAVIEWS','ODBCGETINFOLONG','ODBCGETINFOINT','ODBCGETINFO','ODBCGETINDEXKEYWORDS','ODBCGETIMPROWDESCREC', - 'ODBCGETIMPROWDESCFIELDTYPE','ODBCGETIMPROWDESCFIELDSCALE','ODBCGETIMPROWDESCFIELDPRECISION','ODBCGETIMPROWDESCFIELDOCTETLENGTH','ODBCGETIMPROWDESCFIELDNULLABLE','ODBCGETIMPROWDESCFIELDNAME','ODBCGETIMPROWDESCFIELD','ODBCGETIMPPARAMDESCREC', - 'ODBCGETIMPPARAMDESCFIELDTYPE','ODBCGETIMPPARAMDESCFIELDSCALE','ODBCGETIMPPARAMDESCFIELDPRECISION','ODBCGETIMPPARAMDESCFIELDOCTETLENGTH','ODBCGETIMPPARAMDESCFIELDNULLABLE','ODBCGETIMPPARAMDESCFIELDNAME','ODBCGETIMPPARAMDESCFIELD','ODBCGETIDENTIFIERQUOTECHAR', - 'ODBCGETIDENTIFIERCASE','ODBCGETGROUPBY','ODBCGETFUNCTIONS','ODBCGETFORWARDONLYCURSORATTRIBUTES2','ODBCGETFORWARDONLYCURSORATTRIBUTES1','ODBCGETFILEUSAGE','ODBCGETEXPRESSIONSINORDERBY','ODBCGETERRORINFO', - 'ODBCGETENVSQLSTATE','ODBCGETENVOUTPUTNTS','ODBCGETENVODBCVERSION','ODBCGETENVIRONMENTSQLSTATE','ODBCGETENVIRONMENTERRORINFO','ODBCGETENVERRORINFO','ODBCGETENVCPMATCH','ODBCGETENVCONNECTIONPOOLING', - 'ODBCGETENVATTR','ODBCGETDYNAMICCURSORATTRIBUTES2','ODBCGETDYNAMICCURSORATTRIBUTES1','ODBCGETDROPVIEW','ODBCGETDROPTRANSLATION','ODBCGETDROPTABLE','ODBCGETDROPSCHEMA','ODBCGETDROPDOMAIN', - 'ODBCGETDROPCOLLATION','ODBCGETDROPCHARACTERSET','ODBCGETDROPASSERTION','ODBCGETDRIVERVER','ODBCGETDRIVERODBCVER','ODBCGETDRIVERNAME','ODBCGETDRIVERMANAGERINSTALLPATH','ODBCGETDRIVERHLIB', - 'ODBCGETDRIVERHENV','ODBCGETDRIVERHDBC','ODBCGETDMVERMINOR','ODBCGETDMVERMAJOR','ODBCGETDMVER','ODBCGETDIAGREC','ODBCGETDIAGFIELD','ODBCGETDESCSQLSTATE', - 'ODBCGETDESCRIPTORSQLSTATE','ODBCGETDESCRIPTORERRORINFO','ODBCGETDESCRIBEPARAMETER','ODBCGETDESCREC','ODBCGETDESCFIELD','ODBCGETDESCERRORINFO','ODBCGETDEFAULTTXNISOLATION','ODBCGETDDLINDEX', - 'ODBCGETDBMSVER','ODBCGETDBMSNAME','ODBCGETDBCSQLSTATE','ODBCGETDBCERRORINFO','ODBCGETDATETIMELITERALS','ODBCGETDATASTRINGBYCOLNAME','ODBCGETDATASTRING','ODBCGETDATASOURCEREADONLY', - 'ODBCGETDATASOURCENAME','ODBCGETDATAEXTENSIONS','ODBCGETDATABASENAME','ODBCGETDATA','ODBCGETCURSORTYPE','ODBCGETCURSORSENSITIVITYSUPPORT','ODBCGETCURSORSENSITIVITY','ODBCGETCURSORSCROLLABILITY', - 'ODBCGETCURSORROLLBACKBEHAVIOR','ODBCGETCURSORNAME','ODBCGETCURSORLOCKTYPE','ODBCGETCURSORKEYSETSIZE','ODBCGETCURSORCONCURRENCY','ODBCGETCURSORCOMMITBEHAVIOR','ODBCGETCURRENTCATALOG','ODBCGETCREATEVIEW', - 'ODBCGETCREATETRANSLATION','ODBCGETCREATETABLE','ODBCGETCREATESCHEMA','ODBCGETCREATEDOMAIN','ODBCGETCREATECOLLATION','ODBCGETCREATECHARACTERSET','ODBCGETCREATEASSERTION','ODBCGETCORRELATIONNAME', - 'ODBCGETCONVERTVARCHAR','ODBCGETCONVERTVARBINARY','ODBCGETCONVERTTINYINT','ODBCGETCONVERTTIMESTAMP','ODBCGETCONVERTTIME','ODBCGETCONVERTSMALLINT','ODBCGETCONVERTREAL','ODBCGETCONVERTNUMERIC', - 'ODBCGETCONVERTLONGVARCHAR','ODBCGETCONVERTLONGVARBINARY','ODBCGETCONVERTINTERVALYEARMONTH','ODBCGETCONVERTINTERVALDAYTIME','ODBCGETCONVERTINTEGER','ODBCGETCONVERTFUNCTIONS','ODBCGETCONVERTFLOAT','ODBCGETCONVERTDOUBLE', - 'ODBCGETCONVERTDECIMAL','ODBCGETCONVERTDATE','ODBCGETCONVERTCHAR','ODBCGETCONVERTBIT','ODBCGETCONVERTBINARY','ODBCGETCONVERTBIGINT','ODBCGETCONNECTIONTIMEOUT','ODBCGETCONNECTIONSQLSTATE', - 'ODBCGETCONNECTIONERRORINFO','ODBCGETCONNECTIONDEAD','ODBCGETCONNECTATTR','ODBCGETCONFIGMODE','ODBCGETCONCATNULLBEHAVIOR','ODBCGETCOLUMNALIAS','ODBCGETCOLLATIONSEQ','ODBCGETCATALOGUSAGE', - 'ODBCGETCATALOGTERM','ODBCGETCATALOGNAMESEPARATOR','ODBCGETCATALOGNAME','ODBCGETCATALOGLOCATION','ODBCGETBOOKMARKPERSISTENCE','ODBCGETBATCHSUPPORT','ODBCGETBATCHROWCOUNT','ODBCGETAUTOIPD', - 'ODBCGETAUTOCOMMIT','ODBCGETASYNCMODE','ODBCGETASYNCENABLE','ODBCGETALTERTABLE','ODBCGETALTERDOMAIN','ODBCGETAGGREGATEFUNCTIONS','ODBCGETACTIVEENVIRONMENTS','ODBCGETACCESSMODE', - 'ODBCGETACCESSIBLETABLES','ODBCGETACCESSIBLEPROCEDURES','ODBCFREESTMT','ODBCFREEHANDLE','ODBCFREEENV','ODBCFREEDESC','ODBCFREEDBC','ODBCFREECONNECT', - 'ODBCFOREIGNKEYSCOUNT','ODBCFOREIGNKEYS','ODBCFETCHSCROLL','ODBCFETCHBYBOOKMARK','ODBCFETCH','ODBCEXTENDEDFETCH','ODBCEXECUTE','ODBCEXECDIRECT', - 'ODBCERROR','ODBCEOF','ODBCENDTRAN','ODBCDRIVERSCOUNT','ODBCDRIVERS','ODBCDRIVERCONNECT','ODBCDISCONNECT','ODBCDESCRIBEPARAM', - 'ODBCDESCRIBECOL','ODBCDELETERECORD','ODBCDELETEBYBOOKMARK','ODBCDATASOURCES','ODBCCREATEDATASOURCE','ODBCCOPYDESC','ODBCCONNECTIONISDEAD','ODBCCONNECTIONISALIVE', - 'ODBCCONNECT','ODBCCONFIGDRIVER','ODBCCONFIGDATASOURCE','ODBCCOMMITTRAN','ODBCCOMMITENVTRAN','ODBCCOMMITDBCTRAN','ODBCCOLUPDATABLE','ODBCCOLUNSIGNED', - 'ODBCCOLUNNAMED','ODBCCOLUMNSCOUNT','ODBCCOLUMNS','ODBCCOLUMNPRIVILEGESCOUNT','ODBCCOLUMNPRIVILEGES','ODBCCOLUMN','ODBCCOLTYPENAME','ODBCCOLTYPE', - 'ODBCCOLTABLENAME','ODBCCOLSEARCHABLE','ODBCCOLSCHEMANAME','ODBCCOLSCALE','ODBCCOLPRECISION','ODBCCOLOCTETLENGTH','ODBCCOLNUMPRECRADIX','ODBCCOLNULLABLE', - 'ODBCCOLNAME','ODBCCOLLOCALTYPENAME','ODBCCOLLITERALSUFFIX','ODBCCOLLITERALPREFIX','ODBCCOLLENGTH','ODBCCOLLABEL','ODBCCOLISNULL','ODBCCOLFIXEDPRECSCALE', - 'ODBCCOLDISPLAYSIZE','ODBCCOLCOUNT','ODBCCOLCONCISETYPE','ODBCCOLCATALOGNAME','ODBCCOLCASESENSITIVE','ODBCCOLBASETABLENAME','ODBCCOLBASECOLUMNNAME','ODBCCOLAUTOUNIQUEVALUE', - 'ODBCCOLATTRIBUTE','ODBCCLOSESTMTCURSOR','ODBCCLOSESTMT','ODBCCLOSECURSOR','ODBCCLOSECONNECTION','ODBCCLEARRESULT','ODBCCANCEL','ODBCBULKOPERATIONS', - 'ODBCBROWSECONNECT','ODBCBINDPARAMETER','ODBCBINDCOLTOWORD','ODBCBINDCOLTOTIMESTAMP','ODBCBINDCOLTOTIME','ODBCBINDCOLTOSTRING','ODBCBINDCOLTOSINGLE','ODBCBINDCOLTOQUAD', - 'ODBCBINDCOLTONUMERIC','ODBCBINDCOLTOLONG','ODBCBINDCOLTOINTEGER','ODBCBINDCOLTODWORD','ODBCBINDCOLTODOUBLE','ODBCBINDCOLTODECIMAL','ODBCBINDCOLTODATE','ODBCBINDCOLTOCURRENCY', - 'ODBCBINDCOLTOBYTE','ODBCBINDCOLTOBIT','ODBCBINDCOLTOBINARY','ODBCBINDCOL','ODBCALLOCSTMT','ODBCALLOCHANDLE','ODBCALLOCENV','ODBCALLOCDESC', - 'ODBCALLOCDBC','ODBCALLOCCONNECT','ODBCADDRECORD','GLVIEWPORT','GLVERTEXPOINTER','GLVERTEX4SV','GLVERTEX4S','GLVERTEX4IV', - 'GLVERTEX4I','GLVERTEX4FV','GLVERTEX4F','GLVERTEX4DV','GLVERTEX4D','GLVERTEX3SV','GLVERTEX3S','GLVERTEX3IV', - 'GLVERTEX3I','GLVERTEX3FV','GLVERTEX3F','GLVERTEX3DV','GLVERTEX3D','GLVERTEX2SV','GLVERTEX2S','GLVERTEX2IV', - 'GLVERTEX2I','GLVERTEX2FV','GLVERTEX2F','GLVERTEX2DV','GLVERTEX2D','GLUUNPROJECT','GLUTESSVERTEX','GLUTESSPROPERTY', - 'GLUTESSNORMAL','GLUTESSENDPOLYGON','GLUTESSENDCONTOUR','GLUTESSCALLBACK','GLUTESSBEGINPOLYGON','GLUTESSBEGINCONTOUR','GLUSPHERE','GLUSCALEIMAGE', - 'GLUQUADRICTEXTURE','GLUQUADRICORIENTATION','GLUQUADRICNORMALS','GLUQUADRICDRAWSTYLE','GLUQUADRICCALLBACK','GLUPWLCURVE','GLUPROJECT','GLUPICKMATRIX', - 'GLUPERSPECTIVE','GLUPARTIALDISK','GLUORTHO2D','GLUNURBSSURFACE','GLUNURBSPROPERTY','GLUNURBSCURVE','GLUNURBSCALLBACK','GLUNEXTCONTOUR', - 'GLUNEWTESS','GLUNEWQUADRIC','GLUNEWNURBSRENDERER','GLULOOKAT','GLULOADSAMPLINGMATRICES','GLUGETTESSPROPERTY','GLUGETSTRING','GLUGETNURBSPROPERTY', - 'GLUERRORSTRING','GLUENDTRIM','GLUENDSURFACE','GLUENDPOLYGON','GLUENDCURVE','GLUDISK','GLUDELETETESS','GLUDELETEQUADRIC', - 'GLUDELETENURBSRENDERER','GLUCYLINDER','GLUBUILD2DMIPMAPS','GLUBUILD1DMIPMAPS','GLUBEGINTRIM','GLUBEGINSURFACE','GLUBEGINPOLYGON','GLUBEGINCURVE', - 'GLTRANSLATEF','GLTRANSLATED','GLTEXSUBIMAGE2D','GLTEXSUBIMAGE1D','GLTEXPARAMETERIV','GLTEXPARAMETERI','GLTEXPARAMETERFV','GLTEXPARAMETERF', - 'GLTEXIMAGE2D','GLTEXIMAGE1D','GLTEXGENIV','GLTEXGENI','GLTEXGENFV','GLTEXGENF','GLTEXGENDV','GLTEXGEND', - 'GLTEXENVIV','GLTEXENVI','GLTEXENVFV','GLTEXENVF','GLTEXCOORDPOINTER','GLTEXCOORD4SV','GLTEXCOORD4S','GLTEXCOORD4IV', - 'GLTEXCOORD4I','GLTEXCOORD4FV','GLTEXCOORD4F','GLTEXCOORD4DV','GLTEXCOORD4D','GLTEXCOORD3SV','GLTEXCOORD3S','GLTEXCOORD3IV', - 'GLTEXCOORD3I','GLTEXCOORD3FV','GLTEXCOORD3F','GLTEXCOORD3DV','GLTEXCOORD3D','GLTEXCOORD2SV','GLTEXCOORD2S','GLTEXCOORD2IV', - 'GLTEXCOORD2I','GLTEXCOORD2FV','GLTEXCOORD2F','GLTEXCOORD2DV','GLTEXCOORD2D','GLTEXCOORD1SV','GLTEXCOORD1S','GLTEXCOORD1IV', - 'GLTEXCOORD1I','GLTEXCOORD1FV','GLTEXCOORD1F','GLTEXCOORD1DV','GLTEXCOORD1D','GLSTENCILOP','GLSTENCILMASK','GLSTENCILFUNC', - 'GLSHADEMODEL','GLSELECTBUFFER','GLSCISSOR','GLSCALEF','GLSCALED','GLROTATEF','GLROTATED','GLRENDERMODE', - 'GLRECTSV','GLRECTS','GLRECTIV','GLRECTI','GLRECTFV','GLRECTF','GLRECTDV','GLRECTD', - 'GLREADPIXELS','GLREADBUFFER','GLRASTERPOS4SV','GLRASTERPOS4S','GLRASTERPOS4IV','GLRASTERPOS4I','GLRASTERPOS4FV','GLRASTERPOS4F', - 'GLRASTERPOS4DV','GLRASTERPOS4D','GLRASTERPOS3SV','GLRASTERPOS3S','GLRASTERPOS3IV','GLRASTERPOS3I','GLRASTERPOS3FV','GLRASTERPOS3F', - 'GLRASTERPOS3DV','GLRASTERPOS3D','GLRASTERPOS2SV','GLRASTERPOS2S','GLRASTERPOS2IV','GLRASTERPOS2I','GLRASTERPOS2FV','GLRASTERPOS2F', - 'GLRASTERPOS2DV','GLRASTERPOS2D','GLPUSHNAME','GLPUSHMATRIX','GLPUSHCLIENTATTRIB','GLPUSHATTRIB','GLPRIORITIZETEXTURES','GLPOPNAME', - 'GLPOPMATRIX','GLPOPCLIENTATTRIB','GLPOPATTRIB','GLPOLYGONSTIPPLE','GLPOLYGONOFFSET','GLPOLYGONMODE','GLPOINTSIZE','GLPIXELZOOM', - 'GLPIXELTRANSFERI','GLPIXELTRANSFERF','GLPIXELSTOREI','GLPIXELSTOREF','GLPIXELMAPUSV','GLPIXELMAPUIV','GLPIXELMAPFV','GLPASSTHROUGH', - 'GLORTHO','GLNORMALPOINTER','GLNORMAL3SV','GLNORMAL3S','GLNORMAL3IV','GLNORMAL3I','GLNORMAL3FV','GLNORMAL3F', - 'GLNORMAL3DV','GLNORMAL3D','GLNORMAL3BV','GLNORMAL3B','GLNEWLIST','GLMULTMATRIXF','GLMULTMATRIXD','GLMATRIXMODE', - 'GLMATERIALIV','GLMATERIALI','GLMATERIALFV','GLMATERIALF','GLMAPGRID2F','GLMAPGRID2D','GLMAPGRID1F','GLMAPGRID1D', - 'GLMAP2F','GLMAP2D','GLMAP1F','GLMAP1D','GLLOGICOP','GLLOADNAME','GLLOADMATRIXF','GLLOADMATRIXD', - 'GLLOADIDENTITY','GLLISTBASE','GLLINEWIDTH','GLLINESTIPPLE','GLLIGHTMODELIV','GLLIGHTMODELI','GLLIGHTMODELFV','GLLIGHTMODELF', - 'GLLIGHTIV','GLLIGHTI','GLLIGHTFV','GLLIGHTF','GLISTEXTURE','GLISLIST','GLISENABLED','GLINTERLEAVEDARRAYS', - 'GLINITNAMES','GLINDEXUBV','GLINDEXUB','GLINDEXSV','GLINDEXS','GLINDEXPOINTER','GLINDEXMASK','GLINDEXIV', - 'GLINDEXI','GLINDEXFV','GLINDEXF','GLINDEXDV','GLINDEXD','GLHINT','GLGETTEXPARAMETERIV','GLGETTEXPARAMETERFV', - 'GLGETTEXLEVELPARAMETERIV','GLGETTEXLEVELPARAMETERFV','GLGETTEXIMAGE','GLGETTEXGENIV','GLGETTEXGENFV','GLGETTEXGENDV','GLGETTEXENVIV','GLGETTEXENVFV', - 'GLGETSTRING','GLGETPOLYGONSTIPPLE','GLGETPOINTERV','GLGETPIXELMAPUSV','GLGETPIXELMAPUIV','GLGETPIXELMAPFV','GLGETMATERIALIV','GLGETMATERIALFV', - 'GLGETMAPIV','GLGETMAPFV','GLGETMAPDV','GLGETLIGHTIV','GLGETLIGHTFV','GLGETINTEGERV','GLGETFLOATV','GLGETERROR', - 'GLGETDOUBLEV','GLGETCLIPPLANE','GLGETBOOLEANV','GLGENTEXTURES','GLGENLISTS','GLFRUSTUM','GLFRONTFACE','GLFOGIV', - 'GLFOGI','GLFOGFV','GLFOGF','GLFLUSH','GLFINISH','GLFEEDBACKBUFFER','GLEVALPOINT2','GLEVALPOINT1', - 'GLEVALMESH2','GLEVALMESH1','GLEVALCOORD2FV','GLEVALCOORD2F','GLEVALCOORD2DV','GLEVALCOORD2D','GLEVALCOORD1FV','GLEVALCOORD1F', - 'GLEVALCOORD1DV','GLEVALCOORD1D','GLENDLIST','GLEND','GLENABLECLIENTSTATE','GLENABLE','GLEDGEFLAGV','GLEDGEFLAGPOINTER', - 'GLEDGEFLAG','GLDRAWPIXELS','GLDRAWELEMENTS','GLDRAWBUFFER','GLDRAWARRAYS','GLDISABLECLIENTSTATE','GLDISABLE','GLDEPTHRANGE', - 'GLDEPTHMASK','GLDEPTHFUNC','GLDELETETEXTURES','GLDELETELISTS','GLCULLFACE','GLCOPYTEXSUBIMAGE2D','GLCOPYTEXSUBIMAGE1D','GLCOPYTEXIMAGE2D', - 'GLCOPYTEXIMAGE1D','GLCOPYPIXELS','GLCOLORPOINTER','GLCOLORMATERIAL','GLCOLORMASK','GLCOLOR4USV','GLCOLOR4US','GLCOLOR4UIV', - 'GLCOLOR4UI','GLCOLOR4UBV','GLCOLOR4UB','GLCOLOR4SV','GLCOLOR4S','GLCOLOR4IV','GLCOLOR4I','GLCOLOR4FV', - 'GLCOLOR4F','GLCOLOR4DV','GLCOLOR4D','GLCOLOR4BV','GLCOLOR4B','GLCOLOR3USV','GLCOLOR3US','GLCOLOR3UIV', - 'GLCOLOR3UI','GLCOLOR3UBV','GLCOLOR3UB','GLCOLOR3SV','GLCOLOR3S','GLCOLOR3IV','GLCOLOR3I','GLCOLOR3FV', - 'GLCOLOR3F','GLCOLOR3DV','GLCOLOR3D','GLCOLOR3BV','GLCOLOR3B','GLCLIPPLANE','GLCLEARSTENCIL','GLCLEARINDEX', - 'GLCLEARDEPTH','GLCLEARCOLOR','GLCLEARACCUM','GLCLEAR','GLCALLLISTS','GLCALLLIST','GLBLENDFUNC','GLBITMAP', - 'GLBINDTEXTURE','GLBEGIN','GLARRAYELEMENT','GLARETEXTURESRESIDENT','GLALPHAFUNC','GLACCUM'), - 2 => array( - '$BEL','$BS','$CR','$CRLF','$DQ','$DT_DATE_SEPARATOR','$DT_LANGUAGE','$DT_TIME_SEPARATOR', - '$ESC','$FF','$LF','$NUL','$PC_SD_MY_PC','$SPC','$SQL_OPT_TRACE_FILE_DEFAULT','$SQL_SPEC_STRING', - '$TAB','$TRACKBAR_CLASS','$VT','%ACM_OPEN','%ACM_OPENW','%ACM_PLAY','%ACM_STOP','%ACN_START', - '%ACN_STOP','%ACS_AUTOPLAY','%ACS_CENTER','%ACS_TIMER','%ACS_TRANSPARENT','%APP_COUNTER_FUNLOOKUP','%APP_COUNTER_KEYLOOKUP','%APP_COUNTER_LOOKUP', - '%APP_COUNTER_TESTALPHA','%APP_COUNTER_UDTLOOKUP','%APP_COUNTER_VARLOOKUP','%APP_TIMER_EXECTOTAL','%APP_TIMER_INIT','%APP_TIMER_LOAD','%APP_TIMER_PREPROCESSOR','%AW_ACTIVATE', - '%AW_BLEND','%AW_CENTER','%AW_HIDE','%AW_HOR_NEGATIVE','%AW_HOR_POSITIVE','%AW_SLIDE','%AW_VER_NEGATIVE','%AW_VER_POSITIVE', - '%BCM_FIRST','%BLACK','%BLUE','%BM_GETCHECK','%BM_SETCHECK','%BST_CHECKED','%BST_UNCHECKED','%BS_AUTOCHECKBOX', - '%BS_BOTTOM','%BS_CENTER','%BS_DEFAULT','%BS_DEFPUSHBUTTON','%BS_FLAT','%BS_LEFT','%BS_LEFTTEXT','%BS_MULTILINE', - '%BS_NOTIFY','%BS_OWNERDRAW','%BS_PUSHLIKE','%BS_RIGHT','%BS_TOP','%BS_VCENTER','%BUNDLE_BUILDER_CANCELLED','%CBM_FIRST', - '%CBN_CLOSEUP','%CBN_DBLCLK','%CBN_DROPDOWN','%CBN_EDITCHANGE','%CBN_EDITUPDATE','%CBN_ERRSPACE','%CBN_KILLFOCUS','%CBN_SELCANCEL', - '%CBN_SELCHANGE','%CBN_SELENDCANCEL','%CBN_SELENDOK','%CBN_SETFOCUS','%CBS_AUTOHSCROLL','%CBS_DISABLENOSCROLL','%CBS_DROPDOWN','%CBS_DROPDOWNLIST', - '%CBS_HASSTRINGS','%CBS_LOWERCASE','%CBS_NOINTEGRALHEIGHT','%CBS_SIMPLE','%CBS_SORT','%CBS_UPPERCASE','%CB_SELECTSTRING','%CCM_FIRST', - '%CC_ANYCOLOR','%CC_ENABLEHOOK','%CC_ENABLETEMPLATE','%CC_ENABLETEMPLATEHANDLE','%CC_FULLOPEN','%CC_PREVENTFULLOPEN','%CC_RGBINIT','%CC_SHOWHELP', - '%CC_SOLIDCOLOR','%CFE_BOLD','%CFE_ITALIC','%CFE_LINK','%CFE_PROTECTED','%CFE_STRIKEOUT','%CFE_UNDERLINE','%CFM_ANIMATION', - '%CFM_BACKCOLOR','%CFM_BOLD','%CFM_CHARSET','%CFM_COLOR','%CFM_FACE','%CFM_ITALIC','%CFM_KERNING','%CFM_LCID', - '%CFM_LINK','%CFM_OFFSET','%CFM_PROTECTED','%CFM_REVAUTHOR','%CFM_SIZE','%CFM_SPACING','%CFM_STRIKEOUT','%CFM_STYLE', - '%CFM_UNDERLINE','%CFM_UNDERLINETYPE','%CFM_WEIGHT','%CGI_ACCEPT_FILE_UPLOAD','%CGI_AUTO_ADD_SPECIAL_CHARS_PREFIX','%CGI_AUTO_CREATE_VARS','%CGI_BUFFERIZE_OUTPUT','%CGI_DOUBLE_QUOTE', - '%CGI_FILE_UPLOAD_BASEPATH','%CGI_FORCE_SESSION_VALIDATION','%CGI_MAX_BYTE_FROM_STD_IN','%CGI_REQUEST_METHOD_GET','%CGI_REQUEST_METHOD_POST','%CGI_SESSION_FILE_BASEPATH','%CGI_SINGLE_QUOTE','%CGI_SPECIAL_CHARS_PREFIX', - '%CGI_TEMPORARY_UPLOAD_PATH','%CGI_UPLOAD_CAN_OVERWRITE','%CGI_WRITE_LOG_FILE','%CGI_WRITE_VARS_INTO_LOG_FILE','%CONOLE_ATTACH_PARENT_PROCESS','%CONSOLE_BACKGROUND_BLUE','%CONSOLE_BACKGROUND_GREEN','%CONSOLE_BACKGROUND_INTENSITY', - '%CONSOLE_BACKGROUND_RED','%CONSOLE_BOX_FLAG_3DOFF','%CONSOLE_BOX_FLAG_3DON','%CONSOLE_BOX_FLAG_SHADOW','%CONSOLE_COMMON_LVB_GRID_HORIZONTAL','%CONSOLE_COMMON_LVB_GRID_LVERTICAL','%CONSOLE_COMMON_LVB_GRID_RVERTICAL','%CONSOLE_COMMON_LVB_LEADING_BYTE', - '%CONSOLE_COMMON_LVB_REVERSE_VIDEO','%CONSOLE_COMMON_LVB_TRAILING_BYTE','%CONSOLE_COMMON_LVB_UNDERSCORE','%CONSOLE_CTRL_BREAK_EVENT','%CONSOLE_CTRL_C_EVENT','%CONSOLE_DOUBLE_CLICK','%CONSOLE_ENABLE_AUTO_POSITION','%CONSOLE_ENABLE_ECHO_INPUT', - '%CONSOLE_ENABLE_EXTENDED_FLAGS','%CONSOLE_ENABLE_INSERT_MODE','%CONSOLE_ENABLE_LINE_INPUT','%CONSOLE_ENABLE_MOUSE_INPUT','%CONSOLE_ENABLE_PROCESSED_INPUT','%CONSOLE_ENABLE_PROCESSED_OUTPUT','%CONSOLE_ENABLE_QUICK_EDIT_MODE','%CONSOLE_ENABLE_WINDOW_INPUT', - '%CONSOLE_ENABLE_WRAP_AT_EOL_OUTPUT','%CONSOLE_FOREGROUND_BLUE','%CONSOLE_FOREGROUND_GREEN','%CONSOLE_FOREGROUND_INTENSITY','%CONSOLE_FOREGROUND_RED','%CONSOLE_LBUTTON','%CONSOLE_LINE_HORIZONTAL','%CONSOLE_LINE_VERTICAL', - '%CONSOLE_MBUTTON','%CONSOLE_MOUSE_MOVED','%CONSOLE_MOUSE_WHEELED','%CONSOLE_RBUTTON','%CONSOLE_SCROLLBUF_DOWN','%CONSOLE_SCROLLBUF_UP','%CONSOLE_SCROLLWND_ABSOLUTE','%CONSOLE_SCROLLWND_RELATIVE', - '%CONSOLE_STD_ERROR_HANDLE','%CONSOLE_STD_INPUT_HANDLE','%CONSOLE_STD_OUTPUT_HANDLE','%CONSOLE_SW_FORCEMINIMIZE','%CONSOLE_SW_HIDE','%CONSOLE_SW_MAXIMIZE','%CONSOLE_SW_MINIMIZE','%CONSOLE_SW_RESTORE', - '%CONSOLE_SW_SHOW','%CONSOLE_SW_SHOWDEFAULT','%CONSOLE_SW_SHOWMAXIMIZED','%CONSOLE_SW_SHOWMINIMIZED','%CONSOLE_SW_SHOWMINNOACTIVE','%CONSOLE_SW_SHOWNA','%CONSOLE_SW_SHOWNOACTIVATE','%CONSOLE_SW_SHOWNORMAL', - '%CONSOLE_UNAVAILABLE','%CRYPTO_CALG_DES','%CRYPTO_CALG_RC2','%CRYPTO_CALG_RC4','%CRYPTO_PROV_DH_SCHANNEL','%CRYPTO_PROV_DSS','%CRYPTO_PROV_DSS_DH','%CRYPTO_PROV_FORTEZZA', - '%CRYPTO_PROV_MS_EXCHANGE','%CRYPTO_PROV_RSA_FULL','%CRYPTO_PROV_RSA_SCHANNEL','%CRYPTO_PROV_RSA_SIG','%CRYPTO_PROV_SSL','%CSIDL_ADMINTOOLS','%CSIDL_ALTSTARTUP','%CSIDL_APPDATA', - '%CSIDL_BITBUCKET','%CSIDL_CDBURN_AREA','%CSIDL_COMMON_ADMINTOOLS','%CSIDL_COMMON_ALTSTARTUP','%CSIDL_COMMON_APPDATA','%CSIDL_COMMON_DESKTOPDIRECTORY','%CSIDL_COMMON_DOCUMENTS','%CSIDL_COMMON_FAVORITES', - '%CSIDL_COMMON_MUSIC','%CSIDL_COMMON_PICTURES','%CSIDL_COMMON_PROGRAMS','%CSIDL_COMMON_STARTMENU','%CSIDL_COMMON_STARTUP','%CSIDL_COMMON_TEMPLATES','%CSIDL_COMMON_VIDEO','%CSIDL_CONTROLS', - '%CSIDL_COOKIES','%CSIDL_DESKTOP','%CSIDL_DESKTOPDIRECTORY','%CSIDL_DRIVES','%CSIDL_FAVORITES','%CSIDL_FLAG_CREATE','%CSIDL_FONTS','%CSIDL_HISTORY', - '%CSIDL_INTERNET','%CSIDL_INTERNET_CACHE','%CSIDL_LOCAL_APPDATA','%CSIDL_MYDOCUMENTS','%CSIDL_MYMUSIC','%CSIDL_MYPICTURES','%CSIDL_MYVIDEO','%CSIDL_NETHOOD', - '%CSIDL_NETWORK','%CSIDL_PERSONAL','%CSIDL_PRINTERS','%CSIDL_PRINTHOOD','%CSIDL_PROFILE','%CSIDL_PROGRAMS','%CSIDL_PROGRAM_FILES','%CSIDL_PROGRAM_FILES_COMMON', - '%CSIDL_RECENT','%CSIDL_SENDTO','%CSIDL_STARTMENU','%CSIDL_STARTUP','%CSIDL_SYSTEM','%CSIDL_TEMPLATES','%CSIDL_WINDOWS','%CW_USEDEFAULT', - '%CYAN','%DATE_TIME_FILE_CREATION','%DATE_TIME_LAST_FILE_ACCESS','%DATE_TIME_LAST_FILE_WRITE','%DICTIONARY_MEMINFO_DATA','%DICTIONARY_MEMINFO_KEYS','%DICTIONARY_MEMINFO_TOTAL','%DICTIONARY_SORTDESCENDING', - '%DICTIONARY_SORTKEYS','%DSCAPS_CERTIFIED','%DSCAPS_CONTINUOUSRATE','%DSCAPS_EMULDRIVER','%DSCAPS_SECONDARY16BIT','%DSCAPS_SECONDARY8BIT','%DSCAPS_SECONDARYMONO','%DSCAPS_SECONDARYSTEREO', - '%DSCCAPS_CERTIFIED','%DSCCAPS_EMULDRIVER','%DS_3DLOOK','%DS_ABSALIGN','%DS_CENTER','%DS_CENTERMOUSE','%DS_CONTEXTHELP','%DS_CONTROL', - '%DS_MODALFRAME','%DS_NOFAILCREATE','%DS_SETFONT','%DS_SETFOREGROUND','%DS_SYSMODAL','%DTM_FIRST','%DTM_GETMCCOLOR','%DTM_GETMCFONT', - '%DTM_GETMONTHCAL','%DTM_GETRANGE','%DTM_GETSYSTEMTIME','%DTM_SETFORMAT','%DTM_SETFORMATW','%DTM_SETMCCOLOR','%DTM_SETMCFONT','%DTM_SETRANGE', - '%DTM_SETSYSTEMTIME','%DTN_CLOSEUP','%DTN_DATETIMECHANGE','%DTN_DROPDOWN','%DTN_FORMAT','%DTN_FORMATQUERY','%DTN_FORMATQUERYW','%DTN_FORMATW', - '%DTN_USERSTRING','%DTN_USERSTRINGW','%DTN_WMKEYDOWN','%DTN_WMKEYDOWNW','%DTS_APPCANPARSE','%DTS_LONGDATEFORMAT','%DTS_RIGHTALIGN','%DTS_SHORTDATECENTURYFORMAT', - '%DTS_SHORTDATEFORMAT','%DTS_SHOWNONE','%DTS_TIMEFORMAT','%DTS_UPDOWN','%DT_DATE_CENTURY','%DT_DATE_OK','%DT_DAY_IN_YEAR','%DT_DIFF_IN_DAYS', - '%DT_DIFF_IN_HOURS','%DT_DIFF_IN_MINUTES','%DT_DIFF_IN_SECONDS','%DT_HOURS_IN_DAY','%DT_MINUTES_IN_HOUR','%DT_SECONDS_IN_DAY','%DT_SECONDS_IN_HOUR','%DT_SECONDS_IN_MINUTE', - '%DT_SECONDS_IN_YEAR','%DT_USE_LONG_FORM','%DT_USE_SHORT_FORM','%DT_WRONG_DATE','%DT_WRONG_DAY','%DT_WRONG_MONTH','%ECM_FIRST','%ECOOP_AND', - '%ECOOP_OR','%ECOOP_SET','%ECOOP_XOR','%ECO_AUTOHSCROLL','%ECO_AUTOVSCROLL','%ECO_AUTOWORDSELECTION','%ECO_NOHIDESEL','%ECO_READONLY', - '%ECO_SELECTIONBAR','%ECO_WANTRETURN','%EM_AUTOURLDETECT','%EM_CANPASTE','%EM_CANREDO','%EM_CANUNDO','%EM_CHARFROMPOS','%EM_DISPLAYBAND', - '%EM_EMPTYUNDOBUFFER','%EM_EXGETSEL','%EM_EXLIMITTEXT','%EM_EXLINEFROMCHAR','%EM_EXSETSEL','%EM_FINDTEXT','%EM_FINDTEXTEX','%EM_FINDWORDBREAK', - '%EM_FMTLINES','%EM_FORMATRANGE','%EM_GETAUTOURLDETECT','%EM_GETCHARFORMAT','%EM_GETEDITSTYLE','%EM_GETEVENTMASK','%EM_GETFIRSTVISIBLELINE','%EM_GETHANDLE', - '%EM_GETIMESTATUS','%EM_GETLIMITTEXT','%EM_GETLINE','%EM_GETLINECOUNT','%EM_GETMARGINS','%EM_GETMODIFY','%EM_GETOLEINTERFACE','%EM_GETOPTIONS', - '%EM_GETPARAFORMAT','%EM_GETPASSWORDCHAR','%EM_GETRECT','%EM_GETREDONAME','%EM_GETSCROLLPOS','%EM_GETSEL','%EM_GETSELTEXT','%EM_GETTEXTMODE', - '%EM_GETTEXTRANGE','%EM_GETTHUMB','%EM_GETUNDONAME','%EM_GETWORDBREAKPROC','%EM_GETWORDBREAKPROCEX','%EM_HIDESELECTION','%EM_LIMITTEXT','%EM_LINEFROMCHAR', - '%EM_LINEINDEX','%EM_LINELENGTH','%EM_LINESCROLL','%EM_PASTESPECIAL','%EM_POSFROMCHAR','%EM_REDO','%EM_REPLACESEL','%EM_REQUESTRESIZE', - '%EM_SCROLL','%EM_SCROLLCARET','%EM_SELECTIONTYPE','%EM_SETBKGNDCOLOR','%EM_SETCHARFORMAT','%EM_SETEDITSTYLE','%EM_SETEVENTMASK','%EM_SETHANDLE', - '%EM_SETIMESTATUS','%EM_SETLIMITTEXT','%EM_SETMARGINS','%EM_SETMODIFY','%EM_SETOLECALLBACK','%EM_SETOPTIONS','%EM_SETPARAFORMAT','%EM_SETPASSWORDCHAR', - '%EM_SETREADONLY','%EM_SETRECT','%EM_SETRECTNP','%EM_SETSCROLLPOS','%EM_SETSEL','%EM_SETTABSTOPS','%EM_SETTARGETDEVICE','%EM_SETTEXTMODE', - '%EM_SETUNDOLIMIT','%EM_SETWORDBREAKPROC','%EM_SETWORDBREAKPROCEX','%EM_SETWORDWRAPMODE','%EM_SETZOOM','%EM_STOPGROUPTYPING','%EM_STREAMIN','%EM_STREAMOUT', - '%EM_UNDO','%ENM_CHANGE','%ENM_CORRECTTEXT','%ENM_DRAGDROPDONE','%ENM_DROPFILES','%ENM_KEYEVENTS','%ENM_MOUSEEVENTS','%ENM_NONE', - '%ENM_PARAGRAPHEXPANDED','%ENM_PROTECTED','%ENM_REQUESTRESIZE','%ENM_SCROLL','%ENM_SCROLLEVENTS','%ENM_SELCHANGE','%ENM_UPDATE','%EN_CHANGE', - '%EN_MSGFILTER','%EN_SELCHANGE','%EN_UPDATE','%ES_AUTOHSCROLL','%ES_AUTOVSCROLL','%ES_CENTER','%ES_DISABLENOSCROLL','%ES_EX_NOCALLOLEINIT', - '%ES_LEFT','%ES_LOWERCASE','%ES_MULTILINE','%ES_NOHIDESEL','%ES_NOOLEDRAGDROP','%ES_NUMBER','%ES_OEMCONVERT','%ES_PASSWORD', - '%ES_READONLY','%ES_RIGHT','%ES_SAVESEL','%ES_SELECTIONBAR','%ES_SUNKEN','%ES_UPPERCASE','%ES_WANTRETURN','%EVAL_EXEC_STRING', - '%FALSE','%FILE_ADDPATH','%FILE_ARCHIVE','%FILE_BUILDVERSION','%FILE_HIDDEN','%FILE_MAJORVERSION','%FILE_MINORVERSION','%FILE_NORMAL', - '%FILE_READONLY','%FILE_REVISIONVERSION','%FILE_SUBDIR','%FILE_SYSTEM','%FILE_VLABEL','%FTP_GET_CONNECT_STATUS','%FTP_GET_FILE_BYTES_RCVD','%FTP_GET_FILE_BYTES_SENT', - '%FTP_GET_LAST_RESPONSE','%FTP_GET_LOCAL_IP','%FTP_GET_SERVER_IP','%FTP_GET_TOTAL_BYTES_RCVD','%FTP_GET_TOTAL_BYTES_SENT','%FTP_LIST_FULLLIST','%FTP_LIST_FULLLISTDIR','%FTP_LIST_FULLLISTFILE', - '%FTP_SET_ASYNC','%FTP_SET_CONNECT_WAIT','%FTP_SET_MAX_LISTEN_WAIT','%FTP_SET_MAX_RESPONSE_WAIT','%FTP_SET_PASSIVE','%FTP_SET_SYNC','%FW_BLACK','%FW_BOLD', - '%FW_DEMIBOLD','%FW_DONTCARE','%FW_EXTRABOLD','%FW_EXTRALIGHT','%FW_HEAVY','%FW_LIGHT','%FW_MEDIUM','%FW_NORMAL', - '%FW_REGULAR','%FW_SEMIBOLD','%FW_THIN','%FW_ULTRABOLD','%FW_ULTRALIGHT','%GDTR_MAX','%GDTR_MIN','%GLU_AUTO_LOAD_MATRIX', - '%GLU_BEGIN','%GLU_CCW','%GLU_CULLING','%GLU_CW','%GLU_DISPLAY_MODE','%GLU_DOMAIN_DISTANCE','%GLU_EDGE_FLAG','%GLU_END', - '%GLU_ERROR','%GLU_EXTENSIONS','%GLU_EXTERIOR','%GLU_FALSE','%GLU_FILL','%GLU_FLAT','%GLU_INCOMPATIBLE_GL_VERSION','%GLU_INSIDE', - '%GLU_INTERIOR','%GLU_INVALID_ENUM','%GLU_INVALID_VALUE','%GLU_LINE','%GLU_MAP1_TRIM_2','%GLU_MAP1_TRIM_3','%GLU_NONE','%GLU_NURBS_ERROR1', - '%GLU_NURBS_ERROR10','%GLU_NURBS_ERROR11','%GLU_NURBS_ERROR12','%GLU_NURBS_ERROR13','%GLU_NURBS_ERROR14','%GLU_NURBS_ERROR15','%GLU_NURBS_ERROR16','%GLU_NURBS_ERROR17', - '%GLU_NURBS_ERROR18','%GLU_NURBS_ERROR19','%GLU_NURBS_ERROR2','%GLU_NURBS_ERROR20','%GLU_NURBS_ERROR21','%GLU_NURBS_ERROR22','%GLU_NURBS_ERROR23','%GLU_NURBS_ERROR24', - '%GLU_NURBS_ERROR25','%GLU_NURBS_ERROR26','%GLU_NURBS_ERROR27','%GLU_NURBS_ERROR28','%GLU_NURBS_ERROR29','%GLU_NURBS_ERROR3','%GLU_NURBS_ERROR30','%GLU_NURBS_ERROR31', - '%GLU_NURBS_ERROR32','%GLU_NURBS_ERROR33','%GLU_NURBS_ERROR34','%GLU_NURBS_ERROR35','%GLU_NURBS_ERROR36','%GLU_NURBS_ERROR37','%GLU_NURBS_ERROR4','%GLU_NURBS_ERROR5', - '%GLU_NURBS_ERROR6','%GLU_NURBS_ERROR7','%GLU_NURBS_ERROR8','%GLU_NURBS_ERROR9','%GLU_OUTLINE_PATCH','%GLU_OUTLINE_POLYGON','%GLU_OUTSIDE','%GLU_OUT_OF_MEMORY', - '%GLU_PARAMETRIC_ERROR','%GLU_PARAMETRIC_TOLERANCE','%GLU_PATH_LENGTH','%GLU_POINT','%GLU_SAMPLING_METHOD','%GLU_SAMPLING_TOLERANCE','%GLU_SILHOUETTE','%GLU_SMOOTH', - '%GLU_TESS_BEGIN','%GLU_TESS_BEGIN_DATA','%GLU_TESS_BOUNDARY_ONLY','%GLU_TESS_COMBINE','%GLU_TESS_COMBINE_DATA','%GLU_TESS_COORD_TOO_LARGE','%GLU_TESS_EDGE_FLAG','%GLU_TESS_EDGE_FLAG_DATA', - '%GLU_TESS_END','%GLU_TESS_END_DATA','%GLU_TESS_ERROR','%GLU_TESS_ERROR1','%GLU_TESS_ERROR2','%GLU_TESS_ERROR3','%GLU_TESS_ERROR4','%GLU_TESS_ERROR5', - '%GLU_TESS_ERROR6','%GLU_TESS_ERROR7','%GLU_TESS_ERROR8','%GLU_TESS_ERROR_DATA','%GLU_TESS_MISSING_BEGIN_CONTOUR','%GLU_TESS_MISSING_BEGIN_POLYGON','%GLU_TESS_MISSING_END_CONTOUR','%GLU_TESS_MISSING_END_POLYGON', - '%GLU_TESS_NEED_COMBINE_CALLBACK','%GLU_TESS_TOLERANCE','%GLU_TESS_VERTEX','%GLU_TESS_VERTEX_DATA','%GLU_TESS_WINDING_ABS_GEQ_TWO','%GLU_TESS_WINDING_NEGATIVE','%GLU_TESS_WINDING_NONZERO','%GLU_TESS_WINDING_ODD', - '%GLU_TESS_WINDING_POSITIVE','%GLU_TESS_WINDING_RULE','%GLU_TRUE','%GLU_UNKNOWN','%GLU_U_STEP','%GLU_VERSION','%GLU_VERSION_1_1','%GLU_VERSION_1_2', - '%GLU_VERTEX','%GLU_V_STEP','%GL_2D','%GL_2_BYTES','%GL_3D','%GL_3D_COLOR','%GL_3D_COLOR_TEXTURE','%GL_3_BYTES', - '%GL_4D_COLOR_TEXTURE','%GL_4_BYTES','%GL_ABGR_EXT','%GL_ACCUM','%GL_ACCUM_ALPHA_BITS','%GL_ACCUM_BLUE_BITS','%GL_ACCUM_BUFFER_BIT','%GL_ACCUM_CLEAR_VALUE', - '%GL_ACCUM_GREEN_BITS','%GL_ACCUM_RED_BITS','%GL_ADD','%GL_ALL_ATTRIB_BITS','%GL_ALPHA','%GL_ALPHA12','%GL_ALPHA16','%GL_ALPHA4', - '%GL_ALPHA8','%GL_ALPHA_BIAS','%GL_ALPHA_BITS','%GL_ALPHA_SCALE','%GL_ALPHA_TEST','%GL_ALPHA_TEST_FUNC','%GL_ALPHA_TEST_REF','%GL_ALWAYS', - '%GL_AMBIENT','%GL_AMBIENT_AND_DIFFUSE','%GL_AND','%GL_AND_INVERTED','%GL_AND_REVERSE','%GL_ARRAY_ELEMENT_LOCK_COUNT_EXT','%GL_ARRAY_ELEMENT_LOCK_FIRST_EXT','%GL_ATTRIB_STACK_DEPTH', - '%GL_AUTO_NORMAL','%GL_AUX0','%GL_AUX1','%GL_AUX2','%GL_AUX3','%GL_AUX_BUFFERS','%GL_BACK','%GL_BACK_LEFT', - '%GL_BACK_RIGHT','%GL_BGRA_EXT','%GL_BGR_EXT','%GL_BITMAP','%GL_BITMAP_TOKEN','%GL_BLEND','%GL_BLEND_COLOR_EXT','%GL_BLEND_DST', - '%GL_BLEND_EQUATION_EXT','%GL_BLEND_SRC','%GL_BLUE','%GL_BLUE_BIAS','%GL_BLUE_BITS','%GL_BLUE_SCALE','%GL_BYTE','%GL_C3F_V3F', - '%GL_C4F_N3F_V3F','%GL_C4UB_V2F','%GL_C4UB_V3F','%GL_CCW','%GL_CLAMP','%GL_CLEAR','%GL_CLIENT_ALL_ATTRIB_BITS','%GL_CLIENT_ATTRIB_STACK_DEPTH', - '%GL_CLIENT_PIXEL_STORE_BIT','%GL_CLIENT_VERTEX_ARRAY_BIT','%GL_CLIP_PLANE0','%GL_CLIP_PLANE1','%GL_CLIP_PLANE2','%GL_CLIP_PLANE3','%GL_CLIP_PLANE4','%GL_CLIP_PLANE5', - '%GL_CLIP_VOLUME_CLIPPING_HINT_EXT','%GL_COEFF','%GL_COLOR','%GL_COLOR_ARRAY','%GL_COLOR_ARRAY_COUNT_EXT','%GL_COLOR_ARRAY_EXT','%GL_COLOR_ARRAY_POINTER','%GL_COLOR_ARRAY_POINTER_EXT', - '%GL_COLOR_ARRAY_SIZE','%GL_COLOR_ARRAY_SIZE_EXT','%GL_COLOR_ARRAY_STRIDE','%GL_COLOR_ARRAY_STRIDE_EXT','%GL_COLOR_ARRAY_TYPE','%GL_COLOR_ARRAY_TYPE_EXT','%GL_COLOR_BUFFER_BIT','%GL_COLOR_CLEAR_VALUE', - '%GL_COLOR_INDEX','%GL_COLOR_INDEX12_EXT','%GL_COLOR_INDEX16_EXT','%GL_COLOR_INDEX1_EXT','%GL_COLOR_INDEX2_EXT','%GL_COLOR_INDEX4_EXT','%GL_COLOR_INDEX8_EXT','%GL_COLOR_INDEXES', - '%GL_COLOR_LOGIC_OP','%GL_COLOR_MATERIAL','%GL_COLOR_MATERIAL_FACE','%GL_COLOR_MATERIAL_PARAMETER','%GL_COLOR_SUM_EXT','%GL_COLOR_TABLE_ALPHA_SIZE_EXT','%GL_COLOR_TABLE_BIAS_EXT','%GL_COLOR_TABLE_BLUE_SIZE_EXT', - '%GL_COLOR_TABLE_EXT','%GL_COLOR_TABLE_FORMAT_EXT','%GL_COLOR_TABLE_GREEN_SIZE_EXT','%GL_COLOR_TABLE_INTENSITY_SIZE_EXT','%GL_COLOR_TABLE_LUMINANCE_SIZE_EXT','%GL_COLOR_TABLE_RED_SIZE_EXT','%GL_COLOR_TABLE_SCALE_EXT','%GL_COLOR_TABLE_WIDTH_EXT', - '%GL_COLOR_WRITEMASK','%GL_COMPILE','%GL_COMPILE_AND_EXECUTE','%GL_CONSTANT_ALPHA_EXT','%GL_CONSTANT_ATTENUATION','%GL_CONSTANT_COLOR_EXT','%GL_CONVOLUTION_1D_EXT','%GL_CONVOLUTION_2D_EXT', - '%GL_CONVOLUTION_BORDER_MODE_EXT','%GL_CONVOLUTION_FILTER_BIAS_EXT','%GL_CONVOLUTION_FILTER_SCALE_EXT','%GL_CONVOLUTION_FORMAT_EXT','%GL_CONVOLUTION_HEIGHT_EXT','%GL_CONVOLUTION_WIDTH_EXT','%GL_COPY','%GL_COPY_INVERTED', - '%GL_COPY_PIXEL_TOKEN','%GL_CULL_FACE','%GL_CULL_FACE_MODE','%GL_CULL_VERTEX_EXT','%GL_CULL_VERTEX_EYE_POSITION_EXT','%GL_CULL_VERTEX_OBJECT_POSITION_EXT','%GL_CURRENT_BIT','%GL_CURRENT_COLOR', - '%GL_CURRENT_INDEX','%GL_CURRENT_NORMAL','%GL_CURRENT_RASTER_COLOR','%GL_CURRENT_RASTER_DISTANCE','%GL_CURRENT_RASTER_INDEX','%GL_CURRENT_RASTER_POSITION','%GL_CURRENT_RASTER_POSITION_VALID','%GL_CURRENT_RASTER_TEXTURE_COORDS', - '%GL_CURRENT_SECONDARY_COLOR_EXT','%GL_CURRENT_TEXTURE_COORDS','%GL_CW','%GL_DECAL','%GL_DECR','%GL_DEPTH','%GL_DEPTH_BIAS','%GL_DEPTH_BITS', - '%GL_DEPTH_BUFFER_BIT','%GL_DEPTH_CLEAR_VALUE','%GL_DEPTH_COMPONENT','%GL_DEPTH_FUNC','%GL_DEPTH_RANGE','%GL_DEPTH_SCALE','%GL_DEPTH_TEST','%GL_DEPTH_WRITEMASK', - '%GL_DIFFUSE','%GL_DITHER','%GL_DOMAIN','%GL_DONT_CARE','%GL_DOUBLE','%GL_DOUBLEBUFFER','%GL_DOUBLE_EXT','%GL_DRAW_BUFFER', - '%GL_DRAW_PIXEL_TOKEN','%GL_DST_ALPHA','%GL_DST_COLOR','%GL_EDGE_FLAG','%GL_EDGE_FLAG_ARRAY','%GL_EDGE_FLAG_ARRAY_COUNT_EXT','%GL_EDGE_FLAG_ARRAY_EXT','%GL_EDGE_FLAG_ARRAY_POINTER', - '%GL_EDGE_FLAG_ARRAY_POINTER_EXT','%GL_EDGE_FLAG_ARRAY_STRIDE','%GL_EDGE_FLAG_ARRAY_STRIDE_EXT','%GL_EMISSION','%GL_ENABLE_BIT','%GL_EQUAL','%GL_EQUIV','%GL_EVAL_BIT', - '%GL_EXP','%GL_EXP2','%GL_EXTENSIONS','%GL_EXT_ABGR','%GL_EXT_BGRA','%GL_EXT_BLEND_COLOR','%GL_EXT_BLEND_MINMAX','%GL_EXT_BLEND_SUBTRACT', - '%GL_EXT_CLIP_VOLUME_HINT','%GL_EXT_COLOR_TABLE','%GL_EXT_COMPILED_VERTEX_ARRAY','%GL_EXT_CONVOLUTION','%GL_EXT_CULL_VERTEX','%GL_EXT_HISTOGRAM','%GL_EXT_PACKED_PIXELS','%GL_EXT_PALETTED_TEXTURE', - '%GL_EXT_POLYGON_OFFSET','%GL_EXT_SECONDARY_COLOR','%GL_EXT_SEPARATE_SPECULAR_COLOR','%GL_EXT_VERTEX_ARRAY','%GL_EYE_LINEAR','%GL_EYE_PLANE','%GL_FALSE','%GL_FASTEST', - '%GL_FEEDBACK','%GL_FEEDBACK_BUFFER_POINTER','%GL_FEEDBACK_BUFFER_SIZE','%GL_FEEDBACK_BUFFER_TYPE','%GL_FILL','%GL_FLAT','%GL_FLOAT','%GL_FOG', - '%GL_FOG_BIT','%GL_FOG_COLOR','%GL_FOG_DENSITY','%GL_FOG_END','%GL_FOG_HINT','%GL_FOG_INDEX','%GL_FOG_MODE','%GL_FOG_START', - '%GL_FRONT','%GL_FRONT_AND_BACK','%GL_FRONT_FACE','%GL_FRONT_LEFT','%GL_FRONT_RIGHT','%GL_FUNC_ADD_EXT','%GL_FUNC_REVERSE_SUBTRACT_EXT','%GL_FUNC_SUBTRACT_EXT', - '%GL_GEQUAL','%GL_GREATER','%GL_GREEN','%GL_GREEN_BIAS','%GL_GREEN_BITS','%GL_GREEN_SCALE','%GL_HINT_BIT','%GL_HISTOGRAM_ALPHA_SIZE_EXT', - '%GL_HISTOGRAM_BLUE_SIZE_EXT','%GL_HISTOGRAM_EXT','%GL_HISTOGRAM_FORMAT_EXT','%GL_HISTOGRAM_GREEN_SIZE_EXT','%GL_HISTOGRAM_LUMINANCE_SIZE_EXT','%GL_HISTOGRAM_RED_SIZE_EXT','%GL_HISTOGRAM_SINK_EXT','%GL_HISTOGRAM_WIDTH_EXT', - '%GL_INCR','%GL_INDEX_ARRAY','%GL_INDEX_ARRAY_COUNT_EXT','%GL_INDEX_ARRAY_EXT','%GL_INDEX_ARRAY_POINTER','%GL_INDEX_ARRAY_POINTER_EXT','%GL_INDEX_ARRAY_STRIDE','%GL_INDEX_ARRAY_STRIDE_EXT', - '%GL_INDEX_ARRAY_TYPE','%GL_INDEX_ARRAY_TYPE_EXT','%GL_INDEX_BITS','%GL_INDEX_CLEAR_VALUE','%GL_INDEX_LOGIC_OP','%GL_INDEX_MODE','%GL_INDEX_OFFSET','%GL_INDEX_SHIFT', - '%GL_INDEX_WRITEMASK','%GL_INT','%GL_INTENSITY','%GL_INTENSITY12','%GL_INTENSITY16','%GL_INTENSITY4','%GL_INTENSITY8','%GL_INVALID_ENUM', - '%GL_INVALID_OPERATION','%GL_INVALID_VALUE','%GL_INVERT','%GL_KEEP','%GL_LEFT','%GL_LEQUAL','%GL_LESS','%GL_LIGHT0', - '%GL_LIGHT1','%GL_LIGHT2','%GL_LIGHT3','%GL_LIGHT4','%GL_LIGHT5','%GL_LIGHT6','%GL_LIGHT7','%GL_LIGHTING', - '%GL_LIGHTING_BIT','%GL_LIGHT_MODEL_AMBIENT','%GL_LIGHT_MODEL_COLOR_CONTROL_EXT','%GL_LIGHT_MODEL_LOCAL_VIEWER','%GL_LIGHT_MODEL_TWO_SIDE','%GL_LINE','%GL_LINEAR','%GL_LINEAR_ATTENUATION', - '%GL_LINEAR_MIPMAP_LINEAR','%GL_LINEAR_MIPMAP_NEAREST','%GL_LINES','%GL_LINE_BIT','%GL_LINE_LOOP','%GL_LINE_RESET_TOKEN','%GL_LINE_SMOOTH','%GL_LINE_SMOOTH_HINT', - '%GL_LINE_STIPPLE','%GL_LINE_STIPPLE_PATTERN','%GL_LINE_STIPPLE_REPEAT','%GL_LINE_STRIP','%GL_LINE_TOKEN','%GL_LINE_WIDTH','%GL_LINE_WIDTH_GRANULARITY','%GL_LINE_WIDTH_RANGE', - '%GL_LIST_BASE','%GL_LIST_BIT','%GL_LIST_INDEX','%GL_LIST_MODE','%GL_LOAD','%GL_LOGIC_OP','%GL_LOGIC_OP_MODE','%GL_LUMINANCE', - '%GL_LUMINANCE12','%GL_LUMINANCE12_ALPHA12','%GL_LUMINANCE12_ALPHA4','%GL_LUMINANCE16','%GL_LUMINANCE16_ALPHA16','%GL_LUMINANCE4','%GL_LUMINANCE4_ALPHA4','%GL_LUMINANCE6_ALPHA2', - '%GL_LUMINANCE8','%GL_LUMINANCE8_ALPHA8','%GL_LUMINANCE_ALPHA','%GL_MAP1_COLOR_4','%GL_MAP1_GRID_DOMAIN','%GL_MAP1_GRID_SEGMENTS','%GL_MAP1_INDEX','%GL_MAP1_NORMAL', - '%GL_MAP1_TEXTURE_COORD_1','%GL_MAP1_TEXTURE_COORD_2','%GL_MAP1_TEXTURE_COORD_3','%GL_MAP1_TEXTURE_COORD_4','%GL_MAP1_VERTEX_3','%GL_MAP1_VERTEX_4','%GL_MAP2_COLOR_4','%GL_MAP2_GRID_DOMAIN', - '%GL_MAP2_GRID_SEGMENTS','%GL_MAP2_INDEX','%GL_MAP2_NORMAL','%GL_MAP2_TEXTURE_COORD_1','%GL_MAP2_TEXTURE_COORD_2','%GL_MAP2_TEXTURE_COORD_3','%GL_MAP2_TEXTURE_COORD_4','%GL_MAP2_VERTEX_3', - '%GL_MAP2_VERTEX_4','%GL_MAP_COLOR','%GL_MAP_STENCIL','%GL_MATRIX_MODE','%GL_MAX_ATTRIB_STACK_DEPTH','%GL_MAX_CLIENT_ATTRIB_STACK_DEPTH','%GL_MAX_CLIP_PLANES','%GL_MAX_CONVOLUTION_HEIGHT_EXT', - '%GL_MAX_CONVOLUTION_WIDTH_EXT','%GL_MAX_EVAL_ORDER','%GL_MAX_EXT','%GL_MAX_LIGHTS','%GL_MAX_LIST_NESTING','%GL_MAX_MODELVIEW_STACK_DEPTH','%GL_MAX_NAME_STACK_DEPTH','%GL_MAX_PIXEL_MAP_TABLE', - '%GL_MAX_PROJECTION_STACK_DEPTH','%GL_MAX_TEXTURE_SIZE','%GL_MAX_TEXTURE_STACK_DEPTH','%GL_MAX_VIEWPORT_DIMS','%GL_MINMAX_EXT','%GL_MINMAX_FORMAT_EXT','%GL_MINMAX_SINK_EXT','%GL_MIN_EXT', - '%GL_MODELVIEW','%GL_MODELVIEW_MATRIX','%GL_MODELVIEW_STACK_DEPTH','%GL_MODULATE','%GL_MULT','%GL_N3F_V3F','%GL_NAME_STACK_DEPTH','%GL_NAND', - '%GL_NEAREST','%GL_NEAREST_MIPMAP_LINEAR','%GL_NEAREST_MIPMAP_NEAREST','%GL_NEVER','%GL_NICEST','%GL_NONE','%GL_NOOP','%GL_NOR', - '%GL_NORMALIZE','%GL_NORMAL_ARRAY','%GL_NORMAL_ARRAY_COUNT_EXT','%GL_NORMAL_ARRAY_EXT','%GL_NORMAL_ARRAY_POINTER','%GL_NORMAL_ARRAY_POINTER_EXT','%GL_NORMAL_ARRAY_STRIDE','%GL_NORMAL_ARRAY_STRIDE_EXT', - '%GL_NORMAL_ARRAY_TYPE','%GL_NORMAL_ARRAY_TYPE_EXT','%GL_NOTEQUAL','%GL_NO_ERROR','%GL_OBJECT_LINEAR','%GL_OBJECT_PLANE','%GL_ONE','%GL_ONE_MINUS_CONSTANT_ALPHA_EXT', - '%GL_ONE_MINUS_CONSTANT_COLOR_EXT','%GL_ONE_MINUS_DST_ALPHA','%GL_ONE_MINUS_DST_COLOR','%GL_ONE_MINUS_SRC_ALPHA','%GL_ONE_MINUS_SRC_COLOR','%GL_OR','%GL_ORDER','%GL_OR_INVERTED', - '%GL_OR_REVERSE','%GL_OUT_OF_MEMORY','%GL_PACK_ALIGNMENT','%GL_PACK_LSB_FIRST','%GL_PACK_ROW_LENGTH','%GL_PACK_SKIP_PIXELS','%GL_PACK_SKIP_ROWS','%GL_PACK_SWAP_BYTES', - '%GL_PASS_THROUGH_TOKEN','%GL_PERSPECTIVE_CORRECTION_HINT','%GL_PIXEL_MAP_A_TO_A','%GL_PIXEL_MAP_A_TO_A_SIZE','%GL_PIXEL_MAP_B_TO_B','%GL_PIXEL_MAP_B_TO_B_SIZE','%GL_PIXEL_MAP_G_TO_G','%GL_PIXEL_MAP_G_TO_G_SIZE', - '%GL_PIXEL_MAP_I_TO_A','%GL_PIXEL_MAP_I_TO_A_SIZE','%GL_PIXEL_MAP_I_TO_B','%GL_PIXEL_MAP_I_TO_B_SIZE','%GL_PIXEL_MAP_I_TO_G','%GL_PIXEL_MAP_I_TO_G_SIZE','%GL_PIXEL_MAP_I_TO_I','%GL_PIXEL_MAP_I_TO_I_SIZE', - '%GL_PIXEL_MAP_I_TO_R','%GL_PIXEL_MAP_I_TO_R_SIZE','%GL_PIXEL_MAP_R_TO_R','%GL_PIXEL_MAP_R_TO_R_SIZE','%GL_PIXEL_MAP_S_TO_S','%GL_PIXEL_MAP_S_TO_S_SIZE','%GL_PIXEL_MODE_BIT','%GL_POINT', - '%GL_POINTS','%GL_POINT_BIT','%GL_POINT_SIZE','%GL_POINT_SIZE_GRANULARITY','%GL_POINT_SIZE_RANGE','%GL_POINT_SMOOTH','%GL_POINT_SMOOTH_HINT','%GL_POINT_TOKEN', - '%GL_POLYGON','%GL_POLYGON_BIT','%GL_POLYGON_MODE','%GL_POLYGON_OFFSET_BIAS_EXT','%GL_POLYGON_OFFSET_EXT','%GL_POLYGON_OFFSET_FACTOR','%GL_POLYGON_OFFSET_FACTOR_EXT','%GL_POLYGON_OFFSET_FILL', - '%GL_POLYGON_OFFSET_LINE','%GL_POLYGON_OFFSET_POINT','%GL_POLYGON_OFFSET_UNITS','%GL_POLYGON_SMOOTH','%GL_POLYGON_SMOOTH_HINT','%GL_POLYGON_STIPPLE','%GL_POLYGON_STIPPLE_BIT','%GL_POLYGON_TOKEN', - '%GL_POSITION','%GL_POST_COLOR_MATRIX_COLOR_TABLE_EXT','%GL_POST_CONVOLUTION_ALPHA_BIAS_EXT','%GL_POST_CONVOLUTION_ALPHA_SCALE_EXT','%GL_POST_CONVOLUTION_BLUE_BIAS_EXT','%GL_POST_CONVOLUTION_BLUE_SCALE_EXT','%GL_POST_CONVOLUTION_COLOR_TABLE_EXT','%GL_POST_CONVOLUTION_GREEN_BIAS_EXT', - '%GL_POST_CONVOLUTION_GREEN_SCALE_EXT','%GL_POST_CONVOLUTION_RED_BIAS_EXT','%GL_POST_CONVOLUTION_RED_SCALE_EXT','%GL_PROJECTION','%GL_PROJECTION_MATRIX','%GL_PROJECTION_STACK_DEPTH','%GL_PROXY_COLOR_TABLE_EXT','%GL_PROXY_HISTOGRAM_EXT', - '%GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_EXT','%GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_EXT','%GL_PROXY_TEXTURE_1D','%GL_PROXY_TEXTURE_2D','%GL_Q','%GL_QUADRATIC_ATTENUATION','%GL_QUADS','%GL_QUAD_STRIP', - '%GL_R','%GL_R3_G3_B2','%GL_READ_BUFFER','%GL_RED','%GL_REDUCE_EXT','%GL_RED_BIAS','%GL_RED_BITS','%GL_RED_SCALE', - '%GL_RENDER','%GL_RENDERER','%GL_RENDER_MODE','%GL_REPEAT','%GL_REPLACE','%GL_RETURN','%GL_RGB','%GL_RGB10', - '%GL_RGB10_A2','%GL_RGB12','%GL_RGB16','%GL_RGB4','%GL_RGB5','%GL_RGB5_A1','%GL_RGB8','%GL_RGBA', - '%GL_RGBA12','%GL_RGBA16','%GL_RGBA2','%GL_RGBA4','%GL_RGBA8','%GL_RGBA_MODE','%GL_RIGHT','%GL_S', - '%GL_SCISSOR_BIT','%GL_SCISSOR_BOX','%GL_SCISSOR_TEST','%GL_SECONDARY_COLOR_ARRAY_EXT','%GL_SECONDARY_COLOR_ARRAY_POINTER_EXT','%GL_SECONDARY_COLOR_ARRAY_SIZE_EXT','%GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT','%GL_SECONDARY_COLOR_ARRAY_TYPE_EXT', - '%GL_SELECT','%GL_SELECTION_BUFFER_POINTER','%GL_SELECTION_BUFFER_SIZE','%GL_SEPARABLE_2D_EXT','%GL_SEPARATE_SPECULAR_COLOR_EXT','%GL_SET','%GL_SHADE_MODEL','%GL_SHININESS', - '%GL_SHORT','%GL_SINGLE_COLOR_EXT','%GL_SMOOTH','%GL_SPECULAR','%GL_SPHERE_MAP','%GL_SPOT_CUTOFF','%GL_SPOT_DIRECTION','%GL_SPOT_EXPONENT', - '%GL_SRC_ALPHA','%GL_SRC_ALPHA_SATURATE','%GL_SRC_COLOR','%GL_STACK_OVERFLOW','%GL_STACK_UNDERFLOW','%GL_STENCIL','%GL_STENCIL_BITS','%GL_STENCIL_BUFFER_BIT', - '%GL_STENCIL_CLEAR_VALUE','%GL_STENCIL_FAIL','%GL_STENCIL_FUNC','%GL_STENCIL_INDEX','%GL_STENCIL_PASS_DEPTH_FAIL','%GL_STENCIL_PASS_DEPTH_PASS','%GL_STENCIL_REF','%GL_STENCIL_TEST', - '%GL_STENCIL_VALUE_MASK','%GL_STENCIL_WRITEMASK','%GL_STEREO','%GL_SUBPIXEL_BITS','%GL_T','%GL_T2F_C3F_V3F','%GL_T2F_C4F_N3F_V3F','%GL_T2F_C4UB_V3F', - '%GL_T2F_N3F_V3F','%GL_T2F_V3F','%GL_T4F_C4F_N3F_V4F','%GL_T4F_V4F','%GL_TABLE_TOO_LARGE_EXT','%GL_TEXTURE','%GL_TEXTURE_1D','%GL_TEXTURE_2D', - '%GL_TEXTURE_ALPHA_SIZE','%GL_TEXTURE_BINDING_1D','%GL_TEXTURE_BINDING_2D','%GL_TEXTURE_BIT','%GL_TEXTURE_BLUE_SIZE','%GL_TEXTURE_BORDER','%GL_TEXTURE_BORDER_COLOR','%GL_TEXTURE_COMPONENTS', - '%GL_TEXTURE_COORD_ARRAY','%GL_TEXTURE_COORD_ARRAY_COUNT_EXT','%GL_TEXTURE_COORD_ARRAY_EXT','%GL_TEXTURE_COORD_ARRAY_POINTER','%GL_TEXTURE_COORD_ARRAY_POINTER_EXT','%GL_TEXTURE_COORD_ARRAY_SIZE','%GL_TEXTURE_COORD_ARRAY_SIZE_EXT','%GL_TEXTURE_COORD_ARRAY_STRIDE', - '%GL_TEXTURE_COORD_ARRAY_STRIDE_EXT','%GL_TEXTURE_COORD_ARRAY_TYPE','%GL_TEXTURE_COORD_ARRAY_TYPE_EXT','%GL_TEXTURE_ENV','%GL_TEXTURE_ENV_COLOR','%GL_TEXTURE_ENV_MODE','%GL_TEXTURE_GEN_MODE','%GL_TEXTURE_GEN_Q', - '%GL_TEXTURE_GEN_R','%GL_TEXTURE_GEN_S','%GL_TEXTURE_GEN_T','%GL_TEXTURE_GREEN_SIZE','%GL_TEXTURE_HEIGHT','%GL_TEXTURE_INTENSITY_SIZE','%GL_TEXTURE_INTERNAL_FORMAT','%GL_TEXTURE_LUMINANCE_SIZE', - '%GL_TEXTURE_MAG_FILTER','%GL_TEXTURE_MATRIX','%GL_TEXTURE_MIN_FILTER','%GL_TEXTURE_PRIORITY','%GL_TEXTURE_RED_SIZE','%GL_TEXTURE_RESIDENT','%GL_TEXTURE_STACK_DEPTH','%GL_TEXTURE_WIDTH', - '%GL_TEXTURE_WRAP_S','%GL_TEXTURE_WRAP_T','%GL_TRANSFORM_BIT','%GL_TRIANGLES','%GL_TRIANGLE_FAN','%GL_TRIANGLE_STRIP','%GL_TRUE','%GL_UNPACK_ALIGNMENT', - '%GL_UNPACK_LSB_FIRST','%GL_UNPACK_ROW_LENGTH','%GL_UNPACK_SKIP_PIXELS','%GL_UNPACK_SKIP_ROWS','%GL_UNPACK_SWAP_BYTES','%GL_UNSIGNED_BYTE','%GL_UNSIGNED_BYTE_3_3_2_EXT','%GL_UNSIGNED_INT', - '%GL_UNSIGNED_INT_10_10_10_2_EXT','%GL_UNSIGNED_INT_8_8_8_8_EXT','%GL_UNSIGNED_SHORT','%GL_UNSIGNED_SHORT_4_4_4_4_EXT','%GL_UNSIGNED_SHORT_5_5_5_1_EXT','%GL_V2F','%GL_V3F','%GL_VENDOR', - '%GL_VERSION','%GL_VERSION_1_1','%GL_VERTEX_ARRAY','%GL_VERTEX_ARRAY_COUNT_EXT','%GL_VERTEX_ARRAY_EXT','%GL_VERTEX_ARRAY_POINTER','%GL_VERTEX_ARRAY_POINTER_EXT','%GL_VERTEX_ARRAY_SIZE', - '%GL_VERTEX_ARRAY_SIZE_EXT','%GL_VERTEX_ARRAY_STRIDE','%GL_VERTEX_ARRAY_STRIDE_EXT','%GL_VERTEX_ARRAY_TYPE','%GL_VERTEX_ARRAY_TYPE_EXT','%GL_VIEWPORT','%GL_VIEWPORT_BIT','%GL_WIN_SWAP_HINT', - '%GL_XOR','%GL_ZERO','%GL_ZOOM_X','%GL_ZOOM_Y','%GRAY','%GREEN','%GWLP_HINSTANCE','%GWLP_HWNDPARENT', - '%GWLP_ID','%GWLP_USERDATA','%GWLP_WNDPROC','%GWL_EXSTYLE','%GWL_HINSTANCE','%GWL_HWNDPARENT','%GWL_ID','%GWL_STYLE', - '%GWL_USERDATA','%GWL_WNDPROC','%HDM_FIRST','%HTCAPTION','%HWND_BOTTOM','%HWND_DESKTOP','%HWND_MESSAGE','%HWND_NOTOPMOST', - '%HWND_TOP','%HWND_TOPMOST','%ICRYPTO_XOR_DECREASE','%ICRYPTO_XOR_INCREASE','%ICRYPTO_XOR_NORMAL','%IDABORT','%IDCANCEL','%IDCONTINUE', - '%IDIGNORE','%IDNO','%IDOK','%IDRETRY','%IDTIMEOUT','%IDTRYAGAIN','%IDYES','%INTERNET_CONNECTION_CONFIGURED', - '%INTERNET_CONNECTION_LAN','%INTERNET_CONNECTION_MODEM','%INTERNET_CONNECTION_MODEM_BUSY','%INTERNET_CONNECTION_OFFLINE','%INTERNET_CONNECTION_PROXY','%INTERNET_RAS_INSTALLED','%LBN_DBLCLK','%LBN_KILLFOCUS', - '%LBN_SELCANCEL','%LBN_SELCHANGE','%LBN_SETFOCUS','%LBS_DISABLENOSCROLL','%LBS_EXTENDEDSEL','%LBS_MULTICOLUMN','%LBS_MULTIPLESEL','%LBS_NOINTEGRALHEIGHT', - '%LBS_NOSEL','%LBS_NOTIFY','%LBS_SORT','%LBS_STANDARD','%LBS_USETABSTOPS','%LB_ADDFILE','%LB_ADDSTRING','%LB_DELETESTRING', - '%LB_DIR','%LB_FINDSTRING','%LB_FINDSTRINGEXACT','%LB_GETANCHORINDEX','%LB_GETCARETINDEX','%LB_GETCOUNT','%LB_GETCURSEL','%LB_GETHORIZONTALEXTENT', - '%LB_GETITEMDATA','%LB_GETITEMHEIGHT','%LB_GETITEMRECT','%LB_GETLISTBOXINFO','%LB_GETLOCALE','%LB_GETSEL','%LB_GETSELCOUNT','%LB_GETSELITEMS', - '%LB_GETTEXT','%LB_GETTEXTLEN','%LB_GETTOPINDEX','%LB_INITSTORAGE','%LB_INSERTSTRING','%LB_ITEMFROMPOINT','%LB_MULTIPLEADDSTRING','%LB_RESETCONTENT', - '%LB_SELECTSTRING','%LB_SELITEMRANGE','%LB_SELITEMRANGEEX','%LB_SETANCHORINDEX','%LB_SETCARETINDEX','%LB_SETCOLUMNWIDTH','%LB_SETCOUNT','%LB_SETCURSEL', - '%LB_SETHORIZONTALEXTENT','%LB_SETITEMDATA','%LB_SETITEMHEIGHT','%LB_SETLOCALE','%LB_SETSEL','%LB_SETTABSTOPS','%LB_SETTOPINDEX','%LF_FACESIZE', - '%LTGRAY','%LVM_FIRST','%LWA_ALPHA','%LWA_COLORKEY','%MAGENTA','%MAXBYTE','%MAXCHAR','%MAXDWORD', - '%MAXSHORT','%MAXWORD','%MAX_PATH','%MB_ABORTRETRYIGNORE','%MB_APPLMODAL','%MB_CANCELTRYCONTINUE','%MB_DEFBUTTON1','%MB_DEFBUTTON2', - '%MB_DEFBUTTON3','%MB_HELP','%MB_ICONASTERISK','%MB_ICONERROR','%MB_ICONEXCLAMATION','%MB_ICONHAND','%MB_ICONINFORMATION','%MB_ICONQUESTION', - '%MB_ICONSTOP','%MB_ICONWARNING','%MB_OK','%MB_OKCANCEL','%MB_RETRYCANCEL','%MB_SIMPLE','%MB_SYSTEMMODAL','%MB_TOPMOST', - '%MB_YESNO','%MB_YESNOCANCEL','%MF_CHECKED','%MF_DISABLED','%MF_ENABLED','%MF_GRAYED','%MF_SEPARATOR','%MF_UNCHECKED', - '%MINCHAR','%MINLONG','%MINSHORT','%NULL','%ODBC352_INC','%ODBCVER','%ODBC_ADD_DSN','%ODBC_ADD_SYS_DSN', - '%ODBC_BOTH_DSN','%ODBC_CONFIG_DRIVER','%ODBC_CONFIG_DRIVER_MAX','%ODBC_CONFIG_DSN','%ODBC_CONFIG_SYS_DSN','%ODBC_DRIVER_VERSION','%ODBC_ERROR_COMPONENT_NOT_FOUND','%ODBC_ERROR_CREATE_DSN_FAILED', - '%ODBC_ERROR_GENERAL_ERR','%ODBC_ERROR_INVALID_BUFF_LEN','%ODBC_ERROR_INVALID_DSN','%ODBC_ERROR_INVALID_HWND','%ODBC_ERROR_INVALID_INF','%ODBC_ERROR_INVALID_KEYWORD_VALUE','%ODBC_ERROR_INVALID_LOG_FILE','%ODBC_ERROR_INVALID_NAME', - '%ODBC_ERROR_INVALID_PARAM_SEQUENCE','%ODBC_ERROR_INVALID_PATH','%ODBC_ERROR_INVALID_REQUEST_TYPE','%ODBC_ERROR_INVALID_STR','%ODBC_ERROR_LOAD_LIB_FAILED','%ODBC_ERROR_OUTPUT_STRING_TRUNCATED','%ODBC_ERROR_OUT_OF_MEM','%ODBC_ERROR_REMOVE_DSN_FAILED', - '%ODBC_ERROR_REQUEST_FAILED','%ODBC_ERROR_USAGE_UPDATE_FAILED','%ODBC_ERROR_USER_CANCELED','%ODBC_ERROR_WRITING_SYSINFO_FAILED','%ODBC_INSTALL_COMPLETE','%ODBC_INSTALL_DRIVER','%ODBC_INSTALL_INQUIRY','%ODBC_REMOVE_DEFAULT_DSN', - '%ODBC_REMOVE_DRIVER','%ODBC_REMOVE_DSN','%ODBC_REMOVE_SYS_DSN','%ODBC_SYSTEM_DSN','%ODBC_USER_DSN','%OFN_ALLOWMULTISELECT','%OFN_CREATEPROMPT','%OFN_ENABLEHOOK', - '%OFN_ENABLEINCLUDENOTIFY','%OFN_ENABLESIZING','%OFN_ENABLETEMPLATE','%OFN_ENABLETEMPLATEHANDLE','%OFN_EXPLORER','%OFN_EXTENSIONDIFFERENT','%OFN_FILEMUSTEXIST','%OFN_HIDEREADONLY', - '%OFN_LONGNAMES','%OFN_NOCHANGEDIR','%OFN_NODEREFERENCELINKS','%OFN_NOLONGNAMES','%OFN_NONETWORKBUTTON','%OFN_NOREADONLYRETURN','%OFN_NOTESTFILECREATE','%OFN_NOVALIDATE', - '%OFN_OVERWRITEPROMPT','%OFN_PATHMUSTEXIST','%OFN_READONLY','%OFN_SHAREAWARE','%OFN_SHOWHELP','%OS_ERROR_CALLFUNCTION','%OS_ERROR_EMPTYSTRING','%OS_ERROR_LOADLIBRARY', - '%OS_ERROR_SUCCESS','%OS_ERROR_WRONGPARAMETER','%OS_SHELL_ASYNC','%OS_SHELL_SYNC','%OS_WINDOWS_2K','%OS_WINDOWS_95','%OS_WINDOWS_95_OSR2','%OS_WINDOWS_98', - '%OS_WINDOWS_98_SE','%OS_WINDOWS_ME','%OS_WINDOWS_NT','%OS_WINDOWS_SERVER_2003','%OS_WINDOWS_SERVER_LONGHORN','%OS_WINDOWS_SERVER_LONGHORN_DC','%OS_WINDOWS_VISTA','%OS_WINDOWS_XP', - '%OS_WNDSTYLE_HIDE','%OS_WNDSTYLE_MAXIMIZED','%OS_WNDSTYLE_MINIMIZED','%OS_WNDSTYLE_MINIMIZEDNOFOCUS','%OS_WNDSTYLE_NORMAL','%OS_WNDSTYLE_NORMALNOFOCUS','%PATH_EXT','%PATH_FILE', - '%PATH_FILEEXT','%PATH_ROOT','%PATH_ROOTPATH','%PATH_ROOTPATHPROG','%PATH_ROOTPATHPROGEXT','%PBM_DELTAPOS','%PBM_GETPOS','%PBM_GETRANGE', - '%PBM_SETBARCOLOR','%PBM_SETBKCOLOR','%PBM_SETPOS','%PBM_SETRANGE','%PBM_SETRANGE32','%PBM_SETSTEP','%PBM_STEPIT','%PBS_SMOOTH', - '%PBS_VERTICAL','%PC_DISABLEWAKEEVENT_OFF','%PC_DISABLEWAKEEVENT_ON','%PC_EB_NOCONFIRMATION','%PC_EB_NOPROGRESSUI','%PC_EB_NORMAL','%PC_EB_NOSOUND','%PC_FORCECRITICAL_OFF', - '%PC_FORCECRITICAL_ON','%PC_HIBERNATE_OFF','%PC_HIBERNATE_ON','%PC_RD_FORCE','%PC_RD_FORCEIFHUNG','%PC_RD_LOGOFF','%PC_RD_POWEROFF','%PC_RD_REBOOT', - '%PC_RD_SHUTDOWN','%PC_SD_DONOT_FORCE','%PC_SD_DONOT_REBOOT','%PC_SD_FORCE','%PC_SD_REBOOT','%PFA_CENTER','%PFA_LEFT','%PFA_RIGHT', - '%PF_3DNOW_INSTRUCTIONS_AVAILABLE','%PF_CHANNELS_ENABLED','%PF_COMPARE64_EXCHANGE128','%PF_COMPARE_EXCHANGE128','%PF_COMPARE_EXCHANGE_DOUBLE','%PF_FLOATING_POINT_EMULATED','%PF_FLOATING_POINT_PRECISION_ERRATA','%PF_MMX_INSTRUCTIONS_AVAILABLE', - '%PF_NX_ENABLED','%PF_PAE_ENABLED','%PF_RDTSC_INSTRUCTION_AVAILABLE','%PF_SSE3_INSTRUCTIONS_AVAILABLE','%PF_XMMI64_INSTRUCTIONS_AVAILABLE','%PF_XMMI_INSTRUCTIONS_AVAILABLE','%PGM_FIRST','%RED', - '%RTF_UBB','%SAPI_SVSFDEFAULT','%SAPI_SVSFISFILENAME','%SAPI_SVSFISNOTXML','%SAPI_SVSFISXML','%SAPI_SVSFLAGSASYNC','%SAPI_SVSFNLPMASK','%SAPI_SVSFNLPSPEAKPUNC', - '%SAPI_SVSFPERSISTXML','%SAPI_SVSFPURGEBEFORESPEAK','%SAPI_SVSFUNUSEDFLAGS','%SAPI_SVSFVOICEMASK','%SBS_SIZEGRIP','%SB_BOTTOM','%SB_ENDSCROLL','%SB_LEFT', - '%SB_LINEDOWN','%SB_LINELEFT','%SB_LINERIGHT','%SB_LINEUP','%SB_PAGEDOWN','%SB_PAGELEFT','%SB_PAGERIGHT','%SB_PAGEUP', - '%SB_RIGHT','%SB_SETPARTS','%SB_SETTEXT','%SB_THUMBPOSITION','%SB_THUMBTRACK','%SB_TOP','%SCF_ALL','%SCF_ASSOCIATEFONT', - '%SCF_DEFAULT','%SCF_NOKBUPDATE','%SCF_SELECTION','%SCF_USEUIRULES','%SCF_WORD','%SC_CLOSE','%SC_CONTEXTHELP','%SC_HOTKEY', - '%SC_HSCROLL','%SC_KEYMENU','%SC_MAXIMIZE','%SC_MINIMIZE','%SC_MONITORPOWER','%SC_MOUSEMENU','%SC_MOVE','%SC_NEXTWINDOW', - '%SC_PREVWINDOW','%SC_RESTORE','%SC_SCREENSAVE','%SC_SIZE','%SC_TASKLIST','%SC_VSCROLL','%SERVICE_ACTIVE','%SERVICE_AUTO_START', - '%SERVICE_BOOT_START','%SERVICE_CONTINUE_PENDING','%SERVICE_DEMAND_START','%SERVICE_DISABLED','%SERVICE_DRIVER','%SERVICE_INACTIVE','%SERVICE_INFO_DISPLAY_NAME','%SERVICE_INFO_NAME', - '%SERVICE_PAUSED','%SERVICE_PAUSE_PENDING','%SERVICE_RUNNING','%SERVICE_START_PENDING','%SERVICE_STATE_ALL','%SERVICE_STOPPED','%SERVICE_STOP_PENDING','%SERVICE_SYSTEM_START', - '%SERVICE_TYPE_ALL','%SERVICE_WIN32','%SES_ALLOWBEEPS','%SES_BEEPONMAXTEXT','%SES_BIDI','%SES_EMULATE10','%SES_EMULATESYSEDIT','%SES_EXTENDBACKCOLOR', - '%SES_LOWERCASE','%SES_MAPCPS','%SES_NOIME','%SES_NOINPUTSEQUENCECHK','%SES_SCROLLONKILLFOCUS','%SES_UPPERCASE','%SES_USEAIMM','%SES_USECRLF', - '%SES_XLTCRCRLFTOCR','%SF_RTF','%SF_TEXT','%SMTP_SET_ATTACH_CONTENT_TYPE','%SMTP_SET_CONTENT_TYPE_PREFIX','%SQL_AA_FALSE','%SQL_AA_TRUE','%SQL_ACCESSIBLE_PROCEDURES', - '%SQL_ACCESSIBLE_TABLES','%SQL_ACCESS_MODE','%SQL_ACTIVE_CONNECTIONS','%SQL_ACTIVE_ENVIRONMENTS','%SQL_ACTIVE_STATEMENTS','%SQL_ADD','%SQL_AD_ADD_CONSTRAINT_DEFERRABLE','%SQL_AD_ADD_CONSTRAINT_INITIALLY_DEFERRED', - '%SQL_AD_ADD_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_AD_ADD_CONSTRAINT_NON_DEFERRABLE','%SQL_AD_ADD_DOMAIN_CONSTRAINT','%SQL_AD_ADD_DOMAIN_DEFAULT','%SQL_AD_CONSTRAINT_NAME_DEFINITION','%SQL_AD_DROP_DOMAIN_CONSTRAINT','%SQL_AD_DROP_DOMAIN_DEFAULT','%SQL_AF_ALL', - '%SQL_AF_AVG','%SQL_AF_COUNT','%SQL_AF_DISTINCT','%SQL_AF_MAX','%SQL_AF_MIN','%SQL_AF_SUM','%SQL_AGGREGATE_FUNCTIONS','%SQL_ALL_EXCEPT_LIKE', - '%SQL_ALL_TYPES','%SQL_ALTER_DOMAIN','%SQL_ALTER_TABLE','%SQL_AM_CONNECTION','%SQL_AM_NONE','%SQL_AM_STATEMENT','%SQL_API_ALL_FUNCTIONS','%SQL_API_LOADBYORDINAL', - '%SQL_API_ODBC3_ALL_FUNCTIONS','%SQL_API_ODBC3_ALL_FUNCTIONS_SIZE','%SQL_API_SQLALLOCCONNECT','%SQL_API_SQLALLOCENV','%SQL_API_SQLALLOCHANDLE','%SQL_API_SQLALLOCHANDLESTD','%SQL_API_SQLALLOCSTMT','%SQL_API_SQLBINDCOL', - '%SQL_API_SQLBINDPARAM','%SQL_API_SQLBINDPARAMETER','%SQL_API_SQLBROWSECONNECT','%SQL_API_SQLBULKOPERATIONS','%SQL_API_SQLCANCEL','%SQL_API_SQLCLOSECURSOR','%SQL_API_SQLCOLATTRIBUTE','%SQL_API_SQLCOLATTRIBUTES', - '%SQL_API_SQLCOLUMNPRIVILEGES','%SQL_API_SQLCOLUMNS','%SQL_API_SQLCONNECT','%SQL_API_SQLCOPYDESC','%SQL_API_SQLDATASOURCES','%SQL_API_SQLDESCRIBECOL','%SQL_API_SQLDESCRIBEPARAM','%SQL_API_SQLDISCONNECT', - '%SQL_API_SQLDRIVERCONNECT','%SQL_API_SQLDRIVERS','%SQL_API_SQLENDTRAN','%SQL_API_SQLERROR','%SQL_API_SQLEXECDIRECT','%SQL_API_SQLEXECUTE','%SQL_API_SQLEXTENDEDFETCH','%SQL_API_SQLFETCH', - '%SQL_API_SQLFETCHSCROLL','%SQL_API_SQLFOREIGNKEYS','%SQL_API_SQLFREECONNECT','%SQL_API_SQLFREEENV','%SQL_API_SQLFREEHANDLE','%SQL_API_SQLFREESTMT','%SQL_API_SQLGETCONNECTATTR','%SQL_API_SQLGETCONNECTOPTION', - '%SQL_API_SQLGETCURSORNAME','%SQL_API_SQLGETDATA','%SQL_API_SQLGETDESCFIELD','%SQL_API_SQLGETDESCREC','%SQL_API_SQLGETDIAGFIELD','%SQL_API_SQLGETDIAGREC','%SQL_API_SQLGETENVATTR','%SQL_API_SQLGETFUNCTIONS', - '%SQL_API_SQLGETINFO','%SQL_API_SQLGETSTMTATTR','%SQL_API_SQLGETSTMTOPTION','%SQL_API_SQLGETTYPEINFO','%SQL_API_SQLMORERESULTS','%SQL_API_SQLNATIVESQL','%SQL_API_SQLNUMPARAMS','%SQL_API_SQLNUMRESULTCOLS', - '%SQL_API_SQLPARAMDATA','%SQL_API_SQLPARAMOPTIONS','%SQL_API_SQLPREPARE','%SQL_API_SQLPRIMARYKEYS','%SQL_API_SQLPROCEDURECOLUMNS','%SQL_API_SQLPROCEDURES','%SQL_API_SQLPUTDATA','%SQL_API_SQLROWCOUNT', - '%SQL_API_SQLSETCONNECTATTR','%SQL_API_SQLSETCONNECTOPTION','%SQL_API_SQLSETCURSORNAME','%SQL_API_SQLSETDESCFIELD','%SQL_API_SQLSETDESCREC','%SQL_API_SQLSETENVATTR','%SQL_API_SQLSETPARAM','%SQL_API_SQLSETPOS', - '%SQL_API_SQLSETSCROLLOPTIONS','%SQL_API_SQLSETSTMTATTR','%SQL_API_SQLSETSTMTOPTION','%SQL_API_SQLSPECIALCOLUMNS','%SQL_API_SQLSTATISTICS','%SQL_API_SQLTABLEPRIVILEGES','%SQL_API_SQLTABLES','%SQL_API_SQLTRANSACT', - '%SQL_ARD_TYPE','%SQL_ASYNC_ENABLE','%SQL_ASYNC_ENABLE_DEFAULT','%SQL_ASYNC_ENABLE_OFF','%SQL_ASYNC_ENABLE_ON','%SQL_ASYNC_MODE','%SQL_ATTR_ACCESS_MODE','%SQL_ATTR_ANSI_APP', - '%SQL_ATTR_APP_PARAM_DESC','%SQL_ATTR_APP_ROW_DESC','%SQL_ATTR_ASYNC_ENABLE','%SQL_ATTR_AUTOCOMMIT','%SQL_ATTR_AUTO_IPD','%SQL_ATTR_CONCURRENCY','%SQL_ATTR_CONNECTION_DEAD','%SQL_ATTR_CONNECTION_POOLING', - '%SQL_ATTR_CONNECTION_TIMEOUT','%SQL_ATTR_CP_MATCH','%SQL_ATTR_CURRENT_CATALOG','%SQL_ATTR_CURSOR_SCROLLABLE','%SQL_ATTR_CURSOR_SENSITIVITY','%SQL_ATTR_CURSOR_TYPE','%SQL_ATTR_DISCONNECT_BEHAVIOR','%SQL_ATTR_ENABLE_AUTO_IPD', - '%SQL_ATTR_ENLIST_IN_DTC','%SQL_ATTR_ENLIST_IN_XA','%SQL_ATTR_FETCH_BOOKMARK_PTR','%SQL_ATTR_IMP_PARAM_DESC','%SQL_ATTR_IMP_ROW_DESC','%SQL_ATTR_KEYSET_SIZE','%SQL_ATTR_LOGIN_TIMEOUT','%SQL_ATTR_MAX_LENGTH', - '%SQL_ATTR_MAX_ROWS','%SQL_ATTR_METADATA_ID','%SQL_ATTR_NOSCAN','%SQL_ATTR_ODBC_CURSORS','%SQL_ATTR_ODBC_VERSION','%SQL_ATTR_OUTPUT_NTS','%SQL_ATTR_PACKET_SIZE','%SQL_ATTR_PARAMSET_SIZE', - '%SQL_ATTR_PARAMS_PROCESSED_PTR','%SQL_ATTR_PARAM_BIND_OFFSET_PTR','%SQL_ATTR_PARAM_BIND_TYPE','%SQL_ATTR_PARAM_OPERATION_PTR','%SQL_ATTR_PARAM_STATUS_PTR','%SQL_ATTR_QUERY_TIMEOUT','%SQL_ATTR_QUIET_MODE','%SQL_ATTR_READONLY', - '%SQL_ATTR_READWRITE_UNKNOWN','%SQL_ATTR_RETRIEVE_DATA','%SQL_ATTR_ROWS_FETCHED_PTR','%SQL_ATTR_ROW_ARRAY_SIZE','%SQL_ATTR_ROW_BIND_OFFSET_PTR','%SQL_ATTR_ROW_BIND_TYPE','%SQL_ATTR_ROW_NUMBER','%SQL_ATTR_ROW_OPERATION_PTR', - '%SQL_ATTR_ROW_STATUS_PTR','%SQL_ATTR_SIMULATE_CURSOR','%SQL_ATTR_TRACE','%SQL_ATTR_TRACEFILE','%SQL_ATTR_TRANSLATE_LIB','%SQL_ATTR_TRANSLATE_OPTION','%SQL_ATTR_TXN_ISOLATION','%SQL_ATTR_USE_BOOKMARKS', - '%SQL_ATTR_WRITE','%SQL_AT_ADD_COLUMN','%SQL_AT_ADD_COLUMN_COLLATION','%SQL_AT_ADD_COLUMN_DEFAULT','%SQL_AT_ADD_COLUMN_SINGLE','%SQL_AT_ADD_CONSTRAINT','%SQL_AT_ADD_TABLE_CONSTRAINT','%SQL_AT_CONSTRAINT_DEFERRABLE', - '%SQL_AT_CONSTRAINT_INITIALLY_DEFERRED','%SQL_AT_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_AT_CONSTRAINT_NAME_DEFINITION','%SQL_AT_CONSTRAINT_NON_DEFERRABLE','%SQL_AT_DROP_COLUMN','%SQL_AT_DROP_COLUMN_CASCADE','%SQL_AT_DROP_COLUMN_DEFAULT','%SQL_AT_DROP_COLUMN_RESTRICT', - '%SQL_AT_DROP_TABLE_CONSTRAINT_CASCADE','%SQL_AT_DROP_TABLE_CONSTRAINT_RESTRICT','%SQL_AT_SET_COLUMN_DEFAULT','%SQL_AUTOCOMMIT','%SQL_AUTOCOMMIT_DEFAULT','%SQL_AUTOCOMMIT_OFF','%SQL_AUTOCOMMIT_ON','%SQL_BATCH_ROW_COUNT', - '%SQL_BATCH_SUPPORT','%SQL_BEST_ROWID','%SQL_BIGINT','%SQL_BINARY','%SQL_BIND_BY_COLUMN','%SQL_BIND_TYPE','%SQL_BIND_TYPE_DEFAULT','%SQL_BIT', - '%SQL_BOOKMARK_PERSISTENCE','%SQL_BP_CLOSE','%SQL_BP_DELETE','%SQL_BP_DROP','%SQL_BP_OTHER_HSTMT','%SQL_BP_SCROLL','%SQL_BP_TRANSACTION','%SQL_BP_UPDATE', - '%SQL_BRC_EXPLICIT','%SQL_BRC_PROCEDURES','%SQL_BRC_ROLLED_UP','%SQL_BS_ROW_COUNT_EXPLICIT','%SQL_BS_ROW_COUNT_PROC','%SQL_BS_SELECT_EXPLICIT','%SQL_BS_SELECT_PROC','%SQL_CA1_ABSOLUTE', - '%SQL_CA1_BOOKMARK','%SQL_CA1_BULK_ADD','%SQL_CA1_BULK_DELETE_BY_BOOKMARK','%SQL_CA1_BULK_FETCH_BY_BOOKMARK','%SQL_CA1_BULK_UPDATE_BY_BOOKMARK','%SQL_CA1_LOCK_EXCLUSIVE','%SQL_CA1_LOCK_NO_CHANGE','%SQL_CA1_LOCK_UNLOCK', - '%SQL_CA1_NEXT','%SQL_CA1_POSITIONED_DELETE','%SQL_CA1_POSITIONED_UPDATE','%SQL_CA1_POS_DELETE','%SQL_CA1_POS_POSITION','%SQL_CA1_POS_REFRESH','%SQL_CA1_POS_UPDATE','%SQL_CA1_RELATIVE', - '%SQL_CA1_SELECT_FOR_UPDATE','%SQL_CA2_CRC_APPROXIMATE','%SQL_CA2_CRC_EXACT','%SQL_CA2_LOCK_CONCURRENCY','%SQL_CA2_MAX_ROWS_AFFECTS_ALL','%SQL_CA2_MAX_ROWS_CATALOG','%SQL_CA2_MAX_ROWS_DELETE','%SQL_CA2_MAX_ROWS_INSERT', - '%SQL_CA2_MAX_ROWS_SELECT','%SQL_CA2_MAX_ROWS_UPDATE','%SQL_CA2_OPT_ROWVER_CONCURRENCY','%SQL_CA2_OPT_VALUES_CONCURRENCY','%SQL_CA2_READ_ONLY_CONCURRENCY','%SQL_CA2_SENSITIVITY_ADDITIONS','%SQL_CA2_SENSITIVITY_DELETIONS','%SQL_CA2_SENSITIVITY_UPDATES', - '%SQL_CA2_SIMULATE_NON_UNIQUE','%SQL_CA2_SIMULATE_TRY_UNIQUE','%SQL_CA2_SIMULATE_UNIQUE','%SQL_CASCADE','%SQL_CATALOG_LOCATION','%SQL_CATALOG_NAME','%SQL_CATALOG_NAME_SEPARATOR','%SQL_CATALOG_TERM', - '%SQL_CATALOG_USAGE','%SQL_CA_CONSTRAINT_DEFERRABLE','%SQL_CA_CONSTRAINT_INITIALLY_DEFERRED','%SQL_CA_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_CA_CONSTRAINT_NON_DEFERRABLE','%SQL_CA_CREATE_ASSERTION','%SQL_CB_CLOSE','%SQL_CB_DELETE', - '%SQL_CB_NON_NULL','%SQL_CB_NULL','%SQL_CB_PRESERVE','%SQL_CCOL_CREATE_COLLATION','%SQL_CCS_COLLATE_CLAUSE','%SQL_CCS_CREATE_CHARACTER_SET','%SQL_CCS_LIMITED_COLLATION','%SQL_CC_CLOSE', - '%SQL_CC_DELETE','%SQL_CC_PRESERVE','%SQL_CDO_COLLATION','%SQL_CDO_CONSTRAINT','%SQL_CDO_CONSTRAINT_DEFERRABLE','%SQL_CDO_CONSTRAINT_INITIALLY_DEFERRED','%SQL_CDO_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_CDO_CONSTRAINT_NAME_DEFINITION', - '%SQL_CDO_CONSTRAINT_NON_DEFERRABLE','%SQL_CDO_CREATE_DOMAIN','%SQL_CDO_DEFAULT','%SQL_CD_FALSE','%SQL_CD_TRUE','%SQL_CHAR','%SQL_CLOSE','%SQL_CL_END', - '%SQL_CL_START','%SQL_CN_ANY','%SQL_CN_DIFFERENT','%SQL_CN_NONE','%SQL_CODE_DATE','%SQL_CODE_DAY','%SQL_CODE_DAY_TO_HOUR','%SQL_CODE_DAY_TO_MINUTE', - '%SQL_CODE_DAY_TO_SECOND','%SQL_CODE_HOUR','%SQL_CODE_HOUR_TO_MINUTE','%SQL_CODE_HOUR_TO_SECOND','%SQL_CODE_MINUTE','%SQL_CODE_MINUTE_TO_SECOND','%SQL_CODE_MONTH','%SQL_CODE_SECOND', - '%SQL_CODE_TIME','%SQL_CODE_TIMESTAMP','%SQL_CODE_YEAR','%SQL_CODE_YEAR_TO_MONTH','%SQL_COLATT_OPT_MAX','%SQL_COLATT_OPT_MIN','%SQL_COLLATION_SEQ','%SQL_COLUMN_ALIAS', - '%SQL_COLUMN_AUTO_INCREMENT','%SQL_COLUMN_CASE_SENSITIVE','%SQL_COLUMN_COUNT','%SQL_COLUMN_DISPLAY_SIZE','%SQL_COLUMN_IGNORE','%SQL_COLUMN_LABEL','%SQL_COLUMN_LENGTH','%SQL_COLUMN_MONEY', - '%SQL_COLUMN_NAME','%SQL_COLUMN_NULLABLE','%SQL_COLUMN_NUMBER_UNKNOWN','%SQL_COLUMN_OWNER_NAME','%SQL_COLUMN_PRECISION','%SQL_COLUMN_QUALIFIER_NAME','%SQL_COLUMN_SCALE','%SQL_COLUMN_SEARCHABLE', - '%SQL_COLUMN_TABLE_NAME','%SQL_COLUMN_TYPE','%SQL_COLUMN_TYPE_NAME','%SQL_COLUMN_UNSIGNED','%SQL_COLUMN_UPDATABLE','%SQL_COL_PRED_BASIC','%SQL_COL_PRED_CHAR','%SQL_COMMIT', - '%SQL_CONCAT_NULL_BEHAVIOR','%SQL_CONCURRENCY','%SQL_CONCUR_DEFAULT','%SQL_CONCUR_LOCK','%SQL_CONCUR_READ_ONLY','%SQL_CONCUR_ROWVER','%SQL_CONCUR_TIMESTAMP','%SQL_CONCUR_VALUES', - '%SQL_CONVERT_BIGINT','%SQL_CONVERT_BINARY','%SQL_CONVERT_BIT','%SQL_CONVERT_CHAR','%SQL_CONVERT_DATE','%SQL_CONVERT_DECIMAL','%SQL_CONVERT_DOUBLE','%SQL_CONVERT_FLOAT', - '%SQL_CONVERT_FUNCTIONS','%SQL_CONVERT_GUID','%SQL_CONVERT_INTEGER','%SQL_CONVERT_INTERVAL_DAY_TIME','%SQL_CONVERT_INTERVAL_YEAR_MONTH','%SQL_CONVERT_LONGVARBINARY','%SQL_CONVERT_LONGVARCHAR','%SQL_CONVERT_NUMERIC', - '%SQL_CONVERT_REAL','%SQL_CONVERT_SMALLINT','%SQL_CONVERT_TIME','%SQL_CONVERT_TIMESTAMP','%SQL_CONVERT_TINYINT','%SQL_CONVERT_VARBINARY','%SQL_CONVERT_VARCHAR','%SQL_CONVERT_WCHAR', - '%SQL_CONVERT_WLONGVARCHAR','%SQL_CONVERT_WVARCHAR','%SQL_CORRELATION_NAME','%SQL_CP_DEFAULT','%SQL_CP_MATCH_DEFAULT','%SQL_CP_OFF','%SQL_CP_ONE_PER_DRIVER','%SQL_CP_ONE_PER_HENV', - '%SQL_CP_RELAXED_MATCH','%SQL_CP_STRICT_MATCH','%SQL_CREATE_ASSERTION','%SQL_CREATE_CHARACTER_SET','%SQL_CREATE_COLLATION','%SQL_CREATE_DOMAIN','%SQL_CREATE_SCHEMA','%SQL_CREATE_TABLE', - '%SQL_CREATE_TRANSLATION','%SQL_CREATE_VIEW','%SQL_CR_CLOSE','%SQL_CR_DELETE','%SQL_CR_PRESERVE','%SQL_CS_AUTHORIZATION','%SQL_CS_CREATE_SCHEMA','%SQL_CS_DEFAULT_CHARACTER_SET', - '%SQL_CTR_CREATE_TRANSLATION','%SQL_CT_COLUMN_COLLATION','%SQL_CT_COLUMN_CONSTRAINT','%SQL_CT_COLUMN_DEFAULT','%SQL_CT_COMMIT_DELETE','%SQL_CT_COMMIT_PRESERVE','%SQL_CT_CONSTRAINT_DEFERRABLE','%SQL_CT_CONSTRAINT_INITIALLY_DEFERRED', - '%SQL_CT_CONSTRAINT_INITIALLY_IMMEDIATE','%SQL_CT_CONSTRAINT_NAME_DEFINITION','%SQL_CT_CONSTRAINT_NON_DEFERRABLE','%SQL_CT_CREATE_TABLE','%SQL_CT_GLOBAL_TEMPORARY','%SQL_CT_LOCAL_TEMPORARY','%SQL_CT_TABLE_CONSTRAINT','%SQL_CURRENT_QUALIFIER', - '%SQL_CURSOR_COMMIT_BEHAVIOR','%SQL_CURSOR_DYNAMIC','%SQL_CURSOR_FORWARD_ONLY','%SQL_CURSOR_KEYSET_DRIVEN','%SQL_CURSOR_ROLLBACK_BEHAVIOR','%SQL_CURSOR_SENSITIVITY','%SQL_CURSOR_STATIC','%SQL_CURSOR_TYPE', - '%SQL_CURSOR_TYPE_DEFAULT','%SQL_CUR_DEFAULT','%SQL_CUR_USE_DRIVER','%SQL_CUR_USE_IF_NEEDED','%SQL_CUR_USE_ODBC','%SQL_CU_DML_STATEMENTS','%SQL_CU_INDEX_DEFINITION','%SQL_CU_PRIVILEGE_DEFINITION', - '%SQL_CU_PROCEDURE_INVOCATION','%SQL_CU_TABLE_DEFINITION','%SQL_CVT_BIGINT','%SQL_CVT_BINARY','%SQL_CVT_BIT','%SQL_CVT_CHAR','%SQL_CVT_DATE','%SQL_CVT_DECIMAL', - '%SQL_CVT_DOUBLE','%SQL_CVT_FLOAT','%SQL_CVT_GUID','%SQL_CVT_INTEGER','%SQL_CVT_INTERVAL_DAY_TIME','%SQL_CVT_INTERVAL_YEAR_MONTH','%SQL_CVT_LONGVARBINARY','%SQL_CVT_LONGVARCHAR', - '%SQL_CVT_NUMERIC','%SQL_CVT_REAL','%SQL_CVT_SMALLINT','%SQL_CVT_TIME','%SQL_CVT_TIMESTAMP','%SQL_CVT_TINYINT','%SQL_CVT_VARBINARY','%SQL_CVT_VARCHAR', - '%SQL_CVT_WCHAR','%SQL_CVT_WLONGVARCHAR','%SQL_CVT_WVARCHAR','%SQL_CV_CASCADED','%SQL_CV_CHECK_OPTION','%SQL_CV_CREATE_VIEW','%SQL_CV_LOCAL','%SQL_C_BINARY', - '%SQL_C_BIT','%SQL_C_BOOKMARK','%SQL_C_CHAR','%SQL_C_DATE','%SQL_C_DEFAULT','%SQL_C_DOUBLE','%SQL_C_FLOAT','%SQL_C_GUID', - '%SQL_C_INTERVAL_DAY','%SQL_C_INTERVAL_DAY_TO_HOUR','%SQL_C_INTERVAL_DAY_TO_MINUTE','%SQL_C_INTERVAL_DAY_TO_SECOND','%SQL_C_INTERVAL_HOUR','%SQL_C_INTERVAL_HOUR_TO_MINUTE','%SQL_C_INTERVAL_HOUR_TO_SECOND','%SQL_C_INTERVAL_MINUTE', - '%SQL_C_INTERVAL_MINUTE_TO_SECOND','%SQL_C_INTERVAL_MONTH','%SQL_C_INTERVAL_SECOND','%SQL_C_INTERVAL_YEAR','%SQL_C_INTERVAL_YEAR_TO_MONTH','%SQL_C_LONG','%SQL_C_NUMERIC','%SQL_C_SBIGINT', - '%SQL_C_SHORT','%SQL_C_SLONG','%SQL_C_SSHORT','%SQL_C_STINYINT','%SQL_C_TIME','%SQL_C_TIMESTAMP','%SQL_C_TINYINT','%SQL_C_TYPE_DATE', - '%SQL_C_TYPE_TIME','%SQL_C_TYPE_TIMESTAMP','%SQL_C_UBIGINT','%SQL_C_ULONG','%SQL_C_USHORT','%SQL_C_UTINYINT','%SQL_C_VARBOOKMARK','%SQL_DATABASE_NAME', - '%SQL_DATA_AT_EXEC','%SQL_DATA_SOURCE_NAME','%SQL_DATA_SOURCE_READ_ONLY','%SQL_DATE','%SQL_DATETIME','%SQL_DATETIME_LITERALS','%SQL_DATE_LEN','%SQL_DAY', - '%SQL_DAY_TO_HOUR','%SQL_DAY_TO_MINUTE','%SQL_DAY_TO_SECOND','%SQL_DA_DROP_ASSERTION','%SQL_DBMS_NAME','%SQL_DBMS_VER','%SQL_DB_DEFAULT','%SQL_DB_DISCONNECT', - '%SQL_DB_RETURN_TO_POOL','%SQL_DCS_DROP_CHARACTER_SET','%SQL_DC_DROP_COLLATION','%SQL_DDL_INDEX','%SQL_DD_CASCADE','%SQL_DD_DROP_DOMAIN','%SQL_DD_RESTRICT','%SQL_DECIMAL', - '%SQL_DEFAULT','%SQL_DEFAULT_PARAM','%SQL_DEFAULT_TXN_ISOLATION','%SQL_DELETE','%SQL_DELETE_BY_BOOKMARK','%SQL_DESCRIBE_PARAMETER','%SQL_DESC_ALLOC_AUTO','%SQL_DESC_ALLOC_TYPE', - '%SQL_DESC_ALLOC_USER','%SQL_DESC_ARRAY_SIZE','%SQL_DESC_ARRAY_STATUS_PTR','%SQL_DESC_AUTO_UNIQUE_VALUE','%SQL_DESC_BASE_COLUMN_NAME','%SQL_DESC_BASE_TABLE_NAME','%SQL_DESC_BIND_OFFSET_PTR','%SQL_DESC_BIND_TYPE', - '%SQL_DESC_CASE_SENSITIVE','%SQL_DESC_CATALOG_NAME','%SQL_DESC_CONCISE_TYPE','%SQL_DESC_COUNT','%SQL_DESC_DATA_PTR','%SQL_DESC_DATETIME_INTERVAL_CODE','%SQL_DESC_DATETIME_INTERVAL_PRECISION','%SQL_DESC_DISPLAY_SIZE', - '%SQL_DESC_FIXED_PREC_SCALE','%SQL_DESC_INDICATOR_PTR','%SQL_DESC_LABEL','%SQL_DESC_LENGTH','%SQL_DESC_LITERAL_PREFIX','%SQL_DESC_LITERAL_SUFFIX','%SQL_DESC_LOCAL_TYPE_NAME','%SQL_DESC_MAXIMUM_SCALE', - '%SQL_DESC_MINIMUM_SCALE','%SQL_DESC_NAME','%SQL_DESC_NULLABLE','%SQL_DESC_NUM_PREC_RADIX','%SQL_DESC_OCTET_LENGTH','%SQL_DESC_OCTET_LENGTH_PTR','%SQL_DESC_PARAMETER_TYPE','%SQL_DESC_PRECISION', - '%SQL_DESC_ROWS_PROCESSED_PTR','%SQL_DESC_SCALE','%SQL_DESC_SCHEMA_NAME','%SQL_DESC_SEARCHABLE','%SQL_DESC_TABLE_NAME','%SQL_DESC_TYPE','%SQL_DESC_TYPE_NAME','%SQL_DESC_UNNAMED', - '%SQL_DESC_UNSIGNED','%SQL_DESC_UPDATABLE','%SQL_DIAG_ALTER_TABLE','%SQL_DIAG_CALL','%SQL_DIAG_CLASS_ORIGIN','%SQL_DIAG_COLUMN_NUMBER','%SQL_DIAG_CONNECTION_NAME','%SQL_DIAG_CREATE_INDEX', - '%SQL_DIAG_CREATE_TABLE','%SQL_DIAG_CREATE_VIEW','%SQL_DIAG_CURSOR_ROW_COUNT','%SQL_DIAG_DELETE_WHERE','%SQL_DIAG_DROP_INDEX','%SQL_DIAG_DROP_TABLE','%SQL_DIAG_DROP_VIEW','%SQL_DIAG_DYNAMIC_DELETE_CURSOR', - '%SQL_DIAG_DYNAMIC_FUNCTION','%SQL_DIAG_DYNAMIC_FUNCTION_CODE','%SQL_DIAG_DYNAMIC_UPDATE_CURSOR','%SQL_DIAG_GRANT','%SQL_DIAG_INSERT','%SQL_DIAG_MESSAGE_TEXT','%SQL_DIAG_NATIVE','%SQL_DIAG_NUMBER', - '%SQL_DIAG_RETURNCODE','%SQL_DIAG_REVOKE','%SQL_DIAG_ROW_COUNT','%SQL_DIAG_ROW_NUMBER','%SQL_DIAG_SELECT_CURSOR','%SQL_DIAG_SERVER_NAME','%SQL_DIAG_SQLSTATE','%SQL_DIAG_SUBCLASS_ORIGIN', - '%SQL_DIAG_UNKNOWN_STATEMENT','%SQL_DIAG_UPDATE_WHERE','%SQL_DI_CREATE_INDEX','%SQL_DI_DROP_INDEX','%SQL_DL_SQL92_DATE','%SQL_DL_SQL92_INTERVAL_DAY','%SQL_DL_SQL92_INTERVAL_DAY_TO_HOUR','%SQL_DL_SQL92_INTERVAL_DAY_TO_MINUTE', - '%SQL_DL_SQL92_INTERVAL_DAY_TO_SECOND','%SQL_DL_SQL92_INTERVAL_HOUR','%SQL_DL_SQL92_INTERVAL_HOUR_TO_MINUTE','%SQL_DL_SQL92_INTERVAL_HOUR_TO_SECOND','%SQL_DL_SQL92_INTERVAL_MINUTE','%SQL_DL_SQL92_INTERVAL_MINUTE_TO_SECOND','%SQL_DL_SQL92_INTERVAL_MONTH','%SQL_DL_SQL92_INTERVAL_SECOND', - '%SQL_DL_SQL92_INTERVAL_YEAR','%SQL_DL_SQL92_INTERVAL_YEAR_TO_MONTH','%SQL_DL_SQL92_TIME','%SQL_DL_SQL92_TIMESTAMP','%SQL_DM_VER','%SQL_DOUBLE','%SQL_DRIVER_COMPLETE','%SQL_DRIVER_COMPLETE_REQUIRED', - '%SQL_DRIVER_HDBC','%SQL_DRIVER_HDESC','%SQL_DRIVER_HENV','%SQL_DRIVER_HLIB','%SQL_DRIVER_HSTMT','%SQL_DRIVER_NAME','%SQL_DRIVER_NOPROMPT','%SQL_DRIVER_ODBC_VER', - '%SQL_DRIVER_PROMPT','%SQL_DRIVER_VER','%SQL_DROP','%SQL_DROP_ASSERTION','%SQL_DROP_CHARACTER_SET','%SQL_DROP_COLLATION','%SQL_DROP_DOMAIN','%SQL_DROP_SCHEMA', - '%SQL_DROP_TABLE','%SQL_DROP_TRANSLATION','%SQL_DROP_VIEW','%SQL_DS_CASCADE','%SQL_DS_DROP_SCHEMA','%SQL_DS_RESTRICT','%SQL_DTC_DONE','%SQL_DTC_ENLIST_EXPENSIVE', - '%SQL_DTC_TRANSITION_COST','%SQL_DTC_UNENLIST_EXPENSIVE','%SQL_DTR_DROP_TRANSLATION','%SQL_DT_CASCADE','%SQL_DT_DROP_TABLE','%SQL_DT_RESTRICT','%SQL_DV_CASCADE','%SQL_DV_DROP_VIEW', - '%SQL_DV_RESTRICT','%SQL_DYNAMIC_CURSOR_ATTRIBUTES1','%SQL_DYNAMIC_CURSOR_ATTRIBUTES2','%SQL_ENSURE','%SQL_ENTIRE_ROWSET','%SQL_ERROR','%SQL_EXPRESSIONS_IN_ORDERBY','%SQL_FALSE', - '%SQL_FD_FETCH_ABSOLUTE','%SQL_FD_FETCH_BOOKMARK','%SQL_FD_FETCH_FIRST','%SQL_FD_FETCH_LAST','%SQL_FD_FETCH_NEXT','%SQL_FD_FETCH_PREV','%SQL_FD_FETCH_PRIOR','%SQL_FD_FETCH_RELATIVE', - '%SQL_FETCH_ABSOLUTE','%SQL_FETCH_BOOKMARK','%SQL_FETCH_BY_BOOKMARK','%SQL_FETCH_DIRECTION','%SQL_FETCH_FIRST','%SQL_FETCH_FIRST_SYSTEM','%SQL_FETCH_FIRST_USER','%SQL_FETCH_LAST', - '%SQL_FETCH_NEXT','%SQL_FETCH_PREV','%SQL_FETCH_PRIOR','%SQL_FETCH_RELATIVE','%SQL_FILE_CATALOG','%SQL_FILE_NOT_SUPPORTED','%SQL_FILE_QUALIFIER','%SQL_FILE_TABLE', - '%SQL_FILE_USAGE','%SQL_FLOAT','%SQL_FN_CVT_CAST','%SQL_FN_CVT_CONVERT','%SQL_FN_NUM_ABS','%SQL_FN_NUM_ACOS','%SQL_FN_NUM_ASIN','%SQL_FN_NUM_ATAN', - '%SQL_FN_NUM_ATAN2','%SQL_FN_NUM_CEILING','%SQL_FN_NUM_COS','%SQL_FN_NUM_COT','%SQL_FN_NUM_DEGREES','%SQL_FN_NUM_EXP','%SQL_FN_NUM_FLOOR','%SQL_FN_NUM_LOG', - '%SQL_FN_NUM_LOG10','%SQL_FN_NUM_MOD','%SQL_FN_NUM_PI','%SQL_FN_NUM_POWER','%SQL_FN_NUM_RADIANS','%SQL_FN_NUM_RAND','%SQL_FN_NUM_ROUND','%SQL_FN_NUM_SIGN', - '%SQL_FN_NUM_SIN','%SQL_FN_NUM_SQRT','%SQL_FN_NUM_TAN','%SQL_FN_NUM_TRUNCATE','%SQL_FN_STR_ASCII','%SQL_FN_STR_BIT_LENGTH','%SQL_FN_STR_CHAR','%SQL_FN_STR_CHARACTER_LENGTH', - '%SQL_FN_STR_CHAR_LENGTH','%SQL_FN_STR_CONCAT','%SQL_FN_STR_DIFFERENCE','%SQL_FN_STR_INSERT','%SQL_FN_STR_LCASE','%SQL_FN_STR_LEFT','%SQL_FN_STR_LENGTH','%SQL_FN_STR_LOCATE', - '%SQL_FN_STR_LOCATE_2','%SQL_FN_STR_LTRIM','%SQL_FN_STR_OCTET_LENGTH','%SQL_FN_STR_POSITION','%SQL_FN_STR_REPEAT','%SQL_FN_STR_REPLACE','%SQL_FN_STR_RIGHT','%SQL_FN_STR_RTRIM', - '%SQL_FN_STR_SOUNDEX','%SQL_FN_STR_SPACE','%SQL_FN_STR_SUBSTRING','%SQL_FN_STR_UCASE','%SQL_FN_SYS_DBNAME','%SQL_FN_SYS_IFNULL','%SQL_FN_SYS_USERNAME','%SQL_FN_TD_CURDATE', - '%SQL_FN_TD_CURRENT_DATE','%SQL_FN_TD_CURRENT_TIME','%SQL_FN_TD_CURRENT_TIMESTAMP','%SQL_FN_TD_CURTIME','%SQL_FN_TD_DAYNAME','%SQL_FN_TD_DAYOFMONTH','%SQL_FN_TD_DAYOFWEEK','%SQL_FN_TD_DAYOFYEAR', - '%SQL_FN_TD_EXTRACT','%SQL_FN_TD_HOUR','%SQL_FN_TD_MINUTE','%SQL_FN_TD_MONTH','%SQL_FN_TD_MONTHNAME','%SQL_FN_TD_NOW','%SQL_FN_TD_QUARTER','%SQL_FN_TD_SECOND', - '%SQL_FN_TD_TIMESTAMPADD','%SQL_FN_TD_TIMESTAMPDIFF','%SQL_FN_TD_WEEK','%SQL_FN_TD_YEAR','%SQL_FN_TSI_DAY','%SQL_FN_TSI_FRAC_SECOND','%SQL_FN_TSI_HOUR','%SQL_FN_TSI_MINUTE', - '%SQL_FN_TSI_MONTH','%SQL_FN_TSI_QUARTER','%SQL_FN_TSI_SECOND','%SQL_FN_TSI_WEEK','%SQL_FN_TSI_YEAR','%SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1','%SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2','%SQL_GB_COLLATE', - '%SQL_GB_GROUP_BY_CONTAINS_SELECT','%SQL_GB_GROUP_BY_EQUALS_SELECT','%SQL_GB_NOT_SUPPORTED','%SQL_GB_NO_RELATION','%SQL_GD_ANY_COLUMN','%SQL_GD_ANY_ORDER','%SQL_GD_BLOCK','%SQL_GD_BOUND', - '%SQL_GETDATA_EXTENSIONS','%SQL_GET_BOOKMARK','%SQL_GROUP_BY','%SQL_GUID','%SQL_HANDLE_DBC','%SQL_HANDLE_DESC','%SQL_HANDLE_ENV','%SQL_HANDLE_SENV', - '%SQL_HANDLE_STMT','%SQL_HOUR','%SQL_HOUR_TO_MINUTE','%SQL_HOUR_TO_SECOND','%SQL_IC_LOWER','%SQL_IC_MIXED','%SQL_IC_SENSITIVE','%SQL_IC_UPPER', - '%SQL_IDENTIFIER_CASE','%SQL_IDENTIFIER_QUOTE_CHAR','%SQL_IGNORE','%SQL_IK_ALL','%SQL_IK_ASC','%SQL_IK_DESC','%SQL_IK_NONE','%SQL_INDEX_ALL', - '%SQL_INDEX_CLUSTERED','%SQL_INDEX_HASHED','%SQL_INDEX_KEYWORDS','%SQL_INDEX_OTHER','%SQL_INDEX_UNIQUE','%SQL_INFO_FIRST','%SQL_INFO_SCHEMA_VIEWS','%SQL_INITIALLY_DEFERRED', - '%SQL_INITIALLY_IMMEDIATE','%SQL_INSENSITIVE','%SQL_INSERT_STATEMENT','%SQL_INTEGER','%SQL_INTEGRITY','%SQL_INTERVAL','%SQL_INTERVAL_DAY','%SQL_INTERVAL_DAY_TO_HOUR', - '%SQL_INTERVAL_DAY_TO_MINUTE','%SQL_INTERVAL_DAY_TO_SECOND','%SQL_INTERVAL_HOUR','%SQL_INTERVAL_HOUR_TO_MINUTE','%SQL_INTERVAL_HOUR_TO_SECOND','%SQL_INTERVAL_MINUTE','%SQL_INTERVAL_MINUTE_TO_SECOND','%SQL_INTERVAL_MONTH', - '%SQL_INTERVAL_SECOND','%SQL_INTERVAL_YEAR','%SQL_INTERVAL_YEAR_TO_MONTH','%SQL_INVALID_HANDLE','%SQL_ISV_ASSERTIONS','%SQL_ISV_CHARACTER_SETS','%SQL_ISV_CHECK_CONSTRAINTS','%SQL_ISV_COLLATIONS', - '%SQL_ISV_COLUMNS','%SQL_ISV_COLUMN_DOMAIN_USAGE','%SQL_ISV_COLUMN_PRIVILEGES','%SQL_ISV_CONSTRAINT_COLUMN_USAGE','%SQL_ISV_CONSTRAINT_TABLE_USAGE','%SQL_ISV_DOMAINS','%SQL_ISV_DOMAIN_CONSTRAINTS','%SQL_ISV_KEY_COLUMN_USAGE', - '%SQL_ISV_REFERENTIAL_CONSTRAINTS','%SQL_ISV_SCHEMATA','%SQL_ISV_SQL_LANGUAGES','%SQL_ISV_TABLES','%SQL_ISV_TABLE_CONSTRAINTS','%SQL_ISV_TABLE_PRIVILEGES','%SQL_ISV_TRANSLATIONS','%SQL_ISV_USAGE_PRIVILEGES', - '%SQL_ISV_VIEWS','%SQL_ISV_VIEW_COLUMN_USAGE','%SQL_ISV_VIEW_TABLE_USAGE','%SQL_IS_DAY','%SQL_IS_DAY_TO_HOUR','%SQL_IS_DAY_TO_MINUTE','%SQL_IS_DAY_TO_SECOND','%SQL_IS_HOUR', - '%SQL_IS_HOUR_TO_MINUTE','%SQL_IS_HOUR_TO_SECOND','%SQL_IS_INSERT_LITERALS','%SQL_IS_INSERT_SEARCHED','%SQL_IS_INTEGER','%SQL_IS_MINUTE','%SQL_IS_MINUTE_TO_SECOND','%SQL_IS_MONTH', - '%SQL_IS_POINTER','%SQL_IS_SECOND','%SQL_IS_SELECT_INTO','%SQL_IS_SMALLINT','%SQL_IS_UINTEGER','%SQL_IS_USMALLINT','%SQL_IS_YEAR','%SQL_IS_YEAR_TO_MONTH', - '%SQL_KEYSET_CURSOR_ATTRIBUTES1','%SQL_KEYSET_CURSOR_ATTRIBUTES2','%SQL_KEYSET_SIZE','%SQL_KEYSET_SIZE_DEFAULT','%SQL_KEYWORDS','%SQL_LCK_EXCLUSIVE','%SQL_LCK_NO_CHANGE','%SQL_LCK_UNLOCK', - '%SQL_LEN_BINARY_ATTR_OFFSET','%SQL_LEN_DATA_AT_EXEC_OFFSET','%SQL_LIKE_ESCAPE_CLAUSE','%SQL_LIKE_ONLY','%SQL_LOCK_EXCLUSIVE','%SQL_LOCK_NO_CHANGE','%SQL_LOCK_TYPES','%SQL_LOCK_UNLOCK', - '%SQL_LOGIN_TIMEOUT','%SQL_LOGIN_TIMEOUT_DEFAULT','%SQL_LONGVARBINARY','%SQL_LONGVARCHAR','%SQL_MAXIMUM_CATALOG_NAME_LENGTH','%SQL_MAXIMUM_COLUMNS_IN_GROUP_BY','%SQL_MAXIMUM_COLUMNS_IN_INDEX','%SQL_MAXIMUM_COLUMNS_IN_ORDER_BY', - '%SQL_MAXIMUM_COLUMNS_IN_SELECT','%SQL_MAXIMUM_COLUMN_NAME_LENGTH','%SQL_MAXIMUM_CONCURRENT_ACTIVITIES','%SQL_MAXIMUM_CURSOR_NAME_LENGTH','%SQL_MAXIMUM_DRIVER_CONNECTIONS','%SQL_MAXIMUM_IDENTIFIER_LENGTH','%SQL_MAXIMUM_INDEX_SIZE','%SQL_MAXIMUM_ROW_SIZE', - '%SQL_MAXIMUM_SCHEMA_NAME_LENGTH','%SQL_MAXIMUM_STATEMENT_LENGTH','%SQL_MAXIMUM_TABLES_IN_SELECT','%SQL_MAXIMUM_USER_NAME_LENGTH','%SQL_MAX_ASYNC_CONCURRENT_STATEMENTS','%SQL_MAX_BINARY_LITERAL_LEN','%SQL_MAX_CATALOG_NAME_LEN','%SQL_MAX_CHAR_LITERAL_LEN', - '%SQL_MAX_COLUMNS_IN_GROUP_BY','%SQL_MAX_COLUMNS_IN_INDEX','%SQL_MAX_COLUMNS_IN_ORDER_BY','%SQL_MAX_COLUMNS_IN_SELECT','%SQL_MAX_COLUMNS_IN_TABLE','%SQL_MAX_COLUMN_NAME_LEN','%SQL_MAX_CONCURRENT_ACTIVITIES','%SQL_MAX_CURSOR_NAME_LEN', - '%SQL_MAX_DRIVER_CONNECTIONS','%SQL_MAX_DSN_LENGTH','%SQL_MAX_IDENTIFIER_LEN','%SQL_MAX_INDEX_SIZE','%SQL_MAX_LENGTH','%SQL_MAX_LENGTH_DEFAULT','%SQL_MAX_MESSAGE_LENGTH','%SQL_MAX_NUMERIC_LEN', - '%SQL_MAX_OPTION_STRING_LENGTH','%SQL_MAX_OWNER_NAME_LEN','%SQL_MAX_PROCEDURE_NAME_LEN','%SQL_MAX_QUALIFIER_NAME_LEN','%SQL_MAX_ROWS','%SQL_MAX_ROWS_DEFAULT','%SQL_MAX_ROW_SIZE','%SQL_MAX_ROW_SIZE_INCLUDES_LONG', - '%SQL_MAX_SCHEMA_NAME_LEN','%SQL_MAX_STATEMENT_LEN','%SQL_MAX_TABLES_IN_SELECT','%SQL_MAX_TABLE_NAME_LEN','%SQL_MAX_USER_NAME_LEN','%SQL_MINUTE','%SQL_MINUTE_TO_SECOND','%SQL_MODE_DEFAULT', - '%SQL_MODE_READ_ONLY','%SQL_MODE_READ_WRITE','%SQL_MONTH','%SQL_MULTIPLE_ACTIVE_TXN','%SQL_MULT_RESULT_SETS','%SQL_NAMED','%SQL_NC_END','%SQL_NC_HIGH', - '%SQL_NC_LOW','%SQL_NC_START','%SQL_NEED_DATA','%SQL_NEED_LONG_DATA_LEN','%SQL_NNC_NON_NULL','%SQL_NNC_NULL','%SQL_NONSCROLLABLE','%SQL_NON_NULLABLE_COLUMNS', - '%SQL_NOSCAN','%SQL_NOSCAN_DEFAULT','%SQL_NOSCAN_OFF','%SQL_NOSCAN_ON','%SQL_NOT_DEFERRABLE','%SQL_NO_ACTION','%SQL_NO_COLUMN_NUMBER','%SQL_NO_DATA', - '%SQL_NO_DATA_FOUND','%SQL_NO_NULLS','%SQL_NO_ROW_NUMBER','%SQL_NO_TOTAL','%SQL_NTS','%SQL_NTSL','%SQL_NULLABLE','%SQL_NULLABLE_UNKNOWN', - '%SQL_NULL_COLLATION','%SQL_NULL_DATA','%SQL_NULL_HANDLE','%SQL_NULL_HDBC','%SQL_NULL_HDESC','%SQL_NULL_HENV','%SQL_NULL_HSTMT','%SQL_NUMERIC', - '%SQL_NUMERIC_FUNCTIONS','%SQL_OAC_LEVEL1','%SQL_OAC_LEVEL2','%SQL_OAC_NONE','%SQL_ODBC_API_CONFORMANCE','%SQL_ODBC_CURSORS','%SQL_ODBC_INTERFACE_CONFORMANCE','%SQL_ODBC_SAG_CLI_CONFORMANCE', - '%SQL_ODBC_SQL_CONFORMANCE','%SQL_ODBC_SQL_OPT_IEF','%SQL_ODBC_VER','%SQL_OIC_CORE','%SQL_OIC_LEVEL1','%SQL_OIC_LEVEL2','%SQL_OJ_ALL_COMPARISON_OPS','%SQL_OJ_CAPABILITIES', - '%SQL_OJ_FULL','%SQL_OJ_INNER','%SQL_OJ_LEFT','%SQL_OJ_NESTED','%SQL_OJ_NOT_ORDERED','%SQL_OJ_RIGHT','%SQL_OPT_TRACE','%SQL_OPT_TRACEFILE', - '%SQL_OPT_TRACE_DEFAULT','%SQL_OPT_TRACE_OFF','%SQL_OPT_TRACE_ON','%SQL_ORDER_BY_COLUMNS_IN_SELECT','%SQL_OSCC_COMPLIANT','%SQL_OSCC_NOT_COMPLIANT','%SQL_OSC_CORE','%SQL_OSC_EXTENDED', - '%SQL_OSC_MINIMUM','%SQL_OUTER_JOINS','%SQL_OUTER_JOIN_CAPABILITIES','%SQL_OU_DML_STATEMENTS','%SQL_OU_INDEX_DEFINITION','%SQL_OU_PRIVILEGE_DEFINITION','%SQL_OU_PROCEDURE_INVOCATION','%SQL_OU_TABLE_DEFINITION', - '%SQL_OV_ODBC2','%SQL_OV_ODBC3','%SQL_OWNER_TERM','%SQL_OWNER_USAGE','%SQL_PACKET_SIZE','%SQL_PARAM_ARRAY_ROW_COUNTS','%SQL_PARAM_ARRAY_SELECTS','%SQL_PARAM_BIND_BY_COLUMN', - '%SQL_PARAM_BIND_TYPE_DEFAULT','%SQL_PARAM_DIAG_UNAVAILABLE','%SQL_PARAM_ERROR','%SQL_PARAM_IGNORE','%SQL_PARAM_INPUT','%SQL_PARAM_INPUT_OUTPUT','%SQL_PARAM_OUTPUT','%SQL_PARAM_PROCEED', - '%SQL_PARAM_SUCCESS','%SQL_PARAM_SUCCESS_WITH_INFO','%SQL_PARAM_TYPE_DEFAULT','%SQL_PARAM_TYPE_UNKNOWN','%SQL_PARAM_UNUSED','%SQL_PARC_BATCH','%SQL_PARC_NO_BATCH','%SQL_PAS_BATCH', - '%SQL_PAS_NO_BATCH','%SQL_PAS_NO_SELECT','%SQL_PC_NON_PSEUDO','%SQL_PC_NOT_PSEUDO','%SQL_PC_PSEUDO','%SQL_PC_UNKNOWN','%SQL_POSITION','%SQL_POSITIONED_STATEMENTS', - '%SQL_POS_ADD','%SQL_POS_DELETE','%SQL_POS_OPERATIONS','%SQL_POS_POSITION','%SQL_POS_REFRESH','%SQL_POS_UPDATE','%SQL_PRED_BASIC','%SQL_PRED_CHAR', - '%SQL_PRED_NONE','%SQL_PRED_SEARCHABLE','%SQL_PROCEDURES','%SQL_PROCEDURE_TERM','%SQL_PS_POSITIONED_DELETE','%SQL_PS_POSITIONED_UPDATE','%SQL_PS_SELECT_FOR_UPDATE','%SQL_PT_FUNCTION', - '%SQL_PT_PROCEDURE','%SQL_PT_UNKNOWN','%SQL_QL_END','%SQL_QL_START','%SQL_QUALIFIER_LOCATION','%SQL_QUALIFIER_NAME_SEPARATOR','%SQL_QUALIFIER_TERM','%SQL_QUALIFIER_USAGE', - '%SQL_QUERY_TIMEOUT','%SQL_QUERY_TIMEOUT_DEFAULT','%SQL_QUICK','%SQL_QUIET_MODE','%SQL_QUOTED_IDENTIFIER_CASE','%SQL_QU_DML_STATEMENTS','%SQL_QU_INDEX_DEFINITION','%SQL_QU_PRIVILEGE_DEFINITION', - '%SQL_QU_PROCEDURE_INVOCATION','%SQL_QU_TABLE_DEFINITION','%SQL_RD_DEFAULT','%SQL_RD_OFF','%SQL_RD_ON','%SQL_REAL','%SQL_REFRESH','%SQL_RESET_PARAMS', - '%SQL_RESTRICT','%SQL_RESULT_COL','%SQL_RETRIEVE_DATA','%SQL_RETURN_VALUE','%SQL_ROLLBACK','%SQL_ROWSET_SIZE','%SQL_ROWSET_SIZE_DEFAULT','%SQL_ROWVER', - '%SQL_ROW_ADDED','%SQL_ROW_DELETED','%SQL_ROW_ERROR','%SQL_ROW_IDENTIFIER','%SQL_ROW_IGNORE','%SQL_ROW_NOROW','%SQL_ROW_NUMBER','%SQL_ROW_NUMBER_UNKNOWN', - '%SQL_ROW_PROCEED','%SQL_ROW_SUCCESS','%SQL_ROW_SUCCESS_WITH_INFO','%SQL_ROW_UPDATED','%SQL_ROW_UPDATES','%SQL_SCCO_LOCK','%SQL_SCCO_OPT_ROWVER','%SQL_SCCO_OPT_TIMESTAMP', - '%SQL_SCCO_OPT_VALUES','%SQL_SCCO_READ_ONLY','%SQL_SCC_ISO92_CLI','%SQL_SCC_XOPEN_CLI_VERSION1','%SQL_SCHEMA_TERM','%SQL_SCHEMA_USAGE','%SQL_SCOPE_CURROW','%SQL_SCOPE_SESSION', - '%SQL_SCOPE_TRANSACTION','%SQL_SCROLLABLE','%SQL_SCROLL_CONCURRENCY','%SQL_SCROLL_DYNAMIC','%SQL_SCROLL_FORWARD_ONLY','%SQL_SCROLL_KEYSET_DRIVEN','%SQL_SCROLL_OPTIONS','%SQL_SCROLL_STATIC', - '%SQL_SC_FIPS127_2_TRANSITIONAL','%SQL_SC_NON_UNIQUE','%SQL_SC_SQL92_ENTRY','%SQL_SC_SQL92_FULL','%SQL_SC_SQL92_INTERMEDIATE','%SQL_SC_TRY_UNIQUE','%SQL_SC_UNIQUE','%SQL_SDF_CURRENT_DATE', - '%SQL_SDF_CURRENT_TIME','%SQL_SDF_CURRENT_TIMESTAMP','%SQL_SEARCHABLE','%SQL_SEARCH_PATTERN_ESCAPE','%SQL_SECOND','%SQL_SENSITIVE','%SQL_SERVER_NAME','%SQL_SETPARAM_VALUE_MAX', - '%SQL_SETPOS_MAX_LOCK_VALUE','%SQL_SETPOS_MAX_OPTION_VALUE','%SQL_SET_DEFAULT','%SQL_SET_NULL','%SQL_SFKD_CASCADE','%SQL_SFKD_NO_ACTION','%SQL_SFKD_SET_DEFAULT','%SQL_SFKD_SET_NULL', - '%SQL_SFKU_CASCADE','%SQL_SFKU_NO_ACTION','%SQL_SFKU_SET_DEFAULT','%SQL_SFKU_SET_NULL','%SQL_SG_DELETE_TABLE','%SQL_SG_INSERT_COLUMN','%SQL_SG_INSERT_TABLE','%SQL_SG_REFERENCES_COLUMN', - '%SQL_SG_REFERENCES_TABLE','%SQL_SG_SELECT_TABLE','%SQL_SG_UPDATE_COLUMN','%SQL_SG_UPDATE_TABLE','%SQL_SG_USAGE_ON_CHARACTER_SET','%SQL_SG_USAGE_ON_COLLATION','%SQL_SG_USAGE_ON_DOMAIN','%SQL_SG_USAGE_ON_TRANSLATION', - '%SQL_SG_WITH_GRANT_OPTION','%SQL_SIGNED_OFFSET','%SQL_SIMULATE_CURSOR','%SQL_SMALLINT','%SQL_SNVF_BIT_LENGTH','%SQL_SNVF_CHARACTER_LENGTH','%SQL_SNVF_CHAR_LENGTH','%SQL_SNVF_EXTRACT', - '%SQL_SNVF_OCTET_LENGTH','%SQL_SNVF_POSITION','%SQL_SO_DYNAMIC','%SQL_SO_FORWARD_ONLY','%SQL_SO_KEYSET_DRIVEN','%SQL_SO_MIXED','%SQL_SO_STATIC','%SQL_SPECIAL_CHARACTERS', - '%SQL_SPEC_MAJOR','%SQL_SPEC_MINOR','%SQL_SP_BETWEEN','%SQL_SP_COMPARISON','%SQL_SP_EXISTS','%SQL_SP_IN','%SQL_SP_ISNOTNULL','%SQL_SP_ISNULL', - '%SQL_SP_LIKE','%SQL_SP_MATCH_FULL','%SQL_SP_MATCH_PARTIAL','%SQL_SP_MATCH_UNIQUE_FULL','%SQL_SP_MATCH_UNIQUE_PARTIAL','%SQL_SP_OVERLAPS','%SQL_SP_QUANTIFIED_COMPARISON','%SQL_SP_UNIQUE', - '%SQL_SQL92_DATETIME_FUNCTIONS','%SQL_SQL92_FOREIGN_KEY_DELETE_RULE','%SQL_SQL92_FOREIGN_KEY_UPDATE_RULE','%SQL_SQL92_GRANT','%SQL_SQL92_NUMERIC_VALUE_FUNCTIONS','%SQL_SQL92_PREDICATES','%SQL_SQL92_RELATIONAL_JOIN_OPERATORS','%SQL_SQL92_REVOKE', - '%SQL_SQL92_ROW_VALUE_CONSTRUCTOR','%SQL_SQL92_STRING_FUNCTIONS','%SQL_SQL92_VALUE_EXPRESSIONS','%SQL_SQLSTATE_SIZE','%SQL_SQL_CONFORMANCE','%SQL_SQ_COMPARISON','%SQL_SQ_CORRELATED_SUBQUERIES','%SQL_SQ_EXISTS', - '%SQL_SQ_IN','%SQL_SQ_QUANTIFIED','%SQL_SRJO_CORRESPONDING_CLAUSE','%SQL_SRJO_CROSS_JOIN','%SQL_SRJO_EXCEPT_JOIN','%SQL_SRJO_FULL_OUTER_JOIN','%SQL_SRJO_INNER_JOIN','%SQL_SRJO_INTERSECT_JOIN', - '%SQL_SRJO_LEFT_OUTER_JOIN','%SQL_SRJO_NATURAL_JOIN','%SQL_SRJO_RIGHT_OUTER_JOIN','%SQL_SRJO_UNION_JOIN','%SQL_SRVC_DEFAULT','%SQL_SRVC_NULL','%SQL_SRVC_ROW_SUBQUERY','%SQL_SRVC_VALUE_EXPRESSION', - '%SQL_SR_CASCADE','%SQL_SR_DELETE_TABLE','%SQL_SR_GRANT_OPTION_FOR','%SQL_SR_INSERT_COLUMN','%SQL_SR_INSERT_TABLE','%SQL_SR_REFERENCES_COLUMN','%SQL_SR_REFERENCES_TABLE','%SQL_SR_RESTRICT', - '%SQL_SR_SELECT_TABLE','%SQL_SR_UPDATE_COLUMN','%SQL_SR_UPDATE_TABLE','%SQL_SR_USAGE_ON_CHARACTER_SET','%SQL_SR_USAGE_ON_COLLATION','%SQL_SR_USAGE_ON_DOMAIN','%SQL_SR_USAGE_ON_TRANSLATION','%SQL_SSF_CONVERT', - '%SQL_SSF_LOWER','%SQL_SSF_SUBSTRING','%SQL_SSF_TRANSLATE','%SQL_SSF_TRIM_BOTH','%SQL_SSF_TRIM_LEADING','%SQL_SSF_TRIM_TRAILING','%SQL_SSF_UPPER','%SQL_SS_ADDITIONS', - '%SQL_SS_DELETIONS','%SQL_SS_UPDATES','%SQL_STANDARD_CLI_CONFORMANCE','%SQL_STATIC_CURSOR_ATTRIBUTES1','%SQL_STATIC_CURSOR_ATTRIBUTES2','%SQL_STATIC_SENSITIVITY','%SQL_STILL_EXECUTING','%SQL_STRING_FUNCTIONS', - '%SQL_SUBQUERIES','%SQL_SUCCESS','%SQL_SUCCESS_WITH_INFO','%SQL_SU_DML_STATEMENTS','%SQL_SU_INDEX_DEFINITION','%SQL_SU_PRIVILEGE_DEFINITION','%SQL_SU_PROCEDURE_INVOCATION','%SQL_SU_TABLE_DEFINITION', - '%SQL_SVE_CASE','%SQL_SVE_CAST','%SQL_SVE_COALESCE','%SQL_SVE_NULLIF','%SQL_SYSTEM_FUNCTIONS','%SQL_TABLE_STAT','%SQL_TABLE_TERM','%SQL_TC_ALL', - '%SQL_TC_DDL_COMMIT','%SQL_TC_DDL_IGNORE','%SQL_TC_DML','%SQL_TC_NONE','%SQL_TIME','%SQL_TIMEDATE_ADD_INTERVALS','%SQL_TIMEDATE_DIFF_INTERVALS','%SQL_TIMEDATE_FUNCTIONS', - '%SQL_TIMESTAMP','%SQL_TIMESTAMP_LEN','%SQL_TIME_LEN','%SQL_TINYINT','%SQL_TRANSACTION_CAPABLE','%SQL_TRANSACTION_ISOLATION_OPTION','%SQL_TRANSACTION_READ_COMMITTED','%SQL_TRANSACTION_READ_UNCOMMITTED', - '%SQL_TRANSACTION_REPEATABLE_READ','%SQL_TRANSACTION_SERIALIZABLE','%SQL_TRANSLATE_DLL','%SQL_TRANSLATE_OPTION','%SQL_TRUE','%SQL_TXN_CAPABLE','%SQL_TXN_ISOLATION','%SQL_TXN_ISOLATION_OPTION', - '%SQL_TXN_READ_COMMITTED','%SQL_TXN_READ_UNCOMMITTED','%SQL_TXN_REPEATABLE_READ','%SQL_TXN_SERIALIZABLE','%SQL_TYPE_DATE','%SQL_TYPE_NULL','%SQL_TYPE_TIME','%SQL_TYPE_TIMESTAMP', - '%SQL_UB_DEFAULT','%SQL_UB_FIXED','%SQL_UB_OFF','%SQL_UB_ON','%SQL_UB_VARIABLE','%SQL_UNBIND','%SQL_UNICODE','%SQL_UNICODE_CHAR', - '%SQL_UNICODE_LONGVARCHAR','%SQL_UNICODE_VARCHAR','%SQL_UNION','%SQL_UNION_STATEMENT','%SQL_UNKNOWN_TYPE','%SQL_UNNAMED','%SQL_UNSEARCHABLE','%SQL_UNSIGNED_OFFSET', - '%SQL_UNSPECIFIED','%SQL_UPDATE','%SQL_UPDATE_BY_BOOKMARK','%SQL_USER_NAME','%SQL_USE_BOOKMARKS','%SQL_US_UNION','%SQL_US_UNION_ALL','%SQL_U_UNION', - '%SQL_U_UNION_ALL','%SQL_VARBINARY','%SQL_VARCHAR','%SQL_XOPEN_CLI_YEAR','%SQL_YEAR','%SQL_YEAR_TO_MONTH','%SRCCOPY','%SS_BITMAP', - '%SS_BLACKFRAME','%SS_BLACKRECT','%SS_CENTER','%SS_CENTERIMAGE','%SS_ENDELLIPSIS','%SS_ETCHEDFRAME','%SS_ETCHEDHORZ','%SS_ETCHEDVERT', - '%SS_GRAYFRAME','%SS_GRAYRECT','%SS_LEFT','%SS_NOPREFIX','%SS_NOTIFY','%SS_NOWORDWRAP','%SS_PATHELLIPSIS','%SS_RIGHT', - '%SS_RIGHTJUST','%SS_SIMPLE','%SS_SUNKEN','%SS_WHITEFRAME','%SS_WHITERECT','%SS_WORDELLIPSIS','%STAT_FILL_FROM_MEMORY','%STAT_FILL_NATURAL', - '%STAT_FILL_NATURAL_ERASTONE','%STAT_FILL_NATURAL_EVEN','%STAT_FILL_NATURAL_FIBONACCI','%STAT_FILL_NATURAL_ODD','%STAT_FILL_WITH_NUMBER','%STAT_MINMAX_INDEX','%STAT_MINMAX_VALUE','%STAT_TYPE_BYTE', - '%STAT_TYPE_CURRENCY','%STAT_TYPE_DOUBLE','%STAT_TYPE_DWORD','%STAT_TYPE_EXT','%STAT_TYPE_INTEGER','%STAT_TYPE_LONG','%STAT_TYPE_QUAD','%STAT_TYPE_SINGLE', - '%STAT_TYPE_WORD','%SWP_ASYNCWINDOWPOS','%SWP_DEFERERASE','%SWP_DRAWFRAME','%SWP_FRAMECHANGED','%SWP_HIDEWINDOW','%SWP_NOACTIVATE','%SWP_NOCOPYBITS', - '%SWP_NOMOVE','%SWP_NOOWNERZORDER','%SWP_NOREDRAW','%SWP_NOREPOSITION','%SWP_NOSENDCHANGING','%SWP_NOSIZE','%SWP_NOZORDER','%SWP_SHOWWINDOW', - '%SW_FORCEMINIMIZE','%SW_HIDE','%SW_MAXIMIZE','%SW_MINIMIZE','%SW_NORMAL','%SW_RESTORE','%SW_SHOW','%SW_SHOWDEFAULT', - '%SW_SHOWMAXIMIZED','%SW_SHOWMINIMIZED','%SW_SHOWMINNOACTIVE','%SW_SHOWNA','%SW_SHOWNOACTIVATE','%SW_SHOWNORMAL','%TBASS_3DALG_DEFAULT','%TBASS_3DALG_FULL', - '%TBASS_3DALG_LIGHT','%TBASS_3DALG_OFF','%TBASS_3DMODE_NORMAL','%TBASS_3DMODE_OFF','%TBASS_3DMODE_RELATIVE','%TBASS_ACTIVE_PAUSED','%TBASS_ACTIVE_PLAYING','%TBASS_ACTIVE_STALLED', - '%TBASS_ACTIVE_STOPPED','%TBASS_CONFIG_3DALGORITHM','%TBASS_CONFIG_BUFFER','%TBASS_CONFIG_CURVE_PAN','%TBASS_CONFIG_CURVE_VOL','%TBASS_CONFIG_FLOATDSP','%TBASS_CONFIG_GVOL_MUSIC','%TBASS_CONFIG_GVOL_SAMPLE', - '%TBASS_CONFIG_GVOL_STREAM','%TBASS_CONFIG_MAXVOL','%TBASS_CONFIG_MP3_CODEC','%TBASS_CONFIG_NET_AGENT','%TBASS_CONFIG_NET_BUFFER','%TBASS_CONFIG_NET_PASSIVE','%TBASS_CONFIG_NET_PREBUF','%TBASS_CONFIG_NET_PROXY', - '%TBASS_CONFIG_NET_TIMEOUT','%TBASS_CONFIG_PAUSE_NOPLAY','%TBASS_CONFIG_UPDATEPERIOD','%TBASS_CTYPE_MUSIC_IT','%TBASS_CTYPE_MUSIC_MO3','%TBASS_CTYPE_MUSIC_MOD','%TBASS_CTYPE_MUSIC_MTM','%TBASS_CTYPE_MUSIC_S3M', - '%TBASS_CTYPE_MUSIC_XM','%TBASS_CTYPE_RECORD','%TBASS_CTYPE_SAMPLE','%TBASS_CTYPE_STREAM','%TBASS_CTYPE_STREAM_AIFF','%TBASS_CTYPE_STREAM_MP1','%TBASS_CTYPE_STREAM_MP2','%TBASS_CTYPE_STREAM_MP3', - '%TBASS_CTYPE_STREAM_OGG','%TBASS_CTYPE_STREAM_WAV','%TBASS_CTYPE_STREAM_WAV_FLOAT','%TBASS_CTYPE_STREAM_WAV_PCM','%TBASS_DATA_AVAILABLE','%TBASS_DATA_FFT1024','%TBASS_DATA_FFT2048','%TBASS_DATA_FFT4096', - '%TBASS_DATA_FFT512','%TBASS_DATA_FFT_INDIVIDUAL','%TBASS_DATA_FFT_NOWINDOW','%TBASS_DATA_FLOAT','%TBASS_DEVICE_3D','%TBASS_DEVICE_8BITS','%TBASS_DEVICE_LATENCY','%TBASS_DEVICE_MONO', - '%TBASS_DEVICE_NOSPEAKER','%TBASS_DEVICE_SPEAKERS','%TBASS_EAX_ENVIRONMENT_ALLEY','%TBASS_EAX_ENVIRONMENT_ARENA','%TBASS_EAX_ENVIRONMENT_AUDITORIUM','%TBASS_EAX_ENVIRONMENT_BATHROOM','%TBASS_EAX_ENVIRONMENT_CARPETEDHALLWAY','%TBASS_EAX_ENVIRONMENT_CAVE', - '%TBASS_EAX_ENVIRONMENT_CITY','%TBASS_EAX_ENVIRONMENT_CONCERTHALL','%TBASS_EAX_ENVIRONMENT_COUNT','%TBASS_EAX_ENVIRONMENT_DIZZY','%TBASS_EAX_ENVIRONMENT_DRUGGED','%TBASS_EAX_ENVIRONMENT_FOREST','%TBASS_EAX_ENVIRONMENT_GENERIC','%TBASS_EAX_ENVIRONMENT_HALLWAY', - '%TBASS_EAX_ENVIRONMENT_HANGAR','%TBASS_EAX_ENVIRONMENT_LIVINGROOM','%TBASS_EAX_ENVIRONMENT_MOUNTAINS','%TBASS_EAX_ENVIRONMENT_PADDEDCELL','%TBASS_EAX_ENVIRONMENT_PARKINGLOT','%TBASS_EAX_ENVIRONMENT_PLAIN','%TBASS_EAX_ENVIRONMENT_PSYCHOTIC','%TBASS_EAX_ENVIRONMENT_QUARRY', - '%TBASS_EAX_ENVIRONMENT_ROOM','%TBASS_EAX_ENVIRONMENT_SEWERPIPE','%TBASS_EAX_ENVIRONMENT_STONECORRIDOR','%TBASS_EAX_ENVIRONMENT_STONEROOM','%TBASS_EAX_ENVIRONMENT_UNDERWATER','%TBASS_ERROR_ALREADY','%TBASS_ERROR_BUFLOST','%TBASS_ERROR_CODEC', - '%TBASS_ERROR_CREATE','%TBASS_ERROR_DECODE','%TBASS_ERROR_DEVICE','%TBASS_ERROR_DRIVER','%TBASS_ERROR_DX','%TBASS_ERROR_EMPTY','%TBASS_ERROR_FILEFORM','%TBASS_ERROR_FILEOPEN', - '%TBASS_ERROR_FORMAT','%TBASS_ERROR_FREQ','%TBASS_ERROR_HANDLE','%TBASS_ERROR_ILLPARAM','%TBASS_ERROR_ILLTYPE','%TBASS_ERROR_INIT','%TBASS_ERROR_MEM','%TBASS_ERROR_NO3D', - '%TBASS_ERROR_NOCHAN','%TBASS_ERROR_NOEAX','%TBASS_ERROR_NOFX','%TBASS_ERROR_NOHW','%TBASS_ERROR_NONET','%TBASS_ERROR_NOPAUSE','%TBASS_ERROR_NOPLAY','%TBASS_ERROR_NOTAVAIL', - '%TBASS_ERROR_NOTFILE','%TBASS_ERROR_PLAYING','%TBASS_ERROR_POSITION','%TBASS_ERROR_SPEAKER','%TBASS_ERROR_START','%TBASS_ERROR_TIMEOUT','%TBASS_ERROR_UNKNOWN','%TBASS_ERROR_VERSION', - '%TBASS_FALSE','%TBASS_FILEPOS_CURRENT','%TBASS_FILEPOS_DECODE','%TBASS_FILEPOS_DOWNLOAD','%TBASS_FILEPOS_END','%TBASS_FILEPOS_START','%TBASS_FILE_CLOSE','%TBASS_FILE_LEN', - '%TBASS_FILE_READ','%TBASS_FILE_SEEK','%TBASS_FX_CHORUS','%TBASS_FX_COMPRESSOR','%TBASS_FX_DISTORTION','%TBASS_FX_ECHO','%TBASS_FX_FLANGER','%TBASS_FX_GARGLE', - '%TBASS_FX_I3DL2REVERB','%TBASS_FX_PARAMEQ','%TBASS_FX_PHASE_180','%TBASS_FX_PHASE_90','%TBASS_FX_PHASE_NEG_180','%TBASS_FX_PHASE_NEG_90','%TBASS_FX_PHASE_ZERO','%TBASS_FX_REVERB', - '%TBASS_INPUT_LEVEL','%TBASS_INPUT_OFF','%TBASS_INPUT_ON','%TBASS_INPUT_TYPE_ANALOG','%TBASS_INPUT_TYPE_AUX','%TBASS_INPUT_TYPE_CD','%TBASS_INPUT_TYPE_DIGITAL','%TBASS_INPUT_TYPE_LINE', - '%TBASS_INPUT_TYPE_MASK','%TBASS_INPUT_TYPE_MIC','%TBASS_INPUT_TYPE_PHONE','%TBASS_INPUT_TYPE_SPEAKER','%TBASS_INPUT_TYPE_SYNTH','%TBASS_INPUT_TYPE_UNDEF','%TBASS_INPUT_TYPE_WAVE','%TBASS_MP3_SETPOS', - '%TBASS_MUSIC_3D','%TBASS_MUSIC_ATTRIB_AMPLIFY','%TBASS_MUSIC_ATTRIB_BPM','%TBASS_MUSIC_ATTRIB_PANSEP','%TBASS_MUSIC_ATTRIB_PSCALER','%TBASS_MUSIC_ATTRIB_SPEED','%TBASS_MUSIC_ATTRIB_VOL_CHAN','%TBASS_MUSIC_ATTRIB_VOL_GLOBAL', - '%TBASS_MUSIC_ATTRIB_VOL_INST','%TBASS_MUSIC_AUTOFREE','%TBASS_MUSIC_CALCLEN','%TBASS_MUSIC_DECODE','%TBASS_MUSIC_FLOAT','%TBASS_MUSIC_FT2MOD','%TBASS_MUSIC_FX','%TBASS_MUSIC_LOOP', - '%TBASS_MUSIC_MONO','%TBASS_MUSIC_NONINTER','%TBASS_MUSIC_NOSAMPLE','%TBASS_MUSIC_POSRESET','%TBASS_MUSIC_POSRESETEX','%TBASS_MUSIC_PRESCAN','%TBASS_MUSIC_PT1MOD','%TBASS_MUSIC_RAMP', - '%TBASS_MUSIC_RAMPS','%TBASS_MUSIC_STOPBACK','%TBASS_MUSIC_SURROUND','%TBASS_MUSIC_SURROUND2','%TBASS_OBJECT_DS','%TBASS_OBJECT_DS3DL','%TBASS_OK','%TBASS_RECORD_PAUSE', - '%TBASS_SAMPLE_3D','%TBASS_SAMPLE_8BITS','%TBASS_SAMPLE_FLOAT','%TBASS_SAMPLE_FX','%TBASS_SAMPLE_LOOP','%TBASS_SAMPLE_MONO','%TBASS_SAMPLE_MUTEMAX','%TBASS_SAMPLE_OVER_DIST', - '%TBASS_SAMPLE_OVER_POS','%TBASS_SAMPLE_OVER_VOL','%TBASS_SAMPLE_SOFTWARE','%TBASS_SAMPLE_VAM','%TBASS_SLIDE_FREQ','%TBASS_SLIDE_PAN','%TBASS_SLIDE_VOL','%TBASS_SPEAKER_CENLFE', - '%TBASS_SPEAKER_CENTER','%TBASS_SPEAKER_FRONT','%TBASS_SPEAKER_FRONTLEFT','%TBASS_SPEAKER_FRONTRIGHT','%TBASS_SPEAKER_LEFT','%TBASS_SPEAKER_LFE','%TBASS_SPEAKER_REAR','%TBASS_SPEAKER_REAR2', - '%TBASS_SPEAKER_REAR2LEFT','%TBASS_SPEAKER_REAR2RIGHT','%TBASS_SPEAKER_REARLEFT','%TBASS_SPEAKER_REARRIGHT','%TBASS_SPEAKER_RIGHT','%TBASS_STREAMPROC_END','%TBASS_STREAM_AUTOFREE','%TBASS_STREAM_BLOCK', - '%TBASS_STREAM_DECODE','%TBASS_STREAM_PRESCAN','%TBASS_STREAM_RESTRATE','%TBASS_STREAM_STATUS','%TBASS_SYNC_DOWNLOAD','%TBASS_SYNC_END','%TBASS_SYNC_FREE','%TBASS_SYNC_MESSAGE', - '%TBASS_SYNC_META','%TBASS_SYNC_MIXTIME','%TBASS_SYNC_MUSICFX','%TBASS_SYNC_MUSICINST','%TBASS_SYNC_MUSICPOS','%TBASS_SYNC_ONETIME','%TBASS_SYNC_POS','%TBASS_SYNC_SLIDE', - '%TBASS_SYNC_STALL','%TBASS_TAG_HTTP','%TBASS_TAG_ICY','%TBASS_TAG_ID3','%TBASS_TAG_ID3V2','%TBASS_TAG_META','%TBASS_TAG_MUSIC_INST','%TBASS_TAG_MUSIC_MESSAGE', - '%TBASS_TAG_MUSIC_NAME','%TBASS_TAG_MUSIC_SAMPLE','%TBASS_TAG_OGG','%TBASS_TAG_RIFF_INFO','%TBASS_TAG_VENDOR','%TBASS_TRUE','%TBASS_UNICODE','%TBASS_VAM_HARDWARE', - '%TBASS_VAM_SOFTWARE','%TBASS_VAM_TERM_DIST','%TBASS_VAM_TERM_PRIO','%TBASS_VAM_TERM_TIME','%TBASS_VERSION','%TBCD_CHANNEL','%TBCD_THUMB','%TBCD_TICS', - '%TBGL_ALIGN_CENTER','%TBGL_ALIGN_CENTER_CENTER','%TBGL_ALIGN_CENTER_DOWN','%TBGL_ALIGN_CENTER_UP','%TBGL_ALIGN_LEFT','%TBGL_ALIGN_LEFT_CENTER','%TBGL_ALIGN_LEFT_DOWN','%TBGL_ALIGN_LEFT_UP', - '%TBGL_ALIGN_RIGHT','%TBGL_ALIGN_RIGHT_CENTER','%TBGL_ALIGN_RIGHT_DOWN','%TBGL_ALIGN_RIGHT_UP','%TBGL_ALWAYS','%TBGL_EQUAL','%TBGL_ERROR_FILE','%TBGL_ERROR_MSGBOX', - '%TBGL_ERROR_NONE','%TBGL_GEQUAL','%TBGL_GREATER','%TBGL_LEQUAL','%TBGL_LESS','%TBGL_LIGHT_AMBIENT','%TBGL_LIGHT_CONSTANT_ATTENUATION','%TBGL_LIGHT_DIFFUSE', - '%TBGL_LIGHT_LINEAR_ATTENUATION','%TBGL_LIGHT_POSITION','%TBGL_LIGHT_QUADRATIC_ATTENUATION','%TBGL_LIGHT_SPECULAR','%TBGL_LIGHT_SPOT_CUTOFF','%TBGL_LIGHT_SPOT_DIRECTION','%TBGL_LIGHT_SPOT_EXPONENT','%TBGL_M15B', - '%TBGL_M15G','%TBGL_M15LAYER','%TBGL_M15PSTOP','%TBGL_M15R','%TBGL_M15TEXN','%TBGL_M15TEXX','%TBGL_M15TEXY','%TBGL_M15X', - '%TBGL_M15Y','%TBGL_M15Z','%TBGL_NEVER','%TBGL_NORMAL_NONE','%TBGL_NORMAL_PRECISE','%TBGL_NORMAL_SMOOTH','%TBGL_NOTEQUAL','%TBGL_OBJ_CUBE', - '%TBGL_OBJ_CUBE3','%TBGL_OBJ_CYLINDER','%TBGL_OBJ_SPHERE','%TBGL_PINFO_RGB','%TBGL_PINFO_XYZ','%TBGL_TEX_LINEAR','%TBGL_TEX_MIPMAP','%TBGL_TEX_NEAREST', - '%TBM_CLEARSEL','%TBM_CLEARTICS','%TBM_GETBUDDY','%TBM_GETCHANNELRECT','%TBM_GETLINESIZE','%TBM_GETNUMTICS','%TBM_GETPAGESIZE','%TBM_GETPOS', - '%TBM_GETPTICS','%TBM_GETRANGEMAX','%TBM_GETRANGEMIN','%TBM_GETSELEND','%TBM_GETSELSTART','%TBM_GETTHUMBLENGTH','%TBM_GETTHUMBRECT','%TBM_GETTIC', - '%TBM_GETTICPOS','%TBM_GETTOOLTIPS','%TBM_GETUNICODEFORMAT','%TBM_SETBUDDY','%TBM_SETLINESIZE','%TBM_SETPAGESIZE','%TBM_SETPOS','%TBM_SETRANGE', - '%TBM_SETRANGEMAX','%TBM_SETRANGEMIN','%TBM_SETSEL','%TBM_SETSELEND','%TBM_SETSELSTART','%TBM_SETTHUMBLENGTH','%TBM_SETTIC','%TBM_SETTICFREQ', - '%TBM_SETTIPSIDE','%TBM_SETTOOLTIPS','%TBM_SETUNICODEFORMAT','%TBS_AUTOTICKS','%TBS_BOTH','%TBS_BOTTOM','%TBS_DOWNISLEFT','%TBS_ENABLESELRANGE', - '%TBS_FIXEDLENGTH','%TBS_HORZ','%TBS_LEFT','%TBS_NOTHUMB','%TBS_NOTICKS','%TBS_REVERSED','%TBS_RIGHT','%TBS_TOOLTIPS', - '%TBS_TOP','%TBS_VERT','%TBTS_BOTTOM','%TBTS_LEFT','%TBTS_RIGHT','%TBTS_TOP','%TB_%VT_BSTR','%TB_%VT_CY', - '%TB_%VT_DATE','%TB_%VT_EMPTY','%TB_%VT_I2','%TB_%VT_I4','%TB_%VT_NULL','%TB_%VT_R4','%TB_%VT_R8','%TB_BOTTOM', - '%TB_CLASS_E_NOAGGREGATION','%TB_CO_E_CLASSSTRING','%TB_DISPATCH_METHOD','%TB_DISPATCH_PROPERTYGET','%TB_DISPATCH_PROPERTYPUT','%TB_DISPATCH_PROPERTYPUTREF','%TB_ENDTRACK','%TB_E_INVALIDARG', - '%TB_E_NOINTERFACE','%TB_E_OUTOFMEMORY','%TB_IMGCTX_ACTUALSIZE','%TB_IMGCTX_AUTOSIZE','%TB_IMGCTX_FITTOHEIGHT','%TB_IMGCTX_FITTOWIDTH','%TB_IMGCTX_STRETCH','%TB_LINEDOWN', - '%TB_LINEUP','%TB_MK_E_CONNECTMANUALLY','%TB_MK_E_EXCEEDEDDEADLINE','%TB_MK_E_INTERMEDIATEINTERFACENOTSUPPORTED','%TB_MK_E_NOOBJECT','%TB_MK_E_SYNTAX','%TB_PAGEDOWN','%TB_PAGEUP', - '%TB_REGDB_E_CLASSNOTREG','%TB_REGDB_E_WRITEREGDB','%TB_SIZEOF_TBVARIANT','%TB_S_FALSE','%TB_S_OK','%TB_THUMBPOSITION','%TB_THUMBTRACK','%TB_TOP', - '%TCM_FIRST','%TCM_GETCURSEL','%TCN_FOCUSCHANGE','%TCN_GETOBJECT','%TCN_SELCHANGE','%TCN_SELCHANGING','%TCS_BOTTOM','%TCS_BUTTONS', - '%TCS_EX_FLATSEPARATORS','%TCS_EX_REGISTERDROP','%TCS_FIXEDWIDTH','%TCS_FLATBUTTONS','%TCS_FOCUSNEVER','%TCS_FOCUSONBUTTONDOWN','%TCS_FORCEICONLEFT','%TCS_FORCELABELLEFT', - '%TCS_HOTTRACK','%TCS_MULTILINE','%TCS_MULTISELECT','%TCS_OWNERDRAWFIXED','%TCS_RAGGEDRIGHT','%TCS_RIGHT','%TCS_RIGHTJUSTIFY','%TCS_SCROLLOPPOSITE', - '%TCS_SINGLELINE','%TCS_TABS','%TCS_TOOLTIPS','%TCS_VERTICAL','%TM_PLAINTEXT','%TM_RICHTEXT','%TOKENIZER_DEFAULT_ALPHA','%TOKENIZER_DEFAULT_DELIM', - '%TOKENIZER_DEFAULT_DQUOTE','%TOKENIZER_DEFAULT_NEWLINE','%TOKENIZER_DEFAULT_NUMERIC','%TOKENIZER_DEFAULT_SPACE','%TOKENIZER_DELIMITER','%TOKENIZER_EOL','%TOKENIZER_ERROR','%TOKENIZER_FINISHED', - '%TOKENIZER_NUMBER','%TOKENIZER_QUOTE','%TOKENIZER_STRING','%TOKENIZER_UNDEFTOK','%TRUE','%TV_FIRST','%UDM_GETACCEL','%UDM_GETBASE', - '%UDM_GETBUDDY','%UDM_GETPOS','%UDM_GETPOS32','%UDM_GETRANGE','%UDM_GETRANGE32','%UDM_GETUNICODEFORMAT','%UDM_SETACCEL','%UDM_SETBASE', - '%UDM_SETBUDDY','%UDM_SETPOS','%UDM_SETPOS32','%UDM_SETRANGE','%UDM_SETRANGE32','%UDM_SETUNICODEFORMAT','%UDS_ALIGNLEFT','%UDS_ALIGNRIGHT', - '%UDS_ARROWKEYS','%UDS_AUTOBUDDY','%UDS_HORZ','%UDS_HOTTRACK','%UDS_NOTHOUSANDS','%UDS_SETBUDDYINT','%UDS_WRAP','%UD_MAXVAL', - '%UD_MINVAL','%VK_0','%VK_1','%VK_2','%VK_3','%VK_4','%VK_5','%VK_6', - '%VK_7','%VK_8','%VK_9','%VK_A','%VK_ACCEPT','%VK_ADD','%VK_APPS','%VK_B', - '%VK_BACK','%VK_C','%VK_CANCEL','%VK_CAPITAL','%VK_CLEAR','%VK_CONTROL','%VK_CONVERT','%VK_D', - '%VK_DECIMAL','%VK_DELETE','%VK_DIVIDE','%VK_DOWN','%VK_E','%VK_END','%VK_ESCAPE','%VK_EXECUTE', - '%VK_F','%VK_F1','%VK_F10','%VK_F11','%VK_F12','%VK_F13','%VK_F14','%VK_F15', - '%VK_F16','%VK_F17','%VK_F18','%VK_F19','%VK_F2','%VK_F20','%VK_F21','%VK_F22', - '%VK_F23','%VK_F24','%VK_F3','%VK_F4','%VK_F5','%VK_F6','%VK_F7','%VK_F8', - '%VK_F9','%VK_FINAL','%VK_G','%VK_H','%VK_HANGEUL','%VK_HANGUL','%VK_HANJA','%VK_HELP', - '%VK_HOME','%VK_I','%VK_INSERT','%VK_J','%VK_JUNJA','%VK_K','%VK_KANA','%VK_KANJI', - '%VK_L','%VK_LBUTTON','%VK_LEFT','%VK_LINEFEED','%VK_LWIN','%VK_M','%VK_MBUTTON','%VK_MENU', - '%VK_MODECHANGE','%VK_MULTIPLY','%VK_N','%VK_NEXT','%VK_NONCONVERT','%VK_NUMLOCK','%VK_NUMPAD0','%VK_NUMPAD1', - '%VK_NUMPAD2','%VK_NUMPAD3','%VK_NUMPAD4','%VK_NUMPAD5','%VK_NUMPAD6','%VK_NUMPAD7','%VK_NUMPAD8','%VK_NUMPAD9', - '%VK_O','%VK_P','%VK_PAUSE','%VK_PGDN','%VK_PGUP','%VK_PRINT','%VK_PRIOR','%VK_Q', - '%VK_R','%VK_RBUTTON','%VK_RETURN','%VK_RIGHT','%VK_RWIN','%VK_S','%VK_SCROLL','%VK_SELECT', - '%VK_SEPARATOR','%VK_SHIFT','%VK_SLEEP','%VK_SNAPSHOT','%VK_SPACE','%VK_SUBTRACT','%VK_T','%VK_TAB', - '%VK_U','%VK_UP','%VK_V','%VK_W','%VK_X','%VK_XBUTTON1','%VK_XBUTTON2','%VK_Y', - '%VK_Z','%VT_ARRAY','%VT_BLOB','%VT_BLOB_OBJECT','%VT_BOOL','%VT_BSTR','%VT_BYREF','%VT_CARRAY', - '%VT_CF','%VT_CLSID','%VT_CY','%VT_DATE','%VT_DISPATCH','%VT_EMPTY','%VT_ERROR','%VT_FILETIME', - '%VT_HRESULT','%VT_I1','%VT_I2','%VT_I4','%VT_I8','%VT_INT','%VT_LPSTR','%VT_LPWSTR', - '%VT_NULL','%VT_PTR','%VT_R4','%VT_R8','%VT_RECORD','%VT_RESERVED','%VT_SAFEARRAY','%VT_STORAGE', - '%VT_STORED_OBJECT','%VT_STREAM','%VT_STREAMED_OBJECT','%VT_UI1','%VT_UI2','%VT_UI4','%VT_UI8','%VT_UINT', - '%VT_UNKNOWN','%VT_USERDEFINED','%VT_VARIANT','%VT_VECTOR','%VT_VOID','%WAVE_FORMAT_1M08','%WAVE_FORMAT_1M16','%WAVE_FORMAT_1S08', - '%WAVE_FORMAT_1S16','%WAVE_FORMAT_2M08','%WAVE_FORMAT_2M16','%WAVE_FORMAT_2S08','%WAVE_FORMAT_2S16','%WAVE_FORMAT_4M08','%WAVE_FORMAT_4M16','%WAVE_FORMAT_4S08', - '%WAVE_FORMAT_4S16','%WBF_CUSTOM','%WBF_LEVEL1','%WBF_LEVEL2','%WBF_OVERFLOW','%WBF_WORDBREAK','%WBF_WORDWRAP','%WHITE', - '%WIN_FINDTITLECONTAIN','%WIN_FINDTITLEEND','%WIN_FINDTITLEEQUAL','%WIN_FINDTITLESTART','%WM_ACTIVATE','%WM_ACTIVATEAPP','%WM_CAPTURECHANGED','%WM_CHAR', - '%WM_CLOSE','%WM_COMMAND','%WM_DESTROY','%WM_DROPFILES','%WM_ERASEBKGND','%WM_GETTEXTLENGTH','%WM_HOTKEY','%WM_HSCROLL', - '%WM_IDLE','%WM_INITDIALOG','%WM_KEYDOWN','%WM_KEYUP','%WM_KILLFOCUS','%WM_LBUTTONDBLCLK','%WM_LBUTTONDOWN','%WM_LBUTTONUP', - '%WM_MBUTTONDBLCLK','%WM_MBUTTONDOWN','%WM_MBUTTONUP','%WM_MOUSEFIRST','%WM_MOUSEMOVE','%WM_MOUSEWHEEL','%WM_MOVE','%WM_MOVING', - '%WM_NCLBUTTONDOWN','%WM_NCRBUTTONDOWN','%WM_NEXTDLGCTL','%WM_NOTIFY','%WM_PAINT','%WM_QUIT','%WM_RBUTTONDBLCLK','%WM_RBUTTONDOWN', - '%WM_RBUTTONUP','%WM_SETFOCUS','%WM_SETFONT','%WM_SETTEXT','%WM_SIZE','%WM_SIZING','%WM_SYSCOMMAND','%WM_TIMER', - '%WM_USER','%WM_VSCROLL','%WS_BORDER','%WS_CAPTION','%WS_CHILD','%WS_CLIPCHILDREN','%WS_CLIPSIBLINGS','%WS_DISABLED', - '%WS_DLGFRAME','%WS_EX_ACCEPTFILES','%WS_EX_APPWINDOW','%WS_EX_CLIENTEDGE','%WS_EX_CONTEXTHELP','%WS_EX_CONTROLPARENT','%WS_EX_LAYERED','%WS_EX_LEFT', - '%WS_EX_LEFTSCROLLBAR','%WS_EX_LTRREADING','%WS_EX_MDICHILD','%WS_EX_NOPARENTNOTIFY','%WS_EX_OVERLAPPEDWINDOW','%WS_EX_PALETTEWINDOW','%WS_EX_RIGHT','%WS_EX_RIGHTSCROLLBAR', - '%WS_EX_RTLREADING','%WS_EX_STATICEDGE','%WS_EX_TOOLWINDOW','%WS_EX_TOPMOST','%WS_EX_TRANSPARENT','%WS_EX_WINDOWEDGE','%WS_GROUP','%WS_HSCROLL', - '%WS_ICONIC','%WS_MAXIMIZE','%WS_MAXIMIZEBOX','%WS_MINIMIZE','%WS_MINIMIZEBOX','%WS_OVERLAPPEDWINDOW','%WS_POPUP','%WS_POPUPWINDOW', - '%WS_SYSMENU','%WS_TABSTOP','%WS_THICKFRAME','%WS_VISIBLE','%WS_VSCROLL','%YELLOW','%ZERO','CRLF', - 'FALSE','M_E','M_PI','NULL','TAB','TRUE' - ) - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', '^', '&', ':' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000FF; font-weight: bold;', - 2 => 'color: #993333; font-style: italic; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #008000;' - ), - 'BRACKETS' => array( - 0 => 'color: #333333;' - ), - 'STRINGS' => array( - 0 => 'color: #800080;' - ), - 'NUMBERS' => array( - 0 => 'color: #CC0000;' - ), - 'METHODS' => array( - 1 => 'color: #66cc66;' - ), - 'SYMBOLS' => array( - 0 => 'color: #333333;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - 1 => '_' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/tsql.php b/_piecrust/libs/Geshi/geshi/tsql.php deleted file mode 100644 index 42e2ce2..0000000 --- a/_piecrust/libs/Geshi/geshi/tsql.php +++ /dev/null @@ -1,375 +0,0 @@ - 'T-SQL', - 'COMMENT_SINGLE' => array(1 => '--'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - // Datatypes - 'bigint', 'tinyint', 'money', - 'smallmoney', 'datetime', 'smalldatetime', - 'text', 'nvarchar', 'ntext', 'varbinary', 'image', - 'sql_variant', 'uniqueidentifier', - - // Keywords - 'ABSOLUTE', 'ACTION', 'ADD', 'ADMIN', 'AFTER', 'AGGREGATE', 'ALIAS', 'ALLOCATE', 'ALTER', 'ARE', 'ARRAY', 'AS', - 'ASC', 'ASSERTION', 'AT', 'AUTHORIZATION', 'BACKUP', 'BEFORE', 'BEGIN', 'BINARY', 'BIT', 'BLOB', 'BOOLEAN', 'BOTH', 'BREADTH', - 'BREAK', 'BROWSE', 'BULK', 'BY', 'CALL', 'CASCADE', 'CASCADED', 'CASE', 'CAST', 'CATALOG', 'CHAR', 'CHARACTER', 'CHECK', 'CHECKPOINT', - 'CLASS', 'CLOB', 'CLOSE', 'CLUSTERED', 'COALESCE', 'COLLATE', 'COLLATION', 'COLUMN', 'COMMIT', 'COMPLETION', 'COMPUTE', 'CONNECT', - 'CONNECTION', 'CONSTRAINT', 'CONSTRAINTS', 'CONSTRUCTOR', 'CONTAINS', 'CONTAINSTABLE', 'CONTINUE', 'CONVERT', 'CORRESPONDING', 'CREATE', - 'CUBE', 'CURRENT', 'CURRENT_DATE', 'CURRENT_PATH', 'CURRENT_ROLE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER', - 'CURSOR', 'CYCLE', 'DATA', 'DATABASE', 'DATE', 'DAY', 'DBCC', 'DEALLOCATE', 'DEC', 'DECIMAL', 'DECLARE', 'DEFAULT', 'DEFERRABLE', - 'DEFERRED', 'DELETE', 'DENY', 'DEPTH', 'DEREF', 'DESC', 'DESCRIBE', 'DESCRIPTOR', 'DESTROY', 'DESTRUCTOR', 'DETERMINISTIC', - 'DIAGNOSTICS', 'DICTIONARY', 'DISCONNECT', 'DISK', 'DISTINCT', 'DISTRIBUTED', 'DOMAIN', 'DOUBLE', 'DROP', 'DUMMY', 'DUMP', 'DYNAMIC', - 'EACH', 'ELSE', 'END', 'END-EXEC', 'EQUALS', 'ERRLVL', 'ESCAPE', 'EVERY', 'EXCEPT', 'EXCEPTION', 'EXEC', 'EXECUTE', 'EXIT', - 'EXTERNAL', 'FALSE', 'FETCH', 'FILE', 'FILLFACTOR', 'FIRST', 'FLOAT', 'FOR', 'FOREIGN', 'FOUND', 'FREE', 'FREETEXT', 'FREETEXTTABLE', - 'FROM', 'FULL', 'FUNCTION', 'GENERAL', 'GET', 'GLOBAL', 'GOTO', 'GRANT', 'GROUP', 'GROUPING', 'HAVING', 'HOLDLOCK', 'HOST', 'HOUR', - 'IDENTITY', 'IDENTITY_INSERT', 'IDENTITYCOL', 'IF', 'IGNORE', 'IMMEDIATE', 'INDEX', 'INDICATOR', 'INITIALIZE', 'INITIALLY', - 'INNER', 'INOUT', 'INPUT', 'INSERT', 'INT', 'INTEGER', 'INTERSECT', 'INTERVAL', 'INTO', 'IS', 'ISOLATION', 'ITERATE', 'KEY', - 'KILL', 'LANGUAGE', 'LARGE', 'LAST', 'LATERAL', 'LEADING', 'LEFT', 'LESS', 'LEVEL', 'LIMIT', 'LINENO', 'LOAD', 'LOCAL', - 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCATOR', 'MAP', 'MATCH', 'MINUTE', 'MODIFIES', 'MODIFY', 'MODULE', 'MONTH', 'NAMES', 'NATIONAL', - 'NATURAL', 'NCHAR', 'NCLOB', 'NEW', 'NEXT', 'NO', 'NOCHECK', 'NONCLUSTERED', 'NONE', 'NULLIF', 'NUMERIC', 'OBJECT', 'OF', - 'OFF', 'OFFSETS', 'OLD', 'ON', 'ONLY', 'OPEN', 'OPENDATASOURCE', 'OPENQUERY', 'OPENROWSET', 'OPENXML', 'OPERATION', 'OPTION', - 'ORDER', 'ORDINALITY', 'OUT', 'OUTPUT', 'OVER', 'PAD', 'PARAMETER', 'PARAMETERS', 'PARTIAL', 'PATH', 'PERCENT', 'PLAN', - 'POSTFIX', 'PRECISION', 'PREFIX', 'PREORDER', 'PREPARE', 'PRESERVE', 'PRIMARY', 'PRINT', 'PRIOR', 'PRIVILEGES', 'PROC', 'PROCEDURE', - 'PUBLIC', 'RAISERROR', 'READ', 'READS', 'READTEXT', 'REAL', 'RECONFIGURE', 'RECURSIVE', 'REF', 'REFERENCES', 'REFERENCING', 'RELATIVE', - 'REPLICATION', 'RESTORE', 'RESTRICT', 'RESULT', 'RETURN', 'RETURNS', 'REVOKE', 'RIGHT', 'ROLE', 'ROLLBACK', 'ROLLUP', 'ROUTINE', 'ROW', - 'ROWGUIDCOL', 'ROWS', 'RULE', 'SAVE', 'SAVEPOINT', 'SCHEMA', 'SCOPE', 'SCROLL', 'SEARCH', 'SECOND', 'SECTION', 'SELECT', - 'SEQUENCE', 'SESSION', 'SESSION_USER', 'SET', 'SETS', 'SETUSER', 'SHUTDOWN', 'SIZE', 'SMALLINT', 'SPACE', 'SPECIFIC', - 'SPECIFICTYPE', 'SQL', 'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNING', 'START', 'STATE', 'STATEMENT', 'STATIC', 'STATISTICS', 'STRUCTURE', - 'SYSTEM_USER', 'TABLE', 'TEMPORARY', 'TERMINATE', 'TEXTSIZE', 'THAN', 'THEN', 'TIME', 'TIMESTAMP', 'TIMEZONE_HOUR', 'TIMEZONE_MINUTE', - 'TO', 'TOP', 'TRAILING', 'TRAN', 'TRANSACTION', 'TRANSLATION', 'TREAT', 'TRIGGER', 'TRUE', 'TRUNCATE', 'TSEQUAL', 'UNDER', 'UNION', - 'UNIQUE', 'UNKNOWN', 'UNNEST', 'UPDATE', 'UPDATETEXT', 'USAGE', 'USE', 'USER', 'USING', 'VALUE', 'VALUES', 'VARCHAR', 'VARIABLE', - 'VARYING', 'VIEW', 'WAITFOR', 'WHEN', 'WHENEVER', 'WHERE', 'WHILE', 'WITH', 'WITHOUT', 'WORK', 'WRITE', 'WRITETEXT', 'YEAR', 'ZONE', - 'UNCOMMITTED', 'NOCOUNT', - ), - 2 => array( - /* - Built-in functions - Highlighted in pink. - */ - - //Configuration Functions - '@@DATEFIRST','@@OPTIONS','@@DBTS','@@REMSERVER','@@LANGID','@@SERVERNAME', - '@@LANGUAGE','@@SERVICENAME','@@LOCK_TIMEOUT','@@SPID','@@MAX_CONNECTIONS', - '@@TEXTSIZE','@@MAX_PRECISION','@@VERSION','@@NESTLEVEL', - - //Cursor Functions - '@@CURSOR_ROWS','@@FETCH_STATUS', - - //Date and Time Functions - 'DATEADD','DATEDIFF','DATENAME','DATEPART','GETDATE','GETUTCDATE', - - //Mathematical Functions - 'ABS','DEGREES','RAND','ACOS','EXP','ROUND','ASIN','FLOOR','SIGN', - 'ATAN','LOG','SIN','ATN2','LOG10','SQUARE','CEILING','PI','SQRT','COS', - 'POWER','TAN','COT','RADIANS', - - //Meta Data Functions - 'COL_LENGTH','COL_NAME','FULLTEXTCATALOGPROPERTY', - 'COLUMNPROPERTY','FULLTEXTSERVICEPROPERTY','DATABASEPROPERTY','INDEX_COL', - 'DATABASEPROPERTYEX','INDEXKEY_PROPERTY','DB_ID','INDEXPROPERTY','DB_NAME', - 'OBJECT_ID','FILE_ID','OBJECT_NAME','FILE_NAME','OBJECTPROPERTY','FILEGROUP_ID', - '@@PROCID','FILEGROUP_NAME','SQL_VARIANT_PROPERTY','FILEGROUPPROPERTY', - 'TYPEPROPERTY','FILEPROPERTY', - - //Security Functions - 'IS_SRVROLEMEMBER','SUSER_SID','SUSER_SNAME','USER_ID', - 'HAS_DBACCESS','IS_MEMBER', - - //String Functions - 'ASCII','SOUNDEX','PATINDEX','CHARINDEX','REPLACE','STR', - 'DIFFERENCE','QUOTENAME','STUFF','REPLICATE','SUBSTRING','LEN', - 'REVERSE','UNICODE','LOWER','UPPER','LTRIM','RTRIM', - - //System Functions - 'APP_NAME','COLLATIONPROPERTY','@@ERROR','FORMATMESSAGE', - 'GETANSINULL','HOST_ID','HOST_NAME','IDENT_CURRENT','IDENT_INCR', - 'IDENT_SEED','@@IDENTITY','ISDATE','ISNUMERIC','PARSENAME','PERMISSIONS', - '@@ROWCOUNT','ROWCOUNT_BIG','SCOPE_IDENTITY','SERVERPROPERTY','SESSIONPROPERTY', - 'STATS_DATE','@@TRANCOUNT','USER_NAME', - - //System Statistical Functions - '@@CONNECTIONS','@@PACK_RECEIVED','@@CPU_BUSY','@@PACK_SENT', - '@@TIMETICKS','@@IDLE','@@TOTAL_ERRORS','@@IO_BUSY', - '@@TOTAL_READ','@@PACKET_ERRORS','@@TOTAL_WRITE', - - //Text and Image Functions - 'TEXTPTR','TEXTVALID', - - //Aggregate functions - 'AVG', 'MAX', 'BINARY_CHECKSUM', 'MIN', 'CHECKSUM', 'SUM', 'CHECKSUM_AGG', - 'STDEV', 'COUNT', 'STDEVP', 'COUNT_BIG', 'VAR', 'VARP' - ), - 3 => array( - /* - System stored procedures - Higlighted dark brown - */ - - //Active Directory Procedures - 'sp_ActiveDirectory_Obj', 'sp_ActiveDirectory_SCP', - - //Catalog Procedures - 'sp_column_privileges', 'sp_special_columns', 'sp_columns', 'sp_sproc_columns', - 'sp_databases', 'sp_statistics', 'sp_fkeys', 'sp_stored_procedures', 'sp_pkeys', - 'sp_table_privileges', 'sp_server_info', 'sp_tables', - - //Cursor Procedures - 'sp_cursor_list', 'sp_describe_cursor_columns', 'sp_describe_cursor', 'sp_describe_cursor_tables', - - //Database Maintenance Plan Procedures - 'sp_add_maintenance_plan', 'sp_delete_maintenance_plan_db', 'sp_add_maintenance_plan_db', - 'sp_delete_maintenance_plan_job', 'sp_add_maintenance_plan_job', 'sp_help_maintenance_plan', - 'sp_delete_maintenance_plan', - - //Distributed Queries Procedures - 'sp_addlinkedserver', 'sp_indexes', 'sp_addlinkedsrvlogin', 'sp_linkedservers', 'sp_catalogs', - 'sp_primarykeys', 'sp_column_privileges_ex', 'sp_columns_ex', - 'sp_table_privileges_ex', 'sp_tables_ex', 'sp_foreignkeys', - - //Full-Text Search Procedures - 'sp_fulltext_catalog', 'sp_help_fulltext_catalogs_cursor', 'sp_fulltext_column', - 'sp_help_fulltext_columns', 'sp_fulltext_database', 'sp_help_fulltext_columns_cursor', - 'sp_fulltext_service', 'sp_help_fulltext_tables', 'sp_fulltext_table', - 'sp_help_fulltext_tables_cursor', 'sp_help_fulltext_catalogs', - - //Log Shipping Procedures - 'sp_add_log_shipping_database', 'sp_delete_log_shipping_database', 'sp_add_log_shipping_plan', - 'sp_delete_log_shipping_plan', 'sp_add_log_shipping_plan_database', - 'sp_delete_log_shipping_plan_database', 'sp_add_log_shipping_primary', - 'sp_delete_log_shipping_primary', 'sp_add_log_shipping_secondary', - 'sp_delete_log_shipping_secondary', 'sp_can_tlog_be_applied', 'sp_get_log_shipping_monitor_info', - 'sp_change_monitor_role', 'sp_remove_log_shipping_monitor', 'sp_change_primary_role', - 'sp_resolve_logins', 'sp_change_secondary_role', 'sp_update_log_shipping_monitor_info', - 'sp_create_log_shipping_monitor_account', 'sp_update_log_shipping_plan', - 'sp_define_log_shipping_monitor', 'sp_update_log_shipping_plan_database', - - //OLE Automation Extended Stored Procedures - 'sp_OACreate', 'sp_OAMethod', 'sp_OADestroy', 'sp_OASetProperty', 'sp_OAGetErrorInfo', - 'sp_OAStop', 'sp_OAGetProperty', - - //Replication Procedures - 'sp_add_agent_parameter', 'sp_enableagentoffload', 'sp_add_agent_profile', - 'sp_enumcustomresolvers', 'sp_addarticle', 'sp_enumdsn', 'sp_adddistpublisher', - 'sp_enumfullsubscribers', 'sp_adddistributiondb', 'sp_expired_subscription_cleanup', - 'sp_adddistributor', 'sp_generatefilters', 'sp_addmergealternatepublisher', - 'sp_getagentoffloadinfo', 'sp_addmergearticle', 'sp_getmergedeletetype', 'sp_addmergefilter', - 'sp_get_distributor', 'sp_addmergepublication', 'sp_getqueuedrows', 'sp_addmergepullsubscription', - 'sp_getsubscriptiondtspackagename', 'sp_addmergepullsubscription_agent', 'sp_grant_publication_access', - 'sp_addmergesubscription', 'sp_help_agent_default', 'sp_addpublication', 'sp_help_agent_parameter', - 'sp_addpublication_snapshot', 'sp_help_agent_profile', 'sp_addpublisher70', 'sp_helparticle', - 'sp_addpullsubscription', 'sp_helparticlecolumns', 'sp_addpullsubscription_agent', 'sp_helparticledts', - 'sp_addscriptexec', 'sp_helpdistpublisher', 'sp_addsubscriber', 'sp_helpdistributiondb', - 'sp_addsubscriber_schedule', 'sp_helpdistributor', 'sp_addsubscription', 'sp_helpmergealternatepublisher', - 'sp_addsynctriggers', 'sp_helpmergearticle', 'sp_addtabletocontents', 'sp_helpmergearticlecolumn', - 'sp_adjustpublisheridentityrange', 'sp_helpmergearticleconflicts', 'sp_article_validation', - 'sp_helpmergeconflictrows', 'sp_articlecolumn', 'sp_helpmergedeleteconflictrows', 'sp_articlefilter', - 'sp_helpmergefilter', 'sp_articlesynctranprocs', 'sp_helpmergepublication', 'sp_articleview', - 'sp_helpmergepullsubscription', 'sp_attachsubscription', 'sp_helpmergesubscription', 'sp_browsesnapshotfolder', - 'sp_helppublication', 'sp_browsemergesnapshotfolder', 'sp_help_publication_access', 'sp_browsereplcmds', - 'sp_helppullsubscription', 'sp_change_agent_parameter', 'sp_helpreplfailovermode', 'sp_change_agent_profile', - 'sp_helpreplicationdboption', 'sp_changearticle', 'sp_helpreplicationoption', 'sp_changedistpublisher', - 'sp_helpsubscriberinfo', 'sp_changedistributiondb', 'sp_helpsubscription', 'sp_changedistributor_password', - 'sp_ivindexhasnullcols', 'sp_changedistributor_property', 'sp_helpsubscription_properties', 'sp_changemergearticle', - 'sp_link_publication', 'sp_changemergefilter', 'sp_marksubscriptionvalidation', 'sp_changemergepublication', - 'sp_mergearticlecolumn', 'sp_changemergepullsubscription', 'sp_mergecleanupmetadata', 'sp_changemergesubscription', - 'sp_mergedummyupdate', 'sp_changepublication', 'sp_mergesubscription_cleanup', 'sp_changesubscriber', - 'sp_publication_validation', 'sp_changesubscriber_schedule', 'sp_refreshsubscriptions', 'sp_changesubscriptiondtsinfo', - 'sp_reinitmergepullsubscription', 'sp_changesubstatus', 'sp_reinitmergesubscription', 'sp_change_subscription_properties', - 'sp_reinitpullsubscription', 'sp_check_for_sync_trigger', 'sp_reinitsubscription', 'sp_copymergesnapshot', - 'sp_removedbreplication', 'sp_copysnapshot', 'sp_repladdcolumn', 'sp_copysubscription', 'sp_replcmds', - 'sp_deletemergeconflictrow', 'sp_replcounters', 'sp_disableagentoffload', 'sp_repldone', 'sp_drop_agent_parameter', - 'sp_repldropcolumn', 'sp_drop_agent_profile', 'sp_replflush', 'sp_droparticle', 'sp_replicationdboption', - 'sp_dropanonymouseagent', 'sp_replication_agent_checkup', 'sp_dropdistpublisher', 'sp_replqueuemonitor', - 'sp_dropdistributiondb', 'sp_replsetoriginator', 'sp_dropmergealternatepublisher', 'sp_replshowcmds', - 'sp_dropdistributor', 'sp_repltrans', 'sp_dropmergearticle', 'sp_restoredbreplication', 'sp_dropmergefilter', - 'sp_revoke_publication_access', 'sp_scriptsubconflicttable', 'sp_dropmergepublication', 'sp_script_synctran_commands', - 'sp_dropmergepullsubscription', 'sp_setreplfailovermode', 'sp_showrowreplicainfo', 'sp_dropmergesubscription', - 'sp_subscription_cleanup', 'sp_droppublication', 'sp_table_validation', 'sp_droppullsubscription', - 'sp_update_agent_profile', 'sp_dropsubscriber', 'sp_validatemergepublication', 'sp_dropsubscription', - 'sp_validatemergesubscription', 'sp_dsninfo', 'sp_vupgrade_replication', 'sp_dumpparamcmd', - - //Security Procedures - 'sp_addalias', 'sp_droprolemember', 'sp_addapprole', 'sp_dropserver', 'sp_addgroup', 'sp_dropsrvrolemember', - 'sp_dropuser', 'sp_addlogin', 'sp_grantdbaccess', 'sp_addremotelogin', - 'sp_grantlogin', 'sp_addrole', 'sp_helpdbfixedrole', 'sp_addrolemember', 'sp_helpgroup', - 'sp_addserver', 'sp_helplinkedsrvlogin', 'sp_addsrvrolemember', 'sp_helplogins', 'sp_adduser', - 'sp_helpntgroup', 'sp_approlepassword', 'sp_helpremotelogin', 'sp_changedbowner', 'sp_helprole', - 'sp_changegroup', 'sp_helprolemember', 'sp_changeobjectowner', 'sp_helprotect', 'sp_change_users_login', - 'sp_helpsrvrole', 'sp_dbfixedrolepermission', 'sp_helpsrvrolemember', 'sp_defaultdb', 'sp_helpuser', - 'sp_defaultlanguage', 'sp_MShasdbaccess', 'sp_denylogin', 'sp_password', 'sp_dropalias', 'sp_remoteoption', - 'sp_dropapprole', 'sp_revokedbaccess', 'sp_dropgroup', 'sp_revokelogin', 'sp_droplinkedsrvlogin', - 'sp_setapprole', 'sp_droplogin', 'sp_srvrolepermission', 'sp_dropremotelogin', 'sp_validatelogins', 'sp_droprole', - - //SQL Mail Procedures - 'sp_processmail', 'xp_sendmail', 'xp_deletemail', 'xp_startmail', 'xp_findnextmsg', 'xp_stopmail', 'xp_readmail', - - //SQL Profiler Procedures - 'sp_trace_create', 'sp_trace_setfilter', 'sp_trace_generateevent', 'sp_trace_setstatus', 'sp_trace_setevent', - - //SQL Server Agent Procedures - 'sp_add_alert', 'sp_help_jobhistory', 'sp_add_category', 'sp_help_jobschedule', 'sp_add_job', - 'sp_help_jobserver', 'sp_add_jobschedule', 'sp_help_jobstep', 'sp_add_jobserver', 'sp_help_notification', - 'sp_add_jobstep', 'sp_help_operator', 'sp_add_notification', 'sp_help_targetserver', - 'sp_add_operator', 'sp_help_targetservergroup', 'sp_add_targetservergroup', 'sp_helptask', - 'sp_add_targetsvrgrp_member', 'sp_manage_jobs_by_login', 'sp_addtask', 'sp_msx_defect', - 'sp_apply_job_to_targets', 'sp_msx_enlist', 'sp_delete_alert', 'sp_post_msx_operation', - 'sp_delete_category', 'sp_purgehistory', 'sp_delete_job', 'sp_purge_jobhistory', 'sp_delete_jobschedule', - 'sp_reassigntask', 'sp_delete_jobserver', 'sp_remove_job_from_targets', 'sp_delete_jobstep', - 'sp_resync_targetserver', 'sp_delete_notification', 'sp_start_job', 'sp_delete_operator', - 'sp_stop_job', 'sp_delete_targetserver', 'sp_update_alert', 'sp_delete_targetservergroup', - 'sp_update_category', 'sp_delete_targetsvrgrp_member', 'sp_update_job', 'sp_droptask', - 'sp_update_jobschedule', 'sp_help_alert', 'sp_update_jobstep', 'sp_help_category', - 'sp_update_notification', 'sp_help_downloadlist', 'sp_update_operator', 'sp_helphistory', - 'sp_update_targetservergroup', 'sp_help_job', 'sp_updatetask', 'xp_sqlagent_proxy_account', - - //System Procedures - 'sp_add_data_file_recover_suspect_db', 'sp_helpconstraint', 'sp_addextendedproc', - 'sp_helpdb', 'sp_addextendedproperty', 'sp_helpdevice', 'sp_add_log_file_recover_suspect_db', - 'sp_helpextendedproc', 'sp_addmessage', 'sp_helpfile', 'sp_addtype', 'sp_helpfilegroup', - 'sp_addumpdevice', 'sp_helpindex', 'sp_altermessage', 'sp_helplanguage', 'sp_autostats', - 'sp_helpserver', 'sp_attach_db', 'sp_helpsort', 'sp_attach_single_file_db', 'sp_helpstats', - 'sp_bindefault', 'sp_helptext', 'sp_bindrule', 'sp_helptrigger', 'sp_bindsession', - 'sp_indexoption', 'sp_certify_removable', 'sp_invalidate_textptr', 'sp_configure', - 'sp_lock', 'sp_create_removable', 'sp_monitor', 'sp_createstats', 'sp_procoption', - 'sp_cycle_errorlog', 'sp_recompile', 'sp_datatype_info', 'sp_refreshview', 'sp_dbcmptlevel', - 'sp_releaseapplock', 'sp_dboption', 'sp_rename', 'sp_dbremove', 'sp_renamedb', - 'sp_delete_backuphistory', 'sp_resetstatus', 'sp_depends', 'sp_serveroption', 'sp_detach_db', - 'sp_setnetname', 'sp_dropdevice', 'sp_settriggerorder', 'sp_dropextendedproc', 'sp_spaceused', - 'sp_dropextendedproperty', 'sp_tableoption', 'sp_dropmessage', 'sp_unbindefault', 'sp_droptype', - 'sp_unbindrule', 'sp_executesql', 'sp_updateextendedproperty', 'sp_getapplock', 'sp_updatestats', - 'sp_getbindtoken', 'sp_validname', 'sp_help', 'sp_who', - - //Web Assistant Procedures - 'sp_dropwebtask', 'sp_makewebtask', 'sp_enumcodepages', 'sp_runwebtask', - - //XML Procedures - 'sp_xml_preparedocument', 'sp_xml_removedocument', - - //General Extended Procedures - 'xp_cmdshellxp_logininfo', 'xp_enumgroups', 'xp_msver', 'xp_findnextmsgxp_revokelogin', - 'xp_grantlogin', 'xp_sprintf', 'xp_logevent', 'xp_sqlmaint', 'xp_loginconfig', 'xp_sscanf', - - //API System Stored Procedures - 'sp_cursor', 'sp_cursorclose', 'sp_cursorexecute', 'sp_cursorfetch', 'sp_cursoropen', - 'sp_cursoroption', 'sp_cursorprepare', 'sp_cursorunprepare', 'sp_execute', 'sp_prepare', 'sp_unprepare', - - //Misc - 'sp_createorphan', 'sp_droporphans', 'sp_reset_connection', 'sp_sdidebug' - ), - 4 => array( - //Function/sp's higlighted brown. - 'fn_helpcollations', 'fn_listextendedproperty ', 'fn_servershareddrives', - 'fn_trace_geteventinfo', 'fn_trace_getfilterinfo', 'fn_trace_getinfo', - 'fn_trace_gettable', 'fn_virtualfilestats','fn_listextendedproperty', - ), - ), - 'SYMBOLS' => array( - '!', '!=', '%', '&', '&&', '(', ')', '*', '+', '-', '/', '<', '<<', '<=', - '<=>', '<>', '=', '>', '>=', '>>', '^', 'ALL', 'AND', 'ANY', 'BETWEEN', 'CROSS', - 'EXISTS', 'IN', 'JOIN', 'LIKE', 'NOT', 'NULL', 'OR', 'OUTER', 'SOME', '|', '||', '~' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000FF;', - 2 => 'color: #FF00FF;', - 3 => 'color: #AF0000;', - 4 => 'color: #AF0000;' - ), - 'COMMENTS' => array( - 1 => 'color: #008080;', - 'MULTI' => 'color: #008080;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #808080;' - ), - 'STRINGS' => array( - 0 => 'color: #FF0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #000;' - ), - 'METHODS' => array( - 1 => 'color: #202020;', - 2 => 'color: #202020;' - ), - 'SYMBOLS' => array( - 0 => 'color: #808080;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/typoscript.php b/_piecrust/libs/Geshi/geshi/typoscript.php deleted file mode 100644 index c1e3806..0000000 --- a/_piecrust/libs/Geshi/geshi/typoscript.php +++ /dev/null @@ -1,300 +0,0 @@ - Complete rewrite - * 2005/07/29 (1.0.0) - * - First Release - * - * TODO (updated 2004/07/14) - * ------------------------- - * - * - ************************************************************************************* - * - * This file is part of GeSHi. - * - * GeSHi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GeSHi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeSHi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - ************************************************************************************/ - -$language_data = array ( - 'LANG_NAME' => 'TypoScript', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array(2 => '/(? GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - // Conditions: http://documentation.typo3.org/documentation/tsref/conditions/ - 1 => array( - 'browser', 'compatVersion', 'dayofmonth', 'dayofweek', 'device', - 'globalString', 'globalVars', 'hostname', 'hour', - 'ip', 'language', 'loginUser', 'loginuser', 'minute', - 'month', 'PIDinRootline', 'PIDupinRootline', - 'system', 'treelevel', 'useragent', 'userFunc', - 'usergroup', 'version' - ), - - // Functions: http://documentation.typo3.org/documentation/tsref/functions/ - 2 => array( - 'addParams', 'encapsLines', 'filelink', 'HTMLparser', - 'HTMLparser_tags', 'if', 'imageLinkWrap', - 'imgResource', 'makelinks', 'numRows', 'parseFunc', - 'select', 'split', 'stdWrap', 'tableStyle', 'tags', - 'textStyle', 'typolink' - ), - - // Toplevel objects: http://documentation.typo3.org/documentation/tsref/tlo-objects/ - 3 => array( - 'CARRAY', 'CONFIG', 'CONSTANTS', 'FE_DATA', 'FE_TABLE', 'FRAME', - 'FRAMESET', 'META', 'PAGE', 'plugin' - ), - - // Content Objects (cObject) : http://documentation.typo3.org/documentation/tsref/cobjects/ - 4 => array( - 'CASE', 'CLEARGIF', 'COA', 'COA_INT', 'COBJ_ARRAY', 'COLUMNS', - 'CONTENT', 'CTABLE', 'EDITPANEL', 'FILE', 'FORM', - 'HMENU', 'HRULER', 'HTML', 'IMAGE', 'IMGTEXT', - 'IMG_RESOURCE', 'LOAD_REGISTER', 'MULTIMEDIA', - 'OTABLE', 'PHP_SCRIPT', 'PHP_SCRIPT_EXT', - 'PHP_SCRIPT_INT', 'RECORDS', 'RESTORE_REGISTER', - 'SEARCHRESULT', 'TEMPLATE', 'TEXT', 'USER', - 'USER_INT' - ), - - // GIFBUILDER toplevel link: http://documentation.typo3.org/documentation/tsref/gifbuilder/ - 5 => array( - 'GIFBUILDER', - ), - - // GIFBUILDER: http://documentation.typo3.org/documentation/tsref/gifbuilder/ - // skipped fields: IMAGE, TEXT - // NOTE! the IMAGE and TEXT field already are linked in group 4, they - // cannot be linked twice . . . . unfortunately - 6 => array( - 'ADJUST', 'BOX', 'CROP', 'EFFECT', 'EMBOSS', - 'IMGMAP', 'OUTLINE', 'SCALE', 'SHADOW', - 'WORKAREA' - ), - - // MENU Objects: http://documentation.typo3.org/documentation/tsref/menu/ - 7 => array( - 'GMENU', 'GMENU_FOLDOUT', 'GMENU_LAYERS', 'IMGMENU', - 'IMGMENUITEM', 'JSMENU', 'JSMENUITEM', 'TMENU', - 'TMENUITEM', 'TMENU_LAYERS' - ), - - // MENU common properties: http://documentation.typo3.org/documentation/tsref/menu/common-properties/ - 8 => array( - 'alternativeSortingField', 'begin', 'debugItemConf', - 'imgNameNotRandom', 'imgNamePrefix', - 'itemArrayProcFunc', 'JSWindow', 'maxItems', - 'minItems', 'overrideId', 'sectionIndex', - 'showAccessRestrictedPages', 'submenuObjSuffixes' - ), - - // MENU item states: http://documentation.typo3.org/documentation/tsref/menu/item-states/ - 9 => array( - 'ACT', 'ACTIFSUB', 'ACTIFSUBRO', 'ACTRO', 'CUR', 'CURIFSUB', - 'CURIFSUBRO', 'CURRO', 'IFSUB', 'IFSUBRO', 'NO', - 'SPC', 'USERDEF1', 'USERDEF1RO', 'USERDEF2', - 'USERDEF2RO', 'USR', 'USRRO' - ), - ), - - // Does not include '-' because of stuff like htmlTag_langKey = en-GB and - // lib.nav-sub - 'SYMBOLS' => array( - 0 => array( - '|', - '+', '*', '/', '%', - '!', '&&', '^', - '<', '>', '=', - '?', ':', - '.' - ), - 1 => array( - '(', ')', '{', '}', '[', ']' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true, - 8 => true, - 9 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #ed7d14;', - 2 => 'font-weight: bold;', - 3 => 'color: #990000; font-weight: bold;', - 4 => 'color: #990000; font-weight: bold;', - 5 => 'color: #990000; font-weight: bold;', - 6 => 'color: #990000; font-weight: bold;', - 7 => 'color: #990000; font-weight: bold;', - 8 => 'font-weight: bold;', - 9 => 'color: #990000; font-weight: bold;', - ), - 'COMMENTS' => array( - 1 => 'color: #aaa; font-style: italic;', - 2 => 'color: #aaa; font-style: italic;', - 'MULTI' => 'color: #aaa; font-style: italic;' - ), - 'STRINGS' => array( - 0 => 'color: #ac14aa;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc0000;' - ), - 'METHODS' => array( - 1 => 'color: #0000e0; font-weight: bold;', - 2 => 'color: #0000e0; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'SYMBOLS' => array( - 0 => 'color: #339933; font-weight: bold;', - // Set this to the same value as brackets above - 1 => 'color: #009900; font-weight: bold;' - ), - 'REGEXPS' => array( - 0 => 'color: #009900;', - 1 => 'color: #009900; font-weight: bold;', - 2 => 'color: #3366CC;', - 3 => 'color: #000066; font-weight: bold;', - 4 => 'color: #ed7d14;', - 5 => 'color: #000066; font-weight: bold;', - 6 => 'color: #009900;', - 7 => 'color: #3366CC;' - ), - 'ESCAPE_CHAR' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => 'http://documentation.typo3.org/documentation/tsref/conditions/{FNAME}/', - 2 => 'http://documentation.typo3.org/documentation/tsref/functions/{FNAME}/', - 3 => 'http://documentation.typo3.org/documentation/tsref/tlo-objects/{FNAME}/', - 4 => 'http://documentation.typo3.org/documentation/tsref/cobjects/{FNAME}/', - 5 => 'http://documentation.typo3.org/documentation/tsref/gifbuilder/', - 6 => 'http://documentation.typo3.org/documentation/tsref/gifbuilder/{FNAME}/', - 7 => 'http://documentation.typo3.org/documentation/tsref/menu/{FNAME}/', - 8 => 'http://documentation.typo3.org/documentation/tsref/menu/common-properties/', - 9 => 'http://documentation.typo3.org/documentation/tsref/menu/item-states/' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - // Constant - 0 => array( - GESHI_SEARCH => '(\{)(\$[a-zA-Z_\.]+[a-zA-Z0-9_\.]*)(\})', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '\\3' - ), - - // Constant dollar sign - 1 => array( - GESHI_SEARCH => '(\$)([a-zA-Z_\.]+[a-zA-Z0-9_\.]*)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '\\2' - ), - - // xhtml tag - 2 => array( - GESHI_SEARCH => '(<[a-zA-Z\!\/].*?>)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => 's', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - - // extension keys / tables: (static|user|ttx|tx|tt|fe)_something[_something] - 3 => array( - GESHI_SEARCH => '(plugin\.|[^\.]\b)((?:static|user|ttx|tx|tt|fe)(?:_[0-9A-Za-z_]+?)\b)', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ), - - // conditions and controls - 4 => array( - GESHI_SEARCH => '(\[)(globalVar|global|end)\b', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => 'i', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ), - - // lowlevel setup and constant objects - 5 => array( - GESHI_SEARCH => '([^\.\$-\{]\b)(cObj|field|config|content|file|frameset|includeLibs|lib|page|plugin|register|resources|sitemap|sitetitle|styles|temp|tt_content|tt_news|types|xmlnews)\b', - GESHI_REPLACE => '\\2', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '\\1', - GESHI_AFTER => '' - ), - - // markers - 6 => array( - GESHI_SEARCH => '(###[^#]+###)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - - // hex color codes - 7 => array( - GESHI_SEARCH => '(#[a-fA-F0-9]{6}\b|#[a-fA-F0-9]{3}\b)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => '', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ) - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/unicon.php b/_piecrust/libs/Geshi/geshi/unicon.php deleted file mode 100644 index 839bc09..0000000 --- a/_piecrust/libs/Geshi/geshi/unicon.php +++ /dev/null @@ -1,210 +0,0 @@ - 'Unicon (Unified Extended Dialect of Icon)', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"', '\''), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'break', 'case', 'class', 'continue', 'create', 'default', 'do', - 'else', 'end', 'every', 'fail', 'for', 'if', 'import', 'initial', 'initially', - 'invocable', 'link', 'method', 'next', 'not', 'of', 'package', 'procedure', 'record', - 'repeat', 'return', 'switch', 'suspend', 'then', 'to', 'until', 'while' - ), - 2 => array( - 'global', 'local', 'static' - ), - 3 => array( - 'allocated', 'ascii', 'clock', 'collections', - 'column', 'cset', 'current', 'date', 'dateline', 'digits', - 'dump', 'e', 'error', 'errornumber', 'errortext', - 'errorvalue', 'errout', 'eventcode', 'eventsource', 'eventvalue', - 'fail', 'features', 'file', 'host', 'input', 'lcase', - 'letters', 'level', 'line', 'main', 'now', 'null', - 'output', 'phi', 'pi', 'pos', 'progname', 'random', - 'regions', 'source', 'storage', 'subject', 'syserr', 'time', - 'trace', 'ucase', 'version', 'col', 'control', 'interval', - 'ldrag', 'lpress', 'lrelease', 'mdrag', 'meta', 'mpress', - 'mrelease', 'rdrag', 'resize', 'row', 'rpress', 'rrelease', - 'shift', 'window', 'x', 'y' - ), - 4 => array( - 'abs', 'acos', 'any', 'args', 'asin', 'atan', 'bal', 'center', 'char', - 'chmod', 'close', 'cofail', 'collect', 'copy', 'cos', 'cset', 'ctime', 'dbcolumns', - 'dbdriver', 'dbkeys', 'dblimits', 'dbproduction', 'dbtables', 'delay', 'delete', 'detab', - 'display', 'dtor', 'entab', 'errorclear', 'event', 'eventmask', 'EvGet', 'exit', 'exp', - 'fetch', 'fieldnames', 'find', 'flock', 'flush', 'function', 'get', 'getch', 'getche', - 'getenv', 'gettimeofday', 'globalnames', 'gtime', 'iand', 'icom', 'image', 'insert', - 'integer', 'ior', 'ishift', 'ixor', 'key', 'left', 'list', 'load', 'loadfunc', - 'localnames', 'log', 'many', 'map', 'match', 'member', 'mkdir', 'move', 'name', 'numeric', - 'open', 'opmask', 'ord', 'paramnames', 'parent', 'pipe', 'pop', 'pos', 'proc', 'pull', - 'push', 'put', 'read', 'reads', 'real', 'receive', 'remove', 'rename', 'repl', 'reverse', - 'right', 'rmdir', 'rtod', 'runerr', 'seek', 'select', 'send', 'seq', 'serial', 'set', - 'setenv', 'sort', 'sortf', 'sql', 'sqrt', 'stat', 'staticnames', 'stop', 'string', 'system', 'tab', - 'table', 'tan', 'trap', 'trim', 'truncate', 'type', 'upto', 'utime', 'variable', 'where', - 'write', 'writes' - ), - 5 => array( - 'Active', 'Alert', 'Bg', 'Clip', 'Clone', 'Color', 'ColorValue', - 'CopyArea', 'Couple', 'DrawArc', 'DrawCircle', 'DrawCurve', 'DrawCylinder', 'DrawDisk', - 'DrawImage', 'DrawLine', 'DrawPoint', 'DrawPolygon', 'DrawRectangle', 'DrawSegment', - 'DrawSphere', 'DrawString', 'DrawTorus', 'EraseArea', 'Event', 'Fg', 'FillArc', - 'FillCircle', 'FillPolygon', 'FillRectangle', 'Font', 'FreeColor', 'GotoRC', 'GotoXY', - 'IdentifyMatrix', 'Lower', 'MatrixMode', 'NewColor', 'PaletteChars', 'PaletteColor', - 'PaletteKey', 'Pattern', 'Pending', 'Pixel', 'PopMatrix', 'PushMatrix', 'PushRotate', - 'PushScale', 'PushTranslate', 'QueryPointer', 'Raise', 'ReadImage', 'Refresh', 'Rotate', - 'Scale', 'Texcoord', 'TextWidth', 'Texture', 'Translate', 'Uncouple', 'WAttrib', - 'WDefault', 'WFlush', 'WindowContents', 'WriteImage', 'WSync' - ), - 6 => array( - 'define', 'include', 'ifdef', 'ifndef', 'else', 'endif', 'error', - 'line', 'undef' - ), - 7 => array( - '_V9', '_AMIGA', '_ACORN', '_CMS', '_MACINTOSH', '_MSDOS_386', - '_MS_WINDOWS_NT', '_MSDOS', '_MVS', '_OS2', '_POR', 'T', '_UNIX', '_POSIX', '_DBM', - '_VMS', '_ASCII', '_EBCDIC', '_CO_EXPRESSIONS', '_CONSOLE_WINDOW', '_DYNAMIC_LOADING', - '_EVENT_MONITOR', '_EXTERNAL_FUNCTIONS', '_KEYBOARD_FUNCTIONS', '_LARGE_INTEGERS', - '_MULTITASKING', '_PIPES', '_RECORD_IO', '_SYSTEM_FUNCTION', '_MESSAGING', '_GRAPHICS', - '_X_WINDOW_SYSTEM', '_MS_WINDOWS', '_WIN32', '_PRESENTATION_MGR', '_ARM_FUNCTIONS', - '_DOS_FUNCTIONS' - ), - 8 => array( - 'line') - ), - 'SYMBOLS' => array( - 1 => array( - '(', ')', '{', '}', '[', ']', '+', '-', '*', '/', '\\', '%', '=', '<', '>', '!', '^', - '&', '|', '?', ':', ';', ',', '.', '~', '@' - ), - 2 => array( - '$(', '$)', '$<', '$>' - ) - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - 5 => true, - 6 => true, - 7 => true, - 8 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #b1b100;', - 3 => 'color: #b1b100;', - 4 => 'color: #b1b100;', - 5 => 'color: #b1b100;', - 6 => 'color: #b1b100;', - 7 => 'color: #b1b100;', - 8 => 'color: #b1b100;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;', - ), - 'METHODS' => array( - 0 => 'color: #004000;' - ), - 'SYMBOLS' => array( - 1 => 'color: #339933;' - ), - 'REGEXPS' => array(), - 'SCRIPT' => array() - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '', - 7 => '', - 8 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array(1 => '.'), - 'REGEXPS' => array(), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array(), - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 3 => array( - 'DISALLOWED_BEFORE' => '(?<=&)' - ), - 4 => array( - 'DISALLOWED_BEFORE' => "(? "(?![a-zA-Z0-9_\"\'])" - ), - 6 => array( - 'DISALLOWED_BEFORE' => '(?<=\$)' - ), - 8 => array( - 'DISALLOWED_BEFORE' => '(?<=#)' - ) - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/vala.php b/_piecrust/libs/Geshi/geshi/vala.php deleted file mode 100644 index 1e4cece..0000000 --- a/_piecrust/libs/Geshi/geshi/vala.php +++ /dev/null @@ -1,151 +0,0 @@ - 'Vala', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array( - //Using and Namespace directives (basic support) - //Please note that the alias syntax for using is not supported - 3 => '/(?:(?<=using[\\n\\s])|(?<=namespace[\\n\\s]))[\\n\\s]*([a-zA-Z0-9_]+\\.)*[a-zA-Z0-9_]+[\n\s]*(?=[;=])/i'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'HARDQUOTE' => array('"""'), - 'HARDESCAPE' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'as', 'abstract', 'base', 'break', 'case', 'catch', 'const', - 'construct', 'continue', 'default', 'delete', 'dynamic', 'do', - 'else', 'ensures', 'extern', 'false', 'finally', 'for', 'foreach', - 'get', 'if', 'in', 'inline', 'internal', 'lock', 'namespace', - 'null', 'out', 'override', 'private', 'protected', 'public', 'ref', - 'requires', 'return', 'set', 'static', 'switch', 'this', 'throw', - 'throws', 'true', 'try', 'using', 'value', 'var', 'virtual', - 'volatile', 'void', 'yield', 'yields', 'while' - ), - 2 => array( - '#elif', '#endif', '#else', '#if' - ), - 3 => array( - 'is', 'new', 'owned', 'sizeof', 'typeof', 'unchecked', 'unowned', 'weak' - ), - 4 => array( - 'bool', 'char', 'class', 'delegate', 'double', 'enum', - 'errordomain', 'float', 'int', 'int8', 'int16', 'int32', 'int64', - 'interface', 'long', 'short', 'signal', 'size_t', 'ssize_t', - 'string', 'struct', 'uchar', 'uint', 'uint8', 'uint16', 'uint32', - 'ulong', 'unichar', 'ushort' - ) - ), - 'SYMBOLS' => array( - '+', '-', '*', '?', '=', '/', '%', '&', '>', '<', '^', '!', ':', ';', - '(', ')', '{', '}', '[', ']', '|' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true, - 4 => true, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0600FF;', - 2 => 'color: #FF8000; font-weight: bold;', - 3 => 'color: #008000;', - 4 => 'color: #FF0000;' - ), - 'COMMENTS' => array( - 1 => 'color: #008080; font-style: italic;', - 3 => 'color: #008080;', - 'MULTI' => 'color: #008080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #008080; font-weight: bold;', - 'HARD' => 'color: #008080; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #666666;', - 'HARD' => 'color: #666666;' - ), - 'NUMBERS' => array( - 0 => 'color: #FF0000;' - ), - 'METHODS' => array( - 1 => 'color: #0000FF;', - 2 => 'color: #0000FF;' - ), - 'SYMBOLS' => array( - 0 => 'color: #008000;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 'DISALLOWED_BEFORE' => "(?|^])", - 'DISALLOWED_AFTER' => "(?![a-zA-Z0-9_<\|%\\-])" - ) - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/vb.php b/_piecrust/libs/Geshi/geshi/vb.php deleted file mode 100644 index 638da5e..0000000 --- a/_piecrust/libs/Geshi/geshi/vb.php +++ /dev/null @@ -1,157 +0,0 @@ - 'Visual Basic', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array( - // Comments (either single or multiline with _ - 1 => '/\'.*(? GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'Binary', 'Boolean', 'Byte', 'Currency', 'Date', 'Decimal', 'Double', - 'String', 'Enum', 'Integer', 'Long', 'Object', 'Single', 'Variant' - ), - 2 => array( - 'CreateObject', 'GetObject', 'New', 'Option', 'Function', - 'Call', 'Private', 'Public', 'Sub', 'Explicit', 'Compare', 'Exit' - ), - 3 => array( - 'And', 'Case', 'Do', 'Each', 'Else', 'ElseIf', 'For', - 'Goto', 'If', 'Is', 'Loop', 'Next', 'Not', 'Or', 'Select', 'Step', - 'Then', 'To', 'Until', 'While', 'With', 'Xor', 'WithEvents', - 'DoEvents', 'Close', 'Like', 'In', 'End' - ), - 4 => array( - 'As', 'Dim', 'Get', 'Set', 'ReDim', 'Error', - 'Resume', 'Declare', 'Let', 'ByRef', 'ByVal', - 'Optional', 'Property', 'Control', 'UBound', 'Mod', - 'GoSub', 'Implements', 'Input', 'LBound', 'Static', 'Stop', - 'Type', 'TypeOf', 'On', 'Open', 'Output', 'ParamArray', - 'Preserve', 'Print', 'RaiseEvent', 'Random', 'Line' - ), - 5 => array( - 'Nothing', 'False', 'True', 'Null', 'Empty' - ), - 6 => array( - 'ErrorHandler','ExitProc', 'PublishReport' - ), - ), - 'SYMBOLS' => array( - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #F660AB; font-weight: bold;', - 2 => 'color: #E56717; font-weight: bold;', - 3 => 'color: #8D38C9; font-weight: bold;', - 4 => 'color: #151B8D; font-weight: bold;', - 5 => 'color: #00C2FF; font-weight: bold;', - 6 => 'color: #3EA99F; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #008000;' - ), - 'BRACKETS' => array( - ), - 'STRINGS' => array( - 0 => 'color: #800000;' - ), - 'NUMBERS' => array( - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #800000; font-weight: bold;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '', - 6 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'BRACKETS' => GESHI_NEVER, - 'SYMBOLS' => GESHI_NEVER, - 'NUMBERS' => GESHI_NEVER - ) - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/vbnet.php b/_piecrust/libs/Geshi/geshi/vbnet.php deleted file mode 100644 index 0121f8d..0000000 --- a/_piecrust/libs/Geshi/geshi/vbnet.php +++ /dev/null @@ -1,201 +0,0 @@ - 'vb.net', - 'COMMENT_SINGLE' => array(1 => "'"), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - '3DDKSHADOW', '3DHIGHLIGHT', '3DLIGHT', 'ABORT', 'ABORTRETRYIGNORE', 'ACTIVEBORDER', - 'ACTIVETITLEBAR', 'ALIAS', 'APPLICATIONMODAL', 'APPLICATIONWORKSPACE', 'ARCHIVE', - 'BACK', 'BINARYCOMPARE', 'BLACK', 'BLUE', 'BUTTONFACE', 'BUTTONSHADOW', 'BUTTONTEXT', - 'CANCEL', 'CDROM', 'CR', 'CRITICAL', 'CRLF', 'CYAN', 'DEFAULT', 'DEFAULTBUTTON1', - 'DEFAULTBUTTON2', 'DEFAULTBUTTON3', 'DESKTOP', 'DIRECTORY', 'EXCLAMATION', 'FALSE', - 'FIXED', 'FORAPPENDING', 'FORMFEED', 'FORREADING', 'FORWRITING', 'FROMUNICODE', - 'GRAYTEXT', 'GREEN', 'HIDDEN', 'HIDE', 'HIGHLIGHT', 'HIGHLIGHTTEXT', 'HIRAGANA', - 'IGNORE', 'INACTIVEBORDER', 'INACTIVECAPTIONTEXT', 'INACTIVETITLEBAR', 'INFOBACKGROUND', - 'INFORMATION', 'INFOTEXT', 'KATAKANALF', 'LOWERCASE', 'MAGENTA', 'MAXIMIZEDFOCUS', - 'MENUBAR', 'MENUTEXT', 'METHOD', 'MINIMIZEDFOCUS', 'MINIMIZEDNOFOCUS', 'MSGBOXRIGHT', - 'MSGBOXRTLREADING', 'MSGBOXSETFOREGROUND', 'NARROW', 'NEWLINE', 'NO', 'NORMAL', - 'NORMALFOCUS', 'NORMALNOFOCUS', 'NULLSTRING', 'OBJECTERROR', 'OK', 'OKCANCEL', 'OKONLY', - 'PROPERCASE', 'QUESTION', 'RAMDISK', 'READONLY', 'RED', 'REMOTE', 'REMOVABLE', 'RETRY', - 'RETRYCANCEL', 'SCROLLBARS', 'SYSTEMFOLDER', 'SYSTEMMODAL', 'TEMPORARYFOLDER', - 'TEXTCOMPARE', 'TITLEBARTEXT', 'TRUE', 'UNICODE', 'UNKNOWN', 'UPPERCASE', 'VERTICALTAB', - 'VOLUME', 'WHITE', 'WIDE', 'WIN16', 'WIN32', 'WINDOWBACKGROUND', 'WINDOWFRAME', - 'WINDOWSFOLDER', 'WINDOWTEXT', 'YELLOW', 'YES', 'YESNO', 'YESNOCANCEL' - ), - 2 => array( - 'AndAlso', 'As', 'ADDHANDLER', 'ASSEMBLY', 'AUTO', 'Binary', 'ByRef', 'ByVal', 'BEGINEPILOGUE', - 'Else', 'ElseIf', 'Empty', 'Error', 'ENDPROLOGUE', 'EXTERNALSOURCE', 'ENVIRON', 'For', - 'Friend', 'Func', 'GET', 'HANDLES', 'Input', 'Is', 'IsNot', 'Len', 'Lock', 'Me', 'Mid', 'MUSTINHERIT', 'MustOverride', - 'MYBASE', 'MYCLASS', 'New', 'Next', 'Nothing', 'Null', 'NOTINHERITABLE', - 'NOTOVERRIDABLE', 'Of', 'OFF', 'On', 'Option', 'Optional', 'Overloads', 'OVERRIDABLE', 'Overrides', 'ParamArray', 'Predicate', - 'Print', 'Private', 'Property', 'Public', 'Resume', 'Return', 'Seek', 'Static', 'Step', - 'String', 'SHELL', 'SENDKEYS', 'SET', 'Shared', 'Then', 'Time', 'To', 'THROW', 'WithEvents' - ), - 3 => array( - 'COLLECTION', 'DEBUG', 'DICTIONARY', 'DRIVE', 'DRIVES', 'ERR', 'FILE', 'FILES', - 'FILESYSTEMOBJECT', 'FOLDER', 'FOLDERS', 'TEXTSTREAM' - ), - 4 => array( - 'BOOLEAN', 'BYTE', 'DATE', 'DECIMIAL', 'DOUBLE', 'INTEGER', 'LONG', 'OBJECT', - 'SINGLE STRING' - ), - 5 => array( - 'ADDRESSOF', 'AND', 'BITAND', 'BITNOT', 'BITOR', 'BITXOR', - 'GETTYPE', 'LIKE', 'MOD', 'NOT', 'ORXOR' - ), - 6 => array( - 'APPACTIVATE', 'BEEP', 'CALL', 'CHDIR', 'CHDRIVE', 'CLASS', 'CASE', 'CATCH', 'CONST', - 'DECLARE', 'DELEGATE', 'DELETESETTING', 'DIM', 'DO', 'DOEVENTS', 'END', 'ENUM', - 'EVENT', 'EXIT', 'EACH', 'FUNCTION', 'FINALLY', 'IF', 'IMPORTS', 'INHERITS', - 'INTERFACE', 'IMPLEMENTS', 'KILL', 'LOOP', 'NAMESPACE', 'OPEN', 'PUT', - 'RAISEEVENT', 'RANDOMIZE', 'REDIM', 'REM', 'RESET', 'SAVESETTING', 'SELECT', - 'SETATTR', 'STOP', 'SUB', 'SYNCLOCK', 'STRUCTURE', 'SHADOWS', 'SWITCH', - 'TRY', 'WIDTH', 'WITH', 'WRITE', 'WHILE' - ), - 7 => array( - 'ABS', 'ARRAY', 'ASC', 'ASCB', 'ASCW', 'CALLBYNAME', 'CBOOL', 'CBYTE', 'CCHAR', - 'CCHR', 'CDATE', 'CDBL', 'CDEC', 'CHOOSE', 'CHR', 'CHR$', 'CHRB', 'CHRB$', 'CHRW', - 'CINT', 'CLNG', 'CLNG8', 'CLOSE', 'COBJ', 'COMMAND', 'COMMAND$', 'CONVERSION', - 'COS', 'CREATEOBJECT', 'CSHORT', 'CSTR', 'CURDIR', 'CTYPE', 'CVDATE', 'DATEADD', - 'DATEDIFF', 'DATEPART', 'DATESERIAL', 'DATEVALUE', 'DAY', 'DDB', 'DIR', 'DIR$', - 'EOF', 'ERROR$', 'EXP', 'FILEATTR', 'FILECOPY', 'FILEDATATIME', 'FILELEN', 'FILTER', - 'FIX', 'FORMAT', 'FORMAT$', 'FORMATCURRENCY', 'FORMATDATETIME', 'FORMATNUMBER', - 'FORMATPERCENT', 'FREEFILE', 'FV', 'GETALLSETTINGS', 'GETATTRGETOBJECT', 'GETSETTING', - 'HEX', 'HEX$', 'HOUR', 'IIF', 'IMESTATUS', 'INPUT$', 'INPUTB', 'INPUTB$', 'INPUTBOX', - 'INSTR', 'INSTRB', 'INSTRREV', 'INT', 'IPMT', 'IRR', 'ISARRAY', 'ISDATE', 'ISEMPTY', - 'ISERROR', 'ISNULL', 'ISNUMERIC', 'ISOBJECT', 'JOIN', 'LBOUND', 'LCASE', 'LCASE$', - 'LEFT', 'LEFT$', 'LEFTB', 'LEFTB$', 'LENB', 'LINEINPUT', 'LOC', 'LOF', 'LOG', 'LTRIM', - 'LTRIM$', 'MID$', 'MIDB', 'MIDB$', 'MINUTE', 'MIRR', 'MKDIR', 'MONTH', 'MONTHNAME', - 'MSGBOX', 'NOW', 'NPER', 'NPV', 'OCT', 'OCT$', 'PARTITION', 'PMT', 'PPMT', 'PV', - 'RATE', 'REPLACE', 'RIGHT', 'RIGHT$', 'RIGHTB', 'RIGHTB$', 'RMDIR', 'RND', 'RTRIM', - 'RTRIM$', 'SECOND', 'SIN', 'SLN', 'SPACE', 'SPACE$', 'SPC', 'SPLIT', 'SQRT', 'STR', 'STR$', - 'STRCOMP', 'STRCONV', 'STRING$', 'STRREVERSE', 'SYD', 'TAB', 'TAN', 'TIMEOFDAY', - 'TIMER', 'TIMESERIAL', 'TIMEVALUE', 'TODAY', 'TRIM', 'TRIM$', 'TYPENAME', 'UBOUND', - 'UCASE', 'UCASE$', 'VAL', 'WEEKDAY', 'WEEKDAYNAME', 'YEAR' - ), - 8 => array( - 'ANY', 'ATN', 'CALENDAR', 'CIRCLE', 'CURRENCY', 'DEFBOOL', 'DEFBYTE', 'DEFCUR', - 'DEFDATE', 'DEFDBL', 'DEFDEC', 'DEFINT', 'DEFLNG', 'DEFOBJ', 'DEFSNG', 'DEFSTR', - 'DEFVAR', 'EQV', 'GOSUB', 'IMP', 'INITIALIZE', 'ISMISSING', 'LET', 'LINE', 'LSET', - 'RSET', 'SGN', 'SQR', 'TERMINATE', 'VARIANT', 'VARTYPE', 'WEND' - ), - ), - 'SYMBOLS' => array( - '&', '&=', '*', '*=', '+', '+=', '-', '-=', '//', '/', '/=', '=', '\\', '\\=', - '^', '^=' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false, - 6 => false, - 7 => false, - 8 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0600FF;', //Constants - 2 => 'color: #FF8000;', //Keywords - 3 => 'color: #008000;', //Data Types - 4 => 'color: #FF0000;', //Objects - 5 => 'color: #804040;', //Operators - 6 => 'color: #0600FF;', //Statements - 7 => 'color: #0600FF;', //Functions - 8 => 'color: #0600FF;' //Deprecated - ), - 'COMMENTS' => array( - 1 => 'color: #008080; font-style: italic;', - 'MULTI' => 'color: #008080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #008080; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #808080;' - ), - 'NUMBERS' => array( - 0 => 'color: #FF0000;' - ), - 'METHODS' => array( - 1 => 'color: #0000FF;' - ), - 'SYMBOLS' => array( - 0 => 'color: #008000;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://www.google.com/search?q={FNAMEU}+site:msdn.microsoft.com', - 4 => '', - 5 => '', - 6 => '', - 7 => '', - 8 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 =>'.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/verilog.php b/_piecrust/libs/Geshi/geshi/verilog.php deleted file mode 100644 index 3c3c224..0000000 --- a/_piecrust/libs/Geshi/geshi/verilog.php +++ /dev/null @@ -1,173 +0,0 @@ - - * Copyright: (C) 2008 Guenter Dannoritzer - * Release Version: 1.0.8.9 - * Date Started: 2008/05/28 - * - * Verilog language file for GeSHi. - * - * CHANGES - * ------- - * 2008/05/29 - * - added regular expression to find numbers of the form 4'b001xz - * - added regular expression to find values for `timescale command - * - extended macro keywords - * - * TODO (updated 2008/05/29) - * ------------------------- - * - ************************************************************************************* - * - * This file is part of GeSHi. - * - * GeSHi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GeSHi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeSHi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - ************************************************************************************/ - -$language_data = array ( - 'LANG_NAME' => 'Verilog', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'COMMENT_REGEXP' => array(1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - // keywords - 1 => array('always', 'and', 'assign', 'begin', 'buf', 'bufif0', 'bufif1', 'case', - 'casex', 'casez', 'cmos', 'deassign', 'default', 'defparam', - 'disable', 'edge', 'else', 'end', 'endcase', 'endfunction', - 'endmodule', 'endprimitive', 'endspecify', 'endtable', 'endtask', - 'event', 'for', 'force', 'forever', 'function', 'highz0', - 'highz1', 'if', 'ifnone', 'initial', 'inout', 'input', 'integer', - 'join', 'large', 'macromodule', 'medium', 'module', 'nand', - 'negedge', 'nmos', 'nor', 'not', 'notif0', 'notif1', 'or', - 'output', 'parameter', 'pmos', 'posedge', 'primitive', 'pull0', - 'pull1', 'pulldown', 'pullup', 'rcmos', 'real', 'realtime', 'reg', - 'release', 'repeat', 'rnmos', 'rpmos', 'rtran', 'rtranif0', - 'rtranif1', 'scalared', 'small', 'specify', 'specparam', - 'strong0', 'strong1', 'supply0', 'supply1', 'table', 'task', - 'time', 'tran', 'tranif0', 'tranif1', 'tri', 'tri0', 'tri1', - 'triand', 'trior', 'trireg', 'vectored', 'wait', 'wand', 'weak0', - 'weak1', 'while', 'wire', 'wor', 'xnor', 'xor' - ), - // system tasks - 2 => array( - '$display', '$monitor', - '$dumpall', '$dumpfile', '$dumpflush', '$dumplimit', '$dumpoff', - '$dumpon', '$dumpvars', - '$fclose', '$fdisplay', '$fopen', - '$finish', '$fmonitor', '$fstrobe', '$fwrite', - '$fgetc', '$ungetc', '$fgets', '$fscanf', '$fread', '$ftell', - '$fseek', '$frewind', '$ferror', '$fflush', '$feof', - '$random', - '$readmemb', '$readmemh', '$readmemx', - '$signed', '$stime', '$stop', - '$strobe', '$time', '$unsigned', '$write' - ), - // macros - 3 => array( - '`default-net', '`define', - '`celldefine', '`default_nettype', '`else', '`elsif', '`endcelldefine', - '`endif', '`ifdef', '`ifndef', '`include', '`line', '`nounconnected_drive', - '`resetall', '`timescale', '`unconnected_drive', '`undef' - ), - ), - 'SYMBOLS' => array( - '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%', - '^', '&', '|', '~', - '?', ':', - '#', '<<', '<<<', - '>', '<', '>=', '<=', - '@', ';', ',' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #A52A2A; font-weight: bold;', - 2 => 'color: #9932CC;', - 3 => 'color: #008800;' - ), - 'COMMENTS' => array( - 1 => 'color: #00008B; font-style: italic;', - 'MULTI' => 'color: #00008B; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #9F79EE' - ), - 'BRACKETS' => array( - 0 => 'color: #9F79EE;' - ), - 'STRINGS' => array( - 0 => 'color: #FF00FF;' - ), - 'NUMBERS' => array( - 0 => 'color: #ff0055;' - ), - 'METHODS' => array( - 1 => 'color: #202020;', - 2 => 'color: #202020;' - ), - 'SYMBOLS' => array( - 0 => 'color: #5D478B;' - ), - 'REGEXPS' => array( - 0 => 'color: #ff0055;', - 1 => 'color: #ff0055;', - ), - 'SCRIPT' => array( - 0 => '', - 1 => '', - 2 => '', - 3 => '' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - 1 => '' - ), - 'REGEXPS' => array( - // numbers - 0 => "\d'[bdh][0-9_a-fA-FxXzZ]+", - // time -> 1, 10, or 100; s, ms, us, ns, ps, of fs - 1 => "1[0]{0,2}[munpf]?s" - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - 1 => '' - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - 0 => true, - 1 => true, - 2 => true, - 3 => true - ), - 'TAB_WIDTH' => 4 -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/vhdl.php b/_piecrust/libs/Geshi/geshi/vhdl.php deleted file mode 100644 index 386604c..0000000 --- a/_piecrust/libs/Geshi/geshi/vhdl.php +++ /dev/null @@ -1,144 +0,0 @@ - 'VHDL', - 'COMMENT_SINGLE' => array(1 => '--'), - 'COMMENT_MULTI' => array('%' => '%'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - /*keywords*/ - 1 => array( - 'access','after','alias','all','assert','attribute','architecture','begin', - 'block','body','buffer','bus','case','component','configuration','constant', - 'disconnect','downto','else','elsif','end','entity','exit','file','for', - 'function','generate','generic','group','guarded','if','impure','in', - 'inertial','inout','is','label','library','linkage','literal','loop', - 'map','new','next','null','of','on','open','others','out','package', - 'port','postponed','procedure','process','pure','range','record','register', - 'reject','report','return','select','severity','signal','shared','subtype', - 'then','to','transport','type','unaffected','units','until','use','variable', - 'wait','when','while','with','note','warning','error','failure','and', - 'or','xor','not','nor','used','memory','segments','dff','dffe','help_id', - 'mod','info','latch','rising_edge','falling_edge' - ), - /*types*/ - 2 => array( - 'bit','bit_vector','character','boolean','integer','real','time','string', - 'severity_level','positive','natural','signed','unsigned','line','text', - 'std_logic','std_logic_vector','std_ulogic','std_ulogic_vector','qsim_state', - 'qsim_state_vector','qsim_12state','qsim_12state_vector','qsim_strength', - 'mux_bit','mux_vector','reg_bit','reg_vector','wor_bit','wor_vector', - 'work','ieee','std_logic_signed','std_logic_1164','std_logic_arith', - 'numeric_std' - - ), - /*operators*/ - ), - 'SYMBOLS' => array( - '[', ']', '(', ')', - ';',':', - '<','>','=','<=',':=','=>','==' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000080; font-weight: bold;', - 2 => 'color: #0000ff;' - ), - 'COMMENTS' => array( - 1 => 'color: #008000; font-style: italic;', - 'MULTI' => 'color: #008000; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #000066;' - ), - 'STRINGS' => array( - 0 => 'color: #7f007f;' - ), - 'NUMBERS' => array( - 0 => 'color: #ff0000;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #000066;' - ), - 'REGEXPS' => array( - 0 => 'color: #ff0000;', - 1 => 'color: #ff0000;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - //Hex numbers and scientific notation for numbers - 0 => '(\b0x[0-9a-fA-F]+|\b\d[0-9a-fA-F]+[hH])|'. - '(\b\d+?(\.\d+?)?E[+\-]?\d+)|(\bns)|'. - "('[0-9a-zA-Z]+(?!'))", - //Number characters? - 1 => "\b(''\d'')" - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/vim.php b/_piecrust/libs/Geshi/geshi/vim.php deleted file mode 100644 index 0d63ccd..0000000 --- a/_piecrust/libs/Geshi/geshi/vim.php +++ /dev/null @@ -1,420 +0,0 @@ - ... ... works event if they aren't surround by space. - * - ************************************************************************************* - * - * This file is part of GeSHi. - * - * GeSHi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GeSHi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeSHi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - ************************************************************************************/ - -$language_data = array( - 'LANG_NAME' => 'Vim Script', - 'COMMENT_SINGLE' => array(), - 'COMMENT_REGEXP' => array( - 1 => "/\s*\"[^\"]*?$/m", - //Regular expressions (Ported from perl.php) -// 2 => "/(?<=[\\s^])(s|tr|y)\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/(?:\\\\.|(?!\n)[^\\/\\\\])*\\/[msixpogcde]*(?=[\\s$\\.\\;])|(?<=[\\s^(=])(m|q[qrwx]?)?\\/(?:\\\\.|(?!\n)[^\\/\\\\])+\\/[msixpogc]*(?=[\\s$\\.\\,\\;\\)])/iU", - ), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'au', 'augroup', 'autocmd', 'brea', 'break', 'bufadd', - 'bufcreate', 'bufdelete', 'bufenter', 'buffilepost', - 'buffilepre', 'bufleave', 'bufnew', 'bufnewfile', - 'bufread', 'bufreadcmd', 'bufreadpost', 'bufreadpre', - 'bufunload', 'bufwinenter', 'bufwinleave', 'bufwipeout', - 'bufwrite', 'bufwritecmd', 'bufwritepost', 'bufwritepre', - 'call', 'cat', 'catc', 'catch', 'cmd-event', 'cmdwinenter', - 'cmdwinleave', 'colorscheme', 'con', 'confirm', 'cont', 'conti', - 'contin', 'continu', 'continue', 'cursorhold', 'cursorholdi', - 'cursormoved', 'cursormovedi', 'ec', 'echo', 'echoe', - 'echoer', 'echoerr', 'echoh', 'echohl', 'echom', 'echoms', - 'echomsg', 'echon', 'el', 'els', 'else', 'elsei', 'elseif', - 'en', 'encodingchanged', 'end', 'endfo', 'endfor', 'endi', - 'endif', 'endt', 'endtr', 'endtry', 'endw', 'endwh', 'endwhi', - 'endwhil', 'endwhile', 'exe', 'exec', 'execu', 'execut', - 'execute', 'fileappendcmd', 'fileappendpost', 'fileappendpre', - 'filechangedro', 'filechangedshell', 'filechangedshellpost', - 'filereadcmd', 'filereadpost', 'filereadpre', - 'filetype', 'filewritecmd', 'filewritepost', 'filewritepre', - 'filterreadpost', 'filterreadpre', 'filterwritepost', - 'filterwritepre', 'fina', 'final', 'finall', 'finally', - 'finish', 'focusgained', 'focuslost', 'for', 'fun', 'func', - 'funct', 'functi', 'functio', 'function', 'funcundefined', - 'guienter', 'guifailed', 'hi', 'highlight', 'if', 'in', - 'insertchange', 'insertenter', 'insertleave', 'let', 'lockv', - 'lockva', 'lockvar', 'map', 'match', 'menupopup', 'nnoremap', - 'quickfixcmdpost', 'quickfixcmdpre', 'remotereply', 'retu', - 'retur', 'return', 'sessionloadpost', 'set', 'setlocal', - 'shellcmdpost', 'shellfilterpost', 'sourcecmd', 'sourcepre', - 'spellfilemissing', 'stdinreadpost', 'stdinreadpre', - 'swapexists', 'syntax', 'tabenter', 'tableave', 'termchanged', - 'termresponse', 'th', 'thr', 'thro', 'throw', 'tr', 'try', 'unl', - 'unle', 'unlet', 'unlo', 'unloc', 'unlock', 'unlockv', - 'unlockva', 'unlockvar', 'user', 'usergettingbored', - 'vimenter', 'vimleave', 'vimleavepre', 'vimresized', 'wh', - 'whi', 'whil', 'while', 'winenter', 'winleave' - ), - 2 => array( - '<CR>', '<Esc>', '<F1>', '<F10>', - '<F11>', '<F12>', '<F2>', '<F3>', - '<F4>', '<F5>', '<F6>', '<F7>', - '<F8>', '<F9>', '<cr>', '<silent>', - '-nargs', 'acd', 'ai', 'akm', 'al', 'aleph', - 'allowrevins', 'altkeymap', 'ambiwidth', 'ambw', - 'anti', 'antialias', 'ar', 'arab', 'arabic', - 'arabicshape', 'ari', 'arshape', 'autochdir', - 'autoindent', 'autoread', 'autowrite', 'autowriteall', - 'aw', 'awa', 'background', 'backspace', 'backup', - 'backupcopy', 'backupdir', 'backupext', - 'backupskip', 'balloondelay', 'ballooneval', 'balloonexpr', - 'bdir', 'bdlay', 'beval', 'bex', 'bexpr', 'bg', - 'bh', 'bin', 'binary', 'biosk', 'bioskey', - 'bk', 'bkc', 'bl', 'bomb', 'breakat', 'brk', - 'bs', 'bsdir', 'bsk', 'bt', 'bufhidden', - 'buftype', 'casemap', 'cb', - 'ccv', 'cd', 'cdpath', 'cedit', 'cf', 'cfu', 'ch', - 'charconvert', 'ci', 'cin', 'cink', - 'cinkeys', 'cino', 'cinoptions', 'cinw', 'cinwords', - 'clipboard', 'cmdheight', 'cmdwinheight', - 'cmp', 'cms', 'co', 'columns', 'com', - 'comc', 'comcl', 'comcle', 'comclea', 'comclear', 'comm', - 'comma', 'comman', 'command', 'comments', 'commentstring', - 'compatible', 'completefunc', 'completeopt', - 'consk', 'conskey', 'copyindent', - 'cot', 'cp', 'cpo', 'cpoptions', 'cpt', - 'cscopepathcomp', 'cscopeprg', 'cscopequickfix', 'cscopetag', - 'cscopetagorder', 'cscopeverbose', - 'cspc', 'csprg', 'csqf', 'cst', 'csto', 'csverb', 'cuc', - 'cul', 'cursorcolumn', 'cursorline', 'cwh', 'debug', - 'deco', 'def', 'define', 'delc', 'delco', 'delcom', - 'delcombine', 'delcomm', 'delcomman', 'delcommand', 'dex', - 'dg', 'dict', 'dictionary', 'diff', 'diffexpr', - 'diffopt', 'digraph', 'dip', 'dir', 'directory', 'display', - 'dlcomma', 'dy', 'ea', 'ead', 'eadirection', - 'eb', 'ed', 'edcompatible', 'ef', 'efm', - 'ei', 'ek', 'enc', 'encoding', 'endfun', 'endofline', - 'eol', 'ep', 'equalalways', 'equalprg', 'errorbells', - 'errorfile', 'errorformat', 'esckeys', 'et', - 'eventignore', 'ex', 'expandtab', 'exrc', 'fcl', - 'fcs', 'fdc', 'fde', 'fdi', 'fdl', 'fdls', 'fdm', - 'fdn', 'fdo', 'fdt', 'fen', 'fenc', 'fencs', 'fex', - 'ff', 'ffs', 'fileencoding', 'fileencodings', 'fileformat', - 'fileformats', /*'filetype',*/ 'fillchars', 'fk', - 'fkmap', 'flp', 'fml', 'fmr', 'fo', 'foldclose', - 'foldcolumn', 'foldenable', 'foldexpr', 'foldignore', - 'foldlevelstart', 'foldmarker', 'foldmethod', 'foldminlines', - 'foldnestmax', 'foldopen', 'formatexpr', 'formatlistpat', - 'formatoptions', 'formatprg', 'fp', 'fs', 'fsync', 'ft', - 'gcr', 'gd', 'gdefault', 'gfm', 'gfn', 'gfs', 'gfw', - 'ghr', 'go', 'gp', 'grepformat', 'grepprg', 'gtl', - 'gtt', 'guicursor', 'guifont', 'guifontset', - 'guifontwide', 'guiheadroom', 'guioptions', 'guipty', - 'guitablabel', 'guitabtooltip', 'helpfile', - 'helpheight', 'helplang', 'hf', 'hh', 'hid', 'hidden', - 'history', 'hk', 'hkmap', 'hkmapp', 'hkp', 'hl', - 'hlg', 'hls', 'hlsearch', 'ic', 'icon', 'iconstring', - 'ignorecase', 'im', 'imactivatekey', 'imak', 'imc', - 'imcmdline', 'imd', 'imdisable', 'imi', 'iminsert', 'ims', - 'imsearch', 'inc', 'include', 'includeexpr', - 'incsearch', 'inde', 'indentexpr', 'indentkeys', - 'indk', 'inex', 'inf', 'infercase', 'insertmode', 'is', 'isf', - 'isfname', 'isi', 'isident', 'isk', 'iskeyword', - 'isp', 'isprint', 'joinspaces', 'js', 'key', - 'keymap', 'keymodel', 'keywordprg', 'km', 'kmp', 'kp', - 'langmap', 'langmenu', 'laststatus', 'lazyredraw', 'lbr', - 'lcs', 'linebreak', 'lines', 'linespace', 'lisp', - 'lispwords', 'list', 'listchars', 'lm', 'lmap', - 'loadplugins', 'lpl', 'ls', 'lsp', 'lw', 'lz', 'ma', - 'macatsui', 'magic', 'makeef', 'makeprg', 'mat', - 'matchpairs', 'matchtime', 'maxcombine', 'maxfuncdepth', - 'maxmapdepth', 'maxmem', 'maxmempattern', - 'maxmemtot', 'mco', 'mef', 'menuitems', 'mfd', 'mh', - 'mis', 'mkspellmem', 'ml', 'mls', 'mm', 'mmd', 'mmp', - 'mmt', 'mod', 'modeline', 'modelines', 'modifiable', - 'modified', 'more', 'mouse', 'mousef', 'mousefocus', - 'mousehide', 'mousem', 'mousemodel', 'mouses', - 'mouseshape', 'mouset', 'mousetime', 'mp', 'mps', 'msm', - 'mzq', 'mzquantum', 'nf', 'noacd', 'noai', 'noakm', - 'noallowrevins', 'noaltkeymap', 'noanti', 'noantialias', - 'noar', 'noarab', 'noarabic', 'noarabicshape', 'noari', - 'noarshape', 'noautochdir', 'noautoindent', 'noautoread', - 'noautowrite', 'noautowriteall', 'noaw', 'noawa', 'nobackup', - 'noballooneval', 'nobeval', 'nobin', 'nobinary', 'nobiosk', - 'nobioskey', 'nobk', 'nobl', 'nobomb', 'nobuflisted', 'nocf', - 'noci', 'nocin', 'nocindent', 'nocompatible', 'noconfirm', - 'noconsk', 'noconskey', 'nocopyindent', 'nocp', 'nocscopetag', - 'nocscopeverbose', 'nocst', 'nocsverb', 'nocuc', 'nocul', - 'nocursorcolumn', 'nocursorline', 'nodeco', 'nodelcombine', - 'nodg', 'nodiff', 'nodigraph', 'nodisable', 'noea', 'noeb', - 'noed', 'noedcompatible', 'noek', 'noendofline', 'noeol', - 'noequalalways', 'noerrorbells', 'noesckeys', 'noet', - 'noex', 'noexpandtab', 'noexrc', 'nofen', 'nofk', 'nofkmap', - 'nofoldenable', 'nogd', 'nogdefault', 'noguipty', 'nohid', - 'nohidden', 'nohk', 'nohkmap', 'nohkmapp', 'nohkp', 'nohls', - 'nohlsearch', 'noic', 'noicon', 'noignorecase', 'noim', - 'noimc', 'noimcmdline', 'noimd', 'noincsearch', 'noinf', - 'noinfercase', 'noinsertmode', 'nois', 'nojoinspaces', - 'nojs', 'nolazyredraw', 'nolbr', 'nolinebreak', 'nolisp', - 'nolist', 'noloadplugins', 'nolpl', 'nolz', 'noma', - 'nomacatsui', 'nomagic', 'nomh', 'noml', 'nomod', - 'nomodeline', 'nomodifiable', 'nomodified', 'nomore', - 'nomousef', 'nomousefocus', 'nomousehide', 'nonu', - 'nonumber', 'noodev', 'noopendevice', 'nopaste', 'nopi', - 'nopreserveindent', 'nopreviewwindow', 'noprompt', 'nopvw', - 'noreadonly', 'noremap', 'norestorescreen', 'norevins', - 'nori', 'norightleft', 'norightleftcmd', 'norl', 'norlc', - 'noro', 'nors', 'noru', 'noruler', 'nosb', 'nosc', 'noscb', - 'noscrollbind', 'noscs', 'nosecure', 'nosft', 'noshellslash', - 'noshelltemp', 'noshiftround', 'noshortname', 'noshowcmd', - 'noshowfulltag', 'noshowmatch', 'noshowmode', 'nosi', 'nosm', - 'nosmartcase', 'nosmartindent', 'nosmarttab', 'nosmd', - 'nosn', 'nosol', 'nospell', 'nosplitbelow', 'nosplitright', - 'nospr', 'nosr', 'nossl', 'nosta', 'nostartofline', - 'nostmp', 'noswapfile', 'noswf', 'nota', 'notagbsearch', - 'notagrelative', 'notagstack', 'notbi', 'notbidi', 'notbs', - 'notermbidi', 'noterse', 'notextauto', 'notextmode', - 'notf', 'notgst', 'notildeop', 'notimeout', 'notitle', - 'noto', 'notop', 'notr', 'nottimeout', 'nottybuiltin', - 'nottyfast', 'notx', 'novb', 'novisualbell', 'nowa', - 'nowarn', 'nowb', 'noweirdinvert', 'nowfh', 'nowfw', - 'nowildmenu', 'nowinfixheight', 'nowinfixwidth', 'nowiv', - 'nowmnu', 'nowrap', 'nowrapscan', 'nowrite', 'nowriteany', - 'nowritebackup', 'nows', 'nrformats', 'nu', 'number', - 'numberwidth', 'nuw', 'odev', 'oft', 'ofu', - 'omnifunc', 'opendevice', 'operatorfunc', 'opfunc', - 'osfiletype', 'pa', 'para', 'paragraphs', - 'paste', 'pastetoggle', 'patchexpr', - 'patchmode', 'path', 'pdev', 'penc', 'pex', 'pexpr', - 'pfn', 'ph', 'pheader', 'pi', 'pm', 'pmbcs', - 'pmbfn', 'popt', 'preserveindent', 'previewheight', - 'previewwindow', 'printdevice', 'printencoding', 'printexpr', - 'printfont', 'printheader', 'printmbcharset', - 'printmbfont', 'printoptions', 'prompt', 'pt', 'pumheight', - 'pvh', 'pvw', 'qe', 'quoteescape', 'rdt', - 'readonly', 'redrawtime', 'remap', 'report', - 'restorescreen', 'revins', 'ri', 'rightleft', 'rightleftcmd', - 'rl', 'rlc', 'ro', 'rs', 'rtp', 'ru', - 'ruf', 'ruler', 'rulerformat', 'runtimepath', 'sb', 'sbo', - 'sbr', 'sc', 'scb', 'scr', 'scroll', 'scrollbind', - 'scrolljump', 'scrolloff', 'scrollopt', - 'scs', 'sect', 'sections', 'secure', 'sel', - 'selection', 'selectmode', 'sessionoptions', 'sft', - 'sh', 'shcf', 'shell', 'shellcmdflag', 'shellpipe', - 'shellquote', 'shellredir', 'shellslash', - 'shelltemp', 'shelltype', 'shellxquote', 'shiftround', - 'shiftwidth', 'shm', 'shortmess', 'shortname', - 'showbreak', 'showcmd', 'showfulltag', 'showmatch', - 'showmode', 'showtabline', 'shq', 'si', 'sidescroll', - 'sidescrolloff', 'siso', 'sj', 'slm', 'sm', 'smartcase', - 'smartindent', 'smarttab', 'smc', 'smd', 'sn', - 'so', 'softtabstop', 'sol', 'sp', 'spc', 'spell', - 'spellcapcheck', 'spellfile', 'spelllang', - 'spf', 'spl', 'splitbelow', 'splitright', 'spr', - 'sps', 'sr', 'srr', 'ss', 'ssl', 'ssop', 'st', 'sta', - 'stal', 'startofline', 'statusline', 'stl', 'stmp', - 'sts', 'su', 'sua', 'suffixes', 'suffixesadd', 'sw', - 'swapfile', 'swapsync', 'swb', 'swf', 'switchbuf', - 'sws', 'sxq', 'syn', 'synmaxcol', 'ta', - 'tabline', 'tabpagemax', 'tabstop', 'tag', - 'tagbsearch', 'taglength', 'tagrelative', 'tags', 'tagstack', - 'tal', 'tb', 'tbi', 'tbidi', 'tbis', 'tbs', - 'tenc', 'term', 'termbidi', 'termencoding', 'terse', - 'textauto', 'textmode', 'textwidth', 'tf', 'tgst', - 'thesaurus', 'tildeop', 'timeout', 'timeoutlen', - 'title', 'titlelen', 'titleold', 'titlestring', - 'tl', 'tm', 'to', 'toolbar', 'toolbariconsize', 'top', - 'tpm', 'ts', 'tsl', 'tsr', 'ttimeout', - 'ttimeoutlen', 'ttm', 'tty', 'ttybuiltin', 'ttyfast', 'ttym', - 'ttymouse', 'ttyscroll', 'ttytype', 'tw', 'tx', 'uc', - 'ul', 'undolevels', 'updatecount', 'updatetime', 'ut', - 'vb', 'vbs', 'vdir', 've', 'verbose', 'verbosefile', - 'vfile', 'vi', 'viewdir', 'viewoptions', 'viminfo', - 'virtualedit', 'visualbell', 'vop', 'wa', 'wak', - 'warn', 'wb', 'wc', 'wcm', 'wd', 'weirdinvert', 'wfh', - 'wfw', /*'wh',*/ 'whichwrap', 'wi', 'wig', 'wildchar', - 'wildcharm', 'wildignore', 'wildmenu', - 'wildmode', 'wildoptions', 'wim', 'winaltkeys', 'window', - 'winfixheight', 'winfixwidth', 'winheight', - 'winminheight', 'winminwidth', 'winwidth', 'wiv', - 'wiw', 'wm', 'wmh', 'wmnu', 'wmw', 'wop', 'wrap', - 'wrapmargin', 'wrapscan', 'write', 'writeany', - 'writebackup', 'writedelay', 'ws', 'ww' - ), - 3 => array( - 'BufAdd', 'BufCreate', 'BufDelete', 'BufEnter', 'BufFilePost', - 'BufFilePre', 'BufHidden', 'BufLeave', 'BufNew', 'BufNewFile', - 'BufRead', 'BufReadCmd', 'BufReadPost', 'BufReadPre', - 'BufUnload', 'BufWinEnter', 'BufWinLeave', 'BufWipeout', - 'BufWrite', 'BufWriteCmd', 'BufWritePost', 'BufWritePre', - 'Cmd-event', 'CmdwinEnter', 'CmdwinLeave', 'ColorScheme', - 'CursorHold', 'CursorHoldI', 'CursorMoved', 'CursorMovedI', - 'EncodingChanged', 'FileAppendCmd', 'FileAppendPost', - 'FileAppendPre', 'FileChangedRO', 'FileChangedShell', - 'FileChangedShellPost', 'FileEncoding', 'FileReadCmd', - 'FileReadPost', 'FileReadPre', 'FileType', - 'FileWriteCmd', 'FileWritePost', 'FileWritePre', - 'FilterReadPost', 'FilterReadPre', 'FilterWritePost', - 'FilterWritePre', 'FocusGained', 'FocusLost', 'FuncUndefined', - 'GUIEnter', 'GUIFailed', 'InsertChange', 'InsertEnter', - 'InsertLeave', 'MenuPopup', 'QuickFixCmdPost', - 'QuickFixCmdPre', 'RemoteReply', 'SessionLoadPost', - 'ShellCmdPost', 'ShellFilterPost', 'SourceCmd', - 'SourcePre', 'SpellFileMissing', 'StdinReadPost', - 'StdinReadPre', 'SwapExists', 'Syntax', 'TabEnter', - 'TabLeave', 'TermChanged', 'TermResponse', 'User', - 'UserGettingBored', 'VimEnter', 'VimLeave', 'VimLeavePre', - 'VimResized', 'WinEnter', 'WinLeave', 'abs', 'add', 'append', - 'argc', 'argidx', 'argv', 'atan', 'browse', 'browsedir', - 'bufexists', 'buflisted', 'bufloaded', 'bufname', 'bufnr', - 'bufwinnr', 'byte2line', 'byteidx', 'ceil', 'changenr', - 'char2nr', 'cindent', 'clearmatches', 'col', 'complete', - 'complete_add', 'complete_check', 'copy', - 'cos', 'count', 'cscope_connection', 'cursor', 'deepcopy', - 'delete', 'did_filetype', 'diff_filler', 'diff_hlID', - 'empty', 'escape', 'eval', 'eventhandler', 'executable', - 'exists', 'expand', 'extend', 'feedkeys', 'filereadable', - 'filewritable', 'filter', 'finddir', 'findfile', 'float2nr', - 'floor', 'fnameescape', 'fnamemodify', 'foldclosed', - 'foldclosedend', 'foldlevel', 'foldtext', 'foldtextresult', - 'foreground', 'garbagecollect', 'get', 'getbufline', - 'getbufvar', 'getchar', 'getcharmod', 'getcmdline', - 'getcmdpos', 'getcmdtype', 'getcwd', 'getfontname', - 'getfperm', 'getfsize', 'getftime', 'getftype', 'getline', - 'getloclist', 'getmatches', 'getpid', 'getpos', 'getqflist', - 'getreg', 'getregtype', 'gettabwinvar', 'getwinposx', - 'getwinposy', 'getwinvar', 'glob', 'globpath', 'has', - 'has_key', 'haslocaldir', 'hasmapto', 'histadd', 'histdel', - 'histget', 'histnr', 'hlID', 'hlexists', 'hostname', 'iconv', - 'indent', 'index', 'input', 'inputdialog', 'inputlist', - 'inputrestore', 'inputsave', 'inputsecret', 'insert', - 'isdirectory', 'islocked', 'items', 'join', 'keys', 'len', - 'libcall', 'libcallnr', 'line', 'line2byte', 'lispindent', - 'localtime', 'log10', 'maparg', 'mapcheck', 'matchadd', - 'matcharg', 'matchdelete', 'matchend', 'matchlist', - 'matchstr', 'max', 'min', 'mkdir', 'mode', 'nextnonblank', - 'nr2char', 'off', 'on', 'pathshorten', 'plugin', 'pow', - 'prevnonblank', 'printf', 'pumvisible', 'range', 'readfile', - 'reltime', 'reltimestr', 'remote_expr', 'remote_foreground', - 'remote_peek', 'remote_read', 'remote_send', 'remove', - 'rename', 'repeat', 'resolve', 'reverse', 'round', 'search', - 'searchdecl', 'searchpair', 'searchpairpos', 'searchpos', - 'server2client', 'serverlist', 'setbufvar', 'setcmdpos', - 'setline', 'setloclist', 'setmatches', 'setpos', 'setqflist', - 'setreg', 'settabwinvar', 'setwinvar', 'shellescape', - 'simplify', 'sin', 'sort', 'soundfold', 'spellbadword', - 'spellsuggest', 'split', 'sqrt', 'str2float', 'str2nr', - 'strftime', 'stridx', 'string', 'strlen', 'strpart', - 'strridx', 'strtrans', 'submatch', 'substitute', - 'synID', 'synIDattr', 'synIDtrans', 'synstack', 'system', - 'tabpagebuflist', 'tabpagenr', 'tabpagewinnr', 'tagfiles', - 'taglist', 'tempname', 'tolower', 'toupper', 'trunc', - 'type', 'values', 'virtcol', 'visualmode', 'winbufnr', - 'wincol', 'winline', 'winnr', 'winrestcmd', - 'winrestview', 'winsaveview', 'writefile' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '!', '%', '&', '*', '|', '/', '<', '>', - '^', '-', '+', '~', '?', ':', '$', '@', '.' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => true, - 2 => true, - 3 => true - ), - 'STYLES' => array( - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'COMMENTS' => array( - 1 => 'color: #adadad; font-style: italic;', -// 2 => 'color: #009966; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => '' - ), - 'KEYWORDS' => array( - 1 => 'color: #804040;', - 2 => 'color: #668080;', - 3 => 'color: #25BB4D;' - ), - 'METHODS' => array( - 0 => 'color: #000000;', - ), - 'NUMBERS' => array( - 0 => 'color: #000000; font-weight:bold;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ), - 'STRINGS' => array( - 0 => 'color: #C5A22D;' - ), - 'SYMBOLS' => array( - 0 => 'color: #000000;' - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => false, //Save some time as OO identifiers aren't used - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array(), - 'HIGHLIGHT_STRICT_BLOCK' => array() -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/visualfoxpro.php b/_piecrust/libs/Geshi/geshi/visualfoxpro.php deleted file mode 100644 index a14bed8..0000000 --- a/_piecrust/libs/Geshi/geshi/visualfoxpro.php +++ /dev/null @@ -1,456 +0,0 @@ - 'Visual Fox Pro', - 'COMMENT_SINGLE' => array(1 => "//", 2 => "\n*"), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'Case', 'Else', '#Else', 'Then', - 'Endcase', 'Enddefine', 'Enddo', 'Endfor', 'Endfunc', 'Endif', 'Endprintjob', - 'Endproc', 'Endscan', 'Endtext', 'Endwith', '#Endif', - '#Elif','#Define','#If','#Include', - '#Itsexpression','#Readclauses','#Region','#Section','#Undef','#Wname', - 'Define','Do', - 'For','Function','Hidden', - 'If','Local','Lparameter','Lparameters','Next','Otherwise', - 'Parameters','Printjob','Procedure','Protected','Public','Scan', - 'Text','While','With','Abs','Accept','Access','Aclass','Acopy', - 'Acos','Adatabases','Adbobjects','Addbs','Addrelationtoenv','Addtabletoenv', - 'Adel','Adir','Aelement','Aerror','Afields','Afont', - 'Agetclass','Agetfileversion','Ains','Ainstance','Alen','Align', - 'Alines','Alltrim','Alter','Amembers','Amouseobj','Anetresources', - 'Ansitooem','Append','Aprinters','Ascan','Aselobj','Asin', - 'Asort','Assert','Asserts','Assist','Asubscript','Asynchronous', - 'At_c','Atan','Atc','Atcc','Atcline','Atline', - 'Atn2','Aused','Autoform','Autoreport','Avcxclasses','Average', - 'BarCount','BarPrompt','BatchMode','BatchUpdateCount','Begin','BellSound', - 'BinToC','Bitand','Bitclear','Bitlshift','Bitnot', - 'Bitor','Bitrshift','Bitset','Bittest','Bitxor','Bof', - 'Browse','BrowseRefresh','Buffering','BuilderLock','COMArray','COMReturnError', - 'CToBin','Calculate','Call','Capslock','Cd','Cdow', - 'Ceiling','Central','Change','Char','Chdir','Chr', - 'Chrsaw','Chrtran','Chrtranc','Close','Cmonth','Cntbar', - 'Cntpad','Col','Comclassinfo','CommandTargetQuery','Compile','Completed', - 'Compobj','Compute','Concat','ConnectBusy','ConnectHandle','ConnectName', - 'ConnectString','ConnectTimeOut','ContainerReleaseType','Continue','Copy','Cos', - 'Cot','Count','Coverage','Cpconvert','Cpcurrent','Cpdbf', - 'Cpnotrans','Create','CreateBinary','Createobject','Createobjectex','Createoffline', - 'CrsBuffering','CrsFetchMemo','CrsFetchSize','CrsMaxRows','CrsMethodUsed','CrsNumBatch', - 'CrsShareConnection','CrsUseMemoSize','CrsWhereClause','Ctod','Ctot', - 'Curdate','Curdir','CurrLeft','CurrSymbol','CursorGetProp','CursorSetProp', - 'Curtime','Curval','DBGetProp','DBSetProp','DB_BufLockRow','DB_BufLockTable', - 'DB_BufOff','DB_BufOptRow','DB_BufOptTable','DB_Complette','DB_DeleteInsert','DB_KeyAndModified', - 'DB_KeyAndTimestamp','DB_KeyAndUpdatable','DB_LocalSQL','DB_NoPrompt','DB_Prompt','DB_RemoteSQL', - 'DB_TransAuto','DB_TransManual','DB_TransNone','DB_Update','Datetime','Day', - 'Dayname','Dayofmonth','Dayofweek','Dayofyear','Dbalias','Dbused', - 'Ddeaborttrans','Ddeadvise','Ddeenabled','Ddeexecute','Ddeinitiate','Ddelasterror', - 'Ddepoke','Dderequest','Ddesetoption','Ddesetservice','Ddesettopic','Ddeterminate', - 'Debugout','Declare','DefOLELCid','DefaultValue','Defaultext','Degrees', - 'DeleteTrigger','Desc','Description','Difference','Dimension','Dir', - 'Directory','Diskspace','DispLogin','DispWarnings','Display','Dll', - 'Dmy','DoDefault','DoEvents','Doc','Dow', - 'Drivetype','Drop','Dropoffline','Dtoc','Dtor','Dtos', - 'Dtot','DynamicInputMask','Each','Edit','Eject','Elif', - 'End','Eof','Erase','Evaluate','Event','Eventtracking', - 'Exclude','Exclusive','Exit','Exp','Export','External', - 'FDate','FTime','Fchsize','Fclose','Fcount','Fcreate', - 'Feof','Ferror','FetchMemo','FetchSize','Fflush','Fgets', - 'Filer','Filetostr','Find','Fklabel','Fkmax','Fldlist', - 'Flock','Floor','Flush','Fontmetric','Fopen','Forceext', - 'Forcepath','FormSetClass','FormSetLib','FormsClass','FormsLib','Found', - 'FoxPro','Foxcode','Foxdoc','Foxgen','Foxgraph','Foxview', - 'Fputs','Fread','French','Fseek','Fsize','Fv', - 'Fwrite','Gather','German','GetPem','Getbar','Getcolor', - 'Getcp','Getdir','Getenv','Getexpr','Getfile','Getfldstate', - 'Getfont','Gethost','Getnextmodified','Getobject','Getpad','Getpict', - 'Getprinter','Go','Gomonth','Goto','Graph','GridHorz', - 'GridShow','GridShowPos','GridSnap','GridVert','Help','HelpOn', - 'HelpTo','HighLightRow','Home','Hour','IMEStatus','IdleTimeOut', - 'Idxcollate','Ifdef','Ifndef','Iif','Import','Include', - 'Indbc','Index','Indexseek','Inkey','Inlist','Input', - 'Insert','InsertTrigger','Insmode','IsBlank','IsFLocked','IsLeadByte', - 'IsMouse','IsNull','IsRLocked','Isalpha','Iscolor','Isdigit', - 'IsExclusive','Ishosted','IsLower','IsReadOnly', - 'IsUpper','Italian','Japan','Join','Justdrive','Justext', - 'Justfname','Justpath','Juststem','KeyField','KeyFieldList','Keyboard' - ), - 2 => array('Keymatch','LastProject','Lastkey','Lcase','Leftc','Len', - 'Lenc','Length','Likec','Lineno','LoadPicture', - 'Locate','Locfile','Log','Log10','Logout','Lookup', - 'Loop','Lower','Ltrim','Lupdate','Mail','MaxRecords', - 'Mcol','Md','Mdown','Mdx','Mdy','Memlines', - 'Menu','Messagebox','Minute','Mkdir','Mline','Modify', - 'Month','Monthname','Mouse','Mrkbar','Mrkpad','Mrow', - 'Mtdll','Mton','Mwindow','Native','Ndx','Network', - 'NoFilter','Nodefault','Normalize','Note','Now','Ntom', - 'NullString','Numlock','Nvl','ODBChdbc','ODBChstmt','OLEDropTextInsertion', - 'OLELCid','Objnum','Objref','Objtoclient','Objvar','Occurs', - 'Oemtoansi','Oldval','OlePublic','Olereturnerror','On','Open', - 'Oracle','Order','Os','Outer','PCount','Pack', - 'PacketSize','Padc','Padl','Padr','Payment','Pcol', - 'PemStatus','Pi','Pivot','Play','Pop','Popup', - 'Power','PrimaryKey','Printstatus','Private','Prmbar','Prmpad', - 'ProjectClick','Proper','Prow','Prtinfo','Push','Putfile', - 'Pv','Qpr','Quater','QueryTimeOut','Quit','Radians', - 'Rand','Rat','Ratc','Ratline','Rd','Rdlevel', - 'Read','Readkey','Recall','Reccount','RecentlyUsedFiles','Recno', - 'Recsize','Regional','Reindex','RelatedChild','RelatedTable','RelatedTag', - 'Remove','Rename','Repeat','Replace','Replicate','Report', - 'ResHeight','ResWidth','ResourceOn','ResourceTo','Resources','Restore', - 'Resume','Retry','Return','Revertoffline','Rgbscheme','Rightc', - 'Rlock','Rmdir','Rollback','Round','Rtod','Rtrim', - 'RuleExpression','RuleText','Run','Runscript','Rview','SQLAsynchronous', - 'SQLBatchMode','SQLCancel','SQLColumns','SQLConnect','SQLConnectTimeOut','SQLDisconnect', - 'SQLDispLogin','SQLDispWarnings','SQLExec','SQLGetProp','SQLIdleTimeOut','SQLMoreResults', - 'SQLPrepare','SQLQueryTimeOut','SQLSetProp','SQLTables','SQLTransactions','SQLWaitTime', - 'Save','SavePicture','ScaleUnits','Scatter','Scols', - 'Scroll','Sec','Second','Seek','Select','SendUpdates', - 'Set','SetDefault','Setfldstate','Setup','ShareConnection','ShowOLEControls', - 'ShowOLEInsertable','ShowVCXs','Sign','Sin','Size','SizeBox', - 'Skpbar','Skppad','Sort','Soundex','SourceName','Sqlcommit', - 'Sqll','Sqlrollback','Sqlstringconnect','Sqrt','Srows','StatusBar', - 'Store','Str','Strconv','Strtofile','Strtran','Stuff', - 'Stuffc','Substr','Substrc','Substring','Sum','Suspend', - 'Sys','Sysmetric','TabOrdering','Table','TableRefresh','Tablerevert', - 'Tableupdate','TagCount','TagNo','Tan','Target','This', - 'Thisform','Thisformset','Timestamp','Timestampdiff','Total','Transactions', - 'Transform','Trim','Truncate','Ttoc','Ttod','Txnlevel', - 'Txtwidth','Type','Ucase','Undefine','Unlock','Unpack', - 'Updatable','UpdatableFieldList','Update','UpdateName','UpdateNameList','UpdateTrigger', - 'UpdateType','Updated','Upper','Upsizing','Usa','Use', - 'UseMemoSize','Used','Val','Validate','Varread','Vartype', - 'Version','VersionLanguage','Wait','WaitTime','Wborder','Wchild', - 'Wcols','Week','Wexist','Wfont','WhereType','Windcmd', - 'Windhelp','Windmemo','Windmenu','Windmodify','Windquery','Windscreen', - 'Windsnip','Windstproc','WizardPrompt','Wlast','Wlcol','Wlrow', - 'Wmaximum','Wminimum','Wontop','Woutput','Wparent','Wread', - 'Wrows','Wtitle','Wvisible','Year','Zap','_Alignment', - '_Asciicols','_Asciirows','_Assist','_Beautify','_Box','_Browser', - '_Builder','_Calcmem','_Calcvalue','_Cliptext','_Converter','_Coverage', - '_Curobj','_Dblclick','_Diarydate','_Dos','_Foxdoc','_Foxgraph', - '_Gallery','_Gengraph','_Genhtml','_Genmenu','_Genpd','_Genscrn', - '_Genxtab','_Getexpr','_Include','_Indent','_Lmargin','_Mac', - '_Mbr_appnd','_Mbr_cpart','_Mbr_delet','_Mbr_font','_Mbr_goto','_Mbr_grid', - '_Mbr_link','_Mbr_mode','_Mbr_mvfld','_Mbr_mvprt','_Mbr_seek','_Mbr_sp100', - '_Mbr_sp200','_Mbr_szfld','_Mbrowse','_Mda_appnd','_Mda_avg','_Mda_brow', - '_Mda_calc','_Mda_copy','_Mda_count','_Mda_label','_Mda_pack','_Mda_reprt', - '_Mda_rindx','_Mda_setup','_Mda_sort','_Mda_sp100','_Mda_sp200','_Mda_sp300', - '_Mda_sum','_Mda_total','_Mdata','_Mdiary','_Med_clear','_Med_copy', - '_Med_cut','_Med_cvtst','_Med_find','_Med_finda','_Med_goto','_Med_insob', - '_Med_link','_Med_obj','_Med_paste','_Med_pref','_Med_pstlk','_Med_redo', - '_Med_repl','_Med_repla','_Med_slcta','_Med_sp100','_Med_sp200','_Med_sp300', - '_Med_sp400','_Med_sp500','_Med_undo','_Medit','_Mfi_clall','_Mfi_close', - '_Mfi_export','_Mfi_import','_Mfi_new','_Mfi_open','_Mfi_pgset','_Mfi_prevu', - '_Mfi_print','_Mfi_quit','_Mfi_revrt','_Mfi_savas','_Mfi_save','_Mfi_send', - '_Mfi_setup','_Mfi_sp100','_Mfi_sp200','_Mfi_sp300','_Mfi_sp400','_Mfile', - '_Mfiler','_Mfirst','_Mlabel','_Mlast','_Mline','_Mmacro', - '_Mmbldr','_Mpr_beaut','_Mpr_cancl','_Mpr_compl','_Mpr_do','_Mpr_docum', - '_Mpr_formwz','_Mpr_gener','_Mpr_graph','_Mpr_resum','_Mpr_sp100','_Mpr_sp200', - '_Mpr_sp300','_Mpr_suspend','_Mprog','_Mproj','_Mrc_appnd','_Mrc_chnge', - '_Mrc_cont','_Mrc_delet','_Mrc_goto','_Mrc_locat','_Mrc_recal','_Mrc_repl', - '_Mrc_seek','_Mrc_sp100','_Mrc_sp200','_Mrecord','_Mreport','_Mrqbe', - '_Mscreen','_Msm_data','_Msm_edit','_Msm_file','_Msm_format','_Msm_prog', - '_Msm_recrd','_Msm_systm','_Msm_text','_Msm_tools','_Msm_view','_Msm_windo', - '_Mst_about','_Mst_ascii','_Mst_calcu','_Mst_captr','_Mst_dbase','_Mst_diary', - '_Mst_filer','_Mst_help','_Mst_hphow','_Mst_hpsch','_Mst_macro','_Mst_office', - '_Mst_puzzl','_Mst_sp100','_Mst_sp200','_Mst_sp300','_Mst_specl','_Msysmenu', - '_Msystem','_Mtable','_Mtb_appnd','_Mtb_cpart','_Mtb_delet','_Mtb_delrc', - '_Mtb_goto','_Mtb_link','_Mtb_mvfld','_Mtb_mvprt','_Mtb_props','_Mtb_recal', - '_Mtb_sp100','_Mtb_sp200','_Mtb_sp300','_Mtb_sp400','_Mtb_szfld','_Mwi_arran', - '_Mwi_clear','_Mwi_cmd','_Mwi_color','_Mwi_debug','_Mwi_hide','_Mwi_hidea', - '_Mwi_min','_Mwi_move','_Mwi_rotat','_Mwi_showa','_Mwi_size','_Mwi_sp100', - '_Mwi_sp200','_Mwi_toolb','_Mwi_trace','_Mwi_view','_Mwi_zoom','_Mwindow', - '_Mwizards','_Mwz_all','_Mwz_form','_Mwz_foxdoc','_Mwz_import','_Mwz_label', - '_Mwz_mail','_Mwz_pivot','_Mwz_query','_Mwz_reprt','_Mwz_setup','_Mwz_table', - '_Mwz_upsizing','_Netware','_Oracle','_Padvance','_Pageno','_Pbpage', - '_Pcolno','_Pcopies','_Pdparms','_Pdriver','_Pdsetup','_Pecode', - '_Peject','_Pepage','_Pform','_Plength','_Plineno','_Ploffset', - '_Ppitch','_Pquality','_Pretext','_Pscode','_Pspacing','_Pwait', - '_Rmargin','_Runactivedoc','_Samples','_Screen','_Shell','_Spellchk', - '_Sqlserver','_Startup','_Tabs','_Tally','_Text','_Throttle', - '_Transport','_Triggerlevel','_Unix','_WebDevOnly','_WebMenu','_WebMsftHomePage', - '_WebVFPHomePage','_WebVfpOnlineSupport','_Windows','_Wizard','_Wrap','_scctext', - '_vfp','Additive','After','Again','Aindent','Alignright', - 'All','Alt','Alternate','And','Ansi','Any', - 'Aplabout','App','Array','As','Asc','Ascending', - 'Ascii','At','Attributes','Automatic','Autosave','Avg', - 'Bar','Before','Bell','Between','Bitmap','Blank', - 'Blink','Blocksize','Border','Bottom','Brstatus','Bucket', - 'Buffers','By','Candidate','Carry','Cascade','Catalog', - 'Cdx','Center','Century','Cga','Character','Check', - 'Classlib','Clock','Cnt','Codepage','Collate','Color', - 'Com1','Com2','Command','Compact','Compatible','Compress', - 'Confirm','Connection','Connections','Connstring','Console','Copies', - 'Cpcompile','Cpdialog','Csv','Currency','Cycle','Databases', - 'Datasource','Date','Db4','Dbc','Dbf','Dbmemo3', - 'Debug','Decimals','Defaultsource','Deletetables','Delimited','Delimiters', - 'Descending','Design','Development','Device','Dif','Disabled', - 'Distinct','Dlls','Dohistory','Dos','Dosmem','Double', - 'Driver','Duplex','Echo','Editwork','Ega25','Ega43', - 'Ems','Ems64','Encrypt','Encryption','Environment','Escape', - 'Events','Exact','Except','Exe','Exists','Expression', - 'Extended','F','Fdow','Fetch','Field','Fields', - 'File','Files','Fill','Fixed','Float','Foldconst', - 'Font','Footer','Force','Foreign','Fox2x','Foxplus', - 'Free','Freeze','From','Fullpath','Fw2','Fweek', - 'Get','Gets','Global','Group','Grow','Halfheight', - 'Having','Heading','Headings','Helpfilter','History','Hmemory', - 'Hours','Id','In','Indexes','Information','Instruct', - 'Int','Integer','Intensity','Intersect','Into','Is', - 'Isometric','Key','Keycolumns','Keycomp','Keyset','Last', - 'Ledit','Level','Library','Like','Linked','Lock', - 'Logerrors','Long','Lpartition','Mac','Macdesktop','Machelp', - 'Mackey','Macros','Mark','Master','Max','Maxmem', - 'Mdi','Memlimit','Memory','Memos','Memowidth','Memvar', - 'Menus','Messages','Middle','Min','Minimize','Minus', - 'Mod','Modal','Module','Mono43','Movers','Multilocks', - 'Mvarsiz','Mvcount','N','Near','Negotiate','Noalias', - 'Noappend','Noclear','Noclose','Noconsole','Nocptrans','Nodata', - 'Nodebug','Nodelete','Nodup','Noedit','Noeject','Noenvironment', - 'Nofloat','Nofollow','Nogrow','Noinit','Nolgrid','Nolink', - 'Nolock','Nomargin','Nomdi','Nomenu','Nominimize','Nomodify' - ), - 3 => array('Nomouse','None','Nooptimize','Nooverwrite','Noprojecthook','Noprompt', - 'Noread','Norefresh','Norequery','Norgrid','Norm','Normal', - 'Nosave','Noshadow','Noshow','Nospace','Not','Notab', - 'Notify','Noupdate','Novalidate','Noverify','Nowait','Nowindow', - 'Nowrap','Nozoom','Npv','Null','Number','Objects', - 'Odometer','Of','Off','Oleobjects','Only','Optimize', - 'Or','Orientation','Output','Outshow','Overlay','Overwrite', - 'Pad','Palette','Paperlength','Papersize','Paperwidth','Password', - 'Path','Pattern','Pause','Pdox','Pdsetup','Pen', - 'Pfs','Pixels','Plain','Popups','Precision','Preference', - 'Preview','Primary','Printer','Printquality','Procedures','Production', - 'Program','Progwork','Project','Prompt','Query','Random', - 'Range','Readborder','Readerror','Record','Recover','Redit', - 'Reference','References','Relative','Remote','Reprocess','Resource', - 'Rest','Restrict','Rgb','Right','Row','Rowset', - 'Rpd','Runtime','Safety','Same','Sample','Say', - 'Scale','Scheme','Scoreboard','Screen','Sdf','Seconds', - 'Selection','Shadows','Shared','Sheet','Shell','Shift', - 'Shutdown','Single','Some','Sortwork','Space','Sql', - 'Standalone','Status','Std','Step','Sticky','String', - 'Structure','Subclass','Summary','Sylk','Sysformats','Sysmenus', - 'System','T','Tab','Tables','Talk','Tedit', - 'Textmerge','Time','Timeout','Titles','Tmpfiles','To', - 'Topic','Transaction','Trap','Trbetween','Trigger','Ttoption', - 'Typeahead','Udfparms','Union','Unique','Userid','Users', - 'Values','Var','Verb','Vga25','Vga50','Views', - 'Volume','Where','Windows','Wk1','Wk3','Wks', - 'Workarea','Wp','Wr1','Wrap','Wrk','Xcmdfile', - 'Xl5','Xl8','Xls','Y','Yresolution','Zoom', - 'Activate','ActivateCell','Add','AddColumn','AddItem','AddListItem', - 'AddObject','AddProperty','AddToSCC','AfterBuild','AfterCloseTables','AfterDock', - 'AfterRowColChange','BeforeBuild','BeforeDock','BeforeOpenTables','BeforeRowColChange','Box', - 'Build','CheckIn','CheckOut','Circle','Clear','ClearData', - 'Cleanup','Click','CloneObject','CloseEditor','CloseTables','Cls', - 'CommandTargetExec','CommandTargetQueryStas','ContainerRelease','DataToClip','DblClick','Deactivate', - 'Delete','DeleteColumn','Deleted','Destroy','DoCmd','Dock', - 'DoScroll','DoVerb','DownClick','Drag','DragDrop','DragOver', - 'DropDown','Draw','EnterFocus','Error','ErrorMessage','Eval', - 'ExitFocus','FormatChange','GetData','GetFormat','GetLatestVersion','GoBack', - 'GotFocus','GoForward','GridHitTest','Hide','HideDoc','IndexToItemId', - 'Init','InteractiveChange','Item','ItemIdToIndex','KeyPress','Line', - 'Load','LostFocus','Message','MiddleClick','MouseDown','MouseMove', - 'MouseUp','MouseWheel','Move','Moved','NavigateTo','Newobject', - 'OLECompleteDrag','OLEDrag','OLEDragDrop','OLEDragOver','OLEGiveFeedback','OLESetData', - 'OLEStartDrag','OpenEditor','OpenTables','Paint','Point','Print', - 'ProgrammaticChange','PSet','QueryAddFile','QueryModifyFile','QueryRemoveFile','QueryRunFile', - 'QueryUnload','RangeHigh','RangeLow','ReadActivate','ReadExpression','ReadDeactivate', - 'ReadMethod','ReadShow','ReadValid','ReadWhen','Refresh','Release', - 'RemoveFromSCC','RemoveItem','RemoveListItem','RemoveObject','Requery','RequestData', - 'Reset','ResetToDefault','Resize','RightClick','SaveAs','SaveAsClass', - 'Scrolled','SetAll','SetData','SetFocus','SetFormat','SetMain', - 'SetVar','SetViewPort','ShowDoc','ShowWhatsThis','TextHeight','TextWidth', - 'Timer','UIEnable','UnDock','UndoCheckOut','Unload','UpClick', - 'Valid','WhatsThisMode','When','WriteExpression','WriteMethod','ZOrder', - 'ATGetColors','ATListColors','Accelerate','ActiveColumn','ActiveControl','ActiveForm', - 'ActiveObjectId','ActivePage','ActiveProject','ActiveRow','AddLineFeeds','Alias', - 'Alignment','AllowAddNew','AllowHeaderSizing','AllowResize','AllowRowSizing','AllowTabs', - 'AlwaysOnTop','Application','AutoActivate','AutoCenter','AutoCloseTables','AutoIncrement', - 'AutoOpenTables','AutoRelease','AutoSize','AutoVerbMenu','AutoYield','AvailNum', - 'BackColor','BackStyle','BaseClass','BorderColor','BorderStyle','BorderWidth', - 'Bound','BoundColumn','BoundTo','BrowseAlignment','BrowseCellMarg','BrowseDestWidth', - 'BufferMode','BufferModeOverride','BuildDateTime','ButtonCount','ButtonIndex','Buttons', - 'CLSID','CanAccelerate','CanGetFocus','CanLoseFocus','Cancel','Caption', - 'ChildAlias','ChildOrder','Class','ClassLibrary','ClipControls','ClipRect', - 'Closable','ColorScheme','ColorSource','ColumnCount','ColumnHeaders','ColumnLines', - 'ColumnOrder','ColumnWidths','Columns','Comment','ContinuousScroll','ControlBox', - 'ControlCount','ControlIndex','ControlSource','Controls','CurrentControl','CurrentX', - 'CurrentY','CursorSource','Curvature','DataSession','DataSessionId','DataSourceObj', - 'DataType','Database','DateFormat','DateMark','DefButton','DefButtonOrig', - 'DefHeight','DefLeft','DefTop','DefWidth','Default','DefaultFilePath', - 'DefineWindows','DeleteMark','Desktop','Dirty','DisabledBackColor','DisabledByEOF', - 'DisabledForeColor','DisabledItemBackColor','DisabledItemForeColor','DisabledPicture','DispPageHeight','DispPageWidth', - 'DisplayCount','DisplayValue','DoCreate','DockPosition','Docked','DocumentFile', - 'DownPicture','DragIcon','DragMode','DragState','DrawMode','DrawStyle', - 'DrawWidth','DynamicAlignment','DynamicBackColor','DynamicCurrentControl','DynamicFontBold','DynamicFontItalic', - 'DynamicFontName','DynamicFontOutline','DynamicFontShadow','DynamicFontSize','DynamicFontStrikethru','DynamicFontUnderline', - 'DynamicForeColor','EditFlags','Enabled','EnabledByReadLock','Encrypted','EnvLevel', - 'ErasePage','FileClass','FileClassLibrary','FillColor','FillStyle','Filter', - 'FirstElement','FontBold','FontItalic','FontName','FontOutline','FontShadow', - 'FontSize','FontStrikethru','FontUnderline','ForceFocus','ForeColor','FormCount', - 'FormIndex','FormPageCount','FormPageIndex','Format','Forms','FoxFont', - 'FullName','GoFirst','GoLast','GridLineColor','GridLineWidth','GridLines' - ), - 4 => array('HPROJ','HWnd','HalfHeightCaption','HasClip','HeaderGap','HeaderHeight', - 'Height','HelpContextID','HideSelection','Highlight','HomeDir','HostName', - 'HotKey','HscrollSmallChange','IMEMode','Icon','IgnoreInsert','InResize', - 'Increment','IncrementalSearch','InitialSelectedAlias','InputMask','Instancing','IntegralHeight', - 'Interval','ItemBackColor','ItemData','ItemForeColor','ItemIDData','ItemTips', - 'JustReadLocked','KeyPreview','KeyboardHighValue','KeyboardLowValue','LastModified','Left', - 'LeftColumn','LineSlant','LinkMaster','List','ListCount','ListIndex', - 'ListItem','ListItemId','LockDataSource','LockScreen','MDIForm','MainClass', - 'MainFile','Margin','MaxButton','MaxHeight','MaxLeft','MaxLength', - 'MaxTop','MaxWidth','MemoWindow','MinButton','MinHeight','MinWidth', - 'MouseIcon','MousePointer','Movable','MoverBars','MultiSelect','Name', - 'NapTime','NewIndex','NewItemId','NoDataOnLoad','NoDefine','NotifyContainer', - 'NullDisplay','NumberOfElements','OLEDragMode','OLEDragPicture','OLEDropEffects','OLEDropHasData', - 'OLEDropMode','OLERequestPendingTimeOut','OLEServerBusyRaiseError','OLEServerBusyTimeOut','OLETypeAllowed','OleClass', - 'OleClassId','OleControlContainer','OleIDispInValue','OleIDispOutValue','OleIDispatchIncoming','OleIDispatchOutgoing', - 'OnResize','OneToMany','OpenViews','OpenWindow','PageCount','PageHeight', - 'PageOrder','PageWidth','Pages','Panel','PanelLink','Parent', - 'ParentAlias','ParentClass','Partition','PasswordChar','Picture','ProcessID', - 'ProgID','ProjectHookClass','ProjectHookLibrary','Projects','ReadColors','ReadCycle', - 'ReadFiller','ReadLock','ReadMouse','ReadOnly','ReadSave','ReadSize', - 'ReadTimeout','RecordMark','RecordSource','RecordSourceType','Rect','RelationalExpr', - 'RelativeColumn','RelativeRow','ReleaseErase','ReleaseType','ReleaseWindows','Resizable', - 'RightToLeft','RowHeight','RowSource','RowSourceType','SCCProvider','SCCStatus', - 'SDIForm','ScaleMode','ScrollBars','SelLength','SelStart','SelText', - 'SelectOnEntry','Selected','SelectedBackColor','SelectedForeColor','SelectedID','SelectedItemBackColor', - 'SelectedItemForeColor','SelfEdit','ServerClass','ServerClassLibrary','ServerHelpFile','ServerName', - 'ServerProject','ShowTips','ShowWindow','Sizable','Size','Size', - 'Size','Skip','SkipForm','Sorted','SourceType','Sparse', - 'SpecialEffect','SpinnerHighValue','SpinnerLowValue','SplitBar','StartMode','StatusBarText', - 'Stretch','StrictDateEntry','Style','SystemRefCount','TabIndex','TabStop', - 'TabStretch','TabStyle','Tabhit','Tabs','Tag','TerminateRead', - 'ThreadID','TitleBar','ToolTipText','Top','TopIndex','TopItemId', - 'TypeLibCLSID','TypeLibDesc','TypeLibName','UnlockDataSource','Value','ValueDirty', - 'VersionComments','VersionCompany','VersionCopyright','VersionDescription','VersionNumber','VersionProduct', - 'VersionTrademarks','View','ViewPortHeight','ViewPortLeft','ViewPortTop','ViewPortWidth', - 'Visible','VscrollSmallChange','WasActive','WasOpen','WhatsThisButton','WhatsThisHelp', - 'WhatsThisHelpID','Width','WindowList','WindowNTIList','WindowState','WindowType', - 'WordWrap','ZOrderSet','ActiveDoc','Checkbox','Column','ComboBox', - 'CommandButton','CommandGroup','Container','Control','Cursor','Custom', - 'DataEnvironment','EditBox','Empty','FontClass','Form','Formset', - 'General','Grid','Header','HyperLink','Image','Label', - 'ListBox','Memo','OleBaseControl','OleBoundControl','OleClassIDispOut','OleControl', - 'OptionButton','OptionGroup','Page','PageFrame','ProjectHook','RectClass', - 'Relation','Session','Shape','Spinner','TextBox' ,'Toolbar' - ), - ), - 'SYMBOLS' => array( - "!", "@", "$", "%", - "(", ")", "{", "}", "[", "]", - "-", "+", "*", "/", - "=", "<", ">", - ":", ";", ",", ".", "&", - "?", "??", "???" - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: blue;', - 2 => 'color: blue;', - 3 => 'color: blue;', - 4 => 'color: blue;' - ), - 'COMMENTS' => array( - 1 => 'color: green; font-style: italic;', - 2 => 'color: green; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: blue;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 1 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: blue;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/visualprolog.php b/_piecrust/libs/Geshi/geshi/visualprolog.php deleted file mode 100644 index 2182719..0000000 --- a/_piecrust/libs/Geshi/geshi/visualprolog.php +++ /dev/null @@ -1,129 +0,0 @@ - 'Visual Prolog', - 'COMMENT_SINGLE' => array(1 => '%'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'HARDQUOTE' => array('@"', '"'), - 'HARDESCAPE' => array('""'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - 'clauses','constants','constructors','delegate','domains','facts', - 'goal','guards','inherits','monitor','namespace','open', - 'predicates','properties','resolve','supports' - ), - 2 => array( - 'align','and','anyflow','as','bitsize','catch','determ','digits', - 'div','do','else','elseif','erroneous','externally','failure', - 'finally','from','language','mod','multi','nondeterm','or', - 'procedure','quot','rem','single','then','to' - ), - 3 => array( - '#bininclude','#else','#elseif','#endif','#error','#export', - '#externally','#if','#import','#include','#message','#options', - '#orrequires','#requires','#then','#warning' - ), - ), - 'SYMBOLS' => array( - '+', '-', '*', '?', '=', '/', '>', '<', '^', '!', ':', '(', ')', '{', '}', '[', ']' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => true, - 1 => true, - 2 => true, - 3 => true - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #808000;', - 2 => 'color: #333399;', - 3 => 'color: #800080;', - ), - 'COMMENTS' => array( - 1 => 'color: #AA77BD', - 'MULTI' => 'color: #AA77BD' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #008080;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #00B7B7;' - ), - 'NUMBERS' => array( - 0 => 'color: #0000FF;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #000000;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - 0 => 'color: #008000;', - 1 => 'color: #808000;', - 2 => 'color: #333399;', - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => ':', - 2 => '::' - ), - 'REGEXPS' => array( - 0 => "(?)[A-Z_]\w*(?!\w)", - 1 => "\\b(end\\s+)?(implement|class|interface)\\b", - 2 => "\\b(end\\s+)?(foreach|if|try)\\b", - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/whitespace.php b/_piecrust/libs/Geshi/geshi/whitespace.php deleted file mode 100644 index 91186d3..0000000 --- a/_piecrust/libs/Geshi/geshi/whitespace.php +++ /dev/null @@ -1,121 +0,0 @@ - 'Whitespace', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array( - 3 => "/[^\n\x20\x09]+/s" - ), - 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - ), - 'SYMBOLS' => array( - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - ), - 'COMMENTS' => array( - 3 => 'color: #666666; font-style: italic;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - ), - 'ESCAPE_CHAR' => array( - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - 2 => 'background-color: #FF9999;', - 3 => 'background-color: #9999FF;' - ) - ), - 'URLS' => array( - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - 2 => array( - GESHI_SEARCH => "(? " ", - GESHI_MODIFIERS => 's', - GESHI_BEFORE => "", - GESHI_AFTER => "" - ), - 3 => array( - GESHI_SEARCH => "\x09", - GESHI_REPLACE => " ", - GESHI_MODIFIERS => 's', - GESHI_BEFORE => "", - GESHI_AFTER => "" - ), - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'KEYWORDS' => GESHI_NEVER, - 'SYMBOLS' => GESHI_NEVER, - 'STRINGS' => GESHI_NEVER, -// 'REGEXPS' => GESHI_NEVER, - 'NUMBERS' => GESHI_NEVER - ) - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/whois.php b/_piecrust/libs/Geshi/geshi/whois.php deleted file mode 100644 index 24065ed..0000000 --- a/_piecrust/libs/Geshi/geshi/whois.php +++ /dev/null @@ -1,181 +0,0 @@ - 'Whois (RPSL format)', - 'COMMENT_SINGLE' => array(1 => '% ', 2 => '%ERROR:'), - 'COMMENT_MULTI' => array(), - 'COMMENT_REGEXP' => array( - //Description - 3 => '/(?:(?<=^remarks:)|(?<=^descr:))(.|\n\s)*$/mi', - - //Contact Details - 4 => '/(?<=^address:)(.|\n\s)*$/mi', - 5 => '/\+\d+(?:(?:\s\(\d+(\s\d+)*\))?(?:\s\d+)+|-\d+-\d+)/', - 6 => '/\b(?!-|\.)[\w\-\.]+(?!-|\.)@((?!-)[\w\-]+\.)+\w+\b/', - - //IP, Networks and AS information\links - 7 => '/\b(? '/\bAS\d+\b/' - ), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array(), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( //Object Types - 'as-block','as-set','aut-num','domain','filter-set','inet-rtr', - 'inet6num','inetnum','irt','key-cert','limerick','mntner', - 'organisation','peering-set','person','poem','role','route-set', - 'route','route6','rtr-set' - ), - 2 => array( //Field Types - 'abuse-mailbox','address','admin-c','aggr-bndry','aggr-mtd','alias', - 'as-block','as-name','as-set','aut-num','auth','author','certif', - 'changed','components','country','default','descr','dom-net', - 'domain','ds-rdata','e-mail','encryption','export','export-comps', - 'fax-no','filter','filter-set','fingerpr','form','holes','ifaddr', - 'import','inet-rtr','inet6num','inetnum','inject','interface','irt', - 'irt-nfy','key-cert','limerick','local-as','mbrs-by-ref', - 'member-of','members','method','mnt-by','mnt-domains','mnt-irt', - 'mnt-lower','mnt-nfy','mnt-ref','mnt-routes','mntner','mp-default', - 'mp-export','mp-filter','mp-import','mp-members','mp-peer', - 'mp-peering','netname','nic-hdl','notify','nserver','org', - 'org-name','org-type','organisation','origin','owner','peer', - 'peering','peering-set','person','phone','poem','ref-nfy','refer', - 'referral-by','remarks','rev-srv','role','route','route-set', - 'route6','rtr-set','signature','source','status','sub-dom','tech-c', - 'text','upd-to','zone-c' - ), - 3 => array( //RPSL reserved - 'accept','action','and','announce','any','as-any','at','atomic', - 'except','from','inbound','into','networks','not','or','outbound', - 'peeras','refine','rs-any','to' - ) - ), - 'SYMBOLS' => array( - ':' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000FF; font-weight: bold;', - 2 => 'color: #000080; font-weight: bold;', - 3 => 'color: #990000; font-weight: bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #666666; font-style: italic;', - 2 => 'color: #666666; font-style: italic;', - 3 => 'color: #404080;', - 4 => 'color: #408040;', - 5 => 'color: #408040;', - 6 => 'color: #408040;', - 7 => 'color: #804040;', - 8 => 'color: #804040;', - 'MULTI' => 'color: #666666; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;', - 'HARD' => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #009900;' - ), - 'STRINGS' => array( - 0 => '', - ), - 'NUMBERS' => array( - 0 => 'color: #000080;', - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #0000FF;' - ), - 'REGEXPS' => array( - 0 => 'color: #000088;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://www.irr.net/docs/rpsl.html' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - //Variables - 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*" - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4, - 'PARSER_CONTROL' => array( - 'KEYWORDS' => array( - 1 => array( - 'DISALLOWED_BEFORE' => '(?<=\A |\A \n(?m:^)|\n\n(?m:^))' - ), - 2 => array( - 'DISALLOWED_BEFORE' => '(?m:^)' - ) - ), - 'ENABLE_FLAGS' => array( - 'BRACKETS' => GESHI_NEVER, - 'SYMBOLS' => GESHI_NEVER, - 'BRACKETS' => GESHI_NEVER, - 'STRINGS' => GESHI_NEVER, - 'ESCAPE_CHAR' => GESHI_NEVER, - 'NUMBERS' => GESHI_NEVER, - 'METHODS' => GESHI_NEVER, - 'SCRIPT' => GESHI_NEVER - ) - ), -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/winbatch.php b/_piecrust/libs/Geshi/geshi/winbatch.php deleted file mode 100644 index a39d1de..0000000 --- a/_piecrust/libs/Geshi/geshi/winbatch.php +++ /dev/null @@ -1,369 +0,0 @@ - 'Winbatch', - 'COMMENT_SINGLE' => array(1 => ';', 2 => ':'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"', '`'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'While', 'To', 'Then', 'Switch', 'Select', 'Return', 'Next', 'IntControl', 'Include', 'In', 'If', - 'Goto', 'GoSub', 'ForEach', 'For', 'Exit', 'Execute', 'ErrorMode', 'EndWhile', 'EndSwitch', '#EndSubRoutine', - 'EndSelect', 'EndIf', '#EEndFunction', 'EndFor', 'End', 'Else', 'DropWild', 'Drop', '#DefineSubRoutine', - '#DefineFunction', 'Debug', 'Continue', 'Case', 'CallExt', 'Call', 'By', 'BreakPoint', 'Break' - ), - 2 => array( - 'ZOOMED', 'YES', 'WORD4', 'WORD2', 'WORD1', 'WHOLESECTION', 'WAIT', 'UNSORTED', 'UNCHECK', 'TRUE', 'TILE', - 'TAB', 'STRING', 'STACK', 'SPC2NET', 'SORTED', 'SOK', 'SNET2PC', 'SINGLE', 'SHIFT', 'SERVER', 'SERRWINSOCK', - 'SERRVOICE', 'SERRSOCKET', 'SERRSERVICE', 'SERRSELECT', 'SERRPARAM', 'SERROUTOFMEM', 'SERRNOTFOUND', 'SERRNOCONN', - 'SERRNOANSWER', 'SERRMUSTWAIT', 'SERRIPADDR', 'SERRHOSTNAME', 'SERRFAILURE', 'SERRBUSY', 'SCROLLLOCK', 'SCANCEL', - 'SAVE', 'SALREADY', 'ROWS', 'REGUSERS', 'REGROOT', 'REGMACHINE', 'REGCURRENT', 'REGCLASSES', 'RDBLCLICK', 'RCLICK', - 'RBUTTON', 'RAD2DEG', 'QSUCCESSINFO', 'QSUCCESS', 'QSTILLEX', 'QROLLBACK', 'QNULL', 'QNODATA', 'QNEXT', 'QNEEDDATA', - 'QFIRST', 'QCOMMIT', 'QBADHANDLE', 'PRINTER', 'PLANCKJOULES', 'PLANCKERGS', 'PI', 'PARSEONLY', 'PARSEC', 'P3ERRREPLY', - 'OPEN', 'ON', 'OFF', 'NUMLOCK', 'NOWAIT', 'NOTIFY', 'NORMAL', 'NORESIZE', 'NONE', 'NO', 'NCSAFORMAT', 'MULTIPLE', - 'MSFORMAT', 'MPLAYRDBLCK', 'MPLAYRCLK', 'MPLAYRBUTTON', 'MPLAYMDBLCK', 'MPLAYMCLK', 'MPLAYMBUTTON', 'MPLAYLDBLCK', - 'MPLAYLCLK', 'MPLAYLBUTTON', 'MINOR', 'MDBLCLICK', 'MCLICK', 'MBYESNO', 'MBUTTON', 'MBOKCANCEL', 'MAJOR', 'MAGFIELD', - 'LOCALGROUP', 'LIGHTMTPS', 'LIGHTMPS', 'LF', 'LDBLCLICK', 'LCLICK', 'LBUTTON', 'LAFFDBERROR', 'ICON', 'HTTPS', 'HTTP', - 'HNOHEADER', 'HMETHODPOST', 'HMETHODGET', 'HIDDEN', 'HHEADERONLY', 'HHEADER', 'GRAVITATION', 'GOPHER', 'GOLDENRATIO', - 'GMTSEC', 'GLOBALGROUP', 'GFTSEC', 'GETPROCID', 'GETEXITCODE', 'FWDSCAN', 'FTPPASSIVE', 'FTP', 'FLOAT8', 'FARADAY', - 'FALSE', 'EXTENDED', 'EULERS', 'ENABLE', 'ELECTRIC', 'DRIVE', 'DISABLE', 'DESCENDING', 'DEG2RAD', 'DEFAULT', 'CTRL', - 'CRLF', 'CR', 'COMMONFORMAT', 'COLUMNS', 'CHECK', 'CAPSLOCK', 'CANCEL', 'BOLTZMANN', 'BACKSCAN', 'AVOGADRO', 'ATTR_X', - 'ATTR_T', 'ATTR_SY', 'ATTR_SH', 'ATTR_RO', 'ATTR_RI', 'ATTR_P', 'ATTR_IC', 'ATTR_H', 'ATTR_DM', 'ATTR_DI', 'ATTR_DC', - 'ATTR_CI', 'ATTR_A', 'ASCENDING', 'ARRANGE', 'AMC', 'ACC_WRITE', 'ACC_READ_NT', 'ACC_READ_95', 'ACC_READ', 'ACC_PRINT_NT', - 'ACC_PMANG_NT', 'ACC_PFULL_NT', 'ACC_LIST', 'ACC_FULL_NT', 'ACC_FULL_95', 'ACC_DELETE', 'ACC_CREATE', 'ACC_CONTROL', - 'ACC_CHNG_NT', 'ACC_ATTRIB', 'ABOVEICONS' - ), - 3 => array( - 'Yields', 'Yield', 'WinZoom', 'WinWaitExist', 'WinWaitClose', 'WinWaitChild', 'WinVersion', 'WinTitle', 'WinSysInfo', - 'WinState', 'WinShow', 'WinResources', 'WinPositionChild', 'WinPosition', 'WinPlaceSet', 'WinPlaceGet', 'WinPlaceChild', - 'WinPlace', 'WinParmSet', 'WinParmGet', 'WinName', 'WinMetrics', 'WinItemProcId', 'WinItemNameId', 'WinItemizeEx', - 'WinItemize', 'WinItemChild', 'WinIsDos', 'WinIdGet', 'WinIconize', 'WinHide', 'WinHelp', 'WinGetactive', 'WinExistchild', - 'WinExist', 'WinExename', 'WinConfig', 'WinClosenot', 'WinClose', 'WinArrange', 'WinActivechild', 'WinActivchild', - 'WinActivate', 'WebVerifyCard', 'WebSetTimeout', 'WebParamSize', 'WebParamNames', 'WebParamFile', 'WebParamData', - 'WebParamBuf', 'WebOutFile', 'WebOutBinary', 'WebOut', 'WebDumpError', 'WebDatData', 'WebCounter', 'WebConSize', 'WebConData', - 'WebConBuf', 'WebCmdData', 'WebBaseConv', 'Wallpaper', 'WaitForKeyEX', 'WaitForKey', 'VersionDLL', 'Version', 'VarType', - 'TimeYmdHms', 'TimeWait', 'TimeSubtract', 'TimeJulToYmd', 'TimeJulianDay', 'TimeDiffSecs', 'TimeDiffDays', 'TimeDiff', 'TimeDelay', - 'TimeDate', 'TimeAdd', 'TextSelect', 'TextBoxSort', 'TextBox', 'Terminate', 'Tanh', 'Tan', 'SysParamInfo', 'SvcWaitForCmd', - 'SvcSetState', 'SvcSetAccept', 'StrUpper', 'StrTrim', 'StrSubWild', 'StrSub', 'StrScan', 'StrReplace', 'StrLower', 'StrLenWild', - 'StrLen', 'StrIndexWild', 'StrIndexNC', 'StrIndex', 'StriCmp', 'StrFixLeft', 'StrFixCharsL', 'StrFixChars', 'StrFix', 'StrFill', - 'StrCnt', 'StrCmp', 'StrClean', 'StrCharCount', 'StrCat', 'StrByteCount', 'Sqrt', 'SoundVolume', 'Sounds', 'Snapshot', 'Sinh', 'Sin', - 'ShortCutMake', 'ShortCutInfo', 'ShortCutExtra', 'ShortCutEdit', 'ShortCutDir', 'ShellExecute', 'SendMenusToEx', 'SendMenusTo', - 'SendKeysTo', 'SendKeysChild', 'SendKey', 'RunZoomWait', 'RunZoom', 'RunWithLogon', 'RunWait', 'RunShell', 'RunIconWait', - 'RunIcon', 'RunHideWait', 'RunHide', 'RunExit', 'RunEnviron', 'Run', 'RtStatus', 'Reload', 'RegUnloadHive', 'RegSetValue', - 'RegSetQword', 'RegSetMulSz', 'RegSetExpSz', 'RegSetEx', 'RegSetDword', 'RegSetBin', 'RegQueryValue', 'RegQueryStr', - 'RegQueryQword', 'RegQueryMulSz', 'RegQueryKeys', 'RegQueryKeyLastWriteTime', 'RegQueryKey', 'RegQueryItem', 'RegQueryExpSz', - 'RegQueryEx', 'RegQueryDword', 'RegQueryBin', 'RegOpenKeyEx', 'RegOpenKey', 'RegOpenFlags', 'RegLoadHive', 'RegExistValue', - 'RegExistKey', 'RegEntryType', 'RegDelValue', 'RegDeleteKey', 'RegCreateKey', 'RegConnect', 'RegCloseKey', 'RegApp', 'Random', - 'PtrPersistent', 'PtrGlobalDefine', 'PtrGlobal', 'Print', 'PlayWaveform', 'PlayMidi', 'PlayMedia', 'PipeServerWrite', 'PipeServerRead', - 'PipeServerCreate', 'PipeServerClose', 'PipeInfo', 'PipeClientSendRecvData', 'PipeClientOpen', 'PipeClientClose', 'Pause', - 'ParseData', 'ObjectTypeGet', 'ObjectType', 'ObjectOpen', 'ObjectGet', 'ObjectEventRemove', 'ObjectEventAdd', - 'ObjectCreate', 'ObjectConstToArray', 'ObjectConstantsGet', 'ObjectCollectionOpen', 'ObjectCollectionNext', - 'ObjectCollectionClose', 'ObjectClose', 'ObjectAccess', 'Num2Char', 'NetInfo', 'MsgTextGet', 'MousePlay', 'MouseMove', 'MouseInfo', - 'MouseDrag', 'MouseCoords', 'MouseClickBtn', 'MouseClick', 'mod', 'Min', 'Message', 'Max', 'Loge', 'LogDisk', 'Log10', 'LastError', - 'KeyToggleSet', 'KeyToggleGet', 'ItemSortNc', 'ItemSort', 'ItemSelect', 'ItemReplace', 'ItemRemove', 'ItemLocate', 'ItemInsert', - 'ItemExtractCSV', 'ItemExtract', 'ItemCountCSV', 'ItemCount', 'IsNumber', 'IsLicensed', 'IsKeyDown', 'IsInt', 'IsFloat', 'IsDefined', - 'Int', 'InstallFile', 'IniWritePvt', 'IniWrite', 'IniReadPvt', 'IniRead', 'IniItemizePvt', 'IniItemize', 'IniDeletePvt', 'IniDelete', - 'IgnoreInput', 'IconReplace', 'IconInfo', 'IconExtract', 'IconArrange', 'GetTickCount', 'GetObject', 'GetExactTime', 'Floor', - 'FindWindow', 'FileYmdHms', 'FileWrite', 'FileVerInfo', 'FileTimeTouch', 'FileTimeSetEx', 'FileTimeSet', 'FileTimeGetEx', - 'FileTimeGet', 'FileTimeCode', 'FileSizeEx', 'FileSize', 'FileRoot', 'FileRename', 'FileRead', 'FilePutW', 'FilePut', 'FilePath', - 'FileOpen', 'FileNameShort', 'FileNameLong', 'FileNameEval2', 'FileNameEval1', 'FileMoveAttr', 'FileMove', 'FileMapName', - 'FileLocate', 'FileItemPath', 'FileItemize', 'FileInfoToArray', 'FileGetW', 'FileGet', 'FileFullname', 'FileExtension', 'FileExist', - 'FileDelete', 'FileCreateTemp', 'FileCopyAttr', 'FileCopy', 'FileCompare', 'FileClose', 'FileBaseName', 'FileAttrSetEx', - 'FileAttrSet', 'FileAttrGetEx', 'FileAttrGet', 'FileAppend', 'Fabs', 'ExtractAttachedFile', 'Exp', 'ExeTypeInfo', 'Exclusive', - 'EnvItemize', 'EnvironSet', 'Environment', 'EndSession', 'DosVersion', 'DllLoad', 'DllLastError', 'DllHwnd', 'DllHinst', - 'DllFree', 'DllCallCDecl', 'DllCall', 'Display', 'DiskVolinfo', 'DiskSize', 'DiskScan', 'DiskInfo', 'DiskFree', 'DiskExist', - 'DirWindows', 'DirSize', 'DirScript', 'DirRename', 'DirRemove', 'DirMake', 'DirItemize', 'DirInfoToArray', 'DirHome', 'DirGet', - 'DirExist', 'DirChange', 'DirAttrSetEx', 'DirAttrSet', 'DirAttrGetEx', 'DirAttrGet', 'DialogProcOptions', 'DialogObject', - 'DialogControlState', 'DialogControlSet', 'DialogControlGet', 'DialogBox', 'Dialog', 'Delay', 'Decimals', 'DebugTrace', - 'DebugData', 'DDETimeout', 'DDETerminate', 'DDERequest', 'DDEPoke', 'DDEInitiate', 'DDEExecute', 'DateTime', 'CurrFilepath', - 'CurrentPath', 'CurrentFile', 'CreateObject', 'Cosh', 'Cos', 'ClipPut', 'ClipHasFormat', 'ClipGetEx', 'ClipGet', 'ClipAppend', - 'ChrUnicodeToString', 'ChrUnicodeToHex', 'ChrStringToUnicode', 'ChrSetCodepage', 'ChrHexToUnicode', 'ChrGetCodepage', - 'Char2Num', 'Ceiling', 'ButtonNames', 'BoxUpdates', 'BoxTitle', 'BoxTextFont', 'BoxTextColor', 'BoxText', 'BoxShut', 'BoxPen', - 'BoxOpen', 'BoxNew', 'BoxMapmode', 'BoxesUp', 'BoxDrawText', 'BoxDrawRect', 'BoxDrawLine', 'BoxDrawCircle', 'BoxDestroy', - 'BoxDataTag', 'BoxDataClear', 'BoxColor', 'BoxCaption', 'BoxButtonWait', 'BoxButtonStat', 'BoxButtonKill', 'BoxButtonDraw', - 'BoxBitMap', 'BinaryXor', 'BinaryXlate', 'BinaryWriteEx', 'BinaryWrite', 'BinaryTagRepl', 'BinaryTagLen', 'BinaryTagInit', - 'BinaryTagIndex', 'BinaryTagFind', 'BinaryTagExtr', 'BinaryStrCnt', 'BinarySort', 'BinaryReplace', 'BinaryReadEx', - 'BinaryRead', 'BinaryPokeStrW', 'BinaryPokeStr', 'BinaryPokeHex', 'BinaryPokeFlt', 'BinaryPoke4', 'BinaryPoke2', 'BinaryPoke', - 'BinaryPeekStrW', 'BinaryPeekStr', 'BinaryPeekHex', 'BinaryPeekFlt', 'BinaryPeek4', 'BinaryPeek2', 'BinaryPeek', 'BinaryOr', - 'BinaryOleType', 'BinaryIndexNc', 'BinaryIndexEx', 'BinaryIndexBin', 'BinaryIndex', 'BinaryIncrFlt', 'BinaryIncr4', - 'BinaryIncr2', 'BinaryIncr', 'BinaryHashRec', 'BinaryFree', 'BinaryEodSet', 'BinaryEodGet', 'BinaryCopy', 'BinaryConvert', - 'BinaryCompare', 'BinaryClipPut', 'BinaryClipGet', 'BinaryChecksum', 'BinaryBufInfo', 'BinaryAnd', 'BinaryAllocArray', - 'BinaryAlloc', 'Beep', 'Average', 'Atan', 'AskYesNo', 'AskTextbox', 'AskPassword', 'AskLine', 'AskItemlist', 'AskFont', - 'AskFiletext', 'AskFilename', 'AskDirectory', 'AskColor', 'Asin', 'ArrInitialize', 'ArrInfo', 'ArrDimension', - 'Arrayize', 'ArrayFilePutCSV', 'ArrayFilePut', 'ArrayFileGetCSV', 'ArrayFileGet', 'AppWaitClose', 'AppExist', 'AddExtender', - 'Acos', 'Abs', 'About' - ), - 4 => array( - 'zZipFiles', 'zVersionInfo', 'zVersion', 'zUnZipFiles', 'zSetPortBit', 'zRPortShift', 'zPortOut', 'zPortIn', 'zNotPortBit', - 'zLPortShift', 'zGetPortBit', 'zClrPortBit', 'xVerifyCCard', 'xSendMessage', 'xMessageBox', 'xMemCompact', 'xHex', 'xGetElapsed', - 'xGetChildHwnd', 'xExtenderInfo', 'xEnumStreams', 'xEjectMedia', 'xDriveReady', 'xDiskLabelGet', 'xCursorSet', 'xBaseConvert', - 'wxPing', 'wxParmSet', 'wxParmGet', 'wxMsgSetHdr', 'wxMsgGetHdr', 'wxMsgGetBody', 'wxHost2Addr', 'wxGetLastErr', 'wxGetInfo', - 'wxGetErrDesc', 'wxAddr2Host', 'wtsWaitSystemEvent', 'wtsVersion', 'wtsTerminateProcess', 'wtsShutdownSystem', 'wtsSendMessage', - 'wtsQuerySessionInfo', 'wtsProcIdToSessId', 'wtsLogoffSession', 'wtsLastErrMsg', 'wtsIsTSEnabled', 'wtsIsCitrixEnabled', - 'wtsGetActiveConsoleSessId', 'wtsEnumSessions', 'wtsEnumProcesses', 'wtsDisconnectSession', 'wnWrkGroups', 'wnVersion', 'wntWtsUserSet', - 'wntWtsUserGet', 'wntVersion', 'wntUserSidChk', 'wntUserSetDat', 'wntUserRename', 'wntUserProps', 'wntUserList', 'wntUserInfo', - 'wntUserGetDat', 'wntUserFiles', 'wntUserExist', 'wntUserDel', 'wntUserAddDat', 'wntUserAdd', 'wntSvcStatus', 'wntSvcStart', - 'wntSvcList', 'wntSvcDelete', 'wntSvcCreate', 'wntSvcControl', 'wntSvcCfgSet', 'wntSvcCfgGet', 'wntShutdown', 'wntShareUsers', - 'wntShareSet', 'wntShareList', 'wntShareInfo', 'wntShareDel', 'wntShareAdd', 'wntServiceInf', 'wntServiceAt', 'wntServerType', - 'wntServerList', 'wntServerInfo', 'wntSecurityGet', 'wntRunAsUser', 'wntResources2', 'wntResources', 'wntRemoteTime', 'wntRasUserSet', - 'wntRasUserGet', 'wntProfileInfo', 'wntProfileDel', 'wntPrivUsers', 'wntPrivList', 'wntPrivGet', 'wntPrivDel', 'wntPrivAdd', - 'wntOwnerSet', 'wntOwnerGet', 'wntMemberSet', 'wntMemberLst2', 'wntMemberList', 'wntMemberGrps', 'wntMemberGet', 'wntMemberDel', - 'wntLsaPolSet', 'wntLsaPolGet', 'wntListGroups', 'wntLastErrMsg', 'wntGroupRen', 'wntGroupInfo', 'wntGroupEdit', 'wntGroupDel', - 'wntGroupAdd', 'wntGetUser', 'wntGetDrive', 'wntGetDc', 'wntGetCon', 'wntFileUsers', 'wntFilesOpen', 'wntFileClose', 'wntEventWrite', - 'wntEventLog', 'wntDomainSync', 'wntDirDialog', 'wntDfsList', 'wntDfsGetInfo', 'wntCurrUsers', 'wntChgPswd', 'wntCancelCon', - 'wntAuditMod', 'wntAuditList', 'wntAuditGet', 'wntAuditDel', 'wntAuditAdd2', 'wntAuditAdd', 'wntAddPrinter', 'wntAddDrive', - 'wntAcctPolSet', 'wntAcctPolGet', 'wntAcctList', 'wntAcctInfo', 'wntAccessMod', 'wntAccessList', 'wntAccessGet', 'wntAccessDel', - 'wntaccessadd2', 'wntAccessAdd', 'wnShares', 'wnSharePath', 'wnShareName', 'wnShareCnt', 'wnServers', 'wnRestore', 'wnNetNames', - 'wnGetUser', 'wnGetCon', 'wnGetCaps', 'wnDlgShare', 'wnDlgNoShare', 'wnDlgDiscon', 'wnDlgCon4', 'wnDlgCon3', 'wnDlgCon2', 'wnDlgCon', - 'wnDlgBrowse', 'wnDialog', 'wnCmptrInfo', 'wnCancelCon', 'wnAddCon', 'WaitSRQ', 'w9xVersion', 'w9xUserSetDat', 'w9xUserRename', - 'w9xUserprops', 'w9xUserList', 'w9xUserinfo', 'w9xUserGetDat', 'w9xUserExist', 'w9xUserDel', 'w9xUserAddDat', 'w9xUserAdd', 'w9xShareSet', - 'w9xShareInfo', 'w9xShareDel', 'w9xShareAdd', 'w9xServiceAt', 'w9xServerList', 'w9xRemoteTime', 'w9xOwnerGet', 'w9xMemberSet', - 'w9xMemberList', 'w9xMemberGrps', 'w9xMemberGet', 'w9xMemberDel', 'w9xListGroups', 'w9xGroupInfo', 'w9xGroupDel', 'w9xGroupAdd', - 'w9xGetDC', 'w9xFileUsers', 'w9xAccessList', 'w9xAccessGet', 'w9xAccessDel', 'w9xAccessAdd', 'w95Version', 'w95ShareUsers', - 'w95ShareSet', 'w95ShareList', 'w95ShareInfo', 'w95ShareDel', 'w95ShareAdd', 'w95ServiceInf', 'w95ServiceAt', 'w95ServerType', - 'w95ServerInfo', 'w95Resources', 'w95GetUser', 'w95GetDrive', 'w95GetCon', 'w95FileUsers', 'w95FileClose', 'w95DirDialog', - 'w95CancelCon', 'w95AddPrinter', 'w95AddDrive', 'w95AccessDel', 'w95AccessAdd', 'w3Version', 'w3PrtBrowse', 'w3NetGetUser', - 'w3NetDialog', 'w3GetCon', 'w3GetCaps', 'w3DirBrowse', 'w3CancelCon', 'w3AddCon', 'urlGetScheme', 'urlEncode', 'urlDecode', - 'tVersion', 'tSetPriority', 'TriggerList', 'Trigger', 'tRemoteConn', 'tOpenProc', 'tListProc', 'tListMod', 'tKillProc', 'tGetProcInfo', - 'tGetPriority', 'tGetModInfo', 'tGetLastError', 'tGetData', 'TestSys', 'TestSRQ', 'tCountProc', 'tCompatible', 'tCloseProc', - 'tBrowseCntrs', 'sSendString', 'sSendNum', 'sSendLine', 'sSendBinary', 'sRecvNum', 'sRecvLine', 'sRecvBinary', 'SrchVersion', - 'SrchNext', 'SrchInit', 'SrchFree', 'sOpen', 'sOK2Send', 'sOK2Recv', 'smtpSendText', 'smtpSendFile', 'sListen', 'SetRWLS', - 'SendSetup', 'SendLLO', 'SendList', 'SendIFC', 'SendDataBytes', 'SendCmds', 'Send', 'sConnect', 'sClose', 'SByteOrder32', - 'sByteOrder16', 'sAccept', 'rRegVersion', 'rRegSearch', 'ResetSys', 'ReceiveSetup', 'Receive', 'ReadStsByte', 'RcvRespMsg', - 'RasVersion', 'RasTypeSize', 'RasRename', 'RasNumCons', 'RasNameValid', 'RasListActCon', 'RasItemize', 'RasHangUp', 'RasGetLastErr', - 'RasGetConStat', 'RasEntrySet', 'RasEntryInfo', 'RasEntryExist', 'RasEntryDel', 'RasEntryAdd', 'RasDialInfo', 'RasDial', - 'RasCopy', 'RasConStatus', 'qVersionInfo', 'qTransact', 'qTables', 'qSpecial', 'qSetConnOpt', 'qNumRsltCol', 'qNativeSql', 'qLastCode', - 'qGetData', 'qFreeStmt', 'qFreeEnv', 'qFreeConnect', 'qFetch', 'qExecDirect', 'qError', 'qDriverList', 'qDriverCon', 'qDisconnect', - 'qDataSources', 'qConnect', 'qConfigError', 'qConfigData', 'qColumns', 'qBindCol', 'qAllocStmt', 'qAllocEnv', 'qAllocConnect', - 'pWaitFor', 'pVersionInfo', 'pTimeout', 'pSetPublish', 'pSetPrtInfo', 'pSetPrtAttrib', 'pSetDefPrtEx', 'pSetDefPrt', 'pSendFile', - 'pRecvFile', 'pPutString', 'pPutLine', 'pPutChar', 'pPutByte', 'pPutBinary', 'PPollUnconfig', 'PPollConfig', 'PPoll', 'pPeekChar', - 'pPeekByte', 'pPaperSizes', 'pPaperBins', 'pModemSReg', 'pModemParams', 'pModemInit', 'pModemHangUp', 'pModemDial', 'pModemControl', - 'pModemConnect', 'pModemCommand', 'pModemAnsRing', 'pModemAnsCall', 'pMediaTypes', 'pGetString', 'pGetPublish', 'pGetPrtList', - 'pGetPrtInfo', 'pGetPrtAttrib', 'pGetLine', 'pGetLastError', 'pGetErrorMsg', 'pGetErrorCode', 'pGetDefPrtInf', 'pGetChar', - 'pGetByte', 'pGetBinary', 'pDelPrtConn', 'pDelPrinter', 'pComOpen', 'pComModify', 'pComInfo', 'pComControl', 'pComClose', - 'pCheckSum', 'pCheckBinary', 'pCaptureOn', 'pCaptureOff', 'pCaptureLog', 'PassControl', 'pAddPrtConn', 'pAddPrinter', 'p3RecvText', - 'p3RecvFile', 'p3Peek', 'p3Open', 'p3GetReply', 'p3Delete', 'p3Count', 'p3Close', 'nwWhoAmI', 'nwVfyPassword', 'nwVersion', - 'nwSrvShutdown', 'nwSrvNLMMgr', 'nwSrvGenGUID', 'nwSrvExecNCF', 'nwSetVolLimit', 'nwSetSrvParam', 'nwSetSrvInfo', 'nwSetPrimServ', - 'nwSetPassword', 'nwSetOptions', 'nwSetFileInfo', 'nwSetDirLimit', 'nwSetDirInfo', 'nwSetContext', 'nwSetBcastMode', 'nwServerList', - 'nwSendBcastMsg', 'nwSearchObjects', 'nwSearchFilter', 'nwRenameObject', 'nwRemoveObject', 'nwReceiveBcastMsg', 'nwNameConvert', - 'nwMutateObject', 'nwMoveObject', 'nwModifyObject', 'nwMapDelete', 'nwMap', 'nwLogout', 'nwLogin', 'nwListUserGroups', - 'nwListObjects', 'nwListGroupMembers', 'nwLastErrMsg', 'nwIsUserInGroup', 'nwGetVolLimit', 'nwGetSrvStats', 'nwGetSrvParam', - 'nwGetSrvInfo', 'nwGetSrvCfg', 'nwGetOptions', 'nwGetObjValue', 'nwGetObjInfo', 'nwGetNLMInfo', 'nwGetMapped', 'nwGetFileInfo', - 'nwGetDirLimit', 'nwGetDirInfo', 'nwGetContext', 'nwGetConnInfo', 'nwGetCapture', 'nwGetBcastMode', 'nwGetAttrInfo', - 'nwDriveStatus', 'nwDrivePath', 'nwDetachFromServer', 'nwDelUserFromGroup', 'nwDelConnNum', 'nwCompareObject', 'nwClientInfo', - 'nwChgPassword', 'nwAttachToServer', 'nwAddUserToGroup', 'nwAddObject', 'netVersion', 'netResources', 'netGetUser', 'netGetCon', - 'netDirDialog', 'netCancelCon', 'netAddPrinter', 'netAddDrive', 'n4Version', 'n4UserGroups', 'n4UserGroupEx', 'n4SetPrimServ', - 'n4SetOptions', 'n4SetContextG', 'n4SetContext', 'n4ServerList', 'n4ServerInfo', 'n4ObjSearch', 'n4ObjRename', 'n4ObjOptions', - 'n4ObjMove', 'n4ObjGetVal', 'n4ObjectProps', 'n4ObjectList', 'n4ObjectInfo', 'n4ObjDelete', 'n4NameConvert', 'n4MsgsEndAll', - 'n4MsgsEnd', 'n4MemberSet', 'n4MemberGet', 'n4MemberDel', 'n4MapRoot', 'n4MapDir', 'n4MapDelete', 'n4Map', 'n4LogoutTree', - 'n4Logout', 'n4Login', 'n4GetUserName', 'n4GetUserId', 'n4GetUser', 'n4GetNetAddr', 'n4GetMapped', 'n4GetContext', - 'n4GetConnNum', 'n4FileUsers', 'n4FileTimeGet', 'n4FileAttrSet', 'n4FileAttrGet', 'n4DriveStatus', 'n4DrivePath', 'n4DirTimeGet', - 'n4DirAttrSet', 'n4DirAttrGet', 'n4Detach', 'n4ChgPassword', 'n4CapturePrt', 'n4CaptureGet', 'n4CaptureEnd', 'n4Attach', - 'n3Version', 'n3UserGroups', 'n3ServerList', 'n3ServerInfo', 'n3MsgsEndAll', 'n3MsgsEnd', 'n3MemberSet', 'n3MemberGet', - 'n3MemberDel', 'n3Maproot', 'n3Mapdir', 'n3Mapdelete', 'n3Map', 'n3Logout', 'n3GetUserId', 'n3GetUser', 'n3GetNetAddr', - 'n3GetMapped', 'n3GetConnNum', 'n3FileTimeGet', 'n3FileAttrSet', 'n3FileAttrGet', 'n3DriveStatus', 'n3DrivePath', - 'n3DirTimeGet', 'n3DirAttrSet', 'n3DirAttrGet', 'n3Detach', 'n3ChgPassword', 'n3CapturePrt', 'n3CaptureGet', - 'n3CaptureEnd', 'n3Attach', 'mVersion', 'mSyncMail', 'mSendMailEx', 'mSendMail', 'mrecvmail', 'mReadNextMsg', 'mLogOn', - 'mLogOff', 'mFindNext', 'mError', 'mCompatible', 'kVerInfo', 'kStatusInfo', 'kSendText', 'kSendFile', 'kManageImap4', - 'kInit', 'kGetMail', 'kExtra', 'kDest', 'kDeletePop3', 'iWriteDataBuf', 'iWriteData', 'iVersion', 'IUrlOpen', 'iUrlEncode', - 'iUrlDecode', 'iReadDataBuf', 'iReadData', 'ipVersion', 'ipPing', 'iPing', 'ipHost2Addr', 'ipGetLastErr', 'ipGetAddress', - 'iParseURL', 'ipAddr2Host', 'iOptionSet', 'iOptionGet', 'ImgWave', 'ImgVersion', 'ImgUnsharpMask', 'ImgThreshold', 'ImgSwirl', - 'ImgSpread', 'ImgSolarize', 'ImgShear', 'ImgSharpen', 'ImgShade', 'ImgScale', 'ImgSample', 'ImgRotate', 'ImgResize', - 'ImgReduceNoise', 'ImgRaise', 'ImgOilPaint', 'ImgNormalize', 'ImgNegate', 'ImgMotionBlur', 'ImgModulate', 'ImgMinify', - 'ImgMedianFilter', 'ImgMagnify', 'ImgLevel', 'ImgIsValid', 'ImgIsPalette', 'ImgIsMono', 'ImgIsGray', 'ImgInfo', 'ImgImplode', - 'ImgGetImageType', 'ImgGetColorCount', 'ImgGaussianBlur', 'ImgGamma', 'ImgFrame', 'ImgFlop', 'ImgFlip', 'ImgEqualize', - 'ImgEnhance', 'ImgEmboss', 'ImgCrop', 'ImgConvert', 'ImgContrast', 'ImgCompare', 'ImgColorize', 'ImgChop', 'ImgCharcoal', - 'ImgBorder', 'ImgBlur', 'ImgAddNoise', 'iLocFindNext', 'iLocFindInit', 'iHttpOpen', 'iHttpInit', 'iHttpHeaders', 'iHttpAccept', - 'iHostConnect', 'iHost2Addr', 'iGetResponse', 'iGetLastError', 'iGetIEVer', 'iGetConStatEx', 'iGetConState', 'iFtpRename', - 'iFtpPut', 'iFtpOpen', 'iFtpGet', 'iFtpFindNext', 'iFtpFindInit', 'iFtpDirRemove', 'iFtpDirMake', 'iFtpDirGet', 'iFtpDirChange', - 'iFtpDialog', 'iFtpDelete', 'iFtpCmd', 'iErrorDialog', 'iDialItemize', 'iDialHangUp', 'iDial', 'iCookieSet', 'iCookieGet', - 'iContentURL', 'iContentFile', 'iContentData', 'iClose', 'ibWrtf', 'ibWrt', 'ibWait', 'ibVersion', 'ibUnlock', 'ibTrg', - 'ibTmo', 'ibStop', 'ibStatus', 'ibSta', 'ibSre', 'ibSic', 'ibSad', 'ibRsv', 'ibRsp', 'ibRsc', 'ibRpp', 'ibRdf', 'ibRd', - 'ibPpc', 'ibPoke', 'ibPct', 'ibPad', 'ibOnl', 'ibMakeAddr', 'ibLock', 'ibLoc', 'ibLn', 'ibLines', 'ibIst', 'ibInit', - 'ibGts', 'ibGetSad', 'ibGetPad', 'ibFind', 'ibEvent', 'ibErr', 'ibEot', 'ibEos', 'iBegin', 'ibDma', 'ibDev', 'ibConfig', - 'ibCntl', 'ibCnt', 'ibCmda', 'ibCmd', 'ibClr', 'ibCac', 'ibBna', 'ibAsk', 'iAddr2Host', 'huge_Thousands', 'huge_Subtract', - 'huge_SetOptions', 'huge_Multiply', 'huge_GetLastError', 'huge_ExtenderInfo', 'huge_Divide', 'huge_Decimal', 'huge_Add', - 'httpStripHTML', 'httpRecvTextF', 'httpRecvText', 'httpRecvQuery', 'httpRecvQryF', 'httpRecvFile', 'httpGetServer', - 'httpGetQuery', 'httpGetPath', 'httpGetFile', 'httpGetDir', 'httpGetAnchor', 'httpFullPath', 'httpFirewall', 'httpAuth', - 'ftpRename', 'ftpQuote', 'ftpPut', 'ftpOpen', 'ftpList', 'ftpGet', 'ftpFirewall', 'ftpDelete', 'ftpClose', 'ftpChDir', - 'FindRQS', 'FindLstn', 'EnvSetVar', 'EnvPathDel', 'EnvPathChk', 'EnvPathAdd', 'EnvListVars', 'EnvGetVar', 'EnvGetInfo', - 'EnableRemote', 'EnableLocal', 'ehllapiWait', 'ehllapiVersion', 'ehllapiUninit', 'ehllapiStopKeyIntercept', 'ehllapiStopHostNotify', - 'ehllapiStopCloseIntercept', 'ehllapiStartKeyIntercept', 'ehllapiStartHostNotify', 'ehllapiStartCloseIntercept', - 'ehllapiSetWindowStatus', 'ehllapiSetSessionParams', 'ehllapiSetPSWindowName', 'ehllapiSetCursorLoc', 'ehllapiSendKey', - 'ehllapiSendFile', 'ehllapiSearchPS', 'ehllapiSearchField', 'ehllapiRunProfile', 'ehllapiResetSystem', 'ehllapiReserve', - 'ehllapiRelease', 'ehllapiReceiveFile', 'ehllapiQuerySystem', 'ehllapiQueryPSStatus', 'ehllapiQueryHostNotify', - 'ehllapiQueryFieldAttr', 'ehllapiQueryCursorLoc', 'ehllapiQueryCloseIntercept', 'ehllapiPostInterceptStatus', - 'ehllapiPause', 'ehllapiLastErrMsg', 'ehllapiInit', 'ehllapiGetWindowStatus', 'ehllapiGetPSHWND', 'ehllapiGetKey', - 'ehllapiFindFieldPos', 'ehllapiFindFieldLen', 'ehllapiDisconnectPS', 'ehllapiCvtRCToPos', 'ehllapiCvtPosToRC', - 'ehllapiCopyTextToPS', 'ehllapiCopyTextToField', 'ehllapiCopyTextFromPS', 'ehllapiCopyTextFromField', 'ehllapiCopyOIA', - 'ehllapiConnectPS', 'dunItemize', 'dunDisconnect', 'dunConnectEx', 'dunConnect', 'dsTestParam', 'dsSIDtoHexStr', 'dsSetSecProp', - 'dsSetProperty', 'dsSetPassword', 'dsSetObj', 'dsSetCredentX', 'dsSetCredent', 'dsRemFromGrp', 'dsRelSecObj', 'dsMoveObj', - 'dsIsObject', 'dsIsMemberGrp', 'dsIsContainer', 'dsGetUsersGrps', 'dsGetSecProp', 'dsGetPropName', 'dsGetProperty', - 'dsGetPrntPath', 'dsGetPrimGrp', 'dsGetMemGrp', 'dsGetInfo', 'dsGetClass', 'dsGetChldPath', 'dsFindPath', 'dsDeleteObj', - 'dsCreatSecObj', 'dsCreateObj', 'dsCopySecObj', 'dsAddToGrp', 'dsAclRemAce', 'dsAclOrderAce', 'dsAclGetAces', 'dsAclAddAce', - 'DevClearList', 'DevClear', 'dbTest', 'dbSwapColumns', 'dbSort', 'dbSetRecordField', 'dbSetOptions', 'dbSetErrorReporting', - 'dbSetEntireRecord', 'dbSetDelimiter', 'dbSave', 'dbOpen', 'dbNameColumn', 'dbMakeNewItem', 'dbInsertColumn', 'dbGetVersion', - 'dbGetSaveStatus', 'dbGetRecordField', 'dbGetRecordCount', 'dbGetNextItem', 'dbGetLastError', 'dbGetEntireRecord', - 'dbGetColumnType', 'dbGetColumnNumber', 'dbGetColumnName', 'dbGetColumnCount', 'dbFindRecord', 'dbExist', 'dbEasterEgg', - 'dbDeleteRecord', 'dbDeleteColumn', 'dbDebug', 'dbCookDatabases', 'dbClose', 'dbCloneRecord', 'dbBindCol', 'cWndState', - 'cWndinfo', 'cWndGetWndSpecName', 'cWndGetWndSpec', 'cWndexist', 'cWndByWndSpecName', 'cWndByWndSpec', 'cWndbyseq', - 'cWndbyname', 'cWndbyid', 'cWndbyclass', 'cWinIDConvert', 'cVersionInfo', 'cVendorId', 'cSetWndText', 'cSetUpDownPos', - 'cSetTvItem', 'cSetTrackPos', 'cSetTabItem', 'cSetLvItem', 'cSetLbItemEx', 'cSetLbItem', 'cSetIpAddr', 'cSetFocus', - 'cSetEditText', 'cSetDtpDate', 'cSetCbItem', 'cSetCalDate', 'cSendMessage', 'cRadioButton', 'cPostMessage', 'cPostButton', - 'cMemStat', 'cGetWndCursor', 'cGetUpDownPos', 'cGetUpDownMin', 'cGetUpDownMax', 'cGetTVItem', 'cGetTrackPos', 'cGetTrackMin', - 'cGetTrackMax', 'cGetTbText', 'cGetSbText', 'cGetLvText', 'cGetLvSelText', 'cGetLvFocText', 'cGetLvDdtText', 'cGetLvColText', - 'cGetLbText', 'cGetLbSelText', 'cGetLbCount', 'cGetIpAddr', 'cGetInfo', 'cGetHrText', 'cGetFocus', 'cGetEditText', 'cGetDtpDate', - 'cGetControlImageCRC', 'cGetCBText', 'cGetCbCount', 'cGetCalDate', 'cFindByName', 'cFindByClass', 'cEnablestate', 'cDblClickItem', - 'cCpuSupt', 'cCpuSpeed', 'cCpuIdExt', 'cCpuId', 'cCpuFeat', 'cCpuBenchmark', 'cCloneCheck', 'cClickToolbar', 'cClickButton', - 'cClearTvItem', 'cClearLvItem', 'cClearLbAll', 'cCheckbox', 'aVersion', 'aStatusbar', 'aShellFolder', 'aMsgTimeout', 'AllSPoll', - 'aGetLastError', 'aFileRename', 'aFileMove', 'aFileDelete', 'aFileCopy' - ), - 5 => array( - 'wWordRight', 'wWordLeft', 'wWinTile', 'wWinRestore', 'wWinNext', 'wWinMinimize', 'wWinMaximize', 'wWinCloseAll', 'wWinClose', - 'wWinCascade', 'wWinArricons', 'wViewOutput', 'wViewOptions', 'wViewHtml', 'wUpperCase', 'wUpline', 'wUndo', 'wTopOfFile', 'wToggleIns', - 'wTab', 'wStatusMsg', 'wStartSel', 'wSpellcheck', 'wSetProject', 'wSetPrefs', 'wSetColblk', 'wSetBookmark', 'wSelWordRight', - 'wSelWordLeft', 'wSelUp', 'wSelTop', 'wSelRight', 'wSelPgUp', 'wSelPgDn', 'wSelLeft', 'wSelInfo', 'wSelHome', 'wSelEnd', 'wSelectAll', - 'wSelDown', 'wSelBottom', 'wRunRebuild', 'wRunMake', 'wRunExecute', 'wRunDebug', 'wRunConfig', 'wRunCompile', 'wRunCommand', 'wRight', - 'wRepeat', 'wRedo', 'wRecord', 'wProperties', 'wPrintDirect', 'wPrinSetup', 'wPrevError', 'wPaste', 'wPageUp', 'wPageDown', 'wNextError', - 'wNewLine', 'wLowerCase', 'wLineCount', 'wLeft', 'wInvertCase', 'wInsString', 'wInsLine', 'wHome', 'wHelpKeyword', 'wHelpKeybrd', - 'wHelpIndex', 'wHelpHelp', 'wHelpCmds', 'wHelpAbout', 'wGotoLine', 'wGotoCol', 'wGetWrap', 'wGetWord', 'wGetUndo', 'wGetSelstate', - 'wGetRedo', 'wGetOutput', 'wGetModified', 'wGetLineNo', 'wGetIns', 'wGetFilename', 'wGetColNo', 'wGetChar', 'wFtpOpen', 'wFindNext', - 'wFindInFiles', 'wFind', 'wFileSaveAs', 'wFileSave', 'wFileRevert', 'wFilePrint', 'wFilePgSetup', 'wFileOpen', 'wFileNew', 'wFileMerge', - 'wFileList', 'wFileExit', 'wEndSel', 'wEndOfFile', 'wEnd', 'wEdWrap', 'wEdWordRight', 'wEdWordLeft', 'wEdUpLine', 'wEdUndo', 'wEdTopOfFile', - 'wEdToggleIns', 'wEdTab', 'wEdStartSel', 'wEdSetColBlk', 'wEdSelectAll', 'wEdRight', 'wEdRedo', 'wEdPaste', 'wEdPageUp', 'wEdPageDown', - 'wEdNewLine', 'wEdLeft', 'wEdInsString', 'wEdHome', 'wEdGoToLine', 'wEdGoToCol', 'wEdGetWord', 'wEdEndSel', 'wEdEndOfFile', 'wEdEnd', - 'wEdDownLine', 'wEdDelete', 'wEdCutLine', 'wEdCut', 'wEdCopyLine', 'wEdCopy', 'wEdClearSel', 'wEdBackTab', 'wEdBackspace', 'wDownLine', - 'wDelete', 'wDelButton', 'wCutMarked', 'wCutLine', 'wCutAppend', 'wCut', 'wCopyMarked', 'wCopyLine', 'wCopyAppend', 'wCopy', 'wCompile', - 'wClearSel', 'wChange', 'wCallMacro', 'wBackTab', 'wBackspace', 'wAutoIndent', 'wAddButton', 'edWindowTile', 'edWindowRestore', - 'edWindowNext', 'edWindowMinimize', 'edWindowMaximize', 'edWindowCloseall', 'edWindowClose', 'edWindowCascade', 'edWindowArrangeIcons', - 'edStatusMsg', 'edSearchViewOutput', 'edSearchRepeat', 'edSearchPrevError', 'edSearchNextError', 'edSearchFind', 'edSearchChange', - 'edRunRebuild', 'edRunMake', 'edRunExecute', 'edRunDebug', 'edRunConfigure', 'edRunCompile', 'edRunCommand', 'edRecord', 'edHelpProcedures', - 'edHelpKeyword', 'edHelpKeyboard', 'edHelpIndex', 'edHelpHelp', 'edHelpCommands', 'edHelpAbout', 'edGetWordWrapState', 'edGetWindowName', - 'edGetUndoState', 'edGetSelectionState', 'edGetRedoState', 'edGetModifiedStatus', 'edGetLineNumber', 'edGetInsertState', 'edGetColumnNumber', - 'edGetChar', 'edFileSetPreferences', 'edFileSaveAs', 'edFileSave', 'edFilePrinterSetup', 'edFilePrint', 'edFilePageSetup', 'edFileOpen', - 'edFileNew', 'edFileMerge', 'edFileList', 'edFileExit', 'edEditWrap', 'edEditWordRight', 'edEditWordLeft', 'edEditUpLine', 'edEditUndo', - 'edEditToggleIns', 'edEditTab', 'edEditStartSelection', 'edEditSetColumnBlock', 'edEditSetBookmark', 'edEditSelectAll', 'edEditRight', - 'edEditRedo', 'edEditPaste', 'edEditPageUp', 'edEditPageDown', 'edEditLeft', 'edEditInsertString', 'edEditGoToLine', 'edEditGoToColumn', - 'edEditGoToBookmark', 'edEditGetCurrentWord', 'edEditEndSelection', 'edEditEndOfLine', 'edEditEndOfFile', 'edEditDownline', 'edEditDelete', - 'edEditCutline', 'edEditCut', 'edEditCopyline', 'edEditCopy', 'edEditClearSelection', 'edEditBeginningOfLine', 'edEditBeginningOfFile', - 'edEditBackTab', 'edEditBackspace', 'edDeleteButton', 'edAddButton' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '{', '}', '!', '+', '-', '~', '$', '^', '?', '@', '%', '#', '&', '*', '|', '/', '<', '>' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false, - 5 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #800080;', - 2 => 'color: #0080FF; font-weight: bold;', - 3 => 'color: #0000FF;', - 4 => 'color: #FF00FF;', - 5 => 'color: #008000;' - ), - 'COMMENTS' => array( - 1 => 'color: #008000; font-style: italic;', - 2 => 'color: #FF1010; font-weight: bold;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - 0 => 'color: #006600;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'REGEXPS' => array( - 0 => 'color: #0000ff;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '', - 5 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array(), - 'REGEXPS' => array(//Variable names - 0 => "[\\$]{1,2}[a-zA-Z_][a-zA-Z0-9_]*" - ), - 'STRICT_MODE_APPLIES' => GESHI_MAYBE, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/xbasic.php b/_piecrust/libs/Geshi/geshi/xbasic.php deleted file mode 100644 index b30c02c..0000000 --- a/_piecrust/libs/Geshi/geshi/xbasic.php +++ /dev/null @@ -1,144 +0,0 @@ - 'XBasic', - 'COMMENT_SINGLE' => array(1 => "'"), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - 1 => array( - 'WHILE', 'UNTIL', 'TRUE', 'TO', 'THEN', 'SUB', 'STOP', 'STEP', - 'SELECT', 'RETURN', 'PROGRAM', 'NEXT', 'LOOP', 'IFZ', - 'IFT', 'IFF', 'IF', 'GOTO', 'GOSUB', 'FOR', 'FALSE', 'EXIT', - 'ENDIF', 'END', 'ELSE', 'DO', 'CASE', 'ALL' - ), - 2 => array( - 'XMAKE', 'XLONGAT', 'XLONG', 'WRITE', 'VOID', 'VERSION$', 'VERSION', - 'USHORTAT', 'USHORT', 'UNION', 'ULONGAT', 'ULONG', 'UCASE$', - 'UBYTEAT', 'UBYTE', 'UBOUND', 'TYPE','TRIM$', 'TAB', 'SWAP', - 'SUBADDRESS', 'SUBADDR', 'STUFF$', 'STRING', 'STRING$', 'STR$', - 'STATIC', 'SSHORTAT', 'SSHORT', 'SPACE$', 'SMAKE', 'SLONGAT', 'SLONG', - 'SIZE', 'SINGLEAT', 'SINGLE', 'SIGNED$', 'SIGN', 'SHELL', 'SHARED', - 'SGN', 'SFUNCTION', 'SET', 'SEEK', 'SCOMPLEX', 'SBYTEAT', 'SBYTE', - 'RTRIM$', 'ROTATER', 'ROTATEL', 'RJUST$', 'RINSTRI', 'RINSTR', - 'RINCHRI', 'RINCHR', 'RIGHT$', 'REDIM', 'READ', 'RCLIP$', 'QUIT', - 'PROGRAM$', 'PRINT', 'POF', 'OPEN', 'OCTO$', 'OCT$', 'NULL$', 'MIN', - 'MID$', 'MAX', 'MAKE', 'LTRIM$', 'LOF', 'LJUST$', 'LIBRARY', 'LEN', - 'LEFT$', 'LCLIP$', 'LCASE$', 'INTERNAL', 'INT', 'INSTRI', 'INSTR', - 'INLINE$', 'INFILE$', 'INCHRI', 'INCHR', 'INC', 'IMPORT', 'HIGH1', - 'HIGH0', 'HEXX$', 'HEX$', 'GOADDRESS', 'GOADDR', 'GMAKE', 'GLOW', - 'GIANTAT', 'GIANT', 'GHIGH', 'FUNCTION', 'FUNCADDRESS', 'FUNCADDR', - 'FORMAT$', 'FIX', 'EXTU', 'EXTS', 'EXTERNAL', 'ERROR', 'ERROR$', - 'EOF', 'DOUBLEAT', 'DOUBLE', 'DMAKE', 'DLOW', 'DIM', 'DHIGH', - 'DECLARE', 'DEC', 'DCOMPLEX', 'CSTRING$', 'CSIZE', 'CSIZE$', 'CLR', - 'CLOSE', 'CLEAR', 'CJUST$', 'CHR$', 'CFUNCTION', 'BITFIELD', 'BINB$', - 'BIN$', 'AUTOX', 'AUTOS', 'AUTO', 'ATTACH', 'ASC', 'ABS' - ), - 3 => array( - 'XOR', 'OR', 'NOT', 'MOD', 'AND' - ), - 4 => array( - 'TANH', 'TAN', 'SQRT', 'SINH', 'SIN', 'SECH', 'SEC', 'POWER', - 'LOG10', 'LOG', 'EXP10', 'EXP', 'CSCH', 'CSC', 'COTH', 'COT', 'COSH', - 'COS', 'ATANH', 'ATAN', 'ASINH', 'ASIN', 'ASECH', 'ASEC', 'ACSCH', - 'ACSC', 'ACOSH', 'ACOS' - ) - ), - 'SYMBOLS' => array( - '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', - '=','+','-' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #00a1a1;font-weight: bold', - 2 => 'color: #000066;font-weight: bold', - 3 => 'color: #00a166;font-weight: bold', - 4 => 'color: #0066a1;font-weight: bold' - ), - 'COMMENTS' => array( - 1 => 'color: #808080;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => 'http://www.xbasic.org', - 4 => 'http://www.xbasic.org' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/xml.php b/_piecrust/libs/Geshi/geshi/xml.php deleted file mode 100644 index e85a556..0000000 --- a/_piecrust/libs/Geshi/geshi/xml.php +++ /dev/null @@ -1,157 +0,0 @@ - 'XML', - 'COMMENT_SINGLE' => array(), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - ), - 'SYMBOLS' => array( - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - ), - 'COMMENTS' => array( - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #66cc66;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'SCRIPT' => array( - -1 => 'color: #808080; font-style: italic;', // comments - 0 => 'color: #00bbdd;', - 1 => 'color: #ddbb00;', - 2 => 'color: #339933;', - 3 => 'color: #009900;' - ), - 'REGEXPS' => array( - 0 => 'color: #000066;', - 1 => 'color: #000000; font-weight: bold;', - 2 => 'color: #000000; font-weight: bold;' - ) - ), - 'URLS' => array( - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - 0 => array(//attribute names - GESHI_SEARCH => '([a-z_:][\w\-\.:]*)(=)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => 'i', - GESHI_BEFORE => '', - GESHI_AFTER => '\\2' - ), - 1 => array(//Initial header line - GESHI_SEARCH => '(<[\/?|(\?xml)]?[a-z_:][\w\-\.:]*(\??>)?)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => 'i', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - 2 => array(//Tag end markers - GESHI_SEARCH => '(([\/|\?])?>)', - GESHI_REPLACE => '\\1', - GESHI_MODIFIERS => 'i', - GESHI_BEFORE => '', - GESHI_AFTER => '' - ), - ), - 'STRICT_MODE_APPLIES' => GESHI_ALWAYS, - 'SCRIPT_DELIMITERS' => array( - -1 => array( - '' - ), - 0 => array( - ' '>' - ), - 1 => array( - '&' => ';' - ), - 2 => array( - ' ']]>' - ), - 3 => array( - '<' => '>' - ) - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - -1 => false, - 0 => false, - 1 => false, - 2 => false, - 3 => true - ), - 'TAB_WIDTH' => 2, - 'PARSER_CONTROL' => array( - 'ENABLE_FLAGS' => array( - 'NUMBERS' => GESHI_NEVER - ) - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/xorg_conf.php b/_piecrust/libs/Geshi/geshi/xorg_conf.php deleted file mode 100644 index 388850d..0000000 --- a/_piecrust/libs/Geshi/geshi/xorg_conf.php +++ /dev/null @@ -1,124 +0,0 @@ - 'Xorg configuration', - 'COMMENT_SINGLE' => array(1 => '#'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - // sections - 1 => array( - 'Section', 'EndSection', 'SubSection', 'EndSubSection' - ), - 2 => array( - // see http://www.x.org/archive/X11R6.9.0/doc/html/xorg.conf.5.html - 'BiosBase', 'Black', 'Boardname', 'BusID', 'ChipID', 'ChipRev', - 'Chipset', 'ClockChip', 'Clocks', 'DacSpeed', - 'DefaultDepth', 'DefaultFbBpp', 'Depth', 'Device', - 'DisplaySize', 'Driver', 'FbBpp', 'Gamma', - 'HorizSync', 'IOBase', 'Identifier', 'InputDevice', - 'Load', 'MemBase', 'Mode', 'Modeline', 'Modelname', - 'Modes', 'Monitor', 'Option', 'Ramdac', 'RgbPath', - 'Screen', 'TextClockFreq', 'UseModes', 'VendorName', - 'VertRefresh', 'VideoAdaptor', 'VideoRam', - 'ViewPort', 'Virtual', 'Visual', 'Weight', 'White' - ), - 3 => array( - // some sub-keywords - // screen position - 'Above', 'Absolute', 'Below', 'LeftOf', 'Relative', 'RightOf', - // modes - 'DotClock', 'Flags', 'HSkew', 'HTimings', 'VScan', 'VTimings' - ), - ), - 'REGEXPS' => array( - ), - 'SYMBOLS' => array( - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #b1b100;', - 2 => 'color: #990000;', - 3 => 'color: #550000;' - ), - 'COMMENTS' => array( - 1 => 'color: #adadad; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - ), - 'BRACKETS' => array( - ), - 'STRINGS' => array( - 0 => 'color: #0000ff;', - ), - 'NUMBERS' => array( - 0 => 'color: #cc66cc;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 4 -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/xpp.php b/_piecrust/libs/Geshi/geshi/xpp.php deleted file mode 100644 index 367a1c6..0000000 --- a/_piecrust/libs/Geshi/geshi/xpp.php +++ /dev/null @@ -1,436 +0,0 @@ - - * - * CHANGES - * ------- - * 2007/02/28 (1.0.0) - * - First Release - * - * TODO (updated 2007/02/27) - * ------------------------- - * - ************************************************************************************* - * - * This file is part of GeSHi. - * - * GeSHi is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * GeSHi is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeSHi; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - ************************************************************************************/ - -$language_data = array ( - 'LANG_NAME' => 'X++', - 'COMMENT_SINGLE' => array(1 => '//'), - 'COMMENT_MULTI' => array('/*' => '*/'), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( // Primitive types - 'void', - 'str', - 'real', - 'int64', - 'int', - 'date', - 'container', - 'boolean', - 'anytype' - ), - 2 => array( // Keywords - 'window', - 'while', - 'try', - 'true', - 'throw', - 'switch', - 'super', - 'static', - 'server', - 'right', - 'return', - 'retry', - 'public', - 'protected', - 'private', - 'print', - 'pause', - 'null', - 'new', - 'mod', - 'left', - 'interface', - 'implements', - 'if', - 'for', - 'final', - 'false', - 'extends', - 'else', - 'edit', - 'do', - 'div', - 'display', - 'default', - 'continue', - 'client', - 'class', - 'changeCompany', - 'case', - 'breakpoint', - 'break', - 'at', - 'abstract' - ), - 3 => array( // Functions within the Axapta kernel - 'year', - 'wkofyr', - 'webwebpartstr', - 'webstaticfilestr', - 'websitetempstr', - 'websitedefstr', - 'webreportstr', - 'webpagedefstr', - 'weboutputcontentitemstr', - 'webmenustr', - 'webletitemstr', - 'webformstr', - 'webdisplaycontentitemstr', - 'webactionitemstr', - 'varstr', - 'utilmoyr', - 'uint2str', - 'typeof', - 'typeid', - 'trunc', - 'today', - 'timenow', - 'time2str', - 'term', - 'tanh', - 'tan', - 'tablestr', - 'tablestaticmethodstr', - 'tablepname', - 'tablenum', - 'tablename2id', - 'tablemethodstr', - 'tableid2pname', - 'tableid2name', - 'tablefieldgroupstr', - 'tablecollectionstr', - 'systemdateset', - 'systemdateget', - 'syd', - 'substr', - 'strupr', - 'strscan', - 'strrtrim', - 'strrep', - 'strrem', - 'strprompt', - 'strpoke', - 'strnfind', - 'strlwr', - 'strltrim', - 'strline', - 'strlen', - 'strkeep', - 'strins', - 'strfmt', - 'strfind', - 'strdel', - 'strcolseq', - 'strcmp', - 'stralpha', - 'str2time', - 'str2num', - 'str2int64', - 'str2int', - 'str2guid', - 'str2enum', - 'str2date', - 'staticmethodstr', - 'sln', - 'sleep', - 'sinh', - 'sin', - 'setprefix', - 'sessionid', - 'securitykeystr', - 'securitykeynum', - 'runbuf', - 'runas', - 'round', - 'resourcestr', - 'reportstr', - 'refprintall', - 'rate', - 'querystr', - 'pv', - 'pt', - 'prmisdefault', - 'primoyr', - 'prevyr', - 'prevqtr', - 'prevmth', - 'power', - 'pmt', - 'num2str', - 'num2date', - 'num2char', - 'nextyr', - 'nextqtr', - 'nextmth', - 'newguid', - 'mthofyr', - 'mthname', - 'mkdate', - 'minint', - 'min', - 'methodstr', - 'menustr', - 'menuitemoutputstr', - 'menuitemdisplaystr', - 'menuitemactionstr', - 'maxint', - 'maxdate', - 'max', - 'match', - 'logn', - 'log10', - 'literalstr', - 'licensecodestr', - 'licensecodenum', - 'intvnorm', - 'intvno', - 'intvname', - 'intvmax', - 'int64str', - 'indexstr', - 'indexnum', - 'indexname2id', - 'indexid2name', - 'idg', - 'identifierstr', - 'helpfilestr', - 'helpdevstr', - 'helpapplstr', - 'guid2str', - 'getprefix', - 'getCurrentUTCTime', - 'fv', - 'funcname', - 'frac', - 'formstr', - 'fieldstr', - 'fieldpname', - 'fieldnum', - 'fieldname2id', - 'fieldid2pname', - 'fieldid2name', - 'extendedTypeStr', - 'extendedTypeNum', - 'exp10', - 'exp', - 'evalbuf', - 'enumstr', - 'enumnum', - 'enumcnt', - 'enum2str', - 'endmth', - 'dimof', - 'dg', - 'decround', - 'ddb', - 'dayofyr', - 'dayofwk', - 'dayofmth', - 'dayname', - 'date2str', - 'date2num', - 'curuserid', - 'curext', - 'cterm', - 'cosh', - 'cos', - 'corrflagset', - 'corrflagget', - 'convertUTCTimeToLocalTime', - 'convertUTCDateToLocalDate', - 'conpoke', - 'conpeek', - 'connull', - 'conlen', - 'conins', - 'confind', - 'configurationkeystr', - 'configurationkeynum', - 'condel', - 'classstr', - 'classnum', - 'classidget', - 'char2num', - 'beep', - 'atan', - 'asin', - 'ascii2ansi', - 'any2str', - 'any2real', - 'any2int64', - 'any2int', - 'any2guid', - 'any2enum', - 'any2date', - 'ansi2ascii', - 'acos', - 'abs' - ), - 4 => array( // X++ SQL stuff - 'where', - 'update_recordset', - 'ttsCommit', - 'ttsBegin', - 'ttsAbort', - 'sum', - 'setting', - 'select', - 'reverse', - 'pessimisticLock', - 'outer', - 'order by', - 'optimisticLock', - 'notExists', - 'noFetch', - 'next', - 'minof', - 'maxof', - 'like', - 'join', - 'insert_recordset', - 'index hint', - 'index', - 'group by', - 'from', - 'forUpdate', - 'forceSelectOrder', - 'forcePlaceholders', - 'forceNestedLoop', - 'forceLiterals', - 'flush', - 'firstOnly', - 'firstFast', - 'exists', - 'desc', - 'delete_from', - 'count', - 'avg', - 'asc' - ) - ), - 'SYMBOLS' => array( // X++ symbols - '!', - '&', - '(', - ')', - '*', - '^', - '|', - '~', - '+', - ',', - '-', - '/', - ':', - '<', - '=', - '>', - '?', - '[', - ']', - '{', - '}' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000ff;', - 2 => 'color: #0000ff;', - 3 => 'color: #0000ff;', - 4 => 'color: #0000ff;' - ), - 'COMMENTS' => array( - 1 => 'color: #007f00;', - 'MULTI' => 'color: #007f00; font-style: italic;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000000;' - ), - 'BRACKETS' => array( - 0 => 'color: #000000;' - ), - 'STRINGS' => array( - 0 => 'color: #ff0000;' - ), - 'NUMBERS' => array( - 0 => 'color: #000000;' - ), - 'METHODS' => array( - 1 => 'color: #000000;', - 2 => 'color: #000000;' - ), - 'SYMBOLS' => array( - 0 => 'color: #00007f;' - ), - 'REGEXPS' => array( - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.', - 2 => '::' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> diff --git a/_piecrust/libs/Geshi/geshi/z80.php b/_piecrust/libs/Geshi/geshi/z80.php deleted file mode 100644 index 5ab146b..0000000 --- a/_piecrust/libs/Geshi/geshi/z80.php +++ /dev/null @@ -1,144 +0,0 @@ - 'ZiLOG Z80 Assembler', - 'COMMENT_SINGLE' => array(1 => ';'), - 'COMMENT_MULTI' => array(), - 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array("'", '"'), - 'ESCAPE_CHAR' => '', - 'KEYWORDS' => array( - /*CPU*/ - 1 => array( - 'adc','add','and','bit','call','ccf','cp','cpd','cpdr','cpir','cpi', - 'cpl','daa','dec','di','djnz','ei','ex','exx','halt','im','in', - 'in0','inc','ind','indr','inir','ini','jp','jr','ld','ldd','lddr', - 'ldir','ldi','mlt','neg','nop','or','otdm','otdmr','otdr','otim', - 'otimr','otir','out','out0','outd','outi','pop','push','res','ret', - 'reti','retn','rl','rla','rlc','rlca','rld','rr','rra','rrc','rrca', - 'rrd','rst','sbc','scf','set','sla','sl1','sll','slp','sra','srl', - 'sub','tst','tstio','xor' - ), - /*registers*/ - 2 => array( - 'a','b','c','d','e','h','l', - 'af','bc','de','hl','ix','iy','sp', - 'af\'','ixh','ixl','iyh','iyl' - ), - /*Directive*/ - 3 => array( - '#define','#endif','#else','#ifdef','#ifndef','#include','#undef', - '.db','.dd','.df','.dq','.dt','.dw','.end','.org','equ' - ), - ), - 'SYMBOLS' => array( - '[', ']', '(', ')', '?', '+', '-', '*', '/', '%', '$' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #0000ff; font-weight:bold;', - 2 => 'color: #0000ff;', - 3 => 'color: #46aa03; font-weight:bold;' - ), - 'COMMENTS' => array( - 1 => 'color: #adadad; font-style: italic;', - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099; font-weight: bold;' - ), - 'BRACKETS' => array( - 0 => 'color: #0000ff;' - ), - 'STRINGS' => array( - 0 => 'color: #7f007f;' - ), - 'NUMBERS' => array( - 0 => 'color: #dd22dd;' - ), - 'METHODS' => array( - ), - 'SYMBOLS' => array( - 0 => 'color: #008000;' - ), - 'REGEXPS' => array( - 0 => 'color: #22bbff;', - 1 => 'color: #22bbff;', - 2 => 'color: #993333;' - ), - 'SCRIPT' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '' - ), - 'OOLANG' => false, - 'OBJECT_SPLITTERS' => array( - ), - 'REGEXPS' => array( - //Hex numbers - 0 => '0[0-9a-fA-F]{1,32}[hH]', - //Binary numbers - 1 => '\%[01]{1,64}|[01]{1,64}[bB]?(?![^<]*>)', - //Labels - 2 => '^[_a-zA-Z][_a-zA-Z0-9]?\:' - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ), - 'TAB_WIDTH' => 8 -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/Geshi/geshi/zxbasic.php b/_piecrust/libs/Geshi/geshi/zxbasic.php deleted file mode 100644 index 430e5f6..0000000 --- a/_piecrust/libs/Geshi/geshi/zxbasic.php +++ /dev/null @@ -1,150 +0,0 @@ - 'ZXBasic', - 'COMMENT_SINGLE' => array( - 1 => "'", - 2 => '#', - 3 => 'REM' - ), - 'COMMENT_MULTI' => array("/'" => "'/"), - 'CASE_KEYWORDS' => GESHI_CAPS_UPPER, //GESHI_CAPS_NO_CHANGE, - 'QUOTEMARKS' => array('"'), - 'ESCAPE_CHAR' => '\\', - 'KEYWORDS' => array( - 1 => array( - "ASM", "BEEP", "BOLD", "BORDER", "BRIGHT", "ByRef", "ByVal", "CAST", - "CIRCLE", "CLS", "CONST", "CONTINUE", "DECLARE", "DIM", "DO", - "DRAW", "ELSE", "ELSEIF", "END", "EXIT", "FastCall", "FLASH", "FOR", - "FUNCTION", "GOTO", "GOSUB", "GO", "IF", "INK", "INVERSE", "ITALIC", - "LET", "LOAD", "LOOP", "NEXT", "OVER", "PAPER", "PAUSE", "PI", - "PLOT", "POKE", "PRINT", "RANDOMIZE", "REM", "RETURN", "SAVE", - "StdCall", "Sub", "THEN", "TO", "UNTIL", "VERIFY", "WEND", "WHILE", - ), - - // types - 2 => array( - 'byte', 'ubyte', 'integer', 'uinteger', 'long', 'ulong', 'fixed', - 'float', 'string' - ), - - // Functions - 3 => array( - "ABS", "ACS", "ASN", "ATN", "CHR", "CODE", "COS", "CSRLIN", "EXP", - "HEX", "HEX16", "INKEY", "INT", "LEN", "LN", "PEEK", "POS", "RND", - "SCREEN$", "SGN", "SIN", "SQR", "STR", "TAN", "VAL", - ), - - // Operators and modifiers - 4 => array( - "AT", "AS", "AND", "MOD", "NOT", "OR", "SHL", "SHR", "STEP", "XOR" - ) - ), - 'SYMBOLS' => array( - '(', ')' - ), - 'CASE_SENSITIVE' => array( - GESHI_COMMENTS => false, - 1 => false, - 2 => false, - 3 => false, - 4 => false - ), - 'STYLES' => array( - 'KEYWORDS' => array( - 1 => 'color: #000080; font-weight: bold;', // Commands - 2 => 'color: #800080; font-weight: bold;', // Types - 3 => 'color: #006000; font-weight: bold;', // Functions - 4 => 'color: #801010; font-weight: bold;' // Operators and Modifiers - ), - 'COMMENTS' => array( - 1 => 'color: #808080; font-style: italic;', - 2 => 'color: #339933;', - 3 => 'color: #808080; font-style: italic;', - 'MULTI' => 'color: #808080; font-style: italic;' - ), - 'BRACKETS' => array( - //0 => 'color: #66cc66;' - 0 => 'color: #007676;' - ), - 'STRINGS' => array( - //0 => 'color: #ff0000;' - 0 => 'color: #A00000; font-style: italic;' - ), - 'NUMBERS' => array( - //0 => 'color: #cc66cc;' - 0 => 'color: #b05103;'// font-weight: bold;' - ), - 'METHODS' => array( - 0 => 'color: #66cc66;' - ), - 'SYMBOLS' => array( - 0 => 'color: #66cc66;' - ), - 'ESCAPE_CHAR' => array( - 0 => 'color: #000099;' - ), - 'SCRIPT' => array( - ), - 'REGEXPS' => array( - ) - ), - 'URLS' => array( - 1 => '', - 2 => '', - 3 => '', - 4 => '' - ), - 'OOLANG' => true, - 'OBJECT_SPLITTERS' => array( - 1 => '.' - ), - 'REGEXPS' => array( - ), - 'STRICT_MODE_APPLIES' => GESHI_NEVER, - 'SCRIPT_DELIMITERS' => array( - ), - 'HIGHLIGHT_STRICT_BLOCK' => array( - ) -); - -?> \ No newline at end of file diff --git a/_piecrust/libs/LessPhp/LICENSE b/_piecrust/libs/LessPhp/LICENSE deleted file mode 100755 index b2338b1..0000000 --- a/_piecrust/libs/LessPhp/LICENSE +++ /dev/null @@ -1,660 +0,0 @@ -For ease of distribution, lessphp 0.2.0 is under a dual license. -You are free to pick which one suits your needs. - - - - -MIT LICENSE - - - - -Copyright (c) 2010 Leaf Corcoran, http://leafo.net/lessphp - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - - -GPL VERSION 3 - - - - - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - diff --git a/_piecrust/libs/LessPhp/README.md b/_piecrust/libs/LessPhp/README.md deleted file mode 100755 index 810d6c0..0000000 --- a/_piecrust/libs/LessPhp/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# lessphp v0.2.0 -#### - -`lessphp` is a compiler for LESS written in php. -For a complete description of the language see - -### How to use in your php project - -Copy lessc.inc.php to your include directory and include it into your project. - -There are a few ways to interface with the compiler. The easiest is to have it -compile a LESS file when the page is requested. The static function -`lessc::ccompile`, checked compile, will compile the input LESS file only when it -is newer than the output file. - - try { - lessc::ccompile('input.less', 'output.css'); - catch (exception $ex) { - exit($ex->getMessage()); - } - -Note that all failures with lessc are reported through exceptions. -If you need more control you can make your own instance of lessc. - - $input = 'mystyle.less'; - - $lc = new lessc($input); - - try { - file_put_contents('mystyle.css', $lc->parse()); - } catch (exception $ex) { ... } - -In addition to loading from file, you can also parse from a string like so: - - $lc = new lessc(); - $lesscode = 'body { ... }'; - $out = $lc->parse($lesscode); - -### How to use from the command line - -An additional script has been included to use the compiler from the command -line. In the simplest invocation, you specify an input file and the compiled -css is written to standard out: - - ~> plessc input.less > output.css - -Using the -r flag, you can specify LESS code directly as an argument or, if -the argument is left off, from standard in: - - ~> plessc -r "my less code here" - -Finally, by using the -w flag you can watch a specified input file and have it -compile as needed to the output file - - ~> plessc -w input-file output-file - -Errors from watch mode are written to standard out. - - diff --git a/_piecrust/libs/LessPhp/lessc.inc.php b/_piecrust/libs/LessPhp/lessc.inc.php deleted file mode 100755 index be44660..0000000 --- a/_piecrust/libs/LessPhp/lessc.inc.php +++ /dev/null @@ -1,1900 +0,0 @@ - - * Licensed under MIT or GPLv3, see LICENSE - */ - - -/** - * The less compiler and parser. - * - * Converting LESS to CSS is a two stage process. First the incoming document - * must be parsed. Parsing creates a tree in memory that represents the - * structure of the document. Then, the tree of the document is recursively - * compiled into the CSS text. The compile step has an implicit step called - * reduction, where values are brought to their lowest form before being - * turned to text, eg. mathematical equations are solved, and variables are - * dereferenced. - * - * The parsing stage produces the final structure of the document, for this - * reason mixins are mixed in and attribute accessors are referenced during - * the parse step. A reduction is done on the mixed in block as it is mixed in. - * - * See the following: - * - entry point for parsing and compiling: lessc::parse() - * - parsing: lessc::parseChunk() - * - compiling: lessc::compileBlock() - * - */ -class lessc { - protected $buffer; - protected $count; - protected $line; - - public $indentLevel; - public $indentChar = ' '; - - protected $env = null; - - protected $allParsedFiles = array(); - - public $vPrefix = '@'; // prefix of abstract properties - public $mPrefix = '$'; // prefix of abstract blocks - public $imPrefix = '!'; // special character to add !important - public $selfSelector = '&'; - - static protected $precedence = array( - '+' => 0, - '-' => 0, - '*' => 1, - '/' => 1, - '%' => 1, - ); - static protected $operatorString; // regex string to match any of the operators - - // types that have delayed computation - static protected $dtypes = array('expression', 'variable', - 'function', 'negative', 'list', 'lookup'); - - /** - * @link http://www.w3.org/TR/css3-values/ - */ - static protected $units=array( - 'em', 'ex', 'px', 'gd', 'rem', 'vw', 'vh', 'vm', 'ch', // Relative length units - 'in', 'cm', 'mm', 'pt', 'pc', // Absolute length units - '%', // Percentages - 'deg', 'grad', 'rad', 'turn', // Angles - 'ms', 's', // Times - 'Hz', 'kHz', //Frequencies - ); - - public $importDisabled = false; - public $importDir = ''; - - public $compat = false; // lessjs compatibility mode, does nothing right now - - /** - * if we are in an expression then we don't need to worry about parsing font shorthand - * $inExp becomes true after the first value in an expression, or if we enter parens - */ - protected $inExp = false; - - /** - * if we are in parens we can be more liberal with whitespace around operators because - * it must evaluate to a single value and thus is less ambiguous. - * - * Consider: - * property1: 10 -5; // is two numbers, 10 and -5 - * property2: (10 -5); // should evaluate to 5 - */ - protected $inParens = false; - - /** - * Parse a single chunk off the head of the buffer and place it. - * @return false when the buffer is empty, or there is an error - * - * This functions is called repeatedly until the entire document is - * parsed. - * - * This parser is most similar to a recursive descent parser. Single - * functions represent discrete grammatical rules for the language, and - * they are able to capture the text that represents those rules. - * - * Consider the function lessc::keyword(). (all parse functions are - * structured the same) - * - * The function takes a single reference argument. When calling the the - * function it will attempt to match a keyword on the head of the buffer. - * If it is successful, it will place the keyword in the referenced - * argument, advance the position in the buffer, and return true. If it - * fails then it won't advance the buffer and it will return false. - * - * All of these parse functions are powered by lessc::match(), which behaves - * the same way, but takes a literal regular expression. Sometimes it is - * more convenient to use match instead of creating a new function. - * - * Because of the format of the functions, to parse an entire string of - * grammatical rules, you can chain them together using &&. - * - * But, if some of the rules in the chain succeed before one fails, then - * then buffer position will be left at an invalid state. In order to - * avoid this, lessc::seek() is used to remember and set buffer positions. - * - * Before doing a chain, use $s = $this->seek() to remember the current - * position into $s. Then if a chain fails, use $this->seek($s) to - * go back where we started. - */ - function parseChunk() { - if (empty($this->buffer)) return false; - $s = $this->seek(); - - // setting a property - if ($this->keyword($key) && $this->assign() && - $this->propertyValue($value) && $this->end()) - { - $this->append(array('assign', $key, $value)); - return true; - } else { - $this->seek($s); - } - - // look for special css blocks - if ($this->env->parent == null && $this->literal('@', false)) { - $this->count--; - - // a font-face block - if ($this->literal('@font-face') && $this->literal('{')) { - $b = $this->pushSpecialBlock('@font-face'); - return true; - } else { - $this->seek($s); - } - - // charset - if ($this->literal('@charset') && $this->propertyValue($value) && - $this->end()) - { - $this->append(array('charset', $value)); - return true; - } else { - $this->seek($s); - } - - - // media - if ($this->literal('@media') && $this->mediaTypes($types, $rest) && - $this->literal('{')) - { - $b = $this->pushSpecialBlock('@media'); - $b->media = array($types, $rest); - return true; - } else { - $this->seek($s); - } - - // css animations - if ($this->match('(@(-[a-z]+-)?keyframes)', $m) && - $this->propertyValue($value) && $this->literal('{')) - { - $b = $this->pushSpecialBlock(trim($m[0])); - $b->keyframes = $value; - return true; - } else { - $this->seek($s); - } - } - - if (isset($this->env->keyframes)) { - if ($this->match("(to|from|[0-9]+%)", $m) && $this->literal('{')) { - $this->pushSpecialBlock($m[1]); - return true; - } else { - $this->seek($s); - } - } - - // setting a variable - if ($this->variable($name) && $this->assign() && - $this->propertyValue($value) && $this->end()) - { - $this->append(array('assign', $this->vPrefix.$name, $value)); - return true; - } else { - $this->seek($s); - } - - if ($this->import($url, $media)) { - // don't check .css files - if (empty($media) && substr_compare($url, '.css', -4, 4) !== 0) { - if ($this->importDisabled) { - $this->append(array('raw', '/* import disabled */')); - } else { - $path = $this->findImport($url); - if (!is_null($path)) { - $this->append(array('import', $path)); - return true; - } - } - } - - $this->append(array('raw', '@import url("'.$url.'")'. - ($media ? ' '.$media : '').';')); - return true; - } - - // opening parametric mixin - if ($this->tag($tag, true) && $this->argumentDef($args) && - $this->literal('{')) - { - $block = $this->pushBlock($this->fixTags(array($tag))); - $block->args = $args; - return true; - } else { - $this->seek($s); - } - - // opening a simple block - if ($this->tags($tags) && $this->literal('{')) { - $tags = $this->fixTags($tags); - $this->pushBlock($tags); - return true; - } else { - $this->seek($s); - } - - // closing a block - if ($this->literal('}')) { - try { - $block = $this->pop(); - } catch (exception $e) { - $this->seek($s); - $this->throwParseError($e->getMessage()); - } - - $hidden = true; - if (!isset($block->args)) foreach ($block->tags as $tag) { - if ($tag{0} != $this->mPrefix) { - $hidden = false; - break; - } - } - - if (!$hidden) $this->append(array('block', $block)); - foreach ($block->tags as $tag) { - $this->env->children[$tag] = $block; - } - - return true; - } - - - // mixin - if ($this->tags($tags, true, '>') && - ($this->argumentValues($argv) || true) && $this->end()) - { - $tags = $this->fixTags($tags); - $this->append(array('mixin', $tags, $argv)); - return true; - } else { - $this->seek($s); - } - // spare ; - if ($this->literal(';')) return true; - - return false; // got nothing, throw error - } - - function fixTags($tags) { - // move @ tags out of variable namespace - foreach ($tags as &$tag) { - if ($tag{0} == $this->vPrefix) $tag[0] = $this->mPrefix; - } - return $tags; - } - - // attempts to find the path of an import url, returns null for css files - function findImport($url) { - foreach ((array)$this->importDir as $dir) { - $full = $dir.(substr($dir, -1) != '/' ? '/' : '').$url; - if ($this->fileExists($file = $full.'.less') || $this->fileExists($file = $full)) { - return $file; - } - } - - return null; - } - - function fileExists($name) { - // sym link workaround - return file_exists($name) || file_exists(realpath(preg_replace('/\w+\/\.\.\//', '', $name))); - } - - // a list of expressions - function expressionList(&$exps) { - $values = array(); - - while ($this->expression($exp)) { - $values[] = $exp; - } - - if (count($values) == 0) return false; - - $exps = $this->compressList($values, ' '); - return true; - } - - /** - * Attempt to consume an expression. - * @link http://en.wikipedia.org/wiki/Operator-precedence_parser#Pseudo-code - */ - function expression(&$out) { - $s = $this->seek(); - if ($this->literal('(') && ($this->inExp = $this->inParens = true) && $this->expression($exp) && $this->literal(')')) { - $lhs = $exp; - } elseif ($this->seek($s) && $this->value($val)) { - $lhs = $val; - } else { - $this->inParens = $this->inExp = false; - $this->seek($s); - return false; - } - - $out = $this->expHelper($lhs, 0); - $this->inParens = $this->inExp = false; - return true; - } - - /** - * recursively parse infix equation with $lhs at precedence $minP - */ - function expHelper($lhs, $minP) { - $this->inExp = true; - $ss = $this->seek(); - - // if the if there was whitespace before the operator, then we require whitespace after - // the operator for it to be a mathematical operator. - - $needWhite = false; - if (!$this->inParens && preg_match('/\s/', $this->buffer{$this->count - 1})) { - $needWhite = true; - } - - // try to find a valid operator - while ($this->match(self::$operatorString.($needWhite ? '\s' : ''), $m) && self::$precedence[$m[1]] >= $minP) { - // get rhs - $s = $this->seek(); - $p = $this->inParens; - if ($this->literal('(') && ($this->inParens = true) && $this->expression($exp) && $this->literal(')')) { - $this->inParens = $p; - $rhs = $exp; - } else { - $this->inParens = $p; - if ($this->seek($s) && $this->value($val)) { - $rhs = $val; - } else { - break; - } - } - - // peek for next operator to see what to do with rhs - if ($this->peek(self::$operatorString, $next) && self::$precedence[$next[1]] > $minP) { - $rhs = $this->expHelper($rhs, self::$precedence[$next[1]]); - } - - // don't evaluate yet if it is dynamic - if (in_array($rhs[0], self::$dtypes) || in_array($lhs[0], self::$dtypes)) - $lhs = array('expression', $m[1], $lhs, $rhs); - else - $lhs = $this->evaluate($m[1], $lhs, $rhs); - - $ss = $this->seek(); - - $needWhite = false; - if (!$this->inParens && preg_match('/\s/', $this->buffer{$this->count - 1})) { - $needWhite = true; - } - } - $this->seek($ss); - - return $lhs; - } - - // consume a list of values for a property - function propertyValue(&$value) { - $values = array(); - - $s = null; - while ($this->expressionList($v)) { - $values[] = $v; - $s = $this->seek(); - if (!$this->literal(',')) break; - } - - if ($s) $this->seek($s); - - if (count($values) == 0) return false; - - $value = $this->compressList($values, ', '); - return true; - } - - // a single value - function value(&$value) { - // try a unit - if ($this->unit($value)) return true; - - // see if there is a negation - $s = $this->seek(); - if ($this->literal('-', false) && $this->variable($vname)) { - $value = array('negative', array('variable', $this->vPrefix.$vname)); - return true; - } else { - $this->seek($s); - } - - // accessor - // must be done before color - // this needs negation too - if ($this->accessor($a)) { - $a[1] = $this->fixTags($a[1]); - $value = $a; - return true; - } - - // color - if ($this->color($value)) return true; - - // css function - // must be done after color - if ($this->func($value)) return true; - - // string - if ($this->string($tmp, $d)) { - $value = array('string', $d.$tmp.$d); - return true; - } - - // try a keyword - if ($this->keyword($word)) { - $value = array('keyword', $word); - return true; - } - - // try a variable - if ($this->variable($vname)) { - $value = array('variable', $this->vPrefix.$vname); - return true; - } - - return false; - } - - // an import statement - function import(&$url, &$media) { - $s = $this->seek(); - if (!$this->literal('@import')) return false; - - // @import "something.css" media; - // @import url("something.css") media; - // @import url(something.css) media; - - if ($this->literal('url(')) $parens = true; else $parens = false; - - if (!$this->string($url)) { - if ($parens && $this->to(')', $url)) { - $parens = false; // got em - } else { - $this->seek($s); - return false; - } - } - - if ($parens && !$this->literal(')')) { - $this->seek($s); - return false; - } - - // now the rest is media - return $this->to(';', $media, false, true); - } - - // a list of media types, very lenient - function mediaTypes(&$types, &$rest) { - $s = $this->seek(); - $types = array(); - while ($this->match('([^,{\s]+)', $m)) { - $types[] = $m[1]; - if (!$this->literal(',')) break; - } - - // get everything else - if ($this->to('{', $rest, true, true)) { - $rest = trim($rest); - } - - return count($types) > 0; - } - - // a scoped value accessor - // .hello > @scope1 > @scope2['value']; - function accessor(&$var) { - $s = $this->seek(); - - if (!$this->tags($scope, true, '>') || !$this->literal('[')) { - $this->seek($s); - return false; - } - - // either it is a variable or a property - // why is a property wrapped in quotes, who knows! - if ($this->variable($name)) { - $name = $this->vPrefix.$name; - } elseif ($this->literal("'") && $this->keyword($name) && $this->literal("'")) { - // .. $this->count is messed up if we wanted to test another access type - } else { - $this->seek($s); - return false; - } - - if (!$this->literal(']')) { - $this->seek($s); - return false; - } - - $var = array('lookup', $scope, $name); - return true; - } - - // a string - function string(&$string, &$d = null) { - $s = $this->seek(); - if ($this->literal('"', false)) { - $delim = '"'; - } elseif ($this->literal("'", false)) { - $delim = "'"; - } else { - return false; - } - - if (!$this->to($delim, $string)) { - $this->seek($s); - return false; - } - - $d = $delim; - return true; - } - - /** - * Consume a number and optionally a unit. - * Can also consume a font shorthand if it is a simple case. - * $allowed restricts the types that are matched. - */ - function unit(&$unit, $allowed = null) { - $simpleCase = $allowed == null; - if (!$allowed) $allowed = self::$units; - - if ($this->match('(-?[0-9]*(\.)?[0-9]+)('.implode('|', $allowed).')?', $m, !$simpleCase)) { - if (!isset($m[3])) $m[3] = 'number'; - $unit = array($m[3], $m[1]); - - // check for size/height font unit.. should this even be here? - if ($simpleCase) { - $s = $this->seek(); - if (!$this->inExp && $this->literal('/', false) && $this->unit($right, self::$units)) { - $unit = array('keyword', $this->compileValue($unit).'/'.$this->compileValue($right)); - } else { - // get rid of whitespace - $this->seek($s); - $this->match('', $_); - } - } - - return true; - } - - return false; - } - - // a # color - function color(&$out) { - $color = array('color'); - - if ($this->match('(#([0-9a-f]{6})|#([0-9a-f]{3}))', $m)) { - if (isset($m[3])) { - $num = $m[3]; - $width = 16; - } else { - $num = $m[2]; - $width = 256; - } - - $num = hexdec($num); - foreach (array(3,2,1) as $i) { - $t = $num % $width; - $num /= $width; - - $color[$i] = $t * (256/$width) + $t * floor(16/$width); - } - - $out = $color; - return true; - } - - return false; - } - - // consume a list of property values delimited by ; and wrapped in () - function argumentValues(&$args, $delim = ';') { - $s = $this->seek(); - if (!$this->literal('(')) return false; - - $values = array(); - while (true) { - if ($this->propertyValue($value)) $values[] = $value; - if (!$this->literal($delim)) break; - else { - if ($value == null) $values[] = null; - $value = null; - } - } - - if (!$this->literal(')')) { - $this->seek($s); - return false; - } - - $args = $values; - return true; - } - - // consume an argument definition list surrounded by () - // each argument is a variable name with optional value - function argumentDef(&$args, $delim = ';') { - $s = $this->seek(); - if (!$this->literal('(')) return false; - - $values = array(); - while ($this->variable($vname)) { - $arg = array($vname); - if ($this->assign() && $this->propertyValue($value)) { - $arg[] = $value; - // let the : slide if there is no value - } - - $values[] = $arg; - if (!$this->literal($delim)) break; - } - - if (!$this->literal(')')) { - $this->seek($s); - return false; - } - - $args = $values; - return true; - } - - // consume a list of tags - // this accepts a hanging delimiter - function tags(&$tags, $simple = false, $delim = ',') { - $tags = array(); - while ($this->tag($tt, $simple)) { - $tags[] = $tt; - if (!$this->literal($delim)) break; - } - if (count($tags) == 0) return false; - - return true; - } - - // a bracketed value (contained within in a tag definition) - function tagBracket(&$value) { - $s = $this->seek(); - if ($this->literal('[') && $this->to(']', $c, true) && $this->literal(']', false)) { - $value = '['.$c.']'; - // whitespace? - if ($this->match('', $_)) $value .= $_[0]; - return true; - } - - $this->seek($s); - return false; - } - - // a single tag - function tag(&$tag, $simple = false) { - if ($simple) - $chars = '^,:;{}\][>\(\) '; - else - $chars = '^,;{}['; - - $tag = ''; - while ($this->tagBracket($first)) $tag .= $first; - while ($this->match('(['.$chars.'0-9]['.$chars.']*)', $m)) { - $tag .= $m[1]; - if ($simple) break; - - while ($this->tagBracket($brack)) $tag .= $brack; - } - $tag = trim($tag); - if ($tag == '') return false; - - return true; - } - - // a css function - function func(&$func) { - $s = $this->seek(); - - if ($this->match('([\w\-_][\w\-_:\.]*)', $m) && $this->literal('(')) { - $fname = $m[1]; - if ($fname == 'url') { - $this->to(')', $content, true); - $args = array('string', $content); - } else { - $args = array(); - while (true) { - $ss = $this->seek(); - if ($this->keyword($name) && $this->literal('=') && $this->expressionList($value)) { - $args[] = array('list', '=', array(array('keyword', $name), $value)); - } else { - $this->seek($ss); - if ($this->expressionList($value)) { - $args[] = $value; - } - } - - if (!$this->literal(',')) break; - } - $args = array('list', ',', $args); - } - - if ($this->literal(')')) { - $func = array('function', $fname, $args); - return true; - } - } - - $this->seek($s); - return false; - } - - // consume a less variable - function variable(&$name) { - $s = $this->seek(); - if ($this->literal($this->vPrefix, false) && $this->keyword($name)) { - return true; - } - - return false; - } - - /** - * Consume an assignment operator - * Can optionally take a name that will be set to the current property name - */ - function assign($name = null) { - if ($name) $this->currentProperty = $name; - return $this->literal(':') || $this->literal('='); - } - - // consume a keyword - function keyword(&$word) { - if ($this->match('([\w_\-\*!"][\w\-_"]*)', $m)) { - $word = $m[1]; - return true; - } - return false; - } - - // consume an end of statement delimiter - function end() { - if ($this->literal(';')) - return true; - elseif ($this->count == strlen($this->buffer) || $this->buffer{$this->count} == '}') { - // if there is end of file or a closing block next then we don't need a ; - return true; - } - return false; - } - - function compressList($items, $delim) { - if (count($items) == 1) return $items[0]; - else return array('list', $delim, $items); - } - - /** - * Recursively compiles a block. - * @param $block the block - * @param $parentTags the tags of the block that contained this one - * - * A block is analogous to a CSS block in most cases. A single less document - * is encapsulated in a block when parsed, but it does not have parent tags - * so all of it's children appear on the root level when compiled. - * - * Blocks are made up of props and children. - * - * Props are property instructions, array tuples which describe an action - * to be taken, eg. write a property, set a variable, mixin a block. - * - * The children of a block are just all the blocks that are defined within. - * - * Compiling the block involves pushing a fresh environment on the stack, - * and iterating through the props, compiling each one. - * - * See lessc::compileProp() - * - */ - function compileBlock($block, $parent_tags = null) { - $isRoot = $parent_tags == null && $block->tags == null; - - $indent = str_repeat($this->indentChar, $this->indentLevel); - - if (!empty($block->no_multiply)) { - $special_block = true; - $this->indentLevel++; - $tags = array(); - } else { - $special_block = false; - $tags = $this->multiplyTags($parent_tags, $block->tags); - } - - $this->pushEnv(); - $lines = array(); - $blocks = array(); - foreach ($block->props as $prop) { - $this->compileProp($prop, $block, $tags, $lines, $blocks); - } - - $this->pop(); - - $nl = $isRoot ? "\n".$indent : - "\n".$indent.$this->indentChar; - - ob_start(); - - if ($special_block) { - $this->indentLevel--; - if (isset($block->media)) { - list($media_types, $media_rest) = $block->media; - echo "@media ".join(', ', $media_types). - (!empty($media_rest) ? " $media_rest" : '' ); - } elseif (isset($block->keyframes)) { - echo $block->tags[0]." ". - $this->compileValue($this->reduce($block->keyframes)); - } else { - list($name) = $block->tags; - echo $indent.$name; - } - - echo ' {'.(count($lines) > 0 ? $nl : "\n"); - } - - // dump it - if (count($lines) > 0) { - if (!$special_block && !$isRoot) { - echo $indent.implode(", ", $tags); - if (count($lines) > 1) echo " {".$nl; - else echo " { "; - } - - echo implode($nl, $lines); - - if (!$special_block && !$isRoot) { - if (count($lines) > 1) echo "\n".$indent."}\n"; - else echo " }\n"; - } else echo "\n"; - } - - foreach ($blocks as $b) echo $b; - - if ($special_block) { - echo $indent."}\n"; - } - - return ob_get_clean(); - } - - - // find the fully qualified tags for a block and its parent's tags - function multiplyTags($parents, $current) { - if ($parents == null) return $current; - - $tags = array(); - foreach ($parents as $ptag) { - foreach ($current as $tag) { - $tags[] = trim($ptag. - ($tag{0} == $this->selfSelector || $tag{0} == ':' - ? ltrim($tag, $this->selfSelector) : ' '.$tag)); - } - } - - return $tags; - } - - // attempt to find block pointed at by path within search_in or its parent - function findBlock($search_in, $path) { - if ($search_in == null) return null; - $name = $path[0]; - - if (isset($search_in->children[$name])) { - $block = $search_in->children[$name]; - if (count($path) == 1) { - return $block; - } else { - return $this->findBlock($block, array_slice($path, 1)); - } - } else { - return $this->findBlock($search_in->parent, $path); - } - } - - // sets all argument names in $args to either the default value - // or the one passed in through $values - function zipSetArgs($args, $values) { - $i = 0; - foreach ($args as $a) { - if ($i < count($values) && !is_null($values[$i])) { - $value = $values[$i]; - } elseif (isset($a[1])) { - $value = $a[1]; - } else $value = null; - - $this->set($this->vPrefix.$a[0], $this->reduce($value)); - $i++; - } - } - - // compile a prop and update $lines or $blocks appropriately - function compileProp($prop, $block, $tags, &$_lines, &$_blocks) { - switch ($prop[0]) { - case 'assign': - list(, $name, $value) = $prop; - if ($name[0] == $this->vPrefix) { - $this->set($name, $this->reduce($value)); - } else { - $_lines[] = "$name:". - $this->compileValue($this->reduce($value)).";"; - } - break; - case 'block': - list(, $child) = $prop; - $_blocks[] = $this->compileBlock($child, $tags); - break; - case 'mixin': - list(, $path, $args) = $prop; - - $mixin = $this->findBlock($block, $path); - if (is_null($mixin)) { - // echo "failed to find block: ".implode(" > ", $path)."\n"; - break; // throw error here?? - } - - $have_args = false; - if (isset($mixin->args)) { - $have_args = true; - $this->pushEnv(); - $this->zipSetArgs($mixin->args, $args); - } - - list($name) = $mixin->tags; - if ($name == "div") { - print_r($mixin->props); - } - - $old_parent = $mixin->parent; - $mixin->parent = $block; - - foreach ($mixin->props as $sub_prop) { - $this->compileProp($sub_prop, $mixin, $tags, $_lines, $_blocks); - } - - $mixin->parent = $old_parent; - - if ($have_args) $this->pop(); - - break; - case 'raw': - $_lines[] = $prop[1]; - break; - case 'import': - list(, $path) = $prop; - $this->addParsedFile($path); - $root = $this->createChild($path)->parseTree(); - - $root->parent = $block; - foreach ($root->props as $sub_prop) { - $this->compileProp($sub_prop, $root, $tags, $_lines, $_blocks); - } - - // inject imported blocks into this block, local will overwrite import - $block->children = array_merge($root->children, $block->children); - break; - case 'charset': - list(, $value) = $prop; - $_lines[] = '@charset '.$this->compileValue($this->reduce($value)).';'; - break; - default: - echo "unknown op: {$prop[0]}\n"; - throw new exception(); - } - } - - - /** - * Compiles a primitive value into a CSS property value. - * - * Values in lessphp are typed by being wrapped in arrays, their format is - * typically: - * - * array(type, contents [, additional_contents]*) - * - * Will not work on non reduced values (expressions, variables, etc) - */ - function compileValue($value) { - switch ($value[0]) { - case 'list': - // [1] - delimiter - // [2] - array of values - return implode($value[1], array_map(array($this, 'compileValue'), $value[2])); - case 'keyword': - // [1] - the keyword - case 'number': - // [1] - the number - return $value[1]; - case 'string': - // [1] - contents of string (includes quotes) - - // search for inline variables to replace - $replace = array(); - if (preg_match_all('/{('.$this->preg_quote($this->vPrefix).'[\w-_][0-9\w-_]*?)}/', $value[1], $m)) { - foreach ($m[1] as $name) { - if (!isset($replace[$name])) - $replace[$name] = $this->compileValue($this->reduce(array('variable', $name))); - } - } - foreach ($replace as $var=>$val) { - // strip quotes - if (preg_match('/^(["\']).*?(\1)$/', $val)) { - $val = substr($val, 1, -1); - } - $value[1] = str_replace('{'.$var.'}', $val, $value[1]); - } - - return $value[1]; - case 'color': - // [1] - red component (either number for a %) - // [2] - green component - // [3] - blue component - // [4] - optional alpha component - if (count($value) == 5) { // rgba - return 'rgba('.$value[1].','.$value[2].','.$value[3].','.$value[4].')'; - } - return sprintf("#%02x%02x%02x", $value[1], $value[2], $value[3]); - case 'function': - // [1] - function name - // [2] - some value representing arguments - - // see if function evaluates to something else - $value = $this->reduce($value); - if ($value[0] == 'function') { - return $value[1].'('.$this->compileValue($value[2]).')'; - } - else return $this->compileValue($value); - default: // assumed to be unit - return $value[1].$value[0]; - } - } - - function lib_rgbahex($color) { - if ($color[0] != 'color') - throw new exception("color expected for rgbahex"); - - return sprintf("#%02x%02x%02x%02x", - isset($color[4]) ? $color[4]*255 : 0, - $color[1],$color[2], $color[3]); - } - - function lib_quote($arg) { - return '"'.$this->compileValue($arg).'"'; - } - - function lib_unquote($arg) { - $out = $this->compileValue($arg); - if ($this->quoted($out)) $out = substr($out, 1, -1); - return $out; - } - - // alias for unquote - function lib_e($arg) { - return $this->lib_unquote($arg); - } - - function lib_floor($arg) { - return floor($arg[1]); - } - - function lib_round($arg) { - return round($arg[1]); - } - - // is a string surrounded in quotes? returns the quoting char if true - function quoted($s) { - if (preg_match('/^("|\').*?\1$/', $s, $m)) - return $m[1]; - else return false; - } - - /** - * Helper function to get argurments for color functions - * accepts invalid input, non colors interpreted to black - */ - function colorArgs($args) { - if ($args[0] != 'list' || count($args[2]) < 2) { - return array(array('color', 0, 0, 0)); - } - list($color, $delta) = $args[2]; - if ($color[0] != 'color') - $color = array('color', 0, 0, 0); - - $delta = floatval($delta[1]); - - return array($color, $delta); - } - - function lib_darken($args) { - list($color, $delta) = $this->colorArgs($args); - - $hsl = $this->toHSL($color); - $hsl[3] = $this->clamp($hsl[3] - $delta, 100); - return $this->toRGB($hsl); - } - - function lib_lighten($args) { - list($color, $delta) = $this->colorArgs($args); - - $hsl = $this->toHSL($color); - $hsl[3] = $this->clamp($hsl[3] + $delta, 100); - return $this->toRGB($hsl); - } - - function lib_saturate($args) { - list($color, $delta) = $this->colorArgs($args); - - $hsl = $this->toHSL($color); - $hsl[2] = $this->clamp($hsl[2] + $delta, 100); - return $this->toRGB($hsl); - } - - function lib_desaturate($args) { - list($color, $delta) = $this->colorArgs($args); - - $hsl = $this->toHSL($color); - $hsl[2] = $this->clamp($hsl[2] - $delta, 100); - return $this->toRGB($hsl); - } - - function lib_spin($args) { - list($color, $delta) = $this->colorArgs($args); - - $hsl = $this->toHSL($color); - $hsl[1] = $this->clamp($hsl[1] + $delta, 360); - return $this->toRGB($hsl); - } - - function lib_fadeout($args) { - list($color, $delta) = $this->colorArgs($args); - $color[4] = $this->clamp((isset($color[4]) ? $color[4] : 1) - $delta/100); - return $color; - } - - function lib_fadein($args) { - list($color, $delta) = $this->colorArgs($args); - $color[4] = $this->clamp((isset($color[4]) ? $color[4] : 1) + $delta/100); - return $color; - } - - function lib_hue($color) { - if ($color[0] != 'color') return 0; - $hsl = $this->toHSL($color); - return round($hsl[1]); - } - - function lib_saturation($color) { - if ($color[0] != 'color') return 0; - $hsl = $this->toHSL($color); - return round($hsl[2]); - } - - function lib_lightness($color) { - if ($color[0] != 'color') return 0; - $hsl = $this->toHSL($color); - return round($hsl[3]); - } - - function toHSL($color) { - if ($color[0] == 'hsl') return $color; - - $r = $color[1] / 255; - $g = $color[2] / 255; - $b = $color[3] / 255; - - $min = min($r, $g, $b); - $max = max($r, $g, $b); - - $L = ($min + $max) / 2; - if ($min == $max) { - $S = $H = 0; - } else { - if ($L < 0.5) - $S = ($max - $min)/($max + $min); - else - $S = ($max - $min)/(2.0 - $max - $min); - - if ($r == $max) $H = ($g - $b)/($max - $min); - elseif ($g == $max) $H = 2.0 + ($b - $r)/($max - $min); - elseif ($b == $max) $H = 4.0 + ($r - $g)/($max - $min); - - } - - $out = array('hsl', - ($H < 0 ? $H + 6 : $H)*60, - $S*100, - $L*100, - ); - - if (count($color) > 4) $out[] = $color[4]; // copy alpha - return $out; - } - - function toRGB_helper($comp, $temp1, $temp2) { - if ($comp < 0) $comp += 1.0; - elseif ($comp > 1) $comp -= 1.0; - - if (6 * $comp < 1) return $temp1 + ($temp2 - $temp1) * 6 * $comp; - if (2 * $comp < 1) return $temp2; - if (3 * $comp < 2) return $temp1 + ($temp2 - $temp1)*((2/3) - $comp) * 6; - - return $temp1; - } - - /** - * Converts an hsl array into a color value in rgb. - * Expects H to be in range of 0 to 360, S and L in 0 to 100 - */ - function toRGB($color) { - if ($color == 'color') return $color; - - $H = $color[1] / 360; - $S = $color[2] / 100; - $L = $color[3] / 100; - - if ($S == 0) { - $r = $g = $b = $L; - } else { - $temp2 = $L < 0.5 ? - $L*(1.0 + $S) : - $L + $S - $L * $S; - - $temp1 = 2.0 * $L - $temp2; - - $r = $this->toRGB_helper($H + 1/3, $temp1, $temp2); - $g = $this->toRGB_helper($H, $temp1, $temp2); - $b = $this->toRGB_helper($H - 1/3, $temp1, $temp2); - } - - $out = array('color', round($r*255), round($g*255), round($b*255)); - if (count($color) > 4) $out[] = $color[4]; // copy alpha - return $out; - } - - function clamp($v, $max = 1, $min = 0) { - return min($max, max($min, $v)); - } - - /** - * Convert the rgb, rgba, hsl color literals of function type - * as returned by the parser into values of color type. - */ - function funcToColor($func) { - $fname = $func[1]; - if ($func[2][0] != 'list') return false; // need a list of arguments - $rawComponents = $func[2][2]; - - if ($fname == 'hsl' || $fname == 'hsla') { - $hsl = array('hsl'); - $i = 0; - foreach ($rawComponents as $c) { - $val = $this->reduce($c); - $val = isset($val[1]) ? floatval($val[1]) : 0; - - if ($i == 0) $clamp = 360; - elseif ($i < 4) $clamp = 100; - else $clamp = 1; - - $hsl[] = $this->clamp($val, $clamp); - $i++; - } - - while (count($hsl) < 4) $hsl[] = 0; - return $this->toRGB($hsl); - - } elseif ($fname == 'rgb' || $fname == 'rgba') { - $components = array(); - $i = 1; - foreach ($rawComponents as $c) { - $c = $this->reduce($c); - if ($i < 4) { - if ($c[0] == '%') $components[] = 255 * ($c[1] / 100); - else $components[] = floatval($c[1]); - } elseif ($i == 4) { - if ($c[0] == '%') $components[] = 1.0 * ($c[1] / 100); - else $components[] = floatval($c[1]); - } else break; - - $i++; - } - while (count($components) < 3) $components[] = 0; - array_unshift($components, 'color'); - return $this->fixColor($components); - } - - return false; - } - - // reduce a delayed type to its final value - // dereference variables and solve equations - function reduce($var, $defaultValue = array('number', 0)) { - while (in_array($var[0], self::$dtypes)) { - if ($var[0] == 'list') { - foreach ($var[2] as &$value) $value = $this->reduce($value); - break; - } elseif ($var[0] == 'expression') { - $var = $this->evaluate($var[1], $var[2], $var[3]); - } elseif ($var[0] == 'variable') { - $var = $this->get($var[1]); - } elseif ($var[0] == 'lookup') { - // do accessor here.... - $var = array('number', 0); - } elseif ($var[0] == 'function') { - $color = $this->funcToColor($var); - if ($color) $var = $color; - else { - list($_, $name, $args) = $var; - $f = array($this, 'lib_'.$name); - if (is_callable($f)) { - if ($args[0] == 'list') - $args = $this->compressList($args[2], $args[1]); - - $var = call_user_func($f, $this->reduce($args)); - - // convet to a typed value if the result is a php primitive - if (is_numeric($var)) $var = array('number', $var); - elseif (!is_array($var)) $var = array('keyword', $var); - } else { - // plain function, reduce args - $var[2] = $this->reduce($var[2]); - } - } - break; // done reducing after a function - } elseif ($var[0] == 'negative') { - $value = $this->reduce($var[1]); - if (is_numeric($value[1])) { - $value[1] = -1*$value[1]; - } - $var = $value; - } - } - - return $var; - } - - // evaluate an expression - function evaluate($op, $left, $right) { - $left = $this->reduce($left); - $right = $this->reduce($right); - - if ($left[0] == 'color' && $right[0] == 'color') { - $out = $this->op_color_color($op, $left, $right); - return $out; - } - - if ($left[0] == 'color') { - return $this->op_color_number($op, $left, $right); - } - - if ($right[0] == 'color') { - return $this->op_number_color($op, $left, $right); - } - - // concatenate strings - if ($op == '+' && $left[0] == 'string') { - $append = $this->compileValue($right); - if ($this->quoted($append)) $append = substr($append, 1, -1); - - $lhs = $this->compileValue($left); - if ($q = $this->quoted($lhs)) $lhs = substr($lhs, 1, -1); - if (!$q) $q = ''; - - return array('string', $q.$lhs.$append.$q); - } - - if ($left[0] == 'keyword' || $right[0] == 'keyword' || - $left[0] == 'string' || $right[0] == 'string') - { - // look for negative op - if ($op == '-') $right[1] = '-'.$right[1]; - return array('keyword', $this->compileValue($left) .' '. $this->compileValue($right)); - } - - // default to number operation - return $this->op_number_number($op, $left, $right); - } - - // make sure a color's components don't go out of bounds - function fixColor($c) { - foreach (range(1, 3) as $i) { - if ($c[$i] < 0) $c[$i] = 0; - if ($c[$i] > 255) $c[$i] = 255; - $c[$i] = floor($c[$i]); - } - - return $c; - } - - function op_number_color($op, $lft, $rgt) { - if ($op == '+' || $op = '*') { - return $this->op_color_number($op, $rgt, $lft); - } - } - - function op_color_number($op, $lft, $rgt) { - if ($rgt[0] == '%') $rgt[1] /= 100; - - return $this->op_color_color($op, $lft, - array_fill(1, count($lft) - 1, $rgt[1])); - } - - function op_color_color($op, $left, $right) { - $out = array('color'); - $max = count($left) > count($right) ? count($left) : count($right); - foreach (range(1, $max - 1) as $i) { - $lval = isset($left[$i]) ? $left[$i] : 0; - $rval = isset($right[$i]) ? $right[$i] : 0; - switch ($op) { - case '+': - $out[] = $lval + $rval; - break; - case '-': - $out[] = $lval - $rval; - break; - case '*': - $out[] = $lval * $rval; - break; - case '%': - $out[] = $lval % $rval; - break; - case '/': - if ($rval == 0) throw new exception("evaluate error: can't divide by zero"); - $out[] = $lval / $rval; - break; - default: - throw new exception('evaluate error: color op number failed on op '.$op); - } - } - return $this->fixColor($out); - } - - // operator on two numbers - function op_number_number($op, $left, $right) { - if ($right[0] == '%') $right[1] /= 100; - - // figure out type - if ($right[0] == 'number' || $right[0] == '%') $type = $left[0]; - else $type = $right[0]; - - $value = 0; - switch ($op) { - case '+': - $value = $left[1] + $right[1]; - break; - case '*': - $value = $left[1] * $right[1]; - break; - case '-': - $value = $left[1] - $right[1]; - break; - case '%': - $value = $left[1] % $right[1]; - break; - case '/': - if ($right[1] == 0) throw new exception('parse error: divide by zero'); - $value = $left[1] / $right[1]; - break; - default: - throw new exception('parse error: unknown number operator: '.$op); - } - - return array($type, $value); - } - - - /* environment functions */ - - // push a new block on the stack, used for parsing - function pushBlock($tags) { - $b = new stdclass; - $b->parent = $this->env; - - $b->tags = $tags; - $b->props = array(); - $b->children = array(); - - $this->env = $b; - return $b; - } - - // push a block that doesn't multiply tags - function pushSpecialBlock($name) { - $b = $this->pushBlock(array($name)); - $b->no_multiply = true; - return $b; - } - - // used for compiliation variable state - function pushEnv() { - $e = new stdclass; - $e->parent = $this->env; - - $this->store = array(); - - $this->env = $e; - return $e; - } - - // pop something off the stack - function pop() { - $old = $this->env; - $this->env = $this->env->parent; - return $old; - } - - // set something in the current env - function set($name, $value) { - $this->env->store[$name] = $value; - } - - // append an property - function append($prop) { - $this->env->props[] = $prop; - } - - // get the highest occurrence entry for a name - function get($name) { - $current = $this->env; - while ($current) { - if (isset($current->store[$name])) - return $current->store[$name]; - else - $current = $current->parent; - } - - return null; - } - - /* raw parsing functions */ - - function literal($what, $eatWhitespace = true) { - // this is here mainly prevent notice from { } string accessor - if ($this->count >= strlen($this->buffer)) return false; - - // shortcut on single letter - if (!$eatWhitespace and strlen($what) == 1) { - if ($this->buffer{$this->count} == $what) { - $this->count++; - return true; - } - else return false; - } - - return $this->match($this->preg_quote($what), $m, $eatWhitespace); - } - - function preg_quote($what) { - return preg_quote($what, '/'); - } - - // advance counter to next occurrence of $what - // $until - don't include $what in advance - function to($what, &$out, $until = false, $allowNewline = false) { - $validChars = $allowNewline ? "[^\n]" : '.'; - if (!$this->match('('.$validChars.'*?)'.$this->preg_quote($what), $m, !$until)) return false; - if ($until) $this->count -= strlen($what); // give back $what - $out = $m[1]; - return true; - } - - // try to match something on head of buffer - function match($regex, &$out, $eatWhitespace = true) { - $r = '/'.$regex.($eatWhitespace ? '\s*' : '').'/Ais'; - if (preg_match($r, $this->buffer, $out, null, $this->count)) { - $this->count += strlen($out[0]); - return true; - } - return false; - } - - // match something without consuming it - function peek($regex, &$out = null) { - $r = '/'.$regex.'/Ais'; - $result = preg_match($r, $this->buffer, $out, null, $this->count); - - return $result; - } - - // seek to a spot in the buffer or return where we are on no argument - function seek($where = null) { - if ($where === null) return $this->count; - else $this->count = $where; - return true; - } - - /** - * Initialize state for a fresh parse - */ - protected function prepareParser($buff) { - $this->env = null; - $this->expandStack = array(); - $this->indentLevel = 0; - $this->count = 0; - $this->line = 1; - - $this->buffer = $this->removeComments($buff); - $this->pushBlock(null); // set up global scope - - // trim whitespace on head - if (preg_match('/^\s+/', $this->buffer, $m)) { - $this->line += substr_count($m[0], "\n"); - $this->buffer = ltrim($this->buffer); - } - } - - // create a child parser (for compiling an import) - protected function createChild($fname) { - $less = new lessc($fname); - $less->importDir = $this->importDir; - $less->indentChar = $this->indentChar; - $less->compat = $this->compat; - return $less; - } - - // parse code and return intermediate tree - public function parseTree($str = null) { - $this->prepareParser(is_null($str) ? $this->buffer : $str); - while (false !== $this->parseChunk()); - - if ($this->count != strlen($this->buffer)) - $this->throwParseError(); - - if (!is_null($this->env->parent)) - throw new exception('parse error: unclosed block'); - - $root = $this->env; - $this->env = null; - return $root; - } - - // inject array of unparsed strings into environment as variables - protected function injectVariables($args) { - $this->pushEnv(); - $parser = new lessc(); - foreach ($args as $name => $str_value) { - if ($name{0} != '@') $name = '@'.$name; - $parser->count = 0; - $parser->buffer = (string)$str_value; - if (!$parser->propertyValue($value)) { - throw new Exception("failed to parse passed in variable $name: $str_value"); - } - - $this->set($name, $value); - } - } - - // parse and compile buffer - function parse($str = null, $initial_variables = null) { - $locale = setlocale(LC_NUMERIC, 0); - setlocale(LC_NUMERIC, "C"); - $root = $this->parseTree($str); - - if ($initial_variables) $this->injectVariables($initial_variables); - $out = $this->compileBlock($root); - setlocale(LC_NUMERIC, $locale); - return $out; - } - - function throwParseError($msg = 'parse error') { - $line = $this->line + substr_count(substr($this->buffer, 0, $this->count), "\n"); - if (isset($this->fileName)) { - $loc = $this->fileName.' on line '.$line; - } else { - $loc = "line: ".$line; - } - - if ($this->peek("(.*?)(\n|$)", $m)) - throw new exception($msg.': failed at `'.$m[1].'` '.$loc); - } - - /** - * Initialize any static state, can initialize parser for a file - */ - function __construct($fname = null, $opts = null) { - if (!self::$operatorString) { - self::$operatorString = - '('.implode('|', array_map(array($this, 'preg_quote'), - array_keys(self::$precedence))).')'; - } - - if ($fname) { - if (!is_file($fname)) { - throw new Exception('load error: failed to find '.$fname); - } - $pi = pathinfo($fname); - - $this->fileName = $fname; - $this->importDir = $pi['dirname'].'/'; - $this->buffer = file_get_contents($fname); - - $this->addParsedFile($fname); - } - } - - // remove comments from $text - // todo: make it work for all functions, not just url - function removeComments($text) { - $look = array( - 'url(', '//', '/*', '"', "'" - ); - - $out = ''; - $min = null; - $done = false; - while (true) { - // find the next item - foreach ($look as $token) { - $pos = strpos($text, $token); - if ($pos !== false) { - if (!isset($min) || $pos < $min[1]) $min = array($token, $pos); - } - } - - if (is_null($min)) break; - - $count = $min[1]; - $skip = 0; - $newlines = 0; - switch ($min[0]) { - case 'url(': - if (preg_match('/url\(.*?\)/', $text, $m, 0, $count)) - $count += strlen($m[0]) - strlen($min[0]); - break; - case '"': - case "'": - if (preg_match('/'.$min[0].'.*?'.$min[0].'/', $text, $m, 0, $count)) - $count += strlen($m[0]) - 1; - break; - case '//': - $skip = strpos($text, "\n", $count); - if ($skip === false) $skip = strlen($text) - $count; - else $skip -= $count; - break; - case '/*': - if (preg_match('/\/\*.*?\*\//s', $text, $m, 0, $count)) { - $skip = strlen($m[0]); - $newlines = substr_count($m[0], "\n"); - } - break; - } - - if ($skip == 0) $count += strlen($min[0]); - - $out .= substr($text, 0, $count).str_repeat("\n", $newlines); - $text = substr($text, $count + $skip); - - $min = null; - } - - return $out.$text; - } - - public function allParsedFiles() { return $this->allParsedFiles; } - protected function addParsedFile($file) { - $this->allParsedFiles[realpath($file)] = filemtime($file); - } - - - // compile to $in to $out if $in is newer than $out - // returns true when it compiles, false otherwise - public static function ccompile($in, $out) { - if (!is_file($out) || filemtime($in) > filemtime($out)) { - $less = new lessc($in); - file_put_contents($out, $less->parse()); - return true; - } - - return false; - } - - /** - * Execute lessphp on a .less file or a lessphp cache structure - * - * The lessphp cache structure contains information about a specific - * less file having been parsed. It can be used as a hint for future - * calls to determine whether or not a rebuild is required. - * - * The cache structure contains two important keys that may be used - * externally: - * - * compiled: The final compiled CSS - * updated: The time (in seconds) the CSS was last compiled - * - * The cache structure is a plain-ol' PHP associative array and can - * be serialized and unserialized without a hitch. - * - * @param mixed $in Input - * @param bool $force Force rebuild? - * @return array lessphp cache structure - */ - public static function cexecute($in, $force = false) { - - // assume no root - $root = null; - - if (is_string($in)) { - $root = $in; - } elseif (is_array($in) and isset($in['root'])) { - if ($force or ! isset($in['files'])) { - // If we are forcing a recompile or if for some reason the - // structure does not contain any file information we should - // specify the root to trigger a rebuild. - $root = $in['root']; - } elseif (isset($in['files']) and is_array($in['files'])) { - foreach ($in['files'] as $fname => $ftime ) { - if (!file_exists($fname) or filemtime($fname) > $ftime) { - // One of the files we knew about previously has changed - // so we should look at our incoming root again. - $root = $in['root']; - break; - } - } - } - } else { - // TODO: Throw an exception? We got neither a string nor something - // that looks like a compatible lessphp cache structure. - return null; - } - - if ($root !== null) { - // If we have a root value which means we should rebuild. - $less = new lessc($root); - $out = array(); - $out['root'] = $root; - $out['compiled'] = $less->parse(); - $out['files'] = $less->allParsedFiles(); - $out['updated'] = time(); - return $out; - } else { - // No changes, pass back the structure - // we were given initially. - return $in; - } - - } -} - diff --git a/_piecrust/libs/LessPhp/lessify b/_piecrust/libs/LessPhp/lessify deleted file mode 100755 index 416f0ca..0000000 --- a/_piecrust/libs/LessPhp/lessify +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/php -q -parse(); -} catch (exception $e) { - exit("Fatal error: ".$e->getMessage()."\n"); -} - - diff --git a/_piecrust/libs/LessPhp/lessify.inc.php b/_piecrust/libs/LessPhp/lessify.inc.php deleted file mode 100755 index 3567f24..0000000 --- a/_piecrust/libs/LessPhp/lessify.inc.php +++ /dev/null @@ -1,443 +0,0 @@ - - */ - -require "lessc.inc.php"; - -// -// check if the merge during mixin is overwriting values. should or should it not? -// - -// -// 1. split apart class tags -// - -class easyparse { - var $buffer; - var $count; - - function __construct($str) { - $this->count = 0; - $this->buffer = trim($str); - } - - function seek($where = null) { - if ($where === null) return $this->count; - else $this->count = $where; - return true; - } - - function preg_quote($what) { - return preg_quote($what, '/'); - } - - function match($regex, &$out, $eatWhitespace = true) { - $r = '/'.$regex.($eatWhitespace ? '\s*' : '').'/Ais'; - if (preg_match($r, $this->buffer, $out, null, $this->count)) { - $this->count += strlen($out[0]); - return true; - } - return false; - } - - function literal($what, $eatWhitespace = true) { - // this is here mainly prevent notice from { } string accessor - if ($this->count >= strlen($this->buffer)) return false; - - // shortcut on single letter - if (!$eatWhitespace and strlen($what) == 1) { - if ($this->buffer{$this->count} == $what) { - $this->count++; - return true; - } - else return false; - } - - return $this->match($this->preg_quote($what), $m, $eatWhitespace); - } - -} - -class tagparse extends easyparse { - static private $combinators = null; - static private $match_opts = null; - - function parse() { - if (empty(self::$combinators)) { - self::$combinators = '('.implode('|', array_map(array($this, 'preg_quote'), - array('+', '>', '~'))).')'; - self::$match_opts = '('.implode('|', array_map(array($this, 'preg_quote'), - array('=', '~=', '|=', '$=', '*='))).')'; - } - - // crush whitespace - $this->buffer = preg_replace('/\s+/', ' ', $this->buffer).' '; - - $tags = array(); - while ($this->tag($t)) $tags[] = $t; - - return $tags; - } - - static function compileString($string) { - list(, $delim, $str) = $string; - $str = str_replace($delim, "\\".$delim, $str); - $str = str_replace("\n", "\\\n", $str); - return $delim.$str.$delim; - } - - static function compilePaths($paths) { - return implode(', ', array_map(array('self', 'compilePath'), $paths)); - } - - // array of tags - static function compilePath($path) { - return implode(' ', array_map(array('self', 'compileTag'), $path)); - } - - - static function compileTag($tag) { - ob_start(); - if (isset($tag['comb'])) echo $tag['comb']." "; - if (isset($tag['front'])) echo $tag['front']; - if (isset($tag['attr'])) { - echo '['.$tag['attr']; - if (isset($tag['op'])) { - echo $tag['op'].$tag['op_value']; - } - echo ']'; - } - return ob_get_clean(); - } - - function string(&$out) { - $s = $this->seek(); - - if ($this->literal('"')) { - $delim = '"'; - } elseif ($this->literal("'")) { - $delim = "'"; - } else { - return false; - } - - while (true) { - // step through letters looking for either end or escape - $buff = ""; - $escapeNext = false; - $finished = false; - for ($i = $this->count; $i < strlen($this->buffer); $i++) { - $char = $this->buffer[$i]; - switch ($char) { - case $delim: - if ($escapeNext) { - $buff .= $char; - $escapeNext = false; - break; - } - $finished = true; - break 2; - case "\\": - if ($escapeNext) { - $buff .= $char; - $escapeNext = false; - } else { - $escapeNext = true; - } - break; - case "\n": - if (!$escapeNext) { - break 3; - } - - $buff .= $char; - $escapeNext = false; - break; - default: - if ($escapeNext) { - $buff .= "\\"; - $escapeNext = false; - } - $buff .= $char; - } - } - if (!$finished) break; - $out = array('string', $delim, $buff); - $this->seek($i+1); - return true; - } - - $this->seek($s); - return false; - } - - function tag(&$out) { - $s = $this->seek(); - $tag = array(); - if ($this->combinator($op)) $tag['comb'] = $op; - - if (!$this->match('(.*?)( |$|\[|'.self::$combinators.')', $match)) { - $this->seek($s); - return false; - } - - if (!empty($match[3])) { - // give back combinator - $this->count-=strlen($match[3]); - } - - if (!empty($match[1])) $tag['front'] = $match[1]; - - if ($match[2] == '[') { - if ($this->ident($i)) { - $tag['attr'] = $i; - - if ($this->match(self::$match_opts, $m) && $this->value($v)) { - $tag['op'] = $m[1]; - $tag['op_value'] = $v; - } - - if ($this->literal(']')) { - $out = $tag; - return true; - } - } - } elseif (isset($tag['front'])) { - $out = $tag; - return true; - } - - $this->seek($s); - return false; - } - - function ident(&$out) { - // [-]?{nmstart}{nmchar}* - // nmstart: [_a-z]|{nonascii}|{escape} - // nmchar: [_a-z0-9-]|{nonascii}|{escape} - if ($this->match('(-?[_a-z][_\w]*)', $m)) { - $out = $m[1]; - return true; - } - return false; - } - - function value(&$out) { - if ($this->string($str)) { - $out = $this->compileString($str); - return true; - } elseif ($this->ident($id)) { - $out = $id; - return true; - } - return false; - } - - - function combinator(&$op) { - if ($this->match(self::$combinators, $m)) { - $op = $m[1]; - return true; - } - return false; - } -} - -class nodecounter { - var $count = 0; - var $children = array(); - - var $name; - var $child_blocks; - var $the_block; - - function __construct($name) { - $this->name = $name; - } - - function dump($stack = null) { - if (is_null($stack)) $stack = array(); - $stack[] = $this->getName(); - echo implode(' -> ', $stack)." ($this->count)\n"; - foreach ($this->children as $child) { - $child->dump($stack); - } - } - - static function compileProperties($c, $block) { - foreach($block as $name => $value) { - if ($c->isProperty($name, $value)) { - echo $c->compileProperty($name, $value)."\n"; - } - } - } - - function compile($c, $path = null) { - if (is_null($path)) $path = array(); - $path[] = $this->name; - - $isVisible = !is_null($this->the_block) || !is_null($this->child_blocks); - - if ($isVisible) { - echo $c->indent(implode(' ', $path).' {'); - $c->indentLevel++; - $path = array(); - - if ($this->the_block) { - $this->compileProperties($c, $this->the_block); - } - - if ($this->child_blocks) { - foreach ($this->child_blocks as $block) { - echo $c->indent(tagparse::compilePaths($block['__tags']).' {'); - $c->indentLevel++; - $this->compileProperties($c, $block); - $c->indentLevel--; - echo $c->indent('}'); - } - } - } - - // compile child nodes - foreach($this->children as $node) { - $node->compile($c, $path); - } - - if ($isVisible) { - $c->indentLevel--; - echo $c->indent('}'); - } - - } - - function getName() { - if (is_null($this->name)) return "[root]"; - else return $this->name; - } - - function getNode($name) { - if (!isset($this->children[$name])) { - $this->children[$name] = new nodecounter($name); - } - - return $this->children[$name]; - } - - function findNode($path) { - $current = $this; - for ($i = 0; $i < count($path); $i++) { - $t = tagparse::compileTag($path[$i]); - $current = $current->getNode($t); - } - - return $current; - } - - function addBlock($path, $block) { - $node = $this->findNode($path); - if (!is_null($node->the_block)) throw new exception("can this happen?"); - - unset($block['__tags']); - $node->the_block = $block; - } - - function addToNode($path, $block) { - $node = $this->findNode($path); - $node->child_blocks[] = $block; - } -} - -/** - * create a less file from a css file by combining blocks where appropriate - */ -class lessify extends lessc { - public function dump() { - print_r($this->env); - } - - public function parse($str = null) { - $this->prepareParser($str ? $str : $this->buffer); - while (false !== $this->parseChunk()); - - $root = new nodecounter(null); - - // attempt to preserve some of the block order - $order = array(); - - $visitedTags = array(); - foreach (end($this->env) as $name => $block) { - if (!$this->isBlock($name, $block)) continue; - if (isset($visitedTags[$name])) continue; - - foreach ($block['__tags'] as $t) { - $visitedTags[$t] = true; - } - - // skip those with more than 1 - if (count($block['__tags']) == 1) { - $p = new tagparse(end($block['__tags'])); - $path = $p->parse(); - $root->addBlock($path, $block); - $order[] = array('compressed', $path, $block); - continue; - } else { - $common = null; - $paths = array(); - foreach ($block['__tags'] as $rawtag) { - $p = new tagparse($rawtag); - $paths[] = $path = $p->parse(); - if (is_null($common)) $common = $path; - else { - $new_common = array(); - foreach ($path as $tag) { - $head = array_shift($common); - if ($tag == $head) { - $new_common[] = $head; - } else break; - } - $common = $new_common; - if (empty($common)) { - // nothing in common - break; - } - } - } - - if (!empty($common)) { - $new_paths = array(); - foreach ($paths as $p) $new_paths[] = array_slice($p, count($common)); - $block['__tags'] = $new_paths; - $root->addToNode($common, $block); - $order[] = array('compressed', $common, $block); - continue; - } - - } - - $order[] = array('none', $block['__tags'], $block); - } - - - $compressed = $root->children; - foreach ($order as $item) { - list($type, $tags, $block) = $item; - if ($type == 'compressed') { - $top = tagparse::compileTag(reset($tags)); - if (isset($compressed[$top])) { - $compressed[$top]->compile($this); - unset($compressed[$top]); - } - } else { - echo $this->indent(implode(', ', $tags).' {'); - $this->indentLevel++; - nodecounter::compileProperties($this, $block); - $this->indentLevel--; - echo $this->indent('}'); - } - } - } -} diff --git a/_piecrust/libs/LessPhp/plessc b/_piecrust/libs/LessPhp/plessc deleted file mode 100755 index 6ef9f90..0000000 --- a/_piecrust/libs/LessPhp/plessc +++ /dev/null @@ -1,191 +0,0 @@ -#!/usr/bin/php -q - -$VERSION = "v0.2.1"; - -error_reporting(E_ALL); -$path = realpath(dirname(__FILE__)).'/'; - -require $path."lessc.inc.php"; - -$fa = "Fatal Error: "; -function err($msg) { - fwrite(STDERR, $msg."\n"); -} - -if (php_sapi_name() != "cli") { - err($fa.$argv[0]." must be run in the command line."); - exit(1); -} -$exe = array_shift($argv); // remove filename - -function process($data, $import = null) { - global $fa; - - $l = new lessc(); - if ($import) $l->importDir = $import; - try { - echo $l->parse($data); - exit(0); - } catch (exception $ex) { - err($fa."\n".str_repeat('=', 20)."\n". - $ex->getMessage()); - exit(1); - } -} - -// process args -$opts = array(); -foreach ($argv as $loc => $a) { - if (preg_match("/^-([a-zA-Z]+)$/", $a, $m)) { - $m = $m[1]; - for ($i = 0; $i < strlen($m); $i++) - $opts[$m{$i}] = $loc; - unset($argv[$loc]); - } -} - -function has($o, &$loc = null) { - global $opts; - if (!isset($opts[$o])) return false; - $loc = $opts[$o]; - return true; -} - -function hasValue($o, &$value = null) { - global $argv; - if (!has($o,$loc)) return false; - if (!isset($argv[$loc+1])) return false; - $value = $argv[$loc+1]; - return true; -} - -if (has("v")) { - exit($VERSION."\n"); -} - -if (has("r", $loc)) { - if (!hasValue("r", $data)) { - while (!feof(STDIN)) { - $data .= fread(STDIN, 8192); - } - } - return process($data); -} - -if (has("w")) { - // need two files - if (!is_file($in = array_shift($argv)) || - null == $out = array_shift($argv)) - { - err($fa.$exe." -w infile outfile"); - exit(1); - } - - echo "Watching ".$in. - (has("n") ? ' with notifications' : ''). - ", press Ctrl + c to exit.\n"; - - $cache = $in; - $last_action = 0; - while (1) { - clearstatcache(); - - // check if anything has changed since last fail - $updated = false; - if (is_array($cache)) { - foreach ($cache['files'] as $fname=>$_) { - if (filemtime($fname) > $last_action) { - $updated = true; - break; - } - } - } else $updated = true; - - // try to compile it - if ($updated) { - $last_action = time(); - - try { - $cache = lessc::cexecute($cache); - echo "Writing updated file: ".$out."\n"; - if (!file_put_contents($out, $cache['compiled'])) { - err($fa."Could not write to file ".$out); - exit(1); - } - } catch (exception $ex) { - echo "\nFatal Error:\n".str_repeat('=', 20)."\n".$ex->getMessage()."\n\n"; - - if (has("n")) { - `notify-send -u critical "compile failed" "{$ex->getMessage()}"`; - } - } - } - - sleep(1); - } - exit(0); -} - -if (!$fname = array_shift($argv)) { - echo "Usage: ".$exe." input-file [output-file]\n"; - exit(1); -} - -function dumpValue($node, $depth = 0) { - if (is_object($node)) { - $indent = str_repeat(" ", $depth); - $out = array(); - foreach ($node->props as $prop) { - $out[] = $indent . dumpValue($prop, $depth + 1); - } - $out = implode("\n", $out); - if (!empty($node->tags)) { - $out = "+ ".implode(", ", $node->tags)."\n".$out; - } - return $out; - } elseif (is_array($node)) { - $type = $node[0]; - if ($type == "block") - return dumpValue($node[1], $depth); - - $out = array(); - foreach ($node as $value) { - $out[] = dumpValue($value, $depth); - } - return "{ ".implode(", ", $out)." }"; - } else { - if (is_string($node) && preg_match("/[\s,]/", $node)) { - return '"'.$node.'"'; - } - return $node; // normal value - } -} - -try { - $l = new lessc($fname); - if (has("T") || has("X")) { - $t = $l->parseTree(); - if (has("X")) - $out = print_r($t, 1); - else - $out = dumpValue($t)."\n"; - } else { - $out = $l->parse(); - } - - if (!$fout = array_shift($argv)) { - echo $out; - } else { - file_put_contents($fout, $out); - } - -} catch (exception $ex) { - err($fa.$ex->getMessage()); - exit(1); -} - - -?> diff --git a/_piecrust/libs/Log/Log.php b/_piecrust/libs/Log/Log.php deleted file mode 100644 index 2019341..0000000 --- a/_piecrust/libs/Log/Log.php +++ /dev/null @@ -1,842 +0,0 @@ - - * @author Jon Parise - * @since Horde 1.3 - * @package Log - */ -class Log -{ - /** - * Indicates whether or not the log can been opened / connected. - * - * @var boolean - * @access protected - */ - var $_opened = false; - - /** - * Instance-specific unique identification number. - * - * @var integer - * @access protected - */ - var $_id = 0; - - /** - * The label that uniquely identifies this set of log messages. - * - * @var string - * @access protected - */ - var $_ident = ''; - - /** - * The default priority to use when logging an event. - * - * @var integer - * @access protected - */ - var $_priority = PEAR_LOG_INFO; - - /** - * The bitmask of allowed log levels. - * - * @var integer - * @access protected - */ - var $_mask = PEAR_LOG_ALL; - - /** - * Holds all Log_observer objects that wish to be notified of new messages. - * - * @var array - * @access protected - */ - var $_listeners = array(); - - /** - * Maps canonical format keys to position arguments for use in building - * "line format" strings. - * - * @var array - * @access protected - */ - var $_formatMap = array('%{timestamp}' => '%1$s', - '%{ident}' => '%2$s', - '%{priority}' => '%3$s', - '%{message}' => '%4$s', - '%{file}' => '%5$s', - '%{line}' => '%6$s', - '%{function}' => '%7$s', - '%{class}' => '%8$s', - '%\{' => '%%{'); - - /** - * Attempts to return a concrete Log instance of type $handler. - * - * @param string $handler The type of concrete Log subclass to return. - * Attempt to dynamically include the code for - * this subclass. Currently, valid values are - * 'console', 'syslog', 'sql', 'file', and 'mcal'. - * - * @param string $name The name of the actually log file, table, or - * other specific store to use. Defaults to an - * empty string, with which the subclass will - * attempt to do something intelligent. - * - * @param string $ident The identity reported to the log system. - * - * @param array $conf A hash containing any additional configuration - * information that a subclass might need. - * - * @param int $level Log messages up to and including this level. - * - * @return object Log The newly created concrete Log instance, or - * null on an error. - * @access public - * @since Log 1.0 - */ - public static function factory($handler, $name = '', $ident = '', - $conf = array(), $level = PEAR_LOG_DEBUG) - { - $handler = strtolower($handler); - $class = 'Log_' . $handler; - $classfile = 'Log/' . $handler . '.php'; - - /* - * Attempt to include our version of the named class, but don't treat - * a failure as fatal. The caller may have already included their own - * version of the named class. - */ - if (!class_exists($class, false)) { - include_once $classfile; - } - - /* If the class exists, return a new instance of it. */ - if (class_exists($class, false)) { - $obj = new $class($name, $ident, $conf, $level); - return $obj; - } - - $null = null; - return $null; - } - - /** - * Attempts to return a reference to a concrete Log instance of type - * $handler, only creating a new instance if no log instance with the same - * parameters currently exists. - * - * You should use this if there are multiple places you might create a - * logger, you don't want to create multiple loggers, and you don't want to - * check for the existance of one each time. The singleton pattern does all - * the checking work for you. - * - * You MUST call this method with the $var = &Log::singleton() syntax. - * Without the ampersand (&) in front of the method name, you will not get - * a reference, you will get a copy. - * - * @param string $handler The type of concrete Log subclass to return. - * Attempt to dynamically include the code for - * this subclass. Currently, valid values are - * 'console', 'syslog', 'sql', 'file', and 'mcal'. - * - * @param string $name The name of the actually log file, table, or - * other specific store to use. Defaults to an - * empty string, with which the subclass will - * attempt to do something intelligent. - * - * @param string $ident The identity reported to the log system. - * - * @param array $conf A hash containing any additional configuration - * information that a subclass might need. - * - * @param int $level Log messages up to and including this level. - * - * @return object Log The newly created concrete Log instance, or - * null on an error. - * @access public - * @since Log 1.0 - */ - public static function singleton($handler, $name = '', $ident = '', - $conf = array(), $level = PEAR_LOG_DEBUG) - { - static $instances; - if (!isset($instances)) $instances = array(); - - $signature = serialize(array($handler, $name, $ident, $conf, $level)); - if (!isset($instances[$signature])) { - $instances[$signature] = Log::factory($handler, $name, $ident, - $conf, $level); - } - - return $instances[$signature]; - } - - /** - * Abstract implementation of the open() method. - * @since Log 1.0 - */ - function open() - { - return false; - } - - /** - * Abstract implementation of the close() method. - * @since Log 1.0 - */ - function close() - { - return false; - } - - /** - * Abstract implementation of the flush() method. - * @since Log 1.8.2 - */ - function flush() - { - return false; - } - - /** - * Abstract implementation of the log() method. - * @since Log 1.0 - */ - function log($message, $priority = null) - { - return false; - } - - /** - * A convenience function for logging a emergency event. It will log a - * message at the PEAR_LOG_EMERG log level. - * - * @param mixed $message String or object containing the message - * to log. - * - * @return boolean True if the message was successfully logged. - * - * @access public - * @since Log 1.7.0 - */ - function emerg($message) - { - return $this->log($message, PEAR_LOG_EMERG); - } - - /** - * A convenience function for logging an alert event. It will log a - * message at the PEAR_LOG_ALERT log level. - * - * @param mixed $message String or object containing the message - * to log. - * - * @return boolean True if the message was successfully logged. - * - * @access public - * @since Log 1.7.0 - */ - function alert($message) - { - return $this->log($message, PEAR_LOG_ALERT); - } - - /** - * A convenience function for logging a critical event. It will log a - * message at the PEAR_LOG_CRIT log level. - * - * @param mixed $message String or object containing the message - * to log. - * - * @return boolean True if the message was successfully logged. - * - * @access public - * @since Log 1.7.0 - */ - function crit($message) - { - return $this->log($message, PEAR_LOG_CRIT); - } - - /** - * A convenience function for logging a error event. It will log a - * message at the PEAR_LOG_ERR log level. - * - * @param mixed $message String or object containing the message - * to log. - * - * @return boolean True if the message was successfully logged. - * - * @access public - * @since Log 1.7.0 - */ - function err($message) - { - return $this->log($message, PEAR_LOG_ERR); - } - - /** - * A convenience function for logging a warning event. It will log a - * message at the PEAR_LOG_WARNING log level. - * - * @param mixed $message String or object containing the message - * to log. - * - * @return boolean True if the message was successfully logged. - * - * @access public - * @since Log 1.7.0 - */ - function warning($message) - { - return $this->log($message, PEAR_LOG_WARNING); - } - - /** - * A convenience function for logging a notice event. It will log a - * message at the PEAR_LOG_NOTICE log level. - * - * @param mixed $message String or object containing the message - * to log. - * - * @return boolean True if the message was successfully logged. - * - * @access public - * @since Log 1.7.0 - */ - function notice($message) - { - return $this->log($message, PEAR_LOG_NOTICE); - } - - /** - * A convenience function for logging a information event. It will log a - * message at the PEAR_LOG_INFO log level. - * - * @param mixed $message String or object containing the message - * to log. - * - * @return boolean True if the message was successfully logged. - * - * @access public - * @since Log 1.7.0 - */ - function info($message) - { - return $this->log($message, PEAR_LOG_INFO); - } - - /** - * A convenience function for logging a debug event. It will log a - * message at the PEAR_LOG_DEBUG log level. - * - * @param mixed $message String or object containing the message - * to log. - * - * @return boolean True if the message was successfully logged. - * - * @access public - * @since Log 1.7.0 - */ - function debug($message) - { - return $this->log($message, PEAR_LOG_DEBUG); - } - - /** - * Returns the string representation of the message data. - * - * If $message is an object, _extractMessage() will attempt to extract - * the message text using a known method (such as a PEAR_Error object's - * getMessage() method). If a known method, cannot be found, the - * serialized representation of the object will be returned. - * - * If the message data is already a string, it will be returned unchanged. - * - * @param mixed $message The original message data. This may be a - * string or any object. - * - * @return string The string representation of the message. - * - * @access protected - */ - function _extractMessage($message) - { - /* - * If we've been given an object, attempt to extract the message using - * a known method. If we can't find such a method, default to the - * "human-readable" version of the object. - * - * We also use the human-readable format for arrays. - */ - if (is_object($message)) { - if (method_exists($message, 'getmessage')) { - $message = $message->getMessage(); - } else if (method_exists($message, 'tostring')) { - $message = $message->toString(); - } else if (method_exists($message, '__tostring')) { - $message = (string)$message; - } else { - $message = var_export($message, true); - } - } else if (is_array($message)) { - if (isset($message['message'])) { - if (is_scalar($message['message'])) { - $message = $message['message']; - } else { - $message = var_export($message['message'], true); - } - } else { - $message = var_export($message, true); - } - } else if (is_bool($message) || $message === NULL) { - $message = var_export($message, true); - } - - /* Otherwise, we assume the message is a string. */ - return $message; - } - - /** - * Using debug_backtrace(), returns the file, line, and enclosing function - * name of the source code context from which log() was invoked. - * - * @param int $depth The initial number of frames we should step - * back into the trace. - * - * @return array Array containing four strings: the filename, the line, - * the function name, and the class name from which log() - * was called. - * - * @access private - * @since Log 1.9.4 - */ - function _getBacktraceVars($depth) - { - /* Start by generating a backtrace from the current call (here). */ - $bt = debug_backtrace(); - - /* Store some handy shortcuts to our previous frames. */ - $bt0 = isset($bt[$depth]) ? $bt[$depth] : null; - $bt1 = isset($bt[$depth + 1]) ? $bt[$depth + 1] : null; - - /* - * If we were ultimately invoked by the composite handler, we need to - * increase our depth one additional level to compensate. - */ - $class = isset($bt1['class']) ? $bt1['class'] : null; - if ($class !== null && strcasecmp($class, 'Log_composite') == 0) { - $depth++; - $bt0 = isset($bt[$depth]) ? $bt[$depth] : null; - $bt1 = isset($bt[$depth + 1]) ? $bt[$depth + 1] : null; - $class = isset($bt1['class']) ? $bt1['class'] : null; - } - - /* - * We're interested in the frame which invoked the log() function, so - * we need to walk back some number of frames into the backtrace. The - * $depth parameter tells us where to start looking. We go one step - * further back to find the name of the encapsulating function from - * which log() was called. - */ - $file = isset($bt0) ? $bt0['file'] : null; - $line = isset($bt0) ? $bt0['line'] : 0; - $func = isset($bt1) ? $bt1['function'] : null; - - /* - * However, if log() was called from one of our "shortcut" functions, - * we're going to need to go back an additional step. - */ - if (in_array($func, array('emerg', 'alert', 'crit', 'err', 'warning', - 'notice', 'info', 'debug'))) { - $bt2 = isset($bt[$depth + 2]) ? $bt[$depth + 2] : null; - - $file = is_array($bt1) ? $bt1['file'] : null; - $line = is_array($bt1) ? $bt1['line'] : 0; - $func = is_array($bt2) ? $bt2['function'] : null; - $class = isset($bt2['class']) ? $bt2['class'] : null; - } - - /* - * If we couldn't extract a function name (perhaps because we were - * executed from the "main" context), provide a default value. - */ - if ($func === null) { - $func = '(none)'; - } - - /* Return a 4-tuple containing (file, line, function, class). */ - return array($file, $line, $func, $class); - } - - /** - * Produces a formatted log line based on a format string and a set of - * variables representing the current log record and state. - * - * @return string Formatted log string. - * - * @access protected - * @since Log 1.9.4 - */ - function _format($format, $timestamp, $priority, $message) - { - /* - * If the format string references any of the backtrace-driven - * variables (%5 %6,%7,%8), generate the backtrace and fetch them. - */ - if (preg_match('/%[5678]/', $format)) { - list($file, $line, $func, $class) = $this->_getBacktraceVars(2); - } - - /* - * Build the formatted string. We use the sprintf() function's - * "argument swapping" capability to dynamically select and position - * the variables which will ultimately appear in the log string. - */ - return sprintf($format, - $timestamp, - $this->_ident, - $this->priorityToString($priority), - $message, - isset($file) ? $file : '', - isset($line) ? $line : '', - isset($func) ? $func : '', - isset($class) ? $class : ''); - } - - /** - * Returns the string representation of a PEAR_LOG_* integer constant. - * - * @param int $priority A PEAR_LOG_* integer constant. - * - * @return string The string representation of $level. - * - * @access public - * @since Log 1.0 - */ - function priorityToString($priority) - { - $levels = array( - PEAR_LOG_EMERG => 'emergency', - PEAR_LOG_ALERT => 'alert', - PEAR_LOG_CRIT => 'critical', - PEAR_LOG_ERR => 'error', - PEAR_LOG_WARNING => 'warning', - PEAR_LOG_NOTICE => 'notice', - PEAR_LOG_INFO => 'info', - PEAR_LOG_DEBUG => 'debug' - ); - - return $levels[$priority]; - } - - /** - * Returns the the PEAR_LOG_* integer constant for the given string - * representation of a priority name. This function performs a - * case-insensitive search. - * - * @param string $name String containing a priority name. - * - * @return string The PEAR_LOG_* integer contstant corresponding - * the the specified priority name. - * - * @access public - * @since Log 1.9.0 - */ - function stringToPriority($name) - { - $levels = array( - 'emergency' => PEAR_LOG_EMERG, - 'alert' => PEAR_LOG_ALERT, - 'critical' => PEAR_LOG_CRIT, - 'error' => PEAR_LOG_ERR, - 'warning' => PEAR_LOG_WARNING, - 'notice' => PEAR_LOG_NOTICE, - 'info' => PEAR_LOG_INFO, - 'debug' => PEAR_LOG_DEBUG - ); - - return $levels[strtolower($name)]; - } - - /** - * Calculate the log mask for the given priority. - * - * This method may be called statically. - * - * @param integer $priority The priority whose mask will be calculated. - * - * @return integer The calculated log mask. - * - * @access public - * @since Log 1.7.0 - */ - public static function MASK($priority) - { - return (1 << $priority); - } - - /** - * Calculate the log mask for all priorities up to the given priority. - * - * This method may be called statically. - * - * @param integer $priority The maximum priority covered by this mask. - * - * @return integer The resulting log mask. - * - * @access public - * @since Log 1.7.0 - * - * @deprecated deprecated since Log 1.9.4; use Log::MAX() instead - */ - public static function UPTO($priority) - { - return Log::MAX($priority); - } - - /** - * Calculate the log mask for all priorities greater than or equal to the - * given priority. In other words, $priority will be the lowest priority - * matched by the resulting mask. - * - * This method may be called statically. - * - * @param integer $priority The minimum priority covered by this mask. - * - * @return integer The resulting log mask. - * - * @access public - * @since Log 1.9.4 - */ - public static function MIN($priority) - { - return PEAR_LOG_ALL ^ ((1 << $priority) - 1); - } - - /** - * Calculate the log mask for all priorities less than or equal to the - * given priority. In other words, $priority will be the highests priority - * matched by the resulting mask. - * - * This method may be called statically. - * - * @param integer $priority The maximum priority covered by this mask. - * - * @return integer The resulting log mask. - * - * @access public - * @since Log 1.9.4 - */ - public static function MAX($priority) - { - return ((1 << ($priority + 1)) - 1); - } - - /** - * Set and return the level mask for the current Log instance. - * - * @param integer $mask A bitwise mask of log levels. - * - * @return integer The current level mask. - * - * @access public - * @since Log 1.7.0 - */ - function setMask($mask) - { - $this->_mask = $mask; - - return $this->_mask; - } - - /** - * Returns the current level mask. - * - * @return interger The current level mask. - * - * @access public - * @since Log 1.7.0 - */ - function getMask() - { - return $this->_mask; - } - - /** - * Check if the given priority is included in the current level mask. - * - * @param integer $priority The priority to check. - * - * @return boolean True if the given priority is included in the current - * log mask. - * - * @access protected - * @since Log 1.7.0 - */ - function _isMasked($priority) - { - return (Log::MASK($priority) & $this->_mask); - } - - /** - * Returns the current default priority. - * - * @return integer The current default priority. - * - * @access public - * @since Log 1.8.4 - */ - function getPriority() - { - return $this->_priority; - } - - /** - * Sets the default priority to the specified value. - * - * @param integer $priority The new default priority. - * - * @access public - * @since Log 1.8.4 - */ - function setPriority($priority) - { - $this->_priority = $priority; - } - - /** - * Adds a Log_observer instance to the list of observers that are listening - * for messages emitted by this Log instance. - * - * @param object $observer The Log_observer instance to attach as a - * listener. - * - * @param boolean True if the observer is successfully attached. - * - * @access public - * @since Log 1.0 - */ - function attach(&$observer) - { - if (!is_a($observer, 'Log_observer')) { - return false; - } - - $this->_listeners[$observer->_id] = &$observer; - - return true; - } - - /** - * Removes a Log_observer instance from the list of observers. - * - * @param object $observer The Log_observer instance to detach from - * the list of listeners. - * - * @param boolean True if the observer is successfully detached. - * - * @access public - * @since Log 1.0 - */ - function detach($observer) - { - if (!is_a($observer, 'Log_observer') || - !isset($this->_listeners[$observer->_id])) { - return false; - } - - unset($this->_listeners[$observer->_id]); - - return true; - } - - /** - * Informs each registered observer instance that a new message has been - * logged. - * - * @param array $event A hash describing the log event. - * - * @access protected - */ - function _announce($event) - { - foreach ($this->_listeners as $id => $listener) { - if ($event['priority'] <= $this->_listeners[$id]->_priority) { - $this->_listeners[$id]->notify($event); - } - } - } - - /** - * Indicates whether this is a composite class. - * - * @return boolean True if this is a composite class. - * - * @access public - * @since Log 1.0 - */ - function isComposite() - { - return false; - } - - /** - * Sets this Log instance's identification string. - * - * @param string $ident The new identification string. - * - * @access public - * @since Log 1.6.3 - */ - function setIdent($ident) - { - $this->_ident = $ident; - } - - /** - * Returns the current identification string. - * - * @return string The current Log instance's identification string. - * - * @access public - * @since Log 1.6.3 - */ - function getIdent() - { - return $this->_ident; - } -} diff --git a/_piecrust/libs/Log/Log/composite.php b/_piecrust/libs/Log/Log/composite.php deleted file mode 100644 index 88c4012..0000000 --- a/_piecrust/libs/Log/Log/composite.php +++ /dev/null @@ -1,274 +0,0 @@ - - * @author Jon Parise - * - * @since Horde 1.3 - * @since Log 1.0 - * @package Log - * - * @example composite.php Using the composite handler. - */ -class Log_composite extends Log -{ - /** - * Array holding all of the Log instances to which log events should be - * sent. - * - * @var array - * @access private - */ - var $_children = array(); - - - /** - * Constructs a new composite Log object. - * - * @param boolean $name This parameter is ignored. - * @param boolean $ident This parameter is ignored. - * @param boolean $conf This parameter is ignored. - * @param boolean $level This parameter is ignored. - * - * @access public - */ - function Log_composite($name, $ident = '', $conf = array(), - $level = PEAR_LOG_DEBUG) - { - $this->_ident = $ident; - } - - /** - * Opens all of the child instances. - * - * @return True if all of the child instances were successfully opened. - * - * @access public - */ - function open() - { - /* Attempt to open each of our children. */ - $this->_opened = true; - foreach ($this->_children as $child) { - $this->_opened &= $child->open(); - } - - /* If all children were opened, return success. */ - return $this->_opened; - } - - /** - * Closes all open child instances. - * - * @return True if all of the opened child instances were successfully - * closed. - * - * @access public - */ - function close() - { - /* If we haven't been opened, there's nothing more to do. */ - if (!$this->_opened) { - return true; - } - - /* Attempt to close each of our children. */ - $closed = true; - foreach ($this->_children as $child) { - if ($child->_opened) { - $closed &= $child->close(); - } - } - - /* Clear the opened state for consistency. */ - $this->_opened = false; - - /* If all children were closed, return success. */ - return $closed; - } - - /** - * Flushes all child instances. It is assumed that all of the children - * have been successfully opened. - * - * @return True if all of the child instances were successfully flushed. - * - * @access public - * @since Log 1.8.2 - */ - function flush() - { - /* Attempt to flush each of our children. */ - $flushed = true; - foreach ($this->_children as $child) { - $flushed &= $child->flush(); - } - - /* If all children were flushed, return success. */ - return $flushed; - } - - /** - * Sends $message and $priority to each child of this composite. If the - * appropriate children aren't already open, they will be opened here. - * - * @param mixed $message String or object containing the message - * to log. - * @param string $priority (optional) The priority of the message. - * Valid values are: PEAR_LOG_EMERG, - * PEAR_LOG_ALERT, PEAR_LOG_CRIT, - * PEAR_LOG_ERR, PEAR_LOG_WARNING, - * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and - * PEAR_LOG_DEBUG. - * - * @return boolean True if the entry is successfully logged. - * - * @access public - */ - function log($message, $priority = null) - { - /* If a priority hasn't been specified, use the default value. */ - if ($priority === null) { - $priority = $this->_priority; - } - - /* - * Abort early if the priority is above the composite handler's - * maximum logging level. - * - * XXX: Consider whether or not introducing this change would break - * backwards compatibility. Some users may be expecting composite - * handlers to pass on all events to their children regardless of - * their own priority. - */ - #if (!$this->_isMasked($priority)) { - # return false; - #} - - /* - * Iterate over all of our children. If a unopened child will respond - * to this log event, we attempt to open it immediately. The composite - * handler's opened state will be enabled as soon as the first child - * handler is successfully opened. - * - * We track an overall success state that indicates whether or not all - * of the relevant child handlers were opened and successfully logged - * the event. If one handler fails, we still attempt any remaining - * children, but we consider the overall result a failure. - */ - $success = true; - foreach ($this->_children as $child) { - /* If this child won't respond to this event, skip it. */ - if (!$child->_isMasked($priority)) { - continue; - } - - /* If this child has yet to be opened, attempt to do so now. */ - if (!$child->_opened) { - $success &= $child->open(); - - /* - * If we've successfully opened our first handler, the - * composite handler itself is considered to be opened. - */ - if (!$this->_opened && $success) { - $this->_opened = true; - } - } - - /* Finally, attempt to log the message to the child handler. */ - if ($child->_opened) { - $success &= $child->log($message, $priority); - } - } - - /* Notify the observers. */ - $this->_announce(array('priority' => $priority, 'message' => $message)); - - /* Return success if all of the open children logged the event. */ - return $success; - } - - /** - * Returns true if this is a composite. - * - * @return boolean True if this is a composite class. - * - * @access public - */ - function isComposite() - { - return true; - } - - /** - * Sets this identification string for all of this composite's children. - * - * @param string $ident The new identification string. - * - * @access public - * @since Log 1.6.7 - */ - function setIdent($ident) - { - /* Call our base class's setIdent() method. */ - parent::setIdent($ident); - - /* ... and then call setIdent() on all of our children. */ - foreach ($this->_children as $child) { - $child->setIdent($ident); - } - } - - /** - * Adds a Log instance to the list of children. - * - * @param object $child The Log instance to add. - * - * @return boolean True if the Log instance was successfully added. - * - * @access public - */ - function addChild(&$child) - { - /* Make sure this is a Log instance. */ - if (!is_a($child, 'Log')) { - return false; - } - - $this->_children[$child->_id] = $child; - - return true; - } - - /** - * Removes a Log instance from the list of children. - * - * @param object $child The Log instance to remove. - * - * @return boolean True if the Log instance was successfully removed. - * - * @access public - */ - function removeChild($child) - { - if (!is_a($child, 'Log') || !isset($this->_children[$child->_id])) { - return false; - } - - unset($this->_children[$child->_id]); - - return true; - } - -} diff --git a/_piecrust/libs/Log/Log/console.php b/_piecrust/libs/Log/Log/console.php deleted file mode 100644 index 3a735a0..0000000 --- a/_piecrust/libs/Log/Log/console.php +++ /dev/null @@ -1,208 +0,0 @@ - - * @since Log 1.1 - * @package Log - * - * @example console.php Using the console handler. - */ -class Log_console extends Log -{ - /** - * Handle to the current output stream. - * @var resource - * @access private - */ - var $_stream = STDOUT; - - /** - * Should the output be buffered or displayed immediately? - * @var string - * @access private - */ - var $_buffering = false; - - /** - * String holding the buffered output. - * @var string - * @access private - */ - var $_buffer = ''; - - /** - * String containing the format of a log line. - * @var string - * @access private - */ - var $_lineFormat = '%1$s %2$s [%3$s] %4$s'; - - /** - * String containing the timestamp format. It will be passed directly to - * strftime(). Note that the timestamp string will generated using the - * current locale. - * @var string - * @access private - */ - var $_timeFormat = '%b %d %H:%M:%S'; - - /** - * Constructs a new Log_console object. - * - * @param string $name Ignored. - * @param string $ident The identity string. - * @param array $conf The configuration array. - * @param int $level Log messages up to and including this level. - * @access public - */ - function Log_console($name, $ident = '', $conf = array(), - $level = PEAR_LOG_DEBUG) - { - $this->_id = md5(microtime()); - $this->_ident = $ident; - $this->_mask = Log::UPTO($level); - - if (!empty($conf['stream'])) { - $this->_stream = $conf['stream']; - } - - if (isset($conf['buffering'])) { - $this->_buffering = $conf['buffering']; - } - - if (!empty($conf['lineFormat'])) { - $this->_lineFormat = str_replace(array_keys($this->_formatMap), - array_values($this->_formatMap), - $conf['lineFormat']); - } - - if (!empty($conf['timeFormat'])) { - $this->_timeFormat = $conf['timeFormat']; - } - - /* - * If output buffering has been requested, we need to register a - * shutdown function that will dump the buffer upon termination. - */ - if ($this->_buffering) { - register_shutdown_function(array(&$this, '_Log_console')); - } - } - - /** - * Destructor - */ - function _Log_console() - { - $this->close(); - } - - /** - * Open the output stream. - * - * @access public - * @since Log 1.9.7 - */ - function open() - { - $this->_opened = true; - return true; - } - - /** - * Closes the output stream. - * - * This results in a call to flush(). - * - * @access public - * @since Log 1.9.0 - */ - function close() - { - $this->flush(); - $this->_opened = false; - return true; - } - - /** - * Flushes all pending ("buffered") data to the output stream. - * - * @access public - * @since Log 1.8.2 - */ - function flush() - { - /* - * If output buffering is enabled, dump the contents of the buffer to - * the output stream. - */ - if ($this->_buffering && (strlen($this->_buffer) > 0)) { - fwrite($this->_stream, $this->_buffer); - $this->_buffer = ''; - } - - if (is_resource($this->_stream)) { - return fflush($this->_stream); - } - - return false; - } - - /** - * Writes $message to the text console. Also, passes the message - * along to any Log_observer instances that are observing this Log. - * - * @param mixed $message String or object containing the message to log. - * @param string $priority The priority of the message. Valid - * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, - * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, - * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. - * @return boolean True on success or false on failure. - * @access public - */ - function log($message, $priority = null) - { - /* If a priority hasn't been specified, use the default value. */ - if ($priority === null) { - $priority = $this->_priority; - } - - /* Abort early if the priority is above the maximum logging level. */ - if (!$this->_isMasked($priority)) { - return false; - } - - /* Extract the string representation of the message. */ - $message = $this->_extractMessage($message); - - /* Build the string containing the complete log line. */ - $line = $this->_format($this->_lineFormat, - strftime($this->_timeFormat), - $priority, $message) . "\n"; - - /* - * If buffering is enabled, append this line to the output buffer. - * Otherwise, print the line to the output stream immediately. - */ - if ($this->_buffering) { - $this->_buffer .= $line; - } else { - fwrite($this->_stream, $line); - } - - /* Notify observers about this log message. */ - $this->_announce(array('priority' => $priority, 'message' => $message)); - - return true; - } - -} diff --git a/_piecrust/libs/Log/Log/daemon.php b/_piecrust/libs/Log/Log/daemon.php deleted file mode 100644 index 418173d..0000000 --- a/_piecrust/libs/Log/Log/daemon.php +++ /dev/null @@ -1,235 +0,0 @@ - - * @version $Revision: 250926 $ - * @package Log - */ -class Log_daemon extends Log -{ - /** - * Integer holding the log facility to use. - * @var string - */ - var $_name = LOG_DAEMON; - - /** - * Var holding the resource pointer to the socket - * @var resource - */ - var $_socket; - - /** - * The ip address or servername - * @see http://www.php.net/manual/en/transports.php - * @var string - */ - var $_ip = '127.0.0.1'; - - /** - * Protocol to use (tcp, udp, etc.) - * @see http://www.php.net/manual/en/transports.php - * @var string - */ - var $_proto = 'udp'; - - /** - * Port to connect to - * @var int - */ - var $_port = 514; - - /** - * Maximum message length in bytes - * @var int - */ - var $_maxsize = 4096; - - /** - * Socket timeout in seconds - * @var int - */ - var $_timeout = 1; - - - /** - * Constructs a new syslog object. - * - * @param string $name The syslog facility. - * @param string $ident The identity string. - * @param array $conf The configuration array. - * @param int $maxLevel Maximum level at which to log. - * @access public - */ - function Log_daemon($name, $ident = '', $conf = array(), - $level = PEAR_LOG_DEBUG) - { - /* Ensure we have a valid integer value for $name. */ - if (empty($name) || !is_int($name)) { - $name = LOG_SYSLOG; - } - - $this->_id = md5(microtime()); - $this->_name = $name; - $this->_ident = $ident; - $this->_mask = Log::UPTO($level); - - if (isset($conf['ip'])) { - $this->_ip = $conf['ip']; - } - if (isset($conf['proto'])) { - $this->_proto = $conf['proto']; - } - if (isset($conf['port'])) { - $this->_port = $conf['port']; - } - if (isset($conf['maxsize'])) { - $this->_maxsize = $conf['maxsize']; - } - if (isset($conf['timeout'])) { - $this->_timeout = $conf['timeout']; - } - $this->_proto = $this->_proto . '://'; - - register_shutdown_function(array(&$this, '_Log_daemon')); - } - - /** - * Destructor. - * - * @access private - */ - function _Log_daemon() - { - $this->close(); - } - - /** - * Opens a connection to the system logger, if it has not already - * been opened. This is implicitly called by log(), if necessary. - * @access public - */ - function open() - { - if (!$this->_opened) { - $this->_opened = (bool)($this->_socket = @fsockopen( - $this->_proto . $this->_ip, - $this->_port, - $errno, - $errstr, - $this->_timeout)); - } - return $this->_opened; - } - - /** - * Closes the connection to the system logger, if it is open. - * @access public - */ - function close() - { - if ($this->_opened) { - $this->_opened = false; - return fclose($this->_socket); - } - return true; - } - - /** - * Sends $message to the currently open syslog connection. Calls - * open() if necessary. Also passes the message along to any Log_observer - * instances that are observing this Log. - * - * @param string $message The textual message to be logged. - * @param int $priority (optional) The priority of the message. Valid - * values are: LOG_EMERG, LOG_ALERT, LOG_CRIT, - * LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, - * and LOG_DEBUG. The default is LOG_INFO. - * @access public - */ - function log($message, $priority = null) - { - /* If a priority hasn't been specified, use the default value. */ - if ($priority === null) { - $priority = $this->_priority; - } - - /* Abort early if the priority is above the maximum logging level. */ - if (!$this->_isMasked($priority)) { - return false; - } - - /* If the connection isn't open and can't be opened, return failure. */ - if (!$this->_opened && !$this->open()) { - return false; - } - - /* Extract the string representation of the message. */ - $message = $this->_extractMessage($message); - - /* Set the facility level. */ - $facility_level = intval($this->_name) + - intval($this->_toSyslog($priority)); - - /* Prepend ident info. */ - if (!empty($this->_ident)) { - $message = $this->_ident . ' ' . $message; - } - - /* Check for message length. */ - if (strlen($message) > $this->_maxsize) { - $message = substr($message, 0, ($this->_maxsize) - 10) . ' [...]'; - } - - /* Write to socket. */ - fwrite($this->_socket, '<' . $facility_level . '>' . $message . "\n"); - - $this->_announce(array('priority' => $priority, 'message' => $message)); - } - - /** - * Converts a PEAR_LOG_* constant into a syslog LOG_* constant. - * - * This function exists because, under Windows, not all of the LOG_* - * constants have unique values. Instead, the PEAR_LOG_* were introduced - * for global use, with the conversion to the LOG_* constants kept local to - * to the syslog driver. - * - * @param int $priority PEAR_LOG_* value to convert to LOG_* value. - * - * @return The LOG_* representation of $priority. - * - * @access private - */ - function _toSyslog($priority) - { - static $priorities = array( - PEAR_LOG_EMERG => LOG_EMERG, - PEAR_LOG_ALERT => LOG_ALERT, - PEAR_LOG_CRIT => LOG_CRIT, - PEAR_LOG_ERR => LOG_ERR, - PEAR_LOG_WARNING => LOG_WARNING, - PEAR_LOG_NOTICE => LOG_NOTICE, - PEAR_LOG_INFO => LOG_INFO, - PEAR_LOG_DEBUG => LOG_DEBUG - ); - - /* If we're passed an unknown priority, default to LOG_INFO. */ - if (!is_int($priority) || !in_array($priority, $priorities)) { - return LOG_INFO; - } - - return $priorities[$priority]; - } - -} diff --git a/_piecrust/libs/Log/Log/display.php b/_piecrust/libs/Log/Log/display.php deleted file mode 100644 index 633f373..0000000 --- a/_piecrust/libs/Log/Log/display.php +++ /dev/null @@ -1,181 +0,0 @@ - - * @since Log 1.8.0 - * @package Log - * - * @example display.php Using the display handler. - */ -class Log_display extends Log -{ - /** - * String containing the format of a log line. - * @var string - * @access private - */ - var $_lineFormat = '%3$s: %4$s'; - - /** - * String containing the timestamp format. It will be passed directly to - * strftime(). Note that the timestamp string will generated using the - * current locale. - * @var string - * @access private - */ - var $_timeFormat = '%b %d %H:%M:%S'; - - /** - * Flag indicating whether raw message text should be passed directly to - * the log system. Otherwise, the text will be converted to an HTML-safe - * representation. - * @var boolean - * @access private - */ - var $_rawText = false; - - /** - * Constructs a new Log_display object. - * - * @param string $name Ignored. - * @param string $ident The identity string. - * @param array $conf The configuration array. - * @param int $level Log messages up to and including this level. - * @access public - */ - function Log_display($name = '', $ident = '', $conf = array(), - $level = PEAR_LOG_DEBUG) - { - $this->_id = md5(microtime()); - $this->_ident = $ident; - $this->_mask = Log::UPTO($level); - - /* Start by configuring the line format. */ - if (!empty($conf['lineFormat'])) { - $this->_lineFormat = str_replace(array_keys($this->_formatMap), - array_values($this->_formatMap), - $conf['lineFormat']); - } - - /* We may need to prepend a string to our line format. */ - $prepend = null; - if (isset($conf['error_prepend'])) { - $prepend = $conf['error_prepend']; - } else { - $prepend = ini_get('error_prepend_string'); - } - if (!empty($prepend)) { - $this->_lineFormat = $prepend . $this->_lineFormat; - } - - /* We may also need to append a string to our line format. */ - $append = null; - if (isset($conf['error_append'])) { - $append = $conf['error_append']; - } else { - $append = ini_get('error_append_string'); - } - if (!empty($append)) { - $this->_lineFormat .= $append; - } - - /* Lastly, the line ending sequence is also configurable. */ - if (isset($conf['linebreak'])) { - $this->_lineFormat .= $conf['linebreak']; - } else { - $this->_lineFormat .= "
        \n"; - } - - /* The user can also change the time format. */ - if (!empty($conf['timeFormat'])) { - $this->_timeFormat = $conf['timeFormat']; - } - - /* Message text conversion can be disabled. */ - if (isset($conf['rawText'])) { - $this->_rawText = $conf['rawText']; - } - } - - /** - * Opens the display handler. - * - * @access public - * @since Log 1.9.6 - */ - function open() - { - $this->_opened = true; - return true; - } - - /** - * Closes the display handler. - * - * @access public - * @since Log 1.9.6 - */ - function close() - { - $this->_opened = false; - return true; - } - - /** - * Writes $message to the text browser. Also, passes the message - * along to any Log_observer instances that are observing this Log. - * - * @param mixed $message String or object containing the message to log. - * @param string $priority The priority of the message. Valid - * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, - * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, - * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. - * @return boolean True on success or false on failure. - * @access public - */ - function log($message, $priority = null) - { - /* If a priority hasn't been specified, use the default value. */ - if ($priority === null) { - $priority = $this->_priority; - } - - /* Abort early if the priority is above the maximum logging level. */ - if (!$this->_isMasked($priority)) { - return false; - } - - /* Extract the string representation of the message. */ - $message = $this->_extractMessage($message); - - /* Convert the message to an HTML-friendly represention unless raw - * text has been requested. */ - if ($this->_rawText === false) { - $message = nl2br(htmlspecialchars($message)); - } - - /* Build and output the complete log line. */ - echo $this->_format($this->_lineFormat, - strftime($this->_timeFormat), - $priority, - $message); - - /* Notify observers about this log message. */ - $this->_announce(array('priority' => $priority, 'message' => $message)); - - return true; - } - -} diff --git a/_piecrust/libs/Log/Log/error_log.php b/_piecrust/libs/Log/Log/error_log.php deleted file mode 100644 index 05faf87..0000000 --- a/_piecrust/libs/Log/Log/error_log.php +++ /dev/null @@ -1,160 +0,0 @@ - - * @since Log 1.7.0 - * @package Log - * - * @example error_log.php Using the error_log handler. - */ -class Log_error_log extends Log -{ - /** - * The error_log() log type. - * @var integer - * @access private - */ - var $_type = PEAR_LOG_TYPE_SYSTEM; - - /** - * The type-specific destination value. - * @var string - * @access private - */ - var $_destination = ''; - - /** - * Additional headers to pass to the mail() function when the - * PEAR_LOG_TYPE_MAIL type is used. - * @var string - * @access private - */ - var $_extra_headers = ''; - - /** - * String containing the format of a log line. - * @var string - * @access private - */ - var $_lineFormat = '%2$s: %4$s'; - - /** - * String containing the timestamp format. It will be passed directly to - * strftime(). Note that the timestamp string will generated using the - * current locale. - * @var string - * @access private - */ - var $_timeFormat = '%b %d %H:%M:%S'; - - /** - * Constructs a new Log_error_log object. - * - * @param string $name One of the PEAR_LOG_TYPE_* constants. - * @param string $ident The identity string. - * @param array $conf The configuration array. - * @param int $level Log messages up to and including this level. - * @access public - */ - function Log_error_log($name, $ident = '', $conf = array(), - $level = PEAR_LOG_DEBUG) - { - $this->_id = md5(microtime()); - $this->_type = $name; - $this->_ident = $ident; - $this->_mask = Log::UPTO($level); - - if (!empty($conf['destination'])) { - $this->_destination = $conf['destination']; - } - - if (!empty($conf['extra_headers'])) { - $this->_extra_headers = $conf['extra_headers']; - } - - if (!empty($conf['lineFormat'])) { - $this->_lineFormat = str_replace(array_keys($this->_formatMap), - array_values($this->_formatMap), - $conf['lineFormat']); - } - - if (!empty($conf['timeFormat'])) { - $this->_timeFormat = $conf['timeFormat']; - } - } - - /** - * Opens the handler. - * - * @access public - * @since Log 1.9.6 - */ - function open() - { - $this->_opened = true; - return true; - } - - /** - * Closes the handler. - * - * @access public - * @since Log 1.9.6 - */ - function close() - { - $this->_opened = false; - return true; - } - - /** - * Logs $message using PHP's error_log() function. The message is also - * passed along to any Log_observer instances that are observing this Log. - * - * @param mixed $message String or object containing the message to log. - * @param string $priority The priority of the message. Valid - * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, - * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, - * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. - * @return boolean True on success or false on failure. - * @access public - */ - function log($message, $priority = null) - { - /* If a priority hasn't been specified, use the default value. */ - if ($priority === null) { - $priority = $this->_priority; - } - - /* Abort early if the priority is above the maximum logging level. */ - if (!$this->_isMasked($priority)) { - return false; - } - - /* Extract the string representation of the message. */ - $message = $this->_extractMessage($message); - - /* Build the string containing the complete log line. */ - $line = $this->_format($this->_lineFormat, - strftime($this->_timeFormat), - $priority, $message); - - /* Pass the log line and parameters to the error_log() function. */ - $success = error_log($line, $this->_type, $this->_destination, - $this->_extra_headers); - - $this->_announce(array('priority' => $priority, 'message' => $message)); - - return $success; - } - -} diff --git a/_piecrust/libs/Log/Log/file.php b/_piecrust/libs/Log/Log/file.php deleted file mode 100644 index 9e84eb3..0000000 --- a/_piecrust/libs/Log/Log/file.php +++ /dev/null @@ -1,316 +0,0 @@ - - * @author Roman Neuhauser - * @since Log 1.0 - * @package Log - * - * @example file.php Using the file handler. - */ -class Log_file extends Log -{ - /** - * String containing the name of the log file. - * @var string - * @access private - */ - var $_filename = 'php.log'; - - /** - * Handle to the log file. - * @var resource - * @access private - */ - var $_fp = false; - - /** - * Should new log entries be append to an existing log file, or should the - * a new log file overwrite an existing one? - * @var boolean - * @access private - */ - var $_append = true; - - /** - * Should advisory file locking (i.e., flock()) be used? - * @var boolean - * @access private - */ - var $_locking = false; - - /** - * Integer (in octal) containing the log file's permissions mode. - * @var integer - * @access private - */ - var $_mode = 0644; - - /** - * Integer (in octal) specifying the file permission mode that will be - * used when creating directories that do not already exist. - * @var integer - * @access private - */ - var $_dirmode = 0755; - - /** - * String containing the format of a log line. - * @var string - * @access private - */ - var $_lineFormat = '%1$s %2$s [%3$s] %4$s'; - - /** - * String containing the timestamp format. It will be passed directly to - * strftime(). Note that the timestamp string will generated using the - * current locale. - * @var string - * @access private - */ - var $_timeFormat = '%b %d %H:%M:%S'; - - /** - * String containing the end-on-line character sequence. - * @var string - * @access private - */ - var $_eol = "\n"; - - /** - * Constructs a new Log_file object. - * - * @param string $name Ignored. - * @param string $ident The identity string. - * @param array $conf The configuration array. - * @param int $level Log messages up to and including this level. - * @access public - */ - function Log_file($name, $ident = '', $conf = array(), - $level = PEAR_LOG_DEBUG) - { - $this->_id = md5(microtime()); - $this->_filename = $name; - $this->_ident = $ident; - $this->_mask = Log::UPTO($level); - - if (isset($conf['append'])) { - $this->_append = $conf['append']; - } - - if (isset($conf['locking'])) { - $this->_locking = $conf['locking']; - } - - if (!empty($conf['mode'])) { - if (is_string($conf['mode'])) { - $this->_mode = octdec($conf['mode']); - } else { - $this->_mode = $conf['mode']; - } - } - - if (!empty($conf['dirmode'])) { - if (is_string($conf['dirmode'])) { - $this->_dirmode = octdec($conf['dirmode']); - } else { - $this->_dirmode = $conf['dirmode']; - } - } - - if (!empty($conf['lineFormat'])) { - $this->_lineFormat = str_replace(array_keys($this->_formatMap), - array_values($this->_formatMap), - $conf['lineFormat']); - } - - if (!empty($conf['timeFormat'])) { - $this->_timeFormat = $conf['timeFormat']; - } - - if (!empty($conf['eol'])) { - $this->_eol = $conf['eol']; - } else { - $this->_eol = (strstr(PHP_OS, 'WIN')) ? "\r\n" : "\n"; - } - - register_shutdown_function(array(&$this, '_Log_file')); - } - - /** - * Destructor - */ - function _Log_file() - { - if ($this->_opened) { - $this->close(); - } - } - - /** - * Creates the given directory path. If the parent directories don't - * already exist, they will be created, too. - * - * This implementation is inspired by Python's os.makedirs function. - * - * @param string $path The full directory path to create. - * @param integer $mode The permissions mode with which the - * directories will be created. - * - * @return True if the full path is successfully created or already - * exists. - * - * @access private - */ - function _mkpath($path, $mode = 0700) - { - /* Separate the last pathname component from the rest of the path. */ - $head = dirname($path); - $tail = basename($path); - - /* Make sure we've split the path into two complete components. */ - if (empty($tail)) { - $head = dirname($path); - $tail = basename($path); - } - - /* Recurse up the path if our current segment does not exist. */ - if (!empty($head) && !empty($tail) && !is_dir($head)) { - $this->_mkpath($head, $mode); - } - - /* Create this segment of the path. */ - return @mkdir($head, $mode); - } - - /** - * Opens the log file for output. If the specified log file does not - * already exist, it will be created. By default, new log entries are - * appended to the end of the log file. - * - * This is implicitly called by log(), if necessary. - * - * @access public - */ - function open() - { - if (!$this->_opened) { - /* If the log file's directory doesn't exist, create it. */ - if (!is_dir(dirname($this->_filename))) { - $this->_mkpath($this->_filename, $this->_dirmode); - } - - /* Determine whether the log file needs to be created. */ - $creating = !file_exists($this->_filename); - - /* Obtain a handle to the log file. */ - $this->_fp = fopen($this->_filename, ($this->_append) ? 'a' : 'w'); - - /* We consider the file "opened" if we have a valid file pointer. */ - $this->_opened = ($this->_fp !== false); - - /* Attempt to set the file's permissions if we just created it. */ - if ($creating && $this->_opened) { - chmod($this->_filename, $this->_mode); - } - } - - return $this->_opened; - } - - /** - * Closes the log file if it is open. - * - * @access public - */ - function close() - { - /* If the log file is open, close it. */ - if ($this->_opened && fclose($this->_fp)) { - $this->_opened = false; - } - - return ($this->_opened === false); - } - - /** - * Flushes all pending data to the file handle. - * - * @access public - * @since Log 1.8.2 - */ - function flush() - { - if (is_resource($this->_fp)) { - return fflush($this->_fp); - } - - return false; - } - - /** - * Logs $message to the output window. The message is also passed along - * to any Log_observer instances that are observing this Log. - * - * @param mixed $message String or object containing the message to log. - * @param string $priority The priority of the message. Valid - * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, - * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, - * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. - * @return boolean True on success or false on failure. - * @access public - */ - function log($message, $priority = null) - { - /* If a priority hasn't been specified, use the default value. */ - if ($priority === null) { - $priority = $this->_priority; - } - - /* Abort early if the priority is above the maximum logging level. */ - if (!$this->_isMasked($priority)) { - return false; - } - - /* If the log file isn't already open, open it now. */ - if (!$this->_opened && !$this->open()) { - return false; - } - - /* Extract the string representation of the message. */ - $message = $this->_extractMessage($message); - - /* Build the string containing the complete log line. */ - $line = $this->_format($this->_lineFormat, - strftime($this->_timeFormat), - $priority, $message) . $this->_eol; - - /* If locking is enabled, acquire an exclusive lock on the file. */ - if ($this->_locking) { - flock($this->_fp, LOCK_EX); - } - - /* Write the log line to the log file. */ - $success = (fwrite($this->_fp, $line) !== false); - - /* Unlock the file now that we're finished writing to it. */ - if ($this->_locking) { - flock($this->_fp, LOCK_UN); - } - - /* Notify observers about this log message. */ - $this->_announce(array('priority' => $priority, 'message' => $message)); - - return $success; - } - -} diff --git a/_piecrust/libs/Log/Log/firebug.php b/_piecrust/libs/Log/Log/firebug.php deleted file mode 100644 index f820ac2..0000000 --- a/_piecrust/libs/Log/Log/firebug.php +++ /dev/null @@ -1,207 +0,0 @@ - - * @since Log 1.9.11 - * @package Log - * - * @example firebug.php Using the firebug handler. - */ -class Log_firebug extends Log -{ - /** - * Should the output be buffered or displayed immediately? - * @var string - * @access private - */ - var $_buffering = false; - - /** - * String holding the buffered output. - * @var string - * @access private - */ - var $_buffer = array(); - - /** - * String containing the format of a log line. - * @var string - * @access private - */ - var $_lineFormat = '%2$s [%3$s] %4$s'; - - /** - * String containing the timestamp format. It will be passed directly to - * strftime(). Note that the timestamp string will generated using the - * current locale. - * - * Note! Default lineFormat of this driver does not display time. - * - * @var string - * @access private - */ - var $_timeFormat = '%b %d %H:%M:%S'; - - /** - * Mapping of log priorities to Firebug methods. - * @var array - * @access private - */ - var $_methods = array( - PEAR_LOG_EMERG => 'error', - PEAR_LOG_ALERT => 'error', - PEAR_LOG_CRIT => 'error', - PEAR_LOG_ERR => 'error', - PEAR_LOG_WARNING => 'warn', - PEAR_LOG_NOTICE => 'info', - PEAR_LOG_INFO => 'info', - PEAR_LOG_DEBUG => 'debug' - ); - - /** - * Constructs a new Log_firebug object. - * - * @param string $name Ignored. - * @param string $ident The identity string. - * @param array $conf The configuration array. - * @param int $level Log messages up to and including this level. - * @access public - */ - function Log_firebug($name = '', $ident = 'PHP', $conf = array(), - $level = PEAR_LOG_DEBUG) - { - $this->_id = md5(microtime()); - $this->_ident = $ident; - $this->_mask = Log::UPTO($level); - if (isset($conf['buffering'])) { - $this->_buffering = $conf['buffering']; - } - - if ($this->_buffering) { - register_shutdown_function(array(&$this, '_Log_firebug')); - } - - if (!empty($conf['lineFormat'])) { - $this->_lineFormat = str_replace(array_keys($this->_formatMap), - array_values($this->_formatMap), - $conf['lineFormat']); - } - - if (!empty($conf['timeFormat'])) { - $this->_timeFormat = $conf['timeFormat']; - } - } - - /** - * Opens the firebug handler. - * - * @access public - */ - function open() - { - $this->_opened = true; - return true; - } - - /** - * Destructor - */ - function _Log_firebug() - { - $this->close(); - } - - /** - * Closes the firebug handler. - * - * @access public - */ - function close() - { - $this->flush(); - $this->_opened = false; - return true; - } - - /** - * Flushes all pending ("buffered") data. - * - * @access public - */ - function flush() { - if (count($this->_buffer)) { - print '\n"; - }; - $this->_buffer = array(); - } - - /** - * Writes $message to Firebug console. Also, passes the message - * along to any Log_observer instances that are observing this Log. - * - * @param mixed $message String or object containing the message to log. - * @param string $priority The priority of the message. Valid - * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, - * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, - * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. - * @return boolean True on success or false on failure. - * @access public - */ - function log($message, $priority = null) - { - /* If a priority hasn't been specified, use the default value. */ - if ($priority === null) { - $priority = $this->_priority; - } - - /* Abort early if the priority is above the maximum logging level. */ - if (!$this->_isMasked($priority)) { - return false; - } - - /* Extract the string representation of the message. */ - $message = $this->_extractMessage($message); - $method = $this->_methods[$priority]; - - /* normalize line breaks and escape quotes*/ - $message = preg_replace("/\r?\n/", "\\n", addslashes($message)); - - /* Build the string containing the complete log line. */ - $line = $this->_format($this->_lineFormat, - strftime($this->_timeFormat), - $priority, - $message); - - if ($this->_buffering) { - $this->_buffer[] = sprintf('console.%s("%s");', $method, $line); - } else { - print '\n"; - } - /* Notify observers about this log message. */ - $this->_announce(array('priority' => $priority, 'message' => $message)); - - return true; - } -} diff --git a/_piecrust/libs/Log/Log/mail.php b/_piecrust/libs/Log/Log/mail.php deleted file mode 100644 index 9f0b29c..0000000 --- a/_piecrust/libs/Log/Log/mail.php +++ /dev/null @@ -1,294 +0,0 @@ - - * @author Jon Parise - * @since Log 1.3 - * @package Log - * - * @example mail.php Using the mail handler. - */ -class Log_mail extends Log -{ - /** - * String holding the recipients' email addresses. Multiple addresses - * should be separated with commas. - * @var string - * @access private - */ - var $_recipients = ''; - - /** - * String holding the sender's email address. - * @var string - * @access private - */ - var $_from = ''; - - /** - * String holding the email's subject. - * @var string - * @access private - */ - var $_subject = '[Log_mail] Log message'; - - /** - * String holding an optional preamble for the log messages. - * @var string - * @access private - */ - var $_preamble = ''; - - /** - * String containing the format of a log line. - * @var string - * @access private - */ - var $_lineFormat = '%1$s %2$s [%3$s] %4$s'; - - /** - * String containing the timestamp format. It will be passed directly to - * strftime(). Note that the timestamp string will generated using the - * current locale. - * @var string - * @access private - */ - var $_timeFormat = '%b %d %H:%M:%S'; - - /** - * String holding the mail message body. - * @var string - * @access private - */ - var $_message = ''; - - /** - * Flag used to indicated that log lines have been written to the message - * body and the message should be sent on close(). - * @var boolean - * @access private - */ - var $_shouldSend = false; - - /** - * String holding the backend name of PEAR::Mail - * @var string - * @access private - */ - var $_mailBackend = ''; - - /** - * Array holding the params for PEAR::Mail - * @var array - * @access private - */ - var $_mailParams = array(); - - /** - * Constructs a new Log_mail object. - * - * Here is how you can customize the mail driver with the conf[] hash : - * $conf['from']: the mail's "From" header line, - * $conf['subject']: the mail's "Subject" line. - * $conf['mailBackend']: backend name of PEAR::Mail - * $conf['mailParams']: parameters for the PEAR::Mail backend - * - * @param string $name The message's recipients. - * @param string $ident The identity string. - * @param array $conf The configuration array. - * @param int $level Log messages up to and including this level. - * @access public - */ - function Log_mail($name, $ident = '', $conf = array(), - $level = PEAR_LOG_DEBUG) - { - $this->_id = md5(microtime()); - $this->_recipients = $name; - $this->_ident = $ident; - $this->_mask = Log::UPTO($level); - - if (!empty($conf['from'])) { - $this->_from = $conf['from']; - } else { - $this->_from = ini_get('sendmail_from'); - } - - if (!empty($conf['subject'])) { - $this->_subject = $conf['subject']; - } - - if (!empty($conf['preamble'])) { - $this->_preamble = $conf['preamble']; - } - - if (!empty($conf['lineFormat'])) { - $this->_lineFormat = str_replace(array_keys($this->_formatMap), - array_values($this->_formatMap), - $conf['lineFormat']); - } - - if (!empty($conf['timeFormat'])) { - $this->_timeFormat = $conf['timeFormat']; - } - - if (!empty($conf['mailBackend'])) { - $this->_mailBackend = $conf['mailBackend']; - } - - if (!empty($conf['mailParams'])) { - $this->_mailParams = $conf['mailParams']; - } - - /* register the destructor */ - register_shutdown_function(array(&$this, '_Log_mail')); - } - - /** - * Destructor. Calls close(). - * - * @access private - */ - function _Log_mail() - { - $this->close(); - } - - /** - * Starts a new mail message. - * This is implicitly called by log(), if necessary. - * - * @access public - */ - function open() - { - if (!$this->_opened) { - if (!empty($this->_preamble)) { - $this->_message = $this->_preamble . "\r\n\r\n"; - } - $this->_opened = true; - $_shouldSend = false; - } - - return $this->_opened; - } - - /** - * Closes the message, if it is open, and sends the mail. - * This is implicitly called by the destructor, if necessary. - * - * @access public - */ - function close() - { - if ($this->_opened) { - if ($this->_shouldSend && !empty($this->_message)) { - if ($this->_mailBackend === '') { // use mail() - $headers = "From: $this->_from\r\n"; - $headers .= 'User-Agent: PEAR Log Package'; - if (mail($this->_recipients, $this->_subject, - $this->_message, $headers) == false) { - return false; - } - } else { // use PEAR::Mail - include_once 'Mail.php'; - $headers = array('From' => $this->_from, - 'To' => $this->_recipients, - 'User-Agent' => 'PEAR Log Package', - 'Subject' => $this->_subject); - $mailer = &Mail::factory($this->_mailBackend, - $this->_mailParams); - $res = $mailer->send($this->_recipients, $headers, - $this->_message); - if (PEAR::isError($res)) { - return false; - } - } - - /* Clear the message string now that the email has been sent. */ - $this->_message = ''; - $this->_shouldSend = false; - } - $this->_opened = false; - } - - return ($this->_opened === false); - } - - /** - * Flushes the log output by forcing the email message to be sent now. - * Events that are logged after flush() is called will be appended to a - * new email message. - * - * @access public - * @since Log 1.8.2 - */ - function flush() - { - /* - * It's sufficient to simply call close() to flush the output. - * The next call to log() will cause the handler to be reopened. - */ - return $this->close(); - } - - /** - * Writes $message to the currently open mail message. - * Calls open(), if necessary. - * - * @param mixed $message String or object containing the message to log. - * @param string $priority The priority of the message. Valid - * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, - * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, - * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. - * @return boolean True on success or false on failure. - * @access public - */ - function log($message, $priority = null) - { - /* If a priority hasn't been specified, use the default value. */ - if ($priority === null) { - $priority = $this->_priority; - } - - /* Abort early if the priority is above the maximum logging level. */ - if (!$this->_isMasked($priority)) { - return false; - } - - /* If the message isn't open and can't be opened, return failure. */ - if (!$this->_opened && !$this->open()) { - return false; - } - - /* Extract the string representation of the message. */ - $message = $this->_extractMessage($message); - - /* Append the string containing the complete log line. */ - $this->_message .= $this->_format($this->_lineFormat, - strftime($this->_timeFormat), - $priority, $message) . "\r\n"; - $this->_shouldSend = true; - - /* Notify observers about this log message. */ - $this->_announce(array('priority' => $priority, 'message' => $message)); - - return true; - } -} diff --git a/_piecrust/libs/Log/Log/mcal.php b/_piecrust/libs/Log/Log/mcal.php deleted file mode 100644 index 76788d0..0000000 --- a/_piecrust/libs/Log/Log/mcal.php +++ /dev/null @@ -1,170 +0,0 @@ - - * @since Horde 1.3 - * @since Log 1.0 - * @package Log - */ -class Log_mcal extends Log -{ - /** - * holding the calendar specification to connect to. - * @var string - * @access private - */ - var $_calendar = '{localhost/mstore}'; - - /** - * holding the username to use. - * @var string - * @access private - */ - var $_username = ''; - - /** - * holding the password to use. - * @var string - * @access private - */ - var $_password = ''; - - /** - * holding the options to pass to the calendar stream. - * @var integer - * @access private - */ - var $_options = 0; - - /** - * ResourceID of the MCAL stream. - * @var string - * @access private - */ - var $_stream = ''; - - /** - * Integer holding the log facility to use. - * @var string - * @access private - */ - var $_name = LOG_SYSLOG; - - - /** - * Constructs a new Log_mcal object. - * - * @param string $name The category to use for our events. - * @param string $ident The identity string. - * @param array $conf The configuration array. - * @param int $level Log messages up to and including this level. - * @access public - */ - function Log_mcal($name, $ident = '', $conf = array(), - $level = PEAR_LOG_DEBUG) - { - $this->_id = md5(microtime()); - $this->_name = $name; - $this->_ident = $ident; - $this->_mask = Log::UPTO($level); - $this->_calendar = $conf['calendar']; - $this->_username = $conf['username']; - $this->_password = $conf['password']; - $this->_options = $conf['options']; - } - - /** - * Opens a calendar stream, if it has not already been - * opened. This is implicitly called by log(), if necessary. - * @access public - */ - function open() - { - if (!$this->_opened) { - $this->_stream = mcal_open($this->_calendar, $this->_username, - $this->_password, $this->_options); - $this->_opened = true; - } - - return $this->_opened; - } - - /** - * Closes the calendar stream, if it is open. - * @access public - */ - function close() - { - if ($this->_opened) { - mcal_close($this->_stream); - $this->_opened = false; - } - - return ($this->_opened === false); - } - - /** - * Logs $message and associated information to the currently open - * calendar stream. Calls open() if necessary. Also passes the - * message along to any Log_observer instances that are observing - * this Log. - * - * @param mixed $message String or object containing the message to log. - * @param string $priority The priority of the message. Valid - * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, - * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, - * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. - * @return boolean True on success or false on failure. - * @access public - */ - function log($message, $priority = null) - { - /* If a priority hasn't been specified, use the default value. */ - if ($priority === null) { - $priority = $this->_priority; - } - - /* Abort early if the priority is above the maximum logging level. */ - if (!$this->_isMasked($priority)) { - return false; - } - - /* If the connection isn't open and can't be opened, return failure. */ - if (!$this->_opened && !$this->open()) { - return false; - } - - /* Extract the string representation of the message. */ - $message = $this->_extractMessage($message); - - $date_str = date('Y:n:j:G:i:s'); - $dates = explode(':', $date_str); - - mcal_event_init($this->_stream); - mcal_event_set_title($this->_stream, $this->_ident); - mcal_event_set_category($this->_stream, $this->_name); - mcal_event_set_description($this->_stream, $message); - mcal_event_add_attribute($this->_stream, 'priority', $priority); - mcal_event_set_start($this->_stream, $dates[0], $dates[1], $dates[2], - $dates[3], $dates[4], $dates[5]); - mcal_event_set_end($this->_stream, $dates[0], $dates[1], $dates[2], - $dates[3], $dates[4], $dates[5]); - mcal_append_event($this->_stream); - - $this->_announce(array('priority' => $priority, 'message' => $message)); - - return true; - } - -} diff --git a/_piecrust/libs/Log/Log/mdb2.php b/_piecrust/libs/Log/Log/mdb2.php deleted file mode 100644 index 6d0a9e4..0000000 --- a/_piecrust/libs/Log/Log/mdb2.php +++ /dev/null @@ -1,358 +0,0 @@ - - * @author Jon Parise - * @since Log 1.9.0 - * @package Log - */ -class Log_mdb2 extends Log -{ - /** - * Variable containing the DSN information. - * @var mixed - * @access private - */ - var $_dsn = ''; - - /** - * Array containing our set of DB configuration options. - * @var array - * @access private - */ - var $_options = array('persistent' => true); - - /** - * Object holding the database handle. - * @var object - * @access private - */ - var $_db = null; - - /** - * Resource holding the prepared statement handle. - * @var resource - * @access private - */ - var $_statement = null; - - /** - * Flag indicating that we're using an existing database connection. - * @var boolean - * @access private - */ - var $_existingConnection = false; - - /** - * String holding the database table to use. - * @var string - * @access private - */ - var $_table = 'log_table'; - - /** - * String holding the name of the ID sequence. - * @var string - * @access private - */ - var $_sequence = 'log_id'; - - /** - * Maximum length of the $ident string. This corresponds to the size of - * the 'ident' column in the SQL table. - * @var integer - * @access private - */ - var $_identLimit = 16; - - /** - * Set of field types used in the database table. - * @var array - * @access private - */ - var $_types = array( - 'id' => 'integer', - 'logtime' => 'timestamp', - 'ident' => 'text', - 'priority' => 'text', - 'message' => 'clob' - ); - - /** - * Constructs a new sql logging object. - * - * @param string $name The target SQL table. - * @param string $ident The identification field. - * @param array $conf The connection configuration array. - * @param int $level Log messages up to and including this level. - * @access public - */ - function Log_mdb2($name, $ident = '', $conf = array(), - $level = PEAR_LOG_DEBUG) - { - $this->_id = md5(microtime()); - $this->_table = $name; - $this->_mask = Log::UPTO($level); - - /* If an options array was provided, use it. */ - if (isset($conf['options']) && is_array($conf['options'])) { - $this->_options = $conf['options']; - } - - /* If a specific sequence name was provided, use it. */ - if (!empty($conf['sequence'])) { - $this->_sequence = $conf['sequence']; - } - - /* If a specific sequence name was provided, use it. */ - if (isset($conf['identLimit'])) { - $this->_identLimit = $conf['identLimit']; - } - - /* Now that the ident limit is confirmed, set the ident string. */ - $this->setIdent($ident); - - /* If an existing database connection was provided, use it. */ - if (isset($conf['db'])) { - $this->_db = &$conf['db']; - $this->_existingConnection = true; - $this->_opened = true; - } elseif (isset($conf['singleton'])) { - $this->_db = &MDB2::singleton($conf['singleton'], $this->_options); - $this->_existingConnection = true; - $this->_opened = true; - } else { - $this->_dsn = $conf['dsn']; - } - } - - /** - * Opens a connection to the database, if it has not already - * been opened. This is implicitly called by log(), if necessary. - * - * @return boolean True on success, false on failure. - * @access public - */ - function open() - { - if (!$this->_opened) { - /* Use the DSN and options to create a database connection. */ - $this->_db = &MDB2::connect($this->_dsn, $this->_options); - if (PEAR::isError($this->_db)) { - return false; - } - - /* Create a prepared statement for repeated use in log(). */ - if (!$this->_prepareStatement()) { - return false; - } - - /* We now consider out connection open. */ - $this->_opened = true; - } - - return $this->_opened; - } - - /** - * Closes the connection to the database if it is still open and we were - * the ones that opened it. It is the caller's responsible to close an - * existing connection that was passed to us via $conf['db']. - * - * @return boolean True on success, false on failure. - * @access public - */ - function close() - { - /* If we have a statement object, free it. */ - if (is_object($this->_statement)) { - $this->_statement->free(); - $this->_statement = null; - } - - /* If we opened the database connection, disconnect it. */ - if ($this->_opened && !$this->_existingConnection) { - $this->_opened = false; - return $this->_db->disconnect(); - } - - return ($this->_opened === false); - } - - /** - * Sets this Log instance's identification string. Note that this - * SQL-specific implementation will limit the length of the $ident string - * to sixteen (16) characters. - * - * @param string $ident The new identification string. - * - * @access public - * @since Log 1.8.5 - */ - function setIdent($ident) - { - $this->_ident = substr($ident, 0, $this->_identLimit); - } - - /** - * Inserts $message to the currently open database. Calls open(), - * if necessary. Also passes the message along to any Log_observer - * instances that are observing this Log. - * - * @param mixed $message String or object containing the message to log. - * @param string $priority The priority of the message. Valid - * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, - * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, - * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. - * @return boolean True on success or false on failure. - * @access public - */ - function log($message, $priority = null) - { - /* If a priority hasn't been specified, use the default value. */ - if ($priority === null) { - $priority = $this->_priority; - } - - /* Abort early if the priority is above the maximum logging level. */ - if (!$this->_isMasked($priority)) { - return false; - } - - /* If the connection isn't open and can't be opened, return failure. */ - if (!$this->_opened && !$this->open()) { - return false; - } - - /* If we don't already have a statement object, create one. */ - if (!is_object($this->_statement) && !$this->_prepareStatement()) { - return false; - } - - /* Extract the string representation of the message. */ - $message = $this->_extractMessage($message); - - /* Build our set of values for this log entry. */ - $values = array( - 'id' => $this->_db->nextId($this->_sequence), - 'logtime' => MDB2_Date::mdbNow(), - 'ident' => $this->_ident, - 'priority' => $priority, - 'message' => $message - ); - - /* Execute the SQL query for this log entry insertion. */ - $this->_db->expectError(MDB2_ERROR_NOSUCHTABLE); - $result = &$this->_statement->execute($values); - $this->_db->popExpect(); - - /* Attempt to handle any errors. */ - if (PEAR::isError($result)) { - /* We can only handle MDB2_ERROR_NOSUCHTABLE errors. */ - if ($result->getCode() != MDB2_ERROR_NOSUCHTABLE) { - return false; - } - - /* Attempt to create the target table. */ - if (!$this->_createTable()) { - return false; - } - - /* Recreate our prepared statement resource. */ - $this->_statement->free(); - if (!$this->_prepareStatement()) { - return false; - } - - /* Attempt to re-execute the insertion query. */ - $result = $this->_statement->execute($values); - if (PEAR::isError($result)) { - return false; - } - } - - $this->_announce(array('priority' => $priority, 'message' => $message)); - - return true; - } - - /** - * Create the log table in the database. - * - * @return boolean True on success or false on failure. - * @access private - */ - function _createTable() - { - $this->_db->loadModule('Manager', null, true); - $result = $this->_db->manager->createTable( - $this->_table, - array( - 'id' => array('type' => $this->_types['id']), - 'logtime' => array('type' => $this->_types['logtime']), - 'ident' => array('type' => $this->_types['ident']), - 'priority' => array('type' => $this->_types['priority']), - 'message' => array('type' => $this->_types['message']) - ) - ); - if (PEAR::isError($result)) { - return false; - } - - $result = $this->_db->manager->createIndex( - $this->_table, - 'unique_id', - array('fields' => array('id' => true), 'unique' => true) - ); - if (PEAR::isError($result)) { - return false; - } - - return true; - } - - /** - * Prepare the SQL insertion statement. - * - * @return boolean True if the statement was successfully created. - * - * @access private - * @since Log 1.9.0 - */ - function _prepareStatement() - { - $this->_statement = &$this->_db->prepare( - 'INSERT INTO ' . $this->_table . - ' (id, logtime, ident, priority, message)' . - ' VALUES(:id, :logtime, :ident, :priority, :message)', - $this->_types, MDB2_PREPARE_MANIP); - - /* Return success if we didn't generate an error. */ - return (PEAR::isError($this->_statement) === false); - } -} diff --git a/_piecrust/libs/Log/Log/null.php b/_piecrust/libs/Log/Log/null.php deleted file mode 100644 index 5fc69f9..0000000 --- a/_piecrust/libs/Log/Log/null.php +++ /dev/null @@ -1,91 +0,0 @@ - - * @since Log 1.8.2 - * @package Log - * - * @example null.php Using the null handler. - */ -class Log_null extends Log -{ - /** - * Constructs a new Log_null object. - * - * @param string $name Ignored. - * @param string $ident The identity string. - * @param array $conf The configuration array. - * @param int $level Log messages up to and including this level. - * @access public - */ - function Log_null($name, $ident = '', $conf = array(), - $level = PEAR_LOG_DEBUG) - { - $this->_id = md5(microtime()); - $this->_ident = $ident; - $this->_mask = Log::UPTO($level); - } - - /** - * Opens the handler. - * - * @access public - * @since Log 1.9.6 - */ - function open() - { - $this->_opened = true; - return true; - } - - /** - * Closes the handler. - * - * @access public - * @since Log 1.9.6 - */ - function close() - { - $this->_opened = false; - return true; - } - - /** - * Simply consumes the log event. The message will still be passed - * along to any Log_observer instances that are observing this Log. - * - * @param mixed $message String or object containing the message to log. - * @param string $priority The priority of the message. Valid - * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, - * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, - * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. - * @return boolean True on success or false on failure. - * @access public - */ - function log($message, $priority = null) - { - /* If a priority hasn't been specified, use the default value. */ - if ($priority === null) { - $priority = $this->_priority; - } - - /* Abort early if the priority is above the maximum logging level. */ - if (!$this->_isMasked($priority)) { - return false; - } - - $this->_announce(array('priority' => $priority, 'message' => $message)); - - return true; - } - -} diff --git a/_piecrust/libs/Log/Log/observer.php b/_piecrust/libs/Log/Log/observer.php deleted file mode 100644 index 43ba04c..0000000 --- a/_piecrust/libs/Log/Log/observer.php +++ /dev/null @@ -1,129 +0,0 @@ - - * @since Horde 1.3 - * @since Log 1.0 - * @package Log - * - * @example observer_mail.php An example Log_observer implementation. - */ -class Log_observer -{ - /** - * Instance-specific unique identification number. - * - * @var integer - * @access private - */ - var $_id = 0; - - /** - * The minimum priority level of message that we want to hear about. - * PEAR_LOG_EMERG is the highest priority, so we will only hear messages - * with an integer priority value less than or equal to ours. It defaults - * to PEAR_LOG_INFO, which listens to everything except PEAR_LOG_DEBUG. - * - * @var string - * @access private - */ - var $_priority = PEAR_LOG_INFO; - - /** - * Creates a new basic Log_observer instance. - * - * @param integer $priority The highest priority at which to receive - * log event notifications. - * - * @access public - */ - function Log_observer($priority = PEAR_LOG_INFO) - { - $this->_id = md5(microtime()); - $this->_priority = $priority; - } - - /** - * Attempts to return a new concrete Log_observer instance of the requested - * type. - * - * @param string $type The type of concreate Log_observer subclass - * to return. - * @param integer $priority The highest priority at which to receive - * log event notifications. - * @param array $conf Optional associative array of additional - * configuration values. - * - * @return object The newly created concrete Log_observer - * instance, or null on an error. - */ - function &factory($type, $priority = PEAR_LOG_INFO, $conf = array()) - { - $type = strtolower($type); - $class = 'Log_observer_' . $type; - - /* - * If the desired class already exists (because the caller has supplied - * it from some custom location), simply instantiate and return a new - * instance. - */ - if (class_exists($class)) { - $object = &new $class($priority, $conf); - return $object; - } - - /* Support both the new-style and old-style file naming conventions. */ - $newstyle = true; - $classfile = dirname(__FILE__) . '/observer_' . $type . '.php'; - - if (!file_exists($classfile)) { - $classfile = 'Log/' . $type . '.php'; - $newstyle = false; - } - - /* - * Attempt to include our version of the named class, but don't treat - * a failure as fatal. The caller may have already included their own - * version of the named class. - */ - @include_once $classfile; - - /* If the class exists, return a new instance of it. */ - if (class_exists($class)) { - /* Support both new-style and old-style construction. */ - if ($newstyle) { - $object = &new $class($priority, $conf); - } else { - $object = &new $class($priority); - } - return $object; - } - - $null = null; - return $null; - } - - /** - * This is a stub method to make sure that Log_Observer classes do - * something when they are notified of a message. The default behavior - * is to just print the message, which is obviously not desireable in - * practically any situation - which is why you need to override this - * method. :) - * - * @param array $event A hash describing the log event. - */ - function notify($event) - { - print_r($event); - } -} diff --git a/_piecrust/libs/Log/Log/sql.php b/_piecrust/libs/Log/Log/sql.php deleted file mode 100644 index a8efbfb..0000000 --- a/_piecrust/libs/Log/Log/sql.php +++ /dev/null @@ -1,294 +0,0 @@ - - * @since Horde 1.3 - * @since Log 1.0 - * @package Log - * - * @example sql.php Using the SQL handler. - */ -class Log_sql extends Log -{ - /** - * Variable containing the DSN information. - * @var mixed - * @access private - */ - var $_dsn = ''; - - /** - * String containing the SQL insertion statement. - * - * @var string - * @access private - */ - var $_sql = ''; - - /** - * Array containing our set of DB configuration options. - * @var array - * @access private - */ - var $_options = array('persistent' => true); - - /** - * Object holding the database handle. - * @var object - * @access private - */ - var $_db = null; - - /** - * Resource holding the prepared statement handle. - * @var resource - * @access private - */ - var $_statement = null; - - /** - * Flag indicating that we're using an existing database connection. - * @var boolean - * @access private - */ - var $_existingConnection = false; - - /** - * String holding the database table to use. - * @var string - * @access private - */ - var $_table = 'log_table'; - - /** - * String holding the name of the ID sequence. - * @var string - * @access private - */ - var $_sequence = 'log_id'; - - /** - * Maximum length of the $ident string. This corresponds to the size of - * the 'ident' column in the SQL table. - * @var integer - * @access private - */ - var $_identLimit = 16; - - - /** - * Constructs a new sql logging object. - * - * @param string $name The target SQL table. - * @param string $ident The identification field. - * @param array $conf The connection configuration array. - * @param int $level Log messages up to and including this level. - * @access public - */ - function Log_sql($name, $ident = '', $conf = array(), - $level = PEAR_LOG_DEBUG) - { - $this->_id = md5(microtime()); - $this->_table = $name; - $this->_mask = Log::UPTO($level); - - /* Now that we have a table name, assign our SQL statement. */ - if (!empty($conf['sql'])) { - $this->_sql = $conf['sql']; - } else { - $this->_sql = 'INSERT INTO ' . $this->_table . - ' (id, logtime, ident, priority, message)' . - ' VALUES(?, CURRENT_TIMESTAMP, ?, ?, ?)'; - } - - /* If an options array was provided, use it. */ - if (isset($conf['options']) && is_array($conf['options'])) { - $this->_options = $conf['options']; - } - - /* If a specific sequence name was provided, use it. */ - if (!empty($conf['sequence'])) { - $this->_sequence = $conf['sequence']; - } - - /* If a specific sequence name was provided, use it. */ - if (isset($conf['identLimit'])) { - $this->_identLimit = $conf['identLimit']; - } - - /* Now that the ident limit is confirmed, set the ident string. */ - $this->setIdent($ident); - - /* If an existing database connection was provided, use it. */ - if (isset($conf['db'])) { - $this->_db = &$conf['db']; - $this->_existingConnection = true; - $this->_opened = true; - } else { - $this->_dsn = $conf['dsn']; - } - } - - /** - * Opens a connection to the database, if it has not already - * been opened. This is implicitly called by log(), if necessary. - * - * @return boolean True on success, false on failure. - * @access public - */ - function open() - { - if (!$this->_opened) { - /* Use the DSN and options to create a database connection. */ - $this->_db = &DB::connect($this->_dsn, $this->_options); - if (DB::isError($this->_db)) { - return false; - } - - /* Create a prepared statement for repeated use in log(). */ - if (!$this->_prepareStatement()) { - return false; - } - - /* We now consider out connection open. */ - $this->_opened = true; - } - - return $this->_opened; - } - - /** - * Closes the connection to the database if it is still open and we were - * the ones that opened it. It is the caller's responsible to close an - * existing connection that was passed to us via $conf['db']. - * - * @return boolean True on success, false on failure. - * @access public - */ - function close() - { - if ($this->_opened && !$this->_existingConnection) { - $this->_opened = false; - $this->_db->freePrepared($this->_statement); - return $this->_db->disconnect(); - } - - return ($this->_opened === false); - } - - /** - * Sets this Log instance's identification string. Note that this - * SQL-specific implementation will limit the length of the $ident string - * to sixteen (16) characters. - * - * @param string $ident The new identification string. - * - * @access public - * @since Log 1.8.5 - */ - function setIdent($ident) - { - $this->_ident = substr($ident, 0, $this->_identLimit); - } - - /** - * Inserts $message to the currently open database. Calls open(), - * if necessary. Also passes the message along to any Log_observer - * instances that are observing this Log. - * - * @param mixed $message String or object containing the message to log. - * @param string $priority The priority of the message. Valid - * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, - * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, - * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. - * @return boolean True on success or false on failure. - * @access public - */ - function log($message, $priority = null) - { - /* If a priority hasn't been specified, use the default value. */ - if ($priority === null) { - $priority = $this->_priority; - } - - /* Abort early if the priority is above the maximum logging level. */ - if (!$this->_isMasked($priority)) { - return false; - } - - /* If the connection isn't open and can't be opened, return failure. */ - if (!$this->_opened && !$this->open()) { - return false; - } - - /* If we don't already have our statement object yet, create it. */ - if (!is_object($this->_statement) && !$this->_prepareStatement()) { - return false; - } - - /* Extract the string representation of the message. */ - $message = $this->_extractMessage($message); - - /* Build our set of values for this log entry. */ - $id = $this->_db->nextId($this->_sequence); - $values = array($id, $this->_ident, $priority, $message); - - /* Execute the SQL query for this log entry insertion. */ - $result =& $this->_db->execute($this->_statement, $values); - if (DB::isError($result)) { - return false; - } - - $this->_announce(array('priority' => $priority, 'message' => $message)); - - return true; - } - - /** - * Prepare the SQL insertion statement. - * - * @return boolean True if the statement was successfully created. - * - * @access private - * @since Log 1.9.1 - */ - function _prepareStatement() - { - $this->_statement = $this->_db->prepare($this->_sql); - - /* Return success if we didn't generate an error. */ - return (DB::isError($this->_statement) === false); - } -} diff --git a/_piecrust/libs/Log/Log/sqlite.php b/_piecrust/libs/Log/Log/sqlite.php deleted file mode 100644 index ee50109..0000000 --- a/_piecrust/libs/Log/Log/sqlite.php +++ /dev/null @@ -1,225 +0,0 @@ - - * @author Jon Parise - * @since Log 1.8.3 - * @package Log - * - * @example sqlite.php Using the Sqlite handler. - */ -class Log_sqlite extends Log -{ - /** - * Array containing the connection defaults - * @var array - * @access private - */ - var $_options = array('mode' => 0666, - 'persistent' => false); - - /** - * Object holding the database handle. - * @var object - * @access private - */ - var $_db = null; - - /** - * Flag indicating that we're using an existing database connection. - * @var boolean - * @access private - */ - var $_existingConnection = false; - - /** - * String holding the database table to use. - * @var string - * @access private - */ - var $_table = 'log_table'; - - - /** - * Constructs a new sql logging object. - * - * @param string $name The target SQL table. - * @param string $ident The identification field. - * @param mixed $conf Can be an array of configuration options used - * to open a new database connection - * or an already opened sqlite connection. - * @param int $level Log messages up to and including this level. - * @access public - */ - function Log_sqlite($name, $ident = '', &$conf, $level = PEAR_LOG_DEBUG) - { - $this->_id = md5(microtime()); - $this->_table = $name; - $this->_ident = $ident; - $this->_mask = Log::UPTO($level); - - if (is_array($conf)) { - foreach ($conf as $k => $opt) { - $this->_options[$k] = $opt; - } - } else { - // If an existing database connection was provided, use it. - $this->_db =& $conf; - $this->_existingConnection = true; - } - } - - /** - * Opens a connection to the database, if it has not already - * been opened. This is implicitly called by log(), if necessary. - * - * @return boolean True on success, false on failure. - * @access public - */ - function open() - { - if (is_resource($this->_db)) { - $this->_opened = true; - return $this->_createTable(); - } else { - /* Set the connection function based on the 'persistent' option. */ - if (empty($this->_options['persistent'])) { - $connectFunction = 'sqlite_open'; - } else { - $connectFunction = 'sqlite_popen'; - } - - /* Attempt to connect to the database. */ - if ($this->_db = $connectFunction($this->_options['filename'], - (int)$this->_options['mode'], - $error)) { - $this->_opened = true; - return $this->_createTable(); - } - } - - return $this->_opened; - } - - /** - * Closes the connection to the database if it is still open and we were - * the ones that opened it. It is the caller's responsible to close an - * existing connection that was passed to us via $conf['db']. - * - * @return boolean True on success, false on failure. - * @access public - */ - function close() - { - /* We never close existing connections. */ - if ($this->_existingConnection) { - return false; - } - - if ($this->_opened) { - $this->_opened = false; - sqlite_close($this->_db); - } - - return ($this->_opened === false); - } - - /** - * Inserts $message to the currently open database. Calls open(), - * if necessary. Also passes the message along to any Log_observer - * instances that are observing this Log. - * - * @param mixed $message String or object containing the message to log. - * @param string $priority The priority of the message. Valid - * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, - * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, - * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. - * @return boolean True on success or false on failure. - * @access public - */ - function log($message, $priority = null) - { - /* If a priority hasn't been specified, use the default value. */ - if ($priority === null) { - $priority = $this->_priority; - } - - /* Abort early if the priority is above the maximum logging level. */ - if (!$this->_isMasked($priority)) { - return false; - } - - /* If the connection isn't open and can't be opened, return failure. */ - if (!$this->_opened && !$this->open()) { - return false; - } - - // Extract the string representation of the message. - $message = $this->_extractMessage($message); - - // Build the SQL query for this log entry insertion. - $q = sprintf('INSERT INTO [%s] (logtime, ident, priority, message) ' . - "VALUES ('%s', '%s', %d, '%s')", - $this->_table, - strftime('%Y-%m-%d %H:%M:%S', time()), - sqlite_escape_string($this->_ident), - $priority, - sqlite_escape_string($message)); - if (!($res = @sqlite_unbuffered_query($this->_db, $q))) { - return false; - } - $this->_announce(array('priority' => $priority, 'message' => $message)); - - return true; - } - - /** - * Checks whether the log table exists and creates it if necessary. - * - * @return boolean True on success or false on failure. - * @access private - */ - function _createTable() - { - $q = "SELECT name FROM sqlite_master WHERE name='" . $this->_table . - "' AND type='table'"; - - $res = sqlite_query($this->_db, $q); - - if (sqlite_num_rows($res) == 0) { - $q = 'CREATE TABLE [' . $this->_table . '] (' . - 'id INTEGER PRIMARY KEY NOT NULL, ' . - 'logtime NOT NULL, ' . - 'ident CHAR(16) NOT NULL, ' . - 'priority INT NOT NULL, ' . - 'message)'; - - if (!($res = sqlite_unbuffered_query($this->_db, $q))) { - return false; - } - } - - return true; - } - -} diff --git a/_piecrust/libs/Log/Log/syslog.php b/_piecrust/libs/Log/Log/syslog.php deleted file mode 100644 index 58fd91f..0000000 --- a/_piecrust/libs/Log/Log/syslog.php +++ /dev/null @@ -1,228 +0,0 @@ - - * @author Jon Parise - * @since Horde 1.3 - * @since Log 1.0 - * @package Log - * - * @example syslog.php Using the syslog handler. - */ -class Log_syslog extends Log -{ - /** - * Integer holding the log facility to use. - * @var integer - * @access private - */ - var $_name = LOG_SYSLOG; - - /** - * Should we inherit the current syslog connection for this process, or - * should we call openlog() to start a new syslog connection? - * @var boolean - * @access private - */ - var $_inherit = false; - - /** - * Maximum message length that will be sent to syslog(). If the handler - * receives a message longer than this length limit, it will be split into - * multiple syslog() calls. - * @var integer - * @access private - */ - var $_maxLength = 500; - - /** - * String containing the format of a message. - * @var string - * @access private - */ - var $_lineFormat = '%4$s'; - - /** - * String containing the timestamp format. It will be passed directly to - * strftime(). Note that the timestamp string will generated using the - * current locale. - * @var string - * @access private - */ - var $_timeFormat = '%b %d %H:%M:%S'; - - /** - * Constructs a new syslog object. - * - * @param string $name The syslog facility. - * @param string $ident The identity string. - * @param array $conf The configuration array. - * @param int $level Log messages up to and including this level. - * @access public - */ - function Log_syslog($name, $ident = '', $conf = array(), - $level = PEAR_LOG_DEBUG) - { - /* Ensure we have a valid integer value for $name. */ - if (empty($name) || !is_int($name)) { - $name = LOG_SYSLOG; - } - - if (isset($conf['inherit'])) { - $this->_inherit = $conf['inherit']; - $this->_opened = $this->_inherit; - } - if (isset($conf['maxLength'])) { - $this->_maxLength = $conf['maxLength']; - } - if (!empty($conf['lineFormat'])) { - $this->_lineFormat = str_replace(array_keys($this->_formatMap), - array_values($this->_formatMap), - $conf['lineFormat']); - } - if (!empty($conf['timeFormat'])) { - $this->_timeFormat = $conf['timeFormat']; - } - - $this->_id = md5(microtime()); - $this->_name = $name; - $this->_ident = $ident; - $this->_mask = Log::UPTO($level); - } - - /** - * Opens a connection to the system logger, if it has not already - * been opened. This is implicitly called by log(), if necessary. - * @access public - */ - function open() - { - if (!$this->_opened) { - $this->_opened = openlog($this->_ident, LOG_PID, $this->_name); - } - - return $this->_opened; - } - - /** - * Closes the connection to the system logger, if it is open. - * @access public - */ - function close() - { - if ($this->_opened && !$this->_inherit) { - closelog(); - $this->_opened = false; - } - - return true; - } - - /** - * Sends $message to the currently open syslog connection. Calls - * open() if necessary. Also passes the message along to any Log_observer - * instances that are observing this Log. - * - * @param mixed $message String or object containing the message to log. - * @param int $priority (optional) The priority of the message. Valid - * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, - * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, - * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. - * @return boolean True on success or false on failure. - * @access public - */ - function log($message, $priority = null) - { - /* If a priority hasn't been specified, use the default value. */ - if ($priority === null) { - $priority = $this->_priority; - } - - /* Abort early if the priority is above the maximum logging level. */ - if (!$this->_isMasked($priority)) { - return false; - } - - /* If the connection isn't open and can't be opened, return failure. */ - if (!$this->_opened && !$this->open()) { - return false; - } - - /* Extract the string representation of the message. */ - $message = $this->_extractMessage($message); - - /* Build a syslog priority value based on our current configuration. */ - $priority = $this->_toSyslog($priority); - if ($this->_inherit) { - $priority |= $this->_name; - } - - /* Apply the configured line format to the message string. */ - $message = $this->_format($this->_lineFormat, - strftime($this->_timeFormat), - $priority, $message); - - /* Split the string into parts based on our maximum length setting. */ - $parts = str_split($message, $this->_maxLength); - if ($parts === false) { - return false; - } - - foreach ($parts as $part) { - if (!syslog($priority, $part)) { - return false; - } - } - - $this->_announce(array('priority' => $priority, 'message' => $message)); - - return true; - } - - /** - * Converts a PEAR_LOG_* constant into a syslog LOG_* constant. - * - * This function exists because, under Windows, not all of the LOG_* - * constants have unique values. Instead, the PEAR_LOG_* were introduced - * for global use, with the conversion to the LOG_* constants kept local to - * to the syslog driver. - * - * @param int $priority PEAR_LOG_* value to convert to LOG_* value. - * - * @return The LOG_* representation of $priority. - * - * @access private - */ - function _toSyslog($priority) - { - static $priorities = array( - PEAR_LOG_EMERG => LOG_EMERG, - PEAR_LOG_ALERT => LOG_ALERT, - PEAR_LOG_CRIT => LOG_CRIT, - PEAR_LOG_ERR => LOG_ERR, - PEAR_LOG_WARNING => LOG_WARNING, - PEAR_LOG_NOTICE => LOG_NOTICE, - PEAR_LOG_INFO => LOG_INFO, - PEAR_LOG_DEBUG => LOG_DEBUG - ); - - /* If we're passed an unknown priority, default to LOG_INFO. */ - if (!is_int($priority) || !in_array($priority, $priorities)) { - return LOG_INFO; - } - - return $priorities[$priority]; - } - -} diff --git a/_piecrust/libs/Log/Log/win.php b/_piecrust/libs/Log/Log/win.php deleted file mode 100644 index f80d146..0000000 --- a/_piecrust/libs/Log/Log/win.php +++ /dev/null @@ -1,286 +0,0 @@ - - * @since Log 1.7.0 - * @package Log - * - * @example win.php Using the window handler. - */ -class Log_win extends Log -{ - /** - * The name of the output window. - * @var string - * @access private - */ - var $_name = 'LogWindow'; - - /** - * The title of the output window. - * @var string - * @access private - */ - var $_title = 'Log Output Window'; - - /** - * Mapping of log priorities to styles. - * @var array - * @access private - */ - var $_styles = array( - PEAR_LOG_EMERG => 'color: red;', - PEAR_LOG_ALERT => 'color: orange;', - PEAR_LOG_CRIT => 'color: yellow;', - PEAR_LOG_ERR => 'color: green;', - PEAR_LOG_WARNING => 'color: blue;', - PEAR_LOG_NOTICE => 'color: indigo;', - PEAR_LOG_INFO => 'color: violet;', - PEAR_LOG_DEBUG => 'color: black;' - ); - - /** - * String buffer that holds line that are pending output. - * @var array - * @access private - */ - var $_buffer = array(); - - /** - * Constructs a new Log_win object. - * - * @param string $name Ignored. - * @param string $ident The identity string. - * @param array $conf The configuration array. - * @param int $level Log messages up to and including this level. - * @access public - */ - function Log_win($name, $ident = '', $conf = array(), - $level = PEAR_LOG_DEBUG) - { - $this->_id = md5(microtime()); - $this->_name = str_replace(' ', '_', $name); - $this->_ident = $ident; - $this->_mask = Log::UPTO($level); - - if (isset($conf['title'])) { - $this->_title = $conf['title']; - } - if (isset($conf['styles']) && is_array($conf['styles'])) { - $this->_styles = $conf['styles']; - } - if (isset($conf['colors']) && is_array($conf['colors'])) { - foreach ($conf['colors'] as $level => $color) { - $this->_styles[$level] .= "color: $color;"; - } - } - - register_shutdown_function(array(&$this, '_Log_win')); - } - - /** - * Destructor - */ - function _Log_win() - { - if ($this->_opened || (count($this->_buffer) > 0)) { - $this->close(); - } - } - - /** - * The first time open() is called, it will open a new browser window and - * prepare it for output. - * - * This is implicitly called by log(), if necessary. - * - * @access public - */ - function open() - { - if (!$this->_opened) { - $win = $this->_name; - $styles = $this->_styles; - - if (!empty($this->_ident)) { - $identHeader = "$win.document.writeln('Ident')"; - } else { - $identHeader = ''; - } - - echo <<< EOT - -EOT; - $this->_opened = true; - } - - return $this->_opened; - } - - /** - * Closes the output stream if it is open. If there are still pending - * lines in the output buffer, the output window will be opened so that - * the buffer can be drained. - * - * @access public - */ - function close() - { - /* - * If there are still lines waiting to be written, open the output - * window so that we can drain the buffer. - */ - if (!$this->_opened && (count($this->_buffer) > 0)) { - $this->open(); - } - - if ($this->_opened) { - $this->_writeln(''); - $this->_writeln(''); - $this->_drainBuffer(); - $this->_opened = false; - } - - return ($this->_opened === false); - } - - /** - * Writes the contents of the output buffer to the output window. - * - * @access private - */ - function _drainBuffer() - { - $win = $this->_name; - foreach ($this->_buffer as $line) { - echo "\n"; - } - - /* Now that the buffer has been drained, clear it. */ - $this->_buffer = array(); - } - - /** - * Writes a single line of text to the output buffer. - * - * @param string $line The line of text to write. - * - * @access private - */ - function _writeln($line) - { - /* Add this line to our output buffer. */ - $this->_buffer[] = $line; - - /* Buffer the output until this page's headers have been sent. */ - if (!headers_sent()) { - return; - } - - /* If we haven't already opened the output window, do so now. */ - if (!$this->_opened && !$this->open()) { - return; - } - - /* Drain the buffer to the output window. */ - $this->_drainBuffer(); - } - - /** - * Logs $message to the output window. The message is also passed along - * to any Log_observer instances that are observing this Log. - * - * @param mixed $message String or object containing the message to log. - * @param string $priority The priority of the message. Valid - * values are: PEAR_LOG_EMERG, PEAR_LOG_ALERT, - * PEAR_LOG_CRIT, PEAR_LOG_ERR, PEAR_LOG_WARNING, - * PEAR_LOG_NOTICE, PEAR_LOG_INFO, and PEAR_LOG_DEBUG. - * @return boolean True on success or false on failure. - * @access public - */ - function log($message, $priority = null) - { - /* If a priority hasn't been specified, use the default value. */ - if ($priority === null) { - $priority = $this->_priority; - } - - /* Abort early if the priority is above the maximum logging level. */ - if (!$this->_isMasked($priority)) { - return false; - } - - /* Extract the string representation of the message. */ - $message = $this->_extractMessage($message); - $message = preg_replace('/\r\n|\n|\r/', '
        ', $message); - - list($usec, $sec) = explode(' ', microtime()); - - /* Build the output line that contains the log entry row. */ - $line = ''; - $line .= sprintf('%s.%s', - strftime('%H:%M:%S', $sec), substr($usec, 2, 2)); - if (!empty($this->_ident)) { - $line .= '' . $this->_ident . ''; - } - $line .= '' . ucfirst($this->priorityToString($priority)) . ''; - $line .= sprintf('%s', $priority, $message); - $line .= ''; - - $this->_writeln($line); - - $this->_announce(array('priority' => $priority, 'message' => $message)); - - return true; - } - -} diff --git a/_piecrust/libs/Markdown/License.text b/_piecrust/libs/Markdown/License.text deleted file mode 100644 index ea90c49..0000000 --- a/_piecrust/libs/Markdown/License.text +++ /dev/null @@ -1,36 +0,0 @@ -PHP Markdown -Copyright (c) 2004-2009 Michel Fortin - -All rights reserved. - -Based on Markdown -Copyright (c) 2003-2006 John Gruber - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -* Neither the name "Markdown" nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -This software is provided by the copyright holders and contributors "as -is" and any express or implied warranties, including, but not limited -to, the implied warranties of merchantability and fitness for a -particular purpose are disclaimed. In no event shall the copyright owner -or contributors be liable for any direct, indirect, incidental, special, -exemplary, or consequential damages (including, but not limited to, -procurement of substitute goods or services; loss of use, data, or -profits; or business interruption) however caused and on any theory of -liability, whether in contract, strict liability, or tort (including -negligence or otherwise) arising in any way out of the use of this -software, even if advised of the possibility of such damage. diff --git a/_piecrust/libs/Markdown/PHP Markdown Readme.text b/_piecrust/libs/Markdown/PHP Markdown Readme.text deleted file mode 100644 index db61f2b..0000000 --- a/_piecrust/libs/Markdown/PHP Markdown Readme.text +++ /dev/null @@ -1,770 +0,0 @@ -PHP Markdown -============ - -Version 1.0.1m - Sat 21 Jun 2008 - -by Michel Fortin - - -based on work by John Gruber - - - -Introduction ------------- - -Markdown is a text-to-HTML conversion tool for web writers. Markdown -allows you to write using an easy-to-read, easy-to-write plain text -format, then convert it to structurally valid XHTML (or HTML). - -"Markdown" is two things: a plain text markup syntax, and a software -tool, written in Perl, that converts the plain text markup to HTML. -PHP Markdown is a port to PHP of the original Markdown program by -John Gruber. - -PHP Markdown can work as a plug-in for WordPress and bBlog, as a -modifier for the Smarty templating engine, or as a remplacement for -textile formatting in any software that support textile. - -Full documentation of Markdown's syntax is available on John's -Markdown page: - - -Installation and Requirement ----------------------------- - -PHP Markdown requires PHP version 4.0.5 or later. - - -### WordPress ### - -PHP Markdown works with [WordPress][wp], version 1.2 or later. - - [wp]: http://wordpress.org/ - -1. To use PHP Markdown with WordPress, place the "makrdown.php" file - in the "plugins" folder. This folder is located inside - "wp-content" at the root of your site: - - (site home)/wp-content/plugins/ - -2. Activate the plugin with the administrative interface of - WordPress. In the "Plugins" section you will now find Markdown. - To activate the plugin, click on the "Activate" button on the - same line than Markdown. Your entries will now be formatted by - PHP Markdown. - -3. To post Markdown content, you'll first have to disable the - "visual" editor in the User section of WordPress. - -You can configure PHP Markdown to not apply to the comments on your -WordPress weblog. See the "Configuration" section below. - -It is not possible at this time to apply a different set of -filters to different entries. All your entries will be formated by -PHP Markdown. This is a limitation of WordPress. If your old entries -are written in HTML (as opposed to another formatting syntax, like -Textile), they'll probably stay fine after installing Markdown. - - -### bBlog ### - -PHP Markdown also works with [bBlog][bb]. - - [bb]: http://www.bblog.com/ - -To use PHP Markdown with bBlog, rename "markdown.php" to -"modifier.markdown.php" and place the file in the "bBlog_plugins" -folder. This folder is located inside the "bblog" directory of -your site, like this: - - (site home)/bblog/bBlog_plugins/modifier.markdown.php - -Select "Markdown" as the "Entry Modifier" when you post a new -entry. This setting will only apply to the entry you are editing. - - -### Replacing Textile in TextPattern ### - -[TextPattern][tp] use [Textile][tx] to format your text. You can -replace Textile by Markdown in TextPattern without having to change -any code by using the *Texitle Compatibility Mode*. This may work -with other software that expect Textile too. - - [tx]: http://www.textism.com/tools/textile/ - [tp]: http://www.textpattern.com/ - -1. Rename the "markdown.php" file to "classTextile.php". This will - make PHP Markdown behave as if it was the actual Textile parser. - -2. Replace the "classTextile.php" file TextPattern installed in your - web directory. It can be found in the "lib" directory: - - (site home)/textpattern/lib/ - -Contrary to Textile, Markdown does not convert quotes to curly ones -and does not convert multiple hyphens (`--` and `---`) into en- and -em-dashes. If you use PHP Markdown in Textile Compatibility Mode, you -can solve this problem by installing the "smartypants.php" file from -[PHP SmartyPants][psp] beside the "classTextile.php" file. The Textile -Compatibility Mode function will use SmartyPants automatically without -further modification. - - [psp]: http://michelf.com/projects/php-smartypants/ - - -### Updating Markdown in Other Programs ### - -Many web applications now ship with PHP Markdown, or have plugins to -perform the conversion to HTML. You can update PHP Markdown in many of -these programs by swapping the old "markdown.php" file for the new one. - -Here is a short non-exhaustive list of some programs and where they -hide the "markdown.php" file. - -| Program | Path to Markdown -| ------- | ---------------- -| [Pivot][] | `(site home)/pivot/includes/markdown/markdown.php` - -If you're unsure if you can do this with your application, ask the -developer, or wait for the developer to update his application or -plugin with the new version of PHP Markdown. - - [Pivot]: http://pivotlog.net/ - - -### In Your Own Programs ### - -You can use PHP Markdown easily in your current PHP program. Simply -include the file and then call the Markdown function on the text you -want to convert: - - include_once "markdown.php"; - $my_html = Markdown($my_text); - -If you wish to use PHP Markdown with another text filter function -built to parse HTML, you should filter the text *after* the Markdown -function call. This is an example with [PHP SmartyPants][psp]: - - $my_html = SmartyPants(Markdown($my_text)); - - -### With Smarty ### - -If your program use the [Smarty][sm] template engine, PHP Markdown -can now be used as a modifier for your templates. Rename "markdown.php" -to "modifier.markdown.php" and put it in your smarty plugins folder. - - [sm]: http://smarty.php.net/ - -If you are using MovableType 3.1 or later, the Smarty plugin folder is -located at `(MT CGI root)/php/extlib/smarty/plugins`. This will allow -Markdown to work on dynamic pages. - - -Configuration -------------- - -By default, PHP Markdown produces XHTML output for tags with empty -elements. E.g.: - -
        - -Markdown can be configured to produce HTML-style tags; e.g.: - -
        - -To do this, you must edit the "MARKDOWN_EMPTY_ELEMENT_SUFFIX" -definition below the "Global default settings" header at the start of -the "markdown.php" file. - - -### WordPress-Specific Settings ### - -By default, the Markdown plugin applies to both posts and comments on -your WordPress weblog. To deactivate one or the other, edit the -`MARKDOWN_WP_POSTS` or `MARKDOWN_WP_COMMENTS` definitions under the -"WordPress settings" header at the start of the "markdown.php" file. - - -Bugs ----- - -To file bug reports please send email to: - - -Please include with your report: (1) the example input; (2) the output you -expected; (3) the output PHP Markdown actually produced. - - -Version History ---------------- - -1.0.1n (10 Oct 2009): - -* Enabled reference-style shortcut links. Now you can write reference-style - links with less brakets: - - This is [my website]. - - [my website]: http://example.com/ - - This was added in the 1.0.2 betas, but commented out in the 1.0.1 branch, - waiting for the feature to be officialized. [But half of the other Markdown - implementations are supporting this syntax][half], so it makes sense for - compatibility's sake to allow it in PHP Markdown too. - - [half]: http://babelmark.bobtfish.net/?markdown=This+is+%5Bmy+website%5D.%0D%0A%09%09%0D%0A%5Bmy+website%5D%3A+http%3A%2F%2Fexample.com%2F%0D%0A&src=1&dest=2 - -* Now accepting many valid email addresses in autolinks that were - previously rejected, such as: - - - - <"abc@def"@example.com> - <"Fred Bloggs"@example.com> - - -* Now accepting spaces in URLs for inline and reference-style links. Such - URLs need to be surrounded by angle brakets. For instance: - - [link text]( "optional title") - - [link text][ref] - [ref]: "optional title" - - There is still a quirk which may prevent this from working correctly with - relative URLs in inline-style links however. - -* Fix for adjacent list of different kind where the second list could - end as a sublist of the first when not separated by an empty line. - -* Fixed a bug where inline-style links wouldn't be recognized when the link - definition contains a line break between the url and the title. - -* Fixed a bug where tags where the name contains an underscore aren't parsed - correctly. - -* Fixed some corner-cases mixing underscore-ephasis and asterisk-emphasis. - - -1.0.1m (21 Jun 2008): - -* Lists can now have empty items. - -* Rewrote the emphasis and strong emphasis parser to fix some issues - with odly placed and overlong markers. - - -1.0.1l (11 May 2008): - -* Now removing the UTF-8 BOM at the start of a document, if present. - -* Now accepting capitalized URI schemes (such as HTTP:) in automatic - links, such as ``. - -* Fixed a problem where `` was seen as a horizontal - rule instead of an automatic link. - -* Fixed an issue where some characters in Markdown-generated HTML - attributes weren't properly escaped with entities. - -* Fix for code blocks as first element of a list item. Previously, - this didn't create any code block for item 2: - - * Item 1 (regular paragraph) - - * Item 2 (code block) - -* A code block starting on the second line of a document wasn't seen - as a code block. This has been fixed. - -* Added programatically-settable parser properties `predef_urls` and - `predef_titles` for predefined URLs and titles for reference-style - links. To use this, your PHP code must call the parser this way: - - $parser = new Markdwon_Parser; - $parser->predef_urls = array('linkref' => 'http://example.com'); - $html = $parser->transform($text); - - You can then use the URL as a normal link reference: - - [my link][linkref] - [my link][linkRef] - - Reference names in the parser properties *must* be lowercase. - Reference names in the Markdown source may have any case. - -* Added `setup` and `teardown` methods which can be used by subclassers - as hook points to arrange the state of some parser variables before and - after parsing. - - -1.0.1k (26 Sep 2007): - -* Fixed a problem introduced in 1.0.1i where three or more identical - uppercase letters, as well as a few other symbols, would trigger - a horizontal line. - - -1.0.1j (4 Sep 2007): - -* Fixed a problem introduced in 1.0.1i where the closing `code` and - `pre` tags at the end of a code block were appearing in the wrong - order. - -* Overriding configuration settings by defining constants from an - external before markdown.php is included is now possible without - producing a PHP warning. - - -1.0.1i (31 Aug 2007): - -* Fixed a problem where an escaped backslash before a code span - would prevent the code span from being created. This should now - work as expected: - - Litteral backslash: \\`code span` - -* Overall speed improvements, especially with long documents. - - -1.0.1h (3 Aug 2007): - -* Added two properties (`no_markup` and `no_entities`) to the parser - allowing HTML tags and entities to be disabled. - -* Fix for a problem introduced in 1.0.1g where posting comments in - WordPress would trigger PHP warnings and cause some markup to be - incorrectly filtered by the kses filter in WordPress. - - -1.0.1g (3 Jul 2007): - -* Fix for PHP 5 compiled without the mbstring module. Previous fix to - calculate the length of UTF-8 strings in `detab` when `mb_strlen` is - not available was only working with PHP 4. - -* Fixed a problem with WordPress 2.x where full-content posts in RSS feeds - were not processed correctly by Markdown. - -* Now supports URLs containing literal parentheses for inline links - and images, such as: - - [WIMP](http://en.wikipedia.org/wiki/WIMP_(computing)) - - Such parentheses may be arbitrarily nested, but must be - balanced. Unbalenced parentheses are allowed however when the URL - when escaped or when the URL is enclosed in angle brakets `<>`. - -* Fixed a performance problem where the regular expression for strong - emphasis introduced in version 1.0.1d could sometime be long to process, - give slightly wrong results, and in some circumstances could remove - entirely the content for a whole paragraph. - -* Some change in version 1.0.1d made possible the incorrect nesting of - anchors within each other. This is now fixed. - -* Fixed a rare issue where certain MD5 hashes in the content could - be changed to their corresponding text. For instance, this: - - The MD5 value for "+" is "26b17225b626fb9238849fd60eabdf60". - - was incorrectly changed to this in previous versions of PHP Markdown: - -

        The MD5 value for "+" is "+".

        - -* Now convert escaped characters to their numeric character - references equivalent. - - This fix an integration issue with SmartyPants and backslash escapes. - Since Markdown and SmartyPants have some escapable characters in common, - it was sometime necessary to escape them twice. Previously, two - backslashes were sometime required to prevent Markdown from "eating" the - backslash before SmartyPants sees it: - - Here are two hyphens: \\-- - - Now, only one backslash will do: - - Here are two hyphens: \-- - - -1.0.1f (7 Feb 2007): - -* Fixed an issue with WordPress where manually-entered excerpts, but - not the auto-generated ones, would contain nested paragraphs. - -* Fixed an issue introduced in 1.0.1d where headers and blockquotes - preceded too closely by a paragraph (not separated by a blank line) - where incorrectly put inside the paragraph. - -* Fixed an issue introduced in 1.0.1d in the tokenizeHTML method where - two consecutive code spans would be merged into one when together they - form a valid tag in a multiline paragraph. - -* Fixed an long-prevailing issue where blank lines in code blocks would - be doubled when the code block is in a list item. - - This was due to the list processing functions relying on artificially - doubled blank lines to correctly determine when list items should - contain block-level content. The list item processing model was thus - changed to avoid the need for double blank lines. - -* Fixed an issue with `<% asp-style %>` instructions used as inline - content where the opening `<` was encoded as `<`. - -* Fixed a parse error occuring when PHP is configured to accept - ASP-style delimiters as boundaries for PHP scripts. - -* Fixed a bug introduced in 1.0.1d where underscores in automatic links - got swapped with emphasis tags. - - -1.0.1e (28 Dec 2006) - -* Added support for internationalized domain names for email addresses in - automatic link. Improved the speed at which email addresses are converted - to entities. Thanks to Milian Wolff for his optimisations. - -* Made deterministic the conversion to entities of email addresses in - automatic links. This means that a given email address will always be - encoded the same way. - -* PHP Markdown will now use its own function to calculate the length of an - UTF-8 string in `detab` when `mb_strlen` is not available instead of - giving a fatal error. - - -1.0.1d (1 Dec 2006) - -* Fixed a bug where inline images always had an empty title attribute. The - title attribute is now present only when explicitly defined. - -* Link references definitions can now have an empty title, previously if the - title was defined but left empty the link definition was ignored. This can - be useful if you want an empty title attribute in images to hide the - tooltip in Internet Explorer. - -* Made `detab` aware of UTF-8 characters. UTF-8 multi-byte sequences are now - correctly mapped to one character instead of the number of bytes. - -* Fixed a small bug with WordPress where WordPress' default filter `wpautop` - was not properly deactivated on comment text, resulting in hard line breaks - where Markdown do not prescribes them. - -* Added a `TextileRestrited` method to the textile compatibility mode. There - is no restriction however, as Markdown does not have a restricted mode at - this point. This should make PHP Markdown work again in the latest - versions of TextPattern. - -* Converted PHP Markdown to a object-oriented design. - -* Changed span and block gamut methods so that they loop over a - customizable list of methods. This makes subclassing the parser a more - interesting option for creating syntax extensions. - -* Also added a "document" gamut loop which can be used to hook document-level - methods (like for striping link definitions). - -* Changed all methods which were inserting HTML code so that they now return - a hashed representation of the code. New methods `hashSpan` and `hashBlock` - are used to hash respectivly span- and block-level generated content. This - has a couple of significant effects: - - 1. It prevents invalid nesting of Markdown-generated elements which - could occur occuring with constructs like `*something [link*][1]`. - 2. It prevents problems occuring with deeply nested lists on which - paragraphs were ill-formed. - 3. It removes the need to call `hashHTMLBlocks` twice during the the - block gamut. - - Hashes are turned back to HTML prior output. - -* Made the block-level HTML parser smarter using a specially-crafted regular - expression capable of handling nested tags. - -* Solved backtick issues in tag attributes by rewriting the HTML tokenizer to - be aware of code spans. All these lines should work correctly now: - - bar - bar - `` - -* Changed the parsing of HTML comments to match simply from `` - instead using of the more complicated SGML-style rule with paired `--`. - This is how most browsers parse comments and how XML defines them too. - -* `
        ` has been added to the list of block-level elements and is now - treated as an HTML block instead of being wrapped within paragraph tags. - -* Now only trim trailing newlines from code blocks, instead of trimming - all trailing whitespace characters. - -* Fixed bug where this: - - [text](http://m.com "title" ) - - wasn't working as expected, because the parser wasn't allowing for spaces - before the closing paren. - -* Filthy hack to support markdown='1' in div tags. - -* _DoAutoLinks() now supports the 'dict://' URL scheme. - -* PHP- and ASP-style processor instructions are now protected as - raw HTML blocks. - - - <% ... %> - -* Fix for escaped backticks still triggering code spans: - - There are two raw backticks here: \` and here: \`, not a code span - - -1.0.1c (9 Dec 2005) - -* Fixed a problem occurring with PHP 5.1.1 due to a small - change to strings variable replacement behaviour in - this version. - - -1.0.1b (6 Jun 2005) - -* Fixed a bug where an inline image followed by a reference link would - give a completely wrong result. - -* Fix for escaped backticks still triggering code spans: - - There are two raw backticks here: \` and here: \`, not a code span - -* Fix for an ordered list following an unordered list, and the - reverse. There is now a loop in _DoList that does the two - separately. - -* Fix for nested sub-lists in list-paragraph mode. Previously we got - a spurious extra level of `

        ` tags for something like this: - - * this - - * sub - - that - -* Fixed some incorrect behaviour with emphasis. This will now work - as it should: - - *test **thing*** - **test *thing*** - ***thing* test** - ***thing** test* - - Name: __________ - Address: _______ - -* Correct a small bug in `_TokenizeHTML` where a Doctype declaration - was not seen as HTML. - -* Major rewrite of the WordPress integration code that should - correct many problems by preventing default WordPress filters from - tampering with Markdown-formatted text. More details here: - - - -1.0.1a (15 Apr 2005) - -* Fixed an issue where PHP warnings were trigged when converting - text with list items running on PHP 4.0.6. This was comming from - the `rtrim` function which did not support the second argument - prior version 4.1. Replaced by a regular expression. - -* Markdown now filter correctly post excerpts and comment - excerpts in WordPress. - -* Automatic links and some code sample were "corrected" by - the balenceTag filter in WordPress meant to ensure HTML - is well formed. This new version of PHP Markdown postpone this - filter so that it runs after Markdown. - -* Blockquote syntax and some code sample were stripped by - a new WordPress 1.5 filter meant to remove unwanted HTML - in comments. This new version of PHP Markdown postpone this - filter so that it runs after Markdown. - - -1.0.1 (16 Dec 2004): - -* Changed the syntax rules for code blocks and spans. Previously, - backslash escapes for special Markdown characters were processed - everywhere other than within inline HTML tags. Now, the contents of - code blocks and spans are no longer processed for backslash escapes. - This means that code blocks and spans are now treated literally, - with no special rules to worry about regarding backslashes. - - **IMPORTANT**: This breaks the syntax from all previous versions of - Markdown. Code blocks and spans involving backslash characters will - now generate different output than before. - - Implementation-wise, this change was made by moving the call to - `_EscapeSpecialChars()` from the top-level `Markdown()` function to - within `_RunSpanGamut()`. - -* Significants performance improvement in `_DoHeader`, `_Detab` - and `_TokenizeHTML`. - -* Added `>`, `+`, and `-` to the list of backslash-escapable - characters. These should have been done when these characters - were added as unordered list item markers. - -* Inline links using `<` and `>` URL delimiters weren't working: - - like [this]() - - Fixed by moving `_DoAutoLinks()` after `_DoAnchors()` in - `_RunSpanGamut()`. - -* Fixed bug where auto-links were being processed within code spans: - - like this: `` - - Fixed by moving `_DoAutoLinks()` from `_RunBlockGamut()` to - `_RunSpanGamut()`. - -* Sort-of fixed a bug where lines in the middle of hard-wrapped - paragraphs, which lines look like the start of a list item, - would accidentally trigger the creation of a list. E.g. a - paragraph that looked like this: - - I recommend upgrading to version - 8. Oops, now this line is treated - as a sub-list. - - This is fixed for top-level lists, but it can still happen for - sub-lists. E.g., the following list item will not be parsed - properly: - - * I recommend upgrading to version - 8. Oops, now this line is treated - as a sub-list. - - Given Markdown's list-creation rules, I'm not sure this can - be fixed. - -* Fix for horizontal rules preceded by 2 or 3 spaces or followed by - trailing spaces and tabs. - -* Standalone HTML comments are now handled; previously, they'd get - wrapped in a spurious `

        ` tag. - -* `_HashHTMLBlocks()` now tolerates trailing spaces and tabs following - HTML comments and `


        ` tags. - -* Changed special case pattern for hashing `
        ` tags in - `_HashHTMLBlocks()` so that they must occur within three spaces - of left margin. (With 4 spaces or a tab, they should be - code blocks, but weren't before this fix.) - -* Auto-linked email address can now optionally contain - a 'mailto:' protocol. I.e. these are equivalent: - - - - -* Fixed annoying bug where nested lists would wind up with - spurious (and invalid) `

        ` tags. - -* Changed `_StripLinkDefinitions()` so that link definitions must - occur within three spaces of the left margin. Thus if you indent - a link definition by four spaces or a tab, it will now be a code - block. - -* You can now write empty links: - - [like this]() - - and they'll be turned into anchor tags with empty href attributes. - This should have worked before, but didn't. - -* `***this***` and `___this___` are now turned into - - this - - Instead of - - this - - which isn't valid. - -* Fixed problem for links defined with urls that include parens, e.g.: - - [1]: http://sources.wikipedia.org/wiki/Middle_East_Policy_(Chomsky) - - "Chomsky" was being erroneously treated as the URL's title. - -* Double quotes in the title of an inline link used to give strange - results (incorrectly made entities). Fixed. - -* Tabs are now correctly changed into spaces. Previously, only - the first tab was converted. In code blocks, the second one was too, - but was not always correctly aligned. - -* Fixed a bug where a tab character inserted after a quote on the same - line could add a slash before the quotes. - - This is "before" [tab] and "after" a tab. - - Previously gave this result: - -

        This is \"before\" [tab] and "after" a tab.

        - -* Removed a call to `htmlentities`. This fixes a bug where multibyte - characters present in the title of a link reference could lead to - invalid utf-8 characters. - -* Changed a regular expression in `_TokenizeHTML` that could lead to - a segmentation fault with PHP 4.3.8 on Linux. - -* Fixed some notices that could show up if PHP error reporting - E_NOTICE flag was set. - - -Copyright and License ---------------------- - -PHP Markdown -Copyright (c) 2004-2009 Michel Fortin - -All rights reserved. - -Based on Markdown -Copyright (c) 2003-2006 John Gruber - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -* Neither the name "Markdown" nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -This software is provided by the copyright holders and contributors "as -is" and any express or implied warranties, including, but not limited -to, the implied warranties of merchantability and fitness for a -particular purpose are disclaimed. In no event shall the copyright owner -or contributors be liable for any direct, indirect, incidental, special, -exemplary, or consequential damages (including, but not limited to, -procurement of substitute goods or services; loss of use, data, or -profits; or business interruption) however caused and on any theory of -liability, whether in contract, strict liability, or tort (including -negligence or otherwise) arising in any way out of the use of this -software, even if advised of the possibility of such damage. diff --git a/_piecrust/libs/Markdown/markdown.php b/_piecrust/libs/Markdown/markdown.php deleted file mode 100644 index dd1b9e5..0000000 --- a/_piecrust/libs/Markdown/markdown.php +++ /dev/null @@ -1,1732 +0,0 @@ - -# -# Original Markdown -# Copyright (c) 2004-2006 John Gruber -# -# - - -define( 'MARKDOWN_VERSION', "1.0.1n" ); # Sat 10 Oct 2009 - - -# -# Global default settings: -# - -# Change to ">" for HTML output -@define( 'MARKDOWN_EMPTY_ELEMENT_SUFFIX', " />"); - -# Define the width of a tab for code blocks. -@define( 'MARKDOWN_TAB_WIDTH', 4 ); - - -# -# WordPress settings: -# - -# Change to false to remove Markdown from posts and/or comments. -@define( 'MARKDOWN_WP_POSTS', true ); -@define( 'MARKDOWN_WP_COMMENTS', true ); - - - -### Standard Function Interface ### - -@define( 'MARKDOWN_PARSER_CLASS', 'Markdown_Parser' ); - -function Markdown($text) { -# -# Initialize the parser and return the result of its transform method. -# - # Setup static parser variable. - static $parser; - if (!isset($parser)) { - $parser_class = MARKDOWN_PARSER_CLASS; - $parser = new $parser_class; - } - - # Transform text using parser. - return $parser->transform($text); -} - - -### WordPress Plugin Interface ### - -/* -Plugin Name: Markdown -Plugin URI: http://michelf.com/projects/php-markdown/ -Description: Markdown syntax allows you to write using an easy-to-read, easy-to-write plain text format. Based on the original Perl version by John Gruber. More... -Version: 1.0.1n -Author: Michel Fortin -Author URI: http://michelf.com/ -*/ - -if (isset($wp_version)) { - # More details about how it works here: - # - - # Post content and excerpts - # - Remove WordPress paragraph generator. - # - Run Markdown on excerpt, then remove all tags. - # - Add paragraph tag around the excerpt, but remove it for the excerpt rss. - if (MARKDOWN_WP_POSTS) { - remove_filter('the_content', 'wpautop'); - remove_filter('the_content_rss', 'wpautop'); - remove_filter('the_excerpt', 'wpautop'); - add_filter('the_content', 'Markdown', 6); - add_filter('the_content_rss', 'Markdown', 6); - add_filter('get_the_excerpt', 'Markdown', 6); - add_filter('get_the_excerpt', 'trim', 7); - add_filter('the_excerpt', 'mdwp_add_p'); - add_filter('the_excerpt_rss', 'mdwp_strip_p'); - - remove_filter('content_save_pre', 'balanceTags', 50); - remove_filter('excerpt_save_pre', 'balanceTags', 50); - add_filter('the_content', 'balanceTags', 50); - add_filter('get_the_excerpt', 'balanceTags', 9); - } - - # Comments - # - Remove WordPress paragraph generator. - # - Remove WordPress auto-link generator. - # - Scramble important tags before passing them to the kses filter. - # - Run Markdown on excerpt then remove paragraph tags. - if (MARKDOWN_WP_COMMENTS) { - remove_filter('comment_text', 'wpautop', 30); - remove_filter('comment_text', 'make_clickable'); - add_filter('pre_comment_content', 'Markdown', 6); - add_filter('pre_comment_content', 'mdwp_hide_tags', 8); - add_filter('pre_comment_content', 'mdwp_show_tags', 12); - add_filter('get_comment_text', 'Markdown', 6); - add_filter('get_comment_excerpt', 'Markdown', 6); - add_filter('get_comment_excerpt', 'mdwp_strip_p', 7); - - global $mdwp_hidden_tags, $mdwp_placeholders; - $mdwp_hidden_tags = explode(' ', - '

         
      1. '); - $mdwp_placeholders = explode(' ', str_rot13( - 'pEj07ZbbBZ U1kqgh4w4p pre2zmeN6K QTi31t9pre ol0MP1jzJR '. - 'ML5IjmbRol ulANi1NsGY J7zRLJqPul liA8ctl16T K9nhooUHli')); - } - - function mdwp_add_p($text) { - if (!preg_match('{^$|^<(p|ul|ol|dl|pre|blockquote)>}i', $text)) { - $text = '

        '.$text.'

        '; - $text = preg_replace('{\n{2,}}', "

        \n\n

        ", $text); - } - return $text; - } - - function mdwp_strip_p($t) { return preg_replace('{}i', '', $t); } - - function mdwp_hide_tags($text) { - global $mdwp_hidden_tags, $mdwp_placeholders; - return str_replace($mdwp_hidden_tags, $mdwp_placeholders, $text); - } - function mdwp_show_tags($text) { - global $mdwp_hidden_tags, $mdwp_placeholders; - return str_replace($mdwp_placeholders, $mdwp_hidden_tags, $text); - } -} - - -### bBlog Plugin Info ### - -function identify_modifier_markdown() { - return array( - 'name' => 'markdown', - 'type' => 'modifier', - 'nicename' => 'Markdown', - 'description' => 'A text-to-HTML conversion tool for web writers', - 'authors' => 'Michel Fortin and John Gruber', - 'licence' => 'BSD-like', - 'version' => MARKDOWN_VERSION, - 'help' => 'Markdown syntax allows you to write using an easy-to-read, easy-to-write plain text format. Based on the original Perl version by John Gruber. More...' - ); -} - - -### Smarty Modifier Interface ### - -function smarty_modifier_markdown($text) { - return Markdown($text); -} - - -### Textile Compatibility Mode ### - -# Rename this file to "classTextile.php" and it can replace Textile everywhere. - -if (strcasecmp(substr(__FILE__, -16), "classTextile.php") == 0) { - # Try to include PHP SmartyPants. Should be in the same directory. - @include_once 'smartypants.php'; - # Fake Textile class. It calls Markdown instead. - class Textile { - function TextileThis($text, $lite='', $encode='') { - if ($lite == '' && $encode == '') $text = Markdown($text); - if (function_exists('SmartyPants')) $text = SmartyPants($text); - return $text; - } - # Fake restricted version: restrictions are not supported for now. - function TextileRestricted($text, $lite='', $noimage='') { - return $this->TextileThis($text, $lite); - } - # Workaround to ensure compatibility with TextPattern 4.0.3. - function blockLite($text) { return $text; } - } -} - - - -# -# Markdown Parser Class -# - -class Markdown_Parser { - - # Regex to match balanced [brackets]. - # Needed to insert a maximum bracked depth while converting to PHP. - var $nested_brackets_depth = 6; - var $nested_brackets_re; - - var $nested_url_parenthesis_depth = 4; - var $nested_url_parenthesis_re; - - # Table of hash values for escaped characters: - var $escape_chars = '\`*_{}[]()>#+-.!'; - var $escape_chars_re; - - # Change to ">" for HTML output. - var $empty_element_suffix = MARKDOWN_EMPTY_ELEMENT_SUFFIX; - var $tab_width = MARKDOWN_TAB_WIDTH; - - # Change to `true` to disallow markup or entities. - var $no_markup = false; - var $no_entities = false; - - # Predefined urls and titles for reference links and images. - var $predef_urls = array(); - var $predef_titles = array(); - - - function Markdown_Parser() { - # - # Constructor function. Initialize appropriate member variables. - # - $this->_initDetab(); - $this->prepareItalicsAndBold(); - - $this->nested_brackets_re = - str_repeat('(?>[^\[\]]+|\[', $this->nested_brackets_depth). - str_repeat('\])*', $this->nested_brackets_depth); - - $this->nested_url_parenthesis_re = - str_repeat('(?>[^()\s]+|\(', $this->nested_url_parenthesis_depth). - str_repeat('(?>\)))*', $this->nested_url_parenthesis_depth); - - $this->escape_chars_re = '['.preg_quote($this->escape_chars).']'; - - # Sort document, block, and span gamut in ascendent priority order. - asort($this->document_gamut); - asort($this->block_gamut); - asort($this->span_gamut); - } - - - # Internal hashes used during transformation. - var $urls = array(); - var $titles = array(); - var $html_hashes = array(); - - # Status flag to avoid invalid nesting. - var $in_anchor = false; - - - function setup() { - # - # Called before the transformation process starts to setup parser - # states. - # - # Clear global hashes. - $this->urls = $this->predef_urls; - $this->titles = $this->predef_titles; - $this->html_hashes = array(); - - $in_anchor = false; - } - - function teardown() { - # - # Called after the transformation process to clear any variable - # which may be taking up memory unnecessarly. - # - $this->urls = array(); - $this->titles = array(); - $this->html_hashes = array(); - } - - - function transform($text) { - # - # Main function. Performs some preprocessing on the input text - # and pass it through the document gamut. - # - $this->setup(); - - # Remove UTF-8 BOM and marker character in input, if present. - $text = preg_replace('{^\xEF\xBB\xBF|\x1A}', '', $text); - - # Standardize line endings: - # DOS to Unix and Mac to Unix - $text = preg_replace('{\r\n?}', "\n", $text); - - # Make sure $text ends with a couple of newlines: - $text .= "\n\n"; - - # Convert all tabs to spaces. - $text = $this->detab($text); - - # Turn block-level HTML blocks into hash entries - $text = $this->hashHTMLBlocks($text); - - # Strip any lines consisting only of spaces and tabs. - # This makes subsequent regexen easier to write, because we can - # match consecutive blank lines with /\n+/ instead of something - # contorted like /[ ]*\n+/ . - $text = preg_replace('/^[ ]+$/m', '', $text); - - # Run document gamut methods. - foreach ($this->document_gamut as $method => $priority) { - $text = $this->$method($text); - } - - $this->teardown(); - - return $text . "\n"; - } - - var $document_gamut = array( - # Strip link definitions, store in hashes. - "stripLinkDefinitions" => 20, - - "runBasicBlockGamut" => 30, - ); - - - function stripLinkDefinitions($text) { - # - # Strips link definitions from text, stores the URLs and titles in - # hash references. - # - $less_than_tab = $this->tab_width - 1; - - # Link defs are in the form: ^[id]: url "optional title" - $text = preg_replace_callback('{ - ^[ ]{0,'.$less_than_tab.'}\[(.+)\][ ]?: # id = $1 - [ ]* - \n? # maybe *one* newline - [ ]* - (?: - <(.+?)> # url = $2 - | - (\S+?) # url = $3 - ) - [ ]* - \n? # maybe one newline - [ ]* - (?: - (?<=\s) # lookbehind for whitespace - ["(] - (.*?) # title = $4 - [")] - [ ]* - )? # title is optional - (?:\n+|\Z) - }xm', - array(&$this, '_stripLinkDefinitions_callback'), - $text); - return $text; - } - function _stripLinkDefinitions_callback($matches) { - $link_id = strtolower($matches[1]); - $url = $matches[2] == '' ? $matches[3] : $matches[2]; - $this->urls[$link_id] = $url; - $this->titles[$link_id] =& $matches[4]; - return ''; # String that will replace the block - } - - - function hashHTMLBlocks($text) { - if ($this->no_markup) return $text; - - $less_than_tab = $this->tab_width - 1; - - # Hashify HTML blocks: - # We only want to do this for block-level HTML tags, such as headers, - # lists, and tables. That's because we still want to wrap

        s around - # "paragraphs" that are wrapped in non-block-level tags, such as anchors, - # phrase emphasis, and spans. The list of tags we're looking for is - # hard-coded: - # - # * List "a" is made of tags which can be both inline or block-level. - # These will be treated block-level when the start tag is alone on - # its line, otherwise they're not matched here and will be taken as - # inline later. - # * List "b" is made of tags which are always block-level; - # - $block_tags_a_re = 'ins|del'; - $block_tags_b_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|'. - 'script|noscript|form|fieldset|iframe|math'; - - # Regular expression for the content of a block tag. - $nested_tags_level = 4; - $attr = ' - (?> # optional tag attributes - \s # starts with whitespace - (?> - [^>"/]+ # text outside quotes - | - /+(?!>) # slash not followed by ">" - | - "[^"]*" # text inside double quotes (tolerate ">") - | - \'[^\']*\' # text inside single quotes (tolerate ">") - )* - )? - '; - $content = - str_repeat(' - (?> - [^<]+ # content without tag - | - <\2 # nested opening tag - '.$attr.' # attributes - (?> - /> - | - >', $nested_tags_level). # end of opening tag - '.*?'. # last level nested tag content - str_repeat(' - # closing nested tag - ) - | - <(?!/\2\s*> # other tags with a different name - ) - )*', - $nested_tags_level); - $content2 = str_replace('\2', '\3', $content); - - # First, look for nested blocks, e.g.: - #

        - #
        - # tags for inner block must be indented. - #
        - #
        - # - # The outermost tags must start at the left margin for this to match, and - # the inner nested divs must be indented. - # We need to do this before the next, more liberal match, because the next - # match will start at the first `
        ` and stop at the first `
        `. - $text = preg_replace_callback('{(?> - (?> - (?<=\n\n) # Starting after a blank line - | # or - \A\n? # the beginning of the doc - ) - ( # save in $1 - - # Match from `\n` to `\n`, handling nested tags - # in between. - - [ ]{0,'.$less_than_tab.'} - <('.$block_tags_b_re.')# start tag = $2 - '.$attr.'> # attributes followed by > and \n - '.$content.' # content, support nesting - # the matching end tag - [ ]* # trailing spaces/tabs - (?=\n+|\Z) # followed by a newline or end of document - - | # Special version for tags of group a. - - [ ]{0,'.$less_than_tab.'} - <('.$block_tags_a_re.')# start tag = $3 - '.$attr.'>[ ]*\n # attributes followed by > - '.$content2.' # content, support nesting - # the matching end tag - [ ]* # trailing spaces/tabs - (?=\n+|\Z) # followed by a newline or end of document - - | # Special case just for
        . It was easier to make a special - # case than to make the other regex more complicated. - - [ ]{0,'.$less_than_tab.'} - <(hr) # start tag = $2 - '.$attr.' # attributes - /?> # the matching end tag - [ ]* - (?=\n{2,}|\Z) # followed by a blank line or end of document - - | # Special case for standalone HTML comments: - - [ ]{0,'.$less_than_tab.'} - (?s: - - ) - [ ]* - (?=\n{2,}|\Z) # followed by a blank line or end of document - - | # PHP and ASP-style processor instructions ( - ) - [ ]* - (?=\n{2,}|\Z) # followed by a blank line or end of document - - ) - )}Sxmi', - array(&$this, '_hashHTMLBlocks_callback'), - $text); - - return $text; - } - function _hashHTMLBlocks_callback($matches) { - $text = $matches[1]; - $key = $this->hashBlock($text); - return "\n\n$key\n\n"; - } - - - function hashPart($text, $boundary = 'X') { - # - # Called whenever a tag must be hashed when a function insert an atomic - # element in the text stream. Passing $text to through this function gives - # a unique text-token which will be reverted back when calling unhash. - # - # The $boundary argument specify what character should be used to surround - # the token. By convension, "B" is used for block elements that needs not - # to be wrapped into paragraph tags at the end, ":" is used for elements - # that are word separators and "X" is used in the general case. - # - # Swap back any tag hash found in $text so we do not have to `unhash` - # multiple times at the end. - $text = $this->unhash($text); - - # Then hash the block. - static $i = 0; - $key = "$boundary\x1A" . ++$i . $boundary; - $this->html_hashes[$key] = $text; - return $key; # String that will replace the tag. - } - - - function hashBlock($text) { - # - # Shortcut function for hashPart with block-level boundaries. - # - return $this->hashPart($text, 'B'); - } - - - var $block_gamut = array( - # - # These are all the transformations that form block-level - # tags like paragraphs, headers, and list items. - # - "doHeaders" => 10, - "doHorizontalRules" => 20, - - "doLists" => 40, - "doCodeBlocks" => 50, - "doBlockQuotes" => 60, - ); - - function runBlockGamut($text) { - # - # Run block gamut tranformations. - # - # We need to escape raw HTML in Markdown source before doing anything - # else. This need to be done for each block, and not only at the - # begining in the Markdown function since hashed blocks can be part of - # list items and could have been indented. Indented blocks would have - # been seen as a code block in a previous pass of hashHTMLBlocks. - $text = $this->hashHTMLBlocks($text); - - return $this->runBasicBlockGamut($text); - } - - function runBasicBlockGamut($text) { - # - # Run block gamut tranformations, without hashing HTML blocks. This is - # useful when HTML blocks are known to be already hashed, like in the first - # whole-document pass. - # - foreach ($this->block_gamut as $method => $priority) { - $text = $this->$method($text); - } - - # Finally form paragraph and restore hashed blocks. - $text = $this->formParagraphs($text); - - return $text; - } - - - function doHorizontalRules($text) { - # Do Horizontal Rules: - return preg_replace( - '{ - ^[ ]{0,3} # Leading space - ([-*_]) # $1: First marker - (?> # Repeated marker group - [ ]{0,2} # Zero, one, or two spaces. - \1 # Marker character - ){2,} # Group repeated at least twice - [ ]* # Tailing spaces - $ # End of line. - }mx', - "\n".$this->hashBlock("empty_element_suffix")."\n", - $text); - } - - - var $span_gamut = array( - # - # These are all the transformations that occur *within* block-level - # tags like paragraphs, headers, and list items. - # - # Process character escapes, code spans, and inline HTML - # in one shot. - "parseSpan" => -30, - - # Process anchor and image tags. Images must come first, - # because ![foo][f] looks like an anchor. - "doImages" => 10, - "doAnchors" => 20, - - # Make links out of things like `` - # Must come after doAnchors, because you can use < and > - # delimiters in inline links like [this](). - "doAutoLinks" => 30, - "encodeAmpsAndAngles" => 40, - - "doItalicsAndBold" => 50, - "doHardBreaks" => 60, - ); - - function runSpanGamut($text) { - # - # Run span gamut tranformations. - # - foreach ($this->span_gamut as $method => $priority) { - $text = $this->$method($text); - } - - return $text; - } - - - function doHardBreaks($text) { - # Do hard breaks: - return preg_replace_callback('/ {2,}\n/', - array(&$this, '_doHardBreaks_callback'), $text); - } - function _doHardBreaks_callback($matches) { - return $this->hashPart("empty_element_suffix\n"); - } - - - function doAnchors($text) { - # - # Turn Markdown link shortcuts into XHTML tags. - # - if ($this->in_anchor) return $text; - $this->in_anchor = true; - - # - # First, handle reference-style links: [link text] [id] - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ('.$this->nested_brackets_re.') # link text = $2 - \] - - [ ]? # one optional space - (?:\n[ ]*)? # one optional newline followed by spaces - - \[ - (.*?) # id = $3 - \] - ) - }xs', - array(&$this, '_doAnchors_reference_callback'), $text); - - # - # Next, inline-style links: [link text](url "optional title") - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ('.$this->nested_brackets_re.') # link text = $2 - \] - \( # literal paren - [ \n]* - (?: - <(.+?)> # href = $3 - | - ('.$this->nested_url_parenthesis_re.') # href = $4 - ) - [ \n]* - ( # $5 - ([\'"]) # quote char = $6 - (.*?) # Title = $7 - \6 # matching quote - [ \n]* # ignore any spaces/tabs between closing quote and ) - )? # title is optional - \) - ) - }xs', - array(&$this, '_doAnchors_inline_callback'), $text); - - # - # Last, handle reference-style shortcuts: [link text] - # These must come last in case you've also got [link text][1] - # or [link text](/foo) - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ([^\[\]]+) # link text = $2; can\'t contain [ or ] - \] - ) - }xs', - array(&$this, '_doAnchors_reference_callback'), $text); - - $this->in_anchor = false; - return $text; - } - function _doAnchors_reference_callback($matches) { - $whole_match = $matches[1]; - $link_text = $matches[2]; - $link_id =& $matches[3]; - - if ($link_id == "") { - # for shortcut links like [this][] or [this]. - $link_id = $link_text; - } - - # lower-case and turn embedded newlines into spaces - $link_id = strtolower($link_id); - $link_id = preg_replace('{[ ]?\n}', ' ', $link_id); - - if (isset($this->urls[$link_id])) { - $url = $this->urls[$link_id]; - $url = $this->encodeAttribute($url); - - $result = "titles[$link_id] ) ) { - $title = $this->titles[$link_id]; - $title = $this->encodeAttribute($title); - $result .= " title=\"$title\""; - } - - $link_text = $this->runSpanGamut($link_text); - $result .= ">$link_text"; - $result = $this->hashPart($result); - } - else { - $result = $whole_match; - } - return $result; - } - function _doAnchors_inline_callback($matches) { - $whole_match = $matches[1]; - $link_text = $this->runSpanGamut($matches[2]); - $url = $matches[3] == '' ? $matches[4] : $matches[3]; - $title =& $matches[7]; - - $url = $this->encodeAttribute($url); - - $result = "encodeAttribute($title); - $result .= " title=\"$title\""; - } - - $link_text = $this->runSpanGamut($link_text); - $result .= ">$link_text"; - - return $this->hashPart($result); - } - - - function doImages($text) { - # - # Turn Markdown image shortcuts into tags. - # - # - # First, handle reference-style labeled images: ![alt text][id] - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - !\[ - ('.$this->nested_brackets_re.') # alt text = $2 - \] - - [ ]? # one optional space - (?:\n[ ]*)? # one optional newline followed by spaces - - \[ - (.*?) # id = $3 - \] - - ) - }xs', - array(&$this, '_doImages_reference_callback'), $text); - - # - # Next, handle inline images: ![alt text](url "optional title") - # Don't forget: encode * and _ - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - !\[ - ('.$this->nested_brackets_re.') # alt text = $2 - \] - \s? # One optional whitespace character - \( # literal paren - [ \n]* - (?: - <(\S*)> # src url = $3 - | - ('.$this->nested_url_parenthesis_re.') # src url = $4 - ) - [ \n]* - ( # $5 - ([\'"]) # quote char = $6 - (.*?) # title = $7 - \6 # matching quote - [ \n]* - )? # title is optional - \) - ) - }xs', - array(&$this, '_doImages_inline_callback'), $text); - - return $text; - } - function _doImages_reference_callback($matches) { - $whole_match = $matches[1]; - $alt_text = $matches[2]; - $link_id = strtolower($matches[3]); - - if ($link_id == "") { - $link_id = strtolower($alt_text); # for shortcut links like ![this][]. - } - - $alt_text = $this->encodeAttribute($alt_text); - if (isset($this->urls[$link_id])) { - $url = $this->encodeAttribute($this->urls[$link_id]); - $result = "\"$alt_text\"";titles[$link_id])) { - $title = $this->titles[$link_id]; - $title = $this->encodeAttribute($title); - $result .= " title=\"$title\""; - } - $result .= $this->empty_element_suffix; - $result = $this->hashPart($result); - } - else { - # If there's no such link ID, leave intact: - $result = $whole_match; - } - - return $result; - } - function _doImages_inline_callback($matches) { - $whole_match = $matches[1]; - $alt_text = $matches[2]; - $url = $matches[3] == '' ? $matches[4] : $matches[3]; - $title =& $matches[7]; - - $alt_text = $this->encodeAttribute($alt_text); - $url = $this->encodeAttribute($url); - $result = "\"$alt_text\"";encodeAttribute($title); - $result .= " title=\"$title\""; # $title already quoted - } - $result .= $this->empty_element_suffix; - - return $this->hashPart($result); - } - - - function doHeaders($text) { - # Setext-style headers: - # Header 1 - # ======== - # - # Header 2 - # -------- - # - $text = preg_replace_callback('{ ^(.+?)[ ]*\n(=+|-+)[ ]*\n+ }mx', - array(&$this, '_doHeaders_callback_setext'), $text); - - # atx-style headers: - # # Header 1 - # ## Header 2 - # ## Header 2 with closing hashes ## - # ... - # ###### Header 6 - # - $text = preg_replace_callback('{ - ^(\#{1,6}) # $1 = string of #\'s - [ ]* - (.+?) # $2 = Header text - [ ]* - \#* # optional closing #\'s (not counted) - \n+ - }xm', - array(&$this, '_doHeaders_callback_atx'), $text); - - return $text; - } - function _doHeaders_callback_setext($matches) { - # Terrible hack to check we haven't found an empty list item. - if ($matches[2] == '-' && preg_match('{^-(?: |$)}', $matches[1])) - return $matches[0]; - - $level = $matches[2]{0} == '=' ? 1 : 2; - $block = "".$this->runSpanGamut($matches[1]).""; - return "\n" . $this->hashBlock($block) . "\n\n"; - } - function _doHeaders_callback_atx($matches) { - $level = strlen($matches[1]); - $block = "".$this->runSpanGamut($matches[2]).""; - return "\n" . $this->hashBlock($block) . "\n\n"; - } - - - function doLists($text) { - # - # Form HTML ordered (numbered) and unordered (bulleted) lists. - # - $less_than_tab = $this->tab_width - 1; - - # Re-usable patterns to match list item bullets and number markers: - $marker_ul_re = '[*+-]'; - $marker_ol_re = '\d+[.]'; - $marker_any_re = "(?:$marker_ul_re|$marker_ol_re)"; - - $markers_relist = array( - $marker_ul_re => $marker_ol_re, - $marker_ol_re => $marker_ul_re, - ); - - foreach ($markers_relist as $marker_re => $other_marker_re) { - # Re-usable pattern to match any entirel ul or ol list: - $whole_list_re = ' - ( # $1 = whole list - ( # $2 - ([ ]{0,'.$less_than_tab.'}) # $3 = number of spaces - ('.$marker_re.') # $4 = first list item marker - [ ]+ - ) - (?s:.+?) - ( # $5 - \z - | - \n{2,} - (?=\S) - (?! # Negative lookahead for another list item marker - [ ]* - '.$marker_re.'[ ]+ - ) - | - (?= # Lookahead for another kind of list - \n - \3 # Must have the same indentation - '.$other_marker_re.'[ ]+ - ) - ) - ) - '; // mx - - # We use a different prefix before nested lists than top-level lists. - # See extended comment in _ProcessListItems(). - - if ($this->list_level) { - $text = preg_replace_callback('{ - ^ - '.$whole_list_re.' - }mx', - array(&$this, '_doLists_callback'), $text); - } - else { - $text = preg_replace_callback('{ - (?:(?<=\n)\n|\A\n?) # Must eat the newline - '.$whole_list_re.' - }mx', - array(&$this, '_doLists_callback'), $text); - } - } - - return $text; - } - function _doLists_callback($matches) { - # Re-usable patterns to match list item bullets and number markers: - $marker_ul_re = '[*+-]'; - $marker_ol_re = '\d+[.]'; - $marker_any_re = "(?:$marker_ul_re|$marker_ol_re)"; - - $list = $matches[1]; - $list_type = preg_match("/$marker_ul_re/", $matches[4]) ? "ul" : "ol"; - - $marker_any_re = ( $list_type == "ul" ? $marker_ul_re : $marker_ol_re ); - - $list .= "\n"; - $result = $this->processListItems($list, $marker_any_re); - - $result = $this->hashBlock("<$list_type>\n" . $result . ""); - return "\n". $result ."\n\n"; - } - - var $list_level = 0; - - function processListItems($list_str, $marker_any_re) { - # - # Process the contents of a single ordered or unordered list, splitting it - # into individual list items. - # - # The $this->list_level global keeps track of when we're inside a list. - # Each time we enter a list, we increment it; when we leave a list, - # we decrement. If it's zero, we're not in a list anymore. - # - # We do this because when we're not inside a list, we want to treat - # something like this: - # - # I recommend upgrading to version - # 8. Oops, now this line is treated - # as a sub-list. - # - # As a single paragraph, despite the fact that the second line starts - # with a digit-period-space sequence. - # - # Whereas when we're inside a list (or sub-list), that line will be - # treated as the start of a sub-list. What a kludge, huh? This is - # an aspect of Markdown's syntax that's hard to parse perfectly - # without resorting to mind-reading. Perhaps the solution is to - # change the syntax rules such that sub-lists must start with a - # starting cardinal number; e.g. "1." or "a.". - - $this->list_level++; - - # trim trailing blank lines: - $list_str = preg_replace("/\n{2,}\\z/", "\n", $list_str); - - $list_str = preg_replace_callback('{ - (\n)? # leading line = $1 - (^[ ]*) # leading whitespace = $2 - ('.$marker_any_re.' # list marker and space = $3 - (?:[ ]+|(?=\n)) # space only required if item is not empty - ) - ((?s:.*?)) # list item text = $4 - (?:(\n+(?=\n))|\n) # tailing blank line = $5 - (?= \n* (\z | \2 ('.$marker_any_re.') (?:[ ]+|(?=\n)))) - }xm', - array(&$this, '_processListItems_callback'), $list_str); - - $this->list_level--; - return $list_str; - } - function _processListItems_callback($matches) { - $item = $matches[4]; - $leading_line =& $matches[1]; - $leading_space =& $matches[2]; - $marker_space = $matches[3]; - $tailing_blank_line =& $matches[5]; - - if ($leading_line || $tailing_blank_line || - preg_match('/\n{2,}/', $item)) - { - # Replace marker with the appropriate whitespace indentation - $item = $leading_space . str_repeat(' ', strlen($marker_space)) . $item; - $item = $this->runBlockGamut($this->outdent($item)."\n"); - } - else { - # Recursion for sub-lists: - $item = $this->doLists($this->outdent($item)); - $item = preg_replace('/\n+$/', '', $item); - $item = $this->runSpanGamut($item); - } - - return "
      2. " . $item . "
      3. \n"; - } - - - function doCodeBlocks($text) { - # - # Process Markdown `
        ` blocks.
        -	#
        -		$text = preg_replace_callback('{
        -				(?:\n\n|\A\n?)
        -				(	            # $1 = the code block -- one or more lines, starting with a space/tab
        -				  (?>
        -					[ ]{'.$this->tab_width.'}  # Lines must start with a tab or a tab-width of spaces
        -					.*\n+
        -				  )+
        -				)
        -				((?=^[ ]{0,'.$this->tab_width.'}\S)|\Z)	# Lookahead for non-space at line-start, or end of doc
        -			}xm',
        -			array(&$this, '_doCodeBlocks_callback'), $text);
        -
        -		return $text;
        -	}
        -	function _doCodeBlocks_callback($matches) {
        -		$codeblock = $matches[1];
        -
        -		$codeblock = $this->outdent($codeblock);
        -		$codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES);
        -
        -		# trim leading newlines and trailing newlines
        -		$codeblock = preg_replace('/\A\n+|\n+\z/', '', $codeblock);
        -
        -		$codeblock = "
        $codeblock\n
        "; - return "\n\n".$this->hashBlock($codeblock)."\n\n"; - } - - - function makeCodeSpan($code) { - # - # Create a code span markup for $code. Called from handleSpanToken. - # - $code = htmlspecialchars(trim($code), ENT_NOQUOTES); - return $this->hashPart("$code"); - } - - - var $em_relist = array( - '' => '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(?em_relist as $em => $em_re) { - foreach ($this->strong_relist as $strong => $strong_re) { - # Construct list of allowed token expressions. - $token_relist = array(); - if (isset($this->em_strong_relist["$em$strong"])) { - $token_relist[] = $this->em_strong_relist["$em$strong"]; - } - $token_relist[] = $em_re; - $token_relist[] = $strong_re; - - # Construct master expression from list. - $token_re = '{('. implode('|', $token_relist) .')}'; - $this->em_strong_prepared_relist["$em$strong"] = $token_re; - } - } - } - - function doItalicsAndBold($text) { - $token_stack = array(''); - $text_stack = array(''); - $em = ''; - $strong = ''; - $tree_char_em = false; - - while (1) { - # - # Get prepared regular expression for seraching emphasis tokens - # in current context. - # - $token_re = $this->em_strong_prepared_relist["$em$strong"]; - - # - # Each loop iteration search for the next emphasis token. - # Each token is then passed to handleSpanToken. - # - $parts = preg_split($token_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE); - $text_stack[0] .= $parts[0]; - $token =& $parts[1]; - $text =& $parts[2]; - - if (empty($token)) { - # Reached end of text span: empty stack without emitting. - # any more emphasis. - while ($token_stack[0]) { - $text_stack[1] .= array_shift($token_stack); - $text_stack[0] .= array_shift($text_stack); - } - break; - } - - $token_len = strlen($token); - if ($tree_char_em) { - # Reached closing marker while inside a three-char emphasis. - if ($token_len == 3) { - # Three-char closing marker, close em and strong. - array_shift($token_stack); - $span = array_shift($text_stack); - $span = $this->runSpanGamut($span); - $span = "$span"; - $text_stack[0] .= $this->hashPart($span); - $em = ''; - $strong = ''; - } else { - # Other closing marker: close one em or strong and - # change current token state to match the other - $token_stack[0] = str_repeat($token{0}, 3-$token_len); - $tag = $token_len == 2 ? "strong" : "em"; - $span = $text_stack[0]; - $span = $this->runSpanGamut($span); - $span = "<$tag>$span"; - $text_stack[0] = $this->hashPart($span); - $$tag = ''; # $$tag stands for $em or $strong - } - $tree_char_em = false; - } else if ($token_len == 3) { - if ($em) { - # Reached closing marker for both em and strong. - # Closing strong marker: - for ($i = 0; $i < 2; ++$i) { - $shifted_token = array_shift($token_stack); - $tag = strlen($shifted_token) == 2 ? "strong" : "em"; - $span = array_shift($text_stack); - $span = $this->runSpanGamut($span); - $span = "<$tag>$span"; - $text_stack[0] .= $this->hashPart($span); - $$tag = ''; # $$tag stands for $em or $strong - } - } else { - # Reached opening three-char emphasis marker. Push on token - # stack; will be handled by the special condition above. - $em = $token{0}; - $strong = "$em$em"; - array_unshift($token_stack, $token); - array_unshift($text_stack, ''); - $tree_char_em = true; - } - } else if ($token_len == 2) { - if ($strong) { - # Unwind any dangling emphasis marker: - if (strlen($token_stack[0]) == 1) { - $text_stack[1] .= array_shift($token_stack); - $text_stack[0] .= array_shift($text_stack); - } - # Closing strong marker: - array_shift($token_stack); - $span = array_shift($text_stack); - $span = $this->runSpanGamut($span); - $span = "$span"; - $text_stack[0] .= $this->hashPart($span); - $strong = ''; - } else { - array_unshift($token_stack, $token); - array_unshift($text_stack, ''); - $strong = $token; - } - } else { - # Here $token_len == 1 - if ($em) { - if (strlen($token_stack[0]) == 1) { - # Closing emphasis marker: - array_shift($token_stack); - $span = array_shift($text_stack); - $span = $this->runSpanGamut($span); - $span = "$span"; - $text_stack[0] .= $this->hashPart($span); - $em = ''; - } else { - $text_stack[0] .= $token; - } - } else { - array_unshift($token_stack, $token); - array_unshift($text_stack, ''); - $em = $token; - } - } - } - return $text_stack[0]; - } - - - function doBlockQuotes($text) { - $text = preg_replace_callback('/ - ( # Wrap whole match in $1 - (?> - ^[ ]*>[ ]? # ">" at the start of a line - .+\n # rest of the first line - (.+\n)* # subsequent consecutive lines - \n* # blanks - )+ - ) - /xm', - array(&$this, '_doBlockQuotes_callback'), $text); - - return $text; - } - function _doBlockQuotes_callback($matches) { - $bq = $matches[1]; - # trim one level of quoting - trim whitespace-only lines - $bq = preg_replace('/^[ ]*>[ ]?|^[ ]+$/m', '', $bq); - $bq = $this->runBlockGamut($bq); # recurse - - $bq = preg_replace('/^/m', " ", $bq); - # These leading spaces cause problem with
         content, 
        -		# so we need to fix that:
        -		$bq = preg_replace_callback('{(\s*
        .+?
        )}sx', - array(&$this, '_doBlockQuotes_callback2'), $bq); - - return "\n". $this->hashBlock("
        \n$bq\n
        ")."\n\n"; - } - function _doBlockQuotes_callback2($matches) { - $pre = $matches[1]; - $pre = preg_replace('/^ /m', '', $pre); - return $pre; - } - - - function formParagraphs($text) { - # - # Params: - # $text - string to process with html

        tags - # - # Strip leading and trailing lines: - $text = preg_replace('/\A\n+|\n+\z/', '', $text); - - $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY); - - # - # Wrap

        tags and unhashify HTML blocks - # - foreach ($grafs as $key => $value) { - if (!preg_match('/^B\x1A[0-9]+B$/', $value)) { - # Is a paragraph. - $value = $this->runSpanGamut($value); - $value = preg_replace('/^([ ]*)/', "

        ", $value); - $value .= "

        "; - $grafs[$key] = $this->unhash($value); - } - else { - # Is a block. - # Modify elements of @grafs in-place... - $graf = $value; - $block = $this->html_hashes[$graf]; - $graf = $block; -// if (preg_match('{ -// \A -// ( # $1 =
        tag -//
        ]* -// \b -// markdown\s*=\s* ([\'"]) # $2 = attr quote char -// 1 -// \2 -// [^>]* -// > -// ) -// ( # $3 = contents -// .* -// ) -// (
        ) # $4 = closing tag -// \z -// }xs', $block, $matches)) -// { -// list(, $div_open, , $div_content, $div_close) = $matches; -// -// # We can't call Markdown(), because that resets the hash; -// # that initialization code should be pulled into its own sub, though. -// $div_content = $this->hashHTMLBlocks($div_content); -// -// # Run document gamut methods on the content. -// foreach ($this->document_gamut as $method => $priority) { -// $div_content = $this->$method($div_content); -// } -// -// $div_open = preg_replace( -// '{\smarkdown\s*=\s*([\'"]).+?\1}', '', $div_open); -// -// $graf = $div_open . "\n" . $div_content . "\n" . $div_close; -// } - $grafs[$key] = $graf; - } - } - - return implode("\n\n", $grafs); - } - - - function encodeAttribute($text) { - # - # Encode text for a double-quoted HTML attribute. This function - # is *not* suitable for attributes enclosed in single quotes. - # - $text = $this->encodeAmpsAndAngles($text); - $text = str_replace('"', '"', $text); - return $text; - } - - - function encodeAmpsAndAngles($text) { - # - # Smart processing for ampersands and angle brackets that need to - # be encoded. Valid character entities are left alone unless the - # no-entities mode is set. - # - if ($this->no_entities) { - $text = str_replace('&', '&', $text); - } else { - # Ampersand-encoding based entirely on Nat Irons's Amputator - # MT plugin: - $text = preg_replace('/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/', - '&', $text);; - } - # Encode remaining <'s - $text = str_replace('<', '<', $text); - - return $text; - } - - - function doAutoLinks($text) { - $text = preg_replace_callback('{<((https?|ftp|dict):[^\'">\s]+)>}i', - array(&$this, '_doAutoLinks_url_callback'), $text); - - # Email addresses: - $text = preg_replace_callback('{ - < - (?:mailto:)? - ( - (?: - [-!#$%&\'*+/=?^_`.{|}~\w\x80-\xFF]+ - | - ".*?" - ) - \@ - (?: - [-a-z0-9\x80-\xFF]+(\.[-a-z0-9\x80-\xFF]+)*\.[a-z]+ - | - \[[\d.a-fA-F:]+\] # IPv4 & IPv6 - ) - ) - > - }xi', - array(&$this, '_doAutoLinks_email_callback'), $text); - - return $text; - } - function _doAutoLinks_url_callback($matches) { - $url = $this->encodeAttribute($matches[1]); - $link = "$url"; - return $this->hashPart($link); - } - function _doAutoLinks_email_callback($matches) { - $address = $matches[1]; - $link = $this->encodeEmailAddress($address); - return $this->hashPart($link); - } - - - function encodeEmailAddress($addr) { - # - # Input: an email address, e.g. "foo@example.com" - # - # Output: the email address as a mailto link, with each character - # of the address encoded as either a decimal or hex entity, in - # the hopes of foiling most address harvesting spam bots. E.g.: - # - #

        foo@exampl - # e.com

        - # - # Based by a filter by Matthew Wickline, posted to BBEdit-Talk. - # With some optimizations by Milian Wolff. - # - $addr = "mailto:" . $addr; - $chars = preg_split('/(? $char) { - $ord = ord($char); - # Ignore non-ascii chars. - if ($ord < 128) { - $r = ($seed * (1 + $key)) % 100; # Pseudo-random function. - # roughly 10% raw, 45% hex, 45% dec - # '@' *must* be encoded. I insist. - if ($r > 90 && $char != '@') /* do nothing */; - else if ($r < 45) $chars[$key] = '&#x'.dechex($ord).';'; - else $chars[$key] = '&#'.$ord.';'; - } - } - - $addr = implode('', $chars); - $text = implode('', array_slice($chars, 7)); # text without `mailto:` - $addr = "$text"; - - return $addr; - } - - - function parseSpan($str) { - # - # Take the string $str and parse it into tokens, hashing embeded HTML, - # escaped characters and handling code spans. - # - $output = ''; - - $span_re = '{ - ( - \\\\'.$this->escape_chars_re.' - | - (?no_markup ? '' : ' - | - # comment - | - <\?.*?\?> | <%.*?%> # processing instruction - | - <[/!$]?[-a-zA-Z0-9:_]+ # regular tags - (?> - \s - (?>[^"\'>]+|"[^"]*"|\'[^\']*\')* - )? - > - ').' - ) - }xs'; - - while (1) { - # - # Each loop iteration seach for either the next tag, the next - # openning code span marker, or the next escaped character. - # Each token is then passed to handleSpanToken. - # - $parts = preg_split($span_re, $str, 2, PREG_SPLIT_DELIM_CAPTURE); - - # Create token from text preceding tag. - if ($parts[0] != "") { - $output .= $parts[0]; - } - - # Check if we reach the end. - if (isset($parts[1])) { - $output .= $this->handleSpanToken($parts[1], $parts[2]); - $str = $parts[2]; - } - else { - break; - } - } - - return $output; - } - - - function handleSpanToken($token, &$str) { - # - # Handle $token provided by parseSpan by determining its nature and - # returning the corresponding value that should replace it. - # - switch ($token{0}) { - case "\\": - return $this->hashPart("&#". ord($token{1}). ";"); - case "`": - # Search for end marker in remaining text. - if (preg_match('/^(.*?[^`])'.preg_quote($token).'(?!`)(.*)$/sm', - $str, $matches)) - { - $str = $matches[2]; - $codespan = $this->makeCodeSpan($matches[1]); - return $this->hashPart($codespan); - } - return $token; // return as text since no ending marker found. - default: - return $this->hashPart($token); - } - } - - - function outdent($text) { - # - # Remove one level of line-leading tabs or spaces - # - return preg_replace('/^(\t|[ ]{1,'.$this->tab_width.'})/m', '', $text); - } - - - # String length function for detab. `_initDetab` will create a function to - # hanlde UTF-8 if the default function does not exist. - var $utf8_strlen = 'mb_strlen'; - - function detab($text) { - # - # Replace tabs with the appropriate amount of space. - # - # For each line we separate the line in blocks delemited by - # tab characters. Then we reconstruct every line by adding the - # appropriate number of space between each blocks. - - $text = preg_replace_callback('/^.*\t.*$/m', - array(&$this, '_detab_callback'), $text); - - return $text; - } - function _detab_callback($matches) { - $line = $matches[0]; - $strlen = $this->utf8_strlen; # strlen function for UTF-8. - - # Split in blocks. - $blocks = explode("\t", $line); - # Add each blocks to the line. - $line = $blocks[0]; - unset($blocks[0]); # Do not add first block twice. - foreach ($blocks as $block) { - # Calculate amount of space, insert spaces, insert block. - $amount = $this->tab_width - - $strlen($line, 'UTF-8') % $this->tab_width; - $line .= str_repeat(" ", $amount) . $block; - } - return $line; - } - function _initDetab() { - # - # Check for the availability of the function in the `utf8_strlen` property - # (initially `mb_strlen`). If the function is not available, create a - # function that will loosely count the number of UTF-8 characters with a - # regular expression. - # - if (function_exists($this->utf8_strlen)) return; - $this->utf8_strlen = create_function('$text', 'return preg_match_all( - "/[\\\\x00-\\\\xBF]|[\\\\xC0-\\\\xFF][\\\\x80-\\\\xBF]*/", - $text, $m);'); - } - - - function unhash($text) { - # - # Swap back in all the tags hashed by _HashHTMLBlocks. - # - return preg_replace_callback('/(.)\x1A[0-9]+\1/', - array(&$this, '_unhash_callback'), $text); - } - function _unhash_callback($matches) { - return $this->html_hashes[$matches[0]]; - } - -} - -/* - -PHP Markdown -============ - -Description ------------ - -This is a PHP translation of the original Markdown formatter written in -Perl by John Gruber. - -Markdown is a text-to-HTML filter; it translates an easy-to-read / -easy-to-write structured text format into HTML. Markdown's text format -is most similar to that of plain text email, and supports features such -as headers, *emphasis*, code blocks, blockquotes, and links. - -Markdown's syntax is designed not as a generic markup language, but -specifically to serve as a front-end to (X)HTML. You can use span-level -HTML tags anywhere in a Markdown document, and you can use block level -HTML tags (like
        and as well). - -For more information about Markdown's syntax, see: - - - - -Bugs ----- - -To file bug reports please send email to: - - - -Please include with your report: (1) the example input; (2) the output you -expected; (3) the output Markdown actually produced. - - -Version History ---------------- - -See the readme file for detailed release notes for this version. - - -Copyright and License ---------------------- - -PHP Markdown -Copyright (c) 2004-2009 Michel Fortin - -All rights reserved. - -Based on Markdown -Copyright (c) 2003-2006 John Gruber - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -* Neither the name "Markdown" nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -This software is provided by the copyright holders and contributors "as -is" and any express or implied warranties, including, but not limited -to, the implied warranties of merchantability and fitness for a -particular purpose are disclaimed. In no event shall the copyright owner -or contributors be liable for any direct, indirect, incidental, special, -exemplary, or consequential damages (including, but not limited to, -procurement of substitute goods or services; loss of use, data, or -profits; or business interruption) however caused and on any theory of -liability, whether in contract, strict liability, or tort (including -negligence or otherwise) arising in any way out of the use of this -software, even if advised of the possibility of such damage. - -*/ -?> \ No newline at end of file diff --git a/_piecrust/libs/MarkdownExtra/License.text b/_piecrust/libs/MarkdownExtra/License.text deleted file mode 100644 index 4d6bf8b..0000000 --- a/_piecrust/libs/MarkdownExtra/License.text +++ /dev/null @@ -1,36 +0,0 @@ -PHP Markdown & Extra -Copyright (c) 2004-2009 Michel Fortin - -All rights reserved. - -Based on Markdown -Copyright (c) 2003-2006 John Gruber - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -* Neither the name "Markdown" nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -This software is provided by the copyright holders and contributors "as -is" and any express or implied warranties, including, but not limited -to, the implied warranties of merchantability and fitness for a -particular purpose are disclaimed. In no event shall the copyright owner -or contributors be liable for any direct, indirect, incidental, special, -exemplary, or consequential damages (including, but not limited to, -procurement of substitute goods or services; loss of use, data, or -profits; or business interruption) however caused and on any theory of -liability, whether in contract, strict liability, or tort (including -negligence or otherwise) arising in any way out of the use of this -software, even if advised of the possibility of such damage. diff --git a/_piecrust/libs/MarkdownExtra/PHP Markdown Extra Readme.text b/_piecrust/libs/MarkdownExtra/PHP Markdown Extra Readme.text deleted file mode 100644 index b72ee99..0000000 --- a/_piecrust/libs/MarkdownExtra/PHP Markdown Extra Readme.text +++ /dev/null @@ -1,786 +0,0 @@ -PHP Markdown Extra -================== - -Version 1.2.4 - Sat 10 Oct 2009 - -by Michel Fortin - - -based on Markdown by John Gruber - - - -Introduction ------------- - -This is a special version of PHP Markdown with extra features. See - for details. - -Markdown is a text-to-HTML conversion tool for web writers. Markdown -allows you to write using an easy-to-read, easy-to-write plain text -format, then convert it to structurally valid XHTML (or HTML). - -"Markdown" is two things: a plain text markup syntax, and a software -tool, written in Perl, that converts the plain text markup to HTML. -PHP Markdown is a port to PHP of the original Markdown program by -John Gruber. - -PHP Markdown can work as a plug-in for WordPress and bBlog, as a -modifier for the Smarty templating engine, or as a remplacement for -textile formatting in any software that support textile. - -Full documentation of Markdown's syntax is available on John's -Markdown page: - - -Installation and Requirement ----------------------------- - -PHP Markdown requires PHP version 4.0.5 or later. - - -### WordPress ### - -PHP Markdown works with [WordPress][wp], version 1.2 or later. - - [wp]: http://wordpress.org/ - -1. To use PHP Markdown with WordPress, place the "makrdown.php" file - in the "plugins" folder. This folder is located inside - "wp-content" at the root of your site: - - (site home)/wp-content/plugins/ - -2. Activate the plugin with the administrative interface of - WordPress. In the "Plugins" section you will now find Markdown. - To activate the plugin, click on the "Activate" button on the - same line than Markdown. Your entries will now be formatted by - PHP Markdown. - -3. To post Markdown content, you'll first have to disable the - "visual" editor in the User section of WordPress. - -You can configure PHP Markdown to not apply to the comments on your -WordPress weblog. See the "Configuration" section below. - -It is not possible at this time to apply a different set of -filters to different entries. All your entries will be formated by -PHP Markdown. This is a limitation of WordPress. If your old entries -are written in HTML (as opposed to another formatting syntax, like -Textile), they'll probably stay fine after installing Markdown. - - -### bBlog ### - -PHP Markdown also works with [bBlog][bb]. - - [bb]: http://www.bblog.com/ - -To use PHP Markdown with bBlog, rename "markdown.php" to -"modifier.markdown.php" and place the file in the "bBlog_plugins" -folder. This folder is located inside the "bblog" directory of -your site, like this: - - (site home)/bblog/bBlog_plugins/modifier.markdown.php - -Select "Markdown" as the "Entry Modifier" when you post a new -entry. This setting will only apply to the entry you are editing. - - -### Replacing Textile in TextPattern ### - -[TextPattern][tp] use [Textile][tx] to format your text. You can -replace Textile by Markdown in TextPattern without having to change -any code by using the *Texitle Compatibility Mode*. This may work -with other software that expect Textile too. - - [tx]: http://www.textism.com/tools/textile/ - [tp]: http://www.textpattern.com/ - -1. Rename the "markdown.php" file to "classTextile.php". This will - make PHP Markdown behave as if it was the actual Textile parser. - -2. Replace the "classTextile.php" file TextPattern installed in your - web directory. It can be found in the "lib" directory: - - (site home)/textpattern/lib/ - -Contrary to Textile, Markdown does not convert quotes to curly ones -and does not convert multiple hyphens (`--` and `---`) into en- and -em-dashes. If you use PHP Markdown in Textile Compatibility Mode, you -can solve this problem by installing the "smartypants.php" file from -[PHP SmartyPants][psp] beside the "classTextile.php" file. The Textile -Compatibility Mode function will use SmartyPants automatically without -further modification. - - [psp]: http://michelf.com/projects/php-smartypants/ - - -### In Your Own Programs ### - -You can use PHP Markdown easily in your current PHP program. Simply -include the file and then call the Markdown function on the text you -want to convert: - - include_once "markdown.php"; - $my_html = Markdown($my_text); - -If you wish to use PHP Markdown with another text filter function -built to parse HTML, you should filter the text *after* the Markdown -function call. This is an example with [PHP SmartyPants][psp]: - - $my_html = SmartyPants(Markdown($my_text)); - - -### With Smarty ### - -If your program use the [Smarty][sm] template engine, PHP Markdown -can now be used as a modifier for your templates. Rename "markdown.php" -to "modifier.markdown.php" and put it in your smarty plugins folder. - - [sm]: http://smarty.php.net/ - -If you are using MovableType 3.1 or later, the Smarty plugin folder is -located at `(MT CGI root)/php/extlib/smarty/plugins`. This will allow -Markdown to work on dynamic pages. - - -### Updating Markdown in Other Programs ### - -Many web applications now ship with PHP Markdown, or have plugins to -perform the conversion to HTML. You can update PHP Markdown -- or -replace it with PHP Markdown Extra -- in many of these programs by -swapping the old "markdown.php" file for the new one. - -Here is a short non-exhaustive list of some programs and where they -hide the "markdown.php" file. - -| Program | Path to Markdown -| ------- | ---------------- -| [Pivot][] | `(site home)/pivot/includes/markdown/` - -If you're unsure if you can do this with your application, ask the -developer, or wait for the developer to update his application or -plugin with the new version of PHP Markdown. - - [Pivot]: http://pivotlog.net/ - - -Configuration -------------- - -By default, PHP Markdown produces XHTML output for tags with empty -elements. E.g.: - -
        - -Markdown can be configured to produce HTML-style tags; e.g.: - -
        - -To do this, you must edit the "MARKDOWN_EMPTY_ELEMENT_SUFFIX" -definition below the "Global default settings" header at the start of -the "markdown.php" file. - - -### WordPress-Specific Settings ### - -By default, the Markdown plugin applies to both posts and comments on -your WordPress weblog. To deactivate one or the other, edit the -`MARKDOWN_WP_POSTS` or `MARKDOWN_WP_COMMENTS` definitions under the -"WordPress settings" header at the start of the "markdown.php" file. - - -Bugs ----- - -To file bug reports please send email to: - - -Please include with your report: (1) the example input; (2) the output you -expected; (3) the output PHP Markdown actually produced. - - -Version History ---------------- - -1.0.1n (10 Oct 2009): - -* Enabled reference-style shortcut links. Now you can write reference-style - links with less brakets: - - This is [my website]. - - [my website]: http://example.com/ - - This was added in the 1.0.2 betas, but commented out in the 1.0.1 branch, - waiting for the feature to be officialized. [But half of the other Markdown - implementations are supporting this syntax][half], so it makes sense for - compatibility's sake to allow it in PHP Markdown too. - - [half]: http://babelmark.bobtfish.net/?markdown=This+is+%5Bmy+website%5D.%0D%0A%09%09%0D%0A%5Bmy+website%5D%3A+http%3A%2F%2Fexample.com%2F%0D%0A&src=1&dest=2 - -* Now accepting many valid email addresses in autolinks that were - previously rejected, such as: - - - - <"abc@def"@example.com> - <"Fred Bloggs"@example.com> - - -* Now accepting spaces in URLs for inline and reference-style links. Such - URLs need to be surrounded by angle brakets. For instance: - - [link text]( "optional title") - - [link text][ref] - [ref]: "optional title" - - There is still a quirk which may prevent this from working correctly with - relative URLs in inline-style links however. - -* Fix for adjacent list of different kind where the second list could - end as a sublist of the first when not separated by an empty line. - -* Fixed a bug where inline-style links wouldn't be recognized when the link - definition contains a line break between the url and the title. - -* Fixed a bug where tags where the name contains an underscore aren't parsed - correctly. - -* Fixed some corner-cases mixing underscore-ephasis and asterisk-emphasis. - - -Extra 1.2.4: - -* Fixed a problem where unterminated tags in indented code blocks could - prevent proper escaping of characaters in the code block. - - -Extra 1.2.3 (31 Dec 2008): - -* In WordPress pages featuring more than one post, footnote id prefixes are - now automatically applied with the current post ID to avoid clashes - between footnotes belonging to different posts. - -* Fix for a bug introduced in Extra 1.2 where block-level HTML tags where - not detected correctly, thus the addition of erroneous `

        ` tags and - interpretation of their content as Markdown-formatted instead of - HTML-formatted. - - -Extra 1.2.2 (21 Jun 2008): - -* Fixed a problem where abbreviation definitions, footnote - definitions and link references were stripped inside - fenced code blocks. - -* Fixed a bug where characters such as `"` in abbreviation - definitions weren't properly encoded to HTML entities. - -* Fixed a bug where double quotes `"` were not correctly encoded - as HTML entities when used inside a footnote reference id. - - -1.0.1m (21 Jun 2008): - -* Lists can now have empty items. - -* Rewrote the emphasis and strong emphasis parser to fix some issues - with odly placed and overlong markers. - - -Extra 1.2.1 (27 May 2008): - -* Fixed a problem where Markdown headers and horizontal rules were - transformed into their HTML equivalent inside fenced code blocks. - - -Extra 1.2 (11 May 2008): - -* Added fenced code block syntax which don't require indentation - and can start and end with blank lines. A fenced code block - starts with a line of consecutive tilde (~) and ends on the - next line with the same number of consecutive tilde. Here's an - example: - - ~~~~~~~~~~~~ - Hello World! - ~~~~~~~~~~~~ - -* Rewrote parts of the HTML block parser to better accomodate - fenced code blocks. - -* Footnotes may now be referenced from within another footnote. - -* Added programatically-settable parser property `predef_attr` for - predefined attribute definitions. - -* Fixed an issue where an indented code block preceded by a blank - line containing some other whitespace would confuse the HTML - block parser into creating an HTML block when it should have - been code. - - -1.0.1l (11 May 2008): - -* Now removing the UTF-8 BOM at the start of a document, if present. - -* Now accepting capitalized URI schemes (such as HTTP:) in automatic - links, such as ``. - -* Fixed a problem where `` was seen as a horizontal - rule instead of an automatic link. - -* Fixed an issue where some characters in Markdown-generated HTML - attributes weren't properly escaped with entities. - -* Fix for code blocks as first element of a list item. Previously, - this didn't create any code block for item 2: - - * Item 1 (regular paragraph) - - * Item 2 (code block) - -* A code block starting on the second line of a document wasn't seen - as a code block. This has been fixed. - -* Added programatically-settable parser properties `predef_urls` and - `predef_titles` for predefined URLs and titles for reference-style - links. To use this, your PHP code must call the parser this way: - - $parser = new Markdwon_Parser; - $parser->predef_urls = array('linkref' => 'http://example.com'); - $html = $parser->transform($text); - - You can then use the URL as a normal link reference: - - [my link][linkref] - [my link][linkRef] - - Reference names in the parser properties *must* be lowercase. - Reference names in the Markdown source may have any case. - -* Added `setup` and `teardown` methods which can be used by subclassers - as hook points to arrange the state of some parser variables before and - after parsing. - - -Extra 1.1.7 (26 Sep 2007): - -1.0.1k (26 Sep 2007): - -* Fixed a problem introduced in 1.0.1i where three or more identical - uppercase letters, as well as a few other symbols, would trigger - a horizontal line. - - -Extra 1.1.6 (4 Sep 2007): - -1.0.1j (4 Sep 2007): - -* Fixed a problem introduced in 1.0.1i where the closing `code` and - `pre` tags at the end of a code block were appearing in the wrong - order. - -* Overriding configuration settings by defining constants from an - external before markdown.php is included is now possible without - producing a PHP warning. - - -Extra 1.1.5 (31 Aug 2007): - -1.0.1i (31 Aug 2007): - -* Fixed a problem where an escaped backslash before a code span - would prevent the code span from being created. This should now - work as expected: - - Litteral backslash: \\`code span` - -* Overall speed improvements, especially with long documents. - - -Extra 1.1.4 (3 Aug 2007): - -1.0.1h (3 Aug 2007): - -* Added two properties (`no_markup` and `no_entities`) to the parser - allowing HTML tags and entities to be disabled. - -* Fix for a problem introduced in 1.0.1g where posting comments in - WordPress would trigger PHP warnings and cause some markup to be - incorrectly filtered by the kses filter in WordPress. - - -Extra 1.1.3 (3 Jul 2007): - -* Fixed a performance problem when parsing some invalid HTML as an HTML - block which was resulting in too much recusion and a segmentation fault - for long documents. - -* The markdown="" attribute now accepts unquoted values. - -* Fixed an issue where underscore-emphasis didn't work when applied on the - first or the last word of an element having the markdown="1" or - markdown="span" attribute set unless there was some surrounding whitespace. - This didn't work: - -

        _Hello_ _world_

        - - Now it does produce emphasis as expected. - -* Fixed an issue preventing footnotes from working when the parser's - footnote id prefix variable (fn_id_prefix) is not empty. - -* Fixed a performance problem where the regular expression for strong - emphasis introduced in version 1.1 could sometime be long to process, - give slightly wrong results, and in some circumstances could remove - entirely the content for a whole paragraph. - -* Fixed an issue were abbreviations tags could be incorrectly added - inside URLs and title of links. - -* Placing footnote markers inside a link, resulting in two nested links, is - no longer allowed. - - -1.0.1g (3 Jul 2007): - -* Fix for PHP 5 compiled without the mbstring module. Previous fix to - calculate the length of UTF-8 strings in `detab` when `mb_strlen` is - not available was only working with PHP 4. - -* Fixed a problem with WordPress 2.x where full-content posts in RSS feeds - were not processed correctly by Markdown. - -* Now supports URLs containing literal parentheses for inline links - and images, such as: - - [WIMP](http://en.wikipedia.org/wiki/WIMP_(computing)) - - Such parentheses may be arbitrarily nested, but must be - balanced. Unbalenced parentheses are allowed however when the URL - when escaped or when the URL is enclosed in angle brakets `<>`. - -* Fixed a performance problem where the regular expression for strong - emphasis introduced in version 1.0.1d could sometime be long to process, - give slightly wrong results, and in some circumstances could remove - entirely the content for a whole paragraph. - -* Some change in version 1.0.1d made possible the incorrect nesting of - anchors within each other. This is now fixed. - -* Fixed a rare issue where certain MD5 hashes in the content could - be changed to their corresponding text. For instance, this: - - The MD5 value for "+" is "26b17225b626fb9238849fd60eabdf60". - - was incorrectly changed to this in previous versions of PHP Markdown: - -

        The MD5 value for "+" is "+".

        - -* Now convert escaped characters to their numeric character - references equivalent. - - This fix an integration issue with SmartyPants and backslash escapes. - Since Markdown and SmartyPants have some escapable characters in common, - it was sometime necessary to escape them twice. Previously, two - backslashes were sometime required to prevent Markdown from "eating" the - backslash before SmartyPants sees it: - - Here are two hyphens: \\-- - - Now, only one backslash will do: - - Here are two hyphens: \-- - - -Extra 1.1.2 (7 Feb 2007) - -* Fixed an issue where headers preceded too closely by a paragraph - (with no blank line separating them) where put inside the paragraph. - -* Added the missing TextileRestricted method that was added to regular - PHP Markdown since 1.0.1d but which I forgot to add to Extra. - - -1.0.1f (7 Feb 2007): - -* Fixed an issue with WordPress where manually-entered excerpts, but - not the auto-generated ones, would contain nested paragraphs. - -* Fixed an issue introduced in 1.0.1d where headers and blockquotes - preceded too closely by a paragraph (not separated by a blank line) - where incorrectly put inside the paragraph. - -* Fixed an issue introduced in 1.0.1d in the tokenizeHTML method where - two consecutive code spans would be merged into one when together they - form a valid tag in a multiline paragraph. - -* Fixed an long-prevailing issue where blank lines in code blocks would - be doubled when the code block is in a list item. - - This was due to the list processing functions relying on artificially - doubled blank lines to correctly determine when list items should - contain block-level content. The list item processing model was thus - changed to avoid the need for double blank lines. - -* Fixed an issue with `<% asp-style %>` instructions used as inline - content where the opening `<` was encoded as `<`. - -* Fixed a parse error occuring when PHP is configured to accept - ASP-style delimiters as boundaries for PHP scripts. - -* Fixed a bug introduced in 1.0.1d where underscores in automatic links - got swapped with emphasis tags. - - -Extra 1.1.1 (28 Dec 2006) - -* Fixed a problem where whitespace at the end of the line of an atx-style - header would cause tailing `#` to appear as part of the header's content. - This was caused by a small error in the regex that handles the definition - for the id attribute in PHP Markdown Extra. - -* Fixed a problem where empty abbreviations definitions would eat the - following line as its definition. - -* Fixed an issue with calling the Markdown parser repetitivly with text - containing footnotes. The footnote hashes were not reinitialized properly. - - -1.0.1e (28 Dec 2006) - -* Added support for internationalized domain names for email addresses in - automatic link. Improved the speed at which email addresses are converted - to entities. Thanks to Milian Wolff for his optimisations. - -* Made deterministic the conversion to entities of email addresses in - automatic links. This means that a given email address will always be - encoded the same way. - -* PHP Markdown will now use its own function to calculate the length of an - UTF-8 string in `detab` when `mb_strlen` is not available instead of - giving a fatal error. - - -Extra 1.1 (1 Dec 2006) - -* Added a syntax for footnotes. - -* Added an experimental syntax to define abbreviations. - - -1.0.1d (1 Dec 2006) - -* Fixed a bug where inline images always had an empty title attribute. The - title attribute is now present only when explicitly defined. - -* Link references definitions can now have an empty title, previously if the - title was defined but left empty the link definition was ignored. This can - be useful if you want an empty title attribute in images to hide the - tooltip in Internet Explorer. - -* Made `detab` aware of UTF-8 characters. UTF-8 multi-byte sequences are now - correctly mapped to one character instead of the number of bytes. - -* Fixed a small bug with WordPress where WordPress' default filter `wpautop` - was not properly deactivated on comment text, resulting in hard line breaks - where Markdown do not prescribes them. - -* Added a `TextileRestrited` method to the textile compatibility mode. There - is no restriction however, as Markdown does not have a restricted mode at - this point. This should make PHP Markdown work again in the latest - versions of TextPattern. - -* Converted PHP Markdown to a object-oriented design. - -* Changed span and block gamut methods so that they loop over a - customizable list of methods. This makes subclassing the parser a more - interesting option for creating syntax extensions. - -* Also added a "document" gamut loop which can be used to hook document-level - methods (like for striping link definitions). - -* Changed all methods which were inserting HTML code so that they now return - a hashed representation of the code. New methods `hashSpan` and `hashBlock` - are used to hash respectivly span- and block-level generated content. This - has a couple of significant effects: - - 1. It prevents invalid nesting of Markdown-generated elements which - could occur occuring with constructs like `*something [link*][1]`. - 2. It prevents problems occuring with deeply nested lists on which - paragraphs were ill-formed. - 3. It removes the need to call `hashHTMLBlocks` twice during the the - block gamut. - - Hashes are turned back to HTML prior output. - -* Made the block-level HTML parser smarter using a specially-crafted regular - expression capable of handling nested tags. - -* Solved backtick issues in tag attributes by rewriting the HTML tokenizer to - be aware of code spans. All these lines should work correctly now: - - bar - bar - `` - -* Changed the parsing of HTML comments to match simply from `` - instead using of the more complicated SGML-style rule with paired `--`. - This is how most browsers parse comments and how XML defines them too. - -* `
        ` has been added to the list of block-level elements and is now - treated as an HTML block instead of being wrapped within paragraph tags. - -* Now only trim trailing newlines from code blocks, instead of trimming - all trailing whitespace characters. - -* Fixed bug where this: - - [text](http://m.com "title" ) - - wasn't working as expected, because the parser wasn't allowing for spaces - before the closing paren. - -* Filthy hack to support markdown='1' in div tags. - -* _DoAutoLinks() now supports the 'dict://' URL scheme. - -* PHP- and ASP-style processor instructions are now protected as - raw HTML blocks. - - - <% ... %> - -* Fix for escaped backticks still triggering code spans: - - There are two raw backticks here: \` and here: \`, not a code span - - -Extra 1.0 - 5 September 2005 - -* Added support for setting the id attributes for headers like this: - - Header 1 {#header1} - ======== - - ## Header 2 ## {#header2} - - This only work only for headers for now. - -* Tables will now work correctly as the first element of a definition - list. For example, this input: - - Term - - : Header | Header - ------- | ------- - Cell | Cell - - used to produce no definition list and a table where the first - header was named ": Header". This is now fixed. - -* Fix for a problem where a paragraph following a table was not - placed between `

        ` tags. - - -Extra 1.0b4 - 1 August 2005 - -* Fixed some issues where whitespace around HTML blocks were trigging - empty paragraph tags. - -* Fixed an HTML block parsing issue that would cause a block element - following a code span or block with unmatched opening bracket to be - placed inside a paragraph. - -* Removed some PHP notices that could appear when parsing definition - lists and tables with PHP notice reporting flag set. - - -Extra 1.0b3 - 29 July 2005 - -* Definition lists now require a blank line before each term. Solves - an ambiguity where the last line of lazy-indented definitions could - be mistaken by PHP Markdown as a new term in the list. - -* Definition lists now support multiple terms per definition. - -* Some special tags were replaced in the output by their md5 hash - key. Things such as this now work as expected: - - ## Header ## - - -Extra 1.0b2 - 26 July 2005 - -* Definition lists can now take two or more definitions for one term. - This should have been the case before, but a bug prevented this - from working right. - -* Fixed a problem where single column table with a pipe only at the - end where not parsed as table. Here is such a table: - - | header - | ------ - | cell - -* Fixed problems with empty cells in the first column of a table with - no leading pipe, like this one: - - header | header - ------ | ------ - | cell - -* Code spans containing pipes did not within a table. This is now - fixed by parsing code spans before splitting rows into cells. - -* Added the pipe character to the backlash escape character lists. - -Extra 1.0b1 (25 Jun 2005) - -* First public release of PHP Markdown Extra. - - -Copyright and License ---------------------- - -PHP Markdown & Extra -Copyright (c) 2004-2009 Michel Fortin - -All rights reserved. - -Based on Markdown -Copyright (c) 2003-2005 John Gruber - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the - distribution. - -* Neither the name "Markdown" nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -This software is provided by the copyright holders and contributors "as -is" and any express or implied warranties, including, but not limited -to, the implied warranties of merchantability and fitness for a -particular purpose are disclaimed. In no event shall the copyright owner -or contributors be liable for any direct, indirect, incidental, special, -exemplary, or consequential damages (including, but not limited to, -procurement of substitute goods or services; loss of use, data, or -profits; or business interruption) however caused and on any theory of -liability, whether in contract, strict liability, or tort (including -negligence or otherwise) arising in any way out of the use of this -software, even if advised of the possibility of such damage. diff --git a/_piecrust/libs/MarkdownExtra/markdown.php b/_piecrust/libs/MarkdownExtra/markdown.php deleted file mode 100644 index ee3dddb..0000000 --- a/_piecrust/libs/MarkdownExtra/markdown.php +++ /dev/null @@ -1,2932 +0,0 @@ - -# -# Original Markdown -# Copyright (c) 2004-2006 John Gruber -# -# - - -define( 'MARKDOWN_VERSION', "1.0.1n" ); # Sat 10 Oct 2009 -define( 'MARKDOWNEXTRA_VERSION', "1.2.4" ); # Sat 10 Oct 2009 - - -# -# Global default settings: -# - -# Change to ">" for HTML output -@define( 'MARKDOWN_EMPTY_ELEMENT_SUFFIX', " />"); - -# Define the width of a tab for code blocks. -@define( 'MARKDOWN_TAB_WIDTH', 4 ); - -# Optional title attribute for footnote links and backlinks. -@define( 'MARKDOWN_FN_LINK_TITLE', "" ); -@define( 'MARKDOWN_FN_BACKLINK_TITLE', "" ); - -# Optional class attribute for footnote links and backlinks. -@define( 'MARKDOWN_FN_LINK_CLASS', "" ); -@define( 'MARKDOWN_FN_BACKLINK_CLASS', "" ); - - -# -# WordPress settings: -# - -# Change to false to remove Markdown from posts and/or comments. -@define( 'MARKDOWN_WP_POSTS', true ); -@define( 'MARKDOWN_WP_COMMENTS', true ); - - - -### Standard Function Interface ### - -@define( 'MARKDOWN_PARSER_CLASS', 'MarkdownExtra_Parser' ); - -function Markdown($text) { -# -# Initialize the parser and return the result of its transform method. -# - # Setup static parser variable. - static $parser; - if (!isset($parser)) { - $parser_class = MARKDOWN_PARSER_CLASS; - $parser = new $parser_class; - } - - # Transform text using parser. - return $parser->transform($text); -} - - -### WordPress Plugin Interface ### - -/* -Plugin Name: Markdown Extra -Plugin URI: http://michelf.com/projects/php-markdown/ -Description: Markdown syntax allows you to write using an easy-to-read, easy-to-write plain text format. Based on the original Perl version by John Gruber. More... -Version: 1.2.4 -Author: Michel Fortin -Author URI: http://michelf.com/ -*/ - -if (isset($wp_version)) { - # More details about how it works here: - # - - # Post content and excerpts - # - Remove WordPress paragraph generator. - # - Run Markdown on excerpt, then remove all tags. - # - Add paragraph tag around the excerpt, but remove it for the excerpt rss. - if (MARKDOWN_WP_POSTS) { - remove_filter('the_content', 'wpautop'); - remove_filter('the_content_rss', 'wpautop'); - remove_filter('the_excerpt', 'wpautop'); - add_filter('the_content', 'mdwp_MarkdownPost', 6); - add_filter('the_content_rss', 'mdwp_MarkdownPost', 6); - add_filter('get_the_excerpt', 'mdwp_MarkdownPost', 6); - add_filter('get_the_excerpt', 'trim', 7); - add_filter('the_excerpt', 'mdwp_add_p'); - add_filter('the_excerpt_rss', 'mdwp_strip_p'); - - remove_filter('content_save_pre', 'balanceTags', 50); - remove_filter('excerpt_save_pre', 'balanceTags', 50); - add_filter('the_content', 'balanceTags', 50); - add_filter('get_the_excerpt', 'balanceTags', 9); - } - - # Add a footnote id prefix to posts when inside a loop. - function mdwp_MarkdownPost($text) { - static $parser; - if (!$parser) { - $parser_class = MARKDOWN_PARSER_CLASS; - $parser = new $parser_class; - } - if (is_single() || is_page() || is_feed()) { - $parser->fn_id_prefix = ""; - } else { - $parser->fn_id_prefix = get_the_ID() . "."; - } - return $parser->transform($text); - } - - # Comments - # - Remove WordPress paragraph generator. - # - Remove WordPress auto-link generator. - # - Scramble important tags before passing them to the kses filter. - # - Run Markdown on excerpt then remove paragraph tags. - if (MARKDOWN_WP_COMMENTS) { - remove_filter('comment_text', 'wpautop', 30); - remove_filter('comment_text', 'make_clickable'); - add_filter('pre_comment_content', 'Markdown', 6); - add_filter('pre_comment_content', 'mdwp_hide_tags', 8); - add_filter('pre_comment_content', 'mdwp_show_tags', 12); - add_filter('get_comment_text', 'Markdown', 6); - add_filter('get_comment_excerpt', 'Markdown', 6); - add_filter('get_comment_excerpt', 'mdwp_strip_p', 7); - - global $mdwp_hidden_tags, $mdwp_placeholders; - $mdwp_hidden_tags = explode(' ', - '

         
      4. '); - $mdwp_placeholders = explode(' ', str_rot13( - 'pEj07ZbbBZ U1kqgh4w4p pre2zmeN6K QTi31t9pre ol0MP1jzJR '. - 'ML5IjmbRol ulANi1NsGY J7zRLJqPul liA8ctl16T K9nhooUHli')); - } - - function mdwp_add_p($text) { - if (!preg_match('{^$|^<(p|ul|ol|dl|pre|blockquote)>}i', $text)) { - $text = '

        '.$text.'

        '; - $text = preg_replace('{\n{2,}}', "

        \n\n

        ", $text); - } - return $text; - } - - function mdwp_strip_p($t) { return preg_replace('{}i', '', $t); } - - function mdwp_hide_tags($text) { - global $mdwp_hidden_tags, $mdwp_placeholders; - return str_replace($mdwp_hidden_tags, $mdwp_placeholders, $text); - } - function mdwp_show_tags($text) { - global $mdwp_hidden_tags, $mdwp_placeholders; - return str_replace($mdwp_placeholders, $mdwp_hidden_tags, $text); - } -} - - -### bBlog Plugin Info ### - -function identify_modifier_markdown() { - return array( - 'name' => 'markdown', - 'type' => 'modifier', - 'nicename' => 'PHP Markdown Extra', - 'description' => 'A text-to-HTML conversion tool for web writers', - 'authors' => 'Michel Fortin and John Gruber', - 'licence' => 'GPL', - 'version' => MARKDOWNEXTRA_VERSION, - 'help' => 'Markdown syntax allows you to write using an easy-to-read, easy-to-write plain text format. Based on the original Perl version by John Gruber. More...', - ); -} - - -### Smarty Modifier Interface ### - -function smarty_modifier_markdown($text) { - return Markdown($text); -} - - -### Textile Compatibility Mode ### - -# Rename this file to "classTextile.php" and it can replace Textile everywhere. - -if (strcasecmp(substr(__FILE__, -16), "classTextile.php") == 0) { - # Try to include PHP SmartyPants. Should be in the same directory. - @include_once 'smartypants.php'; - # Fake Textile class. It calls Markdown instead. - class Textile { - function TextileThis($text, $lite='', $encode='') { - if ($lite == '' && $encode == '') $text = Markdown($text); - if (function_exists('SmartyPants')) $text = SmartyPants($text); - return $text; - } - # Fake restricted version: restrictions are not supported for now. - function TextileRestricted($text, $lite='', $noimage='') { - return $this->TextileThis($text, $lite); - } - # Workaround to ensure compatibility with TextPattern 4.0.3. - function blockLite($text) { return $text; } - } -} - - - -# -# Markdown Parser Class -# - -class Markdown_Parser { - - # Regex to match balanced [brackets]. - # Needed to insert a maximum bracked depth while converting to PHP. - var $nested_brackets_depth = 6; - var $nested_brackets_re; - - var $nested_url_parenthesis_depth = 4; - var $nested_url_parenthesis_re; - - # Table of hash values for escaped characters: - var $escape_chars = '\`*_{}[]()>#+-.!'; - var $escape_chars_re; - - # Change to ">" for HTML output. - var $empty_element_suffix = MARKDOWN_EMPTY_ELEMENT_SUFFIX; - var $tab_width = MARKDOWN_TAB_WIDTH; - - # Change to `true` to disallow markup or entities. - var $no_markup = false; - var $no_entities = false; - - # Predefined urls and titles for reference links and images. - var $predef_urls = array(); - var $predef_titles = array(); - - - function Markdown_Parser() { - # - # Constructor function. Initialize appropriate member variables. - # - $this->_initDetab(); - $this->prepareItalicsAndBold(); - - $this->nested_brackets_re = - str_repeat('(?>[^\[\]]+|\[', $this->nested_brackets_depth). - str_repeat('\])*', $this->nested_brackets_depth); - - $this->nested_url_parenthesis_re = - str_repeat('(?>[^()\s]+|\(', $this->nested_url_parenthesis_depth). - str_repeat('(?>\)))*', $this->nested_url_parenthesis_depth); - - $this->escape_chars_re = '['.preg_quote($this->escape_chars).']'; - - # Sort document, block, and span gamut in ascendent priority order. - asort($this->document_gamut); - asort($this->block_gamut); - asort($this->span_gamut); - } - - - # Internal hashes used during transformation. - var $urls = array(); - var $titles = array(); - var $html_hashes = array(); - - # Status flag to avoid invalid nesting. - var $in_anchor = false; - - - function setup() { - # - # Called before the transformation process starts to setup parser - # states. - # - # Clear global hashes. - $this->urls = $this->predef_urls; - $this->titles = $this->predef_titles; - $this->html_hashes = array(); - - $in_anchor = false; - } - - function teardown() { - # - # Called after the transformation process to clear any variable - # which may be taking up memory unnecessarly. - # - $this->urls = array(); - $this->titles = array(); - $this->html_hashes = array(); - } - - - function transform($text) { - # - # Main function. Performs some preprocessing on the input text - # and pass it through the document gamut. - # - $this->setup(); - - # Remove UTF-8 BOM and marker character in input, if present. - $text = preg_replace('{^\xEF\xBB\xBF|\x1A}', '', $text); - - # Standardize line endings: - # DOS to Unix and Mac to Unix - $text = preg_replace('{\r\n?}', "\n", $text); - - # Make sure $text ends with a couple of newlines: - $text .= "\n\n"; - - # Convert all tabs to spaces. - $text = $this->detab($text); - - # Turn block-level HTML blocks into hash entries - $text = $this->hashHTMLBlocks($text); - - # Strip any lines consisting only of spaces and tabs. - # This makes subsequent regexen easier to write, because we can - # match consecutive blank lines with /\n+/ instead of something - # contorted like /[ ]*\n+/ . - $text = preg_replace('/^[ ]+$/m', '', $text); - - # Run document gamut methods. - foreach ($this->document_gamut as $method => $priority) { - $text = $this->$method($text); - } - - $this->teardown(); - - return $text . "\n"; - } - - var $document_gamut = array( - # Strip link definitions, store in hashes. - "stripLinkDefinitions" => 20, - - "runBasicBlockGamut" => 30, - ); - - - function stripLinkDefinitions($text) { - # - # Strips link definitions from text, stores the URLs and titles in - # hash references. - # - $less_than_tab = $this->tab_width - 1; - - # Link defs are in the form: ^[id]: url "optional title" - $text = preg_replace_callback('{ - ^[ ]{0,'.$less_than_tab.'}\[(.+)\][ ]?: # id = $1 - [ ]* - \n? # maybe *one* newline - [ ]* - (?: - <(.+?)> # url = $2 - | - (\S+?) # url = $3 - ) - [ ]* - \n? # maybe one newline - [ ]* - (?: - (?<=\s) # lookbehind for whitespace - ["(] - (.*?) # title = $4 - [")] - [ ]* - )? # title is optional - (?:\n+|\Z) - }xm', - array(&$this, '_stripLinkDefinitions_callback'), - $text); - return $text; - } - function _stripLinkDefinitions_callback($matches) { - $link_id = strtolower($matches[1]); - $url = $matches[2] == '' ? $matches[3] : $matches[2]; - $this->urls[$link_id] = $url; - $this->titles[$link_id] =& $matches[4]; - return ''; # String that will replace the block - } - - - function hashHTMLBlocks($text) { - if ($this->no_markup) return $text; - - $less_than_tab = $this->tab_width - 1; - - # Hashify HTML blocks: - # We only want to do this for block-level HTML tags, such as headers, - # lists, and tables. That's because we still want to wrap

        s around - # "paragraphs" that are wrapped in non-block-level tags, such as anchors, - # phrase emphasis, and spans. The list of tags we're looking for is - # hard-coded: - # - # * List "a" is made of tags which can be both inline or block-level. - # These will be treated block-level when the start tag is alone on - # its line, otherwise they're not matched here and will be taken as - # inline later. - # * List "b" is made of tags which are always block-level; - # - $block_tags_a_re = 'ins|del'; - $block_tags_b_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|'. - 'script|noscript|form|fieldset|iframe|math'; - - # Regular expression for the content of a block tag. - $nested_tags_level = 4; - $attr = ' - (?> # optional tag attributes - \s # starts with whitespace - (?> - [^>"/]+ # text outside quotes - | - /+(?!>) # slash not followed by ">" - | - "[^"]*" # text inside double quotes (tolerate ">") - | - \'[^\']*\' # text inside single quotes (tolerate ">") - )* - )? - '; - $content = - str_repeat(' - (?> - [^<]+ # content without tag - | - <\2 # nested opening tag - '.$attr.' # attributes - (?> - /> - | - >', $nested_tags_level). # end of opening tag - '.*?'. # last level nested tag content - str_repeat(' - # closing nested tag - ) - | - <(?!/\2\s*> # other tags with a different name - ) - )*', - $nested_tags_level); - $content2 = str_replace('\2', '\3', $content); - - # First, look for nested blocks, e.g.: - #

        - #
        - # tags for inner block must be indented. - #
        - #
        - # - # The outermost tags must start at the left margin for this to match, and - # the inner nested divs must be indented. - # We need to do this before the next, more liberal match, because the next - # match will start at the first `
        ` and stop at the first `
        `. - $text = preg_replace_callback('{(?> - (?> - (?<=\n\n) # Starting after a blank line - | # or - \A\n? # the beginning of the doc - ) - ( # save in $1 - - # Match from `\n` to `\n`, handling nested tags - # in between. - - [ ]{0,'.$less_than_tab.'} - <('.$block_tags_b_re.')# start tag = $2 - '.$attr.'> # attributes followed by > and \n - '.$content.' # content, support nesting - # the matching end tag - [ ]* # trailing spaces/tabs - (?=\n+|\Z) # followed by a newline or end of document - - | # Special version for tags of group a. - - [ ]{0,'.$less_than_tab.'} - <('.$block_tags_a_re.')# start tag = $3 - '.$attr.'>[ ]*\n # attributes followed by > - '.$content2.' # content, support nesting - # the matching end tag - [ ]* # trailing spaces/tabs - (?=\n+|\Z) # followed by a newline or end of document - - | # Special case just for
        . It was easier to make a special - # case than to make the other regex more complicated. - - [ ]{0,'.$less_than_tab.'} - <(hr) # start tag = $2 - '.$attr.' # attributes - /?> # the matching end tag - [ ]* - (?=\n{2,}|\Z) # followed by a blank line or end of document - - | # Special case for standalone HTML comments: - - [ ]{0,'.$less_than_tab.'} - (?s: - - ) - [ ]* - (?=\n{2,}|\Z) # followed by a blank line or end of document - - | # PHP and ASP-style processor instructions ( - ) - [ ]* - (?=\n{2,}|\Z) # followed by a blank line or end of document - - ) - )}Sxmi', - array(&$this, '_hashHTMLBlocks_callback'), - $text); - - return $text; - } - function _hashHTMLBlocks_callback($matches) { - $text = $matches[1]; - $key = $this->hashBlock($text); - return "\n\n$key\n\n"; - } - - - function hashPart($text, $boundary = 'X') { - # - # Called whenever a tag must be hashed when a function insert an atomic - # element in the text stream. Passing $text to through this function gives - # a unique text-token which will be reverted back when calling unhash. - # - # The $boundary argument specify what character should be used to surround - # the token. By convension, "B" is used for block elements that needs not - # to be wrapped into paragraph tags at the end, ":" is used for elements - # that are word separators and "X" is used in the general case. - # - # Swap back any tag hash found in $text so we do not have to `unhash` - # multiple times at the end. - $text = $this->unhash($text); - - # Then hash the block. - static $i = 0; - $key = "$boundary\x1A" . ++$i . $boundary; - $this->html_hashes[$key] = $text; - return $key; # String that will replace the tag. - } - - - function hashBlock($text) { - # - # Shortcut function for hashPart with block-level boundaries. - # - return $this->hashPart($text, 'B'); - } - - - var $block_gamut = array( - # - # These are all the transformations that form block-level - # tags like paragraphs, headers, and list items. - # - "doHeaders" => 10, - "doHorizontalRules" => 20, - - "doLists" => 40, - "doCodeBlocks" => 50, - "doBlockQuotes" => 60, - ); - - function runBlockGamut($text) { - # - # Run block gamut tranformations. - # - # We need to escape raw HTML in Markdown source before doing anything - # else. This need to be done for each block, and not only at the - # begining in the Markdown function since hashed blocks can be part of - # list items and could have been indented. Indented blocks would have - # been seen as a code block in a previous pass of hashHTMLBlocks. - $text = $this->hashHTMLBlocks($text); - - return $this->runBasicBlockGamut($text); - } - - function runBasicBlockGamut($text) { - # - # Run block gamut tranformations, without hashing HTML blocks. This is - # useful when HTML blocks are known to be already hashed, like in the first - # whole-document pass. - # - foreach ($this->block_gamut as $method => $priority) { - $text = $this->$method($text); - } - - # Finally form paragraph and restore hashed blocks. - $text = $this->formParagraphs($text); - - return $text; - } - - - function doHorizontalRules($text) { - # Do Horizontal Rules: - return preg_replace( - '{ - ^[ ]{0,3} # Leading space - ([-*_]) # $1: First marker - (?> # Repeated marker group - [ ]{0,2} # Zero, one, or two spaces. - \1 # Marker character - ){2,} # Group repeated at least twice - [ ]* # Tailing spaces - $ # End of line. - }mx', - "\n".$this->hashBlock("empty_element_suffix")."\n", - $text); - } - - - var $span_gamut = array( - # - # These are all the transformations that occur *within* block-level - # tags like paragraphs, headers, and list items. - # - # Process character escapes, code spans, and inline HTML - # in one shot. - "parseSpan" => -30, - - # Process anchor and image tags. Images must come first, - # because ![foo][f] looks like an anchor. - "doImages" => 10, - "doAnchors" => 20, - - # Make links out of things like `` - # Must come after doAnchors, because you can use < and > - # delimiters in inline links like [this](). - "doAutoLinks" => 30, - "encodeAmpsAndAngles" => 40, - - "doItalicsAndBold" => 50, - "doHardBreaks" => 60, - ); - - function runSpanGamut($text) { - # - # Run span gamut tranformations. - # - foreach ($this->span_gamut as $method => $priority) { - $text = $this->$method($text); - } - - return $text; - } - - - function doHardBreaks($text) { - # Do hard breaks: - return preg_replace_callback('/ {2,}\n/', - array(&$this, '_doHardBreaks_callback'), $text); - } - function _doHardBreaks_callback($matches) { - return $this->hashPart("empty_element_suffix\n"); - } - - - function doAnchors($text) { - # - # Turn Markdown link shortcuts into XHTML tags. - # - if ($this->in_anchor) return $text; - $this->in_anchor = true; - - # - # First, handle reference-style links: [link text] [id] - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ('.$this->nested_brackets_re.') # link text = $2 - \] - - [ ]? # one optional space - (?:\n[ ]*)? # one optional newline followed by spaces - - \[ - (.*?) # id = $3 - \] - ) - }xs', - array(&$this, '_doAnchors_reference_callback'), $text); - - # - # Next, inline-style links: [link text](url "optional title") - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ('.$this->nested_brackets_re.') # link text = $2 - \] - \( # literal paren - [ \n]* - (?: - <(.+?)> # href = $3 - | - ('.$this->nested_url_parenthesis_re.') # href = $4 - ) - [ \n]* - ( # $5 - ([\'"]) # quote char = $6 - (.*?) # Title = $7 - \6 # matching quote - [ \n]* # ignore any spaces/tabs between closing quote and ) - )? # title is optional - \) - ) - }xs', - array(&$this, '_doAnchors_inline_callback'), $text); - - # - # Last, handle reference-style shortcuts: [link text] - # These must come last in case you've also got [link text][1] - # or [link text](/foo) - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - \[ - ([^\[\]]+) # link text = $2; can\'t contain [ or ] - \] - ) - }xs', - array(&$this, '_doAnchors_reference_callback'), $text); - - $this->in_anchor = false; - return $text; - } - function _doAnchors_reference_callback($matches) { - $whole_match = $matches[1]; - $link_text = $matches[2]; - $link_id =& $matches[3]; - - if ($link_id == "") { - # for shortcut links like [this][] or [this]. - $link_id = $link_text; - } - - # lower-case and turn embedded newlines into spaces - $link_id = strtolower($link_id); - $link_id = preg_replace('{[ ]?\n}', ' ', $link_id); - - if (isset($this->urls[$link_id])) { - $url = $this->urls[$link_id]; - $url = $this->encodeAttribute($url); - - $result = "titles[$link_id] ) ) { - $title = $this->titles[$link_id]; - $title = $this->encodeAttribute($title); - $result .= " title=\"$title\""; - } - - $link_text = $this->runSpanGamut($link_text); - $result .= ">$link_text"; - $result = $this->hashPart($result); - } - else { - $result = $whole_match; - } - return $result; - } - function _doAnchors_inline_callback($matches) { - $whole_match = $matches[1]; - $link_text = $this->runSpanGamut($matches[2]); - $url = $matches[3] == '' ? $matches[4] : $matches[3]; - $title =& $matches[7]; - - $url = $this->encodeAttribute($url); - - $result = "encodeAttribute($title); - $result .= " title=\"$title\""; - } - - $link_text = $this->runSpanGamut($link_text); - $result .= ">$link_text"; - - return $this->hashPart($result); - } - - - function doImages($text) { - # - # Turn Markdown image shortcuts into tags. - # - # - # First, handle reference-style labeled images: ![alt text][id] - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - !\[ - ('.$this->nested_brackets_re.') # alt text = $2 - \] - - [ ]? # one optional space - (?:\n[ ]*)? # one optional newline followed by spaces - - \[ - (.*?) # id = $3 - \] - - ) - }xs', - array(&$this, '_doImages_reference_callback'), $text); - - # - # Next, handle inline images: ![alt text](url "optional title") - # Don't forget: encode * and _ - # - $text = preg_replace_callback('{ - ( # wrap whole match in $1 - !\[ - ('.$this->nested_brackets_re.') # alt text = $2 - \] - \s? # One optional whitespace character - \( # literal paren - [ \n]* - (?: - <(\S*)> # src url = $3 - | - ('.$this->nested_url_parenthesis_re.') # src url = $4 - ) - [ \n]* - ( # $5 - ([\'"]) # quote char = $6 - (.*?) # title = $7 - \6 # matching quote - [ \n]* - )? # title is optional - \) - ) - }xs', - array(&$this, '_doImages_inline_callback'), $text); - - return $text; - } - function _doImages_reference_callback($matches) { - $whole_match = $matches[1]; - $alt_text = $matches[2]; - $link_id = strtolower($matches[3]); - - if ($link_id == "") { - $link_id = strtolower($alt_text); # for shortcut links like ![this][]. - } - - $alt_text = $this->encodeAttribute($alt_text); - if (isset($this->urls[$link_id])) { - $url = $this->encodeAttribute($this->urls[$link_id]); - $result = "\"$alt_text\"";titles[$link_id])) { - $title = $this->titles[$link_id]; - $title = $this->encodeAttribute($title); - $result .= " title=\"$title\""; - } - $result .= $this->empty_element_suffix; - $result = $this->hashPart($result); - } - else { - # If there's no such link ID, leave intact: - $result = $whole_match; - } - - return $result; - } - function _doImages_inline_callback($matches) { - $whole_match = $matches[1]; - $alt_text = $matches[2]; - $url = $matches[3] == '' ? $matches[4] : $matches[3]; - $title =& $matches[7]; - - $alt_text = $this->encodeAttribute($alt_text); - $url = $this->encodeAttribute($url); - $result = "\"$alt_text\"";encodeAttribute($title); - $result .= " title=\"$title\""; # $title already quoted - } - $result .= $this->empty_element_suffix; - - return $this->hashPart($result); - } - - - function doHeaders($text) { - # Setext-style headers: - # Header 1 - # ======== - # - # Header 2 - # -------- - # - $text = preg_replace_callback('{ ^(.+?)[ ]*\n(=+|-+)[ ]*\n+ }mx', - array(&$this, '_doHeaders_callback_setext'), $text); - - # atx-style headers: - # # Header 1 - # ## Header 2 - # ## Header 2 with closing hashes ## - # ... - # ###### Header 6 - # - $text = preg_replace_callback('{ - ^(\#{1,6}) # $1 = string of #\'s - [ ]* - (.+?) # $2 = Header text - [ ]* - \#* # optional closing #\'s (not counted) - \n+ - }xm', - array(&$this, '_doHeaders_callback_atx'), $text); - - return $text; - } - function _doHeaders_callback_setext($matches) { - # Terrible hack to check we haven't found an empty list item. - if ($matches[2] == '-' && preg_match('{^-(?: |$)}', $matches[1])) - return $matches[0]; - - $level = $matches[2]{0} == '=' ? 1 : 2; - $block = "".$this->runSpanGamut($matches[1]).""; - return "\n" . $this->hashBlock($block) . "\n\n"; - } - function _doHeaders_callback_atx($matches) { - $level = strlen($matches[1]); - $block = "".$this->runSpanGamut($matches[2]).""; - return "\n" . $this->hashBlock($block) . "\n\n"; - } - - - function doLists($text) { - # - # Form HTML ordered (numbered) and unordered (bulleted) lists. - # - $less_than_tab = $this->tab_width - 1; - - # Re-usable patterns to match list item bullets and number markers: - $marker_ul_re = '[*+-]'; - $marker_ol_re = '\d+[.]'; - $marker_any_re = "(?:$marker_ul_re|$marker_ol_re)"; - - $markers_relist = array( - $marker_ul_re => $marker_ol_re, - $marker_ol_re => $marker_ul_re, - ); - - foreach ($markers_relist as $marker_re => $other_marker_re) { - # Re-usable pattern to match any entirel ul or ol list: - $whole_list_re = ' - ( # $1 = whole list - ( # $2 - ([ ]{0,'.$less_than_tab.'}) # $3 = number of spaces - ('.$marker_re.') # $4 = first list item marker - [ ]+ - ) - (?s:.+?) - ( # $5 - \z - | - \n{2,} - (?=\S) - (?! # Negative lookahead for another list item marker - [ ]* - '.$marker_re.'[ ]+ - ) - | - (?= # Lookahead for another kind of list - \n - \3 # Must have the same indentation - '.$other_marker_re.'[ ]+ - ) - ) - ) - '; // mx - - # We use a different prefix before nested lists than top-level lists. - # See extended comment in _ProcessListItems(). - - if ($this->list_level) { - $text = preg_replace_callback('{ - ^ - '.$whole_list_re.' - }mx', - array(&$this, '_doLists_callback'), $text); - } - else { - $text = preg_replace_callback('{ - (?:(?<=\n)\n|\A\n?) # Must eat the newline - '.$whole_list_re.' - }mx', - array(&$this, '_doLists_callback'), $text); - } - } - - return $text; - } - function _doLists_callback($matches) { - # Re-usable patterns to match list item bullets and number markers: - $marker_ul_re = '[*+-]'; - $marker_ol_re = '\d+[.]'; - $marker_any_re = "(?:$marker_ul_re|$marker_ol_re)"; - - $list = $matches[1]; - $list_type = preg_match("/$marker_ul_re/", $matches[4]) ? "ul" : "ol"; - - $marker_any_re = ( $list_type == "ul" ? $marker_ul_re : $marker_ol_re ); - - $list .= "\n"; - $result = $this->processListItems($list, $marker_any_re); - - $result = $this->hashBlock("<$list_type>\n" . $result . ""); - return "\n". $result ."\n\n"; - } - - var $list_level = 0; - - function processListItems($list_str, $marker_any_re) { - # - # Process the contents of a single ordered or unordered list, splitting it - # into individual list items. - # - # The $this->list_level global keeps track of when we're inside a list. - # Each time we enter a list, we increment it; when we leave a list, - # we decrement. If it's zero, we're not in a list anymore. - # - # We do this because when we're not inside a list, we want to treat - # something like this: - # - # I recommend upgrading to version - # 8. Oops, now this line is treated - # as a sub-list. - # - # As a single paragraph, despite the fact that the second line starts - # with a digit-period-space sequence. - # - # Whereas when we're inside a list (or sub-list), that line will be - # treated as the start of a sub-list. What a kludge, huh? This is - # an aspect of Markdown's syntax that's hard to parse perfectly - # without resorting to mind-reading. Perhaps the solution is to - # change the syntax rules such that sub-lists must start with a - # starting cardinal number; e.g. "1." or "a.". - - $this->list_level++; - - # trim trailing blank lines: - $list_str = preg_replace("/\n{2,}\\z/", "\n", $list_str); - - $list_str = preg_replace_callback('{ - (\n)? # leading line = $1 - (^[ ]*) # leading whitespace = $2 - ('.$marker_any_re.' # list marker and space = $3 - (?:[ ]+|(?=\n)) # space only required if item is not empty - ) - ((?s:.*?)) # list item text = $4 - (?:(\n+(?=\n))|\n) # tailing blank line = $5 - (?= \n* (\z | \2 ('.$marker_any_re.') (?:[ ]+|(?=\n)))) - }xm', - array(&$this, '_processListItems_callback'), $list_str); - - $this->list_level--; - return $list_str; - } - function _processListItems_callback($matches) { - $item = $matches[4]; - $leading_line =& $matches[1]; - $leading_space =& $matches[2]; - $marker_space = $matches[3]; - $tailing_blank_line =& $matches[5]; - - if ($leading_line || $tailing_blank_line || - preg_match('/\n{2,}/', $item)) - { - # Replace marker with the appropriate whitespace indentation - $item = $leading_space . str_repeat(' ', strlen($marker_space)) . $item; - $item = $this->runBlockGamut($this->outdent($item)."\n"); - } - else { - # Recursion for sub-lists: - $item = $this->doLists($this->outdent($item)); - $item = preg_replace('/\n+$/', '', $item); - $item = $this->runSpanGamut($item); - } - - return "
      5. " . $item . "
      6. \n"; - } - - - function doCodeBlocks($text) { - # - # Process Markdown `
        ` blocks.
        -	#
        -		$text = preg_replace_callback('{
        -				(?:\n\n|\A\n?)
        -				(	            # $1 = the code block -- one or more lines, starting with a space/tab
        -				  (?>
        -					[ ]{'.$this->tab_width.'}  # Lines must start with a tab or a tab-width of spaces
        -					.*\n+
        -				  )+
        -				)
        -				((?=^[ ]{0,'.$this->tab_width.'}\S)|\Z)	# Lookahead for non-space at line-start, or end of doc
        -			}xm',
        -			array(&$this, '_doCodeBlocks_callback'), $text);
        -
        -		return $text;
        -	}
        -	function _doCodeBlocks_callback($matches) {
        -		$codeblock = $matches[1];
        -
        -		$codeblock = $this->outdent($codeblock);
        -		$codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES);
        -
        -		# trim leading newlines and trailing newlines
        -		$codeblock = preg_replace('/\A\n+|\n+\z/', '', $codeblock);
        -
        -		$codeblock = "
        $codeblock\n
        "; - return "\n\n".$this->hashBlock($codeblock)."\n\n"; - } - - - function makeCodeSpan($code) { - # - # Create a code span markup for $code. Called from handleSpanToken. - # - $code = htmlspecialchars(trim($code), ENT_NOQUOTES); - return $this->hashPart("$code"); - } - - - var $em_relist = array( - '' => '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(?em_relist as $em => $em_re) { - foreach ($this->strong_relist as $strong => $strong_re) { - # Construct list of allowed token expressions. - $token_relist = array(); - if (isset($this->em_strong_relist["$em$strong"])) { - $token_relist[] = $this->em_strong_relist["$em$strong"]; - } - $token_relist[] = $em_re; - $token_relist[] = $strong_re; - - # Construct master expression from list. - $token_re = '{('. implode('|', $token_relist) .')}'; - $this->em_strong_prepared_relist["$em$strong"] = $token_re; - } - } - } - - function doItalicsAndBold($text) { - $token_stack = array(''); - $text_stack = array(''); - $em = ''; - $strong = ''; - $tree_char_em = false; - - while (1) { - # - # Get prepared regular expression for seraching emphasis tokens - # in current context. - # - $token_re = $this->em_strong_prepared_relist["$em$strong"]; - - # - # Each loop iteration search for the next emphasis token. - # Each token is then passed to handleSpanToken. - # - $parts = preg_split($token_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE); - $text_stack[0] .= $parts[0]; - $token =& $parts[1]; - $text =& $parts[2]; - - if (empty($token)) { - # Reached end of text span: empty stack without emitting. - # any more emphasis. - while ($token_stack[0]) { - $text_stack[1] .= array_shift($token_stack); - $text_stack[0] .= array_shift($text_stack); - } - break; - } - - $token_len = strlen($token); - if ($tree_char_em) { - # Reached closing marker while inside a three-char emphasis. - if ($token_len == 3) { - # Three-char closing marker, close em and strong. - array_shift($token_stack); - $span = array_shift($text_stack); - $span = $this->runSpanGamut($span); - $span = "$span"; - $text_stack[0] .= $this->hashPart($span); - $em = ''; - $strong = ''; - } else { - # Other closing marker: close one em or strong and - # change current token state to match the other - $token_stack[0] = str_repeat($token{0}, 3-$token_len); - $tag = $token_len == 2 ? "strong" : "em"; - $span = $text_stack[0]; - $span = $this->runSpanGamut($span); - $span = "<$tag>$span"; - $text_stack[0] = $this->hashPart($span); - $$tag = ''; # $$tag stands for $em or $strong - } - $tree_char_em = false; - } else if ($token_len == 3) { - if ($em) { - # Reached closing marker for both em and strong. - # Closing strong marker: - for ($i = 0; $i < 2; ++$i) { - $shifted_token = array_shift($token_stack); - $tag = strlen($shifted_token) == 2 ? "strong" : "em"; - $span = array_shift($text_stack); - $span = $this->runSpanGamut($span); - $span = "<$tag>$span"; - $text_stack[0] .= $this->hashPart($span); - $$tag = ''; # $$tag stands for $em or $strong - } - } else { - # Reached opening three-char emphasis marker. Push on token - # stack; will be handled by the special condition above. - $em = $token{0}; - $strong = "$em$em"; - array_unshift($token_stack, $token); - array_unshift($text_stack, ''); - $tree_char_em = true; - } - } else if ($token_len == 2) { - if ($strong) { - # Unwind any dangling emphasis marker: - if (strlen($token_stack[0]) == 1) { - $text_stack[1] .= array_shift($token_stack); - $text_stack[0] .= array_shift($text_stack); - } - # Closing strong marker: - array_shift($token_stack); - $span = array_shift($text_stack); - $span = $this->runSpanGamut($span); - $span = "$span"; - $text_stack[0] .= $this->hashPart($span); - $strong = ''; - } else { - array_unshift($token_stack, $token); - array_unshift($text_stack, ''); - $strong = $token; - } - } else { - # Here $token_len == 1 - if ($em) { - if (strlen($token_stack[0]) == 1) { - # Closing emphasis marker: - array_shift($token_stack); - $span = array_shift($text_stack); - $span = $this->runSpanGamut($span); - $span = "$span"; - $text_stack[0] .= $this->hashPart($span); - $em = ''; - } else { - $text_stack[0] .= $token; - } - } else { - array_unshift($token_stack, $token); - array_unshift($text_stack, ''); - $em = $token; - } - } - } - return $text_stack[0]; - } - - - function doBlockQuotes($text) { - $text = preg_replace_callback('/ - ( # Wrap whole match in $1 - (?> - ^[ ]*>[ ]? # ">" at the start of a line - .+\n # rest of the first line - (.+\n)* # subsequent consecutive lines - \n* # blanks - )+ - ) - /xm', - array(&$this, '_doBlockQuotes_callback'), $text); - - return $text; - } - function _doBlockQuotes_callback($matches) { - $bq = $matches[1]; - # trim one level of quoting - trim whitespace-only lines - $bq = preg_replace('/^[ ]*>[ ]?|^[ ]+$/m', '', $bq); - $bq = $this->runBlockGamut($bq); # recurse - - $bq = preg_replace('/^/m', " ", $bq); - # These leading spaces cause problem with
         content, 
        -		# so we need to fix that:
        -		$bq = preg_replace_callback('{(\s*
        .+?
        )}sx', - array(&$this, '_doBlockQuotes_callback2'), $bq); - - return "\n". $this->hashBlock("
        \n$bq\n
        ")."\n\n"; - } - function _doBlockQuotes_callback2($matches) { - $pre = $matches[1]; - $pre = preg_replace('/^ /m', '', $pre); - return $pre; - } - - - function formParagraphs($text) { - # - # Params: - # $text - string to process with html

        tags - # - # Strip leading and trailing lines: - $text = preg_replace('/\A\n+|\n+\z/', '', $text); - - $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY); - - # - # Wrap

        tags and unhashify HTML blocks - # - foreach ($grafs as $key => $value) { - if (!preg_match('/^B\x1A[0-9]+B$/', $value)) { - # Is a paragraph. - $value = $this->runSpanGamut($value); - $value = preg_replace('/^([ ]*)/', "

        ", $value); - $value .= "

        "; - $grafs[$key] = $this->unhash($value); - } - else { - # Is a block. - # Modify elements of @grafs in-place... - $graf = $value; - $block = $this->html_hashes[$graf]; - $graf = $block; -// if (preg_match('{ -// \A -// ( # $1 =
        tag -//
        ]* -// \b -// markdown\s*=\s* ([\'"]) # $2 = attr quote char -// 1 -// \2 -// [^>]* -// > -// ) -// ( # $3 = contents -// .* -// ) -// (
        ) # $4 = closing tag -// \z -// }xs', $block, $matches)) -// { -// list(, $div_open, , $div_content, $div_close) = $matches; -// -// # We can't call Markdown(), because that resets the hash; -// # that initialization code should be pulled into its own sub, though. -// $div_content = $this->hashHTMLBlocks($div_content); -// -// # Run document gamut methods on the content. -// foreach ($this->document_gamut as $method => $priority) { -// $div_content = $this->$method($div_content); -// } -// -// $div_open = preg_replace( -// '{\smarkdown\s*=\s*([\'"]).+?\1}', '', $div_open); -// -// $graf = $div_open . "\n" . $div_content . "\n" . $div_close; -// } - $grafs[$key] = $graf; - } - } - - return implode("\n\n", $grafs); - } - - - function encodeAttribute($text) { - # - # Encode text for a double-quoted HTML attribute. This function - # is *not* suitable for attributes enclosed in single quotes. - # - $text = $this->encodeAmpsAndAngles($text); - $text = str_replace('"', '"', $text); - return $text; - } - - - function encodeAmpsAndAngles($text) { - # - # Smart processing for ampersands and angle brackets that need to - # be encoded. Valid character entities are left alone unless the - # no-entities mode is set. - # - if ($this->no_entities) { - $text = str_replace('&', '&', $text); - } else { - # Ampersand-encoding based entirely on Nat Irons's Amputator - # MT plugin: - $text = preg_replace('/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/', - '&', $text);; - } - # Encode remaining <'s - $text = str_replace('<', '<', $text); - - return $text; - } - - - function doAutoLinks($text) { - $text = preg_replace_callback('{<((https?|ftp|dict):[^\'">\s]+)>}i', - array(&$this, '_doAutoLinks_url_callback'), $text); - - # Email addresses: - $text = preg_replace_callback('{ - < - (?:mailto:)? - ( - (?: - [-!#$%&\'*+/=?^_`.{|}~\w\x80-\xFF]+ - | - ".*?" - ) - \@ - (?: - [-a-z0-9\x80-\xFF]+(\.[-a-z0-9\x80-\xFF]+)*\.[a-z]+ - | - \[[\d.a-fA-F:]+\] # IPv4 & IPv6 - ) - ) - > - }xi', - array(&$this, '_doAutoLinks_email_callback'), $text); - - return $text; - } - function _doAutoLinks_url_callback($matches) { - $url = $this->encodeAttribute($matches[1]); - $link = "$url"; - return $this->hashPart($link); - } - function _doAutoLinks_email_callback($matches) { - $address = $matches[1]; - $link = $this->encodeEmailAddress($address); - return $this->hashPart($link); - } - - - function encodeEmailAddress($addr) { - # - # Input: an email address, e.g. "foo@example.com" - # - # Output: the email address as a mailto link, with each character - # of the address encoded as either a decimal or hex entity, in - # the hopes of foiling most address harvesting spam bots. E.g.: - # - #

        foo@exampl - # e.com

        - # - # Based by a filter by Matthew Wickline, posted to BBEdit-Talk. - # With some optimizations by Milian Wolff. - # - $addr = "mailto:" . $addr; - $chars = preg_split('/(? $char) { - $ord = ord($char); - # Ignore non-ascii chars. - if ($ord < 128) { - $r = ($seed * (1 + $key)) % 100; # Pseudo-random function. - # roughly 10% raw, 45% hex, 45% dec - # '@' *must* be encoded. I insist. - if ($r > 90 && $char != '@') /* do nothing */; - else if ($r < 45) $chars[$key] = '&#x'.dechex($ord).';'; - else $chars[$key] = '&#'.$ord.';'; - } - } - - $addr = implode('', $chars); - $text = implode('', array_slice($chars, 7)); # text without `mailto:` - $addr = "$text"; - - return $addr; - } - - - function parseSpan($str) { - # - # Take the string $str and parse it into tokens, hashing embeded HTML, - # escaped characters and handling code spans. - # - $output = ''; - - $span_re = '{ - ( - \\\\'.$this->escape_chars_re.' - | - (?no_markup ? '' : ' - | - # comment - | - <\?.*?\?> | <%.*?%> # processing instruction - | - <[/!$]?[-a-zA-Z0-9:_]+ # regular tags - (?> - \s - (?>[^"\'>]+|"[^"]*"|\'[^\']*\')* - )? - > - ').' - ) - }xs'; - - while (1) { - # - # Each loop iteration seach for either the next tag, the next - # openning code span marker, or the next escaped character. - # Each token is then passed to handleSpanToken. - # - $parts = preg_split($span_re, $str, 2, PREG_SPLIT_DELIM_CAPTURE); - - # Create token from text preceding tag. - if ($parts[0] != "") { - $output .= $parts[0]; - } - - # Check if we reach the end. - if (isset($parts[1])) { - $output .= $this->handleSpanToken($parts[1], $parts[2]); - $str = $parts[2]; - } - else { - break; - } - } - - return $output; - } - - - function handleSpanToken($token, &$str) { - # - # Handle $token provided by parseSpan by determining its nature and - # returning the corresponding value that should replace it. - # - switch ($token{0}) { - case "\\": - return $this->hashPart("&#". ord($token{1}). ";"); - case "`": - # Search for end marker in remaining text. - if (preg_match('/^(.*?[^`])'.preg_quote($token).'(?!`)(.*)$/sm', - $str, $matches)) - { - $str = $matches[2]; - $codespan = $this->makeCodeSpan($matches[1]); - return $this->hashPart($codespan); - } - return $token; // return as text since no ending marker found. - default: - return $this->hashPart($token); - } - } - - - function outdent($text) { - # - # Remove one level of line-leading tabs or spaces - # - return preg_replace('/^(\t|[ ]{1,'.$this->tab_width.'})/m', '', $text); - } - - - # String length function for detab. `_initDetab` will create a function to - # hanlde UTF-8 if the default function does not exist. - var $utf8_strlen = 'mb_strlen'; - - function detab($text) { - # - # Replace tabs with the appropriate amount of space. - # - # For each line we separate the line in blocks delemited by - # tab characters. Then we reconstruct every line by adding the - # appropriate number of space between each blocks. - - $text = preg_replace_callback('/^.*\t.*$/m', - array(&$this, '_detab_callback'), $text); - - return $text; - } - function _detab_callback($matches) { - $line = $matches[0]; - $strlen = $this->utf8_strlen; # strlen function for UTF-8. - - # Split in blocks. - $blocks = explode("\t", $line); - # Add each blocks to the line. - $line = $blocks[0]; - unset($blocks[0]); # Do not add first block twice. - foreach ($blocks as $block) { - # Calculate amount of space, insert spaces, insert block. - $amount = $this->tab_width - - $strlen($line, 'UTF-8') % $this->tab_width; - $line .= str_repeat(" ", $amount) . $block; - } - return $line; - } - function _initDetab() { - # - # Check for the availability of the function in the `utf8_strlen` property - # (initially `mb_strlen`). If the function is not available, create a - # function that will loosely count the number of UTF-8 characters with a - # regular expression. - # - if (function_exists($this->utf8_strlen)) return; - $this->utf8_strlen = create_function('$text', 'return preg_match_all( - "/[\\\\x00-\\\\xBF]|[\\\\xC0-\\\\xFF][\\\\x80-\\\\xBF]*/", - $text, $m);'); - } - - - function unhash($text) { - # - # Swap back in all the tags hashed by _HashHTMLBlocks. - # - return preg_replace_callback('/(.)\x1A[0-9]+\1/', - array(&$this, '_unhash_callback'), $text); - } - function _unhash_callback($matches) { - return $this->html_hashes[$matches[0]]; - } - -} - - -# -# Markdown Extra Parser Class -# - -class MarkdownExtra_Parser extends Markdown_Parser { - - # Prefix for footnote ids. - var $fn_id_prefix = ""; - - # Optional title attribute for footnote links and backlinks. - var $fn_link_title = MARKDOWN_FN_LINK_TITLE; - var $fn_backlink_title = MARKDOWN_FN_BACKLINK_TITLE; - - # Optional class attribute for footnote links and backlinks. - var $fn_link_class = MARKDOWN_FN_LINK_CLASS; - var $fn_backlink_class = MARKDOWN_FN_BACKLINK_CLASS; - - # Predefined abbreviations. - var $predef_abbr = array(); - - - function MarkdownExtra_Parser() { - # - # Constructor function. Initialize the parser object. - # - # Add extra escapable characters before parent constructor - # initialize the table. - $this->escape_chars .= ':|'; - - # Insert extra document, block, and span transformations. - # Parent constructor will do the sorting. - $this->document_gamut += array( - "doFencedCodeBlocks" => 5, - "stripFootnotes" => 15, - "stripAbbreviations" => 25, - "appendFootnotes" => 50, - ); - $this->block_gamut += array( - "doFencedCodeBlocks" => 5, - "doTables" => 15, - "doDefLists" => 45, - ); - $this->span_gamut += array( - "doFootnotes" => 5, - "doAbbreviations" => 70, - ); - - parent::Markdown_Parser(); - } - - - # Extra variables used during extra transformations. - var $footnotes = array(); - var $footnotes_ordered = array(); - var $abbr_desciptions = array(); - var $abbr_word_re = ''; - - # Give the current footnote number. - var $footnote_counter = 1; - - - function setup() { - # - # Setting up Extra-specific variables. - # - parent::setup(); - - $this->footnotes = array(); - $this->footnotes_ordered = array(); - $this->abbr_desciptions = array(); - $this->abbr_word_re = ''; - $this->footnote_counter = 1; - - foreach ($this->predef_abbr as $abbr_word => $abbr_desc) { - if ($this->abbr_word_re) - $this->abbr_word_re .= '|'; - $this->abbr_word_re .= preg_quote($abbr_word); - $this->abbr_desciptions[$abbr_word] = trim($abbr_desc); - } - } - - function teardown() { - # - # Clearing Extra-specific variables. - # - $this->footnotes = array(); - $this->footnotes_ordered = array(); - $this->abbr_desciptions = array(); - $this->abbr_word_re = ''; - - parent::teardown(); - } - - - ### HTML Block Parser ### - - # Tags that are always treated as block tags: - var $block_tags_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend'; - - # Tags treated as block tags only if the opening tag is alone on it's line: - var $context_block_tags_re = 'script|noscript|math|ins|del'; - - # Tags where markdown="1" default to span mode: - var $contain_span_tags_re = 'p|h[1-6]|li|dd|dt|td|th|legend|address'; - - # Tags which must not have their contents modified, no matter where - # they appear: - var $clean_tags_re = 'script|math'; - - # Tags that do not need to be closed. - var $auto_close_tags_re = 'hr|img'; - - - function hashHTMLBlocks($text) { - # - # Hashify HTML Blocks and "clean tags". - # - # We only want to do this for block-level HTML tags, such as headers, - # lists, and tables. That's because we still want to wrap

        s around - # "paragraphs" that are wrapped in non-block-level tags, such as anchors, - # phrase emphasis, and spans. The list of tags we're looking for is - # hard-coded. - # - # This works by calling _HashHTMLBlocks_InMarkdown, which then calls - # _HashHTMLBlocks_InHTML when it encounter block tags. When the markdown="1" - # attribute is found whitin a tag, _HashHTMLBlocks_InHTML calls back - # _HashHTMLBlocks_InMarkdown to handle the Markdown syntax within the tag. - # These two functions are calling each other. It's recursive! - # - # - # Call the HTML-in-Markdown hasher. - # - list($text, ) = $this->_hashHTMLBlocks_inMarkdown($text); - - return $text; - } - function _hashHTMLBlocks_inMarkdown($text, $indent = 0, - $enclosing_tag_re = '', $span = false) - { - # - # Parse markdown text, calling _HashHTMLBlocks_InHTML for block tags. - # - # * $indent is the number of space to be ignored when checking for code - # blocks. This is important because if we don't take the indent into - # account, something like this (which looks right) won't work as expected: - # - #

        - #
        - # Hello World. <-- Is this a Markdown code block or text? - #
        <-- Is this a Markdown code block or a real tag? - #
        - # - # If you don't like this, just don't indent the tag on which - # you apply the markdown="1" attribute. - # - # * If $enclosing_tag_re is not empty, stops at the first unmatched closing - # tag with that name. Nested tags supported. - # - # * If $span is true, text inside must treated as span. So any double - # newline will be replaced by a single newline so that it does not create - # paragraphs. - # - # Returns an array of that form: ( processed text , remaining text ) - # - if ($text === '') return array('', ''); - - # Regex to check for the presense of newlines around a block tag. - $newline_before_re = '/(?:^\n?|\n\n)*$/'; - $newline_after_re = - '{ - ^ # Start of text following the tag. - (?>[ ]*)? # Optional comment. - [ ]*\n # Must be followed by newline. - }xs'; - - # Regex to match any tag. - $block_tag_re = - '{ - ( # $2: Capture hole tag. - # Tag name. - '.$this->block_tags_re.' | - '.$this->context_block_tags_re.' | - '.$this->clean_tags_re.' | - (?!\s)'.$enclosing_tag_re.' - ) - (?: - (?=[\s"\'/a-zA-Z0-9]) # Allowed characters after tag name. - (?> - ".*?" | # Double quotes (can contain `>`) - \'.*?\' | # Single quotes (can contain `>`) - .+? # Anything but quotes and `>`. - )*? - )? - > # End of tag. - | - # HTML Comment - | - <\?.*?\?> | <%.*?%> # Processing instruction - | - # CData Block - | - # Code span marker - `+ - '. ( !$span ? ' # If not in span. - | - # Indented code block - (?: ^[ ]*\n | ^ | \n[ ]*\n ) - [ ]{'.($indent+4).'}[^\n]* \n - (?> - (?: [ ]{'.($indent+4).'}[^\n]* | [ ]* ) \n - )* - | - # Fenced code block marker - (?> ^ | \n ) - [ ]{'.($indent).'}~~~+[ ]*\n - ' : '' ). ' # End (if not is span). - ) - }xs'; - - - $depth = 0; # Current depth inside the tag tree. - $parsed = ""; # Parsed text that will be returned. - - # - # Loop through every tag until we find the closing tag of the parent - # or loop until reaching the end of text if no parent tag specified. - # - do { - # - # Split the text using the first $tag_match pattern found. - # Text before pattern will be first in the array, text after - # pattern will be at the end, and between will be any catches made - # by the pattern. - # - $parts = preg_split($block_tag_re, $text, 2, - PREG_SPLIT_DELIM_CAPTURE); - - # If in Markdown span mode, add a empty-string span-level hash - # after each newline to prevent triggering any block element. - if ($span) { - $void = $this->hashPart("", ':'); - $newline = "$void\n"; - $parts[0] = $void . str_replace("\n", $newline, $parts[0]) . $void; - } - - $parsed .= $parts[0]; # Text before current tag. - - # If end of $text has been reached. Stop loop. - if (count($parts) < 3) { - $text = ""; - break; - } - - $tag = $parts[1]; # Tag to handle. - $text = $parts[2]; # Remaining text after current tag. - $tag_re = preg_quote($tag); # For use in a regular expression. - - # - # Check for: Code span marker - # - if ($tag{0} == "`") { - # Find corresponding end marker. - $tag_re = preg_quote($tag); - if (preg_match('{^(?>.+?|\n(?!\n))*?(?.*\n)+?'.$tag_re.' *\n}', $text, - $matches)) - { - # End marker found: pass text unchanged until marker. - $parsed .= $tag . $matches[0]; - $text = substr($text, strlen($matches[0])); - } - else { - # No end marker: just skip it. - $parsed .= $tag; - } - } - # - # Check for: Opening Block level tag or - # Opening Context Block tag (like ins and del) - # used as a block tag (tag is alone on it's line). - # - else if (preg_match('{^<(?:'.$this->block_tags_re.')\b}', $tag) || - ( preg_match('{^<(?:'.$this->context_block_tags_re.')\b}', $tag) && - preg_match($newline_before_re, $parsed) && - preg_match($newline_after_re, $text) ) - ) - { - # Need to parse tag and following text using the HTML parser. - list($block_text, $text) = - $this->_hashHTMLBlocks_inHTML($tag . $text, "hashBlock", true); - - # Make sure it stays outside of any paragraph by adding newlines. - $parsed .= "\n\n$block_text\n\n"; - } - # - # Check for: Clean tag (like script, math) - # HTML Comments, processing instructions. - # - else if (preg_match('{^<(?:'.$this->clean_tags_re.')\b}', $tag) || - $tag{1} == '!' || $tag{1} == '?') - { - # Need to parse tag and following text using the HTML parser. - # (don't check for markdown attribute) - list($block_text, $text) = - $this->_hashHTMLBlocks_inHTML($tag . $text, "hashClean", false); - - $parsed .= $block_text; - } - # - # Check for: Tag with same name as enclosing tag. - # - else if ($enclosing_tag_re !== '' && - # Same name as enclosing tag. - preg_match('{^= 0); - - return array($parsed, $text); - } - function _hashHTMLBlocks_inHTML($text, $hash_method, $md_attr) { - # - # Parse HTML, calling _HashHTMLBlocks_InMarkdown for block tags. - # - # * Calls $hash_method to convert any blocks. - # * Stops when the first opening tag closes. - # * $md_attr indicate if the use of the `markdown="1"` attribute is allowed. - # (it is not inside clean tags) - # - # Returns an array of that form: ( processed text , remaining text ) - # - if ($text === '') return array('', ''); - - # Regex to match `markdown` attribute inside of a tag. - $markdown_attr_re = ' - { - \s* # Eat whitespace before the `markdown` attribute - markdown - \s*=\s* - (?> - (["\']) # $1: quote delimiter - (.*?) # $2: attribute value - \1 # matching delimiter - | - ([^\s>]*) # $3: unquoted attribute value - ) - () # $4: make $3 always defined (avoid warnings) - }xs'; - - # Regex to match any tag. - $tag_re = '{ - ( # $2: Capture hole tag. - - ".*?" | # Double quotes (can contain `>`) - \'.*?\' | # Single quotes (can contain `>`) - .+? # Anything but quotes and `>`. - )*? - )? - > # End of tag. - | - # HTML Comment - | - <\?.*?\?> | <%.*?%> # Processing instruction - | - # CData Block - ) - }xs'; - - $original_text = $text; # Save original text in case of faliure. - - $depth = 0; # Current depth inside the tag tree. - $block_text = ""; # Temporary text holder for current text. - $parsed = ""; # Parsed text that will be returned. - - # - # Get the name of the starting tag. - # (This pattern makes $base_tag_name_re safe without quoting.) - # - if (preg_match('/^<([\w:$]*)\b/', $text, $matches)) - $base_tag_name_re = $matches[1]; - - # - # Loop through every tag until we find the corresponding closing tag. - # - do { - # - # Split the text using the first $tag_match pattern found. - # Text before pattern will be first in the array, text after - # pattern will be at the end, and between will be any catches made - # by the pattern. - # - $parts = preg_split($tag_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE); - - if (count($parts) < 3) { - # - # End of $text reached with unbalenced tag(s). - # In that case, we return original text unchanged and pass the - # first character as filtered to prevent an infinite loop in the - # parent function. - # - return array($original_text{0}, substr($original_text, 1)); - } - - $block_text .= $parts[0]; # Text before current tag. - $tag = $parts[1]; # Tag to handle. - $text = $parts[2]; # Remaining text after current tag. - - # - # Check for: Auto-close tag (like
        ) - # Comments and Processing Instructions. - # - if (preg_match('{^auto_close_tags_re.')\b}', $tag) || - $tag{1} == '!' || $tag{1} == '?') - { - # Just add the tag to the block as if it was text. - $block_text .= $tag; - } - else { - # - # Increase/decrease nested tag count. Only do so if - # the tag's name match base tag's. - # - if (preg_match('{^mode = $attr_m[2] . $attr_m[3]; - $span_mode = $this->mode == 'span' || $this->mode != 'block' && - preg_match('{^<(?:'.$this->contain_span_tags_re.')\b}', $tag); - - # Calculate indent before tag. - if (preg_match('/(?:^|\n)( *?)(?! ).*?$/', $block_text, $matches)) { - $strlen = $this->utf8_strlen; - $indent = $strlen($matches[1], 'UTF-8'); - } else { - $indent = 0; - } - - # End preceding block with this tag. - $block_text .= $tag; - $parsed .= $this->$hash_method($block_text); - - # Get enclosing tag name for the ParseMarkdown function. - # (This pattern makes $tag_name_re safe without quoting.) - preg_match('/^<([\w:$]*)\b/', $tag, $matches); - $tag_name_re = $matches[1]; - - # Parse the content using the HTML-in-Markdown parser. - list ($block_text, $text) - = $this->_hashHTMLBlocks_inMarkdown($text, $indent, - $tag_name_re, $span_mode); - - # Outdent markdown text. - if ($indent > 0) { - $block_text = preg_replace("/^[ ]{1,$indent}/m", "", - $block_text); - } - - # Append tag content to parsed text. - if (!$span_mode) $parsed .= "\n\n$block_text\n\n"; - else $parsed .= "$block_text"; - - # Start over a new block. - $block_text = ""; - } - else $block_text .= $tag; - } - - } while ($depth > 0); - - # - # Hash last block text that wasn't processed inside the loop. - # - $parsed .= $this->$hash_method($block_text); - - return array($parsed, $text); - } - - - function hashClean($text) { - # - # Called whenever a tag must be hashed when a function insert a "clean" tag - # in $text, it pass through this function and is automaticaly escaped, - # blocking invalid nested overlap. - # - return $this->hashPart($text, 'C'); - } - - - function doHeaders($text) { - # - # Redefined to add id attribute support. - # - # Setext-style headers: - # Header 1 {#header1} - # ======== - # - # Header 2 {#header2} - # -------- - # - $text = preg_replace_callback( - '{ - (^.+?) # $1: Header text - (?:[ ]+\{\#([-_:a-zA-Z0-9]+)\})? # $2: Id attribute - [ ]*\n(=+|-+)[ ]*\n+ # $3: Header footer - }mx', - array(&$this, '_doHeaders_callback_setext'), $text); - - # atx-style headers: - # # Header 1 {#header1} - # ## Header 2 {#header2} - # ## Header 2 with closing hashes ## {#header3} - # ... - # ###### Header 6 {#header2} - # - $text = preg_replace_callback('{ - ^(\#{1,6}) # $1 = string of #\'s - [ ]* - (.+?) # $2 = Header text - [ ]* - \#* # optional closing #\'s (not counted) - (?:[ ]+\{\#([-_:a-zA-Z0-9]+)\})? # id attribute - [ ]* - \n+ - }xm', - array(&$this, '_doHeaders_callback_atx'), $text); - - return $text; - } - function _doHeaders_attr($attr) { - if (empty($attr)) return ""; - return " id=\"$attr\""; - } - function _doHeaders_callback_setext($matches) { - if ($matches[3] == '-' && preg_match('{^- }', $matches[1])) - return $matches[0]; - $level = $matches[3]{0} == '=' ? 1 : 2; - $attr = $this->_doHeaders_attr($id =& $matches[2]); - $block = "".$this->runSpanGamut($matches[1]).""; - return "\n" . $this->hashBlock($block) . "\n\n"; - } - function _doHeaders_callback_atx($matches) { - $level = strlen($matches[1]); - $attr = $this->_doHeaders_attr($id =& $matches[3]); - $block = "".$this->runSpanGamut($matches[2]).""; - return "\n" . $this->hashBlock($block) . "\n\n"; - } - - - function doTables($text) { - # - # Form HTML tables. - # - $less_than_tab = $this->tab_width - 1; - # - # Find tables with leading pipe. - # - # | Header 1 | Header 2 - # | -------- | -------- - # | Cell 1 | Cell 2 - # | Cell 3 | Cell 4 - # - $text = preg_replace_callback(' - { - ^ # Start of a line - [ ]{0,'.$less_than_tab.'} # Allowed whitespace. - [|] # Optional leading pipe (present) - (.+) \n # $1: Header row (at least one pipe) - - [ ]{0,'.$less_than_tab.'} # Allowed whitespace. - [|] ([ ]*[-:]+[-| :]*) \n # $2: Header underline - - ( # $3: Cells - (?> - [ ]* # Allowed whitespace. - [|] .* \n # Row content. - )* - ) - (?=\n|\Z) # Stop at final double newline. - }xm', - array(&$this, '_doTable_leadingPipe_callback'), $text); - - # - # Find tables without leading pipe. - # - # Header 1 | Header 2 - # -------- | -------- - # Cell 1 | Cell 2 - # Cell 3 | Cell 4 - # - $text = preg_replace_callback(' - { - ^ # Start of a line - [ ]{0,'.$less_than_tab.'} # Allowed whitespace. - (\S.*[|].*) \n # $1: Header row (at least one pipe) - - [ ]{0,'.$less_than_tab.'} # Allowed whitespace. - ([-:]+[ ]*[|][-| :]*) \n # $2: Header underline - - ( # $3: Cells - (?> - .* [|] .* \n # Row content - )* - ) - (?=\n|\Z) # Stop at final double newline. - }xm', - array(&$this, '_DoTable_callback'), $text); - - return $text; - } - function _doTable_leadingPipe_callback($matches) { - $head = $matches[1]; - $underline = $matches[2]; - $content = $matches[3]; - - # Remove leading pipe for each row. - $content = preg_replace('/^ *[|]/m', '', $content); - - return $this->_doTable_callback(array($matches[0], $head, $underline, $content)); - } - function _doTable_callback($matches) { - $head = $matches[1]; - $underline = $matches[2]; - $content = $matches[3]; - - # Remove any tailing pipes for each line. - $head = preg_replace('/[|] *$/m', '', $head); - $underline = preg_replace('/[|] *$/m', '', $underline); - $content = preg_replace('/[|] *$/m', '', $content); - - # Reading alignement from header underline. - $separators = preg_split('/ *[|] */', $underline); - foreach ($separators as $n => $s) { - if (preg_match('/^ *-+: *$/', $s)) $attr[$n] = ' align="right"'; - else if (preg_match('/^ *:-+: *$/', $s))$attr[$n] = ' align="center"'; - else if (preg_match('/^ *:-+ *$/', $s)) $attr[$n] = ' align="left"'; - else $attr[$n] = ''; - } - - # Parsing span elements, including code spans, character escapes, - # and inline HTML tags, so that pipes inside those gets ignored. - $head = $this->parseSpan($head); - $headers = preg_split('/ *[|] */', $head); - $col_count = count($headers); - - # Write column headers. - $text = "
        \n"; - $text .= "\n"; - $text .= "\n"; - foreach ($headers as $n => $header) - $text .= " ".$this->runSpanGamut(trim($header))."\n"; - $text .= "\n"; - $text .= "\n"; - - # Split content by row. - $rows = explode("\n", trim($content, "\n")); - - $text .= "\n"; - foreach ($rows as $row) { - # Parsing span elements, including code spans, character escapes, - # and inline HTML tags, so that pipes inside those gets ignored. - $row = $this->parseSpan($row); - - # Split row by cell. - $row_cells = preg_split('/ *[|] */', $row, $col_count); - $row_cells = array_pad($row_cells, $col_count, ''); - - $text .= "\n"; - foreach ($row_cells as $n => $cell) - $text .= " ".$this->runSpanGamut(trim($cell))."\n"; - $text .= "\n"; - } - $text .= "\n"; - $text .= "
        "; - - return $this->hashBlock($text) . "\n"; - } - - - function doDefLists($text) { - # - # Form HTML definition lists. - # - $less_than_tab = $this->tab_width - 1; - - # Re-usable pattern to match any entire dl list: - $whole_list_re = '(?> - ( # $1 = whole list - ( # $2 - [ ]{0,'.$less_than_tab.'} - ((?>.*\S.*\n)+) # $3 = defined term - \n? - [ ]{0,'.$less_than_tab.'}:[ ]+ # colon starting definition - ) - (?s:.+?) - ( # $4 - \z - | - \n{2,} - (?=\S) - (?! # Negative lookahead for another term - [ ]{0,'.$less_than_tab.'} - (?: \S.*\n )+? # defined term - \n? - [ ]{0,'.$less_than_tab.'}:[ ]+ # colon starting definition - ) - (?! # Negative lookahead for another definition - [ ]{0,'.$less_than_tab.'}:[ ]+ # colon starting definition - ) - ) - ) - )'; // mx - - $text = preg_replace_callback('{ - (?>\A\n?|(?<=\n\n)) - '.$whole_list_re.' - }mx', - array(&$this, '_doDefLists_callback'), $text); - - return $text; - } - function _doDefLists_callback($matches) { - # Re-usable patterns to match list item bullets and number markers: - $list = $matches[1]; - - # Turn double returns into triple returns, so that we can make a - # paragraph for the last item in a list, if necessary: - $result = trim($this->processDefListItems($list)); - $result = "
        \n" . $result . "\n
        "; - return $this->hashBlock($result) . "\n\n"; - } - - - function processDefListItems($list_str) { - # - # Process the contents of a single definition list, splitting it - # into individual term and definition list items. - # - $less_than_tab = $this->tab_width - 1; - - # trim trailing blank lines: - $list_str = preg_replace("/\n{2,}\\z/", "\n", $list_str); - - # Process definition terms. - $list_str = preg_replace_callback('{ - (?>\A\n?|\n\n+) # leading line - ( # definition terms = $1 - [ ]{0,'.$less_than_tab.'} # leading whitespace - (?![:][ ]|[ ]) # negative lookahead for a definition - # mark (colon) or more whitespace. - (?> \S.* \n)+? # actual term (not whitespace). - ) - (?=\n?[ ]{0,3}:[ ]) # lookahead for following line feed - # with a definition mark. - }xm', - array(&$this, '_processDefListItems_callback_dt'), $list_str); - - # Process actual definitions. - $list_str = preg_replace_callback('{ - \n(\n+)? # leading line = $1 - ( # marker space = $2 - [ ]{0,'.$less_than_tab.'} # whitespace before colon - [:][ ]+ # definition mark (colon) - ) - ((?s:.+?)) # definition text = $3 - (?= \n+ # stop at next definition mark, - (?: # next term or end of text - [ ]{0,'.$less_than_tab.'} [:][ ] | -
        | \z - ) - ) - }xm', - array(&$this, '_processDefListItems_callback_dd'), $list_str); - - return $list_str; - } - function _processDefListItems_callback_dt($matches) { - $terms = explode("\n", trim($matches[1])); - $text = ''; - foreach ($terms as $term) { - $term = $this->runSpanGamut(trim($term)); - $text .= "\n
        " . $term . "
        "; - } - return $text . "\n"; - } - function _processDefListItems_callback_dd($matches) { - $leading_line = $matches[1]; - $marker_space = $matches[2]; - $def = $matches[3]; - - if ($leading_line || preg_match('/\n{2,}/', $def)) { - # Replace marker with the appropriate whitespace indentation - $def = str_repeat(' ', strlen($marker_space)) . $def; - $def = $this->runBlockGamut($this->outdent($def . "\n\n")); - $def = "\n". $def ."\n"; - } - else { - $def = rtrim($def); - $def = $this->runSpanGamut($this->outdent($def)); - } - - return "\n
        " . $def . "
        \n"; - } - - - function doFencedCodeBlocks($text) { - # - # Adding the fenced code block syntax to regular Markdown: - # - # ~~~ - # Code block - # ~~~ - # - $less_than_tab = $this->tab_width; - - $text = preg_replace_callback('{ - (?:\n|\A) - # 1: Opening marker - ( - ~{3,} # Marker: three tilde or more. - ) - [ ]* \n # Whitespace and newline following marker. - - # 2: Content - ( - (?> - (?!\1 [ ]* \n) # Not a closing marker. - .*\n+ - )+ - ) - - # Closing marker. - \1 [ ]* \n - }xm', - array(&$this, '_doFencedCodeBlocks_callback'), $text); - - return $text; - } - function _doFencedCodeBlocks_callback($matches) { - $codeblock = $matches[2]; - $codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES); - $codeblock = preg_replace_callback('/^\n+/', - array(&$this, '_doFencedCodeBlocks_newlines'), $codeblock); - $codeblock = "
        $codeblock
        "; - return "\n\n".$this->hashBlock($codeblock)."\n\n"; - } - function _doFencedCodeBlocks_newlines($matches) { - return str_repeat("empty_element_suffix", - strlen($matches[0])); - } - - - # - # Redefining emphasis markers so that emphasis by underscore does not - # work in the middle of a word. - # - var $em_relist = array( - '' => '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? '(?:(? '(?<=\S|^)(? '(?<=\S|^)(? tags - # - # Strip leading and trailing lines: - $text = preg_replace('/\A\n+|\n+\z/', '', $text); - - $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY); - - # - # Wrap

        tags and unhashify HTML blocks - # - foreach ($grafs as $key => $value) { - $value = trim($this->runSpanGamut($value)); - - # Check if this should be enclosed in a paragraph. - # Clean tag hashes & block tag hashes are left alone. - $is_p = !preg_match('/^B\x1A[0-9]+B|^C\x1A[0-9]+C$/', $value); - - if ($is_p) { - $value = "

        $value

        "; - } - $grafs[$key] = $value; - } - - # Join grafs in one text, then unhash HTML tags. - $text = implode("\n\n", $grafs); - - # Finish by removing any tag hashes still present in $text. - $text = $this->unhash($text); - - return $text; - } - - - ### Footnotes - - function stripFootnotes($text) { - # - # Strips link definitions from text, stores the URLs and titles in - # hash references. - # - $less_than_tab = $this->tab_width - 1; - - # Link defs are in the form: [^id]: url "optional title" - $text = preg_replace_callback('{ - ^[ ]{0,'.$less_than_tab.'}\[\^(.+?)\][ ]?: # note_id = $1 - [ ]* - \n? # maybe *one* newline - ( # text = $2 (no blank lines allowed) - (?: - .+ # actual text - | - \n # newlines but - (?!\[\^.+?\]:\s)# negative lookahead for footnote marker. - (?!\n+[ ]{0,3}\S)# ensure line is not blank and followed - # by non-indented content - )* - ) - }xm', - array(&$this, '_stripFootnotes_callback'), - $text); - return $text; - } - function _stripFootnotes_callback($matches) { - $note_id = $this->fn_id_prefix . $matches[1]; - $this->footnotes[$note_id] = $this->outdent($matches[2]); - return ''; # String that will replace the block - } - - - function doFootnotes($text) { - # - # Replace footnote references in $text [^id] with a special text-token - # which will be replaced by the actual footnote marker in appendFootnotes. - # - if (!$this->in_anchor) { - $text = preg_replace('{\[\^(.+?)\]}', "F\x1Afn:\\1\x1A:", $text); - } - return $text; - } - - - function appendFootnotes($text) { - # - # Append footnote list to text. - # - $text = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}', - array(&$this, '_appendFootnotes_callback'), $text); - - if (!empty($this->footnotes_ordered)) { - $text .= "\n\n"; - $text .= "
        \n"; - $text .= "empty_element_suffix ."\n"; - $text .= "
          \n\n"; - - $attr = " rev=\"footnote\""; - if ($this->fn_backlink_class != "") { - $class = $this->fn_backlink_class; - $class = $this->encodeAttribute($class); - $attr .= " class=\"$class\""; - } - if ($this->fn_backlink_title != "") { - $title = $this->fn_backlink_title; - $title = $this->encodeAttribute($title); - $attr .= " title=\"$title\""; - } - $num = 0; - - while (!empty($this->footnotes_ordered)) { - $footnote = reset($this->footnotes_ordered); - $note_id = key($this->footnotes_ordered); - unset($this->footnotes_ordered[$note_id]); - - $footnote .= "\n"; # Need to append newline before parsing. - $footnote = $this->runBlockGamut("$footnote\n"); - $footnote = preg_replace_callback('{F\x1Afn:(.*?)\x1A:}', - array(&$this, '_appendFootnotes_callback'), $footnote); - - $attr = str_replace("%%", ++$num, $attr); - $note_id = $this->encodeAttribute($note_id); - - # Add backlink to last paragraph; create new paragraph if needed. - $backlink = ""; - if (preg_match('{

          $}', $footnote)) { - $footnote = substr($footnote, 0, -4) . " $backlink

          "; - } else { - $footnote .= "\n\n

          $backlink

          "; - } - - $text .= "
        1. \n"; - $text .= $footnote . "\n"; - $text .= "
        2. \n\n"; - } - - $text .= "
        \n"; - $text .= "
        "; - } - return $text; - } - function _appendFootnotes_callback($matches) { - $node_id = $this->fn_id_prefix . $matches[1]; - - # Create footnote marker only if it has a corresponding footnote *and* - # the footnote hasn't been used by another marker. - if (isset($this->footnotes[$node_id])) { - # Transfert footnote content to the ordered list. - $this->footnotes_ordered[$node_id] = $this->footnotes[$node_id]; - unset($this->footnotes[$node_id]); - - $num = $this->footnote_counter++; - $attr = " rel=\"footnote\""; - if ($this->fn_link_class != "") { - $class = $this->fn_link_class; - $class = $this->encodeAttribute($class); - $attr .= " class=\"$class\""; - } - if ($this->fn_link_title != "") { - $title = $this->fn_link_title; - $title = $this->encodeAttribute($title); - $attr .= " title=\"$title\""; - } - - $attr = str_replace("%%", $num, $attr); - $node_id = $this->encodeAttribute($node_id); - - return - "". - "$num". - ""; - } - - return "[^".$matches[1]."]"; - } - - - ### Abbreviations ### - - function stripAbbreviations($text) { - # - # Strips abbreviations from text, stores titles in hash references. - # - $less_than_tab = $this->tab_width - 1; - - # Link defs are in the form: [id]*: url "optional title" - $text = preg_replace_callback('{ - ^[ ]{0,'.$less_than_tab.'}\*\[(.+?)\][ ]?: # abbr_id = $1 - (.*) # text = $2 (no blank lines allowed) - }xm', - array(&$this, '_stripAbbreviations_callback'), - $text); - return $text; - } - function _stripAbbreviations_callback($matches) { - $abbr_word = $matches[1]; - $abbr_desc = $matches[2]; - if ($this->abbr_word_re) - $this->abbr_word_re .= '|'; - $this->abbr_word_re .= preg_quote($abbr_word); - $this->abbr_desciptions[$abbr_word] = trim($abbr_desc); - return ''; # String that will replace the block - } - - - function doAbbreviations($text) { - # - # Find defined abbreviations in text and wrap them in elements. - # - if ($this->abbr_word_re) { - // cannot use the /x modifier because abbr_word_re may - // contain significant spaces: - $text = preg_replace_callback('{'. - '(?abbr_word_re.')'. - '(?![\w\x1A])'. - '}', - array(&$this, '_doAbbreviations_callback'), $text); - } - return $text; - } - function _doAbbreviations_callback($matches) { - $abbr = $matches[0]; - if (isset($this->abbr_desciptions[$abbr])) { - $desc = $this->abbr_desciptions[$abbr]; - if (empty($desc)) { - return $this->hashPart("$abbr"); - } else { - $desc = $this->encodeAttribute($desc); - return $this->hashPart("$abbr"); - } - } else { - return $matches[0]; - } - } - -} - - -/* - -PHP Markdown Extra -================== - -Description ------------ - -This is a PHP port of the original Markdown formatter written in Perl -by John Gruber. This special "Extra" version of PHP Markdown features -further enhancements to the syntax for making additional constructs -such as tables and definition list. - -Markdown is a text-to-HTML filter; it translates an easy-to-read / -easy-to-write structured text format into HTML. Markdown's text format -is most similar to that of plain text email, and supports features such -as headers, *emphasis*, code blocks, blockquotes, and links. - -Markdown's syntax is designed not as a generic markup language, but -specifically to serve as a front-end to (X)HTML. You can use span-level -HTML tags anywhere in a Markdown document, and you can use block level -HTML tags (like
        and as well). - -For more information about Markdown's syntax, see: - - - - -Bugs ----- - -To file bug reports please send email to: - - - -Please include with your report: (1) the example input; (2) the output you -expected; (3) the output Markdown actually produced. - - -Version History ---------------- - -See the readme file for detailed release notes for this version. - - -Copyright and License ---------------------- - -PHP Markdown & Extra -Copyright (c) 2004-2009 Michel Fortin - -All rights reserved. - -Based on Markdown -Copyright (c) 2003-2006 John Gruber - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -* Neither the name "Markdown" nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -This software is provided by the copyright holders and contributors "as -is" and any express or implied warranties, including, but not limited -to, the implied warranties of merchantability and fitness for a -particular purpose are disclaimed. In no event shall the copyright owner -or contributors be liable for any direct, indirect, incidental, special, -exemplary, or consequential damages (including, but not limited to, -procurement of substitute goods or services; loss of use, data, or -profits; or business interruption) however caused and on any theory of -liability, whether in contract, strict liability, or tort (including -negligence or otherwise) arising in any way out of the use of this -software, even if advised of the possibility of such damage. - -*/ -?> \ No newline at end of file diff --git a/_piecrust/libs/Mustache/LICENSE b/_piecrust/libs/Mustache/LICENSE deleted file mode 100644 index 63c95ac..0000000 --- a/_piecrust/libs/Mustache/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2010 Justin Hileman - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/_piecrust/libs/Mustache/Mustache.php b/_piecrust/libs/Mustache/Mustache.php deleted file mode 100644 index 34c5e15..0000000 --- a/_piecrust/libs/Mustache/Mustache.php +++ /dev/null @@ -1,795 +0,0 @@ - false, - MustacheException::UNCLOSED_SECTION => true, - MustacheException::UNEXPECTED_CLOSE_SECTION => true, - MustacheException::UNKNOWN_PARTIAL => false, - MustacheException::UNKNOWN_PRAGMA => true, - ); - - // Override charset passed to htmlentities() and htmlspecialchars(). Defaults to UTF-8. - protected $_charset = 'UTF-8'; - - /** - * Pragmas are macro-like directives that, when invoked, change the behavior or - * syntax of Mustache. - * - * They should be considered extremely experimental. Most likely their implementation - * will change in the future. - */ - - /** - * The {{%DOT-NOTATION}} pragma allows context traversal via dots. Given the following context: - * - * $context = array('foo' => array('bar' => array('baz' => 'qux'))); - * - * One could access nested properties using dot notation: - * - * {{%DOT-NOTATION}}{{foo.bar.baz}} - * - * Which would render as `qux`. - */ - const PRAGMA_DOT_NOTATION = 'DOT-NOTATION'; - - /** - * The {{%IMPLICIT-ITERATOR}} pragma allows access to non-associative array data in an - * iterable section: - * - * $context = array('items' => array('foo', 'bar', 'baz')); - * - * With this template: - * - * {{%IMPLICIT-ITERATOR}}{{#items}}{{.}}{{/items}} - * - * Would render as `foobarbaz`. - * - * {{%IMPLICIT-ITERATOR}} accepts an optional 'iterator' argument which allows implicit - * iterator tags other than {{.}} ... - * - * {{%IMPLICIT-ITERATOR iterator=i}}{{#items}}{{i}}{{/items}} - */ - const PRAGMA_IMPLICIT_ITERATOR = 'IMPLICIT-ITERATOR'; - - /** - * The {{%UNESCAPED}} pragma swaps the meaning of the {{normal}} and {{{unescaped}}} - * Mustache tags. That is, once this pragma is activated the {{normal}} tag will not be - * escaped while the {{{unescaped}}} tag will be escaped. - * - * Pragmas apply only to the current template. Partials, even those included after the - * {{%UNESCAPED}} call, will need their own pragma declaration. - * - * This may be useful in non-HTML Mustache situations. - */ - const PRAGMA_UNESCAPED = 'UNESCAPED'; - - /** - * Constants used for section and tag RegEx - */ - const SECTION_TYPES = '\^#\/'; - const TAG_TYPES = '#\^\/=!<>\\{&'; - - public $_otag = '{{'; - public $_ctag = '}}'; - - protected $_tagRegEx; - - protected $_template = ''; - protected $_context = array(); - protected $_partials = array(); - protected $_pragmas = array(); - - protected $_pragmasImplemented = array( - self::PRAGMA_DOT_NOTATION, - self::PRAGMA_IMPLICIT_ITERATOR, - self::PRAGMA_UNESCAPED - ); - - protected $_localPragmas = array(); - - /** - * Mustache class constructor. - * - * This method accepts a $template string and a $view object. Optionally, pass an associative - * array of partials as well. - * - * @access public - * @param string $template (default: null) - * @param mixed $view (default: null) - * @param array $partials (default: null) - * @return void - */ - public function __construct($template = null, $view = null, $partials = null) { - if ($template !== null) $this->_template = $template; - if ($partials !== null) $this->_partials = $partials; - if ($view !== null) $this->_context = array($view); - } - - /** - * Mustache class clone method. - * - * A cloned Mustache instance should have pragmas, delimeters and root context - * reset to default values. - * - * @access public - * @return void - */ - public function __clone() { - $this->_otag = '{{'; - $this->_ctag = '}}'; - $this->_localPragmas = array(); - - if ($keys = array_keys($this->_context)) { - $last = array_pop($keys); - if ($this->_context[$last] instanceof Mustache) { - $this->_context[$last] =& $this; - } - } - } - - /** - * Render the given template and view object. - * - * Defaults to the template and view passed to the class constructor unless a new one is provided. - * Optionally, pass an associative array of partials as well. - * - * @access public - * @param string $template (default: null) - * @param mixed $view (default: null) - * @param array $partials (default: null) - * @return string Rendered Mustache template. - */ - public function render($template = null, $view = null, $partials = null) { - if ($template === null) $template = $this->_template; - if ($partials !== null) $this->_partials = $partials; - - if ($view) { - $this->_context = array($view); - } else if (empty($this->_context)) { - $this->_context = array($this); - } - - $template = $this->_renderPragmas($template); - return $this->_renderTemplate($template, $this->_context); - } - - /** - * Wrap the render() function for string conversion. - * - * @access public - * @return string - */ - public function __toString() { - // PHP doesn't like exceptions in __toString. - // catch any exceptions and convert them to strings. - try { - $result = $this->render(); - return $result; - } catch (Exception $e) { - return "Error rendering mustache: " . $e->getMessage(); - } - } - - /** - * Internal render function, used for recursive calls. - * - * @access protected - * @param string $template - * @return string Rendered Mustache template. - */ - protected function _renderTemplate($template) { - $template = $this->_renderSections($template); - return $this->_renderTags($template); - } - - /** - * Render boolean, enumerable and inverted sections. - * - * @access protected - * @param string $template - * @return string - */ - protected function _renderSections($template) { - while ($section_data = $this->_findSection($template)) { - list($section, $offset, $type, $tag_name, $content) = $section_data; - - $replace = ''; - $val = $this->_getVariable($tag_name); - switch($type) { - // inverted section - case '^': - if (empty($val)) { - $replace .= $content; - } - break; - - // regular section - case '#': - if ($this->_varIsIterable($val)) { - if ($this->_hasPragma(self::PRAGMA_IMPLICIT_ITERATOR)) { - if ($opt = $this->_getPragmaOptions(self::PRAGMA_IMPLICIT_ITERATOR)) { - $iterator = $opt['iterator']; - } else { - $iterator = '.'; - } - } else { - $iterator = false; - } - - foreach ($val as $local_context) { - - if ($iterator) { - $iterator_context = array($iterator => $local_context); - $this->_pushContext($iterator_context); - } else { - $this->_pushContext($local_context); - } - $replace .= $this->_renderTemplate($content); - $this->_popContext(); - } - } else if ($val) { - if (is_array($val) || is_object($val)) { - $this->_pushContext($val); - $replace .= $this->_renderTemplate($content); - $this->_popContext(); - } else { - $replace .= $content; - } - } - break; - } - - $template = substr_replace($template, $replace, $offset, strlen($section)); - } - - return $template; - } - - /** - * Prepare a section RegEx string for the given opening/closing tags. - * - * @access protected - * @param string $otag - * @param string $ctag - * @return string - */ - protected function _prepareSectionRegEx($otag, $ctag) { - return sprintf( - '/(?:(?<=\\n)[ \\t]*)?%s(?P[%s])(?P.+?)%s\\n?/s', - preg_quote($otag, '/'), - self::SECTION_TYPES, - preg_quote($ctag, '/') - ); - } - - /** - * Extract a section from $template. - * - * This is a helper function to find sections needed by _renderSections. - * - * @access protected - * @param string $template - * @return array $section, $offset, $type, $tag_name and $content - */ - protected function _findSection($template) { - $regEx = $this->_prepareSectionRegEx($this->_otag, $this->_ctag); - - $section_start = null; - $section_type = null; - $content_start = null; - - $search_offset = 0; - - $section_stack = array(); - $matches = array(); - while (preg_match($regEx, $template, $matches, PREG_OFFSET_CAPTURE, $search_offset)) { - - $match = $matches[0][0]; - $offset = $matches[0][1]; - $type = $matches['type'][0]; - $tag_name = trim($matches['tag_name'][0]); - - $search_offset = $offset + strlen($match); - - switch ($type) { - case '^': - case '#': - if (empty($section_stack)) { - $section_start = $offset; - $section_type = $type; - $content_start = $search_offset; - } - array_push($section_stack, $tag_name); - break; - case '/': - if (empty($section_stack) || ($tag_name !== array_pop($section_stack))) { - if ($this->_throwsException(MustacheException::UNEXPECTED_CLOSE_SECTION)) { - throw new MustacheException('Unexpected close section: ' . $tag_name, MustacheException::UNEXPECTED_CLOSE_SECTION); - } - } - - if (empty($section_stack)) { - $section = substr($template, $section_start, $search_offset - $section_start); - $content = substr($template, $content_start, $offset - $content_start); - - return array($section, $section_start, $section_type, $tag_name, $content); - } - break; - } - } - - if (!empty($section_stack)) { - if ($this->_throwsException(MustacheException::UNCLOSED_SECTION)) { - throw new MustacheException('Unclosed section: ' . $section_stack[0], MustacheException::UNCLOSED_SECTION); - } - } - } - - /** - * Prepare a pragma RegEx for the given opening/closing tags. - * - * @access protected - * @param string $otag - * @param string $ctag - * @return string - */ - protected function _preparePragmaRegEx($otag, $ctag) { - return sprintf( - '/%s%%\\s*(?P[\\w_-]+)(?P(?: [\\w]+=[\\w]+)*)\\s*%s\\n?/s', - preg_quote($otag, '/'), - preg_quote($ctag, '/') - ); - } - - /** - * Initialize pragmas and remove all pragma tags. - * - * @access protected - * @param string $template - * @return string - */ - protected function _renderPragmas($template) { - $this->_localPragmas = $this->_pragmas; - - // no pragmas - if (strpos($template, $this->_otag . '%') === false) { - return $template; - } - - $regEx = $this->_preparePragmaRegEx($this->_otag, $this->_ctag); - return preg_replace_callback($regEx, array($this, '_renderPragma'), $template); - } - - /** - * A preg_replace helper to remove {{%PRAGMA}} tags and enable requested pragma. - * - * @access protected - * @param mixed $matches - * @return void - * @throws MustacheException unknown pragma - */ - protected function _renderPragma($matches) { - $pragma = $matches[0]; - $pragma_name = $matches['pragma_name']; - $options_string = $matches['options_string']; - - if (!in_array($pragma_name, $this->_pragmasImplemented)) { - throw new MustacheException('Unknown pragma: ' . $pragma_name, MustacheException::UNKNOWN_PRAGMA); - } - - $options = array(); - foreach (explode(' ', trim($options_string)) as $o) { - if ($p = trim($o)) { - $p = explode('=', $p); - $options[$p[0]] = $p[1]; - } - } - - if (empty($options)) { - $this->_localPragmas[$pragma_name] = true; - } else { - $this->_localPragmas[$pragma_name] = $options; - } - - return ''; - } - - /** - * Check whether this Mustache has a specific pragma. - * - * @access protected - * @param string $pragma_name - * @return bool - */ - protected function _hasPragma($pragma_name) { - if (array_key_exists($pragma_name, $this->_localPragmas) && $this->_localPragmas[$pragma_name]) { - return true; - } else { - return false; - } - } - - /** - * Return pragma options, if any. - * - * @access protected - * @param string $pragma_name - * @return mixed - * @throws MustacheException Unknown pragma - */ - protected function _getPragmaOptions($pragma_name) { - if (!$this->_hasPragma($pragma_name)) { - throw new MustacheException('Unknown pragma: ' . $pragma_name, MustacheException::UNKNOWN_PRAGMA); - } - - return (is_array($this->_localPragmas[$pragma_name])) ? $this->_localPragmas[$pragma_name] : array(); - } - - /** - * Check whether this Mustache instance throws a given exception. - * - * Expects exceptions to be MustacheException error codes (i.e. class constants). - * - * @access protected - * @param mixed $exception - * @return void - */ - protected function _throwsException($exception) { - return (isset($this->_throwsExceptions[$exception]) && $this->_throwsExceptions[$exception]); - } - - /** - * Prepare a tag RegEx for the given opening/closing tags. - * - * @access protected - * @param string $otag - * @param string $ctag - * @return string - */ - protected function _prepareTagRegEx($otag, $ctag) { - return sprintf( - '/(?P(?<=\\n)[ \\t]*)?%s(?P[%s]?)(?P.+?)(?:\\2|})?%s(?:\\s*(?=\\n))?/s', - preg_quote($otag, '/'), - self::TAG_TYPES, - preg_quote($ctag, '/') - ); - } - - /** - * Loop through and render individual Mustache tags. - * - * @access protected - * @param string $template - * @return void - */ - protected function _renderTags($template) { - if (strpos($template, $this->_otag) === false) { - return $template; - } - - $otag_orig = $this->_otag; - $ctag_orig = $this->_ctag; - - $this->_tagRegEx = $this->_prepareTagRegEx($this->_otag, $this->_ctag); - - $html = ''; - $matches = array(); - while (preg_match($this->_tagRegEx, $template, $matches, PREG_OFFSET_CAPTURE)) { - $tag = $matches[0][0]; - $offset = $matches[0][1]; - $modifier = $matches['type'][0]; - $tag_name = trim($matches['tag_name'][0]); - - if (isset($matches['whitespace']) && $matches['whitespace'][1] > -1) { - $whitespace = $matches['whitespace'][0]; - } else { - $whitespace = null; - } - - $html .= substr($template, 0, $offset); - - $next_offset = $offset + strlen($tag); - if ((substr($html, -1) == "\n") && (substr($template, $next_offset, 1) == "\n")) { - $next_offset++; - } - $template = substr($template, $next_offset); - - $html .= $this->_renderTag($modifier, $tag_name, $whitespace); - } - - $this->_otag = $otag_orig; - $this->_ctag = $ctag_orig; - - return $html . $template; - } - - /** - * Render the named tag, given the specified modifier. - * - * Accepted modifiers are `=` (change delimiter), `!` (comment), `>` (partial) - * `{` or `&` (don't escape output), or none (render escaped output). - * - * @access protected - * @param string $modifier - * @param string $tag_name - * @throws MustacheException Unmatched section tag encountered. - * @return string - */ - protected function _renderTag($modifier, $tag_name, $whitespace) { - switch ($modifier) { - case '=': - return $this->_changeDelimiter($tag_name); - break; - case '!': - return $this->_renderComment($tag_name); - break; - case '>': - case '<': - return $this->_renderPartial($tag_name, $whitespace); - break; - case '{': - // strip the trailing } ... - if ($tag_name[(strlen($tag_name) - 1)] == '}') { - $tag_name = substr($tag_name, 0, -1); - } - case '&': - if ($this->_hasPragma(self::PRAGMA_UNESCAPED)) { - return $this->_renderEscaped($tag_name); - } else { - return $this->_renderUnescaped($tag_name); - } - break; - case '#': - case '^': - case '/': - // remove any leftovers from _renderSections - return ''; - break; - } - - if ($this->_hasPragma(self::PRAGMA_UNESCAPED)) { - return $this->_renderUnescaped($modifier . $tag_name); - } else { - return $this->_renderEscaped($modifier . $tag_name); - } - } - - /** - * Escape and return the requested tag. - * - * @access protected - * @param string $tag_name - * @return string - */ - protected function _renderEscaped($tag_name) { - return htmlentities($this->_getVariable($tag_name), ENT_COMPAT, $this->_charset); - } - - /** - * Render a comment (i.e. return an empty string). - * - * @access protected - * @param string $tag_name - * @return string - */ - protected function _renderComment($tag_name) { - return ''; - } - - /** - * Return the requested tag unescaped. - * - * @access protected - * @param string $tag_name - * @return string - */ - protected function _renderUnescaped($tag_name) { - return $this->_getVariable($tag_name); - } - - /** - * Render the requested partial. - * - * @access protected - * @param string $tag_name - * @return string - */ - protected function _renderPartial($tag_name, $whitespace = '') { - $view = clone($this); - - return $whitespace . preg_replace('/\n(?!$)/s', "\n" . $whitespace, $view->render($this->_getPartial($tag_name))); - } - - /** - * Change the Mustache tag delimiter. This method also replaces this object's current - * tag RegEx with one using the new delimiters. - * - * @access protected - * @param string $tag_name - * @return string - */ - protected function _changeDelimiter($tag_name) { - list($otag, $ctag) = explode(' ', $tag_name); - $this->_otag = $otag; - $this->_ctag = $ctag; - - $this->_tagRegEx = $this->_prepareTagRegEx($this->_otag, $this->_ctag); - - return ''; - } - - /** - * Push a local context onto the stack. - * - * @access protected - * @param array &$local_context - * @return void - */ - protected function _pushContext(&$local_context) { - $new = array(); - $new[] =& $local_context; - foreach (array_keys($this->_context) as $key) { - $new[] =& $this->_context[$key]; - } - $this->_context = $new; - } - - /** - * Remove the latest context from the stack. - * - * @access protected - * @return void - */ - protected function _popContext() { - $new = array(); - - $keys = array_keys($this->_context); - array_shift($keys); - foreach ($keys as $key) { - $new[] =& $this->_context[$key]; - } - $this->_context = $new; - } - - /** - * Get a variable from the context array. - * - * If the view is an array, returns the value with array key $tag_name. - * If the view is an object, this will check for a public member variable - * named $tag_name. If none is available, this method will execute and return - * any class method named $tag_name. Failing all of the above, this method will - * return an empty string. - * - * @access protected - * @param string $tag_name - * @throws MustacheException Unknown variable name. - * @return string - */ - protected function _getVariable($tag_name) { - if ($tag_name != '.' && strpos($tag_name, '.') !== false && $this->_hasPragma(self::PRAGMA_DOT_NOTATION)) { - $chunks = explode('.', $tag_name); - $first = array_shift($chunks); - - $ret = $this->_findVariableInContext($first, $this->_context); - while ($next = array_shift($chunks)) { - // Slice off a chunk of context for dot notation traversal. - $c = array($ret); - $ret = $this->_findVariableInContext($next, $c); - } - return $ret; - } else { - return $this->_findVariableInContext($tag_name, $this->_context); - } - } - - /** - * Get a variable from the context array. Internal helper used by getVariable() to abstract - * variable traversal for dot notation. - * - * @access protected - * @param string $tag_name - * @param array $context - * @throws MustacheException Unknown variable name. - * @return string - */ - protected function _findVariableInContext($tag_name, $context) { - foreach ($context as $view) { - if (is_object($view)) { - if (method_exists($view, $tag_name)) { - return $view->$tag_name(); - } else if (isset($view->$tag_name)) { - return $view->$tag_name; - } - } else if (array_key_exists($tag_name, $view)) { - return $view[$tag_name]; - } - } - - if ($this->_throwsException(MustacheException::UNKNOWN_VARIABLE)) { - throw new MustacheException("Unknown variable: " . $tag_name, MustacheException::UNKNOWN_VARIABLE); - } else { - return ''; - } - } - - /** - * Retrieve the partial corresponding to the requested tag name. - * - * Silently fails (i.e. returns '') when the requested partial is not found. - * - * @access protected - * @param string $tag_name - * @throws MustacheException Unknown partial name. - * @return string - */ - protected function _getPartial($tag_name) { - if (is_array($this->_partials) && isset($this->_partials[$tag_name])) { - return $this->_partials[$tag_name]; - } - - if ($this->_throwsException(MustacheException::UNKNOWN_PARTIAL)) { - throw new MustacheException('Unknown partial: ' . $tag_name, MustacheException::UNKNOWN_PARTIAL); - } else { - return ''; - } - } - - /** - * Check whether the given $var should be iterated (i.e. in a section context). - * - * @access protected - * @param mixed $var - * @return bool - */ - protected function _varIsIterable($var) { - return $var instanceof Traversable || (is_array($var) && !array_diff_key($var, array_keys(array_keys($var)))); - } -} - - -/** - * MustacheException class. - * - * @extends Exception - */ -class MustacheException extends Exception { - - // An UNKNOWN_VARIABLE exception is thrown when a {{variable}} is not found - // in the current context. - const UNKNOWN_VARIABLE = 0; - - // An UNCLOSED_SECTION exception is thrown when a {{#section}} is not closed. - const UNCLOSED_SECTION = 1; - - // An UNEXPECTED_CLOSE_SECTION exception is thrown when {{/section}} appears - // without a corresponding {{#section}} or {{^section}}. - const UNEXPECTED_CLOSE_SECTION = 2; - - // An UNKNOWN_PARTIAL exception is thrown whenever a {{>partial}} tag appears - // with no associated partial. - const UNKNOWN_PARTIAL = 3; - - // An UNKNOWN_PRAGMA exception is thrown whenever a {{%PRAGMA}} tag appears - // which can't be handled by this Mustache instance. - const UNKNOWN_PRAGMA = 4; - -} \ No newline at end of file diff --git a/_piecrust/libs/Mustache/README.markdown b/_piecrust/libs/Mustache/README.markdown deleted file mode 100644 index 3662d3c..0000000 --- a/_piecrust/libs/Mustache/README.markdown +++ /dev/null @@ -1,92 +0,0 @@ -Mustache.php -============ - -A [Mustache](http://defunkt.github.com/mustache/) implementation in PHP. - - -Usage ------ - -A quick example: - - render('Hello {{planet}}', array('planet' => 'World!')); - // "Hello World!" - ?> - - -And a more in-depth example--this is the canonical Mustache template: - - Hello {{name}} - You have just won ${{value}}! - {{#in_ca}} - Well, ${{taxed_value}}, after taxes. - {{/in_ca}} - - -Along with the associated Mustache class: - - value - ($this->value * 0.4); - } - - public $in_ca = true; - } - - -Render it like so: - - render($template); - ?> - - -Here's the same thing, a different way: - -Create a view object--which could also be an associative array, but those don't do functions quite as well: - - value - ($this->value * 0.4); - } - - public $in_ca = true; - } - ?> - - -And render it: - - render($template, $chris); - ?> - - - - -Known Issues ------------- - - * Things get weird when you change delimiters inside a section -- `delimiters` example currently fails with an - "unclosed section" exception. - - -See Also --------- - - * [Readme for the Ruby Mustache implementation](http://github.com/defunkt/mustache/blob/master/README.md). - * [mustache(1)](http://defunkt.github.com/mustache/mustache.1.html) and [mustache(5)](http://defunkt.github.com/mustache/mustache.5.html) man pages. \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Autoloader.php b/_piecrust/libs/PEAR/Autoloader.php deleted file mode 100644 index 0ed707e..0000000 --- a/_piecrust/libs/PEAR/Autoloader.php +++ /dev/null @@ -1,218 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Autoloader.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader - * @since File available since Release 0.1 - * @deprecated File deprecated in Release 1.4.0a1 - */ - -// /* vim: set expandtab tabstop=4 shiftwidth=4: */ - -if (!extension_loaded("overload")) { - // die hard without ext/overload - die("Rebuild PHP with the `overload' extension to use PEAR_Autoloader"); -} - -/** - * Include for PEAR_Error and PEAR classes - */ -require_once "PEAR.php"; - -/** - * This class is for objects where you want to separate the code for - * some methods into separate classes. This is useful if you have a - * class with not-frequently-used methods that contain lots of code - * that you would like to avoid always parsing. - * - * The PEAR_Autoloader class provides autoloading and aggregation. - * The autoloading lets you set up in which classes the separated - * methods are found. Aggregation is the technique used to import new - * methods, an instance of each class providing separated methods is - * stored and called every time the aggregated method is called. - * - * @category pear - * @package PEAR - * @author Stig Bakken - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/manual/en/core.ppm.php#core.ppm.pear-autoloader - * @since File available since Release 0.1 - * @deprecated File deprecated in Release 1.4.0a1 - */ -class PEAR_Autoloader extends PEAR -{ - // {{{ properties - - /** - * Map of methods and classes where they are defined - * - * @var array - * - * @access private - */ - var $_autoload_map = array(); - - /** - * Map of methods and aggregate objects - * - * @var array - * - * @access private - */ - var $_method_map = array(); - - // }}} - // {{{ addAutoload() - - /** - * Add one or more autoload entries. - * - * @param string $method which method to autoload - * - * @param string $classname (optional) which class to find the method in. - * If the $method parameter is an array, this - * parameter may be omitted (and will be ignored - * if not), and the $method parameter will be - * treated as an associative array with method - * names as keys and class names as values. - * - * @return void - * - * @access public - */ - function addAutoload($method, $classname = null) - { - if (is_array($method)) { - array_walk($method, create_function('$a,&$b', '$b = strtolower($b);')); - $this->_autoload_map = array_merge($this->_autoload_map, $method); - } else { - $this->_autoload_map[strtolower($method)] = $classname; - } - } - - // }}} - // {{{ removeAutoload() - - /** - * Remove an autoload entry. - * - * @param string $method which method to remove the autoload entry for - * - * @return bool TRUE if an entry was removed, FALSE if not - * - * @access public - */ - function removeAutoload($method) - { - $method = strtolower($method); - $ok = isset($this->_autoload_map[$method]); - unset($this->_autoload_map[$method]); - return $ok; - } - - // }}} - // {{{ addAggregateObject() - - /** - * Add an aggregate object to this object. If the specified class - * is not defined, loading it will be attempted following PEAR's - * file naming scheme. All the methods in the class will be - * aggregated, except private ones (name starting with an - * underscore) and constructors. - * - * @param string $classname what class to instantiate for the object. - * - * @return void - * - * @access public - */ - function addAggregateObject($classname) - { - $classname = strtolower($classname); - if (!class_exists($classname)) { - $include_file = preg_replace('/[^a-z0-9]/i', '_', $classname); - include_once $include_file; - } - $obj =& new $classname; - $methods = get_class_methods($classname); - foreach ($methods as $method) { - // don't import priviate methods and constructors - if ($method{0} != '_' && $method != $classname) { - $this->_method_map[$method] = $obj; - } - } - } - - // }}} - // {{{ removeAggregateObject() - - /** - * Remove an aggregate object. - * - * @param string $classname the class of the object to remove - * - * @return bool TRUE if an object was removed, FALSE if not - * - * @access public - */ - function removeAggregateObject($classname) - { - $ok = false; - $classname = strtolower($classname); - reset($this->_method_map); - while (list($method, $obj) = each($this->_method_map)) { - if (is_a($obj, $classname)) { - unset($this->_method_map[$method]); - $ok = true; - } - } - return $ok; - } - - // }}} - // {{{ __call() - - /** - * Overloaded object call handler, called each time an - * undefined/aggregated method is invoked. This method repeats - * the call in the right aggregate object and passes on the return - * value. - * - * @param string $method which method that was called - * - * @param string $args An array of the parameters passed in the - * original call - * - * @return mixed The return value from the aggregated method, or a PEAR - * error if the called method was unknown. - */ - function __call($method, $args, &$retval) - { - $method = strtolower($method); - if (empty($this->_method_map[$method]) && isset($this->_autoload_map[$method])) { - $this->addAggregateObject($this->_autoload_map[$method]); - } - if (isset($this->_method_map[$method])) { - $retval = call_user_func_array(array($this->_method_map[$method], $method), $args); - return true; - } - return false; - } - - // }}} -} - -overload("PEAR_Autoloader"); - -?> diff --git a/_piecrust/libs/PEAR/Builder.php b/_piecrust/libs/PEAR/Builder.php deleted file mode 100644 index 90f3a14..0000000 --- a/_piecrust/libs/PEAR/Builder.php +++ /dev/null @@ -1,489 +0,0 @@ - - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Builder.php 313024 2011-07-06 19:51:24Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - * - * TODO: log output parameters in PECL command line - * TODO: msdev path in configuration - */ - -/** - * Needed for extending PEAR_Builder - */ -require_once 'PEAR/Common.php'; -require_once 'PEAR/PackageFile.php'; - -/** - * Class to handle building (compiling) extensions. - * - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since PHP 4.0.2 - * @see http://pear.php.net/manual/en/core.ppm.pear-builder.php - */ -class PEAR_Builder extends PEAR_Common -{ - var $php_api_version = 0; - var $zend_module_api_no = 0; - var $zend_extension_api_no = 0; - - var $extensions_built = array(); - - /** - * @var string Used for reporting when it is not possible to pass function - * via extra parameter, e.g. log, msdevCallback - */ - var $current_callback = null; - - // used for msdev builds - var $_lastline = null; - var $_firstline = null; - - /** - * PEAR_Builder constructor. - * - * @param object $ui user interface object (instance of PEAR_Frontend_*) - * - * @access public - */ - function PEAR_Builder(&$ui) - { - parent::PEAR_Common(); - $this->setFrontendObject($ui); - } - - /** - * Build an extension from source on windows. - * requires msdev - */ - function _build_win32($descfile, $callback = null) - { - if (is_object($descfile)) { - $pkg = $descfile; - $descfile = $pkg->getPackageFile(); - } else { - $pf = &new PEAR_PackageFile($this->config, $this->debug); - $pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL); - if (PEAR::isError($pkg)) { - return $pkg; - } - } - $dir = dirname($descfile); - $old_cwd = getcwd(); - - if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) { - return $this->raiseError("could not chdir to $dir"); - } - - // packages that were in a .tar have the packagefile in this directory - $vdir = $pkg->getPackage() . '-' . $pkg->getVersion(); - if (file_exists($dir) && is_dir($vdir)) { - if (!chdir($vdir)) { - return $this->raiseError("could not chdir to " . realpath($vdir)); - } - - $dir = getcwd(); - } - - $this->log(2, "building in $dir"); - - $dsp = $pkg->getPackage().'.dsp'; - if (!file_exists("$dir/$dsp")) { - return $this->raiseError("The DSP $dsp does not exist."); - } - // XXX TODO: make release build type configurable - $command = 'msdev '.$dsp.' /MAKE "'.$pkg->getPackage(). ' - Release"'; - - $err = $this->_runCommand($command, array(&$this, 'msdevCallback')); - if (PEAR::isError($err)) { - return $err; - } - - // figure out the build platform and type - $platform = 'Win32'; - $buildtype = 'Release'; - if (preg_match('/.*?'.$pkg->getPackage().'\s-\s(\w+)\s(.*?)-+/i',$this->_firstline,$matches)) { - $platform = $matches[1]; - $buildtype = $matches[2]; - } - - if (preg_match('/(.*)?\s-\s(\d+).*?(\d+)/', $this->_lastline, $matches)) { - if ($matches[2]) { - // there were errors in the build - return $this->raiseError("There were errors during compilation."); - } - $out = $matches[1]; - } else { - return $this->raiseError("Did not understand the completion status returned from msdev.exe."); - } - - // msdev doesn't tell us the output directory :/ - // open the dsp, find /out and use that directory - $dsptext = join(file($dsp),''); - - // this regex depends on the build platform and type having been - // correctly identified above. - $regex ='/.*?!IF\s+"\$\(CFG\)"\s+==\s+("'. - $pkg->getPackage().'\s-\s'. - $platform.'\s'. - $buildtype.'").*?'. - '\/out:"(.*?)"/is'; - - if ($dsptext && preg_match($regex, $dsptext, $matches)) { - // what we get back is a relative path to the output file itself. - $outfile = realpath($matches[2]); - } else { - return $this->raiseError("Could not retrieve output information from $dsp."); - } - // realpath returns false if the file doesn't exist - if ($outfile && copy($outfile, "$dir/$out")) { - $outfile = "$dir/$out"; - } - - $built_files[] = array( - 'file' => "$outfile", - 'php_api' => $this->php_api_version, - 'zend_mod_api' => $this->zend_module_api_no, - 'zend_ext_api' => $this->zend_extension_api_no, - ); - - return $built_files; - } - // }}} - - // {{{ msdevCallback() - function msdevCallback($what, $data) - { - if (!$this->_firstline) - $this->_firstline = $data; - $this->_lastline = $data; - call_user_func($this->current_callback, $what, $data); - } - - /** - * @param string - * @param string - * @param array - * @access private - */ - function _harvestInstDir($dest_prefix, $dirname, &$built_files) - { - $d = opendir($dirname); - if (!$d) - return false; - - $ret = true; - while (($ent = readdir($d)) !== false) { - if ($ent{0} == '.') - continue; - - $full = $dirname . DIRECTORY_SEPARATOR . $ent; - if (is_dir($full)) { - if (!$this->_harvestInstDir( - $dest_prefix . DIRECTORY_SEPARATOR . $ent, - $full, $built_files)) { - $ret = false; - break; - } - } else { - $dest = $dest_prefix . DIRECTORY_SEPARATOR . $ent; - $built_files[] = array( - 'file' => $full, - 'dest' => $dest, - 'php_api' => $this->php_api_version, - 'zend_mod_api' => $this->zend_module_api_no, - 'zend_ext_api' => $this->zend_extension_api_no, - ); - } - } - closedir($d); - return $ret; - } - - /** - * Build an extension from source. Runs "phpize" in the source - * directory, but compiles in a temporary directory - * (TMPDIR/pear-build-USER/PACKAGE-VERSION). - * - * @param string|PEAR_PackageFile_v* $descfile path to XML package description file, or - * a PEAR_PackageFile object - * - * @param mixed $callback callback function used to report output, - * see PEAR_Builder::_runCommand for details - * - * @return array an array of associative arrays with built files, - * format: - * array( array( 'file' => '/path/to/ext.so', - * 'php_api' => YYYYMMDD, - * 'zend_mod_api' => YYYYMMDD, - * 'zend_ext_api' => YYYYMMDD ), - * ... ) - * - * @access public - * - * @see PEAR_Builder::_runCommand - */ - function build($descfile, $callback = null) - { - if (preg_match('/(\\/|\\\\|^)([^\\/\\\\]+)?php(.+)?$/', - $this->config->get('php_bin'), $matches)) { - if (isset($matches[2]) && strlen($matches[2]) && - trim($matches[2]) != trim($this->config->get('php_prefix'))) { - $this->log(0, 'WARNING: php_bin ' . $this->config->get('php_bin') . - ' appears to have a prefix ' . $matches[2] . ', but' . - ' config variable php_prefix does not match'); - } - - if (isset($matches[3]) && strlen($matches[3]) && - trim($matches[3]) != trim($this->config->get('php_suffix'))) { - $this->log(0, 'WARNING: php_bin ' . $this->config->get('php_bin') . - ' appears to have a suffix ' . $matches[3] . ', but' . - ' config variable php_suffix does not match'); - } - } - - $this->current_callback = $callback; - if (PEAR_OS == "Windows") { - return $this->_build_win32($descfile, $callback); - } - - if (PEAR_OS != 'Unix') { - return $this->raiseError("building extensions not supported on this platform"); - } - - if (is_object($descfile)) { - $pkg = $descfile; - $descfile = $pkg->getPackageFile(); - if (is_a($pkg, 'PEAR_PackageFile_v1')) { - $dir = dirname($descfile); - } else { - $dir = $pkg->_config->get('temp_dir') . '/' . $pkg->getName(); - // automatically delete at session end - $this->addTempFile($dir); - } - } else { - $pf = &new PEAR_PackageFile($this->config); - $pkg = &$pf->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL); - if (PEAR::isError($pkg)) { - return $pkg; - } - $dir = dirname($descfile); - } - - // Find config. outside of normal path - e.g. config.m4 - foreach (array_keys($pkg->getInstallationFileList()) as $item) { - if (stristr(basename($item), 'config.m4') && dirname($item) != '.') { - $dir .= DIRECTORY_SEPARATOR . dirname($item); - break; - } - } - - $old_cwd = getcwd(); - if (!file_exists($dir) || !is_dir($dir) || !chdir($dir)) { - return $this->raiseError("could not chdir to $dir"); - } - - $vdir = $pkg->getPackage() . '-' . $pkg->getVersion(); - if (is_dir($vdir)) { - chdir($vdir); - } - - $dir = getcwd(); - $this->log(2, "building in $dir"); - putenv('PATH=' . $this->config->get('bin_dir') . ':' . getenv('PATH')); - $err = $this->_runCommand($this->config->get('php_prefix') - . "phpize" . - $this->config->get('php_suffix'), - array(&$this, 'phpizeCallback')); - if (PEAR::isError($err)) { - return $err; - } - - if (!$err) { - return $this->raiseError("`phpize' failed"); - } - - // {{{ start of interactive part - $configure_command = "$dir/configure"; - $configure_options = $pkg->getConfigureOptions(); - if ($configure_options) { - foreach ($configure_options as $o) { - $default = array_key_exists('default', $o) ? $o['default'] : null; - list($r) = $this->ui->userDialog('build', - array($o['prompt']), - array('text'), - array($default)); - if (substr($o['name'], 0, 5) == 'with-' && - ($r == 'yes' || $r == 'autodetect')) { - $configure_command .= " --$o[name]"; - } else { - $configure_command .= " --$o[name]=".trim($r); - } - } - } - // }}} end of interactive part - - // FIXME make configurable - if (!$user=getenv('USER')) { - $user='defaultuser'; - } - - $tmpdir = $this->config->get('temp_dir'); - $build_basedir = System::mktemp(' -t "' . $tmpdir . '" -d "pear-build-' . $user . '"'); - $build_dir = "$build_basedir/$vdir"; - $inst_dir = "$build_basedir/install-$vdir"; - $this->log(1, "building in $build_dir"); - if (is_dir($build_dir)) { - System::rm(array('-rf', $build_dir)); - } - - if (!System::mkDir(array('-p', $build_dir))) { - return $this->raiseError("could not create build dir: $build_dir"); - } - - $this->addTempFile($build_dir); - if (!System::mkDir(array('-p', $inst_dir))) { - return $this->raiseError("could not create temporary install dir: $inst_dir"); - } - $this->addTempFile($inst_dir); - - $make_command = getenv('MAKE') ? getenv('MAKE') : 'make'; - - $to_run = array( - $configure_command, - $make_command, - "$make_command INSTALL_ROOT=\"$inst_dir\" install", - "find \"$inst_dir\" | xargs ls -dils" - ); - if (!file_exists($build_dir) || !is_dir($build_dir) || !chdir($build_dir)) { - return $this->raiseError("could not chdir to $build_dir"); - } - putenv('PHP_PEAR_VERSION=1.9.4'); - foreach ($to_run as $cmd) { - $err = $this->_runCommand($cmd, $callback); - if (PEAR::isError($err)) { - chdir($old_cwd); - return $err; - } - if (!$err) { - chdir($old_cwd); - return $this->raiseError("`$cmd' failed"); - } - } - if (!($dp = opendir("modules"))) { - chdir($old_cwd); - return $this->raiseError("no `modules' directory found"); - } - $built_files = array(); - $prefix = exec($this->config->get('php_prefix') - . "php-config" . - $this->config->get('php_suffix') . " --prefix"); - $this->_harvestInstDir($prefix, $inst_dir . DIRECTORY_SEPARATOR . $prefix, $built_files); - chdir($old_cwd); - return $built_files; - } - - /** - * Message callback function used when running the "phpize" - * program. Extracts the API numbers used. Ignores other message - * types than "cmdoutput". - * - * @param string $what the type of message - * @param mixed $data the message - * - * @return void - * - * @access public - */ - function phpizeCallback($what, $data) - { - if ($what != 'cmdoutput') { - return; - } - $this->log(1, rtrim($data)); - if (preg_match('/You should update your .aclocal.m4/', $data)) { - return; - } - $matches = array(); - if (preg_match('/^\s+(\S[^:]+):\s+(\d{8})/', $data, $matches)) { - $member = preg_replace('/[^a-z]/', '_', strtolower($matches[1])); - $apino = (int)$matches[2]; - if (isset($this->$member)) { - $this->$member = $apino; - //$msg = sprintf("%-22s : %d", $matches[1], $apino); - //$this->log(1, $msg); - } - } - } - - /** - * Run an external command, using a message callback to report - * output. The command will be run through popen and output is - * reported for every line with a "cmdoutput" message with the - * line string, including newlines, as payload. - * - * @param string $command the command to run - * - * @param mixed $callback (optional) function to use as message - * callback - * - * @return bool whether the command was successful (exit code 0 - * means success, any other means failure) - * - * @access private - */ - function _runCommand($command, $callback = null) - { - $this->log(1, "running: $command"); - $pp = popen("$command 2>&1", "r"); - if (!$pp) { - return $this->raiseError("failed to run `$command'"); - } - if ($callback && $callback[0]->debug == 1) { - $olddbg = $callback[0]->debug; - $callback[0]->debug = 2; - } - - while ($line = fgets($pp, 1024)) { - if ($callback) { - call_user_func($callback, 'cmdoutput', $line); - } else { - $this->log(2, rtrim($line)); - } - } - if ($callback && isset($olddbg)) { - $callback[0]->debug = $olddbg; - } - - $exitcode = is_resource($pp) ? pclose($pp) : -1; - return ($exitcode == 0); - } - - function log($level, $msg) - { - if ($this->current_callback) { - if ($this->debug >= $level) { - call_user_func($this->current_callback, 'output', $msg); - } - return; - } - return PEAR_Common::log($level, $msg); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/ChannelFile.php b/_piecrust/libs/PEAR/ChannelFile.php deleted file mode 100644 index f2c02ab..0000000 --- a/_piecrust/libs/PEAR/ChannelFile.php +++ /dev/null @@ -1,1559 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: ChannelFile.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * Needed for error handling - */ -require_once 'PEAR/ErrorStack.php'; -require_once 'PEAR/XMLParser.php'; -require_once 'PEAR/Common.php'; - -/** - * Error code if the channel.xml tag does not contain a valid version - */ -define('PEAR_CHANNELFILE_ERROR_NO_VERSION', 1); -/** - * Error code if the channel.xml tag version is not supported (version 1.0 is the only supported version, - * currently - */ -define('PEAR_CHANNELFILE_ERROR_INVALID_VERSION', 2); - -/** - * Error code if parsing is attempted with no xml extension - */ -define('PEAR_CHANNELFILE_ERROR_NO_XML_EXT', 3); - -/** - * Error code if creating the xml parser resource fails - */ -define('PEAR_CHANNELFILE_ERROR_CANT_MAKE_PARSER', 4); - -/** - * Error code used for all sax xml parsing errors - */ -define('PEAR_CHANNELFILE_ERROR_PARSER_ERROR', 5); - -/**#@+ - * Validation errors - */ -/** - * Error code when channel name is missing - */ -define('PEAR_CHANNELFILE_ERROR_NO_NAME', 6); -/** - * Error code when channel name is invalid - */ -define('PEAR_CHANNELFILE_ERROR_INVALID_NAME', 7); -/** - * Error code when channel summary is missing - */ -define('PEAR_CHANNELFILE_ERROR_NO_SUMMARY', 8); -/** - * Error code when channel summary is multi-line - */ -define('PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY', 9); -/** - * Error code when channel server is missing for protocol - */ -define('PEAR_CHANNELFILE_ERROR_NO_HOST', 10); -/** - * Error code when channel server is invalid for protocol - */ -define('PEAR_CHANNELFILE_ERROR_INVALID_HOST', 11); -/** - * Error code when a mirror name is invalid - */ -define('PEAR_CHANNELFILE_ERROR_INVALID_MIRROR', 21); -/** - * Error code when a mirror type is invalid - */ -define('PEAR_CHANNELFILE_ERROR_INVALID_MIRRORTYPE', 22); -/** - * Error code when an attempt is made to generate xml, but the parsed content is invalid - */ -define('PEAR_CHANNELFILE_ERROR_INVALID', 23); -/** - * Error code when an empty package name validate regex is passed in - */ -define('PEAR_CHANNELFILE_ERROR_EMPTY_REGEX', 24); -/** - * Error code when a tag has no version - */ -define('PEAR_CHANNELFILE_ERROR_NO_FUNCTIONVERSION', 25); -/** - * Error code when a tag has no name - */ -define('PEAR_CHANNELFILE_ERROR_NO_FUNCTIONNAME', 26); -/** - * Error code when a tag has no name - */ -define('PEAR_CHANNELFILE_ERROR_NOVALIDATE_NAME', 27); -/** - * Error code when a tag has no version attribute - */ -define('PEAR_CHANNELFILE_ERROR_NOVALIDATE_VERSION', 28); -/** - * Error code when a mirror does not exist but is called for in one of the set* - * methods. - */ -define('PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND', 32); -/** - * Error code when a server port is not numeric - */ -define('PEAR_CHANNELFILE_ERROR_INVALID_PORT', 33); -/** - * Error code when contains no version attribute - */ -define('PEAR_CHANNELFILE_ERROR_NO_STATICVERSION', 34); -/** - * Error code when contains no type attribute in a protocol definition - */ -define('PEAR_CHANNELFILE_ERROR_NOBASEURLTYPE', 35); -/** - * Error code when a mirror is defined and the channel.xml represents the __uri pseudo-channel - */ -define('PEAR_CHANNELFILE_URI_CANT_MIRROR', 36); -/** - * Error code when ssl attribute is present and is not "yes" - */ -define('PEAR_CHANNELFILE_ERROR_INVALID_SSL', 37); -/**#@-*/ - -/** - * Mirror types allowed. Currently only internet servers are recognized. - */ -$GLOBALS['_PEAR_CHANNELS_MIRROR_TYPES'] = array('server'); - - -/** - * The Channel handling class - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_ChannelFile -{ - /** - * @access private - * @var PEAR_ErrorStack - * @access private - */ - var $_stack; - - /** - * Supported channel.xml versions, for parsing - * @var array - * @access private - */ - var $_supportedVersions = array('1.0'); - - /** - * Parsed channel information - * @var array - * @access private - */ - var $_channelInfo; - - /** - * index into the subchannels array, used for parsing xml - * @var int - * @access private - */ - var $_subchannelIndex; - - /** - * index into the mirrors array, used for parsing xml - * @var int - * @access private - */ - var $_mirrorIndex; - - /** - * Flag used to determine the validity of parsed content - * @var boolean - * @access private - */ - var $_isValid = false; - - function PEAR_ChannelFile() - { - $this->_stack = &new PEAR_ErrorStack('PEAR_ChannelFile'); - $this->_stack->setErrorMessageTemplate($this->_getErrorMessage()); - $this->_isValid = false; - } - - /** - * @return array - * @access protected - */ - function _getErrorMessage() - { - return - array( - PEAR_CHANNELFILE_ERROR_INVALID_VERSION => - 'While parsing channel.xml, an invalid version number "%version% was passed in, expecting one of %versions%', - PEAR_CHANNELFILE_ERROR_NO_VERSION => - 'No version number found in tag', - PEAR_CHANNELFILE_ERROR_NO_XML_EXT => - '%error%', - PEAR_CHANNELFILE_ERROR_CANT_MAKE_PARSER => - 'Unable to create XML parser', - PEAR_CHANNELFILE_ERROR_PARSER_ERROR => - '%error%', - PEAR_CHANNELFILE_ERROR_NO_NAME => - 'Missing channel name', - PEAR_CHANNELFILE_ERROR_INVALID_NAME => - 'Invalid channel %tag% "%name%"', - PEAR_CHANNELFILE_ERROR_NO_SUMMARY => - 'Missing channel summary', - PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY => - 'Channel summary should be on one line, but is multi-line', - PEAR_CHANNELFILE_ERROR_NO_HOST => - 'Missing channel server for %type% server', - PEAR_CHANNELFILE_ERROR_INVALID_HOST => - 'Server name "%server%" is invalid for %type% server', - PEAR_CHANNELFILE_ERROR_INVALID_MIRROR => - 'Invalid mirror name "%name%", mirror type %type%', - PEAR_CHANNELFILE_ERROR_INVALID_MIRRORTYPE => - 'Invalid mirror type "%type%"', - PEAR_CHANNELFILE_ERROR_INVALID => - 'Cannot generate xml, contents are invalid', - PEAR_CHANNELFILE_ERROR_EMPTY_REGEX => - 'packagenameregex cannot be empty', - PEAR_CHANNELFILE_ERROR_NO_FUNCTIONVERSION => - '%parent% %protocol% function has no version', - PEAR_CHANNELFILE_ERROR_NO_FUNCTIONNAME => - '%parent% %protocol% function has no name', - PEAR_CHANNELFILE_ERROR_NOBASEURLTYPE => - '%parent% rest baseurl has no type', - PEAR_CHANNELFILE_ERROR_NOVALIDATE_NAME => - 'Validation package has no name in tag', - PEAR_CHANNELFILE_ERROR_NOVALIDATE_VERSION => - 'Validation package "%package%" has no version', - PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND => - 'Mirror "%mirror%" does not exist', - PEAR_CHANNELFILE_ERROR_INVALID_PORT => - 'Port "%port%" must be numeric', - PEAR_CHANNELFILE_ERROR_NO_STATICVERSION => - ' tag must contain version attribute', - PEAR_CHANNELFILE_URI_CANT_MIRROR => - 'The __uri pseudo-channel cannot have mirrors', - PEAR_CHANNELFILE_ERROR_INVALID_SSL => - '%server% has invalid ssl attribute "%ssl%" can only be yes or not present', - ); - } - - /** - * @param string contents of package.xml file - * @return bool success of parsing - */ - function fromXmlString($data) - { - if (preg_match('/_supportedVersions)) { - $this->_stack->push(PEAR_CHANNELFILE_ERROR_INVALID_VERSION, 'error', - array('version' => $channelversion[1])); - return false; - } - $parser = new PEAR_XMLParser; - $result = $parser->parse($data); - if ($result !== true) { - if ($result->getCode() == 1) { - $this->_stack->push(PEAR_CHANNELFILE_ERROR_NO_XML_EXT, 'error', - array('error' => $result->getMessage())); - } else { - $this->_stack->push(PEAR_CHANNELFILE_ERROR_CANT_MAKE_PARSER, 'error'); - } - return false; - } - $this->_channelInfo = $parser->getData(); - return true; - } else { - $this->_stack->push(PEAR_CHANNELFILE_ERROR_NO_VERSION, 'error', array('xml' => $data)); - return false; - } - } - - /** - * @return array - */ - function toArray() - { - if (!$this->_isValid && !$this->validate()) { - return false; - } - return $this->_channelInfo; - } - - /** - * @param array - * @static - * @return PEAR_ChannelFile|false false if invalid - */ - function &fromArray($data, $compatibility = false, $stackClass = 'PEAR_ErrorStack') - { - $a = new PEAR_ChannelFile($compatibility, $stackClass); - $a->_fromArray($data); - if (!$a->validate()) { - $a = false; - return $a; - } - return $a; - } - - /** - * Unlike {@link fromArray()} this does not do any validation - * @param array - * @static - * @return PEAR_ChannelFile - */ - function &fromArrayWithErrors($data, $compatibility = false, - $stackClass = 'PEAR_ErrorStack') - { - $a = new PEAR_ChannelFile($compatibility, $stackClass); - $a->_fromArray($data); - return $a; - } - - /** - * @param array - * @access private - */ - function _fromArray($data) - { - $this->_channelInfo = $data; - } - - /** - * Wrapper to {@link PEAR_ErrorStack::getErrors()} - * @param boolean determines whether to purge the error stack after retrieving - * @return array - */ - function getErrors($purge = false) - { - return $this->_stack->getErrors($purge); - } - - /** - * Unindent given string (?) - * - * @param string $str The string that has to be unindented. - * @return string - * @access private - */ - function _unIndent($str) - { - // remove leading newlines - $str = preg_replace('/^[\r\n]+/', '', $str); - // find whitespace at the beginning of the first line - $indent_len = strspn($str, " \t"); - $indent = substr($str, 0, $indent_len); - $data = ''; - // remove the same amount of whitespace from following lines - foreach (explode("\n", $str) as $line) { - if (substr($line, 0, $indent_len) == $indent) { - $data .= substr($line, $indent_len) . "\n"; - } - } - return $data; - } - - /** - * Parse a channel.xml file. Expects the name of - * a channel xml file as input. - * - * @param string $descfile name of channel xml file - * @return bool success of parsing - */ - function fromXmlFile($descfile) - { - if (!file_exists($descfile) || !is_file($descfile) || !is_readable($descfile) || - (!$fp = fopen($descfile, 'r'))) { - require_once 'PEAR.php'; - return PEAR::raiseError("Unable to open $descfile"); - } - - // read the whole thing so we only get one cdata callback - // for each block of cdata - fclose($fp); - $data = file_get_contents($descfile); - return $this->fromXmlString($data); - } - - /** - * Parse channel information from different sources - * - * This method is able to extract information about a channel - * from an .xml file or a string - * - * @access public - * @param string Filename of the source or the source itself - * @return bool - */ - function fromAny($info) - { - if (is_string($info) && file_exists($info) && strlen($info) < 255) { - $tmp = substr($info, -4); - if ($tmp == '.xml') { - $info = $this->fromXmlFile($info); - } else { - $fp = fopen($info, "r"); - $test = fread($fp, 5); - fclose($fp); - if ($test == "fromXmlFile($info); - } - } - if (PEAR::isError($info)) { - require_once 'PEAR.php'; - return PEAR::raiseError($info); - } - } - if (is_string($info)) { - $info = $this->fromXmlString($info); - } - return $info; - } - - /** - * Return an XML document based on previous parsing and modifications - * - * @return string XML data - * - * @access public - */ - function toXml() - { - if (!$this->_isValid && !$this->validate()) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID); - return false; - } - if (!isset($this->_channelInfo['attribs']['version'])) { - $this->_channelInfo['attribs']['version'] = '1.0'; - } - $channelInfo = $this->_channelInfo; - $ret = "\n"; - $ret .= " - $channelInfo[name] - " . htmlspecialchars($channelInfo['summary'])." -"; - if (isset($channelInfo['suggestedalias'])) { - $ret .= ' ' . $channelInfo['suggestedalias'] . "\n"; - } - if (isset($channelInfo['validatepackage'])) { - $ret .= ' ' . - htmlspecialchars($channelInfo['validatepackage']['_content']) . - "\n"; - } - $ret .= " \n"; - $ret .= ' _makeRestXml($channelInfo['servers']['primary']['rest'], ' '); - } - $ret .= " \n"; - if (isset($channelInfo['servers']['mirror'])) { - $ret .= $this->_makeMirrorsXml($channelInfo); - } - $ret .= " \n"; - $ret .= ""; - return str_replace("\r", "\n", str_replace("\r\n", "\n", $ret)); - } - - /** - * Generate the tag - * @access private - */ - function _makeRestXml($info, $indent) - { - $ret = $indent . "\n"; - if (isset($info['baseurl']) && !isset($info['baseurl'][0])) { - $info['baseurl'] = array($info['baseurl']); - } - - if (isset($info['baseurl'])) { - foreach ($info['baseurl'] as $url) { - $ret .= "$indent \n"; - } - } - $ret .= $indent . "\n"; - return $ret; - } - - /** - * Generate the tag - * @access private - */ - function _makeMirrorsXml($channelInfo) - { - $ret = ""; - if (!isset($channelInfo['servers']['mirror'][0])) { - $channelInfo['servers']['mirror'] = array($channelInfo['servers']['mirror']); - } - foreach ($channelInfo['servers']['mirror'] as $mirror) { - $ret .= ' _makeRestXml($mirror['rest'], ' '); - } - $ret .= " \n"; - } else { - $ret .= "/>\n"; - } - } - return $ret; - } - - /** - * Generate the tag - * @access private - */ - function _makeFunctionsXml($functions, $indent, $rest = false) - { - $ret = ''; - if (!isset($functions[0])) { - $functions = array($functions); - } - foreach ($functions as $function) { - $ret .= "$indent\n"; - } - return $ret; - } - - /** - * Validation error. Also marks the object contents as invalid - * @param error code - * @param array error information - * @access private - */ - function _validateError($code, $params = array()) - { - $this->_stack->push($code, 'error', $params); - $this->_isValid = false; - } - - /** - * Validation warning. Does not mark the object contents invalid. - * @param error code - * @param array error information - * @access private - */ - function _validateWarning($code, $params = array()) - { - $this->_stack->push($code, 'warning', $params); - } - - /** - * Validate parsed file. - * - * @access public - * @return boolean - */ - function validate() - { - $this->_isValid = true; - $info = $this->_channelInfo; - if (empty($info['name'])) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_NAME); - } elseif (!$this->validChannelServer($info['name'])) { - if ($info['name'] != '__uri') { - $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME, array('tag' => 'name', - 'name' => $info['name'])); - } - } - if (empty($info['summary'])) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_SUMMARY); - } elseif (strpos(trim($info['summary']), "\n") !== false) { - $this->_validateWarning(PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY, - array('summary' => $info['summary'])); - } - if (isset($info['suggestedalias'])) { - if (!$this->validChannelServer($info['suggestedalias'])) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME, - array('tag' => 'suggestedalias', 'name' =>$info['suggestedalias'])); - } - } - if (isset($info['localalias'])) { - if (!$this->validChannelServer($info['localalias'])) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME, - array('tag' => 'localalias', 'name' =>$info['localalias'])); - } - } - if (isset($info['validatepackage'])) { - if (!isset($info['validatepackage']['_content'])) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_NOVALIDATE_NAME); - } - if (!isset($info['validatepackage']['attribs']['version'])) { - $content = isset($info['validatepackage']['_content']) ? - $info['validatepackage']['_content'] : - null; - $this->_validateError(PEAR_CHANNELFILE_ERROR_NOVALIDATE_VERSION, - array('package' => $content)); - } - } - - if (isset($info['servers']['primary']['attribs'], $info['servers']['primary']['attribs']['port']) && - !is_numeric($info['servers']['primary']['attribs']['port'])) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_PORT, - array('port' => $info['servers']['primary']['attribs']['port'])); - } - - if (isset($info['servers']['primary']['attribs'], $info['servers']['primary']['attribs']['ssl']) && - $info['servers']['primary']['attribs']['ssl'] != 'yes') { - $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_SSL, - array('ssl' => $info['servers']['primary']['attribs']['ssl'], - 'server' => $info['name'])); - } - - if (isset($info['servers']['primary']['rest']) && - isset($info['servers']['primary']['rest']['baseurl'])) { - $this->_validateFunctions('rest', $info['servers']['primary']['rest']['baseurl']); - } - if (isset($info['servers']['mirror'])) { - if ($this->_channelInfo['name'] == '__uri') { - $this->_validateError(PEAR_CHANNELFILE_URI_CANT_MIRROR); - } - if (!isset($info['servers']['mirror'][0])) { - $info['servers']['mirror'] = array($info['servers']['mirror']); - } - foreach ($info['servers']['mirror'] as $mirror) { - if (!isset($mirror['attribs']['host'])) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_HOST, - array('type' => 'mirror')); - } elseif (!$this->validChannelServer($mirror['attribs']['host'])) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_HOST, - array('server' => $mirror['attribs']['host'], 'type' => 'mirror')); - } - if (isset($mirror['attribs']['ssl']) && $mirror['attribs']['ssl'] != 'yes') { - $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_SSL, - array('ssl' => $info['ssl'], 'server' => $mirror['attribs']['host'])); - } - if (isset($mirror['rest'])) { - $this->_validateFunctions('rest', $mirror['rest']['baseurl'], - $mirror['attribs']['host']); - } - } - } - return $this->_isValid; - } - - /** - * @param string rest - protocol name this function applies to - * @param array the functions - * @param string the name of the parent element (mirror name, for instance) - */ - function _validateFunctions($protocol, $functions, $parent = '') - { - if (!isset($functions[0])) { - $functions = array($functions); - } - - foreach ($functions as $function) { - if (!isset($function['_content']) || empty($function['_content'])) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_FUNCTIONNAME, - array('parent' => $parent, 'protocol' => $protocol)); - } - - if ($protocol == 'rest') { - if (!isset($function['attribs']['type']) || - empty($function['attribs']['type'])) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_NOBASEURLTYPE, - array('parent' => $parent, 'protocol' => $protocol)); - } - } else { - if (!isset($function['attribs']['version']) || - empty($function['attribs']['version'])) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_FUNCTIONVERSION, - array('parent' => $parent, 'protocol' => $protocol)); - } - } - } - } - - /** - * Test whether a string contains a valid channel server. - * @param string $ver the package version to test - * @return bool - */ - function validChannelServer($server) - { - if ($server == '__uri') { - return true; - } - return (bool) preg_match(PEAR_CHANNELS_SERVER_PREG, $server); - } - - /** - * @return string|false - */ - function getName() - { - if (isset($this->_channelInfo['name'])) { - return $this->_channelInfo['name']; - } - - return false; - } - - /** - * @return string|false - */ - function getServer() - { - if (isset($this->_channelInfo['name'])) { - return $this->_channelInfo['name']; - } - - return false; - } - - /** - * @return int|80 port number to connect to - */ - function getPort($mirror = false) - { - if ($mirror) { - if ($mir = $this->getMirror($mirror)) { - if (isset($mir['attribs']['port'])) { - return $mir['attribs']['port']; - } - - if ($this->getSSL($mirror)) { - return 443; - } - - return 80; - } - - return false; - } - - if (isset($this->_channelInfo['servers']['primary']['attribs']['port'])) { - return $this->_channelInfo['servers']['primary']['attribs']['port']; - } - - if ($this->getSSL()) { - return 443; - } - - return 80; - } - - /** - * @return bool Determines whether secure sockets layer (SSL) is used to connect to this channel - */ - function getSSL($mirror = false) - { - if ($mirror) { - if ($mir = $this->getMirror($mirror)) { - if (isset($mir['attribs']['ssl'])) { - return true; - } - - return false; - } - - return false; - } - - if (isset($this->_channelInfo['servers']['primary']['attribs']['ssl'])) { - return true; - } - - return false; - } - - /** - * @return string|false - */ - function getSummary() - { - if (isset($this->_channelInfo['summary'])) { - return $this->_channelInfo['summary']; - } - - return false; - } - - /** - * @param string protocol type - * @param string Mirror name - * @return array|false - */ - function getFunctions($protocol, $mirror = false) - { - if ($this->getName() == '__uri') { - return false; - } - - $function = $protocol == 'rest' ? 'baseurl' : 'function'; - if ($mirror) { - if ($mir = $this->getMirror($mirror)) { - if (isset($mir[$protocol][$function])) { - return $mir[$protocol][$function]; - } - } - - return false; - } - - if (isset($this->_channelInfo['servers']['primary'][$protocol][$function])) { - return $this->_channelInfo['servers']['primary'][$protocol][$function]; - } - - return false; - } - - /** - * @param string Protocol type - * @param string Function name (null to return the - * first protocol of the type requested) - * @param string Mirror name, if any - * @return array - */ - function getFunction($type, $name = null, $mirror = false) - { - $protocols = $this->getFunctions($type, $mirror); - if (!$protocols) { - return false; - } - - foreach ($protocols as $protocol) { - if ($name === null) { - return $protocol; - } - - if ($protocol['_content'] != $name) { - continue; - } - - return $protocol; - } - - return false; - } - - /** - * @param string protocol type - * @param string protocol name - * @param string version - * @param string mirror name - * @return boolean - */ - function supports($type, $name = null, $mirror = false, $version = '1.0') - { - $protocols = $this->getFunctions($type, $mirror); - if (!$protocols) { - return false; - } - - foreach ($protocols as $protocol) { - if ($protocol['attribs']['version'] != $version) { - continue; - } - - if ($name === null) { - return true; - } - - if ($protocol['_content'] != $name) { - continue; - } - - return true; - } - - return false; - } - - /** - * Determines whether a channel supports Representational State Transfer (REST) protocols - * for retrieving channel information - * @param string - * @return bool - */ - function supportsREST($mirror = false) - { - if ($mirror == $this->_channelInfo['name']) { - $mirror = false; - } - - if ($mirror) { - if ($mir = $this->getMirror($mirror)) { - return isset($mir['rest']); - } - - return false; - } - - return isset($this->_channelInfo['servers']['primary']['rest']); - } - - /** - * Get the URL to access a base resource. - * - * Hyperlinks in the returned xml will be used to retrieve the proper information - * needed. This allows extreme extensibility and flexibility in implementation - * @param string Resource Type to retrieve - */ - function getBaseURL($resourceType, $mirror = false) - { - if ($mirror == $this->_channelInfo['name']) { - $mirror = false; - } - - if ($mirror) { - $mir = $this->getMirror($mirror); - if (!$mir) { - return false; - } - - $rest = $mir['rest']; - } else { - $rest = $this->_channelInfo['servers']['primary']['rest']; - } - - if (!isset($rest['baseurl'][0])) { - $rest['baseurl'] = array($rest['baseurl']); - } - - foreach ($rest['baseurl'] as $baseurl) { - if (strtolower($baseurl['attribs']['type']) == strtolower($resourceType)) { - return $baseurl['_content']; - } - } - - return false; - } - - /** - * Since REST does not implement RPC, provide this as a logical wrapper around - * resetFunctions for REST - * @param string|false mirror name, if any - */ - function resetREST($mirror = false) - { - return $this->resetFunctions('rest', $mirror); - } - - /** - * Empty all protocol definitions - * @param string protocol type - * @param string|false mirror name, if any - */ - function resetFunctions($type, $mirror = false) - { - if ($mirror) { - if (isset($this->_channelInfo['servers']['mirror'])) { - $mirrors = $this->_channelInfo['servers']['mirror']; - if (!isset($mirrors[0])) { - $mirrors = array($mirrors); - } - - foreach ($mirrors as $i => $mir) { - if ($mir['attribs']['host'] == $mirror) { - if (isset($this->_channelInfo['servers']['mirror'][$i][$type])) { - unset($this->_channelInfo['servers']['mirror'][$i][$type]); - } - - return true; - } - } - - return false; - } - - return false; - } - - if (isset($this->_channelInfo['servers']['primary'][$type])) { - unset($this->_channelInfo['servers']['primary'][$type]); - } - - return true; - } - - /** - * Set a channel's protocols to the protocols supported by pearweb - */ - function setDefaultPEARProtocols($version = '1.0', $mirror = false) - { - switch ($version) { - case '1.0' : - $this->resetREST($mirror); - - if (!isset($this->_channelInfo['servers'])) { - $this->_channelInfo['servers'] = array('primary' => - array('rest' => array())); - } elseif (!isset($this->_channelInfo['servers']['primary'])) { - $this->_channelInfo['servers']['primary'] = array('rest' => array()); - } - - return true; - break; - default : - return false; - break; - } - } - - /** - * @return array - */ - function getMirrors() - { - if (isset($this->_channelInfo['servers']['mirror'])) { - $mirrors = $this->_channelInfo['servers']['mirror']; - if (!isset($mirrors[0])) { - $mirrors = array($mirrors); - } - - return $mirrors; - } - - return array(); - } - - /** - * Get the unserialized XML representing a mirror - * @return array|false - */ - function getMirror($server) - { - foreach ($this->getMirrors() as $mirror) { - if ($mirror['attribs']['host'] == $server) { - return $mirror; - } - } - - return false; - } - - /** - * @param string - * @return string|false - * @error PEAR_CHANNELFILE_ERROR_NO_NAME - * @error PEAR_CHANNELFILE_ERROR_INVALID_NAME - */ - function setName($name) - { - return $this->setServer($name); - } - - /** - * Set the socket number (port) that is used to connect to this channel - * @param integer - * @param string|false name of the mirror server, or false for the primary - */ - function setPort($port, $mirror = false) - { - if ($mirror) { - if (!isset($this->_channelInfo['servers']['mirror'])) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND, - array('mirror' => $mirror)); - return false; - } - - if (isset($this->_channelInfo['servers']['mirror'][0])) { - foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) { - if ($mirror == $mir['attribs']['host']) { - $this->_channelInfo['servers']['mirror'][$i]['attribs']['port'] = $port; - return true; - } - } - - return false; - } elseif ($this->_channelInfo['servers']['mirror']['attribs']['host'] == $mirror) { - $this->_channelInfo['servers']['mirror']['attribs']['port'] = $port; - $this->_isValid = false; - return true; - } - } - - $this->_channelInfo['servers']['primary']['attribs']['port'] = $port; - $this->_isValid = false; - return true; - } - - /** - * Set the socket number (port) that is used to connect to this channel - * @param bool Determines whether to turn on SSL support or turn it off - * @param string|false name of the mirror server, or false for the primary - */ - function setSSL($ssl = true, $mirror = false) - { - if ($mirror) { - if (!isset($this->_channelInfo['servers']['mirror'])) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND, - array('mirror' => $mirror)); - return false; - } - - if (isset($this->_channelInfo['servers']['mirror'][0])) { - foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) { - if ($mirror == $mir['attribs']['host']) { - if (!$ssl) { - if (isset($this->_channelInfo['servers']['mirror'][$i] - ['attribs']['ssl'])) { - unset($this->_channelInfo['servers']['mirror'][$i]['attribs']['ssl']); - } - } else { - $this->_channelInfo['servers']['mirror'][$i]['attribs']['ssl'] = 'yes'; - } - - return true; - } - } - - return false; - } elseif ($this->_channelInfo['servers']['mirror']['attribs']['host'] == $mirror) { - if (!$ssl) { - if (isset($this->_channelInfo['servers']['mirror']['attribs']['ssl'])) { - unset($this->_channelInfo['servers']['mirror']['attribs']['ssl']); - } - } else { - $this->_channelInfo['servers']['mirror']['attribs']['ssl'] = 'yes'; - } - - $this->_isValid = false; - return true; - } - } - - if ($ssl) { - $this->_channelInfo['servers']['primary']['attribs']['ssl'] = 'yes'; - } else { - if (isset($this->_channelInfo['servers']['primary']['attribs']['ssl'])) { - unset($this->_channelInfo['servers']['primary']['attribs']['ssl']); - } - } - - $this->_isValid = false; - return true; - } - - /** - * @param string - * @return string|false - * @error PEAR_CHANNELFILE_ERROR_NO_SERVER - * @error PEAR_CHANNELFILE_ERROR_INVALID_SERVER - */ - function setServer($server, $mirror = false) - { - if (empty($server)) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_SERVER); - return false; - } elseif (!$this->validChannelServer($server)) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME, - array('tag' => 'name', 'name' => $server)); - return false; - } - - if ($mirror) { - $found = false; - foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) { - if ($mirror == $mir['attribs']['host']) { - $found = true; - break; - } - } - - if (!$found) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND, - array('mirror' => $mirror)); - return false; - } - - $this->_channelInfo['mirror'][$i]['attribs']['host'] = $server; - return true; - } - - $this->_channelInfo['name'] = $server; - return true; - } - - /** - * @param string - * @return boolean success - * @error PEAR_CHANNELFILE_ERROR_NO_SUMMARY - * @warning PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY - */ - function setSummary($summary) - { - if (empty($summary)) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_NO_SUMMARY); - return false; - } elseif (strpos(trim($summary), "\n") !== false) { - $this->_validateWarning(PEAR_CHANNELFILE_ERROR_MULTILINE_SUMMARY, - array('summary' => $summary)); - } - - $this->_channelInfo['summary'] = $summary; - return true; - } - - /** - * @param string - * @param boolean determines whether the alias is in channel.xml or local - * @return boolean success - */ - function setAlias($alias, $local = false) - { - if (!$this->validChannelServer($alias)) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_INVALID_NAME, - array('tag' => 'suggestedalias', 'name' => $alias)); - return false; - } - - if ($local) { - $this->_channelInfo['localalias'] = $alias; - } else { - $this->_channelInfo['suggestedalias'] = $alias; - } - - return true; - } - - /** - * @return string - */ - function getAlias() - { - if (isset($this->_channelInfo['localalias'])) { - return $this->_channelInfo['localalias']; - } - if (isset($this->_channelInfo['suggestedalias'])) { - return $this->_channelInfo['suggestedalias']; - } - if (isset($this->_channelInfo['name'])) { - return $this->_channelInfo['name']; - } - return ''; - } - - /** - * Set the package validation object if it differs from PEAR's default - * The class must be includeable via changing _ in the classname to path separator, - * but no checking of this is made. - * @param string|false pass in false to reset to the default packagename regex - * @return boolean success - */ - function setValidationPackage($validateclass, $version) - { - if (empty($validateclass)) { - unset($this->_channelInfo['validatepackage']); - } - $this->_channelInfo['validatepackage'] = array('_content' => $validateclass); - $this->_channelInfo['validatepackage']['attribs'] = array('version' => $version); - } - - /** - * Add a protocol to the provides section - * @param string protocol type - * @param string protocol version - * @param string protocol name, if any - * @param string mirror name, if this is a mirror's protocol - * @return bool - */ - function addFunction($type, $version, $name = '', $mirror = false) - { - if ($mirror) { - return $this->addMirrorFunction($mirror, $type, $version, $name); - } - - $set = array('attribs' => array('version' => $version), '_content' => $name); - if (!isset($this->_channelInfo['servers']['primary'][$type]['function'])) { - if (!isset($this->_channelInfo['servers'])) { - $this->_channelInfo['servers'] = array('primary' => - array($type => array())); - } elseif (!isset($this->_channelInfo['servers']['primary'])) { - $this->_channelInfo['servers']['primary'] = array($type => array()); - } - - $this->_channelInfo['servers']['primary'][$type]['function'] = $set; - $this->_isValid = false; - return true; - } elseif (!isset($this->_channelInfo['servers']['primary'][$type]['function'][0])) { - $this->_channelInfo['servers']['primary'][$type]['function'] = array( - $this->_channelInfo['servers']['primary'][$type]['function']); - } - - $this->_channelInfo['servers']['primary'][$type]['function'][] = $set; - return true; - } - /** - * Add a protocol to a mirror's provides section - * @param string mirror name (server) - * @param string protocol type - * @param string protocol version - * @param string protocol name, if any - */ - function addMirrorFunction($mirror, $type, $version, $name = '') - { - if (!isset($this->_channelInfo['servers']['mirror'])) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND, - array('mirror' => $mirror)); - return false; - } - - $setmirror = false; - if (isset($this->_channelInfo['servers']['mirror'][0])) { - foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) { - if ($mirror == $mir['attribs']['host']) { - $setmirror = &$this->_channelInfo['servers']['mirror'][$i]; - break; - } - } - } else { - if ($this->_channelInfo['servers']['mirror']['attribs']['host'] == $mirror) { - $setmirror = &$this->_channelInfo['servers']['mirror']; - } - } - - if (!$setmirror) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND, - array('mirror' => $mirror)); - return false; - } - - $set = array('attribs' => array('version' => $version), '_content' => $name); - if (!isset($setmirror[$type]['function'])) { - $setmirror[$type]['function'] = $set; - $this->_isValid = false; - return true; - } elseif (!isset($setmirror[$type]['function'][0])) { - $setmirror[$type]['function'] = array($setmirror[$type]['function']); - } - - $setmirror[$type]['function'][] = $set; - $this->_isValid = false; - return true; - } - - /** - * @param string Resource Type this url links to - * @param string URL - * @param string|false mirror name, if this is not a primary server REST base URL - */ - function setBaseURL($resourceType, $url, $mirror = false) - { - if ($mirror) { - if (!isset($this->_channelInfo['servers']['mirror'])) { - $this->_validateError(PEAR_CHANNELFILE_ERROR_MIRROR_NOT_FOUND, - array('mirror' => $mirror)); - return false; - } - - $setmirror = false; - if (isset($this->_channelInfo['servers']['mirror'][0])) { - foreach ($this->_channelInfo['servers']['mirror'] as $i => $mir) { - if ($mirror == $mir['attribs']['host']) { - $setmirror = &$this->_channelInfo['servers']['mirror'][$i]; - break; - } - } - } else { - if ($this->_channelInfo['servers']['mirror']['attribs']['host'] == $mirror) { - $setmirror = &$this->_channelInfo['servers']['mirror']; - } - } - } else { - $setmirror = &$this->_channelInfo['servers']['primary']; - } - - $set = array('attribs' => array('type' => $resourceType), '_content' => $url); - if (!isset($setmirror['rest'])) { - $setmirror['rest'] = array(); - } - - if (!isset($setmirror['rest']['baseurl'])) { - $setmirror['rest']['baseurl'] = $set; - $this->_isValid = false; - return true; - } elseif (!isset($setmirror['rest']['baseurl'][0])) { - $setmirror['rest']['baseurl'] = array($setmirror['rest']['baseurl']); - } - - foreach ($setmirror['rest']['baseurl'] as $i => $url) { - if ($url['attribs']['type'] == $resourceType) { - $this->_isValid = false; - $setmirror['rest']['baseurl'][$i] = $set; - return true; - } - } - - $setmirror['rest']['baseurl'][] = $set; - $this->_isValid = false; - return true; - } - - /** - * @param string mirror server - * @param int mirror http port - * @return boolean - */ - function addMirror($server, $port = null) - { - if ($this->_channelInfo['name'] == '__uri') { - return false; // the __uri channel cannot have mirrors by definition - } - - $set = array('attribs' => array('host' => $server)); - if (is_numeric($port)) { - $set['attribs']['port'] = $port; - } - - if (!isset($this->_channelInfo['servers']['mirror'])) { - $this->_channelInfo['servers']['mirror'] = $set; - return true; - } - - if (!isset($this->_channelInfo['servers']['mirror'][0])) { - $this->_channelInfo['servers']['mirror'] = - array($this->_channelInfo['servers']['mirror']); - } - - $this->_channelInfo['servers']['mirror'][] = $set; - return true; - } - - /** - * Retrieve the name of the validation package for this channel - * @return string|false - */ - function getValidationPackage() - { - if (!$this->_isValid && !$this->validate()) { - return false; - } - - if (!isset($this->_channelInfo['validatepackage'])) { - return array('attribs' => array('version' => 'default'), - '_content' => 'PEAR_Validate'); - } - - return $this->_channelInfo['validatepackage']; - } - - /** - * Retrieve the object that can be used for custom validation - * @param string|false the name of the package to validate. If the package is - * the channel validation package, PEAR_Validate is returned - * @return PEAR_Validate|false false is returned if the validation package - * cannot be located - */ - function &getValidationObject($package = false) - { - if (!class_exists('PEAR_Validate')) { - require_once 'PEAR/Validate.php'; - } - - if (!$this->_isValid) { - if (!$this->validate()) { - $a = false; - return $a; - } - } - - if (isset($this->_channelInfo['validatepackage'])) { - if ($package == $this->_channelInfo['validatepackage']) { - // channel validation packages are always validated by PEAR_Validate - $val = &new PEAR_Validate; - return $val; - } - - if (!class_exists(str_replace('.', '_', - $this->_channelInfo['validatepackage']['_content']))) { - if ($this->isIncludeable(str_replace('_', '/', - $this->_channelInfo['validatepackage']['_content']) . '.php')) { - include_once str_replace('_', '/', - $this->_channelInfo['validatepackage']['_content']) . '.php'; - $vclass = str_replace('.', '_', - $this->_channelInfo['validatepackage']['_content']); - $val = &new $vclass; - } else { - $a = false; - return $a; - } - } else { - $vclass = str_replace('.', '_', - $this->_channelInfo['validatepackage']['_content']); - $val = &new $vclass; - } - } else { - $val = &new PEAR_Validate; - } - - return $val; - } - - function isIncludeable($path) - { - $possibilities = explode(PATH_SEPARATOR, ini_get('include_path')); - foreach ($possibilities as $dir) { - if (file_exists($dir . DIRECTORY_SEPARATOR . $path) - && is_readable($dir . DIRECTORY_SEPARATOR . $path)) { - return true; - } - } - - return false; - } - - /** - * This function is used by the channel updater and retrieves a value set by - * the registry, or the current time if it has not been set - * @return string - */ - function lastModified() - { - if (isset($this->_channelInfo['_lastmodified'])) { - return $this->_channelInfo['_lastmodified']; - } - - return time(); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/ChannelFile/Parser.php b/_piecrust/libs/PEAR/ChannelFile/Parser.php deleted file mode 100644 index e630ace..0000000 --- a/_piecrust/libs/PEAR/ChannelFile/Parser.php +++ /dev/null @@ -1,68 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Parser.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * base xml parser class - */ -require_once 'PEAR/XMLParser.php'; -require_once 'PEAR/ChannelFile.php'; -/** - * Parser for channel.xml - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_ChannelFile_Parser extends PEAR_XMLParser -{ - var $_config; - var $_logger; - var $_registry; - - function setConfig(&$c) - { - $this->_config = &$c; - $this->_registry = &$c->getRegistry(); - } - - function setLogger(&$l) - { - $this->_logger = &$l; - } - - function parse($data, $file) - { - if (PEAR::isError($err = parent::parse($data, $file))) { - return $err; - } - - $ret = new PEAR_ChannelFile; - $ret->setConfig($this->_config); - if (isset($this->_logger)) { - $ret->setLogger($this->_logger); - } - - $ret->fromArray($this->_unserializedData); - // make sure the filelist is in the easy to read format needed - $ret->flattenFilelist(); - $ret->setPackagefile($file, $archive); - return $ret; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command.php b/_piecrust/libs/PEAR/Command.php deleted file mode 100644 index db39b8f..0000000 --- a/_piecrust/libs/PEAR/Command.php +++ /dev/null @@ -1,414 +0,0 @@ - - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Command.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/** - * Needed for error handling - */ -require_once 'PEAR.php'; -require_once 'PEAR/Frontend.php'; -require_once 'PEAR/XMLParser.php'; - -/** - * List of commands and what classes they are implemented in. - * @var array command => implementing class - */ -$GLOBALS['_PEAR_Command_commandlist'] = array(); - -/** - * List of commands and their descriptions - * @var array command => description - */ -$GLOBALS['_PEAR_Command_commanddesc'] = array(); - -/** - * List of shortcuts to common commands. - * @var array shortcut => command - */ -$GLOBALS['_PEAR_Command_shortcuts'] = array(); - -/** - * Array of command objects - * @var array class => object - */ -$GLOBALS['_PEAR_Command_objects'] = array(); - -/** - * PEAR command class, a simple factory class for administrative - * commands. - * - * How to implement command classes: - * - * - The class must be called PEAR_Command_Nnn, installed in the - * "PEAR/Common" subdir, with a method called getCommands() that - * returns an array of the commands implemented by the class (see - * PEAR/Command/Install.php for an example). - * - * - The class must implement a run() function that is called with three - * params: - * - * (string) command name - * (array) assoc array with options, freely defined by each - * command, for example: - * array('force' => true) - * (array) list of the other parameters - * - * The run() function returns a PEAR_CommandResponse object. Use - * these methods to get information: - * - * int getStatus() Returns PEAR_COMMAND_(SUCCESS|FAILURE|PARTIAL) - * *_PARTIAL means that you need to issue at least - * one more command to complete the operation - * (used for example for validation steps). - * - * string getMessage() Returns a message for the user. Remember, - * no HTML or other interface-specific markup. - * - * If something unexpected happens, run() returns a PEAR error. - * - * - DON'T OUTPUT ANYTHING! Return text for output instead. - * - * - DON'T USE HTML! The text you return will be used from both Gtk, - * web and command-line interfaces, so for now, keep everything to - * plain text. - * - * - DON'T USE EXIT OR DIE! Always use pear errors. From static - * classes do PEAR::raiseError(), from other classes do - * $this->raiseError(). - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ -class PEAR_Command -{ - // {{{ factory() - - /** - * Get the right object for executing a command. - * - * @param string $command The name of the command - * @param object $config Instance of PEAR_Config object - * - * @return object the command object or a PEAR error - * - * @access public - * @static - */ - function &factory($command, &$config) - { - if (empty($GLOBALS['_PEAR_Command_commandlist'])) { - PEAR_Command::registerCommands(); - } - if (isset($GLOBALS['_PEAR_Command_shortcuts'][$command])) { - $command = $GLOBALS['_PEAR_Command_shortcuts'][$command]; - } - if (!isset($GLOBALS['_PEAR_Command_commandlist'][$command])) { - $a = PEAR::raiseError("unknown command `$command'"); - return $a; - } - $class = $GLOBALS['_PEAR_Command_commandlist'][$command]; - if (!class_exists($class)) { - require_once $GLOBALS['_PEAR_Command_objects'][$class]; - } - if (!class_exists($class)) { - $a = PEAR::raiseError("unknown command `$command'"); - return $a; - } - $ui =& PEAR_Command::getFrontendObject(); - $obj = &new $class($ui, $config); - return $obj; - } - - // }}} - // {{{ & getObject() - function &getObject($command) - { - $class = $GLOBALS['_PEAR_Command_commandlist'][$command]; - if (!class_exists($class)) { - require_once $GLOBALS['_PEAR_Command_objects'][$class]; - } - if (!class_exists($class)) { - return PEAR::raiseError("unknown command `$command'"); - } - $ui =& PEAR_Command::getFrontendObject(); - $config = &PEAR_Config::singleton(); - $obj = &new $class($ui, $config); - return $obj; - } - - // }}} - // {{{ & getFrontendObject() - - /** - * Get instance of frontend object. - * - * @return object|PEAR_Error - * @static - */ - function &getFrontendObject() - { - $a = &PEAR_Frontend::singleton(); - return $a; - } - - // }}} - // {{{ & setFrontendClass() - - /** - * Load current frontend class. - * - * @param string $uiclass Name of class implementing the frontend - * - * @return object the frontend object, or a PEAR error - * @static - */ - function &setFrontendClass($uiclass) - { - $a = &PEAR_Frontend::setFrontendClass($uiclass); - return $a; - } - - // }}} - // {{{ setFrontendType() - - /** - * Set current frontend. - * - * @param string $uitype Name of the frontend type (for example "CLI") - * - * @return object the frontend object, or a PEAR error - * @static - */ - function setFrontendType($uitype) - { - $uiclass = 'PEAR_Frontend_' . $uitype; - return PEAR_Command::setFrontendClass($uiclass); - } - - // }}} - // {{{ registerCommands() - - /** - * Scan through the Command directory looking for classes - * and see what commands they implement. - * - * @param bool (optional) if FALSE (default), the new list of - * commands should replace the current one. If TRUE, - * new entries will be merged with old. - * - * @param string (optional) where (what directory) to look for - * classes, defaults to the Command subdirectory of - * the directory from where this file (__FILE__) is - * included. - * - * @return bool TRUE on success, a PEAR error on failure - * - * @access public - * @static - */ - function registerCommands($merge = false, $dir = null) - { - $parser = new PEAR_XMLParser; - if ($dir === null) { - $dir = dirname(__FILE__) . '/Command'; - } - if (!is_dir($dir)) { - return PEAR::raiseError("registerCommands: opendir($dir) '$dir' does not exist or is not a directory"); - } - $dp = @opendir($dir); - if (empty($dp)) { - return PEAR::raiseError("registerCommands: opendir($dir) failed"); - } - if (!$merge) { - $GLOBALS['_PEAR_Command_commandlist'] = array(); - } - - while ($file = readdir($dp)) { - if ($file{0} == '.' || substr($file, -4) != '.xml') { - continue; - } - - $f = substr($file, 0, -4); - $class = "PEAR_Command_" . $f; - // List of commands - if (empty($GLOBALS['_PEAR_Command_objects'][$class])) { - $GLOBALS['_PEAR_Command_objects'][$class] = "$dir/" . $f . '.php'; - } - - $parser->parse(file_get_contents("$dir/$file")); - $implements = $parser->getData(); - foreach ($implements as $command => $desc) { - if ($command == 'attribs') { - continue; - } - - if (isset($GLOBALS['_PEAR_Command_commandlist'][$command])) { - return PEAR::raiseError('Command "' . $command . '" already registered in ' . - 'class "' . $GLOBALS['_PEAR_Command_commandlist'][$command] . '"'); - } - - $GLOBALS['_PEAR_Command_commandlist'][$command] = $class; - $GLOBALS['_PEAR_Command_commanddesc'][$command] = $desc['summary']; - if (isset($desc['shortcut'])) { - $shortcut = $desc['shortcut']; - if (isset($GLOBALS['_PEAR_Command_shortcuts'][$shortcut])) { - return PEAR::raiseError('Command shortcut "' . $shortcut . '" already ' . - 'registered to command "' . $command . '" in class "' . - $GLOBALS['_PEAR_Command_commandlist'][$command] . '"'); - } - $GLOBALS['_PEAR_Command_shortcuts'][$shortcut] = $command; - } - - if (isset($desc['options']) && $desc['options']) { - foreach ($desc['options'] as $oname => $option) { - if (isset($option['shortopt']) && strlen($option['shortopt']) > 1) { - return PEAR::raiseError('Option "' . $oname . '" short option "' . - $option['shortopt'] . '" must be ' . - 'only 1 character in Command "' . $command . '" in class "' . - $class . '"'); - } - } - } - } - } - - ksort($GLOBALS['_PEAR_Command_shortcuts']); - ksort($GLOBALS['_PEAR_Command_commandlist']); - @closedir($dp); - return true; - } - - // }}} - // {{{ getCommands() - - /** - * Get the list of currently supported commands, and what - * classes implement them. - * - * @return array command => implementing class - * - * @access public - * @static - */ - function getCommands() - { - if (empty($GLOBALS['_PEAR_Command_commandlist'])) { - PEAR_Command::registerCommands(); - } - return $GLOBALS['_PEAR_Command_commandlist']; - } - - // }}} - // {{{ getShortcuts() - - /** - * Get the list of command shortcuts. - * - * @return array shortcut => command - * - * @access public - * @static - */ - function getShortcuts() - { - if (empty($GLOBALS['_PEAR_Command_shortcuts'])) { - PEAR_Command::registerCommands(); - } - return $GLOBALS['_PEAR_Command_shortcuts']; - } - - // }}} - // {{{ getGetoptArgs() - - /** - * Compiles arguments for getopt. - * - * @param string $command command to get optstring for - * @param string $short_args (reference) short getopt format - * @param array $long_args (reference) long getopt format - * - * @return void - * - * @access public - * @static - */ - function getGetoptArgs($command, &$short_args, &$long_args) - { - if (empty($GLOBALS['_PEAR_Command_commandlist'])) { - PEAR_Command::registerCommands(); - } - if (isset($GLOBALS['_PEAR_Command_shortcuts'][$command])) { - $command = $GLOBALS['_PEAR_Command_shortcuts'][$command]; - } - if (!isset($GLOBALS['_PEAR_Command_commandlist'][$command])) { - return null; - } - $obj = &PEAR_Command::getObject($command); - return $obj->getGetoptArgs($command, $short_args, $long_args); - } - - // }}} - // {{{ getDescription() - - /** - * Get description for a command. - * - * @param string $command Name of the command - * - * @return string command description - * - * @access public - * @static - */ - function getDescription($command) - { - if (!isset($GLOBALS['_PEAR_Command_commanddesc'][$command])) { - return null; - } - return $GLOBALS['_PEAR_Command_commanddesc'][$command]; - } - - // }}} - // {{{ getHelp() - - /** - * Get help for command. - * - * @param string $command Name of the command to return help for - * - * @access public - * @static - */ - function getHelp($command) - { - $cmds = PEAR_Command::getCommands(); - if (isset($GLOBALS['_PEAR_Command_shortcuts'][$command])) { - $command = $GLOBALS['_PEAR_Command_shortcuts'][$command]; - } - if (isset($cmds[$command])) { - $obj = &PEAR_Command::getObject($command); - return $obj->getHelp($command); - } - return false; - } - // }}} -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Auth.php b/_piecrust/libs/PEAR/Command/Auth.php deleted file mode 100644 index 63cd152..0000000 --- a/_piecrust/libs/PEAR/Command/Auth.php +++ /dev/null @@ -1,81 +0,0 @@ - - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Auth.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - * @deprecated since 1.8.0alpha1 - */ - -/** - * base class - */ -require_once 'PEAR/Command/Channels.php'; - -/** - * PEAR commands for login/logout - * - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - * @deprecated since 1.8.0alpha1 - */ -class PEAR_Command_Auth extends PEAR_Command_Channels -{ - var $commands = array( - 'login' => array( - 'summary' => 'Connects and authenticates to remote server [Deprecated in favor of channel-login]', - 'shortcut' => 'li', - 'function' => 'doLogin', - 'options' => array(), - 'doc' => ' -WARNING: This function is deprecated in favor of using channel-login - -Log in to a remote channel server. If is not supplied, -the default channel is used. To use remote functions in the installer -that require any kind of privileges, you need to log in first. The -username and password you enter here will be stored in your per-user -PEAR configuration (~/.pearrc on Unix-like systems). After logging -in, your username and password will be sent along in subsequent -operations on the remote server.', - ), - 'logout' => array( - 'summary' => 'Logs out from the remote server [Deprecated in favor of channel-logout]', - 'shortcut' => 'lo', - 'function' => 'doLogout', - 'options' => array(), - 'doc' => ' -WARNING: This function is deprecated in favor of using channel-logout - -Logs out from the remote server. This command does not actually -connect to the remote server, it only deletes the stored username and -password from your user configuration.', - ) - - ); - - /** - * PEAR_Command_Auth constructor. - * - * @access public - */ - function PEAR_Command_Auth(&$ui, &$config) - { - parent::PEAR_Command_Channels($ui, $config); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Auth.xml b/_piecrust/libs/PEAR/Command/Auth.xml deleted file mode 100644 index 590193d..0000000 --- a/_piecrust/libs/PEAR/Command/Auth.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - Connects and authenticates to remote server [Deprecated in favor of channel-login] - doLogin - li - - <channel name> -WARNING: This function is deprecated in favor of using channel-login - -Log in to a remote channel server. If <channel name> is not supplied, -the default channel is used. To use remote functions in the installer -that require any kind of privileges, you need to log in first. The -username and password you enter here will be stored in your per-user -PEAR configuration (~/.pearrc on Unix-like systems). After logging -in, your username and password will be sent along in subsequent -operations on the remote server. - - - Logs out from the remote server [Deprecated in favor of channel-logout] - doLogout - lo - - -WARNING: This function is deprecated in favor of using channel-logout - -Logs out from the remote server. This command does not actually -connect to the remote server, it only deletes the stored username and -password from your user configuration. - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Build.php b/_piecrust/libs/PEAR/Command/Build.php deleted file mode 100644 index 1de7320..0000000 --- a/_piecrust/libs/PEAR/Command/Build.php +++ /dev/null @@ -1,85 +0,0 @@ - - * @author Tomas V.V.Cox - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Build.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/** - * base class - */ -require_once 'PEAR/Command/Common.php'; - -/** - * PEAR commands for building extensions. - * - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Tomas V.V.Cox - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ -class PEAR_Command_Build extends PEAR_Command_Common -{ - var $commands = array( - 'build' => array( - 'summary' => 'Build an Extension From C Source', - 'function' => 'doBuild', - 'shortcut' => 'b', - 'options' => array(), - 'doc' => '[package.xml] -Builds one or more extensions contained in a package.' - ), - ); - - /** - * PEAR_Command_Build constructor. - * - * @access public - */ - function PEAR_Command_Build(&$ui, &$config) - { - parent::PEAR_Command_Common($ui, $config); - } - - function doBuild($command, $options, $params) - { - require_once 'PEAR/Builder.php'; - if (sizeof($params) < 1) { - $params[0] = 'package.xml'; - } - - $builder = &new PEAR_Builder($this->ui); - $this->debug = $this->config->get('verbose'); - $err = $builder->build($params[0], array(&$this, 'buildCallback')); - if (PEAR::isError($err)) { - return $err; - } - - return true; - } - - function buildCallback($what, $data) - { - if (($what == 'cmdoutput' && $this->debug > 1) || - ($what == 'output' && $this->debug > 0)) { - $this->ui->outputData(rtrim($data), 'build'); - } - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Build.xml b/_piecrust/libs/PEAR/Command/Build.xml deleted file mode 100644 index ec4e6f5..0000000 --- a/_piecrust/libs/PEAR/Command/Build.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - Build an Extension From C Source - doBuild - b - - [package.xml] -Builds one or more extensions contained in a package. - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Channels.php b/_piecrust/libs/PEAR/Command/Channels.php deleted file mode 100644 index fcf01b5..0000000 --- a/_piecrust/libs/PEAR/Command/Channels.php +++ /dev/null @@ -1,883 +0,0 @@ - - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Channels.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * base class - */ -require_once 'PEAR/Command/Common.php'; - -define('PEAR_COMMAND_CHANNELS_CHANNEL_EXISTS', -500); - -/** - * PEAR commands for managing channels. - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Command_Channels extends PEAR_Command_Common -{ - var $commands = array( - 'list-channels' => array( - 'summary' => 'List Available Channels', - 'function' => 'doList', - 'shortcut' => 'lc', - 'options' => array(), - 'doc' => ' -List all available channels for installation. -', - ), - 'update-channels' => array( - 'summary' => 'Update the Channel List', - 'function' => 'doUpdateAll', - 'shortcut' => 'uc', - 'options' => array(), - 'doc' => ' -List all installed packages in all channels. -' - ), - 'channel-delete' => array( - 'summary' => 'Remove a Channel From the List', - 'function' => 'doDelete', - 'shortcut' => 'cde', - 'options' => array(), - 'doc' => ' -Delete a channel from the registry. You may not -remove any channel that has installed packages. -' - ), - 'channel-add' => array( - 'summary' => 'Add a Channel', - 'function' => 'doAdd', - 'shortcut' => 'ca', - 'options' => array(), - 'doc' => ' -Add a private channel to the channel list. Note that all -public channels should be synced using "update-channels". -Parameter may be either a local file or remote URL to a -channel.xml. -' - ), - 'channel-update' => array( - 'summary' => 'Update an Existing Channel', - 'function' => 'doUpdate', - 'shortcut' => 'cu', - 'options' => array( - 'force' => array( - 'shortopt' => 'f', - 'doc' => 'will force download of new channel.xml if an existing channel name is used', - ), - 'channel' => array( - 'shortopt' => 'c', - 'arg' => 'CHANNEL', - 'doc' => 'will force download of new channel.xml if an existing channel name is used', - ), -), - 'doc' => '[|] -Update a channel in the channel list directly. Note that all -public channels can be synced using "update-channels". -Parameter may be a local or remote channel.xml, or the name of -an existing channel. -' - ), - 'channel-info' => array( - 'summary' => 'Retrieve Information on a Channel', - 'function' => 'doInfo', - 'shortcut' => 'ci', - 'options' => array(), - 'doc' => ' -List the files in an installed package. -' - ), - 'channel-alias' => array( - 'summary' => 'Specify an alias to a channel name', - 'function' => 'doAlias', - 'shortcut' => 'cha', - 'options' => array(), - 'doc' => ' -Specify a specific alias to use for a channel name. -The alias may not be an existing channel name or -alias. -' - ), - 'channel-discover' => array( - 'summary' => 'Initialize a Channel from its server', - 'function' => 'doDiscover', - 'shortcut' => 'di', - 'options' => array(), - 'doc' => '[|] -Initialize a channel from its server and create a local channel.xml. -If is in the format ":@" then - and will be set as the login username/password for -. Use caution when passing the username/password in this way, as -it may allow other users on your computer to briefly view your username/ -password via the system\'s process list. -' - ), - 'channel-login' => array( - 'summary' => 'Connects and authenticates to remote channel server', - 'shortcut' => 'cli', - 'function' => 'doLogin', - 'options' => array(), - 'doc' => ' -Log in to a remote channel server. If is not supplied, -the default channel is used. To use remote functions in the installer -that require any kind of privileges, you need to log in first. The -username and password you enter here will be stored in your per-user -PEAR configuration (~/.pearrc on Unix-like systems). After logging -in, your username and password will be sent along in subsequent -operations on the remote server.', - ), - 'channel-logout' => array( - 'summary' => 'Logs out from the remote channel server', - 'shortcut' => 'clo', - 'function' => 'doLogout', - 'options' => array(), - 'doc' => ' -Logs out from a remote channel server. If is not supplied, -the default channel is used. This command does not actually connect to the -remote server, it only deletes the stored username and password from your user -configuration.', - ), - ); - - /** - * PEAR_Command_Registry constructor. - * - * @access public - */ - function PEAR_Command_Channels(&$ui, &$config) - { - parent::PEAR_Command_Common($ui, $config); - } - - function _sortChannels($a, $b) - { - return strnatcasecmp($a->getName(), $b->getName()); - } - - function doList($command, $options, $params) - { - $reg = &$this->config->getRegistry(); - $registered = $reg->getChannels(); - usort($registered, array(&$this, '_sortchannels')); - $i = $j = 0; - $data = array( - 'caption' => 'Registered Channels:', - 'border' => true, - 'headline' => array('Channel', 'Alias', 'Summary') - ); - foreach ($registered as $channel) { - $data['data'][] = array($channel->getName(), - $channel->getAlias(), - $channel->getSummary()); - } - - if (count($registered) === 0) { - $data = '(no registered channels)'; - } - $this->ui->outputData($data, $command); - return true; - } - - function doUpdateAll($command, $options, $params) - { - $reg = &$this->config->getRegistry(); - $channels = $reg->getChannels(); - - $success = true; - foreach ($channels as $channel) { - if ($channel->getName() != '__uri') { - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $err = $this->doUpdate('channel-update', - $options, - array($channel->getName())); - if (PEAR::isError($err)) { - $this->ui->outputData($err->getMessage(), $command); - $success = false; - } else { - $success &= $err; - } - } - } - return $success; - } - - function doInfo($command, $options, $params) - { - if (count($params) !== 1) { - return $this->raiseError("No channel specified"); - } - - $reg = &$this->config->getRegistry(); - $channel = strtolower($params[0]); - if ($reg->channelExists($channel)) { - $chan = $reg->getChannel($channel); - if (PEAR::isError($chan)) { - return $this->raiseError($chan); - } - } else { - if (strpos($channel, '://')) { - $downloader = &$this->getDownloader(); - $tmpdir = $this->config->get('temp_dir'); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $loc = $downloader->downloadHttp($channel, $this->ui, $tmpdir); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($loc)) { - return $this->raiseError('Cannot open "' . $channel . - '" (' . $loc->getMessage() . ')'); - } else { - $contents = implode('', file($loc)); - } - } else { - if (!file_exists($params[0])) { - return $this->raiseError('Unknown channel "' . $channel . '"'); - } - - $fp = fopen($params[0], 'r'); - if (!$fp) { - return $this->raiseError('Cannot open "' . $params[0] . '"'); - } - - $contents = ''; - while (!feof($fp)) { - $contents .= fread($fp, 1024); - } - fclose($fp); - } - - if (!class_exists('PEAR_ChannelFile')) { - require_once 'PEAR/ChannelFile.php'; - } - - $chan = new PEAR_ChannelFile; - $chan->fromXmlString($contents); - $chan->validate(); - if ($errs = $chan->getErrors(true)) { - foreach ($errs as $err) { - $this->ui->outputData($err['level'] . ': ' . $err['message']); - } - return $this->raiseError('Channel file "' . $params[0] . '" is not valid'); - } - } - - if (!$chan) { - return $this->raiseError('Serious error: Channel "' . $params[0] . - '" has a corrupted registry entry'); - } - - $channel = $chan->getName(); - $caption = 'Channel ' . $channel . ' Information:'; - $data1 = array( - 'caption' => $caption, - 'border' => true); - $data1['data']['server'] = array('Name and Server', $chan->getName()); - if ($chan->getAlias() != $chan->getName()) { - $data1['data']['alias'] = array('Alias', $chan->getAlias()); - } - - $data1['data']['summary'] = array('Summary', $chan->getSummary()); - $validate = $chan->getValidationPackage(); - $data1['data']['vpackage'] = array('Validation Package Name', $validate['_content']); - $data1['data']['vpackageversion'] = - array('Validation Package Version', $validate['attribs']['version']); - $d = array(); - $d['main'] = $data1; - - $data['data'] = array(); - $data['caption'] = 'Server Capabilities'; - $data['headline'] = array('Type', 'Version/REST type', 'Function Name/REST base'); - if ($chan->supportsREST()) { - if ($chan->supportsREST()) { - $funcs = $chan->getFunctions('rest'); - if (!isset($funcs[0])) { - $funcs = array($funcs); - } - foreach ($funcs as $protocol) { - $data['data'][] = array('rest', $protocol['attribs']['type'], - $protocol['_content']); - } - } - } else { - $data['data'][] = array('No supported protocols'); - } - - $d['protocols'] = $data; - $data['data'] = array(); - $mirrors = $chan->getMirrors(); - if ($mirrors) { - $data['caption'] = 'Channel ' . $channel . ' Mirrors:'; - unset($data['headline']); - foreach ($mirrors as $mirror) { - $data['data'][] = array($mirror['attribs']['host']); - $d['mirrors'] = $data; - } - - foreach ($mirrors as $i => $mirror) { - $data['data'] = array(); - $data['caption'] = 'Mirror ' . $mirror['attribs']['host'] . ' Capabilities'; - $data['headline'] = array('Type', 'Version/REST type', 'Function Name/REST base'); - if ($chan->supportsREST($mirror['attribs']['host'])) { - if ($chan->supportsREST($mirror['attribs']['host'])) { - $funcs = $chan->getFunctions('rest', $mirror['attribs']['host']); - if (!isset($funcs[0])) { - $funcs = array($funcs); - } - - foreach ($funcs as $protocol) { - $data['data'][] = array('rest', $protocol['attribs']['type'], - $protocol['_content']); - } - } - } else { - $data['data'][] = array('No supported protocols'); - } - $d['mirrorprotocols' . $i] = $data; - } - } - $this->ui->outputData($d, 'channel-info'); - } - - // }}} - - function doDelete($command, $options, $params) - { - if (count($params) !== 1) { - return $this->raiseError('channel-delete: no channel specified'); - } - - $reg = &$this->config->getRegistry(); - if (!$reg->channelExists($params[0])) { - return $this->raiseError('channel-delete: channel "' . $params[0] . '" does not exist'); - } - - $channel = $reg->channelName($params[0]); - if ($channel == 'pear.php.net') { - return $this->raiseError('Cannot delete the pear.php.net channel'); - } - - if ($channel == 'pecl.php.net') { - return $this->raiseError('Cannot delete the pecl.php.net channel'); - } - - if ($channel == 'doc.php.net') { - return $this->raiseError('Cannot delete the doc.php.net channel'); - } - - if ($channel == '__uri') { - return $this->raiseError('Cannot delete the __uri pseudo-channel'); - } - - if (PEAR::isError($err = $reg->listPackages($channel))) { - return $err; - } - - if (count($err)) { - return $this->raiseError('Channel "' . $channel . - '" has installed packages, cannot delete'); - } - - if (!$reg->deleteChannel($channel)) { - return $this->raiseError('Channel "' . $channel . '" deletion failed'); - } else { - $this->config->deleteChannel($channel); - $this->ui->outputData('Channel "' . $channel . '" deleted', $command); - } - } - - function doAdd($command, $options, $params) - { - if (count($params) !== 1) { - return $this->raiseError('channel-add: no channel file specified'); - } - - if (strpos($params[0], '://')) { - $downloader = &$this->getDownloader(); - $tmpdir = $this->config->get('temp_dir'); - if (!file_exists($tmpdir)) { - require_once 'System.php'; - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $err = System::mkdir(array('-p', $tmpdir)); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($err)) { - return $this->raiseError('channel-add: temp_dir does not exist: "' . - $tmpdir . - '" - You can change this location with "pear config-set temp_dir"'); - } - } - - if (!is_writable($tmpdir)) { - return $this->raiseError('channel-add: temp_dir is not writable: "' . - $tmpdir . - '" - You can change this location with "pear config-set temp_dir"'); - } - - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $loc = $downloader->downloadHttp($params[0], $this->ui, $tmpdir, null, false); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($loc)) { - return $this->raiseError('channel-add: Cannot open "' . $params[0] . - '" (' . $loc->getMessage() . ')'); - } - - list($loc, $lastmodified) = $loc; - $contents = implode('', file($loc)); - } else { - $lastmodified = $fp = false; - if (file_exists($params[0])) { - $fp = fopen($params[0], 'r'); - } - - if (!$fp) { - return $this->raiseError('channel-add: cannot open "' . $params[0] . '"'); - } - - $contents = ''; - while (!feof($fp)) { - $contents .= fread($fp, 1024); - } - fclose($fp); - } - - if (!class_exists('PEAR_ChannelFile')) { - require_once 'PEAR/ChannelFile.php'; - } - - $channel = new PEAR_ChannelFile; - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $result = $channel->fromXmlString($contents); - PEAR::staticPopErrorHandling(); - if (!$result) { - $exit = false; - if (count($errors = $channel->getErrors(true))) { - foreach ($errors as $error) { - $this->ui->outputData(ucfirst($error['level'] . ': ' . $error['message'])); - if (!$exit) { - $exit = $error['level'] == 'error' ? true : false; - } - } - if ($exit) { - return $this->raiseError('channel-add: invalid channel.xml file'); - } - } - } - - $reg = &$this->config->getRegistry(); - if ($reg->channelExists($channel->getName())) { - return $this->raiseError('channel-add: Channel "' . $channel->getName() . - '" exists, use channel-update to update entry', PEAR_COMMAND_CHANNELS_CHANNEL_EXISTS); - } - - $ret = $reg->addChannel($channel, $lastmodified); - if (PEAR::isError($ret)) { - return $ret; - } - - if (!$ret) { - return $this->raiseError('channel-add: adding Channel "' . $channel->getName() . - '" to registry failed'); - } - - $this->config->setChannels($reg->listChannels()); - $this->config->writeConfigFile(); - $this->ui->outputData('Adding Channel "' . $channel->getName() . '" succeeded', $command); - } - - function doUpdate($command, $options, $params) - { - if (count($params) !== 1) { - return $this->raiseError("No channel file specified"); - } - - $tmpdir = $this->config->get('temp_dir'); - if (!file_exists($tmpdir)) { - require_once 'System.php'; - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $err = System::mkdir(array('-p', $tmpdir)); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($err)) { - return $this->raiseError('channel-add: temp_dir does not exist: "' . - $tmpdir . - '" - You can change this location with "pear config-set temp_dir"'); - } - } - - if (!is_writable($tmpdir)) { - return $this->raiseError('channel-add: temp_dir is not writable: "' . - $tmpdir . - '" - You can change this location with "pear config-set temp_dir"'); - } - - $reg = &$this->config->getRegistry(); - $lastmodified = false; - if ((!file_exists($params[0]) || is_dir($params[0])) - && $reg->channelExists(strtolower($params[0]))) { - $c = $reg->getChannel(strtolower($params[0])); - if (PEAR::isError($c)) { - return $this->raiseError($c); - } - - $this->ui->outputData("Updating channel \"$params[0]\"", $command); - $dl = &$this->getDownloader(array()); - // if force is specified, use a timestamp of "1" to force retrieval - $lastmodified = isset($options['force']) ? false : $c->lastModified(); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $contents = $dl->downloadHttp('http://' . $c->getName() . '/channel.xml', - $this->ui, $tmpdir, null, $lastmodified); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($contents)) { - // Attempt to fall back to https - $this->ui->outputData("Channel \"$params[0]\" is not responding over http://, failed with message: " . $contents->getMessage()); - $this->ui->outputData("Trying channel \"$params[0]\" over https:// instead"); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $contents = $dl->downloadHttp('https://' . $c->getName() . '/channel.xml', - $this->ui, $tmpdir, null, $lastmodified); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($contents)) { - return $this->raiseError('Cannot retrieve channel.xml for channel "' . - $c->getName() . '" (' . $contents->getMessage() . ')'); - } - } - - list($contents, $lastmodified) = $contents; - if (!$contents) { - $this->ui->outputData("Channel \"$params[0]\" is up to date"); - return; - } - - $contents = implode('', file($contents)); - if (!class_exists('PEAR_ChannelFile')) { - require_once 'PEAR/ChannelFile.php'; - } - - $channel = new PEAR_ChannelFile; - $channel->fromXmlString($contents); - if (!$channel->getErrors()) { - // security check: is the downloaded file for the channel we got it from? - if (strtolower($channel->getName()) != strtolower($c->getName())) { - if (!isset($options['force'])) { - return $this->raiseError('ERROR: downloaded channel definition file' . - ' for channel "' . $channel->getName() . '" from channel "' . - strtolower($c->getName()) . '"'); - } - - $this->ui->log(0, 'WARNING: downloaded channel definition file' . - ' for channel "' . $channel->getName() . '" from channel "' . - strtolower($c->getName()) . '"'); - } - } - } else { - if (strpos($params[0], '://')) { - $dl = &$this->getDownloader(); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $loc = $dl->downloadHttp($params[0], - $this->ui, $tmpdir, null, $lastmodified); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($loc)) { - return $this->raiseError("Cannot open " . $params[0] . - ' (' . $loc->getMessage() . ')'); - } - - list($loc, $lastmodified) = $loc; - $contents = implode('', file($loc)); - } else { - $fp = false; - if (file_exists($params[0])) { - $fp = fopen($params[0], 'r'); - } - - if (!$fp) { - return $this->raiseError("Cannot open " . $params[0]); - } - - $contents = ''; - while (!feof($fp)) { - $contents .= fread($fp, 1024); - } - fclose($fp); - } - - if (!class_exists('PEAR_ChannelFile')) { - require_once 'PEAR/ChannelFile.php'; - } - - $channel = new PEAR_ChannelFile; - $channel->fromXmlString($contents); - } - - $exit = false; - if (count($errors = $channel->getErrors(true))) { - foreach ($errors as $error) { - $this->ui->outputData(ucfirst($error['level'] . ': ' . $error['message'])); - if (!$exit) { - $exit = $error['level'] == 'error' ? true : false; - } - } - if ($exit) { - return $this->raiseError('Invalid channel.xml file'); - } - } - - if (!$reg->channelExists($channel->getName())) { - return $this->raiseError('Error: Channel "' . $channel->getName() . - '" does not exist, use channel-add to add an entry'); - } - - $ret = $reg->updateChannel($channel, $lastmodified); - if (PEAR::isError($ret)) { - return $ret; - } - - if (!$ret) { - return $this->raiseError('Updating Channel "' . $channel->getName() . - '" in registry failed'); - } - - $this->config->setChannels($reg->listChannels()); - $this->config->writeConfigFile(); - $this->ui->outputData('Update of Channel "' . $channel->getName() . '" succeeded'); - } - - function &getDownloader() - { - if (!class_exists('PEAR_Downloader')) { - require_once 'PEAR/Downloader.php'; - } - $a = new PEAR_Downloader($this->ui, array(), $this->config); - return $a; - } - - function doAlias($command, $options, $params) - { - if (count($params) === 1) { - return $this->raiseError('No channel alias specified'); - } - - if (count($params) !== 2 || (!empty($params[1]) && $params[1]{0} == '-')) { - return $this->raiseError( - 'Invalid format, correct is: channel-alias channel alias'); - } - - $reg = &$this->config->getRegistry(); - if (!$reg->channelExists($params[0], true)) { - $extra = ''; - if ($reg->isAlias($params[0])) { - $extra = ' (use "channel-alias ' . $reg->channelName($params[0]) . ' ' . - strtolower($params[1]) . '")'; - } - - return $this->raiseError('"' . $params[0] . '" is not a valid channel' . $extra); - } - - if ($reg->isAlias($params[1])) { - return $this->raiseError('Channel "' . $reg->channelName($params[1]) . '" is ' . - 'already aliased to "' . strtolower($params[1]) . '", cannot re-alias'); - } - - $chan = &$reg->getChannel($params[0]); - if (PEAR::isError($chan)) { - return $this->raiseError('Corrupt registry? Error retrieving channel "' . $params[0] . - '" information (' . $chan->getMessage() . ')'); - } - - // make it a local alias - if (!$chan->setAlias(strtolower($params[1]), true)) { - return $this->raiseError('Alias "' . strtolower($params[1]) . - '" is not a valid channel alias'); - } - - $reg->updateChannel($chan); - $this->ui->outputData('Channel "' . $chan->getName() . '" aliased successfully to "' . - strtolower($params[1]) . '"'); - } - - /** - * The channel-discover command - * - * @param string $command command name - * @param array $options option_name => value - * @param array $params list of additional parameters. - * $params[0] should contain a string with either: - * - or - * - :@ - * @return null|PEAR_Error - */ - function doDiscover($command, $options, $params) - { - if (count($params) !== 1) { - return $this->raiseError("No channel server specified"); - } - - // Look for the possible input format ":@" - if (preg_match('/^(.+):(.+)@(.+)\\z/', $params[0], $matches)) { - $username = $matches[1]; - $password = $matches[2]; - $channel = $matches[3]; - } else { - $channel = $params[0]; - } - - $reg = &$this->config->getRegistry(); - if ($reg->channelExists($channel)) { - if (!$reg->isAlias($channel)) { - return $this->raiseError("Channel \"$channel\" is already initialized", PEAR_COMMAND_CHANNELS_CHANNEL_EXISTS); - } - - return $this->raiseError("A channel alias named \"$channel\" " . - 'already exists, aliasing channel "' . $reg->channelName($channel) - . '"'); - } - - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $err = $this->doAdd($command, $options, array('http://' . $channel . '/channel.xml')); - $this->popErrorHandling(); - if (PEAR::isError($err)) { - if ($err->getCode() === PEAR_COMMAND_CHANNELS_CHANNEL_EXISTS) { - return $this->raiseError("Discovery of channel \"$channel\" failed (" . - $err->getMessage() . ')'); - } - // Attempt fetch via https - $this->ui->outputData("Discovering channel $channel over http:// failed with message: " . $err->getMessage()); - $this->ui->outputData("Trying to discover channel $channel over https:// instead"); - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $err = $this->doAdd($command, $options, array('https://' . $channel . '/channel.xml')); - $this->popErrorHandling(); - if (PEAR::isError($err)) { - return $this->raiseError("Discovery of channel \"$channel\" failed (" . - $err->getMessage() . ')'); - } - } - - // Store username/password if they were given - // Arguably we should do a logintest on the channel here, but since - // that's awkward on a REST-based channel (even "pear login" doesn't - // do it for those), and XML-RPC is deprecated, it's fairly pointless. - if (isset($username)) { - $this->config->set('username', $username, 'user', $channel); - $this->config->set('password', $password, 'user', $channel); - $this->config->store(); - $this->ui->outputData("Stored login for channel \"$channel\" using username \"$username\"", $command); - } - - $this->ui->outputData("Discovery of channel \"$channel\" succeeded", $command); - } - - /** - * Execute the 'login' command. - * - * @param string $command command name - * @param array $options option_name => value - * @param array $params list of additional parameters - * - * @return bool TRUE on success or - * a PEAR error on failure - * - * @access public - */ - function doLogin($command, $options, $params) - { - $reg = &$this->config->getRegistry(); - - // If a parameter is supplied, use that as the channel to log in to - $channel = isset($params[0]) ? $params[0] : $this->config->get('default_channel'); - - $chan = $reg->getChannel($channel); - if (PEAR::isError($chan)) { - return $this->raiseError($chan); - } - - $server = $this->config->get('preferred_mirror', null, $channel); - $username = $this->config->get('username', null, $channel); - if (empty($username)) { - $username = isset($_ENV['USER']) ? $_ENV['USER'] : null; - } - $this->ui->outputData("Logging in to $server.", $command); - - list($username, $password) = $this->ui->userDialog( - $command, - array('Username', 'Password'), - array('text', 'password'), - array($username, '') - ); - $username = trim($username); - $password = trim($password); - - $ourfile = $this->config->getConfFile('user'); - if (!$ourfile) { - $ourfile = $this->config->getConfFile('system'); - } - - $this->config->set('username', $username, 'user', $channel); - $this->config->set('password', $password, 'user', $channel); - - if ($chan->supportsREST()) { - $ok = true; - } - - if ($ok !== true) { - return $this->raiseError('Login failed!'); - } - - $this->ui->outputData("Logged in.", $command); - // avoid changing any temporary settings changed with -d - $ourconfig = new PEAR_Config($ourfile, $ourfile); - $ourconfig->set('username', $username, 'user', $channel); - $ourconfig->set('password', $password, 'user', $channel); - $ourconfig->store(); - - return true; - } - - /** - * Execute the 'logout' command. - * - * @param string $command command name - * @param array $options option_name => value - * @param array $params list of additional parameters - * - * @return bool TRUE on success or - * a PEAR error on failure - * - * @access public - */ - function doLogout($command, $options, $params) - { - $reg = &$this->config->getRegistry(); - - // If a parameter is supplied, use that as the channel to log in to - $channel = isset($params[0]) ? $params[0] : $this->config->get('default_channel'); - - $chan = $reg->getChannel($channel); - if (PEAR::isError($chan)) { - return $this->raiseError($chan); - } - - $server = $this->config->get('preferred_mirror', null, $channel); - $this->ui->outputData("Logging out from $server.", $command); - $this->config->remove('username', 'user', $channel); - $this->config->remove('password', 'user', $channel); - $this->config->store(); - return true; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Channels.xml b/_piecrust/libs/PEAR/Command/Channels.xml deleted file mode 100644 index 47b7206..0000000 --- a/_piecrust/libs/PEAR/Command/Channels.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - List Available Channels - doList - lc - - -List all available channels for installation. - - - - Update the Channel List - doUpdateAll - uc - - -List all installed packages in all channels. - - - - Remove a Channel From the List - doDelete - cde - - <channel name> -Delete a channel from the registry. You may not -remove any channel that has installed packages. - - - - Add a Channel - doAdd - ca - - <channel.xml> -Add a private channel to the channel list. Note that all -public channels should be synced using "update-channels". -Parameter may be either a local file or remote URL to a -channel.xml. - - - - Update an Existing Channel - doUpdate - cu - - - f - will force download of new channel.xml if an existing channel name is used - - - c - will force download of new channel.xml if an existing channel name is used - CHANNEL - - - [<channel.xml>|<channel name>] -Update a channel in the channel list directly. Note that all -public channels can be synced using "update-channels". -Parameter may be a local or remote channel.xml, or the name of -an existing channel. - - - - Retrieve Information on a Channel - doInfo - ci - - <package> -List the files in an installed package. - - - - Specify an alias to a channel name - doAlias - cha - - <channel> <alias> -Specify a specific alias to use for a channel name. -The alias may not be an existing channel name or -alias. - - - - Initialize a Channel from its server - doDiscover - di - - [<channel.xml>|<channel name>] -Initialize a channel from its server and create a local channel.xml. -If <channel name> is in the format "<username>:<password>@<channel>" then -<username> and <password> will be set as the login username/password for -<channel>. Use caution when passing the username/password in this way, as -it may allow other users on your computer to briefly view your username/ -password via the system's process list. - - - - Connects and authenticates to remote channel server - doLogin - cli - - <channel name> -Log in to a remote channel server. If <channel name> is not supplied, -the default channel is used. To use remote functions in the installer -that require any kind of privileges, you need to log in first. The -username and password you enter here will be stored in your per-user -PEAR configuration (~/.pearrc on Unix-like systems). After logging -in, your username and password will be sent along in subsequent -operations on the remote server. - - - Logs out from the remote channel server - doLogout - clo - - <channel name> -Logs out from a remote channel server. If <channel name> is not supplied, -the default channel is used. This command does not actually connect to the -remote server, it only deletes the stored username and password from your user -configuration. - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Common.php b/_piecrust/libs/PEAR/Command/Common.php deleted file mode 100644 index 279a716..0000000 --- a/_piecrust/libs/PEAR/Command/Common.php +++ /dev/null @@ -1,273 +0,0 @@ - - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Common.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/** - * base class - */ -require_once 'PEAR.php'; - -/** - * PEAR commands base class - * - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ -class PEAR_Command_Common extends PEAR -{ - /** - * PEAR_Config object used to pass user system and configuration - * on when executing commands - * - * @var PEAR_Config - */ - var $config; - /** - * @var PEAR_Registry - * @access protected - */ - var $_registry; - - /** - * User Interface object, for all interaction with the user. - * @var object - */ - var $ui; - - var $_deps_rel_trans = array( - 'lt' => '<', - 'le' => '<=', - 'eq' => '=', - 'ne' => '!=', - 'gt' => '>', - 'ge' => '>=', - 'has' => '==' - ); - - var $_deps_type_trans = array( - 'pkg' => 'package', - 'ext' => 'extension', - 'php' => 'PHP', - 'prog' => 'external program', - 'ldlib' => 'external library for linking', - 'rtlib' => 'external runtime library', - 'os' => 'operating system', - 'websrv' => 'web server', - 'sapi' => 'SAPI backend' - ); - - /** - * PEAR_Command_Common constructor. - * - * @access public - */ - function PEAR_Command_Common(&$ui, &$config) - { - parent::PEAR(); - $this->config = &$config; - $this->ui = &$ui; - } - - /** - * Return a list of all the commands defined by this class. - * @return array list of commands - * @access public - */ - function getCommands() - { - $ret = array(); - foreach (array_keys($this->commands) as $command) { - $ret[$command] = $this->commands[$command]['summary']; - } - - return $ret; - } - - /** - * Return a list of all the command shortcuts defined by this class. - * @return array shortcut => command - * @access public - */ - function getShortcuts() - { - $ret = array(); - foreach (array_keys($this->commands) as $command) { - if (isset($this->commands[$command]['shortcut'])) { - $ret[$this->commands[$command]['shortcut']] = $command; - } - } - - return $ret; - } - - function getOptions($command) - { - $shortcuts = $this->getShortcuts(); - if (isset($shortcuts[$command])) { - $command = $shortcuts[$command]; - } - - if (isset($this->commands[$command]) && - isset($this->commands[$command]['options'])) { - return $this->commands[$command]['options']; - } - - return null; - } - - function getGetoptArgs($command, &$short_args, &$long_args) - { - $short_args = ''; - $long_args = array(); - if (empty($this->commands[$command]) || empty($this->commands[$command]['options'])) { - return; - } - - reset($this->commands[$command]['options']); - while (list($option, $info) = each($this->commands[$command]['options'])) { - $larg = $sarg = ''; - if (isset($info['arg'])) { - if ($info['arg']{0} == '(') { - $larg = '=='; - $sarg = '::'; - $arg = substr($info['arg'], 1, -1); - } else { - $larg = '='; - $sarg = ':'; - $arg = $info['arg']; - } - } - - if (isset($info['shortopt'])) { - $short_args .= $info['shortopt'] . $sarg; - } - - $long_args[] = $option . $larg; - } - } - - /** - * Returns the help message for the given command - * - * @param string $command The command - * @return mixed A fail string if the command does not have help or - * a two elements array containing [0]=>help string, - * [1]=> help string for the accepted cmd args - */ - function getHelp($command) - { - $config = &PEAR_Config::singleton(); - if (!isset($this->commands[$command])) { - return "No such command \"$command\""; - } - - $help = null; - if (isset($this->commands[$command]['doc'])) { - $help = $this->commands[$command]['doc']; - } - - if (empty($help)) { - // XXX (cox) Fallback to summary if there is no doc (show both?) - if (!isset($this->commands[$command]['summary'])) { - return "No help for command \"$command\""; - } - $help = $this->commands[$command]['summary']; - } - - if (preg_match_all('/{config\s+([^\}]+)}/e', $help, $matches)) { - foreach($matches[0] as $k => $v) { - $help = preg_replace("/$v/", $config->get($matches[1][$k]), $help); - } - } - - return array($help, $this->getHelpArgs($command)); - } - - /** - * Returns the help for the accepted arguments of a command - * - * @param string $command - * @return string The help string - */ - function getHelpArgs($command) - { - if (isset($this->commands[$command]['options']) && - count($this->commands[$command]['options'])) - { - $help = "Options:\n"; - foreach ($this->commands[$command]['options'] as $k => $v) { - if (isset($v['arg'])) { - if ($v['arg'][0] == '(') { - $arg = substr($v['arg'], 1, -1); - $sapp = " [$arg]"; - $lapp = "[=$arg]"; - } else { - $sapp = " $v[arg]"; - $lapp = "=$v[arg]"; - } - } else { - $sapp = $lapp = ""; - } - - if (isset($v['shortopt'])) { - $s = $v['shortopt']; - $help .= " -$s$sapp, --$k$lapp\n"; - } else { - $help .= " --$k$lapp\n"; - } - - $p = " "; - $doc = rtrim(str_replace("\n", "\n$p", $v['doc'])); - $help .= " $doc\n"; - } - - return $help; - } - - return null; - } - - function run($command, $options, $params) - { - if (empty($this->commands[$command]['function'])) { - // look for shortcuts - foreach (array_keys($this->commands) as $cmd) { - if (isset($this->commands[$cmd]['shortcut']) && $this->commands[$cmd]['shortcut'] == $command) { - if (empty($this->commands[$cmd]['function'])) { - return $this->raiseError("unknown command `$command'"); - } else { - $func = $this->commands[$cmd]['function']; - } - $command = $cmd; - - //$command = $this->commands[$cmd]['function']; - break; - } - } - } else { - $func = $this->commands[$command]['function']; - } - - return $this->$func($command, $options, $params); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Config.php b/_piecrust/libs/PEAR/Command/Config.php deleted file mode 100644 index a761b27..0000000 --- a/_piecrust/libs/PEAR/Command/Config.php +++ /dev/null @@ -1,414 +0,0 @@ - - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Config.php 313024 2011-07-06 19:51:24Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/** - * base class - */ -require_once 'PEAR/Command/Common.php'; - -/** - * PEAR commands for managing configuration data. - * - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ -class PEAR_Command_Config extends PEAR_Command_Common -{ - var $commands = array( - 'config-show' => array( - 'summary' => 'Show All Settings', - 'function' => 'doConfigShow', - 'shortcut' => 'csh', - 'options' => array( - 'channel' => array( - 'shortopt' => 'c', - 'doc' => 'show configuration variables for another channel', - 'arg' => 'CHAN', - ), -), - 'doc' => '[layer] -Displays all configuration values. An optional argument -may be used to tell which configuration layer to display. Valid -configuration layers are "user", "system" and "default". To display -configurations for different channels, set the default_channel -configuration variable and run config-show again. -', - ), - 'config-get' => array( - 'summary' => 'Show One Setting', - 'function' => 'doConfigGet', - 'shortcut' => 'cg', - 'options' => array( - 'channel' => array( - 'shortopt' => 'c', - 'doc' => 'show configuration variables for another channel', - 'arg' => 'CHAN', - ), -), - 'doc' => ' [layer] -Displays the value of one configuration parameter. The -first argument is the name of the parameter, an optional second argument -may be used to tell which configuration layer to look in. Valid configuration -layers are "user", "system" and "default". If no layer is specified, a value -will be picked from the first layer that defines the parameter, in the order -just specified. The configuration value will be retrieved for the channel -specified by the default_channel configuration variable. -', - ), - 'config-set' => array( - 'summary' => 'Change Setting', - 'function' => 'doConfigSet', - 'shortcut' => 'cs', - 'options' => array( - 'channel' => array( - 'shortopt' => 'c', - 'doc' => 'show configuration variables for another channel', - 'arg' => 'CHAN', - ), -), - 'doc' => ' [layer] -Sets the value of one configuration parameter. The first argument is -the name of the parameter, the second argument is the new value. Some -parameters are subject to validation, and the command will fail with -an error message if the new value does not make sense. An optional -third argument may be used to specify in which layer to set the -configuration parameter. The default layer is "user". The -configuration value will be set for the current channel, which -is controlled by the default_channel configuration variable. -', - ), - 'config-help' => array( - 'summary' => 'Show Information About Setting', - 'function' => 'doConfigHelp', - 'shortcut' => 'ch', - 'options' => array(), - 'doc' => '[parameter] -Displays help for a configuration parameter. Without arguments it -displays help for all configuration parameters. -', - ), - 'config-create' => array( - 'summary' => 'Create a Default configuration file', - 'function' => 'doConfigCreate', - 'shortcut' => 'coc', - 'options' => array( - 'windows' => array( - 'shortopt' => 'w', - 'doc' => 'create a config file for a windows install', - ), - ), - 'doc' => ' -Create a default configuration file with all directory configuration -variables set to subdirectories of , and save it as . -This is useful especially for creating a configuration file for a remote -PEAR installation (using the --remoteconfig option of install, upgrade, -and uninstall). -', - ), - ); - - /** - * PEAR_Command_Config constructor. - * - * @access public - */ - function PEAR_Command_Config(&$ui, &$config) - { - parent::PEAR_Command_Common($ui, $config); - } - - function doConfigShow($command, $options, $params) - { - $layer = null; - if (is_array($params)) { - $layer = isset($params[0]) ? $params[0] : null; - } - - // $params[0] -> the layer - if ($error = $this->_checkLayer($layer)) { - return $this->raiseError("config-show:$error"); - } - - $keys = $this->config->getKeys(); - sort($keys); - $channel = isset($options['channel']) ? $options['channel'] : - $this->config->get('default_channel'); - $reg = &$this->config->getRegistry(); - if (!$reg->channelExists($channel)) { - return $this->raiseError('Channel "' . $channel . '" does not exist'); - } - - $channel = $reg->channelName($channel); - $data = array('caption' => 'Configuration (channel ' . $channel . '):'); - foreach ($keys as $key) { - $type = $this->config->getType($key); - $value = $this->config->get($key, $layer, $channel); - if ($type == 'password' && $value) { - $value = '********'; - } - - if ($value === false) { - $value = 'false'; - } elseif ($value === true) { - $value = 'true'; - } - - $data['data'][$this->config->getGroup($key)][] = array($this->config->getPrompt($key) , $key, $value); - } - - foreach ($this->config->getLayers() as $layer) { - $data['data']['Config Files'][] = array(ucfirst($layer) . ' Configuration File', 'Filename' , $this->config->getConfFile($layer)); - } - - $this->ui->outputData($data, $command); - return true; - } - - function doConfigGet($command, $options, $params) - { - $args_cnt = is_array($params) ? count($params) : 0; - switch ($args_cnt) { - case 1: - $config_key = $params[0]; - $layer = null; - break; - case 2: - $config_key = $params[0]; - $layer = $params[1]; - if ($error = $this->_checkLayer($layer)) { - return $this->raiseError("config-get:$error"); - } - break; - case 0: - default: - return $this->raiseError("config-get expects 1 or 2 parameters"); - } - - $reg = &$this->config->getRegistry(); - $channel = isset($options['channel']) ? $options['channel'] : $this->config->get('default_channel'); - if (!$reg->channelExists($channel)) { - return $this->raiseError('Channel "' . $channel . '" does not exist'); - } - - $channel = $reg->channelName($channel); - $this->ui->outputData($this->config->get($config_key, $layer, $channel), $command); - return true; - } - - function doConfigSet($command, $options, $params) - { - // $param[0] -> a parameter to set - // $param[1] -> the value for the parameter - // $param[2] -> the layer - $failmsg = ''; - if (count($params) < 2 || count($params) > 3) { - $failmsg .= "config-set expects 2 or 3 parameters"; - return PEAR::raiseError($failmsg); - } - - if (isset($params[2]) && ($error = $this->_checkLayer($params[2]))) { - $failmsg .= $error; - return PEAR::raiseError("config-set:$failmsg"); - } - - $channel = isset($options['channel']) ? $options['channel'] : $this->config->get('default_channel'); - $reg = &$this->config->getRegistry(); - if (!$reg->channelExists($channel)) { - return $this->raiseError('Channel "' . $channel . '" does not exist'); - } - - $channel = $reg->channelName($channel); - if ($params[0] == 'default_channel' && !$reg->channelExists($params[1])) { - return $this->raiseError('Channel "' . $params[1] . '" does not exist'); - } - - if ($params[0] == 'preferred_mirror' - && ( - !$reg->mirrorExists($channel, $params[1]) && - (!$reg->channelExists($params[1]) || $channel != $params[1]) - ) - ) { - $msg = 'Channel Mirror "' . $params[1] . '" does not exist'; - $msg .= ' in your registry for channel "' . $channel . '".'; - $msg .= "\n" . 'Attempt to run "pear channel-update ' . $channel .'"'; - $msg .= ' if you believe this mirror should exist as you may'; - $msg .= ' have outdated channel information.'; - return $this->raiseError($msg); - } - - if (count($params) == 2) { - array_push($params, 'user'); - $layer = 'user'; - } else { - $layer = $params[2]; - } - - array_push($params, $channel); - if (!call_user_func_array(array(&$this->config, 'set'), $params)) { - array_pop($params); - $failmsg = "config-set (" . implode(", ", $params) . ") failed, channel $channel"; - } else { - $this->config->store($layer); - } - - if ($failmsg) { - return $this->raiseError($failmsg); - } - - $this->ui->outputData('config-set succeeded', $command); - return true; - } - - function doConfigHelp($command, $options, $params) - { - if (empty($params)) { - $params = $this->config->getKeys(); - } - - $data['caption'] = "Config help" . ((count($params) == 1) ? " for $params[0]" : ''); - $data['headline'] = array('Name', 'Type', 'Description'); - $data['border'] = true; - foreach ($params as $name) { - $type = $this->config->getType($name); - $docs = $this->config->getDocs($name); - if ($type == 'set') { - $docs = rtrim($docs) . "\nValid set: " . - implode(' ', $this->config->getSetValues($name)); - } - - $data['data'][] = array($name, $type, $docs); - } - - $this->ui->outputData($data, $command); - } - - function doConfigCreate($command, $options, $params) - { - if (count($params) != 2) { - return PEAR::raiseError('config-create: must have 2 parameters, root path and ' . - 'filename to save as'); - } - - $root = $params[0]; - // Clean up the DIRECTORY_SEPARATOR mess - $ds2 = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR; - $root = preg_replace(array('!\\\\+!', '!/+!', "!$ds2+!"), - array('/', '/', '/'), - $root); - if ($root{0} != '/') { - if (!isset($options['windows'])) { - return PEAR::raiseError('Root directory must be an absolute path beginning ' . - 'with "/", was: "' . $root . '"'); - } - - if (!preg_match('/^[A-Za-z]:/', $root)) { - return PEAR::raiseError('Root directory must be an absolute path beginning ' . - 'with "\\" or "C:\\", was: "' . $root . '"'); - } - } - - $windows = isset($options['windows']); - if ($windows) { - $root = str_replace('/', '\\', $root); - } - - if (!file_exists($params[1]) && !@touch($params[1])) { - return PEAR::raiseError('Could not create "' . $params[1] . '"'); - } - - $params[1] = realpath($params[1]); - $config = &new PEAR_Config($params[1], '#no#system#config#', false, false); - if ($root{strlen($root) - 1} == '/') { - $root = substr($root, 0, strlen($root) - 1); - } - - $config->noRegistry(); - $config->set('php_dir', $windows ? "$root\\pear\\php" : "$root/pear/php", 'user'); - $config->set('data_dir', $windows ? "$root\\pear\\data" : "$root/pear/data"); - $config->set('www_dir', $windows ? "$root\\pear\\www" : "$root/pear/www"); - $config->set('cfg_dir', $windows ? "$root\\pear\\cfg" : "$root/pear/cfg"); - $config->set('ext_dir', $windows ? "$root\\pear\\ext" : "$root/pear/ext"); - $config->set('doc_dir', $windows ? "$root\\pear\\docs" : "$root/pear/docs"); - $config->set('test_dir', $windows ? "$root\\pear\\tests" : "$root/pear/tests"); - $config->set('cache_dir', $windows ? "$root\\pear\\cache" : "$root/pear/cache"); - $config->set('download_dir', $windows ? "$root\\pear\\download" : "$root/pear/download"); - $config->set('temp_dir', $windows ? "$root\\pear\\temp" : "$root/pear/temp"); - $config->set('bin_dir', $windows ? "$root\\pear" : "$root/pear"); - $config->writeConfigFile(); - $this->_showConfig($config); - $this->ui->outputData('Successfully created default configuration file "' . $params[1] . '"', - $command); - } - - function _showConfig(&$config) - { - $params = array('user'); - $keys = $config->getKeys(); - sort($keys); - $channel = 'pear.php.net'; - $data = array('caption' => 'Configuration (channel ' . $channel . '):'); - foreach ($keys as $key) { - $type = $config->getType($key); - $value = $config->get($key, 'user', $channel); - if ($type == 'password' && $value) { - $value = '********'; - } - - if ($value === false) { - $value = 'false'; - } elseif ($value === true) { - $value = 'true'; - } - $data['data'][$config->getGroup($key)][] = - array($config->getPrompt($key) , $key, $value); - } - - foreach ($config->getLayers() as $layer) { - $data['data']['Config Files'][] = - array(ucfirst($layer) . ' Configuration File', 'Filename' , - $config->getConfFile($layer)); - } - - $this->ui->outputData($data, 'config-show'); - return true; - } - - /** - * Checks if a layer is defined or not - * - * @param string $layer The layer to search for - * @return mixed False on no error or the error message - */ - function _checkLayer($layer = null) - { - if (!empty($layer) && $layer != 'default') { - $layers = $this->config->getLayers(); - if (!in_array($layer, $layers)) { - return " only the layers: \"" . implode('" or "', $layers) . "\" are supported"; - } - } - - return false; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Config.xml b/_piecrust/libs/PEAR/Command/Config.xml deleted file mode 100644 index f64a925..0000000 --- a/_piecrust/libs/PEAR/Command/Config.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - Show All Settings - doConfigShow - csh - - - c - show configuration variables for another channel - CHAN - - - [layer] -Displays all configuration values. An optional argument -may be used to tell which configuration layer to display. Valid -configuration layers are "user", "system" and "default". To display -configurations for different channels, set the default_channel -configuration variable and run config-show again. - - - - Show One Setting - doConfigGet - cg - - - c - show configuration variables for another channel - CHAN - - - <parameter> [layer] -Displays the value of one configuration parameter. The -first argument is the name of the parameter, an optional second argument -may be used to tell which configuration layer to look in. Valid configuration -layers are "user", "system" and "default". If no layer is specified, a value -will be picked from the first layer that defines the parameter, in the order -just specified. The configuration value will be retrieved for the channel -specified by the default_channel configuration variable. - - - - Change Setting - doConfigSet - cs - - - c - show configuration variables for another channel - CHAN - - - <parameter> <value> [layer] -Sets the value of one configuration parameter. The first argument is -the name of the parameter, the second argument is the new value. Some -parameters are subject to validation, and the command will fail with -an error message if the new value does not make sense. An optional -third argument may be used to specify in which layer to set the -configuration parameter. The default layer is "user". The -configuration value will be set for the current channel, which -is controlled by the default_channel configuration variable. - - - - Show Information About Setting - doConfigHelp - ch - - [parameter] -Displays help for a configuration parameter. Without arguments it -displays help for all configuration parameters. - - - - Create a Default configuration file - doConfigCreate - coc - - - w - create a config file for a windows install - - - <root path> <filename> -Create a default configuration file with all directory configuration -variables set to subdirectories of <root path>, and save it as <filename>. -This is useful especially for creating a configuration file for a remote -PEAR installation (using the --remoteconfig option of install, upgrade, -and uninstall). - - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Install.php b/_piecrust/libs/PEAR/Command/Install.php deleted file mode 100644 index c035f6d..0000000 --- a/_piecrust/libs/PEAR/Command/Install.php +++ /dev/null @@ -1,1268 +0,0 @@ - - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Install.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/** - * base class - */ -require_once 'PEAR/Command/Common.php'; - -/** - * PEAR commands for installation or deinstallation/upgrading of - * packages. - * - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ -class PEAR_Command_Install extends PEAR_Command_Common -{ - // {{{ properties - - var $commands = array( - 'install' => array( - 'summary' => 'Install Package', - 'function' => 'doInstall', - 'shortcut' => 'i', - 'options' => array( - 'force' => array( - 'shortopt' => 'f', - 'doc' => 'will overwrite newer installed packages', - ), - 'loose' => array( - 'shortopt' => 'l', - 'doc' => 'do not check for recommended dependency version', - ), - 'nodeps' => array( - 'shortopt' => 'n', - 'doc' => 'ignore dependencies, install anyway', - ), - 'register-only' => array( - 'shortopt' => 'r', - 'doc' => 'do not install files, only register the package as installed', - ), - 'soft' => array( - 'shortopt' => 's', - 'doc' => 'soft install, fail silently, or upgrade if already installed', - ), - 'nobuild' => array( - 'shortopt' => 'B', - 'doc' => 'don\'t build C extensions', - ), - 'nocompress' => array( - 'shortopt' => 'Z', - 'doc' => 'request uncompressed files when downloading', - ), - 'installroot' => array( - 'shortopt' => 'R', - 'arg' => 'DIR', - 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT), use packagingroot for RPM', - ), - 'packagingroot' => array( - 'shortopt' => 'P', - 'arg' => 'DIR', - 'doc' => 'root directory used when packaging files, like RPM packaging', - ), - 'ignore-errors' => array( - 'doc' => 'force install even if there were errors', - ), - 'alldeps' => array( - 'shortopt' => 'a', - 'doc' => 'install all required and optional dependencies', - ), - 'onlyreqdeps' => array( - 'shortopt' => 'o', - 'doc' => 'install all required dependencies', - ), - 'offline' => array( - 'shortopt' => 'O', - 'doc' => 'do not attempt to download any urls or contact channels', - ), - 'pretend' => array( - 'shortopt' => 'p', - 'doc' => 'Only list the packages that would be downloaded', - ), - ), - 'doc' => '[channel/] ... -Installs one or more PEAR packages. You can specify a package to -install in four ways: - -"Package-1.0.tgz" : installs from a local file - -"http://example.com/Package-1.0.tgz" : installs from -anywhere on the net. - -"package.xml" : installs the package described in -package.xml. Useful for testing, or for wrapping a PEAR package in -another package manager such as RPM. - -"Package[-version/state][.tar]" : queries your default channel\'s server -({config master_server}) and downloads the newest package with -the preferred quality/state ({config preferred_state}). - -To retrieve Package version 1.1, use "Package-1.1," to retrieve -Package state beta, use "Package-beta." To retrieve an uncompressed -file, append .tar (make sure there is no file by the same name first) - -To download a package from another channel, prefix with the channel name like -"channel/Package" - -More than one package may be specified at once. It is ok to mix these -four ways of specifying packages. -'), - 'upgrade' => array( - 'summary' => 'Upgrade Package', - 'function' => 'doInstall', - 'shortcut' => 'up', - 'options' => array( - 'channel' => array( - 'shortopt' => 'c', - 'doc' => 'upgrade packages from a specific channel', - 'arg' => 'CHAN', - ), - 'force' => array( - 'shortopt' => 'f', - 'doc' => 'overwrite newer installed packages', - ), - 'loose' => array( - 'shortopt' => 'l', - 'doc' => 'do not check for recommended dependency version', - ), - 'nodeps' => array( - 'shortopt' => 'n', - 'doc' => 'ignore dependencies, upgrade anyway', - ), - 'register-only' => array( - 'shortopt' => 'r', - 'doc' => 'do not install files, only register the package as upgraded', - ), - 'nobuild' => array( - 'shortopt' => 'B', - 'doc' => 'don\'t build C extensions', - ), - 'nocompress' => array( - 'shortopt' => 'Z', - 'doc' => 'request uncompressed files when downloading', - ), - 'installroot' => array( - 'shortopt' => 'R', - 'arg' => 'DIR', - 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT)', - ), - 'ignore-errors' => array( - 'doc' => 'force install even if there were errors', - ), - 'alldeps' => array( - 'shortopt' => 'a', - 'doc' => 'install all required and optional dependencies', - ), - 'onlyreqdeps' => array( - 'shortopt' => 'o', - 'doc' => 'install all required dependencies', - ), - 'offline' => array( - 'shortopt' => 'O', - 'doc' => 'do not attempt to download any urls or contact channels', - ), - 'pretend' => array( - 'shortopt' => 'p', - 'doc' => 'Only list the packages that would be downloaded', - ), - ), - 'doc' => ' ... -Upgrades one or more PEAR packages. See documentation for the -"install" command for ways to specify a package. - -When upgrading, your package will be updated if the provided new -package has a higher version number (use the -f option if you need to -upgrade anyway). - -More than one package may be specified at once. -'), - 'upgrade-all' => array( - 'summary' => 'Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters]', - 'function' => 'doUpgradeAll', - 'shortcut' => 'ua', - 'options' => array( - 'channel' => array( - 'shortopt' => 'c', - 'doc' => 'upgrade packages from a specific channel', - 'arg' => 'CHAN', - ), - 'nodeps' => array( - 'shortopt' => 'n', - 'doc' => 'ignore dependencies, upgrade anyway', - ), - 'register-only' => array( - 'shortopt' => 'r', - 'doc' => 'do not install files, only register the package as upgraded', - ), - 'nobuild' => array( - 'shortopt' => 'B', - 'doc' => 'don\'t build C extensions', - ), - 'nocompress' => array( - 'shortopt' => 'Z', - 'doc' => 'request uncompressed files when downloading', - ), - 'installroot' => array( - 'shortopt' => 'R', - 'arg' => 'DIR', - 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT), use packagingroot for RPM', - ), - 'ignore-errors' => array( - 'doc' => 'force install even if there were errors', - ), - 'loose' => array( - 'doc' => 'do not check for recommended dependency version', - ), - ), - 'doc' => ' -WARNING: This function is deprecated in favor of using the upgrade command with no params - -Upgrades all packages that have a newer release available. Upgrades are -done only if there is a release available of the state specified in -"preferred_state" (currently {config preferred_state}), or a state considered -more stable. -'), - 'uninstall' => array( - 'summary' => 'Un-install Package', - 'function' => 'doUninstall', - 'shortcut' => 'un', - 'options' => array( - 'nodeps' => array( - 'shortopt' => 'n', - 'doc' => 'ignore dependencies, uninstall anyway', - ), - 'register-only' => array( - 'shortopt' => 'r', - 'doc' => 'do not remove files, only register the packages as not installed', - ), - 'installroot' => array( - 'shortopt' => 'R', - 'arg' => 'DIR', - 'doc' => 'root directory used when installing files (ala PHP\'s INSTALL_ROOT)', - ), - 'ignore-errors' => array( - 'doc' => 'force install even if there were errors', - ), - 'offline' => array( - 'shortopt' => 'O', - 'doc' => 'do not attempt to uninstall remotely', - ), - ), - 'doc' => '[channel/] ... -Uninstalls one or more PEAR packages. More than one package may be -specified at once. Prefix with channel name to uninstall from a -channel not in your default channel ({config default_channel}) -'), - 'bundle' => array( - 'summary' => 'Unpacks a Pecl Package', - 'function' => 'doBundle', - 'shortcut' => 'bun', - 'options' => array( - 'destination' => array( - 'shortopt' => 'd', - 'arg' => 'DIR', - 'doc' => 'Optional destination directory for unpacking (defaults to current path or "ext" if exists)', - ), - 'force' => array( - 'shortopt' => 'f', - 'doc' => 'Force the unpacking even if there were errors in the package', - ), - ), - 'doc' => ' -Unpacks a Pecl Package into the selected location. It will download the -package if needed. -'), - 'run-scripts' => array( - 'summary' => 'Run Post-Install Scripts bundled with a package', - 'function' => 'doRunScripts', - 'shortcut' => 'rs', - 'options' => array( - ), - 'doc' => ' -Run post-installation scripts in package , if any exist. -'), - ); - - // }}} - // {{{ constructor - - /** - * PEAR_Command_Install constructor. - * - * @access public - */ - function PEAR_Command_Install(&$ui, &$config) - { - parent::PEAR_Command_Common($ui, $config); - } - - // }}} - - /** - * For unit testing purposes - */ - function &getDownloader(&$ui, $options, &$config) - { - if (!class_exists('PEAR_Downloader')) { - require_once 'PEAR/Downloader.php'; - } - $a = &new PEAR_Downloader($ui, $options, $config); - return $a; - } - - /** - * For unit testing purposes - */ - function &getInstaller(&$ui) - { - if (!class_exists('PEAR_Installer')) { - require_once 'PEAR/Installer.php'; - } - $a = &new PEAR_Installer($ui); - return $a; - } - - function enableExtension($binaries, $type) - { - if (!($phpini = $this->config->get('php_ini', null, 'pear.php.net'))) { - return PEAR::raiseError('configuration option "php_ini" is not set to php.ini location'); - } - $ini = $this->_parseIni($phpini); - if (PEAR::isError($ini)) { - return $ini; - } - $line = 0; - if ($type == 'extsrc' || $type == 'extbin') { - $search = 'extensions'; - $enable = 'extension'; - } else { - $search = 'zend_extensions'; - ob_start(); - phpinfo(INFO_GENERAL); - $info = ob_get_contents(); - ob_end_clean(); - $debug = function_exists('leak') ? '_debug' : ''; - $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : ''; - $enable = 'zend_extension' . $debug . $ts; - } - foreach ($ini[$search] as $line => $extension) { - if (in_array($extension, $binaries, true) || in_array( - $ini['extension_dir'] . DIRECTORY_SEPARATOR . $extension, $binaries, true)) { - // already enabled - assume if one is, all are - return true; - } - } - if ($line) { - $newini = array_slice($ini['all'], 0, $line); - } else { - $newini = array(); - } - foreach ($binaries as $binary) { - if ($ini['extension_dir']) { - $binary = basename($binary); - } - $newini[] = $enable . '="' . $binary . '"' . (OS_UNIX ? "\n" : "\r\n"); - } - $newini = array_merge($newini, array_slice($ini['all'], $line)); - $fp = @fopen($phpini, 'wb'); - if (!$fp) { - return PEAR::raiseError('cannot open php.ini "' . $phpini . '" for writing'); - } - foreach ($newini as $line) { - fwrite($fp, $line); - } - fclose($fp); - return true; - } - - function disableExtension($binaries, $type) - { - if (!($phpini = $this->config->get('php_ini', null, 'pear.php.net'))) { - return PEAR::raiseError('configuration option "php_ini" is not set to php.ini location'); - } - $ini = $this->_parseIni($phpini); - if (PEAR::isError($ini)) { - return $ini; - } - $line = 0; - if ($type == 'extsrc' || $type == 'extbin') { - $search = 'extensions'; - $enable = 'extension'; - } else { - $search = 'zend_extensions'; - ob_start(); - phpinfo(INFO_GENERAL); - $info = ob_get_contents(); - ob_end_clean(); - $debug = function_exists('leak') ? '_debug' : ''; - $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : ''; - $enable = 'zend_extension' . $debug . $ts; - } - $found = false; - foreach ($ini[$search] as $line => $extension) { - if (in_array($extension, $binaries, true) || in_array( - $ini['extension_dir'] . DIRECTORY_SEPARATOR . $extension, $binaries, true)) { - $found = true; - break; - } - } - if (!$found) { - // not enabled - return true; - } - $fp = @fopen($phpini, 'wb'); - if (!$fp) { - return PEAR::raiseError('cannot open php.ini "' . $phpini . '" for writing'); - } - if ($line) { - $newini = array_slice($ini['all'], 0, $line); - // delete the enable line - $newini = array_merge($newini, array_slice($ini['all'], $line + 1)); - } else { - $newini = array_slice($ini['all'], 1); - } - foreach ($newini as $line) { - fwrite($fp, $line); - } - fclose($fp); - return true; - } - - function _parseIni($filename) - { - if (!file_exists($filename)) { - return PEAR::raiseError('php.ini "' . $filename . '" does not exist'); - } - - if (filesize($filename) > 300000) { - return PEAR::raiseError('php.ini "' . $filename . '" is too large, aborting'); - } - - ob_start(); - phpinfo(INFO_GENERAL); - $info = ob_get_contents(); - ob_end_clean(); - $debug = function_exists('leak') ? '_debug' : ''; - $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : ''; - $zend_extension_line = 'zend_extension' . $debug . $ts; - $all = @file($filename); - if (!$all) { - return PEAR::raiseError('php.ini "' . $filename .'" could not be read'); - } - $zend_extensions = $extensions = array(); - // assume this is right, but pull from the php.ini if it is found - $extension_dir = ini_get('extension_dir'); - foreach ($all as $linenum => $line) { - $line = trim($line); - if (!$line) { - continue; - } - if ($line[0] == ';') { - continue; - } - if (strtolower(substr($line, 0, 13)) == 'extension_dir') { - $line = trim(substr($line, 13)); - if ($line[0] == '=') { - $x = trim(substr($line, 1)); - $x = explode(';', $x); - $extension_dir = str_replace('"', '', array_shift($x)); - continue; - } - } - if (strtolower(substr($line, 0, 9)) == 'extension') { - $line = trim(substr($line, 9)); - if ($line[0] == '=') { - $x = trim(substr($line, 1)); - $x = explode(';', $x); - $extensions[$linenum] = str_replace('"', '', array_shift($x)); - continue; - } - } - if (strtolower(substr($line, 0, strlen($zend_extension_line))) == - $zend_extension_line) { - $line = trim(substr($line, strlen($zend_extension_line))); - if ($line[0] == '=') { - $x = trim(substr($line, 1)); - $x = explode(';', $x); - $zend_extensions[$linenum] = str_replace('"', '', array_shift($x)); - continue; - } - } - } - return array( - 'extensions' => $extensions, - 'zend_extensions' => $zend_extensions, - 'extension_dir' => $extension_dir, - 'all' => $all, - ); - } - - // {{{ doInstall() - - function doInstall($command, $options, $params) - { - if (!class_exists('PEAR_PackageFile')) { - require_once 'PEAR/PackageFile.php'; - } - - if (isset($options['installroot']) && isset($options['packagingroot'])) { - return $this->raiseError('ERROR: cannot use both --installroot and --packagingroot'); - } - - $reg = &$this->config->getRegistry(); - $channel = isset($options['channel']) ? $options['channel'] : $this->config->get('default_channel'); - if (!$reg->channelExists($channel)) { - return $this->raiseError('Channel "' . $channel . '" does not exist'); - } - - if (empty($this->installer)) { - $this->installer = &$this->getInstaller($this->ui); - } - - if ($command == 'upgrade' || $command == 'upgrade-all') { - // If people run the upgrade command but pass nothing, emulate a upgrade-all - if ($command == 'upgrade' && empty($params)) { - return $this->doUpgradeAll($command, $options, $params); - } - $options['upgrade'] = true; - } else { - $packages = $params; - } - - $instreg = &$reg; // instreg used to check if package is installed - if (isset($options['packagingroot']) && !isset($options['upgrade'])) { - $packrootphp_dir = $this->installer->_prependPath( - $this->config->get('php_dir', null, 'pear.php.net'), - $options['packagingroot']); - $instreg = new PEAR_Registry($packrootphp_dir); // other instreg! - - if ($this->config->get('verbose') > 2) { - $this->ui->outputData('using package root: ' . $options['packagingroot']); - } - } - - $abstractpackages = $otherpackages = array(); - // parse params - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - - foreach ($params as $param) { - if (strpos($param, 'http://') === 0) { - $otherpackages[] = $param; - continue; - } - - if (strpos($param, 'channel://') === false && @file_exists($param)) { - if (isset($options['force'])) { - $otherpackages[] = $param; - continue; - } - - $pkg = new PEAR_PackageFile($this->config); - $pf = $pkg->fromAnyFile($param, PEAR_VALIDATE_DOWNLOADING); - if (PEAR::isError($pf)) { - $otherpackages[] = $param; - continue; - } - - $exists = $reg->packageExists($pf->getPackage(), $pf->getChannel()); - $pversion = $reg->packageInfo($pf->getPackage(), 'version', $pf->getChannel()); - $version_compare = version_compare($pf->getVersion(), $pversion, '<='); - if ($exists && $version_compare) { - if ($this->config->get('verbose')) { - $this->ui->outputData('Ignoring installed package ' . - $reg->parsedPackageNameToString( - array('package' => $pf->getPackage(), - 'channel' => $pf->getChannel()), true)); - } - continue; - } - $otherpackages[] = $param; - continue; - } - - $e = $reg->parsePackageName($param, $channel); - if (PEAR::isError($e)) { - $otherpackages[] = $param; - } else { - $abstractpackages[] = $e; - } - } - PEAR::staticPopErrorHandling(); - - // if there are any local package .tgz or remote static url, we can't - // filter. The filter only works for abstract packages - if (count($abstractpackages) && !isset($options['force'])) { - // when not being forced, only do necessary upgrades/installs - if (isset($options['upgrade'])) { - $abstractpackages = $this->_filterUptodatePackages($abstractpackages, $command); - } else { - $count = count($abstractpackages); - foreach ($abstractpackages as $i => $package) { - if (isset($package['group'])) { - // do not filter out install groups - continue; - } - - if ($instreg->packageExists($package['package'], $package['channel'])) { - if ($count > 1) { - if ($this->config->get('verbose')) { - $this->ui->outputData('Ignoring installed package ' . - $reg->parsedPackageNameToString($package, true)); - } - unset($abstractpackages[$i]); - } elseif ($count === 1) { - // Lets try to upgrade it since it's already installed - $options['upgrade'] = true; - } - } - } - } - $abstractpackages = - array_map(array($reg, 'parsedPackageNameToString'), $abstractpackages); - } elseif (count($abstractpackages)) { - $abstractpackages = - array_map(array($reg, 'parsedPackageNameToString'), $abstractpackages); - } - - $packages = array_merge($abstractpackages, $otherpackages); - if (!count($packages)) { - $c = ''; - if (isset($options['channel'])){ - $c .= ' in channel "' . $options['channel'] . '"'; - } - $this->ui->outputData('Nothing to ' . $command . $c); - return true; - } - - $this->downloader = &$this->getDownloader($this->ui, $options, $this->config); - $errors = $downloaded = $binaries = array(); - $downloaded = &$this->downloader->download($packages); - if (PEAR::isError($downloaded)) { - return $this->raiseError($downloaded); - } - - $errors = $this->downloader->getErrorMsgs(); - if (count($errors)) { - $err = array(); - $err['data'] = array(); - foreach ($errors as $error) { - if ($error !== null) { - $err['data'][] = array($error); - } - } - - if (!empty($err['data'])) { - $err['headline'] = 'Install Errors'; - $this->ui->outputData($err); - } - - if (!count($downloaded)) { - return $this->raiseError("$command failed"); - } - } - - $data = array( - 'headline' => 'Packages that would be Installed' - ); - - if (isset($options['pretend'])) { - foreach ($downloaded as $package) { - $data['data'][] = array($reg->parsedPackageNameToString($package->getParsedPackage())); - } - $this->ui->outputData($data, 'pretend'); - return true; - } - - $this->installer->setOptions($options); - $this->installer->sortPackagesForInstall($downloaded); - if (PEAR::isError($err = $this->installer->setDownloadedPackages($downloaded))) { - $this->raiseError($err->getMessage()); - return true; - } - - $binaries = $extrainfo = array(); - foreach ($downloaded as $param) { - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $info = $this->installer->install($param, $options); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($info)) { - $oldinfo = $info; - $pkg = &$param->getPackageFile(); - if ($info->getCode() != PEAR_INSTALLER_NOBINARY) { - if (!($info = $pkg->installBinary($this->installer))) { - $this->ui->outputData('ERROR: ' .$oldinfo->getMessage()); - continue; - } - - // we just installed a different package than requested, - // let's change the param and info so that the rest of this works - $param = $info[0]; - $info = $info[1]; - } - } - - if (!is_array($info)) { - return $this->raiseError("$command failed"); - } - - if ($param->getPackageType() == 'extsrc' || - $param->getPackageType() == 'extbin' || - $param->getPackageType() == 'zendextsrc' || - $param->getPackageType() == 'zendextbin' - ) { - $pkg = &$param->getPackageFile(); - if ($instbin = $pkg->getInstalledBinary()) { - $instpkg = &$instreg->getPackage($instbin, $pkg->getChannel()); - } else { - $instpkg = &$instreg->getPackage($pkg->getPackage(), $pkg->getChannel()); - } - - foreach ($instpkg->getFilelist() as $name => $atts) { - $pinfo = pathinfo($atts['installed_as']); - if (!isset($pinfo['extension']) || - in_array($pinfo['extension'], array('c', 'h')) - ) { - continue; // make sure we don't match php_blah.h - } - - if ((strpos($pinfo['basename'], 'php_') === 0 && - $pinfo['extension'] == 'dll') || - // most unices - $pinfo['extension'] == 'so' || - // hp-ux - $pinfo['extension'] == 'sl') { - $binaries[] = array($atts['installed_as'], $pinfo); - break; - } - } - - if (count($binaries)) { - foreach ($binaries as $pinfo) { - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $ret = $this->enableExtension(array($pinfo[0]), $param->getPackageType()); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($ret)) { - $extrainfo[] = $ret->getMessage(); - if ($param->getPackageType() == 'extsrc' || - $param->getPackageType() == 'extbin') { - $exttype = 'extension'; - } else { - ob_start(); - phpinfo(INFO_GENERAL); - $info = ob_get_contents(); - ob_end_clean(); - $debug = function_exists('leak') ? '_debug' : ''; - $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : ''; - $exttype = 'zend_extension' . $debug . $ts; - } - $extrainfo[] = 'You should add "' . $exttype . '=' . - $pinfo[1]['basename'] . '" to php.ini'; - } else { - $extrainfo[] = 'Extension ' . $instpkg->getProvidesExtension() . - ' enabled in php.ini'; - } - } - } - } - - if ($this->config->get('verbose') > 0) { - $chan = $param->getChannel(); - $label = $reg->parsedPackageNameToString( - array( - 'channel' => $chan, - 'package' => $param->getPackage(), - 'version' => $param->getVersion(), - )); - $out = array('data' => "$command ok: $label"); - if (isset($info['release_warnings'])) { - $out['release_warnings'] = $info['release_warnings']; - } - $this->ui->outputData($out, $command); - - if (!isset($options['register-only']) && !isset($options['offline'])) { - if ($this->config->isDefinedLayer('ftp')) { - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $info = $this->installer->ftpInstall($param); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($info)) { - $this->ui->outputData($info->getMessage()); - $this->ui->outputData("remote install failed: $label"); - } else { - $this->ui->outputData("remote install ok: $label"); - } - } - } - } - - $deps = $param->getDeps(); - if ($deps) { - if (isset($deps['group'])) { - $groups = $deps['group']; - if (!isset($groups[0])) { - $groups = array($groups); - } - - foreach ($groups as $group) { - if ($group['attribs']['name'] == 'default') { - // default group is always installed, unless the user - // explicitly chooses to install another group - continue; - } - $extrainfo[] = $param->getPackage() . ': Optional feature ' . - $group['attribs']['name'] . ' available (' . - $group['attribs']['hint'] . ')'; - } - - $extrainfo[] = $param->getPackage() . - ': To install optional features use "pear install ' . - $reg->parsedPackageNameToString( - array('package' => $param->getPackage(), - 'channel' => $param->getChannel()), true) . - '#featurename"'; - } - } - - $pkg = &$instreg->getPackage($param->getPackage(), $param->getChannel()); - // $pkg may be NULL if install is a 'fake' install via --packagingroot - if (is_object($pkg)) { - $pkg->setConfig($this->config); - if ($list = $pkg->listPostinstallScripts()) { - $pn = $reg->parsedPackageNameToString(array('channel' => - $param->getChannel(), 'package' => $param->getPackage()), true); - $extrainfo[] = $pn . ' has post-install scripts:'; - foreach ($list as $file) { - $extrainfo[] = $file; - } - $extrainfo[] = $param->getPackage() . - ': Use "pear run-scripts ' . $pn . '" to finish setup.'; - $extrainfo[] = 'DO NOT RUN SCRIPTS FROM UNTRUSTED SOURCES'; - } - } - } - - if (count($extrainfo)) { - foreach ($extrainfo as $info) { - $this->ui->outputData($info); - } - } - - return true; - } - - // }}} - // {{{ doUpgradeAll() - - function doUpgradeAll($command, $options, $params) - { - $reg = &$this->config->getRegistry(); - $upgrade = array(); - - if (isset($options['channel'])) { - $channels = array($options['channel']); - } else { - $channels = $reg->listChannels(); - } - - foreach ($channels as $channel) { - if ($channel == '__uri') { - continue; - } - - // parse name with channel - foreach ($reg->listPackages($channel) as $name) { - $upgrade[] = $reg->parsedPackageNameToString(array( - 'channel' => $channel, - 'package' => $name - )); - } - } - - $err = $this->doInstall($command, $options, $upgrade); - if (PEAR::isError($err)) { - $this->ui->outputData($err->getMessage(), $command); - } - } - - // }}} - // {{{ doUninstall() - - function doUninstall($command, $options, $params) - { - if (count($params) < 1) { - return $this->raiseError("Please supply the package(s) you want to uninstall"); - } - - if (empty($this->installer)) { - $this->installer = &$this->getInstaller($this->ui); - } - - if (isset($options['remoteconfig'])) { - $e = $this->config->readFTPConfigFile($options['remoteconfig']); - if (!PEAR::isError($e)) { - $this->installer->setConfig($this->config); - } - } - - $reg = &$this->config->getRegistry(); - $newparams = array(); - $binaries = array(); - $badparams = array(); - foreach ($params as $pkg) { - $channel = $this->config->get('default_channel'); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $parsed = $reg->parsePackageName($pkg, $channel); - PEAR::staticPopErrorHandling(); - if (!$parsed || PEAR::isError($parsed)) { - $badparams[] = $pkg; - continue; - } - $package = $parsed['package']; - $channel = $parsed['channel']; - $info = &$reg->getPackage($package, $channel); - if ($info === null && - ($channel == 'pear.php.net' || $channel == 'pecl.php.net')) { - // make sure this isn't a package that has flipped from pear to pecl but - // used a package.xml 1.0 - $testc = ($channel == 'pear.php.net') ? 'pecl.php.net' : 'pear.php.net'; - $info = &$reg->getPackage($package, $testc); - if ($info !== null) { - $channel = $testc; - } - } - if ($info === null) { - $badparams[] = $pkg; - } else { - $newparams[] = &$info; - // check for binary packages (this is an alias for those packages if so) - if ($installedbinary = $info->getInstalledBinary()) { - $this->ui->log('adding binary package ' . - $reg->parsedPackageNameToString(array('channel' => $channel, - 'package' => $installedbinary), true)); - $newparams[] = &$reg->getPackage($installedbinary, $channel); - } - // add the contents of a dependency group to the list of installed packages - if (isset($parsed['group'])) { - $group = $info->getDependencyGroup($parsed['group']); - if ($group) { - $installed = $reg->getInstalledGroup($group); - if ($installed) { - foreach ($installed as $i => $p) { - $newparams[] = &$installed[$i]; - } - } - } - } - } - } - $err = $this->installer->sortPackagesForUninstall($newparams); - if (PEAR::isError($err)) { - $this->ui->outputData($err->getMessage(), $command); - return true; - } - $params = $newparams; - // twist this to use it to check on whether dependent packages are also being uninstalled - // for circular dependencies like subpackages - $this->installer->setUninstallPackages($newparams); - $params = array_merge($params, $badparams); - $binaries = array(); - foreach ($params as $pkg) { - $this->installer->pushErrorHandling(PEAR_ERROR_RETURN); - if ($err = $this->installer->uninstall($pkg, $options)) { - $this->installer->popErrorHandling(); - if (PEAR::isError($err)) { - $this->ui->outputData($err->getMessage(), $command); - continue; - } - if ($pkg->getPackageType() == 'extsrc' || - $pkg->getPackageType() == 'extbin' || - $pkg->getPackageType() == 'zendextsrc' || - $pkg->getPackageType() == 'zendextbin') { - if ($instbin = $pkg->getInstalledBinary()) { - continue; // this will be uninstalled later - } - - foreach ($pkg->getFilelist() as $name => $atts) { - $pinfo = pathinfo($atts['installed_as']); - if (!isset($pinfo['extension']) || - in_array($pinfo['extension'], array('c', 'h'))) { - continue; // make sure we don't match php_blah.h - } - if ((strpos($pinfo['basename'], 'php_') === 0 && - $pinfo['extension'] == 'dll') || - // most unices - $pinfo['extension'] == 'so' || - // hp-ux - $pinfo['extension'] == 'sl') { - $binaries[] = array($atts['installed_as'], $pinfo); - break; - } - } - if (count($binaries)) { - foreach ($binaries as $pinfo) { - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $ret = $this->disableExtension(array($pinfo[0]), $pkg->getPackageType()); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($ret)) { - $extrainfo[] = $ret->getMessage(); - if ($pkg->getPackageType() == 'extsrc' || - $pkg->getPackageType() == 'extbin') { - $exttype = 'extension'; - } else { - ob_start(); - phpinfo(INFO_GENERAL); - $info = ob_get_contents(); - ob_end_clean(); - $debug = function_exists('leak') ? '_debug' : ''; - $ts = preg_match('/Thread Safety.+enabled/', $info) ? '_ts' : ''; - $exttype = 'zend_extension' . $debug . $ts; - } - $this->ui->outputData('Unable to remove "' . $exttype . '=' . - $pinfo[1]['basename'] . '" from php.ini', $command); - } else { - $this->ui->outputData('Extension ' . $pkg->getProvidesExtension() . - ' disabled in php.ini', $command); - } - } - } - } - $savepkg = $pkg; - if ($this->config->get('verbose') > 0) { - if (is_object($pkg)) { - $pkg = $reg->parsedPackageNameToString($pkg); - } - $this->ui->outputData("uninstall ok: $pkg", $command); - } - if (!isset($options['offline']) && is_object($savepkg) && - defined('PEAR_REMOTEINSTALL_OK')) { - if ($this->config->isDefinedLayer('ftp')) { - $this->installer->pushErrorHandling(PEAR_ERROR_RETURN); - $info = $this->installer->ftpUninstall($savepkg); - $this->installer->popErrorHandling(); - if (PEAR::isError($info)) { - $this->ui->outputData($info->getMessage()); - $this->ui->outputData("remote uninstall failed: $pkg"); - } else { - $this->ui->outputData("remote uninstall ok: $pkg"); - } - } - } - } else { - $this->installer->popErrorHandling(); - if (!is_object($pkg)) { - return $this->raiseError("uninstall failed: $pkg"); - } - $pkg = $reg->parsedPackageNameToString($pkg); - } - } - - return true; - } - - // }}} - - - // }}} - // {{{ doBundle() - /* - (cox) It just downloads and untars the package, does not do - any check that the PEAR_Installer::_installFile() does. - */ - - function doBundle($command, $options, $params) - { - $opts = array( - 'force' => true, - 'nodeps' => true, - 'soft' => true, - 'downloadonly' => true - ); - $downloader = &$this->getDownloader($this->ui, $opts, $this->config); - $reg = &$this->config->getRegistry(); - if (count($params) < 1) { - return $this->raiseError("Please supply the package you want to bundle"); - } - - if (isset($options['destination'])) { - if (!is_dir($options['destination'])) { - System::mkdir('-p ' . $options['destination']); - } - $dest = realpath($options['destination']); - } else { - $pwd = getcwd(); - $dir = $pwd . DIRECTORY_SEPARATOR . 'ext'; - $dest = is_dir($dir) ? $dir : $pwd; - } - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $err = $downloader->setDownloadDir($dest); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($err)) { - return PEAR::raiseError('download directory "' . $dest . - '" is not writeable.'); - } - $result = &$downloader->download(array($params[0])); - if (PEAR::isError($result)) { - return $result; - } - if (!isset($result[0])) { - return $this->raiseError('unable to unpack ' . $params[0]); - } - $pkgfile = &$result[0]->getPackageFile(); - $pkgname = $pkgfile->getName(); - $pkgversion = $pkgfile->getVersion(); - - // Unpacking ------------------------------------------------- - $dest .= DIRECTORY_SEPARATOR . $pkgname; - $orig = $pkgname . '-' . $pkgversion; - - $tar = &new Archive_Tar($pkgfile->getArchiveFile()); - if (!$tar->extractModify($dest, $orig)) { - return $this->raiseError('unable to unpack ' . $pkgfile->getArchiveFile()); - } - $this->ui->outputData("Package ready at '$dest'"); - // }}} - } - - // }}} - - function doRunScripts($command, $options, $params) - { - if (!isset($params[0])) { - return $this->raiseError('run-scripts expects 1 parameter: a package name'); - } - - $reg = &$this->config->getRegistry(); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $parsed = $reg->parsePackageName($params[0], $this->config->get('default_channel')); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($parsed)) { - return $this->raiseError($parsed); - } - - $package = &$reg->getPackage($parsed['package'], $parsed['channel']); - if (!is_object($package)) { - return $this->raiseError('Could not retrieve package "' . $params[0] . '" from registry'); - } - - $package->setConfig($this->config); - $package->runPostinstallScripts(); - $this->ui->outputData('Install scripts complete', $command); - return true; - } - - /** - * Given a list of packages, filter out those ones that are already up to date - * - * @param $packages: packages, in parsed array format ! - * @return list of packages that can be upgraded - */ - function _filterUptodatePackages($packages, $command) - { - $reg = &$this->config->getRegistry(); - $latestReleases = array(); - - $ret = array(); - foreach ($packages as $package) { - if (isset($package['group'])) { - $ret[] = $package; - continue; - } - - $channel = $package['channel']; - $name = $package['package']; - if (!$reg->packageExists($name, $channel)) { - $ret[] = $package; - continue; - } - - if (!isset($latestReleases[$channel])) { - // fill in cache for this channel - $chan = &$reg->getChannel($channel); - if (PEAR::isError($chan)) { - return $this->raiseError($chan); - } - - $base2 = false; - $preferred_mirror = $this->config->get('preferred_mirror', null, $channel); - if ($chan->supportsREST($preferred_mirror) && - ( - //($base2 = $chan->getBaseURL('REST1.4', $preferred_mirror)) || - ($base = $chan->getBaseURL('REST1.0', $preferred_mirror)) - ) - ) { - $dorest = true; - } - - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - if (!isset($package['state'])) { - $state = $this->config->get('preferred_state', null, $channel); - } else { - $state = $package['state']; - } - - if ($dorest) { - if ($base2) { - $rest = &$this->config->getREST('1.4', array()); - $base = $base2; - } else { - $rest = &$this->config->getREST('1.0', array()); - } - - $installed = array_flip($reg->listPackages($channel)); - $latest = $rest->listLatestUpgrades($base, $state, $installed, $channel, $reg); - } - - PEAR::staticPopErrorHandling(); - if (PEAR::isError($latest)) { - $this->ui->outputData('Error getting channel info from ' . $channel . - ': ' . $latest->getMessage()); - continue; - } - - $latestReleases[$channel] = array_change_key_case($latest); - } - - // check package for latest release - $name_lower = strtolower($name); - if (isset($latestReleases[$channel][$name_lower])) { - // if not set, up to date - $inst_version = $reg->packageInfo($name, 'version', $channel); - $channel_version = $latestReleases[$channel][$name_lower]['version']; - if (version_compare($channel_version, $inst_version, 'le')) { - // installed version is up-to-date - continue; - } - - // maintain BC - if ($command == 'upgrade-all') { - $this->ui->outputData(array('data' => 'Will upgrade ' . - $reg->parsedPackageNameToString($package)), $command); - } - $ret[] = $package; - } - } - - return $ret; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Install.xml b/_piecrust/libs/PEAR/Command/Install.xml deleted file mode 100644 index 1b1e933..0000000 --- a/_piecrust/libs/PEAR/Command/Install.xml +++ /dev/null @@ -1,276 +0,0 @@ - - - Install Package - doInstall - i - - - f - will overwrite newer installed packages - - - l - do not check for recommended dependency version - - - n - ignore dependencies, install anyway - - - r - do not install files, only register the package as installed - - - s - soft install, fail silently, or upgrade if already installed - - - B - don't build C extensions - - - Z - request uncompressed files when downloading - - - R - root directory used when installing files (ala PHP's INSTALL_ROOT), use packagingroot for RPM - DIR - - - P - root directory used when packaging files, like RPM packaging - DIR - - - - force install even if there were errors - - - a - install all required and optional dependencies - - - o - install all required dependencies - - - O - do not attempt to download any urls or contact channels - - - p - Only list the packages that would be downloaded - - - [channel/]<package> ... -Installs one or more PEAR packages. You can specify a package to -install in four ways: - -"Package-1.0.tgz" : installs from a local file - -"http://example.com/Package-1.0.tgz" : installs from -anywhere on the net. - -"package.xml" : installs the package described in -package.xml. Useful for testing, or for wrapping a PEAR package in -another package manager such as RPM. - -"Package[-version/state][.tar]" : queries your default channel's server -({config master_server}) and downloads the newest package with -the preferred quality/state ({config preferred_state}). - -To retrieve Package version 1.1, use "Package-1.1," to retrieve -Package state beta, use "Package-beta." To retrieve an uncompressed -file, append .tar (make sure there is no file by the same name first) - -To download a package from another channel, prefix with the channel name like -"channel/Package" - -More than one package may be specified at once. It is ok to mix these -four ways of specifying packages. - - - - Upgrade Package - doInstall - up - - - c - upgrade packages from a specific channel - CHAN - - - f - overwrite newer installed packages - - - l - do not check for recommended dependency version - - - n - ignore dependencies, upgrade anyway - - - r - do not install files, only register the package as upgraded - - - B - don't build C extensions - - - Z - request uncompressed files when downloading - - - R - root directory used when installing files (ala PHP's INSTALL_ROOT) - DIR - - - - force install even if there were errors - - - a - install all required and optional dependencies - - - o - install all required dependencies - - - O - do not attempt to download any urls or contact channels - - - p - Only list the packages that would be downloaded - - - <package> ... -Upgrades one or more PEAR packages. See documentation for the -"install" command for ways to specify a package. - -When upgrading, your package will be updated if the provided new -package has a higher version number (use the -f option if you need to -upgrade anyway). - -More than one package may be specified at once. - - - - Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters] - doUpgradeAll - ua - - - c - upgrade packages from a specific channel - CHAN - - - n - ignore dependencies, upgrade anyway - - - r - do not install files, only register the package as upgraded - - - B - don't build C extensions - - - Z - request uncompressed files when downloading - - - R - root directory used when installing files (ala PHP's INSTALL_ROOT), use packagingroot for RPM - DIR - - - - force install even if there were errors - - - - do not check for recommended dependency version - - - -WARNING: This function is deprecated in favor of using the upgrade command with no params - -Upgrades all packages that have a newer release available. Upgrades are -done only if there is a release available of the state specified in -"preferred_state" (currently {config preferred_state}), or a state considered -more stable. - - - - Un-install Package - doUninstall - un - - - n - ignore dependencies, uninstall anyway - - - r - do not remove files, only register the packages as not installed - - - R - root directory used when installing files (ala PHP's INSTALL_ROOT) - DIR - - - - force install even if there were errors - - - O - do not attempt to uninstall remotely - - - [channel/]<package> ... -Uninstalls one or more PEAR packages. More than one package may be -specified at once. Prefix with channel name to uninstall from a -channel not in your default channel ({config default_channel}) - - - - Unpacks a Pecl Package - doBundle - bun - - - d - Optional destination directory for unpacking (defaults to current path or "ext" if exists) - DIR - - - f - Force the unpacking even if there were errors in the package - - - <package> -Unpacks a Pecl Package into the selected location. It will download the -package if needed. - - - - Run Post-Install Scripts bundled with a package - doRunScripts - rs - - <package> -Run post-installation scripts in package <package>, if any exist. - - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Mirror.php b/_piecrust/libs/PEAR/Command/Mirror.php deleted file mode 100644 index 4d157c6..0000000 --- a/_piecrust/libs/PEAR/Command/Mirror.php +++ /dev/null @@ -1,139 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Mirror.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.2.0 - */ - -/** - * base class - */ -require_once 'PEAR/Command/Common.php'; - -/** - * PEAR commands for providing file mirrors - * - * @category pear - * @package PEAR - * @author Alexander Merz - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.2.0 - */ -class PEAR_Command_Mirror extends PEAR_Command_Common -{ - var $commands = array( - 'download-all' => array( - 'summary' => 'Downloads each available package from the default channel', - 'function' => 'doDownloadAll', - 'shortcut' => 'da', - 'options' => array( - 'channel' => - array( - 'shortopt' => 'c', - 'doc' => 'specify a channel other than the default channel', - 'arg' => 'CHAN', - ), - ), - 'doc' => ' -Requests a list of available packages from the default channel ({config default_channel}) -and downloads them to current working directory. Note: only -packages within preferred_state ({config preferred_state}) will be downloaded' - ), - ); - - /** - * PEAR_Command_Mirror constructor. - * - * @access public - * @param object PEAR_Frontend a reference to an frontend - * @param object PEAR_Config a reference to the configuration data - */ - function PEAR_Command_Mirror(&$ui, &$config) - { - parent::PEAR_Command_Common($ui, $config); - } - - /** - * For unit-testing - */ - function &factory($a) - { - $a = &PEAR_Command::factory($a, $this->config); - return $a; - } - - /** - * retrieves a list of avaible Packages from master server - * and downloads them - * - * @access public - * @param string $command the command - * @param array $options the command options before the command - * @param array $params the stuff after the command name - * @return bool true if succesful - * @throw PEAR_Error - */ - function doDownloadAll($command, $options, $params) - { - $savechannel = $this->config->get('default_channel'); - $reg = &$this->config->getRegistry(); - $channel = isset($options['channel']) ? $options['channel'] : - $this->config->get('default_channel'); - if (!$reg->channelExists($channel)) { - $this->config->set('default_channel', $savechannel); - return $this->raiseError('Channel "' . $channel . '" does not exist'); - } - $this->config->set('default_channel', $channel); - - $this->ui->outputData('Using Channel ' . $this->config->get('default_channel')); - $chan = $reg->getChannel($channel); - if (PEAR::isError($chan)) { - return $this->raiseError($chan); - } - - if ($chan->supportsREST($this->config->get('preferred_mirror')) && - $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) { - $rest = &$this->config->getREST('1.0', array()); - $remoteInfo = array_flip($rest->listPackages($base, $channel)); - } - - if (PEAR::isError($remoteInfo)) { - return $remoteInfo; - } - - $cmd = &$this->factory("download"); - if (PEAR::isError($cmd)) { - return $cmd; - } - - $this->ui->outputData('Using Preferred State of ' . - $this->config->get('preferred_state')); - $this->ui->outputData('Gathering release information, please wait...'); - - /** - * Error handling not necessary, because already done by - * the download command - */ - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $err = $cmd->run('download', array('downloadonly' => true), array_keys($remoteInfo)); - PEAR::staticPopErrorHandling(); - $this->config->set('default_channel', $savechannel); - if (PEAR::isError($err)) { - $this->ui->outputData($err->getMessage()); - } - - return true; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Mirror.xml b/_piecrust/libs/PEAR/Command/Mirror.xml deleted file mode 100644 index fe8be9d..0000000 --- a/_piecrust/libs/PEAR/Command/Mirror.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - Downloads each available package from the default channel - doDownloadAll - da - - - c - specify a channel other than the default channel - CHAN - - - -Requests a list of available packages from the default channel ({config default_channel}) -and downloads them to current working directory. Note: only -packages within preferred_state ({config preferred_state}) will be downloaded - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Package.php b/_piecrust/libs/PEAR/Command/Package.php deleted file mode 100644 index ae6d52b..0000000 --- a/_piecrust/libs/PEAR/Command/Package.php +++ /dev/null @@ -1,1124 +0,0 @@ - - * @author Martin Jansen - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Package.php 313024 2011-07-06 19:51:24Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/** - * base class - */ -require_once 'PEAR/Command/Common.php'; - -/** - * PEAR commands for login/logout - * - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Martin Jansen - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ - -class PEAR_Command_Package extends PEAR_Command_Common -{ - var $commands = array( - 'package' => array( - 'summary' => 'Build Package', - 'function' => 'doPackage', - 'shortcut' => 'p', - 'options' => array( - 'nocompress' => array( - 'shortopt' => 'Z', - 'doc' => 'Do not gzip the package file' - ), - 'showname' => array( - 'shortopt' => 'n', - 'doc' => 'Print the name of the packaged file.', - ), - ), - 'doc' => '[descfile] [descfile2] -Creates a PEAR package from its description file (usually called -package.xml). If a second packagefile is passed in, then -the packager will check to make sure that one is a package.xml -version 1.0, and the other is a package.xml version 2.0. The -package.xml version 1.0 will be saved as "package.xml" in the archive, -and the other as "package2.xml" in the archive" -' - ), - 'package-validate' => array( - 'summary' => 'Validate Package Consistency', - 'function' => 'doPackageValidate', - 'shortcut' => 'pv', - 'options' => array(), - 'doc' => ' -', - ), - 'cvsdiff' => array( - 'summary' => 'Run a "cvs diff" for all files in a package', - 'function' => 'doCvsDiff', - 'shortcut' => 'cd', - 'options' => array( - 'quiet' => array( - 'shortopt' => 'q', - 'doc' => 'Be quiet', - ), - 'reallyquiet' => array( - 'shortopt' => 'Q', - 'doc' => 'Be really quiet', - ), - 'date' => array( - 'shortopt' => 'D', - 'doc' => 'Diff against revision of DATE', - 'arg' => 'DATE', - ), - 'release' => array( - 'shortopt' => 'R', - 'doc' => 'Diff against tag for package release REL', - 'arg' => 'REL', - ), - 'revision' => array( - 'shortopt' => 'r', - 'doc' => 'Diff against revision REV', - 'arg' => 'REV', - ), - 'context' => array( - 'shortopt' => 'c', - 'doc' => 'Generate context diff', - ), - 'unified' => array( - 'shortopt' => 'u', - 'doc' => 'Generate unified diff', - ), - 'ignore-case' => array( - 'shortopt' => 'i', - 'doc' => 'Ignore case, consider upper- and lower-case letters equivalent', - ), - 'ignore-whitespace' => array( - 'shortopt' => 'b', - 'doc' => 'Ignore changes in amount of white space', - ), - 'ignore-blank-lines' => array( - 'shortopt' => 'B', - 'doc' => 'Ignore changes that insert or delete blank lines', - ), - 'brief' => array( - 'doc' => 'Report only whether the files differ, no details', - ), - 'dry-run' => array( - 'shortopt' => 'n', - 'doc' => 'Don\'t do anything, just pretend', - ), - ), - 'doc' => ' -Compares all the files in a package. Without any options, this -command will compare the current code with the last checked-in code. -Using the -r or -R option you may compare the current code with that -of a specific release. -', - ), - 'svntag' => array( - 'summary' => 'Set SVN Release Tag', - 'function' => 'doSvnTag', - 'shortcut' => 'sv', - 'options' => array( - 'quiet' => array( - 'shortopt' => 'q', - 'doc' => 'Be quiet', - ), - 'slide' => array( - 'shortopt' => 'F', - 'doc' => 'Move (slide) tag if it exists', - ), - 'delete' => array( - 'shortopt' => 'd', - 'doc' => 'Remove tag', - ), - 'dry-run' => array( - 'shortopt' => 'n', - 'doc' => 'Don\'t do anything, just pretend', - ), - ), - 'doc' => ' [files...] - Sets a SVN tag on all files in a package. Use this command after you have - packaged a distribution tarball with the "package" command to tag what - revisions of what files were in that release. If need to fix something - after running svntag once, but before the tarball is released to the public, - use the "slide" option to move the release tag. - - to include files (such as a second package.xml, or tests not included in the - release), pass them as additional parameters. - ', - ), - 'cvstag' => array( - 'summary' => 'Set CVS Release Tag', - 'function' => 'doCvsTag', - 'shortcut' => 'ct', - 'options' => array( - 'quiet' => array( - 'shortopt' => 'q', - 'doc' => 'Be quiet', - ), - 'reallyquiet' => array( - 'shortopt' => 'Q', - 'doc' => 'Be really quiet', - ), - 'slide' => array( - 'shortopt' => 'F', - 'doc' => 'Move (slide) tag if it exists', - ), - 'delete' => array( - 'shortopt' => 'd', - 'doc' => 'Remove tag', - ), - 'dry-run' => array( - 'shortopt' => 'n', - 'doc' => 'Don\'t do anything, just pretend', - ), - ), - 'doc' => ' [files...] -Sets a CVS tag on all files in a package. Use this command after you have -packaged a distribution tarball with the "package" command to tag what -revisions of what files were in that release. If need to fix something -after running cvstag once, but before the tarball is released to the public, -use the "slide" option to move the release tag. - -to include files (such as a second package.xml, or tests not included in the -release), pass them as additional parameters. -', - ), - 'package-dependencies' => array( - 'summary' => 'Show package dependencies', - 'function' => 'doPackageDependencies', - 'shortcut' => 'pd', - 'options' => array(), - 'doc' => ' or or -List all dependencies the package has. -Can take a tgz / tar file, package.xml or a package name of an installed package.' - ), - 'sign' => array( - 'summary' => 'Sign a package distribution file', - 'function' => 'doSign', - 'shortcut' => 'si', - 'options' => array( - 'verbose' => array( - 'shortopt' => 'v', - 'doc' => 'Display GnuPG output', - ), - ), - 'doc' => ' -Signs a package distribution (.tar or .tgz) file with GnuPG.', - ), - 'makerpm' => array( - 'summary' => 'Builds an RPM spec file from a PEAR package', - 'function' => 'doMakeRPM', - 'shortcut' => 'rpm', - 'options' => array( - 'spec-template' => array( - 'shortopt' => 't', - 'arg' => 'FILE', - 'doc' => 'Use FILE as RPM spec file template' - ), - 'rpm-pkgname' => array( - 'shortopt' => 'p', - 'arg' => 'FORMAT', - 'doc' => 'Use FORMAT as format string for RPM package name, %s is replaced -by the PEAR package name, defaults to "PEAR::%s".', - ), - ), - 'doc' => ' - -Creates an RPM .spec file for wrapping a PEAR package inside an RPM -package. Intended to be used from the SPECS directory, with the PEAR -package tarball in the SOURCES directory: - -$ pear makerpm ../SOURCES/Net_Socket-1.0.tgz -Wrote RPM spec file PEAR::Net_Geo-1.0.spec -$ rpm -bb PEAR::Net_Socket-1.0.spec -... -Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm -', - ), - 'convert' => array( - 'summary' => 'Convert a package.xml 1.0 to package.xml 2.0 format', - 'function' => 'doConvert', - 'shortcut' => 'c2', - 'options' => array( - 'flat' => array( - 'shortopt' => 'f', - 'doc' => 'do not beautify the filelist.', - ), - ), - 'doc' => '[descfile] [descfile2] -Converts a package.xml in 1.0 format into a package.xml -in 2.0 format. The new file will be named package2.xml by default, -and package.xml will be used as the old file by default. -This is not the most intelligent conversion, and should only be -used for automated conversion or learning the format. -' - ), - ); - - var $output; - - /** - * PEAR_Command_Package constructor. - * - * @access public - */ - function PEAR_Command_Package(&$ui, &$config) - { - parent::PEAR_Command_Common($ui, $config); - } - - function _displayValidationResults($err, $warn, $strict = false) - { - foreach ($err as $e) { - $this->output .= "Error: $e\n"; - } - foreach ($warn as $w) { - $this->output .= "Warning: $w\n"; - } - $this->output .= sprintf('Validation: %d error(s), %d warning(s)'."\n", - sizeof($err), sizeof($warn)); - if ($strict && count($err) > 0) { - $this->output .= "Fix these errors and try again."; - return false; - } - return true; - } - - function &getPackager() - { - if (!class_exists('PEAR_Packager')) { - require_once 'PEAR/Packager.php'; - } - $a = &new PEAR_Packager; - return $a; - } - - function &getPackageFile($config, $debug = false) - { - if (!class_exists('PEAR_Common')) { - require_once 'PEAR/Common.php'; - } - if (!class_exists('PEAR_PackageFile')) { - require_once 'PEAR/PackageFile.php'; - } - $a = &new PEAR_PackageFile($config, $debug); - $common = new PEAR_Common; - $common->ui = $this->ui; - $a->setLogger($common); - return $a; - } - - function doPackage($command, $options, $params) - { - $this->output = ''; - $pkginfofile = isset($params[0]) ? $params[0] : 'package.xml'; - $pkg2 = isset($params[1]) ? $params[1] : null; - if (!$pkg2 && !isset($params[0]) && file_exists('package2.xml')) { - $pkg2 = 'package2.xml'; - } - - $packager = &$this->getPackager(); - $compress = empty($options['nocompress']) ? true : false; - $result = $packager->package($pkginfofile, $compress, $pkg2); - if (PEAR::isError($result)) { - return $this->raiseError($result); - } - - // Don't want output, only the package file name just created - if (isset($options['showname'])) { - $this->output = $result; - } - - if ($this->output) { - $this->ui->outputData($this->output, $command); - } - - return true; - } - - function doPackageValidate($command, $options, $params) - { - $this->output = ''; - if (count($params) < 1) { - $params[0] = 'package.xml'; - } - - $obj = &$this->getPackageFile($this->config, $this->_debug); - $obj->rawReturn(); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $info = $obj->fromTgzFile($params[0], PEAR_VALIDATE_NORMAL); - if (PEAR::isError($info)) { - $info = $obj->fromPackageFile($params[0], PEAR_VALIDATE_NORMAL); - } else { - $archive = $info->getArchiveFile(); - $tar = &new Archive_Tar($archive); - $tar->extract(dirname($info->getPackageFile())); - $info->setPackageFile(dirname($info->getPackageFile()) . DIRECTORY_SEPARATOR . - $info->getPackage() . '-' . $info->getVersion() . DIRECTORY_SEPARATOR . - basename($info->getPackageFile())); - } - - PEAR::staticPopErrorHandling(); - if (PEAR::isError($info)) { - return $this->raiseError($info); - } - - $valid = false; - if ($info->getPackagexmlVersion() == '2.0') { - if ($valid = $info->validate(PEAR_VALIDATE_NORMAL)) { - $info->flattenFileList(); - $valid = $info->validate(PEAR_VALIDATE_PACKAGING); - } - } else { - $valid = $info->validate(PEAR_VALIDATE_PACKAGING); - } - - $err = $warn = array(); - if ($errors = $info->getValidationWarnings()) { - foreach ($errors as $error) { - if ($error['level'] == 'warning') { - $warn[] = $error['message']; - } else { - $err[] = $error['message']; - } - } - } - - $this->_displayValidationResults($err, $warn); - $this->ui->outputData($this->output, $command); - return true; - } - - function doSvnTag($command, $options, $params) - { - $this->output = ''; - $_cmd = $command; - if (count($params) < 1) { - $help = $this->getHelp($command); - return $this->raiseError("$command: missing parameter: $help[0]"); - } - - $packageFile = realpath($params[0]); - $dir = dirname($packageFile); - $dir = substr($dir, strrpos($dir, DIRECTORY_SEPARATOR) + 1); - $obj = &$this->getPackageFile($this->config, $this->_debug); - $info = $obj->fromAnyFile($packageFile, PEAR_VALIDATE_NORMAL); - if (PEAR::isError($info)) { - return $this->raiseError($info); - } - - $err = $warn = array(); - if (!$info->validate()) { - foreach ($info->getValidationWarnings() as $error) { - if ($error['level'] == 'warning') { - $warn[] = $error['message']; - } else { - $err[] = $error['message']; - } - } - } - - if (!$this->_displayValidationResults($err, $warn, true)) { - $this->ui->outputData($this->output, $command); - return $this->raiseError('SVN tag failed'); - } - - $version = $info->getVersion(); - $package = $info->getName(); - $svntag = "$package-$version"; - - if (isset($options['delete'])) { - return $this->_svnRemoveTag($version, $package, $svntag, $packageFile, $options); - } - - $path = $this->_svnFindPath($packageFile); - - // Check if there are any modified files - $fp = popen('svn st --xml ' . dirname($packageFile), "r"); - $out = ''; - while ($line = fgets($fp, 1024)) { - $out .= rtrim($line)."\n"; - } - pclose($fp); - - if (!isset($options['quiet']) && strpos($out, 'item="modified"')) { - $params = array(array( - 'name' => 'modified', - 'type' => 'yesno', - 'default' => 'no', - 'prompt' => 'You have files in your SVN checkout (' . $path['from'] . ') that have been modified but not commited, do you still want to tag ' . $version . '?', - )); - $answers = $this->ui->confirmDialog($params); - - if (!in_array($answers['modified'], array('y', 'yes', 'on', '1'))) { - return true; - } - } - - if (isset($options['slide'])) { - $this->_svnRemoveTag($version, $package, $svntag, $packageFile, $options); - } - - // Check if tag already exists - $releaseTag = $path['local']['base'] . 'tags' . DIRECTORY_SEPARATOR . $svntag; - $existsCommand = 'svn ls ' . $path['base'] . 'tags/'; - - $fp = popen($existsCommand, "r"); - $out = ''; - while ($line = fgets($fp, 1024)) { - $out .= rtrim($line)."\n"; - } - pclose($fp); - - if (in_array($svntag . DIRECTORY_SEPARATOR, explode("\n", $out))) { - $this->ui->outputData($this->output, $command); - return $this->raiseError('SVN tag ' . $svntag . ' for ' . $package . ' already exists.'); - } elseif (file_exists($path['local']['base'] . 'tags') === false) { - return $this->raiseError('Can not locate the tags directory at ' . $path['local']['base'] . 'tags'); - } elseif (is_writeable($path['local']['base'] . 'tags') === false) { - return $this->raiseError('Can not write to the tag directory at ' . $path['local']['base'] . 'tags'); - } else { - $makeCommand = 'svn mkdir ' . $releaseTag; - $this->output .= "+ $makeCommand\n"; - if (empty($options['dry-run'])) { - // We need to create the tag dir. - $fp = popen($makeCommand, "r"); - $out = ''; - while ($line = fgets($fp, 1024)) { - $out .= rtrim($line)."\n"; - } - pclose($fp); - $this->output .= "$out\n"; - } - } - - $command = 'svn'; - if (isset($options['quiet'])) { - $command .= ' -q'; - } - - $command .= ' copy --parents '; - - $dir = dirname($packageFile); - $dir = substr($dir, strrpos($dir, DIRECTORY_SEPARATOR) + 1); - $files = array_keys($info->getFilelist()); - if (!in_array(basename($packageFile), $files)) { - $files[] = basename($packageFile); - } - - array_shift($params); - if (count($params)) { - // add in additional files to be tagged (package files and such) - $files = array_merge($files, $params); - } - - $commands = array(); - foreach ($files as $file) { - if (!file_exists($file)) { - $file = $dir . DIRECTORY_SEPARATOR . $file; - } - $commands[] = $command . ' ' . escapeshellarg($file) . ' ' . - escapeshellarg($releaseTag . DIRECTORY_SEPARATOR . $file); - } - - $this->output .= implode("\n", $commands) . "\n"; - if (empty($options['dry-run'])) { - foreach ($commands as $command) { - $fp = popen($command, "r"); - while ($line = fgets($fp, 1024)) { - $this->output .= rtrim($line)."\n"; - } - pclose($fp); - } - } - - $command = 'svn ci -m "Tagging the ' . $version . ' release" ' . $releaseTag . "\n"; - $this->output .= "+ $command\n"; - if (empty($options['dry-run'])) { - $fp = popen($command, "r"); - while ($line = fgets($fp, 1024)) { - $this->output .= rtrim($line)."\n"; - } - pclose($fp); - } - - $this->ui->outputData($this->output, $_cmd); - return true; - } - - function _svnFindPath($file) - { - $xml = ''; - $command = "svn info --xml $file"; - $fp = popen($command, "r"); - while ($line = fgets($fp, 1024)) { - $xml .= rtrim($line)."\n"; - } - pclose($fp); - $url_tag = strpos($xml, ''); - $url = substr($xml, $url_tag + 5, strpos($xml, '', $url_tag + 5) - ($url_tag + 5)); - - $path = array(); - $path['from'] = substr($url, 0, strrpos($url, '/')); - $path['base'] = substr($path['from'], 0, strrpos($path['from'], '/') + 1); - - // Figure out the local paths - see http://pear.php.net/bugs/17463 - $pos = strpos($file, DIRECTORY_SEPARATOR . 'trunk' . DIRECTORY_SEPARATOR); - if ($pos === false) { - $pos = strpos($file, DIRECTORY_SEPARATOR . 'branches' . DIRECTORY_SEPARATOR); - } - $path['local']['base'] = substr($file, 0, $pos + 1); - - return $path; - } - - function _svnRemoveTag($version, $package, $tag, $packageFile, $options) - { - $command = 'svn'; - - if (isset($options['quiet'])) { - $command .= ' -q'; - } - - $command .= ' remove'; - $command .= ' -m "Removing tag for the ' . $version . ' release."'; - - $path = $this->_svnFindPath($packageFile); - $command .= ' ' . $path['base'] . 'tags/' . $tag; - - - if ($this->config->get('verbose') > 1) { - $this->output .= "+ $command\n"; - } - - $this->output .= "+ $command\n"; - if (empty($options['dry-run'])) { - $fp = popen($command, "r"); - while ($line = fgets($fp, 1024)) { - $this->output .= rtrim($line)."\n"; - } - pclose($fp); - } - - $this->ui->outputData($this->output, $command); - return true; - } - - function doCvsTag($command, $options, $params) - { - $this->output = ''; - $_cmd = $command; - if (count($params) < 1) { - $help = $this->getHelp($command); - return $this->raiseError("$command: missing parameter: $help[0]"); - } - - $packageFile = realpath($params[0]); - $obj = &$this->getPackageFile($this->config, $this->_debug); - $info = $obj->fromAnyFile($packageFile, PEAR_VALIDATE_NORMAL); - if (PEAR::isError($info)) { - return $this->raiseError($info); - } - - $err = $warn = array(); - if (!$info->validate()) { - foreach ($info->getValidationWarnings() as $error) { - if ($error['level'] == 'warning') { - $warn[] = $error['message']; - } else { - $err[] = $error['message']; - } - } - } - - if (!$this->_displayValidationResults($err, $warn, true)) { - $this->ui->outputData($this->output, $command); - return $this->raiseError('CVS tag failed'); - } - - $version = $info->getVersion(); - $cvsversion = preg_replace('/[^a-z0-9]/i', '_', $version); - $cvstag = "RELEASE_$cvsversion"; - $files = array_keys($info->getFilelist()); - $command = 'cvs'; - if (isset($options['quiet'])) { - $command .= ' -q'; - } - - if (isset($options['reallyquiet'])) { - $command .= ' -Q'; - } - - $command .= ' tag'; - if (isset($options['slide'])) { - $command .= ' -F'; - } - - if (isset($options['delete'])) { - $command .= ' -d'; - } - - $command .= ' ' . $cvstag . ' ' . escapeshellarg($params[0]); - array_shift($params); - if (count($params)) { - // add in additional files to be tagged - $files = array_merge($files, $params); - } - - $dir = dirname($packageFile); - $dir = substr($dir, strrpos($dir, '/') + 1); - foreach ($files as $file) { - if (!file_exists($file)) { - $file = $dir . DIRECTORY_SEPARATOR . $file; - } - $command .= ' ' . escapeshellarg($file); - } - - if ($this->config->get('verbose') > 1) { - $this->output .= "+ $command\n"; - } - - $this->output .= "+ $command\n"; - if (empty($options['dry-run'])) { - $fp = popen($command, "r"); - while ($line = fgets($fp, 1024)) { - $this->output .= rtrim($line)."\n"; - } - pclose($fp); - } - - $this->ui->outputData($this->output, $_cmd); - return true; - } - - function doCvsDiff($command, $options, $params) - { - $this->output = ''; - if (sizeof($params) < 1) { - $help = $this->getHelp($command); - return $this->raiseError("$command: missing parameter: $help[0]"); - } - - $file = realpath($params[0]); - $obj = &$this->getPackageFile($this->config, $this->_debug); - $info = $obj->fromAnyFile($file, PEAR_VALIDATE_NORMAL); - if (PEAR::isError($info)) { - return $this->raiseError($info); - } - - $err = $warn = array(); - if (!$info->validate()) { - foreach ($info->getValidationWarnings() as $error) { - if ($error['level'] == 'warning') { - $warn[] = $error['message']; - } else { - $err[] = $error['message']; - } - } - } - - if (!$this->_displayValidationResults($err, $warn, true)) { - $this->ui->outputData($this->output, $command); - return $this->raiseError('CVS diff failed'); - } - - $info1 = $info->getFilelist(); - $files = $info1; - $cmd = "cvs"; - if (isset($options['quiet'])) { - $cmd .= ' -q'; - unset($options['quiet']); - } - - if (isset($options['reallyquiet'])) { - $cmd .= ' -Q'; - unset($options['reallyquiet']); - } - - if (isset($options['release'])) { - $cvsversion = preg_replace('/[^a-z0-9]/i', '_', $options['release']); - $cvstag = "RELEASE_$cvsversion"; - $options['revision'] = $cvstag; - unset($options['release']); - } - - $execute = true; - if (isset($options['dry-run'])) { - $execute = false; - unset($options['dry-run']); - } - - $cmd .= ' diff'; - // the rest of the options are passed right on to "cvs diff" - foreach ($options as $option => $optarg) { - $arg = $short = false; - if (isset($this->commands[$command]['options'][$option])) { - $arg = $this->commands[$command]['options'][$option]['arg']; - $short = $this->commands[$command]['options'][$option]['shortopt']; - } - $cmd .= $short ? " -$short" : " --$option"; - if ($arg && $optarg) { - $cmd .= ($short ? '' : '=') . escapeshellarg($optarg); - } - } - - foreach ($files as $file) { - $cmd .= ' ' . escapeshellarg($file['name']); - } - - if ($this->config->get('verbose') > 1) { - $this->output .= "+ $cmd\n"; - } - - if ($execute) { - $fp = popen($cmd, "r"); - while ($line = fgets($fp, 1024)) { - $this->output .= rtrim($line)."\n"; - } - pclose($fp); - } - - $this->ui->outputData($this->output, $command); - return true; - } - - function doPackageDependencies($command, $options, $params) - { - // $params[0] -> the PEAR package to list its information - if (count($params) !== 1) { - return $this->raiseError("bad parameter(s), try \"help $command\""); - } - - $obj = &$this->getPackageFile($this->config, $this->_debug); - if (is_file($params[0]) || strpos($params[0], '.xml') > 0) { - $info = $obj->fromAnyFile($params[0], PEAR_VALIDATE_NORMAL); - } else { - $reg = $this->config->getRegistry(); - $info = $obj->fromArray($reg->packageInfo($params[0])); - } - - if (PEAR::isError($info)) { - return $this->raiseError($info); - } - - $deps = $info->getDeps(); - if (is_array($deps)) { - if ($info->getPackagexmlVersion() == '1.0') { - $data = array( - 'caption' => 'Dependencies for pear/' . $info->getPackage(), - 'border' => true, - 'headline' => array("Required?", "Type", "Name", "Relation", "Version"), - ); - - foreach ($deps as $d) { - if (isset($d['optional'])) { - if ($d['optional'] == 'yes') { - $req = 'No'; - } else { - $req = 'Yes'; - } - } else { - $req = 'Yes'; - } - - if (isset($this->_deps_rel_trans[$d['rel']])) { - $rel = $this->_deps_rel_trans[$d['rel']]; - } else { - $rel = $d['rel']; - } - - if (isset($this->_deps_type_trans[$d['type']])) { - $type = ucfirst($this->_deps_type_trans[$d['type']]); - } else { - $type = $d['type']; - } - - if (isset($d['name'])) { - $name = $d['name']; - } else { - $name = ''; - } - - if (isset($d['version'])) { - $version = $d['version']; - } else { - $version = ''; - } - - $data['data'][] = array($req, $type, $name, $rel, $version); - } - } else { // package.xml 2.0 dependencies display - require_once 'PEAR/Dependency2.php'; - $deps = $info->getDependencies(); - $reg = &$this->config->getRegistry(); - if (is_array($deps)) { - $d = new PEAR_Dependency2($this->config, array(), ''); - $data = array( - 'caption' => 'Dependencies for ' . $info->getPackage(), - 'border' => true, - 'headline' => array("Required?", "Type", "Name", 'Versioning', 'Group'), - ); - foreach ($deps as $type => $subd) { - $req = ($type == 'required') ? 'Yes' : 'No'; - if ($type == 'group') { - $group = $subd['attribs']['name']; - } else { - $group = ''; - } - - if (!isset($subd[0])) { - $subd = array($subd); - } - - foreach ($subd as $groupa) { - foreach ($groupa as $deptype => $depinfo) { - if ($deptype == 'attribs') { - continue; - } - - if ($deptype == 'pearinstaller') { - $deptype = 'pear Installer'; - } - - if (!isset($depinfo[0])) { - $depinfo = array($depinfo); - } - - foreach ($depinfo as $inf) { - $name = ''; - if (isset($inf['channel'])) { - $alias = $reg->channelAlias($inf['channel']); - if (!$alias) { - $alias = '(channel?) ' .$inf['channel']; - } - $name = $alias . '/'; - - } - if (isset($inf['name'])) { - $name .= $inf['name']; - } elseif (isset($inf['pattern'])) { - $name .= $inf['pattern']; - } else { - $name .= ''; - } - - if (isset($inf['uri'])) { - $name .= ' [' . $inf['uri'] . ']'; - } - - if (isset($inf['conflicts'])) { - $ver = 'conflicts'; - } else { - $ver = $d->_getExtraString($inf); - } - - $data['data'][] = array($req, ucfirst($deptype), $name, - $ver, $group); - } - } - } - } - } - } - - $this->ui->outputData($data, $command); - return true; - } - - // Fallback - $this->ui->outputData("This package does not have any dependencies.", $command); - } - - function doSign($command, $options, $params) - { - // should move most of this code into PEAR_Packager - // so it'll be easy to implement "pear package --sign" - if (count($params) !== 1) { - return $this->raiseError("bad parameter(s), try \"help $command\""); - } - - require_once 'System.php'; - require_once 'Archive/Tar.php'; - - if (!file_exists($params[0])) { - return $this->raiseError("file does not exist: $params[0]"); - } - - $obj = $this->getPackageFile($this->config, $this->_debug); - $info = $obj->fromTgzFile($params[0], PEAR_VALIDATE_NORMAL); - if (PEAR::isError($info)) { - return $this->raiseError($info); - } - - $tar = new Archive_Tar($params[0]); - - $tmpdir = $this->config->get('temp_dir'); - $tmpdir = System::mktemp(' -t "' . $tmpdir . '" -d pearsign'); - if (!$tar->extractList('package2.xml package.xml package.sig', $tmpdir)) { - return $this->raiseError("failed to extract tar file"); - } - - if (file_exists("$tmpdir/package.sig")) { - return $this->raiseError("package already signed"); - } - - $packagexml = 'package.xml'; - if (file_exists("$tmpdir/package2.xml")) { - $packagexml = 'package2.xml'; - } - - if (file_exists("$tmpdir/package.sig")) { - unlink("$tmpdir/package.sig"); - } - - if (!file_exists("$tmpdir/$packagexml")) { - return $this->raiseError("Extracted file $tmpdir/$packagexml not found."); - } - - $input = $this->ui->userDialog($command, - array('GnuPG Passphrase'), - array('password')); - if (!isset($input[0])) { - //use empty passphrase - $input[0] = ''; - } - - $devnull = (isset($options['verbose'])) ? '' : ' 2>/dev/null'; - $gpg = popen("gpg --batch --passphrase-fd 0 --armor --detach-sign --output $tmpdir/package.sig $tmpdir/$packagexml" . $devnull, "w"); - if (!$gpg) { - return $this->raiseError("gpg command failed"); - } - - fwrite($gpg, "$input[0]\n"); - if (pclose($gpg) || !file_exists("$tmpdir/package.sig")) { - return $this->raiseError("gpg sign failed"); - } - - if (!$tar->addModify("$tmpdir/package.sig", '', $tmpdir)) { - return $this->raiseError('failed adding signature to file'); - } - - $this->ui->outputData("Package signed.", $command); - return true; - } - - /** - * For unit testing purposes - */ - function &getInstaller(&$ui) - { - if (!class_exists('PEAR_Installer')) { - require_once 'PEAR/Installer.php'; - } - $a = &new PEAR_Installer($ui); - return $a; - } - - /** - * For unit testing purposes - */ - function &getCommandPackaging(&$ui, &$config) - { - if (!class_exists('PEAR_Command_Packaging')) { - if ($fp = @fopen('PEAR/Command/Packaging.php', 'r', true)) { - fclose($fp); - include_once 'PEAR/Command/Packaging.php'; - } - } - - if (class_exists('PEAR_Command_Packaging')) { - $a = &new PEAR_Command_Packaging($ui, $config); - } else { - $a = null; - } - - return $a; - } - - function doMakeRPM($command, $options, $params) - { - - // Check to see if PEAR_Command_Packaging is installed, and - // transparently switch to use the "make-rpm-spec" command from it - // instead, if it does. Otherwise, continue to use the old version - // of "makerpm" supplied with this package (PEAR). - $packaging_cmd = $this->getCommandPackaging($this->ui, $this->config); - if ($packaging_cmd !== null) { - $this->ui->outputData('PEAR_Command_Packaging is installed; using '. - 'newer "make-rpm-spec" command instead'); - return $packaging_cmd->run('make-rpm-spec', $options, $params); - } - - $this->ui->outputData('WARNING: "pear makerpm" is no longer available; an '. - 'improved version is available via "pear make-rpm-spec", which '. - 'is available by installing PEAR_Command_Packaging'); - return true; - } - - function doConvert($command, $options, $params) - { - $packagexml = isset($params[0]) ? $params[0] : 'package.xml'; - $newpackagexml = isset($params[1]) ? $params[1] : dirname($packagexml) . - DIRECTORY_SEPARATOR . 'package2.xml'; - $pkg = &$this->getPackageFile($this->config, $this->_debug); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $pf = $pkg->fromPackageFile($packagexml, PEAR_VALIDATE_NORMAL); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($pf)) { - if (is_array($pf->getUserInfo())) { - foreach ($pf->getUserInfo() as $warning) { - $this->ui->outputData($warning['message']); - } - } - return $this->raiseError($pf); - } - - if (is_a($pf, 'PEAR_PackageFile_v2')) { - $this->ui->outputData($packagexml . ' is already a package.xml version 2.0'); - return true; - } - - $gen = &$pf->getDefaultGenerator(); - $newpf = &$gen->toV2(); - $newpf->setPackagefile($newpackagexml); - $gen = &$newpf->getDefaultGenerator(); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $state = (isset($options['flat']) ? PEAR_VALIDATE_PACKAGING : PEAR_VALIDATE_NORMAL); - $saved = $gen->toPackageFile(dirname($newpackagexml), $state, basename($newpackagexml)); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($saved)) { - if (is_array($saved->getUserInfo())) { - foreach ($saved->getUserInfo() as $warning) { - $this->ui->outputData($warning['message']); - } - } - - $this->ui->outputData($saved->getMessage()); - return true; - } - - $this->ui->outputData('Wrote new version 2.0 package.xml to "' . $saved . '"'); - return true; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Package.xml b/_piecrust/libs/PEAR/Command/Package.xml deleted file mode 100644 index d1aff9d..0000000 --- a/_piecrust/libs/PEAR/Command/Package.xml +++ /dev/null @@ -1,237 +0,0 @@ - - - Build Package - doPackage - p - - - Z - Do not gzip the package file - - - n - Print the name of the packaged file. - - - [descfile] [descfile2] -Creates a PEAR package from its description file (usually called -package.xml). If a second packagefile is passed in, then -the packager will check to make sure that one is a package.xml -version 1.0, and the other is a package.xml version 2.0. The -package.xml version 1.0 will be saved as "package.xml" in the archive, -and the other as "package2.xml" in the archive" - - - - Validate Package Consistency - doPackageValidate - pv - - - - - - Run a "cvs diff" for all files in a package - doCvsDiff - cd - - - q - Be quiet - - - Q - Be really quiet - - - D - Diff against revision of DATE - DATE - - - R - Diff against tag for package release REL - REL - - - r - Diff against revision REV - REV - - - c - Generate context diff - - - u - Generate unified diff - - - i - Ignore case, consider upper- and lower-case letters equivalent - - - b - Ignore changes in amount of white space - - - B - Ignore changes that insert or delete blank lines - - - - Report only whether the files differ, no details - - - n - Don't do anything, just pretend - - - <package.xml> -Compares all the files in a package. Without any options, this -command will compare the current code with the last checked-in code. -Using the -r or -R option you may compare the current code with that -of a specific release. - - - - Set SVN Release Tag - doSvnTag - sv - - - q - Be quiet - - - F - Move (slide) tag if it exists - - - d - Remove tag - - - n - Don't do anything, just pretend - - - <package.xml> [files...] - Sets a SVN tag on all files in a package. Use this command after you have - packaged a distribution tarball with the "package" command to tag what - revisions of what files were in that release. If need to fix something - after running svntag once, but before the tarball is released to the public, - use the "slide" option to move the release tag. - - to include files (such as a second package.xml, or tests not included in the - release), pass them as additional parameters. - - - - Set CVS Release Tag - doCvsTag - ct - - - q - Be quiet - - - Q - Be really quiet - - - F - Move (slide) tag if it exists - - - d - Remove tag - - - n - Don't do anything, just pretend - - - <package.xml> [files...] -Sets a CVS tag on all files in a package. Use this command after you have -packaged a distribution tarball with the "package" command to tag what -revisions of what files were in that release. If need to fix something -after running cvstag once, but before the tarball is released to the public, -use the "slide" option to move the release tag. - -to include files (such as a second package.xml, or tests not included in the -release), pass them as additional parameters. - - - - Show package dependencies - doPackageDependencies - pd - - <package-file> or <package.xml> or <install-package-name> -List all dependencies the package has. -Can take a tgz / tar file, package.xml or a package name of an installed package. - - - Sign a package distribution file - doSign - si - - - v - Display GnuPG output - - - <package-file> -Signs a package distribution (.tar or .tgz) file with GnuPG. - - - Builds an RPM spec file from a PEAR package - doMakeRPM - rpm - - - t - Use FILE as RPM spec file template - FILE - - - p - Use FORMAT as format string for RPM package name, %s is replaced -by the PEAR package name, defaults to "PEAR::%s". - FORMAT - - - <package-file> - -Creates an RPM .spec file for wrapping a PEAR package inside an RPM -package. Intended to be used from the SPECS directory, with the PEAR -package tarball in the SOURCES directory: - -$ pear makerpm ../SOURCES/Net_Socket-1.0.tgz -Wrote RPM spec file PEAR::Net_Geo-1.0.spec -$ rpm -bb PEAR::Net_Socket-1.0.spec -... -Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm - - - - Convert a package.xml 1.0 to package.xml 2.0 format - doConvert - c2 - - - f - do not beautify the filelist. - - - [descfile] [descfile2] -Converts a package.xml in 1.0 format into a package.xml -in 2.0 format. The new file will be named package2.xml by default, -and package.xml will be used as the old file by default. -This is not the most intelligent conversion, and should only be -used for automated conversion or learning the format. - - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Pickle.php b/_piecrust/libs/PEAR/Command/Pickle.php deleted file mode 100644 index 87aa25e..0000000 --- a/_piecrust/libs/PEAR/Command/Pickle.php +++ /dev/null @@ -1,421 +0,0 @@ - - * @copyright 2005-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Pickle.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.1 - */ - -/** - * base class - */ -require_once 'PEAR/Command/Common.php'; - -/** - * PEAR commands for login/logout - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 2005-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.1 - */ - -class PEAR_Command_Pickle extends PEAR_Command_Common -{ - var $commands = array( - 'pickle' => array( - 'summary' => 'Build PECL Package', - 'function' => 'doPackage', - 'shortcut' => 'pi', - 'options' => array( - 'nocompress' => array( - 'shortopt' => 'Z', - 'doc' => 'Do not gzip the package file' - ), - 'showname' => array( - 'shortopt' => 'n', - 'doc' => 'Print the name of the packaged file.', - ), - ), - 'doc' => '[descfile] -Creates a PECL package from its package2.xml file. - -An automatic conversion will be made to a package.xml 1.0 and written out to -disk in the current directory as "package.xml". Note that -only simple package.xml 2.0 will be converted. package.xml 2.0 with: - - - dependency types other than required/optional PECL package/ext/php/pearinstaller - - more than one extsrcrelease or zendextsrcrelease - - zendextbinrelease, extbinrelease, phprelease, or bundle release type - - dependency groups - - ignore tags in release filelist - - tasks other than replace - - custom roles - -will cause pickle to fail, and output an error message. If your package2.xml -uses any of these features, you are best off using PEAR_PackageFileManager to -generate both package.xml. -' - ), - ); - - /** - * PEAR_Command_Package constructor. - * - * @access public - */ - function PEAR_Command_Pickle(&$ui, &$config) - { - parent::PEAR_Command_Common($ui, $config); - } - - /** - * For unit-testing ease - * - * @return PEAR_Packager - */ - function &getPackager() - { - if (!class_exists('PEAR_Packager')) { - require_once 'PEAR/Packager.php'; - } - - $a = &new PEAR_Packager; - return $a; - } - - /** - * For unit-testing ease - * - * @param PEAR_Config $config - * @param bool $debug - * @param string|null $tmpdir - * @return PEAR_PackageFile - */ - function &getPackageFile($config, $debug = false) - { - if (!class_exists('PEAR_Common')) { - require_once 'PEAR/Common.php'; - } - - if (!class_exists('PEAR_PackageFile')) { - require_once 'PEAR/PackageFile.php'; - } - - $a = &new PEAR_PackageFile($config, $debug); - $common = new PEAR_Common; - $common->ui = $this->ui; - $a->setLogger($common); - return $a; - } - - function doPackage($command, $options, $params) - { - $this->output = ''; - $pkginfofile = isset($params[0]) ? $params[0] : 'package2.xml'; - $packager = &$this->getPackager(); - if (PEAR::isError($err = $this->_convertPackage($pkginfofile))) { - return $err; - } - - $compress = empty($options['nocompress']) ? true : false; - $result = $packager->package($pkginfofile, $compress, 'package.xml'); - if (PEAR::isError($result)) { - return $this->raiseError($result); - } - - // Don't want output, only the package file name just created - if (isset($options['showname'])) { - $this->ui->outputData($result, $command); - } - - return true; - } - - function _convertPackage($packagexml) - { - $pkg = &$this->getPackageFile($this->config); - $pf2 = &$pkg->fromPackageFile($packagexml, PEAR_VALIDATE_NORMAL); - if (!is_a($pf2, 'PEAR_PackageFile_v2')) { - return $this->raiseError('Cannot process "' . - $packagexml . '", is not a package.xml 2.0'); - } - - require_once 'PEAR/PackageFile/v1.php'; - $pf = new PEAR_PackageFile_v1; - $pf->setConfig($this->config); - if ($pf2->getPackageType() != 'extsrc' && $pf2->getPackageType() != 'zendextsrc') { - return $this->raiseError('Cannot safely convert "' . $packagexml . - '", is not an extension source package. Using a PEAR_PackageFileManager-based ' . - 'script is an option'); - } - - if (is_array($pf2->getUsesRole())) { - return $this->raiseError('Cannot safely convert "' . $packagexml . - '", contains custom roles. Using a PEAR_PackageFileManager-based script or ' . - 'the convert command is an option'); - } - - if (is_array($pf2->getUsesTask())) { - return $this->raiseError('Cannot safely convert "' . $packagexml . - '", contains custom tasks. Using a PEAR_PackageFileManager-based script or ' . - 'the convert command is an option'); - } - - $deps = $pf2->getDependencies(); - if (isset($deps['group'])) { - return $this->raiseError('Cannot safely convert "' . $packagexml . - '", contains dependency groups. Using a PEAR_PackageFileManager-based script ' . - 'or the convert command is an option'); - } - - if (isset($deps['required']['subpackage']) || - isset($deps['optional']['subpackage'])) { - return $this->raiseError('Cannot safely convert "' . $packagexml . - '", contains subpackage dependencies. Using a PEAR_PackageFileManager-based '. - 'script is an option'); - } - - if (isset($deps['required']['os'])) { - return $this->raiseError('Cannot safely convert "' . $packagexml . - '", contains os dependencies. Using a PEAR_PackageFileManager-based '. - 'script is an option'); - } - - if (isset($deps['required']['arch'])) { - return $this->raiseError('Cannot safely convert "' . $packagexml . - '", contains arch dependencies. Using a PEAR_PackageFileManager-based '. - 'script is an option'); - } - - $pf->setPackage($pf2->getPackage()); - $pf->setSummary($pf2->getSummary()); - $pf->setDescription($pf2->getDescription()); - foreach ($pf2->getMaintainers() as $maintainer) { - $pf->addMaintainer($maintainer['role'], $maintainer['handle'], - $maintainer['name'], $maintainer['email']); - } - - $pf->setVersion($pf2->getVersion()); - $pf->setDate($pf2->getDate()); - $pf->setLicense($pf2->getLicense()); - $pf->setState($pf2->getState()); - $pf->setNotes($pf2->getNotes()); - $pf->addPhpDep($deps['required']['php']['min'], 'ge'); - if (isset($deps['required']['php']['max'])) { - $pf->addPhpDep($deps['required']['php']['max'], 'le'); - } - - if (isset($deps['required']['package'])) { - if (!isset($deps['required']['package'][0])) { - $deps['required']['package'] = array($deps['required']['package']); - } - - foreach ($deps['required']['package'] as $dep) { - if (!isset($dep['channel'])) { - return $this->raiseError('Cannot safely convert "' . $packagexml . '"' . - ' contains uri-based dependency on a package. Using a ' . - 'PEAR_PackageFileManager-based script is an option'); - } - - if ($dep['channel'] != 'pear.php.net' - && $dep['channel'] != 'pecl.php.net' - && $dep['channel'] != 'doc.php.net') { - return $this->raiseError('Cannot safely convert "' . $packagexml . '"' . - ' contains dependency on a non-standard channel package. Using a ' . - 'PEAR_PackageFileManager-based script is an option'); - } - - if (isset($dep['conflicts'])) { - return $this->raiseError('Cannot safely convert "' . $packagexml . '"' . - ' contains conflicts dependency. Using a ' . - 'PEAR_PackageFileManager-based script is an option'); - } - - if (isset($dep['exclude'])) { - $this->ui->outputData('WARNING: exclude tags are ignored in conversion'); - } - - if (isset($dep['min'])) { - $pf->addPackageDep($dep['name'], $dep['min'], 'ge'); - } - - if (isset($dep['max'])) { - $pf->addPackageDep($dep['name'], $dep['max'], 'le'); - } - } - } - - if (isset($deps['required']['extension'])) { - if (!isset($deps['required']['extension'][0])) { - $deps['required']['extension'] = array($deps['required']['extension']); - } - - foreach ($deps['required']['extension'] as $dep) { - if (isset($dep['conflicts'])) { - return $this->raiseError('Cannot safely convert "' . $packagexml . '"' . - ' contains conflicts dependency. Using a ' . - 'PEAR_PackageFileManager-based script is an option'); - } - - if (isset($dep['exclude'])) { - $this->ui->outputData('WARNING: exclude tags are ignored in conversion'); - } - - if (isset($dep['min'])) { - $pf->addExtensionDep($dep['name'], $dep['min'], 'ge'); - } - - if (isset($dep['max'])) { - $pf->addExtensionDep($dep['name'], $dep['max'], 'le'); - } - } - } - - if (isset($deps['optional']['package'])) { - if (!isset($deps['optional']['package'][0])) { - $deps['optional']['package'] = array($deps['optional']['package']); - } - - foreach ($deps['optional']['package'] as $dep) { - if (!isset($dep['channel'])) { - return $this->raiseError('Cannot safely convert "' . $packagexml . '"' . - ' contains uri-based dependency on a package. Using a ' . - 'PEAR_PackageFileManager-based script is an option'); - } - - if ($dep['channel'] != 'pear.php.net' - && $dep['channel'] != 'pecl.php.net' - && $dep['channel'] != 'doc.php.net') { - return $this->raiseError('Cannot safely convert "' . $packagexml . '"' . - ' contains dependency on a non-standard channel package. Using a ' . - 'PEAR_PackageFileManager-based script is an option'); - } - - if (isset($dep['exclude'])) { - $this->ui->outputData('WARNING: exclude tags are ignored in conversion'); - } - - if (isset($dep['min'])) { - $pf->addPackageDep($dep['name'], $dep['min'], 'ge', 'yes'); - } - - if (isset($dep['max'])) { - $pf->addPackageDep($dep['name'], $dep['max'], 'le', 'yes'); - } - } - } - - if (isset($deps['optional']['extension'])) { - if (!isset($deps['optional']['extension'][0])) { - $deps['optional']['extension'] = array($deps['optional']['extension']); - } - - foreach ($deps['optional']['extension'] as $dep) { - if (isset($dep['exclude'])) { - $this->ui->outputData('WARNING: exclude tags are ignored in conversion'); - } - - if (isset($dep['min'])) { - $pf->addExtensionDep($dep['name'], $dep['min'], 'ge', 'yes'); - } - - if (isset($dep['max'])) { - $pf->addExtensionDep($dep['name'], $dep['max'], 'le', 'yes'); - } - } - } - - $contents = $pf2->getContents(); - $release = $pf2->getReleases(); - if (isset($releases[0])) { - return $this->raiseError('Cannot safely process "' . $packagexml . '" contains ' - . 'multiple extsrcrelease/zendextsrcrelease tags. Using a PEAR_PackageFileManager-based script ' . - 'or the convert command is an option'); - } - - if ($configoptions = $pf2->getConfigureOptions()) { - foreach ($configoptions as $option) { - $default = isset($option['default']) ? $option['default'] : false; - $pf->addConfigureOption($option['name'], $option['prompt'], $default); - } - } - - if (isset($release['filelist']['ignore'])) { - return $this->raiseError('Cannot safely process "' . $packagexml . '" contains ' - . 'ignore tags. Using a PEAR_PackageFileManager-based script or the convert' . - ' command is an option'); - } - - if (isset($release['filelist']['install']) && - !isset($release['filelist']['install'][0])) { - $release['filelist']['install'] = array($release['filelist']['install']); - } - - if (isset($contents['dir']['attribs']['baseinstalldir'])) { - $baseinstalldir = $contents['dir']['attribs']['baseinstalldir']; - } else { - $baseinstalldir = false; - } - - if (!isset($contents['dir']['file'][0])) { - $contents['dir']['file'] = array($contents['dir']['file']); - } - - foreach ($contents['dir']['file'] as $file) { - if ($baseinstalldir && !isset($file['attribs']['baseinstalldir'])) { - $file['attribs']['baseinstalldir'] = $baseinstalldir; - } - - $processFile = $file; - unset($processFile['attribs']); - if (count($processFile)) { - foreach ($processFile as $name => $task) { - if ($name != $pf2->getTasksNs() . ':replace') { - return $this->raiseError('Cannot safely process "' . $packagexml . - '" contains tasks other than replace. Using a ' . - 'PEAR_PackageFileManager-based script is an option.'); - } - $file['attribs']['replace'][] = $task; - } - } - - if (!in_array($file['attribs']['role'], PEAR_Common::getFileRoles())) { - return $this->raiseError('Cannot safely convert "' . $packagexml . - '", contains custom roles. Using a PEAR_PackageFileManager-based script ' . - 'or the convert command is an option'); - } - - if (isset($release['filelist']['install'])) { - foreach ($release['filelist']['install'] as $installas) { - if ($installas['attribs']['name'] == $file['attribs']['name']) { - $file['attribs']['install-as'] = $installas['attribs']['as']; - } - } - } - - $pf->addFile('/', $file['attribs']['name'], $file['attribs']); - } - - if ($pf2->getChangeLog()) { - $this->ui->outputData('WARNING: changelog is not translated to package.xml ' . - '1.0, use PEAR_PackageFileManager-based script if you need changelog-' . - 'translation for package.xml 1.0'); - } - - $gen = &$pf->getDefaultGenerator(); - $gen->toPackageFile('.'); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Pickle.xml b/_piecrust/libs/PEAR/Command/Pickle.xml deleted file mode 100644 index 721ecea..0000000 --- a/_piecrust/libs/PEAR/Command/Pickle.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - Build PECL Package - doPackage - pi - - - Z - Do not gzip the package file - - - n - Print the name of the packaged file. - - - [descfile] -Creates a PECL package from its package2.xml file. - -An automatic conversion will be made to a package.xml 1.0 and written out to -disk in the current directory as "package.xml". Note that -only simple package.xml 2.0 will be converted. package.xml 2.0 with: - - - dependency types other than required/optional PECL package/ext/php/pearinstaller - - more than one extsrcrelease or zendextsrcrelease - - zendextbinrelease, extbinrelease, phprelease, or bundle release type - - dependency groups - - ignore tags in release filelist - - tasks other than replace - - custom roles - -will cause pickle to fail, and output an error message. If your package2.xml -uses any of these features, you are best off using PEAR_PackageFileManager to -generate both package.xml. - - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Registry.php b/_piecrust/libs/PEAR/Command/Registry.php deleted file mode 100644 index 4304db5..0000000 --- a/_piecrust/libs/PEAR/Command/Registry.php +++ /dev/null @@ -1,1145 +0,0 @@ - - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Registry.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/** - * base class - */ -require_once 'PEAR/Command/Common.php'; - -/** - * PEAR commands for registry manipulation - * - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ -class PEAR_Command_Registry extends PEAR_Command_Common -{ - var $commands = array( - 'list' => array( - 'summary' => 'List Installed Packages In The Default Channel', - 'function' => 'doList', - 'shortcut' => 'l', - 'options' => array( - 'channel' => array( - 'shortopt' => 'c', - 'doc' => 'list installed packages from this channel', - 'arg' => 'CHAN', - ), - 'allchannels' => array( - 'shortopt' => 'a', - 'doc' => 'list installed packages from all channels', - ), - 'channelinfo' => array( - 'shortopt' => 'i', - 'doc' => 'output fully channel-aware data, even on failure', - ), - ), - 'doc' => ' -If invoked without parameters, this command lists the PEAR packages -installed in your php_dir ({config php_dir}). With a parameter, it -lists the files in a package. -', - ), - 'list-files' => array( - 'summary' => 'List Files In Installed Package', - 'function' => 'doFileList', - 'shortcut' => 'fl', - 'options' => array(), - 'doc' => ' -List the files in an installed package. -' - ), - 'shell-test' => array( - 'summary' => 'Shell Script Test', - 'function' => 'doShellTest', - 'shortcut' => 'st', - 'options' => array(), - 'doc' => ' [[relation] version] -Tests if a package is installed in the system. Will exit(1) if it is not. - The version comparison operator. One of: - <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne - The version to compare with -'), - 'info' => array( - 'summary' => 'Display information about a package', - 'function' => 'doInfo', - 'shortcut' => 'in', - 'options' => array(), - 'doc' => ' -Displays information about a package. The package argument may be a -local package file, an URL to a package file, or the name of an -installed package.' - ) - ); - - /** - * PEAR_Command_Registry constructor. - * - * @access public - */ - function PEAR_Command_Registry(&$ui, &$config) - { - parent::PEAR_Command_Common($ui, $config); - } - - function _sortinfo($a, $b) - { - $apackage = isset($a['package']) ? $a['package'] : $a['name']; - $bpackage = isset($b['package']) ? $b['package'] : $b['name']; - return strcmp($apackage, $bpackage); - } - - function doList($command, $options, $params) - { - $reg = &$this->config->getRegistry(); - $channelinfo = isset($options['channelinfo']); - if (isset($options['allchannels']) && !$channelinfo) { - return $this->doListAll($command, array(), $params); - } - - if (isset($options['allchannels']) && $channelinfo) { - // allchannels with $channelinfo - unset($options['allchannels']); - $channels = $reg->getChannels(); - $errors = array(); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - foreach ($channels as $channel) { - $options['channel'] = $channel->getName(); - $ret = $this->doList($command, $options, $params); - - if (PEAR::isError($ret)) { - $errors[] = $ret; - } - } - - PEAR::staticPopErrorHandling(); - if (count($errors)) { - // for now, only give first error - return PEAR::raiseError($errors[0]); - } - - return true; - } - - if (count($params) === 1) { - return $this->doFileList($command, $options, $params); - } - - if (isset($options['channel'])) { - if (!$reg->channelExists($options['channel'])) { - return $this->raiseError('Channel "' . $options['channel'] .'" does not exist'); - } - - $channel = $reg->channelName($options['channel']); - } else { - $channel = $this->config->get('default_channel'); - } - - $installed = $reg->packageInfo(null, null, $channel); - usort($installed, array(&$this, '_sortinfo')); - - $data = array( - 'caption' => 'Installed packages, channel ' . - $channel . ':', - 'border' => true, - 'headline' => array('Package', 'Version', 'State'), - 'channel' => $channel, - ); - if ($channelinfo) { - $data['headline'] = array('Channel', 'Package', 'Version', 'State'); - } - - if (count($installed) && !isset($data['data'])) { - $data['data'] = array(); - } - - foreach ($installed as $package) { - $pobj = $reg->getPackage(isset($package['package']) ? - $package['package'] : $package['name'], $channel); - if ($channelinfo) { - $packageinfo = array($pobj->getChannel(), $pobj->getPackage(), $pobj->getVersion(), - $pobj->getState() ? $pobj->getState() : null); - } else { - $packageinfo = array($pobj->getPackage(), $pobj->getVersion(), - $pobj->getState() ? $pobj->getState() : null); - } - $data['data'][] = $packageinfo; - } - - if (count($installed) === 0) { - if (!$channelinfo) { - $data = '(no packages installed from channel ' . $channel . ')'; - } else { - $data = array( - 'caption' => 'Installed packages, channel ' . - $channel . ':', - 'border' => true, - 'channel' => $channel, - 'data' => array(array('(no packages installed)')), - ); - } - } - - $this->ui->outputData($data, $command); - return true; - } - - function doListAll($command, $options, $params) - { - // This duplicate code is deprecated over - // list --channelinfo, which gives identical - // output for list and list --allchannels. - $reg = &$this->config->getRegistry(); - $installed = $reg->packageInfo(null, null, null); - foreach ($installed as $channel => $packages) { - usort($packages, array($this, '_sortinfo')); - $data = array( - 'caption' => 'Installed packages, channel ' . $channel . ':', - 'border' => true, - 'headline' => array('Package', 'Version', 'State'), - 'channel' => $channel - ); - - foreach ($packages as $package) { - $p = isset($package['package']) ? $package['package'] : $package['name']; - $pobj = $reg->getPackage($p, $channel); - $data['data'][] = array($pobj->getPackage(), $pobj->getVersion(), - $pobj->getState() ? $pobj->getState() : null); - } - - // Adds a blank line after each section - $data['data'][] = array(); - - if (count($packages) === 0) { - $data = array( - 'caption' => 'Installed packages, channel ' . $channel . ':', - 'border' => true, - 'data' => array(array('(no packages installed)'), array()), - 'channel' => $channel - ); - } - $this->ui->outputData($data, $command); - } - return true; - } - - function doFileList($command, $options, $params) - { - if (count($params) !== 1) { - return $this->raiseError('list-files expects 1 parameter'); - } - - $reg = &$this->config->getRegistry(); - $fp = false; - if (!is_dir($params[0]) && (file_exists($params[0]) || $fp = @fopen($params[0], 'r'))) { - if ($fp) { - fclose($fp); - } - - if (!class_exists('PEAR_PackageFile')) { - require_once 'PEAR/PackageFile.php'; - } - - $pkg = &new PEAR_PackageFile($this->config, $this->_debug); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $info = &$pkg->fromAnyFile($params[0], PEAR_VALIDATE_NORMAL); - PEAR::staticPopErrorHandling(); - $headings = array('Package File', 'Install Path'); - $installed = false; - } else { - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $parsed = $reg->parsePackageName($params[0], $this->config->get('default_channel')); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($parsed)) { - return $this->raiseError($parsed); - } - - $info = &$reg->getPackage($parsed['package'], $parsed['channel']); - $headings = array('Type', 'Install Path'); - $installed = true; - } - - if (PEAR::isError($info)) { - return $this->raiseError($info); - } - - if ($info === null) { - return $this->raiseError("`$params[0]' not installed"); - } - - $list = ($info->getPackagexmlVersion() == '1.0' || $installed) ? - $info->getFilelist() : $info->getContents(); - if ($installed) { - $caption = 'Installed Files For ' . $params[0]; - } else { - $caption = 'Contents of ' . basename($params[0]); - } - - $data = array( - 'caption' => $caption, - 'border' => true, - 'headline' => $headings); - if ($info->getPackagexmlVersion() == '1.0' || $installed) { - foreach ($list as $file => $att) { - if ($installed) { - if (empty($att['installed_as'])) { - continue; - } - $data['data'][] = array($att['role'], $att['installed_as']); - } else { - if (isset($att['baseinstalldir']) && !in_array($att['role'], - array('test', 'data', 'doc'))) { - $dest = $att['baseinstalldir'] . DIRECTORY_SEPARATOR . - $file; - } else { - $dest = $file; - } - switch ($att['role']) { - case 'test': - case 'data': - case 'doc': - $role = $att['role']; - if ($role == 'test') { - $role .= 's'; - } - $dest = $this->config->get($role . '_dir') . DIRECTORY_SEPARATOR . - $info->getPackage() . DIRECTORY_SEPARATOR . $dest; - break; - case 'php': - default: - $dest = $this->config->get('php_dir') . DIRECTORY_SEPARATOR . - $dest; - } - $ds2 = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR; - $dest = preg_replace(array('!\\\\+!', '!/!', "!$ds2+!"), - array(DIRECTORY_SEPARATOR, - DIRECTORY_SEPARATOR, - DIRECTORY_SEPARATOR), - $dest); - $file = preg_replace('!/+!', '/', $file); - $data['data'][] = array($file, $dest); - } - } - } else { // package.xml 2.0, not installed - if (!isset($list['dir']['file'][0])) { - $list['dir']['file'] = array($list['dir']['file']); - } - - foreach ($list['dir']['file'] as $att) { - $att = $att['attribs']; - $file = $att['name']; - $role = &PEAR_Installer_Role::factory($info, $att['role'], $this->config); - $role->setup($this, $info, $att, $file); - if (!$role->isInstallable()) { - $dest = '(not installable)'; - } else { - $dest = $role->processInstallation($info, $att, $file, ''); - if (PEAR::isError($dest)) { - $dest = '(Unknown role "' . $att['role'] . ')'; - } else { - list(,, $dest) = $dest; - } - } - $data['data'][] = array($file, $dest); - } - } - - $this->ui->outputData($data, $command); - return true; - } - - function doShellTest($command, $options, $params) - { - if (count($params) < 1) { - return PEAR::raiseError('ERROR, usage: pear shell-test packagename [[relation] version]'); - } - - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $reg = &$this->config->getRegistry(); - $info = $reg->parsePackageName($params[0], $this->config->get('default_channel')); - if (PEAR::isError($info)) { - exit(1); // invalid package name - } - - $package = $info['package']; - $channel = $info['channel']; - // "pear shell-test Foo" - if (!$reg->packageExists($package, $channel)) { - if ($channel == 'pecl.php.net') { - if ($reg->packageExists($package, 'pear.php.net')) { - $channel = 'pear.php.net'; // magically change channels for extensions - } - } - } - - if (count($params) === 1) { - if (!$reg->packageExists($package, $channel)) { - exit(1); - } - // "pear shell-test Foo 1.0" - } elseif (count($params) === 2) { - $v = $reg->packageInfo($package, 'version', $channel); - if (!$v || !version_compare("$v", "{$params[1]}", "ge")) { - exit(1); - } - // "pear shell-test Foo ge 1.0" - } elseif (count($params) === 3) { - $v = $reg->packageInfo($package, 'version', $channel); - if (!$v || !version_compare("$v", "{$params[2]}", $params[1])) { - exit(1); - } - } else { - PEAR::staticPopErrorHandling(); - $this->raiseError("$command: expects 1 to 3 parameters"); - exit(1); - } - } - - function doInfo($command, $options, $params) - { - if (count($params) !== 1) { - return $this->raiseError('pear info expects 1 parameter'); - } - - $info = $fp = false; - $reg = &$this->config->getRegistry(); - if (is_file($params[0]) && !is_dir($params[0]) && - (file_exists($params[0]) || $fp = @fopen($params[0], 'r')) - ) { - if ($fp) { - fclose($fp); - } - - if (!class_exists('PEAR_PackageFile')) { - require_once 'PEAR/PackageFile.php'; - } - - $pkg = &new PEAR_PackageFile($this->config, $this->_debug); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $obj = &$pkg->fromAnyFile($params[0], PEAR_VALIDATE_NORMAL); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($obj)) { - $uinfo = $obj->getUserInfo(); - if (is_array($uinfo)) { - foreach ($uinfo as $message) { - if (is_array($message)) { - $message = $message['message']; - } - $this->ui->outputData($message); - } - } - - return $this->raiseError($obj); - } - - if ($obj->getPackagexmlVersion() != '1.0') { - return $this->_doInfo2($command, $options, $params, $obj, false); - } - - $info = $obj->toArray(); - } else { - $parsed = $reg->parsePackageName($params[0], $this->config->get('default_channel')); - if (PEAR::isError($parsed)) { - return $this->raiseError($parsed); - } - - $package = $parsed['package']; - $channel = $parsed['channel']; - $info = $reg->packageInfo($package, null, $channel); - if (isset($info['old'])) { - $obj = $reg->getPackage($package, $channel); - return $this->_doInfo2($command, $options, $params, $obj, true); - } - } - - if (PEAR::isError($info)) { - return $info; - } - - if (empty($info)) { - $this->raiseError("No information found for `$params[0]'"); - return; - } - - unset($info['filelist']); - unset($info['dirtree']); - unset($info['changelog']); - if (isset($info['xsdversion'])) { - $info['package.xml version'] = $info['xsdversion']; - unset($info['xsdversion']); - } - - if (isset($info['packagerversion'])) { - $info['packaged with PEAR version'] = $info['packagerversion']; - unset($info['packagerversion']); - } - - $keys = array_keys($info); - $longtext = array('description', 'summary'); - foreach ($keys as $key) { - if (is_array($info[$key])) { - switch ($key) { - case 'maintainers': { - $i = 0; - $mstr = ''; - foreach ($info[$key] as $m) { - if ($i++ > 0) { - $mstr .= "\n"; - } - $mstr .= $m['name'] . " <"; - if (isset($m['email'])) { - $mstr .= $m['email']; - } else { - $mstr .= $m['handle'] . '@php.net'; - } - $mstr .= "> ($m[role])"; - } - $info[$key] = $mstr; - break; - } - case 'release_deps': { - $i = 0; - $dstr = ''; - foreach ($info[$key] as $d) { - if (isset($this->_deps_rel_trans[$d['rel']])) { - $rel = $this->_deps_rel_trans[$d['rel']]; - } else { - $rel = $d['rel']; - } - if (isset($this->_deps_type_trans[$d['type']])) { - $type = ucfirst($this->_deps_type_trans[$d['type']]); - } else { - $type = $d['type']; - } - if (isset($d['name'])) { - $name = $d['name'] . ' '; - } else { - $name = ''; - } - if (isset($d['version'])) { - $version = $d['version'] . ' '; - } else { - $version = ''; - } - if (isset($d['optional']) && $d['optional'] == 'yes') { - $optional = ' (optional)'; - } else { - $optional = ''; - } - $dstr .= "$type $name$rel $version$optional\n"; - } - $info[$key] = $dstr; - break; - } - case 'provides' : { - $debug = $this->config->get('verbose'); - if ($debug < 2) { - $pstr = 'Classes: '; - } else { - $pstr = ''; - } - $i = 0; - foreach ($info[$key] as $p) { - if ($debug < 2 && $p['type'] != "class") { - continue; - } - // Only print classes when verbosity mode is < 2 - if ($debug < 2) { - if ($i++ > 0) { - $pstr .= ", "; - } - $pstr .= $p['name']; - } else { - if ($i++ > 0) { - $pstr .= "\n"; - } - $pstr .= ucfirst($p['type']) . " " . $p['name']; - if (isset($p['explicit']) && $p['explicit'] == 1) { - $pstr .= " (explicit)"; - } - } - } - $info[$key] = $pstr; - break; - } - case 'configure_options' : { - foreach ($info[$key] as $i => $p) { - $info[$key][$i] = array_map(null, array_keys($p), array_values($p)); - $info[$key][$i] = array_map(create_function('$a', - 'return join(" = ",$a);'), $info[$key][$i]); - $info[$key][$i] = implode(', ', $info[$key][$i]); - } - $info[$key] = implode("\n", $info[$key]); - break; - } - default: { - $info[$key] = implode(", ", $info[$key]); - break; - } - } - } - - if ($key == '_lastmodified') { - $hdate = date('Y-m-d', $info[$key]); - unset($info[$key]); - $info['Last Modified'] = $hdate; - } elseif ($key == '_lastversion') { - $info['Previous Installed Version'] = $info[$key] ? $info[$key] : '- None -'; - unset($info[$key]); - } else { - $info[$key] = trim($info[$key]); - if (in_array($key, $longtext)) { - $info[$key] = preg_replace('/ +/', ' ', $info[$key]); - } - } - } - - $caption = 'About ' . $info['package'] . '-' . $info['version']; - $data = array( - 'caption' => $caption, - 'border' => true); - foreach ($info as $key => $value) { - $key = ucwords(trim(str_replace('_', ' ', $key))); - $data['data'][] = array($key, $value); - } - $data['raw'] = $info; - - $this->ui->outputData($data, 'package-info'); - } - - /** - * @access private - */ - function _doInfo2($command, $options, $params, &$obj, $installed) - { - $reg = &$this->config->getRegistry(); - $caption = 'About ' . $obj->getChannel() . '/' .$obj->getPackage() . '-' . - $obj->getVersion(); - $data = array( - 'caption' => $caption, - 'border' => true); - switch ($obj->getPackageType()) { - case 'php' : - $release = 'PEAR-style PHP-based Package'; - break; - case 'extsrc' : - $release = 'PECL-style PHP extension (source code)'; - break; - case 'zendextsrc' : - $release = 'PECL-style Zend extension (source code)'; - break; - case 'extbin' : - $release = 'PECL-style PHP extension (binary)'; - break; - case 'zendextbin' : - $release = 'PECL-style Zend extension (binary)'; - break; - case 'bundle' : - $release = 'Package bundle (collection of packages)'; - break; - } - $extends = $obj->getExtends(); - $extends = $extends ? - $obj->getPackage() . ' (extends ' . $extends . ')' : $obj->getPackage(); - if ($src = $obj->getSourcePackage()) { - $extends .= ' (source package ' . $src['channel'] . '/' . $src['package'] . ')'; - } - - $info = array( - 'Release Type' => $release, - 'Name' => $extends, - 'Channel' => $obj->getChannel(), - 'Summary' => preg_replace('/ +/', ' ', $obj->getSummary()), - 'Description' => preg_replace('/ +/', ' ', $obj->getDescription()), - ); - $info['Maintainers'] = ''; - foreach (array('lead', 'developer', 'contributor', 'helper') as $role) { - $leads = $obj->{"get{$role}s"}(); - if (!$leads) { - continue; - } - - if (isset($leads['active'])) { - $leads = array($leads); - } - - foreach ($leads as $lead) { - if (!empty($info['Maintainers'])) { - $info['Maintainers'] .= "\n"; - } - - $active = $lead['active'] == 'no' ? ', inactive' : ''; - $info['Maintainers'] .= $lead['name'] . ' <'; - $info['Maintainers'] .= $lead['email'] . "> ($role$active)"; - } - } - - $info['Release Date'] = $obj->getDate(); - if ($time = $obj->getTime()) { - $info['Release Date'] .= ' ' . $time; - } - - $info['Release Version'] = $obj->getVersion() . ' (' . $obj->getState() . ')'; - $info['API Version'] = $obj->getVersion('api') . ' (' . $obj->getState('api') . ')'; - $info['License'] = $obj->getLicense(); - $uri = $obj->getLicenseLocation(); - if ($uri) { - if (isset($uri['uri'])) { - $info['License'] .= ' (' . $uri['uri'] . ')'; - } else { - $extra = $obj->getInstalledLocation($info['filesource']); - if ($extra) { - $info['License'] .= ' (' . $uri['filesource'] . ')'; - } - } - } - - $info['Release Notes'] = $obj->getNotes(); - if ($compat = $obj->getCompatible()) { - if (!isset($compat[0])) { - $compat = array($compat); - } - - $info['Compatible with'] = ''; - foreach ($compat as $package) { - $info['Compatible with'] .= $package['channel'] . '/' . $package['name'] . - "\nVersions >= " . $package['min'] . ', <= ' . $package['max']; - if (isset($package['exclude'])) { - if (is_array($package['exclude'])) { - $package['exclude'] = implode(', ', $package['exclude']); - } - - if (!isset($info['Not Compatible with'])) { - $info['Not Compatible with'] = ''; - } else { - $info['Not Compatible with'] .= "\n"; - } - $info['Not Compatible with'] .= $package['channel'] . '/' . - $package['name'] . "\nVersions " . $package['exclude']; - } - } - } - - $usesrole = $obj->getUsesrole(); - if ($usesrole) { - if (!isset($usesrole[0])) { - $usesrole = array($usesrole); - } - - foreach ($usesrole as $roledata) { - if (isset($info['Uses Custom Roles'])) { - $info['Uses Custom Roles'] .= "\n"; - } else { - $info['Uses Custom Roles'] = ''; - } - - if (isset($roledata['package'])) { - $rolepackage = $reg->parsedPackageNameToString($roledata, true); - } else { - $rolepackage = $roledata['uri']; - } - $info['Uses Custom Roles'] .= $roledata['role'] . ' (' . $rolepackage . ')'; - } - } - - $usestask = $obj->getUsestask(); - if ($usestask) { - if (!isset($usestask[0])) { - $usestask = array($usestask); - } - - foreach ($usestask as $taskdata) { - if (isset($info['Uses Custom Tasks'])) { - $info['Uses Custom Tasks'] .= "\n"; - } else { - $info['Uses Custom Tasks'] = ''; - } - - if (isset($taskdata['package'])) { - $taskpackage = $reg->parsedPackageNameToString($taskdata, true); - } else { - $taskpackage = $taskdata['uri']; - } - $info['Uses Custom Tasks'] .= $taskdata['task'] . ' (' . $taskpackage . ')'; - } - } - - $deps = $obj->getDependencies(); - $info['Required Dependencies'] = 'PHP version ' . $deps['required']['php']['min']; - if (isset($deps['required']['php']['max'])) { - $info['Required Dependencies'] .= '-' . $deps['required']['php']['max'] . "\n"; - } else { - $info['Required Dependencies'] .= "\n"; - } - - if (isset($deps['required']['php']['exclude'])) { - if (!isset($info['Not Compatible with'])) { - $info['Not Compatible with'] = ''; - } else { - $info['Not Compatible with'] .= "\n"; - } - - if (is_array($deps['required']['php']['exclude'])) { - $deps['required']['php']['exclude'] = - implode(', ', $deps['required']['php']['exclude']); - } - $info['Not Compatible with'] .= "PHP versions\n " . - $deps['required']['php']['exclude']; - } - - $info['Required Dependencies'] .= 'PEAR installer version'; - if (isset($deps['required']['pearinstaller']['max'])) { - $info['Required Dependencies'] .= 's ' . - $deps['required']['pearinstaller']['min'] . '-' . - $deps['required']['pearinstaller']['max']; - } else { - $info['Required Dependencies'] .= ' ' . - $deps['required']['pearinstaller']['min'] . ' or newer'; - } - - if (isset($deps['required']['pearinstaller']['exclude'])) { - if (!isset($info['Not Compatible with'])) { - $info['Not Compatible with'] = ''; - } else { - $info['Not Compatible with'] .= "\n"; - } - - if (is_array($deps['required']['pearinstaller']['exclude'])) { - $deps['required']['pearinstaller']['exclude'] = - implode(', ', $deps['required']['pearinstaller']['exclude']); - } - $info['Not Compatible with'] .= "PEAR installer\n Versions " . - $deps['required']['pearinstaller']['exclude']; - } - - foreach (array('Package', 'Extension') as $type) { - $index = strtolower($type); - if (isset($deps['required'][$index])) { - if (isset($deps['required'][$index]['name'])) { - $deps['required'][$index] = array($deps['required'][$index]); - } - - foreach ($deps['required'][$index] as $package) { - if (isset($package['conflicts'])) { - $infoindex = 'Not Compatible with'; - if (!isset($info['Not Compatible with'])) { - $info['Not Compatible with'] = ''; - } else { - $info['Not Compatible with'] .= "\n"; - } - } else { - $infoindex = 'Required Dependencies'; - $info[$infoindex] .= "\n"; - } - - if ($index == 'extension') { - $name = $package['name']; - } else { - if (isset($package['channel'])) { - $name = $package['channel'] . '/' . $package['name']; - } else { - $name = '__uri/' . $package['name'] . ' (static URI)'; - } - } - - $info[$infoindex] .= "$type $name"; - if (isset($package['uri'])) { - $info[$infoindex] .= "\n Download URI: $package[uri]"; - continue; - } - - if (isset($package['max']) && isset($package['min'])) { - $info[$infoindex] .= " \n Versions " . - $package['min'] . '-' . $package['max']; - } elseif (isset($package['min'])) { - $info[$infoindex] .= " \n Version " . - $package['min'] . ' or newer'; - } elseif (isset($package['max'])) { - $info[$infoindex] .= " \n Version " . - $package['max'] . ' or older'; - } - - if (isset($package['recommended'])) { - $info[$infoindex] .= "\n Recommended version: $package[recommended]"; - } - - if (isset($package['exclude'])) { - if (!isset($info['Not Compatible with'])) { - $info['Not Compatible with'] = ''; - } else { - $info['Not Compatible with'] .= "\n"; - } - - if (is_array($package['exclude'])) { - $package['exclude'] = implode(', ', $package['exclude']); - } - - $package['package'] = $package['name']; // for parsedPackageNameToString - if (isset($package['conflicts'])) { - $info['Not Compatible with'] .= '=> except '; - } - $info['Not Compatible with'] .= 'Package ' . - $reg->parsedPackageNameToString($package, true); - $info['Not Compatible with'] .= "\n Versions " . $package['exclude']; - } - } - } - } - - if (isset($deps['required']['os'])) { - if (isset($deps['required']['os']['name'])) { - $dep['required']['os']['name'] = array($dep['required']['os']['name']); - } - - foreach ($dep['required']['os'] as $os) { - if (isset($os['conflicts']) && $os['conflicts'] == 'yes') { - if (!isset($info['Not Compatible with'])) { - $info['Not Compatible with'] = ''; - } else { - $info['Not Compatible with'] .= "\n"; - } - $info['Not Compatible with'] .= "$os[name] Operating System"; - } else { - $info['Required Dependencies'] .= "\n"; - $info['Required Dependencies'] .= "$os[name] Operating System"; - } - } - } - - if (isset($deps['required']['arch'])) { - if (isset($deps['required']['arch']['pattern'])) { - $dep['required']['arch']['pattern'] = array($dep['required']['os']['pattern']); - } - - foreach ($dep['required']['arch'] as $os) { - if (isset($os['conflicts']) && $os['conflicts'] == 'yes') { - if (!isset($info['Not Compatible with'])) { - $info['Not Compatible with'] = ''; - } else { - $info['Not Compatible with'] .= "\n"; - } - $info['Not Compatible with'] .= "OS/Arch matching pattern '/$os[pattern]/'"; - } else { - $info['Required Dependencies'] .= "\n"; - $info['Required Dependencies'] .= "OS/Arch matching pattern '/$os[pattern]/'"; - } - } - } - - if (isset($deps['optional'])) { - foreach (array('Package', 'Extension') as $type) { - $index = strtolower($type); - if (isset($deps['optional'][$index])) { - if (isset($deps['optional'][$index]['name'])) { - $deps['optional'][$index] = array($deps['optional'][$index]); - } - - foreach ($deps['optional'][$index] as $package) { - if (isset($package['conflicts']) && $package['conflicts'] == 'yes') { - $infoindex = 'Not Compatible with'; - if (!isset($info['Not Compatible with'])) { - $info['Not Compatible with'] = ''; - } else { - $info['Not Compatible with'] .= "\n"; - } - } else { - $infoindex = 'Optional Dependencies'; - if (!isset($info['Optional Dependencies'])) { - $info['Optional Dependencies'] = ''; - } else { - $info['Optional Dependencies'] .= "\n"; - } - } - - if ($index == 'extension') { - $name = $package['name']; - } else { - if (isset($package['channel'])) { - $name = $package['channel'] . '/' . $package['name']; - } else { - $name = '__uri/' . $package['name'] . ' (static URI)'; - } - } - - $info[$infoindex] .= "$type $name"; - if (isset($package['uri'])) { - $info[$infoindex] .= "\n Download URI: $package[uri]"; - continue; - } - - if ($infoindex == 'Not Compatible with') { - // conflicts is only used to say that all versions conflict - continue; - } - - if (isset($package['max']) && isset($package['min'])) { - $info[$infoindex] .= " \n Versions " . - $package['min'] . '-' . $package['max']; - } elseif (isset($package['min'])) { - $info[$infoindex] .= " \n Version " . - $package['min'] . ' or newer'; - } elseif (isset($package['max'])) { - $info[$infoindex] .= " \n Version " . - $package['min'] . ' or older'; - } - - if (isset($package['recommended'])) { - $info[$infoindex] .= "\n Recommended version: $package[recommended]"; - } - - if (isset($package['exclude'])) { - if (!isset($info['Not Compatible with'])) { - $info['Not Compatible with'] = ''; - } else { - $info['Not Compatible with'] .= "\n"; - } - - if (is_array($package['exclude'])) { - $package['exclude'] = implode(', ', $package['exclude']); - } - - $info['Not Compatible with'] .= "Package $package\n Versions " . - $package['exclude']; - } - } - } - } - } - - if (isset($deps['group'])) { - if (!isset($deps['group'][0])) { - $deps['group'] = array($deps['group']); - } - - foreach ($deps['group'] as $group) { - $info['Dependency Group ' . $group['attribs']['name']] = $group['attribs']['hint']; - $groupindex = $group['attribs']['name'] . ' Contents'; - $info[$groupindex] = ''; - foreach (array('Package', 'Extension') as $type) { - $index = strtolower($type); - if (isset($group[$index])) { - if (isset($group[$index]['name'])) { - $group[$index] = array($group[$index]); - } - - foreach ($group[$index] as $package) { - if (!empty($info[$groupindex])) { - $info[$groupindex] .= "\n"; - } - - if ($index == 'extension') { - $name = $package['name']; - } else { - if (isset($package['channel'])) { - $name = $package['channel'] . '/' . $package['name']; - } else { - $name = '__uri/' . $package['name'] . ' (static URI)'; - } - } - - if (isset($package['uri'])) { - if (isset($package['conflicts']) && $package['conflicts'] == 'yes') { - $info[$groupindex] .= "Not Compatible with $type $name"; - } else { - $info[$groupindex] .= "$type $name"; - } - - $info[$groupindex] .= "\n Download URI: $package[uri]"; - continue; - } - - if (isset($package['conflicts']) && $package['conflicts'] == 'yes') { - $info[$groupindex] .= "Not Compatible with $type $name"; - continue; - } - - $info[$groupindex] .= "$type $name"; - if (isset($package['max']) && isset($package['min'])) { - $info[$groupindex] .= " \n Versions " . - $package['min'] . '-' . $package['max']; - } elseif (isset($package['min'])) { - $info[$groupindex] .= " \n Version " . - $package['min'] . ' or newer'; - } elseif (isset($package['max'])) { - $info[$groupindex] .= " \n Version " . - $package['min'] . ' or older'; - } - - if (isset($package['recommended'])) { - $info[$groupindex] .= "\n Recommended version: $package[recommended]"; - } - - if (isset($package['exclude'])) { - if (!isset($info['Not Compatible with'])) { - $info['Not Compatible with'] = ''; - } else { - $info[$groupindex] .= "Not Compatible with\n"; - } - - if (is_array($package['exclude'])) { - $package['exclude'] = implode(', ', $package['exclude']); - } - $info[$groupindex] .= " Package $package\n Versions " . - $package['exclude']; - } - } - } - } - } - } - - if ($obj->getPackageType() == 'bundle') { - $info['Bundled Packages'] = ''; - foreach ($obj->getBundledPackages() as $package) { - if (!empty($info['Bundled Packages'])) { - $info['Bundled Packages'] .= "\n"; - } - - if (isset($package['uri'])) { - $info['Bundled Packages'] .= '__uri/' . $package['name']; - $info['Bundled Packages'] .= "\n (URI: $package[uri]"; - } else { - $info['Bundled Packages'] .= $package['channel'] . '/' . $package['name']; - } - } - } - - $info['package.xml version'] = '2.0'; - if ($installed) { - if ($obj->getLastModified()) { - $info['Last Modified'] = date('Y-m-d H:i', $obj->getLastModified()); - } - - $v = $obj->getLastInstalledVersion(); - $info['Previous Installed Version'] = $v ? $v : '- None -'; - } - - foreach ($info as $key => $value) { - $data['data'][] = array($key, $value); - } - - $data['raw'] = $obj->getArray(); // no validation needed - $this->ui->outputData($data, 'package-info'); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Registry.xml b/_piecrust/libs/PEAR/Command/Registry.xml deleted file mode 100644 index 9f4e214..0000000 --- a/_piecrust/libs/PEAR/Command/Registry.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - List Installed Packages In The Default Channel - doList - l - - - c - list installed packages from this channel - CHAN - - - a - list installed packages from all channels - - - i - output fully channel-aware data, even on failure - - - <package> -If invoked without parameters, this command lists the PEAR packages -installed in your php_dir ({config php_dir}). With a parameter, it -lists the files in a package. - - - - List Files In Installed Package - doFileList - fl - - <package> -List the files in an installed package. - - - - Shell Script Test - doShellTest - st - - <package> [[relation] version] -Tests if a package is installed in the system. Will exit(1) if it is not. - <relation> The version comparison operator. One of: - <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne - <version> The version to compare with - - - - Display information about a package - doInfo - in - - <package> -Displays information about a package. The package argument may be a -local package file, an URL to a package file, or the name of an -installed package. - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Remote.php b/_piecrust/libs/PEAR/Command/Remote.php deleted file mode 100644 index 74478d8..0000000 --- a/_piecrust/libs/PEAR/Command/Remote.php +++ /dev/null @@ -1,810 +0,0 @@ - - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Remote.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/** - * base class - */ -require_once 'PEAR/Command/Common.php'; -require_once 'PEAR/REST.php'; - -/** - * PEAR commands for remote server querying - * - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ -class PEAR_Command_Remote extends PEAR_Command_Common -{ - var $commands = array( - 'remote-info' => array( - 'summary' => 'Information About Remote Packages', - 'function' => 'doRemoteInfo', - 'shortcut' => 'ri', - 'options' => array(), - 'doc' => ' -Get details on a package from the server.', - ), - 'list-upgrades' => array( - 'summary' => 'List Available Upgrades', - 'function' => 'doListUpgrades', - 'shortcut' => 'lu', - 'options' => array( - 'channelinfo' => array( - 'shortopt' => 'i', - 'doc' => 'output fully channel-aware data, even on failure', - ), - ), - 'doc' => '[preferred_state] -List releases on the server of packages you have installed where -a newer version is available with the same release state (stable etc.) -or the state passed as the second parameter.' - ), - 'remote-list' => array( - 'summary' => 'List Remote Packages', - 'function' => 'doRemoteList', - 'shortcut' => 'rl', - 'options' => array( - 'channel' => - array( - 'shortopt' => 'c', - 'doc' => 'specify a channel other than the default channel', - 'arg' => 'CHAN', - ) - ), - 'doc' => ' -Lists the packages available on the configured server along with the -latest stable release of each package.', - ), - 'search' => array( - 'summary' => 'Search remote package database', - 'function' => 'doSearch', - 'shortcut' => 'sp', - 'options' => array( - 'channel' => - array( - 'shortopt' => 'c', - 'doc' => 'specify a channel other than the default channel', - 'arg' => 'CHAN', - ), - 'allchannels' => array( - 'shortopt' => 'a', - 'doc' => 'search packages from all known channels', - ), - 'channelinfo' => array( - 'shortopt' => 'i', - 'doc' => 'output fully channel-aware data, even on failure', - ), - ), - 'doc' => '[packagename] [packageinfo] -Lists all packages which match the search parameters. The first -parameter is a fragment of a packagename. The default channel -will be used unless explicitly overridden. The second parameter -will be used to match any portion of the summary/description', - ), - 'list-all' => array( - 'summary' => 'List All Packages', - 'function' => 'doListAll', - 'shortcut' => 'la', - 'options' => array( - 'channel' => - array( - 'shortopt' => 'c', - 'doc' => 'specify a channel other than the default channel', - 'arg' => 'CHAN', - ), - 'channelinfo' => array( - 'shortopt' => 'i', - 'doc' => 'output fully channel-aware data, even on failure', - ), - ), - 'doc' => ' -Lists the packages available on the configured server along with the -latest stable release of each package.', - ), - 'download' => array( - 'summary' => 'Download Package', - 'function' => 'doDownload', - 'shortcut' => 'd', - 'options' => array( - 'nocompress' => array( - 'shortopt' => 'Z', - 'doc' => 'download an uncompressed (.tar) file', - ), - ), - 'doc' => '... -Download package tarballs. The files will be named as suggested by the -server, for example if you download the DB package and the latest stable -version of DB is 1.6.5, the downloaded file will be DB-1.6.5.tgz.', - ), - 'clear-cache' => array( - 'summary' => 'Clear Web Services Cache', - 'function' => 'doClearCache', - 'shortcut' => 'cc', - 'options' => array(), - 'doc' => ' -Clear the REST cache. See also the cache_ttl configuration -parameter. -', - ), - ); - - /** - * PEAR_Command_Remote constructor. - * - * @access public - */ - function PEAR_Command_Remote(&$ui, &$config) - { - parent::PEAR_Command_Common($ui, $config); - } - - function _checkChannelForStatus($channel, $chan) - { - if (PEAR::isError($chan)) { - $this->raiseError($chan); - } - if (!is_a($chan, 'PEAR_ChannelFile')) { - return $this->raiseError('Internal corruption error: invalid channel "' . - $channel . '"'); - } - $rest = new PEAR_REST($this->config); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $mirror = $this->config->get('preferred_mirror', null, - $channel); - $a = $rest->downloadHttp('http://' . $channel . - '/channel.xml', $chan->lastModified()); - PEAR::staticPopErrorHandling(); - if (!PEAR::isError($a) && $a) { - $this->ui->outputData('WARNING: channel "' . $channel . '" has ' . - 'updated its protocols, use "' . PEAR_RUNTYPE . ' channel-update ' . $channel . - '" to update'); - } - } - - function doRemoteInfo($command, $options, $params) - { - if (sizeof($params) != 1) { - return $this->raiseError("$command expects one param: the remote package name"); - } - $savechannel = $channel = $this->config->get('default_channel'); - $reg = &$this->config->getRegistry(); - $package = $params[0]; - $parsed = $reg->parsePackageName($package, $channel); - if (PEAR::isError($parsed)) { - return $this->raiseError('Invalid package name "' . $package . '"'); - } - - $channel = $parsed['channel']; - $this->config->set('default_channel', $channel); - $chan = $reg->getChannel($channel); - if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) { - return $e; - } - - $mirror = $this->config->get('preferred_mirror'); - if ($chan->supportsREST($mirror) && $base = $chan->getBaseURL('REST1.0', $mirror)) { - $rest = &$this->config->getREST('1.0', array()); - $info = $rest->packageInfo($base, $parsed['package'], $channel); - } - - if (!isset($info)) { - return $this->raiseError('No supported protocol was found'); - } - - if (PEAR::isError($info)) { - $this->config->set('default_channel', $savechannel); - return $this->raiseError($info); - } - - if (!isset($info['name'])) { - return $this->raiseError('No remote package "' . $package . '" was found'); - } - - $installed = $reg->packageInfo($info['name'], null, $channel); - $info['installed'] = $installed['version'] ? $installed['version'] : '- no -'; - if (is_array($info['installed'])) { - $info['installed'] = $info['installed']['release']; - } - - $this->ui->outputData($info, $command); - $this->config->set('default_channel', $savechannel); - - return true; - } - - function doRemoteList($command, $options, $params) - { - $savechannel = $channel = $this->config->get('default_channel'); - $reg = &$this->config->getRegistry(); - if (isset($options['channel'])) { - $channel = $options['channel']; - if (!$reg->channelExists($channel)) { - return $this->raiseError('Channel "' . $channel . '" does not exist'); - } - - $this->config->set('default_channel', $channel); - } - - $chan = $reg->getChannel($channel); - if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) { - return $e; - } - - $list_options = false; - if ($this->config->get('preferred_state') == 'stable') { - $list_options = true; - } - - $available = array(); - if ($chan->supportsREST($this->config->get('preferred_mirror')) && - $base = $chan->getBaseURL('REST1.1', $this->config->get('preferred_mirror')) - ) { - // use faster list-all if available - $rest = &$this->config->getREST('1.1', array()); - $available = $rest->listAll($base, $list_options, true, false, false, $chan->getName()); - } elseif ($chan->supportsREST($this->config->get('preferred_mirror')) && - $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) { - $rest = &$this->config->getREST('1.0', array()); - $available = $rest->listAll($base, $list_options, true, false, false, $chan->getName()); - } - - if (PEAR::isError($available)) { - $this->config->set('default_channel', $savechannel); - return $this->raiseError($available); - } - - $i = $j = 0; - $data = array( - 'caption' => 'Channel ' . $channel . ' Available packages:', - 'border' => true, - 'headline' => array('Package', 'Version'), - 'channel' => $channel - ); - - if (count($available) == 0) { - $data = '(no packages available yet)'; - } else { - foreach ($available as $name => $info) { - $version = (isset($info['stable']) && $info['stable']) ? $info['stable'] : '-n/a-'; - $data['data'][] = array($name, $version); - } - } - $this->ui->outputData($data, $command); - $this->config->set('default_channel', $savechannel); - return true; - } - - function doListAll($command, $options, $params) - { - $savechannel = $channel = $this->config->get('default_channel'); - $reg = &$this->config->getRegistry(); - if (isset($options['channel'])) { - $channel = $options['channel']; - if (!$reg->channelExists($channel)) { - return $this->raiseError("Channel \"$channel\" does not exist"); - } - - $this->config->set('default_channel', $channel); - } - - $list_options = false; - if ($this->config->get('preferred_state') == 'stable') { - $list_options = true; - } - - $chan = $reg->getChannel($channel); - if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) { - return $e; - } - - if ($chan->supportsREST($this->config->get('preferred_mirror')) && - $base = $chan->getBaseURL('REST1.1', $this->config->get('preferred_mirror'))) { - // use faster list-all if available - $rest = &$this->config->getREST('1.1', array()); - $available = $rest->listAll($base, $list_options, false, false, false, $chan->getName()); - } elseif ($chan->supportsREST($this->config->get('preferred_mirror')) && - $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) { - $rest = &$this->config->getREST('1.0', array()); - $available = $rest->listAll($base, $list_options, false, false, false, $chan->getName()); - } - - if (PEAR::isError($available)) { - $this->config->set('default_channel', $savechannel); - return $this->raiseError('The package list could not be fetched from the remote server. Please try again. (Debug info: "' . $available->getMessage() . '")'); - } - - $data = array( - 'caption' => 'All packages [Channel ' . $channel . ']:', - 'border' => true, - 'headline' => array('Package', 'Latest', 'Local'), - 'channel' => $channel, - ); - - if (isset($options['channelinfo'])) { - // add full channelinfo - $data['caption'] = 'Channel ' . $channel . ' All packages:'; - $data['headline'] = array('Channel', 'Package', 'Latest', 'Local', - 'Description', 'Dependencies'); - } - $local_pkgs = $reg->listPackages($channel); - - foreach ($available as $name => $info) { - $installed = $reg->packageInfo($name, null, $channel); - if (is_array($installed['version'])) { - $installed['version'] = $installed['version']['release']; - } - $desc = $info['summary']; - if (isset($params[$name])) { - $desc .= "\n\n".$info['description']; - } - if (isset($options['mode'])) - { - if ($options['mode'] == 'installed' && !isset($installed['version'])) { - continue; - } - if ($options['mode'] == 'notinstalled' && isset($installed['version'])) { - continue; - } - if ($options['mode'] == 'upgrades' - && (!isset($installed['version']) || version_compare($installed['version'], - $info['stable'], '>='))) { - continue; - } - } - $pos = array_search(strtolower($name), $local_pkgs); - if ($pos !== false) { - unset($local_pkgs[$pos]); - } - - if (isset($info['stable']) && !$info['stable']) { - $info['stable'] = null; - } - - if (isset($options['channelinfo'])) { - // add full channelinfo - if ($info['stable'] === $info['unstable']) { - $state = $info['state']; - } else { - $state = 'stable'; - } - $latest = $info['stable'].' ('.$state.')'; - $local = ''; - if (isset($installed['version'])) { - $inst_state = $reg->packageInfo($name, 'release_state', $channel); - $local = $installed['version'].' ('.$inst_state.')'; - } - - $packageinfo = array( - $channel, - $name, - $latest, - $local, - isset($desc) ? $desc : null, - isset($info['deps']) ? $info['deps'] : null, - ); - } else { - $packageinfo = array( - $reg->channelAlias($channel) . '/' . $name, - isset($info['stable']) ? $info['stable'] : null, - isset($installed['version']) ? $installed['version'] : null, - isset($desc) ? $desc : null, - isset($info['deps']) ? $info['deps'] : null, - ); - } - $data['data'][$info['category']][] = $packageinfo; - } - - if (isset($options['mode']) && in_array($options['mode'], array('notinstalled', 'upgrades'))) { - $this->config->set('default_channel', $savechannel); - $this->ui->outputData($data, $command); - return true; - } - - foreach ($local_pkgs as $name) { - $info = &$reg->getPackage($name, $channel); - $data['data']['Local'][] = array( - $reg->channelAlias($channel) . '/' . $info->getPackage(), - '', - $info->getVersion(), - $info->getSummary(), - $info->getDeps() - ); - } - - $this->config->set('default_channel', $savechannel); - $this->ui->outputData($data, $command); - return true; - } - - function doSearch($command, $options, $params) - { - if ((!isset($params[0]) || empty($params[0])) - && (!isset($params[1]) || empty($params[1]))) - { - return $this->raiseError('no valid search string supplied'); - } - - $channelinfo = isset($options['channelinfo']); - $reg = &$this->config->getRegistry(); - if (isset($options['allchannels'])) { - // search all channels - unset($options['allchannels']); - $channels = $reg->getChannels(); - $errors = array(); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - foreach ($channels as $channel) { - if ($channel->getName() != '__uri') { - $options['channel'] = $channel->getName(); - $ret = $this->doSearch($command, $options, $params); - if (PEAR::isError($ret)) { - $errors[] = $ret; - } - } - } - - PEAR::staticPopErrorHandling(); - if (count($errors) !== 0) { - // for now, only give first error - return PEAR::raiseError($errors[0]); - } - - return true; - } - - $savechannel = $channel = $this->config->get('default_channel'); - $package = strtolower($params[0]); - $summary = isset($params[1]) ? $params[1] : false; - if (isset($options['channel'])) { - $reg = &$this->config->getRegistry(); - $channel = $options['channel']; - if (!$reg->channelExists($channel)) { - return $this->raiseError('Channel "' . $channel . '" does not exist'); - } - - $this->config->set('default_channel', $channel); - } - - $chan = $reg->getChannel($channel); - if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) { - return $e; - } - - if ($chan->supportsREST($this->config->get('preferred_mirror')) && - $base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) { - $rest = &$this->config->getREST('1.0', array()); - $available = $rest->listAll($base, false, false, $package, $summary, $chan->getName()); - } - - if (PEAR::isError($available)) { - $this->config->set('default_channel', $savechannel); - return $this->raiseError($available); - } - - if (!$available && !$channelinfo) { - // clean exit when not found, no error ! - $data = 'no packages found that match pattern "' . $package . '", for channel '.$channel.'.'; - $this->ui->outputData($data); - $this->config->set('default_channel', $channel); - return true; - } - - if ($channelinfo) { - $data = array( - 'caption' => 'Matched packages, channel ' . $channel . ':', - 'border' => true, - 'headline' => array('Channel', 'Package', 'Stable/(Latest)', 'Local'), - 'channel' => $channel - ); - } else { - $data = array( - 'caption' => 'Matched packages, channel ' . $channel . ':', - 'border' => true, - 'headline' => array('Package', 'Stable/(Latest)', 'Local'), - 'channel' => $channel - ); - } - - if (!$available && $channelinfo) { - unset($data['headline']); - $data['data'] = 'No packages found that match pattern "' . $package . '".'; - $available = array(); - } - - foreach ($available as $name => $info) { - $installed = $reg->packageInfo($name, null, $channel); - $desc = $info['summary']; - if (isset($params[$name])) - $desc .= "\n\n".$info['description']; - - if (!isset($info['stable']) || !$info['stable']) { - $version_remote = 'none'; - } else { - if ($info['unstable']) { - $version_remote = $info['unstable']; - } else { - $version_remote = $info['stable']; - } - $version_remote .= ' ('.$info['state'].')'; - } - $version = is_array($installed['version']) ? $installed['version']['release'] : - $installed['version']; - if ($channelinfo) { - $packageinfo = array( - $channel, - $name, - $version_remote, - $version, - $desc, - ); - } else { - $packageinfo = array( - $name, - $version_remote, - $version, - $desc, - ); - } - $data['data'][$info['category']][] = $packageinfo; - } - - $this->ui->outputData($data, $command); - $this->config->set('default_channel', $channel); - return true; - } - - function &getDownloader($options) - { - if (!class_exists('PEAR_Downloader')) { - require_once 'PEAR/Downloader.php'; - } - $a = &new PEAR_Downloader($this->ui, $options, $this->config); - return $a; - } - - function doDownload($command, $options, $params) - { - // make certain that dependencies are ignored - $options['downloadonly'] = 1; - - // eliminate error messages for preferred_state-related errors - /* TODO: Should be an option, but until now download does respect - prefered state */ - /* $options['ignorepreferred_state'] = 1; */ - // eliminate error messages for preferred_state-related errors - - $downloader = &$this->getDownloader($options); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $e = $downloader->setDownloadDir(getcwd()); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($e)) { - return $this->raiseError('Current directory is not writeable, cannot download'); - } - - $errors = array(); - $downloaded = array(); - $err = $downloader->download($params); - if (PEAR::isError($err)) { - return $err; - } - - $errors = $downloader->getErrorMsgs(); - if (count($errors)) { - foreach ($errors as $error) { - if ($error !== null) { - $this->ui->outputData($error); - } - } - - return $this->raiseError("$command failed"); - } - - $downloaded = $downloader->getDownloadedPackages(); - foreach ($downloaded as $pkg) { - $this->ui->outputData("File $pkg[file] downloaded", $command); - } - - return true; - } - - function downloadCallback($msg, $params = null) - { - if ($msg == 'done') { - $this->bytes_downloaded = $params; - } - } - - function doListUpgrades($command, $options, $params) - { - require_once 'PEAR/Common.php'; - if (isset($params[0]) && !is_array(PEAR_Common::betterStates($params[0]))) { - return $this->raiseError($params[0] . ' is not a valid state (stable/beta/alpha/devel/etc.) try "pear help list-upgrades"'); - } - - $savechannel = $channel = $this->config->get('default_channel'); - $reg = &$this->config->getRegistry(); - foreach ($reg->listChannels() as $channel) { - $inst = array_flip($reg->listPackages($channel)); - if (!count($inst)) { - continue; - } - - if ($channel == '__uri') { - continue; - } - - $this->config->set('default_channel', $channel); - $state = empty($params[0]) ? $this->config->get('preferred_state') : $params[0]; - - $caption = $channel . ' Available Upgrades'; - $chan = $reg->getChannel($channel); - if (PEAR::isError($e = $this->_checkChannelForStatus($channel, $chan))) { - return $e; - } - - $latest = array(); - $base2 = false; - $preferred_mirror = $this->config->get('preferred_mirror'); - if ($chan->supportsREST($preferred_mirror) && - ( - //($base2 = $chan->getBaseURL('REST1.4', $preferred_mirror)) || - ($base = $chan->getBaseURL('REST1.0', $preferred_mirror)) - ) - - ) { - if ($base2) { - $rest = &$this->config->getREST('1.4', array()); - $base = $base2; - } else { - $rest = &$this->config->getREST('1.0', array()); - } - - if (empty($state) || $state == 'any') { - $state = false; - } else { - $caption .= ' (' . implode(', ', PEAR_Common::betterStates($state, true)) . ')'; - } - - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $latest = $rest->listLatestUpgrades($base, $state, $inst, $channel, $reg); - PEAR::staticPopErrorHandling(); - } - - if (PEAR::isError($latest)) { - $this->ui->outputData($latest->getMessage()); - continue; - } - - $caption .= ':'; - if (PEAR::isError($latest)) { - $this->config->set('default_channel', $savechannel); - return $latest; - } - - $data = array( - 'caption' => $caption, - 'border' => 1, - 'headline' => array('Channel', 'Package', 'Local', 'Remote', 'Size'), - 'channel' => $channel - ); - - foreach ((array)$latest as $pkg => $info) { - $package = strtolower($pkg); - if (!isset($inst[$package])) { - // skip packages we don't have installed - continue; - } - - extract($info); - $inst_version = $reg->packageInfo($package, 'version', $channel); - $inst_state = $reg->packageInfo($package, 'release_state', $channel); - if (version_compare("$version", "$inst_version", "le")) { - // installed version is up-to-date - continue; - } - - if ($filesize >= 20480) { - $filesize += 1024 - ($filesize % 1024); - $fs = sprintf("%dkB", $filesize / 1024); - } elseif ($filesize > 0) { - $filesize += 103 - ($filesize % 103); - $fs = sprintf("%.1fkB", $filesize / 1024.0); - } else { - $fs = " -"; // XXX center instead - } - - $data['data'][] = array($channel, $pkg, "$inst_version ($inst_state)", "$version ($state)", $fs); - } - - if (isset($options['channelinfo'])) { - if (empty($data['data'])) { - unset($data['headline']); - if (count($inst) == 0) { - $data['data'] = '(no packages installed)'; - } else { - $data['data'] = '(no upgrades available)'; - } - } - $this->ui->outputData($data, $command); - } else { - if (empty($data['data'])) { - $this->ui->outputData('Channel ' . $channel . ': No upgrades available'); - } else { - $this->ui->outputData($data, $command); - } - } - } - - $this->config->set('default_channel', $savechannel); - return true; - } - - function doClearCache($command, $options, $params) - { - $cache_dir = $this->config->get('cache_dir'); - $verbose = $this->config->get('verbose'); - $output = ''; - if (!file_exists($cache_dir) || !is_dir($cache_dir)) { - return $this->raiseError("$cache_dir does not exist or is not a directory"); - } - - if (!($dp = @opendir($cache_dir))) { - return $this->raiseError("opendir($cache_dir) failed: $php_errormsg"); - } - - if ($verbose >= 1) { - $output .= "reading directory $cache_dir\n"; - } - - $num = 0; - while ($ent = readdir($dp)) { - if (preg_match('/rest.cache(file|id)\\z/', $ent)) { - $path = $cache_dir . DIRECTORY_SEPARATOR . $ent; - if (file_exists($path)) { - $ok = @unlink($path); - } else { - $ok = false; - $php_errormsg = ''; - } - - if ($ok) { - if ($verbose >= 2) { - $output .= "deleted $path\n"; - } - $num++; - } elseif ($verbose >= 1) { - $output .= "failed to delete $path $php_errormsg\n"; - } - } - } - - closedir($dp); - if ($verbose >= 1) { - $output .= "$num cache entries cleared\n"; - } - - $this->ui->outputData(rtrim($output), $command); - return $num; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Remote.xml b/_piecrust/libs/PEAR/Command/Remote.xml deleted file mode 100644 index b4f6100..0000000 --- a/_piecrust/libs/PEAR/Command/Remote.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - Information About Remote Packages - doRemoteInfo - ri - - <package> -Get details on a package from the server. - - - List Available Upgrades - doListUpgrades - lu - - - i - output fully channel-aware data, even on failure - - - [preferred_state] -List releases on the server of packages you have installed where -a newer version is available with the same release state (stable etc.) -or the state passed as the second parameter. - - - List Remote Packages - doRemoteList - rl - - - c - specify a channel other than the default channel - CHAN - - - -Lists the packages available on the configured server along with the -latest stable release of each package. - - - Search remote package database - doSearch - sp - - - c - specify a channel other than the default channel - CHAN - - - a - search packages from all known channels - - - i - output fully channel-aware data, even on failure - - - [packagename] [packageinfo] -Lists all packages which match the search parameters. The first -parameter is a fragment of a packagename. The default channel -will be used unless explicitly overridden. The second parameter -will be used to match any portion of the summary/description - - - List All Packages - doListAll - la - - - c - specify a channel other than the default channel - CHAN - - - i - output fully channel-aware data, even on failure - - - -Lists the packages available on the configured server along with the -latest stable release of each package. - - - Download Package - doDownload - d - - - Z - download an uncompressed (.tar) file - - - <package>... -Download package tarballs. The files will be named as suggested by the -server, for example if you download the DB package and the latest stable -version of DB is 1.6.5, the downloaded file will be DB-1.6.5.tgz. - - - Clear Web Services Cache - doClearCache - cc - - -Clear the XML-RPC/REST cache. See also the cache_ttl configuration -parameter. - - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Test.php b/_piecrust/libs/PEAR/Command/Test.php deleted file mode 100644 index a757d9e..0000000 --- a/_piecrust/libs/PEAR/Command/Test.php +++ /dev/null @@ -1,337 +0,0 @@ - - * @author Martin Jansen - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Test.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/** - * base class - */ -require_once 'PEAR/Command/Common.php'; - -/** - * PEAR commands for login/logout - * - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Martin Jansen - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ - -class PEAR_Command_Test extends PEAR_Command_Common -{ - var $commands = array( - 'run-tests' => array( - 'summary' => 'Run Regression Tests', - 'function' => 'doRunTests', - 'shortcut' => 'rt', - 'options' => array( - 'recur' => array( - 'shortopt' => 'r', - 'doc' => 'Run tests in child directories, recursively. 4 dirs deep maximum', - ), - 'ini' => array( - 'shortopt' => 'i', - 'doc' => 'actual string of settings to pass to php in format " -d setting=blah"', - 'arg' => 'SETTINGS' - ), - 'realtimelog' => array( - 'shortopt' => 'l', - 'doc' => 'Log test runs/results as they are run', - ), - 'quiet' => array( - 'shortopt' => 'q', - 'doc' => 'Only display detail for failed tests', - ), - 'simple' => array( - 'shortopt' => 's', - 'doc' => 'Display simple output for all tests', - ), - 'package' => array( - 'shortopt' => 'p', - 'doc' => 'Treat parameters as installed packages from which to run tests', - ), - 'phpunit' => array( - 'shortopt' => 'u', - 'doc' => 'Search parameters for AllTests.php, and use that to run phpunit-based tests -If none is found, all .phpt tests will be tried instead.', - ), - 'tapoutput' => array( - 'shortopt' => 't', - 'doc' => 'Output run-tests.log in TAP-compliant format', - ), - 'cgi' => array( - 'shortopt' => 'c', - 'doc' => 'CGI php executable (needed for tests with POST/GET section)', - 'arg' => 'PHPCGI', - ), - 'coverage' => array( - 'shortopt' => 'x', - 'doc' => 'Generate a code coverage report (requires Xdebug 2.0.0+)', - ), - ), - 'doc' => '[testfile|dir ...] -Run regression tests with PHP\'s regression testing script (run-tests.php).', - ), - ); - - var $output; - - /** - * PEAR_Command_Test constructor. - * - * @access public - */ - function PEAR_Command_Test(&$ui, &$config) - { - parent::PEAR_Command_Common($ui, $config); - } - - function doRunTests($command, $options, $params) - { - if (isset($options['phpunit']) && isset($options['tapoutput'])) { - return $this->raiseError('ERROR: cannot use both --phpunit and --tapoutput at the same time'); - } - - require_once 'PEAR/Common.php'; - require_once 'System.php'; - $log = new PEAR_Common; - $log->ui = &$this->ui; // slightly hacky, but it will work - $tests = array(); - $depth = isset($options['recur']) ? 14 : 1; - - if (!count($params)) { - $params[] = '.'; - } - - if (isset($options['package'])) { - $oldparams = $params; - $params = array(); - $reg = &$this->config->getRegistry(); - foreach ($oldparams as $param) { - $pname = $reg->parsePackageName($param, $this->config->get('default_channel')); - if (PEAR::isError($pname)) { - return $this->raiseError($pname); - } - - $package = &$reg->getPackage($pname['package'], $pname['channel']); - if (!$package) { - return PEAR::raiseError('Unknown package "' . - $reg->parsedPackageNameToString($pname) . '"'); - } - - $filelist = $package->getFilelist(); - foreach ($filelist as $name => $atts) { - if (isset($atts['role']) && $atts['role'] != 'test') { - continue; - } - - if (isset($options['phpunit']) && preg_match('/AllTests\.php\\z/i', $name)) { - $params[] = $atts['installed_as']; - continue; - } elseif (!preg_match('/\.phpt\\z/', $name)) { - continue; - } - $params[] = $atts['installed_as']; - } - } - } - - foreach ($params as $p) { - if (is_dir($p)) { - if (isset($options['phpunit'])) { - $dir = System::find(array($p, '-type', 'f', - '-maxdepth', $depth, - '-name', 'AllTests.php')); - if (count($dir)) { - foreach ($dir as $p) { - $p = realpath($p); - if (!count($tests) || - (count($tests) && strlen($p) < strlen($tests[0]))) { - // this is in a higher-level directory, use this one instead. - $tests = array($p); - } - } - } - continue; - } - - $args = array($p, '-type', 'f', '-name', '*.phpt'); - } else { - if (isset($options['phpunit'])) { - if (preg_match('/AllTests\.php\\z/i', $p)) { - $p = realpath($p); - if (!count($tests) || - (count($tests) && strlen($p) < strlen($tests[0]))) { - // this is in a higher-level directory, use this one instead. - $tests = array($p); - } - } - continue; - } - - if (file_exists($p) && preg_match('/\.phpt$/', $p)) { - $tests[] = $p; - continue; - } - - if (!preg_match('/\.phpt\\z/', $p)) { - $p .= '.phpt'; - } - - $args = array(dirname($p), '-type', 'f', '-name', $p); - } - - if (!isset($options['recur'])) { - $args[] = '-maxdepth'; - $args[] = 1; - } - - $dir = System::find($args); - $tests = array_merge($tests, $dir); - } - - $ini_settings = ''; - if (isset($options['ini'])) { - $ini_settings .= $options['ini']; - } - - if (isset($_ENV['TEST_PHP_INCLUDE_PATH'])) { - $ini_settings .= " -d include_path={$_ENV['TEST_PHP_INCLUDE_PATH']}"; - } - - if ($ini_settings) { - $this->ui->outputData('Using INI settings: "' . $ini_settings . '"'); - } - - $skipped = $passed = $failed = array(); - $tests_count = count($tests); - $this->ui->outputData('Running ' . $tests_count . ' tests', $command); - $start = time(); - if (isset($options['realtimelog']) && file_exists('run-tests.log')) { - unlink('run-tests.log'); - } - - if (isset($options['tapoutput'])) { - $tap = '1..' . $tests_count . "\n"; - } - - require_once 'PEAR/RunTest.php'; - $run = new PEAR_RunTest($log, $options); - $run->tests_count = $tests_count; - - if (isset($options['coverage']) && extension_loaded('xdebug')){ - $run->xdebug_loaded = true; - } else { - $run->xdebug_loaded = false; - } - - $j = $i = 1; - foreach ($tests as $t) { - if (isset($options['realtimelog'])) { - $fp = @fopen('run-tests.log', 'a'); - if ($fp) { - fwrite($fp, "Running test [$i / $tests_count] $t..."); - fclose($fp); - } - } - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - if (isset($options['phpunit'])) { - $result = $run->runPHPUnit($t, $ini_settings); - } else { - $result = $run->run($t, $ini_settings, $j); - } - PEAR::staticPopErrorHandling(); - if (PEAR::isError($result)) { - $this->ui->log($result->getMessage()); - continue; - } - - if (isset($options['tapoutput'])) { - $tap .= $result[0] . ' ' . $i . $result[1] . "\n"; - continue; - } - - if (isset($options['realtimelog'])) { - $fp = @fopen('run-tests.log', 'a'); - if ($fp) { - fwrite($fp, "$result\n"); - fclose($fp); - } - } - - if ($result == 'FAILED') { - $failed[] = $t; - } - if ($result == 'PASSED') { - $passed[] = $t; - } - if ($result == 'SKIPPED') { - $skipped[] = $t; - } - - $j++; - } - - $total = date('i:s', time() - $start); - if (isset($options['tapoutput'])) { - $fp = @fopen('run-tests.log', 'w'); - if ($fp) { - fwrite($fp, $tap, strlen($tap)); - fclose($fp); - $this->ui->outputData('wrote TAP-format log to "' .realpath('run-tests.log') . - '"', $command); - } - } else { - if (count($failed)) { - $output = "TOTAL TIME: $total\n"; - $output .= count($passed) . " PASSED TESTS\n"; - $output .= count($skipped) . " SKIPPED TESTS\n"; - $output .= count($failed) . " FAILED TESTS:\n"; - foreach ($failed as $failure) { - $output .= $failure . "\n"; - } - - $mode = isset($options['realtimelog']) ? 'a' : 'w'; - $fp = @fopen('run-tests.log', $mode); - - if ($fp) { - fwrite($fp, $output, strlen($output)); - fclose($fp); - $this->ui->outputData('wrote log to "' . realpath('run-tests.log') . '"', $command); - } - } elseif (file_exists('run-tests.log') && !is_dir('run-tests.log')) { - @unlink('run-tests.log'); - } - } - $this->ui->outputData('TOTAL TIME: ' . $total); - $this->ui->outputData(count($passed) . ' PASSED TESTS', $command); - $this->ui->outputData(count($skipped) . ' SKIPPED TESTS', $command); - if (count($failed)) { - $this->ui->outputData(count($failed) . ' FAILED TESTS:', $command); - foreach ($failed as $failure) { - $this->ui->outputData($failure, $command); - } - } - - return true; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Command/Test.xml b/_piecrust/libs/PEAR/Command/Test.xml deleted file mode 100644 index bbe9fcc..0000000 --- a/_piecrust/libs/PEAR/Command/Test.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - Run Regression Tests - doRunTests - rt - - - r - Run tests in child directories, recursively. 4 dirs deep maximum - - - i - actual string of settings to pass to php in format " -d setting=blah" - SETTINGS - - - l - Log test runs/results as they are run - - - q - Only display detail for failed tests - - - s - Display simple output for all tests - - - p - Treat parameters as installed packages from which to run tests - - - u - Search parameters for AllTests.php, and use that to run phpunit-based tests -If none is found, all .phpt tests will be tried instead. - - - t - Output run-tests.log in TAP-compliant format - - - c - CGI php executable (needed for tests with POST/GET section) - PHPCGI - - - x - Generate a code coverage report (requires Xdebug 2.0.0+) - - - [testfile|dir ...] -Run regression tests with PHP's regression testing script (run-tests.php). - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Common.php b/_piecrust/libs/PEAR/Common.php deleted file mode 100644 index 3a8c7e8..0000000 --- a/_piecrust/libs/PEAR/Common.php +++ /dev/null @@ -1,837 +0,0 @@ - - * @author Tomas V. V. Cox - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Common.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1.0 - * @deprecated File deprecated since Release 1.4.0a1 - */ - -/** - * Include error handling - */ -require_once 'PEAR.php'; - -/** - * PEAR_Common error when an invalid PHP file is passed to PEAR_Common::analyzeSourceCode() - */ -define('PEAR_COMMON_ERROR_INVALIDPHP', 1); -define('_PEAR_COMMON_PACKAGE_NAME_PREG', '[A-Za-z][a-zA-Z0-9_]+'); -define('PEAR_COMMON_PACKAGE_NAME_PREG', '/^' . _PEAR_COMMON_PACKAGE_NAME_PREG . '\\z/'); - -// this should allow: 1, 1.0, 1.0RC1, 1.0dev, 1.0dev123234234234, 1.0a1, 1.0b1, 1.0pl1 -define('_PEAR_COMMON_PACKAGE_VERSION_PREG', '\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?'); -define('PEAR_COMMON_PACKAGE_VERSION_PREG', '/^' . _PEAR_COMMON_PACKAGE_VERSION_PREG . '\\z/i'); - -// XXX far from perfect :-) -define('_PEAR_COMMON_PACKAGE_DOWNLOAD_PREG', '(' . _PEAR_COMMON_PACKAGE_NAME_PREG . - ')(-([.0-9a-zA-Z]+))?'); -define('PEAR_COMMON_PACKAGE_DOWNLOAD_PREG', '/^' . _PEAR_COMMON_PACKAGE_DOWNLOAD_PREG . - '\\z/'); - -define('_PEAR_CHANNELS_NAME_PREG', '[A-Za-z][a-zA-Z0-9\.]+'); -define('PEAR_CHANNELS_NAME_PREG', '/^' . _PEAR_CHANNELS_NAME_PREG . '\\z/'); - -// this should allow any dns or IP address, plus a path - NO UNDERSCORES ALLOWED -define('_PEAR_CHANNELS_SERVER_PREG', '[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*(\/[a-zA-Z0-9\-]+)*'); -define('PEAR_CHANNELS_SERVER_PREG', '/^' . _PEAR_CHANNELS_SERVER_PREG . '\\z/i'); - -define('_PEAR_CHANNELS_PACKAGE_PREG', '(' ._PEAR_CHANNELS_SERVER_PREG . ')\/(' - . _PEAR_COMMON_PACKAGE_NAME_PREG . ')'); -define('PEAR_CHANNELS_PACKAGE_PREG', '/^' . _PEAR_CHANNELS_PACKAGE_PREG . '\\z/i'); - -define('_PEAR_COMMON_CHANNEL_DOWNLOAD_PREG', '(' . _PEAR_CHANNELS_NAME_PREG . ')::(' - . _PEAR_COMMON_PACKAGE_NAME_PREG . ')(-([.0-9a-zA-Z]+))?'); -define('PEAR_COMMON_CHANNEL_DOWNLOAD_PREG', '/^' . _PEAR_COMMON_CHANNEL_DOWNLOAD_PREG . '\\z/'); - -/** - * List of temporary files and directories registered by - * PEAR_Common::addTempFile(). - * @var array - */ -$GLOBALS['_PEAR_Common_tempfiles'] = array(); - -/** - * Valid maintainer roles - * @var array - */ -$GLOBALS['_PEAR_Common_maintainer_roles'] = array('lead','developer','contributor','helper'); - -/** - * Valid release states - * @var array - */ -$GLOBALS['_PEAR_Common_release_states'] = array('alpha','beta','stable','snapshot','devel'); - -/** - * Valid dependency types - * @var array - */ -$GLOBALS['_PEAR_Common_dependency_types'] = array('pkg','ext','php','prog','ldlib','rtlib','os','websrv','sapi'); - -/** - * Valid dependency relations - * @var array - */ -$GLOBALS['_PEAR_Common_dependency_relations'] = array('has','eq','lt','le','gt','ge','not', 'ne'); - -/** - * Valid file roles - * @var array - */ -$GLOBALS['_PEAR_Common_file_roles'] = array('php','ext','test','doc','data','src','script'); - -/** - * Valid replacement types - * @var array - */ -$GLOBALS['_PEAR_Common_replacement_types'] = array('php-const', 'pear-config', 'package-info'); - -/** - * Valid "provide" types - * @var array - */ -$GLOBALS['_PEAR_Common_provide_types'] = array('ext', 'prog', 'class', 'function', 'feature', 'api'); - -/** - * Valid "provide" types - * @var array - */ -$GLOBALS['_PEAR_Common_script_phases'] = array('pre-install', 'post-install', 'pre-uninstall', 'post-uninstall', 'pre-build', 'post-build', 'pre-configure', 'post-configure', 'pre-setup', 'post-setup'); - -/** - * Class providing common functionality for PEAR administration classes. - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Tomas V. V. Cox - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - * @deprecated This class will disappear, and its components will be spread - * into smaller classes, like the AT&T breakup, as of Release 1.4.0a1 - */ -class PEAR_Common extends PEAR -{ - /** - * User Interface object (PEAR_Frontend_* class). If null, - * the log() method uses print. - * @var object - */ - var $ui = null; - - /** - * Configuration object (PEAR_Config). - * @var PEAR_Config - */ - var $config = null; - - /** stack of elements, gives some sort of XML context */ - var $element_stack = array(); - - /** name of currently parsed XML element */ - var $current_element; - - /** array of attributes of the currently parsed XML element */ - var $current_attributes = array(); - - /** assoc with information about a package */ - var $pkginfo = array(); - - var $current_path = null; - - /** - * Flag variable used to mark a valid package file - * @var boolean - * @access private - */ - var $_validPackageFile; - - /** - * PEAR_Common constructor - * - * @access public - */ - function PEAR_Common() - { - parent::PEAR(); - $this->config = &PEAR_Config::singleton(); - $this->debug = $this->config->get('verbose'); - } - - /** - * PEAR_Common destructor - * - * @access private - */ - function _PEAR_Common() - { - // doesn't work due to bug #14744 - //$tempfiles = $this->_tempfiles; - $tempfiles =& $GLOBALS['_PEAR_Common_tempfiles']; - while ($file = array_shift($tempfiles)) { - if (@is_dir($file)) { - if (!class_exists('System')) { - require_once 'System.php'; - } - - System::rm(array('-rf', $file)); - } elseif (file_exists($file)) { - unlink($file); - } - } - } - - /** - * Register a temporary file or directory. When the destructor is - * executed, all registered temporary files and directories are - * removed. - * - * @param string $file name of file or directory - * - * @return void - * - * @access public - */ - function addTempFile($file) - { - if (!class_exists('PEAR_Frontend')) { - require_once 'PEAR/Frontend.php'; - } - PEAR_Frontend::addTempFile($file); - } - - /** - * Wrapper to System::mkDir(), creates a directory as well as - * any necessary parent directories. - * - * @param string $dir directory name - * - * @return bool TRUE on success, or a PEAR error - * - * @access public - */ - function mkDirHier($dir) - { - // Only used in Installer - move it there ? - $this->log(2, "+ create dir $dir"); - if (!class_exists('System')) { - require_once 'System.php'; - } - return System::mkDir(array('-p', $dir)); - } - - /** - * Logging method. - * - * @param int $level log level (0 is quiet, higher is noisier) - * @param string $msg message to write to the log - * - * @return void - * - * @access public - * @static - */ - function log($level, $msg, $append_crlf = true) - { - if ($this->debug >= $level) { - if (!class_exists('PEAR_Frontend')) { - require_once 'PEAR/Frontend.php'; - } - - $ui = &PEAR_Frontend::singleton(); - if (is_a($ui, 'PEAR_Frontend')) { - $ui->log($msg, $append_crlf); - } else { - print "$msg\n"; - } - } - } - - /** - * Create and register a temporary directory. - * - * @param string $tmpdir (optional) Directory to use as tmpdir. - * Will use system defaults (for example - * /tmp or c:\windows\temp) if not specified - * - * @return string name of created directory - * - * @access public - */ - function mkTempDir($tmpdir = '') - { - $topt = $tmpdir ? array('-t', $tmpdir) : array(); - $topt = array_merge($topt, array('-d', 'pear')); - if (!class_exists('System')) { - require_once 'System.php'; - } - - if (!$tmpdir = System::mktemp($topt)) { - return false; - } - - $this->addTempFile($tmpdir); - return $tmpdir; - } - - /** - * Set object that represents the frontend to be used. - * - * @param object Reference of the frontend object - * @return void - * @access public - */ - function setFrontendObject(&$ui) - { - $this->ui = &$ui; - } - - /** - * Return an array containing all of the states that are more stable than - * or equal to the passed in state - * - * @param string Release state - * @param boolean Determines whether to include $state in the list - * @return false|array False if $state is not a valid release state - */ - function betterStates($state, $include = false) - { - static $states = array('snapshot', 'devel', 'alpha', 'beta', 'stable'); - $i = array_search($state, $states); - if ($i === false) { - return false; - } - if ($include) { - $i--; - } - return array_slice($states, $i + 1); - } - - /** - * Get the valid roles for a PEAR package maintainer - * - * @return array - * @static - */ - function getUserRoles() - { - return $GLOBALS['_PEAR_Common_maintainer_roles']; - } - - /** - * Get the valid package release states of packages - * - * @return array - * @static - */ - function getReleaseStates() - { - return $GLOBALS['_PEAR_Common_release_states']; - } - - /** - * Get the implemented dependency types (php, ext, pkg etc.) - * - * @return array - * @static - */ - function getDependencyTypes() - { - return $GLOBALS['_PEAR_Common_dependency_types']; - } - - /** - * Get the implemented dependency relations (has, lt, ge etc.) - * - * @return array - * @static - */ - function getDependencyRelations() - { - return $GLOBALS['_PEAR_Common_dependency_relations']; - } - - /** - * Get the implemented file roles - * - * @return array - * @static - */ - function getFileRoles() - { - return $GLOBALS['_PEAR_Common_file_roles']; - } - - /** - * Get the implemented file replacement types in - * - * @return array - * @static - */ - function getReplacementTypes() - { - return $GLOBALS['_PEAR_Common_replacement_types']; - } - - /** - * Get the implemented file replacement types in - * - * @return array - * @static - */ - function getProvideTypes() - { - return $GLOBALS['_PEAR_Common_provide_types']; - } - - /** - * Get the implemented file replacement types in - * - * @return array - * @static - */ - function getScriptPhases() - { - return $GLOBALS['_PEAR_Common_script_phases']; - } - - /** - * Test whether a string contains a valid package name. - * - * @param string $name the package name to test - * - * @return bool - * - * @access public - */ - function validPackageName($name) - { - return (bool)preg_match(PEAR_COMMON_PACKAGE_NAME_PREG, $name); - } - - /** - * Test whether a string contains a valid package version. - * - * @param string $ver the package version to test - * - * @return bool - * - * @access public - */ - function validPackageVersion($ver) - { - return (bool)preg_match(PEAR_COMMON_PACKAGE_VERSION_PREG, $ver); - } - - /** - * @param string $path relative or absolute include path - * @return boolean - * @static - */ - function isIncludeable($path) - { - if (file_exists($path) && is_readable($path)) { - return true; - } - - $ipath = explode(PATH_SEPARATOR, ini_get('include_path')); - foreach ($ipath as $include) { - $test = realpath($include . DIRECTORY_SEPARATOR . $path); - if (file_exists($test) && is_readable($test)) { - return true; - } - } - - return false; - } - - function _postProcessChecks($pf) - { - if (!PEAR::isError($pf)) { - return $this->_postProcessValidPackagexml($pf); - } - - $errs = $pf->getUserinfo(); - if (is_array($errs)) { - foreach ($errs as $error) { - $e = $this->raiseError($error['message'], $error['code'], null, null, $error); - } - } - - return $pf; - } - - /** - * Returns information about a package file. Expects the name of - * a gzipped tar file as input. - * - * @param string $file name of .tgz file - * - * @return array array with package information - * - * @access public - * @deprecated use PEAR_PackageFile->fromTgzFile() instead - * - */ - function infoFromTgzFile($file) - { - $packagefile = &new PEAR_PackageFile($this->config); - $pf = &$packagefile->fromTgzFile($file, PEAR_VALIDATE_NORMAL); - return $this->_postProcessChecks($pf); - } - - /** - * Returns information about a package file. Expects the name of - * a package xml file as input. - * - * @param string $descfile name of package xml file - * - * @return array array with package information - * - * @access public - * @deprecated use PEAR_PackageFile->fromPackageFile() instead - * - */ - function infoFromDescriptionFile($descfile) - { - $packagefile = &new PEAR_PackageFile($this->config); - $pf = &$packagefile->fromPackageFile($descfile, PEAR_VALIDATE_NORMAL); - return $this->_postProcessChecks($pf); - } - - /** - * Returns information about a package file. Expects the contents - * of a package xml file as input. - * - * @param string $data contents of package.xml file - * - * @return array array with package information - * - * @access public - * @deprecated use PEAR_PackageFile->fromXmlstring() instead - * - */ - function infoFromString($data) - { - $packagefile = &new PEAR_PackageFile($this->config); - $pf = &$packagefile->fromXmlString($data, PEAR_VALIDATE_NORMAL, false); - return $this->_postProcessChecks($pf); - } - - /** - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @return array - */ - function _postProcessValidPackagexml(&$pf) - { - if (!is_a($pf, 'PEAR_PackageFile_v2')) { - $this->pkginfo = $pf->toArray(); - return $this->pkginfo; - } - - // sort of make this into a package.xml 1.0-style array - // changelog is not converted to old format. - $arr = $pf->toArray(true); - $arr = array_merge($arr, $arr['old']); - unset($arr['old'], $arr['xsdversion'], $arr['contents'], $arr['compatible'], - $arr['channel'], $arr['uri'], $arr['dependencies'], $arr['phprelease'], - $arr['extsrcrelease'], $arr['zendextsrcrelease'], $arr['extbinrelease'], - $arr['zendextbinrelease'], $arr['bundle'], $arr['lead'], $arr['developer'], - $arr['helper'], $arr['contributor']); - $arr['filelist'] = $pf->getFilelist(); - $this->pkginfo = $arr; - return $arr; - } - - /** - * Returns package information from different sources - * - * This method is able to extract information about a package - * from a .tgz archive or from a XML package definition file. - * - * @access public - * @param string Filename of the source ('package.xml', '.tgz') - * @return string - * @deprecated use PEAR_PackageFile->fromAnyFile() instead - */ - function infoFromAny($info) - { - if (is_string($info) && file_exists($info)) { - $packagefile = &new PEAR_PackageFile($this->config); - $pf = &$packagefile->fromAnyFile($info, PEAR_VALIDATE_NORMAL); - if (PEAR::isError($pf)) { - $errs = $pf->getUserinfo(); - if (is_array($errs)) { - foreach ($errs as $error) { - $e = $this->raiseError($error['message'], $error['code'], null, null, $error); - } - } - - return $pf; - } - - return $this->_postProcessValidPackagexml($pf); - } - - return $info; - } - - /** - * Return an XML document based on the package info (as returned - * by the PEAR_Common::infoFrom* methods). - * - * @param array $pkginfo package info - * - * @return string XML data - * - * @access public - * @deprecated use a PEAR_PackageFile_v* object's generator instead - */ - function xmlFromInfo($pkginfo) - { - $config = &PEAR_Config::singleton(); - $packagefile = &new PEAR_PackageFile($config); - $pf = &$packagefile->fromArray($pkginfo); - $gen = &$pf->getDefaultGenerator(); - return $gen->toXml(PEAR_VALIDATE_PACKAGING); - } - - /** - * Validate XML package definition file. - * - * @param string $info Filename of the package archive or of the - * package definition file - * @param array $errors Array that will contain the errors - * @param array $warnings Array that will contain the warnings - * @param string $dir_prefix (optional) directory where source files - * may be found, or empty if they are not available - * @access public - * @return boolean - * @deprecated use the validation of PEAR_PackageFile objects - */ - function validatePackageInfo($info, &$errors, &$warnings, $dir_prefix = '') - { - $config = &PEAR_Config::singleton(); - $packagefile = &new PEAR_PackageFile($config); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - if (strpos($info, 'fromXmlString($info, PEAR_VALIDATE_NORMAL, ''); - } else { - $pf = &$packagefile->fromAnyFile($info, PEAR_VALIDATE_NORMAL); - } - - PEAR::staticPopErrorHandling(); - if (PEAR::isError($pf)) { - $errs = $pf->getUserinfo(); - if (is_array($errs)) { - foreach ($errs as $error) { - if ($error['level'] == 'error') { - $errors[] = $error['message']; - } else { - $warnings[] = $error['message']; - } - } - } - - return false; - } - - return true; - } - - /** - * Build a "provides" array from data returned by - * analyzeSourceCode(). The format of the built array is like - * this: - * - * array( - * 'class;MyClass' => 'array('type' => 'class', 'name' => 'MyClass'), - * ... - * ) - * - * - * @param array $srcinfo array with information about a source file - * as returned by the analyzeSourceCode() method. - * - * @return void - * - * @access public - * - */ - function buildProvidesArray($srcinfo) - { - $file = basename($srcinfo['source_file']); - $pn = ''; - if (isset($this->_packageName)) { - $pn = $this->_packageName; - } - - $pnl = strlen($pn); - foreach ($srcinfo['declared_classes'] as $class) { - $key = "class;$class"; - if (isset($this->pkginfo['provides'][$key])) { - continue; - } - - $this->pkginfo['provides'][$key] = - array('file'=> $file, 'type' => 'class', 'name' => $class); - if (isset($srcinfo['inheritance'][$class])) { - $this->pkginfo['provides'][$key]['extends'] = - $srcinfo['inheritance'][$class]; - } - } - - foreach ($srcinfo['declared_methods'] as $class => $methods) { - foreach ($methods as $method) { - $function = "$class::$method"; - $key = "function;$function"; - if ($method{0} == '_' || !strcasecmp($method, $class) || - isset($this->pkginfo['provides'][$key])) { - continue; - } - - $this->pkginfo['provides'][$key] = - array('file'=> $file, 'type' => 'function', 'name' => $function); - } - } - - foreach ($srcinfo['declared_functions'] as $function) { - $key = "function;$function"; - if ($function{0} == '_' || isset($this->pkginfo['provides'][$key])) { - continue; - } - - if (!strstr($function, '::') && strncasecmp($function, $pn, $pnl)) { - $warnings[] = "in1 " . $file . ": function \"$function\" not prefixed with package name \"$pn\""; - } - - $this->pkginfo['provides'][$key] = - array('file'=> $file, 'type' => 'function', 'name' => $function); - } - } - - /** - * Analyze the source code of the given PHP file - * - * @param string Filename of the PHP file - * @return mixed - * @access public - */ - function analyzeSourceCode($file) - { - if (!class_exists('PEAR_PackageFile_v2_Validator')) { - require_once 'PEAR/PackageFile/v2/Validator.php'; - } - - $a = new PEAR_PackageFile_v2_Validator; - return $a->analyzeSourceCode($file); - } - - function detectDependencies($any, $status_callback = null) - { - if (!function_exists("token_get_all")) { - return false; - } - - if (PEAR::isError($info = $this->infoFromAny($any))) { - return $this->raiseError($info); - } - - if (!is_array($info)) { - return false; - } - - $deps = array(); - $used_c = $decl_c = $decl_f = $decl_m = array(); - foreach ($info['filelist'] as $file => $fa) { - $tmp = $this->analyzeSourceCode($file); - $used_c = @array_merge($used_c, $tmp['used_classes']); - $decl_c = @array_merge($decl_c, $tmp['declared_classes']); - $decl_f = @array_merge($decl_f, $tmp['declared_functions']); - $decl_m = @array_merge($decl_m, $tmp['declared_methods']); - $inheri = @array_merge($inheri, $tmp['inheritance']); - } - - $used_c = array_unique($used_c); - $decl_c = array_unique($decl_c); - $undecl_c = array_diff($used_c, $decl_c); - - return array('used_classes' => $used_c, - 'declared_classes' => $decl_c, - 'declared_methods' => $decl_m, - 'declared_functions' => $decl_f, - 'undeclared_classes' => $undecl_c, - 'inheritance' => $inheri, - ); - } - - /** - * Download a file through HTTP. Considers suggested file name in - * Content-disposition: header and can run a callback function for - * different events. The callback will be called with two - * parameters: the callback type, and parameters. The implemented - * callback types are: - * - * 'setup' called at the very beginning, parameter is a UI object - * that should be used for all output - * 'message' the parameter is a string with an informational message - * 'saveas' may be used to save with a different file name, the - * parameter is the filename that is about to be used. - * If a 'saveas' callback returns a non-empty string, - * that file name will be used as the filename instead. - * Note that $save_dir will not be affected by this, only - * the basename of the file. - * 'start' download is starting, parameter is number of bytes - * that are expected, or -1 if unknown - * 'bytesread' parameter is the number of bytes read so far - * 'done' download is complete, parameter is the total number - * of bytes read - * 'connfailed' if the TCP connection fails, this callback is called - * with array(host,port,errno,errmsg) - * 'writefailed' if writing to disk fails, this callback is called - * with array(destfile,errmsg) - * - * If an HTTP proxy has been configured (http_proxy PEAR_Config - * setting), the proxy will be used. - * - * @param string $url the URL to download - * @param object $ui PEAR_Frontend_* instance - * @param object $config PEAR_Config instance - * @param string $save_dir (optional) directory to save file in - * @param mixed $callback (optional) function/method to call for status - * updates - * - * @return string Returns the full path of the downloaded file or a PEAR - * error on failure. If the error is caused by - * socket-related errors, the error object will - * have the fsockopen error code available through - * getCode(). - * - * @access public - * @deprecated in favor of PEAR_Downloader::downloadHttp() - */ - function downloadHttp($url, &$ui, $save_dir = '.', $callback = null) - { - if (!class_exists('PEAR_Downloader')) { - require_once 'PEAR/Downloader.php'; - } - return PEAR_Downloader::downloadHttp($url, $ui, $save_dir, $callback); - } -} - -require_once 'PEAR/Config.php'; -require_once 'PEAR/PackageFile.php'; \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Config.php b/_piecrust/libs/PEAR/Config.php deleted file mode 100644 index 86a7db3..0000000 --- a/_piecrust/libs/PEAR/Config.php +++ /dev/null @@ -1,2097 +0,0 @@ - - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Config.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/** - * Required for error handling - */ -require_once 'PEAR.php'; -require_once 'PEAR/Registry.php'; -require_once 'PEAR/Installer/Role.php'; -require_once 'System.php'; - -/** - * Last created PEAR_Config instance. - * @var object - */ -$GLOBALS['_PEAR_Config_instance'] = null; -if (!defined('PEAR_INSTALL_DIR') || !PEAR_INSTALL_DIR) { - $PEAR_INSTALL_DIR = PHP_LIBDIR . DIRECTORY_SEPARATOR . 'pear'; -} else { - $PEAR_INSTALL_DIR = PEAR_INSTALL_DIR; -} - -// Below we define constants with default values for all configuration -// parameters except username/password. All of them can have their -// defaults set through environment variables. The reason we use the -// PHP_ prefix is for some security, PHP protects environment -// variables starting with PHP_*. - -// default channel and preferred mirror is based on whether we are invoked through -// the "pear" or the "pecl" command -if (!defined('PEAR_RUNTYPE')) { - define('PEAR_RUNTYPE', 'pear'); -} - -if (PEAR_RUNTYPE == 'pear') { - define('PEAR_CONFIG_DEFAULT_CHANNEL', 'pear.php.net'); -} else { - define('PEAR_CONFIG_DEFAULT_CHANNEL', 'pecl.php.net'); -} - -if (getenv('PHP_PEAR_SYSCONF_DIR')) { - define('PEAR_CONFIG_SYSCONFDIR', getenv('PHP_PEAR_SYSCONF_DIR')); -} elseif (getenv('SystemRoot')) { - define('PEAR_CONFIG_SYSCONFDIR', getenv('SystemRoot')); -} else { - define('PEAR_CONFIG_SYSCONFDIR', PHP_SYSCONFDIR); -} - -// Default for master_server -if (getenv('PHP_PEAR_MASTER_SERVER')) { - define('PEAR_CONFIG_DEFAULT_MASTER_SERVER', getenv('PHP_PEAR_MASTER_SERVER')); -} else { - define('PEAR_CONFIG_DEFAULT_MASTER_SERVER', 'pear.php.net'); -} - -// Default for http_proxy -if (getenv('PHP_PEAR_HTTP_PROXY')) { - define('PEAR_CONFIG_DEFAULT_HTTP_PROXY', getenv('PHP_PEAR_HTTP_PROXY')); -} elseif (getenv('http_proxy')) { - define('PEAR_CONFIG_DEFAULT_HTTP_PROXY', getenv('http_proxy')); -} else { - define('PEAR_CONFIG_DEFAULT_HTTP_PROXY', ''); -} - -// Default for php_dir -if (getenv('PHP_PEAR_INSTALL_DIR')) { - define('PEAR_CONFIG_DEFAULT_PHP_DIR', getenv('PHP_PEAR_INSTALL_DIR')); -} else { - if (@file_exists($PEAR_INSTALL_DIR) && is_dir($PEAR_INSTALL_DIR)) { - define('PEAR_CONFIG_DEFAULT_PHP_DIR', $PEAR_INSTALL_DIR); - } else { - define('PEAR_CONFIG_DEFAULT_PHP_DIR', $PEAR_INSTALL_DIR); - } -} - -// Default for ext_dir -if (getenv('PHP_PEAR_EXTENSION_DIR')) { - define('PEAR_CONFIG_DEFAULT_EXT_DIR', getenv('PHP_PEAR_EXTENSION_DIR')); -} else { - if (ini_get('extension_dir')) { - define('PEAR_CONFIG_DEFAULT_EXT_DIR', ini_get('extension_dir')); - } elseif (defined('PEAR_EXTENSION_DIR') && - file_exists(PEAR_EXTENSION_DIR) && is_dir(PEAR_EXTENSION_DIR)) { - define('PEAR_CONFIG_DEFAULT_EXT_DIR', PEAR_EXTENSION_DIR); - } elseif (defined('PHP_EXTENSION_DIR')) { - define('PEAR_CONFIG_DEFAULT_EXT_DIR', PHP_EXTENSION_DIR); - } else { - define('PEAR_CONFIG_DEFAULT_EXT_DIR', '.'); - } -} - -// Default for doc_dir -if (getenv('PHP_PEAR_DOC_DIR')) { - define('PEAR_CONFIG_DEFAULT_DOC_DIR', getenv('PHP_PEAR_DOC_DIR')); -} else { - define('PEAR_CONFIG_DEFAULT_DOC_DIR', - $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'docs'); -} - -// Default for bin_dir -if (getenv('PHP_PEAR_BIN_DIR')) { - define('PEAR_CONFIG_DEFAULT_BIN_DIR', getenv('PHP_PEAR_BIN_DIR')); -} else { - define('PEAR_CONFIG_DEFAULT_BIN_DIR', PHP_BINDIR); -} - -// Default for data_dir -if (getenv('PHP_PEAR_DATA_DIR')) { - define('PEAR_CONFIG_DEFAULT_DATA_DIR', getenv('PHP_PEAR_DATA_DIR')); -} else { - define('PEAR_CONFIG_DEFAULT_DATA_DIR', - $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'data'); -} - -// Default for cfg_dir -if (getenv('PHP_PEAR_CFG_DIR')) { - define('PEAR_CONFIG_DEFAULT_CFG_DIR', getenv('PHP_PEAR_CFG_DIR')); -} else { - define('PEAR_CONFIG_DEFAULT_CFG_DIR', - $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'cfg'); -} - -// Default for www_dir -if (getenv('PHP_PEAR_WWW_DIR')) { - define('PEAR_CONFIG_DEFAULT_WWW_DIR', getenv('PHP_PEAR_WWW_DIR')); -} else { - define('PEAR_CONFIG_DEFAULT_WWW_DIR', - $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'www'); -} - -// Default for test_dir -if (getenv('PHP_PEAR_TEST_DIR')) { - define('PEAR_CONFIG_DEFAULT_TEST_DIR', getenv('PHP_PEAR_TEST_DIR')); -} else { - define('PEAR_CONFIG_DEFAULT_TEST_DIR', - $PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'tests'); -} - -// Default for temp_dir -if (getenv('PHP_PEAR_TEMP_DIR')) { - define('PEAR_CONFIG_DEFAULT_TEMP_DIR', getenv('PHP_PEAR_TEMP_DIR')); -} else { - define('PEAR_CONFIG_DEFAULT_TEMP_DIR', - System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' . - DIRECTORY_SEPARATOR . 'temp'); -} - -// Default for cache_dir -if (getenv('PHP_PEAR_CACHE_DIR')) { - define('PEAR_CONFIG_DEFAULT_CACHE_DIR', getenv('PHP_PEAR_CACHE_DIR')); -} else { - define('PEAR_CONFIG_DEFAULT_CACHE_DIR', - System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' . - DIRECTORY_SEPARATOR . 'cache'); -} - -// Default for download_dir -if (getenv('PHP_PEAR_DOWNLOAD_DIR')) { - define('PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR', getenv('PHP_PEAR_DOWNLOAD_DIR')); -} else { - define('PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR', - System::tmpdir() . DIRECTORY_SEPARATOR . 'pear' . - DIRECTORY_SEPARATOR . 'download'); -} - -// Default for php_bin -if (getenv('PHP_PEAR_PHP_BIN')) { - define('PEAR_CONFIG_DEFAULT_PHP_BIN', getenv('PHP_PEAR_PHP_BIN')); -} else { - define('PEAR_CONFIG_DEFAULT_PHP_BIN', PEAR_CONFIG_DEFAULT_BIN_DIR. - DIRECTORY_SEPARATOR.'php'.(OS_WINDOWS ? '.exe' : '')); -} - -// Default for verbose -if (getenv('PHP_PEAR_VERBOSE')) { - define('PEAR_CONFIG_DEFAULT_VERBOSE', getenv('PHP_PEAR_VERBOSE')); -} else { - define('PEAR_CONFIG_DEFAULT_VERBOSE', 1); -} - -// Default for preferred_state -if (getenv('PHP_PEAR_PREFERRED_STATE')) { - define('PEAR_CONFIG_DEFAULT_PREFERRED_STATE', getenv('PHP_PEAR_PREFERRED_STATE')); -} else { - define('PEAR_CONFIG_DEFAULT_PREFERRED_STATE', 'stable'); -} - -// Default for umask -if (getenv('PHP_PEAR_UMASK')) { - define('PEAR_CONFIG_DEFAULT_UMASK', getenv('PHP_PEAR_UMASK')); -} else { - define('PEAR_CONFIG_DEFAULT_UMASK', decoct(umask())); -} - -// Default for cache_ttl -if (getenv('PHP_PEAR_CACHE_TTL')) { - define('PEAR_CONFIG_DEFAULT_CACHE_TTL', getenv('PHP_PEAR_CACHE_TTL')); -} else { - define('PEAR_CONFIG_DEFAULT_CACHE_TTL', 3600); -} - -// Default for sig_type -if (getenv('PHP_PEAR_SIG_TYPE')) { - define('PEAR_CONFIG_DEFAULT_SIG_TYPE', getenv('PHP_PEAR_SIG_TYPE')); -} else { - define('PEAR_CONFIG_DEFAULT_SIG_TYPE', 'gpg'); -} - -// Default for sig_bin -if (getenv('PHP_PEAR_SIG_BIN')) { - define('PEAR_CONFIG_DEFAULT_SIG_BIN', getenv('PHP_PEAR_SIG_BIN')); -} else { - define('PEAR_CONFIG_DEFAULT_SIG_BIN', - System::which( - 'gpg', OS_WINDOWS ? 'c:\gnupg\gpg.exe' : '/usr/local/bin/gpg')); -} - -// Default for sig_keydir -if (getenv('PHP_PEAR_SIG_KEYDIR')) { - define('PEAR_CONFIG_DEFAULT_SIG_KEYDIR', getenv('PHP_PEAR_SIG_KEYDIR')); -} else { - define('PEAR_CONFIG_DEFAULT_SIG_KEYDIR', - PEAR_CONFIG_SYSCONFDIR . DIRECTORY_SEPARATOR . 'pearkeys'); -} - -/** - * This is a class for storing configuration data, keeping track of - * which are system-defined, user-defined or defaulted. - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ -class PEAR_Config extends PEAR -{ - /** - * Array of config files used. - * - * @var array layer => config file - */ - var $files = array( - 'system' => '', - 'user' => '', - ); - - var $layers = array(); - - /** - * Configuration data, two-dimensional array where the first - * dimension is the config layer ('user', 'system' and 'default'), - * and the second dimension is keyname => value. - * - * The order in the first dimension is important! Earlier - * layers will shadow later ones when a config value is - * requested (if a 'user' value exists, it will be returned first, - * then 'system' and finally 'default'). - * - * @var array layer => array(keyname => value, ...) - */ - var $configuration = array( - 'user' => array(), - 'system' => array(), - 'default' => array(), - ); - - /** - * Configuration values that can be set for a channel - * - * All other configuration values can only have a global value - * @var array - * @access private - */ - var $_channelConfigInfo = array( - 'php_dir', 'ext_dir', 'doc_dir', 'bin_dir', 'data_dir', 'cfg_dir', - 'test_dir', 'www_dir', 'php_bin', 'php_prefix', 'php_suffix', 'username', - 'password', 'verbose', 'preferred_state', 'umask', 'preferred_mirror', 'php_ini' - ); - - /** - * Channels that can be accessed - * @see setChannels() - * @var array - * @access private - */ - var $_channels = array('pear.php.net', 'pecl.php.net', '__uri'); - - /** - * This variable is used to control the directory values returned - * @see setInstallRoot(); - * @var string|false - * @access private - */ - var $_installRoot = false; - - /** - * If requested, this will always refer to the registry - * contained in php_dir - * @var PEAR_Registry - */ - var $_registry = array(); - - /** - * @var array - * @access private - */ - var $_regInitialized = array(); - - /** - * @var bool - * @access private - */ - var $_noRegistry = false; - - /** - * amount of errors found while parsing config - * @var integer - * @access private - */ - var $_errorsFound = 0; - var $_lastError = null; - - /** - * Information about the configuration data. Stores the type, - * default value and a documentation string for each configuration - * value. - * - * @var array layer => array(infotype => value, ...) - */ - var $configuration_info = array( - // Channels/Internet Access - 'default_channel' => array( - 'type' => 'string', - 'default' => PEAR_CONFIG_DEFAULT_CHANNEL, - 'doc' => 'the default channel to use for all non explicit commands', - 'prompt' => 'Default Channel', - 'group' => 'Internet Access', - ), - 'preferred_mirror' => array( - 'type' => 'string', - 'default' => PEAR_CONFIG_DEFAULT_CHANNEL, - 'doc' => 'the default server or mirror to use for channel actions', - 'prompt' => 'Default Channel Mirror', - 'group' => 'Internet Access', - ), - 'remote_config' => array( - 'type' => 'password', - 'default' => '', - 'doc' => 'ftp url of remote configuration file to use for synchronized install', - 'prompt' => 'Remote Configuration File', - 'group' => 'Internet Access', - ), - 'auto_discover' => array( - 'type' => 'integer', - 'default' => 0, - 'doc' => 'whether to automatically discover new channels', - 'prompt' => 'Auto-discover new Channels', - 'group' => 'Internet Access', - ), - // Internet Access - 'master_server' => array( - 'type' => 'string', - 'default' => 'pear.php.net', - 'doc' => 'name of the main PEAR server [NOT USED IN THIS VERSION]', - 'prompt' => 'PEAR server [DEPRECATED]', - 'group' => 'Internet Access', - ), - 'http_proxy' => array( - 'type' => 'string', - 'default' => PEAR_CONFIG_DEFAULT_HTTP_PROXY, - 'doc' => 'HTTP proxy (host:port) to use when downloading packages', - 'prompt' => 'HTTP Proxy Server Address', - 'group' => 'Internet Access', - ), - // File Locations - 'php_dir' => array( - 'type' => 'directory', - 'default' => PEAR_CONFIG_DEFAULT_PHP_DIR, - 'doc' => 'directory where .php files are installed', - 'prompt' => 'PEAR directory', - 'group' => 'File Locations', - ), - 'ext_dir' => array( - 'type' => 'directory', - 'default' => PEAR_CONFIG_DEFAULT_EXT_DIR, - 'doc' => 'directory where loadable extensions are installed', - 'prompt' => 'PHP extension directory', - 'group' => 'File Locations', - ), - 'doc_dir' => array( - 'type' => 'directory', - 'default' => PEAR_CONFIG_DEFAULT_DOC_DIR, - 'doc' => 'directory where documentation is installed', - 'prompt' => 'PEAR documentation directory', - 'group' => 'File Locations', - ), - 'bin_dir' => array( - 'type' => 'directory', - 'default' => PEAR_CONFIG_DEFAULT_BIN_DIR, - 'doc' => 'directory where executables are installed', - 'prompt' => 'PEAR executables directory', - 'group' => 'File Locations', - ), - 'data_dir' => array( - 'type' => 'directory', - 'default' => PEAR_CONFIG_DEFAULT_DATA_DIR, - 'doc' => 'directory where data files are installed', - 'prompt' => 'PEAR data directory', - 'group' => 'File Locations (Advanced)', - ), - 'cfg_dir' => array( - 'type' => 'directory', - 'default' => PEAR_CONFIG_DEFAULT_CFG_DIR, - 'doc' => 'directory where modifiable configuration files are installed', - 'prompt' => 'PEAR configuration file directory', - 'group' => 'File Locations (Advanced)', - ), - 'www_dir' => array( - 'type' => 'directory', - 'default' => PEAR_CONFIG_DEFAULT_WWW_DIR, - 'doc' => 'directory where www frontend files (html/js) are installed', - 'prompt' => 'PEAR www files directory', - 'group' => 'File Locations (Advanced)', - ), - 'test_dir' => array( - 'type' => 'directory', - 'default' => PEAR_CONFIG_DEFAULT_TEST_DIR, - 'doc' => 'directory where regression tests are installed', - 'prompt' => 'PEAR test directory', - 'group' => 'File Locations (Advanced)', - ), - 'cache_dir' => array( - 'type' => 'directory', - 'default' => PEAR_CONFIG_DEFAULT_CACHE_DIR, - 'doc' => 'directory which is used for web service cache', - 'prompt' => 'PEAR Installer cache directory', - 'group' => 'File Locations (Advanced)', - ), - 'temp_dir' => array( - 'type' => 'directory', - 'default' => PEAR_CONFIG_DEFAULT_TEMP_DIR, - 'doc' => 'directory which is used for all temp files', - 'prompt' => 'PEAR Installer temp directory', - 'group' => 'File Locations (Advanced)', - ), - 'download_dir' => array( - 'type' => 'directory', - 'default' => PEAR_CONFIG_DEFAULT_DOWNLOAD_DIR, - 'doc' => 'directory which is used for all downloaded files', - 'prompt' => 'PEAR Installer download directory', - 'group' => 'File Locations (Advanced)', - ), - 'php_bin' => array( - 'type' => 'file', - 'default' => PEAR_CONFIG_DEFAULT_PHP_BIN, - 'doc' => 'PHP CLI/CGI binary for executing scripts', - 'prompt' => 'PHP CLI/CGI binary', - 'group' => 'File Locations (Advanced)', - ), - 'php_prefix' => array( - 'type' => 'string', - 'default' => '', - 'doc' => '--program-prefix for php_bin\'s ./configure, used for pecl installs', - 'prompt' => '--program-prefix passed to PHP\'s ./configure', - 'group' => 'File Locations (Advanced)', - ), - 'php_suffix' => array( - 'type' => 'string', - 'default' => '', - 'doc' => '--program-suffix for php_bin\'s ./configure, used for pecl installs', - 'prompt' => '--program-suffix passed to PHP\'s ./configure', - 'group' => 'File Locations (Advanced)', - ), - 'php_ini' => array( - 'type' => 'file', - 'default' => '', - 'doc' => 'location of php.ini in which to enable PECL extensions on install', - 'prompt' => 'php.ini location', - 'group' => 'File Locations (Advanced)', - ), - // Maintainers - 'username' => array( - 'type' => 'string', - 'default' => '', - 'doc' => '(maintainers) your PEAR account name', - 'prompt' => 'PEAR username (for maintainers)', - 'group' => 'Maintainers', - ), - 'password' => array( - 'type' => 'password', - 'default' => '', - 'doc' => '(maintainers) your PEAR account password', - 'prompt' => 'PEAR password (for maintainers)', - 'group' => 'Maintainers', - ), - // Advanced - 'verbose' => array( - 'type' => 'integer', - 'default' => PEAR_CONFIG_DEFAULT_VERBOSE, - 'doc' => 'verbosity level -0: really quiet -1: somewhat quiet -2: verbose -3: debug', - 'prompt' => 'Debug Log Level', - 'group' => 'Advanced', - ), - 'preferred_state' => array( - 'type' => 'set', - 'default' => PEAR_CONFIG_DEFAULT_PREFERRED_STATE, - 'doc' => 'the installer will prefer releases with this state when installing packages without a version or state specified', - 'valid_set' => array( - 'stable', 'beta', 'alpha', 'devel', 'snapshot'), - 'prompt' => 'Preferred Package State', - 'group' => 'Advanced', - ), - 'umask' => array( - 'type' => 'mask', - 'default' => PEAR_CONFIG_DEFAULT_UMASK, - 'doc' => 'umask used when creating files (Unix-like systems only)', - 'prompt' => 'Unix file mask', - 'group' => 'Advanced', - ), - 'cache_ttl' => array( - 'type' => 'integer', - 'default' => PEAR_CONFIG_DEFAULT_CACHE_TTL, - 'doc' => 'amount of secs where the local cache is used and not updated', - 'prompt' => 'Cache TimeToLive', - 'group' => 'Advanced', - ), - 'sig_type' => array( - 'type' => 'set', - 'default' => PEAR_CONFIG_DEFAULT_SIG_TYPE, - 'doc' => 'which package signature mechanism to use', - 'valid_set' => array('gpg'), - 'prompt' => 'Package Signature Type', - 'group' => 'Maintainers', - ), - 'sig_bin' => array( - 'type' => 'string', - 'default' => PEAR_CONFIG_DEFAULT_SIG_BIN, - 'doc' => 'which package signature mechanism to use', - 'prompt' => 'Signature Handling Program', - 'group' => 'Maintainers', - ), - 'sig_keyid' => array( - 'type' => 'string', - 'default' => '', - 'doc' => 'which key to use for signing with', - 'prompt' => 'Signature Key Id', - 'group' => 'Maintainers', - ), - 'sig_keydir' => array( - 'type' => 'directory', - 'default' => PEAR_CONFIG_DEFAULT_SIG_KEYDIR, - 'doc' => 'directory where signature keys are located', - 'prompt' => 'Signature Key Directory', - 'group' => 'Maintainers', - ), - // __channels is reserved - used for channel-specific configuration - ); - - /** - * Constructor. - * - * @param string file to read user-defined options from - * @param string file to read system-wide defaults from - * @param bool determines whether a registry object "follows" - * the value of php_dir (is automatically created - * and moved when php_dir is changed) - * @param bool if true, fails if configuration files cannot be loaded - * - * @access public - * - * @see PEAR_Config::singleton - */ - function PEAR_Config($user_file = '', $system_file = '', $ftp_file = false, - $strict = true) - { - $this->PEAR(); - PEAR_Installer_Role::initializeConfig($this); - $sl = DIRECTORY_SEPARATOR; - if (empty($user_file)) { - if (OS_WINDOWS) { - $user_file = PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.ini'; - } else { - $user_file = getenv('HOME') . $sl . '.pearrc'; - } - } - - if (empty($system_file)) { - $system_file = PEAR_CONFIG_SYSCONFDIR . $sl; - if (OS_WINDOWS) { - $system_file .= 'pearsys.ini'; - } else { - $system_file .= 'pear.conf'; - } - } - - $this->layers = array_keys($this->configuration); - $this->files['user'] = $user_file; - $this->files['system'] = $system_file; - if ($user_file && file_exists($user_file)) { - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $this->readConfigFile($user_file, 'user', $strict); - $this->popErrorHandling(); - if ($this->_errorsFound > 0) { - return; - } - } - - if ($system_file && @file_exists($system_file)) { - $this->mergeConfigFile($system_file, false, 'system', $strict); - if ($this->_errorsFound > 0) { - return; - } - - } - - if (!$ftp_file) { - $ftp_file = $this->get('remote_config'); - } - - if ($ftp_file && defined('PEAR_REMOTEINSTALL_OK')) { - $this->readFTPConfigFile($ftp_file); - } - - foreach ($this->configuration_info as $key => $info) { - $this->configuration['default'][$key] = $info['default']; - } - - $this->_registry['default'] = &new PEAR_Registry($this->configuration['default']['php_dir']); - $this->_registry['default']->setConfig($this, false); - $this->_regInitialized['default'] = false; - //$GLOBALS['_PEAR_Config_instance'] = &$this; - } - - /** - * Return the default locations of user and system configuration files - * @static - */ - function getDefaultConfigFiles() - { - $sl = DIRECTORY_SEPARATOR; - if (OS_WINDOWS) { - return array( - 'user' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.ini', - 'system' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pearsys.ini' - ); - } - - return array( - 'user' => getenv('HOME') . $sl . '.pearrc', - 'system' => PEAR_CONFIG_SYSCONFDIR . $sl . 'pear.conf' - ); - } - - /** - * Static singleton method. If you want to keep only one instance - * of this class in use, this method will give you a reference to - * the last created PEAR_Config object if one exists, or create a - * new object. - * - * @param string (optional) file to read user-defined options from - * @param string (optional) file to read system-wide defaults from - * - * @return object an existing or new PEAR_Config instance - * - * @access public - * - * @see PEAR_Config::PEAR_Config - */ - function &singleton($user_file = '', $system_file = '', $strict = true) - { - if (is_object($GLOBALS['_PEAR_Config_instance'])) { - return $GLOBALS['_PEAR_Config_instance']; - } - - $t_conf = &new PEAR_Config($user_file, $system_file, false, $strict); - if ($t_conf->_errorsFound > 0) { - return $t_conf->lastError; - } - - $GLOBALS['_PEAR_Config_instance'] = &$t_conf; - return $GLOBALS['_PEAR_Config_instance']; - } - - /** - * Determine whether any configuration files have been detected, and whether a - * registry object can be retrieved from this configuration. - * @return bool - * @since PEAR 1.4.0a1 - */ - function validConfiguration() - { - if ($this->isDefinedLayer('user') || $this->isDefinedLayer('system')) { - return true; - } - - return false; - } - - /** - * Reads configuration data from a file. All existing values in - * the config layer are discarded and replaced with data from the - * file. - * @param string file to read from, if NULL or not specified, the - * last-used file for the same layer (second param) is used - * @param string config layer to insert data into ('user' or 'system') - * @return bool TRUE on success or a PEAR error on failure - */ - function readConfigFile($file = null, $layer = 'user', $strict = true) - { - if (empty($this->files[$layer])) { - return $this->raiseError("unknown config layer `$layer'"); - } - - if ($file === null) { - $file = $this->files[$layer]; - } - - $data = $this->_readConfigDataFrom($file); - if (PEAR::isError($data)) { - if (!$strict) { - return true; - } - - $this->_errorsFound++; - $this->lastError = $data; - - return $data; - } - - $this->files[$layer] = $file; - $this->_decodeInput($data); - $this->configuration[$layer] = $data; - $this->_setupChannels(); - if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) { - $this->_registry[$layer] = &new PEAR_Registry($phpdir); - $this->_registry[$layer]->setConfig($this, false); - $this->_regInitialized[$layer] = false; - } else { - unset($this->_registry[$layer]); - } - return true; - } - - /** - * @param string url to the remote config file, like ftp://www.example.com/pear/config.ini - * @return true|PEAR_Error - */ - function readFTPConfigFile($path) - { - do { // poor man's try - if (!class_exists('PEAR_FTP')) { - if (!class_exists('PEAR_Common')) { - require_once 'PEAR/Common.php'; - } - if (PEAR_Common::isIncludeable('PEAR/FTP.php')) { - require_once 'PEAR/FTP.php'; - } - } - - if (!class_exists('PEAR_FTP')) { - return PEAR::raiseError('PEAR_RemoteInstaller must be installed to use remote config'); - } - - $this->_ftp = &new PEAR_FTP; - $this->_ftp->pushErrorHandling(PEAR_ERROR_RETURN); - $e = $this->_ftp->init($path); - if (PEAR::isError($e)) { - $this->_ftp->popErrorHandling(); - return $e; - } - - $tmp = System::mktemp('-d'); - PEAR_Common::addTempFile($tmp); - $e = $this->_ftp->get(basename($path), $tmp . DIRECTORY_SEPARATOR . - 'pear.ini', false, FTP_BINARY); - if (PEAR::isError($e)) { - $this->_ftp->popErrorHandling(); - return $e; - } - - PEAR_Common::addTempFile($tmp . DIRECTORY_SEPARATOR . 'pear.ini'); - $this->_ftp->disconnect(); - $this->_ftp->popErrorHandling(); - $this->files['ftp'] = $tmp . DIRECTORY_SEPARATOR . 'pear.ini'; - $e = $this->readConfigFile(null, 'ftp'); - if (PEAR::isError($e)) { - return $e; - } - - $fail = array(); - foreach ($this->configuration_info as $key => $val) { - if (in_array($this->getGroup($key), - array('File Locations', 'File Locations (Advanced)')) && - $this->getType($key) == 'directory') { - // any directory configs must be set for this to work - if (!isset($this->configuration['ftp'][$key])) { - $fail[] = $key; - } - } - } - - if (!count($fail)) { - return true; - } - - $fail = '"' . implode('", "', $fail) . '"'; - unset($this->files['ftp']); - unset($this->configuration['ftp']); - return PEAR::raiseError('ERROR: Ftp configuration file must set all ' . - 'directory configuration variables. These variables were not set: ' . - $fail); - } while (false); // poor man's catch - unset($this->files['ftp']); - return PEAR::raiseError('no remote host specified'); - } - - /** - * Reads the existing configurations and creates the _channels array from it - */ - function _setupChannels() - { - $set = array_flip(array_values($this->_channels)); - foreach ($this->configuration as $layer => $data) { - $i = 1000; - if (isset($data['__channels']) && is_array($data['__channels'])) { - foreach ($data['__channels'] as $channel => $info) { - $set[$channel] = $i++; - } - } - } - $this->_channels = array_values(array_flip($set)); - $this->setChannels($this->_channels); - } - - function deleteChannel($channel) - { - $ch = strtolower($channel); - foreach ($this->configuration as $layer => $data) { - if (isset($data['__channels']) && isset($data['__channels'][$ch])) { - unset($this->configuration[$layer]['__channels'][$ch]); - } - } - - $this->_channels = array_flip($this->_channels); - unset($this->_channels[$ch]); - $this->_channels = array_flip($this->_channels); - } - - /** - * Merges data into a config layer from a file. Does the same - * thing as readConfigFile, except it does not replace all - * existing values in the config layer. - * @param string file to read from - * @param bool whether to overwrite existing data (default TRUE) - * @param string config layer to insert data into ('user' or 'system') - * @param string if true, errors are returned if file opening fails - * @return bool TRUE on success or a PEAR error on failure - */ - function mergeConfigFile($file, $override = true, $layer = 'user', $strict = true) - { - if (empty($this->files[$layer])) { - return $this->raiseError("unknown config layer `$layer'"); - } - - if ($file === null) { - $file = $this->files[$layer]; - } - - $data = $this->_readConfigDataFrom($file); - if (PEAR::isError($data)) { - if (!$strict) { - return true; - } - - $this->_errorsFound++; - $this->lastError = $data; - - return $data; - } - - $this->_decodeInput($data); - if ($override) { - $this->configuration[$layer] = - PEAR_Config::arrayMergeRecursive($this->configuration[$layer], $data); - } else { - $this->configuration[$layer] = - PEAR_Config::arrayMergeRecursive($data, $this->configuration[$layer]); - } - - $this->_setupChannels(); - if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) { - $this->_registry[$layer] = &new PEAR_Registry($phpdir); - $this->_registry[$layer]->setConfig($this, false); - $this->_regInitialized[$layer] = false; - } else { - unset($this->_registry[$layer]); - } - return true; - } - - /** - * @param array - * @param array - * @return array - * @static - */ - function arrayMergeRecursive($arr2, $arr1) - { - $ret = array(); - foreach ($arr2 as $key => $data) { - if (!isset($arr1[$key])) { - $ret[$key] = $data; - unset($arr1[$key]); - continue; - } - if (is_array($data)) { - if (!is_array($arr1[$key])) { - $ret[$key] = $arr1[$key]; - unset($arr1[$key]); - continue; - } - $ret[$key] = PEAR_Config::arrayMergeRecursive($arr1[$key], $arr2[$key]); - unset($arr1[$key]); - } - } - - return array_merge($ret, $arr1); - } - - /** - * Writes data into a config layer from a file. - * - * @param string|null file to read from, or null for default - * @param string config layer to insert data into ('user' or - * 'system') - * @param string|null data to write to config file or null for internal data [DEPRECATED] - * @return bool TRUE on success or a PEAR error on failure - */ - function writeConfigFile($file = null, $layer = 'user', $data = null) - { - $this->_lazyChannelSetup($layer); - if ($layer == 'both' || $layer == 'all') { - foreach ($this->files as $type => $file) { - $err = $this->writeConfigFile($file, $type, $data); - if (PEAR::isError($err)) { - return $err; - } - } - return true; - } - - if (empty($this->files[$layer])) { - return $this->raiseError("unknown config file type `$layer'"); - } - - if ($file === null) { - $file = $this->files[$layer]; - } - - $data = ($data === null) ? $this->configuration[$layer] : $data; - $this->_encodeOutput($data); - $opt = array('-p', dirname($file)); - if (!@System::mkDir($opt)) { - return $this->raiseError("could not create directory: " . dirname($file)); - } - - if (file_exists($file) && is_file($file) && !is_writeable($file)) { - return $this->raiseError("no write access to $file!"); - } - - $fp = @fopen($file, "w"); - if (!$fp) { - return $this->raiseError("PEAR_Config::writeConfigFile fopen('$file','w') failed ($php_errormsg)"); - } - - $contents = "#PEAR_Config 0.9\n" . serialize($data); - if (!@fwrite($fp, $contents)) { - return $this->raiseError("PEAR_Config::writeConfigFile: fwrite failed ($php_errormsg)"); - } - return true; - } - - /** - * Reads configuration data from a file and returns the parsed data - * in an array. - * - * @param string file to read from - * @return array configuration data or a PEAR error on failure - * @access private - */ - function _readConfigDataFrom($file) - { - $fp = false; - if (file_exists($file)) { - $fp = @fopen($file, "r"); - } - - if (!$fp) { - return $this->raiseError("PEAR_Config::readConfigFile fopen('$file','r') failed"); - } - - $size = filesize($file); - $rt = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - fclose($fp); - $contents = file_get_contents($file); - if (empty($contents)) { - return $this->raiseError('Configuration file "' . $file . '" is empty'); - } - - set_magic_quotes_runtime($rt); - - $version = false; - if (preg_match('/^#PEAR_Config\s+(\S+)\s+/si', $contents, $matches)) { - $version = $matches[1]; - $contents = substr($contents, strlen($matches[0])); - } else { - // Museum config file - if (substr($contents,0,2) == 'a:') { - $version = '0.1'; - } - } - - if ($version && version_compare("$version", '1', '<')) { - // no '@', it is possible that unserialize - // raises a notice but it seems to block IO to - // STDOUT if a '@' is used and a notice is raise - $data = unserialize($contents); - - if (!is_array($data) && !$data) { - if ($contents == serialize(false)) { - $data = array(); - } else { - $err = $this->raiseError("PEAR_Config: bad data in $file"); - return $err; - } - } - if (!is_array($data)) { - if (strlen(trim($contents)) > 0) { - $error = "PEAR_Config: bad data in $file"; - $err = $this->raiseError($error); - return $err; - } - - $data = array(); - } - // add parsing of newer formats here... - } else { - $err = $this->raiseError("$file: unknown version `$version'"); - return $err; - } - - return $data; - } - - /** - * Gets the file used for storing the config for a layer - * - * @param string $layer 'user' or 'system' - */ - function getConfFile($layer) - { - return $this->files[$layer]; - } - - /** - * @param string Configuration class name, used for detecting duplicate calls - * @param array information on a role as parsed from its xml file - * @return true|PEAR_Error - * @access private - */ - function _addConfigVars($class, $vars) - { - static $called = array(); - if (isset($called[$class])) { - return; - } - - $called[$class] = 1; - if (count($vars) > 3) { - return $this->raiseError('Roles can only define 3 new config variables or less'); - } - - foreach ($vars as $name => $var) { - if (!is_array($var)) { - return $this->raiseError('Configuration information must be an array'); - } - - if (!isset($var['type'])) { - return $this->raiseError('Configuration information must contain a type'); - } elseif (!in_array($var['type'], - array('string', 'mask', 'password', 'directory', 'file', 'set'))) { - return $this->raiseError( - 'Configuration type must be one of directory, file, string, ' . - 'mask, set, or password'); - } - if (!isset($var['default'])) { - return $this->raiseError( - 'Configuration information must contain a default value ("default" index)'); - } - - if (is_array($var['default'])) { - $real_default = ''; - foreach ($var['default'] as $config_var => $val) { - if (strpos($config_var, 'text') === 0) { - $real_default .= $val; - } elseif (strpos($config_var, 'constant') === 0) { - if (!defined($val)) { - return $this->raiseError( - 'Unknown constant "' . $val . '" requested in ' . - 'default value for configuration variable "' . - $name . '"'); - } - - $real_default .= constant($val); - } elseif (isset($this->configuration_info[$config_var])) { - $real_default .= - $this->configuration_info[$config_var]['default']; - } else { - return $this->raiseError( - 'Unknown request for "' . $config_var . '" value in ' . - 'default value for configuration variable "' . - $name . '"'); - } - } - $var['default'] = $real_default; - } - - if ($var['type'] == 'integer') { - $var['default'] = (integer) $var['default']; - } - - if (!isset($var['doc'])) { - return $this->raiseError( - 'Configuration information must contain a summary ("doc" index)'); - } - - if (!isset($var['prompt'])) { - return $this->raiseError( - 'Configuration information must contain a simple prompt ("prompt" index)'); - } - - if (!isset($var['group'])) { - return $this->raiseError( - 'Configuration information must contain a simple group ("group" index)'); - } - - if (isset($this->configuration_info[$name])) { - return $this->raiseError('Configuration variable "' . $name . - '" already exists'); - } - - $this->configuration_info[$name] = $var; - // fix bug #7351: setting custom config variable in a channel fails - $this->_channelConfigInfo[] = $name; - } - - return true; - } - - /** - * Encodes/scrambles configuration data before writing to files. - * Currently, 'password' values will be base64-encoded as to avoid - * that people spot cleartext passwords by accident. - * - * @param array (reference) array to encode values in - * @return bool TRUE on success - * @access private - */ - function _encodeOutput(&$data) - { - foreach ($data as $key => $value) { - if ($key == '__channels') { - foreach ($data['__channels'] as $channel => $blah) { - $this->_encodeOutput($data['__channels'][$channel]); - } - } - - if (!isset($this->configuration_info[$key])) { - continue; - } - - $type = $this->configuration_info[$key]['type']; - switch ($type) { - // we base64-encode passwords so they are at least - // not shown in plain by accident - case 'password': { - $data[$key] = base64_encode($data[$key]); - break; - } - case 'mask': { - $data[$key] = octdec($data[$key]); - break; - } - } - } - - return true; - } - - /** - * Decodes/unscrambles configuration data after reading from files. - * - * @param array (reference) array to encode values in - * @return bool TRUE on success - * @access private - * - * @see PEAR_Config::_encodeOutput - */ - function _decodeInput(&$data) - { - if (!is_array($data)) { - return true; - } - - foreach ($data as $key => $value) { - if ($key == '__channels') { - foreach ($data['__channels'] as $channel => $blah) { - $this->_decodeInput($data['__channels'][$channel]); - } - } - - if (!isset($this->configuration_info[$key])) { - continue; - } - - $type = $this->configuration_info[$key]['type']; - switch ($type) { - case 'password': { - $data[$key] = base64_decode($data[$key]); - break; - } - case 'mask': { - $data[$key] = decoct($data[$key]); - break; - } - } - } - - return true; - } - - /** - * Retrieve the default channel. - * - * On startup, channels are not initialized, so if the default channel is not - * pear.php.net, then initialize the config. - * @param string registry layer - * @return string|false - */ - function getDefaultChannel($layer = null) - { - $ret = false; - if ($layer === null) { - foreach ($this->layers as $layer) { - if (isset($this->configuration[$layer]['default_channel'])) { - $ret = $this->configuration[$layer]['default_channel']; - break; - } - } - } elseif (isset($this->configuration[$layer]['default_channel'])) { - $ret = $this->configuration[$layer]['default_channel']; - } - - if ($ret == 'pear.php.net' && defined('PEAR_RUNTYPE') && PEAR_RUNTYPE == 'pecl') { - $ret = 'pecl.php.net'; - } - - if ($ret) { - if ($ret != 'pear.php.net') { - $this->_lazyChannelSetup(); - } - - return $ret; - } - - return PEAR_CONFIG_DEFAULT_CHANNEL; - } - - /** - * Returns a configuration value, prioritizing layers as per the - * layers property. - * - * @param string config key - * @return mixed the config value, or NULL if not found - * @access public - */ - function get($key, $layer = null, $channel = false) - { - if (!isset($this->configuration_info[$key])) { - return null; - } - - if ($key == '__channels') { - return null; - } - - if ($key == 'default_channel') { - return $this->getDefaultChannel($layer); - } - - if (!$channel) { - $channel = $this->getDefaultChannel(); - } elseif ($channel != 'pear.php.net') { - $this->_lazyChannelSetup(); - } - $channel = strtolower($channel); - - $test = (in_array($key, $this->_channelConfigInfo)) ? - $this->_getChannelValue($key, $layer, $channel) : - null; - if ($test !== null) { - if ($this->_installRoot) { - if (in_array($this->getGroup($key), - array('File Locations', 'File Locations (Advanced)')) && - $this->getType($key) == 'directory') { - return $this->_prependPath($test, $this->_installRoot); - } - } - return $test; - } - - if ($layer === null) { - foreach ($this->layers as $layer) { - if (isset($this->configuration[$layer][$key])) { - $test = $this->configuration[$layer][$key]; - if ($this->_installRoot) { - if (in_array($this->getGroup($key), - array('File Locations', 'File Locations (Advanced)')) && - $this->getType($key) == 'directory') { - return $this->_prependPath($test, $this->_installRoot); - } - } - - if ($key == 'preferred_mirror') { - $reg = &$this->getRegistry(); - if (is_object($reg)) { - $chan = &$reg->getChannel($channel); - if (PEAR::isError($chan)) { - return $channel; - } - - if (!$chan->getMirror($test) && $chan->getName() != $test) { - return $channel; // mirror does not exist - } - } - } - return $test; - } - } - } elseif (isset($this->configuration[$layer][$key])) { - $test = $this->configuration[$layer][$key]; - if ($this->_installRoot) { - if (in_array($this->getGroup($key), - array('File Locations', 'File Locations (Advanced)')) && - $this->getType($key) == 'directory') { - return $this->_prependPath($test, $this->_installRoot); - } - } - - if ($key == 'preferred_mirror') { - $reg = &$this->getRegistry(); - if (is_object($reg)) { - $chan = &$reg->getChannel($channel); - if (PEAR::isError($chan)) { - return $channel; - } - - if (!$chan->getMirror($test) && $chan->getName() != $test) { - return $channel; // mirror does not exist - } - } - } - - return $test; - } - - return null; - } - - /** - * Returns a channel-specific configuration value, prioritizing layers as per the - * layers property. - * - * @param string config key - * @return mixed the config value, or NULL if not found - * @access private - */ - function _getChannelValue($key, $layer, $channel) - { - if ($key == '__channels' || $channel == 'pear.php.net') { - return null; - } - - $ret = null; - if ($layer === null) { - foreach ($this->layers as $ilayer) { - if (isset($this->configuration[$ilayer]['__channels'][$channel][$key])) { - $ret = $this->configuration[$ilayer]['__channels'][$channel][$key]; - break; - } - } - } elseif (isset($this->configuration[$layer]['__channels'][$channel][$key])) { - $ret = $this->configuration[$layer]['__channels'][$channel][$key]; - } - - if ($key != 'preferred_mirror') { - return $ret; - } - - - if ($ret !== null) { - $reg = &$this->getRegistry($layer); - if (is_object($reg)) { - $chan = &$reg->getChannel($channel); - if (PEAR::isError($chan)) { - return $channel; - } - - if (!$chan->getMirror($ret) && $chan->getName() != $ret) { - return $channel; // mirror does not exist - } - } - - return $ret; - } - - if ($channel != $this->getDefaultChannel($layer)) { - return $channel; // we must use the channel name as the preferred mirror - // if the user has not chosen an alternate - } - - return $this->getDefaultChannel($layer); - } - - /** - * Set a config value in a specific layer (defaults to 'user'). - * Enforces the types defined in the configuration_info array. An - * integer config variable will be cast to int, and a set config - * variable will be validated against its legal values. - * - * @param string config key - * @param string config value - * @param string (optional) config layer - * @param string channel to set this value for, or null for global value - * @return bool TRUE on success, FALSE on failure - */ - function set($key, $value, $layer = 'user', $channel = false) - { - if ($key == '__channels') { - return false; - } - - if (!isset($this->configuration[$layer])) { - return false; - } - - if ($key == 'default_channel') { - // can only set this value globally - $channel = 'pear.php.net'; - if ($value != 'pear.php.net') { - $this->_lazyChannelSetup($layer); - } - } - - if ($key == 'preferred_mirror') { - if ($channel == '__uri') { - return false; // can't set the __uri pseudo-channel's mirror - } - - $reg = &$this->getRegistry($layer); - if (is_object($reg)) { - $chan = &$reg->getChannel($channel ? $channel : 'pear.php.net'); - if (PEAR::isError($chan)) { - return false; - } - - if (!$chan->getMirror($value) && $chan->getName() != $value) { - return false; // mirror does not exist - } - } - } - - if (!isset($this->configuration_info[$key])) { - return false; - } - - extract($this->configuration_info[$key]); - switch ($type) { - case 'integer': - $value = (int)$value; - break; - case 'set': { - // If a valid_set is specified, require the value to - // be in the set. If there is no valid_set, accept - // any value. - if ($valid_set) { - reset($valid_set); - if ((key($valid_set) === 0 && !in_array($value, $valid_set)) || - (key($valid_set) !== 0 && empty($valid_set[$value]))) - { - return false; - } - } - break; - } - } - - if (!$channel) { - $channel = $this->get('default_channel', null, 'pear.php.net'); - } - - if (!in_array($channel, $this->_channels)) { - $this->_lazyChannelSetup($layer); - $reg = &$this->getRegistry($layer); - if ($reg) { - $channel = $reg->channelName($channel); - } - - if (!in_array($channel, $this->_channels)) { - return false; - } - } - - if ($channel != 'pear.php.net') { - if (in_array($key, $this->_channelConfigInfo)) { - $this->configuration[$layer]['__channels'][$channel][$key] = $value; - return true; - } - - return false; - } - - if ($key == 'default_channel') { - if (!isset($reg)) { - $reg = &$this->getRegistry($layer); - if (!$reg) { - $reg = &$this->getRegistry(); - } - } - - if ($reg) { - $value = $reg->channelName($value); - } - - if (!$value) { - return false; - } - } - - $this->configuration[$layer][$key] = $value; - if ($key == 'php_dir' && !$this->_noRegistry) { - if (!isset($this->_registry[$layer]) || - $value != $this->_registry[$layer]->install_dir) { - $this->_registry[$layer] = &new PEAR_Registry($value); - $this->_regInitialized[$layer] = false; - $this->_registry[$layer]->setConfig($this, false); - } - } - - return true; - } - - function _lazyChannelSetup($uselayer = false) - { - if ($this->_noRegistry) { - return; - } - - $merge = false; - foreach ($this->_registry as $layer => $p) { - if ($uselayer && $uselayer != $layer) { - continue; - } - - if (!$this->_regInitialized[$layer]) { - if ($layer == 'default' && isset($this->_registry['user']) || - isset($this->_registry['system'])) { - // only use the default registry if there are no alternatives - continue; - } - - if (!is_object($this->_registry[$layer])) { - if ($phpdir = $this->get('php_dir', $layer, 'pear.php.net')) { - $this->_registry[$layer] = &new PEAR_Registry($phpdir); - $this->_registry[$layer]->setConfig($this, false); - $this->_regInitialized[$layer] = false; - } else { - unset($this->_registry[$layer]); - return; - } - } - - $this->setChannels($this->_registry[$layer]->listChannels(), $merge); - $this->_regInitialized[$layer] = true; - $merge = true; - } - } - } - - /** - * Set the list of channels. - * - * This should be set via a call to {@link PEAR_Registry::listChannels()} - * @param array - * @param bool - * @return bool success of operation - */ - function setChannels($channels, $merge = false) - { - if (!is_array($channels)) { - return false; - } - - if ($merge) { - $this->_channels = array_merge($this->_channels, $channels); - } else { - $this->_channels = $channels; - } - - foreach ($channels as $channel) { - $channel = strtolower($channel); - if ($channel == 'pear.php.net') { - continue; - } - - foreach ($this->layers as $layer) { - if (!isset($this->configuration[$layer]['__channels'])) { - $this->configuration[$layer]['__channels'] = array(); - } - if (!isset($this->configuration[$layer]['__channels'][$channel]) - || !is_array($this->configuration[$layer]['__channels'][$channel])) { - $this->configuration[$layer]['__channels'][$channel] = array(); - } - } - } - - return true; - } - - /** - * Get the type of a config value. - * - * @param string config key - * - * @return string type, one of "string", "integer", "file", - * "directory", "set" or "password". - * - * @access public - * - */ - function getType($key) - { - if (isset($this->configuration_info[$key])) { - return $this->configuration_info[$key]['type']; - } - return false; - } - - /** - * Get the documentation for a config value. - * - * @param string config key - * @return string documentation string - * - * @access public - * - */ - function getDocs($key) - { - if (isset($this->configuration_info[$key])) { - return $this->configuration_info[$key]['doc']; - } - - return false; - } - - /** - * Get the short documentation for a config value. - * - * @param string config key - * @return string short documentation string - * - * @access public - * - */ - function getPrompt($key) - { - if (isset($this->configuration_info[$key])) { - return $this->configuration_info[$key]['prompt']; - } - - return false; - } - - /** - * Get the parameter group for a config key. - * - * @param string config key - * @return string parameter group - * - * @access public - * - */ - function getGroup($key) - { - if (isset($this->configuration_info[$key])) { - return $this->configuration_info[$key]['group']; - } - - return false; - } - - /** - * Get the list of parameter groups. - * - * @return array list of parameter groups - * - * @access public - * - */ - function getGroups() - { - $tmp = array(); - foreach ($this->configuration_info as $key => $info) { - $tmp[$info['group']] = 1; - } - - return array_keys($tmp); - } - - /** - * Get the list of the parameters in a group. - * - * @param string $group parameter group - * @return array list of parameters in $group - * - * @access public - * - */ - function getGroupKeys($group) - { - $keys = array(); - foreach ($this->configuration_info as $key => $info) { - if ($info['group'] == $group) { - $keys[] = $key; - } - } - - return $keys; - } - - /** - * Get the list of allowed set values for a config value. Returns - * NULL for config values that are not sets. - * - * @param string config key - * @return array enumerated array of set values, or NULL if the - * config key is unknown or not a set - * - * @access public - * - */ - function getSetValues($key) - { - if (isset($this->configuration_info[$key]) && - isset($this->configuration_info[$key]['type']) && - $this->configuration_info[$key]['type'] == 'set') - { - $valid_set = $this->configuration_info[$key]['valid_set']; - reset($valid_set); - if (key($valid_set) === 0) { - return $valid_set; - } - - return array_keys($valid_set); - } - - return null; - } - - /** - * Get all the current config keys. - * - * @return array simple array of config keys - * - * @access public - */ - function getKeys() - { - $keys = array(); - foreach ($this->layers as $layer) { - $test = $this->configuration[$layer]; - if (isset($test['__channels'])) { - foreach ($test['__channels'] as $channel => $configs) { - $keys = array_merge($keys, $configs); - } - } - - unset($test['__channels']); - $keys = array_merge($keys, $test); - - } - return array_keys($keys); - } - - /** - * Remove the a config key from a specific config layer. - * - * @param string config key - * @param string (optional) config layer - * @param string (optional) channel (defaults to default channel) - * @return bool TRUE on success, FALSE on failure - * - * @access public - */ - function remove($key, $layer = 'user', $channel = null) - { - if ($channel === null) { - $channel = $this->getDefaultChannel(); - } - - if ($channel !== 'pear.php.net') { - if (isset($this->configuration[$layer]['__channels'][$channel][$key])) { - unset($this->configuration[$layer]['__channels'][$channel][$key]); - return true; - } - } - - if (isset($this->configuration[$layer][$key])) { - unset($this->configuration[$layer][$key]); - return true; - } - - return false; - } - - /** - * Temporarily remove an entire config layer. USE WITH CARE! - * - * @param string config key - * @param string (optional) config layer - * @return bool TRUE on success, FALSE on failure - * - * @access public - */ - function removeLayer($layer) - { - if (isset($this->configuration[$layer])) { - $this->configuration[$layer] = array(); - return true; - } - - return false; - } - - /** - * Stores configuration data in a layer. - * - * @param string config layer to store - * @return bool TRUE on success, or PEAR error on failure - * - * @access public - */ - function store($layer = 'user', $data = null) - { - return $this->writeConfigFile(null, $layer, $data); - } - - /** - * Tells what config layer that gets to define a key. - * - * @param string config key - * @param boolean return the defining channel - * - * @return string|array the config layer, or an empty string if not found. - * - * if $returnchannel, the return is an array array('layer' => layername, - * 'channel' => channelname), or an empty string if not found - * - * @access public - */ - function definedBy($key, $returnchannel = false) - { - foreach ($this->layers as $layer) { - $channel = $this->getDefaultChannel(); - if ($channel !== 'pear.php.net') { - if (isset($this->configuration[$layer]['__channels'][$channel][$key])) { - if ($returnchannel) { - return array('layer' => $layer, 'channel' => $channel); - } - return $layer; - } - } - - if (isset($this->configuration[$layer][$key])) { - if ($returnchannel) { - return array('layer' => $layer, 'channel' => 'pear.php.net'); - } - return $layer; - } - } - - return ''; - } - - /** - * Tells whether a given key exists as a config value. - * - * @param string config key - * @return bool whether exists in this object - * - * @access public - */ - function isDefined($key) - { - foreach ($this->layers as $layer) { - if (isset($this->configuration[$layer][$key])) { - return true; - } - } - - return false; - } - - /** - * Tells whether a given config layer exists. - * - * @param string config layer - * @return bool whether exists in this object - * - * @access public - */ - function isDefinedLayer($layer) - { - return isset($this->configuration[$layer]); - } - - /** - * Returns the layers defined (except the 'default' one) - * - * @return array of the defined layers - */ - function getLayers() - { - $cf = $this->configuration; - unset($cf['default']); - return array_keys($cf); - } - - function apiVersion() - { - return '1.1'; - } - - /** - * @return PEAR_Registry - */ - function &getRegistry($use = null) - { - $layer = $use === null ? 'user' : $use; - if (isset($this->_registry[$layer])) { - return $this->_registry[$layer]; - } elseif ($use === null && isset($this->_registry['system'])) { - return $this->_registry['system']; - } elseif ($use === null && isset($this->_registry['default'])) { - return $this->_registry['default']; - } elseif ($use) { - $a = false; - return $a; - } - - // only go here if null was passed in - echo "CRITICAL ERROR: Registry could not be initialized from any value"; - exit(1); - } - - /** - * This is to allow customization like the use of installroot - * @param PEAR_Registry - * @return bool - */ - function setRegistry(&$reg, $layer = 'user') - { - if ($this->_noRegistry) { - return false; - } - - if (!in_array($layer, array('user', 'system'))) { - return false; - } - - $this->_registry[$layer] = &$reg; - if (is_object($reg)) { - $this->_registry[$layer]->setConfig($this, false); - } - - return true; - } - - function noRegistry() - { - $this->_noRegistry = true; - } - - /** - * @return PEAR_REST - */ - function &getREST($version, $options = array()) - { - $version = str_replace('.', '', $version); - if (!class_exists($class = 'PEAR_REST_' . $version)) { - require_once 'PEAR/REST/' . $version . '.php'; - } - - $remote = &new $class($this, $options); - return $remote; - } - - /** - * The ftp server is set in {@link readFTPConfigFile()}. It exists only if a - * remote configuration file has been specified - * @return PEAR_FTP|false - */ - function &getFTP() - { - if (isset($this->_ftp)) { - return $this->_ftp; - } - - $a = false; - return $a; - } - - function _prependPath($path, $prepend) - { - if (strlen($prepend) > 0) { - if (OS_WINDOWS && preg_match('/^[a-z]:/i', $path)) { - if (preg_match('/^[a-z]:/i', $prepend)) { - $prepend = substr($prepend, 2); - } elseif ($prepend{0} != '\\') { - $prepend = "\\$prepend"; - } - $path = substr($path, 0, 2) . $prepend . substr($path, 2); - } else { - $path = $prepend . $path; - } - } - return $path; - } - - /** - * @param string|false installation directory to prepend to all _dir variables, or false to - * disable - */ - function setInstallRoot($root) - { - if (substr($root, -1) == DIRECTORY_SEPARATOR) { - $root = substr($root, 0, -1); - } - $old = $this->_installRoot; - $this->_installRoot = $root; - if (($old != $root) && !$this->_noRegistry) { - foreach (array_keys($this->_registry) as $layer) { - if ($layer == 'ftp' || !isset($this->_registry[$layer])) { - continue; - } - $this->_registry[$layer] = - &new PEAR_Registry($this->get('php_dir', $layer, 'pear.php.net')); - $this->_registry[$layer]->setConfig($this, false); - $this->_regInitialized[$layer] = false; - } - } - } -} diff --git a/_piecrust/libs/PEAR/Dependency2.php b/_piecrust/libs/PEAR/Dependency2.php deleted file mode 100644 index f3ddeb1..0000000 --- a/_piecrust/libs/PEAR/Dependency2.php +++ /dev/null @@ -1,1358 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Dependency2.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * Required for the PEAR_VALIDATE_* constants - */ -require_once 'PEAR/Validate.php'; - -/** - * Dependency check for PEAR packages - * - * This class handles both version 1.0 and 2.0 dependencies - * WARNING: *any* changes to this class must be duplicated in the - * test_PEAR_Dependency2 class found in tests/PEAR_Dependency2/setup.php.inc, - * or unit tests will not actually validate the changes - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Dependency2 -{ - /** - * One of the PEAR_VALIDATE_* states - * @see PEAR_VALIDATE_NORMAL - * @var integer - */ - var $_state; - - /** - * Command-line options to install/upgrade/uninstall commands - * @param array - */ - var $_options; - - /** - * @var OS_Guess - */ - var $_os; - - /** - * @var PEAR_Registry - */ - var $_registry; - - /** - * @var PEAR_Config - */ - var $_config; - - /** - * @var PEAR_DependencyDB - */ - var $_dependencydb; - - /** - * Output of PEAR_Registry::parsedPackageName() - * @var array - */ - var $_currentPackage; - - /** - * @param PEAR_Config - * @param array installation options - * @param array format of PEAR_Registry::parsedPackageName() - * @param int installation state (one of PEAR_VALIDATE_*) - */ - function PEAR_Dependency2(&$config, $installoptions, $package, - $state = PEAR_VALIDATE_INSTALLING) - { - $this->_config = &$config; - if (!class_exists('PEAR_DependencyDB')) { - require_once 'PEAR/DependencyDB.php'; - } - - if (isset($installoptions['packagingroot'])) { - // make sure depdb is in the right location - $config->setInstallRoot($installoptions['packagingroot']); - } - - $this->_registry = &$config->getRegistry(); - $this->_dependencydb = &PEAR_DependencyDB::singleton($config); - if (isset($installoptions['packagingroot'])) { - $config->setInstallRoot(false); - } - - $this->_options = $installoptions; - $this->_state = $state; - if (!class_exists('OS_Guess')) { - require_once 'OS/Guess.php'; - } - - $this->_os = new OS_Guess; - $this->_currentPackage = $package; - } - - function _getExtraString($dep) - { - $extra = ' ('; - if (isset($dep['uri'])) { - return ''; - } - - if (isset($dep['recommended'])) { - $extra .= 'recommended version ' . $dep['recommended']; - } else { - if (isset($dep['min'])) { - $extra .= 'version >= ' . $dep['min']; - } - - if (isset($dep['max'])) { - if ($extra != ' (') { - $extra .= ', '; - } - $extra .= 'version <= ' . $dep['max']; - } - - if (isset($dep['exclude'])) { - if (!is_array($dep['exclude'])) { - $dep['exclude'] = array($dep['exclude']); - } - - if ($extra != ' (') { - $extra .= ', '; - } - - $extra .= 'excluded versions: '; - foreach ($dep['exclude'] as $i => $exclude) { - if ($i) { - $extra .= ', '; - } - $extra .= $exclude; - } - } - } - - $extra .= ')'; - if ($extra == ' ()') { - $extra = ''; - } - - return $extra; - } - - /** - * This makes unit-testing a heck of a lot easier - */ - function getPHP_OS() - { - return PHP_OS; - } - - /** - * This makes unit-testing a heck of a lot easier - */ - function getsysname() - { - return $this->_os->getSysname(); - } - - /** - * Specify a dependency on an OS. Use arch for detailed os/processor information - * - * There are two generic OS dependencies that will be the most common, unix and windows. - * Other options are linux, freebsd, darwin (OS X), sunos, irix, hpux, aix - */ - function validateOsDependency($dep) - { - if ($this->_state != PEAR_VALIDATE_INSTALLING && $this->_state != PEAR_VALIDATE_DOWNLOADING) { - return true; - } - - if ($dep['name'] == '*') { - return true; - } - - $not = isset($dep['conflicts']) ? true : false; - switch (strtolower($dep['name'])) { - case 'windows' : - if ($not) { - if (strtolower(substr($this->getPHP_OS(), 0, 3)) == 'win') { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError("Cannot install %s on Windows"); - } - - return $this->warning("warning: Cannot install %s on Windows"); - } - } else { - if (strtolower(substr($this->getPHP_OS(), 0, 3)) != 'win') { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError("Can only install %s on Windows"); - } - - return $this->warning("warning: Can only install %s on Windows"); - } - } - break; - case 'unix' : - $unices = array('linux', 'freebsd', 'darwin', 'sunos', 'irix', 'hpux', 'aix'); - if ($not) { - if (in_array($this->getSysname(), $unices)) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError("Cannot install %s on any Unix system"); - } - - return $this->warning( "warning: Cannot install %s on any Unix system"); - } - } else { - if (!in_array($this->getSysname(), $unices)) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError("Can only install %s on a Unix system"); - } - - return $this->warning("warning: Can only install %s on a Unix system"); - } - } - break; - default : - if ($not) { - if (strtolower($dep['name']) == strtolower($this->getSysname())) { - if (!isset($this->_options['nodeps']) && - !isset($this->_options['force'])) { - return $this->raiseError('Cannot install %s on ' . $dep['name'] . - ' operating system'); - } - - return $this->warning('warning: Cannot install %s on ' . - $dep['name'] . ' operating system'); - } - } else { - if (strtolower($dep['name']) != strtolower($this->getSysname())) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('Cannot install %s on ' . - $this->getSysname() . - ' operating system, can only install on ' . $dep['name']); - } - - return $this->warning('warning: Cannot install %s on ' . - $this->getSysname() . - ' operating system, can only install on ' . $dep['name']); - } - } - } - return true; - } - - /** - * This makes unit-testing a heck of a lot easier - */ - function matchSignature($pattern) - { - return $this->_os->matchSignature($pattern); - } - - /** - * Specify a complex dependency on an OS/processor/kernel version, - * Use OS for simple operating system dependency. - * - * This is the only dependency that accepts an eregable pattern. The pattern - * will be matched against the php_uname() output parsed by OS_Guess - */ - function validateArchDependency($dep) - { - if ($this->_state != PEAR_VALIDATE_INSTALLING) { - return true; - } - - $not = isset($dep['conflicts']) ? true : false; - if (!$this->matchSignature($dep['pattern'])) { - if (!$not) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s Architecture dependency failed, does not ' . - 'match "' . $dep['pattern'] . '"'); - } - - return $this->warning('warning: %s Architecture dependency failed, does ' . - 'not match "' . $dep['pattern'] . '"'); - } - - return true; - } - - if ($not) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s Architecture dependency failed, required "' . - $dep['pattern'] . '"'); - } - - return $this->warning('warning: %s Architecture dependency failed, ' . - 'required "' . $dep['pattern'] . '"'); - } - - return true; - } - - /** - * This makes unit-testing a heck of a lot easier - */ - function extension_loaded($name) - { - return extension_loaded($name); - } - - /** - * This makes unit-testing a heck of a lot easier - */ - function phpversion($name = null) - { - if ($name !== null) { - return phpversion($name); - } - - return phpversion(); - } - - function validateExtensionDependency($dep, $required = true) - { - if ($this->_state != PEAR_VALIDATE_INSTALLING && - $this->_state != PEAR_VALIDATE_DOWNLOADING) { - return true; - } - - $loaded = $this->extension_loaded($dep['name']); - $extra = $this->_getExtraString($dep); - if (isset($dep['exclude'])) { - if (!is_array($dep['exclude'])) { - $dep['exclude'] = array($dep['exclude']); - } - } - - if (!isset($dep['min']) && !isset($dep['max']) && - !isset($dep['recommended']) && !isset($dep['exclude']) - ) { - if ($loaded) { - if (isset($dep['conflicts'])) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s conflicts with PHP extension "' . - $dep['name'] . '"' . $extra); - } - - return $this->warning('warning: %s conflicts with PHP extension "' . - $dep['name'] . '"' . $extra); - } - - return true; - } - - if (isset($dep['conflicts'])) { - return true; - } - - if ($required) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s requires PHP extension "' . - $dep['name'] . '"' . $extra); - } - - return $this->warning('warning: %s requires PHP extension "' . - $dep['name'] . '"' . $extra); - } - - return $this->warning('%s can optionally use PHP extension "' . - $dep['name'] . '"' . $extra); - } - - if (!$loaded) { - if (isset($dep['conflicts'])) { - return true; - } - - if (!$required) { - return $this->warning('%s can optionally use PHP extension "' . - $dep['name'] . '"' . $extra); - } - - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s requires PHP extension "' . $dep['name'] . - '"' . $extra); - } - - return $this->warning('warning: %s requires PHP extension "' . $dep['name'] . - '"' . $extra); - } - - $version = (string) $this->phpversion($dep['name']); - if (empty($version)) { - $version = '0'; - } - - $fail = false; - if (isset($dep['min']) && !version_compare($version, $dep['min'], '>=')) { - $fail = true; - } - - if (isset($dep['max']) && !version_compare($version, $dep['max'], '<=')) { - $fail = true; - } - - if ($fail && !isset($dep['conflicts'])) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s requires PHP extension "' . $dep['name'] . - '"' . $extra . ', installed version is ' . $version); - } - - return $this->warning('warning: %s requires PHP extension "' . $dep['name'] . - '"' . $extra . ', installed version is ' . $version); - } elseif ((isset($dep['min']) || isset($dep['max'])) && !$fail && isset($dep['conflicts'])) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s conflicts with PHP extension "' . - $dep['name'] . '"' . $extra . ', installed version is ' . $version); - } - - return $this->warning('warning: %s conflicts with PHP extension "' . - $dep['name'] . '"' . $extra . ', installed version is ' . $version); - } - - if (isset($dep['exclude'])) { - foreach ($dep['exclude'] as $exclude) { - if (version_compare($version, $exclude, '==')) { - if (isset($dep['conflicts'])) { - continue; - } - - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s is not compatible with PHP extension "' . - $dep['name'] . '" version ' . - $exclude); - } - - return $this->warning('warning: %s is not compatible with PHP extension "' . - $dep['name'] . '" version ' . - $exclude); - } elseif (version_compare($version, $exclude, '!=') && isset($dep['conflicts'])) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s conflicts with PHP extension "' . - $dep['name'] . '"' . $extra . ', installed version is ' . $version); - } - - return $this->warning('warning: %s conflicts with PHP extension "' . - $dep['name'] . '"' . $extra . ', installed version is ' . $version); - } - } - } - - if (isset($dep['recommended'])) { - if (version_compare($version, $dep['recommended'], '==')) { - return true; - } - - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s dependency: PHP extension ' . $dep['name'] . - ' version "' . $version . '"' . - ' is not the recommended version "' . $dep['recommended'] . - '", but may be compatible, use --force to install'); - } - - return $this->warning('warning: %s dependency: PHP extension ' . - $dep['name'] . ' version "' . $version . '"' . - ' is not the recommended version "' . $dep['recommended'].'"'); - } - - return true; - } - - function validatePhpDependency($dep) - { - if ($this->_state != PEAR_VALIDATE_INSTALLING && - $this->_state != PEAR_VALIDATE_DOWNLOADING) { - return true; - } - - $version = $this->phpversion(); - $extra = $this->_getExtraString($dep); - if (isset($dep['exclude'])) { - if (!is_array($dep['exclude'])) { - $dep['exclude'] = array($dep['exclude']); - } - } - - if (isset($dep['min'])) { - if (!version_compare($version, $dep['min'], '>=')) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s requires PHP' . - $extra . ', installed version is ' . $version); - } - - return $this->warning('warning: %s requires PHP' . - $extra . ', installed version is ' . $version); - } - } - - if (isset($dep['max'])) { - if (!version_compare($version, $dep['max'], '<=')) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s requires PHP' . - $extra . ', installed version is ' . $version); - } - - return $this->warning('warning: %s requires PHP' . - $extra . ', installed version is ' . $version); - } - } - - if (isset($dep['exclude'])) { - foreach ($dep['exclude'] as $exclude) { - if (version_compare($version, $exclude, '==')) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s is not compatible with PHP version ' . - $exclude); - } - - return $this->warning( - 'warning: %s is not compatible with PHP version ' . - $exclude); - } - } - } - - return true; - } - - /** - * This makes unit-testing a heck of a lot easier - */ - function getPEARVersion() - { - return '1.9.4'; - } - - function validatePearinstallerDependency($dep) - { - $pearversion = $this->getPEARVersion(); - $extra = $this->_getExtraString($dep); - if (isset($dep['exclude'])) { - if (!is_array($dep['exclude'])) { - $dep['exclude'] = array($dep['exclude']); - } - } - - if (version_compare($pearversion, $dep['min'], '<')) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s requires PEAR Installer' . $extra . - ', installed version is ' . $pearversion); - } - - return $this->warning('warning: %s requires PEAR Installer' . $extra . - ', installed version is ' . $pearversion); - } - - if (isset($dep['max'])) { - if (version_compare($pearversion, $dep['max'], '>')) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s requires PEAR Installer' . $extra . - ', installed version is ' . $pearversion); - } - - return $this->warning('warning: %s requires PEAR Installer' . $extra . - ', installed version is ' . $pearversion); - } - } - - if (isset($dep['exclude'])) { - if (!isset($dep['exclude'][0])) { - $dep['exclude'] = array($dep['exclude']); - } - - foreach ($dep['exclude'] as $exclude) { - if (version_compare($exclude, $pearversion, '==')) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s is not compatible with PEAR Installer ' . - 'version ' . $exclude); - } - - return $this->warning('warning: %s is not compatible with PEAR ' . - 'Installer version ' . $exclude); - } - } - } - - return true; - } - - function validateSubpackageDependency($dep, $required, $params) - { - return $this->validatePackageDependency($dep, $required, $params); - } - - /** - * @param array dependency information (2.0 format) - * @param boolean whether this is a required dependency - * @param array a list of downloaded packages to be installed, if any - * @param boolean if true, then deps on pear.php.net that fail will also check - * against pecl.php.net packages to accomodate extensions that have - * moved to pecl.php.net from pear.php.net - */ - function validatePackageDependency($dep, $required, $params, $depv1 = false) - { - if ($this->_state != PEAR_VALIDATE_INSTALLING && - $this->_state != PEAR_VALIDATE_DOWNLOADING) { - return true; - } - - if (isset($dep['providesextension'])) { - if ($this->extension_loaded($dep['providesextension'])) { - $save = $dep; - $subdep = $dep; - $subdep['name'] = $subdep['providesextension']; - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $ret = $this->validateExtensionDependency($subdep, $required); - PEAR::popErrorHandling(); - if (!PEAR::isError($ret)) { - return true; - } - } - } - - if ($this->_state == PEAR_VALIDATE_INSTALLING) { - return $this->_validatePackageInstall($dep, $required, $depv1); - } - - if ($this->_state == PEAR_VALIDATE_DOWNLOADING) { - return $this->_validatePackageDownload($dep, $required, $params, $depv1); - } - } - - function _validatePackageDownload($dep, $required, $params, $depv1 = false) - { - $dep['package'] = $dep['name']; - if (isset($dep['uri'])) { - $dep['channel'] = '__uri'; - } - - $depname = $this->_registry->parsedPackageNameToString($dep, true); - $found = false; - foreach ($params as $param) { - if ($param->isEqual( - array('package' => $dep['name'], - 'channel' => $dep['channel']))) { - $found = true; - break; - } - - if ($depv1 && $dep['channel'] == 'pear.php.net') { - if ($param->isEqual( - array('package' => $dep['name'], - 'channel' => 'pecl.php.net'))) { - $found = true; - break; - } - } - } - - if (!$found && isset($dep['providesextension'])) { - foreach ($params as $param) { - if ($param->isExtension($dep['providesextension'])) { - $found = true; - break; - } - } - } - - if ($found) { - $version = $param->getVersion(); - $installed = false; - $downloaded = true; - } else { - if ($this->_registry->packageExists($dep['name'], $dep['channel'])) { - $installed = true; - $downloaded = false; - $version = $this->_registry->packageinfo($dep['name'], 'version', - $dep['channel']); - } else { - if ($dep['channel'] == 'pecl.php.net' && $this->_registry->packageExists($dep['name'], - 'pear.php.net')) { - $installed = true; - $downloaded = false; - $version = $this->_registry->packageinfo($dep['name'], 'version', - 'pear.php.net'); - } else { - $version = 'not installed or downloaded'; - $installed = false; - $downloaded = false; - } - } - } - - $extra = $this->_getExtraString($dep); - if (isset($dep['exclude']) && !is_array($dep['exclude'])) { - $dep['exclude'] = array($dep['exclude']); - } - - if (!isset($dep['min']) && !isset($dep['max']) && - !isset($dep['recommended']) && !isset($dep['exclude']) - ) { - if ($installed || $downloaded) { - $installed = $installed ? 'installed' : 'downloaded'; - if (isset($dep['conflicts'])) { - $rest = ''; - if ($version) { - $rest = ", $installed version is " . $version; - } - - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s conflicts with package "' . $depname . '"' . $extra . $rest); - } - - return $this->warning('warning: %s conflicts with package "' . $depname . '"' . $extra . $rest); - } - - return true; - } - - if (isset($dep['conflicts'])) { - return true; - } - - if ($required) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s requires package "' . $depname . '"' . $extra); - } - - return $this->warning('warning: %s requires package "' . $depname . '"' . $extra); - } - - return $this->warning('%s can optionally use package "' . $depname . '"' . $extra); - } - - if (!$installed && !$downloaded) { - if (isset($dep['conflicts'])) { - return true; - } - - if ($required) { - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s requires package "' . $depname . '"' . $extra); - } - - return $this->warning('warning: %s requires package "' . $depname . '"' . $extra); - } - - return $this->warning('%s can optionally use package "' . $depname . '"' . $extra); - } - - $fail = false; - if (isset($dep['min']) && version_compare($version, $dep['min'], '<')) { - $fail = true; - } - - if (isset($dep['max']) && version_compare($version, $dep['max'], '>')) { - $fail = true; - } - - if ($fail && !isset($dep['conflicts'])) { - $installed = $installed ? 'installed' : 'downloaded'; - $dep['package'] = $dep['name']; - $dep = $this->_registry->parsedPackageNameToString($dep, true); - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s requires package "' . $depname . '"' . - $extra . ", $installed version is " . $version); - } - - return $this->warning('warning: %s requires package "' . $depname . '"' . - $extra . ", $installed version is " . $version); - } elseif ((isset($dep['min']) || isset($dep['max'])) && !$fail && - isset($dep['conflicts']) && !isset($dep['exclude'])) { - $installed = $installed ? 'installed' : 'downloaded'; - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s conflicts with package "' . $depname . '"' . $extra . - ", $installed version is " . $version); - } - - return $this->warning('warning: %s conflicts with package "' . $depname . '"' . - $extra . ", $installed version is " . $version); - } - - if (isset($dep['exclude'])) { - $installed = $installed ? 'installed' : 'downloaded'; - foreach ($dep['exclude'] as $exclude) { - if (version_compare($version, $exclude, '==') && !isset($dep['conflicts'])) { - if (!isset($this->_options['nodeps']) && - !isset($this->_options['force']) - ) { - return $this->raiseError('%s is not compatible with ' . - $installed . ' package "' . - $depname . '" version ' . - $exclude); - } - - return $this->warning('warning: %s is not compatible with ' . - $installed . ' package "' . - $depname . '" version ' . - $exclude); - } elseif (version_compare($version, $exclude, '!=') && isset($dep['conflicts'])) { - $installed = $installed ? 'installed' : 'downloaded'; - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('%s conflicts with package "' . $depname . '"' . - $extra . ", $installed version is " . $version); - } - - return $this->warning('warning: %s conflicts with package "' . $depname . '"' . - $extra . ", $installed version is " . $version); - } - } - } - - if (isset($dep['recommended'])) { - $installed = $installed ? 'installed' : 'downloaded'; - if (version_compare($version, $dep['recommended'], '==')) { - return true; - } - - if (!$found && $installed) { - $param = $this->_registry->getPackage($dep['name'], $dep['channel']); - } - - if ($param) { - $found = false; - foreach ($params as $parent) { - if ($parent->isEqual($this->_currentPackage)) { - $found = true; - break; - } - } - - if ($found) { - if ($param->isCompatible($parent)) { - return true; - } - } else { // this is for validPackage() calls - $parent = $this->_registry->getPackage($this->_currentPackage['package'], - $this->_currentPackage['channel']); - if ($parent !== null && $param->isCompatible($parent)) { - return true; - } - } - } - - if (!isset($this->_options['nodeps']) && !isset($this->_options['force']) && - !isset($this->_options['loose']) - ) { - return $this->raiseError('%s dependency package "' . $depname . - '" ' . $installed . ' version ' . $version . - ' is not the recommended version ' . $dep['recommended'] . - ', but may be compatible, use --force to install'); - } - - return $this->warning('warning: %s dependency package "' . $depname . - '" ' . $installed . ' version ' . $version . - ' is not the recommended version ' . $dep['recommended']); - } - - return true; - } - - function _validatePackageInstall($dep, $required, $depv1 = false) - { - return $this->_validatePackageDownload($dep, $required, array(), $depv1); - } - - /** - * Verify that uninstalling packages passed in to command line is OK. - * - * @param PEAR_Installer $dl - * @return PEAR_Error|true - */ - function validatePackageUninstall(&$dl) - { - if (PEAR::isError($this->_dependencydb)) { - return $this->_dependencydb; - } - - $params = array(); - // construct an array of "downloaded" packages to fool the package dependency checker - // into using these to validate uninstalls of circular dependencies - $downloaded = &$dl->getUninstallPackages(); - foreach ($downloaded as $i => $pf) { - if (!class_exists('PEAR_Downloader_Package')) { - require_once 'PEAR/Downloader/Package.php'; - } - $dp = &new PEAR_Downloader_Package($dl); - $dp->setPackageFile($downloaded[$i]); - $params[$i] = &$dp; - } - - // check cache - $memyselfandI = strtolower($this->_currentPackage['channel']) . '/' . - strtolower($this->_currentPackage['package']); - if (isset($dl->___uninstall_package_cache)) { - $badpackages = $dl->___uninstall_package_cache; - if (isset($badpackages[$memyselfandI]['warnings'])) { - foreach ($badpackages[$memyselfandI]['warnings'] as $warning) { - $dl->log(0, $warning[0]); - } - } - - if (isset($badpackages[$memyselfandI]['errors'])) { - foreach ($badpackages[$memyselfandI]['errors'] as $error) { - if (is_array($error)) { - $dl->log(0, $error[0]); - } else { - $dl->log(0, $error->getMessage()); - } - } - - if (isset($this->_options['nodeps']) || isset($this->_options['force'])) { - return $this->warning( - 'warning: %s should not be uninstalled, other installed packages depend ' . - 'on this package'); - } - - return $this->raiseError( - '%s cannot be uninstalled, other installed packages depend on this package'); - } - - return true; - } - - // first, list the immediate parents of each package to be uninstalled - $perpackagelist = array(); - $allparents = array(); - foreach ($params as $i => $param) { - $a = array( - 'channel' => strtolower($param->getChannel()), - 'package' => strtolower($param->getPackage()) - ); - - $deps = $this->_dependencydb->getDependentPackages($a); - if ($deps) { - foreach ($deps as $d) { - $pardeps = $this->_dependencydb->getDependencies($d); - foreach ($pardeps as $dep) { - if (strtolower($dep['dep']['channel']) == $a['channel'] && - strtolower($dep['dep']['name']) == $a['package']) { - if (!isset($perpackagelist[$a['channel'] . '/' . $a['package']])) { - $perpackagelist[$a['channel'] . '/' . $a['package']] = array(); - } - $perpackagelist[$a['channel'] . '/' . $a['package']][] - = array($d['channel'] . '/' . $d['package'], $dep); - if (!isset($allparents[$d['channel'] . '/' . $d['package']])) { - $allparents[$d['channel'] . '/' . $d['package']] = array(); - } - if (!isset($allparents[$d['channel'] . '/' . $d['package']][$a['channel'] . '/' . $a['package']])) { - $allparents[$d['channel'] . '/' . $d['package']][$a['channel'] . '/' . $a['package']] = array(); - } - $allparents[$d['channel'] . '/' . $d['package']] - [$a['channel'] . '/' . $a['package']][] - = array($d, $dep); - } - } - } - } - } - - // next, remove any packages from the parents list that are not installed - $remove = array(); - foreach ($allparents as $parent => $d1) { - foreach ($d1 as $d) { - if ($this->_registry->packageExists($d[0][0]['package'], $d[0][0]['channel'])) { - continue; - } - $remove[$parent] = true; - } - } - - // next remove any packages from the parents list that are not passed in for - // uninstallation - foreach ($allparents as $parent => $d1) { - foreach ($d1 as $d) { - foreach ($params as $param) { - if (strtolower($param->getChannel()) == $d[0][0]['channel'] && - strtolower($param->getPackage()) == $d[0][0]['package']) { - // found it - continue 3; - } - } - $remove[$parent] = true; - } - } - - // remove all packages whose dependencies fail - // save which ones failed for error reporting - $badchildren = array(); - do { - $fail = false; - foreach ($remove as $package => $unused) { - if (!isset($allparents[$package])) { - continue; - } - - foreach ($allparents[$package] as $kid => $d1) { - foreach ($d1 as $depinfo) { - if ($depinfo[1]['type'] != 'optional') { - if (isset($badchildren[$kid])) { - continue; - } - $badchildren[$kid] = true; - $remove[$kid] = true; - $fail = true; - continue 2; - } - } - } - if ($fail) { - // start over, we removed some children - continue 2; - } - } - } while ($fail); - - // next, construct the list of packages that can't be uninstalled - $badpackages = array(); - $save = $this->_currentPackage; - foreach ($perpackagelist as $package => $packagedeps) { - foreach ($packagedeps as $parent) { - if (!isset($remove[$parent[0]])) { - continue; - } - - $packagename = $this->_registry->parsePackageName($parent[0]); - $packagename['channel'] = $this->_registry->channelAlias($packagename['channel']); - $pa = $this->_registry->getPackage($packagename['package'], $packagename['channel']); - $packagename['package'] = $pa->getPackage(); - $this->_currentPackage = $packagename; - // parent is not present in uninstall list, make sure we can actually - // uninstall it (parent dep is optional) - $parentname['channel'] = $this->_registry->channelAlias($parent[1]['dep']['channel']); - $pa = $this->_registry->getPackage($parent[1]['dep']['name'], $parent[1]['dep']['channel']); - $parentname['package'] = $pa->getPackage(); - $parent[1]['dep']['package'] = $parentname['package']; - $parent[1]['dep']['channel'] = $parentname['channel']; - if ($parent[1]['type'] == 'optional') { - $test = $this->_validatePackageUninstall($parent[1]['dep'], false, $dl); - if ($test !== true) { - $badpackages[$package]['warnings'][] = $test; - } - } else { - $test = $this->_validatePackageUninstall($parent[1]['dep'], true, $dl); - if ($test !== true) { - $badpackages[$package]['errors'][] = $test; - } - } - } - } - - $this->_currentPackage = $save; - $dl->___uninstall_package_cache = $badpackages; - if (isset($badpackages[$memyselfandI])) { - if (isset($badpackages[$memyselfandI]['warnings'])) { - foreach ($badpackages[$memyselfandI]['warnings'] as $warning) { - $dl->log(0, $warning[0]); - } - } - - if (isset($badpackages[$memyselfandI]['errors'])) { - foreach ($badpackages[$memyselfandI]['errors'] as $error) { - if (is_array($error)) { - $dl->log(0, $error[0]); - } else { - $dl->log(0, $error->getMessage()); - } - } - - if (isset($this->_options['nodeps']) || isset($this->_options['force'])) { - return $this->warning( - 'warning: %s should not be uninstalled, other installed packages depend ' . - 'on this package'); - } - - return $this->raiseError( - '%s cannot be uninstalled, other installed packages depend on this package'); - } - } - - return true; - } - - function _validatePackageUninstall($dep, $required, $dl) - { - $depname = $this->_registry->parsedPackageNameToString($dep, true); - $version = $this->_registry->packageinfo($dep['package'], 'version', $dep['channel']); - if (!$version) { - return true; - } - - $extra = $this->_getExtraString($dep); - if (isset($dep['exclude']) && !is_array($dep['exclude'])) { - $dep['exclude'] = array($dep['exclude']); - } - - if (isset($dep['conflicts'])) { - return true; // uninstall OK - these packages conflict (probably installed with --force) - } - - if (!isset($dep['min']) && !isset($dep['max'])) { - if (!$required) { - return $this->warning('"' . $depname . '" can be optionally used by ' . - 'installed package %s' . $extra); - } - - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError('"' . $depname . '" is required by ' . - 'installed package %s' . $extra); - } - - return $this->warning('warning: "' . $depname . '" is required by ' . - 'installed package %s' . $extra); - } - - $fail = false; - if (isset($dep['min']) && version_compare($version, $dep['min'], '>=')) { - $fail = true; - } - - if (isset($dep['max']) && version_compare($version, $dep['max'], '<=')) { - $fail = true; - } - - // we re-use this variable, preserve the original value - $saverequired = $required; - if (!$required) { - return $this->warning($depname . $extra . ' can be optionally used by installed package' . - ' "%s"'); - } - - if (!isset($this->_options['nodeps']) && !isset($this->_options['force'])) { - return $this->raiseError($depname . $extra . ' is required by installed package' . - ' "%s"'); - } - - return $this->raiseError('warning: ' . $depname . $extra . - ' is required by installed package "%s"'); - } - - /** - * validate a downloaded package against installed packages - * - * As of PEAR 1.4.3, this will only validate - * - * @param array|PEAR_Downloader_Package|PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * $pkg package identifier (either - * array('package' => blah, 'channel' => blah) or an array with - * index 'info' referencing an object) - * @param PEAR_Downloader $dl - * @param array $params full list of packages to install - * @return true|PEAR_Error - */ - function validatePackage($pkg, &$dl, $params = array()) - { - if (is_array($pkg) && isset($pkg['info'])) { - $deps = $this->_dependencydb->getDependentPackageDependencies($pkg['info']); - } else { - $deps = $this->_dependencydb->getDependentPackageDependencies($pkg); - } - - $fail = false; - if ($deps) { - if (!class_exists('PEAR_Downloader_Package')) { - require_once 'PEAR/Downloader/Package.php'; - } - - $dp = &new PEAR_Downloader_Package($dl); - if (is_object($pkg)) { - $dp->setPackageFile($pkg); - } else { - $dp->setDownloadURL($pkg); - } - - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - foreach ($deps as $channel => $info) { - foreach ($info as $package => $ds) { - foreach ($params as $packd) { - if (strtolower($packd->getPackage()) == strtolower($package) && - $packd->getChannel() == $channel) { - $dl->log(3, 'skipping installed package check of "' . - $this->_registry->parsedPackageNameToString( - array('channel' => $channel, 'package' => $package), - true) . - '", version "' . $packd->getVersion() . '" will be ' . - 'downloaded and installed'); - continue 2; // jump to next package - } - } - - foreach ($ds as $d) { - $checker = &new PEAR_Dependency2($this->_config, $this->_options, - array('channel' => $channel, 'package' => $package), $this->_state); - $dep = $d['dep']; - $required = $d['type'] == 'required'; - $ret = $checker->_validatePackageDownload($dep, $required, array(&$dp)); - if (is_array($ret)) { - $dl->log(0, $ret[0]); - } elseif (PEAR::isError($ret)) { - $dl->log(0, $ret->getMessage()); - $fail = true; - } - } - } - } - PEAR::popErrorHandling(); - } - - if ($fail) { - return $this->raiseError( - '%s cannot be installed, conflicts with installed packages'); - } - - return true; - } - - /** - * validate a package.xml 1.0 dependency - */ - function validateDependency1($dep, $params = array()) - { - if (!isset($dep['optional'])) { - $dep['optional'] = 'no'; - } - - list($newdep, $type) = $this->normalizeDep($dep); - if (!$newdep) { - return $this->raiseError("Invalid Dependency"); - } - - if (method_exists($this, "validate{$type}Dependency")) { - return $this->{"validate{$type}Dependency"}($newdep, $dep['optional'] == 'no', - $params, true); - } - } - - /** - * Convert a 1.0 dep into a 2.0 dep - */ - function normalizeDep($dep) - { - $types = array( - 'pkg' => 'Package', - 'ext' => 'Extension', - 'os' => 'Os', - 'php' => 'Php' - ); - - if (!isset($types[$dep['type']])) { - return array(false, false); - } - - $type = $types[$dep['type']]; - - $newdep = array(); - switch ($type) { - case 'Package' : - $newdep['channel'] = 'pear.php.net'; - case 'Extension' : - case 'Os' : - $newdep['name'] = $dep['name']; - break; - } - - $dep['rel'] = PEAR_Dependency2::signOperator($dep['rel']); - switch ($dep['rel']) { - case 'has' : - return array($newdep, $type); - break; - case 'not' : - $newdep['conflicts'] = true; - break; - case '>=' : - case '>' : - $newdep['min'] = $dep['version']; - if ($dep['rel'] == '>') { - $newdep['exclude'] = $dep['version']; - } - break; - case '<=' : - case '<' : - $newdep['max'] = $dep['version']; - if ($dep['rel'] == '<') { - $newdep['exclude'] = $dep['version']; - } - break; - case 'ne' : - case '!=' : - $newdep['min'] = '0'; - $newdep['max'] = '100000'; - $newdep['exclude'] = $dep['version']; - break; - case '==' : - $newdep['min'] = $dep['version']; - $newdep['max'] = $dep['version']; - break; - } - if ($type == 'Php') { - if (!isset($newdep['min'])) { - $newdep['min'] = '4.4.0'; - } - - if (!isset($newdep['max'])) { - $newdep['max'] = '6.0.0'; - } - } - return array($newdep, $type); - } - - /** - * Converts text comparing operators to them sign equivalents - * - * Example: 'ge' to '>=' - * - * @access public - * @param string Operator - * @return string Sign equivalent - */ - function signOperator($operator) - { - switch($operator) { - case 'lt': return '<'; - case 'le': return '<='; - case 'gt': return '>'; - case 'ge': return '>='; - case 'eq': return '=='; - case 'ne': return '!='; - default: - return $operator; - } - } - - function raiseError($msg) - { - if (isset($this->_options['ignore-errors'])) { - return $this->warning($msg); - } - - return PEAR::raiseError(sprintf($msg, $this->_registry->parsedPackageNameToString( - $this->_currentPackage, true))); - } - - function warning($msg) - { - return array(sprintf($msg, $this->_registry->parsedPackageNameToString( - $this->_currentPackage, true))); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/DependencyDB.php b/_piecrust/libs/PEAR/DependencyDB.php deleted file mode 100644 index 948f0c9..0000000 --- a/_piecrust/libs/PEAR/DependencyDB.php +++ /dev/null @@ -1,769 +0,0 @@ - - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: DependencyDB.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * Needed for error handling - */ -require_once 'PEAR.php'; -require_once 'PEAR/Config.php'; - -$GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'] = array(); -/** - * Track dependency relationships between installed packages - * @category pear - * @package PEAR - * @author Greg Beaver - * @author Tomas V.V.Cox - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_DependencyDB -{ - // {{{ properties - - /** - * This is initialized by {@link setConfig()} - * @var PEAR_Config - * @access private - */ - var $_config; - /** - * This is initialized by {@link setConfig()} - * @var PEAR_Registry - * @access private - */ - var $_registry; - /** - * Filename of the dependency DB (usually .depdb) - * @var string - * @access private - */ - var $_depdb = false; - /** - * File name of the lockfile (usually .depdblock) - * @var string - * @access private - */ - var $_lockfile = false; - /** - * Open file resource for locking the lockfile - * @var resource|false - * @access private - */ - var $_lockFp = false; - /** - * API version of this class, used to validate a file on-disk - * @var string - * @access private - */ - var $_version = '1.0'; - /** - * Cached dependency database file - * @var array|null - * @access private - */ - var $_cache; - - // }}} - // {{{ & singleton() - - /** - * Get a raw dependency database. Calls setConfig() and assertDepsDB() - * @param PEAR_Config - * @param string|false full path to the dependency database, or false to use default - * @return PEAR_DependencyDB|PEAR_Error - * @static - */ - function &singleton(&$config, $depdb = false) - { - $phpdir = $config->get('php_dir', null, 'pear.php.net'); - if (!isset($GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'][$phpdir])) { - $a = new PEAR_DependencyDB; - $GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'][$phpdir] = &$a; - $a->setConfig($config, $depdb); - $e = $a->assertDepsDB(); - if (PEAR::isError($e)) { - return $e; - } - } - - return $GLOBALS['_PEAR_DEPENDENCYDB_INSTANCE'][$phpdir]; - } - - /** - * Set up the registry/location of dependency DB - * @param PEAR_Config|false - * @param string|false full path to the dependency database, or false to use default - */ - function setConfig(&$config, $depdb = false) - { - if (!$config) { - $this->_config = &PEAR_Config::singleton(); - } else { - $this->_config = &$config; - } - - $this->_registry = &$this->_config->getRegistry(); - if (!$depdb) { - $this->_depdb = $this->_config->get('php_dir', null, 'pear.php.net') . - DIRECTORY_SEPARATOR . '.depdb'; - } else { - $this->_depdb = $depdb; - } - - $this->_lockfile = dirname($this->_depdb) . DIRECTORY_SEPARATOR . '.depdblock'; - } - // }}} - - function hasWriteAccess() - { - if (!file_exists($this->_depdb)) { - $dir = $this->_depdb; - while ($dir && $dir != '.') { - $dir = dirname($dir); // cd .. - if ($dir != '.' && file_exists($dir)) { - if (is_writeable($dir)) { - return true; - } - - return false; - } - } - - return false; - } - - return is_writeable($this->_depdb); - } - - // {{{ assertDepsDB() - - /** - * Create the dependency database, if it doesn't exist. Error if the database is - * newer than the code reading it. - * @return void|PEAR_Error - */ - function assertDepsDB() - { - if (!is_file($this->_depdb)) { - $this->rebuildDB(); - return; - } - - $depdb = $this->_getDepDB(); - // Datatype format has been changed, rebuild the Deps DB - if ($depdb['_version'] < $this->_version) { - $this->rebuildDB(); - } - - if ($depdb['_version']{0} > $this->_version{0}) { - return PEAR::raiseError('Dependency database is version ' . - $depdb['_version'] . ', and we are version ' . - $this->_version . ', cannot continue'); - } - } - - /** - * Get a list of installed packages that depend on this package - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2|array - * @return array|false - */ - function getDependentPackages(&$pkg) - { - $data = $this->_getDepDB(); - if (is_object($pkg)) { - $channel = strtolower($pkg->getChannel()); - $package = strtolower($pkg->getPackage()); - } else { - $channel = strtolower($pkg['channel']); - $package = strtolower($pkg['package']); - } - - if (isset($data['packages'][$channel][$package])) { - return $data['packages'][$channel][$package]; - } - - return false; - } - - /** - * Get a list of the actual dependencies of installed packages that depend on - * a package. - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2|array - * @return array|false - */ - function getDependentPackageDependencies(&$pkg) - { - $data = $this->_getDepDB(); - if (is_object($pkg)) { - $channel = strtolower($pkg->getChannel()); - $package = strtolower($pkg->getPackage()); - } else { - $channel = strtolower($pkg['channel']); - $package = strtolower($pkg['package']); - } - - $depend = $this->getDependentPackages($pkg); - if (!$depend) { - return false; - } - - $dependencies = array(); - foreach ($depend as $info) { - $temp = $this->getDependencies($info); - foreach ($temp as $dep) { - if ( - isset($dep['dep'], $dep['dep']['channel'], $dep['dep']['name']) && - strtolower($dep['dep']['channel']) == $channel && - strtolower($dep['dep']['name']) == $package - ) { - if (!isset($dependencies[$info['channel']])) { - $dependencies[$info['channel']] = array(); - } - - if (!isset($dependencies[$info['channel']][$info['package']])) { - $dependencies[$info['channel']][$info['package']] = array(); - } - $dependencies[$info['channel']][$info['package']][] = $dep; - } - } - } - - return $dependencies; - } - - /** - * Get a list of dependencies of this installed package - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2|array - * @return array|false - */ - function getDependencies(&$pkg) - { - if (is_object($pkg)) { - $channel = strtolower($pkg->getChannel()); - $package = strtolower($pkg->getPackage()); - } else { - $channel = strtolower($pkg['channel']); - $package = strtolower($pkg['package']); - } - - $data = $this->_getDepDB(); - if (isset($data['dependencies'][$channel][$package])) { - return $data['dependencies'][$channel][$package]; - } - - return false; - } - - /** - * Determine whether $parent depends on $child, near or deep - * @param array|PEAR_PackageFile_v2|PEAR_PackageFile_v2 - * @param array|PEAR_PackageFile_v2|PEAR_PackageFile_v2 - */ - function dependsOn($parent, $child) - { - $c = array(); - $this->_getDepDB(); - return $this->_dependsOn($parent, $child, $c); - } - - function _dependsOn($parent, $child, &$checked) - { - if (is_object($parent)) { - $channel = strtolower($parent->getChannel()); - $package = strtolower($parent->getPackage()); - } else { - $channel = strtolower($parent['channel']); - $package = strtolower($parent['package']); - } - - if (is_object($child)) { - $depchannel = strtolower($child->getChannel()); - $deppackage = strtolower($child->getPackage()); - } else { - $depchannel = strtolower($child['channel']); - $deppackage = strtolower($child['package']); - } - - if (isset($checked[$channel][$package][$depchannel][$deppackage])) { - return false; // avoid endless recursion - } - - $checked[$channel][$package][$depchannel][$deppackage] = true; - if (!isset($this->_cache['dependencies'][$channel][$package])) { - return false; - } - - foreach ($this->_cache['dependencies'][$channel][$package] as $info) { - if (isset($info['dep']['uri'])) { - if (is_object($child)) { - if ($info['dep']['uri'] == $child->getURI()) { - return true; - } - } elseif (isset($child['uri'])) { - if ($info['dep']['uri'] == $child['uri']) { - return true; - } - } - return false; - } - - if (strtolower($info['dep']['channel']) == $depchannel && - strtolower($info['dep']['name']) == $deppackage) { - return true; - } - } - - foreach ($this->_cache['dependencies'][$channel][$package] as $info) { - if (isset($info['dep']['uri'])) { - if ($this->_dependsOn(array( - 'uri' => $info['dep']['uri'], - 'package' => $info['dep']['name']), $child, $checked)) { - return true; - } - } else { - if ($this->_dependsOn(array( - 'channel' => $info['dep']['channel'], - 'package' => $info['dep']['name']), $child, $checked)) { - return true; - } - } - } - - return false; - } - - /** - * Register dependencies of a package that is being installed or upgraded - * @param PEAR_PackageFile_v2|PEAR_PackageFile_v2 - */ - function installPackage(&$package) - { - $data = $this->_getDepDB(); - unset($this->_cache); - $this->_setPackageDeps($data, $package); - $this->_writeDepDB($data); - } - - /** - * Remove dependencies of a package that is being uninstalled, or upgraded. - * - * Upgraded packages first uninstall, then install - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2|array If an array, then it must have - * indices 'channel' and 'package' - */ - function uninstallPackage(&$pkg) - { - $data = $this->_getDepDB(); - unset($this->_cache); - if (is_object($pkg)) { - $channel = strtolower($pkg->getChannel()); - $package = strtolower($pkg->getPackage()); - } else { - $channel = strtolower($pkg['channel']); - $package = strtolower($pkg['package']); - } - - if (!isset($data['dependencies'][$channel][$package])) { - return true; - } - - foreach ($data['dependencies'][$channel][$package] as $dep) { - $found = false; - $depchannel = isset($dep['dep']['uri']) ? '__uri' : strtolower($dep['dep']['channel']); - $depname = strtolower($dep['dep']['name']); - if (isset($data['packages'][$depchannel][$depname])) { - foreach ($data['packages'][$depchannel][$depname] as $i => $info) { - if ($info['channel'] == $channel && $info['package'] == $package) { - $found = true; - break; - } - } - } - - if ($found) { - unset($data['packages'][$depchannel][$depname][$i]); - if (!count($data['packages'][$depchannel][$depname])) { - unset($data['packages'][$depchannel][$depname]); - if (!count($data['packages'][$depchannel])) { - unset($data['packages'][$depchannel]); - } - } else { - $data['packages'][$depchannel][$depname] = - array_values($data['packages'][$depchannel][$depname]); - } - } - } - - unset($data['dependencies'][$channel][$package]); - if (!count($data['dependencies'][$channel])) { - unset($data['dependencies'][$channel]); - } - - if (!count($data['dependencies'])) { - unset($data['dependencies']); - } - - if (!count($data['packages'])) { - unset($data['packages']); - } - - $this->_writeDepDB($data); - } - - /** - * Rebuild the dependency DB by reading registry entries. - * @return true|PEAR_Error - */ - function rebuildDB() - { - $depdb = array('_version' => $this->_version); - if (!$this->hasWriteAccess()) { - // allow startup for read-only with older Registry - return $depdb; - } - - $packages = $this->_registry->listAllPackages(); - if (PEAR::isError($packages)) { - return $packages; - } - - foreach ($packages as $channel => $ps) { - foreach ($ps as $package) { - $package = $this->_registry->getPackage($package, $channel); - if (PEAR::isError($package)) { - return $package; - } - $this->_setPackageDeps($depdb, $package); - } - } - - $error = $this->_writeDepDB($depdb); - if (PEAR::isError($error)) { - return $error; - } - - $this->_cache = $depdb; - return true; - } - - /** - * Register usage of the dependency DB to prevent race conditions - * @param int one of the LOCK_* constants - * @return true|PEAR_Error - * @access private - */ - function _lock($mode = LOCK_EX) - { - if (stristr(php_uname(), 'Windows 9')) { - return true; - } - - if ($mode != LOCK_UN && is_resource($this->_lockFp)) { - // XXX does not check type of lock (LOCK_SH/LOCK_EX) - return true; - } - - $open_mode = 'w'; - // XXX People reported problems with LOCK_SH and 'w' - if ($mode === LOCK_SH) { - if (!file_exists($this->_lockfile)) { - touch($this->_lockfile); - } elseif (!is_file($this->_lockfile)) { - return PEAR::raiseError('could not create Dependency lock file, ' . - 'it exists and is not a regular file'); - } - $open_mode = 'r'; - } - - if (!is_resource($this->_lockFp)) { - $this->_lockFp = @fopen($this->_lockfile, $open_mode); - } - - if (!is_resource($this->_lockFp)) { - return PEAR::raiseError("could not create Dependency lock file" . - (isset($php_errormsg) ? ": " . $php_errormsg : "")); - } - - if (!(int)flock($this->_lockFp, $mode)) { - switch ($mode) { - case LOCK_SH: $str = 'shared'; break; - case LOCK_EX: $str = 'exclusive'; break; - case LOCK_UN: $str = 'unlock'; break; - default: $str = 'unknown'; break; - } - - return PEAR::raiseError("could not acquire $str lock ($this->_lockfile)"); - } - - return true; - } - - /** - * Release usage of dependency DB - * @return true|PEAR_Error - * @access private - */ - function _unlock() - { - $ret = $this->_lock(LOCK_UN); - if (is_resource($this->_lockFp)) { - fclose($this->_lockFp); - } - $this->_lockFp = null; - return $ret; - } - - /** - * Load the dependency database from disk, or return the cache - * @return array|PEAR_Error - */ - function _getDepDB() - { - if (!$this->hasWriteAccess()) { - return array('_version' => $this->_version); - } - - if (isset($this->_cache)) { - return $this->_cache; - } - - if (!$fp = fopen($this->_depdb, 'r')) { - $err = PEAR::raiseError("Could not open dependencies file `".$this->_depdb."'"); - return $err; - } - - $rt = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - clearstatcache(); - fclose($fp); - $data = unserialize(file_get_contents($this->_depdb)); - set_magic_quotes_runtime($rt); - $this->_cache = $data; - return $data; - } - - /** - * Write out the dependency database to disk - * @param array the database - * @return true|PEAR_Error - * @access private - */ - function _writeDepDB(&$deps) - { - if (PEAR::isError($e = $this->_lock(LOCK_EX))) { - return $e; - } - - if (!$fp = fopen($this->_depdb, 'wb')) { - $this->_unlock(); - return PEAR::raiseError("Could not open dependencies file `".$this->_depdb."' for writing"); - } - - $rt = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - fwrite($fp, serialize($deps)); - set_magic_quotes_runtime($rt); - fclose($fp); - $this->_unlock(); - $this->_cache = $deps; - return true; - } - - /** - * Register all dependencies from a package in the dependencies database, in essence - * "installing" the package's dependency information - * @param array the database - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @access private - */ - function _setPackageDeps(&$data, &$pkg) - { - $pkg->setConfig($this->_config); - if ($pkg->getPackagexmlVersion() == '1.0') { - $gen = &$pkg->getDefaultGenerator(); - $deps = $gen->dependenciesToV2(); - } else { - $deps = $pkg->getDeps(true); - } - - if (!$deps) { - return; - } - - if (!is_array($data)) { - $data = array(); - } - - if (!isset($data['dependencies'])) { - $data['dependencies'] = array(); - } - - $channel = strtolower($pkg->getChannel()); - $package = strtolower($pkg->getPackage()); - - if (!isset($data['dependencies'][$channel])) { - $data['dependencies'][$channel] = array(); - } - - $data['dependencies'][$channel][$package] = array(); - if (isset($deps['required']['package'])) { - if (!isset($deps['required']['package'][0])) { - $deps['required']['package'] = array($deps['required']['package']); - } - - foreach ($deps['required']['package'] as $dep) { - $this->_registerDep($data, $pkg, $dep, 'required'); - } - } - - if (isset($deps['optional']['package'])) { - if (!isset($deps['optional']['package'][0])) { - $deps['optional']['package'] = array($deps['optional']['package']); - } - - foreach ($deps['optional']['package'] as $dep) { - $this->_registerDep($data, $pkg, $dep, 'optional'); - } - } - - if (isset($deps['required']['subpackage'])) { - if (!isset($deps['required']['subpackage'][0])) { - $deps['required']['subpackage'] = array($deps['required']['subpackage']); - } - - foreach ($deps['required']['subpackage'] as $dep) { - $this->_registerDep($data, $pkg, $dep, 'required'); - } - } - - if (isset($deps['optional']['subpackage'])) { - if (!isset($deps['optional']['subpackage'][0])) { - $deps['optional']['subpackage'] = array($deps['optional']['subpackage']); - } - - foreach ($deps['optional']['subpackage'] as $dep) { - $this->_registerDep($data, $pkg, $dep, 'optional'); - } - } - - if (isset($deps['group'])) { - if (!isset($deps['group'][0])) { - $deps['group'] = array($deps['group']); - } - - foreach ($deps['group'] as $group) { - if (isset($group['package'])) { - if (!isset($group['package'][0])) { - $group['package'] = array($group['package']); - } - - foreach ($group['package'] as $dep) { - $this->_registerDep($data, $pkg, $dep, 'optional', - $group['attribs']['name']); - } - } - - if (isset($group['subpackage'])) { - if (!isset($group['subpackage'][0])) { - $group['subpackage'] = array($group['subpackage']); - } - - foreach ($group['subpackage'] as $dep) { - $this->_registerDep($data, $pkg, $dep, 'optional', - $group['attribs']['name']); - } - } - } - } - - if ($data['dependencies'][$channel][$package] == array()) { - unset($data['dependencies'][$channel][$package]); - if (!count($data['dependencies'][$channel])) { - unset($data['dependencies'][$channel]); - } - } - } - - /** - * @param array the database - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @param array the specific dependency - * @param required|optional whether this is a required or an optional dep - * @param string|false dependency group this dependency is from, or false for ordinary dep - */ - function _registerDep(&$data, &$pkg, $dep, $type, $group = false) - { - $info = array( - 'dep' => $dep, - 'type' => $type, - 'group' => $group - ); - - $dep = array_map('strtolower', $dep); - $depchannel = isset($dep['channel']) ? $dep['channel'] : '__uri'; - if (!isset($data['dependencies'])) { - $data['dependencies'] = array(); - } - - $channel = strtolower($pkg->getChannel()); - $package = strtolower($pkg->getPackage()); - - if (!isset($data['dependencies'][$channel])) { - $data['dependencies'][$channel] = array(); - } - - if (!isset($data['dependencies'][$channel][$package])) { - $data['dependencies'][$channel][$package] = array(); - } - - $data['dependencies'][$channel][$package][] = $info; - if (isset($data['packages'][$depchannel][$dep['name']])) { - $found = false; - foreach ($data['packages'][$depchannel][$dep['name']] as $i => $p) { - if ($p['channel'] == $channel && $p['package'] == $package) { - $found = true; - break; - } - } - } else { - if (!isset($data['packages'])) { - $data['packages'] = array(); - } - - if (!isset($data['packages'][$depchannel])) { - $data['packages'][$depchannel] = array(); - } - - if (!isset($data['packages'][$depchannel][$dep['name']])) { - $data['packages'][$depchannel][$dep['name']] = array(); - } - - $found = false; - } - - if (!$found) { - $data['packages'][$depchannel][$dep['name']][] = array( - 'channel' => $channel, - 'package' => $package - ); - } - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Downloader.php b/_piecrust/libs/PEAR/Downloader.php deleted file mode 100644 index 730df0b..0000000 --- a/_piecrust/libs/PEAR/Downloader.php +++ /dev/null @@ -1,1766 +0,0 @@ - - * @author Stig Bakken - * @author Tomas V. V. Cox - * @author Martin Jansen - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Downloader.php 313024 2011-07-06 19:51:24Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.3.0 - */ - -/** - * Needed for constants, extending - */ -require_once 'PEAR/Common.php'; - -define('PEAR_INSTALLER_OK', 1); -define('PEAR_INSTALLER_FAILED', 0); -define('PEAR_INSTALLER_SKIPPED', -1); -define('PEAR_INSTALLER_ERROR_NO_PREF_STATE', 2); - -/** - * Administration class used to download anything from the internet (PEAR Packages, - * static URLs, xml files) - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @author Stig Bakken - * @author Tomas V. V. Cox - * @author Martin Jansen - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.3.0 - */ -class PEAR_Downloader extends PEAR_Common -{ - /** - * @var PEAR_Registry - * @access private - */ - var $_registry; - - /** - * Preferred Installation State (snapshot, devel, alpha, beta, stable) - * @var string|null - * @access private - */ - var $_preferredState; - - /** - * Options from command-line passed to Install. - * - * Recognized options:
        - * - onlyreqdeps : install all required dependencies as well - * - alldeps : install all dependencies, including optional - * - installroot : base relative path to install files in - * - force : force a download even if warnings would prevent it - * - nocompress : download uncompressed tarballs - * @see PEAR_Command_Install - * @access private - * @var array - */ - var $_options; - - /** - * Downloaded Packages after a call to download(). - * - * Format of each entry: - * - * - * array('pkg' => 'package_name', 'file' => '/path/to/local/file', - * 'info' => array() // parsed package.xml - * ); - * - * @access private - * @var array - */ - var $_downloadedPackages = array(); - - /** - * Packages slated for download. - * - * This is used to prevent downloading a package more than once should it be a dependency - * for two packages to be installed. - * Format of each entry: - * - *
        -     * array('package_name1' => parsed package.xml, 'package_name2' => parsed package.xml,
        -     * );
        -     * 
        - * @access private - * @var array - */ - var $_toDownload = array(); - - /** - * Array of every package installed, with names lower-cased. - * - * Format: - * - * array('package1' => 0, 'package2' => 1, ); - * - * @var array - */ - var $_installed = array(); - - /** - * @var array - * @access private - */ - var $_errorStack = array(); - - /** - * @var boolean - * @access private - */ - var $_internalDownload = false; - - /** - * Temporary variable used in sorting packages by dependency in {@link sortPkgDeps()} - * @var array - * @access private - */ - var $_packageSortTree; - - /** - * Temporary directory, or configuration value where downloads will occur - * @var string - */ - var $_downloadDir; - - /** - * @param PEAR_Frontend_* - * @param array - * @param PEAR_Config - */ - function PEAR_Downloader(&$ui, $options, &$config) - { - parent::PEAR_Common(); - $this->_options = $options; - $this->config = &$config; - $this->_preferredState = $this->config->get('preferred_state'); - $this->ui = &$ui; - if (!$this->_preferredState) { - // don't inadvertantly use a non-set preferred_state - $this->_preferredState = null; - } - - if (isset($this->_options['installroot'])) { - $this->config->setInstallRoot($this->_options['installroot']); - } - $this->_registry = &$config->getRegistry(); - - if (isset($this->_options['alldeps']) || isset($this->_options['onlyreqdeps'])) { - $this->_installed = $this->_registry->listAllPackages(); - foreach ($this->_installed as $key => $unused) { - if (!count($unused)) { - continue; - } - $strtolower = create_function('$a','return strtolower($a);'); - array_walk($this->_installed[$key], $strtolower); - } - } - } - - /** - * Attempt to discover a channel's remote capabilities from - * its server name - * @param string - * @return boolean - */ - function discover($channel) - { - $this->log(1, 'Attempting to discover channel "' . $channel . '"...'); - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $callback = $this->ui ? array(&$this, '_downloadCallback') : null; - if (!class_exists('System')) { - require_once 'System.php'; - } - - $tmpdir = $this->config->get('temp_dir'); - $tmp = System::mktemp('-d -t "' . $tmpdir . '"'); - $a = $this->downloadHttp('http://' . $channel . '/channel.xml', $this->ui, $tmp, $callback, false); - PEAR::popErrorHandling(); - if (PEAR::isError($a)) { - // Attempt to fallback to https automatically. - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $this->log(1, 'Attempting fallback to https instead of http on channel "' . $channel . '"...'); - $a = $this->downloadHttp('https://' . $channel . '/channel.xml', $this->ui, $tmp, $callback, false); - PEAR::popErrorHandling(); - if (PEAR::isError($a)) { - return false; - } - } - - list($a, $lastmodified) = $a; - if (!class_exists('PEAR_ChannelFile')) { - require_once 'PEAR/ChannelFile.php'; - } - - $b = new PEAR_ChannelFile; - if ($b->fromXmlFile($a)) { - unlink($a); - if ($this->config->get('auto_discover')) { - $this->_registry->addChannel($b, $lastmodified); - $alias = $b->getName(); - if ($b->getName() == $this->_registry->channelName($b->getAlias())) { - $alias = $b->getAlias(); - } - - $this->log(1, 'Auto-discovered channel "' . $channel . - '", alias "' . $alias . '", adding to registry'); - } - - return true; - } - - unlink($a); - return false; - } - - /** - * For simpler unit-testing - * @param PEAR_Downloader - * @return PEAR_Downloader_Package - */ - function &newDownloaderPackage(&$t) - { - if (!class_exists('PEAR_Downloader_Package')) { - require_once 'PEAR/Downloader/Package.php'; - } - $a = &new PEAR_Downloader_Package($t); - return $a; - } - - /** - * For simpler unit-testing - * @param PEAR_Config - * @param array - * @param array - * @param int - */ - function &getDependency2Object(&$c, $i, $p, $s) - { - if (!class_exists('PEAR_Dependency2')) { - require_once 'PEAR/Dependency2.php'; - } - $z = &new PEAR_Dependency2($c, $i, $p, $s); - return $z; - } - - function &download($params) - { - if (!count($params)) { - $a = array(); - return $a; - } - - if (!isset($this->_registry)) { - $this->_registry = &$this->config->getRegistry(); - } - - $channelschecked = array(); - // convert all parameters into PEAR_Downloader_Package objects - foreach ($params as $i => $param) { - $params[$i] = &$this->newDownloaderPackage($this); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $err = $params[$i]->initialize($param); - PEAR::staticPopErrorHandling(); - if (!$err) { - // skip parameters that were missed by preferred_state - continue; - } - - if (PEAR::isError($err)) { - if (!isset($this->_options['soft']) && $err->getMessage() !== '') { - $this->log(0, $err->getMessage()); - } - - $params[$i] = false; - if (is_object($param)) { - $param = $param->getChannel() . '/' . $param->getPackage(); - } - - if (!isset($this->_options['soft'])) { - $this->log(2, 'Package "' . $param . '" is not valid'); - } - - // Message logged above in a specific verbose mode, passing null to not show up on CLI - $this->pushError(null, PEAR_INSTALLER_SKIPPED); - } else { - do { - if ($params[$i] && $params[$i]->getType() == 'local') { - // bug #7090 skip channel.xml check for local packages - break; - } - - if ($params[$i] && !isset($channelschecked[$params[$i]->getChannel()]) && - !isset($this->_options['offline']) - ) { - $channelschecked[$params[$i]->getChannel()] = true; - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - if (!class_exists('System')) { - require_once 'System.php'; - } - - $curchannel = &$this->_registry->getChannel($params[$i]->getChannel()); - if (PEAR::isError($curchannel)) { - PEAR::staticPopErrorHandling(); - return $this->raiseError($curchannel); - } - - if (PEAR::isError($dir = $this->getDownloadDir())) { - PEAR::staticPopErrorHandling(); - break; - } - - $mirror = $this->config->get('preferred_mirror', null, $params[$i]->getChannel()); - $url = 'http://' . $mirror . '/channel.xml'; - $a = $this->downloadHttp($url, $this->ui, $dir, null, $curchannel->lastModified()); - - PEAR::staticPopErrorHandling(); - if (PEAR::isError($a) || !$a) { - // Attempt fallback to https automatically - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $a = $this->downloadHttp('https://' . $mirror . - '/channel.xml', $this->ui, $dir, null, $curchannel->lastModified()); - - PEAR::staticPopErrorHandling(); - if (PEAR::isError($a) || !$a) { - break; - } - } - $this->log(0, 'WARNING: channel "' . $params[$i]->getChannel() . '" has ' . - 'updated its protocols, use "' . PEAR_RUNTYPE . ' channel-update ' . $params[$i]->getChannel() . - '" to update'); - } - } while (false); - - if ($params[$i] && !isset($this->_options['downloadonly'])) { - if (isset($this->_options['packagingroot'])) { - $checkdir = $this->_prependPath( - $this->config->get('php_dir', null, $params[$i]->getChannel()), - $this->_options['packagingroot']); - } else { - $checkdir = $this->config->get('php_dir', - null, $params[$i]->getChannel()); - } - - while ($checkdir && $checkdir != '/' && !file_exists($checkdir)) { - $checkdir = dirname($checkdir); - } - - if ($checkdir == '.') { - $checkdir = '/'; - } - - if (!is_writeable($checkdir)) { - return PEAR::raiseError('Cannot install, php_dir for channel "' . - $params[$i]->getChannel() . '" is not writeable by the current user'); - } - } - } - } - - unset($channelschecked); - PEAR_Downloader_Package::removeDuplicates($params); - if (!count($params)) { - $a = array(); - return $a; - } - - if (!isset($this->_options['nodeps']) && !isset($this->_options['offline'])) { - $reverify = true; - while ($reverify) { - $reverify = false; - foreach ($params as $i => $param) { - //PHP Bug 40768 / PEAR Bug #10944 - //Nested foreaches fail in PHP 5.2.1 - key($params); - $ret = $params[$i]->detectDependencies($params); - if (PEAR::isError($ret)) { - $reverify = true; - $params[$i] = false; - PEAR_Downloader_Package::removeDuplicates($params); - if (!isset($this->_options['soft'])) { - $this->log(0, $ret->getMessage()); - } - continue 2; - } - } - } - } - - if (isset($this->_options['offline'])) { - $this->log(3, 'Skipping dependency download check, --offline specified'); - } - - if (!count($params)) { - $a = array(); - return $a; - } - - while (PEAR_Downloader_Package::mergeDependencies($params)); - PEAR_Downloader_Package::removeDuplicates($params, true); - $errorparams = array(); - if (PEAR_Downloader_Package::detectStupidDuplicates($params, $errorparams)) { - if (count($errorparams)) { - foreach ($errorparams as $param) { - $name = $this->_registry->parsedPackageNameToString($param->getParsedPackage()); - $this->pushError('Duplicate package ' . $name . ' found', PEAR_INSTALLER_FAILED); - } - $a = array(); - return $a; - } - } - - PEAR_Downloader_Package::removeInstalled($params); - if (!count($params)) { - $this->pushError('No valid packages found', PEAR_INSTALLER_FAILED); - $a = array(); - return $a; - } - - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $err = $this->analyzeDependencies($params); - PEAR::popErrorHandling(); - if (!count($params)) { - $this->pushError('No valid packages found', PEAR_INSTALLER_FAILED); - $a = array(); - return $a; - } - - $ret = array(); - $newparams = array(); - if (isset($this->_options['pretend'])) { - return $params; - } - - $somefailed = false; - foreach ($params as $i => $package) { - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $pf = &$params[$i]->download(); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($pf)) { - if (!isset($this->_options['soft'])) { - $this->log(1, $pf->getMessage()); - $this->log(0, 'Error: cannot download "' . - $this->_registry->parsedPackageNameToString($package->getParsedPackage(), - true) . - '"'); - } - $somefailed = true; - continue; - } - - $newparams[] = &$params[$i]; - $ret[] = array( - 'file' => $pf->getArchiveFile(), - 'info' => &$pf, - 'pkg' => $pf->getPackage() - ); - } - - if ($somefailed) { - // remove params that did not download successfully - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $err = $this->analyzeDependencies($newparams, true); - PEAR::popErrorHandling(); - if (!count($newparams)) { - $this->pushError('Download failed', PEAR_INSTALLER_FAILED); - $a = array(); - return $a; - } - } - - $this->_downloadedPackages = $ret; - return $newparams; - } - - /** - * @param array all packages to be installed - */ - function analyzeDependencies(&$params, $force = false) - { - if (isset($this->_options['downloadonly'])) { - return; - } - - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $redo = true; - $reset = $hasfailed = $failed = false; - while ($redo) { - $redo = false; - foreach ($params as $i => $param) { - $deps = $param->getDeps(); - if (!$deps) { - $depchecker = &$this->getDependency2Object($this->config, $this->getOptions(), - $param->getParsedPackage(), PEAR_VALIDATE_DOWNLOADING); - $send = $param->getPackageFile(); - - $installcheck = $depchecker->validatePackage($send, $this, $params); - if (PEAR::isError($installcheck)) { - if (!isset($this->_options['soft'])) { - $this->log(0, $installcheck->getMessage()); - } - $hasfailed = true; - $params[$i] = false; - $reset = true; - $redo = true; - $failed = false; - PEAR_Downloader_Package::removeDuplicates($params); - continue 2; - } - continue; - } - - if (!$reset && $param->alreadyValidated() && !$force) { - continue; - } - - if (count($deps)) { - $depchecker = &$this->getDependency2Object($this->config, $this->getOptions(), - $param->getParsedPackage(), PEAR_VALIDATE_DOWNLOADING); - $send = $param->getPackageFile(); - if ($send === null) { - $send = $param->getDownloadURL(); - } - - $installcheck = $depchecker->validatePackage($send, $this, $params); - if (PEAR::isError($installcheck)) { - if (!isset($this->_options['soft'])) { - $this->log(0, $installcheck->getMessage()); - } - $hasfailed = true; - $params[$i] = false; - $reset = true; - $redo = true; - $failed = false; - PEAR_Downloader_Package::removeDuplicates($params); - continue 2; - } - - $failed = false; - if (isset($deps['required']) && is_array($deps['required'])) { - foreach ($deps['required'] as $type => $dep) { - // note: Dependency2 will never return a PEAR_Error if ignore-errors - // is specified, so soft is needed to turn off logging - if (!isset($dep[0])) { - if (PEAR::isError($e = $depchecker->{"validate{$type}Dependency"}($dep, - true, $params))) { - $failed = true; - if (!isset($this->_options['soft'])) { - $this->log(0, $e->getMessage()); - } - } elseif (is_array($e) && !$param->alreadyValidated()) { - if (!isset($this->_options['soft'])) { - $this->log(0, $e[0]); - } - } - } else { - foreach ($dep as $d) { - if (PEAR::isError($e = - $depchecker->{"validate{$type}Dependency"}($d, - true, $params))) { - $failed = true; - if (!isset($this->_options['soft'])) { - $this->log(0, $e->getMessage()); - } - } elseif (is_array($e) && !$param->alreadyValidated()) { - if (!isset($this->_options['soft'])) { - $this->log(0, $e[0]); - } - } - } - } - } - - if (isset($deps['optional']) && is_array($deps['optional'])) { - foreach ($deps['optional'] as $type => $dep) { - if (!isset($dep[0])) { - if (PEAR::isError($e = - $depchecker->{"validate{$type}Dependency"}($dep, - false, $params))) { - $failed = true; - if (!isset($this->_options['soft'])) { - $this->log(0, $e->getMessage()); - } - } elseif (is_array($e) && !$param->alreadyValidated()) { - if (!isset($this->_options['soft'])) { - $this->log(0, $e[0]); - } - } - } else { - foreach ($dep as $d) { - if (PEAR::isError($e = - $depchecker->{"validate{$type}Dependency"}($d, - false, $params))) { - $failed = true; - if (!isset($this->_options['soft'])) { - $this->log(0, $e->getMessage()); - } - } elseif (is_array($e) && !$param->alreadyValidated()) { - if (!isset($this->_options['soft'])) { - $this->log(0, $e[0]); - } - } - } - } - } - } - - $groupname = $param->getGroup(); - if (isset($deps['group']) && $groupname) { - if (!isset($deps['group'][0])) { - $deps['group'] = array($deps['group']); - } - - $found = false; - foreach ($deps['group'] as $group) { - if ($group['attribs']['name'] == $groupname) { - $found = true; - break; - } - } - - if ($found) { - unset($group['attribs']); - foreach ($group as $type => $dep) { - if (!isset($dep[0])) { - if (PEAR::isError($e = - $depchecker->{"validate{$type}Dependency"}($dep, - false, $params))) { - $failed = true; - if (!isset($this->_options['soft'])) { - $this->log(0, $e->getMessage()); - } - } elseif (is_array($e) && !$param->alreadyValidated()) { - if (!isset($this->_options['soft'])) { - $this->log(0, $e[0]); - } - } - } else { - foreach ($dep as $d) { - if (PEAR::isError($e = - $depchecker->{"validate{$type}Dependency"}($d, - false, $params))) { - $failed = true; - if (!isset($this->_options['soft'])) { - $this->log(0, $e->getMessage()); - } - } elseif (is_array($e) && !$param->alreadyValidated()) { - if (!isset($this->_options['soft'])) { - $this->log(0, $e[0]); - } - } - } - } - } - } - } - } else { - foreach ($deps as $dep) { - if (PEAR::isError($e = $depchecker->validateDependency1($dep, $params))) { - $failed = true; - if (!isset($this->_options['soft'])) { - $this->log(0, $e->getMessage()); - } - } elseif (is_array($e) && !$param->alreadyValidated()) { - if (!isset($this->_options['soft'])) { - $this->log(0, $e[0]); - } - } - } - } - $params[$i]->setValidated(); - } - - if ($failed) { - $hasfailed = true; - $params[$i] = false; - $reset = true; - $redo = true; - $failed = false; - PEAR_Downloader_Package::removeDuplicates($params); - continue 2; - } - } - } - - PEAR::staticPopErrorHandling(); - if ($hasfailed && (isset($this->_options['ignore-errors']) || - isset($this->_options['nodeps']))) { - // this is probably not needed, but just in case - if (!isset($this->_options['soft'])) { - $this->log(0, 'WARNING: dependencies failed'); - } - } - } - - /** - * Retrieve the directory that downloads will happen in - * @access private - * @return string - */ - function getDownloadDir() - { - if (isset($this->_downloadDir)) { - return $this->_downloadDir; - } - - $downloaddir = $this->config->get('download_dir'); - if (empty($downloaddir) || (is_dir($downloaddir) && !is_writable($downloaddir))) { - if (is_dir($downloaddir) && !is_writable($downloaddir)) { - $this->log(0, 'WARNING: configuration download directory "' . $downloaddir . - '" is not writeable. Change download_dir config variable to ' . - 'a writeable dir to avoid this warning'); - } - - if (!class_exists('System')) { - require_once 'System.php'; - } - - if (PEAR::isError($downloaddir = System::mktemp('-d'))) { - return $downloaddir; - } - $this->log(3, '+ tmp dir created at ' . $downloaddir); - } - - if (!is_writable($downloaddir)) { - if (PEAR::isError(System::mkdir(array('-p', $downloaddir))) || - !is_writable($downloaddir)) { - return PEAR::raiseError('download directory "' . $downloaddir . - '" is not writeable. Change download_dir config variable to ' . - 'a writeable dir'); - } - } - - return $this->_downloadDir = $downloaddir; - } - - function setDownloadDir($dir) - { - if (!@is_writable($dir)) { - if (PEAR::isError(System::mkdir(array('-p', $dir)))) { - return PEAR::raiseError('download directory "' . $dir . - '" is not writeable. Change download_dir config variable to ' . - 'a writeable dir'); - } - } - $this->_downloadDir = $dir; - } - - function configSet($key, $value, $layer = 'user', $channel = false) - { - $this->config->set($key, $value, $layer, $channel); - $this->_preferredState = $this->config->get('preferred_state', null, $channel); - if (!$this->_preferredState) { - // don't inadvertantly use a non-set preferred_state - $this->_preferredState = null; - } - } - - function setOptions($options) - { - $this->_options = $options; - } - - function getOptions() - { - return $this->_options; - } - - - /** - * @param array output of {@link parsePackageName()} - * @access private - */ - function _getPackageDownloadUrl($parr) - { - $curchannel = $this->config->get('default_channel'); - $this->configSet('default_channel', $parr['channel']); - // getDownloadURL returns an array. On error, it only contains information - // on the latest release as array(version, info). On success it contains - // array(version, info, download url string) - $state = isset($parr['state']) ? $parr['state'] : $this->config->get('preferred_state'); - if (!$this->_registry->channelExists($parr['channel'])) { - do { - if ($this->config->get('auto_discover') && $this->discover($parr['channel'])) { - break; - } - - $this->configSet('default_channel', $curchannel); - return PEAR::raiseError('Unknown remote channel: ' . $parr['channel']); - } while (false); - } - - $chan = &$this->_registry->getChannel($parr['channel']); - if (PEAR::isError($chan)) { - return $chan; - } - - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $version = $this->_registry->packageInfo($parr['package'], 'version', $parr['channel']); - $stability = $this->_registry->packageInfo($parr['package'], 'stability', $parr['channel']); - // package is installed - use the installed release stability level - if (!isset($parr['state']) && $stability !== null) { - $state = $stability['release']; - } - PEAR::staticPopErrorHandling(); - $base2 = false; - - $preferred_mirror = $this->config->get('preferred_mirror'); - if (!$chan->supportsREST($preferred_mirror) || - ( - !($base2 = $chan->getBaseURL('REST1.3', $preferred_mirror)) - && - !($base = $chan->getBaseURL('REST1.0', $preferred_mirror)) - ) - ) { - return $this->raiseError($parr['channel'] . ' is using a unsupported protocol - This should never happen.'); - } - - if ($base2) { - $rest = &$this->config->getREST('1.3', $this->_options); - $base = $base2; - } else { - $rest = &$this->config->getREST('1.0', $this->_options); - } - - $downloadVersion = false; - if (!isset($parr['version']) && !isset($parr['state']) && $version - && !PEAR::isError($version) - && !isset($this->_options['downloadonly']) - ) { - $downloadVersion = $version; - } - - $url = $rest->getDownloadURL($base, $parr, $state, $downloadVersion, $chan->getName()); - if (PEAR::isError($url)) { - $this->configSet('default_channel', $curchannel); - return $url; - } - - if ($parr['channel'] != $curchannel) { - $this->configSet('default_channel', $curchannel); - } - - if (!is_array($url)) { - return $url; - } - - $url['raw'] = false; // no checking is necessary for REST - if (!is_array($url['info'])) { - return PEAR::raiseError('Invalid remote dependencies retrieved from REST - ' . - 'this should never happen'); - } - - if (!isset($this->_options['force']) && - !isset($this->_options['downloadonly']) && - $version && - !PEAR::isError($version) && - !isset($parr['group']) - ) { - if (version_compare($version, $url['version'], '=')) { - return PEAR::raiseError($this->_registry->parsedPackageNameToString( - $parr, true) . ' is already installed and is the same as the ' . - 'released version ' . $url['version'], -976); - } - - if (version_compare($version, $url['version'], '>')) { - return PEAR::raiseError($this->_registry->parsedPackageNameToString( - $parr, true) . ' is already installed and is newer than detected ' . - 'released version ' . $url['version'], -976); - } - } - - if (isset($url['info']['required']) || $url['compatible']) { - require_once 'PEAR/PackageFile/v2.php'; - $pf = new PEAR_PackageFile_v2; - $pf->setRawChannel($parr['channel']); - if ($url['compatible']) { - $pf->setRawCompatible($url['compatible']); - } - } else { - require_once 'PEAR/PackageFile/v1.php'; - $pf = new PEAR_PackageFile_v1; - } - - $pf->setRawPackage($url['package']); - $pf->setDeps($url['info']); - if ($url['compatible']) { - $pf->setCompatible($url['compatible']); - } - - $pf->setRawState($url['stability']); - $url['info'] = &$pf; - if (!extension_loaded("zlib") || isset($this->_options['nocompress'])) { - $ext = '.tar'; - } else { - $ext = '.tgz'; - } - - if (is_array($url) && isset($url['url'])) { - $url['url'] .= $ext; - } - - return $url; - } - - /** - * @param array dependency array - * @access private - */ - function _getDepPackageDownloadUrl($dep, $parr) - { - $xsdversion = isset($dep['rel']) ? '1.0' : '2.0'; - $curchannel = $this->config->get('default_channel'); - if (isset($dep['uri'])) { - $xsdversion = '2.0'; - $chan = &$this->_registry->getChannel('__uri'); - if (PEAR::isError($chan)) { - return $chan; - } - - $version = $this->_registry->packageInfo($dep['name'], 'version', '__uri'); - $this->configSet('default_channel', '__uri'); - } else { - if (isset($dep['channel'])) { - $remotechannel = $dep['channel']; - } else { - $remotechannel = 'pear.php.net'; - } - - if (!$this->_registry->channelExists($remotechannel)) { - do { - if ($this->config->get('auto_discover')) { - if ($this->discover($remotechannel)) { - break; - } - } - return PEAR::raiseError('Unknown remote channel: ' . $remotechannel); - } while (false); - } - - $chan = &$this->_registry->getChannel($remotechannel); - if (PEAR::isError($chan)) { - return $chan; - } - - $version = $this->_registry->packageInfo($dep['name'], 'version', $remotechannel); - $this->configSet('default_channel', $remotechannel); - } - - $state = isset($parr['state']) ? $parr['state'] : $this->config->get('preferred_state'); - if (isset($parr['state']) && isset($parr['version'])) { - unset($parr['state']); - } - - if (isset($dep['uri'])) { - $info = &$this->newDownloaderPackage($this); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $err = $info->initialize($dep); - PEAR::staticPopErrorHandling(); - if (!$err) { - // skip parameters that were missed by preferred_state - return PEAR::raiseError('Cannot initialize dependency'); - } - - if (PEAR::isError($err)) { - if (!isset($this->_options['soft'])) { - $this->log(0, $err->getMessage()); - } - - if (is_object($info)) { - $param = $info->getChannel() . '/' . $info->getPackage(); - } - return PEAR::raiseError('Package "' . $param . '" is not valid'); - } - return $info; - } elseif ($chan->supportsREST($this->config->get('preferred_mirror')) - && - ( - ($base2 = $chan->getBaseURL('REST1.3', $this->config->get('preferred_mirror'))) - || - ($base = $chan->getBaseURL('REST1.0', $this->config->get('preferred_mirror'))) - ) - ) { - if ($base2) { - $base = $base2; - $rest = &$this->config->getREST('1.3', $this->_options); - } else { - $rest = &$this->config->getREST('1.0', $this->_options); - } - - $url = $rest->getDepDownloadURL($base, $xsdversion, $dep, $parr, - $state, $version, $chan->getName()); - if (PEAR::isError($url)) { - return $url; - } - - if ($parr['channel'] != $curchannel) { - $this->configSet('default_channel', $curchannel); - } - - if (!is_array($url)) { - return $url; - } - - $url['raw'] = false; // no checking is necessary for REST - if (!is_array($url['info'])) { - return PEAR::raiseError('Invalid remote dependencies retrieved from REST - ' . - 'this should never happen'); - } - - if (isset($url['info']['required'])) { - if (!class_exists('PEAR_PackageFile_v2')) { - require_once 'PEAR/PackageFile/v2.php'; - } - $pf = new PEAR_PackageFile_v2; - $pf->setRawChannel($remotechannel); - } else { - if (!class_exists('PEAR_PackageFile_v1')) { - require_once 'PEAR/PackageFile/v1.php'; - } - $pf = new PEAR_PackageFile_v1; - - } - $pf->setRawPackage($url['package']); - $pf->setDeps($url['info']); - if ($url['compatible']) { - $pf->setCompatible($url['compatible']); - } - - $pf->setRawState($url['stability']); - $url['info'] = &$pf; - if (!extension_loaded("zlib") || isset($this->_options['nocompress'])) { - $ext = '.tar'; - } else { - $ext = '.tgz'; - } - - if (is_array($url) && isset($url['url'])) { - $url['url'] .= $ext; - } - - return $url; - } - - return $this->raiseError($parr['channel'] . ' is using a unsupported protocol - This should never happen.'); - } - - /** - * @deprecated in favor of _getPackageDownloadUrl - */ - function getPackageDownloadUrl($package, $version = null, $channel = false) - { - if ($version) { - $package .= "-$version"; - } - if ($this === null || $this->_registry === null) { - $package = "http://pear.php.net/get/$package"; - } else { - $chan = $this->_registry->getChannel($channel); - if (PEAR::isError($chan)) { - return ''; - } - $package = "http://" . $chan->getServer() . "/get/$package"; - } - if (!extension_loaded("zlib")) { - $package .= '?uncompress=yes'; - } - return $package; - } - - /** - * Retrieve a list of downloaded packages after a call to {@link download()}. - * - * Also resets the list of downloaded packages. - * @return array - */ - function getDownloadedPackages() - { - $ret = $this->_downloadedPackages; - $this->_downloadedPackages = array(); - $this->_toDownload = array(); - return $ret; - } - - function _downloadCallback($msg, $params = null) - { - switch ($msg) { - case 'saveas': - $this->log(1, "downloading $params ..."); - break; - case 'done': - $this->log(1, '...done: ' . number_format($params, 0, '', ',') . ' bytes'); - break; - case 'bytesread': - static $bytes; - if (empty($bytes)) { - $bytes = 0; - } - if (!($bytes % 10240)) { - $this->log(1, '.', false); - } - $bytes += $params; - break; - case 'start': - if($params[1] == -1) { - $length = "Unknown size"; - } else { - $length = number_format($params[1], 0, '', ',')." bytes"; - } - $this->log(1, "Starting to download {$params[0]} ($length)"); - break; - } - if (method_exists($this->ui, '_downloadCallback')) - $this->ui->_downloadCallback($msg, $params); - } - - function _prependPath($path, $prepend) - { - if (strlen($prepend) > 0) { - if (OS_WINDOWS && preg_match('/^[a-z]:/i', $path)) { - if (preg_match('/^[a-z]:/i', $prepend)) { - $prepend = substr($prepend, 2); - } elseif ($prepend{0} != '\\') { - $prepend = "\\$prepend"; - } - $path = substr($path, 0, 2) . $prepend . substr($path, 2); - } else { - $path = $prepend . $path; - } - } - return $path; - } - - /** - * @param string - * @param integer - */ - function pushError($errmsg, $code = -1) - { - array_push($this->_errorStack, array($errmsg, $code)); - } - - function getErrorMsgs() - { - $msgs = array(); - $errs = $this->_errorStack; - foreach ($errs as $err) { - $msgs[] = $err[0]; - } - $this->_errorStack = array(); - return $msgs; - } - - /** - * for BC - * - * @deprecated - */ - function sortPkgDeps(&$packages, $uninstall = false) - { - $uninstall ? - $this->sortPackagesForUninstall($packages) : - $this->sortPackagesForInstall($packages); - } - - /** - * Sort a list of arrays of array(downloaded packagefilename) by dependency. - * - * This uses the topological sort method from graph theory, and the - * Structures_Graph package to properly sort dependencies for installation. - * @param array an array of downloaded PEAR_Downloader_Packages - * @return array array of array(packagefilename, package.xml contents) - */ - function sortPackagesForInstall(&$packages) - { - require_once 'Structures/Graph.php'; - require_once 'Structures/Graph/Node.php'; - require_once 'Structures/Graph/Manipulator/TopologicalSorter.php'; - $depgraph = new Structures_Graph(true); - $nodes = array(); - $reg = &$this->config->getRegistry(); - foreach ($packages as $i => $package) { - $pname = $reg->parsedPackageNameToString( - array( - 'channel' => $package->getChannel(), - 'package' => strtolower($package->getPackage()), - )); - $nodes[$pname] = new Structures_Graph_Node; - $nodes[$pname]->setData($packages[$i]); - $depgraph->addNode($nodes[$pname]); - } - - $deplinks = array(); - foreach ($nodes as $package => $node) { - $pf = &$node->getData(); - $pdeps = $pf->getDeps(true); - if (!$pdeps) { - continue; - } - - if ($pf->getPackagexmlVersion() == '1.0') { - foreach ($pdeps as $dep) { - if ($dep['type'] != 'pkg' || - (isset($dep['optional']) && $dep['optional'] == 'yes')) { - continue; - } - - $dname = $reg->parsedPackageNameToString( - array( - 'channel' => 'pear.php.net', - 'package' => strtolower($dep['name']), - )); - - if (isset($nodes[$dname])) { - if (!isset($deplinks[$dname])) { - $deplinks[$dname] = array(); - } - - $deplinks[$dname][$package] = 1; - // dependency is in installed packages - continue; - } - - $dname = $reg->parsedPackageNameToString( - array( - 'channel' => 'pecl.php.net', - 'package' => strtolower($dep['name']), - )); - - if (isset($nodes[$dname])) { - if (!isset($deplinks[$dname])) { - $deplinks[$dname] = array(); - } - - $deplinks[$dname][$package] = 1; - // dependency is in installed packages - continue; - } - } - } else { - // the only ordering we care about is: - // 1) subpackages must be installed before packages that depend on them - // 2) required deps must be installed before packages that depend on them - if (isset($pdeps['required']['subpackage'])) { - $t = $pdeps['required']['subpackage']; - if (!isset($t[0])) { - $t = array($t); - } - - $this->_setupGraph($t, $reg, $deplinks, $nodes, $package); - } - - if (isset($pdeps['group'])) { - if (!isset($pdeps['group'][0])) { - $pdeps['group'] = array($pdeps['group']); - } - - foreach ($pdeps['group'] as $group) { - if (isset($group['subpackage'])) { - $t = $group['subpackage']; - if (!isset($t[0])) { - $t = array($t); - } - - $this->_setupGraph($t, $reg, $deplinks, $nodes, $package); - } - } - } - - if (isset($pdeps['optional']['subpackage'])) { - $t = $pdeps['optional']['subpackage']; - if (!isset($t[0])) { - $t = array($t); - } - - $this->_setupGraph($t, $reg, $deplinks, $nodes, $package); - } - - if (isset($pdeps['required']['package'])) { - $t = $pdeps['required']['package']; - if (!isset($t[0])) { - $t = array($t); - } - - $this->_setupGraph($t, $reg, $deplinks, $nodes, $package); - } - - if (isset($pdeps['group'])) { - if (!isset($pdeps['group'][0])) { - $pdeps['group'] = array($pdeps['group']); - } - - foreach ($pdeps['group'] as $group) { - if (isset($group['package'])) { - $t = $group['package']; - if (!isset($t[0])) { - $t = array($t); - } - - $this->_setupGraph($t, $reg, $deplinks, $nodes, $package); - } - } - } - } - } - - $this->_detectDepCycle($deplinks); - foreach ($deplinks as $dependent => $parents) { - foreach ($parents as $parent => $unused) { - $nodes[$dependent]->connectTo($nodes[$parent]); - } - } - - $installOrder = Structures_Graph_Manipulator_TopologicalSorter::sort($depgraph); - $ret = array(); - for ($i = 0, $count = count($installOrder); $i < $count; $i++) { - foreach ($installOrder[$i] as $index => $sortedpackage) { - $data = &$installOrder[$i][$index]->getData(); - $ret[] = &$nodes[$reg->parsedPackageNameToString( - array( - 'channel' => $data->getChannel(), - 'package' => strtolower($data->getPackage()), - ))]->getData(); - } - } - - $packages = $ret; - return; - } - - /** - * Detect recursive links between dependencies and break the cycles - * - * @param array - * @access private - */ - function _detectDepCycle(&$deplinks) - { - do { - $keepgoing = false; - foreach ($deplinks as $dep => $parents) { - foreach ($parents as $parent => $unused) { - // reset the parent cycle detector - $this->_testCycle(null, null, null); - if ($this->_testCycle($dep, $deplinks, $parent)) { - $keepgoing = true; - unset($deplinks[$dep][$parent]); - if (count($deplinks[$dep]) == 0) { - unset($deplinks[$dep]); - } - - continue 3; - } - } - } - } while ($keepgoing); - } - - function _testCycle($test, $deplinks, $dep) - { - static $visited = array(); - if ($test === null) { - $visited = array(); - return; - } - - // this happens when a parent has a dep cycle on another dependency - // but the child is not part of the cycle - if (isset($visited[$dep])) { - return false; - } - - $visited[$dep] = 1; - if ($test == $dep) { - return true; - } - - if (isset($deplinks[$dep])) { - if (in_array($test, array_keys($deplinks[$dep]), true)) { - return true; - } - - foreach ($deplinks[$dep] as $parent => $unused) { - if ($this->_testCycle($test, $deplinks, $parent)) { - return true; - } - } - } - - return false; - } - - /** - * Set up the dependency for installation parsing - * - * @param array $t dependency information - * @param PEAR_Registry $reg - * @param array $deplinks list of dependency links already established - * @param array $nodes all existing package nodes - * @param string $package parent package name - * @access private - */ - function _setupGraph($t, $reg, &$deplinks, &$nodes, $package) - { - foreach ($t as $dep) { - $depchannel = !isset($dep['channel']) ? '__uri': $dep['channel']; - $dname = $reg->parsedPackageNameToString( - array( - 'channel' => $depchannel, - 'package' => strtolower($dep['name']), - )); - - if (isset($nodes[$dname])) { - if (!isset($deplinks[$dname])) { - $deplinks[$dname] = array(); - } - $deplinks[$dname][$package] = 1; - } - } - } - - function _dependsOn($a, $b) - { - return $this->_checkDepTree(strtolower($a->getChannel()), strtolower($a->getPackage()), $b); - } - - function _checkDepTree($channel, $package, $b, $checked = array()) - { - $checked[$channel][$package] = true; - if (!isset($this->_depTree[$channel][$package])) { - return false; - } - - if (isset($this->_depTree[$channel][$package][strtolower($b->getChannel())] - [strtolower($b->getPackage())])) { - return true; - } - - foreach ($this->_depTree[$channel][$package] as $ch => $packages) { - foreach ($packages as $pa => $true) { - if ($this->_checkDepTree($ch, $pa, $b, $checked)) { - return true; - } - } - } - - return false; - } - - function _sortInstall($a, $b) - { - if (!$a->getDeps() && !$b->getDeps()) { - return 0; // neither package has dependencies, order is insignificant - } - if ($a->getDeps() && !$b->getDeps()) { - return 1; // $a must be installed after $b because $a has dependencies - } - if (!$a->getDeps() && $b->getDeps()) { - return -1; // $b must be installed after $a because $b has dependencies - } - // both packages have dependencies - if ($this->_dependsOn($a, $b)) { - return 1; - } - if ($this->_dependsOn($b, $a)) { - return -1; - } - return 0; - } - - /** - * Download a file through HTTP. Considers suggested file name in - * Content-disposition: header and can run a callback function for - * different events. The callback will be called with two - * parameters: the callback type, and parameters. The implemented - * callback types are: - * - * 'setup' called at the very beginning, parameter is a UI object - * that should be used for all output - * 'message' the parameter is a string with an informational message - * 'saveas' may be used to save with a different file name, the - * parameter is the filename that is about to be used. - * If a 'saveas' callback returns a non-empty string, - * that file name will be used as the filename instead. - * Note that $save_dir will not be affected by this, only - * the basename of the file. - * 'start' download is starting, parameter is number of bytes - * that are expected, or -1 if unknown - * 'bytesread' parameter is the number of bytes read so far - * 'done' download is complete, parameter is the total number - * of bytes read - * 'connfailed' if the TCP/SSL connection fails, this callback is called - * with array(host,port,errno,errmsg) - * 'writefailed' if writing to disk fails, this callback is called - * with array(destfile,errmsg) - * - * If an HTTP proxy has been configured (http_proxy PEAR_Config - * setting), the proxy will be used. - * - * @param string $url the URL to download - * @param object $ui PEAR_Frontend_* instance - * @param object $config PEAR_Config instance - * @param string $save_dir directory to save file in - * @param mixed $callback function/method to call for status - * updates - * @param false|string|array $lastmodified header values to check against for caching - * use false to return the header values from this download - * @param false|array $accept Accept headers to send - * @param false|string $channel Channel to use for retrieving authentication - * @return string|array Returns the full path of the downloaded file or a PEAR - * error on failure. If the error is caused by - * socket-related errors, the error object will - * have the fsockopen error code available through - * getCode(). If caching is requested, then return the header - * values. - * - * @access public - */ - function downloadHttp($url, &$ui, $save_dir = '.', $callback = null, $lastmodified = null, - $accept = false, $channel = false) - { - static $redirect = 0; - // always reset , so we are clean case of error - $wasredirect = $redirect; - $redirect = 0; - if ($callback) { - call_user_func($callback, 'setup', array(&$ui)); - } - - $info = parse_url($url); - if (!isset($info['scheme']) || !in_array($info['scheme'], array('http', 'https'))) { - return PEAR::raiseError('Cannot download non-http URL "' . $url . '"'); - } - - if (!isset($info['host'])) { - return PEAR::raiseError('Cannot download from non-URL "' . $url . '"'); - } - - $host = isset($info['host']) ? $info['host'] : null; - $port = isset($info['port']) ? $info['port'] : null; - $path = isset($info['path']) ? $info['path'] : null; - - if (isset($this)) { - $config = &$this->config; - } else { - $config = &PEAR_Config::singleton(); - } - - $proxy_host = $proxy_port = $proxy_user = $proxy_pass = ''; - if ($config->get('http_proxy') && - $proxy = parse_url($config->get('http_proxy'))) { - $proxy_host = isset($proxy['host']) ? $proxy['host'] : null; - if (isset($proxy['scheme']) && $proxy['scheme'] == 'https') { - $proxy_host = 'ssl://' . $proxy_host; - } - $proxy_port = isset($proxy['port']) ? $proxy['port'] : 8080; - $proxy_user = isset($proxy['user']) ? urldecode($proxy['user']) : null; - $proxy_pass = isset($proxy['pass']) ? urldecode($proxy['pass']) : null; - - if ($callback) { - call_user_func($callback, 'message', "Using HTTP proxy $host:$port"); - } - } - - if (empty($port)) { - $port = (isset($info['scheme']) && $info['scheme'] == 'https') ? 443 : 80; - } - - $scheme = (isset($info['scheme']) && $info['scheme'] == 'https') ? 'https' : 'http'; - - if ($proxy_host != '') { - $fp = @fsockopen($proxy_host, $proxy_port, $errno, $errstr); - if (!$fp) { - if ($callback) { - call_user_func($callback, 'connfailed', array($proxy_host, $proxy_port, - $errno, $errstr)); - } - return PEAR::raiseError("Connection to `$proxy_host:$proxy_port' failed: $errstr", $errno); - } - - if ($lastmodified === false || $lastmodified) { - $request = "GET $url HTTP/1.1\r\n"; - $request .= "Host: $host\r\n"; - } else { - $request = "GET $url HTTP/1.0\r\n"; - $request .= "Host: $host\r\n"; - } - } else { - $network_host = $host; - if (isset($info['scheme']) && $info['scheme'] == 'https') { - $network_host = 'ssl://' . $host; - } - - $fp = @fsockopen($network_host, $port, $errno, $errstr); - if (!$fp) { - if ($callback) { - call_user_func($callback, 'connfailed', array($host, $port, - $errno, $errstr)); - } - return PEAR::raiseError("Connection to `$host:$port' failed: $errstr", $errno); - } - - if ($lastmodified === false || $lastmodified) { - $request = "GET $path HTTP/1.1\r\n"; - $request .= "Host: $host\r\n"; - } else { - $request = "GET $path HTTP/1.0\r\n"; - $request .= "Host: $host\r\n"; - } - } - - $ifmodifiedsince = ''; - if (is_array($lastmodified)) { - if (isset($lastmodified['Last-Modified'])) { - $ifmodifiedsince = 'If-Modified-Since: ' . $lastmodified['Last-Modified'] . "\r\n"; - } - - if (isset($lastmodified['ETag'])) { - $ifmodifiedsince .= "If-None-Match: $lastmodified[ETag]\r\n"; - } - } else { - $ifmodifiedsince = ($lastmodified ? "If-Modified-Since: $lastmodified\r\n" : ''); - } - - $request .= $ifmodifiedsince . - "User-Agent: PEAR/1.9.4/PHP/" . PHP_VERSION . "\r\n"; - - if (isset($this)) { // only pass in authentication for non-static calls - $username = $config->get('username', null, $channel); - $password = $config->get('password', null, $channel); - if ($username && $password) { - $tmp = base64_encode("$username:$password"); - $request .= "Authorization: Basic $tmp\r\n"; - } - } - - if ($proxy_host != '' && $proxy_user != '') { - $request .= 'Proxy-Authorization: Basic ' . - base64_encode($proxy_user . ':' . $proxy_pass) . "\r\n"; - } - - if ($accept) { - $request .= 'Accept: ' . implode(', ', $accept) . "\r\n"; - } - - $request .= "Connection: close\r\n"; - $request .= "\r\n"; - fwrite($fp, $request); - $headers = array(); - $reply = 0; - while (trim($line = fgets($fp, 1024))) { - if (preg_match('/^([^:]+):\s+(.*)\s*\\z/', $line, $matches)) { - $headers[strtolower($matches[1])] = trim($matches[2]); - } elseif (preg_match('|^HTTP/1.[01] ([0-9]{3}) |', $line, $matches)) { - $reply = (int)$matches[1]; - if ($reply == 304 && ($lastmodified || ($lastmodified === false))) { - return false; - } - - if (!in_array($reply, array(200, 301, 302, 303, 305, 307))) { - return PEAR::raiseError("File $scheme://$host:$port$path not valid (received: $line)"); - } - } - } - - if ($reply != 200) { - if (!isset($headers['location'])) { - return PEAR::raiseError("File $scheme://$host:$port$path not valid (redirected but no location)"); - } - - if ($wasredirect > 4) { - return PEAR::raiseError("File $scheme://$host:$port$path not valid (redirection looped more than 5 times)"); - } - - $redirect = $wasredirect + 1; - return $this->downloadHttp($headers['location'], - $ui, $save_dir, $callback, $lastmodified, $accept); - } - - if (isset($headers['content-disposition']) && - preg_match('/\sfilename=\"([^;]*\S)\"\s*(;|\\z)/', $headers['content-disposition'], $matches)) { - $save_as = basename($matches[1]); - } else { - $save_as = basename($url); - } - - if ($callback) { - $tmp = call_user_func($callback, 'saveas', $save_as); - if ($tmp) { - $save_as = $tmp; - } - } - - $dest_file = $save_dir . DIRECTORY_SEPARATOR . $save_as; - if (is_link($dest_file)) { - return PEAR::raiseError('SECURITY ERROR: Will not write to ' . $dest_file . ' as it is symlinked to ' . readlink($dest_file) . ' - Possible symlink attack'); - } - - if (!$wp = @fopen($dest_file, 'wb')) { - fclose($fp); - if ($callback) { - call_user_func($callback, 'writefailed', array($dest_file, $php_errormsg)); - } - return PEAR::raiseError("could not open $dest_file for writing"); - } - - $length = isset($headers['content-length']) ? $headers['content-length'] : -1; - - $bytes = 0; - if ($callback) { - call_user_func($callback, 'start', array(basename($dest_file), $length)); - } - - while ($data = fread($fp, 1024)) { - $bytes += strlen($data); - if ($callback) { - call_user_func($callback, 'bytesread', $bytes); - } - if (!@fwrite($wp, $data)) { - fclose($fp); - if ($callback) { - call_user_func($callback, 'writefailed', array($dest_file, $php_errormsg)); - } - return PEAR::raiseError("$dest_file: write failed ($php_errormsg)"); - } - } - - fclose($fp); - fclose($wp); - if ($callback) { - call_user_func($callback, 'done', $bytes); - } - - if ($lastmodified === false || $lastmodified) { - if (isset($headers['etag'])) { - $lastmodified = array('ETag' => $headers['etag']); - } - - if (isset($headers['last-modified'])) { - if (is_array($lastmodified)) { - $lastmodified['Last-Modified'] = $headers['last-modified']; - } else { - $lastmodified = $headers['last-modified']; - } - } - return array($dest_file, $lastmodified, $headers); - } - return $dest_file; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Downloader/Package.php b/_piecrust/libs/PEAR/Downloader/Package.php deleted file mode 100644 index 987c965..0000000 --- a/_piecrust/libs/PEAR/Downloader/Package.php +++ /dev/null @@ -1,1988 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Package.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * Error code when parameter initialization fails because no releases - * exist within preferred_state, but releases do exist - */ -define('PEAR_DOWNLOADER_PACKAGE_STATE', -1003); -/** - * Error code when parameter initialization fails because no releases - * exist that will work with the existing PHP version - */ -define('PEAR_DOWNLOADER_PACKAGE_PHPVERSION', -1004); - -/** - * Coordinates download parameters and manages their dependencies - * prior to downloading them. - * - * Input can come from three sources: - * - * - local files (archives or package.xml) - * - remote files (downloadable urls) - * - abstract package names - * - * The first two elements are handled cleanly by PEAR_PackageFile, but the third requires - * accessing pearweb's xml-rpc interface to determine necessary dependencies, and the - * format returned of dependencies is slightly different from that used in package.xml. - * - * This class hides the differences between these elements, and makes automatic - * dependency resolution a piece of cake. It also manages conflicts when - * two classes depend on incompatible dependencies, or differing versions of the same - * package dependency. In addition, download will not be attempted if the php version is - * not supported, PEAR installer version is not supported, or non-PECL extensions are not - * installed. - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Downloader_Package -{ - /** - * @var PEAR_Downloader - */ - var $_downloader; - /** - * @var PEAR_Config - */ - var $_config; - /** - * @var PEAR_Registry - */ - var $_registry; - /** - * Used to implement packagingroot properly - * @var PEAR_Registry - */ - var $_installRegistry; - /** - * @var PEAR_PackageFile_v1|PEAR_PackageFile|v2 - */ - var $_packagefile; - /** - * @var array - */ - var $_parsedname; - /** - * @var array - */ - var $_downloadURL; - /** - * @var array - */ - var $_downloadDeps = array(); - /** - * @var boolean - */ - var $_valid = false; - /** - * @var boolean - */ - var $_analyzed = false; - /** - * if this or a parent package was invoked with Package-state, this is set to the - * state variable. - * - * This allows temporary reassignment of preferred_state for a parent package and all of - * its dependencies. - * @var string|false - */ - var $_explicitState = false; - /** - * If this package is invoked with Package#group, this variable will be true - */ - var $_explicitGroup = false; - /** - * Package type local|url - * @var string - */ - var $_type; - /** - * Contents of package.xml, if downloaded from a remote channel - * @var string|false - * @access private - */ - var $_rawpackagefile; - /** - * @var boolean - * @access private - */ - var $_validated = false; - - /** - * @param PEAR_Downloader - */ - function PEAR_Downloader_Package(&$downloader) - { - $this->_downloader = &$downloader; - $this->_config = &$this->_downloader->config; - $this->_registry = &$this->_config->getRegistry(); - $options = $downloader->getOptions(); - if (isset($options['packagingroot'])) { - $this->_config->setInstallRoot($options['packagingroot']); - $this->_installRegistry = &$this->_config->getRegistry(); - $this->_config->setInstallRoot(false); - } else { - $this->_installRegistry = &$this->_registry; - } - $this->_valid = $this->_analyzed = false; - } - - /** - * Parse the input and determine whether this is a local file, a remote uri, or an - * abstract package name. - * - * This is the heart of the PEAR_Downloader_Package(), and is used in - * {@link PEAR_Downloader::download()} - * @param string - * @return bool|PEAR_Error - */ - function initialize($param) - { - $origErr = $this->_fromFile($param); - if ($this->_valid) { - return true; - } - - $options = $this->_downloader->getOptions(); - if (isset($options['offline'])) { - if (PEAR::isError($origErr) && !isset($options['soft'])) { - foreach ($origErr->getUserInfo() as $userInfo) { - if (isset($userInfo['message'])) { - $this->_downloader->log(0, $userInfo['message']); - } - } - - $this->_downloader->log(0, $origErr->getMessage()); - } - - return PEAR::raiseError('Cannot download non-local package "' . $param . '"'); - } - - $err = $this->_fromUrl($param); - if (PEAR::isError($err) || !$this->_valid) { - if ($this->_type == 'url') { - if (PEAR::isError($err) && !isset($options['soft'])) { - $this->_downloader->log(0, $err->getMessage()); - } - - return PEAR::raiseError("Invalid or missing remote package file"); - } - - $err = $this->_fromString($param); - if (PEAR::isError($err) || !$this->_valid) { - if (PEAR::isError($err) && $err->getCode() == PEAR_DOWNLOADER_PACKAGE_STATE) { - return false; // instruct the downloader to silently skip - } - - if (isset($this->_type) && $this->_type == 'local' && PEAR::isError($origErr)) { - if (is_array($origErr->getUserInfo())) { - foreach ($origErr->getUserInfo() as $err) { - if (is_array($err)) { - $err = $err['message']; - } - - if (!isset($options['soft'])) { - $this->_downloader->log(0, $err); - } - } - } - - if (!isset($options['soft'])) { - $this->_downloader->log(0, $origErr->getMessage()); - } - - if (is_array($param)) { - $param = $this->_registry->parsedPackageNameToString($param, true); - } - - if (!isset($options['soft'])) { - $this->_downloader->log(2, "Cannot initialize '$param', invalid or missing package file"); - } - - // Passing no message back - already logged above - return PEAR::raiseError(); - } - - if (PEAR::isError($err) && !isset($options['soft'])) { - $this->_downloader->log(0, $err->getMessage()); - } - - if (is_array($param)) { - $param = $this->_registry->parsedPackageNameToString($param, true); - } - - if (!isset($options['soft'])) { - $this->_downloader->log(2, "Cannot initialize '$param', invalid or missing package file"); - } - - // Passing no message back - already logged above - return PEAR::raiseError(); - } - } - - return true; - } - - /** - * Retrieve any non-local packages - * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2|PEAR_Error - */ - function &download() - { - if (isset($this->_packagefile)) { - return $this->_packagefile; - } - - if (isset($this->_downloadURL['url'])) { - $this->_isvalid = false; - $info = $this->getParsedPackage(); - foreach ($info as $i => $p) { - $info[$i] = strtolower($p); - } - - $err = $this->_fromUrl($this->_downloadURL['url'], - $this->_registry->parsedPackageNameToString($this->_parsedname, true)); - $newinfo = $this->getParsedPackage(); - foreach ($newinfo as $i => $p) { - $newinfo[$i] = strtolower($p); - } - - if ($info != $newinfo) { - do { - if ($info['channel'] == 'pecl.php.net' && $newinfo['channel'] == 'pear.php.net') { - $info['channel'] = 'pear.php.net'; - if ($info == $newinfo) { - // skip the channel check if a pecl package says it's a PEAR package - break; - } - } - if ($info['channel'] == 'pear.php.net' && $newinfo['channel'] == 'pecl.php.net') { - $info['channel'] = 'pecl.php.net'; - if ($info == $newinfo) { - // skip the channel check if a pecl package says it's a PEAR package - break; - } - } - - return PEAR::raiseError('CRITICAL ERROR: We are ' . - $this->_registry->parsedPackageNameToString($info) . ', but the file ' . - 'downloaded claims to be ' . - $this->_registry->parsedPackageNameToString($this->getParsedPackage())); - } while (false); - } - - if (PEAR::isError($err) || !$this->_valid) { - return $err; - } - } - - $this->_type = 'local'; - return $this->_packagefile; - } - - function &getPackageFile() - { - return $this->_packagefile; - } - - function &getDownloader() - { - return $this->_downloader; - } - - function getType() - { - return $this->_type; - } - - /** - * Like {@link initialize()}, but operates on a dependency - */ - function fromDepURL($dep) - { - $this->_downloadURL = $dep; - if (isset($dep['uri'])) { - $options = $this->_downloader->getOptions(); - if (!extension_loaded("zlib") || isset($options['nocompress'])) { - $ext = '.tar'; - } else { - $ext = '.tgz'; - } - - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $err = $this->_fromUrl($dep['uri'] . $ext); - PEAR::popErrorHandling(); - if (PEAR::isError($err)) { - if (!isset($options['soft'])) { - $this->_downloader->log(0, $err->getMessage()); - } - - return PEAR::raiseError('Invalid uri dependency "' . $dep['uri'] . $ext . '", ' . - 'cannot download'); - } - } else { - $this->_parsedname = - array( - 'package' => $dep['info']->getPackage(), - 'channel' => $dep['info']->getChannel(), - 'version' => $dep['version'] - ); - if (!isset($dep['nodefault'])) { - $this->_parsedname['group'] = 'default'; // download the default dependency group - $this->_explicitGroup = false; - } - - $this->_rawpackagefile = $dep['raw']; - } - } - - function detectDependencies($params) - { - $options = $this->_downloader->getOptions(); - if (isset($options['downloadonly'])) { - return; - } - - if (isset($options['offline'])) { - $this->_downloader->log(3, 'Skipping dependency download check, --offline specified'); - return; - } - - $pname = $this->getParsedPackage(); - if (!$pname) { - return; - } - - $deps = $this->getDeps(); - if (!$deps) { - return; - } - - if (isset($deps['required'])) { // package.xml 2.0 - return $this->_detect2($deps, $pname, $options, $params); - } - - return $this->_detect1($deps, $pname, $options, $params); - } - - function setValidated() - { - $this->_validated = true; - } - - function alreadyValidated() - { - return $this->_validated; - } - - /** - * Remove packages to be downloaded that are already installed - * @param array of PEAR_Downloader_Package objects - * @static - */ - function removeInstalled(&$params) - { - if (!isset($params[0])) { - return; - } - - $options = $params[0]->_downloader->getOptions(); - if (!isset($options['downloadonly'])) { - foreach ($params as $i => $param) { - $package = $param->getPackage(); - $channel = $param->getChannel(); - // remove self if already installed with this version - // this does not need any pecl magic - we only remove exact matches - if ($param->_installRegistry->packageExists($package, $channel)) { - $packageVersion = $param->_installRegistry->packageInfo($package, 'version', $channel); - if (version_compare($packageVersion, $param->getVersion(), '==')) { - if (!isset($options['force'])) { - $info = $param->getParsedPackage(); - unset($info['version']); - unset($info['state']); - if (!isset($options['soft'])) { - $param->_downloader->log(1, 'Skipping package "' . - $param->getShortName() . - '", already installed as version ' . $packageVersion); - } - $params[$i] = false; - } - } elseif (!isset($options['force']) && !isset($options['upgrade']) && - !isset($options['soft'])) { - $info = $param->getParsedPackage(); - $param->_downloader->log(1, 'Skipping package "' . - $param->getShortName() . - '", already installed as version ' . $packageVersion); - $params[$i] = false; - } - } - } - } - - PEAR_Downloader_Package::removeDuplicates($params); - } - - function _detect2($deps, $pname, $options, $params) - { - $this->_downloadDeps = array(); - $groupnotfound = false; - foreach (array('package', 'subpackage') as $packagetype) { - // get required dependency group - if (isset($deps['required'][$packagetype])) { - if (isset($deps['required'][$packagetype][0])) { - foreach ($deps['required'][$packagetype] as $dep) { - if (isset($dep['conflicts'])) { - // skip any package that this package conflicts with - continue; - } - $ret = $this->_detect2Dep($dep, $pname, 'required', $params); - if (is_array($ret)) { - $this->_downloadDeps[] = $ret; - } elseif (PEAR::isError($ret) && !isset($options['soft'])) { - $this->_downloader->log(0, $ret->getMessage()); - } - } - } else { - $dep = $deps['required'][$packagetype]; - if (!isset($dep['conflicts'])) { - // skip any package that this package conflicts with - $ret = $this->_detect2Dep($dep, $pname, 'required', $params); - if (is_array($ret)) { - $this->_downloadDeps[] = $ret; - } elseif (PEAR::isError($ret) && !isset($options['soft'])) { - $this->_downloader->log(0, $ret->getMessage()); - } - } - } - } - - // get optional dependency group, if any - if (isset($deps['optional'][$packagetype])) { - $skipnames = array(); - if (!isset($deps['optional'][$packagetype][0])) { - $deps['optional'][$packagetype] = array($deps['optional'][$packagetype]); - } - - foreach ($deps['optional'][$packagetype] as $dep) { - $skip = false; - if (!isset($options['alldeps'])) { - $dep['package'] = $dep['name']; - if (!isset($options['soft'])) { - $this->_downloader->log(3, 'Notice: package "' . - $this->_registry->parsedPackageNameToString($this->getParsedPackage(), - true) . '" optional dependency "' . - $this->_registry->parsedPackageNameToString(array('package' => - $dep['name'], 'channel' => 'pear.php.net'), true) . - '" will not be automatically downloaded'); - } - $skipnames[] = $this->_registry->parsedPackageNameToString($dep, true); - $skip = true; - unset($dep['package']); - } - - $ret = $this->_detect2Dep($dep, $pname, 'optional', $params); - if (PEAR::isError($ret) && !isset($options['soft'])) { - $this->_downloader->log(0, $ret->getMessage()); - } - - if (!$ret) { - $dep['package'] = $dep['name']; - $skip = count($skipnames) ? - $skipnames[count($skipnames) - 1] : ''; - if ($skip == - $this->_registry->parsedPackageNameToString($dep, true)) { - array_pop($skipnames); - } - } - - if (!$skip && is_array($ret)) { - $this->_downloadDeps[] = $ret; - } - } - - if (count($skipnames)) { - if (!isset($options['soft'])) { - $this->_downloader->log(1, 'Did not download optional dependencies: ' . - implode(', ', $skipnames) . - ', use --alldeps to download automatically'); - } - } - } - - // get requested dependency group, if any - $groupname = $this->getGroup(); - $explicit = $this->_explicitGroup; - if (!$groupname) { - if (!$this->canDefault()) { - continue; - } - - $groupname = 'default'; // try the default dependency group - } - - if ($groupnotfound) { - continue; - } - - if (isset($deps['group'])) { - if (isset($deps['group']['attribs'])) { - if (strtolower($deps['group']['attribs']['name']) == strtolower($groupname)) { - $group = $deps['group']; - } elseif ($explicit) { - if (!isset($options['soft'])) { - $this->_downloader->log(0, 'Warning: package "' . - $this->_registry->parsedPackageNameToString($pname, true) . - '" has no dependency ' . 'group named "' . $groupname . '"'); - } - - $groupnotfound = true; - continue; - } - } else { - $found = false; - foreach ($deps['group'] as $group) { - if (strtolower($group['attribs']['name']) == strtolower($groupname)) { - $found = true; - break; - } - } - - if (!$found) { - if ($explicit) { - if (!isset($options['soft'])) { - $this->_downloader->log(0, 'Warning: package "' . - $this->_registry->parsedPackageNameToString($pname, true) . - '" has no dependency ' . 'group named "' . $groupname . '"'); - } - } - - $groupnotfound = true; - continue; - } - } - } - - if (isset($group) && isset($group[$packagetype])) { - if (isset($group[$packagetype][0])) { - foreach ($group[$packagetype] as $dep) { - $ret = $this->_detect2Dep($dep, $pname, 'dependency group "' . - $group['attribs']['name'] . '"', $params); - if (is_array($ret)) { - $this->_downloadDeps[] = $ret; - } elseif (PEAR::isError($ret) && !isset($options['soft'])) { - $this->_downloader->log(0, $ret->getMessage()); - } - } - } else { - $ret = $this->_detect2Dep($group[$packagetype], $pname, - 'dependency group "' . - $group['attribs']['name'] . '"', $params); - if (is_array($ret)) { - $this->_downloadDeps[] = $ret; - } elseif (PEAR::isError($ret) && !isset($options['soft'])) { - $this->_downloader->log(0, $ret->getMessage()); - } - } - } - } - } - - function _detect2Dep($dep, $pname, $group, $params) - { - if (isset($dep['conflicts'])) { - return true; - } - - $options = $this->_downloader->getOptions(); - if (isset($dep['uri'])) { - return array('uri' => $dep['uri'], 'dep' => $dep);; - } - - $testdep = $dep; - $testdep['package'] = $dep['name']; - if (PEAR_Downloader_Package::willDownload($testdep, $params)) { - $dep['package'] = $dep['name']; - if (!isset($options['soft'])) { - $this->_downloader->log(2, $this->getShortName() . ': Skipping ' . $group . - ' dependency "' . - $this->_registry->parsedPackageNameToString($dep, true) . - '", will be installed'); - } - return false; - } - - $options = $this->_downloader->getOptions(); - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - if ($this->_explicitState) { - $pname['state'] = $this->_explicitState; - } - - $url = $this->_downloader->_getDepPackageDownloadUrl($dep, $pname); - if (PEAR::isError($url)) { - PEAR::popErrorHandling(); - return $url; - } - - $dep['package'] = $dep['name']; - $ret = $this->_analyzeDownloadURL($url, 'dependency', $dep, $params, $group == 'optional' && - !isset($options['alldeps']), true); - PEAR::popErrorHandling(); - if (PEAR::isError($ret)) { - if (!isset($options['soft'])) { - $this->_downloader->log(0, $ret->getMessage()); - } - - return false; - } - - // check to see if a dep is already installed and is the same or newer - if (!isset($dep['min']) && !isset($dep['max']) && !isset($dep['recommended'])) { - $oper = 'has'; - } else { - $oper = 'gt'; - } - - // do not try to move this before getDepPackageDownloadURL - // we can't determine whether upgrade is necessary until we know what - // version would be downloaded - if (!isset($options['force']) && $this->isInstalled($ret, $oper)) { - $version = $this->_installRegistry->packageInfo($dep['name'], 'version', $dep['channel']); - $dep['package'] = $dep['name']; - if (!isset($options['soft'])) { - $this->_downloader->log(3, $this->getShortName() . ': Skipping ' . $group . - ' dependency "' . - $this->_registry->parsedPackageNameToString($dep, true) . - '" version ' . $url['version'] . ', already installed as version ' . - $version); - } - - return false; - } - - if (isset($dep['nodefault'])) { - $ret['nodefault'] = true; - } - - return $ret; - } - - function _detect1($deps, $pname, $options, $params) - { - $this->_downloadDeps = array(); - $skipnames = array(); - foreach ($deps as $dep) { - $nodownload = false; - if (isset ($dep['type']) && $dep['type'] === 'pkg') { - $dep['channel'] = 'pear.php.net'; - $dep['package'] = $dep['name']; - switch ($dep['rel']) { - case 'not' : - continue 2; - case 'ge' : - case 'eq' : - case 'gt' : - case 'has' : - $group = (!isset($dep['optional']) || $dep['optional'] == 'no') ? - 'required' : - 'optional'; - if (PEAR_Downloader_Package::willDownload($dep, $params)) { - $this->_downloader->log(2, $this->getShortName() . ': Skipping ' . $group - . ' dependency "' . - $this->_registry->parsedPackageNameToString($dep, true) . - '", will be installed'); - continue 2; - } - $fakedp = new PEAR_PackageFile_v1; - $fakedp->setPackage($dep['name']); - // skip internet check if we are not upgrading (bug #5810) - if (!isset($options['upgrade']) && $this->isInstalled( - $fakedp, $dep['rel'])) { - $this->_downloader->log(2, $this->getShortName() . ': Skipping ' . $group - . ' dependency "' . - $this->_registry->parsedPackageNameToString($dep, true) . - '", is already installed'); - continue 2; - } - } - - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - if ($this->_explicitState) { - $pname['state'] = $this->_explicitState; - } - - $url = $this->_downloader->_getDepPackageDownloadUrl($dep, $pname); - $chan = 'pear.php.net'; - if (PEAR::isError($url)) { - // check to see if this is a pecl package that has jumped - // from pear.php.net to pecl.php.net channel - if (!class_exists('PEAR_Dependency2')) { - require_once 'PEAR/Dependency2.php'; - } - - $newdep = PEAR_Dependency2::normalizeDep($dep); - $newdep = $newdep[0]; - $newdep['channel'] = 'pecl.php.net'; - $chan = 'pecl.php.net'; - $url = $this->_downloader->_getDepPackageDownloadUrl($newdep, $pname); - $obj = &$this->_installRegistry->getPackage($dep['name']); - if (PEAR::isError($url)) { - PEAR::popErrorHandling(); - if ($obj !== null && $this->isInstalled($obj, $dep['rel'])) { - $group = (!isset($dep['optional']) || $dep['optional'] == 'no') ? - 'required' : - 'optional'; - $dep['package'] = $dep['name']; - if (!isset($options['soft'])) { - $this->_downloader->log(3, $this->getShortName() . - ': Skipping ' . $group . ' dependency "' . - $this->_registry->parsedPackageNameToString($dep, true) . - '", already installed as version ' . $obj->getVersion()); - } - $skip = count($skipnames) ? - $skipnames[count($skipnames) - 1] : ''; - if ($skip == - $this->_registry->parsedPackageNameToString($dep, true)) { - array_pop($skipnames); - } - continue; - } else { - if (isset($dep['optional']) && $dep['optional'] == 'yes') { - $this->_downloader->log(2, $this->getShortName() . - ': Skipping optional dependency "' . - $this->_registry->parsedPackageNameToString($dep, true) . - '", no releases exist'); - continue; - } else { - return $url; - } - } - } - } - - PEAR::popErrorHandling(); - if (!isset($options['alldeps'])) { - if (isset($dep['optional']) && $dep['optional'] == 'yes') { - if (!isset($options['soft'])) { - $this->_downloader->log(3, 'Notice: package "' . - $this->getShortName() . - '" optional dependency "' . - $this->_registry->parsedPackageNameToString( - array('channel' => $chan, 'package' => - $dep['name']), true) . - '" will not be automatically downloaded'); - } - $skipnames[] = $this->_registry->parsedPackageNameToString( - array('channel' => $chan, 'package' => - $dep['name']), true); - $nodownload = true; - } - } - - if (!isset($options['alldeps']) && !isset($options['onlyreqdeps'])) { - if (!isset($dep['optional']) || $dep['optional'] == 'no') { - if (!isset($options['soft'])) { - $this->_downloader->log(3, 'Notice: package "' . - $this->getShortName() . - '" required dependency "' . - $this->_registry->parsedPackageNameToString( - array('channel' => $chan, 'package' => - $dep['name']), true) . - '" will not be automatically downloaded'); - } - $skipnames[] = $this->_registry->parsedPackageNameToString( - array('channel' => $chan, 'package' => - $dep['name']), true); - $nodownload = true; - } - } - - // check to see if a dep is already installed - // do not try to move this before getDepPackageDownloadURL - // we can't determine whether upgrade is necessary until we know what - // version would be downloaded - if (!isset($options['force']) && $this->isInstalled( - $url, $dep['rel'])) { - $group = (!isset($dep['optional']) || $dep['optional'] == 'no') ? - 'required' : - 'optional'; - $dep['package'] = $dep['name']; - if (isset($newdep)) { - $version = $this->_installRegistry->packageInfo($newdep['name'], 'version', $newdep['channel']); - } else { - $version = $this->_installRegistry->packageInfo($dep['name'], 'version'); - } - - $dep['version'] = $url['version']; - if (!isset($options['soft'])) { - $this->_downloader->log(3, $this->getShortName() . ': Skipping ' . $group . - ' dependency "' . - $this->_registry->parsedPackageNameToString($dep, true) . - '", already installed as version ' . $version); - } - - $skip = count($skipnames) ? - $skipnames[count($skipnames) - 1] : ''; - if ($skip == - $this->_registry->parsedPackageNameToString($dep, true)) { - array_pop($skipnames); - } - - continue; - } - - if ($nodownload) { - continue; - } - - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - if (isset($newdep)) { - $dep = $newdep; - } - - $dep['package'] = $dep['name']; - $ret = $this->_analyzeDownloadURL($url, 'dependency', $dep, $params, - isset($dep['optional']) && $dep['optional'] == 'yes' && - !isset($options['alldeps']), true); - PEAR::popErrorHandling(); - if (PEAR::isError($ret)) { - if (!isset($options['soft'])) { - $this->_downloader->log(0, $ret->getMessage()); - } - continue; - } - - $this->_downloadDeps[] = $ret; - } - } - - if (count($skipnames)) { - if (!isset($options['soft'])) { - $this->_downloader->log(1, 'Did not download dependencies: ' . - implode(', ', $skipnames) . - ', use --alldeps or --onlyreqdeps to download automatically'); - } - } - } - - function setDownloadURL($pkg) - { - $this->_downloadURL = $pkg; - } - - /** - * Set the package.xml object for this downloaded package - * - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 $pkg - */ - function setPackageFile(&$pkg) - { - $this->_packagefile = &$pkg; - } - - function getShortName() - { - return $this->_registry->parsedPackageNameToString(array('channel' => $this->getChannel(), - 'package' => $this->getPackage()), true); - } - - function getParsedPackage() - { - if (isset($this->_packagefile) || isset($this->_parsedname)) { - return array('channel' => $this->getChannel(), - 'package' => $this->getPackage(), - 'version' => $this->getVersion()); - } - - return false; - } - - function getDownloadURL() - { - return $this->_downloadURL; - } - - function canDefault() - { - if (isset($this->_downloadURL) && isset($this->_downloadURL['nodefault'])) { - return false; - } - - return true; - } - - function getPackage() - { - if (isset($this->_packagefile)) { - return $this->_packagefile->getPackage(); - } elseif (isset($this->_downloadURL['info'])) { - return $this->_downloadURL['info']->getPackage(); - } - - return false; - } - - /** - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - */ - function isSubpackage(&$pf) - { - if (isset($this->_packagefile)) { - return $this->_packagefile->isSubpackage($pf); - } elseif (isset($this->_downloadURL['info'])) { - return $this->_downloadURL['info']->isSubpackage($pf); - } - - return false; - } - - function getPackageType() - { - if (isset($this->_packagefile)) { - return $this->_packagefile->getPackageType(); - } elseif (isset($this->_downloadURL['info'])) { - return $this->_downloadURL['info']->getPackageType(); - } - - return false; - } - - function isBundle() - { - if (isset($this->_packagefile)) { - return $this->_packagefile->getPackageType() == 'bundle'; - } - - return false; - } - - function getPackageXmlVersion() - { - if (isset($this->_packagefile)) { - return $this->_packagefile->getPackagexmlVersion(); - } elseif (isset($this->_downloadURL['info'])) { - return $this->_downloadURL['info']->getPackagexmlVersion(); - } - - return '1.0'; - } - - function getChannel() - { - if (isset($this->_packagefile)) { - return $this->_packagefile->getChannel(); - } elseif (isset($this->_downloadURL['info'])) { - return $this->_downloadURL['info']->getChannel(); - } - - return false; - } - - function getURI() - { - if (isset($this->_packagefile)) { - return $this->_packagefile->getURI(); - } elseif (isset($this->_downloadURL['info'])) { - return $this->_downloadURL['info']->getURI(); - } - - return false; - } - - function getVersion() - { - if (isset($this->_packagefile)) { - return $this->_packagefile->getVersion(); - } elseif (isset($this->_downloadURL['version'])) { - return $this->_downloadURL['version']; - } - - return false; - } - - function isCompatible($pf) - { - if (isset($this->_packagefile)) { - return $this->_packagefile->isCompatible($pf); - } elseif (isset($this->_downloadURL['info'])) { - return $this->_downloadURL['info']->isCompatible($pf); - } - - return true; - } - - function setGroup($group) - { - $this->_parsedname['group'] = $group; - } - - function getGroup() - { - if (isset($this->_parsedname['group'])) { - return $this->_parsedname['group']; - } - - return ''; - } - - function isExtension($name) - { - if (isset($this->_packagefile)) { - return $this->_packagefile->isExtension($name); - } elseif (isset($this->_downloadURL['info'])) { - if ($this->_downloadURL['info']->getPackagexmlVersion() == '2.0') { - return $this->_downloadURL['info']->getProvidesExtension() == $name; - } - - return false; - } - - return false; - } - - function getDeps() - { - if (isset($this->_packagefile)) { - $ver = $this->_packagefile->getPackagexmlVersion(); - if (version_compare($ver, '2.0', '>=')) { - return $this->_packagefile->getDeps(true); - } - - return $this->_packagefile->getDeps(); - } elseif (isset($this->_downloadURL['info'])) { - $ver = $this->_downloadURL['info']->getPackagexmlVersion(); - if (version_compare($ver, '2.0', '>=')) { - return $this->_downloadURL['info']->getDeps(true); - } - - return $this->_downloadURL['info']->getDeps(); - } - - return array(); - } - - /** - * @param array Parsed array from {@link PEAR_Registry::parsePackageName()} or a dependency - * returned from getDepDownloadURL() - */ - function isEqual($param) - { - if (is_object($param)) { - $channel = $param->getChannel(); - $package = $param->getPackage(); - if ($param->getURI()) { - $param = array( - 'channel' => $param->getChannel(), - 'package' => $param->getPackage(), - 'version' => $param->getVersion(), - 'uri' => $param->getURI(), - ); - } else { - $param = array( - 'channel' => $param->getChannel(), - 'package' => $param->getPackage(), - 'version' => $param->getVersion(), - ); - } - } else { - if (isset($param['uri'])) { - if ($this->getChannel() != '__uri') { - return false; - } - return $param['uri'] == $this->getURI(); - } - - $package = isset($param['package']) ? $param['package'] : $param['info']->getPackage(); - $channel = isset($param['channel']) ? $param['channel'] : $param['info']->getChannel(); - if (isset($param['rel'])) { - if (!class_exists('PEAR_Dependency2')) { - require_once 'PEAR/Dependency2.php'; - } - - $newdep = PEAR_Dependency2::normalizeDep($param); - $newdep = $newdep[0]; - } elseif (isset($param['min'])) { - $newdep = $param; - } - } - - if (isset($newdep)) { - if (!isset($newdep['min'])) { - $newdep['min'] = '0'; - } - - if (!isset($newdep['max'])) { - $newdep['max'] = '100000000000000000000'; - } - - // use magic to support pecl packages suddenly jumping to the pecl channel - // we need to support both dependency possibilities - if ($channel == 'pear.php.net' && $this->getChannel() == 'pecl.php.net') { - if ($package == $this->getPackage()) { - $channel = 'pecl.php.net'; - } - } - if ($channel == 'pecl.php.net' && $this->getChannel() == 'pear.php.net') { - if ($package == $this->getPackage()) { - $channel = 'pear.php.net'; - } - } - - return (strtolower($package) == strtolower($this->getPackage()) && - $channel == $this->getChannel() && - version_compare($newdep['min'], $this->getVersion(), '<=') && - version_compare($newdep['max'], $this->getVersion(), '>=')); - } - - // use magic to support pecl packages suddenly jumping to the pecl channel - if ($channel == 'pecl.php.net' && $this->getChannel() == 'pear.php.net') { - if (strtolower($package) == strtolower($this->getPackage())) { - $channel = 'pear.php.net'; - } - } - - if (isset($param['version'])) { - return (strtolower($package) == strtolower($this->getPackage()) && - $channel == $this->getChannel() && - $param['version'] == $this->getVersion()); - } - - return strtolower($package) == strtolower($this->getPackage()) && - $channel == $this->getChannel(); - } - - function isInstalled($dep, $oper = '==') - { - if (!$dep) { - return false; - } - - if ($oper != 'ge' && $oper != 'gt' && $oper != 'has' && $oper != '==') { - return false; - } - - if (is_object($dep)) { - $package = $dep->getPackage(); - $channel = $dep->getChannel(); - if ($dep->getURI()) { - $dep = array( - 'uri' => $dep->getURI(), - 'version' => $dep->getVersion(), - ); - } else { - $dep = array( - 'version' => $dep->getVersion(), - ); - } - } else { - if (isset($dep['uri'])) { - $channel = '__uri'; - $package = $dep['dep']['name']; - } else { - $channel = $dep['info']->getChannel(); - $package = $dep['info']->getPackage(); - } - } - - $options = $this->_downloader->getOptions(); - $test = $this->_installRegistry->packageExists($package, $channel); - if (!$test && $channel == 'pecl.php.net') { - // do magic to allow upgrading from old pecl packages to new ones - $test = $this->_installRegistry->packageExists($package, 'pear.php.net'); - $channel = 'pear.php.net'; - } - - if ($test) { - if (isset($dep['uri'])) { - if ($this->_installRegistry->packageInfo($package, 'uri', '__uri') == $dep['uri']) { - return true; - } - } - - if (isset($options['upgrade'])) { - $packageVersion = $this->_installRegistry->packageInfo($package, 'version', $channel); - if (version_compare($packageVersion, $dep['version'], '>=')) { - return true; - } - - return false; - } - - return true; - } - - return false; - } - - /** - * Detect duplicate package names with differing versions - * - * If a user requests to install Date 1.4.6 and Date 1.4.7, - * for instance, this is a logic error. This method - * detects this situation. - * - * @param array $params array of PEAR_Downloader_Package objects - * @param array $errorparams empty array - * @return array array of stupid duplicated packages in PEAR_Downloader_Package obejcts - */ - function detectStupidDuplicates($params, &$errorparams) - { - $existing = array(); - foreach ($params as $i => $param) { - $package = $param->getPackage(); - $channel = $param->getChannel(); - $group = $param->getGroup(); - if (!isset($existing[$channel . '/' . $package])) { - $existing[$channel . '/' . $package] = array(); - } - - if (!isset($existing[$channel . '/' . $package][$group])) { - $existing[$channel . '/' . $package][$group] = array(); - } - - $existing[$channel . '/' . $package][$group][] = $i; - } - - $indices = array(); - foreach ($existing as $package => $groups) { - foreach ($groups as $group => $dupes) { - if (count($dupes) > 1) { - $indices = $indices + $dupes; - } - } - } - - $indices = array_unique($indices); - foreach ($indices as $index) { - $errorparams[] = $params[$index]; - } - - return count($errorparams); - } - - /** - * @param array - * @param bool ignore install groups - for final removal of dupe packages - * @static - */ - function removeDuplicates(&$params, $ignoreGroups = false) - { - $pnames = array(); - foreach ($params as $i => $param) { - if (!$param) { - continue; - } - - if ($param->getPackage()) { - $group = $ignoreGroups ? '' : $param->getGroup(); - $pnames[$i] = $param->getChannel() . '/' . - $param->getPackage() . '-' . $param->getVersion() . '#' . $group; - } - } - - $pnames = array_unique($pnames); - $unset = array_diff(array_keys($params), array_keys($pnames)); - $testp = array_flip($pnames); - foreach ($params as $i => $param) { - if (!$param) { - $unset[] = $i; - continue; - } - - if (!is_a($param, 'PEAR_Downloader_Package')) { - $unset[] = $i; - continue; - } - - $group = $ignoreGroups ? '' : $param->getGroup(); - if (!isset($testp[$param->getChannel() . '/' . $param->getPackage() . '-' . - $param->getVersion() . '#' . $group])) { - $unset[] = $i; - } - } - - foreach ($unset as $i) { - unset($params[$i]); - } - - $ret = array(); - foreach ($params as $i => $param) { - $ret[] = &$params[$i]; - } - - $params = array(); - foreach ($ret as $i => $param) { - $params[] = &$ret[$i]; - } - } - - function explicitState() - { - return $this->_explicitState; - } - - function setExplicitState($s) - { - $this->_explicitState = $s; - } - - /** - * @static - */ - function mergeDependencies(&$params) - { - $bundles = $newparams = array(); - foreach ($params as $i => $param) { - if (!$param->isBundle()) { - continue; - } - - $bundles[] = $i; - $pf = &$param->getPackageFile(); - $newdeps = array(); - $contents = $pf->getBundledPackages(); - if (!is_array($contents)) { - $contents = array($contents); - } - - foreach ($contents as $file) { - $filecontents = $pf->getFileContents($file); - $dl = &$param->getDownloader(); - $options = $dl->getOptions(); - if (PEAR::isError($dir = $dl->getDownloadDir())) { - return $dir; - } - - $fp = @fopen($dir . DIRECTORY_SEPARATOR . $file, 'wb'); - if (!$fp) { - continue; - } - - // FIXME do symlink check - - fwrite($fp, $filecontents, strlen($filecontents)); - fclose($fp); - if ($s = $params[$i]->explicitState()) { - $obj->setExplicitState($s); - } - - $obj = &new PEAR_Downloader_Package($params[$i]->getDownloader()); - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - if (PEAR::isError($dir = $dl->getDownloadDir())) { - PEAR::popErrorHandling(); - return $dir; - } - - $e = $obj->_fromFile($a = $dir . DIRECTORY_SEPARATOR . $file); - PEAR::popErrorHandling(); - if (PEAR::isError($e)) { - if (!isset($options['soft'])) { - $dl->log(0, $e->getMessage()); - } - continue; - } - - $j = &$obj; - if (!PEAR_Downloader_Package::willDownload($j, - array_merge($params, $newparams)) && !$param->isInstalled($j)) { - $newparams[] = &$j; - } - } - } - - foreach ($bundles as $i) { - unset($params[$i]); // remove bundles - only their contents matter for installation - } - - PEAR_Downloader_Package::removeDuplicates($params); // strip any unset indices - if (count($newparams)) { // add in bundled packages for install - foreach ($newparams as $i => $unused) { - $params[] = &$newparams[$i]; - } - $newparams = array(); - } - - foreach ($params as $i => $param) { - $newdeps = array(); - foreach ($param->_downloadDeps as $dep) { - $merge = array_merge($params, $newparams); - if (!PEAR_Downloader_Package::willDownload($dep, $merge) - && !$param->isInstalled($dep) - ) { - $newdeps[] = $dep; - } else { - //var_dump($dep); - // detect versioning conflicts here - } - } - - // convert the dependencies into PEAR_Downloader_Package objects for the next time around - $params[$i]->_downloadDeps = array(); - foreach ($newdeps as $dep) { - $obj = &new PEAR_Downloader_Package($params[$i]->getDownloader()); - if ($s = $params[$i]->explicitState()) { - $obj->setExplicitState($s); - } - - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $e = $obj->fromDepURL($dep); - PEAR::popErrorHandling(); - if (PEAR::isError($e)) { - if (!isset($options['soft'])) { - $obj->_downloader->log(0, $e->getMessage()); - } - continue; - } - - $e = $obj->detectDependencies($params); - if (PEAR::isError($e)) { - if (!isset($options['soft'])) { - $obj->_downloader->log(0, $e->getMessage()); - } - } - - $j = &$obj; - $newparams[] = &$j; - } - } - - if (count($newparams)) { - foreach ($newparams as $i => $unused) { - $params[] = &$newparams[$i]; - } - return true; - } - - return false; - } - - - /** - * @static - */ - function willDownload($param, $params) - { - if (!is_array($params)) { - return false; - } - - foreach ($params as $obj) { - if ($obj->isEqual($param)) { - return true; - } - } - - return false; - } - - /** - * For simpler unit-testing - * @param PEAR_Config - * @param int - * @param string - */ - function &getPackagefileObject(&$c, $d) - { - $a = &new PEAR_PackageFile($c, $d); - return $a; - } - - /** - * This will retrieve from a local file if possible, and parse out - * a group name as well. The original parameter will be modified to reflect this. - * @param string|array can be a parsed package name as well - * @access private - */ - function _fromFile(&$param) - { - $saveparam = $param; - if (is_string($param)) { - if (!@file_exists($param)) { - $test = explode('#', $param); - $group = array_pop($test); - if (@file_exists(implode('#', $test))) { - $this->setGroup($group); - $param = implode('#', $test); - $this->_explicitGroup = true; - } - } - - if (@is_file($param)) { - $this->_type = 'local'; - $options = $this->_downloader->getOptions(); - $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->_debug); - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $pf = &$pkg->fromAnyFile($param, PEAR_VALIDATE_INSTALLING); - PEAR::popErrorHandling(); - if (PEAR::isError($pf)) { - $this->_valid = false; - $param = $saveparam; - return $pf; - } - $this->_packagefile = &$pf; - if (!$this->getGroup()) { - $this->setGroup('default'); // install the default dependency group - } - return $this->_valid = true; - } - } - $param = $saveparam; - return $this->_valid = false; - } - - function _fromUrl($param, $saveparam = '') - { - if (!is_array($param) && (preg_match('#^(http|https|ftp)://#', $param))) { - $options = $this->_downloader->getOptions(); - $this->_type = 'url'; - $callback = $this->_downloader->ui ? - array(&$this->_downloader, '_downloadCallback') : null; - $this->_downloader->pushErrorHandling(PEAR_ERROR_RETURN); - if (PEAR::isError($dir = $this->_downloader->getDownloadDir())) { - $this->_downloader->popErrorHandling(); - return $dir; - } - - $this->_downloader->log(3, 'Downloading "' . $param . '"'); - $file = $this->_downloader->downloadHttp($param, $this->_downloader->ui, - $dir, $callback, null, false, $this->getChannel()); - $this->_downloader->popErrorHandling(); - if (PEAR::isError($file)) { - if (!empty($saveparam)) { - $saveparam = ", cannot download \"$saveparam\""; - } - $err = PEAR::raiseError('Could not download from "' . $param . - '"' . $saveparam . ' (' . $file->getMessage() . ')'); - return $err; - } - - if ($this->_rawpackagefile) { - require_once 'Archive/Tar.php'; - $tar = &new Archive_Tar($file); - $packagexml = $tar->extractInString('package2.xml'); - if (!$packagexml) { - $packagexml = $tar->extractInString('package.xml'); - } - - if (str_replace(array("\n", "\r"), array('',''), $packagexml) != - str_replace(array("\n", "\r"), array('',''), $this->_rawpackagefile)) { - if ($this->getChannel() != 'pear.php.net') { - return PEAR::raiseError('CRITICAL ERROR: package.xml downloaded does ' . - 'not match value returned from xml-rpc'); - } - - // be more lax for the existing PEAR packages that have not-ok - // characters in their package.xml - $this->_downloader->log(0, 'CRITICAL WARNING: The "' . - $this->getPackage() . '" package has invalid characters in its ' . - 'package.xml. The next version of PEAR may not be able to install ' . - 'this package for security reasons. Please open a bug report at ' . - 'http://pear.php.net/package/' . $this->getPackage() . '/bugs'); - } - } - - // whew, download worked! - $pkg = &$this->getPackagefileObject($this->_config, $this->_downloader->debug); - - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $pf = &$pkg->fromAnyFile($file, PEAR_VALIDATE_INSTALLING); - PEAR::popErrorHandling(); - if (PEAR::isError($pf)) { - if (is_array($pf->getUserInfo())) { - foreach ($pf->getUserInfo() as $err) { - if (is_array($err)) { - $err = $err['message']; - } - - if (!isset($options['soft'])) { - $this->_downloader->log(0, "Validation Error: $err"); - } - } - } - - if (!isset($options['soft'])) { - $this->_downloader->log(0, $pf->getMessage()); - } - - ///FIXME need to pass back some error code that we can use to match with to cancel all further operations - /// At least stop all deps of this package from being installed - $out = $saveparam ? $saveparam : $param; - $err = PEAR::raiseError('Download of "' . $out . '" succeeded, but it is not a valid package archive'); - $this->_valid = false; - return $err; - } - - $this->_packagefile = &$pf; - $this->setGroup('default'); // install the default dependency group - return $this->_valid = true; - } - - return $this->_valid = false; - } - - /** - * - * @param string|array pass in an array of format - * array( - * 'package' => 'pname', - * ['channel' => 'channame',] - * ['version' => 'version',] - * ['state' => 'state',]) - * or a string of format [channame/]pname[-version|-state] - */ - function _fromString($param) - { - $options = $this->_downloader->getOptions(); - $channel = $this->_config->get('default_channel'); - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $pname = $this->_registry->parsePackageName($param, $channel); - PEAR::popErrorHandling(); - if (PEAR::isError($pname)) { - if ($pname->getCode() == 'invalid') { - $this->_valid = false; - return false; - } - - if ($pname->getCode() == 'channel') { - $parsed = $pname->getUserInfo(); - if ($this->_downloader->discover($parsed['channel'])) { - if ($this->_config->get('auto_discover')) { - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $pname = $this->_registry->parsePackageName($param, $channel); - PEAR::popErrorHandling(); - } else { - if (!isset($options['soft'])) { - $this->_downloader->log(0, 'Channel "' . $parsed['channel'] . - '" is not initialized, use ' . - '"pear channel-discover ' . $parsed['channel'] . '" to initialize' . - 'or pear config-set auto_discover 1'); - } - } - } - - if (PEAR::isError($pname)) { - if (!isset($options['soft'])) { - $this->_downloader->log(0, $pname->getMessage()); - } - - if (is_array($param)) { - $param = $this->_registry->parsedPackageNameToString($param); - } - - $err = PEAR::raiseError('invalid package name/package file "' . $param . '"'); - $this->_valid = false; - return $err; - } - } else { - if (!isset($options['soft'])) { - $this->_downloader->log(0, $pname->getMessage()); - } - - $err = PEAR::raiseError('invalid package name/package file "' . $param . '"'); - $this->_valid = false; - return $err; - } - } - - if (!isset($this->_type)) { - $this->_type = 'rest'; - } - - $this->_parsedname = $pname; - $this->_explicitState = isset($pname['state']) ? $pname['state'] : false; - $this->_explicitGroup = isset($pname['group']) ? true : false; - - $info = $this->_downloader->_getPackageDownloadUrl($pname); - if (PEAR::isError($info)) { - if ($info->getCode() != -976 && $pname['channel'] == 'pear.php.net') { - // try pecl - $pname['channel'] = 'pecl.php.net'; - if ($test = $this->_downloader->_getPackageDownloadUrl($pname)) { - if (!PEAR::isError($test)) { - $info = PEAR::raiseError($info->getMessage() . ' - package ' . - $this->_registry->parsedPackageNameToString($pname, true) . - ' can be installed with "pecl install ' . $pname['package'] . - '"'); - } else { - $pname['channel'] = 'pear.php.net'; - } - } else { - $pname['channel'] = 'pear.php.net'; - } - } - - return $info; - } - - $this->_rawpackagefile = $info['raw']; - $ret = $this->_analyzeDownloadURL($info, $param, $pname); - if (PEAR::isError($ret)) { - return $ret; - } - - if ($ret) { - $this->_downloadURL = $ret; - return $this->_valid = (bool) $ret; - } - } - - /** - * @param array output of package.getDownloadURL - * @param string|array|object information for detecting packages to be downloaded, and - * for errors - * @param array name information of the package - * @param array|null packages to be downloaded - * @param bool is this an optional dependency? - * @param bool is this any kind of dependency? - * @access private - */ - function _analyzeDownloadURL($info, $param, $pname, $params = null, $optional = false, - $isdependency = false) - { - if (!is_string($param) && PEAR_Downloader_Package::willDownload($param, $params)) { - return false; - } - - if ($info === false) { - $saveparam = !is_string($param) ? ", cannot download \"$param\"" : ''; - - // no releases exist - return PEAR::raiseError('No releases for package "' . - $this->_registry->parsedPackageNameToString($pname, true) . '" exist' . $saveparam); - } - - if (strtolower($info['info']->getChannel()) != strtolower($pname['channel'])) { - $err = false; - if ($pname['channel'] == 'pecl.php.net') { - if ($info['info']->getChannel() != 'pear.php.net') { - $err = true; - } - } elseif ($info['info']->getChannel() == 'pecl.php.net') { - if ($pname['channel'] != 'pear.php.net') { - $err = true; - } - } else { - $err = true; - } - - if ($err) { - return PEAR::raiseError('SECURITY ERROR: package in channel "' . $pname['channel'] . - '" retrieved another channel\'s name for download! ("' . - $info['info']->getChannel() . '")'); - } - } - - $preferred_state = $this->_config->get('preferred_state'); - if (!isset($info['url'])) { - $package_version = $this->_registry->packageInfo($info['info']->getPackage(), - 'version', $info['info']->getChannel()); - if ($this->isInstalled($info)) { - if ($isdependency && version_compare($info['version'], $package_version, '<=')) { - // ignore bogus errors of "failed to download dependency" - // if it is already installed and the one that would be - // downloaded is older or the same version (Bug #7219) - return false; - } - } - - if ($info['version'] === $package_version) { - if (!isset($options['soft'])) { - $this->_downloader->log(1, 'WARNING: failed to download ' . $pname['channel'] . - '/' . $pname['package'] . '-' . $package_version. ', additionally the suggested version' . - ' (' . $package_version . ') is the same as the locally installed one.'); - } - - return false; - } - - if (version_compare($info['version'], $package_version, '<=')) { - if (!isset($options['soft'])) { - $this->_downloader->log(1, 'WARNING: failed to download ' . $pname['channel'] . - '/' . $pname['package'] . '-' . $package_version . ', additionally the suggested version' . - ' (' . $info['version'] . ') is a lower version than the locally installed one (' . $package_version . ').'); - } - - return false; - } - - $instead = ', will instead download version ' . $info['version'] . - ', stability "' . $info['info']->getState() . '"'; - // releases exist, but we failed to get any - if (isset($this->_downloader->_options['force'])) { - if (isset($pname['version'])) { - $vs = ', version "' . $pname['version'] . '"'; - } elseif (isset($pname['state'])) { - $vs = ', stability "' . $pname['state'] . '"'; - } elseif ($param == 'dependency') { - if (!class_exists('PEAR_Common')) { - require_once 'PEAR/Common.php'; - } - - if (!in_array($info['info']->getState(), - PEAR_Common::betterStates($preferred_state, true))) { - if ($optional) { - // don't spit out confusing error message - return $this->_downloader->_getPackageDownloadUrl( - array('package' => $pname['package'], - 'channel' => $pname['channel'], - 'version' => $info['version'])); - } - $vs = ' within preferred state "' . $preferred_state . - '"'; - } else { - if (!class_exists('PEAR_Dependency2')) { - require_once 'PEAR/Dependency2.php'; - } - - if ($optional) { - // don't spit out confusing error message - return $this->_downloader->_getPackageDownloadUrl( - array('package' => $pname['package'], - 'channel' => $pname['channel'], - 'version' => $info['version'])); - } - $vs = PEAR_Dependency2::_getExtraString($pname); - $instead = ''; - } - } else { - $vs = ' within preferred state "' . $preferred_state . '"'; - } - - if (!isset($options['soft'])) { - $this->_downloader->log(1, 'WARNING: failed to download ' . $pname['channel'] . - '/' . $pname['package'] . $vs . $instead); - } - - // download the latest release - return $this->_downloader->_getPackageDownloadUrl( - array('package' => $pname['package'], - 'channel' => $pname['channel'], - 'version' => $info['version'])); - } else { - if (isset($info['php']) && $info['php']) { - $err = PEAR::raiseError('Failed to download ' . - $this->_registry->parsedPackageNameToString( - array('channel' => $pname['channel'], - 'package' => $pname['package']), - true) . - ', latest release is version ' . $info['php']['v'] . - ', but it requires PHP version "' . - $info['php']['m'] . '", use "' . - $this->_registry->parsedPackageNameToString( - array('channel' => $pname['channel'], 'package' => $pname['package'], - 'version' => $info['php']['v'])) . '" to install', - PEAR_DOWNLOADER_PACKAGE_PHPVERSION); - return $err; - } - - // construct helpful error message - if (isset($pname['version'])) { - $vs = ', version "' . $pname['version'] . '"'; - } elseif (isset($pname['state'])) { - $vs = ', stability "' . $pname['state'] . '"'; - } elseif ($param == 'dependency') { - if (!class_exists('PEAR_Common')) { - require_once 'PEAR/Common.php'; - } - - if (!in_array($info['info']->getState(), - PEAR_Common::betterStates($preferred_state, true))) { - if ($optional) { - // don't spit out confusing error message, and don't die on - // optional dep failure! - return $this->_downloader->_getPackageDownloadUrl( - array('package' => $pname['package'], - 'channel' => $pname['channel'], - 'version' => $info['version'])); - } - $vs = ' within preferred state "' . $preferred_state . '"'; - } else { - if (!class_exists('PEAR_Dependency2')) { - require_once 'PEAR/Dependency2.php'; - } - - if ($optional) { - // don't spit out confusing error message, and don't die on - // optional dep failure! - return $this->_downloader->_getPackageDownloadUrl( - array('package' => $pname['package'], - 'channel' => $pname['channel'], - 'version' => $info['version'])); - } - $vs = PEAR_Dependency2::_getExtraString($pname); - } - } else { - $vs = ' within preferred state "' . $this->_downloader->config->get('preferred_state') . '"'; - } - - $options = $this->_downloader->getOptions(); - // this is only set by the "download-all" command - if (isset($options['ignorepreferred_state'])) { - $err = PEAR::raiseError( - 'Failed to download ' . $this->_registry->parsedPackageNameToString( - array('channel' => $pname['channel'], 'package' => $pname['package']), - true) - . $vs . - ', latest release is version ' . $info['version'] . - ', stability "' . $info['info']->getState() . '", use "' . - $this->_registry->parsedPackageNameToString( - array('channel' => $pname['channel'], 'package' => $pname['package'], - 'version' => $info['version'])) . '" to install', - PEAR_DOWNLOADER_PACKAGE_STATE); - return $err; - } - - // Checks if the user has a package installed already and checks the release against - // the state against the installed package, this allows upgrades for packages - // with lower stability than the preferred_state - $stability = $this->_registry->packageInfo($pname['package'], 'stability', $pname['channel']); - if (!$this->isInstalled($info) - || !in_array($info['info']->getState(), PEAR_Common::betterStates($stability['release'], true)) - ) { - $err = PEAR::raiseError( - 'Failed to download ' . $this->_registry->parsedPackageNameToString( - array('channel' => $pname['channel'], 'package' => $pname['package']), - true) - . $vs . - ', latest release is version ' . $info['version'] . - ', stability "' . $info['info']->getState() . '", use "' . - $this->_registry->parsedPackageNameToString( - array('channel' => $pname['channel'], 'package' => $pname['package'], - 'version' => $info['version'])) . '" to install'); - return $err; - } - } - } - - if (isset($info['deprecated']) && $info['deprecated']) { - $this->_downloader->log(0, - 'WARNING: "' . - $this->_registry->parsedPackageNameToString( - array('channel' => $info['info']->getChannel(), - 'package' => $info['info']->getPackage()), true) . - '" is deprecated in favor of "' . - $this->_registry->parsedPackageNameToString($info['deprecated'], true) . - '"'); - } - - return $info; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/ErrorStack.php b/_piecrust/libs/PEAR/ErrorStack.php deleted file mode 100644 index 0303f52..0000000 --- a/_piecrust/libs/PEAR/ErrorStack.php +++ /dev/null @@ -1,985 +0,0 @@ - - * @copyright 2004-2008 Greg Beaver - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: ErrorStack.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR_ErrorStack - */ - -/** - * Singleton storage - * - * Format: - *
        - * array(
        - *  'package1' => PEAR_ErrorStack object,
        - *  'package2' => PEAR_ErrorStack object,
        - *  ...
        - * )
        - * 
        - * @access private - * @global array $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] - */ -$GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] = array(); - -/** - * Global error callback (default) - * - * This is only used if set to non-false. * is the default callback for - * all packages, whereas specific packages may set a default callback - * for all instances, regardless of whether they are a singleton or not. - * - * To exclude non-singletons, only set the local callback for the singleton - * @see PEAR_ErrorStack::setDefaultCallback() - * @access private - * @global array $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'] - */ -$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'] = array( - '*' => false, -); - -/** - * Global Log object (default) - * - * This is only used if set to non-false. Use to set a default log object for - * all stacks, regardless of instantiation order or location - * @see PEAR_ErrorStack::setDefaultLogger() - * @access private - * @global array $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] - */ -$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = false; - -/** - * Global Overriding Callback - * - * This callback will override any error callbacks that specific loggers have set. - * Use with EXTREME caution - * @see PEAR_ErrorStack::staticPushCallback() - * @access private - * @global array $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] - */ -$GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'] = array(); - -/**#@+ - * One of four possible return values from the error Callback - * @see PEAR_ErrorStack::_errorCallback() - */ -/** - * If this is returned, then the error will be both pushed onto the stack - * and logged. - */ -define('PEAR_ERRORSTACK_PUSHANDLOG', 1); -/** - * If this is returned, then the error will only be pushed onto the stack, - * and not logged. - */ -define('PEAR_ERRORSTACK_PUSH', 2); -/** - * If this is returned, then the error will only be logged, but not pushed - * onto the error stack. - */ -define('PEAR_ERRORSTACK_LOG', 3); -/** - * If this is returned, then the error is completely ignored. - */ -define('PEAR_ERRORSTACK_IGNORE', 4); -/** - * If this is returned, then the error is logged and die() is called. - */ -define('PEAR_ERRORSTACK_DIE', 5); -/**#@-*/ - -/** - * Error code for an attempt to instantiate a non-class as a PEAR_ErrorStack in - * the singleton method. - */ -define('PEAR_ERRORSTACK_ERR_NONCLASS', 1); - -/** - * Error code for an attempt to pass an object into {@link PEAR_ErrorStack::getMessage()} - * that has no __toString() method - */ -define('PEAR_ERRORSTACK_ERR_OBJTOSTRING', 2); -/** - * Error Stack Implementation - * - * Usage: - * - * // global error stack - * $global_stack = &PEAR_ErrorStack::singleton('MyPackage'); - * // local error stack - * $local_stack = new PEAR_ErrorStack('MyPackage'); - * - * @author Greg Beaver - * @version 1.9.4 - * @package PEAR_ErrorStack - * @category Debugging - * @copyright 2004-2008 Greg Beaver - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: ErrorStack.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR_ErrorStack - */ -class PEAR_ErrorStack { - /** - * Errors are stored in the order that they are pushed on the stack. - * @since 0.4alpha Errors are no longer organized by error level. - * This renders pop() nearly unusable, and levels could be more easily - * handled in a callback anyway - * @var array - * @access private - */ - var $_errors = array(); - - /** - * Storage of errors by level. - * - * Allows easy retrieval and deletion of only errors from a particular level - * @since PEAR 1.4.0dev - * @var array - * @access private - */ - var $_errorsByLevel = array(); - - /** - * Package name this error stack represents - * @var string - * @access protected - */ - var $_package; - - /** - * Determines whether a PEAR_Error is thrown upon every error addition - * @var boolean - * @access private - */ - var $_compat = false; - - /** - * If set to a valid callback, this will be used to generate the error - * message from the error code, otherwise the message passed in will be - * used - * @var false|string|array - * @access private - */ - var $_msgCallback = false; - - /** - * If set to a valid callback, this will be used to generate the error - * context for an error. For PHP-related errors, this will be a file - * and line number as retrieved from debug_backtrace(), but can be - * customized for other purposes. The error might actually be in a separate - * configuration file, or in a database query. - * @var false|string|array - * @access protected - */ - var $_contextCallback = false; - - /** - * If set to a valid callback, this will be called every time an error - * is pushed onto the stack. The return value will be used to determine - * whether to allow an error to be pushed or logged. - * - * The return value must be one an PEAR_ERRORSTACK_* constant - * @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG - * @var false|string|array - * @access protected - */ - var $_errorCallback = array(); - - /** - * PEAR::Log object for logging errors - * @var false|Log - * @access protected - */ - var $_logger = false; - - /** - * Error messages - designed to be overridden - * @var array - * @abstract - */ - var $_errorMsgs = array(); - - /** - * Set up a new error stack - * - * @param string $package name of the package this error stack represents - * @param callback $msgCallback callback used for error message generation - * @param callback $contextCallback callback used for context generation, - * defaults to {@link getFileLine()} - * @param boolean $throwPEAR_Error - */ - function PEAR_ErrorStack($package, $msgCallback = false, $contextCallback = false, - $throwPEAR_Error = false) - { - $this->_package = $package; - $this->setMessageCallback($msgCallback); - $this->setContextCallback($contextCallback); - $this->_compat = $throwPEAR_Error; - } - - /** - * Return a single error stack for this package. - * - * Note that all parameters are ignored if the stack for package $package - * has already been instantiated - * @param string $package name of the package this error stack represents - * @param callback $msgCallback callback used for error message generation - * @param callback $contextCallback callback used for context generation, - * defaults to {@link getFileLine()} - * @param boolean $throwPEAR_Error - * @param string $stackClass class to instantiate - * @static - * @return PEAR_ErrorStack - */ - function &singleton($package, $msgCallback = false, $contextCallback = false, - $throwPEAR_Error = false, $stackClass = 'PEAR_ErrorStack') - { - if (isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) { - return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]; - } - if (!class_exists($stackClass)) { - if (function_exists('debug_backtrace')) { - $trace = debug_backtrace(); - } - PEAR_ErrorStack::staticPush('PEAR_ErrorStack', PEAR_ERRORSTACK_ERR_NONCLASS, - 'exception', array('stackclass' => $stackClass), - 'stack class "%stackclass%" is not a valid class name (should be like PEAR_ErrorStack)', - false, $trace); - } - $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package] = - new $stackClass($package, $msgCallback, $contextCallback, $throwPEAR_Error); - - return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]; - } - - /** - * Internal error handler for PEAR_ErrorStack class - * - * Dies if the error is an exception (and would have died anyway) - * @access private - */ - function _handleError($err) - { - if ($err['level'] == 'exception') { - $message = $err['message']; - if (isset($_SERVER['REQUEST_URI'])) { - echo '
        '; - } else { - echo "\n"; - } - var_dump($err['context']); - die($message); - } - } - - /** - * Set up a PEAR::Log object for all error stacks that don't have one - * @param Log $log - * @static - */ - function setDefaultLogger(&$log) - { - if (is_object($log) && method_exists($log, 'log') ) { - $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = &$log; - } elseif (is_callable($log)) { - $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER'] = &$log; - } - } - - /** - * Set up a PEAR::Log object for this error stack - * @param Log $log - */ - function setLogger(&$log) - { - if (is_object($log) && method_exists($log, 'log') ) { - $this->_logger = &$log; - } elseif (is_callable($log)) { - $this->_logger = &$log; - } - } - - /** - * Set an error code => error message mapping callback - * - * This method sets the callback that can be used to generate error - * messages for any instance - * @param array|string Callback function/method - */ - function setMessageCallback($msgCallback) - { - if (!$msgCallback) { - $this->_msgCallback = array(&$this, 'getErrorMessage'); - } else { - if (is_callable($msgCallback)) { - $this->_msgCallback = $msgCallback; - } - } - } - - /** - * Get an error code => error message mapping callback - * - * This method returns the current callback that can be used to generate error - * messages - * @return array|string|false Callback function/method or false if none - */ - function getMessageCallback() - { - return $this->_msgCallback; - } - - /** - * Sets a default callback to be used by all error stacks - * - * This method sets the callback that can be used to generate error - * messages for a singleton - * @param array|string Callback function/method - * @param string Package name, or false for all packages - * @static - */ - function setDefaultCallback($callback = false, $package = false) - { - if (!is_callable($callback)) { - $callback = false; - } - $package = $package ? $package : '*'; - $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'][$package] = $callback; - } - - /** - * Set a callback that generates context information (location of error) for an error stack - * - * This method sets the callback that can be used to generate context - * information for an error. Passing in NULL will disable context generation - * and remove the expensive call to debug_backtrace() - * @param array|string|null Callback function/method - */ - function setContextCallback($contextCallback) - { - if ($contextCallback === null) { - return $this->_contextCallback = false; - } - if (!$contextCallback) { - $this->_contextCallback = array(&$this, 'getFileLine'); - } else { - if (is_callable($contextCallback)) { - $this->_contextCallback = $contextCallback; - } - } - } - - /** - * Set an error Callback - * If set to a valid callback, this will be called every time an error - * is pushed onto the stack. The return value will be used to determine - * whether to allow an error to be pushed or logged. - * - * The return value must be one of the ERRORSTACK_* constants. - * - * This functionality can be used to emulate PEAR's pushErrorHandling, and - * the PEAR_ERROR_CALLBACK mode, without affecting the integrity of - * the error stack or logging - * @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG - * @see popCallback() - * @param string|array $cb - */ - function pushCallback($cb) - { - array_push($this->_errorCallback, $cb); - } - - /** - * Remove a callback from the error callback stack - * @see pushCallback() - * @return array|string|false - */ - function popCallback() - { - if (!count($this->_errorCallback)) { - return false; - } - return array_pop($this->_errorCallback); - } - - /** - * Set a temporary overriding error callback for every package error stack - * - * Use this to temporarily disable all existing callbacks (can be used - * to emulate the @ operator, for instance) - * @see PEAR_ERRORSTACK_PUSHANDLOG, PEAR_ERRORSTACK_PUSH, PEAR_ERRORSTACK_LOG - * @see staticPopCallback(), pushCallback() - * @param string|array $cb - * @static - */ - function staticPushCallback($cb) - { - array_push($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'], $cb); - } - - /** - * Remove a temporary overriding error callback - * @see staticPushCallback() - * @return array|string|false - * @static - */ - function staticPopCallback() - { - $ret = array_pop($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK']); - if (!is_array($GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'])) { - $GLOBALS['_PEAR_ERRORSTACK_OVERRIDE_CALLBACK'] = array(); - } - return $ret; - } - - /** - * Add an error to the stack - * - * If the message generator exists, it is called with 2 parameters. - * - the current Error Stack object - * - an array that is in the same format as an error. Available indices - * are 'code', 'package', 'time', 'params', 'level', and 'context' - * - * Next, if the error should contain context information, this is - * handled by the context grabbing method. - * Finally, the error is pushed onto the proper error stack - * @param int $code Package-specific error code - * @param string $level Error level. This is NOT spell-checked - * @param array $params associative array of error parameters - * @param string $msg Error message, or a portion of it if the message - * is to be generated - * @param array $repackage If this error re-packages an error pushed by - * another package, place the array returned from - * {@link pop()} in this parameter - * @param array $backtrace Protected parameter: use this to pass in the - * {@link debug_backtrace()} that should be used - * to find error context - * @return PEAR_Error|array if compatibility mode is on, a PEAR_Error is also - * thrown. If a PEAR_Error is returned, the userinfo - * property is set to the following array: - * - * - * array( - * 'code' => $code, - * 'params' => $params, - * 'package' => $this->_package, - * 'level' => $level, - * 'time' => time(), - * 'context' => $context, - * 'message' => $msg, - * //['repackage' => $err] repackaged error array/Exception class - * ); - * - * - * Normally, the previous array is returned. - */ - function push($code, $level = 'error', $params = array(), $msg = false, - $repackage = false, $backtrace = false) - { - $context = false; - // grab error context - if ($this->_contextCallback) { - if (!$backtrace) { - $backtrace = debug_backtrace(); - } - $context = call_user_func($this->_contextCallback, $code, $params, $backtrace); - } - - // save error - $time = explode(' ', microtime()); - $time = $time[1] + $time[0]; - $err = array( - 'code' => $code, - 'params' => $params, - 'package' => $this->_package, - 'level' => $level, - 'time' => $time, - 'context' => $context, - 'message' => $msg, - ); - - if ($repackage) { - $err['repackage'] = $repackage; - } - - // set up the error message, if necessary - if ($this->_msgCallback) { - $msg = call_user_func_array($this->_msgCallback, - array(&$this, $err)); - $err['message'] = $msg; - } - $push = $log = true; - $die = false; - // try the overriding callback first - $callback = $this->staticPopCallback(); - if ($callback) { - $this->staticPushCallback($callback); - } - if (!is_callable($callback)) { - // try the local callback next - $callback = $this->popCallback(); - if (is_callable($callback)) { - $this->pushCallback($callback); - } else { - // try the default callback - $callback = isset($GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'][$this->_package]) ? - $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK'][$this->_package] : - $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_CALLBACK']['*']; - } - } - if (is_callable($callback)) { - switch(call_user_func($callback, $err)){ - case PEAR_ERRORSTACK_IGNORE: - return $err; - break; - case PEAR_ERRORSTACK_PUSH: - $log = false; - break; - case PEAR_ERRORSTACK_LOG: - $push = false; - break; - case PEAR_ERRORSTACK_DIE: - $die = true; - break; - // anything else returned has the same effect as pushandlog - } - } - if ($push) { - array_unshift($this->_errors, $err); - if (!isset($this->_errorsByLevel[$err['level']])) { - $this->_errorsByLevel[$err['level']] = array(); - } - $this->_errorsByLevel[$err['level']][] = &$this->_errors[0]; - } - if ($log) { - if ($this->_logger || $GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER']) { - $this->_log($err); - } - } - if ($die) { - die(); - } - if ($this->_compat && $push) { - return $this->raiseError($msg, $code, null, null, $err); - } - return $err; - } - - /** - * Static version of {@link push()} - * - * @param string $package Package name this error belongs to - * @param int $code Package-specific error code - * @param string $level Error level. This is NOT spell-checked - * @param array $params associative array of error parameters - * @param string $msg Error message, or a portion of it if the message - * is to be generated - * @param array $repackage If this error re-packages an error pushed by - * another package, place the array returned from - * {@link pop()} in this parameter - * @param array $backtrace Protected parameter: use this to pass in the - * {@link debug_backtrace()} that should be used - * to find error context - * @return PEAR_Error|array if compatibility mode is on, a PEAR_Error is also - * thrown. see docs for {@link push()} - * @static - */ - function staticPush($package, $code, $level = 'error', $params = array(), - $msg = false, $repackage = false, $backtrace = false) - { - $s = &PEAR_ErrorStack::singleton($package); - if ($s->_contextCallback) { - if (!$backtrace) { - if (function_exists('debug_backtrace')) { - $backtrace = debug_backtrace(); - } - } - } - return $s->push($code, $level, $params, $msg, $repackage, $backtrace); - } - - /** - * Log an error using PEAR::Log - * @param array $err Error array - * @param array $levels Error level => Log constant map - * @access protected - */ - function _log($err) - { - if ($this->_logger) { - $logger = &$this->_logger; - } else { - $logger = &$GLOBALS['_PEAR_ERRORSTACK_DEFAULT_LOGGER']; - } - if (is_a($logger, 'Log')) { - $levels = array( - 'exception' => PEAR_LOG_CRIT, - 'alert' => PEAR_LOG_ALERT, - 'critical' => PEAR_LOG_CRIT, - 'error' => PEAR_LOG_ERR, - 'warning' => PEAR_LOG_WARNING, - 'notice' => PEAR_LOG_NOTICE, - 'info' => PEAR_LOG_INFO, - 'debug' => PEAR_LOG_DEBUG); - if (isset($levels[$err['level']])) { - $level = $levels[$err['level']]; - } else { - $level = PEAR_LOG_INFO; - } - $logger->log($err['message'], $level, $err); - } else { // support non-standard logs - call_user_func($logger, $err); - } - } - - - /** - * Pop an error off of the error stack - * - * @return false|array - * @since 0.4alpha it is no longer possible to specify a specific error - * level to return - the last error pushed will be returned, instead - */ - function pop() - { - $err = @array_shift($this->_errors); - if (!is_null($err)) { - @array_pop($this->_errorsByLevel[$err['level']]); - if (!count($this->_errorsByLevel[$err['level']])) { - unset($this->_errorsByLevel[$err['level']]); - } - } - return $err; - } - - /** - * Pop an error off of the error stack, static method - * - * @param string package name - * @return boolean - * @since PEAR1.5.0a1 - */ - function staticPop($package) - { - if ($package) { - if (!isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) { - return false; - } - return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]->pop(); - } - } - - /** - * Determine whether there are any errors on the stack - * @param string|array Level name. Use to determine if any errors - * of level (string), or levels (array) have been pushed - * @return boolean - */ - function hasErrors($level = false) - { - if ($level) { - return isset($this->_errorsByLevel[$level]); - } - return count($this->_errors); - } - - /** - * Retrieve all errors since last purge - * - * @param boolean set in order to empty the error stack - * @param string level name, to return only errors of a particular severity - * @return array - */ - function getErrors($purge = false, $level = false) - { - if (!$purge) { - if ($level) { - if (!isset($this->_errorsByLevel[$level])) { - return array(); - } else { - return $this->_errorsByLevel[$level]; - } - } else { - return $this->_errors; - } - } - if ($level) { - $ret = $this->_errorsByLevel[$level]; - foreach ($this->_errorsByLevel[$level] as $i => $unused) { - // entries are references to the $_errors array - $this->_errorsByLevel[$level][$i] = false; - } - // array_filter removes all entries === false - $this->_errors = array_filter($this->_errors); - unset($this->_errorsByLevel[$level]); - return $ret; - } - $ret = $this->_errors; - $this->_errors = array(); - $this->_errorsByLevel = array(); - return $ret; - } - - /** - * Determine whether there are any errors on a single error stack, or on any error stack - * - * The optional parameter can be used to test the existence of any errors without the need of - * singleton instantiation - * @param string|false Package name to check for errors - * @param string Level name to check for a particular severity - * @return boolean - * @static - */ - function staticHasErrors($package = false, $level = false) - { - if ($package) { - if (!isset($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package])) { - return false; - } - return $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]->hasErrors($level); - } - foreach ($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] as $package => $obj) { - if ($obj->hasErrors($level)) { - return true; - } - } - return false; - } - - /** - * Get a list of all errors since last purge, organized by package - * @since PEAR 1.4.0dev BC break! $level is now in the place $merge used to be - * @param boolean $purge Set to purge the error stack of existing errors - * @param string $level Set to a level name in order to retrieve only errors of a particular level - * @param boolean $merge Set to return a flat array, not organized by package - * @param array $sortfunc Function used to sort a merged array - default - * sorts by time, and should be good for most cases - * @static - * @return array - */ - function staticGetErrors($purge = false, $level = false, $merge = false, - $sortfunc = array('PEAR_ErrorStack', '_sortErrors')) - { - $ret = array(); - if (!is_callable($sortfunc)) { - $sortfunc = array('PEAR_ErrorStack', '_sortErrors'); - } - foreach ($GLOBALS['_PEAR_ERRORSTACK_SINGLETON'] as $package => $obj) { - $test = $GLOBALS['_PEAR_ERRORSTACK_SINGLETON'][$package]->getErrors($purge, $level); - if ($test) { - if ($merge) { - $ret = array_merge($ret, $test); - } else { - $ret[$package] = $test; - } - } - } - if ($merge) { - usort($ret, $sortfunc); - } - return $ret; - } - - /** - * Error sorting function, sorts by time - * @access private - */ - function _sortErrors($a, $b) - { - if ($a['time'] == $b['time']) { - return 0; - } - if ($a['time'] < $b['time']) { - return 1; - } - return -1; - } - - /** - * Standard file/line number/function/class context callback - * - * This function uses a backtrace generated from {@link debug_backtrace()} - * and so will not work at all in PHP < 4.3.0. The frame should - * reference the frame that contains the source of the error. - * @return array|false either array('file' => file, 'line' => line, - * 'function' => function name, 'class' => class name) or - * if this doesn't work, then false - * @param unused - * @param integer backtrace frame. - * @param array Results of debug_backtrace() - * @static - */ - function getFileLine($code, $params, $backtrace = null) - { - if ($backtrace === null) { - return false; - } - $frame = 0; - $functionframe = 1; - if (!isset($backtrace[1])) { - $functionframe = 0; - } else { - while (isset($backtrace[$functionframe]['function']) && - $backtrace[$functionframe]['function'] == 'eval' && - isset($backtrace[$functionframe + 1])) { - $functionframe++; - } - } - if (isset($backtrace[$frame])) { - if (!isset($backtrace[$frame]['file'])) { - $frame++; - } - $funcbacktrace = $backtrace[$functionframe]; - $filebacktrace = $backtrace[$frame]; - $ret = array('file' => $filebacktrace['file'], - 'line' => $filebacktrace['line']); - // rearrange for eval'd code or create function errors - if (strpos($filebacktrace['file'], '(') && - preg_match(';^(.*?)\((\d+)\) : (.*?)\\z;', $filebacktrace['file'], - $matches)) { - $ret['file'] = $matches[1]; - $ret['line'] = $matches[2] + 0; - } - if (isset($funcbacktrace['function']) && isset($backtrace[1])) { - if ($funcbacktrace['function'] != 'eval') { - if ($funcbacktrace['function'] == '__lambda_func') { - $ret['function'] = 'create_function() code'; - } else { - $ret['function'] = $funcbacktrace['function']; - } - } - } - if (isset($funcbacktrace['class']) && isset($backtrace[1])) { - $ret['class'] = $funcbacktrace['class']; - } - return $ret; - } - return false; - } - - /** - * Standard error message generation callback - * - * This method may also be called by a custom error message generator - * to fill in template values from the params array, simply - * set the third parameter to the error message template string to use - * - * The special variable %__msg% is reserved: use it only to specify - * where a message passed in by the user should be placed in the template, - * like so: - * - * Error message: %msg% - internal error - * - * If the message passed like so: - * - * - * $stack->push(ERROR_CODE, 'error', array(), 'server error 500'); - * - * - * The returned error message will be "Error message: server error 500 - - * internal error" - * @param PEAR_ErrorStack - * @param array - * @param string|false Pre-generated error message template - * @static - * @return string - */ - function getErrorMessage(&$stack, $err, $template = false) - { - if ($template) { - $mainmsg = $template; - } else { - $mainmsg = $stack->getErrorMessageTemplate($err['code']); - } - $mainmsg = str_replace('%__msg%', $err['message'], $mainmsg); - if (is_array($err['params']) && count($err['params'])) { - foreach ($err['params'] as $name => $val) { - if (is_array($val)) { - // @ is needed in case $val is a multi-dimensional array - $val = @implode(', ', $val); - } - if (is_object($val)) { - if (method_exists($val, '__toString')) { - $val = $val->__toString(); - } else { - PEAR_ErrorStack::staticPush('PEAR_ErrorStack', PEAR_ERRORSTACK_ERR_OBJTOSTRING, - 'warning', array('obj' => get_class($val)), - 'object %obj% passed into getErrorMessage, but has no __toString() method'); - $val = 'Object'; - } - } - $mainmsg = str_replace('%' . $name . '%', $val, $mainmsg); - } - } - return $mainmsg; - } - - /** - * Standard Error Message Template generator from code - * @return string - */ - function getErrorMessageTemplate($code) - { - if (!isset($this->_errorMsgs[$code])) { - return '%__msg%'; - } - return $this->_errorMsgs[$code]; - } - - /** - * Set the Error Message Template array - * - * The array format must be: - *
        -     * array(error code => 'message template',...)
        -     * 
        - * - * Error message parameters passed into {@link push()} will be used as input - * for the error message. If the template is 'message %foo% was %bar%', and the - * parameters are array('foo' => 'one', 'bar' => 'six'), the error message returned will - * be 'message one was six' - * @return string - */ - function setErrorMessageTemplate($template) - { - $this->_errorMsgs = $template; - } - - - /** - * emulate PEAR::raiseError() - * - * @return PEAR_Error - */ - function raiseError() - { - require_once 'PEAR.php'; - $args = func_get_args(); - return call_user_func_array(array('PEAR', 'raiseError'), $args); - } -} -$stack = &PEAR_ErrorStack::singleton('PEAR_ErrorStack'); -$stack->pushCallback(array('PEAR_ErrorStack', '_handleError')); -?> diff --git a/_piecrust/libs/PEAR/Exception.php b/_piecrust/libs/PEAR/Exception.php deleted file mode 100644 index 4a0e7b8..0000000 --- a/_piecrust/libs/PEAR/Exception.php +++ /dev/null @@ -1,389 +0,0 @@ - - * @author Hans Lellelid - * @author Bertrand Mansion - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Exception.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.3.3 - */ - - -/** - * Base PEAR_Exception Class - * - * 1) Features: - * - * - Nestable exceptions (throw new PEAR_Exception($msg, $prev_exception)) - * - Definable triggers, shot when exceptions occur - * - Pretty and informative error messages - * - Added more context info available (like class, method or cause) - * - cause can be a PEAR_Exception or an array of mixed - * PEAR_Exceptions/PEAR_ErrorStack warnings - * - callbacks for specific exception classes and their children - * - * 2) Ideas: - * - * - Maybe a way to define a 'template' for the output - * - * 3) Inherited properties from PHP Exception Class: - * - * protected $message - * protected $code - * protected $line - * protected $file - * private $trace - * - * 4) Inherited methods from PHP Exception Class: - * - * __clone - * __construct - * getMessage - * getCode - * getFile - * getLine - * getTraceSafe - * getTraceSafeAsString - * __toString - * - * 5) Usage example - * - * - * require_once 'PEAR/Exception.php'; - * - * class Test { - * function foo() { - * throw new PEAR_Exception('Error Message', ERROR_CODE); - * } - * } - * - * function myLogger($pear_exception) { - * echo $pear_exception->getMessage(); - * } - * // each time a exception is thrown the 'myLogger' will be called - * // (its use is completely optional) - * PEAR_Exception::addObserver('myLogger'); - * $test = new Test; - * try { - * $test->foo(); - * } catch (PEAR_Exception $e) { - * print $e; - * } - * - * - * @category pear - * @package PEAR - * @author Tomas V.V.Cox - * @author Hans Lellelid - * @author Bertrand Mansion - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.3.3 - * - */ -class PEAR_Exception extends Exception -{ - const OBSERVER_PRINT = -2; - const OBSERVER_TRIGGER = -4; - const OBSERVER_DIE = -8; - protected $cause; - private static $_observers = array(); - private static $_uniqueid = 0; - private $_trace; - - /** - * Supported signatures: - * - PEAR_Exception(string $message); - * - PEAR_Exception(string $message, int $code); - * - PEAR_Exception(string $message, Exception $cause); - * - PEAR_Exception(string $message, Exception $cause, int $code); - * - PEAR_Exception(string $message, PEAR_Error $cause); - * - PEAR_Exception(string $message, PEAR_Error $cause, int $code); - * - PEAR_Exception(string $message, array $causes); - * - PEAR_Exception(string $message, array $causes, int $code); - * @param string exception message - * @param int|Exception|PEAR_Error|array|null exception cause - * @param int|null exception code or null - */ - public function __construct($message, $p2 = null, $p3 = null) - { - if (is_int($p2)) { - $code = $p2; - $this->cause = null; - } elseif (is_object($p2) || is_array($p2)) { - // using is_object allows both Exception and PEAR_Error - if (is_object($p2) && !($p2 instanceof Exception)) { - if (!class_exists('PEAR_Error') || !($p2 instanceof PEAR_Error)) { - throw new PEAR_Exception('exception cause must be Exception, ' . - 'array, or PEAR_Error'); - } - } - $code = $p3; - if (is_array($p2) && isset($p2['message'])) { - // fix potential problem of passing in a single warning - $p2 = array($p2); - } - $this->cause = $p2; - } else { - $code = null; - $this->cause = null; - } - parent::__construct($message, $code); - $this->signal(); - } - - /** - * @param mixed $callback - A valid php callback, see php func is_callable() - * - A PEAR_Exception::OBSERVER_* constant - * - An array(const PEAR_Exception::OBSERVER_*, - * mixed $options) - * @param string $label The name of the observer. Use this if you want - * to remove it later with removeObserver() - */ - public static function addObserver($callback, $label = 'default') - { - self::$_observers[$label] = $callback; - } - - public static function removeObserver($label = 'default') - { - unset(self::$_observers[$label]); - } - - /** - * @return int unique identifier for an observer - */ - public static function getUniqueId() - { - return self::$_uniqueid++; - } - - private function signal() - { - foreach (self::$_observers as $func) { - if (is_callable($func)) { - call_user_func($func, $this); - continue; - } - settype($func, 'array'); - switch ($func[0]) { - case self::OBSERVER_PRINT : - $f = (isset($func[1])) ? $func[1] : '%s'; - printf($f, $this->getMessage()); - break; - case self::OBSERVER_TRIGGER : - $f = (isset($func[1])) ? $func[1] : E_USER_NOTICE; - trigger_error($this->getMessage(), $f); - break; - case self::OBSERVER_DIE : - $f = (isset($func[1])) ? $func[1] : '%s'; - die(printf($f, $this->getMessage())); - break; - default: - trigger_error('invalid observer type', E_USER_WARNING); - } - } - } - - /** - * Return specific error information that can be used for more detailed - * error messages or translation. - * - * This method may be overridden in child exception classes in order - * to add functionality not present in PEAR_Exception and is a placeholder - * to define API - * - * The returned array must be an associative array of parameter => value like so: - *
        -     * array('name' => $name, 'context' => array(...))
        -     * 
        - * @return array - */ - public function getErrorData() - { - return array(); - } - - /** - * Returns the exception that caused this exception to be thrown - * @access public - * @return Exception|array The context of the exception - */ - public function getCause() - { - return $this->cause; - } - - /** - * Function must be public to call on caused exceptions - * @param array - */ - public function getCauseMessage(&$causes) - { - $trace = $this->getTraceSafe(); - $cause = array('class' => get_class($this), - 'message' => $this->message, - 'file' => 'unknown', - 'line' => 'unknown'); - if (isset($trace[0])) { - if (isset($trace[0]['file'])) { - $cause['file'] = $trace[0]['file']; - $cause['line'] = $trace[0]['line']; - } - } - $causes[] = $cause; - if ($this->cause instanceof PEAR_Exception) { - $this->cause->getCauseMessage($causes); - } elseif ($this->cause instanceof Exception) { - $causes[] = array('class' => get_class($this->cause), - 'message' => $this->cause->getMessage(), - 'file' => $this->cause->getFile(), - 'line' => $this->cause->getLine()); - } elseif (class_exists('PEAR_Error') && $this->cause instanceof PEAR_Error) { - $causes[] = array('class' => get_class($this->cause), - 'message' => $this->cause->getMessage(), - 'file' => 'unknown', - 'line' => 'unknown'); - } elseif (is_array($this->cause)) { - foreach ($this->cause as $cause) { - if ($cause instanceof PEAR_Exception) { - $cause->getCauseMessage($causes); - } elseif ($cause instanceof Exception) { - $causes[] = array('class' => get_class($cause), - 'message' => $cause->getMessage(), - 'file' => $cause->getFile(), - 'line' => $cause->getLine()); - } elseif (class_exists('PEAR_Error') && $cause instanceof PEAR_Error) { - $causes[] = array('class' => get_class($cause), - 'message' => $cause->getMessage(), - 'file' => 'unknown', - 'line' => 'unknown'); - } elseif (is_array($cause) && isset($cause['message'])) { - // PEAR_ErrorStack warning - $causes[] = array( - 'class' => $cause['package'], - 'message' => $cause['message'], - 'file' => isset($cause['context']['file']) ? - $cause['context']['file'] : - 'unknown', - 'line' => isset($cause['context']['line']) ? - $cause['context']['line'] : - 'unknown', - ); - } - } - } - } - - public function getTraceSafe() - { - if (!isset($this->_trace)) { - $this->_trace = $this->getTrace(); - if (empty($this->_trace)) { - $backtrace = debug_backtrace(); - $this->_trace = array($backtrace[count($backtrace)-1]); - } - } - return $this->_trace; - } - - public function getErrorClass() - { - $trace = $this->getTraceSafe(); - return $trace[0]['class']; - } - - public function getErrorMethod() - { - $trace = $this->getTraceSafe(); - return $trace[0]['function']; - } - - public function __toString() - { - if (isset($_SERVER['REQUEST_URI'])) { - return $this->toHtml(); - } - return $this->toText(); - } - - public function toHtml() - { - $trace = $this->getTraceSafe(); - $causes = array(); - $this->getCauseMessage($causes); - $html = '
        ' . "\n"; - foreach ($causes as $i => $cause) { - $html .= '\n"; - } - $html .= '' . "\n" - . '' - . '' - . '' . "\n"; - - foreach ($trace as $k => $v) { - $html .= '' - . '' - . '' . "\n"; - } - $html .= '' - . '' - . '' . "\n" - . '
        ' - . str_repeat('-', $i) . ' ' . $cause['class'] . ': ' - . htmlspecialchars($cause['message']) . ' in ' . $cause['file'] . ' ' - . 'on line ' . $cause['line'] . '' - . "
        Exception trace
        #FunctionLocation
        ' . $k . ''; - if (!empty($v['class'])) { - $html .= $v['class'] . $v['type']; - } - $html .= $v['function']; - $args = array(); - if (!empty($v['args'])) { - foreach ($v['args'] as $arg) { - if (is_null($arg)) $args[] = 'null'; - elseif (is_array($arg)) $args[] = 'Array'; - elseif (is_object($arg)) $args[] = 'Object('.get_class($arg).')'; - elseif (is_bool($arg)) $args[] = $arg ? 'true' : 'false'; - elseif (is_int($arg) || is_double($arg)) $args[] = $arg; - else { - $arg = (string)$arg; - $str = htmlspecialchars(substr($arg, 0, 16)); - if (strlen($arg) > 16) $str .= '…'; - $args[] = "'" . $str . "'"; - } - } - } - $html .= '(' . implode(', ',$args) . ')' - . '' . (isset($v['file']) ? $v['file'] : 'unknown') - . ':' . (isset($v['line']) ? $v['line'] : 'unknown') - . '
        ' . ($k+1) . '{main} 
        '; - return $html; - } - - public function toText() - { - $causes = array(); - $this->getCauseMessage($causes); - $causeMsg = ''; - foreach ($causes as $i => $cause) { - $causeMsg .= str_repeat(' ', $i) . $cause['class'] . ': ' - . $cause['message'] . ' in ' . $cause['file'] - . ' on line ' . $cause['line'] . "\n"; - } - return $causeMsg . $this->getTraceAsString(); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/FixPHP5PEARWarnings.php b/_piecrust/libs/PEAR/FixPHP5PEARWarnings.php deleted file mode 100644 index be5dc3c..0000000 --- a/_piecrust/libs/PEAR/FixPHP5PEARWarnings.php +++ /dev/null @@ -1,7 +0,0 @@ - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Frontend.php b/_piecrust/libs/PEAR/Frontend.php deleted file mode 100644 index 531e541..0000000 --- a/_piecrust/libs/PEAR/Frontend.php +++ /dev/null @@ -1,228 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Frontend.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * Include error handling - */ -//require_once 'PEAR.php'; - -/** - * Which user interface class is being used. - * @var string class name - */ -$GLOBALS['_PEAR_FRONTEND_CLASS'] = 'PEAR_Frontend_CLI'; - -/** - * Instance of $_PEAR_Command_uiclass. - * @var object - */ -$GLOBALS['_PEAR_FRONTEND_SINGLETON'] = null; - -/** - * Singleton-based frontend for PEAR user input/output - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Frontend extends PEAR -{ - /** - * Retrieve the frontend object - * @return PEAR_Frontend_CLI|PEAR_Frontend_Web|PEAR_Frontend_Gtk - * @static - */ - function &singleton($type = null) - { - if ($type === null) { - if (!isset($GLOBALS['_PEAR_FRONTEND_SINGLETON'])) { - $a = false; - return $a; - } - return $GLOBALS['_PEAR_FRONTEND_SINGLETON']; - } - - $a = PEAR_Frontend::setFrontendClass($type); - return $a; - } - - /** - * Set the frontend class that will be used by calls to {@link singleton()} - * - * Frontends are expected to conform to the PEAR naming standard of - * _ => DIRECTORY_SEPARATOR (PEAR_Frontend_CLI is in PEAR/Frontend/CLI.php) - * @param string $uiclass full class name - * @return PEAR_Frontend - * @static - */ - function &setFrontendClass($uiclass) - { - if (is_object($GLOBALS['_PEAR_FRONTEND_SINGLETON']) && - is_a($GLOBALS['_PEAR_FRONTEND_SINGLETON'], $uiclass)) { - return $GLOBALS['_PEAR_FRONTEND_SINGLETON']; - } - - if (!class_exists($uiclass)) { - $file = str_replace('_', '/', $uiclass) . '.php'; - if (PEAR_Frontend::isIncludeable($file)) { - include_once $file; - } - } - - if (class_exists($uiclass)) { - $obj = &new $uiclass; - // quick test to see if this class implements a few of the most - // important frontend methods - if (is_a($obj, 'PEAR_Frontend')) { - $GLOBALS['_PEAR_FRONTEND_SINGLETON'] = &$obj; - $GLOBALS['_PEAR_FRONTEND_CLASS'] = $uiclass; - return $obj; - } - - $err = PEAR::raiseError("not a frontend class: $uiclass"); - return $err; - } - - $err = PEAR::raiseError("no such class: $uiclass"); - return $err; - } - - /** - * Set the frontend class that will be used by calls to {@link singleton()} - * - * Frontends are expected to be a descendant of PEAR_Frontend - * @param PEAR_Frontend - * @return PEAR_Frontend - * @static - */ - function &setFrontendObject($uiobject) - { - if (is_object($GLOBALS['_PEAR_FRONTEND_SINGLETON']) && - is_a($GLOBALS['_PEAR_FRONTEND_SINGLETON'], get_class($uiobject))) { - return $GLOBALS['_PEAR_FRONTEND_SINGLETON']; - } - - if (!is_a($uiobject, 'PEAR_Frontend')) { - $err = PEAR::raiseError('not a valid frontend class: (' . - get_class($uiobject) . ')'); - return $err; - } - - $GLOBALS['_PEAR_FRONTEND_SINGLETON'] = &$uiobject; - $GLOBALS['_PEAR_FRONTEND_CLASS'] = get_class($uiobject); - return $uiobject; - } - - /** - * @param string $path relative or absolute include path - * @return boolean - * @static - */ - function isIncludeable($path) - { - if (file_exists($path) && is_readable($path)) { - return true; - } - - $fp = @fopen($path, 'r', true); - if ($fp) { - fclose($fp); - return true; - } - - return false; - } - - /** - * @param PEAR_Config - */ - function setConfig(&$config) - { - } - - /** - * This can be overridden to allow session-based temporary file management - * - * By default, all files are deleted at the end of a session. The web installer - * needs to be able to sustain a list over many sessions in order to support - * user interaction with install scripts - */ - function addTempFile($file) - { - $GLOBALS['_PEAR_Common_tempfiles'][] = $file; - } - - /** - * Log an action - * - * @param string $msg the message to log - * @param boolean $append_crlf - * @return boolean true - * @abstract - */ - function log($msg, $append_crlf = true) - { - } - - /** - * Run a post-installation script - * - * @param array $scripts array of post-install scripts - * @abstract - */ - function runPostinstallScripts(&$scripts) - { - } - - /** - * Display human-friendly output formatted depending on the - * $command parameter. - * - * This should be able to handle basic output data with no command - * @param mixed $data data structure containing the information to display - * @param string $command command from which this method was called - * @abstract - */ - function outputData($data, $command = '_default') - { - } - - /** - * Display a modal form dialog and return the given input - * - * A frontend that requires multiple requests to retrieve and process - * data must take these needs into account, and implement the request - * handling code. - * @param string $command command from which this method was called - * @param array $prompts associative array. keys are the input field names - * and values are the description - * @param array $types array of input field types (text, password, - * etc.) keys have to be the same like in $prompts - * @param array $defaults array of default values. again keys have - * to be the same like in $prompts. Do not depend - * on a default value being set. - * @return array input sent by the user - * @abstract - */ - function userDialog($command, $prompts, $types = array(), $defaults = array()) - { - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Frontend/CLI.php b/_piecrust/libs/PEAR/Frontend/CLI.php deleted file mode 100644 index 340b99b..0000000 --- a/_piecrust/libs/PEAR/Frontend/CLI.php +++ /dev/null @@ -1,751 +0,0 @@ - - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: CLI.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ -/** - * base class - */ -require_once 'PEAR/Frontend.php'; - -/** - * Command-line Frontend for the PEAR Installer - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ -class PEAR_Frontend_CLI extends PEAR_Frontend -{ - /** - * What type of user interface this frontend is for. - * @var string - * @access public - */ - var $type = 'CLI'; - var $lp = ''; // line prefix - - var $params = array(); - var $term = array( - 'bold' => '', - 'normal' => '', - ); - - function PEAR_Frontend_CLI() - { - parent::PEAR(); - $term = getenv('TERM'); //(cox) $_ENV is empty for me in 4.1.1 - if (function_exists('posix_isatty') && !posix_isatty(1)) { - // output is being redirected to a file or through a pipe - } elseif ($term) { - if (preg_match('/^(xterm|vt220|linux)/', $term)) { - $this->term['bold'] = sprintf("%c%c%c%c", 27, 91, 49, 109); - $this->term['normal'] = sprintf("%c%c%c", 27, 91, 109); - } elseif (preg_match('/^vt100/', $term)) { - $this->term['bold'] = sprintf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); - $this->term['normal'] = sprintf("%c%c%c%c%c", 27, 91, 109, 0, 0); - } - } elseif (OS_WINDOWS) { - // XXX add ANSI codes here - } - } - - /** - * @param object PEAR_Error object - */ - function displayError($e) - { - return $this->_displayLine($e->getMessage()); - } - - /** - * @param object PEAR_Error object - */ - function displayFatalError($eobj) - { - $this->displayError($eobj); - if (class_exists('PEAR_Config')) { - $config = &PEAR_Config::singleton(); - if ($config->get('verbose') > 5) { - if (function_exists('debug_print_backtrace')) { - debug_print_backtrace(); - exit(1); - } - - $raised = false; - foreach (debug_backtrace() as $i => $frame) { - if (!$raised) { - if (isset($frame['class']) - && strtolower($frame['class']) == 'pear' - && strtolower($frame['function']) == 'raiseerror' - ) { - $raised = true; - } else { - continue; - } - } - - $frame['class'] = !isset($frame['class']) ? '' : $frame['class']; - $frame['type'] = !isset($frame['type']) ? '' : $frame['type']; - $frame['function'] = !isset($frame['function']) ? '' : $frame['function']; - $frame['line'] = !isset($frame['line']) ? '' : $frame['line']; - $this->_displayLine("#$i: $frame[class]$frame[type]$frame[function] $frame[line]"); - } - } - } - - exit(1); - } - - /** - * Instruct the runInstallScript method to skip a paramgroup that matches the - * id value passed in. - * - * This method is useful for dynamically configuring which sections of a post-install script - * will be run based on the user's setup, which is very useful for making flexible - * post-install scripts without losing the cross-Frontend ability to retrieve user input - * @param string - */ - function skipParamgroup($id) - { - $this->_skipSections[$id] = true; - } - - function runPostinstallScripts(&$scripts) - { - foreach ($scripts as $i => $script) { - $this->runInstallScript($scripts[$i]->_params, $scripts[$i]->_obj); - } - } - - /** - * @param array $xml contents of postinstallscript tag - * @param object $script post-installation script - * @param string install|upgrade - */ - function runInstallScript($xml, &$script) - { - $this->_skipSections = array(); - if (!is_array($xml) || !isset($xml['paramgroup'])) { - $script->run(array(), '_default'); - return; - } - - $completedPhases = array(); - if (!isset($xml['paramgroup'][0])) { - $xml['paramgroup'] = array($xml['paramgroup']); - } - - foreach ($xml['paramgroup'] as $group) { - if (isset($this->_skipSections[$group['id']])) { - // the post-install script chose to skip this section dynamically - continue; - } - - if (isset($group['name'])) { - $paramname = explode('::', $group['name']); - if ($lastgroup['id'] != $paramname[0]) { - continue; - } - - $group['name'] = $paramname[1]; - if (!isset($answers)) { - return; - } - - if (isset($answers[$group['name']])) { - switch ($group['conditiontype']) { - case '=' : - if ($answers[$group['name']] != $group['value']) { - continue 2; - } - break; - case '!=' : - if ($answers[$group['name']] == $group['value']) { - continue 2; - } - break; - case 'preg_match' : - if (!@preg_match('/' . $group['value'] . '/', - $answers[$group['name']])) { - continue 2; - } - break; - default : - return; - } - } - } - - $lastgroup = $group; - if (isset($group['instructions'])) { - $this->_display($group['instructions']); - } - - if (!isset($group['param'][0])) { - $group['param'] = array($group['param']); - } - - if (isset($group['param'])) { - if (method_exists($script, 'postProcessPrompts')) { - $prompts = $script->postProcessPrompts($group['param'], $group['id']); - if (!is_array($prompts) || count($prompts) != count($group['param'])) { - $this->outputData('postinstall', 'Error: post-install script did not ' . - 'return proper post-processed prompts'); - $prompts = $group['param']; - } else { - foreach ($prompts as $i => $var) { - if (!is_array($var) || !isset($var['prompt']) || - !isset($var['name']) || - ($var['name'] != $group['param'][$i]['name']) || - ($var['type'] != $group['param'][$i]['type']) - ) { - $this->outputData('postinstall', 'Error: post-install script ' . - 'modified the variables or prompts, severe security risk. ' . - 'Will instead use the defaults from the package.xml'); - $prompts = $group['param']; - } - } - } - - $answers = $this->confirmDialog($prompts); - } else { - $answers = $this->confirmDialog($group['param']); - } - } - - if ((isset($answers) && $answers) || !isset($group['param'])) { - if (!isset($answers)) { - $answers = array(); - } - - array_unshift($completedPhases, $group['id']); - if (!$script->run($answers, $group['id'])) { - $script->run($completedPhases, '_undoOnError'); - return; - } - } else { - $script->run($completedPhases, '_undoOnError'); - return; - } - } - } - - /** - * Ask for user input, confirm the answers and continue until the user is satisfied - * @param array an array of arrays, format array('name' => 'paramname', 'prompt' => - * 'text to display', 'type' => 'string'[, default => 'default value']) - * @return array - */ - function confirmDialog($params) - { - $answers = $prompts = $types = array(); - foreach ($params as $param) { - $prompts[$param['name']] = $param['prompt']; - $types[$param['name']] = $param['type']; - $answers[$param['name']] = isset($param['default']) ? $param['default'] : ''; - } - - $tried = false; - do { - if ($tried) { - $i = 1; - foreach ($answers as $var => $value) { - if (!strlen($value)) { - echo $this->bold("* Enter an answer for #" . $i . ": ({$prompts[$var]})\n"); - } - $i++; - } - } - - $answers = $this->userDialog('', $prompts, $types, $answers); - $tried = true; - } while (is_array($answers) && count(array_filter($answers)) != count($prompts)); - - return $answers; - } - - function userDialog($command, $prompts, $types = array(), $defaults = array(), $screensize = 20) - { - if (!is_array($prompts)) { - return array(); - } - - $testprompts = array_keys($prompts); - $result = $defaults; - - reset($prompts); - if (count($prompts) === 1) { - foreach ($prompts as $key => $prompt) { - $type = $types[$key]; - $default = @$defaults[$key]; - print "$prompt "; - if ($default) { - print "[$default] "; - } - print ": "; - - $line = fgets(STDIN, 2048); - $result[$key] = ($default && trim($line) == '') ? $default : trim($line); - } - - return $result; - } - - $first_run = true; - while (true) { - $descLength = max(array_map('strlen', $prompts)); - $descFormat = "%-{$descLength}s"; - $last = count($prompts); - - $i = 0; - foreach ($prompts as $n => $var) { - $res = isset($result[$n]) ? $result[$n] : null; - printf("%2d. $descFormat : %s\n", ++$i, $prompts[$n], $res); - } - print "\n1-$last, 'all', 'abort', or Enter to continue: "; - - $tmp = trim(fgets(STDIN, 1024)); - if (empty($tmp)) { - break; - } - - if ($tmp == 'abort') { - return false; - } - - if (isset($testprompts[(int)$tmp - 1])) { - $var = $testprompts[(int)$tmp - 1]; - $desc = $prompts[$var]; - $current = @$result[$var]; - print "$desc [$current] : "; - $tmp = trim(fgets(STDIN, 1024)); - if ($tmp !== '') { - $result[$var] = $tmp; - } - } elseif ($tmp == 'all') { - foreach ($prompts as $var => $desc) { - $current = $result[$var]; - print "$desc [$current] : "; - $tmp = trim(fgets(STDIN, 1024)); - if (trim($tmp) !== '') { - $result[$var] = trim($tmp); - } - } - } - - $first_run = false; - } - - return $result; - } - - function userConfirm($prompt, $default = 'yes') - { - trigger_error("PEAR_Frontend_CLI::userConfirm not yet converted", E_USER_ERROR); - static $positives = array('y', 'yes', 'on', '1'); - static $negatives = array('n', 'no', 'off', '0'); - print "$this->lp$prompt [$default] : "; - $fp = fopen("php://stdin", "r"); - $line = fgets($fp, 2048); - fclose($fp); - $answer = strtolower(trim($line)); - if (empty($answer)) { - $answer = $default; - } - if (in_array($answer, $positives)) { - return true; - } - if (in_array($answer, $negatives)) { - return false; - } - if (in_array($default, $positives)) { - return true; - } - return false; - } - - function outputData($data, $command = '_default') - { - switch ($command) { - case 'channel-info': - foreach ($data as $type => $section) { - if ($type == 'main') { - $section['data'] = array_values($section['data']); - } - - $this->outputData($section); - } - break; - case 'install': - case 'upgrade': - case 'upgrade-all': - if (is_array($data) && isset($data['release_warnings'])) { - $this->_displayLine(''); - $this->_startTable(array( - 'border' => false, - 'caption' => 'Release Warnings' - )); - $this->_tableRow(array($data['release_warnings']), null, array(1 => array('wrap' => 55))); - $this->_endTable(); - $this->_displayLine(''); - } - - $this->_displayLine(is_array($data) ? $data['data'] : $data); - break; - case 'search': - $this->_startTable($data); - if (isset($data['headline']) && is_array($data['headline'])) { - $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55))); - } - - $packages = array(); - foreach($data['data'] as $category) { - foreach($category as $name => $pkg) { - $packages[$pkg[0]] = $pkg; - } - } - - $p = array_keys($packages); - natcasesort($p); - foreach ($p as $name) { - $this->_tableRow($packages[$name], null, array(1 => array('wrap' => 55))); - } - - $this->_endTable(); - break; - case 'list-all': - if (!isset($data['data'])) { - $this->_displayLine('No packages in channel'); - break; - } - - $this->_startTable($data); - if (isset($data['headline']) && is_array($data['headline'])) { - $this->_tableRow($data['headline'], array('bold' => true), array(1 => array('wrap' => 55))); - } - - $packages = array(); - foreach($data['data'] as $category) { - foreach($category as $name => $pkg) { - $packages[$pkg[0]] = $pkg; - } - } - - $p = array_keys($packages); - natcasesort($p); - foreach ($p as $name) { - $pkg = $packages[$name]; - unset($pkg[4], $pkg[5]); - $this->_tableRow($pkg, null, array(1 => array('wrap' => 55))); - } - - $this->_endTable(); - break; - case 'config-show': - $data['border'] = false; - $opts = array( - 0 => array('wrap' => 30), - 1 => array('wrap' => 20), - 2 => array('wrap' => 35) - ); - - $this->_startTable($data); - if (isset($data['headline']) && is_array($data['headline'])) { - $this->_tableRow($data['headline'], array('bold' => true), $opts); - } - - foreach ($data['data'] as $group) { - foreach ($group as $value) { - if ($value[2] == '') { - $value[2] = ""; - } - - $this->_tableRow($value, null, $opts); - } - } - - $this->_endTable(); - break; - case 'remote-info': - $d = $data; - $data = array( - 'caption' => 'Package details:', - 'border' => false, - 'data' => array( - array("Latest", $data['stable']), - array("Installed", $data['installed']), - array("Package", $data['name']), - array("License", $data['license']), - array("Category", $data['category']), - array("Summary", $data['summary']), - array("Description", $data['description']), - ), - ); - - if (isset($d['deprecated']) && $d['deprecated']) { - $conf = &PEAR_Config::singleton(); - $reg = $conf->getRegistry(); - $name = $reg->parsedPackageNameToString($d['deprecated'], true); - $data['data'][] = array('Deprecated! use', $name); - } - default: { - if (is_array($data)) { - $this->_startTable($data); - $count = count($data['data'][0]); - if ($count == 2) { - $opts = array(0 => array('wrap' => 25), - 1 => array('wrap' => 48) - ); - } elseif ($count == 3) { - $opts = array(0 => array('wrap' => 30), - 1 => array('wrap' => 20), - 2 => array('wrap' => 35) - ); - } else { - $opts = null; - } - if (isset($data['headline']) && is_array($data['headline'])) { - $this->_tableRow($data['headline'], - array('bold' => true), - $opts); - } - - if (is_array($data['data'])) { - foreach($data['data'] as $row) { - $this->_tableRow($row, null, $opts); - } - } else { - $this->_tableRow(array($data['data']), null, $opts); - } - $this->_endTable(); - } else { - $this->_displayLine($data); - } - } - } - } - - function log($text, $append_crlf = true) - { - if ($append_crlf) { - return $this->_displayLine($text); - } - - return $this->_display($text); - } - - function bold($text) - { - if (empty($this->term['bold'])) { - return strtoupper($text); - } - - return $this->term['bold'] . $text . $this->term['normal']; - } - - function _displayHeading($title) - { - print $this->lp.$this->bold($title)."\n"; - print $this->lp.str_repeat("=", strlen($title))."\n"; - } - - function _startTable($params = array()) - { - $params['table_data'] = array(); - $params['widest'] = array(); // indexed by column - $params['highest'] = array(); // indexed by row - $params['ncols'] = 0; - $this->params = $params; - } - - function _tableRow($columns, $rowparams = array(), $colparams = array()) - { - $highest = 1; - for ($i = 0; $i < count($columns); $i++) { - $col = &$columns[$i]; - if (isset($colparams[$i]) && !empty($colparams[$i]['wrap'])) { - $col = wordwrap($col, $colparams[$i]['wrap']); - } - - if (strpos($col, "\n") !== false) { - $multiline = explode("\n", $col); - $w = 0; - foreach ($multiline as $n => $line) { - $len = strlen($line); - if ($len > $w) { - $w = $len; - } - } - $lines = count($multiline); - } else { - $w = strlen($col); - } - - if (isset($this->params['widest'][$i])) { - if ($w > $this->params['widest'][$i]) { - $this->params['widest'][$i] = $w; - } - } else { - $this->params['widest'][$i] = $w; - } - - $tmp = count_chars($columns[$i], 1); - // handle unix, mac and windows formats - $lines = (isset($tmp[10]) ? $tmp[10] : (isset($tmp[13]) ? $tmp[13] : 0)) + 1; - if ($lines > $highest) { - $highest = $lines; - } - } - - if (count($columns) > $this->params['ncols']) { - $this->params['ncols'] = count($columns); - } - - $new_row = array( - 'data' => $columns, - 'height' => $highest, - 'rowparams' => $rowparams, - 'colparams' => $colparams, - ); - $this->params['table_data'][] = $new_row; - } - - function _endTable() - { - extract($this->params); - if (!empty($caption)) { - $this->_displayHeading($caption); - } - - if (count($table_data) === 0) { - return; - } - - if (!isset($width)) { - $width = $widest; - } else { - for ($i = 0; $i < $ncols; $i++) { - if (!isset($width[$i])) { - $width[$i] = $widest[$i]; - } - } - } - - $border = false; - if (empty($border)) { - $cellstart = ''; - $cellend = ' '; - $rowend = ''; - $padrowend = false; - $borderline = ''; - } else { - $cellstart = '| '; - $cellend = ' '; - $rowend = '|'; - $padrowend = true; - $borderline = '+'; - foreach ($width as $w) { - $borderline .= str_repeat('-', $w + strlen($cellstart) + strlen($cellend) - 1); - $borderline .= '+'; - } - } - - if ($borderline) { - $this->_displayLine($borderline); - } - - for ($i = 0; $i < count($table_data); $i++) { - extract($table_data[$i]); - if (!is_array($rowparams)) { - $rowparams = array(); - } - - if (!is_array($colparams)) { - $colparams = array(); - } - - $rowlines = array(); - if ($height > 1) { - for ($c = 0; $c < count($data); $c++) { - $rowlines[$c] = preg_split('/(\r?\n|\r)/', $data[$c]); - if (count($rowlines[$c]) < $height) { - $rowlines[$c] = array_pad($rowlines[$c], $height, ''); - } - } - } else { - for ($c = 0; $c < count($data); $c++) { - $rowlines[$c] = array($data[$c]); - } - } - - for ($r = 0; $r < $height; $r++) { - $rowtext = ''; - for ($c = 0; $c < count($data); $c++) { - if (isset($colparams[$c])) { - $attribs = array_merge($rowparams, $colparams); - } else { - $attribs = $rowparams; - } - - $w = isset($width[$c]) ? $width[$c] : 0; - //$cell = $data[$c]; - $cell = $rowlines[$c][$r]; - $l = strlen($cell); - if ($l > $w) { - $cell = substr($cell, 0, $w); - } - - if (isset($attribs['bold'])) { - $cell = $this->bold($cell); - } - - if ($l < $w) { - // not using str_pad here because we may - // add bold escape characters to $cell - $cell .= str_repeat(' ', $w - $l); - } - - $rowtext .= $cellstart . $cell . $cellend; - } - - if (!$border) { - $rowtext = rtrim($rowtext); - } - - $rowtext .= $rowend; - $this->_displayLine($rowtext); - } - } - - if ($borderline) { - $this->_displayLine($borderline); - } - } - - function _displayLine($text) - { - print "$this->lp$text\n"; - } - - function _display($text) - { - print $text; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer.php b/_piecrust/libs/PEAR/Installer.php deleted file mode 100644 index eb17ca7..0000000 --- a/_piecrust/libs/PEAR/Installer.php +++ /dev/null @@ -1,1823 +0,0 @@ - - * @author Tomas V.V. Cox - * @author Martin Jansen - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Installer.php 313024 2011-07-06 19:51:24Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/** - * Used for installation groups in package.xml 2.0 and platform exceptions - */ -require_once 'OS/Guess.php'; -require_once 'PEAR/Downloader.php'; - -define('PEAR_INSTALLER_NOBINARY', -240); -/** - * Administration class used to install PEAR packages and maintain the - * installed package database. - * - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Tomas V.V. Cox - * @author Martin Jansen - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ -class PEAR_Installer extends PEAR_Downloader -{ - // {{{ properties - - /** name of the package directory, for example Foo-1.0 - * @var string - */ - var $pkgdir; - - /** directory where PHP code files go - * @var string - */ - var $phpdir; - - /** directory where PHP extension files go - * @var string - */ - var $extdir; - - /** directory where documentation goes - * @var string - */ - var $docdir; - - /** installation root directory (ala PHP's INSTALL_ROOT or - * automake's DESTDIR - * @var string - */ - var $installroot = ''; - - /** debug level - * @var int - */ - var $debug = 1; - - /** temporary directory - * @var string - */ - var $tmpdir; - - /** - * PEAR_Registry object used by the installer - * @var PEAR_Registry - */ - var $registry; - - /** - * array of PEAR_Downloader_Packages - * @var array - */ - var $_downloadedPackages; - - /** List of file transactions queued for an install/upgrade/uninstall. - * - * Format: - * array( - * 0 => array("rename => array("from-file", "to-file")), - * 1 => array("delete" => array("file-to-delete")), - * ... - * ) - * - * @var array - */ - var $file_operations = array(); - - // }}} - - // {{{ constructor - - /** - * PEAR_Installer constructor. - * - * @param object $ui user interface object (instance of PEAR_Frontend_*) - * - * @access public - */ - function PEAR_Installer(&$ui) - { - parent::PEAR_Common(); - $this->setFrontendObject($ui); - $this->debug = $this->config->get('verbose'); - } - - function setOptions($options) - { - $this->_options = $options; - } - - function setConfig(&$config) - { - $this->config = &$config; - $this->_registry = &$config->getRegistry(); - } - - // }}} - - function _removeBackups($files) - { - foreach ($files as $path) { - $this->addFileOperation('removebackup', array($path)); - } - } - - // {{{ _deletePackageFiles() - - /** - * Delete a package's installed files, does not remove empty directories. - * - * @param string package name - * @param string channel name - * @param bool if true, then files are backed up first - * @return bool TRUE on success, or a PEAR error on failure - * @access protected - */ - function _deletePackageFiles($package, $channel = false, $backup = false) - { - if (!$channel) { - $channel = 'pear.php.net'; - } - - if (!strlen($package)) { - return $this->raiseError("No package to uninstall given"); - } - - if (strtolower($package) == 'pear' && $channel == 'pear.php.net') { - // to avoid race conditions, include all possible needed files - require_once 'PEAR/Task/Common.php'; - require_once 'PEAR/Task/Replace.php'; - require_once 'PEAR/Task/Unixeol.php'; - require_once 'PEAR/Task/Windowseol.php'; - require_once 'PEAR/PackageFile/v1.php'; - require_once 'PEAR/PackageFile/v2.php'; - require_once 'PEAR/PackageFile/Generator/v1.php'; - require_once 'PEAR/PackageFile/Generator/v2.php'; - } - - $filelist = $this->_registry->packageInfo($package, 'filelist', $channel); - if ($filelist == null) { - return $this->raiseError("$channel/$package not installed"); - } - - $ret = array(); - foreach ($filelist as $file => $props) { - if (empty($props['installed_as'])) { - continue; - } - - $path = $props['installed_as']; - if ($backup) { - $this->addFileOperation('backup', array($path)); - $ret[] = $path; - } - - $this->addFileOperation('delete', array($path)); - } - - if ($backup) { - return $ret; - } - - return true; - } - - // }}} - // {{{ _installFile() - - /** - * @param string filename - * @param array attributes from tag in package.xml - * @param string path to install the file in - * @param array options from command-line - * @access private - */ - function _installFile($file, $atts, $tmp_path, $options) - { - // {{{ return if this file is meant for another platform - static $os; - if (!isset($this->_registry)) { - $this->_registry = &$this->config->getRegistry(); - } - - if (isset($atts['platform'])) { - if (empty($os)) { - $os = new OS_Guess(); - } - - if (strlen($atts['platform']) && $atts['platform']{0} == '!') { - $negate = true; - $platform = substr($atts['platform'], 1); - } else { - $negate = false; - $platform = $atts['platform']; - } - - if ((bool) $os->matchSignature($platform) === $negate) { - $this->log(3, "skipped $file (meant for $atts[platform], we are ".$os->getSignature().")"); - return PEAR_INSTALLER_SKIPPED; - } - } - // }}} - - $channel = $this->pkginfo->getChannel(); - // {{{ assemble the destination paths - switch ($atts['role']) { - case 'src': - case 'extsrc': - $this->source_files++; - return; - case 'doc': - case 'data': - case 'test': - $dest_dir = $this->config->get($atts['role'] . '_dir', null, $channel) . - DIRECTORY_SEPARATOR . $this->pkginfo->getPackage(); - unset($atts['baseinstalldir']); - break; - case 'ext': - case 'php': - $dest_dir = $this->config->get($atts['role'] . '_dir', null, $channel); - break; - case 'script': - $dest_dir = $this->config->get('bin_dir', null, $channel); - break; - default: - return $this->raiseError("Invalid role `$atts[role]' for file $file"); - } - - $save_destdir = $dest_dir; - if (!empty($atts['baseinstalldir'])) { - $dest_dir .= DIRECTORY_SEPARATOR . $atts['baseinstalldir']; - } - - if (dirname($file) != '.' && empty($atts['install-as'])) { - $dest_dir .= DIRECTORY_SEPARATOR . dirname($file); - } - - if (empty($atts['install-as'])) { - $dest_file = $dest_dir . DIRECTORY_SEPARATOR . basename($file); - } else { - $dest_file = $dest_dir . DIRECTORY_SEPARATOR . $atts['install-as']; - } - $orig_file = $tmp_path . DIRECTORY_SEPARATOR . $file; - - // Clean up the DIRECTORY_SEPARATOR mess - $ds2 = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR; - list($dest_file, $orig_file) = preg_replace(array('!\\\\+!', '!/!', "!$ds2+!"), - array(DIRECTORY_SEPARATOR, - DIRECTORY_SEPARATOR, - DIRECTORY_SEPARATOR), - array($dest_file, $orig_file)); - $final_dest_file = $installed_as = $dest_file; - if (isset($this->_options['packagingroot'])) { - $installedas_dest_dir = dirname($final_dest_file); - $installedas_dest_file = $dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file); - $final_dest_file = $this->_prependPath($final_dest_file, $this->_options['packagingroot']); - } else { - $installedas_dest_dir = dirname($final_dest_file); - $installedas_dest_file = $installedas_dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file); - } - - $dest_dir = dirname($final_dest_file); - $dest_file = $dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file); - if (preg_match('~/\.\.(/|\\z)|^\.\./~', str_replace('\\', '/', $dest_file))) { - return $this->raiseError("SECURITY ERROR: file $file (installed to $dest_file) contains parent directory reference ..", PEAR_INSTALLER_FAILED); - } - // }}} - - if (empty($this->_options['register-only']) && - (!file_exists($dest_dir) || !is_dir($dest_dir))) { - if (!$this->mkDirHier($dest_dir)) { - return $this->raiseError("failed to mkdir $dest_dir", - PEAR_INSTALLER_FAILED); - } - $this->log(3, "+ mkdir $dest_dir"); - } - - // pretty much nothing happens if we are only registering the install - if (empty($this->_options['register-only'])) { - if (empty($atts['replacements'])) { - if (!file_exists($orig_file)) { - return $this->raiseError("file $orig_file does not exist", - PEAR_INSTALLER_FAILED); - } - - if (!@copy($orig_file, $dest_file)) { - return $this->raiseError("failed to write $dest_file: $php_errormsg", - PEAR_INSTALLER_FAILED); - } - - $this->log(3, "+ cp $orig_file $dest_file"); - if (isset($atts['md5sum'])) { - $md5sum = md5_file($dest_file); - } - } else { - // {{{ file with replacements - if (!file_exists($orig_file)) { - return $this->raiseError("file does not exist", - PEAR_INSTALLER_FAILED); - } - - $contents = file_get_contents($orig_file); - if ($contents === false) { - $contents = ''; - } - - if (isset($atts['md5sum'])) { - $md5sum = md5($contents); - } - - $subst_from = $subst_to = array(); - foreach ($atts['replacements'] as $a) { - $to = ''; - if ($a['type'] == 'php-const') { - if (preg_match('/^[a-z0-9_]+\\z/i', $a['to'])) { - eval("\$to = $a[to];"); - } else { - if (!isset($options['soft'])) { - $this->log(0, "invalid php-const replacement: $a[to]"); - } - continue; - } - } elseif ($a['type'] == 'pear-config') { - if ($a['to'] == 'master_server') { - $chan = $this->_registry->getChannel($channel); - if (!PEAR::isError($chan)) { - $to = $chan->getServer(); - } else { - $to = $this->config->get($a['to'], null, $channel); - } - } else { - $to = $this->config->get($a['to'], null, $channel); - } - if (is_null($to)) { - if (!isset($options['soft'])) { - $this->log(0, "invalid pear-config replacement: $a[to]"); - } - continue; - } - } elseif ($a['type'] == 'package-info') { - if ($t = $this->pkginfo->packageInfo($a['to'])) { - $to = $t; - } else { - if (!isset($options['soft'])) { - $this->log(0, "invalid package-info replacement: $a[to]"); - } - continue; - } - } - if (!is_null($to)) { - $subst_from[] = $a['from']; - $subst_to[] = $to; - } - } - - $this->log(3, "doing ".sizeof($subst_from)." substitution(s) for $final_dest_file"); - if (sizeof($subst_from)) { - $contents = str_replace($subst_from, $subst_to, $contents); - } - - $wp = @fopen($dest_file, "wb"); - if (!is_resource($wp)) { - return $this->raiseError("failed to create $dest_file: $php_errormsg", - PEAR_INSTALLER_FAILED); - } - - if (@fwrite($wp, $contents) === false) { - return $this->raiseError("failed writing to $dest_file: $php_errormsg", - PEAR_INSTALLER_FAILED); - } - - fclose($wp); - // }}} - } - - // {{{ check the md5 - if (isset($md5sum)) { - if (strtolower($md5sum) === strtolower($atts['md5sum'])) { - $this->log(2, "md5sum ok: $final_dest_file"); - } else { - if (empty($options['force'])) { - // delete the file - if (file_exists($dest_file)) { - unlink($dest_file); - } - - if (!isset($options['ignore-errors'])) { - return $this->raiseError("bad md5sum for file $final_dest_file", - PEAR_INSTALLER_FAILED); - } - - if (!isset($options['soft'])) { - $this->log(0, "warning : bad md5sum for file $final_dest_file"); - } - } else { - if (!isset($options['soft'])) { - $this->log(0, "warning : bad md5sum for file $final_dest_file"); - } - } - } - } - // }}} - // {{{ set file permissions - if (!OS_WINDOWS) { - if ($atts['role'] == 'script') { - $mode = 0777 & ~(int)octdec($this->config->get('umask')); - $this->log(3, "+ chmod +x $dest_file"); - } else { - $mode = 0666 & ~(int)octdec($this->config->get('umask')); - } - - if ($atts['role'] != 'src') { - $this->addFileOperation("chmod", array($mode, $dest_file)); - if (!@chmod($dest_file, $mode)) { - if (!isset($options['soft'])) { - $this->log(0, "failed to change mode of $dest_file: $php_errormsg"); - } - } - } - } - // }}} - - if ($atts['role'] == 'src') { - rename($dest_file, $final_dest_file); - $this->log(2, "renamed source file $dest_file to $final_dest_file"); - } else { - $this->addFileOperation("rename", array($dest_file, $final_dest_file, - $atts['role'] == 'ext')); - } - } - - // Store the full path where the file was installed for easy unistall - if ($atts['role'] != 'script') { - $loc = $this->config->get($atts['role'] . '_dir'); - } else { - $loc = $this->config->get('bin_dir'); - } - - if ($atts['role'] != 'src') { - $this->addFileOperation("installed_as", array($file, $installed_as, - $loc, - dirname(substr($installedas_dest_file, strlen($loc))))); - } - - //$this->log(2, "installed: $dest_file"); - return PEAR_INSTALLER_OK; - } - - // }}} - // {{{ _installFile2() - - /** - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @param string filename - * @param array attributes from tag in package.xml - * @param string path to install the file in - * @param array options from command-line - * @access private - */ - function _installFile2(&$pkg, $file, &$real_atts, $tmp_path, $options) - { - $atts = $real_atts; - if (!isset($this->_registry)) { - $this->_registry = &$this->config->getRegistry(); - } - - $channel = $pkg->getChannel(); - // {{{ assemble the destination paths - if (!in_array($atts['attribs']['role'], - PEAR_Installer_Role::getValidRoles($pkg->getPackageType()))) { - return $this->raiseError('Invalid role `' . $atts['attribs']['role'] . - "' for file $file"); - } - - $role = &PEAR_Installer_Role::factory($pkg, $atts['attribs']['role'], $this->config); - $err = $role->setup($this, $pkg, $atts['attribs'], $file); - if (PEAR::isError($err)) { - return $err; - } - - if (!$role->isInstallable()) { - return; - } - - $info = $role->processInstallation($pkg, $atts['attribs'], $file, $tmp_path); - if (PEAR::isError($info)) { - return $info; - } - - list($save_destdir, $dest_dir, $dest_file, $orig_file) = $info; - if (preg_match('~/\.\.(/|\\z)|^\.\./~', str_replace('\\', '/', $dest_file))) { - return $this->raiseError("SECURITY ERROR: file $file (installed to $dest_file) contains parent directory reference ..", PEAR_INSTALLER_FAILED); - } - - $final_dest_file = $installed_as = $dest_file; - if (isset($this->_options['packagingroot'])) { - $final_dest_file = $this->_prependPath($final_dest_file, - $this->_options['packagingroot']); - } - - $dest_dir = dirname($final_dest_file); - $dest_file = $dest_dir . DIRECTORY_SEPARATOR . '.tmp' . basename($final_dest_file); - // }}} - - if (empty($this->_options['register-only'])) { - if (!file_exists($dest_dir) || !is_dir($dest_dir)) { - if (!$this->mkDirHier($dest_dir)) { - return $this->raiseError("failed to mkdir $dest_dir", - PEAR_INSTALLER_FAILED); - } - $this->log(3, "+ mkdir $dest_dir"); - } - } - - $attribs = $atts['attribs']; - unset($atts['attribs']); - // pretty much nothing happens if we are only registering the install - if (empty($this->_options['register-only'])) { - if (!count($atts)) { // no tasks - if (!file_exists($orig_file)) { - return $this->raiseError("file $orig_file does not exist", - PEAR_INSTALLER_FAILED); - } - - if (!@copy($orig_file, $dest_file)) { - return $this->raiseError("failed to write $dest_file: $php_errormsg", - PEAR_INSTALLER_FAILED); - } - - $this->log(3, "+ cp $orig_file $dest_file"); - if (isset($attribs['md5sum'])) { - $md5sum = md5_file($dest_file); - } - } else { // file with tasks - if (!file_exists($orig_file)) { - return $this->raiseError("file $orig_file does not exist", - PEAR_INSTALLER_FAILED); - } - - $contents = file_get_contents($orig_file); - if ($contents === false) { - $contents = ''; - } - - if (isset($attribs['md5sum'])) { - $md5sum = md5($contents); - } - - foreach ($atts as $tag => $raw) { - $tag = str_replace(array($pkg->getTasksNs() . ':', '-'), array('', '_'), $tag); - $task = "PEAR_Task_$tag"; - $task = &new $task($this->config, $this, PEAR_TASK_INSTALL); - if (!$task->isScript()) { // scripts are only handled after installation - $task->init($raw, $attribs, $pkg->getLastInstalledVersion()); - $res = $task->startSession($pkg, $contents, $final_dest_file); - if ($res === false) { - continue; // skip this file - } - - if (PEAR::isError($res)) { - return $res; - } - - $contents = $res; // save changes - } - - $wp = @fopen($dest_file, "wb"); - if (!is_resource($wp)) { - return $this->raiseError("failed to create $dest_file: $php_errormsg", - PEAR_INSTALLER_FAILED); - } - - if (fwrite($wp, $contents) === false) { - return $this->raiseError("failed writing to $dest_file: $php_errormsg", - PEAR_INSTALLER_FAILED); - } - - fclose($wp); - } - } - - // {{{ check the md5 - if (isset($md5sum)) { - // Make sure the original md5 sum matches with expected - if (strtolower($md5sum) === strtolower($attribs['md5sum'])) { - $this->log(2, "md5sum ok: $final_dest_file"); - - if (isset($contents)) { - // set md5 sum based on $content in case any tasks were run. - $real_atts['attribs']['md5sum'] = md5($contents); - } - } else { - if (empty($options['force'])) { - // delete the file - if (file_exists($dest_file)) { - unlink($dest_file); - } - - if (!isset($options['ignore-errors'])) { - return $this->raiseError("bad md5sum for file $final_dest_file", - PEAR_INSTALLER_FAILED); - } - - if (!isset($options['soft'])) { - $this->log(0, "warning : bad md5sum for file $final_dest_file"); - } - } else { - if (!isset($options['soft'])) { - $this->log(0, "warning : bad md5sum for file $final_dest_file"); - } - } - } - } else { - $real_atts['attribs']['md5sum'] = md5_file($dest_file); - } - - // }}} - // {{{ set file permissions - if (!OS_WINDOWS) { - if ($role->isExecutable()) { - $mode = 0777 & ~(int)octdec($this->config->get('umask')); - $this->log(3, "+ chmod +x $dest_file"); - } else { - $mode = 0666 & ~(int)octdec($this->config->get('umask')); - } - - if ($attribs['role'] != 'src') { - $this->addFileOperation("chmod", array($mode, $dest_file)); - if (!@chmod($dest_file, $mode)) { - if (!isset($options['soft'])) { - $this->log(0, "failed to change mode of $dest_file: $php_errormsg"); - } - } - } - } - // }}} - - if ($attribs['role'] == 'src') { - rename($dest_file, $final_dest_file); - $this->log(2, "renamed source file $dest_file to $final_dest_file"); - } else { - $this->addFileOperation("rename", array($dest_file, $final_dest_file, $role->isExtension())); - } - } - - // Store the full path where the file was installed for easy uninstall - if ($attribs['role'] != 'src') { - $loc = $this->config->get($role->getLocationConfig(), null, $channel); - $this->addFileOperation('installed_as', array($file, $installed_as, - $loc, - dirname(substr($installed_as, strlen($loc))))); - } - - //$this->log(2, "installed: $dest_file"); - return PEAR_INSTALLER_OK; - } - - // }}} - // {{{ addFileOperation() - - /** - * Add a file operation to the current file transaction. - * - * @see startFileTransaction() - * @param string $type This can be one of: - * - rename: rename a file ($data has 3 values) - * - backup: backup an existing file ($data has 1 value) - * - removebackup: clean up backups created during install ($data has 1 value) - * - chmod: change permissions on a file ($data has 2 values) - * - delete: delete a file ($data has 1 value) - * - rmdir: delete a directory if empty ($data has 1 value) - * - installed_as: mark a file as installed ($data has 4 values). - * @param array $data For all file operations, this array must contain the - * full path to the file or directory that is being operated on. For - * the rename command, the first parameter must be the file to rename, - * the second its new name, the third whether this is a PHP extension. - * - * The installed_as operation contains 4 elements in this order: - * 1. Filename as listed in the filelist element from package.xml - * 2. Full path to the installed file - * 3. Full path from the php_dir configuration variable used in this - * installation - * 4. Relative path from the php_dir that this file is installed in - */ - function addFileOperation($type, $data) - { - if (!is_array($data)) { - return $this->raiseError('Internal Error: $data in addFileOperation' - . ' must be an array, was ' . gettype($data)); - } - - if ($type == 'chmod') { - $octmode = decoct($data[0]); - $this->log(3, "adding to transaction: $type $octmode $data[1]"); - } else { - $this->log(3, "adding to transaction: $type " . implode(" ", $data)); - } - $this->file_operations[] = array($type, $data); - } - - // }}} - // {{{ startFileTransaction() - - function startFileTransaction($rollback_in_case = false) - { - if (count($this->file_operations) && $rollback_in_case) { - $this->rollbackFileTransaction(); - } - $this->file_operations = array(); - } - - // }}} - // {{{ commitFileTransaction() - - function commitFileTransaction() - { - // {{{ first, check permissions and such manually - $errors = array(); - foreach ($this->file_operations as $key => $tr) { - list($type, $data) = $tr; - switch ($type) { - case 'rename': - if (!file_exists($data[0])) { - $errors[] = "cannot rename file $data[0], doesn't exist"; - } - - // check that dest dir. is writable - if (!is_writable(dirname($data[1]))) { - $errors[] = "permission denied ($type): $data[1]"; - } - break; - case 'chmod': - // check that file is writable - if (!is_writable($data[1])) { - $errors[] = "permission denied ($type): $data[1] " . decoct($data[0]); - } - break; - case 'delete': - if (!file_exists($data[0])) { - $this->log(2, "warning: file $data[0] doesn't exist, can't be deleted"); - } - // check that directory is writable - if (file_exists($data[0])) { - if (!is_writable(dirname($data[0]))) { - $errors[] = "permission denied ($type): $data[0]"; - } else { - // make sure the file to be deleted can be opened for writing - $fp = false; - if (!is_dir($data[0]) && - (!is_writable($data[0]) || !($fp = @fopen($data[0], 'a')))) { - $errors[] = "permission denied ($type): $data[0]"; - } elseif ($fp) { - fclose($fp); - } - } - - /* Verify we are not deleting a file owned by another package - * This can happen when a file moves from package A to B in - * an upgrade ala http://pear.php.net/17986 - */ - $info = array( - 'package' => strtolower($this->pkginfo->getName()), - 'channel' => strtolower($this->pkginfo->getChannel()), - ); - $result = $this->_registry->checkFileMap($data[0], $info, '1.1'); - if (is_array($result)) { - $res = array_diff($result, $info); - if (!empty($res)) { - $new = $this->_registry->getPackage($result[1], $result[0]); - $this->file_operations[$key] = false; - $this->log(3, "file $data[0] was scheduled for removal from {$this->pkginfo->getName()} but is owned by {$new->getChannel()}/{$new->getName()}, removal has been cancelled."); - } - } - } - break; - } - - } - // }}} - - $n = count($this->file_operations); - $this->log(2, "about to commit $n file operations for " . $this->pkginfo->getName()); - - $m = count($errors); - if ($m > 0) { - foreach ($errors as $error) { - if (!isset($this->_options['soft'])) { - $this->log(1, $error); - } - } - - if (!isset($this->_options['ignore-errors'])) { - return false; - } - } - - $this->_dirtree = array(); - // {{{ really commit the transaction - foreach ($this->file_operations as $i => $tr) { - if (!$tr) { - // support removal of non-existing backups - continue; - } - - list($type, $data) = $tr; - switch ($type) { - case 'backup': - if (!file_exists($data[0])) { - $this->file_operations[$i] = false; - break; - } - - if (!@copy($data[0], $data[0] . '.bak')) { - $this->log(1, 'Could not copy ' . $data[0] . ' to ' . $data[0] . - '.bak ' . $php_errormsg); - return false; - } - $this->log(3, "+ backup $data[0] to $data[0].bak"); - break; - case 'removebackup': - if (file_exists($data[0] . '.bak') && is_writable($data[0] . '.bak')) { - unlink($data[0] . '.bak'); - $this->log(3, "+ rm backup of $data[0] ($data[0].bak)"); - } - break; - case 'rename': - $test = file_exists($data[1]) ? @unlink($data[1]) : null; - if (!$test && file_exists($data[1])) { - if ($data[2]) { - $extra = ', this extension must be installed manually. Rename to "' . - basename($data[1]) . '"'; - } else { - $extra = ''; - } - - if (!isset($this->_options['soft'])) { - $this->log(1, 'Could not delete ' . $data[1] . ', cannot rename ' . - $data[0] . $extra); - } - - if (!isset($this->_options['ignore-errors'])) { - return false; - } - } - - // permissions issues with rename - copy() is far superior - $perms = @fileperms($data[0]); - if (!@copy($data[0], $data[1])) { - $this->log(1, 'Could not rename ' . $data[0] . ' to ' . $data[1] . - ' ' . $php_errormsg); - return false; - } - - // copy over permissions, otherwise they are lost - @chmod($data[1], $perms); - @unlink($data[0]); - $this->log(3, "+ mv $data[0] $data[1]"); - break; - case 'chmod': - if (!@chmod($data[1], $data[0])) { - $this->log(1, 'Could not chmod ' . $data[1] . ' to ' . - decoct($data[0]) . ' ' . $php_errormsg); - return false; - } - - $octmode = decoct($data[0]); - $this->log(3, "+ chmod $octmode $data[1]"); - break; - case 'delete': - if (file_exists($data[0])) { - if (!@unlink($data[0])) { - $this->log(1, 'Could not delete ' . $data[0] . ' ' . - $php_errormsg); - return false; - } - $this->log(3, "+ rm $data[0]"); - } - break; - case 'rmdir': - if (file_exists($data[0])) { - do { - $testme = opendir($data[0]); - while (false !== ($entry = readdir($testme))) { - if ($entry == '.' || $entry == '..') { - continue; - } - closedir($testme); - break 2; // this directory is not empty and can't be - // deleted - } - - closedir($testme); - if (!@rmdir($data[0])) { - $this->log(1, 'Could not rmdir ' . $data[0] . ' ' . - $php_errormsg); - return false; - } - $this->log(3, "+ rmdir $data[0]"); - } while (false); - } - break; - case 'installed_as': - $this->pkginfo->setInstalledAs($data[0], $data[1]); - if (!isset($this->_dirtree[dirname($data[1])])) { - $this->_dirtree[dirname($data[1])] = true; - $this->pkginfo->setDirtree(dirname($data[1])); - - while(!empty($data[3]) && dirname($data[3]) != $data[3] && - $data[3] != '/' && $data[3] != '\\') { - $this->pkginfo->setDirtree($pp = - $this->_prependPath($data[3], $data[2])); - $this->_dirtree[$pp] = true; - $data[3] = dirname($data[3]); - } - } - break; - } - } - // }}} - $this->log(2, "successfully committed $n file operations"); - $this->file_operations = array(); - return true; - } - - // }}} - // {{{ rollbackFileTransaction() - - function rollbackFileTransaction() - { - $n = count($this->file_operations); - $this->log(2, "rolling back $n file operations"); - foreach ($this->file_operations as $tr) { - list($type, $data) = $tr; - switch ($type) { - case 'backup': - if (file_exists($data[0] . '.bak')) { - if (file_exists($data[0] && is_writable($data[0]))) { - unlink($data[0]); - } - @copy($data[0] . '.bak', $data[0]); - $this->log(3, "+ restore $data[0] from $data[0].bak"); - } - break; - case 'removebackup': - if (file_exists($data[0] . '.bak') && is_writable($data[0] . '.bak')) { - unlink($data[0] . '.bak'); - $this->log(3, "+ rm backup of $data[0] ($data[0].bak)"); - } - break; - case 'rename': - @unlink($data[0]); - $this->log(3, "+ rm $data[0]"); - break; - case 'mkdir': - @rmdir($data[0]); - $this->log(3, "+ rmdir $data[0]"); - break; - case 'chmod': - break; - case 'delete': - break; - case 'installed_as': - $this->pkginfo->setInstalledAs($data[0], false); - break; - } - } - $this->pkginfo->resetDirtree(); - $this->file_operations = array(); - } - - // }}} - // {{{ mkDirHier($dir) - - function mkDirHier($dir) - { - $this->addFileOperation('mkdir', array($dir)); - return parent::mkDirHier($dir); - } - - // }}} - // {{{ download() - - /** - * Download any files and their dependencies, if necessary - * - * @param array a mixed list of package names, local files, or package.xml - * @param PEAR_Config - * @param array options from the command line - * @param array this is the array that will be populated with packages to - * install. Format of each entry: - * - * - * array('pkg' => 'package_name', 'file' => '/path/to/local/file', - * 'info' => array() // parsed package.xml - * ); - * - * @param array this will be populated with any error messages - * @param false private recursion variable - * @param false private recursion variable - * @param false private recursion variable - * @deprecated in favor of PEAR_Downloader - */ - function download($packages, $options, &$config, &$installpackages, - &$errors, $installed = false, $willinstall = false, $state = false) - { - // trickiness: initialize here - parent::PEAR_Downloader($this->ui, $options, $config); - $ret = parent::download($packages); - $errors = $this->getErrorMsgs(); - $installpackages = $this->getDownloadedPackages(); - trigger_error("PEAR Warning: PEAR_Installer::download() is deprecated " . - "in favor of PEAR_Downloader class", E_USER_WARNING); - return $ret; - } - - // }}} - // {{{ _parsePackageXml() - - function _parsePackageXml(&$descfile) - { - // Parse xml file ----------------------------------------------- - $pkg = new PEAR_PackageFile($this->config, $this->debug); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $p = &$pkg->fromAnyFile($descfile, PEAR_VALIDATE_INSTALLING); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($p)) { - if (is_array($p->getUserInfo())) { - foreach ($p->getUserInfo() as $err) { - $loglevel = $err['level'] == 'error' ? 0 : 1; - if (!isset($this->_options['soft'])) { - $this->log($loglevel, ucfirst($err['level']) . ': ' . $err['message']); - } - } - } - return $this->raiseError('Installation failed: invalid package file'); - } - - $descfile = $p->getPackageFile(); - return $p; - } - - // }}} - /** - * Set the list of PEAR_Downloader_Package objects to allow more sane - * dependency validation - * @param array - */ - function setDownloadedPackages(&$pkgs) - { - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $err = $this->analyzeDependencies($pkgs); - PEAR::popErrorHandling(); - if (PEAR::isError($err)) { - return $err; - } - $this->_downloadedPackages = &$pkgs; - } - - /** - * Set the list of PEAR_Downloader_Package objects to allow more sane - * dependency validation - * @param array - */ - function setUninstallPackages(&$pkgs) - { - $this->_downloadedPackages = &$pkgs; - } - - function getInstallPackages() - { - return $this->_downloadedPackages; - } - - // {{{ install() - - /** - * Installs the files within the package file specified. - * - * @param string|PEAR_Downloader_Package $pkgfile path to the package file, - * or a pre-initialized packagefile object - * @param array $options - * recognized options: - * - installroot : optional prefix directory for installation - * - force : force installation - * - register-only : update registry but don't install files - * - upgrade : upgrade existing install - * - soft : fail silently - * - nodeps : ignore dependency conflicts/missing dependencies - * - alldeps : install all dependencies - * - onlyreqdeps : install only required dependencies - * - * @return array|PEAR_Error package info if successful - */ - function install($pkgfile, $options = array()) - { - $this->_options = $options; - $this->_registry = &$this->config->getRegistry(); - if (is_object($pkgfile)) { - $dlpkg = &$pkgfile; - $pkg = $pkgfile->getPackageFile(); - $pkgfile = $pkg->getArchiveFile(); - $descfile = $pkg->getPackageFile(); - } else { - $descfile = $pkgfile; - $pkg = $this->_parsePackageXml($descfile); - if (PEAR::isError($pkg)) { - return $pkg; - } - } - - $tmpdir = dirname($descfile); - if (realpath($descfile) != realpath($pkgfile)) { - // Use the temp_dir since $descfile can contain the download dir path - $tmpdir = $this->config->get('temp_dir', null, 'pear.php.net'); - $tmpdir = System::mktemp('-d -t "' . $tmpdir . '"'); - - $tar = new Archive_Tar($pkgfile); - if (!$tar->extract($tmpdir)) { - return $this->raiseError("unable to unpack $pkgfile"); - } - } - - $pkgname = $pkg->getName(); - $channel = $pkg->getChannel(); - if (isset($this->_options['packagingroot'])) { - $regdir = $this->_prependPath( - $this->config->get('php_dir', null, 'pear.php.net'), - $this->_options['packagingroot']); - - $packrootphp_dir = $this->_prependPath( - $this->config->get('php_dir', null, $channel), - $this->_options['packagingroot']); - } - - if (isset($options['installroot'])) { - $this->config->setInstallRoot($options['installroot']); - $this->_registry = &$this->config->getRegistry(); - $installregistry = &$this->_registry; - $this->installroot = ''; // all done automagically now - $php_dir = $this->config->get('php_dir', null, $channel); - } else { - $this->config->setInstallRoot(false); - $this->_registry = &$this->config->getRegistry(); - if (isset($this->_options['packagingroot'])) { - $installregistry = &new PEAR_Registry($regdir); - if (!$installregistry->channelExists($channel, true)) { - // we need to fake a channel-discover of this channel - $chanobj = $this->_registry->getChannel($channel, true); - $installregistry->addChannel($chanobj); - } - $php_dir = $packrootphp_dir; - } else { - $installregistry = &$this->_registry; - $php_dir = $this->config->get('php_dir', null, $channel); - } - $this->installroot = ''; - } - - // {{{ checks to do when not in "force" mode - if (empty($options['force']) && - (file_exists($this->config->get('php_dir')) && - is_dir($this->config->get('php_dir')))) { - $testp = $channel == 'pear.php.net' ? $pkgname : array($channel, $pkgname); - $instfilelist = $pkg->getInstallationFileList(true); - if (PEAR::isError($instfilelist)) { - return $instfilelist; - } - - // ensure we have the most accurate registry - $installregistry->flushFileMap(); - $test = $installregistry->checkFileMap($instfilelist, $testp, '1.1'); - if (PEAR::isError($test)) { - return $test; - } - - if (sizeof($test)) { - $pkgs = $this->getInstallPackages(); - $found = false; - foreach ($pkgs as $param) { - if ($pkg->isSubpackageOf($param)) { - $found = true; - break; - } - } - - if ($found) { - // subpackages can conflict with earlier versions of parent packages - $parentreg = $installregistry->packageInfo($param->getPackage(), null, $param->getChannel()); - $tmp = $test; - foreach ($tmp as $file => $info) { - if (is_array($info)) { - if (strtolower($info[1]) == strtolower($param->getPackage()) && - strtolower($info[0]) == strtolower($param->getChannel()) - ) { - if (isset($parentreg['filelist'][$file])) { - unset($parentreg['filelist'][$file]); - } else{ - $pos = strpos($file, '/'); - $basedir = substr($file, 0, $pos); - $file2 = substr($file, $pos + 1); - if (isset($parentreg['filelist'][$file2]['baseinstalldir']) - && $parentreg['filelist'][$file2]['baseinstalldir'] === $basedir - ) { - unset($parentreg['filelist'][$file2]); - } - } - - unset($test[$file]); - } - } else { - if (strtolower($param->getChannel()) != 'pear.php.net') { - continue; - } - - if (strtolower($info) == strtolower($param->getPackage())) { - if (isset($parentreg['filelist'][$file])) { - unset($parentreg['filelist'][$file]); - } else{ - $pos = strpos($file, '/'); - $basedir = substr($file, 0, $pos); - $file2 = substr($file, $pos + 1); - if (isset($parentreg['filelist'][$file2]['baseinstalldir']) - && $parentreg['filelist'][$file2]['baseinstalldir'] === $basedir - ) { - unset($parentreg['filelist'][$file2]); - } - } - - unset($test[$file]); - } - } - } - - $pfk = &new PEAR_PackageFile($this->config); - $parentpkg = &$pfk->fromArray($parentreg); - $installregistry->updatePackage2($parentpkg); - } - - if ($param->getChannel() == 'pecl.php.net' && isset($options['upgrade'])) { - $tmp = $test; - foreach ($tmp as $file => $info) { - if (is_string($info)) { - // pear.php.net packages are always stored as strings - if (strtolower($info) == strtolower($param->getPackage())) { - // upgrading existing package - unset($test[$file]); - } - } - } - } - - if (count($test)) { - $msg = "$channel/$pkgname: conflicting files found:\n"; - $longest = max(array_map("strlen", array_keys($test))); - $fmt = "%${longest}s (%s)\n"; - foreach ($test as $file => $info) { - if (!is_array($info)) { - $info = array('pear.php.net', $info); - } - $info = $info[0] . '/' . $info[1]; - $msg .= sprintf($fmt, $file, $info); - } - - if (!isset($options['ignore-errors'])) { - return $this->raiseError($msg); - } - - if (!isset($options['soft'])) { - $this->log(0, "WARNING: $msg"); - } - } - } - } - // }}} - - $this->startFileTransaction(); - - $usechannel = $channel; - if ($channel == 'pecl.php.net') { - $test = $installregistry->packageExists($pkgname, $channel); - if (!$test) { - $test = $installregistry->packageExists($pkgname, 'pear.php.net'); - $usechannel = 'pear.php.net'; - } - } else { - $test = $installregistry->packageExists($pkgname, $channel); - } - - if (empty($options['upgrade']) && empty($options['soft'])) { - // checks to do only when installing new packages - if (empty($options['force']) && $test) { - return $this->raiseError("$channel/$pkgname is already installed"); - } - } else { - // Upgrade - if ($test) { - $v1 = $installregistry->packageInfo($pkgname, 'version', $usechannel); - $v2 = $pkg->getVersion(); - $cmp = version_compare("$v1", "$v2", 'gt'); - if (empty($options['force']) && !version_compare("$v2", "$v1", 'gt')) { - return $this->raiseError("upgrade to a newer version ($v2 is not newer than $v1)"); - } - } - } - - // Do cleanups for upgrade and install, remove old release's files first - if ($test && empty($options['register-only'])) { - // when upgrading, remove old release's files first: - if (PEAR::isError($err = $this->_deletePackageFiles($pkgname, $usechannel, - true))) { - if (!isset($options['ignore-errors'])) { - return $this->raiseError($err); - } - - if (!isset($options['soft'])) { - $this->log(0, 'WARNING: ' . $err->getMessage()); - } - } else { - $backedup = $err; - } - } - - // {{{ Copy files to dest dir --------------------------------------- - - // info from the package it self we want to access from _installFile - $this->pkginfo = &$pkg; - // used to determine whether we should build any C code - $this->source_files = 0; - - $savechannel = $this->config->get('default_channel'); - if (empty($options['register-only']) && !is_dir($php_dir)) { - if (PEAR::isError(System::mkdir(array('-p'), $php_dir))) { - return $this->raiseError("no installation destination directory '$php_dir'\n"); - } - } - - if (substr($pkgfile, -4) != '.xml') { - $tmpdir .= DIRECTORY_SEPARATOR . $pkgname . '-' . $pkg->getVersion(); - } - - $this->configSet('default_channel', $channel); - // {{{ install files - - $ver = $pkg->getPackagexmlVersion(); - if (version_compare($ver, '2.0', '>=')) { - $filelist = $pkg->getInstallationFilelist(); - } else { - $filelist = $pkg->getFileList(); - } - - if (PEAR::isError($filelist)) { - return $filelist; - } - - $p = &$installregistry->getPackage($pkgname, $channel); - $dirtree = (empty($options['register-only']) && $p) ? $p->getDirTree() : false; - - $pkg->resetFilelist(); - $pkg->setLastInstalledVersion($installregistry->packageInfo($pkg->getPackage(), - 'version', $pkg->getChannel())); - foreach ($filelist as $file => $atts) { - $this->expectError(PEAR_INSTALLER_FAILED); - if ($pkg->getPackagexmlVersion() == '1.0') { - $res = $this->_installFile($file, $atts, $tmpdir, $options); - } else { - $res = $this->_installFile2($pkg, $file, $atts, $tmpdir, $options); - } - $this->popExpect(); - - if (PEAR::isError($res)) { - if (empty($options['ignore-errors'])) { - $this->rollbackFileTransaction(); - if ($res->getMessage() == "file does not exist") { - $this->raiseError("file $file in package.xml does not exist"); - } - - return $this->raiseError($res); - } - - if (!isset($options['soft'])) { - $this->log(0, "Warning: " . $res->getMessage()); - } - } - - $real = isset($atts['attribs']) ? $atts['attribs'] : $atts; - if ($res == PEAR_INSTALLER_OK && $real['role'] != 'src') { - // Register files that were installed - $pkg->installedFile($file, $atts); - } - } - // }}} - - // {{{ compile and install source files - if ($this->source_files > 0 && empty($options['nobuild'])) { - if (PEAR::isError($err = - $this->_compileSourceFiles($savechannel, $pkg))) { - return $err; - } - } - // }}} - - if (isset($backedup)) { - $this->_removeBackups($backedup); - } - - if (!$this->commitFileTransaction()) { - $this->rollbackFileTransaction(); - $this->configSet('default_channel', $savechannel); - return $this->raiseError("commit failed", PEAR_INSTALLER_FAILED); - } - // }}} - - $ret = false; - $installphase = 'install'; - $oldversion = false; - // {{{ Register that the package is installed ----------------------- - if (empty($options['upgrade'])) { - // if 'force' is used, replace the info in registry - $usechannel = $channel; - if ($channel == 'pecl.php.net') { - $test = $installregistry->packageExists($pkgname, $channel); - if (!$test) { - $test = $installregistry->packageExists($pkgname, 'pear.php.net'); - $usechannel = 'pear.php.net'; - } - } else { - $test = $installregistry->packageExists($pkgname, $channel); - } - - if (!empty($options['force']) && $test) { - $oldversion = $installregistry->packageInfo($pkgname, 'version', $usechannel); - $installregistry->deletePackage($pkgname, $usechannel); - } - $ret = $installregistry->addPackage2($pkg); - } else { - if ($dirtree) { - $this->startFileTransaction(); - // attempt to delete empty directories - uksort($dirtree, array($this, '_sortDirs')); - foreach($dirtree as $dir => $notused) { - $this->addFileOperation('rmdir', array($dir)); - } - $this->commitFileTransaction(); - } - - $usechannel = $channel; - if ($channel == 'pecl.php.net') { - $test = $installregistry->packageExists($pkgname, $channel); - if (!$test) { - $test = $installregistry->packageExists($pkgname, 'pear.php.net'); - $usechannel = 'pear.php.net'; - } - } else { - $test = $installregistry->packageExists($pkgname, $channel); - } - - // new: upgrade installs a package if it isn't installed - if (!$test) { - $ret = $installregistry->addPackage2($pkg); - } else { - if ($usechannel != $channel) { - $installregistry->deletePackage($pkgname, $usechannel); - $ret = $installregistry->addPackage2($pkg); - } else { - $ret = $installregistry->updatePackage2($pkg); - } - $installphase = 'upgrade'; - } - } - - if (!$ret) { - $this->configSet('default_channel', $savechannel); - return $this->raiseError("Adding package $channel/$pkgname to registry failed"); - } - // }}} - - $this->configSet('default_channel', $savechannel); - if (class_exists('PEAR_Task_Common')) { // this is auto-included if any tasks exist - if (PEAR_Task_Common::hasPostinstallTasks()) { - PEAR_Task_Common::runPostinstallTasks($installphase); - } - } - - return $pkg->toArray(true); - } - - // }}} - - // {{{ _compileSourceFiles() - /** - * @param string - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - */ - function _compileSourceFiles($savechannel, &$filelist) - { - require_once 'PEAR/Builder.php'; - $this->log(1, "$this->source_files source files, building"); - $bob = &new PEAR_Builder($this->ui); - $bob->debug = $this->debug; - $built = $bob->build($filelist, array(&$this, '_buildCallback')); - if (PEAR::isError($built)) { - $this->rollbackFileTransaction(); - $this->configSet('default_channel', $savechannel); - return $built; - } - - $this->log(1, "\nBuild process completed successfully"); - foreach ($built as $ext) { - $bn = basename($ext['file']); - list($_ext_name, $_ext_suff) = explode('.', $bn); - if ($_ext_suff == '.so' || $_ext_suff == '.dll') { - if (extension_loaded($_ext_name)) { - $this->raiseError("Extension '$_ext_name' already loaded. " . - 'Please unload it in your php.ini file ' . - 'prior to install or upgrade'); - } - $role = 'ext'; - } else { - $role = 'src'; - } - - $dest = $ext['dest']; - $packagingroot = ''; - if (isset($this->_options['packagingroot'])) { - $packagingroot = $this->_options['packagingroot']; - } - - $copyto = $this->_prependPath($dest, $packagingroot); - $extra = $copyto != $dest ? " as '$copyto'" : ''; - $this->log(1, "Installing '$dest'$extra"); - - $copydir = dirname($copyto); - // pretty much nothing happens if we are only registering the install - if (empty($this->_options['register-only'])) { - if (!file_exists($copydir) || !is_dir($copydir)) { - if (!$this->mkDirHier($copydir)) { - return $this->raiseError("failed to mkdir $copydir", - PEAR_INSTALLER_FAILED); - } - - $this->log(3, "+ mkdir $copydir"); - } - - if (!@copy($ext['file'], $copyto)) { - return $this->raiseError("failed to write $copyto ($php_errormsg)", PEAR_INSTALLER_FAILED); - } - - $this->log(3, "+ cp $ext[file] $copyto"); - $this->addFileOperation('rename', array($ext['file'], $copyto)); - if (!OS_WINDOWS) { - $mode = 0666 & ~(int)octdec($this->config->get('umask')); - $this->addFileOperation('chmod', array($mode, $copyto)); - if (!@chmod($copyto, $mode)) { - $this->log(0, "failed to change mode of $copyto ($php_errormsg)"); - } - } - } - - - $data = array( - 'role' => $role, - 'name' => $bn, - 'installed_as' => $dest, - 'php_api' => $ext['php_api'], - 'zend_mod_api' => $ext['zend_mod_api'], - 'zend_ext_api' => $ext['zend_ext_api'], - ); - - if ($filelist->getPackageXmlVersion() == '1.0') { - $filelist->installedFile($bn, $data); - } else { - $filelist->installedFile($bn, array('attribs' => $data)); - } - } - } - - // }}} - function &getUninstallPackages() - { - return $this->_downloadedPackages; - } - // {{{ uninstall() - - /** - * Uninstall a package - * - * This method removes all files installed by the application, and then - * removes any empty directories. - * @param string package name - * @param array Command-line options. Possibilities include: - * - * - installroot: base installation dir, if not the default - * - register-only : update registry but don't remove files - * - nodeps: do not process dependencies of other packages to ensure - * uninstallation does not break things - */ - function uninstall($package, $options = array()) - { - $installRoot = isset($options['installroot']) ? $options['installroot'] : ''; - $this->config->setInstallRoot($installRoot); - - $this->installroot = ''; - $this->_registry = &$this->config->getRegistry(); - if (is_object($package)) { - $channel = $package->getChannel(); - $pkg = $package; - $package = $pkg->getPackage(); - } else { - $pkg = false; - $info = $this->_registry->parsePackageName($package, - $this->config->get('default_channel')); - $channel = $info['channel']; - $package = $info['package']; - } - - $savechannel = $this->config->get('default_channel'); - $this->configSet('default_channel', $channel); - if (!is_object($pkg)) { - $pkg = $this->_registry->getPackage($package, $channel); - } - - if (!$pkg) { - $this->configSet('default_channel', $savechannel); - return $this->raiseError($this->_registry->parsedPackageNameToString( - array( - 'channel' => $channel, - 'package' => $package - ), true) . ' not installed'); - } - - if ($pkg->getInstalledBinary()) { - // this is just an alias for a binary package - return $this->_registry->deletePackage($package, $channel); - } - - $filelist = $pkg->getFilelist(); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - if (!class_exists('PEAR_Dependency2')) { - require_once 'PEAR/Dependency2.php'; - } - - $depchecker = &new PEAR_Dependency2($this->config, $options, - array('channel' => $channel, 'package' => $package), - PEAR_VALIDATE_UNINSTALLING); - $e = $depchecker->validatePackageUninstall($this); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($e)) { - if (!isset($options['ignore-errors'])) { - return $this->raiseError($e); - } - - if (!isset($options['soft'])) { - $this->log(0, 'WARNING: ' . $e->getMessage()); - } - } elseif (is_array($e)) { - if (!isset($options['soft'])) { - $this->log(0, $e[0]); - } - } - - $this->pkginfo = &$pkg; - // pretty much nothing happens if we are only registering the uninstall - if (empty($options['register-only'])) { - // {{{ Delete the files - $this->startFileTransaction(); - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - if (PEAR::isError($err = $this->_deletePackageFiles($package, $channel))) { - PEAR::popErrorHandling(); - $this->rollbackFileTransaction(); - $this->configSet('default_channel', $savechannel); - if (!isset($options['ignore-errors'])) { - return $this->raiseError($err); - } - - if (!isset($options['soft'])) { - $this->log(0, 'WARNING: ' . $err->getMessage()); - } - } else { - PEAR::popErrorHandling(); - } - - if (!$this->commitFileTransaction()) { - $this->rollbackFileTransaction(); - if (!isset($options['ignore-errors'])) { - return $this->raiseError("uninstall failed"); - } - - if (!isset($options['soft'])) { - $this->log(0, 'WARNING: uninstall failed'); - } - } else { - $this->startFileTransaction(); - $dirtree = $pkg->getDirTree(); - if ($dirtree === false) { - $this->configSet('default_channel', $savechannel); - return $this->_registry->deletePackage($package, $channel); - } - - // attempt to delete empty directories - uksort($dirtree, array($this, '_sortDirs')); - foreach($dirtree as $dir => $notused) { - $this->addFileOperation('rmdir', array($dir)); - } - - if (!$this->commitFileTransaction()) { - $this->rollbackFileTransaction(); - if (!isset($options['ignore-errors'])) { - return $this->raiseError("uninstall failed"); - } - - if (!isset($options['soft'])) { - $this->log(0, 'WARNING: uninstall failed'); - } - } - } - // }}} - } - - $this->configSet('default_channel', $savechannel); - // Register that the package is no longer installed - return $this->_registry->deletePackage($package, $channel); - } - - /** - * Sort a list of arrays of array(downloaded packagefilename) by dependency. - * - * It also removes duplicate dependencies - * @param array an array of PEAR_PackageFile_v[1/2] objects - * @return array|PEAR_Error array of array(packagefilename, package.xml contents) - */ - function sortPackagesForUninstall(&$packages) - { - $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->config); - if (PEAR::isError($this->_dependencyDB)) { - return $this->_dependencyDB; - } - usort($packages, array(&$this, '_sortUninstall')); - } - - function _sortUninstall($a, $b) - { - if (!$a->getDeps() && !$b->getDeps()) { - return 0; // neither package has dependencies, order is insignificant - } - if ($a->getDeps() && !$b->getDeps()) { - return -1; // $a must be installed after $b because $a has dependencies - } - if (!$a->getDeps() && $b->getDeps()) { - return 1; // $b must be installed after $a because $b has dependencies - } - // both packages have dependencies - if ($this->_dependencyDB->dependsOn($a, $b)) { - return -1; - } - if ($this->_dependencyDB->dependsOn($b, $a)) { - return 1; - } - return 0; - } - - // }}} - // {{{ _sortDirs() - function _sortDirs($a, $b) - { - if (strnatcmp($a, $b) == -1) return 1; - if (strnatcmp($a, $b) == 1) return -1; - return 0; - } - - // }}} - - // {{{ _buildCallback() - - function _buildCallback($what, $data) - { - if (($what == 'cmdoutput' && $this->debug > 1) || - ($what == 'output' && $this->debug > 0)) { - $this->ui->outputData(rtrim($data), 'build'); - } - } - - // }}} -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role.php b/_piecrust/libs/PEAR/Installer/Role.php deleted file mode 100644 index 0c50fa7..0000000 --- a/_piecrust/libs/PEAR/Installer/Role.php +++ /dev/null @@ -1,276 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Role.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * base class for installer roles - */ -require_once 'PEAR/Installer/Role/Common.php'; -require_once 'PEAR/XMLParser.php'; -/** - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Installer_Role -{ - /** - * Set up any additional configuration variables that file roles require - * - * Never call this directly, it is called by the PEAR_Config constructor - * @param PEAR_Config - * @access private - * @static - */ - function initializeConfig(&$config) - { - if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { - PEAR_Installer_Role::registerRoles(); - } - - foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $class => $info) { - if (!$info['config_vars']) { - continue; - } - - $config->_addConfigVars($class, $info['config_vars']); - } - } - - /** - * @param PEAR_PackageFile_v2 - * @param string role name - * @param PEAR_Config - * @return PEAR_Installer_Role_Common - * @static - */ - function &factory($pkg, $role, &$config) - { - if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { - PEAR_Installer_Role::registerRoles(); - } - - if (!in_array($role, PEAR_Installer_Role::getValidRoles($pkg->getPackageType()))) { - $a = false; - return $a; - } - - $a = 'PEAR_Installer_Role_' . ucfirst($role); - if (!class_exists($a)) { - require_once str_replace('_', '/', $a) . '.php'; - } - - $b = new $a($config); - return $b; - } - - /** - * Get a list of file roles that are valid for the particular release type. - * - * For instance, src files serve no purpose in regular php releases. - * @param string - * @param bool clear cache - * @return array - * @static - */ - function getValidRoles($release, $clear = false) - { - if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { - PEAR_Installer_Role::registerRoles(); - } - - static $ret = array(); - if ($clear) { - $ret = array(); - } - - if (isset($ret[$release])) { - return $ret[$release]; - } - - $ret[$release] = array(); - foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) { - if (in_array($release, $okreleases['releasetypes'])) { - $ret[$release][] = strtolower(str_replace('PEAR_Installer_Role_', '', $role)); - } - } - - return $ret[$release]; - } - - /** - * Get a list of roles that require their files to be installed - * - * Most roles must be installed, but src and package roles, for instance - * are pseudo-roles. src files are compiled into a new extension. Package - * roles are actually fully bundled releases of a package - * @param bool clear cache - * @return array - * @static - */ - function getInstallableRoles($clear = false) - { - if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { - PEAR_Installer_Role::registerRoles(); - } - - static $ret; - if ($clear) { - unset($ret); - } - - if (isset($ret)) { - return $ret; - } - - $ret = array(); - foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) { - if ($okreleases['installable']) { - $ret[] = strtolower(str_replace('PEAR_Installer_Role_', '', $role)); - } - } - - return $ret; - } - - /** - * Return an array of roles that are affected by the baseinstalldir attribute - * - * Most roles ignore this attribute, and instead install directly into: - * PackageName/filepath - * so a tests file tests/file.phpt is installed into PackageName/tests/filepath.php - * @param bool clear cache - * @return array - * @static - */ - function getBaseinstallRoles($clear = false) - { - if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { - PEAR_Installer_Role::registerRoles(); - } - - static $ret; - if ($clear) { - unset($ret); - } - - if (isset($ret)) { - return $ret; - } - - $ret = array(); - foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) { - if ($okreleases['honorsbaseinstall']) { - $ret[] = strtolower(str_replace('PEAR_Installer_Role_', '', $role)); - } - } - - return $ret; - } - - /** - * Return an array of file roles that should be analyzed for PHP content at package time, - * like the "php" role. - * @param bool clear cache - * @return array - * @static - */ - function getPhpRoles($clear = false) - { - if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) { - PEAR_Installer_Role::registerRoles(); - } - - static $ret; - if ($clear) { - unset($ret); - } - - if (isset($ret)) { - return $ret; - } - - $ret = array(); - foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) { - if ($okreleases['phpfile']) { - $ret[] = strtolower(str_replace('PEAR_Installer_Role_', '', $role)); - } - } - - return $ret; - } - - /** - * Scan through the Command directory looking for classes - * and see what commands they implement. - * @param string which directory to look for classes, defaults to - * the Installer/Roles subdirectory of - * the directory from where this file (__FILE__) is - * included. - * - * @return bool TRUE on success, a PEAR error on failure - * @access public - * @static - */ - function registerRoles($dir = null) - { - $GLOBALS['_PEAR_INSTALLER_ROLES'] = array(); - $parser = new PEAR_XMLParser; - if ($dir === null) { - $dir = dirname(__FILE__) . '/Role'; - } - - if (!file_exists($dir) || !is_dir($dir)) { - return PEAR::raiseError("registerRoles: opendir($dir) failed: does not exist/is not directory"); - } - - $dp = @opendir($dir); - if (empty($dp)) { - return PEAR::raiseError("registerRoles: opendir($dir) failed: $php_errmsg"); - } - - while ($entry = readdir($dp)) { - if ($entry{0} == '.' || substr($entry, -4) != '.xml') { - continue; - } - - $class = "PEAR_Installer_Role_".substr($entry, 0, -4); - // List of roles - if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'][$class])) { - $file = "$dir/$entry"; - $parser->parse(file_get_contents($file)); - $data = $parser->getData(); - if (!is_array($data['releasetypes'])) { - $data['releasetypes'] = array($data['releasetypes']); - } - - $GLOBALS['_PEAR_INSTALLER_ROLES'][$class] = $data; - } - } - - closedir($dp); - ksort($GLOBALS['_PEAR_INSTALLER_ROLES']); - PEAR_Installer_Role::getBaseinstallRoles(true); - PEAR_Installer_Role::getInstallableRoles(true); - PEAR_Installer_Role::getPhpRoles(true); - PEAR_Installer_Role::getValidRoles('****', true); - return true; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Cfg.php b/_piecrust/libs/PEAR/Installer/Role/Cfg.php deleted file mode 100644 index 7620122..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Cfg.php +++ /dev/null @@ -1,106 +0,0 @@ - - * @copyright 2007-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Cfg.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.7.0 - */ - -/** - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 2007-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.7.0 - */ -class PEAR_Installer_Role_Cfg extends PEAR_Installer_Role_Common -{ - /** - * @var PEAR_Installer - */ - var $installer; - - /** - * the md5 of the original file - * - * @var unknown_type - */ - var $md5 = null; - - /** - * Do any unusual setup here - * @param PEAR_Installer - * @param PEAR_PackageFile_v2 - * @param array file attributes - * @param string file name - */ - function setup(&$installer, $pkg, $atts, $file) - { - $this->installer = &$installer; - $reg = &$this->installer->config->getRegistry(); - $package = $reg->getPackage($pkg->getPackage(), $pkg->getChannel()); - if ($package) { - $filelist = $package->getFilelist(); - if (isset($filelist[$file]) && isset($filelist[$file]['md5sum'])) { - $this->md5 = $filelist[$file]['md5sum']; - } - } - } - - function processInstallation($pkg, $atts, $file, $tmp_path, $layer = null) - { - $test = parent::processInstallation($pkg, $atts, $file, $tmp_path, $layer); - if (@file_exists($test[2]) && @file_exists($test[3])) { - $md5 = md5_file($test[2]); - // configuration has already been installed, check for mods - if ($md5 !== $this->md5 && $md5 !== md5_file($test[3])) { - // configuration has been modified, so save our version as - // configfile-version - $old = $test[2]; - $test[2] .= '.new-' . $pkg->getVersion(); - // backup original and re-install it - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $tmpcfg = $this->config->get('temp_dir'); - $newloc = System::mkdir(array('-p', $tmpcfg)); - if (!$newloc) { - // try temp_dir - $newloc = System::mktemp(array('-d')); - if (!$newloc || PEAR::isError($newloc)) { - PEAR::popErrorHandling(); - return PEAR::raiseError('Could not save existing configuration file '. - $old . ', unable to install. Please set temp_dir ' . - 'configuration variable to a writeable location and try again'); - } - } else { - $newloc = $tmpcfg; - } - - $temp_file = $newloc . DIRECTORY_SEPARATOR . uniqid('savefile'); - if (!@copy($old, $temp_file)) { - PEAR::popErrorHandling(); - return PEAR::raiseError('Could not save existing configuration file '. - $old . ', unable to install. Please set temp_dir ' . - 'configuration variable to a writeable location and try again'); - } - - PEAR::popErrorHandling(); - $this->installer->log(0, "WARNING: configuration file $old is being installed as $test[2], you should manually merge in changes to the existing configuration file"); - $this->installer->addFileOperation('rename', array($temp_file, $old, false)); - $this->installer->addFileOperation('delete', array($temp_file)); - } - } - - return $test; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Cfg.xml b/_piecrust/libs/PEAR/Installer/Role/Cfg.xml deleted file mode 100644 index 7a415dc..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Cfg.xml +++ /dev/null @@ -1,15 +0,0 @@ - - php - extsrc - extbin - zendextsrc - zendextbin - 1 - cfg_dir - - 1 - - - - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Common.php b/_piecrust/libs/PEAR/Installer/Role/Common.php deleted file mode 100644 index 23e7348..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Common.php +++ /dev/null @@ -1,174 +0,0 @@ - - * @copyright 1997-2006 The PHP Group - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Common.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ -/** - * Base class for all installation roles. - * - * This class allows extensibility of file roles. Packages with complex - * customization can now provide custom file roles along with the possibility of - * adding configuration values to match. - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2006 The PHP Group - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Installer_Role_Common -{ - /** - * @var PEAR_Config - * @access protected - */ - var $config; - - /** - * @param PEAR_Config - */ - function PEAR_Installer_Role_Common(&$config) - { - $this->config = $config; - } - - /** - * Retrieve configuration information about a file role from its XML info - * - * @param string $role Role Classname, as in "PEAR_Installer_Role_Data" - * @return array - */ - function getInfo($role) - { - if (empty($GLOBALS['_PEAR_INSTALLER_ROLES'][$role])) { - return PEAR::raiseError('Unknown Role class: "' . $role . '"'); - } - return $GLOBALS['_PEAR_INSTALLER_ROLES'][$role]; - } - - /** - * This is called for each file to set up the directories and files - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @param array attributes from the tag - * @param string file name - * @return array an array consisting of: - * - * 1 the original, pre-baseinstalldir installation directory - * 2 the final installation directory - * 3 the full path to the final location of the file - * 4 the location of the pre-installation file - */ - function processInstallation($pkg, $atts, $file, $tmp_path, $layer = null) - { - $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' . - ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this))))); - if (PEAR::isError($roleInfo)) { - return $roleInfo; - } - if (!$roleInfo['locationconfig']) { - return false; - } - if ($roleInfo['honorsbaseinstall']) { - $dest_dir = $save_destdir = $this->config->get($roleInfo['locationconfig'], $layer, - $pkg->getChannel()); - if (!empty($atts['baseinstalldir'])) { - $dest_dir .= DIRECTORY_SEPARATOR . $atts['baseinstalldir']; - } - } elseif ($roleInfo['unusualbaseinstall']) { - $dest_dir = $save_destdir = $this->config->get($roleInfo['locationconfig'], - $layer, $pkg->getChannel()) . DIRECTORY_SEPARATOR . $pkg->getPackage(); - if (!empty($atts['baseinstalldir'])) { - $dest_dir .= DIRECTORY_SEPARATOR . $atts['baseinstalldir']; - } - } else { - $dest_dir = $save_destdir = $this->config->get($roleInfo['locationconfig'], - $layer, $pkg->getChannel()) . DIRECTORY_SEPARATOR . $pkg->getPackage(); - } - if (dirname($file) != '.' && empty($atts['install-as'])) { - $dest_dir .= DIRECTORY_SEPARATOR . dirname($file); - } - if (empty($atts['install-as'])) { - $dest_file = $dest_dir . DIRECTORY_SEPARATOR . basename($file); - } else { - $dest_file = $dest_dir . DIRECTORY_SEPARATOR . $atts['install-as']; - } - $orig_file = $tmp_path . DIRECTORY_SEPARATOR . $file; - - // Clean up the DIRECTORY_SEPARATOR mess - $ds2 = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR; - - list($dest_dir, $dest_file, $orig_file) = preg_replace(array('!\\\\+!', '!/!', "!$ds2+!"), - array(DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, - DIRECTORY_SEPARATOR), - array($dest_dir, $dest_file, $orig_file)); - return array($save_destdir, $dest_dir, $dest_file, $orig_file); - } - - /** - * Get the name of the configuration variable that specifies the location of this file - * @return string|false - */ - function getLocationConfig() - { - $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' . - ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this))))); - if (PEAR::isError($roleInfo)) { - return $roleInfo; - } - return $roleInfo['locationconfig']; - } - - /** - * Do any unusual setup here - * @param PEAR_Installer - * @param PEAR_PackageFile_v2 - * @param array file attributes - * @param string file name - */ - function setup(&$installer, $pkg, $atts, $file) - { - } - - function isExecutable() - { - $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' . - ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this))))); - if (PEAR::isError($roleInfo)) { - return $roleInfo; - } - return $roleInfo['executable']; - } - - function isInstallable() - { - $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' . - ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this))))); - if (PEAR::isError($roleInfo)) { - return $roleInfo; - } - return $roleInfo['installable']; - } - - function isExtension() - { - $roleInfo = PEAR_Installer_Role_Common::getInfo('PEAR_Installer_Role_' . - ucfirst(str_replace('pear_installer_role_', '', strtolower(get_class($this))))); - if (PEAR::isError($roleInfo)) { - return $roleInfo; - } - return $roleInfo['phpextension']; - } -} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Data.php b/_piecrust/libs/PEAR/Installer/Role/Data.php deleted file mode 100644 index e3b7fa2..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Data.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Data.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Installer_Role_Data extends PEAR_Installer_Role_Common {} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Data.xml b/_piecrust/libs/PEAR/Installer/Role/Data.xml deleted file mode 100644 index eae6372..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Data.xml +++ /dev/null @@ -1,15 +0,0 @@ - - php - extsrc - extbin - zendextsrc - zendextbin - 1 - data_dir - - - - - - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Doc.php b/_piecrust/libs/PEAR/Installer/Role/Doc.php deleted file mode 100644 index d592fff..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Doc.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Doc.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Installer_Role_Doc extends PEAR_Installer_Role_Common {} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Doc.xml b/_piecrust/libs/PEAR/Installer/Role/Doc.xml deleted file mode 100644 index 173afba..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Doc.xml +++ /dev/null @@ -1,15 +0,0 @@ - - php - extsrc - extbin - zendextsrc - zendextbin - 1 - doc_dir - - - - - - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Ext.php b/_piecrust/libs/PEAR/Installer/Role/Ext.php deleted file mode 100644 index eceb027..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Ext.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Ext.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Installer_Role_Ext extends PEAR_Installer_Role_Common {} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Ext.xml b/_piecrust/libs/PEAR/Installer/Role/Ext.xml deleted file mode 100644 index e2940fe..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Ext.xml +++ /dev/null @@ -1,12 +0,0 @@ - - extbin - zendextbin - 1 - ext_dir - 1 - - - - 1 - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Php.php b/_piecrust/libs/PEAR/Installer/Role/Php.php deleted file mode 100644 index e2abf44..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Php.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Php.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Installer_Role_Php extends PEAR_Installer_Role_Common {} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Php.xml b/_piecrust/libs/PEAR/Installer/Role/Php.xml deleted file mode 100644 index 6b9a0e6..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Php.xml +++ /dev/null @@ -1,15 +0,0 @@ - - php - extsrc - extbin - zendextsrc - zendextbin - 1 - php_dir - 1 - - 1 - - - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Script.php b/_piecrust/libs/PEAR/Installer/Role/Script.php deleted file mode 100644 index b31469e..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Script.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Script.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Installer_Role_Script extends PEAR_Installer_Role_Common {} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Script.xml b/_piecrust/libs/PEAR/Installer/Role/Script.xml deleted file mode 100644 index e732cf2..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Script.xml +++ /dev/null @@ -1,15 +0,0 @@ - - php - extsrc - extbin - zendextsrc - zendextbin - 1 - bin_dir - 1 - - - 1 - - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Src.php b/_piecrust/libs/PEAR/Installer/Role/Src.php deleted file mode 100644 index 5037053..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Src.php +++ /dev/null @@ -1,34 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Src.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Installer_Role_Src extends PEAR_Installer_Role_Common -{ - function setup(&$installer, $pkg, $atts, $file) - { - $installer->source_files++; - } -} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Src.xml b/_piecrust/libs/PEAR/Installer/Role/Src.xml deleted file mode 100644 index 1034834..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Src.xml +++ /dev/null @@ -1,12 +0,0 @@ - - extsrc - zendextsrc - 1 - temp_dir - - - - - - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Test.php b/_piecrust/libs/PEAR/Installer/Role/Test.php deleted file mode 100644 index 14c0e60..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Test.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Test.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Installer_Role_Test extends PEAR_Installer_Role_Common {} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Test.xml b/_piecrust/libs/PEAR/Installer/Role/Test.xml deleted file mode 100644 index 51d5b89..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Test.xml +++ /dev/null @@ -1,15 +0,0 @@ - - php - extsrc - extbin - zendextsrc - zendextbin - 1 - test_dir - - - - - - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Www.php b/_piecrust/libs/PEAR/Installer/Role/Www.php deleted file mode 100644 index 11adeff..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Www.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @copyright 2007-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Www.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.7.0 - */ - -/** - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 2007-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.7.0 - */ -class PEAR_Installer_Role_Www extends PEAR_Installer_Role_Common {} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Installer/Role/Www.xml b/_piecrust/libs/PEAR/Installer/Role/Www.xml deleted file mode 100644 index 7598be3..0000000 --- a/_piecrust/libs/PEAR/Installer/Role/Www.xml +++ /dev/null @@ -1,15 +0,0 @@ - - php - extsrc - extbin - zendextsrc - zendextbin - 1 - www_dir - 1 - - - - - - \ No newline at end of file diff --git a/_piecrust/libs/PEAR/PackageFile.php b/_piecrust/libs/PEAR/PackageFile.php deleted file mode 100644 index 7ae3362..0000000 --- a/_piecrust/libs/PEAR/PackageFile.php +++ /dev/null @@ -1,492 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: PackageFile.php 313024 2011-07-06 19:51:24Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * needed for PEAR_VALIDATE_* constants - */ -require_once 'PEAR/Validate.php'; -/** - * Error code if the package.xml tag does not contain a valid version - */ -define('PEAR_PACKAGEFILE_ERROR_NO_PACKAGEVERSION', 1); -/** - * Error code if the package.xml tag version is not supported (version 1.0 and 1.1 are the only supported versions, - * currently - */ -define('PEAR_PACKAGEFILE_ERROR_INVALID_PACKAGEVERSION', 2); -/** - * Abstraction for the package.xml package description file - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_PackageFile -{ - /** - * @var PEAR_Config - */ - var $_config; - var $_debug; - - var $_logger = false; - /** - * @var boolean - */ - var $_rawReturn = false; - - /** - * helper for extracting Archive_Tar errors - * @var array - * @access private - */ - var $_extractErrors = array(); - - /** - * - * @param PEAR_Config $config - * @param ? $debug - * @param string @tmpdir Optional temporary directory for uncompressing - * files - */ - function PEAR_PackageFile(&$config, $debug = false) - { - $this->_config = $config; - $this->_debug = $debug; - } - - /** - * Turn off validation - return a parsed package.xml without checking it - * - * This is used by the package-validate command - */ - function rawReturn() - { - $this->_rawReturn = true; - } - - function setLogger(&$l) - { - $this->_logger = &$l; - } - - /** - * Create a PEAR_PackageFile_Parser_v* of a given version. - * @param int $version - * @return PEAR_PackageFile_Parser_v1|PEAR_PackageFile_Parser_v1 - */ - function &parserFactory($version) - { - if (!in_array($version{0}, array('1', '2'))) { - $a = false; - return $a; - } - - include_once 'PEAR/PackageFile/Parser/v' . $version{0} . '.php'; - $version = $version{0}; - $class = "PEAR_PackageFile_Parser_v$version"; - $a = new $class; - return $a; - } - - /** - * For simpler unit-testing - * @return string - */ - function getClassPrefix() - { - return 'PEAR_PackageFile_v'; - } - - /** - * Create a PEAR_PackageFile_v* of a given version. - * @param int $version - * @return PEAR_PackageFile_v1|PEAR_PackageFile_v1 - */ - function &factory($version) - { - if (!in_array($version{0}, array('1', '2'))) { - $a = false; - return $a; - } - - include_once 'PEAR/PackageFile/v' . $version{0} . '.php'; - $version = $version{0}; - $class = $this->getClassPrefix() . $version; - $a = new $class; - return $a; - } - - /** - * Create a PEAR_PackageFile_v* from its toArray() method - * - * WARNING: no validation is performed, the array is assumed to be valid, - * always parse from xml if you want validation. - * @param array $arr - * @return PEAR_PackageFileManager_v1|PEAR_PackageFileManager_v2 - * @uses factory() to construct the returned object. - */ - function &fromArray($arr) - { - if (isset($arr['xsdversion'])) { - $obj = &$this->factory($arr['xsdversion']); - if ($this->_logger) { - $obj->setLogger($this->_logger); - } - - $obj->setConfig($this->_config); - $obj->fromArray($arr); - return $obj; - } - - if (isset($arr['package']['attribs']['version'])) { - $obj = &$this->factory($arr['package']['attribs']['version']); - } else { - $obj = &$this->factory('1.0'); - } - - if ($this->_logger) { - $obj->setLogger($this->_logger); - } - - $obj->setConfig($this->_config); - $obj->fromArray($arr); - return $obj; - } - - /** - * Create a PEAR_PackageFile_v* from an XML string. - * @access public - * @param string $data contents of package.xml file - * @param int $state package state (one of PEAR_VALIDATE_* constants) - * @param string $file full path to the package.xml file (and the files - * it references) - * @param string $archive optional name of the archive that the XML was - * extracted from, if any - * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @uses parserFactory() to construct a parser to load the package. - */ - function &fromXmlString($data, $state, $file, $archive = false) - { - if (preg_match('/]+version=[\'"]([0-9]+\.[0-9]+)[\'"]/', $data, $packageversion)) { - if (!in_array($packageversion[1], array('1.0', '2.0', '2.1'))) { - return PEAR::raiseError('package.xml version "' . $packageversion[1] . - '" is not supported, only 1.0, 2.0, and 2.1 are supported.'); - } - - $object = &$this->parserFactory($packageversion[1]); - if ($this->_logger) { - $object->setLogger($this->_logger); - } - - $object->setConfig($this->_config); - $pf = $object->parse($data, $file, $archive); - if (PEAR::isError($pf)) { - return $pf; - } - - if ($this->_rawReturn) { - return $pf; - } - - if (!$pf->validate($state)) {; - if ($this->_config->get('verbose') > 0 - && $this->_logger && $pf->getValidationWarnings(false) - ) { - foreach ($pf->getValidationWarnings(false) as $warning) { - $this->_logger->log(0, 'ERROR: ' . $warning['message']); - } - } - - $a = PEAR::raiseError('Parsing of package.xml from file "' . $file . '" failed', - 2, null, null, $pf->getValidationWarnings()); - return $a; - } - - if ($this->_logger && $pf->getValidationWarnings(false)) { - foreach ($pf->getValidationWarnings() as $warning) { - $this->_logger->log(0, 'WARNING: ' . $warning['message']); - } - } - - if (method_exists($pf, 'flattenFilelist')) { - $pf->flattenFilelist(); // for v2 - } - - return $pf; - } elseif (preg_match('/]+version=[\'"]([^"\']+)[\'"]/', $data, $packageversion)) { - $a = PEAR::raiseError('package.xml file "' . $file . - '" has unsupported package.xml version "' . $packageversion[1] . '"'); - return $a; - } else { - if (!class_exists('PEAR_ErrorStack')) { - require_once 'PEAR/ErrorStack.php'; - } - - PEAR_ErrorStack::staticPush('PEAR_PackageFile', - PEAR_PACKAGEFILE_ERROR_NO_PACKAGEVERSION, - 'warning', array('xml' => $data), 'package.xml "' . $file . - '" has no package.xml version'); - $object = &$this->parserFactory('1.0'); - $object->setConfig($this->_config); - $pf = $object->parse($data, $file, $archive); - if (PEAR::isError($pf)) { - return $pf; - } - - if ($this->_rawReturn) { - return $pf; - } - - if (!$pf->validate($state)) { - $a = PEAR::raiseError('Parsing of package.xml from file "' . $file . '" failed', - 2, null, null, $pf->getValidationWarnings()); - return $a; - } - - if ($this->_logger && $pf->getValidationWarnings(false)) { - foreach ($pf->getValidationWarnings() as $warning) { - $this->_logger->log(0, 'WARNING: ' . $warning['message']); - } - } - - if (method_exists($pf, 'flattenFilelist')) { - $pf->flattenFilelist(); // for v2 - } - - return $pf; - } - } - - /** - * Register a temporary file or directory. When the destructor is - * executed, all registered temporary files and directories are - * removed. - * - * @param string $file name of file or directory - * @return void - */ - function addTempFile($file) - { - $GLOBALS['_PEAR_Common_tempfiles'][] = $file; - } - - /** - * Create a PEAR_PackageFile_v* from a compresed Tar or Tgz file. - * @access public - * @param string contents of package.xml file - * @param int package state (one of PEAR_VALIDATE_* constants) - * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @using Archive_Tar to extract the files - * @using fromPackageFile() to load the package after the package.xml - * file is extracted. - */ - function &fromTgzFile($file, $state) - { - if (!class_exists('Archive_Tar')) { - require_once 'Archive/Tar.php'; - } - - $tar = new Archive_Tar($file); - if ($this->_debug <= 1) { - $tar->pushErrorHandling(PEAR_ERROR_RETURN); - } - - $content = $tar->listContent(); - if ($this->_debug <= 1) { - $tar->popErrorHandling(); - } - - if (!is_array($content)) { - if (is_string($file) && strlen($file < 255) && - (!file_exists($file) || !@is_file($file))) { - $ret = PEAR::raiseError("could not open file \"$file\""); - return $ret; - } - - $file = realpath($file); - $ret = PEAR::raiseError("Could not get contents of package \"$file\"". - '. Invalid tgz file.'); - return $ret; - } - - if (!count($content) && !@is_file($file)) { - $ret = PEAR::raiseError("could not open file \"$file\""); - return $ret; - } - - $xml = null; - $origfile = $file; - foreach ($content as $file) { - $name = $file['filename']; - if ($name == 'package2.xml') { // allow a .tgz to distribute both versions - $xml = $name; - break; - } - - if ($name == 'package.xml') { - $xml = $name; - break; - } elseif (preg_match('/package.xml$/', $name, $match)) { - $xml = $name; - break; - } - } - - $tmpdir = System::mktemp('-t "' . $this->_config->get('temp_dir') . '" -d pear'); - if ($tmpdir === false) { - $ret = PEAR::raiseError("there was a problem with getting the configured temp directory"); - return $ret; - } - - PEAR_PackageFile::addTempFile($tmpdir); - - $this->_extractErrors(); - PEAR::staticPushErrorHandling(PEAR_ERROR_CALLBACK, array($this, '_extractErrors')); - - if (!$xml || !$tar->extractList(array($xml), $tmpdir)) { - $extra = implode("\n", $this->_extractErrors()); - if ($extra) { - $extra = ' ' . $extra; - } - - PEAR::staticPopErrorHandling(); - $ret = PEAR::raiseError('could not extract the package.xml file from "' . - $origfile . '"' . $extra); - return $ret; - } - - PEAR::staticPopErrorHandling(); - $ret = &PEAR_PackageFile::fromPackageFile("$tmpdir/$xml", $state, $origfile); - return $ret; - } - - /** - * helper callback for extracting Archive_Tar errors - * - * @param PEAR_Error|null $err - * @return array - * @access private - */ - function _extractErrors($err = null) - { - static $errors = array(); - if ($err === null) { - $e = $errors; - $errors = array(); - return $e; - } - $errors[] = $err->getMessage(); - } - - /** - * Create a PEAR_PackageFile_v* from a package.xml file. - * - * @access public - * @param string $descfile name of package xml file - * @param int $state package state (one of PEAR_VALIDATE_* constants) - * @param string|false $archive name of the archive this package.xml came - * from, if any - * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @uses PEAR_PackageFile::fromXmlString to create the oject after the - * XML is loaded from the package.xml file. - */ - function &fromPackageFile($descfile, $state, $archive = false) - { - $fp = false; - if (is_string($descfile) && strlen($descfile) < 255 && - ( - !file_exists($descfile) || !is_file($descfile) || !is_readable($descfile) - || (!$fp = @fopen($descfile, 'r')) - ) - ) { - $a = PEAR::raiseError("Unable to open $descfile"); - return $a; - } - - // read the whole thing so we only get one cdata callback - // for each block of cdata - fclose($fp); - $data = file_get_contents($descfile); - $ret = &PEAR_PackageFile::fromXmlString($data, $state, $descfile, $archive); - return $ret; - } - - /** - * Create a PEAR_PackageFile_v* from a .tgz archive or package.xml file. - * - * This method is able to extract information about a package from a .tgz - * archive or from a XML package definition file. - * - * @access public - * @param string $info file name - * @param int $state package state (one of PEAR_VALIDATE_* constants) - * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @uses fromPackageFile() if the file appears to be XML - * @uses fromTgzFile() to load all non-XML files - */ - function &fromAnyFile($info, $state) - { - if (is_dir($info)) { - $dir_name = realpath($info); - if (file_exists($dir_name . '/package.xml')) { - $info = PEAR_PackageFile::fromPackageFile($dir_name . '/package.xml', $state); - } elseif (file_exists($dir_name . '/package2.xml')) { - $info = PEAR_PackageFile::fromPackageFile($dir_name . '/package2.xml', $state); - } else { - $info = PEAR::raiseError("No package definition found in '$info' directory"); - } - - return $info; - } - - $fp = false; - if (is_string($info) && strlen($info) < 255 && - (file_exists($info) || ($fp = @fopen($info, 'r'))) - ) { - - if ($fp) { - fclose($fp); - } - - $tmp = substr($info, -4); - if ($tmp == '.xml') { - $info = &PEAR_PackageFile::fromPackageFile($info, $state); - } elseif ($tmp == '.tar' || $tmp == '.tgz') { - $info = &PEAR_PackageFile::fromTgzFile($info, $state); - } else { - $fp = fopen($info, 'r'); - $test = fread($fp, 5); - fclose($fp); - if ($test == ' - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: v1.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ -/** - * needed for PEAR_VALIDATE_* constants - */ -require_once 'PEAR/Validate.php'; -require_once 'System.php'; -require_once 'PEAR/PackageFile/v2.php'; -/** - * This class converts a PEAR_PackageFile_v1 object into any output format. - * - * Supported output formats include array, XML string, and a PEAR_PackageFile_v2 - * object, for converting package.xml 1.0 into package.xml 2.0 with no sweat. - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_PackageFile_Generator_v1 -{ - /** - * @var PEAR_PackageFile_v1 - */ - var $_packagefile; - function PEAR_PackageFile_Generator_v1(&$packagefile) - { - $this->_packagefile = &$packagefile; - } - - function getPackagerVersion() - { - return '1.9.4'; - } - - /** - * @param PEAR_Packager - * @param bool if true, a .tgz is written, otherwise a .tar is written - * @param string|null directory in which to save the .tgz - * @return string|PEAR_Error location of package or error object - */ - function toTgz(&$packager, $compress = true, $where = null) - { - require_once 'Archive/Tar.php'; - if ($where === null) { - if (!($where = System::mktemp(array('-d')))) { - return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: mktemp failed'); - } - } elseif (!@System::mkDir(array('-p', $where))) { - return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: "' . $where . '" could' . - ' not be created'); - } - if (file_exists($where . DIRECTORY_SEPARATOR . 'package.xml') && - !is_file($where . DIRECTORY_SEPARATOR . 'package.xml')) { - return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: unable to save package.xml as' . - ' "' . $where . DIRECTORY_SEPARATOR . 'package.xml"'); - } - if (!$this->_packagefile->validate(PEAR_VALIDATE_PACKAGING)) { - return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: invalid package file'); - } - $pkginfo = $this->_packagefile->getArray(); - $ext = $compress ? '.tgz' : '.tar'; - $pkgver = $pkginfo['package'] . '-' . $pkginfo['version']; - $dest_package = getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext; - if (file_exists(getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext) && - !is_file(getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext)) { - return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: cannot create tgz file "' . - getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext . '"'); - } - if ($pkgfile = $this->_packagefile->getPackageFile()) { - $pkgdir = dirname(realpath($pkgfile)); - $pkgfile = basename($pkgfile); - } else { - return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: package file object must ' . - 'be created from a real file'); - } - // {{{ Create the package file list - $filelist = array(); - $i = 0; - - foreach ($this->_packagefile->getFilelist() as $fname => $atts) { - $file = $pkgdir . DIRECTORY_SEPARATOR . $fname; - if (!file_exists($file)) { - return PEAR::raiseError("File does not exist: $fname"); - } else { - $filelist[$i++] = $file; - if (!isset($atts['md5sum'])) { - $this->_packagefile->setFileAttribute($fname, 'md5sum', md5_file($file)); - } - $packager->log(2, "Adding file $fname"); - } - } - // }}} - $packagexml = $this->toPackageFile($where, PEAR_VALIDATE_PACKAGING, 'package.xml', true); - if ($packagexml) { - $tar =& new Archive_Tar($dest_package, $compress); - $tar->setErrorHandling(PEAR_ERROR_RETURN); // XXX Don't print errors - // ----- Creates with the package.xml file - $ok = $tar->createModify(array($packagexml), '', $where); - if (PEAR::isError($ok)) { - return $ok; - } elseif (!$ok) { - return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: tarball creation failed'); - } - // ----- Add the content of the package - if (!$tar->addModify($filelist, $pkgver, $pkgdir)) { - return PEAR::raiseError('PEAR_Packagefile_v1::toTgz: tarball creation failed'); - } - return $dest_package; - } - } - - /** - * @param string|null directory to place the package.xml in, or null for a temporary dir - * @param int one of the PEAR_VALIDATE_* constants - * @param string name of the generated file - * @param bool if true, then no analysis will be performed on role="php" files - * @return string|PEAR_Error path to the created file on success - */ - function toPackageFile($where = null, $state = PEAR_VALIDATE_NORMAL, $name = 'package.xml', - $nofilechecking = false) - { - if (!$this->_packagefile->validate($state, $nofilechecking)) { - return PEAR::raiseError('PEAR_Packagefile_v1::toPackageFile: invalid package.xml', - null, null, null, $this->_packagefile->getValidationWarnings()); - } - if ($where === null) { - if (!($where = System::mktemp(array('-d')))) { - return PEAR::raiseError('PEAR_Packagefile_v1::toPackageFile: mktemp failed'); - } - } elseif (!@System::mkDir(array('-p', $where))) { - return PEAR::raiseError('PEAR_Packagefile_v1::toPackageFile: "' . $where . '" could' . - ' not be created'); - } - $newpkgfile = $where . DIRECTORY_SEPARATOR . $name; - $np = @fopen($newpkgfile, 'wb'); - if (!$np) { - return PEAR::raiseError('PEAR_Packagefile_v1::toPackageFile: unable to save ' . - "$name as $newpkgfile"); - } - fwrite($np, $this->toXml($state, true)); - fclose($np); - return $newpkgfile; - } - - /** - * fix both XML encoding to be UTF8, and replace standard XML entities < > " & ' - * - * @param string $string - * @return string - * @access private - */ - function _fixXmlEncoding($string) - { - if (version_compare(phpversion(), '5.0.0', 'lt')) { - $string = utf8_encode($string); - } - return strtr($string, array( - '&' => '&', - '>' => '>', - '<' => '<', - '"' => '"', - '\'' => ''' )); - } - - /** - * Return an XML document based on the package info (as returned - * by the PEAR_Common::infoFrom* methods). - * - * @return string XML data - */ - function toXml($state = PEAR_VALIDATE_NORMAL, $nofilevalidation = false) - { - $this->_packagefile->setDate(date('Y-m-d')); - if (!$this->_packagefile->validate($state, $nofilevalidation)) { - return false; - } - $pkginfo = $this->_packagefile->getArray(); - static $maint_map = array( - "handle" => "user", - "name" => "name", - "email" => "email", - "role" => "role", - ); - $ret = "\n"; - $ret .= "\n"; - $ret .= "\n" . -" $pkginfo[package]"; - if (isset($pkginfo['extends'])) { - $ret .= "\n$pkginfo[extends]"; - } - $ret .= - "\n ".$this->_fixXmlEncoding($pkginfo['summary'])."\n" . -" ".trim($this->_fixXmlEncoding($pkginfo['description']))."\n \n" . -" \n"; - foreach ($pkginfo['maintainers'] as $maint) { - $ret .= " \n"; - foreach ($maint_map as $idx => $elm) { - $ret .= " <$elm>"; - $ret .= $this->_fixXmlEncoding($maint[$idx]); - $ret .= "\n"; - } - $ret .= " \n"; - } - $ret .= " \n"; - $ret .= $this->_makeReleaseXml($pkginfo, false, $state); - if (isset($pkginfo['changelog']) && count($pkginfo['changelog']) > 0) { - $ret .= " \n"; - foreach ($pkginfo['changelog'] as $oldrelease) { - $ret .= $this->_makeReleaseXml($oldrelease, true); - } - $ret .= " \n"; - } - $ret .= "\n"; - return $ret; - } - - // }}} - // {{{ _makeReleaseXml() - - /** - * Generate part of an XML description with release information. - * - * @param array $pkginfo array with release information - * @param bool $changelog whether the result will be in a changelog element - * - * @return string XML data - * - * @access private - */ - function _makeReleaseXml($pkginfo, $changelog = false, $state = PEAR_VALIDATE_NORMAL) - { - // XXX QUOTE ENTITIES IN PCDATA, OR EMBED IN CDATA BLOCKS!! - $indent = $changelog ? " " : ""; - $ret = "$indent \n"; - if (!empty($pkginfo['version'])) { - $ret .= "$indent $pkginfo[version]\n"; - } - if (!empty($pkginfo['release_date'])) { - $ret .= "$indent $pkginfo[release_date]\n"; - } - if (!empty($pkginfo['release_license'])) { - $ret .= "$indent $pkginfo[release_license]\n"; - } - if (!empty($pkginfo['release_state'])) { - $ret .= "$indent $pkginfo[release_state]\n"; - } - if (!empty($pkginfo['release_notes'])) { - $ret .= "$indent ".trim($this->_fixXmlEncoding($pkginfo['release_notes'])) - ."\n$indent \n"; - } - if (!empty($pkginfo['release_warnings'])) { - $ret .= "$indent ".$this->_fixXmlEncoding($pkginfo['release_warnings'])."\n"; - } - if (isset($pkginfo['release_deps']) && sizeof($pkginfo['release_deps']) > 0) { - $ret .= "$indent \n"; - foreach ($pkginfo['release_deps'] as $dep) { - $ret .= "$indent _fixXmlEncoding($c['name']) . "\""; - if (isset($c['default'])) { - $ret .= " default=\"" . $this->_fixXmlEncoding($c['default']) . "\""; - } - $ret .= " prompt=\"" . $this->_fixXmlEncoding($c['prompt']) . "\""; - $ret .= "/>\n"; - } - $ret .= "$indent \n"; - } - if (isset($pkginfo['provides'])) { - foreach ($pkginfo['provides'] as $key => $what) { - $ret .= "$indent recursiveXmlFilelist($pkginfo['filelist']); - } else { - foreach ($pkginfo['filelist'] as $file => $fa) { - if (!isset($fa['role'])) { - $fa['role'] = ''; - } - $ret .= "$indent _fixXmlEncoding($fa['baseinstalldir']) . '"'; - } - if (isset($fa['md5sum'])) { - $ret .= " md5sum=\"$fa[md5sum]\""; - } - if (isset($fa['platform'])) { - $ret .= " platform=\"$fa[platform]\""; - } - if (!empty($fa['install-as'])) { - $ret .= ' install-as="' . - $this->_fixXmlEncoding($fa['install-as']) . '"'; - } - $ret .= ' name="' . $this->_fixXmlEncoding($file) . '"'; - if (empty($fa['replacements'])) { - $ret .= "/>\n"; - } else { - $ret .= ">\n"; - foreach ($fa['replacements'] as $r) { - $ret .= "$indent $v) { - $ret .= " $k=\"" . $this->_fixXmlEncoding($v) .'"'; - } - $ret .= "/>\n"; - } - $ret .= "$indent \n"; - } - } - } - $ret .= "$indent \n"; - } - $ret .= "$indent \n"; - return $ret; - } - - /** - * @param array - * @access protected - */ - function recursiveXmlFilelist($list) - { - $this->_dirs = array(); - foreach ($list as $file => $attributes) { - $this->_addDir($this->_dirs, explode('/', dirname($file)), $file, $attributes); - } - return $this->_formatDir($this->_dirs); - } - - /** - * @param array - * @param array - * @param string|null - * @param array|null - * @access private - */ - function _addDir(&$dirs, $dir, $file = null, $attributes = null) - { - if ($dir == array() || $dir == array('.')) { - $dirs['files'][basename($file)] = $attributes; - return; - } - $curdir = array_shift($dir); - if (!isset($dirs['dirs'][$curdir])) { - $dirs['dirs'][$curdir] = array(); - } - $this->_addDir($dirs['dirs'][$curdir], $dir, $file, $attributes); - } - - /** - * @param array - * @param string - * @param string - * @access private - */ - function _formatDir($dirs, $indent = '', $curdir = '') - { - $ret = ''; - if (!count($dirs)) { - return ''; - } - if (isset($dirs['dirs'])) { - uksort($dirs['dirs'], 'strnatcasecmp'); - foreach ($dirs['dirs'] as $dir => $contents) { - $usedir = "$curdir/$dir"; - $ret .= "$indent \n"; - $ret .= $this->_formatDir($contents, "$indent ", $usedir); - $ret .= "$indent \n"; - } - } - if (isset($dirs['files'])) { - uksort($dirs['files'], 'strnatcasecmp'); - foreach ($dirs['files'] as $file => $attribs) { - $ret .= $this->_formatFile($file, $attribs, $indent); - } - } - return $ret; - } - - /** - * @param string - * @param array - * @param string - * @access private - */ - function _formatFile($file, $attributes, $indent) - { - $ret = "$indent _fixXmlEncoding($attributes['baseinstalldir']) . '"'; - } - if (isset($attributes['md5sum'])) { - $ret .= " md5sum=\"$attributes[md5sum]\""; - } - if (isset($attributes['platform'])) { - $ret .= " platform=\"$attributes[platform]\""; - } - if (!empty($attributes['install-as'])) { - $ret .= ' install-as="' . - $this->_fixXmlEncoding($attributes['install-as']) . '"'; - } - $ret .= ' name="' . $this->_fixXmlEncoding($file) . '"'; - if (empty($attributes['replacements'])) { - $ret .= "/>\n"; - } else { - $ret .= ">\n"; - foreach ($attributes['replacements'] as $r) { - $ret .= "$indent $v) { - $ret .= " $k=\"" . $this->_fixXmlEncoding($v) .'"'; - } - $ret .= "/>\n"; - } - $ret .= "$indent \n"; - } - return $ret; - } - - // {{{ _unIndent() - - /** - * Unindent given string (?) - * - * @param string $str The string that has to be unindented. - * @return string - * @access private - */ - function _unIndent($str) - { - // remove leading newlines - $str = preg_replace('/^[\r\n]+/', '', $str); - // find whitespace at the beginning of the first line - $indent_len = strspn($str, " \t"); - $indent = substr($str, 0, $indent_len); - $data = ''; - // remove the same amount of whitespace from following lines - foreach (explode("\n", $str) as $line) { - if (substr($line, 0, $indent_len) == $indent) { - $data .= substr($line, $indent_len) . "\n"; - } - } - return $data; - } - - /** - * @return array - */ - function dependenciesToV2() - { - $arr = array(); - $this->_convertDependencies2_0($arr); - return $arr['dependencies']; - } - - /** - * Convert a package.xml version 1.0 into version 2.0 - * - * Note that this does a basic conversion, to allow more advanced - * features like bundles and multiple releases - * @param string the classname to instantiate and return. This must be - * PEAR_PackageFile_v2 or a descendant - * @param boolean if true, only valid, deterministic package.xml 1.0 as defined by the - * strictest parameters will be converted - * @return PEAR_PackageFile_v2|PEAR_Error - */ - function &toV2($class = 'PEAR_PackageFile_v2', $strict = false) - { - if ($strict) { - if (!$this->_packagefile->validate()) { - $a = PEAR::raiseError('invalid package.xml version 1.0 cannot be converted' . - ' to version 2.0', null, null, null, - $this->_packagefile->getValidationWarnings(true)); - return $a; - } - } - - $arr = array( - 'attribs' => array( - 'version' => '2.0', - 'xmlns' => 'http://pear.php.net/dtd/package-2.0', - 'xmlns:tasks' => 'http://pear.php.net/dtd/tasks-1.0', - 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', - 'xsi:schemaLocation' => "http://pear.php.net/dtd/tasks-1.0\n" . -"http://pear.php.net/dtd/tasks-1.0.xsd\n" . -"http://pear.php.net/dtd/package-2.0\n" . -'http://pear.php.net/dtd/package-2.0.xsd', - ), - 'name' => $this->_packagefile->getPackage(), - 'channel' => 'pear.php.net', - ); - $arr['summary'] = $this->_packagefile->getSummary(); - $arr['description'] = $this->_packagefile->getDescription(); - $maintainers = $this->_packagefile->getMaintainers(); - foreach ($maintainers as $maintainer) { - if ($maintainer['role'] != 'lead') { - continue; - } - $new = array( - 'name' => $maintainer['name'], - 'user' => $maintainer['handle'], - 'email' => $maintainer['email'], - 'active' => 'yes', - ); - $arr['lead'][] = $new; - } - - if (!isset($arr['lead'])) { // some people... you know? - $arr['lead'] = array( - 'name' => 'unknown', - 'user' => 'unknown', - 'email' => 'noleadmaintainer@example.com', - 'active' => 'no', - ); - } - - if (count($arr['lead']) == 1) { - $arr['lead'] = $arr['lead'][0]; - } - - foreach ($maintainers as $maintainer) { - if ($maintainer['role'] == 'lead') { - continue; - } - $new = array( - 'name' => $maintainer['name'], - 'user' => $maintainer['handle'], - 'email' => $maintainer['email'], - 'active' => 'yes', - ); - $arr[$maintainer['role']][] = $new; - } - - if (isset($arr['developer']) && count($arr['developer']) == 1) { - $arr['developer'] = $arr['developer'][0]; - } - - if (isset($arr['contributor']) && count($arr['contributor']) == 1) { - $arr['contributor'] = $arr['contributor'][0]; - } - - if (isset($arr['helper']) && count($arr['helper']) == 1) { - $arr['helper'] = $arr['helper'][0]; - } - - $arr['date'] = $this->_packagefile->getDate(); - $arr['version'] = - array( - 'release' => $this->_packagefile->getVersion(), - 'api' => $this->_packagefile->getVersion(), - ); - $arr['stability'] = - array( - 'release' => $this->_packagefile->getState(), - 'api' => $this->_packagefile->getState(), - ); - $licensemap = - array( - 'php' => 'http://www.php.net/license', - 'php license' => 'http://www.php.net/license', - 'lgpl' => 'http://www.gnu.org/copyleft/lesser.html', - 'bsd' => 'http://www.opensource.org/licenses/bsd-license.php', - 'bsd style' => 'http://www.opensource.org/licenses/bsd-license.php', - 'bsd-style' => 'http://www.opensource.org/licenses/bsd-license.php', - 'mit' => 'http://www.opensource.org/licenses/mit-license.php', - 'gpl' => 'http://www.gnu.org/copyleft/gpl.html', - 'apache' => 'http://www.opensource.org/licenses/apache2.0.php' - ); - - if (isset($licensemap[strtolower($this->_packagefile->getLicense())])) { - $arr['license'] = array( - 'attribs' => array('uri' => - $licensemap[strtolower($this->_packagefile->getLicense())]), - '_content' => $this->_packagefile->getLicense() - ); - } else { - // don't use bogus uri - $arr['license'] = $this->_packagefile->getLicense(); - } - - $arr['notes'] = $this->_packagefile->getNotes(); - $temp = array(); - $arr['contents'] = $this->_convertFilelist2_0($temp); - $this->_convertDependencies2_0($arr); - $release = ($this->_packagefile->getConfigureOptions() || $this->_isExtension) ? - 'extsrcrelease' : 'phprelease'; - if ($release == 'extsrcrelease') { - $arr['channel'] = 'pecl.php.net'; - $arr['providesextension'] = $arr['name']; // assumption - } - - $arr[$release] = array(); - if ($this->_packagefile->getConfigureOptions()) { - $arr[$release]['configureoption'] = $this->_packagefile->getConfigureOptions(); - foreach ($arr[$release]['configureoption'] as $i => $opt) { - $arr[$release]['configureoption'][$i] = array('attribs' => $opt); - } - if (count($arr[$release]['configureoption']) == 1) { - $arr[$release]['configureoption'] = $arr[$release]['configureoption'][0]; - } - } - - $this->_convertRelease2_0($arr[$release], $temp); - if ($release == 'extsrcrelease' && count($arr[$release]) > 1) { - // multiple extsrcrelease tags added in PEAR 1.4.1 - $arr['dependencies']['required']['pearinstaller']['min'] = '1.4.1'; - } - - if ($cl = $this->_packagefile->getChangelog()) { - foreach ($cl as $release) { - $rel = array(); - $rel['version'] = - array( - 'release' => $release['version'], - 'api' => $release['version'], - ); - if (!isset($release['release_state'])) { - $release['release_state'] = 'stable'; - } - - $rel['stability'] = - array( - 'release' => $release['release_state'], - 'api' => $release['release_state'], - ); - if (isset($release['release_date'])) { - $rel['date'] = $release['release_date']; - } else { - $rel['date'] = date('Y-m-d'); - } - - if (isset($release['release_license'])) { - if (isset($licensemap[strtolower($release['release_license'])])) { - $uri = $licensemap[strtolower($release['release_license'])]; - } else { - $uri = 'http://www.example.com'; - } - $rel['license'] = array( - 'attribs' => array('uri' => $uri), - '_content' => $release['release_license'] - ); - } else { - $rel['license'] = $arr['license']; - } - - if (!isset($release['release_notes'])) { - $release['release_notes'] = 'no release notes'; - } - - $rel['notes'] = $release['release_notes']; - $arr['changelog']['release'][] = $rel; - } - } - - $ret = new $class; - $ret->setConfig($this->_packagefile->_config); - if (isset($this->_packagefile->_logger) && is_object($this->_packagefile->_logger)) { - $ret->setLogger($this->_packagefile->_logger); - } - - $ret->fromArray($arr); - return $ret; - } - - /** - * @param array - * @param bool - * @access private - */ - function _convertDependencies2_0(&$release, $internal = false) - { - $peardep = array('pearinstaller' => - array('min' => '1.4.0b1')); // this is a lot safer - $required = $optional = array(); - $release['dependencies'] = array('required' => array()); - if ($this->_packagefile->hasDeps()) { - foreach ($this->_packagefile->getDeps() as $dep) { - if (!isset($dep['optional']) || $dep['optional'] == 'no') { - $required[] = $dep; - } else { - $optional[] = $dep; - } - } - foreach (array('required', 'optional') as $arr) { - $deps = array(); - foreach ($$arr as $dep) { - // organize deps by dependency type and name - if (!isset($deps[$dep['type']])) { - $deps[$dep['type']] = array(); - } - if (isset($dep['name'])) { - $deps[$dep['type']][$dep['name']][] = $dep; - } else { - $deps[$dep['type']][] = $dep; - } - } - do { - if (isset($deps['php'])) { - $php = array(); - if (count($deps['php']) > 1) { - $php = $this->_processPhpDeps($deps['php']); - } else { - if (!isset($deps['php'][0])) { - list($key, $blah) = each ($deps['php']); // stupid buggy versions - $deps['php'] = array($blah[0]); - } - $php = $this->_processDep($deps['php'][0]); - if (!$php) { - break; // poor mans throw - } - } - $release['dependencies'][$arr]['php'] = $php; - } - } while (false); - do { - if (isset($deps['pkg'])) { - $pkg = array(); - $pkg = $this->_processMultipleDepsName($deps['pkg']); - if (!$pkg) { - break; // poor mans throw - } - $release['dependencies'][$arr]['package'] = $pkg; - } - } while (false); - do { - if (isset($deps['ext'])) { - $pkg = array(); - $pkg = $this->_processMultipleDepsName($deps['ext']); - $release['dependencies'][$arr]['extension'] = $pkg; - } - } while (false); - // skip sapi - it's not supported so nobody will have used it - // skip os - it's not supported in 1.0 - } - } - if (isset($release['dependencies']['required'])) { - $release['dependencies']['required'] = - array_merge($peardep, $release['dependencies']['required']); - } else { - $release['dependencies']['required'] = $peardep; - } - if (!isset($release['dependencies']['required']['php'])) { - $release['dependencies']['required']['php'] = - array('min' => '4.0.0'); - } - $order = array(); - $bewm = $release['dependencies']['required']; - $order['php'] = $bewm['php']; - $order['pearinstaller'] = $bewm['pearinstaller']; - isset($bewm['package']) ? $order['package'] = $bewm['package'] :0; - isset($bewm['extension']) ? $order['extension'] = $bewm['extension'] :0; - $release['dependencies']['required'] = $order; - } - - /** - * @param array - * @access private - */ - function _convertFilelist2_0(&$package) - { - $ret = array('dir' => - array( - 'attribs' => array('name' => '/'), - 'file' => array() - ) - ); - $package['platform'] = - $package['install-as'] = array(); - $this->_isExtension = false; - foreach ($this->_packagefile->getFilelist() as $name => $file) { - $file['name'] = $name; - if (isset($file['role']) && $file['role'] == 'src') { - $this->_isExtension = true; - } - if (isset($file['replacements'])) { - $repl = $file['replacements']; - unset($file['replacements']); - } else { - unset($repl); - } - if (isset($file['install-as'])) { - $package['install-as'][$name] = $file['install-as']; - unset($file['install-as']); - } - if (isset($file['platform'])) { - $package['platform'][$name] = $file['platform']; - unset($file['platform']); - } - $file = array('attribs' => $file); - if (isset($repl)) { - foreach ($repl as $replace ) { - $file['tasks:replace'][] = array('attribs' => $replace); - } - if (count($repl) == 1) { - $file['tasks:replace'] = $file['tasks:replace'][0]; - } - } - $ret['dir']['file'][] = $file; - } - return $ret; - } - - /** - * Post-process special files with install-as/platform attributes and - * make the release tag. - * - * This complex method follows this work-flow to create the release tags: - * - *
        -     * - if any install-as/platform exist, create a generic release and fill it with
        -     *   o  tags for 
        -     *   o  tags for 
        -     *   o  tags for 
        -     *   o  tags for 
        -     * - create a release for each platform encountered and fill with
        -     *   o  tags for 
        -     *   o  tags for 
        -     *   o  tags for 
        -     *   o  tags for 
        -     *   o  tags for 
        -     *   o  tags for 
        -     *   o  tags for 
        -     * 
        - * - * It does this by accessing the $package parameter, which contains an array with - * indices: - * - * - platform: mapping of file => OS the file should be installed on - * - install-as: mapping of file => installed name - * - osmap: mapping of OS => list of files that should be installed - * on that OS - * - notosmap: mapping of OS => list of files that should not be - * installed on that OS - * - * @param array - * @param array - * @access private - */ - function _convertRelease2_0(&$release, $package) - { - //- if any install-as/platform exist, create a generic release and fill it with - if (count($package['platform']) || count($package['install-as'])) { - $generic = array(); - $genericIgnore = array(); - foreach ($package['install-as'] as $file => $as) { - //o tags for - if (!isset($package['platform'][$file])) { - $generic[] = $file; - continue; - } - //o tags for - if (isset($package['platform'][$file]) && - $package['platform'][$file]{0} == '!') { - $generic[] = $file; - continue; - } - //o tags for - if (isset($package['platform'][$file]) && - $package['platform'][$file]{0} != '!') { - $genericIgnore[] = $file; - continue; - } - } - foreach ($package['platform'] as $file => $platform) { - if (isset($package['install-as'][$file])) { - continue; - } - if ($platform{0} != '!') { - //o tags for - $genericIgnore[] = $file; - } - } - if (count($package['platform'])) { - $oses = $notplatform = $platform = array(); - foreach ($package['platform'] as $file => $os) { - // get a list of oses - if ($os{0} == '!') { - if (isset($oses[substr($os, 1)])) { - continue; - } - $oses[substr($os, 1)] = count($oses); - } else { - if (isset($oses[$os])) { - continue; - } - $oses[$os] = count($oses); - } - } - //- create a release for each platform encountered and fill with - foreach ($oses as $os => $releaseNum) { - $release[$releaseNum]['installconditions']['os']['name'] = $os; - $release[$releaseNum]['filelist'] = array('install' => array(), - 'ignore' => array()); - foreach ($package['install-as'] as $file => $as) { - //o tags for - if (!isset($package['platform'][$file])) { - $release[$releaseNum]['filelist']['install'][] = - array( - 'attribs' => array( - 'name' => $file, - 'as' => $as, - ), - ); - continue; - } - //o tags for - // - if (isset($package['platform'][$file]) && - $package['platform'][$file] == $os) { - $release[$releaseNum]['filelist']['install'][] = - array( - 'attribs' => array( - 'name' => $file, - 'as' => $as, - ), - ); - continue; - } - //o tags for - // - if (isset($package['platform'][$file]) && - $package['platform'][$file] != "!$os" && - $package['platform'][$file]{0} == '!') { - $release[$releaseNum]['filelist']['install'][] = - array( - 'attribs' => array( - 'name' => $file, - 'as' => $as, - ), - ); - continue; - } - //o tags for - // - if (isset($package['platform'][$file]) && - $package['platform'][$file] == "!$os") { - $release[$releaseNum]['filelist']['ignore'][] = - array( - 'attribs' => array( - 'name' => $file, - ), - ); - continue; - } - //o tags for - // - if (isset($package['platform'][$file]) && - $package['platform'][$file]{0} != '!' && - $package['platform'][$file] != $os) { - $release[$releaseNum]['filelist']['ignore'][] = - array( - 'attribs' => array( - 'name' => $file, - ), - ); - continue; - } - } - foreach ($package['platform'] as $file => $platform) { - if (isset($package['install-as'][$file])) { - continue; - } - //o tags for - if ($platform == "!$os") { - $release[$releaseNum]['filelist']['ignore'][] = - array( - 'attribs' => array( - 'name' => $file, - ), - ); - continue; - } - //o tags for - if ($platform{0} != '!' && $platform != $os) { - $release[$releaseNum]['filelist']['ignore'][] = - array( - 'attribs' => array( - 'name' => $file, - ), - ); - } - } - if (!count($release[$releaseNum]['filelist']['install'])) { - unset($release[$releaseNum]['filelist']['install']); - } - if (!count($release[$releaseNum]['filelist']['ignore'])) { - unset($release[$releaseNum]['filelist']['ignore']); - } - } - if (count($generic) || count($genericIgnore)) { - $release[count($oses)] = array(); - if (count($generic)) { - foreach ($generic as $file) { - if (isset($package['install-as'][$file])) { - $installas = $package['install-as'][$file]; - } else { - $installas = $file; - } - $release[count($oses)]['filelist']['install'][] = - array( - 'attribs' => array( - 'name' => $file, - 'as' => $installas, - ) - ); - } - } - if (count($genericIgnore)) { - foreach ($genericIgnore as $file) { - $release[count($oses)]['filelist']['ignore'][] = - array( - 'attribs' => array( - 'name' => $file, - ) - ); - } - } - } - // cleanup - foreach ($release as $i => $rel) { - if (isset($rel['filelist']['install']) && - count($rel['filelist']['install']) == 1) { - $release[$i]['filelist']['install'] = - $release[$i]['filelist']['install'][0]; - } - if (isset($rel['filelist']['ignore']) && - count($rel['filelist']['ignore']) == 1) { - $release[$i]['filelist']['ignore'] = - $release[$i]['filelist']['ignore'][0]; - } - } - if (count($release) == 1) { - $release = $release[0]; - } - } else { - // no platform atts, but some install-as atts - foreach ($package['install-as'] as $file => $value) { - $release['filelist']['install'][] = - array( - 'attribs' => array( - 'name' => $file, - 'as' => $value - ) - ); - } - if (count($release['filelist']['install']) == 1) { - $release['filelist']['install'] = $release['filelist']['install'][0]; - } - } - } - } - - /** - * @param array - * @return array - * @access private - */ - function _processDep($dep) - { - if ($dep['type'] == 'php') { - if ($dep['rel'] == 'has') { - // come on - everyone has php! - return false; - } - } - $php = array(); - if ($dep['type'] != 'php') { - $php['name'] = $dep['name']; - if ($dep['type'] == 'pkg') { - $php['channel'] = 'pear.php.net'; - } - } - switch ($dep['rel']) { - case 'gt' : - $php['min'] = $dep['version']; - $php['exclude'] = $dep['version']; - break; - case 'ge' : - if (!isset($dep['version'])) { - if ($dep['type'] == 'php') { - if (isset($dep['name'])) { - $dep['version'] = $dep['name']; - } - } - } - $php['min'] = $dep['version']; - break; - case 'lt' : - $php['max'] = $dep['version']; - $php['exclude'] = $dep['version']; - break; - case 'le' : - $php['max'] = $dep['version']; - break; - case 'eq' : - $php['min'] = $dep['version']; - $php['max'] = $dep['version']; - break; - case 'ne' : - $php['exclude'] = $dep['version']; - break; - case 'not' : - $php['conflicts'] = 'yes'; - break; - } - return $php; - } - - /** - * @param array - * @return array - */ - function _processPhpDeps($deps) - { - $test = array(); - foreach ($deps as $dep) { - $test[] = $this->_processDep($dep); - } - $min = array(); - $max = array(); - foreach ($test as $dep) { - if (!$dep) { - continue; - } - if (isset($dep['min'])) { - $min[$dep['min']] = count($min); - } - if (isset($dep['max'])) { - $max[$dep['max']] = count($max); - } - } - if (count($min) > 0) { - uksort($min, 'version_compare'); - } - if (count($max) > 0) { - uksort($max, 'version_compare'); - } - if (count($min)) { - // get the highest minimum - $min = array_pop($a = array_flip($min)); - } else { - $min = false; - } - if (count($max)) { - // get the lowest maximum - $max = array_shift($a = array_flip($max)); - } else { - $max = false; - } - if ($min) { - $php['min'] = $min; - } - if ($max) { - $php['max'] = $max; - } - $exclude = array(); - foreach ($test as $dep) { - if (!isset($dep['exclude'])) { - continue; - } - $exclude[] = $dep['exclude']; - } - if (count($exclude)) { - $php['exclude'] = $exclude; - } - return $php; - } - - /** - * process multiple dependencies that have a name, like package deps - * @param array - * @return array - * @access private - */ - function _processMultipleDepsName($deps) - { - $ret = $tests = array(); - foreach ($deps as $name => $dep) { - foreach ($dep as $d) { - $tests[$name][] = $this->_processDep($d); - } - } - - foreach ($tests as $name => $test) { - $max = $min = $php = array(); - $php['name'] = $name; - foreach ($test as $dep) { - if (!$dep) { - continue; - } - if (isset($dep['channel'])) { - $php['channel'] = 'pear.php.net'; - } - if (isset($dep['conflicts']) && $dep['conflicts'] == 'yes') { - $php['conflicts'] = 'yes'; - } - if (isset($dep['min'])) { - $min[$dep['min']] = count($min); - } - if (isset($dep['max'])) { - $max[$dep['max']] = count($max); - } - } - if (count($min) > 0) { - uksort($min, 'version_compare'); - } - if (count($max) > 0) { - uksort($max, 'version_compare'); - } - if (count($min)) { - // get the highest minimum - $min = array_pop($a = array_flip($min)); - } else { - $min = false; - } - if (count($max)) { - // get the lowest maximum - $max = array_shift($a = array_flip($max)); - } else { - $max = false; - } - if ($min) { - $php['min'] = $min; - } - if ($max) { - $php['max'] = $max; - } - $exclude = array(); - foreach ($test as $dep) { - if (!isset($dep['exclude'])) { - continue; - } - $exclude[] = $dep['exclude']; - } - if (count($exclude)) { - $php['exclude'] = $exclude; - } - $ret[] = $php; - } - return $ret; - } -} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/PackageFile/Generator/v2.php b/_piecrust/libs/PEAR/PackageFile/Generator/v2.php deleted file mode 100644 index 4d202df..0000000 --- a/_piecrust/libs/PEAR/PackageFile/Generator/v2.php +++ /dev/null @@ -1,893 +0,0 @@ - - * @author Stephan Schmidt (original XML_Serializer code) - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: v2.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ -/** - * file/dir manipulation routines - */ -require_once 'System.php'; -require_once 'XML/Util.php'; - -/** - * This class converts a PEAR_PackageFile_v2 object into any output format. - * - * Supported output formats include array, XML string (using S. Schmidt's - * XML_Serializer, slightly customized) - * @category pear - * @package PEAR - * @author Greg Beaver - * @author Stephan Schmidt (original XML_Serializer code) - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_PackageFile_Generator_v2 -{ - /** - * default options for the serialization - * @access private - * @var array $_defaultOptions - */ - var $_defaultOptions = array( - 'indent' => ' ', // string used for indentation - 'linebreak' => "\n", // string used for newlines - 'typeHints' => false, // automatically add type hin attributes - 'addDecl' => true, // add an XML declaration - 'defaultTagName' => 'XML_Serializer_Tag', // tag used for indexed arrays or invalid names - 'classAsTagName' => false, // use classname for objects in indexed arrays - 'keyAttribute' => '_originalKey', // attribute where original key is stored - 'typeAttribute' => '_type', // attribute for type (only if typeHints => true) - 'classAttribute' => '_class', // attribute for class of objects (only if typeHints => true) - 'scalarAsAttributes' => false, // scalar values (strings, ints,..) will be serialized as attribute - 'prependAttributes' => '', // prepend string for attributes - 'indentAttributes' => false, // indent the attributes, if set to '_auto', it will indent attributes so they all start at the same column - 'mode' => 'simplexml', // use 'simplexml' to use parent name as tagname if transforming an indexed array - 'addDoctype' => false, // add a doctype declaration - 'doctype' => null, // supply a string or an array with id and uri ({@see XML_Util::getDoctypeDeclaration()} - 'rootName' => 'package', // name of the root tag - 'rootAttributes' => array( - 'version' => '2.0', - 'xmlns' => 'http://pear.php.net/dtd/package-2.0', - 'xmlns:tasks' => 'http://pear.php.net/dtd/tasks-1.0', - 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', - 'xsi:schemaLocation' => 'http://pear.php.net/dtd/tasks-1.0 -http://pear.php.net/dtd/tasks-1.0.xsd -http://pear.php.net/dtd/package-2.0 -http://pear.php.net/dtd/package-2.0.xsd', - ), // attributes of the root tag - 'attributesArray' => 'attribs', // all values in this key will be treated as attributes - 'contentName' => '_content', // this value will be used directly as content, instead of creating a new tag, may only be used in conjuction with attributesArray - 'beautifyFilelist' => false, - 'encoding' => 'UTF-8', - ); - - /** - * options for the serialization - * @access private - * @var array $options - */ - var $options = array(); - - /** - * current tag depth - * @var integer $_tagDepth - */ - var $_tagDepth = 0; - - /** - * serilialized representation of the data - * @var string $_serializedData - */ - var $_serializedData = null; - /** - * @var PEAR_PackageFile_v2 - */ - var $_packagefile; - /** - * @param PEAR_PackageFile_v2 - */ - function PEAR_PackageFile_Generator_v2(&$packagefile) - { - $this->_packagefile = &$packagefile; - if (isset($this->_packagefile->encoding)) { - $this->_defaultOptions['encoding'] = $this->_packagefile->encoding; - } - } - - /** - * @return string - */ - function getPackagerVersion() - { - return '1.9.4'; - } - - /** - * @param PEAR_Packager - * @param bool generate a .tgz or a .tar - * @param string|null temporary directory to package in - */ - function toTgz(&$packager, $compress = true, $where = null) - { - $a = null; - return $this->toTgz2($packager, $a, $compress, $where); - } - - /** - * Package up both a package.xml and package2.xml for the same release - * @param PEAR_Packager - * @param PEAR_PackageFile_v1 - * @param bool generate a .tgz or a .tar - * @param string|null temporary directory to package in - */ - function toTgz2(&$packager, &$pf1, $compress = true, $where = null) - { - require_once 'Archive/Tar.php'; - if (!$this->_packagefile->isEquivalent($pf1)) { - return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: "' . - basename($pf1->getPackageFile()) . - '" is not equivalent to "' . basename($this->_packagefile->getPackageFile()) - . '"'); - } - - if ($where === null) { - if (!($where = System::mktemp(array('-d')))) { - return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: mktemp failed'); - } - } elseif (!@System::mkDir(array('-p', $where))) { - return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: "' . $where . '" could' . - ' not be created'); - } - - $file = $where . DIRECTORY_SEPARATOR . 'package.xml'; - if (file_exists($file) && !is_file($file)) { - return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: unable to save package.xml as' . - ' "' . $file .'"'); - } - - if (!$this->_packagefile->validate(PEAR_VALIDATE_PACKAGING)) { - return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: invalid package.xml'); - } - - $ext = $compress ? '.tgz' : '.tar'; - $pkgver = $this->_packagefile->getPackage() . '-' . $this->_packagefile->getVersion(); - $dest_package = getcwd() . DIRECTORY_SEPARATOR . $pkgver . $ext; - if (file_exists($dest_package) && !is_file($dest_package)) { - return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: cannot create tgz file "' . - $dest_package . '"'); - } - - $pkgfile = $this->_packagefile->getPackageFile(); - if (!$pkgfile) { - return PEAR::raiseError('PEAR_Packagefile_v2::toTgz: package file object must ' . - 'be created from a real file'); - } - - $pkgdir = dirname(realpath($pkgfile)); - $pkgfile = basename($pkgfile); - - // {{{ Create the package file list - $filelist = array(); - $i = 0; - $this->_packagefile->flattenFilelist(); - $contents = $this->_packagefile->getContents(); - if (isset($contents['bundledpackage'])) { // bundles of packages - $contents = $contents['bundledpackage']; - if (!isset($contents[0])) { - $contents = array($contents); - } - - $packageDir = $where; - foreach ($contents as $i => $package) { - $fname = $package; - $file = $pkgdir . DIRECTORY_SEPARATOR . $fname; - if (!file_exists($file)) { - return $packager->raiseError("File does not exist: $fname"); - } - - $tfile = $packageDir . DIRECTORY_SEPARATOR . $fname; - System::mkdir(array('-p', dirname($tfile))); - copy($file, $tfile); - $filelist[$i++] = $tfile; - $packager->log(2, "Adding package $fname"); - } - } else { // normal packages - $contents = $contents['dir']['file']; - if (!isset($contents[0])) { - $contents = array($contents); - } - - $packageDir = $where; - foreach ($contents as $i => $file) { - $fname = $file['attribs']['name']; - $atts = $file['attribs']; - $orig = $file; - $file = $pkgdir . DIRECTORY_SEPARATOR . $fname; - if (!file_exists($file)) { - return $packager->raiseError("File does not exist: $fname"); - } - - $origperms = fileperms($file); - $tfile = $packageDir . DIRECTORY_SEPARATOR . $fname; - unset($orig['attribs']); - if (count($orig)) { // file with tasks - // run any package-time tasks - $contents = file_get_contents($file); - foreach ($orig as $tag => $raw) { - $tag = str_replace( - array($this->_packagefile->getTasksNs() . ':', '-'), - array('', '_'), $tag); - $task = "PEAR_Task_$tag"; - $task = &new $task($this->_packagefile->_config, - $this->_packagefile->_logger, - PEAR_TASK_PACKAGE); - $task->init($raw, $atts, null); - $res = $task->startSession($this->_packagefile, $contents, $tfile); - if (!$res) { - continue; // skip this task - } - - if (PEAR::isError($res)) { - return $res; - } - - $contents = $res; // save changes - System::mkdir(array('-p', dirname($tfile))); - $wp = fopen($tfile, "wb"); - fwrite($wp, $contents); - fclose($wp); - } - } - - if (!file_exists($tfile)) { - System::mkdir(array('-p', dirname($tfile))); - copy($file, $tfile); - } - - chmod($tfile, $origperms); - $filelist[$i++] = $tfile; - $this->_packagefile->setFileAttribute($fname, 'md5sum', md5_file($tfile), $i - 1); - $packager->log(2, "Adding file $fname"); - } - } - // }}} - - $name = $pf1 !== null ? 'package2.xml' : 'package.xml'; - $packagexml = $this->toPackageFile($where, PEAR_VALIDATE_PACKAGING, $name); - if ($packagexml) { - $tar =& new Archive_Tar($dest_package, $compress); - $tar->setErrorHandling(PEAR_ERROR_RETURN); // XXX Don't print errors - // ----- Creates with the package.xml file - $ok = $tar->createModify(array($packagexml), '', $where); - if (PEAR::isError($ok)) { - return $packager->raiseError($ok); - } elseif (!$ok) { - return $packager->raiseError('PEAR_Packagefile_v2::toTgz(): adding ' . $name . - ' failed'); - } - - // ----- Add the content of the package - if (!$tar->addModify($filelist, $pkgver, $where)) { - return $packager->raiseError( - 'PEAR_Packagefile_v2::toTgz(): tarball creation failed'); - } - - // add the package.xml version 1.0 - if ($pf1 !== null) { - $pfgen = &$pf1->getDefaultGenerator(); - $packagexml1 = $pfgen->toPackageFile($where, PEAR_VALIDATE_PACKAGING, 'package.xml', true); - if (!$tar->addModify(array($packagexml1), '', $where)) { - return $packager->raiseError( - 'PEAR_Packagefile_v2::toTgz(): adding package.xml failed'); - } - } - - return $dest_package; - } - } - - function toPackageFile($where = null, $state = PEAR_VALIDATE_NORMAL, $name = 'package.xml') - { - if (!$this->_packagefile->validate($state)) { - return PEAR::raiseError('PEAR_Packagefile_v2::toPackageFile: invalid package.xml', - null, null, null, $this->_packagefile->getValidationWarnings()); - } - - if ($where === null) { - if (!($where = System::mktemp(array('-d')))) { - return PEAR::raiseError('PEAR_Packagefile_v2::toPackageFile: mktemp failed'); - } - } elseif (!@System::mkDir(array('-p', $where))) { - return PEAR::raiseError('PEAR_Packagefile_v2::toPackageFile: "' . $where . '" could' . - ' not be created'); - } - - $newpkgfile = $where . DIRECTORY_SEPARATOR . $name; - $np = @fopen($newpkgfile, 'wb'); - if (!$np) { - return PEAR::raiseError('PEAR_Packagefile_v2::toPackageFile: unable to save ' . - "$name as $newpkgfile"); - } - fwrite($np, $this->toXml($state)); - fclose($np); - return $newpkgfile; - } - - function &toV2() - { - return $this->_packagefile; - } - - /** - * Return an XML document based on the package info (as returned - * by the PEAR_Common::infoFrom* methods). - * - * @return string XML data - */ - function toXml($state = PEAR_VALIDATE_NORMAL, $options = array()) - { - $this->_packagefile->setDate(date('Y-m-d')); - $this->_packagefile->setTime(date('H:i:s')); - if (!$this->_packagefile->validate($state)) { - return false; - } - - if (is_array($options)) { - $this->options = array_merge($this->_defaultOptions, $options); - } else { - $this->options = $this->_defaultOptions; - } - - $arr = $this->_packagefile->getArray(); - if (isset($arr['filelist'])) { - unset($arr['filelist']); - } - - if (isset($arr['_lastversion'])) { - unset($arr['_lastversion']); - } - - // Fix the notes a little bit - if (isset($arr['notes'])) { - // This trims out the indenting, needs fixing - $arr['notes'] = "\n" . trim($arr['notes']) . "\n"; - } - - if (isset($arr['changelog']) && !empty($arr['changelog'])) { - // Fix for inconsistency how the array is filled depending on the changelog release amount - if (!isset($arr['changelog']['release'][0])) { - $release = $arr['changelog']['release']; - unset($arr['changelog']['release']); - - $arr['changelog']['release'] = array(); - $arr['changelog']['release'][0] = $release; - } - - foreach (array_keys($arr['changelog']['release']) as $key) { - $c =& $arr['changelog']['release'][$key]; - if (isset($c['notes'])) { - // This trims out the indenting, needs fixing - $c['notes'] = "\n" . trim($c['notes']) . "\n"; - } - } - } - - if ($state ^ PEAR_VALIDATE_PACKAGING && !isset($arr['bundle'])) { - $use = $this->_recursiveXmlFilelist($arr['contents']['dir']['file']); - unset($arr['contents']['dir']['file']); - if (isset($use['dir'])) { - $arr['contents']['dir']['dir'] = $use['dir']; - } - if (isset($use['file'])) { - $arr['contents']['dir']['file'] = $use['file']; - } - $this->options['beautifyFilelist'] = true; - } - - $arr['attribs']['packagerversion'] = '1.9.4'; - if ($this->serialize($arr, $options)) { - return $this->_serializedData . "\n"; - } - - return false; - } - - - function _recursiveXmlFilelist($list) - { - $dirs = array(); - if (isset($list['attribs'])) { - $file = $list['attribs']['name']; - unset($list['attribs']['name']); - $attributes = $list['attribs']; - $this->_addDir($dirs, explode('/', dirname($file)), $file, $attributes); - } else { - foreach ($list as $a) { - $file = $a['attribs']['name']; - $attributes = $a['attribs']; - unset($a['attribs']); - $this->_addDir($dirs, explode('/', dirname($file)), $file, $attributes, $a); - } - } - $this->_formatDir($dirs); - $this->_deFormat($dirs); - return $dirs; - } - - function _addDir(&$dirs, $dir, $file = null, $attributes = null, $tasks = null) - { - if (!$tasks) { - $tasks = array(); - } - if ($dir == array() || $dir == array('.')) { - $dirs['file'][basename($file)] = $tasks; - $attributes['name'] = basename($file); - $dirs['file'][basename($file)]['attribs'] = $attributes; - return; - } - $curdir = array_shift($dir); - if (!isset($dirs['dir'][$curdir])) { - $dirs['dir'][$curdir] = array(); - } - $this->_addDir($dirs['dir'][$curdir], $dir, $file, $attributes, $tasks); - } - - function _formatDir(&$dirs) - { - if (!count($dirs)) { - return array(); - } - $newdirs = array(); - if (isset($dirs['dir'])) { - $newdirs['dir'] = $dirs['dir']; - } - if (isset($dirs['file'])) { - $newdirs['file'] = $dirs['file']; - } - $dirs = $newdirs; - if (isset($dirs['dir'])) { - uksort($dirs['dir'], 'strnatcasecmp'); - foreach ($dirs['dir'] as $dir => $contents) { - $this->_formatDir($dirs['dir'][$dir]); - } - } - if (isset($dirs['file'])) { - uksort($dirs['file'], 'strnatcasecmp'); - }; - } - - function _deFormat(&$dirs) - { - if (!count($dirs)) { - return array(); - } - $newdirs = array(); - if (isset($dirs['dir'])) { - foreach ($dirs['dir'] as $dir => $contents) { - $newdir = array(); - $newdir['attribs']['name'] = $dir; - $this->_deFormat($contents); - foreach ($contents as $tag => $val) { - $newdir[$tag] = $val; - } - $newdirs['dir'][] = $newdir; - } - if (count($newdirs['dir']) == 1) { - $newdirs['dir'] = $newdirs['dir'][0]; - } - } - if (isset($dirs['file'])) { - foreach ($dirs['file'] as $name => $file) { - $newdirs['file'][] = $file; - } - if (count($newdirs['file']) == 1) { - $newdirs['file'] = $newdirs['file'][0]; - } - } - $dirs = $newdirs; - } - - /** - * reset all options to default options - * - * @access public - * @see setOption(), XML_Unserializer() - */ - function resetOptions() - { - $this->options = $this->_defaultOptions; - } - - /** - * set an option - * - * You can use this method if you do not want to set all options in the constructor - * - * @access public - * @see resetOption(), XML_Serializer() - */ - function setOption($name, $value) - { - $this->options[$name] = $value; - } - - /** - * sets several options at once - * - * You can use this method if you do not want to set all options in the constructor - * - * @access public - * @see resetOption(), XML_Unserializer(), setOption() - */ - function setOptions($options) - { - $this->options = array_merge($this->options, $options); - } - - /** - * serialize data - * - * @access public - * @param mixed $data data to serialize - * @return boolean true on success, pear error on failure - */ - function serialize($data, $options = null) - { - // if options have been specified, use them instead - // of the previously defined ones - if (is_array($options)) { - $optionsBak = $this->options; - if (isset($options['overrideOptions']) && $options['overrideOptions'] == true) { - $this->options = array_merge($this->_defaultOptions, $options); - } else { - $this->options = array_merge($this->options, $options); - } - } else { - $optionsBak = null; - } - - // start depth is zero - $this->_tagDepth = 0; - $this->_serializedData = ''; - // serialize an array - if (is_array($data)) { - $tagName = isset($this->options['rootName']) ? $this->options['rootName'] : 'array'; - $this->_serializedData .= $this->_serializeArray($data, $tagName, $this->options['rootAttributes']); - } - - // add doctype declaration - if ($this->options['addDoctype'] === true) { - $this->_serializedData = XML_Util::getDoctypeDeclaration($tagName, $this->options['doctype']) - . $this->options['linebreak'] - . $this->_serializedData; - } - - // build xml declaration - if ($this->options['addDecl']) { - $atts = array(); - $encoding = isset($this->options['encoding']) ? $this->options['encoding'] : null; - $this->_serializedData = XML_Util::getXMLDeclaration('1.0', $encoding) - . $this->options['linebreak'] - . $this->_serializedData; - } - - - if ($optionsBak !== null) { - $this->options = $optionsBak; - } - - return true; - } - - /** - * get the result of the serialization - * - * @access public - * @return string serialized XML - */ - function getSerializedData() - { - if ($this->_serializedData === null) { - return $this->raiseError('No serialized data available. Use XML_Serializer::serialize() first.', XML_SERIALIZER_ERROR_NO_SERIALIZATION); - } - return $this->_serializedData; - } - - /** - * serialize any value - * - * This method checks for the type of the value and calls the appropriate method - * - * @access private - * @param mixed $value - * @param string $tagName - * @param array $attributes - * @return string - */ - function _serializeValue($value, $tagName = null, $attributes = array()) - { - if (is_array($value)) { - $xml = $this->_serializeArray($value, $tagName, $attributes); - } elseif (is_object($value)) { - $xml = $this->_serializeObject($value, $tagName); - } else { - $tag = array( - 'qname' => $tagName, - 'attributes' => $attributes, - 'content' => $value - ); - $xml = $this->_createXMLTag($tag); - } - return $xml; - } - - /** - * serialize an array - * - * @access private - * @param array $array array to serialize - * @param string $tagName name of the root tag - * @param array $attributes attributes for the root tag - * @return string $string serialized data - * @uses XML_Util::isValidName() to check, whether key has to be substituted - */ - function _serializeArray(&$array, $tagName = null, $attributes = array()) - { - $_content = null; - - /** - * check for special attributes - */ - if ($this->options['attributesArray'] !== null) { - if (isset($array[$this->options['attributesArray']])) { - $attributes = $array[$this->options['attributesArray']]; - unset($array[$this->options['attributesArray']]); - } - /** - * check for special content - */ - if ($this->options['contentName'] !== null) { - if (isset($array[$this->options['contentName']])) { - $_content = $array[$this->options['contentName']]; - unset($array[$this->options['contentName']]); - } - } - } - - /* - * if mode is set to simpleXML, check whether - * the array is associative or indexed - */ - if (is_array($array) && $this->options['mode'] == 'simplexml') { - $indexed = true; - if (!count($array)) { - $indexed = false; - } - foreach ($array as $key => $val) { - if (!is_int($key)) { - $indexed = false; - break; - } - } - - if ($indexed && $this->options['mode'] == 'simplexml') { - $string = ''; - foreach ($array as $key => $val) { - if ($this->options['beautifyFilelist'] && $tagName == 'dir') { - if (!isset($this->_curdir)) { - $this->_curdir = ''; - } - $savedir = $this->_curdir; - if (isset($val['attribs'])) { - if ($val['attribs']['name'] == '/') { - $this->_curdir = '/'; - } else { - if ($this->_curdir == '/') { - $this->_curdir = ''; - } - $this->_curdir .= '/' . $val['attribs']['name']; - } - } - } - $string .= $this->_serializeValue( $val, $tagName, $attributes); - if ($this->options['beautifyFilelist'] && $tagName == 'dir') { - $string .= ' '; - if (empty($savedir)) { - unset($this->_curdir); - } else { - $this->_curdir = $savedir; - } - } - - $string .= $this->options['linebreak']; - // do indentation - if ($this->options['indent'] !== null && $this->_tagDepth > 0) { - $string .= str_repeat($this->options['indent'], $this->_tagDepth); - } - } - return rtrim($string); - } - } - - if ($this->options['scalarAsAttributes'] === true) { - foreach ($array as $key => $value) { - if (is_scalar($value) && (XML_Util::isValidName($key) === true)) { - unset($array[$key]); - $attributes[$this->options['prependAttributes'].$key] = $value; - } - } - } - - // check for empty array => create empty tag - if (empty($array)) { - $tag = array( - 'qname' => $tagName, - 'content' => $_content, - 'attributes' => $attributes - ); - - } else { - $this->_tagDepth++; - $tmp = $this->options['linebreak']; - foreach ($array as $key => $value) { - // do indentation - if ($this->options['indent'] !== null && $this->_tagDepth > 0) { - $tmp .= str_repeat($this->options['indent'], $this->_tagDepth); - } - - // copy key - $origKey = $key; - // key cannot be used as tagname => use default tag - $valid = XML_Util::isValidName($key); - if (PEAR::isError($valid)) { - if ($this->options['classAsTagName'] && is_object($value)) { - $key = get_class($value); - } else { - $key = $this->options['defaultTagName']; - } - } - $atts = array(); - if ($this->options['typeHints'] === true) { - $atts[$this->options['typeAttribute']] = gettype($value); - if ($key !== $origKey) { - $atts[$this->options['keyAttribute']] = (string)$origKey; - } - - } - if ($this->options['beautifyFilelist'] && $key == 'dir') { - if (!isset($this->_curdir)) { - $this->_curdir = ''; - } - $savedir = $this->_curdir; - if (isset($value['attribs'])) { - if ($value['attribs']['name'] == '/') { - $this->_curdir = '/'; - } else { - $this->_curdir .= '/' . $value['attribs']['name']; - } - } - } - - if (is_string($value) && $value && ($value{strlen($value) - 1} == "\n")) { - $value .= str_repeat($this->options['indent'], $this->_tagDepth); - } - $tmp .= $this->_createXMLTag(array( - 'qname' => $key, - 'attributes' => $atts, - 'content' => $value ) - ); - if ($this->options['beautifyFilelist'] && $key == 'dir') { - if (isset($value['attribs'])) { - $tmp .= ' '; - if (empty($savedir)) { - unset($this->_curdir); - } else { - $this->_curdir = $savedir; - } - } - } - $tmp .= $this->options['linebreak']; - } - - $this->_tagDepth--; - if ($this->options['indent']!==null && $this->_tagDepth>0) { - $tmp .= str_repeat($this->options['indent'], $this->_tagDepth); - } - - if (trim($tmp) === '') { - $tmp = null; - } - - $tag = array( - 'qname' => $tagName, - 'content' => $tmp, - 'attributes' => $attributes - ); - } - if ($this->options['typeHints'] === true) { - if (!isset($tag['attributes'][$this->options['typeAttribute']])) { - $tag['attributes'][$this->options['typeAttribute']] = 'array'; - } - } - - $string = $this->_createXMLTag($tag, false); - return $string; - } - - /** - * create a tag from an array - * this method awaits an array in the following format - * array( - * 'qname' => $tagName, - * 'attributes' => array(), - * 'content' => $content, // optional - * 'namespace' => $namespace // optional - * 'namespaceUri' => $namespaceUri // optional - * ) - * - * @access private - * @param array $tag tag definition - * @param boolean $replaceEntities whether to replace XML entities in content or not - * @return string $string XML tag - */ - function _createXMLTag($tag, $replaceEntities = true) - { - if ($this->options['indentAttributes'] !== false) { - $multiline = true; - $indent = str_repeat($this->options['indent'], $this->_tagDepth); - - if ($this->options['indentAttributes'] == '_auto') { - $indent .= str_repeat(' ', (strlen($tag['qname'])+2)); - - } else { - $indent .= $this->options['indentAttributes']; - } - } else { - $indent = $multiline = false; - } - - if (is_array($tag['content'])) { - if (empty($tag['content'])) { - $tag['content'] = ''; - } - } elseif(is_scalar($tag['content']) && (string)$tag['content'] == '') { - $tag['content'] = ''; - } - - if (is_scalar($tag['content']) || is_null($tag['content'])) { - if ($this->options['encoding'] == 'UTF-8' && - version_compare(phpversion(), '5.0.0', 'lt') - ) { - $tag['content'] = utf8_encode($tag['content']); - } - - if ($replaceEntities === true) { - $replaceEntities = XML_UTIL_ENTITIES_XML; - } - - $tag = XML_Util::createTagFromArray($tag, $replaceEntities, $multiline, $indent, $this->options['linebreak']); - } elseif (is_array($tag['content'])) { - $tag = $this->_serializeArray($tag['content'], $tag['qname'], $tag['attributes']); - } elseif (is_object($tag['content'])) { - $tag = $this->_serializeObject($tag['content'], $tag['qname'], $tag['attributes']); - } elseif (is_resource($tag['content'])) { - settype($tag['content'], 'string'); - $tag = XML_Util::createTagFromArray($tag, $replaceEntities); - } - return $tag; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/PackageFile/Parser/v1.php b/_piecrust/libs/PEAR/PackageFile/Parser/v1.php deleted file mode 100644 index 23395dc..0000000 --- a/_piecrust/libs/PEAR/PackageFile/Parser/v1.php +++ /dev/null @@ -1,459 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: v1.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ -/** - * package.xml abstraction class - */ -require_once 'PEAR/PackageFile/v1.php'; -/** - * Parser for package.xml version 1.0 - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: @PEAR-VER@ - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_PackageFile_Parser_v1 -{ - var $_registry; - var $_config; - var $_logger; - /** - * BC hack to allow PEAR_Common::infoFromString() to sort of - * work with the version 2.0 format - there's no filelist though - * @param PEAR_PackageFile_v2 - */ - function fromV2($packagefile) - { - $info = $packagefile->getArray(true); - $ret = new PEAR_PackageFile_v1; - $ret->fromArray($info['old']); - } - - function setConfig(&$c) - { - $this->_config = &$c; - $this->_registry = &$c->getRegistry(); - } - - function setLogger(&$l) - { - $this->_logger = &$l; - } - - /** - * @param string contents of package.xml file, version 1.0 - * @return bool success of parsing - */ - function &parse($data, $file, $archive = false) - { - if (!extension_loaded('xml')) { - return PEAR::raiseError('Cannot create xml parser for parsing package.xml, no xml extension'); - } - $xp = xml_parser_create(); - if (!$xp) { - $a = &PEAR::raiseError('Cannot create xml parser for parsing package.xml'); - return $a; - } - xml_set_object($xp, $this); - xml_set_element_handler($xp, '_element_start_1_0', '_element_end_1_0'); - xml_set_character_data_handler($xp, '_pkginfo_cdata_1_0'); - xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, false); - - $this->element_stack = array(); - $this->_packageInfo = array('provides' => array()); - $this->current_element = false; - unset($this->dir_install); - $this->_packageInfo['filelist'] = array(); - $this->filelist =& $this->_packageInfo['filelist']; - $this->dir_names = array(); - $this->in_changelog = false; - $this->d_i = 0; - $this->cdata = ''; - $this->_isValid = true; - - if (!xml_parse($xp, $data, 1)) { - $code = xml_get_error_code($xp); - $line = xml_get_current_line_number($xp); - xml_parser_free($xp); - $a = &PEAR::raiseError(sprintf("XML error: %s at line %d", - $str = xml_error_string($code), $line), 2); - return $a; - } - - xml_parser_free($xp); - - $pf = new PEAR_PackageFile_v1; - $pf->setConfig($this->_config); - if (isset($this->_logger)) { - $pf->setLogger($this->_logger); - } - $pf->setPackagefile($file, $archive); - $pf->fromArray($this->_packageInfo); - return $pf; - } - // {{{ _unIndent() - - /** - * Unindent given string - * - * @param string $str The string that has to be unindented. - * @return string - * @access private - */ - function _unIndent($str) - { - // remove leading newlines - $str = preg_replace('/^[\r\n]+/', '', $str); - // find whitespace at the beginning of the first line - $indent_len = strspn($str, " \t"); - $indent = substr($str, 0, $indent_len); - $data = ''; - // remove the same amount of whitespace from following lines - foreach (explode("\n", $str) as $line) { - if (substr($line, 0, $indent_len) == $indent) { - $data .= substr($line, $indent_len) . "\n"; - } elseif (trim(substr($line, 0, $indent_len))) { - $data .= ltrim($line); - } - } - return $data; - } - - // Support for package DTD v1.0: - // {{{ _element_start_1_0() - - /** - * XML parser callback for ending elements. Used for version 1.0 - * packages. - * - * @param resource $xp XML parser resource - * @param string $name name of ending element - * - * @return void - * - * @access private - */ - function _element_start_1_0($xp, $name, $attribs) - { - array_push($this->element_stack, $name); - $this->current_element = $name; - $spos = sizeof($this->element_stack) - 2; - $this->prev_element = ($spos >= 0) ? $this->element_stack[$spos] : ''; - $this->current_attributes = $attribs; - $this->cdata = ''; - switch ($name) { - case 'dir': - if ($this->in_changelog) { - break; - } - if (array_key_exists('name', $attribs) && $attribs['name'] != '/') { - $attribs['name'] = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'), - $attribs['name']); - if (strrpos($attribs['name'], '/') === strlen($attribs['name']) - 1) { - $attribs['name'] = substr($attribs['name'], 0, - strlen($attribs['name']) - 1); - } - if (strpos($attribs['name'], '/') === 0) { - $attribs['name'] = substr($attribs['name'], 1); - } - $this->dir_names[] = $attribs['name']; - } - if (isset($attribs['baseinstalldir'])) { - $this->dir_install = $attribs['baseinstalldir']; - } - if (isset($attribs['role'])) { - $this->dir_role = $attribs['role']; - } - break; - case 'file': - if ($this->in_changelog) { - break; - } - if (isset($attribs['name'])) { - $path = ''; - if (count($this->dir_names)) { - foreach ($this->dir_names as $dir) { - $path .= $dir . '/'; - } - } - $path .= preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'), - $attribs['name']); - unset($attribs['name']); - $this->current_path = $path; - $this->filelist[$path] = $attribs; - // Set the baseinstalldir only if the file don't have this attrib - if (!isset($this->filelist[$path]['baseinstalldir']) && - isset($this->dir_install)) - { - $this->filelist[$path]['baseinstalldir'] = $this->dir_install; - } - // Set the Role - if (!isset($this->filelist[$path]['role']) && isset($this->dir_role)) { - $this->filelist[$path]['role'] = $this->dir_role; - } - } - break; - case 'replace': - if (!$this->in_changelog) { - $this->filelist[$this->current_path]['replacements'][] = $attribs; - } - break; - case 'maintainers': - $this->_packageInfo['maintainers'] = array(); - $this->m_i = 0; // maintainers array index - break; - case 'maintainer': - // compatibility check - if (!isset($this->_packageInfo['maintainers'])) { - $this->_packageInfo['maintainers'] = array(); - $this->m_i = 0; - } - $this->_packageInfo['maintainers'][$this->m_i] = array(); - $this->current_maintainer =& $this->_packageInfo['maintainers'][$this->m_i]; - break; - case 'changelog': - $this->_packageInfo['changelog'] = array(); - $this->c_i = 0; // changelog array index - $this->in_changelog = true; - break; - case 'release': - if ($this->in_changelog) { - $this->_packageInfo['changelog'][$this->c_i] = array(); - $this->current_release = &$this->_packageInfo['changelog'][$this->c_i]; - } else { - $this->current_release = &$this->_packageInfo; - } - break; - case 'deps': - if (!$this->in_changelog) { - $this->_packageInfo['release_deps'] = array(); - } - break; - case 'dep': - // dependencies array index - if (!$this->in_changelog) { - $this->d_i++; - isset($attribs['type']) ? ($attribs['type'] = strtolower($attribs['type'])) : false; - $this->_packageInfo['release_deps'][$this->d_i] = $attribs; - } - break; - case 'configureoptions': - if (!$this->in_changelog) { - $this->_packageInfo['configure_options'] = array(); - } - break; - case 'configureoption': - if (!$this->in_changelog) { - $this->_packageInfo['configure_options'][] = $attribs; - } - break; - case 'provides': - if (empty($attribs['type']) || empty($attribs['name'])) { - break; - } - $attribs['explicit'] = true; - $this->_packageInfo['provides']["$attribs[type];$attribs[name]"] = $attribs; - break; - case 'package' : - if (isset($attribs['version'])) { - $this->_packageInfo['xsdversion'] = trim($attribs['version']); - } else { - $this->_packageInfo['xsdversion'] = '1.0'; - } - if (isset($attribs['packagerversion'])) { - $this->_packageInfo['packagerversion'] = $attribs['packagerversion']; - } - break; - } - } - - // }}} - // {{{ _element_end_1_0() - - /** - * XML parser callback for ending elements. Used for version 1.0 - * packages. - * - * @param resource $xp XML parser resource - * @param string $name name of ending element - * - * @return void - * - * @access private - */ - function _element_end_1_0($xp, $name) - { - $data = trim($this->cdata); - switch ($name) { - case 'name': - switch ($this->prev_element) { - case 'package': - $this->_packageInfo['package'] = $data; - break; - case 'maintainer': - $this->current_maintainer['name'] = $data; - break; - } - break; - case 'extends' : - $this->_packageInfo['extends'] = $data; - break; - case 'summary': - $this->_packageInfo['summary'] = $data; - break; - case 'description': - $data = $this->_unIndent($this->cdata); - $this->_packageInfo['description'] = $data; - break; - case 'user': - $this->current_maintainer['handle'] = $data; - break; - case 'email': - $this->current_maintainer['email'] = $data; - break; - case 'role': - $this->current_maintainer['role'] = $data; - break; - case 'version': - if ($this->in_changelog) { - $this->current_release['version'] = $data; - } else { - $this->_packageInfo['version'] = $data; - } - break; - case 'date': - if ($this->in_changelog) { - $this->current_release['release_date'] = $data; - } else { - $this->_packageInfo['release_date'] = $data; - } - break; - case 'notes': - // try to "de-indent" release notes in case someone - // has been over-indenting their xml ;-) - // Trim only on the right side - $data = rtrim($this->_unIndent($this->cdata)); - if ($this->in_changelog) { - $this->current_release['release_notes'] = $data; - } else { - $this->_packageInfo['release_notes'] = $data; - } - break; - case 'warnings': - if ($this->in_changelog) { - $this->current_release['release_warnings'] = $data; - } else { - $this->_packageInfo['release_warnings'] = $data; - } - break; - case 'state': - if ($this->in_changelog) { - $this->current_release['release_state'] = $data; - } else { - $this->_packageInfo['release_state'] = $data; - } - break; - case 'license': - if ($this->in_changelog) { - $this->current_release['release_license'] = $data; - } else { - $this->_packageInfo['release_license'] = $data; - } - break; - case 'dep': - if ($data && !$this->in_changelog) { - $this->_packageInfo['release_deps'][$this->d_i]['name'] = $data; - } - break; - case 'dir': - if ($this->in_changelog) { - break; - } - array_pop($this->dir_names); - break; - case 'file': - if ($this->in_changelog) { - break; - } - if ($data) { - $path = ''; - if (count($this->dir_names)) { - foreach ($this->dir_names as $dir) { - $path .= $dir . '/'; - } - } - $path .= $data; - $this->filelist[$path] = $this->current_attributes; - // Set the baseinstalldir only if the file don't have this attrib - if (!isset($this->filelist[$path]['baseinstalldir']) && - isset($this->dir_install)) - { - $this->filelist[$path]['baseinstalldir'] = $this->dir_install; - } - // Set the Role - if (!isset($this->filelist[$path]['role']) && isset($this->dir_role)) { - $this->filelist[$path]['role'] = $this->dir_role; - } - } - break; - case 'maintainer': - if (empty($this->_packageInfo['maintainers'][$this->m_i]['role'])) { - $this->_packageInfo['maintainers'][$this->m_i]['role'] = 'lead'; - } - $this->m_i++; - break; - case 'release': - if ($this->in_changelog) { - $this->c_i++; - } - break; - case 'changelog': - $this->in_changelog = false; - break; - } - array_pop($this->element_stack); - $spos = sizeof($this->element_stack) - 1; - $this->current_element = ($spos > 0) ? $this->element_stack[$spos] : ''; - $this->cdata = ''; - } - - // }}} - // {{{ _pkginfo_cdata_1_0() - - /** - * XML parser callback for character data. Used for version 1.0 - * packages. - * - * @param resource $xp XML parser resource - * @param string $name character data - * - * @return void - * - * @access private - */ - function _pkginfo_cdata_1_0($xp, $data) - { - if (isset($this->cdata)) { - $this->cdata .= $data; - } - } - - // }}} -} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/PackageFile/Parser/v2.php b/_piecrust/libs/PEAR/PackageFile/Parser/v2.php deleted file mode 100644 index a3ba706..0000000 --- a/_piecrust/libs/PEAR/PackageFile/Parser/v2.php +++ /dev/null @@ -1,113 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: v2.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ -/** - * base xml parser class - */ -require_once 'PEAR/XMLParser.php'; -require_once 'PEAR/PackageFile/v2.php'; -/** - * Parser for package.xml version 2.0 - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: @PEAR-VER@ - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_PackageFile_Parser_v2 extends PEAR_XMLParser -{ - var $_config; - var $_logger; - var $_registry; - - function setConfig(&$c) - { - $this->_config = &$c; - $this->_registry = &$c->getRegistry(); - } - - function setLogger(&$l) - { - $this->_logger = &$l; - } - /** - * Unindent given string - * - * @param string $str The string that has to be unindented. - * @return string - * @access private - */ - function _unIndent($str) - { - // remove leading newlines - $str = preg_replace('/^[\r\n]+/', '', $str); - // find whitespace at the beginning of the first line - $indent_len = strspn($str, " \t"); - $indent = substr($str, 0, $indent_len); - $data = ''; - // remove the same amount of whitespace from following lines - foreach (explode("\n", $str) as $line) { - if (substr($line, 0, $indent_len) == $indent) { - $data .= substr($line, $indent_len) . "\n"; - } else { - $data .= $line . "\n"; - } - } - return $data; - } - - /** - * post-process data - * - * @param string $data - * @param string $element element name - */ - function postProcess($data, $element) - { - if ($element == 'notes') { - return trim($this->_unIndent($data)); - } - return trim($data); - } - - /** - * @param string - * @param string file name of the package.xml - * @param string|false name of the archive this package.xml came from, if any - * @param string class name to instantiate and return. This must be PEAR_PackageFile_v2 or - * a subclass - * @return PEAR_PackageFile_v2 - */ - function &parse($data, $file, $archive = false, $class = 'PEAR_PackageFile_v2') - { - if (PEAR::isError($err = parent::parse($data, $file))) { - return $err; - } - - $ret = new $class; - $ret->encoding = $this->encoding; - $ret->setConfig($this->_config); - if (isset($this->_logger)) { - $ret->setLogger($this->_logger); - } - - $ret->fromArray($this->_unserializedData); - $ret->setPackagefile($file, $archive); - return $ret; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/PackageFile/v1.php b/_piecrust/libs/PEAR/PackageFile/v1.php deleted file mode 100644 index 43e346b..0000000 --- a/_piecrust/libs/PEAR/PackageFile/v1.php +++ /dev/null @@ -1,1612 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: v1.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ -/** - * For error handling - */ -require_once 'PEAR/ErrorStack.php'; - -/** - * Error code if parsing is attempted with no xml extension - */ -define('PEAR_PACKAGEFILE_ERROR_NO_XML_EXT', 3); - -/** - * Error code if creating the xml parser resource fails - */ -define('PEAR_PACKAGEFILE_ERROR_CANT_MAKE_PARSER', 4); - -/** - * Error code used for all sax xml parsing errors - */ -define('PEAR_PACKAGEFILE_ERROR_PARSER_ERROR', 5); - -/** - * Error code used when there is no name - */ -define('PEAR_PACKAGEFILE_ERROR_NO_NAME', 6); - -/** - * Error code when a package name is not valid - */ -define('PEAR_PACKAGEFILE_ERROR_INVALID_NAME', 7); - -/** - * Error code used when no summary is parsed - */ -define('PEAR_PACKAGEFILE_ERROR_NO_SUMMARY', 8); - -/** - * Error code for summaries that are more than 1 line - */ -define('PEAR_PACKAGEFILE_ERROR_MULTILINE_SUMMARY', 9); - -/** - * Error code used when no description is present - */ -define('PEAR_PACKAGEFILE_ERROR_NO_DESCRIPTION', 10); - -/** - * Error code used when no license is present - */ -define('PEAR_PACKAGEFILE_ERROR_NO_LICENSE', 11); - -/** - * Error code used when a version number is not present - */ -define('PEAR_PACKAGEFILE_ERROR_NO_VERSION', 12); - -/** - * Error code used when a version number is invalid - */ -define('PEAR_PACKAGEFILE_ERROR_INVALID_VERSION', 13); - -/** - * Error code when release state is missing - */ -define('PEAR_PACKAGEFILE_ERROR_NO_STATE', 14); - -/** - * Error code when release state is invalid - */ -define('PEAR_PACKAGEFILE_ERROR_INVALID_STATE', 15); - -/** - * Error code when release state is missing - */ -define('PEAR_PACKAGEFILE_ERROR_NO_DATE', 16); - -/** - * Error code when release state is invalid - */ -define('PEAR_PACKAGEFILE_ERROR_INVALID_DATE', 17); - -/** - * Error code when no release notes are found - */ -define('PEAR_PACKAGEFILE_ERROR_NO_NOTES', 18); - -/** - * Error code when no maintainers are found - */ -define('PEAR_PACKAGEFILE_ERROR_NO_MAINTAINERS', 19); - -/** - * Error code when a maintainer has no handle - */ -define('PEAR_PACKAGEFILE_ERROR_NO_MAINTHANDLE', 20); - -/** - * Error code when a maintainer has no handle - */ -define('PEAR_PACKAGEFILE_ERROR_NO_MAINTROLE', 21); - -/** - * Error code when a maintainer has no name - */ -define('PEAR_PACKAGEFILE_ERROR_NO_MAINTNAME', 22); - -/** - * Error code when a maintainer has no email - */ -define('PEAR_PACKAGEFILE_ERROR_NO_MAINTEMAIL', 23); - -/** - * Error code when a maintainer has no handle - */ -define('PEAR_PACKAGEFILE_ERROR_INVALID_MAINTROLE', 24); - -/** - * Error code when a dependency is not a PHP dependency, but has no name - */ -define('PEAR_PACKAGEFILE_ERROR_NO_DEPNAME', 25); - -/** - * Error code when a dependency has no type (pkg, php, etc.) - */ -define('PEAR_PACKAGEFILE_ERROR_NO_DEPTYPE', 26); - -/** - * Error code when a dependency has no relation (lt, ge, has, etc.) - */ -define('PEAR_PACKAGEFILE_ERROR_NO_DEPREL', 27); - -/** - * Error code when a dependency is not a 'has' relation, but has no version - */ -define('PEAR_PACKAGEFILE_ERROR_NO_DEPVERSION', 28); - -/** - * Error code when a dependency has an invalid relation - */ -define('PEAR_PACKAGEFILE_ERROR_INVALID_DEPREL', 29); - -/** - * Error code when a dependency has an invalid type - */ -define('PEAR_PACKAGEFILE_ERROR_INVALID_DEPTYPE', 30); - -/** - * Error code when a dependency has an invalid optional option - */ -define('PEAR_PACKAGEFILE_ERROR_INVALID_DEPOPTIONAL', 31); - -/** - * Error code when a dependency is a pkg dependency, and has an invalid package name - */ -define('PEAR_PACKAGEFILE_ERROR_INVALID_DEPNAME', 32); - -/** - * Error code when a dependency has a channel="foo" attribute, and foo is not a registered channel - */ -define('PEAR_PACKAGEFILE_ERROR_UNKNOWN_DEPCHANNEL', 33); - -/** - * Error code when rel="has" and version attribute is present. - */ -define('PEAR_PACKAGEFILE_ERROR_DEPVERSION_IGNORED', 34); - -/** - * Error code when type="php" and dependency name is present - */ -define('PEAR_PACKAGEFILE_ERROR_DEPNAME_IGNORED', 35); - -/** - * Error code when a configure option has no name - */ -define('PEAR_PACKAGEFILE_ERROR_NO_CONFNAME', 36); - -/** - * Error code when a configure option has no name - */ -define('PEAR_PACKAGEFILE_ERROR_NO_CONFPROMPT', 37); - -/** - * Error code when a file in the filelist has an invalid role - */ -define('PEAR_PACKAGEFILE_ERROR_INVALID_FILEROLE', 38); - -/** - * Error code when a file in the filelist has no role - */ -define('PEAR_PACKAGEFILE_ERROR_NO_FILEROLE', 39); - -/** - * Error code when analyzing a php source file that has parse errors - */ -define('PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE', 40); - -/** - * Error code when analyzing a php source file reveals a source element - * without a package name prefix - */ -define('PEAR_PACKAGEFILE_ERROR_NO_PNAME_PREFIX', 41); - -/** - * Error code when an unknown channel is specified - */ -define('PEAR_PACKAGEFILE_ERROR_UNKNOWN_CHANNEL', 42); - -/** - * Error code when no files are found in the filelist - */ -define('PEAR_PACKAGEFILE_ERROR_NO_FILES', 43); - -/** - * Error code when a file is not valid php according to _analyzeSourceCode() - */ -define('PEAR_PACKAGEFILE_ERROR_INVALID_FILE', 44); - -/** - * Error code when the channel validator returns an error or warning - */ -define('PEAR_PACKAGEFILE_ERROR_CHANNELVAL', 45); - -/** - * Error code when a php5 package is packaged in php4 (analysis doesn't work) - */ -define('PEAR_PACKAGEFILE_ERROR_PHP5', 46); - -/** - * Error code when a file is listed in package.xml but does not exist - */ -define('PEAR_PACKAGEFILE_ERROR_FILE_NOTFOUND', 47); - -/** - * Error code when a - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_PackageFile_v1 -{ - /** - * @access private - * @var PEAR_ErrorStack - * @access private - */ - var $_stack; - - /** - * A registry object, used to access the package name validation regex for non-standard channels - * @var PEAR_Registry - * @access private - */ - var $_registry; - - /** - * An object that contains a log method that matches PEAR_Common::log's signature - * @var object - * @access private - */ - var $_logger; - - /** - * Parsed package information - * @var array - * @access private - */ - var $_packageInfo; - - /** - * path to package.xml - * @var string - * @access private - */ - var $_packageFile; - - /** - * path to package .tgz or false if this is a local/extracted package.xml - * @var string - * @access private - */ - var $_archiveFile; - - /** - * @var int - * @access private - */ - var $_isValid = 0; - - /** - * Determines whether this packagefile was initialized only with partial package info - * - * If this package file was constructed via parsing REST, it will only contain - * - * - package name - * - channel name - * - dependencies - * @var boolean - * @access private - */ - var $_incomplete = true; - - /** - * @param bool determines whether to return a PEAR_Error object, or use the PEAR_ErrorStack - * @param string Name of Error Stack class to use. - */ - function PEAR_PackageFile_v1() - { - $this->_stack = &new PEAR_ErrorStack('PEAR_PackageFile_v1'); - $this->_stack->setErrorMessageTemplate($this->_getErrorMessage()); - $this->_isValid = 0; - } - - function installBinary($installer) - { - return false; - } - - function isExtension($name) - { - return false; - } - - function setConfig(&$config) - { - $this->_config = &$config; - $this->_registry = &$config->getRegistry(); - } - - function setRequestedGroup() - { - // placeholder - } - - /** - * For saving in the registry. - * - * Set the last version that was installed - * @param string - */ - function setLastInstalledVersion($version) - { - $this->_packageInfo['_lastversion'] = $version; - } - - /** - * @return string|false - */ - function getLastInstalledVersion() - { - if (isset($this->_packageInfo['_lastversion'])) { - return $this->_packageInfo['_lastversion']; - } - return false; - } - - function getInstalledBinary() - { - return false; - } - - function listPostinstallScripts() - { - return false; - } - - function initPostinstallScripts() - { - return false; - } - - function setLogger(&$logger) - { - if ($logger && (!is_object($logger) || !method_exists($logger, 'log'))) { - return PEAR::raiseError('Logger must be compatible with PEAR_Common::log'); - } - $this->_logger = &$logger; - } - - function setPackagefile($file, $archive = false) - { - $this->_packageFile = $file; - $this->_archiveFile = $archive ? $archive : $file; - } - - function getPackageFile() - { - return isset($this->_packageFile) ? $this->_packageFile : false; - } - - function getPackageType() - { - return 'php'; - } - - function getArchiveFile() - { - return $this->_archiveFile; - } - - function packageInfo($field) - { - if (!is_string($field) || empty($field) || - !isset($this->_packageInfo[$field])) { - return false; - } - return $this->_packageInfo[$field]; - } - - function setDirtree($path) - { - if (!isset($this->_packageInfo['dirtree'])) { - $this->_packageInfo['dirtree'] = array(); - } - $this->_packageInfo['dirtree'][$path] = true; - } - - function getDirtree() - { - if (isset($this->_packageInfo['dirtree']) && count($this->_packageInfo['dirtree'])) { - return $this->_packageInfo['dirtree']; - } - return false; - } - - function resetDirtree() - { - unset($this->_packageInfo['dirtree']); - } - - function fromArray($pinfo) - { - $this->_incomplete = false; - $this->_packageInfo = $pinfo; - } - - function isIncomplete() - { - return $this->_incomplete; - } - - function getChannel() - { - return 'pear.php.net'; - } - - function getUri() - { - return false; - } - - function getTime() - { - return false; - } - - function getExtends() - { - if (isset($this->_packageInfo['extends'])) { - return $this->_packageInfo['extends']; - } - return false; - } - - /** - * @return array - */ - function toArray() - { - if (!$this->validate(PEAR_VALIDATE_NORMAL)) { - return false; - } - return $this->getArray(); - } - - function getArray() - { - return $this->_packageInfo; - } - - function getName() - { - return $this->getPackage(); - } - - function getPackage() - { - if (isset($this->_packageInfo['package'])) { - return $this->_packageInfo['package']; - } - return false; - } - - /** - * WARNING - don't use this unless you know what you are doing - */ - function setRawPackage($package) - { - $this->_packageInfo['package'] = $package; - } - - function setPackage($package) - { - $this->_packageInfo['package'] = $package; - $this->_isValid = false; - } - - function getVersion() - { - if (isset($this->_packageInfo['version'])) { - return $this->_packageInfo['version']; - } - return false; - } - - function setVersion($version) - { - $this->_packageInfo['version'] = $version; - $this->_isValid = false; - } - - function clearMaintainers() - { - unset($this->_packageInfo['maintainers']); - } - - function getMaintainers() - { - if (isset($this->_packageInfo['maintainers'])) { - return $this->_packageInfo['maintainers']; - } - return false; - } - - /** - * Adds a new maintainer - no checking of duplicates is performed, use - * updatemaintainer for that purpose. - */ - function addMaintainer($role, $handle, $name, $email) - { - $this->_packageInfo['maintainers'][] = - array('handle' => $handle, 'role' => $role, 'email' => $email, 'name' => $name); - $this->_isValid = false; - } - - function updateMaintainer($role, $handle, $name, $email) - { - $found = false; - if (!isset($this->_packageInfo['maintainers']) || - !is_array($this->_packageInfo['maintainers'])) { - return $this->addMaintainer($role, $handle, $name, $email); - } - foreach ($this->_packageInfo['maintainers'] as $i => $maintainer) { - if ($maintainer['handle'] == $handle) { - $found = $i; - break; - } - } - if ($found !== false) { - unset($this->_packageInfo['maintainers'][$found]); - $this->_packageInfo['maintainers'] = - array_values($this->_packageInfo['maintainers']); - } - $this->addMaintainer($role, $handle, $name, $email); - } - - function deleteMaintainer($handle) - { - $found = false; - foreach ($this->_packageInfo['maintainers'] as $i => $maintainer) { - if ($maintainer['handle'] == $handle) { - $found = $i; - break; - } - } - if ($found !== false) { - unset($this->_packageInfo['maintainers'][$found]); - $this->_packageInfo['maintainers'] = - array_values($this->_packageInfo['maintainers']); - return true; - } - return false; - } - - function getState() - { - if (isset($this->_packageInfo['release_state'])) { - return $this->_packageInfo['release_state']; - } - return false; - } - - function setRawState($state) - { - $this->_packageInfo['release_state'] = $state; - } - - function setState($state) - { - $this->_packageInfo['release_state'] = $state; - $this->_isValid = false; - } - - function getDate() - { - if (isset($this->_packageInfo['release_date'])) { - return $this->_packageInfo['release_date']; - } - return false; - } - - function setDate($date) - { - $this->_packageInfo['release_date'] = $date; - $this->_isValid = false; - } - - function getLicense() - { - if (isset($this->_packageInfo['release_license'])) { - return $this->_packageInfo['release_license']; - } - return false; - } - - function setLicense($date) - { - $this->_packageInfo['release_license'] = $date; - $this->_isValid = false; - } - - function getSummary() - { - if (isset($this->_packageInfo['summary'])) { - return $this->_packageInfo['summary']; - } - return false; - } - - function setSummary($summary) - { - $this->_packageInfo['summary'] = $summary; - $this->_isValid = false; - } - - function getDescription() - { - if (isset($this->_packageInfo['description'])) { - return $this->_packageInfo['description']; - } - return false; - } - - function setDescription($desc) - { - $this->_packageInfo['description'] = $desc; - $this->_isValid = false; - } - - function getNotes() - { - if (isset($this->_packageInfo['release_notes'])) { - return $this->_packageInfo['release_notes']; - } - return false; - } - - function setNotes($notes) - { - $this->_packageInfo['release_notes'] = $notes; - $this->_isValid = false; - } - - function getDeps() - { - if (isset($this->_packageInfo['release_deps'])) { - return $this->_packageInfo['release_deps']; - } - return false; - } - - /** - * Reset dependencies prior to adding new ones - */ - function clearDeps() - { - unset($this->_packageInfo['release_deps']); - } - - function addPhpDep($version, $rel) - { - $this->_isValid = false; - $this->_packageInfo['release_deps'][] = - array('type' => 'php', - 'rel' => $rel, - 'version' => $version); - } - - function addPackageDep($name, $version, $rel, $optional = 'no') - { - $this->_isValid = false; - $dep = - array('type' => 'pkg', - 'name' => $name, - 'rel' => $rel, - 'optional' => $optional); - if ($rel != 'has' && $rel != 'not') { - $dep['version'] = $version; - } - $this->_packageInfo['release_deps'][] = $dep; - } - - function addExtensionDep($name, $version, $rel, $optional = 'no') - { - $this->_isValid = false; - $this->_packageInfo['release_deps'][] = - array('type' => 'ext', - 'name' => $name, - 'rel' => $rel, - 'version' => $version, - 'optional' => $optional); - } - - /** - * WARNING - do not use this function directly unless you know what you're doing - */ - function setDeps($deps) - { - $this->_packageInfo['release_deps'] = $deps; - } - - function hasDeps() - { - return isset($this->_packageInfo['release_deps']) && - count($this->_packageInfo['release_deps']); - } - - function getDependencyGroup($group) - { - return false; - } - - function isCompatible($pf) - { - return false; - } - - function isSubpackageOf($p) - { - return $p->isSubpackage($this); - } - - function isSubpackage($p) - { - return false; - } - - function dependsOn($package, $channel) - { - if (strtolower($channel) != 'pear.php.net') { - return false; - } - if (!($deps = $this->getDeps())) { - return false; - } - foreach ($deps as $dep) { - if ($dep['type'] != 'pkg') { - continue; - } - if (strtolower($dep['name']) == strtolower($package)) { - return true; - } - } - return false; - } - - function getConfigureOptions() - { - if (isset($this->_packageInfo['configure_options'])) { - return $this->_packageInfo['configure_options']; - } - return false; - } - - function hasConfigureOptions() - { - return isset($this->_packageInfo['configure_options']) && - count($this->_packageInfo['configure_options']); - } - - function addConfigureOption($name, $prompt, $default = false) - { - $o = array('name' => $name, 'prompt' => $prompt); - if ($default !== false) { - $o['default'] = $default; - } - if (!isset($this->_packageInfo['configure_options'])) { - $this->_packageInfo['configure_options'] = array(); - } - $this->_packageInfo['configure_options'][] = $o; - } - - function clearConfigureOptions() - { - unset($this->_packageInfo['configure_options']); - } - - function getProvides() - { - if (isset($this->_packageInfo['provides'])) { - return $this->_packageInfo['provides']; - } - return false; - } - - function getProvidesExtension() - { - return false; - } - - function addFile($dir, $file, $attrs) - { - $dir = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'), $dir); - if ($dir == '/' || $dir == '') { - $dir = ''; - } else { - $dir .= '/'; - } - $file = $dir . $file; - $file = preg_replace('![\\/]+!', '/', $file); - $this->_packageInfo['filelist'][$file] = $attrs; - } - - function getInstallationFilelist() - { - return $this->getFilelist(); - } - - function getFilelist() - { - if (isset($this->_packageInfo['filelist'])) { - return $this->_packageInfo['filelist']; - } - return false; - } - - function setFileAttribute($file, $attr, $value) - { - $this->_packageInfo['filelist'][$file][$attr] = $value; - } - - function resetFilelist() - { - $this->_packageInfo['filelist'] = array(); - } - - function setInstalledAs($file, $path) - { - if ($path) { - return $this->_packageInfo['filelist'][$file]['installed_as'] = $path; - } - unset($this->_packageInfo['filelist'][$file]['installed_as']); - } - - function installedFile($file, $atts) - { - if (isset($this->_packageInfo['filelist'][$file])) { - $this->_packageInfo['filelist'][$file] = - array_merge($this->_packageInfo['filelist'][$file], $atts); - } else { - $this->_packageInfo['filelist'][$file] = $atts; - } - } - - function getChangelog() - { - if (isset($this->_packageInfo['changelog'])) { - return $this->_packageInfo['changelog']; - } - return false; - } - - function getPackagexmlVersion() - { - return '1.0'; - } - - /** - * Wrapper to {@link PEAR_ErrorStack::getErrors()} - * @param boolean determines whether to purge the error stack after retrieving - * @return array - */ - function getValidationWarnings($purge = true) - { - return $this->_stack->getErrors($purge); - } - - // }}} - /** - * Validation error. Also marks the object contents as invalid - * @param error code - * @param array error information - * @access private - */ - function _validateError($code, $params = array()) - { - $this->_stack->push($code, 'error', $params, false, false, debug_backtrace()); - $this->_isValid = false; - } - - /** - * Validation warning. Does not mark the object contents invalid. - * @param error code - * @param array error information - * @access private - */ - function _validateWarning($code, $params = array()) - { - $this->_stack->push($code, 'warning', $params, false, false, debug_backtrace()); - } - - /** - * @param integer error code - * @access protected - */ - function _getErrorMessage() - { - return array( - PEAR_PACKAGEFILE_ERROR_NO_NAME => - 'Missing Package Name', - PEAR_PACKAGEFILE_ERROR_NO_SUMMARY => - 'No summary found', - PEAR_PACKAGEFILE_ERROR_MULTILINE_SUMMARY => - 'Summary should be on one line', - PEAR_PACKAGEFILE_ERROR_NO_DESCRIPTION => - 'Missing description', - PEAR_PACKAGEFILE_ERROR_NO_LICENSE => - 'Missing license', - PEAR_PACKAGEFILE_ERROR_NO_VERSION => - 'No release version found', - PEAR_PACKAGEFILE_ERROR_NO_STATE => - 'No release state found', - PEAR_PACKAGEFILE_ERROR_NO_DATE => - 'No release date found', - PEAR_PACKAGEFILE_ERROR_NO_NOTES => - 'No release notes found', - PEAR_PACKAGEFILE_ERROR_NO_LEAD => - 'Package must have at least one lead maintainer', - PEAR_PACKAGEFILE_ERROR_NO_MAINTAINERS => - 'No maintainers found, at least one must be defined', - PEAR_PACKAGEFILE_ERROR_NO_MAINTHANDLE => - 'Maintainer %index% has no handle (user ID at channel server)', - PEAR_PACKAGEFILE_ERROR_NO_MAINTROLE => - 'Maintainer %index% has no role', - PEAR_PACKAGEFILE_ERROR_NO_MAINTNAME => - 'Maintainer %index% has no name', - PEAR_PACKAGEFILE_ERROR_NO_MAINTEMAIL => - 'Maintainer %index% has no email', - PEAR_PACKAGEFILE_ERROR_NO_DEPNAME => - 'Dependency %index% is not a php dependency, and has no name', - PEAR_PACKAGEFILE_ERROR_NO_DEPREL => - 'Dependency %index% has no relation (rel)', - PEAR_PACKAGEFILE_ERROR_NO_DEPTYPE => - 'Dependency %index% has no type', - PEAR_PACKAGEFILE_ERROR_DEPNAME_IGNORED => - 'PHP Dependency %index% has a name attribute of "%name%" which will be' . - ' ignored!', - PEAR_PACKAGEFILE_ERROR_NO_DEPVERSION => - 'Dependency %index% is not a rel="has" or rel="not" dependency, ' . - 'and has no version', - PEAR_PACKAGEFILE_ERROR_NO_DEPPHPVERSION => - 'Dependency %index% is a type="php" dependency, ' . - 'and has no version', - PEAR_PACKAGEFILE_ERROR_DEPVERSION_IGNORED => - 'Dependency %index% is a rel="%rel%" dependency, versioning is ignored', - PEAR_PACKAGEFILE_ERROR_INVALID_DEPOPTIONAL => - 'Dependency %index% has invalid optional value "%opt%", should be yes or no', - PEAR_PACKAGEFILE_PHP_NO_NOT => - 'Dependency %index%: php dependencies cannot use "not" rel, use "ne"' . - ' to exclude specific versions', - PEAR_PACKAGEFILE_ERROR_NO_CONFNAME => - 'Configure Option %index% has no name', - PEAR_PACKAGEFILE_ERROR_NO_CONFPROMPT => - 'Configure Option %index% has no prompt', - PEAR_PACKAGEFILE_ERROR_NO_FILES => - 'No files in section of package.xml', - PEAR_PACKAGEFILE_ERROR_NO_FILEROLE => - 'File "%file%" has no role, expecting one of "%roles%"', - PEAR_PACKAGEFILE_ERROR_INVALID_FILEROLE => - 'File "%file%" has invalid role "%role%", expecting one of "%roles%"', - PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME => - 'File "%file%" cannot start with ".", cannot package or install', - PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE => - 'Parser error: invalid PHP found in file "%file%"', - PEAR_PACKAGEFILE_ERROR_NO_PNAME_PREFIX => - 'in %file%: %type% "%name%" not prefixed with package name "%package%"', - PEAR_PACKAGEFILE_ERROR_INVALID_FILE => - 'Parser error: invalid PHP file "%file%"', - PEAR_PACKAGEFILE_ERROR_CHANNELVAL => - 'Channel validator error: field "%field%" - %reason%', - PEAR_PACKAGEFILE_ERROR_PHP5 => - 'Error, PHP5 token encountered in %file%, analysis should be in PHP5', - PEAR_PACKAGEFILE_ERROR_FILE_NOTFOUND => - 'File "%file%" in package.xml does not exist', - PEAR_PACKAGEFILE_ERROR_NON_ISO_CHARS => - 'Package.xml contains non-ISO-8859-1 characters, and may not validate', - ); - } - - /** - * Validate XML package definition file. - * - * @access public - * @return boolean - */ - function validate($state = PEAR_VALIDATE_NORMAL, $nofilechecking = false) - { - if (($this->_isValid & $state) == $state) { - return true; - } - $this->_isValid = true; - $info = $this->_packageInfo; - if (empty($info['package'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_NAME); - $this->_packageName = $pn = 'unknown'; - } else { - $this->_packageName = $pn = $info['package']; - } - - if (empty($info['summary'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_SUMMARY); - } elseif (strpos(trim($info['summary']), "\n") !== false) { - $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_MULTILINE_SUMMARY, - array('summary' => $info['summary'])); - } - if (empty($info['description'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DESCRIPTION); - } - if (empty($info['release_license'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_LICENSE); - } - if (empty($info['version'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_VERSION); - } - if (empty($info['release_state'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_STATE); - } - if (empty($info['release_date'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DATE); - } - if (empty($info['release_notes'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_NOTES); - } - if (empty($info['maintainers'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTAINERS); - } else { - $haslead = false; - $i = 1; - foreach ($info['maintainers'] as $m) { - if (empty($m['handle'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTHANDLE, - array('index' => $i)); - } - if (empty($m['role'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTROLE, - array('index' => $i, 'roles' => PEAR_Common::getUserRoles())); - } elseif ($m['role'] == 'lead') { - $haslead = true; - } - if (empty($m['name'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTNAME, - array('index' => $i)); - } - if (empty($m['email'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_MAINTEMAIL, - array('index' => $i)); - } - $i++; - } - if (!$haslead) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_LEAD); - } - } - if (!empty($info['release_deps'])) { - $i = 1; - foreach ($info['release_deps'] as $d) { - if (!isset($d['type']) || empty($d['type'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPTYPE, - array('index' => $i, 'types' => PEAR_Common::getDependencyTypes())); - continue; - } - if (!isset($d['rel']) || empty($d['rel'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPREL, - array('index' => $i, 'rels' => PEAR_Common::getDependencyRelations())); - continue; - } - if (!empty($d['optional'])) { - if (!in_array($d['optional'], array('yes', 'no'))) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_DEPOPTIONAL, - array('index' => $i, 'opt' => $d['optional'])); - } - } - if ($d['rel'] != 'has' && $d['rel'] != 'not' && empty($d['version'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPVERSION, - array('index' => $i)); - } elseif (($d['rel'] == 'has' || $d['rel'] == 'not') && !empty($d['version'])) { - $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_DEPVERSION_IGNORED, - array('index' => $i, 'rel' => $d['rel'])); - } - if ($d['type'] == 'php' && !empty($d['name'])) { - $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_DEPNAME_IGNORED, - array('index' => $i, 'name' => $d['name'])); - } elseif ($d['type'] != 'php' && empty($d['name'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPNAME, - array('index' => $i)); - } - if ($d['type'] == 'php' && empty($d['version'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_DEPPHPVERSION, - array('index' => $i)); - } - if (($d['rel'] == 'not') && ($d['type'] == 'php')) { - $this->_validateError(PEAR_PACKAGEFILE_PHP_NO_NOT, - array('index' => $i)); - } - $i++; - } - } - if (!empty($info['configure_options'])) { - $i = 1; - foreach ($info['configure_options'] as $c) { - if (empty($c['name'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_CONFNAME, - array('index' => $i)); - } - if (empty($c['prompt'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_CONFPROMPT, - array('index' => $i)); - } - $i++; - } - } - if (empty($info['filelist'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_FILES); - $errors[] = 'no files'; - } else { - foreach ($info['filelist'] as $file => $fa) { - if (empty($fa['role'])) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_NO_FILEROLE, - array('file' => $file, 'roles' => PEAR_Common::getFileRoles())); - continue; - } elseif (!in_array($fa['role'], PEAR_Common::getFileRoles())) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILEROLE, - array('file' => $file, 'role' => $fa['role'], 'roles' => PEAR_Common::getFileRoles())); - } - if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~', str_replace('\\', '/', $file))) { - // file contains .. parent directory or . cur directory references - $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME, - array('file' => $file)); - } - if (isset($fa['install-as']) && - preg_match('~/\.\.?(/|\\z)|^\.\.?/~', - str_replace('\\', '/', $fa['install-as']))) { - // install-as contains .. parent directory or . cur directory references - $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME, - array('file' => $file . ' [installed as ' . $fa['install-as'] . ']')); - } - if (isset($fa['baseinstalldir']) && - preg_match('~/\.\.?(/|\\z)|^\.\.?/~', - str_replace('\\', '/', $fa['baseinstalldir']))) { - // install-as contains .. parent directory or . cur directory references - $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILENAME, - array('file' => $file . ' [baseinstalldir ' . $fa['baseinstalldir'] . ']')); - } - } - } - if (isset($this->_registry) && $this->_isValid) { - $chan = $this->_registry->getChannel('pear.php.net'); - if (PEAR::isError($chan)) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_CHANNELVAL, $chan->getMessage()); - return $this->_isValid = 0; - } - $validator = $chan->getValidationObject(); - $validator->setPackageFile($this); - $validator->validate($state); - $failures = $validator->getFailures(); - foreach ($failures['errors'] as $error) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_CHANNELVAL, $error); - } - foreach ($failures['warnings'] as $warning) { - $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_CHANNELVAL, $warning); - } - } - if ($this->_isValid && $state == PEAR_VALIDATE_PACKAGING && !$nofilechecking) { - if ($this->_analyzePhpFiles()) { - $this->_isValid = true; - } - } - if ($this->_isValid) { - return $this->_isValid = $state; - } - return $this->_isValid = 0; - } - - function _analyzePhpFiles() - { - if (!$this->_isValid) { - return false; - } - if (!isset($this->_packageFile)) { - return false; - } - $dir_prefix = dirname($this->_packageFile); - $common = new PEAR_Common; - $log = isset($this->_logger) ? array(&$this->_logger, 'log') : - array($common, 'log'); - $info = $this->getFilelist(); - foreach ($info as $file => $fa) { - if (!file_exists($dir_prefix . DIRECTORY_SEPARATOR . $file)) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_FILE_NOTFOUND, - array('file' => realpath($dir_prefix) . DIRECTORY_SEPARATOR . $file)); - continue; - } - if ($fa['role'] == 'php' && $dir_prefix) { - call_user_func_array($log, array(1, "Analyzing $file")); - $srcinfo = $this->_analyzeSourceCode($dir_prefix . DIRECTORY_SEPARATOR . $file); - if ($srcinfo) { - $this->_buildProvidesArray($srcinfo); - } - } - } - $this->_packageName = $pn = $this->getPackage(); - $pnl = strlen($pn); - if (isset($this->_packageInfo['provides'])) { - foreach ((array) $this->_packageInfo['provides'] as $key => $what) { - if (isset($what['explicit'])) { - // skip conformance checks if the provides entry is - // specified in the package.xml file - continue; - } - extract($what); - if ($type == 'class') { - if (!strncasecmp($name, $pn, $pnl)) { - continue; - } - $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_NO_PNAME_PREFIX, - array('file' => $file, 'type' => $type, 'name' => $name, 'package' => $pn)); - } elseif ($type == 'function') { - if (strstr($name, '::') || !strncasecmp($name, $pn, $pnl)) { - continue; - } - $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_NO_PNAME_PREFIX, - array('file' => $file, 'type' => $type, 'name' => $name, 'package' => $pn)); - } - } - } - return $this->_isValid; - } - - /** - * Get the default xml generator object - * - * @return PEAR_PackageFile_Generator_v1 - */ - function &getDefaultGenerator() - { - if (!class_exists('PEAR_PackageFile_Generator_v1')) { - require_once 'PEAR/PackageFile/Generator/v1.php'; - } - $a = &new PEAR_PackageFile_Generator_v1($this); - return $a; - } - - /** - * Get the contents of a file listed within the package.xml - * @param string - * @return string - */ - function getFileContents($file) - { - if ($this->_archiveFile == $this->_packageFile) { // unpacked - $dir = dirname($this->_packageFile); - $file = $dir . DIRECTORY_SEPARATOR . $file; - $file = str_replace(array('/', '\\'), - array(DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR), $file); - if (file_exists($file) && is_readable($file)) { - return implode('', file($file)); - } - } else { // tgz - if (!class_exists('Archive_Tar')) { - require_once 'Archive/Tar.php'; - } - $tar = &new Archive_Tar($this->_archiveFile); - $tar->pushErrorHandling(PEAR_ERROR_RETURN); - if ($file != 'package.xml' && $file != 'package2.xml') { - $file = $this->getPackage() . '-' . $this->getVersion() . '/' . $file; - } - $file = $tar->extractInString($file); - $tar->popErrorHandling(); - if (PEAR::isError($file)) { - return PEAR::raiseError("Cannot locate file '$file' in archive"); - } - return $file; - } - } - - // {{{ analyzeSourceCode() - /** - * Analyze the source code of the given PHP file - * - * @param string Filename of the PHP file - * @return mixed - * @access private - */ - function _analyzeSourceCode($file) - { - if (!function_exists("token_get_all")) { - return false; - } - if (!defined('T_DOC_COMMENT')) { - define('T_DOC_COMMENT', T_COMMENT); - } - if (!defined('T_INTERFACE')) { - define('T_INTERFACE', -1); - } - if (!defined('T_IMPLEMENTS')) { - define('T_IMPLEMENTS', -1); - } - if (!$fp = @fopen($file, "r")) { - return false; - } - fclose($fp); - $contents = file_get_contents($file); - $tokens = token_get_all($contents); -/* - for ($i = 0; $i < sizeof($tokens); $i++) { - @list($token, $data) = $tokens[$i]; - if (is_string($token)) { - var_dump($token); - } else { - print token_name($token) . ' '; - var_dump(rtrim($data)); - } - } -*/ - $look_for = 0; - $paren_level = 0; - $bracket_level = 0; - $brace_level = 0; - $lastphpdoc = ''; - $current_class = ''; - $current_interface = ''; - $current_class_level = -1; - $current_function = ''; - $current_function_level = -1; - $declared_classes = array(); - $declared_interfaces = array(); - $declared_functions = array(); - $declared_methods = array(); - $used_classes = array(); - $used_functions = array(); - $extends = array(); - $implements = array(); - $nodeps = array(); - $inquote = false; - $interface = false; - for ($i = 0; $i < sizeof($tokens); $i++) { - if (is_array($tokens[$i])) { - list($token, $data) = $tokens[$i]; - } else { - $token = $tokens[$i]; - $data = ''; - } - if ($inquote) { - if ($token != '"' && $token != T_END_HEREDOC) { - continue; - } else { - $inquote = false; - continue; - } - } - switch ($token) { - case T_WHITESPACE : - continue; - case ';': - if ($interface) { - $current_function = ''; - $current_function_level = -1; - } - break; - case '"': - case T_START_HEREDOC: - $inquote = true; - break; - case T_CURLY_OPEN: - case T_DOLLAR_OPEN_CURLY_BRACES: - case '{': $brace_level++; continue 2; - case '}': - $brace_level--; - if ($current_class_level == $brace_level) { - $current_class = ''; - $current_class_level = -1; - } - if ($current_function_level == $brace_level) { - $current_function = ''; - $current_function_level = -1; - } - continue 2; - case '[': $bracket_level++; continue 2; - case ']': $bracket_level--; continue 2; - case '(': $paren_level++; continue 2; - case ')': $paren_level--; continue 2; - case T_INTERFACE: - $interface = true; - case T_CLASS: - if (($current_class_level != -1) || ($current_function_level != -1)) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE, - array('file' => $file)); - return false; - } - case T_FUNCTION: - case T_NEW: - case T_EXTENDS: - case T_IMPLEMENTS: - $look_for = $token; - continue 2; - case T_STRING: - if (version_compare(zend_version(), '2.0', '<')) { - if (in_array(strtolower($data), - array('public', 'private', 'protected', 'abstract', - 'interface', 'implements', 'throw') - )) { - $this->_validateWarning(PEAR_PACKAGEFILE_ERROR_PHP5, - array($file)); - } - } - if ($look_for == T_CLASS) { - $current_class = $data; - $current_class_level = $brace_level; - $declared_classes[] = $current_class; - } elseif ($look_for == T_INTERFACE) { - $current_interface = $data; - $current_class_level = $brace_level; - $declared_interfaces[] = $current_interface; - } elseif ($look_for == T_IMPLEMENTS) { - $implements[$current_class] = $data; - } elseif ($look_for == T_EXTENDS) { - $extends[$current_class] = $data; - } elseif ($look_for == T_FUNCTION) { - if ($current_class) { - $current_function = "$current_class::$data"; - $declared_methods[$current_class][] = $data; - } elseif ($current_interface) { - $current_function = "$current_interface::$data"; - $declared_methods[$current_interface][] = $data; - } else { - $current_function = $data; - $declared_functions[] = $current_function; - } - $current_function_level = $brace_level; - $m = array(); - } elseif ($look_for == T_NEW) { - $used_classes[$data] = true; - } - $look_for = 0; - continue 2; - case T_VARIABLE: - $look_for = 0; - continue 2; - case T_DOC_COMMENT: - case T_COMMENT: - if (preg_match('!^/\*\*\s!', $data)) { - $lastphpdoc = $data; - if (preg_match_all('/@nodep\s+(\S+)/', $lastphpdoc, $m)) { - $nodeps = array_merge($nodeps, $m[1]); - } - } - continue 2; - case T_DOUBLE_COLON: - if (!($tokens[$i - 1][0] == T_WHITESPACE || $tokens[$i - 1][0] == T_STRING)) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE, - array('file' => $file)); - return false; - } - $class = $tokens[$i - 1][1]; - if (strtolower($class) != 'parent') { - $used_classes[$class] = true; - } - continue 2; - } - } - return array( - "source_file" => $file, - "declared_classes" => $declared_classes, - "declared_interfaces" => $declared_interfaces, - "declared_methods" => $declared_methods, - "declared_functions" => $declared_functions, - "used_classes" => array_diff(array_keys($used_classes), $nodeps), - "inheritance" => $extends, - "implements" => $implements, - ); - } - - /** - * Build a "provides" array from data returned by - * analyzeSourceCode(). The format of the built array is like - * this: - * - * array( - * 'class;MyClass' => 'array('type' => 'class', 'name' => 'MyClass'), - * ... - * ) - * - * - * @param array $srcinfo array with information about a source file - * as returned by the analyzeSourceCode() method. - * - * @return void - * - * @access private - * - */ - function _buildProvidesArray($srcinfo) - { - if (!$this->_isValid) { - return false; - } - $file = basename($srcinfo['source_file']); - $pn = $this->getPackage(); - $pnl = strlen($pn); - foreach ($srcinfo['declared_classes'] as $class) { - $key = "class;$class"; - if (isset($this->_packageInfo['provides'][$key])) { - continue; - } - $this->_packageInfo['provides'][$key] = - array('file'=> $file, 'type' => 'class', 'name' => $class); - if (isset($srcinfo['inheritance'][$class])) { - $this->_packageInfo['provides'][$key]['extends'] = - $srcinfo['inheritance'][$class]; - } - } - foreach ($srcinfo['declared_methods'] as $class => $methods) { - foreach ($methods as $method) { - $function = "$class::$method"; - $key = "function;$function"; - if ($method{0} == '_' || !strcasecmp($method, $class) || - isset($this->_packageInfo['provides'][$key])) { - continue; - } - $this->_packageInfo['provides'][$key] = - array('file'=> $file, 'type' => 'function', 'name' => $function); - } - } - - foreach ($srcinfo['declared_functions'] as $function) { - $key = "function;$function"; - if ($function{0} == '_' || isset($this->_packageInfo['provides'][$key])) { - continue; - } - if (!strstr($function, '::') && strncasecmp($function, $pn, $pnl)) { - $warnings[] = "in1 " . $file . ": function \"$function\" not prefixed with package name \"$pn\""; - } - $this->_packageInfo['provides'][$key] = - array('file'=> $file, 'type' => 'function', 'name' => $function); - } - } - - // }}} -} -?> diff --git a/_piecrust/libs/PEAR/PackageFile/v2.php b/_piecrust/libs/PEAR/PackageFile/v2.php deleted file mode 100644 index 1ca412d..0000000 --- a/_piecrust/libs/PEAR/PackageFile/v2.php +++ /dev/null @@ -1,2049 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: v2.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ -/** - * For error handling - */ -require_once 'PEAR/ErrorStack.php'; -/** - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_PackageFile_v2 -{ - - /** - * Parsed package information - * @var array - * @access private - */ - var $_packageInfo = array(); - - /** - * path to package .tgz or false if this is a local/extracted package.xml - * @var string|false - * @access private - */ - var $_archiveFile; - - /** - * path to package .xml or false if this is an abstract parsed-from-string xml - * @var string|false - * @access private - */ - var $_packageFile; - - /** - * This is used by file analysis routines to log progress information - * @var PEAR_Common - * @access protected - */ - var $_logger; - - /** - * This is set to the highest validation level that has been validated - * - * If the package.xml is invalid or unknown, this is set to 0. If - * normal validation has occurred, this is set to PEAR_VALIDATE_NORMAL. If - * downloading/installation validation has occurred it is set to PEAR_VALIDATE_DOWNLOADING - * or INSTALLING, and so on up to PEAR_VALIDATE_PACKAGING. This allows validation - * "caching" to occur, which is particularly important for package validation, so - * that PHP files are not validated twice - * @var int - * @access private - */ - var $_isValid = 0; - - /** - * True if the filelist has been validated - * @param bool - */ - var $_filesValid = false; - - /** - * @var PEAR_Registry - * @access protected - */ - var $_registry; - - /** - * @var PEAR_Config - * @access protected - */ - var $_config; - - /** - * Optional Dependency group requested for installation - * @var string - * @access private - */ - var $_requestedGroup = false; - - /** - * @var PEAR_ErrorStack - * @access protected - */ - var $_stack; - - /** - * Namespace prefix used for tasks in this package.xml - use tasks: whenever possible - */ - var $_tasksNs; - - /** - * Determines whether this packagefile was initialized only with partial package info - * - * If this package file was constructed via parsing REST, it will only contain - * - * - package name - * - channel name - * - dependencies - * @var boolean - * @access private - */ - var $_incomplete = true; - - /** - * @var PEAR_PackageFile_v2_Validator - */ - var $_v2Validator; - - /** - * The constructor merely sets up the private error stack - */ - function PEAR_PackageFile_v2() - { - $this->_stack = new PEAR_ErrorStack('PEAR_PackageFile_v2', false, null); - $this->_isValid = false; - } - - /** - * To make unit-testing easier - * @param PEAR_Frontend_* - * @param array options - * @param PEAR_Config - * @return PEAR_Downloader - * @access protected - */ - function &getPEARDownloader(&$i, $o, &$c) - { - $z = &new PEAR_Downloader($i, $o, $c); - return $z; - } - - /** - * To make unit-testing easier - * @param PEAR_Config - * @param array options - * @param array package name as returned from {@link PEAR_Registry::parsePackageName()} - * @param int PEAR_VALIDATE_* constant - * @return PEAR_Dependency2 - * @access protected - */ - function &getPEARDependency2(&$c, $o, $p, $s = PEAR_VALIDATE_INSTALLING) - { - if (!class_exists('PEAR_Dependency2')) { - require_once 'PEAR/Dependency2.php'; - } - $z = &new PEAR_Dependency2($c, $o, $p, $s); - return $z; - } - - function getInstalledBinary() - { - return isset($this->_packageInfo['#binarypackage']) ? $this->_packageInfo['#binarypackage'] : - false; - } - - /** - * Installation of source package has failed, attempt to download and install the - * binary version of this package. - * @param PEAR_Installer - * @return array|false - */ - function installBinary(&$installer) - { - if (!OS_WINDOWS) { - $a = false; - return $a; - } - if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') { - $releasetype = $this->getPackageType() . 'release'; - if (!is_array($installer->getInstallPackages())) { - $a = false; - return $a; - } - foreach ($installer->getInstallPackages() as $p) { - if ($p->isExtension($this->_packageInfo['providesextension'])) { - if ($p->getPackageType() != 'extsrc' && $p->getPackageType() != 'zendextsrc') { - $a = false; - return $a; // the user probably downloaded it separately - } - } - } - if (isset($this->_packageInfo[$releasetype]['binarypackage'])) { - $installer->log(0, 'Attempting to download binary version of extension "' . - $this->_packageInfo['providesextension'] . '"'); - $params = $this->_packageInfo[$releasetype]['binarypackage']; - if (!is_array($params) || !isset($params[0])) { - $params = array($params); - } - if (isset($this->_packageInfo['channel'])) { - foreach ($params as $i => $param) { - $params[$i] = array('channel' => $this->_packageInfo['channel'], - 'package' => $param, 'version' => $this->getVersion()); - } - } - $dl = &$this->getPEARDownloader($installer->ui, $installer->getOptions(), - $installer->config); - $verbose = $dl->config->get('verbose'); - $dl->config->set('verbose', -1); - foreach ($params as $param) { - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $ret = $dl->download(array($param)); - PEAR::popErrorHandling(); - if (is_array($ret) && count($ret)) { - break; - } - } - $dl->config->set('verbose', $verbose); - if (is_array($ret)) { - if (count($ret) == 1) { - $pf = $ret[0]->getPackageFile(); - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $err = $installer->install($ret[0]); - PEAR::popErrorHandling(); - if (is_array($err)) { - $this->_packageInfo['#binarypackage'] = $ret[0]->getPackage(); - // "install" self, so all dependencies will work transparently - $this->_registry->addPackage2($this); - $installer->log(0, 'Download and install of binary extension "' . - $this->_registry->parsedPackageNameToString( - array('channel' => $pf->getChannel(), - 'package' => $pf->getPackage()), true) . '" successful'); - $a = array($ret[0], $err); - return $a; - } - $installer->log(0, 'Download and install of binary extension "' . - $this->_registry->parsedPackageNameToString( - array('channel' => $pf->getChannel(), - 'package' => $pf->getPackage()), true) . '" failed'); - } - } - } - } - $a = false; - return $a; - } - - /** - * @return string|false Extension name - */ - function getProvidesExtension() - { - if (in_array($this->getPackageType(), - array('extsrc', 'extbin', 'zendextsrc', 'zendextbin'))) { - if (isset($this->_packageInfo['providesextension'])) { - return $this->_packageInfo['providesextension']; - } - } - return false; - } - - /** - * @param string Extension name - * @return bool - */ - function isExtension($extension) - { - if (in_array($this->getPackageType(), - array('extsrc', 'extbin', 'zendextsrc', 'zendextbin'))) { - return $this->_packageInfo['providesextension'] == $extension; - } - return false; - } - - /** - * Tests whether every part of the package.xml 1.0 is represented in - * this package.xml 2.0 - * @param PEAR_PackageFile_v1 - * @return bool - */ - function isEquivalent($pf1) - { - if (!$pf1) { - return true; - } - if ($this->getPackageType() == 'bundle') { - return false; - } - $this->_stack->getErrors(true); - if (!$pf1->validate(PEAR_VALIDATE_NORMAL)) { - return false; - } - $pass = true; - if ($pf1->getPackage() != $this->getPackage()) { - $this->_differentPackage($pf1->getPackage()); - $pass = false; - } - if ($pf1->getVersion() != $this->getVersion()) { - $this->_differentVersion($pf1->getVersion()); - $pass = false; - } - if (trim($pf1->getSummary()) != $this->getSummary()) { - $this->_differentSummary($pf1->getSummary()); - $pass = false; - } - if (preg_replace('/\s+/', '', $pf1->getDescription()) != - preg_replace('/\s+/', '', $this->getDescription())) { - $this->_differentDescription($pf1->getDescription()); - $pass = false; - } - if ($pf1->getState() != $this->getState()) { - $this->_differentState($pf1->getState()); - $pass = false; - } - if (!strstr(preg_replace('/\s+/', '', $this->getNotes()), - preg_replace('/\s+/', '', $pf1->getNotes()))) { - $this->_differentNotes($pf1->getNotes()); - $pass = false; - } - $mymaintainers = $this->getMaintainers(); - $yourmaintainers = $pf1->getMaintainers(); - for ($i1 = 0; $i1 < count($yourmaintainers); $i1++) { - $reset = false; - for ($i2 = 0; $i2 < count($mymaintainers); $i2++) { - if ($mymaintainers[$i2]['handle'] == $yourmaintainers[$i1]['handle']) { - if ($mymaintainers[$i2]['role'] != $yourmaintainers[$i1]['role']) { - $this->_differentRole($mymaintainers[$i2]['handle'], - $yourmaintainers[$i1]['role'], $mymaintainers[$i2]['role']); - $pass = false; - } - if ($mymaintainers[$i2]['email'] != $yourmaintainers[$i1]['email']) { - $this->_differentEmail($mymaintainers[$i2]['handle'], - $yourmaintainers[$i1]['email'], $mymaintainers[$i2]['email']); - $pass = false; - } - if ($mymaintainers[$i2]['name'] != $yourmaintainers[$i1]['name']) { - $this->_differentName($mymaintainers[$i2]['handle'], - $yourmaintainers[$i1]['name'], $mymaintainers[$i2]['name']); - $pass = false; - } - unset($mymaintainers[$i2]); - $mymaintainers = array_values($mymaintainers); - unset($yourmaintainers[$i1]); - $yourmaintainers = array_values($yourmaintainers); - $reset = true; - break; - } - } - if ($reset) { - $i1 = -1; - } - } - $this->_unmatchedMaintainers($mymaintainers, $yourmaintainers); - $filelist = $this->getFilelist(); - foreach ($pf1->getFilelist() as $file => $atts) { - if (!isset($filelist[$file])) { - $this->_missingFile($file); - $pass = false; - } - } - return $pass; - } - - function _differentPackage($package) - { - $this->_stack->push(__FUNCTION__, 'error', array('package' => $package, - 'self' => $this->getPackage()), - 'package.xml 1.0 package "%package%" does not match "%self%"'); - } - - function _differentVersion($version) - { - $this->_stack->push(__FUNCTION__, 'error', array('version' => $version, - 'self' => $this->getVersion()), - 'package.xml 1.0 version "%version%" does not match "%self%"'); - } - - function _differentState($state) - { - $this->_stack->push(__FUNCTION__, 'error', array('state' => $state, - 'self' => $this->getState()), - 'package.xml 1.0 state "%state%" does not match "%self%"'); - } - - function _differentRole($handle, $role, $selfrole) - { - $this->_stack->push(__FUNCTION__, 'error', array('handle' => $handle, - 'role' => $role, 'self' => $selfrole), - 'package.xml 1.0 maintainer "%handle%" role "%role%" does not match "%self%"'); - } - - function _differentEmail($handle, $email, $selfemail) - { - $this->_stack->push(__FUNCTION__, 'error', array('handle' => $handle, - 'email' => $email, 'self' => $selfemail), - 'package.xml 1.0 maintainer "%handle%" email "%email%" does not match "%self%"'); - } - - function _differentName($handle, $name, $selfname) - { - $this->_stack->push(__FUNCTION__, 'error', array('handle' => $handle, - 'name' => $name, 'self' => $selfname), - 'package.xml 1.0 maintainer "%handle%" name "%name%" does not match "%self%"'); - } - - function _unmatchedMaintainers($my, $yours) - { - if ($my) { - array_walk($my, create_function('&$i, $k', '$i = $i["handle"];')); - $this->_stack->push(__FUNCTION__, 'error', array('handles' => $my), - 'package.xml 2.0 has unmatched extra maintainers "%handles%"'); - } - if ($yours) { - array_walk($yours, create_function('&$i, $k', '$i = $i["handle"];')); - $this->_stack->push(__FUNCTION__, 'error', array('handles' => $yours), - 'package.xml 1.0 has unmatched extra maintainers "%handles%"'); - } - } - - function _differentNotes($notes) - { - $truncnotes = strlen($notes) < 25 ? $notes : substr($notes, 0, 24) . '...'; - $truncmynotes = strlen($this->getNotes()) < 25 ? $this->getNotes() : - substr($this->getNotes(), 0, 24) . '...'; - $this->_stack->push(__FUNCTION__, 'error', array('notes' => $truncnotes, - 'self' => $truncmynotes), - 'package.xml 1.0 release notes "%notes%" do not match "%self%"'); - } - - function _differentSummary($summary) - { - $truncsummary = strlen($summary) < 25 ? $summary : substr($summary, 0, 24) . '...'; - $truncmysummary = strlen($this->getsummary()) < 25 ? $this->getSummary() : - substr($this->getsummary(), 0, 24) . '...'; - $this->_stack->push(__FUNCTION__, 'error', array('summary' => $truncsummary, - 'self' => $truncmysummary), - 'package.xml 1.0 summary "%summary%" does not match "%self%"'); - } - - function _differentDescription($description) - { - $truncdescription = trim(strlen($description) < 25 ? $description : substr($description, 0, 24) . '...'); - $truncmydescription = trim(strlen($this->getDescription()) < 25 ? $this->getDescription() : - substr($this->getdescription(), 0, 24) . '...'); - $this->_stack->push(__FUNCTION__, 'error', array('description' => $truncdescription, - 'self' => $truncmydescription), - 'package.xml 1.0 description "%description%" does not match "%self%"'); - } - - function _missingFile($file) - { - $this->_stack->push(__FUNCTION__, 'error', array('file' => $file), - 'package.xml 1.0 file "%file%" is not present in '); - } - - /** - * WARNING - do not use this function unless you know what you're doing - */ - function setRawState($state) - { - if (!isset($this->_packageInfo['stability'])) { - $this->_packageInfo['stability'] = array(); - } - $this->_packageInfo['stability']['release'] = $state; - } - - /** - * WARNING - do not use this function unless you know what you're doing - */ - function setRawCompatible($compatible) - { - $this->_packageInfo['compatible'] = $compatible; - } - - /** - * WARNING - do not use this function unless you know what you're doing - */ - function setRawPackage($package) - { - $this->_packageInfo['name'] = $package; - } - - /** - * WARNING - do not use this function unless you know what you're doing - */ - function setRawChannel($channel) - { - $this->_packageInfo['channel'] = $channel; - } - - function setRequestedGroup($group) - { - $this->_requestedGroup = $group; - } - - function getRequestedGroup() - { - if (isset($this->_requestedGroup)) { - return $this->_requestedGroup; - } - return false; - } - - /** - * For saving in the registry. - * - * Set the last version that was installed - * @param string - */ - function setLastInstalledVersion($version) - { - $this->_packageInfo['_lastversion'] = $version; - } - - /** - * @return string|false - */ - function getLastInstalledVersion() - { - if (isset($this->_packageInfo['_lastversion'])) { - return $this->_packageInfo['_lastversion']; - } - return false; - } - - /** - * Determines whether this package.xml has post-install scripts or not - * @return array|false - */ - function listPostinstallScripts() - { - $filelist = $this->getFilelist(); - $contents = $this->getContents(); - $contents = $contents['dir']['file']; - if (!is_array($contents) || !isset($contents[0])) { - $contents = array($contents); - } - $taskfiles = array(); - foreach ($contents as $file) { - $atts = $file['attribs']; - unset($file['attribs']); - if (count($file)) { - $taskfiles[$atts['name']] = $file; - } - } - $common = new PEAR_Common; - $common->debug = $this->_config->get('verbose'); - $this->_scripts = array(); - $ret = array(); - foreach ($taskfiles as $name => $tasks) { - if (!isset($filelist[$name])) { - // ignored files will not be in the filelist - continue; - } - $atts = $filelist[$name]; - foreach ($tasks as $tag => $raw) { - $task = $this->getTask($tag); - $task = &new $task($this->_config, $common, PEAR_TASK_INSTALL); - if ($task->isScript()) { - $ret[] = $filelist[$name]['installed_as']; - } - } - } - if (count($ret)) { - return $ret; - } - return false; - } - - /** - * Initialize post-install scripts for running - * - * This method can be used to detect post-install scripts, as the return value - * indicates whether any exist - * @return bool - */ - function initPostinstallScripts() - { - $filelist = $this->getFilelist(); - $contents = $this->getContents(); - $contents = $contents['dir']['file']; - if (!is_array($contents) || !isset($contents[0])) { - $contents = array($contents); - } - $taskfiles = array(); - foreach ($contents as $file) { - $atts = $file['attribs']; - unset($file['attribs']); - if (count($file)) { - $taskfiles[$atts['name']] = $file; - } - } - $common = new PEAR_Common; - $common->debug = $this->_config->get('verbose'); - $this->_scripts = array(); - foreach ($taskfiles as $name => $tasks) { - if (!isset($filelist[$name])) { - // file was not installed due to installconditions - continue; - } - $atts = $filelist[$name]; - foreach ($tasks as $tag => $raw) { - $taskname = $this->getTask($tag); - $task = &new $taskname($this->_config, $common, PEAR_TASK_INSTALL); - if (!$task->isScript()) { - continue; // scripts are only handled after installation - } - $lastversion = isset($this->_packageInfo['_lastversion']) ? - $this->_packageInfo['_lastversion'] : null; - $task->init($raw, $atts, $lastversion); - $res = $task->startSession($this, $atts['installed_as']); - if (!$res) { - continue; // skip this file - } - if (PEAR::isError($res)) { - return $res; - } - $assign = &$task; - $this->_scripts[] = &$assign; - } - } - if (count($this->_scripts)) { - return true; - } - return false; - } - - function runPostinstallScripts() - { - if ($this->initPostinstallScripts()) { - $ui = &PEAR_Frontend::singleton(); - if ($ui) { - $ui->runPostinstallScripts($this->_scripts, $this); - } - } - } - - - /** - * Convert a recursive set of and tags into a single tag with - * tags. - */ - function flattenFilelist() - { - if (isset($this->_packageInfo['bundle'])) { - return; - } - $filelist = array(); - if (isset($this->_packageInfo['contents']['dir']['dir'])) { - $this->_getFlattenedFilelist($filelist, $this->_packageInfo['contents']['dir']); - if (!isset($filelist[1])) { - $filelist = $filelist[0]; - } - $this->_packageInfo['contents']['dir']['file'] = $filelist; - unset($this->_packageInfo['contents']['dir']['dir']); - } else { - // else already flattened but check for baseinstalldir propagation - if (isset($this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'])) { - if (isset($this->_packageInfo['contents']['dir']['file'][0])) { - foreach ($this->_packageInfo['contents']['dir']['file'] as $i => $file) { - if (isset($file['attribs']['baseinstalldir'])) { - continue; - } - $this->_packageInfo['contents']['dir']['file'][$i]['attribs']['baseinstalldir'] - = $this->_packageInfo['contents']['dir']['attribs']['baseinstalldir']; - } - } else { - if (!isset($this->_packageInfo['contents']['dir']['file']['attribs']['baseinstalldir'])) { - $this->_packageInfo['contents']['dir']['file']['attribs']['baseinstalldir'] - = $this->_packageInfo['contents']['dir']['attribs']['baseinstalldir']; - } - } - } - } - } - - /** - * @param array the final flattened file list - * @param array the current directory being processed - * @param string|false any recursively inherited baeinstalldir attribute - * @param string private recursion variable - * @return array - * @access protected - */ - function _getFlattenedFilelist(&$files, $dir, $baseinstall = false, $path = '') - { - if (isset($dir['attribs']) && isset($dir['attribs']['baseinstalldir'])) { - $baseinstall = $dir['attribs']['baseinstalldir']; - } - if (isset($dir['dir'])) { - if (!isset($dir['dir'][0])) { - $dir['dir'] = array($dir['dir']); - } - foreach ($dir['dir'] as $subdir) { - if (!isset($subdir['attribs']) || !isset($subdir['attribs']['name'])) { - $name = '*unknown*'; - } else { - $name = $subdir['attribs']['name']; - } - $newpath = empty($path) ? $name : - $path . '/' . $name; - $this->_getFlattenedFilelist($files, $subdir, - $baseinstall, $newpath); - } - } - if (isset($dir['file'])) { - if (!isset($dir['file'][0])) { - $dir['file'] = array($dir['file']); - } - foreach ($dir['file'] as $file) { - $attrs = $file['attribs']; - $name = $attrs['name']; - if ($baseinstall && !isset($attrs['baseinstalldir'])) { - $attrs['baseinstalldir'] = $baseinstall; - } - $attrs['name'] = empty($path) ? $name : $path . '/' . $name; - $attrs['name'] = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'), - $attrs['name']); - $file['attribs'] = $attrs; - $files[] = $file; - } - } - } - - function setConfig(&$config) - { - $this->_config = &$config; - $this->_registry = &$config->getRegistry(); - } - - function setLogger(&$logger) - { - if (!is_object($logger) || !method_exists($logger, 'log')) { - return PEAR::raiseError('Logger must be compatible with PEAR_Common::log'); - } - $this->_logger = &$logger; - } - - /** - * WARNING - do not use this function directly unless you know what you're doing - */ - function setDeps($deps) - { - $this->_packageInfo['dependencies'] = $deps; - } - - /** - * WARNING - do not use this function directly unless you know what you're doing - */ - function setCompatible($compat) - { - $this->_packageInfo['compatible'] = $compat; - } - - function setPackagefile($file, $archive = false) - { - $this->_packageFile = $file; - $this->_archiveFile = $archive ? $archive : $file; - } - - /** - * Wrapper to {@link PEAR_ErrorStack::getErrors()} - * @param boolean determines whether to purge the error stack after retrieving - * @return array - */ - function getValidationWarnings($purge = true) - { - return $this->_stack->getErrors($purge); - } - - function getPackageFile() - { - return $this->_packageFile; - } - - function getArchiveFile() - { - return $this->_archiveFile; - } - - - /** - * Directly set the array that defines this packagefile - * - * WARNING: no validation. This should only be performed by internal methods - * inside PEAR or by inputting an array saved from an existing PEAR_PackageFile_v2 - * @param array - */ - function fromArray($pinfo) - { - unset($pinfo['old']); - unset($pinfo['xsdversion']); - // If the changelog isn't an array then it was passed in as an empty tag - if (isset($pinfo['changelog']) && !is_array($pinfo['changelog'])) { - unset($pinfo['changelog']); - } - $this->_incomplete = false; - $this->_packageInfo = $pinfo; - } - - function isIncomplete() - { - return $this->_incomplete; - } - - /** - * @return array - */ - function toArray($forreg = false) - { - if (!$this->validate(PEAR_VALIDATE_NORMAL)) { - return false; - } - return $this->getArray($forreg); - } - - function getArray($forReg = false) - { - if ($forReg) { - $arr = $this->_packageInfo; - $arr['old'] = array(); - $arr['old']['version'] = $this->getVersion(); - $arr['old']['release_date'] = $this->getDate(); - $arr['old']['release_state'] = $this->getState(); - $arr['old']['release_license'] = $this->getLicense(); - $arr['old']['release_notes'] = $this->getNotes(); - $arr['old']['release_deps'] = $this->getDeps(); - $arr['old']['maintainers'] = $this->getMaintainers(); - $arr['xsdversion'] = '2.0'; - return $arr; - } else { - $info = $this->_packageInfo; - unset($info['dirtree']); - if (isset($info['_lastversion'])) { - unset($info['_lastversion']); - } - if (isset($info['#binarypackage'])) { - unset($info['#binarypackage']); - } - return $info; - } - } - - function packageInfo($field) - { - $arr = $this->getArray(true); - if ($field == 'state') { - return $arr['stability']['release']; - } - if ($field == 'api-version') { - return $arr['version']['api']; - } - if ($field == 'api-state') { - return $arr['stability']['api']; - } - if (isset($arr['old'][$field])) { - if (!is_string($arr['old'][$field])) { - return null; - } - return $arr['old'][$field]; - } - if (isset($arr[$field])) { - if (!is_string($arr[$field])) { - return null; - } - return $arr[$field]; - } - return null; - } - - function getName() - { - return $this->getPackage(); - } - - function getPackage() - { - if (isset($this->_packageInfo['name'])) { - return $this->_packageInfo['name']; - } - return false; - } - - function getChannel() - { - if (isset($this->_packageInfo['uri'])) { - return '__uri'; - } - if (isset($this->_packageInfo['channel'])) { - return strtolower($this->_packageInfo['channel']); - } - return false; - } - - function getUri() - { - if (isset($this->_packageInfo['uri'])) { - return $this->_packageInfo['uri']; - } - return false; - } - - function getExtends() - { - if (isset($this->_packageInfo['extends'])) { - return $this->_packageInfo['extends']; - } - return false; - } - - function getSummary() - { - if (isset($this->_packageInfo['summary'])) { - return $this->_packageInfo['summary']; - } - return false; - } - - function getDescription() - { - if (isset($this->_packageInfo['description'])) { - return $this->_packageInfo['description']; - } - return false; - } - - function getMaintainers($raw = false) - { - if (!isset($this->_packageInfo['lead'])) { - return false; - } - if ($raw) { - $ret = array('lead' => $this->_packageInfo['lead']); - (isset($this->_packageInfo['developer'])) ? - $ret['developer'] = $this->_packageInfo['developer'] :null; - (isset($this->_packageInfo['contributor'])) ? - $ret['contributor'] = $this->_packageInfo['contributor'] :null; - (isset($this->_packageInfo['helper'])) ? - $ret['helper'] = $this->_packageInfo['helper'] :null; - return $ret; - } else { - $ret = array(); - $leads = isset($this->_packageInfo['lead'][0]) ? $this->_packageInfo['lead'] : - array($this->_packageInfo['lead']); - foreach ($leads as $lead) { - $s = $lead; - $s['handle'] = $s['user']; - unset($s['user']); - $s['role'] = 'lead'; - $ret[] = $s; - } - if (isset($this->_packageInfo['developer'])) { - $leads = isset($this->_packageInfo['developer'][0]) ? - $this->_packageInfo['developer'] : - array($this->_packageInfo['developer']); - foreach ($leads as $maintainer) { - $s = $maintainer; - $s['handle'] = $s['user']; - unset($s['user']); - $s['role'] = 'developer'; - $ret[] = $s; - } - } - if (isset($this->_packageInfo['contributor'])) { - $leads = isset($this->_packageInfo['contributor'][0]) ? - $this->_packageInfo['contributor'] : - array($this->_packageInfo['contributor']); - foreach ($leads as $maintainer) { - $s = $maintainer; - $s['handle'] = $s['user']; - unset($s['user']); - $s['role'] = 'contributor'; - $ret[] = $s; - } - } - if (isset($this->_packageInfo['helper'])) { - $leads = isset($this->_packageInfo['helper'][0]) ? - $this->_packageInfo['helper'] : - array($this->_packageInfo['helper']); - foreach ($leads as $maintainer) { - $s = $maintainer; - $s['handle'] = $s['user']; - unset($s['user']); - $s['role'] = 'helper'; - $ret[] = $s; - } - } - return $ret; - } - return false; - } - - function getLeads() - { - if (isset($this->_packageInfo['lead'])) { - return $this->_packageInfo['lead']; - } - return false; - } - - function getDevelopers() - { - if (isset($this->_packageInfo['developer'])) { - return $this->_packageInfo['developer']; - } - return false; - } - - function getContributors() - { - if (isset($this->_packageInfo['contributor'])) { - return $this->_packageInfo['contributor']; - } - return false; - } - - function getHelpers() - { - if (isset($this->_packageInfo['helper'])) { - return $this->_packageInfo['helper']; - } - return false; - } - - function setDate($date) - { - if (!isset($this->_packageInfo['date'])) { - // ensure that the extends tag is set up in the right location - $this->_packageInfo = $this->_insertBefore($this->_packageInfo, - array('time', 'version', - 'stability', 'license', 'notes', 'contents', 'compatible', - 'dependencies', 'providesextension', 'srcpackage', 'srcuri', - 'phprelease', 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', - 'zendextbinrelease', 'bundle', 'changelog'), array(), 'date'); - } - $this->_packageInfo['date'] = $date; - $this->_isValid = 0; - } - - function setTime($time) - { - $this->_isValid = 0; - if (!isset($this->_packageInfo['time'])) { - // ensure that the time tag is set up in the right location - $this->_packageInfo = $this->_insertBefore($this->_packageInfo, - array('version', - 'stability', 'license', 'notes', 'contents', 'compatible', - 'dependencies', 'providesextension', 'srcpackage', 'srcuri', - 'phprelease', 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', - 'zendextbinrelease', 'bundle', 'changelog'), $time, 'time'); - } - $this->_packageInfo['time'] = $time; - } - - function getDate() - { - if (isset($this->_packageInfo['date'])) { - return $this->_packageInfo['date']; - } - return false; - } - - function getTime() - { - if (isset($this->_packageInfo['time'])) { - return $this->_packageInfo['time']; - } - return false; - } - - /** - * @param package|api version category to return - */ - function getVersion($key = 'release') - { - if (isset($this->_packageInfo['version'][$key])) { - return $this->_packageInfo['version'][$key]; - } - return false; - } - - function getStability() - { - if (isset($this->_packageInfo['stability'])) { - return $this->_packageInfo['stability']; - } - return false; - } - - function getState($key = 'release') - { - if (isset($this->_packageInfo['stability'][$key])) { - return $this->_packageInfo['stability'][$key]; - } - return false; - } - - function getLicense($raw = false) - { - if (isset($this->_packageInfo['license'])) { - if ($raw) { - return $this->_packageInfo['license']; - } - if (is_array($this->_packageInfo['license'])) { - return $this->_packageInfo['license']['_content']; - } else { - return $this->_packageInfo['license']; - } - } - return false; - } - - function getLicenseLocation() - { - if (!isset($this->_packageInfo['license']) || !is_array($this->_packageInfo['license'])) { - return false; - } - return $this->_packageInfo['license']['attribs']; - } - - function getNotes() - { - if (isset($this->_packageInfo['notes'])) { - return $this->_packageInfo['notes']; - } - return false; - } - - /** - * Return the tag contents, if any - * @return array|false - */ - function getUsesrole() - { - if (isset($this->_packageInfo['usesrole'])) { - return $this->_packageInfo['usesrole']; - } - return false; - } - - /** - * Return the tag contents, if any - * @return array|false - */ - function getUsestask() - { - if (isset($this->_packageInfo['usestask'])) { - return $this->_packageInfo['usestask']; - } - return false; - } - - /** - * This should only be used to retrieve filenames and install attributes - */ - function getFilelist($preserve = false) - { - if (isset($this->_packageInfo['filelist']) && !$preserve) { - return $this->_packageInfo['filelist']; - } - $this->flattenFilelist(); - if ($contents = $this->getContents()) { - $ret = array(); - if (!isset($contents['dir'])) { - return false; - } - if (!isset($contents['dir']['file'][0])) { - $contents['dir']['file'] = array($contents['dir']['file']); - } - foreach ($contents['dir']['file'] as $file) { - $name = $file['attribs']['name']; - if (!$preserve) { - $file = $file['attribs']; - } - $ret[$name] = $file; - } - if (!$preserve) { - $this->_packageInfo['filelist'] = $ret; - } - return $ret; - } - return false; - } - - /** - * Return configure options array, if any - * - * @return array|false - */ - function getConfigureOptions() - { - if ($this->getPackageType() != 'extsrc' && $this->getPackageType() != 'zendextsrc') { - return false; - } - - $releases = $this->getReleases(); - if (isset($releases[0])) { - $releases = $releases[0]; - } - - if (isset($releases['configureoption'])) { - if (!isset($releases['configureoption'][0])) { - $releases['configureoption'] = array($releases['configureoption']); - } - - for ($i = 0; $i < count($releases['configureoption']); $i++) { - $releases['configureoption'][$i] = $releases['configureoption'][$i]['attribs']; - } - - return $releases['configureoption']; - } - - return false; - } - - /** - * This is only used at install-time, after all serialization - * is over. - */ - function resetFilelist() - { - $this->_packageInfo['filelist'] = array(); - } - - /** - * Retrieve a list of files that should be installed on this computer - * @return array - */ - function getInstallationFilelist($forfilecheck = false) - { - $contents = $this->getFilelist(true); - if (isset($contents['dir']['attribs']['baseinstalldir'])) { - $base = $contents['dir']['attribs']['baseinstalldir']; - } - if (isset($this->_packageInfo['bundle'])) { - return PEAR::raiseError( - 'Exception: bundles should be handled in download code only'); - } - $release = $this->getReleases(); - if ($release) { - if (!isset($release[0])) { - if (!isset($release['installconditions']) && !isset($release['filelist'])) { - if ($forfilecheck) { - return $this->getFilelist(); - } - return $contents; - } - $release = array($release); - } - $depchecker = &$this->getPEARDependency2($this->_config, array(), - array('channel' => $this->getChannel(), 'package' => $this->getPackage()), - PEAR_VALIDATE_INSTALLING); - foreach ($release as $instance) { - if (isset($instance['installconditions'])) { - $installconditions = $instance['installconditions']; - if (is_array($installconditions)) { - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - foreach ($installconditions as $type => $conditions) { - if (!isset($conditions[0])) { - $conditions = array($conditions); - } - foreach ($conditions as $condition) { - $ret = $depchecker->{"validate{$type}Dependency"}($condition); - if (PEAR::isError($ret)) { - PEAR::popErrorHandling(); - continue 3; // skip this release - } - } - } - PEAR::popErrorHandling(); - } - } - // this is the release to use - if (isset($instance['filelist'])) { - // ignore files - if (isset($instance['filelist']['ignore'])) { - $ignore = isset($instance['filelist']['ignore'][0]) ? - $instance['filelist']['ignore'] : - array($instance['filelist']['ignore']); - foreach ($ignore as $ig) { - unset ($contents[$ig['attribs']['name']]); - } - } - // install files as this name - if (isset($instance['filelist']['install'])) { - $installas = isset($instance['filelist']['install'][0]) ? - $instance['filelist']['install'] : - array($instance['filelist']['install']); - foreach ($installas as $as) { - $contents[$as['attribs']['name']]['attribs']['install-as'] = - $as['attribs']['as']; - } - } - } - if ($forfilecheck) { - foreach ($contents as $file => $attrs) { - $contents[$file] = $attrs['attribs']; - } - } - return $contents; - } - } else { // simple release - no installconditions or install-as - if ($forfilecheck) { - return $this->getFilelist(); - } - return $contents; - } - // no releases matched - return PEAR::raiseError('No releases in package.xml matched the existing operating ' . - 'system, extensions installed, or architecture, cannot install'); - } - - /** - * This is only used at install-time, after all serialization - * is over. - * @param string file name - * @param string installed path - */ - function setInstalledAs($file, $path) - { - if ($path) { - return $this->_packageInfo['filelist'][$file]['installed_as'] = $path; - } - unset($this->_packageInfo['filelist'][$file]['installed_as']); - } - - function getInstalledLocation($file) - { - if (isset($this->_packageInfo['filelist'][$file]['installed_as'])) { - return $this->_packageInfo['filelist'][$file]['installed_as']; - } - return false; - } - - /** - * This is only used at install-time, after all serialization - * is over. - */ - function installedFile($file, $atts) - { - if (isset($this->_packageInfo['filelist'][$file])) { - $this->_packageInfo['filelist'][$file] = - array_merge($this->_packageInfo['filelist'][$file], $atts['attribs']); - } else { - $this->_packageInfo['filelist'][$file] = $atts['attribs']; - } - } - - /** - * Retrieve the contents tag - */ - function getContents() - { - if (isset($this->_packageInfo['contents'])) { - return $this->_packageInfo['contents']; - } - return false; - } - - /** - * @param string full path to file - * @param string attribute name - * @param string attribute value - * @param int risky but fast - use this to choose a file based on its position in the list - * of files. Index is zero-based like PHP arrays. - * @return bool success of operation - */ - function setFileAttribute($filename, $attr, $value, $index = false) - { - $this->_isValid = 0; - if (in_array($attr, array('role', 'name', 'baseinstalldir'))) { - $this->_filesValid = false; - } - if ($index !== false && - isset($this->_packageInfo['contents']['dir']['file'][$index]['attribs'])) { - $this->_packageInfo['contents']['dir']['file'][$index]['attribs'][$attr] = $value; - return true; - } - if (!isset($this->_packageInfo['contents']['dir']['file'])) { - return false; - } - $files = $this->_packageInfo['contents']['dir']['file']; - if (!isset($files[0])) { - $files = array($files); - $ind = false; - } else { - $ind = true; - } - foreach ($files as $i => $file) { - if (isset($file['attribs'])) { - if ($file['attribs']['name'] == $filename) { - if ($ind) { - $this->_packageInfo['contents']['dir']['file'][$i]['attribs'][$attr] = $value; - } else { - $this->_packageInfo['contents']['dir']['file']['attribs'][$attr] = $value; - } - return true; - } - } - } - return false; - } - - function setDirtree($path) - { - if (!isset($this->_packageInfo['dirtree'])) { - $this->_packageInfo['dirtree'] = array(); - } - $this->_packageInfo['dirtree'][$path] = true; - } - - function getDirtree() - { - if (isset($this->_packageInfo['dirtree']) && count($this->_packageInfo['dirtree'])) { - return $this->_packageInfo['dirtree']; - } - return false; - } - - function resetDirtree() - { - unset($this->_packageInfo['dirtree']); - } - - /** - * Determines whether this package claims it is compatible with the version of - * the package that has a recommended version dependency - * @param PEAR_PackageFile_v2|PEAR_PackageFile_v1|PEAR_Downloader_Package - * @return boolean - */ - function isCompatible($pf) - { - if (!isset($this->_packageInfo['compatible'])) { - return false; - } - if (!isset($this->_packageInfo['channel'])) { - return false; - } - $me = $pf->getVersion(); - $compatible = $this->_packageInfo['compatible']; - if (!isset($compatible[0])) { - $compatible = array($compatible); - } - $found = false; - foreach ($compatible as $info) { - if (strtolower($info['name']) == strtolower($pf->getPackage())) { - if (strtolower($info['channel']) == strtolower($pf->getChannel())) { - $found = true; - break; - } - } - } - if (!$found) { - return false; - } - if (isset($info['exclude'])) { - if (!isset($info['exclude'][0])) { - $info['exclude'] = array($info['exclude']); - } - foreach ($info['exclude'] as $exclude) { - if (version_compare($me, $exclude, '==')) { - return false; - } - } - } - if (version_compare($me, $info['min'], '>=') && version_compare($me, $info['max'], '<=')) { - return true; - } - return false; - } - - /** - * @return array|false - */ - function getCompatible() - { - if (isset($this->_packageInfo['compatible'])) { - return $this->_packageInfo['compatible']; - } - return false; - } - - function getDependencies() - { - if (isset($this->_packageInfo['dependencies'])) { - return $this->_packageInfo['dependencies']; - } - return false; - } - - function isSubpackageOf($p) - { - return $p->isSubpackage($this); - } - - /** - * Determines whether the passed in package is a subpackage of this package. - * - * No version checking is done, only name verification. - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @return bool - */ - function isSubpackage($p) - { - $sub = array(); - if (isset($this->_packageInfo['dependencies']['required']['subpackage'])) { - $sub = $this->_packageInfo['dependencies']['required']['subpackage']; - if (!isset($sub[0])) { - $sub = array($sub); - } - } - if (isset($this->_packageInfo['dependencies']['optional']['subpackage'])) { - $sub1 = $this->_packageInfo['dependencies']['optional']['subpackage']; - if (!isset($sub1[0])) { - $sub1 = array($sub1); - } - $sub = array_merge($sub, $sub1); - } - if (isset($this->_packageInfo['dependencies']['group'])) { - $group = $this->_packageInfo['dependencies']['group']; - if (!isset($group[0])) { - $group = array($group); - } - foreach ($group as $deps) { - if (isset($deps['subpackage'])) { - $sub2 = $deps['subpackage']; - if (!isset($sub2[0])) { - $sub2 = array($sub2); - } - $sub = array_merge($sub, $sub2); - } - } - } - foreach ($sub as $dep) { - if (strtolower($dep['name']) == strtolower($p->getPackage())) { - if (isset($dep['channel'])) { - if (strtolower($dep['channel']) == strtolower($p->getChannel())) { - return true; - } - } else { - if ($dep['uri'] == $p->getURI()) { - return true; - } - } - } - } - return false; - } - - function dependsOn($package, $channel) - { - if (!($deps = $this->getDependencies())) { - return false; - } - foreach (array('package', 'subpackage') as $type) { - foreach (array('required', 'optional') as $needed) { - if (isset($deps[$needed][$type])) { - if (!isset($deps[$needed][$type][0])) { - $deps[$needed][$type] = array($deps[$needed][$type]); - } - foreach ($deps[$needed][$type] as $dep) { - $depchannel = isset($dep['channel']) ? $dep['channel'] : '__uri'; - if (strtolower($dep['name']) == strtolower($package) && - $depchannel == $channel) { - return true; - } - } - } - } - if (isset($deps['group'])) { - if (!isset($deps['group'][0])) { - $dep['group'] = array($deps['group']); - } - foreach ($deps['group'] as $group) { - if (isset($group[$type])) { - if (!is_array($group[$type])) { - $group[$type] = array($group[$type]); - } - foreach ($group[$type] as $dep) { - $depchannel = isset($dep['channel']) ? $dep['channel'] : '__uri'; - if (strtolower($dep['name']) == strtolower($package) && - $depchannel == $channel) { - return true; - } - } - } - } - } - } - return false; - } - - /** - * Get the contents of a dependency group - * @param string - * @return array|false - */ - function getDependencyGroup($name) - { - $name = strtolower($name); - if (!isset($this->_packageInfo['dependencies']['group'])) { - return false; - } - $groups = $this->_packageInfo['dependencies']['group']; - if (!isset($groups[0])) { - $groups = array($groups); - } - foreach ($groups as $group) { - if (strtolower($group['attribs']['name']) == $name) { - return $group; - } - } - return false; - } - - /** - * Retrieve a partial package.xml 1.0 representation of dependencies - * - * a very limited representation of dependencies is returned by this method. - * The tag for excluding certain versions of a dependency is - * completely ignored. In addition, dependency groups are ignored, with the - * assumption that all dependencies in dependency groups are also listed in - * the optional group that work with all dependency groups - * @param boolean return package.xml 2.0 tag - * @return array|false - */ - function getDeps($raw = false, $nopearinstaller = false) - { - if (isset($this->_packageInfo['dependencies'])) { - if ($raw) { - return $this->_packageInfo['dependencies']; - } - $ret = array(); - $map = array( - 'php' => 'php', - 'package' => 'pkg', - 'subpackage' => 'pkg', - 'extension' => 'ext', - 'os' => 'os', - 'pearinstaller' => 'pkg', - ); - foreach (array('required', 'optional') as $type) { - $optional = ($type == 'optional') ? 'yes' : 'no'; - if (!isset($this->_packageInfo['dependencies'][$type]) - || empty($this->_packageInfo['dependencies'][$type])) { - continue; - } - foreach ($this->_packageInfo['dependencies'][$type] as $dtype => $deps) { - if ($dtype == 'pearinstaller' && $nopearinstaller) { - continue; - } - if (!isset($deps[0])) { - $deps = array($deps); - } - foreach ($deps as $dep) { - if (!isset($map[$dtype])) { - // no support for arch type - continue; - } - if ($dtype == 'pearinstaller') { - $dep['name'] = 'PEAR'; - $dep['channel'] = 'pear.php.net'; - } - $s = array('type' => $map[$dtype]); - if (isset($dep['channel'])) { - $s['channel'] = $dep['channel']; - } - if (isset($dep['uri'])) { - $s['uri'] = $dep['uri']; - } - if (isset($dep['name'])) { - $s['name'] = $dep['name']; - } - if (isset($dep['conflicts'])) { - $s['rel'] = 'not'; - } else { - if (!isset($dep['min']) && - !isset($dep['max'])) { - $s['rel'] = 'has'; - $s['optional'] = $optional; - } elseif (isset($dep['min']) && - isset($dep['max'])) { - $s['rel'] = 'ge'; - $s1 = $s; - $s1['rel'] = 'le'; - $s['version'] = $dep['min']; - $s1['version'] = $dep['max']; - if (isset($dep['channel'])) { - $s1['channel'] = $dep['channel']; - } - if ($dtype != 'php') { - $s['name'] = $dep['name']; - $s1['name'] = $dep['name']; - } - $s['optional'] = $optional; - $s1['optional'] = $optional; - $ret[] = $s1; - } elseif (isset($dep['min'])) { - if (isset($dep['exclude']) && - $dep['exclude'] == $dep['min']) { - $s['rel'] = 'gt'; - } else { - $s['rel'] = 'ge'; - } - $s['version'] = $dep['min']; - $s['optional'] = $optional; - if ($dtype != 'php') { - $s['name'] = $dep['name']; - } - } elseif (isset($dep['max'])) { - if (isset($dep['exclude']) && - $dep['exclude'] == $dep['max']) { - $s['rel'] = 'lt'; - } else { - $s['rel'] = 'le'; - } - $s['version'] = $dep['max']; - $s['optional'] = $optional; - if ($dtype != 'php') { - $s['name'] = $dep['name']; - } - } - } - $ret[] = $s; - } - } - } - if (count($ret)) { - return $ret; - } - } - return false; - } - - /** - * @return php|extsrc|extbin|zendextsrc|zendextbin|bundle|false - */ - function getPackageType() - { - if (isset($this->_packageInfo['phprelease'])) { - return 'php'; - } - if (isset($this->_packageInfo['extsrcrelease'])) { - return 'extsrc'; - } - if (isset($this->_packageInfo['extbinrelease'])) { - return 'extbin'; - } - if (isset($this->_packageInfo['zendextsrcrelease'])) { - return 'zendextsrc'; - } - if (isset($this->_packageInfo['zendextbinrelease'])) { - return 'zendextbin'; - } - if (isset($this->_packageInfo['bundle'])) { - return 'bundle'; - } - return false; - } - - /** - * @return array|false - */ - function getReleases() - { - $type = $this->getPackageType(); - if ($type != 'bundle') { - $type .= 'release'; - } - if ($this->getPackageType() && isset($this->_packageInfo[$type])) { - return $this->_packageInfo[$type]; - } - return false; - } - - /** - * @return array - */ - function getChangelog() - { - if (isset($this->_packageInfo['changelog'])) { - return $this->_packageInfo['changelog']; - } - return false; - } - - function hasDeps() - { - return isset($this->_packageInfo['dependencies']); - } - - function getPackagexmlVersion() - { - if (isset($this->_packageInfo['zendextsrcrelease'])) { - return '2.1'; - } - if (isset($this->_packageInfo['zendextbinrelease'])) { - return '2.1'; - } - return '2.0'; - } - - /** - * @return array|false - */ - function getSourcePackage() - { - if (isset($this->_packageInfo['extbinrelease']) || - isset($this->_packageInfo['zendextbinrelease'])) { - return array('channel' => $this->_packageInfo['srcchannel'], - 'package' => $this->_packageInfo['srcpackage']); - } - return false; - } - - function getBundledPackages() - { - if (isset($this->_packageInfo['bundle'])) { - return $this->_packageInfo['contents']['bundledpackage']; - } - return false; - } - - function getLastModified() - { - if (isset($this->_packageInfo['_lastmodified'])) { - return $this->_packageInfo['_lastmodified']; - } - return false; - } - - /** - * Get the contents of a file listed within the package.xml - * @param string - * @return string - */ - function getFileContents($file) - { - if ($this->_archiveFile == $this->_packageFile) { // unpacked - $dir = dirname($this->_packageFile); - $file = $dir . DIRECTORY_SEPARATOR . $file; - $file = str_replace(array('/', '\\'), - array(DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR), $file); - if (file_exists($file) && is_readable($file)) { - return implode('', file($file)); - } - } else { // tgz - $tar = &new Archive_Tar($this->_archiveFile); - $tar->pushErrorHandling(PEAR_ERROR_RETURN); - if ($file != 'package.xml' && $file != 'package2.xml') { - $file = $this->getPackage() . '-' . $this->getVersion() . '/' . $file; - } - $file = $tar->extractInString($file); - $tar->popErrorHandling(); - if (PEAR::isError($file)) { - return PEAR::raiseError("Cannot locate file '$file' in archive"); - } - return $file; - } - } - - function &getRW() - { - if (!class_exists('PEAR_PackageFile_v2_rw')) { - require_once 'PEAR/PackageFile/v2/rw.php'; - } - $a = new PEAR_PackageFile_v2_rw; - foreach (get_object_vars($this) as $name => $unused) { - if (!isset($this->$name)) { - continue; - } - if ($name == '_config' || $name == '_logger'|| $name == '_registry' || - $name == '_stack') { - $a->$name = &$this->$name; - } else { - $a->$name = $this->$name; - } - } - return $a; - } - - function &getDefaultGenerator() - { - if (!class_exists('PEAR_PackageFile_Generator_v2')) { - require_once 'PEAR/PackageFile/Generator/v2.php'; - } - $a = &new PEAR_PackageFile_Generator_v2($this); - return $a; - } - - function analyzeSourceCode($file, $string = false) - { - if (!isset($this->_v2Validator) || - !is_a($this->_v2Validator, 'PEAR_PackageFile_v2_Validator')) { - if (!class_exists('PEAR_PackageFile_v2_Validator')) { - require_once 'PEAR/PackageFile/v2/Validator.php'; - } - $this->_v2Validator = new PEAR_PackageFile_v2_Validator; - } - return $this->_v2Validator->analyzeSourceCode($file, $string); - } - - function validate($state = PEAR_VALIDATE_NORMAL) - { - if (!isset($this->_packageInfo) || !is_array($this->_packageInfo)) { - return false; - } - if (!isset($this->_v2Validator) || - !is_a($this->_v2Validator, 'PEAR_PackageFile_v2_Validator')) { - if (!class_exists('PEAR_PackageFile_v2_Validator')) { - require_once 'PEAR/PackageFile/v2/Validator.php'; - } - $this->_v2Validator = new PEAR_PackageFile_v2_Validator; - } - if (isset($this->_packageInfo['xsdversion'])) { - unset($this->_packageInfo['xsdversion']); - } - return $this->_v2Validator->validate($this, $state); - } - - function getTasksNs() - { - if (!isset($this->_tasksNs)) { - if (isset($this->_packageInfo['attribs'])) { - foreach ($this->_packageInfo['attribs'] as $name => $value) { - if ($value == 'http://pear.php.net/dtd/tasks-1.0') { - $this->_tasksNs = str_replace('xmlns:', '', $name); - break; - } - } - } - } - return $this->_tasksNs; - } - - /** - * Determine whether a task name is a valid task. Custom tasks may be defined - * using subdirectories by putting a "-" in the name, as in - * - * Note that this method will auto-load the task class file and test for the existence - * of the name with "-" replaced by "_" as in PEAR/Task/mycustom/task.php makes class - * PEAR_Task_mycustom_task - * @param string - * @return boolean - */ - function getTask($task) - { - $this->getTasksNs(); - // transform all '-' to '/' and 'tasks:' to '' so tasks:replace becomes replace - $task = str_replace(array($this->_tasksNs . ':', '-'), array('', ' '), $task); - $taskfile = str_replace(' ', '/', ucwords($task)); - $task = str_replace(array(' ', '/'), '_', ucwords($task)); - if (class_exists("PEAR_Task_$task")) { - return "PEAR_Task_$task"; - } - $fp = @fopen("PEAR/Task/$taskfile.php", 'r', true); - if ($fp) { - fclose($fp); - require_once "PEAR/Task/$taskfile.php"; - return "PEAR_Task_$task"; - } - return false; - } - - /** - * Key-friendly array_splice - * @param tagname to splice a value in before - * @param mixed the value to splice in - * @param string the new tag name - */ - function _ksplice($array, $key, $value, $newkey) - { - $offset = array_search($key, array_keys($array)); - $after = array_slice($array, $offset); - $before = array_slice($array, 0, $offset); - $before[$newkey] = $value; - return array_merge($before, $after); - } - - /** - * @param array a list of possible keys, in the order they may occur - * @param mixed contents of the new package.xml tag - * @param string tag name - * @access private - */ - function _insertBefore($array, $keys, $contents, $newkey) - { - foreach ($keys as $key) { - if (isset($array[$key])) { - return $array = $this->_ksplice($array, $key, $contents, $newkey); - } - } - $array[$newkey] = $contents; - return $array; - } - - /** - * @param subsection of {@link $_packageInfo} - * @param array|string tag contents - * @param array format: - *
        -     * array(
        -     *   tagname => array(list of tag names that follow this one),
        -     *   childtagname => array(list of child tag names that follow this one),
        -     * )
        -     * 
        - * - * This allows construction of nested tags - * @access private - */ - function _mergeTag($manip, $contents, $order) - { - if (count($order)) { - foreach ($order as $tag => $curorder) { - if (!isset($manip[$tag])) { - // ensure that the tag is set up - $manip = $this->_insertBefore($manip, $curorder, array(), $tag); - } - if (count($order) > 1) { - $manip[$tag] = $this->_mergeTag($manip[$tag], $contents, array_slice($order, 1)); - return $manip; - } - } - } else { - return $manip; - } - if (is_array($manip[$tag]) && !empty($manip[$tag]) && isset($manip[$tag][0])) { - $manip[$tag][] = $contents; - } else { - if (!count($manip[$tag])) { - $manip[$tag] = $contents; - } else { - $manip[$tag] = array($manip[$tag]); - $manip[$tag][] = $contents; - } - } - return $manip; - } -} -?> diff --git a/_piecrust/libs/PEAR/PackageFile/v2/Validator.php b/_piecrust/libs/PEAR/PackageFile/v2/Validator.php deleted file mode 100644 index 33c8eee..0000000 --- a/_piecrust/libs/PEAR/PackageFile/v2/Validator.php +++ /dev/null @@ -1,2154 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Validator.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a8 - */ -/** - * Private validation class used by PEAR_PackageFile_v2 - do not use directly, its - * sole purpose is to split up the PEAR/PackageFile/v2.php file to make it smaller - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a8 - * @access private - */ -class PEAR_PackageFile_v2_Validator -{ - /** - * @var array - */ - var $_packageInfo; - /** - * @var PEAR_PackageFile_v2 - */ - var $_pf; - /** - * @var PEAR_ErrorStack - */ - var $_stack; - /** - * @var int - */ - var $_isValid = 0; - /** - * @var int - */ - var $_filesValid = 0; - /** - * @var int - */ - var $_curState = 0; - /** - * @param PEAR_PackageFile_v2 - * @param int - */ - function validate(&$pf, $state = PEAR_VALIDATE_NORMAL) - { - $this->_pf = &$pf; - $this->_curState = $state; - $this->_packageInfo = $this->_pf->getArray(); - $this->_isValid = $this->_pf->_isValid; - $this->_filesValid = $this->_pf->_filesValid; - $this->_stack = &$pf->_stack; - $this->_stack->getErrors(true); - if (($this->_isValid & $state) == $state) { - return true; - } - if (!isset($this->_packageInfo) || !is_array($this->_packageInfo)) { - return false; - } - if (!isset($this->_packageInfo['attribs']['version']) || - ($this->_packageInfo['attribs']['version'] != '2.0' && - $this->_packageInfo['attribs']['version'] != '2.1') - ) { - $this->_noPackageVersion(); - } - $structure = - array( - 'name', - 'channel|uri', - '*extends', // can't be multiple, but this works fine - 'summary', - 'description', - '+lead', // these all need content checks - '*developer', - '*contributor', - '*helper', - 'date', - '*time', - 'version', - 'stability', - 'license->?uri->?filesource', - 'notes', - 'contents', //special validation needed - '*compatible', - 'dependencies', //special validation needed - '*usesrole', - '*usestask', // reserve these for 1.4.0a1 to implement - // this will allow a package.xml to gracefully say it - // needs a certain package installed in order to implement a role or task - '*providesextension', - '*srcpackage|*srcuri', - '+phprelease|+extsrcrelease|+extbinrelease|' . - '+zendextsrcrelease|+zendextbinrelease|bundle', //special validation needed - '*changelog', - ); - $test = $this->_packageInfo; - if (isset($test['dependencies']) && - isset($test['dependencies']['required']) && - isset($test['dependencies']['required']['pearinstaller']) && - isset($test['dependencies']['required']['pearinstaller']['min']) && - version_compare('1.9.4', - $test['dependencies']['required']['pearinstaller']['min'], '<') - ) { - $this->_pearVersionTooLow($test['dependencies']['required']['pearinstaller']['min']); - return false; - } - // ignore post-installation array fields - if (array_key_exists('filelist', $test)) { - unset($test['filelist']); - } - if (array_key_exists('_lastmodified', $test)) { - unset($test['_lastmodified']); - } - if (array_key_exists('#binarypackage', $test)) { - unset($test['#binarypackage']); - } - if (array_key_exists('old', $test)) { - unset($test['old']); - } - if (array_key_exists('_lastversion', $test)) { - unset($test['_lastversion']); - } - if (!$this->_stupidSchemaValidate($structure, $test, '')) { - return false; - } - if (empty($this->_packageInfo['name'])) { - $this->_tagCannotBeEmpty('name'); - } - $test = isset($this->_packageInfo['uri']) ? 'uri' :'channel'; - if (empty($this->_packageInfo[$test])) { - $this->_tagCannotBeEmpty($test); - } - if (is_array($this->_packageInfo['license']) && - (!isset($this->_packageInfo['license']['_content']) || - empty($this->_packageInfo['license']['_content']))) { - $this->_tagCannotBeEmpty('license'); - } elseif (empty($this->_packageInfo['license'])) { - $this->_tagCannotBeEmpty('license'); - } - if (empty($this->_packageInfo['summary'])) { - $this->_tagCannotBeEmpty('summary'); - } - if (empty($this->_packageInfo['description'])) { - $this->_tagCannotBeEmpty('description'); - } - if (empty($this->_packageInfo['date'])) { - $this->_tagCannotBeEmpty('date'); - } - if (empty($this->_packageInfo['notes'])) { - $this->_tagCannotBeEmpty('notes'); - } - if (isset($this->_packageInfo['time']) && empty($this->_packageInfo['time'])) { - $this->_tagCannotBeEmpty('time'); - } - if (isset($this->_packageInfo['dependencies'])) { - $this->_validateDependencies(); - } - if (isset($this->_packageInfo['compatible'])) { - $this->_validateCompatible(); - } - if (!isset($this->_packageInfo['bundle'])) { - if (empty($this->_packageInfo['contents'])) { - $this->_tagCannotBeEmpty('contents'); - } - if (!isset($this->_packageInfo['contents']['dir'])) { - $this->_filelistMustContainDir('contents'); - return false; - } - if (isset($this->_packageInfo['contents']['file'])) { - $this->_filelistCannotContainFile('contents'); - return false; - } - } - $this->_validateMaintainers(); - $this->_validateStabilityVersion(); - $fail = false; - if (array_key_exists('usesrole', $this->_packageInfo)) { - $roles = $this->_packageInfo['usesrole']; - if (!is_array($roles) || !isset($roles[0])) { - $roles = array($roles); - } - foreach ($roles as $role) { - if (!isset($role['role'])) { - $this->_usesroletaskMustHaveRoleTask('usesrole', 'role'); - $fail = true; - } else { - if (!isset($role['channel'])) { - if (!isset($role['uri'])) { - $this->_usesroletaskMustHaveChannelOrUri($role['role'], 'usesrole'); - $fail = true; - } - } elseif (!isset($role['package'])) { - $this->_usesroletaskMustHavePackage($role['role'], 'usesrole'); - $fail = true; - } - } - } - } - if (array_key_exists('usestask', $this->_packageInfo)) { - $roles = $this->_packageInfo['usestask']; - if (!is_array($roles) || !isset($roles[0])) { - $roles = array($roles); - } - foreach ($roles as $role) { - if (!isset($role['task'])) { - $this->_usesroletaskMustHaveRoleTask('usestask', 'task'); - $fail = true; - } else { - if (!isset($role['channel'])) { - if (!isset($role['uri'])) { - $this->_usesroletaskMustHaveChannelOrUri($role['task'], 'usestask'); - $fail = true; - } - } elseif (!isset($role['package'])) { - $this->_usesroletaskMustHavePackage($role['task'], 'usestask'); - $fail = true; - } - } - } - } - - if ($fail) { - return false; - } - - $list = $this->_packageInfo['contents']; - if (isset($list['dir']) && is_array($list['dir']) && isset($list['dir'][0])) { - $this->_multipleToplevelDirNotAllowed(); - return $this->_isValid = 0; - } - - $this->_validateFilelist(); - $this->_validateRelease(); - if (!$this->_stack->hasErrors()) { - $chan = $this->_pf->_registry->getChannel($this->_pf->getChannel(), true); - if (PEAR::isError($chan)) { - $this->_unknownChannel($this->_pf->getChannel()); - } else { - $valpack = $chan->getValidationPackage(); - // for channel validator packages, always use the default PEAR validator. - // otherwise, they can't be installed or packaged - $validator = $chan->getValidationObject($this->_pf->getPackage()); - if (!$validator) { - $this->_stack->push(__FUNCTION__, 'error', - array('channel' => $chan->getName(), - 'package' => $this->_pf->getPackage(), - 'name' => $valpack['_content'], - 'version' => $valpack['attribs']['version']), - 'package "%channel%/%package%" cannot be properly validated without ' . - 'validation package "%channel%/%name%-%version%"'); - return $this->_isValid = 0; - } - $validator->setPackageFile($this->_pf); - $validator->validate($state); - $failures = $validator->getFailures(); - foreach ($failures['errors'] as $error) { - $this->_stack->push(__FUNCTION__, 'error', $error, - 'Channel validator error: field "%field%" - %reason%'); - } - foreach ($failures['warnings'] as $warning) { - $this->_stack->push(__FUNCTION__, 'warning', $warning, - 'Channel validator warning: field "%field%" - %reason%'); - } - } - } - - $this->_pf->_isValid = $this->_isValid = !$this->_stack->hasErrors('error'); - if ($this->_isValid && $state == PEAR_VALIDATE_PACKAGING && !$this->_filesValid) { - if ($this->_pf->getPackageType() == 'bundle') { - if ($this->_analyzeBundledPackages()) { - $this->_filesValid = $this->_pf->_filesValid = true; - } else { - $this->_pf->_isValid = $this->_isValid = 0; - } - } else { - if (!$this->_analyzePhpFiles()) { - $this->_pf->_isValid = $this->_isValid = 0; - } else { - $this->_filesValid = $this->_pf->_filesValid = true; - } - } - } - - if ($this->_isValid) { - return $this->_pf->_isValid = $this->_isValid = $state; - } - - return $this->_pf->_isValid = $this->_isValid = 0; - } - - function _stupidSchemaValidate($structure, $xml, $root) - { - if (!is_array($xml)) { - $xml = array(); - } - $keys = array_keys($xml); - reset($keys); - $key = current($keys); - while ($key == 'attribs' || $key == '_contents') { - $key = next($keys); - } - $unfoundtags = $optionaltags = array(); - $ret = true; - $mismatch = false; - foreach ($structure as $struc) { - if ($key) { - $tag = $xml[$key]; - } - $test = $this->_processStructure($struc); - if (isset($test['choices'])) { - $loose = true; - foreach ($test['choices'] as $choice) { - if ($key == $choice['tag']) { - $key = next($keys); - while ($key == 'attribs' || $key == '_contents') { - $key = next($keys); - } - $unfoundtags = $optionaltags = array(); - $mismatch = false; - if ($key && $key != $choice['tag'] && isset($choice['multiple'])) { - $unfoundtags[] = $choice['tag']; - $optionaltags[] = $choice['tag']; - if ($key) { - $mismatch = true; - } - } - $ret &= $this->_processAttribs($choice, $tag, $root); - continue 2; - } else { - $unfoundtags[] = $choice['tag']; - $mismatch = true; - } - if (!isset($choice['multiple']) || $choice['multiple'] != '*') { - $loose = false; - } else { - $optionaltags[] = $choice['tag']; - } - } - if (!$loose) { - $this->_invalidTagOrder($unfoundtags, $key, $root); - return false; - } - } else { - if ($key != $test['tag']) { - if (isset($test['multiple']) && $test['multiple'] != '*') { - $unfoundtags[] = $test['tag']; - $this->_invalidTagOrder($unfoundtags, $key, $root); - return false; - } else { - if ($key) { - $mismatch = true; - } - $unfoundtags[] = $test['tag']; - $optionaltags[] = $test['tag']; - } - if (!isset($test['multiple'])) { - $this->_invalidTagOrder($unfoundtags, $key, $root); - return false; - } - continue; - } else { - $unfoundtags = $optionaltags = array(); - $mismatch = false; - } - $key = next($keys); - while ($key == 'attribs' || $key == '_contents') { - $key = next($keys); - } - if ($key && $key != $test['tag'] && isset($test['multiple'])) { - $unfoundtags[] = $test['tag']; - $optionaltags[] = $test['tag']; - $mismatch = true; - } - $ret &= $this->_processAttribs($test, $tag, $root); - continue; - } - } - if (!$mismatch && count($optionaltags)) { - // don't error out on any optional tags - $unfoundtags = array_diff($unfoundtags, $optionaltags); - } - if (count($unfoundtags)) { - $this->_invalidTagOrder($unfoundtags, $key, $root); - } elseif ($key) { - // unknown tags - $this->_invalidTagOrder('*no tags allowed here*', $key, $root); - while ($key = next($keys)) { - $this->_invalidTagOrder('*no tags allowed here*', $key, $root); - } - } - return $ret; - } - - function _processAttribs($choice, $tag, $context) - { - if (isset($choice['attribs'])) { - if (!is_array($tag)) { - $tag = array($tag); - } - $tags = $tag; - if (!isset($tags[0])) { - $tags = array($tags); - } - $ret = true; - foreach ($tags as $i => $tag) { - if (!is_array($tag) || !isset($tag['attribs'])) { - foreach ($choice['attribs'] as $attrib) { - if ($attrib{0} != '?') { - $ret &= $this->_tagHasNoAttribs($choice['tag'], - $context); - continue 2; - } - } - } - foreach ($choice['attribs'] as $attrib) { - if ($attrib{0} != '?') { - if (!isset($tag['attribs'][$attrib])) { - $ret &= $this->_tagMissingAttribute($choice['tag'], - $attrib, $context); - } - } - } - } - return $ret; - } - return true; - } - - function _processStructure($key) - { - $ret = array(); - if (count($pieces = explode('|', $key)) > 1) { - $ret['choices'] = array(); - foreach ($pieces as $piece) { - $ret['choices'][] = $this->_processStructure($piece); - } - return $ret; - } - $multi = $key{0}; - if ($multi == '+' || $multi == '*') { - $ret['multiple'] = $key{0}; - $key = substr($key, 1); - } - if (count($attrs = explode('->', $key)) > 1) { - $ret['tag'] = array_shift($attrs); - $ret['attribs'] = $attrs; - } else { - $ret['tag'] = $key; - } - return $ret; - } - - function _validateStabilityVersion() - { - $structure = array('release', 'api'); - $a = $this->_stupidSchemaValidate($structure, $this->_packageInfo['version'], ''); - $a &= $this->_stupidSchemaValidate($structure, $this->_packageInfo['stability'], ''); - if ($a) { - if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', - $this->_packageInfo['version']['release'])) { - $this->_invalidVersion('release', $this->_packageInfo['version']['release']); - } - if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', - $this->_packageInfo['version']['api'])) { - $this->_invalidVersion('api', $this->_packageInfo['version']['api']); - } - if (!in_array($this->_packageInfo['stability']['release'], - array('snapshot', 'devel', 'alpha', 'beta', 'stable'))) { - $this->_invalidState('release', $this->_packageInfo['stability']['release']); - } - if (!in_array($this->_packageInfo['stability']['api'], - array('devel', 'alpha', 'beta', 'stable'))) { - $this->_invalidState('api', $this->_packageInfo['stability']['api']); - } - } - } - - function _validateMaintainers() - { - $structure = - array( - 'name', - 'user', - 'email', - 'active', - ); - foreach (array('lead', 'developer', 'contributor', 'helper') as $type) { - if (!isset($this->_packageInfo[$type])) { - continue; - } - if (isset($this->_packageInfo[$type][0])) { - foreach ($this->_packageInfo[$type] as $lead) { - $this->_stupidSchemaValidate($structure, $lead, '<' . $type . '>'); - } - } else { - $this->_stupidSchemaValidate($structure, $this->_packageInfo[$type], - '<' . $type . '>'); - } - } - } - - function _validatePhpDep($dep, $installcondition = false) - { - $structure = array( - 'min', - '*max', - '*exclude', - ); - $type = $installcondition ? '' : ''; - $this->_stupidSchemaValidate($structure, $dep, $type); - if (isset($dep['min'])) { - if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?(?:-[a-zA-Z0-9]+)?\\z/', - $dep['min'])) { - $this->_invalidVersion($type . '', $dep['min']); - } - } - if (isset($dep['max'])) { - if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?(?:-[a-zA-Z0-9]+)?\\z/', - $dep['max'])) { - $this->_invalidVersion($type . '', $dep['max']); - } - } - if (isset($dep['exclude'])) { - if (!is_array($dep['exclude'])) { - $dep['exclude'] = array($dep['exclude']); - } - foreach ($dep['exclude'] as $exclude) { - if (!preg_match( - '/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?(?:-[a-zA-Z0-9]+)?\\z/', - $exclude)) { - $this->_invalidVersion($type . '', $exclude); - } - } - } - } - - function _validatePearinstallerDep($dep) - { - $structure = array( - 'min', - '*max', - '*recommended', - '*exclude', - ); - $this->_stupidSchemaValidate($structure, $dep, ''); - if (isset($dep['min'])) { - if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', - $dep['min'])) { - $this->_invalidVersion('', - $dep['min']); - } - } - if (isset($dep['max'])) { - if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', - $dep['max'])) { - $this->_invalidVersion('', - $dep['max']); - } - } - if (isset($dep['recommended'])) { - if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', - $dep['recommended'])) { - $this->_invalidVersion('', - $dep['recommended']); - } - } - if (isset($dep['exclude'])) { - if (!is_array($dep['exclude'])) { - $dep['exclude'] = array($dep['exclude']); - } - foreach ($dep['exclude'] as $exclude) { - if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', - $exclude)) { - $this->_invalidVersion('', - $exclude); - } - } - } - } - - function _validatePackageDep($dep, $group, $type = '') - { - if (isset($dep['uri'])) { - if (isset($dep['conflicts'])) { - $structure = array( - 'name', - 'uri', - 'conflicts', - '*providesextension', - ); - } else { - $structure = array( - 'name', - 'uri', - '*providesextension', - ); - } - } else { - if (isset($dep['conflicts'])) { - $structure = array( - 'name', - 'channel', - '*min', - '*max', - '*exclude', - 'conflicts', - '*providesextension', - ); - } else { - $structure = array( - 'name', - 'channel', - '*min', - '*max', - '*recommended', - '*exclude', - '*nodefault', - '*providesextension', - ); - } - } - if (isset($dep['name'])) { - $type .= '' . $dep['name'] . ''; - } - $this->_stupidSchemaValidate($structure, $dep, '' . $group . $type); - if (isset($dep['uri']) && (isset($dep['min']) || isset($dep['max']) || - isset($dep['recommended']) || isset($dep['exclude']))) { - $this->_uriDepsCannotHaveVersioning('' . $group . $type); - } - if (isset($dep['channel']) && strtolower($dep['channel']) == '__uri') { - $this->_DepchannelCannotBeUri('' . $group . $type); - } - if (isset($dep['min'])) { - if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', - $dep['min'])) { - $this->_invalidVersion('' . $group . $type . '', $dep['min']); - } - } - if (isset($dep['max'])) { - if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', - $dep['max'])) { - $this->_invalidVersion('' . $group . $type . '', $dep['max']); - } - } - if (isset($dep['recommended'])) { - if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', - $dep['recommended'])) { - $this->_invalidVersion('' . $group . $type . '', - $dep['recommended']); - } - } - if (isset($dep['exclude'])) { - if (!is_array($dep['exclude'])) { - $dep['exclude'] = array($dep['exclude']); - } - foreach ($dep['exclude'] as $exclude) { - if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', - $exclude)) { - $this->_invalidVersion('' . $group . $type . '', - $exclude); - } - } - } - } - - function _validateSubpackageDep($dep, $group) - { - $this->_validatePackageDep($dep, $group, ''); - if (isset($dep['providesextension'])) { - $this->_subpackageCannotProvideExtension(isset($dep['name']) ? $dep['name'] : ''); - } - if (isset($dep['conflicts'])) { - $this->_subpackagesCannotConflict(isset($dep['name']) ? $dep['name'] : ''); - } - } - - function _validateExtensionDep($dep, $group = false, $installcondition = false) - { - if (isset($dep['conflicts'])) { - $structure = array( - 'name', - '*min', - '*max', - '*exclude', - 'conflicts', - ); - } else { - $structure = array( - 'name', - '*min', - '*max', - '*recommended', - '*exclude', - ); - } - if ($installcondition) { - $type = ''; - } else { - $type = '' . $group . ''; - } - if (isset($dep['name'])) { - $type .= '' . $dep['name'] . ''; - } - $this->_stupidSchemaValidate($structure, $dep, $type); - if (isset($dep['min'])) { - if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', - $dep['min'])) { - $this->_invalidVersion(substr($type, 1) . '_invalidVersion(substr($type, 1) . '_invalidVersion(substr($type, 1) . '_invalidVersion(substr($type, 1) . '' : ''; - if ($this->_stupidSchemaValidate($structure, $dep, $type)) { - if ($dep['name'] == '*') { - if (array_key_exists('conflicts', $dep)) { - $this->_cannotConflictWithAllOs($type); - } - } - } - } - - function _validateArchDep($dep, $installcondition = false) - { - $structure = array( - 'pattern', - '*conflicts', - ); - $type = $installcondition ? '' : ''; - $this->_stupidSchemaValidate($structure, $dep, $type); - } - - function _validateInstallConditions($cond, $release) - { - $structure = array( - '*php', - '*extension', - '*os', - '*arch', - ); - if (!$this->_stupidSchemaValidate($structure, - $cond, $release)) { - return false; - } - foreach (array('php', 'extension', 'os', 'arch') as $type) { - if (isset($cond[$type])) { - $iter = $cond[$type]; - if (!is_array($iter) || !isset($iter[0])) { - $iter = array($iter); - } - foreach ($iter as $package) { - if ($type == 'extension') { - $this->{"_validate{$type}Dep"}($package, false, true); - } else { - $this->{"_validate{$type}Dep"}($package, true); - } - } - } - } - } - - function _validateDependencies() - { - $structure = array( - 'required', - '*optional', - '*group->name->hint' - ); - if (!$this->_stupidSchemaValidate($structure, - $this->_packageInfo['dependencies'], '')) { - return false; - } - foreach (array('required', 'optional') as $simpledep) { - if (isset($this->_packageInfo['dependencies'][$simpledep])) { - if ($simpledep == 'optional') { - $structure = array( - '*package', - '*subpackage', - '*extension', - ); - } else { - $structure = array( - 'php', - 'pearinstaller', - '*package', - '*subpackage', - '*extension', - '*os', - '*arch', - ); - } - if ($this->_stupidSchemaValidate($structure, - $this->_packageInfo['dependencies'][$simpledep], - "<$simpledep>")) { - foreach (array('package', 'subpackage', 'extension') as $type) { - if (isset($this->_packageInfo['dependencies'][$simpledep][$type])) { - $iter = $this->_packageInfo['dependencies'][$simpledep][$type]; - if (!isset($iter[0])) { - $iter = array($iter); - } - foreach ($iter as $package) { - if ($type != 'extension') { - if (isset($package['uri'])) { - if (isset($package['channel'])) { - $this->_UrlOrChannel($type, - $package['name']); - } - } else { - if (!isset($package['channel'])) { - $this->_NoChannel($type, $package['name']); - } - } - } - $this->{"_validate{$type}Dep"}($package, "<$simpledep>"); - } - } - } - if ($simpledep == 'optional') { - continue; - } - foreach (array('php', 'pearinstaller', 'os', 'arch') as $type) { - if (isset($this->_packageInfo['dependencies'][$simpledep][$type])) { - $iter = $this->_packageInfo['dependencies'][$simpledep][$type]; - if (!isset($iter[0])) { - $iter = array($iter); - } - foreach ($iter as $package) { - $this->{"_validate{$type}Dep"}($package); - } - } - } - } - } - } - if (isset($this->_packageInfo['dependencies']['group'])) { - $groups = $this->_packageInfo['dependencies']['group']; - if (!isset($groups[0])) { - $groups = array($groups); - } - $structure = array( - '*package', - '*subpackage', - '*extension', - ); - foreach ($groups as $group) { - if ($this->_stupidSchemaValidate($structure, $group, '')) { - if (!PEAR_Validate::validGroupName($group['attribs']['name'])) { - $this->_invalidDepGroupName($group['attribs']['name']); - } - foreach (array('package', 'subpackage', 'extension') as $type) { - if (isset($group[$type])) { - $iter = $group[$type]; - if (!isset($iter[0])) { - $iter = array($iter); - } - foreach ($iter as $package) { - if ($type != 'extension') { - if (isset($package['uri'])) { - if (isset($package['channel'])) { - $this->_UrlOrChannelGroup($type, - $package['name'], - $group['name']); - } - } else { - if (!isset($package['channel'])) { - $this->_NoChannelGroup($type, - $package['name'], - $group['name']); - } - } - } - $this->{"_validate{$type}Dep"}($package, ''); - } - } - } - } - } - } - } - - function _validateCompatible() - { - $compat = $this->_packageInfo['compatible']; - if (!isset($compat[0])) { - $compat = array($compat); - } - $required = array('name', 'channel', 'min', 'max', '*exclude'); - foreach ($compat as $package) { - $type = ''; - if (is_array($package) && array_key_exists('name', $package)) { - $type .= '' . $package['name'] . ''; - } - $this->_stupidSchemaValidate($required, $package, $type); - if (is_array($package) && array_key_exists('min', $package)) { - if (!preg_match('/^\d+(?:\.\d+)*(?:[a-zA-Z]+\d*)?\\z/', - $package['min'])) { - $this->_invalidVersion(substr($type, 1) . '_invalidVersion(substr($type, 1) . '_invalidVersion(substr($type, 1) . '_NoBundledPackages(); - } - if (!is_array($list['bundledpackage']) || !isset($list['bundledpackage'][0])) { - return $this->_AtLeast2BundledPackages(); - } - foreach ($list['bundledpackage'] as $package) { - if (!is_string($package)) { - $this->_bundledPackagesMustBeFilename(); - } - } - } - - function _validateFilelist($list = false, $allowignore = false, $dirs = '') - { - $iscontents = false; - if (!$list) { - $iscontents = true; - $list = $this->_packageInfo['contents']; - if (isset($this->_packageInfo['bundle'])) { - return $this->_validateBundle($list); - } - } - if ($allowignore) { - $struc = array( - '*install->name->as', - '*ignore->name' - ); - } else { - $struc = array( - '*dir->name->?baseinstalldir', - '*file->name->role->?baseinstalldir->?md5sum' - ); - if (isset($list['dir']) && isset($list['file'])) { - // stave off validation errors without requiring a set order. - $_old = $list; - if (isset($list['attribs'])) { - $list = array('attribs' => $_old['attribs']); - } - $list['dir'] = $_old['dir']; - $list['file'] = $_old['file']; - } - } - if (!isset($list['attribs']) || !isset($list['attribs']['name'])) { - $unknown = $allowignore ? '' : ''; - $dirname = $iscontents ? '' : $unknown; - } else { - $dirname = ''; - if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~', - str_replace('\\', '/', $list['attribs']['name']))) { - // file contains .. parent directory or . cur directory - $this->_invalidDirName($list['attribs']['name']); - } - } - $res = $this->_stupidSchemaValidate($struc, $list, $dirname); - if ($allowignore && $res) { - $ignored_or_installed = array(); - $this->_pf->getFilelist(); - $fcontents = $this->_pf->getContents(); - $filelist = array(); - if (!isset($fcontents['dir']['file'][0])) { - $fcontents['dir']['file'] = array($fcontents['dir']['file']); - } - foreach ($fcontents['dir']['file'] as $file) { - $filelist[$file['attribs']['name']] = true; - } - if (isset($list['install'])) { - if (!isset($list['install'][0])) { - $list['install'] = array($list['install']); - } - foreach ($list['install'] as $file) { - if (!isset($filelist[$file['attribs']['name']])) { - $this->_notInContents($file['attribs']['name'], 'install'); - continue; - } - if (array_key_exists($file['attribs']['name'], $ignored_or_installed)) { - $this->_multipleInstallAs($file['attribs']['name']); - } - if (!isset($ignored_or_installed[$file['attribs']['name']])) { - $ignored_or_installed[$file['attribs']['name']] = array(); - } - $ignored_or_installed[$file['attribs']['name']][] = 1; - if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~', - str_replace('\\', '/', $file['attribs']['as']))) { - // file contains .. parent directory or . cur directory references - $this->_invalidFileInstallAs($file['attribs']['name'], - $file['attribs']['as']); - } - } - } - if (isset($list['ignore'])) { - if (!isset($list['ignore'][0])) { - $list['ignore'] = array($list['ignore']); - } - foreach ($list['ignore'] as $file) { - if (!isset($filelist[$file['attribs']['name']])) { - $this->_notInContents($file['attribs']['name'], 'ignore'); - continue; - } - if (array_key_exists($file['attribs']['name'], $ignored_or_installed)) { - $this->_ignoreAndInstallAs($file['attribs']['name']); - } - } - } - } - if (!$allowignore && isset($list['file'])) { - if (is_string($list['file'])) { - $this->_oldStyleFileNotAllowed(); - return false; - } - if (!isset($list['file'][0])) { - // single file - $list['file'] = array($list['file']); - } - foreach ($list['file'] as $i => $file) - { - if (isset($file['attribs']) && isset($file['attribs']['name'])) { - if ($file['attribs']['name']{0} == '.' && - $file['attribs']['name']{1} == '/') { - // name is something like "./doc/whatever.txt" - $this->_invalidFileName($file['attribs']['name'], $dirname); - } - if (preg_match('~/\.\.?(/|\\z)|^\.\.?/~', - str_replace('\\', '/', $file['attribs']['name']))) { - // file contains .. parent directory or . cur directory - $this->_invalidFileName($file['attribs']['name'], $dirname); - } - } - if (isset($file['attribs']) && isset($file['attribs']['role'])) { - if (!$this->_validateRole($file['attribs']['role'])) { - if (isset($this->_packageInfo['usesrole'])) { - $roles = $this->_packageInfo['usesrole']; - if (!isset($roles[0])) { - $roles = array($roles); - } - foreach ($roles as $role) { - if ($role['role'] = $file['attribs']['role']) { - $msg = 'This package contains role "%role%" and requires ' . - 'package "%package%" to be used'; - if (isset($role['uri'])) { - $params = array('role' => $role['role'], - 'package' => $role['uri']); - } else { - $params = array('role' => $role['role'], - 'package' => $this->_pf->_registry-> - parsedPackageNameToString(array('package' => - $role['package'], 'channel' => $role['channel']), - true)); - } - $this->_stack->push('_mustInstallRole', 'error', $params, $msg); - } - } - } - $this->_invalidFileRole($file['attribs']['name'], - $dirname, $file['attribs']['role']); - } - } - if (!isset($file['attribs'])) { - continue; - } - $save = $file['attribs']; - if ($dirs) { - $save['name'] = $dirs . '/' . $save['name']; - } - unset($file['attribs']); - if (count($file) && $this->_curState != PEAR_VALIDATE_DOWNLOADING) { // has tasks - foreach ($file as $task => $value) { - if ($tagClass = $this->_pf->getTask($task)) { - if (!is_array($value) || !isset($value[0])) { - $value = array($value); - } - foreach ($value as $v) { - $ret = call_user_func(array($tagClass, 'validateXml'), - $this->_pf, $v, $this->_pf->_config, $save); - if (is_array($ret)) { - $this->_invalidTask($task, $ret, isset($save['name']) ? - $save['name'] : ''); - } - } - } else { - if (isset($this->_packageInfo['usestask'])) { - $roles = $this->_packageInfo['usestask']; - if (!isset($roles[0])) { - $roles = array($roles); - } - foreach ($roles as $role) { - if ($role['task'] = $task) { - $msg = 'This package contains task "%task%" and requires ' . - 'package "%package%" to be used'; - if (isset($role['uri'])) { - $params = array('task' => $role['task'], - 'package' => $role['uri']); - } else { - $params = array('task' => $role['task'], - 'package' => $this->_pf->_registry-> - parsedPackageNameToString(array('package' => - $role['package'], 'channel' => $role['channel']), - true)); - } - $this->_stack->push('_mustInstallTask', 'error', - $params, $msg); - } - } - } - $this->_unknownTask($task, $save['name']); - } - } - } - } - } - if (isset($list['ignore'])) { - if (!$allowignore) { - $this->_ignoreNotAllowed('ignore'); - } - } - if (isset($list['install'])) { - if (!$allowignore) { - $this->_ignoreNotAllowed('install'); - } - } - if (isset($list['file'])) { - if ($allowignore) { - $this->_fileNotAllowed('file'); - } - } - if (isset($list['dir'])) { - if ($allowignore) { - $this->_fileNotAllowed('dir'); - } else { - if (!isset($list['dir'][0])) { - $list['dir'] = array($list['dir']); - } - foreach ($list['dir'] as $dir) { - if (isset($dir['attribs']) && isset($dir['attribs']['name'])) { - if ($dir['attribs']['name'] == '/' || - !isset($this->_packageInfo['contents']['dir']['dir'])) { - // always use nothing if the filelist has already been flattened - $newdirs = ''; - } elseif ($dirs == '') { - $newdirs = $dir['attribs']['name']; - } else { - $newdirs = $dirs . '/' . $dir['attribs']['name']; - } - } else { - $newdirs = $dirs; - } - $this->_validateFilelist($dir, $allowignore, $newdirs); - } - } - } - } - - function _validateRelease() - { - if (isset($this->_packageInfo['phprelease'])) { - $release = 'phprelease'; - if (isset($this->_packageInfo['providesextension'])) { - $this->_cannotProvideExtension($release); - } - if (isset($this->_packageInfo['srcpackage']) || isset($this->_packageInfo['srcuri'])) { - $this->_cannotHaveSrcpackage($release); - } - $releases = $this->_packageInfo['phprelease']; - if (!is_array($releases)) { - return true; - } - if (!isset($releases[0])) { - $releases = array($releases); - } - foreach ($releases as $rel) { - $this->_stupidSchemaValidate(array( - '*installconditions', - '*filelist', - ), $rel, ''); - } - } - foreach (array('', 'zend') as $prefix) { - $releasetype = $prefix . 'extsrcrelease'; - if (isset($this->_packageInfo[$releasetype])) { - $release = $releasetype; - if (!isset($this->_packageInfo['providesextension'])) { - $this->_mustProvideExtension($release); - } - if (isset($this->_packageInfo['srcpackage']) || isset($this->_packageInfo['srcuri'])) { - $this->_cannotHaveSrcpackage($release); - } - $releases = $this->_packageInfo[$releasetype]; - if (!is_array($releases)) { - return true; - } - if (!isset($releases[0])) { - $releases = array($releases); - } - foreach ($releases as $rel) { - $this->_stupidSchemaValidate(array( - '*installconditions', - '*configureoption->name->prompt->?default', - '*binarypackage', - '*filelist', - ), $rel, '<' . $releasetype . '>'); - if (isset($rel['binarypackage'])) { - if (!is_array($rel['binarypackage']) || !isset($rel['binarypackage'][0])) { - $rel['binarypackage'] = array($rel['binarypackage']); - } - foreach ($rel['binarypackage'] as $bin) { - if (!is_string($bin)) { - $this->_binaryPackageMustBePackagename(); - } - } - } - } - } - $releasetype = 'extbinrelease'; - if (isset($this->_packageInfo[$releasetype])) { - $release = $releasetype; - if (!isset($this->_packageInfo['providesextension'])) { - $this->_mustProvideExtension($release); - } - if (isset($this->_packageInfo['channel']) && - !isset($this->_packageInfo['srcpackage'])) { - $this->_mustSrcPackage($release); - } - if (isset($this->_packageInfo['uri']) && !isset($this->_packageInfo['srcuri'])) { - $this->_mustSrcuri($release); - } - $releases = $this->_packageInfo[$releasetype]; - if (!is_array($releases)) { - return true; - } - if (!isset($releases[0])) { - $releases = array($releases); - } - foreach ($releases as $rel) { - $this->_stupidSchemaValidate(array( - '*installconditions', - '*filelist', - ), $rel, '<' . $releasetype . '>'); - } - } - } - if (isset($this->_packageInfo['bundle'])) { - $release = 'bundle'; - if (isset($this->_packageInfo['providesextension'])) { - $this->_cannotProvideExtension($release); - } - if (isset($this->_packageInfo['srcpackage']) || isset($this->_packageInfo['srcuri'])) { - $this->_cannotHaveSrcpackage($release); - } - $releases = $this->_packageInfo['bundle']; - if (!is_array($releases) || !isset($releases[0])) { - $releases = array($releases); - } - foreach ($releases as $rel) { - $this->_stupidSchemaValidate(array( - '*installconditions', - '*filelist', - ), $rel, ''); - } - } - foreach ($releases as $rel) { - if (is_array($rel) && array_key_exists('installconditions', $rel)) { - $this->_validateInstallConditions($rel['installconditions'], - "<$release>"); - } - if (is_array($rel) && array_key_exists('filelist', $rel)) { - if ($rel['filelist']) { - - $this->_validateFilelist($rel['filelist'], true); - } - } - } - } - - /** - * This is here to allow role extension through plugins - * @param string - */ - function _validateRole($role) - { - return in_array($role, PEAR_Installer_Role::getValidRoles($this->_pf->getPackageType())); - } - - function _pearVersionTooLow($version) - { - $this->_stack->push(__FUNCTION__, 'error', - array('version' => $version), - 'This package.xml requires PEAR version %version% to parse properly, we are ' . - 'version 1.9.4'); - } - - function _invalidTagOrder($oktags, $actual, $root) - { - $this->_stack->push(__FUNCTION__, 'error', - array('oktags' => $oktags, 'actual' => $actual, 'root' => $root), - 'Invalid tag order in %root%, found <%actual%> expected one of "%oktags%"'); - } - - function _ignoreNotAllowed($type) - { - $this->_stack->push(__FUNCTION__, 'error', array('type' => $type), - '<%type%> is not allowed inside global , only inside ' . - '//, use and only'); - } - - function _fileNotAllowed($type) - { - $this->_stack->push(__FUNCTION__, 'error', array('type' => $type), - '<%type%> is not allowed inside release , only inside ' . - ', use and only'); - } - - function _oldStyleFileNotAllowed() - { - $this->_stack->push(__FUNCTION__, 'error', array(), - 'Old-style name is not allowed. Use' . - ''); - } - - function _tagMissingAttribute($tag, $attr, $context) - { - $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag, - 'attribute' => $attr, 'context' => $context), - 'tag <%tag%> in context "%context%" has no attribute "%attribute%"'); - } - - function _tagHasNoAttribs($tag, $context) - { - $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag, - 'context' => $context), - 'tag <%tag%> has no attributes in context "%context%"'); - } - - function _invalidInternalStructure() - { - $this->_stack->push(__FUNCTION__, 'exception', array(), - 'internal array was not generated by compatible parser, or extreme parser error, cannot continue'); - } - - function _invalidFileRole($file, $dir, $role) - { - $this->_stack->push(__FUNCTION__, 'error', array( - 'file' => $file, 'dir' => $dir, 'role' => $role, - 'roles' => PEAR_Installer_Role::getValidRoles($this->_pf->getPackageType())), - 'File "%file%" in directory "%dir%" has invalid role "%role%", should be one of %roles%'); - } - - function _invalidFileName($file, $dir) - { - $this->_stack->push(__FUNCTION__, 'error', array( - 'file' => $file), - 'File "%file%" in directory "%dir%" cannot begin with "./" or contain ".."'); - } - - function _invalidFileInstallAs($file, $as) - { - $this->_stack->push(__FUNCTION__, 'error', array( - 'file' => $file, 'as' => $as), - 'File "%file%" cannot contain "./" or contain ".."'); - } - - function _invalidDirName($dir) - { - $this->_stack->push(__FUNCTION__, 'error', array( - 'dir' => $file), - 'Directory "%dir%" cannot begin with "./" or contain ".."'); - } - - function _filelistCannotContainFile($filelist) - { - $this->_stack->push(__FUNCTION__, 'error', array('tag' => $filelist), - '<%tag%> can only contain , contains . Use ' . - ' as the first dir element'); - } - - function _filelistMustContainDir($filelist) - { - $this->_stack->push(__FUNCTION__, 'error', array('tag' => $filelist), - '<%tag%> must contain . Use as the ' . - 'first dir element'); - } - - function _tagCannotBeEmpty($tag) - { - $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag), - '<%tag%> cannot be empty (<%tag%/>)'); - } - - function _UrlOrChannel($type, $name) - { - $this->_stack->push(__FUNCTION__, 'error', array('type' => $type, - 'name' => $name), - 'Required dependency <%type%> "%name%" can have either url OR ' . - 'channel attributes, and not both'); - } - - function _NoChannel($type, $name) - { - $this->_stack->push(__FUNCTION__, 'error', array('type' => $type, - 'name' => $name), - 'Required dependency <%type%> "%name%" must have either url OR ' . - 'channel attributes'); - } - - function _UrlOrChannelGroup($type, $name, $group) - { - $this->_stack->push(__FUNCTION__, 'error', array('type' => $type, - 'name' => $name, 'group' => $group), - 'Group "%group%" dependency <%type%> "%name%" can have either url OR ' . - 'channel attributes, and not both'); - } - - function _NoChannelGroup($type, $name, $group) - { - $this->_stack->push(__FUNCTION__, 'error', array('type' => $type, - 'name' => $name, 'group' => $group), - 'Group "%group%" dependency <%type%> "%name%" must have either url OR ' . - 'channel attributes'); - } - - function _unknownChannel($channel) - { - $this->_stack->push(__FUNCTION__, 'error', array('channel' => $channel), - 'Unknown channel "%channel%"'); - } - - function _noPackageVersion() - { - $this->_stack->push(__FUNCTION__, 'error', array(), - 'package.xml tag has no version attribute, or version is not 2.0'); - } - - function _NoBundledPackages() - { - $this->_stack->push(__FUNCTION__, 'error', array(), - 'No tag was found in , required for bundle packages'); - } - - function _AtLeast2BundledPackages() - { - $this->_stack->push(__FUNCTION__, 'error', array(), - 'At least 2 packages must be bundled in a bundle package'); - } - - function _ChannelOrUri($name) - { - $this->_stack->push(__FUNCTION__, 'error', array('name' => $name), - 'Bundled package "%name%" can have either a uri or a channel, not both'); - } - - function _noChildTag($child, $tag) - { - $this->_stack->push(__FUNCTION__, 'error', array('child' => $child, 'tag' => $tag), - 'Tag <%tag%> is missing child tag <%child%>'); - } - - function _invalidVersion($type, $value) - { - $this->_stack->push(__FUNCTION__, 'error', array('type' => $type, 'value' => $value), - 'Version type <%type%> is not a valid version (%value%)'); - } - - function _invalidState($type, $value) - { - $states = array('stable', 'beta', 'alpha', 'devel'); - if ($type != 'api') { - $states[] = 'snapshot'; - } - if (strtolower($value) == 'rc') { - $this->_stack->push(__FUNCTION__, 'error', - array('version' => $this->_packageInfo['version']['release']), - 'RC is not a state, it is a version postfix, try %version%RC1, stability beta'); - } - $this->_stack->push(__FUNCTION__, 'error', array('type' => $type, 'value' => $value, - 'types' => $states), - 'Stability type <%type%> is not a valid stability (%value%), must be one of ' . - '%types%'); - } - - function _invalidTask($task, $ret, $file) - { - switch ($ret[0]) { - case PEAR_TASK_ERROR_MISSING_ATTRIB : - $info = array('attrib' => $ret[1], 'task' => $task, 'file' => $file); - $msg = 'task <%task%> is missing attribute "%attrib%" in file %file%'; - break; - case PEAR_TASK_ERROR_NOATTRIBS : - $info = array('task' => $task, 'file' => $file); - $msg = 'task <%task%> has no attributes in file %file%'; - break; - case PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE : - $info = array('attrib' => $ret[1], 'values' => $ret[3], - 'was' => $ret[2], 'task' => $task, 'file' => $file); - $msg = 'task <%task%> attribute "%attrib%" has the wrong value "%was%" '. - 'in file %file%, expecting one of "%values%"'; - break; - case PEAR_TASK_ERROR_INVALID : - $info = array('reason' => $ret[1], 'task' => $task, 'file' => $file); - $msg = 'task <%task%> in file %file% is invalid because of "%reason%"'; - break; - } - $this->_stack->push(__FUNCTION__, 'error', $info, $msg); - } - - function _unknownTask($task, $file) - { - $this->_stack->push(__FUNCTION__, 'error', array('task' => $task, 'file' => $file), - 'Unknown task "%task%" passed in file '); - } - - function _subpackageCannotProvideExtension($name) - { - $this->_stack->push(__FUNCTION__, 'error', array('name' => $name), - 'Subpackage dependency "%name%" cannot use , ' . - 'only package dependencies can use this tag'); - } - - function _subpackagesCannotConflict($name) - { - $this->_stack->push(__FUNCTION__, 'error', array('name' => $name), - 'Subpackage dependency "%name%" cannot use , ' . - 'only package dependencies can use this tag'); - } - - function _cannotProvideExtension($release) - { - $this->_stack->push(__FUNCTION__, 'error', array('release' => $release), - '<%release%> packages cannot use , only extbinrelease, extsrcrelease, zendextsrcrelease, and zendextbinrelease can provide a PHP extension'); - } - - function _mustProvideExtension($release) - { - $this->_stack->push(__FUNCTION__, 'error', array('release' => $release), - '<%release%> packages must use to indicate which PHP extension is provided'); - } - - function _cannotHaveSrcpackage($release) - { - $this->_stack->push(__FUNCTION__, 'error', array('release' => $release), - '<%release%> packages cannot specify a source code package, only extension binaries may use the tag'); - } - - function _mustSrcPackage($release) - { - $this->_stack->push(__FUNCTION__, 'error', array('release' => $release), - '/ packages must specify a source code package with '); - } - - function _mustSrcuri($release) - { - $this->_stack->push(__FUNCTION__, 'error', array('release' => $release), - '/ packages must specify a source code package with '); - } - - function _uriDepsCannotHaveVersioning($type) - { - $this->_stack->push(__FUNCTION__, 'error', array('type' => $type), - '%type%: dependencies with a tag cannot have any versioning information'); - } - - function _conflictingDepsCannotHaveVersioning($type) - { - $this->_stack->push(__FUNCTION__, 'error', array('type' => $type), - '%type%: conflicting dependencies cannot have versioning info, use to ' . - 'exclude specific versions of a dependency'); - } - - function _DepchannelCannotBeUri($type) - { - $this->_stack->push(__FUNCTION__, 'error', array('type' => $type), - '%type%: channel cannot be __uri, this is a pseudo-channel reserved for uri ' . - 'dependencies only'); - } - - function _bundledPackagesMustBeFilename() - { - $this->_stack->push(__FUNCTION__, 'error', array(), - ' tags must contain only the filename of a package release ' . - 'in the bundle'); - } - - function _binaryPackageMustBePackagename() - { - $this->_stack->push(__FUNCTION__, 'error', array(), - ' tags must contain the name of a package that is ' . - 'a compiled version of this extsrc/zendextsrc package'); - } - - function _fileNotFound($file) - { - $this->_stack->push(__FUNCTION__, 'error', array('file' => $file), - 'File "%file%" in package.xml does not exist'); - } - - function _notInContents($file, $tag) - { - $this->_stack->push(__FUNCTION__, 'error', array('file' => $file, 'tag' => $tag), - '<%tag% name="%file%"> is invalid, file is not in '); - } - - function _cannotValidateNoPathSet() - { - $this->_stack->push(__FUNCTION__, 'error', array(), - 'Cannot validate files, no path to package file is set (use setPackageFile())'); - } - - function _usesroletaskMustHaveChannelOrUri($role, $tag) - { - $this->_stack->push(__FUNCTION__, 'error', array('role' => $role, 'tag' => $tag), - '<%tag%> for role "%role%" must contain either , or and '); - } - - function _usesroletaskMustHavePackage($role, $tag) - { - $this->_stack->push(__FUNCTION__, 'error', array('role' => $role, 'tag' => $tag), - '<%tag%> for role "%role%" must contain '); - } - - function _usesroletaskMustHaveRoleTask($tag, $type) - { - $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag, 'type' => $type), - '<%tag%> must contain <%type%> defining the %type% to be used'); - } - - function _cannotConflictWithAllOs($type) - { - $this->_stack->push(__FUNCTION__, 'error', array('tag' => $tag), - '%tag% cannot conflict with all OSes'); - } - - function _invalidDepGroupName($name) - { - $this->_stack->push(__FUNCTION__, 'error', array('name' => $name), - 'Invalid dependency group name "%name%"'); - } - - function _multipleToplevelDirNotAllowed() - { - $this->_stack->push(__FUNCTION__, 'error', array(), - 'Multiple top-level tags are not allowed. Enclose them ' . - 'in a '); - } - - function _multipleInstallAs($file) - { - $this->_stack->push(__FUNCTION__, 'error', array('file' => $file), - 'Only one tag is allowed for file "%file%"'); - } - - function _ignoreAndInstallAs($file) - { - $this->_stack->push(__FUNCTION__, 'error', array('file' => $file), - 'Cannot have both and tags for file "%file%"'); - } - - function _analyzeBundledPackages() - { - if (!$this->_isValid) { - return false; - } - if (!$this->_pf->getPackageType() == 'bundle') { - return false; - } - if (!isset($this->_pf->_packageFile)) { - return false; - } - $dir_prefix = dirname($this->_pf->_packageFile); - $common = new PEAR_Common; - $log = isset($this->_pf->_logger) ? array(&$this->_pf->_logger, 'log') : - array($common, 'log'); - $info = $this->_pf->getContents(); - $info = $info['bundledpackage']; - if (!is_array($info)) { - $info = array($info); - } - $pkg = &new PEAR_PackageFile($this->_pf->_config); - foreach ($info as $package) { - if (!file_exists($dir_prefix . DIRECTORY_SEPARATOR . $package)) { - $this->_fileNotFound($dir_prefix . DIRECTORY_SEPARATOR . $package); - $this->_isValid = 0; - continue; - } - call_user_func_array($log, array(1, "Analyzing bundled package $package")); - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $ret = $pkg->fromAnyFile($dir_prefix . DIRECTORY_SEPARATOR . $package, - PEAR_VALIDATE_NORMAL); - PEAR::popErrorHandling(); - if (PEAR::isError($ret)) { - call_user_func_array($log, array(0, "ERROR: package $package is not a valid " . - 'package')); - $inf = $ret->getUserInfo(); - if (is_array($inf)) { - foreach ($inf as $err) { - call_user_func_array($log, array(1, $err['message'])); - } - } - return false; - } - } - return true; - } - - function _analyzePhpFiles() - { - if (!$this->_isValid) { - return false; - } - if (!isset($this->_pf->_packageFile)) { - $this->_cannotValidateNoPathSet(); - return false; - } - $dir_prefix = dirname($this->_pf->_packageFile); - $common = new PEAR_Common; - $log = isset($this->_pf->_logger) ? array(&$this->_pf->_logger, 'log') : - array(&$common, 'log'); - $info = $this->_pf->getContents(); - if (!$info || !isset($info['dir']['file'])) { - $this->_tagCannotBeEmpty('contents>_fileNotFound($dir_prefix . DIRECTORY_SEPARATOR . $file); - $this->_isValid = 0; - continue; - } - if (in_array($fa['role'], PEAR_Installer_Role::getPhpRoles()) && $dir_prefix) { - call_user_func_array($log, array(1, "Analyzing $file")); - $srcinfo = $this->analyzeSourceCode($dir_prefix . DIRECTORY_SEPARATOR . $file); - if ($srcinfo) { - $provides = array_merge($provides, $this->_buildProvidesArray($srcinfo)); - } - } - } - $this->_packageName = $pn = $this->_pf->getPackage(); - $pnl = strlen($pn); - foreach ($provides as $key => $what) { - if (isset($what['explicit']) || !$what) { - // skip conformance checks if the provides entry is - // specified in the package.xml file - continue; - } - extract($what); - if ($type == 'class') { - if (!strncasecmp($name, $pn, $pnl)) { - continue; - } - $this->_stack->push(__FUNCTION__, 'warning', - array('file' => $file, 'type' => $type, 'name' => $name, 'package' => $pn), - 'in %file%: %type% "%name%" not prefixed with package name "%package%"'); - } elseif ($type == 'function') { - if (strstr($name, '::') || !strncasecmp($name, $pn, $pnl)) { - continue; - } - $this->_stack->push(__FUNCTION__, 'warning', - array('file' => $file, 'type' => $type, 'name' => $name, 'package' => $pn), - 'in %file%: %type% "%name%" not prefixed with package name "%package%"'); - } - } - return $this->_isValid; - } - - /** - * Analyze the source code of the given PHP file - * - * @param string Filename of the PHP file - * @param boolean whether to analyze $file as the file contents - * @return mixed - */ - function analyzeSourceCode($file, $string = false) - { - if (!function_exists("token_get_all")) { - $this->_stack->push(__FUNCTION__, 'error', array('file' => $file), - 'Parser error: token_get_all() function must exist to analyze source code, PHP may have been compiled with --disable-tokenizer'); - return false; - } - - if (!defined('T_DOC_COMMENT')) { - define('T_DOC_COMMENT', T_COMMENT); - } - - if (!defined('T_INTERFACE')) { - define('T_INTERFACE', -1); - } - - if (!defined('T_IMPLEMENTS')) { - define('T_IMPLEMENTS', -1); - } - - if ($string) { - $contents = $file; - } else { - if (!$fp = @fopen($file, "r")) { - return false; - } - fclose($fp); - $contents = file_get_contents($file); - } - - // Silence this function so we can catch PHP Warnings and show our own custom message - $tokens = @token_get_all($contents); - if (isset($php_errormsg)) { - if (isset($this->_stack)) { - $pn = $this->_pf->getPackage(); - $this->_stack->push(__FUNCTION__, 'warning', - array('file' => $file, 'package' => $pn), - 'in %file%: Could not process file for unkown reasons,' . - ' possibly a PHP parse error in %file% from %package%'); - } - } -/* - for ($i = 0; $i < sizeof($tokens); $i++) { - @list($token, $data) = $tokens[$i]; - if (is_string($token)) { - var_dump($token); - } else { - print token_name($token) . ' '; - var_dump(rtrim($data)); - } - } -*/ - $look_for = 0; - $paren_level = 0; - $bracket_level = 0; - $brace_level = 0; - $lastphpdoc = ''; - $current_class = ''; - $current_interface = ''; - $current_class_level = -1; - $current_function = ''; - $current_function_level = -1; - $declared_classes = array(); - $declared_interfaces = array(); - $declared_functions = array(); - $declared_methods = array(); - $used_classes = array(); - $used_functions = array(); - $extends = array(); - $implements = array(); - $nodeps = array(); - $inquote = false; - $interface = false; - for ($i = 0; $i < sizeof($tokens); $i++) { - if (is_array($tokens[$i])) { - list($token, $data) = $tokens[$i]; - } else { - $token = $tokens[$i]; - $data = ''; - } - - if ($inquote) { - if ($token != '"' && $token != T_END_HEREDOC) { - continue; - } else { - $inquote = false; - continue; - } - } - - switch ($token) { - case T_WHITESPACE : - continue; - case ';': - if ($interface) { - $current_function = ''; - $current_function_level = -1; - } - break; - case '"': - case T_START_HEREDOC: - $inquote = true; - break; - case T_CURLY_OPEN: - case T_DOLLAR_OPEN_CURLY_BRACES: - case '{': $brace_level++; continue 2; - case '}': - $brace_level--; - if ($current_class_level == $brace_level) { - $current_class = ''; - $current_class_level = -1; - } - if ($current_function_level == $brace_level) { - $current_function = ''; - $current_function_level = -1; - } - continue 2; - case '[': $bracket_level++; continue 2; - case ']': $bracket_level--; continue 2; - case '(': $paren_level++; continue 2; - case ')': $paren_level--; continue 2; - case T_INTERFACE: - $interface = true; - case T_CLASS: - if (($current_class_level != -1) || ($current_function_level != -1)) { - if (isset($this->_stack)) { - $this->_stack->push(__FUNCTION__, 'error', array('file' => $file), - 'Parser error: invalid PHP found in file "%file%"'); - } else { - PEAR::raiseError("Parser error: invalid PHP found in file \"$file\"", - PEAR_COMMON_ERROR_INVALIDPHP); - } - - return false; - } - case T_FUNCTION: - case T_NEW: - case T_EXTENDS: - case T_IMPLEMENTS: - $look_for = $token; - continue 2; - case T_STRING: - if (version_compare(zend_version(), '2.0', '<')) { - if (in_array(strtolower($data), - array('public', 'private', 'protected', 'abstract', - 'interface', 'implements', 'throw') - ) - ) { - if (isset($this->_stack)) { - $this->_stack->push(__FUNCTION__, 'warning', array( - 'file' => $file), - 'Error, PHP5 token encountered in %file%,' . - ' analysis should be in PHP5'); - } else { - PEAR::raiseError('Error: PHP5 token encountered in ' . $file . - 'packaging should be done in PHP 5'); - return false; - } - } - } - - if ($look_for == T_CLASS) { - $current_class = $data; - $current_class_level = $brace_level; - $declared_classes[] = $current_class; - } elseif ($look_for == T_INTERFACE) { - $current_interface = $data; - $current_class_level = $brace_level; - $declared_interfaces[] = $current_interface; - } elseif ($look_for == T_IMPLEMENTS) { - $implements[$current_class] = $data; - } elseif ($look_for == T_EXTENDS) { - $extends[$current_class] = $data; - } elseif ($look_for == T_FUNCTION) { - if ($current_class) { - $current_function = "$current_class::$data"; - $declared_methods[$current_class][] = $data; - } elseif ($current_interface) { - $current_function = "$current_interface::$data"; - $declared_methods[$current_interface][] = $data; - } else { - $current_function = $data; - $declared_functions[] = $current_function; - } - - $current_function_level = $brace_level; - $m = array(); - } elseif ($look_for == T_NEW) { - $used_classes[$data] = true; - } - - $look_for = 0; - continue 2; - case T_VARIABLE: - $look_for = 0; - continue 2; - case T_DOC_COMMENT: - case T_COMMENT: - if (preg_match('!^/\*\*\s!', $data)) { - $lastphpdoc = $data; - if (preg_match_all('/@nodep\s+(\S+)/', $lastphpdoc, $m)) { - $nodeps = array_merge($nodeps, $m[1]); - } - } - continue 2; - case T_DOUBLE_COLON: - $token = $tokens[$i - 1][0]; - if (!($token == T_WHITESPACE || $token == T_STRING || $token == T_STATIC)) { - if (isset($this->_stack)) { - $this->_stack->push(__FUNCTION__, 'warning', array('file' => $file), - 'Parser error: invalid PHP found in file "%file%"'); - } else { - PEAR::raiseError("Parser error: invalid PHP found in file \"$file\"", - PEAR_COMMON_ERROR_INVALIDPHP); - } - - return false; - } - - $class = $tokens[$i - 1][1]; - if (strtolower($class) != 'parent') { - $used_classes[$class] = true; - } - - continue 2; - } - } - - return array( - "source_file" => $file, - "declared_classes" => $declared_classes, - "declared_interfaces" => $declared_interfaces, - "declared_methods" => $declared_methods, - "declared_functions" => $declared_functions, - "used_classes" => array_diff(array_keys($used_classes), $nodeps), - "inheritance" => $extends, - "implements" => $implements, - ); - } - - /** - * Build a "provides" array from data returned by - * analyzeSourceCode(). The format of the built array is like - * this: - * - * array( - * 'class;MyClass' => 'array('type' => 'class', 'name' => 'MyClass'), - * ... - * ) - * - * - * @param array $srcinfo array with information about a source file - * as returned by the analyzeSourceCode() method. - * - * @return void - * - * @access private - * - */ - function _buildProvidesArray($srcinfo) - { - if (!$this->_isValid) { - return array(); - } - - $providesret = array(); - $file = basename($srcinfo['source_file']); - $pn = isset($this->_pf) ? $this->_pf->getPackage() : ''; - $pnl = strlen($pn); - foreach ($srcinfo['declared_classes'] as $class) { - $key = "class;$class"; - if (isset($providesret[$key])) { - continue; - } - - $providesret[$key] = - array('file'=> $file, 'type' => 'class', 'name' => $class); - if (isset($srcinfo['inheritance'][$class])) { - $providesret[$key]['extends'] = - $srcinfo['inheritance'][$class]; - } - } - - foreach ($srcinfo['declared_methods'] as $class => $methods) { - foreach ($methods as $method) { - $function = "$class::$method"; - $key = "function;$function"; - if ($method{0} == '_' || !strcasecmp($method, $class) || - isset($providesret[$key])) { - continue; - } - - $providesret[$key] = - array('file'=> $file, 'type' => 'function', 'name' => $function); - } - } - - foreach ($srcinfo['declared_functions'] as $function) { - $key = "function;$function"; - if ($function{0} == '_' || isset($providesret[$key])) { - continue; - } - - if (!strstr($function, '::') && strncasecmp($function, $pn, $pnl)) { - $warnings[] = "in1 " . $file . ": function \"$function\" not prefixed with package name \"$pn\""; - } - - $providesret[$key] = - array('file'=> $file, 'type' => 'function', 'name' => $function); - } - - return $providesret; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/PackageFile/v2/rw.php b/_piecrust/libs/PEAR/PackageFile/v2/rw.php deleted file mode 100644 index 58f76c5..0000000 --- a/_piecrust/libs/PEAR/PackageFile/v2/rw.php +++ /dev/null @@ -1,1604 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: rw.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a8 - */ -/** - * For base class - */ -require_once 'PEAR/PackageFile/v2.php'; -/** - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a8 - */ -class PEAR_PackageFile_v2_rw extends PEAR_PackageFile_v2 -{ - /** - * @param string Extension name - * @return bool success of operation - */ - function setProvidesExtension($extension) - { - if (in_array($this->getPackageType(), - array('extsrc', 'extbin', 'zendextsrc', 'zendextbin'))) { - if (!isset($this->_packageInfo['providesextension'])) { - // ensure that the channel tag is set up in the right location - $this->_packageInfo = $this->_insertBefore($this->_packageInfo, - array('usesrole', 'usestask', 'srcpackage', 'srcuri', 'phprelease', - 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease', - 'bundle', 'changelog'), - $extension, 'providesextension'); - } - $this->_packageInfo['providesextension'] = $extension; - return true; - } - return false; - } - - function setPackage($package) - { - $this->_isValid = 0; - if (!isset($this->_packageInfo['attribs'])) { - $this->_packageInfo = array_merge(array('attribs' => array( - 'version' => '2.0', - 'xmlns' => 'http://pear.php.net/dtd/package-2.0', - 'xmlns:tasks' => 'http://pear.php.net/dtd/tasks-1.0', - 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', - 'xsi:schemaLocation' => 'http://pear.php.net/dtd/tasks-1.0 - http://pear.php.net/dtd/tasks-1.0.xsd - http://pear.php.net/dtd/package-2.0 - http://pear.php.net/dtd/package-2.0.xsd', - )), $this->_packageInfo); - } - if (!isset($this->_packageInfo['name'])) { - return $this->_packageInfo = array_merge(array('name' => $package), - $this->_packageInfo); - } - $this->_packageInfo['name'] = $package; - } - - /** - * set this as a package.xml version 2.1 - * @access private - */ - function _setPackageVersion2_1() - { - $info = array( - 'version' => '2.1', - 'xmlns' => 'http://pear.php.net/dtd/package-2.1', - 'xmlns:tasks' => 'http://pear.php.net/dtd/tasks-1.0', - 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', - 'xsi:schemaLocation' => 'http://pear.php.net/dtd/tasks-1.0 - http://pear.php.net/dtd/tasks-1.0.xsd - http://pear.php.net/dtd/package-2.1 - http://pear.php.net/dtd/package-2.1.xsd', - ); - if (!isset($this->_packageInfo['attribs'])) { - $this->_packageInfo = array_merge(array('attribs' => $info), $this->_packageInfo); - } else { - $this->_packageInfo['attribs'] = $info; - } - } - - function setUri($uri) - { - unset($this->_packageInfo['channel']); - $this->_isValid = 0; - if (!isset($this->_packageInfo['uri'])) { - // ensure that the uri tag is set up in the right location - $this->_packageInfo = $this->_insertBefore($this->_packageInfo, - array('extends', 'summary', 'description', 'lead', - 'developer', 'contributor', 'helper', 'date', 'time', 'version', - 'stability', 'license', 'notes', 'contents', 'compatible', - 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', - 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', - 'extbinrelease', 'bundle', 'changelog'), $uri, 'uri'); - } - $this->_packageInfo['uri'] = $uri; - } - - function setChannel($channel) - { - unset($this->_packageInfo['uri']); - $this->_isValid = 0; - if (!isset($this->_packageInfo['channel'])) { - // ensure that the channel tag is set up in the right location - $this->_packageInfo = $this->_insertBefore($this->_packageInfo, - array('extends', 'summary', 'description', 'lead', - 'developer', 'contributor', 'helper', 'date', 'time', 'version', - 'stability', 'license', 'notes', 'contents', 'compatible', - 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', - 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', - 'extbinrelease', 'bundle', 'changelog'), $channel, 'channel'); - } - $this->_packageInfo['channel'] = $channel; - } - - function setExtends($extends) - { - $this->_isValid = 0; - if (!isset($this->_packageInfo['extends'])) { - // ensure that the extends tag is set up in the right location - $this->_packageInfo = $this->_insertBefore($this->_packageInfo, - array('summary', 'description', 'lead', - 'developer', 'contributor', 'helper', 'date', 'time', 'version', - 'stability', 'license', 'notes', 'contents', 'compatible', - 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', - 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', - 'extbinrelease', 'bundle', 'changelog'), $extends, 'extends'); - } - $this->_packageInfo['extends'] = $extends; - } - - function setSummary($summary) - { - $this->_isValid = 0; - if (!isset($this->_packageInfo['summary'])) { - // ensure that the summary tag is set up in the right location - $this->_packageInfo = $this->_insertBefore($this->_packageInfo, - array('description', 'lead', - 'developer', 'contributor', 'helper', 'date', 'time', 'version', - 'stability', 'license', 'notes', 'contents', 'compatible', - 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', - 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', - 'extbinrelease', 'bundle', 'changelog'), $summary, 'summary'); - } - $this->_packageInfo['summary'] = $summary; - } - - function setDescription($desc) - { - $this->_isValid = 0; - if (!isset($this->_packageInfo['description'])) { - // ensure that the description tag is set up in the right location - $this->_packageInfo = $this->_insertBefore($this->_packageInfo, - array('lead', - 'developer', 'contributor', 'helper', 'date', 'time', 'version', - 'stability', 'license', 'notes', 'contents', 'compatible', - 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', - 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', - 'extbinrelease', 'bundle', 'changelog'), $desc, 'description'); - } - $this->_packageInfo['description'] = $desc; - } - - /** - * Adds a new maintainer - no checking of duplicates is performed, use - * updatemaintainer for that purpose. - */ - function addMaintainer($role, $handle, $name, $email, $active = 'yes') - { - if (!in_array($role, array('lead', 'developer', 'contributor', 'helper'))) { - return false; - } - if (isset($this->_packageInfo[$role])) { - if (!isset($this->_packageInfo[$role][0])) { - $this->_packageInfo[$role] = array($this->_packageInfo[$role]); - } - $this->_packageInfo[$role][] = - array( - 'name' => $name, - 'user' => $handle, - 'email' => $email, - 'active' => $active, - ); - } else { - $testarr = array('lead', - 'developer', 'contributor', 'helper', 'date', 'time', 'version', - 'stability', 'license', 'notes', 'contents', 'compatible', - 'dependencies', 'providesextension', 'usesrole', 'usestask', - 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', - 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'); - foreach (array('lead', 'developer', 'contributor', 'helper') as $testrole) { - array_shift($testarr); - if ($role == $testrole) { - break; - } - } - if (!isset($this->_packageInfo[$role])) { - // ensure that the extends tag is set up in the right location - $this->_packageInfo = $this->_insertBefore($this->_packageInfo, $testarr, - array(), $role); - } - $this->_packageInfo[$role] = - array( - 'name' => $name, - 'user' => $handle, - 'email' => $email, - 'active' => $active, - ); - } - $this->_isValid = 0; - } - - function updateMaintainer($newrole, $handle, $name, $email, $active = 'yes') - { - $found = false; - foreach (array('lead', 'developer', 'contributor', 'helper') as $role) { - if (!isset($this->_packageInfo[$role])) { - continue; - } - $info = $this->_packageInfo[$role]; - if (!isset($info[0])) { - if ($info['user'] == $handle) { - $found = true; - break; - } - } - foreach ($info as $i => $maintainer) { - if ($maintainer['user'] == $handle) { - $found = $i; - break 2; - } - } - } - if ($found === false) { - return $this->addMaintainer($newrole, $handle, $name, $email, $active); - } - if ($found !== false) { - if ($found === true) { - unset($this->_packageInfo[$role]); - } else { - unset($this->_packageInfo[$role][$found]); - $this->_packageInfo[$role] = array_values($this->_packageInfo[$role]); - } - } - $this->addMaintainer($newrole, $handle, $name, $email, $active); - $this->_isValid = 0; - } - - function deleteMaintainer($handle) - { - $found = false; - foreach (array('lead', 'developer', 'contributor', 'helper') as $role) { - if (!isset($this->_packageInfo[$role])) { - continue; - } - if (!isset($this->_packageInfo[$role][0])) { - $this->_packageInfo[$role] = array($this->_packageInfo[$role]); - } - foreach ($this->_packageInfo[$role] as $i => $maintainer) { - if ($maintainer['user'] == $handle) { - $found = $i; - break; - } - } - if ($found !== false) { - unset($this->_packageInfo[$role][$found]); - if (!count($this->_packageInfo[$role]) && $role == 'lead') { - $this->_isValid = 0; - } - if (!count($this->_packageInfo[$role])) { - unset($this->_packageInfo[$role]); - return true; - } - $this->_packageInfo[$role] = - array_values($this->_packageInfo[$role]); - if (count($this->_packageInfo[$role]) == 1) { - $this->_packageInfo[$role] = $this->_packageInfo[$role][0]; - } - return true; - } - if (count($this->_packageInfo[$role]) == 1) { - $this->_packageInfo[$role] = $this->_packageInfo[$role][0]; - } - } - return false; - } - - function setReleaseVersion($version) - { - if (isset($this->_packageInfo['version']) && - isset($this->_packageInfo['version']['release'])) { - unset($this->_packageInfo['version']['release']); - } - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $version, array( - 'version' => array('stability', 'license', 'notes', 'contents', 'compatible', - 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', - 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', - 'extbinrelease', 'bundle', 'changelog'), - 'release' => array('api'))); - $this->_isValid = 0; - } - - function setAPIVersion($version) - { - if (isset($this->_packageInfo['version']) && - isset($this->_packageInfo['version']['api'])) { - unset($this->_packageInfo['version']['api']); - } - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $version, array( - 'version' => array('stability', 'license', 'notes', 'contents', 'compatible', - 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', - 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', - 'extbinrelease', 'bundle', 'changelog'), - 'api' => array())); - $this->_isValid = 0; - } - - /** - * snapshot|devel|alpha|beta|stable - */ - function setReleaseStability($state) - { - if (isset($this->_packageInfo['stability']) && - isset($this->_packageInfo['stability']['release'])) { - unset($this->_packageInfo['stability']['release']); - } - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $state, array( - 'stability' => array('license', 'notes', 'contents', 'compatible', - 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', - 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', - 'extbinrelease', 'bundle', 'changelog'), - 'release' => array('api'))); - $this->_isValid = 0; - } - - /** - * @param devel|alpha|beta|stable - */ - function setAPIStability($state) - { - if (isset($this->_packageInfo['stability']) && - isset($this->_packageInfo['stability']['api'])) { - unset($this->_packageInfo['stability']['api']); - } - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $state, array( - 'stability' => array('license', 'notes', 'contents', 'compatible', - 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', - 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', - 'extbinrelease', 'bundle', 'changelog'), - 'api' => array())); - $this->_isValid = 0; - } - - function setLicense($license, $uri = false, $filesource = false) - { - if (!isset($this->_packageInfo['license'])) { - // ensure that the license tag is set up in the right location - $this->_packageInfo = $this->_insertBefore($this->_packageInfo, - array('notes', 'contents', 'compatible', - 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', - 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', - 'extbinrelease', 'bundle', 'changelog'), 0, 'license'); - } - if ($uri || $filesource) { - $attribs = array(); - if ($uri) { - $attribs['uri'] = $uri; - } - $uri = true; // for test below - if ($filesource) { - $attribs['filesource'] = $filesource; - } - } - $license = $uri ? array('attribs' => $attribs, '_content' => $license) : $license; - $this->_packageInfo['license'] = $license; - $this->_isValid = 0; - } - - function setNotes($notes) - { - $this->_isValid = 0; - if (!isset($this->_packageInfo['notes'])) { - // ensure that the notes tag is set up in the right location - $this->_packageInfo = $this->_insertBefore($this->_packageInfo, - array('contents', 'compatible', - 'dependencies', 'providesextension', 'usesrole', 'usestask', 'srcpackage', 'srcuri', - 'phprelease', 'extsrcrelease', 'zendextsrcrelease', 'zendextbinrelease', - 'extbinrelease', 'bundle', 'changelog'), $notes, 'notes'); - } - $this->_packageInfo['notes'] = $notes; - } - - /** - * This is only used at install-time, after all serialization - * is over. - * @param string file name - * @param string installed path - */ - function setInstalledAs($file, $path) - { - if ($path) { - return $this->_packageInfo['filelist'][$file]['installed_as'] = $path; - } - unset($this->_packageInfo['filelist'][$file]['installed_as']); - } - - /** - * This is only used at install-time, after all serialization - * is over. - */ - function installedFile($file, $atts) - { - if (isset($this->_packageInfo['filelist'][$file])) { - $this->_packageInfo['filelist'][$file] = - array_merge($this->_packageInfo['filelist'][$file], $atts['attribs']); - } else { - $this->_packageInfo['filelist'][$file] = $atts['attribs']; - } - } - - /** - * Reset the listing of package contents - * @param string base installation dir for the whole package, if any - */ - function clearContents($baseinstall = false) - { - $this->_filesValid = false; - $this->_isValid = 0; - if (!isset($this->_packageInfo['contents'])) { - $this->_packageInfo = $this->_insertBefore($this->_packageInfo, - array('compatible', - 'dependencies', 'providesextension', 'usesrole', 'usestask', - 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', - 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease', - 'bundle', 'changelog'), array(), 'contents'); - } - if ($this->getPackageType() != 'bundle') { - $this->_packageInfo['contents'] = - array('dir' => array('attribs' => array('name' => '/'))); - if ($baseinstall) { - $this->_packageInfo['contents']['dir']['attribs']['baseinstalldir'] = $baseinstall; - } - } else { - $this->_packageInfo['contents'] = array('bundledpackage' => array()); - } - } - - /** - * @param string relative path of the bundled package. - */ - function addBundledPackage($path) - { - if ($this->getPackageType() != 'bundle') { - return false; - } - $this->_filesValid = false; - $this->_isValid = 0; - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $path, array( - 'contents' => array('compatible', 'dependencies', 'providesextension', - 'usesrole', 'usestask', 'srcpackage', 'srcuri', 'phprelease', - 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease', - 'bundle', 'changelog'), - 'bundledpackage' => array())); - } - - /** - * @param string file name - * @param PEAR_Task_Common a read/write task - */ - function addTaskToFile($filename, $task) - { - if (!method_exists($task, 'getXml')) { - return false; - } - if (!method_exists($task, 'getName')) { - return false; - } - if (!method_exists($task, 'validate')) { - return false; - } - if (!$task->validate()) { - return false; - } - if (!isset($this->_packageInfo['contents']['dir']['file'])) { - return false; - } - $this->getTasksNs(); // discover the tasks namespace if not done already - $files = $this->_packageInfo['contents']['dir']['file']; - if (!isset($files[0])) { - $files = array($files); - $ind = false; - } else { - $ind = true; - } - foreach ($files as $i => $file) { - if (isset($file['attribs'])) { - if ($file['attribs']['name'] == $filename) { - if ($ind) { - $t = isset($this->_packageInfo['contents']['dir']['file'][$i] - ['attribs'][$this->_tasksNs . - ':' . $task->getName()]) ? - $this->_packageInfo['contents']['dir']['file'][$i] - ['attribs'][$this->_tasksNs . - ':' . $task->getName()] : false; - if ($t && !isset($t[0])) { - $this->_packageInfo['contents']['dir']['file'][$i] - [$this->_tasksNs . ':' . $task->getName()] = array($t); - } - $this->_packageInfo['contents']['dir']['file'][$i][$this->_tasksNs . - ':' . $task->getName()][] = $task->getXml(); - } else { - $t = isset($this->_packageInfo['contents']['dir']['file'] - ['attribs'][$this->_tasksNs . - ':' . $task->getName()]) ? $this->_packageInfo['contents']['dir']['file'] - ['attribs'][$this->_tasksNs . - ':' . $task->getName()] : false; - if ($t && !isset($t[0])) { - $this->_packageInfo['contents']['dir']['file'] - [$this->_tasksNs . ':' . $task->getName()] = array($t); - } - $this->_packageInfo['contents']['dir']['file'][$this->_tasksNs . - ':' . $task->getName()][] = $task->getXml(); - } - return true; - } - } - } - return false; - } - - /** - * @param string path to the file - * @param string filename - * @param array extra attributes - */ - function addFile($dir, $file, $attrs) - { - if ($this->getPackageType() == 'bundle') { - return false; - } - $this->_filesValid = false; - $this->_isValid = 0; - $dir = preg_replace(array('!\\\\+!', '!/+!'), array('/', '/'), $dir); - if ($dir == '/' || $dir == '') { - $dir = ''; - } else { - $dir .= '/'; - } - $attrs['name'] = $dir . $file; - if (!isset($this->_packageInfo['contents'])) { - // ensure that the contents tag is set up - $this->_packageInfo = $this->_insertBefore($this->_packageInfo, - array('compatible', 'dependencies', 'providesextension', 'usesrole', 'usestask', - 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', - 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease', - 'bundle', 'changelog'), array(), 'contents'); - } - if (isset($this->_packageInfo['contents']['dir']['file'])) { - if (!isset($this->_packageInfo['contents']['dir']['file'][0])) { - $this->_packageInfo['contents']['dir']['file'] = - array($this->_packageInfo['contents']['dir']['file']); - } - $this->_packageInfo['contents']['dir']['file'][]['attribs'] = $attrs; - } else { - $this->_packageInfo['contents']['dir']['file']['attribs'] = $attrs; - } - } - - /** - * @param string Dependent package name - * @param string Dependent package's channel name - * @param string minimum version of specified package that this release is guaranteed to be - * compatible with - * @param string maximum version of specified package that this release is guaranteed to be - * compatible with - * @param string versions of specified package that this release is not compatible with - */ - function addCompatiblePackage($name, $channel, $min, $max, $exclude = false) - { - $this->_isValid = 0; - $set = array( - 'name' => $name, - 'channel' => $channel, - 'min' => $min, - 'max' => $max, - ); - if ($exclude) { - $set['exclude'] = $exclude; - } - $this->_isValid = 0; - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $set, array( - 'compatible' => array('dependencies', 'providesextension', 'usesrole', 'usestask', - 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', - 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog') - )); - } - - /** - * Removes the tag entirely - */ - function resetUsesrole() - { - if (isset($this->_packageInfo['usesrole'])) { - unset($this->_packageInfo['usesrole']); - } - } - - /** - * @param string - * @param string package name or uri - * @param string channel name if non-uri - */ - function addUsesrole($role, $packageOrUri, $channel = false) { - $set = array('role' => $role); - if ($channel) { - $set['package'] = $packageOrUri; - $set['channel'] = $channel; - } else { - $set['uri'] = $packageOrUri; - } - $this->_isValid = 0; - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $set, array( - 'usesrole' => array('usestask', 'srcpackage', 'srcuri', - 'phprelease', 'extsrcrelease', 'extbinrelease', - 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog') - )); - } - - /** - * Removes the tag entirely - */ - function resetUsestask() - { - if (isset($this->_packageInfo['usestask'])) { - unset($this->_packageInfo['usestask']); - } - } - - - /** - * @param string - * @param string package name or uri - * @param string channel name if non-uri - */ - function addUsestask($task, $packageOrUri, $channel = false) { - $set = array('task' => $task); - if ($channel) { - $set['package'] = $packageOrUri; - $set['channel'] = $channel; - } else { - $set['uri'] = $packageOrUri; - } - $this->_isValid = 0; - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $set, array( - 'usestask' => array('srcpackage', 'srcuri', - 'phprelease', 'extsrcrelease', 'extbinrelease', - 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog') - )); - } - - /** - * Remove all compatible tags - */ - function clearCompatible() - { - unset($this->_packageInfo['compatible']); - } - - /** - * Reset dependencies prior to adding new ones - */ - function clearDeps() - { - if (!isset($this->_packageInfo['dependencies'])) { - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, array(), - array( - 'dependencies' => array('providesextension', 'usesrole', 'usestask', - 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', - 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'))); - } - $this->_packageInfo['dependencies'] = array(); - } - - /** - * @param string minimum PHP version allowed - * @param string maximum PHP version allowed - * @param array $exclude incompatible PHP versions - */ - function setPhpDep($min, $max = false, $exclude = false) - { - $this->_isValid = 0; - $dep = - array( - 'min' => $min, - ); - if ($max) { - $dep['max'] = $max; - } - if ($exclude) { - if (count($exclude) == 1) { - $exclude = $exclude[0]; - } - $dep['exclude'] = $exclude; - } - if (isset($this->_packageInfo['dependencies']['required']['php'])) { - $this->_stack->push(__FUNCTION__, 'warning', array('dep' => - $this->_packageInfo['dependencies']['required']['php']), - 'warning: PHP dependency already exists, overwriting'); - unset($this->_packageInfo['dependencies']['required']['php']); - } - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, - array( - 'dependencies' => array('providesextension', 'usesrole', 'usestask', - 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', - 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), - 'required' => array('optional', 'group'), - 'php' => array('pearinstaller', 'package', 'subpackage', 'extension', 'os', 'arch') - )); - return true; - } - - /** - * @param string minimum allowed PEAR installer version - * @param string maximum allowed PEAR installer version - * @param string recommended PEAR installer version - * @param array incompatible version of the PEAR installer - */ - function setPearinstallerDep($min, $max = false, $recommended = false, $exclude = false) - { - $this->_isValid = 0; - $dep = - array( - 'min' => $min, - ); - if ($max) { - $dep['max'] = $max; - } - if ($recommended) { - $dep['recommended'] = $recommended; - } - if ($exclude) { - if (count($exclude) == 1) { - $exclude = $exclude[0]; - } - $dep['exclude'] = $exclude; - } - if (isset($this->_packageInfo['dependencies']['required']['pearinstaller'])) { - $this->_stack->push(__FUNCTION__, 'warning', array('dep' => - $this->_packageInfo['dependencies']['required']['pearinstaller']), - 'warning: PEAR Installer dependency already exists, overwriting'); - unset($this->_packageInfo['dependencies']['required']['pearinstaller']); - } - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, - array( - 'dependencies' => array('providesextension', 'usesrole', 'usestask', - 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', - 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), - 'required' => array('optional', 'group'), - 'pearinstaller' => array('package', 'subpackage', 'extension', 'os', 'arch') - )); - } - - /** - * Mark a package as conflicting with this package - * @param string package name - * @param string package channel - * @param string extension this package provides, if any - * @param string|false minimum version required - * @param string|false maximum version allowed - * @param array|false versions to exclude from installation - */ - function addConflictingPackageDepWithChannel($name, $channel, - $providesextension = false, $min = false, $max = false, $exclude = false) - { - $this->_isValid = 0; - $dep = $this->_constructDep($name, $channel, false, $min, $max, false, - $exclude, $providesextension, false, true); - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, - array( - 'dependencies' => array('providesextension', 'usesrole', 'usestask', - 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', - 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), - 'required' => array('optional', 'group'), - 'package' => array('subpackage', 'extension', 'os', 'arch') - )); - } - - /** - * Mark a package as conflicting with this package - * @param string package name - * @param string package channel - * @param string extension this package provides, if any - */ - function addConflictingPackageDepWithUri($name, $uri, $providesextension = false) - { - $this->_isValid = 0; - $dep = - array( - 'name' => $name, - 'uri' => $uri, - 'conflicts' => '', - ); - if ($providesextension) { - $dep['providesextension'] = $providesextension; - } - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, - array( - 'dependencies' => array('providesextension', 'usesrole', 'usestask', - 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', - 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), - 'required' => array('optional', 'group'), - 'package' => array('subpackage', 'extension', 'os', 'arch') - )); - } - - function addDependencyGroup($name, $hint) - { - $this->_isValid = 0; - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, - array('attribs' => array('name' => $name, 'hint' => $hint)), - array( - 'dependencies' => array('providesextension', 'usesrole', 'usestask', - 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', - 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), - 'group' => array(), - )); - } - - /** - * @param string package name - * @param string|false channel name, false if this is a uri - * @param string|false uri name, false if this is a channel - * @param string|false minimum version required - * @param string|false maximum version allowed - * @param string|false recommended installation version - * @param array|false versions to exclude from installation - * @param string extension this package provides, if any - * @param bool if true, tells the installer to ignore the default optional dependency group - * when installing this package - * @param bool if true, tells the installer to negate this dependency (conflicts) - * @return array - * @access private - */ - function _constructDep($name, $channel, $uri, $min, $max, $recommended, $exclude, - $providesextension = false, $nodefault = false, - $conflicts = false) - { - $dep = - array( - 'name' => $name, - ); - if ($channel) { - $dep['channel'] = $channel; - } elseif ($uri) { - $dep['uri'] = $uri; - } - if ($min) { - $dep['min'] = $min; - } - if ($max) { - $dep['max'] = $max; - } - if ($recommended) { - $dep['recommended'] = $recommended; - } - if ($exclude) { - if (is_array($exclude) && count($exclude) == 1) { - $exclude = $exclude[0]; - } - $dep['exclude'] = $exclude; - } - if ($conflicts) { - $dep['conflicts'] = ''; - } - if ($nodefault) { - $dep['nodefault'] = ''; - } - if ($providesextension) { - $dep['providesextension'] = $providesextension; - } - return $dep; - } - - /** - * @param package|subpackage - * @param string group name - * @param string package name - * @param string package channel - * @param string minimum version - * @param string maximum version - * @param string recommended version - * @param array|false optional excluded versions - * @param string extension this package provides, if any - * @param bool if true, tells the installer to ignore the default optional dependency group - * when installing this package - * @return bool false if the dependency group has not been initialized with - * {@link addDependencyGroup()}, or a subpackage is added with - * a providesextension - */ - function addGroupPackageDepWithChannel($type, $groupname, $name, $channel, $min = false, - $max = false, $recommended = false, $exclude = false, - $providesextension = false, $nodefault = false) - { - if ($type == 'subpackage' && $providesextension) { - return false; // subpackages must be php packages - } - $dep = $this->_constructDep($name, $channel, false, $min, $max, $recommended, $exclude, - $providesextension, $nodefault); - return $this->_addGroupDependency($type, $dep, $groupname); - } - - /** - * @param package|subpackage - * @param string group name - * @param string package name - * @param string package uri - * @param string extension this package provides, if any - * @param bool if true, tells the installer to ignore the default optional dependency group - * when installing this package - * @return bool false if the dependency group has not been initialized with - * {@link addDependencyGroup()} - */ - function addGroupPackageDepWithURI($type, $groupname, $name, $uri, $providesextension = false, - $nodefault = false) - { - if ($type == 'subpackage' && $providesextension) { - return false; // subpackages must be php packages - } - $dep = $this->_constructDep($name, false, $uri, false, false, false, false, - $providesextension, $nodefault); - return $this->_addGroupDependency($type, $dep, $groupname); - } - - /** - * @param string group name (must be pre-existing) - * @param string extension name - * @param string minimum version allowed - * @param string maximum version allowed - * @param string recommended version - * @param array incompatible versions - */ - function addGroupExtensionDep($groupname, $name, $min = false, $max = false, - $recommended = false, $exclude = false) - { - $this->_isValid = 0; - $dep = $this->_constructDep($name, false, false, $min, $max, $recommended, $exclude); - return $this->_addGroupDependency('extension', $dep, $groupname); - } - - /** - * @param package|subpackage|extension - * @param array dependency contents - * @param string name of the dependency group to add this to - * @return boolean - * @access private - */ - function _addGroupDependency($type, $dep, $groupname) - { - $arr = array('subpackage', 'extension'); - if ($type != 'package') { - array_shift($arr); - } - if ($type == 'extension') { - array_shift($arr); - } - if (!isset($this->_packageInfo['dependencies']['group'])) { - return false; - } else { - if (!isset($this->_packageInfo['dependencies']['group'][0])) { - if ($this->_packageInfo['dependencies']['group']['attribs']['name'] == $groupname) { - $this->_packageInfo['dependencies']['group'] = $this->_mergeTag( - $this->_packageInfo['dependencies']['group'], $dep, - array( - $type => $arr - )); - $this->_isValid = 0; - return true; - } else { - return false; - } - } else { - foreach ($this->_packageInfo['dependencies']['group'] as $i => $group) { - if ($group['attribs']['name'] == $groupname) { - $this->_packageInfo['dependencies']['group'][$i] = $this->_mergeTag( - $this->_packageInfo['dependencies']['group'][$i], $dep, - array( - $type => $arr - )); - $this->_isValid = 0; - return true; - } - } - return false; - } - } - } - - /** - * @param optional|required - * @param string package name - * @param string package channel - * @param string minimum version - * @param string maximum version - * @param string recommended version - * @param string extension this package provides, if any - * @param bool if true, tells the installer to ignore the default optional dependency group - * when installing this package - * @param array|false optional excluded versions - */ - function addPackageDepWithChannel($type, $name, $channel, $min = false, $max = false, - $recommended = false, $exclude = false, - $providesextension = false, $nodefault = false) - { - if (!in_array($type, array('optional', 'required'), true)) { - $type = 'required'; - } - $this->_isValid = 0; - $arr = array('optional', 'group'); - if ($type != 'required') { - array_shift($arr); - } - $dep = $this->_constructDep($name, $channel, false, $min, $max, $recommended, $exclude, - $providesextension, $nodefault); - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, - array( - 'dependencies' => array('providesextension', 'usesrole', 'usestask', - 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', - 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), - $type => $arr, - 'package' => array('subpackage', 'extension', 'os', 'arch') - )); - } - - /** - * @param optional|required - * @param string name of the package - * @param string uri of the package - * @param string extension this package provides, if any - * @param bool if true, tells the installer to ignore the default optional dependency group - * when installing this package - */ - function addPackageDepWithUri($type, $name, $uri, $providesextension = false, - $nodefault = false) - { - $this->_isValid = 0; - $arr = array('optional', 'group'); - if ($type != 'required') { - array_shift($arr); - } - $dep = $this->_constructDep($name, false, $uri, false, false, false, false, - $providesextension, $nodefault); - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, - array( - 'dependencies' => array('providesextension', 'usesrole', 'usestask', - 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', - 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), - $type => $arr, - 'package' => array('subpackage', 'extension', 'os', 'arch') - )); - } - - /** - * @param optional|required optional, required - * @param string package name - * @param string package channel - * @param string minimum version - * @param string maximum version - * @param string recommended version - * @param array incompatible versions - * @param bool if true, tells the installer to ignore the default optional dependency group - * when installing this package - */ - function addSubpackageDepWithChannel($type, $name, $channel, $min = false, $max = false, - $recommended = false, $exclude = false, - $nodefault = false) - { - $this->_isValid = 0; - $arr = array('optional', 'group'); - if ($type != 'required') { - array_shift($arr); - } - $dep = $this->_constructDep($name, $channel, false, $min, $max, $recommended, $exclude, - $nodefault); - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, - array( - 'dependencies' => array('providesextension', 'usesrole', 'usestask', - 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', - 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), - $type => $arr, - 'subpackage' => array('extension', 'os', 'arch') - )); - } - - /** - * @param optional|required optional, required - * @param string package name - * @param string package uri for download - * @param bool if true, tells the installer to ignore the default optional dependency group - * when installing this package - */ - function addSubpackageDepWithUri($type, $name, $uri, $nodefault = false) - { - $this->_isValid = 0; - $arr = array('optional', 'group'); - if ($type != 'required') { - array_shift($arr); - } - $dep = $this->_constructDep($name, false, $uri, false, false, false, false, $nodefault); - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, - array( - 'dependencies' => array('providesextension', 'usesrole', 'usestask', - 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', - 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), - $type => $arr, - 'subpackage' => array('extension', 'os', 'arch') - )); - } - - /** - * @param optional|required optional, required - * @param string extension name - * @param string minimum version - * @param string maximum version - * @param string recommended version - * @param array incompatible versions - */ - function addExtensionDep($type, $name, $min = false, $max = false, $recommended = false, - $exclude = false) - { - $this->_isValid = 0; - $arr = array('optional', 'group'); - if ($type != 'required') { - array_shift($arr); - } - $dep = $this->_constructDep($name, false, false, $min, $max, $recommended, $exclude); - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, - array( - 'dependencies' => array('providesextension', 'usesrole', 'usestask', - 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', - 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), - $type => $arr, - 'extension' => array('os', 'arch') - )); - } - - /** - * @param string Operating system name - * @param boolean true if this package cannot be installed on this OS - */ - function addOsDep($name, $conflicts = false) - { - $this->_isValid = 0; - $dep = array('name' => $name); - if ($conflicts) { - $dep['conflicts'] = ''; - } - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, - array( - 'dependencies' => array('providesextension', 'usesrole', 'usestask', - 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', - 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), - 'required' => array('optional', 'group'), - 'os' => array('arch') - )); - } - - /** - * @param string Architecture matching pattern - * @param boolean true if this package cannot be installed on this architecture - */ - function addArchDep($pattern, $conflicts = false) - { - $this->_isValid = 0; - $dep = array('pattern' => $pattern); - if ($conflicts) { - $dep['conflicts'] = ''; - } - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, $dep, - array( - 'dependencies' => array('providesextension', 'usesrole', 'usestask', - 'srcpackage', 'srcuri', 'phprelease', 'extsrcrelease', 'extbinrelease', - 'zendextsrcrelease', 'zendextbinrelease', 'bundle', 'changelog'), - 'required' => array('optional', 'group'), - 'arch' => array() - )); - } - - /** - * Set the kind of package, and erase all release tags - * - * - a php package is a PEAR-style package - * - an extbin package is a PECL-style extension binary - * - an extsrc package is a PECL-style source for a binary - * - an zendextbin package is a PECL-style zend extension binary - * - an zendextsrc package is a PECL-style source for a zend extension binary - * - a bundle package is a collection of other pre-packaged packages - * @param php|extbin|extsrc|zendextsrc|zendextbin|bundle - * @return bool success - */ - function setPackageType($type) - { - $this->_isValid = 0; - if (!in_array($type, array('php', 'extbin', 'extsrc', 'zendextsrc', - 'zendextbin', 'bundle'))) { - return false; - } - - if (in_array($type, array('zendextsrc', 'zendextbin'))) { - $this->_setPackageVersion2_1(); - } - - if ($type != 'bundle') { - $type .= 'release'; - } - - foreach (array('phprelease', 'extbinrelease', 'extsrcrelease', - 'zendextsrcrelease', 'zendextbinrelease', 'bundle') as $test) { - unset($this->_packageInfo[$test]); - } - - if (!isset($this->_packageInfo[$type])) { - // ensure that the release tag is set up - $this->_packageInfo = $this->_insertBefore($this->_packageInfo, array('changelog'), - array(), $type); - } - - $this->_packageInfo[$type] = array(); - return true; - } - - /** - * @return bool true if package type is set up - */ - function addRelease() - { - if ($type = $this->getPackageType()) { - if ($type != 'bundle') { - $type .= 'release'; - } - $this->_packageInfo = $this->_mergeTag($this->_packageInfo, array(), - array($type => array('changelog'))); - return true; - } - return false; - } - - /** - * Get the current release tag in order to add to it - * @param bool returns only releases that have installcondition if true - * @return array|null - */ - function &_getCurrentRelease($strict = true) - { - if ($p = $this->getPackageType()) { - if ($strict) { - if ($p == 'extsrc' || $p == 'zendextsrc') { - $a = null; - return $a; - } - } - if ($p != 'bundle') { - $p .= 'release'; - } - if (isset($this->_packageInfo[$p][0])) { - return $this->_packageInfo[$p][count($this->_packageInfo[$p]) - 1]; - } else { - return $this->_packageInfo[$p]; - } - } else { - $a = null; - return $a; - } - } - - /** - * Add a file to the current release that should be installed under a different name - * @param string path to file - * @param string name the file should be installed as - */ - function addInstallAs($path, $as) - { - $r = &$this->_getCurrentRelease(); - if ($r === null) { - return false; - } - $this->_isValid = 0; - $r = $this->_mergeTag($r, array('attribs' => array('name' => $path, 'as' => $as)), - array( - 'filelist' => array(), - 'install' => array('ignore') - )); - } - - /** - * Add a file to the current release that should be ignored - * @param string path to file - * @return bool success of operation - */ - function addIgnore($path) - { - $r = &$this->_getCurrentRelease(); - if ($r === null) { - return false; - } - $this->_isValid = 0; - $r = $this->_mergeTag($r, array('attribs' => array('name' => $path)), - array( - 'filelist' => array(), - 'ignore' => array() - )); - } - - /** - * Add an extension binary package for this extension source code release - * - * Note that the package must be from the same channel as the extension source package - * @param string - */ - function addBinarypackage($package) - { - if ($this->getPackageType() != 'extsrc' && $this->getPackageType() != 'zendextsrc') { - return false; - } - $r = &$this->_getCurrentRelease(false); - if ($r === null) { - return false; - } - $this->_isValid = 0; - $r = $this->_mergeTag($r, $package, - array( - 'binarypackage' => array('filelist'), - )); - } - - /** - * Add a configureoption to an extension source package - * @param string - * @param string - * @param string - */ - function addConfigureOption($name, $prompt, $default = null) - { - if ($this->getPackageType() != 'extsrc' && $this->getPackageType() != 'zendextsrc') { - return false; - } - - $r = &$this->_getCurrentRelease(false); - if ($r === null) { - return false; - } - - $opt = array('attribs' => array('name' => $name, 'prompt' => $prompt)); - if ($default !== null) { - $opt['attribs']['default'] = $default; - } - - $this->_isValid = 0; - $r = $this->_mergeTag($r, $opt, - array( - 'configureoption' => array('binarypackage', 'filelist'), - )); - } - - /** - * Set an installation condition based on php version for the current release set - * @param string minimum version - * @param string maximum version - * @param false|array incompatible versions of PHP - */ - function setPhpInstallCondition($min, $max, $exclude = false) - { - $r = &$this->_getCurrentRelease(); - if ($r === null) { - return false; - } - $this->_isValid = 0; - if (isset($r['installconditions']['php'])) { - unset($r['installconditions']['php']); - } - $dep = array('min' => $min, 'max' => $max); - if ($exclude) { - if (is_array($exclude) && count($exclude) == 1) { - $exclude = $exclude[0]; - } - $dep['exclude'] = $exclude; - } - if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') { - $r = $this->_mergeTag($r, $dep, - array( - 'installconditions' => array('configureoption', 'binarypackage', - 'filelist'), - 'php' => array('extension', 'os', 'arch') - )); - } else { - $r = $this->_mergeTag($r, $dep, - array( - 'installconditions' => array('filelist'), - 'php' => array('extension', 'os', 'arch') - )); - } - } - - /** - * @param optional|required optional, required - * @param string extension name - * @param string minimum version - * @param string maximum version - * @param string recommended version - * @param array incompatible versions - */ - function addExtensionInstallCondition($name, $min = false, $max = false, $recommended = false, - $exclude = false) - { - $r = &$this->_getCurrentRelease(); - if ($r === null) { - return false; - } - $this->_isValid = 0; - $dep = $this->_constructDep($name, false, false, $min, $max, $recommended, $exclude); - if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') { - $r = $this->_mergeTag($r, $dep, - array( - 'installconditions' => array('configureoption', 'binarypackage', - 'filelist'), - 'extension' => array('os', 'arch') - )); - } else { - $r = $this->_mergeTag($r, $dep, - array( - 'installconditions' => array('filelist'), - 'extension' => array('os', 'arch') - )); - } - } - - /** - * Set an installation condition based on operating system for the current release set - * @param string OS name - * @param bool whether this OS is incompatible with the current release - */ - function setOsInstallCondition($name, $conflicts = false) - { - $r = &$this->_getCurrentRelease(); - if ($r === null) { - return false; - } - $this->_isValid = 0; - if (isset($r['installconditions']['os'])) { - unset($r['installconditions']['os']); - } - $dep = array('name' => $name); - if ($conflicts) { - $dep['conflicts'] = ''; - } - if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') { - $r = $this->_mergeTag($r, $dep, - array( - 'installconditions' => array('configureoption', 'binarypackage', - 'filelist'), - 'os' => array('arch') - )); - } else { - $r = $this->_mergeTag($r, $dep, - array( - 'installconditions' => array('filelist'), - 'os' => array('arch') - )); - } - } - - /** - * Set an installation condition based on architecture for the current release set - * @param string architecture pattern - * @param bool whether this arch is incompatible with the current release - */ - function setArchInstallCondition($pattern, $conflicts = false) - { - $r = &$this->_getCurrentRelease(); - if ($r === null) { - return false; - } - $this->_isValid = 0; - if (isset($r['installconditions']['arch'])) { - unset($r['installconditions']['arch']); - } - $dep = array('pattern' => $pattern); - if ($conflicts) { - $dep['conflicts'] = ''; - } - if ($this->getPackageType() == 'extsrc' || $this->getPackageType() == 'zendextsrc') { - $r = $this->_mergeTag($r, $dep, - array( - 'installconditions' => array('configureoption', 'binarypackage', - 'filelist'), - 'arch' => array() - )); - } else { - $r = $this->_mergeTag($r, $dep, - array( - 'installconditions' => array('filelist'), - 'arch' => array() - )); - } - } - - /** - * For extension binary releases, this is used to specify either the - * static URI to a source package, or the package name and channel of the extsrc/zendextsrc - * package it is based on. - * @param string Package name, or full URI to source package (extsrc/zendextsrc type) - */ - function setSourcePackage($packageOrUri) - { - $this->_isValid = 0; - if (isset($this->_packageInfo['channel'])) { - $this->_packageInfo = $this->_insertBefore($this->_packageInfo, array('phprelease', - 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease', - 'bundle', 'changelog'), - $packageOrUri, 'srcpackage'); - } else { - $this->_packageInfo = $this->_insertBefore($this->_packageInfo, array('phprelease', - 'extsrcrelease', 'extbinrelease', 'zendextsrcrelease', 'zendextbinrelease', - 'bundle', 'changelog'), $packageOrUri, 'srcuri'); - } - } - - /** - * Generate a valid change log entry from the current package.xml - * @param string|false - */ - function generateChangeLogEntry($notes = false) - { - return array( - 'version' => - array( - 'release' => $this->getVersion('release'), - 'api' => $this->getVersion('api'), - ), - 'stability' => - $this->getStability(), - 'date' => $this->getDate(), - 'license' => $this->getLicense(true), - 'notes' => $notes ? $notes : $this->getNotes() - ); - } - - /** - * @param string release version to set change log notes for - * @param array output of {@link generateChangeLogEntry()} - */ - function setChangelogEntry($releaseversion, $contents) - { - if (!isset($this->_packageInfo['changelog'])) { - $this->_packageInfo['changelog']['release'] = $contents; - return; - } - if (!isset($this->_packageInfo['changelog']['release'][0])) { - if ($this->_packageInfo['changelog']['release']['version']['release'] == $releaseversion) { - $this->_packageInfo['changelog']['release'] = array( - $this->_packageInfo['changelog']['release']); - } else { - $this->_packageInfo['changelog']['release'] = array( - $this->_packageInfo['changelog']['release']); - return $this->_packageInfo['changelog']['release'][] = $contents; - } - } - foreach($this->_packageInfo['changelog']['release'] as $index => $changelog) { - if (isset($changelog['version']) && - strnatcasecmp($changelog['version']['release'], $releaseversion) == 0) { - $curlog = $index; - } - } - if (isset($curlog)) { - $this->_packageInfo['changelog']['release'][$curlog] = $contents; - } else { - $this->_packageInfo['changelog']['release'][] = $contents; - } - } - - /** - * Remove the changelog entirely - */ - function clearChangeLog() - { - unset($this->_packageInfo['changelog']); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Packager.php b/_piecrust/libs/PEAR/Packager.php deleted file mode 100644 index 8995a16..0000000 --- a/_piecrust/libs/PEAR/Packager.php +++ /dev/null @@ -1,201 +0,0 @@ - - * @author Tomas V. V. Cox - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Packager.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/** - * base class - */ -require_once 'PEAR/Common.php'; -require_once 'PEAR/PackageFile.php'; -require_once 'System.php'; - -/** - * Administration class used to make a PEAR release tarball. - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 0.1 - */ -class PEAR_Packager extends PEAR_Common -{ - /** - * @var PEAR_Registry - */ - var $_registry; - - function package($pkgfile = null, $compress = true, $pkg2 = null) - { - // {{{ validate supplied package.xml file - if (empty($pkgfile)) { - $pkgfile = 'package.xml'; - } - - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $pkg = &new PEAR_PackageFile($this->config, $this->debug); - $pf = &$pkg->fromPackageFile($pkgfile, PEAR_VALIDATE_NORMAL); - $main = &$pf; - PEAR::staticPopErrorHandling(); - if (PEAR::isError($pf)) { - if (is_array($pf->getUserInfo())) { - foreach ($pf->getUserInfo() as $error) { - $this->log(0, 'Error: ' . $error['message']); - } - } - - $this->log(0, $pf->getMessage()); - return $this->raiseError("Cannot package, errors in package file"); - } - - foreach ($pf->getValidationWarnings() as $warning) { - $this->log(1, 'Warning: ' . $warning['message']); - } - - // }}} - if ($pkg2) { - $this->log(0, 'Attempting to process the second package file'); - PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN); - $pf2 = &$pkg->fromPackageFile($pkg2, PEAR_VALIDATE_NORMAL); - PEAR::staticPopErrorHandling(); - if (PEAR::isError($pf2)) { - if (is_array($pf2->getUserInfo())) { - foreach ($pf2->getUserInfo() as $error) { - $this->log(0, 'Error: ' . $error['message']); - } - } - $this->log(0, $pf2->getMessage()); - return $this->raiseError("Cannot package, errors in second package file"); - } - - foreach ($pf2->getValidationWarnings() as $warning) { - $this->log(1, 'Warning: ' . $warning['message']); - } - - if ($pf2->getPackagexmlVersion() == '2.0' || - $pf2->getPackagexmlVersion() == '2.1' - ) { - $main = &$pf2; - $other = &$pf; - } else { - $main = &$pf; - $other = &$pf2; - } - - if ($main->getPackagexmlVersion() != '2.0' && - $main->getPackagexmlVersion() != '2.1') { - return PEAR::raiseError('Error: cannot package two package.xml version 1.0, can ' . - 'only package together a package.xml 1.0 and package.xml 2.0'); - } - - if ($other->getPackagexmlVersion() != '1.0') { - return PEAR::raiseError('Error: cannot package two package.xml version 2.0, can ' . - 'only package together a package.xml 1.0 and package.xml 2.0'); - } - } - - $main->setLogger($this); - if (!$main->validate(PEAR_VALIDATE_PACKAGING)) { - foreach ($main->getValidationWarnings() as $warning) { - $this->log(0, 'Error: ' . $warning['message']); - } - return $this->raiseError("Cannot package, errors in package"); - } - - foreach ($main->getValidationWarnings() as $warning) { - $this->log(1, 'Warning: ' . $warning['message']); - } - - if ($pkg2) { - $other->setLogger($this); - $a = false; - if (!$other->validate(PEAR_VALIDATE_NORMAL) || $a = !$main->isEquivalent($other)) { - foreach ($other->getValidationWarnings() as $warning) { - $this->log(0, 'Error: ' . $warning['message']); - } - - foreach ($main->getValidationWarnings() as $warning) { - $this->log(0, 'Error: ' . $warning['message']); - } - - if ($a) { - return $this->raiseError('The two package.xml files are not equivalent!'); - } - - return $this->raiseError("Cannot package, errors in package"); - } - - foreach ($other->getValidationWarnings() as $warning) { - $this->log(1, 'Warning: ' . $warning['message']); - } - - $gen = &$main->getDefaultGenerator(); - $tgzfile = $gen->toTgz2($this, $other, $compress); - if (PEAR::isError($tgzfile)) { - return $tgzfile; - } - - $dest_package = basename($tgzfile); - $pkgdir = dirname($pkgfile); - - // TAR the Package ------------------------------------------- - $this->log(1, "Package $dest_package done"); - if (file_exists("$pkgdir/CVS/Root")) { - $cvsversion = preg_replace('/[^a-z0-9]/i', '_', $pf->getVersion()); - $cvstag = "RELEASE_$cvsversion"; - $this->log(1, 'Tag the released code with "pear cvstag ' . - $main->getPackageFile() . '"'); - $this->log(1, "(or set the CVS tag $cvstag by hand)"); - } elseif (file_exists("$pkgdir/.svn")) { - $svnversion = preg_replace('/[^a-z0-9]/i', '.', $pf->getVersion()); - $svntag = $pf->getName() . "-$svnversion"; - $this->log(1, 'Tag the released code with "pear svntag ' . - $main->getPackageFile() . '"'); - $this->log(1, "(or set the SVN tag $svntag by hand)"); - } - } else { // this branch is executed for single packagefile packaging - $gen = &$pf->getDefaultGenerator(); - $tgzfile = $gen->toTgz($this, $compress); - if (PEAR::isError($tgzfile)) { - $this->log(0, $tgzfile->getMessage()); - return $this->raiseError("Cannot package, errors in package"); - } - - $dest_package = basename($tgzfile); - $pkgdir = dirname($pkgfile); - - // TAR the Package ------------------------------------------- - $this->log(1, "Package $dest_package done"); - if (file_exists("$pkgdir/CVS/Root")) { - $cvsversion = preg_replace('/[^a-z0-9]/i', '_', $pf->getVersion()); - $cvstag = "RELEASE_$cvsversion"; - $this->log(1, "Tag the released code with `pear cvstag $pkgfile'"); - $this->log(1, "(or set the CVS tag $cvstag by hand)"); - } elseif (file_exists("$pkgdir/.svn")) { - $svnversion = preg_replace('/[^a-z0-9]/i', '.', $pf->getVersion()); - $svntag = $pf->getName() . "-$svnversion"; - $this->log(1, "Tag the released code with `pear svntag $pkgfile'"); - $this->log(1, "(or set the SVN tag $svntag by hand)"); - } - } - - return $dest_package; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/REST.php b/_piecrust/libs/PEAR/REST.php deleted file mode 100644 index 34a804f..0000000 --- a/_piecrust/libs/PEAR/REST.php +++ /dev/null @@ -1,483 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: REST.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * For downloading xml files - */ -require_once 'PEAR.php'; -require_once 'PEAR/XMLParser.php'; - -/** - * Intelligently retrieve data, following hyperlinks if necessary, and re-directing - * as well - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_REST -{ - var $config; - var $_options; - - function PEAR_REST(&$config, $options = array()) - { - $this->config = &$config; - $this->_options = $options; - } - - /** - * Retrieve REST data, but always retrieve the local cache if it is available. - * - * This is useful for elements that should never change, such as information on a particular - * release - * @param string full URL to this resource - * @param array|false contents of the accept-encoding header - * @param boolean if true, xml will be returned as a string, otherwise, xml will be - * parsed using PEAR_XMLParser - * @return string|array - */ - function retrieveCacheFirst($url, $accept = false, $forcestring = false, $channel = false) - { - $cachefile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR . - md5($url) . 'rest.cachefile'; - - if (file_exists($cachefile)) { - return unserialize(implode('', file($cachefile))); - } - - return $this->retrieveData($url, $accept, $forcestring, $channel); - } - - /** - * Retrieve a remote REST resource - * @param string full URL to this resource - * @param array|false contents of the accept-encoding header - * @param boolean if true, xml will be returned as a string, otherwise, xml will be - * parsed using PEAR_XMLParser - * @return string|array - */ - function retrieveData($url, $accept = false, $forcestring = false, $channel = false) - { - $cacheId = $this->getCacheId($url); - if ($ret = $this->useLocalCache($url, $cacheId)) { - return $ret; - } - - $file = $trieddownload = false; - if (!isset($this->_options['offline'])) { - $trieddownload = true; - $file = $this->downloadHttp($url, $cacheId ? $cacheId['lastChange'] : false, $accept, $channel); - } - - if (PEAR::isError($file)) { - if ($file->getCode() !== -9276) { - return $file; - } - - $trieddownload = false; - $file = false; // use local copy if available on socket connect error - } - - if (!$file) { - $ret = $this->getCache($url); - if (!PEAR::isError($ret) && $trieddownload) { - // reset the age of the cache if the server says it was unmodified - $result = $this->saveCache($url, $ret, null, true, $cacheId); - if (PEAR::isError($result)) { - return PEAR::raiseError($result->getMessage()); - } - } - - return $ret; - } - - if (is_array($file)) { - $headers = $file[2]; - $lastmodified = $file[1]; - $content = $file[0]; - } else { - $headers = array(); - $lastmodified = false; - $content = $file; - } - - if ($forcestring) { - $result = $this->saveCache($url, $content, $lastmodified, false, $cacheId); - if (PEAR::isError($result)) { - return PEAR::raiseError($result->getMessage()); - } - - return $content; - } - - if (isset($headers['content-type'])) { - switch ($headers['content-type']) { - case 'text/xml' : - case 'application/xml' : - case 'text/plain' : - if ($headers['content-type'] === 'text/plain') { - $check = substr($content, 0, 5); - if ($check !== 'parse($content); - PEAR::popErrorHandling(); - if (PEAR::isError($err)) { - return PEAR::raiseError('Invalid xml downloaded from "' . $url . '": ' . - $err->getMessage()); - } - $content = $parser->getData(); - case 'text/html' : - default : - // use it as a string - } - } else { - // assume XML - $parser = new PEAR_XMLParser; - $parser->parse($content); - $content = $parser->getData(); - } - - $result = $this->saveCache($url, $content, $lastmodified, false, $cacheId); - if (PEAR::isError($result)) { - return PEAR::raiseError($result->getMessage()); - } - - return $content; - } - - function useLocalCache($url, $cacheid = null) - { - if ($cacheid === null) { - $cacheidfile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR . - md5($url) . 'rest.cacheid'; - if (!file_exists($cacheidfile)) { - return false; - } - - $cacheid = unserialize(implode('', file($cacheidfile))); - } - - $cachettl = $this->config->get('cache_ttl'); - // If cache is newer than $cachettl seconds, we use the cache! - if (time() - $cacheid['age'] < $cachettl) { - return $this->getCache($url); - } - - return false; - } - - function getCacheId($url) - { - $cacheidfile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR . - md5($url) . 'rest.cacheid'; - - if (!file_exists($cacheidfile)) { - return false; - } - - $ret = unserialize(implode('', file($cacheidfile))); - return $ret; - } - - function getCache($url) - { - $cachefile = $this->config->get('cache_dir') . DIRECTORY_SEPARATOR . - md5($url) . 'rest.cachefile'; - - if (!file_exists($cachefile)) { - return PEAR::raiseError('No cached content available for "' . $url . '"'); - } - - return unserialize(implode('', file($cachefile))); - } - - /** - * @param string full URL to REST resource - * @param string original contents of the REST resource - * @param array HTTP Last-Modified and ETag headers - * @param bool if true, then the cache id file should be regenerated to - * trigger a new time-to-live value - */ - function saveCache($url, $contents, $lastmodified, $nochange = false, $cacheid = null) - { - $cache_dir = $this->config->get('cache_dir'); - $d = $cache_dir . DIRECTORY_SEPARATOR . md5($url); - $cacheidfile = $d . 'rest.cacheid'; - $cachefile = $d . 'rest.cachefile'; - - if (!is_dir($cache_dir)) { - if (System::mkdir(array('-p', $cache_dir)) === false) { - return PEAR::raiseError("The value of config option cache_dir ($cache_dir) is not a directory and attempts to create the directory failed."); - } - } - - if ($cacheid === null && $nochange) { - $cacheid = unserialize(implode('', file($cacheidfile))); - } - - $idData = serialize(array( - 'age' => time(), - 'lastChange' => ($nochange ? $cacheid['lastChange'] : $lastmodified), - )); - - $result = $this->saveCacheFile($cacheidfile, $idData); - if (PEAR::isError($result)) { - return $result; - } elseif ($nochange) { - return true; - } - - $result = $this->saveCacheFile($cachefile, serialize($contents)); - if (PEAR::isError($result)) { - if (file_exists($cacheidfile)) { - @unlink($cacheidfile); - } - - return $result; - } - - return true; - } - - function saveCacheFile($file, $contents) - { - $len = strlen($contents); - - $cachefile_fp = @fopen($file, 'xb'); // x is the O_CREAT|O_EXCL mode - if ($cachefile_fp !== false) { // create file - if (fwrite($cachefile_fp, $contents, $len) < $len) { - fclose($cachefile_fp); - return PEAR::raiseError("Could not write $file."); - } - } else { // update file - $cachefile_lstat = lstat($file); - $cachefile_fp = @fopen($file, 'wb'); - if (!$cachefile_fp) { - return PEAR::raiseError("Could not open $file for writing."); - } - - $cachefile_fstat = fstat($cachefile_fp); - if ( - $cachefile_lstat['mode'] == $cachefile_fstat['mode'] && - $cachefile_lstat['ino'] == $cachefile_fstat['ino'] && - $cachefile_lstat['dev'] == $cachefile_fstat['dev'] && - $cachefile_fstat['nlink'] === 1 - ) { - if (fwrite($cachefile_fp, $contents, $len) < $len) { - fclose($cachefile_fp); - return PEAR::raiseError("Could not write $file."); - } - } else { - fclose($cachefile_fp); - $link = function_exists('readlink') ? readlink($file) : $file; - return PEAR::raiseError('SECURITY ERROR: Will not write to ' . $file . ' as it is symlinked to ' . $link . ' - Possible symlink attack'); - } - } - - fclose($cachefile_fp); - return true; - } - - /** - * Efficiently Download a file through HTTP. Returns downloaded file as a string in-memory - * This is best used for small files - * - * If an HTTP proxy has been configured (http_proxy PEAR_Config - * setting), the proxy will be used. - * - * @param string $url the URL to download - * @param string $save_dir directory to save file in - * @param false|string|array $lastmodified header values to check against for caching - * use false to return the header values from this download - * @param false|array $accept Accept headers to send - * @return string|array Returns the contents of the downloaded file or a PEAR - * error on failure. If the error is caused by - * socket-related errors, the error object will - * have the fsockopen error code available through - * getCode(). If caching is requested, then return the header - * values. - * - * @access public - */ - function downloadHttp($url, $lastmodified = null, $accept = false, $channel = false) - { - static $redirect = 0; - // always reset , so we are clean case of error - $wasredirect = $redirect; - $redirect = 0; - - $info = parse_url($url); - if (!isset($info['scheme']) || !in_array($info['scheme'], array('http', 'https'))) { - return PEAR::raiseError('Cannot download non-http URL "' . $url . '"'); - } - - if (!isset($info['host'])) { - return PEAR::raiseError('Cannot download from non-URL "' . $url . '"'); - } - - $host = isset($info['host']) ? $info['host'] : null; - $port = isset($info['port']) ? $info['port'] : null; - $path = isset($info['path']) ? $info['path'] : null; - $schema = (isset($info['scheme']) && $info['scheme'] == 'https') ? 'https' : 'http'; - - $proxy_host = $proxy_port = $proxy_user = $proxy_pass = ''; - if ($this->config->get('http_proxy')&& - $proxy = parse_url($this->config->get('http_proxy')) - ) { - $proxy_host = isset($proxy['host']) ? $proxy['host'] : null; - if ($schema === 'https') { - $proxy_host = 'ssl://' . $proxy_host; - } - - $proxy_port = isset($proxy['port']) ? $proxy['port'] : 8080; - $proxy_user = isset($proxy['user']) ? urldecode($proxy['user']) : null; - $proxy_pass = isset($proxy['pass']) ? urldecode($proxy['pass']) : null; - $proxy_schema = (isset($proxy['scheme']) && $proxy['scheme'] == 'https') ? 'https' : 'http'; - } - - if (empty($port)) { - $port = (isset($info['scheme']) && $info['scheme'] == 'https') ? 443 : 80; - } - - if (isset($proxy['host'])) { - $request = "GET $url HTTP/1.1\r\n"; - } else { - $request = "GET $path HTTP/1.1\r\n"; - } - - $request .= "Host: $host\r\n"; - $ifmodifiedsince = ''; - if (is_array($lastmodified)) { - if (isset($lastmodified['Last-Modified'])) { - $ifmodifiedsince = 'If-Modified-Since: ' . $lastmodified['Last-Modified'] . "\r\n"; - } - - if (isset($lastmodified['ETag'])) { - $ifmodifiedsince .= "If-None-Match: $lastmodified[ETag]\r\n"; - } - } else { - $ifmodifiedsince = ($lastmodified ? "If-Modified-Since: $lastmodified\r\n" : ''); - } - - $request .= $ifmodifiedsince . - "User-Agent: PEAR/1.9.4/PHP/" . PHP_VERSION . "\r\n"; - - $username = $this->config->get('username', null, $channel); - $password = $this->config->get('password', null, $channel); - - if ($username && $password) { - $tmp = base64_encode("$username:$password"); - $request .= "Authorization: Basic $tmp\r\n"; - } - - if ($proxy_host != '' && $proxy_user != '') { - $request .= 'Proxy-Authorization: Basic ' . - base64_encode($proxy_user . ':' . $proxy_pass) . "\r\n"; - } - - if ($accept) { - $request .= 'Accept: ' . implode(', ', $accept) . "\r\n"; - } - - $request .= "Accept-Encoding:\r\n"; - $request .= "Connection: close\r\n"; - $request .= "\r\n"; - - if ($proxy_host != '') { - $fp = @fsockopen($proxy_host, $proxy_port, $errno, $errstr, 15); - if (!$fp) { - return PEAR::raiseError("Connection to `$proxy_host:$proxy_port' failed: $errstr", -9276); - } - } else { - if ($schema === 'https') { - $host = 'ssl://' . $host; - } - - $fp = @fsockopen($host, $port, $errno, $errstr); - if (!$fp) { - return PEAR::raiseError("Connection to `$host:$port' failed: $errstr", $errno); - } - } - - fwrite($fp, $request); - - $headers = array(); - $reply = 0; - while ($line = trim(fgets($fp, 1024))) { - if (preg_match('/^([^:]+):\s+(.*)\s*\\z/', $line, $matches)) { - $headers[strtolower($matches[1])] = trim($matches[2]); - } elseif (preg_match('|^HTTP/1.[01] ([0-9]{3}) |', $line, $matches)) { - $reply = (int)$matches[1]; - if ($reply == 304 && ($lastmodified || ($lastmodified === false))) { - return false; - } - - if (!in_array($reply, array(200, 301, 302, 303, 305, 307))) { - return PEAR::raiseError("File $schema://$host:$port$path not valid (received: $line)"); - } - } - } - - if ($reply != 200) { - if (!isset($headers['location'])) { - return PEAR::raiseError("File $schema://$host:$port$path not valid (redirected but no location)"); - } - - if ($wasredirect > 4) { - return PEAR::raiseError("File $schema://$host:$port$path not valid (redirection looped more than 5 times)"); - } - - $redirect = $wasredirect + 1; - return $this->downloadHttp($headers['location'], $lastmodified, $accept, $channel); - } - - $length = isset($headers['content-length']) ? $headers['content-length'] : -1; - - $data = ''; - while ($chunk = @fread($fp, 8192)) { - $data .= $chunk; - } - fclose($fp); - - if ($lastmodified === false || $lastmodified) { - if (isset($headers['etag'])) { - $lastmodified = array('ETag' => $headers['etag']); - } - - if (isset($headers['last-modified'])) { - if (is_array($lastmodified)) { - $lastmodified['Last-Modified'] = $headers['last-modified']; - } else { - $lastmodified = $headers['last-modified']; - } - } - - return array($data, $lastmodified, $headers); - } - - return $data; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/REST/10.php b/_piecrust/libs/PEAR/REST/10.php deleted file mode 100644 index 6ded7ae..0000000 --- a/_piecrust/libs/PEAR/REST/10.php +++ /dev/null @@ -1,871 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: 10.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a12 - */ - -/** - * For downloading REST xml/txt files - */ -require_once 'PEAR/REST.php'; - -/** - * Implement REST 1.0 - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a12 - */ -class PEAR_REST_10 -{ - /** - * @var PEAR_REST - */ - var $_rest; - function PEAR_REST_10($config, $options = array()) - { - $this->_rest = &new PEAR_REST($config, $options); - } - - /** - * Retrieve information about a remote package to be downloaded from a REST server - * - * @param string $base The uri to prepend to all REST calls - * @param array $packageinfo an array of format: - *
        -     *  array(
        -     *   'package' => 'packagename',
        -     *   'channel' => 'channelname',
        -     *  ['state' => 'alpha' (or valid state),]
        -     *  -or-
        -     *  ['version' => '1.whatever']
        -     * 
        - * @param string $prefstate Current preferred_state config variable value - * @param bool $installed the installed version of this package to compare against - * @return array|false|PEAR_Error see {@link _returnDownloadURL()} - */ - function getDownloadURL($base, $packageinfo, $prefstate, $installed, $channel = false) - { - $states = $this->betterStates($prefstate, true); - if (!$states) { - return PEAR::raiseError('"' . $prefstate . '" is not a valid state'); - } - - $channel = $packageinfo['channel']; - $package = $packageinfo['package']; - $state = isset($packageinfo['state']) ? $packageinfo['state'] : null; - $version = isset($packageinfo['version']) ? $packageinfo['version'] : null; - $restFile = $base . 'r/' . strtolower($package) . '/allreleases.xml'; - - $info = $this->_rest->retrieveData($restFile, false, false, $channel); - if (PEAR::isError($info)) { - return PEAR::raiseError('No releases available for package "' . - $channel . '/' . $package . '"'); - } - - if (!isset($info['r'])) { - return false; - } - - $release = $found = false; - if (!is_array($info['r']) || !isset($info['r'][0])) { - $info['r'] = array($info['r']); - } - - foreach ($info['r'] as $release) { - if (!isset($this->_rest->_options['force']) && ($installed && - version_compare($release['v'], $installed, '<'))) { - continue; - } - - if (isset($state)) { - // try our preferred state first - if ($release['s'] == $state) { - $found = true; - break; - } - // see if there is something newer and more stable - // bug #7221 - if (in_array($release['s'], $this->betterStates($state), true)) { - $found = true; - break; - } - } elseif (isset($version)) { - if ($release['v'] == $version) { - $found = true; - break; - } - } else { - if (in_array($release['s'], $states)) { - $found = true; - break; - } - } - } - - return $this->_returnDownloadURL($base, $package, $release, $info, $found, false, $channel); - } - - function getDepDownloadURL($base, $xsdversion, $dependency, $deppackage, - $prefstate = 'stable', $installed = false, $channel = false) - { - $states = $this->betterStates($prefstate, true); - if (!$states) { - return PEAR::raiseError('"' . $prefstate . '" is not a valid state'); - } - - $channel = $dependency['channel']; - $package = $dependency['name']; - $state = isset($dependency['state']) ? $dependency['state'] : null; - $version = isset($dependency['version']) ? $dependency['version'] : null; - $restFile = $base . 'r/' . strtolower($package) . '/allreleases.xml'; - - $info = $this->_rest->retrieveData($restFile, false, false, $channel); - if (PEAR::isError($info)) { - return PEAR::raiseError('Package "' . $deppackage['channel'] . '/' . $deppackage['package'] - . '" dependency "' . $channel . '/' . $package . '" has no releases'); - } - - if (!is_array($info) || !isset($info['r'])) { - return false; - } - - $exclude = array(); - $min = $max = $recommended = false; - if ($xsdversion == '1.0') { - switch ($dependency['rel']) { - case 'ge' : - $min = $dependency['version']; - break; - case 'gt' : - $min = $dependency['version']; - $exclude = array($dependency['version']); - break; - case 'eq' : - $recommended = $dependency['version']; - break; - case 'lt' : - $max = $dependency['version']; - $exclude = array($dependency['version']); - break; - case 'le' : - $max = $dependency['version']; - break; - case 'ne' : - $exclude = array($dependency['version']); - break; - } - } else { - $min = isset($dependency['min']) ? $dependency['min'] : false; - $max = isset($dependency['max']) ? $dependency['max'] : false; - $recommended = isset($dependency['recommended']) ? - $dependency['recommended'] : false; - if (isset($dependency['exclude'])) { - if (!isset($dependency['exclude'][0])) { - $exclude = array($dependency['exclude']); - } - } - } - $release = $found = false; - if (!is_array($info['r']) || !isset($info['r'][0])) { - $info['r'] = array($info['r']); - } - foreach ($info['r'] as $release) { - if (!isset($this->_rest->_options['force']) && ($installed && - version_compare($release['v'], $installed, '<'))) { - continue; - } - if (in_array($release['v'], $exclude)) { // skip excluded versions - continue; - } - // allow newer releases to say "I'm OK with the dependent package" - if ($xsdversion == '2.0' && isset($release['co'])) { - if (!is_array($release['co']) || !isset($release['co'][0])) { - $release['co'] = array($release['co']); - } - foreach ($release['co'] as $entry) { - if (isset($entry['x']) && !is_array($entry['x'])) { - $entry['x'] = array($entry['x']); - } elseif (!isset($entry['x'])) { - $entry['x'] = array(); - } - if ($entry['c'] == $deppackage['channel'] && - strtolower($entry['p']) == strtolower($deppackage['package']) && - version_compare($deppackage['version'], $entry['min'], '>=') && - version_compare($deppackage['version'], $entry['max'], '<=') && - !in_array($release['v'], $entry['x'])) { - $recommended = $release['v']; - break; - } - } - } - if ($recommended) { - if ($release['v'] != $recommended) { // if we want a specific - // version, then skip all others - continue; - } else { - if (!in_array($release['s'], $states)) { - // the stability is too low, but we must return the - // recommended version if possible - return $this->_returnDownloadURL($base, $package, $release, $info, true, false, $channel); - } - } - } - if ($min && version_compare($release['v'], $min, 'lt')) { // skip too old versions - continue; - } - if ($max && version_compare($release['v'], $max, 'gt')) { // skip too new versions - continue; - } - if ($installed && version_compare($release['v'], $installed, '<')) { - continue; - } - if (in_array($release['s'], $states)) { // if in the preferred state... - $found = true; // ... then use it - break; - } - } - return $this->_returnDownloadURL($base, $package, $release, $info, $found, false, $channel); - } - - /** - * Take raw data and return the array needed for processing a download URL - * - * @param string $base REST base uri - * @param string $package Package name - * @param array $release an array of format array('v' => version, 's' => state) - * describing the release to download - * @param array $info list of all releases as defined by allreleases.xml - * @param bool|null $found determines whether the release was found or this is the next - * best alternative. If null, then versions were skipped because - * of PHP dependency - * @return array|PEAR_Error - * @access private - */ - function _returnDownloadURL($base, $package, $release, $info, $found, $phpversion = false, $channel = false) - { - if (!$found) { - $release = $info['r'][0]; - } - - $packageLower = strtolower($package); - $pinfo = $this->_rest->retrieveCacheFirst($base . 'p/' . $packageLower . '/' . - 'info.xml', false, false, $channel); - if (PEAR::isError($pinfo)) { - return PEAR::raiseError('Package "' . $package . - '" does not have REST info xml available'); - } - - $releaseinfo = $this->_rest->retrieveCacheFirst($base . 'r/' . $packageLower . '/' . - $release['v'] . '.xml', false, false, $channel); - if (PEAR::isError($releaseinfo)) { - return PEAR::raiseError('Package "' . $package . '" Version "' . $release['v'] . - '" does not have REST xml available'); - } - - $packagexml = $this->_rest->retrieveCacheFirst($base . 'r/' . $packageLower . '/' . - 'deps.' . $release['v'] . '.txt', false, true, $channel); - if (PEAR::isError($packagexml)) { - return PEAR::raiseError('Package "' . $package . '" Version "' . $release['v'] . - '" does not have REST dependency information available'); - } - - $packagexml = unserialize($packagexml); - if (!$packagexml) { - $packagexml = array(); - } - - $allinfo = $this->_rest->retrieveData($base . 'r/' . $packageLower . - '/allreleases.xml', false, false, $channel); - if (PEAR::isError($allinfo)) { - return $allinfo; - } - - if (!is_array($allinfo['r']) || !isset($allinfo['r'][0])) { - $allinfo['r'] = array($allinfo['r']); - } - - $compatible = false; - foreach ($allinfo['r'] as $release) { - if ($release['v'] != $releaseinfo['v']) { - continue; - } - - if (!isset($release['co'])) { - break; - } - - $compatible = array(); - if (!is_array($release['co']) || !isset($release['co'][0])) { - $release['co'] = array($release['co']); - } - - foreach ($release['co'] as $entry) { - $comp = array(); - $comp['name'] = $entry['p']; - $comp['channel'] = $entry['c']; - $comp['min'] = $entry['min']; - $comp['max'] = $entry['max']; - if (isset($entry['x']) && !is_array($entry['x'])) { - $comp['exclude'] = $entry['x']; - } - - $compatible[] = $comp; - } - - if (count($compatible) == 1) { - $compatible = $compatible[0]; - } - - break; - } - - $deprecated = false; - if (isset($pinfo['dc']) && isset($pinfo['dp'])) { - if (is_array($pinfo['dp'])) { - $deprecated = array('channel' => (string) $pinfo['dc'], - 'package' => trim($pinfo['dp']['_content'])); - } else { - $deprecated = array('channel' => (string) $pinfo['dc'], - 'package' => trim($pinfo['dp'])); - } - } - - $return = array( - 'version' => $releaseinfo['v'], - 'info' => $packagexml, - 'package' => $releaseinfo['p']['_content'], - 'stability' => $releaseinfo['st'], - 'compatible' => $compatible, - 'deprecated' => $deprecated, - ); - - if ($found) { - $return['url'] = $releaseinfo['g']; - return $return; - } - - $return['php'] = $phpversion; - return $return; - } - - function listPackages($base, $channel = false) - { - $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel); - if (PEAR::isError($packagelist)) { - return $packagelist; - } - - if (!is_array($packagelist) || !isset($packagelist['p'])) { - return array(); - } - - if (!is_array($packagelist['p'])) { - $packagelist['p'] = array($packagelist['p']); - } - - return $packagelist['p']; - } - - /** - * List all categories of a REST server - * - * @param string $base base URL of the server - * @return array of categorynames - */ - function listCategories($base, $channel = false) - { - $categories = array(); - - // c/categories.xml does not exist; - // check for every package its category manually - // This is SLOOOWWWW : /// - $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel); - if (PEAR::isError($packagelist)) { - return $packagelist; - } - - if (!is_array($packagelist) || !isset($packagelist['p'])) { - $ret = array(); - return $ret; - } - - if (!is_array($packagelist['p'])) { - $packagelist['p'] = array($packagelist['p']); - } - - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - foreach ($packagelist['p'] as $package) { - $inf = $this->_rest->retrieveData($base . 'p/' . strtolower($package) . '/info.xml', false, false, $channel); - if (PEAR::isError($inf)) { - PEAR::popErrorHandling(); - return $inf; - } - $cat = $inf['ca']['_content']; - if (!isset($categories[$cat])) { - $categories[$cat] = $inf['ca']; - } - } - - return array_values($categories); - } - - /** - * List a category of a REST server - * - * @param string $base base URL of the server - * @param string $category name of the category - * @param boolean $info also download full package info - * @return array of packagenames - */ - function listCategory($base, $category, $info = false, $channel = false) - { - // gives '404 Not Found' error when category doesn't exist - $packagelist = $this->_rest->retrieveData($base.'c/'.urlencode($category).'/packages.xml', false, false, $channel); - if (PEAR::isError($packagelist)) { - return $packagelist; - } - - if (!is_array($packagelist) || !isset($packagelist['p'])) { - return array(); - } - - if (!is_array($packagelist['p']) || - !isset($packagelist['p'][0])) { // only 1 pkg - $packagelist = array($packagelist['p']); - } else { - $packagelist = $packagelist['p']; - } - - if ($info == true) { - // get individual package info - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - foreach ($packagelist as $i => $packageitem) { - $url = sprintf('%s'.'r/%s/latest.txt', - $base, - strtolower($packageitem['_content'])); - $version = $this->_rest->retrieveData($url, false, false, $channel); - if (PEAR::isError($version)) { - break; // skipit - } - $url = sprintf('%s'.'r/%s/%s.xml', - $base, - strtolower($packageitem['_content']), - $version); - $info = $this->_rest->retrieveData($url, false, false, $channel); - if (PEAR::isError($info)) { - break; // skipit - } - $packagelist[$i]['info'] = $info; - } - PEAR::popErrorHandling(); - } - - return $packagelist; - } - - - function listAll($base, $dostable, $basic = true, $searchpackage = false, $searchsummary = false, $channel = false) - { - $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel); - if (PEAR::isError($packagelist)) { - return $packagelist; - } - if ($this->_rest->config->get('verbose') > 0) { - $ui = &PEAR_Frontend::singleton(); - $ui->log('Retrieving data...0%', true); - } - $ret = array(); - if (!is_array($packagelist) || !isset($packagelist['p'])) { - return $ret; - } - if (!is_array($packagelist['p'])) { - $packagelist['p'] = array($packagelist['p']); - } - - // only search-packagename = quicksearch ! - if ($searchpackage && (!$searchsummary || empty($searchpackage))) { - $newpackagelist = array(); - foreach ($packagelist['p'] as $package) { - if (!empty($searchpackage) && stristr($package, $searchpackage) !== false) { - $newpackagelist[] = $package; - } - } - $packagelist['p'] = $newpackagelist; - } - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $next = .1; - foreach ($packagelist['p'] as $progress => $package) { - if ($this->_rest->config->get('verbose') > 0) { - if ($progress / count($packagelist['p']) >= $next) { - if ($next == .5) { - $ui->log('50%', false); - } else { - $ui->log('.', false); - } - $next += .1; - } - } - - if ($basic) { // remote-list command - if ($dostable) { - $latest = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . - '/stable.txt', false, false, $channel); - } else { - $latest = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . - '/latest.txt', false, false, $channel); - } - if (PEAR::isError($latest)) { - $latest = false; - } - $info = array('stable' => $latest); - } else { // list-all command - $inf = $this->_rest->retrieveData($base . 'p/' . strtolower($package) . '/info.xml', false, false, $channel); - if (PEAR::isError($inf)) { - PEAR::popErrorHandling(); - return $inf; - } - if ($searchpackage) { - $found = (!empty($searchpackage) && stristr($package, $searchpackage) !== false); - if (!$found && !(isset($searchsummary) && !empty($searchsummary) - && (stristr($inf['s'], $searchsummary) !== false - || stristr($inf['d'], $searchsummary) !== false))) - { - continue; - }; - } - $releases = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . - '/allreleases.xml', false, false, $channel); - if (PEAR::isError($releases)) { - continue; - } - if (!isset($releases['r'][0])) { - $releases['r'] = array($releases['r']); - } - unset($latest); - unset($unstable); - unset($stable); - unset($state); - foreach ($releases['r'] as $release) { - if (!isset($latest)) { - if ($dostable && $release['s'] == 'stable') { - $latest = $release['v']; - $state = 'stable'; - } - if (!$dostable) { - $latest = $release['v']; - $state = $release['s']; - } - } - if (!isset($stable) && $release['s'] == 'stable') { - $stable = $release['v']; - if (!isset($unstable)) { - $unstable = $stable; - } - } - if (!isset($unstable) && $release['s'] != 'stable') { - $latest = $unstable = $release['v']; - $state = $release['s']; - } - if (isset($latest) && !isset($state)) { - $state = $release['s']; - } - if (isset($latest) && isset($stable) && isset($unstable)) { - break; - } - } - $deps = array(); - if (!isset($unstable)) { - $unstable = false; - $state = 'stable'; - if (isset($stable)) { - $latest = $unstable = $stable; - } - } else { - $latest = $unstable; - } - if (!isset($latest)) { - $latest = false; - } - if ($latest) { - $d = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/deps.' . - $latest . '.txt', false, false, $channel); - if (!PEAR::isError($d)) { - $d = unserialize($d); - if ($d) { - if (isset($d['required'])) { - if (!class_exists('PEAR_PackageFile_v2')) { - require_once 'PEAR/PackageFile/v2.php'; - } - if (!isset($pf)) { - $pf = new PEAR_PackageFile_v2; - } - $pf->setDeps($d); - $tdeps = $pf->getDeps(); - } else { - $tdeps = $d; - } - foreach ($tdeps as $dep) { - if ($dep['type'] !== 'pkg') { - continue; - } - $deps[] = $dep; - } - } - } - } - if (!isset($stable)) { - $stable = '-n/a-'; - } - if (!$searchpackage) { - $info = array('stable' => $latest, 'summary' => $inf['s'], 'description' => - $inf['d'], 'deps' => $deps, 'category' => $inf['ca']['_content'], - 'unstable' => $unstable, 'state' => $state); - } else { - $info = array('stable' => $stable, 'summary' => $inf['s'], 'description' => - $inf['d'], 'deps' => $deps, 'category' => $inf['ca']['_content'], - 'unstable' => $unstable, 'state' => $state); - } - } - $ret[$package] = $info; - } - PEAR::popErrorHandling(); - return $ret; - } - - function listLatestUpgrades($base, $pref_state, $installed, $channel, &$reg) - { - $packagelist = $this->_rest->retrieveData($base . 'p/packages.xml', false, false, $channel); - if (PEAR::isError($packagelist)) { - return $packagelist; - } - - $ret = array(); - if (!is_array($packagelist) || !isset($packagelist['p'])) { - return $ret; - } - - if (!is_array($packagelist['p'])) { - $packagelist['p'] = array($packagelist['p']); - } - - foreach ($packagelist['p'] as $package) { - if (!isset($installed[strtolower($package)])) { - continue; - } - - $inst_version = $reg->packageInfo($package, 'version', $channel); - $inst_state = $reg->packageInfo($package, 'release_state', $channel); - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $info = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . - '/allreleases.xml', false, false, $channel); - PEAR::popErrorHandling(); - if (PEAR::isError($info)) { - continue; // no remote releases - } - - if (!isset($info['r'])) { - continue; - } - - $release = $found = false; - if (!is_array($info['r']) || !isset($info['r'][0])) { - $info['r'] = array($info['r']); - } - - // $info['r'] is sorted by version number - usort($info['r'], array($this, '_sortReleasesByVersionNumber')); - foreach ($info['r'] as $release) { - if ($inst_version && version_compare($release['v'], $inst_version, '<=')) { - // not newer than the one installed - break; - } - - // new version > installed version - if (!$pref_state) { - // every state is a good state - $found = true; - break; - } else { - $new_state = $release['s']; - // if new state >= installed state: go - if (in_array($new_state, $this->betterStates($inst_state, true))) { - $found = true; - break; - } else { - // only allow to lower the state of package, - // if new state >= preferred state: go - if (in_array($new_state, $this->betterStates($pref_state, true))) { - $found = true; - break; - } - } - } - } - - if (!$found) { - continue; - } - - $relinfo = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/' . - $release['v'] . '.xml', false, false, $channel); - if (PEAR::isError($relinfo)) { - return $relinfo; - } - - $ret[$package] = array( - 'version' => $release['v'], - 'state' => $release['s'], - 'filesize' => $relinfo['f'], - ); - } - - return $ret; - } - - function packageInfo($base, $package, $channel = false) - { - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $pinfo = $this->_rest->retrieveData($base . 'p/' . strtolower($package) . '/info.xml', false, false, $channel); - if (PEAR::isError($pinfo)) { - PEAR::popErrorHandling(); - return PEAR::raiseError('Unknown package: "' . $package . '" in channel "' . $channel . '"' . "\n". 'Debug: ' . - $pinfo->getMessage()); - } - - $releases = array(); - $allreleases = $this->_rest->retrieveData($base . 'r/' . strtolower($package) . - '/allreleases.xml', false, false, $channel); - if (!PEAR::isError($allreleases)) { - if (!class_exists('PEAR_PackageFile_v2')) { - require_once 'PEAR/PackageFile/v2.php'; - } - - if (!is_array($allreleases['r']) || !isset($allreleases['r'][0])) { - $allreleases['r'] = array($allreleases['r']); - } - - $pf = new PEAR_PackageFile_v2; - foreach ($allreleases['r'] as $release) { - $ds = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) . '/deps.' . - $release['v'] . '.txt', false, false, $channel); - if (PEAR::isError($ds)) { - continue; - } - - if (!isset($latest)) { - $latest = $release['v']; - } - - $pf->setDeps(unserialize($ds)); - $ds = $pf->getDeps(); - $info = $this->_rest->retrieveCacheFirst($base . 'r/' . strtolower($package) - . '/' . $release['v'] . '.xml', false, false, $channel); - - if (PEAR::isError($info)) { - continue; - } - - $releases[$release['v']] = array( - 'doneby' => $info['m'], - 'license' => $info['l'], - 'summary' => $info['s'], - 'description' => $info['d'], - 'releasedate' => $info['da'], - 'releasenotes' => $info['n'], - 'state' => $release['s'], - 'deps' => $ds ? $ds : array(), - ); - } - } else { - $latest = ''; - } - - PEAR::popErrorHandling(); - if (isset($pinfo['dc']) && isset($pinfo['dp'])) { - if (is_array($pinfo['dp'])) { - $deprecated = array('channel' => (string) $pinfo['dc'], - 'package' => trim($pinfo['dp']['_content'])); - } else { - $deprecated = array('channel' => (string) $pinfo['dc'], - 'package' => trim($pinfo['dp'])); - } - } else { - $deprecated = false; - } - - if (!isset($latest)) { - $latest = ''; - } - - return array( - 'name' => $pinfo['n'], - 'channel' => $pinfo['c'], - 'category' => $pinfo['ca']['_content'], - 'stable' => $latest, - 'license' => $pinfo['l'], - 'summary' => $pinfo['s'], - 'description' => $pinfo['d'], - 'releases' => $releases, - 'deprecated' => $deprecated, - ); - } - - /** - * Return an array containing all of the states that are more stable than - * or equal to the passed in state - * - * @param string Release state - * @param boolean Determines whether to include $state in the list - * @return false|array False if $state is not a valid release state - */ - function betterStates($state, $include = false) - { - static $states = array('snapshot', 'devel', 'alpha', 'beta', 'stable'); - $i = array_search($state, $states); - if ($i === false) { - return false; - } - - if ($include) { - $i--; - } - - return array_slice($states, $i + 1); - } - - /** - * Sort releases by version number - * - * @access private - */ - function _sortReleasesByVersionNumber($a, $b) - { - if (version_compare($a['v'], $b['v'], '=')) { - return 0; - } - - if (version_compare($a['v'], $b['v'], '>')) { - return -1; - } - - if (version_compare($a['v'], $b['v'], '<')) { - return 1; - } - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/REST/11.php b/_piecrust/libs/PEAR/REST/11.php deleted file mode 100644 index 831cfcc..0000000 --- a/_piecrust/libs/PEAR/REST/11.php +++ /dev/null @@ -1,341 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: 11.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.3 - */ - -/** - * For downloading REST xml/txt files - */ -require_once 'PEAR/REST.php'; - -/** - * Implement REST 1.1 - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.3 - */ -class PEAR_REST_11 -{ - /** - * @var PEAR_REST - */ - var $_rest; - - function PEAR_REST_11($config, $options = array()) - { - $this->_rest = &new PEAR_REST($config, $options); - } - - function listAll($base, $dostable, $basic = true, $searchpackage = false, $searchsummary = false, $channel = false) - { - $categorylist = $this->_rest->retrieveData($base . 'c/categories.xml', false, false, $channel); - if (PEAR::isError($categorylist)) { - return $categorylist; - } - - $ret = array(); - if (!is_array($categorylist['c']) || !isset($categorylist['c'][0])) { - $categorylist['c'] = array($categorylist['c']); - } - - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - - foreach ($categorylist['c'] as $progress => $category) { - $category = $category['_content']; - $packagesinfo = $this->_rest->retrieveData($base . - 'c/' . urlencode($category) . '/packagesinfo.xml', false, false, $channel); - - if (PEAR::isError($packagesinfo)) { - continue; - } - - if (!is_array($packagesinfo) || !isset($packagesinfo['pi'])) { - continue; - } - - if (!is_array($packagesinfo['pi']) || !isset($packagesinfo['pi'][0])) { - $packagesinfo['pi'] = array($packagesinfo['pi']); - } - - foreach ($packagesinfo['pi'] as $packageinfo) { - if (empty($packageinfo)) { - continue; - } - - $info = $packageinfo['p']; - $package = $info['n']; - $releases = isset($packageinfo['a']) ? $packageinfo['a'] : false; - unset($latest); - unset($unstable); - unset($stable); - unset($state); - - if ($releases) { - if (!isset($releases['r'][0])) { - $releases['r'] = array($releases['r']); - } - - foreach ($releases['r'] as $release) { - if (!isset($latest)) { - if ($dostable && $release['s'] == 'stable') { - $latest = $release['v']; - $state = 'stable'; - } - if (!$dostable) { - $latest = $release['v']; - $state = $release['s']; - } - } - - if (!isset($stable) && $release['s'] == 'stable') { - $stable = $release['v']; - if (!isset($unstable)) { - $unstable = $stable; - } - } - - if (!isset($unstable) && $release['s'] != 'stable') { - $unstable = $release['v']; - $state = $release['s']; - } - - if (isset($latest) && !isset($state)) { - $state = $release['s']; - } - - if (isset($latest) && isset($stable) && isset($unstable)) { - break; - } - } - } - - if ($basic) { // remote-list command - if (!isset($latest)) { - $latest = false; - } - - if ($dostable) { - // $state is not set if there are no releases - if (isset($state) && $state == 'stable') { - $ret[$package] = array('stable' => $latest); - } else { - $ret[$package] = array('stable' => '-n/a-'); - } - } else { - $ret[$package] = array('stable' => $latest); - } - - continue; - } - - // list-all command - if (!isset($unstable)) { - $unstable = false; - $state = 'stable'; - if (isset($stable)) { - $latest = $unstable = $stable; - } - } else { - $latest = $unstable; - } - - if (!isset($latest)) { - $latest = false; - } - - $deps = array(); - if ($latest && isset($packageinfo['deps'])) { - if (!is_array($packageinfo['deps']) || - !isset($packageinfo['deps'][0]) - ) { - $packageinfo['deps'] = array($packageinfo['deps']); - } - - $d = false; - foreach ($packageinfo['deps'] as $dep) { - if ($dep['v'] == $latest) { - $d = unserialize($dep['d']); - } - } - - if ($d) { - if (isset($d['required'])) { - if (!class_exists('PEAR_PackageFile_v2')) { - require_once 'PEAR/PackageFile/v2.php'; - } - - if (!isset($pf)) { - $pf = new PEAR_PackageFile_v2; - } - - $pf->setDeps($d); - $tdeps = $pf->getDeps(); - } else { - $tdeps = $d; - } - - foreach ($tdeps as $dep) { - if ($dep['type'] !== 'pkg') { - continue; - } - - $deps[] = $dep; - } - } - } - - $info = array( - 'stable' => $latest, - 'summary' => $info['s'], - 'description' => $info['d'], - 'deps' => $deps, - 'category' => $info['ca']['_content'], - 'unstable' => $unstable, - 'state' => $state - ); - $ret[$package] = $info; - } - } - - PEAR::popErrorHandling(); - return $ret; - } - - /** - * List all categories of a REST server - * - * @param string $base base URL of the server - * @return array of categorynames - */ - function listCategories($base, $channel = false) - { - $categorylist = $this->_rest->retrieveData($base . 'c/categories.xml', false, false, $channel); - if (PEAR::isError($categorylist)) { - return $categorylist; - } - - if (!is_array($categorylist) || !isset($categorylist['c'])) { - return array(); - } - - if (isset($categorylist['c']['_content'])) { - // only 1 category - $categorylist['c'] = array($categorylist['c']); - } - - return $categorylist['c']; - } - - /** - * List packages in a category of a REST server - * - * @param string $base base URL of the server - * @param string $category name of the category - * @param boolean $info also download full package info - * @return array of packagenames - */ - function listCategory($base, $category, $info = false, $channel = false) - { - if ($info == false) { - $url = '%s'.'c/%s/packages.xml'; - } else { - $url = '%s'.'c/%s/packagesinfo.xml'; - } - $url = sprintf($url, - $base, - urlencode($category)); - - // gives '404 Not Found' error when category doesn't exist - $packagelist = $this->_rest->retrieveData($url, false, false, $channel); - if (PEAR::isError($packagelist)) { - return $packagelist; - } - if (!is_array($packagelist)) { - return array(); - } - - if ($info == false) { - if (!isset($packagelist['p'])) { - return array(); - } - if (!is_array($packagelist['p']) || - !isset($packagelist['p'][0])) { // only 1 pkg - $packagelist = array($packagelist['p']); - } else { - $packagelist = $packagelist['p']; - } - return $packagelist; - } - - // info == true - if (!isset($packagelist['pi'])) { - return array(); - } - - if (!is_array($packagelist['pi']) || - !isset($packagelist['pi'][0])) { // only 1 pkg - $packagelist_pre = array($packagelist['pi']); - } else { - $packagelist_pre = $packagelist['pi']; - } - - $packagelist = array(); - foreach ($packagelist_pre as $i => $item) { - // compatibility with r/.xml - if (isset($item['a']['r'][0])) { - // multiple releases - $item['p']['v'] = $item['a']['r'][0]['v']; - $item['p']['st'] = $item['a']['r'][0]['s']; - } elseif (isset($item['a'])) { - // first and only release - $item['p']['v'] = $item['a']['r']['v']; - $item['p']['st'] = $item['a']['r']['s']; - } - - $packagelist[$i] = array('attribs' => $item['p']['r'], - '_content' => $item['p']['n'], - 'info' => $item['p']); - } - - return $packagelist; - } - - /** - * Return an array containing all of the states that are more stable than - * or equal to the passed in state - * - * @param string Release state - * @param boolean Determines whether to include $state in the list - * @return false|array False if $state is not a valid release state - */ - function betterStates($state, $include = false) - { - static $states = array('snapshot', 'devel', 'alpha', 'beta', 'stable'); - $i = array_search($state, $states); - if ($i === false) { - return false; - } - if ($include) { - $i--; - } - return array_slice($states, $i + 1); - } -} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/REST/13.php b/_piecrust/libs/PEAR/REST/13.php deleted file mode 100644 index 722ae0d..0000000 --- a/_piecrust/libs/PEAR/REST/13.php +++ /dev/null @@ -1,299 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: 13.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a12 - */ - -/** - * For downloading REST xml/txt files - */ -require_once 'PEAR/REST.php'; -require_once 'PEAR/REST/10.php'; - -/** - * Implement REST 1.3 - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a12 - */ -class PEAR_REST_13 extends PEAR_REST_10 -{ - /** - * Retrieve information about a remote package to be downloaded from a REST server - * - * This is smart enough to resolve the minimum PHP version dependency prior to download - * @param string $base The uri to prepend to all REST calls - * @param array $packageinfo an array of format: - *
        -     *  array(
        -     *   'package' => 'packagename',
        -     *   'channel' => 'channelname',
        -     *  ['state' => 'alpha' (or valid state),]
        -     *  -or-
        -     *  ['version' => '1.whatever']
        -     * 
        - * @param string $prefstate Current preferred_state config variable value - * @param bool $installed the installed version of this package to compare against - * @return array|false|PEAR_Error see {@link _returnDownloadURL()} - */ - function getDownloadURL($base, $packageinfo, $prefstate, $installed, $channel = false) - { - $states = $this->betterStates($prefstate, true); - if (!$states) { - return PEAR::raiseError('"' . $prefstate . '" is not a valid state'); - } - - $channel = $packageinfo['channel']; - $package = $packageinfo['package']; - $state = isset($packageinfo['state']) ? $packageinfo['state'] : null; - $version = isset($packageinfo['version']) ? $packageinfo['version'] : null; - $restFile = $base . 'r/' . strtolower($package) . '/allreleases2.xml'; - - $info = $this->_rest->retrieveData($restFile, false, false, $channel); - if (PEAR::isError($info)) { - return PEAR::raiseError('No releases available for package "' . - $channel . '/' . $package . '"'); - } - - if (!isset($info['r'])) { - return false; - } - - $release = $found = false; - if (!is_array($info['r']) || !isset($info['r'][0])) { - $info['r'] = array($info['r']); - } - - $skippedphp = false; - foreach ($info['r'] as $release) { - if (!isset($this->_rest->_options['force']) && ($installed && - version_compare($release['v'], $installed, '<'))) { - continue; - } - - if (isset($state)) { - // try our preferred state first - if ($release['s'] == $state) { - if (!isset($version) && version_compare($release['m'], phpversion(), '>')) { - // skip releases that require a PHP version newer than our PHP version - $skippedphp = $release; - continue; - } - $found = true; - break; - } - - // see if there is something newer and more stable - // bug #7221 - if (in_array($release['s'], $this->betterStates($state), true)) { - if (!isset($version) && version_compare($release['m'], phpversion(), '>')) { - // skip releases that require a PHP version newer than our PHP version - $skippedphp = $release; - continue; - } - $found = true; - break; - } - } elseif (isset($version)) { - if ($release['v'] == $version) { - if (!isset($this->_rest->_options['force']) && - !isset($version) && - version_compare($release['m'], phpversion(), '>')) { - // skip releases that require a PHP version newer than our PHP version - $skippedphp = $release; - continue; - } - $found = true; - break; - } - } else { - if (in_array($release['s'], $states)) { - if (version_compare($release['m'], phpversion(), '>')) { - // skip releases that require a PHP version newer than our PHP version - $skippedphp = $release; - continue; - } - $found = true; - break; - } - } - } - - if (!$found && $skippedphp) { - $found = null; - } - - return $this->_returnDownloadURL($base, $package, $release, $info, $found, $skippedphp, $channel); - } - - function getDepDownloadURL($base, $xsdversion, $dependency, $deppackage, - $prefstate = 'stable', $installed = false, $channel = false) - { - $states = $this->betterStates($prefstate, true); - if (!$states) { - return PEAR::raiseError('"' . $prefstate . '" is not a valid state'); - } - - $channel = $dependency['channel']; - $package = $dependency['name']; - $state = isset($dependency['state']) ? $dependency['state'] : null; - $version = isset($dependency['version']) ? $dependency['version'] : null; - $restFile = $base . 'r/' . strtolower($package) .'/allreleases2.xml'; - - $info = $this->_rest->retrieveData($restFile, false, false, $channel); - if (PEAR::isError($info)) { - return PEAR::raiseError('Package "' . $deppackage['channel'] . '/' . $deppackage['package'] - . '" dependency "' . $channel . '/' . $package . '" has no releases'); - } - - if (!is_array($info) || !isset($info['r'])) { - return false; - } - - $exclude = array(); - $min = $max = $recommended = false; - if ($xsdversion == '1.0') { - $pinfo['package'] = $dependency['name']; - $pinfo['channel'] = 'pear.php.net'; // this is always true - don't change this - switch ($dependency['rel']) { - case 'ge' : - $min = $dependency['version']; - break; - case 'gt' : - $min = $dependency['version']; - $exclude = array($dependency['version']); - break; - case 'eq' : - $recommended = $dependency['version']; - break; - case 'lt' : - $max = $dependency['version']; - $exclude = array($dependency['version']); - break; - case 'le' : - $max = $dependency['version']; - break; - case 'ne' : - $exclude = array($dependency['version']); - break; - } - } else { - $pinfo['package'] = $dependency['name']; - $min = isset($dependency['min']) ? $dependency['min'] : false; - $max = isset($dependency['max']) ? $dependency['max'] : false; - $recommended = isset($dependency['recommended']) ? - $dependency['recommended'] : false; - if (isset($dependency['exclude'])) { - if (!isset($dependency['exclude'][0])) { - $exclude = array($dependency['exclude']); - } - } - } - - $skippedphp = $found = $release = false; - if (!is_array($info['r']) || !isset($info['r'][0])) { - $info['r'] = array($info['r']); - } - - foreach ($info['r'] as $release) { - if (!isset($this->_rest->_options['force']) && ($installed && - version_compare($release['v'], $installed, '<'))) { - continue; - } - - if (in_array($release['v'], $exclude)) { // skip excluded versions - continue; - } - - // allow newer releases to say "I'm OK with the dependent package" - if ($xsdversion == '2.0' && isset($release['co'])) { - if (!is_array($release['co']) || !isset($release['co'][0])) { - $release['co'] = array($release['co']); - } - - foreach ($release['co'] as $entry) { - if (isset($entry['x']) && !is_array($entry['x'])) { - $entry['x'] = array($entry['x']); - } elseif (!isset($entry['x'])) { - $entry['x'] = array(); - } - - if ($entry['c'] == $deppackage['channel'] && - strtolower($entry['p']) == strtolower($deppackage['package']) && - version_compare($deppackage['version'], $entry['min'], '>=') && - version_compare($deppackage['version'], $entry['max'], '<=') && - !in_array($release['v'], $entry['x'])) { - if (version_compare($release['m'], phpversion(), '>')) { - // skip dependency releases that require a PHP version - // newer than our PHP version - $skippedphp = $release; - continue; - } - - $recommended = $release['v']; - break; - } - } - } - - if ($recommended) { - if ($release['v'] != $recommended) { // if we want a specific - // version, then skip all others - continue; - } - - if (!in_array($release['s'], $states)) { - // the stability is too low, but we must return the - // recommended version if possible - return $this->_returnDownloadURL($base, $package, $release, $info, true, false, $channel); - } - } - - if ($min && version_compare($release['v'], $min, 'lt')) { // skip too old versions - continue; - } - - if ($max && version_compare($release['v'], $max, 'gt')) { // skip too new versions - continue; - } - - if ($installed && version_compare($release['v'], $installed, '<')) { - continue; - } - - if (in_array($release['s'], $states)) { // if in the preferred state... - if (version_compare($release['m'], phpversion(), '>')) { - // skip dependency releases that require a PHP version - // newer than our PHP version - $skippedphp = $release; - continue; - } - - $found = true; // ... then use it - break; - } - } - - if (!$found && $skippedphp) { - $found = null; - } - - return $this->_returnDownloadURL($base, $package, $release, $info, $found, $skippedphp, $channel); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Registry.php b/_piecrust/libs/PEAR/Registry.php deleted file mode 100644 index 35e17db..0000000 --- a/_piecrust/libs/PEAR/Registry.php +++ /dev/null @@ -1,2395 +0,0 @@ - - * @author Tomas V. V. Cox - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Registry.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 0.1 - */ - -/** - * for PEAR_Error - */ -require_once 'PEAR.php'; -require_once 'PEAR/DependencyDB.php'; - -define('PEAR_REGISTRY_ERROR_LOCK', -2); -define('PEAR_REGISTRY_ERROR_FORMAT', -3); -define('PEAR_REGISTRY_ERROR_FILE', -4); -define('PEAR_REGISTRY_ERROR_CONFLICT', -5); -define('PEAR_REGISTRY_ERROR_CHANNEL_FILE', -6); - -/** - * Administration class used to maintain the installed package database. - * @category pear - * @package PEAR - * @author Stig Bakken - * @author Tomas V. V. Cox - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Registry extends PEAR -{ - /** - * File containing all channel information. - * @var string - */ - var $channels = ''; - - /** Directory where registry files are stored. - * @var string - */ - var $statedir = ''; - - /** File where the file map is stored - * @var string - */ - var $filemap = ''; - - /** Directory where registry files for channels are stored. - * @var string - */ - var $channelsdir = ''; - - /** Name of file used for locking the registry - * @var string - */ - var $lockfile = ''; - - /** File descriptor used during locking - * @var resource - */ - var $lock_fp = null; - - /** Mode used during locking - * @var int - */ - var $lock_mode = 0; // XXX UNUSED - - /** Cache of package information. Structure: - * array( - * 'package' => array('id' => ... ), - * ... ) - * @var array - */ - var $pkginfo_cache = array(); - - /** Cache of file map. Structure: - * array( '/path/to/file' => 'package', ... ) - * @var array - */ - var $filemap_cache = array(); - - /** - * @var false|PEAR_ChannelFile - */ - var $_pearChannel; - - /** - * @var false|PEAR_ChannelFile - */ - var $_peclChannel; - - /** - * @var false|PEAR_ChannelFile - */ - var $_docChannel; - - /** - * @var PEAR_DependencyDB - */ - var $_dependencyDB; - - /** - * @var PEAR_Config - */ - var $_config; - - /** - * PEAR_Registry constructor. - * - * @param string (optional) PEAR install directory (for .php files) - * @param PEAR_ChannelFile PEAR_ChannelFile object representing the PEAR channel, if - * default values are not desired. Only used the very first time a PEAR - * repository is initialized - * @param PEAR_ChannelFile PEAR_ChannelFile object representing the PECL channel, if - * default values are not desired. Only used the very first time a PEAR - * repository is initialized - * - * @access public - */ - function PEAR_Registry($pear_install_dir = PEAR_INSTALL_DIR, $pear_channel = false, - $pecl_channel = false) - { - parent::PEAR(); - $this->setInstallDir($pear_install_dir); - $this->_pearChannel = $pear_channel; - $this->_peclChannel = $pecl_channel; - $this->_config = false; - } - - function setInstallDir($pear_install_dir = PEAR_INSTALL_DIR) - { - $ds = DIRECTORY_SEPARATOR; - $this->install_dir = $pear_install_dir; - $this->channelsdir = $pear_install_dir.$ds.'.channels'; - $this->statedir = $pear_install_dir.$ds.'.registry'; - $this->filemap = $pear_install_dir.$ds.'.filemap'; - $this->lockfile = $pear_install_dir.$ds.'.lock'; - } - - function hasWriteAccess() - { - if (!file_exists($this->install_dir)) { - $dir = $this->install_dir; - while ($dir && $dir != '.') { - $olddir = $dir; - $dir = dirname($dir); - if ($dir != '.' && file_exists($dir)) { - if (is_writeable($dir)) { - return true; - } - - return false; - } - - if ($dir == $olddir) { // this can happen in safe mode - return @is_writable($dir); - } - } - - return false; - } - - return is_writeable($this->install_dir); - } - - function setConfig(&$config, $resetInstallDir = true) - { - $this->_config = &$config; - if ($resetInstallDir) { - $this->setInstallDir($config->get('php_dir')); - } - } - - function _initializeChannelDirs() - { - static $running = false; - if (!$running) { - $running = true; - $ds = DIRECTORY_SEPARATOR; - if (!is_dir($this->channelsdir) || - !file_exists($this->channelsdir . $ds . 'pear.php.net.reg') || - !file_exists($this->channelsdir . $ds . 'pecl.php.net.reg') || - !file_exists($this->channelsdir . $ds . 'doc.php.net.reg') || - !file_exists($this->channelsdir . $ds . '__uri.reg')) { - if (!file_exists($this->channelsdir . $ds . 'pear.php.net.reg')) { - $pear_channel = $this->_pearChannel; - if (!is_a($pear_channel, 'PEAR_ChannelFile') || !$pear_channel->validate()) { - if (!class_exists('PEAR_ChannelFile')) { - require_once 'PEAR/ChannelFile.php'; - } - - $pear_channel = new PEAR_ChannelFile; - $pear_channel->setAlias('pear'); - $pear_channel->setServer('pear.php.net'); - $pear_channel->setSummary('PHP Extension and Application Repository'); - $pear_channel->setDefaultPEARProtocols(); - $pear_channel->setBaseURL('REST1.0', 'http://pear.php.net/rest/'); - $pear_channel->setBaseURL('REST1.1', 'http://pear.php.net/rest/'); - $pear_channel->setBaseURL('REST1.3', 'http://pear.php.net/rest/'); - //$pear_channel->setBaseURL('REST1.4', 'http://pear.php.net/rest/'); - } else { - $pear_channel->setServer('pear.php.net'); - $pear_channel->setAlias('pear'); - } - - $pear_channel->validate(); - $this->_addChannel($pear_channel); - } - - if (!file_exists($this->channelsdir . $ds . 'pecl.php.net.reg')) { - $pecl_channel = $this->_peclChannel; - if (!is_a($pecl_channel, 'PEAR_ChannelFile') || !$pecl_channel->validate()) { - if (!class_exists('PEAR_ChannelFile')) { - require_once 'PEAR/ChannelFile.php'; - } - - $pecl_channel = new PEAR_ChannelFile; - $pecl_channel->setAlias('pecl'); - $pecl_channel->setServer('pecl.php.net'); - $pecl_channel->setSummary('PHP Extension Community Library'); - $pecl_channel->setDefaultPEARProtocols(); - $pecl_channel->setBaseURL('REST1.0', 'http://pecl.php.net/rest/'); - $pecl_channel->setBaseURL('REST1.1', 'http://pecl.php.net/rest/'); - $pecl_channel->setValidationPackage('PEAR_Validator_PECL', '1.0'); - } else { - $pecl_channel->setServer('pecl.php.net'); - $pecl_channel->setAlias('pecl'); - } - - $pecl_channel->validate(); - $this->_addChannel($pecl_channel); - } - - if (!file_exists($this->channelsdir . $ds . 'doc.php.net.reg')) { - $doc_channel = $this->_docChannel; - if (!is_a($doc_channel, 'PEAR_ChannelFile') || !$doc_channel->validate()) { - if (!class_exists('PEAR_ChannelFile')) { - require_once 'PEAR/ChannelFile.php'; - } - - $doc_channel = new PEAR_ChannelFile; - $doc_channel->setAlias('phpdocs'); - $doc_channel->setServer('doc.php.net'); - $doc_channel->setSummary('PHP Documentation Team'); - $doc_channel->setDefaultPEARProtocols(); - $doc_channel->setBaseURL('REST1.0', 'http://doc.php.net/rest/'); - $doc_channel->setBaseURL('REST1.1', 'http://doc.php.net/rest/'); - $doc_channel->setBaseURL('REST1.3', 'http://doc.php.net/rest/'); - } else { - $doc_channel->setServer('doc.php.net'); - $doc_channel->setAlias('doc'); - } - - $doc_channel->validate(); - $this->_addChannel($doc_channel); - } - - if (!file_exists($this->channelsdir . $ds . '__uri.reg')) { - if (!class_exists('PEAR_ChannelFile')) { - require_once 'PEAR/ChannelFile.php'; - } - - $private = new PEAR_ChannelFile; - $private->setName('__uri'); - $private->setDefaultPEARProtocols(); - $private->setBaseURL('REST1.0', '****'); - $private->setSummary('Pseudo-channel for static packages'); - $this->_addChannel($private); - } - $this->_rebuildFileMap(); - } - - $running = false; - } - } - - function _initializeDirs() - { - $ds = DIRECTORY_SEPARATOR; - // XXX Compatibility code should be removed in the future - // rename all registry files if any to lowercase - if (!OS_WINDOWS && file_exists($this->statedir) && is_dir($this->statedir) && - $handle = opendir($this->statedir)) { - $dest = $this->statedir . $ds; - while (false !== ($file = readdir($handle))) { - if (preg_match('/^.*[A-Z].*\.reg\\z/', $file)) { - rename($dest . $file, $dest . strtolower($file)); - } - } - closedir($handle); - } - - $this->_initializeChannelDirs(); - if (!file_exists($this->filemap)) { - $this->_rebuildFileMap(); - } - $this->_initializeDepDB(); - } - - function _initializeDepDB() - { - if (!isset($this->_dependencyDB)) { - static $initializing = false; - if (!$initializing) { - $initializing = true; - if (!$this->_config) { // never used? - $file = OS_WINDOWS ? 'pear.ini' : '.pearrc'; - $this->_config = &new PEAR_Config($this->statedir . DIRECTORY_SEPARATOR . - $file); - $this->_config->setRegistry($this); - $this->_config->set('php_dir', $this->install_dir); - } - - $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->_config); - if (PEAR::isError($this->_dependencyDB)) { - // attempt to recover by removing the dep db - if (file_exists($this->_config->get('php_dir', null, 'pear.php.net') . - DIRECTORY_SEPARATOR . '.depdb')) { - @unlink($this->_config->get('php_dir', null, 'pear.php.net') . - DIRECTORY_SEPARATOR . '.depdb'); - } - - $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->_config); - if (PEAR::isError($this->_dependencyDB)) { - echo $this->_dependencyDB->getMessage(); - echo 'Unrecoverable error'; - exit(1); - } - } - - $initializing = false; - } - } - } - - /** - * PEAR_Registry destructor. Makes sure no locks are forgotten. - * - * @access private - */ - function _PEAR_Registry() - { - parent::_PEAR(); - if (is_resource($this->lock_fp)) { - $this->_unlock(); - } - } - - /** - * Make sure the directory where we keep registry files exists. - * - * @return bool TRUE if directory exists, FALSE if it could not be - * created - * - * @access private - */ - function _assertStateDir($channel = false) - { - if ($channel && $this->_getChannelFromAlias($channel) != 'pear.php.net') { - return $this->_assertChannelStateDir($channel); - } - - static $init = false; - if (!file_exists($this->statedir)) { - if (!$this->hasWriteAccess()) { - return false; - } - - require_once 'System.php'; - if (!System::mkdir(array('-p', $this->statedir))) { - return $this->raiseError("could not create directory '{$this->statedir}'"); - } - $init = true; - } elseif (!is_dir($this->statedir)) { - return $this->raiseError('Cannot create directory ' . $this->statedir . ', ' . - 'it already exists and is not a directory'); - } - - $ds = DIRECTORY_SEPARATOR; - if (!file_exists($this->channelsdir)) { - if (!file_exists($this->channelsdir . $ds . 'pear.php.net.reg') || - !file_exists($this->channelsdir . $ds . 'pecl.php.net.reg') || - !file_exists($this->channelsdir . $ds . 'doc.php.net.reg') || - !file_exists($this->channelsdir . $ds . '__uri.reg')) { - $init = true; - } - } elseif (!is_dir($this->channelsdir)) { - return $this->raiseError('Cannot create directory ' . $this->channelsdir . ', ' . - 'it already exists and is not a directory'); - } - - if ($init) { - static $running = false; - if (!$running) { - $running = true; - $this->_initializeDirs(); - $running = false; - $init = false; - } - } else { - $this->_initializeDepDB(); - } - - return true; - } - - /** - * Make sure the directory where we keep registry files exists for a non-standard channel. - * - * @param string channel name - * @return bool TRUE if directory exists, FALSE if it could not be - * created - * - * @access private - */ - function _assertChannelStateDir($channel) - { - $ds = DIRECTORY_SEPARATOR; - if (!$channel || $this->_getChannelFromAlias($channel) == 'pear.php.net') { - if (!file_exists($this->channelsdir . $ds . 'pear.php.net.reg')) { - $this->_initializeChannelDirs(); - } - return $this->_assertStateDir($channel); - } - - $channelDir = $this->_channelDirectoryName($channel); - if (!is_dir($this->channelsdir) || - !file_exists($this->channelsdir . $ds . 'pear.php.net.reg')) { - $this->_initializeChannelDirs(); - } - - if (!file_exists($channelDir)) { - if (!$this->hasWriteAccess()) { - return false; - } - - require_once 'System.php'; - if (!System::mkdir(array('-p', $channelDir))) { - return $this->raiseError("could not create directory '" . $channelDir . - "'"); - } - } elseif (!is_dir($channelDir)) { - return $this->raiseError("could not create directory '" . $channelDir . - "', already exists and is not a directory"); - } - - return true; - } - - /** - * Make sure the directory where we keep registry files for channels exists - * - * @return bool TRUE if directory exists, FALSE if it could not be - * created - * - * @access private - */ - function _assertChannelDir() - { - if (!file_exists($this->channelsdir)) { - if (!$this->hasWriteAccess()) { - return false; - } - - require_once 'System.php'; - if (!System::mkdir(array('-p', $this->channelsdir))) { - return $this->raiseError("could not create directory '{$this->channelsdir}'"); - } - } elseif (!is_dir($this->channelsdir)) { - return $this->raiseError("could not create directory '{$this->channelsdir}" . - "', it already exists and is not a directory"); - } - - if (!file_exists($this->channelsdir . DIRECTORY_SEPARATOR . '.alias')) { - if (!$this->hasWriteAccess()) { - return false; - } - - require_once 'System.php'; - if (!System::mkdir(array('-p', $this->channelsdir . DIRECTORY_SEPARATOR . '.alias'))) { - return $this->raiseError("could not create directory '{$this->channelsdir}/.alias'"); - } - } elseif (!is_dir($this->channelsdir . DIRECTORY_SEPARATOR . '.alias')) { - return $this->raiseError("could not create directory '{$this->channelsdir}" . - "/.alias', it already exists and is not a directory"); - } - - return true; - } - - /** - * Get the name of the file where data for a given package is stored. - * - * @param string channel name, or false if this is a PEAR package - * @param string package name - * - * @return string registry file name - * - * @access public - */ - function _packageFileName($package, $channel = false) - { - if ($channel && $this->_getChannelFromAlias($channel) != 'pear.php.net') { - return $this->_channelDirectoryName($channel) . DIRECTORY_SEPARATOR . - strtolower($package) . '.reg'; - } - - return $this->statedir . DIRECTORY_SEPARATOR . strtolower($package) . '.reg'; - } - - /** - * Get the name of the file where data for a given channel is stored. - * @param string channel name - * @return string registry file name - */ - function _channelFileName($channel, $noaliases = false) - { - if (!$noaliases) { - if (file_exists($this->_getChannelAliasFileName($channel))) { - $channel = implode('', file($this->_getChannelAliasFileName($channel))); - } - } - return $this->channelsdir . DIRECTORY_SEPARATOR . str_replace('/', '_', - strtolower($channel)) . '.reg'; - } - - /** - * @param string - * @return string - */ - function _getChannelAliasFileName($alias) - { - return $this->channelsdir . DIRECTORY_SEPARATOR . '.alias' . - DIRECTORY_SEPARATOR . str_replace('/', '_', strtolower($alias)) . '.txt'; - } - - /** - * Get the name of a channel from its alias - */ - function _getChannelFromAlias($channel) - { - if (!$this->_channelExists($channel)) { - if ($channel == 'pear.php.net') { - return 'pear.php.net'; - } - - if ($channel == 'pecl.php.net') { - return 'pecl.php.net'; - } - - if ($channel == 'doc.php.net') { - return 'doc.php.net'; - } - - if ($channel == '__uri') { - return '__uri'; - } - - return false; - } - - $channel = strtolower($channel); - if (file_exists($this->_getChannelAliasFileName($channel))) { - // translate an alias to an actual channel - return implode('', file($this->_getChannelAliasFileName($channel))); - } - - return $channel; - } - - /** - * Get the alias of a channel from its alias or its name - */ - function _getAlias($channel) - { - if (!$this->_channelExists($channel)) { - if ($channel == 'pear.php.net') { - return 'pear'; - } - - if ($channel == 'pecl.php.net') { - return 'pecl'; - } - - if ($channel == 'doc.php.net') { - return 'phpdocs'; - } - - return false; - } - - $channel = $this->_getChannel($channel); - if (PEAR::isError($channel)) { - return $channel; - } - - return $channel->getAlias(); - } - - /** - * Get the name of the file where data for a given package is stored. - * - * @param string channel name, or false if this is a PEAR package - * @param string package name - * - * @return string registry file name - * - * @access public - */ - function _channelDirectoryName($channel) - { - if (!$channel || $this->_getChannelFromAlias($channel) == 'pear.php.net') { - return $this->statedir; - } - - $ch = $this->_getChannelFromAlias($channel); - if (!$ch) { - $ch = $channel; - } - - return $this->statedir . DIRECTORY_SEPARATOR . strtolower('.channel.' . - str_replace('/', '_', $ch)); - } - - function _openPackageFile($package, $mode, $channel = false) - { - if (!$this->_assertStateDir($channel)) { - return null; - } - - if (!in_array($mode, array('r', 'rb')) && !$this->hasWriteAccess()) { - return null; - } - - $file = $this->_packageFileName($package, $channel); - if (!file_exists($file) && $mode == 'r' || $mode == 'rb') { - return null; - } - - $fp = @fopen($file, $mode); - if (!$fp) { - return null; - } - - return $fp; - } - - function _closePackageFile($fp) - { - fclose($fp); - } - - function _openChannelFile($channel, $mode) - { - if (!$this->_assertChannelDir()) { - return null; - } - - if (!in_array($mode, array('r', 'rb')) && !$this->hasWriteAccess()) { - return null; - } - - $file = $this->_channelFileName($channel); - if (!file_exists($file) && $mode == 'r' || $mode == 'rb') { - return null; - } - - $fp = @fopen($file, $mode); - if (!$fp) { - return null; - } - - return $fp; - } - - function _closeChannelFile($fp) - { - fclose($fp); - } - - function _rebuildFileMap() - { - if (!class_exists('PEAR_Installer_Role')) { - require_once 'PEAR/Installer/Role.php'; - } - - $channels = $this->_listAllPackages(); - $files = array(); - foreach ($channels as $channel => $packages) { - foreach ($packages as $package) { - $version = $this->_packageInfo($package, 'version', $channel); - $filelist = $this->_packageInfo($package, 'filelist', $channel); - if (!is_array($filelist)) { - continue; - } - - foreach ($filelist as $name => $attrs) { - if (isset($attrs['attribs'])) { - $attrs = $attrs['attribs']; - } - - // it is possible for conflicting packages in different channels to - // conflict with data files/doc files - if ($name == 'dirtree') { - continue; - } - - if (isset($attrs['role']) && !in_array($attrs['role'], - PEAR_Installer_Role::getInstallableRoles())) { - // these are not installed - continue; - } - - if (isset($attrs['role']) && !in_array($attrs['role'], - PEAR_Installer_Role::getBaseinstallRoles())) { - $attrs['baseinstalldir'] = $package; - } - - if (isset($attrs['baseinstalldir'])) { - $file = $attrs['baseinstalldir'].DIRECTORY_SEPARATOR.$name; - } else { - $file = $name; - } - - $file = preg_replace(',^/+,', '', $file); - if ($channel != 'pear.php.net') { - if (!isset($files[$attrs['role']])) { - $files[$attrs['role']] = array(); - } - $files[$attrs['role']][$file] = array(strtolower($channel), - strtolower($package)); - } else { - if (!isset($files[$attrs['role']])) { - $files[$attrs['role']] = array(); - } - $files[$attrs['role']][$file] = strtolower($package); - } - } - } - } - - - $this->_assertStateDir(); - if (!$this->hasWriteAccess()) { - return false; - } - - $fp = @fopen($this->filemap, 'wb'); - if (!$fp) { - return false; - } - - $this->filemap_cache = $files; - fwrite($fp, serialize($files)); - fclose($fp); - return true; - } - - function _readFileMap() - { - if (!file_exists($this->filemap)) { - return array(); - } - - $fp = @fopen($this->filemap, 'r'); - if (!$fp) { - return $this->raiseError('PEAR_Registry: could not open filemap "' . $this->filemap . '"', PEAR_REGISTRY_ERROR_FILE, null, null, $php_errormsg); - } - - clearstatcache(); - $rt = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - $fsize = filesize($this->filemap); - fclose($fp); - $data = file_get_contents($this->filemap); - set_magic_quotes_runtime($rt); - $tmp = unserialize($data); - if (!$tmp && $fsize > 7) { - return $this->raiseError('PEAR_Registry: invalid filemap data', PEAR_REGISTRY_ERROR_FORMAT, null, null, $data); - } - - $this->filemap_cache = $tmp; - return true; - } - - /** - * Lock the registry. - * - * @param integer lock mode, one of LOCK_EX, LOCK_SH or LOCK_UN. - * See flock manual for more information. - * - * @return bool TRUE on success, FALSE if locking failed, or a - * PEAR error if some other error occurs (such as the - * lock file not being writable). - * - * @access private - */ - function _lock($mode = LOCK_EX) - { - if (stristr(php_uname(), 'Windows 9')) { - return true; - } - - if ($mode != LOCK_UN && is_resource($this->lock_fp)) { - // XXX does not check type of lock (LOCK_SH/LOCK_EX) - return true; - } - - if (!$this->_assertStateDir()) { - if ($mode == LOCK_EX) { - return $this->raiseError('Registry directory is not writeable by the current user'); - } - - return true; - } - - $open_mode = 'w'; - // XXX People reported problems with LOCK_SH and 'w' - if ($mode === LOCK_SH || $mode === LOCK_UN) { - if (!file_exists($this->lockfile)) { - touch($this->lockfile); - } - $open_mode = 'r'; - } - - if (!is_resource($this->lock_fp)) { - $this->lock_fp = @fopen($this->lockfile, $open_mode); - } - - if (!is_resource($this->lock_fp)) { - $this->lock_fp = null; - return $this->raiseError("could not create lock file" . - (isset($php_errormsg) ? ": " . $php_errormsg : "")); - } - - if (!(int)flock($this->lock_fp, $mode)) { - switch ($mode) { - case LOCK_SH: $str = 'shared'; break; - case LOCK_EX: $str = 'exclusive'; break; - case LOCK_UN: $str = 'unlock'; break; - default: $str = 'unknown'; break; - } - - //is resource at this point, close it on error. - fclose($this->lock_fp); - $this->lock_fp = null; - return $this->raiseError("could not acquire $str lock ($this->lockfile)", - PEAR_REGISTRY_ERROR_LOCK); - } - - return true; - } - - function _unlock() - { - $ret = $this->_lock(LOCK_UN); - if (is_resource($this->lock_fp)) { - fclose($this->lock_fp); - } - - $this->lock_fp = null; - return $ret; - } - - function _packageExists($package, $channel = false) - { - return file_exists($this->_packageFileName($package, $channel)); - } - - /** - * Determine whether a channel exists in the registry - * - * @param string Channel name - * @param bool if true, then aliases will be ignored - * @return boolean - */ - function _channelExists($channel, $noaliases = false) - { - $a = file_exists($this->_channelFileName($channel, $noaliases)); - if (!$a && $channel == 'pear.php.net') { - return true; - } - - if (!$a && $channel == 'pecl.php.net') { - return true; - } - - if (!$a && $channel == 'doc.php.net') { - return true; - } - - return $a; - } - - /** - * Determine whether a mirror exists within the deafult channel in the registry - * - * @param string Channel name - * @param string Mirror name - * - * @return boolean - */ - function _mirrorExists($channel, $mirror) - { - $data = $this->_channelInfo($channel); - if (!isset($data['servers']['mirror'])) { - return false; - } - - foreach ($data['servers']['mirror'] as $m) { - if ($m['attribs']['host'] == $mirror) { - return true; - } - } - - return false; - } - - /** - * @param PEAR_ChannelFile Channel object - * @param donotuse - * @param string Last-Modified HTTP tag from remote request - * @return boolean|PEAR_Error True on creation, false if it already exists - */ - function _addChannel($channel, $update = false, $lastmodified = false) - { - if (!is_a($channel, 'PEAR_ChannelFile')) { - return false; - } - - if (!$channel->validate()) { - return false; - } - - if (file_exists($this->_channelFileName($channel->getName()))) { - if (!$update) { - return false; - } - - $checker = $this->_getChannel($channel->getName()); - if (PEAR::isError($checker)) { - return $checker; - } - - if ($channel->getAlias() != $checker->getAlias()) { - if (file_exists($this->_getChannelAliasFileName($checker->getAlias()))) { - @unlink($this->_getChannelAliasFileName($checker->getAlias())); - } - } - } else { - if ($update && !in_array($channel->getName(), array('pear.php.net', 'pecl.php.net', 'doc.php.net'))) { - return false; - } - } - - $ret = $this->_assertChannelDir(); - if (PEAR::isError($ret)) { - return $ret; - } - - $ret = $this->_assertChannelStateDir($channel->getName()); - if (PEAR::isError($ret)) { - return $ret; - } - - if ($channel->getAlias() != $channel->getName()) { - if (file_exists($this->_getChannelAliasFileName($channel->getAlias())) && - $this->_getChannelFromAlias($channel->getAlias()) != $channel->getName()) { - $channel->setAlias($channel->getName()); - } - - if (!$this->hasWriteAccess()) { - return false; - } - - $fp = @fopen($this->_getChannelAliasFileName($channel->getAlias()), 'w'); - if (!$fp) { - return false; - } - - fwrite($fp, $channel->getName()); - fclose($fp); - } - - if (!$this->hasWriteAccess()) { - return false; - } - - $fp = @fopen($this->_channelFileName($channel->getName()), 'wb'); - if (!$fp) { - return false; - } - - $info = $channel->toArray(); - if ($lastmodified) { - $info['_lastmodified'] = $lastmodified; - } else { - $info['_lastmodified'] = date('r'); - } - - fwrite($fp, serialize($info)); - fclose($fp); - return true; - } - - /** - * Deletion fails if there are any packages installed from the channel - * @param string|PEAR_ChannelFile channel name - * @return boolean|PEAR_Error True on deletion, false if it doesn't exist - */ - function _deleteChannel($channel) - { - if (!is_string($channel)) { - if (!is_a($channel, 'PEAR_ChannelFile')) { - return false; - } - - if (!$channel->validate()) { - return false; - } - $channel = $channel->getName(); - } - - if ($this->_getChannelFromAlias($channel) == '__uri') { - return false; - } - - if ($this->_getChannelFromAlias($channel) == 'pecl.php.net') { - return false; - } - - if ($this->_getChannelFromAlias($channel) == 'doc.php.net') { - return false; - } - - if (!$this->_channelExists($channel)) { - return false; - } - - if (!$channel || $this->_getChannelFromAlias($channel) == 'pear.php.net') { - return false; - } - - $channel = $this->_getChannelFromAlias($channel); - if ($channel == 'pear.php.net') { - return false; - } - - $test = $this->_listChannelPackages($channel); - if (count($test)) { - return false; - } - - $test = @rmdir($this->_channelDirectoryName($channel)); - if (!$test) { - return false; - } - - $file = $this->_getChannelAliasFileName($this->_getAlias($channel)); - if (file_exists($file)) { - $test = @unlink($file); - if (!$test) { - return false; - } - } - - $file = $this->_channelFileName($channel); - $ret = true; - if (file_exists($file)) { - $ret = @unlink($file); - } - - return $ret; - } - - /** - * Determine whether a channel exists in the registry - * @param string Channel Alias - * @return boolean - */ - function _isChannelAlias($alias) - { - return file_exists($this->_getChannelAliasFileName($alias)); - } - - /** - * @param string|null - * @param string|null - * @param string|null - * @return array|null - * @access private - */ - function _packageInfo($package = null, $key = null, $channel = 'pear.php.net') - { - if ($package === null) { - if ($channel === null) { - $channels = $this->_listChannels(); - $ret = array(); - foreach ($channels as $channel) { - $channel = strtolower($channel); - $ret[$channel] = array(); - $packages = $this->_listPackages($channel); - foreach ($packages as $package) { - $ret[$channel][] = $this->_packageInfo($package, null, $channel); - } - } - - return $ret; - } - - $ps = $this->_listPackages($channel); - if (!count($ps)) { - return array(); - } - return array_map(array(&$this, '_packageInfo'), - $ps, array_fill(0, count($ps), null), - array_fill(0, count($ps), $channel)); - } - - $fp = $this->_openPackageFile($package, 'r', $channel); - if ($fp === null) { - return null; - } - - $rt = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - clearstatcache(); - $this->_closePackageFile($fp); - $data = file_get_contents($this->_packageFileName($package, $channel)); - set_magic_quotes_runtime($rt); - $data = unserialize($data); - if ($key === null) { - return $data; - } - - // compatibility for package.xml version 2.0 - if (isset($data['old'][$key])) { - return $data['old'][$key]; - } - - if (isset($data[$key])) { - return $data[$key]; - } - - return null; - } - - /** - * @param string Channel name - * @param bool whether to strictly retrieve info of channels, not just aliases - * @return array|null - */ - function _channelInfo($channel, $noaliases = false) - { - if (!$this->_channelExists($channel, $noaliases)) { - return null; - } - - $fp = $this->_openChannelFile($channel, 'r'); - if ($fp === null) { - return null; - } - - $rt = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - clearstatcache(); - $this->_closeChannelFile($fp); - $data = file_get_contents($this->_channelFileName($channel)); - set_magic_quotes_runtime($rt); - $data = unserialize($data); - return $data; - } - - function _listChannels() - { - $channellist = array(); - if (!file_exists($this->channelsdir) || !is_dir($this->channelsdir)) { - return array('pear.php.net', 'pecl.php.net', 'doc.php.net', '__uri'); - } - - $dp = opendir($this->channelsdir); - while ($ent = readdir($dp)) { - if ($ent{0} == '.' || substr($ent, -4) != '.reg') { - continue; - } - - if ($ent == '__uri.reg') { - $channellist[] = '__uri'; - continue; - } - - $channellist[] = str_replace('_', '/', substr($ent, 0, -4)); - } - - closedir($dp); - if (!in_array('pear.php.net', $channellist)) { - $channellist[] = 'pear.php.net'; - } - - if (!in_array('pecl.php.net', $channellist)) { - $channellist[] = 'pecl.php.net'; - } - - if (!in_array('doc.php.net', $channellist)) { - $channellist[] = 'doc.php.net'; - } - - - if (!in_array('__uri', $channellist)) { - $channellist[] = '__uri'; - } - - natsort($channellist); - return $channellist; - } - - function _listPackages($channel = false) - { - if ($channel && $this->_getChannelFromAlias($channel) != 'pear.php.net') { - return $this->_listChannelPackages($channel); - } - - if (!file_exists($this->statedir) || !is_dir($this->statedir)) { - return array(); - } - - $pkglist = array(); - $dp = opendir($this->statedir); - if (!$dp) { - return $pkglist; - } - - while ($ent = readdir($dp)) { - if ($ent{0} == '.' || substr($ent, -4) != '.reg') { - continue; - } - - $pkglist[] = substr($ent, 0, -4); - } - closedir($dp); - return $pkglist; - } - - function _listChannelPackages($channel) - { - $pkglist = array(); - if (!file_exists($this->_channelDirectoryName($channel)) || - !is_dir($this->_channelDirectoryName($channel))) { - return array(); - } - - $dp = opendir($this->_channelDirectoryName($channel)); - if (!$dp) { - return $pkglist; - } - - while ($ent = readdir($dp)) { - if ($ent{0} == '.' || substr($ent, -4) != '.reg') { - continue; - } - $pkglist[] = substr($ent, 0, -4); - } - - closedir($dp); - return $pkglist; - } - - function _listAllPackages() - { - $ret = array(); - foreach ($this->_listChannels() as $channel) { - $ret[$channel] = $this->_listPackages($channel); - } - - return $ret; - } - - /** - * Add an installed package to the registry - * @param string package name - * @param array package info (parsed by PEAR_Common::infoFrom*() methods) - * @return bool success of saving - * @access private - */ - function _addPackage($package, $info) - { - if ($this->_packageExists($package)) { - return false; - } - - $fp = $this->_openPackageFile($package, 'wb'); - if ($fp === null) { - return false; - } - - $info['_lastmodified'] = time(); - fwrite($fp, serialize($info)); - $this->_closePackageFile($fp); - if (isset($info['filelist'])) { - $this->_rebuildFileMap(); - } - - return true; - } - - /** - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @return bool - * @access private - */ - function _addPackage2($info) - { - if (!is_a($info, 'PEAR_PackageFile_v1') && !is_a($info, 'PEAR_PackageFile_v2')) { - return false; - } - - if (!$info->validate()) { - if (class_exists('PEAR_Common')) { - $ui = PEAR_Frontend::singleton(); - if ($ui) { - foreach ($info->getValidationWarnings() as $err) { - $ui->log($err['message'], true); - } - } - } - return false; - } - - $channel = $info->getChannel(); - $package = $info->getPackage(); - $save = $info; - if ($this->_packageExists($package, $channel)) { - return false; - } - - if (!$this->_channelExists($channel, true)) { - return false; - } - - $info = $info->toArray(true); - if (!$info) { - return false; - } - - $fp = $this->_openPackageFile($package, 'wb', $channel); - if ($fp === null) { - return false; - } - - $info['_lastmodified'] = time(); - fwrite($fp, serialize($info)); - $this->_closePackageFile($fp); - $this->_rebuildFileMap(); - return true; - } - - /** - * @param string Package name - * @param array parsed package.xml 1.0 - * @param bool this parameter is only here for BC. Don't use it. - * @access private - */ - function _updatePackage($package, $info, $merge = true) - { - $oldinfo = $this->_packageInfo($package); - if (empty($oldinfo)) { - return false; - } - - $fp = $this->_openPackageFile($package, 'w'); - if ($fp === null) { - return false; - } - - if (is_object($info)) { - $info = $info->toArray(); - } - $info['_lastmodified'] = time(); - - $newinfo = $info; - if ($merge) { - $info = array_merge($oldinfo, $info); - } else { - $diff = $info; - } - - fwrite($fp, serialize($info)); - $this->_closePackageFile($fp); - if (isset($newinfo['filelist'])) { - $this->_rebuildFileMap(); - } - - return true; - } - - /** - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @return bool - * @access private - */ - function _updatePackage2($info) - { - if (!$this->_packageExists($info->getPackage(), $info->getChannel())) { - return false; - } - - $fp = $this->_openPackageFile($info->getPackage(), 'w', $info->getChannel()); - if ($fp === null) { - return false; - } - - $save = $info; - $info = $save->getArray(true); - $info['_lastmodified'] = time(); - fwrite($fp, serialize($info)); - $this->_closePackageFile($fp); - $this->_rebuildFileMap(); - return true; - } - - /** - * @param string Package name - * @param string Channel name - * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2|null - * @access private - */ - function &_getPackage($package, $channel = 'pear.php.net') - { - $info = $this->_packageInfo($package, null, $channel); - if ($info === null) { - return $info; - } - - $a = $this->_config; - if (!$a) { - $this->_config = &new PEAR_Config; - $this->_config->set('php_dir', $this->statedir); - } - - if (!class_exists('PEAR_PackageFile')) { - require_once 'PEAR/PackageFile.php'; - } - - $pkg = &new PEAR_PackageFile($this->_config); - $pf = &$pkg->fromArray($info); - return $pf; - } - - /** - * @param string channel name - * @param bool whether to strictly retrieve channel names - * @return PEAR_ChannelFile|PEAR_Error - * @access private - */ - function &_getChannel($channel, $noaliases = false) - { - $ch = false; - if ($this->_channelExists($channel, $noaliases)) { - $chinfo = $this->_channelInfo($channel, $noaliases); - if ($chinfo) { - if (!class_exists('PEAR_ChannelFile')) { - require_once 'PEAR/ChannelFile.php'; - } - - $ch = &PEAR_ChannelFile::fromArrayWithErrors($chinfo); - } - } - - if ($ch) { - if ($ch->validate()) { - return $ch; - } - - foreach ($ch->getErrors(true) as $err) { - $message = $err['message'] . "\n"; - } - - $ch = PEAR::raiseError($message); - return $ch; - } - - if ($this->_getChannelFromAlias($channel) == 'pear.php.net') { - // the registry is not properly set up, so use defaults - if (!class_exists('PEAR_ChannelFile')) { - require_once 'PEAR/ChannelFile.php'; - } - - $pear_channel = new PEAR_ChannelFile; - $pear_channel->setServer('pear.php.net'); - $pear_channel->setAlias('pear'); - $pear_channel->setSummary('PHP Extension and Application Repository'); - $pear_channel->setDefaultPEARProtocols(); - $pear_channel->setBaseURL('REST1.0', 'http://pear.php.net/rest/'); - $pear_channel->setBaseURL('REST1.1', 'http://pear.php.net/rest/'); - $pear_channel->setBaseURL('REST1.3', 'http://pear.php.net/rest/'); - return $pear_channel; - } - - if ($this->_getChannelFromAlias($channel) == 'pecl.php.net') { - // the registry is not properly set up, so use defaults - if (!class_exists('PEAR_ChannelFile')) { - require_once 'PEAR/ChannelFile.php'; - } - $pear_channel = new PEAR_ChannelFile; - $pear_channel->setServer('pecl.php.net'); - $pear_channel->setAlias('pecl'); - $pear_channel->setSummary('PHP Extension Community Library'); - $pear_channel->setDefaultPEARProtocols(); - $pear_channel->setBaseURL('REST1.0', 'http://pecl.php.net/rest/'); - $pear_channel->setBaseURL('REST1.1', 'http://pecl.php.net/rest/'); - $pear_channel->setValidationPackage('PEAR_Validator_PECL', '1.0'); - return $pear_channel; - } - - if ($this->_getChannelFromAlias($channel) == 'doc.php.net') { - // the registry is not properly set up, so use defaults - if (!class_exists('PEAR_ChannelFile')) { - require_once 'PEAR/ChannelFile.php'; - } - - $doc_channel = new PEAR_ChannelFile; - $doc_channel->setServer('doc.php.net'); - $doc_channel->setAlias('phpdocs'); - $doc_channel->setSummary('PHP Documentation Team'); - $doc_channel->setDefaultPEARProtocols(); - $doc_channel->setBaseURL('REST1.0', 'http://doc.php.net/rest/'); - $doc_channel->setBaseURL('REST1.1', 'http://doc.php.net/rest/'); - $doc_channel->setBaseURL('REST1.3', 'http://doc.php.net/rest/'); - return $doc_channel; - } - - - if ($this->_getChannelFromAlias($channel) == '__uri') { - // the registry is not properly set up, so use defaults - if (!class_exists('PEAR_ChannelFile')) { - require_once 'PEAR/ChannelFile.php'; - } - - $private = new PEAR_ChannelFile; - $private->setName('__uri'); - $private->setDefaultPEARProtocols(); - $private->setBaseURL('REST1.0', '****'); - $private->setSummary('Pseudo-channel for static packages'); - return $private; - } - - return $ch; - } - - /** - * @param string Package name - * @param string Channel name - * @return bool - */ - function packageExists($package, $channel = 'pear.php.net') - { - if (PEAR::isError($e = $this->_lock(LOCK_SH))) { - return $e; - } - $ret = $this->_packageExists($package, $channel); - $this->_unlock(); - return $ret; - } - - // }}} - - // {{{ channelExists() - - /** - * @param string channel name - * @param bool if true, then aliases will be ignored - * @return bool - */ - function channelExists($channel, $noaliases = false) - { - if (PEAR::isError($e = $this->_lock(LOCK_SH))) { - return $e; - } - $ret = $this->_channelExists($channel, $noaliases); - $this->_unlock(); - return $ret; - } - - // }}} - - /** - * @param string channel name mirror is in - * @param string mirror name - * - * @return bool - */ - function mirrorExists($channel, $mirror) - { - if (PEAR::isError($e = $this->_lock(LOCK_SH))) { - return $e; - } - - $ret = $this->_mirrorExists($channel, $mirror); - $this->_unlock(); - return $ret; - } - - // {{{ isAlias() - - /** - * Determines whether the parameter is an alias of a channel - * @param string - * @return bool - */ - function isAlias($alias) - { - if (PEAR::isError($e = $this->_lock(LOCK_SH))) { - return $e; - } - $ret = $this->_isChannelAlias($alias); - $this->_unlock(); - return $ret; - } - - // }}} - // {{{ packageInfo() - - /** - * @param string|null - * @param string|null - * @param string - * @return array|null - */ - function packageInfo($package = null, $key = null, $channel = 'pear.php.net') - { - if (PEAR::isError($e = $this->_lock(LOCK_SH))) { - return $e; - } - $ret = $this->_packageInfo($package, $key, $channel); - $this->_unlock(); - return $ret; - } - - // }}} - // {{{ channelInfo() - - /** - * Retrieve a raw array of channel data. - * - * Do not use this, instead use {@link getChannel()} for normal - * operations. Array structure is undefined in this method - * @param string channel name - * @param bool whether to strictly retrieve information only on non-aliases - * @return array|null|PEAR_Error - */ - function channelInfo($channel = null, $noaliases = false) - { - if (PEAR::isError($e = $this->_lock(LOCK_SH))) { - return $e; - } - $ret = $this->_channelInfo($channel, $noaliases); - $this->_unlock(); - return $ret; - } - - // }}} - - /** - * @param string - */ - function channelName($channel) - { - if (PEAR::isError($e = $this->_lock(LOCK_SH))) { - return $e; - } - $ret = $this->_getChannelFromAlias($channel); - $this->_unlock(); - return $ret; - } - - /** - * @param string - */ - function channelAlias($channel) - { - if (PEAR::isError($e = $this->_lock(LOCK_SH))) { - return $e; - } - $ret = $this->_getAlias($channel); - $this->_unlock(); - return $ret; - } - // {{{ listPackages() - - function listPackages($channel = false) - { - if (PEAR::isError($e = $this->_lock(LOCK_SH))) { - return $e; - } - $ret = $this->_listPackages($channel); - $this->_unlock(); - return $ret; - } - - // }}} - // {{{ listAllPackages() - - function listAllPackages() - { - if (PEAR::isError($e = $this->_lock(LOCK_SH))) { - return $e; - } - $ret = $this->_listAllPackages(); - $this->_unlock(); - return $ret; - } - - // }}} - // {{{ listChannel() - - function listChannels() - { - if (PEAR::isError($e = $this->_lock(LOCK_SH))) { - return $e; - } - $ret = $this->_listChannels(); - $this->_unlock(); - return $ret; - } - - // }}} - // {{{ addPackage() - - /** - * Add an installed package to the registry - * @param string|PEAR_PackageFile_v1|PEAR_PackageFile_v2 package name or object - * that will be passed to {@link addPackage2()} - * @param array package info (parsed by PEAR_Common::infoFrom*() methods) - * @return bool success of saving - */ - function addPackage($package, $info) - { - if (is_object($info)) { - return $this->addPackage2($info); - } - if (PEAR::isError($e = $this->_lock(LOCK_EX))) { - return $e; - } - $ret = $this->_addPackage($package, $info); - $this->_unlock(); - if ($ret) { - if (!class_exists('PEAR_PackageFile_v1')) { - require_once 'PEAR/PackageFile/v1.php'; - } - $pf = new PEAR_PackageFile_v1; - $pf->setConfig($this->_config); - $pf->fromArray($info); - $this->_dependencyDB->uninstallPackage($pf); - $this->_dependencyDB->installPackage($pf); - } - return $ret; - } - - // }}} - // {{{ addPackage2() - - function addPackage2($info) - { - if (!is_object($info)) { - return $this->addPackage($info['package'], $info); - } - if (PEAR::isError($e = $this->_lock(LOCK_EX))) { - return $e; - } - $ret = $this->_addPackage2($info); - $this->_unlock(); - if ($ret) { - $this->_dependencyDB->uninstallPackage($info); - $this->_dependencyDB->installPackage($info); - } - return $ret; - } - - // }}} - // {{{ updateChannel() - - /** - * For future expandibility purposes, separate this - * @param PEAR_ChannelFile - */ - function updateChannel($channel, $lastmodified = null) - { - if ($channel->getName() == '__uri') { - return false; - } - return $this->addChannel($channel, $lastmodified, true); - } - - // }}} - // {{{ deleteChannel() - - /** - * Deletion fails if there are any packages installed from the channel - * @param string|PEAR_ChannelFile channel name - * @return boolean|PEAR_Error True on deletion, false if it doesn't exist - */ - function deleteChannel($channel) - { - if (PEAR::isError($e = $this->_lock(LOCK_EX))) { - return $e; - } - - $ret = $this->_deleteChannel($channel); - $this->_unlock(); - if ($ret && is_a($this->_config, 'PEAR_Config')) { - $this->_config->setChannels($this->listChannels()); - } - - return $ret; - } - - // }}} - // {{{ addChannel() - - /** - * @param PEAR_ChannelFile Channel object - * @param string Last-Modified header from HTTP for caching - * @return boolean|PEAR_Error True on creation, false if it already exists - */ - function addChannel($channel, $lastmodified = false, $update = false) - { - if (!is_a($channel, 'PEAR_ChannelFile') || !$channel->validate()) { - return false; - } - - if (PEAR::isError($e = $this->_lock(LOCK_EX))) { - return $e; - } - - $ret = $this->_addChannel($channel, $update, $lastmodified); - $this->_unlock(); - if (!$update && $ret && is_a($this->_config, 'PEAR_Config')) { - $this->_config->setChannels($this->listChannels()); - } - - return $ret; - } - - // }}} - // {{{ deletePackage() - - function deletePackage($package, $channel = 'pear.php.net') - { - if (PEAR::isError($e = $this->_lock(LOCK_EX))) { - return $e; - } - - $file = $this->_packageFileName($package, $channel); - $ret = file_exists($file) ? @unlink($file) : false; - $this->_rebuildFileMap(); - $this->_unlock(); - $p = array('channel' => $channel, 'package' => $package); - $this->_dependencyDB->uninstallPackage($p); - return $ret; - } - - // }}} - // {{{ updatePackage() - - function updatePackage($package, $info, $merge = true) - { - if (is_object($info)) { - return $this->updatePackage2($info, $merge); - } - if (PEAR::isError($e = $this->_lock(LOCK_EX))) { - return $e; - } - $ret = $this->_updatePackage($package, $info, $merge); - $this->_unlock(); - if ($ret) { - if (!class_exists('PEAR_PackageFile_v1')) { - require_once 'PEAR/PackageFile/v1.php'; - } - $pf = new PEAR_PackageFile_v1; - $pf->setConfig($this->_config); - $pf->fromArray($this->packageInfo($package)); - $this->_dependencyDB->uninstallPackage($pf); - $this->_dependencyDB->installPackage($pf); - } - return $ret; - } - - // }}} - // {{{ updatePackage2() - - function updatePackage2($info) - { - - if (!is_object($info)) { - return $this->updatePackage($info['package'], $info, $merge); - } - - if (!$info->validate(PEAR_VALIDATE_DOWNLOADING)) { - return false; - } - - if (PEAR::isError($e = $this->_lock(LOCK_EX))) { - return $e; - } - - $ret = $this->_updatePackage2($info); - $this->_unlock(); - if ($ret) { - $this->_dependencyDB->uninstallPackage($info); - $this->_dependencyDB->installPackage($info); - } - - return $ret; - } - - // }}} - // {{{ getChannel() - /** - * @param string channel name - * @param bool whether to strictly return raw channels (no aliases) - * @return PEAR_ChannelFile|PEAR_Error - */ - function &getChannel($channel, $noaliases = false) - { - if (PEAR::isError($e = $this->_lock(LOCK_SH))) { - return $e; - } - $ret = &$this->_getChannel($channel, $noaliases); - $this->_unlock(); - if (!$ret) { - return PEAR::raiseError('Unknown channel: ' . $channel); - } - return $ret; - } - - // }}} - // {{{ getPackage() - /** - * @param string package name - * @param string channel name - * @return PEAR_PackageFile_v1|PEAR_PackageFile_v2|null - */ - function &getPackage($package, $channel = 'pear.php.net') - { - if (PEAR::isError($e = $this->_lock(LOCK_SH))) { - return $e; - } - $pf = &$this->_getPackage($package, $channel); - $this->_unlock(); - return $pf; - } - - // }}} - - /** - * Get PEAR_PackageFile_v[1/2] objects representing the contents of - * a dependency group that are installed. - * - * This is used at uninstall-time - * @param array - * @return array|false - */ - function getInstalledGroup($group) - { - $ret = array(); - if (isset($group['package'])) { - if (!isset($group['package'][0])) { - $group['package'] = array($group['package']); - } - foreach ($group['package'] as $package) { - $depchannel = isset($package['channel']) ? $package['channel'] : '__uri'; - $p = &$this->getPackage($package['name'], $depchannel); - if ($p) { - $save = &$p; - $ret[] = &$save; - } - } - } - if (isset($group['subpackage'])) { - if (!isset($group['subpackage'][0])) { - $group['subpackage'] = array($group['subpackage']); - } - foreach ($group['subpackage'] as $package) { - $depchannel = isset($package['channel']) ? $package['channel'] : '__uri'; - $p = &$this->getPackage($package['name'], $depchannel); - if ($p) { - $save = &$p; - $ret[] = &$save; - } - } - } - if (!count($ret)) { - return false; - } - return $ret; - } - - // {{{ getChannelValidator() - /** - * @param string channel name - * @return PEAR_Validate|false - */ - function &getChannelValidator($channel) - { - $chan = $this->getChannel($channel); - if (PEAR::isError($chan)) { - return $chan; - } - $val = $chan->getValidationObject(); - return $val; - } - // }}} - // {{{ getChannels() - /** - * @param string channel name - * @return array an array of PEAR_ChannelFile objects representing every installed channel - */ - function &getChannels() - { - $ret = array(); - if (PEAR::isError($e = $this->_lock(LOCK_SH))) { - return $e; - } - foreach ($this->_listChannels() as $channel) { - $e = &$this->_getChannel($channel); - if (!$e || PEAR::isError($e)) { - continue; - } - $ret[] = $e; - } - $this->_unlock(); - return $ret; - } - - // }}} - // {{{ checkFileMap() - - /** - * Test whether a file or set of files belongs to a package. - * - * If an array is passed in - * @param string|array file path, absolute or relative to the pear - * install dir - * @param string|array name of PEAR package or array('package' => name, 'channel' => - * channel) of a package that will be ignored - * @param string API version - 1.1 will exclude any files belonging to a package - * @param array private recursion variable - * @return array|false which package and channel the file belongs to, or an empty - * string if the file does not belong to an installed package, - * or belongs to the second parameter's package - */ - function checkFileMap($path, $package = false, $api = '1.0', $attrs = false) - { - if (is_array($path)) { - static $notempty; - if (empty($notempty)) { - if (!class_exists('PEAR_Installer_Role')) { - require_once 'PEAR/Installer/Role.php'; - } - $notempty = create_function('$a','return !empty($a);'); - } - $package = is_array($package) ? array(strtolower($package[0]), strtolower($package[1])) - : strtolower($package); - $pkgs = array(); - foreach ($path as $name => $attrs) { - if (is_array($attrs)) { - if (isset($attrs['install-as'])) { - $name = $attrs['install-as']; - } - if (!in_array($attrs['role'], PEAR_Installer_Role::getInstallableRoles())) { - // these are not installed - continue; - } - if (!in_array($attrs['role'], PEAR_Installer_Role::getBaseinstallRoles())) { - $attrs['baseinstalldir'] = is_array($package) ? $package[1] : $package; - } - if (isset($attrs['baseinstalldir'])) { - $name = $attrs['baseinstalldir'] . DIRECTORY_SEPARATOR . $name; - } - } - $pkgs[$name] = $this->checkFileMap($name, $package, $api, $attrs); - if (PEAR::isError($pkgs[$name])) { - return $pkgs[$name]; - } - } - return array_filter($pkgs, $notempty); - } - if (empty($this->filemap_cache)) { - if (PEAR::isError($e = $this->_lock(LOCK_SH))) { - return $e; - } - $err = $this->_readFileMap(); - $this->_unlock(); - if (PEAR::isError($err)) { - return $err; - } - } - if (!$attrs) { - $attrs = array('role' => 'php'); // any old call would be for PHP role only - } - if (isset($this->filemap_cache[$attrs['role']][$path])) { - if ($api >= '1.1' && $this->filemap_cache[$attrs['role']][$path] == $package) { - return false; - } - return $this->filemap_cache[$attrs['role']][$path]; - } - $l = strlen($this->install_dir); - if (substr($path, 0, $l) == $this->install_dir) { - $path = preg_replace('!^'.DIRECTORY_SEPARATOR.'+!', '', substr($path, $l)); - } - if (isset($this->filemap_cache[$attrs['role']][$path])) { - if ($api >= '1.1' && $this->filemap_cache[$attrs['role']][$path] == $package) { - return false; - } - return $this->filemap_cache[$attrs['role']][$path]; - } - return false; - } - - // }}} - // {{{ flush() - /** - * Force a reload of the filemap - * @since 1.5.0RC3 - */ - function flushFileMap() - { - $this->filemap_cache = null; - clearstatcache(); // ensure that the next read gets the full, current filemap - } - - // }}} - // {{{ apiVersion() - /** - * Get the expected API version. Channels API is version 1.1, as it is backwards - * compatible with 1.0 - * @return string - */ - function apiVersion() - { - return '1.1'; - } - // }}} - - - /** - * Parse a package name, or validate a parsed package name array - * @param string|array pass in an array of format - * array( - * 'package' => 'pname', - * ['channel' => 'channame',] - * ['version' => 'version',] - * ['state' => 'state',] - * ['group' => 'groupname']) - * or a string of format - * [channel://][channame/]pname[-version|-state][/group=groupname] - * @return array|PEAR_Error - */ - function parsePackageName($param, $defaultchannel = 'pear.php.net') - { - $saveparam = $param; - if (is_array($param)) { - // convert to string for error messages - $saveparam = $this->parsedPackageNameToString($param); - // process the array - if (!isset($param['package'])) { - return PEAR::raiseError('parsePackageName(): array $param ' . - 'must contain a valid package name in index "param"', - 'package', null, null, $param); - } - if (!isset($param['uri'])) { - if (!isset($param['channel'])) { - $param['channel'] = $defaultchannel; - } - } else { - $param['channel'] = '__uri'; - } - } else { - $components = @parse_url((string) $param); - if (isset($components['scheme'])) { - if ($components['scheme'] == 'http') { - // uri package - $param = array('uri' => $param, 'channel' => '__uri'); - } elseif($components['scheme'] != 'channel') { - return PEAR::raiseError('parsePackageName(): only channel:// uris may ' . - 'be downloaded, not "' . $param . '"', 'invalid', null, null, $param); - } - } - if (!isset($components['path'])) { - return PEAR::raiseError('parsePackageName(): array $param ' . - 'must contain a valid package name in "' . $param . '"', - 'package', null, null, $param); - } - if (isset($components['host'])) { - // remove the leading "/" - $components['path'] = substr($components['path'], 1); - } - if (!isset($components['scheme'])) { - if (strpos($components['path'], '/') !== false) { - if ($components['path']{0} == '/') { - return PEAR::raiseError('parsePackageName(): this is not ' . - 'a package name, it begins with "/" in "' . $param . '"', - 'invalid', null, null, $param); - } - $parts = explode('/', $components['path']); - $components['host'] = array_shift($parts); - if (count($parts) > 1) { - $components['path'] = array_pop($parts); - $components['host'] .= '/' . implode('/', $parts); - } else { - $components['path'] = implode('/', $parts); - } - } else { - $components['host'] = $defaultchannel; - } - } else { - if (strpos($components['path'], '/')) { - $parts = explode('/', $components['path']); - $components['path'] = array_pop($parts); - $components['host'] .= '/' . implode('/', $parts); - } - } - - if (is_array($param)) { - $param['package'] = $components['path']; - } else { - $param = array( - 'package' => $components['path'] - ); - if (isset($components['host'])) { - $param['channel'] = $components['host']; - } - } - if (isset($components['fragment'])) { - $param['group'] = $components['fragment']; - } - if (isset($components['user'])) { - $param['user'] = $components['user']; - } - if (isset($components['pass'])) { - $param['pass'] = $components['pass']; - } - if (isset($components['query'])) { - parse_str($components['query'], $param['opts']); - } - // check for extension - $pathinfo = pathinfo($param['package']); - if (isset($pathinfo['extension']) && - in_array(strtolower($pathinfo['extension']), array('tgz', 'tar'))) { - $param['extension'] = $pathinfo['extension']; - $param['package'] = substr($pathinfo['basename'], 0, - strlen($pathinfo['basename']) - 4); - } - // check for version - if (strpos($param['package'], '-')) { - $test = explode('-', $param['package']); - if (count($test) != 2) { - return PEAR::raiseError('parsePackageName(): only one version/state ' . - 'delimiter "-" is allowed in "' . $saveparam . '"', - 'version', null, null, $param); - } - list($param['package'], $param['version']) = $test; - } - } - // validation - $info = $this->channelExists($param['channel']); - if (PEAR::isError($info)) { - return $info; - } - if (!$info) { - return PEAR::raiseError('unknown channel "' . $param['channel'] . - '" in "' . $saveparam . '"', 'channel', null, null, $param); - } - $chan = $this->getChannel($param['channel']); - if (PEAR::isError($chan)) { - return $chan; - } - if (!$chan) { - return PEAR::raiseError("Exception: corrupt registry, could not " . - "retrieve channel " . $param['channel'] . " information", - 'registry', null, null, $param); - } - $param['channel'] = $chan->getName(); - $validate = $chan->getValidationObject(); - $vpackage = $chan->getValidationPackage(); - // validate package name - if (!$validate->validPackageName($param['package'], $vpackage['_content'])) { - return PEAR::raiseError('parsePackageName(): invalid package name "' . - $param['package'] . '" in "' . $saveparam . '"', - 'package', null, null, $param); - } - if (isset($param['group'])) { - if (!PEAR_Validate::validGroupName($param['group'])) { - return PEAR::raiseError('parsePackageName(): dependency group "' . $param['group'] . - '" is not a valid group name in "' . $saveparam . '"', 'group', null, null, - $param); - } - } - if (isset($param['state'])) { - if (!in_array(strtolower($param['state']), $validate->getValidStates())) { - return PEAR::raiseError('parsePackageName(): state "' . $param['state'] - . '" is not a valid state in "' . $saveparam . '"', - 'state', null, null, $param); - } - } - if (isset($param['version'])) { - if (isset($param['state'])) { - return PEAR::raiseError('parsePackageName(): cannot contain both ' . - 'a version and a stability (state) in "' . $saveparam . '"', - 'version/state', null, null, $param); - } - // check whether version is actually a state - if (in_array(strtolower($param['version']), $validate->getValidStates())) { - $param['state'] = strtolower($param['version']); - unset($param['version']); - } else { - if (!$validate->validVersion($param['version'])) { - return PEAR::raiseError('parsePackageName(): "' . $param['version'] . - '" is neither a valid version nor a valid state in "' . - $saveparam . '"', 'version/state', null, null, $param); - } - } - } - return $param; - } - - /** - * @param array - * @return string - */ - function parsedPackageNameToString($parsed, $brief = false) - { - if (is_string($parsed)) { - return $parsed; - } - if (is_object($parsed)) { - $p = $parsed; - $parsed = array( - 'package' => $p->getPackage(), - 'channel' => $p->getChannel(), - 'version' => $p->getVersion(), - ); - } - if (isset($parsed['uri'])) { - return $parsed['uri']; - } - if ($brief) { - if ($channel = $this->channelAlias($parsed['channel'])) { - return $channel . '/' . $parsed['package']; - } - } - $upass = ''; - if (isset($parsed['user'])) { - $upass = $parsed['user']; - if (isset($parsed['pass'])) { - $upass .= ':' . $parsed['pass']; - } - $upass = "$upass@"; - } - $ret = 'channel://' . $upass . $parsed['channel'] . '/' . $parsed['package']; - if (isset($parsed['version']) || isset($parsed['state'])) { - $ver = isset($parsed['version']) ? $parsed['version'] : ''; - $ver .= isset($parsed['state']) ? $parsed['state'] : ''; - $ret .= '-' . $ver; - } - if (isset($parsed['extension'])) { - $ret .= '.' . $parsed['extension']; - } - if (isset($parsed['opts'])) { - $ret .= '?'; - foreach ($parsed['opts'] as $name => $value) { - $parsed['opts'][$name] = "$name=$value"; - } - $ret .= implode('&', $parsed['opts']); - } - if (isset($parsed['group'])) { - $ret .= '#' . $parsed['group']; - } - return $ret; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/RunTest.php b/_piecrust/libs/PEAR/RunTest.php deleted file mode 100644 index 5182490..0000000 --- a/_piecrust/libs/PEAR/RunTest.php +++ /dev/null @@ -1,968 +0,0 @@ - - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: RunTest.php 313024 2011-07-06 19:51:24Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.3.3 - */ - -/** - * for error handling - */ -require_once 'PEAR.php'; -require_once 'PEAR/Config.php'; - -define('DETAILED', 1); -putenv("PHP_PEAR_RUNTESTS=1"); - -/** - * Simplified version of PHP's test suite - * - * Try it with: - * - * $ php -r 'include "../PEAR/RunTest.php"; $t=new PEAR_RunTest; $o=$t->run("./pear_system.phpt");print_r($o);' - * - * - * @category pear - * @package PEAR - * @author Tomas V.V.Cox - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.3.3 - */ -class PEAR_RunTest -{ - var $_headers = array(); - var $_logger; - var $_options; - var $_php; - var $tests_count; - var $xdebug_loaded; - /** - * Saved value of php executable, used to reset $_php when we - * have a test that uses cgi - * - * @var unknown_type - */ - var $_savephp; - var $ini_overwrites = array( - 'output_handler=', - 'open_basedir=', - 'safe_mode=0', - 'disable_functions=', - 'output_buffering=Off', - 'display_errors=1', - 'log_errors=0', - 'html_errors=0', - 'track_errors=1', - 'report_memleaks=0', - 'report_zend_debug=0', - 'docref_root=', - 'docref_ext=.html', - 'error_prepend_string=', - 'error_append_string=', - 'auto_prepend_file=', - 'auto_append_file=', - 'magic_quotes_runtime=0', - 'xdebug.default_enable=0', - 'allow_url_fopen=1', - ); - - /** - * An object that supports the PEAR_Common->log() signature, or null - * @param PEAR_Common|null - */ - function PEAR_RunTest($logger = null, $options = array()) - { - if (!defined('E_DEPRECATED')) { - define('E_DEPRECATED', 0); - } - if (!defined('E_STRICT')) { - define('E_STRICT', 0); - } - $this->ini_overwrites[] = 'error_reporting=' . (E_ALL & ~(E_DEPRECATED | E_STRICT)); - if (is_null($logger)) { - require_once 'PEAR/Common.php'; - $logger = new PEAR_Common; - } - $this->_logger = $logger; - $this->_options = $options; - - $conf = &PEAR_Config::singleton(); - $this->_php = $conf->get('php_bin'); - } - - /** - * Taken from php-src/run-tests.php - * - * @param string $commandline command name - * @param array $env - * @param string $stdin standard input to pass to the command - * @return unknown - */ - function system_with_timeout($commandline, $env = null, $stdin = null) - { - $data = ''; - if (version_compare(phpversion(), '5.0.0', '<')) { - $proc = proc_open($commandline, array( - 0 => array('pipe', 'r'), - 1 => array('pipe', 'w'), - 2 => array('pipe', 'w') - ), $pipes); - } else { - $proc = proc_open($commandline, array( - 0 => array('pipe', 'r'), - 1 => array('pipe', 'w'), - 2 => array('pipe', 'w') - ), $pipes, null, $env, array('suppress_errors' => true)); - } - - if (!$proc) { - return false; - } - - if (is_string($stdin)) { - fwrite($pipes[0], $stdin); - } - fclose($pipes[0]); - - while (true) { - /* hide errors from interrupted syscalls */ - $r = $pipes; - $e = $w = null; - $n = @stream_select($r, $w, $e, 60); - - if ($n === 0) { - /* timed out */ - $data .= "\n ** ERROR: process timed out **\n"; - proc_terminate($proc); - return array(1234567890, $data); - } else if ($n > 0) { - $line = fread($pipes[1], 8192); - if (strlen($line) == 0) { - /* EOF */ - break; - } - $data .= $line; - } - } - if (function_exists('proc_get_status')) { - $stat = proc_get_status($proc); - if ($stat['signaled']) { - $data .= "\nTermsig=".$stat['stopsig']; - } - } - $code = proc_close($proc); - if (function_exists('proc_get_status')) { - $code = $stat['exitcode']; - } - return array($code, $data); - } - - /** - * Turns a PHP INI string into an array - * - * Turns -d "include_path=/foo/bar" into this: - * array( - * 'include_path' => array( - * 'operator' => '-d', - * 'value' => '/foo/bar', - * ) - * ) - * Works both with quotes and without - * - * @param string an PHP INI string, -d "include_path=/foo/bar" - * @return array - */ - function iniString2array($ini_string) - { - if (!$ini_string) { - return array(); - } - $split = preg_split('/[\s]|=/', $ini_string, -1, PREG_SPLIT_NO_EMPTY); - $key = $split[1][0] == '"' ? substr($split[1], 1) : $split[1]; - $value = $split[2][strlen($split[2]) - 1] == '"' ? substr($split[2], 0, -1) : $split[2]; - // FIXME review if this is really the struct to go with - $array = array($key => array('operator' => $split[0], 'value' => $value)); - return $array; - } - - function settings2array($settings, $ini_settings) - { - foreach ($settings as $setting) { - if (strpos($setting, '=') !== false) { - $setting = explode('=', $setting, 2); - $name = trim(strtolower($setting[0])); - $value = trim($setting[1]); - $ini_settings[$name] = $value; - } - } - return $ini_settings; - } - - function settings2params($ini_settings) - { - $settings = ''; - foreach ($ini_settings as $name => $value) { - if (is_array($value)) { - $operator = $value['operator']; - $value = $value['value']; - } else { - $operator = '-d'; - } - $value = addslashes($value); - $settings .= " $operator \"$name=$value\""; - } - return $settings; - } - - function _preparePhpBin($php, $file, $ini_settings) - { - $file = escapeshellarg($file); - // This was fixed in php 5.3 and is not needed after that - if (OS_WINDOWS && version_compare(PHP_VERSION, '5.3', '<')) { - $cmd = '"'.escapeshellarg($php).' '.$ini_settings.' -f ' . $file .'"'; - } else { - $cmd = $php . $ini_settings . ' -f ' . $file; - } - - return $cmd; - } - - function runPHPUnit($file, $ini_settings = '') - { - if (!file_exists($file) && file_exists(getcwd() . DIRECTORY_SEPARATOR . $file)) { - $file = realpath(getcwd() . DIRECTORY_SEPARATOR . $file); - } elseif (file_exists($file)) { - $file = realpath($file); - } - - $cmd = $this->_preparePhpBin($this->_php, $file, $ini_settings); - if (isset($this->_logger)) { - $this->_logger->log(2, 'Running command "' . $cmd . '"'); - } - - $savedir = getcwd(); // in case the test moves us around - chdir(dirname($file)); - echo `$cmd`; - chdir($savedir); - return 'PASSED'; // we have no way of knowing this information so assume passing - } - - /** - * Runs an individual test case. - * - * @param string The filename of the test - * @param array|string INI settings to be applied to the test run - * @param integer Number what the current running test is of the - * whole test suite being runned. - * - * @return string|object Returns PASSED, WARNED, FAILED depending on how the - * test came out. - * PEAR Error when the tester it self fails - */ - function run($file, $ini_settings = array(), $test_number = 1) - { - if (isset($this->_savephp)) { - $this->_php = $this->_savephp; - unset($this->_savephp); - } - if (empty($this->_options['cgi'])) { - // try to see if php-cgi is in the path - $res = $this->system_with_timeout('php-cgi -v'); - if (false !== $res && !(is_array($res) && in_array($res[0], array(-1, 127)))) { - $this->_options['cgi'] = 'php-cgi'; - } - } - if (1 < $len = strlen($this->tests_count)) { - $test_number = str_pad($test_number, $len, ' ', STR_PAD_LEFT); - $test_nr = "[$test_number/$this->tests_count] "; - } else { - $test_nr = ''; - } - - $file = realpath($file); - $section_text = $this->_readFile($file); - if (PEAR::isError($section_text)) { - return $section_text; - } - - if (isset($section_text['POST_RAW']) && isset($section_text['UPLOAD'])) { - return PEAR::raiseError("Cannot contain both POST_RAW and UPLOAD in test file: $file"); - } - - $cwd = getcwd(); - - $pass_options = ''; - if (!empty($this->_options['ini'])) { - $pass_options = $this->_options['ini']; - } - - if (is_string($ini_settings)) { - $ini_settings = $this->iniString2array($ini_settings); - } - - $ini_settings = $this->settings2array($this->ini_overwrites, $ini_settings); - if ($section_text['INI']) { - if (strpos($section_text['INI'], '{PWD}') !== false) { - $section_text['INI'] = str_replace('{PWD}', dirname($file), $section_text['INI']); - } - $ini = preg_split( "/[\n\r]+/", $section_text['INI']); - $ini_settings = $this->settings2array($ini, $ini_settings); - } - $ini_settings = $this->settings2params($ini_settings); - $shortname = str_replace($cwd . DIRECTORY_SEPARATOR, '', $file); - - $tested = trim($section_text['TEST']); - $tested.= !isset($this->_options['simple']) ? "[$shortname]" : ' '; - - if (!empty($section_text['POST']) || !empty($section_text['POST_RAW']) || - !empty($section_text['UPLOAD']) || !empty($section_text['GET']) || - !empty($section_text['COOKIE']) || !empty($section_text['EXPECTHEADERS'])) { - if (empty($this->_options['cgi'])) { - if (!isset($this->_options['quiet'])) { - $this->_logger->log(0, "SKIP $test_nr$tested (reason: --cgi option needed for this test, type 'pear help run-tests')"); - } - if (isset($this->_options['tapoutput'])) { - return array('ok', ' # skip --cgi option needed for this test, "pear help run-tests" for info'); - } - return 'SKIPPED'; - } - $this->_savephp = $this->_php; - $this->_php = $this->_options['cgi']; - } - - $temp_dir = realpath(dirname($file)); - $main_file_name = basename($file, 'phpt'); - $diff_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'diff'; - $log_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'log'; - $exp_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'exp'; - $output_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'out'; - $memcheck_filename = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'mem'; - $temp_file = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'php'; - $temp_skipif = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'skip.php'; - $temp_clean = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name.'clean.php'; - $tmp_post = $temp_dir . DIRECTORY_SEPARATOR . uniqid('phpt.'); - - // unlink old test results - $this->_cleanupOldFiles($file); - - // Check if test should be skipped. - $res = $this->_runSkipIf($section_text, $temp_skipif, $tested, $ini_settings); - if (count($res) != 2) { - return $res; - } - $info = $res['info']; - $warn = $res['warn']; - - // We've satisfied the preconditions - run the test! - if (isset($this->_options['coverage']) && $this->xdebug_loaded) { - $xdebug_file = $temp_dir . DIRECTORY_SEPARATOR . $main_file_name . 'xdebug'; - $text = "\n" . 'function coverage_shutdown() {' . - "\n" . ' $xdebug = var_export(xdebug_get_code_coverage(), true);'; - if (!function_exists('file_put_contents')) { - $text .= "\n" . ' $fh = fopen(\'' . $xdebug_file . '\', "wb");' . - "\n" . ' if ($fh !== false) {' . - "\n" . ' fwrite($fh, $xdebug);' . - "\n" . ' fclose($fh);' . - "\n" . ' }'; - } else { - $text .= "\n" . ' file_put_contents(\'' . $xdebug_file . '\', $xdebug);'; - } - - // Workaround for http://pear.php.net/bugs/bug.php?id=17292 - $lines = explode("\n", $section_text['FILE']); - $numLines = count($lines); - $namespace = ''; - $coverage_shutdown = 'coverage_shutdown'; - - if ( - substr($lines[0], 0, 2) == 'save_text($temp_file, "save_text($temp_file, $section_text['FILE']); - } - - $args = $section_text['ARGS'] ? ' -- '.$section_text['ARGS'] : ''; - $cmd = $this->_preparePhpBin($this->_php, $temp_file, $ini_settings); - $cmd.= "$args 2>&1"; - if (isset($this->_logger)) { - $this->_logger->log(2, 'Running command "' . $cmd . '"'); - } - - // Reset environment from any previous test. - $env = $this->_resetEnv($section_text, $temp_file); - - $section_text = $this->_processUpload($section_text, $file); - if (PEAR::isError($section_text)) { - return $section_text; - } - - if (array_key_exists('POST_RAW', $section_text) && !empty($section_text['POST_RAW'])) { - $post = trim($section_text['POST_RAW']); - $raw_lines = explode("\n", $post); - - $request = ''; - $started = false; - foreach ($raw_lines as $i => $line) { - if (empty($env['CONTENT_TYPE']) && - preg_match('/^Content-Type:(.*)/i', $line, $res)) { - $env['CONTENT_TYPE'] = trim(str_replace("\r", '', $res[1])); - continue; - } - if ($started) { - $request .= "\n"; - } - $started = true; - $request .= $line; - } - - $env['CONTENT_LENGTH'] = strlen($request); - $env['REQUEST_METHOD'] = 'POST'; - - $this->save_text($tmp_post, $request); - $cmd = "$this->_php$pass_options$ini_settings \"$temp_file\" 2>&1 < $tmp_post"; - } elseif (array_key_exists('POST', $section_text) && !empty($section_text['POST'])) { - $post = trim($section_text['POST']); - $this->save_text($tmp_post, $post); - $content_length = strlen($post); - - $env['REQUEST_METHOD'] = 'POST'; - $env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'; - $env['CONTENT_LENGTH'] = $content_length; - - $cmd = "$this->_php$pass_options$ini_settings \"$temp_file\" 2>&1 < $tmp_post"; - } else { - $env['REQUEST_METHOD'] = 'GET'; - $env['CONTENT_TYPE'] = ''; - $env['CONTENT_LENGTH'] = ''; - } - - if (OS_WINDOWS && isset($section_text['RETURNS'])) { - ob_start(); - system($cmd, $return_value); - $out = ob_get_contents(); - ob_end_clean(); - $section_text['RETURNS'] = (int) trim($section_text['RETURNS']); - $returnfail = ($return_value != $section_text['RETURNS']); - } else { - $returnfail = false; - $stdin = isset($section_text['STDIN']) ? $section_text['STDIN'] : null; - $out = $this->system_with_timeout($cmd, $env, $stdin); - $return_value = $out[0]; - $out = $out[1]; - } - - $output = preg_replace('/\r\n/', "\n", trim($out)); - - if (isset($tmp_post) && realpath($tmp_post) && file_exists($tmp_post)) { - @unlink(realpath($tmp_post)); - } - chdir($cwd); // in case the test moves us around - - $this->_testCleanup($section_text, $temp_clean); - - /* when using CGI, strip the headers from the output */ - $output = $this->_stripHeadersCGI($output); - - if (isset($section_text['EXPECTHEADERS'])) { - $testheaders = $this->_processHeaders($section_text['EXPECTHEADERS']); - $missing = array_diff_assoc($testheaders, $this->_headers); - $changed = ''; - foreach ($missing as $header => $value) { - if (isset($this->_headers[$header])) { - $changed .= "-$header: $value\n+$header: "; - $changed .= $this->_headers[$header]; - } else { - $changed .= "-$header: $value\n"; - } - } - if ($missing) { - // tack on failed headers to output: - $output .= "\n====EXPECTHEADERS FAILURE====:\n$changed"; - } - } - // Does the output match what is expected? - do { - if (isset($section_text['EXPECTF']) || isset($section_text['EXPECTREGEX'])) { - if (isset($section_text['EXPECTF'])) { - $wanted = trim($section_text['EXPECTF']); - } else { - $wanted = trim($section_text['EXPECTREGEX']); - } - $wanted_re = preg_replace('/\r\n/', "\n", $wanted); - if (isset($section_text['EXPECTF'])) { - $wanted_re = preg_quote($wanted_re, '/'); - // Stick to basics - $wanted_re = str_replace("%s", ".+?", $wanted_re); //not greedy - $wanted_re = str_replace("%i", "[+\-]?[0-9]+", $wanted_re); - $wanted_re = str_replace("%d", "[0-9]+", $wanted_re); - $wanted_re = str_replace("%x", "[0-9a-fA-F]+", $wanted_re); - $wanted_re = str_replace("%f", "[+\-]?\.?[0-9]+\.?[0-9]*(E-?[0-9]+)?", $wanted_re); - $wanted_re = str_replace("%c", ".", $wanted_re); - // %f allows two points "-.0.0" but that is the best *simple* expression - } - - /* DEBUG YOUR REGEX HERE - var_dump($wanted_re); - print(str_repeat('=', 80) . "\n"); - var_dump($output); - */ - if (!$returnfail && preg_match("/^$wanted_re\$/s", $output)) { - if (file_exists($temp_file)) { - unlink($temp_file); - } - if (array_key_exists('FAIL', $section_text)) { - break; - } - if (!isset($this->_options['quiet'])) { - $this->_logger->log(0, "PASS $test_nr$tested$info"); - } - if (isset($this->_options['tapoutput'])) { - return array('ok', ' - ' . $tested); - } - return 'PASSED'; - } - } else { - if (isset($section_text['EXPECTFILE'])) { - $f = $temp_dir . '/' . trim($section_text['EXPECTFILE']); - if (!($fp = @fopen($f, 'rb'))) { - return PEAR::raiseError('--EXPECTFILE-- section file ' . - $f . ' not found'); - } - fclose($fp); - $section_text['EXPECT'] = file_get_contents($f); - } - - if (isset($section_text['EXPECT'])) { - $wanted = preg_replace('/\r\n/', "\n", trim($section_text['EXPECT'])); - } else { - $wanted = ''; - } - - // compare and leave on success - if (!$returnfail && 0 == strcmp($output, $wanted)) { - if (file_exists($temp_file)) { - unlink($temp_file); - } - if (array_key_exists('FAIL', $section_text)) { - break; - } - if (!isset($this->_options['quiet'])) { - $this->_logger->log(0, "PASS $test_nr$tested$info"); - } - if (isset($this->_options['tapoutput'])) { - return array('ok', ' - ' . $tested); - } - return 'PASSED'; - } - } - } while (false); - - if (array_key_exists('FAIL', $section_text)) { - // we expect a particular failure - // this is only used for testing PEAR_RunTest - $expectf = isset($section_text['EXPECTF']) ? $wanted_re : null; - $faildiff = $this->generate_diff($wanted, $output, null, $expectf); - $faildiff = preg_replace('/\r/', '', $faildiff); - $wanted = preg_replace('/\r/', '', trim($section_text['FAIL'])); - if ($faildiff == $wanted) { - if (!isset($this->_options['quiet'])) { - $this->_logger->log(0, "PASS $test_nr$tested$info"); - } - if (isset($this->_options['tapoutput'])) { - return array('ok', ' - ' . $tested); - } - return 'PASSED'; - } - unset($section_text['EXPECTF']); - $output = $faildiff; - if (isset($section_text['RETURNS'])) { - return PEAR::raiseError('Cannot have both RETURNS and FAIL in the same test: ' . - $file); - } - } - - // Test failed so we need to report details. - $txt = $warn ? 'WARN ' : 'FAIL '; - $this->_logger->log(0, $txt . $test_nr . $tested . $info); - - // write .exp - $res = $this->_writeLog($exp_filename, $wanted); - if (PEAR::isError($res)) { - return $res; - } - - // write .out - $res = $this->_writeLog($output_filename, $output); - if (PEAR::isError($res)) { - return $res; - } - - // write .diff - $returns = isset($section_text['RETURNS']) ? - array(trim($section_text['RETURNS']), $return_value) : null; - $expectf = isset($section_text['EXPECTF']) ? $wanted_re : null; - $data = $this->generate_diff($wanted, $output, $returns, $expectf); - $res = $this->_writeLog($diff_filename, $data); - if (PEAR::isError($res)) { - return $res; - } - - // write .log - $data = " ----- EXPECTED OUTPUT -$wanted ----- ACTUAL OUTPUT -$output ----- FAILED -"; - - if ($returnfail) { - $data .= " ----- EXPECTED RETURN -$section_text[RETURNS] ----- ACTUAL RETURN -$return_value -"; - } - - $res = $this->_writeLog($log_filename, $data); - if (PEAR::isError($res)) { - return $res; - } - - if (isset($this->_options['tapoutput'])) { - $wanted = explode("\n", $wanted); - $wanted = "# Expected output:\n#\n#" . implode("\n#", $wanted); - $output = explode("\n", $output); - $output = "#\n#\n# Actual output:\n#\n#" . implode("\n#", $output); - return array($wanted . $output . 'not ok', ' - ' . $tested); - } - return $warn ? 'WARNED' : 'FAILED'; - } - - function generate_diff($wanted, $output, $rvalue, $wanted_re) - { - $w = explode("\n", $wanted); - $o = explode("\n", $output); - $wr = explode("\n", $wanted_re); - $w1 = array_diff_assoc($w, $o); - $o1 = array_diff_assoc($o, $w); - $o2 = $w2 = array(); - foreach ($w1 as $idx => $val) { - if (!$wanted_re || !isset($wr[$idx]) || !isset($o1[$idx]) || - !preg_match('/^' . $wr[$idx] . '\\z/', $o1[$idx])) { - $w2[sprintf("%03d<", $idx)] = sprintf("%03d- ", $idx + 1) . $val; - } - } - foreach ($o1 as $idx => $val) { - if (!$wanted_re || !isset($wr[$idx]) || - !preg_match('/^' . $wr[$idx] . '\\z/', $val)) { - $o2[sprintf("%03d>", $idx)] = sprintf("%03d+ ", $idx + 1) . $val; - } - } - $diff = array_merge($w2, $o2); - ksort($diff); - $extra = $rvalue ? "##EXPECTED: $rvalue[0]\r\n##RETURNED: $rvalue[1]" : ''; - return implode("\r\n", $diff) . $extra; - } - - // Write the given text to a temporary file, and return the filename. - function save_text($filename, $text) - { - if (!$fp = fopen($filename, 'w')) { - return PEAR::raiseError("Cannot open file '" . $filename . "' (save_text)"); - } - fwrite($fp, $text); - fclose($fp); - if (1 < DETAILED) echo " -FILE $filename {{{ -$text -}}} -"; - } - - function _cleanupOldFiles($file) - { - $temp_dir = realpath(dirname($file)); - $mainFileName = basename($file, 'phpt'); - $diff_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'diff'; - $log_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'log'; - $exp_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'exp'; - $output_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'out'; - $memcheck_filename = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'mem'; - $temp_file = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'php'; - $temp_skipif = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'skip.php'; - $temp_clean = $temp_dir . DIRECTORY_SEPARATOR . $mainFileName.'clean.php'; - $tmp_post = $temp_dir . DIRECTORY_SEPARATOR . uniqid('phpt.'); - - // unlink old test results - @unlink($diff_filename); - @unlink($log_filename); - @unlink($exp_filename); - @unlink($output_filename); - @unlink($memcheck_filename); - @unlink($temp_file); - @unlink($temp_skipif); - @unlink($tmp_post); - @unlink($temp_clean); - } - - function _runSkipIf($section_text, $temp_skipif, $tested, $ini_settings) - { - $info = ''; - $warn = false; - if (array_key_exists('SKIPIF', $section_text) && trim($section_text['SKIPIF'])) { - $this->save_text($temp_skipif, $section_text['SKIPIF']); - $output = $this->system_with_timeout("$this->_php$ini_settings -f \"$temp_skipif\""); - $output = $output[1]; - $loutput = ltrim($output); - unlink($temp_skipif); - if (!strncasecmp('skip', $loutput, 4)) { - $skipreason = "SKIP $tested"; - if (preg_match('/^\s*skip\s*(.+)\s*/i', $output, $m)) { - $skipreason .= '(reason: ' . $m[1] . ')'; - } - if (!isset($this->_options['quiet'])) { - $this->_logger->log(0, $skipreason); - } - if (isset($this->_options['tapoutput'])) { - return array('ok', ' # skip ' . $reason); - } - return 'SKIPPED'; - } - - if (!strncasecmp('info', $loutput, 4) - && preg_match('/^\s*info\s*(.+)\s*/i', $output, $m)) { - $info = " (info: $m[1])"; - } - - if (!strncasecmp('warn', $loutput, 4) - && preg_match('/^\s*warn\s*(.+)\s*/i', $output, $m)) { - $warn = true; /* only if there is a reason */ - $info = " (warn: $m[1])"; - } - } - - return array('warn' => $warn, 'info' => $info); - } - - function _stripHeadersCGI($output) - { - $this->headers = array(); - if (!empty($this->_options['cgi']) && - $this->_php == $this->_options['cgi'] && - preg_match("/^(.*?)(?:\n\n(.*)|\\z)/s", $output, $match)) { - $output = isset($match[2]) ? trim($match[2]) : ''; - $this->_headers = $this->_processHeaders($match[1]); - } - - return $output; - } - - /** - * Return an array that can be used with array_diff() to compare headers - * - * @param string $text - */ - function _processHeaders($text) - { - $headers = array(); - $rh = preg_split("/[\n\r]+/", $text); - foreach ($rh as $line) { - if (strpos($line, ':')!== false) { - $line = explode(':', $line, 2); - $headers[trim($line[0])] = trim($line[1]); - } - } - return $headers; - } - - function _readFile($file) - { - // Load the sections of the test file. - $section_text = array( - 'TEST' => '(unnamed test)', - 'SKIPIF' => '', - 'GET' => '', - 'COOKIE' => '', - 'POST' => '', - 'ARGS' => '', - 'INI' => '', - 'CLEAN' => '', - ); - - if (!is_file($file) || !$fp = fopen($file, "r")) { - return PEAR::raiseError("Cannot open test file: $file"); - } - - $section = ''; - while (!feof($fp)) { - $line = fgets($fp); - - // Match the beginning of a section. - if (preg_match('/^--([_A-Z]+)--/', $line, $r)) { - $section = $r[1]; - $section_text[$section] = ''; - continue; - } elseif (empty($section)) { - fclose($fp); - return PEAR::raiseError("Invalid sections formats in test file: $file"); - } - - // Add to the section text. - $section_text[$section] .= $line; - } - fclose($fp); - - return $section_text; - } - - function _writeLog($logname, $data) - { - if (!$log = fopen($logname, 'w')) { - return PEAR::raiseError("Cannot create test log - $logname"); - } - fwrite($log, $data); - fclose($log); - } - - function _resetEnv($section_text, $temp_file) - { - $env = $_ENV; - $env['REDIRECT_STATUS'] = ''; - $env['QUERY_STRING'] = ''; - $env['PATH_TRANSLATED'] = ''; - $env['SCRIPT_FILENAME'] = ''; - $env['REQUEST_METHOD'] = ''; - $env['CONTENT_TYPE'] = ''; - $env['CONTENT_LENGTH'] = ''; - if (!empty($section_text['ENV'])) { - if (strpos($section_text['ENV'], '{PWD}') !== false) { - $section_text['ENV'] = str_replace('{PWD}', dirname($temp_file), $section_text['ENV']); - } - foreach (explode("\n", trim($section_text['ENV'])) as $e) { - $e = explode('=', trim($e), 2); - if (!empty($e[0]) && isset($e[1])) { - $env[$e[0]] = $e[1]; - } - } - } - if (array_key_exists('GET', $section_text)) { - $env['QUERY_STRING'] = trim($section_text['GET']); - } else { - $env['QUERY_STRING'] = ''; - } - if (array_key_exists('COOKIE', $section_text)) { - $env['HTTP_COOKIE'] = trim($section_text['COOKIE']); - } else { - $env['HTTP_COOKIE'] = ''; - } - $env['REDIRECT_STATUS'] = '1'; - $env['PATH_TRANSLATED'] = $temp_file; - $env['SCRIPT_FILENAME'] = $temp_file; - - return $env; - } - - function _processUpload($section_text, $file) - { - if (array_key_exists('UPLOAD', $section_text) && !empty($section_text['UPLOAD'])) { - $upload_files = trim($section_text['UPLOAD']); - $upload_files = explode("\n", $upload_files); - - $request = "Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737\n" . - "-----------------------------20896060251896012921717172737\n"; - foreach ($upload_files as $fileinfo) { - $fileinfo = explode('=', $fileinfo); - if (count($fileinfo) != 2) { - return PEAR::raiseError("Invalid UPLOAD section in test file: $file"); - } - if (!realpath(dirname($file) . '/' . $fileinfo[1])) { - return PEAR::raiseError("File for upload does not exist: $fileinfo[1] " . - "in test file: $file"); - } - $file_contents = file_get_contents(dirname($file) . '/' . $fileinfo[1]); - $fileinfo[1] = basename($fileinfo[1]); - $request .= "Content-Disposition: form-data; name=\"$fileinfo[0]\"; filename=\"$fileinfo[1]\"\n"; - $request .= "Content-Type: text/plain\n\n"; - $request .= $file_contents . "\n" . - "-----------------------------20896060251896012921717172737\n"; - } - - if (array_key_exists('POST', $section_text) && !empty($section_text['POST'])) { - // encode POST raw - $post = trim($section_text['POST']); - $post = explode('&', $post); - foreach ($post as $i => $post_info) { - $post_info = explode('=', $post_info); - if (count($post_info) != 2) { - return PEAR::raiseError("Invalid POST data in test file: $file"); - } - $post_info[0] = rawurldecode($post_info[0]); - $post_info[1] = rawurldecode($post_info[1]); - $post[$i] = $post_info; - } - foreach ($post as $post_info) { - $request .= "Content-Disposition: form-data; name=\"$post_info[0]\"\n\n"; - $request .= $post_info[1] . "\n" . - "-----------------------------20896060251896012921717172737\n"; - } - unset($section_text['POST']); - } - $section_text['POST_RAW'] = $request; - } - - return $section_text; - } - - function _testCleanup($section_text, $temp_clean) - { - if ($section_text['CLEAN']) { - // perform test cleanup - $this->save_text($temp_clean, $section_text['CLEAN']); - $output = $this->system_with_timeout("$this->_php $temp_clean 2>&1"); - if (strlen($output[1])) { - echo "BORKED --CLEAN-- section! output:\n", $output[1]; - } - if (file_exists($temp_clean)) { - unlink($temp_clean); - } - } - } -} diff --git a/_piecrust/libs/PEAR/Task/Common.php b/_piecrust/libs/PEAR/Task/Common.php deleted file mode 100644 index 5b99c2e..0000000 --- a/_piecrust/libs/PEAR/Task/Common.php +++ /dev/null @@ -1,202 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Common.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ -/**#@+ - * Error codes for task validation routines - */ -define('PEAR_TASK_ERROR_NOATTRIBS', 1); -define('PEAR_TASK_ERROR_MISSING_ATTRIB', 2); -define('PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE', 3); -define('PEAR_TASK_ERROR_INVALID', 4); -/**#@-*/ -define('PEAR_TASK_PACKAGE', 1); -define('PEAR_TASK_INSTALL', 2); -define('PEAR_TASK_PACKAGEANDINSTALL', 3); -/** - * A task is an operation that manipulates the contents of a file. - * - * Simple tasks operate on 1 file. Multiple tasks are executed after all files have been - * processed and installed, and are designed to operate on all files containing the task. - * The Post-install script task simply takes advantage of the fact that it will be run - * after installation, replace is a simple task. - * - * Combining tasks is possible, but ordering is significant. - * - * - * - * - * - * - * This will first replace any instance of @data-dir@ in the test.php file - * with the path to the current data directory. Then, it will include the - * test.php file and run the script it contains to configure the package post-installation. - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - * @abstract - */ -class PEAR_Task_Common -{ - /** - * Valid types for this version are 'simple' and 'multiple' - * - * - simple tasks operate on the contents of a file and write out changes to disk - * - multiple tasks operate on the contents of many files and write out the - * changes directly to disk - * - * Child task classes must override this property. - * @access protected - */ - var $type = 'simple'; - /** - * Determines which install phase this task is executed under - */ - var $phase = PEAR_TASK_INSTALL; - /** - * @access protected - */ - var $config; - /** - * @access protected - */ - var $registry; - /** - * @access protected - */ - var $logger; - /** - * @access protected - */ - var $installphase; - /** - * @param PEAR_Config - * @param PEAR_Common - */ - function PEAR_Task_Common(&$config, &$logger, $phase) - { - $this->config = &$config; - $this->registry = &$config->getRegistry(); - $this->logger = &$logger; - $this->installphase = $phase; - if ($this->type == 'multiple') { - $GLOBALS['_PEAR_TASK_POSTINSTANCES'][get_class($this)][] = &$this; - } - } - - /** - * Validate the basic contents of a task tag. - * @param PEAR_PackageFile_v2 - * @param array - * @param PEAR_Config - * @param array the entire parsed tag - * @return true|array On error, return an array in format: - * array(PEAR_TASK_ERROR_???[, param1][, param2][, ...]) - * - * For PEAR_TASK_ERROR_MISSING_ATTRIB, pass the attribute name in - * For PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, pass the attribute name and an array - * of legal values in - * @static - * @abstract - */ - function validateXml($pkg, $xml, $config, $fileXml) - { - } - - /** - * Initialize a task instance with the parameters - * @param array raw, parsed xml - * @param array attributes from the tag containing this task - * @param string|null last installed version of this package - * @abstract - */ - function init($xml, $fileAttributes, $lastVersion) - { - } - - /** - * Begin a task processing session. All multiple tasks will be processed after each file - * has been successfully installed, all simple tasks should perform their task here and - * return any errors using the custom throwError() method to allow forward compatibility - * - * This method MUST NOT write out any changes to disk - * @param PEAR_PackageFile_v2 - * @param string file contents - * @param string the eventual final file location (informational only) - * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail - * (use $this->throwError), otherwise return the new contents - * @abstract - */ - function startSession($pkg, $contents, $dest) - { - } - - /** - * This method is used to process each of the tasks for a particular multiple class - * type. Simple tasks need not implement this method. - * @param array an array of tasks - * @access protected - * @static - * @abstract - */ - function run($tasks) - { - } - - /** - * @static - * @final - */ - function hasPostinstallTasks() - { - return isset($GLOBALS['_PEAR_TASK_POSTINSTANCES']); - } - - /** - * @static - * @final - */ - function runPostinstallTasks() - { - foreach ($GLOBALS['_PEAR_TASK_POSTINSTANCES'] as $class => $tasks) { - $err = call_user_func(array($class, 'run'), - $GLOBALS['_PEAR_TASK_POSTINSTANCES'][$class]); - if ($err) { - return PEAR_Task_Common::throwError($err); - } - } - unset($GLOBALS['_PEAR_TASK_POSTINSTANCES']); - } - - /** - * Determines whether a role is a script - * @return bool - */ - function isScript() - { - return $this->type == 'script'; - } - - function throwError($msg, $code = -1) - { - include_once 'PEAR.php'; - return PEAR::raiseError($msg, $code); - } -} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Task/Postinstallscript.php b/_piecrust/libs/PEAR/Task/Postinstallscript.php deleted file mode 100644 index e43ecca..0000000 --- a/_piecrust/libs/PEAR/Task/Postinstallscript.php +++ /dev/null @@ -1,323 +0,0 @@ - - * - * PHP versions 4 and 5 - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Postinstallscript.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ -/** - * Base class - */ -require_once 'PEAR/Task/Common.php'; -/** - * Implements the postinstallscript file task. - * - * Note that post-install scripts are handled separately from installation, by the - * "pear run-scripts" command - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Task_Postinstallscript extends PEAR_Task_Common -{ - var $type = 'script'; - var $_class; - var $_params; - var $_obj; - /** - * - * @var PEAR_PackageFile_v2 - */ - var $_pkg; - var $_contents; - var $phase = PEAR_TASK_INSTALL; - - /** - * Validate the raw xml at parsing-time. - * - * This also attempts to validate the script to make sure it meets the criteria - * for a post-install script - * @param PEAR_PackageFile_v2 - * @param array The XML contents of the tag - * @param PEAR_Config - * @param array the entire parsed tag - * @static - */ - function validateXml($pkg, $xml, $config, $fileXml) - { - if ($fileXml['role'] != 'php') { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" must be role="php"'); - } - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $file = $pkg->getFileContents($fileXml['name']); - if (PEAR::isError($file)) { - PEAR::popErrorHandling(); - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" is not valid: ' . - $file->getMessage()); - } elseif ($file === null) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" could not be retrieved for processing!'); - } else { - $analysis = $pkg->analyzeSourceCode($file, true); - if (!$analysis) { - PEAR::popErrorHandling(); - $warnings = ''; - foreach ($pkg->getValidationWarnings() as $warn) { - $warnings .= $warn['message'] . "\n"; - } - return array(PEAR_TASK_ERROR_INVALID, 'Analysis of post-install script "' . - $fileXml['name'] . '" failed: ' . $warnings); - } - if (count($analysis['declared_classes']) != 1) { - PEAR::popErrorHandling(); - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" must declare exactly 1 class'); - } - $class = $analysis['declared_classes'][0]; - if ($class != str_replace(array('/', '.php'), array('_', ''), - $fileXml['name']) . '_postinstall') { - PEAR::popErrorHandling(); - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" class "' . $class . '" must be named "' . - str_replace(array('/', '.php'), array('_', ''), - $fileXml['name']) . '_postinstall"'); - } - if (!isset($analysis['declared_methods'][$class])) { - PEAR::popErrorHandling(); - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" must declare methods init() and run()'); - } - $methods = array('init' => 0, 'run' => 1); - foreach ($analysis['declared_methods'][$class] as $method) { - if (isset($methods[$method])) { - unset($methods[$method]); - } - } - if (count($methods)) { - PEAR::popErrorHandling(); - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" must declare methods init() and run()'); - } - } - PEAR::popErrorHandling(); - $definedparams = array(); - $tasksNamespace = $pkg->getTasksNs() . ':'; - if (!isset($xml[$tasksNamespace . 'paramgroup']) && isset($xml['paramgroup'])) { - // in order to support the older betas, which did not expect internal tags - // to also use the namespace - $tasksNamespace = ''; - } - if (isset($xml[$tasksNamespace . 'paramgroup'])) { - $params = $xml[$tasksNamespace . 'paramgroup']; - if (!is_array($params) || !isset($params[0])) { - $params = array($params); - } - foreach ($params as $param) { - if (!isset($param[$tasksNamespace . 'id'])) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" must have ' . - 'an ' . $tasksNamespace . 'id> tag'); - } - if (isset($param[$tasksNamespace . 'name'])) { - if (!in_array($param[$tasksNamespace . 'name'], $definedparams)) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" ' . $tasksNamespace . - 'paramgroup> id "' . $param[$tasksNamespace . 'id'] . - '" parameter "' . $param[$tasksNamespace . 'name'] . - '" has not been previously defined'); - } - if (!isset($param[$tasksNamespace . 'conditiontype'])) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" ' . $tasksNamespace . - 'paramgroup> id "' . $param[$tasksNamespace . 'id'] . - '" must have a ' . $tasksNamespace . - 'conditiontype> tag containing either "=", ' . - '"!=", or "preg_match"'); - } - if (!in_array($param[$tasksNamespace . 'conditiontype'], - array('=', '!=', 'preg_match'))) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" ' . $tasksNamespace . - 'paramgroup> id "' . $param[$tasksNamespace . 'id'] . - '" must have a ' . $tasksNamespace . - 'conditiontype> tag containing either "=", ' . - '"!=", or "preg_match"'); - } - if (!isset($param[$tasksNamespace . 'value'])) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" ' . $tasksNamespace . - 'paramgroup> id "' . $param[$tasksNamespace . 'id'] . - '" must have a ' . $tasksNamespace . - 'value> tag containing expected parameter value'); - } - } - if (isset($param[$tasksNamespace . 'instructions'])) { - if (!is_string($param[$tasksNamespace . 'instructions'])) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" ' . $tasksNamespace . - 'paramgroup> id "' . $param[$tasksNamespace . 'id'] . - '" ' . $tasksNamespace . 'instructions> must be simple text'); - } - } - if (!isset($param[$tasksNamespace . 'param'])) { - continue; // is no longer required - } - $subparams = $param[$tasksNamespace . 'param']; - if (!is_array($subparams) || !isset($subparams[0])) { - $subparams = array($subparams); - } - foreach ($subparams as $subparam) { - if (!isset($subparam[$tasksNamespace . 'name'])) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" parameter for ' . - $tasksNamespace . 'paramgroup> id "' . - $param[$tasksNamespace . 'id'] . '" must have ' . - 'a ' . $tasksNamespace . 'name> tag'); - } - if (!preg_match('/[a-zA-Z0-9]+/', - $subparam[$tasksNamespace . 'name'])) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" parameter "' . - $subparam[$tasksNamespace . 'name'] . - '" for ' . $tasksNamespace . 'paramgroup> id "' . - $param[$tasksNamespace . 'id'] . - '" is not a valid name. Must contain only alphanumeric characters'); - } - if (!isset($subparam[$tasksNamespace . 'prompt'])) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" parameter "' . - $subparam[$tasksNamespace . 'name'] . - '" for ' . $tasksNamespace . 'paramgroup> id "' . - $param[$tasksNamespace . 'id'] . - '" must have a ' . $tasksNamespace . 'prompt> tag'); - } - if (!isset($subparam[$tasksNamespace . 'type'])) { - return array(PEAR_TASK_ERROR_INVALID, 'Post-install script "' . - $fileXml['name'] . '" parameter "' . - $subparam[$tasksNamespace . 'name'] . - '" for ' . $tasksNamespace . 'paramgroup> id "' . - $param[$tasksNamespace . 'id'] . - '" must have a ' . $tasksNamespace . 'type> tag'); - } - $definedparams[] = $param[$tasksNamespace . 'id'] . '::' . - $subparam[$tasksNamespace . 'name']; - } - } - } - return true; - } - - /** - * Initialize a task instance with the parameters - * @param array raw, parsed xml - * @param array attributes from the tag containing this task - * @param string|null last installed version of this package, if any (useful for upgrades) - */ - function init($xml, $fileattribs, $lastversion) - { - $this->_class = str_replace('/', '_', $fileattribs['name']); - $this->_filename = $fileattribs['name']; - $this->_class = str_replace ('.php', '', $this->_class) . '_postinstall'; - $this->_params = $xml; - $this->_lastversion = $lastversion; - } - - /** - * Strip the tasks: namespace from internal params - * - * @access private - */ - function _stripNamespace($params = null) - { - if ($params === null) { - $params = array(); - if (!is_array($this->_params)) { - return; - } - foreach ($this->_params as $i => $param) { - if (is_array($param)) { - $param = $this->_stripNamespace($param); - } - $params[str_replace($this->_pkg->getTasksNs() . ':', '', $i)] = $param; - } - $this->_params = $params; - } else { - $newparams = array(); - foreach ($params as $i => $param) { - if (is_array($param)) { - $param = $this->_stripNamespace($param); - } - $newparams[str_replace($this->_pkg->getTasksNs() . ':', '', $i)] = $param; - } - return $newparams; - } - } - - /** - * Unlike other tasks, the installed file name is passed in instead of the file contents, - * because this task is handled post-installation - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @param string file name - * @return bool|PEAR_Error false to skip this file, PEAR_Error to fail - * (use $this->throwError) - */ - function startSession($pkg, $contents) - { - if ($this->installphase != PEAR_TASK_INSTALL) { - return false; - } - // remove the tasks: namespace if present - $this->_pkg = $pkg; - $this->_stripNamespace(); - $this->logger->log(0, 'Including external post-installation script "' . - $contents . '" - any errors are in this script'); - include_once $contents; - if (class_exists($this->_class)) { - $this->logger->log(0, 'Inclusion succeeded'); - } else { - return $this->throwError('init of post-install script class "' . $this->_class - . '" failed'); - } - $this->_obj = new $this->_class; - $this->logger->log(1, 'running post-install script "' . $this->_class . '->init()"'); - PEAR::pushErrorHandling(PEAR_ERROR_RETURN); - $res = $this->_obj->init($this->config, $pkg, $this->_lastversion); - PEAR::popErrorHandling(); - if ($res) { - $this->logger->log(0, 'init succeeded'); - } else { - return $this->throwError('init of post-install script "' . $this->_class . - '->init()" failed'); - } - $this->_contents = $contents; - return true; - } - - /** - * No longer used - * @see PEAR_PackageFile_v2::runPostinstallScripts() - * @param array an array of tasks - * @param string install or upgrade - * @access protected - * @static - */ - function run() - { - } -} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Task/Postinstallscript/rw.php b/_piecrust/libs/PEAR/Task/Postinstallscript/rw.php deleted file mode 100644 index 8f358bf..0000000 --- a/_piecrust/libs/PEAR/Task/Postinstallscript/rw.php +++ /dev/null @@ -1,169 +0,0 @@ - - read/write version - * - * PHP versions 4 and 5 - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: rw.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a10 - */ -/** - * Base class - */ -require_once 'PEAR/Task/Postinstallscript.php'; -/** - * Abstracts the postinstallscript file task xml. - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a10 - */ -class PEAR_Task_Postinstallscript_rw extends PEAR_Task_Postinstallscript -{ - /** - * parent package file object - * - * @var PEAR_PackageFile_v2_rw - */ - var $_pkg; - /** - * Enter description here... - * - * @param PEAR_PackageFile_v2_rw $pkg - * @param PEAR_Config $config - * @param PEAR_Frontend $logger - * @param array $fileXml - * @return PEAR_Task_Postinstallscript_rw - */ - function PEAR_Task_Postinstallscript_rw(&$pkg, &$config, &$logger, $fileXml) - { - parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE); - $this->_contents = $fileXml; - $this->_pkg = &$pkg; - $this->_params = array(); - } - - function validate() - { - return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents); - } - - function getName() - { - return 'postinstallscript'; - } - - /** - * add a simple to the post-install script - * - * Order is significant, so call this method in the same - * sequence the users should see the paramgroups. The $params - * parameter should either be the result of a call to {@link getParam()} - * or an array of calls to getParam(). - * - * Use {@link addConditionTypeGroup()} to add a containing - * a tag - * @param string $id id as seen by the script - * @param array|false $params array of getParam() calls, or false for no params - * @param string|false $instructions - */ - function addParamGroup($id, $params = false, $instructions = false) - { - if ($params && isset($params[0]) && !isset($params[1])) { - $params = $params[0]; - } - $stuff = - array( - $this->_pkg->getTasksNs() . ':id' => $id, - ); - if ($instructions) { - $stuff[$this->_pkg->getTasksNs() . ':instructions'] = $instructions; - } - if ($params) { - $stuff[$this->_pkg->getTasksNs() . ':param'] = $params; - } - $this->_params[$this->_pkg->getTasksNs() . ':paramgroup'][] = $stuff; - } - - /** - * add a complex to the post-install script with conditions - * - * This inserts a with - * - * Order is significant, so call this method in the same - * sequence the users should see the paramgroups. The $params - * parameter should either be the result of a call to {@link getParam()} - * or an array of calls to getParam(). - * - * Use {@link addParamGroup()} to add a simple - * - * @param string $id id as seen by the script - * @param string $oldgroup id of the section referenced by - * - * @param string $param name of the from the older section referenced - * by - * @param string $value value to match of the parameter - * @param string $conditiontype one of '=', '!=', 'preg_match' - * @param array|false $params array of getParam() calls, or false for no params - * @param string|false $instructions - */ - function addConditionTypeGroup($id, $oldgroup, $param, $value, $conditiontype = '=', - $params = false, $instructions = false) - { - if ($params && isset($params[0]) && !isset($params[1])) { - $params = $params[0]; - } - $stuff = array( - $this->_pkg->getTasksNs() . ':id' => $id, - ); - if ($instructions) { - $stuff[$this->_pkg->getTasksNs() . ':instructions'] = $instructions; - } - $stuff[$this->_pkg->getTasksNs() . ':name'] = $oldgroup . '::' . $param; - $stuff[$this->_pkg->getTasksNs() . ':conditiontype'] = $conditiontype; - $stuff[$this->_pkg->getTasksNs() . ':value'] = $value; - if ($params) { - $stuff[$this->_pkg->getTasksNs() . ':param'] = $params; - } - $this->_params[$this->_pkg->getTasksNs() . ':paramgroup'][] = $stuff; - } - - function getXml() - { - return $this->_params; - } - - /** - * Use to set up a param tag for use in creating a paramgroup - * @static - */ - function getParam($name, $prompt, $type = 'string', $default = null) - { - if ($default !== null) { - return - array( - $this->_pkg->getTasksNs() . ':name' => $name, - $this->_pkg->getTasksNs() . ':prompt' => $prompt, - $this->_pkg->getTasksNs() . ':type' => $type, - $this->_pkg->getTasksNs() . ':default' => $default - ); - } - return - array( - $this->_pkg->getTasksNs() . ':name' => $name, - $this->_pkg->getTasksNs() . ':prompt' => $prompt, - $this->_pkg->getTasksNs() . ':type' => $type, - ); - } -} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Task/Replace.php b/_piecrust/libs/PEAR/Task/Replace.php deleted file mode 100644 index 376df64..0000000 --- a/_piecrust/libs/PEAR/Task/Replace.php +++ /dev/null @@ -1,176 +0,0 @@ - - * - * PHP versions 4 and 5 - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Replace.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ -/** - * Base class - */ -require_once 'PEAR/Task/Common.php'; -/** - * Implements the replace file task. - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Task_Replace extends PEAR_Task_Common -{ - var $type = 'simple'; - var $phase = PEAR_TASK_PACKAGEANDINSTALL; - var $_replacements; - - /** - * Validate the raw xml at parsing-time. - * @param PEAR_PackageFile_v2 - * @param array raw, parsed xml - * @param PEAR_Config - * @static - */ - function validateXml($pkg, $xml, $config, $fileXml) - { - if (!isset($xml['attribs'])) { - return array(PEAR_TASK_ERROR_NOATTRIBS); - } - if (!isset($xml['attribs']['type'])) { - return array(PEAR_TASK_ERROR_MISSING_ATTRIB, 'type'); - } - if (!isset($xml['attribs']['to'])) { - return array(PEAR_TASK_ERROR_MISSING_ATTRIB, 'to'); - } - if (!isset($xml['attribs']['from'])) { - return array(PEAR_TASK_ERROR_MISSING_ATTRIB, 'from'); - } - if ($xml['attribs']['type'] == 'pear-config') { - if (!in_array($xml['attribs']['to'], $config->getKeys())) { - return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'], - $config->getKeys()); - } - } elseif ($xml['attribs']['type'] == 'php-const') { - if (defined($xml['attribs']['to'])) { - return true; - } else { - return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'], - array('valid PHP constant')); - } - } elseif ($xml['attribs']['type'] == 'package-info') { - if (in_array($xml['attribs']['to'], - array('name', 'summary', 'channel', 'notes', 'extends', 'description', - 'release_notes', 'license', 'release-license', 'license-uri', - 'version', 'api-version', 'state', 'api-state', 'release_date', - 'date', 'time'))) { - return true; - } else { - return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'to', $xml['attribs']['to'], - array('name', 'summary', 'channel', 'notes', 'extends', 'description', - 'release_notes', 'license', 'release-license', 'license-uri', - 'version', 'api-version', 'state', 'api-state', 'release_date', - 'date', 'time')); - } - } else { - return array(PEAR_TASK_ERROR_WRONG_ATTRIB_VALUE, 'type', $xml['attribs']['type'], - array('pear-config', 'package-info', 'php-const')); - } - return true; - } - - /** - * Initialize a task instance with the parameters - * @param array raw, parsed xml - * @param unused - */ - function init($xml, $attribs) - { - $this->_replacements = isset($xml['attribs']) ? array($xml) : $xml; - } - - /** - * Do a package.xml 1.0 replacement, with additional package-info fields available - * - * See validateXml() source for the complete list of allowed fields - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @param string file contents - * @param string the eventual final file location (informational only) - * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail - * (use $this->throwError), otherwise return the new contents - */ - function startSession($pkg, $contents, $dest) - { - $subst_from = $subst_to = array(); - foreach ($this->_replacements as $a) { - $a = $a['attribs']; - $to = ''; - if ($a['type'] == 'pear-config') { - if ($this->installphase == PEAR_TASK_PACKAGE) { - return false; - } - if ($a['to'] == 'master_server') { - $chan = $this->registry->getChannel($pkg->getChannel()); - if (!PEAR::isError($chan)) { - $to = $chan->getServer(); - } else { - $this->logger->log(0, "$dest: invalid pear-config replacement: $a[to]"); - return false; - } - } else { - if ($this->config->isDefinedLayer('ftp')) { - // try the remote config file first - $to = $this->config->get($a['to'], 'ftp', $pkg->getChannel()); - if (is_null($to)) { - // then default to local - $to = $this->config->get($a['to'], null, $pkg->getChannel()); - } - } else { - $to = $this->config->get($a['to'], null, $pkg->getChannel()); - } - } - if (is_null($to)) { - $this->logger->log(0, "$dest: invalid pear-config replacement: $a[to]"); - return false; - } - } elseif ($a['type'] == 'php-const') { - if ($this->installphase == PEAR_TASK_PACKAGE) { - return false; - } - if (defined($a['to'])) { - $to = constant($a['to']); - } else { - $this->logger->log(0, "$dest: invalid php-const replacement: $a[to]"); - return false; - } - } else { - if ($t = $pkg->packageInfo($a['to'])) { - $to = $t; - } else { - $this->logger->log(0, "$dest: invalid package-info replacement: $a[to]"); - return false; - } - } - if (!is_null($to)) { - $subst_from[] = $a['from']; - $subst_to[] = $to; - } - } - $this->logger->log(3, "doing " . sizeof($subst_from) . - " substitution(s) for $dest"); - if (sizeof($subst_from)) { - $contents = str_replace($subst_from, $subst_to, $contents); - } - return $contents; - } -} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Task/Replace/rw.php b/_piecrust/libs/PEAR/Task/Replace/rw.php deleted file mode 100644 index 32dad58..0000000 --- a/_piecrust/libs/PEAR/Task/Replace/rw.php +++ /dev/null @@ -1,61 +0,0 @@ - - read/write version - * - * PHP versions 4 and 5 - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: rw.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a10 - */ -/** - * Base class - */ -require_once 'PEAR/Task/Replace.php'; -/** - * Abstracts the replace task xml. - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a10 - */ -class PEAR_Task_Replace_rw extends PEAR_Task_Replace -{ - function PEAR_Task_Replace_rw(&$pkg, &$config, &$logger, $fileXml) - { - parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE); - $this->_contents = $fileXml; - $this->_pkg = &$pkg; - $this->_params = array(); - } - - function validate() - { - return $this->validateXml($this->_pkg, $this->_params, $this->config, $this->_contents); - } - - function setInfo($from, $to, $type) - { - $this->_params = array('attribs' => array('from' => $from, 'to' => $to, 'type' => $type)); - } - - function getName() - { - return 'replace'; - } - - function getXml() - { - return $this->_params; - } -} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Task/Unixeol.php b/_piecrust/libs/PEAR/Task/Unixeol.php deleted file mode 100644 index 89ca81b..0000000 --- a/_piecrust/libs/PEAR/Task/Unixeol.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * PHP versions 4 and 5 - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Unixeol.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ -/** - * Base class - */ -require_once 'PEAR/Task/Common.php'; -/** - * Implements the unix line endings file task. - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Task_Unixeol extends PEAR_Task_Common -{ - var $type = 'simple'; - var $phase = PEAR_TASK_PACKAGE; - var $_replacements; - - /** - * Validate the raw xml at parsing-time. - * @param PEAR_PackageFile_v2 - * @param array raw, parsed xml - * @param PEAR_Config - * @static - */ - function validateXml($pkg, $xml, $config, $fileXml) - { - if ($xml != '') { - return array(PEAR_TASK_ERROR_INVALID, 'no attributes allowed'); - } - return true; - } - - /** - * Initialize a task instance with the parameters - * @param array raw, parsed xml - * @param unused - */ - function init($xml, $attribs) - { - } - - /** - * Replace all line endings with line endings customized for the current OS - * - * See validateXml() source for the complete list of allowed fields - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @param string file contents - * @param string the eventual final file location (informational only) - * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail - * (use $this->throwError), otherwise return the new contents - */ - function startSession($pkg, $contents, $dest) - { - $this->logger->log(3, "replacing all line endings with \\n in $dest"); - return preg_replace("/\r\n|\n\r|\r|\n/", "\n", $contents); - } -} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Task/Unixeol/rw.php b/_piecrust/libs/PEAR/Task/Unixeol/rw.php deleted file mode 100644 index b2ae5fa..0000000 --- a/_piecrust/libs/PEAR/Task/Unixeol/rw.php +++ /dev/null @@ -1,56 +0,0 @@ - - read/write version - * - * PHP versions 4 and 5 - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: rw.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a10 - */ -/** - * Base class - */ -require_once 'PEAR/Task/Unixeol.php'; -/** - * Abstracts the unixeol task xml. - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a10 - */ -class PEAR_Task_Unixeol_rw extends PEAR_Task_Unixeol -{ - function PEAR_Task_Unixeol_rw(&$pkg, &$config, &$logger, $fileXml) - { - parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE); - $this->_contents = $fileXml; - $this->_pkg = &$pkg; - $this->_params = array(); - } - - function validate() - { - return true; - } - - function getName() - { - return 'unixeol'; - } - - function getXml() - { - return ''; - } -} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Task/Windowseol.php b/_piecrust/libs/PEAR/Task/Windowseol.php deleted file mode 100644 index 8ba4171..0000000 --- a/_piecrust/libs/PEAR/Task/Windowseol.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * PHP versions 4 and 5 - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Windowseol.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ -/** - * Base class - */ -require_once 'PEAR/Task/Common.php'; -/** - * Implements the windows line endsings file task. - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Task_Windowseol extends PEAR_Task_Common -{ - var $type = 'simple'; - var $phase = PEAR_TASK_PACKAGE; - var $_replacements; - - /** - * Validate the raw xml at parsing-time. - * @param PEAR_PackageFile_v2 - * @param array raw, parsed xml - * @param PEAR_Config - * @static - */ - function validateXml($pkg, $xml, $config, $fileXml) - { - if ($xml != '') { - return array(PEAR_TASK_ERROR_INVALID, 'no attributes allowed'); - } - return true; - } - - /** - * Initialize a task instance with the parameters - * @param array raw, parsed xml - * @param unused - */ - function init($xml, $attribs) - { - } - - /** - * Replace all line endings with windows line endings - * - * See validateXml() source for the complete list of allowed fields - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - * @param string file contents - * @param string the eventual final file location (informational only) - * @return string|false|PEAR_Error false to skip this file, PEAR_Error to fail - * (use $this->throwError), otherwise return the new contents - */ - function startSession($pkg, $contents, $dest) - { - $this->logger->log(3, "replacing all line endings with \\r\\n in $dest"); - return preg_replace("/\r\n|\n\r|\r|\n/", "\r\n", $contents); - } -} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Task/Windowseol/rw.php b/_piecrust/libs/PEAR/Task/Windowseol/rw.php deleted file mode 100644 index f0f1149..0000000 --- a/_piecrust/libs/PEAR/Task/Windowseol/rw.php +++ /dev/null @@ -1,56 +0,0 @@ - - read/write version - * - * PHP versions 4 and 5 - * - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: rw.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a10 - */ -/** - * Base class - */ -require_once 'PEAR/Task/Windowseol.php'; -/** - * Abstracts the windowseol task xml. - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a10 - */ -class PEAR_Task_Windowseol_rw extends PEAR_Task_Windowseol -{ - function PEAR_Task_Windowseol_rw(&$pkg, &$config, &$logger, $fileXml) - { - parent::PEAR_Task_Common($config, $logger, PEAR_TASK_PACKAGE); - $this->_contents = $fileXml; - $this->_pkg = &$pkg; - $this->_params = array(); - } - - function validate() - { - return true; - } - - function getName() - { - return 'windowseol'; - } - - function getXml() - { - return ''; - } -} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Validate.php b/_piecrust/libs/PEAR/Validate.php deleted file mode 100644 index 176560b..0000000 --- a/_piecrust/libs/PEAR/Validate.php +++ /dev/null @@ -1,629 +0,0 @@ - - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Validate.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ -/**#@+ - * Constants for install stage - */ -define('PEAR_VALIDATE_INSTALLING', 1); -define('PEAR_VALIDATE_UNINSTALLING', 2); // this is not bit-mapped like the others -define('PEAR_VALIDATE_NORMAL', 3); -define('PEAR_VALIDATE_DOWNLOADING', 4); // this is not bit-mapped like the others -define('PEAR_VALIDATE_PACKAGING', 7); -/**#@-*/ -require_once 'PEAR/Common.php'; -require_once 'PEAR/Validator/PECL.php'; - -/** - * Validation class for package.xml - channel-level advanced validation - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_Validate -{ - var $packageregex = _PEAR_COMMON_PACKAGE_NAME_PREG; - /** - * @var PEAR_PackageFile_v1|PEAR_PackageFile_v2 - */ - var $_packagexml; - /** - * @var int one of the PEAR_VALIDATE_* constants - */ - var $_state = PEAR_VALIDATE_NORMAL; - /** - * Format: ('error' => array('field' => name, 'reason' => reason), 'warning' => same) - * @var array - * @access private - */ - var $_failures = array('error' => array(), 'warning' => array()); - - /** - * Override this method to handle validation of normal package names - * @param string - * @return bool - * @access protected - */ - function _validPackageName($name) - { - return (bool) preg_match('/^' . $this->packageregex . '\\z/', $name); - } - - /** - * @param string package name to validate - * @param string name of channel-specific validation package - * @final - */ - function validPackageName($name, $validatepackagename = false) - { - if ($validatepackagename) { - if (strtolower($name) == strtolower($validatepackagename)) { - return (bool) preg_match('/^[a-zA-Z0-9_]+(?:\.[a-zA-Z0-9_]+)*\\z/', $name); - } - } - return $this->_validPackageName($name); - } - - /** - * This validates a bundle name, and bundle names must conform - * to the PEAR naming convention, so the method is final and static. - * @param string - * @final - * @static - */ - function validGroupName($name) - { - return (bool) preg_match('/^' . _PEAR_COMMON_PACKAGE_NAME_PREG . '\\z/', $name); - } - - /** - * Determine whether $state represents a valid stability level - * @param string - * @return bool - * @static - * @final - */ - function validState($state) - { - return in_array($state, array('snapshot', 'devel', 'alpha', 'beta', 'stable')); - } - - /** - * Get a list of valid stability levels - * @return array - * @static - * @final - */ - function getValidStates() - { - return array('snapshot', 'devel', 'alpha', 'beta', 'stable'); - } - - /** - * Determine whether a version is a properly formatted version number that can be used - * by version_compare - * @param string - * @return bool - * @static - * @final - */ - function validVersion($ver) - { - return (bool) preg_match(PEAR_COMMON_PACKAGE_VERSION_PREG, $ver); - } - - /** - * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 - */ - function setPackageFile(&$pf) - { - $this->_packagexml = &$pf; - } - - /** - * @access private - */ - function _addFailure($field, $reason) - { - $this->_failures['errors'][] = array('field' => $field, 'reason' => $reason); - } - - /** - * @access private - */ - function _addWarning($field, $reason) - { - $this->_failures['warnings'][] = array('field' => $field, 'reason' => $reason); - } - - function getFailures() - { - $failures = $this->_failures; - $this->_failures = array('warnings' => array(), 'errors' => array()); - return $failures; - } - - /** - * @param int one of the PEAR_VALIDATE_* constants - */ - function validate($state = null) - { - if (!isset($this->_packagexml)) { - return false; - } - if ($state !== null) { - $this->_state = $state; - } - $this->_failures = array('warnings' => array(), 'errors' => array()); - $this->validatePackageName(); - $this->validateVersion(); - $this->validateMaintainers(); - $this->validateDate(); - $this->validateSummary(); - $this->validateDescription(); - $this->validateLicense(); - $this->validateNotes(); - if ($this->_packagexml->getPackagexmlVersion() == '1.0') { - $this->validateState(); - $this->validateFilelist(); - } elseif ($this->_packagexml->getPackagexmlVersion() == '2.0' || - $this->_packagexml->getPackagexmlVersion() == '2.1') { - $this->validateTime(); - $this->validateStability(); - $this->validateDeps(); - $this->validateMainFilelist(); - $this->validateReleaseFilelist(); - //$this->validateGlobalTasks(); - $this->validateChangelog(); - } - return !((bool) count($this->_failures['errors'])); - } - - /** - * @access protected - */ - function validatePackageName() - { - if ($this->_state == PEAR_VALIDATE_PACKAGING || - $this->_state == PEAR_VALIDATE_NORMAL) { - if (($this->_packagexml->getPackagexmlVersion() == '2.0' || - $this->_packagexml->getPackagexmlVersion() == '2.1') && - $this->_packagexml->getExtends()) { - $version = $this->_packagexml->getVersion() . ''; - $name = $this->_packagexml->getPackage(); - $test = array_shift($a = explode('.', $version)); - if ($test == '0') { - return true; - } - $vlen = strlen($test); - $majver = substr($name, strlen($name) - $vlen); - while ($majver && !is_numeric($majver{0})) { - $majver = substr($majver, 1); - } - if ($majver != $test) { - $this->_addWarning('package', "package $name extends package " . - $this->_packagexml->getExtends() . ' and so the name should ' . - 'have a postfix equal to the major version like "' . - $this->_packagexml->getExtends() . $test . '"'); - return true; - } elseif (substr($name, 0, strlen($name) - $vlen) != - $this->_packagexml->getExtends()) { - $this->_addWarning('package', "package $name extends package " . - $this->_packagexml->getExtends() . ' and so the name must ' . - 'be an extension like "' . $this->_packagexml->getExtends() . - $test . '"'); - return true; - } - } - } - if (!$this->validPackageName($this->_packagexml->getPackage())) { - $this->_addFailure('name', 'package name "' . - $this->_packagexml->getPackage() . '" is invalid'); - return false; - } - } - - /** - * @access protected - */ - function validateVersion() - { - if ($this->_state != PEAR_VALIDATE_PACKAGING) { - if (!$this->validVersion($this->_packagexml->getVersion())) { - $this->_addFailure('version', - 'Invalid version number "' . $this->_packagexml->getVersion() . '"'); - } - return false; - } - $version = $this->_packagexml->getVersion(); - $versioncomponents = explode('.', $version); - if (count($versioncomponents) != 3) { - $this->_addWarning('version', - 'A version number should have 3 decimals (x.y.z)'); - return true; - } - $name = $this->_packagexml->getPackage(); - // version must be based upon state - switch ($this->_packagexml->getState()) { - case 'snapshot' : - return true; - case 'devel' : - if ($versioncomponents[0] . 'a' == '0a') { - return true; - } - if ($versioncomponents[0] == 0) { - $versioncomponents[0] = '0'; - $this->_addWarning('version', - 'version "' . $version . '" should be "' . - implode('.' ,$versioncomponents) . '"'); - } else { - $this->_addWarning('version', - 'packages with devel stability must be < version 1.0.0'); - } - return true; - break; - case 'alpha' : - case 'beta' : - // check for a package that extends a package, - // like Foo and Foo2 - if ($this->_state == PEAR_VALIDATE_PACKAGING) { - if (substr($versioncomponents[2], 1, 2) == 'rc') { - $this->_addFailure('version', 'Release Candidate versions ' . - 'must have capital RC, not lower-case rc'); - return false; - } - } - if (!$this->_packagexml->getExtends()) { - if ($versioncomponents[0] == '1') { - if ($versioncomponents[2]{0} == '0') { - if ($versioncomponents[2] == '0') { - // version 1.*.0000 - $this->_addWarning('version', - 'version 1.' . $versioncomponents[1] . - '.0 probably should not be alpha or beta'); - return true; - } elseif (strlen($versioncomponents[2]) > 1) { - // version 1.*.0RC1 or 1.*.0beta24 etc. - return true; - } else { - // version 1.*.0 - $this->_addWarning('version', - 'version 1.' . $versioncomponents[1] . - '.0 probably should not be alpha or beta'); - return true; - } - } else { - $this->_addWarning('version', - 'bugfix versions (1.3.x where x > 0) probably should ' . - 'not be alpha or beta'); - return true; - } - } elseif ($versioncomponents[0] != '0') { - $this->_addWarning('version', - 'major versions greater than 1 are not allowed for packages ' . - 'without an tag or an identical postfix (foo2 v2.0.0)'); - return true; - } - if ($versioncomponents[0] . 'a' == '0a') { - return true; - } - if ($versioncomponents[0] == 0) { - $versioncomponents[0] = '0'; - $this->_addWarning('version', - 'version "' . $version . '" should be "' . - implode('.' ,$versioncomponents) . '"'); - } - } else { - $vlen = strlen($versioncomponents[0] . ''); - $majver = substr($name, strlen($name) - $vlen); - while ($majver && !is_numeric($majver{0})) { - $majver = substr($majver, 1); - } - if (($versioncomponents[0] != 0) && $majver != $versioncomponents[0]) { - $this->_addWarning('version', 'first version number "' . - $versioncomponents[0] . '" must match the postfix of ' . - 'package name "' . $name . '" (' . - $majver . ')'); - return true; - } - if ($versioncomponents[0] == $majver) { - if ($versioncomponents[2]{0} == '0') { - if ($versioncomponents[2] == '0') { - // version 2.*.0000 - $this->_addWarning('version', - "version $majver." . $versioncomponents[1] . - '.0 probably should not be alpha or beta'); - return false; - } elseif (strlen($versioncomponents[2]) > 1) { - // version 2.*.0RC1 or 2.*.0beta24 etc. - return true; - } else { - // version 2.*.0 - $this->_addWarning('version', - "version $majver." . $versioncomponents[1] . - '.0 cannot be alpha or beta'); - return true; - } - } else { - $this->_addWarning('version', - "bugfix versions ($majver.x.y where y > 0) should " . - 'not be alpha or beta'); - return true; - } - } elseif ($versioncomponents[0] != '0') { - $this->_addWarning('version', - "only versions 0.x.y and $majver.x.y are allowed for alpha/beta releases"); - return true; - } - if ($versioncomponents[0] . 'a' == '0a') { - return true; - } - if ($versioncomponents[0] == 0) { - $versioncomponents[0] = '0'; - $this->_addWarning('version', - 'version "' . $version . '" should be "' . - implode('.' ,$versioncomponents) . '"'); - } - } - return true; - break; - case 'stable' : - if ($versioncomponents[0] == '0') { - $this->_addWarning('version', 'versions less than 1.0.0 cannot ' . - 'be stable'); - return true; - } - if (!is_numeric($versioncomponents[2])) { - if (preg_match('/\d+(rc|a|alpha|b|beta)\d*/i', - $versioncomponents[2])) { - $this->_addWarning('version', 'version "' . $version . '" or any ' . - 'RC/beta/alpha version cannot be stable'); - return true; - } - } - // check for a package that extends a package, - // like Foo and Foo2 - if ($this->_packagexml->getExtends()) { - $vlen = strlen($versioncomponents[0] . ''); - $majver = substr($name, strlen($name) - $vlen); - while ($majver && !is_numeric($majver{0})) { - $majver = substr($majver, 1); - } - if (($versioncomponents[0] != 0) && $majver != $versioncomponents[0]) { - $this->_addWarning('version', 'first version number "' . - $versioncomponents[0] . '" must match the postfix of ' . - 'package name "' . $name . '" (' . - $majver . ')'); - return true; - } - } elseif ($versioncomponents[0] > 1) { - $this->_addWarning('version', 'major version x in x.y.z may not be greater than ' . - '1 for any package that does not have an tag'); - } - return true; - break; - default : - return false; - break; - } - } - - /** - * @access protected - */ - function validateMaintainers() - { - // maintainers can only be truly validated server-side for most channels - // but allow this customization for those who wish it - return true; - } - - /** - * @access protected - */ - function validateDate() - { - if ($this->_state == PEAR_VALIDATE_NORMAL || - $this->_state == PEAR_VALIDATE_PACKAGING) { - - if (!preg_match('/(\d\d\d\d)\-(\d\d)\-(\d\d)/', - $this->_packagexml->getDate(), $res) || - count($res) < 4 - || !checkdate($res[2], $res[3], $res[1]) - ) { - $this->_addFailure('date', 'invalid release date "' . - $this->_packagexml->getDate() . '"'); - return false; - } - - if ($this->_state == PEAR_VALIDATE_PACKAGING && - $this->_packagexml->getDate() != date('Y-m-d')) { - $this->_addWarning('date', 'Release Date "' . - $this->_packagexml->getDate() . '" is not today'); - } - } - return true; - } - - /** - * @access protected - */ - function validateTime() - { - if (!$this->_packagexml->getTime()) { - // default of no time value set - return true; - } - - // packager automatically sets time, so only validate if pear validate is called - if ($this->_state = PEAR_VALIDATE_NORMAL) { - if (!preg_match('/\d\d:\d\d:\d\d/', - $this->_packagexml->getTime())) { - $this->_addFailure('time', 'invalid release time "' . - $this->_packagexml->getTime() . '"'); - return false; - } - - $result = preg_match('|\d{2}\:\d{2}\:\d{2}|', $this->_packagexml->getTime(), $matches); - if ($result === false || empty($matches)) { - $this->_addFailure('time', 'invalid release time "' . - $this->_packagexml->getTime() . '"'); - return false; - } - } - - return true; - } - - /** - * @access protected - */ - function validateState() - { - // this is the closest to "final" php4 can get - if (!PEAR_Validate::validState($this->_packagexml->getState())) { - if (strtolower($this->_packagexml->getState() == 'rc')) { - $this->_addFailure('state', 'RC is not a state, it is a version ' . - 'postfix, use ' . $this->_packagexml->getVersion() . 'RC1, state beta'); - } - $this->_addFailure('state', 'invalid release state "' . - $this->_packagexml->getState() . '", must be one of: ' . - implode(', ', PEAR_Validate::getValidStates())); - return false; - } - return true; - } - - /** - * @access protected - */ - function validateStability() - { - $ret = true; - $packagestability = $this->_packagexml->getState(); - $apistability = $this->_packagexml->getState('api'); - if (!PEAR_Validate::validState($packagestability)) { - $this->_addFailure('state', 'invalid release stability "' . - $this->_packagexml->getState() . '", must be one of: ' . - implode(', ', PEAR_Validate::getValidStates())); - $ret = false; - } - $apistates = PEAR_Validate::getValidStates(); - array_shift($apistates); // snapshot is not allowed - if (!in_array($apistability, $apistates)) { - $this->_addFailure('state', 'invalid API stability "' . - $this->_packagexml->getState('api') . '", must be one of: ' . - implode(', ', $apistates)); - $ret = false; - } - return $ret; - } - - /** - * @access protected - */ - function validateSummary() - { - return true; - } - - /** - * @access protected - */ - function validateDescription() - { - return true; - } - - /** - * @access protected - */ - function validateLicense() - { - return true; - } - - /** - * @access protected - */ - function validateNotes() - { - return true; - } - - /** - * for package.xml 2.0 only - channels can't use package.xml 1.0 - * @access protected - */ - function validateDependencies() - { - return true; - } - - /** - * for package.xml 1.0 only - * @access private - */ - function _validateFilelist() - { - return true; // placeholder for now - } - - /** - * for package.xml 2.0 only - * @access protected - */ - function validateMainFilelist() - { - return true; // placeholder for now - } - - /** - * for package.xml 2.0 only - * @access protected - */ - function validateReleaseFilelist() - { - return true; // placeholder for now - } - - /** - * @access protected - */ - function validateChangelog() - { - return true; - } - - /** - * @access protected - */ - function validateFilelist() - { - return true; - } - - /** - * @access protected - */ - function validateDeps() - { - return true; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PEAR/Validator/PECL.php b/_piecrust/libs/PEAR/Validator/PECL.php deleted file mode 100644 index 89b951f..0000000 --- a/_piecrust/libs/PEAR/Validator/PECL.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @copyright 1997-2006 The PHP Group - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: PECL.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a5 - */ -/** - * This is the parent class for all validators - */ -require_once 'PEAR/Validate.php'; -/** - * Channel Validator for the pecl.php.net channel - * @category pear - * @package PEAR - * @author Greg Beaver - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a5 - */ -class PEAR_Validator_PECL extends PEAR_Validate -{ - function validateVersion() - { - if ($this->_state == PEAR_VALIDATE_PACKAGING) { - $version = $this->_packagexml->getVersion(); - $versioncomponents = explode('.', $version); - $last = array_pop($versioncomponents); - if (substr($last, 1, 2) == 'rc') { - $this->_addFailure('version', 'Release Candidate versions must have ' . - 'upper-case RC, not lower-case rc'); - return false; - } - } - return true; - } - - function validatePackageName() - { - $ret = parent::validatePackageName(); - if ($this->_packagexml->getPackageType() == 'extsrc' || - $this->_packagexml->getPackageType() == 'zendextsrc') { - if (strtolower($this->_packagexml->getPackage()) != - strtolower($this->_packagexml->getProvidesExtension())) { - $this->_addWarning('providesextension', 'package name "' . - $this->_packagexml->getPackage() . '" is different from extension name "' . - $this->_packagexml->getProvidesExtension() . '"'); - } - } - return $ret; - } -} -?> \ No newline at end of file diff --git a/_piecrust/libs/PEAR/XMLParser.php b/_piecrust/libs/PEAR/XMLParser.php deleted file mode 100644 index 7f091c1..0000000 --- a/_piecrust/libs/PEAR/XMLParser.php +++ /dev/null @@ -1,253 +0,0 @@ - - * @author Stephan Schmidt (original XML_Unserializer code) - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license New BSD License - * @version CVS: $Id: XMLParser.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.4.0a1 - */ - -/** - * Parser for any xml file - * @category pear - * @package PEAR - * @author Greg Beaver - * @author Stephan Schmidt (original XML_Unserializer code) - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.4.0a1 - */ -class PEAR_XMLParser -{ - /** - * unserilialized data - * @var string $_serializedData - */ - var $_unserializedData = null; - - /** - * name of the root tag - * @var string $_root - */ - var $_root = null; - - /** - * stack for all data that is found - * @var array $_dataStack - */ - var $_dataStack = array(); - - /** - * stack for all values that are generated - * @var array $_valStack - */ - var $_valStack = array(); - - /** - * current tag depth - * @var int $_depth - */ - var $_depth = 0; - - /** - * The XML encoding to use - * @var string $encoding - */ - var $encoding = 'ISO-8859-1'; - - /** - * @return array - */ - function getData() - { - return $this->_unserializedData; - } - - /** - * @param string xml content - * @return true|PEAR_Error - */ - function parse($data) - { - if (!extension_loaded('xml')) { - include_once 'PEAR.php'; - return PEAR::raiseError("XML Extension not found", 1); - } - $this->_dataStack = $this->_valStack = array(); - $this->_depth = 0; - - if ( - strpos($data, 'encoding="UTF-8"') - || strpos($data, 'encoding="utf-8"') - || strpos($data, "encoding='UTF-8'") - || strpos($data, "encoding='utf-8'") - ) { - $this->encoding = 'UTF-8'; - } - - if (version_compare(phpversion(), '5.0.0', 'lt') && $this->encoding == 'UTF-8') { - $data = utf8_decode($data); - $this->encoding = 'ISO-8859-1'; - } - - $xp = xml_parser_create($this->encoding); - xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, 0); - xml_set_object($xp, $this); - xml_set_element_handler($xp, 'startHandler', 'endHandler'); - xml_set_character_data_handler($xp, 'cdataHandler'); - if (!xml_parse($xp, $data)) { - $msg = xml_error_string(xml_get_error_code($xp)); - $line = xml_get_current_line_number($xp); - xml_parser_free($xp); - include_once 'PEAR.php'; - return PEAR::raiseError("XML Error: '$msg' on line '$line'", 2); - } - xml_parser_free($xp); - return true; - } - - /** - * Start element handler for XML parser - * - * @access private - * @param object $parser XML parser object - * @param string $element XML element - * @param array $attribs attributes of XML tag - * @return void - */ - function startHandler($parser, $element, $attribs) - { - $this->_depth++; - $this->_dataStack[$this->_depth] = null; - - $val = array( - 'name' => $element, - 'value' => null, - 'type' => 'string', - 'childrenKeys' => array(), - 'aggregKeys' => array() - ); - - if (count($attribs) > 0) { - $val['children'] = array(); - $val['type'] = 'array'; - $val['children']['attribs'] = $attribs; - } - - array_push($this->_valStack, $val); - } - - /** - * post-process data - * - * @param string $data - * @param string $element element name - */ - function postProcess($data, $element) - { - return trim($data); - } - - /** - * End element handler for XML parser - * - * @access private - * @param object XML parser object - * @param string - * @return void - */ - function endHandler($parser, $element) - { - $value = array_pop($this->_valStack); - $data = $this->postProcess($this->_dataStack[$this->_depth], $element); - - // adjust type of the value - switch (strtolower($value['type'])) { - // unserialize an array - case 'array': - if ($data !== '') { - $value['children']['_content'] = $data; - } - - $value['value'] = isset($value['children']) ? $value['children'] : array(); - break; - - /* - * unserialize a null value - */ - case 'null': - $data = null; - break; - - /* - * unserialize any scalar value - */ - default: - settype($data, $value['type']); - $value['value'] = $data; - break; - } - - $parent = array_pop($this->_valStack); - if ($parent === null) { - $this->_unserializedData = &$value['value']; - $this->_root = &$value['name']; - return true; - } - - // parent has to be an array - if (!isset($parent['children']) || !is_array($parent['children'])) { - $parent['children'] = array(); - if ($parent['type'] != 'array') { - $parent['type'] = 'array'; - } - } - - if (!empty($value['name'])) { - // there already has been a tag with this name - if (in_array($value['name'], $parent['childrenKeys'])) { - // no aggregate has been created for this tag - if (!in_array($value['name'], $parent['aggregKeys'])) { - if (isset($parent['children'][$value['name']])) { - $parent['children'][$value['name']] = array($parent['children'][$value['name']]); - } else { - $parent['children'][$value['name']] = array(); - } - array_push($parent['aggregKeys'], $value['name']); - } - array_push($parent['children'][$value['name']], $value['value']); - } else { - $parent['children'][$value['name']] = &$value['value']; - array_push($parent['childrenKeys'], $value['name']); - } - } else { - array_push($parent['children'],$value['value']); - } - array_push($this->_valStack, $parent); - - $this->_depth--; - } - - /** - * Handler for character data - * - * @access private - * @param object XML parser object - * @param string CDATA - * @return void - */ - function cdataHandler($parser, $cdata) - { - $this->_dataStack[$this->_depth] .= $cdata; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/Phamlp.php b/_piecrust/libs/PhamlP/Phamlp.php deleted file mode 100755 index 7bec175..0000000 --- a/_piecrust/libs/PhamlP/Phamlp.php +++ /dev/null @@ -1,72 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - */ -/** - * Phamlp class. - * Static support classes. - * @package PHamlP - */ -class Phamlp { - /** - * @var string Language used to translate messages - */ - public static $language; - /** - * @var array Messages used for translation - */ - public static $messages; - - /** - * Translates a message to the specified language. - * @param string message category. - * @param string the original message - * @param array parameters to be applied to the message using strtr. - * @return string the translated message - */ - public static function t($category, $message, $params = array()) { - if (!empty(self::$language)) { - $message = self::translate($category, $message); - } - return $params!==array() ? strtr($message,$params) : $message; - } - - /** - * Translates a message to the specified language. - * If the language or the message in the specified language is not defined the - * original message is returned. - * @param string message category - * @param string the original message - * @return string the translated message - */ - private static function translate($category, $message) { - if (empty(self::$messages[$category])) self::loadMessages($category); - return (empty(self::$messages[$category][$message]) ? $message : self::$messages[$category][$message]); - } - - /** - * Loads the specified language message file for translation. - * Message files are PHP files in the "category/messages" directory and named - * "language.php", where category is either haml or sass, and language is the - * specified language. - * The message file returns an array of (source, translation) pairs; for example: - *
        -	 * return array(
        -	 *   'original message 1' => 'translated message 1',
        -	 *   'original message 2' => 'translated message 2',
        -	 * );
        -	 * 
        - * @param string message category - */ - private static function loadMessages($category) { - $messageFile = dirname(__FILE__).DIRECTORY_SEPARATOR.$category.DIRECTORY_SEPARATOR.'messages'.DIRECTORY_SEPARATOR.self::$language.'.php'; - if (file_exists($messageFile)) { - self::$messages[$category] = require_once($messageFile); - } - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/PhamlpException.php b/_piecrust/libs/PhamlP/PhamlpException.php deleted file mode 100755 index 1dc3203..0000000 --- a/_piecrust/libs/PhamlP/PhamlpException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - */ - -require_once('Phamlp.php'); - -/** - * Phamlp exception class. - * Base class for PHamlP::Haml and PHamlP::Sass exceptions. - * Translates exception messages. - * @package PHamlP - */ -class PhamlpException extends Exception { - /** - * Phamlp Exception. - * @param string Category (haml|sass) - * @param string Exception message - * @param array parameters to be applied to the message using strtr. - */ - public function __construct($category, $message, $params, $object) { - parent::__construct(Phamlp::t($category, $message, $params) . - (is_object($object) ? ": {$object->filename}::{$object->line}\nSource: {$object->source}" : '') - ); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/HamlException.php b/_piecrust/libs/PhamlP/haml/HamlException.php deleted file mode 100755 index 6410c76..0000000 --- a/_piecrust/libs/PhamlP/haml/HamlException.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml - */ - -require_once(dirname(__FILE__).'/../PhamlpException.php'); - -/** - * Haml exception class. - * @package PHamlP - * @subpackage Haml - */ -class HamlException extends PhamlpException { - /** - * Haml Exception. - * @param string Exception message - * @param array parameters to be applied to the message using strtr. - * @param object object with source code and meta data - */ - public function __construct($message, $params = array(), $object = null) { - parent::__construct('haml', $message, $params, $object); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/HamlHelpers.php b/_piecrust/libs/PhamlP/haml/HamlHelpers.php deleted file mode 100755 index d42a9f8..0000000 --- a/_piecrust/libs/PhamlP/haml/HamlHelpers.php +++ /dev/null @@ -1,199 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml - */ - -/** - * HamlHelpers class. - * Contains methods to make it easier to do various tasks. - * - * The class can be extended to provide user defined helper methods. The - * signature for user defined helper methods is ($block, $other, $arguments); - * $block is the string generated by the Haml block being operated on. - * - * Tthe path to the extended class is provided to HamlParser in the config - * array; class name == file name. - * - * HamlHelpers and any extended class are automatically included in the context - * that a Haml template is parsed in, so all the methods are at your disposal - * from within the template. - * - * @package PHamlP - * @subpackage Haml - */ -class HamlHelpers { - const XMLNS = 'http://www.w3.org/1999/xhtml'; - - /** - * Returns the block with string appended. - * @see succeed - * @param string Haml block - * @param string string to append - * @return string the block with string appended. - */ - public static function append($block, $string) { - return $block.$string; - } - - /** - * Escapes HTML entities in text, but without escaping an ampersand that is - * already part of an escaped entity. - * @param string Haml block - * @return string the block with HTML entities escaped. - */ - public static function escape_once($block) { - return htmlentities(html_entity_decode($block)); - } - - /** - * Returns an array containing default assignments for the xmlns, lang, and - * xml:lang attributes of the html element. - * This helper method is for use in the html element only. - * - * Examples:
        - * %html(html_attrs())
        - * produces
        - * - * - * %html(html_attrs('en-gb'))
        - * produces
        - * - * - * %html(html_attrs('en-gb', false))
        - * produces
        - * - * - * Although handled in HamlParser, the notes below are here for completeness.
        - * Other attributes are defined as normal. e.g.
        - * %html(xmlns:me="http://www.example.com/me" html_attrs('en-gb', false))
        - * produces
        - * - * - * PHamlP also allows for the language to be defined using PHP code that can - * be eval'd; the code must end with a semi-colon (;). e.g.
        - * %html(html_attrs("FW::app()->language);", false))
        - * produces (assuming FW::app()->language returns 'en-gb')
        - * - * - * @param string document language. Default = en-us - * @param boolean whether the html element has the lang attribute. Default: true - * Should be set false for XHTML 1.1 or greater documents - * @return string the block with string appended. - */ - public static function html_attrs($language = 'en-us', $lang = true) { - return ($lang ? - array('xmlns'=>self::XMLNS, 'xml:lang'=>$language, 'lang'=>$language) : - array('xmlns'=>self::XMLNS, 'xml:lang'=>$language)); - } - - /** - * Returns a copy of text with ampersands, angle brackets and quotes escaped - * into HTML entities. - * @param string Haml block - * @return string the block with HTML entities escaped. - */ - public static function html_escape($block) { - return htmlspecialchars($block); - } - - /** - * Iterates an array and using the block to generate a
      7. element for each - * array element. - * Examples:
        - * = list_of(array('red', 'orange', ...., 'violet'), 'colour')
        - * = colour
        - * Produces:
        - *
      8. red

      9. - *
      10. orange

      11. - * |
        - * |
        - *
      12. violet>

      13. - * - * = list_of(array('Fly Fishing' => 'JR Hartley', 'Lord of the Rings' => 'JRR Tolkien'), 'title', 'author')
        - * %h3= title
        - * %p= author
        - * Produces:
        - *

      14. - *

        Fly Fishing


        - *

        JR Hartley


        - *

      15. - *

      16. - *

        Lord of the Rings


        - *

        JRR Tolkien


        - *

      17. - * - * @param string Haml block - * @param array items - * @param string string in block to replace with item key or item value - * @param string string in block to replace with item value - * @return string list items. - */ - public static function list_of($block, $items, $key, $value = null) { - $output = ''; - foreach ($items as $_key=>$_value) { - $output .= '
      18. ' . strtr($block, (empty($value) ? array($key=>$_value) : - array($key=>$_key, $value=>$_value))) . '
      19. '; - } // foreach - return $output; - } - - /** - * Alias for prepend. - * @see prepend - * @param string Haml block - * @param string string to prepend - * @return string the block with string prepended - */ - public static function preceed($block, $string) { - return self::prepend($block, $string); - } - - /** - * Returns the block with string prepended. - * @param string Haml block - * @param string string to prepend - * @return string the block with string prepended - */ - public static function prepend($block, $string) { - return $string.$block; - } - - /** - * Converts newlines in the block to HTML entities. - * @param string Haml block - * @return string the block with newlines converted to HTML entities - */ - public static function preserve($block) { - return str_replace("\n", ' ', $block); - } - - /** - * Alias for append. - * @see append - * @param string Haml block - * @param string string to apppend - * @return string the block with string apppended - */ - public static function succeed($block, $string) { - return self::append($block, $string); - } - - /** - * Surrounds a block of Haml code with strings. - * If $back is not given it defaults to $front. - * @param string Haml block - * @param string string to prepend - * @param string string to apppend - * @return string the block surrounded by the strings - */ - public static function surround($block, $front, $back=null) { - return $front.$block.(is_null($back) ? $front : $back); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/HamlParser.php b/_piecrust/libs/PhamlP/haml/HamlParser.php deleted file mode 100755 index 9f9fa9b..0000000 --- a/_piecrust/libs/PhamlP/haml/HamlParser.php +++ /dev/null @@ -1,1263 +0,0 @@ - - *
      20. Debug (addition)
          - *
        • Source debug - adds comments to the output showing each source line above - * the result - ?#s+ to turn on, ?#s- to turn off, ?#s! to toggle
        • - *
        • Output debug - shows the output directly in the browser - ?#o+ to turn on, ?#o- to turn off, ?#o! to toggle
        • - *
        • Control both at once - ?#so+ to turn on, ?#so- to turn off, ?#so! to toggle
        • - *
        • Ugly mode can be controlled by the template
        • - * - *
        • Ugly mode is turned off when in debug
      21. - *
      22. "-" command (notes)
          - *
        • PHP does not require ending ";"
        • - *
        • PHP control blocks are automatically bracketed
        • - *
        • Switch Case statements do not end with ":" - *
        • do-while control blocks are written as "do (expression)"
      23. - * - * Comes with filters that run "out of the box": - * + plain: useful for large chunks of text to ensure Haml doesn't do anything. - * + escaped: like plain but the output is (x)html escaped. - * + preserve: like plain but preserves the whitespace. - * + cdata: wraps the content in CDATA tags. - * + javascript: wraps the content in \n"; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/filters/HamlPhpFilter.php b/_piecrust/libs/PhamlP/haml/filters/HamlPhpFilter.php deleted file mode 100755 index b16abf3..0000000 --- a/_piecrust/libs/PhamlP/haml/filters/HamlPhpFilter.php +++ /dev/null @@ -1,27 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.filters - */ - -/** - * PHP Filter for {@link http://haml-lang.com/ Haml} class. - * The text will be parsed with the PHP interpreter. - * @package PHamlP - * @subpackage Haml.filters - */ -class HamlPhpFilter extends HamlBaseFilter { - /** - * Run the filter - * @param string text to filter - * @return string filtered text - */ - public function run($text) { - return "\n"; - } -} diff --git a/_piecrust/libs/PhamlP/haml/filters/HamlPlainFilter.php b/_piecrust/libs/PhamlP/haml/filters/HamlPlainFilter.php deleted file mode 100755 index f9c3266..0000000 --- a/_piecrust/libs/PhamlP/haml/filters/HamlPlainFilter.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.filters - */ - -/** - * Plain Filter for {@link http://haml-lang.com/ Haml} class. - * Does not parse the filtered text. This is useful for large blocks of text - * without HTML tags when lines are not to be parsed. - * @package PHamlP - * @subpackage Haml.filters - */ -class HamlPlainFilter extends HamlBaseFilter { - /** - * Run the filter - * @param string text to filter - * @return string filtered text - */ - public function run($text) { - return preg_replace(HamlParser::MATCH_INTERPOLATION, '', $text). "\n"; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/filters/HamlPreserveFilter.php b/_piecrust/libs/PhamlP/haml/filters/HamlPreserveFilter.php deleted file mode 100755 index 4e9d3ba..0000000 --- a/_piecrust/libs/PhamlP/haml/filters/HamlPreserveFilter.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.filters - */ - -/** - * Preserve Filter for {@link http://haml-lang.com/ Haml} class. - * Does not parse the filtered text and preserves line breaks. - * @package PHamlP - * @subpackage Haml.filters - */ -class HamlPreserveFilter extends HamlBaseFilter { - /** - * Run the filter - * @param string text to filter - * @return string filtered text - */ - public function run($text) { - return str_replace("\n", ' ', - preg_replace(HamlParser::MATCH_INTERPOLATION, '', $text) - ) . "\n"; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/filters/HamlSassFilter.php b/_piecrust/libs/PhamlP/haml/filters/HamlSassFilter.php deleted file mode 100755 index 95b0036..0000000 --- a/_piecrust/libs/PhamlP/haml/filters/HamlSassFilter.php +++ /dev/null @@ -1,37 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.filters - */ - -require_once('HamlCssFilter.php'); -require_once(dirname(__FILE__).'/../../sass/SassParser.php'); - -/** - * {@link Sass http://sass-lang.com/} Filter for - * {@link http://haml-lang.com/ Haml} class. - * Parses the text as Sass then calls the CSS filter. - * Useful for including inline Sass. - * @package PHamlP - * @subpackage Haml.filters - */ -class HamlSassFilter extends HamlBaseFilter { - /** - * Run the filter - * @param string text to filter - * @return string filtered text - */ - public function run($text) { - $sass = new SassParser(); - $css = new HamlCssFilter(); - $css->init(); - - return $css->run($sass->toCss(preg_replace(HamlParser::MATCH_INTERPOLATION, '', $text), false)); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/filters/HamlScssFilter.php b/_piecrust/libs/PhamlP/haml/filters/HamlScssFilter.php deleted file mode 100755 index 7c78310..0000000 --- a/_piecrust/libs/PhamlP/haml/filters/HamlScssFilter.php +++ /dev/null @@ -1,37 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.filters - */ - -require_once('HamlCssFilter.php'); -require_once(dirname(__FILE__).'/../../sass/SassParser.php'); - -/** - * {@link Sass http://sass-lang.com/} Filter for - * {@link http://haml-lang.com/ Haml} class. - * Parses the text as Sass then calls the CSS filter. - * Useful for including inline Sass. - * @package PHamlP - * @subpackage Haml.filters - */ -class HamlScssFilter extends HamlBaseFilter { - /** - * Run the filter - * @param string text to filter - * @return string filtered text - */ - public function run($text) { - $sass = new SassParser(array('syntax'=>'scss')); - $css = new HamlCssFilter(); - $css->init(); - - return $css->run($sass->toCss(preg_replace(HamlParser::MATCH_INTERPOLATION, '', $text), false)); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/filters/_HamlMarkdownFilter.php b/_piecrust/libs/PhamlP/haml/filters/_HamlMarkdownFilter.php deleted file mode 100755 index 2af5002..0000000 --- a/_piecrust/libs/PhamlP/haml/filters/_HamlMarkdownFilter.php +++ /dev/null @@ -1,50 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.filters - */ - -/** - * Markdown Filter for {@link http://haml-lang.com/ Haml} class. - * Parses the text with Markdown. - * - * This is an abstract class that must be extended and the init() method - * implemented to provide the vendorPath if the vendor class is not imported - * elsewhere in the application (e.g. by a framework) and vendorClass if the - * default class name is not correct. - * @package PHamlP - * @subpackage Haml.filters - */ -abstract class _HamlMarkdownFilter extends HamlBaseFilter { - /** - * @var string Path to Markdown Parser - */ - protected $vendorPath; - /** - * @var string Markdown class - * Override this value if the class name is different in your environment - */ - protected $vendorClass = 'MarkdownExtra_Parser'; - - /** - * Child classes must implement this method. - * Typically the child class will set $vendorPath and $vendorClass - */ - public function init() {} - - /** - * Run the filter - * @param string text to filter - * @return string filtered text - */ - public function run($text) { - return 'vendorPath)?'require_once "'.$this->vendorPath.'";':'').'$markdown___=new '.$this->vendorClass.'();echo $markdown___->safeTransform("'.preg_replace(HamlParser::MATCH_INTERPOLATION, '".\1."', $text).'");?>'; - } -} diff --git a/_piecrust/libs/PhamlP/haml/filters/_HamlTextileFilter.php b/_piecrust/libs/PhamlP/haml/filters/_HamlTextileFilter.php deleted file mode 100755 index 5bec13a..0000000 --- a/_piecrust/libs/PhamlP/haml/filters/_HamlTextileFilter.php +++ /dev/null @@ -1,50 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.filters - */ - -/** - * Textile Filter for {@link http://haml-lang.com/ Haml} class. - * Parses the text with Textile. - * - * This is an abstract class that must be extended and the init() method - * implemented to provide the vendorPath if the vendor class is not imported - * elsewhere in the application (e.g. by a framework) and vendorClass if the - * default class name is not correct. - * @package PHamlP - * @subpackage Haml.filters - */ -abstract class _HamlTextileFilter extends HamlBaseFilter { - /** - * @var string Path to Textile Parser - */ - protected $vendorPath; - /** - * @var string Textile class - * Override this value if the class name is different in your environment - */ - protected $vendorClass = 'Textile'; - - /** - * Child classes must implement this method. - * Typically the child class will set $vendorPath and $vendorClass - */ - public function init() {} - - /** - * Run the filter - * @param string text to filter - * @return string filtered text - */ - public function run($text) { - return 'vendorPath)?'require_once "'.$this->vendorPath.'";':'').'$textile___=new '.$this->vendorClass.'();echo $textile___->TextileThis("'.preg_replace(HamlParser::MATCH_INTERPOLATION, '".\1."', $text).'");?>'; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/messages/_i18n.php b/_piecrust/libs/PhamlP/haml/messages/_i18n.php deleted file mode 100755 index c878297..0000000 --- a/_piecrust/libs/PhamlP/haml/messages/_i18n.php +++ /dev/null @@ -1,32 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.messages - */ - return array ( - 'Attribute must be "class" or "id" with array value'=>'', - 'Illegal indentation level ({indentLevel}); indentation level can only increase by one'=>'', - 'Invalid indentation'=>'', - 'Invalid {what} ({value})'=>'', - 'Invalid {what} ({value}); must be one of "{options}"'=>'', - 'Mixed indentation not allowed'=>'', - 'No getter function for {what}'=>'', - 'No setter function for {what}'=>'', - 'Unable to find {what}: {filename}'=>'', - '{what} must extend {base} class'=>'', - ); \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/messages/de.php b/_piecrust/libs/PhamlP/haml/messages/de.php deleted file mode 100755 index 84f41fd..0000000 --- a/_piecrust/libs/PhamlP/haml/messages/de.php +++ /dev/null @@ -1,32 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.messages - */ - return array ( - 'Attribute must be "class" or "id" with array value'=>'Attribute müssen "class" oder "id" mit array-wert', - 'Illegal indentation level ({indentLevel}); indentation level can only increase by one'=>'Illegale einrückungsebene ({indentLevel}); einrückungsebene kann nur von einem anstieg', - 'Invalid indentation'=>'Ungültige einrückung', - 'Invalid {what}'=>'Ungültige {what}', - 'Invalid {what} ({value}); must be one of "{options}"'=>'Ungültige {what} ({value}); muss einer der "{options}"', - 'Mixed indentation not allowed'=>'Mixed einzug nicht erlaubt', - 'No getter function for {what}'=>'Kein getter-funktion für {what}', - 'No setter function for {what}'=>'Kein setter-funktion für {what}', - 'Unable to find {what}: {filename}'=>'Kann zu finden {what}: {filename}', - '{what} must extend {base} class'=>'{what} muss {base} klasse erweitern', - ); \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/messages/fr.php b/_piecrust/libs/PhamlP/haml/messages/fr.php deleted file mode 100755 index ebb0485..0000000 --- a/_piecrust/libs/PhamlP/haml/messages/fr.php +++ /dev/null @@ -1,32 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.messages - */ - return array ( - 'Attribute must be "class" or "id" with array value'=>"D'attributs doivent être \"class\" ou \"id\" avec valeur de array", - 'Illegal indentation level ({indentLevel}); indentation level can only increase by one: {file}::{line}'=>"Niveau niveau d'indentation illégale ({indentLevel}); ne peut augmenter d'un: {file}::{line}", - 'Invalid indentation: {line}::{file}'=>'Indentation blancs: {line}::{file}', - 'Invalid {what} ({value}): {file}::{line}'=>'Invalide {what} ({value}): {file}::{line}', - 'Invalid {what} ({value}); must be one of "{options}".'=>"Invalide {what} ({value}); doit être l'un des \"{options}\"", - 'Mixed indentation not allowed: {file}::{line}'=>'Indentation mixte pas autorisé: {file}::{line}', - 'No getter function for {what}'=>'Pas de fonction getter pour {what}', - 'No setter function for {what}'=>'Pas de fonction setter pour {what}', - 'Unable to find {what}: {filename}.'=>'Impossible de trouver {what}: {filename}.', - '{what} must extend {base} class.'=>"{what} doit s'étendre classe {base}", - ); \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/renderers/HamlCompactRenderer.php b/_piecrust/libs/PhamlP/haml/renderers/HamlCompactRenderer.php deleted file mode 100755 index 59d555f..0000000 --- a/_piecrust/libs/PhamlP/haml/renderers/HamlCompactRenderer.php +++ /dev/null @@ -1,32 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.renderers - */ - -/** - * HamlCompactRenderer class. - * Renders blocks on single lines. - * @package PHamlP - * @subpackage Haml.renderers - */ -class HamlCompactRenderer extends HamlRenderer { - /** - * Renders the opening tag of an element - */ - public function renderOpeningTag($node) { - return ($node->isBlock ? '' : ' ') . parent::renderOpeningTag($node); - } - - /** - * Renders the closing tag of an element - */ - public function renderClosingTag($node) { - return parent::renderClosingTag($node) . ($node->isBlock ? "\n" : ' '); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/renderers/HamlCompressedRenderer.php b/_piecrust/libs/PhamlP/haml/renderers/HamlCompressedRenderer.php deleted file mode 100755 index f9059e2..0000000 --- a/_piecrust/libs/PhamlP/haml/renderers/HamlCompressedRenderer.php +++ /dev/null @@ -1,48 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.renderers - */ - -/** - * HamlCompressedRenderer class. - * Output has minimal whitespace. - * @package PHamlP - * @subpackage Haml.renderers - */ -class HamlCompressedRenderer extends HamlRenderer { - /** - * Renders the opening of a comment. - * Only conditional comments are rendered - */ - public function renderOpenComment($node) { - if ($node->isConditional) return parent::renderOpenComment($node); - } - - /** - * Renders the closing of a comment. - * Only conditional comments are rendered - */ - public function renderCloseComment($node) { - if ($node->isConditional) return parent::renderCloseComment($node); - } - - /** - * Renders the opening tag of an element - */ - public function renderOpeningTag($node) { - return ($node->isBlock ? '' : ' ') . parent::renderOpeningTag($node); - } - - /** - * Renders the closing tag of an element - */ - public function renderClosingTag($node) { - return parent::renderClosingTag($node) . ($node->isBlock ? '' : ' '); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/renderers/HamlExpandedRenderer.php b/_piecrust/libs/PhamlP/haml/renderers/HamlExpandedRenderer.php deleted file mode 100755 index f6849fe..0000000 --- a/_piecrust/libs/PhamlP/haml/renderers/HamlExpandedRenderer.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.renderers - */ - -/** - * HamlExpandedRenderer class. - * Blocks are on single lines and content indented. - * @package PHamlP - * @subpackage Haml.renderers - */ -class HamlExpandedRenderer extends HamlRenderer { - /** - * Renders the opening tag of an element - */ - public function renderOpeningTag($node) { - return parent::renderOpeningTag($node) . - ($node->whitespaceControl['inner'] ? '' : - ($node->isSelfClosing && $node->whitespaceControl['outer'] ? '' : "\n")); - } - - /** - * Renders the closing tag of an element - */ - public function renderClosingTag($node) { - return ($node->isSelfClosing ? '' : parent::renderClosingTag($node) . - ($node->whitespaceControl['outer'] ? '' : "\n")); - } - - /** - * Renders content. - * @param HamlNode the node being rendered - * @return string the rendered content - */ - public function renderContent($node) { - return self::INDENT . parent::renderContent($node) . "\n"; - } - - /** - * Renders the start of a code block - */ - public function renderStartCodeBlock($node) { - return parent::renderStartCodeBlock($node) . "\n"; - } - - /** - * Renders the end of a code block - */ - public function renderEndCodeBlock($node) { - return parent::renderEndCodeBlock($node) . "\n"; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/renderers/HamlNestedRenderer.php b/_piecrust/libs/PhamlP/haml/renderers/HamlNestedRenderer.php deleted file mode 100755 index 1221100..0000000 --- a/_piecrust/libs/PhamlP/haml/renderers/HamlNestedRenderer.php +++ /dev/null @@ -1,77 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.renderers - */ - -/** - * HamlNestedRenderer class. - * Blocks and content are indented according to their nesting level. - * @package PHamlP - * @subpackage Haml.renderers - */ -class HamlNestedRenderer extends HamlRenderer { - /** - * Renders the opening tag of an element - */ - public function renderOpeningTag($node) { - return ($node->whitespaceControl['outer'] ? '' : $this->getIndent($node)) . - parent::renderOpeningTag($node) . ($node->whitespaceControl['inner'] ? '' : - ($node->isSelfClosing && $node->whitespaceControl['outer'] ? '' : "\n")); - } - - /** - * Renders the closing tag of an element - */ - public function renderClosingTag($node) { - return ($node->isSelfClosing ? '' : ($node->whitespaceControl['inner'] ? '' : - $this->getIndent($node)) . parent::renderClosingTag($node) . - ($node->whitespaceControl['outer'] ? '' : "\n")); - } - - /** - * Renders content. - * @param HamlNode the node being rendered - * @return string the rendered content - */ - public function renderContent($node) { - return $this->getIndent($node) . parent::renderContent($node) . "\n"; - } - - /** - * Renders the opening of a comment - */ - public function renderOpenComment($node) { - return parent::renderOpenComment($node) . (empty($node->content) ? "\n" : ''); - } - - /** - * Renders the closing of a comment - */ - public function renderCloseComment($node) { - return parent::renderCloseComment($node) . "\n"; - } - - /** - * Renders the start of a code block - */ - public function renderStartCodeBlock($node) { - return $this->getIndent($node) . parent::renderStartCodeBlock($node) . "\n"; - } - - /** - * Renders the end of a code block - */ - public function renderEndCodeBlock($node) { - return $this->getIndent($node) . parent::renderEndCodeBlock($node) . "\n"; - } - - private function getIndent($node) { - return str_repeat(' ', 2 * $node->level); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/renderers/HamlRenderer.php b/_piecrust/libs/PhamlP/haml/renderers/HamlRenderer.php deleted file mode 100755 index 3ce06fe..0000000 --- a/_piecrust/libs/PhamlP/haml/renderers/HamlRenderer.php +++ /dev/null @@ -1,152 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.renderers - */ - -require_once('HamlCompressedRenderer.php'); -require_once('HamlCompactRenderer.php'); -require_once('HamlExpandedRenderer.php'); -require_once('HamlNestedRenderer.php'); - -/** - * HamlRenderer class. - * Provides the most common version of each method. Child classs override - * methods to provide style specific rendering. - * @package PHamlP - * @subpackage Haml.renderers - */ -class HamlRenderer { - /**#@+ - * Output Styles - */ - const STYLE_COMPRESSED = 'compressed'; - const STYLE_COMPACT = 'compact'; - const STYLE_EXPANDED = 'expanded'; - const STYLE_NESTED = 'nested'; - /**#@-*/ - - const INDENT = ' '; - - private $format; - private $attrWrapper; - private $minimizedAttributes; - - /** - * Returns the renderer for the required render style. - * @param string render style - * @return HamlRenderer - */ - static public function getRenderer($style, $options) { - switch ($style) { - case self::STYLE_COMPACT: - return new HamlCompactRenderer($options); - case self::STYLE_COMPRESSED: - return new HamlCompressedRenderer($options); - case self::STYLE_EXPANDED: - return new HamlExpandedRenderer($options); - case self::STYLE_NESTED: - return new HamlNestedRenderer($options); - } // switch - } - - public function __construct($options) { - foreach ($options as $name => $value) { - $this->$name = $value; - } // foreach - } - - /** - * Renders element attributes - */ - private function renderAttributes($attributes) { - $output = ''; - foreach ($attributes as $name => $value) { - if (is_integer($name)) { // attribute function - $output .= " $value"; - } - elseif ($name == $value && in_array($name, $this->minimizedAttributes) && - ($this->format === 'html4' || $this->format === 'html5')) { - $output .= " $name"; - } - elseif(in_array($name, $this->minimizedAttributes)) - { - // $value is a variable, isset is called to make sure E_NOTICE is not thrown - if(preg_match("/^\\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/", trim($value))) - { - $output .= "<"."?php if(isset($value) && !empty($value)): ?"."> $name={$this->attrWrapper}<"."?php echo $value; ?".">{$this->attrWrapper};<"."?php endif; ?".">"; - } - - // $value is either a method, a constant or a ternary operator - else - { - $output .= "<"."?php if($value): ?"."> $name={$this->attrWrapper}<"."?php echo $value; ?".">{$this->attrWrapper};<"."?php endif; ?".">"; - } - } - else - { - $output .= " $name={$this->attrWrapper}$value{$this->attrWrapper}"; - } - } - return $output; - } - - /** - * Renders the opening tag of an element - */ - public function renderOpeningTag($node) { - $output = "<{$node->content}"; - $output .= $this->renderAttributes($node->attributes); - $output .= ($node->isSelfClosing ? ' /' : '') . '>'; - return $output; - } - - /** - * Renders the closing tag of an element - */ - public function renderClosingTag($node) { - return ($node->isSelfClosing ? '' : "content}>"); - } - - /** - * Renders the opening of a comment - */ - public function renderOpenComment($node) { - return ($node->isConditional ? "\n\n" : '') . "' . ($node->isConditional ? "\n" : ''); - } - - /** - * Renders the start of a code block - */ - public function renderStartCodeBlock($node) { - return $this->renderContent($node); - } - - /** - * Renders the end of a code block - */ - public function renderEndCodeBlock($node) { - return 'doWhile) ? " {$node->doWhile}" : '') . ' ?>'; - } - - /** - * Renders content. - * @param HamlNode the node being rendered - * @return string the rendered content - */ - public function renderContent($node) { - return $node->content; - } -} diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlCodeBlockNode.php b/_piecrust/libs/PhamlP/haml/tree/HamlCodeBlockNode.php deleted file mode 100755 index f824f89..0000000 --- a/_piecrust/libs/PhamlP/haml/tree/HamlCodeBlockNode.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.tree - */ - -require_once('HamlRootNode.php'); -require_once('HamlNodeExceptions.php'); - -/** - * HamlCodeBlockNode class. - * Represents a code block - if, elseif, else, foreach, do, and while. - * @package PHamlP - * @subpackage Haml.tree - */ -class HamlCodeBlockNode extends HamlNode { - /** - * @var HamlCodeBlockNode else nodes for if statements - */ - public $else; - /** - * @var string while clause for do-while loops - */ - public $doWhile; - - /** - * Adds an "else" statement to this node. - * @param SassIfNode "else" statement node to add - * @return SassIfNode this node - */ - public function addElse($node) { - if (is_null($this->else)) { - $node->root = $this->root; - $node->parent = $this->parent; - $this->else = $node; - } - else { - $this->else->addElse($node); - } - return $this; - } - - public function render() { - $output = $this->renderer->renderStartCodeBlock($this); - foreach ($this->children as $child) { - $output .= $child->render(); - } // foreach - $output .= (empty($this->else) ? - $this->renderer->renderEndCodeBlock($this) : $this->else->render()); - - return $this->debug($output); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlCommentNode.php b/_piecrust/libs/PhamlP/haml/tree/HamlCommentNode.php deleted file mode 100755 index 227ab07..0000000 --- a/_piecrust/libs/PhamlP/haml/tree/HamlCommentNode.php +++ /dev/null @@ -1,41 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.tree - */ - -/** - * HamlCommentNode class. - * Represents a comment, including MSIE conditional comments. - * @package PHamlP - * @subpackage Haml.tree - */ -class HamlCommentNode extends HamlNode { - private $isConditional; - - public function __construct($content, $parent) { - $this->content = $content; - $this->isConditional = (bool)preg_match('/^\[.+\]$/', $content, $matches); - $this->parent = $parent; - $this->root = $parent->root; - $parent->children[] = $this; - } - - public function getIsConditional() { - return $this->isConditional; - } - - public function render() { - $output = $this->renderer->renderOpenComment($this); - foreach ($this->children as $child) { - $output .= $child->render(); - } // foreach - $output .= $this->renderer->renderCloseComment($this); - return $this->debug($output); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlDoctypeNode.php b/_piecrust/libs/PhamlP/haml/tree/HamlDoctypeNode.php deleted file mode 100755 index 0fc73fd..0000000 --- a/_piecrust/libs/PhamlP/haml/tree/HamlDoctypeNode.php +++ /dev/null @@ -1,27 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.tree - */ - -/** - * HamlDoctypeNode class. - * Represents a Doctype. - * Doctypes are always rendered on a single line with a newline. - * @package PHamlP - * @subpackage Haml.tree - */ -class HamlDoctypeNode extends HamlNode { - /** - * Render this node. - * @return string the rendered node - */ - public function render() { - return $this->debug($this->content . "\n"); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlElementNode.php b/_piecrust/libs/PhamlP/haml/tree/HamlElementNode.php deleted file mode 100755 index 8bf93bc..0000000 --- a/_piecrust/libs/PhamlP/haml/tree/HamlElementNode.php +++ /dev/null @@ -1,52 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.tree - */ - -require_once('HamlRootNode.php'); -require_once('HamlNodeExceptions.php'); - -/** - * HamlElementNode class. - * Represents an element. - * @package PHamlP - * @subpackage Haml.tree - */ -class HamlElementNode extends HamlNode { - public $isBlock; - public $isSelfClosing; - public $attributes; - public $whitespaceControl; - public $escapeHTML; - - public function render() { - $renderer = $this->renderer; - $this->output = $renderer->renderOpeningTag($this); - $close = $renderer->renderClosingTag($this); - - if ($this->whitespaceControl['outer']['left']) { - $this->output = ltrim($this->output); - $close = rtrim($close); - $this->parent->output = rtrim($this->parent->output); - } - - foreach ($this->children as $index=>$child) { - $output = $child->render(); - $output = ($this->whitespaceControl['inner'] ? trim($output) : $output); - if ($index && $this->children[$index-1] instanceof HamlElementNode && $this->children[$index-1]->whitespaceControl['outer']['right']) { - $output = ltrim($output); - } - $this->output .= $output; - } // foreach - - return $this->debug($this->output . (isset($child) && - $child instanceof HamlElementNode && - $child->whitespaceControl['outer']['right'] ? ltrim($close) : $close)); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlFilterNode.php b/_piecrust/libs/PhamlP/haml/tree/HamlFilterNode.php deleted file mode 100755 index 36145ac..0000000 --- a/_piecrust/libs/PhamlP/haml/tree/HamlFilterNode.php +++ /dev/null @@ -1,50 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.tree - */ - -/** - * HamlFilterNode class. - * Represent a filter in the Haml source. - * The filter is run on the output from child nodes when the node is rendered. - * @package PHamlP - * @subpackage Haml.tree - */ -class HamlFilterNode extends HamlNode { - /** - * @var HamlBaseFilter the filter to run - */ - private $filter; - - /** - * HamlFilterNode constructor. - * Sets the filter. - * @param HamlBaseFilter the filter to run - * @return HamlFilterNode - */ - public function __construct($filter, $parent) { - $this->filter = $filter; - $this->parent = $parent; - $this->root = $parent->root; - $parent->children[] = $this; - } - - /** - * Render this node. - * The filter is run on the content of child nodes before being returned. - * @return string the rendered node - */ - public function render() { - $output = ''; - foreach ($this->children as $child) { - $output .= $child->getContent(); - } // foreach - return $this->debug($this->filter->run($output)); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlHelperNode.php b/_piecrust/libs/PhamlP/haml/tree/HamlHelperNode.php deleted file mode 100755 index 2484589..0000000 --- a/_piecrust/libs/PhamlP/haml/tree/HamlHelperNode.php +++ /dev/null @@ -1,73 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.tree - */ - -/** - * HamlHelperNode class. - * Represent a helper in the Haml source. - * The helper is run on the output from child nodes when the node is rendered. - * @package PHamlP - * @subpackage Haml.tree - */ -class HamlHelperNode extends HamlNode { - const MATCH = '/(.*?)(\w+)\((.+?)\)(?:\s+(.*))?$/'; - const PRE = 1; - const NAME = 2; - const ARGS = 3; - const BLOCK = 4; - - /** - * @var string the helper class name - */ - private $class; - /** - * @var string helper method name - */ - private $pre; - /** - * @var string helper method name - */ - private $name; - /** - * @var string helper method arguments - */ - private $args; - - /** - * HamlFilterNode constructor. - * Sets the filter. - * @param string helper class. - * @param string helper call. - * @return HamlHelperNode - */ - public function __construct($class, $pre, $name, $args, $parent) { - $this->class = $class; - $this->pre = $pre; - $this->name = $name; - $this->args = $args; - $this->parent = $parent; - $this->root = $parent->root; - $parent->children[] = $this; - } - - /** - * Render this node. - * The filter is run on the content of child nodes before being returned. - * @return string the rendered node - */ - public function render() { - $children = ''; - foreach ($this->children as $child) { - $children .= trim($child->render()); - } // foreach - $output = 'pre) ? 'echo' : $this->pre)." {$this->class}::{$this->name}('$children',{$this->args}); ?>"; - return $this->debug($output); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlNode.php b/_piecrust/libs/PhamlP/haml/tree/HamlNode.php deleted file mode 100755 index 6e661d2..0000000 --- a/_piecrust/libs/PhamlP/haml/tree/HamlNode.php +++ /dev/null @@ -1,253 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.tree - */ - -require_once('HamlRootNode.php'); -require_once('HamlCommentNode.php'); -require_once('HamlDoctypeNode.php'); -require_once('HamlElementNode.php'); -require_once('HamlFilterNode.php'); -require_once('HamlHelperNode.php'); -require_once('HamlCodeBlockNode.php'); -require_once('HamlNodeExceptions.php'); - -/** - * HamlNode class. - * Base class for all Haml nodes. - * @package PHamlP - * @subpackage Haml.tree - */ -class HamlNode { - /** - * @var HamlNode root node of this node - */ - protected $root; - /** - * @var HamlNode parent of this node - */ - protected $parent; - /** - * @var array children of this node - */ - protected $children = array(); - /** - * @var array source line token - */ - public $token; - /** - * @var boolean whether to show the output in the browser for debug - */ - public $showOutput; - /** - * @var boolean whether to show the source in the browser for debug - */ - public $showSource; - /** - * @var string content to render - */ - public $content; - /** - * @var string output buffer - */ - protected $output; - /** - * @var HamlRenderer Renderer object - */ - private $_r; - /** - * @var array Options - */ - private $_o; - - public function __construct($content, $parent) { - $this->content = $content; - if (!is_null($parent)) { // $parent === null for "else" code blocks - $this->parent = $parent; - $this->root = $parent->root; - $parent->children[] = $this; - } - - } - - /** - * Getter. - * @param string name of property to get - * @return mixed return value of getter function - */ - public function __get($name) { - $getter = 'get' . ucfirst($name); - if (method_exists($this, $getter)) { - return $this->$getter(); - } - throw new HamlNodeException('No getter function for {what}', array('{what}'=>$name)); - } - - /** - * Setter. - * @param string name of property to set - * @return mixed value of property - * @return HamlNode this node - */ - public function __set($name, $value) { - $setter = 'set' . ucfirst($name); - if (method_exists($this, $setter)) { - $this->$setter($value); - return $this; - } - throw new HamlNodeException('No setter function for {what}', array('{what}'=>$name)); - } - - /** - * Return a value indicating if this node has a parent - * @return array the node's parent - */ - public function hasParent() { - return !empty($this->parent); - } - - /** - * Returns the node's content and that of its child nodes - * @param integer the indent level. This is to allow properly indented output - * that filters (e.g. Sass) may need. - * @return string the node's content and that of its child nodes - */ - public function getContent($indentLevel = 0) { - $output = str_repeat(' ', 2 * $indentLevel++) . $this->content . "\n"; - foreach ($this->children as $child) { - $output .= $child->getContent($indentLevel); - } // foreach - return $output; - } - - /** - * Returns the node's parent - * @return array the node's parent - */ - public function getParent() { - return $this->parent; - } - - /** - * Returns a value indicating if this node has children - * @return boolean true if the node has children, false if not - */ - public function hasChildren() { - return !empty($this->children); - } - - /** - * Returns the node's children - * @return array the node's children - */ - public function getChildren() { - return $this->children; - } - - /** - * Returns the last child node of this node. - * @return HamlNode the last child node of this node - */ - public function getLastChild() { - return $this->children[count($this->children) - 1]; - } - - /** - * Returns the indent level of this node. - * @return integer the indent level of this node - */ - private function getLevel() { - return $this->token['level']; - } - - /** - * Sets the indent level of this node. - * Used during rendering to give correct indentation. - * @param integer the indent level of this node - * @return HamlNode this node - */ - private function setLevel($level) { - $this->token['level'] = $level; - return $this; - } - - /** - * Returns the source for this node - * @return string the source for this node - */ - private function getSource() { - return $this->token[HamlParser::HAML_SOURCE]; - } - - /** - * Returns the source for this node - * @return string the source for this node - */ - private function getLine() { - return $this->token['line']; - } - - /** - * Returns the filename for this node - * @return string the filename for this node - */ - private function getFilename() { - return $this->token['filename']; - } - - /** - * Returns the options. - * @return array the options - */ - public function getOptions() { - if (empty($this->_o)) { - $this->_r = $this->root->options; - } - return $this->_o; - } - - /** - * Returns the renderer. - * @return HamlRenderer the rendered - */ - public function getRenderer() { - if (empty($this->_r)) { - $this->_r = $this->root->renderer; - } - return $this->_r; - } - - public function render() { - $output = $this->renderer->renderContent($this); - foreach ($this->children as $child) { - $output .= $child->render(); - } // foreach - return $this->debug($output); - } - - protected function debug($output) { - $output = ($this->showSource ? $this->showSource($output) : $output); - return ($this->showOutput && $this->line['indentLevel'] == 0 ? - nl2br(str_replace(' ', ' ', htmlspecialchars($output))) : - $output); - } - - /** - * Adds a comment with source debug information for the current line to the output. - * The debug information is: - * + source file (relative to the application path) - * + line number - * + indent level - * + source code - * @param array source line(s) that generated the ouput - */ - protected function showSource($output) { - return "\n$output"; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlNodeExceptions.php b/_piecrust/libs/PhamlP/haml/tree/HamlNodeExceptions.php deleted file mode 100755 index 9c0c264..0000000 --- a/_piecrust/libs/PhamlP/haml/tree/HamlNodeExceptions.php +++ /dev/null @@ -1,19 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.tree - */ - -require_once(dirname(__FILE__).'/../HamlException.php'); - -/** - * HamlNodeException class. - * @package PHamlP - * @subpackage Haml.tree - */ -class HamlNodeException extends HamlException {} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/haml/tree/HamlRootNode.php b/_piecrust/libs/PhamlP/haml/tree/HamlRootNode.php deleted file mode 100755 index 02f2e1f..0000000 --- a/_piecrust/libs/PhamlP/haml/tree/HamlRootNode.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Haml.tree - */ - -require_once(dirname(__FILE__).'/../renderers/HamlRenderer.php'); - -/** - * HamlRootNode class. - * Also the root node of a document. - * @package PHamlP - * @subpackage Haml.tree - */ -class HamlRootNode extends HamlNode { - /** - * @var HamlRenderer the renderer for this node - */ - protected $renderer; - /** - * @var array options - */ - protected $options; - - /** - * Root HamlNode constructor. - * @param array options for the tree - * @return HamlNode - */ - public function __construct($options) { - $this->root = $this; - $this->options = $options; - $this->renderer = HamlRenderer::getRenderer($this->options['style'], - array( - 'format' => $this->options['format'], - 'attrWrapper' => $this->options['attrWrapper'], - 'minimizedAttributes' => $this->options['minimizedAttributes'], - ) - ); - $this->token = array('level' => -1); - } - - /** - * Render this node. - * @return string the rendered node - */ - public function render() { - foreach ($this->children as $child) { - $this->output .= $child->render(); - } // foreach - return $this->output; - } -} diff --git a/_piecrust/libs/PhamlP/readme.txt b/_piecrust/libs/PhamlP/readme.txt deleted file mode 100644 index e6f93cb..0000000 --- a/_piecrust/libs/PhamlP/readme.txt +++ /dev/null @@ -1,4 +0,0 @@ - -This copy of phamlp is from https://github.com/goncaloesteves/phamlp instead of -the "official" http://code.google.com/p/phamlp/ since that last one seems to be -more or less abandoned. diff --git a/_piecrust/libs/PhamlP/sass/SassException.php b/_piecrust/libs/PhamlP/sass/SassException.php deleted file mode 100755 index 9c3a3d9..0000000 --- a/_piecrust/libs/PhamlP/sass/SassException.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Sass - */ - -require_once(dirname(__FILE__).'/../PhamlpException.php'); - -/** - * Sass exception class. - * @package PHamlP - * @subpackage Sass - */ -class SassException extends PhamlpException { - /** - * Sass Exception. - * @param string Exception message - * @param array parameters to be applied to the message using strtr. - * @param object object with source code and meta data - */ - public function __construct($message, $params = array(), $object = null) { - parent::__construct('sass', $message, $params, $object); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/sass/SassFile.php b/_piecrust/libs/PhamlP/sass/SassFile.php deleted file mode 100755 index 5df7b9a..0000000 --- a/_piecrust/libs/PhamlP/sass/SassFile.php +++ /dev/null @@ -1,167 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Sass - */ - -/** - * SassFile class. - * @package PHamlP - * @subpackage Sass - */ -class SassFile { - const SASS = 'sass'; - const SCSS = 'scss'; - const SASSC = 'sassc'; - - private static $extensions = array(self::SASS, self::SCSS); - - /** - * Returns the parse tree for a file. - * If caching is enabled a cached version will be used if possible; if not the - * parsed file will be cached. - * @param string filename to parse - * @param SassParser Sass parser - * @return SassRootNode - */ - public static function getTree($filename, $parser) { - if ($parser->cache) { - $cached = self::getCachedFile($filename, $parser->cache_location); - if ($cached !== false) { - return $cached; - } - } - - $sassParser = new SassParser(array_merge($parser->options, array('line'=>1))); - $tree = $sassParser->parse($filename); - if ($parser->cache) { - self::setCachedFile($tree, $filename, $parser->cache_location); - } - return $tree; - } - - /** - * Returns the full path to a file to parse. - * The file is looked for recursively under the load_paths directories and - * the template_location directory. - * If the filename does not end in .sass or .scss try the current syntax first - * then, if a file is not found, try the other syntax. - * @param string filename to find - * @param SassParser Sass parser - * @return string path to file - * @throws SassException if file not found - */ - public static function getFile($filename, $parser) { - $ext = substr($filename, -5); - - foreach (self::$extensions as $i=>$extension) { - if ($ext !== '.'.self::SASS && $ext !== '.'.self::SCSS) { - if ($i===0) { - $_filename = "$filename.{$parser->syntax}"; - } - else { - $_filename = $filename.'.'.($parser->syntax === self::SASS ? self::SCSS : self::SASS); - } - } - else { - $_filename = $filename; - } - - if (file_exists($_filename)) { - return $_filename; - } - - $paths = $parser->load_paths; - if(!empty($parser->filename)) - $paths[] = dirname($parser->filename); - foreach($paths as $loadPath) { - $path = self::findFile($_filename, realpath($loadPath)); - if ($path !== false) { - return $path; - } - } // foreach - - if (!empty($parser->template_location)) { - $path = self::findFile($_filename, realpath($parser->template_location)); - if ($path !== false) { - return $path; - } - } - } - - throw new SassException('Unable to find {what}: {filename}', array('{what}'=>'import file', '{filename}'=>$filename)); - } - - /** - * Looks for the file recursively in the specified directory. - * This will also look for _filename to handle Sass partials. - * @param string filename to look for - * @param string path to directory to look in and under - * @return mixed string: full path to file if found, false if not - */ - public static function findFile($filename, $dir) { - $partialname = dirname($filename).DIRECTORY_SEPARATOR.'_'.basename($filename); - - foreach (array($filename, $partialname) as $file) { - if (file_exists($dir . DIRECTORY_SEPARATOR . $file)) { - return realpath($dir . DIRECTORY_SEPARATOR . $file); - } - } - - $files = array_slice(scandir($dir), 2); - - foreach ($files as $file) { - if (is_dir($dir . DIRECTORY_SEPARATOR . $file)) { - $path = self::findFile($filename, $dir . DIRECTORY_SEPARATOR . $file); - if ($path !== false) { - return $path; - } - } - } // foreach - return false; - } - - /** - * Returns a cached version of the file if available. - * @param string filename to fetch - * @param string path to cache location - * @return mixed the cached file if available or false if it is not - */ - public static function getCachedFile($filename, $cacheLocation) { - $cached = realpath($cacheLocation) . DIRECTORY_SEPARATOR . - md5($filename) . '.'.self::SASSC; - - if ($cached && file_exists($cached) && - filemtime($cached) >= filemtime($filename)) { - return unserialize(file_get_contents($cached)); - } - return false; - } - - /** - * Saves a cached version of the file. - * @param SassRootNode Sass tree to save - * @param string filename to save - * @param string path to cache location - * @return mixed the cached file if available or false if it is not - */ - public static function setCachedFile($sassc, $filename, $cacheLocation) { - $cacheDir = realpath($cacheLocation); - - if (!$cacheDir) { - mkdir($cacheLocation); - @chmod($cacheLocation, 0777); - $cacheDir = realpath($cacheLocation); - } - - $cached = $cacheDir . DIRECTORY_SEPARATOR . md5($filename) . '.'.self::SASSC; - - return file_put_contents($cached, serialize($sassc)); - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/sass/SassParser.php b/_piecrust/libs/PhamlP/sass/SassParser.php deleted file mode 100755 index 03060f6..0000000 --- a/_piecrust/libs/PhamlP/sass/SassParser.php +++ /dev/null @@ -1,849 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Sass - */ - -require_once('SassFile.php'); -require_once('SassException.php'); -require_once('tree/SassNode.php'); - -/** - * SassParser class. - * Parses {@link http://sass-lang.com/ .sass and .sccs} files. - * @package PHamlP - * @subpackage Sass - */ -class SassParser { - /**#@+ - * Default option values - */ - const CACHE = true; - const CACHE_LOCATION = './sass-cache'; - const CSS_LOCATION = './css'; - const TEMPLATE_LOCATION = './sass-templates'; - const BEGIN_COMMENT = '/'; - const BEGIN_CSS_COMMENT = '/*'; - const END_CSS_COMMENT = '*/'; - const BEGIN_SASS_COMMENT= '//'; - const BEGIN_INTERPOLATION = '#'; - const BEGIN_INTERPOLATION_BLOCK = '#{'; - const BEGIN_BLOCK = '{'; - const END_BLOCK = '}'; - const END_STATEMENT = ';'; - const DOUBLE_QUOTE = '"'; - const SINGLE_QUOTE = "'"; - - /** - * @var string the character used for indenting - * @see indentChars - * @see indentSpaces - */ - private $indentChar; - /** - * @var array allowable characters for indenting - */ - private $indentChars = array(' ', "\t"); - /** - * @var integer number of spaces for indentation. - * Used to calculate {@link Level} if {@link indentChar} is space. - */ - private $indentSpaces = 2; - - /** - * @var string source - */ - private $source; - - /**#@+ - * Option - */ - /** - * cache: - * @var boolean Whether parsed Sass files should be cached, allowing greater - * speed. - * - * Defaults to true. - */ - private $cache; - - /** - * cache_location: - * @var string The path where the cached sassc files should be written to. - * - * Defaults to './sass-cache'. - */ - private $cache_location; - - /** - * css_location: - * @var string The path where CSS output should be written to. - * - * Defaults to './css'. - */ - private $css_location; - - /** - * debug_info: - * @var boolean When true the line number and file where a selector is defined - * is emitted into the compiled CSS in a format that can be understood by the - * {@link https://addons.mozilla.org/en-US/firefox/addon/103988/ - * FireSass Firebug extension}. - * Disabled when using the compressed output style. - * - * Defaults to false. - * @see style - */ - private $debug_info; - - /** - * extensions: - * @var array Sass extensions, e.g. Compass. An associative array of the form - * $name => $options where $name is the name of the extension and $options - * is an array of name=>value options pairs. - */ - protected $extensions; - - /** - * filename: - * @var string The filename of the file being rendered. - * This is used solely for reporting errors. - */ - protected $filename; - - /** - * function_paths: - * @var array An array of filesystem paths which should be searched for - * SassScript functions. - */ - private $function_paths; - - /** - * line: - * @var integer The number of the first line of the Sass template. Used for - * reporting line numbers for errors. This is useful to set if the Sass - * template is embedded. - * - * Defaults to 1. - */ - private $line; - - /** - * line_numbers: - * @var boolean When true the line number and filename where a selector is - * defined is emitted into the compiled CSS as a comment. Useful for debugging - * especially when using imports and mixins. - * Disabled when using the compressed output style or the debug_info option. - * - * Defaults to false. - * @see debug_info - * @see style - */ - private $line_numbers; - - /** - * load_paths: - * @var array An array of filesystem paths which should be searched for - * Sass templates imported with the @import directive. - * - * Defaults to './sass-templates'. - */ - private $load_paths; - - /** - * property_syntax: - * @var string Forces the document to use one syntax for - * properties. If the correct syntax isn't used, an error is thrown. - * Value can be: - * + new - forces the use of a colon or equals sign after the property name. - * For example color: #0f3 or width: $main_width. - * + old - forces the use of a colon before the property name. - * For example: :color #0f3 or :width = $main_width. - * - * By default, either syntax is valid. - * - * Ignored for SCSS files which alaways use the new style. - */ - private $property_syntax; - - /** - * quiet: - * @var boolean When set to true, causes warnings to be disabled. - * Defaults to false. - */ - private $quiet; - - /** - * style: - * @var string the style of the CSS output. - * Value can be: - * + nested - Nested is the default Sass style, because it reflects the - * structure of the document in much the same way Sass does. Each selector - * and rule has its own line with indentation is based on how deeply the rule - * is nested. Nested style is very useful when looking at large CSS files as - * it allows you to very easily grasp the structure of the file without - * actually reading anything. - * + expanded - Expanded is the typical human-made CSS style, with each selector - * and property taking up one line. Selectors are not indented; properties are - * indented within the rules. - * + compact - Each CSS rule takes up only one line, with every property defined - * on that line. Nested rules are placed with each other while groups of rules - * are separated by a blank line. - * + compressed - Compressed has no whitespace except that necessary to separate - * selectors and properties. It's not meant to be human-readable. - * - * Defaults to 'nested'. - */ - private $style; - - /** - * syntax: - * @var string The syntax of the input file. - * 'sass' for the indented syntax and 'scss' for the CSS-extension syntax. - * - * This is set automatically when parsing a file, else defaults to 'sass'. - */ - private $syntax; - - /** - * template_location: - * @var string Path to the root sass template directory for your - * application. - */ - private $template_location; - - /** - * vendor_properties: - * If enabled a property need only be written in the standard form and vendor - * specific versions will be added to the style sheet. - * @var mixed array: vendor properties, merged with the built-in vendor - * properties, to automatically apply. - * Boolean true: use built in vendor properties. - * - * Defaults to vendor_properties disabled. - * @see _vendorProperties - */ - private $vendor_properties = array(); - - /**#@-*/ - /** - * Defines the build-in vendor properties - * @var array built-in vendor properties - * @see vendor_properties - */ - private $_vendorProperties = array( - 'border-radius' => array( - '-moz-border-radius', - '-webkit-border-radius', - '-khtml-border-radius' - ), - 'border-top-right-radius' => array( - '-moz-border-radius-topright', - '-webkit-border-top-right-radius', - '-khtml-border-top-right-radius' - ), - 'border-bottom-right-radius' => array( - '-moz-border-radius-bottomright', - '-webkit-border-bottom-right-radius', - '-khtml-border-bottom-right-radius' - ), - 'border-bottom-left-radius' => array( - '-moz-border-radius-bottomleft', - '-webkit-border-bottom-left-radius', - '-khtml-border-bottom-left-radius' - ), - 'border-top-left-radius' => array( - '-moz-border-radius-topleft', - '-webkit-border-top-left-radius', - '-khtml-border-top-left-radius' - ), - 'box-shadow' => array('-moz-box-shadow', '-webkit-box-shadow'), - 'box-sizing' => array('-moz-box-sizing', '-webkit-box-sizing'), - 'opacity' => array('-moz-opacity', '-webkit-opacity', '-khtml-opacity'), - ); - - /** - * Constructor. - * Sets parser options - * @param array $options - * @return SassParser - */ - public function __construct($options = array()) { - if (!is_array($options)) { - throw new SassException('{what} must be a {type}', array('{what}'=>'options', '{type}'=>'array')); - } - if (!empty($options['language'])) { - Phamlp::$language = $options['language']; - } - - if (!empty($options['extensions'])) { - foreach ($options['extensions'] as $extension=>$extOptions) { - include dirname(__FILE__).DIRECTORY_SEPARATOR.'extensions'.DIRECTORY_SEPARATOR.$extension.DIRECTORY_SEPARATOR.'config.php'; - $configClass = 'SassExtentions'.$extension.'Config'; - $config = new $configClass; - $config->config($extOptions); - - $lp = dirname(__FILE__).DIRECTORY_SEPARATOR.'extensions'.DIRECTORY_SEPARATOR.$extension.DIRECTORY_SEPARATOR.'frameworks'; - $fp = dirname(__FILE__).DIRECTORY_SEPARATOR.'extensions'.DIRECTORY_SEPARATOR.$extension.DIRECTORY_SEPARATOR.'functions'; - $options['load_paths'] = (empty($options['load_paths']) ? - array($lp) : array_merge($options['load_paths'], $lp)); - $options['function_paths'] = (empty($options['function_paths']) ? - array($fp) : array_merge($options['function_paths'], $fp)); - } - } - - if (!empty($options['vendor_properties'])) { - if ($options['vendor_properties'] === true) { - $this->vendor_properties = $this->_vendorProperties; - } - elseif (is_array($options['vendor_properties'])) { - $this->vendor_properties = array_merge($this->_vendorProperties, $options['vendor_properties']); - } - } - unset($options['language'], $options['vendor_properties']); - - $defaultOptions = array( - 'cache' => self::CACHE, - 'cache_location' => dirname(__FILE__) . DIRECTORY_SEPARATOR . self::CACHE_LOCATION, - 'css_location' => dirname(__FILE__) . DIRECTORY_SEPARATOR . self::CSS_LOCATION, - 'debug_info' => false, - 'filename' => array('dirname' => '', 'basename' => ''), - 'function_paths' => array(), - 'load_paths' => array(dirname(__FILE__) . DIRECTORY_SEPARATOR . self::TEMPLATE_LOCATION), - 'line' => 1, - 'line_numbers' => false, - 'style' => SassRenderer::STYLE_NESTED, - 'syntax' => SassFile::SASS - ); - - foreach (array_merge($defaultOptions, $options) as $name=>$value) { - if (property_exists($this, $name)) { - $this->$name = $value; - } - } - } - - /** - * Getter. - * @param string name of property to get - * @return mixed return value of getter function - */ - public function __get($name) { - $getter = 'get' . ucfirst($name); - if (method_exists($this, $getter)) { - return $this->$getter(); - } - throw new SassException('No getter function for {what}', array('{what}'=>$name)); - } - - public function getCache() { - return $this->cache; - } - - public function getCache_location() { - return $this->cache_location; - } - - public function getCss_location() { - return $this->css_location; - } - - public function getDebug_info() { - return $this->debug_info; - } - - public function getFilename() { - return $this->filename; - } - - public function getLine() { - return $this->line; - } - - public function getSource() { - return $this->source; - } - - public function getLine_numbers() { - return $this->line_numbers; - } - - public function getFunction_paths() { - return $this->function_paths; - } - - public function getLoad_paths() { - return $this->load_paths; - } - - public function getProperty_syntax() { - return $this->property_syntax; - } - - public function getQuiet() { - return $this->quiet; - } - - public function getStyle() { - return $this->style; - } - - public function getSyntax() { - return $this->syntax; - } - - public function getTemplate_location() { - return $this->template_location; - } - - public function getVendor_properties() { - return $this->vendor_properties; - } - - public function getOptions() { - return array( - 'cache' => $this->cache, - 'cache_location' => $this->cache_location, - 'css_location' => $this->css_location, - 'filename' => $this->filename, - 'function_paths' => $this->function_paths, - 'line' => $this->line, - 'line_numbers' => $this->line_numbers, - 'load_paths' => $this->load_paths, - 'property_syntax' => $this->property_syntax, - 'quiet' => $this->quiet, - 'style' => $this->style, - 'syntax' => $this->syntax, - 'template_location' => $this->template_location, - 'vendor_properties' => $this->vendor_properties - ); - } - - /** - * Parse a sass file or Sass source code and returns the CSS. - * @param string name of source file or Sass source - * @return string CSS - */ - public function toCss($source, $isFile = true) { - return $this->parse($source, $isFile)->render(); - } - - /** - * Parse a sass file or Sass source code and - * returns the document tree that can then be rendered. - * The file will be searched for in the directories specified by the - * load_paths option. - * If caching is enabled a cached version will be used if possible or the - * compiled version cached if not. - * @param string name of source file or Sass source - * @return SassRootNode Root node of document tree - */ - public function parse($source, $isFile = true) { - if ($isFile) { - $this->filename = SassFile::getFile($source, $this); - - if ($isFile) { - $this->syntax = substr($this->filename, -4); - } - elseif ($this->syntax !== SassFile::SASS && $this->syntax !== SassFile::SCSS) { - throw new SassException('Invalid {what}', array('{what}'=>'syntax option')); - } - - if ($this->cache) { - $cached = SassFile::getCachedFile($this->filename, $this->cache_location); - if ($cached !== false) { - return $cached; - } - } - - $tree = $this->toTree(file_get_contents($this->filename)); - - if ($this->cache) { - SassFile::setCachedFile($tree, $this->filename, $this->cache_location); - } - - return $tree; - } - else { - return $this->toTree($source); - } - } - - /** - * Parse Sass source into a document tree. - * If the tree is already created return that. - * @param string Sass source - * @return SassRootNode the root of this document tree - */ - private function toTree($source) { - if ($this->syntax === SassFile::SASS) { - $source = str_replace(array("\r\n", "\n\r", "\r"), "\n", $source); - $this->source = explode("\n", $source); - $this->setIndentChar(); - } - else { - $this->source = $source; - } - unset($source); - $root = new SassRootNode($this); - $this->buildTree($root); - return $root; - } - - /** - * Builds a parse tree under the parent node. - * Called recursivly until the source is parsed. - * @param SassNode the node - */ - private function buildTree($parent) { - $node = $this->getNode($parent); - while (is_object($node) && $node->isChildOf($parent)) { - $parent->addChild($node); - $node = $this->buildTree($node); - } - return $node; - } - - /** - * Creates and returns the next SassNode. - * The tpye of SassNode depends on the content of the SassToken. - * @return SassNode a SassNode of the appropriate type. Null when no more - * source to parse. - */ - private function getNode($node) { - $token = $this->getToken(); - if (empty($token)) return null; - switch (true) { - case SassDirectiveNode::isa($token): - return $this->parseDirective($token, $node); - break; - case SassCommentNode::isa($token): - return new SassCommentNode($token); - break; - case SassVariableNode::isa($token): - return new SassVariableNode($token); - break; - case SassPropertyNode::isa(array('token' => $token, 'syntax' => $this->property_syntax)): - return new SassPropertyNode($token, $this->property_syntax); - break; - case SassMixinDefinitionNode::isa($token): - if ($this->syntax === SassFile::SCSS) { - throw new SassException('Mixin {which} shortcut not allowed in SCSS', array('{which}'=>'definition'), $this); - } - return new SassMixinDefinitionNode($token); - break; - case SassMixinNode::isa($token): - if ($this->syntax === SassFile::SCSS) { - throw new SassException('Mixin {which} shortcut not allowed in SCSS', array('{which}'=>'include'), $this); - } - return new SassMixinNode($token); - break; - default: - return new SassRuleNode($token); - break; - } // switch - } - - /** - * Returns a token object that contains the next source statement and - * meta data about it. - * @return object - */ - private function getToken() { - return ($this->syntax === SassFile::SASS ? $this->sass2Token() : $this->scss2Token()); - } - - /** - * Returns an object that contains the next source statement and meta data - * about it from SASS source. - * Sass statements are passed over. Statements spanning multiple lines, e.g. - * CSS comments and selectors, are assembled into a single statement. - * @return object Statement token. Null if end of source. - */ - private function sass2Token() { - $statement = ''; // source line being tokenised - $token = null; - - while (is_null($token) && !empty($this->source)) { - while (empty($statement) && !empty($this->source)) { - $source = array_shift($this->source); - $statement = trim($source); - $this->line++; - } - - if (empty($statement)) { - break; - } - - $level = $this->getLevel($source); - - // Comment statements can span multiple lines - if ($statement[0] === self::BEGIN_COMMENT) { - // Consume Sass comments - if (substr($statement, 0, strlen(self::BEGIN_SASS_COMMENT)) - === self::BEGIN_SASS_COMMENT) { - unset($statement); - while($this->getLevel($this->source[0]) > $level) { - array_shift($this->source); - $this->line++; - } - continue; - } - // Build CSS comments - elseif (substr($statement, 0, strlen(self::BEGIN_CSS_COMMENT)) - === self::BEGIN_CSS_COMMENT) { - while($this->getLevel($this->source[0]) > $level) { - $statement .= "\n" . ltrim(array_shift($this->source)); - $this->line++; - } - } - else { - $this->source = $statement; - throw new SassException('Illegal comment type', array(), $this); - } - } - // Selector statements can span multiple lines - elseif (substr($statement, -1) === SassRuleNode::CONTINUED) { - // Build the selector statement - while($this->getLevel($this->source[0]) === $level) { - $statement .= ltrim(array_shift($this->source)); - $this->line++; - } - } - - $token = (object) array( - 'source' => $statement, - 'level' => $level, - 'filename' => $this->filename, - 'line' => $this->line - 1, - ); - } - return $token; - } - - /** - * Returns the level of the line. - * Used for .sass source - * @param string the source - * @return integer the level of the source - * @throws Exception if the source indentation is invalid - */ - private function getLevel($source) { - $indent = strlen($source) - strlen(ltrim($source)); - $level = $indent/$this->indentSpaces; - if (!is_int($level) || - preg_match("/[^{$this->indentChar}]/", substr($source, 0, $indent))) { - $this->source = $source; - throw new SassException('Invalid indentation', array(), $this); - } - return $level; - } - - /** - * Returns an object that contains the next source statement and meta data - * about it from SCSS source. - * @return object Statement token. Null if end of source. - */ - private function scss2Token() { - static $srcpos = 0; // current position in the source stream - static $srclen; // the length of the source stream - - $statement = ''; - $token = null; - if (empty($srclen)) { - $srclen = strlen($this->source); - } - while (is_null($token) && $srcpos < $srclen) { - $c = $this->source[$srcpos++]; - switch ($c) { - case self::BEGIN_COMMENT: - if (substr($this->source, $srcpos-1, strlen(self::BEGIN_SASS_COMMENT)) - === self::BEGIN_SASS_COMMENT) { - while ($this->source[$srcpos++] !== "\n"); - $statement .= "\n"; - } - elseif (substr($this->source, $srcpos-1, strlen(self::BEGIN_CSS_COMMENT)) - === self::BEGIN_CSS_COMMENT) { - if (ltrim($statement)) { - throw new SassException('Invalid {what}', array('{what}'=>'comment'), (object) array( - 'source' => $statement, - 'filename' => $this->filename, - 'line' => $this->line, - )); - } - $statement .= $c.$this->source[$srcpos++]; - while (substr($this->source, $srcpos, strlen(self::END_CSS_COMMENT)) - !== self::END_CSS_COMMENT) { - $statement .= $this->source[$srcpos++]; - } - $srcpos += strlen(self::END_CSS_COMMENT); - $token = $this->createToken($statement.self::END_CSS_COMMENT); - } - else { - $statement .= $c; - } - break; - case self::DOUBLE_QUOTE: - case self::SINGLE_QUOTE: - $statement .= $c; - while ($this->source[$srcpos] !== $c) { - $statement .= $this->source[$srcpos++]; - } - $statement .= $this->source[$srcpos++]; - break; - case self::BEGIN_INTERPOLATION: - $statement .= $c; - if (substr($this->source, $srcpos-1, strlen(self::BEGIN_INTERPOLATION_BLOCK)) - === self::BEGIN_INTERPOLATION_BLOCK) { - while ($this->source[$srcpos] !== self::END_BLOCK) { - $statement .= $this->source[$srcpos++]; - } - $statement .= $this->source[$srcpos++]; - } - break; - case self::BEGIN_BLOCK: - case self::END_BLOCK: - case self::END_STATEMENT: - $token = $this->createToken($statement . $c); - if (is_null($token)) $statement = ''; - break; - default: - $statement .= $c; - break; - } - } - - if (is_null($token)) - $srclen = $srcpos = 0; - - return $token; - } - - /** - * Returns an object that contains the source statement and meta data about - * it. - * If the statement is just and end block we update the meta data and return null. - * @param string source statement - * @return SassToken - */ - private function createToken($statement) { - static $level = 0; - - $this->line += substr_count($statement, "\n"); - $statement = trim($statement); - if (substr($statement, 0, strlen(self::BEGIN_CSS_COMMENT)) !== self::BEGIN_CSS_COMMENT) { - $statement = str_replace(array("\n","\r"), '', $statement); - } - $last = substr($statement, -1); - // Trim the statement removing whitespace, end statement (;), begin block ({), and (unless the statement ends in an interpolation block) end block (}) - $statement = rtrim($statement, ' '.self::BEGIN_BLOCK.self::END_STATEMENT); - $statement = (preg_match('/#\{.+?\}$/i', $statement) ? $statement : rtrim($statement, self::END_BLOCK)); - $token = ($statement ? (object) array( - 'source' => $statement, - 'level' => $level, - 'filename' => $this->filename, - 'line' => $this->line, - ) : null); - $level += ($last === self::BEGIN_BLOCK ? 1 : ($last === self::END_BLOCK ? -1 : 0)); - return $token; - } - - /** - * Parses a directive - * @param SassToken token to parse - * @param SassNode parent node - * @return SassNode a Sass directive node - */ - private function parseDirective($token, $parent) { - switch (SassDirectiveNode::extractDirective($token)) { - case '@extend': - return new SassExtendNode($token); - break; - case '@mixin': - return new SassMixinDefinitionNode($token); - break; - case '@include': - return new SassMixinNode($token); - break; - case '@import': - if ($this->syntax == SassFile::SASS) { - $i = 0; - $source = ''; - while (!empty($this->source) && empty($source)) { - $source = $this->source[$i++]; - } - if (!empty($source) && $this->getLevel($source) > $token->level) { - throw new SassException('Nesting not allowed beneath {what}', array('{what}'=>'@import directive'), $token); - } - } - return new SassImportNode($token); - break; - case '@for': - return new SassForNode($token); - break; - case '@if': - return new SassIfNode($token); - break; - case '@else': // handles else and else if directives - return new SassElseNode($token); - break; - case '@do': - case '@while': - return new SassWhileNode($token); - break; - case '@debug': - return new SassDebugNode($token); - break; - case '@warn': - return new SassDebugNode($token, true); - break; - default: - return new SassDirectiveNode($token); - break; - } - } - - /** - * Determine the indent character and indent spaces. - * The first character of the first indented line determines the character. - * If this is a space the number of spaces determines the indentSpaces; this - * is always 1 if the indent character is a tab. - * Only used for .sass files. - * @throws SassException if the indent is mixed or - * the indent character can not be determined - */ - private function setIndentChar() { - foreach ($this->source as $l=>$source) { - if (!empty($source) && in_array($source[0], $this->indentChars)) { - $this->indentChar = $source[0]; - for ($i = 0, $len = strlen($source); $i < $len && $source[$i] == $this->indentChar; $i++); - if ($i < $len && in_array($source[$i], $this->indentChars)) { - $this->line = ++$l; - $this->source = $source; - throw new SassException('Mixed indentation not allowed', array(), $this); - } - $this->indentSpaces = ($this->indentChar == ' ' ? $i : 1); - return; - } - } // foreach - $this->indentChar = ' '; - $this->indentSpaces = 2; - } -} diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/config.php b/_piecrust/libs/PhamlP/sass/extensions/compass/config.php deleted file mode 100755 index 0ae79f1..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/config.php +++ /dev/null @@ -1,65 +0,0 @@ - - * @copyright Copyright (c) 2010 PBM Web Development - * @license http://phamlp.googlecode.com/files/license.txt - * @package PHamlP - * @subpackage Sass.extensions.compass - */ - -/** - * Compass extension configuration class. - * @package PHamlP - * @subpackage Sass.extensions.compass - */ -class SassExtentionsCompassConfig { - public static $config; - private static $defaultConfig = array( - 'project_path' => '', - 'http_path' => '/', - 'css_dir' => 'css', - 'css_path' => '', - 'http_css_path' => '', - 'fonts_dir' => 'fonts', - 'fonts_path' => '', - 'http_fonts_path' => '', - 'images_dir' => 'images', - 'images_path' => '', - 'http_images_path' => '', - 'javascripts_dir' => 'javascripts', - 'javascripts_path' => '', - 'http_javascripts_path' => '', - 'relative_assets' => true, - ); - - /** - * Sets configuration settings or returns a configuration setting. - * @param mixed array: configuration settings; string: configuration setting to return - * @return string configuration setting. Null if setting does not exist. - */ - public function config($config) { - if (is_array($config)) { - self::$config = array_merge(self::$defaultConfig, $config); - self::setDefaults(); - } - elseif (is_string($config) && isset(self::$config[$config])) { - return self::$config[$config]; - } - } - - /** - * Sets default values for paths not specified - */ - private static function setDefaults() { - foreach (array('css', 'images', 'fonts', 'javascripts') as $asset) { - if (empty(self::$config[$asset.'_path'])) { - self::$config[$asset.'_path'] = self::$config['project_path'].DIRECTORY_SEPARATOR.self::$config[$asset.'_dir']; - } - if (empty(self::$config['http_'.$asset.'_path'])) { - self::$config['http_'.$asset.'_path'] = self::$config['http_path'].self::$config[$asset.'_dir']; - } - } - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/_blueprint.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/_blueprint.scss deleted file mode 100755 index 067f84e..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/_blueprint.scss +++ /dev/null @@ -1,47 +0,0 @@ -@import "blueprint/colors"; -@import "blueprint/grid"; -@import "blueprint/typography"; -@import "blueprint/utilities"; -@import "blueprint/form"; -@import "blueprint/interaction"; -@import "blueprint/debug"; -@import "blueprint/print"; -@import "blueprint/ie"; - -// ### Usage examples: -// -// As a top-level mixin, apply to any page that includes the stylesheet: -//
        -// +blueprint
        -// 
        -// -// Scoped by a presentational class: -//
        -// body.blueprint
        -//   +blueprint(true)
        -// 
        -// -// Scoped by semantic selectors: -//
        -// body#page-1, body#page-2, body.a-special-page-type
        -//   +blueprint(true)
        -// 
        -// -// #### Deprecated: -// You use to be able to pass the body selector as the first argument when used as a top-level mixin -//
        -// +blueprint("body#page-1, body#page-2, body.a-special-page-type")
        -// 
        - -@mixin blueprint($body_selector: body) { - //@doc off - @if not ($body_selector == "body" or $body_selector == true) { - @warn "[DEPRECATED] To specify a the selector \"#{$body_selector}\" to +blueprint, pass true as the first argument and mix it into #{$body_selector}."; } - //@doc on - @include blueprint-typography($body_selector); - @include blueprint-utilities; - @include blueprint-grid; - @include blueprint-debug; - @include blueprint-interaction; - @include blueprint-form; -} diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_buttons.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_buttons.scss deleted file mode 100755 index 14af822..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_buttons.scss +++ /dev/null @@ -1,101 +0,0 @@ -@import "compass/css3/inline-block"; -@import "compass/utilities/general/float"; - -// Button Font -$blueprint_button_font_family: unquote('"Lucida Grande", Tahoma, Arial, Verdana, sans-serif') !default; - -// Default Button Colors -$blueprint_button_border_color: #dedede !default; -$blueprint_button_background_color: #f5f5f5 !default; -$blueprint_button_font_color: #565656 !default; - -// Default Button Hover Colors -$blueprint_button_hover_border_color: #c2e1ef !default; -$blueprint_button_hover_background_color: #dff4ff !default; -$blueprint_button_hover_font_color: #336699 !default; - -// Default Button Active Colors -$blueprint_button_active_border_color: #6299c5 !default; -$blueprint_button_active_background_color: #6299c5 !default; -$blueprint_button_active_font_color: white !default; - -//** -// Sets the colors for a button -// @param border_highlight_color -// The highlight color defaults to whatever is the value of the border_color but it's one shade lighter. -@mixin button-colors( - $font_color: $blueprint_button_font_color, - $bg_color: $blueprint_button_background_color, - $border_color: $blueprint_button_border_color, - $border_highlight_color: $border_color + #101010 -) { - background-color: $bg_color; - border-color: $border_highlight_color $border_color $border_color $border_highlight_color; - color: $font_color; -} - -//** -// Sets the colors for a button in the active state -// @param border_highlight_color -// The highlight color defaults to whatever is the value of the border_color but it's one shade lighter. -@mixin button-active-colors( - $font_color: $blueprint_button_active_font_color, - $bg_color: $blueprint_button_active_background_color, - $border_color: $blueprint_button_active_border_color, - $border_highlight_color: $border_color + #101010 -) { - &:active { - @include button-colors($font_color, $bg_color, $border_color, $border_highlight_color); - } -} - -//** -// Sets the colors for a button in the hover state. -// @param border_highlight_color -// The highlight color defaults to whatever is the value of the border_color but it's one shade lighter. -@mixin button-hover-colors( - $font_color: $blueprint_button_hover_font_color, - $bg_color: $blueprint_button_hover_background_color, - $border_color: $blueprint_button_hover_border_color, - $border_highlight_color: $border_color + #101010 -) { - &:hover { - @include button-colors($font_color, $bg_color, $border_color, $border_highlight_color); - } -} - -@mixin button-base($float: false) { - @if $float { @include float($float); display: block; } - @else { @include inline-block; } - margin: 0.7em 0.5em 0.7em 0; - border-width: 1px; border-style: solid; - font-family: $blueprint_button_font_family; font-size: 100%; line-height: 130%; font-weight: bold; - text-decoration: none; - cursor: pointer; - img { - margin: 0 3px -3px 0 !important; - padding: 0; - border: none; - width: 16px; - height: 16px; - float: none; - } -} - -@mixin anchor-button($float: false) { - @include button-base($float); - padding: 5px 10px 5px 7px; -} - -@mixin button-button($float: false) { - @include button-base($float); - width: auto; - overflow: visible; - padding: 4px 10px 3px 7px; - &[type] { - padding: 4px 10px 4px 7px; - line-height: 17px; } - *:first-child+html &[type] { - padding: 4px 10px 3px 7px; - } -} \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_colors.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_colors.scss deleted file mode 100755 index 6817a2d..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_colors.scss +++ /dev/null @@ -1,32 +0,0 @@ -$font_color: #333333 !default; -$quiet_color: $font_color + #333333 !default; -$loud_color: $font_color - #222222 !default; -$header_color: $font_color - #111111 !default; -$alt_text_color: #666666 !default; -$blueprint_background_color: #eeeeee !default; - -$link_color: #000099 !default; -$link_hover_color: black !default; -$link_focus_color: $link_hover_color !default; -$link_active_color: $link_color + #cc0000 !default; -$link_visited_color: $link_color - #333333 !default; - -$feedback_border_color: #dddddd !default; -$success_color: #264409 !default; -$success_bg_color: #e6efc2 !default; -$success_border_color: #c6d880 !default; -$notice_color: #514721 !default; -$notice_bg_color: #fff6bf !default; -$notice_border_color: #ffd324 !default; -$error_color: #8a1f11 !default; -$error_bg_color: #fbe3e4 !default; -$error_border_color: #fbc2c4 !default; - -$highlight_color: yellow !default; -$added_color: white !default; -$added_bg_color: #006600 !default; -$removed_color: white !default; -$removed_bg_color: #990000 !default; - -$blueprint_table_header_color: #c3d9ff !default; -$blueprint_table_stripe_color: #e5ecf9 !default; diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_debug.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_debug.scss deleted file mode 100755 index b37a89c..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_debug.scss +++ /dev/null @@ -1,11 +0,0 @@ -@mixin showgrid($image: "grid.png") { - background: image_url($image); -} - -@mixin blueprint-debug($grid_image: unquote("grid.png")) { - // Use this class on any column or container to see the grid. - // TODO: prefix this with the project path. - .showgrid { - @include showgrid($grid_image); - } -} diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_fancy-type.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_fancy-type.scss deleted file mode 100755 index b6bf33c..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_fancy-type.scss +++ /dev/null @@ -1,86 +0,0 @@ -@import "typography"; - -$alternate-text-font : "Warnock Pro", "Goudy Old Style", "Palatino", "Book Antiqua", Georgia, serif !default; -// To install the fancy type plugin: -// 1. import the fancy_type module: @import blueprint/fancy_type -// 2. mixin +fancy-type to your project's body or at the top level of your stylesheet: -// body -// +fancy-type - -@mixin fancy-type { - @include fancy-paragraphs; - .caps { @include caps; } - .dquo { @include dquo; } - .alt { @include alt; } -} - -// Indentation instead of line shifts for sibling paragraphs. Mixin to a style like p + p -@mixin sibling-indentation { - text-indent: 2em; - margin-top: -1.5em; - /* Don't want this in forms. */ - form & { text-indent: 0; } -} - -// For great looking type, use this code instead of asdf: -// asdf -// Best used on prepositions and ampersands. - -@mixin alt { - color: $alt-text-color; - font-family: $alternate-text-font; - font-style: italic; - font-weight: normal; -} - -// For great looking quote marks in titles, replace "asdf" with: -// asdf” -// (That is, when the title starts with a quote mark). -// (You may have to change this value depending on your font size). - -@mixin dquo($offset: 0.5em) { - margin-left: -$offset; -} - -// Reduced size type with incremental leading -// (http://www.markboulton.co.uk/journal/comments/incremental_leading/) -// -// This could be used for side notes. For smaller type, you don't necessarily want to -// follow the 1.5x vertical rhythm -- the line-height is too much. -// -// Using this mixin, reduces your font size and line-height so that for -// every four lines of normal sized type, there is five lines of the sidenote. eg: -// -// Arguments: -// `$font-size` - The desired font size in pixels. This will be converted to ems for you. Defaults to 10px. -// `$base-font-size` - The base font size in pixels. Defaults to 12px -// `$old-line-height` - The old line height. Defaults to 1.5 times the base-font-size - -@mixin incr( - $font-size: 10px, - $base-font-size: $blueprint-font-size, - $old-line-height: $base-font-size * 1.5 -) { - font-size: 1em * $font-size / $base-font-size; - line-height: 1em * $old-line-height / $font-size * 4 / 5; - margin-bottom: 1.5em; -} - -// Surround uppercase words and abbreviations with this class. -// Based on work by Jørgen Arnor Gårdsø Lom [http://twistedintellect.com/] - -@mixin caps { - font-variant: small-caps; - letter-spacing: 1px; - text-transform: lowercase; - font-size: 1.2em; - line-height: 1%; - font-weight: bold; - padding: 0 2px; -} - -@mixin fancy-paragraphs { - p + p { @include sibling-indentation; } - p.incr, - .incr p { @include incr; } -} diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_form.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_form.scss deleted file mode 100755 index fe4afe3..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_form.scss +++ /dev/null @@ -1,68 +0,0 @@ -@import "colors"; - -// Mixin for producing Blueprint "inline" forms. Should be used with the blueprint-form mixin. -@mixin blueprint-inline-form { - line-height: 3; - p { - margin-bottom: 0; - } -} - -@mixin blueprint-form { - @include blueprint-form-layout; - @include blueprint-form-borders; - @include blueprint-form-sizes; -} - -@mixin blueprint-form-layout { - label { font-weight: bold; } - fieldset { padding: 1.4em; margin: 0 0 1.5em 0; } - legend { font-weight: bold; font-size: 1.2em; } - input { - &.text, - &.title, - &[type=email], - &[type=text], - &[type=password] { margin: 0.5em 0; background-color: white; padding: 5px; } - &.title { font-size: 1.5em; } - &[type=checkbox], - &.checkbox, - &[type=radio], - &.radio { position: relative; top: 0.25em; } - } - textarea { margin: 0.5em 0; padding: 5px; } - select { margin: 0.5em 0; } -} - -@mixin blueprint-form-sizes -( - $input_width: 300px, - $textarea_width: 390px, - $textarea_height: 250px -) { - input { - &.text, - &.title, - &[type=email], - &[type=text], - &[type=password] { width: $input_width; } - } - textarea { width: $textarea_width; height: $textarea_height; } -} - -@mixin blueprint-form-borders -( - $unfocused_border_color: #bbbbbb, - $focus_border_color: #666666, - $fieldset_border_color: #cccccc -) { - fieldset { - border: 1px solid $fieldset_border_color; } - input.text, input.title, input[type=email], input[type=text], input[type=password], - textarea, select { - border: 1px solid $unfocused_border_color; - &:focus { - border: 1px solid $focus_border_color; - } - } -} diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_grid.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_grid.scss deleted file mode 100755 index 78f509e..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_grid.scss +++ /dev/null @@ -1,249 +0,0 @@ -// -------------------------------------------------------------- -// SASS Gridification -// * Author: Chris Eppstein -// A SASS adaptation of Blueprint CSS -// * Version: 0.7.1 (2008-02-25) -// * Website: http://code.google.com/p/blueprintcss/ -// Based on work by: -// * Lorin Tackett [lorintackett.com] -// * Olav Bjorkoy [bjorkoy.com] -// * Nathan Borror [playgroundblues.com] -// * Jeff Croft [jeffcroft.com] -// * Christian Metts [mintchaos.com] -// * Khoi Vinh [subtraction.com] -// Read more about using a grid here: -// * http://www.subtraction.com/2007/03/18/oh-yeeaahh -// -------------------------------------------------------------- - -@import "compass/utilities/general/float"; -@import "compass/utilities/general/clearfix"; - -// The number of columns in the grid. -$blueprint_grid_columns: 24 !default; - -// The width of a column -$blueprint_grid_width: 30px !default; - -// The amount of margin between columns -$blueprint_grid_margin: 10px !default; - -// The width of a column including the margin. With default settings this is `40px`. -$blueprint_grid_outer_width: $blueprint_grid_width + $blueprint_grid_margin; - -// The width of the container. With default settings this is `950px`. -$blueprint_container_size: $blueprint_grid_outer_width * $blueprint_grid_columns - $blueprint_grid_margin; - -// Generates presentational class names that you can use -// in your html to layout your pages. -// -// #### Note: -// Best practices discourage using this mixin, -// but it is provided to support legacy websites -// and to test the sass port against blueprint's example pages. - -@mixin blueprint-grid { - // A container should group all your columns - .container { - @include container; } - .column, #{enumerate("div.span", 1, $blueprint_grid_columns)} { - @include column-base; } - // The last column in a row needs this class (or mixin) or it will end up on the next row. - .last, div.last { - @include last; } - // Use these classes (or mixins) to set the width of a column. - @for $n from 1 to $blueprint_grid_columns { - .span-#{$n} { - @include span($n); } } - .span-#{$blueprint_grid_columns}, div.span-#{$blueprint_grid_columns} { - @include span($blueprint_grid_columns); - margin: 0; } - input, textarea, select { - @for $n from 1 through $blueprint_grid_columns { - &.span-#{$n} { - @include span($n, true); } } } - // Add these to a column to append empty cols. - @for $n from 1 to $blueprint_grid_columns { - .append-#{$n} { - @include append($n); } } - // Add these to a column to prepend empty cols. - @for $n from 1 to $blueprint_grid_columns { - .prepend-#{$n} { - @include prepend($n); } } - // Use these classes on an element to push it into the - // next column, or to pull it into the previous column. - #{enumerate(".pull", 1, $blueprint_grid_columns)} { - @include pull-base; } - @for $n from 1 through $blueprint_grid_columns { - .pull-#{$n} { - @include pull-margins($n); } } - #{enumerate(".push", 1, $blueprint_grid_columns)} { - @include push-base; } - @for $n from 1 through $blueprint_grid_columns { - .push-#{$n} { - @include push-margins($n); } } - .prepend-top { - @include prepend-top; } - .append-bottom { - @include append-bottom; } } - -// A container for your columns. -// -// #### Note: -// If you use this mixin without the class and want to support ie6 -// you must set text-align left on your container element in an IE stylesheet. -@mixin container { - width: $blueprint_container_size; - margin: 0 auto; - @include clearfix; } - -// The last column in a row needs this mixin or it will end up -// on the next row in some browsers. -@mixin last { - margin-right: 0; } - -// Use this mixins to set the width of n columns. -@mixin column($n, $last: false) { - @include column-base($last); - @include span($n); } - -// Set only the width of an element to align it with the grid. -// Most of the time you'll want to use `+column` instead. -// -// This mixin is especially useful for aligning tables to the grid. -@mixin span($n, $override: false) { - $width: $blueprint_grid_width * $n + $blueprint_grid_margin * ($n - 1); - @if $override { - width: $width !important; } - @else { - width: $width; } } - -// The basic set of styles needed to make an element -// behave like a column: -// -// * floated to left -// * gutter margin on the right (unless the last column) -// * Some IE fixes -// -// #### Note: -// This mixin gets applied automatically when using `+column` -// so you probably don't need to use it directly unless -// you need to deviate from the grid or are trying -// to reduce the amount of generated CSS. -@mixin column-base($last: false) { - @include float-left; - @if $last { - @include last; } - @else { - margin-right: $blueprint_grid_margin; } - * html & { - overflow-x: hidden; } } - -// Mixin to a column to append n empty columns to the right -// by adding right padding to the column. -@mixin append($n) { - padding-right: $blueprint_grid_outer_width * $n; } - -// Mixin to a column to append n empty columns to the left -// by adding left padding to the column. -@mixin prepend($n) { - padding-left: $blueprint_grid_outer_width * $n; } - -// Adds trailing margin. -@mixin append-bottom($amount: 1.5em) { - margin-bottom: $amount; } - -// Adds leading margin. -@mixin prepend-top($amount: 1.5em) { - margin-top: $amount; } - -// Base styles that make it possible to pull an element to the left. -// #### Note: -// This mixin gets applied automatically when using `+pull` -// so you probably don't need to use it directly unless -// you need to deviate from the grid or are trying -// to reduce the amount of generated CSS. -@mixin pull-base { - @include float-left; - position: relative; } - -// The amount of pulling for element to the left. -// #### Note: -// This mixin gets applied automatically when using `+pull` -// so you probably don't need to use it directly unless -// you need to deviate from the grid or are trying -// to reduce the amount of generated CSS. -@mixin pull-margins($n, $last: false) { - @if $last { - margin-left: -$blueprint_grid_outer_width * $n + $blueprint_grid_margin; } - @else { - margin-left: -$blueprint_grid_outer_width * $n; } } - -// Moves a column `n` columns to the left. -// -// This mixin can also be used to change the display order of columns. -// -// If pulling past the last (visually) element in a row, -// pass `true` as the second argument so the calculations can adjust -// accordingly. - -// For example: -// -// HTML: -//
        -// 
        One
        -//
        Two
        -//
        -// Sass: -//
        -// #one
        -//   +column(18, true)
        -//   +prepend(6)
        -// #two
        -//   +column(6)
        -//   +pull(18, true)
        -// 
        -@mixin pull($n, $last: false) { - @include pull-base; - @include pull-margins($n, $last); } - -@mixin push-base { - @include float-right; - position: relative; } - -@mixin push-margins($n) { - margin: 0 (-$blueprint_grid_outer_width * $n) 1.5em $blueprint_grid_outer_width * $n; } - -// mixin to a column to push it n columns to the right -@mixin push($n) { - @include push-base; - @include push-margins($n); } - -// Border on right hand side of a column. -@mixin border($border_color: #eeeeee, $border_width: 1px) { - padding-right: $blueprint_grid_margin / 2 - $border_width; - margin-right: $blueprint_grid_margin / 2; - border-right: #{$border_width} solid #{$border_color}; } - -// Border with more whitespace, spans one column. -@mixin colborder($border_color: #eeeeee, $border_width: 1px) { - padding-right: floor(($blueprint_grid_width + 2 * $blueprint_grid_margin - $border_width) / 2); - margin-right: ceil(($blueprint_grid_width + 2 * $blueprint_grid_margin - $border_width) / 2); - border-right: #{$border_width} solid #{$border_color}; } - -// Mixin this to an hr to make a horizontal ruler across a column. -@mixin colruler($border_color: #dddddd) { - background: $border_color; - color: $border_color; - clear: both; - float: none; - width: 100%; - height: 0.1em; - margin: 0 0 1.45em; - border: none; } - -// Mixin this to an hr to make a horizontal spacer across a column. -@mixin colspacer { - @include colruler; - background: white; - color: white; - visibility: hidden; } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_ie.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_ie.scss deleted file mode 100755 index fb3fe5f..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_ie.scss +++ /dev/null @@ -1,109 +0,0 @@ -// @doc off -// The blueprint IE mixins should be mixed into a stylesheet that gets conditionally included -// into IE like so: -// -// @doc on - -//| Usage Examples -//| -------------- -//| -//| As a top-level mixin, apply to any page that includes the stylesheet: -//|
        -//| +blueprint-ie
        -//| 
        -//| Scoped by a presentational class: -//|
        -//| body.blueprint
        -//|  +blueprint-ie(true)
        -//| 
        -//| Scoped by semantic selectors: -//|
        -//| body#page-1, body#page-2, body.a-special-page-type
        -//|   +blueprint-ie(true)
        -//| 
        -//| **Deprecated:** You can pass the body selector as the first argument when used as a top-level mixin -//|
        -//| +blueprint-ie("body#page-1, body#page-2, body.a-special-page-type")
        -//| 
        -@mixin blueprint-ie($body_selector: body) { - @if $body_selector == true { - @include blueprint-ie-body; - @include blueprint-ie-defaults; } - @else { - #{$body_selector} { - @include blueprint-ie-body; - @if $body_selector != "body" { - @warn "[DEPRECATED] To specify a the selector \"#{$body_selector}\" to +blueprint-ie, pass true as the first argument and mix it into #{$body_selector}."; - @include blueprint-ie-defaults; } } - @if $body_selector == "body" { - @include blueprint-ie-defaults; } } } - -@mixin blueprint-ie-body { - text-align: center; - @include blueprint-ie-hacks; } - -@mixin blueprint-ie-hacks { - * html & { - legend { - margin: 0px -8px 16px 0; - padding: 0; } } - html>& { - p code { - *white-space: normal; } } } - -// Fixes for Blueprint "inline" forms in IE -@mixin blueprint-inline-form-ie { - div, p { - vertical-align: middle; } - label { - position: relative; - top: -0.25em; } - input { - &.checkbox, &.radio, &.button, button { - margin: 0.5em 0; } } } - -@mixin blueprint-ie-defaults { - .container { - text-align: left; } - sup { - vertical-align: text-top; } - sub { - vertical-align: text-bottom; } - hr { - margin: -8px auto 11px; } - img { - -ms-interpolation-mode: bicubic; } - fieldset { - padding-top: 0; } - textarea { - overflow: auto; } - input { - &.text { - margin: 0.5em 0; - background-color: white; - border: 1px solid #bbbbbb; - &:focus { - border: 1px solid #666666; } } - &.title { - margin: 0.5em 0; - background-color: white; - border: 1px solid #bbbbbb; - &:focus { - border: 1px solid #666666; } } - &.checkbox { - position: relative; - top: 0.25em; } - &.radio { - position: relative; - top: 0.25em; } - &.button { - position: relative; - top: 0.25em; } } - textarea { - margin: 0.5em 0; } - select { - margin: 0.5em 0; } - button { - position: relative; - top: 0.25em; } } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_interaction.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_interaction.scss deleted file mode 100755 index 00a4760..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_interaction.scss +++ /dev/null @@ -1,57 +0,0 @@ -@import "colors"; - -@mixin blueprint-interaction { - .error { - @include error; } - .notice { - @include notice; } - .success { - @include success; } - .hide { - display: none; } - .highlight { - @include highlight; } - .added { - @include added; } - .removed { - @include removed; } } - -@mixin feedback-base { - padding: 0.8em; - margin-bottom: 1em; - border: 2px solid $feedback_border_color; } - -@mixin error { - @include feedback-base; - background: $error_bg_color; - color: $error_color; - border-color: $error_border_color; - a { - color: $error_color; } } - -@mixin notice { - @include feedback-base; - background: $notice_bg_color; - color: $notice_color; - border-color: $notice_border_color; - a { - color: $notice_color; } } - -@mixin success { - @include feedback-base; - background: $success_bg_color; - color: $success_color; - border-color: $success_border_color; - a { - color: $success_color; } } - -@mixin highlight { - background: $highlight_color; } - -@mixin added { - background: $added_bg_color; - color: $added_color; } - -@mixin removed { - background: $removed_bg_color; - color: $removed_color; } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_link-icons.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_link-icons.scss deleted file mode 100755 index d81159d..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_link-icons.scss +++ /dev/null @@ -1,37 +0,0 @@ -@mixin no-link-icon { - background: transparent none !important; - padding: 0 !important; - margin: 0 !important; -} - -@mixin link-icon-base { - padding: 2px 22px 2px 0; - margin: -2px 0; - background-repeat: no-repeat; - background-position: right center; -} - -@mixin link-icon($name, $include-base: true) { - @if $include-base { @include link-icon-base; } - background-image: image-url("link_icons/#{$name}"); } - -@mixin link-icons { - a[href^="http:"], - a[href^="mailto:"], - a[href^="http:"]:visited, - a[href$=".pdf"], - a[href$=".doc"], - a[href$=".xls"], - a[href$=".rss"], - a[href$=".rdf"], - a[href^="aim:"] { @include link-icon-base; } - a[href^="http:"] { @include link-icon("external.png", false); } - a[href^="mailto:"] { @include link-icon("email.png", false); } - a[href^="http:"]:visited { @include link-icon("visited.png", false); } - a[href$=".pdf"] { @include link-icon("pdf.png", false); } - a[href$=".doc"] { @include link-icon("doc.png", false); } - a[href$=".xls"] { @include link-icon("xls.png", false); } - a[href$=".rss"], - a[href$=".rdf"] { @include link-icon("feed.png", false); } - a[href^="aim:"] { @include link-icon("im.png", false); } -} diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_liquid.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_liquid.scss deleted file mode 100755 index 03bb02e..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_liquid.scss +++ /dev/null @@ -1,147 +0,0 @@ -// -------------------------------------------------------------- -// SASS Gridification -// * Author: Geoff Garside -// A SASS adaptation of Blueprint CSS -// * Version: 0.7.1 (2008-02-25) -// * Website: http://code.google.com/p/blueprintcss/ -// Based on work by: -// * Chris Eppstein [eppsteins.net] -// * Lorin Tacket [lorintackett.com] -// * Olav Bjorkoy [bjorkoy.com] -// * Nathan Borror [playgroundblues.com] -// * Jeff Croft [jeffcroft.com] -// * Christian Metts [mintchaos.com] -// * Khoi Vinh [subtraction.com] -// Liquid grid work by: -// * Ben Listwon -// * David Bedingfield -// * Andrei Michael Herasimchuk -// Involution Studios, http://www.involutionstudios.com -// Read more about using a grid here: -// * subtraction.com/archives/2007/0318_oh_yeeaahh.php -// ----- -// By default, the grid is 80% of window width, with 24 columns. -// -// To make the grid fixed, simply change the .container width -// property to a pixel value. e.g., 960px. -// ----- -// To use: -// This module is a REPLACEMENT for the grid module. Simply import it: -// @import blueprint -// @import blueprint/liquid -// ------------------------------------------------------------------- - -@import "compass/utilities/general/clearfix"; -@import "compass/utilities/general/float"; - -// Main layout grid, override these constants to build your grid and container sizes. -// The width shown gives the right floored percentage values. -$blueprint_liquid_grid_columns: 24 !default; - -$blueprint_liquid_grid_width: 3.167% !default; - -$blueprint_liquid_grid_margin: 1.042% !default; - -// Do not edit below this line unless you really know what you're doing. -$blueprint_liquid_container_width: 80% !default; - -$blueprint_liquid_container_min_width: 950px !default; - -$blueprint_liquid_grid_push_pull: -($blueprint_liquid_grid_margin + $blueprint_liquid_grid_width) !default; - -@mixin blueprint-liquid-grid { - // A container should group all your columns - .container { - @include container; } - // Use these classes (or mixins) to set the width of a column. - @for $n from 1 to $blueprint_liquid_grid_columns + 1 { - .span-#{$n} { - @include span($n); } - div { - &.span-#{$n} { - @include column($n, $n == $blueprint_liquid_grid_columns); } } } - // The last column in a row needs this class (or mixin) or it will end up on the next row. - div.last { - @include last; } - // Add these to a column to append empty cols. - @for $n from 1 to $blueprint_liquid_grid_columns { - .append-#{$n} { - @include append($n); } } - // Add these to a column to prepend empty cols. - @for $n from 1 to $blueprint_liquid_grid_columns { - .prepend-#{$n} { - @include prepend($n); } } - // Use these classes on an element to push it into the - // next column, or to pull it into the previous column. - @for $n from 1 to $blueprint_liquid_grid_columns + 1 { - .pull-#{$n} { - @include pull($n); } } - @for $n from 1 to $blueprint_liquid_grid_columns + 1 { - .push-#{$n} { - @include push($n); } } } - -@mixin container { - min-width: $blueprint_liquid_container_min_width; - width: $blueprint_liquid_container_width; - margin: 0 auto; - @include clearfix; } - -@mixin span($n, $override: false) { - $width: $blueprint_liquid_grid_width * $n + $blueprint_liquid_grid_margin * ($n - 1); - @if $override { - width: $width !important; } - @else { - width: $width; } } - -@mixin last { - margin-right: 0; } - -@mixin column($n, $last: false) { - @include float-left; - overflow: hidden; - @include span($n); - @if $last { - @include last; } - @else { - margin-right: $blueprint_liquid_grid_margin; } } - -@mixin append($n) { - padding-right: ($blueprint_liquid_grid_width + $blueprint_liquid_grid_margin) * $n; } - -@mixin prepend($n) { - padding-left: ($blueprint_liquid_grid_width + $blueprint_liquid_grid_margin) * $n; } - -@mixin pull($n, $last: false) { - margin-left: $blueprint_liquid_grid_push_pull * $n; } - -@mixin push($n) { - @include float-right; - margin: { - top: 0; - left: $blueprint_liquid_grid_margin; - right: $blueprint_liquid_grid_push_pull * $n; - bottom: 0; }; } - -@mixin border { - border-right: 1px solid #eeeeee; } - -@mixin colborder { - padding-right: $blueprint_liquid_grid_margin * 2; - margin-right: $blueprint_liquid_grid_margin * 2; - @include border; } - -@mixin colruler { - background: #dddddd; - color: #dddddd; - clear: both; - width: 100%; - height: 0.083em; - margin: 0; - margin-left: $blueprint_liquid_grid_margin * 2; - margin-right: $blueprint_liquid_grid_margin * 2; - border: none; } - -@mixin colspacer { - @include colruler; - background: white; - color: white; } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_print.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_print.scss deleted file mode 100755 index 9dd020e..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_print.scss +++ /dev/null @@ -1,93 +0,0 @@ -@import "typography"; -@import "compass/utilities/general/float"; - -// Usage examples: -// As a top-level mixin, apply to any page that includes the stylesheet: -//
        -// +blueprint-print
        -// 
        -// Scoped by a presentational class: -//
        -// body.blueprint
        -//  +blueprint-print(true)
        -// 
        -// Scoped by semantic selectors: -//
        -// body#page-1, body#page-2, body.a-special-page-type
        -//   +blueprint-print(true)
        -// 
        -// Deprecated: -// You can pass the body selector as the first argument when used as a top-level mixin -//
        -// +blueprint-print("body#page-1, body#page-2, body.a-special-page-type")
        -// 
        -@mixin blueprint-print($body_selector: body) { - @if $body_selector == true { - @include blueprint-print-body; - @include blueprint-print-defaults; } - @else { - #{$body_selector} { - @include blueprint-print-body; - @if $body_selector != "body" { - @warn "[DEPRECATED] To specify a the selector \"#{$body_selector}\" to +blueprint-print, pass true as the first argument and mix it into #{$body_selector}."; - @include blueprint-print-defaults; } } - @if $body_selector == "body" { - @include blueprint-print-defaults; } } } - -// This style is in blueprint, but I think it's annoying and it doesn't work in all browsers. -// Feel free to mix it into anchors where you want it. -@mixin blueprint-show-link-urls { - &:after { - content: " (" attr(href) ")"; - font-size: 90%; } } - -@mixin blueprint-print-body { - line-height: 1.5; - font-family: $blueprint_font_family; - color: black; - background: none; - font-size: 10pt; } - -@mixin blueprint-print-defaults { - .container { - background: none; } - hr { - background: #cccccc; - color: #cccccc; - width: 100%; - height: 2px; - margin: 2em 0; - padding: 0; - border: none; - &.space { - background: white; - color: white; } } - h1, h2, h3, h4, h5, h6 { - font-family: $blueprint_font_family; } - code { - font: { - size: 0.9em; - family: $blueprint_fixed_font_family; }; } - a { - img { - border: none; } - &:link, - &:visited { - background: transparent; - font-weight: 700; - text-decoration: underline; } } - p img.top { - margin-top: 0; } - blockquote { - margin: 1.5em; - padding: 1em; - font-style: italic; - font-size: 0.9em; } - .small { - font-size: 0.9em; } - .large { - font-size: 1.1em; } - .quiet { - color: #999999; } - .hide { - display: none; } } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_reset.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_reset.scss deleted file mode 100755 index 934a63e..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_reset.scss +++ /dev/null @@ -1,3 +0,0 @@ -@import "reset/utilities"; - -@include blueprint-global-reset; \ No newline at end of file diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_rtl.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_rtl.scss deleted file mode 100755 index 4cf281d..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_rtl.scss +++ /dev/null @@ -1,133 +0,0 @@ -@import "grid"; -@import "compass/utilities/general/float"; - -// Main layout grid, override these constants to build your grid and container sizes. -$blueprint_grid_columns: 24 !default; - -$blueprint_grid_width: 30px !default; - -$blueprint_grid_margin: 10px !default; - -$blueprint_grid_outer_width: $blueprint_grid_width + $blueprint_grid_margin; - -$blueprint_container_size: $blueprint_grid_outer_width * $blueprint_grid_columns - $blueprint_grid_margin; - -// Columns -// Note: If you use this mixin without the class and want to support ie6 -// you must set text-align left on your container element in an IE stylesheet. -@mixin container { - width: $blueprint_container_size; - margin: 0 auto; - direction: rtl; - @include clearfix; } - -// The last column in a row needs this mixin or it will end up on the next row. -// TODO add this to span mixin when we have optional arguments -@mixin last { - margin-left: 0; } - -@mixin column-base($last: false) { - @include float-right; - @if $last { - @include last; } - @else { - margin-left: $blueprint_grid_margin; } - text-align: right; - * html & { - overflow-x: hidden; } } - -// Mixin to a column to append n empty cols. -@mixin append($n) { - padding-left: $blueprint_grid_outer_width * $n; } - -// Mixin to a column to prepend n empty cols. -@mixin prepend($n) { - padding-right: $blueprint_grid_outer_width * $n; } - -// mixin to a column to move it n columns to the left -@mixin pull($n, $last: false) { - position: relative; - @if $last { - margin-right: -$blueprint_grid_outer_width * $n + $blueprint_grid_margin; } - @else { - margin-right: -$blueprint_grid_outer_width * $n; } } - -// mixin to a column to push it n columns to the right -@mixin push($n) { - @include float-right; - position: relative; - margin: { - top: 0; - left: -$blueprint_grid_outer_width * $n; - bottom: 1.5em; - right: $blueprint_grid_outer_width * $n; }; } - -// Border on left hand side of a column. -@mixin border { - padding-left: $blueprint_grid_margin / 2 - 1; - margin-left: $blueprint_grid_margin / 2; - border-left: 1px solid #eeeeee; } - -// Border with more whitespace, spans one column. -@mixin colborder { - padding-left: ($blueprint_grid_width - 2 * $blueprint_grid_margin - 1) / 2; - margin-left: ($blueprint_grid_width - 2 * $blueprint_grid_margin) / 2; - border-left: 1px solid #eeeeee; } - -// Usage examples: -// As a top-level mixin, apply to any page that includes the stylesheet: -//
        -// +rtl-typography
        -// 
        -// -// Scoped by a presentational class: -//
        -// body.blueprint
        -//  +rtl-typography(true)
        -// 
        -// -// Scoped by semantic selectors: -//
        -// body#page-1, body#page-2, body.a-special-page-type
        -//   +rtl-typography(true)
        -// 
        -// -// **Deprecated**: -// You can pass the body selector as the first argument when used as a top-level mixin -//
        -// +rtl-typography("body#page-1, body#page-2, body.a-special-page-type")
        -// 
        -@mixin rtl-typography($body_selector: body) { - @if $body_selector == true { - html & { - font-family: Arial, sans-serif; } - @include rtl-typography-defaults; } - @else { - html #{$body_selector} { - font-family: Arial, sans-serif; - @if $body_selector != "body" { - @warn "[DEPRECATED] To specify a the selector \"#{$body_selector}\" to +rtl-typography, pass true as the first argument and mix it into #{$body_selector}."; - @include rtl-typography-defaults; } } - @if $body_selector == "body" { - body { - @include rtl-typography-defaults; } } } } - -@mixin rtl-typography-defaults { - h1, h2, h3, h4, h5, h6 { - font-family: Arial, sans-serif; } - pre, code, tt { - font-family: monospace; } - p { - img.right { - @include float-left; - margin: 1.5em 1.5em 1.5em 0; - padding: 0; } - img.left { - @include float-right; - margin: 1.5em 0 1.5em 1.5em; - padding: 0; } } - dd, ul, ol { - margin-left: 0; - margin-right: 1.5em; } - td, th { - text-align: right; } } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_scaffolding.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_scaffolding.scss deleted file mode 100755 index 57cf887..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_scaffolding.scss +++ /dev/null @@ -1,54 +0,0 @@ -@import "grid"; -@import "form"; - -// The styles contained here are meant to provide for an attractive experience out of the box -// and are expected to be removed once custom visual design begins. - -// The +blueprint-scaffolding mixin must be mixed into the top level of your stylesheet. -// However, you can customize the body selector if you wish to control the scope -// of this mixin. Examples: -// Apply to any page including the stylesheet: -// +blueprint-scaffolding -// Scoped by a single presentational body class: -// +blueprint-scaffolding("body.blueprint") -// Semantically: -// +blueprint-scaffolding("body#page-1, body#page-2, body.a-special-page-type") -// Alternatively, you can use the +blueprint-scaffolding-body and +blueprint-scaffolding-defaults -// mixins to construct your own semantic style rules. - -@mixin blueprint-scaffolding($body_selector: body) { - @if $body_selector != body { - #{$body_selector} { - @include blueprint-scaffolding-defaults; - } - } @else { - @include blueprint-scaffolding-defaults; - } -} - -// The styles this mixin provides were deprecated in Blueprint 0.9 and is no longer part of the -// main scaffolding, but the mixin is still available if you want to use it. -@mixin blueprint-scaffolding-body { - margin: 1.5em 0; } - -// Mixin +box to create a padded box inside a column. -@mixin box { - padding: 1.5em; - margin-bottom: 1.5em; - background: #e5ecf9; } - -@mixin blueprint-scaffolding-defaults { - .box { - @include box; } - // Border on right hand side of a column. You can comment this out if you don't plan to use it. - div.border { - @include border; } - // Border with more whitespace, spans one column. - div.colborder { - @include colborder; } - hr { - @include colruler; } - hr.space { - @include colspacer; } - form.inline { - @include blueprint-inline-form; } } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_typography.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_typography.scss deleted file mode 100755 index ec095fc..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_typography.scss +++ /dev/null @@ -1,104 +0,0 @@ -@import "colors"; -@import "compass/utilities/links/link-colors"; -@import "compass/utilities/general/float"; - -$blueprint-font-family: "Helvetica Neue", Arial, Helvetica, sans-serif !default; - -$blueprint-fixed-font-family: "andale mono", "lucida console", monospace !default; - -$blueprint-font-size: 12px !default; - -// Usage examples: -// As a top-level mixin, apply to any page that includes the stylesheet: -//
        -// +blueprint-typography
        -// 
        -// -// Scoped by a presentational class: -//
        -// body.blueprint
        -//  +blueprint-typography(true)
        -// 
        -// -// Scoped by semantic selectors: -//
        -// body#page-1, body#page-2, body.a-special-page-type
        -//   +blueprint-typography(true)
        -// 
        -// -// **Deprecated**: -// You can pass the body selector as the first argument when used as a top-level mixin -//
        -// +blueprint-typography("body#page-1, body#page-2, body.a-special-page-type")
        -// 
        -@mixin blueprint-typography($body-selector: body) { - @if $body-selector == true { - @include blueprint-typography-body; - @include blueprint-typography-defaults; - } @else { - #{$body-selector} { - @include blueprint-typography-body; - @if $body-selector != body { - @warn "[DEPRECATED] To specify the selector \"#{$body-selector}\" to +blueprint-typography, pass true as the first argument and mix it into #{$body-selector}."; - @include blueprint-typography-defaults; - } - } - @if $body-selector == body { - @include blueprint-typography-defaults; - } - } -} - -@mixin normal-text { font-family: $blueprint-font-family; color: $font-color; } -@mixin fixed-width-text { font: 1em $blueprint-fixed-font-family; line-height: 1.5; } -@mixin header-text { font-weight: normal; color: $header-color; } -@mixin quiet { color: $quiet-color; } -@mixin loud { color: $loud-color; } - -@mixin blueprint-typography-body($font-size: $blueprint-font-size) { - line-height: 1.5; - @include normal-text; - font-size: 100% * $font-size / 16px; -} - -@mixin blueprint-typography-defaults { - #{headers(all)} { @include header-text; - img { margin: 0; } } - h1 { font-size: 3em; line-height: 1; margin-bottom: 0.50em; } - h2 { font-size: 2em; margin-bottom: 0.75em; } - h3 { font-size: 1.5em; line-height: 1; margin-bottom: 1.00em; } - h4 { font-size: 1.2em; line-height: 1.25; margin-bottom: 1.25em; } - h5 { font-size: 1em; font-weight: bold; margin-bottom: 1.50em; } - h6 { font-size: 1em; font-weight: bold; } - p { margin: 0 0 1.5em; - img.left { @include float-left; margin: 1.5em 1.5em 1.5em 0; padding: 0; } - img.right { @include float-right; margin: 1.5em 0 1.5em 1.5em; padding: 0; } - } - a { text-decoration: underline; @include link-colors($link-color, $link-hover-color, $link-active-color, $link-visited-color, $link-focus-color); } - blockquote { margin: 1.5em; color: $alt_text_color; font-style: italic; } - strong { font-weight: bold; } - em { font-style: italic; } - dfn { font-style: italic; font-weight: bold; } - sup, sub { line-height: 0; } - abbr, acronym { border-bottom: 1px dotted #666666; } - address { margin: 0 0 1.5em; font-style: italic; } - del { color: $alt_text_color; } - pre { margin: 1.5em 0; white-space: pre; } - pre, code, tt { @include fixed-width-text; } - li ul, li ol { margin: 0; } - ul, ol { margin: 0 1.5em 1.5em 0; padding-left: 3.333em; } - ul { list-style-type: disc; } - ol { list-style-type: decimal; } - dl { margin: 0 0 1.5em 0; - dt { font-weight: bold; } } - dd { margin-left: 1.5em; } - table { margin-bottom: 1.4em; width: 100%; } - th { font-weight: bold; } - thead th { background: $blueprint-table-header-color; } - th, td, caption { padding: 4px 10px 4px 5px; } - tr.even td { background: $blueprint-table-stripe-color; } - tfoot { font-style: italic; } - caption { background: $blueprint_background_color; } - .quiet { @include quiet; } - .loud { @include loud; } -} diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_utilities.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_utilities.scss deleted file mode 100755 index 12b8987..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/_utilities.scss +++ /dev/null @@ -1,37 +0,0 @@ -@import "compass/utilities/text/nowrap"; -@import "compass/utilities/general/clearfix"; - -// Most of these utility classes are not "semantic". If you use them, -// you are mixing your content and presentation. For shame! - -@mixin blueprint-utilities { - // Regular clearing apply to column that should drop below previous ones. - .clear { - clear: both; } - // turn off text wrapping for the element. - .nowrap { - @include nowrap; } - // Apply to an element that has floated children to make the bottom - // of the element fall _below_ the floated children. - .clearfix { - @include clearfix; } - .small { - font-size: 0.8em; - margin-bottom: 1.875em; - line-height: 1.875em; } - .large { - font-size: 1.2em; - line-height: 2.5em; - margin-bottom: 1.25em; } - .first { - margin-left: 0; - padding-left: 0; } - .last { - margin-right: 0; - padding-right: 0; } - .top { - margin-top: 0; - padding-top: 0; } - .bottom { - margin-bottom: 0; - padding-bottom: 0; } } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss deleted file mode 100755 index 620d68b..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/stylesheets/blueprint/reset/_utilities.scss +++ /dev/null @@ -1,58 +0,0 @@ -// Global reset rules. -// For more specific resets, use the reset mixins provided below -@mixin blueprint-global-reset { - html, body { - @include blueprint-reset; } - html { - font-size: 100.01%; } - @include blueprint-nested-reset; } - -// Reset all elements within some selector scope.To reset the selector itself, -// mixin the appropriate reset mixin for that element type as well. This could be -// useful if you want to style a part of your page in a dramatically different way. -@mixin blueprint-nested-reset { - div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, - pre, a, abbr, acronym, address, code, del, dfn, em, img, - dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr { - @include blueprint-reset; } - blockquote, q { - @include blueprint-reset-quotation; } - th, td, caption { - @include blueprint-reset-table-cell; } - table { - @include blueprint-reset-table; } - a img { - border: none; } } - -@mixin blueprint-reset-box-model { - margin: 0; - padding: 0; - border: 0; } - -@mixin blueprint-reset { - @include blueprint-reset-box-model; - font: { - weight: inherit; - style: inherit; - size: 100%; - family: inherit; }; - vertical-align: baseline; } - -@mixin blueprint-reset-quotation { - @include blueprint-reset; - quotes: "" ""; - &:before, - &:after { - content: ""; } } - -@mixin blueprint-reset-table-cell { - @include blueprint-reset; - text-align: left; - font-weight: normal; - vertical-align: middle; } - -@mixin blueprint-reset-table { - @include blueprint-reset; - border-collapse: separate; - border-spacing: 0; - vertical-align: middle; } diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/grid.png b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/grid.png deleted file mode 100755 index 129d4a29fbe92688aabed5638e0c4f73a7bca818..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 206 zcmeAS@N?(olHy`uVBq!ia0vp^8bB<>!3HEX<>xE|QY^(zo*^7SP{WbZ0pxQQctjR6 zFmQbUVMeDlCNqG7G9|7NCBgY=CFO}lsSJ)O`AMk?Zka`?<@rU~#R|^B#xt(DF$2|k zc)B=-cyuP$eEj#lzKxOL5tEL~%H%~Gtu@#d^DPnSv6>KM@XEpK;0k6FVdQ&MBb@06Zo?vj6}9 diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/ie.sass b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/ie.sass deleted file mode 100755 index 9423f80..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/ie.sass +++ /dev/null @@ -1,4 +0,0 @@ -@import blueprint - -// Generate the blueprint IE-specific customizations: -+blueprint-ie diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/manifest.rb b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/manifest.rb deleted file mode 100755 index 8ab1251..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/manifest.rb +++ /dev/null @@ -1,30 +0,0 @@ -description "A basic blueprint install that mimics the actual blueprint css." - -stylesheet 'screen.sass', :media => 'screen, projection' -stylesheet 'partials/_base.sass' -stylesheet 'print.sass', :media => 'print' -stylesheet 'ie.sass', :media => 'screen, projection', :condition => "lt IE 8" - -image 'grid.png' - -help %Q{ -Please see the blueprint website for documentation on how blueprint works: - - http://blueprintcss.org/ - -Docs on the compass port of blueprint can be found on the wiki: - - http://wiki.github.com/chriseppstein/compass/blueprint-documentation -} - -welcome_message %Q{ -Please see the blueprint website for documentation on how blueprint works: - - http://blueprintcss.org/ - -Docs on the compass port of blueprint can be found on the wiki: - - http://wiki.github.com/chriseppstein/compass/blueprint-documentation - -To get started, edit the screen.sass file and read the comments and code there. -} diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/partials/_base.sass b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/partials/_base.sass deleted file mode 100755 index cb437bf..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/partials/_base.sass +++ /dev/null @@ -1,10 +0,0 @@ -// Here is where you can define your constants for your application and to configure the blueprint framework. -// Feel free to delete these if you want keep the defaults: - -$blueprint-grid-columns : 24 -$blueprint-grid-width : 30px -$blueprint-grid-margin : 10px - -// If you change your grid column dimensions -// you can make a new grid background image from the command line like this: -// compass grid-img 30+10x16 diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/print.sass b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/print.sass deleted file mode 100755 index e92c463..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/print.sass +++ /dev/null @@ -1,4 +0,0 @@ -@import blueprint - -// Generate the blueprint print styles: -+blueprint-print diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/screen.sass b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/screen.sass deleted file mode 100755 index aa72486..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/basic/screen.sass +++ /dev/null @@ -1,12 +0,0 @@ -// This import applies a global reset to any page that imports this stylesheet. -@import blueprint/reset -// To configure blueprint, edit the partials/_base.sass file. -@import partials/base -// Import all the default blueprint modules so that we can access their mixins. -@import blueprint -// Import the non-default scaffolding module. -@import blueprint/scaffolding - -// Generate the blueprint framework according to your configuration: -+blueprint -+blueprint-scaffolding diff --git a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/buttons/buttons.sass b/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/buttons/buttons.sass deleted file mode 100755 index b03736a..0000000 --- a/_piecrust/libs/PhamlP/sass/extensions/compass/frameworks/blueprint/templates/buttons/buttons.sass +++ /dev/null @@ -1,49 +0,0 @@ -@import compass/utilities/general/float -@import blueprint/buttons - -// - Use the following HTML code to place the buttons on your site: - - - - - Change Password - - - - Cancel - - -a.button - // you can pass "left" or "right" to +anchor-button to float it in that direction - // or you can pass no argument to leave it inline-block (cross browser safe!) within - // the flow of your page. - +anchor-button(left) - // All the button color mixins take 4 optional arguments: - // font color, background color, border color, border highlight color - // the first three default to constants set in blueprint/buttons.sass - // the last one defaults to a shade lighter than the border color. - +button-colors - +button-hover-colors - +button-active-colors - -button - // The +button-button mixin is just like the +anchor-button mixin, but for
        From 98333ac33f69ca6ef5e7424adeb767b20045e520 Mon Sep 17 00:00:00 2001 From: Danilo Kuehn Date: Thu, 12 Jul 2012 17:12:00 +0200 Subject: [PATCH 069/352] posts title is now h1 --- _content/pages/_index.html | 9 ++------- _content/templates/home_post.html | 13 +++++++++++++ 2 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 _content/templates/home_post.html diff --git a/_content/pages/_index.html b/_content/pages/_index.html index 38909d2..eefe99c 100644 --- a/_content/pages/_index.html +++ b/_content/pages/_index.html @@ -1,7 +1,7 @@ --- title: Home active: home -keywords: symfony,Symfony2,doctrine,Doctrine2,LSDUG,Leipzg Symfony und Doctrine Usergroup,Web 2.0,HTML5 +keywords: Leipzig,PHP,symfony,Symfony2,doctrine,Doctrine2,LSDUG,HTML5 format: none posts_filters: has_tags: announcement @@ -9,11 +9,6 @@ has_tags: draft --- -
        -

        Hallo!

        -

        Die PHP UserGroup Leipzig grüßt alle PHP-Interessierten in und um Leipzig. Wir treffen uns jeden letzten Donnerstag im Monat. Der rege Austausch über Neuigkeiten, Fakten und Best Practices schafft die besten Voraussetzungen für die Entwicklung mit PHP.

        -
        - {% for post in pagination.posts %} -{% include 'partial_post.html' %} +{% include 'home_post.html' %} {% endfor %} diff --git a/_content/templates/home_post.html b/_content/templates/home_post.html new file mode 100644 index 0000000..95a82d3 --- /dev/null +++ b/_content/templates/home_post.html @@ -0,0 +1,13 @@ +
        + + + {{ post.content | raw }} + + {% if post.has_more %}mehr...{% endif %} +
        From 736417a8c6f57a9e720ce3c650423e0cd7f8fd98 Mon Sep 17 00:00:00 2001 From: Danilo Kuehn Date: Thu, 12 Jul 2012 17:12:16 +0200 Subject: [PATCH 070/352] rename partial_post to blog_post --- _content/pages/blog.html | 2 +- _content/templates/{partial_post.html => blog_post.html} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename _content/templates/{partial_post.html => blog_post.html} (83%) diff --git a/_content/pages/blog.html b/_content/pages/blog.html index e86de82..d0c40a6 100644 --- a/_content/pages/blog.html +++ b/_content/pages/blog.html @@ -8,5 +8,5 @@ has_tags: draft --- {% for post in pagination.posts %} -{% include 'partial_post.html' %} +{% include 'blog_post.html' %} {% endfor %} diff --git a/_content/templates/partial_post.html b/_content/templates/blog_post.html similarity index 83% rename from _content/templates/partial_post.html rename to _content/templates/blog_post.html index 95a82d3..37817e1 100644 --- a/_content/templates/partial_post.html +++ b/_content/templates/blog_post.html @@ -1,6 +1,6 @@
        + {% block javascript %} + {{ javascript|raw }} + {% endblock %} + + From 2fb48f4f99e6743124017b5d951288f38815a336 Mon Sep 17 00:00:00 2001 From: Danilo Kuehn Date: Mon, 16 Jul 2012 18:50:50 +0200 Subject: [PATCH 090/352] add event date and members tweak typography --- css/style.css | 69 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 53 insertions(+), 16 deletions(-) diff --git a/css/style.css b/css/style.css index 4bc13df..9f4ef21 100644 --- a/css/style.css +++ b/css/style.css @@ -1,35 +1,41 @@ body { - background: transparent url(../img/background.png) top left repeat-x; - color: #000; + background: transparent url(../img/background.png) top left repeat-x fixed; } body, p { font-family: Georgia,"Times New Roman",Times,serif; - font-size: 17px; - line-height: 1.3em; -} - + font-size: 16px; + line-height: 26px; + } +/* h1, h2, h3, h4, h5, h6 { line-height: 2em; } +*/ +h1 { font-size: 1.7em; } -h1 { font-size: 2em; } - -h2 { font-size: 1.5em; } +h2 { font-size: 1.4em; } h3, h4, h5, h6 { font-size: 1.2em; text-decoration: underline; } +h2 a { + color: inherit; +} +h2 a:hover { + color: #000; +} + p { margin-bottom: 14px; } #logo { - color: #BBB; + color: #999; font-family: monospace; - font-size: 20px; + font-size: 16px; font-weight: normal; - line-height: 24px; + line-height: 20px; margin-top: 20px; margin-bottom: 10px; white-space: pre; @@ -49,12 +55,12 @@ p { margin-bottom: 14px; } } .navbar .nav > li > a { - color: #777; - font-size: 20px; +/* color: #777; + font-size: 16px; font-weight: normal; line-height: 1; margin: 0; - padding: 8px 10px 12px; + padding: 8px 10px 12px;*/ text-shadow: none; } @@ -84,7 +90,7 @@ p { margin-bottom: 14px; } } .page-header h1 { - line-height: 2em; + line-height: 1.5em; } .page-header p { @@ -94,6 +100,37 @@ p { margin-bottom: 14px; } margin-bottom: 0; } +.event { + text-align: center; + background-color: #FFF; + border-radius: 4px 4px 4px 4px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), 0 -1px 0 rgba(0, 0, 0, 0.1) inset; + margin-right: 20px; + min-height: 55px; + padding: 5px 15px; +} + +.event .time { + border-top: 1px solid #ccc; +} + +.member { + margin-bottom: 20px; + text-align: left; +} + +.member img { + background-color: #FFF; + border-radius: 4px 4px 4px 4px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), 0 -1px 0 rgba(0, 0, 0, 0.1) inset; + max-height: 60px; + max-width: 60px; +} + +.member .name { + margin: 10px; + font-size: 1.2em; +} .footer { border-top: 1px solid #E5E5E5; From 80584cc6c7a36a133693b24763345b40d84d70d4 Mon Sep 17 00:00:00 2001 From: Danilo Kuehn Date: Mon, 16 Jul 2012 18:50:59 +0200 Subject: [PATCH 091/352] add sitemap --- sitemap.sitemap | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sitemap.sitemap diff --git a/sitemap.sitemap b/sitemap.sitemap new file mode 100644 index 0000000..47f6173 --- /dev/null +++ b/sitemap.sitemap @@ -0,0 +1,4 @@ +locations: + - url: / + - url: phpugl.de + changefreq: monthly From 2e51d4ed2aee5851bb72df47539077f998296d02 Mon Sep 17 00:00:00 2001 From: Danilo Kuehn Date: Mon, 16 Jul 2012 19:06:25 +0200 Subject: [PATCH 092/352] remove event date --- _content/posts/2012/06-27_Treffen-im-Juni.html | 2 +- _content/posts/2012/07-12_Treffen-im-Juli.html | 3 +-- _content/templates/blog_post.html | 1 - _content/templates/home_post.html | 1 - _content/templates/post.html | 1 - 5 files changed, 2 insertions(+), 6 deletions(-) diff --git a/_content/posts/2012/06-27_Treffen-im-Juni.html b/_content/posts/2012/06-27_Treffen-im-Juni.html index e456b4f..2d39738 100644 --- a/_content/posts/2012/06-27_Treffen-im-Juni.html +++ b/_content/posts/2012/06-27_Treffen-im-Juni.html @@ -1,5 +1,5 @@ --- -title: Summer@PHPUGL +title: Letztes Treffen war Freitag, 29. Juni 2012, 20:00 Uhr eventdate: 2012-06-29 20:00 author: Danilo Kühn time: 07:54:08 diff --git a/_content/posts/2012/07-12_Treffen-im-Juli.html b/_content/posts/2012/07-12_Treffen-im-Juli.html index 13bc313..7f6a985 100644 --- a/_content/posts/2012/07-12_Treffen-im-Juli.html +++ b/_content/posts/2012/07-12_Treffen-im-Juli.html @@ -1,6 +1,5 @@ --- -title: Yii - Framework -eventdate: 2012-07-26 20:30 +title: Nächstes Treffen am 26. Juli 2012, 20:30 Uhr author: Danilo Kühn time: 17:19:00 tags: [announcement] diff --git a/_content/templates/blog_post.html b/_content/templates/blog_post.html index fcabaa3..aa5e759 100644 --- a/_content/templates/blog_post.html +++ b/_content/templates/blog_post.html @@ -1,6 +1,5 @@
        - {% if post.eventdate %}{% include 'post_eventdate.html' with {'post': post} %}{% endif %}

        {{ post.title }}

        {% include 'post_author.html' with {'post': post} %} diff --git a/_content/templates/home_post.html b/_content/templates/home_post.html index a7294b3..8ab2f09 100644 --- a/_content/templates/home_post.html +++ b/_content/templates/home_post.html @@ -1,6 +1,5 @@
        - {% if post.eventdate %}{% include 'post_eventdate.html' with {'post': post} %}{% endif %}

        {{ post.title }}

        {% include 'post_author.html' with {'post': post} %} diff --git a/_content/templates/post.html b/_content/templates/post.html index 9bf3159..c457dea 100644 --- a/_content/templates/post.html +++ b/_content/templates/post.html @@ -3,7 +3,6 @@ {% block content %}
        + {% block javascript %} {{ javascript|raw }} {% endblock %} diff --git a/css/bootstrap-responsive.min.css b/css/bootstrap-responsive.min.css deleted file mode 100644 index 7b0158d..0000000 --- a/css/bootstrap-responsive.min.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * Bootstrap Responsive v2.1.1 - * - * Copyright 2012 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world @twitter by @mdo and @fat. - */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade.in{top:auto}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:hover{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:block;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} diff --git a/css/bootstrap.min.css b/css/bootstrap.min.css index 31d8b96..594b658 100644 --- a/css/bootstrap.min.css +++ b/css/bootstrap.min.css @@ -1,9 +1,859 @@ /*! - * Bootstrap v2.1.1 + * Bootstrap v2.2.1 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. - */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}.text-warning{color:#c09853}.text-error{color:#b94a48}.text-info{color:#3a87ad}.text-success{color:#468847}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:1;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1{font-size:36px;line-height:40px}h2{font-size:30px;line-height:40px}h3{font-size:24px;line-height:40px}h4{font-size:18px;line-height:20px}h5{font-size:14px;line-height:20px}h6{font-size:12px;line-height:20px}h1 small{font-size:24px}h2 small{font-size:18px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:25px}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:9px;font-size:14px;line-height:20px;color:#555;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal;cursor:pointer}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:18px;padding-left:18px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"]{float:left}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info>label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{margin-bottom:5px;font-size:0;white-space:nowrap}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;font-size:14px;vertical-align:top;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append .add-on,.input-append .btn{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child,.table-bordered tfoot:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child,.table-bordered tfoot:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topleft:4px}.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9}.table-hover tbody tr:hover td,.table-hover tbody tr:hover th{background-color:#f5f5f5}table [class*=span],.row-fluid table [class*=span]{display:table-cell;float:none;margin-left:0}.table .span1{float:none;width:44px;margin-left:0}.table .span2{float:none;width:124px;margin-left:0}.table .span3{float:none;width:204px;margin-left:0}.table .span4{float:none;width:284px;margin-left:0}.table .span5{float:none;width:364px;margin-left:0}.table .span6{float:none;width:444px;margin-left:0}.table .span7{float:none;width:524px;margin-left:0}.table .span8{float:none;width:604px;margin-left:0}.table .span9{float:none;width:684px;margin-left:0}.table .span10{float:none;width:764px;margin-left:0}.table .span11{float:none;width:844px;margin-left:0}.table .span12{float:none;width:924px;margin-left:0}.table .span13{float:none;width:1004px;margin-left:0}.table .span14{float:none;width:1084px;margin-left:0}.table .span15{float:none;width:1164px;margin-left:0}.table .span16{float:none;width:1244px;margin-left:0}.table .span17{float:none;width:1324px;margin-left:0}.table .span18{float:none;width:1404px;margin-left:0}.table .span19{float:none;width:1484px;margin-left:0}.table .span20{float:none;width:1564px;margin-left:0}.table .span21{float:none;width:1644px;margin-left:0}.table .span22{float:none;width:1724px;margin-left:0}.table .span23{float:none;width:1804px;margin-left:0}.table .span24{float:none;width:1884px;margin-left:0}.table tbody tr.success td{background-color:#dff0d8}.table tbody tr.error td{background-color:#f2dede}.table tbody tr.warning td{background-color:#fcf8e3}.table tbody tr.info td{background-color:#d9edf7}.table-hover tbody tr.success:hover td{background-color:#d0e9c6}.table-hover tbody tr.error:hover td{background-color:#ebcccc}.table-hover tbody tr.warning:hover td{background-color:#faf2cc}.table-hover tbody tr.info:hover td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-tabs>.active>a>[class^="icon-"],.nav-tabs>.active>a>[class*=" icon-"],.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu li>a:hover,.dropdown-menu li>a:focus,.dropdown-submenu:hover>a{color:#fff;text-decoration:none;background-color:#08c;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#fff;text-decoration:none;background-color:#08c;background-color:#0081c2;background-image:linear-gradient(to bottom,#08c,#0077b3);background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .disabled>a,.dropdown-menu .disabled>a:hover{color:#999}.dropdown-menu .disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.open{*z-index:1000}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 14px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;*line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #bbb;*border:0;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-bottom-color:#a2a2a2;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover{color:#333;text-decoration:none;background-color:#e6e6e6;*background-color:#d9d9d9;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-color:#e6e6e6;background-color:#d9d9d9 \9;background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-color:#e6e6e6;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.btn-large [class^="icon-"]{margin-top:2px}.btn-small{padding:3px 9px;font-size:12px;line-height:18px}.btn-small [class^="icon-"]{margin-top:0}.btn-mini{padding:2px 6px;font-size:11px;line-height:17px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn{border-color:#c5c5c5;border-color:rgba(0,0,0,0.15) rgba(0,0,0,0.15) rgba(0,0,0,0.25)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-image:-moz-linear-gradient(top,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-image:-moz-linear-gradient(top,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-image:-moz-linear-gradient(top,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover{color:#333;text-decoration:none}.btn-group{position:relative;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1}.btn-toolbar .btn+.btn,.btn-toolbar .btn-group+.btn,.btn-toolbar .btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu{font-size:14px}.btn-group>.btn-mini{font-size:11px}.btn-group>.btn-small{font-size:12px}.btn-group>.btn-large{font-size:16px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-mini .caret,.btn-small .caret,.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.dropup .btn-large .caret{border-top:0;border-bottom:5px solid #000}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical .btn{display:block;float:none;width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical .btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical .btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical .btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical .btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical .btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;color:#c09853;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible;color:#777}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px}.navbar-link{color:#777}.navbar-link:hover{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:6px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;width:100%;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1),0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1);box-shadow:inset 0 1px 0 rgba(0,0,0,0.1),0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse{color:#999}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover{color:#fff}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-image:-moz-linear-gradient(top,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb .divider{padding:0 5px;color:#ccc}.breadcrumb .active{color:#999}.pagination{height:40px;margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:0 14px;line-height:38px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager a,.pager span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager a:hover{text-decoration:none;background-color:#f5f5f5}.pager .next a,.pager .next span{float:right}.pager .previous a{float:left}.pager .disabled a,.pager .disabled a:hover,.pager .disabled span{color:#999;cursor:default;background-color:#fff}.modal-open .modal .dropdown-menu{z-index:2050}.modal-open .modal .dropdown.open{*z-index:2050}.modal-open .modal .popover{z-index:2060}.modal-open .modal .tooltip{z-index:2080}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:50%;left:50%;z-index:1050;width:560px;margin:-250px 0 0 -280px;overflow:auto;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:50%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.tooltip{position:absolute;z-index:1030;display:block;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-3px}.tooltip.right{margin-left:3px}.tooltip.bottom{margin-top:3px}.tooltip.left{margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;width:236px;padding:1px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-bottom:10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-right:10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0}.popover .arrow,.popover .arrow:after{position:absolute;display:inline-block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow:after{z-index:-1;content:""}.popover.top .arrow{bottom:-10px;left:50%;margin-left:-10px;border-top-color:#fff;border-width:10px 10px 0}.popover.top .arrow:after{bottom:-1px;left:-11px;border-top-color:rgba(0,0,0,0.25);border-width:11px 11px 0}.popover.right .arrow{top:50%;left:-10px;margin-top:-10px;border-right-color:#fff;border-width:10px 10px 10px 0}.popover.right .arrow:after{bottom:-11px;left:-1px;border-right-color:rgba(0,0,0,0.25);border-width:11px 11px 11px 0}.popover.bottom .arrow{top:-10px;left:50%;margin-left:-10px;border-bottom-color:#fff;border-width:0 10px 10px}.popover.bottom .arrow:after{top:-1px;left:-11px;border-bottom-color:rgba(0,0,0,0.25);border-width:0 11px 11px}.popover.left .arrow{top:50%;right:-10px;margin-top:-10px;border-left-color:#fff;border-width:10px 0 10px 10px}.popover.left .arrow:after{right:-1px;bottom:-11px;border-left-color:rgba(0,0,0,0.25);border-width:11px 0 11px 11px}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.label,.badge{font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}a.label:hover,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff57a957',GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff339bb9',GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel .item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel .item>img{display:block;line-height:1}.carousel .active,.carousel .next,.carousel .prev{display:block}.carousel .active{left:0}.carousel .next,.carousel .prev{position:absolute;top:0;width:100%}.carousel .next{left:100%}.carousel .prev{left:-100%}.carousel .next.left,.carousel .prev.right{left:0}.carousel .active.left{left:-100%}.carousel .active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit p{font-size:18px;font-weight:200;line-height:30px;color:inherit}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed} + */ +.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0;} +.clearfix:after{clear:both;} +.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;} +.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} +article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;} +audio,canvas,video{display:inline-block;*display:inline;*zoom:1;} +audio:not([controls]){display:none;} +html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;} +a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} +a:hover,a:active{outline:0;} +sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;} +sup{top:-0.5em;} +sub{bottom:-0.25em;} +img{max-width:100%;width:auto\9;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;} +#map_canvas img,.google-maps img{max-width:none;} +button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;} +button,input{*overflow:visible;line-height:normal;} +button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;} +button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;} +input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;} +input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;} +textarea{overflow:auto;vertical-align:top;} +body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333333;background-color:#ffffff;} +a{color:#0088cc;text-decoration:none;} +a:hover{color:#005580;text-decoration:underline;} +.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;} +.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);} +.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px;} +.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;} +.row:after{clear:both;} +[class*="span"]{float:left;min-height:1px;margin-left:20px;} +.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;} +.span12{width:940px;} +.span11{width:860px;} +.span10{width:780px;} +.span9{width:700px;} +.span8{width:620px;} +.span7{width:540px;} +.span6{width:460px;} +.span5{width:380px;} +.span4{width:300px;} +.span3{width:220px;} +.span2{width:140px;} +.span1{width:60px;} +.offset12{margin-left:980px;} +.offset11{margin-left:900px;} +.offset10{margin-left:820px;} +.offset9{margin-left:740px;} +.offset8{margin-left:660px;} +.offset7{margin-left:580px;} +.offset6{margin-left:500px;} +.offset5{margin-left:420px;} +.offset4{margin-left:340px;} +.offset3{margin-left:260px;} +.offset2{margin-left:180px;} +.offset1{margin-left:100px;} +.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;} +.row-fluid:after{clear:both;} +.row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;} +.row-fluid [class*="span"]:first-child{margin-left:0;} +.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%;} +.row-fluid .span12{width:100%;*width:99.94680851063829%;} +.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%;} +.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%;} +.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%;} +.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%;} +.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%;} +.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%;} +.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%;} +.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%;} +.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%;} +.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%;} +.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%;} +.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%;} +.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%;} +.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%;} +.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%;} +.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%;} +.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%;} +.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%;} +.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%;} +.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%;} +.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%;} +.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%;} +.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%;} +.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%;} +.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%;} +.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%;} +.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%;} +.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%;} +.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%;} +.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%;} +.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%;} +.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%;} +.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%;} +.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%;} +.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%;} +[class*="span"].hide,.row-fluid [class*="span"].hide{display:none;} +[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right;} +.container{margin-right:auto;margin-left:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";line-height:0;} +.container:after{clear:both;} +.container-fluid{padding-right:20px;padding-left:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";line-height:0;} +.container-fluid:after{clear:both;} +p{margin:0 0 10px;} +.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px;} +small{font-size:85%;} +strong{font-weight:bold;} +em{font-style:italic;} +cite{font-style:normal;} +.muted{color:#999999;} +.text-warning{color:#c09853;} +a.text-warning:hover{color:#a47e3c;} +.text-error{color:#b94a48;} +a.text-error:hover{color:#953b39;} +.text-info{color:#3a87ad;} +a.text-info:hover{color:#2d6987;} +.text-success{color:#468847;} +a.text-success:hover{color:#356635;} +h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999999;} +h1,h2,h3{line-height:40px;} +h1{font-size:38.5px;} +h2{font-size:31.5px;} +h3{font-size:24.5px;} +h4{font-size:17.5px;} +h5{font-size:14px;} +h6{font-size:11.9px;} +h1 small{font-size:24.5px;} +h2 small{font-size:17.5px;} +h3 small{font-size:14px;} +h4 small{font-size:14px;} +.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eeeeee;} +ul,ol{padding:0;margin:0 0 10px 25px;} +ul ul,ul ol,ol ol,ol ul{margin-bottom:0;} +li{line-height:20px;} +ul.unstyled,ol.unstyled{margin-left:0;list-style:none;} +dl{margin-bottom:20px;} +dt,dd{line-height:20px;} +dt{font-weight:bold;} +dd{margin-left:10px;} +.dl-horizontal{*zoom:1;}.dl-horizontal:before,.dl-horizontal:after{display:table;content:"";line-height:0;} +.dl-horizontal:after{clear:both;} +.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} +.dl-horizontal dd{margin-left:180px;} +hr{margin:20px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;} +abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999999;} +abbr.initialism{font-size:90%;text-transform:uppercase;} +blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:25px;} +blockquote small{display:block;line-height:20px;color:#999999;}blockquote small:before{content:'\2014 \00A0';} +blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;} +blockquote.pull-right small:before{content:'';} +blockquote.pull-right small:after{content:'\00A0 \2014';} +q:before,q:after,blockquote:before,blockquote:after{content:"";} +address{display:block;margin-bottom:20px;font-style:normal;line-height:20px;} +code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;} +pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}pre.prettyprint{margin-bottom:20px;} +pre code{padding:0;color:inherit;background-color:transparent;border:0;} +.pre-scrollable{max-height:340px;overflow-y:scroll;} +.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#ffffff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;} +.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +.badge{padding-left:9px;padding-right:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;} +a.label:hover,a.badge:hover{color:#ffffff;text-decoration:none;cursor:pointer;} +.label-important,.badge-important{background-color:#b94a48;} +.label-important[href],.badge-important[href]{background-color:#953b39;} +.label-warning,.badge-warning{background-color:#f89406;} +.label-warning[href],.badge-warning[href]{background-color:#c67605;} +.label-success,.badge-success{background-color:#468847;} +.label-success[href],.badge-success[href]{background-color:#356635;} +.label-info,.badge-info{background-color:#3a87ad;} +.label-info[href],.badge-info[href]{background-color:#2d6987;} +.label-inverse,.badge-inverse{background-color:#333333;} +.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;} +.btn .label,.btn .badge{position:relative;top:-1px;} +.btn-mini .label,.btn-mini .badge{top:0;} +table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;} +.table{width:100%;margin-bottom:20px;}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;} +.table th{font-weight:bold;} +.table thead th{vertical-align:bottom;} +.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;} +.table tbody+tbody{border-top:2px solid #dddddd;} +.table-condensed th,.table-condensed td{padding:4px 5px;} +.table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;} +.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;} +.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px;} +.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px;} +.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child,.table-bordered tfoot:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;} +.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child,.table-bordered tfoot:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;} +.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px;} +.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px;} +.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;} +.table-hover tbody tr:hover td,.table-hover tbody tr:hover th{background-color:#f5f5f5;} +table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0;} +.table td.span1,.table th.span1{float:none;width:44px;margin-left:0;} +.table td.span2,.table th.span2{float:none;width:124px;margin-left:0;} +.table td.span3,.table th.span3{float:none;width:204px;margin-left:0;} +.table td.span4,.table th.span4{float:none;width:284px;margin-left:0;} +.table td.span5,.table th.span5{float:none;width:364px;margin-left:0;} +.table td.span6,.table th.span6{float:none;width:444px;margin-left:0;} +.table td.span7,.table th.span7{float:none;width:524px;margin-left:0;} +.table td.span8,.table th.span8{float:none;width:604px;margin-left:0;} +.table td.span9,.table th.span9{float:none;width:684px;margin-left:0;} +.table td.span10,.table th.span10{float:none;width:764px;margin-left:0;} +.table td.span11,.table th.span11{float:none;width:844px;margin-left:0;} +.table td.span12,.table th.span12{float:none;width:924px;margin-left:0;} +.table tbody tr.success td{background-color:#dff0d8;} +.table tbody tr.error td{background-color:#f2dede;} +.table tbody tr.warning td{background-color:#fcf8e3;} +.table tbody tr.info td{background-color:#d9edf7;} +.table-hover tbody tr.success:hover td{background-color:#d0e9c6;} +.table-hover tbody tr.error:hover td{background-color:#ebcccc;} +.table-hover tbody tr.warning:hover td{background-color:#faf2cc;} +.table-hover tbody tr.info:hover td{background-color:#c4e3f3;} +form{margin:0 0 20px;} +fieldset{padding:0;margin:0;border:0;} +legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333333;border:0;border-bottom:1px solid #e5e5e5;}legend small{font-size:15px;color:#999999;} +label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px;} +input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;} +label{display:block;margin-bottom:5px;} +select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555555;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;vertical-align:middle;} +input,textarea,.uneditable-input{width:206px;} +textarea{height:auto;} +textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#ffffff;border:1px solid #cccccc;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear .2s, box-shadow linear .2s;-moz-transition:border linear .2s, box-shadow linear .2s;-o-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82, 168, 236, 0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);} +input[type="radio"],input[type="checkbox"]{margin:4px 0 0;*margin-top:0;margin-top:1px \9;line-height:normal;cursor:pointer;} +input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto;} +select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px;} +select{width:220px;border:1px solid #cccccc;background-color:#ffffff;} +select[multiple],select[size]{height:auto;} +select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} +.uneditable-input,.uneditable-textarea{color:#999999;background-color:#fcfcfc;border-color:#cccccc;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;} +.uneditable-input{overflow:hidden;white-space:nowrap;} +.uneditable-textarea{width:auto;height:auto;} +input:-moz-placeholder,textarea:-moz-placeholder{color:#999999;} +input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999999;} +input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999999;} +.radio,.checkbox{min-height:20px;padding-left:20px;} +.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px;} +.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;} +.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle;} +.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;} +.input-mini{width:60px;} +.input-small{width:90px;} +.input-medium{width:150px;} +.input-large{width:210px;} +.input-xlarge{width:270px;} +.input-xxlarge{width:530px;} +input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0;} +.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block;} +input,textarea,.uneditable-input{margin-left:0;} +.controls-row [class*="span"]+[class*="span"]{margin-left:20px;} +input.span12, textarea.span12, .uneditable-input.span12{width:926px;} +input.span11, textarea.span11, .uneditable-input.span11{width:846px;} +input.span10, textarea.span10, .uneditable-input.span10{width:766px;} +input.span9, textarea.span9, .uneditable-input.span9{width:686px;} +input.span8, textarea.span8, .uneditable-input.span8{width:606px;} +input.span7, textarea.span7, .uneditable-input.span7{width:526px;} +input.span6, textarea.span6, .uneditable-input.span6{width:446px;} +input.span5, textarea.span5, .uneditable-input.span5{width:366px;} +input.span4, textarea.span4, .uneditable-input.span4{width:286px;} +input.span3, textarea.span3, .uneditable-input.span3{width:206px;} +input.span2, textarea.span2, .uneditable-input.span2{width:126px;} +input.span1, textarea.span1, .uneditable-input.span1{width:46px;} +.controls-row{*zoom:1;}.controls-row:before,.controls-row:after{display:table;content:"";line-height:0;} +.controls-row:after{clear:both;} +.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left;} +.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px;} +input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eeeeee;} +input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent;} +.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;} +.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;} +.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;} +.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;} +.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;} +.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;} +.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;} +.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;} +.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;} +.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;} +.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;} +.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;} +.control-group.info>label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad;} +.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad;} +.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;} +.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad;} +input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;} +.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1;}.form-actions:before,.form-actions:after{display:table;content:"";line-height:0;} +.form-actions:after{clear:both;} +.help-block,.help-inline{color:#595959;} +.help-block{display:block;margin-bottom:10px;} +.help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px;} +.input-append,.input-prepend{margin-bottom:5px;font-size:0;white-space:nowrap;}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu{font-size:14px;} +.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2;} +.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #ffffff;background-color:#eeeeee;border:1px solid #ccc;} +.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546;} +.input-prepend .add-on,.input-prepend .btn{margin-right:-1px;} +.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;} +.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}.input-append input+.btn-group .btn,.input-append select+.btn-group .btn,.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;} +.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px;} +.input-append .add-on:last-child,.input-append .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;} +.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;} +.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;} +.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;} +.input-prepend.input-append .btn-group:first-child{margin-left:0;} +input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;} +.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px;} +.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0;} +.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0;} +.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px;} +.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;*zoom:1;margin-bottom:0;vertical-align:middle;} +.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none;} +.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block;} +.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0;} +.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle;} +.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0;} +.control-group{margin-bottom:10px;} +legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate;} +.form-horizontal .control-group{margin-bottom:20px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";line-height:0;} +.form-horizontal .control-group:after{clear:both;} +.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right;} +.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0;}.form-horizontal .controls:first-child{*padding-left:180px;} +.form-horizontal .help-block{margin-bottom:0;} +.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block{margin-top:10px;} +.form-horizontal .form-actions{padding-left:180px;} +.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;*line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333333;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top, #ffffff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(top, #ffffff, #e6e6e6);background-image:-o-linear-gradient(top, #ffffff, #e6e6e6);background-image:linear-gradient(to bottom, #ffffff, #e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border:1px solid #bbbbbb;*border:0;border-bottom-color:#a2a2a2;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333333;background-color:#e6e6e6;*background-color:#d9d9d9;} +.btn:active,.btn.active{background-color:#cccccc \9;} +.btn:first-child{*margin-left:0;} +.btn:hover{color:#333333;text-decoration:none;background-color:#e6e6e6;*background-color:#d9d9d9;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;} +.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} +.btn.active,.btn:active{background-color:#e6e6e6;background-color:#d9d9d9 \9;background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);} +.btn.disabled,.btn[disabled]{cursor:default;background-color:#e6e6e6;background-image:none;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;} +.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:2px;} +.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0;} +.btn-mini{padding:1px 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +.btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} +.btn-block+.btn-block{margin-top:5px;} +input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%;} +.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255, 255, 255, 0.75);} +.btn{border-color:#c5c5c5;border-color:rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);} +.btn-primary{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#006dcc;background-image:-moz-linear-gradient(top, #0088cc, #0044cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));background-image:-webkit-linear-gradient(top, #0088cc, #0044cc);background-image:-o-linear-gradient(top, #0088cc, #0044cc);background-image:linear-gradient(to bottom, #0088cc, #0044cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);border-color:#0044cc #0044cc #002a80;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#0044cc;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#ffffff;background-color:#0044cc;*background-color:#003bb3;} +.btn-primary:active,.btn-primary.active{background-color:#003399 \9;} +.btn-warning{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(to bottom, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#ffffff;background-color:#f89406;*background-color:#df8505;} +.btn-warning:active,.btn-warning.active{background-color:#c67605 \9;} +.btn-danger{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(to bottom, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#ffffff;background-color:#bd362f;*background-color:#a9302a;} +.btn-danger:active,.btn-danger.active{background-color:#942a25 \9;} +.btn-success{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(to bottom, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#51a351;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#ffffff;background-color:#51a351;*background-color:#499249;} +.btn-success:active,.btn-success.active{background-color:#408140 \9;} +.btn-info{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(to bottom, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#2f96b4;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#ffffff;background-color:#2f96b4;*background-color:#2a85a0;} +.btn-info:active,.btn-info.active{background-color:#24748c \9;} +.btn-inverse{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#363636;background-image:-moz-linear-gradient(top, #444444, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));background-image:-webkit-linear-gradient(top, #444444, #222222);background-image:-o-linear-gradient(top, #444444, #222222);background-image:linear-gradient(to bottom, #444444, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#222222;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#ffffff;background-color:#222222;*background-color:#151515;} +.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9;} +button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;} +button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px;} +button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px;} +button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px;} +.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +.btn-link{border-color:transparent;cursor:pointer;color:#0088cc;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +.btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent;} +.btn-link[disabled]:hover{color:#333333;text-decoration:none;} +[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;margin-top:1px;} +.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png");} +.icon-glass{background-position:0 0;} +.icon-music{background-position:-24px 0;} +.icon-search{background-position:-48px 0;} +.icon-envelope{background-position:-72px 0;} +.icon-heart{background-position:-96px 0;} +.icon-star{background-position:-120px 0;} +.icon-star-empty{background-position:-144px 0;} +.icon-user{background-position:-168px 0;} +.icon-film{background-position:-192px 0;} +.icon-th-large{background-position:-216px 0;} +.icon-th{background-position:-240px 0;} +.icon-th-list{background-position:-264px 0;} +.icon-ok{background-position:-288px 0;} +.icon-remove{background-position:-312px 0;} +.icon-zoom-in{background-position:-336px 0;} +.icon-zoom-out{background-position:-360px 0;} +.icon-off{background-position:-384px 0;} +.icon-signal{background-position:-408px 0;} +.icon-cog{background-position:-432px 0;} +.icon-trash{background-position:-456px 0;} +.icon-home{background-position:0 -24px;} +.icon-file{background-position:-24px -24px;} +.icon-time{background-position:-48px -24px;} +.icon-road{background-position:-72px -24px;} +.icon-download-alt{background-position:-96px -24px;} +.icon-download{background-position:-120px -24px;} +.icon-upload{background-position:-144px -24px;} +.icon-inbox{background-position:-168px -24px;} +.icon-play-circle{background-position:-192px -24px;} +.icon-repeat{background-position:-216px -24px;} +.icon-refresh{background-position:-240px -24px;} +.icon-list-alt{background-position:-264px -24px;} +.icon-lock{background-position:-287px -24px;} +.icon-flag{background-position:-312px -24px;} +.icon-headphones{background-position:-336px -24px;} +.icon-volume-off{background-position:-360px -24px;} +.icon-volume-down{background-position:-384px -24px;} +.icon-volume-up{background-position:-408px -24px;} +.icon-qrcode{background-position:-432px -24px;} +.icon-barcode{background-position:-456px -24px;} +.icon-tag{background-position:0 -48px;} +.icon-tags{background-position:-25px -48px;} +.icon-book{background-position:-48px -48px;} +.icon-bookmark{background-position:-72px -48px;} +.icon-print{background-position:-96px -48px;} +.icon-camera{background-position:-120px -48px;} +.icon-font{background-position:-144px -48px;} +.icon-bold{background-position:-167px -48px;} +.icon-italic{background-position:-192px -48px;} +.icon-text-height{background-position:-216px -48px;} +.icon-text-width{background-position:-240px -48px;} +.icon-align-left{background-position:-264px -48px;} +.icon-align-center{background-position:-288px -48px;} +.icon-align-right{background-position:-312px -48px;} +.icon-align-justify{background-position:-336px -48px;} +.icon-list{background-position:-360px -48px;} +.icon-indent-left{background-position:-384px -48px;} +.icon-indent-right{background-position:-408px -48px;} +.icon-facetime-video{background-position:-432px -48px;} +.icon-picture{background-position:-456px -48px;} +.icon-pencil{background-position:0 -72px;} +.icon-map-marker{background-position:-24px -72px;} +.icon-adjust{background-position:-48px -72px;} +.icon-tint{background-position:-72px -72px;} +.icon-edit{background-position:-96px -72px;} +.icon-share{background-position:-120px -72px;} +.icon-check{background-position:-144px -72px;} +.icon-move{background-position:-168px -72px;} +.icon-step-backward{background-position:-192px -72px;} +.icon-fast-backward{background-position:-216px -72px;} +.icon-backward{background-position:-240px -72px;} +.icon-play{background-position:-264px -72px;} +.icon-pause{background-position:-288px -72px;} +.icon-stop{background-position:-312px -72px;} +.icon-forward{background-position:-336px -72px;} +.icon-fast-forward{background-position:-360px -72px;} +.icon-step-forward{background-position:-384px -72px;} +.icon-eject{background-position:-408px -72px;} +.icon-chevron-left{background-position:-432px -72px;} +.icon-chevron-right{background-position:-456px -72px;} +.icon-plus-sign{background-position:0 -96px;} +.icon-minus-sign{background-position:-24px -96px;} +.icon-remove-sign{background-position:-48px -96px;} +.icon-ok-sign{background-position:-72px -96px;} +.icon-question-sign{background-position:-96px -96px;} +.icon-info-sign{background-position:-120px -96px;} +.icon-screenshot{background-position:-144px -96px;} +.icon-remove-circle{background-position:-168px -96px;} +.icon-ok-circle{background-position:-192px -96px;} +.icon-ban-circle{background-position:-216px -96px;} +.icon-arrow-left{background-position:-240px -96px;} +.icon-arrow-right{background-position:-264px -96px;} +.icon-arrow-up{background-position:-289px -96px;} +.icon-arrow-down{background-position:-312px -96px;} +.icon-share-alt{background-position:-336px -96px;} +.icon-resize-full{background-position:-360px -96px;} +.icon-resize-small{background-position:-384px -96px;} +.icon-plus{background-position:-408px -96px;} +.icon-minus{background-position:-433px -96px;} +.icon-asterisk{background-position:-456px -96px;} +.icon-exclamation-sign{background-position:0 -120px;} +.icon-gift{background-position:-24px -120px;} +.icon-leaf{background-position:-48px -120px;} +.icon-fire{background-position:-72px -120px;} +.icon-eye-open{background-position:-96px -120px;} +.icon-eye-close{background-position:-120px -120px;} +.icon-warning-sign{background-position:-144px -120px;} +.icon-plane{background-position:-168px -120px;} +.icon-calendar{background-position:-192px -120px;} +.icon-random{background-position:-216px -120px;width:16px;} +.icon-comment{background-position:-240px -120px;} +.icon-magnet{background-position:-264px -120px;} +.icon-chevron-up{background-position:-288px -120px;} +.icon-chevron-down{background-position:-313px -119px;} +.icon-retweet{background-position:-336px -120px;} +.icon-shopping-cart{background-position:-360px -120px;} +.icon-folder-close{background-position:-384px -120px;} +.icon-folder-open{background-position:-408px -120px;width:16px;} +.icon-resize-vertical{background-position:-432px -119px;} +.icon-resize-horizontal{background-position:-456px -118px;} +.icon-hdd{background-position:0 -144px;} +.icon-bullhorn{background-position:-24px -144px;} +.icon-bell{background-position:-48px -144px;} +.icon-certificate{background-position:-72px -144px;} +.icon-thumbs-up{background-position:-96px -144px;} +.icon-thumbs-down{background-position:-120px -144px;} +.icon-hand-right{background-position:-144px -144px;} +.icon-hand-left{background-position:-168px -144px;} +.icon-hand-up{background-position:-192px -144px;} +.icon-hand-down{background-position:-216px -144px;} +.icon-circle-arrow-right{background-position:-240px -144px;} +.icon-circle-arrow-left{background-position:-264px -144px;} +.icon-circle-arrow-up{background-position:-288px -144px;} +.icon-circle-arrow-down{background-position:-312px -144px;} +.icon-globe{background-position:-336px -144px;} +.icon-wrench{background-position:-360px -144px;} +.icon-tasks{background-position:-384px -144px;} +.icon-filter{background-position:-408px -144px;} +.icon-briefcase{background-position:-432px -144px;} +.icon-fullscreen{background-position:-456px -144px;} +.btn-group{position:relative;display:inline-block;*display:inline;*zoom:1;font-size:0;vertical-align:middle;white-space:nowrap;*margin-left:.3em;}.btn-group:first-child{*margin-left:0;} +.btn-group+.btn-group{margin-left:5px;} +.btn-toolbar{font-size:0;margin-top:10px;margin-bottom:10px;}.btn-toolbar .btn+.btn,.btn-toolbar .btn-group+.btn,.btn-toolbar .btn+.btn-group{margin-left:5px;} +.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +.btn-group>.btn+.btn{margin-left:-1px;} +.btn-group>.btn,.btn-group>.dropdown-menu{font-size:14px;} +.btn-group>.btn-mini{font-size:11px;} +.btn-group>.btn-small{font-size:12px;} +.btn-group>.btn-large{font-size:16px;} +.btn-group>.btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;} +.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;} +.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;} +.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;} +.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2;} +.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0;} +.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);*padding-top:5px;*padding-bottom:5px;} +.btn-group>.btn-mini+.dropdown-toggle{padding-left:5px;padding-right:5px;*padding-top:2px;*padding-bottom:2px;} +.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px;} +.btn-group>.btn-large+.dropdown-toggle{padding-left:12px;padding-right:12px;*padding-top:7px;*padding-bottom:7px;} +.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);} +.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6;} +.btn-group.open .btn-primary.dropdown-toggle{background-color:#0044cc;} +.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406;} +.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f;} +.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351;} +.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4;} +.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222222;} +.btn .caret{margin-top:8px;margin-left:0;} +.btn-mini .caret,.btn-small .caret,.btn-large .caret{margin-top:6px;} +.btn-large .caret{border-left-width:5px;border-right-width:5px;border-top-width:5px;} +.dropup .btn-large .caret{border-bottom-width:5px;} +.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;} +.btn-group-vertical{display:inline-block;*display:inline;*zoom:1;} +.btn-group-vertical .btn{display:block;float:none;width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +.btn-group-vertical .btn+.btn{margin-left:0;margin-top:-1px;} +.btn-group-vertical .btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;} +.btn-group-vertical .btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;} +.btn-group-vertical .btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0;} +.btn-group-vertical .btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;} +.nav{margin-left:0;margin-bottom:20px;list-style:none;} +.nav>li>a{display:block;} +.nav>li>a:hover{text-decoration:none;background-color:#eeeeee;} +.nav>.pull-right{float:right;} +.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999999;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);text-transform:uppercase;} +.nav li+.nav-header{margin-top:9px;} +.nav-list{padding-left:15px;padding-right:15px;margin-bottom:0;} +.nav-list>li>a,.nav-list .nav-header{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);} +.nav-list>li>a{padding:3px 15px;} +.nav-list>.active>a,.nav-list>.active>a:hover{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc;} +.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px;} +.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;} +.nav-tabs,.nav-pills{*zoom:1;}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";line-height:0;} +.nav-tabs:after,.nav-pills:after{clear:both;} +.nav-tabs>li,.nav-pills>li{float:left;} +.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;} +.nav-tabs{border-bottom:1px solid #ddd;} +.nav-tabs>li{margin-bottom:-1px;} +.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #dddddd;} +.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555555;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;} +.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} +.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#ffffff;background-color:#0088cc;} +.nav-stacked>li{float:none;} +.nav-stacked>li>a{margin-right:0;} +.nav-tabs.nav-stacked{border-bottom:0;} +.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;} +.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;} +.nav-tabs.nav-stacked>li>a:hover{border-color:#ddd;z-index:2;} +.nav-pills.nav-stacked>li>a{margin-bottom:3px;} +.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;} +.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;} +.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;} +.nav .dropdown-toggle .caret{border-top-color:#0088cc;border-bottom-color:#0088cc;margin-top:6px;} +.nav .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580;} +.nav-tabs .dropdown-toggle .caret{margin-top:8px;} +.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff;} +.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555555;border-bottom-color:#555555;} +.nav>.dropdown.active>a:hover{cursor:pointer;} +.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover{color:#ffffff;background-color:#999999;border-color:#999999;} +.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:1;filter:alpha(opacity=100);} +.tabs-stacked .open>a:hover{border-color:#999999;} +.tabbable{*zoom:1;}.tabbable:before,.tabbable:after{display:table;content:"";line-height:0;} +.tabbable:after{clear:both;} +.tab-content{overflow:auto;} +.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0;} +.tab-content>.tab-pane,.pill-content>.pill-pane{display:none;} +.tab-content>.active,.pill-content>.active{display:block;} +.tabs-below>.nav-tabs{border-top:1px solid #ddd;} +.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0;} +.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.tabs-below>.nav-tabs>li>a:hover{border-bottom-color:transparent;border-top-color:#ddd;} +.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd #ddd;} +.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none;} +.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;} +.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;} +.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;} +.tabs-left>.nav-tabs>li>a:hover{border-color:#eeeeee #dddddd #eeeeee #eeeeee;} +.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;} +.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;} +.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;} +.tabs-right>.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #eeeeee #dddddd;} +.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;} +.nav>.disabled>a{color:#999999;} +.nav>.disabled>a:hover{text-decoration:none;background-color:transparent;cursor:default;} +.navbar{overflow:visible;margin-bottom:20px;color:#777777;*position:relative;*z-index:2;} +.navbar-inner{min-height:40px;padding-left:20px;padding-right:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top, #ffffff, #f2f2f2);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));background-image:-webkit-linear-gradient(top, #ffffff, #f2f2f2);background-image:-o-linear-gradient(top, #ffffff, #f2f2f2);background-image:linear-gradient(to bottom, #ffffff, #f2f2f2);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);-moz-box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);*zoom:1;}.navbar-inner:before,.navbar-inner:after{display:table;content:"";line-height:0;} +.navbar-inner:after{clear:both;} +.navbar .container{width:auto;} +.nav-collapse.collapse{height:auto;overflow:visible;} +.navbar .brand{float:left;display:block;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777777;text-shadow:0 1px 0 #ffffff;}.navbar .brand:hover{text-decoration:none;} +.navbar-text{margin-bottom:0;line-height:40px;} +.navbar-link{color:#777777;}.navbar-link:hover{color:#333333;} +.navbar .divider-vertical{height:40px;margin:0 9px;border-left:1px solid #f2f2f2;border-right:1px solid #ffffff;} +.navbar .btn,.navbar .btn-group{margin-top:5px;} +.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn{margin-top:0;} +.navbar-form{margin-bottom:0;*zoom:1;}.navbar-form:before,.navbar-form:after{display:table;content:"";line-height:0;} +.navbar-form:after{clear:both;} +.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px;} +.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0;} +.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px;} +.navbar-form .input-append,.navbar-form .input-prepend{margin-top:6px;white-space:nowrap;}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0;} +.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0;}.navbar-search .search-query{margin-bottom:0;padding:4px 14px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;} +.navbar-static-top{position:static;margin-bottom:0;}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0;} +.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px;} +.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0;} +.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} +.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;} +.navbar-fixed-top{top:0;} +.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,.1);box-shadow:0 1px 10px rgba(0,0,0,.1);} +.navbar-fixed-bottom{bottom:0;}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,.1);box-shadow:0 -1px 10px rgba(0,0,0,.1);} +.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;} +.navbar .nav.pull-right{float:right;margin-right:0;} +.navbar .nav>li{float:left;} +.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777777;text-decoration:none;text-shadow:0 1px 0 #ffffff;} +.navbar .nav .dropdown-toggle .caret{margin-top:8px;} +.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{background-color:transparent;color:#333333;text-decoration:none;} +.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);-moz-box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);} +.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#ededed;background-image:-moz-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));background-image:-webkit-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:-o-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:linear-gradient(to bottom, #f2f2f2, #e5e5e5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#e5e5e5;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);}.navbar .btn-navbar:hover,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#ffffff;background-color:#e5e5e5;*background-color:#d9d9d9;} +.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#cccccc \9;} +.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);} +.btn-navbar .icon-bar+.icon-bar{margin-top:3px;} +.navbar .nav>li>.dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.2);position:absolute;top:-7px;left:9px;} +.navbar .nav>li>.dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;position:absolute;top:-6px;left:10px;} +.navbar-fixed-bottom .nav>li>.dropdown-menu:before{border-top:7px solid #ccc;border-top-color:rgba(0, 0, 0, 0.2);border-bottom:0;bottom:-7px;top:auto;} +.navbar-fixed-bottom .nav>li>.dropdown-menu:after{border-top:6px solid #ffffff;border-bottom:0;bottom:-6px;top:auto;} +.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{background-color:#e5e5e5;color:#555555;} +.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777777;border-bottom-color:#777777;} +.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555555;border-bottom-color:#555555;} +.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{left:auto;right:0;}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{left:auto;right:12px;} +.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{left:auto;right:13px;} +.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{left:auto;right:100%;margin-left:0;margin-right:-1px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;} +.navbar-inverse{color:#999999;}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top, #222222, #111111);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));background-image:-webkit-linear-gradient(top, #222222, #111111);background-image:-o-linear-gradient(top, #222222, #111111);background-image:linear-gradient(to bottom, #222222, #111111);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);border-color:#252525;} +.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999999;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover{color:#ffffff;} +.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{background-color:transparent;color:#ffffff;} +.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#ffffff;background-color:#111111;} +.navbar-inverse .navbar-link{color:#999999;}.navbar-inverse .navbar-link:hover{color:#ffffff;} +.navbar-inverse .divider-vertical{border-left-color:#111111;border-right-color:#222222;} +.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{background-color:#111111;color:#ffffff;} +.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999999;border-bottom-color:#999999;} +.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;} +.navbar-inverse .navbar-search .search-query{color:#ffffff;background-color:#515151;border-color:#111111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none;}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#cccccc;} +.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#cccccc;} +.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#cccccc;} +.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);outline:0;} +.navbar-inverse .btn-navbar{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e0e0e;background-image:-moz-linear-gradient(top, #151515, #040404);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));background-image:-webkit-linear-gradient(top, #151515, #040404);background-image:-o-linear-gradient(top, #151515, #040404);background-image:linear-gradient(to bottom, #151515, #040404);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);border-color:#040404 #040404 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#040404;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#ffffff;background-color:#040404;*background-color:#000000;} +.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000000 \9;} +.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.breadcrumb li{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 0 #ffffff;} +.breadcrumb .divider{padding:0 5px;color:#ccc;} +.breadcrumb .active{color:#999999;} +.pagination{margin:20px 0;} +.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);} +.pagination ul>li{display:inline;} +.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#ffffff;border:1px solid #dddddd;border-left-width:0;} +.pagination ul>li>a:hover,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5;} +.pagination ul>.active>a,.pagination ul>.active>span{color:#999999;cursor:default;} +.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover{color:#999999;background-color:transparent;cursor:default;} +.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;} +.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;} +.pagination-centered{text-align:center;} +.pagination-right{text-align:right;} +.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px;} +.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;} +.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;} +.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-top-left-radius:3px;-moz-border-radius-topleft:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-bottomleft:3px;border-bottom-left-radius:3px;} +.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;-moz-border-radius-topright:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-bottomright:3px;border-bottom-right-radius:3px;} +.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px;} +.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:1px 6px;font-size:10.5px;} +.pager{margin:20px 0;list-style:none;text-align:center;*zoom:1;}.pager:before,.pager:after{display:table;content:"";line-height:0;} +.pager:after{clear:both;} +.pager li{display:inline;} +.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;} +.pager li>a:hover{text-decoration:none;background-color:#f5f5f5;} +.pager .next>a,.pager .next>span{float:right;} +.pager .previous>a,.pager .previous>span{float:left;} +.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>span{color:#999999;background-color:#fff;cursor:default;} +.thumbnails{margin-left:-20px;list-style:none;*zoom:1;}.thumbnails:before,.thumbnails:after{display:table;content:"";line-height:0;} +.thumbnails:after{clear:both;} +.row-fluid .thumbnails{margin-left:0;} +.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px;} +.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;} +a.thumbnail:hover{border-color:#0088cc;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);} +.thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto;} +.thumbnail .caption{padding:9px;color:#555555;} +.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;color:#c09853;} +.alert h4{margin:0;} +.alert .close{position:relative;top:-2px;right:-21px;line-height:20px;} +.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847;} +.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48;} +.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad;} +.alert-block{padding-top:14px;padding-bottom:14px;} +.alert-block>p,.alert-block>ul{margin-bottom:0;} +.alert-block p+p{margin-top:5px;} +@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-o-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));background-image:-webkit-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-o-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:linear-gradient(to bottom, #f5f5f5, #f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.progress .bar{width:0%;height:100%;color:#ffffff;float:left;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top, #149bdf, #0480be);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));background-image:-webkit-linear-gradient(top, #149bdf, #0480be);background-image:-o-linear-gradient(top, #149bdf, #0480be);background-image:linear-gradient(to bottom, #149bdf, #0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease;} +.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);} +.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px;} +.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite;} +.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(to bottom, #ee5f5b, #c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0);} +.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} +.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(to bottom, #62c462, #57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0);} +.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} +.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(to bottom, #5bc0de, #339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0);} +.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} +.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(to bottom, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);} +.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);} +.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eeeeee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px;} +.hero-unit li{line-height:30px;} +.media,.media-body{overflow:hidden;*overflow:visible;zoom:1;} +.media,.media .media{margin-top:15px;} +.media:first-child{margin-top:0;} +.media-object{display:block;} +.media-heading{margin:0 0 5px;} +.media .pull-left{margin-right:10px;} +.media .pull-right{margin-left:10px;} +.media-list{margin-left:0;list-style:none;} +.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);}.tooltip.in{opacity:0.8;filter:alpha(opacity=80);} +.tooltip.top{margin-top:-3px;} +.tooltip.right{margin-left:3px;} +.tooltip.bottom{margin-top:3px;} +.tooltip.left{margin-left:-3px;} +.tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;text-decoration:none;background-color:#000000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid;} +.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000000;} +.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000000;} +.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000000;} +.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000000;} +.popover{position:absolute;top:0;left:0;z-index:1010;display:none;width:236px;padding:1px;background-color:#ffffff;-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);}.popover.top{margin-top:-10px;} +.popover.right{margin-left:10px;} +.popover.bottom{margin-top:10px;} +.popover.left{margin-left:-10px;} +.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0;} +.popover-content{padding:9px 14px;}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0;} +.popover .arrow,.popover .arrow:after{position:absolute;display:inline-block;width:0;height:0;border-color:transparent;border-style:solid;} +.popover .arrow:after{content:"";z-index:-1;} +.popover.top .arrow{bottom:-10px;left:50%;margin-left:-10px;border-width:10px 10px 0;border-top-color:#ffffff;}.popover.top .arrow:after{border-width:11px 11px 0;border-top-color:rgba(0, 0, 0, 0.25);bottom:-1px;left:-11px;} +.popover.right .arrow{top:50%;left:-10px;margin-top:-10px;border-width:10px 10px 10px 0;border-right-color:#ffffff;}.popover.right .arrow:after{border-width:11px 11px 11px 0;border-right-color:rgba(0, 0, 0, 0.25);bottom:-11px;left:-1px;} +.popover.bottom .arrow{top:-10px;left:50%;margin-left:-10px;border-width:0 10px 10px;border-bottom-color:#ffffff;}.popover.bottom .arrow:after{border-width:0 11px 11px;border-bottom-color:rgba(0, 0, 0, 0.25);top:-1px;left:-11px;} +.popover.left .arrow{top:50%;right:-10px;margin-top:-10px;border-width:10px 0 10px 10px;border-left-color:#ffffff;}.popover.left .arrow:after{border-width:11px 0 11px 11px;border-left-color:rgba(0, 0, 0, 0.25);bottom:-11px;right:-1px;} +.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000;}.modal-backdrop.fade{opacity:0;} +.modal-backdrop,.modal-backdrop.fade.in{opacity:0.8;filter:alpha(opacity=80);} +.modal{position:fixed;top:50%;left:50%;z-index:1050;width:560px;margin:-250px 0 0 -280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;outline:none;}.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;} +.modal.fade.in{top:50%;} +.modal-header{padding:9px 15px;border-bottom:1px solid #eee;}.modal-header .close{margin-top:2px;} +.modal-header h3{margin:0;line-height:30px;} +.modal-body{overflow-y:auto;max-height:400px;padding:15px;} +.modal-form{margin-bottom:0;} +.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;*zoom:1;}.modal-footer:before,.modal-footer:after{display:table;content:"";line-height:0;} +.modal-footer:after{clear:both;} +.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0;} +.modal-footer .btn-group .btn+.btn{margin-left:-1px;} +.modal-footer .btn-block+.btn-block{margin-left:0;} +.dropup,.dropdown{position:relative;} +.dropdown-toggle{*margin-bottom:-3px;} +.dropdown-toggle:active,.open .dropdown-toggle{outline:0;} +.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000000;border-right:4px solid transparent;border-left:4px solid transparent;content:"";} +.dropdown .caret{margin-top:8px;margin-left:2px;} +.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#ffffff;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;}.dropdown-menu.pull-right{right:0;left:auto;} +.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;} +.dropdown-menu li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333333;white-space:nowrap;} +.dropdown-menu li>a:hover,.dropdown-menu li>a:focus,.dropdown-submenu:hover>a{text-decoration:none;color:#ffffff;background-color:#0081c2;background-image:-moz-linear-gradient(top, #0088cc, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));background-image:-webkit-linear-gradient(top, #0088cc, #0077b3);background-image:-o-linear-gradient(top, #0088cc, #0077b3);background-image:linear-gradient(to bottom, #0088cc, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);} +.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#333333;text-decoration:none;outline:0;background-color:#0081c2;background-image:-moz-linear-gradient(top, #0088cc, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));background-image:-webkit-linear-gradient(top, #0088cc, #0077b3);background-image:-o-linear-gradient(top, #0088cc, #0077b3);background-image:linear-gradient(to bottom, #0088cc, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);} +.dropdown-menu .disabled>a,.dropdown-menu .disabled>a:hover{color:#999999;} +.dropdown-menu .disabled>a:hover{text-decoration:none;background-color:transparent;background-image:none;cursor:default;} +.open{*z-index:1000;}.open >.dropdown-menu{display:block;} +.pull-right>.dropdown-menu{right:0;left:auto;} +.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000000;content:"";} +.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px;} +.dropdown-submenu{position:relative;} +.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;} +.dropdown-submenu:hover>.dropdown-menu{display:block;} +.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0;} +.dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#cccccc;margin-top:5px;margin-right:-10px;} +.dropdown-submenu:hover>a:after{border-left-color:#ffffff;} +.dropdown-submenu.pull-left{float:none;}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;} +.dropdown .dropdown-menu .nav-header{padding-left:20px;padding-right:20px;} +.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.accordion{margin-bottom:20px;} +.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +.accordion-heading{border-bottom:0;} +.accordion-heading .accordion-toggle{display:block;padding:8px 15px;} +.accordion-toggle{cursor:pointer;} +.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5;} +.carousel{position:relative;margin-bottom:20px;line-height:1;} +.carousel-inner{overflow:hidden;width:100%;position:relative;} +.carousel .item{display:none;position:relative;-webkit-transition:0.6s ease-in-out left;-moz-transition:0.6s ease-in-out left;-o-transition:0.6s ease-in-out left;transition:0.6s ease-in-out left;} +.carousel .item>img{display:block;line-height:1;} +.carousel .active,.carousel .next,.carousel .prev{display:block;} +.carousel .active{left:0;} +.carousel .next,.carousel .prev{position:absolute;top:0;width:100%;} +.carousel .next{left:100%;} +.carousel .prev{left:-100%;} +.carousel .next.left,.carousel .prev.right{left:0;} +.carousel .active.left{left:-100%;} +.carousel .active.right{left:100%;} +.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#ffffff;text-align:center;background:#222222;border:3px solid #ffffff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:0.5;filter:alpha(opacity=50);}.carousel-control.right{left:auto;right:15px;} +.carousel-control:hover{color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90);} +.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:15px;background:#333333;background:rgba(0, 0, 0, 0.75);} +.carousel-caption h4,.carousel-caption p{color:#ffffff;line-height:20px;} +.carousel-caption h4{margin:0 0 5px;} +.carousel-caption p{margin-bottom:0;} +.media,.media-body{overflow:hidden;*overflow:visible;zoom:1;} +.media,.media .media{margin-top:15px;} +.media:first-child{margin-top:0;} +.media-object{display:block;} +.media-heading{margin:0 0 5px;} +.media .pull-left{margin-right:10px;} +.media .pull-right{margin-left:10px;} +.media-list{margin-left:0;list-style:none;} +.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);} +.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;} +.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.close:hover{color:#000000;text-decoration:none;cursor:pointer;opacity:0.4;filter:alpha(opacity=40);} +button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;} +.pull-right{float:right;} +.pull-left{float:left;} +.hide{display:none;} +.show{display:block;} +.invisible{visibility:hidden;} +.affix{position:fixed;} +.fade{opacity:0;-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;}.fade.in{opacity:1;} +.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease;}.collapse.in{height:auto;} +.hidden{display:none;visibility:hidden;} +.visible-phone{display:none !important;} +.visible-tablet{display:none !important;} +.hidden-desktop{display:none !important;} +.visible-desktop{display:inherit !important;} +@media (min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit !important;} .visible-desktop{display:none !important ;} .visible-tablet{display:inherit !important;} .hidden-tablet{display:none !important;}}@media (max-width:767px){.hidden-desktop{display:inherit !important;} .visible-desktop{display:none !important;} .visible-phone{display:inherit !important;} .hidden-phone{display:none !important;}}@media (max-width:767px){body{padding-left:20px;padding-right:20px;} .navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-left:-20px;margin-right:-20px;} .container-fluid{padding:0;} .dl-horizontal dt{float:none;clear:none;width:auto;text-align:left;} .dl-horizontal dd{margin-left:0;} .container{width:auto;} .row-fluid{width:100%;} .row,.thumbnails{margin-left:0;} .thumbnails>li{float:none;margin-left:0;} [class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{float:none;display:block;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .row-fluid [class*="offset"]:first-child{margin-left:0;} .input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto;} .controls-row [class*="span"]+[class*="span"]{margin-left:0;} .modal{position:fixed;top:20px;left:20px;right:20px;width:auto;margin:0;}.modal.fade{top:-100px;} .modal.fade.in{top:20px;}}@media (max-width:480px){.nav-collapse{-webkit-transform:translate3d(0, 0, 0);} .page-header h1 small{display:block;line-height:20px;} input[type="checkbox"],input[type="radio"]{border:1px solid #ccc;} .form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left;} .form-horizontal .controls{margin-left:0;} .form-horizontal .control-list{padding-top:0;} .form-horizontal .form-actions{padding-left:10px;padding-right:10px;} .media .pull-left,.media .pull-right{float:none;display:block;margin-bottom:10px;} .media-object{margin-right:0;margin-left:0;} .modal{top:10px;left:10px;right:10px;} .modal-header .close{padding:10px;margin:-10px;} .carousel-caption{position:static;}}@media (min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;} .row:after{clear:both;} [class*="span"]{float:left;min-height:1px;margin-left:20px;} .container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px;} .span12{width:724px;} .span11{width:662px;} .span10{width:600px;} .span9{width:538px;} .span8{width:476px;} .span7{width:414px;} .span6{width:352px;} .span5{width:290px;} .span4{width:228px;} .span3{width:166px;} .span2{width:104px;} .span1{width:42px;} .offset12{margin-left:764px;} .offset11{margin-left:702px;} .offset10{margin-left:640px;} .offset9{margin-left:578px;} .offset8{margin-left:516px;} .offset7{margin-left:454px;} .offset6{margin-left:392px;} .offset5{margin-left:330px;} .offset4{margin-left:268px;} .offset3{margin-left:206px;} .offset2{margin-left:144px;} .offset1{margin-left:82px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;} .row-fluid:after{clear:both;} .row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;} .row-fluid [class*="span"]:first-child{margin-left:0;} .row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%;} .row-fluid .span12{width:100%;*width:99.94680851063829%;} .row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%;} .row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%;} .row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%;} .row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%;} .row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%;} .row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%;} .row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%;} .row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%;} .row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%;} .row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%;} .row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%;} .row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%;} .row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%;} .row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%;} .row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%;} .row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%;} .row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%;} .row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%;} .row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%;} .row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%;} .row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%;} .row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%;} .row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%;} .row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%;} .row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%;} .row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%;} .row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%;} .row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%;} .row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%;} .row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%;} .row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%;} .row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%;} .row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%;} .row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%;} .row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%;} input,textarea,.uneditable-input{margin-left:0;} .controls-row [class*="span"]+[class*="span"]{margin-left:20px;} input.span12, textarea.span12, .uneditable-input.span12{width:710px;} input.span11, textarea.span11, .uneditable-input.span11{width:648px;} input.span10, textarea.span10, .uneditable-input.span10{width:586px;} input.span9, textarea.span9, .uneditable-input.span9{width:524px;} input.span8, textarea.span8, .uneditable-input.span8{width:462px;} input.span7, textarea.span7, .uneditable-input.span7{width:400px;} input.span6, textarea.span6, .uneditable-input.span6{width:338px;} input.span5, textarea.span5, .uneditable-input.span5{width:276px;} input.span4, textarea.span4, .uneditable-input.span4{width:214px;} input.span3, textarea.span3, .uneditable-input.span3{width:152px;} input.span2, textarea.span2, .uneditable-input.span2{width:90px;} input.span1, textarea.span1, .uneditable-input.span1{width:28px;}}@media (min-width:1200px){.row{margin-left:-30px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;} .row:after{clear:both;} [class*="span"]{float:left;min-height:1px;margin-left:30px;} .container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px;} .span12{width:1170px;} .span11{width:1070px;} .span10{width:970px;} .span9{width:870px;} .span8{width:770px;} .span7{width:670px;} .span6{width:570px;} .span5{width:470px;} .span4{width:370px;} .span3{width:270px;} .span2{width:170px;} .span1{width:70px;} .offset12{margin-left:1230px;} .offset11{margin-left:1130px;} .offset10{margin-left:1030px;} .offset9{margin-left:930px;} .offset8{margin-left:830px;} .offset7{margin-left:730px;} .offset6{margin-left:630px;} .offset5{margin-left:530px;} .offset4{margin-left:430px;} .offset3{margin-left:330px;} .offset2{margin-left:230px;} .offset1{margin-left:130px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;} .row-fluid:after{clear:both;} .row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;} .row-fluid [class*="span"]:first-child{margin-left:0;} .row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.564102564102564%;} .row-fluid .span12{width:100%;*width:99.94680851063829%;} .row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%;} .row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%;} .row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%;} .row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%;} .row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%;} .row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%;} .row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%;} .row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%;} .row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%;} .row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%;} .row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%;} .row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%;} .row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%;} .row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%;} .row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%;} .row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%;} .row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%;} .row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%;} .row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%;} .row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%;} .row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%;} .row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%;} .row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%;} .row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%;} .row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%;} .row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%;} .row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%;} .row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%;} .row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%;} .row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%;} .row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%;} .row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%;} .row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%;} .row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%;} .row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%;} input,textarea,.uneditable-input{margin-left:0;} .controls-row [class*="span"]+[class*="span"]{margin-left:30px;} input.span12, textarea.span12, .uneditable-input.span12{width:1156px;} input.span11, textarea.span11, .uneditable-input.span11{width:1056px;} input.span10, textarea.span10, .uneditable-input.span10{width:956px;} input.span9, textarea.span9, .uneditable-input.span9{width:856px;} input.span8, textarea.span8, .uneditable-input.span8{width:756px;} input.span7, textarea.span7, .uneditable-input.span7{width:656px;} input.span6, textarea.span6, .uneditable-input.span6{width:556px;} input.span5, textarea.span5, .uneditable-input.span5{width:456px;} input.span4, textarea.span4, .uneditable-input.span4{width:356px;} input.span3, textarea.span3, .uneditable-input.span3{width:256px;} input.span2, textarea.span2, .uneditable-input.span2{width:156px;} input.span1, textarea.span1, .uneditable-input.span1{width:56px;} .thumbnails{margin-left:-30px;} .thumbnails>li{margin-left:30px;} .row-fluid .thumbnails{margin-left:0;}}@media (max-width:979px){body{padding-top:0;} .navbar-fixed-top,.navbar-fixed-bottom{position:static;} .navbar-fixed-top{margin-bottom:20px;} .navbar-fixed-bottom{margin-top:20px;} .navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px;} .navbar .container{width:auto;padding:0;} .navbar .brand{padding-left:10px;padding-right:10px;margin:0 0 0 -5px;} .nav-collapse{clear:both;} .nav-collapse .nav{float:none;margin:0 0 10px;} .nav-collapse .nav>li{float:none;} .nav-collapse .nav>li>a{margin-bottom:2px;} .nav-collapse .nav>.divider-vertical{display:none;} .nav-collapse .nav .nav-header{color:#777777;text-shadow:none;} .nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} .nav-collapse .dropdown-menu li+li a{margin-bottom:2px;} .nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#f2f2f2;} .navbar-inverse .nav-collapse .nav>li>a,.navbar-inverse .nav-collapse .dropdown-menu a{color:#999999;} .navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:hover{background-color:#111111;} .nav-collapse.in .btn-group{margin-top:5px;padding:0;} .nav-collapse .dropdown-menu{position:static;top:auto;left:auto;float:none;display:none;max-width:none;margin:0 15px;padding:0;background-color:transparent;border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .nav-collapse .open>.dropdown-menu{display:block;} .nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none;} .nav-collapse .dropdown-menu .divider{display:none;} .nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none;} .nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);} .navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111111;border-bottom-color:#111111;} .navbar .nav-collapse .nav.pull-right{float:none;margin-left:0;} .nav-collapse,.nav-collapse.collapse{overflow:hidden;height:0;} .navbar .btn-navbar{display:block;} .navbar-static .navbar-inner{padding-left:10px;padding-right:10px;}}@media (min-width:980px){.nav-collapse.collapse{height:auto !important;overflow:visible !important;}} diff --git a/js/lib/bootstrap.min.js b/js/lib/bootstrap.min.js index 0e33fb1..7373052 100644 --- a/js/lib/bootstrap.min.js +++ b/js/lib/bootstrap.min.js @@ -1,6 +1,7 @@ -/*! +/** * Bootstrap.js by @fat & @mdo +* plugins: bootstrap-transition.js, bootstrap-modal.js, bootstrap-dropdown.js, bootstrap-scrollspy.js, bootstrap-tab.js, bootstrap-tooltip.js, bootstrap-popover.js, bootstrap-affix.js, bootstrap-alert.js, bootstrap-button.js, bootstrap-collapse.js, bootstrap-carousel.js, bootstrap-typeahead.js * Copyright 2012 Twitter, Inc. * http://www.apache.org/licenses/LICENSE-2.0.txt */ -!function(e){e(function(){"use strict";e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()},e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e(function(){e("body").on("click.alert.data-api",t,n.prototype.close)})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")},e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e(function(){e("body").on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=n,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},to:function(t){var n=this.$element.find(".item.active"),r=n.parent().children(),i=r.index(n),s=this;if(t>r.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){s.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(r[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f=e.Event("slide",{relatedTarget:i[0]});this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u]();if(i.hasClass("active"))return;if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}},e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e(function(){e("body").on("click.carousel.data-api","[data-slide]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=!i.data("modal")&&e.extend({},i.data(),n.data());i.carousel(s),t.preventDefault()})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning)return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning)return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=typeof n=="object"&&n;i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e(function(){e("body").on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})})}(window.jQuery),!function(e){"use strict";function r(){i(e(t)).removeClass("open")}function i(t){var n=t.attr("data-target"),r;return n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=e(n),r.length||(r=t.parent()),r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||(s.toggleClass("open"),n.focus()),!1},keydown:function(t){var n,r,s,o,u,a;if(!/(38|40|27)/.test(t.keyCode))return;n=e(this),t.preventDefault(),t.stopPropagation();if(n.is(".disabled, :disabled"))return;o=i(n),u=o.hasClass("open");if(!u||u&&t.keyCode==27)return n.click();r=e("[role=menu] li:not(.divider) a",o);if(!r.length)return;a=r.index(r.filter(":focus")),t.keyCode==38&&a>0&&a--,t.keyCode==40&&a').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}},e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e(function(){e("body").on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,this.options.trigger=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):this.options.trigger!="manual"&&(i=this.options.trigger=="hover"?"mouseenter":"focus",s=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this))),this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(s),e.remove().css({top:0,left:0,display:"block"}).appendTo(t?this.$element:document.body),n=this.getPosition(t),r=e[0].offsetWidth,i=e[0].offsetHeight;switch(t?s.split(" ")[1]:s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}e.css(o).addClass(s).addClass("in")}},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function r(){var t=setTimeout(function(){n.off(e.support.transition.end).remove()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.remove()})}var t=this,n=this.tip();return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r():n.remove(),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}},e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'
        ',trigger:"hover",title:"",delay:0,html:!0}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content > *")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}}),e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'

        '})}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var t=e(this),n=t.data("target")||t.attr("href"),r=/^#\w/.test(n)&&e(n);return r&&r.length&&[[r.position().top,n]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}},e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active a").last()[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}},e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e(function(){e("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.$menu=e(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:t.top+t.height,left:t.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length"+t+""})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),(e.browser.chrome||e.browser.webkit||e.browser.msie)&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this))},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=!~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},blur:function(e){var t=this;setTimeout(function(){t.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(t){this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")}},e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'',item:'
      24. ',minLength:1},e.fn.typeahead.Constructor=t,e(function(){e("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;t.preventDefault(),n.typeahead(n.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))},e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery); \ No newline at end of file +!function(a){a(function(){a.support.transition=function(){var a=function(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},c;for(c in b)if(a.style[c]!==undefined)return b[c]}();return a&&{end:a}}()})}(window.jQuery),!function(a){var b=function(b,c){this.options=c,this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this,c=a.Event("show");this.$element.trigger(c);if(this.isShown||c.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var c=a.support.transition&&b.$element.hasClass("fade");b.$element.parent().length||b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in").attr("aria-hidden",!1),b.enforceFocus(),c?b.$element.one(a.support.transition.end,function(){b.$element.focus().trigger("shown")}):b.$element.focus().trigger("shown")})},hide:function(b){b&&b.preventDefault();var c=this;b=a.Event("hide"),this.$element.trigger(b);if(!this.isShown||b.isDefaultPrevented())return;this.isShown=!1,this.escape(),a(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),a.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var b=this;a(document).on("focusin.modal",function(a){b.$element[0]!==a.target&&!b.$element.has(a.target).length&&b.$element.focus()})},escape:function(){var a=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(b){b.which==27&&a.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),b.hideModal()},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),b.hideModal()})},hideModal:function(a){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('